@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.
- package/CHANGELOG.md +21 -0
- package/dist/ej2-splitbuttons.min.js +2 -2
- package/dist/ej2-splitbuttons.umd.min.js +2 -2
- package/dist/ej2-splitbuttons.umd.min.js.map +1 -1
- package/dist/es6/ej2-splitbuttons.es2015.js +23 -4
- package/dist/es6/ej2-splitbuttons.es2015.js.map +1 -1
- package/dist/es6/ej2-splitbuttons.es5.js +23 -4
- package/dist/es6/ej2-splitbuttons.es5.js.map +1 -1
- package/dist/global/ej2-splitbuttons.min.js +2 -2
- package/dist/global/ej2-splitbuttons.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +7 -7
- package/src/common/common.d.ts +1 -1
- package/src/common/common.js +9 -1
- package/src/drop-down-button/drop-down-button-model.d.ts +1 -1
- package/src/drop-down-button/drop-down-button.js +10 -3
- package/src/progress-button/progress-button-model.d.ts +1 -1
- package/src/progress-button/progress-button.d.ts +1 -1
- package/src/split-button/split-button.js +4 -0
- package/styles/drop-down-button/_layout.scss +3 -0
- package/styles/drop-down-button/fluent-dark.css +1 -0
- package/styles/drop-down-button/fluent.css +1 -0
- package/styles/drop-down-button/highcontrast.css +1 -0
- package/styles/fluent-dark.css +1 -0
- package/styles/fluent.css +1 -0
- package/styles/highcontrast.css +1 -0
|
@@ -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
|
|
|
@@ -96,8 +96,16 @@ function isValidLI(ul, li, index, keyCode, count = 0) {
|
|
|
96
96
|
* @param {HTMLElement} popup - Specifies the popup element.
|
|
97
97
|
* @returns {void}
|
|
98
98
|
*/
|
|
99
|
-
function setBlankIconStyle(popup) {
|
|
99
|
+
function setBlankIconStyle(popup, blankIcon) {
|
|
100
100
|
const blankIconList = [].slice.call(popup.getElementsByClassName('e-blank-icon'));
|
|
101
|
+
if (blankIcon) {
|
|
102
|
+
const menuItem = [].slice.call(popup.getElementsByClassName('e-item'));
|
|
103
|
+
menuItem.forEach((li) => {
|
|
104
|
+
if (li.style.paddingLeft || li.style.paddingRight) {
|
|
105
|
+
li.removeAttribute('style');
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
}
|
|
101
109
|
if (!blankIconList.length) {
|
|
102
110
|
return;
|
|
103
111
|
}
|
|
@@ -542,6 +550,9 @@ let DropDownButton = class DropDownButton extends Component {
|
|
|
542
550
|
EventHandler.remove(popupElement, this.closeActionEvents, this.focusoutHandler);
|
|
543
551
|
}
|
|
544
552
|
}
|
|
553
|
+
if (isRippleEnabled && this.rippleFn) {
|
|
554
|
+
this.rippleFn();
|
|
555
|
+
}
|
|
545
556
|
}
|
|
546
557
|
/**
|
|
547
558
|
* Handles the keyboard interactions.
|
|
@@ -794,9 +805,13 @@ let DropDownButton = class DropDownButton extends Component {
|
|
|
794
805
|
}
|
|
795
806
|
break;
|
|
796
807
|
case 'cssClass':
|
|
797
|
-
if (newProp.cssClass.indexOf(classNames.VERTICAL) > -1) {
|
|
808
|
+
if (newProp.cssClass.indexOf(classNames.VERTICAL) > -1 || oldProp.cssClass.indexOf(classNames.VERTICAL) > -1) {
|
|
809
|
+
if (!this.element.querySelector('span.e-caret')) {
|
|
810
|
+
this.appendArrowSpan();
|
|
811
|
+
}
|
|
798
812
|
const arrowSpan = this.element.querySelector('span.e-caret');
|
|
799
|
-
classList(arrowSpan, ['e-icon-bottom'], ['e-icon-right'])
|
|
813
|
+
newProp.cssClass.indexOf(classNames.VERTICAL) > -1 ? classList(arrowSpan, ['e-icon-bottom'], ['e-icon-right'])
|
|
814
|
+
: classList(arrowSpan, ['e-icon-right'], ['e-icon-bottom']);
|
|
800
815
|
}
|
|
801
816
|
if (this.isPopupCreated) {
|
|
802
817
|
if (oldProp.cssClass) {
|
|
@@ -1061,6 +1076,10 @@ let SplitButton = class SplitButton extends DropDownButton {
|
|
|
1061
1076
|
this.trigger('select', args);
|
|
1062
1077
|
};
|
|
1063
1078
|
dropDownBtnModel.beforeOpen = (args) => {
|
|
1079
|
+
if (this.createPopupOnClick && this.items.length == 0) {
|
|
1080
|
+
this.secondaryBtnObj.dropDown.relateTo = this.wrapper;
|
|
1081
|
+
this.dropDown = this.secondaryBtnObj.dropDown;
|
|
1082
|
+
}
|
|
1064
1083
|
const callBackPromise = new Deferred();
|
|
1065
1084
|
this.trigger('beforeOpen', args, (observedArgs) => {
|
|
1066
1085
|
callBackPromise.resolve(observedArgs);
|