@syncfusion/ej2-ribbon 24.2.8 → 25.1.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/CHANGELOG.md +5 -9
  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 +2051 -137
  6. package/dist/es6/ej2-ribbon.es2015.js.map +1 -1
  7. package/dist/es6/ej2-ribbon.es5.js +2180 -146
  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 +67 -5
  20. package/src/ribbon/base/ribbon.js +457 -76
  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 +390 -16
  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 +79 -4
  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 +390 -16
  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
@@ -1,6 +1,6 @@
1
1
  import { Tooltip, TooltipEventArgs } from '@syncfusion/ej2-popups';
2
2
  import { RibbonTabModel, RibbonTooltipModel } from '../models/index';
3
- import { commonProperties, itemProps, ribbonTooltipData } from './interface';
3
+ import { commonProperties, itemProps, ribbonTooltipData, RibbonItemType } from './interface';
4
4
  import { Ribbon } from './ribbon';
5
5
  /**
6
6
  * Gets index value.
@@ -24,10 +24,11 @@ export declare function getTemplateFunction(template: string | HTMLElement | Fun
24
24
  *
25
25
  * @param {RibbonTabModel} tabs - Gets the ribbon tab model.
26
26
  * @param {string} id - Gets the ID of the tab.
27
+ * @param {RibbonItemType} type - Gets the type of the item.
27
28
  * @returns {itemProps} - Gets the ribbon item.
28
29
  * @hidden
29
30
  */
30
- export declare function getItem(tabs: RibbonTabModel[], id: string): itemProps;
31
+ export declare function getItem(tabs: RibbonTabModel[], id: string, type?: RibbonItemType): itemProps;
31
32
  /**
32
33
  * Gets the ribbon collection.
33
34
  *
@@ -54,10 +54,11 @@ export function getTemplateFunction(template) {
54
54
  *
55
55
  * @param {RibbonTabModel} tabs - Gets the ribbon tab model.
56
56
  * @param {string} id - Gets the ID of the tab.
57
+ * @param {RibbonItemType} type - Gets the type of the item.
57
58
  * @returns {itemProps} - Gets the ribbon item.
58
59
  * @hidden
59
60
  */
