@steedos/service-plugin-amis 2.3.0-beta.16 → 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.
|
@@ -22,7 +22,10 @@
|
|
|
22
22
|
"responseData": {
|
|
23
23
|
"recordId": "${record._id}"
|
|
24
24
|
},
|
|
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 "
|
|
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
|
+
}
|
|
26
29
|
},
|
|
27
30
|
"initApi": {
|
|
28
31
|
"method": "post",
|
|
@@ -31,6 +34,9 @@
|
|
|
31
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 ",
|
|
32
35
|
"data": {
|
|
33
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}"
|
|
34
40
|
}
|
|
35
41
|
},
|
|
36
42
|
"initFetch": true,
|
|
@@ -47,9 +53,10 @@
|
|
|
47
53
|
"data": {
|
|
48
54
|
"query": "{options:tabs{_id label:label value:name,type,object,desktop,mobile}}"
|
|
49
55
|
},
|
|
50
|
-
"
|
|
56
|
+
"headers": {
|
|
57
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
58
|
+
}
|
|
51
59
|
},
|
|
52
|
-
"messages": {},
|
|
53
60
|
"placeholder": "-",
|
|
54
61
|
"body": [
|
|
55
62
|
{
|
|
@@ -84,31 +91,34 @@
|
|
|
84
91
|
"id": "u:784ac1e92fbf"
|
|
85
92
|
},
|
|
86
93
|
{
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
"
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"
|
|
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
|
+
}
|
|
112
122
|
}
|
|
113
123
|
},
|
|
114
124
|
{
|
|
@@ -133,7 +143,13 @@
|
|
|
133
143
|
"multiple": true,
|
|
134
144
|
"checkAll": false,
|
|
135
145
|
"searchable": true,
|
|
136
|
-
"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
|
+
}
|
|
137
153
|
},
|
|
138
154
|
{
|
|
139
155
|
"name": "mobile_objects",
|
|
@@ -149,7 +165,14 @@
|
|
|
149
165
|
"multiple": true,
|
|
150
166
|
"checkAll": false,
|
|
151
167
|
"searchable": true,
|
|
152
|
-
"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
|
+
}
|
|
153
176
|
},
|
|
154
177
|
{
|
|
155
178
|
"name": "description",
|
|
@@ -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
|
],
|
|
@@ -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,
|
|
@@ -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,
|
|
@@ -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",
|
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
|
}
|