@nocobase/plugin-data-visualization 2.0.0-alpha.46 → 2.0.0-alpha.48
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/{52b6e6ba5111171b.js → b9d769d28d75f255.js} +3 -3
- package/dist/client/flow/components/AntdFilterSelector.d.ts +1 -0
- package/dist/client/index.js +1 -1
- package/dist/externalVersion.js +10 -9
- 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 +20 -2
- package/package.json +2 -2
package/dist/externalVersion.js
CHANGED
|
@@ -8,18 +8,18 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "2.0.0-alpha.
|
|
11
|
+
"@nocobase/client": "2.0.0-alpha.48",
|
|
12
12
|
"@formily/react": "2.3.7",
|
|
13
|
-
"@nocobase/plugin-ai": "2.0.0-alpha.
|
|
14
|
-
"@nocobase/flow-engine": "2.0.0-alpha.
|
|
13
|
+
"@nocobase/plugin-ai": "2.0.0-alpha.48",
|
|
14
|
+
"@nocobase/flow-engine": "2.0.0-alpha.48",
|
|
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.0-alpha.
|
|
20
|
-
"@nocobase/server": "2.0.0-alpha.
|
|
21
|
-
"@nocobase/test": "2.0.0-alpha.
|
|
22
|
-
"@nocobase/utils": "2.0.0-alpha.
|
|
19
|
+
"@nocobase/cache": "2.0.0-alpha.48",
|
|
20
|
+
"@nocobase/server": "2.0.0-alpha.48",
|
|
21
|
+
"@nocobase/test": "2.0.0-alpha.48",
|
|
22
|
+
"@nocobase/utils": "2.0.0-alpha.48",
|
|
23
23
|
"react": "18.2.0",
|
|
24
24
|
"@emotion/css": "11.13.0",
|
|
25
25
|
"@ant-design/icons": "5.6.1",
|
|
@@ -27,8 +27,9 @@ 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.0-alpha.
|
|
31
|
-
"@nocobase/database": "2.0.0-alpha.
|
|
30
|
+
"@nocobase/actions": "2.0.0-alpha.48",
|
|
31
|
+
"@nocobase/database": "2.0.0-alpha.48",
|
|
32
|
+
"@nocobase/acl": "2.0.0-alpha.48",
|
|
32
33
|
"sequelize": "6.35.2",
|
|
33
34
|
"@formily/reactive": "2.3.7"
|
|
34
35
|
};
|
|
@@ -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":"2025-11-
|
|
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":"2025-11-28T01:37:16.375Z"}
|
|
@@ -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":"2025-11-
|
|
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":"2025-11-28T01:37:16.928Z"}
|
|
@@ -49,6 +49,8 @@ var import_database = require("@nocobase/database");
|
|
|
49
49
|
var import_koa_compose = __toESM(require("koa-compose"));
|
|
50
50
|
var import_server = require("@nocobase/server");
|
|
51
51
|
var import_query_parser = require("../query-parser");
|
|
52
|
+
var import_utils = require("@nocobase/utils");
|
|
53
|
+
var import_acl = require("@nocobase/acl");
|
|
52
54
|
const getDB = (ctx, dataSource) => {
|
|
53
55
|
const ds = ctx.app.dataSourceManager.dataSources.get(dataSource);
|
|
54
56
|
return ds == null ? void 0 : ds.collectionManager.db;
|
|
@@ -217,8 +219,8 @@ const cacheMiddleware = async (ctx, next) => {
|
|
|
217
219
|
await cache.set(uid, ctx.body, (cacheConfig == null ? void 0 : cacheConfig.ttl) * 1e3);
|
|
218
220
|
}
|
|
219
221
|
};
|
|
220
|
-
const checkPermission = (ctx, next) => {
|
|
221
|
-
var _a;
|
|
222
|
+
const checkPermission = async (ctx, next) => {
|
|
223
|
+
var _a, _b;
|
|
222
224
|
const { collection, dataSource } = ctx.action.params.values;
|
|
223
225
|
const roleNames = ctx.state.currentRoles || ["anonymous"];
|
|
224
226
|
const acl = ((_a = ctx.app.dataSourceManager.get(dataSource)) == null ? void 0 : _a.acl) || ctx.app.acl;
|
|
@@ -226,6 +228,22 @@ const checkPermission = (ctx, next) => {
|
|
|
226
228
|
if (!can && !roleNames.includes("root")) {
|
|
227
229
|
ctx.throw(403, "No permissions");
|
|
228
230
|
}
|
|
231
|
+
if ((_b = can == null ? void 0 : can.params) == null ? void 0 : _b.filter) {
|
|
232
|
+
try {
|
|
233
|
+
acl.filterParams(ctx, collection, can.params);
|
|
234
|
+
} catch (e) {
|
|
235
|
+
if (e instanceof import_acl.NoPermissionError) {
|
|
236
|
+
ctx.throw(403, "No permissions");
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
const filter = ctx.action.params.values.filter || {};
|
|
240
|
+
ctx.action.params.values = {
|
|
241
|
+
...ctx.action.params.values,
|
|
242
|
+
filter: (0, import_utils.assign)(filter, can == null ? void 0 : can.params.filter, {
|
|
243
|
+
filter: "andMerge"
|
|
244
|
+
})
|
|
245
|
+
};
|
|
246
|
+
}
|
|
229
247
|
return next();
|
|
230
248
|
};
|
|
231
249
|
const query = async (ctx, next) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-data-visualization",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.48",
|
|
4
4
|
"displayName": "Data visualization",
|
|
5
5
|
"displayName.ru-RU": "Визуализация данных",
|
|
6
6
|
"displayName.zh-CN": "数据可视化",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@nocobase/test": "2.x",
|
|
46
46
|
"@nocobase/utils": "2.x"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "456be3a6e92f984fe283590c80d3ea9423695ba6",
|
|
49
49
|
"keywords": [
|
|
50
50
|
"Blocks"
|
|
51
51
|
]
|