@progress/kendo-angular-buttons 7.0.0-dev.202201061631 → 7.0.0-dev.202201101733
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 +1 -1
- package/dist/cdn/main.js +1 -1
- package/dist/es/button/button.directive.js +1 -1
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/splitbutton/splitbutton.component.js +43 -18
- package/dist/es2015/button/button.directive.js +1 -1
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/es2015/splitbutton/splitbutton.component.d.ts +5 -2
- package/dist/es2015/splitbutton/splitbutton.component.js +39 -18
- package/dist/fesm2015/index.js +39 -18
- package/dist/fesm5/index.js +43 -18
- package/dist/npm/button/button.directive.js +1 -1
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/splitbutton/splitbutton.component.js +41 -16
- package/dist/systemjs/kendo-angular-buttons.js +1 -1
- package/package.json +2 -2
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as tslib_1 from "tslib";
|
|
6
6
|
/* tslint:disable:no-access-missing-member */
|
|
7
|
-
import { Component, ElementRef, TemplateRef, Input, Output, HostBinding, HostListener, EventEmitter, ContentChild, ViewChild, ViewContainerRef, NgZone, ChangeDetectorRef } from '@angular/core';
|
|
7
|
+
import { Component, ElementRef, TemplateRef, Input, Output, HostBinding, HostListener, EventEmitter, ContentChild, ViewChild, ViewContainerRef, NgZone, ChangeDetectorRef, Renderer2 } from '@angular/core';
|
|
8
8
|
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
9
9
|
import { PopupService } from '@progress/kendo-angular-popup';
|
|
10
10
|
import { ListButton } from './../listbutton/list-button';
|
|
@@ -16,7 +16,7 @@ import { isDocumentAvailable, guid, isChanged } from '@progress/kendo-angular-co
|
|
|
16
16
|
import { isPresent, tick } from './../util';
|
|
17
17
|
import { PreventableEvent } from '../preventable-event';
|
|
18
18
|
import { Keys } from '@progress/kendo-angular-common';
|
|
19
|
-
import { replaceMessagePlaceholder } from '../util';
|
|
19
|
+
import { replaceMessagePlaceholder, getStylingClasses } from '../util';
|
|
20
20
|
var NAVIGATION_SETTINGS = {
|
|
21
21
|
useLeftRightArrows: true
|
|
22
22
|
};
|
|
@@ -68,11 +68,12 @@ var NAVIGATION_SETTINGS_PROVIDER = {
|
|
|
68
68
|
*/
|
|
69
69
|
var SplitButtonComponent = /** @class */ (function (_super) {
|
|
70
70
|
tslib_1.__extends(SplitButtonComponent, _super);
|
|
71
|
-
function SplitButtonComponent(focusService, navigationService, wrapperRef, zone, popupService, elRef, localization, cdr) {
|
|
71
|
+
function SplitButtonComponent(focusService, navigationService, wrapperRef, zone, popupService, elRef, localization, cdr, renderer) {
|
|
72
72
|
var _this = _super.call(this, focusService, navigationService, wrapperRef, zone, localization, cdr) || this;
|
|
73
73
|
_this.popupService = popupService;
|
|
74
74
|
_this.elRef = elRef;
|
|
75
75
|
_this.localization = localization;
|
|
76
|
+
_this.renderer = renderer;
|
|
76
77
|
/**
|
|
77
78
|
* Sets the text of the SplitButton.
|
|
78
79
|
*/
|
|
@@ -107,18 +108,6 @@ var SplitButtonComponent = /** @class */ (function (_super) {
|
|
|
107
108
|
* * `null`
|
|
108
109
|
*/
|
|
109
110
|
_this.size = 'medium';
|
|
110
|
-
/**
|
|
111
|
-
* The rounded property specifies the border radius of the SplitButton
|
|
112
|
-
* ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-rounded)).
|
|
113
|
-
*
|
|
114
|
-
* The possible values are:
|
|
115
|
-
* * `'small'`
|
|
116
|
-
* * `'medium'` (default)
|
|
117
|
-
* * `'large'`
|
|
118
|
-
* * `'full'`
|
|
119
|
-
* * `null`
|
|
120
|
-
*/
|
|
121
|
-
_this.rounded = 'medium';
|
|
122
111
|
/**
|
|
123
112
|
* The fillMode property specifies the background and border styles of the SplitButton
|
|
124
113
|
* ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-fillMode)).
|
|
@@ -233,10 +222,33 @@ var SplitButtonComponent = /** @class */ (function (_super) {
|
|
|
233
222
|
_this.activeArrow = false;
|
|
234
223
|
_this.buttonText = '';
|
|
235
224
|
_this.lockFocus = false;
|
|
225
|
+
_this._rounded = 'medium';
|
|
236
226
|
_this._itemClick = _this.itemClick;
|
|
237
227
|
_this._blur = _this.onBlur;
|
|
238
228
|
return _this;
|
|
239
229
|
}
|
|
230
|
+
Object.defineProperty(SplitButtonComponent.prototype, "rounded", {
|
|
231
|
+
get: function () {
|
|
232
|
+
return this._rounded;
|
|
233
|
+
},
|
|
234
|
+
/**
|
|
235
|
+
* The rounded property specifies the border radius of the SplitButton
|
|
236
|
+
* ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-rounded)).
|
|
237
|
+
*
|
|
238
|
+
* The possible values are:
|
|
239
|
+
* * `'small'`
|
|
240
|
+
* * `'medium'` (default)
|
|
241
|
+
* * `'large'`
|
|
242
|
+
* * `'full'`
|
|
243
|
+
* * `null`
|
|
244
|
+
*/
|
|
245
|
+
set: function (rounded) {
|
|
246
|
+
this.handleClasses(rounded, 'rounded');
|
|
247
|
+
this._rounded = rounded;
|
|
248
|
+
},
|
|
249
|
+
enumerable: true,
|
|
250
|
+
configurable: true
|
|
251
|
+
});
|
|
240
252
|
Object.defineProperty(SplitButtonComponent.prototype, "disabled", {
|
|
241
253
|
get: function () {
|
|
242
254
|
return this._disabled;
|
|
@@ -448,6 +460,7 @@ var SplitButtonComponent = /** @class */ (function (_super) {
|
|
|
448
460
|
*/
|
|
449
461
|
SplitButtonComponent.prototype.ngAfterViewInit = function () {
|
|
450
462
|
this.updateButtonText();
|
|
463
|
+
this.handleClasses(this.rounded, 'rounded');
|
|
451
464
|
};
|
|
452
465
|
/**
|
|
453
466
|
* @hidden
|
|
@@ -614,6 +627,16 @@ var SplitButtonComponent = /** @class */ (function (_super) {
|
|
|
614
627
|
this.popupRef = null;
|
|
615
628
|
}
|
|
616
629
|
};
|
|
630
|
+
SplitButtonComponent.prototype.handleClasses = function (value, input) {
|
|
631
|
+
var elem = this.wrapperRef.nativeElement;
|
|
632
|
+
var classes = getStylingClasses('button', input, this[input], value);
|
|
633
|
+
if (classes.toRemove) {
|
|
634
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
635
|
+
}
|
|
636
|
+
if (classes.toAdd) {
|
|
637
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
638
|
+
}
|
|
639
|
+
};
|
|
617
640
|
tslib_1.__decorate([
|
|
618
641
|
Input(),
|
|
619
642
|
tslib_1.__metadata("design:type", String)
|
|
@@ -640,8 +663,9 @@ var SplitButtonComponent = /** @class */ (function (_super) {
|
|
|
640
663
|
], SplitButtonComponent.prototype, "size", void 0);
|
|
641
664
|
tslib_1.__decorate([
|
|
642
665
|
Input(),
|
|
643
|
-
tslib_1.__metadata("design:type", String)
|
|
644
|
-
|
|
666
|
+
tslib_1.__metadata("design:type", String),
|
|
667
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
668
|
+
], SplitButtonComponent.prototype, "rounded", null);
|
|
645
669
|
tslib_1.__decorate([
|
|
646
670
|
Input(),
|
|
647
671
|
tslib_1.__metadata("design:type", String)
|
|
@@ -786,7 +810,8 @@ var SplitButtonComponent = /** @class */ (function (_super) {
|
|
|
786
810
|
PopupService,
|
|
787
811
|
ElementRef,
|
|
788
812
|
LocalizationService,
|
|
789
|
-
ChangeDetectorRef
|
|
813
|
+
ChangeDetectorRef,
|
|
814
|
+
Renderer2])
|
|
790
815
|
], SplitButtonComponent);
|
|
791
816
|
return SplitButtonComponent;
|
|
792
817
|
}(ListButton));
|