PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 2.10.0
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v2.10.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-307-303.js

bf-307-303.js in Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder 2.10.0, at assets/bf-307-303.js

2 lines 5.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 var A=Object.defineProperty;var b=Object.getOwnPropertySymbols;var L=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable;var v=(r,n,l)=>n in r?A(r,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[n]=l,x=(r,n)=>{for(var l in n||(n={}))L.call(n,l)&&v(r,l,n[l]);if(b)for(var l of b(n))O.call(n,l)&&v(r,l,n[l]);return r};import{r as p,v as $,c as g,j as e,S as E,dc as d}from"./main-162.js";import{p as f,S as R}from"./bf-179-369.js";import{t as _}from"./bf-307-196.js";import{T as U}from"./bf-23-135.js";import{b as B}from"./bf-230-72.js";import{P as y,a as N,c as z,b as G}from"./bf-606-372.js";/* empty css */import"./bf-875-77.js";import"./bf-917-73.js";import"./bf-361-122.js";function se({formFields:r,setIntegration:n,integrations:l,allIntegURL:F}){const[P,S]=p.useState([]),[C,k]=p.useState([]),[w,I]=p.useState([]),M=$(),[i,c]=p.useState({name:"Pods",type:"Pods",post_map:[{post_author:"logged_in_user"}],pod_map:[{}]}),[q,m]=p.useState({show:!1}),h=(t,s,o)=>{const a=x({},i);o?a[t]=Number(s):a[t]=s,c(a)},D=(t,s)=>{const o=x({},i);o[t]=s,g({pod_type:s},"bitforms_get_pod_field").then(a=>{var j;a!=null&&a.success&&a!==void 0&&(k(Object.values(a==null?void 0:a.data)),a!=null&&a.data&&(o.pod_map=Object.values(a.data).filter(u=>u.required).map(u=>({formField:"",podFormField:u.key,required:u.required})),((j=o==null?void 0:o.pod_map)==null?void 0:j.length)<1&&(o.pod_map=[{}])),c(o))})};p.useEffect(()=>{g({},"bitforms_get_pod_type").then(s=>{var o,a;s!=null&&s.success&&s!==void 0&&(S(Object.values((o=s.data)==null?void 0:o.post_types)),I((a=s.data)==null?void 0:a.users))});const t=x({},i);t.post_map=f.filter(s=>s.required).map(s=>({formField:"",postFormField:s.key,required:s.required})),c(t)},[]);const T=()=>{if(!i.post_type){m({show:!0,msg:d("Pod cann't be empty")});return}if(!i.post_status){m({show:!0,msg:d("Post Status cann't be empty")});return}if(!z(i)){m({show:!0,msg:d("Please map mandatory fields")});return}if(!G(i)){m({show:!0,msg:d("Please map mandatory fields")});return}B(l,n,F,i,M)};return e.jsxs("div",{style:{width:900},children:[e.jsx(E,{snack:q,setSnackbar:m}),e.jsx(U,{title:_.pods.title,youTubeLink:_.pods.link}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:d("Integration Name ")})}),e.jsx("input",{className:"btcd-paper-inp w-5 mt-1",onChange:t=>h(t.target.name,t.target.value),name:"name",value:i.name,type:"text",placeholder:d("Integration Name...")}),e.jsxs("div",{className:"mt-3",children:[e.jsx("b",{children:d("Pod")})," ",e.jsx("span",{style:{color:"red"},children:"*"})]}),e.jsxs("select",{name:"post_type",onChange:t=>D(t.target.name,t.target.value),className:"btcd-paper-inp w-5 mt-1",children:[e.jsx("option",{disabled:!0,selected:!0,children:"Select Type"}),P.map((t,s)=>e.jsx("option",{value:t.name,children:t.label},`pod-${s*2}`))]}),e.jsxs("div",{className:"mt-3",children:[e.jsx("b",{children:d("Post Status")})," ",e.jsx("span",{style:{color:"red"},children:"*"})]}),e.jsxs("select",{name:"post_status",onChange:t=>h(t.target.name,t.target.value),className:"btcd-paper-inp w-5 mt-1",children:[e.jsx("option",{disabled:!0,selected:!0,children:d("Select Status")}),e.jsx("option",{value:"publish",children:"Publish"}),e.jsx("option",{value:"draft",children:"Draft"}),e.jsx("option",{value:"inherit",children:"Inherit"}),e.jsx("option",{value:"auto-draft",children:"Auto-Draft"}),e.jsx("option",{value:"private ",children:"Private"}),e.jsx("option",{value:"pending",children:"Pending"})]}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:d("Comment Status")})}),e.jsxs("select",{name:"comment_status",onChange:t=>h(t.target.name,t.target.value),className:"btcd-paper-inp w-5 mt-1",children:[e.jsx("option",{disabled:!0,selected:!0,children:d("Select Status")}),e.jsx("option",{value:"open",children:"Open"}),e.jsx("option",{value:"closed",children:"Closed"})]}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:d("Author")})}),e.jsxs("select",{name:"post_author",onChange:t=>h(t.target.name,t.target.value),className:"btcd-paper-inp w-5 mt-1",children:[e.jsx("option",{disabled:!0,selected:!0,children:d("Select Author")}),e.jsx("option",{value:"logged_in_user",children:"Logged In User"}),w.map((t,s)=>e.jsx("option",{value:t.ID,children:t.display_name},`pod-${s*2}`))]}),e.jsx("div",{children:e.jsxs("p",{className:"p-1 f-m",children:[e.jsx("strong",{children:"Note"})," ",": All your taxonomies will be mapped automatically from your form fields."]})}),e.jsxs("div",{children:[e.jsxs("div",{children:[e.jsx("div",{className:"mt-3 mb-1",children:e.jsx("b",{children:"Pod Fields Mapping"})}),e.jsx("div",{className:"btcd-hr"}),e.jsxs("div",{className:"flx flx-around mt-2 mb-1",children:[e.jsx("div",{className:"txt-dp",children:e.jsx("b",{children:d("Form Fields")})}),e.jsx("div",{className:"txt-dp",children:e.jsx("b",{children:d("Pod Fields")})})]})]}),i.pod_map.map((t,s)=>e.jsx(y,{i:s,type:"pod",field:t,formFields:r,dataConf:i,setDataConf:c,podFields:C},`analytics-m-${s+9}`)),e.jsx("div",{className:"txt-center mt-2",style:{marginRight:85},children:e.jsx("button",{onClick:()=>N("pod_map",i.pod_map.length,i,c),className:"icn-btn sh-sm",type:"button",children:"+"})}),e.jsxs("div",{children:[e.jsx("div",{className:"mt-3 mb-1",children:e.jsx("b",{children:"Post Fields Mapping"})}),e.jsx("div",{className:"btcd-hr"}),e.jsxs("div",{className:"flx flx-around mt-2 mb-1",children:[e.jsx("div",{className:"txt-dp",children:e.jsx("b",{children:d("Form Fields")})}),e.jsx("div",{className:"txt-dp",children:e.jsx("b",{children:d("Post Fields")})})]})]}),i.post_map.map((t,s)=>e.jsx(y,{i:s,type:"post",field:t,formFields:r,dataConf:i,setDataConf:c,podFields:f},`analytics-m-${s+9}`)),e.jsx("div",{className:"txt-center mt-2",style:{marginRight:85},children:e.jsx("button",{onClick:()=>N("post_map",i.post_map.length,i,c),className:"icn-btn sh-sm",type:"button",children:"+"})})]}),e.jsx(R,{onClick:()=>T()})]})}export{se as default};
2