@opengis/bi 1.0.16 → 1.0.17

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.
Files changed (49) hide show
  1. package/README.md +50 -50
  2. package/config.js +12 -12
  3. package/dist/bi.js +1 -1
  4. package/dist/bi.umd.cjs +63 -63
  5. package/dist/{import-file-BqdbrKVj.js → import-file-CJYiO_4_.js} +7640 -7643
  6. package/dist/{map-component-mixin-BeW3TYyl.js → map-component-mixin-zHwqWXJY.js} +3794 -2115
  7. package/dist/style.css +1 -1
  8. package/dist/{vs-calendar-CnosX1Ss.js → vs-calendar-BAPnMYRd.js} +1 -1
  9. package/dist/{vs-funnel-bar-CcXr5oIQ.js → vs-funnel-bar-DCK7gSj4.js} +1 -1
  10. package/dist/{vs-heatmap-DvOx7wot.js → vs-heatmap-kd6FKOrT.js} +1 -1
  11. package/dist/{vs-map-C2KEv_W6.js → vs-map-BNm381mR.js} +2 -2
  12. package/dist/{vs-map-cluster-DJpEG5n8.js → vs-map-cluster-D3jk7J8D.js} +2 -2
  13. package/dist/{vs-number-C23hqXxA.js → vs-number-DH5bYG7m.js} +1 -1
  14. package/dist/{vs-text-COR-T0yn.js → vs-text-DXkA7s1D.js} +2 -2
  15. package/package.json +88 -107
  16. package/plugin.js +14 -14
  17. package/server/migrations/bi.dataset.sql +26 -26
  18. package/server/migrations/bi.sql +93 -93
  19. package/server/plugins/docs.js +48 -48
  20. package/server/plugins/hook.js +89 -89
  21. package/server/plugins/vite.js +69 -69
  22. package/server/routes/dashboard/controllers/dashboard.delete.js +38 -38
  23. package/server/routes/dashboard/controllers/dashboard.js +118 -118
  24. package/server/routes/dashboard/controllers/dashboard.list.js +30 -30
  25. package/server/routes/dashboard/controllers/utils/yaml.js +11 -11
  26. package/server/routes/dashboard/index.mjs +25 -25
  27. package/server/routes/data/controllers/data.js +167 -167
  28. package/server/routes/data/controllers/util/chartSQL.js +42 -42
  29. package/server/routes/data/controllers/util/normalizeData.js +59 -59
  30. package/server/routes/data/index.mjs +29 -29
  31. package/server/routes/dataset/index.mjs +19 -19
  32. package/server/routes/db/controllers/dbTablePreview.js +63 -63
  33. package/server/routes/db/controllers/dbTables.js +36 -36
  34. package/server/routes/db/index.mjs +17 -17
  35. package/server/routes/edit/controllers/dashboard.add.js +26 -26
  36. package/server/routes/edit/controllers/dashboard.edit.js +46 -46
  37. package/server/routes/edit/controllers/widget.add.js +75 -75
  38. package/server/routes/edit/controllers/widget.del.js +69 -69
  39. package/server/routes/edit/controllers/widget.edit.js +54 -52
  40. package/server/routes/edit/index.mjs +31 -31
  41. package/server/routes/map/controllers/cluster.js +109 -109
  42. package/server/routes/map/controllers/clusterVtile.js +166 -166
  43. package/server/routes/map/controllers/geojson.js +127 -127
  44. package/server/routes/map/controllers/map.js +60 -60
  45. package/server/routes/map/controllers/utils/downloadClusterData.js +42 -42
  46. package/server/routes/map/controllers/vtile.js +183 -183
  47. package/server/routes/map/index.mjs +25 -25
  48. package/server/utils/getWidget.js +85 -85
  49. 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-e51369e3]{position:relative}.ui-dialog__modal[data-v-e51369e3]{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-e51369e3]{min-height:0;height:100%;overflow:auto}.ui-dialog__content[data-v-e51369e3]::-webkit-scrollbar{width:6px;height:6px;background-color:#f5f5f5}.ui-dialog__content[data-v-e51369e3]::-webkit-scrollbar-thumb{border-radius:10px;background-color:#d9d9d9bf}.ui-dialog__content[data-v-e51369e3]::-webkit-scrollbar-track{background-color:#f5f5f5}@media (max-width: 650px){.ui-dialog__modal[data-v-e51369e3]{top:50%}}.fade-enter-active[data-v-e51369e3],.fade-leave-active[data-v-e51369e3]{transition:opacity .2s}.fade-enter-from[data-v-e51369e3],.fade-leave-to[data-v-e51369e3]{opacity:0}.content-enter-active[data-v-e51369e3],.content-leave-active[data-v-e51369e3]{transition:transform .4s}.content-enter-from[data-v-e51369e3],.content-leave-to[data-v-e51369e3]{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-aebbde6b]{position:absolute;display:flex;bottom:10px;left:15px}.vs-map-slot-layers__layer[data-v-aebbde6b]{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-aebbde6b]:hover{background-color:#eee}.vs-map-slot-layers__image[data-v-aebbde6b]{width:100%;border-radius:5px;object-fit:contain}.focused[data-v-aebbde6b]{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
+ .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,4 +1,4 @@
1
- import { _ as s, c as o, i as l, t as c, h } from "./import-file-BqdbrKVj.js";
1
+ import { _ as s, c as o, i as l, t as c, h } from "./import-file-CJYiO_4_.js";
2
2
  import { openBlock as p, createElementBlock as d } from "vue";
3
3
  const m = {
4
4
  name: "VsCalendar",
@@ -1,4 +1,4 @@
1
- import { _ as o, c, a as h, b as l, d as n, i as d } from "./import-file-BqdbrKVj.js";
1
+ import { _ as o, c, a as h, b as l, d as n, i as d } from "./import-file-CJYiO_4_.js";
2
2
  import { openBlock as p, createElementBlock as u } from "vue";
3
3
  const m = {
4
4
  name: "VsFunnelBar",
@@ -1,4 +1,4 @@
1
- import { _ as 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-BqdbrKVj.js";
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-CJYiO_4_.js";
2
2
  import { openBlock as _, createElementBlock as g } from "vue";
3
3
  const w = {
4
4
  name: "VsHeatmap",
@@ -1,5 +1,5 @@
1
- import { l as g, m as M } from "./map-component-mixin-BeW3TYyl.js";
2
- import { _ as w, c as y } from "./import-file-BqdbrKVj.js";
1
+ import { l as g, m as M } from "./map-component-mixin-zHwqWXJY.js";
2
+ import { _ as w, c as y } from "./import-file-CJYiO_4_.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,5 +1,5 @@
1
- import { l as V, m as v } from "./map-component-mixin-BeW3TYyl.js";
2
- import { _, c as $ } from "./import-file-BqdbrKVj.js";
1
+ import { l as V, m as v } from "./map-component-mixin-zHwqWXJY.js";
2
+ import { _, c as $ } from "./import-file-CJYiO_4_.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,4 +1,4 @@
1
- import { _ as c, c as o, f as n } from "./import-file-BqdbrKVj.js";
1
+ import { _ as c, c as o, f as n } from "./import-file-CJYiO_4_.js";
2
2
  import { openBlock as i, createElementBlock as m, toDisplayString as s } from "vue";
3
3
  const u = {
4
4
  name: "VsNumber",
@@ -1,7 +1,7 @@
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-BqdbrKVj.js";
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-CJYiO_4_.js";
5
5
  import { openBlock as V, createElementBlock as J, createCommentVNode as be } from "vue";
6
6
  function Q() {
7
7
  return {
package/package.json CHANGED
@@ -1,107 +1,88 @@
1
- {
2
- "name": "@opengis/bi",
3
- "version": "1.0.16",
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
- }
1
+ {
2
+ "name": "@opengis/bi",
3
+ "version": "1.0.17",
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
+ },
37
+ "keywords": [],
38
+ "author": "Softpro",
39
+ "license": "ISC",
40
+ "dependencies": {
41
+ "@highlightjs/vue-plugin": "github:highlightjs/vue-plugin",
42
+ "@mapbox/sphericalmercator": "^1.2.0",
43
+ "@opengis/fastify-auth": "^1.0.50",
44
+ "@opengis/fastify-file": "^1.0.29",
45
+ "@opengis/fastify-table": "^1.1.91",
46
+ "@opengis/v3-core": "^0.2.58",
47
+ "@opengis/v3-filter": "^0.0.39",
48
+ "@turf/turf": "^7.1.0",
49
+ "@vueuse/core": "^11.1.0",
50
+ "axios": "^1.3.1",
51
+ "cross-env": "^7.0.3",
52
+ "d3-format": "^3.1.0",
53
+ "echarts": "^5.5.1",
54
+ "fastify": "^4.26.1",
55
+ "fastify-plugin": "^4.0.0",
56
+ "highlight.js": "^11.10.0",
57
+ "js-yaml": "^4.1.0",
58
+ "maplibre-gl": "^4.7.1",
59
+ "marked": "^14.1.2",
60
+ "pinia": "^2.2.4",
61
+ "vite": "^5.1.5",
62
+ "vue": "^3.4.27",
63
+ "vue-router": "^4.4.3",
64
+ "vue3-ace-editor": "^2.2.4"
65
+ },
66
+ "devDependencies": {
67
+ "@eslint/eslintrc": "^3.1.0",
68
+ "@eslint/js": "^9.12.0",
69
+ "@types/echarts": "^4.9.22",
70
+ "@types/node": "^22.7.5",
71
+ "@typescript-eslint/eslint-plugin": "^6.21.0",
72
+ "@vitejs/plugin-vue": "^5.1.4",
73
+ "eslint": "^8.57.1",
74
+ "eslint-config-airbnb-base": "^15.0.0",
75
+ "eslint-config-prettier": "^9.1.0",
76
+ "eslint-plugin-vue": "^9.29.0",
77
+ "globals": "^15.10.0",
78
+ "prettier": "^3.3.3",
79
+ "sass": "^1.77.0",
80
+ "typescript": "^5.4.5",
81
+ "typescript-eslint": "~8.8.1",
82
+ "vitepress": "^1.1.4",
83
+ "vitepress-plugin-mermaid": "^2.0.16",
84
+ "vitepress-plugin-tabs": "^0.5.0",
85
+ "vitepress-sidebar": "^1.22.0",
86
+ "vue-tsc": "^2.1.6"
87
+ }
88
+ }
package/plugin.js CHANGED
@@ -1,14 +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/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);
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);
@@ -1,26 +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 'Таблиця';
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 'Таблиця';
@@ -1,93 +1,93 @@
1
- create schema if not exists bi;
2
-
3
- CREATE TABLE if not exists bi.dashboard ();
4
- alter table bi.dashboard drop constraint if exists dashboard_id_pkey cascade;
5
-
6
- alter table bi.dashboard add column if not exists dashboard_id text;
7
- alter table bi.dashboard alter column dashboard_id set not null;
8
- alter table bi.dashboard alter column dashboard_id set default next_id();
9
-
10
- alter table bi.dashboard add column if not exists title text;
11
- alter table bi.dashboard add column if not exists description text;
12
- alter table bi.dashboard add column if not exists widgets json;
13
- alter table bi.dashboard add column if not exists table_name text;
14
- alter table bi.dashboard add column if not exists style json;
15
- alter table bi.dashboard add column if not exists name text;
16
- alter table bi.dashboard alter column name set not null;
17
- alter table bi.dashboard add column if not exists panels json;
18
- alter table bi.dashboard add column if not exists grid json;
19
- alter table bi.dashboard add column if not exists filters json;
20
-
21
- alter table bi.dashboard add CONSTRAINT dashboard_id_pkey PRIMARY KEY (dashboard_id);
22
-
23
- COMMENT ON TABLE bi.dashboard IS 'Дашборди';
24
- COMMENT ON COLUMN bi.dashboard.dashboard_id IS 'PK';
25
- COMMENT ON COLUMN bi.dashboard.title IS 'Заголовок';
26
- COMMENT ON COLUMN bi.dashboard.description IS 'Опис';
27
- COMMENT ON COLUMN bi.dashboard.widgets IS 'Віджети';
28
- COMMENT ON COLUMN bi.dashboard.table_name IS 'Назва таблиці';
29
- COMMENT ON COLUMN bi.dashboard.style IS 'Стилі';
30
- COMMENT ON COLUMN bi.dashboard.name IS 'Назва';
31
- COMMENT ON COLUMN bi.dashboard.panels IS 'Панелі віджетів';
32
- COMMENT ON COLUMN bi.dashboard.grid IS 'Сітка';
33
- COMMENT ON COLUMN bi.dashboard.filters IS 'Фільтри';
34
-
35
- CREATE TABLE if not exists bi.widget ();
36
- alter table bi.widget drop constraint if exists widget_id_pk;
37
- alter table bi.widget drop constraint if exists widget_id_fkey;
38
-
39
- alter table bi.widget add column if not exists widget_id text;
40
- alter table bi.widget alter column widget_id set not null;
41
- alter table bi.widget alter column widget_id set default next_id();
42
- alter table bi.widget add column if not exists type text;
43
- alter table bi.widget add column if not exists title text;
44
- alter table bi.widget add column if not exists style json;
45
- alter table bi.widget add column if not exists data json;
46
- alter table bi.widget add column if not exists table_name text;
47
- alter table bi.widget add column if not exists dashboard_id text;
48
- alter table bi.widget add column if not exists name text;
49
- alter table bi.widget add column if not exists x text;
50
- alter table bi.widget add column if not exists col numeric;
51
- alter table bi.widget add column if not exists metrics text;
52
- alter table bi.widget add column if not exists yml text;
53
-
54
- alter table bi.widget add CONSTRAINT widget_id_pk PRIMARY KEY (widget_id);
55
- alter table bi.widget add CONSTRAINT widget_id_fkey FOREIGN KEY (dashboard_id) REFERENCES bi.dashboard (dashboard_id);
56
-
57
- COMMENT ON TABLE bi.widget IS 'Віджети';
58
- COMMENT ON COLUMN bi.widget.widget_id IS 'PK';
59
- COMMENT ON COLUMN bi.widget.type IS 'Тип';
60
- COMMENT ON COLUMN bi.widget.title IS 'Назва';
61
- COMMENT ON COLUMN bi.widget.style IS 'Стилі';
62
- COMMENT ON COLUMN bi.widget.yml IS 'Yml';
63
- COMMENT ON COLUMN bi.widget.data IS 'Дані';
64
- COMMENT ON COLUMN bi.widget.table_name IS 'Назва таблиці';
65
- COMMENT ON COLUMN bi.widget.dashboard_id IS 'Ідентифікатор дашборду';
66
-
67
- create table if not exists bi.cluster();
68
- alter table bi.cluster drop constraint if exists bi_cluster_cluster_id_pkey;
69
- alter table bi.cluster drop constraint if exists bi_cluster_title_type_unique;
70
-
71
- alter table bi.cluster add column if not exists cluster_id text;
72
- alter table bi.cluster alter column cluster_id set not null;
73
- alter table bi.cluster alter column cluster_id set default next_id();
74
-
75
- alter table bi.cluster alter column cluster_id set default next_id();
76
- ALTER TABLE bi.cluster ADD COLUMN IF NOT EXISTS title text;
77
- ALTER TABLE bi.cluster ADD COLUMN IF NOT EXISTS type text;
78
- ALTER TABLE bi.cluster ADD COLUMN IF NOT EXISTS geom geometry(MultiPolygon,4326);
79
-
80
- ALTER TABLE bi.cluster ADD COLUMN IF NOT EXISTS uid text;
81
- ALTER TABLE bi.cluster ADD COLUMN IF NOT EXISTS files json;
82
- ALTER TABLE bi.cluster ADD COLUMN IF NOT EXISTS cdate timestamp without time zone;
83
- alter table bi.cluster alter column cdate set DEFAULT (now())::timestamp without time zone;
84
- ALTER TABLE bi.cluster ADD COLUMN IF NOT EXISTS editor_id text;
85
- ALTER TABLE bi.cluster ADD COLUMN IF NOT EXISTS editor_date timestamp without time zone;
86
-
87
- ALTER TABLE bi.cluster ADD CONSTRAINT bi_cluster_cluster_id_pkey PRIMARY KEY (cluster_id);
88
- ALTER TABLE bi.cluster ADD CONSTRAINT bi_cluster_title_type_unique UNIQUE(title, type);
89
-
90
- comment on table bi.cluster is 'Дані для побудови cluster віджетів';
91
-
92
- comment on column bi.cluster.title is 'Назва';
93
- comment on column bi.cluster.type is 'Тип кластеру';
1
+ create schema if not exists bi;
2
+
3
+ CREATE TABLE if not exists bi.dashboard ();
4
+ alter table bi.dashboard drop constraint if exists dashboard_id_pkey cascade;
5
+
6
+ alter table bi.dashboard add column if not exists dashboard_id text;
7
+ alter table bi.dashboard alter column dashboard_id set not null;
8
+ alter table bi.dashboard alter column dashboard_id set default next_id();
9
+
10
+ alter table bi.dashboard add column if not exists title text;
11
+ alter table bi.dashboard add column if not exists description text;
12
+ alter table bi.dashboard add column if not exists widgets json;
13
+ alter table bi.dashboard add column if not exists table_name text;
14
+ alter table bi.dashboard add column if not exists style json;
15
+ alter table bi.dashboard add column if not exists name text;
16
+ alter table bi.dashboard alter column name set not null;
17
+ alter table bi.dashboard add column if not exists panels json;
18
+ alter table bi.dashboard add column if not exists grid json;
19
+ alter table bi.dashboard add column if not exists filters json;
20
+
21
+ alter table bi.dashboard add CONSTRAINT dashboard_id_pkey PRIMARY KEY (dashboard_id);
22
+
23
+ COMMENT ON TABLE bi.dashboard IS 'Дашборди';
24
+ COMMENT ON COLUMN bi.dashboard.dashboard_id IS 'PK';
25
+ COMMENT ON COLUMN bi.dashboard.title IS 'Заголовок';
26
+ COMMENT ON COLUMN bi.dashboard.description IS 'Опис';
27
+ COMMENT ON COLUMN bi.dashboard.widgets IS 'Віджети';
28
+ COMMENT ON COLUMN bi.dashboard.table_name IS 'Назва таблиці';
29
+ COMMENT ON COLUMN bi.dashboard.style IS 'Стилі';
30
+ COMMENT ON COLUMN bi.dashboard.name IS 'Назва';
31
+ COMMENT ON COLUMN bi.dashboard.panels IS 'Панелі віджетів';
32
+ COMMENT ON COLUMN bi.dashboard.grid IS 'Сітка';
33
+ COMMENT ON COLUMN bi.dashboard.filters IS 'Фільтри';
34
+
35
+ CREATE TABLE if not exists bi.widget ();
36
+ alter table bi.widget drop constraint if exists widget_id_pk;
37
+ alter table bi.widget drop constraint if exists widget_id_fkey;
38
+
39
+ alter table bi.widget add column if not exists widget_id text;
40
+ alter table bi.widget alter column widget_id set not null;
41
+ alter table bi.widget alter column widget_id set default next_id();
42
+ alter table bi.widget add column if not exists type text;
43
+ alter table bi.widget add column if not exists title text;
44
+ alter table bi.widget add column if not exists style json;
45
+ alter table bi.widget add column if not exists data json;
46
+ alter table bi.widget add column if not exists table_name text;
47
+ alter table bi.widget add column if not exists dashboard_id text;
48
+ alter table bi.widget add column if not exists name text;
49
+ alter table bi.widget add column if not exists x text;
50
+ alter table bi.widget add column if not exists col numeric;
51
+ alter table bi.widget add column if not exists metrics text;
52
+ alter table bi.widget add column if not exists yml text;
53
+
54
+ alter table bi.widget add CONSTRAINT widget_id_pk PRIMARY KEY (widget_id);
55
+ alter table bi.widget add CONSTRAINT widget_id_fkey FOREIGN KEY (dashboard_id) REFERENCES bi.dashboard (dashboard_id);
56
+
57
+ COMMENT ON TABLE bi.widget IS 'Віджети';
58
+ COMMENT ON COLUMN bi.widget.widget_id IS 'PK';
59
+ COMMENT ON COLUMN bi.widget.type IS 'Тип';
60
+ COMMENT ON COLUMN bi.widget.title IS 'Назва';
61
+ COMMENT ON COLUMN bi.widget.style IS 'Стилі';
62
+ COMMENT ON COLUMN bi.widget.yml IS 'Yml';
63
+ COMMENT ON COLUMN bi.widget.data IS 'Дані';
64
+ COMMENT ON COLUMN bi.widget.table_name IS 'Назва таблиці';
65
+ COMMENT ON COLUMN bi.widget.dashboard_id IS 'Ідентифікатор дашборду';
66
+
67
+ create table if not exists bi.cluster();
68
+ alter table bi.cluster drop constraint if exists bi_cluster_cluster_id_pkey;
69
+ alter table bi.cluster drop constraint if exists bi_cluster_title_type_unique;
70
+
71
+ alter table bi.cluster add column if not exists cluster_id text;
72
+ alter table bi.cluster alter column cluster_id set not null;
73
+ alter table bi.cluster alter column cluster_id set default next_id();
74
+
75
+ alter table bi.cluster alter column cluster_id set default next_id();
76
+ ALTER TABLE bi.cluster ADD COLUMN IF NOT EXISTS title text;
77
+ ALTER TABLE bi.cluster ADD COLUMN IF NOT EXISTS type text;
78
+ ALTER TABLE bi.cluster ADD COLUMN IF NOT EXISTS geom geometry(MultiPolygon,4326);
79
+
80
+ ALTER TABLE bi.cluster ADD COLUMN IF NOT EXISTS uid text;
81
+ ALTER TABLE bi.cluster ADD COLUMN IF NOT EXISTS files json;
82
+ ALTER TABLE bi.cluster ADD COLUMN IF NOT EXISTS cdate timestamp without time zone;
83
+ alter table bi.cluster alter column cdate set DEFAULT (now())::timestamp without time zone;
84
+ ALTER TABLE bi.cluster ADD COLUMN IF NOT EXISTS editor_id text;
85
+ ALTER TABLE bi.cluster ADD COLUMN IF NOT EXISTS editor_date timestamp without time zone;
86
+
87
+ ALTER TABLE bi.cluster ADD CONSTRAINT bi_cluster_cluster_id_pkey PRIMARY KEY (cluster_id);
88
+ ALTER TABLE bi.cluster ADD CONSTRAINT bi_cluster_title_type_unique UNIQUE(title, type);
89
+
90
+ comment on table bi.cluster is 'Дані для побудови cluster віджетів';
91
+
92
+ comment on column bi.cluster.title is 'Назва';
93
+ comment on column bi.cluster.type is 'Тип кластеру';