@steedos-widgets/amis-lib 6.3.16 → 6.3.17-beta.2
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 +29 -44
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +29 -44
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +25 -7
- package/dist/index.umd.js.map +1 -1
- package/dist/types/lib/converter/amis/header.d.ts +0 -2
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1855,7 +1855,7 @@ async function getQuickEditSchema(object, columnField, options){
|
|
|
1855
1855
|
isAmisVersionforBatchEdit = window.Amis.version[0] >= 3 && window.Amis.version[2] >= 2;
|
|
1856
1856
|
}
|
|
1857
1857
|
const quickEditId = options.objectName + "_" + field.name + "_quickEdit";//定义快速编辑的表单id,用于setvalue传值
|
|
1858
|
-
var quickEditSchema = { body: [], id: quickEditId, className: "steedos-table-quickEdit" };
|
|
1858
|
+
var quickEditSchema = { body: [], id: quickEditId, className: "steedos-table-quickEdit", "debug": window.amis_form_debug || false, quickedit_record_permissions_loading: true };
|
|
1859
1859
|
//select,avatar,image,file等组件无法行记录字段赋值,暂不支持批量编辑;
|
|
1860
1860
|
if(field.type != 'avatar' && field.type != 'image' && field.type != 'file' && isAmisVersionforBatchEdit){
|
|
1861
1861
|
const submitEvent = {
|
|
@@ -2111,15 +2111,6 @@ async function getQuickEditSchema(object, columnField, options){
|
|
|
2111
2111
|
});
|
|
2112
2112
|
`
|
|
2113
2113
|
},
|
|
2114
|
-
{
|
|
2115
|
-
"actionType": "setValue",
|
|
2116
|
-
"componentId": quickEditId,
|
|
2117
|
-
"args": {
|
|
2118
|
-
"value":{
|
|
2119
|
-
"quickedit_record_permissions_loading": true
|
|
2120
|
-
}
|
|
2121
|
-
}
|
|
2122
|
-
},
|
|
2123
2114
|
{
|
|
2124
2115
|
"actionType": "ajax",
|
|
2125
2116
|
"args": {
|
|
@@ -2142,15 +2133,7 @@ async function getQuickEditSchema(object, columnField, options){
|
|
|
2142
2133
|
"componentId": quickEditId,
|
|
2143
2134
|
"args": {
|
|
2144
2135
|
"value":{
|
|
2145
|
-
"quickedit_record_permissions_loading": false
|
|
2146
|
-
}
|
|
2147
|
-
}
|
|
2148
|
-
},
|
|
2149
|
-
{
|
|
2150
|
-
"actionType": "setValue",
|
|
2151
|
-
"componentId": quickEditId,
|
|
2152
|
-
"args": {
|
|
2153
|
-
"value":{
|
|
2136
|
+
"quickedit_record_permissions_loading": false,
|
|
2154
2137
|
"quickedit_record_permissions": "${recordPermissions.modifyAllRecords ? {'allowEdit': true} : event.data}"
|
|
2155
2138
|
}
|
|
2156
2139
|
}
|
|
@@ -2667,7 +2650,7 @@ function getMobileLines(tpls){
|
|
|
2667
2650
|
}
|
|
2668
2651
|
if(isLeft){
|
|
2669
2652
|
// 左侧半行
|
|
2670
|
-
lineChildrenClassName = "steedos-listview-item-left
|
|
2653
|
+
lineChildrenClassName = "steedos-listview-item-left";
|
|
2671
2654
|
if(item.field.is_wide){
|
|
2672
2655
|
// 左侧全行样式可以单独写,如果需要配置两行省略号效果,可以加样式类 two-lines-truncate
|
|
2673
2656
|
lineChildrenClassName = "steedos-listview-item-wide";
|
|
@@ -2679,7 +2662,7 @@ function getMobileLines(tpls){
|
|
|
2679
2662
|
}
|
|
2680
2663
|
else {
|
|
2681
2664
|
// 右侧半行,这里加样式类 flex flex-shrink-0,是为了省略号只显示在左半行,右半行文字一般比较短,如果也加省略号效果的话,左侧文字多的话,右侧没几个字就显示省略号了
|
|
2682
|
-
lineChildrenClassName = "steedos-listview-item-right
|
|
2665
|
+
lineChildrenClassName = "steedos-listview-item-right ml-2 flex flex-shrink-0";
|
|
2683
2666
|
}
|
|
2684
2667
|
//支持字段amis属性配置classname,识别classname的类型,与原样式合并
|
|
2685
2668
|
var className;
|
|
@@ -2769,7 +2752,6 @@ async function getMobileTableColumns(fields, options){
|
|
|
2769
2752
|
link: url,
|
|
2770
2753
|
innerClassName: {
|
|
2771
2754
|
"steedos-listview-item block text-gray-500":"true",
|
|
2772
|
-
"max-w-[360px]": "${display == 'split'}",
|
|
2773
2755
|
},
|
|
2774
2756
|
body: {
|
|
2775
2757
|
"type": "wrapper",
|
|
@@ -7522,30 +7504,29 @@ function getObjectListHeaderFirstLine(objectSchema, listViewName, ctx) {
|
|
|
7522
7504
|
let amisButtonsSchema = getObjectListViewButtonsSchemas(objectSchema, {formFactor: ctx.formFactor});
|
|
7523
7505
|
const reg = new RegExp('_', 'g');
|
|
7524
7506
|
const standardIcon = icon && icon.replace(reg, '-');
|
|
7525
|
-
|
|
7507
|
+
_.find(amisButtonsSchema, { name: "standard_new" });
|
|
7526
7508
|
const buttonSchema = [{
|
|
7527
7509
|
"type": "flex",
|
|
7528
7510
|
"items": amisButtonsSchema,
|
|
7529
|
-
"visibleOn": "${display == 'split'?false:true}"
|
|
7530
7511
|
}];
|
|
7531
|
-
if(ctx.formFactor !== 'SMALL'){
|
|
7532
|
-
|
|
7533
|
-
|
|
7534
|
-
|
|
7535
|
-
|
|
7536
|
-
|
|
7537
|
-
|
|
7538
|
-
|
|
7539
|
-
|
|
7540
|
-
|
|
7541
|
-
|
|
7542
|
-
|
|
7543
|
-
|
|
7544
|
-
|
|
7545
|
-
|
|
7546
|
-
|
|
7547
|
-
|
|
7548
|
-
}
|
|
7512
|
+
// if(ctx.formFactor !== 'SMALL'){
|
|
7513
|
+
// const restButtons = Array.isArray(amisButtonsSchema) ? amisButtonsSchema.filter(obj => obj.name !== "standard_new"):[]
|
|
7514
|
+
// buttonSchema.push({
|
|
7515
|
+
// "type": "flex",
|
|
7516
|
+
// "items":[
|
|
7517
|
+
// standardNewButton,
|
|
7518
|
+
// (restButtons.length > 0) && {
|
|
7519
|
+
// "type": "dropdown-button",
|
|
7520
|
+
// "buttons": restButtons,
|
|
7521
|
+
// "className": " ml-1",
|
|
7522
|
+
// "menuClassName": "p-none split-dropdown-buttons",
|
|
7523
|
+
// "align": "right",
|
|
7524
|
+
// "size": "sm"
|
|
7525
|
+
// }
|
|
7526
|
+
// ],
|
|
7527
|
+
// "visibleOn": "${display == 'split'?true:false}"
|
|
7528
|
+
// })
|
|
7529
|
+
// }
|
|
7549
7530
|
const listviewNewButton = getNewListviewButtonSchema();
|
|
7550
7531
|
listviewNewButton.visibleOn = "global.user.is_space_admin";
|
|
7551
7532
|
return {
|
|
@@ -9292,7 +9273,9 @@ function getObjectHeaderToolbar(mainObject, fields, formFactor, {
|
|
|
9292
9273
|
toolbars.push(toolbarFilter);
|
|
9293
9274
|
}
|
|
9294
9275
|
toolbars.push(toolbarReloadButton);
|
|
9295
|
-
|
|
9276
|
+
if (showDisplayAs) {
|
|
9277
|
+
toolbars.push(toolbarDisplayAsButton);
|
|
9278
|
+
}
|
|
9296
9279
|
toolbars.push(toolbarDQuickSearchBox);
|
|
9297
9280
|
return [
|
|
9298
9281
|
// "bulkActions",
|
|
@@ -9307,7 +9290,9 @@ function getObjectHeaderToolbar(mainObject, fields, formFactor, {
|
|
|
9307
9290
|
toolbars.push(toolbarFilter);
|
|
9308
9291
|
}
|
|
9309
9292
|
toolbars.push(toolbarReloadButton);
|
|
9310
|
-
|
|
9293
|
+
if (showDisplayAs) {
|
|
9294
|
+
toolbars.push(toolbarDisplayAsButton);
|
|
9295
|
+
}
|
|
9311
9296
|
if(mainObject?.permissions?.allowCreateListViews){
|
|
9312
9297
|
toolbars.push(getSettingListviewToolbarButtonSchema());
|
|
9313
9298
|
}
|