@steedos-widgets/amis-lib 1.3.0-beta.3 → 1.3.0-beta.5
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 +27 -15
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +27 -15
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +17 -14
- package/dist/index.umd.js.map +1 -1
- package/dist/types/lib/converter/amis/toolbar.d.ts +4 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -2437,7 +2437,7 @@ const getSchema$2 = (uiSchema) => {
|
|
|
2437
2437
|
* @Author: baozhoutao@steedos.com
|
|
2438
2438
|
* @Date: 2022-11-07 17:00:38
|
|
2439
2439
|
* @LastEditors: baozhoutao@steedos.com
|
|
2440
|
-
* @LastEditTime:
|
|
2440
|
+
* @LastEditTime: 2023-08-24 16:44:42
|
|
2441
2441
|
* @Description:
|
|
2442
2442
|
*/
|
|
2443
2443
|
|
|
@@ -2457,7 +2457,7 @@ const getSchema$1 = (uiSchema)=>{
|
|
|
2457
2457
|
"componentId": "",
|
|
2458
2458
|
"args": {
|
|
2459
2459
|
"blank": false,
|
|
2460
|
-
"url": "/app/${app_id}/${objectName}/view/${_id}"
|
|
2460
|
+
"url": "/app/${app_id}/${objectName}/view/${_id}?side_object=${objectName}&side_listview_id=${listName}"
|
|
2461
2461
|
},
|
|
2462
2462
|
"actionType": "link"
|
|
2463
2463
|
}
|
|
@@ -4043,7 +4043,7 @@ async function getObjectRecordDetailHeader(objectSchema, recordId, options) {
|
|
|
4043
4043
|
"actions": [
|
|
4044
4044
|
{
|
|
4045
4045
|
"actionType": "custom",
|
|
4046
|
-
"script": "
|
|
4046
|
+
"script": "window.goBack()"
|
|
4047
4047
|
}
|
|
4048
4048
|
]
|
|
4049
4049
|
}
|
|
@@ -5245,7 +5245,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
5245
5245
|
|
|
5246
5246
|
function getObjectHeaderQuickSearchBox(mainObject, fields, formFactor, { isLookup = false, keywordsSearchBoxName = "__keywords" } = {}){
|
|
5247
5247
|
const searchableFieldsLabel = [];
|
|
5248
|
-
_.each(fields, function (field) {
|
|
5248
|
+
_.each(mainObject.fields, function (field) {
|
|
5249
5249
|
if (isFieldQuickSearchable(field, mainObject.NAME_FIELD_KEY)) {
|
|
5250
5250
|
searchableFieldsLabel.push(field.label);
|
|
5251
5251
|
}
|
|
@@ -5437,8 +5437,14 @@ function getObjectHeaderToolbar(mainObject, fields, formFactor, {
|
|
|
5437
5437
|
|
|
5438
5438
|
function getObjectFooterToolbar(mainObject, formFactor, options) {
|
|
5439
5439
|
if (formFactor === 'SMALL') {
|
|
5440
|
+
// return [
|
|
5441
|
+
// "load-more",
|
|
5442
|
+
// ]
|
|
5440
5443
|
return [
|
|
5441
|
-
|
|
5444
|
+
{
|
|
5445
|
+
"type": "pagination",
|
|
5446
|
+
"maxButtons": 5
|
|
5447
|
+
}
|
|
5442
5448
|
]
|
|
5443
5449
|
}
|
|
5444
5450
|
else {
|
|
@@ -5837,13 +5843,16 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
5837
5843
|
})){
|
|
5838
5844
|
i++;
|
|
5839
5845
|
tableFields.push(field);
|
|
5840
|
-
if(isFieldQuickSearchable(field, refObjectConfig.NAME_FIELD_KEY)){
|
|
5841
|
-
searchableFields.push(field.name);
|
|
5842
|
-
}
|
|
5843
5846
|
}
|
|
5844
5847
|
}
|
|
5845
5848
|
});
|
|
5846
5849
|
|
|
5850
|
+
_$1.each(refObjectConfig.fields, function (field) {
|
|
5851
|
+
if(isFieldQuickSearchable(field, refObjectConfig.NAME_FIELD_KEY)){
|
|
5852
|
+
searchableFields.push(field.name);
|
|
5853
|
+
}
|
|
5854
|
+
});
|
|
5855
|
+
|
|
5847
5856
|
const fields = {
|
|
5848
5857
|
[referenceTo.labelField.name]: referenceTo.labelField,
|
|
5849
5858
|
[referenceTo.valueField.name]: referenceTo.valueField
|
|
@@ -8050,7 +8059,7 @@ function getMobileLines(tpls){
|
|
|
8050
8059
|
lineChildrenClassName = "steedos-listview-item-left two-lines-truncate";
|
|
8051
8060
|
if(item.field.is_wide){
|
|
8052
8061
|
// 左侧全行样式可以单独写
|
|
8053
|
-
lineChildrenClassName = "steedos-listview-item-wide truncate";
|
|
8062
|
+
lineChildrenClassName = "steedos-listview-item-wide two-lines-truncate";
|
|
8054
8063
|
}
|
|
8055
8064
|
if(lines.length === 0){
|
|
8056
8065
|
// 第一个字段加粗黑色显示
|
|
@@ -8303,6 +8312,7 @@ async function getTableOperation(ctx){
|
|
|
8303
8312
|
|
|
8304
8313
|
async function getTableSchema$1(fields, options){
|
|
8305
8314
|
let isLookup = options && options.isLookup;
|
|
8315
|
+
let hiddenColumnOperation = options && options.hiddenColumnOperation;
|
|
8306
8316
|
if(!options){
|
|
8307
8317
|
options = {};
|
|
8308
8318
|
}
|
|
@@ -8312,7 +8322,7 @@ async function getTableSchema$1(fields, options){
|
|
|
8312
8322
|
}
|
|
8313
8323
|
else {
|
|
8314
8324
|
columns = await getTableColumns(fields, options);
|
|
8315
|
-
if(!isLookup){
|
|
8325
|
+
if(!isLookup && !hiddenColumnOperation){
|
|
8316
8326
|
columns.push(await getTableOperation(options));
|
|
8317
8327
|
}
|
|
8318
8328
|
}
|
|
@@ -8363,7 +8373,7 @@ async function getTableApi(mainObject, fields, options){
|
|
|
8363
8373
|
baseFilters = filter;
|
|
8364
8374
|
}
|
|
8365
8375
|
|
|
8366
|
-
_$1.each(fields, function (field) {
|
|
8376
|
+
_$1.each(mainObject.fields, function (field) {
|
|
8367
8377
|
if (isFieldQuickSearchable(field, mainObject.NAME_FIELD_KEY)) {
|
|
8368
8378
|
searchableFields.push(field.name);
|
|
8369
8379
|
}
|
|
@@ -8424,8 +8434,9 @@ async function getTableApi(mainObject, fields, options){
|
|
|
8424
8434
|
// 所以会把localSearchableFilter中已经存过的页码覆盖
|
|
8425
8435
|
// 如果是第一次加载组件始终让翻页页码从本地存储中取值
|
|
8426
8436
|
let formFactor = "${options.formFactor}";
|
|
8427
|
-
//
|
|
8428
|
-
|
|
8437
|
+
// api.data.pageNo = formFactor === "SMALL" ? 1 : (localListViewProps.page || 1);
|
|
8438
|
+
// 移动端暂时去除加载更多,放开翻页
|
|
8439
|
+
api.data.pageNo = localListViewProps.page || 1;
|
|
8429
8440
|
}
|
|
8430
8441
|
}
|
|
8431
8442
|
}
|
|
@@ -8625,7 +8636,8 @@ async function getTableApi(mainObject, fields, options){
|
|
|
8625
8636
|
// 如果是第一次加载组件始终让翻页页码从本地存储中取值
|
|
8626
8637
|
let formFactor = "${options.formFactor}";
|
|
8627
8638
|
// 移动端不识别本地存储中的翻页页码,否则点击加载更多按钮后无法刷新回第一页
|
|
8628
|
-
selfData.page = formFactor === "SMALL" ? 1 : (localListViewProps.page || 1);
|
|
8639
|
+
// selfData.page = formFactor === "SMALL" ? 1 : (localListViewProps.page || 1);
|
|
8640
|
+
selfData.page = localListViewProps.page || 1;
|
|
8629
8641
|
}
|
|
8630
8642
|
}
|
|
8631
8643
|
delete selfData.context;
|
|
@@ -10159,7 +10171,7 @@ async function getObjectDetail(objectSchema, recordId, ctx){
|
|
|
10159
10171
|
// "blank": false
|
|
10160
10172
|
// },
|
|
10161
10173
|
"actionType": "custom",
|
|
10162
|
-
"script": "
|
|
10174
|
+
"script": "window.goBack()",
|
|
10163
10175
|
"expression": "this.__deletedRecord === true"
|
|
10164
10176
|
}
|
|
10165
10177
|
]
|