PageSourceSearch

https://get.checkfront.com/lib/vite/EcommerceSettingsPage-b62346a0.js

js checkfront.com collected 2026-10-02 02:16:53 UTC 12,766 bytes, 1 lines download raw bytes

1import{p as re,r as oe,e as V,a as Y,c,F as I,j as t,P as d}from"./componentLoader.jsx-2026.10.01-3d77ab87.js";import{r as T}from"./logger-3e1e3eff.js";import{c as ie}from"./index-b6a278bc.js";import{A as se}from"./AddCircle-2c18cce7.js";import{B as ne}from"./Banner-1832e2d9.js";import{B as X}from"./Button-daed7707.js";import{C as O}from"./Checkbox-d2bb405c.js";import{g as le}from"./vendor-21ae10b1.js";import{D as pe}from"./DropDown2-e3cea584.js";import{F as x}from"./FormControl-10427d7c.js";import{H as N}from"./Heading-4bb2ea9e.js";import{I as ce}from"./Image-957b8b4e.js";import{E as R}from"./Link-bec2c870.js";import{P as de}from"./Page-6cd9626c.js";import{T as K}from"./TextField-9054bcd3.js";import{T as me}from"./Toggle-0534da6a.js";import{F as ue}from"./FadingBanner-358028ed.js";import{F as fe}from"./FormSaveButton-a106ec1f.js";import{g as he,e as ge}from"./EcommerceTabs-bf09e58b.js";import{T as w}from"./TextFieldDebounced-923c9db3.js";import"./index-e642497c.js";import"./_Uint8Array-4a201bc7.js";import"./_equalByTag-f809a93d.js";import"./index-6a18cc6d.js";import{a as be}from"./EducationalPageHeader-7a0a6baa.js";import{T as B}from"./Text-db1ebb07.js";import{G as v}from"./Grid-95575dae.js";import"./brand-387037d2.js";import"./universe.js-2026.10.01-3d77ab87.js";import"./index-213dd4d3.js";import"./Fade-84a3db8e.js";import"./isEqual-8f2d02ec.js";import"./_baseIsEqual-8f542891.js";import"./_getAllKeys-a79fe303.js";import"./_isIndex-1f105582.js";import"./staffside.js-2026.10.01-3d77ab87.js";import"./TextStyle-4fbf16a4.js";import"./Tabs-521d8288.js";import"./LinkClientside-cbcc64bc.js";import"./localStorage-80b97aa2.js";import"./debounce-a96a8bf6.js";import"./toNumber-8f88376b.js";import"./isSymbol-34885b27.js";import"./Cross-eb4df075.js";import"./eq-9168d086.js";import"./CrossCircle-08230b3a.js";import"./HelpButton-7bf06877.js";import"./HelpCircle-0303da15.js";import"./EducationCard-4ae056e3.js";import"./Icon-7e7c4bf4.js";import"./Menu-33f70b8a.js";import"./Modal-ad90e94a.js";import"./Title-9de200f3.js";var Z={exports:{}};(function(C){C.exports=function(l){var i={};function r(a){if(i[a])return i[a].exports;var s=i[a]={i:a,l:!1,exports:{}};return l[a].call(s.exports,s,s.exports,r),s.l=!0,s.exports}return r.m=l,r.c=i,r.d=function(a,s,h){r.o(a,s)||Object.defineProperty(a,s,{enumerable:!0,get:h})},r.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},r.t=function(a,s){if(s&1&&(a=r(a)),s&8||s&4&&typeof a=="object"&&a&&a.__esModule)return a;var h=Object.create(null);if(r.r(h),Object.defineProperty(h,"default",{enumerable:!0,value:a}),s&2&&typeof a!="string")for(var g in a)r.d(h,g,function(m){return a[m]}.bind(null,g));return h},r.n=function(a){var s=a&&a.__esModule?function(){return a.default}:function(){return a};return r.d(s,"a",s),s},r.o=function(a,s){return Object.prototype.hasOwnProperty.call(a,s)},r.p="",r(r.s=691)}({0:function(l,i){l.exports=re},1:function(l,i){l.exports=T},2:function(l,i){l.exports=oe()},40:function(l,i,r){l.exports={LabelControl:"ChoiceLabel__LabelControl___vp5YY",Label:"ChoiceLabel__Label___3QtXb",disabled:"ChoiceLabel__disabled___2G_mi",active:"ChoiceLabel__active___LoYxU",visuallyHidden:"ChoiceLabel__visuallyHidden___2O3aa"}},691:function(l,i,r){r.r(i);var a=r(87);i.default=a.a},87:function(l,i,r){var a=r(1),s=r.n(a),h=r(0),g=r.n(h),m=r(2),y=r.n(m),n=r(40),p=r.n(n),S={children:g.a.node,active:g.a.bool,disabled:g.a.bool,id:g.a.string,label:g.a.node,labelHidden:g.a.bool,className:g.a.string};function D(u){var L=y()([p.a.LabelControl,u.disabled&&p.a.disabled,u.active&&p.a.active,u.className]),F=y()([p.a.Label,u.labelHidden&&p.a.visuallyHidden]);return s.a.createElement("label",{className:L,htmlFor:u.id},u.children,s.a.createElement("div",{className:F},u.label))}D.propTypes=S,i.a=D}})})(Z);var Ce=Z.exports;const ye=le(Ce),_e="skipDepositCutoffText--O0cTc",xe="width-32-rem--RZomm",q={skipDepositCutoffText:_e,"width-32-rem":"width-32-rem--RZomm",width32Rem:xe};z.propTypes={ecommerceSettings:d.object,handleChangeReCaptchaSettings:d.func};function z({ecommerceSettings:{reCaptchaSettings:C},handleChangeReCaptchaSettings:l}){const i=V(),r=Y();return c(I,{children:[t(v.Row,{spacing:"md",children:c(v.Col,{col:"8",children:[t(B,{children:r.labels.reCaptchaHelpText}),t("br",{}),c(B,{children:["In order to protect your booking payments using reCAPTCHA, setup ",t("b",{children:"V3 API keys "})," from the link below. This integration requires reCAPTCHA version 3."]}),t("br",{}),!i.whitelabel&&c(B,{children:["Review a list of supported Payment Gateways and learn more about reCAPTCHA"," ",t(R,{external:!0,url:"https://support.checkfront.com/hc/en-us/articles/360058534734",children:"here."})]})]})}),t(v.Row,{noGutters:!0,spacing:"md",children:t(v.Col,{col:"5",children:t(X,{url:"https://www.google.com/recaptcha/admin/create",external:!0,children:"Get reCAPTCHA V3 keys"})})}),t(v.Row,{children:c(v.Col,{col:"5",children:[t(w,{onChange:a=>l("siteKey",a),id:"reCaptchaSiteKey",label:r.labels.reCaptchaSettings.siteKey,value:C.siteKey||"",placeholder:"",helpText:"",required:!0}),t(w,{onChange:a=>l("secretKey",a),id:"reCaptchaSecretKey",label:r.labels.reCaptchaSettings.secretKey,value:C.secretKey||"",placeholder:"",helpText:"",required:!0})]})})]})}Te.propTypes={csrfToken:d.string.isRequired,currency:d.object,ecommerce:d.object,defaultAcceptedCards:d.arrayOf(d.string),pageId:d.string,hasViewedEducationCards:d.bool,kbLink:d.string,kbLinkForTrial:d.string};
1function Te({csrfToken:C,currency:l,ecommerce:i,defaultAcceptedCards:r,pageId:a,hasViewedEducationCards:s,kbLink:h,kbLinkForTrial:g}){var W;const m=Y(),y=V(),[n,p]=T.useState(i),[S,D]=T.useState([]);i.reCaptchaSettings=Array.isArray(i.reCaptchaSettings)?{enabled:!1}:i.reCaptchaSettings;const[u,L]=T.useState(!!((W=i==null?void 0:i.reCaptchaSettings)!=null&&W.enabled)),[F,H]=T.useState(""),[E,Q]=T.useState(()=>n.skipDepositCutoff>0),[P,J]=T.useState(()=>n.depositPercent===null&&n.depositFixedAmount===null?"none":n.depositPercent!==null?n.depositPercent>=100?"full":"percent":"fixed"),M={...n,skipDepositCutoff:E?n.skipDepositCutoff:null,posTypes:[...n.posTypes,...S.filter(Boolean).map(e=>({label:e,value:e}))],depositFixedAmount:P==="fixed"?n.depositFixedAmount||0:null,depositPercent:P==="full"?100:P==="percent"?n.depositPercent||0:null,reCaptchaSettings:{enabled:!!u,siteKey:null,secretKey:null,...n.reCaptchaSettings||{}},reCaptchaEnabled:u};function ee(){return!(u&&(!M.reCaptchaSettings.siteKey||!M.reCaptchaSettings.secretKey))}const U=[{label:"Do not process payments online, only reservations",value:"none"},{label:"Charge customer full amount at time of booking",value:"full"},{label:"Take a percentage deposit",value:"percent"},{label:"Take a fixed amount deposit",value:"fixed"}].filter(Boolean);b.propTypes={id:d.string.isRequired};function b({id:e,...o}){return t(O,{id:e,name:e,label:m.labels[e],className:"width-100",checked:!!n[e],onChange:()=>p(f=>({...f,[e]:!f[e]})),...o})}j.propTypes={id:d.string.isRequired};function j({id:e}){return t(O,{id:`card_${e}`,name:e,label:e,className:"margin-right-6",checked:n.acceptedCards.includes(e),onChange:()=>p(o=>{const f=o.acceptedCards,_=f.includes(e);return{...o,acceptedCards:_?f.filter(k=>k!==e):[...f,e]}})})}G.propTypes={label:d.string.isRequired,value:d.string.isRequired,icon:d.string};function G({label:e,value:o,icon:f}){return t(O,{id:`posType_${o}`,name:o,label:e,className:"margin-right-6",checked:!!n.posTypes.find(_=>_.value===o),onChange:_=>{const k=_.target.checked;p(A=>{const $=A.posTypes;return{...A,posTypes:k?[...$,{label:e,value:o,icon:f}]:$.filter(({value:ae})=>ae!==o)}})}})}function te(e){return y.isFlexPlan&&(e=Math.max(10,e)),Math.min(100,isNaN(Number(e))?100:Number(e))}return c(de,{className:"margin-bottom-4 padding-bottom-7",width:"md",pageHeader:t(be,{title:m.pageTitle,subtitle:m.pageSubtitle,tabs:he({activeId:"settings",translations:m}),csrfToken:C,education:ge,pageId:a,hasViewedEducationCards:s,modalTitle:m.pageTitle,kbLink:h,kbLinkForTrial:g}),children:[t(x,{type:"action",children:!y.hasLivePaymentGateway&&c(ne,{type:"warning",className:"margin-x-0",children:["To accept real payments, you must first"," ",t(R,{url:"/manage/ecommerce/",children:"setup a Payment Provider."})]})}),c(x,{type:"labelled",children:[t(N,{type:"h2",className:"margin-y-2",children:m.depositSettings}),c("div",{className:"margin-bottom-2 display-flex align-items-end",children:[t(pe,{label:"Deposit Mode",options:U,value:U.find(({value:e})=>e===P),onChange:({value:e})=>J(e),className:ie(q["width-32-rem"],"margin-bottom-2 display-inline-block"),selectOptions:{hideSelectedOptions:!1}}),P==="fixed"?t(K,{onChange:e=>p(o=>({...o,depositFixedAmount:e})),onBlur:()=>{p(e=>({...e,depositFixedAmount:isNaN(Number(e.depositFixedAmount))?0:Number(e.depositFixedAmount)}))},id:"depositFixedAmount",name:"depositFixedAmount",label:"Amount",labelHidden:!0,className:"margin-2 max-width-input-xs",value:n.depositFixedAmount,prefix:l.symbolPrecedes&&l.symbol,suffix:!l.symbolPrecedes&&l.symbol}):P==="percent"?t(K,{onChange:e=>p(o=>({...o,depositPercent:e})),onBlur:()=>{p(e=>({...e,depositPercent:te(e.depositPercent)}))},id:"depositPercent",name:"depositPercent",label:"Percent",labelHidden:!0,className:"margin-2 max-width-input-xs TextField-suffix-padding-fix",value:n.depositPercent,suffix:"%"}):""]}),c("div",{className:"margin-bottom-3 display-inline-flex",children:[t(O,{id:"useSkipDepositCutoff",name:"useSkipDepositCutoff",label:"Charge customer full amount if booking is created less than",checked:E,onChange:()=>{Q(e=>!e),p(e=>({...e,skipDepositCutoff:Number(e.skipDepositCutoff)||1}))}}),E&&t(K,{onChange:e=>p(o=>({...o,skipDepositCutoff:e})),onBlur:()=>{p(e=>({...e,skipDepositCutoff:Math.max(1,Number(e.skipDepositCutoff)||1)}))},id:"skipDepositCutoff",name:"skipDepositCutoff",className:q.ski
1pDepositCutoffText,type:"number",value:n.skipDepositCutoff}),c(ye,{className:"margin-left-1",children:[!E&&" X ","days from start date."]})]}),t(b,{id:"depositOnly"}),t(b,{id:"allowPayFull",helpText:n.allowPayFull&&c(I,{children:['For customers to see this option the "Pay Now Link" needs to be'," ",t(R,{url:"/manage/layout/invoice/",children:"shown on the invoice."})]})})]}),c(x,{type:"labelled",children:[t(N,{element:"h4",className:"margin-y-2",children:m.acceptedPaymentTypes}),r.map(e=>t(j,{id:e},`card.${e}`)),t(b,{id:"restrictCards"}),y.canChangeStaffRequireCvc&&t(b,{id:"staffRequireCvc"})]}),c(x,{type:"labelled",children:[t(N,{element:"h5",className:"margin-y-2",children:m.posTypes}),i.posTypes.map(e=>t(G,{...e},`posType.${e.value}`)),S.map((e,o)=>t("span",{style:{position:"relative",top:"-0.375rem",width:"8rem",display:"inline-block",marginRight:"1.5rem"},children:t(w,{id:`newPosType_${o}`,onChange:f=>{D(_=>_.map((k,A)=>o===A?f:k))},label:"New",labelHidden:!0,value:e})},`newPosType_${o}`)),t(X,{iconColor:"neutral-dark",icon:t(se,{}),flat:!0,onClick:()=>{D(e=>[...e,""])}}),t(b,{id:"allowStatusPay",className:"width-100 margin-top-6"})]}),c(x,{type:"labelled",children:[t(N,{element:"h4",className:"margin-y-2",children:m.orderConfirmation}),t(w,{onChange:e=>p(o=>({...o,customReceiptUrl:e})),id:"customReceiptUrl",label:m.labels.customReceiptUrl,value:n.customReceiptUrl||"",placeholder:"https://www.example.com/thankyou/?booking_id={$BOOKING_ID}&total={$BOOKING_TOTAL}",helpText:c(I,{children:["Override the default order receipt URL. See"," ",t(R,{external:!0,url:"https://support.checkfront.com/hc/en-us/articles/360007517414-Ecommerce-Settings#orderconfirmation",children:"help for configuration options."})]})}),n.customReceiptUrl&&y.waivers&&t(b,{id:"customReceiptUrlEarly",className:"margin-top-2"}),n.customReceiptUrl&&i.customReceiptInIframe!==null?t(b,{id:"customReceiptInIframe",className:"width-100 margin-top-2"}):null]}),c(x,{type:"labelled",children:[c(N,{element:"h4",className:"margin-y-4",children:["reCAPTCHA Settings",t(ce,{id:"reCaptchaImage",src:"https://www.gstatic.com/images/icons/material/product/2x/recaptcha_48dp.png",description:"Google reCAPTCHA",className:"display-inline-block padding-x-3 padding-top-5",size:"sm"})]}),t(me,{id:"reCaptchaToggle",label:m.labels.reCaptchaEnable,on:u,data:{pendoId:"reCaptchaEnable"},onToggle:e=>{p(o=>({...o,reCaptchaSettings:{...o.reCaptchaSettings,enabled:!!e}})),L(!u)}}),u&&t(z,{ecommerceSettings:n,handleChangeReCaptchaSettings:(e,o)=>p(f=>({...f,reCaptchaSettings:{...f.reCaptchaSettings,[e]:o}}))})]}),c(x,{type:"action",children:[t(ue,{error:F,clearError:()=>H(""),className:"margin-x-0"}),t(fe,{className:"margin-y-5",url:"/manage/ecommerce/settings/",state:M,disabled:!ee(),csrfToken:C,setError:H})]})]})}export{Te as default};

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.