1 line
11 KiB
JavaScript
1 line
11 KiB
JavaScript
(()=>{"use strict";var e,o={41:()=>{const e=window.React,o=window.wp.components,t=window.wp.blocks,r=window.wp.i18n,l=window.wp.blockEditor,n=JSON.parse('{"apiVersion":2,"name":"woocommerce-smart-coupons/send-coupon-form","version":"1.0.0","title":"Send coupon form","category":"woocommerce-smart-coupons","description":"Displays Send coupon form.","supports":{"html":false,"align":false,"multiple":false,"reusable":false},"parent":["woocommerce/checkout-contact-information-block"],"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"textdomain":"woocommerce-smart-coupons","editorStyle":"file:../../../build/style-woocommerce-smart-coupons-send-coupon-form-block.css"}');(0,t.registerBlockType)(n,{icon:{src:(0,e.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"106",height:"97",viewBox:"0 0 106 97",fill:"none"},(0,e.createElement)("g",{"clip-path":"url(#clip0_3248_13214)"},(0,e.createElement)("path",{stroke:"currentColor",d:"M85.96 60.93C86.4904 60.93 86.9991 60.7193 87.3742 60.3442C87.7493 59.9691 87.96 59.4604 87.96 58.93V9.68C87.9574 7.11352 86.9367 4.65291 85.1219 2.83813C83.3071 1.02335 80.8465 0.00264723 78.28 0H9.56C7.01075 0.0445457 4.58083 1.08793 2.79299 2.9057C1.00515 4.72346 0.00223122 7.17036 0 9.72V26.98C0 27.5104 0.210714 28.0191 0.585787 28.3942C0.96086 28.7693 1.46957 28.98 2 28.98H15.41V94.98C15.41 95.5104 15.6207 96.0191 15.9958 96.3942C16.3709 96.7693 16.8796 96.98 17.41 96.98H85.96C86.4904 96.98 86.9991 96.7693 87.3742 96.3942C87.7493 96.0191 87.96 95.5104 87.96 94.98C87.96 94.4496 87.7493 93.9409 87.3742 93.5658C86.9991 93.1907 86.4904 92.98 85.96 92.98H19.41V9.72C19.413 7.66264 18.7577 5.65827 17.54 4H78.28C79.0259 4 79.7645 4.14692 80.4536 4.43236C81.1428 4.71781 81.7689 5.1362 82.2964 5.66363C82.8238 6.19107 83.2422 6.81723 83.5276 7.50636C83.8131 8.19549 83.96 8.93409 83.96 9.68V58.93C83.96 59.4604 84.1707 59.9691 84.5458 60.3442C84.9209 60.7193 85.4296 60.93 85.96 60.93ZM3.96 24.93V9.72C3.99922 8.24541 4.60758 6.84321 5.65763 5.80718C6.70768 4.77115 8.11794 4.18169 9.59292 4.1623C11.0679 4.14291 12.4932 4.69509 13.5701 5.70316C14.647 6.71122 15.292 8.09695 15.37 9.57V24.98L3.96 24.93ZM73.75 19.04C73.75 19.5704 73.5393 20.0791 73.1642 20.4542C72.7891 20.8293 72.2804 21.04 71.75 21.04H31.63C31.0996 21.04 30.5909 20.8293 30.2158 20.4542C29.8407 20.0791 29.63 19.5704 29.63 19.04C29.63 18.5096 29.8407 18.0009 30.2158 17.6258C30.5909 17.2507 31.0996 17.04 31.63 17.04H71.75C72.2804 17.04 72.7891 17.2507 73.1642 17.6258C73.5393 18.0009 73.75 18.5096 73.75 19.04ZM73.75 35.85C73.75 36.3804 73.5393 36.8891 73.1642 37.2642C72.7891 37.6393 72.2804 37.85 71.75 37.85H65.81C65.2796 37.85 64.7709 37.6393 64.3958 37.2642C64.0207 36.8891 63.81 36.3804 63.81 35.85C63.81 35.3196 64.0207 34.8109 64.3958 34.4358C64.7709 34.0607 65.2796 33.85 65.81 33.85H71.75C72.2804 33.85 72.7891 34.0607 73.1642 34.4358C73.5393 34.8109 73.75 35.3196 73.75 35.85ZM29.63 35.85C29.63 35.3196 29.8407 34.8109 30.2158 34.4358C30.5909 34.0607 31.0996 33.85 31.63 33.85H55.75C56.2804 33.85 56.7891 34.0607 57.1642 34.4358C57.5393 34.8109 57.75 35.3196 57.75 35.85C57.75 36.3804 57.5393 36.8891 57.1642 37.2642C56.7891 37.6393 56.2804 37.85 55.75 37.85H31.63C31.0996 37.85 30.5909 37.6393 30.2158 37.2642C29.8407 36.8891 29.63 36.3804 29.63 35.85ZM71.75 51H31.63C31.0996 51 30.5909 50.7893 30.2158 50.4142C29.8407 50.0391 29.63 49.5304 29.63 49C29.63 48.4696 29.8407 47.9609 30.2158 47.5858C30.5909 47.2107 31.0996 47 31.63 47H71.75C72.2804 47 72.7891 47.2107 73.1642 47.5858C73.5393 47.9609 73.75 48.4696 73.75 49C73.75 49.5304 73.5393 50.0391 73.1642 50.4142C72.7891 50.7893 72.2804 51 71.75 51ZM61.75 64.15H31.63C31.0996 64.15 30.5909 63.9393 30.2158 63.5642C29.8407 63.1891 29.63 62.6804 29.63 62.15C29.63 61.6196 29.8407 61.1109 30.2158 60.7358C30.5909 60.3607 31.0996 60.15 31.63 60.15H61.75C62.2804 60.15 62.7891 60.3607 63.1642 60.7358C63.5393 61.1109 63.75 61.6196 63.75 62.15C63.75 62.6804 63.5393 63.1891 63.1642 63.5642C62.7891 63.9393 62.2804 64.15 61.75 64.15ZM56.75 73.3C57.2804 73.3 57.7891 73.5107 58.1642 73.8858C58.5393 74.2609 58.75 74.7696 58.75 75.3C58.75 75.8304 58.5393 76.3391 58.1642 76.7142C57.7891 77.0893 57.2804 77.3 56.75 77.3H31.63C31.0996 77.3 30.5909 77.0893 30.2158 76.7142C29.8407 76.3391 29.63 75.8304 29.63 75.3C29.63 74.7696 29.8407 74.2609 30.2158 73.8858C30.5909 73.5107 31.0996 73.3 31.63 73.3H56.75Z",fill:"#000000"}),(0,e.createElement)("path",{stroke:"currentColor",d:"M85.9608 96.9997C82.1219 96.9997 78.3691 95.8613 75.1772 93.7285C71.9852 91.5957 69.4974 88.5643 68.0283 85.0176C66.5592 81.4709 66.1748 77.5682 66.9237 73.803C67.6727 70.0378 69.5213 66.5793 72.2358 63.8648C74.9504 61.1502 78.4089 59.3016 82.1741 58.5527C85.9393 57.8037 89.842 58.1881 93.3887 59.6572C96.9354 61.1263 99.9668 63.6141 102.1 66.8061C104.232 69.998 105.371 73.7508 105.371 77.5897C105.371 82.7375 103.326 87.6746 99.6857 91.3146C96.0457 94.9547 91.1086 96.9997 85.9608 96.9997Z",fill:"#000000"}),(0,e.createElement)("path",{stroke:"currentColor",d:"M84.0218 73.3298C84.0113 73.8366 84.1786 74.3311 84.4946 74.7275C84.8106 75.1239 85.2554 75.3971 85.7518 75.4998C86.8747 75.701 87.9693 76.0367 89.0118 76.4998C89.6503 76.8784 90.2059 77.3816 90.6457 77.9795C91.0856 78.5773 91.4005 79.2576 91.5718 79.9798C91.9163 81.3846 91.7417 82.8664 91.0802 84.1527C90.4187 85.4389 89.3148 86.4429 87.9718 86.9798V88.5898C87.9718 89.1202 87.7611 89.6289 87.3861 90.004C87.011 90.3791 86.5023 90.5898 85.9718 90.5898C85.4414 90.5898 84.9327 90.3791 84.5576 90.004C84.1826 89.6289 83.9718 89.1202 83.9718 88.5898V87.1298C83.0605 86.851 82.2286 86.359 81.5452 85.6947C80.8618 85.0304 80.3464 84.2129 80.0418 83.3098C79.8962 82.8134 79.9485 82.2799 80.1879 81.8213C80.4272 81.3627 80.835 81.0147 81.3255 80.8503C81.816 80.686 82.3511 80.7181 82.8184 80.9398C83.2858 81.1616 83.649 81.5559 83.8318 82.0398C83.9692 82.4556 84.2393 82.8149 84.6006 83.0624C84.9619 83.3099 85.3945 83.4319 85.8318 83.4098C86.099 83.3997 86.3614 83.3361 86.6036 83.2228C86.8457 83.1096 87.0627 82.9489 87.2417 82.7503C87.4207 82.5517 87.5581 82.3193 87.6457 82.0667C87.7333 81.8141 87.7694 81.5466 87.7518 81.2798C87.7615 81.1633 87.7615 81.0463 87.7518 80.9298C87.4318 79.5998 85.6918 79.6098 84.6518 79.2998C83.297 78.9456 82.1053 78.1361 81.2767 77.0071C80.4482 75.8782 80.0334 74.4985 80.1018 73.0998C80.1795 71.9383 80.5933 70.8245 81.2929 69.8941C81.9925 68.9637 82.9476 68.2569 84.0418 67.8598V66.2998C84.0418 65.7694 84.2526 65.2607 84.6276 64.8856C85.0027 64.5105 85.5114 64.2998 86.0418 64.2998C86.5723 64.2998 87.081 64.5105 87.4561 64.8856C87.8311 65.2607 88.0418 65.7694 88.0418 66.2998V67.8098C89.1087 68.1687 90.0513 68.8238 90.7596 69.6986C91.468 70.5734 91.9127 71.6317 92.0418 72.7498C92.1068 73.2802 91.9584 73.8148 91.6293 74.2358C91.3002 74.6568 90.8173 74.9298 90.2869 74.9948C89.7564 75.0598 89.2219 74.9114 88.8009 74.5823C88.3799 74.2531 88.1068 73.7702 88.0418 73.2398C88.0359 72.9772 87.9784 72.7182 87.8724 72.4779C87.7664 72.2375 87.6141 72.0203 87.4242 71.8388C87.2343 71.6572 87.0106 71.5149 86.7656 71.4198C86.5207 71.3248 86.2595 71.2789 85.9969 71.2848C85.7342 71.2907 85.4753 71.3483 85.2349 71.4543C84.9945 71.5602 84.7773 71.7125 84.5958 71.9024C84.4143 72.0923 84.2719 72.3161 84.1769 72.561C84.0818 72.8059 84.0359 73.0672 84.0418 73.3298H84.0218Z",fill:"#FFFFFF"})),(0,e.createElement)("defs",null,(0,e.createElement)("clipPath",{id:"clip0_3248_13214"},(0,e.createElement)("rect",{width:"105.38",height:"97",fill:"white"}))))},edit:({attributes:t,setAttributes:n})=>{const c=(0,l.useBlockProps)();return(0,e.createElement)("div",{...c},(0,e.createElement)("div",null,(0,e.createElement)(o.Disabled,null,(0,e.createElement)(o.__experimentalHeading,{level:"3"},(0,r._x)("Send coupons to...","Block editor","woocommerce-smart-coupons")),(0,e.createElement)(o.__experimentalText,null,(0,r._x)("Your order contains coupons. What would you like to do?","Block editor","woocommerce-smart-coupons")),(0,e.createElement)(o.RadioControl,{options:[{label:(0,r._x)("Send to me","Block editor","woocommerce-smart-coupons"),value:"no"},{label:(0,r._x)("Gift to someone else","Block editor","woocommerce-smart-coupons"),value:"yes"}],selected:"yes"}),(0,e.createElement)("div",{style:{marginLeft:"1em"}},(0,e.createElement)(o.RadioControl,{options:[{label:(0,r._x)("Send to one person","Block editor","woocommerce-smart-coupons"),value:"one"},{label:(0,r._x)("Send to different people","Block editor","woocommerce-smart-coupons"),value:"many"}],selected:"one"}),(0,e.createElement)(o.__experimentalText,null,(0,r._x)("Deliver coupon","Block editor","woocommerce-smart-coupons")),(0,e.createElement)("div",{style:{display:"inline-block"}},(0,e.createElement)(o.__experimentalToggleGroupControl,{hideLabelFromVision:!0,label:(0,r._x)("Deliver coupon","Block editor","woocommerce-smart-coupons"),value:"later"},(0,e.createElement)(o.__experimentalToggleGroupControlOption,{label:(0,r._x)("now","Block editor","woocommerce-smart-coupons"),value:"now"}),(0,e.createElement)(o.__experimentalToggleGroupControlOption,{label:(0,r._x)("later","Block editor","woocommerce-smart-coupons"),value:"later"})))),(0,e.createElement)(o.__experimentalDivider,null),(0,e.createElement)(o.TextControl,{onChange:function(){},label:(0,r._x)("Receiver email address","Block editor","woocommerce-smart-coupons"),hideLabelFromVision:!0,value:"",type:"email",placeholder:(0,r._x)("Enter recipient e-mail address","Block editor","woocommerce-smart-coupons")}),(0,e.createElement)(o.DateTimePicker,{onChange:function(){},is12Hour:!0}),(0,e.createElement)(o.TextareaControl,{label:(0,r._x)("Message for receiver","Block editor","woocommerce-smart-coupons"),hideLabelFromVision:!0,onChange:function(){},value:"",placeholder:(0,r._x)("Write a message","Block editor","woocommerce-smart-coupons")}))))},save:({attributes:o})=>{const{text:t}=o;return(0,e.createElement)("div",{...l.useBlockProps.save()})}})}},t={};function r(e){var l=t[e];if(void 0!==l)return l.exports;var n=t[e]={exports:{}};return o[e](n,n.exports,r),n.exports}r.m=o,e=[],r.O=(o,t,l,n)=>{if(!t){var c=1/0;for(s=0;s<e.length;s++){for(var[t,l,n]=e[s],a=!0,C=0;C<t.length;C++)(!1&n||c>=n)&&Object.keys(r.O).every((e=>r.O[e](t[C])))?t.splice(C--,1):(a=!1,n<c&&(c=n));if(a){e.splice(s--,1);var i=l();void 0!==i&&(o=i)}}return o}n=n||0;for(var s=e.length;s>0&&e[s-1][2]>n;s--)e[s]=e[s-1];e[s]=[t,l,n]},r.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),(()=>{var e={128:0,993:0};r.O.j=o=>0===e[o];var o=(o,t)=>{var l,n,[c,a,C]=t,i=0;if(c.some((o=>0!==e[o]))){for(l in a)r.o(a,l)&&(r.m[l]=a[l]);if(C)var s=C(r)}for(o&&o(t);i<c.length;i++)n=c[i],r.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return r.O(s)},t=globalThis.webpackChunksmart_coupon_blocks=globalThis.webpackChunksmart_coupon_blocks||[];t.forEach(o.bind(null,0)),t.push=o.bind(null,t.push.bind(t))})();var l=r.O(void 0,[993],(()=>r(41)));l=r.O(l)})(); |