@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,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 20.4.42
3
+ * version : 20.4.50
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-splitbuttons@*",
3
- "_id": "@syncfusion/ej2-splitbuttons@20.4.40",
3
+ "_id": "@syncfusion/ej2-splitbuttons@20.4.48",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-gwQMpFB0eptj4OvR+h81m2JoQjU/MWNxpudKCz59KwM2MqRC7hko4aS7HQXfFhe1ibOJbC+v3of25Y8xu6768Q==",
5
+ "_integrity": "sha512-GopDCpguhkscBfgaDrL1tsxlbNFwQHWZwzosBeswNc8AIW7aj1KNBIV2XwAWpvoDYrzD/canCrO6acmth0yv5Q==",
6
6
  "_location": "/@syncfusion/ej2-splitbuttons",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -32,8 +32,8 @@
32
32
  "/@syncfusion/ej2-richtexteditor",
33
33
  "/@syncfusion/ej2-vue-splitbuttons"
34
34
  ],
35
- "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-splitbuttons/-/ej2-splitbuttons-20.4.40.tgz",
36
- "_shasum": "79574125f09cec61f8c96a0f96ff0b7ee4b4b89a",
35
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-splitbuttons/-/ej2-splitbuttons-20.4.48.tgz",
36
+ "_shasum": "a5a613d2a38d84e5ab555f50c7404a07ec8d7336",
37
37
  "_spec": "@syncfusion/ej2-splitbuttons@*",
38
38
  "_where": "/jenkins/workspace/ease-automation_release_19.1.0.1/packages/included",
39
39
  "author": {
@@ -44,8 +44,8 @@
44
44
  },
45
45
  "bundleDependencies": false,
46
46
  "dependencies": {
47
- "@syncfusion/ej2-base": "~20.4.42",
48
- "@syncfusion/ej2-popups": "~20.4.42"
47
+ "@syncfusion/ej2-base": "~20.4.48",
48
+ "@syncfusion/ej2-popups": "~20.4.49"
49
49
  },
50
50
  "deprecated": false,
51
51
  "description": "A package of feature-rich Essential JS 2 components such as DropDownButton, SplitButton, ProgressButton and ButtonGroup.",
@@ -88,6 +88,6 @@
88
88
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
89
89
  },
90
90
  "typings": "index.d.ts",
91
- "version": "20.4.42",
91
+ "version": "20.4.50",
92
92
  "sideEffects": false
93
93
  }
@@ -20,7 +20,7 @@ export declare function upDownKeyHandler(ul: HTMLElement, keyCode: number): void
20
20
  * @param {HTMLElement} popup - Specifies the popup element.
21
21
  * @returns {void}
22
22
  */
23
- export declare function setBlankIconStyle(popup: HTMLElement): void;
23
+ export declare function setBlankIconStyle(popup: HTMLElement, blankIcon?: boolean): void;
24
24
  /**
25
25
  * Defines the items of Split Button/DropDownButton.
26
26
  */
