@nocobase/plugin-data-visualization 0.16.0-alpha.3 → 0.16.0-alpha.5
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
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
"@nocobase/client": "0.16.0-alpha.
|
|
2
|
+
"@nocobase/client": "0.16.0-alpha.5",
|
|
3
3
|
"react": "18.2.0",
|
|
4
4
|
"@formily/react": "2.2.27",
|
|
5
5
|
"@formily/shared": "2.2.27",
|
|
6
|
-
"@nocobase/cache": "0.16.0-alpha.
|
|
7
|
-
"@nocobase/server": "0.16.0-alpha.
|
|
6
|
+
"@nocobase/cache": "0.16.0-alpha.5",
|
|
7
|
+
"@nocobase/server": "0.16.0-alpha.5",
|
|
8
8
|
"@ant-design/icons": "5.1.4",
|
|
9
9
|
"dayjs": "1.11.9",
|
|
10
10
|
"@formily/antd-v5": "1.1.7",
|
|
@@ -14,7 +14,7 @@ module.exports = {
|
|
|
14
14
|
"@emotion/css": "11.11.2",
|
|
15
15
|
"react-i18next": "11.18.6",
|
|
16
16
|
"ahooks": "3.7.8",
|
|
17
|
-
"@nocobase/actions": "0.16.0-alpha.
|
|
18
|
-
"@nocobase/database": "0.16.0-alpha.
|
|
19
|
-
"@nocobase/utils": "0.16.0-alpha.
|
|
17
|
+
"@nocobase/actions": "0.16.0-alpha.5",
|
|
18
|
+
"@nocobase/database": "0.16.0-alpha.5",
|
|
19
|
+
"@nocobase/utils": "0.16.0-alpha.5"
|
|
20
20
|
};
|
|
@@ -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":"2023-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":"2023-11-30T04:53:29.371Z"}
|
|
@@ -145,10 +145,9 @@ const parseFieldAndAssociations = async (ctx, next) => {
|
|
|
145
145
|
const { collection: collectionName, measures, dimensions, orders, filter } = ctx.action.params.values;
|
|
146
146
|
const collection = ctx.db.getCollection(collectionName);
|
|
147
147
|
const fields = collection.fields;
|
|
148
|
-
const underscored = collection.options.underscored;
|
|
149
148
|
const models = {};
|
|
150
149
|
const parseField = (selected) => {
|
|
151
|
-
var _a, _b, _c;
|
|
150
|
+
var _a, _b, _c, _d;
|
|
152
151
|
let target;
|
|
153
152
|
let name;
|
|
154
153
|
if (!Array.isArray(selected.field)) {
|
|
@@ -158,16 +157,17 @@ const parseFieldAndAssociations = async (ctx, next) => {
|
|
|
158
157
|
} else if (selected.field.length > 1) {
|
|
159
158
|
[target, name] = selected.field;
|
|
160
159
|
}
|
|
161
|
-
|
|
162
|
-
let
|
|
160
|
+
const rawAttributes = collection.model.getAttributes();
|
|
161
|
+
let field = ((_a = rawAttributes[name]) == null ? void 0 : _a.field) || name;
|
|
162
|
+
let fieldType = (_b = fields.get(name)) == null ? void 0 : _b.type;
|
|
163
163
|
if (target) {
|
|
164
164
|
const targetField = fields.get(target);
|
|
165
165
|
const targetCollection = ctx.db.getCollection(targetField.target);
|
|
166
166
|
const targetFields = targetCollection.fields;
|
|
167
|
-
fieldType = (
|
|
167
|
+
fieldType = (_c = targetFields.get(name)) == null ? void 0 : _c.type;
|
|
168
168
|
field = `${target}.${field}`;
|
|
169
169
|
name = `${target}.${name}`;
|
|
170
|
-
const targetType = (
|
|
170
|
+
const targetType = (_d = fields.get(target)) == null ? void 0 : _d.type;
|
|
171
171
|
if (!models[target]) {
|
|
172
172
|
models[target] = { type: targetType };
|
|
173
173
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-data-visualization",
|
|
3
|
-
"version": "0.16.0-alpha.
|
|
3
|
+
"version": "0.16.0-alpha.5",
|
|
4
4
|
"displayName": "Data Visualization",
|
|
5
5
|
"displayName.zh-CN": "数据可视化",
|
|
6
6
|
"description": "Provides business intelligence and data visualization features",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"@nocobase/test": "0.x",
|
|
34
34
|
"@nocobase/utils": "0.x"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "3badd2569e4658023897fa381ac4dd30e64d5bce"
|
|
37
37
|
}
|