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-692-417.js

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

2 lines 2.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import{F as Z,g as M,r as i,f as A,j as t,M as T,S as C}from"./main-294.js";import"./bf-176-80.js";import{S as b}from"./bf-619-257.js";import{C as z}from"./bf-523-87.js";import{ac as P,s as L,a7 as _}from"./bf-813-81.js";import{I as $}from"./bf-906-183.js";import{N as B}from"./bf-744-108.js";import{Z as j}from"./bf-59-102.js";import{Z as J}from"./bf-370-197.js";import"./bf-582-82.js";import"./bf-158-107.js";import"./bf-728-185.js";function U({formFields:I,setIntegration:k,integrations:y,allIntegURL:m}){const x=Z(),{formID:h}=M(),[f,u]=i.useState(!1),[N,g]=i.useState(!1),[a,l]=i.useState(1),[E,p]=i.useState({show:!1}),[e,c]=i.useState({name:"Zoho WorkDrive API",type:"Zoho WorkDrive",clientId:"",clientSecret:"",team:"",folder:"",folderMap:[],actions:{}}),w=P([e.type]),S=()=>{setTimeout(()=>{x(`${m}/new/${e.type}`)},1e3),g(!1)},v=(d,n)=>{if(d.integration_type===e.type){const o=JSON.parse(d.integration_details);c(s=>A(s,r=>{r.parentAppId=d.id,r.clientId=o.clientId,r.clientSecret=o.clientSecret,r.tokenDetails=o.tokenDetails,r.dataCenter=o.dataCenter,r.ownerEmail=o.ownerEmail})),l(2)}};i.useEffect(()=>{c(d=>A(d,n=>{const o=w.find(s=>s.id===e.parentAppId);if(o){const s=JSON.parse(o.integration_details);n.clientId=s.clientId,n.clientSecret=s.clientSecret,n.tokenDetails=s.tokenDetails,n.dataCenter=s.dataCenter,n.ownerEmail=s.ownerEmail}}))},[e.parentAppId]),i.useEffect(()=>{window.opener&&L("zohoWorkDrive")},[]);const D=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),e.team!==""&&e.folder!==""&&l(3)};return t.jsxs("div",{children:[t.jsx(T,{title:"Authorize New Zoho WorkDrive App",show:N,setModal:()=>g(!1),children:t.jsx(j,{formID:h,workDriveConf:e,setWorkDriveConf:c,step:a,setStep:l,isLoading:f,setisLoading:u,setSnackbar:p,authorizedAction:S})}),t.jsx(C,{snack:E,setSnackbar:p}),t.jsx("div",{className:"txt-center w-9 mt-2 cal-width",children:t.jsx(b,{step:3,active:a})}),w.length>0&&a===1&&t.jsx(z,{allIntegURL:m,specificTypes:[e.type],onClickAction:v,allowAddNew:!0,addNewAction:()=>g(!0)}),a===1&&w.length===0&&t.jsx(j,{formID:h,workDriveConf:e,setWorkDriveConf:c,step:a,setStep:l,isLoading:f,setisLoading:u,setSnackbar:p,authorizedAction:S}),t.jsxs("div",{className:"btcd-stp-page",style:{width:a===2&&900,height:a===2&&"100%"},children:[t.jsx(J,{formID:h,formFields:I,workDriveConf:e,setWorkDriveConf:c,isLoading:f,setisLoading:u,setSnackbar:p}),t.jsx(B,{nextPageHandler:()=>D(),disabled:e.team===""||e.folder===""})]}),t.jsx($,{step:a,saveConfig:()=>_(y,k,m,e,x)})]})}export{U as default};
2