@syncfusion/ej2-ribbon 26.1.40 → 26.1.42
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/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 +52 -10
- package/dist/es6/ej2-ribbon.es2015.js.map +1 -1
- package/dist/es6/ej2-ribbon.es5.js +52 -10
- 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 +9 -9
- package/src/ribbon/base/interface.d.ts +13 -0
- package/src/ribbon/base/ribbon-model.d.ts +8 -1
- package/src/ribbon/base/ribbon.d.ts +7 -1
- package/src/ribbon/base/ribbon.js +49 -10
- package/src/ribbon/items/ribbon-gallery.js +3 -0
- package/styles/bootstrap-dark.css +1 -0
- package/styles/bootstrap.css +1 -0
- package/styles/bootstrap4.css +1 -0
- package/styles/bootstrap5-dark.css +1 -0
- package/styles/bootstrap5.css +1 -0
- package/styles/fabric-dark.css +1 -0
- package/styles/fabric.css +1 -0
- package/styles/fluent-dark.css +1 -0
- package/styles/fluent.css +1 -0
- package/styles/fluent2.css +1 -0
- package/styles/highcontrast-light.css +1 -0
- package/styles/highcontrast.css +1 -0
- package/styles/material-dark.css +1 -0
- package/styles/material.css +1 -0
- package/styles/material3-dark.css +1 -0
- package/styles/material3.css +1 -0
- package/styles/ribbon/_layout.scss +1 -0
- package/styles/ribbon/bootstrap-dark.css +1 -0
- package/styles/ribbon/bootstrap.css +1 -0
- package/styles/ribbon/bootstrap4.css +1 -0
- package/styles/ribbon/bootstrap5-dark.css +1 -0
- package/styles/ribbon/bootstrap5.css +1 -0
- package/styles/ribbon/fabric-dark.css +1 -0
- package/styles/ribbon/fabric.css +1 -0
- package/styles/ribbon/fluent-dark.css +1 -0
- package/styles/ribbon/fluent.css +1 -0
- package/styles/ribbon/fluent2.css +1 -0
- package/styles/ribbon/highcontrast-light.css +1 -0
- package/styles/ribbon/highcontrast.css +1 -0
- package/styles/ribbon/material-dark.css +1 -0
- package/styles/ribbon/material.css +1 -0
- package/styles/ribbon/material3-dark.css +1 -0
- package/styles/ribbon/material3.css +1 -0
- package/styles/ribbon/tailwind-dark.css +1 -0
- package/styles/ribbon/tailwind.css +1 -0
- package/styles/tailwind-dark.css +1 -0
- package/styles/tailwind.css +1 -0
|
@@ -4588,6 +4588,9 @@ var RibbonGallery = /** @__PURE__ @class */ (function () {
|
|
|
4588
4588
|
id: item.id
|
|
4589
4589
|
});
|
|
4590
4590
|
itemEle.appendChild(buttonEle);
|
|
4591
|
+
if (itemEle.querySelector('.e-ribbon-gallery-wrapper').classList.contains('e-disabled')) {
|
|
4592
|
+
buttonEle.classList.add('e-disabled');
|
|
4593
|
+
}
|
|
4591
4594
|
itemEle.querySelector('.e-ribbon-gallery-wrapper').classList.add('e-hidden');
|
|
4592
4595
|
itemEle.querySelectorAll('.e-ribbon-gallery-container').forEach(function (ele) {
|
|
4593
4596
|
ele.classList.add('e-hidden');
|
|
@@ -5410,9 +5413,11 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
|
|
|
5410
5413
|
}
|
|
5411
5414
|
});
|
|
5412
5415
|
};
|
|
5413
|
-
Ribbon.prototype.toggleLayout = function () {
|
|
5416
|
+
Ribbon.prototype.toggleLayout = function (args) {
|
|
5414
5417
|
this.setProperties({ activeLayout: this.activeLayout === 'Simplified' ? 'Classic' : 'Simplified' }, true);
|
|
5415
5418
|
this.switchLayout();
|
|
5419
|
+
var eventArgs = { activeLayout: this.activeLayout, event: args };
|
|
5420
|
+
this.trigger('ribbonLayoutSwitched', eventArgs);
|
|
5416
5421
|
};
|
|
5417
5422
|
Ribbon.prototype.tabCreated = function () {
|
|
5418
5423
|
if (!this.hideLayoutSwitcher) {
|
|
@@ -7174,10 +7179,10 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
|
|
|
7174
7179
|
id: this.tabObj.element.id + COLLAPSE_BUTTON_ID,
|
|
7175
7180
|
attrs: { 'tabindex': '0', 'type': 'button', 'aria-label': 'Layout Switcher', 'role': 'button' }
|
|
7176
7181
|
});
|
|
7177
|
-
this.collapseButton.onclick = function () { _this.toggleLayout(); };
|
|
7182
|
+
this.collapseButton.onclick = function (e) { _this.toggleLayout(e); };
|
|
7178
7183
|
this.collapseButton.onkeydown = function (e) {
|
|
7179
7184
|
if (e.key === 'Enter') {
|
|
7180
|
-
_this.toggleLayout();
|
|
7185
|
+
_this.toggleLayout(e);
|
|
7181
7186
|
}
|
|
7182
7187
|
};
|
|
7183
7188
|
this.element.classList.add(RIBBON_COLLAPSIBLE);
|
|
@@ -8057,10 +8062,18 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
|
|
|
8057
8062
|
for (var i = 0; i < galleryPopupEle.length; i++) {
|
|
8058
8063
|
galleryPopupEle[parseInt(i.toString(), 10)].remove();
|
|
8059
8064
|
}
|
|
8065
|
+
var galleryPopupBtn = document.querySelector('#' + item.id + '_popupButton');
|
|
8066
|
+
if (galleryPopupBtn) {
|
|
8067
|
+
galleryPopupBtn.remove();
|
|
8068
|
+
}
|
|
8069
|
+
var galleryWrapper = document.querySelector('#' + item.id + '_galleryWrapper');
|
|
8070
|
+
if (galleryWrapper) {
|
|
8071
|
+
galleryWrapper.remove();
|
|
8072
|
+
}
|
|
8060
8073
|
}
|
|
8061
8074
|
else {
|
|
8062
8075
|
var galleryEle = ele.querySelectorAll('.e-ribbon-gallery-item');
|
|
8063
|
-
var galleryPopupBtn = ele.querySelector('#' + item.id + '_popupButton');
|
|
8076
|
+
var galleryPopupBtn = ele.parentElement.querySelector('#' + item.id + '_popupButton');
|
|
8064
8077
|
if (galleryPopupBtn) {
|
|
8065
8078
|
galleryPopupBtn.remove();
|
|
8066
8079
|
}
|
|
@@ -9410,6 +9423,17 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
|
|
|
9410
9423
|
else {
|
|
9411
9424
|
itemContainer = groupContainer.querySelector('#' + itemId + CONTAINER_ID);
|
|
9412
9425
|
itemEle = contentEle.querySelector('#' + itemId);
|
|
9426
|
+
if (!itemContainer) {
|
|
9427
|
+
itemContainer = dropdown ? dropdown.target.querySelector('#' + itemId + CONTAINER_ID) : groupContainer.querySelector('#' + itemId + CONTAINER_ID);
|
|
9428
|
+
}
|
|
9429
|
+
if (!itemEle) {
|
|
9430
|
+
itemEle = dropdown ? dropdown.target.querySelector('#' + itemId) : contentEle.querySelector('#' + itemId);
|
|
9431
|
+
}
|
|
9432
|
+
if (itemProp.item.type === 'Gallery') {
|
|
9433
|
+
if (!itemEle) {
|
|
9434
|
+
itemEle = contentEle.querySelector('#' + itemId + '_galleryWrapper');
|
|
9435
|
+
}
|
|
9436
|
+
}
|
|
9413
9437
|
if (itemProp.item.type === 'GroupButton' && this.activeLayout === RibbonLayout.Classic) {
|
|
9414
9438
|
itemEle = contentEle.querySelector('#' + itemId + RIBBON_GROUP_BUTTON_ID);
|
|
9415
9439
|
}
|
|
@@ -9438,12 +9462,6 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
|
|
|
9438
9462
|
ribbonItem.setProperties(item, true);
|
|
9439
9463
|
this.validateItemSize();
|
|
9440
9464
|
if (contentEle.innerHTML !== '') {
|
|
9441
|
-
if (!(this.activeLayout === RibbonLayout.Simplified && ribbonItem.displayOptions === DisplayMode.Overflow)) {
|
|
9442
|
-
itemContainer = groupContainer.querySelector('#' + itemId + CONTAINER_ID);
|
|
9443
|
-
}
|
|
9444
|
-
else {
|
|
9445
|
-
itemContainer = dropdown.target.querySelector('#' + itemId + CONTAINER_ID);
|
|
9446
|
-
}
|
|
9447
9465
|
// To avoid undefined items condition is added
|
|
9448
9466
|
if (ribbonItem.ribbonTooltipSettings && isTooltipPresent(ribbonItem.ribbonTooltipSettings)) {
|
|
9449
9467
|
itemContainer.classList.add(RIBBON_TOOLTIP_TARGET);
|
|
@@ -9467,6 +9485,9 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
|
|
|
9467
9485
|
}
|
|
9468
9486
|
}
|
|
9469
9487
|
this.createRibbonItem(ribbonItem, itemContainer);
|
|
9488
|
+
if (itemProp.item.type === 'Gallery' && document.querySelector('#' + itemId + '_container').closest('.e-ribbon-overflow-target') && item.displayOptions !== DisplayMode.Overflow) {
|
|
9489
|
+
this.createOverflowPopup(itemProp.item, itemProp.tabIndex, itemProp.group.enableGroupOverflow, itemProp.group.id, itemProp.group.header, itemContainer, groupContainer);
|
|
9490
|
+
}
|
|
9470
9491
|
if (this.activeLayout === 'Simplified' && itemProp.group.enableGroupOverflow) {
|
|
9471
9492
|
if (dropdown.target.childElementCount === 0 ||
|
|
9472
9493
|
(dropdown.target.childElementCount === 1 &&
|
|
@@ -9547,6 +9568,7 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
|
|
|
9547
9568
|
};
|
|
9548
9569
|
Ribbon.prototype.enableDisableItem = function (itemId, isDisabled) {
|
|
9549
9570
|
var isUpdated = false;
|
|
9571
|
+
var isOverflow = false;
|
|
9550
9572
|
var itemProp = getItem(this.tabs, itemId);
|
|
9551
9573
|
if (!itemProp) {
|
|
9552
9574
|
return;
|
|
@@ -9556,6 +9578,15 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
|
|
|
9556
9578
|
if (itemProp.item.type === 'GroupButton') {
|
|
9557
9579
|
ele = getItemElement(this, itemId + RIBBON_GROUP_BUTTON_ID, itemProp);
|
|
9558
9580
|
}
|
|
9581
|
+
else if (itemProp.item.type === 'Gallery') {
|
|
9582
|
+
ele = document.querySelector('#' + itemId);
|
|
9583
|
+
if (!ele) {
|
|
9584
|
+
ele = document.querySelector('#' + itemId + '_galleryWrapper');
|
|
9585
|
+
}
|
|
9586
|
+
else {
|
|
9587
|
+
isOverflow = true;
|
|
9588
|
+
}
|
|
9589
|
+
}
|
|
9559
9590
|
else {
|
|
9560
9591
|
ele = getItemElement(this, itemId, itemProp);
|
|
9561
9592
|
}
|
|
@@ -9579,6 +9610,14 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
|
|
|
9579
9610
|
updateControlDisabled(btnEle, 'btn', isDisabled);
|
|
9580
9611
|
}
|
|
9581
9612
|
}
|
|
9613
|
+
else if (moduleName === 'gallery') {
|
|
9614
|
+
ele.classList.toggle(DISABLED_CSS, isDisabled);
|
|
9615
|
+
document.getElementById(itemId + '_popupButton').classList.toggle(DISABLED_CSS, isDisabled);
|
|
9616
|
+
if (isOverflow) {
|
|
9617
|
+
var galleryEle = document.getElementById(itemId + '_galleryWrapper');
|
|
9618
|
+
galleryEle.classList.toggle(DISABLED_CSS, isDisabled);
|
|
9619
|
+
}
|
|
9620
|
+
}
|
|
9582
9621
|
else {
|
|
9583
9622
|
updateControlDisabled(ele, moduleName, isDisabled);
|
|
9584
9623
|
}
|
|
@@ -9830,6 +9869,9 @@ var Ribbon = /** @__PURE__ @class */ (function (_super) {
|
|
|
9830
9869
|
__decorate$l([
|
|
9831
9870
|
Event()
|
|
9832
9871
|
], Ribbon.prototype, "ribbonCollapsing", void 0);
|
|
9872
|
+
__decorate$l([
|
|
9873
|
+
Event()
|
|
9874
|
+
], Ribbon.prototype, "ribbonLayoutSwitched", void 0);
|
|
9833
9875
|
__decorate$l([
|
|
9834
9876
|
Event()
|
|
9835
9877
|
], Ribbon.prototype, "launcherIconClick", void 0);
|