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-208-428.js

bf-208-428.js in Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder V_3.0.0, at assets/bf-208-428.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{r as i,a as b,j as e,_ as u,L as v,bs as N,U as I,h as C,c as y,z as k,F as L,g as W,S as _}from"./main-294.js";import"./bf-176-80.js";import{S as z}from"./bf-619-257.js";import{a5 as F,a7 as T}from"./bf-813-81.js";import{I as A}from"./bf-906-183.js";import{N as S}from"./bf-744-108.js";import{t as w}from"./bf-582-82.js";import{W as B,h as P}from"./bf-299-213.js";import"./bf-158-107.js";import"./bf-867-113.js";function E({wcConf:m,setWcConf:g,step:l,setStep:f,setSnackbar:x}){const[o,d]=i.useState(!1),[n,s]=i.useState(!1),[h,j]=i.useState(!1),{css:r}=b(),t=()=>{s("auth"),y({},"bitforms_wc_authorize").then(a=>{a!=null&&a.success&&(d(!0),x({show:!0,msg:u("Connected with WooCommerce Successfully")})),s(!1),j(!0)})},c=a=>{const p=k(m);p[a.target.name]=a.target.value,g(p)};return e.jsxs(e.Fragment,{children:[e.jsx(F,{title:w.wooCommerce.title,youTubeLink:w.wooCommerce.link}),e.jsxs("div",{className:"btcd-stp-page",style:{width:l===1&&900,height:l===1&&"100%"},children:[e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:u("Integration Name:")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:c,name:"name",value:m.name,type:"text",placeholder:u("Integration Name...")}),n==="auth"&&e.jsxs("div",{className:"flx mt-5",children:[e.jsx(v,{size:25,clr:"#022217",className:"mr-2"}),"Checking if WooCommerce is active!!!"]}),h&&!o&&!n&&e.jsxs("div",{className:"flx mt-5",style:{color:"red"},children:[e.jsx("span",{className:"mr-2",style:{fontSize:30,marginTop:-5},children:e.jsx(N,{size:"15"})}),"WooCommerce plugin must be activated to integrate with Bit Form."]}),!o&&e.jsx(I,{variant:o?"disabled":"success",onClick:t,className:r(C.mt3,C.mb3,{ml:3}),children:u("Connect")}),o&&e.jsx(S,{nextPageHandler:()=>f(2),disabled:!o})]})]})}function O({formFields:m,setIntegration:g,integrations:l,allIntegURL:f}){const x=L(),{formID:o}=W(),[d,n]=i.useState(!1),[s,h]=i.useState(1),[j,r]=i.useState({show:!1}),[t,c]=i.useState({name:"WooCommerce Integration",type:"WooCommerce",field_map:[{formField:"",wcField:""}],upload_field_map:[{formField:"",wcField:""}],actions:{}}),a=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),t.workspace!==""&&t.table!==""&&t.field_map.length>0&&h(3)};return e.jsxs("div",{children:[e.jsx(_,{snack:j,setSnackbar:r}),e.jsx("div",{className:"txt-center w-9 mt-2 cal-width",children:e.jsx(z,{step:3,active:s})}),e.jsx(E,{formID:o,wcConf:t,setWcConf:c,step:s,setStep:h,isLoading:d,setisLoading:n,setSnackbar:r}),e.jsxs("div",{className:"btcd-stp-page",style:{width:s===2&&900,height:s===2&&"100%"},children:[e.jsx(B,{wcConf:t,setWcConf:c,formFields:m,handleInput:p=>P(p,t,c,n,r),isLoading:d,setisLoading:n}),e.jsx(S,{nextPageHandler:()=>a(),disabled:t.workspace===""||t.table===""||t.field_map.length<1})]}),e.jsx(A,{step:s,saveConfig:()=>T(l,g,f,t,x)})]})}export{O as default};
2