@syncfusion/ej2-ribbon 33.2.3 → 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.
@@ -4322,7 +4322,7 @@ var RibbonGallery = /** @__PURE__ @class */ (function () {
4322
4322
  RibbonGallery.prototype.setWrapperStyle = function (popup, popupContainerItems) {
4323
4323
  if (popup.width !== 'auto') {
4324
4324
  popupContainerItems.forEach(function (ele) {
4325
- ele.style.flexFlow = 'wrap';
4325
+ ele.style.flexFlow = 'column wrap';
4326
4326
  });
4327
4327
  }
4328
4328
  };
@@ -4552,12 +4552,12 @@ var RibbonGallery = /** @__PURE__ @class */ (function () {
4552
4552
  RibbonGallery.prototype.addOverFlowEvents = function (item, itemEle) {
4553
4553
  var _this = this;
4554
4554
  if (itemEle.closest('.e-ribbon-overflow-target')) {
4555
- var buttonEle = this.parent.createElement('button', {
4555
+ var buttonEle_1 = this.parent.createElement('button', {
4556
4556
  id: item.id
4557
4557
  });
4558
- itemEle.appendChild(buttonEle);
4558
+ itemEle.appendChild(buttonEle_1);
4559
4559
  if (itemEle.querySelector('.e-ribbon-gallery-wrapper').classList.contains('e-disabled')) {
4560
- buttonEle.classList.add('e-disabled');
4560
+ buttonEle_1.classList.add('e-disabled');
4561
4561
  }
4562
4562
  itemEle.querySelector('.e-ribbon-gallery-wrapper').classList.add('e-hidden');
4563
4563
  itemEle.querySelectorAll('.e-ribbon-gallery-container').forEach(function (ele) {
@@ -4597,6 +4597,9 @@ var RibbonGallery = /** @__PURE__ @class */ (function () {
4597
4597
  var popupContainerItems = popupContainerEle_1.querySelectorAll('.e-ribbon-gallery-container');
4598
4598
  _this.setWrapperStyle(popup_1, popupContainerItems);
4599
4599
  _this.setFoucsToFirstItem(popupContainerEle_1, true, item.id);
4600
+ if (popup_1.width !== 'auto') {
4601
+ _this.alignGalleryPopupLeft(popupContainerEle_1, buttonEle_1);
4602
+ }
4600
4603
  },
4601
4604
  beforeClose: function (args) {
4602
4605
  var isCancelled = _this.popupEvents(args.event, item.gallerySettings, 'popupClose', false);
@@ -4604,7 +4607,7 @@ var RibbonGallery = /** @__PURE__ @class */ (function () {
4604
4607
  args.cancel = true;
4605
4608
  }
4606
4609
  }
4607
- }, buttonEle);
4610
+ }, buttonEle_1);
4608
4611
  if (popup_1.width !== 'auto') {
4609
4612
  dropdown.dropDown.width = formatUnit(popup_1.width);
4610
4613
  }
@@ -4768,6 +4771,22 @@ var RibbonGallery = /** @__PURE__ @class */ (function () {
4768
4771
  _this.handleGalleryPopupNavigation(e, popupEle, isDropdown, itemID, popup, gallerySettings);
4769
4772
  };
4770
4773
  };
4774
+ RibbonGallery.prototype.alignGalleryPopupLeft = function (popup, buttonEle) {
4775
+ var popupEl = popup.parentElement;
4776
+ if (!popupEl) {
4777
+ return;
4778
+ }
4779
+ var currentLeft = parseFloat(popupEl.style.left);
4780
+ var buttonRect = buttonEle.getBoundingClientRect();
4781
+ var popupWidth = popupEl.offsetWidth;
4782
+ var targetLeft = buttonRect.left - popupWidth - 1;
4783
+ if (targetLeft < 0) {
4784
+ targetLeft = 1;
4785
+ }
4786
+ if (Math.abs(currentLeft - targetLeft) > 1) {
4787
+ popupEl.style.left = targetLeft + "px";
4788
+ }
4789
+ };
4771
4790
  RibbonGallery.prototype.handleGalleryPopupNavigation = function (e, popupEle, isDropdown, itemID, popup, gallerySettings) {
4772
4791
  var galleryPopupEle = popupEle.querySelectorAll('.e-ribbon-gallery-item');
4773
4792
  if (galleryPopupEle) {