1import b from"./TmlSegmentedSelect.616b4c13.js";import x from"./TmlFilterable.63d89cc9.js";import O from"./TmlSearchable.e5678453.js";import D from"./TmlTag.d83dee31.js";import{f as j}from"./faCheck.9ed344bd.js";import{N as k,_ as F,D as s,W as f,U as C,$ as h,E as o,a1 as S,G as p,Q as c,F as N,a2 as T,H as B,a9 as _,S as w,a0 as q,V as K,O as P,P as z}from"./vue.00f7c436.js";import{_ as A}from"./index.474d7b13.js";import"./sentry.09480738.js";const L={name:"EmulateNativeDropdown",components:{TmlSegmentedSelect:b,TmlFilterable:x,TmlSearchable:O,TmlTag:D},props:{value:{type:Array,required:!1},options:{type:Array,required:!0},multiselect:{type:Boolean,required:!1},displayField:{type:String,required:!1}},data(){return{faCheck:j.faCheck,inputValue:[]}},watch:{value:{immediate:!0,handler(e){e&&e.length&&(this.inputValue=e)}}},methods:{onClickContainer(e){e.target.classList.contains("emulator-container")?this.$emit("close"):e.preventClose=!0},onEmulateSelect(e){this.$emit("select",e),this.$emit("close")},isOptionSelected(e){return!!this.inputValue.find(i=>i.value===e.value)}}},U=["aria-label","aria-multiselectable"],G={key:0,class:"option flex justify-start items-center w-full cursor-pointer"},H=["id","aria-selected","onClick","onKeydown"],M={class:"flex justify-between items-center w-full"},Q={class:"option-text"},R={key:1,class:"option flex justify-start items-center w-full cursor-pointer"};function W(e,i,a,I,u,t){const g=k("font-awesome-icon"),E=k("tml-segmented-select"),y=F("tml-touch-mouse");return s(),f(E,{modelValue:u.inputValue,"onUpdate:modelValue":i[3]||(i[3]=m=>u.inputValue=m),items:a.options,multiselect:a.multiselect,identifier:"value"},{default:C(({selected:m,select:n,deselect:r,allItems:v,allSelected:J,clear:X})=>[h((s(),o("div",{class:"flex justify-center items-center emulator-container",role:"dialog","aria-modal":"true","aria-label":"Select option",onClick:i[2]||(i[2]=(...l)=>t.onClickContainer&&t.onClickContainer(...l))},[h((s(),o("div",{class:"options-container flex-col items-center justify-center w-full",role:"listbox","aria-label":`${a.displayField||"Options"} list`,"aria-multiselectable":a.multiselect,onClick:i[1]||(i[1]=S((...l)=>t.onClickContainer&&t.onClickContainer(...l),["stop"]))},[e.$slots["prepend-option-custom"]?(s(),o("div",G,[p(e.$slots,"prepend-option-custom",{},void 0,!0)])):c("",!0),p(e.$slots,"default",P(z({selected:m,isSelected:t.isOptionSelected,select:n,deselect:r,allItems:v,onEmulateSelect:t.onEmulateSelect})),()=>[(s(!0),o(N,null,T(v,(l,V)=>(s(),o("div",{id:`emulator_option_${V}`,key:l.uid,class:B(["option flex items-center justify-start w-full",{"item-selected":t.isOptionSelected(l)}]),role:"option","aria-selected":t.isOptionSelected(l),onClick:S(d=>t.onEmulateSelect(l,n,r),["stop"]),onKeydown:[_(d=>t.onEmulateSelect(l,n,r),["enter"]),_(d=>t.onEmulateSelect(l,n,r),["space"]),i[0]||(i[0]=_(d=>e.$emit("close"),["escape"]))]},[w("div",M,[w("p",Q,q(l[a.displayField]),1),a.multiselect?(s(),f(K,{key:0,name:"fade"},{default:C(()=>[t.isOptionSelected(l)?(s(),f(g,{key:0,class:"check-icon light-text-color",icon:u.faCheck,"aria-hidden":"true"},null,8,["icon"])):c("",!0)]),_:2},1024)):c("",!0)])],42,H))),128))],!0),e.$slots["append-option-custom"]?(s(),o("div",R,[p(e.$slots,"append-option-custom",{},void 0,!0)])):c("",!0)],8,U)),[[y]])])),[[y]])]),_:3},8,["modelValue","items","multiselect"])}const ae=A(L,[["render",W],["__scopeId","data-v-579ca248"]]);export{ae as default}; 2//# sourceMappingURL=EmulateNativeDropdown.10d03c2c.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.