@syncfusion/ej2-ribbon 24.2.8 → 25.1.41

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 (125) hide show
  1. package/CHANGELOG.md +8 -4
  2. package/README.md +3 -0
  3. package/dist/ej2-ribbon.umd.min.js +2 -2
  4. package/dist/ej2-ribbon.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-ribbon.es2015.js +2164 -217
  6. package/dist/es6/ej2-ribbon.es2015.js.map +1 -1
  7. package/dist/es6/ej2-ribbon.es5.js +2293 -226
  8. package/dist/es6/ej2-ribbon.es5.js.map +1 -1
  9. package/dist/global/ej2-ribbon.min.js +2 -2
  10. package/dist/global/ej2-ribbon.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +13 -13
  13. package/src/global.js +1 -1
  14. package/src/ribbon/base/constant.d.ts +8 -0
  15. package/src/ribbon/base/constant.js +8 -0
  16. package/src/ribbon/base/interface.d.ts +114 -1
  17. package/src/ribbon/base/interface.js +4 -0
  18. package/src/ribbon/base/ribbon-model.d.ts +22 -1
  19. package/src/ribbon/base/ribbon.d.ts +70 -5
  20. package/src/ribbon/base/ribbon.js +571 -157
  21. package/src/ribbon/base/utils.d.ts +3 -2
  22. package/src/ribbon/base/utils.js +3 -2
  23. package/src/ribbon/items/index.d.ts +1 -0
  24. package/src/ribbon/items/index.js +1 -0
  25. package/src/ribbon/items/ribbon-colorpicker.js +6 -1
  26. package/src/ribbon/items/ribbon-gallery.d.ts +87 -0
  27. package/src/ribbon/items/ribbon-gallery.js +712 -0
  28. package/src/ribbon/items/ribbon-groupbutton.js +3 -0
  29. package/src/ribbon/models/index.d.ts +8 -0
  30. package/src/ribbon/models/index.js +4 -0
  31. package/src/ribbon/models/ribbon-back-stage-settings-model.d.ts +7 -0
  32. package/src/ribbon/models/ribbon-back-stage-settings.d.ts +6 -0
  33. package/src/ribbon/models/ribbon-back-stage-settings.js +3 -0
  34. package/src/ribbon/models/ribbon-backstage-item-model.d.ts +7 -0
  35. package/src/ribbon/models/ribbon-backstage-item.d.ts +6 -0
  36. package/src/ribbon/models/ribbon-backstage-item.js +3 -0
  37. package/src/ribbon/models/ribbon-contextual-tab-settings-model.d.ts +30 -0
  38. package/src/ribbon/models/ribbon-contextual-tab-settings.d.ts +33 -0
  39. package/src/ribbon/models/ribbon-contextual-tab-settings.js +50 -0
  40. package/src/ribbon/models/ribbon-file-menu-settings-model.d.ts +7 -0
  41. package/src/ribbon/models/ribbon-file-menu-settings.d.ts +6 -0
  42. package/src/ribbon/models/ribbon-file-menu-settings.js +3 -0
  43. package/src/ribbon/models/ribbon-gallery-group-model.d.ts +44 -0
  44. package/src/ribbon/models/ribbon-gallery-group.d.ts +38 -0
  45. package/src/ribbon/models/ribbon-gallery-group.js +47 -0
  46. package/src/ribbon/models/ribbon-gallery-item-model.d.ts +43 -0
  47. package/src/ribbon/models/ribbon-gallery-item.d.ts +38 -0
  48. package/src/ribbon/models/ribbon-gallery-item.js +46 -0
  49. package/src/ribbon/models/ribbon-gallery-settings-model.d.ts +108 -0
  50. package/src/ribbon/models/ribbon-gallery-settings.d.ts +95 -0
  51. package/src/ribbon/models/ribbon-gallery-settings.js +71 -0
  52. package/src/ribbon/models/ribbon-group-button-item-model.d.ts +7 -0
  53. package/src/ribbon/models/ribbon-group-button-item.d.ts +6 -0
  54. package/src/ribbon/models/ribbon-group-button-item.js +3 -0
  55. package/src/ribbon/models/ribbon-group-model.d.ts +14 -0
  56. package/src/ribbon/models/ribbon-group.d.ts +12 -0
  57. package/src/ribbon/models/ribbon-group.js +6 -0
  58. package/src/ribbon/models/ribbon-item-model.d.ts +15 -1
  59. package/src/ribbon/models/ribbon-item.d.ts +13 -0
  60. package/src/ribbon/models/ribbon-item.js +7 -0
  61. package/src/ribbon/models/ribbon-tab-model.d.ts +7 -0
  62. package/src/ribbon/models/ribbon-tab.d.ts +6 -0
  63. package/src/ribbon/models/ribbon-tab.js +3 -0
  64. package/src/ribbon/modules/index.d.ts +2 -0
  65. package/src/ribbon/modules/index.js +2 -0
  66. package/src/ribbon/modules/ribbon-backstage.d.ts +2 -0
  67. package/src/ribbon/modules/ribbon-backstage.js +37 -0
  68. package/src/ribbon/modules/ribbon-contextualtab.d.ts +27 -0
  69. package/src/ribbon/modules/ribbon-contextualtab.js +90 -0
  70. package/src/ribbon/modules/ribbon-filemenu.d.ts +2 -0
  71. package/src/ribbon/modules/ribbon-filemenu.js +19 -0
  72. package/src/ribbon/modules/ribbon-keytip.d.ts +54 -0
  73. package/src/ribbon/modules/ribbon-keytip.js +554 -0
  74. package/styles/bootstrap-dark.css +398 -24
  75. package/styles/bootstrap.css +389 -15
  76. package/styles/bootstrap4.css +398 -24
  77. package/styles/bootstrap5-dark.css +391 -17
  78. package/styles/bootstrap5.css +391 -17
  79. package/styles/fabric-dark.css +388 -14
  80. package/styles/fabric.css +387 -13
  81. package/styles/fluent-dark.css +389 -15
  82. package/styles/fluent.css +389 -15
  83. package/styles/highcontrast-light.css +381 -7
  84. package/styles/highcontrast.css +390 -16
  85. package/styles/material-dark.css +391 -17
  86. package/styles/material.css +391 -17
  87. package/styles/material3-dark.css +389 -15
  88. package/styles/material3.css +389 -15
  89. package/styles/ribbon/_bds-definition.scss +360 -0
  90. package/styles/ribbon/_bootstrap-dark-definition.scss +81 -6
  91. package/styles/ribbon/_bootstrap-definition.scss +81 -6
  92. package/styles/ribbon/_bootstrap4-definition.scss +82 -7
  93. package/styles/ribbon/_bootstrap5-definition.scss +81 -6
  94. package/styles/ribbon/_fabric-dark-definition.scss +78 -3
  95. package/styles/ribbon/_fabric-definition.scss +78 -3
  96. package/styles/ribbon/_fluent-definition.scss +80 -5
  97. package/styles/ribbon/_fusionnew-definition.scss +76 -1
  98. package/styles/ribbon/_highcontrast-definition.scss +80 -5
  99. package/styles/ribbon/_highcontrast-light-definition.scss +76 -1
  100. package/styles/ribbon/_layout.scss +344 -38
  101. package/styles/ribbon/_material-dark-definition.scss +80 -5
  102. package/styles/ribbon/_material-definition.scss +81 -6
  103. package/styles/ribbon/_material3-definition.scss +80 -5
  104. package/styles/ribbon/_tailwind-definition.scss +80 -5
  105. package/styles/ribbon/_theme.scss +71 -0
  106. package/styles/ribbon/bootstrap-dark.css +398 -24
  107. package/styles/ribbon/bootstrap.css +389 -15
  108. package/styles/ribbon/bootstrap4.css +398 -24
  109. package/styles/ribbon/bootstrap5-dark.css +391 -17
  110. package/styles/ribbon/bootstrap5.css +391 -17
  111. package/styles/ribbon/fabric-dark.css +388 -14
  112. package/styles/ribbon/fabric.css +387 -13
  113. package/styles/ribbon/fluent-dark.css +389 -15
  114. package/styles/ribbon/fluent.css +389 -15
  115. package/styles/ribbon/highcontrast-light.css +381 -7
  116. package/styles/ribbon/highcontrast.css +390 -16
  117. package/styles/ribbon/icons/_bds.scss +9 -0
  118. package/styles/ribbon/material-dark.css +391 -17
  119. package/styles/ribbon/material.css +391 -17
  120. package/styles/ribbon/material3-dark.css +389 -15
  121. package/styles/ribbon/material3.css +389 -15
  122. package/styles/ribbon/tailwind-dark.css +390 -16
  123. package/styles/ribbon/tailwind.css +390 -16
  124. package/styles/tailwind-dark.css +390 -16
  125. package/styles/tailwind.css +390 -16
