@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.
- package/CHANGELOG.md +8 -4
- package/README.md +3 -0
- package/dist/ej2-ribbon.umd.min.js +2 -2
- package/dist/ej2-ribbon.umd.min.js.map +1 -1
- package/dist/es6/ej2-ribbon.es2015.js +2164 -217
- package/dist/es6/ej2-ribbon.es2015.js.map +1 -1
- package/dist/es6/ej2-ribbon.es5.js +2293 -226
- package/dist/es6/ej2-ribbon.es5.js.map +1 -1
- package/dist/global/ej2-ribbon.min.js +2 -2
- package/dist/global/ej2-ribbon.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +13 -13
- package/src/global.js +1 -1
- package/src/ribbon/base/constant.d.ts +8 -0
- package/src/ribbon/base/constant.js +8 -0
- package/src/ribbon/base/interface.d.ts +114 -1
- package/src/ribbon/base/interface.js +4 -0
- package/src/ribbon/base/ribbon-model.d.ts +22 -1
- package/src/ribbon/base/ribbon.d.ts +70 -5
- package/src/ribbon/base/ribbon.js +571 -157
- package/src/ribbon/base/utils.d.ts +3 -2
- package/src/ribbon/base/utils.js +3 -2
- package/src/ribbon/items/index.d.ts +1 -0
- package/src/ribbon/items/index.js +1 -0
- package/src/ribbon/items/ribbon-colorpicker.js +6 -1
- package/src/ribbon/items/ribbon-gallery.d.ts +87 -0
- package/src/ribbon/items/ribbon-gallery.js +712 -0
- package/src/ribbon/items/ribbon-groupbutton.js +3 -0
- package/src/ribbon/models/index.d.ts +8 -0
- package/src/ribbon/models/index.js +4 -0
- package/src/ribbon/models/ribbon-back-stage-settings-model.d.ts +7 -0
- package/src/ribbon/models/ribbon-back-stage-settings.d.ts +6 -0
- package/src/ribbon/models/ribbon-back-stage-settings.js +3 -0
- package/src/ribbon/models/ribbon-backstage-item-model.d.ts +7 -0
- package/src/ribbon/models/ribbon-backstage-item.d.ts +6 -0
- package/src/ribbon/models/ribbon-backstage-item.js +3 -0
- package/src/ribbon/models/ribbon-contextual-tab-settings-model.d.ts +30 -0
- package/src/ribbon/models/ribbon-contextual-tab-settings.d.ts +33 -0
- package/src/ribbon/models/ribbon-contextual-tab-settings.js +50 -0
- package/src/ribbon/models/ribbon-file-menu-settings-model.d.ts +7 -0
- package/src/ribbon/models/ribbon-file-menu-settings.d.ts +6 -0
- package/src/ribbon/models/ribbon-file-menu-settings.js +3 -0
- package/src/ribbon/models/ribbon-gallery-group-model.d.ts +44 -0
- package/src/ribbon/models/ribbon-gallery-group.d.ts +38 -0
- package/src/ribbon/models/ribbon-gallery-group.js +47 -0
- package/src/ribbon/models/ribbon-gallery-item-model.d.ts +43 -0
- package/src/ribbon/models/ribbon-gallery-item.d.ts +38 -0
- package/src/ribbon/models/ribbon-gallery-item.js +46 -0
- package/src/ribbon/models/ribbon-gallery-settings-model.d.ts +108 -0
- package/src/ribbon/models/ribbon-gallery-settings.d.ts +95 -0
- package/src/ribbon/models/ribbon-gallery-settings.js +71 -0
- package/src/ribbon/models/ribbon-group-button-item-model.d.ts +7 -0
- package/src/ribbon/models/ribbon-group-button-item.d.ts +6 -0
- package/src/ribbon/models/ribbon-group-button-item.js +3 -0
- package/src/ribbon/models/ribbon-group-model.d.ts +14 -0
- package/src/ribbon/models/ribbon-group.d.ts +12 -0
- package/src/ribbon/models/ribbon-group.js +6 -0
- package/src/ribbon/models/ribbon-item-model.d.ts +15 -1
- package/src/ribbon/models/ribbon-item.d.ts +13 -0
- package/src/ribbon/models/ribbon-item.js +7 -0
- package/src/ribbon/models/ribbon-tab-model.d.ts +7 -0
- package/src/ribbon/models/ribbon-tab.d.ts +6 -0
- package/src/ribbon/models/ribbon-tab.js +3 -0
- package/src/ribbon/modules/index.d.ts +2 -0
- package/src/ribbon/modules/index.js +2 -0
- package/src/ribbon/modules/ribbon-backstage.d.ts +2 -0
- package/src/ribbon/modules/ribbon-backstage.js +37 -0
- package/src/ribbon/modules/ribbon-contextualtab.d.ts +27 -0
- package/src/ribbon/modules/ribbon-contextualtab.js +90 -0
- package/src/ribbon/modules/ribbon-filemenu.d.ts +2 -0
- package/src/ribbon/modules/ribbon-filemenu.js +19 -0
- package/src/ribbon/modules/ribbon-keytip.d.ts +54 -0
- package/src/ribbon/modules/ribbon-keytip.js +554 -0
- package/styles/bootstrap-dark.css +398 -24
- package/styles/bootstrap.css +389 -15
- package/styles/bootstrap4.css +398 -24
- package/styles/bootstrap5-dark.css +391 -17
- package/styles/bootstrap5.css +391 -17
- package/styles/fabric-dark.css +388 -14
- package/styles/fabric.css +387 -13
- package/styles/fluent-dark.css +389 -15
- package/styles/fluent.css +389 -15
- package/styles/highcontrast-light.css +381 -7
- package/styles/highcontrast.css +390 -16
- package/styles/material-dark.css +391 -17
- package/styles/material.css +391 -17
- package/styles/material3-dark.css +389 -15
- package/styles/material3.css +389 -15
- package/styles/ribbon/_bds-definition.scss +360 -0
- package/styles/ribbon/_bootstrap-dark-definition.scss +81 -6
- package/styles/ribbon/_bootstrap-definition.scss +81 -6
- package/styles/ribbon/_bootstrap4-definition.scss +82 -7
- package/styles/ribbon/_bootstrap5-definition.scss +81 -6
- package/styles/ribbon/_fabric-dark-definition.scss +78 -3
- package/styles/ribbon/_fabric-definition.scss +78 -3
- package/styles/ribbon/_fluent-definition.scss +80 -5
- package/styles/ribbon/_fusionnew-definition.scss +76 -1
- package/styles/ribbon/_highcontrast-definition.scss +80 -5
- package/styles/ribbon/_highcontrast-light-definition.scss +76 -1
- package/styles/ribbon/_layout.scss +344 -38
- package/styles/ribbon/_material-dark-definition.scss +80 -5
- package/styles/ribbon/_material-definition.scss +81 -6
- package/styles/ribbon/_material3-definition.scss +80 -5
- package/styles/ribbon/_tailwind-definition.scss +80 -5
- package/styles/ribbon/_theme.scss +71 -0
- package/styles/ribbon/bootstrap-dark.css +398 -24
- package/styles/ribbon/bootstrap.css +389 -15
- package/styles/ribbon/bootstrap4.css +398 -24
- package/styles/ribbon/bootstrap5-dark.css +391 -17
- package/styles/ribbon/bootstrap5.css +391 -17
- package/styles/ribbon/fabric-dark.css +388 -14
- package/styles/ribbon/fabric.css +387 -13
- package/styles/ribbon/fluent-dark.css +389 -15
- package/styles/ribbon/fluent.css +389 -15
- package/styles/ribbon/highcontrast-light.css +381 -7
- package/styles/ribbon/highcontrast.css +390 -16
- package/styles/ribbon/icons/_bds.scss +9 -0
- package/styles/ribbon/material-dark.css +391 -17
- package/styles/ribbon/material.css +391 -17
- package/styles/ribbon/material3-dark.css +389 -15
- package/styles/ribbon/material3.css +389 -15
- package/styles/ribbon/tailwind-dark.css +390 -16
- package/styles/ribbon/tailwind.css +390 -16
- package/styles/tailwind-dark.css +390 -16
- 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
|
*
|
package/src/ribbon/base/utils.js
CHANGED
|
@@ -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
|
|
@@ -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:
|
|
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
|
+
}
|