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-470-233.js

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

2 lines 8.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 var te=Object.defineProperty,se=Object.defineProperties;var ie=Object.getOwnPropertyDescriptors;var V=Object.getOwnPropertySymbols;var oe=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable;var E=(o,n,m)=>n in o?te(o,n,{enumerable:!0,configurable:!0,writable:!0,value:m}):o[n]=m,v=(o,n)=>{for(var m in n||(n={}))oe.call(n,m)&&E(o,m,n[m]);if(V)for(var m of V(n))ne.call(n,m)&&E(o,m,n[m]);return o},b=(o,n)=>se(o,ie(n));import{g as W,u as F,i as R,r as U,a as Y,j as e,_ as d,M as ae,f,b2 as le,aX as Z,ao as ee,aq as ce,h as $,I as q,bA as re,bC as de,dd as pe,aM as he}from"./main-294.js";import{F as X,B as me,t as ue}from"./bf-384-383.js";import{A as xe,s as y}from"./bf-446-382.js";import{F as i}from"./bf-821-385.js";import{s as Se}from"./bf-986-242.js";import{S as I}from"./bf-764-245.js";import{T as ge}from"./bf-735-388.js";import{F as S,I as je}from"./bf-766-384.js";import{S as C}from"./bf-908-241.js";import"./bf-663-270.js";import"./bf-957-268.js";import"./bf-176-80.js";import"./bf-487-72.js";import"./bf-867-113.js";import"./bf-645-110.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";function G({btnType:o,btnName:n,switching:m,handleButtonAlignment:T,btnAlignmentList:O}){var M,p;W(),F(le),R(Z);const[N,B]=U.useState(!1),[P,s]=U.useState(""),{css:j}=Y(),[k,l]=R(ee),{btnSettings:h}=k.multiStepSettings||{},c=`This ${n} Button is use to go in ${n} Step.`,_=({target:{value:a}})=>{l(g=>f(g,x=>{x.multiStepSettings.btnSettings[o].txt=a}))},H=a=>{s(a),B(!0)},A=a=>{l(g=>f(g,x=>{x.multiStepSettings.btnSettings[o][a]&&delete x.multiStepSettings.btnSettings[o][a]}))},z=a=>{l(g=>f(g,x=>{x.multiStepSettings.btnSettings[o][P]=a})),B(!1)},L=a=>{h[o][P]===a&&(delete h[o][P],l(g=>f(g,x=>{x.multiStepSettings.btnSettings=h})))};return e.jsxs("div",{children:[e.jsxs(C,{id:`${o}-stp-btn-stng`,title:d(`${n} Button`),className:j(i.fieldSection,i.hover_tip),tip:c,tipProps:{width:250,icnSize:17},isPro:!0,children:[e.jsx("div",{className:j(i.placeholder),children:e.jsx(xe,{id:`${o}-rpt-btn-stng`,ariaLabel:`${n} Repeater Button Text`,placeholder:"Type Button Text here...",value:h==null?void 0:h[o].txt,changeAction:_})}),e.jsxs("div",{className:j(i.iconLayoutHorizontal),children:[e.jsx(X,{label:"Prefix Icon",iconSrc:(M=h==null?void 0:h[o])==null?void 0:M.preIcn,styleRoute:`${J[o]}-pre-i`,setIcon:()=>H("preIcn"),removeIcon:()=>A("preIcn"),proProperty:"leadingIcon",position:"prefix"}),e.jsx("span",{className:j(i.iconSeparator),children:"|"}),e.jsx(X,{label:"Suffix Icon",iconSrc:(p=h==null?void 0:h[o])==null?void 0:p.sufIcn,styleRoute:`${J[o]}-suf-i`,setIcon:()=>H("sufIcn"),removeIcon:()=>A("sufIcn"),proProperty:"trailingIcon",position:"suffix"})]})]}),e.jsx(S,{}),e.jsxs(ae,{md:!0,autoHeight:!0,show:N,setModal:B,className:"o-v",title:d("Icons"),children:[e.jsx("div",{className:"pos-rel"}),e.jsx(je,{iconType:P,setModal:B,setIconAction:z,removeIconAction:L})]})]})}const J={nextBtn:"step-next-btn",prevBtn:"step-prev-btn"};function Je(){const{formID:o}=W(),n=F(re),m=F(de),T=F(pe),[O,N]=R(ee),[B,P]=R(Z),{css:s}=Y();n[m];const j=ce(he),{showStepHeader:k,headerIcon:l,themeStyle:h,btnSettings:c,showLbl:_,showSubtitle:H,validateOnStepChange:A,stepHeaderSwitchable:z,maintainStepHistory:L,saveProgress:M,progressSettings:p}=O.multiStepSettings||{},a=(t,u)=>{N(r=>f(r,w=>{w.multiStepSettings[t]=u})),j(r=>b(v({},r),{unsaved:!0}))},g=(t,u)=>{N(r=>f(r,w=>{w.multiStepSettings.headerIcon[t]=u})),j(r=>b(v({},r),{unsaved:!0}))},x=(t,u)=>{N(r=>f(r,w=>{w.multiStepSettings.btnSettings[t]=u})),t==="position"&&P(r=>f(r,w=>{w.form[`._frm-b${o}-stp-cntnt`]["flex-direction"]=u})),j(r=>b(v({},r),{unsaved:!0}))},D=(t,u)=>{N(r=>f(r,w=>{w.multiStepSettings.progressSettings[t]=u})),j(r=>b(v({},r),{unsaved:!0}))};return e.jsxs("div",{className:s({m:20}),children:[e.jsxs("div",{className:s(y.section,y.flxColumn,y.fixed,T&&y.shw),children:[e.jsx(me,{size:"16",className:s(y.btn,$.fontBody)}),e.jsx("div",{className:s(y.mainTitle),children:d("Multisteps Settings")})]}),e.jsx(S,{}),e.jsxs("div",{className:s([$.flxcb,i.fieldSection]),children:[e.jsx("span",{className:s($.fw500),children:"Multistep Theme"}),e.jsxs("span",{className:s($.flxc),children:[e.jsx(ge,{id:"global-theme"}),e.jsx("select",{value:h,onChange:t=>a("themeStyle",t.target.value),className:s(Se.select),"data-testid":"field-sizes-select",children:Object.keys(K).map((t,u)=>e.jsx("option",{value:t,"data-testid":`step-style-${t}`,children:K[t]},`style-${u*5*2}`))})]})]}),e.jsx(S,{}),e.jsxs(C,b(v({id:"show-stp-header",title:d("Show Step Header"),className:s(i.fieldSection,i.hover_tip),switching:!0,tip:"By disabling this option, the Step Header will be hidden.",tipProps:{width:250,icnSize:17},toggleAction:t=>a("showStepHeader",t.target.checked),toggleChecked:k,open:k},q&&{disable:!k}),{isPro:!0,children:[e.jsx("div",{className:s(i.fieldSection),children:e.jsx(I,{id:"show-header-lbl",title:d("Show Header Label"),action:t=>a("showLbl",t.target.checked),isChecked:_||"",isPro:!0})}),e.jsx("div",{className:s(i.fieldSection),children:e.jsx(I,{id:"show-header-subtitle",title:d("Show Header Subtitle"),action:t=>a("showSubtitle",t.target.checked),isChecked:H||"",isPro:!0})})]})),e.jsx(S,{}),e.jsx(C,b(v({id:"show-hdr-icn",title:d("Show Header Icon"),className:s(i.fieldSection,i.hover_tip),switching:!0,tip:ue.showHeaderIcon,tipProps:{width:250,icnSize:17},toggleAction:t=>g("show",t.target.checked),toggleChecked:l==null?void 0:l.show,open:l==null?void 0:l.show},q&&{disable:!(l!=null&&l.show)}),{isPro:!0,children:e.jsx("div",{className:s(i.placeholder),children:e.jsxs("div",{className:s(i.fieldNumber),children:[e.jsx("span",{children:d("Icon Type:")}),e.jsx("select",{value:l==null?void 0:l.iconType,onChange:t=>g("iconType",t.target.value),className:s(i.input,i.w140),"data-testid":"hdr-icn-select",children:Object.keys(Q).map((t,u)=>e.jsx("option",{value:t,"data-testid":`icon-typ-${t}`,children:Q[t]},`icon-${u*5*2}`))})]})})})),e.jsx(S,{}),e.jsx(C,{id:"show-progress",title:d("Show Progress Bar"),className:s(i.fieldSection,i.hover_tip),switching:!0,tip:"By disabling this option, the Progress bar will be hidden.",tipProps:{width:250,icnSize:17},toggleAction:t=>D("show",t.target.checked),toggleChecked:p==null?void 0:p.show,open:p==null?void 0:p.show,disable:!(p!=null&&p.show),children:e.jsx("div",{className:s(i.fieldSection),children:e.jsx(I,{id:"show-pecentage",className:s($.mt2),title:d("Show Percentage"),action:t=>D("showPercentage",t.target.checked),isChecked:(p==null?void 0:p.showPercentage)||""})})}),e.jsx(S,{}),e.jsx(C,{id:"show-step-btn",title:d("Show Buttons"),className:s(i.fieldSection,i.hover_tip),switching:!0,tip:"By disabling this option, the Step Button will be hidden.",tipProps:{width:250,icnSize:17},toggleAction:t=>x("show",t.target.checked),toggleChecked:c==null?void 0:c.show,open:c==null?void 0:c.show,disable:!(c!=null&&c.show),children:e.jsx("div",{className:s({mx:5}),children:e.jsxs("div",{className:s(i.fieldNumber,{py:"0px !important"}),children:[e.jsx("span",{children:d("Button Position:")}),e.jsx("select",{"data-testid":"btn-posn-slct",className:s(i.input,i.w140),name:"",id:"",value:c==null?void 0:c.position,onChange:t=>x("position",t.target.value),children:we.map(t=>e.jsx("option",{value:t.value,children:t.name},`btcd-k-${t.name}`))})]})})}),e.jsx(S,{}),(c==null?void 0:c.show)&&e.jsxs(e.Fragment,{children:[e.jsx(G,{btnType:"prevBtn",btnName:"Previous",styleRoute:"prev-btn"}),e.jsx(G,{btnType:"nextBtn",btnName:"Next",styleRoute:"next-btn"})]}),e.jsx("div",{className:s(i.fieldSection),children:e.jsx(I,{id:"validate-step-change",tip:"Validate Field Input on step change",title:d("Validate on Step Change"),action:t=>a("validateOnStepChange",t.target.checked),isChecked:A||"",isPro:!0})}),e.jsx(S,{}),e.jsx("div",{className:s(i.fieldSection),children:e.jsx(I,{id:"step-header-switchable",tip:"Switch steps by clicking on step header icon & title",title:d("Step Header Switchable"),action:t=>a("stepHeaderSwitchable",t.target.checked),isChecked:z||"",isPro:!0})}),e.jsx(S,{}),e.jsx("div",{className:s(i.fieldSection),children:e.jsx(I,{id:"maintain-step-history",tip:"Step Flow History will be maintained when click on previous button",title:d("Maintain Step History"),action:t=>a("maintainStepHistory",t.target.checked),isChecked:L||"",isPro:!0})}),e.jsx(S,{}),e.jsx("div",{className:s(i.fieldSection),children:e.jsx(I,{id:"save-progress",tip:"User Input will be saved as draft when click on next button",title:d("Save Step Progress"),action:t=>a("saveProgress",t.target.checked),isChecked:M||"",isPro:!0})}),e.jsx(S,{})]})}const K={"style-0":"Default"},Q={icon:"Icon",number:"Number"},we=[{name:"Top",value:"column-reverse"},{name:"Bottom",value:"column"}];export{Je as default};
2