@steedos/standard-object-database 2.7.10-beta.10 → 2.7.10-beta.11

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.
@@ -184,7 +184,16 @@
184
184
  "visible_on": {
185
185
  "amis": {
186
186
  "type": "input-formula",
187
- "name": "formula",
187
+ "evalMode": false,
188
+ "variableMode": "tabs",
189
+ "variables": "${visibleOnVariables}",
190
+ "visibleOn": "${visibleOnVariables}",
191
+ "id": "u:618105d5bfad"
192
+ }
193
+ },
194
+ "formula": {
195
+ "amis": {
196
+ "type": "input-formula",
188
197
  "evalMode": false,
189
198
  "variableMode": "tabs",
190
199
  "variables": "${visibleOnVariables}",
@@ -2,7 +2,7 @@
2
2
  * @Author: baozhoutao@steedos.com
3
3
  * @Date: 2022-06-02 17:45:15
4
4
  * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2024-10-10 10:20:19
5
+ * @LastEditTime: 2024-10-17 12:02:21
6
6
  * @Description:
7
7
  -->
8
8
  <html>
@@ -251,6 +251,56 @@
251
251
  if (data) {
252
252
  if(data.type === 'builder.loaded'){
253
253
  comp.messageFrame('builder.EditorPropsChanged', { editorProps : JSON.stringify({
254
+ onChange: function(value){
255
+ const fields = [];
256
+ _.each(value.body, (bodyItem)=>{
257
+ if(bodyItem.type === 'steedos-field-group'){
258
+ let groupName = bodyItem.title;
259
+ _.each(bodyItem.body, (field)=>{
260
+ if(_.startsWith(field.type, 'sfield-')){
261
+
262
+ if(field.config && field.config.amis){
263
+ delete field.config.amis.name
264
+ delete field.config.amis.mode
265
+ }
266
+
267
+ fields.push(Object.assign({}, field.config, {group: groupName}));
268
+ }
269
+ })
270
+ }else if(_.startsWith(bodyItem.type, 'sfield-')){
271
+ if(bodyItem.config && bodyItem.config.amis){
272
+ delete bodyItem.config.amis.name
273
+ delete bodyItem.config.amis.mode
274
+ }
275
+ fields.push(Object.assign({}, bodyItem.config, {group: '通用'}));
276
+ }
277
+ })
278
+
279
+
280
+ const variables = [];
281
+
282
+ _.each(_.groupBy(fields, 'group'), (v, k)=>{
283
+ if(k=== '通用'){
284
+ _.each(v, (field)=>{
285
+ variables.push({
286
+ label: field.label,
287
+ value: field.name
288
+ })
289
+ })
290
+ }else{
291
+ variables.push({
292
+ label: k,
293
+ children: _.map(v, (field)=>{
294
+ return {
295
+ label: field.label,
296
+ value: field.name
297
+ }
298
+ })
299
+ })
300
+ }
301
+ })
302
+ window._objectFieldsVariables = variables;
303
+ },
254
304
  onDndAccept: function(event){
255
305
  return true;
256
306
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/standard-object-database",
3
- "version": "2.7.10-beta.10",
3
+ "version": "2.7.10-beta.11",
4
4
  "main": "package.service.js",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -12,14 +12,14 @@
12
12
  "description": "steedos package",
13
13
  "dependencies": {
14
14
  "@steedos-widgets/amis-lib": "^1.0.22",
15
- "@steedos/metadata-core": "2.7.10-beta.10",
16
- "@steedos/service-object-mixin": "2.7.10-beta.10",
17
- "@steedos/standard-objects": "2.7.10-beta.10",
15
+ "@steedos/metadata-core": "2.7.10-beta.11",
16
+ "@steedos/service-object-mixin": "2.7.10-beta.11",
17
+ "@steedos/standard-objects": "2.7.10-beta.11",
18
18
  "amis-formula": "~6.3.0",
19
19
  "clone": "^2.1.2",
20
20
  "moleculer-bullmq": "3.0.0"
21
21
  },
22
22
  "repository": {},
23
23
  "license": "MIT",
24
- "gitHead": "cffd1ba851c6e18adcdd8b92f2c20d4d9d76247e"
24
+ "gitHead": "8be70858573845de1c3b6cf45ba96f626c87282e"
25
25
  }