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