@steedos/service-plugin-amis 2.3.2-beta.10 → 2.3.2-beta.12

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.
@@ -33,7 +33,7 @@
33
33
  "cache": 100,
34
34
  "adaptor": "var data = payload.data.data[0] || { _filters_type_controller: 'conditions' };\n//数据格式转换\nif (data) {\n data.columns = lodash.map(data.columns, 'field');\n data.sort = lodash.map(data.sort, (item) => {\n return `${item.field_name}:${item.order || 'asc'}`\n });\n data.mobile_columns = lodash.map(data.mobile_columns, 'field');\n\n if (data.filters && lodash.isString(data.filters)) {\n try {\n data.filters = JSON.parse(data.filters);\n }catch(e){}\n }\n\n if (data.filters && lodash.isString(data.filters)) {\n data._filters_type_controller = 'function';\n } else {\n data._filters_type_controller = 'conditions'\n }\n\n if (data._filters_type_controller === 'conditions') {\n data._filters_conditions = window.amisConvert.filtersToConditions(data.filters || []);\n } else {\n data._filters_function = data.filters;\n }\n}\npayload.data = data;\ndelete payload.extensions;\nreturn payload;",
35
35
  "data": {
36
- "query": "{data:object_listviews(filters:[\"_id\", \"=\", \"${recordId}\"]){_id,label,name,object_name,filter_scope,shared,show_count,columns,filter_fields,sort,filters,filter_logic,mobile_columns,sort_no,created,created_by:created_by__expand{_id,name},modified,modified_by:modified_by__expand{_id,name},_display{shared,show_count,created,modified}}}"
36
+ "query": "{data:object_listviews(filters:[\"_id\", \"=\", \"${recordId}\"]){_id,label,name,object_name,filter_scope,shared,show_count,columns,filter_fields,sort,filters,filter_logic,mobile_columns,sort_no,created,created_by:created_by__expand{_id,name},modified,modified_by:modified_by__expand{_id,name},enable_amis_schema,amis_schema,_display{shared,show_count,created,modified}}}"
37
37
  },
38
38
  "sendOn": "!!this.recordId",
39
39
  "replaceData": false,
@@ -398,6 +398,50 @@
398
398
  "title": "Mobile"
399
399
  },
400
400
  "id": "u:51174159a42e"
401
+ },
402
+ {
403
+ "type": "fieldSet",
404
+ "title": "高级",
405
+ "collapsable": true,
406
+ "body": [
407
+ {
408
+ "name": "enable_amis_schema",
409
+ "type": "checkbox",
410
+ "tpl": null,
411
+ "className": "m-0",
412
+ "labelClassName": "text-left",
413
+ "option": "使用 amis自定义列表",
414
+ "en-US": {
415
+ "option": "Enable amis_schema"
416
+ },
417
+ "onEvent": {
418
+ "change": {
419
+ "actions": [
420
+ {
421
+ "actionType": "custom",
422
+ "script": "const { object_name, name: listName, enable_amis_schema, amis_schema} = context.props.data;\nwindow.BuilderAmisObject?.AmisLib.getListviewInitSchema(object_name, listName).then(function (result) {\n if (!enable_amis_schema && !amis_schema) {\n doAction({\n actionType: 'setValue',\n componentId: 'listview_form',\n args: {\n value: { amis_schema: result }\n },\n });\n }\n});\n\n\n\n\n\n\n"
423
+ }
424
+ ]
425
+ }
426
+ }
427
+ },
428
+ {
429
+ "type": "editor",
430
+ "name": "amis_schema",
431
+ "label": "Amis Schema",
432
+ "required": false,
433
+ "language": "json",
434
+ "className": "col-span-2 m-1",
435
+ "labelClassName": "text-left",
436
+ "clearValueOnHidden": false,
437
+ "hidden": true
438
+ }
439
+ ],
440
+ "collapsed": true,
441
+ "visibleOn": "!!this.object_name",
442
+ "en-US": {
443
+ "title": "Advanced"
444
+ }
401
445
  }
402
446
  ],
403
447
  "panelClassName": "m-0",
@@ -406,7 +450,7 @@
406
450
  "actionsClassName": "p-sm b-t b-light text-center",
407
451
  "className": "steedos-amis-form",
408
452
  "language": "javascript",
409
- "id": "u:d951542bb161"
453
+ "id": "listview_form"
410
454
  }
411
455
  ],
412
456
  "regions": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/service-plugin-amis",
3
- "version": "2.3.2-beta.10",
3
+ "version": "2.3.2-beta.12",
4
4
  "main": "package.service.js",
5
5
  "scripts": {
6
6
  "build": "node .scripts/build.tailwind.js"
@@ -11,7 +11,7 @@
11
11
  "access": "public"
12
12
  },
13
13
  "dependencies": {
14
- "@steedos-widgets/amis-lib": "^0.0.10"
14
+ "@steedos-widgets/amis-lib": "^0.0.11"
15
15
  },
16
- "gitHead": "44b1617fea53eb016e82e72174e1d33bdbfe3fd1"
16
+ "gitHead": "f738241842b61c66eae2b1fe7bf5c0bfb66348d6"
17
17
  }