PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / V3.3.2
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder vV3.3.2
V3.3.2 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 All 139 releases
bit-form / assets / bf-41-279.js

bf-41-279.js in Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder V3.3.2, at assets/bf-41-279.js

2 lines 4.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import{g as w,i as L,a as I,j as e,_ as p,h as t,f as y,bI as F,b1 as O}from"./main-96.js";import{u as C}from"./bf-431-60.js";import{F as h}from"./bf-460-326.js";import{l as B,f as D}from"./bf-64-360.js";import{F as v}from"./bf-178-325.js";import{C as u}from"./bf-894-52.js";import{S as $}from"./bf-101-357.js";import"./bf-542-181.js";import"./bf-781-46.js";import"./bf-678-179.js";function M({className:_=""}){var N;const{fieldKey:i}=w(),[r,g]=L(O),{css:a}=I();if(!i)return null;const l=r[i],m=(l==null?void 0:l.shippingType)==="dynamic",x=(l==null?void 0:l.taxType)==="dynamic",j=(N=l==null?void 0:l.lbl)!=null?N:"",b=()=>Object.entries(r).filter(n=>n[1].typ.match(/^(radio|number|currency)/)).map(n=>e.jsx("option",{value:n[0],children:n[1].adminLbl||n[1].lbl},n[0])),o=(s,d)=>{const n=y(r,c=>{if(d){if(c[i][s]=d,s==="locale"){const S=d.split(" - ");c[i].locale=S[S.length-1],c[i].language=d}}else delete c[i][s]});g(n),F({event:`${s} changed to ${d}: ${j||i}`,type:`${s}_changed`,state:{fields:n,fldKey:i}})},f=s=>{const{value:d}=s.target,n=y(r,c=>{d?c[i].shippingType=d:delete c[i].shippingType,delete c[i].shipping,delete c[i].shippingFld});g(n),F({event:`Shipping Type changed to "${d}": ${j||i}`,type:"set_shipping_type",state:{fields:n,fldKey:i}})},T=s=>{const{value:d}=s.target,n=y(r,c=>{d?c[i].taxType=d:delete c[i].taxType,delete c[i].tax,delete c[i].taxFld});g(n),F({event:`Tax type changed to "${d}": ${j||i}`,type:"set_tax_type",state:{fields:n,fldKey:i}})},A=()=>B.map(s=>({label:e.jsxs("div",{className:"flx flx-between",children:[e.jsx("span",{className:"btcd-ttl-ellipsis",children:s.region}),e.jsx("code",{className:"btcd-code",children:s.code})]}),title:`${s.region} - ${s.code}`,value:`${s.region} - ${s.code}`})),k=()=>D.map(s=>({label:s.label,value:s.value}));return e.jsxs("div",{className:_,children:[e.jsxs("div",{className:a(t.ml2,t.mr2,t.p1),children:[e.jsx("b",{children:p("Language")}),e.jsx(C,{className:"w-10 btcd-paper-drpdwn mt-1",options:A(),onChange:s=>o("locale",s),defaultValue:l.language||"",largeData:!0,singleSelect:!0})]}),e.jsx(v,{}),e.jsxs("div",{className:a(t.ml2,t.mr2,t.p1),children:[e.jsx("b",{children:p("Disable Card")}),e.jsx(C,{className:"w-10 btcd-paper-drpdwn mt-1 btcd-ttc",options:k(),onChange:s=>o("disableFunding",s),defaultValue:l.disableFunding||""})]}),e.jsx(v,{}),e.jsxs("div",{className:a(t.ml2,t.mr2,t.p1),children:[e.jsx("b",{children:p("Shipping Amount Type")}),e.jsx("br",{}),e.jsx(u,{id:"shpng-amnt-fxd",onChange:f,radio:!0,checked:!m,title:p("Fixed"),value:"fixed"}),e.jsx(u,{id:"shpng-amnt-dynmc",onChange:f,radio:!0,checked:m,title:p("Dynamic"),value:"dynamic"})]}),!m&&e.jsx("div",{className:a(t.ml2,t.mr2,t.p1),children:e.jsx($,{id:"spng-cst",cls:a(h.input),inpType:"number",title:p("Shipping Cost"),value:l.shipping||"",action:s=>o("shipping",s.target.value),className:a({mt:0})})}),m&&e.jsxs("div",{className:a(t.ml2,t.mr2,t.p1),children:[e.jsx("label",{htmlFor:"shippingFld",children:p("Select Shipping Amount Field")}),e.jsxs("select",{id:"shippingFld","data-testid":"slct-shpng-amnt",onChange:s=>o("shippingFld",s.target.value),name:"shippingFld",className:a(h.input),value:l.shippingFld||"",children:[e.jsx("option",{value:"",children:p("Select Field")}),b()]})]}),e.jsx(v,{}),e.jsxs("div",{className:a(t.ml2,t.mr2,t.p1),children:[e.jsx("b",{children:p("Tax Amount Type")}),e.jsx("br",{}),e.jsx(u,{id:"tx-amnt-fxd",onChange:T,radio:!0,checked:!x,title:p("Fixed"),value:"fixed"}),e.jsx(u,{id:"tx-amnt-dynmc",onChange:T,radio:!0,checked:x,title:p("Dynamic"),value:"dynamic"})]}),!x&&e.jsx("div",{className:a(t.ml2,t.mr2,t.p1),children:e.jsx($,{id:"tax",cls:a(h.input),inpType:"number",title:p("Tax (%)"),value:l.tax||"",action:s=>o("tax",s.target.value),className:a({mt:0})})}),x&&e.jsxs("div",{className:a(t.ml2,t.mr2,t.p1),children:[e.jsx("label",{htmlFor:"taxFld",children:p("Select Tax Field")}),e.jsxs("select",{id:"taxFld","data-testid":"slct-amnt-fld",onChange:s=>o("taxFld",s.target.value),name:"taxFld",className:a(h.input),value:l.taxFld||"",children:[e.jsx("option",{value:"",children:p("Select Field")}),b()]})]})]})}export{M as default};
2