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-121-280.js

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

2 lines 3.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import{a as w,g as F,i as k,aH as H,r as S,z as T,j as a,_,f as h,bG as x}from"./main-294.js";import{D as B,B as D}from"./bf-487-72.js";import{F as o}from"./bf-821-385.js";import{l as N}from"./bf-176-80.js";import{t as C}from"./bf-384-383.js";import{S as L}from"./bf-908-241.js";import"./bf-867-113.js";import"./bf-663-270.js";import"./bf-957-268.js";import"./bf-764-245.js";import"./bf-5-86.js";const W={range:"number",textarea:"text",hidden:"text"};function J({title:g}){var m;const{css:r}=w(),{fieldKey:l}=F(),[u,c]=k(H),y=S.useRef();if(!l)return null;const e=T(u[l]),p=e.adminLbl||"",v=e.defaultValue||"",b=e.typ||"text",V=W[b]||b,j=t=>{t.target.checked?(e.defaultValue=e.lbl||l,e.defaultValueHide=!0):(e.defaultValueHide=!1,delete e.defaultValue);const d=t.target.checked?"on":"off",n=h(u,s=>{s[l]=e});c(n),x({event:`Default value ${d}: ${e.lbl||p||l}`,type:`${d.toLowerCase()}_defaultValue`,state:{fields:n,fldKey:l}})},f=(t,d)=>{if(t==="")delete e.defaultValue;else{let s=t;d&&(e.defaultValue?s=`${e.defaultValue}\${${s}}`:s=`\${${s}}`),e.defaultValue=s}const n=h(u,s=>{s[l]=e});c(n),x({event:`Default value updated: ${t||e.lbl||p||l}`,type:"change_defaultValue",state:{fields:n,fldKey:l}})},$=["bf_all_data","bf_all_data.onlyValues","_bf_length()","_bf_count()","_bf_calc()","_bf_number()","_bf_math()","_bf_concat()","_bf_format_datetime()","_bf_datetime_difference()","_bf_add_subtract_datetime()","_bf_query_param()","_bf_user_meta_key()","_bf_custom_date_format()","_bf_entry_id"];return a.jsx(L,{id:"dflt-val-stng",title:g||_("Default value"),className:r(o.fieldSection,o.hover_tip),switching:!0,tip:C.defaultValue,tipProps:{width:250,icnSize:17},toggleAction:j,toggleChecked:e==null?void 0:e.defaultValueHide,open:e==null?void 0:e.defaultValueHide,disable:!(e!=null&&e.defaultValueHide),proProperty:"defaultValue",children:a.jsxs("div",{className:r(o.placeholder,{pn:"relative"}),children:[a.jsx("input",{"data-testid":"dflt-val-stng-inp","aria-label":"Default value for this Field",placeholder:"Type default value here...",className:r(o.input),type:V,value:v,onChange:({target:{value:t}})=>f(t,!1)}),a.jsx("span",{className:r(i.dotBtnWrapper),children:a.jsxs(B,{instance:y,placement:"bottom-end",popperOptions:{strategy:"fixed"},children:[a.jsx("button",{"data-testid":"ptrn-stng-exprsn-btn","data-close":!0,type:"button",className:r(i.dotBtn),unselectable:"on",draggable:"false",style:{cursor:"pointer"},title:_("Fields"),children:a.jsx(D,{size:"19",rotateDeg:90})}),a.jsx("div",{className:r(i.menuListWrapper),children:a.jsx("ul",{role:"menu",children:(m=N)==null?void 0:m.map(t=>!$.includes(t.name)&&a.jsxs("li",{"data-testid":`ptrn-stng-expn-itm-${t.id}`,role:"menuitem",className:`${r(i.button)} btnHover`,onKeyDown:()=>f(t.name,!0),onClick:()=>f(t.name,!0),children:[a.jsx("span",{children:t.label}),a.jsx("br",{})]},t.id))})})]})})]})})}const i={dotBtnWrapper:{pn:"absolute",tp:0,rt:0,h:35,flx:"center",p:5},dotBtn:{b:0,brs:"var(--bf-bdr-radius-sm)",curp:1,se:25,flx:"center",bd:"var(--bf-bg-offwhite)",cr:"var(--bf-text-clr-darkgray)","&:hover":{b:"1px solid var(--bf-stroke-clr)",cr:"var(--bf-text-clr-dark)"}},button:{dy:"block",w:"100%",ta:"left",b:0,bd:"none",p:3,curp:1,"&:hover":{bd:"var(--white-0-95)",cr:"var(--black-0)",brs:8},fs:11},menuListWrapper:{w:180,mxh:300,owy:"auto"}};export{J as default};
2