@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.
Files changed (97) hide show
  1. package/.eslintrc.json +1 -1
  2. package/CHANGELOG.md +1 -1
  3. package/dist/ej2-splitbuttons.umd.min.js +2 -2
  4. package/dist/ej2-splitbuttons.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-splitbuttons.es2015.js +39 -8
  6. package/dist/es6/ej2-splitbuttons.es2015.js.map +1 -1
  7. package/dist/es6/ej2-splitbuttons.es5.js +38 -7
  8. package/dist/es6/ej2-splitbuttons.es5.js.map +1 -1
  9. package/dist/global/ej2-splitbuttons.min.js +2 -2
  10. package/dist/global/ej2-splitbuttons.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/helpers/e2e/dropdownbuttonHelper.d.ts +42 -0
  13. package/helpers/e2e/dropdownbuttonHelper.js +39 -0
  14. package/helpers/e2e/index.d.ts +3 -0
  15. package/helpers/e2e/index.js +8 -0
  16. package/helpers/e2e/progressbuttonHelper.d.ts +37 -0
  17. package/helpers/e2e/progressbuttonHelper.js +36 -0
  18. package/helpers/e2e/splitbuttonHelper.d.ts +45 -0
  19. package/helpers/e2e/splitbuttonHelper.js +42 -0
  20. package/package.json +7 -7
  21. package/src/drop-down-button/drop-down-button.d.ts +2 -0
  22. package/src/drop-down-button/drop-down-button.js +37 -6
  23. package/src/split-button/split-button.d.ts +1 -1
  24. package/src/split-button/split-button.js +1 -1
  25. package/styles/bootstrap-dark.css +1 -31
  26. package/styles/bootstrap.css +1 -19
  27. package/styles/bootstrap4.css +1 -31
  28. package/styles/bootstrap5-dark.css +2105 -0
  29. package/styles/bootstrap5-dark.scss +4 -0
  30. package/styles/bootstrap5.css +2105 -0
  31. package/styles/bootstrap5.scss +4 -0
  32. package/styles/button-group/_bootstrap5-dark-definition.scss +1 -0
  33. package/styles/button-group/_bootstrap5-definition.scss +31 -0
  34. package/styles/button-group/_tailwind-dark-definition.scss +1 -30
  35. package/styles/button-group/_tailwind-definition.scss +1 -0
  36. package/styles/button-group/_theme.scss +35 -47
  37. package/styles/button-group/bootstrap-dark.css +1 -31
  38. package/styles/button-group/bootstrap.css +1 -19
  39. package/styles/button-group/bootstrap4.css +1 -31
  40. package/styles/button-group/bootstrap5-dark.css +842 -0
  41. package/styles/button-group/bootstrap5-dark.scss +4 -0
  42. package/styles/button-group/bootstrap5.css +842 -0
  43. package/styles/button-group/bootstrap5.scss +4 -0
  44. package/styles/button-group/fabric-dark.css +1 -31
  45. package/styles/button-group/fabric.css +1 -31
  46. package/styles/button-group/highcontrast-light.css +1 -31
  47. package/styles/button-group/highcontrast.css +1 -31
  48. package/styles/button-group/material-dark.css +5 -35
  49. package/styles/button-group/material.css +1 -31
  50. package/styles/button-group/tailwind-dark.css +1 -31
  51. package/styles/button-group/tailwind.css +1 -31
  52. package/styles/drop-down-button/_bootstrap5-dark-definition.scss +1 -0
  53. package/styles/drop-down-button/_bootstrap5-definition.scss +51 -0
  54. package/styles/drop-down-button/_layout.scss +12 -5
  55. package/styles/drop-down-button/_tailwind-dark-definition.scss +1 -48
  56. package/styles/drop-down-button/_tailwind-definition.scss +19 -17
  57. package/styles/drop-down-button/_theme.scss +6 -1
  58. package/styles/drop-down-button/bootstrap5-dark.css +248 -0
  59. package/styles/drop-down-button/bootstrap5-dark.scss +6 -0
  60. package/styles/drop-down-button/bootstrap5.css +248 -0
  61. package/styles/drop-down-button/bootstrap5.scss +6 -0
  62. package/styles/drop-down-button/icons/_bootstrap5-dark.scss +1 -0
  63. package/styles/drop-down-button/icons/_bootstrap5.scss +10 -0
  64. package/styles/drop-down-button/tailwind-dark.css +5 -0
  65. package/styles/drop-down-button/tailwind.css +5 -0
  66. package/styles/fabric-dark.css +1 -31
  67. package/styles/fabric.css +1 -31
  68. package/styles/highcontrast-light.css +1 -31
  69. package/styles/highcontrast.css +1 -31
  70. package/styles/material-dark.css +15 -45
  71. package/styles/material.css +2 -32
  72. package/styles/progress-button/_bootstrap5-dark-definition.scss +1 -0
  73. package/styles/progress-button/_bootstrap5-definition.scss +21 -0
  74. package/styles/progress-button/_tailwind-dark-definition.scss +1 -24
  75. package/styles/progress-button/_tailwind-definition.scss +6 -9
  76. package/styles/progress-button/_theme.scss +2 -2
  77. package/styles/progress-button/bootstrap5-dark.css +645 -0
  78. package/styles/progress-button/bootstrap5-dark.scss +5 -0
  79. package/styles/progress-button/bootstrap5.css +645 -0
  80. package/styles/progress-button/bootstrap5.scss +5 -0
  81. package/styles/progress-button/material-dark.css +9 -9
  82. package/styles/progress-button/tailwind-dark.css +10 -10
  83. package/styles/split-button/_bootstrap5-dark-definition.scss +1 -0
  84. package/styles/split-button/_bootstrap5-definition.scss +25 -0
  85. package/styles/split-button/_layout.scss +13 -9
  86. package/styles/split-button/_tailwind-dark-definition.scss +1 -23
  87. package/styles/split-button/_tailwind-definition.scss +7 -5
  88. package/styles/split-button/bootstrap5-dark.css +367 -0
  89. package/styles/split-button/bootstrap5-dark.scss +6 -0
  90. package/styles/split-button/bootstrap5.css +367 -0
  91. package/styles/split-button/bootstrap5.scss +6 -0
  92. package/styles/split-button/material-dark.css +1 -1
  93. package/styles/split-button/material.css +1 -1
  94. package/styles/split-button/tailwind-dark.css +2 -0
  95. package/styles/split-button/tailwind.css +2 -0
  96. package/styles/tailwind-dark.css +18 -41
  97. package/styles/tailwind.css +8 -31
