@opengis/bi 1.0.52 → 1.0.53

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.
@@ -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-DT-9by-h.js")),
46478
- "bi-text": pr(() => import("./vs-text-Bbo9hKH2.js")),
46477
+ "bi-number": pr(() => import("./vs-number-ZSc2xN1l.js")),
46478
+ "bi-text": pr(() => import("./vs-text-BsUU9DRr.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-soXDKUAE.js")),
46481
+ "bi-donut": pr(() => import("./vs-donut-CkJHa2QH.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-C6ZZZGnB.js")),
46487
- "bi-map": pr(() => import("./vs-map-C0oy-Z5M.js")),
46488
- "bi-cluster": pr(() => import("./vs-map-cluster-Cz_pEGZ7.js")),
46489
- "bi-table": pr(() => import("./vs-table-rcb3LWiR.js"))
46486
+ "bi-funnel": pr(() => import("./vs-funnel-bar-mbRcdEy9.js")),
46487
+ "bi-map": pr(() => import("./vs-map-Dlaj25fS.js")),
46488
+ "bi-cluster": pr(() => import("./vs-map-cluster-BjmVKeoV.js")),
46489
+ "bi-table": pr(() => import("./vs-table-DWXwvapr.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-4iqJ-UZ9.js";
1
+ import { _ as y, c as D, a as c, P as h, b as l, i as g } from "./import-file-lDlptYTO.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-4iqJ-UZ9.js";
1
+ import { _ as n, c, d as h, a as l, b as o, i as d } from "./import-file-lDlptYTO.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-4iqJ-UZ9.js";
1
+ import { _ as en, h as Vp, j as Np } from "./import-file-lDlptYTO.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 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-DYieCz31.js";
2
- import { _ as C, c as P } from "./import-file-4iqJ-UZ9.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-ACq4fLEf.js";
2
+ import { _ as C, c as P } from "./import-file-lDlptYTO.js";
3
3
  import { resolveComponent as u, openBlock as i, createElementBlock as c, Fragment as w, createElementVNode as l, createVNode as x, createBlock as E, Teleport as R, toDisplayString as f, createCommentVNode as m, renderList as k, normalizeStyle as I, normalizeClass as V } from "vue";
4
4
  const A = {
5
5
  components: { legendIcon: L, closeIcon: $ },
@@ -26,11 +26,11 @@ const A = {
26
26
  return this.cluster ? "rounded-sm" : "rounded-full";
27
27
  },
28
28
  sortedSizes() {
29
- return [...this.sizes].sort((e, t) => e - t);
29
+ return [...this.sizes].sort((e, o) => e - o);
30
30
  },
31
31
  maxWidht() {
32
- var s;
33
- const e = ((s = this.sizes) == null ? void 0 : s.length) - 1;
32
+ var t;
33
+ const e = ((t = this.sizes) == null ? void 0 : t.length) - 1;
34
34
  return this.calcSize(e);
35
35
  }
36
36
  },
@@ -58,36 +58,36 @@ const A = {
58
58
  key: 0,
59
59
  class: "text-xs font-semibold leading-[1.2] text-[#1F2937] mb-[8px]"
60
60
  }, U = { class: "flex flex-col gap-[6px]" }, X = { class: "flex flex-row items-center justify-start" }, Y = { class: "text-xs text-[#1F2937] font-normal leading-[1.2]" };
61
- function ee(e, t, s, o, r, a) {
61
+ function ee(e, o, t, s, r, a) {
62
62
  var y, b;
63
63
  const n = u("legendIcon"), h = u("closeIcon");
64
64
  return i(), c(w, null, [
65
65
  l("div", {
66
66
  class: "flex justify-center items-center rounded-md w-[32px] h-[32px] cursor-pointer bg-white p-1 border-[2px]",
67
- onClick: t[0] || (t[0] = (d) => r.isOpenLegend = !r.isOpenLegend)
67
+ onClick: o[0] || (o[0] = (d) => r.isOpenLegend = !r.isOpenLegend)
68
68
  }, [
69
69
  x(n)
70
70
  ]),
71
71
  r.isOpenLegend ? (i(), E(R, {
72
72
  key: 0,
73
- to: `#wrapper-${s.mapId}`
73
+ to: `#wrapper-${t.mapId}`
74
74
  }, [
75
75
  l("div", G, [
76
76
  l("div", W, [
77
- t[2] || (t[2] = l("h3", { class: "text-[16px] font-normal text-black" }, "Легенда", -1)),
77
+ o[2] || (o[2] = l("h3", { class: "text-[16px] font-normal text-black" }, "Легенда", -1)),
78
78
  l("button", {
79
79
  type: "button",
80
80
  class: "inline-flex items-center text-sm font-medium text-gray-500 rounded-lg gap-x-2 focus:outline-none disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-400 dark:hover:text-blue-500 dark:focus:text-blue-500",
81
- onClick: t[1] || (t[1] = (d) => r.isOpenLegend = !1)
81
+ onClick: o[1] || (o[1] = (d) => r.isOpenLegend = !1)
82
82
  }, [
83
83
  x(h, { class: "w-[20px]" })
84
84
  ])
85
85
  ]),
86
86
  l("div", Z, [
87
- (y = s.colors) != null && y.length ? (i(), c("div", j, [
88
- s.colorTitle ? (i(), c("h4", q, f(s.colorTitle), 1)) : m("", !0),
87
+ (y = t.colors) != null && y.length ? (i(), c("div", j, [
88
+ t.colorTitle ? (i(), c("h4", q, f(t.colorTitle), 1)) : m("", !0),
89
89
  l("div", D, [
90
- (i(!0), c(w, null, k(s.colors, (d, p) => (i(), c("div", {
90
+ (i(!0), c(w, null, k(t.colors, (d, p) => (i(), c("div", {
91
91
  key: p,
92
92
  class: "flex items-center gap-[10px]"
93
93
  }, [
@@ -102,7 +102,7 @@ function ee(e, t, s, o, r, a) {
102
102
  ]))), 128))
103
103
  ])
104
104
  ])) : m("", !0),
105
- (b = s.sizes) != null && b.length ? (i(), c("div", K, [
105
+ (b = t.sizes) != null && b.length ? (i(), c("div", K, [
106
106
  e.sizeTitle ? (i(), c("h4", Q, f(e.sizeTitle), 1)) : m("", !0),
107
107
  l("div", U, [
108
108
  a.sortedSizes.length ? (i(!0), c(w, { key: 0 }, k(a.sortedSizes, (d, p) => {
@@ -115,7 +115,7 @@ function ee(e, t, s, o, r, a) {
115
115
  l("div", {
116
116
  class: V(a.sizeClass(p)),
117
117
  style: I({
118
- backgroundColor: ((v = (g = r.palette) == null ? void 0 : g[s.color]) == null ? void 0 : v[p]) || s.color
118
+ backgroundColor: ((v = (g = r.palette) == null ? void 0 : g[t.color]) == null ? void 0 : v[p]) || t.color
119
119
  })
120
120
  }, null, 6)
121
121
  ], 2),
@@ -153,6 +153,7 @@ const te = /* @__PURE__ */ C(A, [["render", ee]]), se = {
153
153
  },
154
154
  methods: {
155
155
  async createMap() {
156
+ var o, t;
156
157
  const e = {
157
158
  version: 8,
158
159
  glyphs: "https://cdn.softpro.ua/data/fonts/{fontstack}/{range}.pbf",
@@ -163,7 +164,7 @@ const te = /* @__PURE__ */ C(A, [["render", ee]]), se = {
163
164
  container: this.mapId,
164
165
  style: e,
165
166
  center: [31, 48.5],
166
- zoom: 5,
167
+ zoom: ((t = (o = this.data) == null ? void 0 : o.style) == null ? void 0 : t.zoom) || 5,
167
168
  minZoom: 3,
168
169
  maxZoom: 20,
169
170
  attributionControl: !1
@@ -173,39 +174,39 @@ const te = /* @__PURE__ */ C(A, [["render", ee]]), se = {
173
174
  })
174
175
  ), this.map.on("load", () => {
175
176
  this.loadHandler();
176
- }), this.map.on("mousemove", (t) => {
177
- this.moveMouseHadler(t);
177
+ }), this.map.on("mousemove", (s) => {
178
+ this.moveMouseHadler(s);
178
179
  }), this.map.on("mouseout", () => {
179
- var t;
180
- this.showLegend = !1, this.showSetting = !1, this.coordinatesByMouse = 0, (t = this.popup) == null || t.remove();
180
+ var s;
181
+ this.showLegend = !1, this.showSetting = !1, this.coordinatesByMouse = 0, (s = this.popup) == null || s.remove();
181
182
  });
182
183
  },
183
184
  getPopoverTitle(e) {
184
- var t, s, o, r, a;
185
- return (s = (t = this.data) == null ? void 0 : t.colors) != null && s.find((n) => n.val === e) ? (a = (r = (o = this.data) == null ? void 0 : o.colors) == null ? void 0 : r.find((n) => n.val === e)) == null ? void 0 : a.text : e;
185
+ var o, t, s, r, a;
186
+ return (t = (o = this.data) == null ? void 0 : o.colors) != null && t.find((n) => n.val === e) ? (a = (r = (s = this.data) == null ? void 0 : s.colors) == null ? void 0 : r.find((n) => n.val === e)) == null ? void 0 : a.text : e;
186
187
  },
187
188
  moveMouseHadler(e) {
188
- var t;
189
+ var o;
189
190
  try {
190
- const s = this.map.queryRenderedFeatures(e.point), o = ((t = s[0]) == null ? void 0 : t.properties) || {};
191
- if (!s.length) {
191
+ const t = this.map.queryRenderedFeatures(e.point), s = ((o = t[0]) == null ? void 0 : o.properties) || {};
192
+ if (!t.length) {
192
193
  this.map.getCanvas().style.cursor = "", this.popupElement && this.popupElement.remove();
193
194
  return;
194
195
  }
195
196
  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="font-semibold text-sm border-b border-solid border-gray-200 text-gray-800 rounded-t-lg px-2 py-1">
196
- ${this.getPopoverTitle((o == null ? void 0 : o.x) || (o == null ? void 0 : o.title) || (o == null ? void 0 : o.name)) || ""}
197
+ ${this.getPopoverTitle((s == null ? void 0 : s.x) || (s == null ? void 0 : s.title) || (s == null ? void 0 : s.name)) || ""}
197
198
  </div>
198
199
 
199
200
  <div class="flex justify-between items-center text-xs px-2 py-0.5 text-gray-500 ">
200
201
  <span class="flex items-center">
201
202
  <span class="font-medium mr-[6px]">Значення</span>
202
203
  </span>
203
- <span>${(o == null ? void 0 : o.metric) || 0}</span>
204
+ <span>${(s == null ? void 0 : s.metric) || 0}</span>
204
205
  </div>`;
205
206
  const r = this.map.project(e.lngLat);
206
207
  this.popupElement.style.left = `${r.x}px`, this.popupElement.style.top = `${r.y - 60}px`, this.map.getContainer().appendChild(this.popupElement);
207
- } catch (s) {
208
- console.error(s);
208
+ } catch (t) {
209
+ console.error(t);
209
210
  }
210
211
  }
211
212
  }
@@ -217,29 +218,29 @@ const te = /* @__PURE__ */ C(A, [["render", ee]]), se = {
217
218
  },
218
219
  methods: {
219
220
  async getMapData() {
220
- const t = await (await fetch(
221
+ const o = await (await fetch(
221
222
  `/api/bi-map?widget=${this.widget}&dashboard=${this.dashboard}`
222
223
  )).json();
223
- this.data = t, this.$emit("update:widgetData", t), setTimeout(() => {
224
- var s;
225
- return (s = this.map) == null ? void 0 : s.resize();
224
+ this.data = o, this.$emit("update:widgetData", o), setTimeout(() => {
225
+ var t;
226
+ return (t = this.map) == null ? void 0 : t.resize();
226
227
  });
227
228
  },
228
229
  async loadHandler() {
229
- const e = ["#69D2E7", "yellow", "#FE4365"], t = this.data.colors ? ["match", ["get", "x"]].concat(
230
+ const e = ["#69D2E7", "yellow", "#FE4365"], o = this.data.colors ? ["match", ["get", "x"]].concat(
230
231
  this.data.colors.reduce(
231
232
  (a, n, h) => a.concat(n.val, (n == null ? void 0 : n.color) || e[h]),
232
233
  []
233
234
  )
234
- ).concat(["gray"]) : "blue", s = [5, 7, 9, 11, 13], o = this.data.sizes ? ["case"] : 5;
235
+ ).concat(["gray"]) : "blue", t = [5, 7, 9, 11, 13], s = this.data.sizes ? ["case"] : 5;
235
236
  this.data.sizes && (this.data.sizes.reverse().forEach((a, n) => {
236
- o.push([">", ["get", "metric"], a]), o.push(s[n]);
237
- }), o.push(5));
237
+ s.push([">", ["get", "metric"], a]), s.push(t[n]);
238
+ }), s.push(5));
238
239
  const r = {
239
240
  type: "circle",
240
- color: t,
241
+ color: o,
241
242
  width: 2,
242
- radius: o,
243
+ radius: s,
243
244
  stroke: "#eee"
244
245
  };
245
246
  Object.assign(r, this.data.style || {}), this.addVtileLayer({
@@ -250,7 +251,7 @@ const te = /* @__PURE__ */ C(A, [["render", ee]]), se = {
250
251
  }
251
252
  }
252
253
  }, ae = { class: "w-full h-full" }, le = { class: "flex items-start justify-between mb-[6px] w-full" }, re = { class: "text-gray-800 font-[600]" }, ne = ["id"], ie = ["id"], de = { class: "absolute flex flex-col right-[10px] top-[105px] gap-1" };
253
- function ce(e, t, s, o, r, a) {
254
+ function ce(e, o, t, s, r, a) {
254
255
  var d, p, g;
255
256
  const n = u("VsMapSetting"), h = u("VsMapSlotLayers"), y = u("VsMapLegend"), b = u("VsMapGoHome");
256
257
  return i(), c("div", ae, [
@@ -1,6 +1,6 @@
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-DYieCz31.js";
2
- import { _ as V, c as W, V as J, I as Q, e as U, g as X } from "./import-file-4iqJ-UZ9.js";
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";
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-ACq4fLEf.js";
2
+ import { _ as V, c as W, V as J, I as Q, e as U, g as X } from "./import-file-lDlptYTO.js";
3
+ import { openBlock as p, createElementBlock as m, createElementVNode as n, 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 },
6
6
  props: {
@@ -29,8 +29,8 @@ const $ = {
29
29
  return [...this.sizes].sort((t, s) => t - s);
30
30
  },
31
31
  maxWidht() {
32
- var n;
33
- const t = ((n = this.sizes) == null ? void 0 : n.length) - 1;
32
+ var r;
33
+ const t = ((r = this.sizes) == null ? void 0 : r.length) - 1;
34
34
  return this.calcSize(t);
35
35
  }
36
36
  },
@@ -49,33 +49,33 @@ const $ = {
49
49
  key: 0,
50
50
  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"
51
51
  }, te = { class: "w-[80px] mr-[10px]" }, se = ["title"], oe = { class: "text-[10px] mb-[2px] text-[#1F2937] font-normal leading-[1.2]" };
52
- function re(t, s, n, a, e, o) {
52
+ function re(t, s, r, o, e, a) {
53
53
  var d;
54
- return (d = n.sizes) != null && d.length ? (p(), m("div", ee, [
55
- l("div", te, [
56
- s[0] || (s[0] = l("p", { class: "text-[10px] mb-[2px] text-[#1F2937] leading-[1.2]" }, " Дані відсутні ", -1)),
57
- l("div", {
58
- class: I([o.sizeClass(t.index), "w-full border border-gray-500"])
54
+ return (d = r.sizes) != null && d.length ? (p(), m("div", ee, [
55
+ n("div", te, [
56
+ s[0] || (s[0] = n("p", { class: "text-[10px] mb-[2px] text-[#1F2937] leading-[1.2]" }, " Дані відсутні ", -1)),
57
+ n("div", {
58
+ class: I([a.sizeClass(t.index), "w-full border border-gray-500"])
59
59
  }, null, 2)
60
60
  ]),
61
- o.sortedSizes.length ? (p(!0), m(N, { key: 0 }, O(o.sortedSizes, (c, i) => {
61
+ a.sortedSizes.length ? (p(!0), m(N, { key: 0 }, O(a.sortedSizes, (c, i) => {
62
62
  var h, u, _, y, f, b, v, x;
63
63
  return p(), m("div", {
64
64
  class: "w-[80px]",
65
- title: i === ((h = o.sortedSizes) == null ? void 0 : h.length) - 1 ? ">" + c : i == ((u = o.sortedSizes) == null ? void 0 : u.length) - 1 ? ">" + o.sortedSizes[((_ = o.sortedSizes) == null ? void 0 : _.length) - 1] : c + "-" + o.sortedSizes[i + 1]
65
+ title: i === ((h = a.sortedSizes) == null ? void 0 : h.length) - 1 ? ">" + c : i == ((u = a.sortedSizes) == null ? void 0 : u.length) - 1 ? ">" + a.sortedSizes[((_ = a.sortedSizes) == null ? void 0 : _.length) - 1] : c + "-" + a.sortedSizes[i + 1]
66
66
  }, [
67
- l("p", oe, F(i === ((y = o.sortedSizes) == null ? void 0 : y.length) - 1 ? ">" + parseInt(c) : i == ((f = o.sortedSizes) == null ? void 0 : f.length) - 1 ? ">" + parseInt(o.sortedSizes[((b = o.sortedSizes) == null ? void 0 : b.length) - 1]) : parseInt(c) + "-" + parseInt(o.sortedSizes[i + 1])), 1),
68
- l("div", {
69
- class: I([o.sizeClass(i), "w-full border border-r-0 border-gray-500"]),
67
+ n("p", oe, F(i === ((y = a.sortedSizes) == null ? void 0 : y.length) - 1 ? ">" + parseInt(c) : i == ((f = a.sortedSizes) == null ? void 0 : f.length) - 1 ? ">" + parseInt(a.sortedSizes[((b = a.sortedSizes) == null ? void 0 : b.length) - 1]) : parseInt(c) + "-" + parseInt(a.sortedSizes[i + 1])), 1),
68
+ n("div", {
69
+ class: I([a.sizeClass(i), "w-full border border-r-0 border-gray-500"]),
70
70
  style: Y({
71
- backgroundColor: ((x = (v = e.palette) == null ? void 0 : v[n.color]) == null ? void 0 : x[i]) || n.color
71
+ backgroundColor: ((x = (v = e.palette) == null ? void 0 : v[r.color]) == null ? void 0 : x[i]) || r.color
72
72
  })
73
73
  }, null, 6)
74
74
  ], 8, se);
75
75
  }), 256)) : S("", !0)
76
76
  ])) : S("", !0);
77
77
  }
78
- const ae = /* @__PURE__ */ V($, [["render", re]]), ne = {}, le = {
78
+ const ae = /* @__PURE__ */ V($, [["render", re]]), le = {}, ne = {
79
79
  xmlns: "http://www.w3.org/2000/svg",
80
80
  width: "24",
81
81
  height: "24",
@@ -88,18 +88,18 @@ const ae = /* @__PURE__ */ V($, [["render", re]]), ne = {}, le = {
88
88
  class: "icon icon-tabler icons-tabler-outline icon-tabler-map"
89
89
  };
90
90
  function ie(t, s) {
91
- return p(), m("svg", le, s[0] || (s[0] = [
92
- l("path", {
91
+ return p(), m("svg", ne, s[0] || (s[0] = [
92
+ n("path", {
93
93
  stroke: "none",
94
94
  d: "M0 0h24v24H0z",
95
95
  fill: "none"
96
96
  }, null, -1),
97
- l("path", { d: "M3 7l6 -3l6 3l6 -3v13l-6 3l-6 -3l-6 3v-13" }, null, -1),
98
- l("path", { d: "M9 4v13" }, null, -1),
99
- l("path", { d: "M15 7v13" }, null, -1)
97
+ n("path", { d: "M3 7l6 -3l6 3l6 -3v13l-6 3l-6 -3l-6 3v-13" }, null, -1),
98
+ n("path", { d: "M9 4v13" }, null, -1),
99
+ n("path", { d: "M15 7v13" }, null, -1)
100
100
  ]));
101
101
  }
102
- const pe = /* @__PURE__ */ V(ne, [["render", ie]]), ce = {
102
+ const pe = /* @__PURE__ */ V(le, [["render", ie]]), ce = {
103
103
  mixins: [W, P],
104
104
  components: {
105
105
  VsMapSetting: Z,
@@ -151,10 +151,10 @@ const pe = /* @__PURE__ */ V(ne, [["render", ie]]), ce = {
151
151
  });
152
152
  },
153
153
  async loadHandler() {
154
- var a, e, o, d;
155
- this.baseColor = ((a = this.data.style) == null ? void 0 : a.color) || "blue";
154
+ var o, e, a, d;
155
+ this.baseColor = ((o = this.data.style) == null ? void 0 : o.color) || "blue";
156
156
  const t = ["case"];
157
- (d = (o = (e = this.data) == null ? void 0 : e.sizes) == null ? void 0 : o.toReversed()) == null || d.forEach((c, i) => {
157
+ (d = (a = (e = this.data) == null ? void 0 : e.sizes) == null ? void 0 : a.toReversed()) == null || d.forEach((c, i) => {
158
158
  var h, u;
159
159
  t.push([">", ["get", "metric"], c]), t.push((u = (h = R[this.baseColor]) == null ? void 0 : h.toReversed()) == null ? void 0 : u[i]), i++;
160
160
  }), t.push("gray");
@@ -168,22 +168,23 @@ const pe = /* @__PURE__ */ V(ne, [["render", ie]]), ce = {
168
168
  url: `${window.location.origin}/api/bi-cluster-vtile/{z}/{x}/{y}.vmt?widget=${this.widget}&dashboard=${this.dashboard}&nocache=1`,
169
169
  style: s
170
170
  }), this.map.getLayer("highlighted") && this.map.removeLayer("highlighted"), this.map.getSource("highlighted") && this.map.removeSource("highlighted");
171
- const n = ["case"];
172
- this.kattotg && n.push(
171
+ const r = ["case"];
172
+ this.kattotg && r.push(
173
173
  ["==", ["to-string", ["get", "name"]], String(this.kattotg)],
174
174
  "red"
175
- ), n.push("transparent"), this.map.addLayer({
175
+ ), r.push("transparent"), this.map.addLayer({
176
176
  id: "highlighted",
177
177
  type: "fill",
178
178
  source: "bi",
179
179
  "source-layer": "bi",
180
180
  paint: {
181
- "fill-color": n,
181
+ "fill-color": r,
182
182
  "fill-opacity": 0.6
183
183
  }
184
184
  });
185
185
  },
186
186
  async createMap() {
187
+ var s, r;
187
188
  const t = {
188
189
  version: 8,
189
190
  glyphs: "https://cdn.softpro.ua/data/fonts/{fontstack}/{range}.pbf",
@@ -194,7 +195,7 @@ const pe = /* @__PURE__ */ V(ne, [["render", ie]]), ce = {
194
195
  container: this.mapId,
195
196
  style: t,
196
197
  center: [31, 48.5],
197
- zoom: 5,
198
+ zoom: ((r = (s = this.data) == null ? void 0 : s.style) == null ? void 0 : r.zoom) || 5,
198
199
  minZoom: 3,
199
200
  maxZoom: 20,
200
201
  attributionControl: !1
@@ -204,62 +205,62 @@ const pe = /* @__PURE__ */ V(ne, [["render", ie]]), ce = {
204
205
  })
205
206
  ), this.map.on("load", () => {
206
207
  this.loadHandler();
207
- }), this.map.on("mousemove", (s) => {
208
- this.moveMouseHadler(s);
208
+ }), this.map.on("mousemove", (o) => {
209
+ this.moveMouseHadler(o);
209
210
  }), this.map.on("mouseout", () => {
210
- var s;
211
- this.showLegend = !1, this.showSetting = !1, this.coordinatesByMouse = 0, (s = this.popup) == null || s.remove();
211
+ var o;
212
+ this.showLegend = !1, this.showSetting = !1, this.coordinatesByMouse = 0, (o = this.popup) == null || o.remove();
212
213
  });
213
214
  },
214
215
  moveMouseHadler(t) {
215
216
  var s;
216
217
  try {
217
- const n = this.map.queryRenderedFeatures(t.point), a = ((s = n[0]) == null ? void 0 : s.properties) || {};
218
- if (!n.length) {
218
+ const r = this.map.queryRenderedFeatures(t.point), o = ((s = r[0]) == null ? void 0 : s.properties) || {};
219
+ if (!r.length) {
219
220
  this.map.getCanvas().style.cursor = "", this.popupElement && this.popupElement.remove();
220
221
  return;
221
222
  }
222
223
  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">
223
- ${(a == null ? void 0 : a.x) || (a == null ? void 0 : a.title) || (a == null ? void 0 : a.name) || ""}
224
+ ${(o == null ? void 0 : o.x) || (o == null ? void 0 : o.title) || (o == null ? void 0 : o.name) || ""}
224
225
  </div>
225
226
 
226
227
  <div class="flex justify-between items-center text-xs px-2 py-0.5 text-gray-500 ">
227
228
  <span class="flex items-center">
228
229
  <span class="font-medium mr-[6px]">Значення</span>
229
230
  </span>
230
- <span>${(a == null ? void 0 : a.metric) || 0}</span>
231
+ <span>${(o == null ? void 0 : o.metric) || 0}</span>
231
232
  </div>`;
232
233
  const e = this.map.project(t.lngLat);
233
234
  this.popupElement.style.left = `${e.x}px`, this.popupElement.style.top = `${e.y - 60}px`, this.map.getContainer().appendChild(this.popupElement);
234
- } catch (n) {
235
- console.error(n);
235
+ } catch (r) {
236
+ console.error(r);
236
237
  }
237
238
  }
238
239
  }
239
240
  }, de = { class: "h-full" }, he = { class: "flex items-start justify-between mb-[6px] w-full" }, ue = { class: "text-gray-800 font-[600]" }, me = { class: "flex gap-2" }, ge = ["onClick"], ye = ["id"], fe = ["id"], be = { class: "absolute flex flex-col right-[10px] top-[105px] gap-1" }, ve = { class: "h-[calc(250px)]" };
240
- function xe(t, s, n, a, e, o) {
241
+ function xe(t, s, r, o, e, a) {
241
242
  var y, f, b, v, x, k, L, E, B, T;
242
243
  const d = g("VsMapSetting"), c = g("VsMapSlotLayers"), i = g("VsMapGoHome"), h = g("VsClusterLegend"), u = g("VsList"), _ = g("VsBar");
243
244
  return p(), m("div", de, [
244
- l("div", he, [
245
- l("h3", ue, F(t.title), 1),
246
- l("div", me, [
247
- (p(!0), m(N, null, O(e.options, (r) => (p(), m("button", {
248
- class: I(["p-1 text-gray-700 border rounded", [e.activeTab === (r == null ? void 0 : r.id) ? "ring-2 ring-blue-500" : ""]]),
249
- onClick: (_e) => e.activeTab = r == null ? void 0 : r.id
245
+ n("div", he, [
246
+ n("h3", ue, F(t.title), 1),
247
+ n("div", me, [
248
+ (p(!0), m(N, null, O(e.options, (l) => (p(), m("button", {
249
+ class: I(["p-1 text-gray-700 border rounded", [e.activeTab === (l == null ? void 0 : l.id) ? "ring-2 ring-blue-500" : ""]]),
250
+ onClick: (_e) => e.activeTab = l == null ? void 0 : l.id
250
251
  }, [
251
- (p(), z(j(r == null ? void 0 : r.component), {
252
+ (p(), z(j(l == null ? void 0 : l.component), {
252
253
  height: "16",
253
254
  width: "16"
254
255
  }))
255
256
  ], 10, ge))), 256))
256
257
  ])
257
258
  ]),
258
- M(l("div", {
259
+ M(n("div", {
259
260
  class: "relative w-full h-[calc(100%-40px)]",
260
261
  id: `wrapper-${e.mapId}`
261
262
  }, [
262
- l("div", {
263
+ n("div", {
263
264
  id: e.mapId,
264
265
  class: "h-full w-full flex items-end min-h-[250px]"
265
266
  }, null, 8, fe),
@@ -269,7 +270,7 @@ function xe(t, s, n, a, e, o) {
269
270
  coordinates: e.coordinatesByMouse
270
271
  }, null, 8, ["map", "coordinates"])) : S("", !0),
271
272
  w(c, { map: e.map }, null, 8, ["map"]),
272
- l("div", be, [
273
+ n("div", be, [
273
274
  w(i, {
274
275
  map: e.map,
275
276
  bbox: (y = e.data) == null ? void 0 : y.bounds
@@ -291,16 +292,16 @@ function xe(t, s, n, a, e, o) {
291
292
  source: (v = e.data) == null ? void 0 : v.rows,
292
293
  total: ((x = e.data) == null ? void 0 : x.total) || 0,
293
294
  count: ((k = e.data) == null ? void 0 : k.count) || 0,
294
- onKattotg: s[0] || (s[0] = (r) => e.kattotg = r)
295
+ onKattotg: s[0] || (s[0] = (l) => e.kattotg = l)
295
296
  }, null, 8, ["mapId", "source", "total", "count"]), [
296
297
  [C, e.activeTab == "table"]
297
298
  ]),
298
- M(l("div", ve, [
299
+ M(n("div", ve, [
299
300
  (E = (L = e.data) == null ? void 0 : L.rows) != null && E.length ? (p(), z(_, {
300
301
  key: 0,
301
- source: (T = (B = e.data) == null ? void 0 : B.rows) == null ? void 0 : T.map((r) => ({
302
- title: r == null ? void 0 : r.title,
303
- metric: r == null ? void 0 : r.metric
302
+ source: (T = (B = e.data) == null ? void 0 : B.rows) == null ? void 0 : T.map((l) => ({
303
+ title: l == null ? void 0 : l.title,
304
+ metric: l == null ? void 0 : l.metric
304
305
  }))
305
306
  }, null, 8, ["source"])) : S("", !0)
306
307
  ], 512), [
@@ -1,4 +1,4 @@
1
- import { _ as c, c as o, f as n } from "./import-file-4iqJ-UZ9.js";
1
+ import { _ as c, c as o, f as n } from "./import-file-lDlptYTO.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-4iqJ-UZ9.js";
1
+ import { _ as m, c as f, d as _, a as b } from "./import-file-lDlptYTO.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-4iqJ-UZ9.js";
1
+ import { _ as o, c as s, m as i } from "./import-file-lDlptYTO.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.52",
3
+ "version": "1.0.53",
4
4
  "description": "BI data visualization module",
5
5
  "main": "dist/bi.js",
6
6
  "browser": "dist/bi.umd.cjs",