@syncfusion/ej2-splitbuttons 24.2.3 → 24.2.7

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.
@@ -672,6 +672,7 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
672
672
  return;
673
673
  }
674
674
  if (e.keyCode === 13 && this.activeElem[0].classList.contains('e-split-btn')) {
675
+ this.triggerSelect(e);
675
676
  this.activeElem[0].focus();
676
677
  return;
677
678
  }
@@ -738,22 +739,28 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
738
739
  }
739
740
  else {
740
741
  if (closest(trgt, '[id="' + this.getPopUpElement().id + '"]')) {
741
- var eventArgs = void 0;
742
- var liIdx = void 0;
743
- var item = void 0;
744
- var li = this.getLI(trgt);
742
+ var li = this.getLI(e.target);
745
743
  if (li) {
746
- liIdx = Array.prototype.indexOf.call(this.getULElement().children, li);
747
- item = this.items[liIdx];
748
- if (item) {
749
- eventArgs = { element: li, item: item, event: e };
750
- this.trigger('select', eventArgs);
751
- }
744
+ this.triggerSelect(e);
752
745
  this.closePopup(e, this.activeElem[0]);
753
746
  }
754
747
  }
755
748
  }
756
749
  };
750
+ DropDownButton.prototype.triggerSelect = function (e) {
751
+ var eventArgs;
752
+ var liIdx;
753
+ var item;
754
+ var li = this.getLI(e.target);
755
+ if (li) {
756
+ liIdx = Array.prototype.indexOf.call(this.getULElement().children, li);
757
+ item = this.items[liIdx];
758
+ if (item) {
759
+ eventArgs = { element: li, item: item, event: e };
760
+ this.trigger('select', eventArgs);
761
+ }
762
+ }
763
+ };
757
764
  DropDownButton.prototype.openPopUp = function (e) {
758
765
  var _this = this;
759
766
  if (e === void 0) { e = null; }
@@ -1835,7 +1842,7 @@ var ProgressButton = /** @__PURE__ @class */ (function (_super) {
1835
1842
  this.step = args.step;
1836
1843
  if ((progressTime - prevProgressTime) % (this.duration * args.step / 100) === 0 || percent === 100) {
1837
1844
  this.timerId = requestAnimationFrame(function () {
1838
- if (_this.enableProgress) {
1845
+ if (_this.enableProgress && _this.getProgress()) {
1839
1846
  _this.getProgress().style[isVertical ? 'height' : 'width'] = percent + '%';
1840
1847
  }
1841
1848
  _this.element.setAttribute('aria-valuenow', percent.toString());
@@ -1852,7 +1859,7 @@ var ProgressButton = /** @__PURE__ @class */ (function (_super) {
1852
1859
  else {
1853
1860
  this.interval = window.setTimeout(function () {
1854
1861
  _this.progressTime = _this.percent = 0;
1855
- if (_this.enableProgress) {
1862
+ if (_this.enableProgress && _this.getProgress()) {
1856
1863
  _this.getProgress().style[isVertical ? 'height' : 'width'] = '0%';
1857
1864
  }
1858
1865
  _this.element.setAttribute('aria-valuenow', '0');
@@ -1893,7 +1900,7 @@ var ProgressButton = /** @__PURE__ @class */ (function (_super) {
1893
1900
  if (i > 100) {
1894
1901
  i = 100;
1895
1902
  }
1896
- if (this.enableProgress) {
1903
+ if (this.enableProgress && this.getProgress()) {
1897
1904
  this.getProgress().style[isVertical ? 'height' : 'width'] = (this.percent < 100) ? (i + '%') : '100%';
1898
1905
  }
1899
1906
  }