@syncfusion/ej2-splitbuttons 20.4.42 → 20.4.50

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,4 +1,4 @@
1
- import { Animation, ChildProperty, Collection, Complex, Component, Event, EventHandler, KeyboardEvents, NotifyPropertyChanges, Property, SanitizeHtmlHelper, addClass, attributes, classList, closest, createElement, deleteObject, detach, extend, getComponent, getInstance, getUniqueID, getValue, isNullOrUndefined, remove, removeClass, rippleEffect, select, setValue } from '@syncfusion/ej2-base';
1
+ import { Animation, ChildProperty, Collection, Complex, Component, Event, EventHandler, KeyboardEvents, NotifyPropertyChanges, Property, SanitizeHtmlHelper, addClass, attributes, classList, closest, createElement, deleteObject, detach, extend, getComponent, getInstance, getUniqueID, getValue, isNullOrUndefined, isRippleEnabled, remove, removeClass, rippleEffect, select, setValue } from '@syncfusion/ej2-base';
2
2
  import { Button } from '@syncfusion/ej2-buttons';
3
3
  import { Popup, createSpinner, hideSpinner, showSpinner } from '@syncfusion/ej2-popups';
4
4
 
@@ -111,8 +111,16 @@ function isValidLI(ul, li, index, keyCode, count) {
111
111
  * @param {HTMLElement} popup - Specifies the popup element.
112
112
  * @returns {void}
113
113
  */
114
- function setBlankIconStyle(popup) {
114
+ function setBlankIconStyle(popup, blankIcon) {
115
115
  var blankIconList = [].slice.call(popup.getElementsByClassName('e-blank-icon'));
116
+ if (blankIcon) {
117
+ var menuItem = [].slice.call(popup.getElementsByClassName('e-item'));
118
+ menuItem.forEach(function (li) {
119
+ if (li.style.paddingLeft || li.style.paddingRight) {
120
+ li.removeAttribute('style');
121
+ }
122
+ });
123
+ }
116
124
  if (!blankIconList.length) {
117
125
  return;
118
126
  }
@@ -576,6 +584,9 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
576
584
  EventHandler.remove(popupElement, this.closeActionEvents, this.focusoutHandler);
577
585
  }
578
586
  }
587
+ if (isRippleEnabled && this.rippleFn) {
588
+ this.rippleFn();
589
+ }
579
590
  };
580
591
  /**
581
592
  * Handles the keyboard interactions.
@@ -833,9 +844,13 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
833
844
  }
834
845
  break;
835
846
  case 'cssClass':
836
- if (newProp.cssClass.indexOf(classNames.VERTICAL) > -1) {
847
+ if (newProp.cssClass.indexOf(classNames.VERTICAL) > -1 || oldProp.cssClass.indexOf(classNames.VERTICAL) > -1) {
848
+ if (!this.element.querySelector('span.e-caret')) {
849
+ this.appendArrowSpan();
850
+ }
837
851
  var arrowSpan = this.element.querySelector('span.e-caret');
838
- classList(arrowSpan, ['e-icon-bottom'], ['e-icon-right']);
852
+ newProp.cssClass.indexOf(classNames.VERTICAL) > -1 ? classList(arrowSpan, ['e-icon-bottom'], ['e-icon-right'])
853
+ : classList(arrowSpan, ['e-icon-right'], ['e-icon-bottom']);
839
854
  }
840
855
  if (this.isPopupCreated) {
841
856
  if (oldProp.cssClass) {
@@ -1116,6 +1131,10 @@ var SplitButton = /** @__PURE__ @class */ (function (_super) {
1116
1131
  _this.trigger('select', args);
1117
1132
  };
1118
1133
  dropDownBtnModel.beforeOpen = function (args) {
1134
+ if (_this.createPopupOnClick && _this.items.length == 0) {
1135
+ _this.secondaryBtnObj.dropDown.relateTo = _this.wrapper;
1136
+ _this.dropDown = _this.secondaryBtnObj.dropDown;
1137
+ }
1119
1138
  var callBackPromise = new Deferred();
1120
1139
  _this.trigger('beforeOpen', args, function (observedArgs) {
1121
1140
  callBackPromise.resolve(observedArgs);