@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
|
@@ -30,14 +30,15 @@ var ListButton = /** @class */ (function () {
|
|
|
30
30
|
this._popupSettings = { animate: true, popupClass: '' };
|
|
31
31
|
this.listId = kendo_angular_common_1.guid();
|
|
32
32
|
this._isFocused = false;
|
|
33
|
+
this.subs = new rxjs_1.Subscription();
|
|
33
34
|
kendo_licensing_1.validatePackage(package_metadata_1.packageMetadata);
|
|
34
35
|
this.focusService = focusService;
|
|
35
36
|
this.navigationService = navigationService;
|
|
36
37
|
this.wrapper = wrapperRef.nativeElement;
|
|
37
|
-
this.
|
|
38
|
+
this.subs.add(localization.changes.subscribe(function (_a) {
|
|
38
39
|
var rtl = _a.rtl;
|
|
39
40
|
return (_this.direction = rtl ? 'rtl' : 'ltr');
|
|
40
|
-
});
|
|
41
|
+
}));
|
|
41
42
|
this.subscribeEvents();
|
|
42
43
|
}
|
|
43
44
|
Object.defineProperty(ListButton.prototype, "popupClasses", {
|
|
@@ -83,12 +84,9 @@ var ListButton = /** @class */ (function () {
|
|
|
83
84
|
};
|
|
84
85
|
ListButton.prototype.ngOnDestroy = function () {
|
|
85
86
|
this.openState = false;
|
|
86
|
-
this.unsubscribeEvents();
|
|
87
87
|
clearTimeout(this.focusFirstTimeout);
|
|
88
88
|
clearTimeout(this.blurTimeout);
|
|
89
|
-
|
|
90
|
-
this.localizationChangeSubscription.unsubscribe();
|
|
91
|
-
}
|
|
89
|
+
this.subs.unsubscribe();
|
|
92
90
|
};
|
|
93
91
|
ListButton.prototype.subscribeEvents = function () {
|
|
94
92
|
if (!kendo_angular_common_1.isDocumentAvailable()) {
|
|
@@ -100,27 +98,27 @@ var ListButton = /** @class */ (function () {
|
|
|
100
98
|
};
|
|
101
99
|
ListButton.prototype.subscribeListItemFocusEvent = function () {
|
|
102
100
|
var _this = this;
|
|
103
|
-
this.
|
|
101
|
+
this.subs.add(this.focusService.onFocus.subscribe(function () {
|
|
104
102
|
_this._isFocused = true;
|
|
105
|
-
});
|
|
103
|
+
}));
|
|
106
104
|
};
|
|
107
105
|
ListButton.prototype.subscribeComponentBlurredEvent = function () {
|
|
108
106
|
var _this = this;
|
|
109
107
|
this._zone.runOutsideAngular(function () {
|
|
110
|
-
_this.
|
|
111
|
-
_this.
|
|
108
|
+
_this.subs.add(_this.navigationService.tab.pipe(operators_1.filter(function () { return _this._isFocused; })).subscribe(_this.handleTab.bind(_this)));
|
|
109
|
+
_this.subs.add(rxjs_1.fromEvent(document, 'click')
|
|
112
110
|
.pipe(operators_1.filter(function (event) { return !_this.wrapperContains(event.target); }), operators_1.filter(function () { return _this._isFocused; }))
|
|
113
|
-
.subscribe(function () { return _this._zone.run(function () { return _this.blurWrapper(); }); });
|
|
111
|
+
.subscribe(function () { return _this._zone.run(function () { return _this.blurWrapper(); }); }));
|
|
114
112
|
});
|
|
115
113
|
};
|
|
116
114
|
ListButton.prototype.subscribeNavigationEvents = function () {
|
|
117
115
|
var _this = this;
|
|
118
|
-
this.
|
|
119
|
-
this.
|
|
116
|
+
this.subs.add(this.navigationService.navigate.subscribe(this.focusService.focus.bind(this.focusService)));
|
|
117
|
+
this.subs.add(this.navigationService.enterup.subscribe(function () {
|
|
120
118
|
_this.enterHandler();
|
|
121
119
|
_this.focusWrapper();
|
|
122
|
-
});
|
|
123
|
-
this.
|
|
120
|
+
}));
|
|
121
|
+
this.subs.add(this.navigationService.open.subscribe(function () {
|
|
124
122
|
if (!_this._open) {
|
|
125
123
|
_this.togglePopupVisibility();
|
|
126
124
|
_this.focusFirstItem();
|
|
@@ -128,28 +126,10 @@ var ListButton = /** @class */ (function () {
|
|
|
128
126
|
else {
|
|
129
127
|
_this.focusWrapper();
|
|
130
128
|
}
|
|
131
|
-
});
|
|
132
|
-
this.
|
|
129
|
+
}));
|
|
130
|
+
this.subs.add(rxjs_1.merge(this.navigationService.close, this.navigationService.esc).subscribe(function () { return _this.focusWrapper(); }));
|
|
133
131
|
};
|
|
134
132
|
ListButton.prototype.enterHandler = function () { }; // tslint:disable-line
|
|
135
|
-
ListButton.prototype.unsubscribeEvents = function () {
|
|
136
|
-
if (!kendo_angular_common_1.isDocumentAvailable()) {
|
|
137
|
-
return;
|
|
138
|
-
}
|
|
139
|
-
this.unsubscribe(this.componentBlurredSubscription);
|
|
140
|
-
this.unsubscribe(this.focusSubscription);
|
|
141
|
-
this.unsubscribe(this.navigationSubscription);
|
|
142
|
-
this.unsubscribe(this.enterPressSubscription);
|
|
143
|
-
this.unsubscribe(this.enterUpSubscription);
|
|
144
|
-
this.unsubscribe(this.openSubscription);
|
|
145
|
-
this.unsubscribe(this.closeSubscription);
|
|
146
|
-
this.unsubscribe(this.tabSubscription);
|
|
147
|
-
};
|
|
148
|
-
ListButton.prototype.unsubscribe = function (subscription) {
|
|
149
|
-
if (subscription) {
|
|
150
|
-
subscription.unsubscribe();
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
133
|
/**
|
|
154
134
|
* @hidden
|
|
155
135
|
*/
|
|
@@ -11,7 +11,7 @@ exports.packageMetadata = {
|
|
|
11
11
|
name: '@progress/kendo-angular-buttons',
|
|
12
12
|
productName: 'Kendo UI for Angular',
|
|
13
13
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
14
|
-
publishDate:
|
|
14
|
+
publishDate: 1649694226,
|
|
15
15
|
version: '',
|
|
16
16
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
17
17
|
};
|
|
@@ -19,6 +19,7 @@ var util_1 = require("./../util");
|
|
|
19
19
|
var preventable_event_1 = require("../preventable-event");
|
|
20
20
|
var kendo_angular_common_2 = require("@progress/kendo-angular-common");
|
|
21
21
|
var util_2 = require("../util");
|
|
22
|
+
var rxjs_1 = require("rxjs");
|
|
22
23
|
var NAVIGATION_SETTINGS = {
|
|
23
24
|
useLeftRightArrows: true
|
|
24
25
|
};
|
|
@@ -216,6 +217,7 @@ var SplitButtonComponent = /** @class */ (function (_super) {
|
|
|
216
217
|
_this.lockFocus = false;
|
|
217
218
|
_this._rounded = 'medium';
|
|
218
219
|
_this._fillMode = "solid";
|
|
220
|
+
_this.popupSubs = new rxjs_1.Subscription();
|
|
219
221
|
_this._itemClick = _this.itemClick;
|
|
220
222
|
_this._blur = _this.onBlur;
|
|
221
223
|
return _this;
|
|
@@ -631,11 +633,12 @@ var SplitButtonComponent = /** @class */ (function (_super) {
|
|
|
631
633
|
popupAlign: this.popupAlign,
|
|
632
634
|
popupClass: this.popupClasses
|
|
633
635
|
});
|
|
634
|
-
this.popupRef.popupAnchorViewportLeave.subscribe(function () { return (_this.openState = false); });
|
|
635
|
-
this.popupRef.popupOpen.subscribe(this.focusFirstItem.bind(this));
|
|
636
|
+
this.popupSubs.add(this.popupRef.popupAnchorViewportLeave.subscribe(function () { return (_this.openState = false); }));
|
|
637
|
+
this.popupSubs.add(this.popupRef.popupOpen.subscribe(this.focusFirstItem.bind(this)));
|
|
636
638
|
};
|
|
637
639
|
SplitButtonComponent.prototype.destroyPopup = function () {
|
|
638
640
|
if (this.popupRef) {
|
|
641
|
+
this.popupSubs.unsubscribe();
|
|
639
642
|
this.popupRef.close();
|
|
640
643
|
this.popupRef = null;
|
|
641
644
|
}
|