@syncfusion/ej2-ribbon 25.2.3 → 26.1.35

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 (117) 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 +884 -599
  5. package/dist/es6/ej2-ribbon.es2015.js.map +1 -1
  6. package/dist/es6/ej2-ribbon.es5.js +941 -584
  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 +4 -1
  15. package/src/ribbon/base/ribbon.js +222 -95
  16. package/src/ribbon/items/ribbon-button.js +22 -2
  17. package/src/ribbon/items/ribbon-checkbox.js +19 -1
  18. package/src/ribbon/items/ribbon-colorpicker.js +16 -1
  19. package/src/ribbon/items/ribbon-combobox.js +19 -1
  20. package/src/ribbon/items/ribbon-dropdown.js +16 -1
  21. package/src/ribbon/items/ribbon-gallery.d.ts +15 -6
  22. package/src/ribbon/items/ribbon-gallery.js +164 -96
  23. package/src/ribbon/items/ribbon-groupbutton.d.ts +1 -0
  24. package/src/ribbon/items/ribbon-groupbutton.js +11 -3
  25. package/src/ribbon/items/ribbon-splitbutton.js +16 -1
  26. package/src/ribbon/models/ribbon-contextual-tab-settings-model.d.ts +1 -1
  27. package/src/ribbon/models/ribbon-gallery-group-model.d.ts +5 -5
  28. package/src/ribbon/models/ribbon-gallery-group.d.ts +2 -2
  29. package/src/ribbon/models/ribbon-gallery-group.js +2 -2
  30. package/src/ribbon/models/ribbon-gallery-item-model.d.ts +5 -5
  31. package/src/ribbon/models/ribbon-gallery-item.d.ts +1 -1
  32. package/src/ribbon/models/ribbon-gallery-item.js +1 -1
  33. package/src/ribbon/models/ribbon-gallery-settings-model.d.ts +1 -1
  34. package/src/ribbon/models/ribbon-gallery-settings.d.ts +3 -3
  35. package/src/ribbon/models/ribbon-gallery-settings.js +2 -2
  36. package/src/ribbon/modules/ribbon-backstage.d.ts +6 -3
  37. package/src/ribbon/modules/ribbon-backstage.js +65 -12
  38. package/src/ribbon/modules/ribbon-contextualtab.js +5 -2
  39. package/src/ribbon/modules/ribbon-keytip.d.ts +1 -0
  40. package/src/ribbon/modules/ribbon-keytip.js +58 -46
  41. package/styles/bootstrap-dark.css +452 -269
  42. package/styles/bootstrap-dark.scss +18 -1
  43. package/styles/bootstrap.css +456 -276
  44. package/styles/bootstrap.scss +18 -1
  45. package/styles/bootstrap4.css +455 -272
  46. package/styles/bootstrap4.scss +18 -1
  47. package/styles/bootstrap5-dark.css +470 -278
  48. package/styles/bootstrap5-dark.scss +18 -1
  49. package/styles/bootstrap5.css +470 -278
  50. package/styles/bootstrap5.scss +18 -1
  51. package/styles/fabric-dark.css +451 -269
  52. package/styles/fabric-dark.scss +18 -1
  53. package/styles/fabric.css +450 -272
  54. package/styles/fabric.scss +18 -1
  55. package/styles/fluent-dark.css +472 -277
  56. package/styles/fluent-dark.scss +18 -1
  57. package/styles/fluent.css +472 -277
  58. package/styles/fluent.scss +18 -1
  59. package/styles/fluent2.css +3868 -0
  60. package/styles/fluent2.scss +18 -0
  61. package/styles/highcontrast-light.css +445 -263
  62. package/styles/highcontrast-light.scss +17 -1
  63. package/styles/highcontrast.css +451 -273
  64. package/styles/highcontrast.scss +18 -1
  65. package/styles/material-dark.css +540 -283
  66. package/styles/material-dark.scss +18 -1
  67. package/styles/material.css +539 -289
  68. package/styles/material.scss +18 -1
  69. package/styles/material3-dark.css +496 -280
  70. package/styles/material3-dark.scss +18 -1
  71. package/styles/material3.css +496 -280
  72. package/styles/material3.scss +18 -1
  73. package/styles/ribbon/_bds-definition.scss +56 -20
  74. package/styles/ribbon/_bootstrap-dark-definition.scss +56 -20
  75. package/styles/ribbon/_bootstrap-definition.scss +57 -21
  76. package/styles/ribbon/_bootstrap4-definition.scss +57 -21
  77. package/styles/ribbon/_bootstrap5-definition.scss +57 -21
  78. package/styles/ribbon/_bootstrap5.3-definition.scss +396 -0
  79. package/styles/ribbon/_fabric-dark-definition.scss +55 -19
  80. package/styles/ribbon/_fabric-definition.scss +56 -20
  81. package/styles/ribbon/_fluent-definition.scss +59 -23
  82. package/styles/ribbon/_fluent2-definition.scss +396 -0
  83. package/styles/ribbon/_fusionnew-definition.scss +50 -14
  84. package/styles/ribbon/_highcontrast-definition.scss +58 -22
  85. package/styles/ribbon/_highcontrast-light-definition.scss +49 -13
  86. package/styles/ribbon/_layout.scss +359 -399
  87. package/styles/ribbon/_material-dark-definition.scss +56 -20
  88. package/styles/ribbon/_material-definition.scss +56 -20
  89. package/styles/ribbon/_material3-definition.scss +56 -19
  90. package/styles/ribbon/_tailwind-definition.scss +56 -20
  91. package/styles/ribbon/_theme.scss +118 -170
  92. package/styles/ribbon/bootstrap-dark.css +452 -269
  93. package/styles/ribbon/bootstrap.css +456 -276
  94. package/styles/ribbon/bootstrap4.css +455 -272
  95. package/styles/ribbon/bootstrap5-dark.css +470 -278
  96. package/styles/ribbon/bootstrap5.css +470 -278
  97. package/styles/ribbon/fabric-dark.css +451 -269
  98. package/styles/ribbon/fabric.css +450 -272
  99. package/styles/ribbon/fluent-dark.css +472 -277
  100. package/styles/ribbon/fluent.css +472 -277
  101. package/styles/ribbon/fluent2.css +3868 -0
  102. package/styles/ribbon/fluent2.scss +18 -0
  103. package/styles/ribbon/highcontrast-light.css +445 -263
  104. package/styles/ribbon/highcontrast.css +451 -273
  105. package/styles/ribbon/icons/_bootstrap5.3.scss +9 -0
  106. package/styles/ribbon/icons/_fluent2.scss +9 -0
  107. package/styles/ribbon/material-dark.css +540 -283
  108. package/styles/ribbon/material.css +539 -289
  109. package/styles/ribbon/material3-dark.css +496 -280
  110. package/styles/ribbon/material3.css +496 -280
  111. package/styles/ribbon/tailwind-dark.css +506 -280
  112. package/styles/ribbon/tailwind.css +506 -280
  113. package/styles/tailwind-dark.css +506 -280
  114. package/styles/tailwind-dark.scss +18 -1
  115. package/styles/tailwind.css +506 -280
  116. package/styles/tailwind.scss +18 -1
  117. package/CHANGELOG.md +0 -93
