@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.cjs.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.cjs.js
CHANGED
|
@@ -5602,15 +5602,15 @@ const getSchema$6 = async (uiSchema, ctx) => {
|
|
|
5602
5602
|
let filename = uiSchema.label + "-" + list_views[list_views_name].label;
|
|
5603
5603
|
|
|
5604
5604
|
url_tmp = api.url.split('?')[0];
|
|
5605
|
-
api.url = url_tmp + "?$select=" + select.toString() + "&filename=" + filename;
|
|
5605
|
+
api.url = url_tmp + "?$select=" + encodeURIComponent(select.toString()) + "&filename=" + encodeURIComponent(filename);
|
|
5606
5606
|
|
|
5607
5607
|
// 判断sort 和 filters
|
|
5608
5608
|
if (sort.length > 0) {
|
|
5609
|
-
api.url += "&$orderby=" + order;
|
|
5609
|
+
api.url += "&$orderby=" + encodeURIComponent(order);
|
|
5610
5610
|
}
|
|
5611
5611
|
let filters = list_views[list_views_name].filters;
|
|
5612
5612
|
if (filters && filters.length > 0) {
|
|
5613
|
-
api.url = api.url + "&filters=" + JSON.stringify(filters);
|
|
5613
|
+
api.url = api.url + "&filters=" + encodeURIComponent(JSON.stringify(filters));
|
|
5614
5614
|
}
|
|
5615
5615
|
return api;
|
|
5616
5616
|
`;
|
|
@@ -7289,97 +7289,6 @@ async function getObjectRecordDetailRelatedListHeader(relatedObjectSchema, relat
|
|
|
7289
7289
|
async function getObjectRelatedListHeader(objectSchema, recordId, relatedObjectName) {
|
|
7290
7290
|
}
|
|
7291
7291
|
|
|
7292
|
-
const getExportExcelToolbarButtonSchema = ()=>{
|
|
7293
|
-
return {
|
|
7294
|
-
"type": "button",
|
|
7295
|
-
"icon": "fa fa-download",
|
|
7296
|
-
"align": "right",
|
|
7297
|
-
"className": "bg-white p-2 rounded border-gray-300 text-gray-500",
|
|
7298
|
-
"tooltipPlacement": "bottom",
|
|
7299
|
-
"visibleOn": "${!isLookup && global.user.is_space_admin}",
|
|
7300
|
-
"tooltip": instance.t('frontend_export_excel'),
|
|
7301
|
-
"onEvent": {
|
|
7302
|
-
"click": {
|
|
7303
|
-
"weight": 0,
|
|
7304
|
-
"actions": [
|
|
7305
|
-
{
|
|
7306
|
-
"args": {
|
|
7307
|
-
"api": {
|
|
7308
|
-
"url": "${context.rootUrl}/api/record/export/${objectName}",
|
|
7309
|
-
"method": "get",
|
|
7310
|
-
"messages": {},
|
|
7311
|
-
"requestAdaptor": `${requestAdaptor$1()}`,
|
|
7312
|
-
"data": {
|
|
7313
|
-
"uiSchema": "${uiSchema}",
|
|
7314
|
-
"listName": "${listName}"
|
|
7315
|
-
},
|
|
7316
|
-
"headers": {
|
|
7317
|
-
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
7318
|
-
}
|
|
7319
|
-
}
|
|
7320
|
-
},
|
|
7321
|
-
"actionType": "download"
|
|
7322
|
-
}
|
|
7323
|
-
]
|
|
7324
|
-
}
|
|
7325
|
-
}
|
|
7326
|
-
}
|
|
7327
|
-
};
|
|
7328
|
-
|
|
7329
|
-
function requestAdaptor$1(){
|
|
7330
|
-
return `
|
|
7331
|
-
// 获取列表视图的属性
|
|
7332
|
-
let uiSchema = api.body.uiSchema;
|
|
7333
|
-
let list_views = uiSchema.list_views;
|
|
7334
|
-
let list_views_name = api.body.listName;
|
|
7335
|
-
let col = list_views[list_views_name].columns;
|
|
7336
|
-
let sort_test = list_views[list_views_name].sort;
|
|
7337
|
-
|
|
7338
|
-
// 获取下载字段
|
|
7339
|
-
let select = [];
|
|
7340
|
-
_.each(col, (col) => {
|
|
7341
|
-
if (col.field == undefined)
|
|
7342
|
-
select.push(col);
|
|
7343
|
-
else select.push(col.field);
|
|
7344
|
-
});
|
|
7345
|
-
|
|
7346
|
-
// 获取排序字段
|
|
7347
|
-
|
|
7348
|
-
let sort = [];
|
|
7349
|
-
_.forEach(sort_test, (sortField) => {
|
|
7350
|
-
if (sortField.field_name == undefined)
|
|
7351
|
-
sort.push(sortField);
|
|
7352
|
-
else sort.push([sortField.field_name, sortField.order]);
|
|
7353
|
-
})
|
|
7354
|
-
|
|
7355
|
-
let orders = [];
|
|
7356
|
-
_.map(sort, (value) => {
|
|
7357
|
-
let order_tmp = [];
|
|
7358
|
-
if (value[1] == "desc")
|
|
7359
|
-
order_tmp = value[0] + ' desc';
|
|
7360
|
-
else
|
|
7361
|
-
order_tmp = value[0];
|
|
7362
|
-
orders.push(order_tmp);
|
|
7363
|
-
});
|
|
7364
|
-
let order = orders.join(',');
|
|
7365
|
-
|
|
7366
|
-
let filename = uiSchema.label + "-" + list_views[list_views_name].label;
|
|
7367
|
-
|
|
7368
|
-
url_tmp = api.url.split('?')[0];
|
|
7369
|
-
api.url = url_tmp + "?$select=" + select.toString() + "&filename=" + filename;
|
|
7370
|
-
|
|
7371
|
-
// 判断sort 和 filters
|
|
7372
|
-
if (sort.length > 0) {
|
|
7373
|
-
api.url += "&$orderby=" + order;
|
|
7374
|
-
}
|
|
7375
|
-
let filters = list_views[list_views_name].filters;
|
|
7376
|
-
if (filters && filters.length > 0) {
|
|
7377
|
-
api.url = api.url + "&filters=" + JSON.stringify(filters);
|
|
7378
|
-
}
|
|
7379
|
-
return api;
|
|
7380
|
-
`
|
|
7381
|
-
}
|
|
7382
|
-
|
|
7383
7292
|
const getNewListviewButtonSchema = ()=>{
|
|
7384
7293
|
return {
|
|
7385
7294
|
"type": "button",
|
|
@@ -8469,7 +8378,7 @@ function getObjectHeaderToolbar(mainObject, formFactor, {showDisplayAs = false,
|
|
|
8469
8378
|
"tooltipPlacement": "bottom",
|
|
8470
8379
|
"className": "bg-white p-2 rounded border-gray-300 text-gray-500"
|
|
8471
8380
|
},
|
|
8472
|
-
getExportExcelToolbarButtonSchema(),
|
|
8381
|
+
// getExportExcelToolbarButtonSchema(),
|
|
8473
8382
|
filterVisible ? {
|
|
8474
8383
|
"label": "",
|
|
8475
8384
|
"icon": "fa fa-search",
|
|
@@ -10843,7 +10752,10 @@ async function getMobileTableColumns(fields, options){
|
|
|
10843
10752
|
level: "link",
|
|
10844
10753
|
actionType: "link",
|
|
10845
10754
|
link: url,
|
|
10846
|
-
innerClassName:
|
|
10755
|
+
innerClassName: {
|
|
10756
|
+
"steedos-listview-item block text-gray-500":"true",
|
|
10757
|
+
"max-w-[360px]": "${display == 'split'}",
|
|
10758
|
+
},
|
|
10847
10759
|
body: {
|
|
10848
10760
|
"type": "wrapper",
|
|
10849
10761
|
"body": columnLines,
|
|
@@ -19087,7 +18999,7 @@ var PageObject = function (props) { return __awaiter(void 0, void 0, void 0, fun
|
|
|
19087
18999
|
"type": "wrapper",
|
|
19088
19000
|
"size": "none",
|
|
19089
19001
|
"className": {
|
|
19090
|
-
"p-0 flex-shrink-0
|
|
19002
|
+
"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'}",
|
|
19091
19003
|
'h-full': "${display != 'split'}",
|
|
19092
19004
|
},
|
|
19093
19005
|
"body": {
|