@syncfusion/ej2-ribbon 22.2.12 → 23.1.36

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 (126) hide show
  1. package/CHANGELOG.md +0 -26
  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 +1739 -192
  5. package/dist/es6/ej2-ribbon.es2015.js.map +1 -1
  6. package/dist/es6/ej2-ribbon.es5.js +1800 -135
  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/global.js +1 -1
  13. package/src/ribbon/base/constant.d.ts +40 -0
  14. package/src/ribbon/base/constant.js +40 -0
  15. package/src/ribbon/base/interface.d.ts +49 -2
  16. package/src/ribbon/base/interface.js +19 -1
  17. package/src/ribbon/base/ribbon-model.d.ts +25 -1
  18. package/src/ribbon/base/ribbon.d.ts +108 -3
  19. package/src/ribbon/base/ribbon.js +434 -61
  20. package/src/ribbon/items/index.d.ts +1 -0
  21. package/src/ribbon/items/index.js +1 -0
  22. package/src/ribbon/items/ribbon-button.js +3 -0
  23. package/src/ribbon/items/ribbon-colorpicker.js +1 -1
  24. package/src/ribbon/items/ribbon-dropdown.js +2 -1
  25. package/src/ribbon/items/ribbon-groupbutton.d.ts +69 -0
  26. package/src/ribbon/items/ribbon-groupbutton.js +444 -0
  27. package/src/ribbon/models/index.d.ts +10 -0
  28. package/src/ribbon/models/index.js +5 -0
  29. package/src/ribbon/models/ribbon-back-button-model.d.ts +29 -0
  30. package/src/ribbon/models/ribbon-back-button.d.ts +24 -0
  31. package/src/ribbon/models/ribbon-back-button.js +40 -0
  32. package/src/ribbon/models/ribbon-back-stage-settings-model.d.ts +76 -0
  33. package/src/ribbon/models/ribbon-back-stage-settings.d.ts +75 -0
  34. package/src/ribbon/models/ribbon-back-stage-settings.js +70 -0
  35. package/src/ribbon/models/ribbon-backstage-item-model.d.ts +62 -0
  36. package/src/ribbon/models/ribbon-backstage-item.d.ts +74 -0
  37. package/src/ribbon/models/ribbon-backstage-item.js +52 -0
  38. package/src/ribbon/models/ribbon-combobox-settings-model.d.ts +15 -0
  39. package/src/ribbon/models/ribbon-combobox-settings.d.ts +15 -0
  40. package/src/ribbon/models/ribbon-dropdown-settings-model.d.ts +7 -0
  41. package/src/ribbon/models/ribbon-dropdown-settings.d.ts +6 -0
  42. package/src/ribbon/models/ribbon-dropdown-settings.js +3 -0
  43. package/src/ribbon/models/ribbon-file-menu-settings-model.d.ts +6 -0
  44. package/src/ribbon/models/ribbon-file-menu-settings.d.ts +6 -0
  45. package/src/ribbon/models/ribbon-group-button-item-model.d.ts +50 -0
  46. package/src/ribbon/models/ribbon-group-button-item.d.ts +44 -0
  47. package/src/ribbon/models/ribbon-group-button-item.js +50 -0
  48. package/src/ribbon/models/ribbon-group-button-settings-model.d.ts +25 -0
  49. package/src/ribbon/models/ribbon-group-button-settings.d.ts +23 -0
  50. package/src/ribbon/models/ribbon-group-button-settings.js +38 -0
  51. package/src/ribbon/models/ribbon-item-model.d.ts +11 -1
  52. package/src/ribbon/models/ribbon-item.d.ts +10 -0
  53. package/src/ribbon/models/ribbon-item.js +4 -0
  54. package/src/ribbon/modules/index.d.ts +1 -0
  55. package/src/ribbon/modules/index.js +1 -0
  56. package/src/ribbon/modules/ribbon-backstage.d.ts +112 -0
  57. package/src/ribbon/modules/ribbon-backstage.js +554 -0
  58. package/styles/bootstrap-dark.css +511 -8
  59. package/styles/bootstrap.css +511 -8
  60. package/styles/bootstrap4.css +511 -8
  61. package/styles/bootstrap5-dark.css +511 -8
  62. package/styles/bootstrap5.css +511 -8
  63. package/styles/fabric-dark.css +511 -8
  64. package/styles/fabric.css +511 -8
  65. package/styles/fluent-dark.css +511 -8
  66. package/styles/fluent.css +511 -8
  67. package/styles/highcontrast-light.css +511 -8
  68. package/styles/highcontrast.css +511 -8
  69. package/styles/material-dark.css +511 -9
  70. package/styles/material.css +512 -9
  71. package/styles/material3-dark.css +511 -9
  72. package/styles/material3-dark.scss +1 -1
  73. package/styles/material3.css +511 -9
  74. package/styles/material3.scss +1 -1
  75. package/styles/ribbon/_bootstrap-dark-definition.scss +65 -0
  76. package/styles/ribbon/_bootstrap-definition.scss +65 -0
  77. package/styles/ribbon/_bootstrap4-definition.scss +65 -0
  78. package/styles/ribbon/_bootstrap5-definition.scss +65 -0
  79. package/styles/ribbon/_fabric-dark-definition.scss +65 -0
  80. package/styles/ribbon/_fabric-definition.scss +65 -0
  81. package/styles/ribbon/_fluent-definition.scss +65 -0
  82. package/styles/ribbon/_fusionnew-definition.scss +65 -0
  83. package/styles/ribbon/_highcontrast-definition.scss +65 -0
  84. package/styles/ribbon/_highcontrast-light-definition.scss +65 -0
  85. package/styles/ribbon/_layout.scss +280 -5
  86. package/styles/ribbon/_material-dark-definition.scss +65 -0
  87. package/styles/ribbon/_material-definition.scss +65 -0
  88. package/styles/ribbon/_material3-definition.scss +66 -0
  89. package/styles/ribbon/_tailwind-definition.scss +65 -0
  90. package/styles/ribbon/_theme.scss +144 -1
  91. package/styles/ribbon/bootstrap-dark.css +511 -8
  92. package/styles/ribbon/bootstrap-dark.scss +1 -1
  93. package/styles/ribbon/bootstrap.css +511 -8
  94. package/styles/ribbon/bootstrap.scss +1 -1
  95. package/styles/ribbon/bootstrap4.css +511 -8
  96. package/styles/ribbon/bootstrap4.scss +1 -1
  97. package/styles/ribbon/bootstrap5-dark.css +511 -8
  98. package/styles/ribbon/bootstrap5-dark.scss +1 -1
  99. package/styles/ribbon/bootstrap5.css +511 -8
  100. package/styles/ribbon/bootstrap5.scss +1 -1
  101. package/styles/ribbon/fabric-dark.css +511 -8
  102. package/styles/ribbon/fabric-dark.scss +1 -1
  103. package/styles/ribbon/fabric.css +511 -8
  104. package/styles/ribbon/fabric.scss +1 -1
  105. package/styles/ribbon/fluent-dark.css +511 -8
  106. package/styles/ribbon/fluent-dark.scss +1 -1
  107. package/styles/ribbon/fluent.css +511 -8
  108. package/styles/ribbon/fluent.scss +1 -1
  109. package/styles/ribbon/highcontrast-light.css +511 -8
  110. package/styles/ribbon/highcontrast-light.scss +1 -1
  111. package/styles/ribbon/highcontrast.css +511 -8
  112. package/styles/ribbon/highcontrast.scss +1 -1
  113. package/styles/ribbon/material-dark.css +511 -9
  114. package/styles/ribbon/material-dark.scss +1 -1
  115. package/styles/ribbon/material.css +512 -9
  116. package/styles/ribbon/material.scss +1 -1
  117. package/styles/ribbon/material3-dark.css +511 -9
  118. package/styles/ribbon/material3-dark.scss +1 -1
  119. package/styles/ribbon/material3.css +511 -9
  120. package/styles/ribbon/material3.scss +1 -1
  121. package/styles/ribbon/tailwind-dark.css +511 -9
  122. package/styles/ribbon/tailwind-dark.scss +1 -1
  123. package/styles/ribbon/tailwind.css +511 -9
  124. package/styles/ribbon/tailwind.scss +1 -1
  125. package/styles/tailwind-dark.css +511 -9
  126. package/styles/tailwind.css +511 -9
@@ -4,7 +4,7 @@ import { ComboBox, FieldSettings } from '@syncfusion/ej2-dropdowns';
4
4
  import { DropDownButton, Item, SplitButton } from '@syncfusion/ej2-splitbuttons';
5
5
  import { Button, CheckBox } from '@syncfusion/ej2-buttons';
6
6
  import { ColorPicker } from '@syncfusion/ej2-inputs';
7
- import { Tooltip } from '@syncfusion/ej2-popups';
7
+ import { Popup, Tooltip } from '@syncfusion/ej2-popups';
8
8
 
9
9
  /**
10
10
  * Defines the layout types of ribbon.
@@ -74,7 +74,7 @@ var DisplayMode;
74
74
  */
75
75
  DisplayMode[DisplayMode["Overflow"] = 1] = "Overflow";
76
76
  /**
77
- * The item appears in classic layout group, simplified layout group, and overflow popup based on ribbon overflow state.
77
+ * The item appears in classic layout group, simplified layout group, and overflow popup based on ribbon overflow state.
78
78
  */
79
79
  DisplayMode[DisplayMode["Auto"] = 7] = "Auto";
80
80
  })(DisplayMode || (DisplayMode = {}));
@@ -107,11 +107,29 @@ var RibbonItemType;
107
107
  * Renders splitbutton as ribbon item.
108
108
  */
109
109
  RibbonItemType["SplitButton"] = "SplitButton";
110
+ /**
111
+ * Renders the group button content as ribbon item.
112
+ */
113
+ RibbonItemType["GroupButton"] = "GroupButton";
110
114
  /**
111
115
  * Renders the template content as ribbon item.
112
116
  */
113
117
  RibbonItemType["Template"] = "Template";
114
118
  })(RibbonItemType || (RibbonItemType = {}));
119
+ /**
120
+ * Defines the alignment of the items in the ribbon group.
121
+ */
122
+ var RibbonGroupButtonSelection;
123
+ (function (RibbonGroupButtonSelection) {
124
+ /**
125
+ * Allows selecting single button from button group.
126
+ */
127
+ RibbonGroupButtonSelection["Single"] = "Single";
128
+ /**
129
+ * Allows selecting multiple buttons from button group.
130
+ */
131
+ RibbonGroupButtonSelection["Multiple"] = "Multiple";
132
+ })(RibbonGroupButtonSelection || (RibbonGroupButtonSelection = {}));
115
133
 
116
134
  var __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
117
135
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -403,6 +421,9 @@ __decorate$9([
403
421
  __decorate$9([
404
422
  Property('')
405
423
  ], RibbonDropDownSettings.prototype, "target", void 0);
424
+ __decorate$9([
425
+ Property(false)
426
+ ], RibbonDropDownSettings.prototype, "createPopupOnClick", void 0);
406
427
  __decorate$9([
407
428
  Event()
408
429
  ], RibbonDropDownSettings.prototype, "beforeClose", void 0);
@@ -515,6 +536,54 @@ __decorate$11([
515
536
  Property('')
516
537
  ], RibbonTooltip.prototype, "iconCss", void 0);
517
538
 
539
+ var __decorate$13 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
540
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
541
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
542
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
543
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
544
+ };
545
+ /**
546
+ * Defines the ribbon group button settings.
547
+ */
548
+ class RibbonGroupButtonItem extends ChildProperty {
549
+ }
550
+ __decorate$13([
551
+ Property('')
552
+ ], RibbonGroupButtonItem.prototype, "content", void 0);
553
+ __decorate$13([
554
+ Property('')
555
+ ], RibbonGroupButtonItem.prototype, "iconCss", void 0);
556
+ __decorate$13([
557
+ Complex({}, RibbonTooltip)
558
+ ], RibbonGroupButtonItem.prototype, "ribbonTooltipSettings", void 0);
559
+ __decorate$13([
560
+ Property(false)
561
+ ], RibbonGroupButtonItem.prototype, "selected", void 0);
562
+ __decorate$13([
563
+ Event()
564
+ ], RibbonGroupButtonItem.prototype, "beforeClick", void 0);
565
+ __decorate$13([
566
+ Event()
567
+ ], RibbonGroupButtonItem.prototype, "click", void 0);
568
+
569
+ var __decorate$12 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
570
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
571
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
572
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
573
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
574
+ };
575
+ /**
576
+ * Defines the ribbon group button settings.
577
+ */
578
+ class RibbonGroupButtonSettings extends ChildProperty {
579
+ }
580
+ __decorate$12([
581
+ Property('Single')
582
+ ], RibbonGroupButtonSettings.prototype, "selection", void 0);
583
+ __decorate$12([
584
+ Collection([], RibbonGroupButtonItem)
585
+ ], RibbonGroupButtonSettings.prototype, "items", void 0);
586
+
518
587
  var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
