geno/wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/order-confirmation-totals.js

1 line
5.8 KiB
JavaScript
Raw Normal View History

2024-02-01 17:24:18 +05:30
(()=>{var e,t={685:(e,t,r)=>{"use strict";r.r(t);var o=r(9196);const l=window.wp.blocks;var a=r(1984),c=r(444);const n=(0,o.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24",fill:"none"},(0,o.createElement)("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,o.createElement)("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,o.createElement)("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"})),s=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":2,"$schema":"https://schemas.wp.org/trunk/block.json"}'),i=window.wp.blockEditor,m=window.wp.components;var d=r(5736);const u=window.wc.priceFormat;r(3891);(0,l.registerBlockType)(s,{icon:{src:(0,o.createElement)(a.Z,{icon:n,className:"wc-block-editor-components-block-icon"})},attributes:{...s.attributes},edit:()=>{const e=(0,i.useBlockProps)({className:"wc-block-order-confirmation-totals"}),{borderBottomColor:t,borderLeftColor:r,borderRightColor:l,borderTopColor:a,borderWidth:c}=e.style,n={borderBottomColor:t,borderLeftColor:r,borderRightColor:l,borderTopColor:a,borderWidth:c};return(0,o.createElement)("div",{...e},(0,o.createElement)(m.Disabled,null,(0,o.createElement)("table",{style:n,cellSpacing:"0",className:"wc-block-order-confirmation-totals__table"},(0,o.createElement)("thead",null,(0,o.createElement)("tr",null,(0,o.createElement)("th",{className:"wc-block-order-confirmation-totals__product"},(0,d.__)("Product","woocommerce")),(0,o.createElement)("th",{className:"wc-block-order-confirmation-totals__total"},(0,d.__)("Total","woocommerce")))),(0,o.createElement)("tbody",null,(0,o.createElement)("tr",{className:"woocommerce-table__line-item order_item"},(0,o.createElement)("th",{scope:"row",className:"wc-block-order-confirmation-totals__product"},(0,o.createElement)("a",{href:"#link"},(0,d._x)("Test Product","sample product name","woocommerce"))," ",(0,o.createElement)("strong",{className:"product-quantity"},"× 2")),(0,o.createElement)("td",{className:"wc-block-order-confirmation-totals__total"},(0,u.formatPrice)(2e3))),(0,o.createElement)("tr",{className:"woocommerce-table__line-item order_item"},(0,o.createElement)("th",{scope:"row",className:"wc-block-order-confirmation-totals__product"},(0,o.createElement)("a",{href:"#link"},(0,d._x)("Test Product","sample product name","woocommerce"))," ",(0,o.createElement)("strong",{className:"product-quantity"},"× 2")),(0,o.createElement)("td",{className:"wc-block-order-confirmation-totals__total"},(0,u.formatPrice)(2e3)))),(0,o.createElement)("tfoot",null,(0,o.createEl