@nocobase/plugin-data-visualization 0.18.0-alpha.9 → 0.19.0-alpha.2
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/block/ChartBlockInitializer.d.ts +1 -1
- package/dist/client/filter/FilterActionInitializers.d.ts +1 -1
- package/dist/client/filter/FilterItemInitializers.d.ts +1 -1
- package/dist/client/index.js +15 -15
- package/dist/externalVersion.js +7 -7
- package/dist/node_modules/koa-compose/package.json +1 -1
- package/dist/server/actions/query.js +16 -24
- package/dist/server/migrations/20230926211750-rename-charttype.d.ts +1 -0
- package/dist/server/migrations/20230926211750-rename-charttype.js +1 -0
- package/package.json +2 -2
package/dist/externalVersion.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
"@nocobase/client": "0.
|
|
2
|
+
"@nocobase/client": "0.19.0-alpha.2",
|
|
3
3
|
"@formily/react": "2.3.0",
|
|
4
4
|
"@formily/shared": "2.3.0",
|
|
5
5
|
"lodash": "4.17.21",
|
|
6
|
-
"@nocobase/cache": "0.
|
|
7
|
-
"@nocobase/server": "0.
|
|
6
|
+
"@nocobase/cache": "0.19.0-alpha.2",
|
|
7
|
+
"@nocobase/server": "0.19.0-alpha.2",
|
|
8
8
|
"react": "18.2.0",
|
|
9
9
|
"@ant-design/icons": "5.2.6",
|
|
10
10
|
"ahooks": "3.7.8",
|
|
11
11
|
"dayjs": "1.11.10",
|
|
12
12
|
"@emotion/css": "11.11.2",
|
|
13
|
-
"antd": "5.12.
|
|
13
|
+
"antd": "5.12.8",
|
|
14
14
|
"@formily/antd-v5": "1.1.9",
|
|
15
15
|
"@formily/core": "2.3.0",
|
|
16
|
-
"@nocobase/utils": "0.
|
|
17
|
-
"@nocobase/database": "0.
|
|
16
|
+
"@nocobase/utils": "0.19.0-alpha.2",
|
|
17
|
+
"@nocobase/database": "0.19.0-alpha.2",
|
|
18
18
|
"react-i18next": "11.18.6",
|
|
19
|
-
"@nocobase/actions": "0.
|
|
19
|
+
"@nocobase/actions": "0.19.0-alpha.2"
|
|
20
20
|
};
|
|
@@ -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-01-
|
|
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-01-09T01:22:33.282Z"}
|
|
@@ -41,31 +41,23 @@ var import_formatter = require("./formatter");
|
|
|
41
41
|
var import_koa_compose = __toESM(require("koa-compose"));
|
|
42
42
|
var import_utils = require("@nocobase/utils");
|
|
43
43
|
const postProcess = async (ctx, next) => {
|
|
44
|
-
const { sequelize } = ctx.db;
|
|
45
|
-
const dialect = sequelize.getDialect();
|
|
46
44
|
const { data, fieldMap } = ctx.action.params.values;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
return result;
|
|
64
|
-
});
|
|
65
|
-
break;
|
|
66
|
-
default:
|
|
67
|
-
ctx.body = data;
|
|
68
|
-
}
|
|
45
|
+
ctx.body = data.map((record) => {
|
|
46
|
+
const result = {};
|
|
47
|
+
Object.entries(record).forEach(([key, value]) => {
|
|
48
|
+
const { type } = fieldMap[key] || {};
|
|
49
|
+
switch (type) {
|
|
50
|
+
case "bigInt":
|
|
51
|
+
case "integer":
|
|
52
|
+
case "float":
|
|
53
|
+
case "double":
|
|
54
|
+
value = Number(value);
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
result[key] = value;
|
|
58
|
+
});
|
|
59
|
+
return result;
|
|
60
|
+
});
|
|
69
61
|
await next();
|
|
70
62
|
};
|
|
71
63
|
const queryData = async (ctx, next) => {
|
|
@@ -22,6 +22,7 @@ __export(rename_charttype_exports, {
|
|
|
22
22
|
module.exports = __toCommonJS(rename_charttype_exports);
|
|
23
23
|
var import_server = require("@nocobase/server");
|
|
24
24
|
class RenameChartTypeMigration extends import_server.Migration {
|
|
25
|
+
appVersion = "<0.14.0-alpha.7";
|
|
25
26
|
async up() {
|
|
26
27
|
const result = await this.app.version.satisfies("<=0.14.0-alpha.7");
|
|
27
28
|
if (!result) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-data-visualization",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0-alpha.2",
|
|
4
4
|
"displayName": "Data Visualization",
|
|
5
5
|
"displayName.zh-CN": "数据可视化",
|
|
6
6
|
"description": "Provides business intelligence and data visualization features",
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"@nocobase/test": "0.x",
|
|
32
32
|
"@nocobase/utils": "0.x"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "cff5b77ecf12ccdb450d50d505b3aa44a68478c8"
|
|
35
35
|
}
|