@@ -0,0 +1,95 @@
1
+ import { ChildProperty, EmitType } from "@syncfusion/ej2-base";
2
+ import { RibbonGalleryGroupModel } from "./ribbon-gallery-group-model";
3
+ import { GalleryHoverEventArgs, GalleryItemEventArgs, GalleryPopupEventArgs, GallerySelectEventArgs, GalleryBeforeSelectEventArgs } from "../base/interface";
4
+ /**
5
+ * Defines the ribbon gallery settings.
6
+ */
7
+ export declare class RibbonGallerySettings extends ChildProperty<RibbonGallerySettings> {
8
+ /**
9
+ * Defines the properties for collection of gallery items in the Ribbon.
10
+ *
11
+ * @default []
12
+ * @aspType List<RibbonGalleryGroup>
13
+ */
14
+ groups: RibbonGalleryGroupModel[];
15
+ /**
16
+ * Defines the number of items to be displayed in the Ribbon Gallery.
17
+ *
18
+ * @default 3
19
+ */
20
+ itemCount: number;
21
+ /**
22
+ * Defines the index of current selected gallery item.
23
+ *
24
+ * @default null
25
+ */
26
+ selectedItemIndex: number;
27
+ /**
28
+ * Defines the height of the ribbon gallery popup.
29
+ *
30
+ * @default 'auto'
31
+ */
32
+ popupHeight: string;
33
+ /**
34
+ * Defines the width of the ribbon gallery popup.
35
+ *
36
+ * @default 'auto'
37
+ */
38
+ popupWidth: string;
39
+ /**
40
+ * Defines the template for gallery items contents. The current gallery item model passed as context to build the content.
41
+ *
42
+ * @default ''
43
+ * @angularType string | object
44
+ * @reactType string | function | JSX.Element
45
+ * @vueType string | function
46
+ * @aspType string
47
+ */
48
+ template: string | Function;
49
+ /**
50
+ * Defines the template for gallery items in popup. The current gallery item model passed as context to build the content.
51
+ *
52
+ * @default ''
53
+ * @angularType string | object
54
+ * @reactType string | function | JSX.Element
55
+ * @vueType string | function
56
+ * @aspType string
57
+ */
58
+ popupTemplate: string | Function;
59
+ /**
60
+ * Event triggers when the gallery popup opens.
61
+ *
62
+ * @event popupOpen
63
+ */
64
+ popupOpen: EmitType<GalleryPopupEventArgs>;
65
+ /**
66
+ * Event triggers when the gallery popup closes.
67
+ *
68
+ * @event popupClose
69
+ */
70
+ popupClose: EmitType<GalleryPopupEventArgs>;
71
+ /**
72
+ * Event triggers when a user hovers over a gallery item.
73
+ *
74
+ * @event itemHover
75
+ */
76
+ itemHover: EmitType<GalleryHoverEventArgs>;
77
+ /**
78
+ * Event triggers before rendering each gallery item.
79
+ *
80
+ * @event beforeItemRender
81
+ */
82
+ beforeItemRender: EmitType<GalleryItemEventArgs>;
83
+ /**
84
+ * Event triggers before the gallery items selects.
85
+ *
86
+ * @event beforeSelect
87
+ */
88
+ beforeSelect: EmitType<GalleryBeforeSelectEventArgs>;
89
+ /**
90
+ * Event triggers when the gallery items selects.
91
+ *
92
+ * @event select
93
+ */
94
+ select: EmitType<GallerySelectEventArgs>;
95
+ }
@@ -0,0 +1,71 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ extendStatics(d, b);
10
+ function __() { this.constructor = d; }
11
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
+ };
13
+ })();
14
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
15
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17
+ 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;
18
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
19
+ };
20
+ import { ChildProperty, Collection, Property, Event } from "@syncfusion/ej2-base";
21
+ import { RibbonGalleryGroup } from "./ribbon-gallery-group";
22
+ /**
23
+ * Defines the ribbon gallery settings.
24
+ */
25
+ var RibbonGallerySettings = /** @class */ (function (_super) {
26
+ __extends(RibbonGallerySettings, _super);
27
+ function RibbonGallerySettings() {
28
+ return _super !== null && _super.apply(this, arguments) || this;
29
+ }
30
+ __decorate([
31
+ Collection([], RibbonGalleryGroup)
32
+ ], RibbonGallerySettings.prototype, "groups", void 0);
33
+ __decorate([
34
+ Property(3)
35
+ ], RibbonGallerySettings.prototype, "itemCount", void 0);
36
+ __decorate([
37
+ Property(null)
38
+ ], RibbonGallerySettings.prototype, "selectedItemIndex", void 0);
39
+ __decorate([
40
+ Property('auto')
41
+ ], RibbonGallerySettings.prototype, "popupHeight", void 0);
42
+ __decorate([
43
+ Property('auto')
44
+ ], RibbonGallerySettings.prototype, "popupWidth", void 0);
45
+ __decorate([
46
+ Property('')
47
+ ], RibbonGallerySettings.prototype, "template", void 0);
48
+ __decorate([
49
+ Property('')
50
+ ], RibbonGallerySettings.prototype, "popupTemplate", void 0);
51
+ __decorate([
52
+ Event()
53
+ ], RibbonGallerySettings.prototype, "popupOpen", void 0);
54
+ __decorate([
55
+ Event()
56
+ ], RibbonGallerySettings.prototype, "popupClose", void 0);
57
+ __decorate([
58
+ Event()
59
+ ], RibbonGallerySettings.prototype, "itemHover", void 0);
60
+ __decorate([
61
+ Event()
62
+ ], RibbonGallerySettings.prototype, "beforeItemRender", void 0);
63
+ __decorate([
64
+ Event()
65
+ ], RibbonGallerySettings.prototype, "beforeSelect", void 0);
66
+ __decorate([
67
+ Event()
68
+ ], RibbonGallerySettings.prototype, "select", void 0);
69
+ return RibbonGallerySettings;
70
+ }(ChildProperty));
71
+ export { RibbonGallerySettings };
@@ -19,6 +19,13 @@ export interface RibbonGroupButtonItemModel {
19
19
  */
20
20
  iconCss?: string;
21
21
 
22
+ /**
23
+ * Specifies the keytip content.
24
+ *
25
+ * @default ''
26
+ */
27
+ keyTip?: string;
28
+
22
29
  /**
23
30
  * Specifies the tooltip settings for the group button items.
24
31
  *
@@ -17,6 +17,12 @@ export declare class RibbonGroupButtonItem extends ChildProperty<RibbonGroupButt
17
17
  * @default ''
18
18
  */
19
19
  iconCss: string;
20
+ /**
21
+ * Specifies the keytip content.
22
+ *
23
+ * @default ''
24
+ */
25
+ keyTip: string;
20
26
  /**
21
27
  * Specifies the tooltip settings for the group button items.
22
28
  *
@@ -42,6 +42,9 @@ var RibbonGroupButtonItem = /** @class */ (function (_super) {
42
42
  __decorate([
43
43
  Property('')
44
44
  ], RibbonGroupButtonItem.prototype, "iconCss", void 0);
45
+ __decorate([
46
+ Property('')
47
+ ], RibbonGroupButtonItem.prototype, "keyTip", void 0);
45
48
  __decorate([
46
49
  Complex({}, RibbonTooltip)
47
50
  ], RibbonGroupButtonItem.prototype, "ribbonTooltipSettings", void 0);
@@ -5,6 +5,20 @@ import { ChildProperty, Collection, Property } from '@syncfusion/ej2-base';impor
5
5
  */
6
6
  export interface RibbonGroupModel {
7
7
 
8
+ /**
9
+ * Specifies the keytip content.
10
+ *
11
+ * @default ''
12
+ */
13
+ keyTip?: string;
14
+
15
+ /**
16
+ * Specifies the keytip content for launcher icon.
17
+ *
18
+ * @default ''
19
+ */
20
+ launcherIconKeyTip?: string;
21
+
8
22
  /**
9
23
  * Defines the list of ribbon collections.
10
24
  *
@@ -5,6 +5,18 @@ import { ItemOrientation } from '../base/interface';
5
5
  * Defines the ribbon group.
6
6
  */
7
7
  export declare class RibbonGroup extends ChildProperty<RibbonGroup> {
8
+ /**
9
+ * Specifies the keytip content.
10
+ *
11
+ * @default ''
12
+ */
13
+ keyTip: string;
14
+ /**
15
+ * Specifies the keytip content for launcher icon.
16
+ *
17
+ * @default ''
18
+ */
19
+ launcherIconKeyTip: string;
8
20
  /**
9
21
  * Defines the list of ribbon collections.
10
22
  *
@@ -36,6 +36,12 @@ var RibbonGroup = /** @class */ (function (_super) {
36
36
  RibbonGroup.prototype.setProperties = function (prop, muteOnChange) {
37
37
  _super.prototype.setProperties.call(this, prop, muteOnChange);
38
38
  };
39
+ __decorate([
40
+ Property('')
41
+ ], RibbonGroup.prototype, "keyTip", void 0);
42
+ __decorate([
43
+ Property('')
44
+ ], RibbonGroup.prototype, "launcherIconKeyTip", void 0);
39
45
  __decorate([
40
46
  Collection([], RibbonCollection)
41
47
  ], RibbonGroup.prototype, "collections", void 0);
@@ -1,10 +1,17 @@
1
- import { ChildProperty, Complex, Property } from '@syncfusion/ej2-base';import { RibbonItemType, RibbonItemSize, DisplayMode } from '../base/interface';import { RibbonButtonSettings } from './ribbon-button-settings';import { RibbonButtonSettingsModel } from './ribbon-button-settings-model';import { RibbonCheckBoxSettings } from './ribbon-checkbox-settings';import { RibbonCheckBoxSettingsModel } from './ribbon-checkbox-settings-model';import { RibbonColorPickerSettings } from './ribbon-colorpicker-settings';import { RibbonColorPickerSettingsModel } from './ribbon-colorpicker-settings-model';import { RibbonComboBoxSettings } from './ribbon-combobox-settings';import { RibbonComboBoxSettingsModel } from './ribbon-combobox-settings-model';import { RibbonDropDownSettings } from './ribbon-dropdown-settings';import { RibbonDropDownSettingsModel } from './ribbon-dropdown-settings-model';import { RibbonSplitButtonSettings } from './ribbon-splitbutton-settings';import { RibbonSplitButtonSettingsModel } from './ribbon-splitbutton-settings-model';import { RibbonTooltip } from './ribbon-tooltip';import { RibbonTooltipModel } from './ribbon-tooltip-model';import { RibbonGroupButtonSettingsModel } from './ribbon-group-button-settings-model';import { RibbonGroupButtonSettings } from './ribbon-group-button-settings';
1
+ import { ChildProperty, Complex, Property } from '@syncfusion/ej2-base';import { RibbonItemType, RibbonItemSize, DisplayMode } from '../base/interface';import { RibbonButtonSettings } from './ribbon-button-settings';import { RibbonButtonSettingsModel } from './ribbon-button-settings-model';import { RibbonCheckBoxSettings } from './ribbon-checkbox-settings';import { RibbonCheckBoxSettingsModel } from './ribbon-checkbox-settings-model';import { RibbonColorPickerSettings } from './ribbon-colorpicker-settings';import { RibbonColorPickerSettingsModel } from './ribbon-colorpicker-settings-model';import { RibbonComboBoxSettings } from './ribbon-combobox-settings';import { RibbonComboBoxSettingsModel } from './ribbon-combobox-settings-model';import { RibbonDropDownSettings } from './ribbon-dropdown-settings';import { RibbonDropDownSettingsModel } from './ribbon-dropdown-settings-model';import { RibbonSplitButtonSettings } from './ribbon-splitbutton-settings';import { RibbonSplitButtonSettingsModel } from './ribbon-splitbutton-settings-model';import { RibbonTooltip } from './ribbon-tooltip';import { RibbonTooltipModel } from './ribbon-tooltip-model';import { RibbonGroupButtonSettingsModel } from './ribbon-group-button-settings-model';import { RibbonGroupButtonSettings } from './ribbon-group-button-settings';import { RibbonGallerySettingsModel } from './ribbon-gallery-settings-model';import { RibbonGallerySettings } from './ribbon-gallery-settings';
2
2
 
3
3
  /**
4
4
  * Interface for a class RibbonItem
5
5
  */
6
6
  export interface RibbonItemModel {
7
7
 
8
+ /**
9
+ * Defines the key tip text to be accessed for specified Ribbon item.
10
+ *
11
+ * @default ''
12
+ */
13
+ keyTip?: string;
14
+
8
15
  /**
9
16
  * Defines the active size of the ribbon item.
10
17
  *
@@ -127,4 +134,11 @@ export interface RibbonItemModel {
127
134
  */
128
135
  groupButtonSettings?: RibbonGroupButtonSettingsModel;
129
136
 
137
+ /**
138
+ * Defines the properties of the gallery view in Ribbon.
139
+ *
140
+ * @default {}
141
+ */
142
+ gallerySettings?: RibbonGallerySettingsModel;
143
+
130
144
  }
@@ -8,10 +8,17 @@ import { RibbonDropDownSettingsModel } from './ribbon-dropdown-settings-model';
8
8
  import { RibbonSplitButtonSettingsModel } from './ribbon-splitbutton-settings-model';
9
9
  import { RibbonTooltipModel } from './ribbon-tooltip-model';
10
10
  import { RibbonGroupButtonSettingsModel } from './ribbon-group-button-settings-model';
11
+ import { RibbonGallerySettingsModel } from './ribbon-gallery-settings-model';
11
12
  /**
12
13
  * Defines the ribbon item.
13
14
  */
14
15
  export declare class RibbonItem extends ChildProperty<RibbonItem> {
16
+ /**
17
+ * Defines the key tip text to be accessed for specified Ribbon item.
18
+ *
19
+ * @default ''
20
+ */
21
+ keyTip: string;
15
22
  /**
16
23
  * Defines the active size of the ribbon item.
17
24
  *
@@ -118,6 +125,12 @@ export declare class RibbonItem extends ChildProperty<RibbonItem> {
118
125
  * @default {}
119
126
  */
120
127
  groupButtonSettings: RibbonGroupButtonSettingsModel;
128
+ /**
129
+ * Defines the properties of the gallery view in Ribbon.
130
+ *
131
+ * @default {}
132
+ */
133
+ gallerySettings: RibbonGallerySettingsModel;
121
134
  /**
122
135
  * @param {Object} prop - Gets the property of item.
123
136
  * @param {boolean} muteOnChange - Gets the boolean value of muteOnChange.
@@ -27,6 +27,7 @@ import { RibbonDropDownSettings } from './ribbon-dropdown-settings';
27
27
  import { RibbonSplitButtonSettings } from './ribbon-splitbutton-settings';
28
28
  import { RibbonTooltip } from './ribbon-tooltip';
29
29
  import { RibbonGroupButtonSettings } from './ribbon-group-button-settings';
30
+ import { RibbonGallerySettings } from './ribbon-gallery-settings';
30
31
  /**
31
32
  * Defines the ribbon item.
32
33
  */
@@ -44,6 +45,9 @@ var RibbonItem = /** @class */ (function (_super) {
44
45
  RibbonItem.prototype.setProperties = function (prop, muteOnChange) {
45
46
  _super.prototype.setProperties.call(this, prop, muteOnChange);
46
47
  };
48
+ __decorate([
49
+ Property('')
50
+ ], RibbonItem.prototype, "keyTip", void 0);
47
51
  __decorate([
48
52
  Property(RibbonItemSize.Medium)
49
53
  ], RibbonItem.prototype, "activeSize", void 0);
@@ -92,6 +96,9 @@ var RibbonItem = /** @class */ (function (_super) {
92
96
  __decorate([
93
97
  Complex({}, RibbonGroupButtonSettings)
94
98
  ], RibbonItem.prototype, "groupButtonSettings", void 0);
99
+ __decorate([
100
+ Complex({}, RibbonGallerySettings)
101
+ ], RibbonItem.prototype, "gallerySettings", void 0);
95
102
  return RibbonItem;
96
103
  }(ChildProperty));
97
104
  export { RibbonItem };
@@ -5,6 +5,13 @@ import { ChildProperty, Collection, Property } from '@syncfusion/ej2-base';impor
5
5
  */
6
6
  export interface RibbonTabModel {
7
7
 
8
+ /**
9
+ * Specifies the keytip content.
10
+ *
11
+ * @default ''
12
+ */
13
+ keyTip?: string;
14
+
8
15
  /**
9
16
  * Defines a unique identifier for the tab.
10
17
  *
@@ -4,6 +4,12 @@ import { RibbonGroupModel } from './ribbon-group-model';
4
4
  * Defines the ribbon tab.
5
5
  */
6
6
  export declare class RibbonTab extends ChildProperty<RibbonTab> {
7
+ /**
8
+ * Specifies the keytip content.
9
+ *
10
+ * @default ''
11
+ */
12
+ keyTip: string;
7
13
  /**
8
14
  * Defines a unique identifier for the tab.
9
15
  *
@@ -36,6 +36,9 @@ var RibbonTab = /** @class */ (function (_super) {
36
36
  RibbonTab.prototype.setProperties = function (prop, muteOnChange) {
37
37
  _super.prototype.setProperties.call(this, prop, muteOnChange);
38
38
  };
39
+ __decorate([
40
+ Property('')
41
+ ], RibbonTab.prototype, "keyTip", void 0);
39
42
  __decorate([
40
43
  Property('')
41
44
  ], RibbonTab.prototype, "id", void 0);
@@ -1,2 +1,4 @@
1
1
  export * from './ribbon-filemenu';
2
2
  export * from './ribbon-backstage';
3
+ export * from './ribbon-contextualtab';
4
+ export * from './ribbon-keytip';
@@ -1,2 +1,4 @@
1
1
  export * from './ribbon-filemenu';
2
2
  export * from './ribbon-backstage';
3
+ export * from './ribbon-contextualtab';
4
+ export * from './ribbon-keytip';
@@ -51,6 +51,7 @@ export declare class RibbonBackstage extends Component<HTMLElement> {
51
51
  createBackStage(backStageOptions: BackStageMenuModel): void;
52
52
  private onClickEvent;
53
53
  private addBackStageMenuTooltip;
54
+ private addBackStageMenuKeyTip;
54
55
  private checkMenuItems;
55
56
  private createBackStagePopup;
56
57
  private updatePopupPositionOnRtl;
@@ -79,6 +80,7 @@ export declare class RibbonBackstage extends Component<HTMLElement> {
79
80
  private destroyMenu;
80
81
  private destroyDDB;
81
82
  private removeBackstageMenuTooltip;
83
+ private removeBackstageMenuKeyTip;
82
84
  /**
83
85
  * Add items to Backstage Menu.
84
86
  *
@@ -144,6 +144,7 @@ var RibbonBackstage = /** @class */ (function (_super) {
144
144
  };
145
145
  this.parent.tabObj.refreshActiveTabBorder();
146
146
  this.addBackStageMenuTooltip(backStageOptions);
147
+ this.addBackStageMenuKeyTip(backStageOptions);
147
148
  EventHandler.add(document, 'click', this.onClickEvent, this);
148
149
  };
149
150
  RibbonBackstage.prototype.onClickEvent = function (e) {
@@ -161,6 +162,24 @@ var RibbonBackstage = /** @class */ (function (_super) {
161
162
  this.parent.tooltipData.push({ id: this.backstageButtonEle.id, data: backStageOptions.ribbonTooltipSettings });
162
163
  }
163
164
  };
165
+ RibbonBackstage.prototype.addBackStageMenuKeyTip = function (backStageOptions) {
166
+ if (backStageOptions.keyTip) {
167
+ if (!(this.parent.keyTipElements['backstage'])) {
168
+ this.parent.keyTipElements['backstage'] = [];
169
+ }
170
+ this.parent.keyTipElements['backstage'].push({ id: this.backstageButtonEle.id, type: 'backstage', keyTip: backStageOptions.keyTip });
171
+ }
172
+ if (backStageOptions.items && backStageOptions.items.length) {
173
+ if (!(this.parent.keyTipElements['backstageMenu'])) {
174
+ this.parent.keyTipElements['backstageMenu'] = [];
175
+ }
176
+ for (var i = 0; i < backStageOptions.items.length; i++) {
177
+ if (backStageOptions.items[parseInt(i.toString(), 10)].keyTip) {
178
+ this.parent.keyTipElements['backstageMenu'].push({ id: backStageOptions.items[parseInt(i.toString(), 10)].id, type: 'backstageMenu', keyTip: backStageOptions.items[parseInt(i.toString(), 10)].keyTip });
179
+ }
180
+ }
181
+ }
182
+ };
164
183
  RibbonBackstage.prototype.checkMenuItems = function (backStageItems) {
165
184
  for (var i = 0; i < backStageItems.length; i++) {
166
185
  var item = backStageItems[parseInt(i.toString(), 10)];
@@ -451,7 +470,9 @@ var RibbonBackstage = /** @class */ (function (_super) {
451
470
  }
452
471
  }
453
472
  this.removeBackstageMenuTooltip();
473
+ this.removeBackstageMenuKeyTip();
454
474
  this.addBackStageMenuTooltip(backStageOptions);
475
+ this.addBackStageMenuKeyTip(backStageOptions);
455
476
  }
456
477
  else {
457
478
  this.createBackStage(backStageOptions);
@@ -470,6 +491,7 @@ var RibbonBackstage = /** @class */ (function (_super) {
470
491
  };
471
492
  RibbonBackstage.prototype.destroyDDB = function () {
472
493
  this.removeBackstageMenuTooltip();
494
+ this.removeBackstageMenuKeyTip();
473
495
  var tabEle = this.parent.tabObj.element;
474
496
  tabEle.style.removeProperty(constants.RIBBON_FILE_MENU_WIDTH);
475
497
  this.destroyMenu();
@@ -487,6 +509,21 @@ var RibbonBackstage = /** @class */ (function (_super) {
487
509
  this.parent.tooltipData.splice(index, 1);
488
510
  }
489
511
  };
512
+ RibbonBackstage.prototype.removeBackstageMenuKeyTip = function () {
513
+ var _this = this;
514
+ if (this.parent.keyTipElements['backstage'] && this.parent.keyTipElements['backstage'].length) {
515
+ var index = getIndex(this.parent.keyTipElements['backstage'], function (e) { return e.id === _this.backstageButtonEle.id; });
516
+ if (index !== -1) {
517
+ this.parent.keyTipElements['backstage'].splice(index, 1);
518
+ }
519
+ }
520
+ if (this.parent.keyTipElements['backstageMenu'] && this.parent.keyTipElements['backstageMenu'].length) {
521
+ for (var i = 0; i < this.parent.keyTipElements['backstageMenu'].length; i++) {
522
+ this.parent.keyTipElements['backstageMenu'].splice(i, 1);
523
+ i--;
524
+ }
525
+ }
526
+ };
490
527
  /**
491
528
  * Add items to Backstage Menu.
492
529
  *
@@ -0,0 +1,27 @@
1
+ import { Ribbon } from '../base/ribbon';
2
+ import { RibbonContextualTabSettingsModel } from '../models/ribbon-contextual-tab-settings-model';
3
+ /**
4
+ * Defines the ribbon contextual tab.
5
+ */
6
+ export declare class RibbonContextualTab {
7
+ private parent;
8
+ constructor(parent: Ribbon);
9
+ protected getModuleName(): string;
10
+ protected destroy(): void;
11
+ /**
12
+ * Creates Contextual tab.
13
+ *
14
+ * @returns {void}
15
+ * @hidden
16
+ */
17
+ addContextualTabs(): void;
18
+ /**
19
+ * Updates Contextual tab.
20
+ *
21
+ * @param {RibbonContextualTabSettingsModel} newProp - Specifies new properties.
22
+ * @param {RibbonContextualTabSettingsModel} contextualTab - Gets the property of contextual tab.
23
+ * @returns {void}
24
+ * @hidden
25
+ */
26
+ updateContextualTabs(newProp: RibbonContextualTabSettingsModel, contextualTab: RibbonContextualTabSettingsModel): void;
27
+ }
@@ -0,0 +1,90 @@
1
+ import * as constants from '../base/constant';
2
+ import { isNullOrUndefined } from '@syncfusion/ej2-base';
3
+ /**
4
+ * Defines the ribbon contextual tab.
5
+ */
6
+ var RibbonContextualTab = /** @class */ (function () {
7
+ function RibbonContextualTab(parent) {
8
+ this.parent = parent;
9
+ }
10
+ RibbonContextualTab.prototype.getModuleName = function () {
11
+ return 'ribbonContextualTab';
12
+ };
13
+ RibbonContextualTab.prototype.destroy = function () {
14
+ this.parent = null;
15
+ };
16
+ /**
17
+ * Creates Contextual tab.
18
+ *
19
+ * @returns {void}
20
+ * @hidden
21
+ */
22
+ RibbonContextualTab.prototype.addContextualTabs = function () {
23
+ var isSelected = false;
24
+ for (var n = 0; n < this.parent.contextualTabs.length; n++) {
25
+ for (var i = 0; i < this.parent.contextualTabs[parseInt(n.toString(), 10)].tabs.length; i++) {
26
+ this.parent.addTab(this.parent.contextualTabs[parseInt(n.toString(), 10)].tabs[parseInt(i.toString(), 10)]);
27
+ var index = this.parent.tabs.length - 1;
28
+ var tabEle = this.parent.tabObj.element;
29
+ var toolbarEle = tabEle.querySelectorAll('.e-toolbar-item')[parseInt(index.toString(), 10)];
30
+ toolbarEle.classList.add(constants.RIBBON_CONTEXTUAL_TAB);
31
+ toolbarEle.classList.add('e-hidden');
32
+ if (this.parent.contextualTabs[parseInt(n.toString(), 10)].visible) {
33
+ this.parent.showTab(this.parent.contextualTabs[parseInt(n.toString(), 10)].tabs[parseInt(i.toString(), 10)].id, true);
34
+ if (this.parent.contextualTabs[parseInt(n.toString(), 10)].isSelected && !isSelected) {
35
+ this.parent.selectTab(this.parent.contextualTabs[parseInt(n.toString(), 10)].tabs[0].id);
36
+ isSelected = true;
37
+ }
38
+ }
39
+ }
40
+ }
41
+ };
42
+ /**
43
+ * Updates Contextual tab.
44
+ *
45
+ * @param {RibbonContextualTabSettingsModel} newProp - Specifies new properties.
46
+ * @param {RibbonContextualTabSettingsModel} contextualTab - Gets the property of contextual tab.
47
+ * @returns {void}
48
+ * @hidden
49
+ */
50
+ RibbonContextualTab.prototype.updateContextualTabs = function (newProp, contextualTab) {
51
+ if (!(isNullOrUndefined(newProp.visible))) {
52
+ for (var i = 0; i < contextualTab.tabs.length; i++) {
53
+ if (newProp.visible) {
54
+ this.parent.showTab(contextualTab.tabs[parseInt(i.toString(), 10)].id, true);
55
+ }
56
+ else {
57
+ this.parent.hideTab(contextualTab.tabs[parseInt(i.toString(), 10)].id, true);
58
+ }
59
+ }
60
+ }
61
+ if (!(isNullOrUndefined(newProp.isSelected))) {
62
+ if (newProp.isSelected && contextualTab.visible) {
63
+ this.parent.selectTab(contextualTab.tabs[0].id);
64
+ }
65
+ else {
66
+ var tabEle = this.parent.tabObj.element;
67
+ for (var i = 0; i < this.parent.tabs.length; i++) {
68
+ var toolbarEle = tabEle.querySelectorAll('.e-toolbar-item')[parseInt(i.toString(), 10)];
69
+ if (!(toolbarEle.classList.contains('e-hidden') || toolbarEle.classList.contains('e-disable'))) {
70
+ this.parent.selectTab(this.parent.tabs[parseInt(i.toString(), 10)].id);
71
+ break;
72
+ }
73
+ }
74
+ }
75
+ }
76
+ if (newProp.tabs) {
77
+ var _loop_1 = function (key) {
78
+ var index = parseInt(key, 10);
79
+ var tab = this_1.parent.tabs.filter(function (e) { return e.id === contextualTab.tabs[parseInt(index.toString(), 10)].id; })[0];
80
+ this_1.parent.updateTab(tab);
81
+ };
82
+ var this_1 = this;
83
+ for (var key in newProp.tabs) {
84
+ _loop_1(key);
85
+ }
86
+ }
87
+ };
88
+ return RibbonContextualTab;
89
+ }());
90
+ export { RibbonContextualTab };
@@ -21,6 +21,7 @@ export declare class RibbonFileMenu {
21
21
  */
22
22
  createFileMenu(fileMenuOptions: FileMenuSettingsModel): void;
23
23
  private addFileMenuTooltip;
24
+ private addFileMenuKeytip;
24
25
  private ddbBeforeEvent;
25
26
  private ddbAfterEvent;
26
27
  private cloneMenuItem;
@@ -48,6 +49,7 @@ export declare class RibbonFileMenu {
48
49
  private destroyMenu;
49
50
  private destroyDDB;
50
51
  private removeFileMenuTooltip;
52
+ private removeFileMenuKeytip;
51
53
  /**
52
54
  * Add items to FileMenu.
53
55
  *