Section Block - Version 1.3.0

Version Description

  • JavaScript code fully rebuilt on React, no more jQuery,
  • Blocks Summary page style & script added,
  • license changed from GPL2+ to GPLv3,
  • block code improved,
Download this release

Release Info

Developer wedoplugins
Plugin Icon 128x128 Section Block
Version 1.3.0
Comparing to
See all releases

Code changes from version 1.2.0 to 1.3.0

build/background-position-events.min.js CHANGED
@@ -1,4 +1,4 @@
1
- !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},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=2)}([function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n.d(t,"a",function(){return o});var o=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,o;return t=e,(n=[{key:"getOffsetLeft",value:function(e){var t=0;do{null!==e.offsetParent&&(null===(e=e.offsetParent)||0===typeof e.offsetLeft||isNaN(e.offsetLeft)||(t+=e.offsetLeft))}while(e.offsetParent);return t}},{key:"update",value:function(e){var t,n=document.getElementById("adminmenuback"),r=0,o=this;null!==n&&(t="none"!==getComputedStyle(n,null).display,r=t?document.body.classList.contains("folded")?36:160:0),Array.from(document.querySelectorAll(".wp-block-wdp-section-block__background")).forEach(function(e){var t;e.style.marginLeft=null,t=o.getOffsetLeft(e),e.style.marginLeft=-1*(t-r)+"px"}),!0===e&&setTimeout(function(){o.update()})}}])&&r(t.prototype,n),o&&r(t,o),e}())},,function(e,t,n){"use strict";
2
  /*!
3
  * css-vars-ponyfill
4
  * v1.17.2
@@ -13,7 +13,7 @@ function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;
13
  * https://github.com/jhildenbiddle/get-css-data
14
  * (c) 2018-2019 John Hildenbiddle <http://hildenbiddle.com>
15
  * MIT license
16
- */()}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={mimeType:t.mimeType||null,onBeforeSend:t.onBeforeSend||Function.prototype,onSuccess:t.onSuccess||Function.prototype,onError:t.onError||Function.prototype,onComplete:t.onComplete||Function.prototype},r=Array.isArray(e)?e:[e],o=Array.apply(null,Array(r.length)).map(function(e){return null});function a(){return!("<"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").trim().charAt(0))}function s(e,t){n.onError(e,r[t],t)}function c(e,t){var a=n.onSuccess(e,r[t],t);e=!1===a?"":a||e,o[t]=e,-1===o.indexOf(null)&&n.onComplete(o)}var i=document.createElement("a");r.forEach(function(e,t){if(i.setAttribute("href",e),i.href=String(i.href),Boolean(document.all&&!window.atob)&&i.host.split(":")[0]!==location.host.split(":")[0]){if(i.protocol===location.protocol){var r=new XDomainRequest;r.open("GET",e),r.timeout=0,r.onprogress=Function.prototype,r.ontimeout=Function.prototype,r.onload=function(){a(r.responseText)?c(r.responseText,t):s(r,t)},r.onerror=function(e){s(r,t)},setTimeout(function(){r.send()},0)}else console.warn("Internet Explorer 9 Cross-Origin (CORS) requests must use the same protocol (".concat(e,")")),s(null,t)}else{var o=new XMLHttpRequest;o.open("GET",e),n.mimeType&&o.overrideMimeType&&o.overrideMimeType(n.mimeType),n.onBeforeSend(o,e,t),o.onreadystatechange=function(){4===o.readyState&&(200===o.status&&a(o.responseText)?c(o.responseText,t):s(o,t))},o.send()}})}
17
  /**
18
  * Gets CSS data from <style> and <link> nodes (including @imports), then
19
  * returns data in order processed by DOM. Allows specifying nodes to
@@ -72,7 +72,7 @@ function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;
72
  * // ...
73
  * }
74
  * });
75
- */function s(e){var t={cssComments:/\/\*[\s\S]+?\*\//g,cssImports:/(?:@import\s*)(?:url\(\s*)?(?:['"])([^'"]*)(?:['"])(?:\s*\))?(?:[^;]*;)/g},n={rootElement:e.rootElement||document,include:e.include||'style,link[rel="stylesheet"]',exclude:e.exclude||null,filter:e.filter||null,useCSSOM:e.useCSSOM||!1,onBeforeSend:e.onBeforeSend||Function.prototype,onSuccess:e.onSuccess||Function.prototype,onError:e.onError||Function.prototype,onComplete:e.onComplete||Function.prototype},r=Array.apply(null,n.rootElement.querySelectorAll(n.include)).filter(function(e){return t=e,r=n.exclude,!(t.matches||t.matchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector).call(t,r);var t,r}),o=Array.apply(null,Array(r.length)).map(function(e){return null});function s(){if(-1===o.indexOf(null)){var e=o.join("");n.onComplete(e,o,r)}}function i(e,t,r,c){var i=n.onSuccess(e,r,c);(function e(t,r,o,s){var c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[];var l=u(t,o,i);l.rules.length?a(l.absoluteUrls,{onBeforeSend:function(e,t,o){n.onBeforeSend(e,r,t)},onSuccess:function(e,t,o){var a=n.onSuccess(e,r,t),s=u(e=!1===a?"":a||e,t,i);return s.rules.forEach(function(t,n){e=e.replace(t,s.absoluteRules[n])}),e},onError:function(n,a,u){c.push({xhr:n,url:a}),i.push(l.rules[u]),e(t,r,o,s,c,i)},onComplete:function(n){n.forEach(function(e,n){t=t.replace(l.rules[n],e)}),e(t,r,o,s,c,i)}}):s(t,c)})(e=void 0!==i&&!1===Boolean(i)?"":i||e,r,c,function(e,a){null===o[t]&&(a.forEach(function(e){return n.onError(e.xhr,r,e.url)}),!n.filter||n.filter.test(e)?o[t]=e:o[t]="",s())})}function u(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o={};return o.rules=(e.replace(t.cssComments,"").match(t.cssImports)||[]).filter(function(e){return-1===r.indexOf(e)}),o.urls=o.rules.map(function(e){return e.replace(t.cssImports,"$1")}),o.absoluteUrls=o.urls.map(function(e){return c(e,n)}),o.absoluteRules=o.rules.map(function(e,t){var r=o.urls[t],a=c(o.absoluteUrls[t],n);return e.replace(r,a)}),o}r.length?r.forEach(function(e,t){var r=e.getAttribute("href"),u=e.getAttribute("rel"),l="LINK"===e.nodeName&&r&&u&&"stylesheet"===u.toLowerCase(),f="STYLE"===e.nodeName;if(l)a(r,{mimeType:"text/css",onBeforeSend:function(t,r,o){n.onBeforeSend(t,e,r)},onSuccess:function(n,o,a){var s=c(r,location.href);i(n,t,e,s)},onError:function(r,a,c){o[t]="",n.onError(r,e,a),s()}});else if(f){var d=e.textContent;n.useCSSOM&&(d=Array.apply(null,e.sheet.cssRules).map(function(e){return e.cssText}).join("")),i(d,t,e,location.href)}else o[t]="",s()}):n.onComplete("",[])}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location.href,n=document.implementation.createHTMLDocument(""),r=n.createElement("base"),o=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(o),r.href=t,o.href=e,o.href}n.r(t);var i=u;function u(e,t,n){e instanceof RegExp&&(e=l(e,n)),t instanceof RegExp&&(t=l(t,n));var r=f(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function l(e,t){var n=t.match(e);return n?n[0]:null}function f(e,t,n){var r,o,a,s,c,i=n.indexOf(e),u=n.indexOf(t,i+1),l=i;if(i>=0&&u>0){for(r=[],a=n.length;l>=0&&!c;)l==i?(r.push(l),i=n.indexOf(e,l+1)):1==r.length?c=[r.pop(),u]:((o=r.pop())<a&&(a=o,s=u),u=n.indexOf(t,l+1)),l=i<u&&i>=0?i:u;r.length&&(c=[a,s])}return c}function d(e){var t=r({},{onlyVars:!1,removeComments:!1},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});function n(e){throw new Error("CSS parse error: ".concat(e))}function o(t){var n=t.exec(e);if(n)return e=e.slice(n[0].length),n}function a(){return o(/^{\s*/)}function s(){return o(/^}/)}function c(){o(/^\s*/)}function u(){if(c(),"/"===e[0]&&"*"===e[1]){for(var t=2;e[t]&&("*"!==e[t]||"/"!==e[t+1]);)t++;if(!e[t])return n("end of comment is missing");var r=e.slice(2,t);return e=e.slice(t+2),{type:"comment",comment:r}}}function l(){for(var e,n=[];e=u();)n.push(e);return t.removeComments?[]:n}function f(){for(c();"}"===e[0];)n("extra closing bracket");var t=o(/^(("(?:\\"|[^"])*"|'(?:\\'|[^'])*'|[^{])+)/);if(t)return t[0].trim().replace(/\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(e){return e.replace(/,/g,"‌")}).split(/\s*(?![^(]*\)),\s*/).map(function(e){return e.replace(/\u200C/g,",")})}function d(){o(/^([;\s]*)+/);var e=/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//g,t=o(/^(\*?[-#\/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){if(t=t[0].trim(),!o(/^:\s*/))return n("property missing ':'");var r=o(/^((?:\/\*.*?\*\/|'(?:\\'|.)*?'|"(?:\\"|.)*?"|\((\s*'(?:\\'|.)*?'|"(?:\\"|.)*?"|[^)]*?)\s*\)|[^};])+)/),a={type:"declaration",property:t.replace(e,""),value:r?r[0].replace(e,"").trim():""};return o(/^[;\s]*/),a}}function p(){if(!a())return n("missing '{'");for(var e,t=l();e=d();)t.push(e),t=t.concat(l());return s()?t:n("missing '}'")}function m(){c();for(var e,t=[];e=o(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),o(/^,\s*/);if(t.length)return{type:"keyframe",values:t,declarations:p()}}function y(){if(c(),"@"===e[0]){var r=function(){var e=o(/^@([-\w]+)?keyframes\s*/);if(e){var t=e[1];if(!(e=o(/^([-\w]+)\s*/)))return n("@keyframes missing name");var r,c=e[1];if(!a())return n("@keyframes missing '{'");for(var i=l();r=m();)i.push(r),i=i.concat(l());return s()?{type:"keyframes",name:c,vendor:t,keyframes:i}:n("@keyframes missing '}'")}}()||function(){var e=o(/^@supports *([^{]+)/);if(e)return{type:"supports",supports:e[1].trim(),rules:h()}}()||function(){if(o(/^@host\s*/))return{type:"host",rules:h()}}()||function(){var e=o(/^@media *([^{]+)/);if(e)return{type:"media",media:e[1].trim(),rules:h()}}()||function(){var e=o(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(e)return{type:"custom-media",name:e[1].trim(),media:e[2].trim()}}()||function(){if(o(/^@page */))return{type:"page",selectors:f()||[],declarations:p()}}()||function(){var e=o(/^@([-\w]+)?document *([^{]+)/);if(e)return{type:"document",document:e[2].trim(),vendor:e[1]?e[1].trim():null,rules:h()}}()||function(){if(o(/^@font-face\s*/))return{type:"font-face",declarations:p()}}()||function(){var e=o(/^@(import|charset|namespace)\s*([^;]+);/);if(e)return{type:e[1],name:e[2].trim()}}();if(r&&t.onlyVars){var i=!1;if(r.declarations)i=r.declarations.some(function(e){return/var\(/.test(e.value)});else i=(r.keyframes||r.rules||[]).some(function(e){return(e.declarations||[]).some(function(e){return/var\(/.test(e.value)})});return i?r:{}}return r}}function v(){if(t.onlyVars){var r=i("{","}",e);if(r){var o=-1!==r.pre.indexOf(":root")&&/--\S*\s*:/.test(r.body),a=/var\(/.test(r.body);if(!o&&!a)return e=e.slice(r.end+1),{}}}var s=f()||[],c=t.onlyVars?p().filter(function(e){var t=s.some(function(e){return-1!==e.indexOf(":root")})&&/^--\S/.test(e.property),n=/var\(/.test(e.value);return t||n}):p();return s.length||n("selector missing"),{type:"rule",selectors:s,declarations:c}}function h(t){if(!t&&!a())return n("missing '{'");for(var r,o=l();e.length&&(t||"}"!==e[0])&&(r=y()||v());)r.type&&o.push(r),o=o.concat(l());return t||s()?o:n("missing '}'")}return{type:"stylesheet",stylesheet:{rules:h(!0),errors:[]}}}u.range=f;var p="--",m="var",y={dom:{},temp:{},user:{}};function v(e){var t,n,o=r({},{fixNestedCalc:!0,onlyVars:!1,persist:!1,preserve:!1,variables:{},onWarning:function(){}},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),a=o.persist?y.dom:y.temp=JSON.parse(JSON.stringify(y.dom)),s=d(e,{onlyVars:o.onlyVars});if(s.stylesheet.rules.forEach(function(e){var t=[];if("rule"===e.type&&1===e.selectors.length&&":root"===e.selectors[0]&&(e.declarations.forEach(function(e,n){var r=e.property,o=e.value;r&&0===r.indexOf(p)&&(a[r]=o,t.push(n))}),!o.preserve))for(var n=t.length-1;n>=0;n--)e.declarations.splice(t[n],1)}),Object.keys(y.user).forEach(function(e){a[e]=y.user[e]}),Object.keys(o.variables).length){var c={declarations:[],selectors:[":root"],type:"rule"};Object.keys(o.variables).forEach(function(e){var t="--".concat(e.replace(/^-+/,"")),n=o.variables[e];o.persist&&(y.user[t]=n),a[t]!==n&&(a[t]=n,c.declarations.push({type:"declaration",property:t,value:n}))}),o.preserve&&c.declarations.length&&s.stylesheet.rules.push(c)}return function e(t,n){t.rules.forEach(function(r){r.rules?e(r,n):r.keyframes?r.keyframes.forEach(function(e){"keyframe"===e.type&&n(e.declarations,r)}):r.declarations&&n(r.declarations,t)})}(s.stylesheet,function(e,t){for(var n,r,s,c=0;c<e.length;c++)s=(n=e[c]).value,"declaration"===n.type&&s&&-1!==s.indexOf(m+"(")&&(r=h(s,a,o))!==n.value&&(o.preserve?(e.splice(c,0,{type:n.type,property:n.property,value:r}),c++):n.value=r)}),o.fixNestedCalc&&(t=s.stylesheet.rules,n=/(-[a-z]+-)?calc\(/,t.forEach(function(e){e.declarations&&e.declarations.forEach(function(e){for(var t=e.value,r="";n.test(t);){var o=i("calc(",")",t||"");for(t=t.slice(o.end);n.test(o.body);){var a=i(n,")",o.body);o.body="".concat(a.pre,"(").concat(a.body,")").concat(a.post)}r+="".concat(o.pre,"calc(").concat(o.body),r+=n.test(t)?"":")".concat(o.post)}e.value=r||e.value})})),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r={charset:function(e){return"@charset "+e.name+";"},comment:function(e){return 0===e.comment.indexOf("__CSSVARSPONYFILL")?"/*"+e.comment+"*/":""},"custom-media":function(e){return"@custom-media "+e.name+" "+e.media+";"},declaration:function(e){return e.property+":"+e.value+";"},document:function(e){return"@"+(e.vendor||"")+"document "+e.document+"{"+o(e.rules)+"}"},"font-face":function(e){return"@font-face{"+o(e.declarations)+"}"},host:function(e){return"@host{"+o(e.rules)+"}"},import:function(e){return"@import "+e.name+";"},keyframe:function(e){return e.values.join(",")+"{"+o(e.declarations)+"}"},keyframes:function(e){return"@"+(e.vendor||"")+"keyframes "+e.name+"{"+o(e.keyframes)+"}"},media:function(e){return"@media "+e.media+"{"+o(e.rules)+"}"},namespace:function(e){return"@namespace "+e.name+";"},page:function(e){return"@page "+(e.selectors.length?e.selectors.join(", "):"")+"{"+o(e.declarations)+"}"},rule:function(e){var t=e.declarations;if(t.length)return e.selectors.join(",")+"{"+o(t)+"}"},supports:function(e){return"@supports "+e.supports+"{"+o(e.rules)+"}"}};function o(e){for(var o="",a=0;a<e.length;a++){var s=e[a];n&&n(s);var c=r[s.type](s);c&&(o+=c,c.length&&s.selectors&&(o+=t))}return o}return o(e.stylesheet.rules)}(s)}function h(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(-1===e.indexOf("var("))return e;var o=i("(",")",e);return o?"var"===o.pre.slice(-3)?0===o.body.trim().length?(n.onWarning("var() must contain a non-whitespace string"),e):o.pre.slice(0,-3)+function(e){var o=e.split(",")[0].replace(/[\s\n\t]/g,""),a=(e.match(/(?:\s*,\s*){1}(.*)?/)||[])[1],s=t.hasOwnProperty(o)?String(t[o]):void 0,c=s||(a?String(a):void 0),i=r||e;return s||n.onWarning('variable "'.concat(o,'" is undefined')),c&&"undefined"!==c&&c.length>0?h(c,t,n,i):"var(".concat(i,")")}(o.body)+h(o.post,t,n):o.pre+"(".concat(h(o.body,t,n),")")+h(o.post,t,n):(-1!==e.indexOf("var(")&&n.onWarning('missing closing ")" in the value "'.concat(e,'"')),e)}var g="css-vars-ponyfill",b="undefined"!=typeof window,S=b&&window.CSS&&window.CSS.supports&&window.CSS.supports("(--a: 0)"),E="cssVars(): ",w={rootElement:b?document:null,shadowDOM:!1,include:"style,link[rel=stylesheet]",exclude:"",variables:{},fixNestedCalc:!0,onlyLegacy:!0,onlyVars:!1,preserve:!1,silent:!1,updateDOM:!0,updateURLs:!0,watch:null,onBeforeSend:function(){},onSuccess:function(){},onWarning:function(){},onError:function(){},onComplete:function(){}},x={cssComments:/\/\*[\s\S]+?\*\//g,cssKeyframes:/@(?:-\w*-)?keyframes/,cssRootRules:/(?::root\s*{\s*[^}]*})/g,cssUrls:/url\((?!['"]?(?:data|http|\/\/):)['"]?([^'")]*)['"]?\)/g,cssVars:/(?:(?::root\s*{\s*[^;]*;*\s*)|(?:var\(\s*))(--[^:)]+)(?:\s*[:)])/},O=null,C=null,L=!1;
76
  /**
77
  * Fetches, parses, and transforms CSS custom properties from specified
78
  * <style> and <link> elements into static values, then appends a new <style>
@@ -162,4 +162,4 @@ function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;
162
  * onComplete(cssText, styleNode, cssVariables, benchmark) {}
163
  * });
164
  */
165
- function k(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=r({},w,e),n=g;function a(e,n,r,o){t.silent||console.error("".concat(E).concat(e,"\n"),n),t.onError(e,n,r,o)}function c(e){t.silent||console.warn("".concat(E).concat(e)),t.onWarning(e)}if(t.exclude="#".concat(n)+(t.exclude?",".concat(t.exclude):""),t._benchmark=t._benchmark?t._benchmark:T(),b)if(!1===t.watch&&O&&O.disconnect(),t.watch)!function(e,t){if(!window.MutationObserver)return;var n=function(e){return"LINK"===e.tagName&&-1!==(e.getAttribute("rel")||"").indexOf("stylesheet")},r=function(e){return"STYLE"===e.tagName&&(!t||e.id!==t)};O&&O.disconnect();e.watch=w.watch,(O=new MutationObserver(function(t){var o=t.some(function(e){var t=!1;if("attributes"===e.type)t=n(e.target)||r(e.target);else if("childList"===e.type){var o=Array.apply(null,e.addedNodes),a=Array.apply(null,e.removedNodes);t=[].concat(o,a).some(function(e){var t=n(e)&&!e.disabled,o=r(e)&&x.cssVars.test(e.textContent);return t||o})}return t});o&&_(e)})).observe(document.documentElement,{attributes:!0,attributeFilter:["disabled","href"],childList:!0,subtree:!0})}(t,n),_(t);else if("loading"!==document.readyState){var i=t.shadowDOM||t.rootElement.shadowRoot||t.rootElement.host;if(S&&t.onlyLegacy){if(t.updateDOM){var u=t.rootElement.host||(t.rootElement===document?document.documentElement:t.rootElement);Object.keys(t.variables).forEach(function(e){var n="--".concat(e.replace(/^-+/,"")),r=t.variables[e];u.style.setProperty(n,r)})}}else s(i&&!L?{rootElement:w.rootElement,include:w.include,exclude:t.exclude,onSuccess:function(e,t,n){return(e.match(x.cssRootRules)||[]).join("")||!1},onComplete:function(e,n,r){v(e,{persist:!0}),L=!0,k(t)}}:{rootElement:t.rootElement,include:t.include,exclude:t.exclude,filter:t.onlyVars?x.cssVars:null,onBeforeSend:t.onBeforeSend,onSuccess:function(e,n,r){var o=t.onSuccess(e,n,r);(e=void 0!==o&&!1===Boolean(o)?"":o||e,n.setAttribute("data-cssvars",""),t.updateURLs)&&(e.replace(x.cssComments,"").match(x.cssUrls)||[]).forEach(function(t){var n=t.replace(x.cssUrls,"$1"),o=A(n,r);e=e.replace(t,t.replace(n,o))});return e},onError:function(e,t,n){var r=e.responseURL||A(n,location.href),o=e.statusText?"(".concat(e.statusText,")"):"Unspecified Error"+(0===e.status?" (possibly CORS related)":"");a("CSS XHR Error: ".concat(r," ").concat(e.status," ").concat(o),t,e,r)},onComplete:function(e,s,i){var u,l=JSON.stringify({include:t.include,exclude:t.exclude,variables:t.variables,fixNestedCalc:t.fixNestedCalc,onlyVars:t.onlyVars,preserve:t.preserve,silent:t.silent,updateURLs:t.updateURLs}),f=t.rootElement.querySelector("#".concat(n))||document.createElement("style"),d=f.__cssVars||{},p=d.cssText===e&&d.settings===l;if(p)e=f.textContent,t.silent||console.info("".concat(E,"No changes"),f);else{f.__cssVars={cssText:e,settings:l},e=s.map(function(e,t){return x.cssVars.test(e)?e:"/*__CSSVARSPONYFILL-".concat(t,"__*/")}).join("");try{e=v(e,{fixNestedCalc:t.fixNestedCalc,onlyVars:t.onlyVars,persist:t.updateDOM,preserve:t.preserve,variables:t.variables,onWarning:c}),u=x.cssKeyframes.test(e),e=e.replace(/\/\*__CSSVARSPONYFILL-(\d+)__\*\//g,function(e,t){return s[t]})}catch(e){var m=!1;s.forEach(function(e,n){try{e=v(e,t)}catch(e){var r=i[n-0];m=!0,a(e.message,r)}}),m||a(e.message||e)}}if(t.shadowDOM)for(var h,g=[t.rootElement].concat(o(t.rootElement.querySelectorAll("*"))),b=0;h=g[b];++b){if(h.shadowRoot&&h.shadowRoot.querySelector("style"))k(r({},t,{rootElement:h.shadowRoot,variables:y.dom}))}if(!p&&i&&i.length){var S=t.rootElement.querySelectorAll("link[data-cssvars],style[data-cssvars]")||t.rootElement.querySelectorAll('link[rel+="stylesheet"],style'),w=S?S[S.length-1]:null;if(w)w.parentNode.insertBefore(f,w.nextSibling);else(t.rootElement.head||t.rootElement.body||t.rootElement).appendChild(f);t.updateDOM&&(f.setAttribute("id",n),f.textContent=e,u&&function(e){var t=["animation-name","-moz-animation-name","-webkit-animation-name"].filter(function(e){return getComputedStyle(document.body)[e]})[0];if(t){for(var n=e.getElementsByTagName("*"),r=[],o=0,a=n.length;o<a;o++){var s=n[o],c=getComputedStyle(s)[t];"none"!==c&&(s.style[t]+="__CSSVARSPONYFILL-KEYFRAMES__",r.push(s))}document.body.offsetHeight;for(var i=0,u=r.length;i<u;i++){var l=r[i].style;l[t]=l[t].replace("__CSSVARSPONYFILL-KEYFRAMES__","")}}}(t.rootElement)),t.onComplete(e,f,JSON.parse(JSON.stringify(t.updateDOM?y.dom:y.temp)),T()-t._benchmark)}}})}else document.addEventListener("DOMContentLoaded",function t(n){k(e),document.removeEventListener("DOMContentLoaded",t)})}function _(e){clearTimeout(C),C=setTimeout(function(){e._benchmark=null,k(e)},100)}function A(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location.href,n=document.implementation.createHTMLDocument(""),r=n.createElement("base"),o=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(o),r.href=t,o.href=e,o.href}function T(){return b&&(window.performance||{}).now?window.performance.now():(new Date).getTime()}var M=k,N=n(0);M(),jQuery(document).ready(function(){jQuery(window).on("load",function(){var e;N.a.update(),null!==(e=document.getElementById("editor"))&&new MutationObserver(function(e,t){var n=!0,r=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done);n=!0)a.value.target.classList.contains("edit-post-layout")&&N.a.update()}catch(e){r=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw o}}}).observe(e,{attributes:!0,childList:!0,subtree:!0})}),jQuery(document).on("wp-collapse-menu",function(){N.a.update()}),jQuery(window).resize(function(){N.a.update()}),jQuery(window).on("orientationchange",function(){N.a.update()})})}]);
1
+ !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},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=2)}([function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n.d(t,"a",(function(){return o}));var o=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,o;return t=e,(n=[{key:"getOffsetLeft",value:function(e){var t=0;do{null!==e.offsetParent&&(null===(e=e.offsetParent)||void 0===e.offsetLeft||isNaN(e.offsetLeft)||(t+=e.offsetLeft))}while(e.offsetParent);return t}},{key:"update",value:function(e){var t=document.getElementById("adminmenuback"),n=this,r=0;null!==t&&"none"!==getComputedStyle(t,null).display&&(r=document.body.classList.contains("folded")?36:160),Array.from(document.querySelectorAll(".wp-block-wdp-section-block__background")).forEach((function(e){e.style.marginLeft=null,e.style.marginLeft="".concat(-1*(n.getOffsetLeft(e)-r),"px")})),!0===e&&setTimeout((function(){n.update()}),25)}}])&&r(t.prototype,n),o&&r(t,o),e}())},,function(e,t,n){"use strict";
2
  /*!
3
  * css-vars-ponyfill
4
  * v1.17.2
13
  * https://github.com/jhildenbiddle/get-css-data
14
  * (c) 2018-2019 John Hildenbiddle <http://hildenbiddle.com>
15
  * MIT license
16
+ */()}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={mimeType:t.mimeType||null,onBeforeSend:t.onBeforeSend||Function.prototype,onSuccess:t.onSuccess||Function.prototype,onError:t.onError||Function.prototype,onComplete:t.onComplete||Function.prototype},r=Array.isArray(e)?e:[e],o=Array.apply(null,Array(r.length)).map((function(e){return null}));function a(){return!("<"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").trim().charAt(0))}function s(e,t){n.onError(e,r[t],t)}function c(e,t){var a=n.onSuccess(e,r[t],t);e=!1===a?"":a||e,o[t]=e,-1===o.indexOf(null)&&n.onComplete(o)}var i=document.createElement("a");r.forEach((function(e,t){if(i.setAttribute("href",e),i.href=String(i.href),Boolean(document.all&&!window.atob)&&i.host.split(":")[0]!==location.host.split(":")[0]){if(i.protocol===location.protocol){var r=new XDomainRequest;r.open("GET",e),r.timeout=0,r.onprogress=Function.prototype,r.ontimeout=Function.prototype,r.onload=function(){a(r.responseText)?c(r.responseText,t):s(r,t)},r.onerror=function(e){s(r,t)},setTimeout((function(){r.send()}),0)}else console.warn("Internet Explorer 9 Cross-Origin (CORS) requests must use the same protocol (".concat(e,")")),s(null,t)}else{var o=new XMLHttpRequest;o.open("GET",e),n.mimeType&&o.overrideMimeType&&o.overrideMimeType(n.mimeType),n.onBeforeSend(o,e,t),o.onreadystatechange=function(){4===o.readyState&&(200===o.status&&a(o.responseText)?c(o.responseText,t):s(o,t))},o.send()}}))}
17
  /**
18
  * Gets CSS data from <style> and <link> nodes (including @imports), then
19
  * returns data in order processed by DOM. Allows specifying nodes to
72
  * // ...
73
  * }
74
  * });
75
+ */function s(e){var t={cssComments:/\/\*[\s\S]+?\*\//g,cssImports:/(?:@import\s*)(?:url\(\s*)?(?:['"])([^'"]*)(?:['"])(?:\s*\))?(?:[^;]*;)/g},n={rootElement:e.rootElement||document,include:e.include||'style,link[rel="stylesheet"]',exclude:e.exclude||null,filter:e.filter||null,useCSSOM:e.useCSSOM||!1,onBeforeSend:e.onBeforeSend||Function.prototype,onSuccess:e.onSuccess||Function.prototype,onError:e.onError||Function.prototype,onComplete:e.onComplete||Function.prototype},r=Array.apply(null,n.rootElement.querySelectorAll(n.include)).filter((function(e){return t=e,r=n.exclude,!(t.matches||t.matchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector).call(t,r);var t,r})),o=Array.apply(null,Array(r.length)).map((function(e){return null}));function s(){if(-1===o.indexOf(null)){var e=o.join("");n.onComplete(e,o,r)}}function i(e,t,r,c){var i=n.onSuccess(e,r,c);(function e(t,r,o,s){var c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[];var l=u(t,o,i);l.rules.length?a(l.absoluteUrls,{onBeforeSend:function(e,t,o){n.onBeforeSend(e,r,t)},onSuccess:function(e,t,o){var a=n.onSuccess(e,r,t),s=u(e=!1===a?"":a||e,t,i);return s.rules.forEach((function(t,n){e=e.replace(t,s.absoluteRules[n])})),e},onError:function(n,a,u){c.push({xhr:n,url:a}),i.push(l.rules[u]),e(t,r,o,s,c,i)},onComplete:function(n){n.forEach((function(e,n){t=t.replace(l.rules[n],e)})),e(t,r,o,s,c,i)}}):s(t,c)})(e=void 0!==i&&!1===Boolean(i)?"":i||e,r,c,(function(e,a){null===o[t]&&(a.forEach((function(e){return n.onError(e.xhr,r,e.url)})),!n.filter||n.filter.test(e)?o[t]=e:o[t]="",s())}))}function u(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o={};return o.rules=(e.replace(t.cssComments,"").match(t.cssImports)||[]).filter((function(e){return-1===r.indexOf(e)})),o.urls=o.rules.map((function(e){return e.replace(t.cssImports,"$1")})),o.absoluteUrls=o.urls.map((function(e){return c(e,n)})),o.absoluteRules=o.rules.map((function(e,t){var r=o.urls[t],a=c(o.absoluteUrls[t],n);return e.replace(r,a)})),o}r.length?r.forEach((function(e,t){var r=e.getAttribute("href"),u=e.getAttribute("rel"),l="LINK"===e.nodeName&&r&&u&&"stylesheet"===u.toLowerCase(),f="STYLE"===e.nodeName;if(l)a(r,{mimeType:"text/css",onBeforeSend:function(t,r,o){n.onBeforeSend(t,e,r)},onSuccess:function(n,o,a){var s=c(r,location.href);i(n,t,e,s)},onError:function(r,a,c){o[t]="",n.onError(r,e,a),s()}});else if(f){var d=e.textContent;n.useCSSOM&&(d=Array.apply(null,e.sheet.cssRules).map((function(e){return e.cssText})).join("")),i(d,t,e,location.href)}else o[t]="",s()})):n.onComplete("",[])}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location.href,n=document.implementation.createHTMLDocument(""),r=n.createElement("base"),o=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(o),r.href=t,o.href=e,o.href}n.r(t);var i=u;function u(e,t,n){e instanceof RegExp&&(e=l(e,n)),t instanceof RegExp&&(t=l(t,n));var r=f(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function l(e,t){var n=t.match(e);return n?n[0]:null}function f(e,t,n){var r,o,a,s,c,i=n.indexOf(e),u=n.indexOf(t,i+1),l=i;if(i>=0&&u>0){for(r=[],a=n.length;l>=0&&!c;)l==i?(r.push(l),i=n.indexOf(e,l+1)):1==r.length?c=[r.pop(),u]:((o=r.pop())<a&&(a=o,s=u),u=n.indexOf(t,l+1)),l=i<u&&i>=0?i:u;r.length&&(c=[a,s])}return c}function d(e){var t=r({},{onlyVars:!1,removeComments:!1},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});function n(e){throw new Error("CSS parse error: ".concat(e))}function o(t){var n=t.exec(e);if(n)return e=e.slice(n[0].length),n}function a(){return o(/^{\s*/)}function s(){return o(/^}/)}function c(){o(/^\s*/)}function u(){if(c(),"/"===e[0]&&"*"===e[1]){for(var t=2;e[t]&&("*"!==e[t]||"/"!==e[t+1]);)t++;if(!e[t])return n("end of comment is missing");var r=e.slice(2,t);return e=e.slice(t+2),{type:"comment",comment:r}}}function l(){for(var e,n=[];e=u();)n.push(e);return t.removeComments?[]:n}function f(){for(c();"}"===e[0];)n("extra closing bracket");var t=o(/^(("(?:\\"|[^"])*"|'(?:\\'|[^'])*'|[^{])+)/);if(t)return t[0].trim().replace(/\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function d(){o(/^([;\s]*)+/);var e=/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//g,t=o(/^(\*?[-#\/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){if(t=t[0].trim(),!o(/^:\s*/))return n("property missing ':'");var r=o(/^((?:\/\*.*?\*\/|'(?:\\'|.)*?'|"(?:\\"|.)*?"|\((\s*'(?:\\'|.)*?'|"(?:\\"|.)*?"|[^)]*?)\s*\)|[^};])+)/),a={type:"declaration",property:t.replace(e,""),value:r?r[0].replace(e,"").trim():""};return o(/^[;\s]*/),a}}function p(){if(!a())return n("missing '{'");for(var e,t=l();e=d();)t.push(e),t=t.concat(l());return s()?t:n("missing '}'")}function m(){c();for(var e,t=[];e=o(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),o(/^,\s*/);if(t.length)return{type:"keyframe",values:t,declarations:p()}}function v(){if(c(),"@"===e[0]){var r=function(){var e=o(/^@([-\w]+)?keyframes\s*/);if(e){var t=e[1];if(!(e=o(/^([-\w]+)\s*/)))return n("@keyframes missing name");var r,c=e[1];if(!a())return n("@keyframes missing '{'");for(var i=l();r=m();)i.push(r),i=i.concat(l());return s()?{type:"keyframes",name:c,vendor:t,keyframes:i}:n("@keyframes missing '}'")}}()||function(){var e=o(/^@supports *([^{]+)/);if(e)return{type:"supports",supports:e[1].trim(),rules:h()}}()||function(){if(o(/^@host\s*/))return{type:"host",rules:h()}}()||function(){var e=o(/^@media *([^{]+)/);if(e)return{type:"media",media:e[1].trim(),rules:h()}}()||function(){var e=o(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(e)return{type:"custom-media",name:e[1].trim(),media:e[2].trim()}}()||function(){if(o(/^@page */))return{type:"page",selectors:f()||[],declarations:p()}}()||function(){var e=o(/^@([-\w]+)?document *([^{]+)/);if(e)return{type:"document",document:e[2].trim(),vendor:e[1]?e[1].trim():null,rules:h()}}()||function(){if(o(/^@font-face\s*/))return{type:"font-face",declarations:p()}}()||function(){var e=o(/^@(import|charset|namespace)\s*([^;]+);/);if(e)return{type:e[1],name:e[2].trim()}}();if(r&&t.onlyVars){var i=!1;if(r.declarations)i=r.declarations.some((function(e){return/var\(/.test(e.value)}));else i=(r.keyframes||r.rules||[]).some((function(e){return(e.declarations||[]).some((function(e){return/var\(/.test(e.value)}))}));return i?r:{}}return r}}function y(){if(t.onlyVars){var r=i("{","}",e);if(r){var o=-1!==r.pre.indexOf(":root")&&/--\S*\s*:/.test(r.body),a=/var\(/.test(r.body);if(!o&&!a)return e=e.slice(r.end+1),{}}}var s=f()||[],c=t.onlyVars?p().filter((function(e){var t=s.some((function(e){return-1!==e.indexOf(":root")}))&&/^--\S/.test(e.property),n=/var\(/.test(e.value);return t||n})):p();return s.length||n("selector missing"),{type:"rule",selectors:s,declarations:c}}function h(t){if(!t&&!a())return n("missing '{'");for(var r,o=l();e.length&&(t||"}"!==e[0])&&(r=v()||y());)r.type&&o.push(r),o=o.concat(l());return t||s()?o:n("missing '}'")}return{type:"stylesheet",stylesheet:{rules:h(!0),errors:[]}}}u.range=f;var p="--",m="var",v={dom:{},temp:{},user:{}};function y(e){var t,n,o=r({},{fixNestedCalc:!0,onlyVars:!1,persist:!1,preserve:!1,variables:{},onWarning:function(){}},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),a=o.persist?v.dom:v.temp=JSON.parse(JSON.stringify(v.dom)),s=d(e,{onlyVars:o.onlyVars});if(s.stylesheet.rules.forEach((function(e){var t=[];if("rule"===e.type&&1===e.selectors.length&&":root"===e.selectors[0]&&(e.declarations.forEach((function(e,n){var r=e.property,o=e.value;r&&0===r.indexOf(p)&&(a[r]=o,t.push(n))})),!o.preserve))for(var n=t.length-1;n>=0;n--)e.declarations.splice(t[n],1)})),Object.keys(v.user).forEach((function(e){a[e]=v.user[e]})),Object.keys(o.variables).length){var c={declarations:[],selectors:[":root"],type:"rule"};Object.keys(o.variables).forEach((function(e){var t="--".concat(e.replace(/^-+/,"")),n=o.variables[e];o.persist&&(v.user[t]=n),a[t]!==n&&(a[t]=n,c.declarations.push({type:"declaration",property:t,value:n}))})),o.preserve&&c.declarations.length&&s.stylesheet.rules.push(c)}return function e(t,n){t.rules.forEach((function(r){r.rules?e(r,n):r.keyframes?r.keyframes.forEach((function(e){"keyframe"===e.type&&n(e.declarations,r)})):r.declarations&&n(r.declarations,t)}))}(s.stylesheet,(function(e,t){for(var n,r,s,c=0;c<e.length;c++)s=(n=e[c]).value,"declaration"===n.type&&s&&-1!==s.indexOf(m+"(")&&(r=h(s,a,o))!==n.value&&(o.preserve?(e.splice(c,0,{type:n.type,property:n.property,value:r}),c++):n.value=r)})),o.fixNestedCalc&&(t=s.stylesheet.rules,n=/(-[a-z]+-)?calc\(/,t.forEach((function(e){e.declarations&&e.declarations.forEach((function(e){for(var t=e.value,r="";n.test(t);){var o=i("calc(",")",t||"");for(t=t.slice(o.end);n.test(o.body);){var a=i(n,")",o.body);o.body="".concat(a.pre,"(").concat(a.body,")").concat(a.post)}r+="".concat(o.pre,"calc(").concat(o.body),r+=n.test(t)?"":")".concat(o.post)}e.value=r||e.value}))}))),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r={charset:function(e){return"@charset "+e.name+";"},comment:function(e){return 0===e.comment.indexOf("__CSSVARSPONYFILL")?"/*"+e.comment+"*/":""},"custom-media":function(e){return"@custom-media "+e.name+" "+e.media+";"},declaration:function(e){return e.property+":"+e.value+";"},document:function(e){return"@"+(e.vendor||"")+"document "+e.document+"{"+o(e.rules)+"}"},"font-face":function(e){return"@font-face{"+o(e.declarations)+"}"},host:function(e){return"@host{"+o(e.rules)+"}"},import:function(e){return"@import "+e.name+";"},keyframe:function(e){return e.values.join(",")+"{"+o(e.declarations)+"}"},keyframes:function(e){return"@"+(e.vendor||"")+"keyframes "+e.name+"{"+o(e.keyframes)+"}"},media:function(e){return"@media "+e.media+"{"+o(e.rules)+"}"},namespace:function(e){return"@namespace "+e.name+";"},page:function(e){return"@page "+(e.selectors.length?e.selectors.join(", "):"")+"{"+o(e.declarations)+"}"},rule:function(e){var t=e.declarations;if(t.length)return e.selectors.join(",")+"{"+o(t)+"}"},supports:function(e){return"@supports "+e.supports+"{"+o(e.rules)+"}"}};function o(e){for(var o="",a=0;a<e.length;a++){var s=e[a];n&&n(s);var c=r[s.type](s);c&&(o+=c,c.length&&s.selectors&&(o+=t))}return o}return o(e.stylesheet.rules)}(s)}function h(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(-1===e.indexOf("var("))return e;var o=i("(",")",e);return o?"var"===o.pre.slice(-3)?0===o.body.trim().length?(n.onWarning("var() must contain a non-whitespace string"),e):o.pre.slice(0,-3)+function(e){var o=e.split(",")[0].replace(/[\s\n\t]/g,""),a=(e.match(/(?:\s*,\s*){1}(.*)?/)||[])[1],s=t.hasOwnProperty(o)?String(t[o]):void 0,c=s||(a?String(a):void 0),i=r||e;return s||n.onWarning('variable "'.concat(o,'" is undefined')),c&&"undefined"!==c&&c.length>0?h(c,t,n,i):"var(".concat(i,")")}(o.body)+h(o.post,t,n):o.pre+"(".concat(h(o.body,t,n),")")+h(o.post,t,n):(-1!==e.indexOf("var(")&&n.onWarning('missing closing ")" in the value "'.concat(e,'"')),e)}var g="css-vars-ponyfill",b="undefined"!=typeof window,S=b&&window.CSS&&window.CSS.supports&&window.CSS.supports("(--a: 0)"),E="cssVars(): ",w={rootElement:b?document:null,shadowDOM:!1,include:"style,link[rel=stylesheet]",exclude:"",variables:{},fixNestedCalc:!0,onlyLegacy:!0,onlyVars:!1,preserve:!1,silent:!1,updateDOM:!0,updateURLs:!0,watch:null,onBeforeSend:function(){},onSuccess:function(){},onWarning:function(){},onError:function(){},onComplete:function(){}},x={cssComments:/\/\*[\s\S]+?\*\//g,cssKeyframes:/@(?:-\w*-)?keyframes/,cssRootRules:/(?::root\s*{\s*[^}]*})/g,cssUrls:/url\((?!['"]?(?:data|http|\/\/):)['"]?([^'")]*)['"]?\)/g,cssVars:/(?:(?::root\s*{\s*[^;]*;*\s*)|(?:var\(\s*))(--[^:)]+)(?:\s*[:)])/},O=null,C=null,L=!1;
76
  /**
77
  * Fetches, parses, and transforms CSS custom properties from specified
78
  * <style> and <link> elements into static values, then appends a new <style>
162
  * onComplete(cssText, styleNode, cssVariables, benchmark) {}
163
  * });
164
  */
165
+ function k(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=r({},w,e),n=g;function a(e,n,r,o){t.silent||console.error("".concat(E).concat(e,"\n"),n),t.onError(e,n,r,o)}function c(e){t.silent||console.warn("".concat(E).concat(e)),t.onWarning(e)}if(t.exclude="#".concat(n)+(t.exclude?",".concat(t.exclude):""),t._benchmark=t._benchmark?t._benchmark:T(),b)if(!1===t.watch&&O&&O.disconnect(),t.watch)!function(e,t){if(!window.MutationObserver)return;var n=function(e){return"LINK"===e.tagName&&-1!==(e.getAttribute("rel")||"").indexOf("stylesheet")},r=function(e){return"STYLE"===e.tagName&&(!t||e.id!==t)};O&&O.disconnect();e.watch=w.watch,(O=new MutationObserver((function(t){t.some((function(e){var t=!1;if("attributes"===e.type)t=n(e.target)||r(e.target);else if("childList"===e.type){var o=Array.apply(null,e.addedNodes),a=Array.apply(null,e.removedNodes);t=[].concat(o,a).some((function(e){var t=n(e)&&!e.disabled,o=r(e)&&x.cssVars.test(e.textContent);return t||o}))}return t}))&&_(e)}))).observe(document.documentElement,{attributes:!0,attributeFilter:["disabled","href"],childList:!0,subtree:!0})}(t,n),_(t);else if("loading"!==document.readyState){var i=t.shadowDOM||t.rootElement.shadowRoot||t.rootElement.host;if(S&&t.onlyLegacy){if(t.updateDOM){var u=t.rootElement.host||(t.rootElement===document?document.documentElement:t.rootElement);Object.keys(t.variables).forEach((function(e){var n="--".concat(e.replace(/^-+/,"")),r=t.variables[e];u.style.setProperty(n,r)}))}}else s(i&&!L?{rootElement:w.rootElement,include:w.include,exclude:t.exclude,onSuccess:function(e,t,n){return(e.match(x.cssRootRules)||[]).join("")||!1},onComplete:function(e,n,r){y(e,{persist:!0}),L=!0,k(t)}}:{rootElement:t.rootElement,include:t.include,exclude:t.exclude,filter:t.onlyVars?x.cssVars:null,onBeforeSend:t.onBeforeSend,onSuccess:function(e,n,r){var o=t.onSuccess(e,n,r);(e=void 0!==o&&!1===Boolean(o)?"":o||e,n.setAttribute("data-cssvars",""),t.updateURLs)&&(e.replace(x.cssComments,"").match(x.cssUrls)||[]).forEach((function(t){var n=t.replace(x.cssUrls,"$1"),o=A(n,r);e=e.replace(t,t.replace(n,o))}));return e},onError:function(e,t,n){var r=e.responseURL||A(n,location.href),o=e.statusText?"(".concat(e.statusText,")"):"Unspecified Error"+(0===e.status?" (possibly CORS related)":"");a("CSS XHR Error: ".concat(r," ").concat(e.status," ").concat(o),t,e,r)},onComplete:function(e,s,i){var u,l=JSON.stringify({include:t.include,exclude:t.exclude,variables:t.variables,fixNestedCalc:t.fixNestedCalc,onlyVars:t.onlyVars,preserve:t.preserve,silent:t.silent,updateURLs:t.updateURLs}),f=t.rootElement.querySelector("#".concat(n))||document.createElement("style"),d=f.__cssVars||{},p=d.cssText===e&&d.settings===l;if(p)e=f.textContent,t.silent||console.info("".concat(E,"No changes"),f);else{f.__cssVars={cssText:e,settings:l},e=s.map((function(e,t){return x.cssVars.test(e)?e:"/*__CSSVARSPONYFILL-".concat(t,"__*/")})).join("");try{e=y(e,{fixNestedCalc:t.fixNestedCalc,onlyVars:t.onlyVars,persist:t.updateDOM,preserve:t.preserve,variables:t.variables,onWarning:c}),u=x.cssKeyframes.test(e),e=e.replace(/\/\*__CSSVARSPONYFILL-(\d+)__\*\//g,(function(e,t){return s[t]}))}catch(e){var m=!1;s.forEach((function(e,n){try{e=y(e,t)}catch(e){var r=i[n-0];m=!0,a(e.message,r)}})),m||a(e.message||e)}}if(t.shadowDOM)for(var h,g=[t.rootElement].concat(o(t.rootElement.querySelectorAll("*"))),b=0;h=g[b];++b){if(h.shadowRoot&&h.shadowRoot.querySelector("style"))k(r({},t,{rootElement:h.shadowRoot,variables:v.dom}))}if(!p&&i&&i.length){var S=t.rootElement.querySelectorAll("link[data-cssvars],style[data-cssvars]")||t.rootElement.querySelectorAll('link[rel+="stylesheet"],style'),w=S?S[S.length-1]:null;if(w)w.parentNode.insertBefore(f,w.nextSibling);else(t.rootElement.head||t.rootElement.body||t.rootElement).appendChild(f);t.updateDOM&&(f.setAttribute("id",n),f.textContent=e,u&&function(e){var t=["animation-name","-moz-animation-name","-webkit-animation-name"].filter((function(e){return getComputedStyle(document.body)[e]}))[0];if(t){for(var n=e.getElementsByTagName("*"),r=[],o=0,a=n.length;o<a;o++){var s=n[o];"none"!==getComputedStyle(s)[t]&&(s.style[t]+="__CSSVARSPONYFILL-KEYFRAMES__",r.push(s))}document.body.offsetHeight;for(var c=0,i=r.length;c<i;c++){var u=r[c].style;u[t]=u[t].replace("__CSSVARSPONYFILL-KEYFRAMES__","")}}}(t.rootElement)),t.onComplete(e,f,JSON.parse(JSON.stringify(t.updateDOM?v.dom:v.temp)),T()-t._benchmark)}}})}else document.addEventListener("DOMContentLoaded",(function t(n){k(e),document.removeEventListener("DOMContentLoaded",t)}))}function _(e){clearTimeout(C),C=setTimeout((function(){e._benchmark=null,k(e)}),100)}function A(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location.href,n=document.implementation.createHTMLDocument(""),r=n.createElement("base"),o=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(o),r.href=t,o.href=e,o.href}function T(){return b&&(window.performance||{}).now?window.performance.now():(new Date).getTime()}var M=k,N=n(0);M(),jQuery(document).ready((function(){jQuery(document).on("wp-collapse-menu",(function(){N.a.update()}))})),window.onload=function(){var e;N.a.update(),null!==(e=document.getElementById("editor"))&&new MutationObserver((function(e){var t=!0,n=!1,r=void 0;try{for(var o,a=e[Symbol.iterator]();!(t=(o=a.next()).done);t=!0)o.value.target.classList.contains("edit-post-layout")&&N.a.update()}catch(e){n=!0,r=e}finally{try{t||null==a.return||a.return()}finally{if(n)throw r}}})).observe(e,{attributes:!0,childList:!0,subtree:!0})},window.addEventListener("resize",(function(){N.a.update()})),window.onorientationchange=function(){N.a.update()}}]);
build/block.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){var o={};function t(a){if(o[a])return o[a].exports;var n=o[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,t),n.l=!0,n.exports}t.m=e,t.c=o,t.d=function(e,o,a){t.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:a})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,o){if(1&o&&(e=t(e)),8&o)return e;if(4&o&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(t.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&o&&"string"!=typeof e)for(var n in e)t.d(a,n,function(o){return e[o]}.bind(null,n));return a},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},t.p="",t(t.s=1)}([function(e,o,t){"use strict";function a(e,o){for(var t=0;t<o.length;t++){var a=o[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}t.d(o,"a",function(){return n});var n=new(function(){function e(){!function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}(this,e)}var o,t,n;return o=e,(t=[{key:"getOffsetLeft",value:function(e){var o=0;do{null!==e.offsetParent&&(null===(e=e.offsetParent)||0===typeof e.offsetLeft||isNaN(e.offsetLeft)||(o+=e.offsetLeft))}while(e.offsetParent);return o}},{key:"update",value:function(e){var o,t=document.getElementById("adminmenuback"),a=0,n=this;null!==t&&(o="none"!==getComputedStyle(t,null).display,a=o?document.body.classList.contains("folded")?36:160:0),Array.from(document.querySelectorAll(".wp-block-wdp-section-block__background")).forEach(function(e){var o;e.style.marginLeft=null,o=n.getOffsetLeft(e),e.style.marginLeft=-1*(o-a)+"px"}),!0===e&&setTimeout(function(){n.update()})}}])&&a(o.prototype,t),n&&a(o,n),e}())},function(e,o,t){"use strict";t.r(o);var a=t(0);function n(e,o){for(var t=0;t<o.length;t++){var a=o[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}var l=new(function(){function e(){!function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}(this,e)}var o,t,a;return o=e,(t=[{key:"convert",value:function(e,o){var t;return e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,o,t,a){return o+o+t+t+a+a}),(t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e))?"rgba(".concat(parseInt(t[1],16),",").concat(parseInt(t[2],16),",").concat(parseInt(t[3],16),",").concat(parseFloat(o,10),")"):e}}])&&n(o.prototype,t),a&&n(o,a),e}());function c(e,o){for(var t=0;t<o.length;t++){var a=o[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}var r=new(function(){function e(){!function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}(this,e)}var o,t,a;return o=e,(t=[{key:"get",value:function(e){var o=e.useCustomStyles,t=e.padding,a=e.overlayBackgroundColor,n=e.overlayOpacity,c=e.borderColor,r=e.borderStyle,i=e.borderWidth,d=e.boxShadowXOffset,s=e.boxShadowYOffset,u=e.boxShadowBlurRadius,b=e.boxShadowSpreadRadius,f=e.boxShadowColor,p=e.boxShadowOpacity,m=e.backgroundImage,k=e.backgroundImageFocalPos,y={};return!1===o?y:(t!==parseInt(WDPSectionBlock.padding,10)&&(y["--wdpsb-padding"]=t+"px"),void 0!==a&&a!==WDPSectionBlock.overlayBackgroundColor&&(y["--wdpsb-overlay-background-color"]=a),n!==parseFloat(WDPSectionBlock.overlayOpacity,10)&&(y["--wdpsb-overlay-opacity"]=n.toString()),void 0!==c&&c!==WDPSectionBlock.borderColor&&(y["--wdpsb-border-color"]=c),r!==WDPSectionBlock.borderStyle&&(y["--wdpsb-border-style"]=r),i!==parseInt(WDPSectionBlock.borderWidth,10)&&(y["--wdpsb-border-width"]=i+"px"),d!==parseInt(WDPSectionBlock.boxShadowXOffset,10)&&(y["--wdpsb-box-shadow-xoffset"]=d+"px"),s!==parseInt(WDPSectionBlock.boxShadowYOffset,10)&&(y["--wdpsb-box-shadow-yoffset"]=s+"px"),u!==parseInt(WDPSectionBlock.boxShadowBlurRadius,10)&&(y["--wdpsb-box-shadow-blurradius"]=u+"px"),b!==parseInt(WDPSectionBlock.boxShadowSpreadRadius,10)&&(y["--wdpsb-box-shadow-spreadradius"]=b+"px"),void 0!==f?f===WDPSectionBlock.boxShadowColor&&p===parseFloat(WDPSectionBlock.boxShadowOpacity,10)||(y["--wdpsb-box-shadow-color"]=l.convert(f,p)):p!==parseFloat(WDPSectionBlock.boxShadowOpacity,10)&&(y["--wdpsb-box-shadow-color"]=l.convert(WDPSectionBlock.boxShadowColor,p)),null!==m&&(y["--wdpsb-background-image"]="url('".concat(m,"')")),.5!==k.x&&(y["--wdpsb-background-image-position-x"]=100*k.x+"%"),.5!==k.y&&(y["--wdpsb-background-image-position-y"]=100*k.y+"%"),y)}}])&&c(o.prototype,t),a&&c(o,a),e}()),i=wp.i18n.__,d=wp.blocks.registerBlockType,s=wp.blockEditor,u=s.InnerBlocks,b=s.InspectorControls,f=s.MediaUpload,p=wp.element.Fragment,m=wp.components,k=m.PanelBody,y=m.RangeControl,g=m.SelectControl,S=m.ToggleControl,w=m.ColorPalette,h=m.FocalPointPicker;d("wdp/section-block",{title:i("Section Block (by We Do Plugins)","section-block"),description:i("Cool Section Block for new Block Editor.","section-block"),icon:"index-card",category:"widgets",supports:{align:["wide","full"]},attributes:{useCustomStyles:{type:"boolean",default:!1},padding:{type:"integer",default:parseInt(WDPSectionBlock.padding,10)},overlayBackgroundColor:{type:"string",default:WDPSectionBlock.overlayBackgroundColor},overlayOpacity:{type:"float",default:parseFloat(WDPSectionBlock.overlayOpacity,10)},borderColor:{type:"string",default:WDPSectionBlock.borderColor},borderStyle:{type:"string",default:WDPSectionBlock.borderStyle},borderWidth:{type:"integer",default:parseInt(WDPSectionBlock.borderWidth,10)},boxShadowXOffset:{type:"integer",default:parseInt(WDPSectionBlock.boxShadowXOffset,10)},boxShadowYOffset:{type:"integer",default:parseInt(WDPSectionBlock.boxShadowYOffset,10)},boxShadowBlurRadius:{type:"integer",default:parseInt(WDPSectionBlock.boxShadowBlurRadius,10)},boxShadowSpreadRadius:{type:"integer",default:parseInt(WDPSectionBlock.boxShadowSpreadRadius,10)},boxShadowColor:{type:"string",default:WDPSectionBlock.boxShadowColor},boxShadowOpacity:{type:"float",default:parseFloat(WDPSectionBlock.boxShadowOpacity,10)},backgroundImage:{type:"string",default:null},backgroundImageFocalPos:{type:"object",default:{x:.5,y:.5}}},edit:function(e){var o=e.attributes,t=e.setAttributes,n=e.className,l=o.useCustomStyles,c=o.padding,d=o.overlayBackgroundColor,s=o.overlayOpacity,m=o.borderColor,v=o.borderStyle,x=o.borderWidth,B=o.boxShadowXOffset,R=o.boxShadowYOffset,C=o.boxShadowBlurRadius,P=o.boxShadowSpreadRadius,E=o.boxShadowColor,O=o.boxShadowOpacity,W=o.backgroundImage,D=o.backgroundImageFocalPos;return React.createElement(p,null,React.createElement(b,null,React.createElement(k,{title:i("Use custom styles?","section-block")},React.createElement(S,{label:i("Use custom styles?","section-block"),checked:l,onChange:function(e){t({useCustomStyles:e})}})),!0===l&&React.createElement("div",null,React.createElement(k,{title:i("Overlay","section-block"),initialOpen:!1},React.createElement(p,null,React.createElement("p",null,i("Overlay background color","section-block")),React.createElement(w,{label:i("Overlay background color","section-block"),value:d,colors:WDPSectionBlock.themeColors,onChange:function(e){t({overlayBackgroundColor:e})}})),React.createElement(y,{label:i("Overlay opacity","section-block"),value:s,onChange:function(e){t({overlayOpacity:e})},min:0,max:1,step:.01})),React.createElement(k,{title:i("Padding","section-block"),initialOpen:!1},React.createElement(y,{label:i("Padding","section-block"),value:c,onChange:function(e){t({padding:e})},min:0,max:120})),React.createElement(k,{title:i("Border","section-block"),initialOpen:!1},React.createElement(p,null,React.createElement("p",null,i("Border color","section-block")),React.createElement(w,{label:i("Border color","section-block"),value:m,colors:WDPSectionBlock.themeColors,onChange:function(e){t({borderColor:e})}})),React.createElement(g,{label:i("Border style","section-block"),value:v,onChange:function(e){t({borderStyle:e})},options:[{value:"solid",label:i("Solid","section-block")},{value:"dashed",label:i("Dashed","section-block")},{value:"dotted",label:i("Dotted","section-block")}]}),React.createElement(y,{label:i("Border width","section-block"),value:x,onChange:function(e){t({borderWidth:e})},min:0,max:30})),React.createElement(k,{title:i("Box shadow","section-block"),initialOpen:!1},React.createElement(y,{label:i("X offset","section-block"),value:B,onChange:function(e){t({boxShadowXOffset:e})},min:-100,max:100}),React.createElement(y,{label:i("Y offset","section-block"),value:R,onChange:function(e){t({boxShadowYOffset:e})},min:-100,max:100}),React.createElement(y,{label:i("Blur radius","section-block"),value:C,onChange:function(e){t({boxShadowBlurRadius:e})},min:0,max:100}),React.createElement(y,{label:i("Spread radius","section-block"),value:P,onChange:function(e){t({boxShadowSpreadRadius:e})},min:-100,max:100}),React.createElement(p,null,React.createElement("p",null,i("Box shadow color","section-block")),React.createElement(w,{label:i("Box shadow color","section-block"),value:E,colors:WDPSectionBlock.themeColors,onChange:function(e){t({boxShadowColor:e})}})),React.createElement(y,{label:i("Box shadow color opacity","section-block"),value:O,onChange:function(e){t({boxShadowOpacity:e})},min:0,max:1,step:.01})),React.createElement(k,{title:i("Background image","section-block"),initialOpen:!1},React.createElement(f,{onSelect:function(e){t({backgroundImage:e.sizes.full.url})},type:"image",value:W,render:function(e){var o=e.open;return React.createElement("button",{className:"button",onClick:o},i("Upload image","section-block"))}}),null!==W&&React.createElement(p,null,React.createElement("span",{className:"wp-block-wdp-section-block__or-span"},i("or","section-block")),React.createElement("a",{href:"#",onClick:function(e){e.preventDefault(),t({backgroundImage:null})}},i("Remove this one","section-block")),React.createElement("h4",null,i("Image focal point","section-block")),React.createElement(h,{url:W,value:D,onChange:function(e){t({backgroundImageFocalPos:e})}}))))),React.createElement("div",{className:n,style:!0===l?r.get(o):{}},React.createElement("div",{className:"wp-block-wdp-section-block__background"}),React.createElement(u,null)),a.a.update(!0))},save:function(e){var o=e.attributes,t=e.className,a=o.useCustomStyles;return React.createElement("div",{className:t,style:!0===a?r.get(o):{}},React.createElement("div",{className:"wp-block-wdp-section-block__background"}),React.createElement(u.Content,null))}})}]);
1
+ !function(e){var t={};function o(a){if(t[a])return t[a].exports;var n=t[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=t,o.d=function(e,t,a){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(o.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(a,n,function(t){return e[t]}.bind(null,n));return a},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=1)}([function(e,t,o){"use strict";function a(e,t){for(var o=0;o<t.length;o++){var a=t[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}o.d(t,"a",(function(){return n}));var n=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,o,n;return t=e,(o=[{key:"getOffsetLeft",value:function(e){var t=0;do{null!==e.offsetParent&&(null===(e=e.offsetParent)||void 0===e.offsetLeft||isNaN(e.offsetLeft)||(t+=e.offsetLeft))}while(e.offsetParent);return t}},{key:"update",value:function(e){var t=document.getElementById("adminmenuback"),o=this,a=0;null!==t&&"none"!==getComputedStyle(t,null).display&&(a=document.body.classList.contains("folded")?36:160),Array.from(document.querySelectorAll(".wp-block-wdp-section-block__background")).forEach((function(e){e.style.marginLeft=null,e.style.marginLeft="".concat(-1*(o.getOffsetLeft(e)-a),"px")})),!0===e&&setTimeout((function(){o.update()}),25)}}])&&a(t.prototype,o),n&&a(t,n),e}())},function(e,t,o){"use strict";o.r(t);var a=o(0),n=function(e,t){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,o,a){return t+t+o+o+a+a}));var o=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return o?"rgba(".concat(parseInt(o[1],16),",").concat(parseInt(o[2],16),",").concat(parseInt(o[3],16),",").concat(parseFloat(t,10),")"):e},l=function(e){var t=e.useCustomStyles,o=e.padding,a=e.overlayBackgroundColor,l=e.overlayOpacity,r=e.borderColor,c=e.borderStyle,d=e.borderWidth,s=e.boxShadowXOffset,i=e.boxShadowYOffset,u=e.boxShadowBlurRadius,b=e.boxShadowSpreadRadius,p=e.boxShadowColor,f=e.boxShadowOpacity,w=e.backgroundImage,m=e.backgroundImageFocalPos,y={};return!1===t?y:(o!==parseInt(wdpsb.padding,10)&&(y["--wdpsb-padding"]="".concat(o,"px")),void 0!==a&&a!==wdpsb.overlayBackgroundColor&&(y["--wdpsb-overlay-background-color"]=a),l!==parseFloat(wdpsb.overlayOpacity,10)&&(y["--wdpsb-overlay-opacity"]=l.toString()),void 0!==r&&r!==wdpsb.borderColor&&(y["--wdpsb-border-color"]=r),c!==wdpsb.borderStyle&&(y["--wdpsb-border-style"]=c),d!==parseInt(wdpsb.borderWidth,10)&&(y["--wdpsb-border-width"]="".concat(d,"px")),s!==parseInt(wdpsb.boxShadowXOffset,10)&&(y["--wdpsb-box-shadow-xoffset"]="".concat(s,"px")),i!==parseInt(wdpsb.boxShadowYOffset,10)&&(y["--wdpsb-box-shadow-yoffset"]="".concat(i,"px")),u!==parseInt(wdpsb.boxShadowBlurRadius,10)&&(y["--wdpsb-box-shadow-blurradius"]="".concat(u,"px")),b!==parseInt(wdpsb.boxShadowSpreadRadius,10)&&(y["--wdpsb-box-shadow-spreadradius"]="".concat(b,"px")),void 0===p||p===wdpsb.boxShadowColor&&f===parseFloat(wdpsb.boxShadowOpacity,10)||(y["--wdpsb-box-shadow-color"]=n(p,f)),void 0===p&&f!==parseFloat(wdpsb.boxShadowOpacity,10)&&(y["--wdpsb-box-shadow-color"]=n(wdpsb.boxShadowColor,f)),null!==w&&(y["--wdpsb-background-image"]="url('".concat(w,"')")),.5!==m.x&&(y["--wdpsb-background-image-position-x"]="".concat(100*m.x,"%")),.5!==m.y&&(y["--wdpsb-background-image-position-y"]="".concat(100*m.y,"%")),y)},r=wp.i18n.__,c=wp.blocks.registerBlockType,d=wp.blockEditor,s=d.InnerBlocks,i=d.InspectorControls,u=d.MediaUpload,b=wp.element.Fragment,p=wp.components,f=p.PanelBody,w=p.RangeControl,m=p.SelectControl,y=p.ToggleControl,g=p.ColorPalette,h=p.FocalPointPicker,k={useCustomStyles:{type:"boolean",default:!1},padding:{type:"integer",default:parseInt(wdpsb.padding,10)},overlayBackgroundColor:{type:"string",default:wdpsb.overlayBackgroundColor},overlayOpacity:{type:"float",default:parseFloat(wdpsb.overlayOpacity,10)},borderColor:{type:"string",default:wdpsb.borderColor},borderStyle:{type:"string",default:wdpsb.borderStyle},borderWidth:{type:"integer",default:parseInt(wdpsb.borderWidth,10)},boxShadowXOffset:{type:"integer",default:parseInt(wdpsb.boxShadowXOffset,10)},boxShadowYOffset:{type:"integer",default:parseInt(wdpsb.boxShadowYOffset,10)},boxShadowBlurRadius:{type:"integer",default:parseInt(wdpsb.boxShadowBlurRadius,10)},boxShadowSpreadRadius:{type:"integer",default:parseInt(wdpsb.boxShadowSpreadRadius,10)},boxShadowColor:{type:"string",default:wdpsb.boxShadowColor},boxShadowOpacity:{type:"float",default:parseFloat(wdpsb.boxShadowOpacity,10)},backgroundImage:{type:"string",default:null},backgroundImageFocalPos:{type:"object",default:{x:.5,y:.5}}};c("wdp/section-block",{title:r("Section Block (by We Do Plugins)","section-block"),description:r("Cool Section Block for new Block Editor.","section-block"),icon:"index-card",category:"widgets",supports:{align:["wide","full"]},attributes:k,example:{attributes:{defaultAttributes:k}},edit:function(e){var t=e.attributes,o=e.setAttributes,n=e.className,c=t.useCustomStyles,d=t.padding,p=t.overlayBackgroundColor,k=t.overlayOpacity,x=t.borderColor,v=t.borderStyle,S=t.borderWidth,R=t.boxShadowXOffset,C=t.boxShadowYOffset,E=t.boxShadowBlurRadius,O=t.boxShadowSpreadRadius,B=t.boxShadowColor,I=t.boxShadowOpacity,P=t.backgroundImage,_=t.backgroundImageFocalPos;return React.createElement(b,null,React.createElement(i,null,React.createElement(f,{title:r("Use custom styles?","section-block")},React.createElement(y,{label:r("Use custom styles?","section-block"),checked:c,onChange:function(e){o({useCustomStyles:e})}})),!0===c&&React.createElement("div",null,React.createElement(f,{title:r("Overlay","section-block"),initialOpen:!1},React.createElement(b,null,React.createElement("p",null,r("Overlay background color","section-block")),React.createElement(g,{label:r("Overlay background color","section-block"),value:p,colors:wdpsb.themeColors,onChange:function(e){o({overlayBackgroundColor:e})}})),React.createElement(w,{label:r("Overlay opacity","section-block"),value:k,onChange:function(e){o({overlayOpacity:e})},min:0,max:1,step:.01})),React.createElement(f,{title:r("Padding","section-block"),initialOpen:!1},React.createElement(w,{label:r("Padding","section-block"),value:d,onChange:function(e){o({padding:e})},min:0,max:120})),React.createElement(f,{title:r("Border","section-block"),initialOpen:!1},React.createElement(b,null,React.createElement("p",null,r("Border color","section-block")),React.createElement(g,{label:r("Border color","section-block"),value:x,colors:wdpsb.themeColors,onChange:function(e){o({borderColor:e})}})),React.createElement(m,{label:r("Border style","section-block"),value:v,onChange:function(e){o({borderStyle:e})},options:[{value:"solid",label:r("Solid","section-block")},{value:"dashed",label:r("Dashed","section-block")},{value:"dotted",label:r("Dotted","section-block")}]}),React.createElement(w,{label:r("Border width","section-block"),value:S,onChange:function(e){o({borderWidth:e})},min:0,max:30})),React.createElement(f,{title:r("Box shadow","section-block"),initialOpen:!1},React.createElement(w,{label:r("X offset","section-block"),value:R,onChange:function(e){o({boxShadowXOffset:e})},min:-100,max:100}),React.createElement(w,{label:r("Y offset","section-block"),value:C,onChange:function(e){o({boxShadowYOffset:e})},min:-100,max:100}),React.createElement(w,{label:r("Blur radius","section-block"),value:E,onChange:function(e){o({boxShadowBlurRadius:e})},min:0,max:100}),React.createElement(w,{label:r("Spread radius","section-block"),value:O,onChange:function(e){o({boxShadowSpreadRadius:e})},min:-100,max:100}),React.createElement(b,null,React.createElement("p",null,r("Box shadow color","section-block")),React.createElement(g,{label:r("Box shadow color","section-block"),value:B,colors:wdpsb.themeColors,onChange:function(e){o({boxShadowColor:e})}})),React.createElement(w,{label:r("Box shadow color opacity","section-block"),value:I,onChange:function(e){o({boxShadowOpacity:e})},min:0,max:1,step:.01})),React.createElement(f,{title:r("Background image","section-block"),initialOpen:!1},React.createElement(u,{onSelect:function(e){o({backgroundImage:e.sizes.full.url})},type:"image",value:P,render:function(e){var t=e.open;return React.createElement("button",{className:"button",onClick:t},r("Upload image","section-block"))}}),null!==P&&React.createElement(b,null,React.createElement("span",{className:"wp-block-wdp-section-block__or-span"},r("or","section-block")),React.createElement("button",{className:"button button-secondary",onClick:function(e){e.preventDefault(),o({backgroundImage:null})}},r("Remove current","section-block")),React.createElement("h4",null,r("Image focal point","section-block")),React.createElement(h,{url:P,value:_,onChange:function(e){o({backgroundImageFocalPos:e})}}))))),React.createElement("div",{className:n,style:!0===c?l(t):{}},React.createElement("div",{className:"wp-block-wdp-section-block__background"}),React.createElement(s,null)),a.a.update(!0))},save:function(e){var t=e.attributes,o=e.className,a=t.useCustomStyles;return React.createElement("div",{className:o,style:!0===a?l(t):{}},React.createElement("div",{className:"wp-block-wdp-section-block__background"}),React.createElement(s.Content,null))}})}]);
build/blocks-summary.css ADDED
@@ -0,0 +1 @@
 
1
+ @charset "UTF-8";body.settings_page_wdp-blocks-summary{background:#fff}body.settings_page_wdp-blocks-summary:not(.rtl) #wpcontent{padding-left:0}body.settings_page_wdp-blocks-summary.rtl #wpcontent{padding-right:0}body.settings_page_wdp-blocks-summary .notice:not(.wdp-blocks-summary-notice){display:none}.wdp-blocks-summary{margin:0}.wdp-blocks-summary__heading{height:5px;background:#0073aa}.wdp-blocks-summary__container{position:relative;font-size:0;padding:50px 50px 10px 50px}.wdp-blocks-summary__container__content h1,.wdp-blocks-summary__container__content h2,.wdp-blocks-summary__container__content img,.wdp-blocks-summary__container__content>p{margin:0 0 30px 0;padding:0}.wdp-blocks-summary__container__content h1:last-child,.wdp-blocks-summary__container__content h2:last-child,.wdp-blocks-summary__container__content img:last-child,.wdp-blocks-summary__container__content>p:last-child{margin-bottom:0}.wdp-blocks-summary__container__content h1{font-size:32px;font-weight:700;display:inline-block;vertical-align:middle;margin-left:20px}.wdp-blocks-summary__container__content h2{font-size:24px;font-weight:700;margin-top:50px}.wdp-blocks-summary__container__content h2 a{text-decoration:none;display:inline-block;padding-top:70px;outline:0;box-shadow:none}body:not(.rtl) .wdp-blocks-summary__container__content h2 a{margin-right:10px}body.rtl .wdp-blocks-summary__container__content h2 a{margin-left:10px}.wdp-blocks-summary__container__content li,.wdp-blocks-summary__container__content>p{font-size:16px;line-height:1.5}.wdp-blocks-summary__container__content ul li{list-style-type:disc;margin:0 0 30px 0}body:not(.rtl) .wdp-blocks-summary__container__content ul li{margin-left:1em}body.rtl .wdp-blocks-summary__container__content ul li{margin-right:1em}.wdp-blocks-summary__container__content ul li img{margin-top:30px;display:block}.wdp-blocks-summary__container__content img{max-width:100%}.wdp-blocks-summary__container__content img+h2{margin-top:20px}.wdp-blocks-summary__container__content img.wdp-blocks-summary__container__content__icon{width:64px;height:64px;display:inline-block;vertical-align:middle;border-radius:100%}.wdp-blocks-summary__settings>h2:only-child{display:none}.wdp-blocks-summary__setting{border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,.04);padding:30px;border-radius:2px}.wdp-blocks-summary__setting h3{font-size:1rem;font-weight:700;cursor:auto;margin:0 0 10px 0}.wdp-blocks-summary__setting input[type=text]{width:100%;font-size:16px;padding:10px;margin:15px 0 0 0}.wdp-blocks-summary__setting p{font-style:italic}.wdp-blocks-summary__setting p.wdp-blocks-summary__setting__loading-notice{margin:0}.wdp-blocks-summary__setting .wdp-blocks-summary-notice{margin:20px 0 5px 0}.wdp-blocks-summary__setting .wdp-blocks-summary-notice p{font-style:normal}.wdp-blocks-summary__setting .button+.button{margin-left:15px}.wdp-blocks-summary__setting+.wdp-blocks-summary__setting{margin-top:30px}p.wdp-blocks-summary__plugins-table__summary{font-size:16px;margin:-15px 0 30px 0}p.wdp-blocks-summary__plugins-table__summary--fetching{font-style:italic;margin-bottom:0}.wdp-blocks-summary__plugins-table__plugins{border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,.04);border-radius:2px}.wdp-blocks-summary__plugins-table__plugins:empty{display:none}.wdp-blocks-summary__plugins-table__plugin{padding:20px}.wdp-blocks-summary__plugins-table__plugin:not(:last-child){border-bottom:1px solid #f9f9f9}.wdp-blocks-summary__plugins-table__plugin__description,.wdp-blocks-summary__plugins-table__plugin__image{display:inline-block;vertical-align:middle}.wdp-blocks-summary__plugins-table__plugin__image{width:64px;height:64px;border-radius:100%;font-size:0;background:#e5e5e5}.wdp-blocks-summary__plugins-table__plugin__image a{font-size:0;line-height:1;display:block;border:none;box-shadow:none;text-decoration:none;background:0 0}.wdp-blocks-summary__plugins-table__plugin__image img{width:64px;height:64px;border-radius:100%;margin:0}.wdp-blocks-summary__plugins-table__plugin__description{width:calc(100% - 90px);margin-left:20px}.wdp-blocks-summary__plugins-table__plugin__description p{font-size:16px;margin:0;padding:0}.wdp-blocks-summary__plugins-table__plugin__description p:first-child{color:#23282d}p.wdp-blocks-summary__plugins-table__plugin__installation-status{margin-top:10px;font-size:1rem;color:#83a71e}p.wdp-blocks-summary__plugins-table__plugin__installation-status span{font-style:italic;color:#23282d}
build/index.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Directory listing protection
4
  *
5
- * @package section_block
6
  */
7
 
8
  // Silence is golden.
2
  /**
3
  * Directory listing protection
4
  *
5
+ * @package section-block
6
  */
7
 
8
  // Silence is golden.
build/plugins-table.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},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";function r(e){return(r="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 o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.r(t);var l=wp.element.Component,a=wp.i18n.__,s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,u(t).apply(this,arguments))}var n,r,s;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(t,l),n=t,(r=[{key:"render",value:function(){var e=this.props,t=e.pluginsLength,n=e.activelyUsedLength,r=n>t?t:n;return 0===t?React.createElement("p",{className:"wdp-blocks-summary__plugins-table__summary wdp-blocks-summary__plugins-table__summary--fetching"},a("Please wait...","section-block")):React.createElement("p",{className:"wdp-blocks-summary__plugins-table__summary"},a("You use","section-block")," ",r," ",a("of","section-block")," ",t," ",a("our plugins now, thank you!","section-block"))}}])&&o(n.prototype,r),s&&o(n,s),t}();function p(e){return(p="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 f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _=wp.element.Component,d=wp.i18n.__,g=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),y(this,b(t).apply(this,arguments))}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(t,_),n=t,(r=[{key:"titleHTML",value:function(){return{__html:this.props.plugin.name}}},{key:"descriptionHTML",value:function(){return{__html:this.props.plugin.description}}},{key:"render",value:function(){var e=this.props.plugin,t=e.image,n=e.slug,r=this.props.isUsed,o="https://wordpress.org/plugins/".concat(n,"/");return React.createElement("div",{className:"wdp-blocks-summary__plugins-table__plugin","data-plugin-name":n},React.createElement("div",{className:"wdp-blocks-summary__plugins-table__plugin__image"},React.createElement("a",{href:o,target:"_blank",rel:"noopener noreferrer"},React.createElement("img",{src:t,alt:"".concat(d("Icon for plugin:","section-block")," ").concat(n)}))),React.createElement("div",{className:"wdp-blocks-summary__plugins-table__plugin__description"},React.createElement("p",null,React.createElement("strong",{dangerouslySetInnerHTML:this.titleHTML()})),React.createElement("p",{dangerouslySetInnerHTML:this.descriptionHTML()}),React.createElement("p",{className:"wdp-blocks-summary__plugins-table__plugin__installation-status"},function(){switch(r){case"active":return d("Active","section-block");case"installed":return React.createElement("a",{href:o,target:"_blank",rel:"noopener noreferrer"},d("Installed, not activated","section-block"));default:return React.createElement("a",{href:o,target:"_blank",rel:"noopener noreferrer"},d("Not installed yet","section-block"))}}())))}}])&&f(n.prototype,r),o&&f(n,o),t}();function h(e){return(h="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 v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function O(e){return(O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var j=wp.element.Component,E=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=w(this,O(t).call(this,e))).state={plugins:new Array},n}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&k(e,t)}(t,j),n=t,(r=[{key:"componentDidMount",value:function(){var e=this;fetch("http://plugins-list-api.wedoplugins.com/").then(function(e){return e.json()}).then(function(t){return e.setState({plugins:t})})}},{key:"isPluginUsed",value:function(e){var t=this.props.usedPlugins;return-1!==t.active.indexOf(e)?"active":-1!==t.installed.indexOf(e)&&"installed"}},{key:"render",value:function(){var e=this,t=this.state.plugins,n=this.props.usedPlugins.active;return React.createElement("div",{className:"wdp-blocks-summary__plugins-table"},React.createElement(s,{pluginsLength:t.length,activelyUsedLength:n.length}),React.createElement("div",{className:"wdp-blocks-summary__plugins-table__plugins"},t.map(function(t){return React.createElement(g,{plugin:t,isUsed:e.isPluginUsed(t.slug),key:t.slug})})))}}])&&v(n.prototype,r),o&&v(n,o),t}();wp.element.render(React.createElement(E,{usedPlugins:wdpBlocksSummaryPluginsTable.usedPlugins}),document.getElementById("wdp-blocks-summary__plugins-table__container"))}]);
classes/class-wdpsb-blockssummarypage.php ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create and render "welcome" page
4
+ *
5
+ * @package section-block
6
+ */
7
+
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit;
10
+ }
11
+
12
+ if ( defined( 'WDP_SUMMARY_PAGE' ) ) {
13
+ return;
14
+ }
15
+
16
+ // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedConstantFound
17
+
18
+ define( 'WDP_SUMMARY_PAGE', true ); // Tell the other plugins that summary page is already rendered.
19
+ define( 'WDP_BSP_MAIN_FILE', WDPSB_MAIN_FILE );
20
+ define( 'WDP_BSP_VERSION', '1.0.6' );
21
+
22
+ // phpcs:enable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedConstantFound
23
+
24
+ add_action( 'admin_menu', array( 'WDP_BlocksSummaryPage', 'register_blocks_summary_page' ) );
25
+ add_action( 'admin_enqueue_scripts', array( 'WDP_BlocksSummaryPage', 'enqueue_scripts' ) );
26
+
27
+ /**
28
+ * Blocks summary page class
29
+ */
30
+ abstract class WDP_BlocksSummaryPage {
31
+
32
+ /**
33
+ * Register blocks summary page
34
+ */
35
+ public static function register_blocks_summary_page() {
36
+
37
+ add_options_page(
38
+ esc_html( __( 'Blocks by We Do Plugins', 'section-block' ) ),
39
+ esc_html( __( 'Blocks by We Do Plugins', 'section-block' ) ),
40
+ 'manage_options',
41
+ 'wdp-blocks-summary',
42
+ array( get_class(), 'render_blocks_summary_page' )
43
+ );
44
+ }
45
+
46
+ /**
47
+ * Enqueue admin scripts
48
+ */
49
+ public static function enqueue_scripts() {
50
+
51
+ if ( 'settings_page_wdp-blocks-summary' === get_current_screen()->id ) {
52
+
53
+ wp_enqueue_style( 'wdp-blocks-summary', plugins_url( 'build/blocks-summary.css', WDP_BSP_MAIN_FILE ), array(), WDP_BSP_VERSION );
54
+ wp_enqueue_script( 'wdp-blocks-summary-plugins-table', plugins_url( 'build/plugins-table.min.js', WDP_BSP_MAIN_FILE ), array( 'wp-i18n', 'wp-element' ), WDP_BSP_VERSION, true );
55
+
56
+ wp_localize_script(
57
+ 'wdp-blocks-summary-plugins-table',
58
+ 'wdpBlocksSummaryPluginsTable',
59
+ array(
60
+ 'usedPlugins' => self::get_used_plugins_data(),
61
+ )
62
+ );
63
+ }
64
+ }
65
+
66
+ /**
67
+ * Get data of used plugins by We Do Plugins
68
+ */
69
+ private static function get_used_plugins_data() {
70
+
71
+ if ( ! function_exists( 'get_plugins' ) ) {
72
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
73
+ }
74
+
75
+ $plugins = get_plugins();
76
+ $result = array(
77
+ 'installed' => array(),
78
+ 'active' => array(),
79
+ );
80
+
81
+ foreach ( $plugins as $plugin_path => $plugin_data ) {
82
+
83
+ if ( 'We Do Plugins' !== $plugin_data['AuthorName'] ) {
84
+ continue;
85
+ }
86
+
87
+ $slug = explode( '/', $plugin_path );
88
+ $slug = $slug[0] ?? null;
89
+
90
+ if ( null !== $slug ) {
91
+
92
+ if ( is_plugin_active( "$slug/$slug.php" ) ) {
93
+ $result['active'][] = $slug;
94
+ } else {
95
+ $result['installed'][] = $slug;
96
+ }
97
+ }
98
+ }
99
+
100
+ return $result;
101
+ }
102
+
103
+ /**
104
+ * Render blocks summary page
105
+ */
106
+ public static function render_blocks_summary_page() {
107
+
108
+ ?>
109
+ <div class="wrap wdp-blocks-summary">
110
+ <div class="wdp-blocks-summary__heading"></div>
111
+ <div class="wdp-blocks-summary__container">
112
+ <div class="wdp-blocks-summary__container__content">
113
+ <img src="<?php echo esc_url( plugins_url( 'img/wedoplugins.png', WDP_BSP_MAIN_FILE ) ); ?>" alt="<?php echo esc_html( __( 'We Do Plugins', 'section-block' ) ); ?>" class="wdp-blocks-summary__container__content__icon" />
114
+ <h1><?php echo esc_html( __( 'Blocks by We Do Plugins', 'section-block' ) ); ?></h1>
115
+ <p>
116
+ <?php echo esc_html( __( 'We offer plugins that helps you build and maintain your website.', 'section-block' ) ); ?><br>
117
+ <?php echo esc_html( __( 'If you haven\'t already, check our plugins portfolio and improve your website today.', 'section-block' ) ); ?>
118
+ </p>
119
+ <p>
120
+ <a href="https://wedoplugins.com" target="_blank" rel="noopener noreferrer"><?php echo esc_html( __( 'Visit our website', 'section-block' ) ); ?></a>
121
+ <?php echo esc_html( __( 'or', 'section-block' ) ); ?>
122
+ <a href="https://twitter.com/wedoplugins" target="_blank" rel="noopener noreferrer"><?php echo esc_html( __( 'follow us on Twitter', 'section-block' ) ); ?></a>
123
+ </p>
124
+ <?php
125
+
126
+ // Display plugins settings, only if any exists.
127
+ if ( true === apply_filters( 'wdp_blocks_summary_has_settings', false ) ) {
128
+
129
+ ?>
130
+ <div class="wdp-blocks-summary__settings">
131
+ <h2><?php echo esc_html( __( 'Blocks settings', 'section-block' ) ); ?></h2>
132
+ <?php do_action( 'wdp_blocks_summary_settings' ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals ?>
133
+ </div>
134
+ <?php
135
+ }
136
+
137
+ ?>
138
+ <h2><?php echo esc_html( __( 'Check other our plugins (not only blocks!)', 'section-block' ) ); ?></h2>
139
+ <div id="wdp-blocks-summary__plugins-table__container"></div>
140
+ </div>
141
+ </div>
142
+ </div>
143
+ <?php
144
+ }
145
+ }
classes/class-wdpsb-config.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Configuration class
4
  *
5
- * @package section_block
6
  */
7
 
8
  if ( ! defined( 'ABSPATH' ) ) {
2
  /**
3
  * Configuration class
4
  *
5
+ * @package section-block
6
  */
7
 
8
  if ( ! defined( 'ABSPATH' ) ) {
classes/class-wdpsb-enqueue.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Enqueue block scripts and styles
4
  *
5
- * @package section_block
6
  */
7
 
8
  if ( ! defined( 'ABSPATH' ) ) {
@@ -38,7 +38,7 @@ class WDPSB_Enqueue {
38
 
39
  wp_localize_script(
40
  'wdp/section-block',
41
- 'WDPSectionBlock',
42
  array_merge(
43
  self::get_default_block_styles(),
44
  array(
@@ -57,22 +57,8 @@ class WDPSB_Enqueue {
57
  */
58
  public static function enqueue_block( $is_editor = false ) {
59
 
60
- wp_enqueue_style(
61
- 'wdp/section-block',
62
- plugins_url( 'build/block' . esc_attr( true === $is_editor ? '-editor' : '' ) . '.css', WDPSB_MAIN_FILE ),
63
- array(),
64
- WDPSB_VERSION
65
- );
66
-
67
- wp_enqueue_script(
68
- 'wdp-section-block-background-position-events',
69
- plugins_url( 'build/background-position-events.min.js', WDPSB_MAIN_FILE ),
70
- array(
71
- 'jquery',
72
- ),
73
- WDPSB_VERSION,
74
- true
75
- );
76
 
77
  wp_add_inline_style(
78
  'wdp/section-block',
@@ -131,7 +117,7 @@ class WDPSB_Enqueue {
131
  $css .= $var . ':' . $value . ';';
132
  }
133
 
134
- return ':root { ' . esc_attr( $css ) . ' }';
135
  }
136
 
137
  /**
2
  /**
3
  * Enqueue block scripts and styles
4
  *
5
+ * @package section-block
6
  */
7
 
8
  if ( ! defined( 'ABSPATH' ) ) {
38
 
39
  wp_localize_script(
40
  'wdp/section-block',
41
+ 'wdpsb',
42
  array_merge(
43
  self::get_default_block_styles(),
44
  array(
57
  */
58
  public static function enqueue_block( $is_editor = false ) {
59
 
60
+ wp_enqueue_style( 'wdp/section-block', plugins_url( 'build/block' . esc_attr( true === $is_editor ? '-editor' : '' ) . '.css', WDPSB_MAIN_FILE ), array(), WDPSB_VERSION );
61
+ wp_enqueue_script( 'wdp-section-block-background-position-events', plugins_url( 'build/background-position-events.min.js', WDPSB_MAIN_FILE ), array( 'jquery' ), WDPSB_VERSION, true );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
 
63
  wp_add_inline_style(
64
  'wdp/section-block',
117
  $css .= $var . ':' . $value . ';';
118
  }
119
 
120
+ return ':root{' . esc_attr( $css ) . '}';
121
  }
122
 
123
  /**
classes/index.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Directory listing protection
4
  *
5
- * @package section_block
6
  */
7
 
8
  // Silence is golden.
2
  /**
3
  * Directory listing protection
4
  *
5
+ * @package section-block
6
  */
7
 
8
  // Silence is golden.
img/index.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Directory listing protection
4
+ *
5
+ * @package section-block
6
+ */
7
+
8
+ // Silence is golden.
img/wedoplugins.png ADDED
Binary file
index.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Directory listing protection
4
  *
5
- * @package section_block
6
  */
7
 
8
  // Silence is golden.
2
  /**
3
  * Directory listing protection
4
  *
5
+ * @package section-block
6
  */
7
 
8
  // Silence is golden.
readme.txt CHANGED
@@ -2,22 +2,27 @@
2
  Contributors: wedoplugins
3
  Tags: block, section, section block, gutenberg, block editor, block library, blocks
4
  Requires at least: 5.1
5
- Tested up to: 5.2.2
6
- Requires PHP: 5.6
7
- License: GPLv2 or later
8
- License URI: https://www.gnu.org/licenses/gpl-2.0.html
9
- Stable tag: 1.2.0
10
 
11
  Section Block for new WordPress Block Editor allow you to add Sections to your website and customize it.
12
 
13
  == Description ==
14
 
15
- Section Block for new WordPress Block Editor allow you to add Sections to your website and customize it:
16
 
17
- * customize section border,
18
- * customize section background image, add or hide overlay,
 
 
 
 
19
  * customize section padding,
20
  * customize section box shadow,
 
21
 
22
  You can use any other Blocks inside this Section Block so this can be used to build more advanced templates.
23
 
@@ -31,6 +36,12 @@ Blocks inside this Section Block can be wide- or full-aligned, but section itsel
31
 
32
  == Changelog ==
33
 
 
 
 
 
 
 
34
  = 1.2.0 =
35
  Fixed: overlay opacity value (float) saved with "px" string at the end (auto-added by Gutenberg)
36
  Fixed: first and last inner elements should have no margins on top and bottom relatively
@@ -43,3 +54,9 @@ Updated: outdated Gutenberg packages
43
 
44
  = 1.0.0 =
45
  * Initial release.
 
 
 
 
 
 
2
  Contributors: wedoplugins
3
  Tags: block, section, section block, gutenberg, block editor, block library, blocks
4
  Requires at least: 5.1
5
+ Tested up to: 5.2.3
6
+ Requires PHP: 7.1
7
+ License: GPLv3
8
+ License URI: http://www.gnu.org/licenses/gpl.html
9
+ Stable tag: 1.3.0
10
 
11
  Section Block for new WordPress Block Editor allow you to add Sections to your website and customize it.
12
 
13
  == Description ==
14
 
15
+ This block is intended to work with any WordPress theme that supports the new Block Editor (Gutenberg). You can use it to group your page content into sections (nested blocks support), and highlight the most important parts of your website.
16
 
17
+ **Features**
18
+
19
+ * ready to use out of the box, no configuration needed,
20
+ * create unlimited number of sections and customize each of it separately,
21
+ * customize section border (width, style, radius, color),
22
+ * customize section background image, add or hide overlay (overlay customization: opacity, color),
23
  * customize section padding,
24
  * customize section box shadow,
25
+ * customize default styles settings using hooks programmatically (for theme authors),
26
 
27
  You can use any other Blocks inside this Section Block so this can be used to build more advanced templates.
28
 
36
 
37
  == Changelog ==
38
 
39
+ = 1.3.0 =
40
+ * JavaScript code fully rebuilt on React, no more jQuery,
41
+ * Blocks Summary page style & script added,
42
+ * license changed from GPL2+ to GPLv3,
43
+ * block code improved,
44
+
45
  = 1.2.0 =
46
  Fixed: overlay opacity value (float) saved with "px" string at the end (auto-added by Gutenberg)
47
  Fixed: first and last inner elements should have no margins on top and bottom relatively
54
 
55
  = 1.0.0 =
56
  * Initial release.
57
+
58
+ == Screenshots ==
59
+
60
+ 1. Add nested blocks and customize section styles
61
+ 2. Set custom overlay color and opacity
62
+ 3. Nested blocks support + custom background and section styles gives you a great customization possibilities
section-block.php CHANGED
@@ -2,14 +2,14 @@
2
  /**
3
  * Plugin Name: Section Block
4
  * Plugin URI: http://wedoplugins.com/plugins/section-block/
5
- * Description: Adds a Section Block to new WordPress Blocks editor.
6
  * Author: We Do Plugins
7
  * Author URI: http://wedoplugins.com/
8
- * Version: 1.2.0
9
- * License: GPL2+
10
  * Text Domain: section-block
11
  *
12
- * @package section_block
13
  */
14
 
15
  if ( ! defined( 'ABSPATH' ) ) {
@@ -17,7 +17,11 @@ if ( ! defined( 'ABSPATH' ) ) {
17
  }
18
 
19
  define( 'WDPSB_MAIN_FILE', __FILE__ );
20
- define( 'WDPSB_VERSION', '1.2.0' );
21
 
 
 
 
22
  require_once dirname( WDPSB_MAIN_FILE ) . '/classes/class-wdpsb-config.php';
23
  require_once dirname( WDPSB_MAIN_FILE ) . '/classes/class-wdpsb-enqueue.php';
 
2
  /**
3
  * Plugin Name: Section Block
4
  * Plugin URI: http://wedoplugins.com/plugins/section-block/
5
+ * Description: This plugin brings a Section Block to new WordPress Blocks editor.
6
  * Author: We Do Plugins
7
  * Author URI: http://wedoplugins.com/
8
+ * Version: 1.3.0
9
+ * License: GPLv3
10
  * Text Domain: section-block
11
  *
12
+ * @package section-block
13
  */
14
 
15
  if ( ! defined( 'ABSPATH' ) ) {
17
  }
18
 
19
  define( 'WDPSB_MAIN_FILE', __FILE__ );
20
+ define( 'WDPSB_VERSION', '1.3.0' );
21
 
22
+ /**
23
+ * Require plugin classes
24
+ */
25
  require_once dirname( WDPSB_MAIN_FILE ) . '/classes/class-wdpsb-config.php';
26
  require_once dirname( WDPSB_MAIN_FILE ) . '/classes/class-wdpsb-enqueue.php';
27
+ require_once dirname( WDPSB_MAIN_FILE ) . '/classes/class-wdpsb-blockssummarypage.php';