PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / V_3.0.0
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder vV_3.0.0
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 2.10.1 All 138 releases
bit-form / assets / bf-770-405.js

bf-770-405.js in Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder V_3.0.0, at assets/bf-770-405.js

2 lines 2.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import{F as D,g as b,r as i,f as I,j as t,M as T,_ as M,S as z}from"./main-294.js";import"./bf-176-80.js";import{S as F}from"./bf-619-257.js";import{C as P}from"./bf-523-87.js";import{ac as C,s as L,a7 as $}from"./bf-813-81.js";import{I as B}from"./bf-906-183.js";import{N as J}from"./bf-744-108.js";import{g as O,Z as y,h as G,c as H}from"./bf-454-94.js";import{Z as q}from"./bf-62-189.js";import"./bf-582-82.js";import"./bf-158-107.js";import"./bf-186-103.js";import"./bf-728-185.js";import"./bf-867-113.js";function re({formFields:j,setIntegration:k,integrations:N,allIntegURL:m}){const x=D(),{formID:p}=b(),[f,h]=i.useState(!1),[E,g]=i.useState(!1),[a,u]=i.useState(1),[_,n]=i.useState({show:!1}),[S,R]=i.useState(0),[e,r]=i.useState({name:"Zoho CRM API",type:"Zoho CRM",clientId:"",clientSecret:"",module:"",layout:"",field_map:[{formField:"",zohoFormField:""}],relatedlists:[],actions:{}}),w=C([e.type]),A=()=>{setTimeout(()=>{x(`${m}/new/${e.type}`)},1e3),g(!1)},Z=(l,c)=>{if(l.integration_type===e.type){const o=JSON.parse(l.integration_details);r(s=>I(s,d=>{d.parentAppId=l.id,d.clientId=o.clientId,d.clientSecret=o.clientSecret,d.tokenDetails=o.tokenDetails,d.dataCenter=o.dataCenter,d.ownerEmail=o.ownerEmail})),u(2)}};i.useEffect(()=>{r(l=>I(l,c=>{const o=w.find(s=>s.id===e.parentAppId);if(o){const s=JSON.parse(o.integration_details);c.clientId=s.clientId,c.clientSecret=s.clientSecret,c.tokenDetails=s.tokenDetails,c.dataCenter=s.dataCenter,c.ownerEmail=s.ownerEmail}})),e!=null&&e.parentAppId&&O(p,e,r,h,n)},[e.parentAppId]),i.useEffect(()=>{window.opener&&L("zohoCRM")},[]);const v=()=>{if(setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),!H(e)){n({show:!0,msg:M("Please map mandatory fields")});return}e.module!==""&&e.layout!==""&&e.field_map.length>0&&u(3)};return t.jsxs("div",{children:[t.jsx(T,{title:M("Authorize New Zoho CRM App"),show:E,setModal:()=>g(!1),children:t.jsx(y,{formID:p,crmConf:e,setCrmConf:r,step:a,setstep:u,isLoading:f,setisLoading:h,setSnackbar:n,authorizedAction:A})}),t.jsx(z,{snack:_,setSnackbar:n}),t.jsx("div",{className:"txt-center w-9 mt-2 cal-width",children:t.jsx(F,{step:3,active:a})}),w.length>0&&a===1&&t.jsx(P,{allIntegURL:m,specificTypes:[e.type],onClickAction:Z,allowAddNew:!0,addNewAction:()=>g(!0)}),a===1&&w.length===0&&t.jsx(y,{formID:p,crmConf:e,setCrmConf:r,step:a,setstep:u,isLoading:f,setisLoading:h,setSnackbar:n,authorizedAction:A}),t.jsxs("div",{className:"btcd-stp-page",style:{width:a===2&&900,height:a===2&&"100%"},children:[t.jsx(q,{tab:S,settab:R,formID:p,formFields:j,handleInput:l=>G(l,S,e,r,p,h,n),crmConf:e,setCrmConf:r,isLoading:f,setisLoading:h,setSnackbar:n}),t.jsx(J,{nextPageHandler:()=>v(),disabled:e.module===""||e.layout===""||e.field_map.length<1})]}),t.jsx(B,{step:a,saveConfig:()=>$(N,k,m,e,x)})]})}export{re as default};
2