@syncfusion/ej2-ribbon 23.2.7 → 24.1.44

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.
Files changed (82) hide show
  1. package/CHANGELOG.md +20 -2
  2. package/README.md +1 -1
  3. package/dist/ej2-ribbon.umd.min.js +2 -2
  4. package/dist/ej2-ribbon.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-ribbon.es2015.js +541 -57
  6. package/dist/es6/ej2-ribbon.es2015.js.map +1 -1
  7. package/dist/es6/ej2-ribbon.es5.js +561 -72
  8. package/dist/es6/ej2-ribbon.es5.js.map +1 -1
  9. package/dist/global/ej2-ribbon.min.js +2 -2
  10. package/dist/global/ej2-ribbon.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +13 -13
  13. package/src/ribbon/base/ribbon.d.ts +10 -0
  14. package/src/ribbon/base/ribbon.js +444 -53
  15. package/src/ribbon/items/ribbon-colorpicker.js +16 -0
  16. package/src/ribbon/items/ribbon-combobox.js +16 -0
  17. package/src/ribbon/items/ribbon-dropdown.js +5 -3
  18. package/src/ribbon/items/ribbon-groupbutton.d.ts +4 -1
  19. package/src/ribbon/items/ribbon-groupbutton.js +64 -15
  20. package/src/ribbon/models/ribbon-colorpicker-settings-model.d.ts +8 -1
  21. package/src/ribbon/models/ribbon-colorpicker-settings.d.ts +7 -1
  22. package/src/ribbon/models/ribbon-colorpicker-settings.js +4 -1
  23. package/src/ribbon/models/ribbon-combobox-settings-model.d.ts +7 -0
  24. package/src/ribbon/models/ribbon-combobox-settings.d.ts +6 -0
  25. package/src/ribbon/models/ribbon-combobox-settings.js +3 -0
  26. package/src/ribbon/models/ribbon-group-button-settings-model.d.ts +7 -0
  27. package/src/ribbon/models/ribbon-group-button-settings.d.ts +6 -0
  28. package/src/ribbon/models/ribbon-group-button-settings.js +3 -0
  29. package/src/ribbon/models/ribbon-group-model.d.ts +7 -0
  30. package/src/ribbon/models/ribbon-group.d.ts +6 -0
  31. package/src/ribbon/models/ribbon-group.js +3 -0
  32. package/src/ribbon/modules/ribbon-backstage.js +3 -0
  33. package/styles/bootstrap-dark.css +105 -26
  34. package/styles/bootstrap.css +104 -25
  35. package/styles/bootstrap4.css +104 -25
  36. package/styles/bootstrap5-dark.css +105 -26
  37. package/styles/bootstrap5.css +104 -25
  38. package/styles/fabric-dark.css +103 -24
  39. package/styles/fabric.css +104 -25
  40. package/styles/fluent-dark.css +104 -25
  41. package/styles/fluent.css +104 -25
  42. package/styles/highcontrast-light.css +103 -24
  43. package/styles/highcontrast.css +103 -24
  44. package/styles/material-dark.css +105 -26
  45. package/styles/material.css +105 -26
  46. package/styles/material3-dark.css +105 -26
  47. package/styles/material3.css +105 -26
  48. package/styles/ribbon/_bootstrap-dark-definition.scss +8 -0
  49. package/styles/ribbon/_bootstrap-definition.scss +8 -0
  50. package/styles/ribbon/_bootstrap4-definition.scss +8 -0
  51. package/styles/ribbon/_bootstrap5-definition.scss +8 -0
  52. package/styles/ribbon/_fabric-dark-definition.scss +8 -0
  53. package/styles/ribbon/_fabric-definition.scss +8 -0
  54. package/styles/ribbon/_fluent-definition.scss +8 -0
  55. package/styles/ribbon/_fusionnew-definition.scss +8 -0
  56. package/styles/ribbon/_highcontrast-definition.scss +8 -0
  57. package/styles/ribbon/_highcontrast-light-definition.scss +8 -0
  58. package/styles/ribbon/_layout.scss +69 -5
  59. package/styles/ribbon/_material-dark-definition.scss +9 -1
  60. package/styles/ribbon/_material-definition.scss +9 -1
  61. package/styles/ribbon/_material3-definition.scss +8 -2
  62. package/styles/ribbon/_tailwind-definition.scss +8 -0
  63. package/styles/ribbon/_theme.scss +34 -13
  64. package/styles/ribbon/bootstrap-dark.css +105 -26
  65. package/styles/ribbon/bootstrap.css +104 -25
  66. package/styles/ribbon/bootstrap4.css +104 -25
  67. package/styles/ribbon/bootstrap5-dark.css +105 -26
  68. package/styles/ribbon/bootstrap5.css +104 -25
  69. package/styles/ribbon/fabric-dark.css +103 -24
  70. package/styles/ribbon/fabric.css +104 -25
  71. package/styles/ribbon/fluent-dark.css +104 -25
  72. package/styles/ribbon/fluent.css +104 -25
  73. package/styles/ribbon/highcontrast-light.css +103 -24
  74. package/styles/ribbon/highcontrast.css +103 -24
  75. package/styles/ribbon/material-dark.css +105 -26
  76. package/styles/ribbon/material.css +105 -26
  77. package/styles/ribbon/material3-dark.css +105 -26
  78. package/styles/ribbon/material3.css +105 -26
  79. package/styles/ribbon/tailwind-dark.css +104 -25
  80. package/styles/ribbon/tailwind.css +104 -25
  81. package/styles/tailwind-dark.css +104 -25
  82. package/styles/tailwind.css +104 -25