@@ -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 () {
@@ -591,10 +590,10 @@ var Ribbon = /** @class */ (function (_super) {
591
590
  this.isUpdateItems = false;
592
591
  }
593
592
  }
594
- this.checkOverflow(selectedIndex, e.selectedContent.firstChild);
595
- if (this.activeLayout === 'Classic' && this.ribbonGalleryModule) {
596
- this.ribbonGalleryModule.checkAvailableHeight(selectedIndex, e.selectedContent.firstChild);
593
+ if (this.ribbonGalleryModule) {
594
+ this.ribbonGalleryModule.checkAvailableHeight(e.selectedContent.firstChild);
597
595
  }
596
+ this.checkOverflow(selectedIndex, e.selectedContent.firstChild);
598
597
  if (this.activeLayout === 'Simplified' && this.overflowDDB) {
599
598
  var overflowTarget = this.overflowDDB.target;
600
599
  var ofTabContainer = overflowTarget.querySelector('.' + constants.RIBBON_TAB_ACTIVE);
@@ -623,7 +622,8 @@ var Ribbon = /** @class */ (function (_super) {
623
622
  break;
624
623
  }
625
624
  }
626
- this.contextualTabs[parseInt(i.toString(), 10)].setProperties({ isSelected: isSelected }, true);
625
+ this.contextualTabs[parseInt(i.toString(), 10)].
626
+ setProperties({ isSelected: isSelected }, true);
627
627
  }
628
628
  }
629
629
  };
