@syncfusion/ej2-ribbon 33.1.49 → 33.2.4

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 33.1.49
3
+ * version : 33.2.4
4
4
  * Copyright Syncfusion Inc. 2001 - 2025. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncfusion/ej2-ribbon",
3
- "version": "33.1.49",
3
+ "version": "33.2.4",
4
4
  "description": "Essential JS 2 Component",
5
5
  "author": "Syncfusion Inc.",
6
6
  "license": "SEE LICENSE IN license",
@@ -9,13 +9,13 @@
9
9
  "es2015": "./dist/es6/ej2-ribbon.es5.js",
10
10
  "typings": "index.d.ts",
11
11
  "dependencies": {
12
- "@syncfusion/ej2-base": "~33.1.45",
13
- "@syncfusion/ej2-buttons": "~33.1.49",
14
- "@syncfusion/ej2-dropdowns": "~33.1.49",
15
- "@syncfusion/ej2-lists": "~33.1.47",
16
- "@syncfusion/ej2-navigations": "~33.1.49",
17
- "@syncfusion/ej2-popups": "~33.1.44",
18
- "@syncfusion/ej2-splitbuttons": "~33.1.49"
12
+ "@syncfusion/ej2-base": "~33.2.3",
13
+ "@syncfusion/ej2-buttons": "~33.2.3",
14
+ "@syncfusion/ej2-dropdowns": "~33.2.4",
15
+ "@syncfusion/ej2-lists": "~33.2.3",
16
+ "@syncfusion/ej2-navigations": "~33.2.4",
17
+ "@syncfusion/ej2-popups": "~33.2.3",
18
+ "@syncfusion/ej2-splitbuttons": "~33.2.3"
19
19
  },
20
20
  "devDependencies": {},
21
21
  "keywords": [
@@ -91,6 +91,7 @@ export declare class RibbonGallery {
91
91
  */
92
92
  hideGalleryPopup(id: string): void;
93
93
  private setFoucsToFirstItem;
94
+ private alignGalleryPopupLeft;
94
95
  private handleGalleryPopupNavigation;
95
96
  private createGalleryTemplate;
96
97
  private createGalleryPopupTemplate;
@@ -269,7 +269,7 @@ var RibbonGallery = /** @class */ (function () {
269
269
  RibbonGallery.prototype.setWrapperStyle = function (popup, popupContainerItems) {
270
270
  if (popup.width !== 'auto') {
271
271
  popupContainerItems.forEach(function (ele) {
272
- ele.style.flexFlow = 'wrap';
272
+ ele.style.flexFlow = 'column wrap';
273
273
  });
274
274
  }
275
275
  };
@@ -499,12 +499,12 @@ var RibbonGallery = /** @class */ (function () {
499
499
  RibbonGallery.prototype.addOverFlowEvents = function (item, itemEle) {
500
500
  var _this = this;
501
501
  if (itemEle.closest('.e-ribbon-overflow-target')) {
502
- var buttonEle = this.parent.createElement('button', {
502
+ var buttonEle_1 = this.parent.createElement('button', {
503
503
  id: item.id
504
504
  });
505
- itemEle.appendChild(buttonEle);
505
+ itemEle.appendChild(buttonEle_1);
506
506
  if (itemEle.querySelector('.e-ribbon-gallery-wrapper').classList.contains('e-disabled')) {
507
- buttonEle.classList.add('e-disabled');
507
+ buttonEle_1.classList.add('e-disabled');
508
508
  }
509
509
  itemEle.querySelector('.e-ribbon-gallery-wrapper').classList.add('e-hidden');
510
510
  itemEle.querySelectorAll('.e-ribbon-gallery-container').forEach(function (ele) {
@@ -544,6 +544,9 @@ var RibbonGallery = /** @class */ (function () {
544
544
  var popupContainerItems = popupContainerEle_1.querySelectorAll('.e-ribbon-gallery-container');
545
545
  _this.setWrapperStyle(popup_1, popupContainerItems);
546
546
  _this.setFoucsToFirstItem(popupContainerEle_1, true, item.id);
547
+ if (popup_1.width !== 'auto') {
548
+ _this.alignGalleryPopupLeft(popupContainerEle_1, buttonEle_1);
549
+ }
547
550
  },
548
551
  beforeClose: function (args) {
549
552
  var isCancelled = _this.popupEvents(args.event, item.gallerySettings, 'popupClose', false);
@@ -551,7 +554,7 @@ var RibbonGallery = /** @class */ (function () {
551
554
  args.cancel = true;
552
555
  }
553
556
  }
554
- }, buttonEle);
557
+ }, buttonEle_1);
555
558
  if (popup_1.width !== 'auto') {
556
559
  dropdown.dropDown.width = formatUnit(popup_1.width);
557
560
  }
@@ -715,6 +718,22 @@ var RibbonGallery = /** @class */ (function () {
715
718
  _this.handleGalleryPopupNavigation(e, popupEle, isDropdown, itemID, popup, gallerySettings);
716
719
  };
717
720
  };
721
+ RibbonGallery.prototype.alignGalleryPopupLeft = function (popup, buttonEle) {
722
+ var popupEl = popup.parentElement;
723
+ if (!popupEl) {
724
+ return;
725
+ }
726
+ var currentLeft = parseFloat(popupEl.style.left);
727
+ var buttonRect = buttonEle.getBoundingClientRect();
728
+ var popupWidth = popupEl.offsetWidth;
729
+ var targetLeft = buttonRect.left - popupWidth - 1;
730
+ if (targetLeft < 0) {
731
+ targetLeft = 1;
732
+ }
733
+ if (Math.abs(currentLeft - targetLeft) > 1) {
734
+ popupEl.style.left = targetLeft + "px";
735
+ }
736
+ };
718
737
  RibbonGallery.prototype.handleGalleryPopupNavigation = function (e, popupEle, isDropdown, itemID, popup, gallerySettings) {
719
738
  var galleryPopupEle = popupEle.querySelectorAll('.e-ribbon-gallery-item');
720
739
  if (galleryPopupEle) {