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-390-413.js

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

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