60
- export function getItem(tabs, id) {
61
+ export function getItem(tabs, id, type) {
61
62
  for (var i = 0; i < tabs.length; i++) {
62
63
  var tab = tabs[parseInt(i.toString(), 10)];
63
64
  for (var j = 0; j < tab.groups.length; j++) {
@@ -66,7 +67,7 @@ export function getItem(tabs, id) {
66
67
  var collection = group.collections[parseInt(k.toString(), 10)];
67
68
  for (var l = 0; l < collection.items.length; l++) {
68
69
  var item = collection.items[parseInt(l.toString(), 10)];
69
- if (item.id === id) {
70
+ if ((id && item.id === id) || (type && item.type === type)) {
70
71
  return {
71
72
  item: item, collection: collection, group: group,
72
73
  tabIndex: i, groupIndex: j, collectionIndex: k, itemIndex: l
@@ -5,3 +5,4 @@ export * from './ribbon-combobox';
5
5
  export * from './ribbon-dropdown';
6
6
  export * from './ribbon-splitbutton';
7
7
  export * from './ribbon-groupbutton';
8
+ export * from './ribbon-gallery';
@@ -5,3 +5,4 @@ export * from './ribbon-combobox';
5
5
  export * from './ribbon-dropdown';
6
6
  export * from './ribbon-splitbutton';
7
7
  export * from './ribbon-groupbutton';
8
+ export * from './ribbon-gallery';
@@ -53,7 +53,12 @@ var RibbonColorPicker = /** @class */ (function () {
53
53
  beforeOpen: colorPickerSettings.beforeOpen,
54
54
  beforeTileRender: colorPickerSettings.beforeTileRender,
55
55
  created: colorPickerSettings.created,
56
- change: colorPickerSettings.change,
56
+ change: function (e) {
57
+ colorPickerSettings.value = e.value.toString();
58
+ if (colorPickerSettings.change) {
59
+ colorPickerSettings.change.call(_this, e);
60
+ }
61
+ },
57
62
  open: function () {
58
63
  colorPicker.element.parentElement.classList.add(RIBBON_POPUP_OPEN);
59
64
  if (colorPickerSettings.open) {
@@ -0,0 +1,87 @@
1
+ import { Ribbon } from '../base/index';
2
+ import { RibbonItemModel } from '../models/index';
3
+ import { DropDownButton } from '@syncfusion/ej2-splitbuttons';
4
+ /**
5
+ * Defines the items of Ribbon.
6
+ */
7
+ export declare class RibbonGallery {
8
+ private parent;
9
+ private count;
10
+ private isAdded;
11
+ private galleryItemsIndex;
12
+ constructor(parent: Ribbon);
13
+ protected getModuleName(): string;
14
+ protected destroy(): void;
15
+ /**
16
+ * Creates gallery.
17
+ *
18
+ * @param {RibbonItemModel} item - Gets the ribbon item model.
19
+ * @param {HTMLElement} itemEle - Gets the ribbon item element.
20
+ * @returns {void}
21
+ * @hidden
22
+ */
23
+ createGallery(item: RibbonItemModel, itemEle: HTMLElement): void;
24
+ private renderGalleryItems;
25
+ private setWrapperWidth;
26
+ /**
27
+ * Checks the gallery items height.
28
+ *
29
+ * @param {number} selectedTab - Gets the current selected tab.
30
+ * @param {HTMLElement} activeContent - Gets the current active content.
31
+ * @returns {void}
32
+ * @hidden
33
+ */
34
+ checkAvailableHeight(selectedTab: number, activeContent: HTMLElement): void;
35
+ private checkCollision;
36
+ private createPopup;
37
+ /**
38
+ * Updates gallery in mode switching.
39
+ *
40
+ * @param {string} activeLayout - Gets the current active layout.
41
+ * @param {string} itemID - Gets the ribbon item id.
42
+ * @returns {void}
43
+ * @hidden
44
+ */
45
+ switchGalleryItems(activeLayout: string, itemID: string): void;
46
+ /**
47
+ * Adds the additional event handlers as the item moved into overflow popup.
48
+ *
49
+ * @param {RibbonItemModel} item - Gets the ribbon item model.
50
+ * @param {HTMLElement} itemEle - Gets the ribbon item element.
51
+ * @param {DropDownButton} overflowButton - Gets the overflow button.
52
+ * @returns {void}
53
+ * @hidden
54
+ */
55
+ addOverFlowEvents(item: RibbonItemModel, itemEle: HTMLElement, overflowButton: DropDownButton): void;
56
+ /**
57
+ * Removes the additional event handlers as the item moved into overflow popup.
58
+ *
59
+ * @param {RibbonItemModel} item - Gets the ribbon item model.
60
+ * @param {HTMLElement} itemEle - Gets the ribbon item element.
61
+ * @returns {void}
62
+ * @hidden
63
+ */
64
+ removeOverFlowEvents(item: RibbonItemModel, itemEle: HTMLElement): void;
65
+ private setActiveState;
66
+ private popupEvents;
67
+ private showPopup;
68
+ private hidePopup;
69
+ /**
70
+ * Shows a specific gallery popup in the ribbon.
71
+ *
72
+ * @param {string} id - Gets the ribbon item id.
73
+ * @returns {void}
74
+ */
75
+ showGalleryPopup(id: string): void;
76
+ /**
77
+ * Hides a specific gallery popup in the ribbon.
78
+ *
79
+ * @param {string} id - Gets the ribbon item id.
80
+ * @returns {void}
81
+ */
82
+ hideGalleryPopup(id: string): void;
83
+ private setFoucsToFirstItem;
84
+ private handleGalleryPopupNavigation;
85
+ private createGalleryTemplate;
86
+ private createGalleryPopupTemplate;
87
+ }