@syncfusion/ej2-splitbuttons 19.2.62 → 19.3.47
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/.eslintrc.json +1 -1
- package/CHANGELOG.md +1 -1
- 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 +39 -8
- package/dist/es6/ej2-splitbuttons.es2015.js.map +1 -1
- package/dist/es6/ej2-splitbuttons.es5.js +38 -7
- 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/helpers/e2e/dropdownbuttonHelper.d.ts +42 -0
- package/helpers/e2e/dropdownbuttonHelper.js +39 -0
- package/helpers/e2e/index.d.ts +3 -0
- package/helpers/e2e/index.js +8 -0
- package/helpers/e2e/progressbuttonHelper.d.ts +37 -0
- package/helpers/e2e/progressbuttonHelper.js +36 -0
- package/helpers/e2e/splitbuttonHelper.d.ts +45 -0
- package/helpers/e2e/splitbuttonHelper.js +42 -0
- package/package.json +7 -7
- package/src/drop-down-button/drop-down-button.d.ts +2 -0
- package/src/drop-down-button/drop-down-button.js +37 -6
- package/src/split-button/split-button.d.ts +1 -1
- package/src/split-button/split-button.js +1 -1
- package/styles/bootstrap-dark.css +1 -31
- package/styles/bootstrap.css +1 -19
- package/styles/bootstrap4.css +1 -31
- package/styles/bootstrap5-dark.css +2105 -0
- package/styles/bootstrap5-dark.scss +4 -0
- package/styles/bootstrap5.css +2105 -0
- package/styles/bootstrap5.scss +4 -0
- package/styles/button-group/_bootstrap5-dark-definition.scss +1 -0
- package/styles/button-group/_bootstrap5-definition.scss +31 -0
- package/styles/button-group/_tailwind-dark-definition.scss +1 -30
- package/styles/button-group/_tailwind-definition.scss +1 -0
- package/styles/button-group/_theme.scss +35 -47
- package/styles/button-group/bootstrap-dark.css +1 -31
- package/styles/button-group/bootstrap.css +1 -19
- package/styles/button-group/bootstrap4.css +1 -31
- package/styles/button-group/bootstrap5-dark.css +842 -0
- package/styles/button-group/bootstrap5-dark.scss +4 -0
- package/styles/button-group/bootstrap5.css +842 -0
- package/styles/button-group/bootstrap5.scss +4 -0
- package/styles/button-group/fabric-dark.css +1 -31
- package/styles/button-group/fabric.css +1 -31
- package/styles/button-group/highcontrast-light.css +1 -31
- package/styles/button-group/highcontrast.css +1 -31
- package/styles/button-group/material-dark.css +5 -35
- package/styles/button-group/material.css +1 -31
- package/styles/button-group/tailwind-dark.css +1 -31
- package/styles/button-group/tailwind.css +1 -31
- package/styles/drop-down-button/_bootstrap5-dark-definition.scss +1 -0
- package/styles/drop-down-button/_bootstrap5-definition.scss +51 -0
- package/styles/drop-down-button/_layout.scss +12 -5
- package/styles/drop-down-button/_tailwind-dark-definition.scss +1 -48
- package/styles/drop-down-button/_tailwind-definition.scss +19 -17
- package/styles/drop-down-button/_theme.scss +6 -1
- package/styles/drop-down-button/bootstrap5-dark.css +248 -0
- package/styles/drop-down-button/bootstrap5-dark.scss +6 -0
- package/styles/drop-down-button/bootstrap5.css +248 -0
- package/styles/drop-down-button/bootstrap5.scss +6 -0
- package/styles/drop-down-button/icons/_bootstrap5-dark.scss +1 -0
- package/styles/drop-down-button/icons/_bootstrap5.scss +10 -0
- package/styles/drop-down-button/tailwind-dark.css +5 -0
- package/styles/drop-down-button/tailwind.css +5 -0
- package/styles/fabric-dark.css +1 -31
- package/styles/fabric.css +1 -31
- package/styles/highcontrast-light.css +1 -31
- package/styles/highcontrast.css +1 -31
- package/styles/material-dark.css +15 -45
- package/styles/material.css +2 -32
- package/styles/progress-button/_bootstrap5-dark-definition.scss +1 -0
- package/styles/progress-button/_bootstrap5-definition.scss +21 -0
- package/styles/progress-button/_tailwind-dark-definition.scss +1 -24
- package/styles/progress-button/_tailwind-definition.scss +6 -9
- package/styles/progress-button/_theme.scss +2 -2
- package/styles/progress-button/bootstrap5-dark.css +645 -0
- package/styles/progress-button/bootstrap5-dark.scss +5 -0
- package/styles/progress-button/bootstrap5.css +645 -0
- package/styles/progress-button/bootstrap5.scss +5 -0
- package/styles/progress-button/material-dark.css +9 -9
- package/styles/progress-button/tailwind-dark.css +10 -10
- package/styles/split-button/_bootstrap5-dark-definition.scss +1 -0
- package/styles/split-button/_bootstrap5-definition.scss +25 -0
- package/styles/split-button/_layout.scss +13 -9
- package/styles/split-button/_tailwind-dark-definition.scss +1 -23
- package/styles/split-button/_tailwind-definition.scss +7 -5
- package/styles/split-button/bootstrap5-dark.css +367 -0
- package/styles/split-button/bootstrap5-dark.scss +6 -0
- package/styles/split-button/bootstrap5.css +367 -0
- package/styles/split-button/bootstrap5.scss +6 -0
- package/styles/split-button/material-dark.css +1 -1
- package/styles/split-button/material.css +1 -1
- package/styles/split-button/tailwind-dark.css +2 -0
- package/styles/split-button/tailwind.css +2 -0
- package/styles/tailwind-dark.css +18 -41
- package/styles/tailwind.css +8 -31
|
@@ -393,13 +393,23 @@ let DropDownButton = class DropDownButton extends Component {
|
|
|
393
393
|
}
|
|
394
394
|
this.appendArrowSpan();
|
|
395
395
|
this.setActiveElem([this.element]);
|
|
396
|
-
if (this.target || !this.createPopupOnClick) {
|
|
396
|
+
if ((this.target && !this.isColorPicker()) || !this.createPopupOnClick) {
|
|
397
397
|
this.createPopup();
|
|
398
398
|
}
|
|
399
399
|
else {
|
|
400
400
|
this.isPopupCreated = false;
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
|
+
isColorPicker() {
|
|
404
|
+
if (!this.element) {
|
|
405
|
+
return false;
|
|
406
|
+
}
|
|
407
|
+
const prevElem = this.element.previousSibling;
|
|
408
|
+
if (prevElem && prevElem.classList && prevElem.classList.contains('e-split-colorpicker')) {
|
|
409
|
+
return true;
|
|
410
|
+
}
|
|
411
|
+
return false;
|
|
412
|
+
}
|
|
403
413
|
appendArrowSpan() {
|
|
404
414
|
this.element.appendChild(this.createElement('span', {
|
|
405
415
|
className: 'e-btn-icon e-icons ' + 'e-icon-' + (this.cssClass.indexOf(classNames.VERTICAL) > -1
|
|
@@ -450,6 +460,7 @@ let DropDownButton = class DropDownButton extends Component {
|
|
|
450
460
|
attrList.forEach((key) => {
|
|
451
461
|
this.element.removeAttribute(key);
|
|
452
462
|
});
|
|
463
|
+
this.popupUnWireEvents();
|
|
453
464
|
this.destroyPopup();
|
|
454
465
|
this.isPopupCreated = false;
|
|
455
466
|
if (!this.disabled) {
|
|
@@ -491,16 +502,33 @@ let DropDownButton = class DropDownButton extends Component {
|
|
|
491
502
|
}
|
|
492
503
|
wireEvents() {
|
|
493
504
|
this.delegateMousedownHandler = this.mousedownHandler.bind(this);
|
|
494
|
-
|
|
505
|
+
if (!this.createPopupOnClick) {
|
|
506
|
+
EventHandler.add(document, 'mousedown touchstart', this.delegateMousedownHandler, this);
|
|
507
|
+
}
|
|
495
508
|
EventHandler.add(this.element, 'click', this.clickHandler, this);
|
|
496
509
|
EventHandler.add(this.element, 'keydown', this.keyBoardHandler, this);
|
|
497
510
|
}
|
|
498
511
|
popupWireEvents() {
|
|
499
512
|
const popupElement = this.getPopUpElement();
|
|
500
|
-
|
|
501
|
-
|
|
513
|
+
if (this.createPopupOnClick) {
|
|
514
|
+
EventHandler.add(document, 'mousedown touchstart', this.delegateMousedownHandler, this);
|
|
515
|
+
}
|
|
516
|
+
if (popupElement) {
|
|
517
|
+
EventHandler.add(popupElement, 'click', this.clickHandler, this);
|
|
518
|
+
EventHandler.add(popupElement, 'keydown', this.keyBoardHandler, this);
|
|
519
|
+
}
|
|
502
520
|
this.rippleFn = rippleEffect(popupElement, { selector: '.' + classNames.ITEM });
|
|
503
521
|
}
|
|
522
|
+
popupUnWireEvents() {
|
|
523
|
+
const popupElement = this.getPopUpElement();
|
|
524
|
+
if (this.createPopupOnClick) {
|
|
525
|
+
EventHandler.remove(document, 'mousedown touchstart', this.delegateMousedownHandler);
|
|
526
|
+
}
|
|
527
|
+
if (popupElement && popupElement.parentElement) {
|
|
528
|
+
EventHandler.remove(popupElement, 'click', this.clickHandler);
|
|
529
|
+
EventHandler.remove(popupElement, 'keydown', this.keyBoardHandler);
|
|
530
|
+
}
|
|
531
|
+
}
|
|
504
532
|
/**
|
|
505
533
|
* Handles the keyboard interactions.
|
|
506
534
|
*
|
|
@@ -569,7 +597,7 @@ let DropDownButton = class DropDownButton extends Component {
|
|
|
569
597
|
clickHandler(e) {
|
|
570
598
|
const trgt = e.target;
|
|
571
599
|
if (closest(trgt, '[id="' + this.element.id + '"]')) {
|
|
572
|
-
if (!this.createPopupOnClick || this.target) {
|
|
600
|
+
if (!this.createPopupOnClick || (this.target && !this.isColorPicker())) {
|
|
573
601
|
if (this.getPopUpElement().classList.contains('e-popup-close')) {
|
|
574
602
|
this.openPopUp(e);
|
|
575
603
|
}
|
|
@@ -625,12 +653,13 @@ let DropDownButton = class DropDownButton extends Component {
|
|
|
625
653
|
closePopup(e = null, focusEle) {
|
|
626
654
|
const ul = this.getULElement();
|
|
627
655
|
const beforeCloseArgs = { element: ul, items: this.items, event: e, cancel: false };
|
|
628
|
-
|
|
656
|
+
let popupElement = this.getPopUpElement();
|
|
629
657
|
if (popupElement) {
|
|
630
658
|
EventHandler.remove(popupElement, 'keydown', this.keyBoardHandler);
|
|
631
659
|
}
|
|
632
660
|
this.trigger('beforeClose', beforeCloseArgs, (observedArgs) => {
|
|
633
661
|
if (!observedArgs.cancel) {
|
|
662
|
+
this.popupUnWireEvents();
|
|
634
663
|
const ul = this.getULElement();
|
|
635
664
|
const selectedLi = ul.querySelector('.e-selected');
|
|
636
665
|
if (selectedLi) {
|
|
@@ -659,7 +688,9 @@ let DropDownButton = class DropDownButton extends Component {
|
|
|
659
688
|
});
|
|
660
689
|
}
|
|
661
690
|
unWireEvents() {
|
|
662
|
-
|
|
691
|
+
if (!this.createPopupOnClick) {
|
|
692
|
+
EventHandler.remove(document, 'mousedown touchstart', this.delegateMousedownHandler);
|
|
693
|
+
}
|
|
663
694
|
EventHandler.remove(this.element, 'click', this.clickHandler);
|
|
664
695
|
EventHandler.remove(this.element, 'keydown', this.keyBoardHandler);
|
|
665
696
|
if (this.isPopupCreated) {
|
|
@@ -865,7 +896,7 @@ let SplitButton = class SplitButton extends DropDownButton {
|
|
|
865
896
|
}
|
|
866
897
|
}
|
|
867
898
|
/**
|
|
868
|
-
* Initialize the Component rendering
|
|
899
|
+
* Initialize the Component rendering.
|
|
869
900
|
*
|
|
870
901
|
* @returns {void}
|
|
871
902
|
* @private
|