PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / V3.3.2
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder vV3.3.2
V3.3.2 3.3.1 V-3.3.0 3.2.2 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 V3.0.3 V3.0.2 -3.0.1 V_3.0.0 1.1.1 1.1.8 1.2 1.3 1.4 1.4.18 1.5.2 1.9 2.0 2.10.0 All 139 releases
bit-form / assets / bf-435-92.js

bf-435-92.js in Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder V3.3.2, at assets/bf-435-92.js

2 lines 8.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 var J=Object.defineProperty;var T=Object.getOwnPropertySymbols;var q=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable;var V=(p,r,t)=>r in p?J(p,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):p[r]=t,O=(p,r)=>{for(var t in r||(r={}))q.call(r,t)&&V(p,t,r[t]);if(T)for(var t of T(r))B.call(r,t)&&V(p,t,r[t]);return p};import{u as K,bd as Q,r as x,j as e,e as W,_ as s,d as X,H as Z,f as z,F as Y,g as U,S as g}from"./main-96.js";/* empty css */import{s as f}from"./bf-13-42.js";import{h as F,r as H,a as C,s as ee}from"./bf-55-93.js";import{u as M}from"./bf-431-60.js";import{M as te}from"./bf-798-54.js";import{d as ae}from"./bf-781-46.js";import{S as G}from"./bf-39-66.js";import{A as le}from"./bf-747-75.js";import{u as se}from"./bf-16-67.js";import"./bf-825-45.js";import"./bf-551-68.js";import"./bf-894-52.js";import"./bf-331-47.js";import"./bf-425-69.js";import"./bf-374-48.js";import"./bf-533-49.js";import"./bf-531-50.js";import"./bf-128-51.js";import"./bf-681-53.js";import"./bf-20-55.js";import"./bf-162-70.js";function re({formID:p,formFields:r,signConf:t,setSignConf:o,isLoading:v,setisLoading:j,setSnackbar:N}){var h,A,I,w,c,m,E,d,R,D;const S=K(Q),[b,_]=x.useState({show:!1});t.template&&((A=(h=t==null?void 0:t.default)==null?void 0:h.templateDetails)!=null&&A[t==null?void 0:t.template])&&(!(t!=null&&t.templateActions)||t.templateActions.length!==((m=(c=(w=(I=t==null?void 0:t.default)==null?void 0:I.templateDetails)==null?void 0:w[t==null?void 0:t.template])==null?void 0:c.actions)==null?void 0:m.length))&&(t.templateActions=t.default.templateDetails[t.template].actions.map(a=>({action_id:a.action_id,action_type:a.action_type,language:a.language,private_notes:a.private_notes,recipient_countrycode:a.recipient_countrycode,recipient_email:a.recipient_email,recipient_name:a.recipient_name,recipient_phonenumber:a.recipient_phonenumber,in_person_name:a.in_person_name||"",in_person_email:a.in_person_email||"",role:a.role,verify_recipient:a.verify_recipient,verification_type:a.verification_type||""})),t.notes=t.default.templateDetails[t.template].notes||"");const u=(a,n,l)=>{o(L=>{const P=Z(L);return a==="notes"?P.notes=l:P.templateActions[a][n]=l,P})},y=a=>{o(n=>z(n,l=>{l.notes=a}))},$=a=>{o(n=>{const l=Z(n);return l.templateActions[b.indx].private_notes+=a,l})},k=a=>{_({show:"private_notes",indx:a})},i=()=>{_({show:!1})};return e.jsxs(e.Fragment,{children:[v&&e.jsx(W,{style:{display:"flex",justifyContent:"center",alignItems:"center",height:100,transform:"scale(0.7)"}}),e.jsxs("div",{className:"flx",children:[e.jsx("b",{className:"wdt-100",children:s("Templates:")}),e.jsxs("select",{className:"btcd-paper-inp w-4",onChange:a=>F(a,t,o,p,j,N),name:"template",value:t.template,children:[e.jsx("option",{value:"",children:s("Select Template")}),((E=t==null?void 0:t.default)==null?void 0:E.templates)&&Object.values(t.default.templates).map(a=>e.jsx("option",{value:a.templateId,children:a.templateName},a.templateId))]}),e.jsx("button",{onClick:()=>H(p,t,o,j,N),className:"icn-btn sh-sm ml-2 mr-2 tooltip",style:{"--tooltip-txt":`'${s("Refresh Sign Templates")}'`},type:"button",disabled:v,children:"↻"})]}),e.jsx("br",{}),e.jsx("br",{}),e.jsx("b",{className:"wdt-100",children:s("Recipients:")}),e.jsx("button",{onClick:()=>C(p,t,o,j,N),className:"icn-btn sh-sm ml-2 mr-2 tooltip",style:{"--tooltip-txt":`'${s("Refresh Template Details")}'`},type:"button",disabled:v,children:"↻"}),(d=t==null?void 0:t.templateActions)==null?void 0:d.map((a,n)=>e.jsxs("div",{children:[e.jsxs("div",{className:"flx mt-2",children:[e.jsx("input",{type:"text",value:n+1,readOnly:!0,className:"btcd-paper-inp mr-1",style:{width:40}}),e.jsx("input",{className:"btcd-paper-inp w-3",type:"text",value:a.role,readOnly:!0})]}),a.action_type==="INPERSONSIGN"&&e.jsxs("div",{className:"flx mt-2",style:{marginLeft:45},children:[e.jsx("input",{type:"text",value:"Signer",readOnly:!0,className:"btcd-paper-inp mr-1 mt-4 w-1"}),e.jsxs("div",{className:"mr-2 w-4",children:[e.jsx("div",{className:"mb-1",children:s("In Person Email (Optional)")}),e.jsx(M,{className:"msl-wrp-options btcd-paper-drpdwn w-10",defaultValue:a.in_person_email,options:r.map(l=>({label:l.name,value:`\${${l.key}}`})),onChange:l=>u(n,"in_person_email",l),placeholder:s("In Person Email"),singleSelect:!0,customValue:!0})]}),e.jsxs("div",{className:"mr-2 w-4",children:[e.jsx("div",{className:"mb-1",children:s("In Person Name")}),e.jsx(M,{className:"msl-wrp-options btcd-paper-drpdwn w-10",defaultValue:a.in_person_name,options:r.map(l=>({label:l.name,value:`\${${l.key}}`})),onChange:l=>u(n,"in_person_name",l),placeholder:s("In Person Name"),singleSelect:!0,customValue:!0})]})]}),e.jsxs("div",{className:"flx mt-2",style:{marginLeft:45},children:[a.action_type==="INPERSONSIGN"&&e.jsx("input",{type:"text",value:"Host",readOnly:!0,className:"btcd-paper-inp mr-1 mt-4 w-1"}),e.jsxs("div",{className:"mr-2 w-3",children:[e.jsx("div",{className:"mb-1",children:s("Recipient Email")}),e.jsx(M,{className:"msl-wrp-options btcd-paper-drpdwn w-10",defaultValue:a.recipient_email,options:r.map(l=>({label:l.name,value:`\${${l.key}}`})),onChange:l=>u(n,"recipient_email",l),placeholder:s("Recipient Email"),singleSelect:!0,customValue:!0})]}),e.jsxs("div",{className:"mr-2 w-3",children:[e.jsx("div",{className:"mb-1",children:s("Recipient Name")}),e.jsx(M,{className:"msl-wrp-options btcd-paper-drpdwn w-10",defaultValue:a.recipient_name,options:r.map(l=>({label:l.name,value:`\${${l.key}}`})),onChange:l=>u(n,"recipient_name",l),placeholder:s("Recipient Email"),singleSelect:!0,customValue:!0})]}),e.jsxs("div",{className:"mr-2 w-1",children:[e.jsx("div",{className:"mb-1",children:s("Language")}),e.jsxs("select",{onChange:l=>u(n,"language",l.target.value),className:"btcd-paper-inp",value:a.language,children:[e.jsx("option",{value:"en",children:"English"}),e.jsx("option",{value:"fr",children:"French"}),e.jsx("option",{value:"de",children:"German"}),e.jsx("option",{value:"it",children:"Italian"}),e.jsx("option",{value:"ja",children:"Japanese"}),e.jsx("option",{value:"pl",children:"Polish"}),e.jsx("option",{value:"pt",children:"Portuguese"}),e.jsx("option",{value:"ru",children:"Russian"}),e.jsx("option",{value:"es",children:"Spanish"}),e.jsx("option",{value:"sv",children:"Swedish"})]})]}),e.jsxs("div",{className:"mr-1 w-2",children:[e.jsx("div",{className:"mb-1",children:s("Role")}),e.jsx("input",{type:"text",value:a.action_type,readOnly:!0,className:"btcd-paper-inp"})]}),e.jsx("button",{onClick:()=>k(n),className:"icn-btn mr-1 mt-3 tooltip",style:{"--tooltip-txt":`'${s("Private Note")}'`},"aria-label":"Private Message",type:"button",children:e.jsx(te,{size:"21"})})]})]},a.role)),e.jsxs("div",{className:"mt-5",children:[e.jsx("b",{className:"wdt-100",children:s("Leave a Note:")}),e.jsx(ae,{id:"body-content",formFields:S,value:t.notes,onChangeHandler:y})]}),e.jsxs(X,{className:"custom-conf-mdl",mainMdlCls:"o-v",btnClass:"blue",btnTxt:"Ok",show:b.show==="private_notes",close:i,action:i,title:s("Private Note"),children:[e.jsx("div",{className:"btcd-hr mt-2 mb-2"}),e.jsxs("select",{className:"btcd-paper-inp w-5",onChange:a=>$(a.target.value),children:[e.jsx("option",{value:"",children:s("Field")}),r.map(a=>a.type!=="file-up"&&e.jsx("option",{value:`\${${a.key}}`,children:a.name},`ff-zhcrm-${a.key}`))]}),e.jsx("textarea",{rows:"5",className:"btcd-paper-inp mt-2",onChange:a=>u(b.indx,"private_notes",a.target.value),value:(D=(R=t.templateActions)==null?void 0:R[b.indx])==null?void 0:D.private_notes})]})]})}function ke({mode:p="new",formFields:r,integrations:t,setIntegration:o,allIntegURL:v}){const j=Y(),{id:N,formID:S}=U(),[b,_]=x.useState(!1),[u,y]=x.useState({show:!1}),[$,k]=x.useState({show:!1}),[i,h]=x.useState(()=>p==="edit"?O({},t[N]):{name:"Zoho Sign API",type:"Zoho Sign",clientId:"",clientSecret:"",template:"",actions:{}}),A=c=>{const m=JSON.parse(c.integration_details);h(E=>z(E,d=>{d.parentAppId=c.id,d.clientId=m.clientId,d.clientSecret=m.clientSecret,d.tokenDetails=m.tokenDetails,d.dataCenter=m.dataCenter,d.ownerEmail=m.ownerEmail}))};x.useEffect(()=>{i!=null&&i.parentAppId&&H(S,i,h,_,y)},[i.parentAppId]),x.useEffect(()=>{window.opener&&ee("zohoSign")},[]);const I=()=>{var c,m;if(p==="edit"){if((c=i.actions)!=null&&c.update&&((m=i.actions)==null?void 0:m.update.criteria)===""&&$.show!=="criteria"){k({show:"criteria"});return}f(t,o,v,i,j,N,1);return}f(t,o,v,i,j)},w=p==="edit"||!!i.parentAppId;return se({conf:i,onSeed:c=>h(O({},c)),save:I,saveDisabled:i.template==="",ready:w}),e.jsxs("div",{children:[e.jsx(g,{snack:u,setSnackbar:y}),e.jsx(G,{title:s("Name this integration"),children:e.jsx("input",{className:"btcd-paper-inp w-10",onChange:c=>F(c,i,h),name:"name",value:i.name,type:"text",placeholder:s("Integration Name...")})}),e.jsx(le,{type:"Zoho Sign",value:i.parentAppId,onSelect:A}),w&&e.jsx(G,{title:s("Field mapping"),subtitle:s("Choose the destination and match form fields to it."),children:e.jsx(re,{formID:S,formFields:r,signConf:i,setSignConf:h,isLoading:b,setisLoading:_,setSnackbar:y})})]})}export{ke as default};
2