519
588
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
520
589
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -580,6 +649,9 @@ __decorate$4([
580
649
  __decorate$4([
581
650
  Complex({}, RibbonSplitButtonSettings)
582
651
  ], RibbonItem.prototype, "splitButtonSettings", void 0);
652
+ __decorate$4([
653
+ Complex({}, RibbonGroupButtonSettings)
654
+ ], RibbonItem.prototype, "groupButtonSettings", void 0);
583
655
 
584
656
  var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
585
657
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -698,7 +770,7 @@ __decorate$1([
698
770
  Property('')
699
771
  ], RibbonTab.prototype, "header", void 0);
700
772
 
701
- var __decorate$12 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
773
+ var __decorate$14 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
702
774
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
703
775
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
704
776
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
@@ -718,49 +790,151 @@ class FileMenuSettings extends ChildProperty {
718
790
  super.setProperties(prop, muteOnChange);
719
791
  }
720
792
  }
721
- __decorate$12([
793
+ __decorate$14([
722
794
  Property('File')
723
795
  ], FileMenuSettings.prototype, "text", void 0);
724
- __decorate$12([
796
+ __decorate$14([
725
797
  Property(false)
726
798
  ], FileMenuSettings.prototype, "visible", void 0);
727
- __decorate$12([
799
+ __decorate$14([
728
800
  Collection([], MenuItem)
729
801
  ], FileMenuSettings.prototype, "menuItems", void 0);
730
- __decorate$12([
802
+ __decorate$14([
731
803
  Property(false)
732
804
  ], FileMenuSettings.prototype, "showItemOnClick", void 0);
733
- __decorate$12([
805
+ __decorate$14([
734
806
  Complex({}, MenuAnimationSettings)
735
807
  ], FileMenuSettings.prototype, "animationSettings", void 0);
736
- __decorate$12([
808
+ __decorate$14([
737
809
  Property('')
738
810
  ], FileMenuSettings.prototype, "itemTemplate", void 0);
739
- __decorate$12([
811
+ __decorate$14([
740
812
  Property('')
741
813
  ], FileMenuSettings.prototype, "popupTemplate", void 0);
742
- __decorate$12([
814
+ __decorate$14([
743
815
  Complex({}, RibbonTooltip)
744
816
  ], FileMenuSettings.prototype, "ribbonTooltipSettings", void 0);
745
- __decorate$12([
817
+ __decorate$14([
746
818
  Event()
747
819
  ], FileMenuSettings.prototype, "beforeClose", void 0);
748
- __decorate$12([
820
+ __decorate$14([
749
821
  Event()
750
822
  ], FileMenuSettings.prototype, "beforeOpen", void 0);
751
- __decorate$12([
823
+ __decorate$14([
752
824
  Event()
753
825
  ], FileMenuSettings.prototype, "beforeItemRender", void 0);
754
- __decorate$12([
826
+ __decorate$14([
755
827
  Event()
756
828
  ], FileMenuSettings.prototype, "close", void 0);
757
- __decorate$12([
829
+ __decorate$14([
758
830
  Event()
759
831
  ], FileMenuSettings.prototype, "open", void 0);
760
- __decorate$12([
832
+ __decorate$14([
761
833
  Event()
762
834
  ], FileMenuSettings.prototype, "select", void 0);
763
835
 
836
+ var __decorate$16 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
837
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
838
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
839
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
840
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
841
+ };
842
+ /**
843
+ * Defines the ribbon backstage back button.
844
+ */
845
+ class BackstageBackButton extends ChildProperty {
846
+ }
847
+ __decorate$16([
848
+ Property('')
849
+ ], BackstageBackButton.prototype, "text", void 0);
850
+ __decorate$16([
851
+ Property('')
852
+ ], BackstageBackButton.prototype, "iconCss", void 0);
853
+ __decorate$16([
854
+ Property(true)
855
+ ], BackstageBackButton.prototype, "visible", void 0);
856
+
857
+ var __decorate$17 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
858
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
859
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
860
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
861
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
862
+ };
863
+ /**
864
+ * Defines the ribbon backstage back button.
865
+ */
866
+ class BackstageItem extends ChildProperty {
867
+ }
868
+ __decorate$17([
869
+ Property('')
870
+ ], BackstageItem.prototype, "text", void 0);
871
+ __decorate$17([
872
+ Property('')
873
+ ], BackstageItem.prototype, "id", void 0);
874
+ __decorate$17([
875
+ Property('')
876
+ ], BackstageItem.prototype, "content", void 0);
877
+ __decorate$17([
878
+ Property('')
879
+ ], BackstageItem.prototype, "iconCss", void 0);
880
+ __decorate$17([
881
+ Property(false)
882
+ ], BackstageItem.prototype, "separator", void 0);
883
+ __decorate$17([
884
+ Property(false)
885
+ ], BackstageItem.prototype, "isFooter", void 0);
886
+ __decorate$17([
887
+ Event()
888
+ ], BackstageItem.prototype, "backStageItemClick", void 0);
889
+
890
+ var __decorate$15 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
891
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
892
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
893
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
894
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
895
+ };
896
+ /**
897
+ * Defines the ribbon file menu settings.
898
+ */
899
+ class BackStageMenu extends ChildProperty {
900
+ /**
901
+ * @param {Object} prop - Gets the property of Backstage Menu.
902
+ * @param {boolean} muteOnChange - Gets the boolean value of muteOnChange.
903
+ * @returns {void}
904
+ * @private
905
+ */
906
+ setProperties(prop, muteOnChange) {
907
+ super.setProperties(prop, muteOnChange);
908
+ }
909
+ }
910
+ __decorate$15([
911
+ Property('File')
912
+ ], BackStageMenu.prototype, "text", void 0);
913
+ __decorate$15([
914
+ Property(false)
915
+ ], BackStageMenu.prototype, "visible", void 0);
916
+ __decorate$15([
917
+ Property('auto')
918
+ ], BackStageMenu.prototype, "height", void 0);
919
+ __decorate$15([
920
+ Property('auto')
921
+ ], BackStageMenu.prototype, "width", void 0);
922
+ __decorate$15([
923
+ Property(null)
924
+ ], BackStageMenu.prototype, "target", void 0);
925
+ __decorate$15([
926
+ Complex({}, BackstageBackButton)
927
+ ], BackStageMenu.prototype, "backButton", void 0);
928
+ __decorate$15([
929
+ Collection([], BackstageItem)
930
+ ], BackStageMenu.prototype, "items", void 0);
931
+ __decorate$15([
932
+ Property('')
933
+ ], BackStageMenu.prototype, "template", void 0);
934
+ __decorate$15([
935
+ Complex({}, RibbonTooltip)
936
+ ], BackStageMenu.prototype, "ribbonTooltipSettings", void 0);
937
+
764
938
  // export * from './file-menu';
765
939
 
766
940
  /**
@@ -771,6 +945,8 @@ const ITEM_VERTICAL_CENTER = 'e-ribbon-vertical-center';
771
945
  /** @hidden */
772
946
  const EXPAND_COLLAPSE_ICON = 'e-icons e-drop-icon';
773
947
  /** @hidden */
948
+ const BACKSTAGE_CLOSE_ICON = 'e-icons e-arrow-left';
949
+ /** @hidden */
774
950
  const OVERFLOW_ICON = 'e-icons e-more-horizontal-1';
775
951
  /** @hidden */
776
952
  const VERTICAL_DDB = 'e-vertical';
@@ -819,6 +995,14 @@ const RIBBON_MINIMIZE = 'e-ribbon-minimize';
819
995
  /** @hidden */
820
996
  const RIBBON_GROUP = 'e-ribbon-group';
821
997
  /** @hidden */
998
+ const RIBBON_SINGLE_BUTTON_SELECTION = 'e-ribbon-single-selection';
999
+ /** @hidden */
1000
+ const RIBBON_MULTIPLE_BUTTON_SELECTION = 'e-ribbon-multiple-selection';
1001
+ /** @hidden */
1002
+ const RIBBON_GROUP_BUTTON = 'e-ribbon-group-button';
1003
+ /** @hidden */
1004
+ const RIBBON_GROUP_BUTTON_OVERFLOW_POPUP = 'e-ribbon-group-button-overflow-popup';
1005
+ /** @hidden */
822
1006
  const RIBBON_GROUP_CONTAINER = 'e-ribbon-group-container';
823
1007
  /** @hidden */
824
1008
  const RIBBON_OF_TAB_CONTAINER = 'e-ribbon-of-tab';
@@ -881,6 +1065,26 @@ const RIBBON_TEXT_CONTAINER = 'e-ribbon-text-container';
881
1065
  /** @hidden */
882
1066
  const RIBBON_SIMPLIFIED_MODE = 'e-ribbon-simplified-mode';
883
1067
  /** @hidden */
1068
+ const RIBBON_BACKSTAGE_POPUP = 'e-ribbon-backstage-popup';
1069
+ /** @hidden */
1070
+ const RIBBON_BACKSTAGE_OPEN = 'e-ribbon-backstage-open';
1071
+ /** @hidden */
1072
+ const RIBBON_BACKSTAGE_CONTENT = 'e-ribbon-backstage-content';
1073
+ /** @hidden */
1074
+ const RIBBON_SELECTED_CONTENT = 'e-ribbon-selected-content';
1075
+ /** @hidden */
1076
+ const RIBBON_BACKSTAGE = 'e-ribbon-backstage';
1077
+ /** @hidden */
1078
+ const RIBBON_BACKSTAGE_MENU = 'e-ribbon-backstage-menu';
1079
+ /** @hidden */
1080
+ const RIBBON_BACKSTAGE_TEMPLATE = 'e-ribbon-backstage-template';
1081
+ /** @hidden */
1082
+ const RIBBON_BACKSTAGE_MENU_WRAPPER = 'e-ribbon-backstage-wrapper';
1083
+ /** @hidden */
1084
+ const RIBBON_BACKSTAGE_ITEMS_WRAPPER = 'e-ribbon-backstage-items-wrapper';
1085
+ /** @hidden */
1086
+ const RIBBON_BACKSTAGE_TEXT_MENU = 'e-blankicon';
1087
+ /** @hidden */
884
1088
  const TAB_ID = '_tab';
885
1089
  /** @hidden */
886
1090
  const GROUP_ID = '_group';
@@ -909,10 +1113,20 @@ const DROPDOWN_ID = '_dropdown';
909
1113
  /** @hidden */
910
1114
  const RIBBON_FILE_MENU_ID = '_filemenu';
911
1115
  /** @hidden */
1116
+ const RIBBON_BACKSTAGE_MENU_ID = '_backstage';
1117
+ /** @hidden */
1118
+ const RIBBON_BACKSTAGE_POPUP_ID = '_backstagepopup';
1119
+ /** @hidden */
912
1120
  const RIBBON_FILE_MENU_LIST = '_filemenulist';
913
1121
  /** @hidden */
1122
+ const RIBBON_MENU_LIST = '_menulist';
1123
+ /** @hidden */
1124
+ const RIBBON_FOOTER_MENU_LIST = '_footermenulist';
1125
+ /** @hidden */
914
1126
  const RIBBON_HELP_PANE_TEMPLATE_ID = '_helppanetemplate';
915
1127
  /** @hidden */
1128
+ const RIBBON_GROUP_BUTTON_ID = '_grpbtn';
1129
+ /** @hidden */
916
1130
  const RIBBON_FILE_MENU_WIDTH = '--fileMenuWidth';
917
1131
  /** @hidden */
918
1132
  const RIBBON_HELP_PANE_TEMPLATE_WIDTH = '--helpTemplateWidth';
@@ -1037,6 +1251,9 @@ class RibbonButton {
1037
1251
  return;
1038
1252
  }
1039
1253
  const buttonObj = getComponent(buttonEle, Button);
1254
+ if (prop.isToggle) {
1255
+ buttonEle.classList.add('e-active');
1256
+ }
1040
1257
  if (prop.cssClass) {
1041
1258
  prop.cssClass = (ITEM_VERTICAL_CENTER + SPACE + RIBBON_CONTROL + SPACE + prop.cssClass).trim();
1042
1259
  }
@@ -1309,7 +1526,7 @@ class RibbonColorPicker {
1309
1526
  const splitBtn = colorPickerObj['splitBtn'];
1310
1527
  //Accessing the private property 'splitBtn' of ColorPicker component to get the colorpicker instance as there is no close event in colorpicker.
1311
1528
  splitBtn.close = null;
1312
- colorPickerObj.beforeClose = (e) => {
1529
+ colorPickerObj.beforeClose = () => {
1313
1530
  colorPickerObj.element.parentElement.classList.remove(RIBBON_POPUP_OPEN);
1314
1531
  if (item.colorPickerSettings.beforeClose) {
1315
1532
  item.colorPickerSettings.beforeClose.call(this);
@@ -1605,6 +1822,7 @@ class RibbonDropDown {
1605
1822
  iconCss: dropDownSettings.iconCss,
1606
1823
  items: dropDownSettings.items,
1607
1824
  target: dropDownSettings.target,
1825
+ createPopupOnClick: dropDownSettings.createPopupOnClick,
1608
1826
  beforeClose: (e) => {
1609
1827
  if (dropDownSettings.beforeClose) {
1610
1828
  dropDownSettings.beforeClose.call(this, e);
@@ -1620,7 +1838,7 @@ class RibbonDropDown {
1620
1838
  created: dropDownSettings.created,
1621
1839
  open: dropDownSettings.open,
1622
1840
  select: dropDownSettings.select
1623
- }, buttonEle);
1841
+ }).appendTo(buttonEle);
1624
1842
  }
1625
1843
  /**
1626
1844
  * Adds the additional event handlers as the item moved into overflow popup.
@@ -2557,130 +2775,566 @@ function updateTooltipProp(element, prop) {
2557
2775
  control.setProperties(prop);
2558
2776
  }
2559
2777
 
2560
- var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
2561
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2562
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2563
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2564
- return c > 3 && r && Object.defineProperty(target, key, r), r;
2565
- };
2566
- var Ribbon_1;
2567
2778
  /**
2568
- * The Ribbon Component is a structured layout to manage tools with tabs and groups.
2779
+ * Defines the items of Ribbon.
2569
2780
  */
2570
- let Ribbon = Ribbon_1 = class Ribbon extends Component {
2571
- /**
2572
- * Constructor for creating the widget.
2573
- *
2574
- * @param {RibbonModel} options - Specifies the ribbon model
2575
- * @param {string|HTMLDivElement} element - Specifies the target element
2576
- */
2577
- constructor(options, element) {
2578
- Ribbon_1.Inject(RibbonButton, RibbonCheckBox, RibbonDropDown, RibbonSplitButton, RibbonComboBox);
2579
- super(options, element);
2580
- }
2581
- /**
2582
- * Initialize the control rendering.
2583
- *
2584
- * @returns {void}
2585
- * @private
2586
- */
2587
- render() {
2588
- this.initialize();
2589
- }
2590
- preRender() {
2591
- this.idIndex = 0;
2592
- this.tooltipData = [];
2593
- this.isAddRemove = false;
2594
- this.keyConfigs = {
2595
- leftarrow: 'leftarrow',
2596
- rightarrow: 'rightarrow',
2597
- tab: 'tab',
2598
- shiftTab: 'shift+tab'
2599
- };
2600
- }
2601
- /**
2602
- * Get the properties to be maintained in the persisted state.
2603
- *
2604
- * @returns {string} - Persist data
2605
- */
2606
- getPersistData() {
2607
- return this.addOnPersist(['activeLayout']);
2781
+ class RibbonGroupButton {
2782
+ constructor(parent) {
2783
+ this.parent = parent;
2784
+ this.isSelected = false;
2608
2785
  }
2609
- /**
2610
- * Get component name.
2611
- *
2612
- * @returns {string} - Module name
2613
- * @private
2614
- */
2615
2786
  getModuleName() {
2616
- return 'ribbon';
2787
+ return 'ribbonGroupButton';
2788
+ }
2789
+ destroy() {
2790
+ this.parent = null;
2617
2791
  }
2618
2792
  /**
2619
- * To provide the array of modules needed for component rendering
2793
+ * Creates Group Button
2620
2794
  *
2621
- * @returns {ModuleDeclaration[]} - returns module declaration.
2795
+ * @param {RibbonItemModel} item - Gets the ribbon item model.
2796
+ * @param {HTMLElement} itemElement - Gets the ribbon item element.
2797
+ * @returns {void}
2622
2798
  * @hidden
2623
2799
  */
2624
- requiredModules() {
2625
- const modules = [];
2626
- modules.push({ member: 'ribbonButton', args: [this] }, { member: 'ribbonDropDown', args: [this] }, { member: 'ribbonSplitButton', args: [this] }, { member: 'ribbonCheckBox', args: [this] }, { member: 'ribbonColorPicker', args: [this] }, { member: 'ribbonComboBox', args: [this] }, { member: 'ribbonFileMenu', args: [this] });
2627
- return modules;
2628
- }
2629
- initialize() {
2630
- this.element.id = this.element.id || getUniqueID('e-' + this.getModuleName());
2631
- addClass([this.element], ['e-rbn', ...(this.cssClass ? this.cssClass.split(SPACE) : [])]);
2632
- if (this.enableRtl) {
2633
- this.element.classList.add(RTL_CSS);
2634
- }
2635
- this.element.style.width = formatUnit(this.width);
2636
- this.renderTabs();
2637
- if (this.ribbonFileMenuModule) {
2638
- this.ribbonFileMenuModule.createFileMenu(this.fileMenu);
2639
- }
2640
- this.createHelpPaneTemplate();
2641
- const toolbar = this.tabObj['tbObj'];
2642
- toolbar.refreshOverflow();
2643
- createTooltip(this.element, this);
2644
- this.wireEvents();
2645
- this.wireKeyboardEvent();
2646
- this.currentControlIndex = 0;
2647
- }
2648
- wireEvents() {
2649
- EventHandler.add(window, 'resize', this.resizeHandler, this);
2650
- }
2651
- wireKeyboardEvent() {
2652
- this.keyboardModuleRibbon = new KeyboardEvents(this.element, {
2653
- keyAction: this.keyActionHandler.bind(this),
2654
- keyConfigs: this.keyConfigs,
2655
- eventName: 'keydown'
2800
+ createGroupButton(item, itemElement) {
2801
+ const groupBtnSettings = item.groupButtonSettings;
2802
+ this.count = 0;
2803
+ const btnContainerEle = this.parent.createElement('div', {
2804
+ id: item.id + RIBBON_GROUP_BUTTON_ID,
2805
+ className: 'e-btn-group'
2656
2806
  });
2657
- }
2658
- keyActionHandler(e) {
2659
- if (((e.key === 'Tab') && (!(e.target.classList.contains('e-tab-wrap')) && !(e.target.classList.contains('e-combobox'))))) {
2660
- e.preventDefault();
2661
- }
2662
- const activeContent = this.tabObj.element.querySelector('#' + this.tabs[this.selectedTab].id + CONTENT_ID);
2663
- const ribbonControls = activeContent.querySelectorAll('.e-control');
2664
- const comboBoxElements = activeContent.querySelectorAll('.e-combobox');
2665
- let comboBoxEle;
2666
- if (comboBoxElements) {
2667
- for (let i = 0; i < comboBoxElements.length; i++) {
2668
- if (comboBoxElements[parseInt(i.toString(), 10)].closest('.e-input-focus')) {
2669
- comboBoxEle = comboBoxElements[parseInt(i.toString(), 10)];
2807
+ itemElement.appendChild(btnContainerEle);
2808
+ for (let i = 0; i < groupBtnSettings.items.length; i++) {
2809
+ if ((groupBtnSettings.items[parseInt(i.toString(), 10)].iconCss)) {
2810
+ const groupButtonEle = this.parent.createElement('button', {
2811
+ id: item.id + RIBBON_GROUP_BUTTON_ID + i,
2812
+ className: RIBBON_GROUP_BUTTON
2813
+ });
2814
+ btnContainerEle.appendChild(groupButtonEle);
2815
+ new Button({
2816
+ iconCss: groupBtnSettings.items[parseInt(i.toString(), 10)].iconCss,
2817
+ disabled: item.disabled,
2818
+ enableRtl: this.parent.enableRtl,
2819
+ content: item.activeSize === RibbonItemSize.Small ? '' : groupBtnSettings.items[parseInt(i.toString(), 10)].content,
2820
+ iconPosition: item.activeSize === RibbonItemSize.Large ? 'Top' : 'Left'
2821
+ }, groupButtonEle);
2822
+ const buttonEle = itemElement.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + i);
2823
+ if (groupBtnSettings.selection === RibbonGroupButtonSelection.Single) {
2824
+ btnContainerEle.classList.add(RIBBON_SINGLE_BUTTON_SELECTION);
2825
+ }
2826
+ else {
2827
+ btnContainerEle.classList.add(RIBBON_MULTIPLE_BUTTON_SELECTION);
2828
+ }
2829
+ if (groupBtnSettings.items[parseInt(i.toString(), 10)].selected) {
2830
+ if (groupBtnSettings.selection === RibbonGroupButtonSelection.Multiple) {
2831
+ buttonEle.classList.add('e-active');
2832
+ }
2833
+ else {
2834
+ if (this.count < 1) {
2835
+ buttonEle.classList.add('e-active');
2836
+ this.count++;
2837
+ }
2838
+ }
2839
+ }
2840
+ if (groupBtnSettings.items[parseInt(i.toString(), 10)].ribbonTooltipSettings &&
2841
+ isTooltipPresent(groupBtnSettings.items[parseInt(i.toString(), 10)].ribbonTooltipSettings)) {
2842
+ groupButtonEle.classList.add(RIBBON_TOOLTIP_TARGET);
2843
+ this.parent.tooltipData.push({
2844
+ id: groupButtonEle.id, data: groupBtnSettings.items[parseInt(i.toString(), 10)].ribbonTooltipSettings
2845
+ });
2670
2846
  }
2847
+ EventHandler.add(buttonEle, 'click', this.groupButtonClicked.bind(this, i, item, groupBtnSettings), this);
2671
2848
  }
2672
2849
  }
2673
- if (comboBoxEle) {
2674
- for (let i = 0; i < ribbonControls.length; i++) {
2675
- if (ribbonControls[parseInt(i.toString(), 10)].classList.contains('e-combobox')) {
2676
- if (ribbonControls[parseInt(i.toString(), 10)].closest('.e-input-focus')) {
2677
- this.currentControlIndex = i;
2850
+ if (this.parent.activeLayout === 'Simplified') {
2851
+ let dropdownIcon;
2852
+ let activeEleCount = 0;
2853
+ let count = 0;
2854
+ const buttonEle = this.parent.createElement('button', {
2855
+ id: item.id
2856
+ });
2857
+ itemElement.appendChild(buttonEle);
2858
+ for (let i = 0; i < groupBtnSettings.items.length; i++) {
2859
+ if (item.groupButtonSettings.items[parseInt(i.toString(), 10)].selected &&
2860
+ !this.isSelected && groupBtnSettings.selection === RibbonGroupButtonSelection.Single) {
2861
+ dropdownIcon = item.groupButtonSettings.items[parseInt(i.toString(), 10)].iconCss;
2862
+ this.isSelected = true;
2863
+ }
2864
+ else if (item.groupButtonSettings.items[parseInt(i.toString(), 10)].selected &&
2865
+ groupBtnSettings.selection === RibbonGroupButtonSelection.Multiple) {
2866
+ activeEleCount++;
2867
+ if (activeEleCount === 1) {
2868
+ dropdownIcon = item.groupButtonSettings.items[parseInt(i.toString(), 10)].iconCss;
2869
+ }
2870
+ else {
2871
+ dropdownIcon = null;
2678
2872
  }
2679
2873
  }
2680
2874
  }
2681
- }
2682
- if (this.currentControlIndex === 0) {
2683
- let item = ribbonControls[this.currentControlIndex].closest('.e-ribbon-item');
2875
+ while (count < item.groupButtonSettings.items.length && !this.isSelected && !dropdownIcon) {
2876
+ if (item.groupButtonSettings.items[parseInt(count.toString(), 10)].iconCss) {
2877
+ dropdownIcon = item.groupButtonSettings.items[parseInt(count.toString(), 10)].iconCss;
2878
+ this.isSelected = true;
2879
+ }
2880
+ count++;
2881
+ }
2882
+ new DropDownButton({
2883
+ iconCss: dropdownIcon,
2884
+ target: btnContainerEle,
2885
+ enableRtl: this.parent.enableRtl,
2886
+ cssClass: 'e-ribbon-dropdown-group-button',
2887
+ disabled: item.disabled
2888
+ }, buttonEle);
2889
+ buttonEle.onclick = buttonEle.onkeydown = () => {
2890
+ if (itemElement.querySelector('#' + item.id).classList.contains('e-active')) {
2891
+ document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + 0).focus();
2892
+ this.grpBtnIndex = 0;
2893
+ }
2894
+ };
2895
+ btnContainerEle.onkeydown = (e) => {
2896
+ if (this.parent.activeLayout === 'Simplified') {
2897
+ this.handleGroupButtonNavigation(e, item);
2898
+ }
2899
+ };
2900
+ createTooltip(btnContainerEle, this.parent);
2901
+ this.isSelected = false;
2902
+ }
2903
+ }
2904
+ groupButtonClicked(itemIndex, item, grpBtnSettings) {
2905
+ const previousItems = [], selectingItems = [], selectedItems = [];
2906
+ let groupButtonEle;
2907
+ let dropdown;
2908
+ for (let j = 0; j < grpBtnSettings.items.length; j++) {
2909
+ if (document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + j)) {
2910
+ if (document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + j).classList.contains('e-active')) {
2911
+ previousItems.push(grpBtnSettings.items[parseInt(j.toString(), 10)]);
2912
+ }
2913
+ }
2914
+ }
2915
+ if (!(document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + itemIndex).classList.contains('e-active'))) {
2916
+ selectingItems.push(grpBtnSettings.items[parseInt(itemIndex.toString(), 10)]);
2917
+ }
2918
+ const eventArgs = {
2919
+ cancel: false, previousItems: previousItems, selectingItems: selectingItems
2920
+ };
2921
+ if (grpBtnSettings.items[parseInt(itemIndex.toString(), 10)].beforeClick) {
2922
+ grpBtnSettings.items[parseInt(itemIndex.toString(), 10)].beforeClick.call(this, eventArgs);
2923
+ }
2924
+ if (eventArgs.cancel) {
2925
+ return;
2926
+ }
2927
+ else {
2928
+ if (grpBtnSettings.selection === RibbonGroupButtonSelection.Single) {
2929
+ if (document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID).classList.contains(RIBBON_MULTIPLE_BUTTON_SELECTION)) {
2930
+ document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID).classList.remove(RIBBON_MULTIPLE_BUTTON_SELECTION);
2931
+ document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID).classList.add(RIBBON_SINGLE_BUTTON_SELECTION);
2932
+ }
2933
+ for (let j = 0; j < grpBtnSettings.items.length; j++) {
2934
+ if (document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + j) && document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + j).classList.contains('e-active')) {
2935
+ document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + j).classList.remove('e-active');
2936
+ }
2937
+ }
2938
+ document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + itemIndex).classList.toggle('e-active');
2939
+ if (document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + itemIndex).classList.contains('e-active') && this.parent.activeLayout === 'Simplified') {
2940
+ this.grpBtnIndex = itemIndex;
2941
+ groupButtonEle = document.querySelector('#' + item.id);
2942
+ dropdown = getComponent(groupButtonEle, DropDownButton);
2943
+ dropdown.setProperties({
2944
+ iconCss: grpBtnSettings.items[parseInt(itemIndex.toString(), 10)].iconCss
2945
+ });
2946
+ }
2947
+ }
2948
+ else {
2949
+ if (document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID).classList.contains(RIBBON_SINGLE_BUTTON_SELECTION)) {
2950
+ document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID).classList.remove(RIBBON_SINGLE_BUTTON_SELECTION);
2951
+ document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID).classList.add(RIBBON_MULTIPLE_BUTTON_SELECTION);
2952
+ }
2953
+ document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + itemIndex).classList.toggle('e-active');
2954
+ let activeEleCount = 0;
2955
+ for (let n = 0; n < grpBtnSettings.items.length; n++) {
2956
+ if (document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + n) && document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + n).classList.contains('e-active') && this.parent.activeLayout === 'Simplified' && n !== itemIndex) {
2957
+ this.isSelected = true;
2958
+ activeEleCount++;
2959
+ }
2960
+ }
2961
+ if (this.parent.activeLayout === 'Simplified') {
2962
+ let dropdownIcon = null;
2963
+ let itemsCount = 0;
2964
+ groupButtonEle = document.querySelector('#' + item.id);
2965
+ dropdown = getComponent(groupButtonEle, DropDownButton);
2966
+ if (!this.isSelected) {
2967
+ if (document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + itemIndex).classList.contains('e-active')) {
2968
+ dropdownIcon = grpBtnSettings.items[parseInt(itemIndex.toString(), 10)].iconCss;
2969
+ }
2970
+ }
2971
+ else {
2972
+ if (activeEleCount === 1 && !(document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + itemIndex).classList.contains('e-active'))) {
2973
+ for (let n = 0; n < grpBtnSettings.items.length; n++) {
2974
+ if (document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + n) && document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + n).classList.contains('e-active')) {
2975
+ dropdownIcon = grpBtnSettings.items[parseInt(n.toString(), 10)].iconCss;
2976
+ }
2977
+ }
2978
+ }
2979
+ }
2980
+ while (itemsCount < grpBtnSettings.items.length && !dropdownIcon) {
2981
+ if (grpBtnSettings.items[parseInt(itemsCount.toString(), 10)].iconCss) {
2982
+ dropdownIcon = grpBtnSettings.items[parseInt(itemsCount.toString(), 10)].iconCss;
2983
+ }
2984
+ itemsCount++;
2985
+ }
2986
+ dropdown.setProperties({ iconCss: dropdownIcon });
2987
+ this.grpBtnIndex = itemIndex;
2988
+ }
2989
+ this.isSelected = false;
2990
+ }
2991
+ if (document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + itemIndex).classList.contains('e-active')) {
2992
+ selectedItems.push(grpBtnSettings.items[parseInt(itemIndex.toString(), 10)]);
2993
+ }
2994
+ const eventArgs = { previousItems: previousItems, selectedItems: selectedItems };
2995
+ if (grpBtnSettings.items[parseInt(itemIndex.toString(), 10)].click) {
2996
+ grpBtnSettings.items[parseInt(itemIndex.toString(), 10)].click.call(this, eventArgs);
2997
+ }
2998
+ }
2999
+ }
3000
+ /**
3001
+ * updates group button in mode switching
3002
+ *
3003
+ * @param {RibbonItemModel} item - Gets the ribbon item model.
3004
+ * @param {HTMLElement} itemElement - Gets the ribbon item element.
3005
+ * @returns {void}
3006
+ * @hidden
3007
+ */
3008
+ switchGroupButton(item, itemElement) {
3009
+ const groupBtnSettings = item.groupButtonSettings;
3010
+ let dropdownIcon = null;
3011
+ let activeEleCount = 0;
3012
+ let itemsCount = 0;
3013
+ if (this.parent.activeLayout === 'Simplified') {
3014
+ const containerEle = itemElement.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID);
3015
+ const buttonEle = this.parent.createElement('button', {
3016
+ id: item.id
3017
+ });
3018
+ itemElement.appendChild(buttonEle);
3019
+ for (let i = 0; i < groupBtnSettings.items.length; i++) {
3020
+ if (document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + i)) {
3021
+ if (document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + i).classList.contains('e-active') && groupBtnSettings.selection === RibbonGroupButtonSelection.Single) {
3022
+ dropdownIcon = groupBtnSettings.items[parseInt(i.toString(), 10)].iconCss;
3023
+ }
3024
+ else if (document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + i).classList.contains('e-active') && groupBtnSettings.selection === RibbonGroupButtonSelection.Multiple) {
3025
+ activeEleCount++;
3026
+ if (activeEleCount === 1) {
3027
+ dropdownIcon = groupBtnSettings.items[parseInt(i.toString(), 10)].iconCss;
3028
+ }
3029
+ else if (activeEleCount > 1) {
3030
+ dropdownIcon = null;
3031
+ }
3032
+ }
3033
+ }
3034
+ }
3035
+ while (itemsCount < groupBtnSettings.items.length && !dropdownIcon) {
3036
+ if (groupBtnSettings.items[parseInt(itemsCount.toString(), 10)].iconCss) {
3037
+ dropdownIcon = groupBtnSettings.items[parseInt(itemsCount.toString(), 10)].iconCss;
3038
+ }
3039
+ itemsCount++;
3040
+ }
3041
+ new DropDownButton({
3042
+ iconCss: dropdownIcon,
3043
+ target: containerEle,
3044
+ enableRtl: this.parent.enableRtl,
3045
+ cssClass: 'e-ribbon-dropdown-group-button',
3046
+ disabled: item.disabled
3047
+ }, buttonEle);
3048
+ buttonEle.onclick = buttonEle.onkeydown = () => {
3049
+ if (itemElement.querySelector('#' + item.id).classList.contains('e-active')) {
3050
+ document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + 0).focus();
3051
+ this.grpBtnIndex = 0;
3052
+ }
3053
+ };
3054
+ containerEle.onkeydown = (e) => {
3055
+ if (this.parent.activeLayout === 'Simplified') {
3056
+ this.handleGroupButtonNavigation(e, item);
3057
+ }
3058
+ };
3059
+ createTooltip(containerEle, this.parent);
3060
+ }
3061
+ else {
3062
+ const groupButtonEle = itemElement.querySelector('#' + item.id);
3063
+ const dropdown = getComponent(groupButtonEle, DropDownButton);
3064
+ itemElement.appendChild(dropdown.target);
3065
+ if (groupButtonEle) {
3066
+ dropdown.destroy();
3067
+ remove(groupButtonEle);
3068
+ }
3069
+ }
3070
+ }
3071
+ handleGroupButtonNavigation(e, item) {
3072
+ const groupButtonEle = document.querySelector('#' + item.id);
3073
+ const dropdown = getComponent(groupButtonEle, DropDownButton);
3074
+ const targetEle = dropdown.target;
3075
+ let isOverflowPopup = false;
3076
+ if (this.parent.activeLayout === 'Simplified' && targetEle.closest('.e-ribbon-dropdown-group-button').classList.contains(RIBBON_GROUP_BUTTON_OVERFLOW_POPUP)) {
3077
+ isOverflowPopup = true;
3078
+ }
3079
+ if (e.key === 'Tab') {
3080
+ e.preventDefault();
3081
+ }
3082
+ const groupBtnSettings = item.groupButtonSettings;
3083
+ if ((e.key === 'ArrowRight' && !isOverflowPopup) || (e.key === 'ArrowDown' && isOverflowPopup)) {
3084
+ if (!this.parent.enableRtl || (e.key === 'ArrowDown' && isOverflowPopup)) {
3085
+ this.grpBtnIndex++;
3086
+ if (this.grpBtnIndex < groupBtnSettings.items.length) {
3087
+ document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + (this.grpBtnIndex)).focus();
3088
+ }
3089
+ else {
3090
+ this.grpBtnIndex = 0;
3091
+ document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + (this.grpBtnIndex)).focus();
3092
+ }
3093
+ }
3094
+ else {
3095
+ if (this.grpBtnIndex === 0) {
3096
+ this.grpBtnIndex = groupBtnSettings.items.length - 1;
3097
+ document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + (this.grpBtnIndex)).focus();
3098
+ }
3099
+ else {
3100
+ this.grpBtnIndex--;
3101
+ document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + (this.grpBtnIndex)).focus();
3102
+ }
3103
+ }
3104
+ }
3105
+ else if ((e.key === 'ArrowLeft' && !isOverflowPopup) || (e.key === 'ArrowUp' && isOverflowPopup)) {
3106
+ if (!this.parent.enableRtl || (e.key === 'ArrowUp' && isOverflowPopup)) {
3107
+ if (this.grpBtnIndex === 0) {
3108
+ this.grpBtnIndex = groupBtnSettings.items.length - 1;
3109
+ document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + (this.grpBtnIndex)).focus();
3110
+ }
3111
+ else {
3112
+ this.grpBtnIndex--;
3113
+ document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + (this.grpBtnIndex)).focus();
3114
+ }
3115
+ }
3116
+ else {
3117
+ this.grpBtnIndex++;
3118
+ if (this.grpBtnIndex < groupBtnSettings.items.length) {
3119
+ document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + (this.grpBtnIndex)).focus();
3120
+ }
3121
+ else {
3122
+ this.grpBtnIndex = 0;
3123
+ document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + (this.grpBtnIndex)).focus();
3124
+ }
3125
+ }
3126
+ }
3127
+ }
3128
+ /**
3129
+ * Adds the additional event handlers as the item moved into overflow popup.
3130
+ *
3131
+ * @param {RibbonItemModel} item - Gets the ribbon item model.
3132
+ * @param {HTMLElement} itemEle - Gets the ribbon item element.
3133
+ * @returns {void}
3134
+ * @hidden
3135
+ */
3136
+ addOverFlowEvents(item, itemEle) {
3137
+ const groupButtonEle = itemEle.querySelector('#' + item.id);
3138
+ const dropdown = getComponent(groupButtonEle, DropDownButton);
3139
+ dropdown.setProperties({ cssClass: dropdown.cssClass + SPACE + RIBBON_GROUP_BUTTON_OVERFLOW_POPUP });
3140
+ const targetEle = dropdown.target;
3141
+ targetEle.onclick = () => {
3142
+ if (this.parent.activeLayout === 'Simplified' && targetEle.closest('.e-ribbon-dropdown-group-button').classList.contains(RIBBON_GROUP_BUTTON_OVERFLOW_POPUP)) {
3143
+ dropdown.element.focus();
3144
+ dropdown.toggle();
3145
+ }
3146
+ };
3147
+ }
3148
+ /**
3149
+ * Removes the additional event handlers as the item moved into overflow popup.
3150
+ *
3151
+ * @param {RibbonItemModel} item - Gets the ribbon item model.
3152
+ * @param {HTMLElement} itemEle - Gets the ribbon item element.
3153
+ * @returns {void}
3154
+ * @hidden
3155
+ */
3156
+ removeOverFlowEvents(item, itemEle) {
3157
+ const groupButtonEle = itemEle.querySelector('#' + item.id);
3158
+ if (groupButtonEle) {
3159
+ const dropdown = getComponent(groupButtonEle, DropDownButton);
3160
+ let cssClass = dropdown.cssClass.split(SPACE);
3161
+ cssClass = cssClass.filter((value) => value !== RIBBON_GROUP_BUTTON_OVERFLOW_POPUP);
3162
+ dropdown.setProperties({ cssClass: cssClass.join(SPACE) });
3163
+ }
3164
+ }
3165
+ /**
3166
+ * Removes DropDown.
3167
+ *
3168
+ * @param {RibbonItemModel} item - Gets the ribbon item.
3169
+ * @returns {void}
3170
+ * @hidden
3171
+ */
3172
+ destroyDropDown(item) {
3173
+ const groupButtonEle = document.querySelector('#' + item.id);
3174
+ if (groupButtonEle) {
3175
+ const dropdown = getComponent(groupButtonEle, DropDownButton);
3176
+ const tooltip = getComponent(dropdown.target, Tooltip);
3177
+ tooltip.destroy();
3178
+ dropdown.destroy();
3179
+ remove(groupButtonEle);
3180
+ }
3181
+ }
3182
+ /**
3183
+ * Updates the group button size.
3184
+ *
3185
+ * @param {HTMLElement} itemElement - Gets the group button container element.
3186
+ * @param {RibbonItemModel} item - Gets the ribbon item.
3187
+ * @returns {void}
3188
+ * @hidden
3189
+ */
3190
+ updateGroupButtonSize(itemElement, item) {
3191
+ const groupBtnSettings = item.groupButtonSettings;
3192
+ let buttonEle;
3193
+ for (let i = 0; i < groupBtnSettings.items.length; i++) {
3194
+ if (this.parent.activeLayout === 'Classic') {
3195
+ buttonEle = itemElement.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + i);
3196
+ }
3197
+ else {
3198
+ buttonEle = document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + i);
3199
+ }
3200
+ if (buttonEle) {
3201
+ const buttonObj = getComponent(buttonEle, Button);
3202
+ buttonObj.setProperties({
3203
+ iconPosition: item.activeSize === RibbonItemSize.Large ? 'Top' : 'Left',
3204
+ content: item.activeSize === RibbonItemSize.Small ? '' : groupBtnSettings.items[parseInt(i.toString(), 10)].content
3205
+ });
3206
+ }
3207
+ }
3208
+ }
3209
+ }
3210
+
3211
+ var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
3212
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3213
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
3214
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
3215
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
3216
+ };
3217
+ var Ribbon_1;
3218
+ /**
3219
+ * The Ribbon Component is a structured layout to manage tools with tabs and groups.
3220
+ */
3221
+ let Ribbon = Ribbon_1 = class Ribbon extends Component {
3222
+ /**
3223
+ * Constructor for creating the widget.
3224
+ *
3225
+ * @param {RibbonModel} options - Specifies the ribbon model
3226
+ * @param {string|HTMLDivElement} element - Specifies the target element
3227
+ */
3228
+ constructor(options, element) {
3229
+ Ribbon_1.Inject(RibbonButton, RibbonCheckBox, RibbonDropDown, RibbonSplitButton, RibbonComboBox, RibbonGroupButton);
3230
+ super(options, element);
3231
+ }
3232
+ /**
3233
+ * Initialize the control rendering.
3234
+ *
3235
+ * @returns {void}
3236
+ * @private
3237
+ */
3238
+ render() {
3239
+ this.initialize();
3240
+ }
3241
+ preRender() {
3242
+ this.idIndex = 0;
3243
+ this.tooltipData = [];
3244
+ this.isAddRemove = false;
3245
+ this.keyConfigs = {
3246
+ leftarrow: 'leftarrow',
3247
+ rightarrow: 'rightarrow',
3248
+ tab: 'tab',
3249
+ shiftTab: 'shift+tab'
3250
+ };
3251
+ }
3252
+ /**
3253
+ * Get the properties to be maintained in the persisted state.
3254
+ *
3255
+ * @returns {string} - Persist data
3256
+ */
3257
+ getPersistData() {
3258
+ return this.addOnPersist(['activeLayout']);
3259
+ }
3260
+ /**
3261
+ * Get component name.
3262
+ *
3263
+ * @returns {string} - Module name
3264
+ * @private
3265
+ */
3266
+ getModuleName() {
3267
+ return 'ribbon';
3268
+ }
3269
+ /**
3270
+ * To provide the array of modules needed for component rendering
3271
+ *
3272
+ * @returns {ModuleDeclaration[]} - returns module declaration.
3273
+ * @hidden
3274
+ */
3275
+ requiredModules() {
3276
+ const modules = [];
3277
+ modules.push({ member: 'ribbonButton', args: [this] }, { member: 'ribbonDropDown', args: [this] }, { member: 'ribbonSplitButton', args: [this] }, { member: 'ribbonCheckBox', args: [this] }, { member: 'ribbonColorPicker', args: [this] }, { member: 'ribbonComboBox', args: [this] }, { member: 'ribbonGroupButton', args: [this] }, { member: 'ribbonFileMenu', args: [this] }, { member: 'ribbonBackstage', args: [this] });
3278
+ return modules;
3279
+ }
3280
+ initialize() {
3281
+ this.element.id = this.element.id || getUniqueID('e-' + this.getModuleName());
3282
+ addClass([this.element], ['e-rbn', ...(this.cssClass ? this.cssClass.split(SPACE) : [])]);
3283
+ if (this.enableRtl) {
3284
+ this.element.classList.add(RTL_CSS);
3285
+ }
3286
+ this.element.style.width = formatUnit(this.width);
3287
+ this.renderTabs();
3288
+ if (this.ribbonFileMenuModule) {
3289
+ this.ribbonFileMenuModule.createFileMenu(this.fileMenu);
3290
+ }
3291
+ if (this.ribbonBackstageModule) {
3292
+ this.ribbonBackstageModule.createBackStage(this.backStageMenu);
3293
+ }
3294
+ this.createHelpPaneTemplate();
3295
+ const toolbar = this.tabObj['tbObj'];
3296
+ toolbar.refreshOverflow();
3297
+ createTooltip(this.element, this);
3298
+ this.wireEvents();
3299
+ this.wireKeyboardEvent();
3300
+ this.currentControlIndex = 0;
3301
+ }
3302
+ wireEvents() {
3303
+ EventHandler.add(window, 'resize', this.resizeHandler, this);
3304
+ }
3305
+ wireKeyboardEvent() {
3306
+ this.keyboardModuleRibbon = new KeyboardEvents(this.element, {
3307
+ keyAction: this.keyActionHandler.bind(this),
3308
+ keyConfigs: this.keyConfigs,
3309
+ eventName: 'keydown'
3310
+ });
3311
+ }
3312
+ keyActionHandler(e) {
3313
+ if (((e.key === 'Tab') && (!(e.target.classList.contains('e-tab-wrap')) && !(e.target.classList.contains('e-combobox'))))) {
3314
+ e.preventDefault();
3315
+ }
3316
+ const activeContent = this.tabObj.element.querySelector('#' + this.tabs[this.selectedTab].id + CONTENT_ID);
3317
+ const ribbonControls = activeContent.querySelectorAll('.e-control');
3318
+ const comboBoxElements = activeContent.querySelectorAll('.e-combobox');
3319
+ let comboBoxEle;
3320
+ if (comboBoxElements) {
3321
+ for (let i = 0; i < comboBoxElements.length; i++) {
3322
+ if (comboBoxElements[parseInt(i.toString(), 10)].closest('.e-input-focus')) {
3323
+ comboBoxEle = comboBoxElements[parseInt(i.toString(), 10)];
3324
+ }
3325
+ }
3326
+ }
3327
+ if (comboBoxEle) {
3328
+ for (let i = 0; i < ribbonControls.length; i++) {
3329
+ if (ribbonControls[parseInt(i.toString(), 10)].classList.contains('e-combobox')) {
3330
+ if (ribbonControls[parseInt(i.toString(), 10)].closest('.e-input-focus')) {
3331
+ this.currentControlIndex = i;
3332
+ }
3333
+ }
3334
+ }
3335
+ }
3336
+ if (this.currentControlIndex === 0) {
3337
+ let item = ribbonControls[this.currentControlIndex].closest('.e-ribbon-item');
2684
3338
  while (item && item.classList.contains('e-disabled')) {
2685
3339
  this.currentControlIndex++;
2686
3340
  item = ribbonControls[this.currentControlIndex].closest('.e-ribbon-item');
@@ -2932,7 +3586,9 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
2932
3586
  this.switchLayout();
2933
3587
  }
2934
3588
  tabCreated() {
2935
- this.addExpandCollapse();
3589
+ if (!this.hideLayoutSwitcher) {
3590
+ this.addExpandCollapse();
3591
+ }
2936
3592
  this.renderInitialTab(this.selectedTab);
2937
3593
  }
2938
3594
  ribbonTabSelected(e) {
@@ -3081,7 +3737,7 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
3081
3737
  item.setProperties({ activeSize: RibbonItemSize.Medium }, true);
3082
3738
  this.setItemSize(itemEle, item);
3083
3739
  }
3084
- if ((item.type === RibbonItemType.DropDown) || (item.type === RibbonItemType.SplitButton)) {
3740
+ if ((item.type === RibbonItemType.DropDown) || (item.type === RibbonItemType.SplitButton) || (item.type === RibbonItemType.GroupButton)) {
3085
3741
  this.updatePopupItems(item, itemContainer, group.enableGroupOverflow, true);
3086
3742
  }
3087
3743
  }
@@ -3093,7 +3749,7 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
3093
3749
  }
3094
3750
  }
3095
3751
  updatePopupItems(item, itemEle, isGroupOF, isMenu) {
3096
- const dropdown = getComponent(itemEle.querySelector('#' + item.id), (item.type === RibbonItemType.DropDown) ? DropDownButton : SplitButton);
3752
+ const dropdown = getComponent(itemEle.querySelector('#' + item.id), (item.type === RibbonItemType.DropDown || item.type === RibbonItemType.GroupButton) ? DropDownButton : SplitButton);
3097
3753
  const dropDownPopup = dropdown.dropDown;
3098
3754
  // popup is on right if (isGroupOF && isMenu)
3099
3755
  // The position is reversed if RTL is enabled.
@@ -3151,7 +3807,7 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
3151
3807
  break;
3152
3808
  }
3153
3809
  const groupEle = tabContent.querySelector('#' + collection.id);
3154
- if ((item.type === RibbonItemType.DropDown) || (item.type === RibbonItemType.SplitButton)) {
3810
+ if ((item.type === RibbonItemType.DropDown) || (item.type === RibbonItemType.SplitButton) || (item.type === RibbonItemType.GroupButton)) {
3155
3811
  this.updatePopupItems(item, itemContainer, group.enableGroupOverflow, false);
3156
3812
  }
3157
3813
  groupEle.append(itemContainer);
@@ -3197,6 +3853,8 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
3197
3853
  }
3198
3854
  createOverflowPopup(item, tabIndex, isGroupOF, groupId, groupHeader, itemEle, groupContainer) {
3199
3855
  let overflowButton;
3856
+ const contentEle = this.tabObj.items[parseInt(tabIndex.toString(), 10)].content;
3857
+ const isDisabledGroup = contentEle.querySelector('#' + groupId);
3200
3858
  if (isGroupOF) {
3201
3859
  const overflowDDB = groupContainer.querySelector('#' + groupId + GROUPOF_BUTTON_ID);
3202
3860
  if (!overflowDDB) {
@@ -3207,6 +3865,9 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
3207
3865
  else {
3208
3866
  overflowButton = getInstance(overflowDDB, DropDownButton);
3209
3867
  }
3868
+ if (isDisabledGroup && isDisabledGroup.classList.contains('e-disabled')) {
3869
+ overflowButton.target.classList.add('e-disabled');
3870
+ }
3210
3871
  overflowButton.target.append(itemEle);
3211
3872
  }
3212
3873
  else {
@@ -3224,6 +3885,9 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
3224
3885
  let ofGroupContainer = overflowEle.querySelector('#' + groupId + CONTAINER_ID);
3225
3886
  if (!ofGroupContainer) {
3226
3887
  ofGroupContainer = this.createGroupContainer(groupId, groupHeader);
3888
+ if (isDisabledGroup && isDisabledGroup.classList.contains('e-disabled')) {
3889
+ ofGroupContainer.classList.add('e-disabled');
3890
+ }
3227
3891
  ofTabContainer.append(ofGroupContainer);
3228
3892
  }
3229
3893
  ofGroupContainer.append(itemEle);
@@ -3258,6 +3922,11 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
3258
3922
  case 'ComboBox':
3259
3923
  this.ribbonComboBoxModule.addOverFlowEvents(item, itemEle, overflowButton);
3260
3924
  break;
3925
+ case 'GroupButton':
3926
+ if (this.activeLayout === 'Simplified') {
3927
+ this.ribbonGroupButtonModule.addOverFlowEvents(item, itemEle);
3928
+ break;
3929
+ }
3261
3930
  }
3262
3931
  }
3263
3932
  createOfTabContainer(groupId, groupHeader, itemEle, tabIndex) {
@@ -3366,7 +4035,12 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
3366
4035
  const ele = activeContent.querySelector('#' + item.id + CONTAINER_ID);
3367
4036
  shrinkEle.appendChild(ele);
3368
4037
  item.setProperties({ activeSize: RibbonItemSize.Medium }, true);
3369
- this.setItemSize(ele.querySelector('#' + item.id), item);
4038
+ if (item.type === RibbonItemType.GroupButton && this.activeLayout === 'Classic') {
4039
+ this.setItemSize(ele.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID), item);
4040
+ }
4041
+ else {
4042
+ this.setItemSize(ele.querySelector('#' + item.id), item);
4043
+ }
3370
4044
  }
3371
4045
  };
3372
4046
  const moveCollectionToColumn = (start, end) => {
@@ -3380,7 +4054,12 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
3380
4054
  const ele = activeContent.querySelector('#' + collection.id);
3381
4055
  shrinkEle.appendChild(ele);
3382
4056
  collection.items[0].setProperties({ activeSize: RibbonItemSize.Medium }, true);
3383
- this.setItemSize(ele.querySelector('#' + collection.items[0].id), collection.items[0]);
4057
+ if (collection.items[0].type === RibbonItemType.GroupButton && this.activeLayout === 'Classic') {
4058
+ this.setItemSize(ele.querySelector('#' + collection.items[0].id + RIBBON_GROUP_BUTTON_ID), collection.items[0]);
4059
+ }
4060
+ else {
4061
+ this.setItemSize(ele.querySelector('#' + collection.items[0].id), collection.items[0]);
4062
+ }
3384
4063
  }
3385
4064
  };
