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-617-282.js

bf-617-282.js in Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder V_3.0.0, at assets/bf-617-282.js

2 lines 7.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import{a as k,g as z,i as G,aH as R,u as V,k as J,z as O,j as l,_ as g,f as M,ba as y,bG as $,e5 as Q}from"./main-294.js";import{F as m}from"./bf-821-385.js";import{E as b}from"./bf-28-232.js";import{S as U}from"./bf-908-241.js";import"./bf-645-110.js";import"./bf-487-72.js";import"./bf-176-80.js";import"./bf-867-113.js";import"./bf-986-242.js";import"./bf-764-245.js";import"./bf-250-243.js";import"./bf-22-244.js";import"./bf-934-246.js";import"./bf-188-247.js";import"./bf-85-248.js";import"./bf-930-249.js";import"./bf-5-86.js";import"./bf-112-250.js";import"./bf-399-251.js";import"./bf-379-106.js";import"./bf-508-252.js";import"./bf-128-253.js";import"./bf-446-382.js";import"./bf-384-383.js";import"./bf-663-270.js";import"./bf-957-268.js";import"./bf-889-272.js";import"./bf-766-384.js";import"./bf-383-274.js";import"./bf-108-386.js";import"./bf-297-387.js";function Le(){var T,j,N,L,F,H,W,_;const{css:p}=k(),{fieldKey:i}=z(),[c,f]=G(R),C=V(J);if(!i)return null;const e=O(c[i]),w=e.adminLbl||"",E=((T=e.valid)==null?void 0:T.minlength)||"",S=((j=e.valid)==null?void 0:j.maxlength)||"",B=((N=e.valid)==null?void 0:N.maxword)||"",q=((L=e.valid)==null?void 0:L.minword)||"",v=C.err||{},x=r=>{var a,n,d,s;const t=[];(a=r.valid)!=null&&a.minlength&&t.push("Minimum ${field.minlength} character required."),(n=r.valid)!=null&&n.maxlength&&t.push("${field.value_length} of ${field.maxlength} Max Characters."),(d=r.valid)!=null&&d.minword&&t.push("Minimum ${field.minword} word required."),(s=r.valid)!=null&&s.maxword&&t.push("${field.value_wordlength} of ${field.maxword} Max Word."),t.length>0&&(r.helperTxt=t.join(" "),r.hlpTxtHide=!0,Q(i,"hlpTxt"))},I=r=>{var n,d,s,o,h;const t=r.target.value;t===""?((n=e.valid)!=null&&n.minlength&&delete e.valid.minlength,(d=e.err)!=null&&d.minlength&&delete e.err.minlength,!((s=e.valid)!=null&&s.maxlength)&&!((o=e.valid)!=null&&o.maxword)&&!((h=e.valid)!=null&&h.minword)&&e.helperTxt.includes("${field.minlength}")?(delete e.helperTxt,delete e.hlpTxtHide):x(e)):(e.valid||(e.valid={}),e.valid.minlength=t,e.err||(e.err={}),e.err.minlength||(e.err.minlength={}),e.err.minlength.dflt=v.minlength||`<p style="margin:0">Minimum ${t} character required.</p>`,e.err.minlength.show=!0,x(e));const a=M(c,u=>{u[i]=e});f(a),y(i),$({event:`Min length updated to ${t}: ${e.lbl||w||i}`,type:"set_minlength",state:{fields:a,fldKey:i}})},A=r=>{var n,d,s,o,h;const t=r.target.value;t===""?((n=e.valid)!=null&&n.maxlength&&delete e.valid.maxlength,(d=e.err)!=null&&d.maxlength&&delete e.err.maxlength,!((s=e.valid)!=null&&s.minlength)&&!((o=e.valid)!=null&&o.maxword)&&!((h=e.valid)!=null&&h.minword)?(delete e.helperTxt,delete e.hlpTxtHide):x(e)):(e.valid||(e.valid={}),e.valid.maxlength=t,e.err||(e.err={}),e.err.maxlength||(e.err.maxlength={}),e.err.maxlength.dflt=v.maxlength||`<p style="margin:0">Maximum ${t} character allowed.</p>`,e.err.maxlength.show=!0,x(e));const a=M(c,u=>{u[i]=e});f(a),y(i),$({event:`Max length updated to ${t}: ${e.lbl||w||i}`,type:"set_maxlength",state:{fields:a,fldKey:i}})},K=r=>{var n,d,s,o,h;const t=r.target.value;t===""?((n=e.valid)!=null&&n.maxword&&delete e.valid.maxword,(d=e.err)!=null&&d.maxword&&delete e.err.maxword,!((s=e.valid)!=null&&s.minlength)&&!((o=e.valid)!=null&&o.maxlength)&&!((h=e.valid)!=null&&h.minword)?(delete e.helperTxt,delete e.hlpTxtHide):x(e)):(e.valid||(e.valid={}),e.valid.maxword=t,e.err||(e.err={}),e.err.maxword||(e.err.maxword={}),e.err.maxword.dflt=v.maxword||`<p style="margin:0">Maximum ${t} word allowed.</p>`,e.err.maxword.show=!0,x(e));const a=M(c,u=>{u[i]=e});f(a),y(i),$({event:`Max word updated to ${t}: ${e.lbl||w||i}`,type:"set_maxword",state:{fields:a,fldKey:i}})},P=r=>{var n,d,s,o,h;const t=r.target.value;t===""?((n=e.valid)!=null&&n.minword&&delete e.valid.minword,(d=e.err)!=null&&d.minword&&delete e.err.minword,!((s=e.valid)!=null&&s.minlength)&&!((o=e.valid)!=null&&o.maxlength)&&!((h=e.valid)!=null&&h.maxword)?(delete e.helperTxt,delete e.hlpTxtHide):x(e)):(e.valid||(e.valid={}),e.valid.minword=t,e.err||(e.err={}),e.err.minword||(e.err.minword={}),e.err.minword.dflt=v.minword||`<p style="margin:0">Minimum ${t} word required.</p>`,e.err.minword.show=!0,x(e));const a=M(c,u=>{u[i]=e});f(a),y(i),$({event:`Min word updated to ${t}: ${e.lbl||w||i}`,type:"set_minword",state:{fields:a,fldKey:i}})};return l.jsx(U,{id:"text-length-stng",title:g("Min/Max Text Length:"),className:p(m.fieldSection),children:l.jsxs("div",{className:p({mx:5}),children:[l.jsxs("div",{className:p(m.fieldNumber,{py:"0px !important"}),children:[l.jsx("span",{children:g("Min Length:")}),l.jsx("input",{"data-testid":"text-length-stng-min-inp",title:"Minimum character length for this field","aria-label":"Minimum character length for this field",placeholder:"Type minimum length here...",className:p(m.input,m.w140),type:"number",min:"0",value:E,onChange:I})]}),((F=e.valid)==null?void 0:F.minlength)&&l.jsx(b,{id:"char-length-stng-min",type:"minlength",title:"Min Length Error Message",tipTitle:`${g("By enabling this feature, user will see the error message when input length is less than")} ${e.valid.minlength}`,allowIcons:!1}),l.jsxs("div",{className:p(m.fieldNumber,{py:"0px !important"}),children:[l.jsx("span",{children:g("Max Length:")}),l.jsx("input",{"data-testid":"char-length-stng-max-inp",title:"Maximum character length for this field","aria-label":"Maximum character length for this field",placeholder:"Type maximum length here...",className:p(m.input,m.w140),type:"number",min:"0",value:S,onChange:A})]}),((H=e.valid)==null?void 0:H.maxlength)&&l.jsx(b,{id:"char-length-stng-max",type:"maxlength",title:"Max Length Error Message",tipTitle:`${g("By enabling this feature, user will see the error message when input length is greater than")} ${e.valid.maxlength}`,allowIcons:!1}),l.jsxs("div",{className:p(m.fieldNumber,{py:"0px !important"}),children:[l.jsx("span",{children:g("Min Word:")}),l.jsx("input",{"data-testid":"char-length-stng-minword-inp",title:"Minimum word count for this field","aria-label":"Minimum word count for this field",placeholder:"Type minimum word count here...",className:p(m.input,m.w140),type:"number",min:"0",value:q,onChange:P})]}),((W=e.valid)==null?void 0:W.minword)&&l.jsx(b,{id:"char-length-stng-minword",type:"minword",title:"Min Word Error Message",tipTitle:`${g("By enabling this feature, user will see the error message when word count is less than")} ${e.valid.minword}`,allowIcons:!1}),l.jsxs("div",{className:p(m.fieldNumber,{py:"0px !important"}),children:[l.jsx("span",{children:g("Max Word:")}),l.jsx("input",{"data-testid":"char-length-stng-maxword-inp",title:"Maximum word count for this field","aria-label":"Maximum word count for this field",placeholder:"Type maximum word count here...",className:p(m.input,m.w140),type:"number",min:"0",value:B,onChange:K})]}),((_=e.valid)==null?void 0:_.maxword)&&l.jsx(b,{id:"char-length-stng-maxword",type:"maxword",title:"Max Word Error Message",tipTitle:`${g("By enabling this feature, user will see the error message when word count is greater than")} ${e.valid.maxword}`,allowIcons:!1})]})})}export{Le as default};
2