@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.
- package/config.js +12 -12
- package/dist/bi.js +1 -1
- package/dist/bi.umd.cjs +122 -109
- package/dist/{import-file-XtDaxS3X.js → import-file-n7AnE4rc.js} +10097 -10044
- package/dist/style.css +1 -1
- package/dist/{vs-donut-DsuDQZ3C.js → vs-donut-Bc9gBhHN.js} +7 -7
- package/dist/{vs-funnel-bar-CQAgEcLe.js → vs-funnel-bar-BQLFsh4u.js} +5 -5
- package/dist/{vs-list-C-gFvDvr.js → vs-list-D1NHJa-8.js} +1535 -1532
- package/dist/{vs-map-uUiqdNLp.js → vs-map-CUF5ZJo4.js} +78 -76
- package/dist/{vs-map-cluster-B9kG91Ge.js → vs-map-cluster-ZPcu4qhm.js} +51 -49
- package/dist/{vs-number-BuOWTFVp.js → vs-number-Z4ee8Kwo.js} +3 -3
- package/dist/{vs-table-BG9nb7R0.js → vs-table-BrnSztWP.js} +6 -6
- package/dist/{vs-text-BEb3W2ua.js → vs-text-Bj9iBISe.js} +4 -4
- package/package.json +1 -1
- package/server/plugins/docs.js +48 -48
- package/server/plugins/vite.js +69 -69
- package/server/routes/dashboard/controllers/utils/yaml.js +11 -11
- package/server/routes/map/controllers/cluster.js +121 -121
- package/server/routes/map/controllers/clusterVtile.js +166 -166
- package/server/routes/map/controllers/geojson.js +127 -127
- package/server/routes/map/controllers/map.js +67 -67
- package/server/routes/map/controllers/utils/downloadClusterData.js +44 -44
- package/server/routes/map/controllers/vtile.js +183 -183
- package/utils.js +12 -12
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as C, c as
|
|
3
|
-
import { resolveComponent as u,
|
|
4
|
-
const
|
|
5
|
-
components: { legendIcon:
|
|
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:
|
|
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
|
-
},
|
|
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,
|
|
61
|
+
function ee(e, t, s, o, l, a) {
|
|
62
62
|
var x, y;
|
|
63
|
-
const
|
|
64
|
-
return
|
|
65
|
-
|
|
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] = (
|
|
67
|
+
onClick: t[0] || (t[0] = (d) => l.isOpenLegend = !l.isOpenLegend)
|
|
68
68
|
}, [
|
|
69
|
-
f(
|
|
69
|
+
f(n)
|
|
70
70
|
]),
|
|
71
|
-
|
|
71
|
+
l.isOpenLegend ? (i(), E(R, {
|
|
72
72
|
key: 0,
|
|
73
73
|
to: `#wrapper-${s.mapId}`
|
|
74
74
|
}, [
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
t[2] || (t[2] =
|
|
78
|
-
|
|
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] = (
|
|
81
|
+
onClick: t[1] || (t[1] = (d) => l.isOpenLegend = !1)
|
|
82
82
|
}, [
|
|
83
83
|
f(h, { class: "w-[20px]" })
|
|
84
84
|
])
|
|
85
85
|
]),
|
|
86
|
-
|
|
87
|
-
(x = s.colors) != null && x.length ? (
|
|
88
|
-
s.colorTitle ? (
|
|
89
|
-
|
|
90
|
-
(
|
|
91
|
-
key:
|
|
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
|
-
|
|
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:
|
|
98
|
+
backgroundColor: d.color
|
|
99
99
|
})
|
|
100
|
-
}, null, 4)) :
|
|
101
|
-
|
|
100
|
+
}, null, 4)) : m("", !0),
|
|
101
|
+
r("p", K, b(d.text || d.val), 1)
|
|
102
102
|
]))), 128))
|
|
103
103
|
])
|
|
104
|
-
])) :
|
|
105
|
-
(y = s.sizes) != null && y.length ? (
|
|
106
|
-
e.sizeTitle ? (
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
var g,
|
|
110
|
-
return
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
class: V([
|
|
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
|
-
|
|
116
|
-
class: V(
|
|
115
|
+
r("div", {
|
|
116
|
+
class: V(a.sizeClass(c)),
|
|
117
117
|
style: I({
|
|
118
|
-
backgroundColor: ((
|
|
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
|
-
|
|
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)) :
|
|
125
|
+
}), 256)) : m("", !0)
|
|
126
126
|
])
|
|
127
|
-
])) :
|
|
127
|
+
])) : m("", !0)
|
|
128
128
|
])
|
|
129
129
|
])
|
|
130
|
-
], 8, ["to"])) :
|
|
130
|
+
], 8, ["to"])) : m("", !0)
|
|
131
131
|
], 64);
|
|
132
132
|
}
|
|
133
|
-
const te = /* @__PURE__ */ C(
|
|
133
|
+
const te = /* @__PURE__ */ C(A, [["render", ee]]), se = {
|
|
134
134
|
components: {
|
|
135
|
-
VsMapSetting:
|
|
136
|
-
VsMapSlotLayers:
|
|
135
|
+
VsMapSetting: B,
|
|
136
|
+
VsMapSlotLayers: H,
|
|
137
137
|
VsMapLegend: te,
|
|
138
138
|
VsMapGoHome: O,
|
|
139
|
-
VsList:
|
|
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
|
|
202
|
-
this.popupElement.style.left = `${
|
|
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: [
|
|
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
|
-
(
|
|
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((
|
|
229
|
-
o.push([">", ["get", "metric"],
|
|
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
|
|
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(
|
|
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:
|
|
245
|
+
style: l
|
|
242
246
|
});
|
|
243
247
|
}
|
|
244
248
|
}
|
|
245
|
-
}, ae = ["id"], le = ["id"],
|
|
246
|
-
function
|
|
247
|
-
var
|
|
248
|
-
const
|
|
249
|
-
return
|
|
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
|
-
|
|
257
|
+
r("div", {
|
|
254
258
|
id: e.mapId,
|
|
255
259
|
class: "w-full flex items-end relative h-[250px]"
|
|
256
|
-
},
|
|
257
|
-
|
|
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"])) :
|
|
265
|
+
}, null, 8, ["map", "coordinates"])) : m("", !0),
|
|
264
266
|
f(h, { map: e.map }, null, 8, ["map"]),
|
|
265
|
-
|
|
267
|
+
r("div", re, [
|
|
266
268
|
f(x, {
|
|
267
269
|
mapId: e.mapId,
|
|
268
|
-
colors: (
|
|
269
|
-
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
|
|
282
|
+
const ce = /* @__PURE__ */ C(oe, [["render", ne]]);
|
|
281
283
|
export {
|
|
282
|
-
|
|
284
|
+
ce as default
|
|
283
285
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as V,
|
|
3
|
-
import {
|
|
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:
|
|
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:
|
|
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(),
|
|
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),
|
|
62
|
-
var
|
|
63
|
-
return p(),
|
|
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 === ((
|
|
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,
|
|
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: ((
|
|
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(),
|
|
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: [
|
|
103
|
+
mixins: [W, P],
|
|
104
104
|
components: {
|
|
105
|
-
VsMapSetting:
|
|
105
|
+
VsMapSetting: Z,
|
|
106
106
|
VsClusterLegend: ae,
|
|
107
|
-
VsMapGoHome:
|
|
108
|
-
VsList:
|
|
109
|
-
VsMapSlotLayers:
|
|
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:
|
|
120
|
-
{ id: "chart", text: "Віджет", component:
|
|
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
|
|
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
|
-
|
|
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.
|
|
157
|
-
|
|
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
|
|
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
|
|
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" },
|
|
238
|
-
function
|
|
239
|
-
var
|
|
240
|
-
const d =
|
|
241
|
-
return p(),
|
|
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,
|
|
245
|
+
l("h3", ue, F(t.title), 1),
|
|
244
246
|
l("div", me, [
|
|
245
|
-
(p(!0),
|
|
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(),
|
|
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
|
-
|
|
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(),
|
|
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: (
|
|
275
|
+
bbox: (y = e.data) == null ? void 0 : y.bounds
|
|
274
276
|
}, null, 8, ["map", "bbox"])
|
|
275
277
|
]),
|
|
276
|
-
w(
|
|
278
|
+
w(h, {
|
|
277
279
|
mapId: e.mapId,
|
|
278
|
-
colors: (
|
|
279
|
-
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
|
-
|
|
289
|
+
M(w(u, {
|
|
288
290
|
mapId: e.mapId,
|
|
289
|
-
source: (
|
|
290
|
-
total: ((
|
|
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
|
-
|
|
297
|
-
(E = (L = e.data) == null ? void 0 : L.rows) != null && E.length ? (p(),
|
|
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: (
|
|
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",
|
|
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-
|
|
2
|
-
import {
|
|
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
|
|
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-
|
|
2
|
-
import {
|
|
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
|
|
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
|
-
(
|
|
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
|
-
(
|
|
55
|
-
(
|
|
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-
|
|
2
|
-
import {
|
|
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
|
|
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 ? (
|
|
31
|
+
e.markedText ? (r(), n("div", {
|
|
32
32
|
key: 0,
|
|
33
33
|
innerHTML: e.markedText
|
|
34
34
|
}, null, 8, d)) : a("", !0)
|