@@ -425,13 +425,23 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
425
425
  }
426
426
  this.appendArrowSpan();
427
427
  this.setActiveElem([this.element]);
428
- if (this.target || !this.createPopupOnClick) {
428
+ if ((this.target && !this.isColorPicker()) || !this.createPopupOnClick) {
429
429
  this.createPopup();
430
430
  }
431
431
  else {
432
432
  this.isPopupCreated = false;
433
433
  }
434
434
  };
435
+ DropDownButton.prototype.isColorPicker = function () {
436
+ if (!this.element) {
437
+ return false;
438
+ }
439
+ var prevElem = this.element.previousSibling;
440
+ if (prevElem && prevElem.classList && prevElem.classList.contains('e-split-colorpicker')) {
441
+ return true;
442
+ }
443
+ return false;
444
+ };
435
445
  DropDownButton.prototype.appendArrowSpan = function () {
436
446
  this.element.appendChild(this.createElement('span', {
437
447
  className: 'e-btn-icon e-icons ' + 'e-icon-' + (this.cssClass.indexOf(classNames.VERTICAL) > -1
@@ -483,6 +493,7 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
483
493
  attrList.forEach(function (key) {
484
494
  _this.element.removeAttribute(key);
485
495
  });
496
+ this.popupUnWireEvents();
486
497
  this.destroyPopup();
487
498
  this.isPopupCreated = false;
488
499
  if (!this.disabled) {
@@ -524,16 +535,33 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
524
535
  };
525
536
  DropDownButton.prototype.wireEvents = function () {
526
537
  this.delegateMousedownHandler = this.mousedownHandler.bind(this);
527
- EventHandler.add(document, 'mousedown touchstart', this.delegateMousedownHandler, this);
538
+ if (!this.createPopupOnClick) {
539
+ EventHandler.add(document, 'mousedown touchstart', this.delegateMousedownHandler, this);
540
+ }
528
541
  EventHandler.add(this.element, 'click', this.clickHandler, this);
529
542
  EventHandler.add(this.element, 'keydown', this.keyBoardHandler, this);
530
543
  };
531
544
  DropDownButton.prototype.popupWireEvents = function () {
532
545
  var popupElement = this.getPopUpElement();
533
- EventHandler.add(popupElement, 'click', this.clickHandler, this);
534
- EventHandler.add(popupElement, 'keydown', this.keyBoardHandler, this);
546
+ if (this.createPopupOnClick) {
547
+ EventHandler.add(document, 'mousedown touchstart', this.delegateMousedownHandler, this);
548
+ }
549
+ if (popupElement) {
550
+ EventHandler.add(popupElement, 'click', this.clickHandler, this);
551
+ EventHandler.add(popupElement, 'keydown', this.keyBoardHandler, this);
552
+ }
535
553
  this.rippleFn = rippleEffect(popupElement, { selector: '.' + classNames.ITEM });
536
554
  };
555
+ DropDownButton.prototype.popupUnWireEvents = function () {
556
+ var popupElement = this.getPopUpElement();
557
+ if (this.createPopupOnClick) {
558
+ EventHandler.remove(document, 'mousedown touchstart', this.delegateMousedownHandler);
559
+ }
560
+ if (popupElement && popupElement.parentElement) {
561
+ EventHandler.remove(popupElement, 'click', this.clickHandler);
562
+ EventHandler.remove(popupElement, 'keydown', this.keyBoardHandler);
563
+ }
564
+ };
537
565
  /**
538
566
  * Handles the keyboard interactions.
539
567
  *
@@ -602,7 +630,7 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
602
630
  DropDownButton.prototype.clickHandler = function (e) {
603
631
  var trgt = e.target;
604
632
  if (closest(trgt, '[id="' + this.element.id + '"]')) {
605
- if (!this.createPopupOnClick || this.target) {
633
+ if (!this.createPopupOnClick || (this.target && !this.isColorPicker())) {
606
634
  if (this.getPopUpElement().classList.contains('e-popup-close')) {
607
635
  this.openPopUp(e);
608
636
  }
@@ -668,6 +696,7 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
668
696
  }
669
697
  this.trigger('beforeClose', beforeCloseArgs, function (observedArgs) {
670
698
  if (!observedArgs.cancel) {
699
+ _this.popupUnWireEvents();
671
700
  var ul_2 = _this.getULElement();
672
701
  var selectedLi = ul_2.querySelector('.e-selected');
673
702
  if (selectedLi) {
@@ -696,7 +725,9 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
696
725
  });
697
726
  };
698
727
  DropDownButton.prototype.unWireEvents = function () {
699
- EventHandler.remove(document, 'mousedown touchstart', this.delegateMousedownHandler);
728
+ if (!this.createPopupOnClick) {
729
+ EventHandler.remove(document, 'mousedown touchstart', this.delegateMousedownHandler);
730
+ }
700
731
  EventHandler.remove(this.element, 'click', this.clickHandler);
701
732
  EventHandler.remove(this.element, 'keydown', this.keyBoardHandler);
702
733
  if (this.isPopupCreated) {
@@ -918,7 +949,7 @@ var SplitButton = /** @__PURE__ @class */ (function (_super) {
918
949
  }
919
950
  };
920
951
  /**
921
- * Initialize the Component rendering
952
+ * Initialize the Component rendering.
922
953
  *
923
954
  * @returns {void}
924
955
  * @private