@nocobase/plugin-data-visualization 1.4.0-alpha.20240930160619 → 1.4.0-alpha.20241011073807
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/chart/chart.d.ts +9 -6
- package/dist/client/chart/configs.d.ts +212 -19
- package/dist/client/chart/group.d.ts +9 -4
- package/dist/client/configure/schemas/configure.d.ts +1 -1
- package/dist/client/hooks/chart.d.ts +20 -0
- package/dist/client/hooks/index.d.ts +1 -0
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.js +29 -29
- package/dist/externalVersion.js +6 -6
- package/dist/locale/en-US.json +13 -13
- package/dist/locale/zh-CN.json +8 -8
- package/dist/node_modules/koa-compose/package.json +1 -1
- package/dist/node_modules/moment-timezone/package.json +1 -1
- package/dist/server/migrations/20240921214400-rename-charttype.d.ts +14 -0
- package/dist/server/migrations/20240921214400-rename-charttype.js +64 -0
- package/package.json +2 -2
- package/dist/client/chart/g2plot/configs.d.ts +0 -122
package/dist/externalVersion.js
CHANGED
|
@@ -8,23 +8,23 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "1.4.0-alpha.
|
|
11
|
+
"@nocobase/client": "1.4.0-alpha.20241011073807",
|
|
12
12
|
"dayjs": "1.11.10",
|
|
13
13
|
"@formily/react": "2.3.0",
|
|
14
14
|
"@formily/shared": "2.3.0",
|
|
15
15
|
"lodash": "4.17.21",
|
|
16
16
|
"react": "18.2.0",
|
|
17
|
-
"@nocobase/cache": "1.4.0-alpha.
|
|
18
|
-
"@nocobase/server": "1.4.0-alpha.
|
|
17
|
+
"@nocobase/cache": "1.4.0-alpha.20241011073807",
|
|
18
|
+
"@nocobase/server": "1.4.0-alpha.20241011073807",
|
|
19
19
|
"@emotion/css": "11.13.0",
|
|
20
20
|
"@ant-design/icons": "5.2.6",
|
|
21
21
|
"ahooks": "3.7.8",
|
|
22
22
|
"antd": "5.12.8",
|
|
23
23
|
"@formily/antd-v5": "1.1.9",
|
|
24
24
|
"@formily/core": "2.3.0",
|
|
25
|
-
"@nocobase/utils": "1.4.0-alpha.
|
|
25
|
+
"@nocobase/utils": "1.4.0-alpha.20241011073807",
|
|
26
26
|
"react-i18next": "11.18.6",
|
|
27
|
-
"@nocobase/actions": "1.4.0-alpha.
|
|
28
|
-
"@nocobase/database": "1.4.0-alpha.
|
|
27
|
+
"@nocobase/actions": "1.4.0-alpha.20241011073807",
|
|
28
|
+
"@nocobase/database": "1.4.0-alpha.20241011073807",
|
|
29
29
|
"sequelize": "6.35.2"
|
|
30
30
|
};
|
package/dist/locale/en-US.json
CHANGED
|
@@ -34,19 +34,19 @@
|
|
|
34
34
|
"Type": "Type",
|
|
35
35
|
"Add field": "Add field",
|
|
36
36
|
"Add chart": "Add chart",
|
|
37
|
-
"xField": "
|
|
38
|
-
"yField": "
|
|
39
|
-
"seriesField": "
|
|
40
|
-
"angleField": "
|
|
41
|
-
"colorField": "
|
|
42
|
-
"Line
|
|
43
|
-
"Area
|
|
44
|
-
"Column
|
|
45
|
-
"Bar
|
|
46
|
-
"Pie
|
|
47
|
-
"Dual
|
|
48
|
-
"Scatter
|
|
49
|
-
"Gauge
|
|
37
|
+
"xField": "X field",
|
|
38
|
+
"yField": "Y field",
|
|
39
|
+
"seriesField": "Series field",
|
|
40
|
+
"angleField": "Angle field",
|
|
41
|
+
"colorField": "Color field",
|
|
42
|
+
"Line": "Line",
|
|
43
|
+
"Area": "Area",
|
|
44
|
+
"Column": "Column",
|
|
45
|
+
"Bar": "Bar",
|
|
46
|
+
"Pie": "Pie",
|
|
47
|
+
"Dual axes": "Dual axes",
|
|
48
|
+
"Scatter": "Scatter",
|
|
49
|
+
"Gauge": "Gauge",
|
|
50
50
|
"Statistic": "Statistic",
|
|
51
51
|
"Currency": "Currency",
|
|
52
52
|
"Percent": "Percent",
|
package/dist/locale/zh-CN.json
CHANGED
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
"seriesField": "分类字段",
|
|
40
40
|
"angleField": "角度字段",
|
|
41
41
|
"colorField": "颜色字段",
|
|
42
|
-
"Line
|
|
43
|
-
"Area
|
|
44
|
-
"Column
|
|
45
|
-
"Bar
|
|
46
|
-
"Pie
|
|
47
|
-
"Dual
|
|
48
|
-
"Scatter
|
|
49
|
-
"Gauge
|
|
42
|
+
"Line": "折线图",
|
|
43
|
+
"Area": "面积图",
|
|
44
|
+
"Column": "柱状图",
|
|
45
|
+
"Bar": "条形图",
|
|
46
|
+
"Pie": "饼图",
|
|
47
|
+
"Dual axes": "双轴图",
|
|
48
|
+
"Scatter": "散点图",
|
|
49
|
+
"Gauge": "仪表盘",
|
|
50
50
|
"Statistic": "统计",
|
|
51
51
|
"Currency": "货币",
|
|
52
52
|
"Percent": "百分比",
|
|
@@ -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":"2024-
|
|
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":"2024-10-11T07:52:07.196Z"}
|
|
@@ -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":"2024-
|
|
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":"2024-10-11T07:52:07.910Z"}
|
|
@@ -0,0 +1,14 @@
|
|
|
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 { Migration } from '@nocobase/server';
|
|
10
|
+
export default class extends Migration {
|
|
11
|
+
on: string;
|
|
12
|
+
appVersion: string;
|
|
13
|
+
up(): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
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 rename_charttype_exports = {};
|
|
28
|
+
__export(rename_charttype_exports, {
|
|
29
|
+
default: () => rename_charttype_default
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(rename_charttype_exports);
|
|
32
|
+
var import_server = require("@nocobase/server");
|
|
33
|
+
class rename_charttype_default extends import_server.Migration {
|
|
34
|
+
on = "afterLoad";
|
|
35
|
+
// 'beforeLoad' or 'afterLoad'
|
|
36
|
+
appVersion = "<=1.5.0-beta";
|
|
37
|
+
async up() {
|
|
38
|
+
const r = this.db.getRepository("uiSchemas");
|
|
39
|
+
const items = await r.find({
|
|
40
|
+
filter: {
|
|
41
|
+
"schema.x-decorator": "ChartRendererProvider"
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
await this.db.sequelize.transaction(async (transaction) => {
|
|
45
|
+
var _a, _b;
|
|
46
|
+
for (const item of items) {
|
|
47
|
+
const schema = item.schema;
|
|
48
|
+
const chartType = (_b = (_a = schema["x-decorator-props"]) == null ? void 0 : _a.config) == null ? void 0 : _b.chartType;
|
|
49
|
+
if (!chartType) {
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
if (chartType.startsWith("Built-in.")) {
|
|
53
|
+
if (chartType === "Built-in.statistic" || chartType === "Built-in.table") {
|
|
54
|
+
schema["x-decorator-props"].config.chartType = chartType.replace("Built-in", "antd");
|
|
55
|
+
} else {
|
|
56
|
+
schema["x-decorator-props"].config.chartType = chartType.replace("Built-in", "ant-design-charts");
|
|
57
|
+
}
|
|
58
|
+
item.set("schema", schema);
|
|
59
|
+
await item.save({ transaction });
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-data-visualization",
|
|
3
|
-
"version": "1.4.0-alpha.
|
|
3
|
+
"version": "1.4.0-alpha.20241011073807",
|
|
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.",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@nocobase/test": "1.x",
|
|
35
35
|
"@nocobase/utils": "1.x"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "f2d5dd5ede95fbb62e426e843e0f1782306750f2",
|
|
38
38
|
"keywords": [
|
|
39
39
|
"Blocks"
|
|
40
40
|
]
|
|
@@ -1,122 +0,0 @@
|
|
|
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 { FieldConfigProps } from '../configs';
|
|
10
|
-
declare const _default: {
|
|
11
|
-
isStack: (props: FieldConfigProps) => {
|
|
12
|
-
[x: string]: {
|
|
13
|
-
'x-content': string;
|
|
14
|
-
type: string;
|
|
15
|
-
'x-decorator': string;
|
|
16
|
-
'x-component': string;
|
|
17
|
-
default: any;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
smooth: (props: FieldConfigProps) => {
|
|
21
|
-
[x: string]: {
|
|
22
|
-
'x-content': string;
|
|
23
|
-
type: string;
|
|
24
|
-
'x-decorator': string;
|
|
25
|
-
'x-component': string;
|
|
26
|
-
default: any;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
isPercent: (props: FieldConfigProps) => {
|
|
30
|
-
[x: string]: {
|
|
31
|
-
'x-content': string;
|
|
32
|
-
type: string;
|
|
33
|
-
'x-decorator': string;
|
|
34
|
-
'x-component': string;
|
|
35
|
-
default: any;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
isGroup: (props: FieldConfigProps) => {
|
|
39
|
-
[x: string]: {
|
|
40
|
-
'x-content': string;
|
|
41
|
-
type: string;
|
|
42
|
-
'x-decorator': string;
|
|
43
|
-
'x-component': string;
|
|
44
|
-
default: any;
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
size: () => {
|
|
48
|
-
size: {
|
|
49
|
-
title: string;
|
|
50
|
-
type: string;
|
|
51
|
-
'x-decorator': string;
|
|
52
|
-
'x-component': string;
|
|
53
|
-
properties: {
|
|
54
|
-
type: {
|
|
55
|
-
'x-component': string;
|
|
56
|
-
'x-component-props': {
|
|
57
|
-
allowClear: boolean;
|
|
58
|
-
};
|
|
59
|
-
default: string;
|
|
60
|
-
enum: {
|
|
61
|
-
label: string;
|
|
62
|
-
value: string;
|
|
63
|
-
}[];
|
|
64
|
-
};
|
|
65
|
-
fixed: {
|
|
66
|
-
type: string;
|
|
67
|
-
'x-component': string;
|
|
68
|
-
'x-component-props': {
|
|
69
|
-
min: number;
|
|
70
|
-
addonAfter: string;
|
|
71
|
-
};
|
|
72
|
-
'x-reactions': {
|
|
73
|
-
dependencies: string[];
|
|
74
|
-
fulfill: {
|
|
75
|
-
state: {
|
|
76
|
-
visible: string;
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
|
-
}[];
|
|
80
|
-
};
|
|
81
|
-
ratio: {
|
|
82
|
-
type: string;
|
|
83
|
-
'x-component': string;
|
|
84
|
-
'x-reactions': {
|
|
85
|
-
dependencies: string[];
|
|
86
|
-
fulfill: {
|
|
87
|
-
state: {
|
|
88
|
-
visible: string;
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
|
-
}[];
|
|
92
|
-
properties: {
|
|
93
|
-
width: {
|
|
94
|
-
type: string;
|
|
95
|
-
'x-component': string;
|
|
96
|
-
'x-component-props': {
|
|
97
|
-
placeholder: string;
|
|
98
|
-
min: number;
|
|
99
|
-
};
|
|
100
|
-
};
|
|
101
|
-
colon: {
|
|
102
|
-
type: string;
|
|
103
|
-
'x-component': string;
|
|
104
|
-
'x-component-props': {
|
|
105
|
-
children: string;
|
|
106
|
-
};
|
|
107
|
-
};
|
|
108
|
-
height: {
|
|
109
|
-
type: string;
|
|
110
|
-
'x-component': string;
|
|
111
|
-
'x-component-props': {
|
|
112
|
-
placeholder: string;
|
|
113
|
-
min: number;
|
|
114
|
-
};
|
|
115
|
-
};
|
|
116
|
-
};
|
|
117
|
-
};
|
|
118
|
-
};
|
|
119
|
-
};
|
|
120
|
-
};
|
|
121
|
-
};
|
|
122
|
-
export default _default;
|