PageSourceSearch

https://timberflow.org.br/js/3515.2559f72c.js

js timberflow.org.br collected 2026-10-08 07:07:45 UTC 3,376 bytes, 2 lines download raw bytes

1"use strict";(self["webpackChunk"]=self["webpackChunk"]||[]).push([[3515],{4908:function(t,e,i){i.d(e,{K:function(){return s}});var n=i(6768);function s(t,e,i="modelValue"){return(0,n.EW)({get:()=>t[i],set:t=>e(`update:${i}`,t)})}},84:function(t,e){e.A={props:{searchType:Object,placeholder:String,refreshApi:{required:!1}},data(){return{options:[],isLoading:!1}},mounted(){this.loadData()},computed:{myPlaceholder(){return this.isLoading?"Carregando...":this.placeholder},myOptions(){return this.isLoading?[]:this.options}},methods:{onSelect(){this.$emit("onselected",this.selected)},tagRemoved(t){this.$emit("ondeselected",t)},getApi(){return null},loadData(){const t=this;this.searchType instanceof Object&&this.getApi().getAll(e=>{t.options=e},e=>{t.isLoading=e})}}}},3515:function(t,e,i){i.r(e),i.d(e,{default:function(){return g}});var n=i(6768),s=i(4232);const o={class:"sub-tit mb-1"},l={class:"pagination"},a=["disabled"],r=["disabled"];function u(t,e,i,u,c,d){const h=(0,n.g2)("v-select");return(0,n.uX)(),(0,n.CE)("span",null,[(0,n.Lk)("p",o,(0,s.v_)(i.label),1),(0,n.bF)(h,{options:d.paginatedOptions,label:"nome",inputId:"cd_mun",placeholder:t.myPlaceholder,"onOption:selected":t.onSelect,filterable:!1,onSearch:d.onSearch,modelValue:u.inputValue,"onUpdate:modelValue":e[2]||(e[2]=t=>u.inputValue=t),reduce:t=>t.cd_mun.toString(),class:"form-control form-control-sm"},{"list-footer":(0,n.k6)(()=>[(0,n.Lk)("li",l,[(0,n.Lk)("button",{disabled:!d.hasPrevPage,onClick:e[0]||(e[0]=e=>t.offset-=t.limit)},"Anterior",8,a),(0,n.Lk)("button",{disabled:!d.hasNextPage,onClick:e[1]||(e[1]=e=>t.offset+=t.limit)},"Próximo",8,r)])]),"no-options":(0,n.k6)(()=>[...e[3]||(e[3]=[(0,n.eW)(" Nenhum resultado encontrado ",-1)])]),_:1},8,["options","placeholder","onOption:selected","onSearch","modelValue","reduce"])])}i(4423),i(8111),i(2489),i(116),i(7588),i(1701);var c=i(961),d=i(84),h=i(4908),p={name:"CitiesSelectAll",components:{vSelect:c.A},mixins:[d.A],props:["label","modelValue"],data:()=>({search:"",offset:0,limit:10}),mounted(){this.getAllCities()},setup(t,{emit:e}){return{inputValue:(0,h.K)(t,e,"modelValue")}},computed:{filtered(){if(!this.isLoading){const t=t=>t.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLocaleLowerCase();return this.myOptions.filter(e=>t(e.nome).includes(t(this.search)))}return[]},paginated(){return this.filtered.slice(this.offset,this.limit+this.offset)},selectedOptions(){if(void 0===this.inputValue||null===this.inputValue||""===this.inputValue)return[];if(Array.isArray(this.inputValue)){const t=this.inputValue.map(t=>t.toString());return this.myOptions.filter(e=>t.includes(e.cd_mun.toString()))}const t=this.myOptions.find(t=>t.cd_mun.toString()===this.inputValue.toString());return t?[t]:[]},paginatedOptions(){const t=[...this.paginated];return this.selectedOptions.forEach(e=>{t.some(t=>t.cd_mun===e.cd_mun)||t.unshift(e)}),t},hasNextPage(){const t=this.offset+this.limit;return Boolean(this.filtered.slice(t,this.limit+t).length)},hasPrevPage(){const t=this.offset-this.limit;return Boolean(this.filtered.slice(t,this.limit+t).length)}},methods:{getAllCities:function(){var t=this;this.$timberApi.Cities.getAll(e=>{t.options=e},e=>{t.isLoading=e})},onSearch(t){this.search=t,this.offset=0}}},m=i(1241);const f=(0,m.A)(p,[["render",u],["__scopeId","data-v-1a176660"]]);var g=f}}]);
2//# sourceMappingURL=3515.2559f72c.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.