@nocobase/plugin-data-visualization 1.9.0-beta.9 → 2.0.0-alpha.3
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/dist/client/0c07b8c8a2f69574.js +47 -0
- package/dist/client/33f0f13fb9c8b63c.js +10 -0
- package/dist/client/ai/tools/index.d.ts +10 -0
- package/dist/client/d5982ab2df5b1822.js +10 -0
- package/dist/client/e5eee84a69b5014e.js +10 -0
- package/dist/client/flow/components/CodeEditor.d.ts +22 -0
- package/dist/client/flow/models/Chart.d.ts +16 -0
- package/dist/client/flow/models/ChartBlockModel.d.ts +64 -0
- package/dist/client/flow/models/ChartEventsEditor.d.ts +10 -0
- package/dist/client/flow/models/ChartOptionsBuilder.d.ts +16 -0
- package/dist/client/flow/models/ChartOptionsBuilder.service.d.ts +16 -0
- package/dist/client/flow/models/ChartOptionsEditor.d.ts +16 -0
- package/dist/client/flow/models/ChartOptionsPanel.d.ts +10 -0
- package/dist/client/flow/models/ChartPreviewer.d.ts +10 -0
- package/dist/client/flow/models/ConfigPanel.d.ts +10 -0
- package/dist/client/flow/models/ECharts.d.ts +20 -0
- package/dist/client/flow/models/EventsPanel.d.ts +10 -0
- package/dist/client/flow/models/FormItemLite.d.ts +13 -0
- package/dist/client/flow/models/QueryBuilder.d.ts +10 -0
- package/dist/client/flow/models/QueryPanel.d.ts +10 -0
- package/dist/client/flow/models/ResultPanel.d.ts +10 -0
- package/dist/client/flow/models/SQLEditor.d.ts +10 -0
- package/dist/client/flow/models/config-store.d.ts +20 -0
- package/dist/client/flow/models/queryBuilder.logic.d.ts +25 -0
- package/dist/client/flow/resources/ChartResource.d.ts +39 -0
- package/dist/client/flow/utils.d.ts +33 -0
- package/dist/client/index.js +1 -1
- package/dist/client/{locale/index.d.ts → locale.d.ts} +4 -2
- package/dist/client/utils.d.ts +1 -0
- package/dist/externalVersion.js +15 -12
- package/dist/locale/en-US.json +6 -0
- package/dist/locale/zh-CN.json +7 -1
- package/dist/node_modules/koa-compose/package.json +1 -1
- package/dist/node_modules/moment-timezone/package.json +1 -1
- package/dist/server/ai/tools/build-chart-block.d.ts +10 -0
- package/dist/server/ai/tools/build-chart-block.js +67 -0
- package/dist/server/plugin.js +3 -0
- package/dist/server/query-parser/query-parser.js +1 -1
- package/package.json +18 -10
- package/dist/client/4abed7583f4c3c67.js +0 -47
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const namespace: string;
|
|
10
|
+
export declare function useT(): any;
|
|
11
|
+
export declare function tStr(key: string): string;
|
|
10
12
|
export declare function lang(key: string): string;
|
|
11
|
-
export declare function useChartsTranslation(): import("react-i18next").UseTranslationResponse<
|
|
13
|
+
export declare function useChartsTranslation(): import("react-i18next").UseTranslationResponse<string[], undefined>;
|
package/dist/client/utils.d.ts
CHANGED
|
@@ -152,3 +152,4 @@ export declare const removeUnparsableFilter: (filter: any) => any;
|
|
|
152
152
|
export declare const getValuesByPath: (values: any, path: string) => any;
|
|
153
153
|
export declare const getFormulaComponent: (type: string) => string;
|
|
154
154
|
export declare const getFormulaInterface: (type: string) => string;
|
|
155
|
+
export declare const isEmptyFilterObject: (filter: any) => boolean;
|
package/dist/externalVersion.js
CHANGED
|
@@ -8,24 +8,27 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "
|
|
12
|
-
"@formily/react": "2.3.
|
|
11
|
+
"@nocobase/client": "2.0.0-alpha.3",
|
|
12
|
+
"@formily/react": "2.3.7",
|
|
13
|
+
"@nocobase/plugin-ai": "2.0.0-alpha.3",
|
|
14
|
+
"@nocobase/flow-engine": "2.0.0-alpha.3",
|
|
15
|
+
"react-i18next": "11.18.6",
|
|
13
16
|
"dayjs": "1.11.13",
|
|
14
|
-
"@formily/shared": "2.3.
|
|
17
|
+
"@formily/shared": "2.3.7",
|
|
15
18
|
"lodash": "4.17.21",
|
|
16
|
-
"@nocobase/cache": "
|
|
17
|
-
"@nocobase/server": "
|
|
18
|
-
"@nocobase/test": "
|
|
19
|
-
"@nocobase/utils": "
|
|
19
|
+
"@nocobase/cache": "2.0.0-alpha.3",
|
|
20
|
+
"@nocobase/server": "2.0.0-alpha.3",
|
|
21
|
+
"@nocobase/test": "2.0.0-alpha.3",
|
|
22
|
+
"@nocobase/utils": "2.0.0-alpha.3",
|
|
20
23
|
"react": "18.2.0",
|
|
21
24
|
"@emotion/css": "11.13.0",
|
|
22
25
|
"@ant-design/icons": "5.6.1",
|
|
23
26
|
"ahooks": "3.7.8",
|
|
24
27
|
"antd": "5.24.2",
|
|
25
28
|
"@formily/antd-v5": "1.2.3",
|
|
26
|
-
"@formily/core": "2.3.
|
|
27
|
-
"
|
|
28
|
-
"@nocobase/
|
|
29
|
-
"
|
|
30
|
-
"
|
|
29
|
+
"@formily/core": "2.3.7",
|
|
30
|
+
"@nocobase/actions": "2.0.0-alpha.3",
|
|
31
|
+
"@nocobase/database": "2.0.0-alpha.3",
|
|
32
|
+
"sequelize": "6.35.2",
|
|
33
|
+
"@formily/reactive": "2.3.7"
|
|
31
34
|
};
|
package/dist/locale/en-US.json
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"Query": "Query",
|
|
19
19
|
"Data": "Data",
|
|
20
20
|
"Run query": "Run query",
|
|
21
|
+
"Preview Data": "Preview Data",
|
|
21
22
|
"Measures": "Measures",
|
|
22
23
|
"Dimensions": "Dimensions",
|
|
23
24
|
"Filter": "Filter",
|
|
@@ -27,6 +28,7 @@
|
|
|
27
28
|
"Enable cache": "Enable cache",
|
|
28
29
|
"TTL (second)": "TTL (second)",
|
|
29
30
|
"Field": "Field",
|
|
31
|
+
"Select Field": "Select Field",
|
|
30
32
|
"Aggregation": "Aggregation",
|
|
31
33
|
"Alias": "Alias",
|
|
32
34
|
"Format": "Format",
|
|
@@ -92,6 +94,10 @@
|
|
|
92
94
|
"Size": "Size",
|
|
93
95
|
"Width": "Width",
|
|
94
96
|
"Height": "Height",
|
|
97
|
+
"Smooth": "Smooth",
|
|
98
|
+
"Legend": "Legend",
|
|
99
|
+
"Tooltip": "Tooltip",
|
|
100
|
+
"Label": "Label",
|
|
95
101
|
"Aspect ratio": "Aspect ratio",
|
|
96
102
|
"Fixed height": "Fixed height",
|
|
97
103
|
"Show background": "Show background",
|
package/dist/locale/zh-CN.json
CHANGED
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"JSON config": "JSON 配置",
|
|
18
18
|
"Query": "查询",
|
|
19
19
|
"Data": "数据",
|
|
20
|
-
"Run query": "
|
|
20
|
+
"Run query": "运行查询",
|
|
21
|
+
"Preview Data": "预览数据",
|
|
21
22
|
"Measures": "度量",
|
|
22
23
|
"Dimensions": "维度",
|
|
23
24
|
"Filter": "过滤",
|
|
@@ -27,6 +28,7 @@
|
|
|
27
28
|
"Enable cache": "启用缓存",
|
|
28
29
|
"TTL (second)": "缓存时间 (秒)",
|
|
29
30
|
"Field": "字段",
|
|
31
|
+
"Select Field": "选择字段",
|
|
30
32
|
"Aggregation": "聚合",
|
|
31
33
|
"Alias": "别名",
|
|
32
34
|
"Format": "格式",
|
|
@@ -93,6 +95,10 @@
|
|
|
93
95
|
"Size": "尺寸",
|
|
94
96
|
"Width": "宽",
|
|
95
97
|
"Height": "高",
|
|
98
|
+
"Smooth": "平滑(Smooth)",
|
|
99
|
+
"Legend": "图例(Legend)",
|
|
100
|
+
"Tooltip": "提示框(Tooltip)",
|
|
101
|
+
"Label": "标签(Label)",
|
|
96
102
|
"Aspect ratio": "宽高比",
|
|
97
103
|
"Fixed height": "固定高度",
|
|
98
104
|
"Show background": "显示背景",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"koa-compose","description":"compose Koa middleware","repository":"koajs/compose","version":"4.1.0","keywords":["koa","middleware","compose"],"files":["index.js"],"dependencies":{},"devDependencies":{"codecov":"^3.0.0","jest":"^21.0.0","matcha":"^0.7.0","standard":"^10.0.3"},"scripts":{"bench":"matcha bench/bench.js","lint":"standard --fix .","test":"jest --forceExit --coverage"},"jest":{"testEnvironment":"node"},"license":"MIT","_lastModified":"2025-09-
|
|
1
|
+
{"name":"koa-compose","description":"compose Koa middleware","repository":"koajs/compose","version":"4.1.0","keywords":["koa","middleware","compose"],"files":["index.js"],"dependencies":{},"devDependencies":{"codecov":"^3.0.0","jest":"^21.0.0","matcha":"^0.7.0","standard":"^10.0.3"},"scripts":{"bench":"matcha bench/bench.js","lint":"standard --fix .","test":"jest --forceExit --coverage"},"jest":{"testEnvironment":"node"},"license":"MIT","_lastModified":"2025-09-30T15:50:58.323Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"moment-timezone","version":"0.5.43","description":"Parse and display moments in any timezone.","homepage":"http://momentjs.com/timezone/","author":"Tim Wood <washwithcare@gmail.com> (http://timwoodcreates.com/)","keywords":["moment","date","time","timezone","olson","iana","zone","tz"],"main":"./index.js","typings":"./index.d.ts","engines":{"node":"*"},"repository":{"type":"git","url":"https://github.com/moment/moment-timezone.git"},"bugs":{"url":"https://github.com/moment/moment-timezone/issues"},"license":"MIT","dependencies":{"moment":"^2.29.4"},"devDependencies":{"grunt":"^1.5.3","grunt-contrib-clean":"^2.0.1","grunt-contrib-jshint":"^3.2.0","grunt-contrib-nodeunit":"^4.0.0","grunt-contrib-uglify":"^5.2.2","grunt-exec":"^3.0.0","typescript":"^3.5.1"},"jspm":{"main":"builds/moment-timezone-with-data","shim":{"moment-timezone":{"deps":["moment"]}}},"scripts":{"test":"grunt"},"_lastModified":"2025-09-
|
|
1
|
+
{"name":"moment-timezone","version":"0.5.43","description":"Parse and display moments in any timezone.","homepage":"http://momentjs.com/timezone/","author":"Tim Wood <washwithcare@gmail.com> (http://timwoodcreates.com/)","keywords":["moment","date","time","timezone","olson","iana","zone","tz"],"main":"./index.js","typings":"./index.d.ts","engines":{"node":"*"},"repository":{"type":"git","url":"https://github.com/moment/moment-timezone.git"},"bugs":{"url":"https://github.com/moment/moment-timezone/issues"},"license":"MIT","dependencies":{"moment":"^2.29.4"},"devDependencies":{"grunt":"^1.5.3","grunt-contrib-clean":"^2.0.1","grunt-contrib-jshint":"^3.2.0","grunt-contrib-nodeunit":"^4.0.0","grunt-contrib-uglify":"^5.2.2","grunt-exec":"^3.0.0","typescript":"^3.5.1"},"jspm":{"main":"builds/moment-timezone-with-data","shim":{"moment-timezone":{"deps":["moment"]}}},"scripts":{"test":"grunt"},"_lastModified":"2025-09-30T15:50:58.904Z"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import { ToolOptions } from '@nocobase/plugin-ai';
|
|
10
|
+
export declare const buildChartBlock: ToolOptions;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
var build_chart_block_exports = {};
|
|
28
|
+
__export(build_chart_block_exports, {
|
|
29
|
+
buildChartBlock: () => buildChartBlock
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(build_chart_block_exports);
|
|
32
|
+
const buildChartBlock = {
|
|
33
|
+
name: "buildChartBlock",
|
|
34
|
+
title: '{{t("Build chart blocks")}}',
|
|
35
|
+
description: '{{t("Helper to build chart blocks")}}',
|
|
36
|
+
execution: "frontend",
|
|
37
|
+
schema: {
|
|
38
|
+
type: "object",
|
|
39
|
+
properties: {
|
|
40
|
+
title: {
|
|
41
|
+
type: "string"
|
|
42
|
+
},
|
|
43
|
+
description: {
|
|
44
|
+
type: "string"
|
|
45
|
+
},
|
|
46
|
+
sql: {
|
|
47
|
+
type: "string"
|
|
48
|
+
},
|
|
49
|
+
echartsOption: {
|
|
50
|
+
type: "object",
|
|
51
|
+
additionalProperties: true
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
required: ["sql", "echartsOption"],
|
|
55
|
+
additionalProperties: false
|
|
56
|
+
},
|
|
57
|
+
invoke: async () => {
|
|
58
|
+
return {
|
|
59
|
+
status: "success",
|
|
60
|
+
content: "I have built the chart block successfully."
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
65
|
+
0 && (module.exports = {
|
|
66
|
+
buildChartBlock
|
|
67
|
+
});
|
package/dist/server/plugin.js
CHANGED
|
@@ -120,7 +120,7 @@ class QueryParser {
|
|
|
120
120
|
const order = this.parseOrders(ctx, orders, hasAgg);
|
|
121
121
|
const queryParams = {
|
|
122
122
|
where,
|
|
123
|
-
attributes: [...
|
|
123
|
+
attributes: [...dimensionAttributes, ...measureAttributes],
|
|
124
124
|
include,
|
|
125
125
|
group,
|
|
126
126
|
order,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-data-visualization",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.3",
|
|
4
4
|
"displayName": "Data visualization",
|
|
5
5
|
"displayName.zh-CN": "数据可视化",
|
|
6
6
|
"description": "Provides data visualization feature, including chart block and chart filter block, support line charts, area charts, bar charts and more than a dozen kinds of charts, you can also extend more chart types.",
|
|
@@ -11,6 +11,12 @@
|
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@ant-design/icons": "5.x",
|
|
13
13
|
"@ant-design/plots": "^2.1.4",
|
|
14
|
+
"@codemirror/lang-javascript": "^6.0.1",
|
|
15
|
+
"@codemirror/lang-sql": "^6.9.1",
|
|
16
|
+
"@codemirror/lint": "^6.8.3",
|
|
17
|
+
"@codemirror/state": "^6.0.1",
|
|
18
|
+
"@codemirror/theme-one-dark": "^6.0.1",
|
|
19
|
+
"@codemirror/view": "^6.37.2",
|
|
14
20
|
"@emotion/css": "^11.7.1",
|
|
15
21
|
"@formily/antd-v5": "1.x",
|
|
16
22
|
"@formily/core": "2.x",
|
|
@@ -18,6 +24,7 @@
|
|
|
18
24
|
"@formily/shared": "2.x",
|
|
19
25
|
"antd": "5.x",
|
|
20
26
|
"classnames": "^2.3.1",
|
|
27
|
+
"echarts": "^6.0.0",
|
|
21
28
|
"koa-compose": "^4.1.0",
|
|
22
29
|
"lodash": "^4.17.21",
|
|
23
30
|
"react": "^18.2.0",
|
|
@@ -25,16 +32,17 @@
|
|
|
25
32
|
"react-i18next": "^11.15.1"
|
|
26
33
|
},
|
|
27
34
|
"peerDependencies": {
|
|
28
|
-
"@nocobase/actions": "
|
|
29
|
-
"@nocobase/cache": "
|
|
30
|
-
"@nocobase/client": "
|
|
31
|
-
"@nocobase/database": "
|
|
32
|
-
"@nocobase/plugin-
|
|
33
|
-
"@nocobase/
|
|
34
|
-
"@nocobase/
|
|
35
|
-
"@nocobase/
|
|
35
|
+
"@nocobase/actions": "2.x",
|
|
36
|
+
"@nocobase/cache": "2.x",
|
|
37
|
+
"@nocobase/client": "2.x",
|
|
38
|
+
"@nocobase/database": "2.x",
|
|
39
|
+
"@nocobase/plugin-ai": "2.x",
|
|
40
|
+
"@nocobase/plugin-data-source-main": "2.x",
|
|
41
|
+
"@nocobase/server": "2.x",
|
|
42
|
+
"@nocobase/test": "2.x",
|
|
43
|
+
"@nocobase/utils": "2.x"
|
|
36
44
|
},
|
|
37
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "8efc23aa78058d871e98a91419f3c4a61762cc15",
|
|
38
46
|
"keywords": [
|
|
39
47
|
"Blocks"
|
|
40
48
|
]
|