Plugin Directory

Changeset 2719764

Timestamp:
05/07/2022 06:23:55 AM (2 years ago)
Author:
mahfuz01
Message:

Tagging version trunk

Location:
product-quotation-for-woocommerce/trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • product-quotation-for-woocommerce/trunk/README.txt

    r2719227 r2719764  
    11=== Product Quotation - Request a Quote for WooCommerce ===
    22Contributors: mahfuz01
    3 Tags: request a quote button, woocommerce request for quote, woocommerce request a quote shortcode, request a quote, quote, woocommerce, shop, ecommerce, e-commerce, quotations, request for quote, rfq, raq, proposal, ask an estimate, budget, email quote
     3Tags: request a quote
    44Requires at least: 4.0
    55Tested up to: 5.9
    6 Stable tag: 2.0.2
     6Stable tag: 2.0.
    77License: GPLv3 or later
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    7171== Changelog ==
    7272
    73 = 2.0.2- 06-05-2022 =
     73= 2.0.3 - 07-05-2022 =
     74* ADDED Feature: Send email to customers as well.
     75* IMPROVEMENTS: Quotation details design improvements.
     76* IMPROVEMENTS: added price and individual product note in the email template.
     77* Fixed: minor bugs
     78
     79= 2.0.2 - 06-05-2022 =
    7480* ADDED Feature: Price update while quantity gets updated.
    7581* ADDED Feature: Option for setting up Quotation Cart page.
    7682* Fixed: minor bugs
    7783
    78 = 2.0.1- 02-05-2022 =
     84= 2.0.1- 02-05-2022 =
    7985* ADDED Feature: Privacy policy field on the Quotation Cart form
    8086* Fixed: minor bugs
    8187
    82 = 2.0.0- 30-04-2022 =
     88= 2.0.0- 30-04-2022 =
    8389* ADDED: New settings panel.
    8490* ADDED: Numbers of new features.
     
    8894* Fixed: Minor bug fixes
    8995
    90 = 1.2.5- 28-04-2022 =
     96= 1.2.5- 28-04-2022 =
    9197* Fixed: Quotation Cart page issue
    9298
    93 = 1.2.4- 28-04-2022 =
     99= 1.2.4- 28-04-2022 =
    94100* Updated: Readme's
    95101
    96 = 1.2.3- 14-04-2022 =
     102= 1.2.3- 14-04-2022 =
    97103* Fixed: Quotation button style issue.
    98104
  • product-quotation-for-woocommerce/trunk/assets/css/pqfw-quotations.css

    r2709540 r2719764  
    11.post-type-pqfw_quotations div#post-body-content {margin: 0;}
     2
     3
     4
     5
     6
     7
     8
     9
     10
     11
     12
     13
     14
     15
     16
     17
     18
     19
     20
  • product-quotation-for-woocommerce/trunk/build/index.asset.php

    r2719227 r2719764  
    1 <?php return array('dependencies' => array('react', 'react-dom', 'wp-components', 'wp-element'), 'version' => '36836d35540e9861459f8361b5375c80');
     1<?php return array('dependencies' => array('react', 'react-dom', 'wp-components', 'wp-element'), 'version' => '');
  • product-quotation-for-woocommerce/trunk/build/index.js

    r2719227 r2719764  
    1 !function(){"use strict";var e={n:function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},d:function(t,n){for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})}};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),e.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var t;e.g.importScripts&&(t=e.g.location+"");var n=e.g.document;if(!t&&n&&(n.currentScript&&(t=n.currentScript.src),!t)){var o=n.getElementsByTagName("script");o.length&&(t=o[o.length-1].src)}if(!t)throw new O("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),e.p=t}();var t=window.wp.element,n=window.React,o=e.n(n),a=window.ReactDOM,r=e.n(a);function s(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=s(e[t]))&&(o&&(o+=" "),o+=n);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function l(){for(var e,t,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(t=s(e))&&(o&&(o+=" "),o+=t);return o}function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},i.apply(this,arguments)}function c(e,t){if(null==e)return{};var n,o,a={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(a[n]=e[n]);return a}function u(e){return"number"==typeof e&&!isNaN(e)}function m(e){return"boolean"==typeof e}function d(e){return"string"==typeof e}function p(e){return"function"==typeof e}function g(e){return d(e)||p(e)?e:null}function f(e){return 0===e||e}var v=!("undefined"==typeof window||!window.document||!window.document.createElement);function h(e){return(0,n.isValidElement)(e)||d(e)||p(e)||u(e)}var E={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},b={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"};function w(e){var t=e.enter,a=e.exit,r=e.appendPosition,s=void 0!==r&&r,l=e.collapse,i=void 0===l||l,c=e.collapseDuration,u=void 0===c?300:c;return function(e){var r=e.children,l=e.position,c=e.preventExitTransition,m=e.done,d=e.nodeRef,p=e.isIn,g=s?t+"--"+l:t,f=s?a+"--"+l:a,v=(0,n.useRef)(),h=(0,n.useRef)(0);function E(e){if(e.target===d.current){var t=d.current;t.dispatchEvent(new Event("d")),t.removeEventListener("animationend",E),t.removeEventListener("animationcancel",E),0===h.current&&(t.className=v.current)}}function b(){var e=d.current;e.removeEventListener("animationend",b),i?function(e,t,n){void 0===n&&(n=300);var o=e.scrollHeight,a=e.style;requestAnimationFrame((function(){a.minHeight="initial",a.height=o+"px",a.transition="all "+n+"ms",requestAnimationFrame((function(){a.height="0",a.padding="0",a.margin="0",setTimeout(t,n)}))}))}(e,m,u):m()}return(0,n.useLayoutEffect)((function(){var e;e=d.current,v.current=e.className,e.className+=" "+g,e.addEventListener("animationend",E),e.addEventListener("animationcancel",E)}),[]),(0,n.useEffect)((function(){p||(c?b():function(){h.current=1;var e=d.current;e.className+=" "+f,e.addEventListener("animationend",b)}())}),[p]),o().createElement(o().Fragment,null,r)}}var y={list:new Map,emitQueue:new Map,on:function(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off:function(e,t){if(t){var n=this.list.get(e).filter((function(e){return e!==t}));return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit:function(e){var t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit:function(e){for(var t=this,n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];this.list.has(e)&&this.list.get(e).forEach((function(n){var a=setTimeout((function(){n.apply(void 0,o)}),0);t.emitQueue.has(e)||t.emitQueue.set(e,[]),t.emitQueue.get(e).push(a)}))}},_=["delay","staleId"];function C(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function L(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function M(e){var t=e.closeToast,o=e.theme,a=e.ariaLabel,r=void 0===a?"close":a;return(0,n.createElement)("button",{className:"Toastify__close-button Toastify__close-button--"+o,type:"button",onClick:function(e){e.stopPropagation(),t(e)},"aria-label":r},(0,n.createElement)("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},(0,n.createElement)("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function N(e){var t,o,a=e.delay,r=e.isRunning,s=e.closeToast,c=e.type,u=e.hide,m=e.className,d=e.style,g=e.controlledProgress,f=e.progress,v=e.rtl,h=e.isIn,E=e.theme,b=i({},d,{animationDuration:a+"ms",animationPlayState:r?"running":"paused",opacity:u?0:1});g&&(b.transform="scaleX("+f+")");var w=l("Toastify__progress-bar",g?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar-theme--"+E,"Toastify__progress-bar--"+c,((t={})["Toastify__progress-bar--rtl"]=v,t)),y=p(m)?m({rtl:v,type:c,defaultClassName:w}):l(w,m),_=((o={})[g&&f>=1?"onTransitionEnd":"onAnimationEnd"]=g&&f<1?null:function(){h&&s()},o);return(0,n.createElement)("div",Object.assign({role:"progressbar","aria-hidden":u?"true":"false","aria-label":"notification timer",className:y,style:b},_))}N.defaultProps={type:b.DEFAULT,hide:!1};var T=["theme","type"],S=function(e){var t=e.theme,o=e.type,a=c(e,T);return(0,n.createElement)("svg",Object.assign({viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===t?"currentColor":"var(--toastify-icon-color-"+o+")"},a))};function O(e){return(0,n.createElement)(S,Object.assign({},e),(0,n.createElement)("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))}var D={info:function(e){return(0,n.createElement)(S,Object.assign({},e),(0,n.createElement)("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return(0,n.createElement)(S,Object.assign({},e),(0,n.createElement)("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return(0,n.createElement)(S,Object.assign({},e),(0,n.createElement)("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:O,spinner:function(){return(0,n.createElement)("div",{className:"Toastify__spinner"})}},k=function(e){var t,o,a=function(e){var t=(0,n.useState)(!1),o=t[0],a=t[1],r=(0,n.useState)(!1),s=r[0],l=r[1],i=(0,n.useRef)(null),c=(0,n.useRef)({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,u=(0,n.useRef)(e),m=e.autoClose,d=e.pauseOnHover,g=e.closeToast,f=e.onClick,v=e.closeOnClick;function h(t){if(e.draggable){c.didMove=!1,document.addEventListener("mousemove",y),document.addEventListener("mouseup",_),document.addEventListener("touchmove",y),document.addEventListener("touchend",_);var n=i.current;c.canCloseOnClick=!0,c.canDrag=!0,c.boundingRect=n.getBoundingClientRect(),n.style.transition="",c.x=C(t.nativeEvent),c.y=L(t.nativeEvent),"x"===e.draggableDirection?(c.start=c.x,c.removalDistance=n.offsetWidth*(e.draggablePercent/100)):(c.start=c.y,c.removalDistance=n.offsetHeight*(80===e.draggablePercent?1.5*e.draggablePercent:e.draggablePercent/100))}}function E(){if(c.boundingRect){var t=c.boundingRect,n=t.top,o=t.bottom,a=t.left,r=t.right;e.pauseOnHover&&c.x>=a&&c.x<=r&&c.y>=n&&c.y<=o?w():b()}}function b(){a(!0)}function w(){a(!1)}function y(t){var n=i.current;c.canDrag&&n&&(c.didMove=!0,o&&w(),c.x=C(t),c.y=L(t),"x"===e.draggableDirection?c.delta=c.x-c.start:c.delta=c.y-c.start,c.start!==c.x&&(c.canCloseOnClick=!1),n.style.transform="translate"+e.draggableDirection+"("+c.delta+"px)",n.style.opacity=""+(1-Math.abs(c.delta/c.removalDistance)))}function _(){document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",_),document.removeEventListener("touchmove",y),document.removeEventListener("touchend",_);var t=i.current;if(c.canDrag&&c.didMove&&t){if(c.canDrag=!1,Math.abs(c.delta)>c.removalDistance)return l(!0),void e.closeToast();t.style.transition="transform 0.2s, opacity 0.2s",t.style.transform="translate"+e.draggableDirection+"(0)",t.style.opacity="1"}}(0,n.useEffect)((function(){u.current=e})),(0,n.useEffect)((function(){return i.current&&i.current.addEventListener("d",b,{once:!0}),p(e.onOpen)&&e.onOpen((0,n.isValidElement)(e.children)&&e.children.props),function(){var e=u.current;p(e.onClose)&&e.onClose((0,n.isValidElement)(e.children)&&e.children.props)}}),[]),(0,n.useEffect)((function(){return e.pauseOnFocusLoss&&(document.hasFocus()||w(),window.addEventListener("focus",b),window.addEventListener("blur",w)),function(){e.pauseOnFocusLoss&&(window.removeEventListener("focus",b),window.removeEventListener("blur",w))}}),[e.pauseOnFocusLoss]);var M={onMouseDown:h,onTouchStart:h,onMouseUp:E,onTouchEnd:E};return m&&d&&(M.onMouseEnter=w,M.onMouseLeave=b),v&&(M.onClick=function(e){f&&f(e),c.canCloseOnClick&&g()}),{playToast:b,pauseToast:w,isRunning:o,preventExitTransition:s,toastRef:i,eventHandlers:M}}(e),r=a.isRunning,s=a.preventExitTransition,i=a.toastRef,c=a.eventHandlers,u=e.closeButton,m=e.children,g=e.autoClose,f=e.onClick,v=e.type,h=e.hideProgressBar,E=e.closeToast,b=e.transition,w=e.position,y=e.className,_=e.style,M=e.bodyClassName,T=e.bodyStyle,S=e.progressClassName,O=e.progressStyle,k=e.updateId,j=e.role,I=e.progress,x=e.rtl,A=e.toastId,q=e.deleteToast,P=e.isIn,R=e.isLoading,z=e.icon,F=e.theme,B=l("Toastify__toast","Toastify__toast-theme--"+F,"Toastify__toast--"+v,((t={})["Toastify__toast--rtl"]=x,t)),Q=p(y)?y({rtl:x,position:w,type:v,defaultClassName:B}):l(B,y),Y=!!I,H=D[v],U={theme:F,type:v},G=H&&H(U);return!1===z?G=void 0:p(z)?G=z(U):(0,n.isValidElement)(z)?G=(0,n.cloneElement)(z,U):d(z)?G=z:R&&(G=D.spinner()),(0,n.createElement)(b,{isIn:P,done:q,position:w,preventExitTransition:s,nodeRef:i},(0,n.createElement)("div",Object.assign({id:A,onClick:f,className:Q},c,{style:_,ref:i}),(0,n.createElement)("div",Object.assign({},P&&{role:j},{className:p(M)?M({type:v}):l("Toastify__toast-body",M),style:T}),G&&(0,n.createElement)("div",{className:l("Toastify__toast-icon",(o={},o["Toastify--animate-icon Toastify__zoom-enter"]=!R,o))},G),(0,n.createElement)("div",null,m)),function(e){if(e){var t={closeToast:E,type:v,theme:F};return p(e)?e(t):(0,n.isValidElement)(e)?(0,n.cloneElement)(e,t):void 0}}(u),(g||Y)&&(0,n.createElement)(N,Object.assign({},k&&!Y?{key:"pb-"+k}:{},{rtl:x,theme:F,delay:g,isRunning:r,isIn:P,closeToast:E,hide:h,type:v,style:O,className:S,controlledProgress:Y,progress:I}))))},j=function(e){var t=function(e){var t=(0,n.useReducer)((function(e){return e+1}),0)[1],o=(0,n.useState)([]),a=o[0],r=o[1],s=(0,n.useRef)(null),l=(0,n.useRef)(new Map).current,i=function(e){return-1!==a.indexOf(e)},v=(0,n.useRef)({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:i,getToast:function(e){return l.get(e)}}).current;function E(e){var t=e.containerId;!v.props.limit||t&&v.containerId!==t||(v.count-=v.queue.length,v.queue=[])}function b(e){r((function(t){return f(e)?t.filter((function(t){return t!==e})):[]}))}function w(){var e=v.queue.shift();L(e.toastContent,e.toastProps,e.staleId)}function C(e,o){var a=o.delay,r=o.staleId,i=c(o,_);if(h(e)&&!function(e){return!s.current||v.props.enableMultiContainer&&e.containerId!==v.props.containerId||l.has(e.toastId)&&null==e.updateId}(i)){var E=i.toastId,y=i.updateId,C=i.data,M=v.props,N=function(){return b(E)},T=null==y;T&&v.count++;var S,O,D={toastId:E,updateId:y,isLoading:i.isLoading,theme:i.theme||M.theme,icon:null!=i.icon?i.icon:M.icon,isIn:!1,key:i.key||v.toastKey++,type:i.type,closeToast:N,closeButton:i.closeButton,rtl:M.rtl,position:i.position||M.position,transition:i.transition||M.transition,className:g(i.className||M.toastClassName),bodyClassName:g(i.bodyClassName||M.bodyClassName),style:i.style||M.toastStyle,bodyStyle:i.bodyStyle||M.bodyStyle,onClick:i.onClick||M.onClick,pauseOnHover:m(i.pauseOnHover)?i.pauseOnHover:M.pauseOnHover,pauseOnFocusLoss:m(i.pauseOnFocusLoss)?i.pauseOnFocusLoss:M.pauseOnFocusLoss,draggable:m(i.draggable)?i.draggable:M.draggable,draggablePercent:i.draggablePercent||M.draggablePercent,draggableDirection:i.draggableDirection||M.draggableDirection,closeOnClick:m(i.closeOnClick)?i.closeOnClick:M.closeOnClick,progressClassName:g(i.progressClassName||M.progressClassName),progressStyle:i.progressStyle||M.progressStyle,autoClose:!i.isLoading&&(S=i.autoClose,O=M.autoClose,!1===S||u(S)&&S>0?S:O),hideProgressBar:m(i.hideProgressBar)?i.hideProgressBar:M.hideProgressBar,progress:i.progress,role:i.role||M.role,deleteToast:function(){l.delete(E);var e=v.queue.length;if(v.count=f(E)?v.count-1:v.count-v.displayedToast,v.count<0&&(v.count=0),e>0){var n=f(E)?1:v.props.limit;if(1===e||1===n)v.displayedToast++,w();else{var o=n>e?e:n;v.displayedToast=o;for(var a=0;a<o;a++)w()}}else t()}};p(i.onOpen)&&(D.onOpen=i.onOpen),p(i.onClose)&&(D.onClose=i.onClose),D.closeButton=M.closeButton,!1===i.closeButton||h(i.closeButton)?D.closeButton=i.closeButton:!0===i.closeButton&&(D.closeButton=!h(M.closeButton)||M.closeButton);var k=e;(0,n.isValidElement)(e)&&!d(e.type)?k=(0,n.cloneElement)(e,{closeToast:N,toastProps:D,data:C}):p(e)&&(k=e({closeToast:N,toastProps:D,data:C})),M.limit&&M.limit>0&&v.count>M.limit&&T?v.queue.push({toastContent:k,toastProps:D,staleId:r}):u(a)&&a>0?setTimeout((function(){L(k,D,r)}),a):L(k,D,r)}}function L(e,t,n){var o=t.toastId;n&&l.delete(n),l.set(o,{content:e,props:t}),r((function(e){return[].concat(e,[o]).filter((function(e){return e!==n}))}))}return(0,n.useEffect)((function(){return v.containerId=e.containerId,y.cancelEmit(3).on(0,C).on(1,(function(e){return s.current&&b(e)})).on(5,E).emit(2,v),function(){return y.emit(3,v)}}),[]),(0,n.useEffect)((function(){v.isToastActive=i,v.displayedToast=a.length,y.emit(4,a.length,e.containerId)}),[a]),(0,n.useEffect)((function(){v.props=e})),{getToastToRender:function(t){var n=new Map,o=Array.from(l.values());return e.newestOnTop&&o.reverse(),o.forEach((function(e){var t=e.props.position;n.has(t)||n.set(t,[]),n.get(t).push(e)})),Array.from(n,(function(e){return t(e[0],e[1])}))},containerRef:s,isToastActive:i}}(e),o=t.getToastToRender,a=t.containerRef,r=t.isToastActive,s=e.className,v=e.style,E=e.rtl,b=e.containerId;function w(e){var t,n=l("Toastify__toast-container","Toastify__toast-container--"+e,((t={})["Toastify__toast-container--rtl"]=E,t));return p(s)?s({position:e,rtl:E,defaultClassName:n}):l(n,g(s))}return(0,n.createElement)("div",{ref:a,className:"Toastify",id:b},o((function(e,t){var o=t.length?i({},v):i({},v,{pointerEvents:"none"});return(0,n.createElement)("div",{className:w(e),style:o,key:"container-"+e},t.map((function(e){var t=e.content,o=e.props;return(0,n.createElement)(k,Object.assign({},o,{isIn:r(o.toastId),key:"toast-"+o.key,closeButton:!0===o.closeButton?M:o.closeButton}),t)})))})))};j.defaultProps={position:E.TOP_RIGHT,transition:w({enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0}),rtl:!1,autoClose:5e3,hideProgressBar:!1,closeButton:M,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,newestOnTop:!1,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};var I,x,A,q=new Map,P=[],R=!1;function z(){return Math.random().toString(36).substring(2,9)}function F(e){return e&&(d(e.toastId)||u(e.toastId))?e.toastId:z()}function B(e,t){return q.size>0?y.emit(0,e,t):(P.push({content:e,options:t}),R&&v&&(R=!1,x=document.createElement("div"),document.body.appendChild(x),(0,a.render)((0,n.createElement)(j,Object.assign({},A)),x))),t.toastId}function Q(e,t){return i({},t,{type:t&&t.type||e,toastId:F(t)})}function Y(e){return function(t,n){return B(t,Q(e,n))}}function H(e,t){return B(e,Q(b.DEFAULT,t))}H.loading=function(e,t){return B(e,Q(b.DEFAULT,i({isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1},t)))},H.promise=function(e,t,n){var o,a=t.pending,r=t.error,s=t.success;a&&(o=d(a)?H.loading(a,n):H.loading(a.render,i({},n,a)));var l={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=function(e,t,a){if(null!=t){var r=i({type:e},l,n,{data:a}),s=d(t)?{render:t}:t;return o?H.update(o,i({},r,s)):H(s.render,i({},r,s)),a}H.dismiss(o)},u=p(e)?e():e;return u.then((function(e){return c("success",s,e)})).catch((function(e){return c("error",r,e)})),u},H.success=Y(b.SUCCESS),H.info=Y(b.INFO),H.error=Y(b.ERROR),H.warning=Y(b.WARNING),H.warn=H.warning,H.dark=function(e,t){return B(e,Q(b.DEFAULT,i({theme:"dark"},t)))},H.dismiss=function(e){return y.emit(1,e)},H.clearWaitingQueue=function(e){return void 0===e&&(e={}),y.emit(5,e)},H.isActive=function(e){var t=!1;return q.forEach((function(n){n.isToastActive&&n.isToastActive(e)&&(t=!0)})),t},H.update=function(e,t){void 0===t&&(t={}),setTimeout((function(){var n=function(e,t){var n=t.containerId,o=q.get(n||I);return o?o.getToast(e):null}(e,t);if(n){var o=n.props,a=n.content,r=i({},o,t,{toastId:t.toastId||e,updateId:z()});r.toastId!==e&&(r.staleId=e);var s=r.render||a;delete r.render,B(s,r)}}),0)},H.done=function(e){H.update(e,{progress:1})},H.onChange=function(e){return p(e)&&y.on(4,e),function(){p(e)&&y.off(4,e)}},H.configure=function(e){void 0===e&&(e={}),R=!0,A=e},H.POSITION=E,H.TYPE=b,y.on(2,(function(e){I=e.containerId||e,q.set(I,e),P.forEach((function(e){y.emit(0,e.content,e.options)})),P=[]})).on(3,(function(e){q.delete(e.containerId||e),0===q.size&&y.off(0).off(1).off(5),v&&x&&document.body.removeChild(x)}));var U=window.wp.components,G=e.p+"images/reset.3bcbcd44.png",V=e=>{let{settings:o,setSettings:a,saveSettings:r}=e;const[s,l]=(0,n.useState)(!1),[i,c]=(0,n.useState)(!1),[u,m]=(0,n.useState)(!1),[d,p]=(0,n.useState)(!1),g=(0,n.useRef)(null),f=(0,n.useRef)(null),v=(0,n.useRef)(null),h=(0,n.useRef)(null),E=e=>{g.current&&!g.current.contains(e.target)&&l(!1),f.current&&!f.current.contains(e.target)&&c(!1),v.current&&!v.current.contains(e.target)&&m(!1),h.current&&!h.current.contains(e.target)&&p(!1)};return(0,n.useEffect)((()=>(document.addEventListener("mousedown",E),()=>{document.removeEventListener("mousedown",E)})),[E]),(0,t.createElement)("div",{id:"pqfw-settings-button",className:"pqfw-settings-tab-content pqfw-settings-tab-content-active"},(0,t.createElement)("h3",{className:"pqfw-tab-title"},"Button Settings"),(0,t.createElement)("div",{className:"inside"},(0,t.createElement)("p",{className:"help"},"For better experience choose your own button settings and styles that will ensure the design compatibility with your active theme, as wel as functionality"),(0,t.createElement)("table",{className:"form-table"},(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Show Button"),(0,t.createElement)("td",null,(0,t.createElement)(U.FormToggle,{checked:null==o?void 0:o.pqfw_shop_page_button,onChange:e=>a({...o,pqfw_shop_page_button:e.target.checked})}),(0,t.createElement)("p",{className:"description"},"Show ",(0,t.createElement)("strong",null,"Add To Quotation")," button on category/shop/loop page"))),(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Show Button"),(0,t.createElement)("td",null,(0,t.createElement)(U.FormToggle,{checked:null==o?void 0:o.pqfw_product_page_button,onChange:e=>a({...o,pqfw_product_page_button:e.target.checked})}),(0,t.createElement)("p",{className:"description"},"Show ",(0,t.createElement)("strong",null,"Add To Quotation")," button on product single page"))),(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Button Text"),(0,t.createElement)("td",null,(0,t.createElement)("input",{type:"text",className:"regular-text",value:null==o?void 0:o.button_text,onChange:e=>a({...o,button_text:e.target.value})}),(0,t.createElement)("p",{className:"description"},"Show ",(0,t.createElement)("strong",null,"Add To Quotation")," button on product single page"))),(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Button position in Loop"),(0,t.createElement)("td",null,(0,t.createElement)(U.SelectControl,{label:"Button position in Loop",value:null==o?void 0:o.button_position,hideLabelFromVision:!0,options:[{label:"At product end",value:"woocommerce_after_shop_loop_item"},{label:"At product start",value:"woocommerce_before_shop_loop_item"},{label:"Before product title",value:"woocommerce_before_shop_loop_item_title"},{label:"After product title",value:"woocommerce_after_shop_loop_item_title"}],onChange:e=>a({...o,button_position:e})}),(0,t.createElement)("p",{className:"description"},"Receive email for each user submitted quotatin from the ",(0,t.createElement)("strong",null,"Quotations Cart")," page."))),(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Button position in Single Product"),(0,t.createElement)("td",null,(0,t.createElement)(U.SelectControl,{label:"Button position in Loop",value:null==o?void 0:o.button_position_single_product,hideLabelFromVision:!0,options:[{label:"Before add to cart button",value:"woocommerce_after_add_to_cart_quantity"},{label:"After add to cart button",value:"woocommerce_after_add_to_cart_button"},{label:"End of product",value:"woocommerce_share"}],onChange:e=>a({...o,button_position_single_product:e})}),(0,t.createElement)("p",{className:"description"},"Receive email for each user submitted quotatin from the ",(0,t.createElement)("strong",null,"Quotations Cart")," page."))),(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Button Style"),(0,t.createElement)("td",null,(0,t.createElement)(U.TabPanel,{className:"my-tab-panel",activeClass:"active-tab",initialTabName:"normal",tabs:[{name:"normal",title:"Normal",className:"normal-color"},{name:"hover",title:"Hover",className:"hover-color"}]},(e=>(0,t.createElement)("div",{className:"pqfw-color-picker-container"},"hover"===e.name&&(0,t.createElement)(t.Fragment,null,(0,t.createElement)("p",{className:"color-picker-label"},"Text Color"),(0,t.createElement)(U.ColorIndicator,{colorValue:null==o?void 0:o.button_hover_color,onClick:()=>l(!s)}),s&&(0,t.createElement)("div",{className:"pqfw-hover-color-container",ref:g},(0,t.createElement)(U.ColorPicker,{color:null==o?void 0:o.button_hover_color,onChange:e=>a({...o,button_hover_color:e}),enableAlpha:!1,defaultValue:null==o?void 0:o.button_hover_color})),(0,t.createElement)("p",{className:"color-picker-label"},"Background"),(0,t.createElement)(U.ColorIndicator,{colorValue:null==o?void 0:o.button_hover_bg_color,onClick:()=>c(!i)}),i&&(0,t.createElement)("div",{className:"pqfw-hover-color-container",ref:f},(0,t.createElement)(U.ColorPicker,{color:null==o?void 0:o.button_hover_bg_color,onChange:e=>a({...o,button_hover_bg_color:e}),enableAlpha:!1,defaultValue:null==o?void 0:o.button_hover_bg_color})),(0,t.createElement)("button",{onClick:()=>{confirm("Reset the custom style and back to theme default style?")&&a({...o,button_hover_color:"",button_hover_bg_color:""})},className:"pqfw-reset-btn"},(0,t.createElement)("img",{src:G}),"Reset")),"normal"===e.name&&(0,t.createElement)(t.Fragment,null,(0,t.createElement)("p",{className:"color-picker-label"},"Text Color"),(0,t.createElement)(U.ColorIndicator,{colorValue:null==o?void 0:o.button_normal_color,onClick:()=>m(!u)}),u&&(0,t.createElement)("div",{className:"pqfw-normal-color-container",ref:v},(0,t.createElement)(U.ColorPicker,{color:null==o?void 0:o.button_normal_color,onChange:e=>a({...o,button_normal_color:e}),enableAlpha:!1,defaultValue:null==o?void 0:o.button_normal_color})),(0,t.createElement)("p",{className:"color-picker-label"},"Background"),(0,t.createElement)(U.ColorIndicator,{colorValue:null==o?void 0:o.button_normal_bg_color,onClick:()=>p(!d)}),d&&(0,t.createElement)("div",{className:"pqfw-normal-color-container",ref:h},(0,t.createElement)(U.ColorPicker,{color:null==o?void 0:o.button_normal_bg_color,onChange:e=>a({...o,button_normal_bg_color:e}),enableAlpha:!1,defaultValue:null==o?void 0:o.button_normal_bg_color})),(0,t.createElement)("p",{className:"color-picker-label"},"Font Size"),(0,t.createElement)(U.RangeControl,{value:null==o?void 0:o.button_font_size,onChange:e=>a({...o,button_font_size:e}),max:50}),(0,t.createElement)("p",{className:"color-picker-label"},"Width"),(0,t.createElement)(U.RangeControl,{value:null==o?void 0:o.button_width,onChange:e=>a({...o,button_width:e}),max:300}),(0,t.createElement)("button",{onClick:()=>{confirm("Reset the custom style and back to theme default style?")&&a({...o,button_normal_color:"",button_normal_bg_color:"",button_font_size:0,button_width:0})},className:"pqfw-reset-btn"},(0,t.createElement)("img",{src:G}),"Reset"))))))))),(0,t.createElement)("div",{className:"submit-wrapper"},(0,t.createElement)("button",{className:"button button-primary",onClick:r},"Save Changes")))},W=e=>{let{settings:n,setSettings:o,saveSettings:a}=e;return(0,t.createElement)("div",{id:"pqfw-settings-button",className:"pqfw-settings-tab-content pqfw-settings-tab-content-active"},(0,t.createElement)("h3",{className:"pqfw-tab-title"},"Email Settings"),(0,t.createElement)("div",{className:"inside"},(0,t.createElement)("p",{className:"help"},"Customize email settings for better experience that will ensure the ease of use as you like."),(0,t.createElement)("table",{className:"form-table"},(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Receive Email"),(0,t.createElement)("td",null,(0,t.createElement)(U.FormToggle,{checked:null==n?void 0:n.pqfw_form_send_mail,onChange:e=>o({...n,pqfw_form_send_mail:e.target.checked})}),(0,t.createElement)("p",{className:"description"},"Receive email for each user submitted quotatin from the",(0,t.createElement)("strong",null,"Quotations Cart")," page."))),(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Recipient"),(0,t.createElement)("td",null,(0,t.createElement)("input",{type:"text",value:null==n?void 0:n.recipient,className:"regular-text",onChange:e=>o({...n,recipient:e.target.value})}),(0,t.createElement)("p",{className:"description"},"Add recipient email ID that will receive each quotation on the email."))))),(0,t.createElement)("div",{className:"submit-wrapper"},(0,t.createElement)("button",{className:"button button-primary",onClick:a},"Save Changes")))},Z=e=>{let{settings:n,setSettings:o,saveSettings:a}=e;return(0,t.createElement)("div",{id:"pqfw-settings-button",className:"pqfw-settings-tab-content pqfw-settings-tab-content-active"},(0,t.createElement)("h3",{className:"pqfw-tab-title"},"Form Settings"),(0,t.createElement)("div",{className:"inside"},(0,t.createElement)("p",{className:"help"},"For better experience choose your own form styles that will ensure the design compatibility with your active theme."),(0,t.createElement)("table",{className:"form-table"},(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Default Form Style"),(0,t.createElement)("td",null,(0,t.createElement)(U.FormToggle,{checked:null==n?void 0:n.pqfw_form_default_design,onChange:e=>o({...n,pqfw_form_default_design:e.target.checked})}),(0,t.createElement)("p",{className:"description"},"Use default form style that comes with this plugin or you can clean design your own form styles rather not overriding each css class."))),null!=n&&n.pqfw_form_default_design?(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Floated Form"),(0,t.createElement)("td",null,(0,t.createElement)(U.FormToggle,{checked:null==n?void 0:n.pqfw_floating_form,onChange:e=>o({...n,pqfw_floating_form:e.target.checked})}),(0,t.createElement)("p",{className:"description"},"Use floated or stacked styled form on the ",(0,t.createElement)("strong",null,"Quotations Cart")," Page."))):"",(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Add Privacy Policy"),(0,t.createElement)("td",null,(0,t.createElement)(U.FormToggle,{checked:null==n?void 0:n.privacy_policy,onChange:e=>o({...n,privacy_policy:e.target.checked})}),(0,t.createElement)("p",{className:"description"},"Ask user to accept terms and condition before submitting the quotation form."))),null!=n&&n.privacy_policy?(0,t.createElement)(t.Fragment,null,(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Privacy Policy Label"),(0,t.createElement)("td",null,(0,t.createElement)("input",{type:"text",className:"regular-text",value:null==n?void 0:n.privacy_policy_label,onChange:e=>o({...n,privacy_policy_label:e.target.value})}),(0,t.createElement)("p",{className:"description"},"You can use the shortcode [terms] and [privacy_policy] (from WooCommerce 3.4.0)"))),(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Privacy Policy"),(0,t.createElement)("td",null,(0,t.createElement)("textarea",{cols:"30",rows:"5",className:"regular-text",onChange:e=>o({...n,privacy_policy_content:e.target.value})},null==n?void 0:n.privacy_policy_content),(0,t.createElement)("p",{className:"description"},"You can use the shortcode [terms] and [privacy_policy] (from WooCommerce 3.4.0)")))):"")),(0,t.createElement)("div",{className:"submit-wrapper"},(0,t.createElement)("button",{className:"button button-primary",onClick:a},"Save Changes")))};const X=Object.assign({},window.PQFW_OBJECT);function J(){return X.nonce}delete window.PQFW_OBJECT.ajaxurl,delete window.PQFW_OBJECT.nonce,delete window.PQFW_OBJECT.settings;var $=e=>{let{settings:o,setSettings:a,saveSettings:r}=e;const[s,l]=(0,n.useState)([...X.pages]),[i,c]=(0,n.useState)(null===(u=X.cart)||void 0===u?void 0:u.url);var u;return(0,n.useEffect)((()=>{wp.ajax.send("pqfw_cart_get_permalink",{data:{_wpnonce:J(),pageID:null==o?void 0:o.quotation_cart_page},success:e=>{let{url:t}=e;c(t)}})}),[o.quotation_cart_page]),(0,t.createElement)("div",{id:"pqfw-settings-button",className:"pqfw-settings-tab-content pqfw-settings-tab-content-active"},(0,t.createElement)("h3",{className:"pqfw-tab-title"},"General Settings"),(0,t.createElement)("div",{className:"inside"},(0,t.createElement)("p",{className:"help"},"Customize email settings for better experience that will ensure the ease of use as you like."),(0,t.createElement)("table",{className:"form-table"},(0,t.createElement)("tr",null,(0,t.createElement)("th",null,'Hide "Add to cart" Button'),(0,t.createElement)("td",null,(0,t.createElement)(U.FormToggle,{checked:null==o?void 0:o.hide_add_to_cart_button,onChange:e=>a({...o,hide_add_to_cart_button:e.target.checked})}),(0,t.createElement)("p",{className:"description"},"Receive email for each user submitted quotatin from the ",(0,t.createElement)("strong",null,"Quotations Cart")," page."))),(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Hide product prices"),(0,t.createElement)("td",null,(0,t.createElement)(U.FormToggle,{checked:null==o?void 0:o.hide_product_prices,onChange:e=>a({...o,hide_product_prices:e.target.checked})}),(0,t.createElement)("p",{className:"description"},"Receive email for each user submitted quotatin from the ",(0,t.createElement)("strong",null,"Quotations Cart")," page."))),(0,t.createElement)("tr",null,(0,t.createElement)("th",null,'"Quotation cart" page'),(0,t.createElement)("td",null,(0,t.createElement)(U.SelectControl,{label:"Quotation cart page",value:o.quotation_cart_page,hideLabelFromVision:!0,options:s,onChange:e=>a({...o,quotation_cart_page:e})}),(0,t.createElement)("p",{className:"description"},"Choose from this list the page on which users will see the list of products added to the quote and send the request. Visit current ",(0,t.createElement)("a",{target:"_blank",href:i},(0,t.createElement)("strong",null,"Quotation Cart Page"))))))),(0,t.createElement)("div",{className:"submit-wrapper"},(0,t.createElement)("button",{className:"button button-primary",onClick:r},"Save Changes")))},K=e.p+"images/button.3f1daf8f.png",ee=e.p+"images/form.3bf7f595.png",te=e.p+"images/email.5183ffb9.png";r().render((0,t.createElement)((()=>{const e=localStorage.getItem("pqfw_settings_active_tab")||"general",[o,a]=(0,n.useState)(e),[r,s]=(0,n.useState)(X.settings),l=e=>{localStorage.setItem("pqfw_settings_active_tab",e)},i=e=>{let t=e.target;t.classList.add("updating-message"),wp.ajax.send("pqrf_save_settings",{data:{_wpnonce:J(),settings:JSON.stringify(r)},success:function(e){H.success(e.message)},error:function(e){H.error(e.message)},complete:function(){t.classList.remove("updating-message")}})};return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h1",{className:"pqfw-app-title"},"Settings"),(0,t.createElement)("div",{className:"pqfw-settings-tabs-warp"},(0,t.createElement)(j,{position:"top-right",autoClose:2e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!0,pauseOnHover:!0,theme:"colored"}),(0,t.createElement)("div",{id:"pqfw-settings-tabs"},(0,t.createElement)("a",{href:"#",className:"pqfw-settings-nav-tab"+("general"===o?" pqfw-settings-nav-tab-active":""),onClick:()=>{a("general"),l("general")}},(0,t.createElement)("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMS4yNCI+PGRlZnM+PHN0eWxlPi5jbHMtMXtmaWxsOiM5YjU5YjZ9PC9zdHlsZT48L2RlZnM+PHRpdGxlPkdlbmVyYWwgU2V0dGluZzwvdGl0bGU+PGcgaWQ9IkxheWVyXzIiIGRhdGEtbmFtZT0iTGF5ZXIgMiI+PGcgaWQ9IkxheWVyXzEtMiIgZGF0YS1uYW1lPSJMYXllciAxIj48cGF0aCBkPSJNMTkuNTksMTMuNThsLTEuODctMS40NGEuMjcuMjcsMCwwLDEtLjEzLS4zLDYuNTMsNi41MywwLDAsMCwwLTIuNDIuMjguMjgsMCwwLDEsLjE0LS4zM2wxLjg3LTEuNDRhLjg0Ljg0LDAsMCwwLC4yNC0xLjJsLTEuMy0yLjI2YS44Ni44NiwwLDAsMC0xLjE4LS40bC0yLjIuOTFhLjMuMywwLDAsMS0uMzYtLjA1LDcuMDYsNy4wNiwwLDAsMC0yLTEuMTguMzIuMzIsMCwwLDEtLjI0LS4zYy0uMS0uNzgtLjIxLTEuNTYtLjMtMi4zNEEuODUuODUsMCwwLDAsMTEuMzUsMFExMCwwLDguNjQsMGEuODUuODUsMCwwLDAtLjg4LjgzYy0uMS43OC0uMjEsMS41Ni0uMzEsMi4zNGEuMy4zLDAsMCwxLS4yMi4yOSw3LDcsMCwwLDAtMiwxLjE3LjMyLjMyLDAsMCwxLS4zOC4wNkwyLjY2LDMuOGEuODYuODYsMCwwLDAtMS4yMS40MkwuMiw2LjM2QS44OS44OSwwLDAsMCwuNDcsNy43MkwyLjI5LDkuMTFhLjI1LjI1LDAsMCwxLC4xMi4yOSw2LjQ1LDYuNDUsMCwwLDAsMCwyLjQuMzQuMzQsMCwwLDEtLjE3LjM4Yy0uNi40NS0xLjIuOTEtMS43OSwxLjM4YS44Ny44NywwLDAsMC0uMjYsMS4zTDEuNDUsMTdhLjg3Ljg3LDAsMCwwLDEuMi40MWwyLjE4LS45YS4zMi4zMiwwLDAsMSwuMzguMDUsNyw3LDAsMCwwLDIsMS4xNy4zNC4zNCwwLDAsMSwuMjUuMzFjLjEuNzcuMiwxLjU0LjMsMi4zMWEuODYuODYsMCwwLDAsLjkyLjg0aDIuNjZhLjg1Ljg1LDAsMCwwLC45LS44NGMuMS0uNzguMjEtMS41Ni4zMS0yLjM0YS4zLjMsMCwwLDEsLjIyLS4yOCw3LDcsMCwwLDAsMi0xLjE4LjMyLjMyLDAsMCwxLC4zOC0uMDVsMi4yLjkxYTIuMTgsMi4xOCwwLDAsMCwuMzEuMDkuODguODgsMCwwLDAsLjg0LS40NmwxLjMtMi4yNkEuODUuODUsMCwwLDAsMTkuNTksMTMuNThabS02LjE2LTIuODNhMy40NCwzLjQ0LDAsMCwxLTYuODgtLjEzLDMuNDQsMy40NCwwLDEsMSw2Ljg4LjEzWiIgY2xhc3M9ImNscy0xIi8+PC9nPjwvZz48L3N2Zz4="})," General Settings"),(0,t.createElement)("a",{href:"#",className:"pqfw-settings-nav-tab"+("button"===o?" pqfw-settings-nav-tab-active":""),onClick:()=>{a("button"),l("button")}},(0,t.createElement)("img",{src:K})," Button"),(0,t.createElement)("a",{href:"#",className:"pqfw-settings-nav-tab"+("form"===o?" pqfw-settings-nav-tab-active":""),onClick:()=>{a("form"),l("form")}},(0,t.createElement)("img",{src:ee})," Form"),(0,t.createElement)("a",{href:"#",className:"pqfw-settings-nav-tab"+("email"===o?" pqfw-settings-nav-tab-active":""),onClick:()=>{a("email"),l("email")}},(0,t.createElement)("img",{src:te})," Email")),(0,t.createElement)("div",{id:"pqfw-settings-tabs-contents"},"general"===o&&(0,t.createElement)($,{settings:r,setSettings:s,saveSettings:i}),"button"===o&&(0,t.createElement)(V,{settings:r,setSettings:s,saveSettings:i}),"email"===o&&(0,t.createElement)(W,{settings:r,setSettings:s,saveSettings:i}),"form"===o&&(0,t.createElement)(Z,{settings:r,setSettings:s,saveSettings:i}))))}),null),document.getElementById("pqfw-app"))}();
     1!function(){"use strict";var e={n:function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},d:function(t,n){for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})}};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),e.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var t;e.g.importScripts&&(t=e.g.location+"");var n=e.g.document;if(!t&&n&&(n.currentScript&&(t=n.currentScript.src),!t)){var o=n.getElementsByTagName("script");o.length&&(t=o[o.length-1].src)}if(!t)throw new O("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),e.p=t}();var t=window.wp.element,n=window.React,o=e.n(n),a=window.ReactDOM,r=e.n(a);function ,saveSettings:i}))))}),null),document.getElementById("pqfw-app"))}();
  • product-quotation-for-woocommerce/trunk/includes/Classes/class-admin.php

    r2719227 r2719764  
    166166        add_meta_box(
    167167            'pqfw_quotation_detail',
    168             __( 'Person Details', 'pqfw' ),
     168            __( '', 'pqfw' ),
    169169            [ $this, 'displayQuotationDetail' ],
    170170            self::POST_TYPE
     
    173173        add_meta_box(
    174174            'pqfw_quotation_products_detail',
    175             __( 'Product Details', 'pqfw' ),
     175            __( ' Details', 'pqfw' ),
    176176            [ $this, 'displayQuotationProductsDetail' ],
    177177            self::POST_TYPE
  • product-quotation-for-woocommerce/trunk/includes/Classes/class-form-handler.php

    r2717061 r2719764  
    6262
    6363        if ( $insertID ) {
    64             if ( pqfw()->settings->get( 'pqfw_form_send_mail' ) ) {
    65                 pqfw()->mailer->prepare( $mapedDataToSave )->send();
    66             }
    6764
     65
    6866            pqfw()->quotations->purge();
     67
    6968            wp_send_json_success( __( 'Your quotation is successfully submitted.', 'pqfw' ) );
    7069        } else {
  • product-quotation-for-woocommerce/trunk/includes/Classes/class-mailer.php

    r2716683 r2719764  
    4545     * @since   1.0.0
    4646     */
    47     private $email;
     47    private $email;
    4848
    4949    /**
     
    8484        $this->blogname = esc_attr( get_option( 'blogname' ) );
    8585        $this->subject  = sprintf( '%s - %s', $this->args['fullname'], $this->args['subject'] );
    86         $recipient      = sanitize_email( pqfw()->settings->get( 'recipient' ) );
    87         $this->email    = $recipient ? $recipient : sanitize_email( get_option( 'admin_email' ) );
     86
     87        if ( pqfw()->settings->get( 'pqfw_form_send_mail' ) ) {
     88            $recipient     = sanitize_email( pqfw()->settings->get( 'recipient' ) );
     89            $this->email[] = $recipient ? $recipient : sanitize_email( get_option( 'admin_email' ) );
     90        }
     91
     92        if ( pqfw()->settings->get( 'pqfw_send_mail_to_customer' ) ) {
     93            $this->email[] = sanitize_email( $this->args['email'] );
     94        }
    8895
    8996        $this->prepare_message();
     
    127134            $img = ! empty( $img[0] ) ? ( $img[0] ) : false;
    128135            $message .= '<br><a href="' . get_permalink( $product['id'] ) . '">' . esc_attr( get_the_title( $product['id'] ) ) . '</a>';
    129             $message .= '<br>' . __( 'Quantity:', 'pqfw' ) . ': ' . esc_attr( $product['quantity'] ) . '</p>';
     136            $message .= '<br>' . __( 'Quantity', 'pqfw' ) . ': ' . absint( $product['quantity'] ) . '</p>';
     137            $message .= '<br>' . __( 'Price', 'pqfw' ) . ': ' . wc_price( $product['price'] ) . '</p>';
     138            $message .= '<br>' . __( 'Note', 'pqfw' ) . ': ' . wp_kses_post( $product['message'] ) . '</p>';
    130139            $message .= '<p><a href="' . rawurlencode( esc_url( get_permalink( $product['id'] ) ) ) . '">
    131140            <img src="' . $img . '" alt="' . esc_attr( get_the_title( $product['id'] ) ) . '" title="' . esc_attr( get_the_title( $product['id'] ) ) . '" style="display: block" height="100" width="100" /></a></p>';
     
    146155     */
    147156    public function send() {
    148         $result = \wp_mail(
     157        if ( ! is_array( $this->email ) || empty( $this->email ) ) {
     158            return;
     159        }
     160
     161        wp_mail(
    149162            $this->email,
    150163            $this->subject,
     
    152165            $this->headers
    153166        );
    154 
    155         if ( ! $result ) {
    156             wp_send_json_error( __( 'There was an error while we were trying to send your email. Please try again later or contact us in other way!', 'pqfw' ) );
    157         }
    158167    }
    159168}
  • product-quotation-for-woocommerce/trunk/includes/Classes/class-settings.php

    r2719227 r2719764  
    9797            'pqfw_product_page_button'       => true,
    9898            'pqfw_form_send_mail'            => true,
     99
    99100            'recipient'                      => sanitize_email( get_option( 'admin_email' ) ),
    100101            'button_hover_color'             => '',
  • product-quotation-for-woocommerce/trunk/includes/Views/quotation-detail.php

    r2716683 r2719764  
    99<div class="pqfw-quotation-detail-wrap">
    1010    <ul class="pqfw-list-of-person-detail">
    11         <li><strong><?php esc_html_e( 'Name', 'pqfw' ); ?></strong> : <?php echo esc_html( get_post_meta( $quotation->ID, 'pqfw_customer_name', true ) ); ?></li>
    12         <li><strong><?php esc_html_e( 'Email', 'pqfw' ); ?></strong> : <a href="mailto:<?php echo esc_html( get_post_meta( $quotation->ID, 'pqfw_customer_email', true ) ); ?>">
     11        <li><strong><?php esc_html_e( 'Name', 'pqfw' ); ?></strong> <?php echo esc_html( get_post_meta( $quotation->ID, 'pqfw_customer_name', true ) ); ?></li>
     12        <li><strong><?php esc_html_e( 'Email', 'pqfw' ); ?></strong> <a href="mailto:<?php echo esc_html( get_post_meta( $quotation->ID, 'pqfw_customer_email', true ) ); ?>">
    1313            <?php echo esc_html( get_post_meta( $quotation->ID, 'pqfw_customer_email', true ) ); ?></a>
    1414        </li>
    15         <li><strong><?php esc_html_e( 'Phone', 'pqfw' ); ?></strong> : <?php echo esc_html( get_post_meta( $quotation->ID, 'pqfw_customer_phone', true ) ); ?></li>
    16         <li><strong><?php esc_html_e( 'Subject', 'pqfw' ); ?></strong> : <?php echo esc_html( get_post_meta( $quotation->ID, 'pqfw_customer_subject', true ) ); ?></li>
    17         <li><strong><?php esc_html_e( 'Message', 'pqfw' ); ?></strong> : <?php echo esc_html( get_post_meta( $quotation->ID, 'pqfw_customer_comments', true ) ); ?></li>
     15        <li><strong><?php esc_html_e( 'Phone', 'pqfw' ); ?></strong> <?php echo esc_html( get_post_meta( $quotation->ID, 'pqfw_customer_phone', true ) ); ?></li>
     16        <li><strong><?php esc_html_e( 'Subject', 'pqfw' ); ?></strong> <?php echo esc_html( get_post_meta( $quotation->ID, 'pqfw_customer_subject', true ) ); ?></li>
     17        <li><strong><?php esc_html_e( 'Message', 'pqfw' ); ?></strong> <?php echo esc_html( get_post_meta( $quotation->ID, 'pqfw_customer_comments', true ) ); ?></li>
    1818    </ul>
    1919</div>
  • product-quotation-for-woocommerce/trunk/product-quotation-for-woocommerce.php

    r2719227 r2719764  
    44 * Plugin URI: https://github.com/mahafuz/product-quotation-for-woocommerce
    55 * Description: Removes the 'Add to cart' button from WooCommerce and adds a simple 'Request for quotation' form on all product pages instead of it.
    6  * Version: 2.0.2
     6 * Version: 2.0.
    77 * Author: Mahafuz <m.mahfuz.me@gmail.com>
    88 * Author URI: https://github.com/mahafuz/
     
    2727define( 'PQFW_PLUGIN_VIEWS', trailingslashit( plugin_dir_path( __FILE__ ) . 'includes/Views' ) );
    2828define( 'PQFW_PLUGIN_URL', trailingslashit( plugins_url( '/', __FILE__ ) ) );
    29 define( 'PQFW_PLUGIN_VERSION', '2.0.1' );
     29define( 'PQFW_PLUGIN_VERSION', '2.0.' );
    3030
    3131/**
Note: See TracChangeset for help on using the changeset viewer.