@opengis/bi 1.2.30 → 1.2.32
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/README.md +92 -92
- package/dist/bi.js +1 -1
- package/dist/bi.umd.cjs +88 -86
- package/dist/{import-file-B4o9p2_2.js → import-file-D-ISqB7l.js} +1772 -1593
- package/dist/style.css +1 -1
- package/dist/{vs-funnel-bar-BOWwPnjW.js → vs-funnel-bar-aoZzvriV.js} +3 -3
- package/dist/{vs-list-D8jGusRT.js → vs-list-CBkyJSBj.js} +53 -32
- package/dist/{vs-map-BGplOwpB.js → vs-map-C3C11qmT.js} +102 -91
- package/dist/{vs-map-cluster-CHQJV2As.js → vs-map-cluster-BsPmHIMx.js} +91 -81
- package/dist/{vs-number-jPqxFQ6d.js → vs-number-d58ftpH5.js} +3 -3
- package/dist/{vs-table-BDgIvJbY.js → vs-table-BHa5Velm.js} +6 -6
- package/dist/{vs-text-DcHOffy9.js → vs-text-Bq87gMTx.js} +4 -4
- package/package.json +77 -75
- package/plugin.js +21 -22
- package/server/helpers/mdToHTML.js +17 -17
- package/server/migrations/bi.dataset.sql +46 -46
- package/server/migrations/bi.sql +115 -112
- package/server/plugins/docs.js +48 -48
- package/server/plugins/hook.js +89 -89
- package/server/plugins/vite.js +81 -81
- package/server/routes/dashboard/controllers/dashboard.import.js +103 -103
- package/server/routes/dashboard/controllers/dashboard.js +158 -157
- package/server/routes/dashboard/controllers/dashboard.list.js +60 -60
- package/server/routes/dashboard/controllers/utils/yaml.js +11 -11
- package/server/routes/dashboard/index.mjs +26 -26
- package/server/routes/data/controllers/data.js +230 -229
- package/server/routes/data/controllers/util/chartSQL.js +49 -49
- package/server/routes/data/controllers/util/normalizeData.js +65 -65
- package/server/routes/data/index.mjs +38 -38
- package/server/routes/dataset/controllers/bi.dataset.list.js +29 -29
- package/server/routes/dataset/controllers/bi.db.list.js +19 -19
- package/server/routes/dataset/controllers/comment.js +55 -55
- package/server/routes/dataset/controllers/createDatasetPost.js +134 -134
- package/server/routes/dataset/controllers/data.js +149 -149
- package/server/routes/dataset/controllers/dbTablePreview.js +58 -58
- package/server/routes/dataset/controllers/dbTables.js +34 -34
- package/server/routes/dataset/controllers/delete.js +40 -40
- package/server/routes/dataset/controllers/deleteDataset.js +52 -52
- package/server/routes/dataset/controllers/editDataset.js +90 -90
- package/server/routes/dataset/controllers/export.js +214 -214
- package/server/routes/dataset/controllers/form.js +99 -99
- package/server/routes/dataset/controllers/format.js +46 -46
- package/server/routes/dataset/controllers/insert.js +47 -47
- package/server/routes/dataset/controllers/table.js +68 -68
- package/server/routes/dataset/controllers/update.js +43 -43
- package/server/routes/dataset/index.mjs +132 -132
- package/server/routes/dataset/utils/convertJSONToCSV.js +17 -17
- package/server/routes/dataset/utils/convertJSONToXls.js +47 -47
- package/server/routes/dataset/utils/createTableQuery.js +59 -59
- package/server/routes/dataset/utils/datasetForms.js +1 -1
- package/server/routes/dataset/utils/descriptionList.js +45 -45
- package/server/routes/dataset/utils/downloadRemoteFile.js +58 -58
- package/server/routes/dataset/utils/executeQuery.js +46 -46
- package/server/routes/dataset/utils/getLayersData.js +106 -106
- package/server/routes/dataset/utils/getTableData.js +46 -46
- package/server/routes/dataset/utils/insertDataQuery.js +12 -12
- package/server/routes/dataset/utils/metaFormat.js +24 -24
- package/server/routes/edit/controllers/dashboard.add.js +36 -36
- package/server/routes/edit/controllers/dashboard.delete.js +39 -39
- package/server/routes/edit/controllers/dashboard.edit.js +61 -61
- package/server/routes/edit/controllers/widget.add.js +78 -78
- package/server/routes/edit/controllers/widget.del.js +58 -58
- package/server/routes/edit/controllers/widget.edit.js +115 -115
- package/server/routes/edit/index.mjs +33 -33
- package/server/routes/map/controllers/cluster.js +125 -125
- package/server/routes/map/controllers/clusterVtile.js +166 -166
- package/server/routes/map/controllers/geojson.js +127 -127
- package/server/routes/map/controllers/heatmap.js +118 -118
- package/server/routes/map/controllers/map.js +69 -69
- package/server/routes/map/controllers/utils/downloadClusterData.js +44 -44
- package/server/routes/map/controllers/vtile.js +183 -183
- package/server/routes/map/index.mjs +32 -32
- package/server/templates/page/login.html +58 -58
- package/server/utils/getWidget.js +118 -117
- package/utils.js +12 -12
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { e as
|
|
3
|
-
import {
|
|
1
|
+
import { _ as O, a as A, p as T, c as F, V as P, b as G, d as W, e as Z, l as q } from "./vs-list-CBkyJSBj.js";
|
|
2
|
+
import { e as K, _ as H, V as J, c as Q, g as U, h as X, i as Y } from "./import-file-D-ISqB7l.js";
|
|
3
|
+
import { openBlock as p, createElementBlock as x, createElementVNode as l, normalizeClass as C, Fragment as D, renderList as R, toDisplayString as N, normalizeStyle as $, createCommentVNode as S, createBlock as z, unref as j, mergeProps as ee, resolveComponent as v, resolveDynamicComponent as te, withDirectives as M, createVNode as w, vShow as I } from "vue";
|
|
4
4
|
/**
|
|
5
5
|
* @license lucide-vue-next v0.577.0 - ISC
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the ISC license.
|
|
8
8
|
* See the LICENSE file in the root directory of this source tree.
|
|
9
9
|
*/
|
|
10
|
-
const se =
|
|
10
|
+
const se = K("map", [
|
|
11
11
|
[
|
|
12
12
|
"path",
|
|
13
13
|
{
|
|
@@ -18,7 +18,7 @@ const se = W("map", [
|
|
|
18
18
|
["path", { d: "M15 5.764v15", key: "1pn4in" }],
|
|
19
19
|
["path", { d: "M9 3.236v15", key: "1uimfh" }]
|
|
20
20
|
]), oe = {
|
|
21
|
-
components: { legendIcon:
|
|
21
|
+
components: { legendIcon: A, closeIcon: O },
|
|
22
22
|
props: {
|
|
23
23
|
mapId: { type: String },
|
|
24
24
|
colors: { type: Array },
|
|
@@ -42,11 +42,11 @@ const se = W("map", [
|
|
|
42
42
|
return this.cluster ? "rounded-sm" : "rounded-full";
|
|
43
43
|
},
|
|
44
44
|
sortedSizes() {
|
|
45
|
-
return [...this.sizes].sort((t,
|
|
45
|
+
return [...this.sizes].sort((t, a) => t - a);
|
|
46
46
|
},
|
|
47
47
|
maxWidht() {
|
|
48
|
-
var
|
|
49
|
-
const t = ((
|
|
48
|
+
var r;
|
|
49
|
+
const t = ((r = this.sizes) == null ? void 0 : r.length) - 1;
|
|
50
50
|
return this.calcSize(t);
|
|
51
51
|
}
|
|
52
52
|
},
|
|
@@ -65,26 +65,26 @@ const se = W("map", [
|
|
|
65
65
|
key: 0,
|
|
66
66
|
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"
|
|
67
67
|
}, re = { class: "w-[80px] mr-[10px]" }, ie = ["title"], ne = { class: "text-[10px] mb-[2px] text-[#1F2937] font-normal leading-[1.2]" };
|
|
68
|
-
function le(t,
|
|
69
|
-
var
|
|
70
|
-
return (
|
|
68
|
+
function le(t, a, r, o, e, s) {
|
|
69
|
+
var g;
|
|
70
|
+
return (g = r.sizes) != null && g.length ? (p(), x("div", ae, [
|
|
71
71
|
l("div", re, [
|
|
72
|
-
|
|
72
|
+
a[0] || (a[0] = l("p", { class: "text-[10px] mb-[2px] text-[#1F2937] leading-[1.2]" }, " Дані відсутні ", -1)),
|
|
73
73
|
l("div", {
|
|
74
|
-
class:
|
|
74
|
+
class: C([s.sizeClass(t.index), "w-full border border-gray-500"])
|
|
75
75
|
}, null, 2)
|
|
76
76
|
]),
|
|
77
|
-
|
|
78
|
-
var
|
|
79
|
-
return p(),
|
|
77
|
+
s.sortedSizes.length ? (p(!0), x(D, { key: 0 }, R(s.sortedSizes, (c, n) => {
|
|
78
|
+
var y, f, b, d, _, h, u, m;
|
|
79
|
+
return p(), x("div", {
|
|
80
80
|
class: "w-[80px]",
|
|
81
|
-
title: n === ((
|
|
81
|
+
title: n === ((y = s.sortedSizes) == null ? void 0 : y.length) - 1 ? ">" + c : n == ((f = s.sortedSizes) == null ? void 0 : f.length) - 1 ? ">" + s.sortedSizes[((b = s.sortedSizes) == null ? void 0 : b.length) - 1] : c + "-" + s.sortedSizes[n + 1]
|
|
82
82
|
}, [
|
|
83
|
-
l("p", ne,
|
|
83
|
+
l("p", ne, N(n === ((d = s.sortedSizes) == null ? void 0 : d.length) - 1 ? ">" + parseInt(c) : n == ((_ = s.sortedSizes) == null ? void 0 : _.length) - 1 ? ">" + parseInt(s.sortedSizes[((h = s.sortedSizes) == null ? void 0 : h.length) - 1]) : parseInt(c) + "-" + parseInt(s.sortedSizes[n + 1])), 1),
|
|
84
84
|
l("div", {
|
|
85
|
-
class:
|
|
86
|
-
style:
|
|
87
|
-
backgroundColor: ((
|
|
85
|
+
class: C([s.sizeClass(n), "w-full border border-r-0 border-gray-500"]),
|
|
86
|
+
style: $({
|
|
87
|
+
backgroundColor: ((m = (u = e.palette) == null ? void 0 : u[r.color]) == null ? void 0 : m[n]) || r.color
|
|
88
88
|
})
|
|
89
89
|
}, null, 6)
|
|
90
90
|
], 8, ie);
|
|
@@ -94,16 +94,16 @@ function le(t, s, o, a, e, r) {
|
|
|
94
94
|
const pe = /* @__PURE__ */ H(oe, [["render", le]]), ce = {
|
|
95
95
|
__name: "icon-map",
|
|
96
96
|
setup(t) {
|
|
97
|
-
return (
|
|
97
|
+
return (a, r) => (p(), z(j(se), ee(a.$attrs, { size: 24 }), null, 16));
|
|
98
98
|
}
|
|
99
99
|
}, de = {
|
|
100
|
-
mixins: [Q,
|
|
100
|
+
mixins: [Q, Z],
|
|
101
101
|
components: {
|
|
102
|
-
VsMapSetting:
|
|
102
|
+
VsMapSetting: W,
|
|
103
103
|
VsClusterLegend: pe,
|
|
104
|
-
VsMapGoHome:
|
|
104
|
+
VsMapGoHome: G,
|
|
105
105
|
VsList: P,
|
|
106
|
-
VsMapSlotLayers:
|
|
106
|
+
VsMapSlotLayers: F,
|
|
107
107
|
// VsListbar,
|
|
108
108
|
VsBar: J
|
|
109
109
|
},
|
|
@@ -139,52 +139,62 @@ const pe = /* @__PURE__ */ H(oe, [["render", le]]), ce = {
|
|
|
139
139
|
},
|
|
140
140
|
methods: {
|
|
141
141
|
async getMapData() {
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
var o, e;
|
|
143
|
+
if (this.prefetchedData) {
|
|
144
|
+
this.data = this.prefetchedData, this.$emit("update:widgetData", this.data), setTimeout(() => {
|
|
145
|
+
var s;
|
|
146
|
+
return (s = this.map) == null ? void 0 : s.resize();
|
|
147
|
+
});
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
const t = ((o = this.resolveWidgetId) == null ? void 0 : o.call(this)) || this.widget, a = ((e = this.resolveDashboardId) == null ? void 0 : e.call(this)) || this.dashboard, r = await U.get(
|
|
151
|
+
`/bi-cluster?widget=${t}&dashboard=${a}`
|
|
144
152
|
);
|
|
145
|
-
this.data =
|
|
153
|
+
this.data = r, this.$emit("update:widgetData", this.data), setTimeout(() => {
|
|
146
154
|
var s;
|
|
147
155
|
return (s = this.map) == null ? void 0 : s.resize();
|
|
148
156
|
});
|
|
149
157
|
},
|
|
150
158
|
async loadHandler() {
|
|
151
|
-
var
|
|
152
|
-
this.baseColor = ((
|
|
159
|
+
var g, c, n, y, f, b, d;
|
|
160
|
+
this.baseColor = ((g = this.data.style) == null ? void 0 : g.color) || "blue";
|
|
153
161
|
const t = ["case"];
|
|
154
|
-
(
|
|
155
|
-
var
|
|
156
|
-
t.push([">", ["get", "metric"],
|
|
162
|
+
(y = (n = (c = this.data) == null ? void 0 : c.sizes) == null ? void 0 : n.toReversed()) == null || y.forEach((_, h) => {
|
|
163
|
+
var u, m;
|
|
164
|
+
t.push([">", ["get", "metric"], _]), t.push((m = (u = T[this.baseColor]) == null ? void 0 : u.toReversed()) == null ? void 0 : m[h]), h++;
|
|
157
165
|
}), t.push("gray");
|
|
158
|
-
const
|
|
166
|
+
const a = {
|
|
159
167
|
type: "polygon",
|
|
160
168
|
color: t,
|
|
161
169
|
opacity: 0.4
|
|
162
170
|
};
|
|
163
|
-
Object.assign(
|
|
171
|
+
Object.assign(a, this.data.style || {});
|
|
172
|
+
const r = ((f = this.resolveWidgetId) == null ? void 0 : f.call(this)) || this.widget, o = ((b = this.resolveDashboardId) == null ? void 0 : b.call(this)) || this.dashboard, e = ((d = this.resolvePrefix) == null ? void 0 : d.call(this)) || "/api";
|
|
173
|
+
this.map.getSource("bi") || this.addVtileLayer({
|
|
164
174
|
id: "bi",
|
|
165
|
-
url: `${window.location.origin}/
|
|
166
|
-
style:
|
|
175
|
+
url: `${window.location.origin}${e}/bi-cluster-vtile/{z}/{x}/{y}.vmt?widget=${r}&dashboard=${o}&nocache=1`,
|
|
176
|
+
style: a
|
|
167
177
|
}), this.map.getLayer("highlighted") && this.map.removeLayer("highlighted"), this.map.getSource("highlighted") && this.map.removeSource("highlighted");
|
|
168
|
-
const
|
|
169
|
-
this.kattotg &&
|
|
178
|
+
const s = ["case"];
|
|
179
|
+
this.kattotg && s.push(
|
|
170
180
|
["==", ["to-string", ["get", "name"]], String(this.kattotg)],
|
|
171
181
|
"red"
|
|
172
|
-
),
|
|
182
|
+
), s.push("transparent"), this.map.addLayer({
|
|
173
183
|
id: "highlighted",
|
|
174
184
|
type: "fill",
|
|
175
185
|
source: "bi",
|
|
176
186
|
"source-layer": "bi",
|
|
177
187
|
paint: {
|
|
178
|
-
"fill-color":
|
|
188
|
+
"fill-color": s,
|
|
179
189
|
"fill-opacity": 0.6
|
|
180
190
|
}
|
|
181
191
|
});
|
|
182
192
|
},
|
|
183
193
|
async createMap() {
|
|
184
|
-
var
|
|
185
|
-
const t = await
|
|
194
|
+
var r, o;
|
|
195
|
+
const t = await q();
|
|
186
196
|
if (!t) return;
|
|
187
|
-
const
|
|
197
|
+
const a = {
|
|
188
198
|
version: 8,
|
|
189
199
|
glyphs: "https://cdn.softpro.ua/data/fonts/{fontstack}/{range}.pbf",
|
|
190
200
|
sources: {},
|
|
@@ -192,9 +202,9 @@ const pe = /* @__PURE__ */ H(oe, [["render", le]]), ce = {
|
|
|
192
202
|
};
|
|
193
203
|
this.map = await new t.Map({
|
|
194
204
|
container: this.mapId,
|
|
195
|
-
style:
|
|
205
|
+
style: a,
|
|
196
206
|
center: [31, 48.5],
|
|
197
|
-
zoom: ((
|
|
207
|
+
zoom: ((o = (r = this.data) == null ? void 0 : r.style) == null ? void 0 : o.zoom) || 5,
|
|
198
208
|
minZoom: 3,
|
|
199
209
|
maxZoom: 20,
|
|
200
210
|
attributionControl: !1
|
|
@@ -212,40 +222,40 @@ const pe = /* @__PURE__ */ H(oe, [["render", le]]), ce = {
|
|
|
212
222
|
});
|
|
213
223
|
},
|
|
214
224
|
moveMouseHadler(t) {
|
|
215
|
-
var
|
|
225
|
+
var a;
|
|
216
226
|
try {
|
|
217
|
-
const
|
|
218
|
-
if (!
|
|
227
|
+
const r = this.map.queryRenderedFeatures(t.point), o = ((a = r[0]) == null ? void 0 : a.properties) || {};
|
|
228
|
+
if (!r.length) {
|
|
219
229
|
this.map.getCanvas().style.cursor = "", this.popupElement && this.popupElement.remove();
|
|
220
230
|
return;
|
|
221
231
|
}
|
|
222
232
|
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
|
-
${(
|
|
233
|
+
${(o == null ? void 0 : o.x) || (o == null ? void 0 : o.title) || (o == null ? void 0 : o.name) || ""}
|
|
224
234
|
</div>
|
|
225
235
|
|
|
226
236
|
<div class="flex justify-between items-center text-xs px-2 py-0.5 text-gray-500 ">
|
|
227
237
|
<span class="flex items-center">
|
|
228
238
|
<span class="font-medium mr-[6px]">Значення</span>
|
|
229
239
|
</span>
|
|
230
|
-
<span>${(
|
|
240
|
+
<span>${(o == null ? void 0 : o.metric) || 0}</span>
|
|
231
241
|
</div>`;
|
|
232
242
|
const e = this.map.project(t.lngLat);
|
|
233
243
|
this.popupElement.style.left = `${e.x}px`, this.popupElement.style.top = `${e.y - 60}px`, this.map.getContainer().appendChild(this.popupElement);
|
|
234
|
-
} catch (
|
|
235
|
-
console.error(
|
|
244
|
+
} catch (r) {
|
|
245
|
+
console.error(r);
|
|
236
246
|
}
|
|
237
247
|
}
|
|
238
248
|
}
|
|
239
|
-
}, he = { class: "h-full" }, ue = { class: "flex items-start justify-between mb-[6px] w-full" }, me = { class: "text-gray-800 font-[600]" }, ge = { class: "flex gap-2" }, ye = ["onClick"], fe = ["id"],
|
|
240
|
-
function
|
|
241
|
-
var
|
|
242
|
-
const
|
|
243
|
-
return p(),
|
|
249
|
+
}, he = { class: "h-full" }, ue = { class: "flex items-start justify-between mb-[6px] w-full" }, me = { class: "text-gray-800 font-[600]" }, ge = { class: "flex gap-2" }, ye = ["onClick"], fe = ["id"], be = ["id"], _e = { class: "absolute flex flex-col right-[10px] top-[105px] gap-1" }, ve = { class: "h-[calc(250px)]" };
|
|
250
|
+
function xe(t, a, r, o, e, s) {
|
|
251
|
+
var d, _, h, u, m, V, k, L, E, B;
|
|
252
|
+
const g = v("VsMapSetting"), c = v("VsMapSlotLayers"), n = v("VsMapGoHome"), y = v("VsClusterLegend"), f = v("VsList"), b = v("VsBar");
|
|
253
|
+
return p(), x("div", he, [
|
|
244
254
|
l("div", ue, [
|
|
245
|
-
l("h3", me,
|
|
255
|
+
l("h3", me, N(t.title), 1),
|
|
246
256
|
l("div", ge, [
|
|
247
|
-
(p(!0),
|
|
248
|
-
class:
|
|
257
|
+
(p(!0), x(D, null, R(e.options, (i) => (p(), x("button", {
|
|
258
|
+
class: C(["p-1 text-gray-700 border rounded", [e.activeTab === (i == null ? void 0 : i.id) ? "ring-2 ring-blue-500" : ""]]),
|
|
249
259
|
onClick: (we) => e.activeTab = i == null ? void 0 : i.id
|
|
250
260
|
}, [
|
|
251
261
|
(p(), z(te(i == null ? void 0 : i.component), {
|
|
@@ -262,41 +272,41 @@ function ve(t, s, o, a, e, r) {
|
|
|
262
272
|
l("div", {
|
|
263
273
|
id: e.mapId,
|
|
264
274
|
class: "h-full w-full flex items-end min-h-[250px]"
|
|
265
|
-
}, null, 8,
|
|
266
|
-
e.showSetting ? (p(), z(
|
|
275
|
+
}, null, 8, be),
|
|
276
|
+
e.showSetting ? (p(), z(g, {
|
|
267
277
|
key: 0,
|
|
268
278
|
map: e.map,
|
|
269
279
|
coordinates: e.coordinatesByMouse
|
|
270
280
|
}, null, 8, ["map", "coordinates"])) : S("", !0),
|
|
271
281
|
w(c, { map: e.map }, null, 8, ["map"]),
|
|
272
|
-
l("div",
|
|
282
|
+
l("div", _e, [
|
|
273
283
|
w(n, {
|
|
274
284
|
map: e.map,
|
|
275
|
-
bbox: (
|
|
285
|
+
bbox: (d = e.data) == null ? void 0 : d.bounds
|
|
276
286
|
}, null, 8, ["map", "bbox"])
|
|
277
287
|
]),
|
|
278
|
-
w(
|
|
288
|
+
w(y, {
|
|
279
289
|
mapId: e.mapId,
|
|
280
|
-
colors: (
|
|
281
|
-
sizes: (
|
|
290
|
+
colors: (_ = e.data) == null ? void 0 : _.colors,
|
|
291
|
+
sizes: (h = e.data) == null ? void 0 : h.sizes,
|
|
282
292
|
color: e.baseColor,
|
|
283
293
|
changeOpacityItem: "true",
|
|
284
294
|
cluster: "true"
|
|
285
295
|
}, null, 8, ["mapId", "colors", "sizes", "color"])
|
|
286
296
|
], 8, fe), [
|
|
287
|
-
[
|
|
297
|
+
[I, e.activeTab == "map"]
|
|
288
298
|
]),
|
|
289
|
-
M(w(
|
|
299
|
+
M(w(f, {
|
|
290
300
|
mapId: e.mapId,
|
|
291
|
-
source: (
|
|
292
|
-
total: ((
|
|
293
|
-
count: ((
|
|
294
|
-
onKattotg:
|
|
301
|
+
source: (u = e.data) == null ? void 0 : u.rows,
|
|
302
|
+
total: ((m = e.data) == null ? void 0 : m.total) || 0,
|
|
303
|
+
count: ((V = e.data) == null ? void 0 : V.count) || 0,
|
|
304
|
+
onKattotg: a[0] || (a[0] = (i) => e.kattotg = i)
|
|
295
305
|
}, null, 8, ["mapId", "source", "total", "count"]), [
|
|
296
|
-
[
|
|
306
|
+
[I, e.activeTab == "table"]
|
|
297
307
|
]),
|
|
298
|
-
M(l("div",
|
|
299
|
-
(L = (k = e.data) == null ? void 0 : k.rows) != null && L.length ? (p(), z(
|
|
308
|
+
M(l("div", ve, [
|
|
309
|
+
(L = (k = e.data) == null ? void 0 : k.rows) != null && L.length ? (p(), z(b, {
|
|
300
310
|
key: 0,
|
|
301
311
|
source: (B = (E = e.data) == null ? void 0 : E.rows) == null ? void 0 : B.map((i) => ({
|
|
302
312
|
title: i == null ? void 0 : i.title,
|
|
@@ -304,11 +314,11 @@ function ve(t, s, o, a, e, r) {
|
|
|
304
314
|
}))
|
|
305
315
|
}, null, 8, ["source"])) : S("", !0)
|
|
306
316
|
], 512), [
|
|
307
|
-
[
|
|
317
|
+
[I, e.activeTab == "chart"]
|
|
308
318
|
])
|
|
309
319
|
]);
|
|
310
320
|
}
|
|
311
|
-
const
|
|
321
|
+
const Ie = /* @__PURE__ */ H(de, [["render", xe]]);
|
|
312
322
|
export {
|
|
313
|
-
|
|
323
|
+
Ie as default
|
|
314
324
|
};
|
|
@@ -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-D-ISqB7l.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, b as _, d as b } from "./import-file-
|
|
2
|
-
import {
|
|
1
|
+
import { _ as m, c as f, b as _, d as b } from "./import-file-D-ISqB7l.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 s, c as a, m as d } from "./import-file-
|
|
2
|
-
import {
|
|
1
|
+
import { _ as s, c as a, m as d } from "./import-file-D-ISqB7l.js";
|
|
2
|
+
import { openBlock as n, createElementBlock as o, createCommentVNode as c } from "vue";
|
|
3
3
|
const u = {
|
|
4
4
|
name: "VsText",
|
|
5
5
|
mixins: [a],
|
|
@@ -35,11 +35,11 @@ const u = {
|
|
|
35
35
|
}
|
|
36
36
|
}, l = ["id"], m = ["innerHTML"];
|
|
37
37
|
function x(e, t, i, h, r, p) {
|
|
38
|
-
return
|
|
38
|
+
return n(), o("div", {
|
|
39
39
|
id: r.uniqueID,
|
|
40
40
|
class: "relative select-auto h-full rounded-xl text-[12px] box-border bg-white custom-scrollbar text-widget"
|
|
41
41
|
}, [
|
|
42
|
-
r.markedText ? (
|
|
42
|
+
r.markedText ? (n(), o("div", {
|
|
43
43
|
key: 0,
|
|
44
44
|
innerHTML: r.markedText
|
|
45
45
|
}, null, 8, m)) : c("", !0)
|
package/package.json
CHANGED
|
@@ -1,75 +1,77 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@opengis/bi",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "BI data visualization module",
|
|
5
|
-
"main": "dist/bi.js",
|
|
6
|
-
"browser": "dist/bi.umd.cjs",
|
|
7
|
-
"type": "module",
|
|
8
|
-
"files": [
|
|
9
|
-
"dist",
|
|
10
|
-
"server",
|
|
11
|
-
"plugin.js",
|
|
12
|
-
"utils.js"
|
|
13
|
-
],
|
|
14
|
-
"scripts": {
|
|
15
|
-
"patch": "npm version patch && git push && npm publish",
|
|
16
|
-
"prepublishOnly": "npm run build:lib",
|
|
17
|
-
"debug": "node --watch-path=server server",
|
|
18
|
-
"dev": "vite",
|
|
19
|
-
"type-check": "vue-tsc --noEmit",
|
|
20
|
-
"build": "vite build",
|
|
21
|
-
"build:lib": "cross-env APP=true vite build",
|
|
22
|
-
"build-app": "vite build",
|
|
23
|
-
"lint": "eslint .",
|
|
24
|
-
"format": "prettier --write .",
|
|
25
|
-
"test": "node --test",
|
|
26
|
-
"test21": "node --test ./test/plugins/*",
|
|
27
|
-
"start": "
|
|
28
|
-
"prod": "NODE_ENV=production npm run start",
|
|
29
|
-
"docs:i": "npm install --prefix ./docs",
|
|
30
|
-
"docs:dev": "npm run --prefix ./docs docs:dev",
|
|
31
|
-
"docs:build": "npm run --prefix ./docs docs:build",
|
|
32
|
-
"docs:preview": "npm run --prefix ./docs docs:preview",
|
|
33
|
-
"adduser": "node script/adduser.js"
|
|
34
|
-
},
|
|
35
|
-
"keywords": [
|
|
36
|
-
"bi",
|
|
37
|
-
"data visualization",
|
|
38
|
-
"chart",
|
|
39
|
-
"opengis",
|
|
40
|
-
"vue",
|
|
41
|
-
"fastify"
|
|
42
|
-
],
|
|
43
|
-
"author": "Softpro",
|
|
44
|
-
"license": "ISC",
|
|
45
|
-
"dependencies": {
|
|
46
|
-
"@mapbox/sphericalmercator": "^1.2.0",
|
|
47
|
-
"@opengis/table": "^0.0.30",
|
|
48
|
-
"lucide-vue-next": "^0.577.0"
|
|
49
|
-
},
|
|
50
|
-
"
|
|
51
|
-
"@opengis/
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"@
|
|
55
|
-
"@
|
|
56
|
-
"@
|
|
57
|
-
"@
|
|
58
|
-
"@
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"eslint
|
|
63
|
-
"eslint-
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"vue
|
|
74
|
-
|
|
75
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@opengis/bi",
|
|
3
|
+
"version": "1.2.32",
|
|
4
|
+
"description": "BI data visualization module",
|
|
5
|
+
"main": "dist/bi.js",
|
|
6
|
+
"browser": "dist/bi.umd.cjs",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"server",
|
|
11
|
+
"plugin.js",
|
|
12
|
+
"utils.js"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"patch": "npm version patch && git push && npm publish",
|
|
16
|
+
"prepublishOnly": "npm run build:lib",
|
|
17
|
+
"debug": "node --watch-path=server server",
|
|
18
|
+
"dev": "vite",
|
|
19
|
+
"type-check": "vue-tsc --noEmit",
|
|
20
|
+
"build": "vite build",
|
|
21
|
+
"build:lib": "cross-env APP=true vite build",
|
|
22
|
+
"build-app": "vite build",
|
|
23
|
+
"lint": "eslint .",
|
|
24
|
+
"format": "prettier --write .",
|
|
25
|
+
"test": "node --test",
|
|
26
|
+
"test21": "node --test ./test/plugins/*",
|
|
27
|
+
"start": "bun --env-file=.env.bi server.js",
|
|
28
|
+
"prod": "NODE_ENV=production npm run start",
|
|
29
|
+
"docs:i": "npm install --prefix ./docs",
|
|
30
|
+
"docs:dev": "npm run --prefix ./docs docs:dev",
|
|
31
|
+
"docs:build": "npm run --prefix ./docs docs:build",
|
|
32
|
+
"docs:preview": "npm run --prefix ./docs docs:preview",
|
|
33
|
+
"adduser": "node script/adduser.js"
|
|
34
|
+
},
|
|
35
|
+
"keywords": [
|
|
36
|
+
"bi",
|
|
37
|
+
"data visualization",
|
|
38
|
+
"chart",
|
|
39
|
+
"opengis",
|
|
40
|
+
"vue",
|
|
41
|
+
"fastify"
|
|
42
|
+
],
|
|
43
|
+
"author": "Softpro",
|
|
44
|
+
"license": "ISC",
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@mapbox/sphericalmercator": "^1.2.0",
|
|
47
|
+
"@opengis/table": "^0.0.30",
|
|
48
|
+
"lucide-vue-next": "^0.577.0"
|
|
49
|
+
},
|
|
50
|
+
"peerDependencies": {
|
|
51
|
+
"@opengis/fastify-table": "^2.1.3"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@opengis/core": "^0.0.33",
|
|
55
|
+
"@opengis/form": "0.0.137",
|
|
56
|
+
"@turf/turf": "^7.3.4",
|
|
57
|
+
"@types/node": "^22.19.17",
|
|
58
|
+
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
59
|
+
"@typescript-eslint/parser": "^6.21.0",
|
|
60
|
+
"@vitejs/plugin-vue": "^5.2.4",
|
|
61
|
+
"cross-env": "^10.1.0",
|
|
62
|
+
"eslint": "^8.57.1",
|
|
63
|
+
"eslint-config-airbnb-base": "^15.0.0",
|
|
64
|
+
"eslint-config-prettier": "^9.1.2",
|
|
65
|
+
"eslint-plugin-vue": "^9.33.0",
|
|
66
|
+
"globals": "^15.15.0",
|
|
67
|
+
"marked": "^14.1.4",
|
|
68
|
+
"prettier": "^3.8.1",
|
|
69
|
+
"rollup-plugin-visualizer": "^7.0.1",
|
|
70
|
+
"sass-embedded": "1.89.2",
|
|
71
|
+
"typescript": "^5.9.3",
|
|
72
|
+
"vite": "^5.4.21",
|
|
73
|
+
"vue": "^3.5.32",
|
|
74
|
+
"vue-router": "^4.6.4",
|
|
75
|
+
"vue-tsc": "^2.2.12"
|
|
76
|
+
}
|
|
77
|
+
}
|
package/plugin.js
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import fp from 'fastify-plugin';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
fastify.register(import('./server/routes/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
fastify.register(import('./server/routes/
|
|
15
|
-
fastify.register(import('./server/routes/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export default fp(plugin);
|
|
1
|
+
import fp from 'fastify-plugin';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
4
|
+
|
|
5
|
+
import { /*config, addTemplateDir,*/ pgClients, execMigrations } from '@opengis/fastify-table/utils.js';
|
|
6
|
+
|
|
7
|
+
const dirName = path.dirname(fileURLToPath(import.meta.url));
|
|
8
|
+
|
|
9
|
+
async function plugin(fastify, opt) {
|
|
10
|
+
fastify.register(import('./server/routes/dashboard/index.mjs'), opt);
|
|
11
|
+
fastify.register(import('./server/routes/dataset/index.mjs'), opt);
|
|
12
|
+
|
|
13
|
+
fastify.register(import('./server/routes/data/index.mjs'), opt);
|
|
14
|
+
fastify.register(import('./server/routes/edit/index.mjs'), opt);
|
|
15
|
+
fastify.register(import('./server/routes/map/index.mjs'), opt);
|
|
16
|
+
// config.templates?.forEach(el => addTemplateDir(el));
|
|
17
|
+
|
|
18
|
+
const dir = path.join(dirName, 'server/migrations');
|
|
19
|
+
execMigrations(dir, pgClients.client).catch(err => console.log(err));
|
|
20
|
+
}
|
|
21
|
+
export default fp(plugin);
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import md from 'markdown-it';
|
|
2
|
-
|
|
3
|
-
const md1 = md({ html: true });
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Перетворення з файла readme.md до формату HTML.
|
|
7
|
-
* Потрабно вставити в хелпер шлях до файла або текст readme.md і за допомогою бібліотеки markdown-it перетвориться в HTML.
|
|
8
|
-
|
|
9
|
-
* @returns {String} Returns HTML
|
|
10
|
-
*/
|
|
11
|
-
export default function mdToHTML(data, options) {
|
|
12
|
-
// auto detect HTML or MD
|
|
13
|
-
// const result = md().render(data);
|
|
14
|
-
if (!data) return 'empty data';
|
|
15
|
-
const result = md1.render(data);
|
|
16
|
-
return result;
|
|
17
|
-
};
|
|
1
|
+
import md from 'markdown-it';
|
|
2
|
+
|
|
3
|
+
const md1 = md({ html: true });
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Перетворення з файла readme.md до формату HTML.
|
|
7
|
+
* Потрабно вставити в хелпер шлях до файла або текст readme.md і за допомогою бібліотеки markdown-it перетвориться в HTML.
|
|
8
|
+
|
|
9
|
+
* @returns {String} Returns HTML
|
|
10
|
+
*/
|
|
11
|
+
export default function mdToHTML(data, options) {
|
|
12
|
+
// auto detect HTML or MD
|
|
13
|
+
// const result = md().render(data);
|
|
14
|
+
if (!data) return 'empty data';
|
|
15
|
+
const result = md1.render(data);
|
|
16
|
+
return result;
|
|
17
|
+
};
|