@syncfusion/ej2-ribbon 26.1.38 → 26.1.41

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.
@@ -1813,7 +1813,9 @@ var RibbonButton = /** @__PURE__ @class */ (function () {
1813
1813
  if (item.buttonSettings.clicked) {
1814
1814
  item.buttonSettings.clicked.call(_this, e);
1815
1815
  }
1816
- overflowButton.toggle();
1816
+ if (overflowButton.element.classList.contains('e-active')) {
1817
+ overflowButton.toggle();
1818
+ }
1817
1819
  };
1818
1820
  };
1819
1821
  /**
@@ -1984,7 +1986,9 @@ var RibbonCheckBox = /** @__PURE__ @class */ (function () {
1984
1986
  if (item.checkBoxSettings.change) {
1985
1987
  item.checkBoxSettings.change.call(_this, e);
1986
1988
  }
1987
- overflowButton.toggle();
1989
+ if (overflowButton.element.classList.contains('e-active')) {
1990
+ overflowButton.toggle();
1991
+ }
1988
1992
  };
1989
1993
  };
1990
1994
  /**
@@ -2181,7 +2185,9 @@ var RibbonColorPicker = /** @__PURE__ @class */ (function () {
2181
2185
  };
2182
2186
  splitBtn.close = function () {
2183
2187
  if (target && !target.closest('.e-ribbon-group-overflow-ddb')) {
2184
- overflowButton.toggle();
2188
+ if (overflowButton.element.classList.contains('e-active')) {
2189
+ overflowButton.toggle();
2190
+ }
2185
2191
  }
2186
2192
  };
2187
2193
  };
@@ -2404,7 +2410,9 @@ var RibbonComboBox = /** @__PURE__ @class */ (function () {
2404
2410
  item.comboBoxSettings.close.call(_this, e);
2405
2411
  }
2406
2412
  if (target && !target.closest('.e-ribbon-group-overflow-ddb')) {
2407
- overflowButton.toggle();
2413
+ if (overflowButton.element.classList.contains('e-active')) {
2414
+ overflowButton.toggle();
2415
+ }
2408
2416
  }
2409
2417
  };
2410
2418
  };
@@ -2611,7 +2619,9 @@ var RibbonDropDown = /** @__PURE__ @class */ (function () {
2611
2619
  item.dropDownSettings.close.call(_this, e);
2612
2620
  }
2613
2621
  if (target && !target.closest('.e-ribbon-group-overflow-ddb')) {
2614
- overflowButton.toggle();
2622
+ if (overflowButton.element.classList.contains('e-active')) {
2623
+ overflowButton.toggle();
2624
+ }
2615
2625
  }
2616
2626
  };
2617
2627
  };
@@ -3099,7 +3109,9 @@ var RibbonSplitButton = /** @__PURE__ @class */ (function () {
3099
3109
  if (item.splitButtonSettings.click) {
3100
3110
  item.splitButtonSettings.click.call(_this, e);
3101
3111
  }
3102
- overflowButton.toggle();
3112
+ if (overflowButton.element.classList.contains('e-active')) {
3113
+ overflowButton.toggle();
3114
+ }
3103
3115
  };
3104
3116
  splitbutton.close = function (e) {
3105
3117
  if (item.splitButtonSettings.close) {
@@ -3107,7 +3119,9 @@ var RibbonSplitButton = /** @__PURE__ @class */ (function () {
3107
3119
  }
3108
3120
  splitbutton['wrapper'].classList.remove(RIBBON_POPUP_OPEN);
3109
3121
  if (target && !target.closest('.e-ribbon-group-overflow-ddb')) {
3110
- overflowButton.toggle();
3122
+ if (overflowButton.element.classList.contains('e-active')) {
3123
+ overflowButton.toggle();
3124
+ }
3111
3125
  }
3112
3126
  };
3113
3127
  };
@@ -4001,7 +4015,9 @@ var RibbonGroupButton = /** @__PURE__ @class */ (function () {
4001
4015
  targetEle.onclick = function () {
4002
4016
  if (_this.parent.activeLayout === 'Simplified' && targetEle.closest('.e-ribbon-dropdown-group-button').classList.contains(RIBBON_GROUP_BUTTON_OVERFLOW_POPUP)) {
4003
4017
  dropdown.toggle();
4004
- overflowButton.toggle();
4018
+ if (overflowButton.element.classList.contains('e-active')) {
4019
+ overflowButton.toggle();
4020
+ }
4005
4021
  }
4006
4022
  };
4007
4023
  };
@@ -5394,9 +5410,11 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
5394
5410
  }
5395
5411
  });
5396
5412
  };
5397
- Ribbon.prototype.toggleLayout = function () {
5413
+ Ribbon.prototype.toggleLayout = function (args) {
5398
5414
  this.setProperties({ activeLayout: this.activeLayout === 'Simplified' ? 'Classic' : 'Simplified' }, true);
5399
5415
  this.switchLayout();
5416
+ var eventArgs = { activeLayout: this.activeLayout, event: args };
5417
+ this.trigger('ribbonLayoutSwitched', eventArgs);
5400
5418
  };
5401
5419
  Ribbon.prototype.tabCreated = function () {
5402
5420
  if (!this.hideLayoutSwitcher) {
@@ -7158,10 +7176,10 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
7158
7176
  id: this.tabObj.element.id + COLLAPSE_BUTTON_ID,
7159
7177
  attrs: { 'tabindex': '0', 'type': 'button', 'aria-label': 'Layout Switcher', 'role': 'button' }
7160
7178
  });
7161
- this.collapseButton.onclick = function () { _this.toggleLayout(); };
7179
+ this.collapseButton.onclick = function (e) { _this.toggleLayout(e); };
7162
7180
  this.collapseButton.onkeydown = function (e) {
7163
7181
  if (e.key === 'Enter') {
7164
- _this.toggleLayout();
7182
+ _this.toggleLayout(e);
7165
7183
  }
7166
7184
  };
7167
7185
  this.element.classList.add(RIBBON_COLLAPSIBLE);
@@ -9814,6 +9832,9 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
9814
9832
  __decorate$l([
9815
9833
  Event()
9816
9834
  ], Ribbon.prototype, "ribbonCollapsing", void 0);
9835
+ __decorate$l([
9836
+ Event()
9837
+ ], Ribbon.prototype, "ribbonLayoutSwitched", void 0);
9817
9838
  __decorate$l([
9818
9839
  Event()
9819
9840
  ], Ribbon.prototype, "launcherIconClick", void 0);