@progress/kendo-angular-buttons 7.0.6 → 7.0.7-dev.202204111624
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/dist/cdn/js/kendo-angular-buttons.js +2 -2
- package/dist/cdn/main.js +1 -1
- package/dist/es/button/button.directive.js +7 -7
- package/dist/es/buttongroup/buttongroup.component.js +7 -6
- package/dist/es/chip/chip.component.js +11 -19
- package/dist/es/dropdownbutton/dropdownbutton.component.js +10 -8
- package/dist/es/focusable/focusable.directive.js +5 -11
- package/dist/es/listbutton/list-button.js +16 -36
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/splitbutton/splitbutton.component.js +5 -2
- package/dist/es2015/button/button.directive.d.ts +1 -2
- package/dist/es2015/button/button.directive.js +6 -6
- package/dist/es2015/buttongroup/buttongroup.component.d.ts +1 -2
- package/dist/es2015/buttongroup/buttongroup.component.js +6 -5
- package/dist/es2015/chip/chip.component.d.ts +1 -2
- package/dist/es2015/chip/chip.component.js +11 -19
- package/dist/es2015/dropdownbutton/dropdownbutton.component.d.ts +1 -0
- package/dist/es2015/dropdownbutton/dropdownbutton.component.js +10 -8
- package/dist/es2015/focusable/focusable.directive.d.ts +1 -2
- package/dist/es2015/focusable/focusable.directive.js +5 -11
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/listbutton/list-button.d.ts +1 -11
- package/dist/es2015/listbutton/list-button.js +15 -35
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/es2015/splitbutton/splitbutton.component.d.ts +1 -0
- package/dist/es2015/splitbutton/splitbutton.component.js +5 -2
- package/dist/fesm2015/index.js +53 -86
- package/dist/fesm5/index.js +56 -89
- package/dist/npm/button/button.directive.js +7 -7
- package/dist/npm/buttongroup/buttongroup.component.js +7 -6
- package/dist/npm/chip/chip.component.js +11 -19
- package/dist/npm/dropdownbutton/dropdownbutton.component.js +9 -7
- package/dist/npm/focusable/focusable.directive.js +5 -11
- package/dist/npm/listbutton/list-button.js +15 -35
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/splitbutton/splitbutton.component.js +5 -2
- package/dist/systemjs/kendo-angular-buttons.js +1 -1
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@ import { FocusService } from '../focusable/focus.service';
|
|
|
16
16
|
import { NavigationService } from '../navigation/navigation.service';
|
|
17
17
|
import { NAVIGATION_CONFIG } from '../navigation/navigation-config';
|
|
18
18
|
import { PreventableEvent } from '../preventable-event';
|
|
19
|
-
import { merge } from 'rxjs';
|
|
19
|
+
import { merge, Subscription } from 'rxjs';
|
|
20
20
|
const NAVIGATION_SETTINGS = {
|
|
21
21
|
useLeftRightArrows: true
|
|
22
22
|
};
|
|
@@ -151,6 +151,7 @@ let DropDownButtonComponent = class DropDownButtonComponent extends ListButton {
|
|
|
151
151
|
this.onBlur = new EventEmitter(); //tslint:disable-line:no-output-rename
|
|
152
152
|
this.listId = guid();
|
|
153
153
|
this._fillMode = 'solid';
|
|
154
|
+
this.popupSubs = new Subscription();
|
|
154
155
|
this._itemClick = this.itemClick;
|
|
155
156
|
this._blur = this.onBlur;
|
|
156
157
|
}
|
|
@@ -402,11 +403,11 @@ let DropDownButtonComponent = class DropDownButtonComponent extends ListButton {
|
|
|
402
403
|
|| (this.popupRef && this.popupRef.popupElement.contains(element));
|
|
403
404
|
}
|
|
404
405
|
subscribeNavigationEvents() {
|
|
405
|
-
this.
|
|
406
|
-
.subscribe(this.onArrowKeyNavigate.bind(this));
|
|
407
|
-
this.
|
|
408
|
-
this.
|
|
409
|
-
this.
|
|
406
|
+
this.subs.add(this.navigationService.navigate
|
|
407
|
+
.subscribe(this.onArrowKeyNavigate.bind(this)));
|
|
408
|
+
this.subs.add(this.navigationService.enterup.subscribe(this.onNavigationEnterUp.bind(this)));
|
|
409
|
+
this.subs.add(this.navigationService.open.subscribe(this.onNavigationOpen.bind(this)));
|
|
410
|
+
this.subs.add(merge(this.navigationService.close, this.navigationService.esc).subscribe(this.onNavigationClose.bind(this)));
|
|
410
411
|
}
|
|
411
412
|
onNavigationEnterUp() {
|
|
412
413
|
if (!this._disabled && !this.openState) {
|
|
@@ -459,13 +460,14 @@ let DropDownButtonComponent = class DropDownButtonComponent extends ListButton {
|
|
|
459
460
|
popupAlign: this.popupAlign,
|
|
460
461
|
popupClass: this.popupClasses
|
|
461
462
|
});
|
|
462
|
-
this.popupRef.popupAnchorViewportLeave.subscribe(() => this.openState = false);
|
|
463
|
-
this.popupRef.popupOpen.subscribe(this.focusFirstItem.bind(this));
|
|
463
|
+
this.popupSubs.add(this.popupRef.popupAnchorViewportLeave.subscribe(() => this.openState = false));
|
|
464
|
+
this.popupSubs.add(this.popupRef.popupOpen.subscribe(this.focusFirstItem.bind(this)));
|
|
464
465
|
}
|
|
465
466
|
destroyPopup() {
|
|
466
467
|
if (this.popupRef) {
|
|
467
468
|
this.popupRef.close();
|
|
468
469
|
this.popupRef = null;
|
|
470
|
+
this.popupSubs.unsubscribe();
|
|
469
471
|
}
|
|
470
472
|
}
|
|
471
473
|
};
|
|
@@ -12,7 +12,7 @@ export declare class FocusableDirective implements OnInit, OnDestroy {
|
|
|
12
12
|
private renderer;
|
|
13
13
|
index: number;
|
|
14
14
|
private element;
|
|
15
|
-
private
|
|
15
|
+
private subs;
|
|
16
16
|
constructor(focusService: FocusService, elementRef: ElementRef, renderer: Renderer2);
|
|
17
17
|
ngOnInit(): void;
|
|
18
18
|
/**
|
|
@@ -20,5 +20,4 @@ export declare class FocusableDirective implements OnInit, OnDestroy {
|
|
|
20
20
|
*/
|
|
21
21
|
ngOnDestroy(): void;
|
|
22
22
|
private subscribeEvents;
|
|
23
|
-
private unsubscribeEvents;
|
|
24
23
|
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as tslib_1 from "tslib";
|
|
6
6
|
import { Directive, Input, ElementRef, Renderer2 } from '@angular/core';
|
|
7
7
|
import { FocusService } from './focus.service';
|
|
8
|
+
import { Subscription } from 'rxjs';
|
|
8
9
|
import { isDocumentAvailable } from '@progress/kendo-angular-common';
|
|
9
10
|
/**
|
|
10
11
|
* @hidden
|
|
@@ -13,6 +14,7 @@ let FocusableDirective = class FocusableDirective {
|
|
|
13
14
|
constructor(focusService, elementRef, renderer) {
|
|
14
15
|
this.focusService = focusService;
|
|
15
16
|
this.renderer = renderer;
|
|
17
|
+
this.subs = new Subscription();
|
|
16
18
|
this.element = elementRef.nativeElement;
|
|
17
19
|
this.subscribeEvents();
|
|
18
20
|
}
|
|
@@ -28,13 +30,13 @@ let FocusableDirective = class FocusableDirective {
|
|
|
28
30
|
* @hidden
|
|
29
31
|
*/
|
|
30
32
|
ngOnDestroy() {
|
|
31
|
-
this.
|
|
33
|
+
this.subs.unsubscribe();
|
|
32
34
|
}
|
|
33
35
|
subscribeEvents() {
|
|
34
36
|
if (!isDocumentAvailable()) {
|
|
35
37
|
return;
|
|
36
38
|
}
|
|
37
|
-
this.
|
|
39
|
+
this.subs.add(this.focusService.onFocus.subscribe((index) => {
|
|
38
40
|
if (this.index === index) {
|
|
39
41
|
this.renderer.addClass(this.element, 'k-focus');
|
|
40
42
|
this.element.focus();
|
|
@@ -42,15 +44,7 @@ let FocusableDirective = class FocusableDirective {
|
|
|
42
44
|
else {
|
|
43
45
|
this.renderer.removeClass(this.element, 'k-focus');
|
|
44
46
|
}
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
unsubscribeEvents() {
|
|
48
|
-
if (!isDocumentAvailable()) {
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
if (this.focusSubscription) {
|
|
52
|
-
this.focusSubscription.unsubscribe();
|
|
53
|
-
}
|
|
47
|
+
}));
|
|
54
48
|
}
|
|
55
49
|
};
|
|
56
50
|
tslib_1.__decorate([
|