@opengis/bi 1.0.44 → 1.0.45

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.
@@ -1,8 +1,8 @@
1
- import { c as L, l as $, p as B, V as H, a as O, b as T, d as F, m as S, e as N } from "./vs-list-C-gFvDvr.js";
2
- import { _ as C, c as R } from "./import-file-XtDaxS3X.js";
3
- import { resolveComponent as u, createElementBlock as d, openBlock as n, Fragment as w, createElementVNode as a, createBlock as E, createCommentVNode as c, createVNode as f, Teleport as A, toDisplayString as b, renderList as k, normalizeStyle as I, normalizeClass as V } from "vue";
4
- const G = {
5
- components: { legendIcon: $, closeIcon: L },
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-D1NHJa-8.js";
2
+ import { _ as C, c as P } from "./import-file-n7AnE4rc.js";
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
+ const A = {
5
+ components: { legendIcon: L, closeIcon: $ },
6
6
  props: {
7
7
  mapId: { type: String },
8
8
  colors: { type: Array },
@@ -17,7 +17,7 @@ const G = {
17
17
  data() {
18
18
  return {
19
19
  isOpenLegend: !1,
20
- palette: B
20
+ palette: T
21
21
  // palette: ['#69D2E7', 'yellow', '#FE4365'],
22
22
  };
23
23
  },
@@ -45,7 +45,7 @@ const G = {
45
45
  return (e + 1) / this.sortedSizes.length;
46
46
  }
47
47
  }
48
- }, W = { class: "w-full absolute max-w-[200px] bg-white border rounded-lg bottom-[10px] right-[50px]" }, P = { class: "flex items-center justify-between border-b border-[#0000001A] px-2" }, Z = { class: "w-full flex flex-col gap-[8px] px-2 py-2 max-h-[200px] overflow-auto [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent" }, q = {
48
+ }, G = { class: "w-full absolute max-w-[200px] bg-white border rounded-lg bottom-[10px] right-[50px]" }, W = { class: "flex items-center justify-between border-b border-[#0000001A] px-2" }, Z = { class: "w-full flex flex-col gap-[8px] px-2 py-2 max-h-[200px] overflow-auto [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent" }, q = {
49
49
  key: 0,
50
50
  class: "flex flex-col w-full"
51
51
  }, j = {
@@ -58,85 +58,85 @@ const G = {
58
58
  key: 0,
59
59
  class: "text-xs font-semibold leading-[1.2] text-[#1F2937] mb-[8px]"
60
60
  }, X = { class: "flex flex-col gap-[6px]" }, Y = { class: "flex flex-row items-center justify-start" }, D = { class: "text-xs text-[#1F2937] font-normal leading-[1.2]" };
61
- function ee(e, t, s, o, r, l) {
61
+ function ee(e, t, s, o, l, a) {
62
62
  var x, y;
63
- const m = u("legendIcon"), h = u("closeIcon");
64
- return n(), d(w, null, [
65
- a("div", {
63
+ const n = u("legendIcon"), h = u("closeIcon");
64
+ return i(), p(v, null, [
65
+ r("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] = (i) => r.isOpenLegend = !r.isOpenLegend)
67
+ onClick: t[0] || (t[0] = (d) => l.isOpenLegend = !l.isOpenLegend)
68
68
  }, [
69
- f(m)
69
+ f(n)
70
70
  ]),
71
- r.isOpenLegend ? (n(), E(A, {
71
+ l.isOpenLegend ? (i(), E(R, {
72
72
  key: 0,
73
73
  to: `#wrapper-${s.mapId}`
74
74
  }, [
75
- a("div", W, [
76
- a("div", P, [
77
- t[2] || (t[2] = a("h3", { class: "text-[16px] font-normal text-black" }, "Легенда", -1)),
78
- a("button", {
75
+ r("div", G, [
76
+ r("div", W, [
77
+ t[2] || (t[2] = r("h3", { class: "text-[16px] font-normal text-black" }, "Легенда", -1)),
78
+ r("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] = (i) => r.isOpenLegend = !1)
81
+ onClick: t[1] || (t[1] = (d) => l.isOpenLegend = !1)
82
82
  }, [
83
83
  f(h, { class: "w-[20px]" })
84
84
  ])
85
85
  ]),
86
- a("div", Z, [
87
- (x = s.colors) != null && x.length ? (n(), d("div", q, [
88
- s.colorTitle ? (n(), d("h4", j, b(s.colorTitle), 1)) : c("", !0),
89
- a("div", J, [
90
- (n(!0), d(w, null, k(s.colors, (i, p) => (n(), d("div", {
91
- key: p,
86
+ r("div", Z, [
87
+ (x = s.colors) != null && x.length ? (i(), p("div", q, [
88
+ s.colorTitle ? (i(), p("h4", j, b(s.colorTitle), 1)) : m("", !0),
89
+ r("div", J, [
90
+ (i(!0), p(v, null, k(s.colors, (d, c) => (i(), p("div", {
91
+ key: c,
92
92
  class: "flex items-center gap-[10px]"
93
93
  }, [
94
- i.color ? (n(), d("div", {
94
+ d.color ? (i(), p("div", {
95
95
  key: 0,
96
96
  class: "w-[12px] h-[12px] rounded-full",
97
97
  style: I({
98
- backgroundColor: i.color
98
+ backgroundColor: d.color
99
99
  })
100
- }, null, 4)) : c("", !0),
101
- a("p", K, b(i.text || i.val), 1)
100
+ }, null, 4)) : m("", !0),
101
+ r("p", K, b(d.text || d.val), 1)
102
102
  ]))), 128))
103
103
  ])
104
- ])) : c("", !0),
105
- (y = s.sizes) != null && y.length ? (n(), d("div", Q, [
106
- e.sizeTitle ? (n(), d("h4", U, b(e.sizeTitle), 1)) : c("", !0),
107
- a("div", X, [
108
- l.sortedSizes.length ? (n(!0), d(w, { key: 0 }, k(l.sortedSizes, (i, p) => {
109
- var g, v, _, z, M;
110
- return n(), d("div", null, [
111
- a("div", Y, [
112
- a("div", {
113
- class: V([l.maxWidht ? `w-[${l.maxWidht}]` : "", "mr-[10px]"])
104
+ ])) : m("", !0),
105
+ (y = s.sizes) != null && y.length ? (i(), p("div", Q, [
106
+ e.sizeTitle ? (i(), p("h4", U, b(e.sizeTitle), 1)) : m("", !0),
107
+ r("div", X, [
108
+ a.sortedSizes.length ? (i(!0), p(v, { key: 0 }, k(a.sortedSizes, (d, c) => {
109
+ var g, w, z, _, M;
110
+ return i(), p("div", null, [
111
+ r("div", Y, [
112
+ r("div", {
113
+ class: V([a.maxWidht ? `w-[${a.maxWidht}]` : "", "mr-[10px]"])
114
114
  }, [
115
- a("div", {
116
- class: V(l.sizeClass(p)),
115
+ r("div", {
116
+ class: V(a.sizeClass(c)),
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: ((w = (g = l.palette) == null ? void 0 : g[s.color]) == null ? void 0 : w[c]) || s.color
119
119
  })
120
120
  }, null, 6)
121
121
  ], 2),
122
- a("p", D, b(p === ((_ = l.sortedSizes) == null ? void 0 : _.length) - 1 ? ">" + i : p == ((z = l.sortedSizes) == null ? void 0 : z.length) - 1 ? ">" + l.sortedSizes[((M = l.sortedSizes) == null ? void 0 : M.length) - 1] : i + "-" + l.sortedSizes[p + 1]), 1)
122
+ r("p", D, b(c === ((z = a.sortedSizes) == null ? void 0 : z.length) - 1 ? ">" + d : c == ((_ = a.sortedSizes) == null ? void 0 : _.length) - 1 ? ">" + a.sortedSizes[((M = a.sortedSizes) == null ? void 0 : M.length) - 1] : d + "-" + a.sortedSizes[c + 1]), 1)
123
123
  ])
124
124
  ]);
125
- }), 256)) : c("", !0)
125
+ }), 256)) : m("", !0)
126
126
  ])
127
- ])) : c("", !0)
127
+ ])) : m("", !0)
128
128
  ])
129
129
  ])
130
- ], 8, ["to"])) : c("", !0)
130
+ ], 8, ["to"])) : m("", !0)
131
131
  ], 64);
132
132
  }
133
- const te = /* @__PURE__ */ C(G, [["render", ee]]), se = {
133
+ const te = /* @__PURE__ */ C(A, [["render", ee]]), se = {
134
134
  components: {
135
- VsMapSetting: F,
136
- VsMapSlotLayers: T,
135
+ VsMapSetting: B,
136
+ VsMapSlotLayers: H,
137
137
  VsMapLegend: te,
138
138
  VsMapGoHome: O,
139
- VsList: H
139
+ VsList: F
140
140
  },
141
141
  data() {
142
142
  return {
@@ -180,6 +180,10 @@ const te = /* @__PURE__ */ C(G, [["render", ee]]), se = {
180
180
  this.showLegend = !1, this.showSetting = !1, this.coordinatesByMouse = 0, (t = this.popup) == null || t.remove();
181
181
  });
182
182
  },
183
+ getPopoverTitle(e) {
184
+ var t, s, o, l, a;
185
+ return (s = (t = this.data) == null ? void 0 : t.colors) != null && s.find((n) => n.val === e) ? (a = (l = (o = this.data) == null ? void 0 : o.colors) == null ? void 0 : l.find((n) => n.val === e)) == null ? void 0 : a.text : e;
186
+ },
183
187
  moveMouseHadler(e) {
184
188
  var t;
185
189
  try {
@@ -189,7 +193,7 @@ const te = /* @__PURE__ */ C(G, [["render", ee]]), se = {
189
193
  return;
190
194
  }
191
195
  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">
192
- ${(o == null ? void 0 : o.x) || (o == null ? void 0 : o.title) || (o == null ? void 0 : o.name) || ""}
196
+ ${this.getPopoverTitle((o == null ? void 0 : o.x) || (o == null ? void 0 : o.title) || (o == null ? void 0 : o.name)) || ""}
193
197
  </div>
194
198
 
195
199
  <div class="flex justify-between items-center text-xs px-2 py-0.5 text-gray-500 ">
@@ -198,15 +202,15 @@ const te = /* @__PURE__ */ C(G, [["render", ee]]), se = {
198
202
  </span>
199
203
  <span>${(o == null ? void 0 : o.metric) || 0}</span>
200
204
  </div>`;
201
- const r = this.map.project(e.lngLat);
202
- this.popupElement.style.left = `${r.x}px`, this.popupElement.style.top = `${r.y - 60}px`, this.map.getContainer().appendChild(this.popupElement);
205
+ const l = this.map.project(e.lngLat);
206
+ this.popupElement.style.left = `${l.x}px`, this.popupElement.style.top = `${l.y - 60}px`, this.map.getContainer().appendChild(this.popupElement);
203
207
  } catch (s) {
204
208
  console.error(s);
205
209
  }
206
210
  }
207
211
  }
208
212
  }, oe = {
209
- mixins: [R, N, se],
213
+ mixins: [P, N, se],
210
214
  name: "VsMap",
211
215
  async mounted() {
212
216
  await this.getMapData(), await this.createMap();
@@ -221,52 +225,50 @@ const te = /* @__PURE__ */ C(G, [["render", ee]]), se = {
221
225
  async loadHandler() {
222
226
  const e = ["#69D2E7", "yellow", "#FE4365"], t = this.data.colors ? ["match", ["get", "x"]].concat(
223
227
  this.data.colors.reduce(
224
- (l, m, h) => l.concat(m.val, e[h]),
228
+ (a, n, h) => a.concat(n.val, (n == null ? void 0 : n.color) || e[h]),
225
229
  []
226
230
  )
227
231
  ).concat(["gray"]) : "blue", s = [5, 7, 9, 11, 13], o = this.data.sizes ? ["case"] : 5;
228
- this.data.sizes && (this.data.sizes.reverse().forEach((l, m) => {
229
- o.push([">", ["get", "metric"], l]), o.push(s[m]);
232
+ this.data.sizes && (this.data.sizes.reverse().forEach((a, n) => {
233
+ o.push([">", ["get", "metric"], a]), o.push(s[n]);
230
234
  }), o.push(5));
231
- const r = {
235
+ const l = {
232
236
  type: "circle",
233
237
  color: t,
234
238
  width: 2,
235
239
  radius: o,
236
240
  stroke: "#eee"
237
241
  };
238
- Object.assign(r, this.data.style || {}), this.addVtileLayer({
242
+ Object.assign(l, this.data.style || {}), this.addVtileLayer({
239
243
  id: "bi",
240
244
  url: `${window.top.location.origin}/api/bi-vtile/{z}/{x}/{y}.vmt?widget=${this.widget}&dashboard=${this.dashboard}&nocache=1`,
241
- style: r
245
+ style: l
242
246
  });
243
247
  }
244
248
  }
245
- }, ae = ["id"], le = ["id"], ne = { ref: "popup" }, re = { class: "absolute flex flex-col right-[10px] top-[105px] gap-1" };
246
- function ie(e, t, s, o, r, l) {
247
- var i, p, g;
248
- const m = u("VsMapSetting"), h = u("VsMapSlotLayers"), x = u("VsMapLegend"), y = u("VsMapGoHome");
249
- return n(), d("div", {
249
+ }, ae = ["id"], le = ["id"], re = { class: "absolute flex flex-col right-[10px] top-[105px] gap-1" };
250
+ function ne(e, t, s, o, l, a) {
251
+ var d, c, g;
252
+ const n = u("VsMapSetting"), h = u("VsMapSlotLayers"), x = u("VsMapLegend"), y = u("VsMapGoHome");
253
+ return i(), p("div", {
250
254
  class: "relative w-full h-full",
251
255
  id: `wrapper-${e.mapId}`
252
256
  }, [
253
- a("div", {
257
+ r("div", {
254
258
  id: e.mapId,
255
259
  class: "w-full flex items-end relative h-[250px]"
256
- }, [
257
- a("div", ne, null, 512)
258
- ], 8, le),
259
- e.showSetting ? (n(), E(m, {
260
+ }, null, 8, le),
261
+ e.showSetting ? (i(), E(n, {
260
262
  key: 0,
261
263
  map: e.map,
262
264
  coordinates: e.coordinatesByMouse
263
- }, null, 8, ["map", "coordinates"])) : c("", !0),
265
+ }, null, 8, ["map", "coordinates"])) : m("", !0),
264
266
  f(h, { map: e.map }, null, 8, ["map"]),
265
- a("div", re, [
267
+ r("div", re, [
266
268
  f(x, {
267
269
  mapId: e.mapId,
268
- colors: (i = e.data) == null ? void 0 : i.colors,
269
- sizes: (p = e.data) == null ? void 0 : p.sizes,
270
+ colors: (d = e.data) == null ? void 0 : d.colors,
271
+ sizes: (c = e.data) == null ? void 0 : c.sizes,
270
272
  color: e.color,
271
273
  resizeItem: "true"
272
274
  }, null, 8, ["mapId", "colors", "sizes", "color"]),
@@ -277,7 +279,7 @@ function ie(e, t, s, o, r, l) {
277
279
  ])
278
280
  ], 8, ae);
279
281
  }
280
- const me = /* @__PURE__ */ C(oe, [["render", ie]]);
282
+ const ce = /* @__PURE__ */ C(oe, [["render", ne]]);
281
283
  export {
282
- me as default
284
+ ce as default
283
285
  };
@@ -1,8 +1,8 @@
1
- import { c as A, l as P, p as O, b as Z, V as q, a as K, d as W, e as D, m as T } from "./vs-list-C-gFvDvr.js";
2
- import { _ as V, V as J, c as Q, e as N, I as U, g as X } from "./import-file-XtDaxS3X.js";
3
- import { createElementBlock as h, createCommentVNode as S, openBlock as p, createElementVNode as l, normalizeClass as I, Fragment as F, renderList as G, toDisplayString as R, normalizeStyle as Y, resolveComponent as u, withDirectives as z, createBlock as M, resolveDynamicComponent as j, 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-D1NHJa-8.js";
2
+ import { _ as V, c as W, V as J, I as Q, e as U, g as X } from "./import-file-n7AnE4rc.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";
4
4
  const $ = {
5
- components: { legendIcon: P, closeIcon: A },
5
+ components: { legendIcon: G, closeIcon: A },
6
6
  props: {
7
7
  mapId: { type: String },
8
8
  colors: { type: Array },
@@ -17,7 +17,7 @@ const $ = {
17
17
  data() {
18
18
  return {
19
19
  isOpenLegend: !1,
20
- palette: O
20
+ palette: R
21
21
  // palette: ['#69D2E7', 'yellow', '#FE4365'],
22
22
  };
23
23
  },
@@ -51,24 +51,24 @@ const $ = {
51
51
  }, te = { class: "w-[80px] mr-[10px]" }, se = ["title"], oe = { class: "text-[10px] mb-[2px] text-[#1F2937] font-normal leading-[1.2]" };
52
52
  function re(t, s, n, a, e, o) {
53
53
  var d;
54
- return (d = n.sizes) != null && d.length ? (p(), h("div", ee, [
54
+ return (d = n.sizes) != null && d.length ? (p(), m("div", ee, [
55
55
  l("div", te, [
56
56
  s[0] || (s[0] = l("p", { class: "text-[10px] mb-[2px] text-[#1F2937] leading-[1.2]" }, " Дані відсутні ", -1)),
57
57
  l("div", {
58
58
  class: I([o.sizeClass(t.index), "w-full border border-gray-500"])
59
59
  }, null, 2)
60
60
  ]),
61
- o.sortedSizes.length ? (p(!0), h(F, { key: 0 }, G(o.sortedSizes, (c, i) => {
62
- var x, v, _, m, g, y, f, b;
63
- return p(), h("div", {
61
+ o.sortedSizes.length ? (p(!0), m(N, { key: 0 }, O(o.sortedSizes, (c, i) => {
62
+ var h, u, _, y, f, b, v, x;
63
+ return p(), m("div", {
64
64
  class: "w-[80px]",
65
- title: i === ((x = o.sortedSizes) == null ? void 0 : x.length) - 1 ? ">" + c : i == ((v = o.sortedSizes) == null ? void 0 : v.length) - 1 ? ">" + o.sortedSizes[((_ = o.sortedSizes) == null ? void 0 : _.length) - 1] : c + "-" + o.sortedSizes[i + 1]
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]
66
66
  }, [
67
- l("p", oe, R(i === ((m = o.sortedSizes) == null ? void 0 : m.length) - 1 ? ">" + parseInt(c) : i == ((g = o.sortedSizes) == null ? void 0 : g.length) - 1 ? ">" + parseInt(o.sortedSizes[((y = o.sortedSizes) == null ? void 0 : y.length) - 1]) : parseInt(c) + "-" + parseInt(o.sortedSizes[i + 1])), 1),
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
68
  l("div", {
69
69
  class: I([o.sizeClass(i), "w-full border border-r-0 border-gray-500"]),
70
70
  style: Y({
71
- backgroundColor: ((b = (f = e.palette) == null ? void 0 : f[n.color]) == null ? void 0 : b[i]) || n.color
71
+ backgroundColor: ((x = (v = e.palette) == null ? void 0 : v[n.color]) == null ? void 0 : x[i]) || n.color
72
72
  })
73
73
  }, null, 6)
74
74
  ], 8, se);
@@ -88,7 +88,7 @@ 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(), h("svg", le, s[0] || (s[0] = [
91
+ return p(), m("svg", le, s[0] || (s[0] = [
92
92
  l("path", {
93
93
  stroke: "none",
94
94
  d: "M0 0h24v24H0z",
@@ -100,13 +100,13 @@ function ie(t, s) {
100
100
  ]));
101
101
  }
102
102
  const pe = /* @__PURE__ */ V(ne, [["render", ie]]), ce = {
103
- mixins: [Q, D],
103
+ mixins: [W, P],
104
104
  components: {
105
- VsMapSetting: W,
105
+ VsMapSetting: Z,
106
106
  VsClusterLegend: ae,
107
- VsMapGoHome: K,
108
- VsList: q,
109
- VsMapSlotLayers: Z,
107
+ VsMapGoHome: q,
108
+ VsList: D,
109
+ VsMapSlotLayers: K,
110
110
  // VsListbar,
111
111
  VsBar: J
112
112
  },
@@ -116,8 +116,8 @@ const pe = /* @__PURE__ */ V(ne, [["render", ie]]), ce = {
116
116
  kattotg: "",
117
117
  options: [
118
118
  { id: "map", text: "Карта", component: pe },
119
- { id: "table", text: "Таблиця", component: U },
120
- { id: "chart", text: "Віджет", component: X }
119
+ { id: "table", text: "Таблиця", component: Q },
120
+ { id: "chart", text: "Віджет", component: U }
121
121
  ],
122
122
  activeTab: "map",
123
123
  mapId: `map-${Math.floor(Math.random() * 1e3)}`,
@@ -142,19 +142,21 @@ const pe = /* @__PURE__ */ V(ne, [["render", ie]]), ce = {
142
142
  },
143
143
  methods: {
144
144
  async getMapData() {
145
- const t = await N.get(
145
+ const t = await X.get(
146
146
  `/bi-cluster?widget=${this.widget}&dashboard=${this.dashboard}`
147
- ), { data: s } = await N.get(
148
- `/bi-data?dashboard=${this.dashboard}&widget=${this.widget}`
149
147
  );
150
- console.log(s), this.data = t.data;
148
+ this.data = t.data, this.$emit("update:widgetData", this.data), setTimeout(() => {
149
+ var s;
150
+ return (s = this.map) == null ? void 0 : s.resize();
151
+ });
151
152
  },
152
153
  async loadHandler() {
153
154
  var a, e, o, d;
154
155
  this.baseColor = ((a = this.data.style) == null ? void 0 : a.color) || "blue";
155
156
  const t = ["case"];
156
- (d = (o = (e = this.data) == null ? void 0 : e.sizes) == null ? void 0 : o.reverse()) == null || d.forEach((c, i) => {
157
- t.push([">", ["get", "metric"], c]), t.push(O[this.baseColor][i]), i++;
157
+ (d = (o = (e = this.data) == null ? void 0 : e.sizes) == null ? void 0 : o.toReversed()) == null || d.forEach((c, i) => {
158
+ var h, u;
159
+ t.push([">", ["get", "metric"], c]), t.push((u = (h = R[this.baseColor]) == null ? void 0 : h.toReversed()) == null ? void 0 : u[i]), i++;
158
160
  }), t.push("gray");
159
161
  const s = {
160
162
  type: "polygon",
@@ -188,7 +190,7 @@ const pe = /* @__PURE__ */ V(ne, [["render", ie]]), ce = {
188
190
  sources: {},
189
191
  layers: []
190
192
  };
191
- this.map = await new T.Map({
193
+ this.map = await new H.Map({
192
194
  container: this.mapId,
193
195
  style: t,
194
196
  center: [31, 48.5],
@@ -197,7 +199,7 @@ const pe = /* @__PURE__ */ V(ne, [["render", ie]]), ce = {
197
199
  maxZoom: 20,
198
200
  attributionControl: !1
199
201
  }), this.map.addControl(
200
- new T.NavigationControl({
202
+ new H.NavigationControl({
201
203
  visualizePitch: !0
202
204
  })
203
205
  ), this.map.on("load", () => {
@@ -234,26 +236,26 @@ const pe = /* @__PURE__ */ V(ne, [["render", ie]]), ce = {
234
236
  }
235
237
  }
236
238
  }
237
- }, 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" }, xe = { class: "h-[calc(250px)]" };
238
- function ve(t, s, n, a, e, o) {
239
- var m, g, y, f, b, k, L, E, B, H;
240
- const d = u("VsMapSetting"), c = u("VsMapSlotLayers"), i = u("VsMapGoHome"), x = u("VsClusterLegend"), v = u("VsList"), _ = u("VsBar");
241
- return p(), h("div", de, [
239
+ }, 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
+ var y, f, b, v, x, k, L, E, B, T;
242
+ const d = g("VsMapSetting"), c = g("VsMapSlotLayers"), i = g("VsMapGoHome"), h = g("VsClusterLegend"), u = g("VsList"), _ = g("VsBar");
243
+ return p(), m("div", de, [
242
244
  l("div", he, [
243
- l("h3", ue, R(t.title), 1),
245
+ l("h3", ue, F(t.title), 1),
244
246
  l("div", me, [
245
- (p(!0), h(F, null, G(e.options, (r) => (p(), h("button", {
247
+ (p(!0), m(N, null, O(e.options, (r) => (p(), m("button", {
246
248
  class: I(["p-1 text-gray-700 border rounded", [e.activeTab === (r == null ? void 0 : r.id) ? "ring-2 ring-blue-500" : ""]]),
247
249
  onClick: (_e) => e.activeTab = r == null ? void 0 : r.id
248
250
  }, [
249
- (p(), M(j(r == null ? void 0 : r.component), {
251
+ (p(), z(j(r == null ? void 0 : r.component), {
250
252
  height: "16",
251
253
  width: "16"
252
254
  }))
253
255
  ], 10, ge))), 256))
254
256
  ])
255
257
  ]),
256
- z(l("div", {
258
+ M(l("div", {
257
259
  class: "relative w-full h-[calc(100%-40px)]",
258
260
  id: `wrapper-${e.mapId}`
259
261
  }, [
@@ -261,7 +263,7 @@ function ve(t, s, n, a, e, o) {
261
263
  id: e.mapId,
262
264
  class: "h-[calc(100%-40px)] w-full flex items-end min-h-[250px]"
263
265
  }, null, 8, fe),
264
- e.showSetting ? (p(), M(d, {
266
+ e.showSetting ? (p(), z(d, {
265
267
  key: 0,
266
268
  map: e.map,
267
269
  coordinates: e.coordinatesByMouse
@@ -270,13 +272,13 @@ function ve(t, s, n, a, e, o) {
270
272
  l("div", be, [
271
273
  w(i, {
272
274
  map: e.map,
273
- bbox: (m = e.data) == null ? void 0 : m.bounds
275
+ bbox: (y = e.data) == null ? void 0 : y.bounds
274
276
  }, null, 8, ["map", "bbox"])
275
277
  ]),
276
- w(x, {
278
+ w(h, {
277
279
  mapId: e.mapId,
278
- colors: (g = e.data) == null ? void 0 : g.colors,
279
- sizes: (y = e.data) == null ? void 0 : y.sizes,
280
+ colors: (f = e.data) == null ? void 0 : f.colors,
281
+ sizes: (b = e.data) == null ? void 0 : b.sizes,
280
282
  color: e.baseColor,
281
283
  changeOpacityItem: "true",
282
284
  cluster: "true"
@@ -284,19 +286,19 @@ function ve(t, s, n, a, e, o) {
284
286
  ], 8, ye), [
285
287
  [C, e.activeTab == "map"]
286
288
  ]),
287
- z(w(v, {
289
+ M(w(u, {
288
290
  mapId: e.mapId,
289
- source: (f = e.data) == null ? void 0 : f.rows,
290
- total: ((b = e.data) == null ? void 0 : b.total) || 0,
291
+ source: (v = e.data) == null ? void 0 : v.rows,
292
+ total: ((x = e.data) == null ? void 0 : x.total) || 0,
291
293
  count: ((k = e.data) == null ? void 0 : k.count) || 0,
292
294
  onKattotg: s[0] || (s[0] = (r) => e.kattotg = r)
293
295
  }, null, 8, ["mapId", "source", "total", "count"]), [
294
296
  [C, e.activeTab == "table"]
295
297
  ]),
296
- z(l("div", xe, [
297
- (E = (L = e.data) == null ? void 0 : L.rows) != null && E.length ? (p(), M(_, {
298
+ M(l("div", ve, [
299
+ (E = (L = e.data) == null ? void 0 : L.rows) != null && E.length ? (p(), z(_, {
298
300
  key: 0,
299
- source: (H = (B = e.data) == null ? void 0 : B.rows) == null ? void 0 : H.map((r) => ({
301
+ source: (T = (B = e.data) == null ? void 0 : B.rows) == null ? void 0 : T.map((r) => ({
300
302
  title: r == null ? void 0 : r.title,
301
303
  metric: r == null ? void 0 : r.metric
302
304
  }))
@@ -306,7 +308,7 @@ function ve(t, s, n, a, e, o) {
306
308
  ])
307
309
  ]);
308
310
  }
309
- const Me = /* @__PURE__ */ V(ce, [["render", ve]]);
311
+ const Me = /* @__PURE__ */ V(ce, [["render", xe]]);
310
312
  export {
311
313
  Me as default
312
314
  };
@@ -1,5 +1,5 @@
1
- import { _ as c, c as o, f as n } from "./import-file-XtDaxS3X.js";
2
- import { createElementBlock as i, openBlock as m, toDisplayString as s } from "vue";
1
+ import { _ as c, c as o, f as n } from "./import-file-n7AnE4rc.js";
2
+ import { openBlock as i, createElementBlock as m, toDisplayString as s } from "vue";
3
3
  const u = {
4
4
  name: "VsNumber",
5
5
  mixins: [o],
@@ -47,7 +47,7 @@ const u = {
47
47
  }
48
48
  }, h = { class: "text-lg lg:text-xl xl:text-2xl text-gray-800 h-[32px] flex items-center" };
49
49
  function x(e, t, r, f, l, a) {
50
- return m(), i("div", h, s(a.prefix) + s(a.formattedNumber), 1);
50
+ return i(), m("div", h, s(a.prefix) + s(a.formattedNumber), 1);
51
51
  }
52
52
  const b = /* @__PURE__ */ c(u, [["render", x]]);
53
53
  export {
@@ -1,5 +1,5 @@
1
- import { _ as m, c as f, d as _, a as b } from "./import-file-XtDaxS3X.js";
2
- import { createElementBlock as a, openBlock as r, createElementVNode as s, Fragment as n, renderList as c, toDisplayString as d } from "vue";
1
+ import { _ as m, c as f, d as _, a as b } from "./import-file-n7AnE4rc.js";
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",
5
5
  mixins: [f],
@@ -39,20 +39,20 @@ const x = {
39
39
  class: "xl:min-w-[120px] min-w-48"
40
40
  }, F = { class: "flex items-center px-1 py-3 font-medium text-gray-800 text-start gap-x-1" }, T = { class: "divide-y divide-gray-200" }, B = { class: "text-gray-600" };
41
41
  function E(t, e, o, l, N, S) {
42
- return r(), a("div", y, [
42
+ return a(), r("div", y, [
43
43
  s("div", g, [
44
44
  s("div", w, [
45
45
  s("table", k, [
46
46
  s("thead", v, [
47
47
  s("tr", D, [
48
- (r(!0), a(n, null, c(t.dimensions, (i) => (r(), a("th", $, [
48
+ (a(!0), r(n, null, c(t.dimensions, (i) => (a(), r("th", $, [
49
49
  s("div", F, d(i), 1)
50
50
  ]))), 256))
51
51
  ])
52
52
  ]),
53
53
  s("tbody", T, [
54
- (r(!0), a(n, null, c(t.sourceData, (i, p) => (r(), a("tr", { key: p }, [
55
- (r(!0), a(n, null, c(t.dimensions, (u, h) => (r(), a("td", {
54
+ (a(!0), r(n, null, c(t.sourceData, (i, p) => (a(), r("tr", { key: p }, [
55
+ (a(!0), r(n, null, c(t.dimensions, (u, h) => (a(), r("td", {
56
56
  key: h,
57
57
  class: "py-3 whitespace-nowrap"
58
58
  }, [
@@ -1,5 +1,5 @@
1
- import { _ as o, c as s, m as i } from "./import-file-XtDaxS3X.js";
2
- import { createElementBlock as r, openBlock as n, createCommentVNode as a } from "vue";
1
+ import { _ as o, c as s, m as i } from "./import-file-n7AnE4rc.js";
2
+ import { openBlock as r, createElementBlock as n, createCommentVNode as a } from "vue";
3
3
  const c = {
4
4
  name: "VsText",
5
5
  mixins: [s],
@@ -24,11 +24,11 @@ const c = {
24
24
  }
25
25
  }, u = ["id"], d = ["innerHTML"];
26
26
  function l(t, m, x, h, e, _) {
27
- return n(), r("div", {
27
+ return r(), n("div", {
28
28
  id: e.uniqueID,
29
29
  class: "relative select-auto h-full rounded-xl text-[12px] box-border bg-white custom-scrollbar text-widget"
30
30
  }, [
31
- e.markedText ? (n(), r("div", {
31
+ e.markedText ? (r(), n("div", {
32
32
  key: 0,
33
33
  innerHTML: e.markedText
34
34
  }, null, 8, d)) : a("", !0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/bi",
3
- "version": "1.0.44",
3
+ "version": "1.0.45",
4
4
  "description": "BI data visualization module",
5
5
  "main": "dist/bi.js",
6
6
  "browser": "dist/bi.umd.cjs",