1import{f as D}from"./faRobot.0ec1497f.js";import{d}from"./debounce.0797fc26.js";import G from"./TmlFilterable.caa2232e.js";import V from"./TmlSearchable.ffba3206.js";import{_ as q,A as x,ba as C,bk as E}from"./index.fb0271dc.js";import P from"./TmlInput.a90f9ea6.js";import Q from"./TmlMessage.eadcf36a.js";import{N as o,D as m,E as _,f as a,U as r,S as Y,G as l,F as j,a2 as v,W as b,Q as w,a4 as h}from"./vue.e6b86939.js";import"./sentry.09480738.js";import"./faCheck.242f77a8.js";import"./faTimes.4b986c16.js";import"./faPlus.c9b9b0f5.js";import"./faMinus.7126d943.js";import"./faArrowRight.d999735f.js";import"./faUndo.47da11f6.js";const L={name:"TmlSearchableGrid",components:{TmlFilterable:G,TmlSearchable:V,TmlForm:x,TmlInput:P,TmlLoader:C,TmlGrid:E,TmlMessage:Q},props:{items:{type:Array},filterQuery:{type:Function,default:e=>new Promise(t=>t(e))},searchableProperties:{type:Object,required:!0},gridBreakpoints:{type:Object,default:()=>({xs:1,sm:2,lg:3})},searchAsYouType:{type:Boolean,default:!1}},data(){return{faRobot:D.faRobot,onDebounceInput:()=>{}}},created(){this.onDebounceInput=d(this.onInput,250,{trailing:!0})},methods:{debounce:d,onSubmit(e,t){this.searchAsYouType||e(t)},onInput(e,t){this.searchAsYouType&&t!==!1&&e(t)}}},O={class:"tml-searchable-grid h-full"},M=h(" No results found. Try searching for something else "),U=h(" No results found. ");function W(e,t,s,z,i,g){const y=o("tml-input"),T=o("tml-form"),k=o("tml-grid"),S=o("tml-loader"),p=o("tml-message"),I=o("tml-searchable"),B=o("tml-filterable");return m(),_("div",O,[a(B,{items:s.items,"filter-query":s.filterQuery},{default:r(({filter:H,filtered:c})=>[a(I,{items:c,"searchable-properties":s.searchableProperties},{default:r(({search:u,searched:N,searchTerm:f,searching:A,noResults:F})=>[Y("div",null,[a(T,{"form-name":"searchable-grid"},{default:r(()=>[a(y,{"field-name":"searchable-grid-input",placeholder:"Search",onSubmit:n=>g.onSubmit(u,n),onInput:n=>i.onDebounceInput(u,n)},null,8,["onSubmit","onInput"])]),_:2},1024),a(S,{loading:A},{default:r(()=>[a(k,{breakpoints:s.gridBreakpoints},{default:r(()=>[l(e.$slots,"prepend"),(m(!0),_(j,null,v(f?N:c,(n,R)=>l(e.$slots,"default",{item:n,index:R})),256)),l(e.$slots,"append")]),_:2},1032,["breakpoints"])]),_:2},1032,["loading"]),f&&F?(m(),b(p,{key:0,icon:i.faRobot},{default:r(()=>[l(e.$slots,"empty-search",{},()=>[M])]),_:3},8,["icon"])):s.items&&s.items.length&&!c.length?(m(),b(p,{key:1,icon:i.faRobot},{default:r(()=>[l(e.$slots,"empty-filter",{},()=>[U])]),_:3},8,["icon"])):w("",!0)])]),_:2},1032,["items","searchable-properties"])]),_:3},8,["items","filter-query"])])}const ce=q(L,[["render",W]]);export{ce as default}; 2//# sourceMappingURL=TmlSearchableGrid.5731db47.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.