@syncfusion/ej2-ribbon 25.2.5 → 26.1.38

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 (112) hide show
  1. package/.eslintrc.json +3 -2
  2. package/dist/ej2-ribbon.umd.min.js +2 -2
  3. package/dist/ej2-ribbon.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-ribbon.es2015.js +830 -593
  5. package/dist/es6/ej2-ribbon.es2015.js.map +1 -1
  6. package/dist/es6/ej2-ribbon.es5.js +821 -578
  7. package/dist/es6/ej2-ribbon.es5.js.map +1 -1
  8. package/dist/global/ej2-ribbon.min.js +2 -2
  9. package/dist/global/ej2-ribbon.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/package.json +13 -13
  12. package/src/ribbon/base/interface.d.ts +14 -0
  13. package/src/ribbon/base/ribbon-model.d.ts +1 -1
  14. package/src/ribbon/base/ribbon.d.ts +3 -1
  15. package/src/ribbon/base/ribbon.js +204 -95
  16. package/src/ribbon/items/ribbon-button.js +6 -1
  17. package/src/ribbon/items/ribbon-gallery.d.ts +15 -6
  18. package/src/ribbon/items/ribbon-gallery.js +164 -96
  19. package/src/ribbon/items/ribbon-groupbutton.d.ts +1 -0
  20. package/src/ribbon/items/ribbon-groupbutton.js +11 -3
  21. package/src/ribbon/models/ribbon-contextual-tab-settings-model.d.ts +1 -1
  22. package/src/ribbon/models/ribbon-gallery-group-model.d.ts +5 -5
  23. package/src/ribbon/models/ribbon-gallery-group.d.ts +2 -2
  24. package/src/ribbon/models/ribbon-gallery-group.js +2 -2
  25. package/src/ribbon/models/ribbon-gallery-item-model.d.ts +5 -5
  26. package/src/ribbon/models/ribbon-gallery-item.d.ts +1 -1
  27. package/src/ribbon/models/ribbon-gallery-item.js +1 -1
  28. package/src/ribbon/models/ribbon-gallery-settings-model.d.ts +1 -1
  29. package/src/ribbon/models/ribbon-gallery-settings.d.ts +3 -3
  30. package/src/ribbon/models/ribbon-gallery-settings.js +2 -2
  31. package/src/ribbon/modules/ribbon-backstage.d.ts +6 -3
  32. package/src/ribbon/modules/ribbon-backstage.js +65 -12
  33. package/src/ribbon/modules/ribbon-contextualtab.js +5 -2
  34. package/src/ribbon/modules/ribbon-keytip.d.ts +1 -0
  35. package/src/ribbon/modules/ribbon-keytip.js +58 -46
  36. package/styles/bootstrap-dark.css +477 -269
  37. package/styles/bootstrap-dark.scss +18 -1
  38. package/styles/bootstrap.css +481 -276
  39. package/styles/bootstrap.scss +18 -1
  40. package/styles/bootstrap4.css +480 -272
  41. package/styles/bootstrap4.scss +18 -1
  42. package/styles/bootstrap5-dark.css +495 -278
  43. package/styles/bootstrap5-dark.scss +18 -1
  44. package/styles/bootstrap5.css +495 -278
  45. package/styles/bootstrap5.scss +18 -1
  46. package/styles/fabric-dark.css +476 -269
  47. package/styles/fabric-dark.scss +18 -1
  48. package/styles/fabric.css +475 -272
  49. package/styles/fabric.scss +18 -1
  50. package/styles/fluent-dark.css +497 -277
  51. package/styles/fluent-dark.scss +18 -1
  52. package/styles/fluent.css +497 -277
  53. package/styles/fluent.scss +18 -1
  54. package/styles/fluent2.css +3893 -0
  55. package/styles/fluent2.scss +18 -0
  56. package/styles/highcontrast-light.css +470 -263
  57. package/styles/highcontrast-light.scss +17 -1
  58. package/styles/highcontrast.css +476 -273
  59. package/styles/highcontrast.scss +18 -1
  60. package/styles/material-dark.css +565 -283
  61. package/styles/material-dark.scss +18 -1
  62. package/styles/material.css +564 -289
  63. package/styles/material.scss +18 -1
  64. package/styles/material3-dark.css +521 -280
  65. package/styles/material3-dark.scss +18 -1
  66. package/styles/material3.css +521 -280
  67. package/styles/material3.scss +18 -1
  68. package/styles/ribbon/_bds-definition.scss +58 -20
  69. package/styles/ribbon/_bootstrap-dark-definition.scss +58 -20
  70. package/styles/ribbon/_bootstrap-definition.scss +59 -21
  71. package/styles/ribbon/_bootstrap4-definition.scss +59 -21
  72. package/styles/ribbon/_bootstrap5-definition.scss +59 -21
  73. package/styles/ribbon/_bootstrap5.3-definition.scss +398 -0
  74. package/styles/ribbon/_fabric-dark-definition.scss +57 -19
  75. package/styles/ribbon/_fabric-definition.scss +58 -20
  76. package/styles/ribbon/_fluent-definition.scss +61 -23
  77. package/styles/ribbon/_fluent2-definition.scss +398 -0
  78. package/styles/ribbon/_fusionnew-definition.scss +52 -14
  79. package/styles/ribbon/_highcontrast-definition.scss +60 -22
  80. package/styles/ribbon/_highcontrast-light-definition.scss +51 -13
  81. package/styles/ribbon/_layout.scss +371 -399
  82. package/styles/ribbon/_material-dark-definition.scss +58 -20
  83. package/styles/ribbon/_material-definition.scss +58 -20
  84. package/styles/ribbon/_material3-definition.scss +58 -19
  85. package/styles/ribbon/_tailwind-definition.scss +58 -20
  86. package/styles/ribbon/_theme.scss +118 -170
  87. package/styles/ribbon/bootstrap-dark.css +477 -269
  88. package/styles/ribbon/bootstrap.css +481 -276
  89. package/styles/ribbon/bootstrap4.css +480 -272
  90. package/styles/ribbon/bootstrap5-dark.css +495 -278
  91. package/styles/ribbon/bootstrap5.css +495 -278
  92. package/styles/ribbon/fabric-dark.css +476 -269
  93. package/styles/ribbon/fabric.css +475 -272
  94. package/styles/ribbon/fluent-dark.css +497 -277
  95. package/styles/ribbon/fluent.css +497 -277
  96. package/styles/ribbon/fluent2.css +3893 -0
  97. package/styles/ribbon/fluent2.scss +18 -0
  98. package/styles/ribbon/highcontrast-light.css +470 -263
  99. package/styles/ribbon/highcontrast.css +476 -273
  100. package/styles/ribbon/icons/_bootstrap5.3.scss +9 -0
  101. package/styles/ribbon/icons/_fluent2.scss +9 -0
  102. package/styles/ribbon/material-dark.css +565 -283
  103. package/styles/ribbon/material.css +564 -289
  104. package/styles/ribbon/material3-dark.css +521 -280
  105. package/styles/ribbon/material3.css +521 -280
  106. package/styles/ribbon/tailwind-dark.css +531 -280
  107. package/styles/ribbon/tailwind.css +531 -280
  108. package/styles/tailwind-dark.css +531 -280
  109. package/styles/tailwind-dark.scss +18 -1
  110. package/styles/tailwind.css +531 -280
  111. package/styles/tailwind.scss +18 -1
  112. package/CHANGELOG.md +0 -101