3386
4065
  const orientation = group.orientation;
@@ -3470,8 +4149,11 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
3470
4149
  const reduce = (i) => {
3471
4150
  const item = collection.items[parseInt(i.toString(), 10)];
3472
4151
  if (item.displayOptions & DisplayMode.Classic) {
3473
- const ele = activeContent.querySelector('#' + item.id);
4152
+ let ele = activeContent.querySelector('#' + item.id);
3474
4153
  item.setProperties({ activeSize: RibbonItemSize.Small }, true);
4154
+ if (item.type === RibbonItemType.GroupButton) {
4155
+ ele = activeContent.querySelector('#' + item.id + '_grpbtn');
4156
+ }
3475
4157
  this.setItemSize(ele, item);
3476
4158
  }
3477
4159
  };
@@ -3490,8 +4172,11 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
3490
4172
  const reduce = (i) => {
3491
4173
  const collection = group.collections[parseInt(i.toString(), 10)];
3492
4174
  if (collection.items[0].displayOptions & DisplayMode.Classic) {
3493
- const ele = activeContent.querySelector('#' + collection.items[0].id);
4175
+ let ele = activeContent.querySelector('#' + collection.items[0].id);
3494
4176
  collection.items[0].setProperties({ activeSize: RibbonItemSize.Small }, true);
4177
+ if (collection.items[0].type === RibbonItemType.GroupButton) {
4178
+ ele = activeContent.querySelector('#' + collection.items[0].id + RIBBON_GROUP_BUTTON_ID);
4179
+ }
3495
4180
  this.setItemSize(ele, collection.items[0]);
3496
4181
  }
3497
4182
  };
