@steedos-widgets/amis-lib 1.2.11 → 1.2.12
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 +19 -9
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +19 -9
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +19 -9
- package/dist/index.umd.js.map +1 -1
- package/dist/types/lib/converter/amis/header.d.ts +5 -0
- package/dist/types/lib/converter/amis/index.d.ts +2 -5
- package/dist/types/lib/objects.d.ts +2 -5
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -2416,7 +2416,14 @@ const getObjectDetailHeaderButtons = (objectSchema, recordId)=>{
|
|
|
2416
2416
|
className: `button_${button.name}`
|
|
2417
2417
|
}
|
|
2418
2418
|
});
|
|
2419
|
-
let
|
|
2419
|
+
let moreButtonsVisibleOn = '';
|
|
2420
|
+
let dropdownButtons = ___default.map(moreButtons, (button, index) => {
|
|
2421
|
+
if(index === 0){
|
|
2422
|
+
moreButtonsVisibleOn = getButtonVisibleOn$1(button);
|
|
2423
|
+
}else {
|
|
2424
|
+
moreButtonsVisibleOn = moreButtonsVisibleOn + ' || ' +getButtonVisibleOn$1(button);
|
|
2425
|
+
}
|
|
2426
|
+
|
|
2420
2427
|
return {
|
|
2421
2428
|
type: 'steedos-object-button',
|
|
2422
2429
|
name: button.name,
|
|
@@ -2426,12 +2433,13 @@ const getObjectDetailHeaderButtons = (objectSchema, recordId)=>{
|
|
|
2426
2433
|
});
|
|
2427
2434
|
return {
|
|
2428
2435
|
buttons: amisButtonsSchema,
|
|
2429
|
-
moreButtons: dropdownButtons
|
|
2436
|
+
moreButtons: dropdownButtons,
|
|
2437
|
+
moreButtonsVisibleOn
|
|
2430
2438
|
};
|
|
2431
2439
|
};
|
|
2432
2440
|
|
|
2433
2441
|
const getObjectDetailButtonsSchemas = (objectSchema, recordId, ctx)=>{
|
|
2434
|
-
const { buttons, moreButtons } = getObjectDetailHeaderButtons(objectSchema, recordId);
|
|
2442
|
+
const { buttons, moreButtons, moreButtonsVisibleOn } = getObjectDetailHeaderButtons(objectSchema, recordId);
|
|
2435
2443
|
if(ctx.formFactor === 'SMALL'){
|
|
2436
2444
|
return {
|
|
2437
2445
|
"type": "button",
|
|
@@ -2486,7 +2494,8 @@ const getObjectDetailButtonsSchemas = (objectSchema, recordId, ctx)=>{
|
|
|
2486
2494
|
type: "steedos-dropdown-button",
|
|
2487
2495
|
label: "",
|
|
2488
2496
|
buttons: moreButtons,
|
|
2489
|
-
className: 'slds-icon'
|
|
2497
|
+
className: 'slds-icon',
|
|
2498
|
+
visibleOn: moreButtonsVisibleOn
|
|
2490
2499
|
};
|
|
2491
2500
|
buttons.push(dropdownButtonsSchema);
|
|
2492
2501
|
}
|
|
@@ -7524,11 +7533,12 @@ async function getObjectDetail(objectSchema, recordId, ctx){
|
|
|
7524
7533
|
"expression": "this.__deletedRecord != true"
|
|
7525
7534
|
},
|
|
7526
7535
|
{
|
|
7527
|
-
"args": {
|
|
7528
|
-
|
|
7529
|
-
|
|
7530
|
-
},
|
|
7531
|
-
"actionType": "
|
|
7536
|
+
// "args": {
|
|
7537
|
+
// "url": "/app/${appId}/${objectName}/grid/${side_listview_id}",
|
|
7538
|
+
// "blank": false
|
|
7539
|
+
// },
|
|
7540
|
+
"actionType": "custom",
|
|
7541
|
+
"script": "Steedos.goBack()",
|
|
7532
7542
|
"expression": "this.__deletedRecord === true"
|
|
7533
7543
|
}
|
|
7534
7544
|
]
|