PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 3.3.1
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v3.3.1
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-408-153.js

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

2 lines 3.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 var f=Object.defineProperty;var k=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var v=(r,t,s)=>t in r?f(r,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[t]=s,j=(r,t)=>{for(var s in t||(t={}))N.call(t,s)&&v(r,s,t[s]);if(k)for(var s of k(t))_.call(t,s)&&v(r,s,t[s]);return r};import{r as o,j as e,_ as a,z as D,F as z,g as K,a as C,S as F}from"./main-762.js";/* empty css */import{t as w}from"./bf-281-48.js";import{T as I}from"./bf-525-114.js";import{A as P}from"./bf-704-110.js";import{a as L}from"./bf-660-157.js";import"./bf-142-115.js";import"./bf-145-47.js";import"./bf-685-46.js";import"./bf-213-54.js";import"./bf-249-69.js";function T({formID:r,dropboxConf:t,setDropboxConf:s,step:g,setStep:y,isLoading:p,setIsLoading:d,isInfo:i,authorizedAction:m}){const[l,h]=o.useState(!1),[c,u]=o.useState({apiKey:"",apiSecret:""}),n=b=>{const A=j({},t),S=j({},c);S[b.target.name]="",A[b.target.name]=b.target.value,u(S),s(A)},x=()=>{if(!t.apiKey||!t.apiSecret){D.error(a("Please enter API key and API secret"));return}window.open(`https://www.dropbox.com/oauth2/authorize?client_id=${t.apiKey}&token_access_type=offline&response_type=code`,"_blank")};return o.useEffect(()=>{l&&m()},[l]),e.jsxs("div",{className:"btcd-stp-page",style:{width:900,height:"100%"},children:[e.jsx(I,{title:w.dropbox.title,youTubeLink:w.dropbox.link}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:a("Integration Name:")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:n,name:"name",value:t.name,type:"text",placeholder:a("e.g. Marketing — work account"),disabled:i}),e.jsxs("small",{className:"d-blk mt-3",children:[a("To Get Api Key & Secret, Please Visit")," ",e.jsx("a",{className:"btcd-link",rel:"noreferrer",target:"_blank",href:"https://www.dropbox.com/developers/apps/create?_tk=pilot_lp&_ad=ctabtn1&_camp=create",children:a("Dropbox API Console")})]}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:a("Dropbox Api Key:")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:n,name:"apiKey",value:t.apiKey,type:"text",placeholder:a("Api Key..."),disabled:i}),e.jsx("div",{style:{color:"red"},children:c.apiKey}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:a("Dropbox Api Secret:")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:n,name:"apiSecret",value:t.apiSecret,type:"text",placeholder:a("Api Secret..."),disabled:i}),e.jsx("div",{style:{color:"red"},children:c.apiSecret}),e.jsxs("small",{className:"d-blk mt-3",children:[a("To Get Access Code, Please Visit")," ",e.jsx("span",{className:"btcd-link",style:{cursor:"pointer"},onClick:x,"aria-hidden":"true",children:a("Dropbox Access Code")})]}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:a("Dropbox Access Code:")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:n,name:"accessCode",value:t.accessCode,type:"text",placeholder:a("Access Code..."),disabled:i}),e.jsx("div",{style:{color:"red"},children:c.accessCode}),!i&&e.jsxs(e.Fragment,{children:[e.jsx(P,{isAuthorized:l,isLoading:p,handleAuthorize:()=>L(t,s,h,d)}),e.jsx("br",{})]})]})}function U({formFields:r,setIntegration:t,integrations:s,allIntegURL:g}){const y=z(),{formID:p}=K(),[d,i]=o.useState(!1),[m,l]=o.useState(1),[h,c]=o.useState({show:!1});C();const[u,n]=o.useState({name:"Dropbox Integration",type:"Dropbox",apiKey:"",apiSecret:"",accessCode:"",field_map:[{formField:"",dropboxFormField:""}],foldersList:[],actions:{}}),x=()=>{setTimeout(()=>{y(g)},1e3)};return e.jsxs("div",{children:[e.jsx(F,{snack:h,setSnackbar:c}),e.jsx(T,{formID:p,dropboxConf:u,setDropboxConf:n,step:m,setStep:l,isLoading:d,setIsLoading:i,authorizedAction:x})]})}export{U as default};
2