@syncfusion/ej2-splitbuttons 19.3.43 → 19.3.48
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 +8 -0
- 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 +38 -7
- 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/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 +38 -7
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-splitbuttons@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-splitbuttons@
|
|
3
|
+
"_id": "@syncfusion/ej2-splitbuttons@19.3.47",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-Q4pni89JtywN7Z6L1cgVTcJQjaOPHV53qsvN4ORxp9ljkWfnQNream8tOrGA44zPZBXdICTRAFoGKRWgXRmObA==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-splitbuttons",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"/@syncfusion/ej2-richtexteditor",
|
|
32
32
|
"/@syncfusion/ej2-vue-splitbuttons"
|
|
33
33
|
],
|
|
34
|
-
"_resolved": "http://nexus.syncfusion.com/repository/ej2-
|
|
35
|
-
"_shasum": "
|
|
34
|
+
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix/@syncfusion/ej2-splitbuttons/-/ej2-splitbuttons-19.3.47.tgz",
|
|
35
|
+
"_shasum": "996f0ab20f02703ac3ce1e535d59bea62a231192",
|
|
36
36
|
"_spec": "@syncfusion/ej2-splitbuttons@*",
|
|
37
37
|
"_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
|
|
38
38
|
"author": {
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
},
|
|
44
44
|
"bundleDependencies": false,
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@syncfusion/ej2-base": "~19.3.
|
|
47
|
-
"@syncfusion/ej2-popups": "~19.3.
|
|
46
|
+
"@syncfusion/ej2-base": "~19.3.47",
|
|
47
|
+
"@syncfusion/ej2-popups": "~19.3.47"
|
|
48
48
|
},
|
|
49
49
|
"deprecated": false,
|
|
50
50
|
"description": "A package of feature-rich Essential JS 2 components such as DropDownButton, SplitButton, ProgressButton and ButtonGroup.",
|
|
@@ -87,6 +87,6 @@
|
|
|
87
87
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
88
88
|
},
|
|
89
89
|
"typings": "index.d.ts",
|
|
90
|
-
"version": "19.3.
|
|
90
|
+
"version": "19.3.48",
|
|
91
91
|
"sideEffects": false
|
|
92
92
|
}
|
|
@@ -180,6 +180,7 @@ export declare class DropDownButton extends Component<HTMLButtonElement> impleme
|
|
|
180
180
|
private hasIcon;
|
|
181
181
|
private createAnchor;
|
|
182
182
|
private initialize;
|
|
183
|
+
private isColorPicker;
|
|
183
184
|
private appendArrowSpan;
|
|
184
185
|
protected setActiveElem(elem: HTMLElement[]): void;
|
|
185
186
|
/**
|
|
@@ -201,6 +202,7 @@ export declare class DropDownButton extends Component<HTMLButtonElement> impleme
|
|
|
201
202
|
protected getULElement(): HTMLElement;
|
|
202
203
|
protected wireEvents(): void;
|
|
203
204
|
protected popupWireEvents(): void;
|
|
205
|
+
protected popupUnWireEvents(): void;
|
|
204
206
|
/**
|
|
205
207
|
* Handles the keyboard interactions.
|
|
206
208
|
*
|
|
@@ -262,13 +262,23 @@ var DropDownButton = /** @class */ (function (_super) {
|
|
|
262
262
|
}
|
|
263
263
|
this.appendArrowSpan();
|
|
264
264
|
this.setActiveElem([this.element]);
|
|
265
|
-
if (this.target || !this.createPopupOnClick) {
|
|
265
|
+
if ((this.target && !this.isColorPicker()) || !this.createPopupOnClick) {
|
|
266
266
|
this.createPopup();
|
|
267
267
|
}
|
|
268
268
|
else {
|
|
269
269
|
this.isPopupCreated = false;
|
|
270
270
|
}
|
|
271
271
|
};
|
|
272
|
+
DropDownButton.prototype.isColorPicker = function () {
|
|
273
|
+
if (!this.element) {
|
|
274
|
+
return false;
|
|
275
|
+
}
|
|
276
|
+
var prevElem = this.element.previousSibling;
|
|
277
|
+
if (prevElem && prevElem.classList && prevElem.classList.contains('e-split-colorpicker')) {
|
|
278
|
+
return true;
|
|
279
|
+
}
|
|
280
|
+
return false;
|
|
281
|
+
};
|
|
272
282
|
DropDownButton.prototype.appendArrowSpan = function () {
|
|
273
283
|
this.element.appendChild(this.createElement('span', {
|
|
274
284
|
className: 'e-btn-icon e-icons ' + 'e-icon-' + (this.cssClass.indexOf(classNames.VERTICAL) > -1
|
|
@@ -320,6 +330,7 @@ var DropDownButton = /** @class */ (function (_super) {
|
|
|
320
330
|
attrList.forEach(function (key) {
|
|
321
331
|
_this.element.removeAttribute(key);
|
|
322
332
|
});
|
|
333
|
+
this.popupUnWireEvents();
|
|
323
334
|
this.destroyPopup();
|
|
324
335
|
this.isPopupCreated = false;
|
|
325
336
|
if (!this.disabled) {
|
|
@@ -361,16 +372,33 @@ var DropDownButton = /** @class */ (function (_super) {
|
|
|
361
372
|
};
|
|
362
373
|
DropDownButton.prototype.wireEvents = function () {
|
|
363
374
|
this.delegateMousedownHandler = this.mousedownHandler.bind(this);
|
|
364
|
-
|
|
375
|
+
if (!this.createPopupOnClick) {
|
|
376
|
+
EventHandler.add(document, 'mousedown touchstart', this.delegateMousedownHandler, this);
|
|
377
|
+
}
|
|
365
378
|
EventHandler.add(this.element, 'click', this.clickHandler, this);
|
|
366
379
|
EventHandler.add(this.element, 'keydown', this.keyBoardHandler, this);
|
|
367
380
|
};
|
|
368
381
|
DropDownButton.prototype.popupWireEvents = function () {
|
|
369
382
|
var popupElement = this.getPopUpElement();
|
|
370
|
-
|
|
371
|
-
|
|
383
|
+
if (this.createPopupOnClick) {
|
|
384
|
+
EventHandler.add(document, 'mousedown touchstart', this.delegateMousedownHandler, this);
|
|
385
|
+
}
|
|
386
|
+
if (popupElement) {
|
|
387
|
+
EventHandler.add(popupElement, 'click', this.clickHandler, this);
|
|
388
|
+
EventHandler.add(popupElement, 'keydown', this.keyBoardHandler, this);
|
|
389
|
+
}
|
|
372
390
|
this.rippleFn = rippleEffect(popupElement, { selector: '.' + classNames.ITEM });
|
|
373
391
|
};
|
|
392
|
+
DropDownButton.prototype.popupUnWireEvents = function () {
|
|
393
|
+
var popupElement = this.getPopUpElement();
|
|
394
|
+
if (this.createPopupOnClick) {
|
|
395
|
+
EventHandler.remove(document, 'mousedown touchstart', this.delegateMousedownHandler);
|
|
396
|
+
}
|
|
397
|
+
if (popupElement && popupElement.parentElement) {
|
|
398
|
+
EventHandler.remove(popupElement, 'click', this.clickHandler);
|
|
399
|
+
EventHandler.remove(popupElement, 'keydown', this.keyBoardHandler);
|
|
400
|
+
}
|
|
401
|
+
};
|
|
374
402
|
/**
|
|
375
403
|
* Handles the keyboard interactions.
|
|
376
404
|
*
|
|
@@ -439,7 +467,7 @@ var DropDownButton = /** @class */ (function (_super) {
|
|
|
439
467
|
DropDownButton.prototype.clickHandler = function (e) {
|
|
440
468
|
var trgt = e.target;
|
|
441
469
|
if (closest(trgt, '[id="' + this.element.id + '"]')) {
|
|
442
|
-
if (!this.createPopupOnClick || this.target) {
|
|
470
|
+
if (!this.createPopupOnClick || (this.target && !this.isColorPicker())) {
|
|
443
471
|
if (this.getPopUpElement().classList.contains('e-popup-close')) {
|
|
444
472
|
this.openPopUp(e);
|
|
445
473
|
}
|
|
@@ -505,6 +533,7 @@ var DropDownButton = /** @class */ (function (_super) {
|
|
|
505
533
|
}
|
|
506
534
|
this.trigger('beforeClose', beforeCloseArgs, function (observedArgs) {
|
|
507
535
|
if (!observedArgs.cancel) {
|
|
536
|
+
_this.popupUnWireEvents();
|
|
508
537
|
var ul_2 = _this.getULElement();
|
|
509
538
|
var selectedLi = ul_2.querySelector('.e-selected');
|
|
510
539
|
if (selectedLi) {
|
|
@@ -521,7 +550,7 @@ var DropDownButton = /** @class */ (function (_super) {
|
|
|
521
550
|
if (!_this.target && ul_2) {
|
|
522
551
|
detach(ul_2);
|
|
523
552
|
}
|
|
524
|
-
if (!_this.target) {
|
|
553
|
+
if (!_this.target || _this.isColorPicker()) {
|
|
525
554
|
if (_this.createPopupOnClick) {
|
|
526
555
|
_this.destroyPopup();
|
|
527
556
|
}
|
|
@@ -533,7 +562,9 @@ var DropDownButton = /** @class */ (function (_super) {
|
|
|
533
562
|
});
|
|
534
563
|
};
|
|
535
564
|
DropDownButton.prototype.unWireEvents = function () {
|
|
536
|
-
|
|
565
|
+
if (!this.createPopupOnClick) {
|
|
566
|
+
EventHandler.remove(document, 'mousedown touchstart', this.delegateMousedownHandler);
|
|
567
|
+
}
|
|
537
568
|
EventHandler.remove(this.element, 'click', this.clickHandler);
|
|
538
569
|
EventHandler.remove(this.element, 'keydown', this.keyBoardHandler);
|
|
539
570
|
if (this.isPopupCreated) {
|