@opengis/bi 1.0.49 → 1.0.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bi.js CHANGED
@@ -1,4 +1,4 @@
1
- import { l as f } from "./import-file-0V4hdOl6.js";
1
+ import { l as f } from "./import-file-MuPNIOS3.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/dist/bi.umd.cjs CHANGED
@@ -750,7 +750,7 @@ uniform ${K} ${J} u_${ae};
750
750
  <span class="font-medium mr-[6px]">Значення</span>
751
751
  </span>
752
752
  <span>${(n==null?void 0:n.metric)||0}</span>
753
- </div>`;const i=this.map.project(r.lngLat);this.popupElement.style.left=`${i.x}px`,this.popupElement.style.top=`${i.y-60}px`,this.map.getContainer().appendChild(this.popupElement)}catch(t){console.error(t)}}}}],name:"VsMap",async mounted(){await this.getMapData(),await this.createMap()},methods:{async getMapData(){const e=await(await fetch(`/api/bi-map?widget=${this.widget}&dashboard=${this.dashboard}`)).json();this.data=e},async loadHandler(){const r=["#69D2E7","yellow","#FE4365"],e=this.data.colors?["match",["get","x"]].concat(this.data.colors.reduce((a,o,s)=>a.concat(o.val,(o==null?void 0:o.color)||r[s]),[])).concat(["gray"]):"blue",t=[5,7,9,11,13],n=this.data.sizes?["case"]:5;this.data.sizes&&(this.data.sizes.reverse().forEach((a,o)=>{n.push([">",["get","metric"],a]),n.push(t[o])}),n.push(5));const i={type:"circle",color:e,width:2,radius:n,stroke:"#eee"};Object.assign(i,this.data.style||{}),this.addVtileLayer({id:"bi",url:`${window.top.location.origin}/api/bi-vtile/{z}/{x}/{y}.vmt?widget=${this.widget}&dashboard=${this.dashboard}&nocache=1`,style:i})}}},cme=["id"],ume=["id"],hme={class:"absolute flex flex-col right-[10px] top-[105px] gap-1"};function dme(r,e,t,n,i,a){var d,f,g;const o=P.resolveComponent("VsMapSetting"),s=P.resolveComponent("VsMapSlotLayers"),l=P.resolveComponent("VsMapLegend"),c=P.resolveComponent("VsMapGoHome");return P.openBlock(),P.createElementBlock("div",{class:"relative w-full h-full",id:`wrapper-${r.mapId}`},[P.createElementVNode("div",{id:r.mapId,class:"w-full flex items-end relative h-[250px]"},null,8,ume),r.showSetting?(P.openBlock(),P.createBlock(o,{key:0,map:r.map,coordinates:r.coordinatesByMouse},null,8,["map","coordinates"])):P.createCommentVNode("",!0),P.createVNode(s,{map:r.map},null,8,["map"]),P.createElementVNode("div",hme,[P.createVNode(l,{mapId:r.mapId,colors:(d=r.data)==null?void 0:d.colors,sizes:(f=r.data)==null?void 0:f.sizes,color:r.color,resizeItem:"true"},null,8,["mapId","colors","sizes","color"]),P.createVNode(c,{map:r.map,bbox:(g=r.data)==null?void 0:g.bounds},null,8,["map","bbox"])])],8,cme)}const fme=Object.freeze(Object.defineProperty({__proto__:null,default:ur(lme,[["render",dme]])},Symbol.toStringTag,{value:"Module"})),pme={components:{legendIcon:sA,closeIcon:lC},props:{mapId:{type:String},colors:{type:Array},sizes:{type:Array,default:()=>[]},cluster:{type:[Boolean,String]},color:{type:String,default:"gray"},colorTitle:{type:String},sizesTitle:{type:String},resizeItem:{type:[Boolean,String],default:!1},changeOpacityItem:{type:[Boolean,String],default:!1}},data(){return{isOpenLegend:!1,palette:lA}},computed:{borderRadius(){return this.cluster?"rounded-sm":"rounded-full"},sortedSizes(){return[...this.sizes].sort((r,e)=>r-e)},maxWidht(){var t;const r=((t=this.sizes)==null?void 0:t.length)-1;return this.calcSize(r)}},methods:{sizeClass(r){return this.resizeItem?`h-[${this.calcSize(r)}] w-[${this.calcSize(r)}] ${this.borderRadius}`:`h-[10px] ${this.borderRadius}`},calcSize(r){return`${10+r*2}px`},getOpacity(r){return(r+1)/this.sortedSizes.length}}},gme={key:0,class:"absolute flex items-end w-fit bottom-[10px] max-w-[80%] left-[50%] translate-x-[-50%] bg-[rgba(255,255,255,0.7)] p-[10px] rounded"},vme={class:"w-[80px] mr-[10px]"},mme=["title"],yme={class:"text-[10px] mb-[2px] text-[#1F2937] font-normal leading-[1.2]"};function _me(r,e,t,n,i,a){var o;return(o=t.sizes)!=null&&o.length?(P.openBlock(),P.createElementBlock("div",gme,[P.createElementVNode("div",vme,[e[0]||(e[0]=P.createElementVNode("p",{class:"text-[10px] mb-[2px] text-[#1F2937] leading-[1.2]"}," Дані відсутні ",-1)),P.createElementVNode("div",{class:P.normalizeClass([a.sizeClass(r.index),"w-full border border-gray-500"])},null,2)]),a.sortedSizes.length?(P.openBlock(!0),P.createElementBlock(P.Fragment,{key:0},P.renderList(a.sortedSizes,(s,l)=>{var c,d,f,g,m,_,x,w;return P.openBlock(),P.createElementBlock("div",{class:"w-[80px]",title:l===((c=a.sortedSizes)==null?void 0:c.length)-1?">"+s:l==((d=a.sortedSizes)==null?void 0:d.length)-1?">"+a.sortedSizes[((f=a.sortedSizes)==null?void 0:f.length)-1]:s+"-"+a.sortedSizes[l+1]},[P.createElementVNode("p",yme,P.toDisplayString(l===((g=a.sortedSizes)==null?void 0:g.length)-1?">"+parseInt(s):l==((m=a.sortedSizes)==null?void 0:m.length)-1?">"+parseInt(a.sortedSizes[((_=a.sortedSizes)==null?void 0:_.length)-1]):parseInt(s)+"-"+parseInt(a.sortedSizes[l+1])),1),P.createElementVNode("div",{class:P.normalizeClass([a.sizeClass(l),"w-full border border-r-0 border-gray-500"]),style:P.normalizeStyle({backgroundColor:((w=(x=i.palette)==null?void 0:x[t.color])==null?void 0:w[l])||t.color})},null,6)],8,mme)}),256)):P.createCommentVNode("",!0)])):P.createCommentVNode("",!0)}const bme=ur(pme,[["render",_me]]),xme={},wme={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-map"};function Sme(r,e){return P.openBlock(),P.createElementBlock("svg",wme,e[0]||(e[0]=[P.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),P.createElementVNode("path",{d:"M3 7l6 -3l6 3l6 -3v13l-6 3l-6 -3l-6 3v-13"},null,-1),P.createElementVNode("path",{d:"M9 4v13"},null,-1),P.createElementVNode("path",{d:"M15 7v13"},null,-1)]))}const Tme=ur(xme,[["render",Sme]]),Eme={mixins:[Ea,oA],components:{VsMapSetting:F$,VsClusterLegend:bme,VsMapGoHome:G$,VsList:U$,VsMapSlotLayers:$$,VsBar:q0},data(){return{baseColor:"pink",kattotg:"",options:[{id:"map",text:"Карта",component:Tme},{id:"table",text:"Таблиця",component:mC},{id:"chart",text:"Віджет",component:R$}],activeTab:"map",mapId:`map-${Math.floor(Math.random()*1e3)}`,layerId:`layer${Math.floor(Math.random()*1e3)}`,map:null,hoverData:null,data:null,coordinatesByMouse:[],showSetting:!1,popup:null,color:"#69D2E7",label:"<div><icon-map/></div>"}},async mounted(){await this.getMapData(),await this.createMap()},watch:{kattotg(){this.loadHandler()}},methods:{async getMapData(){const r=await yr.get(`/bi-cluster?widget=${this.widget}&dashboard=${this.dashboard}`);this.data=r.data,this.$emit("update:widgetData",this.data),setTimeout(()=>{var e;return(e=this.map)==null?void 0:e.resize()})},async loadHandler(){var n,i,a,o;this.baseColor=((n=this.data.style)==null?void 0:n.color)||"blue";const r=["case"];(o=(a=(i=this.data)==null?void 0:i.sizes)==null?void 0:a.toReversed())==null||o.forEach((s,l)=>{var c,d;r.push([">",["get","metric"],s]),r.push((d=(c=lA[this.baseColor])==null?void 0:c.toReversed())==null?void 0:d[l]),l++}),r.push("gray");const e={type:"polygon",color:r,opacity:.4};Object.assign(e,this.data.style||{}),this.map.getSource("bi")||this.addVtileLayer({id:"bi",url:`${window.location.origin}/api/bi-cluster-vtile/{z}/{x}/{y}.vmt?widget=${this.widget}&dashboard=${this.dashboard}&nocache=1`,style:e}),this.map.getLayer("highlighted")&&this.map.removeLayer("highlighted"),this.map.getSource("highlighted")&&this.map.removeSource("highlighted");const t=["case"];this.kattotg&&t.push(["==",["to-string",["get","name"]],String(this.kattotg)],"red"),t.push("transparent"),this.map.addLayer({id:"highlighted",type:"fill",source:"bi","source-layer":"bi",paint:{"fill-color":t,"fill-opacity":.6}})},async createMap(){const r={version:8,glyphs:"https://cdn.softpro.ua/data/fonts/{fontstack}/{range}.pbf",sources:{},layers:[]};this.map=await new rb.Map({container:this.mapId,style:r,center:[31,48.5],zoom:5,minZoom:3,maxZoom:20,attributionControl:!1}),this.map.addControl(new rb.NavigationControl({visualizePitch:!0})),this.map.on("load",()=>{this.loadHandler()}),this.map.on("mousemove",e=>{this.moveMouseHadler(e)}),this.map.on("mouseout",()=>{var e;this.showLegend=!1,this.showSetting=!1,this.coordinatesByMouse=0,(e=this.popup)==null||e.remove()})},moveMouseHadler(r){var e;try{const t=this.map.queryRenderedFeatures(r.point),n=((e=t[0])==null?void 0:e.properties)||{};if(!t.length){this.map.getCanvas().style.cursor="",this.popupElement&&this.popupElement.remove();return}this.map.getCanvas().style.cursor="pointer",this.popupElement&&this.popupElement.remove(),this.popupElement=document.createElement("div"),this.popupElement.className="absolute text-gray-800 border border-gray-200 rounded-lg shadow-md min-w-28",this.popupElement.style.backgroundColor="rgba(255, 255, 255, 0.7)",this.popupElement.innerHTML=`<div class="px-2 py-1 text-sm font-semibold text-gray-800 border-b border-gray-200 border-solid rounded-t-lg">
753
+ </div>`;const i=this.map.project(r.lngLat);this.popupElement.style.left=`${i.x}px`,this.popupElement.style.top=`${i.y-60}px`,this.map.getContainer().appendChild(this.popupElement)}catch(t){console.error(t)}}}}],name:"VsMap",async mounted(){await this.getMapData(),await this.createMap()},methods:{async getMapData(){const e=await(await fetch(`/api/bi-map?widget=${this.widget}&dashboard=${this.dashboard}`)).json();this.data=e},async loadHandler(){const r=["#69D2E7","yellow","#FE4365"],e=this.data.colors?["match",["get","x"]].concat(this.data.colors.reduce((a,o,s)=>a.concat(o.val,(o==null?void 0:o.color)||r[s]),[])).concat(["gray"]):"blue",t=[5,7,9,11,13],n=this.data.sizes?["case"]:5;this.data.sizes&&(this.data.sizes.reverse().forEach((a,o)=>{n.push([">",["get","metric"],a]),n.push(t[o])}),n.push(5));const i={type:"circle",color:e,width:2,radius:n,stroke:"#eee"};Object.assign(i,this.data.style||{}),this.addVtileLayer({id:"bi",url:`${window.top.location.origin}/api/bi-vtile/{z}/{x}/{y}.vmt?widget=${this.widget}&dashboard=${this.dashboard}&nocache=1`,style:i})}}},cme=["id"],ume=["id"],hme={class:"absolute flex flex-col right-[10px] top-[105px] gap-1"};function dme(r,e,t,n,i,a){var d,f,g;const o=P.resolveComponent("VsMapSetting"),s=P.resolveComponent("VsMapSlotLayers"),l=P.resolveComponent("VsMapLegend"),c=P.resolveComponent("VsMapGoHome");return P.openBlock(),P.createElementBlock("div",{class:"relative w-full h-full",id:`wrapper-${r.mapId}`},[P.createElementVNode("div",{id:r.mapId,class:"w-full flex items-end relative h-full min-h-[250px]"},null,8,ume),r.showSetting?(P.openBlock(),P.createBlock(o,{key:0,map:r.map,coordinates:r.coordinatesByMouse},null,8,["map","coordinates"])):P.createCommentVNode("",!0),P.createVNode(s,{map:r.map},null,8,["map"]),P.createElementVNode("div",hme,[P.createVNode(l,{mapId:r.mapId,colors:(d=r.data)==null?void 0:d.colors,sizes:(f=r.data)==null?void 0:f.sizes,color:r.color,resizeItem:"true"},null,8,["mapId","colors","sizes","color"]),P.createVNode(c,{map:r.map,bbox:(g=r.data)==null?void 0:g.bounds},null,8,["map","bbox"])])],8,cme)}const fme=Object.freeze(Object.defineProperty({__proto__:null,default:ur(lme,[["render",dme]])},Symbol.toStringTag,{value:"Module"})),pme={components:{legendIcon:sA,closeIcon:lC},props:{mapId:{type:String},colors:{type:Array},sizes:{type:Array,default:()=>[]},cluster:{type:[Boolean,String]},color:{type:String,default:"gray"},colorTitle:{type:String},sizesTitle:{type:String},resizeItem:{type:[Boolean,String],default:!1},changeOpacityItem:{type:[Boolean,String],default:!1}},data(){return{isOpenLegend:!1,palette:lA}},computed:{borderRadius(){return this.cluster?"rounded-sm":"rounded-full"},sortedSizes(){return[...this.sizes].sort((r,e)=>r-e)},maxWidht(){var t;const r=((t=this.sizes)==null?void 0:t.length)-1;return this.calcSize(r)}},methods:{sizeClass(r){return this.resizeItem?`h-[${this.calcSize(r)}] w-[${this.calcSize(r)}] ${this.borderRadius}`:`h-[10px] ${this.borderRadius}`},calcSize(r){return`${10+r*2}px`},getOpacity(r){return(r+1)/this.sortedSizes.length}}},gme={key:0,class:"absolute flex items-end w-fit bottom-[10px] max-w-[80%] left-[50%] translate-x-[-50%] bg-[rgba(255,255,255,0.7)] p-[10px] rounded"},vme={class:"w-[80px] mr-[10px]"},mme=["title"],yme={class:"text-[10px] mb-[2px] text-[#1F2937] font-normal leading-[1.2]"};function _me(r,e,t,n,i,a){var o;return(o=t.sizes)!=null&&o.length?(P.openBlock(),P.createElementBlock("div",gme,[P.createElementVNode("div",vme,[e[0]||(e[0]=P.createElementVNode("p",{class:"text-[10px] mb-[2px] text-[#1F2937] leading-[1.2]"}," Дані відсутні ",-1)),P.createElementVNode("div",{class:P.normalizeClass([a.sizeClass(r.index),"w-full border border-gray-500"])},null,2)]),a.sortedSizes.length?(P.openBlock(!0),P.createElementBlock(P.Fragment,{key:0},P.renderList(a.sortedSizes,(s,l)=>{var c,d,f,g,m,_,x,w;return P.openBlock(),P.createElementBlock("div",{class:"w-[80px]",title:l===((c=a.sortedSizes)==null?void 0:c.length)-1?">"+s:l==((d=a.sortedSizes)==null?void 0:d.length)-1?">"+a.sortedSizes[((f=a.sortedSizes)==null?void 0:f.length)-1]:s+"-"+a.sortedSizes[l+1]},[P.createElementVNode("p",yme,P.toDisplayString(l===((g=a.sortedSizes)==null?void 0:g.length)-1?">"+parseInt(s):l==((m=a.sortedSizes)==null?void 0:m.length)-1?">"+parseInt(a.sortedSizes[((_=a.sortedSizes)==null?void 0:_.length)-1]):parseInt(s)+"-"+parseInt(a.sortedSizes[l+1])),1),P.createElementVNode("div",{class:P.normalizeClass([a.sizeClass(l),"w-full border border-r-0 border-gray-500"]),style:P.normalizeStyle({backgroundColor:((w=(x=i.palette)==null?void 0:x[t.color])==null?void 0:w[l])||t.color})},null,6)],8,mme)}),256)):P.createCommentVNode("",!0)])):P.createCommentVNode("",!0)}const bme=ur(pme,[["render",_me]]),xme={},wme={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-map"};function Sme(r,e){return P.openBlock(),P.createElementBlock("svg",wme,e[0]||(e[0]=[P.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),P.createElementVNode("path",{d:"M3 7l6 -3l6 3l6 -3v13l-6 3l-6 -3l-6 3v-13"},null,-1),P.createElementVNode("path",{d:"M9 4v13"},null,-1),P.createElementVNode("path",{d:"M15 7v13"},null,-1)]))}const Tme=ur(xme,[["render",Sme]]),Eme={mixins:[Ea,oA],components:{VsMapSetting:F$,VsClusterLegend:bme,VsMapGoHome:G$,VsList:U$,VsMapSlotLayers:$$,VsBar:q0},data(){return{baseColor:"pink",kattotg:"",options:[{id:"map",text:"Карта",component:Tme},{id:"table",text:"Таблиця",component:mC},{id:"chart",text:"Віджет",component:R$}],activeTab:"map",mapId:`map-${Math.floor(Math.random()*1e3)}`,layerId:`layer${Math.floor(Math.random()*1e3)}`,map:null,hoverData:null,data:null,coordinatesByMouse:[],showSetting:!1,popup:null,color:"#69D2E7",label:"<div><icon-map/></div>"}},async mounted(){await this.getMapData(),await this.createMap()},watch:{kattotg(){this.loadHandler()}},methods:{async getMapData(){const r=await yr.get(`/bi-cluster?widget=${this.widget}&dashboard=${this.dashboard}`);this.data=r.data,this.$emit("update:widgetData",this.data),setTimeout(()=>{var e;return(e=this.map)==null?void 0:e.resize()})},async loadHandler(){var n,i,a,o;this.baseColor=((n=this.data.style)==null?void 0:n.color)||"blue";const r=["case"];(o=(a=(i=this.data)==null?void 0:i.sizes)==null?void 0:a.toReversed())==null||o.forEach((s,l)=>{var c,d;r.push([">",["get","metric"],s]),r.push((d=(c=lA[this.baseColor])==null?void 0:c.toReversed())==null?void 0:d[l]),l++}),r.push("gray");const e={type:"polygon",color:r,opacity:.4};Object.assign(e,this.data.style||{}),this.map.getSource("bi")||this.addVtileLayer({id:"bi",url:`${window.location.origin}/api/bi-cluster-vtile/{z}/{x}/{y}.vmt?widget=${this.widget}&dashboard=${this.dashboard}&nocache=1`,style:e}),this.map.getLayer("highlighted")&&this.map.removeLayer("highlighted"),this.map.getSource("highlighted")&&this.map.removeSource("highlighted");const t=["case"];this.kattotg&&t.push(["==",["to-string",["get","name"]],String(this.kattotg)],"red"),t.push("transparent"),this.map.addLayer({id:"highlighted",type:"fill",source:"bi","source-layer":"bi",paint:{"fill-color":t,"fill-opacity":.6}})},async createMap(){const r={version:8,glyphs:"https://cdn.softpro.ua/data/fonts/{fontstack}/{range}.pbf",sources:{},layers:[]};this.map=await new rb.Map({container:this.mapId,style:r,center:[31,48.5],zoom:5,minZoom:3,maxZoom:20,attributionControl:!1}),this.map.addControl(new rb.NavigationControl({visualizePitch:!0})),this.map.on("load",()=>{this.loadHandler()}),this.map.on("mousemove",e=>{this.moveMouseHadler(e)}),this.map.on("mouseout",()=>{var e;this.showLegend=!1,this.showSetting=!1,this.coordinatesByMouse=0,(e=this.popup)==null||e.remove()})},moveMouseHadler(r){var e;try{const t=this.map.queryRenderedFeatures(r.point),n=((e=t[0])==null?void 0:e.properties)||{};if(!t.length){this.map.getCanvas().style.cursor="",this.popupElement&&this.popupElement.remove();return}this.map.getCanvas().style.cursor="pointer",this.popupElement&&this.popupElement.remove(),this.popupElement=document.createElement("div"),this.popupElement.className="absolute text-gray-800 border border-gray-200 rounded-lg shadow-md min-w-28",this.popupElement.style.backgroundColor="rgba(255, 255, 255, 0.7)",this.popupElement.innerHTML=`<div class="px-2 py-1 text-sm font-semibold text-gray-800 border-b border-gray-200 border-solid rounded-t-lg">
754
754
  ${(n==null?void 0:n.x)||(n==null?void 0:n.title)||(n==null?void 0:n.name)||""}