@@ -821,7 +821,8 @@ var Ribbon = /** @class */ (function (_super) {
821
821
  item.setProperties({ activeSize: RibbonItemSize.Medium }, true);
822
822
  this.setItemSize(itemEle, item);
823
823
  }
824
- if ((item.type === RibbonItemType.DropDown) || (item.type === RibbonItemType.SplitButton) || (item.type === RibbonItemType.GroupButton) || (item.type === RibbonItemType.Gallery)) {
824
+ if ((item.type === RibbonItemType.DropDown) || (item.type === RibbonItemType.SplitButton) ||
825
+ (item.type === RibbonItemType.GroupButton) || (item.type === RibbonItemType.Gallery)) {
825
826
  this.updatePopupItems(item, itemContainer, group.enableGroupOverflow, true);
826
827
  }
827
828
  }
@@ -851,6 +852,7 @@ var Ribbon = /** @class */ (function (_super) {
851
852
  return isEmptyCollection;
852
853
  };
853
854
  Ribbon.prototype.updatePopupItems = function (item, itemEle, isGroupOF, isMenu) {
855
+ var _this = this;
854
856
  var dropdown = getComponent(itemEle.querySelector('#' + item.id), (item.type === RibbonItemType.DropDown || item.type === RibbonItemType.Gallery || item.type === RibbonItemType.GroupButton) ? DropDownButton : SplitButton);
855
857
  var dropDownPopup = dropdown.dropDown;
856
858
  // popup is on right if (isGroupOF && isMenu)
@@ -862,6 +864,9 @@ var Ribbon = /** @class */ (function (_super) {
862
864
  if (isMenu) {
863
865
  dropdown.beforeOpen = function () {
864
866
  if (isLeft) {
867
+ if (item.type === RibbonItemType.Gallery && _this.ribbonGalleryModule) {
868
+ _this.ribbonGalleryModule.checkCollision(dropDownPopup, dropDownPopup.element);
869
+ }
865
870
  dropDownPopup.element.style.setProperty('visibility', 'hidden');
866
871
  dropDownPopup.element.style.setProperty('display', 'block');
867
872
  dropDownPopup.setProperties({ offsetX: -1 * dropDownPopup.element.offsetWidth });
@@ -917,7 +922,8 @@ var Ribbon = /** @class */ (function (_super) {
917
922
  break;
918
923
  }
919
924
  var groupEle = tabContent.querySelector('#' + collection.id);
920
- if ((item.type === RibbonItemType.DropDown) || (item.type === RibbonItemType.SplitButton) || (item.type === RibbonItemType.GroupButton) || (item.type === RibbonItemType.Gallery)) {
925
+ if ((item.type === RibbonItemType.DropDown) || (item.type === RibbonItemType.SplitButton) ||
926
+ (item.type === RibbonItemType.GroupButton) || (item.type === RibbonItemType.Gallery)) {
921
927
  this.updatePopupItems(item, itemContainer, group.enableGroupOverflow, false);
922
928
  }
923
929
  groupEle.append(itemContainer);
@@ -962,7 +968,8 @@ var Ribbon = /** @class */ (function (_super) {
962
968
  }
963
969
  if (overflowDDB) {
964
970
  if (group.enableGroupOverflow) {
965
- if (overflowtarget.childElementCount === 0 || (overflowtarget.childElementCount === 1 && this.isHeaderVisible(overflowtarget, group.id))) {
971
+ if (overflowtarget.childElementCount === 0 ||
972
+ (overflowtarget.childElementCount === 1 && this.isHeaderVisible(overflowtarget, group.id))) {
966
973
  this.removeOverflowButton(overflowDDB);
967
974
  }
968
975
  }
@@ -1075,8 +1082,12 @@ var Ribbon = /** @class */ (function (_super) {
1075
1082
  overflowBtnTarget.classList.add('e-hide-group');
1076
1083
  }
1077
1084
  }
1078
- isResize ? overflowBtnTarget.insertBefore(itemEle, overflowBtnTarget.querySelector('.' + constants.RIBBON_ITEM))
1079
- : overflowBtnTarget.append(itemEle);
1085
+ if (isResize) {
1086
+ overflowBtnTarget.insertBefore(itemEle, overflowBtnTarget.querySelector('.' + constants.RIBBON_ITEM));
1087
+ }
1088
+ else {
1089
+ overflowBtnTarget.append(itemEle);
1090
+ }
1080
1091
  }
1081
1092
  else {
1082
1093
  if (!this.overflowDDB) {
@@ -1088,7 +1099,8 @@ var Ribbon = /** @class */ (function (_super) {
1088
1099
  else {
1089
1100
  this.overflowDDB.element.classList.remove(constants.HIDE_CSS);
1090
1101
  var overflowEle = this.overflowDDB.target;
1091
- var ofTabContainer = overflowEle.querySelector('#' + this.tabs[parseInt(tabIndex.toString(), 10)].id + constants.OVERFLOW_ID);
1102
+ var ofTabContainer = overflowEle.querySelector('#' +
1103
+ this.tabs[parseInt(tabIndex.toString(), 10)].id + constants.OVERFLOW_ID);
1092
1104
  if (ofTabContainer) {
1093
1105
  var ofGroupContainer = overflowEle.querySelector('#' + groupId + constants.CONTAINER_ID);
1094
1106
  if (!ofGroupContainer) {
@@ -1106,7 +1118,12 @@ var Ribbon = /** @class */ (function (_super) {
1106
1118
  }
1107
1119
  ofTabContainer.append(ofGroupContainer);
1108
1120
  }
1109
- isResize ? ofGroupContainer.insertBefore(itemEle, ofGroupContainer.querySelector('.' + constants.RIBBON_ITEM)) : ofGroupContainer.append(itemEle);
1121
+ if (isResize) {
1122
+ ofGroupContainer.insertBefore(itemEle, ofGroupContainer.querySelector('.' + constants.RIBBON_ITEM));
1123
+ }
1124
+ else {
1125
+ ofGroupContainer.append(itemEle);
1126
+ }
1110
1127
  }
1111
1128
  else {
1112
1129
  this.createOfTabContainer(groupId, groupHeader, itemEle, tabIndex);
@@ -1146,7 +1163,7 @@ var Ribbon = /** @class */ (function (_super) {
1146
1163
  break;
1147
1164
  case 'Gallery':
1148
1165
  if (this.activeLayout === 'Simplified') {
1149
- this.ribbonGalleryModule.addOverFlowEvents(item, itemEle, overflowButton);
1166
+ this.ribbonGalleryModule.addOverFlowEvents(item, itemEle);
1150
1167
  }
1151
1168
  break;
1152
1169
  case 'GroupButton':
@@ -1164,7 +1181,8 @@ var Ribbon = /** @class */ (function (_super) {
1164
1181
  var overflowtarget = this.overflowDDB.target;
1165
1182
  overflowtarget.append(ofTabContainer);
1166
1183
  var itemProp = getGroup(this.tabs, groupId);
1167
- var ofGroupContainer = itemProp.group.overflowHeader ? this.createGroupContainer(groupId, itemProp.group.overflowHeader) : this.createGroupContainer(groupId, groupHeader);
1184
+ var ofGroupContainer = itemProp.group.overflowHeader ?
1185
+ this.createGroupContainer(groupId, itemProp.group.overflowHeader) : this.createGroupContainer(groupId, groupHeader);
1168
1186
  ofGroupContainer.append(itemEle);
1169
1187
  ofTabContainer.append(ofGroupContainer);
1170
1188
  if (tabIndex === this.selectedTab) {
@@ -1522,7 +1540,12 @@ var Ribbon = /** @class */ (function (_super) {
1522
1540
  }
1523
1541
  var item = collection.items[parseInt(l.toString(), 10)];
1524
1542
  if (canReduceItem(item)) {
1525
- item.type !== RibbonItemType.GroupButton ? setWidth(item.id) : setWidth(item.id + constants.RIBBON_GROUP_BUTTON_ID);
1543
+ if (item.type !== RibbonItemType.GroupButton) {
1544
+ setWidth(item.id);
1545
+ }
1546
+ else {
1547
+ setWidth(item.id + constants.RIBBON_GROUP_BUTTON_ID);
1548
+ }
1526
1549
  reduceItemsToSmall(k, l, l);
1527
1550
  if (!shouldSkip && (tabContent.offsetWidth > activeContent.offsetWidth)) {
1528
1551
  return true;
@@ -1775,7 +1798,12 @@ var Ribbon = /** @class */ (function (_super) {
1775
1798
  };
1776
1799
  Ribbon.prototype.handleContentSize = function (itemEle, isRemoveOverflow) {
1777
1800
  var itemContainer = itemEle.closest('.' + constants.RIBBON_GROUP_CONTENT);
1778
- (isRemoveOverflow ? (itemContainer.classList.add(constants.RIBBON_CONTENT_HEIGHT)) : (itemContainer.classList.remove(constants.RIBBON_CONTENT_HEIGHT)));
1801
+ if (isRemoveOverflow) {
1802
+ itemContainer.classList.add(constants.RIBBON_CONTENT_HEIGHT);
1803
+ }
1804
+ else {
1805
+ itemContainer.classList.remove(constants.RIBBON_CONTENT_HEIGHT);
1806
+ }
1779
1807
  };
1780
1808
  Ribbon.prototype.setItemSize = function (itemEle, item) {
1781
1809
  if (itemEle) {
@@ -1984,7 +2012,8 @@ var Ribbon = /** @class */ (function (_super) {
1984
2012
  var previousIndex = getIndex(this.tabs, (function (tab) { return (tab.id === previousTabId); }));
1985
2013
  nextIndex = nextIndex === -1 ? this.selectedTab : nextIndex;
1986
2014
  var eventArgs = {
1987
- cancel: e.cancel, isInteracted: e.isInteracted, previousIndex: previousIndex, selectedIndex: nextIndex, isContextual: isContextual
2015
+ cancel: e.cancel, isInteracted: e.isInteracted, previousIndex: previousIndex,
2016
+ selectedIndex: nextIndex, isContextual: isContextual
1988
2017
  };
1989
2018
  this.trigger('tabSelecting', eventArgs, function (args) {
1990
2019
  if (args.cancel) {
@@ -2042,9 +2071,10 @@ var Ribbon = /** @class */ (function (_super) {
2042
2071
  this.element.classList.add(constants.RIBBON_SIMPLIFIED_MODE);
2043
2072
  }
2044
2073
  var activeContent = this.tabObj.element.querySelector('#' + this.tabs[this.selectedTab].id + constants.CONTENT_ID);
2074
+ if (this.ribbonGalleryModule) {
2075
+ this.ribbonGalleryModule.checkAvailableHeight(activeContent);
2076
+ }
2045
2077
  this.checkOverflow(this.selectedTab, activeContent);
2046
- if (this.activeLayout === 'Classic' && this.ribbonGalleryModule)
2047
- this.ribbonGalleryModule.checkAvailableHeight(this.selectedTab, activeContent);
2048
2078
  };
2049
2079
  Ribbon.prototype.addOverflowButton = function (btnId, isGroupOF) {
2050
2080
  var _this = this;
@@ -2102,7 +2132,8 @@ var Ribbon = /** @class */ (function (_super) {
2102
2132
  items = currentList.getElementsByClassName('e-ribbon-item');
2103
2133
  }
2104
2134
  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;
2135
+ var comboBoxEle = control && control.classList.contains('e-combobox') ?
2136
+ items[(!this.itemIndex || this.itemIndex < 0) ? 0 : this.itemIndex].querySelector('.e-combobox') : null;
2106
2137
  var ribbonItem;
2107
2138
  var templateEle;
2108
2139
  if (comboBoxEle === null || (e.key === 'Tab') || this.itemIndex < 0) {
@@ -2159,7 +2190,7 @@ var Ribbon = /** @class */ (function (_super) {
2159
2190
  target.setAttribute('index', this.itemIndex.toString());
2160
2191
  }
2161
2192
  var currentItemIndex = parseInt(target.getAttribute('index'), 10);
2162
- var itemType = "";
2193
+ var itemType = '';
2163
2194
  var controlItem = items[parseInt(currentItemIndex.toString(), 10)] ? items[parseInt(currentItemIndex.toString(), 10)].querySelector('.e-control') : null;
2164
2195
  if (controlItem) {
2165
2196
  itemType = controlItem.getAttribute('data-control');
@@ -2189,12 +2220,20 @@ var Ribbon = /** @class */ (function (_super) {
2189
2220
  }
2190
2221
  if (((itemType === 'SplitButton') && (e.key === 'ArrowRight' || e.key === 'ArrowLeft'))) {
2191
2222
  if (e.key === 'ArrowRight') {
2192
- this.enableRtl ? items[parseInt(currentItemIndex.toString(), 10)].querySelector('.e-control').focus() :
2223
+ if (this.enableRtl) {
2224
+ items[parseInt(currentItemIndex.toString(), 10)].querySelector('.e-control').focus();
2225
+ }
2226
+ else {
2193
2227
  items[parseInt(currentItemIndex.toString(), 10)].querySelector('.e-dropdown-btn').focus();
2228
+ }
2194
2229
  }
2195
2230
  if (e.key === 'ArrowLeft') {
2196
- this.enableRtl ? items[parseInt(currentItemIndex.toString(), 10)].querySelector('.e-dropdown-btn').focus() :
2231
+ if (this.enableRtl) {
2232
+ items[parseInt(currentItemIndex.toString(), 10)].querySelector('.e-dropdown-btn').focus();
2233
+ }
2234
+ else {
2197
2235
  items[parseInt(currentItemIndex.toString(), 10)].querySelector('.e-control').focus();
2236
+ }
2198
2237
  }
2199
2238
  }
2200
2239
  if (e.key === 'Enter') {
@@ -2305,7 +2344,8 @@ var Ribbon = /** @class */ (function (_super) {
2305
2344
  Ribbon.prototype.reRenderTabs = function (tabs) {
2306
2345
  this.destroyScroll();
2307
2346
  this.checkID(this.tabs, 'tab', this.element.id);
2308
- for (var key in tabs) {
2347
+ for (var _i = 0, _a = Object.keys(tabs); _i < _a.length; _i++) {
2348
+ var key = _a[_i];
2309
2349
  var index = parseInt(key, 10);
2310
2350
  var tab = tabs[parseInt(index.toString(), 10)];
2311
2351
  var isNewTab = false;
@@ -2350,13 +2390,13 @@ var Ribbon = /** @class */ (function (_super) {
2350
2390
  }
2351
2391
  // Check whether group is passed by the user, and if it is, then remove the old values.
2352
2392
  if (tab.groups) {
2353
- for (var _i = 0, groups_1 = groups; _i < groups_1.length; _i++) {
2354
- var group = groups_1[_i];
2393
+ for (var _b = 0, groups_1 = groups; _b < groups_1.length; _b++) {
2394
+ var group = groups_1[_b];
2355
2395
  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];
2396
+ for (var _c = 0, _d = group.collections; _c < _d.length; _c++) {
2397
+ var collection = _d[_c];
2398
+ for (var _e = 0, _f = collection.items; _e < _f.length; _e++) {
2399
+ var item = _f[_e];
2360
2400
  var ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id) : contentEle.querySelector('#' + item.id);
2361
2401
  if (ele) {
2362
2402
  this.destroyFunction(item, ele);
@@ -2454,7 +2494,8 @@ var Ribbon = /** @class */ (function (_super) {
2454
2494
  itemEle = groupContainer.querySelector('#' + item.id + constants.CONTAINER_ID);
2455
2495
  if (item.displayOptions === (DisplayMode.Classic | DisplayMode.Overflow)) {
2456
2496
  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)) {
2497
+ if ((item.type === RibbonItemType.DropDown) || (item.type === RibbonItemType.SplitButton) ||
2498
+ (item.type === RibbonItemType.GroupButton) || (item.type === RibbonItemType.Gallery)) {
2458
2499
  this.updatePopupItems(item, itemEle, group.enableGroupOverflow, true);
2459
2500
  }
2460
2501
  }
@@ -2553,7 +2594,8 @@ var Ribbon = /** @class */ (function (_super) {
2553
2594
  var itemEle = groupContainer.querySelector('#' + item.id + constants.CONTAINER_ID);
2554
2595
  if (!itemEle && overflowtarget) {
2555
2596
  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)) {
2597
+ if ((item.type === RibbonItemType.DropDown) || (item.type === RibbonItemType.SplitButton) ||
2598
+ (item.type === RibbonItemType.GroupButton) || (item.type === RibbonItemType.Gallery)) {
2557
2599
  this.updatePopupItems(item, itemEle, group.enableGroupOverflow, false);
2558
2600
  }
2559
2601
  this.removeOverflowEvent(item, itemEle);
@@ -2578,7 +2620,8 @@ var Ribbon = /** @class */ (function (_super) {
2578
2620
  }
2579
2621
  }
2580
2622
  if (group.enableGroupOverflow && overflowDDB) {
2581
- if (overflowtarget.childElementCount === 0 || (overflowtarget.childElementCount === 1 && this.isHeaderVisible(overflowtarget, group.id))) {
2623
+ if (overflowtarget.childElementCount === 0 ||
2624
+ (overflowtarget.childElementCount === 1 && this.isHeaderVisible(overflowtarget, group.id))) {
2582
2625
  this.removeOverflowButton(overflowDDB);
2583
2626
  }
2584
2627
  }
@@ -2691,7 +2734,12 @@ var Ribbon = /** @class */ (function (_super) {
2691
2734
  // eslint-disable-next-line
2692
2735
  var groupIndex = initialProps[key].indexOf(groupEle.id);
2693
2736
  if (groupIndex !== -1) {
2694
- key === 'hiddenGroups' ? groupEle.classList.add('e-hidden') : groupEle.classList.add('e-disabled');
2737
+ if (key === 'hiddenGroups') {
2738
+ groupEle.classList.add('e-hidden');
2739
+ }
2740
+ else {
2741
+ groupEle.classList.add('e-disabled');
2742
+ }
2695
2743
  }
2696
2744
  };
2697
2745
  Ribbon.prototype.validateItemSize = function () {
@@ -2816,7 +2864,8 @@ var Ribbon = /** @class */ (function (_super) {
2816
2864
  }
2817
2865
  if (item.type === RibbonItemType.GroupButton) {
2818
2866
  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) {
2867
+ if (this.keyTipElements[parseInt(tabIndex.toString(), 10)] &&
2868
+ item.groupButtonSettings.items[parseInt(i_7.toString(), 10)].keyTip) {
2820
2869
  this.addKeyTip(tabIndex, item.groupButtonSettings.items[parseInt(i_7.toString(), 10)].keyTip, item.id + (constants.RIBBON_GROUP_BUTTON_ID + i_7), 'item');
2821
2870
  }
2822
2871
  }
@@ -2853,7 +2902,8 @@ var Ribbon = /** @class */ (function (_super) {
2853
2902
  this.createRibbonItem(item, itemEle);
2854
2903
  if ((this.activeLayout === 'Simplified') && ((item.displayOptions === DisplayMode.Overflow) || (item.displayOptions === (DisplayMode.Classic | DisplayMode.Overflow)))) {
2855
2904
  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)) {
2905
+ if ((item.type === RibbonItemType.DropDown) || (item.type === RibbonItemType.SplitButton) ||
2906
+ (item.type === RibbonItemType.GroupButton) || (item.type === RibbonItemType.Gallery)) {
2857
2907
  this.updatePopupItems(item, itemEle, isGroupOF, true);
2858
2908
  }
2859
2909
  }
@@ -2910,7 +2960,11 @@ var Ribbon = /** @class */ (function (_super) {
2910
2960
  for (var i = 0; i < list.length; i++) {
2911
2961
  var listitem = list[parseInt(i.toString(), 10)];
2912
2962
  if (!listitem.id) {
2913
- listitem.setProperties({ id: initId + key + (this.idIndex++) }, true);
2963
+ var htmlAttrID = void 0;
2964
+ if (type === 'item') {
2965
+ htmlAttrID = this.hasHtmlAtrrID(listitem);
2966
+ }
2967
+ listitem.setProperties({ id: htmlAttrID ? htmlAttrID : initId + key + (this.idIndex++) }, true);
2914
2968
  }
2915
2969
  switch (type) {
2916
2970
  case 'tab':
@@ -2928,6 +2982,28 @@ var Ribbon = /** @class */ (function (_super) {
2928
2982
  }
2929
2983
  return list;
2930
2984
  };
2985
+ Ribbon.prototype.hasHtmlAtrrID = function (listItem) {
2986
+ var id = '';
2987
+ if (listItem.buttonSettings.htmlAttributes.id) {
2988
+ id = listItem.buttonSettings.htmlAttributes.id;
2989
+ }
2990
+ else if (listItem.checkBoxSettings.htmlAttributes.id) {
2991
+ id = listItem.checkBoxSettings.htmlAttributes.id;
2992
+ }
2993
+ else if (listItem.colorPickerSettings.htmlAttributes.id) {
2994
+ id = listItem.colorPickerSettings.htmlAttributes.id;
2995
+ }
2996
+ else if (listItem.comboBoxSettings.htmlAttributes.id) {
2997
+ id = listItem.comboBoxSettings.htmlAttributes.id;
2998
+ }
2999
+ else if (listItem.dropDownSettings.htmlAttributes.id) {
3000
+ id = listItem.dropDownSettings.htmlAttributes.id;
3001
+ }
3002
+ else if (listItem.splitButtonSettings.htmlAttributes.id) {
3003
+ id = listItem.splitButtonSettings.htmlAttributes.id;
3004
+ }
3005
+ return id;
3006
+ };
2931
3007
  Ribbon.prototype.updateCommonProperty = function (commonProp) {
2932
3008
  this.tabObj.setProperties(commonProp);
2933
3009
  if (this.ribbonFileMenuModule) {
@@ -3047,8 +3123,8 @@ var Ribbon = /** @class */ (function (_super) {
3047
3123
  ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id) :
3048
3124
  contentEle.querySelector('#' + item.id);
3049
3125
  if (item.type === RibbonItemType.GroupButton) {
3050
- ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id + constants.RIBBON_GROUP_BUTTON_ID) :
3051
- contentEle.querySelector('#' + item.id + constants.RIBBON_GROUP_BUTTON_ID);
3126
+ ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id +
3127
+ constants.RIBBON_GROUP_BUTTON_ID) : contentEle.querySelector('#' + item.id + constants.RIBBON_GROUP_BUTTON_ID);
3052
3128
  }
3053
3129
  if (item.type === RibbonItemType.Gallery) {
3054
3130
  ele = contentEle.querySelector('#' + item.id + constants.CONTAINER_ID);
@@ -3215,6 +3291,7 @@ var Ribbon = /** @class */ (function (_super) {
3215
3291
  * Shows a specific tab in the ribbon.
3216
3292
  *
3217
3293
  * @param {string} tabId - The ID of the tab to be shown.
3294
+ * @param {boolean} isContextual - The boolean if the rendering is contextual.
3218
3295
  * @returns {void}
3219
3296
  */
3220
3297
  Ribbon.prototype.showTab = function (tabId, isContextual) {
@@ -3225,6 +3302,7 @@ var Ribbon = /** @class */ (function (_super) {
3225
3302
  * Hides a specific tab in the ribbon.
3226
3303
  *
3227
3304
  * @param {string} tabId - The ID of the tab to be hidden.
3305
+ * @param {boolean} isContextual - The boolean if the rendering is contextual.
3228
3306
  * @returns {void}
3229
3307
  */
3230
3308
  Ribbon.prototype.hideTab = function (tabId, isContextual) {
@@ -3250,7 +3328,9 @@ var Ribbon = /** @class */ (function (_super) {
3250
3328
  if (contextualTab_1) {
3251
3329
  var isTabHidden = true;
3252
3330
  var _loop_5 = function (i) {
3253
- var index_1 = getIndex(this_5.tabs, function (e) { return e.id === contextualTab_1.tabs[parseInt(i.toString(), 10)].id; });
3331
+ var index_1 = getIndex(this_5.tabs, function (e) {
3332
+ return e.id === contextualTab_1.tabs[parseInt(i.toString(), 10)].id;
3333
+ });
3254
3334
  if (index_1 !== -1) {
3255
3335
  var toolbarEle = tabEle.querySelectorAll('.e-toolbar-item')[parseInt(index_1.toString(), 10)];
3256
3336
  if (!(toolbarEle.classList.contains('e-hidden'))) {
@@ -3339,8 +3419,8 @@ var Ribbon = /** @class */ (function (_super) {
3339
3419
  var item = _d[_c];
3340
3420
  var ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id) : contentEle.querySelector('#' + item.id);
3341
3421
  if (item.type === RibbonItemType.GroupButton && this.activeLayout === 'Classic') {
3342
- ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id + constants.RIBBON_GROUP_BUTTON_ID) :
3343
- contentEle.querySelector('#' + item.id + constants.RIBBON_GROUP_BUTTON_ID);
3422
+ ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id +
3423
+ constants.RIBBON_GROUP_BUTTON_ID) : contentEle.querySelector('#' + item.id + constants.RIBBON_GROUP_BUTTON_ID);
3344
3424
  }
3345
3425
  if (ele) {
3346
3426
  this.destroyFunction(item, ele);
@@ -3438,7 +3518,8 @@ var Ribbon = /** @class */ (function (_super) {
3438
3518
  }
3439
3519
  if (this.activeLayout === RibbonLayout.Simplified) {
3440
3520
  if (itemProp.group.enableGroupOverflow) {
3441
- if (dropdown.target.childElementCount === 0 || (dropdown.target.childElementCount === 1 && this.isHeaderVisible(dropdown.target, itemProp.group.id))) {
3521
+ if (dropdown.target.childElementCount === 0 || (dropdown.target.childElementCount
3522
+ === 1 && this.isHeaderVisible(dropdown.target, itemProp.group.id))) {
3442
3523
  this.removeOverflowButton(dropdown);
3443
3524
  }
3444
3525
  }
@@ -3511,13 +3592,23 @@ var Ribbon = /** @class */ (function (_super) {
3511
3592
  overflowtarget = overflowDDB.target;
3512
3593
  }
3513
3594
  if (overflowtarget) {
3514
- isHidden ? overflowtarget.classList.add('e-hidden') : overflowtarget.classList.remove('e-hidden');
3595
+ if (isHidden) {
3596
+ overflowtarget.classList.add('e-hidden');
3597
+ }
3598
+ else {
3599
+ overflowtarget.classList.remove('e-hidden');
3600
+ }
3515
3601
  }
3516
3602
  }
3517
3603
  else if (ofTabContainer) {
3518
3604
  var grpContainer = ofTabContainer.querySelector('#' + groupID + constants.CONTAINER_ID);
3519
3605
  if (grpContainer) {
3520
- isHidden ? grpContainer.classList.add('e-hidden') : grpContainer.classList.remove('e-hidden');
3606
+ if (isHidden) {
3607
+ grpContainer.classList.add('e-hidden');
3608
+ }
3609
+ else {
3610
+ grpContainer.classList.remove('e-hidden');
3611
+ }
3521
3612
  }
3522
3613
  }
3523
3614
  }
@@ -3555,38 +3646,35 @@ var Ribbon = /** @class */ (function (_super) {
3555
3646
  hiddenProps = this.hiddenElements[parseInt(tabIndex.toString(), 10)];
3556
3647
  }
3557
3648
  if (hiddenProps) {
3558
- /* eslint-disable */
3559
- if (!hiddenProps[key]) {
3560
- hiddenProps[key] = [];
3649
+ if (!hiddenProps["" + key]) {
3650
+ hiddenProps["" + key] = [];
3561
3651
  }
3562
- if (hiddenProps[key].length) {
3563
- var index = hiddenProps[key].indexOf(id);
3652
+ if (hiddenProps["" + key].length) {
3653
+ var index = hiddenProps["" + key].indexOf(id);
3564
3654
  if (index === -1) {
3565
- hiddenProps[key].push(id);
3655
+ hiddenProps["" + key].push(id);
3566
3656
  }
3567
3657
  }
3568
3658
  else {
3569
- hiddenProps[key].push(id);
3659
+ hiddenProps["" + key].push(id);
3570
3660
  }
3571
- /* eslint-enable */
3572
3661
  }
3573
3662
  }
3574
3663
  };
3575
3664
  Ribbon.prototype.updateItemsSimplifiedWidth = function (tabIndex, key) {
3576
3665
  var hiddenProps = this.hiddenElements[parseInt(tabIndex.toString(), 10)];
3577
- /* eslint-disable */
3578
- if (hiddenProps && hiddenProps[key] && hiddenProps[key].length) {
3666
+ if (hiddenProps && hiddenProps["" + key] && hiddenProps["" + key].length) {
3579
3667
  var _loop_6 = function (i) {
3580
- var contentEle = this_6.tabObj.items[tabIndex].content;
3668
+ var contentEle = this_6.tabObj.items[parseInt(tabIndex.toString(), 10)].content;
3581
3669
  var hiddenEle;
3582
3670
  var groupEle = void 0;
3583
3671
  var isGroupHidden = false;
3584
3672
  var widthDifference = 0;
3585
3673
  if (key === 'hideGroup' || key === 'showGroup') {
3586
- hiddenEle = contentEle.querySelector('#' + hiddenProps[key][i]);
3674
+ hiddenEle = contentEle.querySelector('#' + hiddenProps["" + key][parseInt(i.toString(), 10)]);
3587
3675
  }
3588
3676
  else {
3589
- hiddenEle = contentEle.querySelector('#' + hiddenProps[key][i] + constants.CONTAINER_ID);
3677
+ hiddenEle = contentEle.querySelector('#' + hiddenProps["" + key][parseInt(i.toString(), 10)] + constants.CONTAINER_ID);
3590
3678
  }
3591
3679
  if (hiddenEle) {
3592
3680
  if (key === 'hideGroup' || key === 'hideItem') {
@@ -3646,15 +3734,15 @@ var Ribbon = /** @class */ (function (_super) {
3646
3734
  groupEle.classList.add('e-ribbon-emptyCollection');
3647
3735
  }
3648
3736
  }
3649
- var index = hiddenProps[key].indexOf(hiddenProps[key][i]);
3737
+ var index = hiddenProps["" + key].indexOf(hiddenProps["" + key][parseInt(i.toString(), 10)]);
3650
3738
  if (index !== -1) {
3651
- hiddenProps[key].splice(index, 1);
3739
+ hiddenProps["" + key].splice(index, 1);
3652
3740
  i--;
3653
3741
  }
3654
3742
  out_i_1 = i;
3655
3743
  };
3656
3744
  var this_6 = this, out_i_1;
3657
- for (var i = 0; i < hiddenProps[key].length; i++) {
3745
+ for (var i = 0; i < hiddenProps["" + key].length; i++) {
3658
3746
  _loop_6(i);
3659
3747
  i = out_i_1;
3660
3748
  }
@@ -3788,7 +3876,12 @@ var Ribbon = /** @class */ (function (_super) {
3788
3876
  var contentEle = this.tabObj.items[itemProp.tabIndex].content;
3789
3877
  var groupEle = contentEle.querySelector('#' + groupID);
3790
3878
  if (groupEle) {
3791
- isDisabled ? groupEle.classList.add('e-disabled') : groupEle.classList.remove('e-disabled');
3879
+ if (isDisabled) {
3880
+ groupEle.classList.add('e-disabled');
3881
+ }
3882
+ else {
3883
+ groupEle.classList.remove('e-disabled');
3884
+ }
3792
3885
  }
3793
3886
  else {
3794
3887
  this.updateInitialProps(itemProp.tabIndex, groupID, 'disabledGroups', isDisabled);
@@ -3803,13 +3896,23 @@ var Ribbon = /** @class */ (function (_super) {
3803
3896
  overflowtarget = overflowDDB.target;
3804
3897
  }
3805
3898
  if (overflowtarget) {
3806
- isDisabled ? overflowtarget.classList.add('e-disabled') : overflowtarget.classList.remove('e-disabled');
3899
+ if (isDisabled) {
3900
+ overflowtarget.classList.add('e-disabled');
3901
+ }
3902
+ else {
3903
+ overflowtarget.classList.remove('e-disabled');
3904
+ }
3807
3905
  }
3808
3906
  }
3809
3907
  else if (ofTabContainer) {
3810
3908
  var grpContainer = ofTabContainer.querySelector('#' + groupID + constants.CONTAINER_ID);
3811
3909
  if (grpContainer) {
3812
- isDisabled ? grpContainer.classList.add('e-disabled') : grpContainer.classList.remove('e-disabled');
3910
+ if (isDisabled) {
3911
+ grpContainer.classList.add('e-disabled');
3912
+ }
3913
+ else {
3914
+ grpContainer.classList.remove('e-disabled');
3915
+ }
3813
3916
  }
3814
3917
  }
3815
3918
  }
@@ -4035,19 +4138,22 @@ var Ribbon = /** @class */ (function (_super) {
4035
4138
  initialProps = this.initialPropsData[parseInt(tabIndex.toString(), 10)];
4036
4139
  }
4037
4140
  if (initialProps) {
4038
- /* eslint-disable */
4039
- if (!initialProps[key])
4040
- initialProps[key] = [];
4041
- var itemIndex = initialProps[key].indexOf(id);
4141
+ if (!initialProps["" + key]) {
4142
+ initialProps["" + key] = [];
4143
+ }
4144
+ var itemIndex = initialProps["" + key].indexOf(id);
4042
4145
  if (isInsert) {
4043
- if (itemIndex === -1)
4044
- initialProps[key].push(id);
4146
+ if (itemIndex === -1) {
4147
+ initialProps["" + key].push(id);
4148
+ }
4045
4149
  }
4046
4150
  else {
4047
- if (itemIndex !== -1)
4048
- initialProps[key].splice(itemIndex, 1);
4049
- initialProps[key].length === 0 && delete initialProps[key];
4050
- /* eslint-enable */
4151
+ if (itemIndex !== -1) {
4152
+ initialProps["" + key].splice(itemIndex, 1);
4153
+ }
4154
+ if (initialProps["" + key].length === 0) {
4155
+ delete initialProps["" + key];
4156
+ }
4051
4157
  if (Object.keys(initialProps).length === 0) {
4052
4158
  delete this.initialPropsData[parseInt(tabIndex.toString(), 10)];
4053
4159
  }
@@ -4108,7 +4214,12 @@ var Ribbon = /** @class */ (function (_super) {
4108
4214
  overflowtarget = overflowDDB.target;
4109
4215
  }
4110
4216
  if (overflowtarget) {
4111
- isHidden ? overflowtarget.classList.add('e-hide-group') : overflowtarget.classList.remove('e-hide-group');
4217
+ if (isHidden) {
4218
+ overflowtarget.classList.add('e-hide-group');
4219
+ }
4220
+ else {
4221
+ overflowtarget.classList.remove('e-hide-group');
4222
+ }
4112
4223
  }
4113
4224
  }
4114
4225
  else {
@@ -4118,7 +4229,12 @@ var Ribbon = /** @class */ (function (_super) {
4118
4229
  if (ofTabContainer) {
4119
4230
  var grpContainer = ofTabContainer.querySelector('#' + groupID + constants.CONTAINER_ID);
4120
4231
  if (grpContainer) {
4121
- isHidden ? grpContainer.classList.add('e-hide-group') : grpContainer.classList.remove('e-hide-group');
4232
+ if (isHidden) {
4233
+ grpContainer.classList.add('e-hide-group');
4234
+ }
4235
+ else {
4236
+ grpContainer.classList.remove('e-hide-group');
4237
+ }
4122
4238
  }
4123
4239
  }
4124
4240
  }
@@ -4158,8 +4274,8 @@ var Ribbon = /** @class */ (function (_super) {
4158
4274
  var item = _d[_c];
4159
4275
  var ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id) : contentEle.querySelector('#' + item.id);
4160
4276
  if (item.type === RibbonItemType.GroupButton && this.activeLayout === 'Classic') {
4161
- ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id + constants.RIBBON_GROUP_BUTTON_ID) :
4162
- contentEle.querySelector('#' + item.id + constants.RIBBON_GROUP_BUTTON_ID);
4277
+ ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id +
4278
+ constants.RIBBON_GROUP_BUTTON_ID) : contentEle.querySelector('#' + item.id + constants.RIBBON_GROUP_BUTTON_ID);
4163
4279
  }
4164
4280
  if (ele) {
4165
4281
  this.destroyFunction(item, ele);
@@ -4265,7 +4381,8 @@ var Ribbon = /** @class */ (function (_super) {
4265
4381
  }
4266
4382
  if (this.activeLayout === RibbonLayout.Simplified) {
4267
4383
  if (itemProp.group.enableGroupOverflow) {
4268
- if (dropdown.target.childElementCount === 0 || (dropdown.target.childElementCount === 1 && this.isHeaderVisible(dropdown.target, itemProp.group.id))) {
4384
+ if (dropdown.target.childElementCount === 0 || (dropdown.target.childElementCount
4385
+ === 1 && this.isHeaderVisible(dropdown.target, itemProp.group.id))) {
4269
4386
  this.removeOverflowButton(dropdown);
4270
4387
  }
4271
4388
  }
@@ -4563,7 +4680,7 @@ var Ribbon = /** @class */ (function (_super) {
4563
4680
  * Gets the Ribbon item model associated with the specified item ID.
4564
4681
  *
4565
4682
  * @param {string} itemId - The unique ID of the Ribbon item.
4566
- * @returns {RibbonItemModel}
4683
+ * @returns {RibbonItemModel} - Returns the Ribbon item model.
4567
4684
  */
4568
4685
  Ribbon.prototype.getItem = function (itemId) {
4569
4686
  return getItem(this.tabs, itemId).item;
@@ -4585,7 +4702,8 @@ var Ribbon = /** @class */ (function (_super) {
4585
4702
  if (ele) {
4586
4703
  var itemEle = closest(ele, '.e-ribbon-item');
4587
4704
  var moduleName = this.getItemModuleName(itemProp.item);
4588
- isUpdated = isDisabled ? !itemEle.classList.contains(constants.DISABLED_CSS) : itemEle.classList.contains(constants.DISABLED_CSS);
4705
+ isUpdated = isDisabled ? !itemEle.classList.contains(constants.DISABLED_CSS) :
4706
+ itemEle.classList.contains(constants.DISABLED_CSS);
4589
4707
  if (moduleName !== 'template') {
4590
4708
  if (isUpdated) {
4591
4709
  if (moduleName === 'group-btn' && this.activeLayout === 'Simplified') {
@@ -4726,13 +4844,14 @@ var Ribbon = /** @class */ (function (_super) {
4726
4844
  }
4727
4845
  }
4728
4846
  break;
4729
- case 'selectedTab':
4847
+ case 'selectedTab': {
4730
4848
  var tabEle = this.tabObj.element;
4731
4849
  var toolbarItem = tabEle.querySelectorAll('.e-toolbar-item')[parseInt(newProp.selectedTab.toString(), 10)];
4732
4850
  if (!(toolbarItem.classList.contains('e-hidden') || toolbarItem.classList.contains('e-disable'))) {
4733
4851
  this.tabObj.setProperties({ selectedItem: newProp.selectedTab });
4734
4852
  }
4735
4853
  break;
4854
+ }
4736
4855
  case 'tabAnimation':
4737
4856
  this.tabObj.setProperties({ animation: newProp.tabAnimation });
4738
4857
  break;
@@ -4750,21 +4869,23 @@ var Ribbon = /** @class */ (function (_super) {
4750
4869
  this.element.style.width = formatUnit(newProp.width);
4751
4870
  this.refreshLayout();
4752
4871
  break;
4753
- case 'fileMenu':
4872
+ case 'fileMenu': {
4754
4873
  if (this.ribbonFileMenuModule) {
4755
4874
  this.ribbonFileMenuModule.updateFileMenu(this.fileMenu);
4756
4875
  }
4757
4876
  var toolbarEle = this.tabObj['tbObj'];
4758
4877
  toolbarEle.refreshOverflow();
4759
4878
  break;
4760
- case 'backStageMenu':
4879
+ }
4880
+ case 'backStageMenu': {
4761
4881
  if (this.ribbonBackstageModule) {
4762
4882
  this.ribbonBackstageModule.updateBackStageMenu(this.backStageMenu);
4763
4883
  }
4764
4884
  var toolbarElement = this.tabObj['tbObj'];
4765
4885
  toolbarElement.refreshOverflow();
4766
4886
  break;
4767
- case 'helpPaneTemplate':
4887
+ }
4888
+ case 'helpPaneTemplate': {
4768
4889
  if (this.ribbonTempEle) {
4769
4890
  remove(this.ribbonTempEle);
4770
4891
  this.ribbonTempEle = null;
@@ -4776,8 +4897,14 @@ var Ribbon = /** @class */ (function (_super) {
4776
4897
  var toolbar_1 = this.tabObj['tbObj'];
4777
4898
  toolbar_1.refreshOverflow();
4778
4899
  break;
4900
+ }
4779
4901
  case 'hideLayoutSwitcher':
4780
- this.hideLayoutSwitcher ? this.removeExpandCollapse() : this.addExpandCollapse();
4902
+ if (this.hideLayoutSwitcher) {
4903
+ this.removeExpandCollapse();
4904
+ }
4905
+ else {
4906
+ this.addExpandCollapse();
4907
+ }
4781
4908
  break;
4782
4909
  }
4783
4910
  }