@nocobase/plugin-data-visualization 1.3.39-beta → 1.4.0-alpha
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/ChartBlockProvider.d.ts +10 -0
- package/dist/client/block/GlobalAutoRefreshProvider.d.ts +19 -0
- package/dist/client/block/index.d.ts +2 -0
- 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/filter/utils.d.ts +2 -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 +30 -30
- package/dist/client/initializers/BlockRefreshAction.d.ts +14 -0
- package/dist/client/initializers/RefreshAction.d.ts +14 -0
- package/dist/client/initializers/chartActions.d.ts +10 -0
- package/dist/client/initializers/chartBlockActions.d.ts +10 -0
- package/dist/client/renderer/ChartRendererDesigner.d.ts +10 -0
- package/dist/client/renderer/ChartRendererProvider.d.ts +6 -0
- package/dist/client/settings/AutoRefreshItem.d.ts +13 -0
- package/dist/client/settings/chartActionRefresh.d.ts +10 -0
- package/dist/client/settings/chartBlockActionRefresh.d.ts +10 -0
- package/dist/client/utils.d.ts +42 -0
- package/dist/externalVersion.js +8 -8
- package/dist/locale/en-US.json +15 -14
- package/dist/locale/zh-CN.json +10 -9
- package/dist/node_modules/koa-compose/package.json +1 -1
- package/dist/node_modules/moment-timezone/LICENSE +20 -0
- package/dist/node_modules/moment-timezone/builds/moment-timezone-with-data-10-year-range.js +1548 -0
- package/dist/node_modules/moment-timezone/builds/moment-timezone-with-data-10-year-range.min.js +1 -0
- package/dist/node_modules/moment-timezone/builds/moment-timezone-with-data-1970-2030.js +1548 -0
- package/dist/node_modules/moment-timezone/builds/moment-timezone-with-data-1970-2030.min.js +1 -0
- package/dist/node_modules/moment-timezone/builds/moment-timezone-with-data-2012-2022.js +1560 -0
- package/dist/node_modules/moment-timezone/builds/moment-timezone-with-data-2012-2022.min.js +1 -0
- package/dist/node_modules/moment-timezone/builds/moment-timezone-with-data.js +1548 -0
- package/dist/node_modules/moment-timezone/builds/moment-timezone-with-data.min.js +1 -0
- package/dist/node_modules/moment-timezone/builds/moment-timezone.min.js +1 -0
- package/dist/node_modules/moment-timezone/composer.json +43 -0
- package/dist/node_modules/moment-timezone/data/meta/latest.json +5889 -0
- package/dist/node_modules/moment-timezone/data/packed/latest.json +852 -0
- package/dist/node_modules/moment-timezone/index.d.ts +78 -0
- package/dist/node_modules/moment-timezone/index.js +15 -0
- package/dist/node_modules/moment-timezone/moment-timezone-utils.d.ts +70 -0
- package/dist/node_modules/moment-timezone/moment-timezone-utils.js +339 -0
- package/dist/node_modules/moment-timezone/moment-timezone.js +696 -0
- package/dist/node_modules/moment-timezone/package.json +1 -0
- package/dist/server/actions/query.d.ts +0 -1
- package/dist/server/actions/query.js +11 -75
- package/dist/server/formatter/formatter.d.ts +27 -0
- package/dist/server/formatter/formatter.js +85 -0
- package/dist/server/formatter/mysql-formatter.d.ts +14 -0
- package/dist/server/formatter/mysql-formatter.js +86 -0
- package/dist/server/formatter/oracle-formatter.d.ts +14 -0
- package/dist/server/formatter/oracle-formatter.js +74 -0
- package/dist/server/formatter/postgres-formatter.d.ts +14 -0
- package/dist/server/formatter/postgres-formatter.js +74 -0
- package/dist/server/formatter/sqlite-formatter.d.ts +15 -0
- package/dist/server/formatter/sqlite-formatter.js +83 -0
- package/dist/server/migrations/20240921214400-rename-charttype.d.ts +14 -0
- package/dist/server/migrations/20240921214400-rename-charttype.js +64 -0
- package/dist/server/plugin.js +1 -1
- package/dist/server/query-parser/index.d.ts +11 -0
- package/dist/server/query-parser/index.js +56 -0
- package/dist/server/query-parser/mysql-query-parser.d.ts +15 -0
- package/dist/server/query-parser/mysql-query-parser.js +43 -0
- package/dist/server/query-parser/oracle-query-parser.d.ts +18 -0
- package/dist/server/query-parser/oracle-query-parser.js +60 -0
- package/dist/server/query-parser/postgres-query-parser.d.ts +15 -0
- package/dist/server/query-parser/postgres-query-parser.js +43 -0
- package/dist/server/query-parser/query-parser.d.ts +31 -0
- package/dist/server/query-parser/query-parser.js +134 -0
- package/dist/server/query-parser/sqlite-query-parser.d.ts +15 -0
- package/dist/server/query-parser/sqlite-query-parser.js +43 -0
- package/dist/server/types.d.ts +46 -0
- package/dist/server/types.js +24 -0
- package/package.json +2 -2
- package/dist/client/chart/g2plot/configs.d.ts +0 -122
- package/dist/server/actions/formatter.d.ts +0 -12
- package/dist/server/actions/formatter.js +0 -101
- /package/dist/locale/{ja_JP.json → ja-JP.json} +0 -0
- /package/dist/locale/{ko_KR.json → ko-KR.json} +0 -0
|
@@ -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;
|
|
@@ -1,12 +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 { Sequelize } from 'sequelize';
|
|
10
|
-
export declare const dateFormatFn: (sequelize: Sequelize, dialect: string, field: string, format: string, timezone?: string) => import("sequelize/types/utils").Col | import("sequelize/types/utils").Fn;
|
|
11
|
-
export declare const formatFn: (sequelize: Sequelize, dialect: string, field: string, format: string) => string | import("sequelize/types/utils").Fn;
|
|
12
|
-
export declare const formatter: (sequelize: Sequelize, type: string, field: string, format: string, timezone?: string) => string | import("sequelize/types/utils").Col | import("sequelize/types/utils").Fn;
|
|
@@ -1,101 +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
|
-
|
|
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 formatter_exports = {};
|
|
28
|
-
__export(formatter_exports, {
|
|
29
|
-
dateFormatFn: () => dateFormatFn,
|
|
30
|
-
formatFn: () => formatFn,
|
|
31
|
-
formatter: () => formatter
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(formatter_exports);
|
|
34
|
-
const getOffsetMinutesFromTimezone = (timezone) => {
|
|
35
|
-
const sign = timezone.charAt(0);
|
|
36
|
-
timezone = timezone.slice(1);
|
|
37
|
-
const [hours, minutes] = timezone.split(":");
|
|
38
|
-
const hoursNum = Number(hours);
|
|
39
|
-
const minutesNum = Number(minutes);
|
|
40
|
-
const offset = hoursNum * 60 + minutesNum;
|
|
41
|
-
return `${sign}${offset} minutes`;
|
|
42
|
-
};
|
|
43
|
-
const dateFormatFn = (sequelize, dialect, field, format, timezone) => {
|
|
44
|
-
switch (dialect) {
|
|
45
|
-
case "sqlite":
|
|
46
|
-
format = format.replace(/YYYY/g, "%Y").replace(/MM/g, "%m").replace(/DD/g, "%d").replace(/hh/g, "%H").replace(/mm/g, "%M").replace(/ss/g, "%S");
|
|
47
|
-
if (timezone) {
|
|
48
|
-
return sequelize.fn("strftime", format, sequelize.col(field), getOffsetMinutesFromTimezone(timezone));
|
|
49
|
-
}
|
|
50
|
-
return sequelize.fn("strftime", format, sequelize.col(field));
|
|
51
|
-
case "mysql":
|
|
52
|
-
case "mariadb":
|
|
53
|
-
format = format.replace(/YYYY/g, "%Y").replace(/MM/g, "%m").replace(/DD/g, "%d").replace(/hh/g, "%H").replace(/mm/g, "%i").replace(/ss/g, "%S");
|
|
54
|
-
if (timezone) {
|
|
55
|
-
return sequelize.fn(
|
|
56
|
-
"date_format",
|
|
57
|
-
sequelize.fn("convert_tz", sequelize.col(field), process.env.DB_TIMEZONE || "+00:00", timezone),
|
|
58
|
-
format
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
return sequelize.fn("date_format", sequelize.col(field), format);
|
|
62
|
-
case "postgres":
|
|
63
|
-
format = format.replace(/hh/g, "HH24").replace(/mm/g, "MI").replace(/ss/g, "SS");
|
|
64
|
-
if (timezone) {
|
|
65
|
-
const fieldWithTZ = sequelize.literal(
|
|
66
|
-
`(${sequelize.getQueryInterface().quoteIdentifiers(field)} AT TIME ZONE CURRENT_SETTING('TIMEZONE') AT TIME ZONE '${timezone}')`
|
|
67
|
-
);
|
|
68
|
-
return sequelize.fn("to_char", fieldWithTZ, format);
|
|
69
|
-
}
|
|
70
|
-
return sequelize.fn("to_char", sequelize.col(field), format);
|
|
71
|
-
default:
|
|
72
|
-
return sequelize.col(field);
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
/* istanbul ignore next -- @preserve */
|
|
76
|
-
const formatFn = (sequelize, dialect, field, format) => {
|
|
77
|
-
switch (dialect) {
|
|
78
|
-
case "sqlite":
|
|
79
|
-
case "postgres":
|
|
80
|
-
return sequelize.fn("format", format, sequelize.col(field));
|
|
81
|
-
default:
|
|
82
|
-
return field;
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
const formatter = (sequelize, type, field, format, timezone) => {
|
|
86
|
-
const dialect = sequelize.getDialect();
|
|
87
|
-
switch (type) {
|
|
88
|
-
case "date":
|
|
89
|
-
case "datetime":
|
|
90
|
-
case "time":
|
|
91
|
-
return dateFormatFn(sequelize, dialect, field, format, timezone);
|
|
92
|
-
default:
|
|
93
|
-
return formatFn(sequelize, dialect, field, format);
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
97
|
-
0 && (module.exports = {
|
|
98
|
-
dateFormatFn,
|
|
99
|
-
formatFn,
|
|
100
|
-
formatter
|
|
101
|
-
});
|
|
File without changes
|
|
File without changes
|