@syncfusion/ej2-ribbon 25.2.5 → 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 (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 +821 -592
  5. package/dist/es6/ej2-ribbon.es2015.js.map +1 -1
  6. package/dist/es6/ej2-ribbon.es5.js +812 -577
  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 +195 -94
  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 +452 -269
  37. package/styles/bootstrap-dark.scss +18 -1
  38. package/styles/bootstrap.css +456 -276
  39. package/styles/bootstrap.scss +18 -1
  40. package/styles/bootstrap4.css +455 -272
  41. package/styles/bootstrap4.scss +18 -1
  42. package/styles/bootstrap5-dark.css +470 -278
  43. package/styles/bootstrap5-dark.scss +18 -1
  44. package/styles/bootstrap5.css +470 -278
  45. package/styles/bootstrap5.scss +18 -1
  46. package/styles/fabric-dark.css +451 -269
  47. package/styles/fabric-dark.scss +18 -1
  48. package/styles/fabric.css +450 -272
  49. package/styles/fabric.scss +18 -1
  50. package/styles/fluent-dark.css +472 -277
  51. package/styles/fluent-dark.scss +18 -1
  52. package/styles/fluent.css +472 -277
  53. package/styles/fluent.scss +18 -1
  54. package/styles/fluent2.css +3868 -0
  55. package/styles/fluent2.scss +18 -0
  56. package/styles/highcontrast-light.css +445 -263
  57. package/styles/highcontrast-light.scss +17 -1
  58. package/styles/highcontrast.css +451 -273
  59. package/styles/highcontrast.scss +18 -1
  60. package/styles/material-dark.css +540 -283
  61. package/styles/material-dark.scss +18 -1
  62. package/styles/material.css +539 -289
  63. package/styles/material.scss +18 -1
  64. package/styles/material3-dark.css +496 -280
  65. package/styles/material3-dark.scss +18 -1
  66. package/styles/material3.css +496 -280
  67. package/styles/material3.scss +18 -1
  68. package/styles/ribbon/_bds-definition.scss +56 -20
  69. package/styles/ribbon/_bootstrap-dark-definition.scss +56 -20
  70. package/styles/ribbon/_bootstrap-definition.scss +57 -21
  71. package/styles/ribbon/_bootstrap4-definition.scss +57 -21
  72. package/styles/ribbon/_bootstrap5-definition.scss +57 -21
  73. package/styles/ribbon/_bootstrap5.3-definition.scss +396 -0
  74. package/styles/ribbon/_fabric-dark-definition.scss +55 -19
  75. package/styles/ribbon/_fabric-definition.scss +56 -20
  76. package/styles/ribbon/_fluent-definition.scss +59 -23
  77. package/styles/ribbon/_fluent2-definition.scss +396 -0
  78. package/styles/ribbon/_fusionnew-definition.scss +50 -14
  79. package/styles/ribbon/_highcontrast-definition.scss +58 -22
  80. package/styles/ribbon/_highcontrast-light-definition.scss +49 -13
  81. package/styles/ribbon/_layout.scss +359 -399
  82. package/styles/ribbon/_material-dark-definition.scss +56 -20
  83. package/styles/ribbon/_material-definition.scss +56 -20
  84. package/styles/ribbon/_material3-definition.scss +56 -19
  85. package/styles/ribbon/_tailwind-definition.scss +56 -20
  86. package/styles/ribbon/_theme.scss +118 -170
  87. package/styles/ribbon/bootstrap-dark.css +452 -269
  88. package/styles/ribbon/bootstrap.css +456 -276
  89. package/styles/ribbon/bootstrap4.css +455 -272
  90. package/styles/ribbon/bootstrap5-dark.css +470 -278
  91. package/styles/ribbon/bootstrap5.css +470 -278
  92. package/styles/ribbon/fabric-dark.css +451 -269
  93. package/styles/ribbon/fabric.css +450 -272
  94. package/styles/ribbon/fluent-dark.css +472 -277
  95. package/styles/ribbon/fluent.css +472 -277
  96. package/styles/ribbon/fluent2.css +3868 -0
  97. package/styles/ribbon/fluent2.scss +18 -0
  98. package/styles/ribbon/highcontrast-light.css +445 -263
  99. package/styles/ribbon/highcontrast.css +451 -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 +540 -283
  103. package/styles/ribbon/material.css +539 -289
  104. package/styles/ribbon/material3-dark.css +496 -280
  105. package/styles/ribbon/material3.css +496 -280
  106. package/styles/ribbon/tailwind-dark.css +506 -280
  107. package/styles/ribbon/tailwind.css +506 -280
  108. package/styles/tailwind-dark.css +506 -280
  109. package/styles/tailwind-dark.scss +18 -1
  110. package/styles/tailwind.css +506 -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 () {
@@ -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
  }
@@ -3073,8 +3123,8 @@ var Ribbon = /** @class */ (function (_super) {
3073
3123
  ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id) :
3074
3124
  contentEle.querySelector('#' + item.id);
3075
3125
  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);
3126
+ ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id +
3127
+ constants.RIBBON_GROUP_BUTTON_ID) : contentEle.querySelector('#' + item.id + constants.RIBBON_GROUP_BUTTON_ID);
3078
3128
  }