@@ -296,11 +296,14 @@ var RibbonColorPickerSettings = /** @__PURE__ @class */ (function (_super) {
296
296
  __decorate$7([
297
297
  Property('')
298
298
  ], RibbonColorPickerSettings.prototype, "cssClass", void 0);
299
+ __decorate$7([
300
+ Property('')
301
+ ], RibbonColorPickerSettings.prototype, "label", void 0);
299
302
  __decorate$7([
300
303
  Property(true)
301
304
  ], RibbonColorPickerSettings.prototype, "enableOpacity", void 0);
302
305
  __decorate$7([
303
- Property('Picker')
306
+ Property('Palette')
304
307
  ], RibbonColorPickerSettings.prototype, "mode", void 0);
305
308
  __decorate$7([
306
309
  Property(true)
@@ -389,6 +392,9 @@ var RibbonComboBoxSettings = /** @__PURE__ @class */ (function (_super) {
389
392
  __decorate$8([
390
393
  Property('')
391
394
  ], RibbonComboBoxSettings.prototype, "cssClass", void 0);
395
+ __decorate$8([
396
+ Property('')
397
+ ], RibbonComboBoxSettings.prototype, "label", void 0);
392
398
  __decorate$8([
393
399
  Property([])
394
400
  ], RibbonComboBoxSettings.prototype, "dataSource", void 0);
@@ -758,6 +764,9 @@ var RibbonGroupButtonSettings = /** @__PURE__ @class */ (function (_super) {
758
764
  function RibbonGroupButtonSettings() {
759
765
  return _super !== null && _super.apply(this, arguments) || this;
760
766
  }
767
+ __decorate$12([
768
+ Property('')
769
+ ], RibbonGroupButtonSettings.prototype, "header", void 0);
761
770
  __decorate$12([
762
771
  Property('Single')
763
772
  ], RibbonGroupButtonSettings.prototype, "selection", void 0);
@@ -965,6 +974,9 @@ var RibbonGroup = /** @__PURE__ @class */ (function (_super) {
965
974
  __decorate$2([
966
975
  Property('Column')
967
976
  ], RibbonGroup.prototype, "orientation", void 0);
977
+ __decorate$2([
978
+ Property('')
979
+ ], RibbonGroup.prototype, "overflowHeader", void 0);
968
980
  __decorate$2([
969
981
  Property(0)
970
982
  ], RibbonGroup.prototype, "priority", void 0);
@@ -1833,6 +1845,15 @@ var RibbonColorPicker = /** @__PURE__ @class */ (function () {
1833
1845
  */
1834
1846
  RibbonColorPicker.prototype.addOverFlowEvents = function (item, itemEle, overflowButton) {
1835
1847
  var _this = this;
1848
+ var colorPickerSettings = item.colorPickerSettings;
1849
+ if (colorPickerSettings.label && this.parent.activeLayout === 'Simplified') {
1850
+ var label = this.parent.createElement('div', {
1851
+ className: 'e-ribbon-colorpicker-label',
1852
+ id: item.id + '_label',
1853
+ innerHTML: colorPickerSettings.label
1854
+ });
1855
+ itemEle.insertBefore(label, itemEle.firstChild);
1856
+ }
1836
1857
  var colorPickerEle = itemEle.querySelector('#' + item.id);
1837
1858
  colorPickerEle.setAttribute('data-control', item.type.toString());
1838
1859
  var colorPickerObj = getComponent(colorPickerEle, ColorPicker);
@@ -1863,6 +1884,13 @@ var RibbonColorPicker = /** @__PURE__ @class */ (function () {
1863
1884
  */
1864
1885
  RibbonColorPicker.prototype.removeOverFlowEvents = function (item, itemEle) {
1865
1886
  var _this = this;
1887
+ var colorPickerSettings = item.colorPickerSettings;
1888
+ if (colorPickerSettings.label) {
1889
+ var label = itemEle.querySelector('#' + item.id + '_label');
1890
+ if (label) {
1891
+ label.remove();
1892
+ }
1893
+ }
1866
1894
  var colorPickerEle = itemEle.querySelector('#' + item.id);
1867
1895
  var colorPickerObj = getComponent(colorPickerEle, ColorPicker);
1868
1896
  var cssClass = colorPickerObj.cssClass.split(SPACE);
@@ -2028,6 +2056,15 @@ var RibbonComboBox = /** @__PURE__ @class */ (function () {
2028
2056
  */
2029
2057
  RibbonComboBox.prototype.addOverFlowEvents = function (item, itemEle, overflowButton) {
2030
2058
  var _this = this;
2059
+ var comboBoxSettings = item.comboBoxSettings;
2060
+ if (comboBoxSettings.label && this.parent.activeLayout === 'Simplified') {
2061
+ var label = this.parent.createElement('div', {
2062
+ className: 'e-ribbon-combobox-label',
2063
+ id: item.id + '_label',
2064
+ innerHTML: comboBoxSettings.label
2065
+ });
2066
+ itemEle.insertBefore(label, itemEle.firstChild);
2067
+ }
2031
2068
  var inputEle = itemEle.querySelector('#' + item.id);
2032
2069
  inputEle.setAttribute('data-control', item.type.toString());
2033
2070
  var comboBoxObj = getComponent(inputEle, ComboBox);
@@ -2052,6 +2089,13 @@ var RibbonComboBox = /** @__PURE__ @class */ (function () {
2052
2089
  */
2053
2090
  RibbonComboBox.prototype.removeOverFlowEvents = function (item, itemEle) {
2054
2091
  var _this = this;
2092
+ var comboBoxSettings = item.comboBoxSettings;
2093
+ if (comboBoxSettings.label) {
2094
+ var label = itemEle.querySelector('#' + item.id + '_label');
2095
+ if (label) {
2096
+ label.remove();
2097
+ }
2098
+ }
2055
2099
  var inputEle = itemEle.querySelector('#' + item.id);
2056
2100
  var comboBoxObj = getComponent(inputEle, ComboBox);
2057
2101
  var cssClass = comboBoxObj.cssClass.split(SPACE);
@@ -2293,7 +2337,9 @@ var RibbonDropDown = /** @__PURE__ @class */ (function () {
2293
2337
  return dropdown;
2294
2338
  };
2295
2339
  RibbonDropDown.prototype.keyActionHandler = function (e, target) {
2296
- var items = target.querySelectorAll('.e-control');
2340
+ var controlElements = Array.prototype.slice.call(target.querySelectorAll('.e-control'));
2341
+ var templateElements = Array.prototype.slice.call(target.querySelectorAll('.e-ribbon-template'));
2342
+ var items = controlElements.concat(templateElements);
2297
2343
  var comboBoxElements = target.querySelectorAll('.e-combobox');
2298
2344
  var comboBoxEle;
2299
2345
  if (comboBoxElements) {
@@ -2312,7 +2358,7 @@ var RibbonDropDown = /** @__PURE__ @class */ (function () {
2312
2358
  }
2313
2359
  }
2314
2360
  }
2315
- if (e.target.classList.contains('e-control') || e.target.classList.contains('e-ribbon-launcher-icon') ||
2361
+ if (e.target.classList.contains('e-control') || e.target.classList.contains('e-ribbon-template') || e.target.classList.contains('e-ribbon-launcher-icon') ||
2316
2362
  e.target.classList.contains('e-ribbon-last-item') || e.target.classList.contains('e-ribbon-first-item')) {
2317
2363
  if (e.key === 'ArrowRight' || (!e.shiftKey && e.key === 'Tab')) {
2318
2364
  this.handleNavigation(e, !this.enableRtl, items);
@@ -2335,7 +2381,7 @@ var RibbonDropDown = /** @__PURE__ @class */ (function () {
2335
2381
  }
2336
2382
  if (!e.target.classList.contains('e-combobox') && !e.target.classList.contains('e-ribbon-last-item') &&
2337
2383
  !e.target.classList.contains('e-ribbon-group-container') && (e.target.classList.contains('e-ribbon-first-item')
2338
- || this.itemIndex !== 0) && e.target.classList.contains('e-control')) {
2384
+ || this.itemIndex !== 0) && (e.target.classList.contains('e-control') || e.target.classList.contains('e-ribbon-template'))) {
2339
2385
  this.itemIndex++;
2340
2386
  this.updateItemIndex(e, items, true);
2341
2387
  }
@@ -3275,18 +3321,19 @@ var RibbonGroupButton = /** @__PURE__ @class */ (function () {
3275
3321
  }
3276
3322
  count++;
3277
3323
  }
3278
- new DropDownButton({
3324
+ var dropdown = new DropDownButton({
3279
3325
  iconCss: dropdownIcon,
3280
3326
  target: btnContainerEle,
3281
3327
  enableRtl: this.parent.enableRtl,
3282
3328
  cssClass: 'e-ribbon-dropdown-group-button',
3283
3329
  disabled: item.disabled
3284
3330
  }, buttonEle);
3331
+ if (groupBtnSettings.header) {
3332
+ var dropDownPopup = dropdown.dropDown;
3333
+ this.addGroupButtonHeader(item.id, groupBtnSettings, dropDownPopup.element);
3334
+ }
3285
3335
  buttonEle.onclick = buttonEle.onkeydown = function () {
3286
- if (itemElement.querySelector('#' + item.id).classList.contains('e-active')) {
3287
- document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + 0).focus();
3288
- _this.grpBtnIndex = 0;
3289
- }
3336
+ _this.handleFocusState(item, itemElement);
3290
3337
  };
3291
3338
  btnContainerEle.onkeydown = function (e) {
3292
3339
  if (_this.parent.activeLayout === 'Simplified') {
@@ -3298,7 +3345,9 @@ var RibbonGroupButton = /** @__PURE__ @class */ (function () {
3298
3345
  }
3299
3346
  };
3300
3347
  RibbonGroupButton.prototype.groupButtonClicked = function (itemIndex, item, grpBtnSettings) {
3301
- var previousItems = [], selectingItems = [], selectedItems = [];
3348
+ var previousItems = [];
3349
+ var selectingItems = [];
3350
+ var selectedItems = [];
3302
3351
  var groupButtonEle;
3303
3352
  var dropdown;
3304
3353
  for (var j = 0; j < grpBtnSettings.items.length; j++) {
@@ -3329,9 +3378,11 @@ var RibbonGroupButton = /** @__PURE__ @class */ (function () {
3329
3378
  for (var j = 0; j < grpBtnSettings.items.length; j++) {
3330
3379
  if (document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + j) && document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + j).classList.contains('e-active')) {
3331
3380
  document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + j).classList.remove('e-active');
3381
+ grpBtnSettings.items[parseInt(j.toString(), 10)].selected = false;
3332
3382
  }
3333
3383
  }
3334
3384
  document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + itemIndex).classList.toggle('e-active');
3385
+ grpBtnSettings.items[parseInt(itemIndex.toString(), 10)].selected = true;
3335
3386
  if (document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + itemIndex).classList.contains('e-active') && this.parent.activeLayout === 'Simplified') {
3336
3387
  this.grpBtnIndex = itemIndex;
3337
3388
  groupButtonEle = document.querySelector('#' + item.id);
@@ -3347,6 +3398,12 @@ var RibbonGroupButton = /** @__PURE__ @class */ (function () {
3347
3398
  document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID).classList.add(RIBBON_MULTIPLE_BUTTON_SELECTION);
3348
3399
  }
3349
3400
  document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + itemIndex).classList.toggle('e-active');
3401
+ if (document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + itemIndex).classList.contains('e-active')) {
3402
+ grpBtnSettings.items[parseInt(itemIndex.toString(), 10)].selected = true;
3403
+ }
3404
+ else {
3405
+ grpBtnSettings.items[parseInt(itemIndex.toString(), 10)].selected = false;
3406
+ }
3350
3407
  var activeEleCount = 0;
3351
3408
  for (var n = 0; n < grpBtnSettings.items.length; n++) {
3352
3409
  if (document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + n) && document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + n).classList.contains('e-active') && this.parent.activeLayout === 'Simplified' && n !== itemIndex) {
@@ -3435,18 +3492,19 @@ var RibbonGroupButton = /** @__PURE__ @class */ (function () {
3435
3492
  }
3436
3493
  itemsCount++;
3437
3494
  }
3438
- new DropDownButton({
3495
+ var dropdown = new DropDownButton({
3439
3496
  iconCss: dropdownIcon,
3440
3497
  target: containerEle,
3441
3498
  enableRtl: this.parent.enableRtl,
3442
3499
  cssClass: 'e-ribbon-dropdown-group-button',
3443
3500
  disabled: item.disabled
3444
3501
  }, buttonEle);
3502
+ if (groupBtnSettings.header) {
3503
+ var dropDownPopup = dropdown.dropDown;
3504
+ this.addGroupButtonHeader(item.id, groupBtnSettings, dropDownPopup.element);
3505
+ }
3445
3506
  buttonEle.onclick = buttonEle.onkeydown = function () {
3446
- if (itemElement.querySelector('#' + item.id).classList.contains('e-active')) {
3447
- document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + 0).focus();
3448
- _this.grpBtnIndex = 0;
3449
- }
3507
+ _this.handleFocusState(item, itemElement);
3450
3508
  };
3451
3509
  containerEle.onkeydown = function (e) {
3452
3510
  if (_this.parent.activeLayout === 'Simplified') {
@@ -3465,6 +3523,26 @@ var RibbonGroupButton = /** @__PURE__ @class */ (function () {
3465
3523
  }
3466
3524
  }
3467
3525
  };
3526
+ RibbonGroupButton.prototype.handleFocusState = function (item, itemElement) {
3527
+ if (itemElement.querySelector('#' + item.id).classList.contains('e-active')) {
3528
+ var defaultSelectedBtn = document.querySelector('#' + item.id + '_grpbtn').querySelector('.' + RIBBON_GROUP_BUTTON + '.e-active');
3529
+ if (defaultSelectedBtn) {
3530
+ defaultSelectedBtn.focus();
3531
+ }
3532
+ else {
3533
+ document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + 0).focus();
3534
+ }
3535
+ this.grpBtnIndex = 0;
3536
+ }
3537
+ };
3538
+ RibbonGroupButton.prototype.addGroupButtonHeader = function (itemID, groupBtnSettings, popupEle) {
3539
+ var groupButtonHeader = this.parent.createElement('div', {
3540
+ className: 'e-ribbon-groupbutton-header',
3541
+ id: itemID + HEADER_ID,
3542
+ innerHTML: groupBtnSettings.header
3543
+ });
3544
+ popupEle.insertBefore(groupButtonHeader, popupEle.firstChild);
3545
+ };
3468
3546
  RibbonGroupButton.prototype.handleGroupButtonNavigation = function (e, item) {
3469
3547
  var groupButtonEle = document.querySelector('#' + item.id);
3470
3548
  var dropdown = getComponent(groupButtonEle, DropDownButton);
@@ -3530,16 +3608,29 @@ var RibbonGroupButton = /** @__PURE__ @class */ (function () {
3530
3608
  * @returns {void}
3531
3609
  * @hidden
3532
3610
  */
3533
- RibbonGroupButton.prototype.addOverFlowEvents = function (item, itemEle) {
3611
+ RibbonGroupButton.prototype.addOverFlowEvents = function (item, itemEle, overflowButton) {
3534
3612
  var _this = this;
3613
+ var groupBtnSettings = item.groupButtonSettings;
3614
+ var isIconOnly = true;
3535
3615
  var groupButtonEle = itemEle.querySelector('#' + item.id);
3536
3616
  var dropdown = getComponent(groupButtonEle, DropDownButton);
3537
- dropdown.setProperties({ cssClass: dropdown.cssClass + SPACE + RIBBON_GROUP_BUTTON_OVERFLOW_POPUP });
3617
+ dropdown.setProperties({ cssClass: dropdown.cssClass + SPACE + RIBBON_GROUP_BUTTON_OVERFLOW_POPUP, content: groupBtnSettings.header ? groupBtnSettings.header : '' });
3538
3618
  var targetEle = dropdown.target;
3619
+ if (targetEle.children.length) {
3620
+ for (var i = 0; i < targetEle.children.length; i++) {
3621
+ if (groupBtnSettings.items[parseInt(i.toString(), 10)].content) {
3622
+ isIconOnly = false;
3623
+ break;
3624
+ }
3625
+ }
3626
+ if (isIconOnly) {
3627
+ targetEle.classList.add('e-icon-btn');
3628
+ }
3629
+ }
3539
3630
  targetEle.onclick = function () {
3540
3631
  if (_this.parent.activeLayout === 'Simplified' && targetEle.closest('.e-ribbon-dropdown-group-button').classList.contains(RIBBON_GROUP_BUTTON_OVERFLOW_POPUP)) {
3541
- dropdown.element.focus();
3542
3632
  dropdown.toggle();
3633
+ overflowButton.toggle();
3543
3634
  }
3544
3635
  };
3545
3636
  };
@@ -3555,9 +3646,13 @@ var RibbonGroupButton = /** @__PURE__ @class */ (function () {
3555
3646
  var groupButtonEle = itemEle.querySelector('#' + item.id);
3556
3647
  if (groupButtonEle) {
3557
3648
  var dropdown = getComponent(groupButtonEle, DropDownButton);
3649
+ var targetEle = dropdown.target;
3650
+ if (targetEle.classList.contains('e-icon-btn')) {
3651
+ targetEle.classList.remove('e-icon-btn');
3652
+ }
3558
3653
  var cssClass = dropdown.cssClass.split(SPACE);
3559
3654
  cssClass = cssClass.filter(function (value) { return value !== RIBBON_GROUP_BUTTON_OVERFLOW_POPUP; });
3560
- dropdown.setProperties({ cssClass: cssClass.join(SPACE) });
3655
+ dropdown.setProperties({ cssClass: cssClass.join(SPACE), content: '' });
3561
3656
  }
3562
3657
  };
3563
3658
  /**
@@ -3657,6 +3752,8 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
3657
3752
  this.idIndex = 0;
3658
3753
  this.tooltipData = [];
3659
3754
  this.initialPropsData = {};
3755
+ this.hiddenElements = {};
3756
+ this.hiddenGroups = [];
3660
3757
  this.isAddRemove = false;
3661
3758
  this.keyConfigs = {
3662
3759
  leftarrow: 'leftarrow',
@@ -3730,7 +3827,9 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
3730
3827
  e.preventDefault();
3731
3828
  }
3732
3829
  var activeContent = this.tabObj.element.querySelector('#' + this.tabs[this.selectedTab].id + CONTENT_ID);
3733
- var ribbonControls = activeContent.querySelectorAll('.e-control');
3830
+ var controlElements = Array.prototype.slice.call(activeContent.querySelectorAll('.e-control'));
3831
+ var templateElements = Array.prototype.slice.call(activeContent.querySelectorAll('.e-ribbon-template'));
3832
+ var ribbonControls = controlElements.concat(templateElements);
3734
3833
  var comboBoxElements = activeContent.querySelectorAll('.e-combobox');
3735
3834
  var comboBoxEle;
3736
3835
  if (comboBoxElements) {
@@ -3759,7 +3858,7 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
3759
3858
  if (e.target.classList.contains('e-control') || e.target.classList.contains('e-ribbon-launcher-icon') ||
3760
3859
  e.target.classList.contains('e-ribbon-collapse-btn') || e.target.classList.contains('e-ribbon-last-item') ||
3761
3860
  e.target.classList.contains('e-ribbon-first-item') || e.target.classList.contains('e-ribbon-group-of-btn') ||
3762
- e.target.classList.contains('e-ribbon-overall-of-btn')) {
3861
+ e.target.classList.contains('e-ribbon-overall-of-btn') || e.target.classList.contains('e-ribbon-template')) {
3763
3862
  switch (e.action) {
3764
3863
  case 'rightarrow':
3765
3864
  this.handleNavigation(e, !this.enableRtl, ribbonControls);
@@ -3801,7 +3900,7 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
3801
3900
  }
3802
3901
  }
3803
3902
  if ((!enableRtl && (this.currentControlIndex > 0)) || (enableRtl && (this.currentControlIndex < ribbonControls.length - 1))) {
3804
- if (!e.target.classList.contains('e-combobox') && e.target.classList.contains('e-control') && !e.target.classList.contains('e-ribbon-last-item')) {
3903
+ if (!e.target.classList.contains('e-combobox') && (e.target.classList.contains('e-control') || e.target.classList.contains('e-ribbon-template')) && !e.target.classList.contains('e-ribbon-last-item')) {
3805
3904
  if (enableRtl) {
3806
3905
  this.currentControlIndex++;
3807
3906
  }
@@ -3835,7 +3934,10 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
3835
3934
  }
3836
3935
  if (launcherIconEle) {
3837
3936
  var items = groupContainer.querySelectorAll('.e-ribbon-item');
3838
- items[items.length - 1].querySelector('.e-control').classList.add('e-ribbon-last-item');
3937
+ var elem = items[items.length - 1].querySelector('.e-control');
3938
+ if (elem) {
3939
+ elem.classList.add('e-ribbon-last-item');
3940
+ }
3839
3941
  }
3840
3942
  }
3841
3943
  else {
@@ -3948,6 +4050,15 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
3948
4050
  var scrollEle = this.tabObj.element.querySelector('.' + HORIZONTAL_SCROLLBAR);
3949
4051
  this.scrollModule.scrollStep = scrollEle.offsetWidth;
3950
4052
  }
4053
+ if (this.activeLayout === 'Simplified') {
4054
+ var activePopup = document.querySelectorAll('.e-ribbon .e-dropdown-btn.e-active, .e-ribbon-group-overflow-ddb .e-dropdown-btn.e-active');
4055
+ if (activePopup.length) {
4056
+ for (var i = 0; i < activePopup.length; i++) {
4057
+ var dropDownBtn = getInstance(activePopup[parseInt(i.toString(), 10)], DropDownButton);
4058
+ dropDownBtn.toggle();
4059
+ }
4060
+ }
4061
+ }
3951
4062
  };
3952
4063
  Ribbon.prototype.renderTabs = function () {
3953
4064
  this.tabsInternal = this.tabs.slice();
@@ -4015,6 +4126,7 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
4015
4126
  selectedIndex = selectedIndex === -1 ? this.selectedTab : selectedIndex;
4016
4127
  var eventArgs = { previousIndex: this.selectedTab, selectedIndex: selectedIndex };
4017
4128
  this.setProperties({ selectedTab: selectedIndex }, true);
4129
+ this.calculateHiddenElementsWidth(selectedIndex);
4018
4130
  this.checkOverflow(selectedIndex, e.selectedContent.firstChild);
4019
4131
  if (this.activeLayout === 'Simplified' && this.overflowDDB) {
4020
4132
  var overflowTarget = this.overflowDDB.target;
@@ -4138,6 +4250,7 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
4138
4250
  var orderedGroups = this.getGroupResizeOrder(true, tabIndex);
4139
4251
  var isEmptyCollection;
4140
4252
  for (var i = 0; ((i < orderedGroups.length) && (tabContent.offsetWidth < activeContent.offsetWidth)); i++) {
4253
+ var isGroupUpdated = false;
4141
4254
  var group = orderedGroups[parseInt(i.toString(), 10)];
4142
4255
  var groupEle = tabContent.querySelector('#' + group.id);
4143
4256
  var groupContainer = groupEle.querySelector('#' + group.id + CONTAINER_ID);
@@ -4149,7 +4262,67 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
4149
4262
  var itemContainer = collectionEle.querySelector('#' + item.id + CONTAINER_ID);
4150
4263
  if (((item.displayOptions === DisplayMode.Auto) ||
4151
4264
  (item.displayOptions === (DisplayMode.Simplified | DisplayMode.Overflow))) && !isNullOrUndefined(itemContainer)) {
4152
- itemContainer.setAttribute('data-simplified-width', activeContent.offsetWidth.toString());
4265
+ var groupHidden = false;
4266
+ var itemHidden = false;
4267
+ var isAllItemHidden = false;
4268
+ var isEmptyCollection_1 = false;
4269
+ var groupItems = void 0;
4270
+ if (groupEle.classList.contains('e-hidden') || groupEle.classList.contains('e-hide-group')) {
4271
+ groupItems = groupEle.querySelectorAll('.e-ribbon-item.e-hidden');
4272
+ if (groupItems.length) {
4273
+ for (var i_1 = 0; i_1 < groupItems.length; i_1++) {
4274
+ groupItems[parseInt(i_1.toString(), 10)].classList.remove('e-hidden');
4275
+ }
4276
+ }
4277
+ if (groupEle.classList.contains('e-hide-group')) {
4278
+ isAllItemHidden = true;
4279
+ groupEle.classList.remove('e-hide-group');
4280
+ groupEle.classList.remove('e-ribbon-emptyCollection');
4281
+ if (this.hiddenGroups.indexOf(groupEle.id) !== -1) {
4282
+ this.hiddenGroups.splice(this.hiddenGroups.indexOf(groupEle.id), 1);
4283
+ }
4284
+ }
4285
+ else {
4286
+ groupHidden = true;
4287
+ groupEle.classList.remove('e-hidden');
4288
+ }
4289
+ if (!isGroupUpdated) {
4290
+ this.calculateOverflowItemsWidth(groupEle.offsetWidth, false, tabIndex);
4291
+ this.calculateMediumDataWidth(groupEle.offsetWidth, tabIndex, false);
4292
+ isGroupUpdated = true;
4293
+ }
4294
+ }
4295
+ else {
4296
+ if (itemContainer.classList.contains('e-hidden')) {
4297
+ itemHidden = true;
4298
+ itemContainer.classList.remove('e-hidden');
4299
+ if (groupEle.classList.contains('e-ribbon-emptyCollection')) {
4300
+ isEmptyCollection_1 = true;
4301
+ groupEle.classList.remove('e-ribbon-emptyCollection');
4302
+ }
4303
+ this.calculateOverflowItemsWidth(itemContainer.offsetWidth, false, tabIndex);
4304
+ this.calculateMediumDataWidth(itemContainer.offsetWidth, tabIndex, false);
4305
+ }
4306
+ }
4307
+ itemContainer.setAttribute('data-simplified-width', (activeContent.offsetWidth).toString());
4308
+ if (itemHidden) {
4309
+ itemContainer.classList.add('e-hidden');
4310
+ }
4311
+ if (groupItems && groupItems.length) {
4312
+ for (var i_2 = 0; i_2 < groupItems.length; i_2++) {
4313
+ groupItems[parseInt(i_2.toString(), 10)].classList.add('e-hidden');
4314
+ }
4315
+ }
4316
+ if (groupHidden) {
4317
+ groupEle.classList.add('e-hidden');
4318
+ }
4319
+ if (isAllItemHidden) {
4320
+ groupEle.classList.add('e-hide-group');
4321
+ groupEle.classList.add('e-ribbon-emptyCollection');
4322
+ }
4323
+ if (isEmptyCollection_1) {
4324
+ groupEle.classList.add('e-ribbon-emptyCollection');
4325
+ }
4153
4326
  this.createOverflowPopup(item, tabIndex, group.enableGroupOverflow, group.id, group.header, itemContainer, groupContainer, true);
4154
4327
  if (item.activeSize === RibbonItemSize.Small) {
4155
4328
  var itemEle = itemContainer.querySelector('#' + item.id);
@@ -4243,37 +4416,61 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
4243
4416
  if (((item.displayOptions === DisplayMode.Auto) ||
4244
4417
  (item.displayOptions === (DisplayMode.Simplified | DisplayMode.Overflow))) && !isNullOrUndefined(itemContainer)) {
4245
4418
  var width = parseInt(itemContainer.getAttribute('data-simplified-width'), 10);
4419
+ var groupItemEle = tabContent.querySelector('#' + group.id);
4420
+ if (itemContainer.classList.contains('e-hidden') || groupItemEle.classList.contains('e-hidden')) {
4421
+ width = Math.abs(width - activeContent.offsetWidth);
4422
+ }
4246
4423
  if (!isClear && (tabContent.offsetWidth < width)) {
4247
4424
  flag = false;
4248
4425
  break;
4249
4426
  }
4250
- var groupEle_1 = tabContent.querySelector('#' + collection.id);
4427
+ var groupEle = tabContent.querySelector('#' + collection.id);
4251
4428
  if ((item.type === RibbonItemType.DropDown) || (item.type === RibbonItemType.SplitButton) || (item.type === RibbonItemType.GroupButton)) {
4252
4429
  this.updatePopupItems(item, itemContainer, group.enableGroupOverflow, false);
4253
4430
  }
4254
- groupEle_1.append(itemContainer);
4431
+ groupEle.append(itemContainer);
4432
+ if (itemContainer.classList.contains('e-hidden') || groupItemEle.classList.contains('e-hidden')) {
4433
+ itemContainer.setAttribute('data-simplified-width', width.toString());
4434
+ var isGroupHidden = false;
4435
+ var widthDifference = 0;
4436
+ if (itemContainer.classList.contains('e-hidden')) {
4437
+ itemContainer.classList.remove('e-hidden');
4438
+ if (groupItemEle.classList.contains('e-hide-group')) {
4439
+ isGroupHidden = true;
4440
+ widthDifference = this.checkWidthDifference(itemContainer, groupItemEle);
4441
+ }
4442
+ width = itemContainer.offsetWidth + widthDifference;
4443
+ itemContainer.classList.add('e-hidden');
4444
+ }
4445
+ this.calculateOverflowItemsWidth(width, true, tabIndex);
4446
+ this.calculateMediumDataWidth(width, tabIndex, true);
4447
+ if (isGroupHidden) {
4448
+ groupItemEle.classList.add('e-hide-group');
4449
+ groupItemEle.classList.add('e-ribbon-emptyCollection');
4450
+ }
4451
+ }
4255
4452
  this.removeOverflowEvent(item, itemContainer);
4256
4453
  if (item.allowedSizes & RibbonItemSize.Small) {
4257
4454
  item.setProperties({ activeSize: RibbonItemSize.Small }, true);
4258
4455
  this.setItemSize(itemContainer.querySelector('#' + item.id), item);
4259
4456
  }
4260
- }
4261
- }
4262
- }
4263
- var groupEle = tabContent.querySelector('#' + group.id);
4264
- var itemEle = groupEle.querySelector('.' + RIBBON_ITEM);
4265
- if (groupEle.classList.contains('e-ribbon-emptyCollection') && itemEle !== null) {
4266
- var itemsLength = groupEle.querySelectorAll('.' + RIBBON_ITEM);
4267
- if (itemsLength) {
4268
- isEmptyCollection = this.checkEmptyCollection(itemsLength);
4269
- if (!isEmptyCollection) {
4270
- groupEle.classList.remove('e-ribbon-emptyCollection');
4457
+ var groupElement = tabContent.querySelector('#' + group.id);
4458
+ var itemEle = groupElement.querySelector('.' + RIBBON_ITEM);
4459
+ if (groupElement.classList.contains('e-ribbon-emptyCollection') && itemEle !== null) {
4460
+ var itemsLength = groupElement.querySelectorAll('.' + RIBBON_ITEM);
4461
+ if (itemsLength) {
4462
+ isEmptyCollection = this.checkEmptyCollection(itemsLength);
4463
+ if (!isEmptyCollection) {
4464
+ groupElement.classList.remove('e-ribbon-emptyCollection');
4465
+ }
4466
+ }
4467
+ }
4271
4468
  }
4272
4469
  }
4273
4470
  }
4274
4471
  if (overflowDDB) {
4275
4472
  if (group.enableGroupOverflow) {
4276
- if (overflowtarget.childElementCount === 0) {
4473
+ if (overflowtarget.childElementCount === 0 || (overflowtarget.childElementCount === 1 && this.isHeaderVisible(overflowtarget, group.id))) {
4277
4474
  this.removeOverflowButton(overflowDDB);
4278
4475
  }
4279
4476
  }
@@ -4289,7 +4486,9 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
4289
4486
  }
4290
4487
  }
4291
4488
  }
4292
- this.checkOverflowHiddenItems(group.enableGroupOverflow, tabIndex, group.id);
4489
+ }
4490
+ for (var i = 0; i < orderedGroups.length; i++) {
4491
+ this.checkOverflowHiddenItems(orderedGroups[parseInt(i.toString(), 10)].enableGroupOverflow, tabIndex, orderedGroups[parseInt(i.toString(), 10)].id);
4293
4492
  }
4294
4493
  if (this.overflowDDB) {
4295
4494
  var overflowEle = this.overflowDDB.target;
@@ -4345,6 +4544,7 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
4345
4544
  };
4346
4545
  Ribbon.prototype.createOverflowPopup = function (item, tabIndex, isGroupOF, groupId, groupHeader, itemEle, groupContainer, isResize) {
4347
4546
  var overflowButton;
4547
+ var itemProp = getGroup(this.tabs, groupId);
4348
4548
  var contentEle = this.tabObj.items[parseInt(tabIndex.toString(), 10)].content;
4349
4549
  var groupEle = contentEle.querySelector('#' + groupId);
4350
4550
  if (isGroupOF) {
@@ -4358,6 +4558,17 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
4358
4558
  overflowButton = getInstance(overflowDDB, DropDownButton);
4359
4559
  }
4360
4560
  var overflowBtnTarget = overflowButton.target;
4561
+ var headerEle = overflowBtnTarget.querySelector('#' + groupId + GROUPOF_BUTTON_ID + HEADER_ID);
4562
+ if (!headerEle) {
4563
+ if (itemProp.group.overflowHeader) {
4564
+ var groupHeader_1 = this.createElement('div', {
4565
+ className: RIBBON_OVERFLOW_HEADER,
4566
+ id: groupId + GROUPOF_BUTTON_ID + HEADER_ID,
4567
+ innerHTML: itemProp.group.overflowHeader
4568
+ });
4569
+ overflowBtnTarget.append(groupHeader_1);
4570
+ }
4571
+ }
4361
4572
  if (groupEle) {
4362
4573
  if (groupEle.classList.contains('e-disabled')) {
4363
4574
  overflowBtnTarget.classList.add('e-disabled');
@@ -4386,7 +4597,7 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
4386
4597
  if (ofTabContainer) {
4387
4598
  var ofGroupContainer = overflowEle.querySelector('#' + groupId + CONTAINER_ID);
4388
4599
  if (!ofGroupContainer) {
4389
- ofGroupContainer = this.createGroupContainer(groupId, groupHeader);
4600
+ ofGroupContainer = itemProp.group.overflowHeader ? this.createGroupContainer(groupId, itemProp.group.overflowHeader) : this.createGroupContainer(groupId, groupHeader);
4390
4601
  if (groupEle) {
4391
4602
  if (groupEle.classList.contains('e-disabled')) {
4392
4603
  ofGroupContainer.classList.add('e-disabled');
@@ -4434,7 +4645,7 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
4434
4645
  break;
4435
4646
  case 'GroupButton':
4436
4647
  if (this.activeLayout === 'Simplified') {
4437
- this.ribbonGroupButtonModule.addOverFlowEvents(item, itemEle);
4648
+ this.ribbonGroupButtonModule.addOverFlowEvents(item, itemEle, overflowButton);
4438
4649
  break;
4439
4650
  }
4440
4651
  }
@@ -4446,7 +4657,8 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
4446
4657
  });
4447
4658
  var overflowtarget = this.overflowDDB.target;
4448
4659
  overflowtarget.append(ofTabContainer);
4449
- var ofGroupContainer = this.createGroupContainer(groupId, groupHeader);
4660
+ var itemProp = getGroup(this.tabs, groupId);
4661
+ var ofGroupContainer = itemProp.group.overflowHeader ? this.createGroupContainer(groupId, itemProp.group.overflowHeader) : this.createGroupContainer(groupId, groupHeader);
4450
4662
  ofGroupContainer.append(itemEle);
4451
4663
  ofTabContainer.append(ofGroupContainer);
4452
4664
  if (tabIndex === this.selectedTab) {
@@ -5303,9 +5515,10 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
5303
5515
  },
5304
5516
  beforeClose: function (args) {
5305
5517
  var ele = args.event ? closest(args.event.target, '.' + RIBBON_POPUP_CONTROL) : null;
5518
+ var groupButtonEle = args.event ? closest(args.event.target, '.e-ribbon-group-button-overflow-popup') : null;
5306
5519
  var eventArgs = { element: args.element, event: args.event, cancel: args.cancel };
5307
5520
  _this.trigger('overflowPopupClose', eventArgs, function (ribbonArgs) {
5308
- if (ele || ribbonArgs.cancel) {
5521
+ if (ele || ribbonArgs.cancel || groupButtonEle) {
5309
5522
  args.cancel = true;
5310
5523
  }
5311
5524
  });
@@ -5327,8 +5540,10 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
5327
5540
  var currentList = target.querySelector('.e-ribbon-of-tab.e-ribbon-active');
5328
5541
  items = currentList.getElementsByClassName('e-ribbon-item');
5329
5542
  }
5330
- var comboBoxEle = items[(!this.itemIndex || this.itemIndex < 0) ? 0 : this.itemIndex].querySelector('.e-control').classList.contains('e-combobox') ? items[(!this.itemIndex || this.itemIndex < 0) ? 0 : this.itemIndex].querySelector('.e-combobox') : null;
5543
+ var control = items[(!this.itemIndex || this.itemIndex < 0) ? 0 : this.itemIndex].querySelector('.e-control');
5544
+ var comboBoxEle = control && control.classList.contains('e-combobox') ? items[(!this.itemIndex || this.itemIndex < 0) ? 0 : this.itemIndex].querySelector('.e-combobox') : null;
5331
5545
  var ribbonItem;
5546
+ var templateEle;
5332
5547
  if (comboBoxEle === null || (e.key === 'Tab') || this.itemIndex < 0) {
5333
5548
  if (e.key === 'ArrowDown' || (!e.shiftKey && e.key === 'Tab')) {
5334
5549
  if ((!this.itemIndex && this.itemIndex !== 0) || this.itemIndex < 0 || this.itemIndex === items.length - 1) {
@@ -5337,13 +5552,21 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
5337
5552
  this.findDisabledItem(ribbonItem, items, true);
5338
5553
  if (comboBoxEle && e.key === 'Tab') {
5339
5554
  e.preventDefault();
5340
- items[this.itemIndex].querySelector('.e-control').focus();
5555
+ var item = items[this.itemIndex].querySelector('.e-control');
5556
+ if (item) {
5557
+ item.focus();
5558
+ }
5341
5559
  }
5560
+ templateEle = items[this.itemIndex].querySelector('.e-ribbon-template');
5342
5561
  }
5343
5562
  else if (this.itemIndex < items.length - 1 && this.itemIndex >= 0) {
5344
5563
  this.itemIndex++;
5345
5564
  ribbonItem = items[this.itemIndex].closest('.e-ribbon-item');
5346
5565
  this.findDisabledItem(ribbonItem, items, true);
5566
+ templateEle = items[this.itemIndex].querySelector('.e-ribbon-template');
5567
+ }
5568
+ if (templateEle) {
5569
+ templateEle.focus();
5347
5570
  }
5348
5571
  }
5349
5572
  else if (e.key === 'ArrowUp' || (e.shiftKey && e.key === 'Tab')) {
@@ -5354,20 +5577,32 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
5354
5577
  this.findDisabledItem(ribbonItem, items, false);
5355
5578
  if (comboBoxEle && (e.shiftKey && e.key === 'Tab')) {
5356
5579
  e.preventDefault();
5357
- items[this.itemIndex].querySelector('.e-control').focus();
5580
+ var item = items[this.itemIndex].querySelector('.e-control');
5581
+ if (item) {
5582
+ item.focus();
5583
+ }
5358
5584
  }
5585
+ templateEle = items[this.itemIndex].querySelector('.e-ribbon-template');
5359
5586
  }
5360
5587
  else if (this.itemIndex <= items.length - 1 && this.itemIndex > 0) {
5361
5588
  this.itemIndex--;
5362
5589
  ribbonItem = items[this.itemIndex].closest('.e-ribbon-item');
5363
5590
  this.findDisabledItem(ribbonItem, items, false);
5591
+ templateEle = items[this.itemIndex].querySelector('.e-ribbon-template');
5592
+ }
5593
+ if (templateEle) {
5594
+ templateEle.focus();
5364
5595
  }
5365
5596
  }
5366
5597
  }
5367
5598
  target.setAttribute('index', this.itemIndex.toString());
5368
5599
  }
5369
5600
  var currentItemIndex = parseInt(target.getAttribute('index'), 10);
5370
- var itemType = items[parseInt(currentItemIndex.toString(), 10)] ? items[parseInt(currentItemIndex.toString(), 10)].querySelector('.e-control').getAttribute('data-control') : null;
5601
+ var itemType = "";
5602
+ var controlItem = items[parseInt(currentItemIndex.toString(), 10)] ? items[parseInt(currentItemIndex.toString(), 10)].querySelector('.e-control') : null;
5603
+ if (controlItem) {
5604
+ itemType = controlItem.getAttribute('data-control');
5605
+ }
5371
5606
  if (e.key === 'ArrowDown' || e.key === 'ArrowUp' || e.key === ' ' || e.key === 'Tab') {
5372
5607
  if (itemType === 'ColorPicker') {
5373
5608
  if (e.key === 'Tab') {
@@ -5379,7 +5614,10 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
5379
5614
  if (e.key === 'Tab') {
5380
5615
  e.preventDefault();
5381
5616
  }
5382
- items[parseInt(currentItemIndex.toString(), 10)].querySelector('.e-control').focus();
5617
+ var elem = items[parseInt(currentItemIndex.toString(), 10)].querySelector('.e-control');
5618
+ if (elem) {
5619
+ elem.focus();
5620
+ }
5383
5621
  }
5384
5622
  if (e.key === ' ' && (itemType === 'CheckBox')) {
5385
5623
  var checkBoxEle = items[parseInt(currentItemIndex.toString(), 10)].querySelector('.e-control');
@@ -5587,22 +5825,22 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
5587
5825
  var activeContent = this.tabObj.element.querySelector('#' + this.tabs[parseInt(tabIndex.toString(), 10)].id + CONTENT_ID);
5588
5826
  var tabContent = activeContent.closest('.' + TAB_CONTENT);
5589
5827
  if (this.activeLayout === 'Simplified') {
5590
- for (var i_1 = 0; i_1 < groupList.length; i_1++) {
5591
- var group = groupList[parseInt(i_1.toString(), 10)];
5592
- var alignType = groupList[parseInt(i_1.toString(), 10)].orientation;
5828
+ for (var i_3 = 0; i_3 < groupList.length; i_3++) {
5829
+ var group = groupList[parseInt(i_3.toString(), 10)];
5830
+ var alignType = groupList[parseInt(i_3.toString(), 10)].orientation;
5593
5831
  if (group.isCollapsed) {
5594
5832
  group.setProperties({ isCollapsed: false }, true);
5595
5833
  this.removeDropdown(group.id);
5596
5834
  }
5597
5835
  else {
5598
- this.checkSmallToMedium(tabIndex, tab, i_1, tabContent, activeContent, true, false);
5599
- this.checkMediumToLarge(tabIndex, tab, i_1, tabContent, activeContent, true, false);
5836
+ this.checkSmallToMedium(tabIndex, tab, i_3, tabContent, activeContent, true, false);
5837
+ this.checkMediumToLarge(tabIndex, tab, i_3, tabContent, activeContent, true, false);
5600
5838
  }
5601
5839
  var groupEle = tabContent.querySelector('#' + group.id);
5602
5840
  var groupContainer = groupEle.querySelector('#' + group.id + CONTAINER_ID);
5603
5841
  var shrinkColumns = groupContainer.querySelectorAll('.' + 'e-ribbon-shrink');
5604
- for (var i_2 = 0; i_2 < shrinkColumns.length; i_2++) {
5605
- shrinkColumns[parseInt(i_2.toString(), 10)].remove();
5842
+ for (var i_4 = 0; i_4 < shrinkColumns.length; i_4++) {
5843
+ shrinkColumns[parseInt(i_4.toString(), 10)].remove();
5606
5844
  }
5607
5845
  var groupHeader = groupContainer.querySelector('#' + group.id + HEADER_ID);
5608
5846
  groupHeader.remove();
@@ -5670,9 +5908,9 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
5670
5908
  }
5671
5909
  else {
5672
5910
  this.element.classList.remove(RIBBON_OVERFLOW);
5673
- for (var i_3 = 0; i_3 < groupList.length; i_3++) {
5674
- var group = groupList[parseInt(i_3.toString(), 10)];
5675
- var alignType = groupList[parseInt(i_3.toString(), 10)].orientation;
5911
+ for (var i_5 = 0; i_5 < groupList.length; i_5++) {
5912
+ var group = groupList[parseInt(i_5.toString(), 10)];
5913
+ var alignType = groupList[parseInt(i_5.toString(), 10)].orientation;
5676
5914
  var groupContainer = tabContent.querySelector('#' + group.id + CONTAINER_ID);
5677
5915
  var groupContent = groupContainer.querySelector('#' + group.id + CONTENT_ID);
5678
5916
  var groupHeader = this.createElement('div', {
@@ -5766,7 +6004,7 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
5766
6004
  this.setItemSize(ele, item);
5767
6005
  }
5768
6006
  if (group.enableGroupOverflow && overflowDDB) {
5769
- if (overflowtarget.childElementCount === 0) {
6007
+ if (overflowtarget.childElementCount === 0 || (overflowtarget.childElementCount === 1 && this.isHeaderVisible(overflowtarget, group.id))) {
5770
6008
  this.removeOverflowButton(overflowDDB);
5771
6009
  }
5772
6010
  }
@@ -6051,7 +6289,8 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
6051
6289
  Ribbon.prototype.createTemplateContent = function (item, itemElement) {
6052
6290
  var itemEle = this.createElement('div', {
6053
6291
  className: item.cssClass ? (RIBBON_TEMPLATE + SPACE + item.cssClass) : RIBBON_TEMPLATE,
6054
- id: item.id
6292
+ id: item.id,
6293
+ attrs: { 'tabindex': '-1' }
6055
6294
  });
6056
6295
  if (item.disabled) {
6057
6296
  itemEle.classList.add(DISABLED_CSS);
@@ -6145,15 +6384,15 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
6145
6384
  var moduleName = this.getItemModuleName(item);
6146
6385
  if (moduleName !== 'template') {
6147
6386
  if (moduleName === 'group-btn' && this.activeLayout === 'Classic') {
6148
- for (var i_4 = 0; i_4 < item.groupButtonSettings.items.length; i_4++) {
6149
- var btnEle = ele.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + i_4);
6387
+ for (var i_6 = 0; i_6 < item.groupButtonSettings.items.length; i_6++) {
6388
+ var btnEle = ele.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + i_6);
6150
6389
  updateCommonProperty(btnEle, 'btn', commonProp);
6151
6390
  }
6152
6391
  }
6153
6392
  else if (moduleName === 'group-btn' && this.activeLayout === 'Simplified') {
6154
6393
  updateCommonProperty(ele, 'dropdown-btn', commonProp);
6155
- for (var i_5 = 0; i_5 < item.groupButtonSettings.items.length; i_5++) {
6156
- var btnEle = document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + i_5);
6394
+ for (var i_7 = 0; i_7 < item.groupButtonSettings.items.length; i_7++) {
6395
+ var btnEle = document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + i_7);
6157
6396
  updateCommonProperty(btnEle, 'btn', commonProp);
6158
6397
  }
6159
6398
  }
@@ -6527,7 +6766,7 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
6527
6766
  }
6528
6767
  if (this.activeLayout === RibbonLayout.Simplified) {
6529
6768
  if (itemProp.group.enableGroupOverflow) {
6530
- if (dropdown.target.childElementCount === 0) {
6769
+ if (dropdown.target.childElementCount === 0 || (dropdown.target.childElementCount === 1 && this.isHeaderVisible(dropdown.target, itemProp.group.id))) {
6531
6770
  this.removeOverflowButton(dropdown);
6532
6771
  }
6533
6772
  }
@@ -6554,6 +6793,9 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
6554
6793
  this.refreshLayout();
6555
6794
  }
6556
6795
  };
6796
+ Ribbon.prototype.isHeaderVisible = function (headerEle, groupID) {
6797
+ return headerEle.querySelector('#' + groupID + GROUPOF_BUTTON_ID + HEADER_ID) ? true : false;
6798
+ };
6557
6799
  /**
6558
6800
  * Hides a specific group within a ribbon tab.
6559
6801
  *
@@ -6582,7 +6824,7 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
6582
6824
  var contentEle = this.tabObj.items[itemProp.tabIndex].content;
6583
6825
  var groupEle = contentEle.querySelector('#' + groupID);
6584
6826
  if (groupEle) {
6585
- isHidden ? groupEle.classList.add('e-hidden') : groupEle.classList.remove('e-hidden');
6827
+ this.updateHiddenElements(itemProp.tabIndex, isHidden ? 'hideGroup' : 'showGroup', groupID, isHidden, groupEle);
6586
6828
  }
6587
6829
  else {
6588
6830
  this.updateInitialProps(itemProp.tabIndex, groupID, 'hiddenGroups', isHidden);
@@ -6607,7 +6849,244 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
6607
6849
  }
6608
6850
  }
6609
6851
  }
6610
- this.refreshLayout();
6852
+ if (this.selectedTab === itemProp.tabIndex) {
6853
+ this.refreshLayout();
6854
+ }
6855
+ };
6856
+ Ribbon.prototype.updateHiddenElements = function (tabIndex, key, id, isHidden, element, group) {
6857
+ if (isHidden) {
6858
+ if (!(element.classList.contains('e-hidden'))) {
6859
+ this.checkHiddenElements(key, id, tabIndex);
6860
+ element.classList.add('e-hidden');
6861
+ if (key === 'hideItem') {
6862
+ this.checkHiddenItems(group, isHidden, tabIndex);
6863
+ }
6864
+ this.calculateHiddenElementsWidth(tabIndex);
6865
+ }
6866
+ }
6867
+ else {
6868
+ if (element.classList.contains('e-hidden')) {
6869
+ this.checkHiddenElements(key, id, tabIndex);
6870
+ element.classList.remove('e-hidden');
6871
+ this.calculateHiddenElementsWidth(tabIndex);
6872
+ if (key === 'showItem') {
6873
+ this.checkHiddenItems(group, isHidden, tabIndex);
6874
+ }
6875
+ }
6876
+ }
6877
+ };
6878
+ Ribbon.prototype.checkHiddenElements = function (key, id, tabIndex) {
6879
+ if (this.activeLayout === 'Simplified') {
6880
+ var hiddenProps = this.hiddenElements[parseInt(tabIndex.toString(), 10)];
6881
+ if (!hiddenProps) {
6882
+ this.hiddenElements[parseInt(tabIndex.toString(), 10)] = {};
6883
+ hiddenProps = this.hiddenElements[parseInt(tabIndex.toString(), 10)];
6884
+ }
6885
+ if (hiddenProps) {
6886
+ /* eslint-disable */
6887
+ if (!hiddenProps[key]) {
6888
+ hiddenProps[key] = [];
6889
+ }
6890
+ if (hiddenProps[key].length) {
6891
+ var index = hiddenProps[key].indexOf(id);
6892
+ if (index === -1) {
6893
+ hiddenProps[key].push(id);
6894
+ }
6895
+ }
6896
+ else {
6897
+ hiddenProps[key].push(id);
6898
+ }
6899
+ /* eslint-enable */
6900
+ }
6901
+ }
6902
+ };
6903
+ Ribbon.prototype.updateItemsSimplifiedWidth = function (tabIndex, key) {
6904
+ var hiddenProps = this.hiddenElements[parseInt(tabIndex.toString(), 10)];
6905
+ /* eslint-disable */
6906
+ if (hiddenProps && hiddenProps[key] && hiddenProps[key].length) {
6907
+ var _loop_4 = function (i) {
6908
+ var contentEle = this_4.tabObj.items[tabIndex].content;
6909
+ var hiddenEle;
6910
+ var groupEle = void 0;
6911
+ var isGroupHidden = false;
6912
+ var widthDifference = 0;
6913
+ if (key === 'hideGroup' || key === 'showGroup') {
6914
+ hiddenEle = contentEle.querySelector('#' + hiddenProps[key][i]);
6915
+ }
6916
+ else {
6917
+ hiddenEle = contentEle.querySelector('#' + hiddenProps[key][i] + CONTAINER_ID);
6918
+ }
6919
+ if (hiddenEle) {
6920
+ if (key === 'hideGroup' || key === 'hideItem') {
6921
+ var isHidden = false;
6922
+ if (hiddenEle.classList.contains('e-hidden')) {
6923
+ isHidden = true;
6924
+ hiddenEle.classList.remove('e-hidden');
6925
+ }
6926
+ if (key === 'hideItem') {
6927
+ groupEle = hiddenEle.closest('.e-ribbon-group');
6928
+ if (groupEle.classList.contains('e-hide-group')) {
6929
+ isGroupHidden = true;
6930
+ widthDifference = this_4.checkWidthDifference(hiddenEle, groupEle);
6931
+ }
6932
+ }
6933
+ this_4.calculateOverflowItemsWidth(hiddenEle.offsetWidth + widthDifference, true, tabIndex);
6934
+ this_4.calculateMediumDataWidth(hiddenEle.offsetWidth + widthDifference, tabIndex, true);
6935
+ if (isHidden) {
6936
+ hiddenEle.classList.add('e-hidden');
6937
+ }
6938
+ }
6939
+ else {
6940
+ if (key === 'showItem') {
6941
+ groupEle = hiddenEle.closest('.e-ribbon-group');
6942
+ if (groupEle.classList.contains('e-hide-group')) {
6943
+ isGroupHidden = true;
6944
+ groupEle.classList.remove('e-hide-group');
6945
+ groupEle.classList.remove('e-ribbon-emptyCollection');
6946
+ widthDifference = Math.abs(hiddenEle.offsetWidth - groupEle.offsetWidth);
6947
+ if (this_4.hiddenGroups.indexOf(groupEle.id) !== -1) {
6948
+ this_4.hiddenGroups.splice(this_4.hiddenGroups.indexOf(groupEle.id), 1);
6949
+ }
6950
+ }
6951
+ else {
6952
+ if (this_4.hiddenGroups.indexOf(groupEle.id) !== -1) {
6953
+ var hiddenItems = groupEle.querySelectorAll('.e-ribbon-item:not(.e-hidden)');
6954
+ hiddenItems.forEach(function (item) {
6955
+ if (item.id !== hiddenEle.id) {
6956
+ item.classList.add('e-hidden');
6957
+ }
6958
+ });
6959
+ widthDifference = Math.abs(hiddenEle.offsetWidth - groupEle.offsetWidth);
6960
+ hiddenItems.forEach(function (item) {
6961
+ if (item.id !== hiddenEle.id) {
6962
+ item.classList.remove('e-hidden');
6963
+ }
6964
+ });
6965
+ this_4.hiddenGroups.splice(this_4.hiddenGroups.indexOf(groupEle.id), 1);
6966
+ }
6967
+ }
6968
+ }
6969
+ this_4.calculateOverflowItemsWidth(hiddenEle.offsetWidth + widthDifference, false, tabIndex);
6970
+ this_4.calculateMediumDataWidth(hiddenEle.offsetWidth + widthDifference, tabIndex, false);
6971
+ }
6972
+ if (isGroupHidden) {
6973
+ groupEle.classList.add('e-hide-group');
6974
+ groupEle.classList.add('e-ribbon-emptyCollection');
6975
+ }
6976
+ }
6977
+ var index = hiddenProps[key].indexOf(hiddenProps[key][i]);
6978
+ if (index !== -1) {
6979
+ hiddenProps[key].splice(index, 1);
6980
+ i--;
6981
+ }
6982
+ out_i_1 = i;
6983
+ };
6984
+ var this_4 = this, out_i_1;
6985
+ for (var i = 0; i < hiddenProps[key].length; i++) {
6986
+ _loop_4(i);
6987
+ i = out_i_1;
6988
+ }
6989
+ }
6990
+ };
6991
+ Ribbon.prototype.checkWidthDifference = function (hiddenEle, groupEle) {
6992
+ var widthDifference = 0;
6993
+ groupEle.classList.remove('e-hide-group');
6994
+ groupEle.classList.remove('e-ribbon-emptyCollection');
6995
+ if (this.hiddenGroups.length) {
6996
+ if (this.hiddenGroups.indexOf(groupEle.id) === -1) {
6997
+ this.hiddenGroups.push(groupEle.id);
6998
+ widthDifference = Math.abs(hiddenEle.offsetWidth - groupEle.offsetWidth);
6999
+ }
7000
+ }
7001
+ else {
7002
+ this.hiddenGroups.push(groupEle.id);
7003
+ widthDifference = Math.abs(hiddenEle.offsetWidth - groupEle.offsetWidth);
7004
+ }
7005
+ return widthDifference;
7006
+ };
7007
+ Ribbon.prototype.calculateHiddenElementsWidth = function (tabIndex) {
7008
+ if (tabIndex === this.selectedTab && this.activeLayout === 'Simplified') {
7009
+ var hiddenProps = this.hiddenElements[parseInt(tabIndex.toString(), 10)];
7010
+ if (hiddenProps) {
7011
+ for (var i = 0; i < Object.keys(hiddenProps).length; i++) {
7012
+ this.updateItemsSimplifiedWidth(tabIndex, Object.keys(hiddenProps)[parseInt(i.toString(), 10)]);
7013
+ }
7014
+ }
7015
+ }
7016
+ };
7017
+ Ribbon.prototype.calculateMediumDataWidth = function (hiddenWidth, tabIndex, isHidden) {
7018
+ if (this.selectedTab === tabIndex && this.activeLayout === 'Simplified') {
7019
+ var activeContent = this.tabObj.element.querySelector('#' + this.tabs[parseInt(tabIndex.toString(), 10)].id + CONTENT_ID);
7020
+ var mediumDataItems = Array.prototype.slice.call(activeContent.querySelectorAll('.e-ribbon-item'));
7021
+ if (this.overflowDDB) {
7022
+ var overflowEle = this.overflowDDB.target;
7023
+ var overflowItems = overflowEle.querySelectorAll('.e-ribbon-item');
7024
+ var selectedOFTab = document.querySelector('#' + this.tabs[parseInt(tabIndex.toString(), 10)].id + OVERFLOW_ID);
7025
+ for (var i = 0; i < overflowItems.length; i++) {
7026
+ var ofTab = overflowItems[parseInt(i.toString(), 10)].closest('#' + this.tabs[parseInt(tabIndex.toString(), 10)].id + OVERFLOW_ID);
7027
+ if (selectedOFTab && ofTab && selectedOFTab.id === ofTab.id && overflowItems[parseInt(i.toString(), 10)].hasAttribute('data-medium-width')) {
7028
+ mediumDataItems.push(overflowItems[parseInt(i.toString(), 10)]);
7029
+ }
7030
+ }
7031
+ }
7032
+ var groupOFButton = activeContent.querySelectorAll('.e-ribbon-group-of-btn');
7033
+ for (var i = 0; i < groupOFButton.length; i++) {
7034
+ var overflowButton = getInstance(groupOFButton[parseInt(i.toString(), 10)], DropDownButton);
7035
+ var overflowBtnTarget = overflowButton.target;
7036
+ var overflowItems = overflowBtnTarget.querySelectorAll('.e-ribbon-item');
7037
+ for (var i_8 = 0; i_8 < overflowItems.length; i_8++) {
7038
+ if (overflowItems[parseInt(i_8.toString(), 10)].hasAttribute('data-medium-width')) {
7039
+ mediumDataItems.push(overflowItems[parseInt(i_8.toString(), 10)]);
7040
+ }
7041
+ }
7042
+ }
7043
+ for (var i = 0; i < mediumDataItems.length; i++) {
7044
+ if (mediumDataItems[parseInt(i.toString(), 10)].hasAttribute('data-medium-width')) {
7045
+ var previousWidth = parseInt(mediumDataItems[parseInt(i.toString(), 10)].getAttribute('data-medium-width'), 10);
7046
+ mediumDataItems[parseInt(i.toString(), 10)].setAttribute('data-medium-width', isHidden ? (previousWidth - hiddenWidth).toString() : (previousWidth + hiddenWidth).toString());
7047
+ }
7048
+ }
7049
+ }
7050
+ };
7051
+ Ribbon.prototype.calculateOverflowItemsWidth = function (hiddenItem, isHidden, tabIndex) {
7052
+ if (this.selectedTab === tabIndex && this.activeLayout === 'Simplified') {
7053
+ var groupList = this.tabs[parseInt(tabIndex.toString(), 10)].groups;
7054
+ for (var i = 0; i < groupList.length; i++) {
7055
+ var group = groupList[parseInt(i.toString(), 10)];
7056
+ if (group.enableGroupOverflow) {
7057
+ var groupContainer = document.querySelector('#' + group.id);
7058
+ var overflowButton = void 0;
7059
+ var overflowDDB = groupContainer.querySelector('#' + group.id + GROUPOF_BUTTON_ID);
7060
+ if (overflowDDB) {
7061
+ overflowButton = getInstance(overflowDDB, DropDownButton);
7062
+ }
7063
+ if (overflowButton) {
7064
+ var overflowEle = overflowButton.target;
7065
+ var overflowItems = overflowEle.querySelectorAll('.e-ribbon-item');
7066
+ for (var i_9 = 0; i_9 < overflowItems.length; i_9++) {
7067
+ var previousWidth = parseInt(overflowItems[parseInt(i_9.toString(), 10)].getAttribute('data-simplified-width'), 10);
7068
+ if (previousWidth) {
7069
+ overflowItems[parseInt(i_9.toString(), 10)].setAttribute('data-simplified-width', isHidden ? (previousWidth - hiddenItem).toString() : (previousWidth + hiddenItem).toString());
7070
+ }
7071
+ }
7072
+ }
7073
+ }
7074
+ }
7075
+ }
7076
+ if (this.overflowDDB) {
7077
+ var selectedOFTab = document.querySelector('#' + this.tabs[parseInt(tabIndex.toString(), 10)].id + OVERFLOW_ID);
7078
+ var overflowEle = this.overflowDDB.target;
7079
+ var overflowItems = overflowEle.querySelectorAll('.e-ribbon-item');
7080
+ for (var i = 0; i < overflowItems.length; i++) {
7081
+ var ofTab = overflowItems[parseInt(i.toString(), 10)].closest('#' + this.tabs[parseInt(tabIndex.toString(), 10)].id + OVERFLOW_ID);
7082
+ if (selectedOFTab && ofTab && selectedOFTab.id === ofTab.id) {
7083
+ var previousWidth = parseInt(overflowItems[parseInt(i.toString(), 10)].getAttribute('data-simplified-width'), 10);
7084
+ if (previousWidth) {
7085
+ overflowItems[parseInt(i.toString(), 10)].setAttribute('data-simplified-width', isHidden ? (previousWidth - hiddenItem).toString() : (previousWidth + hiddenItem).toString());
7086
+ }
7087
+ }
7088
+ }
7089
+ }
6611
7090
  };
6612
7091
  /**
6613
7092
  * Disables a specific group within a ribbon tab.
@@ -6868,9 +7347,10 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
6868
7347
  }
6869
7348
  if (ele) {
6870
7349
  var itemEle = closest(ele, '.e-ribbon-item');
6871
- isHidden ? itemEle.classList.add('e-hidden') : itemEle.classList.remove('e-hidden');
6872
- this.checkHiddenItems(itemProp.group, isHidden, itemProp.tabIndex);
6873
- this.refreshLayout();
7350
+ this.updateHiddenElements(itemProp.tabIndex, isHidden ? 'hideItem' : 'showItem', itemId, isHidden, itemEle, itemProp.group);
7351
+ if (this.selectedTab === itemProp.tabIndex) {
7352
+ this.refreshLayout();
7353
+ }
6874
7354
  }
6875
7355
  else {
6876
7356
  this.updateInitialProps(itemProp.tabIndex, itemId, 'hiddenItems', isHidden);
@@ -7113,7 +7593,7 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
7113
7593
  }
7114
7594
  if (this.activeLayout === RibbonLayout.Simplified) {
7115
7595
  if (itemProp.group.enableGroupOverflow) {
7116
- if (dropdown.target.childElementCount === 0) {
7596
+ if (dropdown.target.childElementCount === 0 || (dropdown.target.childElementCount === 1 && this.isHeaderVisible(dropdown.target, itemProp.group.id))) {
7117
7597
  this.removeOverflowButton(dropdown);
7118
7598
  }
7119
7599
  }
@@ -7332,7 +7812,7 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
7332
7812
  }
7333
7813
  this.createRibbonItem(ribbonItem, itemContainer);
7334
7814
  if (this.activeLayout === 'Simplified' && itemProp.group.enableGroupOverflow) {
7335
- if (dropdown.target.childElementCount === 0) {
7815
+ if (dropdown.target.childElementCount === 0 || (dropdown.target.childElementCount === 1 && this.isHeaderVisible(dropdown.target, itemProp.group.id))) {
7336
7816
  this.removeOverflowButton(dropdown);
7337
7817
  }
7338
7818
  }
@@ -7437,6 +7917,9 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
7437
7917
  this.keyboardModuleRibbon.destroy();
7438
7918
  this.keyboardModuleRibbon = null;
7439
7919
  destroyTooltip(this.element);
7920
+ if (this.refreshing) {
7921
+ this.clearOverflowDropDown(this.selectedTab);
7922
+ }
7440
7923
  this.destroyTabItems(this.tabs);
7441
7924
  if (!this.hideLayoutSwitcher) {
7442
7925
  this.removeExpandCollapse();
@@ -7444,6 +7927,7 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
7444
7927
  this.collapseButton = undefined;
7445
7928
  if (this.scrollModule) {
7446
7929
  this.scrollModule.destroy();
7930
+ this.scrollModule = null;
7447
7931
  }
7448
7932
  if (this.ribbonTempEle) {
7449
7933
  remove(this.ribbonTempEle);
@@ -7453,6 +7937,8 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
7453
7937
  this.tabObj.destroy();
7454
7938
  this.tabObj = undefined;
7455
7939
  this.initialPropsData = {};
7940
+ this.hiddenGroups = [];
7941
+ this.hiddenElements = {};
7456
7942
  remove(this.element.querySelector('#' + this.element.id + TAB_ID));
7457
7943
  this.element.style.removeProperty(RIBBON_FILE_MENU_WIDTH);
7458
7944
  this.element.style.removeProperty(RIBBON_HELP_PANE_TEMPLATE_WIDTH);
@@ -8343,6 +8829,9 @@ var RibbonBackstage = /** @__PURE__ @class */ (function (_super) {
8343
8829
  this.closeBtn.setProperties(commonProp);
8344
8830
  }
8345
8831
  }
8832
+ if (this.footerMenuCtrl) {
8833
+ this.footerMenuCtrl.setProperties(commonProp);
8834
+ }
8346
8835
  }
8347
8836
  }
8348
8837
  };