From f978531eb9473ee2dc9e429877aae6c034cc64bd Mon Sep 17 00:00:00 2001 From: vendidero Date: Tue, 5 Nov 2024 14:24:54 +0100 Subject: [PATCH] Adding /build directory to release --- build/128.js | 1 + build/297.js | 1 + build/412.js | 1 + build/518.js | 1 + build/534.js | 1 + build/6.js | 1 + build/648.js | 1 + build/700-frontend.js | 1 + build/710.js | 1 + build/92.js | 1 + build/cart-frontend.asset.php | 1 + build/cart-frontend.js | 1 + build/cart-style.asset.php | 1 + build/cart.asset.php | 1 + build/cart.css | 1 + build/cart.js | 1 + .../checkout-checkboxes-frontend.js | 1 + .../checkout-checkboxes-style.js | 1 + ...out-photovoltaic-system-notice-frontend.js | 1 + ...eckout-photovoltaic-system-notice-style.js | 1 + build/checkout-frontend.asset.php | 1 + build/checkout-frontend.js | 1 + build/checkout-style.asset.php | 1 + build/checkout-style.js.LICENSE.txt | 5 +++ build/checkout.asset.php | 1 + build/checkout.css | 3 ++ build/checkout.js | 1 + .../checkout-checkboxes/block.json | 23 +++++++++++ .../block.json | 38 +++++++++++++++++++ .../inner-blocks/mini-cart-notices/block.json | 30 +++++++++++++++ .../mini-cart-notices-frontend.js | 1 + .../mini-cart-notices-style.js | 1 + build/mini-cart-blocks/mini-cart-notices.css | 1 + .../style-mini-cart-notices.css | 1 + build/mini-cart-frontend.asset.php | 1 + build/mini-cart-frontend.js | 1 + build/mini-cart-style.asset.php | 1 + build/mini-cart.asset.php | 1 + build/mini-cart.css | 1 + build/mini-cart.js | 1 + build/product-defect-description-frontend.js | 1 + build/product-defect-description.css | 1 + build/product-delivery-time-frontend.js | 1 + build/product-delivery-time.css | 1 + build/product-deposit-frontend.js | 1 + ...product-deposit-packaging-type-frontend.js | 1 + build/product-deposit-packaging-type.css | 1 + build/product-deposit.css | 1 + build/product-nutri-score-frontend.js | 1 + build/product-nutri-score.css | 1 + build/product-shipping-costs-info-frontend.js | 1 + build/product-shipping-costs-info.css | 1 + build/product-tax-info-frontend.js | 1 + build/product-tax-info.css | 1 + build/product-unit-price-frontend.js | 1 + build/product-unit-price.css | 1 + build/product-unit-product-frontend.js | 1 + build/product-unit-product.css | 1 + build/static/add-to-cart-variation.asset.php | 1 + build/static/add-to-cart-variation.js | 1 + .../static/admin-activation-styles.asset.php | 1 + build/static/admin-activation-styles.css | 1 + build/static/admin-activation-styles.js | 1 + build/static/admin-legal-checkboxes.asset.php | 1 + build/static/admin-legal-checkboxes.js | 1 + .../static/admin-product-variations.asset.php | 1 + build/static/admin-product-variations.js | 1 + build/static/admin-product.asset.php | 1 + build/static/admin-product.js | 1 + build/static/admin-settings-styles.asset.php | 1 + build/static/admin-settings-styles.css | 1 + build/static/admin-settings-styles.js | 1 + build/static/admin-settings.asset.php | 1 + build/static/admin-settings.js | 1 + build/static/admin-setup.asset.php | 1 + build/static/admin-setup.js | 1 + build/static/admin-styles.asset.php | 1 + build/static/admin-styles.css | 1 + build/static/admin-styles.js | 1 + build/static/admin-wizard-styles.asset.php | 1 + build/static/admin-wizard-styles.css | 1 + build/static/admin-wizard-styles.js | 1 + build/static/admin.asset.php | 1 + build/static/admin.js | 1 + build/static/cart-voucher.asset.php | 1 + build/static/cart-voucher.js | 1 + build/static/checkout.asset.php | 1 + build/static/checkout.js | 1 + build/static/direct-debit.asset.php | 1 + build/static/direct-debit.js | 1 + build/static/force-pay-order.asset.php | 1 + build/static/force-pay-order.js | 1 + build/static/iban.asset.php | 1 + build/static/iban.js | 1 + build/static/layout-styles.asset.php | 1 + build/static/layout-styles.css | 1 + build/static/layout-styles.js | 1 + build/static/revocation.asset.php | 1 + build/static/revocation.js | 1 + .../unit-price-observer-bundle.asset.php | 1 + build/static/unit-price-observer-bundle.js | 1 + .../unit-price-observer-queue.asset.php | 1 + build/static/unit-price-observer-queue.js | 1 + build/static/unit-price-observer.asset.php | 1 + build/static/unit-price-observer.js | 1 + build/style-cart.css | 1 + build/style-checkout.css | 3 ++ build/style-mini-cart.css | 1 + build/style-wc-gzd-blocks.css | 1 + build/wc-gzd-blocks-editor-style.css | 3 ++ build/wc-gzd-blocks-frontend.asset.php | 1 + build/wc-gzd-blocks-frontend.js | 1 + ...zd-blocks-product-elements-style.asset.php | 1 + ...ocks-product-elements-style.js.LICENSE.txt | 5 +++ .../wc-gzd-blocks-product-elements.asset.php | 1 + build/wc-gzd-blocks-product-elements.css | 1 + build/wc-gzd-blocks-product-elements.js | 1 + build/wc-gzd-blocks-settings.asset.php | 1 + build/wc-gzd-blocks-settings.js | 1 + build/wc-gzd-blocks-style.asset.php | 1 + build/wc-gzd-blocks.asset.php | 1 + build/wc-gzd-blocks.css | 1 + build/wc-gzd-blocks.js | 1 + ...-gzd-payment-method-direct-debit.asset.php | 1 + build/wc-gzd-payment-method-direct-debit.js | 1 + build/wc-gzd-payment-method-invoice.asset.php | 1 + build/wc-gzd-payment-method-invoice.js | 1 + 127 files changed, 229 insertions(+) create mode 100644 build/128.js create mode 100644 build/297.js create mode 100644 build/412.js create mode 100644 build/518.js create mode 100644 build/534.js create mode 100644 build/6.js create mode 100644 build/648.js create mode 100644 build/700-frontend.js create mode 100644 build/710.js create mode 100644 build/92.js create mode 100644 build/cart-frontend.asset.php create mode 100644 build/cart-frontend.js create mode 100644 build/cart-style.asset.php create mode 100644 build/cart.asset.php create mode 100644 build/cart.css create mode 100644 build/cart.js create mode 100644 build/checkout-blocks/checkout-checkboxes-frontend.js create mode 100644 build/checkout-blocks/checkout-checkboxes-style.js create mode 100644 build/checkout-blocks/checkout-photovoltaic-system-notice-frontend.js create mode 100644 build/checkout-blocks/checkout-photovoltaic-system-notice-style.js create mode 100644 build/checkout-frontend.asset.php create mode 100644 build/checkout-frontend.js create mode 100644 build/checkout-style.asset.php create mode 100644 build/checkout-style.js.LICENSE.txt create mode 100644 build/checkout.asset.php create mode 100644 build/checkout.css create mode 100644 build/checkout.js create mode 100644 build/inner-blocks/checkout-checkboxes/block.json create mode 100644 build/inner-blocks/checkout-photovoltaic-system-notice/block.json create mode 100644 build/inner-blocks/mini-cart-notices/block.json create mode 100644 build/mini-cart-blocks/mini-cart-notices-frontend.js create mode 100644 build/mini-cart-blocks/mini-cart-notices-style.js create mode 100644 build/mini-cart-blocks/mini-cart-notices.css create mode 100644 build/mini-cart-blocks/style-mini-cart-notices.css create mode 100644 build/mini-cart-frontend.asset.php create mode 100644 build/mini-cart-frontend.js create mode 100644 build/mini-cart-style.asset.php create mode 100644 build/mini-cart.asset.php create mode 100644 build/mini-cart.css create mode 100644 build/mini-cart.js create mode 100644 build/product-defect-description-frontend.js create mode 100644 build/product-defect-description.css create mode 100644 build/product-delivery-time-frontend.js create mode 100644 build/product-delivery-time.css create mode 100644 build/product-deposit-frontend.js create mode 100644 build/product-deposit-packaging-type-frontend.js create mode 100644 build/product-deposit-packaging-type.css create mode 100644 build/product-deposit.css create mode 100644 build/product-nutri-score-frontend.js create mode 100644 build/product-nutri-score.css create mode 100644 build/product-shipping-costs-info-frontend.js create mode 100644 build/product-shipping-costs-info.css create mode 100644 build/product-tax-info-frontend.js create mode 100644 build/product-tax-info.css create mode 100644 build/product-unit-price-frontend.js create mode 100644 build/product-unit-price.css create mode 100644 build/product-unit-product-frontend.js create mode 100644 build/product-unit-product.css create mode 100644 build/static/add-to-cart-variation.asset.php create mode 100644 build/static/add-to-cart-variation.js create mode 100644 build/static/admin-activation-styles.asset.php create mode 100644 build/static/admin-activation-styles.css create mode 100644 build/static/admin-activation-styles.js create mode 100644 build/static/admin-legal-checkboxes.asset.php create mode 100644 build/static/admin-legal-checkboxes.js create mode 100644 build/static/admin-product-variations.asset.php create mode 100644 build/static/admin-product-variations.js create mode 100644 build/static/admin-product.asset.php create mode 100644 build/static/admin-product.js create mode 100644 build/static/admin-settings-styles.asset.php create mode 100644 build/static/admin-settings-styles.css create mode 100644 build/static/admin-settings-styles.js create mode 100644 build/static/admin-settings.asset.php create mode 100644 build/static/admin-settings.js create mode 100644 build/static/admin-setup.asset.php create mode 100644 build/static/admin-setup.js create mode 100644 build/static/admin-styles.asset.php create mode 100644 build/static/admin-styles.css create mode 100644 build/static/admin-styles.js create mode 100644 build/static/admin-wizard-styles.asset.php create mode 100644 build/static/admin-wizard-styles.css create mode 100644 build/static/admin-wizard-styles.js create mode 100644 build/static/admin.asset.php create mode 100644 build/static/admin.js create mode 100644 build/static/cart-voucher.asset.php create mode 100644 build/static/cart-voucher.js create mode 100644 build/static/checkout.asset.php create mode 100644 build/static/checkout.js create mode 100644 build/static/direct-debit.asset.php create mode 100644 build/static/direct-debit.js create mode 100644 build/static/force-pay-order.asset.php create mode 100644 build/static/force-pay-order.js create mode 100644 build/static/iban.asset.php create mode 100644 build/static/iban.js create mode 100644 build/static/layout-styles.asset.php create mode 100644 build/static/layout-styles.css create mode 100644 build/static/layout-styles.js create mode 100644 build/static/revocation.asset.php create mode 100644 build/static/revocation.js create mode 100644 build/static/unit-price-observer-bundle.asset.php create mode 100644 build/static/unit-price-observer-bundle.js create mode 100644 build/static/unit-price-observer-queue.asset.php create mode 100644 build/static/unit-price-observer-queue.js create mode 100644 build/static/unit-price-observer.asset.php create mode 100644 build/static/unit-price-observer.js create mode 100644 build/style-cart.css create mode 100644 build/style-checkout.css create mode 100644 build/style-mini-cart.css create mode 100644 build/style-wc-gzd-blocks.css create mode 100644 build/wc-gzd-blocks-editor-style.css create mode 100644 build/wc-gzd-blocks-frontend.asset.php create mode 100644 build/wc-gzd-blocks-frontend.js create mode 100644 build/wc-gzd-blocks-product-elements-style.asset.php create mode 100644 build/wc-gzd-blocks-product-elements-style.js.LICENSE.txt create mode 100644 build/wc-gzd-blocks-product-elements.asset.php create mode 100644 build/wc-gzd-blocks-product-elements.css create mode 100644 build/wc-gzd-blocks-product-elements.js create mode 100644 build/wc-gzd-blocks-settings.asset.php create mode 100644 build/wc-gzd-blocks-settings.js create mode 100644 build/wc-gzd-blocks-style.asset.php create mode 100644 build/wc-gzd-blocks.asset.php create mode 100644 build/wc-gzd-blocks.css create mode 100644 build/wc-gzd-blocks.js create mode 100644 build/wc-gzd-payment-method-direct-debit.asset.php create mode 100644 build/wc-gzd-payment-method-direct-debit.js create mode 100644 build/wc-gzd-payment-method-invoice.asset.php create mode 100644 build/wc-gzd-payment-method-invoice.js diff --git a/build/128.js b/build/128.js new file mode 100644 index 000000000..5c05c46ba --- /dev/null +++ b/build/128.js @@ -0,0 +1 @@ +"use strict";(self.webpackWcGzdBlocksJsonp=self.webpackWcGzdBlocksJsonp||[]).push([[128],{418:function(s,c,e){e.r(c);var l=e(236);c.default=l.Z}}]); \ No newline at end of file diff --git a/build/297.js b/build/297.js new file mode 100644 index 000000000..d342008ef --- /dev/null +++ b/build/297.js @@ -0,0 +1 @@ +"use strict";(self.webpackWcGzdBlocksJsonp=self.webpackWcGzdBlocksJsonp||[]).push([[297],{984:function(s,c,e){e.r(c);var l=e(479);c.default=l.Z}}]); \ No newline at end of file diff --git a/build/412.js b/build/412.js new file mode 100644 index 000000000..65c6ce700 --- /dev/null +++ b/build/412.js @@ -0,0 +1 @@ +"use strict";(self.webpackWcGzdBlocksJsonp=self.webpackWcGzdBlocksJsonp||[]).push([[412],{757:function(s,c,e){e.r(c);var l=e(789);c.default=l.Z}}]); \ No newline at end of file diff --git a/build/518.js b/build/518.js new file mode 100644 index 000000000..b4703b2b1 --- /dev/null +++ b/build/518.js @@ -0,0 +1 @@ +"use strict";(self.webpackWcGzdBlocksJsonp=self.webpackWcGzdBlocksJsonp||[]).push([[518],{466:function(s,c,e){e.r(c);var l=e(14);c.default=l.Z}}]); \ No newline at end of file diff --git a/build/534.js b/build/534.js new file mode 100644 index 000000000..d76827c18 --- /dev/null +++ b/build/534.js @@ -0,0 +1 @@ +"use strict";(self.webpackWcGzdBlocksJsonp=self.webpackWcGzdBlocksJsonp||[]).push([[534],{41:function(s,c,e){e.r(c);var l=e(369);c.default=l.Z}}]); \ No newline at end of file diff --git a/build/6.js b/build/6.js new file mode 100644 index 000000000..cf0907c1b --- /dev/null +++ b/build/6.js @@ -0,0 +1 @@ +"use strict";(self.webpackWcGzdBlocksJsonp=self.webpackWcGzdBlocksJsonp||[]).push([[6],{580:function(s,c,e){e.r(c);var l=e(140);c.default=l.Z}}]); \ No newline at end of file diff --git a/build/648.js b/build/648.js new file mode 100644 index 000000000..60e55b9c4 --- /dev/null +++ b/build/648.js @@ -0,0 +1 @@ +"use strict";(self.webpackWcGzdBlocksJsonp=self.webpackWcGzdBlocksJsonp||[]).push([[648],{949:function(s,c,e){e.r(c);var l=e(38);c.default=l.Z}}]); \ No newline at end of file diff --git a/build/700-frontend.js b/build/700-frontend.js new file mode 100644 index 000000000..04b032afd --- /dev/null +++ b/build/700-frontend.js @@ -0,0 +1 @@ +(self.webpackWcBlocksJsonp=self.webpackWcBlocksJsonp||[]).push([[700],{83:function(t,e,r){"use strict";r.d(e,{R:function(){return v}});var n=r(857);const o="var:",a="|",i="--",s=(t,e)=>{let r=t;return e.forEach((t=>{r=r?.[t]})),r};function u(t,e,r,n){const o=s(t,r);return o?[{selector:e?.selector,key:n,value:c(o)}]:[]}function l(t,e,r,n,o=["top","right","bottom","left"]){const a=s(t,r);if(!a)return[];const i=[];if("string"==typeof a)i.push({selector:e?.selector,key:n.default,value:a});else{const t=o.reduce(((t,r)=>{const o=c(s(a,[r]));return o&&t.push({selector:e?.selector,key:n?.individual.replace("%s",p(r)),value:o}),t}),[]);i.push(...t)}return i}function c(t){return"string"==typeof t&&t.startsWith(o)?`var(--wp--${t.slice(o.length).split(a).map((t=>(0,n.o)(t,{splitRegexp:[/([a-z0-9])([A-Z])/g,/([0-9])([a-z])/g,/([A-Za-z])([0-9])/g,/([A-Z])([A-Z][a-z])/g]}))).join(i)})`:t}function p(t){const[e,...r]=t;return e.toUpperCase()+r.join("")}function f(t){try{return decodeURI(t)}catch(e){return t}}function g(t){return(e,r)=>u(e,r,t,function(t){const[e,...r]=t;return e.toLowerCase()+r.map(p).join("")}(t))}function h(t){return(e,r)=>["color","style","width"].flatMap((n=>g(["border",t,n])(e,r)))}const m={name:"radius",generate:(t,e)=>l(t,e,["border","radius"],{default:"borderRadius",individual:"border%sRadius"},["topLeft","topRight","bottomLeft","bottomRight"])},d=[{name:"color",generate:g(["border","color"])},{name:"style",generate:g(["border","style"])},{name:"width",generate:g(["border","width"])},m,{name:"borderTop",generate:h("top")},{name:"borderRight",generate:h("right")},{name:"borderBottom",generate:h("bottom")},{name:"borderLeft",generate:h("left")},{name:"text",generate:(t,e)=>u(t,e,["color","text"],"color")},{name:"gradient",generate:(t,e)=>u(t,e,["color","gradient"],"background")},{name:"background",generate:(t,e)=>u(t,e,["color","background"],"backgroundColor")},{name:"minHeight",generate:(t,e)=>u(t,e,["dimensions","minHeight"],"minHeight")},{name:"color",generate:(t,e,r=["outline","color"],n="outlineColor")=>u(t,e,r,n)},{name:"style",generate:(t,e,r=["outline","style"],n="outlineStyle")=>u(t,e,r,n)},{name:"offset",generate:(t,e,r=["outline","offset"],n="outlineOffset")=>u(t,e,r,n)},{name:"width",generate:(t,e,r=["outline","width"],n="outlineWidth")=>u(t,e,r,n)},{name:"margin",generate:(t,e)=>l(t,e,["spacing","margin"],{default:"margin",individual:"margin%s"})},{name:"padding",generate:(t,e)=>l(t,e,["spacing","padding"],{default:"padding",individual:"padding%s"})},{name:"fontFamily",generate:(t,e)=>u(t,e,["typography","fontFamily"],"fontFamily")},{name:"fontSize",generate:(t,e)=>u(t,e,["typography","fontSize"],"fontSize")},{name:"fontStyle",generate:(t,e)=>u(t,e,["typography","fontStyle"],"fontStyle")},{name:"fontWeight",generate:(t,e)=>u(t,e,["typography","fontWeight"],"fontWeight")},{name:"letterSpacing",generate:(t,e)=>u(t,e,["typography","letterSpacing"],"letterSpacing")},{name:"lineHeight",generate:(t,e)=>u(t,e,["typography","lineHeight"],"lineHeight")},{name:"textColumns",generate:(t,e)=>u(t,e,["typography","textColumns"],"columnCount")},{name:"textDecoration",generate:(t,e)=>u(t,e,["typography","textDecoration"],"textDecoration")},{name:"textTransform",generate:(t,e)=>u(t,e,["typography","textTransform"],"textTransform")},{name:"writingMode",generate:(t,e)=>u(t,e,["typography","writingMode"],"writingMode")},{name:"shadow",generate:(t,e)=>u(t,e,["shadow"],"boxShadow")},{name:"backgroundImage",generate:(t,e)=>{const r=t?.background?.backgroundImage,n=t?.background?.backgroundSize,o=[];return r?("file"===r?.source&&r?.url&&o.push({selector:e.selector,key:"backgroundImage",value:`url( '${encodeURI(f(r.url))}' )`}),n||o.push({selector:e.selector,key:"backgroundSize",value:"cover"}),o):o}}];function v(t,e={}){const r=[];return d.forEach((n=>{"function"==typeof n.generate&&r.push(...n.generate(t,e))})),r}},184:function(t,e){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var t=[],e=0;el&&("#"!==s[p]||!i(t[p]));)p-=1;return!i(t[f])||"left"===r&&e!==l||e-p=i?n+=p("0",a-i):n=(n.substring(0,a)||"0")+"."+n.substring(a),e+n}(u),f=!0),"Infinity"===u&&f&&(u=""),f&&!r&&"number"==typeof n&&(u=function(t,e,r){if(-1!==["","-"].indexOf(t))return t;var n=-1!==t.indexOf(".")&&e,o=l(t),a=o.beforeDecimal,i=o.afterDecimal,s=o.hasNagation,u=parseFloat("0."+(i||"0")),p=(i.length<=e?"0."+i:u.toFixed(e)).split(".");return(s?"-":"")+a.split("").reverse().reduce((function(t,e,r){return t.length>r?(Number(t[0])+Number(e)).toString()+t.substring(1,t.length):e+t}),p[0])+(n?".":"")+c(p[1]||"",Math.min(e,i.length),r)}(u,n,o)),f?this.formatNumString(u):this.formatInput(u))},e.prototype.formatNegation=function(t){void 0===t&&(t="");var e=this.props.allowNegative,r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),o=r.test(t),a=n.test(t);return t=t.replace(/-/g,""),o&&!a&&e&&(t="-"+t),t},e.prototype.formatInput=function(t){return void 0===t&&(t=""),this.props.format||(t=this.removePrefixAndSuffix(t),t=this.formatNegation(t)),t=this.removeFormatting(t),this.formatNumString(t)},e.prototype.isCharacterAFormat=function(t,e){var r=this.props,n=r.format,o=r.prefix,a=r.suffix,i=r.decimalScale,s=r.fixedDecimalScale,u=this.getSeparators().decimalSeparator;return"string"==typeof n&&"#"!==n[t]||!(n||!(t=e.length-a.length||i&&s&&e[t]===u))},e.prototype.correctInputValue=function(t,e,r){var n=this,o=this.props,a=o.format,i=o.allowNegative,s=o.prefix,u=o.suffix,c=o.decimalScale,p=this.getSeparators(),f=p.allowedDecimalSeparators,g=p.decimalSeparator,h=this.state.numAsString||"",m=this.selectionBeforeInput,d=m.selectionStart,v=m.selectionEnd,y=function(t,e){for(var r=0,n=0,o=t.length,a=e.length;t[r]===e[r]&&rr&&o-n>r;)n++;return{start:r,end:o-n}}(e,r),S=y.start,b=y.end;if(!a&&S===b&&-1!==f.indexOf(r[d])){var x=0===c?"":g;return r.substr(0,d)+x+r.substr(d+1,r.length)}var w=a?0:s.length,P=e.length-(a?0:u.length);if(r.length>e.length||!r.length||S===b||0===d&&v===e.length||0===S&&b===e.length||d===w&&v===P)return r;var N=e.substr(S,b-S);if([].concat(N).find((function(t,r){return n.isCharacterAFormat(r+S,e)}))){var A=e.substr(S),C={},F=[];[].concat(A).forEach((function(t,r){n.isCharacterAFormat(r+S,e)?C[r]=t:r>N.length-1&&F.push(t)})),Object.keys(C).forEach((function(t){F.length>t?F.splice(t,0,C[t]):F.push(C[t])})),r=e.substr(0,S)+F.join("")}if(!a){var D=this.removeFormatting(r),O=l(D,i),E=O.beforeDecimal,R=O.afterDecimal,k=O.addNegation,j=tS;)y--;y=this.correctCaretPosition(i,y,"left")}}else for(;!m.test(i[y])&&yb)&&(t.preventDefault(),this.setPatchedCaretPosition(r,y,i)),t.isUnitTestRun&&this.setPatchedCaretPosition(r,y,i),g(t)}else g(t)},e.prototype.onMouseUp=function(t){var e=t.target,r=e.selectionStart,n=e.selectionEnd,o=e.value;if(void 0===o&&(o=""),r===n){var a=this.correctCaretPosition(o,r);a!==r&&this.setPatchedCaretPosition(e,a,o)}this.props.onMouseUp(t)},e.prototype.onFocus=function(t){var e=this;t.persist(),this.focusedElm=t.target,this.focusTimeout=setTimeout((function(){var r=t.target,n=r.selectionStart,o=r.selectionEnd,a=r.value;void 0===a&&(a="");var i=e.correctCaretPosition(a,n);i===n||0===n&&o===a.length||e.setPatchedCaretPosition(r,i,a),e.props.onFocus(t)}),0)},e.prototype.render=function(){var t=this.props,e=t.type,r=t.displayType,n=t.customInput,a=t.renderText,i=t.getInputRef,s=t.format,u=(t.thousandSeparator,t.decimalSeparator,t.allowedDecimalSeparators,t.thousandsGroupStyle,t.decimalScale,t.fixedDecimalScale,t.prefix,t.suffix,t.removeFormatting,t.mask,t.defaultValue,t.isNumericString,t.allowNegative,t.allowEmptyFormatting,t.allowLeadingZeros,t.onValueChange,t.isAllowed,t.customNumerals,t.onChange,t.onKeyDown,t.onMouseUp,t.onFocus,t.onBlur,t.value,function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&-1===e.indexOf(n)&&(r[n]=t[n]);return r}(t,["type","displayType","customInput","renderText","getInputRef","format","thousandSeparator","decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","decimalScale","fixedDecimalScale","prefix","suffix","removeFormatting","mask","defaultValue","isNumericString","allowNegative","allowEmptyFormatting","allowLeadingZeros","onValueChange","isAllowed","customNumerals","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value"])),l=this.state,c=l.value,p=l.mounted&&function(t){return t||"undefined"!=typeof navigator&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(s)?"numeric":void 0,f=Object.assign({inputMode:p},u,{type:e,value:c,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===r)return a?a(c,u)||null:o().createElement("span",Object.assign({},u,{ref:i}),c);if(n){var g=n;return o().createElement(g,Object.assign({},f,{ref:i}))}return o().createElement("input",Object.assign({},f,{ref:i}))},e}(o().Component);d.defaultProps=m,e.Z=d}}]); \ No newline at end of file diff --git a/build/710.js b/build/710.js new file mode 100644 index 000000000..5cfa5db60 --- /dev/null +++ b/build/710.js @@ -0,0 +1 @@ +"use strict";(self.webpackWcGzdBlocksJsonp=self.webpackWcGzdBlocksJsonp||[]).push([[710],{944:function(s,c,e){e.r(c);var l=e(567);c.default=l.Z}}]); \ No newline at end of file diff --git a/build/92.js b/build/92.js new file mode 100644 index 000000000..f4e0498a1 --- /dev/null +++ b/build/92.js @@ -0,0 +1 @@ +"use strict";(self.webpackWcGzdBlocksJsonp=self.webpackWcGzdBlocksJsonp||[]).push([[92],{313:function(s,c,e){e.r(c);var l=e(663);c.default=l.Z}}]); \ No newline at end of file diff --git a/build/cart-frontend.asset.php b/build/cart-frontend.asset.php new file mode 100644 index 000000000..7df80552a --- /dev/null +++ b/build/cart-frontend.asset.php @@ -0,0 +1 @@ + array('wc-blocks-checkout', 'wp-element'), 'version' => '74e3b05a07a5e07d2df1'); diff --git a/build/cart-frontend.js b/build/cart-frontend.js new file mode 100644 index 000000000..0ee5988d1 --- /dev/null +++ b/build/cart-frontend.js @@ -0,0 +1 @@ +!function(){var t={528:function(){}},n={};function o(r){var e=n[r];if(void 0!==e)return e.exports;var i=n[r]={exports:{}};return t[r](i,i.exports,o),i.exports}!function(){"use strict";window.wc.blocksCheckout,window.wp.element,o(528)}()}(); \ No newline at end of file diff --git a/build/cart-style.asset.php b/build/cart-style.asset.php new file mode 100644 index 000000000..2390e99db --- /dev/null +++ b/build/cart-style.asset.php @@ -0,0 +1 @@ + array('react', 'wc-blocks-checkout', 'wc-gzd-blocks-settings', 'wp-element', 'wp-plugins'), 'version' => '0b59fdf62938efde53ff'); diff --git a/build/cart.asset.php b/build/cart.asset.php new file mode 100644 index 000000000..3ea4134f2 --- /dev/null +++ b/build/cart.asset.php @@ -0,0 +1 @@ + array('react', 'wc-blocks-checkout', 'wc-gzd-blocks-settings', 'wp-element', 'wp-plugins'), 'version' => 'a10d639dd5c4e6a126bf'); diff --git a/build/cart.css b/build/cart.css new file mode 100644 index 000000000..9c0a7351d --- /dev/null +++ b/build/cart.css @@ -0,0 +1 @@ +.wc-block-components-product-metadata ul.wc-block-components-product-details:first-child{display:flex;flex-direction:column}.wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li{order:950}.wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li[class*=wc-block-components-product-details__gzd-]{order:90;width:120%}.wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li.wc-block-components-product-details__gzd-unit-price{order:0}.wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li.wc-block-components-product-details__gzd-deposit-packaging-type{order:5;font-weight:bold;text-transform:uppercase}.wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li.wc-block-components-product-details__gzd-deposit{order:10}.wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li.wc-block-components-product-details__gzd-differential-taxation{order:10}.wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li.wc-block-components-product-details__gzd-delivery-time{order:20}.wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li.wc-block-components-product-details__gzd-item-desc{order:100}.wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li.wc-gzd-summary-item-last{margin-bottom:1em}ul.wc-block-components-product-details li[class*=wc-block-components-product-details__gzd-] .wc-block-components-product-details__name{display:none}ul.wc-block-components-product-details li[class*=wc-block-components-product-details__gzd-] .wc-block-components-product-details__value{font-size:.8rem;color:#757575}.wc-gzd-small-business-info{font-size:.8rem;color:#757575}ul.wc-block-components-product-details li.wc-not-gzd-summary-item-first{margin-top:1em} diff --git a/build/cart.js b/build/cart.js new file mode 100644 index 000000000..9f859058d --- /dev/null +++ b/build/cart.js @@ -0,0 +1 @@ +!function(){"use strict";var e,t={750:function(e,t,n){n.r(t);var o=window.React,r=window.wc.blocksCheckout,c=window.wp.plugins,s=window.wp.element,l=window.wcGzd.blocks.wcGzdBlocksSettings,i=({extensions:e,cart:t})=>(0,l.getSetting)("isSmallBusiness")&&(0,l.getSetting)("smallBusinessNotice")?(0,o.createElement)("div",{className:"wc-gzd-small-business-info",dangerouslySetInnerHTML:{__html:(0,l.getSetting)("smallBusinessNotice")}}):null;const a=({extensions:e,cart:t})=>((0,s.useEffect)((()=>{const e=document.getElementsByClassName("wc-block-cart-items__row");for(let t of e){const e=t.querySelectorAll("li:not([class*=__gzd])")[0];e&&e.classList.add("wc-not-gzd-summary-item-first")}}),[t.cartItems]),null);(0,c.registerPlugin)("woocommerce-germanized-cart",{render:()=>(0,o.createElement)(r.ExperimentalOrderMeta,null,(0,o.createElement)(a,null),(0,o.createElement)(i,null)),scope:"woocommerce-checkout"})}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var c=n[e]={exports:{}};return t[e](c,c.exports,o),c.exports}o.m=t,e=[],o.O=function(t,n,r,c){if(!n){var s=1/0;for(u=0;u=c)&&Object.keys(o.O).every((function(e){return o.O[e](n[i])}))?n.splice(i--,1):(l=!1,c0&&e[u-1][2]>c;u--)e[u]=e[u-1];e[u]=[n,r,c]},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e={511:0,378:0};o.O.j=function(t){return 0===e[t]};var t=function(t,n){var r,c,s=n[0],l=n[1],i=n[2],a=0;if(s.some((function(t){return 0!==e[t]}))){for(r in l)o.o(l,r)&&(o.m[r]=l[r]);if(i)var u=i(o)}for(t&&t(n);a{const[r,s]=(0,o.useState)(!0),[l,h]=(0,o.useState)("");let u="";if(a)h(a),s(!1);else if(t)try{const e=new URL(t);u=t.toString().substring(e.origin.length)}catch{}return(0,o.useEffect)((()=>{e?document.body.classList.add("checkout-modal-open"):document.body.classList.remove("checkout-modal-open"),u&&(s(!0),h(""),fetch(u,{method:"get"}).then((e=>e.text())).then((e=>{h(e),s(!1)})).catch((function(e){s(!1)})))}),[u,h,e]),e?(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:"wc-gzd-checkout-modal-bg"}),(0,n.createElement)("div",{className:"wc-gzd-checkout-modal-wrapper"},(0,n.createElement)("div",{className:"wc-gzd-checkout-modal"},(0,n.createElement)("div",{className:"actions"},(0,n.createElement)("a",{className:"wc-gzd-checkout-modal-close",onClick:e=>{document.body.classList.remove("checkout-modal-open"),c(e)}},(0,n.createElement)(d,{className:"wc-gzd-checkout-modal-close-icon",icon:i,size:24}))),r?(0,n.createElement)("div",{className:"content is-loading"},(0,n.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})):(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:"content",dangerouslySetInnerHTML:{__html:l}}))))):null},u=c(184),m=c.n(u),k=c(818),b=c(801),g=({checkbox:e,setShowModal:t,setModalUrl:c,onChangeCheckbox:r})=>{const s="checkbox-"+e.id,{setValidationErrors:d,clearValidationError:l}=(0,k.useDispatch)(b.VALIDATION_STORE_KEY),i=!!e.hidden&&e.hidden,h=(0,k.useSelect)((e=>e(b.VALIDATION_STORE_KEY).getValidationError(s))),u=!(!h?.message||h?.hidden);(0,o.useEffect)((()=>{if(e.has_checkbox)return!0===e.checked||!0===e.hidden?l(s):e.is_required&&d({[s]:{message:e.error_message,hidden:!0}}),()=>{l(s)}}),[e.is_required,e.checked,e.hidden,s,l,d]);const g={id:`checkbox-${e.html_id}`,className:"wc-gzd-checkbox",name:`${e.name}`,checked:!!e.checked,hasError:e.is_required&&u,required:e.is_required};return i?null:(0,n.createElement)("div",{className:m()(`wc-gzd-block-checkout-checkboxes__${e.id}`,Object.values(e.wrapper_classes).join(" ")),key:`wrapper-${e.id}`},e.has_checkbox?(0,n.createElement)(n.Fragment,null,(0,n.createElement)(a.CheckboxControl,{key:`checkbox-${e.id}`,...g,onChange:t=>{r({...e,checked:t})}},(0,n.createElement)("span",{onClick:e=>{const n=e.target.closest("a");if(n&&e.currentTarget.contains(n)&&n.classList.contains("wc-gzd-modal")){e.stopPropagation(),e.preventDefault();let o=n.getAttribute("href");o&&(c(o),t(!0))}},dangerouslySetInnerHTML:{__html:e.label}}))):(0,n.createElement)("div",{className:"wc-gzd-checkbox has-no-checkbox"},(0,n.createElement)("span",{dangerouslySetInnerHTML:{__html:e.label}})))},p=c(617),_=e=>{const{onChangeCheckbox:t,checkbox:c}=e,{shouldCreateAccount:a,customerId:r}=(0,k.useSelect)((e=>{const t=e(b.CHECKOUT_STORE_KEY);return{customerId:t.getCustomerId(),shouldCreateAccount:t.getShouldCreateAccount()}})),s=!1===(0,p.getSetting)("checkoutAllowsGuest",!1)&&!r;return(0,o.useEffect)((()=>{t(a||s?{...c,hidden:!1}:{...c,hidden:!0})}),[a]),(0,n.createElement)(g,{...e})},E=e=>{const[t,c]=(0,o.useState)({}),{onChangeCheckbox:a,checkbox:r}=e,{billingAddress:s,paymentData:d,currentPaymentMethod:l}=(0,k.useSelect)((e=>{const t=e(b.CART_STORE_KEY),c=e(b.PAYMENT_STORE_KEY);return{billingAddress:t.getCartData().billingAddress,paymentData:c.getPaymentMethodData(),currentPaymentMethod:c.getActivePaymentMethod()}}));return(0,o.useEffect)((()=>{const e={country:s.country,postcode:s.postcode,city:s.city,street:s.address_1,address_2:s.address_2,account_holder:d.hasOwnProperty("direct_debit_account_holder")?d.direct_debit_account_holder:"",account_iban:d.hasOwnProperty("direct_debit_account_iban")?d.direct_debit_account_iban:"",account_swift:d.hasOwnProperty("direct_debit_account_bic")?d.direct_debit_account_bic:""};c(e),a("direct-debit"===l&&e.account_holder&&e.account_iban&&e.account_swift?{...r,hidden:!1}:{...r,hidden:!0})}),[s,d,l]),(0,n.createElement)(g,{...e,setModalUrl:c=>{c+="&"+new URLSearchParams(t).toString(),e.setModalUrl(c)}})},f=({children:e,checkoutExtensionData:t,extensions:c,cart:r})=>{const[d,l]=(0,o.useState)(!1),{setExtensionData:i}=t,u=c.hasOwnProperty("woocommerce-germanized")?c["woocommerce-germanized"]:{},m=u.hasOwnProperty("checkboxes")?u.checkboxes:[],k=m.reduce(((e,t)=>({...e,[t.id]:{...t,hidden:t.default_hidden,checked:t.default_checked}})),{}),[b,p]=(0,o.useState)(k),[f,w]=(0,o.useState)(""),x=(0,o.useRef)(!1),y=e=>Object.values(e).filter((e=>e.checked||!e.has_checkbox&&!e.hidden?e:null));(0,o.useEffect)((()=>{i("woocommerce-germanized","checkboxes",y(b))}),[b]);const C=(0,o.useCallback)((e=>{p((t=>{const c=t&&t.hasOwnProperty(e.id)&&t[e.id].checked!==e.checked,n={...t,[e.id]:{...e}};return c&&(0,a.extensionCartUpdate)({namespace:"woocommerce-germanized-checkboxes",data:{checkboxes:y(n)}}),n}))}),[i,b,p,a.extensionCartUpdate]);return(0,o.useEffect)((()=>{if(x.current){let e={};Object.keys(k).map((t=>{const c=b.hasOwnProperty(t)?{checked:b[t].checked,hidden:b[t].hidden}:{};e[t]={...k[t],...c}})),s().isEqual(e,b)||p(e)}x.current=!0}),[m]),(0,n.createElement)("div",{className:"wc-gzd-checkboxes"},(0,n.createElement)(h,{show:d,url:f,onClose:()=>{l(!1)}}),Object.keys(b).map((e=>{const t={...b[e]};return"sepa"===t.id?(0,n.createElement)(E,{checkbox:t,setShowModal:l,setModalUrl:w,key:t.id,onChangeCheckbox:C}):"privacy"===t.id?(0,n.createElement)(_,{checkbox:t,setShowModal:l,setModalUrl:w,key:t.id,onChangeCheckbox:C}):(0,n.createElement)(g,{checkbox:t,setShowModal:l,setModalUrl:w,key:t.id,onChangeCheckbox:C})})))}},184:function(e,t){var c;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t{const[s,d]=(0,o.useState)(!0),[i,u]=(0,o.useState)("");let h="";if(a)u(a),d(!1);else if(t)try{const e=new URL(t);h=t.toString().substring(e.origin.length)}catch{}return(0,o.useEffect)((()=>{e?document.body.classList.add("checkout-modal-open"):document.body.classList.remove("checkout-modal-open"),h&&(d(!0),u(""),fetch(h,{method:"get"}).then((e=>e.text())).then((e=>{u(e),d(!1)})).catch((function(e){d(!1)})))}),[h,u,e]),e?(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:"wc-gzd-checkout-modal-bg"}),(0,n.createElement)("div",{className:"wc-gzd-checkout-modal-wrapper"},(0,n.createElement)("div",{className:"wc-gzd-checkout-modal"},(0,n.createElement)("div",{className:"actions"},(0,n.createElement)("a",{className:"wc-gzd-checkout-modal-close",onClick:e=>{document.body.classList.remove("checkout-modal-open"),c(e)}},(0,n.createElement)(r.Z,{className:"wc-gzd-checkout-modal-close-icon",icon:l.Z,size:24}))),s?(0,n.createElement)("div",{className:"content is-loading"},(0,n.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})):(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:"content",dangerouslySetInnerHTML:{__html:i}}))))):null},u=c(342),h=c(818),m=c(801),k=c(617),b=e=>{const{onChangeCheckbox:t,checkbox:c}=e,{shouldCreateAccount:a,customerId:s}=(0,h.useSelect)((e=>{const t=e(m.CHECKOUT_STORE_KEY);return{customerId:t.getCustomerId(),shouldCreateAccount:t.getShouldCreateAccount()}})),d=!1===(0,k.getSetting)("checkoutAllowsGuest",!1)&&!s;return(0,o.useEffect)((()=>{t(a||d?{...c,hidden:!1}:{...c,hidden:!0})}),[a]),(0,n.createElement)(u.Z,{...e})},_=e=>{const[t,c]=(0,o.useState)({}),{onChangeCheckbox:a,checkbox:s}=e,{billingAddress:d,paymentData:r,currentPaymentMethod:l}=(0,h.useSelect)((e=>{const t=e(m.CART_STORE_KEY),c=e(m.PAYMENT_STORE_KEY);return{billingAddress:t.getCartData().billingAddress,paymentData:c.getPaymentMethodData(),currentPaymentMethod:c.getActivePaymentMethod()}}));return(0,o.useEffect)((()=>{const e={country:d.country,postcode:d.postcode,city:d.city,street:d.address_1,address_2:d.address_2,account_holder:r.hasOwnProperty("direct_debit_account_holder")?r.direct_debit_account_holder:"",account_iban:r.hasOwnProperty("direct_debit_account_iban")?r.direct_debit_account_iban:"",account_swift:r.hasOwnProperty("direct_debit_account_bic")?r.direct_debit_account_bic:""};c(e),a("direct-debit"===l&&e.account_holder&&e.account_iban&&e.account_swift?{...s,hidden:!1}:{...s,hidden:!0})}),[d,r,l]),(0,n.createElement)(u.Z,{...e,setModalUrl:c=>{c+="&"+new URLSearchParams(t).toString(),e.setModalUrl(c)}})},g=({children:e,checkoutExtensionData:t,extensions:c,cart:s})=>{const[r,l]=(0,o.useState)(!1),{setExtensionData:h}=t,m=c.hasOwnProperty("woocommerce-germanized")?c["woocommerce-germanized"]:{},k=m.hasOwnProperty("checkboxes")?m.checkboxes:[],g=k.reduce(((e,t)=>({...e,[t.id]:{...t,hidden:t.default_hidden,checked:t.default_checked}})),{}),[E,p]=(0,o.useState)(g),[w,y]=(0,o.useState)(""),f=(0,o.useRef)(!1),C=e=>Object.values(e).filter((e=>e.checked||!e.has_checkbox&&!e.hidden?e:null));(0,o.useEffect)((()=>{h("woocommerce-germanized","checkboxes",C(E))}),[E]);const x=(0,o.useCallback)((e=>{p((t=>{const c=t&&t.hasOwnProperty(e.id)&&t[e.id].checked!==e.checked,n={...t,[e.id]:{...e}};return c&&(0,a.extensionCartUpdate)({namespace:"woocommerce-germanized-checkboxes",data:{checkboxes:C(n)}}),n}))}),[h,E,p,a.extensionCartUpdate]);return(0,o.useEffect)((()=>{if(f.current){let e={};Object.keys(g).map((t=>{const c=E.hasOwnProperty(t)?{checked:E[t].checked,hidden:E[t].hidden}:{};e[t]={...g[t],...c}})),d().isEqual(e,E)||p(e)}f.current=!0}),[k]),(0,n.createElement)("div",{className:"wc-gzd-checkboxes"},(0,n.createElement)(i,{show:r,url:w,onClose:()=>{l(!1)}}),Object.keys(E).map((e=>{const t={...E[e]};return"sepa"===t.id?(0,n.createElement)(_,{checkbox:t,setShowModal:l,setModalUrl:y,key:t.id,onChangeCheckbox:x}):"privacy"===t.id?(0,n.createElement)(b,{checkbox:t,setShowModal:l,setModalUrl:y,key:t.id,onChangeCheckbox:x}):(0,n.createElement)(u.Z,{checkbox:t,setShowModal:l,setModalUrl:y,key:t.id,onChangeCheckbox:x})})))}}}]); \ No newline at end of file diff --git a/build/checkout-blocks/checkout-photovoltaic-system-notice-frontend.js b/build/checkout-blocks/checkout-photovoltaic-system-notice-frontend.js new file mode 100644 index 000000000..e572c7a23 --- /dev/null +++ b/build/checkout-blocks/checkout-photovoltaic-system-notice-frontend.js @@ -0,0 +1 @@ +"use strict";(self.webpackWcBlocksJsonp=self.webpackWcBlocksJsonp||[]).push([[86],{367:function(e,t,o){o.r(t),o.d(t,{default:function(){return r}});var c=o(196),n=o(307),a=(o(813),o(736)),r=({text:e,title:t,children:o,checkoutExtensionData:r,extensions:s,cart:i})=>{const[l,m]=(0,n.useState)(!1),p=s.hasOwnProperty("woocommerce-germanized")?s["woocommerce-germanized"]:{},_=p.applies_for_photovoltaic_system_vat_exempt,f=p.photovoltaic_system_law_details;if((0,n.useEffect)((()=>{m(!!_)}),[_,m]),!l)return null;const h=e?e.replace("{legal_text}",(0,a.sprintf)('%s',f.url,f.text)):(0,a.sprintf)((0,a.__)('To benefit from the tax exemption, please confirm the VAT exemption according to %2$s by activating the checkbox.',"woocommerce-germanized"),f.url,f.text),u=t||(0,a.__)("Your shopping cart is eligible for VAT exemption","woocommerce-germanized");return(0,c.createElement)("div",{className:"wc-gzd-block-checkout__photovoltaic-system-notice wc-block-components-notice-banner is-info"},(0,c.createElement)("h2",{className:"wc-block-components-title",dangerouslySetInnerHTML:{__html:u}}),(0,c.createElement)("p",{dangerouslySetInnerHTML:{__html:h}}))}}}]); \ No newline at end of file diff --git a/build/checkout-blocks/checkout-photovoltaic-system-notice-style.js b/build/checkout-blocks/checkout-photovoltaic-system-notice-style.js new file mode 100644 index 000000000..307b8ad1d --- /dev/null +++ b/build/checkout-blocks/checkout-photovoltaic-system-notice-style.js @@ -0,0 +1 @@ +"use strict";(self.webpackWcGzdBlocksJsonp=self.webpackWcGzdBlocksJsonp||[]).push([[86],{367:function(e,t,o){o.r(t),o.d(t,{default:function(){return r}});var c=o(196),n=o(307),a=(o(813),o(736)),r=({text:e,title:t,children:o,checkoutExtensionData:r,extensions:s,cart:i})=>{const[l,m]=(0,n.useState)(!1),p=s.hasOwnProperty("woocommerce-germanized")?s["woocommerce-germanized"]:{},_=p.applies_for_photovoltaic_system_vat_exempt,f=p.photovoltaic_system_law_details;if((0,n.useEffect)((()=>{m(!!_)}),[_,m]),!l)return null;const h=e?e.replace("{legal_text}",(0,a.sprintf)('%s',f.url,f.text)):(0,a.sprintf)((0,a.__)('To benefit from the tax exemption, please confirm the VAT exemption according to %2$s by activating the checkbox.',"woocommerce-germanized"),f.url,f.text),u=t||(0,a.__)("Your shopping cart is eligible for VAT exemption","woocommerce-germanized");return(0,c.createElement)("div",{className:"wc-gzd-block-checkout__photovoltaic-system-notice wc-block-components-notice-banner is-info"},(0,c.createElement)("h2",{className:"wc-block-components-title",dangerouslySetInnerHTML:{__html:u}}),(0,c.createElement)("p",{dangerouslySetInnerHTML:{__html:h}}))}}}]); \ No newline at end of file diff --git a/build/checkout-frontend.asset.php b/build/checkout-frontend.asset.php new file mode 100644 index 000000000..e6ec1d75a --- /dev/null +++ b/build/checkout-frontend.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-gzd-blocks-settings', 'wc-settings', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '8a995216ef67dbf5a6bd'); diff --git a/build/checkout-frontend.js b/build/checkout-frontend.js new file mode 100644 index 000000000..c4c78d94b --- /dev/null +++ b/build/checkout-frontend.js @@ -0,0 +1 @@ +!function(){"use strict";var e,t,o,n,r,c={196:function(e){e.exports=window.React},819:function(e){e.exports=window.lodash},554:function(e){e.exports=window.wc.blocksCheckout},801:function(e){e.exports=window.wc.wcBlocksData},617:function(e){e.exports=window.wc.wcSettings},813:function(e){e.exports=window.wcGzd.blocks.wcGzdBlocksSettings},818:function(e){e.exports=window.wp.data},307:function(e){e.exports=window.wp.element},736:function(e){e.exports=window.wp.i18n},444:function(e){e.exports=window.wp.primitives}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var o=i[e]={exports:{}};return c[e](o,o.exports,a),o.exports}a.m=c,a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},a.d=function(e,t){for(var o in t)a.o(t,o)&&!a.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},a.f={},a.e=function(e){return Promise.all(Object.keys(a.f).reduce((function(t,o){return a.f[o](e,t),t}),[]))},a.u=function(e){return{86:"checkout-blocks/checkout-photovoltaic-system-notice",131:"checkout-blocks/checkout-checkboxes"}[e]+"-frontend.js?ver="+{86:"8b68b59387f0cc476fd9",131:"9ee69c4727c19d15b7a2"}[e]},a.miniCssF=function(e){},a.miniCssF=function(e){},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e={},t="woocommerce-germanized:",a.l=function(o,n,r,c){if(e[o])e[o].push(n);else{var i,s;if(void 0!==r)for(var u=document.getElementsByTagName("script"),l=0;l-1&&!e;)e=o[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e}(),function(){var e={231:0};a.f.j=function(t,o){var n=a.o(e,t)?e[t]:void 0;if(0!==n)if(n)o.push(n[2]);else{var r=new Promise((function(o,r){n=e[t]=[o,r]}));o.push(n[2]=r);var c=a.p+a.u(t),i=new Error;a.l(c,(function(o){if(a.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var r=o&&("load"===o.type?"missing":o.type),c=o&&o.target&&o.target.src;i.message="Loading chunk "+t+" failed.\n("+r+": "+c+")",i.name="ChunkLoadError",i.type=r,i.request=c,n[1](i)}}),"chunk-"+t,t)}};var t=function(t,o){var n,r,c=o[0],i=o[1],s=o[2],u=0;if(c.some((function(t){return 0!==e[t]}))){for(n in i)a.o(i,n)&&(a.m[n]=i[n]);s&&s(a)}for(t&&t(o);ua.e(131).then(a.bind(a,225))))}),(0,o.registerCheckoutBlock)({metadata:r.CHECKOUT_PHOTOVOLTAIC_SYSTEM_NOTICE,component:(0,n.lazy)((()=>a.e(86).then(a.bind(a,367))))})}(); \ No newline at end of file diff --git a/build/checkout-style.asset.php b/build/checkout-style.asset.php new file mode 100644 index 000000000..35b7eda2d --- /dev/null +++ b/build/checkout-style.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-gzd-blocks-settings', 'wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-dom', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-primitives'), 'version' => '69c8e87ee50bca8dd91c'); diff --git a/build/checkout-style.js.LICENSE.txt b/build/checkout-style.js.LICENSE.txt new file mode 100644 index 000000000..0c20a875d --- /dev/null +++ b/build/checkout-style.js.LICENSE.txt @@ -0,0 +1,5 @@ +/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/ diff --git a/build/checkout.asset.php b/build/checkout.asset.php new file mode 100644 index 000000000..616124236 --- /dev/null +++ b/build/checkout.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-gzd-blocks-settings', 'wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-dom', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-primitives'), 'version' => '18a4ec1295b4d90734d1'); diff --git a/build/checkout.css b/build/checkout.css new file mode 100644 index 000000000..198a20fff --- /dev/null +++ b/build/checkout.css @@ -0,0 +1,3 @@ +ul.wc-block-components-product-details li[class*=wc-block-components-product-details__gzd-] .wc-block-components-product-details__name{display:none}ul.wc-block-components-product-details li[class*=wc-block-components-product-details__gzd-] .wc-block-components-product-details__value{font-size:.8rem;color:#757575}.wc-gzd-small-business-info{font-size:.8rem;color:#757575}.wc-gzd-unit-price{font-weight:normal;font-size:.8rem;color:#757575}.wc-gzd-unit-price .wc-block-components-product-details__name{display:none}ul.wc-block-components-product-details li.wc-block-components-product-details__gzd-unit-price{display:none !important}ul.wc-block-components-product-details li.wc-not-gzd-summary-item-first{margin-top:1em}.wc-gzd-checkout .wp-block-woocommerce-checkout-fields-block .wc-block-checkout__actions{display:none}.wc-gzd-checkout .is-large .wc-block-checkout__sidebar{align-self:auto}.wc-gzd-checkout .is-large .wc-block-components-totals-wrapper.wc-gzd-hide-total-wrapper{display:none}.wc-gzd-checkout .is-large .wc-block-components-totals-wrapper.wc-gzd-show-total-wrapper{display:block}.wc-gzd-checkout .is-large .wc-gzd-checkout-submit{margin-top:1em;position:sticky;top:0}.wc-gzd-checkout .is-large .wc-gzd-checkout-submit .wc-block-components-totals-wrapper{display:none;border-top:none}.wc-gzd-checkout .is-large .wc-gzd-checkout-submit .wc-block-components-totals-wrapper.wc-gzd-show-total-wrapper{display:block}.wc-gzd-checkout .is-large .wc-gzd-checkout-submit .wc-block-components-panel__content .wc-block-components-totals-wrapper{display:block}.wc-gzd-checkout .is-large .wc-gzd-checkout-submit .wc-block-checkout__actions{border-top:none;padding:36px 0}.wc-gzd-checkout .is-large .wc-gzd-checkout-submit .wc-block-checkout__actions .wc-block-checkout__actions_row{display:flex;flex-wrap:wrap;flex-direction:column-reverse}.wc-gzd-checkout .is-large .wc-gzd-checkout-submit .wc-block-checkout__actions .wc-block-components-checkout-place-order-button{width:100%;margin-bottom:1em}.wc-gzd-checkout .wc-block-checkout.is-mobile,.wc-gzd-checkout .wc-block-checkout.is-medium,.wc-gzd-checkout .wc-block-checkout.is-small{flex-direction:column-reverse !important}.wc-gzd-checkout .wc-block-checkout.is-mobile .wc-gzd-checkout-submit,.wc-gzd-checkout .wc-block-checkout.is-medium .wc-gzd-checkout-submit,.wc-gzd-checkout .wc-block-checkout.is-small .wc-gzd-checkout-submit{position:relative;padding:1.5em 0}.wc-gzd-checkout .wc-block-checkout.is-mobile .wc-gzd-checkout-submit .wp-block-woocommerce-checkout-order-summary-block,.wc-gzd-checkout .wc-block-checkout.is-medium .wc-gzd-checkout-submit .wp-block-woocommerce-checkout-order-summary-block,.wc-gzd-checkout .wc-block-checkout.is-small .wc-gzd-checkout-submit .wp-block-woocommerce-checkout-order-summary-block{display:none}.wc-gzd-checkout .wc-block-checkout.is-mobile .wc-gzd-checkboxes,.wc-gzd-checkout .wc-block-checkout.is-medium .wc-gzd-checkboxes,.wc-gzd-checkout .wc-block-checkout.is-small .wc-gzd-checkboxes{padding-top:10px}.wc-gzd-checkout .wc-block-components-order-summary .wc-block-components-order-summary-item__total-price{min-width:55px}.wc-gzd-checkout .wc-block-components-product-metadata ul.wc-block-components-product-details:first-child{display:flex;flex-direction:column}.wc-gzd-checkout .wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li{order:950}.wc-gzd-checkout .wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li[class*=wc-block-components-product-details__gzd-]{order:90;width:130%}.wc-gzd-checkout .wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li.wc-block-components-product-details__gzd-unit-price{order:0}.wc-gzd-checkout .wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li.wc-block-components-product-details__gzd-deposit-packaging-type{order:5;font-weight:bold;text-transform:uppercase}.wc-gzd-checkout .wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li.wc-block-components-product-details__gzd-deposit{order:10}.wc-gzd-checkout .wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li.wc-block-components-product-details__gzd-differential-taxation{order:10}.wc-gzd-checkout .wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li.wc-block-components-product-details__gzd-delivery-time{order:20}.wc-gzd-checkout .wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li.wc-block-components-product-details__gzd-item-desc{order:100}.wc-gzd-checkout .wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li.wc-gzd-summary-item-last{margin-bottom:1em} +.wc-gzd-checkboxes{margin-bottom:1em}.wc-gzd-checkboxes .wc-gzd-checkbox{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;margin-top:1em}.wc-gzd-checkboxes .wc-gzd-checkbox.has-no-checkbox span{font-size:.875em}.wc-gzd-checkout-modal-bg{width:auto !important;position:fixed;background:rgba(0,0,0,.45);left:0;right:0;top:0;bottom:0;z-index:40}.wc-gzd-checkout-modal-wrapper{position:absolute;width:100%;height:100%;display:flex;justify-content:center;align-items:center;top:0;box-sizing:border-box}.wc-gzd-checkout-modal-wrapper .wc-gzd-checkout-modal{position:fixed;top:20%;max-height:60%;width:60%;background:#fff;z-index:41;border-radius:4px;border:1px solid #d5d5d5;transition:1.1s ease-out;box-shadow:-2rem 2rem 2rem rgba(0,0,0,.2);filter:blur(0);transform:scale(1);opacity:1;visibility:visible;overflow:hidden;display:flex;flex-wrap:nowrap}.wc-gzd-checkout-modal-wrapper .wc-gzd-checkout-modal .content{position:relative;padding:1rem;overflow-y:scroll;max-height:100%;width:100%}.wc-gzd-checkout-modal-wrapper .wc-gzd-checkout-modal .content.is-loading{display:flex;align-items:center;justify-content:center;min-height:200px}.wc-gzd-checkout-modal-wrapper .wc-gzd-checkout-modal .actions{position:fixed;width:100%;display:flex;justify-content:end;z-index:42}.wc-gzd-checkout-modal-wrapper .wc-gzd-checkout-modal .actions .wc-gzd-checkout-modal-close{margin:.25rem;display:inline-flex;cursor:pointer}.is-mobile .wc-gzd-checkout-modal-wrapper .wc-gzd-checkout-modal{top:2%;width:95%} +.wc-gzd-block-checkout__photovoltaic-system-notice{flex-direction:column} diff --git a/build/checkout.js b/build/checkout.js new file mode 100644 index 000000000..d21e5718d --- /dev/null +++ b/build/checkout.js @@ -0,0 +1 @@ +!function(){var e,t={226:function(e,t,r){"use strict";r.r(t);var n=window.React,c=window.wp.blocks,o=window.wp.element,a=function(e){let{icon:t,size:r=24,...n}=e;return(0,o.cloneElement)(t,{width:r,height:r,...n})},i=window.wp.primitives,s=(0,o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(i.Path,{d:"M4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4zm.8-4l.7.7 2-2V12h1V9.2l2 2 .7-.7-2-2H12v-1H9.2l2-2-.7-.7-2 2V4h-1v2.8l-2-2-.7.7 2 2H4v1h2.8l-2 2z"})),l=window.wp.i18n,u=window.wp.blockEditor,m=window.wp.components,d=window.wc.blocksCheckout,f=window.wc.wcSettings,p=window.wp.dom;const w=["BUTTON","FIELDSET","INPUT","OPTGROUP","OPTION","SELECT","TEXTAREA","A"];var h=({children:e,style:t={},...r})=>{const c=(0,o.useRef)(),a=()=>{c.current&&p.focus.focusable.find(c.current).forEach((e=>{w.includes(e.nodeName)&&e.setAttribute("tabindex","-1"),e.hasAttribute("contenteditable")&&e.setAttribute("contenteditable","false")}))},i=function(e,t,r){var c=this,o=(0,n.useRef)(null),a=(0,n.useRef)(0),i=(0,n.useRef)(null),s=(0,n.useRef)([]),l=(0,n.useRef)(),u=(0,n.useRef)(),m=(0,n.useRef)(e),d=(0,n.useRef)(!0);(0,n.useEffect)((function(){m.current=e}),[e]);var f=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var p=!!(r=r||{}).leading,w=!("trailing"in r)||!!r.trailing,h="maxWait"in r,g=h?Math.max(+r.maxWait||0,t):null;(0,n.useEffect)((function(){return d.current=!0,function(){d.current=!1}}),[]);var b=(0,n.useMemo)((function(){var e=function(e){var t=s.current,r=l.current;return s.current=l.current=null,a.current=e,u.current=m.current.apply(r,t)},r=function(e,t){f&&cancelAnimationFrame(i.current),i.current=f?requestAnimationFrame(e):setTimeout(e,t)},n=function(e){if(!d.current)return!1;var r=e-o.current;return!o.current||r>=t||r<0||h&&e-a.current>=g},b=function(t){return i.current=null,w&&s.current?e(t):(s.current=l.current=null,u.current)},v=function e(){var c=Date.now();if(n(c))return b(c);if(d.current){var i=t-(c-o.current),s=h?Math.min(i,g-(c-a.current)):i;r(e,s)}},k=function(){var m=Date.now(),f=n(m);if(s.current=[].slice.call(arguments),l.current=c,o.current=m,f){if(!i.current&&d.current)return a.current=o.current,r(v,t),p?e(o.current):u.current;if(h)return r(v,t),e(o.current)}return i.current||r(v,t),u.current};return k.cancel=function(){i.current&&(f?cancelAnimationFrame(i.current):clearTimeout(i.current)),a.current=0,s.current=o.current=l.current=i.current=null},k.isPending=function(){return!!i.current},k.flush=function(){return i.current?b(Date.now()):u.current},k}),[p,h,t,g,w,f]);return b}(a,0,{leading:!0});return(0,o.useLayoutEffect)((()=>{let e;return a(),c.current&&(e=new window.MutationObserver(i),e.observe(c.current,{childList:!0,attributes:!0,subtree:!0})),()=>{e&&e.disconnect(),i.cancel()}}),[i]),(0,n.createElement)("div",{ref:c,"aria-disabled":"true",style:{userSelect:"none",pointerEvents:"none",cursor:"normal",...t},...r},e)},g=r(184),b=r.n(g),v=window.wp.data,k=window.wc.wcBlocksData,E=({checkbox:e,setShowModal:t,setModalUrl:r,onChangeCheckbox:c})=>{const a="checkbox-"+e.id,{setValidationErrors:i,clearValidationError:s}=(0,v.useDispatch)(k.VALIDATION_STORE_KEY),l=!!e.hidden&&e.hidden,u=(0,v.useSelect)((e=>e(k.VALIDATION_STORE_KEY).getValidationError(a))),m=!(!u?.message||u?.hidden);(0,o.useEffect)((()=>{if(e.has_checkbox)return!0===e.checked||!0===e.hidden?s(a):e.is_required&&i({[a]:{message:e.error_message,hidden:!0}}),()=>{s(a)}}),[e.is_required,e.checked,e.hidden,a,s,i]);const f={id:`checkbox-${e.html_id}`,className:"wc-gzd-checkbox",name:`${e.name}`,checked:!!e.checked,hasError:e.is_required&&m,required:e.is_required};return l?null:(0,n.createElement)("div",{className:b()(`wc-gzd-block-checkout-checkboxes__${e.id}`,Object.values(e.wrapper_classes).join(" ")),key:`wrapper-${e.id}`},e.has_checkbox?(0,n.createElement)(n.Fragment,null,(0,n.createElement)(d.CheckboxControl,{key:`checkbox-${e.id}`,...f,onChange:t=>{c({...e,checked:t})}},(0,n.createElement)("span",{onClick:e=>{const n=e.target.closest("a");if(n&&e.currentTarget.contains(n)&&n.classList.contains("wc-gzd-modal")){e.stopPropagation(),e.preventDefault();let c=n.getAttribute("href");c&&(r(c),t(!0))}},dangerouslySetInnerHTML:{__html:e.label}}))):(0,n.createElement)("div",{className:"wc-gzd-checkbox has-no-checkbox"},(0,n.createElement)("span",{dangerouslySetInnerHTML:{__html:e.label}})))},y=JSON.parse('{"apiVersion":2,"name":"woocommerce-germanized/checkout-checkboxes","version":"2.0.0","title":"Legal Checkboxes","category":"woocommerce","description":"Adds your checkboxes, registered via Germanized, to your checkout.","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"lock":false},"parent":["woocommerce/checkout-fields-block","woocommerce/checkout-totals-block"],"textdomain":"woocommerce-germanized","attributes":{"className":{"type":"string","default":""}}}');(0,c.registerBlockType)(y,{icon:{src:(0,n.createElement)(a,{icon:s,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e,setAttributes:t})=>{const{text:r}=e,c=(0,u.useBlockProps)(),o={id:"preview",label:(0,l.__)("This is a label being printed next to your legal checkbox.","woocommerce-germanized"),hidden:!1,checked:!1,is_required:!0,name:"preview",has_checkbox:!0,wrapper_classes:[]};return(0,n.createElement)("div",{...c},(0,n.createElement)(u.InspectorControls,null,(0,n.createElement)(m.PanelBody,{title:(0,l.__)("Checkboxes","woocommerce-germanized")},(0,n.createElement)(m.ExternalLink,{href:`${f.ADMIN_URL}admin.php?page=wc-settings&tab=germanized-checkboxes`},(0,l.__)("Manage checkboxes","woocommerce-germanized")))),(0,n.createElement)("div",{className:"wc-gzd-editor-checkboxes"},(0,n.createElement)(h,null,(0,n.createElement)(E,{checkbox:o,key:o.id,onChangeCheckbox:()=>{}}))))},save:({attributes:e})=>{const{text:t}=e;return(0,n.createElement)("div",{...u.useBlockProps.save()})}});var x=(0,o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(i.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"})),_=JSON.parse('{"apiVersion":2,"name":"woocommerce-germanized/checkout-photovoltaic-system-notice","version":"2.0.0","title":"Photovoltaic system notice","category":"woocommerce","description":"Remind your customers of a possible vat exempt for a photovoltaic system contained within the current cart.","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"lock":false},"parent":["woocommerce/checkout-totals-block","woocommerce/checkout","woocommerce/checkout-fields-block"],"textdomain":"woocommerce-germanized","attributes":{"className":{"type":"string","default":""},"text":{"type":"string","required":false},"title":{"type":"string","required":false},"lock":{"type":"object","default":{"remove":false,"move":false}}}}');(0,c.registerBlockType)(_,{icon:{src:(0,n.createElement)(a,{icon:x,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e,setAttributes:t})=>{const{text:r,title:c}=e,o=(0,u.useBlockProps)(),a=r||(0,l.sprintf)((0,l.__)("To benefit from the tax exemption, please confirm the VAT exemption according to {legal_text} by activating the checkbox.","woocommerce-germanized")),i=c||(0,l.__)("Your shopping cart is eligible for VAT exemption","woocommerce-germanized");return(0,n.createElement)("div",{...o},(0,n.createElement)("div",{className:"wc-gzd-block-checkout__photovoltaic-system-notice wc-block-components-notice-banner is-info"},(0,n.createElement)(u.RichText,{tagName:"h4",className:"wc-block-components-title",value:i,onChange:e=>t({title:e})}),(0,n.createElement)(u.RichText,{tagName:"p",value:a,onChange:e=>t({text:e})})))},save:()=>(0,n.createElement)("div",{...u.useBlockProps.save()})});var z=window.wp.plugins,T=window.wcGzd.blocks.wcGzdBlocksSettings,O=({extensions:e,cart:t})=>(0,T.getSetting)("isSmallBusiness")&&(0,T.getSetting)("smallBusinessNotice")?(0,n.createElement)("div",{className:"wc-gzd-small-business-info",dangerouslySetInnerHTML:{__html:(0,T.getSetting)("smallBusinessNotice")}}):null;const S=({extensions:e,cart:t})=>((0,o.useEffect)((()=>{(0,v.select)(k.CHECKOUT_STORE_KEY).getExtensionData().hasOwnProperty("woocommerce-germanized")||(0,v.dispatch)(k.CHECKOUT_STORE_KEY).__internalSetExtensionData("woocommerce-germanized",{})}),[]),(0,o.useEffect)((()=>{const e=document.getElementsByClassName("wc-block-components-order-summary-item");for(let t of e){const e=t.getElementsByClassName("wc-block-components-product-details__gzd-unit-price")[0],r=t.querySelectorAll("li:not([class*=__gzd])")[0];if(r&&r.classList.add("wc-not-gzd-summary-item-first"),e){const r=t.getElementsByClassName("wc-block-components-order-summary-item__total-price")[0],n=r.getElementsByClassName("wc-gzd-unit-price")[0];n&&r.removeChild(n);const c=document.createElement("div");c.className="wc-gzd-unit-price",c.innerHTML=e.innerHTML,e.classList.add("wc-gzd-unit-price-moved"),r.appendChild(c)}}}),[t.cartItems]),(0,o.useEffect)((()=>{const e=document.getElementsByClassName("wp-block-woocommerce-checkout-order-summary-block");for(let t of e){const e=t.getElementsByClassName("wc-block-components-totals-wrapper");let r=t.parentNode.classList.contains("wc-gzd-checkout-submit");for(let t of e)null!=t.querySelector(".wc-block-components-totals-footer-item")&&(r=!r),r?(t.classList.remove("wc-gzd-show-total-wrapper"),t.classList.add("wc-gzd-hide-total-wrapper")):(t.classList.remove("wc-gzd-hide-total-wrapper"),t.classList.add("wc-gzd-show-total-wrapper"))}}),[t.cartTotals]),null);(0,z.registerPlugin)("woocommerce-germanized-checkout-order-meta",{render:()=>(0,n.createElement)(d.ExperimentalOrderMeta,null,(0,n.createElement)(O,null),(0,n.createElement)(S,null)),scope:"woocommerce-checkout"}),window.lodash,(0,z.registerPlugin)("woocommerce-germanized-checkout-fees",{render:()=>{const{currentPaymentMethod:e}=(0,v.useSelect)((e=>({currentPaymentMethod:e(k.PAYMENT_STORE_KEY).getActivePaymentMethod()})));return(0,o.useEffect)((()=>{e&&(0,d.extensionCartUpdate)({namespace:"woocommerce-germanized-set-payment-method",data:{active_method:e}})}),[e]),null},scope:"woocommerce-checkout"}),(0,d.registerCheckoutFilters)("woocommerce-germanized",{placeOrderButtonLabel:(e,t,r)=>(0,T.getSetting)("buyNowButtonText")})},184:function(e,t){var r;!function(){"use strict";var n={}.hasOwnProperty;function c(){for(var e=[],t=0;t=o)&&Object.keys(n.O).every((function(e){return n.O[e](r[s])}))?r.splice(s--,1):(i=!1,o0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[r,c,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.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e={231:0,863:0};n.O.j=function(t){return 0===e[t]};var t=function(t,r){var c,o,a=r[0],i=r[1],s=r[2],l=0;if(a.some((function(t){return 0!==e[t]}))){for(c in i)n.o(i,c)&&(n.m[c]=i[c]);if(s)var u=s(n)}for(t&&t(r);l{const t=(0,n.getSetting)("displayCartPricesIncludingTax",!1),i=(0,n.getSetting)("showMiniCartTaxNotice",!0),r=(0,n.getSetting)("showMiniCartShippingCostsNotice",!0),l=(0,n.getSetting)("isSmallBusiness",!1),m=(0,n.getSetting)("smallBusinessNotice",""),g=(0,a.useSelect)(((e,{dispatch:i})=>{const s=e(o.CART_STORE_KEY),n=s.getCartData(),a=s.getCartErrors(),r=s.getCartTotals(),l=!s.hasFinishedResolution("getCartData"),{receiveCart:m,receiveCartContents:g}=i(o.CART_STORE_KEY),p=n.extensions.hasOwnProperty("woocommerce-germanized")?n.extensions["woocommerce-germanized"]:{shipping_costs_notice:""},d=t?(0,c.__)("incl. VAT","woocommerce-germanized"):(0,c.__)("excl. VAT","woocommerce-germanized");return{cartItems:n.items,crossSellsProducts:n.crossSells,cartItemsCount:n.itemsCount,cartItemsWeight:n.itemsWeight,cartNeedsPayment:n.needsPayment,cartNeedsShipping:n.needsShipping,cartItemErrors:n.errors,cartTotals:r,cartIsLoading:l,cartErrors:a,extensions:n.extensions,shippingRates:n.shippingRates,cartHasCalculatedShipping:n.hasCalculatedShipping,paymentRequirements:n.paymentRequirements,shippingCostsNotice:n.needsShipping?p.shipping_costs_notice:"",taxNotice:r.total_tax>0?d:"",receiveCart:m,receiveCartContents:g}}),[t]);return(0,s.createElement)("div",{className:"wc-gzd-block-mini-cart-notices"},l&&m&&!i&&(0,s.createElement)("div",{className:"wc-gzd-block-mini-cart-notices__notice wc-gzd-block-mini-cart-notices__small-business-notice",dangerouslySetInnerHTML:{__html:m}}),(0,s.createElement)("div",{className:"wc-gzd-block-mini-cart-notices__notice-wrap"},g.taxNotice&&i&&(0,s.createElement)("div",{className:"wc-gzd-block-mini-cart-notices__notice wc-gzd-block-mini-cart-notices__tax-notice",dangerouslySetInnerHTML:{__html:g.taxNotice}}),g.shippingCostsNotice&&r&&(0,s.createElement)("div",{className:"wc-gzd-block-mini-cart-notices__notice wc-gzd-block-mini-cart-notices__shipping-notice",dangerouslySetInnerHTML:{__html:g.shippingCostsNotice}})))}}}]); \ No newline at end of file diff --git a/build/mini-cart-blocks/mini-cart-notices-style.js b/build/mini-cart-blocks/mini-cart-notices-style.js new file mode 100644 index 000000000..241e7df5a --- /dev/null +++ b/build/mini-cart-blocks/mini-cart-notices-style.js @@ -0,0 +1 @@ +"use strict";(self.webpackWcGzdBlocksJsonp=self.webpackWcGzdBlocksJsonp||[]).push([[930],{473:function(e,t,i){i.r(t),i.d(t,{default:function(){return r}});var s=i(196),n=(i(307),i(813)),c=i(736),a=i(818),o=i(801),r=({className:e})=>{const t=(0,n.getSetting)("displayCartPricesIncludingTax",!1),i=(0,n.getSetting)("showMiniCartTaxNotice",!0),r=(0,n.getSetting)("showMiniCartShippingCostsNotice",!0),l=(0,n.getSetting)("isSmallBusiness",!1),m=(0,n.getSetting)("smallBusinessNotice",""),g=(0,a.useSelect)(((e,{dispatch:i})=>{const s=e(o.CART_STORE_KEY),n=s.getCartData(),a=s.getCartErrors(),r=s.getCartTotals(),l=!s.hasFinishedResolution("getCartData"),{receiveCart:m,receiveCartContents:g}=i(o.CART_STORE_KEY),p=n.extensions.hasOwnProperty("woocommerce-germanized")?n.extensions["woocommerce-germanized"]:{shipping_costs_notice:""},d=t?(0,c.__)("incl. VAT","woocommerce-germanized"):(0,c.__)("excl. VAT","woocommerce-germanized");return{cartItems:n.items,crossSellsProducts:n.crossSells,cartItemsCount:n.itemsCount,cartItemsWeight:n.itemsWeight,cartNeedsPayment:n.needsPayment,cartNeedsShipping:n.needsShipping,cartItemErrors:n.errors,cartTotals:r,cartIsLoading:l,cartErrors:a,extensions:n.extensions,shippingRates:n.shippingRates,cartHasCalculatedShipping:n.hasCalculatedShipping,paymentRequirements:n.paymentRequirements,shippingCostsNotice:n.needsShipping?p.shipping_costs_notice:"",taxNotice:r.total_tax>0?d:"",receiveCart:m,receiveCartContents:g}}),[t]);return(0,s.createElement)("div",{className:"wc-gzd-block-mini-cart-notices"},l&&m&&!i&&(0,s.createElement)("div",{className:"wc-gzd-block-mini-cart-notices__notice wc-gzd-block-mini-cart-notices__small-business-notice",dangerouslySetInnerHTML:{__html:m}}),(0,s.createElement)("div",{className:"wc-gzd-block-mini-cart-notices__notice-wrap"},g.taxNotice&&i&&(0,s.createElement)("div",{className:"wc-gzd-block-mini-cart-notices__notice wc-gzd-block-mini-cart-notices__tax-notice",dangerouslySetInnerHTML:{__html:g.taxNotice}}),g.shippingCostsNotice&&r&&(0,s.createElement)("div",{className:"wc-gzd-block-mini-cart-notices__notice wc-gzd-block-mini-cart-notices__shipping-notice",dangerouslySetInnerHTML:{__html:g.shippingCostsNotice}})))}}}]); \ No newline at end of file diff --git a/build/mini-cart-blocks/mini-cart-notices.css b/build/mini-cart-blocks/mini-cart-notices.css new file mode 100644 index 000000000..bf425c552 --- /dev/null +++ b/build/mini-cart-blocks/mini-cart-notices.css @@ -0,0 +1 @@ +.wc-block-mini-cart__footer-actions{flex-wrap:wrap}.wc-block-mini-cart__footer-actions .wc-gzd-block-mini-cart-notices{justify-content:right;margin-top:-7px;font-size:.8rem;color:#757575;flex:0 0 100%;display:inline-flex;text-align:right;flex-wrap:wrap}.wc-block-mini-cart__footer-actions .wc-gzd-block-mini-cart-notices .wc-gzd-block-mini-cart-notices__notice::after{content:" "}.wc-block-mini-cart__footer-actions .wc-gzd-block-mini-cart-notices .wc-gzd-block-mini-cart-notices__notice.wc-gzd-block-mini-cart-notices__small-business-notice{flex:0 0 100%}.wc-block-mini-cart__footer-actions .wc-gzd-block-mini-cart-notices .wc-gzd-block-mini-cart-notices__notice-wrap{text-align:left;display:flex;justify-content:right;flex:0 0 100%} diff --git a/build/mini-cart-blocks/style-mini-cart-notices.css b/build/mini-cart-blocks/style-mini-cart-notices.css new file mode 100644 index 000000000..bf425c552 --- /dev/null +++ b/build/mini-cart-blocks/style-mini-cart-notices.css @@ -0,0 +1 @@ +.wc-block-mini-cart__footer-actions{flex-wrap:wrap}.wc-block-mini-cart__footer-actions .wc-gzd-block-mini-cart-notices{justify-content:right;margin-top:-7px;font-size:.8rem;color:#757575;flex:0 0 100%;display:inline-flex;text-align:right;flex-wrap:wrap}.wc-block-mini-cart__footer-actions .wc-gzd-block-mini-cart-notices .wc-gzd-block-mini-cart-notices__notice::after{content:" "}.wc-block-mini-cart__footer-actions .wc-gzd-block-mini-cart-notices .wc-gzd-block-mini-cart-notices__notice.wc-gzd-block-mini-cart-notices__small-business-notice{flex:0 0 100%}.wc-block-mini-cart__footer-actions .wc-gzd-block-mini-cart-notices .wc-gzd-block-mini-cart-notices__notice-wrap{text-align:left;display:flex;justify-content:right;flex:0 0 100%} diff --git a/build/mini-cart-frontend.asset.php b/build/mini-cart-frontend.asset.php new file mode 100644 index 000000000..a0b685312 --- /dev/null +++ b/build/mini-cart-frontend.asset.php @@ -0,0 +1 @@ + array('react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-gzd-blocks-settings', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '5052ad3173cf2d92e15b'); diff --git a/build/mini-cart-frontend.js b/build/mini-cart-frontend.js new file mode 100644 index 000000000..25a8e56a4 --- /dev/null +++ b/build/mini-cart-frontend.js @@ -0,0 +1 @@ +!function(){"use strict";var e,t,n,r={755:function(e,t,n){var r=window.wc.blocksCheckout,o=n(307),i={MINI_CART_NOTICES:JSON.parse('{"apiVersion":2,"name":"woocommerce-germanized/mini-cart-notices","version":"2.0.0","title":"Mini cart legal notices","category":"woocommerce","description":"Outputs mini cart legal notices.","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":true,"color":{"text":true,"background":true}},"parent":["woocommerce/mini-cart-footer-block"],"textdomain":"woocommerce-germanized","attributes":{"lock":{"type":"object","default":{"remove":false,"move":false}}}}')};(0,r.registerCheckoutBlock)({metadata:i.MINI_CART_NOTICES,component:(0,o.lazy)((()=>Promise.all([n.e(795),n.e(930)]).then(n.bind(n,473))))})},196:function(e){e.exports=window.React},801:function(e){e.exports=window.wc.wcBlocksData},813:function(e){e.exports=window.wcGzd.blocks.wcGzdBlocksSettings},818:function(e){e.exports=window.wp.data},307:function(e){e.exports=window.wp.element},736:function(e){e.exports=window.wp.i18n}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e](n,n.exports,i),n.exports}i.m=r,e=[],i.O=function(t,n,r,o){if(!n){var a=1/0;for(l=0;l=o)&&Object.keys(i.O).every((function(e){return i.O[e](n[u])}))?n.splice(u--,1):(c=!1,o0&&e[l-1][2]>o;l--)e[l]=e[l-1];e[l]=[n,r,o]},i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=function(e){return Promise.all(Object.keys(i.f).reduce((function(t,n){return i.f[n](e,t),t}),[]))},i.u=function(e){return{795:"mini-cart-blocks/style-mini-cart-notices",930:"mini-cart-blocks/mini-cart-notices"}[e]+"-frontend.js?ver="+{795:"e5adab5fa1cf92443cb4",930:"5b51c8d7148c16f46948"}[e]},i.miniCssF=function(e){return"mini-cart-blocks/style-mini-cart-notices.css"},i.miniCssF=function(e){return"mini-cart-blocks/style-mini-cart-notices.css"},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t={},n="woocommerce-germanized:",i.l=function(e,r,o,a){if(t[e])t[e].push(r);else{var c,u;if(void 0!==o)for(var s=document.getElementsByTagName("script"),l=0;l-1&&!e;)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e}(),function(){if("undefined"!=typeof document){var e={398:0};i.f.miniCss=function(t,n){e[t]?n.push(e[t]):0!==e[t]&&{795:1}[t]&&n.push(e[t]=function(e){return new Promise((function(t,n){var r=i.miniCssF(e),o=i.p+r;if(function(e,t){for(var n=document.getElementsByTagName("link"),r=0;r array('react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-gzd-blocks-settings', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'e104e628505a48b5ae71'); diff --git a/build/mini-cart.asset.php b/build/mini-cart.asset.php new file mode 100644 index 000000000..e28cc84eb --- /dev/null +++ b/build/mini-cart.asset.php @@ -0,0 +1 @@ + array(), 'version' => '98c4af153956dc4cbc8c'); diff --git a/build/mini-cart.css b/build/mini-cart.css new file mode 100644 index 000000000..567f36e5d --- /dev/null +++ b/build/mini-cart.css @@ -0,0 +1 @@ +ul.wc-block-components-product-details li[class*=wc-block-components-product-details__gzd-] .wc-block-components-product-details__name{display:none}ul.wc-block-components-product-details li[class*=wc-block-components-product-details__gzd-] .wc-block-components-product-details__value{font-size:.8rem;color:#757575}.wc-gzd-small-business-info{font-size:.8rem;color:#757575}.wc-gzd-unit-price{font-weight:normal;font-size:.8rem;color:#757575}.wc-gzd-unit-price .wc-block-components-product-details__name{display:none}ul.wc-block-components-product-details li.wc-block-components-product-details__gzd-unit-price{display:none !important}ul.wc-block-components-product-details li.wc-not-gzd-summary-item-first{margin-top:1em}.wp-block-woocommerce-mini-cart-contents .wc-block-components-totals-item__description{display:none !important} diff --git a/build/mini-cart.js b/build/mini-cart.js new file mode 100644 index 000000000..f1e037a6a --- /dev/null +++ b/build/mini-cart.js @@ -0,0 +1 @@ +((window.wcGzd=window.wcGzd||{}).blocks=window.wcGzd.blocks||{})["mini-cart"]={}; \ No newline at end of file diff --git a/build/product-defect-description-frontend.js b/build/product-defect-description-frontend.js new file mode 100644 index 000000000..b4f908b80 --- /dev/null +++ b/build/product-defect-description-frontend.js @@ -0,0 +1 @@ +"use strict";(self.webpackWcBlocksJsonp=self.webpackWcBlocksJsonp||[]).push([[710],{575:function(e,t,r){r.r(t),r.d(t,{default:function(){return a}});var n=r(196),o=r(721),c=r(606),a=e=>(e={...e,labelType:"defect-description"}).isDescendentOfSingleProductTemplate?(0,n.createElement)(c.Z,{...e}):(0,o.withProductDataContext)(c.Z)(e)},606:function(e,t,r){r.d(t,{Z:function(){return h}});var n=r(196),o=r(184),c=r.n(o),a=r(293),l=r(864),s=r(736);const m=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object,i=e=>"string"==typeof e;var p=r(857),u=r(83);function d(e={}){const t={};return(0,u.R)(e,{selector:""}).forEach((e=>{t[e.key]=e.value})),t}function g(e,t){return e&&t?`has-${(0,p.o)(t)}-${e}`:""}const _=e=>{const t=(e=>{const t=m(e)?e:{style:{}};let r=t.style;return i(r)&&(r=JSON.parse(r)||{}),m(r)||(r={}),{...t,style:r}})(e),r=function(e){const{backgroundColor:t,textColor:r,gradient:n,style:o}=e,a=g("background-color",t),l=g("color",r),s=function(e){if(e)return`has-${e}-gradient-background`}(n),i=s||o?.color?.gradient;return{className:c()(l,s,{[a]:!i&&!!a,"has-text-color":r||o?.color?.text,"has-background":t||o?.color?.background||n||o?.color?.gradient,"has-link-color":m(o?.elements?.link)?o?.elements?.link?.color:void 0}),style:d({color:o?.color||{}})}}(t),n=function(e){const t=e.style?.border||{};return{className:function(e){const{borderColor:t,style:r}=e,n=t?g("border-color",t):"";return c()({"has-border-color":!!t||!!r?.border?.color,[n]:!!n})}(e),style:d({border:t})}}(t),o=function(e){return{className:void 0,style:d({spacing:e.style?.spacing||{}})}}(t),a=(e=>{const t=m(e.style.typography)?e.style.typography:{},r=i(t.fontFamily)?t.fontFamily:"";return{className:e.fontFamily?`has-${e.fontFamily}-font-family`:r,style:{fontSize:e.fontSize?`var(--wp--preset--font-size--${e.fontSize})`:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight,letterSpacing:t.letterSpacing,lineHeight:t.lineHeight,textDecoration:t.textDecoration,textTransform:t.textTransform}}})(t);return{className:c()(a.className,r.className,n.className,o.className),style:{...a.style,...r.style,...n.style,...o.style}}};var y=r(333);const f=e=>({thousandSeparator:e?.thousandSeparator,decimalSeparator:e?.decimalSeparator,fixedDecimalScale:!0,prefix:e?.prefix,suffix:e?.suffix,isNumericString:!0});var w=({className:e,value:t,currency:r,onValueChange:o,displayType:a="text",...l})=>{var s;const m="string"==typeof t?parseInt(t,10):t;if(!Number.isFinite(m))return null;const i=m/10**r.minorUnit;if(!Number.isFinite(i))return null;const p=c()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",e),u=null!==(s=l.decimalScale)&&void 0!==s?s:r?.minorUnit,d={...l,...f(r),decimalScale:u,value:void 0,currency:void 0,onValueChange:void 0},g=o?e=>{const t=+e.value*10**r.minorUnit;o(t)}:()=>{};return(0,n.createElement)(y.Z,{className:p,displayType:a,...d,value:i,onValueChange:g})},b=r(307),v=({align:e,className:t,labelType:r,formattedLabel:o,labelClassName:a,labelStyle:l,style:s})=>{const m=c()(t,"wc-gzd-block-components-product-"+r,"wc-gzd-block-components-product-price-label",{[`wc-gzd-block-components-product-price-label--align-${e}`]:e});let i=(0,n.createElement)("span",{className:c()("wc-gzd-block-components-product-"+r+"__value",a)});return o&&(i=(0,b.isValidElement)(o)?(0,n.createElement)("span",{className:c()("wc-gzd-block-components-product-"+r+"__value",a),style:l},o):(0,n.createElement)("span",{className:c()("wc-gzd-block-components-product-"+r+"__value",a),style:l,dangerouslySetInnerHTML:{__html:o}})),(0,n.createElement)("span",{className:m,style:s},i)},h=e=>{const{className:t,textAlign:r,isDescendentOfSingleProductTemplate:o,labelType:m}=e,{parentName:i,parentClassName:p}=(0,l.useInnerBlockLayoutContext)(),{product:u}=(0,l.useProductDataContext)(),d=_(e),g="woocommerce/all-products"===i,y=c()("wc-gzd-block-components-product-"+m,t,d.className,{[`${p}__product-${m}`]:p});if(!u.id&&!o){const e=(0,n.createElement)(v,{align:r,className:y,labelType:m});if(g){const t=`wp-block-woocommerce-gzd-product-${m}`;return(0,n.createElement)("div",{className:t},e)}return e}const f=((e,t,r)=>{const o=t.hasOwnProperty("extensions")?t.extensions["woocommerce-germanized"]:{unit_price_html:"",unit_prices:{price:0,regular_price:0,sale_price:0},unit_product:0,unit_product_html:"",delivery_time_html:"",tax_info_html:"",shipping_costs_info_html:"",defect_description_html:"",nutri_score:"",nutri_score_html:"",deposit_html:"",deposit_prices:{price:0,quantity:0,amount:0},deposit_packaging_type_html:"",manufacturer_html:"",product_safety_attachments_html:""},c=t.prices,l=r?(0,a.getCurrencyFromPriceResponse)():(0,a.getCurrencyFromPriceResponse)(c),m=e.replace(/-/g,"_"),i=o.hasOwnProperty(m+"_html")?o[m+"_html"]:"";let p="";return"unit_price"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)(w,{currency:l,value:1e3})," / ",(0,n.createElement)("span",{className:"unit"},(0,s._x)("kg","unit","woocommerce-germanized"))):"delivery_time"===m?p=(0,s._x)("Delivery time: 2-3 days","preview","woocommerce-germanized"):"tax_info"===m?p=(0,s._x)("incl. 19 % VAT","preview","woocommerce-germanized"):"shipping_costs_info"===m?p=(0,s._x)("plus shipping costs","preview","woocommerce-germanized"):"unit_product"===m?p=(0,s.sprintf)((0,s._x)("Product includes: %1$s kg","preview","woocommerce-germanized"),10):"defect_description"===m?p=(0,s._x)("This product has a serious defect.","preview","woocommerce-germanized"):"deposit"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("span",{className:"additional"},(0,s._x)("Plus","preview","woocommerce-germanized"))," ",(0,n.createElement)(w,{currency:l,value:40})," ",(0,n.createElement)("span",{className:"deposit-notice"},(0,s._x)("deposit","preview","woocommerce-germanized"))):"deposit_packaging_type"===m?p=(0,s._x)("Disposable","preview","woocommerce-germanized"):"nutri_score"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("span",{className:"wc-gzd-nutri-score-value wc-gzd-nutri-score-value-a"},"A")):"manufacturer"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("p",null,(0,n.createElement)("stong",null,(0,s._x)("Sample company name","preview","woocommerce-germanized")),(0,n.createElement)("br",null),(0,s._x)("Sample address","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("12345 Berlin","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("sample@sample.com","preview","woocommerce-germanized")),(0,n.createElement)("h3",null,(0,s.__)("Person responsible for the EU","woocommerce-germanized")),(0,n.createElement)("p",null,(0,n.createElement)("stong",null,(0,s._x)("Sample company name","preview","woocommerce-germanized")),(0,n.createElement)("br",null),(0,s._x)("Sample address","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("12345 Berlin","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("sample@sample.com","preview","woocommerce-germanized"))):"product_safety_attachments"===m&&(p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("ul",null,(0,n.createElement)("li",null,(0,n.createElement)("a",{href:"#"},(0,s._x)("sample-filename.pdf","sample","woocommerce-germanized")))))),{preview:p,data:i}})(m,u,o),b=(0,n.createElement)(v,{align:r,className:y,labelType:m,style:d.style,labelStyle:d.style,formattedLabel:o?f.preview:f.data});if(g){const e=`wp-block-woocommerce-gzd-product-${m}`;return(0,n.createElement)("div",{className:e},b)}return b}}}]); \ No newline at end of file diff --git a/build/product-defect-description.css b/build/product-defect-description.css new file mode 100644 index 000000000..1114283cc --- /dev/null +++ b/build/product-defect-description.css @@ -0,0 +1 @@ +.wc-gzd-block-components-product-price-label{display:block}.wc-gzd-block-components-product-price-label.wc-gzd-block-components-product-price-label--align-center{text-align:center}.wc-gzd-block-components-product-price-label.wc-gzd-block-components-product-price-label--align-right{text-align:right}.wc-gzd-block-components-product-deposit-packaging-type{text-transform:uppercase}.wc-gzd-block-components-product-nutri-score .wc-gzd-nutri-score-value{height:4rem;width:7.0625rem;display:block;text-indent:-9999px} diff --git a/build/product-delivery-time-frontend.js b/build/product-delivery-time-frontend.js new file mode 100644 index 000000000..8d65f4cce --- /dev/null +++ b/build/product-delivery-time-frontend.js @@ -0,0 +1 @@ +"use strict";(self.webpackWcBlocksJsonp=self.webpackWcBlocksJsonp||[]).push([[518],{351:function(e,t,r){r.r(t),r.d(t,{default:function(){return c}});var n=r(196),o=r(721),a=r(606),c=e=>(e={...e,labelType:"delivery-time"}).isDescendentOfSingleProductTemplate?(0,n.createElement)(a.Z,{...e}):(0,o.withProductDataContext)(a.Z)(e)},606:function(e,t,r){r.d(t,{Z:function(){return h}});var n=r(196),o=r(184),a=r.n(o),c=r(293),l=r(864),s=r(736);const m=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object,i=e=>"string"==typeof e;var p=r(857),u=r(83);function d(e={}){const t={};return(0,u.R)(e,{selector:""}).forEach((e=>{t[e.key]=e.value})),t}function g(e,t){return e&&t?`has-${(0,p.o)(t)}-${e}`:""}const y=e=>{const t=(e=>{const t=m(e)?e:{style:{}};let r=t.style;return i(r)&&(r=JSON.parse(r)||{}),m(r)||(r={}),{...t,style:r}})(e),r=function(e){const{backgroundColor:t,textColor:r,gradient:n,style:o}=e,c=g("background-color",t),l=g("color",r),s=function(e){if(e)return`has-${e}-gradient-background`}(n),i=s||o?.color?.gradient;return{className:a()(l,s,{[c]:!i&&!!c,"has-text-color":r||o?.color?.text,"has-background":t||o?.color?.background||n||o?.color?.gradient,"has-link-color":m(o?.elements?.link)?o?.elements?.link?.color:void 0}),style:d({color:o?.color||{}})}}(t),n=function(e){const t=e.style?.border||{};return{className:function(e){const{borderColor:t,style:r}=e,n=t?g("border-color",t):"";return a()({"has-border-color":!!t||!!r?.border?.color,[n]:!!n})}(e),style:d({border:t})}}(t),o=function(e){return{className:void 0,style:d({spacing:e.style?.spacing||{}})}}(t),c=(e=>{const t=m(e.style.typography)?e.style.typography:{},r=i(t.fontFamily)?t.fontFamily:"";return{className:e.fontFamily?`has-${e.fontFamily}-font-family`:r,style:{fontSize:e.fontSize?`var(--wp--preset--font-size--${e.fontSize})`:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight,letterSpacing:t.letterSpacing,lineHeight:t.lineHeight,textDecoration:t.textDecoration,textTransform:t.textTransform}}})(t);return{className:a()(c.className,r.className,n.className,o.className),style:{...c.style,...r.style,...n.style,...o.style}}};var _=r(333);const f=e=>({thousandSeparator:e?.thousandSeparator,decimalSeparator:e?.decimalSeparator,fixedDecimalScale:!0,prefix:e?.prefix,suffix:e?.suffix,isNumericString:!0});var w=({className:e,value:t,currency:r,onValueChange:o,displayType:c="text",...l})=>{var s;const m="string"==typeof t?parseInt(t,10):t;if(!Number.isFinite(m))return null;const i=m/10**r.minorUnit;if(!Number.isFinite(i))return null;const p=a()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",e),u=null!==(s=l.decimalScale)&&void 0!==s?s:r?.minorUnit,d={...l,...f(r),decimalScale:u,value:void 0,currency:void 0,onValueChange:void 0},g=o?e=>{const t=+e.value*10**r.minorUnit;o(t)}:()=>{};return(0,n.createElement)(_.Z,{className:p,displayType:c,...d,value:i,onValueChange:g})},v=r(307),b=({align:e,className:t,labelType:r,formattedLabel:o,labelClassName:c,labelStyle:l,style:s})=>{const m=a()(t,"wc-gzd-block-components-product-"+r,"wc-gzd-block-components-product-price-label",{[`wc-gzd-block-components-product-price-label--align-${e}`]:e});let i=(0,n.createElement)("span",{className:a()("wc-gzd-block-components-product-"+r+"__value",c)});return o&&(i=(0,v.isValidElement)(o)?(0,n.createElement)("span",{className:a()("wc-gzd-block-components-product-"+r+"__value",c),style:l},o):(0,n.createElement)("span",{className:a()("wc-gzd-block-components-product-"+r+"__value",c),style:l,dangerouslySetInnerHTML:{__html:o}})),(0,n.createElement)("span",{className:m,style:s},i)},h=e=>{const{className:t,textAlign:r,isDescendentOfSingleProductTemplate:o,labelType:m}=e,{parentName:i,parentClassName:p}=(0,l.useInnerBlockLayoutContext)(),{product:u}=(0,l.useProductDataContext)(),d=y(e),g="woocommerce/all-products"===i,_=a()("wc-gzd-block-components-product-"+m,t,d.className,{[`${p}__product-${m}`]:p});if(!u.id&&!o){const e=(0,n.createElement)(b,{align:r,className:_,labelType:m});if(g){const t=`wp-block-woocommerce-gzd-product-${m}`;return(0,n.createElement)("div",{className:t},e)}return e}const f=((e,t,r)=>{const o=t.hasOwnProperty("extensions")?t.extensions["woocommerce-germanized"]:{unit_price_html:"",unit_prices:{price:0,regular_price:0,sale_price:0},unit_product:0,unit_product_html:"",delivery_time_html:"",tax_info_html:"",shipping_costs_info_html:"",defect_description_html:"",nutri_score:"",nutri_score_html:"",deposit_html:"",deposit_prices:{price:0,quantity:0,amount:0},deposit_packaging_type_html:"",manufacturer_html:"",product_safety_attachments_html:""},a=t.prices,l=r?(0,c.getCurrencyFromPriceResponse)():(0,c.getCurrencyFromPriceResponse)(a),m=e.replace(/-/g,"_"),i=o.hasOwnProperty(m+"_html")?o[m+"_html"]:"";let p="";return"unit_price"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)(w,{currency:l,value:1e3})," / ",(0,n.createElement)("span",{className:"unit"},(0,s._x)("kg","unit","woocommerce-germanized"))):"delivery_time"===m?p=(0,s._x)("Delivery time: 2-3 days","preview","woocommerce-germanized"):"tax_info"===m?p=(0,s._x)("incl. 19 % VAT","preview","woocommerce-germanized"):"shipping_costs_info"===m?p=(0,s._x)("plus shipping costs","preview","woocommerce-germanized"):"unit_product"===m?p=(0,s.sprintf)((0,s._x)("Product includes: %1$s kg","preview","woocommerce-germanized"),10):"defect_description"===m?p=(0,s._x)("This product has a serious defect.","preview","woocommerce-germanized"):"deposit"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("span",{className:"additional"},(0,s._x)("Plus","preview","woocommerce-germanized"))," ",(0,n.createElement)(w,{currency:l,value:40})," ",(0,n.createElement)("span",{className:"deposit-notice"},(0,s._x)("deposit","preview","woocommerce-germanized"))):"deposit_packaging_type"===m?p=(0,s._x)("Disposable","preview","woocommerce-germanized"):"nutri_score"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("span",{className:"wc-gzd-nutri-score-value wc-gzd-nutri-score-value-a"},"A")):"manufacturer"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("p",null,(0,n.createElement)("stong",null,(0,s._x)("Sample company name","preview","woocommerce-germanized")),(0,n.createElement)("br",null),(0,s._x)("Sample address","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("12345 Berlin","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("sample@sample.com","preview","woocommerce-germanized")),(0,n.createElement)("h3",null,(0,s.__)("Person responsible for the EU","woocommerce-germanized")),(0,n.createElement)("p",null,(0,n.createElement)("stong",null,(0,s._x)("Sample company name","preview","woocommerce-germanized")),(0,n.createElement)("br",null),(0,s._x)("Sample address","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("12345 Berlin","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("sample@sample.com","preview","woocommerce-germanized"))):"product_safety_attachments"===m&&(p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("ul",null,(0,n.createElement)("li",null,(0,n.createElement)("a",{href:"#"},(0,s._x)("sample-filename.pdf","sample","woocommerce-germanized")))))),{preview:p,data:i}})(m,u,o),v=(0,n.createElement)(b,{align:r,className:_,labelType:m,style:d.style,labelStyle:d.style,formattedLabel:o?f.preview:f.data});if(g){const e=`wp-block-woocommerce-gzd-product-${m}`;return(0,n.createElement)("div",{className:e},v)}return v}}}]); \ No newline at end of file diff --git a/build/product-delivery-time.css b/build/product-delivery-time.css new file mode 100644 index 000000000..1114283cc --- /dev/null +++ b/build/product-delivery-time.css @@ -0,0 +1 @@ +.wc-gzd-block-components-product-price-label{display:block}.wc-gzd-block-components-product-price-label.wc-gzd-block-components-product-price-label--align-center{text-align:center}.wc-gzd-block-components-product-price-label.wc-gzd-block-components-product-price-label--align-right{text-align:right}.wc-gzd-block-components-product-deposit-packaging-type{text-transform:uppercase}.wc-gzd-block-components-product-nutri-score .wc-gzd-nutri-score-value{height:4rem;width:7.0625rem;display:block;text-indent:-9999px} diff --git a/build/product-deposit-frontend.js b/build/product-deposit-frontend.js new file mode 100644 index 000000000..c317bdbdd --- /dev/null +++ b/build/product-deposit-frontend.js @@ -0,0 +1 @@ +"use strict";(self.webpackWcBlocksJsonp=self.webpackWcBlocksJsonp||[]).push([[412],{621:function(e,t,r){r.r(t),r.d(t,{default:function(){return c}});var n=r(196),o=r(721),a=r(606),c=e=>(e={...e,labelType:"deposit"}).isDescendentOfSingleProductTemplate?(0,n.createElement)(a.Z,{...e}):(0,o.withProductDataContext)(a.Z)(e)},606:function(e,t,r){r.d(t,{Z:function(){return h}});var n=r(196),o=r(184),a=r.n(o),c=r(293),l=r(864),s=r(736);const m=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object,i=e=>"string"==typeof e;var p=r(857),u=r(83);function d(e={}){const t={};return(0,u.R)(e,{selector:""}).forEach((e=>{t[e.key]=e.value})),t}function g(e,t){return e&&t?`has-${(0,p.o)(t)}-${e}`:""}const _=e=>{const t=(e=>{const t=m(e)?e:{style:{}};let r=t.style;return i(r)&&(r=JSON.parse(r)||{}),m(r)||(r={}),{...t,style:r}})(e),r=function(e){const{backgroundColor:t,textColor:r,gradient:n,style:o}=e,c=g("background-color",t),l=g("color",r),s=function(e){if(e)return`has-${e}-gradient-background`}(n),i=s||o?.color?.gradient;return{className:a()(l,s,{[c]:!i&&!!c,"has-text-color":r||o?.color?.text,"has-background":t||o?.color?.background||n||o?.color?.gradient,"has-link-color":m(o?.elements?.link)?o?.elements?.link?.color:void 0}),style:d({color:o?.color||{}})}}(t),n=function(e){const t=e.style?.border||{};return{className:function(e){const{borderColor:t,style:r}=e,n=t?g("border-color",t):"";return a()({"has-border-color":!!t||!!r?.border?.color,[n]:!!n})}(e),style:d({border:t})}}(t),o=function(e){return{className:void 0,style:d({spacing:e.style?.spacing||{}})}}(t),c=(e=>{const t=m(e.style.typography)?e.style.typography:{},r=i(t.fontFamily)?t.fontFamily:"";return{className:e.fontFamily?`has-${e.fontFamily}-font-family`:r,style:{fontSize:e.fontSize?`var(--wp--preset--font-size--${e.fontSize})`:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight,letterSpacing:t.letterSpacing,lineHeight:t.lineHeight,textDecoration:t.textDecoration,textTransform:t.textTransform}}})(t);return{className:a()(c.className,r.className,n.className,o.className),style:{...c.style,...r.style,...n.style,...o.style}}};var y=r(333);const f=e=>({thousandSeparator:e?.thousandSeparator,decimalSeparator:e?.decimalSeparator,fixedDecimalScale:!0,prefix:e?.prefix,suffix:e?.suffix,isNumericString:!0});var w=({className:e,value:t,currency:r,onValueChange:o,displayType:c="text",...l})=>{var s;const m="string"==typeof t?parseInt(t,10):t;if(!Number.isFinite(m))return null;const i=m/10**r.minorUnit;if(!Number.isFinite(i))return null;const p=a()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",e),u=null!==(s=l.decimalScale)&&void 0!==s?s:r?.minorUnit,d={...l,...f(r),decimalScale:u,value:void 0,currency:void 0,onValueChange:void 0},g=o?e=>{const t=+e.value*10**r.minorUnit;o(t)}:()=>{};return(0,n.createElement)(y.Z,{className:p,displayType:c,...d,value:i,onValueChange:g})},b=r(307),v=({align:e,className:t,labelType:r,formattedLabel:o,labelClassName:c,labelStyle:l,style:s})=>{const m=a()(t,"wc-gzd-block-components-product-"+r,"wc-gzd-block-components-product-price-label",{[`wc-gzd-block-components-product-price-label--align-${e}`]:e});let i=(0,n.createElement)("span",{className:a()("wc-gzd-block-components-product-"+r+"__value",c)});return o&&(i=(0,b.isValidElement)(o)?(0,n.createElement)("span",{className:a()("wc-gzd-block-components-product-"+r+"__value",c),style:l},o):(0,n.createElement)("span",{className:a()("wc-gzd-block-components-product-"+r+"__value",c),style:l,dangerouslySetInnerHTML:{__html:o}})),(0,n.createElement)("span",{className:m,style:s},i)},h=e=>{const{className:t,textAlign:r,isDescendentOfSingleProductTemplate:o,labelType:m}=e,{parentName:i,parentClassName:p}=(0,l.useInnerBlockLayoutContext)(),{product:u}=(0,l.useProductDataContext)(),d=_(e),g="woocommerce/all-products"===i,y=a()("wc-gzd-block-components-product-"+m,t,d.className,{[`${p}__product-${m}`]:p});if(!u.id&&!o){const e=(0,n.createElement)(v,{align:r,className:y,labelType:m});if(g){const t=`wp-block-woocommerce-gzd-product-${m}`;return(0,n.createElement)("div",{className:t},e)}return e}const f=((e,t,r)=>{const o=t.hasOwnProperty("extensions")?t.extensions["woocommerce-germanized"]:{unit_price_html:"",unit_prices:{price:0,regular_price:0,sale_price:0},unit_product:0,unit_product_html:"",delivery_time_html:"",tax_info_html:"",shipping_costs_info_html:"",defect_description_html:"",nutri_score:"",nutri_score_html:"",deposit_html:"",deposit_prices:{price:0,quantity:0,amount:0},deposit_packaging_type_html:"",manufacturer_html:"",product_safety_attachments_html:""},a=t.prices,l=r?(0,c.getCurrencyFromPriceResponse)():(0,c.getCurrencyFromPriceResponse)(a),m=e.replace(/-/g,"_"),i=o.hasOwnProperty(m+"_html")?o[m+"_html"]:"";let p="";return"unit_price"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)(w,{currency:l,value:1e3})," / ",(0,n.createElement)("span",{className:"unit"},(0,s._x)("kg","unit","woocommerce-germanized"))):"delivery_time"===m?p=(0,s._x)("Delivery time: 2-3 days","preview","woocommerce-germanized"):"tax_info"===m?p=(0,s._x)("incl. 19 % VAT","preview","woocommerce-germanized"):"shipping_costs_info"===m?p=(0,s._x)("plus shipping costs","preview","woocommerce-germanized"):"unit_product"===m?p=(0,s.sprintf)((0,s._x)("Product includes: %1$s kg","preview","woocommerce-germanized"),10):"defect_description"===m?p=(0,s._x)("This product has a serious defect.","preview","woocommerce-germanized"):"deposit"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("span",{className:"additional"},(0,s._x)("Plus","preview","woocommerce-germanized"))," ",(0,n.createElement)(w,{currency:l,value:40})," ",(0,n.createElement)("span",{className:"deposit-notice"},(0,s._x)("deposit","preview","woocommerce-germanized"))):"deposit_packaging_type"===m?p=(0,s._x)("Disposable","preview","woocommerce-germanized"):"nutri_score"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("span",{className:"wc-gzd-nutri-score-value wc-gzd-nutri-score-value-a"},"A")):"manufacturer"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("p",null,(0,n.createElement)("stong",null,(0,s._x)("Sample company name","preview","woocommerce-germanized")),(0,n.createElement)("br",null),(0,s._x)("Sample address","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("12345 Berlin","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("sample@sample.com","preview","woocommerce-germanized")),(0,n.createElement)("h3",null,(0,s.__)("Person responsible for the EU","woocommerce-germanized")),(0,n.createElement)("p",null,(0,n.createElement)("stong",null,(0,s._x)("Sample company name","preview","woocommerce-germanized")),(0,n.createElement)("br",null),(0,s._x)("Sample address","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("12345 Berlin","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("sample@sample.com","preview","woocommerce-germanized"))):"product_safety_attachments"===m&&(p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("ul",null,(0,n.createElement)("li",null,(0,n.createElement)("a",{href:"#"},(0,s._x)("sample-filename.pdf","sample","woocommerce-germanized")))))),{preview:p,data:i}})(m,u,o),b=(0,n.createElement)(v,{align:r,className:y,labelType:m,style:d.style,labelStyle:d.style,formattedLabel:o?f.preview:f.data});if(g){const e=`wp-block-woocommerce-gzd-product-${m}`;return(0,n.createElement)("div",{className:e},b)}return b}}}]); \ No newline at end of file diff --git a/build/product-deposit-packaging-type-frontend.js b/build/product-deposit-packaging-type-frontend.js new file mode 100644 index 000000000..722a833e9 --- /dev/null +++ b/build/product-deposit-packaging-type-frontend.js @@ -0,0 +1 @@ +"use strict";(self.webpackWcBlocksJsonp=self.webpackWcBlocksJsonp||[]).push([[534],{775:function(e,t,r){r.r(t),r.d(t,{default:function(){return c}});var n=r(196),o=r(721),a=r(606),c=e=>(e={...e,labelType:"deposit-packaging-type"}).isDescendentOfSingleProductTemplate?(0,n.createElement)(a.Z,{...e}):(0,o.withProductDataContext)(a.Z)(e)},606:function(e,t,r){r.d(t,{Z:function(){return h}});var n=r(196),o=r(184),a=r.n(o),c=r(293),l=r(864),s=r(736);const m=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object,i=e=>"string"==typeof e;var p=r(857),u=r(83);function d(e={}){const t={};return(0,u.R)(e,{selector:""}).forEach((e=>{t[e.key]=e.value})),t}function g(e,t){return e&&t?`has-${(0,p.o)(t)}-${e}`:""}const y=e=>{const t=(e=>{const t=m(e)?e:{style:{}};let r=t.style;return i(r)&&(r=JSON.parse(r)||{}),m(r)||(r={}),{...t,style:r}})(e),r=function(e){const{backgroundColor:t,textColor:r,gradient:n,style:o}=e,c=g("background-color",t),l=g("color",r),s=function(e){if(e)return`has-${e}-gradient-background`}(n),i=s||o?.color?.gradient;return{className:a()(l,s,{[c]:!i&&!!c,"has-text-color":r||o?.color?.text,"has-background":t||o?.color?.background||n||o?.color?.gradient,"has-link-color":m(o?.elements?.link)?o?.elements?.link?.color:void 0}),style:d({color:o?.color||{}})}}(t),n=function(e){const t=e.style?.border||{};return{className:function(e){const{borderColor:t,style:r}=e,n=t?g("border-color",t):"";return a()({"has-border-color":!!t||!!r?.border?.color,[n]:!!n})}(e),style:d({border:t})}}(t),o=function(e){return{className:void 0,style:d({spacing:e.style?.spacing||{}})}}(t),c=(e=>{const t=m(e.style.typography)?e.style.typography:{},r=i(t.fontFamily)?t.fontFamily:"";return{className:e.fontFamily?`has-${e.fontFamily}-font-family`:r,style:{fontSize:e.fontSize?`var(--wp--preset--font-size--${e.fontSize})`:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight,letterSpacing:t.letterSpacing,lineHeight:t.lineHeight,textDecoration:t.textDecoration,textTransform:t.textTransform}}})(t);return{className:a()(c.className,r.className,n.className,o.className),style:{...c.style,...r.style,...n.style,...o.style}}};var _=r(333);const f=e=>({thousandSeparator:e?.thousandSeparator,decimalSeparator:e?.decimalSeparator,fixedDecimalScale:!0,prefix:e?.prefix,suffix:e?.suffix,isNumericString:!0});var w=({className:e,value:t,currency:r,onValueChange:o,displayType:c="text",...l})=>{var s;const m="string"==typeof t?parseInt(t,10):t;if(!Number.isFinite(m))return null;const i=m/10**r.minorUnit;if(!Number.isFinite(i))return null;const p=a()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",e),u=null!==(s=l.decimalScale)&&void 0!==s?s:r?.minorUnit,d={...l,...f(r),decimalScale:u,value:void 0,currency:void 0,onValueChange:void 0},g=o?e=>{const t=+e.value*10**r.minorUnit;o(t)}:()=>{};return(0,n.createElement)(_.Z,{className:p,displayType:c,...d,value:i,onValueChange:g})},b=r(307),v=({align:e,className:t,labelType:r,formattedLabel:o,labelClassName:c,labelStyle:l,style:s})=>{const m=a()(t,"wc-gzd-block-components-product-"+r,"wc-gzd-block-components-product-price-label",{[`wc-gzd-block-components-product-price-label--align-${e}`]:e});let i=(0,n.createElement)("span",{className:a()("wc-gzd-block-components-product-"+r+"__value",c)});return o&&(i=(0,b.isValidElement)(o)?(0,n.createElement)("span",{className:a()("wc-gzd-block-components-product-"+r+"__value",c),style:l},o):(0,n.createElement)("span",{className:a()("wc-gzd-block-components-product-"+r+"__value",c),style:l,dangerouslySetInnerHTML:{__html:o}})),(0,n.createElement)("span",{className:m,style:s},i)},h=e=>{const{className:t,textAlign:r,isDescendentOfSingleProductTemplate:o,labelType:m}=e,{parentName:i,parentClassName:p}=(0,l.useInnerBlockLayoutContext)(),{product:u}=(0,l.useProductDataContext)(),d=y(e),g="woocommerce/all-products"===i,_=a()("wc-gzd-block-components-product-"+m,t,d.className,{[`${p}__product-${m}`]:p});if(!u.id&&!o){const e=(0,n.createElement)(v,{align:r,className:_,labelType:m});if(g){const t=`wp-block-woocommerce-gzd-product-${m}`;return(0,n.createElement)("div",{className:t},e)}return e}const f=((e,t,r)=>{const o=t.hasOwnProperty("extensions")?t.extensions["woocommerce-germanized"]:{unit_price_html:"",unit_prices:{price:0,regular_price:0,sale_price:0},unit_product:0,unit_product_html:"",delivery_time_html:"",tax_info_html:"",shipping_costs_info_html:"",defect_description_html:"",nutri_score:"",nutri_score_html:"",deposit_html:"",deposit_prices:{price:0,quantity:0,amount:0},deposit_packaging_type_html:"",manufacturer_html:"",product_safety_attachments_html:""},a=t.prices,l=r?(0,c.getCurrencyFromPriceResponse)():(0,c.getCurrencyFromPriceResponse)(a),m=e.replace(/-/g,"_"),i=o.hasOwnProperty(m+"_html")?o[m+"_html"]:"";let p="";return"unit_price"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)(w,{currency:l,value:1e3})," / ",(0,n.createElement)("span",{className:"unit"},(0,s._x)("kg","unit","woocommerce-germanized"))):"delivery_time"===m?p=(0,s._x)("Delivery time: 2-3 days","preview","woocommerce-germanized"):"tax_info"===m?p=(0,s._x)("incl. 19 % VAT","preview","woocommerce-germanized"):"shipping_costs_info"===m?p=(0,s._x)("plus shipping costs","preview","woocommerce-germanized"):"unit_product"===m?p=(0,s.sprintf)((0,s._x)("Product includes: %1$s kg","preview","woocommerce-germanized"),10):"defect_description"===m?p=(0,s._x)("This product has a serious defect.","preview","woocommerce-germanized"):"deposit"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("span",{className:"additional"},(0,s._x)("Plus","preview","woocommerce-germanized"))," ",(0,n.createElement)(w,{currency:l,value:40})," ",(0,n.createElement)("span",{className:"deposit-notice"},(0,s._x)("deposit","preview","woocommerce-germanized"))):"deposit_packaging_type"===m?p=(0,s._x)("Disposable","preview","woocommerce-germanized"):"nutri_score"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("span",{className:"wc-gzd-nutri-score-value wc-gzd-nutri-score-value-a"},"A")):"manufacturer"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("p",null,(0,n.createElement)("stong",null,(0,s._x)("Sample company name","preview","woocommerce-germanized")),(0,n.createElement)("br",null),(0,s._x)("Sample address","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("12345 Berlin","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("sample@sample.com","preview","woocommerce-germanized")),(0,n.createElement)("h3",null,(0,s.__)("Person responsible for the EU","woocommerce-germanized")),(0,n.createElement)("p",null,(0,n.createElement)("stong",null,(0,s._x)("Sample company name","preview","woocommerce-germanized")),(0,n.createElement)("br",null),(0,s._x)("Sample address","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("12345 Berlin","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("sample@sample.com","preview","woocommerce-germanized"))):"product_safety_attachments"===m&&(p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("ul",null,(0,n.createElement)("li",null,(0,n.createElement)("a",{href:"#"},(0,s._x)("sample-filename.pdf","sample","woocommerce-germanized")))))),{preview:p,data:i}})(m,u,o),b=(0,n.createElement)(v,{align:r,className:_,labelType:m,style:d.style,labelStyle:d.style,formattedLabel:o?f.preview:f.data});if(g){const e=`wp-block-woocommerce-gzd-product-${m}`;return(0,n.createElement)("div",{className:e},b)}return b}}}]); \ No newline at end of file diff --git a/build/product-deposit-packaging-type.css b/build/product-deposit-packaging-type.css new file mode 100644 index 000000000..1114283cc --- /dev/null +++ b/build/product-deposit-packaging-type.css @@ -0,0 +1 @@ +.wc-gzd-block-components-product-price-label{display:block}.wc-gzd-block-components-product-price-label.wc-gzd-block-components-product-price-label--align-center{text-align:center}.wc-gzd-block-components-product-price-label.wc-gzd-block-components-product-price-label--align-right{text-align:right}.wc-gzd-block-components-product-deposit-packaging-type{text-transform:uppercase}.wc-gzd-block-components-product-nutri-score .wc-gzd-nutri-score-value{height:4rem;width:7.0625rem;display:block;text-indent:-9999px} diff --git a/build/product-deposit.css b/build/product-deposit.css new file mode 100644 index 000000000..1114283cc --- /dev/null +++ b/build/product-deposit.css @@ -0,0 +1 @@ +.wc-gzd-block-components-product-price-label{display:block}.wc-gzd-block-components-product-price-label.wc-gzd-block-components-product-price-label--align-center{text-align:center}.wc-gzd-block-components-product-price-label.wc-gzd-block-components-product-price-label--align-right{text-align:right}.wc-gzd-block-components-product-deposit-packaging-type{text-transform:uppercase}.wc-gzd-block-components-product-nutri-score .wc-gzd-nutri-score-value{height:4rem;width:7.0625rem;display:block;text-indent:-9999px} diff --git a/build/product-nutri-score-frontend.js b/build/product-nutri-score-frontend.js new file mode 100644 index 000000000..96aa42b60 --- /dev/null +++ b/build/product-nutri-score-frontend.js @@ -0,0 +1 @@ +"use strict";(self.webpackWcBlocksJsonp=self.webpackWcBlocksJsonp||[]).push([[128],{744:function(e,t,r){r.r(t),r.d(t,{default:function(){return c}});var n=r(196),o=r(721),a=r(606),c=e=>(e={...e,labelType:"nutri-score"}).isDescendentOfSingleProductTemplate?(0,n.createElement)(a.Z,{...e}):(0,o.withProductDataContext)(a.Z)(e)},606:function(e,t,r){r.d(t,{Z:function(){return h}});var n=r(196),o=r(184),a=r.n(o),c=r(293),l=r(864),s=r(736);const m=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object,i=e=>"string"==typeof e;var p=r(857),u=r(83);function d(e={}){const t={};return(0,u.R)(e,{selector:""}).forEach((e=>{t[e.key]=e.value})),t}function g(e,t){return e&&t?`has-${(0,p.o)(t)}-${e}`:""}const _=e=>{const t=(e=>{const t=m(e)?e:{style:{}};let r=t.style;return i(r)&&(r=JSON.parse(r)||{}),m(r)||(r={}),{...t,style:r}})(e),r=function(e){const{backgroundColor:t,textColor:r,gradient:n,style:o}=e,c=g("background-color",t),l=g("color",r),s=function(e){if(e)return`has-${e}-gradient-background`}(n),i=s||o?.color?.gradient;return{className:a()(l,s,{[c]:!i&&!!c,"has-text-color":r||o?.color?.text,"has-background":t||o?.color?.background||n||o?.color?.gradient,"has-link-color":m(o?.elements?.link)?o?.elements?.link?.color:void 0}),style:d({color:o?.color||{}})}}(t),n=function(e){const t=e.style?.border||{};return{className:function(e){const{borderColor:t,style:r}=e,n=t?g("border-color",t):"";return a()({"has-border-color":!!t||!!r?.border?.color,[n]:!!n})}(e),style:d({border:t})}}(t),o=function(e){return{className:void 0,style:d({spacing:e.style?.spacing||{}})}}(t),c=(e=>{const t=m(e.style.typography)?e.style.typography:{},r=i(t.fontFamily)?t.fontFamily:"";return{className:e.fontFamily?`has-${e.fontFamily}-font-family`:r,style:{fontSize:e.fontSize?`var(--wp--preset--font-size--${e.fontSize})`:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight,letterSpacing:t.letterSpacing,lineHeight:t.lineHeight,textDecoration:t.textDecoration,textTransform:t.textTransform}}})(t);return{className:a()(c.className,r.className,n.className,o.className),style:{...c.style,...r.style,...n.style,...o.style}}};var y=r(333);const f=e=>({thousandSeparator:e?.thousandSeparator,decimalSeparator:e?.decimalSeparator,fixedDecimalScale:!0,prefix:e?.prefix,suffix:e?.suffix,isNumericString:!0});var w=({className:e,value:t,currency:r,onValueChange:o,displayType:c="text",...l})=>{var s;const m="string"==typeof t?parseInt(t,10):t;if(!Number.isFinite(m))return null;const i=m/10**r.minorUnit;if(!Number.isFinite(i))return null;const p=a()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",e),u=null!==(s=l.decimalScale)&&void 0!==s?s:r?.minorUnit,d={...l,...f(r),decimalScale:u,value:void 0,currency:void 0,onValueChange:void 0},g=o?e=>{const t=+e.value*10**r.minorUnit;o(t)}:()=>{};return(0,n.createElement)(y.Z,{className:p,displayType:c,...d,value:i,onValueChange:g})},b=r(307),v=({align:e,className:t,labelType:r,formattedLabel:o,labelClassName:c,labelStyle:l,style:s})=>{const m=a()(t,"wc-gzd-block-components-product-"+r,"wc-gzd-block-components-product-price-label",{[`wc-gzd-block-components-product-price-label--align-${e}`]:e});let i=(0,n.createElement)("span",{className:a()("wc-gzd-block-components-product-"+r+"__value",c)});return o&&(i=(0,b.isValidElement)(o)?(0,n.createElement)("span",{className:a()("wc-gzd-block-components-product-"+r+"__value",c),style:l},o):(0,n.createElement)("span",{className:a()("wc-gzd-block-components-product-"+r+"__value",c),style:l,dangerouslySetInnerHTML:{__html:o}})),(0,n.createElement)("span",{className:m,style:s},i)},h=e=>{const{className:t,textAlign:r,isDescendentOfSingleProductTemplate:o,labelType:m}=e,{parentName:i,parentClassName:p}=(0,l.useInnerBlockLayoutContext)(),{product:u}=(0,l.useProductDataContext)(),d=_(e),g="woocommerce/all-products"===i,y=a()("wc-gzd-block-components-product-"+m,t,d.className,{[`${p}__product-${m}`]:p});if(!u.id&&!o){const e=(0,n.createElement)(v,{align:r,className:y,labelType:m});if(g){const t=`wp-block-woocommerce-gzd-product-${m}`;return(0,n.createElement)("div",{className:t},e)}return e}const f=((e,t,r)=>{const o=t.hasOwnProperty("extensions")?t.extensions["woocommerce-germanized"]:{unit_price_html:"",unit_prices:{price:0,regular_price:0,sale_price:0},unit_product:0,unit_product_html:"",delivery_time_html:"",tax_info_html:"",shipping_costs_info_html:"",defect_description_html:"",nutri_score:"",nutri_score_html:"",deposit_html:"",deposit_prices:{price:0,quantity:0,amount:0},deposit_packaging_type_html:"",manufacturer_html:"",product_safety_attachments_html:""},a=t.prices,l=r?(0,c.getCurrencyFromPriceResponse)():(0,c.getCurrencyFromPriceResponse)(a),m=e.replace(/-/g,"_"),i=o.hasOwnProperty(m+"_html")?o[m+"_html"]:"";let p="";return"unit_price"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)(w,{currency:l,value:1e3})," / ",(0,n.createElement)("span",{className:"unit"},(0,s._x)("kg","unit","woocommerce-germanized"))):"delivery_time"===m?p=(0,s._x)("Delivery time: 2-3 days","preview","woocommerce-germanized"):"tax_info"===m?p=(0,s._x)("incl. 19 % VAT","preview","woocommerce-germanized"):"shipping_costs_info"===m?p=(0,s._x)("plus shipping costs","preview","woocommerce-germanized"):"unit_product"===m?p=(0,s.sprintf)((0,s._x)("Product includes: %1$s kg","preview","woocommerce-germanized"),10):"defect_description"===m?p=(0,s._x)("This product has a serious defect.","preview","woocommerce-germanized"):"deposit"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("span",{className:"additional"},(0,s._x)("Plus","preview","woocommerce-germanized"))," ",(0,n.createElement)(w,{currency:l,value:40})," ",(0,n.createElement)("span",{className:"deposit-notice"},(0,s._x)("deposit","preview","woocommerce-germanized"))):"deposit_packaging_type"===m?p=(0,s._x)("Disposable","preview","woocommerce-germanized"):"nutri_score"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("span",{className:"wc-gzd-nutri-score-value wc-gzd-nutri-score-value-a"},"A")):"manufacturer"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("p",null,(0,n.createElement)("stong",null,(0,s._x)("Sample company name","preview","woocommerce-germanized")),(0,n.createElement)("br",null),(0,s._x)("Sample address","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("12345 Berlin","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("sample@sample.com","preview","woocommerce-germanized")),(0,n.createElement)("h3",null,(0,s.__)("Person responsible for the EU","woocommerce-germanized")),(0,n.createElement)("p",null,(0,n.createElement)("stong",null,(0,s._x)("Sample company name","preview","woocommerce-germanized")),(0,n.createElement)("br",null),(0,s._x)("Sample address","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("12345 Berlin","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("sample@sample.com","preview","woocommerce-germanized"))):"product_safety_attachments"===m&&(p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("ul",null,(0,n.createElement)("li",null,(0,n.createElement)("a",{href:"#"},(0,s._x)("sample-filename.pdf","sample","woocommerce-germanized")))))),{preview:p,data:i}})(m,u,o),b=(0,n.createElement)(v,{align:r,className:y,labelType:m,style:d.style,labelStyle:d.style,formattedLabel:o?f.preview:f.data});if(g){const e=`wp-block-woocommerce-gzd-product-${m}`;return(0,n.createElement)("div",{className:e},b)}return b}}}]); \ No newline at end of file diff --git a/build/product-nutri-score.css b/build/product-nutri-score.css new file mode 100644 index 000000000..1114283cc --- /dev/null +++ b/build/product-nutri-score.css @@ -0,0 +1 @@ +.wc-gzd-block-components-product-price-label{display:block}.wc-gzd-block-components-product-price-label.wc-gzd-block-components-product-price-label--align-center{text-align:center}.wc-gzd-block-components-product-price-label.wc-gzd-block-components-product-price-label--align-right{text-align:right}.wc-gzd-block-components-product-deposit-packaging-type{text-transform:uppercase}.wc-gzd-block-components-product-nutri-score .wc-gzd-nutri-score-value{height:4rem;width:7.0625rem;display:block;text-indent:-9999px} diff --git a/build/product-shipping-costs-info-frontend.js b/build/product-shipping-costs-info-frontend.js new file mode 100644 index 000000000..ab0f975c2 --- /dev/null +++ b/build/product-shipping-costs-info-frontend.js @@ -0,0 +1 @@ +"use strict";(self.webpackWcBlocksJsonp=self.webpackWcBlocksJsonp||[]).push([[648],{606:function(e,t,r){r.d(t,{Z:function(){return v}});var n=r(196),o=r(184),a=r.n(o),c=r(293),l=r(864),s=r(736);const m=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object,i=e=>"string"==typeof e;var p=r(857),u=r(83);function d(e={}){const t={};return(0,u.R)(e,{selector:""}).forEach((e=>{t[e.key]=e.value})),t}function g(e,t){return e&&t?`has-${(0,p.o)(t)}-${e}`:""}const _=e=>{const t=(e=>{const t=m(e)?e:{style:{}};let r=t.style;return i(r)&&(r=JSON.parse(r)||{}),m(r)||(r={}),{...t,style:r}})(e),r=function(e){const{backgroundColor:t,textColor:r,gradient:n,style:o}=e,c=g("background-color",t),l=g("color",r),s=function(e){if(e)return`has-${e}-gradient-background`}(n),i=s||o?.color?.gradient;return{className:a()(l,s,{[c]:!i&&!!c,"has-text-color":r||o?.color?.text,"has-background":t||o?.color?.background||n||o?.color?.gradient,"has-link-color":m(o?.elements?.link)?o?.elements?.link?.color:void 0}),style:d({color:o?.color||{}})}}(t),n=function(e){const t=e.style?.border||{};return{className:function(e){const{borderColor:t,style:r}=e,n=t?g("border-color",t):"";return a()({"has-border-color":!!t||!!r?.border?.color,[n]:!!n})}(e),style:d({border:t})}}(t),o=function(e){return{className:void 0,style:d({spacing:e.style?.spacing||{}})}}(t),c=(e=>{const t=m(e.style.typography)?e.style.typography:{},r=i(t.fontFamily)?t.fontFamily:"";return{className:e.fontFamily?`has-${e.fontFamily}-font-family`:r,style:{fontSize:e.fontSize?`var(--wp--preset--font-size--${e.fontSize})`:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight,letterSpacing:t.letterSpacing,lineHeight:t.lineHeight,textDecoration:t.textDecoration,textTransform:t.textTransform}}})(t);return{className:a()(c.className,r.className,n.className,o.className),style:{...c.style,...r.style,...n.style,...o.style}}};var y=r(333);const f=e=>({thousandSeparator:e?.thousandSeparator,decimalSeparator:e?.decimalSeparator,fixedDecimalScale:!0,prefix:e?.prefix,suffix:e?.suffix,isNumericString:!0});var w=({className:e,value:t,currency:r,onValueChange:o,displayType:c="text",...l})=>{var s;const m="string"==typeof t?parseInt(t,10):t;if(!Number.isFinite(m))return null;const i=m/10**r.minorUnit;if(!Number.isFinite(i))return null;const p=a()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",e),u=null!==(s=l.decimalScale)&&void 0!==s?s:r?.minorUnit,d={...l,...f(r),decimalScale:u,value:void 0,currency:void 0,onValueChange:void 0},g=o?e=>{const t=+e.value*10**r.minorUnit;o(t)}:()=>{};return(0,n.createElement)(y.Z,{className:p,displayType:c,...d,value:i,onValueChange:g})},b=r(307),h=({align:e,className:t,labelType:r,formattedLabel:o,labelClassName:c,labelStyle:l,style:s})=>{const m=a()(t,"wc-gzd-block-components-product-"+r,"wc-gzd-block-components-product-price-label",{[`wc-gzd-block-components-product-price-label--align-${e}`]:e});let i=(0,n.createElement)("span",{className:a()("wc-gzd-block-components-product-"+r+"__value",c)});return o&&(i=(0,b.isValidElement)(o)?(0,n.createElement)("span",{className:a()("wc-gzd-block-components-product-"+r+"__value",c),style:l},o):(0,n.createElement)("span",{className:a()("wc-gzd-block-components-product-"+r+"__value",c),style:l,dangerouslySetInnerHTML:{__html:o}})),(0,n.createElement)("span",{className:m,style:s},i)},v=e=>{const{className:t,textAlign:r,isDescendentOfSingleProductTemplate:o,labelType:m}=e,{parentName:i,parentClassName:p}=(0,l.useInnerBlockLayoutContext)(),{product:u}=(0,l.useProductDataContext)(),d=_(e),g="woocommerce/all-products"===i,y=a()("wc-gzd-block-components-product-"+m,t,d.className,{[`${p}__product-${m}`]:p});if(!u.id&&!o){const e=(0,n.createElement)(h,{align:r,className:y,labelType:m});if(g){const t=`wp-block-woocommerce-gzd-product-${m}`;return(0,n.createElement)("div",{className:t},e)}return e}const f=((e,t,r)=>{const o=t.hasOwnProperty("extensions")?t.extensions["woocommerce-germanized"]:{unit_price_html:"",unit_prices:{price:0,regular_price:0,sale_price:0},unit_product:0,unit_product_html:"",delivery_time_html:"",tax_info_html:"",shipping_costs_info_html:"",defect_description_html:"",nutri_score:"",nutri_score_html:"",deposit_html:"",deposit_prices:{price:0,quantity:0,amount:0},deposit_packaging_type_html:"",manufacturer_html:"",product_safety_attachments_html:""},a=t.prices,l=r?(0,c.getCurrencyFromPriceResponse)():(0,c.getCurrencyFromPriceResponse)(a),m=e.replace(/-/g,"_"),i=o.hasOwnProperty(m+"_html")?o[m+"_html"]:"";let p="";return"unit_price"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)(w,{currency:l,value:1e3})," / ",(0,n.createElement)("span",{className:"unit"},(0,s._x)("kg","unit","woocommerce-germanized"))):"delivery_time"===m?p=(0,s._x)("Delivery time: 2-3 days","preview","woocommerce-germanized"):"tax_info"===m?p=(0,s._x)("incl. 19 % VAT","preview","woocommerce-germanized"):"shipping_costs_info"===m?p=(0,s._x)("plus shipping costs","preview","woocommerce-germanized"):"unit_product"===m?p=(0,s.sprintf)((0,s._x)("Product includes: %1$s kg","preview","woocommerce-germanized"),10):"defect_description"===m?p=(0,s._x)("This product has a serious defect.","preview","woocommerce-germanized"):"deposit"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("span",{className:"additional"},(0,s._x)("Plus","preview","woocommerce-germanized"))," ",(0,n.createElement)(w,{currency:l,value:40})," ",(0,n.createElement)("span",{className:"deposit-notice"},(0,s._x)("deposit","preview","woocommerce-germanized"))):"deposit_packaging_type"===m?p=(0,s._x)("Disposable","preview","woocommerce-germanized"):"nutri_score"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("span",{className:"wc-gzd-nutri-score-value wc-gzd-nutri-score-value-a"},"A")):"manufacturer"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("p",null,(0,n.createElement)("stong",null,(0,s._x)("Sample company name","preview","woocommerce-germanized")),(0,n.createElement)("br",null),(0,s._x)("Sample address","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("12345 Berlin","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("sample@sample.com","preview","woocommerce-germanized")),(0,n.createElement)("h3",null,(0,s.__)("Person responsible for the EU","woocommerce-germanized")),(0,n.createElement)("p",null,(0,n.createElement)("stong",null,(0,s._x)("Sample company name","preview","woocommerce-germanized")),(0,n.createElement)("br",null),(0,s._x)("Sample address","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("12345 Berlin","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("sample@sample.com","preview","woocommerce-germanized"))):"product_safety_attachments"===m&&(p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("ul",null,(0,n.createElement)("li",null,(0,n.createElement)("a",{href:"#"},(0,s._x)("sample-filename.pdf","sample","woocommerce-germanized")))))),{preview:p,data:i}})(m,u,o),b=(0,n.createElement)(h,{align:r,className:y,labelType:m,style:d.style,labelStyle:d.style,formattedLabel:o?f.preview:f.data});if(g){const e=`wp-block-woocommerce-gzd-product-${m}`;return(0,n.createElement)("div",{className:e},b)}return b}},26:function(e,t,r){r.r(t),r.d(t,{default:function(){return c}});var n=r(196),o=r(721),a=r(606),c=e=>(e={...e,labelType:"shipping-costs-info"}).isDescendentOfSingleProductTemplate?(0,n.createElement)(a.Z,{...e}):(0,o.withProductDataContext)(a.Z)(e)}}]); \ No newline at end of file diff --git a/build/product-shipping-costs-info.css b/build/product-shipping-costs-info.css new file mode 100644 index 000000000..1114283cc --- /dev/null +++ b/build/product-shipping-costs-info.css @@ -0,0 +1 @@ +.wc-gzd-block-components-product-price-label{display:block}.wc-gzd-block-components-product-price-label.wc-gzd-block-components-product-price-label--align-center{text-align:center}.wc-gzd-block-components-product-price-label.wc-gzd-block-components-product-price-label--align-right{text-align:right}.wc-gzd-block-components-product-deposit-packaging-type{text-transform:uppercase}.wc-gzd-block-components-product-nutri-score .wc-gzd-nutri-score-value{height:4rem;width:7.0625rem;display:block;text-indent:-9999px} diff --git a/build/product-tax-info-frontend.js b/build/product-tax-info-frontend.js new file mode 100644 index 000000000..449c1e0d2 --- /dev/null +++ b/build/product-tax-info-frontend.js @@ -0,0 +1 @@ +"use strict";(self.webpackWcBlocksJsonp=self.webpackWcBlocksJsonp||[]).push([[297],{606:function(e,t,r){r.d(t,{Z:function(){return h}});var n=r(196),o=r(184),a=r.n(o),c=r(293),l=r(864),s=r(736);const m=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object,i=e=>"string"==typeof e;var p=r(857),u=r(83);function d(e={}){const t={};return(0,u.R)(e,{selector:""}).forEach((e=>{t[e.key]=e.value})),t}function g(e,t){return e&&t?`has-${(0,p.o)(t)}-${e}`:""}const _=e=>{const t=(e=>{const t=m(e)?e:{style:{}};let r=t.style;return i(r)&&(r=JSON.parse(r)||{}),m(r)||(r={}),{...t,style:r}})(e),r=function(e){const{backgroundColor:t,textColor:r,gradient:n,style:o}=e,c=g("background-color",t),l=g("color",r),s=function(e){if(e)return`has-${e}-gradient-background`}(n),i=s||o?.color?.gradient;return{className:a()(l,s,{[c]:!i&&!!c,"has-text-color":r||o?.color?.text,"has-background":t||o?.color?.background||n||o?.color?.gradient,"has-link-color":m(o?.elements?.link)?o?.elements?.link?.color:void 0}),style:d({color:o?.color||{}})}}(t),n=function(e){const t=e.style?.border||{};return{className:function(e){const{borderColor:t,style:r}=e,n=t?g("border-color",t):"";return a()({"has-border-color":!!t||!!r?.border?.color,[n]:!!n})}(e),style:d({border:t})}}(t),o=function(e){return{className:void 0,style:d({spacing:e.style?.spacing||{}})}}(t),c=(e=>{const t=m(e.style.typography)?e.style.typography:{},r=i(t.fontFamily)?t.fontFamily:"";return{className:e.fontFamily?`has-${e.fontFamily}-font-family`:r,style:{fontSize:e.fontSize?`var(--wp--preset--font-size--${e.fontSize})`:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight,letterSpacing:t.letterSpacing,lineHeight:t.lineHeight,textDecoration:t.textDecoration,textTransform:t.textTransform}}})(t);return{className:a()(c.className,r.className,n.className,o.className),style:{...c.style,...r.style,...n.style,...o.style}}};var y=r(333);const f=e=>({thousandSeparator:e?.thousandSeparator,decimalSeparator:e?.decimalSeparator,fixedDecimalScale:!0,prefix:e?.prefix,suffix:e?.suffix,isNumericString:!0});var w=({className:e,value:t,currency:r,onValueChange:o,displayType:c="text",...l})=>{var s;const m="string"==typeof t?parseInt(t,10):t;if(!Number.isFinite(m))return null;const i=m/10**r.minorUnit;if(!Number.isFinite(i))return null;const p=a()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",e),u=null!==(s=l.decimalScale)&&void 0!==s?s:r?.minorUnit,d={...l,...f(r),decimalScale:u,value:void 0,currency:void 0,onValueChange:void 0},g=o?e=>{const t=+e.value*10**r.minorUnit;o(t)}:()=>{};return(0,n.createElement)(y.Z,{className:p,displayType:c,...d,value:i,onValueChange:g})},b=r(307),v=({align:e,className:t,labelType:r,formattedLabel:o,labelClassName:c,labelStyle:l,style:s})=>{const m=a()(t,"wc-gzd-block-components-product-"+r,"wc-gzd-block-components-product-price-label",{[`wc-gzd-block-components-product-price-label--align-${e}`]:e});let i=(0,n.createElement)("span",{className:a()("wc-gzd-block-components-product-"+r+"__value",c)});return o&&(i=(0,b.isValidElement)(o)?(0,n.createElement)("span",{className:a()("wc-gzd-block-components-product-"+r+"__value",c),style:l},o):(0,n.createElement)("span",{className:a()("wc-gzd-block-components-product-"+r+"__value",c),style:l,dangerouslySetInnerHTML:{__html:o}})),(0,n.createElement)("span",{className:m,style:s},i)},h=e=>{const{className:t,textAlign:r,isDescendentOfSingleProductTemplate:o,labelType:m}=e,{parentName:i,parentClassName:p}=(0,l.useInnerBlockLayoutContext)(),{product:u}=(0,l.useProductDataContext)(),d=_(e),g="woocommerce/all-products"===i,y=a()("wc-gzd-block-components-product-"+m,t,d.className,{[`${p}__product-${m}`]:p});if(!u.id&&!o){const e=(0,n.createElement)(v,{align:r,className:y,labelType:m});if(g){const t=`wp-block-woocommerce-gzd-product-${m}`;return(0,n.createElement)("div",{className:t},e)}return e}const f=((e,t,r)=>{const o=t.hasOwnProperty("extensions")?t.extensions["woocommerce-germanized"]:{unit_price_html:"",unit_prices:{price:0,regular_price:0,sale_price:0},unit_product:0,unit_product_html:"",delivery_time_html:"",tax_info_html:"",shipping_costs_info_html:"",defect_description_html:"",nutri_score:"",nutri_score_html:"",deposit_html:"",deposit_prices:{price:0,quantity:0,amount:0},deposit_packaging_type_html:"",manufacturer_html:"",product_safety_attachments_html:""},a=t.prices,l=r?(0,c.getCurrencyFromPriceResponse)():(0,c.getCurrencyFromPriceResponse)(a),m=e.replace(/-/g,"_"),i=o.hasOwnProperty(m+"_html")?o[m+"_html"]:"";let p="";return"unit_price"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)(w,{currency:l,value:1e3})," / ",(0,n.createElement)("span",{className:"unit"},(0,s._x)("kg","unit","woocommerce-germanized"))):"delivery_time"===m?p=(0,s._x)("Delivery time: 2-3 days","preview","woocommerce-germanized"):"tax_info"===m?p=(0,s._x)("incl. 19 % VAT","preview","woocommerce-germanized"):"shipping_costs_info"===m?p=(0,s._x)("plus shipping costs","preview","woocommerce-germanized"):"unit_product"===m?p=(0,s.sprintf)((0,s._x)("Product includes: %1$s kg","preview","woocommerce-germanized"),10):"defect_description"===m?p=(0,s._x)("This product has a serious defect.","preview","woocommerce-germanized"):"deposit"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("span",{className:"additional"},(0,s._x)("Plus","preview","woocommerce-germanized"))," ",(0,n.createElement)(w,{currency:l,value:40})," ",(0,n.createElement)("span",{className:"deposit-notice"},(0,s._x)("deposit","preview","woocommerce-germanized"))):"deposit_packaging_type"===m?p=(0,s._x)("Disposable","preview","woocommerce-germanized"):"nutri_score"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("span",{className:"wc-gzd-nutri-score-value wc-gzd-nutri-score-value-a"},"A")):"manufacturer"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("p",null,(0,n.createElement)("stong",null,(0,s._x)("Sample company name","preview","woocommerce-germanized")),(0,n.createElement)("br",null),(0,s._x)("Sample address","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("12345 Berlin","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("sample@sample.com","preview","woocommerce-germanized")),(0,n.createElement)("h3",null,(0,s.__)("Person responsible for the EU","woocommerce-germanized")),(0,n.createElement)("p",null,(0,n.createElement)("stong",null,(0,s._x)("Sample company name","preview","woocommerce-germanized")),(0,n.createElement)("br",null),(0,s._x)("Sample address","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("12345 Berlin","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("sample@sample.com","preview","woocommerce-germanized"))):"product_safety_attachments"===m&&(p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("ul",null,(0,n.createElement)("li",null,(0,n.createElement)("a",{href:"#"},(0,s._x)("sample-filename.pdf","sample","woocommerce-germanized")))))),{preview:p,data:i}})(m,u,o),b=(0,n.createElement)(v,{align:r,className:y,labelType:m,style:d.style,labelStyle:d.style,formattedLabel:o?f.preview:f.data});if(g){const e=`wp-block-woocommerce-gzd-product-${m}`;return(0,n.createElement)("div",{className:e},b)}return b}},471:function(e,t,r){r.r(t),r.d(t,{default:function(){return c}});var n=r(196),o=r(721),a=r(606),c=e=>(e={...e,labelType:"tax-info"}).isDescendentOfSingleProductTemplate?(0,n.createElement)(a.Z,{...e}):(0,o.withProductDataContext)(a.Z)(e)}}]); \ No newline at end of file diff --git a/build/product-tax-info.css b/build/product-tax-info.css new file mode 100644 index 000000000..1114283cc --- /dev/null +++ b/build/product-tax-info.css @@ -0,0 +1 @@ +.wc-gzd-block-components-product-price-label{display:block}.wc-gzd-block-components-product-price-label.wc-gzd-block-components-product-price-label--align-center{text-align:center}.wc-gzd-block-components-product-price-label.wc-gzd-block-components-product-price-label--align-right{text-align:right}.wc-gzd-block-components-product-deposit-packaging-type{text-transform:uppercase}.wc-gzd-block-components-product-nutri-score .wc-gzd-nutri-score-value{height:4rem;width:7.0625rem;display:block;text-indent:-9999px} diff --git a/build/product-unit-price-frontend.js b/build/product-unit-price-frontend.js new file mode 100644 index 000000000..823c28995 --- /dev/null +++ b/build/product-unit-price-frontend.js @@ -0,0 +1 @@ +"use strict";(self.webpackWcBlocksJsonp=self.webpackWcBlocksJsonp||[]).push([[92],{606:function(e,t,r){r.d(t,{Z:function(){return h}});var n=r(196),o=r(184),a=r.n(o),c=r(293),l=r(864),s=r(736);const m=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object,i=e=>"string"==typeof e;var p=r(857),u=r(83);function d(e={}){const t={};return(0,u.R)(e,{selector:""}).forEach((e=>{t[e.key]=e.value})),t}function g(e,t){return e&&t?`has-${(0,p.o)(t)}-${e}`:""}const _=e=>{const t=(e=>{const t=m(e)?e:{style:{}};let r=t.style;return i(r)&&(r=JSON.parse(r)||{}),m(r)||(r={}),{...t,style:r}})(e),r=function(e){const{backgroundColor:t,textColor:r,gradient:n,style:o}=e,c=g("background-color",t),l=g("color",r),s=function(e){if(e)return`has-${e}-gradient-background`}(n),i=s||o?.color?.gradient;return{className:a()(l,s,{[c]:!i&&!!c,"has-text-color":r||o?.color?.text,"has-background":t||o?.color?.background||n||o?.color?.gradient,"has-link-color":m(o?.elements?.link)?o?.elements?.link?.color:void 0}),style:d({color:o?.color||{}})}}(t),n=function(e){const t=e.style?.border||{};return{className:function(e){const{borderColor:t,style:r}=e,n=t?g("border-color",t):"";return a()({"has-border-color":!!t||!!r?.border?.color,[n]:!!n})}(e),style:d({border:t})}}(t),o=function(e){return{className:void 0,style:d({spacing:e.style?.spacing||{}})}}(t),c=(e=>{const t=m(e.style.typography)?e.style.typography:{},r=i(t.fontFamily)?t.fontFamily:"";return{className:e.fontFamily?`has-${e.fontFamily}-font-family`:r,style:{fontSize:e.fontSize?`var(--wp--preset--font-size--${e.fontSize})`:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight,letterSpacing:t.letterSpacing,lineHeight:t.lineHeight,textDecoration:t.textDecoration,textTransform:t.textTransform}}})(t);return{className:a()(c.className,r.className,n.className,o.className),style:{...c.style,...r.style,...n.style,...o.style}}};var y=r(333);const f=e=>({thousandSeparator:e?.thousandSeparator,decimalSeparator:e?.decimalSeparator,fixedDecimalScale:!0,prefix:e?.prefix,suffix:e?.suffix,isNumericString:!0});var w=({className:e,value:t,currency:r,onValueChange:o,displayType:c="text",...l})=>{var s;const m="string"==typeof t?parseInt(t,10):t;if(!Number.isFinite(m))return null;const i=m/10**r.minorUnit;if(!Number.isFinite(i))return null;const p=a()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",e),u=null!==(s=l.decimalScale)&&void 0!==s?s:r?.minorUnit,d={...l,...f(r),decimalScale:u,value:void 0,currency:void 0,onValueChange:void 0},g=o?e=>{const t=+e.value*10**r.minorUnit;o(t)}:()=>{};return(0,n.createElement)(y.Z,{className:p,displayType:c,...d,value:i,onValueChange:g})},b=r(307),v=({align:e,className:t,labelType:r,formattedLabel:o,labelClassName:c,labelStyle:l,style:s})=>{const m=a()(t,"wc-gzd-block-components-product-"+r,"wc-gzd-block-components-product-price-label",{[`wc-gzd-block-components-product-price-label--align-${e}`]:e});let i=(0,n.createElement)("span",{className:a()("wc-gzd-block-components-product-"+r+"__value",c)});return o&&(i=(0,b.isValidElement)(o)?(0,n.createElement)("span",{className:a()("wc-gzd-block-components-product-"+r+"__value",c),style:l},o):(0,n.createElement)("span",{className:a()("wc-gzd-block-components-product-"+r+"__value",c),style:l,dangerouslySetInnerHTML:{__html:o}})),(0,n.createElement)("span",{className:m,style:s},i)},h=e=>{const{className:t,textAlign:r,isDescendentOfSingleProductTemplate:o,labelType:m}=e,{parentName:i,parentClassName:p}=(0,l.useInnerBlockLayoutContext)(),{product:u}=(0,l.useProductDataContext)(),d=_(e),g="woocommerce/all-products"===i,y=a()("wc-gzd-block-components-product-"+m,t,d.className,{[`${p}__product-${m}`]:p});if(!u.id&&!o){const e=(0,n.createElement)(v,{align:r,className:y,labelType:m});if(g){const t=`wp-block-woocommerce-gzd-product-${m}`;return(0,n.createElement)("div",{className:t},e)}return e}const f=((e,t,r)=>{const o=t.hasOwnProperty("extensions")?t.extensions["woocommerce-germanized"]:{unit_price_html:"",unit_prices:{price:0,regular_price:0,sale_price:0},unit_product:0,unit_product_html:"",delivery_time_html:"",tax_info_html:"",shipping_costs_info_html:"",defect_description_html:"",nutri_score:"",nutri_score_html:"",deposit_html:"",deposit_prices:{price:0,quantity:0,amount:0},deposit_packaging_type_html:"",manufacturer_html:"",product_safety_attachments_html:""},a=t.prices,l=r?(0,c.getCurrencyFromPriceResponse)():(0,c.getCurrencyFromPriceResponse)(a),m=e.replace(/-/g,"_"),i=o.hasOwnProperty(m+"_html")?o[m+"_html"]:"";let p="";return"unit_price"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)(w,{currency:l,value:1e3})," / ",(0,n.createElement)("span",{className:"unit"},(0,s._x)("kg","unit","woocommerce-germanized"))):"delivery_time"===m?p=(0,s._x)("Delivery time: 2-3 days","preview","woocommerce-germanized"):"tax_info"===m?p=(0,s._x)("incl. 19 % VAT","preview","woocommerce-germanized"):"shipping_costs_info"===m?p=(0,s._x)("plus shipping costs","preview","woocommerce-germanized"):"unit_product"===m?p=(0,s.sprintf)((0,s._x)("Product includes: %1$s kg","preview","woocommerce-germanized"),10):"defect_description"===m?p=(0,s._x)("This product has a serious defect.","preview","woocommerce-germanized"):"deposit"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("span",{className:"additional"},(0,s._x)("Plus","preview","woocommerce-germanized"))," ",(0,n.createElement)(w,{currency:l,value:40})," ",(0,n.createElement)("span",{className:"deposit-notice"},(0,s._x)("deposit","preview","woocommerce-germanized"))):"deposit_packaging_type"===m?p=(0,s._x)("Disposable","preview","woocommerce-germanized"):"nutri_score"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("span",{className:"wc-gzd-nutri-score-value wc-gzd-nutri-score-value-a"},"A")):"manufacturer"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("p",null,(0,n.createElement)("stong",null,(0,s._x)("Sample company name","preview","woocommerce-germanized")),(0,n.createElement)("br",null),(0,s._x)("Sample address","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("12345 Berlin","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("sample@sample.com","preview","woocommerce-germanized")),(0,n.createElement)("h3",null,(0,s.__)("Person responsible for the EU","woocommerce-germanized")),(0,n.createElement)("p",null,(0,n.createElement)("stong",null,(0,s._x)("Sample company name","preview","woocommerce-germanized")),(0,n.createElement)("br",null),(0,s._x)("Sample address","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("12345 Berlin","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("sample@sample.com","preview","woocommerce-germanized"))):"product_safety_attachments"===m&&(p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("ul",null,(0,n.createElement)("li",null,(0,n.createElement)("a",{href:"#"},(0,s._x)("sample-filename.pdf","sample","woocommerce-germanized")))))),{preview:p,data:i}})(m,u,o),b=(0,n.createElement)(v,{align:r,className:y,labelType:m,style:d.style,labelStyle:d.style,formattedLabel:o?f.preview:f.data});if(g){const e=`wp-block-woocommerce-gzd-product-${m}`;return(0,n.createElement)("div",{className:e},b)}return b}},263:function(e,t,r){r.r(t),r.d(t,{default:function(){return c}});var n=r(196),o=r(721),a=r(606),c=e=>(e={...e,labelType:"unit-price"}).isDescendentOfSingleProductTemplate?(0,n.createElement)(a.Z,{...e}):(0,o.withProductDataContext)(a.Z)(e)}}]); \ No newline at end of file diff --git a/build/product-unit-price.css b/build/product-unit-price.css new file mode 100644 index 000000000..1114283cc --- /dev/null +++ b/build/product-unit-price.css @@ -0,0 +1 @@ +.wc-gzd-block-components-product-price-label{display:block}.wc-gzd-block-components-product-price-label.wc-gzd-block-components-product-price-label--align-center{text-align:center}.wc-gzd-block-components-product-price-label.wc-gzd-block-components-product-price-label--align-right{text-align:right}.wc-gzd-block-components-product-deposit-packaging-type{text-transform:uppercase}.wc-gzd-block-components-product-nutri-score .wc-gzd-nutri-score-value{height:4rem;width:7.0625rem;display:block;text-indent:-9999px} diff --git a/build/product-unit-product-frontend.js b/build/product-unit-product-frontend.js new file mode 100644 index 000000000..ac85e69e3 --- /dev/null +++ b/build/product-unit-product-frontend.js @@ -0,0 +1 @@ +"use strict";(self.webpackWcBlocksJsonp=self.webpackWcBlocksJsonp||[]).push([[6],{606:function(e,t,r){r.d(t,{Z:function(){return h}});var n=r(196),o=r(184),a=r.n(o),c=r(293),l=r(864),s=r(736);const m=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object,i=e=>"string"==typeof e;var p=r(857),u=r(83);function d(e={}){const t={};return(0,u.R)(e,{selector:""}).forEach((e=>{t[e.key]=e.value})),t}function g(e,t){return e&&t?`has-${(0,p.o)(t)}-${e}`:""}const _=e=>{const t=(e=>{const t=m(e)?e:{style:{}};let r=t.style;return i(r)&&(r=JSON.parse(r)||{}),m(r)||(r={}),{...t,style:r}})(e),r=function(e){const{backgroundColor:t,textColor:r,gradient:n,style:o}=e,c=g("background-color",t),l=g("color",r),s=function(e){if(e)return`has-${e}-gradient-background`}(n),i=s||o?.color?.gradient;return{className:a()(l,s,{[c]:!i&&!!c,"has-text-color":r||o?.color?.text,"has-background":t||o?.color?.background||n||o?.color?.gradient,"has-link-color":m(o?.elements?.link)?o?.elements?.link?.color:void 0}),style:d({color:o?.color||{}})}}(t),n=function(e){const t=e.style?.border||{};return{className:function(e){const{borderColor:t,style:r}=e,n=t?g("border-color",t):"";return a()({"has-border-color":!!t||!!r?.border?.color,[n]:!!n})}(e),style:d({border:t})}}(t),o=function(e){return{className:void 0,style:d({spacing:e.style?.spacing||{}})}}(t),c=(e=>{const t=m(e.style.typography)?e.style.typography:{},r=i(t.fontFamily)?t.fontFamily:"";return{className:e.fontFamily?`has-${e.fontFamily}-font-family`:r,style:{fontSize:e.fontSize?`var(--wp--preset--font-size--${e.fontSize})`:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight,letterSpacing:t.letterSpacing,lineHeight:t.lineHeight,textDecoration:t.textDecoration,textTransform:t.textTransform}}})(t);return{className:a()(c.className,r.className,n.className,o.className),style:{...c.style,...r.style,...n.style,...o.style}}};var y=r(333);const f=e=>({thousandSeparator:e?.thousandSeparator,decimalSeparator:e?.decimalSeparator,fixedDecimalScale:!0,prefix:e?.prefix,suffix:e?.suffix,isNumericString:!0});var w=({className:e,value:t,currency:r,onValueChange:o,displayType:c="text",...l})=>{var s;const m="string"==typeof t?parseInt(t,10):t;if(!Number.isFinite(m))return null;const i=m/10**r.minorUnit;if(!Number.isFinite(i))return null;const p=a()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",e),u=null!==(s=l.decimalScale)&&void 0!==s?s:r?.minorUnit,d={...l,...f(r),decimalScale:u,value:void 0,currency:void 0,onValueChange:void 0},g=o?e=>{const t=+e.value*10**r.minorUnit;o(t)}:()=>{};return(0,n.createElement)(y.Z,{className:p,displayType:c,...d,value:i,onValueChange:g})},b=r(307),v=({align:e,className:t,labelType:r,formattedLabel:o,labelClassName:c,labelStyle:l,style:s})=>{const m=a()(t,"wc-gzd-block-components-product-"+r,"wc-gzd-block-components-product-price-label",{[`wc-gzd-block-components-product-price-label--align-${e}`]:e});let i=(0,n.createElement)("span",{className:a()("wc-gzd-block-components-product-"+r+"__value",c)});return o&&(i=(0,b.isValidElement)(o)?(0,n.createElement)("span",{className:a()("wc-gzd-block-components-product-"+r+"__value",c),style:l},o):(0,n.createElement)("span",{className:a()("wc-gzd-block-components-product-"+r+"__value",c),style:l,dangerouslySetInnerHTML:{__html:o}})),(0,n.createElement)("span",{className:m,style:s},i)},h=e=>{const{className:t,textAlign:r,isDescendentOfSingleProductTemplate:o,labelType:m}=e,{parentName:i,parentClassName:p}=(0,l.useInnerBlockLayoutContext)(),{product:u}=(0,l.useProductDataContext)(),d=_(e),g="woocommerce/all-products"===i,y=a()("wc-gzd-block-components-product-"+m,t,d.className,{[`${p}__product-${m}`]:p});if(!u.id&&!o){const e=(0,n.createElement)(v,{align:r,className:y,labelType:m});if(g){const t=`wp-block-woocommerce-gzd-product-${m}`;return(0,n.createElement)("div",{className:t},e)}return e}const f=((e,t,r)=>{const o=t.hasOwnProperty("extensions")?t.extensions["woocommerce-germanized"]:{unit_price_html:"",unit_prices:{price:0,regular_price:0,sale_price:0},unit_product:0,unit_product_html:"",delivery_time_html:"",tax_info_html:"",shipping_costs_info_html:"",defect_description_html:"",nutri_score:"",nutri_score_html:"",deposit_html:"",deposit_prices:{price:0,quantity:0,amount:0},deposit_packaging_type_html:"",manufacturer_html:"",product_safety_attachments_html:""},a=t.prices,l=r?(0,c.getCurrencyFromPriceResponse)():(0,c.getCurrencyFromPriceResponse)(a),m=e.replace(/-/g,"_"),i=o.hasOwnProperty(m+"_html")?o[m+"_html"]:"";let p="";return"unit_price"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)(w,{currency:l,value:1e3})," / ",(0,n.createElement)("span",{className:"unit"},(0,s._x)("kg","unit","woocommerce-germanized"))):"delivery_time"===m?p=(0,s._x)("Delivery time: 2-3 days","preview","woocommerce-germanized"):"tax_info"===m?p=(0,s._x)("incl. 19 % VAT","preview","woocommerce-germanized"):"shipping_costs_info"===m?p=(0,s._x)("plus shipping costs","preview","woocommerce-germanized"):"unit_product"===m?p=(0,s.sprintf)((0,s._x)("Product includes: %1$s kg","preview","woocommerce-germanized"),10):"defect_description"===m?p=(0,s._x)("This product has a serious defect.","preview","woocommerce-germanized"):"deposit"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("span",{className:"additional"},(0,s._x)("Plus","preview","woocommerce-germanized"))," ",(0,n.createElement)(w,{currency:l,value:40})," ",(0,n.createElement)("span",{className:"deposit-notice"},(0,s._x)("deposit","preview","woocommerce-germanized"))):"deposit_packaging_type"===m?p=(0,s._x)("Disposable","preview","woocommerce-germanized"):"nutri_score"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("span",{className:"wc-gzd-nutri-score-value wc-gzd-nutri-score-value-a"},"A")):"manufacturer"===m?p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("p",null,(0,n.createElement)("stong",null,(0,s._x)("Sample company name","preview","woocommerce-germanized")),(0,n.createElement)("br",null),(0,s._x)("Sample address","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("12345 Berlin","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("sample@sample.com","preview","woocommerce-germanized")),(0,n.createElement)("h3",null,(0,s.__)("Person responsible for the EU","woocommerce-germanized")),(0,n.createElement)("p",null,(0,n.createElement)("stong",null,(0,s._x)("Sample company name","preview","woocommerce-germanized")),(0,n.createElement)("br",null),(0,s._x)("Sample address","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("12345 Berlin","preview","woocommerce-germanized"),(0,n.createElement)("br",null),(0,s._x)("sample@sample.com","preview","woocommerce-germanized"))):"product_safety_attachments"===m&&(p=(0,n.createElement)(n.Fragment,null,(0,n.createElement)("ul",null,(0,n.createElement)("li",null,(0,n.createElement)("a",{href:"#"},(0,s._x)("sample-filename.pdf","sample","woocommerce-germanized")))))),{preview:p,data:i}})(m,u,o),b=(0,n.createElement)(v,{align:r,className:y,labelType:m,style:d.style,labelStyle:d.style,formattedLabel:o?f.preview:f.data});if(g){const e=`wp-block-woocommerce-gzd-product-${m}`;return(0,n.createElement)("div",{className:e},b)}return b}},0:function(e,t,r){r.r(t),r.d(t,{default:function(){return c}});var n=r(196),o=r(721),a=r(606),c=e=>(e={...e,labelType:"unit-product"}).isDescendentOfSingleProductTemplate?(0,n.createElement)(a.Z,{...e}):(0,o.withProductDataContext)(a.Z)(e)}}]); \ No newline at end of file diff --git a/build/product-unit-product.css b/build/product-unit-product.css new file mode 100644 index 000000000..1114283cc --- /dev/null +++ b/build/product-unit-product.css @@ -0,0 +1 @@ +.wc-gzd-block-components-product-price-label{display:block}.wc-gzd-block-components-product-price-label.wc-gzd-block-components-product-price-label--align-center{text-align:center}.wc-gzd-block-components-product-price-label.wc-gzd-block-components-product-price-label--align-right{text-align:right}.wc-gzd-block-components-product-deposit-packaging-type{text-transform:uppercase}.wc-gzd-block-components-product-nutri-score .wc-gzd-nutri-score-value{height:4rem;width:7.0625rem;display:block;text-indent:-9999px} diff --git a/build/static/add-to-cart-variation.asset.php b/build/static/add-to-cart-variation.asset.php new file mode 100644 index 000000000..b392d065d --- /dev/null +++ b/build/static/add-to-cart-variation.asset.php @@ -0,0 +1 @@ + array(), 'version' => 'dbacfac79de0f41782d1'); diff --git a/build/static/add-to-cart-variation.js b/build/static/add-to-cart-variation.js new file mode 100644 index 000000000..ce347850f --- /dev/null +++ b/build/static/add-to-cart-variation.js @@ -0,0 +1 @@ +!function(t,e,o,i){var r=function(e){var o=this;o.params=wc_gzd_add_to_cart_variation_params,o.$form=e,o.$wrapper=e.closest(o.params.wrapper),o.$product=e.closest(".product"),o.variationData=e.data("product_variations"),o.$singleVariation=e.find(".single_variation"),o.$singleVariationWrap=e.find(".single_variation_wrap"),o.$resetVariations=e.find(".reset_variations"),o.$button=e.find(".single_add_to_cart_button"),o.$form.addClass("has-gzd-variation-form"),o.$form.off(".wc-gzd-variation-form"),o.$wrapper.length<=0&&(o.$wrapper=o.$product),o.showOrHideTabs(o),o.isBlockLayout=o.$wrapper.find(".wp-block-woocommerce-product-price").length>0,o.replacePrice=!o.$wrapper.hasClass("bundled_product")&&o.params.replace_price,e.on("click.wc-gzd-variation-form",".reset_variations",{GermanizedvariationForm:o},o.onReset),e.on("reset_data.wc-gzd-variation-form",{GermanizedvariationForm:o},o.onReset),e.on("show_variation.wc-gzd-variation-form",{GermanizedvariationForm:o},o.onShowVariation),o.$wrapper.find(".woocommerce-product-attributes-item--food_description, .woocommerce-product-attributes-item--alcohol_content, .woocommerce-product-attributes-item--net_filling_quantity, .woocommerce-product-attributes-item--drained_weight, .woocommerce-product-attributes-item--food_place_of_origin, .woocommerce-product-attributes-item--nutri_score, .woocommerce-product-attributes-item--food_distributor").each((function(){var e=t(this);(e.find(".woocommerce-product-attributes-item__value").is(":empty")||e.find(".woocommerce-product-attributes-item__value .wc-gzd-additional-info-placeholder").is(":empty"))&&e.addClass("wc-gzd-additional-info-placeholder")}))};r.prototype.showOrHideTabs=function(t,e=i){(e=i===e?t.$product.hasClass("has-product-safety-information"):e)?t.$product.find(".product_safety_tab").show().css("display","inline-block"):t.$product.find(".product_safety_tab").hide()},r.prototype.getPriceElement=function(t){return t.$wrapper.find(t.params.price_selector+":not(.price-unit):visible").not(".variations_form .single_variation .price").first()},r.prototype.onReset=function(e){var o=e.data.GermanizedvariationForm,i=o.$wrapper;i.find(".variation_gzd_modified").each((function(){t(this).wc_gzd_reset_content()})),i.find(".variation_gzd_modified").remove(),o.showOrHideTabs(o),e.data.GermanizedvariationForm.$form.trigger("germanized_reset_data")},r.prototype.getElementOrBlock=function(t,e,o){var i=t.$wrapper,r=".wp-block-woocommerce-gzd-product-"+e+"[data-is-descendent-of-single-product-template]";return i.find(r).length>0?i.find(r+" "+o):i.find(o)},r.prototype.onUpdate=function(t){setTimeout((function(){void 0!==t.data&&t.data.hasOwnProperty("GermanizedvariationForm")&&void 0!==t.data.GermanizedvariationForm&&(t.data.GermanizedvariationForm.$button.is("[disabled]")||t.data.GermanizedvariationForm.$button.hasClass("disabled"))&&t.data.GermanizedvariationForm.onReset(t)}),250)},r.prototype.onShowVariation=function(t,e,o){var i=t.data.GermanizedvariationForm,r=i.$wrapper,n=e.hasOwnProperty("price_html")&&""!==e.price_html,a=e.hasOwnProperty("display_price")&&""!==e.display_price;if(n&&i.replacePrice){var c=i.getPriceElement(i);i.$singleVariation.find(".price").hide(),c.wc_gzd_set_content(e.price_html),c.find(".price").contents().unwrap()}i.getElementOrBlock(i,"delivery-time",".delivery-time-info").wc_gzd_set_content(e.delivery_time),i.getElementOrBlock(i,"defect-description",".defect-description").wc_gzd_set_content(e.defect_description),i.getElementOrBlock(i,"tax-info",".tax-info").wc_gzd_set_content(a?e.tax_info:""),i.getElementOrBlock(i,"manufacturer",".manufacturer").wc_gzd_set_content(e.manufacturer),i.getElementOrBlock(i,"manufacturer-heading",".wc-gzd-product-manufacturer-heading").wc_gzd_set_content(e.manufacturer_heading),i.getElementOrBlock(i,"product_safety_attachments",".product-safety-attachments").wc_gzd_set_content(e.product_safety_attachments),i.getElementOrBlock(i,"product-safety-attachments-heading",".wc-gzd-product-safety-attachments-heading").wc_gzd_set_content(e.product_safety_attachments_heading),i.getElementOrBlock(i,"deposit",".deposit-amount").wc_gzd_set_content(a?e.deposit_amount:""),i.getElementOrBlock(i,"deposit-packaging-type",".deposit-packaging-type").wc_gzd_set_content(a?e.deposit_packaging_type:""),i.getElementOrBlock(i,"food-description",".wc-gzd-food-description").wc_gzd_set_content(e.food_description),i.getElementOrBlock(i,"nutri-score",".wc-gzd-nutri-score").wc_gzd_set_content(e.nutri_score),i.getElementOrBlock(i,"food-distributor",".wc-gzd-food-distributor").wc_gzd_set_content(e.food_distributor),i.getElementOrBlock(i,"food-place-of-origin",".wc-gzd-food-place-of-origin").wc_gzd_set_content(e.food_place_of_origin),i.getElementOrBlock(i,"net-filling-quantity",".wc-gzd-net-filling-quantity").wc_gzd_set_content(e.net_filling_quantity),i.getElementOrBlock(i,"drained-weight",".wc-gzd-drained-weight").wc_gzd_set_content(e.drained_weight),i.getElementOrBlock(i,"alcohol-content",".wc-gzd-alcohol-content").wc_gzd_set_content("no"===e.includes_alcohol?"":e.alcohol_content),i.getElementOrBlock(i,"nutrients",".wc-gzd-nutrients").wc_gzd_set_content(e.nutrients),i.getElementOrBlock(i,"nutrients-heading",".wc-gzd-nutrients-heading").wc_gzd_set_content(e.nutrients_heading),i.getElementOrBlock(i,"ingredients",".wc-gzd-ingredients").wc_gzd_set_content(e.ingredients),i.getElementOrBlock(i,"ingredients-heading",".wc-gzd-ingredients-heading").wc_gzd_set_content(e.ingredients_heading),i.getElementOrBlock(i,"allergenic",".wc-gzd-allergenic").wc_gzd_set_content(e.allergenic),i.getElementOrBlock(i,"allergenic-heading",".wc-gzd-allergenic-heading").wc_gzd_set_content(e.allergenic_heading),i.getElementOrBlock(i,"shipping-costs-info",".shipping-costs-info").wc_gzd_set_content(a?e.shipping_costs_info:""),i.getElementOrBlock(i,"unit-price",".price-unit").wc_gzd_set_content(a?e.unit_price:""),i.getElementOrBlock(i,"unit-product",".product-units").wc_gzd_set_content(a?e.product_units:""),i.showOrHideTabs(i,e.has_product_safety_information),i.$form.trigger("germanized_variation_data",e,r)},t.fn.wc_germanized_variation_form=function(){return new r(this),this},t.fn.wc_gzd_set_content=function(t){var e=this.not(".wc-gzd-additional-info-loop");t=i===t?"":t,i===e.attr("data-o_content")&&e.attr("data-o_content",e.html()),e.html(t),e.addClass("variation_modified variation_gzd_modified").removeClass("wc-gzd-additional-info-placeholder").show(),e.is(":empty")?(e.hide(),e.parents(".wp-block-woocommerce-gzd-product-price-label").length>0&&e.parents(".wp-block-woocommerce-gzd-product-price-label").addClass("wp-block-woocommerce-gzd-product-is-empty"),e.parents(".woocommerce-product-attributes-item").length>0&&e.parents(".woocommerce-product-attributes-item").hide()):(e.parents(".wp-block-woocommerce-gzd-product-price-label").length>0&&e.parents(".wp-block-woocommerce-gzd-product-price-label").removeClass("wp-block-woocommerce-gzd-product-is-empty"),e.parents(".woocommerce-product-attributes-item").length>0&&e.parents(".woocommerce-product-attributes-item").show())},t.fn.wc_gzd_reset_content=function(){var t=this.not(".wc-gzd-additional-info-loop");i!==t.attr("data-o_content")&&(t.html(t.attr("data-o_content")),t.removeClass("variation_modified variation_gzd_modified").show()),t.is(":empty")?(t.addClass("wc-gzd-additional-info-placeholder").hide(),t.parents(".wp-block-woocommerce-gzd-product-price-label").length>0&&t.parents(".wp-block-woocommerce-gzd-product-price-label").addClass("wp-block-woocommerce-gzd-product-is-empty"),t.parents(".woocommerce-product-attributes-item").length>0&&t.parents(".woocommerce-product-attributes-item").hide()):(t.parents(".wp-block-woocommerce-gzd-product-price-label").length>0&&t.parents(".wp-block-woocommerce-gzd-product-price-label").removeClass("wp-block-woocommerce-gzd-product-is-empty"),t.parents(".woocommerce-product-attributes-item").length>0&&t.parents(".woocommerce-product-attributes-item").show())},t((function(){"undefined"!=typeof wc_gzd_add_to_cart_variation_params&&(t(".variations_form").each((function(){t(this).wc_germanized_variation_form()})),t(o.body).on("wc_variation_form",(function(e,o){var i;(i=t(void 0===o?e.target:o.$form)).length>0&&(i.hasClass("has-gzd-variation-form")||(i.wc_germanized_variation_form(),i.trigger("check_variations")))})))}))}(jQuery,window,document),((window.germanized=window.germanized||{}).static=window.germanized.static||{})["add-to-cart-variation"]={}; \ No newline at end of file diff --git a/build/static/admin-activation-styles.asset.php b/build/static/admin-activation-styles.asset.php new file mode 100644 index 000000000..a2b589063 --- /dev/null +++ b/build/static/admin-activation-styles.asset.php @@ -0,0 +1 @@ + array(), 'version' => 'a0103096657425e586cb'); diff --git a/build/static/admin-activation-styles.css b/build/static/admin-activation-styles.css new file mode 100644 index 000000000..8d1ee9101 --- /dev/null +++ b/build/static/admin-activation-styles.css @@ -0,0 +1 @@ +.wc-gzd-news p{font-size:15px;line-height:1.8}.wc-gzd-news .about-logo-wrapper{display:flex;flex-wrap:wrap;justify-content:flex-start}.wc-gzd-news .about-logo-wrapper .wc-gzd-logo{background:url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiCgkgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIKCSB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjUwOS4xNnB4IiBoZWlnaHQ9IjE2Ny4wN3B4IiB2aWV3Qm94PSIwIDAgNTA5LjE2IDE2Ny4wNyIKCSBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MDkuMTYgMTY3LjA3OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6bm9uZTt9Cgkuc3Qxe2VuYWJsZS1iYWNrZ3JvdW5kOm5ldyAgICA7fQoJLnN0MntmaWxsOiMyNjI2MjY7fQoJLnN0M3tmaWxsOiNGRTAwMDA7fQoJLnN0NHtmaWxsOiNGRkNDMDA7fQo8L3N0eWxlPgo8ZGVmcz4KPC9kZWZzPgo8cG9seWdvbiBpZD0iWE1MSURfMTBfIiBjbGFzcz0ic3QwIiBwb2ludHM9IjUwOS4xNCw1OS4yOSAwLDYwLjEyIDAuMDIsMC44MyA1MDkuMTYsMCAiLz4KPGcgY2xhc3M9InN0MSI+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNNTguMDEsMjcuMDdjMCwxNy4xOC0xMS4yMSwyOS4zOC0yNy42NiwyOS4zOGMtMTYuMDgsMC0yNy45Ny0xMS41Ni0yNy45Ny0yNy41MwoJCUMyLjM5LDEyLjk0LDE0LjA2LDEuMywzMC4yMywxLjNjMTMuNzYsMCwyNS4wMiw4LjYxLDI3LjI0LDIwLjgxSDQyLjMxYy0xLjktNC40Mi02LjYtNy4yNy0xMS45NS03LjI3CgkJYy03Ljg2LDAtMTMuMTYsNS42OS0xMy4xNiwxNC4wN2MwLDguMyw1LjIxLDEzLjk5LDEzLjE2LDEzLjk5YzUuNTIsMCwxMC4yNS0yLjY3LDExLjktNi43MkgyOS4yMnYtOS4xMkw1OC4wMSwyNy4wN3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik05OS41NCw0Mi41OHYxMi41NEg2NS4zMlYyLjYzaDMzLjU5djEyLjVINzkuNzJ2Ny43M2gxNy4yNHYxMS44Nkg3OS43MnY3Ljg2SDk5LjU0eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTEyNy41NSwzOS4wNmgtNS4yNHYxNi4wNmgtMTQuNDZWMi42M2gyMi43NWMxMS4zMiwwLDE5LjUyLDcuNiwxOS41MiwxOC41OGMwLDYuNDQtMy4xNSwxMS43Mi04LjMzLDE0LjgzCgkJbDEwLjQyLDE5LjA5aC0xNi4xNEwxMjcuNTUsMzkuMDZ6IE0xMjIuMywyNi44OGg2LjYxYzQuMDQsMCw2LjM3LTIuNDMsNi4zNy01LjcyYzAtMy4yOC0yLjMzLTUuNjgtNi4zNy01LjY4aC02LjYxVjI2Ljg4eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTIxMC40Niw1NS4xMmwtNC4xLTMwLjIzbC0xMy45MiwzMC4zMmgtNC4yN0wxNzQuMjUsMjQuOWwtNC4wNCwzMC4yMmgtMTQuNjZsNy45NC01Mi41aDE0LjQ0bDEyLjM2LDI4LjU3CgkJbDEyLjQ0LTI4LjU3aDE0LjQ0bDcuODcsNTIuNUgyMTAuNDZ6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNMjY0LjEyLDQ2LjZoLTE4LjYxbC0yLjkxLDguNTNoLTE1LjVsMjAuNjItNTIuNWgxNC4xNGwyMS4wNyw1Mi41aC0xNS45M0wyNjQuMTIsNDYuNnogTTI1NC43OCwxOS4wMQoJCWwtNS43NSwxNi4yN2gxMS41NkwyNTQuNzgsMTkuMDF6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNMzM0LjgyLDIuNjN2NTIuNWgtMTEuOTZsLTIwLjg2LTI4LjQ5djI4LjQ5aC0xNC4wMlYyLjYzaDEyLjY2bDIwLjE2LDI3LjU0VjIuNjNIMzM0LjgyeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTM0NC45OSwyLjYzaDE0LjY1djUyLjVoLTE0LjY1VjIuNjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNNDA4LjAzLDQxLjY2djEzLjQ3aC00MS41NnYtMy4wMWwxOS40NS0zNi4wMmgtMTguMThWMi42M2gzOS4zOXYzLjI3bC0xOS4zNSwzNS43Nkg0MDguMDN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNNDQ5LjI3LDQyLjU4djEyLjU0aC0zNC4yM1YyLjYzaDMzLjU5djEyLjVoLTE5LjE5djcuNzNoMTcuMjR2MTEuODZoLTE3LjI0djcuODZINDQ5LjI3eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTUwNS45MSwyOC44M2MwLDE1LjMyLTExLjI1LDI2LjI5LTI3LjEsMjYuMjloLTIxLjI1VjIuNjNoMjEuMjVDNDk0LjcxLDIuNjMsNTA1LjkxLDEzLjQ5LDUwNS45MSwyOC44M3oKCQkgTTQ5MS4wOCwyOC44M2MwLTcuNzktNS4xOC0xMi45Ni0xMi45Ni0xMi45NmgtNi4wNHYyNi4wMWg2LjA0QzQ4NS45LDQxLjg4LDQ5MS4wOCwzNi41OCw0OTEuMDgsMjguODN6Ii8+CjwvZz4KPHJlY3QgaWQ9IlhNTElEXzlfIiB4PSI5NC42NCIgeT0iNjguMzEiIGNsYXNzPSJzdDIiIHdpZHRoPSIxMDYuNSIgaGVpZ2h0PSI4Ljc2Ii8+CjxyZWN0IGlkPSJYTUxJRF84XyIgeD0iMjAxLjE0IiB5PSI2OC4zMSIgY2xhc3M9InN0MyIgd2lkdGg9IjEwNi41IiBoZWlnaHQ9IjguNzYiLz4KPHJlY3QgaWQ9IlhNTElEXzdfIiB4PSIzMDcuNjQiIHk9IjY4LjMxIiBjbGFzcz0ic3Q0IiB3aWR0aD0iMTA2LjUiIGhlaWdodD0iOC43NiIvPgo8cmVjdCBpZD0iWE1MSURfMV8iIHg9IjgxLjgzIiB5PSI4OC4wNyIgY2xhc3M9InN0MCIgd2lkdGg9IjM0NS45NCIgaGVpZ2h0PSI3OSIvPgo8ZyBjbGFzcz0ic3QxIj4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0xMDUuODksOTMuOTR2My4xMmg2LjN2NC43M2gtNi4zdjYuODdoLTUuNDV2LTE5LjZoMTIuNDd2NC44OUgxMDUuODl6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNMTI1LjM2LDEwOS4xNWMtNi4zLDAtMTAuOC00LjMxLTEwLjgtMTAuM3M0LjUtMTAuMjksMTAuOC0xMC4yOWM2LjI4LDAsMTAuNzYsNC4yOSwxMC43NiwxMC4yOQoJCUMxMzYuMTMsMTA0Ljg2LDEzMS42NSwxMDkuMTUsMTI1LjM2LDEwOS4xNUwxMjUuMzYsMTA5LjE1eiBNMTMwLjUsOTguODVjMC0zLjA3LTIuMTYtNS4yNy01LjE0LTUuMjdjLTIuOTgsMC01LjE3LDIuMjItNS4xNyw1LjI3CgkJYzAsMy4wNSwyLjE5LDUuMjcsNS4xNyw1LjI3QzEyOC4zNCwxMDQuMTIsMTMwLjUsMTAxLjkyLDEzMC41LDk4Ljg1eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTE0Ni4yNCwxMDIuNjVoLTEuOTZ2NmgtNS40di0xOS42aDguNWM0LjIzLDAsNy4yOSwyLjg0LDcuMjksNi45NGMwLDIuNC0xLjE3LDQuMzgtMy4xMSw1LjU0bDMuODksNy4xM2gtNi4wMwoJCUwxNDYuMjQsMTAyLjY1eiBNMTQ0LjI4LDk4LjExaDIuNDdjMS41MSwwLDIuMzgtMC45MSwyLjM4LTIuMTNjMC0xLjIyLTAuODctMi4xMi0yLjM4LTIuMTJoLTIuNDdWOTguMTF6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNMTkwLjcsODkuMDVsLTYuMDQsMTkuNmgtNC43NWwtMy43Ni05LjQ2bC0zLjY5LDkuNDZoLTQuNzVsLTYuMTQtMTkuNmg1LjhsMy4xOCwxMS4zbDQuNjctMTEuMmgxLjg3CgkJbDQuNzUsMTEuMjFsMy4xMi0xMS4zSDE5MC43eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTIwMS45MSwxMDkuMTVjLTYuMywwLTEwLjgtNC4zMS0xMC44LTEwLjNzNC41LTEwLjI5LDEwLjgtMTAuMjljNi4yOCwwLDEwLjc2LDQuMjksMTAuNzYsMTAuMjkKCQlDMjEyLjY4LDEwNC44NiwyMDguMiwxMDkuMTUsMjAxLjkxLDEwOS4xNUwyMDEuOTEsMTA5LjE1eiBNMjA3LjA1LDk4Ljg1YzAtMy4wNy0yLjE2LTUuMjctNS4xNC01LjI3Yy0yLjk4LDAtNS4xNywyLjIyLTUuMTcsNS4yNwoJCWMwLDMuMDUsMi4xOSw1LjI3LDUuMTcsNS4yN0MyMDQuODksMTA0LjEyLDIwNy4wNSwxMDEuOTIsMjA3LjA1LDk4Ljg1eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTIyNS4yMSwxMDkuMTVjLTYuMywwLTEwLjgtNC4zMS0xMC44LTEwLjNzNC41LTEwLjI5LDEwLjgtMTAuMjljNi4yOCwwLDEwLjc2LDQuMjksMTAuNzYsMTAuMjkKCQlDMjM1Ljk3LDEwNC44NiwyMzEuNDksMTA5LjE1LDIyNS4yMSwxMDkuMTVMMjI1LjIxLDEwOS4xNXogTTIzMC4zNSw5OC44NWMwLTMuMDctMi4xNi01LjI3LTUuMTQtNS4yN2MtMi45OCwwLTUuMTcsMi4yMi01LjE3LDUuMjcKCQljMCwzLjA1LDIuMTksNS4yNyw1LjE3LDUuMjdDMjI4LjE5LDEwNC4xMiwyMzAuMzUsMTAxLjkyLDIzMC4zNSw5OC44NXoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0yNDguMTMsMTA5LjE1Yy01Ljk3LDAtMTAuNDItNC40Mi0xMC40Mi0xMC4yOGMwLTUuOSw0LjQ2LTEwLjMxLDEwLjQyLTEwLjMxYzUuMTQsMCw5LjEyLDMuMzksOS45MSw4LjM2CgkJaC01LjQ3Yy0wLjY3LTIuMDEtMi4zNy0zLjMxLTQuNDMtMy4zMWMtMi43OCwwLTQuODEsMi4yMy00LjgxLDUuMjdjMCwzLjAyLDIuMDQsNS4yMiw0LjgxLDUuMjJjMi4xNywwLDMuODgtMS40Miw0LjQzLTMuNTloNS41MgoJCUMyNTcuMzUsMTA1LjY1LDI1My4zNSwxMDkuMTUsMjQ4LjEzLDEwOS4xNUwyNDguMTMsMTA5LjE1eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTI3MC40NiwxMDkuMTVjLTYuMywwLTEwLjgtNC4zMS0xMC44LTEwLjNzNC41LTEwLjI5LDEwLjgtMTAuMjljNi4yOCwwLDEwLjc2LDQuMjksMTAuNzYsMTAuMjkKCQlDMjgxLjIyLDEwNC44NiwyNzYuNzQsMTA5LjE1LDI3MC40NiwxMDkuMTVMMjcwLjQ2LDEwOS4xNXogTTI3NS42LDk4Ljg1YzAtMy4wNy0yLjE2LTUuMjctNS4xNC01LjI3Yy0yLjk4LDAtNS4xNywyLjIyLTUuMTcsNS4yNwoJCWMwLDMuMDUsMi4xOSw1LjI3LDUuMTcsNS4yN0MyNzMuNDQsMTA0LjEyLDI3NS42LDEwMS45MiwyNzUuNiw5OC44NXoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0zMDMuMTYsMTA4LjY1bC0xLjUzLTExLjI5bC01LjIsMTEuMzJoLTEuNmwtNS4yLTExLjMybC0xLjUxLDExLjI4aC01LjQ3bDIuOTYtMTkuNmg1LjM5bDQuNjIsMTAuNjcKCQlsNC42NS0xMC42N2g1LjM5bDIuOTQsMTkuNkgzMDMuMTZ6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNMzMwLjY2LDEwOC42NWwtMS41My0xMS4yOWwtNS4yLDExLjMyaC0xLjZsLTUuMi0xMS4zMmwtMS41MSwxMS4yOGgtNS40N2wyLjk2LTE5LjZoNS4zOWw0LjYyLDEwLjY3CgkJbDQuNjUtMTAuNjdoNS4zOWwyLjk0LDE5LjZIMzMwLjY2eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTM1MS41NSwxMDMuOTd2NC42OGgtMTIuNzh2LTE5LjZoMTIuNTR2NC42N2gtNy4xN3YyLjg5aDYuNDR2NC40M2gtNi40NHYyLjkzSDM1MS41NXoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0zNjIuMDEsMTAyLjY1aC0xLjk2djZoLTUuNHYtMTkuNmg4LjVjNC4yMywwLDcuMjksMi44NCw3LjI5LDYuOTRjMCwyLjQtMS4xNyw0LjM4LTMuMTEsNS41NGwzLjg5LDcuMTNoLTYuMDMKCQlMMzYyLjAxLDEwMi42NXogTTM2MC4wNSw5OC4xMWgyLjQ3YzEuNTEsMCwyLjM4LTAuOTEsMi4zOC0yLjEzYzAtMS4yMi0wLjg3LTIuMTItMi4zOC0yLjEyaC0yLjQ3Vjk4LjExeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTM4Mi44MSwxMDkuMTVjLTUuOTcsMC0xMC40Mi00LjQyLTEwLjQyLTEwLjI4YzAtNS45LDQuNDYtMTAuMzEsMTAuNDItMTAuMzFjNS4xNCwwLDkuMTIsMy4zOSw5LjkxLDguMzYKCQloLTUuNDdjLTAuNjctMi4wMS0yLjM3LTMuMzEtNC40My0zLjMxYy0yLjc4LDAtNC44MSwyLjIzLTQuODEsNS4yN2MwLDMuMDIsMi4wNCw1LjIyLDQuODEsNS4yMmMyLjE3LDAsMy44OC0xLjQyLDQuNDMtMy41OWg1LjUyCgkJQzM5Mi4wMywxMDUuNjUsMzg4LjAzLDEwOS4xNSwzODIuODEsMTA5LjE1TDM4Mi44MSwxMDkuMTV6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNNDA4LjE0LDEwMy45N3Y0LjY4aC0xMi43OHYtMTkuNmgxMi41NHY0LjY3aC03LjE3djIuODloNi40NHY0LjQzaC02LjQ0djIuOTNINDA4LjE0eiIvPgo8L2c+Cjwvc3ZnPgo=) no-repeat;background-size:298px auto;display:inline-block!important;height:89px;margin-top:2rem;text-indent:-9999px;vertical-align:top;width:298px}.wc-gzd-news .about-logo-wrapper .about-text{display:inline-block;margin:1rem 0 0 3%;max-width:50%;padding:0;width:50%}.wc-gzd-news .new-feature img{align-self:center}.wc-gzd-news p.price{font-size:.8em}.wc-gzd-news .columns{display:flex;flex-wrap:wrap;margin-left:-1em;margin-right:-1em}.wc-gzd-news .columns *{box-sizing:border-box}.wc-gzd-news .columns .col{align-items:center;display:inline-flex;flex-wrap:wrap;margin-right:0;padding:0 1em;width:33.3333%}.wc-gzd-news .columns .col h4 .dashicons{margin-right:5px}.wc-gzd-news .columns .col.align-center{align-self:center;display:inline-flex}.wc-gzd-news .columns.two-col .col{width:50%}.dashboard_page_wc-gzd-about h1{margin-right:0;width:100%}.dashboard_page_wc-gzd-about h3 .wc-gzd-pro{background:transparent;border:1px solid #000;color:#000;font-size:.7em;margin-left:5px}.dashboard_page_wc-gzd-about .changelog{border-top:1px solid #ccc;margin-top:3em;padding-top:0}.dashboard_page_wc-gzd-about .feature-section{border:none}.wc-gzd-actions{clear:both;width:100%}.wc-gzd-actions.wc-gzd-actions-right{text-align:right}.wc-gzd-actions a.button{margin-right:.5em}.wc-gzd-actions .woocommerce-gzd-message .button-primary,.wc-gzd-actions a.wc-gzd-default-button{background-color:#262626!important;background-image:none!important;border:1px solid #000!important;text-shadow:none!important}.wc-gzd-actions .woocommerce-gzd-message .button-primary:hover,.wc-gzd-actions a.wc-gzd-default-button:hover{background-color:#363636!important;background-image:none!important;border:1px solid #000!important;text-shadow:none!important}.woocommerce-gzd-message .form-table tr td,.woocommerce-gzd-message .form-table tr th{margin:0;padding:.7rem 0}.woocommerce-gzd-message a.wc-gzd-skip{opacity:.7}div.woocommerce-gzd-message{border-left:4px solid #bb2525!important}div.woocommerce-gzd-message p{max-width:100%!important} diff --git a/build/static/admin-activation-styles.js b/build/static/admin-activation-styles.js new file mode 100644 index 000000000..b6584b039 --- /dev/null +++ b/build/static/admin-activation-styles.js @@ -0,0 +1 @@ +!function(){"use strict";var e={};(function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(e),((window.germanized=window.germanized||{}).static=window.germanized.static||{})["admin-activation-styles"]=e}(); \ No newline at end of file diff --git a/build/static/admin-legal-checkboxes.asset.php b/build/static/admin-legal-checkboxes.asset.php new file mode 100644 index 000000000..05301aa68 --- /dev/null +++ b/build/static/admin-legal-checkboxes.asset.php @@ -0,0 +1 @@ + array(), 'version' => 'a1db6b6bd47780f48035'); diff --git a/build/static/admin-legal-checkboxes.js b/build/static/admin-legal-checkboxes.js new file mode 100644 index 000000000..9b0c34f65 --- /dev/null +++ b/build/static/admin-legal-checkboxes.js @@ -0,0 +1 @@ +!function(e,n,t,i){e((function(){e(".wc-gzd-legal-checkboxes");var o=e(".wc-gzd-legal-checkbox-rows"),a=e(".wc-shipping-zone-save"),s=t.template("wc-gzd-legal-checkbox-row"),c=Backbone.Model.extend({changes:{},logChanges:function(e){var n=this.changes||{};_.each(e,(function(e,t){n[t]=_.extend(n[t]||{id:t},e)})),this.changes=n,this.trigger("change:checkboxes")},discardChanges:function(e){var n=this.changes||{},t=null,i=_.indexBy(this.get("checkboxes"),"id");n[e]&&void 0!==n[e].priority&&(t=n[e].priority),delete n[e],null!==t&&i[e]&&i[e].priority!==t&&(n[e]=_.extend(n[e]||{},{id:e,priority:t})),this.changes=n,0===_.size(this.changes)&&r.clearUnloadConfirmation()},save:function(){_.size(this.changes)?e.post(i+(i.indexOf("?")>0?"&":"?")+"action=woocommerce_gzd_legal_checkboxes_save_changes",{wc_gzd_legal_checkbox_nonce:n.checkboxes_nonce,changes:this.changes},this.onSaveResponse,"json"):l.trigger("saved:checkboxes")},onSaveResponse:function(e,t){"success"===t&&(e.success?(l.set("checkboxes",e.data.checkboxes),l.trigger("change:checkboxes"),l.changes={},l.trigger("saved:checkboxes")):window.alert(n.strings.save_failed))}}),d=Backbone.View.extend({rowTemplate:s,initialize:function(){this.listenTo(this.model,"change:checkboxes",this.setUnloadConfirmation),this.listenTo(this.model,"saved:checkboxes",this.clearUnloadConfirmation),this.listenTo(this.model,"saved:checkboxes",this.render),o.on("change",{view:this},this.updateModelOnChange),o.on("sortupdate",{view:this},this.updateModelOnSort),e(window).on("beforeunload",{view:this},this.unloadConfirmation),e(document.body).on("click",".wc-gzd-legal-checkbox-add",{view:this},this.onAddNewRow)},block:function(){e(this.el).block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},unblock:function(){e(this.el).unblock()},render:function(){var n=_.indexBy(this.model.get("checkboxes"),"id"),t=this;t.$el.empty(),t.unblock(),_.size(n)&&(n=_(n).chain().sortBy((function(e){return parseInt(e.priority,10)})).value(),e.each(n,(function(e,n){t.renderRow(n)}))),t.initRows()},renderRow:function(e){var n=this;n.$el.append(n.rowTemplate(e)),n.initRow(e)},initRow:function(e){var n=this,t=n.$el.find('tr[data-id="'+e.id+'"]');n.renderLocations(e.id,e.location_titles),n.renderStatus(e.id,"yes"===e.is_enabled,"enabled"),n.renderStatus(e.id,"yes"===e.is_mandatory,"mandatory"),n.disableDelete(e.id,"yes"===e.is_core),t.find(".wc-gzd-legal-checkbox-delete").on("click",{view:this},this.onDeleteRow)},initRows:function(){e("#tiptip_holder").removeAttr("style"),e("#tiptip_arrow").removeAttr("style"),e(".tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:50})},disableDelete:function(n,t){var i=e('.wc-gzd-legal-checkboxes tr[data-id="'+n+'"]');t&&(i.find(".wc-gzd-legal-checkbox-delete").remove(),i.find(".row-actions .sep").remove())},renderStatus:function(n,t,i){var o=e('.wc-gzd-legal-checkboxes tr[data-id="'+n+'"]').find("td.wc-gzd-legal-checkbox-"+i);class_name="enabled",t||(class_name="disabled"),o.empty(),o.html('')},renderLocations:function(n,t){var i=e('.wc-gzd-legal-checkboxes tr[data-id="'+n+'"]').find("td.wc-gzd-legal-checkbox-locations ul");i.find(".wc-gzd-legal-checkbox-location").remove(),_.size(t)&&_.each(t,(function(e,n){i.append('")}))},onDeleteRow:function(t){var i=t.data.view.model,o=_.indexBy(i.get("checkboxes"),"id"),a={},s=e(this).closest("tr").data("id");t.preventDefault(),window.confirm(n.strings.delete_confirmation_msg)&&o[s]&&(delete o[s],a[s]=_.extend(a[s]||{},{deleted:"deleted"}),i.set("checkboxes",o),i.logChanges(a),t.data.view.block(),t.data.view.model.save())},setUnloadConfirmation:function(){this.needsUnloadConfirm=!0,a.prop("disabled",!1)},clearUnloadConfirmation:function(){this.needsUnloadConfirm=!1,a.prop("disabled",!0)},unloadConfirmation:function(e){if(e.data.view.needsUnloadConfirm)return e.returnValue=n.strings.unload_confirmation_msg,window.event.returnValue=n.strings.unload_confirmation_msg,n.strings.unload_confirmation_msg},updateModelOnChange:function(n){var t=n.data.view.model,i=e(n.target),o=i.closest("tr").data("id"),a=i.data("attribute"),s=i.val(),c=_.indexBy(t.get("checkboxes"),"id");c[o]&&c[o][a]===s||(c[o]={},c[o][a]=s),t.logChanges({})},updateModelOnSort:function(n){var t=n.data.view.model,i=_.indexBy(t.get("checkboxes"),"id"),o=e("tbody.wc-gzd-legal-checkbox-rows tr"),a={};_.each(o,(function(n){var t=e(n).data("id"),o=null,s=parseInt(e(n).index(),10);i[t]&&(o=parseInt(i[t].priority,10)),o!==s&&(a[t]=_.extend(a[t]||{},{priority:s}))})),_.size(a)&&(t.logChanges(a),n.data.view.block(),n.data.view.model.save())}}),l=new c({checkboxes:n.checkboxes}),r=new d({model:l,el:o});r.render(),o.sortable({items:"tr",cursor:"move",axis:"y",handle:"td.wc-gzd-legal-checkbox-sort",scrollSensitivity:40})}))}(jQuery,wc_gzd_legal_checkboxes_params,wp,ajaxurl),((window.germanized=window.germanized||{}).static=window.germanized.static||{})["admin-legal-checkboxes"]={}; \ No newline at end of file diff --git a/build/static/admin-product-variations.asset.php b/build/static/admin-product-variations.asset.php new file mode 100644 index 000000000..77c047405 --- /dev/null +++ b/build/static/admin-product-variations.asset.php @@ -0,0 +1 @@ + array(), 'version' => '0527102131a6ba6ea39c'); diff --git a/build/static/admin-product-variations.js b/build/static/admin-product-variations.js new file mode 100644 index 000000000..d40e5891c --- /dev/null +++ b/build/static/admin-product-variations.js @@ -0,0 +1 @@ +jQuery((function(i){var a={params:{},init:function(){this.params=wc_gzd_admin_product_variations_params,i("#woocommerce-product-data").on("woocommerce_variations_loaded woocommerce_variations_added",this.variations_loaded),i("#woocommerce-product-data").on("click",".woocommerce_variation",this.show_or_hide_unit_variation),i("#general_product_data").on("blur","input#_unit_base",this.show_or_hide_unit_variation),i("#general_product_data").on("change","select#_unit",this.show_or_hide_unit_variation),i(document).on("click",".wc-gzd-general-product-data-tab",this.on_click_general_product_data),i("select.variation_actions").on("variable_delivery_time_ajax_data",this.onSetDeliveryTime),i("select.variation_actions").on("variable_unit_product_ajax_data",this.onSetProductUnit),i(document).ajaxSend(this.appendParentUnitData),i("#variable_product_options").on("change","input.variable_service",this.variable_is_service).on("change","input.variable_used_good",this.variable_is_used_good).on("change","input.variable_defective_copy",this.variable_is_defective_copy)},parseAjaxData:function(i){var a=!1;try{a=JSON.parse('{"'+i.replace(/&/g,'","').replace(/=/g,'":"')+'"}',(function(i,a){return""===i?a:decodeURIComponent(a)}))}catch(i){a=!1}return a},appendParentUnitData:function(e,t,o){if(null!=t&&o.hasOwnProperty("data")){var n=o.data,r=a.parseAjaxData(n);if(r&&r.hasOwnProperty("action")&&"woocommerce_save_variations"===r.action){var c={};i.each(["unit","unit_base","unit_product"],(function(a,e){c["_"+e]=i("#_"+e).val()})),o.data+="&"+i.param(c)}}},variations_loaded:function(a,e){e=e||!1;var t=i("#woocommerce-product-data");e||(i("input.variable_service, input.variable_used_good, input.variable_defective_copy",t).trigger("change"),i(".woocommerce_variations .variation-needs-update",t).removeClass("variation-needs-update"),i("button.cancel-variation-changes, button.save-variation-changes",t).attr("disabled","disabled")),i(document.body).trigger("wc-gzd-refresh-unit-placeholder"),i(document.body).trigger("wc-gzd-show-hide-panels")},variable_is_service:function(){i(this).closest(".woocommerce_variation").find(".show_if_variation_service").hide(),i(this).is(":checked")&&i(this).closest(".woocommerce_variation").find(".show_if_variation_service").show()},variable_is_used_good:function(){i(this).closest(".woocommerce_variation").find(".show_if_variation_used_good").hide(),i(this).is(":checked")&&i(this).closest(".woocommerce_variation").find(".show_if_variation_used_good").show()},variable_is_defective_copy:function(){i(this).closest(".woocommerce_variation").find(".show_if_variation_defective_copy").hide(),i(this).is(":checked")&&i(this).closest(".woocommerce_variation").find(".show_if_variation_defective_copy").show()},onSetDeliveryTime:function(i,e){return a.onVariationAction(e,"set_delivery_time")},onSetProductUnit:function(i,e){return a.onVariationAction(e,"set_product_unit")},onVariationAction:function(i,e){var t=window.prompt(a.params["i18n_"+e]);return null!==t?(i.value=t,i):void 0},on_click_general_product_data:function(){return i("ul.wc-tabs > li.general_options > a").trigger("click"),!1},show_or_hide_unit_variation:function(){a.is_variable()&&(i(".variable_pricing_unit .form-row").hide(),i(".variable_pricing_unit .wc-gzd-unit-price-disabled-notice").show(),!a.has_unit_price()&&a.has_unit()?(i(".variable_pricing_unit .form-row").hide(),i(".variable_pricing_unit .wc-gzd-unit-price-disabled-notice").show(),i(".variable_pricing_unit").find("input[name*=variable_unit_product]").parents(".form-row").show()):a.has_unit_price()&&(i(".variable_pricing_unit .form-row").show(),i(".variable_pricing_unit .wc-gzd-unit-price-disabled-notice").hide()))},is_variable:function(){return"variable"===i("select#product-type").val()},has_unit:function(){return"0"!==i("#_unit").val()},has_unit_price:function(){return"0"!==i("#_unit").val()&&0!==i("#_unit_base").val().length}};a.init()})),((window.germanized=window.germanized||{}).static=window.germanized.static||{})["admin-product-variations"]={}; \ No newline at end of file diff --git a/build/static/admin-product.asset.php b/build/static/admin-product.asset.php new file mode 100644 index 000000000..9edf1dace --- /dev/null +++ b/build/static/admin-product.asset.php @@ -0,0 +1 @@ + array(), 'version' => '91049227c3b6d42e2869'); diff --git a/build/static/admin-product.js b/build/static/admin-product.js new file mode 100644 index 000000000..a9b1c741c --- /dev/null +++ b/build/static/admin-product.js @@ -0,0 +1 @@ +jQuery((function(e){var t={warranty_upload_file_frame:!1,upload_file_frame:!1,params:{},init:function(){var n=t;n.params=wc_gzd_admin_product_params,e(document).on("click","a.wc-gzd-add-new-country-specific-delivery-time",n.onAddNewDeliveryTime).on("click","a.wc-gzd-remove-country-specific-delivery-time",n.onRemoveDeliveryTime).on("click",".wc-gzd-product-upload",n.onUpload).on("click",".wc-gzd-product-upload-remove",n.onRemoveUpload).on("woocommerce-product-type-change wc-gzd-product-type-change",n.onProductTypeChange).on("wc-gzd-refresh-unit-placeholder",n.onRefreshProductUnitPlaceholder).on("change",":input#_unit",n.onChangeUnit).on("wc-gzd-show-hide-panels",n.showHidePanels);try{e(document.body).on("wc-enhanced-select-init wc-gzd-enhanced-select-init",this.onEnhancedSelectInit).trigger("wc-gzd-enhanced-select-init")}catch(e){window.console.log(e)}e("input#_is_food, input#_defective_copy").on("change",(function(){n.showHidePanels()})),e("input#_defective_copy").trigger("change"),e("#the-list").on("click",".editinline",n.onQuickEdit)},onRefreshProductUnitPlaceholder:function(){var t=e(":input#_unit").find(":selected");t.length>0?e(".wc-gzd-unit-placeholder").text(t.text()):e(".wc-gzd-unit-placeholder").text("")},onChangeUnit:function(){e(document.body).trigger("wc-gzd-refresh-unit-placeholder")},onEnhancedSelectInit:function(){var n=t;e(":input.wc-gzd-enhanced-nutri-score").filter(":not(.enhanced)").each((function(){var t={minimumResultsForSearch:10,allowClear:!!e(this).data("allow_clear"),placeholder:e(this).data("placeholder"),templateResult:n.formatNutriScore};e(this).selectWoo(t).addClass("enhanced")}))},formatNutriScore:function(t){return t.id?e(' '+t.text+""):t.text},onProductTypeChange:function(){t.showHidePanels()},showHidePanels:function(){var t=e("input#_is_food:checked").length,n=e("input#_defective_copy:checked").length;e(".hide_if_is_food, .hide_if_defective_copy").show(),e(".show_if_is_food, .show_if_defective_copy").hide(),t?e(".show_if_is_food").show():e(".food_options.food_tab").hasClass("active")&&e(".general_options.general_tab > a").trigger("click"),n?(e(".show_if_defective_copy").show(),e("#wc-gzd-product-defect-description").show()):e("#wc-gzd-product-defect-description").hide()},onQuickEdit:function(){var t=e(this).closest("tr").attr("id");t=t.replace("post-","");var n=e("#inline_"+t);if(n.find(".gzd_delivery_time_slug").length>0){var a=n.find(".gzd_delivery_time_slug").text(),i=n.find(".gzd_delivery_time_name").text(),c=n.find(".gzd_manufacturer_slug").text(),d=n.find(".gzd_manufacturer_name").text(),o=n.find(".gzd_unit_slug").text();e('select[name="_unit"] option:selected',".inline-edit-row").attr("selected",!1).trigger("change"),e('select[name="_unit"] option[value="'+o+'"]').attr("selected","selected").trigger("change"),e('select[name="_delivery_time"] option').remove().trigger("change"),e('select[name="_manufacturer"] option').remove().trigger("change"),a&&e('select[name="_delivery_time"]').append('"),c&&e('select[name="_manufacturer"]').append('"),setTimeout((function(){var n=e("tr#edit-"+t+" .wc-gzd-term-search-quick-edit.enhanced");n.length>0&&(n.selectWoo("destroy"),n.removeClass("enhanced")),e("tr#edit-"+t+" .wc-gzd-delivery-time-select-placeholder").addClass("wc-product-search","wc-gzd-delivery-time-search").removeClass("wc-gzd-delivery-time-select-placeholder"),e("tr#edit-"+t+" .wc-gzd-manufacturer-select-placeholder").addClass("wc-product-search","wc-gzd-manufacturer-search").removeClass("wc-gzd-manufacturer-select-placeholder"),e(document.body).trigger("wc-enhanced-select-init")}),100)}},onUpload:function(n){var a=t,i=e(this),c=i.parents(".wc-gzd-product-upload-wrapper"),d=i.data("multiple"),o=c.find(".wc-gzd-product-upload-attachments"),r=i.data("input_name"),l=[];c.find('input[name="'+r+'"]').each((function(){l.push(wp.media.attachment(parseInt(e(this).val())))})),n.preventDefault(),a.upload_file_frame=wp.media.frames.customHeader=wp.media({title:i.data("choose"),library:{type:i.data("types").split(",")},button:{text:i.data("update")},multiple:i.data("multiple")}),a.upload_file_frame.on("select",(function(){a.upload_file_frame.state().get("selection").map((function(t){t=t.toJSON(),d?i.text(i.data("update")):(o.find(".wc-gzd-product-single-attachment").remove(),i.text(t.filename)),-1===e.inArray(parseInt(t.id),l)&&(l.push(t.id),t.filename&&o.append(''+(d?t.filename:"")+' '+a.params.i18n_remove_attachment+''))}))})),a.upload_file_frame.on("open",(function(){var e=a.upload_file_frame.state().get("selection");!d&&l.length>0?(e.add(l),a.upload_file_frame.content.mode("browse")):(e.remove(),a.upload_file_frame.content.mode("upload"))})),a.upload_file_frame.open()},onRemoveUpload:function(){var t=e(this).closest(".wc-gzd-product-single-attachment"),n=e(this).parents(".wc-gzd-product-upload-wrapper"),a=n.find(".wc-gzd-product-upload");a.data("multiple"),t.remove();var i=n.find(".wc-gzd-product-single-attachment").length>0;return console.log(a),console.log(i),i||a.text(a.data("default_label")),!1},onAddNewDeliveryTime:function(){var t=e(this).parents("#shipping_product_data");0===t.length&&(t=e(this).parents(".woocommerce_variable_attributes"));var n=t.find(".wc-gzd-add-country-specific-delivery-time-template .wc-gzd-delivery-time-search.enhanced");n.length>0&&(n.selectWoo("destroy"),n.removeClass("enhanced"));var a=t.find(".wc-gzd-add-country-specific-delivery-time-template:first").clone();return a.removeClass("wc-gzd-add-country-specific-delivery-time-template").addClass("wc-gzd-country-specific-delivery-time-new"),t.find(".wc-gzd-new-country-specific-delivery-time-placeholder").append(a).show(),e(document.body).trigger("wc-enhanced-select-init"),!1},onRemoveDeliveryTime:function(){var t=e(this).parents(".form-row, .form-field");return t.find("select").trigger("change"),t.remove(),!1}};t.init()})),((window.germanized=window.germanized||{}).static=window.germanized.static||{})["admin-product"]={}; \ No newline at end of file diff --git a/build/static/admin-settings-styles.asset.php b/build/static/admin-settings-styles.asset.php new file mode 100644 index 000000000..a43dc0b9c --- /dev/null +++ b/build/static/admin-settings-styles.asset.php @@ -0,0 +1 @@ + array(), 'version' => 'ea4f40308f3b1fc55ff6'); diff --git a/build/static/admin-settings-styles.css b/build/static/admin-settings-styles.css new file mode 100644 index 000000000..c88a67cac --- /dev/null +++ b/build/static/admin-settings-styles.css @@ -0,0 +1 @@ +.wc-gzd-settings .nav-tab-wrapper a.nav-tab[href*="tab=germanized"]{background:#f1f1f1;border-bottom:1px solid #f1f1f1;box-shadow:none;color:#000;margin-bottom:-1px}.wc-gzd-settings ul.subsubsub:not(.list-table-filters){margin-top:0}.wc-gzd-settings ul.subsubsub:not(.list-table-filters) li a .wc-gzd-pro{margin-left:3px}.wc-gzd-settings ul.subsubsub:not(.list-table-filters) li a.current .wc-gzd-pro{border:1px solid #222;color:#222}.wc-gzd-settings .wc-gzd-dash-button{display:inline-block;height:2em;margin-right:5px;min-height:25px;overflow:hidden;padding:0;position:relative;text-indent:9999px;vertical-align:middle;width:2em}.wc-gzd-settings .wc-gzd-dash-button:after{speak:none;content:"";font-family:Dashicons;font-variant:normal;font-weight:400;height:100%;left:0;line-height:1.85;margin:0;position:absolute;text-align:center;text-indent:0;text-transform:none;top:0;width:100%}.wc-gzd-settings .wc-gzd-dash-button.help-link:after{content:"?";font-family:inherit;font-weight:700}.wc-gzd-settings .wc-gzd-dash-button.install:after{content:""}.wc-gzd-settings .wc-gzd-dash-button.wc-gzd-is-loading:after{content:""}.wc-gzd-settings .wc-gzd-settings-breadcrumb{font-size:1.4em;justify-content:flex-start;margin-bottom:.5em}.wc-gzd-settings .wc-gzd-settings-breadcrumb,.wc-gzd-settings .wc-gzd-settings-breadcrumb li.breadcrumb-item{align-items:center;display:flex;flex-wrap:wrap}.wc-gzd-settings .wc-gzd-settings-breadcrumb li.breadcrumb-item a.page-title-action{margin-left:1em;position:inherit;top:0}.wc-gzd-settings .wc-gzd-settings-breadcrumb li.breadcrumb-item a.breadcrumb-link{align-items:center;color:#444;display:inline-flex;text-decoration:none;white-space:nowrap}.wc-gzd-settings .wc-gzd-settings-breadcrumb li.breadcrumb-item a.breadcrumb-link:hover{color:#000!important}.wc-gzd-settings .wc-gzd-settings-breadcrumb li.breadcrumb-item a.breadcrumb-link:after{content:"";font-family:Dashicons;font-size:.9em;font-weight:400;height:100%;line-height:1;margin:2px 2px 0;text-align:center;text-indent:0;text-transform:none;width:100%}.wc-gzd-settings .wc-gzd-settings-breadcrumb li.breadcrumb-item.breadcrumb-item-active{color:#000;font-weight:600}.wc-gzd-settings .wc-gzd-setting-header{font-size:1.4em}.wc-gzd-settings .wc-gzd-setting-header .page-title-action{top:-1px}.wc-gzd-settings .wc-gzd-ajax-loading-btn{align-items:center;display:inline-flex;justify-content:center;position:relative}.wc-gzd-settings .wc-gzd-ajax-loading-btn.wc-gzd-is-loading .btn-text{opacity:.3;z-index:0}.wc-gzd-settings .wc-gzd-ajax-loading-btn.wc-gzd-is-loading .spinner{background-size:16px 16px;float:none;height:16px;margin:0;position:absolute;text-align:center;vertical-align:middle;width:16px;z-index:5}.wc-gzd-settings .wc-gzd-setting-tabs{margin-top:1.5em}.wc-gzd-settings .wc-gzd-setting-tabs .wc-gzd-setting-tab-enabled .wc-gzd-install-extension-btn{height:26px;line-height:26px;min-height:26px}.wc-gzd-settings .wc-gzd-setting-tabs td,.wc-gzd-settings .wc-gzd-setting-tabs th{display:table-cell!important;font-size:14px;line-height:1.75em;padding:1em!important;vertical-align:top}.wc-gzd-settings .wc-gzd-setting-tabs th{font-weight:600}.wc-gzd-settings .wc-gzd-setting-tabs td.wc-gzd-setting-tab-enabled,.wc-gzd-settings .wc-gzd-setting-tabs th.wc-gzd-setting-tab-enabled{text-align:center;width:1%}.wc-gzd-settings .wc-gzd-setting-tabs td.wc-gzd-setting-tab-enabled .status-disabled,.wc-gzd-settings .wc-gzd-setting-tabs td.wc-gzd-setting-tab-enabled .status-enabled,.wc-gzd-settings .wc-gzd-setting-tabs th.wc-gzd-setting-tab-enabled .status-disabled,.wc-gzd-settings .wc-gzd-setting-tabs th.wc-gzd-setting-tab-enabled .status-enabled{display:inline-block;margin-top:3px}.wc-gzd-settings .wc-gzd-setting-tabs a .wc-gzd-pro{margin-left:3px}.wc-gzd-settings .wc-gzd-setting-tabs td.wc-gzd-setting-tab-actions,.wc-gzd-settings .wc-gzd-setting-tabs th.wc-gzd-setting-tab-actions{text-align:right;width:15%}.wc-gzd-settings .wc-gzd-setting-tabs td.wc-gzd-setting-tab-actions{display:flex;flex-wrap:wrap;justify-content:flex-end}.wc-gzd-settings .wc-gzd-setting-tabs td.wc-gzd-setting-tab-actions .button{margin-right:5px}.wc-gzd-settings .wc-gzd-setting-tabs td.wc-gzd-setting-tab-actions .button:last-child{margin-right:0}.wc-gzd-settings .wc-gzd-setting-tabs td.wc-gzd-setting-tab-name,.wc-gzd-settings .wc-gzd-setting-tabs th.wc-gzd-setting-tab-name{width:25ch}.wc-gzd-settings .wc-gzd-setting-tabs td.wc-gzd-setting-tab-name{font-weight:700;white-space:nowrap}.wc-gzd-settings .wc-gzd-setting-tabs tr:nth-child(odd) td{background:#f9f9f9}.wc-gzd-admin-settings{display:flex;flex-wrap:wrap;justify-content:flex-start}.wc-gzd-admin-settings.wc-gzd-admin-settings-has-sidebar{box-sizing:border-box}.wc-gzd-admin-settings.wc-gzd-admin-settings-has-sidebar .wc-gzd-admin-settings-fields{padding-right:5%;width:65%}.wc-gzd-admin-settings.wc-gzd-admin-settings-has-sidebar .wc-gzd-admin-settings-sidebar{width:30%}.wc-gzd-admin-settings tbody.ui-sortable tr:hover{cursor:move}.wc-gzd-admin-settings .forminp-radio fieldset p{margin-bottom:1em}.wc-gzd-admin-settings th.forminp-image{padding-right:0!important}.wc-gzd-admin-settings.wc-gzd-admin-settings-contract th.forminp-image,.wc-gzd-admin-settings.wc-gzd-admin-settings-germanized-emails-attachments th.forminp-image,.wc-gzd-admin-settings.wc-gzd-admin-settings-invoices th.forminp-image,.wc-gzd-admin-settings.wc-gzd-admin-settings-multistep_checkout th.forminp-image,.wc-gzd-admin-settings.wc-gzd-admin-settings-revocation_generator th.forminp-image,.wc-gzd-admin-settings.wc-gzd-admin-settings-terms_generator th.forminp-image{padding-top:0}.wc-gzd-admin-settings .forminp-image img,.wc-gzd-admin-settings .wc-gzd-premium img{height:auto;max-width:100%;opacity:.7}.wc-gzd-admin-settings #woocommerce_gzdp_terms_generator img{max-width:100%}.wc-gzd-admin-settings .woocommerce table.form-table th.forminp-image{padding-right:0}.wc-gzd-admin-settings tr.single_select_page .description{display:block;margin-top:.5em}.wc-gzd-admin-settings tr.wc-gzd-setting-invisible{display:none}.wc-gzd-admin-settings td .wc-gzd-additional-desc{background:#fff;box-shadow:0 1px 1px 0 rgba(0,0,0,.1);font-size:14px;font-style:normal;line-height:1.5em;margin-top:1em;padding:.5em}.wc-gzd-admin-settings td .wc-gzd-additional-desc .wc-gzd-tax-example{margin-top:.5em}.wc-gzd-admin-settings .wc-gzd-label-wrap{display:block;position:relative;vertical-align:middle}.wc-gzd-admin-settings .wc-gzd-label-wrap .woocommerce-help-tip{margin:-8px -24px 0 0!important;position:absolute;right:0;top:50%}.wc-gzd-admin-settings td.forminp-gzd_toggle p.description,.wc-gzd-admin-settings td.forminp-gzd_toggle span.description{display:inline-block;font-size:14px;font-style:normal;margin-left:5px}.wc-gzd-admin-settings td.forminp-gzd_toggle p.description .wc-gzd-additional-desc,.wc-gzd-admin-settings td.forminp-gzd_toggle span.description .wc-gzd-additional-desc{margin-bottom:-1em}.wc-gzd-admin-settings td.forminp-gzd_toggle fieldset{margin-top:1.25em}.wc-gzd-admin-settings td.forminp-gzd_toggle fieldset:first-child{margin-top:0}.wc-gzd-admin-settings a.woocommerce-gzd-input-toggle-trigger,.wc-gzd-setting-tabs a.woocommerce-gzd-input-toggle-trigger{border:none;color:transparent;text-decoration:none}.wc-gzd-admin-settings a.woocommerce-gzd-input-toggle-trigger:focus,.wc-gzd-setting-tabs a.woocommerce-gzd-input-toggle-trigger:focus{border:none;box-shadow:none;color:transparent}table.wc-gzd-legal-checkboxes thead th{vertical-align:middle}table.wc-gzd-legal-checkboxes thead th.wc-gzd-legal-checkbox-sort{text-align:center}table.wc-gzd-legal-checkboxes td,table.wc-gzd-legal-checkboxes th{background:#fff;display:table-cell!important;font-size:14px;line-height:24px;padding:1em!important;vertical-align:top}table.wc-gzd-legal-checkboxes td ul,table.wc-gzd-legal-checkboxes th ul{margin:0}table.wc-gzd-legal-checkboxes td .status-disabled,table.wc-gzd-legal-checkboxes td .status-enabled,table.wc-gzd-legal-checkboxes th .status-disabled,table.wc-gzd-legal-checkboxes th .status-enabled{margin-top:3px}table.wc-gzd-legal-checkboxes td.wc-gzd-legal-checkbox-locations ul li,table.wc-gzd-legal-checkboxes th.wc-gzd-legal-checkbox-locations ul li{color:#555;display:inline;font-size:14px;line-height:24px;margin:0}table.wc-gzd-legal-checkboxes td.wc-gzd-legal-checkbox-locations ul li:before,table.wc-gzd-legal-checkboxes th.wc-gzd-legal-checkbox-locations ul li:before{content:", "}table.wc-gzd-legal-checkboxes td.wc-gzd-legal-checkbox-locations ul li:first-child:before,table.wc-gzd-legal-checkboxes th.wc-gzd-legal-checkbox-locations ul li:first-child:before{content:""}table.wc-gzd-legal-checkboxes td.wc-gzd-legal-checkbox-sort:before{color:#999;content:"";display:block;float:left;font-family:Dashicons;height:100%;line-height:1;line-height:24px;text-align:center;width:17px}table.wc-gzd-legal-checkboxes tbody.wc-gzd-legal-checkbox-rows td{border-top:2px solid #f9f9f9}table.wc-gzd-legal-checkboxes tbody.wc-gzd-legal-checkbox-rows tr:first-child td{border-top:0}table.wc-gzd-legal-checkboxes tbody.wc-gzd-legal-checkbox-rows tr:nth-child(odd) td{background:#f9f9f9}.wc-gzd-premium-overlay{border-left-color:#639aff!important}.wc-gzd-admin-settings-sidebar{box-sizing:border-box}.wc-gzd-admin-settings-sidebar .wc-gzd-admin-settings-sidebar-inner{background:#fff;box-shadow:0 1px 1px 0 rgba(0,0,0,.1);padding:1em}.wc-gzd-admin-settings-sidebar .wc-gzd-admin-settings-sidebar-inner.sticky{position:sticky;top:50px}.wc-gzd-admin-settings-sidebar h1:first-of-type,.wc-gzd-admin-settings-sidebar h2:first-of-type,.wc-gzd-admin-settings-sidebar h3:first-of-type{margin-top:0}.wc-gzd-admin-settings-sidebar img{width:100%}.wc-gzd-admin-settings-sidebar .browser{border-radius:3px}.wc-gzd-admin-settings-sidebar .small{color:#888;display:block;font-size:.9em;margin-top:.5em}body.woocommerce-feature-enabled-store-alerts .wc-gzd-admin-settings-sidebar .wc-gzd-admin-settings-sidebar-inner.sticky{top:120px}.wc-gzd-admin-settings-checkboxes td.forminp-textarea p code{display:block;margin:.5em 0}.wc-gzd-admin-settings-checkboxes td.forminp-textarea p{margin-bottom:1em}.wc-gzd-admin-settings-checkboxes td.forminp-textarea .gzd-small-desc{display:block;font-size:12px;font-style:italic}.wc-gzd-admin-settings-checkboxes td.forminp-text .description{display:block;line-height:1.5em;margin-top:.5em} diff --git a/build/static/admin-settings-styles.js b/build/static/admin-settings-styles.js new file mode 100644 index 000000000..0934cf638 --- /dev/null +++ b/build/static/admin-settings-styles.js @@ -0,0 +1 @@ +!function(){"use strict";var e={};(function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(e),((window.germanized=window.germanized||{}).static=window.germanized.static||{})["admin-settings-styles"]=e}(); \ No newline at end of file diff --git a/build/static/admin-settings.asset.php b/build/static/admin-settings.asset.php new file mode 100644 index 000000000..e8c223287 --- /dev/null +++ b/build/static/admin-settings.asset.php @@ -0,0 +1 @@ + array(), 'version' => 'fbdf2981dafccfe17d70'); diff --git a/build/static/admin-settings.js b/build/static/admin-settings.js new file mode 100644 index 000000000..64dd4cd8a --- /dev/null +++ b/build/static/admin-settings.js @@ -0,0 +1 @@ +!function(){var e,t;window.germanized=window.germanized||{},e=jQuery,(t=window.germanized).settings={params:{},init:function(){var t=this;this.params=wc_gzd_admin_settings_params;try{e(document.body).on("wc-enhanced-select-init wc-gzd-enhanced-select-init",this.onEnhancedSelectInit).trigger("wc-gzd-enhanced-select-init")}catch(e){window.console.log(e)}e(document).on("change","input[name=woocommerce_gzd_dispute_resolution_type]",this.onChangeDisputeResolutionType).on("change",".wc-gzd-setting-tabs input.woocommerce-gzd-tab-status-checkbox",this.onChangeTabStatus).on("change",".wc-gzd-setting-tab-enabled :input",this.preventWarning).on("click","a.wc-gzd-install-extension-btn",this.onInstallExtension).on("change gzd_show_or_hide_fields",".wc-gzd-admin-settings :input",this.onChangeInput),e(".wc-gzd-admin-settings :input").trigger("gzd_show_or_hide_fields"),e("input[name=woocommerce_gzd_dispute_resolution_type]:checked").trigger("change"),this.initMailSortable(),e(document.body).on("init_tooltips",(function(){t.initTipTips()})),t.initTipTip()},preventWarning:function(){window.onbeforeunload=""},initTipTip:function(){e(".wc-gzd-setting-tab-actions a.button").tipTip({fadeIn:50,fadeOut:50,delay:200})},onInstallExtension:function(){var n=t.settings,a=e(this),i={action:"woocommerce_gzd_install_extension",security:n.params.install_extension_nonce,extension:a.data("extension")};return a.addClass("wc-gzd-is-loading"),a.append(''),e.ajax({url:n.params.ajax_url,data:i,dataType:"json",type:"POST",success:function(t){if(a.find(".spinner").remove(),a.removeClass("wc-gzd-is-loading"),t.success)a.is("[href]")&&"#"!==a.attr("href")&&(window.location.href=a.attr("href"));else if(t.hasOwnProperty("message")){var n=e("#wpbody-content").find(".wrap");e(".wc-gzd-setting-tabs").length>0&&(n=e(".wc-gzd-setting-tabs")),n.before('

'+t.message+"

"),e("html, body").animate({scrollTop:e("#message").offset().top-32},1e3)}}}),!1},onChangeTabStatus:function(){var n=e(this),a=t.settings,i=n.data("tab"),o=n.parents("td").find(".woocommerce-gzd-input-toggle"),s=o.parents("a"),r=n.is(":checked")?"yes":"no",c={action:"woocommerce_gzd_toggle_tab_enabled",security:a.params.tab_toggle_nonce,enable:r,tab:i};return o.addClass("woocommerce-input-toggle--loading"),e.ajax({url:a.params.ajax_url,data:c,dataType:"json",type:"POST",success:function(t){!0===t.data?(o.removeClass("woocommerce-input-toggle--enabled, woocommerce-input-toggle--disabled"),o.addClass("woocommerce-input-toggle--enabled"),o.removeClass("woocommerce-input-toggle--loading"),t.hasOwnProperty("message")&&t.message.length>0&&(e(".wc-gzd-setting-tabs").before('

'+t.message+"

"),e("html, body").animate({scrollTop:e("#message").offset().top-32},1e3))):!1===t.data?(o.removeClass("woocommerce-input-toggle--enabled, woocommerce-input-toggle--disabled"),o.addClass("woocommerce-input-toggle--disabled"),o.removeClass("woocommerce-input-toggle--loading")):"needs_setup"===t.data&&(window.location.href=s.attr("href"))}}),!1},onChangeInput:function(){var n,a,i,o,s,r,c,d,l,g=t.settings,m=e(this),h=m.attr("id")?m.attr("id"):m.attr("name"),p=e(".wc-gzd-admin-settings :input[data-show_if_"+e.escapeSelector(h)+"]");e.each(p,(function(){for(var t in n=e(this),a=n.parents("tr"),i=n.data(),o=!0,i)if(i.hasOwnProperty(t)&&"show_if_"===t.substring(0,8)&&(s=t.replace("show_if_",""),r=g.getInputByIdOrName(s),c=n.data(t)?n.data(t).split(","):[],r.length>0&&(d=r.val(),l=!1,r.is(":radio")?"no"!==(d=r.parents("fieldset").find(":checked").length>0?r.parents("fieldset").find(":checked").val():"no")&&(l=!0):r.is(":checkbox")?"yes"==(d=r.is(":checked")?"yes":"no")&&(l=!0):l=void 0!==d&&"0"!==d&&""!==d,c&&c.length>0?-1===e.inArray(d,c)&&(o=!1):l||(o=!1)),!o))break;a.removeClass("wc-gzd-setting-visible wc-gzd-setting-invisible"),o?a.addClass("wc-gzd-setting-visible"):a.addClass("wc-gzd-setting-invisible")}))},getInputByIdOrName:function(n){var a=t.settings;return n=a.getCleanDataId(n),e(".wc-gzd-admin-settings :input").filter((function(){var t=e(this).attr("id")?e(this).attr("id"):e(this).attr("name");return!!t&&a.getCleanDataId(t)===n}))},getCleanDataId:function(e){return e.toLowerCase().replace(/-/g,"")},onEnhancedSelectInit:function(){var n=t.settings;e(":input.wc-gzd-enhanced-tags").filter(":not(.enhanced)").each((function(){var t={minimumResultsForSearch:10,allowClear:!!e(this).data("allow_clear"),placeholder:e(this).data("placeholder"),tags:!0};e(this).selectWoo(t).addClass("enhanced")})),e(":input.gzd-select-term").filter(":not(.enhanced)").each((function(){!function(t,n){e(t).selectWoo(n).addClass("enhanced"),e(t).prop("multiple")&&e(t).on("change",(function(){var n=e(t).children();n.sort((function(e,t){var n=e.text.toLowerCase(),a=t.text.toLowerCase();return n>a?1:n0){var t=e("#woocommerce_gzd_mail_attach_imprint").parents("table");e(t).find("tbody").sortable({items:"tr",cursor:"move",axis:"y",handle:"td, th",scrollSensitivity:40,helper:function(e,t){return t.children().each((function(){jQuery(this).width(jQuery(this).width())})),t.css("left","0"),t},start:function(e,t){t.item.css("background-color","#f6f6f6")},stop:function(n,a){a.item.removeAttr("style");var i=[];e(t).find("tr select").each((function(){i.push(e(this).attr("id").replace("woocommerce_gzd_mail_attach_",""))})),e("#woocommerce_gzd_mail_attach_order").val(i.join())}})}}},e(document).ready((function(){t.settings.init()})),((window.germanized=window.germanized||{}).static=window.germanized.static||{})["admin-settings"]={}}(); \ No newline at end of file diff --git a/build/static/admin-setup.asset.php b/build/static/admin-setup.asset.php new file mode 100644 index 000000000..2cd20296d --- /dev/null +++ b/build/static/admin-setup.asset.php @@ -0,0 +1 @@ + array(), 'version' => '264de9a9f537dc9a888a'); diff --git a/build/static/admin-setup.js b/build/static/admin-setup.js new file mode 100644 index 000000000..7f485bd13 --- /dev/null +++ b/build/static/admin-setup.js @@ -0,0 +1 @@ +!function(){var i,e;window.germanized=window.germanized||{},i=jQuery,(e=window.germanized).setup={params:{},init:function(){i(".woocommerce-help-tip").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200})}},i(document).ready((function(){e.setup.init()})),((window.germanized=window.germanized||{}).static=window.germanized.static||{})["admin-setup"]={}}(); \ No newline at end of file diff --git a/build/static/admin-styles.asset.php b/build/static/admin-styles.asset.php new file mode 100644 index 000000000..fa801deac --- /dev/null +++ b/build/static/admin-styles.asset.php @@ -0,0 +1 @@ + array(), 'version' => '4a11b56e5741c7d6c74f'); diff --git a/build/static/admin-styles.css b/build/static/admin-styles.css new file mode 100644 index 000000000..d666adbfa --- /dev/null +++ b/build/static/admin-styles.css @@ -0,0 +1 @@ +table.data_table tr td p.form-field{margin:0!important;padding:0!important}a.woocommerce-gzd-input-toggle-trigger{border:none;color:transparent;text-decoration:none}a.woocommerce-gzd-input-toggle-trigger:focus{border:none;box-shadow:none;color:transparent}span.woocommerce-gzd-input-toggle{background-color:var(--wp-admin-theme-color,#007cba);border:2px solid var(--wp-admin-theme-color,#007cba);border-radius:10em;display:inline-block;height:16px;margin-top:-1px;position:relative;text-indent:-9999px;vertical-align:text-top;width:32px}span.woocommerce-gzd-input-toggle:before{background:#fff;border-radius:100%;content:"";display:block;height:16px;position:absolute;right:0;top:0;width:16px}span.woocommerce-gzd-input-toggle.woocommerce-input-toggle--disabled{background-color:#999;border-color:#999}span.woocommerce-gzd-input-toggle.woocommerce-input-toggle--disabled:before{left:0;right:auto}.woocommerce-gzd-message{overflow:hidden;position:relative}.woocommerce-gzd-message ul{list-style-type:disc;padding-left:1.5em}.woocommerce-gzd-message .notice-dismiss{float:right;font-size:13px;line-height:1.2em;margin-top:-10px;padding:0 15px 10px 28px;position:static;text-decoration:none}.woocommerce-gzd-message .notice-dismiss:before{left:-20px;position:relative;top:18px;transition:all .1s ease-in-out}.woocommerce-gzd-message p.submit .button{margin-right:1em}.variable_cart_mini_desc .wp-editor-tools{margin-top:-3em}.variable_cart_mini_desc_pre .wp-editor-tools{margin-top:-2em}.wc-gzd-resend-activation-link{margin-top:1em!important}#variable_product_options .notice.wc-gzd-unit-price-disabled-notice{border-left-color:#dba617!important;border-left-width:4px!important;border-top:none!important;box-sizing:border-box;display:none;margin:1em 0!important;padding:5px 12px}._billing_address_1_field,._billing_title_field,._shipping_address_1_field,._shipping_title_field{width:100%!important}.wc-gzd-button{background-color:#639aff!important;background-image:linear-gradient(120deg,#639aff,#9a4dff)!important;border:1px solid transparent!important;box-shadow:inset 0 0 30px hsla(0,0%,100%,0),0 19px 25px -17px rgba(3,39,64,.4)!important;color:#fff!important;text-shadow:none!important;transition:transform .3s,box-shadow .3s ease-in-out,color .3s ease-in-out}.wc-gzd-button:hover{cursor:pointer;transform:scale(1.02)}.wc-gzd-button .wc-gzd-pro{background:#fff;color:#000;margin:0 2px}.wc-gzd-button .wc-gzd-pro:hover{color:#000}.wc-gzd-button .wc-gzd-pro-outlined{background:transparent;border-color:#fff;color:#fff;margin:0 2px}.wc-gzd-button .wc-gzd-pro-outlined:hover{color:#fff}.wc-gzd-button-wrapper .button{margin-right:1em}.product_tab_gzd_pro a:after,.product_type_gzd_pro:after,.wc-gzd-pro{background:#222;border-radius:3px;color:#fff;font-size:9px;font-style:normal;line-height:9px;opacity:1!important;padding:1px 3px;position:relative;text-align:center;text-decoration:none;text-transform:uppercase;top:-1px}a.wc-gzd-pro:not(.wc-gzd-pro-outlined):hover{background:#4a4a4a;color:#fff}.product_tab_gzd_pro a:after,.product_type_gzd_pro:after,.wc-gzd-pro-outlined{background:transparent;border:1px solid #222;color:#222;margin-left:5px;margin-top:3px}.product_tab_gzd_pro a:after:hover,.product_type_gzd_pro:after:hover,.wc-gzd-pro-outlined:hover{color:#222}.product_type_gzd_pro:after{content:"pro";font-weight:400}.product_tab_gzd_pro a:after{border-color:#2271b1;color:#2271b1;content:"pro";margin-left:0}.product_tab_gzd_pro a:hover:after{border-color:#135e96;color:#135e96}.product_tab_gzd_pro.active a:after{border-color:#555;color:#555}.wc-gzd-premium-overlay{border-left-color:#639aff!important}a .wc-gzd-pro-outlined{border:1px solid #0073aa;color:#0073aa;text-decoration:none}a .wc-gzd-pro-outlined:hover{color:#135e96}a.wc-gzd-pro-outlined{border:1px solid #0073aa;color:#0073aa!important;font-weight:700;margin:0 2px;text-decoration:none}a.wc-gzd-pro-outlined:hover{color:#135e96!important}a.page-title-action .wc-gzd-pro{background:#0073aa}a.page-title-action.invalid{border-color:#d63638;color:#d63638}a.page-title-action.invalid:hover{border-color:#b30e10;color:#b30e10}a.page-title-action:hover .wc-gzd-pro:not(.wc-gzd-pro-outlined){background:#0a4b78}.wc-gzd-premium-section-tab{background:#e4e4e4;border:1px solid #ccc;color:#555;padding:0 3px}.tourbus-leg-inner .wc-gzd-pro{top:-3px}p._variable_unit_price_auto_field input.checkbox{float:none!important;margin-right:5px!important}p._unit_price_auto_field label{display:block!important;margin-bottom:5px}p._unit_price_auto_field .wc-gzd-premium-desc{margin-right:5px}._unit_price_auto_field .wc-gzd-premium-desc,._unit_price_auto_field input,._unit_price_auto_field label{opacity:.6}table.wc-gzd-tax-example tr td,table.wc-gzd-tax-example tr th{font-size:.9em;padding:5px}table.wc-gzd-tax-example tr td:first-child,table.wc-gzd-tax-example tr th:first-child{padding-left:0}#gzd-admin-sepa{clear:both;display:block;padding-top:1em;width:100%}.wc-action-button-xml:after{content:""}#order_data .order_data_column a.download_sepa_xml{border:0;color:#999;float:right;height:0;margin:0 0 0 6px;overflow:hidden;padding:14px 0 0;position:relative;width:14px}#order_data .order_data_column a.download_sepa_xml:after{-webkit-font-smoothing:antialiased;content:"";font-family:Dashicons;font-size:14px;font-weight:400;left:0;line-height:14px;position:absolute;text-align:center;top:0;vertical-align:top}#order_data .order_data_column ._direct_debit_bic_field,#order_data .order_data_column ._direct_debit_holder_field,#order_data .order_data_column ._direct_debit_iban_field,#order_data .order_data_column ._direct_debit_mandate_id_field{clear:left;width:100%!important}#order_data .order_data_column ._direct_debit_bic_field input,#order_data .order_data_column ._direct_debit_holder_field input,#order_data .order_data_column ._direct_debit_iban_field input,#order_data .order_data_column ._direct_debit_mandate_id_field input{width:100%}#order_data ._shipping_parcelshop_post_number_field{clear:left;width:100%!important}.wc-gzd-text-red{color:red}.wc-gzd-status-text{font-weight:600}.wc-gzd-text-green{color:green}.order_actions .xml{display:block;height:2em!important;padding:0!important;position:relative;text-indent:-9999px;width:2em}.order_actions .xml:after{speak:none;-webkit-font-smoothing:antialiased;content:"";font-family:WooCommerce;font-variant:normal;font-weight:400;height:100%;left:0;line-height:1.85;margin:0;position:absolute;text-align:center;text-indent:0;text-transform:none;top:0;width:100%}.parcel-delivery-checkbox-status{clear:both;float:left;width:100%}.woocommerce_variation .variable-nutri-score .select2-container .select2-selection--single,.woocommerce_variation .variable_delivery_time .select2-container .select2-selection--single{height:40px}.woocommerce_variation .variable-nutri-score .select2-container .select2-selection--single .select2-selection__clear,.woocommerce_variation .variable_delivery_time .select2-container .select2-selection--single .select2-selection__clear{margin-right:10px}.woocommerce_variation .variable-nutri-score .select2-container .select2-selection--single .select2-selection__rendered,.woocommerce_variation .variable_delivery_time .select2-container .select2-selection--single .select2-selection__rendered{line-height:40px}.woocommerce_variation .variable-nutri-score .select2-container .select2-selection--single .select2-selection__arrow,.woocommerce_variation .variable_delivery_time .select2-container .select2-selection--single .select2-selection__arrow{height:36px;right:3px}.wc-gzd-dashicon{overflow:hidden;text-indent:-9999px}.wc-gzd-dashicon:before{display:block;text-indent:0}.wc-gzd-add-country-specific-delivery-time-template{display:none}#shipping_product_data .wc-gzd-add-country-specific-delivery-time{margin-bottom:-9px;margin-top:-9px}.woocommerce_variable_attributes .wc-gzd-add-country-specific-delivery-time{margin-bottom:0}.wc-metaboxes-wrapper .wc-metabox.woocommerce_variation .wc-gzd-inner-product-pro-tab-wrapper{margin:1em 0}.wc-metaboxes-wrapper .wc-metabox.woocommerce_variation .wc-gzd-inner-product-pro-tab-wrapper .wc-gzd-premium-overlay.notice{margin:0!important}.wc-metaboxes-wrapper .wc-metabox.woocommerce_variation .wc-gzd-inner-product-pro-tab-wrapper .wc-gzd-premium-overlay.notice p{font-size:13px;padding:2px}.wc-metaboxes-wrapper .wc-metabox.woocommerce_variation .wc-gzd-inner-product-pro-tab-wrapper .wc-gzd-premium-overlay.notice h3{padding-left:0!important}.wc-metaboxes-wrapper .wc-metabox.woocommerce_variation p.wc-gzd-product-settings-subtitle{background:#eee;clear:both;float:left;font-size:1em;font-weight:700;margin-left:-2em;padding:10px 2em;width:100%}.wc-metaboxes-wrapper .wc-metabox.woocommerce_variation p.wc-gzd-product-settings-subtitle .page-title-action{top:-1px}.wc-metaboxes-wrapper .wc-metabox.woocommerce_variation p.wc-gzd-product-settings-subtitle .wc-gzd-product-settings-action{float:right;font-weight:400;margin-left:1em;text-decoration:underline}.woocommerce_options_panel .wc-gzd-inner-product-pro-tab-wrapper{padding:20px}.woocommerce_options_panel .wc-gzd-inner-product-pro-tab-wrapper .wc-gzd-premium-overlay p{font-size:13px;padding:2px}.woocommerce_options_panel p.wc-gzd-product-settings-subtitle{background:#eee;font-size:1em;font-weight:700;margin-top:-1px;padding:10px 20px 10px 10px}.woocommerce_options_panel p.wc-gzd-product-settings-subtitle .page-title-action{top:-1px}.woocommerce_options_panel p.wc-gzd-product-settings-subtitle .wc-gzd-product-settings-action{float:right;font-weight:400;margin-left:1em;text-decoration:underline}.woocommerce_options_panel#food_product_data p.form-field span.description{clear:none;display:inline;margin-left:5px}.woocommerce_options_panel .nutrient_vitamins_field{width:50%}.woocommerce_options_panel .nutrient_vitamins_field .wrap input{width:30.75%}.woocommerce_options_panel .nutrient_vitamins_field .wrap .unit{float:left;margin-left:1%;margin-right:2.8%}.variable_warranty_attachment label{display:block;margin-bottom:2px;width:100%}.wc-gzd-product-upload-wrapper{display:flex;flex-wrap:wrap}.wc-gzd-product-upload-wrapper.wc-gzd-product-upload-wrapper-single{flex-direction:row-reverse;justify-content:flex-end}.wc-gzd-product-upload-wrapper.wc-gzd-product-upload-wrapper-single .wc-gzd-product-upload-remove{margin-left:.25em}.wc-gzd-product-upload-wrapper .wc-gzd-product-single-attachment{display:block}.wc-gzd-product-upload-wrapper .wc-gzd-product-upload-remove{color:#b32d2e;margin-right:1em;overflow:hidden;text-decoration:none;text-indent:0;vertical-align:middle}.wc-gzd-product-upload-wrapper .wc-gzd-product-upload-remove:before{content:""}.wc-gzd-product-upload-wrapper .wc-gzd-product-upload{align-self:flex-start;display:inline-flex}.wc-gzd-allergenic-field .select2-container .select2-selection--multiple{line-height:inherit}.wc-gzd-allergenic-field .select2-container--default .select2-selection--multiple li.select2-search--inline{line-height:1;margin-top:0}.wc-gzd-allergenic-field .select2-container--default .select2-selection--multiple li.select2-search--inline input.select2-search__field{min-height:25px}.wc-gzd-country-specific-delivery-time-field .wc-gzd-remove-country-specific-delivery-time{color:#b32d2e;overflow:hidden;text-decoration:none;text-indent:0;vertical-align:middle}.wc-gzd-country-specific-delivery-time-field.wc-gzd-country-specific-delivery-time-field-variation{align-items:center;display:flex;flex-wrap:wrap}.wc-gzd-country-specific-delivery-time-field.wc-gzd-country-specific-delivery-time-field-variation label{width:100%}.wc-gzd-country-specific-delivery-time-field.wc-gzd-country-specific-delivery-time-field-variation .select2-container{max-width:95%!important;width:95%!important}.wc-gzd-country-specific-delivery-time-field.wc-gzd-country-specific-delivery-time-field-variation .wc-gzd-remove-country-specific-delivery-time{margin-left:.5em}.wc-gzd-country-specific-delivery-time-field.wc-gzd-add-country-specific-delivery-time-field-variation{align-items:center;display:flex;width:100%}.wc-gzd-country-specific-delivery-time-field.wc-gzd-add-country-specific-delivery-time-field-variation label{flex-basis:30%;flex-grow:0;flex-shrink:0;margin-right:2%;width:auto}.wc-gzd-country-specific-delivery-time-field.wc-gzd-add-country-specific-delivery-time-field-variation .select2-container{max-width:63%!important;width:63%!important}.nutri-score-select-value.nutri-score-select-value-a{color:#038141}.nutri-score-select-value.nutri-score-select-value-b{color:#85bb2f}.nutri-score-select-value.nutri-score-select-value-c{color:#fecb02}.nutri-score-select-value.nutri-score-select-value-d{color:#ee8100}.nutri-score-select-value.nutri-score-select-value-e{color:#e63e11}.wrap .plugins p.wc-gzd-update-warning{border-top:1px solid #ffb900;margin:0 -12px;padding:.5em 0 .5em 12px}.wrap .plugins p.wc-gzd-update-warning:before{display:none}.wc-gzd-checkbox-log-list{max-width:400px}.wc-gzd-checkbox-log-list .wc-gzd-log-checkbox{display:flex;flex-wrap:wrap;justify-content:space-between;margin:1em 0}.wc-gzd-checkbox-log-list .wc-gzd-log-checkbox p.checkbox-status,.wc-gzd-checkbox-log-list .wc-gzd-log-checkbox p.checkbox-title{margin:0}.wc-gzd-checkbox-log-list .wc-gzd-log-checkbox:last-child{margin-bottom:0} diff --git a/build/static/admin-styles.js b/build/static/admin-styles.js new file mode 100644 index 000000000..c9d20d1da --- /dev/null +++ b/build/static/admin-styles.js @@ -0,0 +1 @@ +!function(){"use strict";var e={};(function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(e),((window.germanized=window.germanized||{}).static=window.germanized.static||{})["admin-styles"]=e}(); \ No newline at end of file diff --git a/build/static/admin-wizard-styles.asset.php b/build/static/admin-wizard-styles.asset.php new file mode 100644 index 000000000..acd4de213 --- /dev/null +++ b/build/static/admin-wizard-styles.asset.php @@ -0,0 +1 @@ + array(), 'version' => '3c58dbdd7968d50f3baf'); diff --git a/build/static/admin-wizard-styles.css b/build/static/admin-wizard-styles.css new file mode 100644 index 000000000..753e48c5e --- /dev/null +++ b/build/static/admin-wizard-styles.css @@ -0,0 +1 @@ +.step{display:flex;flex-wrap:nowrap;list-style:none;margin:.2rem 0;width:100%}.step .step-item{flex:1 1 0;margin-top:0;min-height:1rem;position:relative;text-align:center}.step .step-item:not(:first-child):before{background:#8865ff;content:"";height:2px;left:-50%;position:absolute;top:9px;width:100%}.step .step-item a{color:#8865ff;display:inline-block;padding:20px 10px 0;text-decoration:none}.step .step-item a:before{background:#8865ff;border:.1rem solid #f1f1f1;border-radius:50%;content:"";display:block;height:.6rem;left:50%;position:absolute;top:.2rem;transform:translateX(-50%);width:.6rem;z-index:1}.step .step-item.active a:before{background:#f1f1f1;border:.1rem solid #8865ff}.step .step-item.active~.step-item:before{background:#b5b5b5}.step .step-item.active~.step-item a{color:#b5b5b5}.step .step-item.active~.step-item a:before{background:#b5b5b5}body{background:#f1f1f1;border:none;box-shadow:none;margin:30px auto 24px;padding:0}.wc-gzd-setup .wc-gzd-setup-header{margin-top:5em;width:100%}.wc-gzd-setup .wc-gzd-setup-header .logo-wrapper{align-items:center;display:flex;justify-content:center;margin-bottom:1.5em}.wc-gzd-setup .wc-gzd-setup-header .logo-wrapper .logo{background:url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiCgkgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgoJIHg9IjBweCIgeT0iMHB4IiB3aWR0aD0iNTEycHgiIGhlaWdodD0iNTEycHgiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTIgNTEyOyI+CjxkZWZzPgo8L2RlZnM+CjxjaXJjbGUgaWQ9IkJHXzJfIiBjbGFzcz0ic3QwIiBjeD0iMjU2IiBjeT0iMjU2IiByPSIyNTYiIHN0eWxlPSJmaWxsOiAjOWE0ZGZmOyIvPgo8cGF0aCBpZD0iWE1MSURfMzFfIiBjbGFzcz0ic3QxIiBzdHlsZT0iZmlsbDogI0ZGRkZGRjsiIGQ9Ik0yNTEsMjQ1Ljg5VjI5N2g3Mi41NGMtOS4yNCwyMy0zNS43NSwzNy42LTY2LjY2LDM3LjZjLTQ0LjUyLDAtNzMuNzItMzEuODUtNzMuNzItNzguMzQKCWMwLTQ2Ljk4LDI5LjY4LTc4Ljg5LDczLjcyLTc4Ljg5YzI5Ljk4LDAsNTYuMjksMTUuNjMsNjYuOTMsNDAuNjNoODQuODhjLTUuMi0yOC0xOS4yNi01My41OC0zOS40OS03My4wNQoJYy0yOC4xNC0yNy4xMS02OC4yMi00My40LTExMy4wNS00My40Yy00NS4wOSwwLTgzLjkxLDE2LjE4LTExMS41NCw0My40NGMtMjcuODgsMjcuNS00NC4zNiw2Ni4zMy00NC4zNiwxMTEuMjUKCWMwLDg5LjQ1LDY2LjU0LDE1NC4xOSwxNTYuNjIsMTU0LjE5YzkyLjA3LDAsMTU1LjEyLTY4LjM1LDE1NS4xMi0xNjQuNTVMMjUxLDI0NS44OXoiLz4KPGcgaWQ9IlhNTElEXzIzXyI+Cgk8Y2xpcFBhdGggaWQ9IlhNTElEXzMzXyI+CgkJPHBhdGggaWQ9IlhNTElEXzI0XyIgZD0iTTI1MSwyNDUuODlWMjk3aDcyLjU0Yy05LjI0LDIzLTM1Ljc1LDM3LjYtNjYuNjYsMzcuNmMtNDQuNTIsMC03My43Mi0zMS44NS03My43Mi03OC4zNAoJCQljMC00Ni45OCwyOS42OC03OC44OSw3My43Mi03OC44OWMyOS45OCwwLDU2LjI5LDE1LjYzLDY2LjkzLDQwLjYzaDg0Ljg4Yy01LjItMjgtMTkuMjYtNTMuNTgtMzkuNDktNzMuMDUKCQkJYy0yOC4xNC0yNy4xMS02OC4yMi00My40LTExMy4wNS00My40Yy00NS4wOSwwLTgzLjkxLDE2LjE4LTExMS41NCw0My40NGMtMjcuODgsMjcuNS00NC4zNiw2Ni4zMy00NC4zNiwxMTEuMjUKCQkJYzAsODkuNDUsNjYuNTQsMTU0LjE5LDE1Ni42MiwxNTQuMTljOTIuMDcsMCwxNTUuMTItNjguMzUsMTU1LjEyLTE2NC41NUwyNTEsMjQ1Ljg5eiIvPgoJPC9jbGlwUGF0aD4KCTxnIGlkPSJYTUxJRF8yN18iIGNsYXNzPSJzdDIiIGNsaXAtcGF0aD0idXJsKCNYTUxJRF8zM18pIj4KCQk8cmVjdCBpZD0iWE1MSURfMzBfIiBzdHlsZT0iZmlsbDojMjIyNzJDOyIgeD0iODYuNjciIHk9Ijk4LjYzIiBjbGFzcz0ic3QzIiB3aWR0aD0iMzM3LjIyIiBoZWlnaHQ9IjQxLjc5Ii8+CgkJPHJlY3QgaWQ9IlhNTElEXzI5XyIgc3R5bGU9ImZpbGw6I0ZFMDAwMDsiIHg9Ijg2LjY3IiB5PSIxNDAuMDYiIGNsYXNzPSJzdDQiIHdpZHRoPSIzMzcuMjIiIGhlaWdodD0iMzguODgiLz4KCQk8cmVjdCBpZD0iWE1MSURfMjhfIiBzdHlsZT0iZmlsbDojRkZDQzAwOyIgeD0iODYuNjciIHk9IjE3OC42NSIgY2xhc3M9InN0NSIgd2lkdGg9IjMzNy4yMiIgaGVpZ2h0PSIzOS41Ii8+Cgk8L2c+CjwvZz4KPC9zdmc+Cg==) no-repeat;background-size:contain;display:inline-block;height:7em;text-indent:-9999px;vertical-align:top;width:7em}.step .step-item a:active,.step .step-item a:focus,.step .step-item a:visited{box-shadow:none}.wc-gzd-setup-content{zoom:1;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.13);margin-top:1.5em;overflow:hidden;padding:24px}.wc-gzd-setup-content a{color:#8865ff}.wc-gzd-setup-content .error{box-shadow:none;margin:0 0 1.5em}.wc-gzd-setup-content h1{border-bottom:none;margin-top:0}.wc-gzd-setup-content .wc-gzd-admin-settings .woocommerce-input-toggle:not(.woocommerce-input-toggle--disabled){background-color:#8865ff;border-color:#8865ff}.wc-gzd-setup-content .wc-gzd-admin-settings .wc-gzd-additional-desc{background:rgba(136,101,255,.08)}.wc-gzd-setup-content .wc-gzd-admin-settings .wc-gzd-additional-desc a{color:#8865ff;text-decoration:none}.wc-gzd-setup-content .wc-gzd-admin-settings h2{display:none}.wc-gzd-setup-content .wc-gzd-admin-settings .wc-gzd-label-wrap{display:inline-block}.wc-gzd-setup-content .wc-gzd-admin-settings .form-table th{font-weight:600;line-height:1.3;padding:14px 14px 20px 0;position:relative;text-align:left;vertical-align:top;width:150px}.wc-gzd-setup-content .wc-gzd-admin-settings .form-table td{line-height:1.3;margin-bottom:9px;padding:15px 10px;vertical-align:middle}.wc-gzd-setup-content .wc-gzd-admin-settings .form-table td p.description{margin-top:0}.wc-gzd-setup-content .wc-gzd-admin-settings .form-table .status-disabled{display:inline-block}.wc-gzd-setup-content p.headliner{border-bottom:1px solid #b5b5b5;font-size:16px;line-height:2;margin-bottom:1.5em;padding-bottom:1em}.wc-gzd-setup-content p.headliner.no-border{border-bottom:none;margin-bottom:0;padding-bottom:0}.wc-gzd-setup-content p.desc{font-size:11px;line-height:2}.wc-gzd-setup-content p.desc code{font-size:inherit}.wc-gzd-setup-content p.form-wrapper input[type=text]{padding:10px;width:100%}.wc-gzd-setup-content h2{border-bottom:none;border-top:1px solid #b5b5b5;margin-top:1em;padding-top:1em}.wc-gzd-setup-content ul.demo-layouts{list-style:none;padding:0}.wc-gzd-setup-content ul.demo-layouts li.demo-layout{max-width:100%;overflow:hidden;width:33.3333333%}.wc-gzd-setup-content ul.demo-layouts li.demo-layout label .desc{font-size:16px;font-weight:600}.wc-gzd-setup-content ul.demo-layouts li.demo-layout img{height:auto;margin-top:1em;width:100%}.wc-gzd-setup-content .wc-gzd-setup-grid{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;margin-left:-.5rem;margin-right:-.5rem}.wc-gzd-setup-content .wc-gzd-setup-grid .wc-gzd-setup-grid-item{box-sizing:border-box;flex:none;max-width:100%;padding-left:.5rem;padding-right:.5rem;width:50%}.wc-gzd-setup-content ul.more{padding-left:0}.wc-gzd-setup-content ul.more li a{color:#444;text-decoration:none}.wc-gzd-setup-footer{margin-top:1em;padding-bottom:1.5em}.wc-gzd-setup-footer .wc-gzd-setup-links{display:flex;flex-wrap:wrap;justify-content:flex-end}.wc-gzd-setup-footer .wc-gzd-setup-link{text-decoration:none}.wc-gzd-setup-footer .wc-gzd-setup-link.wc-gzd-setup-link-skip{color:#b5b5b5;margin-right:2em;margin-top:.5em}.wc-gzd-setup-footer .button-primary{font-size:1.25em;height:auto;line-height:1em;padding:.5em 1em}.wc-gzd-setup-footer .escape{margin-top:1em;text-align:center}.wc-gzd-setup-footer .escape a{color:#b5b5b5;font-size:11px} diff --git a/build/static/admin-wizard-styles.js b/build/static/admin-wizard-styles.js new file mode 100644 index 000000000..1c25af8cf --- /dev/null +++ b/build/static/admin-wizard-styles.js @@ -0,0 +1 @@ +!function(){"use strict";var e={};(function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(e),((window.germanized=window.germanized||{}).static=window.germanized.static||{})["admin-wizard-styles"]=e}(); \ No newline at end of file diff --git a/build/static/admin.asset.php b/build/static/admin.asset.php new file mode 100644 index 000000000..ed7472e74 --- /dev/null +++ b/build/static/admin.asset.php @@ -0,0 +1 @@ + array(), 'version' => '8d14aaae17ae0068ffbf'); diff --git a/build/static/admin.js b/build/static/admin.js new file mode 100644 index 000000000..7e1e34794 --- /dev/null +++ b/build/static/admin.js @@ -0,0 +1 @@ +!function(){var e,n;window.germanized=window.germanized||{},e=jQuery,(n=window.germanized).admin={params:{},init:function(){this.params=wc_gzd_admin_params,e(document).on("click","a.woocommerce-gzd-input-toggle-trigger",this.onInputToogleClick)},onInputToogleClick:function(){var n=e(this).find("span.woocommerce-gzd-input-toggle"),o=n.parents("fieldset"),i=o.find("input[type=checkbox]").length>0?o.find("input[type=checkbox]"):n.parent().nextAll("input[type=checkbox]:first"),t=n.hasClass("woocommerce-input-toggle--enabled");return n.removeClass("woocommerce-input-toggle--enabled"),n.removeClass("woocommerce-input-toggle--disabled"),t?(i.prop("checked",!1),n.addClass("woocommerce-input-toggle--disabled")):(i.prop("checked",!0),n.addClass("woocommerce-input-toggle--enabled")),i.trigger("change"),!1}},e(document).ready((function(){n.admin.init()})),((window.germanized=window.germanized||{}).static=window.germanized.static||{}).admin={}}(); \ No newline at end of file diff --git a/build/static/cart-voucher.asset.php b/build/static/cart-voucher.asset.php new file mode 100644 index 000000000..7dbc3f822 --- /dev/null +++ b/build/static/cart-voucher.asset.php @@ -0,0 +1 @@ + array(), 'version' => '56ddd15c18d0f3513f59'); diff --git a/build/static/cart-voucher.js b/build/static/cart-voucher.js new file mode 100644 index 000000000..62d22ead3 --- /dev/null +++ b/build/static/cart-voucher.js @@ -0,0 +1 @@ +!function(){var e,t;window.germanized=window.germanized||{},e=jQuery,(t=window.germanized).cart_voucher={params:{},vouchers:{},init:function(){this.params=wc_gzd_cart_voucher_params,this.vouchers=wc_gzd_cart_voucher_params.vouchers,e(".woocommerce-checkout").length&&this.manipulate_checkout_totals(),e(".woocommerce-cart-form").length&&this.manipulate_cart_totals(),e(document.body).on("updated_cart_totals",this.manipulate_cart_totals),e(document.body).on("updated_checkout",this.manipulate_checkout_totals),e(document.body).on("applied_coupon",this.refresh_cart_vouchers),e(document.body).on("removed_coupon",this.refresh_cart_vouchers)},refresh_cart_vouchers:function(){var o=t.cart_voucher;setTimeout((function(){e.ajax({type:"POST",url:o.params.wc_ajax_url.toString().replace("%%endpoint%%","gzd_refresh_cart_vouchers"),data:{security:o.params.refresh_cart_vouchers_nonce},success:function(e){o.vouchers=e.vouchers,o.manipulate_cart_totals()},dataType:"json"})}),75)},manipulate_checkout_totals:function(o,r){var c=t.cart_voucher,a=e(".woocommerce-checkout #order_review table");(r=void 0===r?{}:r).hasOwnProperty("fragments")&&r.fragments.hasOwnProperty(".gzd-vouchers")&&(c.vouchers=r.fragments[".gzd-vouchers"]),c.params.display_prices_including_tax||c.move_vouchers_before_total_checkout(),c.manipulate_coupons(a)},manipulate_cart_totals:function(){var o=e(".cart_totals table"),r=o.find("tr.order-total"),c=t.cart_voucher;c.params.display_prices_including_tax||(c.move_vouchers_before_total(o,r),e(".woocommerce-checkout").length&&c.move_vouchers_before_total_checkout()),c.manipulate_coupons(o)},manipulate_coupons:function(o){var r=t.cart_voucher;e.each(r.vouchers,(function(e,t){var c=r.get_voucher_coupon(t,o),a=r.get_voucher_fee(t,o);if(c.hide(),a.length>0&&c.length>0){var n=c.find("a.woocommerce-remove-coupon");n.length>0&&(a.find("td:last").append(" "),a.find("td:last").append(n))}}))},move_vouchers_before_total_checkout:function(){var o=e(".woocommerce-checkout #order_review table"),r=o.find("tr.order-total");t.cart_voucher.move_vouchers_before_total(o,r)},get_voucher_fee:function(t,o){var r=!1;return o.find("tr.fee").each((function(){$tr=e(this);var o=$tr.find("th").text();o.substr(o.length-t.code.length)===t.code&&(r=$tr)})),r||(r=o.find('tr.fee th:contains("'+t.name+'")').parents("tr")),r},get_voucher_coupon:function(e,t){return t.find("tr."+e.coupon_class)},move_vouchers_before_total:function(o,r){var c=t.cart_voucher;e.each(c.vouchers,(function(e,t){var a=c.get_voucher_fee(t,o);a.length>0&&a.insertBefore(r)}))}},e(document).ready((function(){t.cart_voucher.init()})),((window.germanized=window.germanized||{}).static=window.germanized.static||{})["cart-voucher"]={}}(); \ No newline at end of file diff --git a/build/static/checkout.asset.php b/build/static/checkout.asset.php new file mode 100644 index 000000000..fb07247b3 --- /dev/null +++ b/build/static/checkout.asset.php @@ -0,0 +1 @@ + array(), 'version' => '14d3d7f2c2c2878e9e58'); diff --git a/build/static/checkout.js b/build/static/checkout.js new file mode 100644 index 000000000..02bcb3dc1 --- /dev/null +++ b/build/static/checkout.js @@ -0,0 +1 @@ +!function(){var e,o;window.germanized=window.germanized||{},e=jQuery,(o=window.germanized).checkout={params:{},init:function(){this.params=wc_gzd_checkout_params,this.checkoutAdjustmentsDisabled()&&e("body").removeClass("woocommerce-gzd-checkout"),e(".payment_methods:first").parents("#order_review").length&&e(document.body).on("payment_method_selected",this.triggerCheckoutRefresh),e(document.body).on("updated_checkout",this.onUpdateCheckout).on("checkout_error",this.onCheckoutError),this.params.has_privacy_checkbox&&e(document).on("change","input#createaccount",this.triggerCheckoutRefresh),e(document).on("change","input#"+this.params.checkbox_photovoltaic_systems_id,this.triggerCheckoutRefresh),this.params.checkbox_hidden?this.maybeSetTermsCheckbox():e(document).on("change","input#"+this.params.checkbox_id,this.onChangeLegalCheckbox),this.adjustHeading()},checkoutAdjustmentsDisabled(){return!e("body").hasClass("woocommerce-gzd-checkout")||e("input#wc_gzd_checkout_disabled").length>0},adjustHeading(){var c=o.checkout;if(c.params.adjust_heading&&!c.checkoutAdjustmentsDisabled()){var t=e("form.checkout:visible"),r=t.find("#order_review_heading:first");if(r&&r.removeClass("wc-gzd-heading-moved wc-gzd-maybe-show-heading"),c.params.custom_heading_container){var n=t.find(this.params.custom_heading_container);n.length>0&&r.length>0&&(n.prepend(r),n.is(":visible")?t.find("#order_review_heading:first").show():t.find("#order_review_heading:first").addClass("wc-gzd-maybe-show-heading"))}else{var d=t.find(".shop_table:visible, #payment:visible"),a=d.first();r.length>0&&(a.length>0&&2===d.length&&"payment"===a.attr("id")&&(r.addClass("wc-gzd-heading-moved"),a.after(r)),e("#order_review:visible").length>0?t.find("#order_review_heading:first").show():t.find("#order_review_heading:first").addClass("wc-gzd-maybe-show-heading"))}e(document.body).trigger("wc_gzd_updated_checkout_heading")}},onCheckoutError:function(c,t){if(o.checkout.params.mark_checkout_error_fields){var r=e("form.checkout"),n=e(t),d=n.length>0?n.find("[data-id]"):null;d&&d.length>0&&d.each((function(){var o=e(this);if(o.data("id")){var c=o.data("id"),t=r.find("#"+c);if(t.length>0){var n=t.closest(".form-row");n.length>0&&n.removeClass("woocommerce-validated").addClass("woocommerce-invalid woocommerce-invalid-required-field")}}}))}},maybeSetTermsCheckbox:function(){var c=o.checkout,t=e("input#"+c.params.checkbox_id),r=e("input[name=terms]");r.length>0&&(c.params.checkbox_hidden||t.is(":checked")?r.prop("checked",!0):r.prop("checked",!1))},onChangeLegalCheckbox:function(){o.checkout.maybeSetTermsCheckbox()},triggerCheckoutRefresh:function(){e("body").trigger("update_checkout")},onUpdateCheckout:function(c,t){var r=o.checkout;if(r.params.adjust_heading&&(e(".woocommerce-checkout").find("#order_payment_heading").length>0&&(e(".woocommerce-checkout").find(".wc_payment_methods").length<=0?e(".woocommerce-checkout").find("#order_payment_heading").hide():e(".woocommerce-checkout").find("#order_payment_heading").show()),r.adjustHeading()),e(".wc-gzd-place-order").length>0){if(e(".place-order:not(.wc-gzd-place-order)").length>0&&(e(".place-order:not(.wc-gzd-place-order)").find("#_wpnonce").appendTo(".wc-gzd-place-order"),e(".place-order:not(.wc-gzd-place-order)").find("#woocommerce-process-checkout-nonce").appendTo(".wc-gzd-place-order")),e(".place-order:not(.wc-gzd-place-order)").remove(),!e(".wc-gzd-place-order").find("#woocommerce-process-checkout-nonce, #_wpnonce").length&&t.fragments.hasOwnProperty(".woocommerce-checkout-payment")){$payment_wrap=e(t.fragments[".woocommerce-checkout-payment"]);var n=$payment_wrap.find("#woocommerce-process-checkout-nonce, #_wpnonce");n.length>0&&e(".wc-gzd-place-order").append(n)}var d=e(".wc-gzd-place-order:visible").find("#woocommerce-process-checkout-nonce, #_wpnonce");d.length>1&&d.not(":not(:first-child):not(:last-child)").remove()}r.maybeSetTermsCheckbox()}},e(document).ready((function(){o.checkout.init()})),((window.germanized=window.germanized||{}).static=window.germanized.static||{}).checkout={}}(); \ No newline at end of file diff --git a/build/static/direct-debit.asset.php b/build/static/direct-debit.asset.php new file mode 100644 index 000000000..244dad514 --- /dev/null +++ b/build/static/direct-debit.asset.php @@ -0,0 +1 @@ + array(), 'version' => '674078196df3e93c5286'); diff --git a/build/static/direct-debit.js b/build/static/direct-debit.js new file mode 100644 index 000000000..1b069ef83 --- /dev/null +++ b/build/static/direct-debit.js @@ -0,0 +1 @@ +jQuery((function(e){var i={$checkoutForm:e("form.checkout, form#order_review"),params:{},init:function(){this.params=direct_debit_params,this.$checkoutForm.on("blur input change","#direct-debit-form input#direct-debit-account-holder",this.onValidateHolder),this.$checkoutForm.on("blur input change","#direct-debit-form input#direct-debit-account-iban",this.onValidateIBAN),this.$checkoutForm.on("blur input change","#direct-debit-form input#direct-debit-account-bic",this.onValidateSWIFT),this.$checkoutForm.on("blur input change","input, select",this.maybeShowCheckbox),e(document.body).on("updated_checkout",this.maybeShowCheckbox),e(document).on("click","a#show-direct-debit-trigger",this.onPrettyPhotoOpen),this.initPrettyPhoto()},onValidateIBAN:function(){var t=i,o=e(this).parents("p.form-row");t.isValidIBAN(e(this).val())?(o.addClass("woocommerce-validated"),o.removeClass("woocommerce-invalid woocommerce-invalid-required-field")):(o.removeClass("woocommerce-validated"),o.addClass("woocommerce-invalid woocommerce-invalid-required-field"))},onValidateSWIFT:function(){var t=i,o=e(this).parents("p.form-row");t.isValidSWIFT(e(this).val())?(o.addClass("woocommerce-validated"),o.removeClass("woocommerce-invalid woocommerce-invalid-required-field")):(o.removeClass("woocommerce-validated"),o.addClass("woocommerce-invalid woocommerce-invalid-required-field"))},onValidateHolder:function(){var i=e(this).parents("p.form-row");e(this).val()?(i.addClass("woocommerce-validated"),i.removeClass("woocommerce-invalid woocommerce-invalid-required-field")):(i.removeClass("woocommerce-validated"),i.addClass("woocommerce-invalid woocommerce-invalid-required-field"))},isValidIBAN:function(e){return window.hasOwnProperty("IBAN")?window.IBAN.isValid(e):window.germanized.static.iban.isValid(e)},isValidSWIFT:function(e){return/^([a-zA-Z]){4}([a-zA-Z]){2}([0-9a-zA-Z]){2}([0-9a-zA-Z]{3})?$/.test(e)},maybeShowCheckbox:function(){var t=i;e(".direct-debit-checkbox").hide(),e("#direct-debit-form").length&&e("#payment_method_direct-debit").is(":checked")&&e("input#direct-debit-account-holder").val()&&e("input#direct-debit-account-iban").val()&&e("input#direct-debit-account-bic").val()&&(e(".direct-debit-checkbox").show(),t.initPrettyPhoto())},onPrettyPhotoOpen:function(t){var o=i;t.preventDefault();var a=e(this).attr("href"),r={};e.each(o.params.mandate_fields,(function(i,t){e("input"+t+", select"+t).length>0?r[i]=e("input"+t+", select"+t).val():r[i]=""})),a+="&ajax=true&"+jQuery.param(r),e("#show-direct-debit-pretty").attr("href",a),e("#show-direct-debit-pretty").trigger("click")},initPrettyPhoto:function(){e("a#show-direct-debit-pretty").prettyPhoto({social_tools:!1,theme:"pp_woocommerce",horizontal_padding:20,opacity:.8,deeplinking:!1})}};i.init()})),((window.germanized=window.germanized||{}).static=window.germanized.static||{})["direct-debit"]={}; \ No newline at end of file diff --git a/build/static/force-pay-order.asset.php b/build/static/force-pay-order.asset.php new file mode 100644 index 000000000..8c972f7e9 --- /dev/null +++ b/build/static/force-pay-order.asset.php @@ -0,0 +1 @@ + array(), 'version' => '0a79cffcc7cced9ad6dc'); diff --git a/build/static/force-pay-order.js b/build/static/force-pay-order.js new file mode 100644 index 000000000..f0cb1244a --- /dev/null +++ b/build/static/force-pay-order.js @@ -0,0 +1 @@ +jQuery((function(e){e("#order_review").length>0&&e("input#payment_method_"+wc_gzd_force_pay_order_params.gateway).length>0&&($payment_box=e("div.payment_method_"+wc_gzd_force_pay_order_params.gateway),do_submit=wc_gzd_force_pay_order_params.auto_submit,$payment_box.length>0&&$payment_box.find(":input").length>0&&(do_submit=!1),e("input#payment_method_"+wc_gzd_force_pay_order_params.gateway).prop("checked",!0).trigger("click"),do_submit&&(e("#order_review").block({message:wc_gzd_force_pay_order_params.block_message,css:{padding:"1em","white-space":"pre-wrap"},overlayCSS:{background:"#fff",opacity:.6}}),e("#order_review").trigger("submit")))})),((window.germanized=window.germanized||{}).static=window.germanized.static||{})["force-pay-order"]={}; \ No newline at end of file diff --git a/build/static/iban.asset.php b/build/static/iban.asset.php new file mode 100644 index 000000000..47bb0e081 --- /dev/null +++ b/build/static/iban.asset.php @@ -0,0 +1 @@ + array(), 'version' => '201e4abc602870e672b7'); diff --git a/build/static/iban.js b/build/static/iban.js new file mode 100644 index 000000000..f8b982883 --- /dev/null +++ b/build/static/iban.js @@ -0,0 +1 @@ +!function(){var e={};(function(e){Array.prototype.map||(Array.prototype.map=function(e){"use strict";if(null==this)throw new TypeError;var n=Object(this),F=n.length>>>0;if("function"!=typeof e)throw new TypeError;for(var t=new Array(F),r=arguments.length>=2?arguments[1]:void 0,i=0;i=n&&t<=F?t-n+10:e})).join("")}function r(e){for(var n,F=e;F.length>2;)n=F.slice(0,9),F=parseInt(n,10)%97+F.slice(n.length);return parseInt(F,10)%97}function i(e,n,F,t){this.countryCode=e,this.length=n,this.structure=F,this.example=t}i.prototype._regex=function(){return this._cachedRegex||(this._cachedRegex=(e=this.structure.match(/(.{3})/g).map((function(e){var n,F=e.slice(0,1),t=parseInt(e.slice(1),10);switch(F){case"A":n="0-9A-Za-z";break;case"B":n="0-9A-Z";break;case"C":n="A-Za-z";break;case"F":n="0-9";break;case"L":n="a-z";break;case"U":n="A-Z";break;case"W":n="0-9a-z"}return"(["+n+"]{"+t+"})"})),new RegExp("^"+e.join("")+"$")));var e},i.prototype.isValid=function(e){return this.length==e.length&&this.countryCode===e.slice(0,2)&&this._regex().test(e.slice(4))&&1==r(t(e))},i.prototype.toBBAN=function(e,n){return this._regex().exec(e.slice(4)).slice(1).join(n)},i.prototype.fromBBAN=function(e){if(!this.isValidBBAN(e))throw new Error("Invalid BBAN");var n=("0"+(98-r(t(this.countryCode+"00"+e)))).slice(-2);return this.countryCode+n+e},i.prototype.isValidBBAN=function(e){return this.length-4==e.length&&this._regex().test(e)};var A={};function o(e){A[e.countryCode]=e}o(new i("AD",24,"F04F04A12","AD1200012030200359100100")),o(new i("AE",23,"F03F16","AE070331234567890123456")),o(new i("AL",28,"F08A16","AL47212110090000000235698741")),o(new i("AT",20,"F05F11","AT611904300234573201")),o(new i("AZ",28,"U04A20","AZ21NABZ00000000137010001944")),o(new i("BA",20,"F03F03F08F02","BA391290079401028494")),o(new i("BE",16,"F03F07F02","BE68539007547034")),o(new i("BG",22,"U04F04F02A08","BG80BNBG96611020345678")),o(new i("BH",22,"U04A14","BH67BMAG00001299123456")),o(new i("BR",29,"F08F05F10U01A01","BR9700360305000010009795493P1")),o(new i("CH",21,"F05A12","CH9300762011623852957")),o(new i("CR",21,"F03F14","CR0515202001026284066")),o(new i("CY",28,"F03F05A16","CY17002001280000001200527600")),o(new i("CZ",24,"F04F06F10","CZ6508000000192000145399")),o(new i("DE",22,"F08F10","DE89370400440532013000")),o(new i("DK",18,"F04F09F01","DK5000400440116243")),o(new i("DO",28,"U04F20","DO28BAGR00000001212453611324")),o(new i("EE",20,"F02F02F11F01","EE382200221020145685")),o(new i("ES",24,"F04F04F01F01F10","ES9121000418450200051332")),o(new i("FI",18,"F06F07F01","FI2112345600000785")),o(new i("FO",18,"F04F09F01","FO6264600001631634")),o(new i("FR",27,"F05F05A11F02","FR1420041010050500013M02606")),o(new i("GB",22,"U04F06F08","GB29NWBK60161331926819")),o(new i("GE",22,"U02F16","GE29NB0000000101904917")),o(new i("GI",23,"U04A15","GI75NWBK000000007099453")),o(new i("GL",18,"F04F09F01","GL8964710001000206")),o(new i("GR",27,"F03F04A16","GR1601101250000000012300695")),o(new i("GT",28,"A04A20","GT82TRAJ01020000001210029690")),o(new i("HR",21,"F07F10","HR1210010051863000160")),o(new i("HU",28,"F03F04F01F15F01","HU42117730161111101800000000")),o(new i("IE",22,"U04F06F08","IE29AIBK93115212345678")),o(new i("IL",23,"F03F03F13","IL620108000000099999999")),o(new i("IS",26,"F04F02F06F10","IS140159260076545510730339")),o(new i("IT",27,"U01F05F05A12","IT60X0542811101000000123456")),o(new i("KW",30,"U04A22","KW81CBKU0000000000001234560101")),o(new i("KZ",20,"F03A13","KZ86125KZT5004100100")),o(new i("LB",28,"F04A20","LB62099900000001001901229114")),o(new i("LI",21,"F05A12","LI21088100002324013AA")),o(new i("LT",20,"F05F11","LT121000011101001000")),o(new i("LU",20,"F03A13","LU280019400644750000")),o(new i("LV",21,"U04A13","LV80BANK0000435195001")),o(new i("MC",27,"F05F05A11F02","MC5811222000010123456789030")),o(new i("MD",24,"U02F18","MD24AG000225100013104168")),o(new i("ME",22,"F03F13F02","ME25505000012345678951")),o(new i("MK",19,"F03A10F02","MK07250120000058984")),o(new i("MR",27,"F05F05F11F02","MR1300020001010000123456753")),o(new i("MT",31,"U04F05A18","MT84MALT011000012345MTLCAST001S")),o(new i("MU",30,"U04F02F02F12F03U03","MU17BOMM0101101030300200000MUR")),o(new i("NL",18,"U04F10","NL91ABNA0417164300")),o(new i("NO",15,"F04F06F01","NO9386011117947")),o(new i("PK",24,"U04A16","PK36SCBL0000001123456702")),o(new i("PL",28,"F08F16","PL61109010140000071219812874")),o(new i("PS",29,"U04A21","PS92PALS000000000400123456702")),o(new i("PT",25,"F04F04F11F02","PT50000201231234567890154")),o(new i("RO",24,"U04A16","RO49AAAA1B31007593840000")),o(new i("RS",22,"F03F13F02","RS35260005601001611379")),o(new i("SA",24,"F02A18","SA0380000000608010167519")),o(new i("SE",24,"F03F16F01","SE4550000000058398257466")),o(new i("SI",19,"F05F08F02","SI56263300012039086")),o(new i("SK",24,"F04F06F10","SK3112000000198742637541")),o(new i("SM",27,"U01F05F05A12","SM86U0322509800000000270100")),o(new i("TN",24,"F02F03F13F02","TN5910006035183598478831")),o(new i("TR",26,"F05A01A16","TR330006100519786457841326")),o(new i("VG",24,"U04F16","VG96VPVG0000012345678901")),o(new i("AO",25,"F21","AO69123456789012345678901")),o(new i("BF",27,"F23","BF2312345678901234567890123")),o(new i("BI",16,"F12","BI41123456789012")),o(new i("BJ",28,"F24","BJ39123456789012345678901234")),o(new i("CI",28,"U01F23","CI17A12345678901234567890123")),o(new i("CM",27,"F23","CM9012345678901234567890123")),o(new i("CV",25,"F21","CV30123456789012345678901")),o(new i("DZ",24,"F20","DZ8612345678901234567890")),o(new i("IR",26,"F22","IR861234568790123456789012")),o(new i("JO",30,"A04F22","JO15AAAA1234567890123456789012")),o(new i("MG",27,"F23","MG1812345678901234567890123")),o(new i("ML",28,"U01F23","ML15A12345678901234567890123")),o(new i("MZ",25,"F21","MZ25123456789012345678901")),o(new i("QA",29,"U04A21","QA30AAAA123456789012345678901")),o(new i("SN",28,"U01F23","SN52A12345678901234567890123")),o(new i("UA",29,"F25","UA511234567890123456789012345"));var w=/[^a-zA-Z0-9]/g,c=/(.{4})(?!$)/g;function a(e){return"string"==typeof e||e instanceof String}e.isValid=function(e){if(!a(e))return!1;e=this.electronicFormat(e);var n=A[e.slice(0,2)];return!!n&&n.isValid(e)},e.toBBAN=function(e,n){void 0===n&&(n=" "),e=this.electronicFormat(e);var F=A[e.slice(0,2)];if(!F)throw new Error("No country with code "+e.slice(0,2));return F.toBBAN(e,n)},e.fromBBAN=function(e,n){var F=A[e];if(!F)throw new Error("No country with code "+e);return F.fromBBAN(this.electronicFormat(n))},e.isValidBBAN=function(e,n){if(!a(n))return!1;var F=A[e];return F&&F.isValidBBAN(this.electronicFormat(n))},e.printFormat=function(e,n){return void 0===n&&(n=" "),this.electronicFormat(e).replace(c,"$1"+n)},e.electronicFormat=function(e){return e.replace(w,"").toUpperCase()},e.countries=A})(e),((window.germanized=window.germanized||{}).static=window.germanized.static||{}).iban=e}(); \ No newline at end of file diff --git a/build/static/layout-styles.asset.php b/build/static/layout-styles.asset.php new file mode 100644 index 000000000..0d1589154 --- /dev/null +++ b/build/static/layout-styles.asset.php @@ -0,0 +1 @@ + array(), 'version' => '459f915ce0400e8a21cc'); diff --git a/build/static/layout-styles.css b/build/static/layout-styles.css new file mode 100644 index 000000000..cfd5e1312 --- /dev/null +++ b/build/static/layout-styles.css @@ -0,0 +1 @@ +.product-type-variable div.product ul.tabs li.product_safety_tab,.wc-gzd-additional-info-placeholder,p.wc-gzd-additional-info:empty{display:none}#order_review .wc-gzd-checkbox-placeholder{clear:both}#order_review .wc-gzd-checkbox-placeholder p.form-row{float:none;padding:0 1em 0 0;text-align:left}#order_review .wc-gzd-checkbox-placeholder p.form-row label{display:inline}.woocommerce-checkout .shop_table{background-color:#eee}@media(min-width:768px){table.woocommerce-checkout-review-order-table tr.wc-gzd-cart-item-has-thumbnail .wc-gzd-cart-item-name-wrapper{align-items:center;display:flex}}table.woocommerce-checkout-review-order-table tr.wc-gzd-cart-item-has-thumbnail .wc-gzd-cart-item-name-wrapper .wc-gzd-cart-item-thumbnail{margin-right:1em;max-width:15%;min-width:60px}table.woocommerce-checkout-review-order-table tr.wc-gzd-cart-item-has-thumbnail .wc-gzd-cart-item-name-wrapper .wc-gzd-cart-item-thumbnail img{margin:0}body.theme-astra table.woocommerce-checkout-review-order-table tr.wc-gzd-cart-item-has-thumbnail td.product-name{flex-wrap:wrap}.cart_totals tr.order-total-differential-taxation-notice td:before,.cart_totals tr.order-total-small-business-notice td:before{content:""!important}.includes_tax,.tax_label,.woocommerce-cart dl.variation dd[class*=variation-gzd-],.woocommerce-cart dl.variation dt[class*=variation-gzd-],.woocommerce-checkout dl.variation dd[class*=variation-gzd-],.woocommerce-checkout dl.variation dt[class*=variation-gzd-]{display:none!important}.wc-gzd-small-business-includes-tax{display:inline!important;font-size:.9em;padding-left:3px}.woocommerce-gzd-checkout #order_review_heading{display:none}.woocommerce-checkout .shop_table tr td p{margin-bottom:0}.woocommerce-checkout .shop_table td,.woocommerce-checkout .shop_table th{line-height:1.5}.more-variants-available-info{display:block;font-size:11px;font-weight:400}.shop_table .product-name-inner,.shop_table .product-name-inner tr td{border:none;margin:0;padding:0}.shop_table .product-name-inner tr td:last-child{text-align:right}.cart_totals .wc-gzd-additional-wrapper,.woocommerce-checkout table.shop_table .wc-gzd-additional-wrapper{clear:both;text-align:right}.cart_totals p.wc-gzd-additional-info,.woocommerce-checkout table.shop_table p.wc-gzd-additional-info{display:inline-block;font-size:.8em;font-weight:400;margin-bottom:0}.entry-content .woocommerce #payment{margin-bottom:1em}.woocommerce #payment .wc-terms-and-conditions{display:none!important}.entry-content .woocommerce .checkout-btn-wrap{text-align:right}.woocommerce-checkout p.direct-debit-checkbox{display:none}.unit-price-cart{display:block;font-size:.9em;margin-top:5px}.product_list_widget .wc-gzd-additional-info,.products .wc-gzd-additional-info{font-size:.8em;margin:.7rem 0;padding:0}.product_list_widget .wc-gzd-additional-info,.product_list_widget p.price-unit{line-height:1.8em;margin:.2rem 0}.product_list_widget .wc-gzd-additional-info a{display:inline!important}.product_list_widget .price-unit,.products .product .price-unit{font-size:.8em}.product_list_widget .price-unit{margin-bottom:.7em}.product p.wc-gzd-additional-info{clear:left;font-size:.9em;margin-bottom:.5rem}.product .defect-description:not(:empty){border:2px solid #4b4f58;margin:1em 0;padding:.5em}.product .defect-description:not(:empty) p:last-child{margin-bottom:0}.deposit-packaging-type{font-weight:700;text-transform:uppercase}.product p.deposit-packaging-type{font-size:1.2em!important}.wc-gzd-rating-authenticity-status{display:block;font-size:.9em}.woocommerce-product-rating .wc-gzd-rating-authenticity-status{display:inline-block}.product .product_meta{margin-top:1rem}p.footer-info{font-size:.9em;padding-bottom:.5rem;text-align:center}.wc-gzd-item-defect-description p,.wc-gzd-item-desc p{font-size:.9em;font-weight:400}.wc-gzd-edit-data-notice{background:#eee;display:inline-block;padding:1em}.wc-gzd-edit-data-notice p.wc-gzd-info{margin:0;padding:0}.wc-gzd-cart-info{display:block}table.product-details-inner{margin:0;padding:0;table-layout:fixed}table.product-details-inner,table.product-details-inner td,table.product-details-inner tr{background:transparent;border:none;margin-bottom:0;margin-top:0;padding-bottom:0;padding-top:0}table.product-details-inner tr td:last-child{text-align:right}.wc-gzd-product-name-left,.wc-gzd-product-name-right{float:left}.wc-gzd-product-name-left{margin-right:1em;max-width:15%}#order_review .blockMsg{line-height:1.5em}#shipping_parcelshop_post_number_field .optional{display:none!important}.wc-gzd-nutri-score-value{display:block;height:4rem;text-indent:-9999px;width:7.0625rem}.wc-gzd-placeholder-loading{display:flex;flex:0 0 100%;flex-flow:column;overflow:hidden;position:relative}.wc-gzd-placeholder-loading *{box-sizing:border-box}.wc-gzd-placeholder-loading:before{animation:phAnimation .8s linear infinite;background:linear-gradient(90deg,hsla(0,0%,100%,0) 46%,hsla(0,0%,100%,.35) 50%,hsla(0,0%,100%,0) 54%) 50% 50%;bottom:0;content:" ";left:50%;margin-left:-250%;pointer-events:none;position:absolute;right:0;top:0;width:500%;z-index:1}.wc-gzd-placeholder-loading .wc-gzd-placeholder-row{align-items:center;display:flex;vertical-align:middle}.wc-gzd-placeholder-loading .wc-gzd-placeholder-row>*{background-color:#e7e7e7;display:block;height:10px}.wc-gzd-placeholder-loading .wc-gzd-placeholder-row .wc-gzd-placeholder-row-col-4{min-width:100px}@keyframes phAnimation{0%{transform:translate3d(-30%,0,0)}to{transform:translate3d(30%,0,0)}}.wc-block-featured-product .wc-gzd-additional-info{color:inherit;font-size:.9em;margin:0;padding:5px 48px 0;text-align:center;width:100%;z-index:1}.wc-block-featured-product .wc-gzd-nutri-score{width:auto}ul.wc-block-grid__products li.wc-block-grid__product .wc-gzd-additional-info{margin:.5em 0}ul.wc-block-grid__products li.wc-block-grid__product .wc-gzd-additional-info:not(.deposit-packaging-type){font-size:.9em;font-weight:400}.theme-twentytwenty form.woocommerce-checkout #order_review_heading,.theme-twentytwentyone form.woocommerce-checkout #order_review_heading{margin-bottom:2rem;padding-left:0;text-align:left;width:100%} diff --git a/build/static/layout-styles.js b/build/static/layout-styles.js new file mode 100644 index 000000000..cf033b791 --- /dev/null +++ b/build/static/layout-styles.js @@ -0,0 +1 @@ +!function(){"use strict";var e={};(function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(e),((window.germanized=window.germanized||{}).static=window.germanized.static||{})["layout-styles"]=e}(); \ No newline at end of file diff --git a/build/static/revocation.asset.php b/build/static/revocation.asset.php new file mode 100644 index 000000000..f6f57c8e5 --- /dev/null +++ b/build/static/revocation.asset.php @@ -0,0 +1 @@ + array(), 'version' => '60230d50c10545708058'); diff --git a/build/static/revocation.js b/build/static/revocation.js new file mode 100644 index 000000000..0b7f189d1 --- /dev/null +++ b/build/static/revocation.js @@ -0,0 +1 @@ +jQuery((function(F){F("form#woocommerce-gzd-revocation").on("blur input change",".input-text, select",(function(){var e=F(this),o=e.closest(".form-row"),u=!0;o.is(".validate-required")&&""===e.val()&&(o.removeClass("woocommerce-validated").addClass("woocommerce-invalid woocommerce-invalid-required-field"),u=!1),o.is(".validate-email")&&e.val()&&(new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i).test(e.val())||(o.removeClass("woocommerce-validated").addClass("woocommerce-invalid woocommerce-invalid-email"),u=!1)),u&&o.removeClass("woocommerce-invalid woocommerce-invalid-required-field").addClass("woocommerce-validated")})),F("form#woocommerce-gzd-revocation").submit((function(){var e=F(this);return e.is(".processing")||(e.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),F.ajax({type:"POST",url:wc_gzd_revocation_params.wc_ajax_url.toString().replace("%%endpoint%%","gzd_revocation"),data:e.serialize(),dataType:"json",success:function(o){F(".woocommerce-error, .woocommerce-message").remove(),e.removeClass("processing").unblock(),"success"===o.result?(e.before(o.messages),e.fadeOut("fast"),F("html, body").animate({scrollTop:F(".woocommerce-message").offset().top-100},1e3)):(o.messages&&e.prepend(o.messages),F("html, body").animate({scrollTop:F("form#woocommerce-gzd-revocation").offset().top-100},1e3))}})),!1}))})),((window.germanized=window.germanized||{}).static=window.germanized.static||{}).revocation={}; \ No newline at end of file diff --git a/build/static/unit-price-observer-bundle.asset.php b/build/static/unit-price-observer-bundle.asset.php new file mode 100644 index 000000000..6a35ee0b2 --- /dev/null +++ b/build/static/unit-price-observer-bundle.asset.php @@ -0,0 +1 @@ + array(), 'version' => '146cbbb6f27bf289fb55'); diff --git a/build/static/unit-price-observer-bundle.js b/build/static/unit-price-observer-bundle.js new file mode 100644 index 000000000..29de4a644 --- /dev/null +++ b/build/static/unit-price-observer-bundle.js @@ -0,0 +1 @@ +!function(){var e;e=jQuery,window,document,e((function(){setTimeout((function(){e(".bundled_product").each((function(){e(this).wc_germanized_unit_price_observer()}))}),250)})),window.germanized=window.germanized||{},((window.germanized=window.germanized||{}).static=window.germanized.static||{})["unit-price-observer-bundle"]={}}(); \ No newline at end of file diff --git a/build/static/unit-price-observer-queue.asset.php b/build/static/unit-price-observer-queue.asset.php new file mode 100644 index 000000000..a753d6868 --- /dev/null +++ b/build/static/unit-price-observer-queue.asset.php @@ -0,0 +1 @@ + array(), 'version' => 'e829cc221d6cd2771cee'); diff --git a/build/static/unit-price-observer-queue.js b/build/static/unit-price-observer-queue.js new file mode 100644 index 000000000..c1b407ea6 --- /dev/null +++ b/build/static/unit-price-observer-queue.js @@ -0,0 +1 @@ +!function(){var e,r;window.germanized=window.germanized||{},e=jQuery,(r=window.germanized).unit_price_observer_queue={queue:{},timeout:null,params:{},request:null,init:function(){this.params=wc_gzd_unit_price_observer_queue_params,this.queue={},this.timeout=null,this.request=null},execute:function(){var t=r.unit_price_observer_queue,i=[],u={...t.queue};t.queue={},t.timeout=null,Object.keys(u).forEach((function(e){i=i.concat([{product_id:u[e].productId,price:u[e].priceData.price,price_sale:u[e].priceData.sale_price,quantity:u[e].priceData.quantity,key:e}])})),t.request=e.ajax({type:"POST",url:t.params.wc_ajax_url.toString().replace("%%endpoint%%","gzd_refresh_unit_price"),data:{security:t.params.refresh_unit_price_nonce,products:i},success:function(e){Object.keys(u).forEach((function(r){var i=u[r],n=i.observer,c=i.priceData,a=i.priceSelector,o=i.isPrimary,s=t.getUnitPricesFromMap(c.unit_price);if(n)if(e.products.hasOwnProperty(r)){var p=e.products[r];n.stopObserver(n,a),parseInt(p.product_id)===n.getCurrentProductId(n)&&p.hasOwnProperty("unit_price_html")?n.unsetUnitPriceLoading(n,s,p.unit_price_html):n.unsetUnitPriceLoading(n,s),n.startObserver(n,a,o)}else n.stopObserver(n,a),n.unsetUnitPriceLoading(n,s),n.startObserver(n,a,o)}))},error:function(){Object.keys(u).forEach((function(e){var r=u[e],i=r.observer,n=r.priceData,c=r.priceSelector,a=r.isPrimary,o=t.getUnitPricesFromMap(n.unit_price);i&&(i.stopObserver(i,c),i.unsetUnitPriceLoading(i,o),i.startObserver(i,c,a))}))},dataType:"json"})},getUnitPricesFromMap:function(r){let t=[];return r.forEach((function(r){t=e.merge(t,e(r))})),e(t)},getQueueKey:function(e){return(e+"").replace(/[^a-zA-Z0-9]/g,"")},add:function(e,t,i,u,n){var c=r.unit_price_observer_queue,a=c.getQueueKey(t);if(c.queue.hasOwnProperty(a))i.unit_price.each((function(e,r){c.queue[a].priceData.unit_price.has(r)||c.queue[a].priceData.unit_price.set(r,r)}));else{var o=new Map;i.unit_price.each((function(e,r){o.set(r,r)})),i.unit_price=o,c.queue[a]={productId:t,observer:e,priceData:i,priceSelector:u,isPrimary:n}}clearTimeout(c.timeout),c.timeout=setTimeout(c.execute,500)}},e(document).ready((function(){r.unit_price_observer_queue.init()})),((window.germanized=window.germanized||{}).static=window.germanized.static||{})["unit-price-observer-queue"]={}}(); \ No newline at end of file diff --git a/build/static/unit-price-observer.asset.php b/build/static/unit-price-observer.asset.php new file mode 100644 index 000000000..b0ea3975d --- /dev/null +++ b/build/static/unit-price-observer.asset.php @@ -0,0 +1 @@ + array(), 'version' => 'c7c47c4a2991767fa76d'); diff --git a/build/static/unit-price-observer.js b/build/static/unit-price-observer.js new file mode 100644 index 000000000..baa7e8042 --- /dev/null +++ b/build/static/unit-price-observer.js @@ -0,0 +1 @@ +!function(e,r,t,i){var n=function(t){var i=this;if(i.params=wc_gzd_unit_price_observer_params,i.$wrapper=t.closest(i.params.wrapper),i.$form=i.$wrapper.find(".variations_form, .cart").length>0&&i.$wrapper.find(".variations_form, .cart"),i.isVar=!!i.$form&&i.$form.hasClass("variations_form"),i.$product=i.$wrapper.closest(".product"),i.requests=[],i.observer={},i.timeout=!1,i.priceData=!1,i.productId=0,i.$wrapper.length<=0&&(i.$wrapper=i.$product),i.replacePrice=!i.$wrapper.hasClass("bundled_product")&&i.params.replace_price,"MutationObserver"in r||"WebKitMutationObserver"in r||"MozMutationObserver"in r){if(i.$wrapper.addClass("has-unit-price-observer"),i.initObservers(i),i.isVar&&i.$form)i.productId=parseInt(i.$form.find("input[name=product_id]").length>0?i.$form.find("input[name=product_id]").val():i.$form.data("product_id")),i.variationId=parseInt(i.$form.find("input[name=variation_id]").length>0?i.$form.find("input[name=variation_id]").val():0),i.$form.find("input[name=variation_id]").length<=0&&(i.variationId=parseInt(i.$form.find("input.variation_id").length>0?i.$form.find("input.variation_id").val():0)),i.$form.on("reset_data.unit-price-observer",{GermanizedUnitPriceObserver:i},i.onResetVariation),i.$form.on("found_variation.unit-price-observer",{GermanizedUnitPriceObserver:i},i.onFoundVariation);else if(i.$form&&i.$form.find("*[name=add-to-cart][type=submit]").length>0)i.productId=parseInt(i.$form.find("*[name=add-to-cart][type=submit]").val());else if(i.$form&&i.$form.data("product_id"))i.productId=parseInt(i.$form.data("product_id"));else{var n=i.$product.attr("class").split(/\s+/);e.each(n,(function(e,r){if("post-"===r.substring(0,5)){var t=parseInt(r.substring(5).replace(/[^0-9]/g,""));if(t>0)return i.productId=t,!0}})),i.productId<=0&&1===i.$product.find("a.ajax_add_to_cart[data-product_id], a.add_to_cart_button[data-product_id]").length&&(i.productId=parseInt(i.$product.find("a.ajax_add_to_cart, a.add_to_cart_button").data("product_id")))}if(i.productId<=0)return i.destroy(i),!1;i.params.refresh_on_load&&e.each(i.params.price_selector,(function(e,r){var t=!!r.hasOwnProperty("is_primary_selector")&&r.is_primary_selector,n=i.getPriceNode(i,e,t),a=i.getUnitPriceNode(i,n);t&&a.length>0&&(i.stopObserver(i,e),i.setUnitPriceLoading(i,a),setTimeout((function(){i.stopObserver(i,e);var n=i.getCurrentPriceData(i,e,r.is_total_price,t,r.quantity_selector);n?i.refreshUnitPrice(i,n,e,t):a.length>0&&i.unsetUnitPriceLoading(i,a),i.startObserver(i,e,t)}),250))}))}t.data("unitPriceObserver",i)};n.prototype.destroy=function(e){(e=e||this).cancelObservers(e),e.$form&&e.$form.off(".unit-price-observer"),e.$wrapper.removeClass("has-unit-price-observer")},n.prototype.getTextWidth=function(e){var r=e.html(),t=""+r+"";e.html(t);var i=e.find("span:first").width();return e.html(r),i},n.prototype.getPriceNode=function(e,r,t){t=void 0!==t&&t;var i=e.$wrapper.find(r+":not(.price-unit):visible").not(".variations_form .single_variation .price").first();return t&&e.isVar&&(i.length<=0||!e.replacePrice)?i=e.$wrapper.find(".woocommerce-variation-price span.price:not(.price-unit):visible:last"):t&&i.length<=0&&(i=e.$wrapper.find(".price:not(.price-unit):visible:last")),i},n.prototype.getObserverNode=function(e,r,t){var i=e.getPriceNode(e,r,t);return t&&e.isVar&&!e.replacePrice&&(i=e.$wrapper.find(".single_variation:last")),i},n.prototype.getUnitPriceNode=function(e,r){if(r.length<=0)return[];var t=r.parents(".wp-block-woocommerce-product-price[data-is-descendent-of-single-product-template]").length>0;return"SPAN"===r[0].tagName?e.$wrapper.find(".price-unit"):t?e.$wrapper.find(".wp-block-woocommerce-gzd-product-unit-price[data-is-descendent-of-single-product-template] .price-unit"):e.$wrapper.find(".price-unit:not(.wc-gzd-additional-info-placeholder, .wc-gzd-additional-info-loop)")},n.prototype.stopObserver=function(e,r){var t=e.getObserver(e,r);t&&t.disconnect()},n.prototype.startObserver=function(e,r,t){var i=e.getObserver(e,r),n=e.getObserverNode(e,r,t);return!!i&&(e.stopObserver(e,r),n.length>0&&i.observe(n[0],{childList:!0,subtree:!0,characterData:!0}),!0)},n.prototype.initObservers=function(t){0===Object.keys(t.observer).length&&e.each(t.params.price_selector,(function(i,n){var a=!!n.hasOwnProperty("is_primary_selector")&&n.is_primary_selector,o=!1;if(t.getObserverNode(t,i,a).length>0){var s=function(r,o){var s=t.getPriceNode(t,i,a);if(t.timeout&&clearTimeout(t.timeout),s.length<=0)return!1;var d=t.getUnitPriceNode(t,s),p=!1;t.stopObserver(t,i),d.length>0&&t.setUnitPriceLoading(t,d),t.timeout=setTimeout((function(){t.stopObserver(t,i);var r=t.getCurrentPriceData(t,i,n.is_total_price,a,n.quantity_selector);r&&e.active<=0&&(p=!0,t.refreshUnitPrice(t,r,i,a)),!p&&d.length>0&&t.unsetUnitPriceLoading(t,d),t.startObserver(t,i,a)}),500)};"MutationObserver"in r?o=new r.MutationObserver(s):"WebKitMutationObserver"in r?o=new r.WebKitMutationObserver(s):"MozMutationObserver"in r&&(o=new r.MozMutationObserver(s)),o&&(t.observer[i]=o,t.startObserver(t,i,a))}}))},n.prototype.getObserver=function(e,r){return!!e.observer.hasOwnProperty(r)&&e.observer[r]},n.prototype.cancelObservers=function(e){for(var r in e.observer)e.observer.hasOwnProperty(r)&&(e.observer[r].disconnect(),delete e.observer[r])},n.prototype.onResetVariation=function(e){e.data.GermanizedUnitPriceObserver.variationId=0},n.prototype.onFoundVariation=function(e,r){var t=e.data.GermanizedUnitPriceObserver;r.hasOwnProperty("variation_id")&&(t.variationId=parseInt(r.variation_id)),t.initObservers(t)},n.prototype.getCurrentPriceData=function(r,t,i,n,a){a=a&&""!==a?a:r.params.qty_selector;var o=r.getPriceNode(r,t,n);if(o.length>0){o.find(":hidden").addClass("wc-gzd-is-hidden");var s=r.getUnitPriceNode(r,o),d=o.clone();d.find(".woocommerce-price-suffix").remove(),d.find(".wc-gzd-is-hidden").remove();var p="",c=d.find(".amount:first"),u=e(r.params.wrapper+" "+a+":first"),l=1;u.length>0&&(l=parseFloat(u.val())),c.length<=0&&(c=d.find(".price").length>0?d.find(".price"):d);var f=r.getRawPrice(c,r.params.price_decimal_sep);if(d.find(".amount").length>1){var v=e(d.find(".amount")[1]);p=r.getRawPrice(v,r.params.price_decimal_sep)}if(o.find(".wc-gzd-is-hidden").removeClass("wc-gzd-is-hidden"),s.length>0&&f)return i&&(f=parseFloat(f)/l,p&&(p=parseFloat(p)/l)),{price:f,unit_price:s,sale_price:p,quantity:l}}return!1},n.prototype.getCurrentProductId=function(e){var r=e.productId;return e.variationId>0&&(r=e.variationId),parseInt(r)},n.prototype.getRawPrice=function(e,r){var t=e.length>0?e.text():"",i=!1;try{i=accounting.unformat(t,r)}catch(e){i=!1}return i},n.prototype.setUnitPriceLoading=function(e,r){var t=r.html();if(r.hasClass("wc-gzd-loading"))t=r.data("org-html");else{var i=e.getTextWidth(r),n=r.find("span").length>0?r.find("span").innerHeight():r.height();r.html(''),r.addClass("wc-gzd-loading"),r.data("org-html",t)}return t},n.prototype.unsetUnitPriceLoading=function(e,r,t){t=t||r.data("org-html"),r.html(t),r.hasClass("wc-gzd-loading")&&r.removeClass("wc-gzd-loading"),"string"==typeof t&&t.length>0&&r.show()},n.prototype.refreshUnitPrice=function(e,r,t,i){germanized.unit_price_observer_queue.add(e,e.getCurrentProductId(e),r,t,i)},e.fn.wc_germanized_unit_price_observer=function(){return e(this).data("unitPriceObserver")&&e(this).data("unitPriceObserver").destroy(),new n(this),this},e((function(){"undefined"!=typeof wc_gzd_unit_price_observer_params&&e(wc_gzd_unit_price_observer_params.wrapper).each((function(){e(this).is("body")||e(this).wc_germanized_unit_price_observer()}))}))}(jQuery,window,document),window.germanized=window.germanized||{},((window.germanized=window.germanized||{}).static=window.germanized.static||{})["unit-price-observer"]={}; \ No newline at end of file diff --git a/build/style-cart.css b/build/style-cart.css new file mode 100644 index 000000000..9c0a7351d --- /dev/null +++ b/build/style-cart.css @@ -0,0 +1 @@ +.wc-block-components-product-metadata ul.wc-block-components-product-details:first-child{display:flex;flex-direction:column}.wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li{order:950}.wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li[class*=wc-block-components-product-details__gzd-]{order:90;width:120%}.wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li.wc-block-components-product-details__gzd-unit-price{order:0}.wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li.wc-block-components-product-details__gzd-deposit-packaging-type{order:5;font-weight:bold;text-transform:uppercase}.wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li.wc-block-components-product-details__gzd-deposit{order:10}.wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li.wc-block-components-product-details__gzd-differential-taxation{order:10}.wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li.wc-block-components-product-details__gzd-delivery-time{order:20}.wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li.wc-block-components-product-details__gzd-item-desc{order:100}.wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li.wc-gzd-summary-item-last{margin-bottom:1em}ul.wc-block-components-product-details li[class*=wc-block-components-product-details__gzd-] .wc-block-components-product-details__name{display:none}ul.wc-block-components-product-details li[class*=wc-block-components-product-details__gzd-] .wc-block-components-product-details__value{font-size:.8rem;color:#757575}.wc-gzd-small-business-info{font-size:.8rem;color:#757575}ul.wc-block-components-product-details li.wc-not-gzd-summary-item-first{margin-top:1em} diff --git a/build/style-checkout.css b/build/style-checkout.css new file mode 100644 index 000000000..198a20fff --- /dev/null +++ b/build/style-checkout.css @@ -0,0 +1,3 @@ +ul.wc-block-components-product-details li[class*=wc-block-components-product-details__gzd-] .wc-block-components-product-details__name{display:none}ul.wc-block-components-product-details li[class*=wc-block-components-product-details__gzd-] .wc-block-components-product-details__value{font-size:.8rem;color:#757575}.wc-gzd-small-business-info{font-size:.8rem;color:#757575}.wc-gzd-unit-price{font-weight:normal;font-size:.8rem;color:#757575}.wc-gzd-unit-price .wc-block-components-product-details__name{display:none}ul.wc-block-components-product-details li.wc-block-components-product-details__gzd-unit-price{display:none !important}ul.wc-block-components-product-details li.wc-not-gzd-summary-item-first{margin-top:1em}.wc-gzd-checkout .wp-block-woocommerce-checkout-fields-block .wc-block-checkout__actions{display:none}.wc-gzd-checkout .is-large .wc-block-checkout__sidebar{align-self:auto}.wc-gzd-checkout .is-large .wc-block-components-totals-wrapper.wc-gzd-hide-total-wrapper{display:none}.wc-gzd-checkout .is-large .wc-block-components-totals-wrapper.wc-gzd-show-total-wrapper{display:block}.wc-gzd-checkout .is-large .wc-gzd-checkout-submit{margin-top:1em;position:sticky;top:0}.wc-gzd-checkout .is-large .wc-gzd-checkout-submit .wc-block-components-totals-wrapper{display:none;border-top:none}.wc-gzd-checkout .is-large .wc-gzd-checkout-submit .wc-block-components-totals-wrapper.wc-gzd-show-total-wrapper{display:block}.wc-gzd-checkout .is-large .wc-gzd-checkout-submit .wc-block-components-panel__content .wc-block-components-totals-wrapper{display:block}.wc-gzd-checkout .is-large .wc-gzd-checkout-submit .wc-block-checkout__actions{border-top:none;padding:36px 0}.wc-gzd-checkout .is-large .wc-gzd-checkout-submit .wc-block-checkout__actions .wc-block-checkout__actions_row{display:flex;flex-wrap:wrap;flex-direction:column-reverse}.wc-gzd-checkout .is-large .wc-gzd-checkout-submit .wc-block-checkout__actions .wc-block-components-checkout-place-order-button{width:100%;margin-bottom:1em}.wc-gzd-checkout .wc-block-checkout.is-mobile,.wc-gzd-checkout .wc-block-checkout.is-medium,.wc-gzd-checkout .wc-block-checkout.is-small{flex-direction:column-reverse !important}.wc-gzd-checkout .wc-block-checkout.is-mobile .wc-gzd-checkout-submit,.wc-gzd-checkout .wc-block-checkout.is-medium .wc-gzd-checkout-submit,.wc-gzd-checkout .wc-block-checkout.is-small .wc-gzd-checkout-submit{position:relative;padding:1.5em 0}.wc-gzd-checkout .wc-block-checkout.is-mobile .wc-gzd-checkout-submit .wp-block-woocommerce-checkout-order-summary-block,.wc-gzd-checkout .wc-block-checkout.is-medium .wc-gzd-checkout-submit .wp-block-woocommerce-checkout-order-summary-block,.wc-gzd-checkout .wc-block-checkout.is-small .wc-gzd-checkout-submit .wp-block-woocommerce-checkout-order-summary-block{display:none}.wc-gzd-checkout .wc-block-checkout.is-mobile .wc-gzd-checkboxes,.wc-gzd-checkout .wc-block-checkout.is-medium .wc-gzd-checkboxes,.wc-gzd-checkout .wc-block-checkout.is-small .wc-gzd-checkboxes{padding-top:10px}.wc-gzd-checkout .wc-block-components-order-summary .wc-block-components-order-summary-item__total-price{min-width:55px}.wc-gzd-checkout .wc-block-components-product-metadata ul.wc-block-components-product-details:first-child{display:flex;flex-direction:column}.wc-gzd-checkout .wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li{order:950}.wc-gzd-checkout .wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li[class*=wc-block-components-product-details__gzd-]{order:90;width:130%}.wc-gzd-checkout .wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li.wc-block-components-product-details__gzd-unit-price{order:0}.wc-gzd-checkout .wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li.wc-block-components-product-details__gzd-deposit-packaging-type{order:5;font-weight:bold;text-transform:uppercase}.wc-gzd-checkout .wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li.wc-block-components-product-details__gzd-deposit{order:10}.wc-gzd-checkout .wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li.wc-block-components-product-details__gzd-differential-taxation{order:10}.wc-gzd-checkout .wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li.wc-block-components-product-details__gzd-delivery-time{order:20}.wc-gzd-checkout .wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li.wc-block-components-product-details__gzd-item-desc{order:100}.wc-gzd-checkout .wc-block-components-product-metadata ul.wc-block-components-product-details:first-child li.wc-gzd-summary-item-last{margin-bottom:1em} +.wc-gzd-checkboxes{margin-bottom:1em}.wc-gzd-checkboxes .wc-gzd-checkbox{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;margin-top:1em}.wc-gzd-checkboxes .wc-gzd-checkbox.has-no-checkbox span{font-size:.875em}.wc-gzd-checkout-modal-bg{width:auto !important;position:fixed;background:rgba(0,0,0,.45);left:0;right:0;top:0;bottom:0;z-index:40}.wc-gzd-checkout-modal-wrapper{position:absolute;width:100%;height:100%;display:flex;justify-content:center;align-items:center;top:0;box-sizing:border-box}.wc-gzd-checkout-modal-wrapper .wc-gzd-checkout-modal{position:fixed;top:20%;max-height:60%;width:60%;background:#fff;z-index:41;border-radius:4px;border:1px solid #d5d5d5;transition:1.1s ease-out;box-shadow:-2rem 2rem 2rem rgba(0,0,0,.2);filter:blur(0);transform:scale(1);opacity:1;visibility:visible;overflow:hidden;display:flex;flex-wrap:nowrap}.wc-gzd-checkout-modal-wrapper .wc-gzd-checkout-modal .content{position:relative;padding:1rem;overflow-y:scroll;max-height:100%;width:100%}.wc-gzd-checkout-modal-wrapper .wc-gzd-checkout-modal .content.is-loading{display:flex;align-items:center;justify-content:center;min-height:200px}.wc-gzd-checkout-modal-wrapper .wc-gzd-checkout-modal .actions{position:fixed;width:100%;display:flex;justify-content:end;z-index:42}.wc-gzd-checkout-modal-wrapper .wc-gzd-checkout-modal .actions .wc-gzd-checkout-modal-close{margin:.25rem;display:inline-flex;cursor:pointer}.is-mobile .wc-gzd-checkout-modal-wrapper .wc-gzd-checkout-modal{top:2%;width:95%} +.wc-gzd-block-checkout__photovoltaic-system-notice{flex-direction:column} diff --git a/build/style-mini-cart.css b/build/style-mini-cart.css new file mode 100644 index 000000000..567f36e5d --- /dev/null +++ b/build/style-mini-cart.css @@ -0,0 +1 @@ +ul.wc-block-components-product-details li[class*=wc-block-components-product-details__gzd-] .wc-block-components-product-details__name{display:none}ul.wc-block-components-product-details li[class*=wc-block-components-product-details__gzd-] .wc-block-components-product-details__value{font-size:.8rem;color:#757575}.wc-gzd-small-business-info{font-size:.8rem;color:#757575}.wc-gzd-unit-price{font-weight:normal;font-size:.8rem;color:#757575}.wc-gzd-unit-price .wc-block-components-product-details__name{display:none}ul.wc-block-components-product-details li.wc-block-components-product-details__gzd-unit-price{display:none !important}ul.wc-block-components-product-details li.wc-not-gzd-summary-item-first{margin-top:1em}.wp-block-woocommerce-mini-cart-contents .wc-block-components-totals-item__description{display:none !important} diff --git a/build/style-wc-gzd-blocks.css b/build/style-wc-gzd-blocks.css new file mode 100644 index 000000000..215e8ede6 --- /dev/null +++ b/build/style-wc-gzd-blocks.css @@ -0,0 +1 @@ +.wc-gzd-block-grid__product-unit-price{display:block}.wc-gzd-block-components-product-deposit-packaging-type{text-transform:uppercase}.wp-block-woocommerce-gzd-product-is-empty{display:none} diff --git a/build/wc-gzd-blocks-editor-style.css b/build/wc-gzd-blocks-editor-style.css new file mode 100644 index 000000000..d1e3a5c49 --- /dev/null +++ b/build/wc-gzd-blocks-editor-style.css @@ -0,0 +1,3 @@ +.wc-gzd-block-components-product-price-label{display:block}.wc-gzd-block-components-product-price-label.wc-gzd-block-components-product-price-label--align-center{text-align:center}.wc-gzd-block-components-product-price-label.wc-gzd-block-components-product-price-label--align-right{text-align:right}.wc-gzd-block-components-product-deposit-packaging-type{text-transform:uppercase}.wc-gzd-block-components-product-nutri-score .wc-gzd-nutri-score-value{height:4rem;width:7.0625rem;display:block;text-indent:-9999px} +.wp-block-woocommerce-germanized-checkout-checkboxes{margin-top:20px;margin-bottom:20px;padding-top:4px;padding-bottom:4px} +.wc-gzd-block-checkout__photovoltaic-system-notice{flex-direction:column} diff --git a/build/wc-gzd-blocks-frontend.asset.php b/build/wc-gzd-blocks-frontend.asset.php new file mode 100644 index 000000000..04b010dd6 --- /dev/null +++ b/build/wc-gzd-blocks-frontend.asset.php @@ -0,0 +1 @@ + array('react', 'wc-blocks-registry', 'wc-blocks-shared-context', 'wc-blocks-shared-hocs', 'wc-price-format', 'wp-element', 'wp-i18n'), 'version' => 'a3d61590c1c5b6fc08c1'); diff --git a/build/wc-gzd-blocks-frontend.js b/build/wc-gzd-blocks-frontend.js new file mode 100644 index 000000000..017a4692f --- /dev/null +++ b/build/wc-gzd-blocks-frontend.js @@ -0,0 +1 @@ +!function(){"use strict";var e,t,o,n,r={196:function(e){e.exports=window.React},293:function(e){e.exports=window.wc.priceFormat},864:function(e){e.exports=window.wc.wcBlocksSharedContext},721:function(e){e.exports=window.wc.wcBlocksSharedHocs},307:function(e){e.exports=window.wp.element},736:function(e){e.exports=window.wp.i18n}},i={};function c(e){var t=i[e];if(void 0!==t)return t.exports;var o=i[e]={exports:{}};return r[e](o,o.exports,c),o.exports}c.m=r,c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,{a:t}),t},c.d=function(e,t){for(var o in t)c.o(t,o)&&!c.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},c.f={},c.e=function(e){return Promise.all(Object.keys(c.f).reduce((function(t,o){return c.f[o](e,t),t}),[]))},c.u=function(e){return({6:"product-unit-product",92:"product-unit-price",128:"product-nutri-score",297:"product-tax-info",412:"product-deposit",518:"product-delivery-time",534:"product-deposit-packaging-type",648:"product-shipping-costs-info",710:"product-defect-description"}[e]||e)+"-frontend.js?ver="+{6:"a38d358eb8267bbbe2f6",92:"32f050269ec965e85042",128:"16eb3d6a27cd94f7d35d",297:"2682e67db92333307060",412:"86e4fae2f750bc50b34e",518:"03b7d7675264ef3250fc",534:"1f2849c5fcd8006a63d3",648:"4f3878172494bc11d1f1",700:"866940257754ccc7d38e",710:"e63150a7566094bfc9a6"}[e]},c.miniCssF=function(e){return{6:"product-unit-product",92:"product-unit-price",128:"product-nutri-score",297:"product-tax-info",412:"product-deposit",518:"product-delivery-time",534:"product-deposit-packaging-type",648:"product-shipping-costs-info",710:"product-defect-description"}[e]+".css"},c.miniCssF=function(e){return{6:"product-unit-product",92:"product-unit-price",128:"product-nutri-score",297:"product-tax-info",412:"product-deposit",518:"product-delivery-time",534:"product-deposit-packaging-type",648:"product-shipping-costs-info",710:"product-defect-description"}[e]+".css"},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e={},t="woocommerce-germanized:",c.l=function(o,n,r,i){if(e[o])e[o].push(n);else{var u,a;if(void 0!==r)for(var d=document.getElementsByTagName("script"),p=0;p-1&&!e;)e=o[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=e}(),function(){if("undefined"!=typeof document){var e={70:0};c.f.miniCss=function(t,o){e[t]?o.push(e[t]):0!==e[t]&&{6:1,92:1,128:1,297:1,412:1,518:1,534:1,648:1,710:1}[t]&&o.push(e[t]=function(e){return new Promise((function(t,o){var n=c.miniCssF(e),r=c.p+n;if(function(e,t){for(var o=document.getElementsByTagName("link"),n=0;nPromise.all([c.e(700),c.e(92)]).then(c.bind(c,263))))}),(0,o.registerBlockComponent)({blockName:"woocommerce-germanized/product-delivery-time",component:(0,n.lazy)((()=>Promise.all([c.e(700),c.e(518)]).then(c.bind(c,351))))}),(0,o.registerBlockComponent)({blockName:"woocommerce-germanized/product-tax-info",component:(0,n.lazy)((()=>Promise.all([c.e(700),c.e(297)]).then(c.bind(c,471))))}),(0,o.registerBlockComponent)({blockName:"woocommerce-germanized/product-shipping-costs-info",component:(0,n.lazy)((()=>Promise.all([c.e(700),c.e(648)]).then(c.bind(c,26))))}),(0,o.registerBlockComponent)({blockName:"woocommerce-germanized/product-unit-product",component:(0,n.lazy)((()=>Promise.all([c.e(700),c.e(6)]).then(c.bind(c,0))))}),(0,o.registerBlockComponent)({blockName:"woocommerce-germanized/product-nutri-score",component:(0,n.lazy)((()=>Promise.all([c.e(700),c.e(128)]).then(c.bind(c,744))))}),(0,o.registerBlockComponent)({blockName:"woocommerce-germanized/product-deposit",component:(0,n.lazy)((()=>Promise.all([c.e(700),c.e(412)]).then(c.bind(c,621))))}),(0,o.registerBlockComponent)({blockName:"woocommerce-germanized/product-deposit-packaging-type",component:(0,n.lazy)((()=>Promise.all([c.e(700),c.e(534)]).then(c.bind(c,775))))}),(0,o.registerBlockComponent)({blockName:"woocommerce-germanized/product-defect-description",component:(0,n.lazy)((()=>Promise.all([c.e(700),c.e(710)]).then(c.bind(c,575))))})}(); \ No newline at end of file diff --git a/build/wc-gzd-blocks-product-elements-style.asset.php b/build/wc-gzd-blocks-product-elements-style.asset.php new file mode 100644 index 000000000..1642d114a --- /dev/null +++ b/build/wc-gzd-blocks-product-elements-style.asset.php @@ -0,0 +1 @@ + array('react', 'wc-blocks-registry', 'wc-blocks-shared-context', 'wc-blocks-shared-hocs', 'wc-gzd-blocks-settings', 'wc-price-format', 'wp-block-editor', 'wp-blocks', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '3ba96c5a2a44954c8809'); diff --git a/build/wc-gzd-blocks-product-elements-style.js.LICENSE.txt b/build/wc-gzd-blocks-product-elements-style.js.LICENSE.txt new file mode 100644 index 000000000..0c20a875d --- /dev/null +++ b/build/wc-gzd-blocks-product-elements-style.js.LICENSE.txt @@ -0,0 +1,5 @@ +/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/ diff --git a/build/wc-gzd-blocks-product-elements.asset.php b/build/wc-gzd-blocks-product-elements.asset.php new file mode 100644 index 000000000..27d708b3a --- /dev/null +++ b/build/wc-gzd-blocks-product-elements.asset.php @@ -0,0 +1 @@ + array('react', 'wc-blocks-registry', 'wc-blocks-shared-context', 'wc-blocks-shared-hocs', 'wc-gzd-blocks-settings', 'wc-price-format', 'wp-block-editor', 'wp-blocks', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '25ec30606fc0bbead215'); diff --git a/build/wc-gzd-blocks-product-elements.css b/build/wc-gzd-blocks-product-elements.css new file mode 100644 index 000000000..1114283cc --- /dev/null +++ b/build/wc-gzd-blocks-product-elements.css @@ -0,0 +1 @@ +.wc-gzd-block-components-product-price-label{display:block}.wc-gzd-block-components-product-price-label.wc-gzd-block-components-product-price-label--align-center{text-align:center}.wc-gzd-block-components-product-price-label.wc-gzd-block-components-product-price-label--align-right{text-align:right}.wc-gzd-block-components-product-deposit-packaging-type{text-transform:uppercase}.wc-gzd-block-components-product-nutri-score .wc-gzd-nutri-score-value{height:4rem;width:7.0625rem;display:block;text-indent:-9999px} diff --git a/build/wc-gzd-blocks-product-elements.js b/build/wc-gzd-blocks-product-elements.js new file mode 100644 index 000000000..75467153c --- /dev/null +++ b/build/wc-gzd-blocks-product-elements.js @@ -0,0 +1 @@ +!function(){var e,t,o={567:function(e,t,o){"use strict";var r=o(196),n=o(721),i=o(16);t.Z=e=>(e={...e,labelType:"defect-description"}).isDescendentOfSingleProductTemplate?(0,r.createElement)(i.Z,{...e}):(0,n.withProductDataContext)(i.Z)(e)},14:function(e,t,o){"use strict";var r=o(196),n=o(721),i=o(16);t.Z=e=>(e={...e,labelType:"delivery-time"}).isDescendentOfSingleProductTemplate?(0,r.createElement)(i.Z,{...e}):(0,n.withProductDataContext)(i.Z)(e)},369:function(e,t,o){"use strict";var r=o(196),n=o(721),i=o(16);t.Z=e=>(e={...e,labelType:"deposit-packaging-type"}).isDescendentOfSingleProductTemplate?(0,r.createElement)(i.Z,{...e}):(0,n.withProductDataContext)(i.Z)(e)},789:function(e,t,o){"use strict";var r=o(196),n=o(721),i=o(16);t.Z=e=>(e={...e,labelType:"deposit"}).isDescendentOfSingleProductTemplate?(0,r.createElement)(i.Z,{...e}):(0,n.withProductDataContext)(i.Z)(e)},236:function(e,t,o){"use strict";var r=o(196),n=o(721),i=o(16);t.Z=e=>(e={...e,labelType:"nutri-score"}).isDescendentOfSingleProductTemplate?(0,r.createElement)(i.Z,{...e}):(0,n.withProductDataContext)(i.Z)(e)},16:function(e,t,o){"use strict";o.d(t,{Z:function(){return J}});var r=o(196),n=o.n(r),i=o(184),a=o.n(i),c=window.wc.priceFormat,s=window.wc.wcBlocksSharedContext,l=o(736);const u=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object,m=e=>"string"==typeof e;var p=function(){return p=Object.assign||function(e){for(var t,o=1,r=arguments.length;o{let o=e;return t.forEach((e=>{o=o?.[e]})),o};function S(e,t,o,r){const n=x(e,o);return n?[{selector:t?.selector,key:r,value:k(n)}]:[]}function E(e,t,o,r,n=["top","right","bottom","left"]){const i=x(e,o);if(!i)return[];const a=[];if("string"==typeof i)a.push({selector:t?.selector,key:r.default,value:i});else{const e=n.reduce(((e,o)=>{const n=k(x(i,[o]));return n&&e.push({selector:t?.selector,key:r?.individual.replace("%s",z(o)),value:n}),e}),[]);a.push(...e)}return a}function k(e){return"string"==typeof e&&e.startsWith(w)?`var(--wp--${e.slice(w.length).split(y).map((e=>v(e,{splitRegexp:[/([a-z0-9])([A-Z])/g,/([0-9])([a-z])/g,/([A-Za-z])([0-9])/g,/([A-Z])([A-Z][a-z])/g]}))).join(b)})`:e}function z(e){const[t,...o]=e;return t.toUpperCase()+o.join("")}function _(e){try{return decodeURI(e)}catch(t){return e}}function P(e){return(t,o)=>S(t,o,e,function(e){const[t,...o]=e;return t.toLowerCase()+o.map(z).join("")}(e))}function N(e){return(t,o)=>["color","style","width"].flatMap((r=>P(["border",e,r])(t,o)))}const C={name:"radius",generate:(e,t)=>E(e,t,["border","radius"],{default:"borderRadius",individual:"border%sRadius"},["topLeft","topRight","bottomLeft","bottomRight"])},T=[{name:"color",generate:P(["border","color"])},{name:"style",generate:P(["border","style"])},{name:"width",generate:P(["border","width"])},C,{name:"borderTop",generate:N("top")},{name:"borderRight",generate:N("right")},{name:"borderBottom",generate:N("bottom")},{name:"borderLeft",generate:N("left")},{name:"text",generate:(e,t)=>S(e,t,["color","text"],"color")},{name:"gradient",generate:(e,t)=>S(e,t,["color","gradient"],"background")},{name:"background",generate:(e,t)=>S(e,t,["color","background"],"backgroundColor")},{name:"minHeight",generate:(e,t)=>S(e,t,["dimensions","minHeight"],"minHeight")},{name:"color",generate:(e,t,o=["outline","color"],r="outlineColor")=>S(e,t,o,r)},{name:"style",generate:(e,t,o=["outline","style"],r="outlineStyle")=>S(e,t,o,r)},{name:"offset",generate:(e,t,o=["outline","offset"],r="outlineOffset")=>S(e,t,o,r)},{name:"width",generate:(e,t,o=["outline","width"],r="outlineWidth")=>S(e,t,o,r)},{name:"margin",generate:(e,t)=>E(e,t,["spacing","margin"],{default:"margin",individual:"margin%s"})},{name:"padding",generate:(e,t)=>E(e,t,["spacing","padding"],{default:"padding",individual:"padding%s"})},{name:"fontFamily",generate:(e,t)=>S(e,t,["typography","fontFamily"],"fontFamily")},{name:"fontSize",generate:(e,t)=>S(e,t,["typography","fontSize"],"fontSize")},{name:"fontStyle",generate:(e,t)=>S(e,t,["typography","fontStyle"],"fontStyle")},{name:"fontWeight",generate:(e,t)=>S(e,t,["typography","fontWeight"],"fontWeight")},{name:"letterSpacing",generate:(e,t)=>S(e,t,["typography","letterSpacing"],"letterSpacing")},{name:"lineHeight",generate:(e,t)=>S(e,t,["typography","lineHeight"],"lineHeight")},{name:"textColumns",generate:(e,t)=>S(e,t,["typography","textColumns"],"columnCount")},{name:"textDecoration",generate:(e,t)=>S(e,t,["typography","textDecoration"],"textDecoration")},{name:"textTransform",generate:(e,t)=>S(e,t,["typography","textTransform"],"textTransform")},{name:"writingMode",generate:(e,t)=>S(e,t,["typography","writingMode"],"writingMode")},{name:"shadow",generate:(e,t)=>S(e,t,["shadow"],"boxShadow")},{name:"backgroundImage",generate:(e,t)=>{const o=e?.background?.backgroundImage,r=e?.background?.backgroundSize,n=[];return o?("file"===o?.source&&o?.url&&n.push({selector:t.selector,key:"backgroundImage",value:`url( '${encodeURI(_(o.url))}' )`}),r||n.push({selector:t.selector,key:"backgroundSize",value:"cover"}),n):n}}];function D(e={}){const t={};return function(e,t={}){const o=[];return T.forEach((r=>{"function"==typeof r.generate&&o.push(...r.generate(e,t))})),o}(e,{selector:""}).forEach((e=>{t[e.key]=e.value})),t}function O(e,t){return e&&t?`has-${v(t)}-${e}`:""}const A=e=>{const t=(e=>{const t=u(e)?e:{style:{}};let o=t.style;return m(o)&&(o=JSON.parse(o)||{}),u(o)||(o={}),{...t,style:o}})(e),o=function(e){const{backgroundColor:t,textColor:o,gradient:r,style:n}=e,i=O("background-color",t),c=O("color",o),s=function(e){if(e)return`has-${e}-gradient-background`}(r),l=s||n?.color?.gradient;return{className:a()(c,s,{[i]:!l&&!!i,"has-text-color":o||n?.color?.text,"has-background":t||n?.color?.background||r||n?.color?.gradient,"has-link-color":u(n?.elements?.link)?n?.elements?.link?.color:void 0}),style:D({color:n?.color||{}})}}(t),r=function(e){const t=e.style?.border||{};return{className:function(e){const{borderColor:t,style:o}=e,r=t?O("border-color",t):"";return a()({"has-border-color":!!t||!!o?.border?.color,[r]:!!r})}(e),style:D({border:t})}}(t),n=function(e){return{className:void 0,style:D({spacing:e.style?.spacing||{}})}}(t),i=(e=>{const t=u(e.style.typography)?e.style.typography:{},o=m(t.fontFamily)?t.fontFamily:"";return{className:e.fontFamily?`has-${e.fontFamily}-font-family`:o,style:{fontSize:e.fontSize?`var(--wp--preset--font-size--${e.fontSize})`:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight,letterSpacing:t.letterSpacing,lineHeight:t.lineHeight,textDecoration:t.textDecoration,textTransform:t.textTransform}}})(t);return{className:a()(i.className,o.className,r.className,n.className),style:{...i.style,...o.style,...r.style,...n.style}}};function F(){}function V(e){return!!(e||"").match(/\d/)}function B(e){return null==e}function I(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function Z(e,t){void 0===t&&(t=!0);var o="-"===e[0],r=o&&t,n=(e=e.replace("-","")).split(".");return{beforeDecimal:n[0],afterDecimal:n[1]||"",hasNagation:o,addNegation:r}}function M(e,t,o){for(var r="",n=o?"0":"",i=0;i<=t-1;i++)r+=e[i]||n;return r}function H(e,t){return Array(t+1).join(e)}function R(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var o=e.createTextRange();return o.move("character",t),o.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function j(e,t,o){return Math.min(Math.max(e,t),o)}function q(e){return Math.max(e.selectionStart,e.selectionEnd)}var L={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:F,onChange:F,onKeyDown:F,onMouseUp:F,onFocus:F,onBlur:F,isAllowed:function(){return!0}},G=function(e){function t(t){e.call(this,t);var o=t.defaultValue;this.validateProps();var r=this.formatValueProp(o);this.state={value:r,numAsString:this.removeFormatting(r),mounted:!1},this.selectionBeforeInput={selectionStart:0,selectionEnd:0},this.onChange=this.onChange.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.componentDidMount=function(){this.setState({mounted:!0})},t.prototype.componentDidUpdate=function(e){this.updateValueIfRequired(e)},t.prototype.componentWillUnmount=function(){clearTimeout(this.focusTimeout),clearTimeout(this.caretPositionTimeout)},t.prototype.updateValueIfRequired=function(e){var t=this,o=t.props,r=t.state,n=t.focusedElm,i=r.value,a=r.numAsString;if(void 0===a&&(a=""),e!==o){this.validateProps();var c=this.formatNumString(a),s=B(o.value)?c:this.formatValueProp(),l=this.removeFormatting(s),u=parseFloat(l),m=parseFloat(a);(isNaN(u)&&isNaN(m)||u===m)&&c===i&&(null!==n||s===i)||this.updateValue({formattedValue:s,numAsString:l,input:n,source:"prop",event:null})}},t.prototype.getFloatString=function(e){void 0===e&&(e="");var t=this.props.decimalScale,o=this.getSeparators().decimalSeparator,r=this.getNumberRegex(!0),n="-"===e[0];n&&(e=e.replace("-","")),o&&0===t&&(e=e.split(o)[0]);var i=(e=(e.match(r)||[]).join("").replace(o,".")).indexOf(".");return-1!==i&&(e=e.substring(0,i)+"."+e.substring(i+1,e.length).replace(new RegExp(I(o),"g"),"")),n&&(e="-"+e),e},t.prototype.getNumberRegex=function(e,t){var o=this.props,r=o.format,n=o.decimalScale,i=o.customNumerals,a=this.getSeparators().decimalSeparator;return new RegExp("[0-9"+(i?i.join(""):"")+"]"+(!a||0===n||t||r?"":"|"+I(a)),e?"g":void 0)},t.prototype.getSeparators=function(){var e=this.props.decimalSeparator,t=this.props,o=t.thousandSeparator,r=t.allowedDecimalSeparators;return!0===o&&(o=","),r||(r=[e,"."]),{decimalSeparator:e,thousandSeparator:o,allowedDecimalSeparators:r}},t.prototype.getMaskAtIndex=function(e){var t=this.props.mask;return void 0===t&&(t=" "),"string"==typeof t?t:t[e]||" "},t.prototype.getValueObject=function(e,t){var o=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(o)?void 0:o}},t.prototype.validateProps=function(){var e=this.props.mask,t=this.getSeparators(),o=t.decimalSeparator,r=t.thousandSeparator;if(o===r)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: "+r+' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: '+o+" (default value for decimalSeparator is .)\n ");if(e&&("string"===e?e:e.toString()).match(/\d/g))throw new Error("\n Mask "+e+" should not contain numeric character;\n ")},t.prototype.setPatchedCaretPosition=function(e,t,o){R(e,t),this.caretPositionTimeout=setTimeout((function(){e.value===o&&R(e,t)}),0)},t.prototype.correctCaretPosition=function(e,t,o){var r=this.props,n=r.prefix,i=r.suffix,a=r.format;if(""===e)return 0;if(t=j(t,0,e.length),!a){var c="-"===e[0];return j(t,n.length+(c?1:0),e.length-i.length)}if("function"==typeof a)return t;if("#"===a[t]&&V(e[t]))return t;if("#"===a[t-1]&&V(e[t-1]))return t;var s=a.indexOf("#");t=j(t,s,a.lastIndexOf("#")+1);for(var l=a.substring(t,a.length).indexOf("#"),u=t,m=t+(-1===l?0:l);u>s&&("#"!==a[u]||!V(e[u]));)u-=1;return!V(e[m])||"left"===o&&t!==s||t-u=a?r+=H("0",i-a):r=(r.substring(0,i)||"0")+"."+r.substring(i),t+r}(c),s=!0),"Infinity"===c&&s&&(c=""),s&&!o&&"number"==typeof r&&(c=function(e,t,o){if(-1!==["","-"].indexOf(e))return e;var r=-1!==e.indexOf(".")&&t,n=Z(e),i=n.beforeDecimal,a=n.afterDecimal,c=n.hasNagation,s=parseFloat("0."+(a||"0")),l=(a.length<=t?"0."+a:s.toFixed(t)).split(".");return(c?"-":"")+i.split("").reverse().reduce((function(e,t,o){return e.length>o?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),l[0])+(r?".":"")+M(l[1]||"",Math.min(t,a.length),o)}(c,r,n)),s?this.formatNumString(c):this.formatInput(c))},t.prototype.formatNegation=function(e){void 0===e&&(e="");var t=this.props.allowNegative,o=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),n=o.test(e),i=r.test(e);return e=e.replace(/-/g,""),n&&!i&&t&&(e="-"+e),e},t.prototype.formatInput=function(e){return void 0===e&&(e=""),this.props.format||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)},t.prototype.isCharacterAFormat=function(e,t){var o=this.props,r=o.format,n=o.prefix,i=o.suffix,a=o.decimalScale,c=o.fixedDecimalScale,s=this.getSeparators().decimalSeparator;return"string"==typeof r&&"#"!==r[e]||!(r||!(e=t.length-i.length||a&&c&&t[e]===s))},t.prototype.correctInputValue=function(e,t,o){var r=this,n=this.props,i=n.format,a=n.allowNegative,c=n.prefix,s=n.suffix,l=n.decimalScale,u=this.getSeparators(),m=u.allowedDecimalSeparators,p=u.decimalSeparator,d=this.state.numAsString||"",g=this.selectionBeforeInput,f=g.selectionStart,h=g.selectionEnd,v=function(e,t){for(var o=0,r=0,n=e.length,i=t.length;e[o]===t[o]&&oo&&n-r>o;)r++;return{start:o,end:n-r}}(t,o),w=v.start,y=v.end;if(!i&&w===y&&-1!==m.indexOf(o[f])){var b=0===l?"":p;return o.substr(0,f)+b+o.substr(f+1,o.length)}var x=i?0:c.length,S=t.length-(i?0:s.length);if(o.length>t.length||!o.length||w===y||0===f&&h===t.length||0===w&&y===t.length||f===x&&h===S)return o;var E=t.substr(w,y-w);if([].concat(E).find((function(e,o){return r.isCharacterAFormat(o+w,t)}))){var k=t.substr(w),z={},_=[];[].concat(k).forEach((function(e,o){r.isCharacterAFormat(o+w,t)?z[o]=e:o>E.length-1&&_.push(e)})),Object.keys(z).forEach((function(e){_.length>e?_.splice(e,0,z[e]):_.push(z[e])})),o=t.substr(0,w)+_.join("")}if(!i){var P=this.removeFormatting(o),N=Z(P,a),C=N.beforeDecimal,T=N.afterDecimal,D=N.addNegation,O=ey;)w--;w=this.correctCaretPosition(a,w,"left")}}else for(;!f.test(a[w])&&wb)&&(e.preventDefault(),this.setPatchedCaretPosition(o,w,a)),e.isUnitTestRun&&this.setPatchedCaretPosition(o,w,a),d(e)}else d(e)},t.prototype.onMouseUp=function(e){var t=e.target,o=t.selectionStart,r=t.selectionEnd,n=t.value;if(void 0===n&&(n=""),o===r){var i=this.correctCaretPosition(n,o);i!==o&&this.setPatchedCaretPosition(t,i,n)}this.props.onMouseUp(e)},t.prototype.onFocus=function(e){var t=this;e.persist(),this.focusedElm=e.target,this.focusTimeout=setTimeout((function(){var o=e.target,r=o.selectionStart,n=o.selectionEnd,i=o.value;void 0===i&&(i="");var a=t.correctCaretPosition(i,r);a===r||0===r&&n===i.length||t.setPatchedCaretPosition(o,a,i),t.props.onFocus(e)}),0)},t.prototype.render=function(){var e=this.props,t=e.type,o=e.displayType,r=e.customInput,i=e.renderText,a=e.getInputRef,c=e.format,s=(e.thousandSeparator,e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle,e.decimalScale,e.fixedDecimalScale,e.prefix,e.suffix,e.removeFormatting,e.mask,e.defaultValue,e.isNumericString,e.allowNegative,e.allowEmptyFormatting,e.allowLeadingZeros,e.onValueChange,e.isAllowed,e.customNumerals,e.onChange,e.onKeyDown,e.onMouseUp,e.onFocus,e.onBlur,e.value,function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(o[r]=e[r]);return o}(e,["type","displayType","customInput","renderText","getInputRef","format","thousandSeparator","decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","decimalScale","fixedDecimalScale","prefix","suffix","removeFormatting","mask","defaultValue","isNumericString","allowNegative","allowEmptyFormatting","allowLeadingZeros","onValueChange","isAllowed","customNumerals","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value"])),l=this.state,u=l.value,m=l.mounted&&function(e){return e||"undefined"!=typeof navigator&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(c)?"numeric":void 0,p=Object.assign({inputMode:m},s,{type:t,value:u,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===o)return i?i(u,s)||null:n().createElement("span",Object.assign({},s,{ref:a}),u);if(r){var d=r;return n().createElement(d,Object.assign({},p,{ref:a}))}return n().createElement("input",Object.assign({},p,{ref:a}))},t}(n().Component);G.defaultProps=L;var U=G;const $=e=>({thousandSeparator:e?.thousandSeparator,decimalSeparator:e?.decimalSeparator,fixedDecimalScale:!0,prefix:e?.prefix,suffix:e?.suffix,isNumericString:!0});var W=({className:e,value:t,currency:o,onValueChange:n,displayType:i="text",...c})=>{var s;const l="string"==typeof t?parseInt(t,10):t;if(!Number.isFinite(l))return null;const u=l/10**o.minorUnit;if(!Number.isFinite(u))return null;const m=a()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",e),p=null!==(s=c.decimalScale)&&void 0!==s?s:o?.minorUnit,d={...c,...$(o),decimalScale:p,value:void 0,currency:void 0,onValueChange:void 0},g=n?e=>{const t=+e.value*10**o.minorUnit;n(t)}:()=>{};return(0,r.createElement)(U,{className:m,displayType:i,...d,value:u,onValueChange:g})},Q=o(307),K=({align:e,className:t,labelType:o,formattedLabel:n,labelClassName:i,labelStyle:c,style:s})=>{const l=a()(t,"wc-gzd-block-components-product-"+o,"wc-gzd-block-components-product-price-label",{[`wc-gzd-block-components-product-price-label--align-${e}`]:e});let u=(0,r.createElement)("span",{className:a()("wc-gzd-block-components-product-"+o+"__value",i)});return n&&(u=(0,Q.isValidElement)(n)?(0,r.createElement)("span",{className:a()("wc-gzd-block-components-product-"+o+"__value",i),style:c},n):(0,r.createElement)("span",{className:a()("wc-gzd-block-components-product-"+o+"__value",i),style:c,dangerouslySetInnerHTML:{__html:n}})),(0,r.createElement)("span",{className:l,style:s},u)},J=e=>{const{className:t,textAlign:o,isDescendentOfSingleProductTemplate:n,labelType:i}=e,{parentName:u,parentClassName:m}=(0,s.useInnerBlockLayoutContext)(),{product:p}=(0,s.useProductDataContext)(),d=A(e),g="woocommerce/all-products"===u,f=a()("wc-gzd-block-components-product-"+i,t,d.className,{[`${m}__product-${i}`]:m});if(!p.id&&!n){const e=(0,r.createElement)(K,{align:o,className:f,labelType:i});if(g){const t=`wp-block-woocommerce-gzd-product-${i}`;return(0,r.createElement)("div",{className:t},e)}return e}const h=((e,t,o)=>{const n=t.hasOwnProperty("extensions")?t.extensions["woocommerce-germanized"]:{unit_price_html:"",unit_prices:{price:0,regular_price:0,sale_price:0},unit_product:0,unit_product_html:"",delivery_time_html:"",tax_info_html:"",shipping_costs_info_html:"",defect_description_html:"",nutri_score:"",nutri_score_html:"",deposit_html:"",deposit_prices:{price:0,quantity:0,amount:0},deposit_packaging_type_html:"",manufacturer_html:"",product_safety_attachments_html:""},i=t.prices,a=o?(0,c.getCurrencyFromPriceResponse)():(0,c.getCurrencyFromPriceResponse)(i),s=e.replace(/-/g,"_"),u=n.hasOwnProperty(s+"_html")?n[s+"_html"]:"";let m="";return"unit_price"===s?m=(0,r.createElement)(r.Fragment,null,(0,r.createElement)(W,{currency:a,value:1e3})," / ",(0,r.createElement)("span",{className:"unit"},(0,l._x)("kg","unit","woocommerce-germanized"))):"delivery_time"===s?m=(0,l._x)("Delivery time: 2-3 days","preview","woocommerce-germanized"):"tax_info"===s?m=(0,l._x)("incl. 19 % VAT","preview","woocommerce-germanized"):"shipping_costs_info"===s?m=(0,l._x)("plus shipping costs","preview","woocommerce-germanized"):"unit_product"===s?m=(0,l.sprintf)((0,l._x)("Product includes: %1$s kg","preview","woocommerce-germanized"),10):"defect_description"===s?m=(0,l._x)("This product has a serious defect.","preview","woocommerce-germanized"):"deposit"===s?m=(0,r.createElement)(r.Fragment,null,(0,r.createElement)("span",{className:"additional"},(0,l._x)("Plus","preview","woocommerce-germanized"))," ",(0,r.createElement)(W,{currency:a,value:40})," ",(0,r.createElement)("span",{className:"deposit-notice"},(0,l._x)("deposit","preview","woocommerce-germanized"))):"deposit_packaging_type"===s?m=(0,l._x)("Disposable","preview","woocommerce-germanized"):"nutri_score"===s?m=(0,r.createElement)(r.Fragment,null,(0,r.createElement)("span",{className:"wc-gzd-nutri-score-value wc-gzd-nutri-score-value-a"},"A")):"manufacturer"===s?m=(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,(0,r.createElement)("stong",null,(0,l._x)("Sample company name","preview","woocommerce-germanized")),(0,r.createElement)("br",null),(0,l._x)("Sample address","preview","woocommerce-germanized"),(0,r.createElement)("br",null),(0,l._x)("12345 Berlin","preview","woocommerce-germanized"),(0,r.createElement)("br",null),(0,l._x)("sample@sample.com","preview","woocommerce-germanized")),(0,r.createElement)("h3",null,(0,l.__)("Person responsible for the EU","woocommerce-germanized")),(0,r.createElement)("p",null,(0,r.createElement)("stong",null,(0,l._x)("Sample company name","preview","woocommerce-germanized")),(0,r.createElement)("br",null),(0,l._x)("Sample address","preview","woocommerce-germanized"),(0,r.createElement)("br",null),(0,l._x)("12345 Berlin","preview","woocommerce-germanized"),(0,r.createElement)("br",null),(0,l._x)("sample@sample.com","preview","woocommerce-germanized"))):"product_safety_attachments"===s&&(m=(0,r.createElement)(r.Fragment,null,(0,r.createElement)("ul",null,(0,r.createElement)("li",null,(0,r.createElement)("a",{href:"#"},(0,l._x)("sample-filename.pdf","sample","woocommerce-germanized")))))),{preview:m,data:u}})(i,p,n),v=(0,r.createElement)(K,{align:o,className:f,labelType:i,style:d.style,labelStyle:d.style,formattedLabel:n?h.preview:h.data});if(g){const e=`wp-block-woocommerce-gzd-product-${i}`;return(0,r.createElement)("div",{className:e},v)}return v}},38:function(e,t,o){"use strict";var r=o(196),n=o(721),i=o(16);t.Z=e=>(e={...e,labelType:"shipping-costs-info"}).isDescendentOfSingleProductTemplate?(0,r.createElement)(i.Z,{...e}):(0,n.withProductDataContext)(i.Z)(e)},479:function(e,t,o){"use strict";var r=o(196),n=o(721),i=o(16);t.Z=e=>(e={...e,labelType:"tax-info"}).isDescendentOfSingleProductTemplate?(0,r.createElement)(i.Z,{...e}):(0,n.withProductDataContext)(i.Z)(e)},663:function(e,t,o){"use strict";var r=o(196),n=o(721),i=o(16);t.Z=e=>(e={...e,labelType:"unit-price"}).isDescendentOfSingleProductTemplate?(0,r.createElement)(i.Z,{...e}):(0,n.withProductDataContext)(i.Z)(e)},140:function(e,t,o){"use strict";var r=o(196),n=o(721),i=o(16);t.Z=e=>(e={...e,labelType:"unit-product"}).isDescendentOfSingleProductTemplate?(0,r.createElement)(i.Z,{...e}):(0,n.withProductDataContext)(i.Z)(e)},184:function(e,t){var o;!function(){"use strict";var r={}.hasOwnProperty;function n(){for(var e=[],t=0;t-1&&!e;)e=o[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e}(),function(){var e={132:0};n.f.j=function(t,o){var r=n.o(e,t)?e[t]:void 0;if(0!==r)if(r)o.push(r[2]);else{var i=new Promise((function(o,n){r=e[t]=[o,n]}));o.push(r[2]=i);var a=n.p+n.u(t),c=new Error;n.l(a,(function(o){if(n.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var i=o&&("load"===o.type?"missing":o.type),a=o&&o.target&&o.target.src;c.message="Loading chunk "+t+" failed.\n("+i+": "+a+")",c.name="ChunkLoadError",c.type=i,c.request=a,r[1](c)}}),"chunk-"+t,t)}};var t=function(t,o){var r,i,a=o[0],c=o[1],s=o[2],l=0;if(a.some((function(t){return 0!==e[t]}))){for(r in c)n.o(c,r)&&(n.m[r]=c[r]);s&&s(n)}for(t&&t(o);lt.isDescendentOfQueryLoop||t.isDescendentOfSingleProductBlock||t.isDescendentOfSingleProductTemplate?null:(0,e.createElement)("div",{className:p()("is-loading",t.className)})},g=n(663),f=window.wp.data;const h=()=>({isDescendentOfSingleProductTemplate:(0,f.useSelect)((e=>{const t=e("core/edit-site"),o=t?.getEditedPostId();return Boolean(o?.includes("//single-product"))}),[])});const{ancestor:v,...w}=d,y={...w,apiVersion:2,title:(0,s.__)("Unit Price","woocommerce-germanized"),description:(0,s.__)("Inserts the product's price per unit.","woocommerce-germanized"),usesContext:["query","queryId","postId"],icon:{src:(0,e.createElement)(r,{icon:c,className:"wc-block-editor-components-block-icon"})},supports:{...d.supports,__experimentalSelector:".wp-block-woocommerce-gzd-product-unit-price .wc-gzd-block-components-product-unit-price"},edit:({attributes:t,setAttributes:r,context:n})=>{const i=(0,u.useBlockProps)(),a={...t,...n},c=Number.isFinite(n.queryId);let{isDescendentOfSingleProductTemplate:s}=h();return c&&(s=!1),(0,o.useEffect)((()=>r({isDescendentOfQueryLoop:c,isDescendentOfSingleProductTemplate:s})),[c,s,r]),(0,e.createElement)(e.Fragment,null,(0,e.createElement)(u.BlockControls,null,(0,e.createElement)(u.AlignmentToolbar,{value:t.textAlign,onChange:e=>{r({textAlign:e})}})),(0,e.createElement)("div",{...i},(0,e.createElement)(g.Z,{...a})))}};(0,t.registerBlockType)("woocommerce-germanized/product-unit-price",y);var b=(0,o.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(a.Path,{d:"M11.696 13.972c.356-.546.599-.958.728-1.235a1.79 1.79 0 00.203-.783c0-.264-.077-.47-.23-.618-.148-.153-.354-.23-.618-.23-.295 0-.569.07-.82.212a3.413 3.413 0 00-.738.571l-.147-1.188c.289-.234.59-.41.903-.526.313-.117.66-.175 1.041-.175.375 0 .695.08.959.24.264.153.46.362.59.626.135.265.203.556.203.876 0 .362-.08.734-.24 1.115-.154.381-.427.87-.82 1.466l-.756 1.152H14v1.106h-4l1.696-2.609z"}),(0,o.createElement)(a.Path,{d:"M19.5 7h-15v12a.5.5 0 00.5.5h14a.5.5 0 00.5-.5V7zM3 7V5a2 2 0 012-2h14a2 2 0 012 2v14a2 2 0 01-2 2H5a2 2 0 01-2-2V7z"})),x=n(14);const{ancestor:S,...E}=d,k={...E,apiVersion:2,title:(0,s.__)("Delivery Time","woocommerce-germanized"),description:(0,s.__)("Inserts the product's delivery time.","woocommerce-germanized"),usesContext:["query","queryId","postId"],icon:{src:(0,e.createElement)(r,{icon:b,className:"wc-block-editor-components-block-icon"})},supports:{...d.supports,__experimentalSelector:".wp-block-woocommerce-gzd-product-delivery-time .wc-gzd-block-components-product-delivery-time"},edit:({attributes:t,setAttributes:r,context:n})=>{const i=(0,u.useBlockProps)(),a={...t,...n},c=Number.isFinite(n.queryId);let{isDescendentOfSingleProductTemplate:s}=h();return c&&(s=!1),(0,o.useEffect)((()=>r({isDescendentOfQueryLoop:c,isDescendentOfSingleProductTemplate:s})),[c,s,r]),(0,e.createElement)(e.Fragment,null,(0,e.createElement)(u.BlockControls,null,(0,e.createElement)(u.AlignmentToolbar,{value:t.textAlign,onChange:e=>{r({textAlign:e})}})),(0,e.createElement)("div",{...i},(0,e.createElement)(x.Z,{...a})))}};(0,t.registerBlockType)("woocommerce-germanized/product-delivery-time",k);var z=(0,o.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(a.Path,{d:"M12 3.176l6.75 3.068v4.574c0 3.9-2.504 7.59-6.035 8.755a2.283 2.283 0 01-1.43 0c-3.53-1.164-6.035-4.856-6.035-8.755V6.244L12 3.176zM6.75 7.21v3.608c0 3.313 2.145 6.388 5.005 7.33.159.053.331.053.49 0 2.86-.942 5.005-4.017 5.005-7.33V7.21L12 4.824 6.75 7.21z",fillRule:"evenodd",clipRule:"evenodd"})),_=n(479);const{ancestor:P,...N}=d,C={...N,apiVersion:2,title:(0,s.__)("Tax Notice","woocommerce-germanized"),description:(0,s.__)("Inserts the product's tax notice.","woocommerce-germanized"),usesContext:["query","queryId","postId"],icon:{src:(0,e.createElement)(r,{icon:z,className:"wc-block-editor-components-block-icon"})},supports:{...d.supports,__experimentalSelector:".wp-block-woocommerce-gzd-product-tax-info .wc-gzd-block-components-product-tax-info"},edit:({attributes:t,setAttributes:r,context:n})=>{const i=(0,u.useBlockProps)(),a={...t,...n},c=Number.isFinite(n.queryId);let{isDescendentOfSingleProductTemplate:s}=h();return c&&(s=!1),(0,o.useEffect)((()=>r({isDescendentOfQueryLoop:c,isDescendentOfSingleProductTemplate:s})),[c,s,r]),(0,e.createElement)(e.Fragment,null,(0,e.createElement)(u.BlockControls,null,(0,e.createElement)(u.AlignmentToolbar,{value:t.textAlign,onChange:e=>{r({textAlign:e})}})),(0,e.createElement)("div",{...i},(0,e.createElement)(_.Z,{...a})))}};(0,t.registerBlockType)("woocommerce-germanized/product-tax-info",C);var T=(0,o.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(a.Path,{d:"M3 6.75C3 5.784 3.784 5 4.75 5H15V7.313l.05.027 5.056 2.73.394.212v3.468a1.75 1.75 0 01-1.75 1.75h-.012a2.5 2.5 0 11-4.975 0H9.737a2.5 2.5 0 11-4.975 0H3V6.75zM13.5 14V6.5H4.75a.25.25 0 00-.25.25V14h.965a2.493 2.493 0 011.785-.75c.7 0 1.332.287 1.785.75H13.5zm4.535 0h.715a.25.25 0 00.25-.25v-2.573l-4-2.16v4.568a2.487 2.487 0 011.25-.335c.7 0 1.332.287 1.785.75zM6.282 15.5a1.002 1.002 0 00.968 1.25 1 1 0 10-.968-1.25zm9 0a1 1 0 101.937.498 1 1 0 00-1.938-.498z"})),D=n(38);const{ancestor:O,...A}=d,F={...A,apiVersion:2,title:(0,s.__)("Shipping Costs Notice","woocommerce-germanized"),description:(0,s.__)("Inserts the product's shipping costs notice.","woocommerce-germanized"),usesContext:["query","queryId","postId"],icon:{src:(0,e.createElement)(r,{icon:T,className:"wc-block-editor-components-block-icon"})},supports:{...d.supports,__experimentalSelector:".wp-block-woocommerce-gzd-product-shipping-costs-info .wc-gzd-block-components-product-shipping-costs-info"},edit:({attributes:t,setAttributes:r,context:n})=>{const i=(0,u.useBlockProps)(),a={...t,...n},c=Number.isFinite(n.queryId);let{isDescendentOfSingleProductTemplate:s}=h();return c&&(s=!1),(0,o.useEffect)((()=>r({isDescendentOfQueryLoop:c,isDescendentOfSingleProductTemplate:s})),[c,s,r]),(0,e.createElement)(e.Fragment,null,(0,e.createElement)(u.BlockControls,null,(0,e.createElement)(u.AlignmentToolbar,{value:t.textAlign,onChange:e=>{r({textAlign:e})}})),(0,e.createElement)("div",{...i},(0,e.createElement)(D.Z,{...a})))}};(0,t.registerBlockType)("woocommerce-germanized/product-shipping-costs-info",F);var V=(0,o.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(a.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"})),B=n(140);const{ancestor:I,...Z}=d,M={...Z,apiVersion:2,title:(0,s.__)("Unit products","woocommerce-germanized"),description:(0,s.__)("Inserts the product's units.","woocommerce-germanized"),usesContext:["query","queryId","postId"],icon:{src:(0,e.createElement)(r,{icon:V,className:"wc-block-editor-components-block-icon"})},supports:{...d.supports,__experimentalSelector:".wp-block-woocommerce-gzd-product-unit-product .wc-gzd-block-components-product-unit-product"},edit:({attributes:t,setAttributes:r,context:n})=>{const i=(0,u.useBlockProps)(),a={...t,...n},c=Number.isFinite(n.queryId);let{isDescendentOfSingleProductTemplate:s}=h();return c&&(s=!1),(0,o.useEffect)((()=>r({isDescendentOfQueryLoop:c,isDescendentOfSingleProductTemplate:s})),[c,s,r]),(0,e.createElement)(e.Fragment,null,(0,e.createElement)(u.BlockControls,null,(0,e.createElement)(u.AlignmentToolbar,{value:t.textAlign,onChange:e=>{r({textAlign:e})}})),(0,e.createElement)("div",{...i},(0,e.createElement)(B.Z,{...a})))}};(0,t.registerBlockType)("woocommerce-germanized/product-unit-product",M);var H=(0,o.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(a.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 12.8h8v-1.5H8v1.5z"})),R=window.wcGzd.blocks.wcGzdBlocksSettings,j=n(236);const{ancestor:q,...L}=d,G={...L,apiVersion:2,title:(0,s.__)("Nutri-Score","woocommerce-germanized")+((0,R.getSetting)("isPro")?"":" (Pro)"),description:(0,s.__)("Inserts the product's Nutri-Score.","woocommerce-germanized"),usesContext:["query","queryId","postId"],icon:{src:(0,e.createElement)(r,{icon:H,className:"wc-block-editor-components-block-icon"})},supports:{...d.supports,__experimentalSelector:".wp-block-woocommerce-gzd-product-nutri-score .wc-gzd-block-components-product-nutri-score"},edit:({attributes:t,setAttributes:r,context:n})=>{const i=(0,u.useBlockProps)(),a={...t,...n},c=Number.isFinite(n.queryId);let{isDescendentOfSingleProductTemplate:s}=h();return c&&(s=!1),(0,o.useEffect)((()=>r({isDescendentOfQueryLoop:c,isDescendentOfSingleProductTemplate:s})),[c,s,r]),(0,e.createElement)(e.Fragment,null,(0,e.createElement)(u.BlockControls,null,(0,e.createElement)(u.AlignmentToolbar,{value:t.textAlign,onChange:e=>{r({textAlign:e})}})),(0,e.createElement)("div",{...i},(0,e.createElement)(j.Z,{...a})))}};(0,t.registerBlockType)("woocommerce-germanized/product-nutri-score",G);var U=n(789);const{ancestor:$,...W}=d,Q={...W,apiVersion:2,title:(0,s.__)("Deposit amount","woocommerce-germanized")+((0,R.getSetting)("isPro")?"":" (Pro)"),description:(0,s.__)("Inserts the product's deposit amount.","woocommerce-germanized"),usesContext:["query","queryId","postId"],icon:{src:(0,e.createElement)(r,{icon:c,className:"wc-block-editor-components-block-icon"})},supports:{...d.supports,__experimentalSelector:".wp-block-woocommerce-gzd-product-deposit .wc-gzd-block-components-product-deposit"},edit:({attributes:t,setAttributes:r,context:n})=>{const i=(0,u.useBlockProps)(),a={...t,...n},c=Number.isFinite(n.queryId);let{isDescendentOfSingleProductTemplate:s}=h();return c&&(s=!1),(0,o.useEffect)((()=>r({isDescendentOfQueryLoop:c,isDescendentOfSingleProductTemplate:s})),[c,s,r]),(0,e.createElement)(e.Fragment,null,(0,e.createElement)(u.BlockControls,null,(0,e.createElement)(u.AlignmentToolbar,{value:t.textAlign,onChange:e=>{r({textAlign:e})}})),(0,e.createElement)("div",{...i},(0,e.createElement)(U.Z,{...a})))}};(0,t.registerBlockType)("woocommerce-germanized/product-deposit",Q);var K=n(369);const{ancestor:J,...X}=d,Y={...X,apiVersion:2,title:(0,s.__)("Deposit packaging type","woocommerce-germanized")+((0,R.getSetting)("isPro")?"":" (Pro)"),description:(0,s.__)("Inserts the product's deposit packaging type.","woocommerce-germanized"),usesContext:["query","queryId","postId"],icon:{src:(0,e.createElement)(r,{icon:V,className:"wc-block-editor-components-block-icon"})},supports:{...d.supports,__experimentalSelector:".wp-block-woocommerce-gzd-product-deposit-packaging-type .wc-gzd-block-components-product-deposit-packaging-type"},edit:({attributes:t,setAttributes:r,context:n})=>{const i=(0,u.useBlockProps)(),a={...t,...n},c=Number.isFinite(n.queryId);let{isDescendentOfSingleProductTemplate:s}=h();return c&&(s=!1),(0,o.useEffect)((()=>r({isDescendentOfQueryLoop:c,isDescendentOfSingleProductTemplate:s})),[c,s,r]),(0,e.createElement)(e.Fragment,null,(0,e.createElement)(u.BlockControls,null,(0,e.createElement)(u.AlignmentToolbar,{value:t.textAlign,onChange:e=>{r({textAlign:e})}})),(0,e.createElement)("div",{...i},(0,e.createElement)(K.Z,{...a})))}};(0,t.registerBlockType)("woocommerce-germanized/product-deposit-packaging-type",Y);var ee=(0,o.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(a.Path,{d:"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"})),te=n(567);const{ancestor:oe,...re}=d,ne={...re,apiVersion:2,title:(0,s.__)("Defect Description","woocommerce-germanized"),description:(0,s.__)("Inserts the product's defect description.","woocommerce-germanized"),usesContext:["query","queryId","postId"],icon:{src:(0,e.createElement)(r,{icon:ee,className:"wc-block-editor-components-block-icon"})},supports:{...d.supports,__experimentalSelector:".wp-block-woocommerce-gzd-product-defect-description .wc-gzd-block-components-product-defect-description"},edit:({attributes:t,setAttributes:r,context:n})=>{const i=(0,u.useBlockProps)(),a={...t,...n},c=Number.isFinite(n.queryId);let{isDescendentOfSingleProductTemplate:s}=h();return c&&(s=!1),(0,o.useEffect)((()=>r({isDescendentOfQueryLoop:c,isDescendentOfSingleProductTemplate:s})),[c,s,r]),(0,e.createElement)(e.Fragment,null,(0,e.createElement)(u.BlockControls,null,(0,e.createElement)(u.AlignmentToolbar,{value:t.textAlign,onChange:e=>{r({textAlign:e})}})),(0,e.createElement)("div",{...i},(0,e.createElement)(te.Z,{...a})))}};(0,t.registerBlockType)("woocommerce-germanized/product-defect-description",ne);var ie=(0,o.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(a.Path,{fillRule:"evenodd",d:"M19.75 11H21V8.667L19.875 4H4.125L3 8.667V11h1.25v8.75h15.5V11zm-1.5 0H5.75v7.25H10V13h4v5.25h4.25V11zm-5.5-5.5h2.067l.486 3.24.028.76H12.75v-4zm-3.567 0h2.067v4H8.669l.028-.76.486-3.24zm7.615 3.1l-.464-3.1h2.36l.806 3.345V9.5h-2.668l-.034-.9zM7.666 5.5h-2.36L4.5 8.845V9.5h2.668l.034-.9.464-3.1z",clipRule:"evenodd"})),ae=n(721),ce=n(16),se=t=>(t={...t,labelType:"manufacturer"}).isDescendentOfSingleProductTemplate?(0,e.createElement)(ce.Z,{...t}):(0,ae.withProductDataContext)(ce.Z)(t);const{ancestor:le,...ue}=d,me={...ue,apiVersion:2,title:(0,s.__)("Manufacturer","woocommerce-germanized")+((0,R.getSetting)("isPro")?"":" (Pro)"),description:(0,s.__)("Inserts the product's manufacturer information.","woocommerce-germanized"),usesContext:["query","queryId","postId"],icon:{src:(0,e.createElement)(r,{icon:ie,className:"wc-block-editor-components-block-icon"})},supports:{...d.supports,__experimentalSelector:".wp-block-woocommerce-gzd-product-manufacturer .wc-gzd-block-components-product-manufacturer"},edit:({attributes:t,setAttributes:r,context:n})=>{const i=(0,u.useBlockProps)(),a={...t,...n},c=Number.isFinite(n.queryId);let{isDescendentOfSingleProductTemplate:s}=h();return c&&(s=!1),(0,o.useEffect)((()=>r({isDescendentOfQueryLoop:c,isDescendentOfSingleProductTemplate:s})),[c,s,r]),(0,e.createElement)(e.Fragment,null,(0,e.createElement)(u.BlockControls,null,(0,e.createElement)(u.AlignmentToolbar,{value:t.textAlign,onChange:e=>{r({textAlign:e})}})),(0,e.createElement)("div",{...i},(0,e.createElement)(se,{...a})))}};(0,t.registerBlockType)("woocommerce-germanized/product-manufacturer",me);var pe=(0,o.createElement)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(a.Path,{d:"M19 6.2h-5.9l-.6-1.1c-.3-.7-1-1.1-1.8-1.1H5c-1.1 0-2 .9-2 2v11.8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8.2c0-1.1-.9-2-2-2zm.5 11.6c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h5.8c.2 0 .4.1.4.3l1 2H19c.3 0 .5.2.5.5v9.5z"})),de=t=>(t={...t,labelType:"product_safety_attachments"}).isDescendentOfSingleProductTemplate?(0,e.createElement)(ce.Z,{...t}):(0,ae.withProductDataContext)(ce.Z)(t);const{ancestor:ge,...fe}=d,he={...fe,apiVersion:2,title:(0,s.__)("Product safety attachments","woocommerce-germanized")+((0,R.getSetting)("isPro")?"":" (Pro)"),description:(0,s.__)("Inserts the product's safety attachments list.","woocommerce-germanized"),usesContext:["query","queryId","postId"],icon:{src:(0,e.createElement)(r,{icon:pe,className:"wc-block-editor-components-block-icon"})},supports:{...d.supports,__experimentalSelector:".wp-block-woocommerce-gzd-product-safety-attachments .wc-gzd-block-components-product-safety-attachments"},edit:({attributes:t,setAttributes:r,context:n})=>{const i=(0,u.useBlockProps)(),a={...t,...n},c=Number.isFinite(n.queryId);let{isDescendentOfSingleProductTemplate:s}=h();return c&&(s=!1),(0,o.useEffect)((()=>r({isDescendentOfQueryLoop:c,isDescendentOfSingleProductTemplate:s})),[c,s,r]),(0,e.createElement)(e.Fragment,null,(0,e.createElement)(u.BlockControls,null,(0,e.createElement)(u.AlignmentToolbar,{value:t.textAlign,onChange:e=>{r({textAlign:e})}})),(0,e.createElement)("div",{...i},(0,e.createElement)(de,{...a})))}};(0,t.registerBlockType)("woocommerce-germanized/product-safety-attachments",he);var ve=window.wc.wcBlocksRegistry;(0,ve.registerBlockComponent)({blockName:"woocommerce-germanized/product-unit-price",component:(0,o.lazy)((()=>n.e(92).then(n.bind(n,313))))}),(0,ve.registerBlockComponent)({blockName:"woocommerce-germanized/product-delivery-time",component:(0,o.lazy)((()=>n.e(518).then(n.bind(n,466))))}),(0,ve.registerBlockComponent)({blockName:"woocommerce-germanized/product-tax-info",component:(0,o.lazy)((()=>n.e(297).then(n.bind(n,984))))}),(0,ve.registerBlockComponent)({blockName:"woocommerce-germanized/product-shipping-costs-info",component:(0,o.lazy)((()=>n.e(648).then(n.bind(n,949))))}),(0,ve.registerBlockComponent)({blockName:"woocommerce-germanized/product-unit-product",component:(0,o.lazy)((()=>n.e(6).then(n.bind(n,580))))}),(0,ve.registerBlockComponent)({blockName:"woocommerce-germanized/product-nutri-score",component:(0,o.lazy)((()=>n.e(128).then(n.bind(n,418))))}),(0,ve.registerBlockComponent)({blockName:"woocommerce-germanized/product-deposit",component:(0,o.lazy)((()=>n.e(412).then(n.bind(n,757))))}),(0,ve.registerBlockComponent)({blockName:"woocommerce-germanized/product-deposit-packaging-type",component:(0,o.lazy)((()=>n.e(534).then(n.bind(n,41))))}),(0,ve.registerBlockComponent)({blockName:"woocommerce-germanized/product-defect-description",component:(0,o.lazy)((()=>n.e(710).then(n.bind(n,944))))})}(),((window.wcGzd=window.wcGzd||{}).blocks=window.wcGzd.blocks||{})["wc-gzd-blocks-product-elements"]=i}(); \ No newline at end of file diff --git a/build/wc-gzd-blocks-settings.asset.php b/build/wc-gzd-blocks-settings.asset.php new file mode 100644 index 000000000..b87a8bce6 --- /dev/null +++ b/build/wc-gzd-blocks-settings.asset.php @@ -0,0 +1 @@ + array('wc-settings'), 'version' => '04cffc5f543ace1b24b2'); diff --git a/build/wc-gzd-blocks-settings.js b/build/wc-gzd-blocks-settings.js new file mode 100644 index 000000000..3b217a529 --- /dev/null +++ b/build/wc-gzd-blocks-settings.js @@ -0,0 +1 @@ +!function(){"use strict";var t={d:function(e,n){for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{allSettings:function(){return n},getSetting:function(){return c}});const n="object"==typeof window.wcGzdBlocksSettings?window.wcGzdBlocksSettings:{};var o=window.wc.wcSettings;const c=(t,e=!1)=>{let c=e;return c=t in n?n[t]:(0,o.getSetting)(t,e),c};((window.wcGzd=window.wcGzd||{}).blocks=window.wcGzd.blocks||{}).wcGzdBlocksSettings=e}(); \ No newline at end of file diff --git a/build/wc-gzd-blocks-style.asset.php b/build/wc-gzd-blocks-style.asset.php new file mode 100644 index 000000000..4b4fcc2f6 --- /dev/null +++ b/build/wc-gzd-blocks-style.asset.php @@ -0,0 +1 @@ + array(), 'version' => '840ef8dc0384a52d884f'); diff --git a/build/wc-gzd-blocks.asset.php b/build/wc-gzd-blocks.asset.php new file mode 100644 index 000000000..a01dfda49 --- /dev/null +++ b/build/wc-gzd-blocks.asset.php @@ -0,0 +1 @@ + array(), 'version' => '27998ec88e7610b85906'); diff --git a/build/wc-gzd-blocks.css b/build/wc-gzd-blocks.css new file mode 100644 index 000000000..215e8ede6 --- /dev/null +++ b/build/wc-gzd-blocks.css @@ -0,0 +1 @@ +.wc-gzd-block-grid__product-unit-price{display:block}.wc-gzd-block-components-product-deposit-packaging-type{text-transform:uppercase}.wp-block-woocommerce-gzd-product-is-empty{display:none} diff --git a/build/wc-gzd-blocks.js b/build/wc-gzd-blocks.js new file mode 100644 index 000000000..4f214343f --- /dev/null +++ b/build/wc-gzd-blocks.js @@ -0,0 +1 @@ +!function(){"use strict";var n,r={76:function(n,r,o){o.r(r)}},o={};function e(n){var t=o[n];if(void 0!==t)return t.exports;var i=o[n]={exports:{}};return r[n](i,i.exports,e),i.exports}e.m=r,n=[],e.O=function(r,o,t,i){if(!o){var c=1/0;for(s=0;s=i)&&Object.keys(e.O).every((function(n){return e.O[n](o[f])}))?o.splice(f--,1):(u=!1,i0&&n[s-1][2]>i;s--)n[s]=n[s-1];n[s]=[o,t,i]},e.o=function(n,r){return Object.prototype.hasOwnProperty.call(n,r)},e.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},function(){var n={70:0,617:0};e.O.j=function(r){return 0===n[r]};var r=function(r,o){var t,i,c=o[0],u=o[1],f=o[2],l=0;if(c.some((function(r){return 0!==n[r]}))){for(t in u)e.o(u,t)&&(e.m[t]=u[t]);if(f)var s=f(e)}for(r&&r(o);l array('react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-settings', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n'), 'version' => 'c7ab9ce4b0e50505cd73'); diff --git a/build/wc-gzd-payment-method-direct-debit.js b/build/wc-gzd-payment-method-direct-debit.js new file mode 100644 index 000000000..38b446f1d --- /dev/null +++ b/build/wc-gzd-payment-method-direct-debit.js @@ -0,0 +1 @@ +!function(){"use strict";var e={};(function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(e);var t,a=window.React,o=window.wc.wcBlocksRegistry,r=window.wp.i18n,i=window.wc.wcSettings,n=window.wp.htmlEntities,c=window.wp.element,d=window.wc.blocksCheckout,l=window.wp.data,s=window.wc.wcBlocksData;const u=(0,i.getPaymentMethodData)("direct-debit",{}),m=(0,r.__)("Direct debit","woocommerce-germanized"),w=(0,n.decodeEntities)(u?.title||"")||m,_=({billing:e,eventRegistration:t,emitResponse:o,components:i})=>{const{values:n}=(0,l.useSelect)((e=>({values:e(s.PAYMENT_STORE_KEY).getPaymentMethodData()})),[]),{__internalSetPaymentMethodData:u}=(0,l.useDispatch)(s.PAYMENT_STORE_KEY),{extensionData:m}=(0,l.useSelect)((e=>{const t=e(s.CHECKOUT_STORE_KEY).getExtensionData();return{extensionData:t.hasOwnProperty("woocommerce-germanized")?t["woocommerce-germanized"]:{}}})),{__internalSetExtensionData:w}=(0,l.useDispatch)(s.CHECKOUT_STORE_KEY),_=[{key:"direct_debit_account_holder",label:(0,r.__)("Account holder","woocommerce-germanized"),type:"text",required:!0,errorMessage:"",autocomplete:"",autocapitalize:""},{key:"direct_debit_account_iban",label:(0,r.__)("IBAN","woocommerce-germanized"),type:"text",required:!0,errorMessage:"",autocomplete:"",autocapitalize:""},{key:"direct_debit_account_bic",label:(0,r.__)("BIC/SWIFT","woocommerce-germanized"),type:"text",required:!0,errorMessage:"",autocomplete:"",autocapitalize:""}],p=(0,c.useRef)({});return(0,a.createElement)("div",{className:"wc-gzd-direct-debit-fields"},_.map((e=>{const t={id:`${e.key}`,errorId:`${e.key}`,label:e.required?e.label:e.optionalLabel,autoCapitalize:e.autocapitalize,autoComplete:e.autocomplete,errorMessage:e.errorMessage,required:e.required,className:`wc-gzd-direct-debit__${e.key}`},o=n.hasOwnProperty(e.key)?n[e.key]:"";return(0,a.createElement)(d.ValidatedTextInput,{key:e.key,ref:t=>p.current[e.key]=t,...t,value:o,onChange:t=>(u({...n,[e.key]:t}),t),customFormatter:t=>("direct_debit_account_bic"===e.key?t=(t=t.toUpperCase()).replace(/[^\w]/g,""):"direct_debit_account_iban"===e.key&&(t=(t=t.toUpperCase()).replace(/[^\w\s]/g,"")),t),customValidation:t=>{if("direct_debit_account_bic"===e.key){if(!/^([a-zA-Z]){4}([a-zA-Z]){2}([0-9a-zA-Z]){2}([0-9a-zA-Z]{3})?$/.test(t.value))return t.setCustomValidity((0,r.__)("Please enter a valid BIC/SWIFT","woocommerce-germanized")),!1}else if("direct_debit_account_iban"===e.key){const e=function(e){let t,a=e.slice(0,2);for(let o=2;oe.charCodeAt(0)-55)),c=1===e(n)):c=!1,!c)return t.setCustomValidity((0,r.__)("Please enter a valid IBAN","woocommerce-germanized")),!1}return!0}})})))},p={name:"direct-debit",label:(0,a.createElement)((e=>{const{PaymentMethodLabel:t}=e.components;return(0,a.createElement)(t,{text:w})}),null),content:(0,a.createElement)(_,null),edit:(0,a.createElement)(_,null),canMakePayment:()=>!0,ariaLabel:w,supports:{features:null!==(t=u?.supports)&&void 0!==t?t:[]}};(0,o.registerPaymentMethod)(p),((window.wcGzd=window.wcGzd||{}).blocks=window.wcGzd.blocks||{})["wc-gzd-payment-method-direct-debit"]=e}(); \ No newline at end of file diff --git a/build/wc-gzd-payment-method-invoice.asset.php b/build/wc-gzd-payment-method-invoice.asset.php new file mode 100644 index 000000000..13ad3d631 --- /dev/null +++ b/build/wc-gzd-payment-method-invoice.asset.php @@ -0,0 +1 @@ + array('react', 'wc-blocks-registry', 'wc-settings', 'wp-html-entities', 'wp-i18n'), 'version' => '0b6f1c913d809107041f'); diff --git a/build/wc-gzd-payment-method-invoice.js b/build/wc-gzd-payment-method-invoice.js new file mode 100644 index 000000000..58e538bf1 --- /dev/null +++ b/build/wc-gzd-payment-method-invoice.js @@ -0,0 +1 @@ +!function(){"use strict";var e={};(function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(e);var t,n=window.React,o=window.wc.wcBlocksRegistry,i=window.wp.i18n,c=window.wc.wcSettings,d=window.wp.htmlEntities;const a=(0,c.getPaymentMethodData)("invoice",{}),l=(0,i.__)("Pay by Invoice","woocommerce-germanized"),w=(0,d.decodeEntities)(a?.title||"")||l,r=()=>(0,d.decodeEntities)(a.description||""),s={name:"invoice",label:(0,n.createElement)((e=>{const{PaymentMethodLabel:t}=e.components;return(0,n.createElement)(t,{text:w})}),null),content:(0,n.createElement)(r,null),edit:(0,n.createElement)(r,null),canMakePayment:()=>!0,ariaLabel:w,supports:{features:null!==(t=a?.supports)&&void 0!==t?t:[]}};(0,o.registerPaymentMethod)(s),((window.wcGzd=window.wcGzd||{}).blocks=window.wcGzd.blocks||{})["wc-gzd-payment-method-invoice"]=e}(); \ No newline at end of file