3079
3129
  if (item.type === RibbonItemType.Gallery) {
3080
3130
  ele = contentEle.querySelector('#' + item.id + constants.CONTAINER_ID);
@@ -3241,6 +3291,7 @@ var Ribbon = /** @class */ (function (_super) {
3241
3291
  * Shows a specific tab in the ribbon.
3242
3292
  *
3243
3293
  * @param {string} tabId - The ID of the tab to be shown.
3294
+ * @param {boolean} isContextual - The boolean if the rendering is contextual.
3244
3295
  * @returns {void}
3245
3296
  */
3246
3297
  Ribbon.prototype.showTab = function (tabId, isContextual) {
@@ -3251,6 +3302,7 @@ var Ribbon = /** @class */ (function (_super) {
3251
3302
  * Hides a specific tab in the ribbon.
3252
3303
  *
3253
3304
  * @param {string} tabId - The ID of the tab to be hidden.
3305
+ * @param {boolean} isContextual - The boolean if the rendering is contextual.
3254
3306
  * @returns {void}
3255
3307
  */
3256
3308
  Ribbon.prototype.hideTab = function (tabId, isContextual) {
@@ -3276,7 +3328,9 @@ var Ribbon = /** @class */ (function (_super) {
3276
3328
  if (contextualTab_1) {
3277
3329
  var isTabHidden = true;
3278
3330
  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; });
3331
+ var index_1 = getIndex(this_5.tabs, function (e) {
3332
+ return e.id === contextualTab_1.tabs[parseInt(i.toString(), 10)].id;
3333
+ });
3280
3334
  if (index_1 !== -1) {
3281
3335
  var toolbarEle = tabEle.querySelectorAll('.e-toolbar-item')[parseInt(index_1.toString(), 10)];
3282
3336
  if (!(toolbarEle.classList.contains('e-hidden'))) {
@@ -3365,8 +3419,8 @@ var Ribbon = /** @class */ (function (_super) {
3365
3419
  var item = _d[_c];
3366
3420
  var ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id) : contentEle.querySelector('#' + item.id);
3367
3421
  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);
3422
+ ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id +
3423
+ constants.RIBBON_GROUP_BUTTON_ID) : contentEle.querySelector('#' + item.id + constants.RIBBON_GROUP_BUTTON_ID);
3370
3424
  }
3371
3425
  if (ele) {
3372
3426
  this.destroyFunction(item, ele);
@@ -3464,7 +3518,8 @@ var Ribbon = /** @class */ (function (_super) {
3464
3518
  }
3465
3519
  if (this.activeLayout === RibbonLayout.Simplified) {
3466
3520
  if (itemProp.group.enableGroupOverflow) {
3467
- 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))) {
3468
3523
  this.removeOverflowButton(dropdown);
3469
3524
  }
3470
3525
  }
@@ -3537,13 +3592,23 @@ var Ribbon = /** @class */ (function (_super) {
3537
3592
  overflowtarget = overflowDDB.target;
3538
3593
  }
3539
3594
  if (overflowtarget) {
3540
- 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
+ }
3541
3601
  }
3542
3602
  }
3543
3603
  else if (ofTabContainer) {
3544
3604
  var grpContainer = ofTabContainer.querySelector('#' + groupID + constants.CONTAINER_ID);
3545
3605
  if (grpContainer) {
3546
- 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
+ }
3547
3612
  }
3548
3613
  }
3549
3614
  }
@@ -3581,38 +3646,35 @@ var Ribbon = /** @class */ (function (_super) {
3581
3646
  hiddenProps = this.hiddenElements[parseInt(tabIndex.toString(), 10)];
3582
3647
  }
3583
3648
  if (hiddenProps) {
3584
- /* eslint-disable */
3585
- if (!hiddenProps[key]) {
3586
- hiddenProps[key] = [];
3649
+ if (!hiddenProps["" + key]) {
3650
+ hiddenProps["" + key] = [];
3587
3651
  }
3588
- if (hiddenProps[key].length) {
3589
- var index = hiddenProps[key].indexOf(id);
3652
+ if (hiddenProps["" + key].length) {
3653
+ var index = hiddenProps["" + key].indexOf(id);
3590
3654
  if (index === -1) {
3591
- hiddenProps[key].push(id);
3655
+ hiddenProps["" + key].push(id);
3592
3656
  }
3593
3657
  }
3594
3658
  else {
3595
- hiddenProps[key].push(id);
3659
+ hiddenProps["" + key].push(id);
3596
3660
  }
3597
- /* eslint-enable */
3598
3661
  }
3599
3662
  }
3600
3663
  };
3601
3664
  Ribbon.prototype.updateItemsSimplifiedWidth = function (tabIndex, key) {
3602
3665
  var hiddenProps = this.hiddenElements[parseInt(tabIndex.toString(), 10)];
3603
- /* eslint-disable */
3604
- if (hiddenProps && hiddenProps[key] && hiddenProps[key].length) {
3666
+ if (hiddenProps && hiddenProps["" + key] && hiddenProps["" + key].length) {
3605
3667
  var _loop_6 = function (i) {
3606
- var contentEle = this_6.tabObj.items[tabIndex].content;
3668
+ var contentEle = this_6.tabObj.items[parseInt(tabIndex.toString(), 10)].content;
3607
3669
  var hiddenEle;
3608
3670
  var groupEle = void 0;
3609
3671
  var isGroupHidden = false;
3610
3672
  var widthDifference = 0;
3611
3673
  if (key === 'hideGroup' || key === 'showGroup') {
3612
- hiddenEle = contentEle.querySelector('#' + hiddenProps[key][i]);
3674
+ hiddenEle = contentEle.querySelector('#' + hiddenProps["" + key][parseInt(i.toString(), 10)]);
3613
3675
  }
3614
3676
  else {
3615
- hiddenEle = contentEle.querySelector('#' + hiddenProps[key][i] + constants.CONTAINER_ID);
3677
+ hiddenEle = contentEle.querySelector('#' + hiddenProps["" + key][parseInt(i.toString(), 10)] + constants.CONTAINER_ID);
3616
3678
  }
3617
3679
  if (hiddenEle) {
3618
3680
  if (key === 'hideGroup' || key === 'hideItem') {
@@ -3672,15 +3734,15 @@ var Ribbon = /** @class */ (function (_super) {
3672
3734
  groupEle.classList.add('e-ribbon-emptyCollection');
3673
3735
  }
3674
3736
  }
3675
- var index = hiddenProps[key].indexOf(hiddenProps[key][i]);
3737
+ var index = hiddenProps["" + key].indexOf(hiddenProps["" + key][parseInt(i.toString(), 10)]);
3676
3738
  if (index !== -1) {
3677
- hiddenProps[key].splice(index, 1);
3739
+ hiddenProps["" + key].splice(index, 1);
3678
3740
  i--;
3679
3741
  }
3680
3742
  out_i_1 = i;
3681
3743
  };
3682
3744
  var this_6 = this, out_i_1;
3683
- for (var i = 0; i < hiddenProps[key].length; i++) {
3745
+ for (var i = 0; i < hiddenProps["" + key].length; i++) {
3684
3746
  _loop_6(i);
3685
3747
  i = out_i_1;
3686
3748
  }
@@ -3814,7 +3876,12 @@ var Ribbon = /** @class */ (function (_super) {
3814
3876
  var contentEle = this.tabObj.items[itemProp.tabIndex].content;
3815
3877
  var groupEle = contentEle.querySelector('#' + groupID);
3816
3878
  if (groupEle) {
3817
- 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
+ }
3818
3885
  }
3819
3886
  else {
3820
3887
  this.updateInitialProps(itemProp.tabIndex, groupID, 'disabledGroups', isDisabled);
@@ -3829,13 +3896,23 @@ var Ribbon = /** @class */ (function (_super) {
3829
3896
  overflowtarget = overflowDDB.target;
3830
3897
  }
3831
3898
  if (overflowtarget) {
3832
- 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
+ }
3833
3905
  }
3834
3906
  }
3835
3907
  else if (ofTabContainer) {
3836
3908
  var grpContainer = ofTabContainer.querySelector('#' + groupID + constants.CONTAINER_ID);
3837
3909
  if (grpContainer) {
3838
- 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
+ }
3839
3916
  }
3840
3917
  }
3841
3918
  }
@@ -4061,19 +4138,22 @@ var Ribbon = /** @class */ (function (_super) {
4061
4138
  initialProps = this.initialPropsData[parseInt(tabIndex.toString(), 10)];
4062
4139
  }
4063
4140
  if (initialProps) {
4064
- /* eslint-disable */
4065
- if (!initialProps[key])
4066
- initialProps[key] = [];
4067
- var itemIndex = initialProps[key].indexOf(id);
4141
+ if (!initialProps["" + key]) {
4142
+ initialProps["" + key] = [];
4143
+ }
4144
+ var itemIndex = initialProps["" + key].indexOf(id);
4068
4145
  if (isInsert) {
4069
- if (itemIndex === -1)
4070
- initialProps[key].push(id);
4146
+ if (itemIndex === -1) {
4147
+ initialProps["" + key].push(id);
4148
+ }
4071
4149
  }
4072
4150
  else {
4073
- if (itemIndex !== -1)
4074
- initialProps[key].splice(itemIndex, 1);
4075
- initialProps[key].length === 0 && delete initialProps[key];
4076
- /* eslint-enable */
4151
+ if (itemIndex !== -1) {
4152
+ initialProps["" + key].splice(itemIndex, 1);
4153
+ }
4154
+ if (initialProps["" + key].length === 0) {
4155
+ delete initialProps["" + key];
4156
+ }
4077
4157
  if (Object.keys(initialProps).length === 0) {
4078
4158
  delete this.initialPropsData[parseInt(tabIndex.toString(), 10)];
4079
4159
  }
@@ -4134,7 +4214,12 @@ var Ribbon = /** @class */ (function (_super) {
4134
4214
  overflowtarget = overflowDDB.target;
4135
4215
  }
4136
4216
  if (overflowtarget) {
4137
- 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
+ }
4138
4223
  }
4139
4224
  }
4140
4225
  else {
@@ -4144,7 +4229,12 @@ var Ribbon = /** @class */ (function (_super) {
4144
4229
  if (ofTabContainer) {
4145
4230
  var grpContainer = ofTabContainer.querySelector('#' + groupID + constants.CONTAINER_ID);
4146
4231
  if (grpContainer) {
4147
- 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
+ }
4148
4238
  }
4149
4239
  }
4150
4240
  }
@@ -4184,8 +4274,8 @@ var Ribbon = /** @class */ (function (_super) {
4184
4274
  var item = _d[_c];
4185
4275
  var ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id) : contentEle.querySelector('#' + item.id);
4186
4276
  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);
4277
+ ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id +
4278
+ constants.RIBBON_GROUP_BUTTON_ID) : contentEle.querySelector('#' + item.id + constants.RIBBON_GROUP_BUTTON_ID);
4189
4279
  }
4190
4280
  if (ele) {
4191
4281
  this.destroyFunction(item, ele);
@@ -4291,7 +4381,8 @@ var Ribbon = /** @class */ (function (_super) {
4291
4381
  }
4292
4382
  if (this.activeLayout === RibbonLayout.Simplified) {
4293
4383
  if (itemProp.group.enableGroupOverflow) {
4294
- 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))) {
4295
4386
  this.removeOverflowButton(dropdown);
4296
4387
  }
4297
4388
  }
@@ -4589,7 +4680,7 @@ var Ribbon = /** @class */ (function (_super) {
4589
4680
  * Gets the Ribbon item model associated with the specified item ID.
4590
4681
  *
4591
4682
  * @param {string} itemId - The unique ID of the Ribbon item.
4592
- * @returns {RibbonItemModel}
4683
+ * @returns {RibbonItemModel} - Returns the Ribbon item model.
4593
4684
  */
4594
4685
  Ribbon.prototype.getItem = function (itemId) {
4595
4686
  return getItem(this.tabs, itemId).item;
@@ -4611,7 +4702,8 @@ var Ribbon = /** @class */ (function (_super) {
4611
4702
  if (ele) {
4612
4703
  var itemEle = closest(ele, '.e-ribbon-item');
4613
4704
  var moduleName = this.getItemModuleName(itemProp.item);
4614
- 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);
4615
4707
  if (moduleName !== 'template') {
4616
4708
  if (isUpdated) {
4617
4709
  if (moduleName === 'group-btn' && this.activeLayout === 'Simplified') {
@@ -4752,13 +4844,14 @@ var Ribbon = /** @class */ (function (_super) {
4752
4844
  }
4753
4845
  }
4754
4846
  break;
4755
- case 'selectedTab':
4847
+ case 'selectedTab': {
4756
4848
  var tabEle = this.tabObj.element;
4757
4849
  var toolbarItem = tabEle.querySelectorAll('.e-toolbar-item')[parseInt(newProp.selectedTab.toString(), 10)];
4758
4850
  if (!(toolbarItem.classList.contains('e-hidden') || toolbarItem.classList.contains('e-disable'))) {
4759
4851
  this.tabObj.setProperties({ selectedItem: newProp.selectedTab });
4760
4852
  }
4761
4853
  break;
4854
+ }
4762
4855
  case 'tabAnimation':
4763
4856
  this.tabObj.setProperties({ animation: newProp.tabAnimation });
4764
4857
  break;
@@ -4776,21 +4869,23 @@ var Ribbon = /** @class */ (function (_super) {
4776
4869
  this.element.style.width = formatUnit(newProp.width);
4777
4870
  this.refreshLayout();
4778
4871
  break;
4779
- case 'fileMenu':
4872
+ case 'fileMenu': {
4780
4873
  if (this.ribbonFileMenuModule) {
4781
4874
  this.ribbonFileMenuModule.updateFileMenu(this.fileMenu);
4782
4875
  }
4783
4876
  var toolbarEle = this.tabObj['tbObj'];
4784
4877
  toolbarEle.refreshOverflow();
4785
4878
  break;
4786
- case 'backStageMenu':
4879
+ }
4880
+ case 'backStageMenu': {
4787
4881
  if (this.ribbonBackstageModule) {
4788
4882
  this.ribbonBackstageModule.updateBackStageMenu(this.backStageMenu);
4789
4883
  }
4790
4884
  var toolbarElement = this.tabObj['tbObj'];
4791
4885
  toolbarElement.refreshOverflow();
4792
4886
  break;
4793
- case 'helpPaneTemplate':
4887
+ }
4888
+ case 'helpPaneTemplate': {
4794
4889
  if (this.ribbonTempEle) {
4795
4890
  remove(this.ribbonTempEle);
4796
4891
  this.ribbonTempEle = null;
@@ -4802,8 +4897,14 @@ var Ribbon = /** @class */ (function (_super) {
4802
4897
  var toolbar_1 = this.tabObj['tbObj'];
4803
4898
  toolbar_1.refreshOverflow();
4804
4899
  break;
4900
+ }
4805
4901
  case 'hideLayoutSwitcher':
4806
- this.hideLayoutSwitcher ? this.removeExpandCollapse() : this.addExpandCollapse();
4902
+ if (this.hideLayoutSwitcher) {
4903
+ this.removeExpandCollapse();
4904
+ }
4905
+ else {
4906
+ this.addExpandCollapse();
4907
+ }
4807
4908
  break;
4808
4909
  }
4809
4910
  }