PageSourceSearch

https://mouthly.ai/assets/EstimateSendMailContent-CizGvuqe.js

js mouthly.ai collected 2026-10-05 15:42:03 UTC 4,945 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/EstimateSendPdfPreviewConnected-DLNB0aYP.js","assets/index-JpHfX16J.js","assets/index-D9rz69k_.css","assets/SendMailViewPreviewPdfIframe-BC_5RVCB.js","assets/EstimateSendMailPreviewHeader-CCVFw1Jf.js","assets/SendMailViewPreviewHeader-DFANsKGJ.js","assets/Stack-Cr-V0iih.js","assets/queries-Dh_esZXi.js","assets/useRequestPdf-B1JuZ_uK.js","assets/query-keys-Clja6SAR.js","assets/query-keys-DdB80Xs6.js","assets/query-keys-DkCKG6OR.js","assets/SendMailViewToAddressField-Ccut4vqw.js","assets/Textarea-BR_Q68eF.js","assets/textArea-Cucgar-I.js","assets/hooks-DbivJi5O.js","assets/Checkbox-DDItYer1.js","assets/InputGroup-dHc3hQxa.js","assets/EstimateSendMailReceiptPreview-_A_eHwP2.js","assets/SendMailViewReceiptPreview-CJ4O2pxj.js","assets/polished.esm-D4pWeWFr.js"])))=>i.map(i=>d[i]);
2var h=Object.freeze,D=Object.defineProperty;var j=(t,s)=>h(D(t,"raw",{value:h(s||t.slice())}));import{r as a,os as p,w as e,S as V,bV as O,bW as o,dG as c,d1 as P,dk as k,b_ as R,bY as q,c2 as B,b9 as M,e as m,bk as C,eA as b,bX as x,bZ as L,d2 as u,c4 as W,$ as E,d4 as z}from"./index-JpHfX16J.js";import{S as G,a as N,b as Y,c as U,d as $}from"./SendMailViewToAddressField-Ccut4vqw.js";import{p as H,q as X}from"./queries-Dh_esZXi.js";import{f as A,t as Z,a as J,u as K}from"./hooks-DbivJi5O.js";import{C as Q}from"./Checkbox-DDItYer1.js";import{I as ee}from"./InputGroup-dHc3hQxa.js";import{S}from"./Stack-Cr-V0iih.js";const _=a.createContext({}),v=({children:t})=>{const{payload:{estimateId:s}}=p(),{data:n,isLoading:i}=H(s);if(i)return e.jsx(V,{size:20});const l={estimateId:s,isEstimateMailState:i,estimateMailState:n};return e.jsx(_.Provider,{value:l,children:t})};v.displayName="EstimateSendMailBoot";const y=()=>a.useContext(_),te=O().shape({subject:o().required("Subject is required"),message:o().required("Message is required"),to:c().of(o().email("Invalid email address")).required("To address is required"),cc:c().of(o().email("Invalid email address")),bcc:c().of(o().email("Invalid email address"))}),g={subject:"",message:"",from:[],to:[],cc:[],bcc:[],attachPdf:!0};var w;function se({children:t}){const{mutateAsync:s}=X(),{estimateId:n,estimateMailState:i}=y(),{name:r}=p(),{closeDrawer:l}=P(),F={...g,...k(i,g)},T=(I,{setSubmitting:d})=>{d(!0),s([n,I]).then(()=>{M.show({message:"The invoice mail has been sent to the customer.",intent:m.SUCCESS}),d(!1),l(r)}).catch(ce=>{d(!1),M.show({message:"Something went wrong!",intent:m.SUCCESS})})};return e.jsx(R,{initialValues:F,validationSchema:te,onSubmit:T,children:e.jsx(q,{className:B(w||(w=j(["\n          flex: 1;\n          display: flex;\n          flex-direction: column;\n          overflow: hidden;\n        "]))),children:t})})}const ae=a.lazy(()=>C(()=>import("./EstimateSendPdfPreviewConnected-DLNB0aYP.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])).then(t=>({default:t.EstimateSendPdfPreviewConnected}))),ie=a.lazy(()=>C(()=>import("./EstimateSendMailReceiptPreview-_A_eHwP2.js"),__vite__mapDeps([18,1,2,4,5,6,19,20,12,13,14,7,8,9,10,11,15,16,17])).then(t=>({default:t.EstimateSendMailReceiptPreview})));function ne(){return e.jsxs(G,{children:[e.jsx(b,{id:"payment-page",title:"Payment page",panel:e.jsx(a.Suspense,{children:e.jsx(ie,{})})}),e.jsx(b,{id:"pdf-document",title:"PDF document",panel:e.jsx(a.Suspense,{children:e.jsx(ae,{})})})]})}const f=()=>{const{estimateMailState:t}=y();return a.useMemo(()=>J((t==null?void 0:t.formatArgs)||{}),[t])},Me=()=>{const{values:t}=x(),s=f();return A(t==null?void 0:t.subject,s)},oe=()=>{const t=f();return Z(t)},be=()=>{const{values:t}=x(),s=f();return A(t==null?void 0:t.message,s)};function re(){const t=oe(),s=K();return e.jsxs(S,{flex:1,children:[e.jsxs(S,{spacing:0,overflow:"auto",flex:"1",p:"30px",children:[e.jsx(N,{toMultiSelectProps:{items:s},ccMultiSelectProps:{items:s},bccMultiSelectProps:{items:s}}),e.jsx(L,{label:"Submit",name:"subject",children:e.jsx(ee,{name:"subject",large:!0,fastField:!0})}),e.jsx(Y,{argsOptions:t}),e.jsx(u,{children:e.jsx(Q,{name:"attachPdf",label:"Attach PDF"})})]}),e.jsx(le,{})]})}function le(){const{isSubmitting:t}=x(),{name:s}=p(),{closeDrawer:n}=P(),i=W(),r=()=>{n(s)};return e.jsx(u,{py:"12px",px:"16px",borderTopWidth:"1px",borderTopColor:i?"rgba(255, 255, 255, 0.2)":"#d8d8d9",borderTopStyle:"solid",position:"apart",children:e.jsxs(u,{spacing:10,ml:"auto",children:[e.jsx(E,{disabled:t,onClick:r,style:{minWidth:"65px"},children:"Close"}),e.jsx(E,{intent:m.PRIMARY,loading:t,style:{minWidth:"85px"},type:"submit",children:"Send Mail"})]})})}function de(){return e.jsx(S,{className:z,children:e.jsx(v,{children:e.jsx(se,{children:e.jsx(U,{header:e.jsx($,{label:"Send Estimate Mail"}),fields:e.jsx(re,{}),preview:e.jsx(ne,{})})})})})}const Ee=Object.freeze(Object.defineProperty({__proto__:null,EstimateSendMailContent:de},Symbol.toStringTag,{value:"Module"}));
2export{Ee as E,y as a,be as b,Me as u};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.