@steedos/standard-object-database 2.3.2-beta.9 → 2.3.2

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.
@@ -24,8 +24,8 @@ fields:
24
24
  options:
25
25
  - label: Mine
26
26
  value: mine
27
- - label: space
28
- value: Space
27
+ - label: Space
28
+ value: space
29
29
  shared:
30
30
  label: Shared to All Users
31
31
  help:
@@ -141,14 +141,28 @@ fields:
141
141
  label: Field
142
142
  help:
143
143
  description:
144
+ searchable_fields:
145
+ label: Searchable Fields
146
+ help:
147
+ description:
148
+ searchable_fields.$:
149
+ label: Column
150
+ help:
151
+ description:
152
+ searchable_fields.$.field:
153
+ label: Field
154
+ help:
155
+ description:
144
156
  groups:
145
- custom: Custom
157
+ advanced: Advanced
146
158
  listviews:
147
159
  all:
148
160
  label: All List View
149
161
  actions:
150
162
  customize:
151
163
  label: Customize
164
+ copy:
165
+ label: Copy
152
166
  CustomLabels:
153
167
  object_listviews_field_filters.$:
154
168
  object_listviews_field_sort.$:
@@ -132,14 +132,26 @@ fields:
132
132
  label: 字段
133
133
  help:
134
134
  description:
135
+ searchable_fields:
136
+ label: 默认可搜索字段
137
+ help:
138
+ description:
139
+ searchable_fields.$:
140
+ label: 默认可搜索字段
141
+ help:
142
+ description:
143
+ searchable_fields.$.field:
144
+ label: 字段
145
+ help:
146
+ description:
135
147
  sort_no:
136
148
  label: 排序号
137
149
  enable_amis_schema:
138
- label: 启用
150
+ label: 使用 amis自定义列表
139
151
  amis_schema:
140
152
  label: Amis Schema
141
153
  groups:
142
- custom: 自定义
154
+ advanced: 高级
143
155
  listviews:
144
156
  all:
145
157
  label: 全部
@@ -206,6 +206,8 @@ listviews:
206
206
  deleted:
207
207
  label: Deleted
208
208
  actions:
209
+ schemaBuilder:
210
+ label: Schema Builder
209
211
  show_object:
210
212
  label: Preview
211
213
  copy_odata:
@@ -19,7 +19,10 @@ amis_schema: |-
19
19
  "Authorization": "Bearer ${context.tenantId},${context.authToken}"
20
20
  }
21
21
  },
22
- "messages": {}
22
+ "messages": {
23
+ "success": "Amis Schema重置成功!",
24
+ "failed": "Amis Schema重置失败!"
25
+ }
23
26
  },
24
27
  "actionType": "ajax"
25
28
  }
@@ -268,6 +268,33 @@ fields:
268
268
 
269
269
  return Creator.getObjectFieldOptions(values != null ? values.object_name : void 0, true);
270
270
  }
271
+ searchable_fields:
272
+ label: Searchable Fields
273
+ type: grid
274
+ is_wide: true
275
+ depend_on:
276
+ - object_name
277
+ searchable_fields.$:
278
+ label: Column
279
+ blackbox: true
280
+ type: object
281
+ searchable_fields.$.field:
282
+ label: Field
283
+ type: lookup
284
+ multiple: false
285
+ is_wide: false
286
+ optionsFunction: !<tag:yaml.org,2002:js/function> |-
287
+ function (values) {
288
+ if (!(values != null ? values.object_name : void 0)) {
289
+ values.object_name = Session.get("object_name");
290
+ }
291
+
292
+ if(values.object_name && !_.isString(values.object_name)){
293
+ values.object_name = values.object_name.name
294
+ }
295
+
296
+ return Creator.getObjectFieldOptions(values != null ? values.object_name : void 0, true);
297
+ }
271
298
  sort_no:
272
299
  label: Sort no
273
300
  type: number
@@ -281,14 +308,14 @@ fields:
281
308
  visible_on: "{{global.mode ==='read' ? true : false}}"
282
309
  disabled: true
283
310
  enable_amis_schema:
284
- label: Enable
311
+ label: Enable amis_schema
285
312
  type: boolean
286
- group: custom
313
+ group: advanced
287
314
  required: false
288
315
  amis_schema:
289
316
  label: Amis Schema
290
317
  type: code
291
- group: custom
318
+ group: advanced
292
319
  language: json
293
320
  required: false
294
321
  is_wide: true
@@ -4,7 +4,7 @@
4
4
  * @Description:
5
5
  */
6
6
  const express = require("express");
7
- const router =require('@steedos/router').staticRouter()
7
+ const router = express.Router();
8
8
  const core = require('@steedos/core');
9
9
  const ejs = require('ejs');
10
10
  const fs = require('fs');
@@ -4,7 +4,7 @@
4
4
  * @Description:
5
5
  */
6
6
  const express = require("express");
7
- const router =require('@steedos/router').staticRouter()
7
+ const router = express.Router();
8
8
  const core = require('@steedos/core');
9
9
  const ejs = require('ejs');
10
10
  const fs = require('fs');
@@ -2,10 +2,11 @@
2
2
  * @Author: baozhoutao@steedos.com
3
3
  * @Date: 2022-08-05 14:20:24
4
4
  * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2022-08-05 15:41:30
5
+ * @LastEditTime: 2022-11-29 11:59:40
6
6
  * @Description:
7
7
  */
8
- const router =require('@steedos/router').staticRouter()
8
+ const express = require('express');
9
+ const router = express.Router();
9
10
  const core = require('@steedos/core');
10
11
  const objectql = require('@steedos/objectql');
11
12
 
@@ -47,11 +48,12 @@ router.post('/api/listview/:id/amis-schema/reset', core.requireAuthentication, a
47
48
  return await getUISchema(objectName, userSession);
48
49
  });
49
50
  let schema = await AmisLib.getListviewInitSchema(listview.object_name, listview.name);
50
- const record = await objectql.getObject('object_listviews').directUpdate(id, { amis_schema: schema });
51
+ const record = await objectql.getObject('object_listviews').directUpdate(id, { amis_schema: JSON.stringify(schema, null, 4) });
51
52
  res.status(200).send(record);
52
53
 
53
54
  } catch (error) {
54
55
  res.status(500).send(error.message);
56
+ console.error(error);
55
57
  }
56
58
  });
57
59
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/standard-object-database",
3
- "version": "2.3.2-beta.9",
3
+ "version": "2.3.2",
4
4
  "main": "package.service.js",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -11,9 +11,9 @@
11
11
  ],
12
12
  "description": "steedos package",
13
13
  "dependencies": {
14
- "@steedos-widgets/amis-lib": "^0.0.10"
14
+ "@steedos-widgets/amis-lib": "^0.0.15"
15
15
  },
16
16
  "repository": {},
17
17
  "license": "MIT",
18
- "gitHead": "e20a307e760a2a28f2f447ff16fca94f42852309"
18
+ "gitHead": "3aefe890a87dcdf231a132d180744ee37653dd7c"
19
19
  }