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-709-203.js

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

3 lines 8.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./bf-191-351.js","./main-762.js","./main-762.css","./bf-142-352.js","./bf-685-46.js","./bf-736-373.css","./bf-81-43.js","./bf-871-60.js","./bf-435-62.js","./bf-653-63.js","./bf-209-372.css","./bf-256-374.css","./bf-850-326.js","./bf-466-325.js","./bf-610-181.js","./bf-734-179.js","./bf-141-345.js","./bf-111-180.js","./bf-45-176.js","./bf-848-68.js","./bf-775-182.js","./bf-402-337.js","./bf-974-350.js","./bf-517-178.js","./bf-874-177.js","./bf-980-375.css","./bf-769-183.js","./bf-448-349.js","./bf-615-336.js","./bf-820-328.js","./bf-767-377.css","./bf-849-166.js","./bf-405-211.js","./bf-921-212.js","./bf-206-187.js"])))=>i.map(i=>d[i]);
2 var se=Object.defineProperty,te=Object.defineProperties;var oe=Object.getOwnPropertyDescriptors;var S=Object.getOwnPropertySymbols;var ae=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable;var F=(r,a,n)=>a in r?se(r,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[a]=n,j=(r,a)=>{for(var n in a||(a={}))ae.call(a,n)&&F(r,n,a[n]);if(S)for(var n of S(a))ne.call(a,n)&&F(r,n,a[n]);return r},O=(r,a)=>te(r,oe(a));import{r as p,i as V,u as A,by as le,$ as G,g as re,F as ie,a as P,ap as ce,eV as de,I as k,c as N,j as e,y as H,_ as l,C as me,eW as ue,E as he,G as pe,aN as C,S as be,d as xe,bn as fe,b as we,be as L,P as X,bG as je,bi as Z,eX as ge,Z as _e,f as ve,l as Ee,b9 as Te,B as ye,D as M}from"./main-762.js";import{u as Ne,P as Ce}from"./bf-685-46.js";import{u as _}from"./bf-871-60.js";import{A as U}from"./bf-284-49.js";import{L as z}from"./bf-466-50.js";import{E as Ae}from"./bf-604-51.js";import{E as Ve}from"./bf-81-43.js";import{t as B}from"./bf-281-48.js";/* empty css */import"./bf-435-62.js";import"./bf-653-63.js";const Pe=je(()=>Z(()=>import("./bf-191-351.js"),__vite__mapDeps([0,1,2]),import.meta.url),{fallback:e.jsx("div",{children:"Loading..."})});function ke(){const[r,a]=p.useState(!1),[n,d]=p.useState({show:!1}),[b,x]=V(ge),[o,m]=p.useState({show:!1,btnTxt:""}),u=A(le),h=A(G),{formID:f,formType:t}=re(),E=ie(),{css:g}=P(),T=ce(de);p.useEffect(()=>{T(),k&&N({formID:f},"bitforms_get_views").then(s=>{if(s===void 0||!s.success)x([]),d({show:!0,msg:s.data});else if(s.success){const i=s.data.map(w=>O(j({},w),{shortcode:`[bitform-view id='${w.id}']`}));x(i)}})},[f]);const q=s=>e.jsxs("div",{style:{lineHeight:.7,fontWeight:500},children:[L(s,h.dateFormat),e.jsx("br",{}),e.jsx("br",{}),e.jsx("small",{children:L(s,h.timeFormat)})]}),R=()=>{var s;if(!X((s=h==null?void 0:h.proInfo)==null?void 0:s.installedVersion,"2.9.0")){d({show:!0,msg:"To use this feature you need Bit Form Pro(Version: 2.9.0)"});return}E(`/form/settings/${t}/${f}/data-views/new`)},[$,I]=p.useState([{width:250,minWidth:80,Header:l("View Name"),accessor:"table_name",Cell:s=>e.jsx(H,{to:`/form/settings/${t}/${f}/data-views/${s.row.original.id}`,type:"button",className:"btcd-tabl-lnk",children:s.row.original.table_name})},{width:220,minWidth:200,Header:l("Shortcode"),accessor:"shortcode",Cell:s=>e.jsx(me,{value:s.row.values.shortcode,className:`cpyTxt ${g({w:230})}`})},{width:160,minWidth:60,Header:l("Created"),accessor:"created_at",Cell:s=>q(s.row.original.created_at)}]);p.useEffect(()=>{const s=$.filter(i=>i.accessor!=="t_action");s.push({sticky:"right",width:100,minWidth:60,Header:l("Actions"),accessor:"t_action",Cell:i=>e.jsxs(ue,{title:l("Actions"),w:165,h:107,children:[e.jsxs(H,{to:`/form/settings/${t}/${f}/data-views/${i.row.original.id}`,type:"button",className:"flx","aria-label":"actions",children:[e.jsx(he,{size:18}),l("Edit Table")]}),e.jsxs("button",{type:"button",onClick:()=>Y(i.row.original.id,i.row.index),children:[e.jsx(pe,{size:16})," ",l("Delete")]})]})}),I([...s])},[u]);const J=p.useCallback(s=>{const i=[],w=[];for(let c=0;c<s.length;c+=1)i.push(s[c].id),w.push(s[c].original.id);const y=[...b],W=[...b];for(let c=i.length-1;c>=0;c-=1)W.splice(Number(i[c]),1);x(c=>C(c,{data:W,type:"set"})),N({tblId:w},"bitforms_bulk_table_delete_form").then(c=>{c===void 0||!c.success?x(ee=>C(ee,{data:y,type:"set"})):c.success&&d({show:!0,msg:c.data})})},[b]),K=(s,i)=>{N({id:s},"bitforms_delete_atable").then(w=>{w.success&&(x(y=>C(y,{type:"remove",data:i})),d({show:!0,msg:l("Table Deleted Successfully")}))})},Q=p.useCallback(s=>{I(s)},[]),D=()=>{o.show=!1,m(j({},o))},Y=(s,i)=>{o.action=()=>{K(s,i),D()},o.btnTxt=l("Delete"),o.btn2Txt=null,o.btnClass="",o.body=l("Are you sure to delete this table?"),o.show=!0,m(j({},o))};return e.jsxs("div",{id:"all-forms",children:[e.jsx(be,{snack:n,setSnackbar:d}),e.jsx(xe,{show:o.show,body:o.body,action:o.action,close:D,btnTxt:o.btnTxt,btn2Txt:o.btn2Txt,btn2Action:o.btn2Action,btnClass:o.btnClass}),b.length?e.jsx("div",{children:e.jsx(fe,{className:"f-table btcd-all-frm",leftHeaderClasses:g($e.leftHeader),height:525,columns:$,data:b,rowSeletable:!0,newTableId:u,resizable:!0,setBulkDelete:J,setTableCols:Q,centerHeader:e.jsx("h3",{children:"Data View List (Beta)"}),rightHeader:e.jsx("button",{onClick:()=>R(),type:"button","data-testid":"create-table-btn",className:`round btcd-btn-lg blue blue-sh ${g(we.btn)}`,children:l("Create View")})})}):e.jsx(Pe,{setModal:a,createNewView:R})]})}var Re=p.memo(ke);const $e={leftHeader:{width:"auto !important"}},Ie=_e({});function De(){const[r,a]=V(Ie);return Ne("bitforms_get_user_roles",{},{fetchCondition:!Object.keys(r).length,onSuccess:n=>a(n.userRoles)}),r}function We(){var f;const[r,a]=V(Te),n=A(G),{css:d}=P(),b=De(),x=Object.keys(b).filter(t=>t!=="administrator").map(t=>({label:b[t].name,value:t})),o=[{label:"All Logged In Users",value:"all_logged_in_users"},...x],{entryEditAccess:m,entryViewAccess:u}=r||{},h=(t,E)=>{k&&a(g=>ve(g,T=>{Ee(T,t,E)}))};return e.jsxs("div",{children:[e.jsx("h3",{children:"Views And Edit Access"}),!X((f=n==null?void 0:n.proInfo)==null?void 0:f.installedVersion,"2.9.0")&&e.jsxs("p",{children:[e.jsx("strong",{style:{color:"red"},children:" Note:"})," ","To use this feature you need Bit Form Pro(Version: 2.9.0)"," "]}),e.jsx(U,{customTitle:e.jsxs("span",{className:d({flx:"align-center"}),children:[e.jsx("span",{className:"mr-2",children:e.jsx(Ve,{size:18})}),e.jsx("b",{children:l("Prevent Public View of Entries")}),e.jsx("small",{className:"ml-1",children:l("(Allow only selected rules to View Entries)")}),e.jsx(z,j({},B.allowUserToView))]}),toggle:!0,action:t=>h("entryViewAccess->preventPublicAccess",t.target.checked),checked:u==null?void 0:u.preventPublicAccess,cls:"w-10 mt-3",isPro:!0,proProperty:"is_login",children:e.jsxs("div",{className:d({p:"5px 10px"}),children:[e.jsxs("div",{className:d(v.inputWrp),children:[e.jsx("span",{children:l("Allow Roles to view own entries")}),e.jsx(_,{defaultValue:(u==null?void 0:u.ownEntries)||[],className:"btcd-paper-drpdwn w-6",options:o,onChange:t=>h("entryViewAccess->ownEntries",t)})]}),e.jsxs("div",{className:d(v.inputWrp),children:[e.jsx("span",{children:l("Allow Roles to view Other's entries")}),e.jsx(_,{defaultValue:(u==null?void 0:u.othersEntries)||[],className:"btcd-paper-drpdwn w-6",options:o,onChange:t=>h("entryViewAccess->othersEntries",t)})]})]})}),e.jsx(U,{customTitle:e.jsxs("span",{className:d({dy:"flex"}),children:[e.jsx("span",{className:"mr-2",children:e.jsx(Ae,{size:20})}),e.jsx("b",{children:l("Allow Users to Edit Form Entries")}),e.jsx(z,j({},B.allowUserToEdit))]}),toggle:!0,action:t=>h("entryEditAccess->allowEntriesEdit",t.target.checked),checked:m==null?void 0:m.allowEntriesEdit,cls:"w-10 mt-3",isPro:!0,proProperty:"is_login",children:e.jsxs("div",{className:d({p:"5px 10px"}),children:[e.jsxs("div",{className:d(v.inputWrp),children:[e.jsx("span",{children:l("Allow Roles to edit own entries")}),e.jsx(_,{defaultValue:(m==null?void 0:m.ownEntries)||[],className:"btcd-paper-drpdwn w-6",options:o,onChange:t=>h("entryEditAccess->ownEntries",t)})]}),e.jsxs("div",{className:d(v.inputWrp),children:[e.jsx("span",{children:l("Allow Roles to edit Other's entries")}),e.jsx(_,{defaultValue:(m==null?void 0:m.othersEntries)||[],className:"btcd-paper-drpdwn w-6",options:x,onChange:t=>h("entryEditAccess->othersEntries",t)})]})]})})]})}const v={inputWrp:{dy:"flex",jc:"space-between",ai:"center",mb:10}};function Se(){const{css:r}=P();return e.jsxs("div",{className:r({pr:75}),children:[!k&&e.jsx(Ce,{style:{height:"90%",left:"30px",width:"95%","margin-top":"40px"}}),e.jsx(We,{}),e.jsx("hr",{}),e.jsx(Re,{})]})}const Fe=p.lazy(()=>Z(()=>import("./bf-142-352.js"),__vite__mapDeps([3,1,2,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34]),import.meta.url));function Qe(){return e.jsxs(ye,{children:[e.jsx(M,{index:!0,element:e.jsx(Se,{})}),e.jsx(M,{path:"/:viewId",element:e.jsx(Fe,{})})]})}export{Qe as default};
3