@steedos-widgets/amis-object 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/amis-object.cjs.js +19 -9
- package/dist/amis-object.cjs.js.map +1 -1
- package/dist/amis-object.esm.js +19 -9
- package/dist/amis-object.esm.js.map +1 -1
- package/dist/amis-object.umd.js +19 -9
- package/dist/amis-object.umd.js.map +1 -1
- package/dist/assets.json +11 -11
- package/package.json +3 -3
package/dist/amis-object.cjs.js
CHANGED
|
@@ -2803,7 +2803,14 @@ const getObjectDetailHeaderButtons = (objectSchema, recordId)=>{
|
|
|
2803
2803
|
className: `button_${button.name}`
|
|
2804
2804
|
}
|
|
2805
2805
|
});
|
|
2806
|
-
let
|
|
2806
|
+
let moreButtonsVisibleOn = '';
|
|
2807
|
+
let dropdownButtons = ___default__default["default"].map(moreButtons, (button, index) => {
|
|
2808
|
+
if(index === 0){
|
|
2809
|
+
moreButtonsVisibleOn = getButtonVisibleOn$1(button);
|
|
2810
|
+
}else {
|
|
2811
|
+
moreButtonsVisibleOn = moreButtonsVisibleOn + ' || ' +getButtonVisibleOn$1(button);
|
|
2812
|
+
}
|
|
2813
|
+
|
|
2807
2814
|
return {
|
|
2808
2815
|
type: 'steedos-object-button',
|
|
2809
2816
|
name: button.name,
|
|
@@ -2813,12 +2820,13 @@ const getObjectDetailHeaderButtons = (objectSchema, recordId)=>{
|
|
|
2813
2820
|
});
|
|
2814
2821
|
return {
|
|
2815
2822
|
buttons: amisButtonsSchema,
|
|
2816
|
-
moreButtons: dropdownButtons
|
|
2823
|
+
moreButtons: dropdownButtons,
|
|
2824
|
+
moreButtonsVisibleOn
|
|
2817
2825
|
};
|
|
2818
2826
|
};
|
|
2819
2827
|
|
|
2820
2828
|
const getObjectDetailButtonsSchemas = (objectSchema, recordId, ctx)=>{
|
|
2821
|
-
const { buttons, moreButtons } = getObjectDetailHeaderButtons(objectSchema, recordId);
|
|
2829
|
+
const { buttons, moreButtons, moreButtonsVisibleOn } = getObjectDetailHeaderButtons(objectSchema, recordId);
|
|
2822
2830
|
if(ctx.formFactor === 'SMALL'){
|
|
2823
2831
|
return {
|
|
2824
2832
|
"type": "button",
|
|
@@ -2873,7 +2881,8 @@ const getObjectDetailButtonsSchemas = (objectSchema, recordId, ctx)=>{
|
|
|
2873
2881
|
type: "steedos-dropdown-button",
|
|
2874
2882
|
label: "",
|
|
2875
2883
|
buttons: moreButtons,
|
|
2876
|
-
className: 'slds-icon'
|
|
2884
|
+
className: 'slds-icon',
|
|
2885
|
+
visibleOn: moreButtonsVisibleOn
|
|
2877
2886
|
};
|
|
2878
2887
|
buttons.push(dropdownButtonsSchema);
|
|
2879
2888
|
}
|
|
@@ -7911,11 +7920,12 @@ async function getObjectDetail(objectSchema, recordId, ctx){
|
|
|
7911
7920
|
"expression": "this.__deletedRecord != true"
|
|
7912
7921
|
},
|
|
7913
7922
|
{
|
|
7914
|
-
"args": {
|
|
7915
|
-
|
|
7916
|
-
|
|
7917
|
-
},
|
|
7918
|
-
"actionType": "
|
|
7923
|
+
// "args": {
|
|
7924
|
+
// "url": "/app/${appId}/${objectName}/grid/${side_listview_id}",
|
|
7925
|
+
// "blank": false
|
|
7926
|
+
// },
|
|
7927
|
+
"actionType": "custom",
|
|
7928
|
+
"script": "Steedos.goBack()",
|
|
7919
7929
|
"expression": "this.__deletedRecord === true"
|
|
7920
7930
|
}
|
|
7921
7931
|
]
|