755
755
  </div>
756
756
 
@@ -759,4 +759,4 @@ uniform ${K} ${J} u_${ae};
759
759
  <span class="font-medium mr-[6px]">Значення</span>
760
760
  </span>
761
761
  <span>${(n==null?void 0:n.metric)||0}</span>
762
- </div>`;const i=this.map.project(r.lngLat);this.popupElement.style.left=`${i.x}px`,this.popupElement.style.top=`${i.y-60}px`,this.map.getContainer().appendChild(this.popupElement)}catch(t){console.error(t)}}}},Cme={class:"h-full"},Ame={class:"flex items-start justify-between mb-[6px] w-full"},Dme={class:"text-gray-800 font-[600]"},Mme={class:"flex gap-2"},Ime=["onClick"],kme=["id"],Lme=["id"],Pme={class:"absolute flex flex-col right-[10px] top-[105px] gap-1"},Rme={class:"h-[calc(250px)]"};function Nme(r,e,t,n,i,a){var g,m,_,x,w,C,M,L,O,F;const o=P.resolveComponent("VsMapSetting"),s=P.resolveComponent("VsMapSlotLayers"),l=P.resolveComponent("VsMapGoHome"),c=P.resolveComponent("VsClusterLegend"),d=P.resolveComponent("VsList"),f=P.resolveComponent("VsBar");return P.openBlock(),P.createElementBlock("div",Cme,[P.createElementVNode("div",Ame,[P.createElementVNode("h3",Dme,P.toDisplayString(r.title),1),P.createElementVNode("div",Mme,[(P.openBlock(!0),P.createElementBlock(P.Fragment,null,P.renderList(i.options,V=>(P.openBlock(),P.createElementBlock("button",{class:P.normalizeClass(["p-1 text-gray-700 border rounded",[i.activeTab===(V==null?void 0:V.id)?"ring-2 ring-blue-500":""]]),onClick:U=>i.activeTab=V==null?void 0:V.id},[(P.openBlock(),P.createBlock(P.resolveDynamicComponent(V==null?void 0:V.component),{height:"16",width:"16"}))],10,Ime))),256))])]),P.withDirectives(P.createElementVNode("div",{class:"relative w-full h-[calc(100%-40px)]",id:`wrapper-${i.mapId}`},[P.createElementVNode("div",{id:i.mapId,class:"h-[calc(100%-40px)] w-full flex items-end min-h-[250px]"},null,8,Lme),i.showSetting?(P.openBlock(),P.createBlock(o,{key:0,map:i.map,coordinates:i.coordinatesByMouse},null,8,["map","coordinates"])):P.createCommentVNode("",!0),P.createVNode(s,{map:i.map},null,8,["map"]),P.createElementVNode("div",Pme,[P.createVNode(l,{map:i.map,bbox:(g=i.data)==null?void 0:g.bounds},null,8,["map","bbox"])]),P.createVNode(c,{mapId:i.mapId,colors:(m=i.data)==null?void 0:m.colors,sizes:(_=i.data)==null?void 0:_.sizes,color:i.baseColor,changeOpacityItem:"true",cluster:"true"},null,8,["mapId","colors","sizes","color"])],8,kme),[[P.vShow,i.activeTab=="map"]]),P.withDirectives(P.createVNode(d,{mapId:i.mapId,source:(x=i.data)==null?void 0:x.rows,total:((w=i.data)==null?void 0:w.total)||0,count:((C=i.data)==null?void 0:C.count)||0,onKattotg:e[0]||(e[0]=V=>i.kattotg=V)},null,8,["mapId","source","total","count"]),[[P.vShow,i.activeTab=="table"]]),P.withDirectives(P.createElementVNode("div",Rme,[(L=(M=i.data)==null?void 0:M.rows)!=null&&L.length?(P.openBlock(),P.createBlock(f,{key:0,source:(F=(O=i.data)==null?void 0:O.rows)==null?void 0:F.map(V=>({title:V==null?void 0:V.title,metric:V==null?void 0:V.metric}))},null,8,["source"])):P.createCommentVNode("",!0)],512),[[P.vShow,i.activeTab=="chart"]])])}const Ome=Object.freeze(Object.defineProperty({__proto__:null,default:ur(Eme,[["render",Nme]])},Symbol.toStringTag,{value:"Module"})),zme={name:"VsTable",mixins:[Ea],data(){return{values:null,xs:null,products:null}},async mounted(){await this.getData(),this.prepareData()},methods:{onChangedData(){try{this.sourceData&&this.prepareData()}catch{}},prepareData(){try{const r=Array.from(new Set(this.sourceData.map(e=>e[this.dimensions[0]])));this.dimensions[0].includes("date")?this.xs=r.map(e=>rs(e)):this.xs=[...r],this.products=this.dimensions.filter((e,t)=>t!=0),this.values=this.products.map((e,t)=>({name:e,data:this.sourceData.filter(n=>parseFloat(n[e])).map(n=>En(parseFloat(n[e])))}))}catch(r){console.error(r)}}}},Bme={class:"flex flex-col h-full pt-[16px] pb-[16px] space-y-4 rounded-xl"},Vme={class:"overflow-auto h-full [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300"},Fme={class:"inline-block min-w-full align-middle"},$me={class:"relative min-w-full divide-y divide-gray-200 text-[12px]"},Gme={class:"sticky top-0 bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200"},Ume={class:"space-x-2"},Hme={scope:"col",class:"xl:min-w-[120px] min-w-48"},Wme={class:"flex items-center px-1 py-3 font-medium text-gray-800 text-start gap-x-1"},qme={class:"divide-y divide-gray-200"},Zme={class:"text-gray-600"};function jme(r,e,t,n,i,a){return P.openBlock(),P.createElementBlock("div",Bme,[P.createElementVNode("div",Vme,[P.createElementVNode("div",Fme,[P.createElementVNode("table",$me,[P.createElementVNode("thead",Gme,[P.createElementVNode("tr",Ume,[(P.openBlock(!0),P.createElementBlock(P.Fragment,null,P.renderList(r.dimensions,o=>(P.openBlock(),P.createElementBlock("th",Hme,[P.createElementVNode("div",Wme,P.toDisplayString(o),1)]))),256))])]),P.createElementVNode("tbody",qme,[(P.openBlock(!0),P.createElementBlock(P.Fragment,null,P.renderList(r.sourceData,(o,s)=>(P.openBlock(),P.createElementBlock("tr",{key:s},[(P.openBlock(!0),P.createElementBlock(P.Fragment,null,P.renderList(r.dimensions,(l,c)=>(P.openBlock(),P.createElementBlock("td",{key:c,class:"py-3 whitespace-nowrap"},[P.createElementVNode("span",Zme,P.toDisplayString(o==null?void 0:o[l]),1)]))),128))]))),128))])])])])])}const Xme=Object.freeze(Object.defineProperty({__proto__:null,default:ur(zme,[["render",jme]])},Symbol.toStringTag,{value:"Module"}));return O$});
762
+ </div>`;const i=this.map.project(r.lngLat);this.popupElement.style.left=`${i.x}px`,this.popupElement.style.top=`${i.y-60}px`,this.map.getContainer().appendChild(this.popupElement)}catch(t){console.error(t)}}}},Cme={class:"h-full"},Ame={class:"flex items-start justify-between mb-[6px] w-full"},Dme={class:"text-gray-800 font-[600]"},Mme={class:"flex gap-2"},Ime=["onClick"],kme=["id"],Lme=["id"],Pme={class:"absolute flex flex-col right-[10px] top-[105px] gap-1"},Rme={class:"h-[calc(250px)]"};function Nme(r,e,t,n,i,a){var g,m,_,x,w,C,M,L,O,F;const o=P.resolveComponent("VsMapSetting"),s=P.resolveComponent("VsMapSlotLayers"),l=P.resolveComponent("VsMapGoHome"),c=P.resolveComponent("VsClusterLegend"),d=P.resolveComponent("VsList"),f=P.resolveComponent("VsBar");return P.openBlock(),P.createElementBlock("div",Cme,[P.createElementVNode("div",Ame,[P.createElementVNode("h3",Dme,P.toDisplayString(r.title),1),P.createElementVNode("div",Mme,[(P.openBlock(!0),P.createElementBlock(P.Fragment,null,P.renderList(i.options,V=>(P.openBlock(),P.createElementBlock("button",{class:P.normalizeClass(["p-1 text-gray-700 border rounded",[i.activeTab===(V==null?void 0:V.id)?"ring-2 ring-blue-500":""]]),onClick:U=>i.activeTab=V==null?void 0:V.id},[(P.openBlock(),P.createBlock(P.resolveDynamicComponent(V==null?void 0:V.component),{height:"16",width:"16"}))],10,Ime))),256))])]),P.withDirectives(P.createElementVNode("div",{class:"relative w-full h-[calc(100%-40px)]",id:`wrapper-${i.mapId}`},[P.createElementVNode("div",{id:i.mapId,class:"h-full w-full flex items-end min-h-[250px]"},null,8,Lme),i.showSetting?(P.openBlock(),P.createBlock(o,{key:0,map:i.map,coordinates:i.coordinatesByMouse},null,8,["map","coordinates"])):P.createCommentVNode("",!0),P.createVNode(s,{map:i.map},null,8,["map"]),P.createElementVNode("div",Pme,[P.createVNode(l,{map:i.map,bbox:(g=i.data)==null?void 0:g.bounds},null,8,["map","bbox"])]),P.createVNode(c,{mapId:i.mapId,colors:(m=i.data)==null?void 0:m.colors,sizes:(_=i.data)==null?void 0:_.sizes,color:i.baseColor,changeOpacityItem:"true",cluster:"true"},null,8,["mapId","colors","sizes","color"])],8,kme),[[P.vShow,i.activeTab=="map"]]),P.withDirectives(P.createVNode(d,{mapId:i.mapId,source:(x=i.data)==null?void 0:x.rows,total:((w=i.data)==null?void 0:w.total)||0,count:((C=i.data)==null?void 0:C.count)||0,onKattotg:e[0]||(e[0]=V=>i.kattotg=V)},null,8,["mapId","source","total","count"]),[[P.vShow,i.activeTab=="table"]]),P.withDirectives(P.createElementVNode("div",Rme,[(L=(M=i.data)==null?void 0:M.rows)!=null&&L.length?(P.openBlock(),P.createBlock(f,{key:0,source:(F=(O=i.data)==null?void 0:O.rows)==null?void 0:F.map(V=>({title:V==null?void 0:V.title,metric:V==null?void 0:V.metric}))},null,8,["source"])):P.createCommentVNode("",!0)],512),[[P.vShow,i.activeTab=="chart"]])])}const Ome=Object.freeze(Object.defineProperty({__proto__:null,default:ur(Eme,[["render",Nme]])},Symbol.toStringTag,{value:"Module"})),zme={name:"VsTable",mixins:[Ea],data(){return{values:null,xs:null,products:null}},async mounted(){await this.getData(),this.prepareData()},methods:{onChangedData(){try{this.sourceData&&this.prepareData()}catch{}},prepareData(){try{const r=Array.from(new Set(this.sourceData.map(e=>e[this.dimensions[0]])));this.dimensions[0].includes("date")?this.xs=r.map(e=>rs(e)):this.xs=[...r],this.products=this.dimensions.filter((e,t)=>t!=0),this.values=this.products.map((e,t)=>({name:e,data:this.sourceData.filter(n=>parseFloat(n[e])).map(n=>En(parseFloat(n[e])))}))}catch(r){console.error(r)}}}},Bme={class:"flex flex-col h-full pt-[16px] pb-[16px] space-y-4 rounded-xl"},Vme={class:"overflow-auto h-full [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300"},Fme={class:"inline-block min-w-full align-middle"},$me={class:"relative min-w-full divide-y divide-gray-200 text-[12px]"},Gme={class:"sticky top-0 bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200"},Ume={class:"space-x-2"},Hme={scope:"col",class:"xl:min-w-[120px] min-w-48"},Wme={class:"flex items-center px-1 py-3 font-medium text-gray-800 text-start gap-x-1"},qme={class:"divide-y divide-gray-200"},Zme={class:"text-gray-600"};function jme(r,e,t,n,i,a){return P.openBlock(),P.createElementBlock("div",Bme,[P.createElementVNode("div",Vme,[P.createElementVNode("div",Fme,[P.createElementVNode("table",$me,[P.createElementVNode("thead",Gme,[P.createElementVNode("tr",Ume,[(P.openBlock(!0),P.createElementBlock(P.Fragment,null,P.renderList(r.dimensions,o=>(P.openBlock(),P.createElementBlock("th",Hme,[P.createElementVNode("div",Wme,P.toDisplayString(o),1)]))),256))])]),P.createElementVNode("tbody",qme,[(P.openBlock(!0),P.createElementBlock(P.Fragment,null,P.renderList(r.sourceData,(o,s)=>(P.openBlock(),P.createElementBlock("tr",{key:s},[(P.openBlock(!0),P.createElementBlock(P.Fragment,null,P.renderList(r.dimensions,(l,c)=>(P.openBlock(),P.createElementBlock("td",{key:c,class:"py-3 whitespace-nowrap"},[P.createElementVNode("span",Zme,P.toDisplayString(o==null?void 0:o[l]),1)]))),128))]))),128))])])])])])}const Xme=Object.freeze(Object.defineProperty({__proto__:null,default:ur(zme,[["render",jme]])},Symbol.toStringTag,{value:"Module"}));return O$});
@@ -46474,19 +46474,19 @@ const Xb = /* @__PURE__ */ tt(kJ, [["render", zJ]]), FJ = /* @__PURE__ */ Object
46474
46474
  }