@@ -3591,7 +4276,7 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
3591
4276
  }
3592
4277
  const item = collection.items[parseInt(l.toString(), 10)];
3593
4278
  if (canReduceItem(item)) {
3594
- setWidth(item.id);
4279
+ item.type !== RibbonItemType.GroupButton ? setWidth(item.id) : setWidth(item.id + RIBBON_GROUP_BUTTON_ID);
3595
4280
  reduceItemsToSmall(k, l, l);
3596
4281
  if (!shouldSkip && (tabContent.offsetWidth > activeContent.offsetWidth)) {
3597
4282
  return true;
@@ -3626,8 +4311,11 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
3626
4311
  .groups[parseInt(groupIndex.toString(), 10)].collections[parseInt(collectionIndex.toString(), 10)];
3627
4312
  const item = collection.items[parseInt(index.toString(), 10)];
3628
4313
  if (item.displayOptions & DisplayMode.Classic) {
3629
- const ele = parentEle.id === item.id ? parentEle : parentEle.querySelector('#' + item.id);
4314
+ let ele = parentEle.id === item.id ? parentEle : parentEle.querySelector('#' + item.id);
3630
4315
  item.setProperties({ activeSize: RibbonItemSize.Medium }, true);
4316
+ if (item.type === RibbonItemType.GroupButton) {
4317
+ ele = document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID);
4318
+ }
3631
4319
  this.setItemSize(ele, item);
3632
4320
  }
3633
4321
  };
@@ -3636,8 +4324,11 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
3636
4324
  .groups[parseInt(groupIndex.toString(), 10)].collections;
