@nocobase/plugin-data-visualization 3.0.0-alpha.7 → 3.0.0-alpha.9
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/externalVersion.js
CHANGED
|
@@ -8,19 +8,19 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "3.0.0-alpha.
|
|
11
|
+
"@nocobase/client": "3.0.0-alpha.9",
|
|
12
12
|
"@formily/react": "2.3.7",
|
|
13
|
-
"@nocobase/plugin-ai": "3.0.0-alpha.
|
|
14
|
-
"@nocobase/flow-engine": "3.0.0-alpha.
|
|
13
|
+
"@nocobase/plugin-ai": "3.0.0-alpha.9",
|
|
14
|
+
"@nocobase/flow-engine": "3.0.0-alpha.9",
|
|
15
15
|
"react-i18next": "11.18.6",
|
|
16
16
|
"dayjs": "1.11.13",
|
|
17
17
|
"@formily/shared": "2.3.7",
|
|
18
18
|
"lodash": "4.18.1",
|
|
19
|
-
"@nocobase/client-v2": "3.0.0-alpha.
|
|
20
|
-
"@nocobase/cache": "3.0.0-alpha.
|
|
21
|
-
"@nocobase/server": "3.0.0-alpha.
|
|
22
|
-
"@nocobase/test": "3.0.0-alpha.
|
|
23
|
-
"@nocobase/utils": "3.0.0-alpha.
|
|
19
|
+
"@nocobase/client-v2": "3.0.0-alpha.9",
|
|
20
|
+
"@nocobase/cache": "3.0.0-alpha.9",
|
|
21
|
+
"@nocobase/server": "3.0.0-alpha.9",
|
|
22
|
+
"@nocobase/test": "3.0.0-alpha.9",
|
|
23
|
+
"@nocobase/utils": "3.0.0-alpha.9",
|
|
24
24
|
"react": "18.2.0",
|
|
25
25
|
"@emotion/css": "11.13.0",
|
|
26
26
|
"@ant-design/icons": "5.6.1",
|
|
@@ -28,9 +28,9 @@ module.exports = {
|
|
|
28
28
|
"antd": "5.24.2",
|
|
29
29
|
"@formily/antd-v5": "1.2.3",
|
|
30
30
|
"@formily/core": "2.3.7",
|
|
31
|
-
"@nocobase/actions": "3.0.0-alpha.
|
|
32
|
-
"@nocobase/acl": "3.0.0-alpha.
|
|
33
|
-
"@nocobase/plugin-acl": "3.0.0-alpha.
|
|
34
|
-
"@nocobase/plugin-flow-engine": "3.0.0-alpha.
|
|
35
|
-
"@nocobase/database": "3.0.0-alpha.
|
|
31
|
+
"@nocobase/actions": "3.0.0-alpha.9",
|
|
32
|
+
"@nocobase/acl": "3.0.0-alpha.9",
|
|
33
|
+
"@nocobase/plugin-acl": "3.0.0-alpha.9",
|
|
34
|
+
"@nocobase/plugin-flow-engine": "3.0.0-alpha.9",
|
|
35
|
+
"@nocobase/database": "3.0.0-alpha.9"
|
|
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-08-
|
|
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-08-11T14:33:56.280Z"}
|
|
@@ -98,22 +98,35 @@ const queryData = async (ctx, next) => {
|
|
|
98
98
|
await next();
|
|
99
99
|
};
|
|
100
100
|
const parseVariables = async (ctx, next) => {
|
|
101
|
-
const { mode, contextParams, rd, ...values } = ctx.action.params.values;
|
|
101
|
+
const { mode, contextParams, rd, variableResolution, ...values } = ctx.action.params.values;
|
|
102
102
|
if (mode !== "sql") {
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
103
|
+
const flowEngine = ctx.app.pm.get("flow-engine");
|
|
104
|
+
const isLegacyLane = mode === "builder" && variableResolution === "legacy-schema" && typeof rd === "undefined";
|
|
105
|
+
if (isLegacyLane) {
|
|
106
|
+
const hasEmptyContextParams = typeof contextParams === "undefined" || contextParams !== null && typeof contextParams === "object" && !Array.isArray(contextParams) && Object.keys(contextParams).length === 0;
|
|
107
|
+
if (!hasEmptyContextParams || !flowEngine.isLegacyVariableTemplateSafe(values)) {
|
|
108
|
+
ctx.body = [];
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
ctx.action.params.values = { mode, ...values };
|
|
112
|
+
} else {
|
|
113
|
+
const resolvedValues = await flowEngine.resolveFlowModelVariablesTemplate(ctx, {
|
|
114
|
+
contextParams,
|
|
115
|
+
rd,
|
|
116
|
+
template: values
|
|
117
|
+
});
|
|
118
|
+
if (!resolvedValues) {
|
|
119
|
+
ctx.body = [];
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
ctx.action.params.values = {
|
|
123
|
+
mode,
|
|
124
|
+
...values,
|
|
125
|
+
...resolvedValues
|
|
126
|
+
};
|
|
111
127
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
...values,
|
|
115
|
-
...resolvedValues
|
|
116
|
-
};
|
|
128
|
+
} else {
|
|
129
|
+
ctx.action.params.values = { mode, ...values };
|
|
117
130
|
}
|
|
118
131
|
const { filter } = ctx.action.params.values;
|
|
119
132
|
ctx.action.params.filter = filter;
|
package/dist/server/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-data-visualization",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.9",
|
|
4
4
|
"displayName": "Data visualization",
|
|
5
5
|
"displayName.ru-RU": "Визуализация данных",
|
|
6
6
|
"displayName.zh-CN": "数据可视化",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@nocobase/test": "2.x",
|
|
50
50
|
"@nocobase/utils": "2.x"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "82aaad40c5be1120839a11301a48e7fe690f48c3",
|
|
53
53
|
"keywords": [
|
|
54
54
|
"Blocks"
|
|
55
55
|
],
|