@syncfusion/ej2-ribbon 29.1.39 → 30.1.37
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/.eslintrc.json +2 -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 +62 -37
- package/dist/es6/ej2-ribbon.es2015.js.map +1 -1
- package/dist/es6/ej2-ribbon.es5.js +68 -43
- 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 +19 -54
- package/src/ribbon/base/ribbon.js +12 -7
- package/src/ribbon/items/ribbon-gallery.d.ts +1 -0
- package/src/ribbon/items/ribbon-gallery.js +16 -13
- package/src/ribbon/items/ribbon-groupbutton.js +32 -20
- package/src/ribbon/modules/ribbon-filemenu.js +8 -3
- package/styles/bds-lite.css +224 -213
- package/styles/bds.css +227 -213
- package/styles/bootstrap-dark-lite.css +224 -213
- package/styles/bootstrap-dark.css +227 -213
- package/styles/bootstrap-lite.css +224 -213
- package/styles/bootstrap.css +227 -213
- package/styles/bootstrap4-lite.css +224 -213
- package/styles/bootstrap4.css +227 -213
- package/styles/bootstrap5-dark-lite.css +224 -213
- package/styles/bootstrap5-dark.css +227 -213
- package/styles/bootstrap5-lite.css +224 -213
- package/styles/bootstrap5.3-lite.css +224 -213
- package/styles/bootstrap5.3.css +227 -213
- package/styles/bootstrap5.css +227 -213
- package/styles/fabric-dark-lite.css +224 -213
- package/styles/fabric-dark.css +227 -213
- package/styles/fabric-lite.css +224 -213
- package/styles/fabric.css +227 -213
- package/styles/fluent-dark-lite.css +224 -213
- package/styles/fluent-dark.css +227 -213
- package/styles/fluent-lite.css +224 -213
- package/styles/fluent.css +227 -213
- package/styles/fluent2-lite.css +225 -214
- package/styles/fluent2.css +228 -214
- package/styles/highcontrast-light-lite.css +224 -213
- package/styles/highcontrast-light.css +227 -213
- package/styles/highcontrast-lite.css +224 -213
- package/styles/highcontrast.css +227 -213
- package/styles/material-dark-lite.css +224 -213
- package/styles/material-dark.css +227 -213
- package/styles/material-lite.css +224 -213
- package/styles/material.css +227 -213
- package/styles/material3-dark-lite.css +224 -213
- package/styles/material3-dark.css +227 -213
- package/styles/material3-lite.css +224 -213
- package/styles/material3.css +227 -213
- package/styles/ribbon/_bds-definition.scss +1 -1
- package/styles/ribbon/_bigger.scss +4 -0
- package/styles/ribbon/_bootstrap-dark-definition.scss +1 -1
- package/styles/ribbon/_bootstrap-definition.scss +1 -1
- package/styles/ribbon/_bootstrap4-definition.scss +1 -1
- package/styles/ribbon/_bootstrap5-definition.scss +1 -1
- package/styles/ribbon/_bootstrap5.3-definition.scss +1 -1
- package/styles/ribbon/_fabric-dark-definition.scss +1 -1
- package/styles/ribbon/_fabric-definition.scss +1 -1
- package/styles/ribbon/_fluent-definition.scss +1 -1
- package/styles/ribbon/_fluent2-definition.scss +2 -2
- package/styles/ribbon/_fusionnew-definition.scss +1 -1
- package/styles/ribbon/_highcontrast-definition.scss +1 -1
- package/styles/ribbon/_highcontrast-light-definition.scss +1 -1
- package/styles/ribbon/_layout.scss +13 -1
- package/styles/ribbon/_material-dark-definition.scss +1 -1
- package/styles/ribbon/_material-definition.scss +1 -1
- package/styles/ribbon/_material3-definition.scss +1 -1
- package/styles/ribbon/_tailwind-definition.scss +1 -1
- package/styles/ribbon/_tailwind3-definition.scss +2 -2
- package/styles/ribbon/_theme.scss +40 -33
- package/styles/ribbon/bds.css +227 -213
- package/styles/ribbon/bootstrap-dark.css +227 -213
- package/styles/ribbon/bootstrap.css +227 -213
- package/styles/ribbon/bootstrap4.css +227 -213
- package/styles/ribbon/bootstrap5-dark.css +227 -213
- package/styles/ribbon/bootstrap5.3.css +227 -213
- package/styles/ribbon/bootstrap5.css +227 -213
- package/styles/ribbon/fabric-dark.css +227 -213
- package/styles/ribbon/fabric.css +227 -213
- package/styles/ribbon/fluent-dark.css +227 -213
- package/styles/ribbon/fluent.css +227 -213
- package/styles/ribbon/fluent2.css +228 -214
- package/styles/ribbon/highcontrast-light.css +227 -213
- package/styles/ribbon/highcontrast.css +227 -213
- package/styles/ribbon/material-dark.css +227 -213
- package/styles/ribbon/material.css +227 -213
- package/styles/ribbon/material3-dark.css +227 -213
- package/styles/ribbon/material3.css +227 -213
- package/styles/ribbon/tailwind-dark.css +227 -213
- package/styles/ribbon/tailwind.css +227 -213
- package/styles/ribbon/tailwind3.css +228 -214
- package/styles/tailwind-dark-lite.css +224 -213
- package/styles/tailwind-dark.css +227 -213
- package/styles/tailwind-lite.css +224 -213
- package/styles/tailwind.css +227 -213
- package/styles/tailwind3-lite.css +225 -214
- package/styles/tailwind3.css +228 -214
|
@@ -3133,6 +3133,7 @@ function setCustomAttributes(element, attributes) {
|
|
|
3133
3133
|
*/
|
|
3134
3134
|
class RibbonGroupButton {
|
|
3135
3135
|
constructor(parent) {
|
|
3136
|
+
this.grpBtnIndex = 0;
|
|
3136
3137
|
this.parent = parent;
|
|
3137
3138
|
this.isSelected = false;
|
|
3138
3139
|
}
|
|
@@ -3199,6 +3200,7 @@ class RibbonGroupButton {
|
|
|
3199
3200
|
this.count++;
|
|
3200
3201
|
}
|
|
3201
3202
|
}
|
|
3203
|
+
this.grpBtnIndex = i;
|
|
3202
3204
|
}
|
|
3203
3205
|
if (groupBtnSettings.items[parseInt(i.toString(), 10)].ribbonTooltipSettings &&
|
|
3204
3206
|
isTooltipPresent(groupBtnSettings.items[parseInt(i.toString(), 10)].ribbonTooltipSettings)) {
|
|
@@ -3269,7 +3271,7 @@ class RibbonGroupButton {
|
|
|
3269
3271
|
const previousItems = [];
|
|
3270
3272
|
const selectingItems = [];
|
|
3271
3273
|
const selectedItems = [];
|
|
3272
|
-
|
|
3274
|
+
const groupButtonEle = document.querySelector('#' + item.id);
|
|
3273
3275
|
let dropdown;
|
|
3274
3276
|
for (let j = 0; j < grpBtnSettings.items.length; j++) {
|
|
3275
3277
|
if (document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + j)) {
|
|
@@ -3307,7 +3309,6 @@ class RibbonGroupButton {
|
|
|
3307
3309
|
grpBtnSettings.items[parseInt(itemIndex.toString(), 10)].setProperties({ selected: true }, true);
|
|
3308
3310
|
if (document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + itemIndex).classList.contains('e-active') && this.parent.activeLayout === 'Simplified') {
|
|
3309
3311
|
this.grpBtnIndex = itemIndex;
|
|
3310
|
-
groupButtonEle = document.querySelector('#' + item.id);
|
|
3311
3312
|
dropdown = getComponent(groupButtonEle, DropDownButton);
|
|
3312
3313
|
dropdown.setProperties({
|
|
3313
3314
|
iconCss: grpBtnSettings.items[parseInt(itemIndex.toString(), 10)].iconCss
|
|
@@ -3338,7 +3339,6 @@ class RibbonGroupButton {
|
|
|
3338
3339
|
if (this.parent.activeLayout === 'Simplified') {
|
|
3339
3340
|
let dropdownIcon = null;
|
|
3340
3341
|
let itemsCount = 0;
|
|
3341
|
-
groupButtonEle = document.querySelector('#' + item.id);
|
|
3342
3342
|
dropdown = getComponent(groupButtonEle, DropDownButton);
|
|
3343
3343
|
if (!this.isSelected) {
|
|
3344
3344
|
if (document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + itemIndex).classList.contains('e-active')) {
|
|
@@ -3372,6 +3372,10 @@ class RibbonGroupButton {
|
|
|
3372
3372
|
if (grpBtnSettings.items[parseInt(itemIndex.toString(), 10)].click) {
|
|
3373
3373
|
grpBtnSettings.items[parseInt(itemIndex.toString(), 10)].click.call(this, eventArgs);
|
|
3374
3374
|
}
|
|
3375
|
+
if (this.parent.activeLayout === 'Simplified' && groupButtonEle) {
|
|
3376
|
+
dropdown = getComponent(groupButtonEle, DropDownButton);
|
|
3377
|
+
dropdown.toggle();
|
|
3378
|
+
}
|
|
3375
3379
|
}
|
|
3376
3380
|
}
|
|
3377
3381
|
/**
|
|
@@ -3455,7 +3459,6 @@ class RibbonGroupButton {
|
|
|
3455
3459
|
else {
|
|
3456
3460
|
document.querySelector('#' + item.id + RIBBON_GROUP_BUTTON_ID + 0).focus();
|
|
3457
3461
|
}
|
|
3458
|
-
this.grpBtnIndex = 0;
|
|
3459
3462
|
}
|
|
3460
3463
|
}
|
|
3461
3464
|
addGroupButtonHeader(itemID, groupBtnSettings, popupEle) {
|
|
@@ -3536,28 +3539,37 @@ class RibbonGroupButton {
|
|
|
3536
3539
|
const groupBtnSettings = item.groupButtonSettings;
|
|
3537
3540
|
let isIconOnly = true;
|
|
3538
3541
|
const groupButtonEle = itemEle.querySelector('#' + item.id);
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3542
|
+
if (groupButtonEle) {
|
|
3543
|
+
const dropdown = getComponent(groupButtonEle, DropDownButton);
|
|
3544
|
+
dropdown.setProperties({ cssClass: dropdown.cssClass + SPACE + RIBBON_GROUP_BUTTON_OVERFLOW_POPUP, content: groupBtnSettings.header ? groupBtnSettings.header : '' });
|
|
3545
|
+
const targetEle = dropdown.target;
|
|
3546
|
+
if (targetEle.children.length) {
|
|
3547
|
+
for (let i = 0; i < targetEle.children.length; i++) {
|
|
3548
|
+
if (groupBtnSettings.items[parseInt(i.toString(), 10)].content) {
|
|
3549
|
+
isIconOnly = false;
|
|
3550
|
+
break;
|
|
3551
|
+
}
|
|
3552
|
+
}
|
|
3553
|
+
if (isIconOnly) {
|
|
3554
|
+
targetEle.classList.add('e-icon-btn');
|
|
3547
3555
|
}
|
|
3548
3556
|
}
|
|
3549
|
-
|
|
3550
|
-
targetEle.
|
|
3551
|
-
|
|
3557
|
+
targetEle.onclick = () => {
|
|
3558
|
+
if (this.parent.activeLayout === 'Simplified' && targetEle.closest('.e-ribbon-dropdown-group-button').classList.contains(RIBBON_GROUP_BUTTON_OVERFLOW_POPUP)) {
|
|
3559
|
+
if (overflowButton.element.classList.contains('e-active')) {
|
|
3560
|
+
overflowButton.toggle();
|
|
3561
|
+
}
|
|
3562
|
+
}
|
|
3563
|
+
};
|
|
3552
3564
|
}
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3565
|
+
const overflowGroupButtonEle = itemEle.querySelector('#' + item.id + '_grpbtn');
|
|
3566
|
+
if (this.parent.activeLayout === 'Classic' && overflowGroupButtonEle) {
|
|
3567
|
+
overflowGroupButtonEle.onclick = () => {
|
|
3556
3568
|
if (overflowButton.element.classList.contains('e-active')) {
|
|
3557
3569
|
overflowButton.toggle();
|
|
3558
3570
|
}
|
|
3559
|
-
}
|
|
3560
|
-
}
|
|
3571
|
+
};
|
|
3572
|
+
}
|
|
3561
3573
|
}
|
|
3562
3574
|
/**
|
|
3563
3575
|
* Removes the additional event handlers as the item moved into overflow popup.
|
|
@@ -3766,8 +3778,6 @@ class RibbonGallery {
|
|
|
3766
3778
|
}
|
|
3767
3779
|
if (gallerySettings.groups[parseInt(i.toString(), 10)].itemHeight && gallerySettings.groups[parseInt(i.toString(), 10)].itemHeight !== 'auto') {
|
|
3768
3780
|
galleryEle.style.height = gallerySettings.groups[parseInt(i.toString(), 10)].itemHeight + 'px';
|
|
3769
|
-
galleryEle.style.paddingTop = '0px';
|
|
3770
|
-
galleryEle.style.paddingBottom = '0px';
|
|
3771
3781
|
if (this.parent.activeLayout !== 'Simplified' && !isPopup) {
|
|
3772
3782
|
galleryContainerEle.style.flexFlow = 'wrap';
|
|
3773
3783
|
}
|
|
@@ -3878,6 +3888,13 @@ class RibbonGallery {
|
|
|
3878
3888
|
galleryWrapper.style.width = itemsWidth + 'px';
|
|
3879
3889
|
}
|
|
3880
3890
|
}
|
|
3891
|
+
setWrapperStyle(popup, popupContainerItems) {
|
|
3892
|
+
if (popup.width !== 'auto') {
|
|
3893
|
+
popupContainerItems.forEach((ele) => {
|
|
3894
|
+
ele.style.flexFlow = 'wrap';
|
|
3895
|
+
});
|
|
3896
|
+
}
|
|
3897
|
+
}
|
|
3881
3898
|
/**
|
|
3882
3899
|
* Checks the gallery items height.
|
|
3883
3900
|
*
|
|
@@ -3969,11 +3986,7 @@ class RibbonGallery {
|
|
|
3969
3986
|
}
|
|
3970
3987
|
}
|
|
3971
3988
|
const popupContainerItems = popupEle.querySelectorAll('.e-ribbon-gallery-container');
|
|
3972
|
-
|
|
3973
|
-
popupContainerItems.forEach((ele) => {
|
|
3974
|
-
ele.style.flexFlow = 'wrap';
|
|
3975
|
-
});
|
|
3976
|
-
}
|
|
3989
|
+
this.setWrapperStyle(popup, popupContainerItems);
|
|
3977
3990
|
let isCollideOccurs = false;
|
|
3978
3991
|
for (let i = 0; i < popupContainerItems.length; i++) {
|
|
3979
3992
|
let itemsWidth = 0;
|
|
@@ -4148,6 +4161,8 @@ class RibbonGallery {
|
|
|
4148
4161
|
cssClass: 'e-ribbon-gallery-dropdown',
|
|
4149
4162
|
disabled: item.disabled,
|
|
4150
4163
|
open: () => {
|
|
4164
|
+
const popupContainerItems = popupContainerEle.querySelectorAll('.e-ribbon-gallery-container');
|
|
4165
|
+
this.setWrapperStyle(popup, popupContainerItems);
|
|
4151
4166
|
this.setFoucsToFirstItem(popupContainerEle, true, item.id);
|
|
4152
4167
|
},
|
|
4153
4168
|
beforeClose: (args) => {
|
|
@@ -5228,7 +5243,7 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
|
|
|
5228
5243
|
if (dropDownPopup) {
|
|
5229
5244
|
dropDownPopup.setProperties({ position: { X: isLeft ? 'left' : 'right', Y: isMenu ? 'top' : 'bottom' } }, true);
|
|
5230
5245
|
if (isMenu) {
|
|
5231
|
-
dropdown.beforeOpen = () => {
|
|
5246
|
+
dropdown.beforeOpen = (e) => {
|
|
5232
5247
|
if (isLeft) {
|
|
5233
5248
|
if (item.type === RibbonItemType.Gallery && this.ribbonGalleryModule) {
|
|
5234
5249
|
this.ribbonGalleryModule.checkCollision(dropDownPopup, dropDownPopup.element);
|
|
@@ -5239,6 +5254,12 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
|
|
|
5239
5254
|
dropDownPopup.element.style.removeProperty('display');
|
|
5240
5255
|
dropDownPopup.element.style.removeProperty('visibility');
|
|
5241
5256
|
}
|
|
5257
|
+
if (item.splitButtonSettings.beforeOpen) {
|
|
5258
|
+
item.splitButtonSettings.beforeOpen.call(this, e);
|
|
5259
|
+
}
|
|
5260
|
+
if (item.dropDownSettings.beforeOpen) {
|
|
5261
|
+
item.dropDownSettings.beforeOpen.call(this, e);
|
|
5262
|
+
}
|
|
5242
5263
|
};
|
|
5243
5264
|
}
|
|
5244
5265
|
else {
|
|
@@ -5532,10 +5553,8 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
|
|
|
5532
5553
|
}
|
|
5533
5554
|
break;
|
|
5534
5555
|
case 'GroupButton':
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
break;
|
|
5538
|
-
}
|
|
5556
|
+
this.ribbonGroupButtonModule.addOverFlowEvents(item, itemEle, overflowButton);
|
|
5557
|
+
break;
|
|
5539
5558
|
}
|
|
5540
5559
|
}
|
|
5541
5560
|
createOfTabContainer(groupId, groupHeader, itemEle, tabIndex) {
|
|
@@ -6421,9 +6440,10 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
|
|
|
6421
6440
|
className: RIBBON_OVERFLOW_TARGET,
|
|
6422
6441
|
attrs: { 'tabindex': '0' }
|
|
6423
6442
|
});
|
|
6443
|
+
const overFlowCss = this.cssClass ? SPACE + this.cssClass : '';
|
|
6424
6444
|
const overflowDDB = new DropDownButton({
|
|
6425
6445
|
iconCss: OVERFLOW_ICON,
|
|
6426
|
-
cssClass: DROPDOWNBUTTON_HIDE + SPACE + RIBBON_GROUP_OVERFLOW_DDB,
|
|
6446
|
+
cssClass: DROPDOWNBUTTON_HIDE + SPACE + RIBBON_GROUP_OVERFLOW_DDB + overFlowCss,
|
|
6427
6447
|
target: overflowTarget,
|
|
6428
6448
|
locale: this.locale,
|
|
6429
6449
|
enableRtl: this.enableRtl,
|
|
@@ -8926,7 +8946,7 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
|
|
|
8926
8946
|
if (itemProp.item.type === 'Gallery' && document.querySelector('#' + itemId + '_container').closest('.e-ribbon-overflow-target') && item.displayOptions !== DisplayMode.Overflow) {
|
|
8927
8947
|
this.createOverflowPopup(itemProp.item, itemProp.tabIndex, itemProp.group.enableGroupOverflow, itemProp.group.id, itemProp.group.header, itemContainer, groupContainer);
|
|
8928
8948
|
}
|
|
8929
|
-
if (this.activeLayout === 'Simplified' && itemProp.group.enableGroupOverflow) {
|
|
8949
|
+
if (this.activeLayout === 'Simplified' && itemProp.group.enableGroupOverflow && dropdown) {
|
|
8930
8950
|
if (dropdown.target.childElementCount === 0 ||
|
|
8931
8951
|
(dropdown.target.childElementCount === 1 &&
|
|
8932
8952
|
this.isHeaderVisible(dropdown.target, itemProp.group.id))) {
|
|
@@ -9485,9 +9505,14 @@ class RibbonFileMenu {
|
|
|
9485
9505
|
if (event) {
|
|
9486
9506
|
const eventArgs = { element: args.element, item: args.item, event: args.event };
|
|
9487
9507
|
event.call(this, eventArgs);
|
|
9488
|
-
|
|
9489
|
-
|
|
9490
|
-
|
|
9508
|
+
}
|
|
9509
|
+
const menuOpen = !!args.element.closest('.e-ribbon-menu.e-popup-open');
|
|
9510
|
+
const fileTriggerOpen = !!args.element.closest('.e-ribbon-file-menu.e-popup-open');
|
|
9511
|
+
const fileMenuOpen = !!document.querySelector('.e-ribbon-file-menu.e-popup-open');
|
|
9512
|
+
// True if the file trigger was clicked open, or if the ribbon menu is open and the file menu popup is actually present
|
|
9513
|
+
const isMenuOpen = fileTriggerOpen || (menuOpen && fileMenuOpen);
|
|
9514
|
+
if (!args.element.classList.contains('e-menu-caret-icon') && isMenuOpen) {
|
|
9515
|
+
this.fileMenuDDB.toggle();
|
|
9491
9516
|
}
|
|
9492
9517
|
}
|
|
9493
9518
|
/**
|