1 line
6.4 KiB
JavaScript
1 line
6.4 KiB
JavaScript
(()=>{var e,t,o,r={3429:(e,t,o)=>{"use strict";const r=window.wp.blocks;var l=o(7871),c=o(5573),i=o(790);const n=(0,i.jsxs)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24",fill:"none",children:[(0,i.jsx)("path",{stroke:"currentColor",strokeWidth:"1.5",fill:"none",d:"M6 3.75h12c.69 0 1.25.56 1.25 1.25v14c0 .69-.56 1.25-1.25 1.25H6c-.69 0-1.25-.56-1.25-1.25V5c0-.69.56-1.25 1.25-1.25z"}),(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.9 7.5A1.1 1.1 0 018 6.4h8a1.1 1.1 0 011.1 1.1v2a1.1 1.1 0 01-1.1 1.1H8a1.1 1.1 0 01-1.1-1.1v-2zm1.2.1v1.8h7.8V7.6H8.1z",clipRule:"evenodd"}),(0,i.jsx)("path",{fill:"currentColor",d:"M8.5 12h1v1h-1v-1zM8.5 14h1v1h-1v-1zM8.5 16h1v1h-1v-1zM11.5 12h1v1h-1v-1zM11.5 14h1v1h-1v-1zM11.5 16h1v1h-1v-1zM14.5 12h1v1h-1v-1zM14.5 14h1v1h-1v-1zM14.5 16h1v1h-1v-1z"})]}),a=JSON.parse('{"name":"woocommerce/order-confirmation-totals","version":"1.0.0","title":"Order Totals","description":"Display the items purchased and order totals.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"multiple":false,"align":["wide","full"],"html":false,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"background":true,"text":true,"link":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"__experimentalBorder":{"color":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"style":true,"width":true}},"__experimentalSelector":".wp-block-woocommerce-order-confirmation-totals table"},"attributes":{"align":{"type":"string","default":"wide"},"className":{"type":"string","default":""}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}'),s=window.wp.blockEditor,d=window.wp.components;var m=o(7723);const u=window.wc.priceFormat;o(4628);(0,r.registerBlockType)(a,{icon:{src:(0,i.jsx)(l.A,{icon:n,className:"wc-block-editor-components-block-icon"})},attributes:{...a.attributes},edit:()=>{const e=(0,s.useBlockProps)({className:"wc-block-order-confirmation-totals"}),{borderBottomColor:t,borderLeftColor:o,borderRightColor:r,borderTopColor:l,borderWidth:c}=e.style,n={borderBottomColor:t,borderLeftColor:o,borderRightColor:r,borderTopColor:l,borderWidth:c};return(0,i.jsx)("div",{...e,children:(0,i.jsx)(d.Disabled,{children:(0,i.jsxs)("table",{style:n,cellSpacing:"0",className:"wc-block-order-confirmation-totals__table",children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{className:"wc-block-order-confirmation-totals__product",children:(0,m.__)("Product","woocommerce")}),(0,i.jsx)("th",{className:"wc-block-order-confirmation-totals__total",children:(0,m.__)("Total","woocommerce")})]})}),(0,i.jsxs)("tbody",{children:[(0,i.jsxs)("tr",{className:"woocommerce-table__line-item order_item",children:[(0,i.jsxs)("th",{scope:"row",className:"wc-block-order-confirmation-totals__product",children:[(0,i.jsx)("a",{href:"#link",children:(0,m._x)("Test Product","sample product name","woocommerce")})," ",(0,i.jsx)("strong",{className:"product-quantity",children:"× 2"})]}),(0,i.jsx)("td",{className:"wc-block-order-confirmation-totals__total",children:(0,u.formatPrice)(2e3)})]}),(0,i.jsxs)("tr",{className:"woocommerce-table__line-item order_item",children:[(0,i.jsxs)("th",{scope:"row",className:"wc-block-order-confirmation-totals__product",children:[(0,i.jsx)("a",{href:"#link",children:(0,m._x)("Test Product","sample product name","woocommerce")})," ",(0,i.jsx)("strong",{className:"product-quantity",children:"× 2"})]}),(0,i.jsx)("td",{className:"wc-block-order-confirmation-totals__total",children:(0,u.formatPrice)(2e3)})]})]}),(0,i.jsx)("tfoot",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{className:"wc-block-order-confirmation-totals__label",scope:"row",children:(0,m.__)("Total","woocommerce")}),(0,i.jsx)("td",{className:"wc-block-order-confirmation-totals__total",children:(0,u.formatPrice)(4e3)})]})})]})})})},save:()=>null})},4628:()=>{},790:e=>{"use strict";e.exports=window.ReactJSXRuntime},6087:e=>{"use strict";e.exports=window.wp.element},7723:e=>{"use strict";e.exports=window.wp.i18n},5573:e=>{"use strict";e.exports=window.wp.primitives}},l={};function c(e){var t=l[e];if(void 0!==t)return t.exports;var o=l[e]={exports:{}};return r[e](o,o.exports,c),o.exports}c.m=r,e=[],c.O=(t,o,r,l)=>{if(!o){var i=1/0;for(d=0;d<e.length;d++){for(var[o,r,l]=e[d],n=!0,a=0;a<o.length;a++)(!1&l||i>=l)&&Object.keys(c.O).every(e=>c.O[e](o[a]))?o.splice(a--,1):(n=!1,l<i&&(i=l));if(n){e.splice(d--,1);var s=r();void 0!==s&&(t=s)}}return t}l=l||0;for(var d=e.length;d>0&&e[d-1][2]>l;d--)e[d]=e[d-1];e[d]=[o,r,l]},c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},o=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,c.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var l=Object.create(null);c.r(l);var i={};t=t||[null,o({}),o([]),o(o)];for(var n=2&r&&e;"object"==typeof n&&!~t.indexOf(n);n=o(n))Object.getOwnPropertyNames(n).forEach(t=>i[t]=()=>e[t]);return i.default=()=>e,c.d(l,i),l},c.d=(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.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=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.j=9779,(()=>{var e={9779:0};c.O.j=t=>0===e[t];var t=(t,o)=>{var r,l,[i,n,a]=o,s=0;if(i.some(t=>0!==e[t])){for(r in n)c.o(n,r)&&(c.m[r]=n[r]);if(a)var d=a(c)}for(t&&t(o);s<i.length;s++)l=i[s],c.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return c.O(d)},o=globalThis.webpackChunkwebpackWcBlocksMainJsonp=globalThis.webpackChunkwebpackWcBlocksMainJsonp||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var i=c.O(void 0,[94],()=>c(3429));i=c.O(i),((this.wc=this.wc||{}).blocks=this.wc.blocks||{})["order-confirmation-totals"]=i})(); |