@steedos/service-plugin-amis 2.3.0-beta.15 → 2.3.0-beta.17
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.
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
"body": [
|
|
4
4
|
{
|
|
5
5
|
"className": "steedos-amis-form",
|
|
6
|
-
"id": "apps-form",
|
|
7
6
|
"type": "form",
|
|
8
7
|
"mode": "normal",
|
|
9
8
|
"persistData": false,
|
|
@@ -23,7 +22,10 @@
|
|
|
23
22
|
"responseData": {
|
|
24
23
|
"recordId": "${record._id}"
|
|
25
24
|
},
|
|
26
|
-
"adaptor": "\n SteedosUI.getRef(api.body.modalName).close();\n SteedosUI.router.go({objectName: api.body.objectName, recordId: payload.data.record._id, type: api.body.recordId ? 'edit': 'new'});\n return payload;\n "
|
|
25
|
+
"adaptor": "\n SteedosUI.getRef(api.body.modalName).close();\n SteedosUI.router.go({objectName: api.body.objectName, recordId: payload.data.record._id, type: api.body.recordId ? 'edit': 'new'});\n return payload;\n ",
|
|
26
|
+
"headers": {
|
|
27
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
28
|
+
}
|
|
27
29
|
},
|
|
28
30
|
"initApi": {
|
|
29
31
|
"method": "post",
|
|
@@ -32,6 +34,9 @@
|
|
|
32
34
|
"adaptor": "var data = payload.data.data[0];\nif(data){\n //初始化接口返回的字段移除字段值为null的字段\n for (key in data){\n if(data[key] === null){\n delete data[key];\n }\n }\n};\npayload.data = data;\ndelete payload.extensions;\nreturn payload;\n ",
|
|
33
35
|
"data": {
|
|
34
36
|
"query": "{data:apps(filters:[\"_id\", \"=\", \"${recordId}\"]){_id,name,code,icon_slds,visible,description,tabs,tab_items,tab_groups,objects,mobile_objects,is_creator,mobile,sort,url,is_use_ie,is_use_iframe,is_new_window,on_click,auth_name,secret,is_system,from_code_id,instance_state,created,created_by:created_by__expand{_id,name},modified,modified_by:modified_by__expand{_id,name},_display{visible,is_creator,mobile,is_use_ie,is_use_iframe,is_new_window,is_system,instance_state,created,modified}}}"
|
|
37
|
+
},
|
|
38
|
+
"headers": {
|
|
39
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
35
40
|
}
|
|
36
41
|
},
|
|
37
42
|
"initFetch": true,
|
|
@@ -48,9 +53,10 @@
|
|
|
48
53
|
"data": {
|
|
49
54
|
"query": "{options:tabs{_id label:label value:name,type,object,desktop,mobile}}"
|
|
50
55
|
},
|
|
51
|
-
"
|
|
56
|
+
"headers": {
|
|
57
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
58
|
+
}
|
|
52
59
|
},
|
|
53
|
-
"messages": {},
|
|
54
60
|
"placeholder": "-",
|
|
55
61
|
"body": [
|
|
56
62
|
{
|
|
@@ -85,31 +91,34 @@
|
|
|
85
91
|
"id": "u:784ac1e92fbf"
|
|
86
92
|
},
|
|
87
93
|
{
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
"
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
94
|
+
"type": "service",
|
|
95
|
+
"body": [
|
|
96
|
+
{
|
|
97
|
+
"name": "icon_slds",
|
|
98
|
+
"label": "图标",
|
|
99
|
+
"type": "select",
|
|
100
|
+
"className": "m-0",
|
|
101
|
+
"labelClassName": "text-left",
|
|
102
|
+
"id": "u:d0724fe17aa7",
|
|
103
|
+
"required": true,
|
|
104
|
+
"joinValues": false,
|
|
105
|
+
"extractValue": true,
|
|
106
|
+
"labelField": "symbol",
|
|
107
|
+
"valueField": "symbol",
|
|
108
|
+
"multiple": false,
|
|
109
|
+
"source": "${sldsIconsOptions}",
|
|
110
|
+
"menuTpl": "<span class=\"flex justify-center items-center mt-0.5\">\n <span role=\"img\" aria-label=\"smile\" class=\"anticon anticon-smile\">\n <span class=\"slds-icon_container slds-icon-standard-${symbol|split:_|join:-}\">\n <svg class=\"slds-icon slds-icon_x-small\" aria-hidden=\"true\">\n <use xlink:href=\"/unpkg.com/@salesforce-ux/design-system/assets/icons/standard-sprite/svg/symbols.svg#${symbol}\"></use>\n </svg>\n </span>\n </span>\n <span class=\"pl-1.5\">${symbol}</span>\n</span>"
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
"id": "u:420b0162ce2c",
|
|
114
|
+
"api": {
|
|
115
|
+
"method": "get",
|
|
116
|
+
"url": "${context.rootUrl}/unpkg.com/@salesforce-ux/design-system/ui.icons.json",
|
|
117
|
+
"requestAdaptor": "",
|
|
118
|
+
"adaptor": "if (payload && payload.length) {\n let data = {};\n let sldsStandardIcons = _.find(payload, { name: \"standard\" });\n sldsStandardIcons = sldsStandardIcons && sldsStandardIcons.icons;\n data.sldsIconsOptions = sldsStandardIcons;\n payload.data = data;\n}\nreturn payload;\n",
|
|
119
|
+
"headers": {
|
|
120
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
121
|
+
}
|
|
113
122
|
}
|
|
114
123
|
},
|
|
115
124
|
{
|
|
@@ -134,7 +143,13 @@
|
|
|
134
143
|
"multiple": true,
|
|
135
144
|
"checkAll": false,
|
|
136
145
|
"searchable": true,
|
|
137
|
-
"source":
|
|
146
|
+
"source": {
|
|
147
|
+
"method": "get",
|
|
148
|
+
"url": "${context.rootUrl}/service/api/amis-metadata-objects/objects/options",
|
|
149
|
+
"headers": {
|
|
150
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
151
|
+
}
|
|
152
|
+
}
|
|
138
153
|
},
|
|
139
154
|
{
|
|
140
155
|
"name": "mobile_objects",
|
|
@@ -150,7 +165,14 @@
|
|
|
150
165
|
"multiple": true,
|
|
151
166
|
"checkAll": false,
|
|
152
167
|
"searchable": true,
|
|
153
|
-
"source":
|
|
168
|
+
"source": {
|
|
169
|
+
"method": "get",
|
|
170
|
+
"url": "${context.rootUrl}/service/api/amis-metadata-objects/objects/options",
|
|
171
|
+
"messages": {},
|
|
172
|
+
"headers": {
|
|
173
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
174
|
+
}
|
|
175
|
+
}
|
|
154
176
|
},
|
|
155
177
|
{
|
|
156
178
|
"name": "description",
|
|
@@ -163,7 +185,7 @@
|
|
|
163
185
|
},
|
|
164
186
|
{
|
|
165
187
|
"name": "is_creator",
|
|
166
|
-
"label": "
|
|
188
|
+
"label": "在桌面中显示此应用",
|
|
167
189
|
"type": "checkbox",
|
|
168
190
|
"className": "m-0",
|
|
169
191
|
"labelClassName": "text-left",
|
|
@@ -172,7 +194,7 @@
|
|
|
172
194
|
},
|
|
173
195
|
{
|
|
174
196
|
"name": "mobile",
|
|
175
|
-
"label": "
|
|
197
|
+
"label": "在手机上显示此应用",
|
|
176
198
|
"type": "checkbox",
|
|
177
199
|
"className": "m-0",
|
|
178
200
|
"labelClassName": "text-left",
|
|
@@ -506,7 +528,8 @@
|
|
|
506
528
|
}
|
|
507
529
|
]
|
|
508
530
|
}
|
|
509
|
-
}
|
|
531
|
+
},
|
|
532
|
+
"id": "apps-form"
|
|
510
533
|
}
|
|
511
534
|
],
|
|
512
535
|
"regions": [
|
|
@@ -35,12 +35,13 @@
|
|
|
35
35
|
"options": [],
|
|
36
36
|
"id": "u:e224b24aa867",
|
|
37
37
|
"searchable": true,
|
|
38
|
-
"source":
|
|
39
|
-
|
|
40
|
-
"
|
|
38
|
+
"source": {
|
|
39
|
+
"method": "get",
|
|
40
|
+
"url": "${context.rootUrl}/service/api/amis-metadata-objects/objects/generate_tabs_options",
|
|
41
|
+
"headers": {
|
|
42
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
43
|
+
}
|
|
41
44
|
},
|
|
42
|
-
"validations": {},
|
|
43
|
-
"validationErrors": {},
|
|
44
45
|
"required": true
|
|
45
46
|
}
|
|
46
47
|
],
|
|
@@ -71,7 +72,8 @@
|
|
|
71
72
|
"debug": false,
|
|
72
73
|
"messages": {
|
|
73
74
|
"fetchFailed": "初始化失败",
|
|
74
|
-
"saveFailed": "保存失败"
|
|
75
|
+
"saveFailed": "保存失败",
|
|
76
|
+
"validateFailed": "请先选择需要生成选项卡的对象!"
|
|
75
77
|
},
|
|
76
78
|
"onEvent": {
|
|
77
79
|
"submitSucc": {
|
|
@@ -21,7 +21,10 @@
|
|
|
21
21
|
"responseData": {
|
|
22
22
|
"recordId": "${record._id}"
|
|
23
23
|
},
|
|
24
|
-
"adaptor": "\n SteedosUI.getRef(api.body.modalName).close();\n SteedosUI.router.go({objectName: api.body.objectName, recordId: payload.data.record._id, type: api.body.recordId ? 'edit': 'new'});\n return payload;\n "
|
|
24
|
+
"adaptor": "\n SteedosUI.getRef(api.body.modalName).close();\n SteedosUI.router.go({objectName: api.body.objectName, recordId: payload.data.record._id, type: api.body.recordId ? 'edit': 'new'});\n return payload;\n ",
|
|
25
|
+
"headers": {
|
|
26
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
27
|
+
}
|
|
25
28
|
},
|
|
26
29
|
"initApi": {
|
|
27
30
|
"method": "post",
|
|
@@ -31,6 +34,9 @@
|
|
|
31
34
|
"adaptor": "var data = payload.data.data[0];\nif(data){\n data.object_name = data.object_name ? data.object_name.name:null;\n \n \n //初始化接口返回的字段移除字段值为null的字段\n for (key in data){\n if(data[key] === null){\n delete data[key];\n }\n }\n};\npayload.data = data;\ndelete payload.extensions;\nreturn payload;\n",
|
|
32
35
|
"data": {
|
|
33
36
|
"query": "{data:object_layouts(filters:[\"_id\", \"=\", \"${recordId}\"]){_id,name,label,object_name:object_name__expand{name,label},profiles,buttons,fields,related_lists,field_groups,created,created_by:created_by__expand{_id,name},modified,modified_by:modified_by__expand{_id,name},_display{created,modified}}}"
|
|
37
|
+
},
|
|
38
|
+
"headers": {
|
|
39
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
34
40
|
}
|
|
35
41
|
},
|
|
36
42
|
"initFetch": true,
|
|
@@ -80,7 +86,14 @@
|
|
|
80
86
|
"checkAll": false,
|
|
81
87
|
"searchable": true,
|
|
82
88
|
"id": "u:4e769995f638",
|
|
83
|
-
"source":
|
|
89
|
+
"source": {
|
|
90
|
+
"method": "get",
|
|
91
|
+
"url": "/service/api/amis-metadata-objects/objects/options",
|
|
92
|
+
"headers": {
|
|
93
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"multiple": false
|
|
84
97
|
},
|
|
85
98
|
{
|
|
86
99
|
"name": "profiles",
|
|
@@ -101,7 +114,10 @@
|
|
|
101
114
|
"query": "{options:permission_set(filters: [\"type\", \"=\", \"profile\"]){name,label}}"
|
|
102
115
|
},
|
|
103
116
|
"requestAdaptor": "",
|
|
104
|
-
"adaptor": ""
|
|
117
|
+
"adaptor": "",
|
|
118
|
+
"headers": {
|
|
119
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
120
|
+
}
|
|
105
121
|
},
|
|
106
122
|
"valueField": "name",
|
|
107
123
|
"searchable": true,
|
|
@@ -182,7 +198,7 @@
|
|
|
182
198
|
"footable": false,
|
|
183
199
|
"headerToolbar": [
|
|
184
200
|
{
|
|
185
|
-
"type": "
|
|
201
|
+
"type": "button",
|
|
186
202
|
"actionType": "dialog",
|
|
187
203
|
"dialog": {
|
|
188
204
|
"title": "设置按钮",
|
|
@@ -226,7 +242,10 @@
|
|
|
226
242
|
"method": "get",
|
|
227
243
|
"url": "/service/api/amis-metadata-objects/objects/${object_name}/actions/options",
|
|
228
244
|
"adaptor": "let data = payload.data;\ndata.buttons_options = data.options;\ndelete data.options\npayload.data = data;\nreturn payload;\n",
|
|
229
|
-
"sendOn": "!!this.object_name"
|
|
245
|
+
"sendOn": "!!this.object_name",
|
|
246
|
+
"headers": {
|
|
247
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
248
|
+
}
|
|
230
249
|
},
|
|
231
250
|
"className": "col-span-2 m-0",
|
|
232
251
|
"affixFooter": false,
|
|
@@ -388,7 +407,7 @@
|
|
|
388
407
|
"footable": false,
|
|
389
408
|
"headerToolbar": [
|
|
390
409
|
{
|
|
391
|
-
"type": "
|
|
410
|
+
"type": "button",
|
|
392
411
|
"actionType": "dialog",
|
|
393
412
|
"dialog": {
|
|
394
413
|
"title": "设置字段",
|
|
@@ -423,7 +442,7 @@
|
|
|
423
442
|
"id": "u:853b890ab524"
|
|
424
443
|
},
|
|
425
444
|
{
|
|
426
|
-
"type": "
|
|
445
|
+
"type": "button",
|
|
427
446
|
"actionType": "dialog",
|
|
428
447
|
"dialog": {
|
|
429
448
|
"title": "设置分组",
|
|
@@ -478,7 +497,10 @@
|
|
|
478
497
|
"url": "/service/api/amis-metadata-objects/objects/${object_name}/fields/layout_options",
|
|
479
498
|
"adaptor": "let data = payload.data;\ndata.fields_options = data.options;\ndata.field_groups_options = lodash.uniq(lodash.compact(lodash.map(data.options, \"group\"))) || [];\ndelete data.options\npayload.data = data;\nreturn payload;\n",
|
|
480
499
|
"sendOn": "!!this.object_name",
|
|
481
|
-
"data": null
|
|
500
|
+
"data": null,
|
|
501
|
+
"headers": {
|
|
502
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
503
|
+
}
|
|
482
504
|
},
|
|
483
505
|
"className": "col-span-2 m-0",
|
|
484
506
|
"placeholder": "-",
|
|
@@ -514,7 +536,10 @@
|
|
|
514
536
|
"method": "get",
|
|
515
537
|
"url": "/service/api/amis-metadata-objects/objects/${object_name}/relatedLists/options",
|
|
516
538
|
"sendOn": "!!this.object_name",
|
|
517
|
-
"adaptor": "let data = payload.data;\ndata.related_lists_options = data.options;\ndelete data.options\npayload.data = data;\nreturn payload;\n"
|
|
539
|
+
"adaptor": "let data = payload.data;\ndata.related_lists_options = data.options;\ndelete data.options\npayload.data = data;\nreturn payload;\n",
|
|
540
|
+
"headers": {
|
|
541
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
542
|
+
}
|
|
518
543
|
},
|
|
519
544
|
"className": "col-span-2 m-0",
|
|
520
545
|
"affixFooter": false,
|
|
@@ -576,7 +601,10 @@
|
|
|
576
601
|
"source": {
|
|
577
602
|
"method": "get",
|
|
578
603
|
"url": "/service/api/amis-metadata-objects/objects/${related_field_fullname|split:.|first}/fields/options",
|
|
579
|
-
"cache": 60000
|
|
604
|
+
"cache": 60000,
|
|
605
|
+
"headers": {
|
|
606
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
607
|
+
}
|
|
580
608
|
},
|
|
581
609
|
"searchable": true,
|
|
582
610
|
"onEvent": {
|
|
@@ -620,7 +648,10 @@
|
|
|
620
648
|
"source": {
|
|
621
649
|
"method": "get",
|
|
622
650
|
"url": "/service/api/amis-metadata-objects/objects/${related_field_fullname|split:.|first}/fields/options",
|
|
623
|
-
"cache": 60000
|
|
651
|
+
"cache": 60000,
|
|
652
|
+
"headers": {
|
|
653
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
654
|
+
}
|
|
624
655
|
},
|
|
625
656
|
"searchable": true,
|
|
626
657
|
"name": "sort_field_name",
|
|
@@ -744,7 +775,7 @@
|
|
|
744
775
|
"labelClassName": "text-left",
|
|
745
776
|
"headerToolbar": [
|
|
746
777
|
{
|
|
747
|
-
"type": "
|
|
778
|
+
"type": "button",
|
|
748
779
|
"actionType": "dialog",
|
|
749
780
|
"dialog": {
|
|
750
781
|
"title": "设置子表",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/service-plugin-amis",
|
|
3
|
-
"version": "2.3.0-beta.
|
|
3
|
+
"version": "2.3.0-beta.17",
|
|
4
4
|
"main": "package.service.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "node .scripts/build.tailwind.js"
|
|
@@ -10,5 +10,5 @@
|
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public"
|
|
12
12
|
},
|
|
13
|
-
"gitHead": "
|
|
13
|
+
"gitHead": "c538df4a4cb88a220b0ab3b2a3eda70471e709a3"
|
|
14
14
|
}
|