@tachybase/plugin-block-charts 0.23.48 → 0.23.58
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,18 +1,18 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
"@tachybase/client": "0.23.
|
|
3
|
-
"@tachybase/schema": "0.23.
|
|
2
|
+
"@tachybase/client": "0.23.58",
|
|
3
|
+
"@tachybase/schema": "0.23.58",
|
|
4
4
|
"lodash": "4.17.21",
|
|
5
|
-
"@tachybase/cache": "0.23.
|
|
6
|
-
"@tachybase/server": "0.23.
|
|
7
|
-
"@tachybase/utils": "0.23.
|
|
5
|
+
"@tachybase/cache": "0.23.58",
|
|
6
|
+
"@tachybase/server": "0.23.58",
|
|
7
|
+
"@tachybase/utils": "0.23.58",
|
|
8
8
|
"react": "18.3.1",
|
|
9
9
|
"@ant-design/icons": "5.3.7",
|
|
10
10
|
"ahooks": "3.8.4",
|
|
11
11
|
"antd": "5.22.5",
|
|
12
12
|
"dayjs": "1.11.13",
|
|
13
|
-
"@tachybase/components": "0.23.
|
|
13
|
+
"@tachybase/components": "0.23.58",
|
|
14
14
|
"react-i18next": "15.2.0",
|
|
15
15
|
"sequelize": "6.37.5",
|
|
16
|
-
"@tachybase/actions": "0.23.
|
|
17
|
-
"@tachybase/database": "0.23.
|
|
16
|
+
"@tachybase/actions": "0.23.58",
|
|
17
|
+
"@tachybase/database": "0.23.58"
|
|
18
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"fs-extra","version":"11.2.0","description":"fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as recursive mkdir, copy, and remove.","engines":{"node":">=14.14"},"homepage":"https://github.com/jprichardson/node-fs-extra","repository":{"type":"git","url":"https://github.com/jprichardson/node-fs-extra"},"keywords":["fs","file","file system","copy","directory","extra","mkdirp","mkdir","mkdirs","recursive","json","read","write","extra","delete","remove","touch","create","text","output","move","promise"],"author":"JP Richardson <jprichardson@gmail.com>","license":"MIT","dependencies":{"graceful-fs":"^4.2.0","jsonfile":"^6.0.1","universalify":"^2.0.0"},"devDependencies":{"klaw":"^2.1.1","klaw-sync":"^3.0.2","minimist":"^1.1.1","mocha":"^10.1.0","nyc":"^15.0.0","proxyquire":"^2.0.1","read-dir-files":"^0.1.1","standard":"^17.0.0"},"main":"./lib/index.js","exports":{".":"./lib/index.js","./esm":"./lib/esm.mjs"},"files":["lib/","!lib/**/__tests__/"],"scripts":{"lint":"standard","test-find":"find ./lib/**/__tests__ -name *.test.js | xargs mocha","test":"npm run lint && npm run unit && npm run unit-esm","unit":"nyc node test.js","unit-esm":"node test.mjs"},"sideEffects":false,"_lastModified":"2025-
|
|
1
|
+
{"name":"fs-extra","version":"11.2.0","description":"fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as recursive mkdir, copy, and remove.","engines":{"node":">=14.14"},"homepage":"https://github.com/jprichardson/node-fs-extra","repository":{"type":"git","url":"https://github.com/jprichardson/node-fs-extra"},"keywords":["fs","file","file system","copy","directory","extra","mkdirp","mkdir","mkdirs","recursive","json","read","write","extra","delete","remove","touch","create","text","output","move","promise"],"author":"JP Richardson <jprichardson@gmail.com>","license":"MIT","dependencies":{"graceful-fs":"^4.2.0","jsonfile":"^6.0.1","universalify":"^2.0.0"},"devDependencies":{"klaw":"^2.1.1","klaw-sync":"^3.0.2","minimist":"^1.1.1","mocha":"^10.1.0","nyc":"^15.0.0","proxyquire":"^2.0.1","read-dir-files":"^0.1.1","standard":"^17.0.0"},"main":"./lib/index.js","exports":{".":"./lib/index.js","./esm":"./lib/esm.mjs"},"files":["lib/","!lib/**/__tests__/"],"scripts":{"lint":"standard","test-find":"find ./lib/**/__tests__ -name *.test.js | xargs mocha","test":"npm run lint && npm run unit && npm run unit-esm","unit":"nyc node test.js","unit-esm":"node test.mjs"},"sideEffects":false,"_lastModified":"2025-03-06T10:00:58.692Z"}
|
|
@@ -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-03-06T10:00:58.356Z"}
|
|
@@ -201,23 +201,36 @@ const parseFieldAndAssociations = async (ctx, next) => {
|
|
|
201
201
|
collection
|
|
202
202
|
});
|
|
203
203
|
const { where, include: filterInclude } = filterParser.toSequelizeParams();
|
|
204
|
-
|
|
205
|
-
var _a;
|
|
206
|
-
if (((_a = fields.get(item.association)) == null ? void 0 : _a.type) === "belongsToMany") {
|
|
207
|
-
item.through = { attributes: [] };
|
|
208
|
-
}
|
|
209
|
-
return item;
|
|
210
|
-
});
|
|
204
|
+
addBelongsToManyThrough(filterInclude, collectionName, ctx.db);
|
|
211
205
|
ctx.action.params.values = {
|
|
212
206
|
...ctx.action.params.values,
|
|
213
207
|
where,
|
|
214
208
|
measures: parsedMeasures,
|
|
215
209
|
dimensions: parsedDimensions,
|
|
216
210
|
orders: parsedOrders,
|
|
217
|
-
include: [...include, ...
|
|
211
|
+
include: [...include, ...filterInclude || []]
|
|
218
212
|
};
|
|
219
213
|
await next();
|
|
220
214
|
};
|
|
215
|
+
function addBelongsToManyThrough(include, collectionName, db) {
|
|
216
|
+
var _a, _b;
|
|
217
|
+
if (!include) {
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
const collection = db.getCollection(collectionName);
|
|
221
|
+
if (!collection) {
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
const fields = collection.fields;
|
|
225
|
+
for (const item of include) {
|
|
226
|
+
if (((_a = fields.get(item.association)) == null ? void 0 : _a.type) === "belongsToMany") {
|
|
227
|
+
item.through = { attributes: [] };
|
|
228
|
+
}
|
|
229
|
+
if (item.include) {
|
|
230
|
+
addBelongsToManyThrough(item.include, (_b = fields.get(item.association)) == null ? void 0 : _b.target, db);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
221
234
|
const parseVariables = async (ctx, next) => {
|
|
222
235
|
const { filter } = ctx.action.params.values;
|
|
223
236
|
if (!filter) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tachybase/plugin-block-charts",
|
|
3
3
|
"displayName": "Block: charts",
|
|
4
|
-
"version": "0.23.
|
|
4
|
+
"version": "0.23.58",
|
|
5
5
|
"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.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"Blocks"
|
|
@@ -23,17 +23,17 @@
|
|
|
23
23
|
"react-error-boundary": "^4.1.2",
|
|
24
24
|
"react-i18next": "^15.2.0",
|
|
25
25
|
"sequelize": "^6.37.5",
|
|
26
|
-
"@tachybase/components": "0.23.
|
|
27
|
-
"@tachybase/schema": "0.23.
|
|
26
|
+
"@tachybase/components": "0.23.58",
|
|
27
|
+
"@tachybase/schema": "0.23.58"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@tachybase/actions": "0.23.
|
|
31
|
-
"@tachybase/
|
|
32
|
-
"@tachybase/
|
|
33
|
-
"@tachybase/
|
|
34
|
-
"@tachybase/
|
|
35
|
-
"@tachybase/
|
|
36
|
-
"@tachybase/
|
|
30
|
+
"@tachybase/actions": "0.23.58",
|
|
31
|
+
"@tachybase/client": "0.23.58",
|
|
32
|
+
"@tachybase/server": "0.23.58",
|
|
33
|
+
"@tachybase/test": "0.23.58",
|
|
34
|
+
"@tachybase/utils": "0.23.58",
|
|
35
|
+
"@tachybase/database": "0.23.58",
|
|
36
|
+
"@tachybase/cache": "0.23.58"
|
|
37
37
|
},
|
|
38
38
|
"description.zh-CN": "提供数据可视化功能,包含图表卡片和图表筛选卡片,支持折线图、面积图、柱状图等十几种图表,你也可以扩展更多图表类型。",
|
|
39
39
|
"displayName.zh-CN": "卡片:图表",
|