@syncfusion/ej2-ribbon 29.2.4 → 30.1.39
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 +66 -39
- package/dist/es6/ej2-ribbon.es2015.js.map +1 -1
- package/dist/es6/ej2-ribbon.es5.js +72 -45
- 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.d.ts +1 -0
- package/src/ribbon/base/ribbon.js +16 -9
- 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 +216 -213
- package/styles/bds.css +219 -213
- package/styles/bootstrap-dark-lite.css +216 -213
- package/styles/bootstrap-dark.css +219 -213
- package/styles/bootstrap-lite.css +216 -213
- package/styles/bootstrap.css +219 -213
- package/styles/bootstrap4-lite.css +216 -213
- package/styles/bootstrap4.css +219 -213
- package/styles/bootstrap5-dark-lite.css +216 -213
- package/styles/bootstrap5-dark.css +219 -213
- package/styles/bootstrap5-lite.css +216 -213
- package/styles/bootstrap5.3-lite.css +216 -213
- package/styles/bootstrap5.3.css +219 -213
- package/styles/bootstrap5.css +219 -213
- package/styles/fabric-dark-lite.css +216 -213
- package/styles/fabric-dark.css +219 -213
- package/styles/fabric-lite.css +216 -213
- package/styles/fabric.css +219 -213
- package/styles/fluent-dark-lite.css +216 -213
- package/styles/fluent-dark.css +219 -213
- package/styles/fluent-lite.css +216 -213
- package/styles/fluent.css +219 -213
- package/styles/fluent2-lite.css +218 -215
- package/styles/fluent2.css +221 -215
- package/styles/highcontrast-light-lite.css +216 -213
- package/styles/highcontrast-light.css +219 -213
- package/styles/highcontrast-lite.css +216 -213
- package/styles/highcontrast.css +219 -213
- package/styles/material-dark-lite.css +216 -213
- package/styles/material-dark.css +219 -213
- package/styles/material-lite.css +216 -213
- package/styles/material.css +219 -213
- package/styles/material3-dark-lite.css +216 -213
- package/styles/material3-dark.css +219 -213
- package/styles/material3-lite.css +216 -213
- package/styles/material3.css +219 -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 +3 -3
- 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 +5 -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 +219 -213
- package/styles/ribbon/bootstrap-dark.css +219 -213
- package/styles/ribbon/bootstrap.css +219 -213
- package/styles/ribbon/bootstrap4.css +219 -213
- package/styles/ribbon/bootstrap5-dark.css +219 -213
- package/styles/ribbon/bootstrap5.3.css +219 -213
- package/styles/ribbon/bootstrap5.css +219 -213
- package/styles/ribbon/fabric-dark.css +219 -213
- package/styles/ribbon/fabric.css +219 -213
- package/styles/ribbon/fluent-dark.css +219 -213
- package/styles/ribbon/fluent.css +219 -213
- package/styles/ribbon/fluent2.css +221 -215
- package/styles/ribbon/highcontrast-light.css +219 -213
- package/styles/ribbon/highcontrast.css +219 -213
- package/styles/ribbon/material-dark.css +219 -213
- package/styles/ribbon/material.css +219 -213
- package/styles/ribbon/material3-dark.css +219 -213
- package/styles/ribbon/material3.css +219 -213
- package/styles/ribbon/tailwind-dark.css +219 -213
- package/styles/ribbon/tailwind.css +219 -213
- package/styles/ribbon/tailwind3.css +220 -214
- package/styles/tailwind-dark-lite.css +216 -213
- package/styles/tailwind-dark.css +219 -213
- package/styles/tailwind-lite.css +216 -213
- package/styles/tailwind.css +219 -213
- package/styles/tailwind3-lite.css +217 -214
- package/styles/tailwind3.css +220 -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) => {
|
|
@@ -4512,7 +4527,8 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
|
|
|
4512
4527
|
this.currentControlIndex = 0;
|
|
4513
4528
|
}
|
|
4514
4529
|
wireEvents() {
|
|
4515
|
-
|
|
4530
|
+
this.resizeListener = this.resizeHandler.bind(this);
|
|
4531
|
+
EventHandler.add(window, 'resize', this.resizeListener);
|
|
4516
4532
|
EventHandler.add(document.body, 'keydown', this.keytipActionHandler, this);
|
|
4517
4533
|
EventHandler.add(document, 'mousedown', this.mouseEventHandler, this);
|
|
4518
4534
|
EventHandler.add(document, 'scroll', this.mouseEventHandler, this);
|
|
@@ -5228,7 +5244,7 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
|
|
|
5228
5244
|
if (dropDownPopup) {
|
|
5229
5245
|
dropDownPopup.setProperties({ position: { X: isLeft ? 'left' : 'right', Y: isMenu ? 'top' : 'bottom' } }, true);
|
|
5230
5246
|
if (isMenu) {
|
|
5231
|
-
dropdown.beforeOpen = () => {
|
|
5247
|
+
dropdown.beforeOpen = (e) => {
|
|
5232
5248
|
if (isLeft) {
|
|
5233
5249
|
if (item.type === RibbonItemType.Gallery && this.ribbonGalleryModule) {
|
|
5234
5250
|
this.ribbonGalleryModule.checkCollision(dropDownPopup, dropDownPopup.element);
|
|
@@ -5239,6 +5255,12 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
|
|
|
5239
5255
|
dropDownPopup.element.style.removeProperty('display');
|
|
5240
5256
|
dropDownPopup.element.style.removeProperty('visibility');
|
|
5241
5257
|
}
|
|
5258
|
+
if (item.splitButtonSettings.beforeOpen) {
|
|
5259
|
+
item.splitButtonSettings.beforeOpen.call(this, e);
|
|
5260
|
+
}
|
|
5261
|
+
if (item.dropDownSettings.beforeOpen) {
|
|
5262
|
+
item.dropDownSettings.beforeOpen.call(this, e);
|
|
5263
|
+
}
|
|
5242
5264
|
};
|
|
5243
5265
|
}
|
|
5244
5266
|
else {
|
|
@@ -5532,10 +5554,8 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
|
|
|
5532
5554
|
}
|
|
5533
5555
|
break;
|
|
5534
5556
|
case 'GroupButton':
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
break;
|
|
5538
|
-
}
|
|
5557
|
+
this.ribbonGroupButtonModule.addOverFlowEvents(item, itemEle, overflowButton);
|
|
5558
|
+
break;
|
|
5539
5559
|
}
|
|
5540
5560
|
}
|
|
5541
5561
|
createOfTabContainer(groupId, groupHeader, itemEle, tabIndex) {
|
|
@@ -6421,9 +6441,10 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
|
|
|
6421
6441
|
className: RIBBON_OVERFLOW_TARGET,
|
|
6422
6442
|
attrs: { 'tabindex': '0' }
|
|
6423
6443
|
});
|
|
6444
|
+
const overFlowCss = this.cssClass ? SPACE + this.cssClass : '';
|
|
6424
6445
|
const overflowDDB = new DropDownButton({
|
|
6425
6446
|
iconCss: OVERFLOW_ICON,
|
|
6426
|
-
cssClass: DROPDOWNBUTTON_HIDE + SPACE + RIBBON_GROUP_OVERFLOW_DDB,
|
|
6447
|
+
cssClass: DROPDOWNBUTTON_HIDE + SPACE + RIBBON_GROUP_OVERFLOW_DDB + overFlowCss,
|
|
6427
6448
|
target: overflowTarget,
|
|
6428
6449
|
locale: this.locale,
|
|
6429
6450
|
enableRtl: this.enableRtl,
|
|
@@ -6442,6 +6463,7 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
|
|
|
6442
6463
|
const eventArgs = { element: args.element, event: args.event, cancel: args.cancel };
|
|
6443
6464
|
this.trigger('overflowPopupClose', eventArgs, (ribbonArgs) => {
|
|
6444
6465
|
if (ele || ribbonArgs.cancel || groupButtonEle) {
|
|
6466
|
+
args.element = null;
|
|
6445
6467
|
args.cancel = true;
|
|
6446
6468
|
}
|
|
6447
6469
|
});
|
|
@@ -8926,7 +8948,7 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
|
|
|
8926
8948
|
if (itemProp.item.type === 'Gallery' && document.querySelector('#' + itemId + '_container').closest('.e-ribbon-overflow-target') && item.displayOptions !== DisplayMode.Overflow) {
|
|
8927
8949
|
this.createOverflowPopup(itemProp.item, itemProp.tabIndex, itemProp.group.enableGroupOverflow, itemProp.group.id, itemProp.group.header, itemContainer, groupContainer);
|
|
8928
8950
|
}
|
|
8929
|
-
if (this.activeLayout === 'Simplified' && itemProp.group.enableGroupOverflow) {
|
|
8951
|
+
if (this.activeLayout === 'Simplified' && itemProp.group.enableGroupOverflow && dropdown) {
|
|
8930
8952
|
if (dropdown.target.childElementCount === 0 ||
|
|
8931
8953
|
(dropdown.target.childElementCount === 1 &&
|
|
8932
8954
|
this.isHeaderVisible(dropdown.target, itemProp.group.id))) {
|
|
@@ -9069,7 +9091,7 @@ let Ribbon = Ribbon_1 = class Ribbon extends Component {
|
|
|
9069
9091
|
}
|
|
9070
9092
|
}
|
|
9071
9093
|
unwireEvents() {
|
|
9072
|
-
EventHandler.remove(window, 'resize', this.
|
|
9094
|
+
EventHandler.remove(window, 'resize', this.resizeListener);
|
|
9073
9095
|
EventHandler.remove(document.body, 'keydown', this.keytipActionHandler);
|
|
9074
9096
|
EventHandler.remove(document, 'mousedown', this.mouseEventHandler);
|
|
9075
9097
|
EventHandler.remove(document, 'scroll', this.mouseEventHandler);
|
|
@@ -9485,9 +9507,14 @@ class RibbonFileMenu {
|
|
|
9485
9507
|
if (event) {
|
|
9486
9508
|
const eventArgs = { element: args.element, item: args.item, event: args.event };
|
|
9487
9509
|
event.call(this, eventArgs);
|
|
9488
|
-
|
|
9489
|
-
|
|
9490
|
-
|
|
9510
|
+
}
|
|
9511
|
+
const menuOpen = !!args.element.closest('.e-ribbon-menu.e-popup-open');
|
|
9512
|
+
const fileTriggerOpen = !!args.element.closest('.e-ribbon-file-menu.e-popup-open');
|
|
9513
|
+
const fileMenuOpen = !!document.querySelector('.e-ribbon-file-menu.e-popup-open');
|
|
9514
|
+
// True if the file trigger was clicked open, or if the ribbon menu is open and the file menu popup is actually present
|
|
9515
|
+
const isMenuOpen = fileTriggerOpen || (menuOpen && fileMenuOpen);
|
|
9516
|
+
if (!args.element.classList.contains('e-menu-caret-icon') && isMenuOpen) {
|
|
9517
|
+
this.fileMenuDDB.toggle();
|
|
9491
9518
|
}
|
|
9492
9519
|
}
|
|
9493
9520
|
/**
|