3637
4325
  const item = collections[parseInt(i.toString(), 10)].items[0];
3638
4326
  if (item.displayOptions & DisplayMode.Classic) {
3639
- const ele = activeContent.querySelector('#' + collections[parseInt(i.toString(), 10)].items[0].id);
4327
+ let ele = activeContent.querySelector('#' + collections[parseInt(i.toString(), 10)].items[0].id);
3640
4328
  collections[parseInt(i.toString(), 10)].items[0].setProperties({ activeSize: RibbonItemSize.Medium }, true);
4329
+ if (item.type === RibbonItemType.GroupButton) {
4330
+ ele = activeContent.querySelector('#' + collections[parseInt(i.toString(), 10)].items[0].id + RIBBON_GROUP_BUTTON_ID);
4331
+ }
3641
4332
  this.setItemSize(ele, collections[parseInt(i.toString(), 10)].items[0]);
3642
4333
  }
3643
4334
  };
@@ -3653,7 +4344,10 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
3653
4344
  }
3654
4345
  const item = collection.items[parseInt(l.toString(), 10)];
3655
4346
  if (canExpandItem(item)) {
3656
- const itemEle = activeContent.querySelector('#' + item.id);
4347
+ let itemEle = activeContent.querySelector('#' + item.id);
4348
+ if (item.type === 'GroupButton') {
4349
+ itemEle = activeContent.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID);
4350
+ }
3657
4351
  const valString = itemEle.getAttribute('data-medium-width');
3658
4352
  const value = valString ? parseInt(valString, 10) : null;
3659
4353
  if (value && (shouldSkip || (tabContent.offsetWidth > value))) {
@@ -3752,10 +4446,13 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
3752
4446
  const item = items[parseInt(i.toString(), 10)];
3753
4447
  if (item.displayOptions & DisplayMode.Classic) {
3754
4448
  const container = parentEle.querySelector('#' + item.id + CONTAINER_ID);
3755
- const ele = container.querySelector('#' + item.id);
4449
+ let ele = container.querySelector('#' + item.id);
3756
4450
  item.setProperties({ activeSize: RibbonItemSize.Large }, true);
4451
+ if (item.type === RibbonItemType.GroupButton) {
4452
+ ele = container.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID);
4453
+ }
3757
4454
  this.setItemSize(ele, item);
3758
- parentEle.insertAdjacentElement('afterend', container);
4455
+ parentEle.insertAdjacentElement('beforebegin', container);
3759
4456
  }
3760
4457
  };
3761
4458
  reduce(start);
@@ -3774,10 +4471,13 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
3774
4471
  const collection = collections[parseInt(i.toString(), 10)];
3775
4472
  if (collection.items[0].displayOptions & DisplayMode.Classic) {
3776
4473
  const collectionEle = parentEle.querySelector('#' + collection.id);
3777
- const ele = collectionEle.querySelector('#' + collection.items[0].id);
4474
+ let ele = collectionEle.querySelector('#' + collection.items[0].id);
3778
4475
  collection.items[0].setProperties({ activeSize: RibbonItemSize.Large }, true);
4476
+ if (collection.items[0].type === RibbonItemType.GroupButton) {
4477
+ ele = collectionEle.querySelector('#' + collection.items[0].id + RIBBON_GROUP_BUTTON_ID);
4478
+ }
3779
4479
  this.setItemSize(ele, collection.items[0]);
3780
- parentEle.insertAdjacentElement('afterend', collectionEle);
4480
+ parentEle.insertAdjacentElement('beforebegin', collectionEle);
3781
4481
  }
3782
4482
  };
3783
4483
  reduce(start);
@@ -3825,6 +4525,10 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
3825
4525
  }
3826
4526
  return false;
3827
4527
  }
4528
+ handleContentSize(itemEle, isRemoveOverflow) {
4529
+ const itemContainer = itemEle.closest('.' + RIBBON_GROUP_CONTENT);
4530
+ (isRemoveOverflow ? (itemContainer.classList.add(RIBBON_CONTENT_HEIGHT)) : (itemContainer.classList.remove(RIBBON_CONTENT_HEIGHT)));
4531
+ }
3828
4532
  setItemSize(itemEle, item) {
3829
4533
  const itemContainer = itemEle.closest('.' + RIBBON_ITEM);
3830
4534
  if (item.type === RibbonItemType.Button) {
@@ -3840,6 +4544,9 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
3840
4544
  remove(itemEle);
3841
4545
  this.createTemplateContent(item, itemContainer);
3842
4546
  }
4547
+ else if (item.type === RibbonItemType.GroupButton) {
4548
+ this.ribbonGroupButtonModule.updateGroupButtonSize(itemEle, item);
4549
+ }
3843
4550
  itemContainer.classList.remove(RIBBON_CONTENT_HEIGHT, RIBBON_LARGE_ITEM, RIBBON_MEDIUM_ITEM, RIBBON_SMALL_ITEM);
3844
4551
  if (item.activeSize === RibbonItemSize.Large) {
3845
4552
  itemContainer.classList.add(RIBBON_LARGE_ITEM, RIBBON_CONTENT_HEIGHT);
@@ -3879,6 +4586,7 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
3879
4586
  const item = collection.items[parseInt(k.toString(), 10)];
3880
4587
  const itemEle = collectionEle.querySelector('#' + item.id + CONTAINER_ID);
3881
4588
  if (itemEle !== null) {
4589
+ this.handleContentSize(itemEle);
3882
4590
  this.addOverflowEvents(item, itemEle, dropdown);
3883
4591
  }
3884
4592
  }
@@ -3916,6 +4624,7 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
3916
4624
  const item = collection.items[parseInt(k.toString(), 10)];
3917
4625
  const itemEle = collectionEle.querySelector('#' + item.id + CONTAINER_ID);
3918
4626
  if (itemEle !== null) {
4627
+ this.handleContentSize(itemEle, true);
3919
4628
  this.removeOverflowEvent(item, itemEle);
3920
4629
  }
3921
4630
  }
@@ -4178,6 +4887,9 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
4178
4887
  case 'ComboBox':
4179
4888
  this.ribbonComboBoxModule.removeOverFlowEvents(item, itemEle);
4180
4889
  break;
4890
+ case 'GroupButton':
4891
+ this.ribbonGroupButtonModule.removeOverFlowEvents(item, itemEle);
4892
+ break;
4181
4893
  }
4182
4894
  }
4183
4895
  createGroupContainer(groupId, groupHeader) {
@@ -4311,10 +5023,13 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
4311
5023
  itemEle = groupContainer.querySelector('#' + item.id + CONTAINER_ID);
4312
5024
  if (item.displayOptions === (DisplayMode.Classic | DisplayMode.Overflow)) {
4313
5025
  this.createOverflowPopup(item, tabIndex, group.enableGroupOverflow, group.id, group.header, itemEle, groupContainer);
4314
- if ((item.type === RibbonItemType.DropDown) || (item.type === RibbonItemType.SplitButton)) {
5026
+ if ((item.type === RibbonItemType.DropDown) || (item.type === RibbonItemType.SplitButton) || (item.type === RibbonItemType.GroupButton)) {
4315
5027
  this.updatePopupItems(item, itemEle, group.enableGroupOverflow, true);
4316
5028
  }
4317
5029
  }
5030
+ if (item.type === RibbonItemType.GroupButton) {
5031
+ this.ribbonGroupButtonModule.switchGroupButton(item, itemEle);
5032
+ }
4318
5033
  item.setProperties({ activeSize: size }, true);
4319
5034
  const ele = itemEle.querySelector('#' + item.id);
4320
5035
  this.setItemSize(ele, item);
@@ -4402,14 +5117,20 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
4402
5117
  let itemEle = groupContainer.querySelector('#' + item.id + CONTAINER_ID);
4403
5118
  if (!itemEle) {
4404
5119
  itemEle = overflowtarget.querySelector('#' + item.id + CONTAINER_ID);
4405
- if ((item.type === RibbonItemType.DropDown) || (item.type === RibbonItemType.SplitButton)) {
5120
+ if ((item.type === RibbonItemType.DropDown) || (item.type === RibbonItemType.SplitButton) || (item.type === RibbonItemType.GroupButton)) {
4406
5121
  this.updatePopupItems(item, itemEle, group.enableGroupOverflow, false);
4407
5122
  }
4408
5123
  this.removeOverflowEvent(item, itemEle);
4409
5124
  }
5125
+ if (item.type === RibbonItemType.GroupButton) {
5126
+ this.ribbonGroupButtonModule.switchGroupButton(item, itemEle);
5127
+ }
4410
5128
  groupCollection.append(itemEle);
4411
5129
  }
4412
- const ele = groupContainer.querySelector('#' + item.id);
5130
+ let ele = groupContainer.querySelector('#' + item.id);
5131
+ if (item.type === RibbonItemType.GroupButton) {
5132
+ ele = groupContainer.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID);
5133
+ }
4413
5134
  const itemsize = (item.allowedSizes & RibbonItemSize.Large) ? RibbonItemSize.Large :
4414
5135
  (item.allowedSizes & RibbonItemSize.Medium) ? RibbonItemSize.Medium : RibbonItemSize.Small;
4415
5136
  item.setProperties({ activeSize: itemsize }, true);
@@ -4575,6 +5296,9 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
4575
5296
  case 'Template':
4576
5297
  this.createTemplateContent(item, itemEle);
4577
5298
  break;
5299
+ case 'GroupButton':
5300
+ this.ribbonGroupButtonModule.createGroupButton(item, itemEle);
5301
+ break;
4578
5302
  }
4579
5303
  }