@@ -410,7 +410,7 @@ var Ribbon = /** @class */ (function (_super) {
410
410
  this.ribbonKeyTipModule.removeKeytip();
411
411
  }
412
412
  };
413
- Ribbon.prototype.mouseEventHandler = function (e) {
413
+ Ribbon.prototype.mouseEventHandler = function () {
414
414
  if (this.ribbonKeyTipModule && this.enableKeyTips) {
415
415
  this.ribbonKeyTipModule.removeKeytip();
416
416
  }
@@ -486,25 +486,24 @@ var Ribbon = /** @class */ (function (_super) {
486
486
  Ribbon.prototype.addKeyTip = function (tabIndex, keyTip, id, type) {
487
487
  if (this.keyTipElements && this.keyTipElements[parseInt(tabIndex.toString(), 10)]) {
488
488
  var isKeyTipExist = false;
489
- /* eslint-disable */
490
- if (!(this.keyTipElements[parseInt(tabIndex.toString(), 10)][type])) {
491
- this.keyTipElements[parseInt(tabIndex.toString(), 10)][type] = [];
489
+ if (!(this.keyTipElements[parseInt(tabIndex.toString(), 10)]["" + type])) {
490
+ this.keyTipElements[parseInt(tabIndex.toString(), 10)]["" + type] = [];
492
491
  }
493
- if (Object.keys(this.keyTipElements[tabIndex][type]).length) {
494
- var keytipData = this.keyTipElements[tabIndex][type];
495
- for (var i = 0; i < Object.keys(this.keyTipElements[tabIndex][type]).length; i++) {
492
+ if (Object.keys(this.keyTipElements[parseInt(tabIndex.toString(), 10)]["" + type]).length) {
493
+ var keytipData = this.keyTipElements[parseInt(tabIndex.toString(), 10)]["" + type];
494
+ for (var i = 0; i < Object.keys(this.keyTipElements[parseInt(tabIndex.toString(), 10)]["" + type]).length; i++) {
496
495
  if (keytipData[parseInt(i.toString(), 10)].id === id) {
497
496
  isKeyTipExist = true;
498
497
  }
499
498
  }
500
499
  if (!isKeyTipExist) {
501
- this.keyTipElements[tabIndex][type].push({ id: id, type: type, keyTip: keyTip });
500
+ this.keyTipElements[parseInt(tabIndex.toString(), 10)]["" + type].
501
+ push({ id: id, type: type, keyTip: keyTip });
502
502
  }
503
503
  }
504
504
  else {
505
- this.keyTipElements[tabIndex][type].push({ id: id, type: type, keyTip: keyTip });
505
+ this.keyTipElements[parseInt(tabIndex.toString(), 10)]["" + type].push({ id: id, type: type, keyTip: keyTip });
506
506
  }
507
- /* eslint-enable */
508
507
  }
509
508
  };
510
509
  Ribbon.prototype.renderTabs = function () {
@@ -573,6 +572,11 @@ var Ribbon = /** @class */ (function (_super) {
573
572
  var selectedTabId = e.selectedItem.getAttribute('data-id');
574
573
  var selectedIndex = getIndex(this.tabs, (function (tab) { return (tab.id === selectedTabId); }));
575
574
  selectedIndex = selectedIndex === -1 ? this.selectedTab : selectedIndex;
575
+ var selectedContent = this.tabObj.items[parseInt(selectedIndex.toString(), 10)].content;
576
+ if ((!selectedContent.querySelector('.' + constants.RIBBON_GROUP)) && (this.tabs[parseInt(selectedIndex.toString(), 10)].groups.length !== 0)) {
577
+ var elements = this.createGroups(this.tabs[parseInt(selectedIndex.toString(), 10)].groups, selectedIndex);
578
+ append(elements, selectedContent);
579
+ }
576
580
  var isContextual = this.isContextualTab(selectedTabId);
577
581
  this.updateSelectedState(selectedTabId);
578
582
  var eventArgs = { previousIndex: this.selectedTab, selectedIndex: selectedIndex, isContextual: isContextual };
@@ -591,10 +595,10 @@ var Ribbon = /** @class */ (function (_super) {
591
595
  this.isUpdateItems = false;
592
596
  }
593
597
  }
594
- this.checkOverflow(selectedIndex, e.selectedContent.firstChild);
595
- if (this.activeLayout === 'Classic' && this.ribbonGalleryModule) {
596
- this.ribbonGalleryModule.checkAvailableHeight(selectedIndex, e.selectedContent.firstChild);
598
+ if (this.ribbonGalleryModule) {
599
+ this.ribbonGalleryModule.checkAvailableHeight(e.selectedContent.firstChild);
597
600
  }
601
+ this.checkOverflow(selectedIndex, selectedContent);
598
602
  if (this.activeLayout === 'Simplified' && this.overflowDDB) {
599
603
  var overflowTarget = this.overflowDDB.target;
600
604
  var ofTabContainer = overflowTarget.querySelector('.' + constants.RIBBON_TAB_ACTIVE);
@@ -623,7 +627,8 @@ var Ribbon = /** @class */ (function (_super) {
623
627
  break;
624
628
  }
625
629
  }
626
- this.contextualTabs[parseInt(i.toString(), 10)].setProperties({ isSelected: isSelected }, true);
630
+ this.contextualTabs[parseInt(i.toString(), 10)].
631
+ setProperties({ isSelected: isSelected }, true);
627
632
  }
628
633
  }
629
634
  };
@@ -821,7 +826,8 @@ var Ribbon = /** @class */ (function (_super) {
821
826
  item.setProperties({ activeSize: RibbonItemSize.Medium }, true);
822
827
  this.setItemSize(itemEle, item);
823
828
  }
824
- if ((item.type === RibbonItemType.DropDown) || (item.type === RibbonItemType.SplitButton) || (item.type === RibbonItemType.GroupButton) || (item.type === RibbonItemType.Gallery)) {
829
+ if ((item.type === RibbonItemType.DropDown) || (item.type === RibbonItemType.SplitButton) ||
830
+ (item.type === RibbonItemType.GroupButton) || (item.type === RibbonItemType.Gallery)) {
825
831
  this.updatePopupItems(item, itemContainer, group.enableGroupOverflow, true);
826
832
  }
827
833
  }
@@ -851,6 +857,7 @@ var Ribbon = /** @class */ (function (_super) {
851
857
  return isEmptyCollection;
852
858
  };
853
859
  Ribbon.prototype.updatePopupItems = function (item, itemEle, isGroupOF, isMenu) {
860
+ var _this = this;
854
861
  var dropdown = getComponent(itemEle.querySelector('#' + item.id), (item.type === RibbonItemType.DropDown || item.type === RibbonItemType.Gallery || item.type === RibbonItemType.GroupButton) ? DropDownButton : SplitButton);
855
862
  var dropDownPopup = dropdown.dropDown;
856
863
  // popup is on right if (isGroupOF && isMenu)
@@ -862,6 +869,9 @@ var Ribbon = /** @class */ (function (_super) {
862
869
  if (isMenu) {
863
870
  dropdown.beforeOpen = function () {
864
871
  if (isLeft) {
872
+ if (item.type === RibbonItemType.Gallery && _this.ribbonGalleryModule) {
873
+ _this.ribbonGalleryModule.checkCollision(dropDownPopup, dropDownPopup.element);
874
+ }
865
875
  dropDownPopup.element.style.setProperty('visibility', 'hidden');
866
876
  dropDownPopup.element.style.setProperty('display', 'block');
867
877
  dropDownPopup.setProperties({ offsetX: -1 * dropDownPopup.element.offsetWidth });
@@ -917,7 +927,8 @@ var Ribbon = /** @class */ (function (_super) {
917
927
  break;
918
928
  }
919
929
  var groupEle = tabContent.querySelector('#' + collection.id);
920
- if ((item.type === RibbonItemType.DropDown) || (item.type === RibbonItemType.SplitButton) || (item.type === RibbonItemType.GroupButton) || (item.type === RibbonItemType.Gallery)) {
930
+ if ((item.type === RibbonItemType.DropDown) || (item.type === RibbonItemType.SplitButton) ||
931
+ (item.type === RibbonItemType.GroupButton) || (item.type === RibbonItemType.Gallery)) {
921
932
  this.updatePopupItems(item, itemContainer, group.enableGroupOverflow, false);
922
933
  }
923
934
  groupEle.append(itemContainer);
@@ -962,7 +973,8 @@ var Ribbon = /** @class */ (function (_super) {
962
973
  }
963
974
  if (overflowDDB) {
964
975
  if (group.enableGroupOverflow) {
965
- if (overflowtarget.childElementCount === 0 || (overflowtarget.childElementCount === 1 && this.isHeaderVisible(overflowtarget, group.id))) {
976
+ if (overflowtarget.childElementCount === 0 ||
977
+ (overflowtarget.childElementCount === 1 && this.isHeaderVisible(overflowtarget, group.id))) {
966
978
  this.removeOverflowButton(overflowDDB);
967
979
  }
968
980
  }
@@ -1075,8 +1087,12 @@ var Ribbon = /** @class */ (function (_super) {
1075
1087
  overflowBtnTarget.classList.add('e-hide-group');
1076
1088
  }
1077
1089
  }
1078
- isResize ? overflowBtnTarget.insertBefore(itemEle, overflowBtnTarget.querySelector('.' + constants.RIBBON_ITEM))
1079
- : overflowBtnTarget.append(itemEle);
1090
+ if (isResize) {
1091
+ overflowBtnTarget.insertBefore(itemEle, overflowBtnTarget.querySelector('.' + constants.RIBBON_ITEM));
1092
+ }
1093
+ else {
1094
+ overflowBtnTarget.append(itemEle);
1095
+ }
1080
1096
  }
1081
1097
  else {
1082
1098
  if (!this.overflowDDB) {
@@ -1088,7 +1104,8 @@ var Ribbon = /** @class */ (function (_super) {
1088
1104
  else {
1089
1105
  this.overflowDDB.element.classList.remove(constants.HIDE_CSS);
1090
1106
  var overflowEle = this.overflowDDB.target;
1091
- var ofTabContainer = overflowEle.querySelector('#' + this.tabs[parseInt(tabIndex.toString(), 10)].id + constants.OVERFLOW_ID);
1107
+ var ofTabContainer = overflowEle.querySelector('#' +
1108
+ this.tabs[parseInt(tabIndex.toString(), 10)].id + constants.OVERFLOW_ID);
1092
1109
  if (ofTabContainer) {
1093
1110
  var ofGroupContainer = overflowEle.querySelector('#' + groupId + constants.CONTAINER_ID);
1094
1111
  if (!ofGroupContainer) {
@@ -1106,7 +1123,12 @@ var Ribbon = /** @class */ (function (_super) {
1106
1123
  }
1107
1124
  ofTabContainer.append(ofGroupContainer);
1108
1125
  }
1109
- isResize ? ofGroupContainer.insertBefore(itemEle, ofGroupContainer.querySelector('.' + constants.RIBBON_ITEM)) : ofGroupContainer.append(itemEle);
1126
+ if (isResize) {
1127
+ ofGroupContainer.insertBefore(itemEle, ofGroupContainer.querySelector('.' + constants.RIBBON_ITEM));
1128
+ }
1129
+ else {
1130
+ ofGroupContainer.append(itemEle);
1131
+ }
1110
1132
  }
1111
1133
  else {
1112
1134
  this.createOfTabContainer(groupId, groupHeader, itemEle, tabIndex);
@@ -1146,7 +1168,7 @@ var Ribbon = /** @class */ (function (_super) {
1146
1168
  break;
1147
1169
  case 'Gallery':
1148
1170
  if (this.activeLayout === 'Simplified') {
1149
- this.ribbonGalleryModule.addOverFlowEvents(item, itemEle, overflowButton);
1171
+ this.ribbonGalleryModule.addOverFlowEvents(item, itemEle);
1150
1172
  }
1151
1173
  break;
1152
1174
  case 'GroupButton':
@@ -1164,7 +1186,8 @@ var Ribbon = /** @class */ (function (_super) {
1164
1186
  var overflowtarget = this.overflowDDB.target;
1165
1187
  overflowtarget.append(ofTabContainer);
1166
1188
  var itemProp = getGroup(this.tabs, groupId);
1167
- var ofGroupContainer = itemProp.group.overflowHeader ? this.createGroupContainer(groupId, itemProp.group.overflowHeader) : this.createGroupContainer(groupId, groupHeader);
1189
+ var ofGroupContainer = itemProp.group.overflowHeader ?
1190
+ this.createGroupContainer(groupId, itemProp.group.overflowHeader) : this.createGroupContainer(groupId, groupHeader);
1168
1191
  ofGroupContainer.append(itemEle);
1169
1192
  ofTabContainer.append(ofGroupContainer);
1170
1193
  if (tabIndex === this.selectedTab) {
@@ -1522,7 +1545,12 @@ var Ribbon = /** @class */ (function (_super) {
1522
1545
  }
1523
1546
  var item = collection.items[parseInt(l.toString(), 10)];
1524
1547
  if (canReduceItem(item)) {
1525
- item.type !== RibbonItemType.GroupButton ? setWidth(item.id) : setWidth(item.id + constants.RIBBON_GROUP_BUTTON_ID);
1548
+ if (item.type !== RibbonItemType.GroupButton) {
1549
+ setWidth(item.id);
1550
+ }
1551
+ else {
1552
+ setWidth(item.id + constants.RIBBON_GROUP_BUTTON_ID);
1553
+ }
1526
1554
  reduceItemsToSmall(k, l, l);
1527
1555
  if (!shouldSkip && (tabContent.offsetWidth > activeContent.offsetWidth)) {
1528
1556
  return true;
@@ -1775,7 +1803,12 @@ var Ribbon = /** @class */ (function (_super) {
1775
1803
  };
1776
1804
  Ribbon.prototype.handleContentSize = function (itemEle, isRemoveOverflow) {
1777
1805
  var itemContainer = itemEle.closest('.' + constants.RIBBON_GROUP_CONTENT);
1778
- (isRemoveOverflow ? (itemContainer.classList.add(constants.RIBBON_CONTENT_HEIGHT)) : (itemContainer.classList.remove(constants.RIBBON_CONTENT_HEIGHT)));
1806
+ if (isRemoveOverflow) {
1807
+ itemContainer.classList.add(constants.RIBBON_CONTENT_HEIGHT);
1808
+ }
1809
+ else {
1810
+ itemContainer.classList.remove(constants.RIBBON_CONTENT_HEIGHT);
1811
+ }
1779
1812
  };
1780
1813
  Ribbon.prototype.setItemSize = function (itemEle, item) {
1781
1814
  if (itemEle) {
@@ -1977,14 +2010,15 @@ var Ribbon = /** @class */ (function (_super) {
1977
2010
  Ribbon.prototype.ribbonTabSelecting = function (e) {
1978
2011
  var _this = this;
1979
2012
  this.currentControlIndex = 0;
1980
- var nextTabId = e.selectingItem.getAttribute('data-id');
2013
+ var nextTabId = e.selectingItem ? e.selectingItem.getAttribute('data-id') : null;
1981
2014
  var previousTabId = e.previousItem.getAttribute('data-id');
1982
2015
  var nextIndex = getIndex(this.tabs, (function (tab) { return (tab.id === nextTabId); }));
1983
2016
  var isContextual = this.isContextualTab(nextTabId);
1984
2017
  var previousIndex = getIndex(this.tabs, (function (tab) { return (tab.id === previousTabId); }));
1985
2018
  nextIndex = nextIndex === -1 ? this.selectedTab : nextIndex;
1986
2019
  var eventArgs = {
1987
- cancel: e.cancel, isInteracted: e.isInteracted, previousIndex: previousIndex, selectedIndex: nextIndex, isContextual: isContextual
2020
+ cancel: e.cancel, isInteracted: e.isInteracted, previousIndex: previousIndex,
2021
+ selectedIndex: nextIndex, isContextual: isContextual
1988
2022
  };
1989
2023
  this.trigger('tabSelecting', eventArgs, function (args) {
1990
2024
  if (args.cancel) {
@@ -2042,9 +2076,10 @@ var Ribbon = /** @class */ (function (_super) {
2042
2076
  this.element.classList.add(constants.RIBBON_SIMPLIFIED_MODE);
2043
2077
  }
2044
2078
  var activeContent = this.tabObj.element.querySelector('#' + this.tabs[this.selectedTab].id + constants.CONTENT_ID);
2079
+ if (this.ribbonGalleryModule) {
2080
+ this.ribbonGalleryModule.checkAvailableHeight(activeContent);
2081
+ }
2045
2082
  this.checkOverflow(this.selectedTab, activeContent);
2046
- if (this.activeLayout === 'Classic' && this.ribbonGalleryModule)
2047
- this.ribbonGalleryModule.checkAvailableHeight(this.selectedTab, activeContent);
2048
2083
  };
2049
2084
  Ribbon.prototype.addOverflowButton = function (btnId, isGroupOF) {
2050
2085
  var _this = this;
@@ -2102,7 +2137,8 @@ var Ribbon = /** @class */ (function (_super) {
2102
2137
  items = currentList.getElementsByClassName('e-ribbon-item');
2103
2138
  }
2104
2139
  var control = items[(!this.itemIndex || this.itemIndex < 0) ? 0 : this.itemIndex].querySelector('.e-control');
2105
- var comboBoxEle = control && control.classList.contains('e-combobox') ? items[(!this.itemIndex || this.itemIndex < 0) ? 0 : this.itemIndex].querySelector('.e-combobox') : null;
2140
+ var comboBoxEle = control && control.classList.contains('e-combobox') ?
2141
+ items[(!this.itemIndex || this.itemIndex < 0) ? 0 : this.itemIndex].querySelector('.e-combobox') : null;
2106
2142
  var ribbonItem;
2107
2143
  var templateEle;
2108
2144
  if (comboBoxEle === null || (e.key === 'Tab') || this.itemIndex < 0) {
@@ -2159,7 +2195,7 @@ var Ribbon = /** @class */ (function (_super) {
2159
2195
  target.setAttribute('index', this.itemIndex.toString());
2160
2196
  }
2161
2197
  var currentItemIndex = parseInt(target.getAttribute('index'), 10);
2162
- var itemType = "";
2198
+ var itemType = '';
2163
2199
  var controlItem = items[parseInt(currentItemIndex.toString(), 10)] ? items[parseInt(currentItemIndex.toString(), 10)].querySelector('.e-control') : null;
2164
2200
  if (controlItem) {
2165
2201
  itemType = controlItem.getAttribute('data-control');
@@ -2189,12 +2225,20 @@ var Ribbon = /** @class */ (function (_super) {
2189
2225
  }
2190
2226
  if (((itemType === 'SplitButton') && (e.key === 'ArrowRight' || e.key === 'ArrowLeft'))) {
2191
2227
  if (e.key === 'ArrowRight') {
2192
- this.enableRtl ? items[parseInt(currentItemIndex.toString(), 10)].querySelector('.e-control').focus() :
2228
+ if (this.enableRtl) {
2229
+ items[parseInt(currentItemIndex.toString(), 10)].querySelector('.e-control').focus();
2230
+ }
2231
+ else {
2193
2232
  items[parseInt(currentItemIndex.toString(), 10)].querySelector('.e-dropdown-btn').focus();
2233
+ }
2194
2234
  }
2195
2235
  if (e.key === 'ArrowLeft') {
2196
- this.enableRtl ? items[parseInt(currentItemIndex.toString(), 10)].querySelector('.e-dropdown-btn').focus() :
2236
+ if (this.enableRtl) {
2237
+ items[parseInt(currentItemIndex.toString(), 10)].querySelector('.e-dropdown-btn').focus();
2238
+ }
2239
+ else {
2197
2240
  items[parseInt(currentItemIndex.toString(), 10)].querySelector('.e-control').focus();
2241
+ }
2198
2242
  }
2199
2243
  }
2200
2244
  if (e.key === 'Enter') {
@@ -2305,7 +2349,8 @@ var Ribbon = /** @class */ (function (_super) {
2305
2349
  Ribbon.prototype.reRenderTabs = function (tabs) {
2306
2350
  this.destroyScroll();
2307
2351
  this.checkID(this.tabs, 'tab', this.element.id);
2308
- for (var key in tabs) {
2352
+ for (var _i = 0, _a = Object.keys(tabs); _i < _a.length; _i++) {
2353
+ var key = _a[_i];
2309
2354
  var index = parseInt(key, 10);
2310
2355
  var tab = tabs[parseInt(index.toString(), 10)];
2311
2356
  var isNewTab = false;
@@ -2350,13 +2395,13 @@ var Ribbon = /** @class */ (function (_super) {
2350
2395
  }
2351
2396
  // Check whether group is passed by the user, and if it is, then remove the old values.
2352
2397
  if (tab.groups) {
2353
- for (var _i = 0, groups_1 = groups; _i < groups_1.length; _i++) {
2354
- var group = groups_1[_i];
2398
+ for (var _b = 0, groups_1 = groups; _b < groups_1.length; _b++) {
2399
+ var group = groups_1[_b];
2355
2400
  var dropdownElement = group.isCollapsed ? contentEle.querySelector('#' + group.id + constants.OVERFLOW_ID + constants.DROPDOWN_ID) : null;
2356
- for (var _a = 0, _b = group.collections; _a < _b.length; _a++) {
2357
- var collection = _b[_a];
2358
- for (var _c = 0, _d = collection.items; _c < _d.length; _c++) {
2359
- var item = _d[_c];
2401
+ for (var _c = 0, _d = group.collections; _c < _d.length; _c++) {
2402
+ var collection = _d[_c];
2403
+ for (var _e = 0, _f = collection.items; _e < _f.length; _e++) {
2404
+ var item = _f[_e];
2360
2405
  var ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id) : contentEle.querySelector('#' + item.id);
2361
2406
  if (ele) {
2362
2407
  this.destroyFunction(item, ele);
@@ -2454,7 +2499,8 @@ var Ribbon = /** @class */ (function (_super) {
2454
2499
  itemEle = groupContainer.querySelector('#' + item.id + constants.CONTAINER_ID);
2455
2500
  if (item.displayOptions === (DisplayMode.Classic | DisplayMode.Overflow)) {
2456
2501
  this.createOverflowPopup(item, tabIndex, group.enableGroupOverflow, group.id, group.header, itemEle, groupContainer);
2457
- if ((item.type === RibbonItemType.DropDown) || (item.type === RibbonItemType.SplitButton) || (item.type === RibbonItemType.GroupButton) || (item.type === RibbonItemType.Gallery)) {
2502
+ if ((item.type === RibbonItemType.DropDown) || (item.type === RibbonItemType.SplitButton) ||
2503
+ (item.type === RibbonItemType.GroupButton) || (item.type === RibbonItemType.Gallery)) {
2458
2504
  this.updatePopupItems(item, itemEle, group.enableGroupOverflow, true);
2459
2505
  }
2460
2506
  }
@@ -2553,7 +2599,8 @@ var Ribbon = /** @class */ (function (_super) {
2553
2599
  var itemEle = groupContainer.querySelector('#' + item.id + constants.CONTAINER_ID);
2554
2600
  if (!itemEle && overflowtarget) {
2555
2601
  itemEle = overflowtarget.querySelector('#' + item.id + constants.CONTAINER_ID);
2556
- if ((item.type === RibbonItemType.DropDown) || (item.type === RibbonItemType.SplitButton) || (item.type === RibbonItemType.GroupButton) || (item.type === RibbonItemType.Gallery)) {
2602
+ if ((item.type === RibbonItemType.DropDown) || (item.type === RibbonItemType.SplitButton) ||
2603
+ (item.type === RibbonItemType.GroupButton) || (item.type === RibbonItemType.Gallery)) {
2557
2604
  this.updatePopupItems(item, itemEle, group.enableGroupOverflow, false);
2558
2605
  }
2559
2606
  this.removeOverflowEvent(item, itemEle);
@@ -2578,7 +2625,8 @@ var Ribbon = /** @class */ (function (_super) {
2578
2625
  }
2579
2626
  }
2580
2627
  if (group.enableGroupOverflow && overflowDDB) {
2581
- if (overflowtarget.childElementCount === 0 || (overflowtarget.childElementCount === 1 && this.isHeaderVisible(overflowtarget, group.id))) {
2628
+ if (overflowtarget.childElementCount === 0 ||
2629
+ (overflowtarget.childElementCount === 1 && this.isHeaderVisible(overflowtarget, group.id))) {
2582
2630
  this.removeOverflowButton(overflowDDB);
2583
2631
  }
2584
2632
  }
@@ -2691,7 +2739,12 @@ var Ribbon = /** @class */ (function (_super) {
2691
2739
  // eslint-disable-next-line
2692
2740
  var groupIndex = initialProps[key].indexOf(groupEle.id);
2693
2741
  if (groupIndex !== -1) {
2694
- key === 'hiddenGroups' ? groupEle.classList.add('e-hidden') : groupEle.classList.add('e-disabled');
2742
+ if (key === 'hiddenGroups') {
2743
+ groupEle.classList.add('e-hidden');
2744
+ }
2745
+ else {
2746
+ groupEle.classList.add('e-disabled');
2747
+ }
2695
2748
  }
2696
2749
  };
2697
2750
  Ribbon.prototype.validateItemSize = function () {
@@ -2816,7 +2869,8 @@ var Ribbon = /** @class */ (function (_super) {
2816
2869
  }
2817
2870
  if (item.type === RibbonItemType.GroupButton) {
2818
2871
  for (var i_7 = 0; i_7 < item.groupButtonSettings.items.length; i_7++) {
2819
- if (this.keyTipElements[parseInt(tabIndex.toString(), 10)] && item.groupButtonSettings.items[parseInt(i_7.toString(), 10)].keyTip) {
2872
+ if (this.keyTipElements[parseInt(tabIndex.toString(), 10)] &&
2873
+ item.groupButtonSettings.items[parseInt(i_7.toString(), 10)].keyTip) {
2820
2874
  this.addKeyTip(tabIndex, item.groupButtonSettings.items[parseInt(i_7.toString(), 10)].keyTip, item.id + (constants.RIBBON_GROUP_BUTTON_ID + i_7), 'item');
2821
2875
  }
2822
2876
  }
@@ -2853,7 +2907,8 @@ var Ribbon = /** @class */ (function (_super) {
2853
2907
  this.createRibbonItem(item, itemEle);
2854
2908
  if ((this.activeLayout === 'Simplified') && ((item.displayOptions === DisplayMode.Overflow) || (item.displayOptions === (DisplayMode.Classic | DisplayMode.Overflow)))) {
2855
2909
  this.createOverflowPopup(item, tabIndex, isGroupOF, groupId, groupHeader, itemEle, groupContainer);
2856
- if ((item.type === RibbonItemType.DropDown) || (item.type === RibbonItemType.SplitButton) || (item.type === RibbonItemType.GroupButton) || (item.type === RibbonItemType.Gallery)) {
2910
+ if ((item.type === RibbonItemType.DropDown) || (item.type === RibbonItemType.SplitButton) ||
2911
+ (item.type === RibbonItemType.GroupButton) || (item.type === RibbonItemType.Gallery)) {
2857
2912
  this.updatePopupItems(item, itemEle, isGroupOF, true);
2858
2913
  }
2859
2914
  }
@@ -3073,8 +3128,8 @@ var Ribbon = /** @class */ (function (_super) {
3073
3128
  ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id) :
3074
3129
  contentEle.querySelector('#' + item.id);
3075
3130
  if (item.type === RibbonItemType.GroupButton) {
3076
- ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id + constants.RIBBON_GROUP_BUTTON_ID) :
3077
- contentEle.querySelector('#' + item.id + constants.RIBBON_GROUP_BUTTON_ID);
3131
+ ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id +
3132
+ constants.RIBBON_GROUP_BUTTON_ID) : contentEle.querySelector('#' + item.id + constants.RIBBON_GROUP_BUTTON_ID);
3078
3133
  }
3079
3134
  if (item.type === RibbonItemType.Gallery) {
3080
3135
  ele = contentEle.querySelector('#' + item.id + constants.CONTAINER_ID);
@@ -3241,6 +3296,7 @@ var Ribbon = /** @class */ (function (_super) {
3241
3296
  * Shows a specific tab in the ribbon.
3242
3297
  *
3243
3298
  * @param {string} tabId - The ID of the tab to be shown.
3299
+ * @param {boolean} isContextual - The boolean if the rendering is contextual.
3244
3300
  * @returns {void}
3245
3301
  */
3246
3302
  Ribbon.prototype.showTab = function (tabId, isContextual) {
@@ -3251,6 +3307,7 @@ var Ribbon = /** @class */ (function (_super) {
3251
3307
  * Hides a specific tab in the ribbon.
3252
3308
  *
3253
3309
  * @param {string} tabId - The ID of the tab to be hidden.
3310
+ * @param {boolean} isContextual - The boolean if the rendering is contextual.
3254
3311
  * @returns {void}
3255
3312
  */
3256
3313
  Ribbon.prototype.hideTab = function (tabId, isContextual) {
@@ -3276,7 +3333,9 @@ var Ribbon = /** @class */ (function (_super) {
3276
3333
  if (contextualTab_1) {
3277
3334
  var isTabHidden = true;
3278
3335
  var _loop_5 = function (i) {
3279
- var index_1 = getIndex(this_5.tabs, function (e) { return e.id === contextualTab_1.tabs[parseInt(i.toString(), 10)].id; });
3336
+ var index_1 = getIndex(this_5.tabs, function (e) {
3337
+ return e.id === contextualTab_1.tabs[parseInt(i.toString(), 10)].id;
3338
+ });
3280
3339
  if (index_1 !== -1) {
3281
3340
  var toolbarEle = tabEle.querySelectorAll('.e-toolbar-item')[parseInt(index_1.toString(), 10)];
3282
3341
  if (!(toolbarEle.classList.contains('e-hidden'))) {
@@ -3320,6 +3379,9 @@ var Ribbon = /** @class */ (function (_super) {
3320
3379
  if (index === -1) {
3321
3380
  return;
3322
3381
  }
3382
+ var tbItems = this.tabObj.items[parseInt(index.toString(), 10)].content;
3383
+ this.tabObj.element.querySelector('#' + tabId + constants.HEADER_ID).classList[value ? 'remove' : 'add']('e-disabled');
3384
+ tbItems.classList[value ? 'remove' : 'add']('e-disabled');
3323
3385
  this.tabObj.enableTab(index, value);
3324
3386
  };
3325
3387
  /**
@@ -3365,8 +3427,8 @@ var Ribbon = /** @class */ (function (_super) {
3365
3427
  var item = _d[_c];
3366
3428
  var ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id) : contentEle.querySelector('#' + item.id);
3367
3429
  if (item.type === RibbonItemType.GroupButton && this.activeLayout === 'Classic') {
3368
- ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id + constants.RIBBON_GROUP_BUTTON_ID) :
3369
- contentEle.querySelector('#' + item.id + constants.RIBBON_GROUP_BUTTON_ID);
3430
+ ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id +
3431
+ constants.RIBBON_GROUP_BUTTON_ID) : contentEle.querySelector('#' + item.id + constants.RIBBON_GROUP_BUTTON_ID);
3370
3432
  }
3371
3433
  if (ele) {
3372
3434
  this.destroyFunction(item, ele);
@@ -3464,7 +3526,8 @@ var Ribbon = /** @class */ (function (_super) {
3464
3526
  }
3465
3527
  if (this.activeLayout === RibbonLayout.Simplified) {
3466
3528
  if (itemProp.group.enableGroupOverflow) {
3467
- if (dropdown.target.childElementCount === 0 || (dropdown.target.childElementCount === 1 && this.isHeaderVisible(dropdown.target, itemProp.group.id))) {
3529
+ if (dropdown.target.childElementCount === 0 || (dropdown.target.childElementCount
3530
+ === 1 && this.isHeaderVisible(dropdown.target, itemProp.group.id))) {
3468
3531
  this.removeOverflowButton(dropdown);
3469
3532
  }
3470
3533
  }
@@ -3537,13 +3600,23 @@ var Ribbon = /** @class */ (function (_super) {
3537
3600
  overflowtarget = overflowDDB.target;
3538
3601
  }
3539
3602
  if (overflowtarget) {
3540
- isHidden ? overflowtarget.classList.add('e-hidden') : overflowtarget.classList.remove('e-hidden');
3603
+ if (isHidden) {
3604
+ overflowtarget.classList.add('e-hidden');
3605
+ }
3606
+ else {
3607
+ overflowtarget.classList.remove('e-hidden');
3608
+ }
3541
3609
  }
3542
3610
  }
3543
3611
  else if (ofTabContainer) {
3544
3612
  var grpContainer = ofTabContainer.querySelector('#' + groupID + constants.CONTAINER_ID);
3545
3613
  if (grpContainer) {
3546
- isHidden ? grpContainer.classList.add('e-hidden') : grpContainer.classList.remove('e-hidden');
3614
+ if (isHidden) {
3615
+ grpContainer.classList.add('e-hidden');
3616
+ }
3617
+ else {
3618
+ grpContainer.classList.remove('e-hidden');
3619
+ }
3547
3620
  }
3548
3621
  }
3549
3622
  }
@@ -3581,38 +3654,35 @@ var Ribbon = /** @class */ (function (_super) {
3581
3654
  hiddenProps = this.hiddenElements[parseInt(tabIndex.toString(), 10)];
3582
3655
  }
3583
3656
  if (hiddenProps) {
3584
- /* eslint-disable */
3585
- if (!hiddenProps[key]) {
3586
- hiddenProps[key] = [];
3657
+ if (!hiddenProps["" + key]) {
3658
+ hiddenProps["" + key] = [];
3587
3659
  }
3588
- if (hiddenProps[key].length) {
3589
- var index = hiddenProps[key].indexOf(id);
3660
+ if (hiddenProps["" + key].length) {
3661
+ var index = hiddenProps["" + key].indexOf(id);
3590
3662
  if (index === -1) {
3591
- hiddenProps[key].push(id);
3663
+ hiddenProps["" + key].push(id);
3592
3664
  }
3593
3665
  }
3594
3666
  else {
3595
- hiddenProps[key].push(id);
3667
+ hiddenProps["" + key].push(id);
3596
3668
  }
3597
- /* eslint-enable */
3598
3669
  }
3599
3670
  }
3600
3671
  };
3601
3672
  Ribbon.prototype.updateItemsSimplifiedWidth = function (tabIndex, key) {
3602
3673
  var hiddenProps = this.hiddenElements[parseInt(tabIndex.toString(), 10)];
3603
- /* eslint-disable */
3604
- if (hiddenProps && hiddenProps[key] && hiddenProps[key].length) {
3674
+ if (hiddenProps && hiddenProps["" + key] && hiddenProps["" + key].length) {
3605
3675
  var _loop_6 = function (i) {
3606
- var contentEle = this_6.tabObj.items[tabIndex].content;
3676
+ var contentEle = this_6.tabObj.items[parseInt(tabIndex.toString(), 10)].content;
3607
3677
  var hiddenEle;
3608
3678
  var groupEle = void 0;
3609
3679
  var isGroupHidden = false;
3610
3680
  var widthDifference = 0;
3611
3681
  if (key === 'hideGroup' || key === 'showGroup') {
3612
- hiddenEle = contentEle.querySelector('#' + hiddenProps[key][i]);
3682
+ hiddenEle = contentEle.querySelector('#' + hiddenProps["" + key][parseInt(i.toString(), 10)]);
3613
3683
  }
3614
3684
  else {
3615
- hiddenEle = contentEle.querySelector('#' + hiddenProps[key][i] + constants.CONTAINER_ID);
3685
+ hiddenEle = contentEle.querySelector('#' + hiddenProps["" + key][parseInt(i.toString(), 10)] + constants.CONTAINER_ID);
3616
3686
  }
3617
3687
  if (hiddenEle) {
3618
3688
  if (key === 'hideGroup' || key === 'hideItem') {
@@ -3672,15 +3742,15 @@ var Ribbon = /** @class */ (function (_super) {
3672
3742
  groupEle.classList.add('e-ribbon-emptyCollection');
3673
3743
  }
3674
3744
  }
3675
- var index = hiddenProps[key].indexOf(hiddenProps[key][i]);
3745
+ var index = hiddenProps["" + key].indexOf(hiddenProps["" + key][parseInt(i.toString(), 10)]);
3676
3746
  if (index !== -1) {
3677
- hiddenProps[key].splice(index, 1);
3747
+ hiddenProps["" + key].splice(index, 1);
3678
3748
  i--;
3679
3749
  }
3680
3750
  out_i_1 = i;
3681
3751
  };
3682
3752
  var this_6 = this, out_i_1;
3683
- for (var i = 0; i < hiddenProps[key].length; i++) {
3753
+ for (var i = 0; i < hiddenProps["" + key].length; i++) {
3684
3754
  _loop_6(i);
3685
3755
  i = out_i_1;
3686
3756
  }
@@ -3814,7 +3884,12 @@ var Ribbon = /** @class */ (function (_super) {
3814
3884
  var contentEle = this.tabObj.items[itemProp.tabIndex].content;
3815
3885
  var groupEle = contentEle.querySelector('#' + groupID);
3816
3886
  if (groupEle) {
3817
- isDisabled ? groupEle.classList.add('e-disabled') : groupEle.classList.remove('e-disabled');
3887
+ if (isDisabled) {
3888
+ groupEle.classList.add('e-disabled');
3889
+ }
3890
+ else {
3891
+ groupEle.classList.remove('e-disabled');
3892
+ }
3818
3893
  }
3819
3894
  else {
3820
3895
  this.updateInitialProps(itemProp.tabIndex, groupID, 'disabledGroups', isDisabled);
@@ -3829,13 +3904,23 @@ var Ribbon = /** @class */ (function (_super) {
3829
3904
  overflowtarget = overflowDDB.target;
3830
3905
  }
3831
3906
  if (overflowtarget) {
3832
- isDisabled ? overflowtarget.classList.add('e-disabled') : overflowtarget.classList.remove('e-disabled');
3907
+ if (isDisabled) {
3908
+ overflowtarget.classList.add('e-disabled');
3909
+ }
3910
+ else {
3911
+ overflowtarget.classList.remove('e-disabled');
3912
+ }
3833
3913
  }
3834
3914
  }
3835
3915
  else if (ofTabContainer) {
3836
3916
  var grpContainer = ofTabContainer.querySelector('#' + groupID + constants.CONTAINER_ID);
3837
3917
  if (grpContainer) {
3838
- isDisabled ? grpContainer.classList.add('e-disabled') : grpContainer.classList.remove('e-disabled');
3918
+ if (isDisabled) {
3919
+ grpContainer.classList.add('e-disabled');
3920
+ }
3921
+ else {
3922
+ grpContainer.classList.remove('e-disabled');
3923
+ }
3839
3924
  }
3840
3925
  }
3841
3926
  }
@@ -4061,19 +4146,22 @@ var Ribbon = /** @class */ (function (_super) {
4061
4146
  initialProps = this.initialPropsData[parseInt(tabIndex.toString(), 10)];
4062
4147
  }
4063
4148
  if (initialProps) {
4064
- /* eslint-disable */
4065
- if (!initialProps[key])
4066
- initialProps[key] = [];
4067
- var itemIndex = initialProps[key].indexOf(id);
4149
+ if (!initialProps["" + key]) {
4150
+ initialProps["" + key] = [];
4151
+ }
4152
+ var itemIndex = initialProps["" + key].indexOf(id);
4068
4153
  if (isInsert) {
4069
- if (itemIndex === -1)
4070
- initialProps[key].push(id);
4154
+ if (itemIndex === -1) {
4155
+ initialProps["" + key].push(id);
4156
+ }
4071
4157
  }
4072
4158
  else {
4073
- if (itemIndex !== -1)
4074
- initialProps[key].splice(itemIndex, 1);
4075
- initialProps[key].length === 0 && delete initialProps[key];
4076
- /* eslint-enable */
4159
+ if (itemIndex !== -1) {
4160
+ initialProps["" + key].splice(itemIndex, 1);
4161
+ }
4162
+ if (initialProps["" + key].length === 0) {
4163
+ delete initialProps["" + key];
4164
+ }
4077
4165
  if (Object.keys(initialProps).length === 0) {
4078
4166
  delete this.initialPropsData[parseInt(tabIndex.toString(), 10)];
4079
4167
  }
@@ -4134,7 +4222,12 @@ var Ribbon = /** @class */ (function (_super) {
4134
4222
  overflowtarget = overflowDDB.target;
4135
4223
  }
4136
4224
  if (overflowtarget) {
4137
- isHidden ? overflowtarget.classList.add('e-hide-group') : overflowtarget.classList.remove('e-hide-group');
4225
+ if (isHidden) {
4226
+ overflowtarget.classList.add('e-hide-group');
4227
+ }
4228
+ else {
4229
+ overflowtarget.classList.remove('e-hide-group');
4230
+ }
4138
4231
  }
4139
4232
  }
4140
4233
  else {
@@ -4144,7 +4237,12 @@ var Ribbon = /** @class */ (function (_super) {
4144
4237
  if (ofTabContainer) {
4145
4238
  var grpContainer = ofTabContainer.querySelector('#' + groupID + constants.CONTAINER_ID);
4146
4239
  if (grpContainer) {
4147
- isHidden ? grpContainer.classList.add('e-hide-group') : grpContainer.classList.remove('e-hide-group');
4240
+ if (isHidden) {
4241
+ grpContainer.classList.add('e-hide-group');
4242
+ }
4243
+ else {
4244
+ grpContainer.classList.remove('e-hide-group');
4245
+ }
4148
4246
  }
4149
4247
  }
4150
4248
  }
@@ -4184,8 +4282,8 @@ var Ribbon = /** @class */ (function (_super) {
4184
4282
  var item = _d[_c];
4185
4283
  var ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id) : contentEle.querySelector('#' + item.id);
4186
4284
  if (item.type === RibbonItemType.GroupButton && this.activeLayout === 'Classic') {
4187
- ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id + constants.RIBBON_GROUP_BUTTON_ID) :
4188
- contentEle.querySelector('#' + item.id + constants.RIBBON_GROUP_BUTTON_ID);
4285
+ ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id +
4286
+ constants.RIBBON_GROUP_BUTTON_ID) : contentEle.querySelector('#' + item.id + constants.RIBBON_GROUP_BUTTON_ID);
4189
4287
  }
4190
4288
  if (ele) {
4191
4289
  this.destroyFunction(item, ele);
@@ -4291,7 +4389,8 @@ var Ribbon = /** @class */ (function (_super) {
4291
4389
  }
4292
4390
  if (this.activeLayout === RibbonLayout.Simplified) {
4293
4391
  if (itemProp.group.enableGroupOverflow) {
4294
- if (dropdown.target.childElementCount === 0 || (dropdown.target.childElementCount === 1 && this.isHeaderVisible(dropdown.target, itemProp.group.id))) {
4392
+ if (dropdown.target.childElementCount === 0 || (dropdown.target.childElementCount
4393
+ === 1 && this.isHeaderVisible(dropdown.target, itemProp.group.id))) {
4295
4394
  this.removeOverflowButton(dropdown);
4296
4395
  }
4297
4396
  }
@@ -4589,7 +4688,7 @@ var Ribbon = /** @class */ (function (_super) {
4589
4688
  * Gets the Ribbon item model associated with the specified item ID.
4590
4689
  *
4591
4690
  * @param {string} itemId - The unique ID of the Ribbon item.
4592
- * @returns {RibbonItemModel}
4691
+ * @returns {RibbonItemModel} - Returns the Ribbon item model.
4593
4692
  */
4594
4693
  Ribbon.prototype.getItem = function (itemId) {
4595
4694
  return getItem(this.tabs, itemId).item;
@@ -4611,7 +4710,8 @@ var Ribbon = /** @class */ (function (_super) {
4611
4710
  if (ele) {
4612
4711
  var itemEle = closest(ele, '.e-ribbon-item');
4613
4712
  var moduleName = this.getItemModuleName(itemProp.item);
4614
- isUpdated = isDisabled ? !itemEle.classList.contains(constants.DISABLED_CSS) : itemEle.classList.contains(constants.DISABLED_CSS);
4713
+ isUpdated = isDisabled ? !itemEle.classList.contains(constants.DISABLED_CSS) :
4714
+ itemEle.classList.contains(constants.DISABLED_CSS);
4615
4715
  if (moduleName !== 'template') {
4616
4716
  if (isUpdated) {
4617
4717
  if (moduleName === 'group-btn' && this.activeLayout === 'Simplified') {
@@ -4752,13 +4852,14 @@ var Ribbon = /** @class */ (function (_super) {
4752
4852
  }
4753
4853
  }
4754
4854
  break;
4755
- case 'selectedTab':
4855
+ case 'selectedTab': {
4756
4856
  var tabEle = this.tabObj.element;
4757
4857
  var toolbarItem = tabEle.querySelectorAll('.e-toolbar-item')[parseInt(newProp.selectedTab.toString(), 10)];
4758
4858
  if (!(toolbarItem.classList.contains('e-hidden') || toolbarItem.classList.contains('e-disable'))) {
4759
4859
  this.tabObj.setProperties({ selectedItem: newProp.selectedTab });
4760
4860
  }
4761
4861
  break;
4862
+ }
4762
4863
  case 'tabAnimation':
4763
4864
  this.tabObj.setProperties({ animation: newProp.tabAnimation });
4764
4865
  break;
@@ -4776,21 +4877,23 @@ var Ribbon = /** @class */ (function (_super) {
4776
4877
  this.element.style.width = formatUnit(newProp.width);
4777
4878
  this.refreshLayout();
4778
4879
  break;
4779
- case 'fileMenu':
4880
+ case 'fileMenu': {
4780
4881
  if (this.ribbonFileMenuModule) {
4781
4882
  this.ribbonFileMenuModule.updateFileMenu(this.fileMenu);
4782
4883
  }
4783
4884
  var toolbarEle = this.tabObj['tbObj'];
4784
4885
  toolbarEle.refreshOverflow();
4785
4886
  break;
4786
- case 'backStageMenu':
4887
+ }
4888
+ case 'backStageMenu': {
4787
4889
  if (this.ribbonBackstageModule) {
4788
4890
  this.ribbonBackstageModule.updateBackStageMenu(this.backStageMenu);
4789
4891
  }
4790
4892
  var toolbarElement = this.tabObj['tbObj'];
4791
4893
  toolbarElement.refreshOverflow();
4792
4894
  break;
4793
- case 'helpPaneTemplate':
4895
+ }
4896
+ case 'helpPaneTemplate': {
4794
4897
  if (this.ribbonTempEle) {
4795
4898
  remove(this.ribbonTempEle);
4796
4899
  this.ribbonTempEle = null;
@@ -4802,8 +4905,14 @@ var Ribbon = /** @class */ (function (_super) {
4802
4905
  var toolbar_1 = this.tabObj['tbObj'];
4803
4906
  toolbar_1.refreshOverflow();
4804
4907
  break;
4908
+ }
4805
4909
  case 'hideLayoutSwitcher':
4806
- this.hideLayoutSwitcher ? this.removeExpandCollapse() : this.addExpandCollapse();
4910
+ if (this.hideLayoutSwitcher) {
4911
+ this.removeExpandCollapse();
4912
+ }
4913
+ else {
4914
+ this.addExpandCollapse();
4915
+ }
4807
4916
  break;
4808
4917
  }
4809
4918
  }