@nocobase/plugin-data-source-manager
Advanced tools
Comparing version 0.20.0-alpha.8 to 0.20.0-alpha.9
module.exports = { | ||
"@nocobase/client": "0.20.0-alpha.8", | ||
"@nocobase/client": "0.20.0-alpha.9", | ||
"react": "18.2.0", | ||
"@nocobase/server": "0.20.0-alpha.8", | ||
"@nocobase/server": "0.20.0-alpha.9", | ||
"lodash": "4.17.21", | ||
@@ -13,6 +13,6 @@ "@ant-design/icons": "5.2.6", | ||
"@emotion/css": "11.11.2", | ||
"@nocobase/database": "0.20.0-alpha.8", | ||
"@nocobase/utils": "0.20.0-alpha.8", | ||
"@nocobase/plugin-acl": "0.20.0-alpha.8", | ||
"@nocobase/acl": "0.20.0-alpha.8", | ||
"@nocobase/database": "0.20.0-alpha.9", | ||
"@nocobase/utils": "0.20.0-alpha.9", | ||
"@nocobase/plugin-acl": "0.20.0-alpha.9", | ||
"@nocobase/acl": "0.20.0-alpha.9", | ||
"sequelize": "6.35.2", | ||
@@ -19,0 +19,0 @@ "@formily/antd-v5": "1.1.9", |
@@ -49,3 +49,3 @@ var __create = Object.create; | ||
const collectionRepository = new import_full_data_repository.FullDataRepository(dataSource.collectionManager.getCollections()); | ||
const [collections, count] = await collectionRepository.findAndCount(); | ||
const [collections] = await collectionRepository.findAndCount(); | ||
const filterItem = import_lodash.default.get(filter, "$and"); | ||
@@ -64,8 +64,9 @@ const filterByTitle = filterItem == null ? void 0 : filterItem.find((item) => item.title); | ||
const roleResourceActionResourceNames = roleResources.filter((roleResources2) => roleResources2.get("usingActionsConfig")).map((roleResources2) => roleResources2.get("name")); | ||
const filtedCollections = collections.filter((collection) => { | ||
var _a2; | ||
return (!filterTitle || ((_a2 = import_lodash.default.get(collection, "options.title")) == null ? void 0 : _a2.toLowerCase().includes(filterTitle))) && (!filterName || collection.options.name.toLowerCase().includes(filterName)); | ||
}); | ||
const items = import_lodash.default.sortBy( | ||
collections.filter((collection) => { | ||
filtedCollections.map((collection, i) => { | ||
var _a2; | ||
return (!filterTitle || ((_a2 = import_lodash.default.get(collection, "options.title")) == null ? void 0 : _a2.toLowerCase().includes(filterTitle))) && (!filterName || collection.options.name.toLowerCase().includes(filterName)); | ||
}).map((collection, i) => { | ||
var _a2; | ||
const collectionName = collection.options.name; | ||
@@ -90,7 +91,7 @@ const exists = roleResourcesNames.includes(collectionName); | ||
ctx.body = { | ||
count, | ||
count: filtedCollections.length, | ||
rows: items, | ||
page: Number(page), | ||
pageSize: Number(pageSize), | ||
totalPage: totalPage(count, pageSize) | ||
totalPage: totalPage(filtedCollections.length, pageSize) | ||
}; | ||
@@ -97,0 +98,0 @@ await next(); |
{ | ||
"name": "@nocobase/plugin-data-source-manager", | ||
"version": "0.20.0-alpha.8", | ||
"version": "0.20.0-alpha.9", | ||
"main": "dist/server/index.js", | ||
@@ -19,3 +19,3 @@ "displayName": "Data source manager", | ||
], | ||
"gitHead": "39ebc1cefe5a826aecf0b14d73530dfa5f9c2b1c" | ||
"gitHead": "5473d9039cfdb649a8c8c625edefc9a3ac464be5" | ||
} |
Sorry, the diff of this file is too big to display
249846
3982