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-26-408.js

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

2 lines 2.7 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 M,r as c,f as A,j as t,M as b,_ as I,S as T}from"./main-294.js";import"./bf-176-80.js";import{S as z}from"./bf-619-257.js";import{C as F}from"./bf-523-87.js";import{ac as P,s as L,a7 as C}from"./bf-813-81.js";import{I as $}from"./bf-906-183.js";import{N as B}from"./bf-744-108.js";import{r as J,Z as j,h as O,c as G}from"./bf-804-92.js";import{Z as H}from"./bf-314-187.js";import"./bf-582-82.js";import"./bf-158-107.js";import"./bf-867-113.js";function ae({formFields:y,setIntegration:k,integrations:N,allIntegURL:f}){const x=D(),{formID:p}=M(),[u,h]=c.useState(!1),[E,g]=c.useState(!1),[a,m]=c.useState(1),[_,o]=c.useState({show:!1}),[e,n]=c.useState({name:"Zoho Campaigns API",type:"Zoho Campaigns",clientId:"",clientSecret:"",list:"",field_map:[{formField:"",zohoFormField:""}]}),w=P([e.type]),S=()=>{setTimeout(()=>{x(`${f}/new/${e.type}`)},1e3),g(!1)},Z=(r,l)=>{if(r.integration_type===e.type){const i=JSON.parse(r.integration_details);n(s=>A(s,d=>{d.parentAppId=r.id,d.clientId=i.clientId,d.clientSecret=i.clientSecret,d.tokenDetails=i.tokenDetails,d.dataCenter=i.dataCenter,d.ownerEmail=i.ownerEmail})),m(2)}};c.useEffect(()=>{n(r=>A(r,l=>{const i=w.find(s=>s.id===e.parentAppId);if(i){const s=JSON.parse(i.integration_details);l.clientId=s.clientId,l.clientSecret=s.clientSecret,l.tokenDetails=s.tokenDetails,l.dataCenter=s.dataCenter,l.ownerEmail=s.ownerEmail}})),e!=null&&e.parentAppId&&J(p,e,n,h,o)},[e.parentAppId]),c.useEffect(()=>{window.opener&&L("zohoCampaigns")},[]);const v=()=>{if(setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),!G(e)){o({show:!0,msg:I("Please map mandatory fields")});return}e.list!==""&&e.table!==""&&e.field_map.length>0&&m(3)};return t.jsxs("div",{children:[t.jsx(b,{title:I("Authorize New Zoho Campaigns App"),show:E,setModal:()=>g(!1),children:t.jsx(j,{formID:p,campaignsConf:e,setCampaignsConf:n,step:a,setstep:m,isLoading:u,setisLoading:h,setSnackbar:o,authorizedAction:S})}),t.jsx(T,{snack:_,setSnackbar:o}),t.jsx("div",{className:"txt-center w-9 mt-2 cal-width",children:t.jsx(z,{step:3,active:a})}),w.length>0&&a===1&&t.jsx(F,{allIntegURL:f,specificTypes:[e.type],onClickAction:Z,allowAddNew:!0,addNewAction:()=>g(!0)}),a===1&&w.length===0&&t.jsx(j,{formID:p,campaignsConf:e,setCampaignsConf:n,step:a,setstep:m,isLoading:u,setisLoading:h,setSnackbar:o,authorizedAction:S}),t.jsxs("div",{className:"btcd-stp-page",style:{width:a===2&&900,height:a===2&&"100%"},children:[t.jsx(H,{formID:p,formFields:y,handleInput:r=>O(r,p,e,n,h,o),campaignsConf:e,setCampaignsConf:n,isLoading:u,setisLoading:h,setSnackbar:o}),t.jsx(B,{nextPageHandler:()=>v(),disabled:e.list===""||e.table===""||e.field_map.length<1})]}),t.jsx($,{step:a,saveConfig:()=>C(N,k,f,e,x)})]})}export{ae as default};
2