@steedos-widgets/amis-lib 1.2.18 → 1.2.19
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.
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/index.cjs.js +8 -96
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +8 -96
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +8 -96
- package/dist/index.umd.js.map +1 -1
- package/dist/types/lib/converter/amis/fields/lookup.d.ts +8 -2
- package/dist/types/lib/converter/amis/fields/table.d.ts +4 -1
- package/package.json +2 -2
package/dist/index.umd.js
CHANGED
|
@@ -2445,15 +2445,15 @@
|
|
|
2445
2445
|
let filename = uiSchema.label + "-" + list_views[list_views_name].label;
|
|
2446
2446
|
|
|
2447
2447
|
url_tmp = api.url.split('?')[0];
|
|
2448
|
-
api.url = url_tmp + "?$select=" + select.toString() + "&filename=" + filename;
|
|
2448
|
+
api.url = url_tmp + "?$select=" + encodeURIComponent(select.toString()) + "&filename=" + encodeURIComponent(filename);
|
|
2449
2449
|
|
|
2450
2450
|
// 判断sort 和 filters
|
|
2451
2451
|
if (sort.length > 0) {
|
|
2452
|
-
api.url += "&$orderby=" + order;
|
|
2452
|
+
api.url += "&$orderby=" + encodeURIComponent(order);
|
|
2453
2453
|
}
|
|
2454
2454
|
let filters = list_views[list_views_name].filters;
|
|
2455
2455
|
if (filters && filters.length > 0) {
|
|
2456
|
-
api.url = api.url + "&filters=" + JSON.stringify(filters);
|
|
2456
|
+
api.url = api.url + "&filters=" + encodeURIComponent(JSON.stringify(filters));
|
|
2457
2457
|
}
|
|
2458
2458
|
return api;
|
|
2459
2459
|
`;
|
|
@@ -4132,97 +4132,6 @@
|
|
|
4132
4132
|
async function getObjectRelatedListHeader(objectSchema, recordId, relatedObjectName) {
|
|
4133
4133
|
}
|
|
4134
4134
|
|
|
4135
|
-
const getExportExcelToolbarButtonSchema = ()=>{
|
|
4136
|
-
return {
|
|
4137
|
-
"type": "button",
|
|
4138
|
-
"icon": "fa fa-download",
|
|
4139
|
-
"align": "right",
|
|
4140
|
-
"className": "bg-white p-2 rounded border-gray-300 text-gray-500",
|
|
4141
|
-
"tooltipPlacement": "bottom",
|
|
4142
|
-
"visibleOn": "${!isLookup && global.user.is_space_admin}",
|
|
4143
|
-
"tooltip": i18next__default["default"].t('frontend_export_excel'),
|
|
4144
|
-
"onEvent": {
|
|
4145
|
-
"click": {
|
|
4146
|
-
"weight": 0,
|
|
4147
|
-
"actions": [
|
|
4148
|
-
{
|
|
4149
|
-
"args": {
|
|
4150
|
-
"api": {
|
|
4151
|
-
"url": "${context.rootUrl}/api/record/export/${objectName}",
|
|
4152
|
-
"method": "get",
|
|
4153
|
-
"messages": {},
|
|
4154
|
-
"requestAdaptor": `${requestAdaptor$1()}`,
|
|
4155
|
-
"data": {
|
|
4156
|
-
"uiSchema": "${uiSchema}",
|
|
4157
|
-
"listName": "${listName}"
|
|
4158
|
-
},
|
|
4159
|
-
"headers": {
|
|
4160
|
-
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
4161
|
-
}
|
|
4162
|
-
}
|
|
4163
|
-
},
|
|
4164
|
-
"actionType": "download"
|
|
4165
|
-
}
|
|
4166
|
-
]
|
|
4167
|
-
}
|
|
4168
|
-
}
|
|
4169
|
-
}
|
|
4170
|
-
};
|
|
4171
|
-
|
|
4172
|
-
function requestAdaptor$1(){
|
|
4173
|
-
return `
|
|
4174
|
-
// 获取列表视图的属性
|
|
4175
|
-
let uiSchema = api.body.uiSchema;
|
|
4176
|
-
let list_views = uiSchema.list_views;
|
|
4177
|
-
let list_views_name = api.body.listName;
|
|
4178
|
-
let col = list_views[list_views_name].columns;
|
|
4179
|
-
let sort_test = list_views[list_views_name].sort;
|
|
4180
|
-
|
|
4181
|
-
// 获取下载字段
|
|
4182
|
-
let select = [];
|
|
4183
|
-
_.each(col, (col) => {
|
|
4184
|
-
if (col.field == undefined)
|
|
4185
|
-
select.push(col);
|
|
4186
|
-
else select.push(col.field);
|
|
4187
|
-
});
|
|
4188
|
-
|
|
4189
|
-
// 获取排序字段
|
|
4190
|
-
|
|
4191
|
-
let sort = [];
|
|
4192
|
-
_.forEach(sort_test, (sortField) => {
|
|
4193
|
-
if (sortField.field_name == undefined)
|
|
4194
|
-
sort.push(sortField);
|
|
4195
|
-
else sort.push([sortField.field_name, sortField.order]);
|
|
4196
|
-
})
|
|
4197
|
-
|
|
4198
|
-
let orders = [];
|
|
4199
|
-
_.map(sort, (value) => {
|
|
4200
|
-
let order_tmp = [];
|
|
4201
|
-
if (value[1] == "desc")
|
|
4202
|
-
order_tmp = value[0] + ' desc';
|
|
4203
|
-
else
|
|
4204
|
-
order_tmp = value[0];
|
|
4205
|
-
orders.push(order_tmp);
|
|
4206
|
-
});
|
|
4207
|
-
let order = orders.join(',');
|
|
4208
|
-
|
|
4209
|
-
let filename = uiSchema.label + "-" + list_views[list_views_name].label;
|
|
4210
|
-
|
|
4211
|
-
url_tmp = api.url.split('?')[0];
|
|
4212
|
-
api.url = url_tmp + "?$select=" + select.toString() + "&filename=" + filename;
|
|
4213
|
-
|
|
4214
|
-
// 判断sort 和 filters
|
|
4215
|
-
if (sort.length > 0) {
|
|
4216
|
-
api.url += "&$orderby=" + order;
|
|
4217
|
-
}
|
|
4218
|
-
let filters = list_views[list_views_name].filters;
|
|
4219
|
-
if (filters && filters.length > 0) {
|
|
4220
|
-
api.url = api.url + "&filters=" + JSON.stringify(filters);
|
|
4221
|
-
}
|
|
4222
|
-
return api;
|
|
4223
|
-
`
|
|
4224
|
-
}
|
|
4225
|
-
|
|
4226
4135
|
const getNewListviewButtonSchema = ()=>{
|
|
4227
4136
|
return {
|
|
4228
4137
|
"type": "button",
|
|
@@ -5312,7 +5221,7 @@ else{
|
|
|
5312
5221
|
"tooltipPlacement": "bottom",
|
|
5313
5222
|
"className": "bg-white p-2 rounded border-gray-300 text-gray-500"
|
|
5314
5223
|
},
|
|
5315
|
-
getExportExcelToolbarButtonSchema(),
|
|
5224
|
+
// getExportExcelToolbarButtonSchema(),
|
|
5316
5225
|
filterVisible ? {
|
|
5317
5226
|
"label": "",
|
|
5318
5227
|
"icon": "fa fa-search",
|
|
@@ -7686,7 +7595,10 @@ else{
|
|
|
7686
7595
|
level: "link",
|
|
7687
7596
|
actionType: "link",
|
|
7688
7597
|
link: url,
|
|
7689
|
-
innerClassName:
|
|
7598
|
+
innerClassName: {
|
|
7599
|
+
"steedos-listview-item block text-gray-500":"true",
|
|
7600
|
+
"max-w-[360px]": "${display == 'split'}",
|
|
7601
|
+
},
|
|
7690
7602
|
body: {
|
|
7691
7603
|
"type": "wrapper",
|
|
7692
7604
|
"body": columnLines,
|