@@ -108,8 +108,16 @@ function isValidLI(ul, li, index, keyCode, count) {
108
108
  * @param {HTMLElement} popup - Specifies the popup element.
109
109
  * @returns {void}
110
110
  */
111
- export function setBlankIconStyle(popup) {
111
+ export function setBlankIconStyle(popup, blankIcon) {
112
112
  var blankIconList = [].slice.call(popup.getElementsByClassName('e-blank-icon'));
113
+ if (blankIcon) {
114
+ var menuItem = [].slice.call(popup.getElementsByClassName('e-item'));
115
+ menuItem.forEach(function (li) {
116
+ if (li.style.paddingLeft || li.style.paddingRight) {
117
+ li.removeAttribute('style');
118
+ }
119
+ });
120
+ }
113
121
  if (!blankIconList.length) {
114
122
  return;
115
123
  }
@@ -1,4 +1,4 @@
1
- import { Collection, Event, NotifyPropertyChanges, detach, Property, EventHandler, EmitType } from '@syncfusion/ej2-base';import { addClass, INotifyPropertyChanged, getUniqueID, rippleEffect, getComponent } from '@syncfusion/ej2-base';import { attributes, Component, closest, select, KeyboardEventArgs, SanitizeHtmlHelper } from '@syncfusion/ej2-base';import { classList, removeClass } from '@syncfusion/ej2-base';import { Button } from '@syncfusion/ej2-buttons';import { Popup } from '@syncfusion/ej2-popups';import { SplitButton } from '../split-button/split-button';import { MenuEventArgs, BeforeOpenCloseMenuEventArgs, OpenCloseMenuEventArgs, upDownKeyHandler } from './../common/common';import { getModel, SplitButtonIconPosition, Item, setBlankIconStyle } from './../common/common';import { ItemModel } from './../common/common-model';
1
+ import { Collection, Event, NotifyPropertyChanges, detach, Property, EventHandler, EmitType, isRippleEnabled } from '@syncfusion/ej2-base';import { addClass, INotifyPropertyChanged, getUniqueID, rippleEffect, getComponent } from '@syncfusion/ej2-base';import { attributes, Component, closest, select, KeyboardEventArgs, SanitizeHtmlHelper } from '@syncfusion/ej2-base';import { classList, removeClass } from '@syncfusion/ej2-base';import { Button } from '@syncfusion/ej2-buttons';import { Popup } from '@syncfusion/ej2-popups';import { SplitButton } from '../split-button/split-button';import { MenuEventArgs, BeforeOpenCloseMenuEventArgs, OpenCloseMenuEventArgs, upDownKeyHandler } from './../common/common';import { getModel, SplitButtonIconPosition, Item, setBlankIconStyle } from './../common/common';import { ItemModel } from './../common/common-model';
2
2
  import {ComponentModel} from '@syncfusion/ej2-base';
3
3
 
4
4
  /**
@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
17
17
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
18
18
  return c > 3 && r && Object.defineProperty(target, key, r), r;
19
19
  };
20
- import { Collection, Event, NotifyPropertyChanges, detach, Property, EventHandler } from '@syncfusion/ej2-base';
20
+ import { Collection, Event, NotifyPropertyChanges, detach, Property, EventHandler, isRippleEnabled } from '@syncfusion/ej2-base';
21
21
  import { addClass, getUniqueID, rippleEffect, getComponent } from '@syncfusion/ej2-base';
22
22
  import { attributes, Component, closest, select, SanitizeHtmlHelper } from '@syncfusion/ej2-base';
23
23
  import { classList, removeClass } from '@syncfusion/ej2-base';
@@ -409,6 +409,9 @@ var DropDownButton = /** @class */ (function (_super) {
409
409
  EventHandler.remove(popupElement, this.closeActionEvents, this.focusoutHandler);
410
410
  }
411
411
  }
412
+ if (isRippleEnabled && this.rippleFn) {
413
+ this.rippleFn();
414
+ }
412
415
  };
413
416
  /**
414
417
  * Handles the keyboard interactions.
@@ -671,9 +674,13 @@ var DropDownButton = /** @class */ (function (_super) {
671
674
  }
672
675
  break;
673
676
  case 'cssClass':
674
- if (newProp.cssClass.indexOf(classNames.VERTICAL) > -1) {
677
+ if (newProp.cssClass.indexOf(classNames.VERTICAL) > -1 || oldProp.cssClass.indexOf(classNames.VERTICAL) > -1) {
678
+ if (!this.element.querySelector('span.e-caret')) {
679
+ this.appendArrowSpan();
680
+ }
675
681
  var arrowSpan = this.element.querySelector('span.e-caret');
676
- classList(arrowSpan, ['e-icon-bottom'], ['e-icon-right']);
682
+ newProp.cssClass.indexOf(classNames.VERTICAL) > -1 ? classList(arrowSpan, ['e-icon-bottom'], ['e-icon-right'])
683
+ : classList(arrowSpan, ['e-icon-right'], ['e-icon-bottom']);
677
684
  }
678
685
  if (this.isPopupCreated) {
679
686
  if (oldProp.cssClass) {
@@ -96,7 +96,7 @@ export interface ProgressButtonModel {
96
96
  *
97
97
  * @default "Left"
98
98
  */
99
- iconPosition?: IconPosition | string;
99
+ iconPosition?: string | IconPosition;
100
100
 
101
101
  /**
102
102
  * Defines class/multiple classes separated by a space for the progress button that is used to include an icon.
@@ -102,7 +102,7 @@ export declare class ProgressButton extends Button implements INotifyPropertyCha
102
102
  *
103
103
  * @default "Left"
104
104
  */
105
- iconPosition: IconPosition | string;
105
+ iconPosition: string | IconPosition;
106
106
  /**
107
107
  * Defines class/multiple classes separated by a space for the progress button that is used to include an icon.
108
108
  * Progress button can also include font icon and sprite image.
@@ -183,6 +183,10 @@ var SplitButton = /** @class */ (function (_super) {
183
183
  _this.trigger('select', args);
184
184
  };
185
185
  dropDownBtnModel.beforeOpen = function (args) {
186
+ if (_this.createPopupOnClick && _this.items.length == 0) {
187
+ _this.secondaryBtnObj.dropDown.relateTo = _this.wrapper;
188
+ _this.dropDown = _this.secondaryBtnObj.dropDown;
189
+ }
186
190
  var callBackPromise = new Deferred();
187
191
  _this.trigger('beforeOpen', args, function (observedArgs) {
188
192
  callBackPromise.resolve(observedArgs);
@@ -34,6 +34,9 @@
34
34
 
35
35
  .e-caret {
36
36
  font-size: $drop-down-btn-caret-icon-font-size;
37
+ @if $skin-name == 'FluentUI' or $skin-name == 'highcontrast' {
38
+ margin-top: 0;
39
+ }
37
40
  }
38
41
 
39
42
  &.e-vertical {
@@ -30,6 +30,7 @@
30
30
  .e-dropdown-btn .e-caret,
31
31
  .e-dropdown-btn.e-btn .e-caret {
32
32
  font-size: 16px;
33
+ margin-top: 0;
33
34
  }
34
35
  .e-dropdown-btn.e-vertical,
35
36
  .e-dropdown-btn.e-btn.e-vertical {
@@ -30,6 +30,7 @@
30
30
  .e-dropdown-btn .e-caret,
31
31
  .e-dropdown-btn.e-btn .e-caret {
32
32
  font-size: 16px;
33
+ margin-top: 0;
33
34
  }
34
35
  .e-dropdown-btn.e-vertical,
35
36
  .e-dropdown-btn.e-btn.e-vertical {
@@ -29,6 +29,7 @@
29
29
  .e-dropdown-btn .e-caret,
30
30
  .e-dropdown-btn.e-btn .e-caret {
31
31
  font-size: 8px;
32
+ margin-top: 0;
32
33
  }
33
34
  .e-dropdown-btn.e-vertical,
34
35
  .e-dropdown-btn.e-btn.e-vertical {
@@ -30,6 +30,7 @@
30
30
  .e-dropdown-btn .e-caret,
31
31
  .e-dropdown-btn.e-btn .e-caret {
32
32
  font-size: 16px;
33
+ margin-top: 0;
33
34
  }
34
35
  .e-dropdown-btn.e-vertical,
35
36
  .e-dropdown-btn.e-btn.e-vertical {
package/styles/fluent.css CHANGED
@@ -30,6 +30,7 @@
30
30
  .e-dropdown-btn .e-caret,
31
31
  .e-dropdown-btn.e-btn .e-caret {
32
32
  font-size: 16px;
33
+ margin-top: 0;
33
34
  }
34
35
  .e-dropdown-btn.e-vertical,
35
36
  .e-dropdown-btn.e-btn.e-vertical {
@@ -29,6 +29,7 @@
29
29
  .e-dropdown-btn .e-caret,
30
30
  .e-dropdown-btn.e-btn .e-caret {
31
31
  font-size: 8px;
32
+ margin-top: 0;
32
33
  }
33
34
  .e-dropdown-btn.e-vertical,
34
35
  .e-dropdown-btn.e-btn.e-vertical {