@nocobase/plugin-data-visualization 2.0.33 → 2.0.35
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/a82390fa5c871f61.js +47 -0
- package/dist/client/index.js +1 -1
- package/dist/externalVersion.js +11 -11
- package/dist/node_modules/koa-compose/package.json +1 -1
- package/dist/node_modules/moment-timezone/package.json +1 -1
- package/dist/server/formatter/formatter.d.ts +1 -1
- package/dist/server/formatter/formatter.js +7 -1
- package/dist/server/query-parser/query-parser.js +3 -1
- package/package.json +2 -2
- package/dist/client/52b6e6ba5111171b.js +0 -47
package/dist/externalVersion.js
CHANGED
|
@@ -8,18 +8,18 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "2.0.
|
|
11
|
+
"@nocobase/client": "2.0.35",
|
|
12
12
|
"@formily/react": "2.3.7",
|
|
13
|
-
"@nocobase/plugin-ai": "2.0.
|
|
14
|
-
"@nocobase/flow-engine": "2.0.
|
|
13
|
+
"@nocobase/plugin-ai": "2.0.35",
|
|
14
|
+
"@nocobase/flow-engine": "2.0.35",
|
|
15
15
|
"react-i18next": "11.18.6",
|
|
16
16
|
"dayjs": "1.11.13",
|
|
17
17
|
"@formily/shared": "2.3.7",
|
|
18
18
|
"lodash": "4.17.21",
|
|
19
|
-
"@nocobase/cache": "2.0.
|
|
20
|
-
"@nocobase/server": "2.0.
|
|
21
|
-
"@nocobase/test": "2.0.
|
|
22
|
-
"@nocobase/utils": "2.0.
|
|
19
|
+
"@nocobase/cache": "2.0.35",
|
|
20
|
+
"@nocobase/server": "2.0.35",
|
|
21
|
+
"@nocobase/test": "2.0.35",
|
|
22
|
+
"@nocobase/utils": "2.0.35",
|
|
23
23
|
"react": "18.2.0",
|
|
24
24
|
"@emotion/css": "11.13.0",
|
|
25
25
|
"@ant-design/icons": "5.6.1",
|
|
@@ -27,10 +27,10 @@ module.exports = {
|
|
|
27
27
|
"antd": "5.24.2",
|
|
28
28
|
"@formily/antd-v5": "1.2.3",
|
|
29
29
|
"@formily/core": "2.3.7",
|
|
30
|
-
"@nocobase/actions": "2.0.
|
|
31
|
-
"@nocobase/database": "2.0.
|
|
32
|
-
"@nocobase/acl": "2.0.
|
|
33
|
-
"@nocobase/plugin-flow-engine": "2.0.
|
|
30
|
+
"@nocobase/actions": "2.0.35",
|
|
31
|
+
"@nocobase/database": "2.0.35",
|
|
32
|
+
"@nocobase/acl": "2.0.35",
|
|
33
|
+
"@nocobase/plugin-flow-engine": "2.0.35",
|
|
34
34
|
"sequelize": "6.35.2",
|
|
35
35
|
"@formily/reactive": "2.3.7"
|
|
36
36
|
};
|
|
@@ -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":"2026-04-
|
|
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":"2026-04-09T15:03:38.592Z"}
|
|
@@ -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":"2026-04-
|
|
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":"2026-04-09T15:03:39.139Z"}
|
|
@@ -15,7 +15,7 @@ export declare abstract class Formatter {
|
|
|
15
15
|
constructor(sequelize: Sequelize);
|
|
16
16
|
abstract formatDate(field: Col, format: string, timezone?: string): Fn | Col;
|
|
17
17
|
abstract formatUnixTimeStamp(field: string, format: string, accuracy?: 'second' | 'millisecond', timezone?: string): Fn | Literal;
|
|
18
|
-
getTimezoneByOffset(offset
|
|
18
|
+
getTimezoneByOffset(offset?: string): string;
|
|
19
19
|
convertFormat(format: string): string;
|
|
20
20
|
format(options: {
|
|
21
21
|
type: string;
|
|
@@ -46,9 +46,15 @@ class Formatter {
|
|
|
46
46
|
this.sequelize = sequelize;
|
|
47
47
|
}
|
|
48
48
|
getTimezoneByOffset(offset) {
|
|
49
|
-
if (
|
|
49
|
+
if (!offset) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
if (import_moment_timezone.default.tz.zone(offset)) {
|
|
50
53
|
return offset;
|
|
51
54
|
}
|
|
55
|
+
if (!/^[+-]\d{1,2}:\d{2}$/.test(offset)) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
52
58
|
const offsetMinutes = import_moment_timezone.default.duration(offset).asMinutes();
|
|
53
59
|
return import_moment_timezone.default.tz.names().find((timezone) => {
|
|
54
60
|
return import_moment_timezone.default.tz(timezone).utcOffset() === offsetMinutes;
|
|
@@ -30,6 +30,7 @@ __export(query_parser_exports, {
|
|
|
30
30
|
});
|
|
31
31
|
module.exports = __toCommonJS(query_parser_exports);
|
|
32
32
|
const AllowedAggFuncs = ["sum", "count", "avg", "min", "max"];
|
|
33
|
+
const AllowedOrderDirections = ["ASC", "DESC"];
|
|
33
34
|
class QueryParser {
|
|
34
35
|
db;
|
|
35
36
|
formatter;
|
|
@@ -94,9 +95,10 @@ class QueryParser {
|
|
|
94
95
|
const sequelize = this.db.sequelize;
|
|
95
96
|
const order = [];
|
|
96
97
|
orders.forEach((item) => {
|
|
98
|
+
var _a;
|
|
97
99
|
const alias = sequelize.getQueryInterface().quoteIdentifier(item.alias);
|
|
98
100
|
const name = hasAgg ? sequelize.literal(alias) : sequelize.col(item.field);
|
|
99
|
-
let sort = item.order
|
|
101
|
+
let sort = AllowedOrderDirections.includes((_a = item.order) == null ? void 0 : _a.toUpperCase()) ? item.order.toUpperCase() : "ASC";
|
|
100
102
|
if (item.nulls === "first") {
|
|
101
103
|
sort += " NULLS FIRST";
|
|
102
104
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-data-visualization",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.35",
|
|
4
4
|
"displayName": "Data visualization",
|
|
5
5
|
"displayName.ru-RU": "Визуализация данных",
|
|
6
6
|
"displayName.zh-CN": "数据可视化",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@nocobase/test": "2.x",
|
|
48
48
|
"@nocobase/utils": "2.x"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "724e9b28057c9033b9d57bdbeda5a331c9dcc646",
|
|
51
51
|
"keywords": [
|
|
52
52
|
"Blocks"
|
|
53
53
|
],
|