@steedos/standard-ui 2.7.0 → 2.7.1-beta.10

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.
@@ -150,6 +150,9 @@ tab_items:
150
150
  # admin_object_webhooks:
151
151
  # group: 高级设置
152
152
  # index: 41
153
+ admin_object_webhooks:
154
+ group: development
155
+ index: 41
153
156
  admin_api_keys:
154
157
  group: development
155
158
  index: 42
@@ -2,13 +2,14 @@
2
2
  * @Author: baozhoutao@steedos.com
3
3
  * @Date: 2022-08-05 14:17:44
4
4
  * @LastEditors: 孙浩林 sunhaolin@steedos.com
5
- * @LastEditTime: 2024-01-29 13:20:07
5
+ * @LastEditTime: 2024-05-11 14:03:14
6
6
  * @Description:
7
7
  */
8
8
  const objectql = require('@steedos/objectql');
9
9
  const register = require('@steedos/metadata-registrar');
10
10
  const auth = require('@steedos/auth');
11
11
  const _ = require('underscore');
12
+ const clone = require('clone');
12
13
  async function getAll(){
13
14
  const schema = objectql.getSteedosSchema();
14
15
  const configs = await register.registerTab.getAll(schema.broker)
@@ -49,34 +50,15 @@ module.exports = {
49
50
  let dataList = await getAll();
50
51
  const values = [];
51
52
  if(dataList){
53
+ const cloneValues = clone(this.data.values, false);
52
54
  dataList.forEach((doc)=>{
53
55
  if(!_.find(this.data.values, (value)=>{
54
56
  return value._id === doc._id
55
57
  })){
56
- this.data.values.push(doc);
58
+ cloneValues.push(doc);
57
59
  }
58
60
  })
59
- const records = objectql.getSteedosSchema().metadataDriver.find(this.data.values, this.query, spaceId);
60
- if(records.length > 0){
61
- this.data.values = records;
62
- }else{
63
- this.data.values.length = 0;
64
- }
65
- }
66
- },
67
- afterAggregate: async function(){
68
- const { spaceId } = this;
69
- let dataList = await getAll();
70
- const values = [];
71
- if(dataList){
72
- dataList.forEach((doc)=>{
73
- if(!_.find(this.data.values, (value)=>{
74
- return value._id === doc._id
75
- })){
76
- this.data.values.push(doc);
77
- };
78
- })
79
- const records = objectql.getSteedosSchema().metadataDriver.find(this.data.values, this.query, spaceId);
61
+ const records = objectql.getSteedosSchema().metadataDriver.find(cloneValues, this.query, spaceId);
80
62
  if(records.length > 0){
81
63
  this.data.values = records;
82
64
  }else{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/standard-ui",
3
- "version": "2.7.0",
3
+ "version": "2.7.1-beta.10",
4
4
  "main": "package.service.js",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -12,5 +12,8 @@
12
12
  "description": "steedos package",
13
13
  "repository": {},
14
14
  "license": "MIT",
15
- "gitHead": "2f1586ea4f8af5b93753878e96f1f48adbef31a7"
15
+ "gitHead": "ebcec3b98499655769a965cf548456f280f0df18",
16
+ "dependencies": {
17
+ "clone": "^2.1.2"
18
+ }
16
19
  }