@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
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-buttons',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1641835943,
|
|
13
13
|
version: '',
|
|
14
14
|
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'
|
|
15
15
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { ElementRef, TemplateRef, EventEmitter, ViewContainerRef, AfterViewInit, OnChanges, SimpleChanges, NgZone, ChangeDetectorRef } from '@angular/core';
|
|
5
|
+
import { ElementRef, TemplateRef, EventEmitter, ViewContainerRef, AfterViewInit, OnChanges, SimpleChanges, NgZone, ChangeDetectorRef, Renderer2 } from '@angular/core';
|
|
6
6
|
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
7
|
import { Align, PopupService, PopupRef } from '@progress/kendo-angular-popup';
|
|
8
8
|
import { ListButton } from './../listbutton/list-button';
|
|
@@ -57,6 +57,7 @@ export declare class SplitButtonComponent extends ListButton implements AfterVie
|
|
|
57
57
|
private popupService;
|
|
58
58
|
private elRef;
|
|
59
59
|
private localization;
|
|
60
|
+
private renderer;
|
|
60
61
|
/**
|
|
61
62
|
* Sets the text of the SplitButton.
|
|
62
63
|
*/
|
|
@@ -276,6 +277,7 @@ export declare class SplitButtonComponent extends ListButton implements AfterVie
|
|
|
276
277
|
activeArrow: boolean;
|
|
277
278
|
private buttonText;
|
|
278
279
|
private lockFocus;
|
|
280
|
+
private _rounded;
|
|
279
281
|
isFocused: boolean;
|
|
280
282
|
readonly widgetClasses: boolean;
|
|
281
283
|
readonly dir: string;
|
|
@@ -351,7 +353,7 @@ export declare class SplitButtonComponent extends ListButton implements AfterVie
|
|
|
351
353
|
* Blurs the SplitButton component.
|
|
352
354
|
*/
|
|
353
355
|
blur(): void;
|
|
354
|
-
constructor(focusService: FocusService, navigationService: NavigationService, wrapperRef: ElementRef, zone: NgZone, popupService: PopupService, elRef: ElementRef, localization: LocalizationService, cdr: ChangeDetectorRef);
|
|
356
|
+
constructor(focusService: FocusService, navigationService: NavigationService, wrapperRef: ElementRef, zone: NgZone, popupService: PopupService, elRef: ElementRef, localization: LocalizationService, cdr: ChangeDetectorRef, renderer: Renderer2);
|
|
355
357
|
ngOnDestroy(): void;
|
|
356
358
|
/**
|
|
357
359
|
* Toggles the visibility of the popup.
|
|
@@ -370,4 +372,5 @@ export declare class SplitButtonComponent extends ListButton implements AfterVie
|
|
|
370
372
|
private _toggle;
|
|
371
373
|
private createPopup;
|
|
372
374
|
private destroyPopup;
|
|
375
|
+
private handleClasses;
|
|
373
376
|
}
|
|
@@ -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
|
const NAVIGATION_SETTINGS = {
|
|
21
21
|
useLeftRightArrows: true
|
|
22
22
|
};
|
|
@@ -67,11 +67,12 @@ const NAVIGATION_SETTINGS_PROVIDER = {
|
|
|
67
67
|
* ```
|
|
68
68
|
*/
|
|
69
69
|
let SplitButtonComponent = class SplitButtonComponent extends ListButton {
|
|
70
|
-
constructor(focusService, navigationService, wrapperRef, zone, popupService, elRef, localization, cdr) {
|
|
70
|
+
constructor(focusService, navigationService, wrapperRef, zone, popupService, elRef, localization, cdr, renderer) {
|
|
71
71
|
super(focusService, navigationService, wrapperRef, zone, localization, cdr);
|
|
72
72
|
this.popupService = popupService;
|
|
73
73
|
this.elRef = elRef;
|
|
74
74
|
this.localization = localization;
|
|
75
|
+
this.renderer = renderer;
|
|
75
76
|
/**
|
|
76
77
|
* Sets the text of the SplitButton.
|
|
77
78
|
*/
|
|
@@ -106,18 +107,6 @@ let SplitButtonComponent = class SplitButtonComponent extends ListButton {
|
|
|
106
107
|
* * `null`
|
|
107
108
|
*/
|
|
108
109
|
this.size = 'medium';
|
|
109
|
-
/**
|
|
110
|
-
* The rounded property specifies the border radius of the SplitButton
|
|
111
|
-
* ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-rounded)).
|
|
112
|
-
*
|
|
113
|
-
* The possible values are:
|
|
114
|
-
* * `'small'`
|
|
115
|
-
* * `'medium'` (default)
|
|
116
|
-
* * `'large'`
|
|
117
|
-
* * `'full'`
|
|
118
|
-
* * `null`
|
|
119
|
-
*/
|
|
120
|
-
this.rounded = 'medium';
|
|
121
110
|
/**
|
|
122
111
|
* The fillMode property specifies the background and border styles of the SplitButton
|
|
123
112
|
* ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-fillMode)).
|
|
@@ -232,9 +221,28 @@ let SplitButtonComponent = class SplitButtonComponent extends ListButton {
|
|
|
232
221
|
this.activeArrow = false;
|
|
233
222
|
this.buttonText = '';
|
|
234
223
|
this.lockFocus = false;
|
|
224
|
+
this._rounded = 'medium';
|
|
235
225
|
this._itemClick = this.itemClick;
|
|
236
226
|
this._blur = this.onBlur;
|
|
237
227
|
}
|
|
228
|
+
/**
|
|
229
|
+
* The rounded property specifies the border radius of the SplitButton
|
|
230
|
+
* ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-rounded)).
|
|
231
|
+
*
|
|
232
|
+
* The possible values are:
|
|
233
|
+
* * `'small'`
|
|
234
|
+
* * `'medium'` (default)
|
|
235
|
+
* * `'large'`
|
|
236
|
+
* * `'full'`
|
|
237
|
+
* * `null`
|
|
238
|
+
*/
|
|
239
|
+
set rounded(rounded) {
|
|
240
|
+
this.handleClasses(rounded, 'rounded');
|
|
241
|
+
this._rounded = rounded;
|
|
242
|
+
}
|
|
243
|
+
get rounded() {
|
|
244
|
+
return this._rounded;
|
|
245
|
+
}
|
|
238
246
|
/**
|
|
239
247
|
* When set to `true`, disables a SplitButton item
|
|
240
248
|
* ([see example]({% slug databinding_splitbutton %}#toc-arrays-of-complex-data)).
|
|
@@ -406,6 +414,7 @@ let SplitButtonComponent = class SplitButtonComponent extends ListButton {
|
|
|
406
414
|
*/
|
|
407
415
|
ngAfterViewInit() {
|
|
408
416
|
this.updateButtonText();
|
|
417
|
+
this.handleClasses(this.rounded, 'rounded');
|
|
409
418
|
}
|
|
410
419
|
/**
|
|
411
420
|
* @hidden
|
|
@@ -553,6 +562,16 @@ let SplitButtonComponent = class SplitButtonComponent extends ListButton {
|
|
|
553
562
|
this.popupRef = null;
|
|
554
563
|
}
|
|
555
564
|
}
|
|
565
|
+
handleClasses(value, input) {
|
|
566
|
+
const elem = this.wrapperRef.nativeElement;
|
|
567
|
+
const classes = getStylingClasses('button', input, this[input], value);
|
|
568
|
+
if (classes.toRemove) {
|
|
569
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
570
|
+
}
|
|
571
|
+
if (classes.toAdd) {
|
|
572
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
573
|
+
}
|
|
574
|
+
}
|
|
556
575
|
};
|
|
557
576
|
tslib_1.__decorate([
|
|
558
577
|
Input(),
|
|
@@ -580,8 +599,9 @@ tslib_1.__decorate([
|
|
|
580
599
|
], SplitButtonComponent.prototype, "size", void 0);
|
|
581
600
|
tslib_1.__decorate([
|
|
582
601
|
Input(),
|
|
583
|
-
tslib_1.__metadata("design:type", String)
|
|
584
|
-
|
|
602
|
+
tslib_1.__metadata("design:type", String),
|
|
603
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
604
|
+
], SplitButtonComponent.prototype, "rounded", null);
|
|
585
605
|
tslib_1.__decorate([
|
|
586
606
|
Input(),
|
|
587
607
|
tslib_1.__metadata("design:type", String)
|
|
@@ -795,7 +815,8 @@ SplitButtonComponent = tslib_1.__decorate([
|
|
|
795
815
|
PopupService,
|
|
796
816
|
ElementRef,
|
|
797
817
|
LocalizationService,
|
|
798
|
-
ChangeDetectorRef
|
|
818
|
+
ChangeDetectorRef,
|
|
819
|
+
Renderer2])
|
|
799
820
|
], SplitButtonComponent);
|
|
800
821
|
export { SplitButtonComponent };
|
|
801
822
|
export { ɵ0 };
|
package/dist/fesm2015/index.js
CHANGED
|
@@ -39,7 +39,7 @@ const packageMetadata = {
|
|
|
39
39
|
name: '@progress/kendo-angular-buttons',
|
|
40
40
|
productName: 'Kendo UI for Angular',
|
|
41
41
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
42
|
-
publishDate:
|
|
42
|
+
publishDate: 1641835943,
|
|
43
43
|
version: '',
|
|
44
44
|
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'
|
|
45
45
|
};
|
|
@@ -412,7 +412,7 @@ let ButtonDirective = class ButtonDirective {
|
|
|
412
412
|
this.fillMode = 'solid';
|
|
413
413
|
break;
|
|
414
414
|
case 'clear':
|
|
415
|
-
this.fillMode = '
|
|
415
|
+
this.fillMode = 'flat';
|
|
416
416
|
break;
|
|
417
417
|
default:
|
|
418
418
|
this.fillMode = value;
|
|
@@ -1880,11 +1880,12 @@ const NAVIGATION_SETTINGS_PROVIDER = {
|
|
|
1880
1880
|
* ```
|
|
1881
1881
|
*/
|
|
1882
1882
|
let SplitButtonComponent = class SplitButtonComponent extends ListButton {
|
|
1883
|
-
constructor(focusService, navigationService, wrapperRef, zone, popupService, elRef, localization, cdr) {
|
|
1883
|
+
constructor(focusService, navigationService, wrapperRef, zone, popupService, elRef, localization, cdr, renderer) {
|
|
1884
1884
|
super(focusService, navigationService, wrapperRef, zone, localization, cdr);
|
|
1885
1885
|
this.popupService = popupService;
|
|
1886
1886
|
this.elRef = elRef;
|
|
1887
1887
|
this.localization = localization;
|
|
1888
|
+
this.renderer = renderer;
|
|
1888
1889
|
/**
|
|
1889
1890
|
* Sets the text of the SplitButton.
|
|
1890
1891
|
*/
|
|
@@ -1919,18 +1920,6 @@ let SplitButtonComponent = class SplitButtonComponent extends ListButton {
|
|
|
1919
1920
|
* * `null`
|
|
1920
1921
|
*/
|
|
1921
1922
|
this.size = 'medium';
|
|
1922
|
-
/**
|
|
1923
|
-
* The rounded property specifies the border radius of the SplitButton
|
|
1924
|
-
* ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-rounded)).
|
|
1925
|
-
*
|
|
1926
|
-
* The possible values are:
|
|
1927
|
-
* * `'small'`
|
|
1928
|
-
* * `'medium'` (default)
|
|
1929
|
-
* * `'large'`
|
|
1930
|
-
* * `'full'`
|
|
1931
|
-
* * `null`
|
|
1932
|
-
*/
|
|
1933
|
-
this.rounded = 'medium';
|
|
1934
1923
|
/**
|
|
1935
1924
|
* The fillMode property specifies the background and border styles of the SplitButton
|
|
1936
1925
|
* ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-fillMode)).
|
|
@@ -2045,9 +2034,28 @@ let SplitButtonComponent = class SplitButtonComponent extends ListButton {
|
|
|
2045
2034
|
this.activeArrow = false;
|
|
2046
2035
|
this.buttonText = '';
|
|
2047
2036
|
this.lockFocus = false;
|
|
2037
|
+
this._rounded = 'medium';
|
|
2048
2038
|
this._itemClick = this.itemClick;
|
|
2049
2039
|
this._blur = this.onBlur;
|
|
2050
2040
|
}
|
|
2041
|
+
/**
|
|
2042
|
+
* The rounded property specifies the border radius of the SplitButton
|
|
2043
|
+
* ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-rounded)).
|
|
2044
|
+
*
|
|
2045
|
+
* The possible values are:
|
|
2046
|
+
* * `'small'`
|
|
2047
|
+
* * `'medium'` (default)
|
|
2048
|
+
* * `'large'`
|
|
2049
|
+
* * `'full'`
|
|
2050
|
+
* * `null`
|
|
2051
|
+
*/
|
|
2052
|
+
set rounded(rounded) {
|
|
2053
|
+
this.handleClasses(rounded, 'rounded');
|
|
2054
|
+
this._rounded = rounded;
|
|
2055
|
+
}
|
|
2056
|
+
get rounded() {
|
|
2057
|
+
return this._rounded;
|
|
2058
|
+
}
|
|
2051
2059
|
/**
|
|
2052
2060
|
* When set to `true`, disables a SplitButton item
|
|
2053
2061
|
* ([see example]({% slug databinding_splitbutton %}#toc-arrays-of-complex-data)).
|
|
@@ -2219,6 +2227,7 @@ let SplitButtonComponent = class SplitButtonComponent extends ListButton {
|
|
|
2219
2227
|
*/
|
|
2220
2228
|
ngAfterViewInit() {
|
|
2221
2229
|
this.updateButtonText();
|
|
2230
|
+
this.handleClasses(this.rounded, 'rounded');
|
|
2222
2231
|
}
|
|
2223
2232
|
/**
|
|
2224
2233
|
* @hidden
|
|
@@ -2366,6 +2375,16 @@ let SplitButtonComponent = class SplitButtonComponent extends ListButton {
|
|
|
2366
2375
|
this.popupRef = null;
|
|
2367
2376
|
}
|
|
2368
2377
|
}
|
|
2378
|
+
handleClasses(value, input) {
|
|
2379
|
+
const elem = this.wrapperRef.nativeElement;
|
|
2380
|
+
const classes = getStylingClasses('button', input, this[input], value);
|
|
2381
|
+
if (classes.toRemove) {
|
|
2382
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
2383
|
+
}
|
|
2384
|
+
if (classes.toAdd) {
|
|
2385
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
2386
|
+
}
|
|
2387
|
+
}
|
|
2369
2388
|
};
|
|
2370
2389
|
__decorate([
|
|
2371
2390
|
Input(),
|
|
@@ -2393,8 +2412,9 @@ __decorate([
|
|
|
2393
2412
|
], SplitButtonComponent.prototype, "size", void 0);
|
|
2394
2413
|
__decorate([
|
|
2395
2414
|
Input(),
|
|
2396
|
-
__metadata("design:type", String)
|
|
2397
|
-
|
|
2415
|
+
__metadata("design:type", String),
|
|
2416
|
+
__metadata("design:paramtypes", [String])
|
|
2417
|
+
], SplitButtonComponent.prototype, "rounded", null);
|
|
2398
2418
|
__decorate([
|
|
2399
2419
|
Input(),
|
|
2400
2420
|
__metadata("design:type", String)
|
|
@@ -2608,7 +2628,8 @@ SplitButtonComponent = __decorate([
|
|
|
2608
2628
|
PopupService,
|
|
2609
2629
|
ElementRef,
|
|
2610
2630
|
LocalizationService,
|
|
2611
|
-
ChangeDetectorRef
|
|
2631
|
+
ChangeDetectorRef,
|
|
2632
|
+
Renderer2])
|
|
2612
2633
|
], SplitButtonComponent);
|
|
2613
2634
|
|
|
2614
2635
|
/**
|
package/dist/fesm5/index.js
CHANGED
|
@@ -37,7 +37,7 @@ var packageMetadata = {
|
|
|
37
37
|
name: '@progress/kendo-angular-buttons',
|
|
38
38
|
productName: 'Kendo UI for Angular',
|
|
39
39
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
40
|
-
publishDate:
|
|
40
|
+
publishDate: 1641835943,
|
|
41
41
|
version: '',
|
|
42
42
|
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'
|
|
43
43
|
};
|
|
@@ -499,7 +499,7 @@ var ButtonDirective = /** @class */ (function () {
|
|
|
499
499
|
this.fillMode = 'solid';
|
|
500
500
|
break;
|
|
501
501
|
case 'clear':
|
|
502
|
-
this.fillMode = '
|
|
502
|
+
this.fillMode = 'flat';
|
|
503
503
|
break;
|
|
504
504
|
default:
|
|
505
505
|
this.fillMode = value;
|
|
@@ -2035,11 +2035,12 @@ var NAVIGATION_SETTINGS_PROVIDER = {
|
|
|
2035
2035
|
*/
|
|
2036
2036
|
var SplitButtonComponent = /** @class */ (function (_super) {
|
|
2037
2037
|
__extends(SplitButtonComponent, _super);
|
|
2038
|
-
function SplitButtonComponent(focusService, navigationService, wrapperRef, zone, popupService, elRef, localization, cdr) {
|
|
2038
|
+
function SplitButtonComponent(focusService, navigationService, wrapperRef, zone, popupService, elRef, localization, cdr, renderer) {
|
|
2039
2039
|
var _this = _super.call(this, focusService, navigationService, wrapperRef, zone, localization, cdr) || this;
|
|
2040
2040
|
_this.popupService = popupService;
|
|
2041
2041
|
_this.elRef = elRef;
|
|
2042
2042
|
_this.localization = localization;
|
|
2043
|
+
_this.renderer = renderer;
|
|
2043
2044
|
/**
|
|
2044
2045
|
* Sets the text of the SplitButton.
|
|
2045
2046
|
*/
|
|
@@ -2074,18 +2075,6 @@ var SplitButtonComponent = /** @class */ (function (_super) {
|
|
|
2074
2075
|
* * `null`
|
|
2075
2076
|
*/
|
|
2076
2077
|
_this.size = 'medium';
|
|
2077
|
-
/**
|
|
2078
|
-
* The rounded property specifies the border radius of the SplitButton
|
|
2079
|
-
* ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-rounded)).
|
|
2080
|
-
*
|
|
2081
|
-
* The possible values are:
|
|
2082
|
-
* * `'small'`
|
|
2083
|
-
* * `'medium'` (default)
|
|
2084
|
-
* * `'large'`
|
|
2085
|
-
* * `'full'`
|
|
2086
|
-
* * `null`
|
|
2087
|
-
*/
|
|
2088
|
-
_this.rounded = 'medium';
|
|
2089
2078
|
/**
|
|
2090
2079
|
* The fillMode property specifies the background and border styles of the SplitButton
|
|
2091
2080
|
* ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-fillMode)).
|
|
@@ -2200,10 +2189,33 @@ var SplitButtonComponent = /** @class */ (function (_super) {
|
|
|
2200
2189
|
_this.activeArrow = false;
|
|
2201
2190
|
_this.buttonText = '';
|
|
2202
2191
|
_this.lockFocus = false;
|
|
2192
|
+
_this._rounded = 'medium';
|
|
2203
2193
|
_this._itemClick = _this.itemClick;
|
|
2204
2194
|
_this._blur = _this.onBlur;
|
|
2205
2195
|
return _this;
|
|
2206
2196
|
}
|
|
2197
|
+
Object.defineProperty(SplitButtonComponent.prototype, "rounded", {
|
|
2198
|
+
get: function () {
|
|
2199
|
+
return this._rounded;
|
|
2200
|
+
},
|
|
2201
|
+
/**
|
|
2202
|
+
* The rounded property specifies the border radius of the SplitButton
|
|
2203
|
+
* ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-rounded)).
|
|
2204
|
+
*
|
|
2205
|
+
* The possible values are:
|
|
2206
|
+
* * `'small'`
|
|
2207
|
+
* * `'medium'` (default)
|
|
2208
|
+
* * `'large'`
|
|
2209
|
+
* * `'full'`
|
|
2210
|
+
* * `null`
|
|
2211
|
+
*/
|
|
2212
|
+
set: function (rounded) {
|
|
2213
|
+
this.handleClasses(rounded, 'rounded');
|
|
2214
|
+
this._rounded = rounded;
|
|
2215
|
+
},
|
|
2216
|
+
enumerable: true,
|
|
2217
|
+
configurable: true
|
|
2218
|
+
});
|
|
2207
2219
|
Object.defineProperty(SplitButtonComponent.prototype, "disabled", {
|
|
2208
2220
|
get: function () {
|
|
2209
2221
|
return this._disabled;
|
|
@@ -2415,6 +2427,7 @@ var SplitButtonComponent = /** @class */ (function (_super) {
|
|
|
2415
2427
|
*/
|
|
2416
2428
|
SplitButtonComponent.prototype.ngAfterViewInit = function () {
|
|
2417
2429
|
this.updateButtonText();
|
|
2430
|
+
this.handleClasses(this.rounded, 'rounded');
|
|
2418
2431
|
};
|
|
2419
2432
|
/**
|
|
2420
2433
|
* @hidden
|
|
@@ -2581,6 +2594,16 @@ var SplitButtonComponent = /** @class */ (function (_super) {
|
|
|
2581
2594
|
this.popupRef = null;
|
|
2582
2595
|
}
|
|
2583
2596
|
};
|
|
2597
|
+
SplitButtonComponent.prototype.handleClasses = function (value, input) {
|
|
2598
|
+
var elem = this.wrapperRef.nativeElement;
|
|
2599
|
+
var classes = getStylingClasses('button', input, this[input], value);
|
|
2600
|
+
if (classes.toRemove) {
|
|
2601
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
2602
|
+
}
|
|
2603
|
+
if (classes.toAdd) {
|
|
2604
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
2605
|
+
}
|
|
2606
|
+
};
|
|
2584
2607
|
__decorate([
|
|
2585
2608
|
Input(),
|
|
2586
2609
|
__metadata("design:type", String)
|
|
@@ -2607,8 +2630,9 @@ var SplitButtonComponent = /** @class */ (function (_super) {
|
|
|
2607
2630
|
], SplitButtonComponent.prototype, "size", void 0);
|
|
2608
2631
|
__decorate([
|
|
2609
2632
|
Input(),
|
|
2610
|
-
__metadata("design:type", String)
|
|
2611
|
-
|
|
2633
|
+
__metadata("design:type", String),
|
|
2634
|
+
__metadata("design:paramtypes", [String])
|
|
2635
|
+
], SplitButtonComponent.prototype, "rounded", null);
|
|
2612
2636
|
__decorate([
|
|
2613
2637
|
Input(),
|
|
2614
2638
|
__metadata("design:type", String)
|
|
@@ -2753,7 +2777,8 @@ var SplitButtonComponent = /** @class */ (function (_super) {
|
|
|
2753
2777
|
PopupService,
|
|
2754
2778
|
ElementRef,
|
|
2755
2779
|
LocalizationService,
|
|
2756
|
-
ChangeDetectorRef
|
|
2780
|
+
ChangeDetectorRef,
|
|
2781
|
+
Renderer2])
|
|
2757
2782
|
], SplitButtonComponent);
|
|
2758
2783
|
return SplitButtonComponent;
|
|
2759
2784
|
}(ListButton));
|
|
@@ -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: 1641835943,
|
|
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
|
};
|
|
@@ -71,11 +71,12 @@ var NAVIGATION_SETTINGS_PROVIDER = {
|
|
|
71
71
|
*/
|
|
72
72
|
var SplitButtonComponent = /** @class */ (function (_super) {
|
|
73
73
|
tslib_1.__extends(SplitButtonComponent, _super);
|
|
74
|
-
function SplitButtonComponent(focusService, navigationService, wrapperRef, zone, popupService, elRef, localization, cdr) {
|
|
74
|
+
function SplitButtonComponent(focusService, navigationService, wrapperRef, zone, popupService, elRef, localization, cdr, renderer) {
|
|
75
75
|
var _this = _super.call(this, focusService, navigationService, wrapperRef, zone, localization, cdr) || this;
|
|
76
76
|
_this.popupService = popupService;
|
|
77
77
|
_this.elRef = elRef;
|
|
78
78
|
_this.localization = localization;
|
|
79
|
+
_this.renderer = renderer;
|
|
79
80
|
/**
|
|
80
81
|
* Sets the text of the SplitButton.
|
|
81
82
|
*/
|
|
@@ -110,18 +111,6 @@ var SplitButtonComponent = /** @class */ (function (_super) {
|
|
|
110
111
|
* * `null`
|
|
111
112
|
*/
|
|
112
113
|
_this.size = 'medium';
|
|
113
|
-
/**
|
|
114
|
-
* The rounded property specifies the border radius of the SplitButton
|
|
115
|
-
* ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-rounded)).
|
|
116
|
-
*
|
|
117
|
-
* The possible values are:
|
|
118
|
-
* * `'small'`
|
|
119
|
-
* * `'medium'` (default)
|
|
120
|
-
* * `'large'`
|
|
121
|
-
* * `'full'`
|
|
122
|
-
* * `null`
|
|
123
|
-
*/
|
|
124
|
-
_this.rounded = 'medium';
|
|
125
114
|
/**
|
|
126
115
|
* The fillMode property specifies the background and border styles of the SplitButton
|
|
127
116
|
* ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-fillMode)).
|
|
@@ -236,10 +225,33 @@ var SplitButtonComponent = /** @class */ (function (_super) {
|
|
|
236
225
|
_this.activeArrow = false;
|
|
237
226
|
_this.buttonText = '';
|
|
238
227
|
_this.lockFocus = false;
|
|
228
|
+
_this._rounded = 'medium';
|
|
239
229
|
_this._itemClick = _this.itemClick;
|
|
240
230
|
_this._blur = _this.onBlur;
|
|
241
231
|
return _this;
|
|
242
232
|
}
|
|
233
|
+
Object.defineProperty(SplitButtonComponent.prototype, "rounded", {
|
|
234
|
+
get: function () {
|
|
235
|
+
return this._rounded;
|
|
236
|
+
},
|
|
237
|
+
/**
|
|
238
|
+
* The rounded property specifies the border radius of the SplitButton
|
|
239
|
+
* ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-rounded)).
|
|
240
|
+
*
|
|
241
|
+
* The possible values are:
|
|
242
|
+
* * `'small'`
|
|
243
|
+
* * `'medium'` (default)
|
|
244
|
+
* * `'large'`
|
|
245
|
+
* * `'full'`
|
|
246
|
+
* * `null`
|
|
247
|
+
*/
|
|
248
|
+
set: function (rounded) {
|
|
249
|
+
this.handleClasses(rounded, 'rounded');
|
|
250
|
+
this._rounded = rounded;
|
|
251
|
+
},
|
|
252
|
+
enumerable: true,
|
|
253
|
+
configurable: true
|
|
254
|
+
});
|
|
243
255
|
Object.defineProperty(SplitButtonComponent.prototype, "disabled", {
|
|
244
256
|
get: function () {
|
|
245
257
|
return this._disabled;
|
|
@@ -451,6 +463,7 @@ var SplitButtonComponent = /** @class */ (function (_super) {
|
|
|
451
463
|
*/
|
|
452
464
|
SplitButtonComponent.prototype.ngAfterViewInit = function () {
|
|
453
465
|
this.updateButtonText();
|
|
466
|
+
this.handleClasses(this.rounded, 'rounded');
|
|
454
467
|
};
|
|
455
468
|
/**
|
|
456
469
|
* @hidden
|
|
@@ -617,6 +630,16 @@ var SplitButtonComponent = /** @class */ (function (_super) {
|
|
|
617
630
|
this.popupRef = null;
|
|
618
631
|
}
|
|
619
632
|
};
|
|
633
|
+
SplitButtonComponent.prototype.handleClasses = function (value, input) {
|
|
634
|
+
var elem = this.wrapperRef.nativeElement;
|
|
635
|
+
var classes = util_2.getStylingClasses('button', input, this[input], value);
|
|
636
|
+
if (classes.toRemove) {
|
|
637
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
638
|
+
}
|
|
639
|
+
if (classes.toAdd) {
|
|
640
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
641
|
+
}
|
|
642
|
+
};
|
|
620
643
|
tslib_1.__decorate([
|
|
621
644
|
core_1.Input(),
|
|
622
645
|
tslib_1.__metadata("design:type", String)
|
|
@@ -643,8 +666,9 @@ var SplitButtonComponent = /** @class */ (function (_super) {
|
|
|
643
666
|
], SplitButtonComponent.prototype, "size", void 0);
|
|
644
667
|
tslib_1.__decorate([
|
|
645
668
|
core_1.Input(),
|
|
646
|
-
tslib_1.__metadata("design:type", String)
|
|
647
|
-
|
|
669
|
+
tslib_1.__metadata("design:type", String),
|
|
670
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
671
|
+
], SplitButtonComponent.prototype, "rounded", null);
|
|
648
672
|
tslib_1.__decorate([
|
|
649
673
|
core_1.Input(),
|
|
650
674
|
tslib_1.__metadata("design:type", String)
|
|
@@ -789,7 +813,8 @@ var SplitButtonComponent = /** @class */ (function (_super) {
|
|
|
789
813
|
kendo_angular_popup_1.PopupService,
|
|
790
814
|
core_1.ElementRef,
|
|
791
815
|
kendo_angular_l10n_1.LocalizationService,
|
|
792
|
-
core_1.ChangeDetectorRef
|
|
816
|
+
core_1.ChangeDetectorRef,
|
|
817
|
+
core_1.Renderer2])
|
|
793
818
|
], SplitButtonComponent);
|
|
794
819
|
return SplitButtonComponent;
|
|
795
820
|
}(list_button_1.ListButton));
|