@nocobase/plugin-data-visualization 2.0.28 → 2.0.30
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/{1b4f3d899fb8232f.js → 9b10e5e5f5e8c0d5.js} +3 -3
- package/dist/client/flow/models/ChartBlockModel.d.ts +1 -0
- package/dist/client/flow/models/ChartOptionsBuilder.d.ts +4 -0
- package/dist/client/flow/models/QueryBuilder.d.ts +1 -4
- package/dist/client/flow/resources/ChartResource.d.ts +1 -0
- package/dist/client/index.js +1 -1
- package/dist/externalVersion.js +11 -10
- package/dist/node_modules/koa-compose/package.json +1 -1
- package/dist/node_modules/moment-timezone/package.json +1 -1
- package/dist/server/actions/query.js +9 -0
- package/dist/server/types.d.ts +2 -0
- package/package.json +3 -2
- package/dist/client/flow/components/AntdFilterSelector.d.ts +0 -35
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.30",
|
|
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.30",
|
|
14
|
+
"@nocobase/flow-engine": "2.0.30",
|
|
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.30",
|
|
20
|
+
"@nocobase/server": "2.0.30",
|
|
21
|
+
"@nocobase/test": "2.0.30",
|
|
22
|
+
"@nocobase/utils": "2.0.30",
|
|
23
23
|
"react": "18.2.0",
|
|
24
24
|
"@emotion/css": "11.13.0",
|
|
25
25
|
"@ant-design/icons": "5.6.1",
|
|
@@ -27,9 +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.
|
|
30
|
+
"@nocobase/actions": "2.0.30",
|
|
31
|
+
"@nocobase/database": "2.0.30",
|
|
32
|
+
"@nocobase/acl": "2.0.30",
|
|
33
|
+
"@nocobase/plugin-flow-engine": "2.0.30",
|
|
33
34
|
"sequelize": "6.35.2",
|
|
34
35
|
"@formily/reactive": "2.3.7"
|
|
35
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-03-
|
|
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-03-30T15:14:08.998Z"}
|
|
@@ -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-03-
|
|
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-03-30T15:14:09.576Z"}
|
|
@@ -51,6 +51,7 @@ var import_server = require("@nocobase/server");
|
|
|
51
51
|
var import_query_parser = require("../query-parser");
|
|
52
52
|
var import_utils = require("@nocobase/utils");
|
|
53
53
|
var import_acl = require("@nocobase/acl");
|
|
54
|
+
var import_plugin_flow_engine = require("@nocobase/plugin-flow-engine");
|
|
54
55
|
const getDB = (ctx, dataSource) => {
|
|
55
56
|
const ds = ctx.app.dataSourceManager.dataSources.get(dataSource);
|
|
56
57
|
return ds == null ? void 0 : ds.collectionManager.db;
|
|
@@ -227,6 +228,14 @@ const parseFieldAndAssociations = async (ctx, next) => {
|
|
|
227
228
|
await next();
|
|
228
229
|
};
|
|
229
230
|
const parseVariables = async (ctx, next) => {
|
|
231
|
+
const { mode, contextParams, ...values } = ctx.action.params.values;
|
|
232
|
+
if (mode !== "sql") {
|
|
233
|
+
const resolvedValues = await (0, import_plugin_flow_engine.resolveVariablesTemplate)(ctx, values, contextParams || {});
|
|
234
|
+
ctx.action.params.values = {
|
|
235
|
+
...ctx.action.params.values,
|
|
236
|
+
...resolvedValues
|
|
237
|
+
};
|
|
238
|
+
}
|
|
230
239
|
const { filter } = ctx.action.params.values;
|
|
231
240
|
ctx.action.params.filter = filter;
|
|
232
241
|
await import_server.middlewares.parseVariables(ctx, async () => {
|
package/dist/server/types.d.ts
CHANGED
|
@@ -28,12 +28,14 @@ export type OrderProps = {
|
|
|
28
28
|
};
|
|
29
29
|
export type QueryParams = Partial<{
|
|
30
30
|
uid: string;
|
|
31
|
+
mode: 'builder' | 'sql';
|
|
31
32
|
dataSource: string;
|
|
32
33
|
collection: string;
|
|
33
34
|
measures: MeasureProps[];
|
|
34
35
|
dimensions: DimensionProps[];
|
|
35
36
|
orders: OrderProps[];
|
|
36
37
|
filter: any;
|
|
38
|
+
contextParams: Record<string, unknown>;
|
|
37
39
|
limit: number;
|
|
38
40
|
offset: number;
|
|
39
41
|
sql: {
|
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.30",
|
|
4
4
|
"displayName": "Data visualization",
|
|
5
5
|
"displayName.ru-RU": "Визуализация данных",
|
|
6
6
|
"displayName.zh-CN": "数据可视化",
|
|
@@ -42,11 +42,12 @@
|
|
|
42
42
|
"@nocobase/database": "2.x",
|
|
43
43
|
"@nocobase/plugin-ai": "2.x",
|
|
44
44
|
"@nocobase/plugin-data-source-main": "2.x",
|
|
45
|
+
"@nocobase/plugin-flow-engine": "2.x",
|
|
45
46
|
"@nocobase/server": "2.x",
|
|
46
47
|
"@nocobase/test": "2.x",
|
|
47
48
|
"@nocobase/utils": "2.x"
|
|
48
49
|
},
|
|
49
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "6ac70f8dda4e7970242435bc1d1a5b70954e643f",
|
|
50
51
|
"keywords": [
|
|
51
52
|
"Blocks"
|
|
52
53
|
],
|
|
@@ -1,35 +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 React from 'react';
|
|
10
|
-
import type { CSSProperties } from 'react';
|
|
11
|
-
import type { VariableFilterItemValue } from '@nocobase/client';
|
|
12
|
-
import type { FlowModel } from '@nocobase/flow-engine';
|
|
13
|
-
type LogicOp = '$and' | '$or';
|
|
14
|
-
export type FilterCondition = VariableFilterItemValue;
|
|
15
|
-
export type FilterGroupValue = {
|
|
16
|
-
logic: LogicOp;
|
|
17
|
-
items: Array<FilterCondition | FilterGroupValue>;
|
|
18
|
-
};
|
|
19
|
-
export interface AntdFilterSelectorProps {
|
|
20
|
-
value?: FilterGroupValue;
|
|
21
|
-
onChange?: (next: FilterGroupValue) => void;
|
|
22
|
-
model: FlowModel;
|
|
23
|
-
rightAsVariable?: boolean;
|
|
24
|
-
collectionPath?: string[];
|
|
25
|
-
className?: string;
|
|
26
|
-
style?: CSSProperties;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* AntdFilterSelector
|
|
30
|
-
* - antd Form.Item 子组件
|
|
31
|
-
* - 内部用响应式对象驱动 FilterGroup/VariableFilterItem
|
|
32
|
-
* - reaction 桥接所有深层变更为 antd 的 onChange
|
|
33
|
-
*/
|
|
34
|
-
export declare const AntdFilterSelector: React.FC<AntdFilterSelectorProps>;
|
|
35
|
-
export default AntdFilterSelector;
|