46475
46475
  }, WJ = {
46476
46476
  "bi-bar": pr(() => Promise.resolve().then(() => jQ)),
46477
- "bi-number": pr(() => import("./vs-number-DSvtrmoG.js")),
46478
- "bi-text": pr(() => import("./vs-text-D8LfAqY7.js")),
46477
+ "bi-number": pr(() => import("./vs-number-CdmpDELt.js")),
46478
+ "bi-text": pr(() => import("./vs-text-YlYPwCzJ.js")),
46479
46479
  "bi-listbar": pr(() => Promise.resolve().then(() => FJ)),
46480
46480
  "bi-pie": pr(() => Promise.resolve().then(() => tJ)),
46481
- "bi-donut": pr(() => import("./vs-donut-W78DXWSG.js")),
46481
+ "bi-donut": pr(() => import("./vs-donut-CgRhH9p9.js")),
46482
46482
  "bi-line": pr(() => Promise.resolve().then(() => iJ)),
46483
46483
  "bi-stat": pr(() => Promise.resolve().then(() => bJ)),
46484
46484
  "bi-pivot": pr(() => Promise.resolve().then(() => nte)),
46485
46485
  "bi-progress": pr(() => Promise.resolve().then(() => LJ)),
46486
- "bi-funnel": pr(() => import("./vs-funnel-bar-Bbt9ykLL.js")),
46487
- "bi-map": pr(() => import("./vs-map-Cjm5Yhl8.js")),
46488
- "bi-cluster": pr(() => import("./vs-map-cluster-DriEl06t.js")),
46489
- "bi-table": pr(() => import("./vs-table-B4joILs0.js"))
46486
+ "bi-funnel": pr(() => import("./vs-funnel-bar-BREiOqhJ.js")),
46487
+ "bi-map": pr(() => import("./vs-map-n0AjqBCy.js")),
46488
+ "bi-cluster": pr(() => import("./vs-map-cluster-CFX3Ega7.js")),
46489
+ "bi-table": pr(() => import("./vs-table-CvcVgu34.js"))
46490
46490
  }, YJ = { class: "flex items-center space-x-2" }, qJ = /* @__PURE__ */ GC({
46491
46491
  __name: "vs-bi-switch",
46492
46492
  props: /* @__PURE__ */ pu({
@@ -1,4 +1,4 @@
1
- import { _ as y, c as D, a as c, P as h, b as l, i as g } from "./import-file-0V4hdOl6.js";
1
+ import { _ as y, c as D, a as c, P as h, b as l, i as g } from "./import-file-MuPNIOS3.js";
2
2
  import { openBlock as b, createElementBlock as x } from "vue";
3
3
  const _ = {
4
4
  name: "VsPie",
@@ -1,4 +1,4 @@
1
- import { _ as n, c, d as h, a as l, b as o, i as d } from "./import-file-0V4hdOl6.js";
1
+ import { _ as n, c, d as h, a as l, b as o, i as d } from "./import-file-MuPNIOS3.js";
2
2
  import { openBlock as p, createElementBlock as u } from "vue";
3
3
  const m = {
4
4
  name: "VsFunnelBar",
@@ -1,4 +1,4 @@
1
- import { _ as en, h as Vp, j as Np } from "./import-file-0V4hdOl6.js";
1
+ import { _ as en, h as Vp, j as Np } from "./import-file-MuPNIOS3.js";
2
2
  import { openBlock as br, createElementBlock as wr, createElementVNode as Vt, createStaticVNode as jp, withDirectives as Up, toDisplayString as rh, vShow as $p, Fragment as Uu, renderList as $u, normalizeClass as qp, resolveComponent as Zp, createVNode as Gp } from "vue";
3
3
  const Hp = {}, Xp = {
4
4
  class: "shrink-0 size-3",
@@ -1,5 +1,5 @@
1
- import { l as G, c as A, p as R, e as P, V as Z, b as q, d as D, a as K, m as H } from "./vs-list-BsSJxqJM.js";
2
- import { _ as V, c as W, V as J, I as Q, e as U, g as X } from "./import-file-0V4hdOl6.js";
1
+ import { l as G, c as A, p as R, e as P, V as Z, b as q, d as D, a as K, m as H } from "./vs-list-Dpwm-9Z1.js";
2
+ import { _ as V, c as W, V as J, I as Q, e as U, g as X } from "./import-file-MuPNIOS3.js";
3
3
  import { openBlock as p, createElementBlock as m, createElementVNode as l, normalizeClass as I, Fragment as N, renderList as O, toDisplayString as F, normalizeStyle as Y, createCommentVNode as S, resolveComponent as g, createBlock as z, resolveDynamicComponent as j, withDirectives as M, createVNode as w, vShow as C } from "vue";
4
4
  const $ = {
5
5
  components: { legendIcon: G, closeIcon: A },
@@ -261,7 +261,7 @@ function xe(t, s, n, a, e, o) {
261
261
  }, [
262
262
  l("div", {
263
263
  id: e.mapId,
264
- class: "h-[calc(100%-40px)] w-full flex items-end min-h-[250px]"
264
+ class: "h-full w-full flex items-end min-h-[250px]"
265
265
  }, null, 8, fe),
266
266
  e.showSetting ? (p(), z(d, {
267
267
  key: 0,
@@ -1,5 +1,5 @@
1
- import { l as L, c as $, p as T, V as B, a as H, b as O, d as F, m as S, e as N } from "./vs-list-BsSJxqJM.js";
2
- import { _ as C, c as P } from "./import-file-0V4hdOl6.js";
1
+ import { l as L, c as $, p as T, V as B, a as H, b as O, d as F, m as S, e as N } from "./vs-list-Dpwm-9Z1.js";
2
+ import { _ as C, c as P } from "./import-file-MuPNIOS3.js";
3
3
  import { resolveComponent as u, openBlock as i, createElementBlock as p, Fragment as v, createElementVNode as r, createVNode as f, createBlock as E, Teleport as R, toDisplayString as b, createCommentVNode as m, renderList as k, normalizeStyle as I, normalizeClass as V } from "vue";
4
4
  const A = {
5
5
  components: { legendIcon: L, closeIcon: $ },
@@ -256,7 +256,7 @@ function ne(e, t, s, o, l, a) {
256
256
  }, [
257
257
  r("div", {
258
258
  id: e.mapId,
259
- class: "w-full flex items-end relative h-[250px]"
259
+ class: "w-full flex items-end relative h-full min-h-[250px]"
260
260
  }, null, 8, le),
261
261
  e.showSetting ? (i(), E(n, {
262
262
  key: 0,
@@ -1,4 +1,4 @@
1
- import { _ as c, c as o, f as n } from "./import-file-0V4hdOl6.js";
1
+ import { _ as c, c as o, f as n } from "./import-file-MuPNIOS3.js";
2
2
  import { openBlock as i, createElementBlock as m, toDisplayString as s } from "vue";
3
3
  const u = {
4
4
  name: "VsNumber",
@@ -1,4 +1,4 @@
1
- import { _ as m, c as f, d as _, a as b } from "./import-file-0V4hdOl6.js";
1
+ import { _ as m, c as f, d as _, a as b } from "./import-file-MuPNIOS3.js";
2
2
  import { openBlock as a, createElementBlock as r, createElementVNode as s, Fragment as n, renderList as c, toDisplayString as d } from "vue";
3
3
  const x = {
4
4
  name: "VsTable",
@@ -1,4 +1,4 @@
1
- import { _ as o, c as s, m as i } from "./import-file-0V4hdOl6.js";
1
+ import { _ as o, c as s, m as i } from "./import-file-MuPNIOS3.js";
2
2
  import { openBlock as r, createElementBlock as n, createCommentVNode as a } from "vue";
3
3
  const c = {
4
4
  name: "VsText",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/bi",
3
- "version": "1.0.49",
3
+ "version": "1.0.50",
4
4
  "description": "BI data visualization module",
5
5
  "main": "dist/bi.js",
6
6
  "browser": "dist/bi.umd.cjs",