| 1 |
import{t as z,j as e,a as R,k as U,r as j,l as q,_ as r,B as J,aL as Q,M as v,aa as W,p as y,aU as x}from"./main-162.js";import{F as t}from"./bf-4-157.js";import{a as h}from"./bf-562-110.js";import{F as X,a as Y,S as Z,A as ee,b as te,H as ie,c as oe}from"./bf-947-93.js";import{R as se,E as ae}from"./bf-204-324.js";import{F as le}from"./bf-382-322.js";import{F as re}from"./bf-99-323.js";import{a as o,I as ne}from"./bf-630-188.js";import{O as ce}from"./bf-788-325.js";import{P as de}from"./bf-823-326.js";import{E as pe}from"./bf-170-327.js";import{S as g}from"./bf-243-83.js";import"./bf-442-111.js";import"./bf-917-73.js";import"./bf-432-112.js";import"./bf-746-113.js";/* empty css */import"./bf-40-156.js";import"./bf-644-69.js";import"./bf-348-191.js";import"./bf-399-118.js";import"./bf-361-122.js";import"./bf-174-145.js";import"./bf-97-75.js";import"./bf-298-76.js";import"./bf-582-127.js";import"./bf-734-115.js";import"./bf-379-125.js";import"./bf-217-124.js";import"./bf-954-155.js";import"./bf-875-77.js";import"./bf-553-107.js";import"./bf-424-108.js";import"./bf-974-109.js";import"./bf-207-114.js";import"./bf-741-81.js";import"./bf-819-116.js";import"./bf-76-117.js";import"./bf-608-71.js";const tt=()=>{const{fieldKey:l}=z();if(!l)return e.jsx(e.Fragment,{children:"No field exist with this field key"});const{css:s}=R(),[m,u]=U(W),[b,S]=j.useState(!1),[P,F]=j.useState(!1),[N,me]=j.useState(""),a=q(m[l]),C=a.adminLbl||"",{placeholderImage:ge,options:I}=a,{selectedFlagImage:O,selectedCountryClearable:B,searchClearable:k,optionFlagImage:w,detectCountryByIp:T,detectCountryByGeo:M,showSearchPh:f,searchPlaceholder:_,noCountryFoundText:E,inputFormat:H,valueFormat:D,maxHeight:ue}=a.config,L=i=>{i.target.checked?(a.config.searchPlaceholder="Search Country Here...",a.config.showSearchPh=!0):(a.config.searchPlaceholder="",a.config.showSearchPh=!1);const n=i.target.checked?"Show":"Hide",d=y(m,p=>{p[l]=a});u(d),x({event:`${n} Search Placeholder: ${a.lbl||C||l}`,type:"toggle_search_placeholder",state:{fields:d,fldKey:l}})};function $(i){a.config.searchPlaceholder=i.target.value;const n=y(m,d=>{d[l]=a});u(n),x({event:`Search Placeholder updated: ${a.lbl||C||l}`,type:"change_placeholder",state:{fields:n,fldKey:l}})}const G=()=>{S(!0)},A=()=>{S(!1)},K=i=>{const n=i.find(p=>p.check),d=y(m,p=>{p[l].options=i,p[l].config.defaultCountryKey=n?n.i:""});u(d),x({event:`Modify Options List: ${a.lbl||l}`,type:"options_modify",state:{fields:d,fldKey:l}})},c=(i,n,d)=>{a[d][n]=i;const p=y(m,V=>{V[l]=a});u(p),x({event:`${he[n]} '${String(i||"Off").replace("true","On")}': ${a.lbl||l}`,type:`${n}_changed`,state:{fields:p,fldKey:l}})};return window.selectedFieldData=a,e.jsxs(e.Fragment,{children:[e.jsx(X,{title:"Field Settings",subtitle:a.typ,fieldKey:l}),e.jsx(Y,{}),e.jsx(o,{}),e.jsx(Z,{}),e.jsx(o,{}),e.jsx(ee,{}),e.jsx(o,{}),e.jsx(te,{}),e.jsx(o,{}),e.jsx(de,{}),e.jsx(o,{}),e.jsx(ie,{}),e.jsx(o,{}),e.jsx(se,{}),e.jsx(o,{}),e.jsx(re,{}),e.jsx(o,{}),e.jsx(le,{}),e.jsx(o,{}),e.jsx(g,{id:"inp-frmt-opt-stng",title:r("Input Format Option"),className:s(t.fieldSection),isPro:!0,proProperty:"inputFormatOptions",children:e.jsx("div",{className:s(t.placeholder),children:e.jsx("input",{"data-testid":"inp-frmt-opt-inp","aria-label":"Input Format Option",placeholder:"Input Format(Ex: +c #### ### ###)",className:s(t.input),type:"text",value:H,onChange:i=>c(i.target.value,"inputFormat","config")})})}),e.jsx(o,{}),e.jsx(g,{id:"val-frmt-opt-stng",title:r("Value Format Option"),className:s(t.fieldSection),isPro:!0,proProperty:"valueFormatOptions",children:e.jsx("div",{className:s(t.placeholder),children:e.jsx("input",{"data-testid":"val-frmt-opt-inp","aria-label":"Value Format Option",placeholder:"Value Format(Ex: +c #### ### ###)",className:s(t.input),type:"text",value:D,onChange:i=>c(i.target.value,"valueFormat","config")})})}),e.jsx(o,{}),e.jsx(g,{id:"nmbr-stng",title:"Invalid Error Message:",className:s(t.fieldSection),children:e.jsx(ae,{id:"invalid-err-msg",type:"invalid",title:"Invalid Error Message",tipTitle:"By enabling this feature, user will see the error message when input value is Invalid"})}),e.jsx(o,{}),e.jsx(g,{id:"srch-plchldr-stng",title:r("Search Placeholder"),className:s(t.fieldSection,t.hover_tip),switching:!0,tip:"By disabling this option, the search placeholder text will be remove",tipProps:{width:250,icnSize:17},toggleAction:L,toggleChecked:f,open:f,disable:!f,isPro:!0,proProperty:"searchPlaceholder",children:e.jsx("div",{className:s(t.placeholder),children:e.jsx("input",{"data-testid":"srch-plchldr-stng-inp","aria-label":"Placeholer for Country Search",placeholder:"Type Placeholder here...",className:s(t.input),type:"text",value:_,onChange:$})})}),e.jsx(o,{}),e.jsx(g,{id:"cntry-nt-fund-stng",title:r("Country Not Found Text"),className:s(t.fieldSection),isPro:!0,proProperty:"countryNotFoundText",children:e.jsx("div",{className:s(t.placeholder),children:e.jsx("input",{"data-testid":"cntry-nt-fund-inp","aria-label":"Country Not Found Text",placeholder:"Type no country found text here...",className:s(t.input),type:"text",value:E,onChange:i=>c(i.target.value,"noCountryFoundText","config")})})}),e.jsx(o,{}),e.jsx(h,{id:"shw-slctd-img-stng",tip:"By disabling this option, the show selected flag image will be hidden",className:s(t.fieldSection,t.hover_tip,t.singleOption),title:r("Show Selected Flag Image"),action:i=>c(i.target.checked,"selectedFlagImage","config"),isChecked:O,isPro:!0,proProperty:"selectedOptImage"}),e.jsx(o,{}),e.jsx(h,{id:"slctd-clrbl-stng",tip:"By disabling this option, the selected country clearable button will be hidden",className:s(t.fieldSection,t.hover_tip,t.singleOption),title:r("Selected Country Clearable"),action:i=>c(i.target.checked,"selectedCountryClearable","config"),isChecked:B}),e.jsx(o,{}),e.jsx(h,{id:"srch-clrbl-stng",className:s(t.fieldSection,t.hover_tip,t.singleOption),tip:"By disabling this option, the selected country search clearable button will be hidden",title:r("Search Clearable"),action:i=>c(i.target.checked,"searchClearable","config"),isChecked:k}),e.jsx(o,{}),e.jsx(h,{id:"opt-icn-stng",className:s(t.fieldSection,t.hover_tip,t.singleOption),tip:"By disabling this option, the option flags image will be hidden",title:r("Option Flag Image"),action:i=>c(i.target.checked,"optionFlagImage","config"),isChecked:w,isPro:!0,proProperty:"optionFlagImage"}),e.jsx(o,{}),e.jsx(h,{id:"dtct-cntry-by-ip-stng",className:s(t.fieldSection,t.hover_tip,t.singleOption),tip:"By disabling this option, are not detect county by ip",title:r("Detect Country By IP"),action:i=>c(i.target.checked,"detectCountryByIp","config"),isChecked:T||!1,isPro:!0,proProperty:"detectCountryByIp"}),e.jsx(o,{}),e.jsx(h,{id:"dtct-cntry-by-geo-stng",className:s(t.fieldSection,t.hover_tip,t.singleOption),tip:"By disabling this option, are not detect county by Geo location",title:r("Detect Country By Geo"),action:i=>c(i.target.checked,"detectCountryByGeo","config"),isChecked:M||!1,isPro:!0,proProperty:"detectCountryByGeo"}),e.jsx(o,{}),e.jsx(o,{}),e.jsx(oe,{}),e.jsx(o,{}),e.jsx(ce,{}),e.jsx(o,{}),e.jsx("div",{className:s(t.fieldSection),children:e.jsxs(J,{dataTestId:"edt-opt-stng",variant:"primary-outline",size:"sm",className:s({mt:10}),onClick:G,children:[r("Edit Options"),e.jsx("span",{className:s({ml:3,mt:3,tm:"rotate(45deg)"}),children:e.jsx(Q,{size:"13",stroke:"3"})})]})}),e.jsx(o,{}),e.jsx(v,{md:!0,autoHeight:!0,show:b,setModal:A,className:"o-v",title:r("Options 2"),width:"730px",children:e.jsx("div",{className:"pos-rel",children:e.jsx(pe,{optionMdl:b,options:I,setOptions:i=>K(i),lblKey:"lbl",valKey:"val",type:"radio",onlyVisualOptionsTab:!0,hideNDisabledOptions:!0})})}),e.jsxs(v,{md:!0,autoHeight:!0,show:P,setModal:F,className:"o-v",title:"Image",children:[e.jsx("div",{className:"pos-rel"}),e.jsx(ne,{iconType:N,selected:"Upload Image",uploadLbl:"Upload Image",setModal:F,addPaddingOnSelect:!1})]})]})},he={inputFormat:"Input Formate Changed to",valueFormat:"Value Formate Changed to",noCountryFoundText:"Country Not Found Text",selectedFlagImage:"Selected Flag Image",selectedCountryClearable:"Selected Country Clearable",searchClearable:"Search Clearable",optionFlagImage:"Option Flag Image",detectCountryByIp:"Detect Country By IP",detectCountryByGeo:"Detect Country By Geo"};export{tt as default}; |