4580
5304
  createItems(itemList, alignType, groupId, groupHeader, isGroupOF, tabIndex, groupContainer) {
@@ -4622,7 +5346,7 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
4622
5346
  this.createRibbonItem(item, itemEle);
4623
5347
  if ((this.activeLayout === 'Simplified') && ((item.displayOptions === DisplayMode.Overflow) || (item.displayOptions === (DisplayMode.Classic | DisplayMode.Overflow)))) {
4624
5348
  this.createOverflowPopup(item, tabIndex, isGroupOF, groupId, groupHeader, itemEle, groupContainer);
4625
- if ((item.type === RibbonItemType.DropDown) || (item.type === RibbonItemType.SplitButton)) {
5349
+ if ((item.type === RibbonItemType.DropDown) || (item.type === RibbonItemType.SplitButton) || (item.type === RibbonItemType.GroupButton)) {
4626
5350
  this.updatePopupItems(item, itemEle, isGroupOF, true);
4627
5351
  }
4628
5352
  }
@@ -4701,51 +5425,71 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
4701
5425
  if (this.ribbonFileMenuModule) {
4702
5426
  this.ribbonFileMenuModule.setCommonProperties(commonProp);
4703
5427
  }
5428
+ if (this.ribbonBackstageModule) {
5429
+ this.ribbonBackstageModule.setCommonProperties(commonProp);
5430
+ }
4704
5431
  for (let i = 0; i < this.tabs.length; i++) {
4705
5432
  const tab = this.tabs[parseInt(i.toString(), 10)];
4706
5433
  const contentEle = this.tabObj.items[parseInt(i.toString(), 10)].content;
4707
- for (const group of tab.groups) {
4708
- let dropdownElement;
4709
- let dropdown;
4710
- if (this.activeLayout === RibbonLayout.Classic) {
4711
- dropdownElement = group.isCollapsed ?
4712
- contentEle.querySelector('#' + group.id + OVERFLOW_ID + DROPDOWN_ID) : null;
4713
- }
4714
- else {
4715
- dropdownElement = group.enableGroupOverflow ?
4716
- contentEle.querySelector('#' + group.id + GROUPOF_BUTTON_ID) : null;
4717
- dropdown = dropdownElement ? getComponent(dropdownElement, DropDownButton) : this.overflowDDB;
4718
- if (dropdown) {
4719
- updateTooltipProp(dropdown.target, commonProp);
4720
- dropdown.setProperties(commonProp);
5434
+ if (contentEle.querySelector('.' + RIBBON_GROUP)) {
5435
+ for (const group of tab.groups) {
5436
+ let dropdownElement;
5437
+ let dropdown;
5438
+ if (this.activeLayout === RibbonLayout.Classic) {
5439
+ dropdownElement = group.isCollapsed ?
5440
+ contentEle.querySelector('#' + group.id + OVERFLOW_ID + DROPDOWN_ID) : null;
4721
5441
  }
4722
- }
4723
- for (const collection of group.collections) {
4724
- for (const item of collection.items) {
4725
- let ele = null;
4726
- if (this.activeLayout === RibbonLayout.Classic) {
4727
- if (item.displayOptions & DisplayMode.Classic) {
4728
- ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id) : contentEle.querySelector('#' + item.id);
4729
- }
5442
+ else {
5443
+ dropdownElement = group.enableGroupOverflow ?
5444
+ contentEle.querySelector('#' + group.id + GROUPOF_BUTTON_ID) : null;
5445
+ dropdown = dropdownElement ? getComponent(dropdownElement, DropDownButton) : this.overflowDDB;
5446
+ if (dropdown) {
5447
+ updateTooltipProp(dropdown.target, commonProp);
5448
+ dropdown.setProperties(commonProp);
4730
5449
  }
4731
- else {
4732
- //Checks for Simplified and Auto options (Auto = classic + simplified + popup)
4733
- ele = (item.displayOptions & DisplayMode.Simplified) ? contentEle.querySelector('#' + item.id) : null;
4734
- // element will be null for "Popup" and if the item is moved to overflow in "Auto" mode
4735
- if (!ele) {
4736
- ele = dropdown.target.querySelector('#' + item.id);
4737
- if (item.type === 'DropDown') {
4738
- this.updatePopupItems(item, dropdown.target, group.enableGroupOverflow, true);
5450
+ }
5451
+ for (const collection of group.collections) {
5452
+ for (const item of collection.items) {
5453
+ let ele = null;
5454
+ if (this.activeLayout === RibbonLayout.Classic) {
5455
+ if (item.displayOptions & DisplayMode.Classic) {
5456
+ ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id) : item.type === RibbonItemType.GroupButton ? contentEle.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID) : contentEle.querySelector('#' + item.id);
4739
5457
  }
4740
5458
  }
4741
- }
4742
- if (ele) {
4743
- const moduleName = this.getItemModuleName(item);
4744
- if (moduleName !== 'template') {
4745
- updateCommonProperty(ele, moduleName, commonProp);
5459
+ else {
5460
+ //Checks for Simplified and Auto options (Auto = classic + simplified + popup)
5461
+ ele = (item.displayOptions & DisplayMode.Simplified) ? contentEle.querySelector('#' + item.id) : null;
5462
+ // element will be null for "Popup" and if the item is moved to overflow in "Auto" mode
5463
+ if (!ele) {
5464
+ ele = dropdown.target.querySelector('#' + item.id);
5465
+ if (item.type === 'DropDown') {
5466
+ this.updatePopupItems(item, dropdown.target, group.enableGroupOverflow, true);
5467
+ }
5468
+ }
4746
5469
  }
4747
- else if (!isNullOrUndefined(commonProp.enableRtl)) {
4748
- ele.classList.toggle(RTL_CSS, commonProp.enableRtl);
5470
+ if (ele) {
5471
+ const moduleName = this.getItemModuleName(item);
5472
+ if (moduleName !== 'template') {
5473
+ if (moduleName === 'group-btn' && this.activeLayout === 'Classic') {
5474
+ for (let i = 0; i < item.groupButtonSettings.items.length; i++) {
5475
+ const btnEle = ele.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + i);
5476
+ updateCommonProperty(btnEle, 'btn', commonProp);
5477
+ }
5478
+ }
5479
+ else if (moduleName === 'group-btn' && this.activeLayout === 'Simplified') {
5480
+ updateCommonProperty(ele, 'dropdown-btn', commonProp);
5481
+ for (let i = 0; i < item.groupButtonSettings.items.length; i++) {
5482
+ const btnEle = document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + i);
5483
+ updateCommonProperty(btnEle, 'btn', commonProp);
5484
+ }
5485
+ }
5486
+ else {
5487
+ updateCommonProperty(ele, moduleName, commonProp);
5488
+ }
5489
+ }
5490
+ else if (!isNullOrUndefined(commonProp.enableRtl)) {
5491
+ ele.classList.toggle(RTL_CSS, commonProp.enableRtl);
5492
+ }
4749
5493
  }
4750
5494
  }
4751
5495
  }
@@ -4788,6 +5532,10 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
4788
5532
  if (item.displayOptions & DisplayMode.Classic) {
4789
5533
  ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id) :
4790
5534
  contentEle.querySelector('#' + item.id);
5535
+ if (item.type === RibbonItemType.GroupButton) {
5536
+ ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id + RIBBON_GROUP_BUTTON_ID) :
5537
+ contentEle.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID);
5538
+ }
4791
5539
  }
4792
5540
  }
4793
5541
  else {
@@ -4822,6 +5570,28 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
4822
5570
  if (moduleName === 'colorpicker') {
4823
5571
  this.ribbonColorPickerModule.unwireColorPickerEvents(ele);
4824
5572
  }
5573
+ else if (moduleName === 'group-btn') {
5574
+ if (this.activeLayout === 'Classic') {
5575
+ for (let i = 0; i < item.groupButtonSettings.items.length; i++) {
5576
+ const btnEle = ele.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + i);
5577
+ if (btnEle) {
5578
+ destroyControl(btnEle, 'btn');
5579
+ }
5580
+ }
5581
+ }
5582
+ else {
5583
+ this.ribbonGroupButtonModule.destroyDropDown(item);
5584
+ }
5585
+ for (let i = 0; i < item.groupButtonSettings.items.length; i++) {
5586
+ if (item.groupButtonSettings.items[parseInt(i.toString(), 10)].ribbonTooltipSettings) {
5587
+ const groupButtonID = item.id + RIBBON_GROUP_BUTTON_ID + i;
5588
+ const index = getIndex(this.tooltipData, (e) => { return e.id === groupButtonID; });
5589
+ if (index !== -1) {
5590
+ this.tooltipData.splice(index, 1);
5591
+ }
5592
+ }
5593
+ }
5594
+ }
4825
5595
  else if (moduleName !== 'template') {
4826
5596
  destroyControl(ele, moduleName);
4827
5597
  }
@@ -4831,6 +5601,9 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
4831
5601
  this.tooltipData.splice(index, 1);
4832
5602
  }
4833
5603
  }
5604
+ if (item.type === 'GroupButton') {
5605
+ this.ribbonGroupButtonModule.destroyDropDown(item);
5606
+ }
4834
5607
  }
4835
5608
  getItemModuleName(item) {
4836
5609
  switch (item.type) {
@@ -4846,6 +5619,8 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
4846
5619
  return 'colorpicker';
4847
5620
  case 'ComboBox':
4848
5621
  return 'combobox';
5622
+ case 'GroupButton':
5623
+ return 'group-btn';
4849
5624
  default:
4850
5625
  return 'template';
4851
5626
  }
@@ -4879,6 +5654,56 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
4879
5654
  const index = getIndex(this.tabs, (e) => { return e.id === tabId; });
4880
5655
  this.setProperties({ selectedTab: index });
4881
5656
  }
5657
+ /**
5658
+ * Shows a specific tab in the ribbon.
5659
+ *
5660
+ * @param {string} tabId - The ID of the tab to be shown.
5661
+ * @returns {void}
5662
+ */
5663
+ showTab(tabId) {
5664
+ this.showHideTab(tabId, false);
5665
+ }
5666
+ /**
5667
+ * Hides a specific tab in the ribbon.
5668
+ *
5669
+ * @param {string} tabId - The ID of the tab to be hidden.
5670
+ * @returns {void}
5671
+ */
5672
+ hideTab(tabId) {
5673
+ this.showHideTab(tabId, true);
5674
+ }
5675
+ showHideTab(tabId, value) {
5676
+ const index = getIndex(this.tabs, (e) => { return e.id === tabId; });
5677
+ if (index === -1) {
5678
+ return;
5679
+ }
5680
+ this.tabObj.hideTab(index, value);
5681
+ }
5682
+ /**
5683
+ * Enables a specific tab in the ribbon.
5684
+ *
5685
+ * @param {string} tabId - The ID of the tab to be enabled.
5686
+ * @returns {void}
5687
+ */
5688
+ enableTab(tabId) {
5689
+ this.enableDisableTab(tabId, true);
5690
+ }
5691
+ /**
5692
+ * Disables a specific tab in the ribbon.
5693
+ *
5694
+ * @param {string} tabId - The ID of the tab to be disabled.
5695
+ * @returns {void}
5696
+ */
5697
+ disableTab(tabId) {
5698
+ this.enableDisableTab(tabId, false);
5699
+ }
5700
+ enableDisableTab(tabId, value) {
5701
+ const index = getIndex(this.tabs, (e) => { return e.id === tabId; });
5702
+ if (index === -1) {
5703
+ return;
5704
+ }
5705
+ this.tabObj.enableTab(index, value);
5706
+ }
4882
5707
  /**
4883
5708
  * Adds the ribbon tab.
4884
5709
  *
@@ -4917,7 +5742,11 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
4917
5742
  const dropdownElement = group.isCollapsed ? contentEle.querySelector('#' + group.id + OVERFLOW_ID + DROPDOWN_ID) : null;
4918
5743
  for (const collection of group.collections) {
4919
5744
  for (const item of collection.items) {
4920
- const ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id) : contentEle.querySelector('#' + item.id);
5745
+ let ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id) : contentEle.querySelector('#' + item.id);
5746
+ if (item.type === RibbonItemType.GroupButton && this.activeLayout === 'Classic') {
5747
+ ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id + RIBBON_GROUP_BUTTON_ID) :
5748
+ contentEle.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID);
5749
+ }
4921
5750
  if (ele) {
4922
5751
  this.destroyFunction(item, ele);
4923
5752
  }
@@ -5039,6 +5868,105 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
5039
5868
  this.refreshLayout();
5040
5869
  }
5041
5870
  }
5871
+ /**
5872
+ * Hides a specific group within a ribbon tab.
5873
+ *
5874
+ * @param {string} groupID - The ID of the group to be hidden.
5875
+ * @returns {void}
5876
+ */
5877
+ hideGroup(groupID) {
5878
+ this.showHideGroup(groupID, true);
5879
+ }
5880
+ /**
5881
+ * Shows a specific group within a ribbon tab.
5882
+ *
5883
+ * @param {string} groupID - The ID of the group to be shown.
5884
+ * @returns {void}
5885
+ */
5886
+ showGroup(groupID) {
5887
+ this.showHideGroup(groupID, false);
5888
+ }
5889
+ showHideGroup(groupID, isHidden) {
5890
+ let overflowDDB;
5891
+ let overflowtarget;
5892
+ const itemProp = getGroup(this.tabs, groupID);
5893
+ if (!itemProp) {
5894
+ return;
5895
+ }
5896
+ const contentEle = this.tabObj.items[itemProp.tabIndex].content;
5897
+ const groupEle = contentEle.querySelector('#' + groupID);
5898
+ isHidden ? groupEle.classList.add('e-hidden') : groupEle.classList.remove('e-hidden');
5899
+ if (this.overflowDDB) {
5900
+ const overflowEle = this.overflowDDB.target;
5901
+ const ofTabContainer = overflowEle.querySelector('#' + this.tabs[parseInt(itemProp.tabIndex.toString(), 10)].id + OVERFLOW_ID);
5902
+ if (itemProp.group.enableGroupOverflow) {
5903
+ const overflowDDBEle = contentEle.querySelector('#' + groupID + GROUPOF_BUTTON_ID);
5904
+ if (overflowDDBEle) {
5905
+ overflowDDB = getInstance(overflowDDBEle, DropDownButton);
5906
+ overflowtarget = overflowDDB.target;
5907
+ }
5908
+ if (overflowtarget) {
5909
+ isHidden ? overflowtarget.classList.add('e-hidden') : overflowtarget.classList.remove('e-hidden');
5910
+ }
5911
+ }
5912
+ else if (ofTabContainer) {
5913
+ const grpContainer = ofTabContainer.querySelector('#' + groupID + CONTAINER_ID);
5914
+ if (grpContainer) {
5915
+ isHidden ? grpContainer.classList.add('e-hidden') : grpContainer.classList.remove('e-hidden');
5916
+ }
5917
+ }
5918
+ }
5919
+ this.refreshLayout();
5920
+ }
5921
+ /**
5922
+ * Disables a specific group within a ribbon tab.
5923
+ *
5924
+ * @param {string} groupID - The ID of the group to be disabled.
5925
+ * @returns {void}
5926
+ */
5927
+ disableGroup(groupID) {
5928
+ this.enableDisableGroup(groupID, true);
5929
+ }
5930
+ /**
5931
+ * Enables a specific group within a ribbon tab.
5932
+ *
5933
+ * @param {string} groupID - The ID of the group to be enabled.
5934
+ * @returns {void}
5935
+ */
5936
+ enableGroup(groupID) {
5937
+ this.enableDisableGroup(groupID, false);
5938
+ }
5939
+ enableDisableGroup(groupID, isDisabled) {
5940
+ let overflowDDB;
5941
+ let overflowtarget;
5942
+ const itemProp = getGroup(this.tabs, groupID);
5943
+ if (!itemProp) {
5944
+ return;
5945
+ }
5946
+ const contentEle = this.tabObj.items[itemProp.tabIndex].content;
5947
+ const groupEle = contentEle.querySelector('#' + groupID);
5948
+ isDisabled ? groupEle.classList.add('e-disabled') : groupEle.classList.remove('e-disabled');
5949
+ if (this.overflowDDB) {
5950
+ const overflowEle = this.overflowDDB.target;
5951
+ const ofTabContainer = overflowEle.querySelector('#' + this.tabs[parseInt(itemProp.tabIndex.toString(), 10)].id + OVERFLOW_ID);
5952
+ if (itemProp.group.enableGroupOverflow) {
5953
+ const overflowDDBEle = contentEle.querySelector('#' + groupID + GROUPOF_BUTTON_ID);
5954
+ if (overflowDDBEle) {
5955
+ overflowDDB = getInstance(overflowDDBEle, DropDownButton);
5956
+ overflowtarget = overflowDDB.target;
5957
+ }
5958
+ if (overflowtarget) {
5959
+ isDisabled ? overflowtarget.classList.add('e-disabled') : overflowtarget.classList.remove('e-disabled');
5960
+ }
5961
+ }
5962
+ else if (ofTabContainer) {
5963
+ const grpContainer = ofTabContainer.querySelector('#' + groupID + CONTAINER_ID);
5964
+ if (grpContainer) {
5965
+ isDisabled ? grpContainer.classList.add('e-disabled') : grpContainer.classList.remove('e-disabled');
5966
+ }
5967
+ }
5968
+ }
5969
+ }
5042
5970
  /**
5043
5971
  * adds the ribbon collection.
5044
5972
  *
@@ -5211,6 +6139,41 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
5211
6139
  this.refreshLayout();
5212
6140
  }
5213
6141
  }
6142
+ /**
6143
+ * Hides a specific ribbon item.
6144
+ *
6145
+ * @param {string} itemId - The ID of the item to be hidden.
6146
+ * @returns {void}
6147
+ */
6148
+ hideItem(itemId) {
6149
+ this.showHideItem(itemId, true);
6150
+ }
6151
+ /**
6152
+ * Shows a specific ribbon item.
6153
+ *
6154
+ * @param {string} itemId - The ID of the item to be shown.
6155
+ * @returns {void}
6156
+ */
6157
+ showItem(itemId) {
6158
+ this.showHideItem(itemId, false);
6159
+ }
6160
+ showHideItem(itemId, isHidden) {
6161
+ const itemProp = getItem(this.tabs, itemId);
6162
+ if (!itemProp) {
6163
+ return;
6164
+ }
6165
+ let ele;
6166
+ if (itemProp.item.type === 'GroupButton') {
6167
+ ele = getItemElement(this, itemId + RIBBON_GROUP_BUTTON_ID, itemProp);
6168
+ }
6169
+ else {
6170
+ ele = getItemElement(this, itemId, itemProp);
6171
+ }
6172
+ if (ele) {
6173
+ const itemEle = closest(ele, '.e-ribbon-item');
6174
+ isHidden ? itemEle.classList.add('e-hidden') : itemEle.classList.remove('e-hidden');
6175
+ }
6176
+ }
5214
6177
  /**
5215
6178
  * tab - Gets the ribbon tab to be updated. The id of the tab is a required property. Other properties are optional.
5216
6179
  *
@@ -5240,7 +6203,11 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
5240
6203
  const dropdownElement = group.isCollapsed ? contentEle.querySelector('#' + group.id + OVERFLOW_ID + DROPDOWN_ID) : null;
5241
6204
  for (const collection of group.collections) {
5242
6205
  for (const item of collection.items) {
5243
- const ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id) : contentEle.querySelector('#' + item.id);
6206
+ let ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id) : contentEle.querySelector('#' + item.id);
6207
+ if (item.type === RibbonItemType.GroupButton && this.activeLayout === 'Classic') {
6208
+ ele = dropdownElement ? this.ribbonDropDownModule.getDDBItemElement(dropdownElement, item.id + RIBBON_GROUP_BUTTON_ID) :
6209
+ contentEle.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID);
6210
+ }
5244
6211
  if (ele) {
5245
6212
  this.destroyFunction(item, ele);
5246
6213
  }
@@ -5509,9 +6476,12 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
5509
6476
  else {
5510
6477
  itemContainer = groupContainer.querySelector('#' + itemId + CONTAINER_ID);
5511
6478
  itemEle = contentEle.querySelector('#' + itemId);
6479
+ if (itemProp.item.type === 'GroupButton' && this.activeLayout === RibbonLayout.Classic) {
6480
+ itemEle = contentEle.querySelector('#' + itemId + RIBBON_GROUP_BUTTON_ID);
6481
+ }
5512
6482
  if (this.activeLayout === RibbonLayout.Simplified && item.displayOptions === DisplayMode.Overflow) {
5513
6483
  this.createOverflowPopup(itemProp.item, itemProp.tabIndex, itemProp.group.enableGroupOverflow, itemProp.group.id, itemProp.group.header, itemContainer, groupContainer);
5514
- if ((itemProp.item.type === RibbonItemType.DropDown) || (itemProp.item.type === RibbonItemType.SplitButton)) {
6484
+ if ((itemProp.item.type === RibbonItemType.DropDown) || (itemProp.item.type === RibbonItemType.SplitButton) || (item.type === RibbonItemType.GroupButton)) {
5515
6485
  this.updatePopupItems(itemProp.item, itemContainer, itemProp.group.enableGroupOverflow, true);
5516
6486
  }
5517
6487
  }
@@ -5575,6 +6545,9 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
5575
6545
  let ele = null;
5576
6546
  if (this.activeLayout === RibbonLayout.Classic) {
5577
6547
  ele = (item.displayOptions & DisplayMode.Classic) ? contentEle.querySelector('#' + item.id) : null;
6548
+ if (item.type === 'GroupButton') {
6549
+ ele = (item.displayOptions & DisplayMode.Classic) ? contentEle.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID) : null;
6550
+ }
5578
6551
  }
5579
6552
  else {
5580
6553
  //Checks for Simplified and Auto options (Auto = classic + simplified + popup)
@@ -5586,7 +6559,12 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
5586
6559
  }
5587
6560
  if (ele) {
5588
6561
  this.destroyFunction(item, ele);
5589
- ele.closest('#' + item.id + CONTAINER_ID).remove();
6562
+ if (item.type === 'GroupButton' && this.activeLayout === RibbonLayout.Simplified) {
6563
+ document.getElementById(item.id + CONTAINER_ID).remove();
6564
+ }
6565
+ else {
6566
+ ele.closest('#' + item.id + CONTAINER_ID).remove();
6567
+ }
5590
6568
  }
5591
6569
  }
5592
6570
  /**
@@ -5613,13 +6591,34 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
5613
6591
  return;
5614
6592
  }
5615
6593
  itemProp.item.setProperties({ disabled: isDisabled }, true);
5616
- const ele = getItemElement(this, itemId, itemProp);
6594
+ let ele;
6595
+ if (itemProp.item.type === 'GroupButton') {
6596
+ ele = getItemElement(this, itemId + RIBBON_GROUP_BUTTON_ID, itemProp);
6597
+ }
6598
+ else {
6599
+ ele = getItemElement(this, itemId, itemProp);
6600
+ }
5617
6601
  if (ele) {
5618
6602
  const itemEle = closest(ele, '.e-ribbon-item');
5619
6603
  itemEle.classList.toggle(DISABLED_CSS, itemProp.item.disabled);
5620
6604
  const moduleName = this.getItemModuleName(itemProp.item);
5621
6605
  if (moduleName !== 'template') {
5622
- updateControlDisabled(ele, moduleName, isDisabled);
6606
+ if (moduleName === 'group-btn' && this.activeLayout === 'Simplified') {
6607
+ updateControlDisabled(ele, 'dropdown-btn', isDisabled);
6608
+ for (let i = 0; i < itemProp.item.groupButtonSettings.items.length; i++) {
6609
+ const btnEle = document.querySelector('#' + itemId + RIBBON_GROUP_BUTTON_ID + i);
6610
+ updateControlDisabled(btnEle, 'btn', isDisabled);
6611
+ }
6612
+ }
6613
+ else if (moduleName === 'group-btn' && this.activeLayout === 'Classic') {
6614
+ for (let i = 0; i < itemProp.item.groupButtonSettings.items.length; i++) {
6615
+ const btnEle = ele.querySelector('#' + itemId + RIBBON_GROUP_BUTTON_ID + i);
6616
+ updateControlDisabled(btnEle, 'btn', isDisabled);
6617
+ }
6618
+ }
6619
+ else {
6620
+ updateControlDisabled(ele, moduleName, isDisabled);
6621
+ }
5623
6622
  }
5624
6623
  else {
5625
6624
  ele.classList.toggle(DISABLED_CSS, isDisabled);
@@ -5635,7 +6634,9 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
5635
6634
  this.keyboardModuleRibbon = null;
5636
6635
  destroyTooltip(this.element);
5637
6636
  this.destroyTabItems(this.tabs);
5638
- this.removeExpandCollapse();
6637
+ if (!this.hideLayoutSwitcher) {
6638
+ this.removeExpandCollapse();
6639
+ }
5639
6640
  this.collapseButton = undefined;
5640
6641
  if (this.scrollModule) {
5641
6642
  this.scrollModule.destroy();
@@ -5742,6 +6743,13 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
5742
6743
  const toolbarEle = this.tabObj['tbObj'];
5743
6744
  toolbarEle.refreshOverflow();
5744
6745
  break;
6746
+ case 'backStageMenu':
6747
+ if (this.ribbonBackstageModule) {
6748
+ this.ribbonBackstageModule.updateBackStageMenu(this.backStageMenu);
6749
+ }
6750
+ const toolbarElement = this.tabObj['tbObj'];
6751
+ toolbarElement.refreshOverflow();
6752
+ break;
5745
6753
  case 'helpPaneTemplate':
5746
6754
  if (this.ribbonTempEle) {
5747
6755
  remove(this.ribbonTempEle);
@@ -5754,6 +6762,9 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
5754
6762
  const toolbar = this.tabObj['tbObj'];
5755
6763
  toolbar.refreshOverflow();
5756
6764
  break;
6765
+ case 'hideLayoutSwitcher':
6766
+ this.hideLayoutSwitcher ? this.removeExpandCollapse() : this.addExpandCollapse();
6767
+ break;
5757
6768
  }
5758
6769
  }
5759
6770
  }
@@ -5767,6 +6778,9 @@ __decorate([
5767
6778
  __decorate([
5768
6779
  Complex({}, FileMenuSettings)
5769
6780
  ], Ribbon.prototype, "fileMenu", void 0);
6781
+ __decorate([
6782
+ Complex({}, BackStageMenu)
6783
+ ], Ribbon.prototype, "backStageMenu", void 0);
5770
6784
  __decorate([
5771
6785
  Property('')
5772
6786
  ], Ribbon.prototype, "launcherIconCss", void 0);
@@ -5791,6 +6805,9 @@ __decorate([
5791
6805
  __decorate([
5792
6806
  Property('')
5793
6807
  ], Ribbon.prototype, "helpPaneTemplate", void 0);
6808
+ __decorate([
6809
+ Property(false)
6810
+ ], Ribbon.prototype, "hideLayoutSwitcher", void 0);
5794
6811
  __decorate([
5795
6812
  Event()
5796
6813
  ], Ribbon.prototype, "tabSelecting", void 0);
@@ -5806,6 +6823,9 @@ __decorate([
5806
6823
  __decorate([
5807
6824
  Event()
5808
6825
  ], Ribbon.prototype, "launcherIconClick", void 0);
6826
+ __decorate([
6827
+ Event()
6828
+ ], Ribbon.prototype, "created", void 0);
5809
6829
  Ribbon = Ribbon_1 = __decorate([
5810
6830
  NotifyPropertyChanges
5811
6831
  ], Ribbon);
@@ -6125,6 +7145,533 @@ class RibbonFileMenu {
6125
7145
  }
6126
7146
  }
6127
7147
 
7148
+ /**
7149
+ * Defines the items of Ribbon.
7150
+ */
7151
+ class RibbonBackstage extends Component {
7152
+ constructor(parent) {
7153
+ super();
7154
+ this.parent = parent;
7155
+ }
7156
+ /**
7157
+ * @private
7158
+ * @returns {void}
7159
+ */
7160
+ render() {
7161
+ // render code
7162
+ }
7163
+ /**
7164
+ * @private
7165
+ * @returns {void}
7166
+ */
7167
+ preRender() {
7168
+ // pre render code
7169
+ }
7170
+ getPersistData() {
7171
+ return '';
7172
+ }
7173
+ /**
7174
+ * This method is abstract member of the Component<HTMLElement>.
7175
+ *
7176
+ * @private
7177
+ * @returns {void}
7178
+ */
7179
+ onPropertyChanged() {
7180
+ // onProperty changes code
7181
+ }
7182
+ getModuleName() {
7183
+ return 'ribbonBackstage';
7184
+ }
7185
+ destroy() {
7186
+ if (this.backstageButton) {
7187
+ this.destroyDDB();
7188
+ }
7189
+ this.parent = null;
7190
+ }
7191
+ /**
7192
+ * Creates Backstage Menu
7193
+ *
7194
+ * @param {BackStageMenuModel} backStageOptions - Gets the property of backstage.
7195
+ * @returns {void}
7196
+ * @hidden
7197
+ */
7198
+ createBackStage(backStageOptions) {
7199
+ if (!backStageOptions.visible) {
7200
+ return;
7201
+ }
7202
+ this.backstageButtonEle = this.parent.createElement('button', {
7203
+ id: this.parent.element.id + RIBBON_BACKSTAGE_MENU_ID
7204
+ });
7205
+ const tabEle = this.parent.tabObj.element;
7206
+ const toolbarEle = tabEle.querySelector('.e-toolbar');
7207
+ tabEle.insertBefore(this.backstageButtonEle, toolbarEle);
7208
+ this.backstageButton = new Button({
7209
+ content: backStageOptions.text,
7210
+ enableRtl: this.parent.enableRtl,
7211
+ cssClass: RIBBON_BACKSTAGE,
7212
+ created: () => {
7213
+ tabEle.style.setProperty(RIBBON_FILE_MENU_WIDTH, this.backstageButtonEle.offsetWidth + 'px');
7214
+ }
7215
+ }, this.backstageButtonEle);
7216
+ this.createBackStagePopup(backStageOptions);
7217
+ if (this.parent.backStageMenu.template) {
7218
+ this.createBackStageTemplate(this.parent.backStageMenu.template);
7219
+ }
7220
+ else {
7221
+ let footerItemCount = 0;
7222
+ let itemCount = 0;
7223
+ for (let i = 0; i < backStageOptions.items.length; i++) {
7224
+ const item = backStageOptions.items[parseInt(i.toString(), 10)];
7225
+ if (item.isFooter) {
7226
+ footerItemCount++;
7227
+ }
7228
+ else {
7229
+ itemCount++;
7230
+ }
7231
+ }
7232
+ if (itemCount > 0) {
7233
+ this.createBackstageMenu(backStageOptions, false);
7234
+ }
7235
+ if (footerItemCount > 0) {
7236
+ this.createBackstageMenu(backStageOptions, true);
7237
+ }
7238
+ if (this.menuCtrl) {
7239
+ this.checkMenuItems(this.menuCtrl.items);
7240
+ }
7241
+ if (this.footerMenuCtrl) {
7242
+ this.checkMenuItems(this.footerMenuCtrl.items);
7243
+ }
7244
+ }
7245
+ this.backstageButtonEle.onclick = (e) => {
7246
+ e.stopPropagation();
7247
+ this.showBackstage();
7248
+ this.popupHTMLElement.classList.add(RIBBON_BACKSTAGE_OPEN);
7249
+ const menuItem = this.menuWrapper.querySelector('.e-menu-item.e-selected');
7250
+ if (menuItem) {
7251
+ menuItem.classList.remove('e-selected');
7252
+ }
7253
+ for (let i = 0; i < backStageOptions.items.length; i++) {
7254
+ const item = backStageOptions.items[parseInt(i.toString(), 10)];
7255
+ if (!item.isFooter && this.menuCtrl.items[0].text === item.text) {
7256
+ const firstMenuEle = this.popupHTMLElement.querySelector('#' + this.menuCtrl.items[0].id);
7257
+ if (firstMenuEle) {
7258
+ firstMenuEle.classList.add('e-selected');
7259
+ firstMenuEle.focus();
7260
+ }
7261
+ this.createBackStageContent(this.menuCtrl.items[0].id, item.content);
7262
+ break;
7263
+ }
7264
+ else {
7265
+ continue;
7266
+ }
7267
+ }
7268
+ };
7269
+ this.parent.tabObj.refreshActiveTabBorder();
7270
+ this.addBackStageMenuTooltip(backStageOptions);
7271
+ EventHandler.add(document, 'click', this.onClickEvent, this);
7272
+ }
7273
+ onClickEvent(e) {
7274
+ const targetEle = e.target;
7275
+ if (this.popupHTMLElement.contains(targetEle)) {
7276
+ return;
7277
+ }
7278
+ else {
7279
+ this.hideBackstage();
7280
+ }
7281
+ }
7282
+ addBackStageMenuTooltip(backStageOptions) {
7283
+ if (isTooltipPresent(backStageOptions.ribbonTooltipSettings)) {
7284
+ this.backstageButtonEle.classList.add(RIBBON_TOOLTIP_TARGET);
7285
+ this.parent.tooltipData.push({ id: this.backstageButtonEle.id, data: backStageOptions.ribbonTooltipSettings });
7286
+ }
7287
+ }
7288
+ checkMenuItems(backStageItems) {
7289
+ for (let i = 0; i < backStageItems.length; i++) {
7290
+ const item = backStageItems[parseInt(i.toString(), 10)];
7291
+ if (!item.iconCss) {
7292
+ const menuItemEle = this.popupHTMLElement.querySelector('#' + item.id);
7293
+ menuItemEle.classList.add(RIBBON_BACKSTAGE_TEXT_MENU);
7294
+ }
7295
+ }
7296
+ }
7297
+ createBackStagePopup(backStageOptions) {
7298
+ this.popupHTMLElement = this.parent.createElement('div', {
7299
+ id: this.parent.element.id + RIBBON_BACKSTAGE_POPUP_ID,
7300
+ className: RIBBON_BACKSTAGE_POPUP
7301
+ });
7302
+ let targetEle;
7303
+ if (backStageOptions.target) {
7304
+ targetEle = backStageOptions.target instanceof HTMLElement ? backStageOptions.target : document.querySelector(backStageOptions.target);
7305
+ targetEle.appendChild(this.popupHTMLElement);
7306
+ }
7307
+ else {
7308
+ this.parent.element.appendChild(this.popupHTMLElement);
7309
+ }
7310
+ this.popupEle = new Popup(this.popupHTMLElement, {
7311
+ height: backStageOptions.height,
7312
+ width: backStageOptions.width,
7313
+ relateTo: backStageOptions.target || this.parent.element,
7314
+ enableRtl: this.parent.enableRtl
7315
+ });
7316
+ if (this.parent.enableRtl) {
7317
+ this.updatePopupPositionOnRtl(this.parent.enableRtl);
7318
+ }
7319
+ this.popupHTMLElement.onkeydown = (e) => { if (e.code === 'Escape') {
7320
+ this.hideBackstage();
7321
+ } };
7322
+ this.hideBackstage();
7323
+ }
7324
+ updatePopupPositionOnRtl(enableRtl) {
7325
+ const popupStyle = this.popupHTMLElement.style;
7326
+ if (enableRtl) {
7327
+ popupStyle.right = popupStyle.left;
7328
+ popupStyle.left = 'unset';
7329
+ }
7330
+ else {
7331
+ popupStyle.left = popupStyle.right;
7332
+ popupStyle.right = 'unset';
7333
+ }
7334
+ }
7335
+ createBackstageMenu(menuOptions, isFooter) {
7336
+ const wrapperEle = this.popupHTMLElement.querySelector('#' + this.parent.element.id + '_wrapper');
7337
+ if (!wrapperEle) {
7338
+ this.menuWrapper = this.parent.createElement('div', {
7339
+ id: this.parent.element.id + '_wrapper',
7340
+ className: RIBBON_BACKSTAGE_MENU_WRAPPER
7341
+ });
7342
+ this.popupHTMLElement.appendChild(this.menuWrapper);
7343
+ }
7344
+ if (menuOptions.backButton.visible && !isFooter) {
7345
+ const closeBtnEle = this.parent.createElement('button', {
7346
+ id: this.parent.element.id + '_close',
7347
+ className: 'e-ribbon-close-btn'
7348
+ });
7349
+ this.closeBtn = new Button({
7350
+ content: menuOptions.backButton.text,
7351
+ iconCss: menuOptions.backButton.iconCss ? menuOptions.backButton.iconCss : BACKSTAGE_CLOSE_ICON,
7352
+ enableRtl: this.parent.enableRtl
7353
+ }, closeBtnEle);
7354
+ this.menuWrapper.append(closeBtnEle);
7355
+ closeBtnEle.onclick = () => {
7356
+ this.popupHTMLElement.classList.remove(RIBBON_BACKSTAGE_OPEN);
7357
+ this.hideBackstage();
7358
+ this.isBackButtonClicked = true;
7359
+ };
7360
+ }
7361
+ const itemsWrapperEle = this.popupHTMLElement.querySelector('#' + this.parent.element.id + '_itemswrapper');
7362
+ if (!itemsWrapperEle) {
7363
+ this.itemsWrapperEle = this.parent.createElement('div', {
7364
+ id: this.parent.element.id + '_itemswrapper',
7365
+ className: RIBBON_BACKSTAGE_ITEMS_WRAPPER
7366
+ });
7367
+ this.menuWrapper.append(this.itemsWrapperEle);
7368
+ }
7369
+ let ulFooterElem;
7370
+ if (isFooter) {
7371
+ ulFooterElem = this.parent.createElement('ul', {
7372
+ id: this.parent.element.id + RIBBON_FOOTER_MENU_LIST
7373
+ });
7374
+ this.itemsWrapperEle.appendChild(ulFooterElem);
7375
+ }
7376
+ else {
7377
+ this.ulMenuElem = this.parent.createElement('ul', {
7378
+ id: this.parent.element.id + RIBBON_MENU_LIST
7379
+ });
7380
+ this.itemsWrapperEle.appendChild(this.ulMenuElem);
7381
+ }
7382
+ if (!isFooter) {
7383
+ this.menuCtrl = new Menu({
7384
+ orientation: 'Vertical',
7385
+ enableRtl: this.parent.enableRtl,
7386
+ cssClass: RIBBON_BACKSTAGE_MENU,
7387
+ items: this.cloneMenuItem(menuOptions.items),
7388
+ select: this.menuSelect.bind(this, menuOptions)
7389
+ }, this.ulMenuElem);
7390
+ }
7391
+ else {
7392
+ this.footerMenuCtrl = new Menu({
7393
+ orientation: 'Vertical',
7394
+ enableRtl: this.parent.enableRtl,
7395
+ cssClass: RIBBON_BACKSTAGE_MENU,
7396
+ items: this.cloneFooterMenuItem(menuOptions.items),
7397
+ select: this.menuSelect.bind(this, menuOptions)
7398
+ }, ulFooterElem);
7399
+ }
7400
+ }
7401
+ cloneMenuItem(items) {
7402
+ const itemsList = [];
7403
+ for (let i = 0; i < items.length; i++) {
7404
+ const item = items[parseInt(i.toString(), 10)];
7405
+ if (item.isFooter) {
7406
+ continue;
7407
+ }
7408
+ else {
7409
+ itemsList.push({
7410
+ id: item.id,
7411
+ iconCss: item.iconCss,
7412
+ separator: item.separator,
7413
+ text: item.text
7414
+ });
7415
+ }
7416
+ }
7417
+ return itemsList;
7418
+ }
7419
+ cloneFooterMenuItem(items) {
7420
+ const itemsList = [];
7421
+ for (let i = 0; i < items.length; i++) {
7422
+ const item = items[parseInt(i.toString(), 10)];
7423
+ if (!item.isFooter) {
7424
+ continue;
7425
+ }
7426
+ else {
7427
+ itemsList.push({
7428
+ id: item.id,
7429
+ iconCss: item.iconCss,
7430
+ separator: item.separator,
7431
+ text: item.text
7432
+ });
7433
+ }
7434
+ }
7435
+ return itemsList;
7436
+ }
7437
+ createBackStageContent(itemId, content) {
7438
+ const templateName = 'backstageContent';
7439
+ this.clearTemplate([templateName]);
7440
+ if (!this.backstageContentEle) {
7441
+ this.backstageContentEle = this.parent.createElement('div', {
7442
+ id: itemId + CONTENT_ID,
7443
+ className: RIBBON_BACKSTAGE_CONTENT
7444
+ });
7445
+ }
7446
+ else {
7447
+ this.backstageContentEle.innerHTML = '';
7448
+ this.backstageContentEle.id = itemId + CONTENT_ID;
7449
+ }
7450
+ const templateFunction = getTemplateFunction(content);
7451
+ append(templateFunction({}, this, templateName, 'backstageContent', this.parent.isStringTemplate), this.backstageContentEle);
7452
+ if (content) {
7453
+ this.popupHTMLElement.append(this.backstageContentEle);
7454
+ }
7455
+ this.renderReactTemplates();
7456
+ return templateFunction;
7457
+ }
7458
+ createBackStageTemplate(template) {
7459
+ const templateName = 'backstageTemplate';
7460
+ this.clearTemplate([templateName]);
7461
+ this.backstageTempEle = this.parent.createElement('div', {
7462
+ id: this.parent.element.id + RIBBON_BACKSTAGE_MENU_ID + '_template',
7463
+ className: RIBBON_BACKSTAGE_TEMPLATE
7464
+ });
7465
+ const templateFunction = getTemplateFunction(template);
7466
+ append(templateFunction({}, this, templateName, 'backstageTemplate', this.parent.isStringTemplate), this.backstageTempEle);
7467
+ this.popupHTMLElement.append(this.backstageTempEle);
7468
+ this.renderReactTemplates();
7469
+ return templateFunction;
7470
+ }
7471
+ menuSelect(menuOptions, args) {
7472
+ for (let i = 0; i < menuOptions.items.length; i++) {
7473
+ const item = menuOptions.items[parseInt(i.toString(), 10)];
7474
+ if (item.text === args.item.text) {
7475
+ this.contentItem = item;
7476
+ break;
7477
+ }
7478
+ }
7479
+ this.createBackStageContent(args.item.id, this.contentItem.content);
7480
+ const eventArgs = { cancel: false, target: args.element, item: this.contentItem, isBackButton: this.isBackButtonClicked };
7481
+ if (this.contentItem.backStageItemClick) {
7482
+ this.contentItem.backStageItemClick.call(this, eventArgs);
7483
+ }
7484
+ if (eventArgs.cancel) {
7485
+ return;
7486
+ }
7487
+ }
7488
+ /**
7489
+ * setRtl
7490
+ *
7491
+ * @param {commonProperties} commonProp - Get the common property of ribbon.
7492
+ * @returns {void}
7493
+ * @hidden
7494
+ */
7495
+ setCommonProperties(commonProp) {
7496
+ if (this.backstageButton) {
7497
+ this.backstageButton.setProperties(commonProp);
7498
+ if (this.popupEle) {
7499
+ this.popupEle.setProperties(commonProp);
7500
+ if (this.popupHTMLElement)
7501
+ this.updatePopupPositionOnRtl(commonProp.enableRtl);
7502
+ if (this.menuCtrl) {
7503
+ this.menuCtrl.setProperties(commonProp);
7504
+ if (this.closeBtn) {
7505
+ this.closeBtn.setProperties(commonProp);
7506
+ }
7507
+ }
7508
+ }
7509
+ }
7510
+ }
7511
+ /**
7512
+ * Update Backstage menu
7513
+ *
7514
+ * @param {BackStageMenuModel} backStageOptions - Gets the property of backstage menu.
7515
+ * @returns {void}
7516
+ * @hidden
7517
+ */
7518
+ updateBackStageMenu(backStageOptions) {
7519
+ if (backStageOptions.visible) {
7520
+ if (this.backstageButton) {
7521
+ if (backStageOptions.text) {
7522
+ this.backstageButton.setProperties({
7523
+ content: backStageOptions.text
7524
+ });
7525
+ this.parent.tabObj.element.style.setProperty(RIBBON_FILE_MENU_WIDTH, this.backstageButtonEle.offsetWidth + 'px');
7526
+ }
7527
+ if (this.popupEle) {
7528
+ this.popupEle.setProperties({
7529
+ height: backStageOptions.height,
7530
+ width: backStageOptions.width,
7531
+ target: backStageOptions.target || this.parent.element,
7532
+ });
7533
+ }
7534
+ if (backStageOptions.template) {
7535
+ if (this.backstageTempEle) {
7536
+ remove(this.backstageTempEle);
7537
+ this.backstageTempEle = null;
7538
+ }
7539
+ this.createBackStageTemplate(backStageOptions.template);
7540
+ }
7541
+ else {
7542
+ if (this.menuCtrl) {
7543
+ this.menuCtrl.setProperties({
7544
+ items: this.cloneMenuItem(backStageOptions.items)
7545
+ });
7546
+ }
7547
+ if (this.footerMenuCtrl) {
7548
+ this.footerMenuCtrl.setProperties({
7549
+ items: this.cloneFooterMenuItem(backStageOptions.items)
7550
+ });
7551
+ }
7552
+ else {
7553
+ let footerItemCount = 0;
7554
+ let itemCount = 0;
7555
+ for (let i = 0; i < backStageOptions.items.length; i++) {
7556
+ const item = backStageOptions.items[parseInt(i.toString(), 10)];
7557
+ if (item.isFooter) {
7558
+ footerItemCount++;
7559
+ }
7560
+ else {
7561
+ itemCount++;
7562
+ }
7563
+ }
7564
+ if (itemCount > 0) {
7565
+ this.createBackstageMenu(backStageOptions, false);
7566
+ }
7567
+ if (footerItemCount > 0) {
7568
+ this.createBackstageMenu(backStageOptions, true);
7569
+ }
7570
+ }
7571
+ }
7572
+ this.removeBackstageMenuTooltip();
7573
+ this.addBackStageMenuTooltip(backStageOptions);
7574
+ }
7575
+ else {
7576
+ this.createBackStage(backStageOptions);
7577
+ }
7578
+ }
7579
+ else if (this.backstageButton) {
7580
+ this.destroyDDB();
7581
+ }
7582
+ this.parent.tabObj.refreshActiveTabBorder();
7583
+ }
7584
+ destroyMenu() {
7585
+ if (this.menuCtrl) {
7586
+ this.menuCtrl.destroy();
7587
+ this.menuCtrl = null;
7588
+ }
7589
+ }
7590
+ destroyDDB() {
7591
+ this.removeBackstageMenuTooltip();
7592
+ const tabEle = this.parent.tabObj.element;
7593
+ tabEle.style.removeProperty(RIBBON_FILE_MENU_WIDTH);
7594
+ this.destroyMenu();
7595
+ this.backstageButton.destroy();
7596
+ this.backstageButton = null;
7597
+ remove(this.backstageButtonEle);
7598
+ this.backstageButtonEle = null;
7599
+ EventHandler.remove(document, 'click', this.onClickEvent);
7600
+ }
7601
+ removeBackstageMenuTooltip() {
7602
+ const index = getIndex(this.parent.tooltipData, (e) => { return e.id === this.backstageButtonEle.id; });
7603
+ if (index !== -1) {
7604
+ this.backstageButtonEle.classList.remove(RIBBON_TOOLTIP_TARGET);
7605
+ this.parent.tooltipData.splice(index, 1);
7606
+ }
7607
+ }
7608
+ /**
7609
+ * Add items to Backstage Menu.
7610
+ *
7611
+ * @param {BackstageItemModel[]} items - Gets the items to be added.
7612
+ * @param {string} target - Gets the target item to add the items.
7613
+ * @param {boolean} isAfter - Gets the boolean value to add the items after or before the target item.
7614
+ * @param {boolean} isUniqueId - Gets whether the target provided is uniqueId or not.
7615
+ * @returns {void}
7616
+ */
7617
+ addBackstageItems(items, target, isAfter, isUniqueId) {
7618
+ for (let i = 0; i < items.length; i++) {
7619
+ const item = items[parseInt(i.toString(), 10)];
7620
+ if (item.isFooter) {
7621
+ isAfter ? this.footerMenuCtrl.insertAfter(items, target, isUniqueId) : this.footerMenuCtrl.insertBefore(items, target, isUniqueId);
7622
+ }
7623
+ else {
7624
+ isAfter ? this.menuCtrl.insertAfter(items, target, isUniqueId) : this.menuCtrl.insertBefore(items, target, isUniqueId);
7625
+ }
7626
+ }
7627
+ const backstageItems = [].concat(this.menuCtrl.items, this.footerMenuCtrl.items);
7628
+ const backStageOptions = this.parent.backStageMenu;
7629
+ for (let i = 0; i < backStageOptions.items.length; i++) {
7630
+ const item = backStageOptions.items[parseInt(i.toString(), 10)];
7631
+ for (let i = 0; i < backstageItems.length; i++) {
7632
+ const item1 = backstageItems[parseInt(i.toString(), 10)];
7633
+ if (item.text === item1.text) {
7634
+ item1.content = item.content;
7635
+ break;
7636
+ }
7637
+ }
7638
+ }
7639
+ this.parent.backStageMenu.setProperties({ items: backstageItems }, true);
7640
+ }
7641
+ /**
7642
+ * Remove items from Backstage Menu.
7643
+ *
7644
+ * @param {string[]} items - Gets the items to be removed.
7645
+ * @param {boolean} isUniqueId - Gets whether the target provided is uniqueId or not.
7646
+ * @returns {void}
7647
+ */
7648
+ removeBackstageItems(items, isUniqueId) {
7649
+ this.menuCtrl.removeItems(items, isUniqueId);
7650
+ this.footerMenuCtrl.removeItems(items, isUniqueId);
7651
+ const backstageItems = [].concat(this.menuCtrl.items, this.footerMenuCtrl.items);
7652
+ this.parent.backStageMenu.setProperties({ items: backstageItems }, true);
7653
+ }
7654
+ /**
7655
+ * Renders the backstage dynamically.
7656
+ *
7657
+ * @returns {void}
7658
+ */
7659
+ showBackstage() {
7660
+ this.popupEle.show();
7661
+ }
7662
+ /**
7663
+ * Hides the backstage dynamically.
7664
+ *
7665
+ * @returns {void}
7666
+ */
7667
+ hideBackstage() {
7668
+ if (this.popupEle.element.classList.contains(RIBBON_BACKSTAGE_OPEN)) {
7669
+ this.popupEle.element.classList.remove(RIBBON_BACKSTAGE_OPEN);
7670
+ }
7671
+ this.popupEle.hide();
7672
+ }
7673
+ }
7674
+
6128
7675
  /**
6129
7676
  * Ribbon modules
6130
7677
  */
@@ -6132,5 +7679,5 @@ class RibbonFileMenu {
6132
7679
  // export all modules from current location
6133
7680
  // example: export * from './module'
6134
7681
 
6135
- export { Ribbon, RibbonLayout, ItemOrientation, RibbonItemSize, DisplayMode, RibbonItemType, ITEM_VERTICAL_CENTER, EXPAND_COLLAPSE_ICON, OVERFLOW_ICON, VERTICAL_DDB, DISABLED_CSS, RTL_CSS, RIBBON_HOVER, RIBBON_CONTROL, RIBBON_POPUP_CONTROL, RIBBON_POPUP_OPEN, SPACE, HORIZONTAL_SCROLLBAR, HIDE_CSS, RIBBON_TAB, RIBBON_TAB_ACTIVE, RIBBON_TAB_ITEM, RIBBON_COLLAPSE_BUTTON, RIBBON_EXPAND_BUTTON, RIBBON_COLLAPSIBLE, RIBBON_OVERALL_OF_BUTTON, RIBBON_GROUP_OF_BUTTON, RIBBON_OVERFLOW_TARGET, RIBBON_OVERFLOW, TAB_CONTENT, RIBBON_MINIMIZE, RIBBON_GROUP, RIBBON_GROUP_CONTAINER, RIBBON_OF_TAB_CONTAINER, RIBBON_OF_GROUP_CONTAINER, RIBBON_GROUP_CONTENT, RIBBON_GROUP_HEADER, RIBBON_OVERFLOW_HEADER, RIBBON_GROUP_OVERFLOW, RIBBON_GROUP_OVERFLOW_DDB, RIBBON_LAUNCHER, RIBBON_LAUNCHER_ICON_ELE, RIBBON_LAUNCHER_ICON, RIBBON_COLLECTION, RIBBON_ITEM, RIBBON_ROW, RIBBON_COLUMN, RIBBON_LARGE_ITEM, RIBBON_MEDIUM_ITEM, RIBBON_SMALL_ITEM, RIBBON_CONTENT_HEIGHT, DROPDOWNBUTTON, DROPDOWNBUTTON_HIDE, RIBBON_TEMPLATE, RIBBON_HELP_TEMPLATE, RIBBON_TOOLTIP, RIBBON_TOOLTIP_TARGET, RIBBON_TOOLTIP_TITLE, RIBBON_TOOLTIP_CONTENT, RIBBON_TOOLTIP_ICON, RIBBON_TOOLTIP_CONTAINER, RIBBON_TEXT_CONTAINER, RIBBON_SIMPLIFIED_MODE, TAB_ID, GROUP_ID, COLLECTION_ID, ITEM_ID, COLLAPSE_BUTTON_ID, OVRLOF_BUTTON_ID, GROUPOF_BUTTON_ID, HEADER_ID, LAUNCHER_ID, CONTENT_ID, CONTAINER_ID, OVERFLOW_ID, DROPDOWN_ID, RIBBON_FILE_MENU_ID, RIBBON_FILE_MENU_LIST, RIBBON_HELP_PANE_TEMPLATE_ID, RIBBON_FILE_MENU_WIDTH, RIBBON_HELP_PANE_TEMPLATE_WIDTH, getIndex, getTemplateFunction, getItem, getCollection, getGroup, destroyControl, updateCommonProperty, updateControlDisabled, getItemElement, isTooltipPresent, setToolTipContent, createTooltip, destroyTooltip, updateTooltipProp, RibbonTab, RibbonGroup, RibbonCollection, RibbonItem, RibbonButtonSettings, RibbonCheckBoxSettings, RibbonColorPickerSettings, RibbonComboBoxSettings, RibbonDropDownSettings, RibbonSplitButtonSettings, FileMenuSettings, RibbonTooltip, RibbonButton, RibbonCheckBox, RibbonColorPicker, RibbonComboBox, RibbonDropDown, RibbonSplitButton, RibbonFileMenu };
7682
+ export { Ribbon, RibbonLayout, ItemOrientation, RibbonItemSize, DisplayMode, RibbonItemType, RibbonGroupButtonSelection, ITEM_VERTICAL_CENTER, EXPAND_COLLAPSE_ICON, BACKSTAGE_CLOSE_ICON, OVERFLOW_ICON, VERTICAL_DDB, DISABLED_CSS, RTL_CSS, RIBBON_HOVER, RIBBON_CONTROL, RIBBON_POPUP_CONTROL, RIBBON_POPUP_OPEN, SPACE, HORIZONTAL_SCROLLBAR, HIDE_CSS, RIBBON_TAB, RIBBON_TAB_ACTIVE, RIBBON_TAB_ITEM, RIBBON_COLLAPSE_BUTTON, RIBBON_EXPAND_BUTTON, RIBBON_COLLAPSIBLE, RIBBON_OVERALL_OF_BUTTON, RIBBON_GROUP_OF_BUTTON, RIBBON_OVERFLOW_TARGET, RIBBON_OVERFLOW, TAB_CONTENT, RIBBON_MINIMIZE, RIBBON_GROUP, RIBBON_SINGLE_BUTTON_SELECTION, RIBBON_MULTIPLE_BUTTON_SELECTION, RIBBON_GROUP_BUTTON, RIBBON_GROUP_BUTTON_OVERFLOW_POPUP, RIBBON_GROUP_CONTAINER, RIBBON_OF_TAB_CONTAINER, RIBBON_OF_GROUP_CONTAINER, RIBBON_GROUP_CONTENT, RIBBON_GROUP_HEADER, RIBBON_OVERFLOW_HEADER, RIBBON_GROUP_OVERFLOW, RIBBON_GROUP_OVERFLOW_DDB, RIBBON_LAUNCHER, RIBBON_LAUNCHER_ICON_ELE, RIBBON_LAUNCHER_ICON, RIBBON_COLLECTION, RIBBON_ITEM, RIBBON_ROW, RIBBON_COLUMN, RIBBON_LARGE_ITEM, RIBBON_MEDIUM_ITEM, RIBBON_SMALL_ITEM, RIBBON_CONTENT_HEIGHT, DROPDOWNBUTTON, DROPDOWNBUTTON_HIDE, RIBBON_TEMPLATE, RIBBON_HELP_TEMPLATE, RIBBON_TOOLTIP, RIBBON_TOOLTIP_TARGET, RIBBON_TOOLTIP_TITLE, RIBBON_TOOLTIP_CONTENT, RIBBON_TOOLTIP_ICON, RIBBON_TOOLTIP_CONTAINER, RIBBON_TEXT_CONTAINER, RIBBON_SIMPLIFIED_MODE, RIBBON_BACKSTAGE_POPUP, RIBBON_BACKSTAGE_OPEN, RIBBON_BACKSTAGE_CONTENT, RIBBON_SELECTED_CONTENT, RIBBON_BACKSTAGE, RIBBON_BACKSTAGE_MENU, RIBBON_BACKSTAGE_TEMPLATE, RIBBON_BACKSTAGE_MENU_WRAPPER, RIBBON_BACKSTAGE_ITEMS_WRAPPER, RIBBON_BACKSTAGE_TEXT_MENU, TAB_ID, GROUP_ID, COLLECTION_ID, ITEM_ID, COLLAPSE_BUTTON_ID, OVRLOF_BUTTON_ID, GROUPOF_BUTTON_ID, HEADER_ID, LAUNCHER_ID, CONTENT_ID, CONTAINER_ID, OVERFLOW_ID, DROPDOWN_ID, RIBBON_FILE_MENU_ID, RIBBON_BACKSTAGE_MENU_ID, RIBBON_BACKSTAGE_POPUP_ID, RIBBON_FILE_MENU_LIST, RIBBON_MENU_LIST, RIBBON_FOOTER_MENU_LIST, RIBBON_HELP_PANE_TEMPLATE_ID, RIBBON_GROUP_BUTTON_ID, RIBBON_FILE_MENU_WIDTH, RIBBON_HELP_PANE_TEMPLATE_WIDTH, getIndex, getTemplateFunction, getItem, getCollection, getGroup, destroyControl, updateCommonProperty, updateControlDisabled, getItemElement, isTooltipPresent, setToolTipContent, createTooltip, destroyTooltip, updateTooltipProp, RibbonTab, RibbonGroup, RibbonCollection, RibbonItem, RibbonButtonSettings, RibbonCheckBoxSettings, RibbonColorPickerSettings, RibbonComboBoxSettings, RibbonDropDownSettings, RibbonSplitButtonSettings, FileMenuSettings, BackStageMenu, BackstageBackButton, BackstageItem, RibbonTooltip, RibbonGroupButtonSettings, RibbonGroupButtonItem, RibbonButton, RibbonCheckBox, RibbonColorPicker, RibbonComboBox, RibbonDropDown, RibbonSplitButton, RibbonGroupButton, RibbonFileMenu, RibbonBackstage };
6136
7683
  //# sourceMappingURL=ej2-ribbon.es2015.js.map