@nocobase/plugin-data-visualization 1.7.0-beta.8 → 1.8.0-beta.1
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/8cfdd056f140e309.js +47 -0
- package/dist/client/hooks/query.d.ts +1 -1
- package/dist/client/hooks/useVariableOptions.d.ts +44 -0
- package/dist/client/index.d.ts +7 -0
- package/dist/client/index.js +1 -1
- package/dist/client/utils.d.ts +0 -3
- package/dist/externalVersion.js +10 -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 +11 -6
- package/package.json +2 -2
- package/dist/client/174088c8d5f7574a.js +0 -47
package/dist/client/utils.d.ts
CHANGED
|
@@ -148,9 +148,6 @@ export declare const getSelectedFields: (fields: FieldOption[], query: QueryProp
|
|
|
148
148
|
target?: string;
|
|
149
149
|
targetFields?: FieldOption[];
|
|
150
150
|
}[];
|
|
151
|
-
export declare const processData: (selectedFields: (FieldOption & {
|
|
152
|
-
query?: any;
|
|
153
|
-
})[], data: any[], scope: any) => {}[];
|
|
154
151
|
export declare const removeUnparsableFilter: (filter: any) => any;
|
|
155
152
|
export declare const getValuesByPath: (values: any, path: string) => any;
|
|
156
153
|
export declare const getFormulaComponent: (type: string) => string;
|
package/dist/externalVersion.js
CHANGED
|
@@ -8,24 +8,24 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "1.
|
|
12
|
-
"dayjs": "1.11.10",
|
|
11
|
+
"@nocobase/client": "1.8.0-beta.1",
|
|
13
12
|
"@formily/react": "2.3.0",
|
|
13
|
+
"dayjs": "1.11.13",
|
|
14
14
|
"@formily/shared": "2.3.2",
|
|
15
15
|
"lodash": "4.17.21",
|
|
16
|
-
"@nocobase/cache": "1.
|
|
17
|
-
"@nocobase/server": "1.
|
|
18
|
-
"@nocobase/test": "1.
|
|
16
|
+
"@nocobase/cache": "1.8.0-beta.1",
|
|
17
|
+
"@nocobase/server": "1.8.0-beta.1",
|
|
18
|
+
"@nocobase/test": "1.8.0-beta.1",
|
|
19
|
+
"@nocobase/utils": "1.8.0-beta.1",
|
|
19
20
|
"react": "18.2.0",
|
|
20
21
|
"@emotion/css": "11.13.0",
|
|
21
22
|
"@ant-design/icons": "5.6.1",
|
|
22
23
|
"ahooks": "3.7.8",
|
|
23
|
-
"antd": "5.
|
|
24
|
-
"@formily/antd-v5": "1.
|
|
24
|
+
"antd": "5.24.2",
|
|
25
|
+
"@formily/antd-v5": "1.2.3",
|
|
25
26
|
"@formily/core": "2.3.0",
|
|
26
|
-
"@nocobase/utils": "1.7.0-beta.8",
|
|
27
27
|
"react-i18next": "11.18.6",
|
|
28
|
-
"@nocobase/actions": "1.
|
|
29
|
-
"@nocobase/database": "1.
|
|
28
|
+
"@nocobase/actions": "1.8.0-beta.1",
|
|
29
|
+
"@nocobase/database": "1.8.0-beta.1",
|
|
30
30
|
"sequelize": "6.35.2"
|
|
31
31
|
};
|
|
@@ -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-
|
|
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-06-03T16:05:15.259Z"}
|
|
@@ -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-
|
|
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-06-03T16:05:15.880Z"}
|
|
@@ -170,11 +170,16 @@ const parseFieldAndAssociations = async (ctx, next) => {
|
|
|
170
170
|
const stack = [...filterInclude];
|
|
171
171
|
while (stack.length) {
|
|
172
172
|
const item = stack.pop();
|
|
173
|
-
|
|
173
|
+
const parentCollection = db.getCollection(item.parentCollection || collectionName);
|
|
174
|
+
const field = parentCollection.fields.get(item.association);
|
|
175
|
+
if ((field == null ? void 0 : field.type) === "belongsToMany") {
|
|
174
176
|
item.through = { attributes: [] };
|
|
175
177
|
}
|
|
176
|
-
if (item.include) {
|
|
177
|
-
|
|
178
|
+
if ((field == null ? void 0 : field.target) && ((_a = item.include) == null ? void 0 : _a.length)) {
|
|
179
|
+
for (const child of item.include) {
|
|
180
|
+
child.parentCollection = field.target;
|
|
181
|
+
stack.push(child);
|
|
182
|
+
}
|
|
178
183
|
}
|
|
179
184
|
}
|
|
180
185
|
}
|
|
@@ -215,10 +220,10 @@ const cacheMiddleware = async (ctx, next) => {
|
|
|
215
220
|
const checkPermission = (ctx, next) => {
|
|
216
221
|
var _a;
|
|
217
222
|
const { collection, dataSource } = ctx.action.params.values;
|
|
218
|
-
const
|
|
223
|
+
const roleNames = ctx.state.currentRoles || ["anonymous"];
|
|
219
224
|
const acl = ((_a = ctx.app.dataSourceManager.get(dataSource)) == null ? void 0 : _a.acl) || ctx.app.acl;
|
|
220
|
-
const can = acl.can({
|
|
221
|
-
if (!can &&
|
|
225
|
+
const can = acl.can({ roles: roleNames, resource: collection, action: "list" });
|
|
226
|
+
if (!can && !roleNames.includes("root")) {
|
|
222
227
|
ctx.throw(403, "No permissions");
|
|
223
228
|
}
|
|
224
229
|
return next();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-data-visualization",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0-beta.1",
|
|
4
4
|
"displayName": "Data visualization",
|
|
5
5
|
"displayName.zh-CN": "数据可视化",
|
|
6
6
|
"description": "Provides data visualization feature, including chart block and chart filter block, support line charts, area charts, bar charts and more than a dozen kinds of charts, you can also extend more chart types.",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@nocobase/test": "1.x",
|
|
35
35
|
"@nocobase/utils": "1.x"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "103935669123174f2942247202e3d9ff15f0d4ed",
|
|
38
38
|
"keywords": [
|
|
39
39
|
"Blocks"
|
|
40
40
|
]
|