@opengis/bi 1.0.54 → 1.1.0
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/package.json +6 -6
- package/server/routes/dashboard/index.mjs +11 -8
- package/server/routes/data/index.mjs +15 -14
- package/server/routes/edit/index.mjs +12 -9
- package/server/routes/map/index.mjs +10 -7
- package/server/utils/getWidget.js +2 -2
- package/dist/assets/charts/bar.png +0 -0
- package/dist/assets/charts/funnel.png +0 -0
- package/dist/assets/charts/no_data.jpg +0 -0
- package/dist/assets/charts/number.png +0 -0
- package/dist/assets/charts/pie.png +0 -0
- package/dist/assets/charts/progress.png +0 -0
- package/dist/assets/charts/stat.png +0 -0
- package/dist/assets/images/bar.png +0 -0
- package/dist/assets/images/funnel.png +0 -0
- package/dist/assets/images/no_data.jpg +0 -0
- package/dist/assets/images/number.png +0 -0
- package/dist/assets/images/pie.png +0 -0
- package/dist/assets/images/progress.png +0 -0
- package/dist/assets/images/stat.png +0 -0
- package/dist/bi.js +0 -4
- package/dist/bi.umd.cjs +0 -762
- package/dist/favicon.ico +0 -0
- package/dist/import-file-C1w6i79j.js +0 -63683
- package/dist/style.css +0 -7
- package/dist/vs-funnel-bar-CRa-FfqI.js +0 -116
- package/dist/vs-list-CPymZkNl.js +0 -18513
- package/dist/vs-map-BxD97H4H.js +0 -294
- package/dist/vs-map-cluster-uR_3VjX4.js +0 -315
- package/dist/vs-number-Cm5rZ6hG.js +0 -55
- package/dist/vs-table-CAGs7pBc.js +0 -71
- package/dist/vs-text-Br266xVl.js +0 -40
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengis/bi",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "BI data visualization module",
|
|
5
5
|
"main": "dist/bi.js",
|
|
6
6
|
"browser": "dist/bi.umd.cjs",
|
|
@@ -43,17 +43,17 @@
|
|
|
43
43
|
"@highlightjs/vue-plugin": "github:highlightjs/vue-plugin",
|
|
44
44
|
"@jspreadsheet-ce/vue": "^5.0.0",
|
|
45
45
|
"@mapbox/sphericalmercator": "^1.2.0",
|
|
46
|
-
"@opengis/fastify-auth": "
|
|
47
|
-
"@opengis/fastify-file": "
|
|
48
|
-
"@opengis/fastify-table": "
|
|
46
|
+
"@opengis/fastify-auth": "1.1.0",
|
|
47
|
+
"@opengis/fastify-file": "1.1.1",
|
|
48
|
+
"@opengis/fastify-table": "1.4.1",
|
|
49
49
|
"@opengis/v3-core": "^0.3.93",
|
|
50
50
|
"@opengis/v3-filter": "^0.0.71",
|
|
51
51
|
"@turf/turf": "^7.1.0",
|
|
52
52
|
"axios": "^1.3.1",
|
|
53
53
|
"cross-env": "^7.0.3",
|
|
54
54
|
"echarts": "^5.5.1",
|
|
55
|
-
"fastify": "
|
|
56
|
-
"fastify-plugin": "
|
|
55
|
+
"fastify": "5.3.3",
|
|
56
|
+
"fastify-plugin": "5.0.1",
|
|
57
57
|
"highlight.js": "^11.10.0",
|
|
58
58
|
"js-yaml": "^4.1.0",
|
|
59
59
|
"maplibre-gl": "^4.7.1",
|
|
@@ -3,14 +3,17 @@ import dashboardList from './controllers/dashboard.list.js';
|
|
|
3
3
|
import dashboardImport from './controllers/dashboard.import.js';
|
|
4
4
|
|
|
5
5
|
const biSchema = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
type: 'object',
|
|
7
|
+
properties: {
|
|
8
|
+
querystring: {
|
|
9
|
+
widget: { type: 'string', pattern: '^([\\d\\w]+)$' },
|
|
10
|
+
dashboard: { type: 'string', pattern: '^([\\d\\w]+)$' },
|
|
11
|
+
list: { type: 'string', pattern: '^([\\d])$' },
|
|
12
|
+
sql: { type: 'string', pattern: '^([\\d])$' },
|
|
13
|
+
},
|
|
14
|
+
params: {
|
|
15
|
+
id: { type: 'string', pattern: '^([\\d\\w]+)$' },
|
|
16
|
+
},
|
|
14
17
|
},
|
|
15
18
|
};
|
|
16
19
|
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import config from '../../../config.js';
|
|
2
|
-
|
|
3
1
|
import data from './controllers/data.js';
|
|
4
2
|
|
|
5
3
|
const biSchema = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
4
|
+
type: 'object',
|
|
5
|
+
properties: {
|
|
6
|
+
querystring: {
|
|
7
|
+
widget: { type: 'string', pattern: '^([\\d\\w_]+)$' },
|
|
8
|
+
dashboard: { type: 'string', pattern: '^([\\d\\w_]+)$' },
|
|
9
|
+
sql: { type: 'string', pattern: '^([\\d])$' },
|
|
10
|
+
// metric: { type: 'string', pattern: '^([\\d\\w_]+)$' },
|
|
11
|
+
x: { type: 'string', pattern: '^([\\d\\w_]+)$' },
|
|
12
|
+
granularity: { type: 'string', pattern: '^(week|month|quarter|year)$' },
|
|
13
|
+
groupby: { type: 'string', pattern: '^([\\d\\w_]+)$' },
|
|
14
|
+
filterCustom: { type: 'string', pattern: '^([\\d\\w_,]+)$' },
|
|
15
|
+
},
|
|
16
|
+
params: {
|
|
17
|
+
id: { type: 'string', pattern: '^([\\d\\w]+)$' },
|
|
18
|
+
},
|
|
18
19
|
},
|
|
19
20
|
};
|
|
20
21
|
|
|
@@ -7,15 +7,18 @@ import dashboardAdd from './controllers/dashboard.add.js';
|
|
|
7
7
|
import dashboardDelete from './controllers/dashboard.delete.js';
|
|
8
8
|
|
|
9
9
|
const biSchema = {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {
|
|
12
|
+
querystring: {
|
|
13
|
+
widget: { type: 'string', pattern: '^([\\d\\w]+)$' },
|
|
14
|
+
dashboard: { type: 'string', pattern: '^([\\d\\w]+)$' },
|
|
15
|
+
list: { type: 'string', pattern: '^([\\d])$' },
|
|
16
|
+
sql: { type: 'string', pattern: '^([\\d])$' },
|
|
17
|
+
},
|
|
18
|
+
params: {
|
|
19
|
+
name: { type: 'string', pattern: '^([\\d\\w]+)$' },
|
|
20
|
+
widget: { type: 'string', pattern: '^([\\d\\w]+)$' },
|
|
21
|
+
},
|
|
19
22
|
},
|
|
20
23
|
};
|
|
21
24
|
|
|
@@ -7,13 +7,16 @@ import clusterVtile from './controllers/clusterVtile.js';
|
|
|
7
7
|
import heatmap from './controllers/heatmap.js';
|
|
8
8
|
|
|
9
9
|
const biSchema = {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {
|
|
12
|
+
querystring: {
|
|
13
|
+
widget: { type: 'string', pattern: '^([\\d\\w]+)$' },
|
|
14
|
+
dashboard: { type: 'string', pattern: '^([\\d\\w]+)$' },
|
|
15
|
+
sql: { type: 'string', pattern: '^([\\d])$' },
|
|
16
|
+
},
|
|
17
|
+
params: {
|
|
18
|
+
id: { type: 'string', pattern: '^([\\d\\w]+)$' },
|
|
19
|
+
},
|
|
17
20
|
},
|
|
18
21
|
};
|
|
19
22
|
|
|
@@ -37,8 +37,8 @@ async function getWidget({ pg: pg1 = pgClients.client, dashboard, widget }) {
|
|
|
37
37
|
|| dashboardWidgets?.find(el => el.name === widget)
|
|
38
38
|
: await getTemplate('widget', widget);
|
|
39
39
|
|
|
40
|
-
if (typeof widgetData === 'string' || (widgetData?.type === 'text' && typeof widgetData?.data?.text === 'string')) {
|
|
41
|
-
const html = mdToHTML(widgetData?.data?.text || widgetData);
|
|
40
|
+
if (typeof widgetData === 'string' || typeof widgetData?.html === 'string' || (widgetData?.type === 'text' && typeof widgetData?.data?.text === 'string')) {
|
|
41
|
+
const html = widgetData?.html || mdToHTML(widgetData?.data?.text || widgetData);
|
|
42
42
|
return { source: html, status: 200 };
|
|
43
43
|
}
|
|
44
44
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/bi.js
DELETED