@opengis/bi 1.0.14 → 1.0.15
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 +50 -50
- package/config.js +12 -12
- package/dist/bi.js +1 -1
- package/dist/bi.umd.cjs +63 -63
- package/dist/{import-file-DUp3rsNI.js → import-file-CRC0sYYT.js} +8055 -7987
- package/dist/{map-component-mixin-CGM0P5ub.js → map-component-mixin-BCtWEvzv.js} +3795 -2116
- package/dist/style.css +1 -1
- package/dist/{vs-calendar-cOoinEwc.js → vs-calendar-5ot79n0N.js} +20 -9
- package/dist/{vs-funnel-bar-kLkPoIhJ.js → vs-funnel-bar-CLo6gXI_.js} +2 -2
- package/dist/{vs-heatmap-3XAVGTSo.js → vs-heatmap-DHGA8dRk.js} +3 -4
- package/dist/{vs-map-cluster-BWJPx7wE.js → vs-map-cluster-CNgX6JVF.js} +2 -2
- package/dist/{vs-map-B1tr6V5_.js → vs-map-pIn5wS4G.js} +2 -2
- package/dist/{vs-number-CrU7LmkV.js → vs-number-DYfok8VU.js} +19 -12
- package/dist/{vs-text-DRPx3aID.js → vs-text-Dckykz09.js} +19 -14
- package/package.json +107 -97
- package/plugin.js +14 -13
- package/server/migrations/bi.dataset.sql +26 -0
- package/server/migrations/bi.sql +93 -93
- package/server/plugins/docs.js +48 -48
- package/server/plugins/hook.js +89 -89
- package/server/plugins/vite.js +69 -69
- package/server/routes/dashboard/controllers/dashboard.delete.js +38 -37
- package/server/routes/dashboard/controllers/dashboard.js +118 -114
- package/server/routes/dashboard/controllers/dashboard.list.js +30 -36
- package/server/routes/dashboard/controllers/utils/yaml.js +11 -11
- package/server/routes/dashboard/index.mjs +25 -25
- package/server/routes/data/controllers/data.js +167 -156
- package/server/routes/data/controllers/util/chartSQL.js +42 -39
- package/server/routes/data/controllers/util/normalizeData.js +59 -56
- package/server/routes/data/index.mjs +29 -24
- package/server/routes/dataset/controllers/bi.dataset.demo.add.js +97 -0
- package/server/routes/dataset/controllers/bi.dataset.import.js +67 -0
- package/server/routes/dataset/controllers/util/create.table.js +22 -0
- package/server/routes/dataset/controllers/util/prepare.data.js +49 -0
- package/server/routes/dataset/index.mjs +19 -0
- package/server/routes/db/controllers/dbTablePreview.js +63 -63
- package/server/routes/db/controllers/dbTables.js +36 -36
- package/server/routes/db/index.mjs +17 -17
- package/server/routes/edit/controllers/dashboard.add.js +26 -24
- package/server/routes/edit/controllers/dashboard.edit.js +46 -44
- package/server/routes/edit/controllers/widget.add.js +75 -73
- package/server/routes/edit/controllers/widget.del.js +69 -70
- package/server/routes/edit/controllers/widget.edit.js +52 -103
- package/server/routes/edit/index.mjs +31 -31
- package/server/routes/map/controllers/cluster.js +109 -104
- package/server/routes/map/controllers/clusterVtile.js +166 -213
- package/server/routes/map/controllers/geojson.js +127 -127
- package/server/routes/map/controllers/map.js +60 -57
- package/server/routes/map/controllers/utils/downloadClusterData.js +43 -0
- package/server/routes/map/controllers/vtile.js +183 -182
- package/server/routes/map/index.mjs +25 -25
- package/server/utils/getWidget.js +85 -83
- package/utils.js +12 -12
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.custom-x-scrollbar{overflow-x:auto;overflow-y:clip}.custom-x-scrollbar::-webkit-scrollbar{height:6px}.custom-x-scrollbar::-webkit-scrollbar-thumb{background-color:#e0e0e0}.custom-x-scrollbar::-webkit-scrollbar-track{background-color:#f1f1f1}.ui-dialog__wrapper[data-v-
|
|
1
|
+
.custom-x-scrollbar{overflow-x:auto;overflow-y:clip}.custom-x-scrollbar::-webkit-scrollbar{height:6px}.custom-x-scrollbar::-webkit-scrollbar-thumb{background-color:#e0e0e0}.custom-x-scrollbar::-webkit-scrollbar-track{background-color:#f1f1f1}.ui-dialog__wrapper[data-v-307b1e51]{position:relative}.ui-dialog__modal[data-v-307b1e51]{margin:10px;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);min-height:0;height:fit-content;max-height:80vh;overflow:hidden}.ui-dialog__content[data-v-307b1e51]{min-height:0;height:100%;overflow:auto}.ui-dialog__content[data-v-307b1e51]::-webkit-scrollbar{width:6px;height:6px;background-color:#f5f5f5}.ui-dialog__content[data-v-307b1e51]::-webkit-scrollbar-thumb{border-radius:10px;background-color:#d9d9d9bf}.ui-dialog__content[data-v-307b1e51]::-webkit-scrollbar-track{background-color:#f5f5f5}@media (max-width: 650px){.ui-dialog__modal[data-v-307b1e51]{top:50%}}.fade-enter-active[data-v-307b1e51],.fade-leave-active[data-v-307b1e51]{transition:opacity .2s}.fade-enter-from[data-v-307b1e51],.fade-leave-to[data-v-307b1e51]{opacity:0}.content-enter-active[data-v-307b1e51],.content-leave-active[data-v-307b1e51]{transition:transform .4s}.content-enter-from[data-v-307b1e51],.content-leave-to[data-v-307b1e51]{transform:translate(-50%,-50%) scale(.95)}.vs-chart{width:100%;height:100%}.vs-chart-tooltip{border-radius:7px;max-height:100px;max-width:340px;min-width:140px;background-color:#fff;box-shadow:0 0 8px #0000002e}.vs-chart-tooltip__head{padding:5px;border-bottom:1px solid #eee;margin-bottom:5px}.vs-chart-tooltip__head-title{font-size:14px;font-weight:700;display:flex;align-items:center}.vs-chart-tooltip__head-value{margin-right:5px}.vs-chart-tooltip__head-series{font-size:14px;display:flex;align-items:center}.vs-chart-tooltip__color{width:12px;height:12px;display:block;border-radius:50%;margin-right:5px}.vs-chart-tooltip__body{padding:5px;font-size:14px;display:flex;align-items:start;flex-direction:column}.vs-chart-tooltip__body .vs-chart-tooltip__color{border-radius:3px}.vs-chart-tooltip__item{width:100%;display:flex;align-items:center;justify-content:space-between}.vs-chart-tooltip__text{margin-right:auto}.vs-chart-tooltip__body svg{margin-right:8px}body{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.vs-map-portal__legend{position:absolute;bottom:10px;right:45px}.map__settings{display:flex;padding:3px 1px;background:#fff;position:absolute;right:0;bottom:15px;height:30px;align-items:center;font-weight:100;text-align:center}.map__settings-item{display:flex;white-space:nowrap;padding:0 2px;font-size:10px;font-weight:400}.map__settings-attribution{padding:0}.map__settings-menu{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:15px!important;position:absolute;background-color:#fff;bottom:60px;right:90px;width:260px}.map__settings-menu-item{display:flex;align-items:center;color:#2c2c2c;margin-bottom:5px;font-size:12px;justify-content:space-between;height:28px}.map__settings-menu-item-text{height:28px;line-height:28px;background-color:#fff;background-image:none;border-radius:4px;border:1px solid #dcdfe6;-webkit-box-sizing:border-box;box-sizing:border-box;color:#606266;display:inline-block;font-size:12px;height:40px;line-height:40px;outline:0;padding:0 10px}.map__settings-menu-item--checktext{color:#000!important;font-size:12px;display:inline-block;padding-left:10px;line-height:19px;cursor:pointer}.checked{color:#409eff!important}.vs-map-slot-layers[data-v-87fc4740]{position:absolute;display:flex;bottom:10px;left:15px}.vs-map-slot-layers__layer[data-v-87fc4740]{width:50px;height:50px;background-color:#fff;box-shadow:0 0 7px #434c5626;padding:5px;border-radius:5px;margin-top:10px;margin-right:10px;cursor:pointer;transition:all .3s}.vs-map-slot-layers__layer[data-v-87fc4740]:hover{background-color:#eee}.vs-map-slot-layers__image[data-v-87fc4740]{width:100%;border-radius:5px;object-fit:contain}.focused[data-v-87fc4740]{background-color:#1989fa!important}.vs-map-portal__list{position:absolute}.vs-map-portal__legend-title{padding-bottom:5px;border-bottom:1px solid #ebebeb}.vs-map-portal__legend-button{cursor:pointer;display:flex;align-items:center;justify-content:center;flex-direction:column;height:35px;background-color:#fff;border-radius:5px;border:1px solid #dcdfe5;padding:5px}.vs-map-portal__legend-body{background-color:#fff;border-radius:5px;border:1px solid #dcdfe5;padding:5px;width:250px;max-height:250px}.vs-map-portal__legend-body__content{padding-top:10px}.vs-map-portal__legend-category{font-weight:700;margin-bottom:5px}.vs-map-portal__legend-item{margin-right:10px;display:flex;flex-shrink:0}.vs-map-portal__legend-item__color{width:16px;height:16px;border-radius:3px;margin-right:10px;display:flex;flex-shrink:0}.maplibregl-popup-content{padding:0}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { _ as s, c as o, i as l, t as c, h } from "./import-file-
|
|
1
|
+
import { _ as s, c as o, i as l, t as c, h } from "./import-file-CRC0sYYT.js";
|
|
2
2
|
import { openBlock as p, createElementBlock as d } from "vue";
|
|
3
3
|
const m = {
|
|
4
4
|
name: "VsCalendar",
|
|
5
5
|
mixins: [o],
|
|
6
|
-
name: "VsCalendar",
|
|
7
6
|
data() {
|
|
8
7
|
return {
|
|
9
8
|
chartInstance: null,
|
|
@@ -20,6 +19,16 @@ const m = {
|
|
|
20
19
|
this.uniqueID = this.widget, await this.$nextTick(), await this.getData(), this.initChart();
|
|
21
20
|
},
|
|
22
21
|
methods: {
|
|
22
|
+
onChangedData() {
|
|
23
|
+
try {
|
|
24
|
+
if (this.sourceData) {
|
|
25
|
+
const { series: t, xs: e, ys: a } = this.prepareData();
|
|
26
|
+
t && (this == null || this.initChart(t, e, a));
|
|
27
|
+
}
|
|
28
|
+
} catch (t) {
|
|
29
|
+
console.error(t);
|
|
30
|
+
}
|
|
31
|
+
},
|
|
23
32
|
prepareData() {
|
|
24
33
|
try {
|
|
25
34
|
return this.sourceData.map((e) => [
|
|
@@ -31,7 +40,9 @@ const m = {
|
|
|
31
40
|
}
|
|
32
41
|
},
|
|
33
42
|
getCalendarRange() {
|
|
34
|
-
const t = this.sourceData.map(
|
|
43
|
+
const t = this.sourceData.map(
|
|
44
|
+
(r) => new Date(r[this.dimensions[0]].split("T")[0])
|
|
45
|
+
), e = new Date(Math.min(...t)), a = new Date(Math.max(...t));
|
|
35
46
|
return [
|
|
36
47
|
e.getFullYear().toString(),
|
|
37
48
|
a.getFullYear().toString()
|
|
@@ -40,18 +51,18 @@ const m = {
|
|
|
40
51
|
async initChart() {
|
|
41
52
|
var t, e;
|
|
42
53
|
try {
|
|
43
|
-
const a = this.$refs.chart, r = l(a),
|
|
54
|
+
const a = this.$refs.chart, r = l(a), n = {
|
|
44
55
|
tooltip: {
|
|
45
56
|
...c(
|
|
46
57
|
(t = this.styleData) == null ? void 0 : t.tooltip,
|
|
47
58
|
(e = this.styleData) == null ? void 0 : e.show_tooltip
|
|
48
59
|
),
|
|
49
60
|
trigger: "item",
|
|
50
|
-
formatter: (
|
|
61
|
+
formatter: (i) => h(i)
|
|
51
62
|
},
|
|
52
63
|
visualMap: {
|
|
53
|
-
min: Math.min(...this.prepareData().map((
|
|
54
|
-
max: Math.max(...this.prepareData().map((
|
|
64
|
+
min: Math.min(...this.prepareData().map((i) => i[1])),
|
|
65
|
+
max: Math.max(...this.prepareData().map((i) => i[1])),
|
|
55
66
|
type: "piecewise",
|
|
56
67
|
orient: "horizontal",
|
|
57
68
|
left: "center",
|
|
@@ -78,7 +89,7 @@ const m = {
|
|
|
78
89
|
}
|
|
79
90
|
}
|
|
80
91
|
};
|
|
81
|
-
r.setOption(
|
|
92
|
+
r.setOption(n), r.resize(), window.addEventListener("resize", () => {
|
|
82
93
|
r.resize();
|
|
83
94
|
});
|
|
84
95
|
} catch (a) {
|
|
@@ -90,7 +101,7 @@ const m = {
|
|
|
90
101
|
ref: "chart",
|
|
91
102
|
class: "h-full w-full min-h-[200px] pb-2"
|
|
92
103
|
};
|
|
93
|
-
function D(t, e, a, r,
|
|
104
|
+
function D(t, e, a, r, n, i) {
|
|
94
105
|
return p(), d("div", u, null, 512);
|
|
95
106
|
}
|
|
96
107
|
const y = /* @__PURE__ */ s(m, [["render", D]]);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { _ as o, c, a as h, b as l, d as n, i as d } from "./import-file-
|
|
1
|
+
import { _ as o, c, a as h, b as l, d as n, i as d } from "./import-file-CRC0sYYT.js";
|
|
2
2
|
import { openBlock as p, createElementBlock as u } from "vue";
|
|
3
3
|
const m = {
|
|
4
|
-
mixins: [c],
|
|
5
4
|
name: "VsFunnelBar",
|
|
5
|
+
mixins: [c],
|
|
6
6
|
data() {
|
|
7
7
|
return {
|
|
8
8
|
chartInstance: null,
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { _ as
|
|
1
|
+
import { _ as u, c as m, a as d, i as f, t as x, e as y, g as c, d as D } from "./import-file-CRC0sYYT.js";
|
|
2
2
|
import { openBlock as _, createElementBlock as g } from "vue";
|
|
3
3
|
const w = {
|
|
4
4
|
name: "VsHeatmap",
|
|
5
|
-
mixins: [
|
|
6
|
-
name: "VsHeatmap",
|
|
5
|
+
mixins: [m],
|
|
7
6
|
data() {
|
|
8
7
|
return {
|
|
9
8
|
chartInstance: null,
|
|
@@ -92,7 +91,7 @@ const w = {
|
|
|
92
91
|
function C(t, s, a, r, n, e) {
|
|
93
92
|
return _(), g("div", b, null, 512);
|
|
94
93
|
}
|
|
95
|
-
const z = /* @__PURE__ */
|
|
94
|
+
const z = /* @__PURE__ */ u(w, [["render", C]]);
|
|
96
95
|
export {
|
|
97
96
|
z as default
|
|
98
97
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as V, m as v } from "./map-component-mixin-
|
|
2
|
-
import { _, c as $ } from "./import-file-
|
|
1
|
+
import { l as V, m as v } from "./map-component-mixin-BCtWEvzv.js";
|
|
2
|
+
import { _, c as $ } from "./import-file-CRC0sYYT.js";
|
|
3
3
|
import { resolveComponent as d, openBlock as M, createElementBlock as L, createVNode as p, createElementVNode as w, createBlock as S, createCommentVNode as k } from "vue";
|
|
4
4
|
function C(t, n) {
|
|
5
5
|
t = t.replace(/^#/, ""), t.length === 3 && (t = t.split("").map((r) => r + r).join(""));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as g, m as M } from "./map-component-mixin-
|
|
2
|
-
import { _ as w, c as y } from "./import-file-
|
|
1
|
+
import { l as g, m as M } from "./map-component-mixin-BCtWEvzv.js";
|
|
2
|
+
import { _ as w, c as y } from "./import-file-CRC0sYYT.js";
|
|
3
3
|
import { resolveComponent as i, openBlock as u, createElementBlock as _, createElementVNode as r, createBlock as V, createCommentVNode as v, createVNode as d } from "vue";
|
|
4
4
|
const x = {
|
|
5
5
|
mixins: [y, g, M],
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { openBlock as
|
|
1
|
+
import { _ as c, c as o, f as n } from "./import-file-CRC0sYYT.js";
|
|
2
|
+
import { openBlock as i, createElementBlock as m, toDisplayString as s } from "vue";
|
|
3
3
|
const u = {
|
|
4
|
-
mixins: [c],
|
|
5
4
|
name: "VsNumber",
|
|
5
|
+
mixins: [o],
|
|
6
6
|
data() {
|
|
7
7
|
return {
|
|
8
8
|
number: ""
|
|
@@ -10,25 +10,32 @@ const u = {
|
|
|
10
10
|
},
|
|
11
11
|
computed: {
|
|
12
12
|
formattedNumber() {
|
|
13
|
-
return
|
|
13
|
+
return n(this.number);
|
|
14
14
|
},
|
|
15
15
|
prefix() {
|
|
16
16
|
var e, t;
|
|
17
17
|
return (e = this.styleData) != null && e.prefix ? (t = this.styleData) == null ? void 0 : t.prefix : "";
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
|
-
async mounted() {
|
|
21
|
-
await this.getData(), this.getNumber();
|
|
22
|
-
},
|
|
23
20
|
watch: {
|
|
24
21
|
sourceData: {
|
|
25
|
-
|
|
22
|
+
async handler() {
|
|
26
23
|
this.getNumber();
|
|
27
24
|
},
|
|
28
25
|
deep: !0
|
|
29
26
|
}
|
|
30
27
|
},
|
|
28
|
+
async mounted() {
|
|
29
|
+
await this.getData(), this.getNumber();
|
|
30
|
+
},
|
|
31
31
|
methods: {
|
|
32
|
+
onChangedData() {
|
|
33
|
+
try {
|
|
34
|
+
this.sourceData && this.getNumber();
|
|
35
|
+
} catch (e) {
|
|
36
|
+
console.error(e);
|
|
37
|
+
}
|
|
38
|
+
},
|
|
32
39
|
async getNumber() {
|
|
33
40
|
var e, t;
|
|
34
41
|
try {
|
|
@@ -38,11 +45,11 @@ const u = {
|
|
|
38
45
|
}
|
|
39
46
|
}
|
|
40
47
|
}
|
|
41
|
-
},
|
|
42
|
-
function
|
|
43
|
-
return
|
|
48
|
+
}, h = { class: "font-[Inter,_Helvetica,_Arial] p-4 w-full text-[28px] pt-[10px] min-h-[150px] border-0" };
|
|
49
|
+
function p(e, t, r, f, d, a) {
|
|
50
|
+
return i(), m("div", h, s(a.prefix) + s(a.formattedNumber), 1);
|
|
44
51
|
}
|
|
45
|
-
const x = /* @__PURE__ */
|
|
52
|
+
const x = /* @__PURE__ */ c(u, [["render", p]]);
|
|
46
53
|
export {
|
|
47
54
|
x as default
|
|
48
55
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var ge = Object.defineProperty;
|
|
2
2
|
var ke = (c, e, t) => e in c ? ge(c, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[e] = t;
|
|
3
|
-
var k = (c, e, t) => ke(c, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { _ as de, c as xe } from "./import-file-
|
|
3
|
+
var k = (c, e, t) => (ke(c, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
+
import { _ as de, c as xe } from "./import-file-CRC0sYYT.js";
|
|
5
5
|
import { openBlock as V, createElementBlock as J, createCommentVNode as be } from "vue";
|
|
6
|
-
function
|
|
6
|
+
function Q() {
|
|
7
7
|
return {
|
|
8
8
|
async: !1,
|
|
9
9
|
breaks: !1,
|
|
@@ -17,7 +17,7 @@ function D() {
|
|
|
17
17
|
walkTokens: null
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
let z =
|
|
20
|
+
let z = Q();
|
|
21
21
|
function se(c) {
|
|
22
22
|
z = c;
|
|
23
23
|
}
|
|
@@ -647,16 +647,16 @@ const Re = /^(?:[ \t]*(?:\n|$))+/, _e = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*
|
|
|
647
647
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
648
648
|
paragraph: f(j).replace("hr", E).replace("heading", ` *#{1,6} *[^
|
|
649
649
|
]`).replace("lheading", oe).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
650
|
-
}, ce = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Pe = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, he = /^( {2,}|\\)\n(?!\s*$)/, Ze = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, L = "\\p{P}\\p{S}", Me = f(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, L).getRegex(),
|
|
650
|
+
}, ce = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Pe = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, he = /^( {2,}|\\)\n(?!\s*$)/, Ze = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, L = "\\p{P}\\p{S}", Me = f(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, L).getRegex(), De = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g, Qe = f(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, L).getRegex(), je = f("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, L).getRegex(), Oe = f("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, L).getRegex(), He = f(/\\([punct])/, "gu").replace(/punct/g, L).getRegex(), Ne = f(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Ue = f(H).replace("(?:-->|$)", "-->").getRegex(), Fe = f("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Ue).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), B = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, We = f(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", B).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), pe = f(/^!?\[(label)\]\[(ref)\]/).replace("label", B).replace("ref", O).getRegex(), ue = f(/^!?\[(ref)\](?:\[\])?/).replace("ref", O).getRegex(), Xe = f("reflink|nolink(?!\\()", "g").replace("reflink", pe).replace("nolink", ue).getRegex(), U = {
|
|
651
651
|
_backpedal: I,
|
|
652
652
|
// only used for GFM url
|
|
653
653
|
anyPunctuation: He,
|
|
654
654
|
autolink: Ne,
|
|
655
|
-
blockSkip:
|
|
655
|
+
blockSkip: De,
|
|
656
656
|
br: he,
|
|
657
657
|
code: Pe,
|
|
658
658
|
del: I,
|
|
659
|
-
emStrongLDelim:
|
|
659
|
+
emStrongLDelim: Qe,
|
|
660
660
|
emStrongRDelimAst: je,
|
|
661
661
|
emStrongRDelimUnd: Oe,
|
|
662
662
|
escape: ce,
|
|
@@ -672,7 +672,7 @@ const Re = /^(?:[ \t]*(?:\n|$))+/, _e = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*
|
|
|
672
672
|
...U,
|
|
673
673
|
link: f(/^!?\[(label)\]\((.*?)\)/).replace("label", B).getRegex(),
|
|
674
674
|
reflink: f(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", B).getRegex()
|
|
675
|
-
},
|
|
675
|
+
}, D = {
|
|
676
676
|
...U,
|
|
677
677
|
escape: f(ce).replace("])", "~|])").getRegex(),
|
|
678
678
|
url: f(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
|
|
@@ -680,16 +680,16 @@ const Re = /^(?:[ \t]*(?:\n|$))+/, _e = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*
|
|
|
680
680
|
del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,
|
|
681
681
|
text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
|
|
682
682
|
}, Ve = {
|
|
683
|
-
...
|
|
683
|
+
...D,
|
|
684
684
|
br: f(he).replace("{2,}", "*").getRegex(),
|
|
685
|
-
text: f(
|
|
685
|
+
text: f(D.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
686
686
|
}, v = {
|
|
687
687
|
normal: N,
|
|
688
688
|
gfm: Be,
|
|
689
689
|
pedantic: Ce
|
|
690
690
|
}, S = {
|
|
691
691
|
normal: U,
|
|
692
|
-
gfm:
|
|
692
|
+
gfm: D,
|
|
693
693
|
breaks: Ve,
|
|
694
694
|
pedantic: Ge
|
|
695
695
|
};
|
|
@@ -1285,7 +1285,7 @@ k(A, "passThroughHooks", /* @__PURE__ */ new Set([
|
|
|
1285
1285
|
]));
|
|
1286
1286
|
class Je {
|
|
1287
1287
|
constructor(...e) {
|
|
1288
|
-
k(this, "defaults",
|
|
1288
|
+
k(this, "defaults", Q());
|
|
1289
1289
|
k(this, "options", this.setOptions);
|
|
1290
1290
|
k(this, "parse", this.parseMarkdown(!0));
|
|
1291
1291
|
k(this, "parseInline", this.parseMarkdown(!1));
|
|
@@ -1463,7 +1463,7 @@ function u(c, e) {
|
|
|
1463
1463
|
u.options = u.setOptions = function(c) {
|
|
1464
1464
|
return T.setOptions(c), u.defaults = T.defaults, se(u.defaults), u;
|
|
1465
1465
|
};
|
|
1466
|
-
u.getDefaults =
|
|
1466
|
+
u.getDefaults = Q;
|
|
1467
1467
|
u.defaults = z;
|
|
1468
1468
|
u.use = function(...c) {
|
|
1469
1469
|
return T.use(...c), u.defaults = T.defaults, se(u.defaults), u;
|
|
@@ -1489,8 +1489,8 @@ u.parseInline;
|
|
|
1489
1489
|
y.parse;
|
|
1490
1490
|
w.lex;
|
|
1491
1491
|
const Ke = {
|
|
1492
|
-
mixins: [xe],
|
|
1493
1492
|
name: "VsText",
|
|
1493
|
+
mixins: [xe],
|
|
1494
1494
|
data() {
|
|
1495
1495
|
return {
|
|
1496
1496
|
markedText: null
|
|
@@ -1502,6 +1502,11 @@ const Ke = {
|
|
|
1502
1502
|
} catch (c) {
|
|
1503
1503
|
console.error(c);
|
|
1504
1504
|
}
|
|
1505
|
+
},
|
|
1506
|
+
methods: {
|
|
1507
|
+
onChangedData() {
|
|
1508
|
+
return null;
|
|
1509
|
+
}
|
|
1505
1510
|
}
|
|
1506
1511
|
}, Ye = { class: "relative select-auto h-full py-4 rounded-xl p-4 box-border bg-white custom-scrollbar" }, et = ["innerHTML"];
|
|
1507
1512
|
function tt(c, e, t, n, s, i) {
|
package/package.json
CHANGED
|
@@ -1,97 +1,107 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@opengis/bi",
|
|
3
|
-
"version": "1.0.
|
|
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
|
-
"config.js"
|
|
14
|
-
],
|
|
15
|
-
"scripts": {
|
|
16
|
-
"debug": "node --watch-path=server server",
|
|
17
|
-
"dev": "vite",
|
|
18
|
-
"type-check": "vue-tsc --noEmit",
|
|
19
|
-
"build": "vite build",
|
|
20
|
-
"build-app": "cross-env APP=true vite build",
|
|
21
|
-
"lint": "eslint .",
|
|
22
|
-
"format": "prettier --write .",
|
|
23
|
-
"test": "node --test",
|
|
24
|
-
"test21": "node --test ./test/plugins/*",
|
|
25
|
-
"start": "node server.js",
|
|
26
|
-
"prod": "cross-env NODE_ENV=production npm run start",
|
|
27
|
-
"docs:local": "cross-env docs=local vitepress build docs",
|
|
28
|
-
"docs:dev": "vitepress dev docs",
|
|
29
|
-
"docs:build": "vitepress build docs",
|
|
30
|
-
"docs:preview": "vitepress preview docs",
|
|
31
|
-
"docs-dev:local": "cross-env docs=local vitepress build docs-dev",
|
|
32
|
-
"docs-dev:dev": "vitepress dev docs-dev",
|
|
33
|
-
"docs-dev:build": "vitepress build docs-dev",
|
|
34
|
-
"docs-dev:preview": "vitepress preview docs-dev",
|
|
35
|
-
"adduser": "node script/adduser.js",
|
|
36
|
-
"prepare": "husky",
|
|
37
|
-
"commit": "cz --no-verify"
|
|
38
|
-
},
|
|
39
|
-
"keywords": [],
|
|
40
|
-
"author": "Softpro",
|
|
41
|
-
"license": "ISC",
|
|
42
|
-
"dependencies": {
|
|
43
|
-
"@grpc/grpc-js": "^1.9.13",
|
|
44
|
-
"@grpc/proto-loader": "^0.6.9",
|
|
45
|
-
"@
|
|
46
|
-
"@
|
|
47
|
-
"@opengis/fastify-
|
|
48
|
-
"@opengis/
|
|
49
|
-
"@opengis/
|
|
50
|
-
"@
|
|
51
|
-
"@
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"@
|
|
73
|
-
"@
|
|
74
|
-
"@
|
|
75
|
-
"@
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"eslint-
|
|
79
|
-
"eslint
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
"
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@opengis/bi",
|
|
3
|
+
"version": "1.0.15",
|
|
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
|
+
"config.js"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"debug": "node --watch-path=server server",
|
|
17
|
+
"dev": "vite",
|
|
18
|
+
"type-check": "vue-tsc --noEmit",
|
|
19
|
+
"build": "vite build",
|
|
20
|
+
"build-app": "cross-env APP=true vite build",
|
|
21
|
+
"lint": "eslint .",
|
|
22
|
+
"format": "prettier --write .",
|
|
23
|
+
"test": "node --test",
|
|
24
|
+
"test21": "node --test ./test/plugins/*",
|
|
25
|
+
"start": "node server.js",
|
|
26
|
+
"prod": "cross-env NODE_ENV=production npm run start",
|
|
27
|
+
"docs:local": "cross-env docs=local vitepress build docs",
|
|
28
|
+
"docs:dev": "vitepress dev docs",
|
|
29
|
+
"docs:build": "vitepress build docs",
|
|
30
|
+
"docs:preview": "vitepress preview docs",
|
|
31
|
+
"docs-dev:local": "cross-env docs=local vitepress build docs-dev",
|
|
32
|
+
"docs-dev:dev": "vitepress dev docs-dev",
|
|
33
|
+
"docs-dev:build": "vitepress build docs-dev",
|
|
34
|
+
"docs-dev:preview": "vitepress preview docs-dev",
|
|
35
|
+
"adduser": "node script/adduser.js",
|
|
36
|
+
"prepare": "husky",
|
|
37
|
+
"commit": "cz --no-verify"
|
|
38
|
+
},
|
|
39
|
+
"keywords": [],
|
|
40
|
+
"author": "Softpro",
|
|
41
|
+
"license": "ISC",
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@grpc/grpc-js": "^1.9.13",
|
|
44
|
+
"@grpc/proto-loader": "^0.6.9",
|
|
45
|
+
"@highlightjs/vue-plugin": "github:highlightjs/vue-plugin",
|
|
46
|
+
"@mapbox/sphericalmercator": "^1.2.0",
|
|
47
|
+
"@opengis/fastify-auth": "^1.0.50",
|
|
48
|
+
"@opengis/fastify-file": "^1.0.29",
|
|
49
|
+
"@opengis/fastify-table": "^1.1.72",
|
|
50
|
+
"@opengis/v3-core": "^0.1.103",
|
|
51
|
+
"@opengis/v3-filter": "^0.0.39",
|
|
52
|
+
"@turf/turf": "^7.1.0",
|
|
53
|
+
"@vueuse/core": "^11.1.0",
|
|
54
|
+
"ace-builds": "^1.36.2",
|
|
55
|
+
"axios": "^1.3.1",
|
|
56
|
+
"cross-env": "^7.0.3",
|
|
57
|
+
"d3-format": "^3.1.0",
|
|
58
|
+
"echarts": "^5.5.1",
|
|
59
|
+
"fastify": "^4.26.1",
|
|
60
|
+
"fastify-plugin": "^4.0.0",
|
|
61
|
+
"highlight.js": "^11.10.0",
|
|
62
|
+
"js-yaml": "^4.1.0",
|
|
63
|
+
"maplibre-gl": "^4.7.1",
|
|
64
|
+
"marked": "^14.1.2",
|
|
65
|
+
"pinia": "^2.2.4",
|
|
66
|
+
"vite": "^5.1.5",
|
|
67
|
+
"vue": "^3.4.27",
|
|
68
|
+
"vue-router": "^4.4.3",
|
|
69
|
+
"vue3-ace-editor": "^2.2.4"
|
|
70
|
+
},
|
|
71
|
+
"devDependencies": {
|
|
72
|
+
"@commitlint/cli": "^19.5.0",
|
|
73
|
+
"@commitlint/config-conventional": "^19.5.0",
|
|
74
|
+
"@eslint/eslintrc": "^3.1.0",
|
|
75
|
+
"@eslint/js": "^9.12.0",
|
|
76
|
+
"@types/echarts": "^4.9.22",
|
|
77
|
+
"@types/node": "^22.7.5",
|
|
78
|
+
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
79
|
+
"@typescript-eslint/parser": "^8.8.1",
|
|
80
|
+
"@vitejs/plugin-vue": "^5.1.4",
|
|
81
|
+
"commitizen": "^4.3.1",
|
|
82
|
+
"eslint": "^8.57.1",
|
|
83
|
+
"eslint-config-airbnb-base": "^15.0.0",
|
|
84
|
+
"eslint-config-prettier": "^9.1.0",
|
|
85
|
+
"eslint-define-config": "^2.1.0",
|
|
86
|
+
"eslint-plugin-import": "^2.31.0",
|
|
87
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
88
|
+
"eslint-plugin-promise": "^6.6.0",
|
|
89
|
+
"eslint-plugin-vue": "^9.29.0",
|
|
90
|
+
"globals": "^15.10.0",
|
|
91
|
+
"husky": "^9.1.6",
|
|
92
|
+
"prettier": "^3.3.3",
|
|
93
|
+
"sass": "^1.77.0",
|
|
94
|
+
"typescript": "^5.4.5",
|
|
95
|
+
"typescript-eslint": "~8.8.1",
|
|
96
|
+
"vitepress": "^1.1.4",
|
|
97
|
+
"vitepress-plugin-mermaid": "^2.0.16",
|
|
98
|
+
"vitepress-plugin-tabs": "^0.5.0",
|
|
99
|
+
"vitepress-sidebar": "^1.22.0",
|
|
100
|
+
"vue-tsc": "^2.1.6"
|
|
101
|
+
},
|
|
102
|
+
"config": {
|
|
103
|
+
"commitizen": {
|
|
104
|
+
"path": "cz-conventional-changelog"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
package/plugin.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import fp from 'fastify-plugin';
|
|
2
|
-
import config from './config.js';
|
|
3
|
-
|
|
4
|
-
config.prefix = config.prefix || '/api';
|
|
5
|
-
async function plugin(fastify, opts = config) {
|
|
6
|
-
// API
|
|
7
|
-
fastify.register(import('./server/routes/dashboard/index.mjs'), config);
|
|
8
|
-
fastify.register(import('./server/routes/
|
|
9
|
-
fastify.register(import('./server/routes/
|
|
10
|
-
fastify.register(import('./server/routes/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import fp from 'fastify-plugin';
|
|
2
|
+
import config from './config.js';
|
|
3
|
+
|
|
4
|
+
config.prefix = config.prefix || '/api';
|
|
5
|
+
async function plugin(fastify, opts = config) {
|
|
6
|
+
// API
|
|
7
|
+
fastify.register(import('./server/routes/dashboard/index.mjs'), config);
|
|
8
|
+
fastify.register(import('./server/routes/dataset/index.mjs'), config);
|
|
9
|
+
fastify.register(import('./server/routes/db/index.mjs'), config);
|
|
10
|
+
fastify.register(import('./server/routes/data/index.mjs'), config);
|
|
11
|
+
fastify.register(import('./server/routes/edit/index.mjs'), config);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default fp(plugin);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
create schema if not exists bi;
|
|
2
|
+
|
|
3
|
+
CREATE TABLE if not exists bi.dataset ();
|
|
4
|
+
alter table bi.dataset drop constraint if exists bi_dataset_id_pkey cascade;
|
|
5
|
+
|
|
6
|
+
alter table bi.dataset add column if not exists dataset_id text;
|
|
7
|
+
alter table bi.dataset alter column dataset_id set not null;
|
|
8
|
+
alter table bi.dataset alter column dataset_id set default next_id();
|
|
9
|
+
|
|
10
|
+
alter table bi.dataset add column if not exists name text;
|
|
11
|
+
alter table bi.dataset add column if not exists file_path text;
|
|
12
|
+
alter table bi.dataset add column if not exists table_name text;
|
|
13
|
+
alter table bi.dataset add column if not exists uid text;
|
|
14
|
+
alter table bi.dataset add column if not exists editor_id text;
|
|
15
|
+
alter table bi.dataset add column if not exists editor_date timestamp without time zone;
|
|
16
|
+
alter table bi.dataset add column if not exists cdate timestamp without time zone;
|
|
17
|
+
alter table bi.dataset alter column cdate set DEFAULT (now())::timestamp without time zone;
|
|
18
|
+
|
|
19
|
+
alter table bi.dataset add CONSTRAINT bi_dataset_id_pkey PRIMARY KEY (dataset_id);
|
|
20
|
+
|
|
21
|
+
COMMENT ON TABLE bi.dataset IS 'Набори даних';
|
|
22
|
+
|
|
23
|
+
COMMENT ON COLUMN bi.dataset.dataset_id IS 'PK';
|
|
24
|
+
COMMENT ON COLUMN bi.dataset.name IS 'Назва';
|
|
25
|
+
COMMENT ON COLUMN bi.dataset.file_path IS 'Шлях до імпортованого файлу';
|
|
26
|
+
COMMENT ON COLUMN bi.dataset.table_name IS 'Таблиця';
|