@steedos-widgets/amis-object 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/amis-object.cjs.css +5 -2
- package/dist/amis-object.cjs.js +9 -97
- package/dist/amis-object.cjs.js.map +1 -1
- package/dist/amis-object.esm.css +5 -2
- package/dist/amis-object.esm.js +9 -97
- package/dist/amis-object.esm.js.map +1 -1
- package/dist/amis-object.umd.css +5 -2
- package/dist/amis-object.umd.js +9 -97
- package/dist/amis-object.umd.js.map +1 -1
- package/dist/assets.json +11 -11
- package/dist/pages/PageObject.d.ts +2 -2
- package/package.json +3 -3
package/dist/amis-object.umd.css
CHANGED
|
@@ -543,6 +543,9 @@ body {
|
|
|
543
543
|
.w-8 {
|
|
544
544
|
width: 2rem
|
|
545
545
|
}
|
|
546
|
+
.w-\[388px\] {
|
|
547
|
+
width: 388px
|
|
548
|
+
}
|
|
546
549
|
.\!min-w-\[160px\] {
|
|
547
550
|
min-width: 160px !important
|
|
548
551
|
}
|
|
@@ -555,8 +558,8 @@ body {
|
|
|
555
558
|
.min-w-\[200px\] {
|
|
556
559
|
min-width: 200px
|
|
557
560
|
}
|
|
558
|
-
.
|
|
559
|
-
|
|
561
|
+
.max-w-\[360px\] {
|
|
562
|
+
max-width: 360px
|
|
560
563
|
}
|
|
561
564
|
.max-w-md {
|
|
562
565
|
max-width: 28rem
|
package/dist/amis-object.umd.js
CHANGED
|
@@ -5600,15 +5600,15 @@
|
|
|
5600
5600
|
let filename = uiSchema.label + "-" + list_views[list_views_name].label;
|
|
5601
5601
|
|
|
5602
5602
|
url_tmp = api.url.split('?')[0];
|
|
5603
|
-
api.url = url_tmp + "?$select=" + select.toString() + "&filename=" + filename;
|
|
5603
|
+
api.url = url_tmp + "?$select=" + encodeURIComponent(select.toString()) + "&filename=" + encodeURIComponent(filename);
|
|
5604
5604
|
|
|
5605
5605
|
// 判断sort 和 filters
|
|
5606
5606
|
if (sort.length > 0) {
|
|
5607
|
-
api.url += "&$orderby=" + order;
|
|
5607
|
+
api.url += "&$orderby=" + encodeURIComponent(order);
|
|
5608
5608
|
}
|
|
5609
5609
|
let filters = list_views[list_views_name].filters;
|
|
5610
5610
|
if (filters && filters.length > 0) {
|
|
5611
|
-
api.url = api.url + "&filters=" + JSON.stringify(filters);
|
|
5611
|
+
api.url = api.url + "&filters=" + encodeURIComponent(JSON.stringify(filters));
|
|
5612
5612
|
}
|
|
5613
5613
|
return api;
|
|
5614
5614
|
`;
|
|
@@ -7287,97 +7287,6 @@
|
|
|
7287
7287
|
async function getObjectRelatedListHeader(objectSchema, recordId, relatedObjectName) {
|
|
7288
7288
|
}
|
|
7289
7289
|
|
|
7290
|
-
const getExportExcelToolbarButtonSchema = ()=>{
|
|
7291
|
-
return {
|
|
7292
|
-
"type": "button",
|
|
7293
|
-
"icon": "fa fa-download",
|
|
7294
|
-
"align": "right",
|
|
7295
|
-
"className": "bg-white p-2 rounded border-gray-300 text-gray-500",
|
|
7296
|
-
"tooltipPlacement": "bottom",
|
|
7297
|
-
"visibleOn": "${!isLookup && global.user.is_space_admin}",
|
|
7298
|
-
"tooltip": instance.t('frontend_export_excel'),
|
|
7299
|
-
"onEvent": {
|
|
7300
|
-
"click": {
|
|
7301
|
-
"weight": 0,
|
|
7302
|
-
"actions": [
|
|
7303
|
-
{
|
|
7304
|
-
"args": {
|
|
7305
|
-
"api": {
|
|
7306
|
-
"url": "${context.rootUrl}/api/record/export/${objectName}",
|
|
7307
|
-
"method": "get",
|
|
7308
|
-
"messages": {},
|
|
7309
|
-
"requestAdaptor": `${requestAdaptor$1()}`,
|
|
7310
|
-
"data": {
|
|
7311
|
-
"uiSchema": "${uiSchema}",
|
|
7312
|
-
"listName": "${listName}"
|
|
7313
|
-
},
|
|
7314
|
-
"headers": {
|
|
7315
|
-
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
7316
|
-
}
|
|
7317
|
-
}
|
|
7318
|
-
},
|
|
7319
|
-
"actionType": "download"
|
|
7320
|
-
}
|
|
7321
|
-
]
|
|
7322
|
-
}
|
|
7323
|
-
}
|
|
7324
|
-
}
|
|
7325
|
-
};
|
|
7326
|
-
|
|
7327
|
-
function requestAdaptor$1(){
|
|
7328
|
-
return `
|
|
7329
|
-
// 获取列表视图的属性
|
|
7330
|
-
let uiSchema = api.body.uiSchema;
|
|
7331
|
-
let list_views = uiSchema.list_views;
|
|
7332
|
-
let list_views_name = api.body.listName;
|
|
7333
|
-
let col = list_views[list_views_name].columns;
|
|
7334
|
-
let sort_test = list_views[list_views_name].sort;
|
|
7335
|
-
|
|
7336
|
-
// 获取下载字段
|
|
7337
|
-
let select = [];
|
|
7338
|
-
_.each(col, (col) => {
|
|
7339
|
-
if (col.field == undefined)
|
|
7340
|
-
select.push(col);
|
|
7341
|
-
else select.push(col.field);
|
|
7342
|
-
});
|
|
7343
|
-
|
|
7344
|
-
// 获取排序字段
|
|
7345
|
-
|
|
7346
|
-
let sort = [];
|
|
7347
|
-
_.forEach(sort_test, (sortField) => {
|
|
7348
|
-
if (sortField.field_name == undefined)
|
|
7349
|
-
sort.push(sortField);
|
|
7350
|
-
else sort.push([sortField.field_name, sortField.order]);
|
|
7351
|
-
})
|
|
7352
|
-
|
|
7353
|
-
let orders = [];
|
|
7354
|
-
_.map(sort, (value) => {
|
|
7355
|
-
let order_tmp = [];
|
|
7356
|
-
if (value[1] == "desc")
|
|
7357
|
-
order_tmp = value[0] + ' desc';
|
|
7358
|
-
else
|
|
7359
|
-
order_tmp = value[0];
|
|
7360
|
-
orders.push(order_tmp);
|
|
7361
|
-
});
|
|
7362
|
-
let order = orders.join(',');
|
|
7363
|
-
|
|
7364
|
-
let filename = uiSchema.label + "-" + list_views[list_views_name].label;
|
|
7365
|
-
|
|
7366
|
-
url_tmp = api.url.split('?')[0];
|
|
7367
|
-
api.url = url_tmp + "?$select=" + select.toString() + "&filename=" + filename;
|
|
7368
|
-
|
|
7369
|
-
// 判断sort 和 filters
|
|
7370
|
-
if (sort.length > 0) {
|
|
7371
|
-
api.url += "&$orderby=" + order;
|
|
7372
|
-
}
|
|
7373
|
-
let filters = list_views[list_views_name].filters;
|
|
7374
|
-
if (filters && filters.length > 0) {
|
|
7375
|
-
api.url = api.url + "&filters=" + JSON.stringify(filters);
|
|
7376
|
-
}
|
|
7377
|
-
return api;
|
|
7378
|
-
`
|
|
7379
|
-
}
|
|
7380
|
-
|
|
7381
7290
|
const getNewListviewButtonSchema = ()=>{
|
|
7382
7291
|
return {
|
|
7383
7292
|
"type": "button",
|
|
@@ -8467,7 +8376,7 @@ else{
|
|
|
8467
8376
|
"tooltipPlacement": "bottom",
|
|
8468
8377
|
"className": "bg-white p-2 rounded border-gray-300 text-gray-500"
|
|
8469
8378
|
},
|
|
8470
|
-
getExportExcelToolbarButtonSchema(),
|
|
8379
|
+
// getExportExcelToolbarButtonSchema(),
|
|
8471
8380
|
filterVisible ? {
|
|
8472
8381
|
"label": "",
|
|
8473
8382
|
"icon": "fa fa-search",
|
|
@@ -10841,7 +10750,10 @@ else{
|
|
|
10841
10750
|
level: "link",
|
|
10842
10751
|
actionType: "link",
|
|
10843
10752
|
link: url,
|
|
10844
|
-
innerClassName:
|
|
10753
|
+
innerClassName: {
|
|
10754
|
+
"steedos-listview-item block text-gray-500":"true",
|
|
10755
|
+
"max-w-[360px]": "${display == 'split'}",
|
|
10756
|
+
},
|
|
10845
10757
|
body: {
|
|
10846
10758
|
"type": "wrapper",
|
|
10847
10759
|
"body": columnLines,
|
|
@@ -19085,7 +18997,7 @@ else{
|
|
|
19085
18997
|
"type": "wrapper",
|
|
19086
18998
|
"size": "none",
|
|
19087
18999
|
"className": {
|
|
19088
|
-
"p-0 flex-shrink-0
|
|
19000
|
+
"p-0 flex-shrink-0 w-[388px] border-r border-gray-300 bg-gray-100 shadow lg:order-first lg:flex lg:flex-col": "${display == 'split'}",
|
|
19089
19001
|
'h-full': "${display != 'split'}",
|
|
19090
19002
|
},
|
|
19091
19003
|
"body": {
|