@progress/kendo-angular-buttons 7.0.0-dev.202201061631 → 7.0.0-dev.202201181837
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/LICENSE.md +1 -1
- package/NOTICE.txt +119 -79
- package/README.md +1 -1
- package/dist/cdn/js/kendo-angular-buttons.js +2 -2
- package/dist/cdn/main.js +1 -1
- package/dist/es/button/button.directive.js +6 -15
- package/dist/es/buttongroup/buttongroup.component.js +10 -7
- package/dist/es/chip/chip-list.component.js +3 -0
- package/dist/es/dropdownbutton/dropdownbutton.component.js +26 -14
- package/dist/es/listbutton/list-button.js +3 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/splitbutton/splitbutton.component.js +69 -32
- package/dist/es2015/button/button.directive.d.ts +0 -1
- package/dist/es2015/button/button.directive.js +6 -11
- package/dist/es2015/buttongroup/buttongroup.component.js +10 -7
- package/dist/es2015/chip/chip-list.component.js +3 -0
- package/dist/es2015/common/models/fillmode.d.ts +1 -1
- package/dist/es2015/dropdownbutton/dropdownbutton.component.d.ts +1 -0
- package/dist/es2015/dropdownbutton/dropdownbutton.component.js +22 -14
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/listbutton/list-button.js +3 -0
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/es2015/splitbutton/splitbutton.component.d.ts +11 -7
- package/dist/es2015/splitbutton/splitbutton.component.js +61 -32
- package/dist/fesm2015/index.js +97 -62
- package/dist/fesm5/index.js +109 -66
- package/dist/npm/button/button.directive.js +5 -14
- package/dist/npm/buttongroup/buttongroup.component.js +10 -7
- package/dist/npm/chip/chip-list.component.js +3 -0
- package/dist/npm/dropdownbutton/dropdownbutton.component.js +26 -14
- package/dist/npm/listbutton/list-button.js +3 -0
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/splitbutton/splitbutton.component.js +67 -30
- package/dist/systemjs/kendo-angular-buttons.js +1 -1
- package/package.json +4 -3
|
@@ -9,7 +9,7 @@ import { isDocumentAvailable, isChanged, hasObservers, Keys } from '@progress/ke
|
|
|
9
9
|
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
10
10
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
11
11
|
import { packageMetadata } from '../package-metadata';
|
|
12
|
-
import { getStylingClasses, getThemeColorClasses } from '../util';
|
|
12
|
+
import { getStylingClasses, getThemeColorClasses, isPresent } from '../util';
|
|
13
13
|
var SPAN_TAG_NAME = 'SPAN';
|
|
14
14
|
/**
|
|
15
15
|
* Represents the Kendo UI Button component for Angular.
|
|
@@ -372,9 +372,6 @@ var ButtonDirective = /** @class */ (function () {
|
|
|
372
372
|
case 'default':
|
|
373
373
|
this.fillMode = 'solid';
|
|
374
374
|
break;
|
|
375
|
-
case 'clear':
|
|
376
|
-
this.fillMode = 'link';
|
|
377
|
-
break;
|
|
378
375
|
default:
|
|
379
376
|
this.fillMode = value;
|
|
380
377
|
break;
|
|
@@ -494,15 +491,6 @@ var ButtonDirective = /** @class */ (function () {
|
|
|
494
491
|
return false;
|
|
495
492
|
}
|
|
496
493
|
};
|
|
497
|
-
Object.defineProperty(ButtonDirective.prototype, "text", {
|
|
498
|
-
get: function () {
|
|
499
|
-
if (isDocumentAvailable()) {
|
|
500
|
-
return this.element.innerHTML.trim();
|
|
501
|
-
}
|
|
502
|
-
},
|
|
503
|
-
enumerable: true,
|
|
504
|
-
configurable: true
|
|
505
|
-
});
|
|
506
494
|
ButtonDirective.prototype.addImgIcon = function (imageUrl) {
|
|
507
495
|
var renderer = this.renderer;
|
|
508
496
|
this.iconSpanNode = renderer.createElement('span');
|
|
@@ -532,8 +520,11 @@ var ButtonDirective = /** @class */ (function () {
|
|
|
532
520
|
}
|
|
533
521
|
};
|
|
534
522
|
ButtonDirective.prototype.addTextSpan = function () {
|
|
535
|
-
if (isDocumentAvailable() && this.hasText()) {
|
|
536
|
-
|
|
523
|
+
if (isDocumentAvailable() && this.hasText() && isPresent(this.element.append)) {
|
|
524
|
+
var span = this.renderer.createElement('span');
|
|
525
|
+
this.renderer.addClass(span, 'k-button-text');
|
|
526
|
+
span.append.apply(span, Array.from(this.element.childNodes));
|
|
527
|
+
this.element.append(span);
|
|
537
528
|
}
|
|
538
529
|
};
|
|
539
530
|
ButtonDirective.prototype.prependChild = function (node) {
|
|
@@ -10,6 +10,8 @@ import { isChanged, Keys } from '@progress/kendo-angular-common';
|
|
|
10
10
|
import { KendoButtonService } from '../button/button.service';
|
|
11
11
|
import { isPresent } from '../util';
|
|
12
12
|
import { PreventableEvent } from '../preventable-event';
|
|
13
|
+
import { packageMetadata } from '../package-metadata';
|
|
14
|
+
import { validatePackage } from '@progress/kendo-licensing';
|
|
13
15
|
/**
|
|
14
16
|
* @hidden
|
|
15
17
|
*/
|
|
@@ -32,6 +34,7 @@ var ButtonGroupComponent = /** @class */ (function () {
|
|
|
32
34
|
this.navigate = new EventEmitter();
|
|
33
35
|
this._tabIndex = 0;
|
|
34
36
|
this.currentTabIndex = 0;
|
|
37
|
+
validatePackage(packageMetadata);
|
|
35
38
|
this.localizationChangeSubscription = localization.changes.subscribe(function (_a) {
|
|
36
39
|
var rtl = _a.rtl;
|
|
37
40
|
return _this.direction = rtl ? 'rtl' : 'ltr';
|
|
@@ -150,7 +153,7 @@ var ButtonGroupComponent = /** @class */ (function () {
|
|
|
150
153
|
if (button.togglable) {
|
|
151
154
|
button.setSelected(newSelectionValue);
|
|
152
155
|
}
|
|
153
|
-
button.setAttribute(tabindex,
|
|
156
|
+
button.setAttribute(tabindex, '0');
|
|
154
157
|
});
|
|
155
158
|
};
|
|
156
159
|
ButtonGroupComponent.prototype.ngOnChanges = function (change) {
|
|
@@ -166,10 +169,10 @@ var ButtonGroupComponent = /** @class */ (function () {
|
|
|
166
169
|
ButtonGroupComponent.prototype.ngAfterContentInit = function () {
|
|
167
170
|
this.buttons.forEach(function (button) {
|
|
168
171
|
if (button.selected) {
|
|
169
|
-
button.setAttribute(tabindex,
|
|
172
|
+
button.setAttribute(tabindex, '0');
|
|
170
173
|
}
|
|
171
174
|
else {
|
|
172
|
-
button.setAttribute(tabindex,
|
|
175
|
+
button.setAttribute(tabindex, '-1');
|
|
173
176
|
}
|
|
174
177
|
});
|
|
175
178
|
};
|
|
@@ -213,24 +216,24 @@ var ButtonGroupComponent = /** @class */ (function () {
|
|
|
213
216
|
ButtonGroupComponent.prototype.deactivate = function (buttons) {
|
|
214
217
|
buttons.forEach(function (button) {
|
|
215
218
|
button.setSelected(false);
|
|
216
|
-
button.setAttribute(tabindex,
|
|
219
|
+
button.setAttribute(tabindex, '-1');
|
|
217
220
|
});
|
|
218
221
|
};
|
|
219
222
|
ButtonGroupComponent.prototype.activate = function (buttons) {
|
|
220
223
|
buttons.forEach(function (button) {
|
|
221
224
|
button.setSelected(true);
|
|
222
|
-
button.setAttribute(tabindex,
|
|
225
|
+
button.setAttribute(tabindex, '0');
|
|
223
226
|
button.focus();
|
|
224
227
|
});
|
|
225
228
|
};
|
|
226
229
|
ButtonGroupComponent.prototype.defocus = function (buttons) {
|
|
227
230
|
buttons.forEach(function (button) {
|
|
228
|
-
button.setAttribute(tabindex,
|
|
231
|
+
button.setAttribute(tabindex, '-1');
|
|
229
232
|
});
|
|
230
233
|
};
|
|
231
234
|
ButtonGroupComponent.prototype.focus = function (buttons) {
|
|
232
235
|
buttons.forEach(function (button) {
|
|
233
|
-
button.setAttribute(tabindex,
|
|
236
|
+
button.setAttribute(tabindex, '0');
|
|
234
237
|
button.focus();
|
|
235
238
|
});
|
|
236
239
|
};
|
|
@@ -7,6 +7,8 @@ import { Component, Input, HostBinding, ContentChildren, QueryList, EventEmitter
|
|
|
7
7
|
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
8
8
|
import { ChipComponent } from './chip.component';
|
|
9
9
|
import { closest, getStylingClasses } from '../util';
|
|
10
|
+
import { validatePackage } from '@progress/kendo-licensing';
|
|
11
|
+
import { packageMetadata } from '../package-metadata';
|
|
10
12
|
var ChipListComponent = /** @class */ (function () {
|
|
11
13
|
function ChipListComponent(localizationService, renderer, element) {
|
|
12
14
|
this.localizationService = localizationService;
|
|
@@ -32,6 +34,7 @@ var ChipListComponent = /** @class */ (function () {
|
|
|
32
34
|
this.remove = new EventEmitter();
|
|
33
35
|
this.role = 'listbox';
|
|
34
36
|
this._size = 'medium';
|
|
37
|
+
validatePackage(packageMetadata);
|
|
35
38
|
this.direction = localizationService.rtl ? 'rtl' : 'ltr';
|
|
36
39
|
}
|
|
37
40
|
Object.defineProperty(ChipListComponent.prototype, "size", {
|
|
@@ -104,18 +104,6 @@ var DropDownButtonComponent = /** @class */ (function (_super) {
|
|
|
104
104
|
* * `null`
|
|
105
105
|
*/
|
|
106
106
|
_this.rounded = 'medium';
|
|
107
|
-
/**
|
|
108
|
-
* The fillMode property specifies the background and border styles of the DropDownButton
|
|
109
|
-
* ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-fillMode)).
|
|
110
|
-
*
|
|
111
|
-
* The available values are:
|
|
112
|
-
* * `solid` (default)
|
|
113
|
-
* * `flat`
|
|
114
|
-
* * `outline`
|
|
115
|
-
* * `link`
|
|
116
|
-
* * `null`
|
|
117
|
-
*/
|
|
118
|
-
_this.fillMode = 'solid';
|
|
119
107
|
/**
|
|
120
108
|
* The DropDownButton allows you to specify predefined theme colors.
|
|
121
109
|
* The theme color will be applied as a background and border color while also amending the text color accordingly
|
|
@@ -163,6 +151,7 @@ var DropDownButtonComponent = /** @class */ (function (_super) {
|
|
|
163
151
|
*/
|
|
164
152
|
_this.onBlur = new EventEmitter(); //tslint:disable-line:no-output-rename
|
|
165
153
|
_this.listId = guid();
|
|
154
|
+
_this._fillMode = 'solid';
|
|
166
155
|
_this._itemClick = _this.itemClick;
|
|
167
156
|
_this._blur = _this.onBlur;
|
|
168
157
|
return _this;
|
|
@@ -217,6 +206,28 @@ var DropDownButtonComponent = /** @class */ (function (_super) {
|
|
|
217
206
|
enumerable: true,
|
|
218
207
|
configurable: true
|
|
219
208
|
});
|
|
209
|
+
Object.defineProperty(DropDownButtonComponent.prototype, "fillMode", {
|
|
210
|
+
get: function () {
|
|
211
|
+
return this._fillMode;
|
|
212
|
+
},
|
|
213
|
+
/**
|
|
214
|
+
* The fillMode property specifies the background and border styles of the DropDownButton
|
|
215
|
+
* ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-fillMode)).
|
|
216
|
+
*
|
|
217
|
+
* The available values are:
|
|
218
|
+
* * `solid` (default)
|
|
219
|
+
* * `flat`
|
|
220
|
+
* * `outline`
|
|
221
|
+
* * `link`
|
|
222
|
+
* * `null`
|
|
223
|
+
*/
|
|
224
|
+
set: function (fillMode) {
|
|
225
|
+
// Temporary workaround for missing 'clear' styles
|
|
226
|
+
this._fillMode = fillMode === 'clear' ? 'flat' : fillMode;
|
|
227
|
+
},
|
|
228
|
+
enumerable: true,
|
|
229
|
+
configurable: true
|
|
230
|
+
});
|
|
220
231
|
Object.defineProperty(DropDownButtonComponent.prototype, "openState", {
|
|
221
232
|
/**
|
|
222
233
|
* @hidden
|
|
@@ -563,8 +574,9 @@ var DropDownButtonComponent = /** @class */ (function (_super) {
|
|
|
563
574
|
], DropDownButtonComponent.prototype, "rounded", void 0);
|
|
564
575
|
tslib_1.__decorate([
|
|
565
576
|
Input(),
|
|
566
|
-
tslib_1.__metadata("design:type", String)
|
|
567
|
-
|
|
577
|
+
tslib_1.__metadata("design:type", String),
|
|
578
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
579
|
+
], DropDownButtonComponent.prototype, "fillMode", null);
|
|
568
580
|
tslib_1.__decorate([
|
|
569
581
|
Input(),
|
|
570
582
|
tslib_1.__metadata("design:type", String)
|
|
@@ -9,6 +9,8 @@ import { KeyEvents } from './../navigation/key-events';
|
|
|
9
9
|
import { NavigationAction } from './../navigation/navigation-action';
|
|
10
10
|
import { isDocumentAvailable, guid, Keys } from '@progress/kendo-angular-common';
|
|
11
11
|
import { isPresent } from './../util';
|
|
12
|
+
import { validatePackage } from '@progress/kendo-licensing';
|
|
13
|
+
import { packageMetadata } from '../package-metadata';
|
|
12
14
|
/**
|
|
13
15
|
* @hidden
|
|
14
16
|
*/
|
|
@@ -26,6 +28,7 @@ var ListButton = /** @class */ (function () {
|
|
|
26
28
|
this._popupSettings = { animate: true, popupClass: '' };
|
|
27
29
|
this.listId = guid();
|
|
28
30
|
this._isFocused = false;
|
|
31
|
+
validatePackage(packageMetadata);
|
|
29
32
|
this.focusService = focusService;
|
|
30
33
|
this.navigationService = navigationService;
|
|
31
34
|
this.wrapper = wrapperRef.nativeElement;
|
|
@@ -9,7 +9,7 @@ export var packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-buttons',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1642530954,
|
|
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
|
};
|
|
@@ -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,29 +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
|
-
/**
|
|
123
|
-
* The fillMode property specifies the background and border styles of the SplitButton
|
|
124
|
-
* ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-fillMode)).
|
|
125
|
-
*
|
|
126
|
-
* The available values are:
|
|
127
|
-
* * `solid` (default)
|
|
128
|
-
* * `flat`
|
|
129
|
-
* * `outline`
|
|
130
|
-
* * `link`
|
|
131
|
-
*/
|
|
132
|
-
_this.fillMode = 'solid';
|
|
133
111
|
/**
|
|
134
112
|
* The SplitButton allows you to specify predefined theme colors.
|
|
135
113
|
* The theme color will be applied as a background and border color while also amending the text color accordingly
|
|
@@ -226,17 +204,62 @@ var SplitButtonComponent = /** @class */ (function (_super) {
|
|
|
226
204
|
* This event is preventable. If you cancel the event, the popup will remain open.
|
|
227
205
|
*/
|
|
228
206
|
_this.close = new EventEmitter();
|
|
229
|
-
_this.listId = guid();
|
|
230
207
|
/**
|
|
231
208
|
* @hidden
|
|
232
209
|
*/
|
|
233
210
|
_this.activeArrow = false;
|
|
211
|
+
_this.listId = guid();
|
|
234
212
|
_this.buttonText = '';
|
|
235
213
|
_this.lockFocus = false;
|
|
214
|
+
_this._rounded = 'medium';
|
|
215
|
+
_this._fillMode = "solid";
|
|
236
216
|
_this._itemClick = _this.itemClick;
|
|
237
217
|
_this._blur = _this.onBlur;
|
|
238
218
|
return _this;
|
|
239
219
|
}
|
|
220
|
+
Object.defineProperty(SplitButtonComponent.prototype, "rounded", {
|
|
221
|
+
get: function () {
|
|
222
|
+
return this._rounded;
|
|
223
|
+
},
|
|
224
|
+
/**
|
|
225
|
+
* The rounded property specifies the border radius of the SplitButton
|
|
226
|
+
* ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-rounded)).
|
|
227
|
+
*
|
|
228
|
+
* The possible values are:
|
|
229
|
+
* * `'small'`
|
|
230
|
+
* * `'medium'` (default)
|
|
231
|
+
* * `'large'`
|
|
232
|
+
* * `'full'`
|
|
233
|
+
* * `null`
|
|
234
|
+
*/
|
|
235
|
+
set: function (rounded) {
|
|
236
|
+
this.handleClasses(rounded, 'rounded');
|
|
237
|
+
this._rounded = rounded;
|
|
238
|
+
},
|
|
239
|
+
enumerable: true,
|
|
240
|
+
configurable: true
|
|
241
|
+
});
|
|
242
|
+
Object.defineProperty(SplitButtonComponent.prototype, "fillMode", {
|
|
243
|
+
get: function () {
|
|
244
|
+
return this._fillMode;
|
|
245
|
+
},
|
|
246
|
+
/**
|
|
247
|
+
* The fillMode property specifies the background and border styles of the SplitButton
|
|
248
|
+
* ([see example]({% slug api_buttons_splitbuttoncomponent %}#toc-fillMode)).
|
|
249
|
+
*
|
|
250
|
+
* The available values are:
|
|
251
|
+
* * `solid` (default)
|
|
252
|
+
* * `flat`
|
|
253
|
+
* * `outline`
|
|
254
|
+
* * `link`
|
|
255
|
+
*/
|
|
256
|
+
set: function (fillMode) {
|
|
257
|
+
// Temporary workaround for missing 'clear' styles
|
|
258
|
+
this._fillMode = fillMode === 'clear' ? 'flat' : fillMode;
|
|
259
|
+
},
|
|
260
|
+
enumerable: true,
|
|
261
|
+
configurable: true
|
|
262
|
+
});
|
|
240
263
|
Object.defineProperty(SplitButtonComponent.prototype, "disabled", {
|
|
241
264
|
get: function () {
|
|
242
265
|
return this._disabled;
|
|
@@ -448,6 +471,7 @@ var SplitButtonComponent = /** @class */ (function (_super) {
|
|
|
448
471
|
*/
|
|
449
472
|
SplitButtonComponent.prototype.ngAfterViewInit = function () {
|
|
450
473
|
this.updateButtonText();
|
|
474
|
+
this.handleClasses(this.rounded, 'rounded');
|
|
451
475
|
};
|
|
452
476
|
/**
|
|
453
477
|
* @hidden
|
|
@@ -614,6 +638,16 @@ var SplitButtonComponent = /** @class */ (function (_super) {
|
|
|
614
638
|
this.popupRef = null;
|
|
615
639
|
}
|
|
616
640
|
};
|
|
641
|
+
SplitButtonComponent.prototype.handleClasses = function (value, input) {
|
|
642
|
+
var elem = this.wrapperRef.nativeElement;
|
|
643
|
+
var classes = getStylingClasses('button', input, this[input], value);
|
|
644
|
+
if (classes.toRemove) {
|
|
645
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
646
|
+
}
|
|
647
|
+
if (classes.toAdd) {
|
|
648
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
649
|
+
}
|
|
650
|
+
};
|
|
617
651
|
tslib_1.__decorate([
|
|
618
652
|
Input(),
|
|
619
653
|
tslib_1.__metadata("design:type", String)
|
|
@@ -640,12 +674,14 @@ var SplitButtonComponent = /** @class */ (function (_super) {
|
|
|
640
674
|
], SplitButtonComponent.prototype, "size", void 0);
|
|
641
675
|
tslib_1.__decorate([
|
|
642
676
|
Input(),
|
|
643
|
-
tslib_1.__metadata("design:type", String)
|
|
644
|
-
|
|
677
|
+
tslib_1.__metadata("design:type", String),
|
|
678
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
679
|
+
], SplitButtonComponent.prototype, "rounded", null);
|
|
645
680
|
tslib_1.__decorate([
|
|
646
681
|
Input(),
|
|
647
|
-
tslib_1.__metadata("design:type", String)
|
|
648
|
-
|
|
682
|
+
tslib_1.__metadata("design:type", String),
|
|
683
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
684
|
+
], SplitButtonComponent.prototype, "fillMode", null);
|
|
649
685
|
tslib_1.__decorate([
|
|
650
686
|
Input(),
|
|
651
687
|
tslib_1.__metadata("design:type", String)
|
|
@@ -786,7 +822,8 @@ var SplitButtonComponent = /** @class */ (function (_super) {
|
|
|
786
822
|
PopupService,
|
|
787
823
|
ElementRef,
|
|
788
824
|
LocalizationService,
|
|
789
|
-
ChangeDetectorRef
|
|
825
|
+
ChangeDetectorRef,
|
|
826
|
+
Renderer2])
|
|
790
827
|
], SplitButtonComponent);
|
|
791
828
|
return SplitButtonComponent;
|
|
792
829
|
}(ListButton));
|
|
@@ -202,7 +202,6 @@ export declare class ButtonDirective implements OnDestroy, AfterViewInit {
|
|
|
202
202
|
setSelected(value: boolean): void;
|
|
203
203
|
private toggleAriaPressed;
|
|
204
204
|
private hasText;
|
|
205
|
-
private readonly text;
|
|
206
205
|
private addImgIcon;
|
|
207
206
|
private addIcon;
|
|
208
207
|
private addTextSpan;
|
|
@@ -9,7 +9,7 @@ import { isDocumentAvailable, isChanged, hasObservers, Keys } from '@progress/ke
|
|
|
9
9
|
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
10
10
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
11
11
|
import { packageMetadata } from '../package-metadata';
|
|
12
|
-
import { getStylingClasses, getThemeColorClasses } from '../util';
|
|
12
|
+
import { getStylingClasses, getThemeColorClasses, isPresent } from '../util';
|
|
13
13
|
const SPAN_TAG_NAME = 'SPAN';
|
|
14
14
|
/**
|
|
15
15
|
* Represents the Kendo UI Button component for Angular.
|
|
@@ -285,9 +285,6 @@ let ButtonDirective = class ButtonDirective {
|
|
|
285
285
|
case 'default':
|
|
286
286
|
this.fillMode = 'solid';
|
|
287
287
|
break;
|
|
288
|
-
case 'clear':
|
|
289
|
-
this.fillMode = 'link';
|
|
290
|
-
break;
|
|
291
288
|
default:
|
|
292
289
|
this.fillMode = value;
|
|
293
290
|
break;
|
|
@@ -401,11 +398,6 @@ let ButtonDirective = class ButtonDirective {
|
|
|
401
398
|
return false;
|
|
402
399
|
}
|
|
403
400
|
}
|
|
404
|
-
get text() {
|
|
405
|
-
if (isDocumentAvailable()) {
|
|
406
|
-
return this.element.innerHTML.trim();
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
401
|
addImgIcon(imageUrl) {
|
|
410
402
|
let renderer = this.renderer;
|
|
411
403
|
this.iconSpanNode = renderer.createElement('span');
|
|
@@ -435,8 +427,11 @@ let ButtonDirective = class ButtonDirective {
|
|
|
435
427
|
}
|
|
436
428
|
}
|
|
437
429
|
addTextSpan() {
|
|
438
|
-
if (isDocumentAvailable() && this.hasText()) {
|
|
439
|
-
|
|
430
|
+
if (isDocumentAvailable() && this.hasText() && isPresent(this.element.append)) {
|
|
431
|
+
const span = this.renderer.createElement('span');
|
|
432
|
+
this.renderer.addClass(span, 'k-button-text');
|
|
433
|
+
span.append(...Array.from(this.element.childNodes));
|
|
434
|
+
this.element.append(span);
|
|
440
435
|
}
|
|
441
436
|
}
|
|
442
437
|
prependChild(node) {
|
|
@@ -10,6 +10,8 @@ import { isChanged, Keys } from '@progress/kendo-angular-common';
|
|
|
10
10
|
import { KendoButtonService } from '../button/button.service';
|
|
11
11
|
import { isPresent } from '../util';
|
|
12
12
|
import { PreventableEvent } from '../preventable-event';
|
|
13
|
+
import { packageMetadata } from '../package-metadata';
|
|
14
|
+
import { validatePackage } from '@progress/kendo-licensing';
|
|
13
15
|
/**
|
|
14
16
|
* @hidden
|
|
15
17
|
*/
|
|
@@ -31,6 +33,7 @@ let ButtonGroupComponent = class ButtonGroupComponent {
|
|
|
31
33
|
this.navigate = new EventEmitter();
|
|
32
34
|
this._tabIndex = 0;
|
|
33
35
|
this.currentTabIndex = 0;
|
|
36
|
+
validatePackage(packageMetadata);
|
|
34
37
|
this.localizationChangeSubscription = localization.changes.subscribe(({ rtl }) => this.direction = rtl ? 'rtl' : 'ltr');
|
|
35
38
|
}
|
|
36
39
|
/**
|
|
@@ -109,7 +112,7 @@ let ButtonGroupComponent = class ButtonGroupComponent {
|
|
|
109
112
|
if (button.togglable) {
|
|
110
113
|
button.setSelected(newSelectionValue);
|
|
111
114
|
}
|
|
112
|
-
button.setAttribute(tabindex,
|
|
115
|
+
button.setAttribute(tabindex, '0');
|
|
113
116
|
});
|
|
114
117
|
}
|
|
115
118
|
ngOnChanges(change) {
|
|
@@ -124,10 +127,10 @@ let ButtonGroupComponent = class ButtonGroupComponent {
|
|
|
124
127
|
ngAfterContentInit() {
|
|
125
128
|
this.buttons.forEach((button) => {
|
|
126
129
|
if (button.selected) {
|
|
127
|
-
button.setAttribute(tabindex,
|
|
130
|
+
button.setAttribute(tabindex, '0');
|
|
128
131
|
}
|
|
129
132
|
else {
|
|
130
|
-
button.setAttribute(tabindex,
|
|
133
|
+
button.setAttribute(tabindex, '-1');
|
|
131
134
|
}
|
|
132
135
|
});
|
|
133
136
|
}
|
|
@@ -171,24 +174,24 @@ let ButtonGroupComponent = class ButtonGroupComponent {
|
|
|
171
174
|
deactivate(buttons) {
|
|
172
175
|
buttons.forEach((button) => {
|
|
173
176
|
button.setSelected(false);
|
|
174
|
-
button.setAttribute(tabindex,
|
|
177
|
+
button.setAttribute(tabindex, '-1');
|
|
175
178
|
});
|
|
176
179
|
}
|
|
177
180
|
activate(buttons) {
|
|
178
181
|
buttons.forEach((button) => {
|
|
179
182
|
button.setSelected(true);
|
|
180
|
-
button.setAttribute(tabindex,
|
|
183
|
+
button.setAttribute(tabindex, '0');
|
|
181
184
|
button.focus();
|
|
182
185
|
});
|
|
183
186
|
}
|
|
184
187
|
defocus(buttons) {
|
|
185
188
|
buttons.forEach((button) => {
|
|
186
|
-
button.setAttribute(tabindex,
|
|
189
|
+
button.setAttribute(tabindex, '-1');
|
|
187
190
|
});
|
|
188
191
|
}
|
|
189
192
|
focus(buttons) {
|
|
190
193
|
buttons.forEach((button) => {
|
|
191
|
-
button.setAttribute(tabindex,
|
|
194
|
+
button.setAttribute(tabindex, '0');
|
|
192
195
|
button.focus();
|
|
193
196
|
});
|
|
194
197
|
}
|
|
@@ -7,6 +7,8 @@ import { Component, Input, HostBinding, ContentChildren, QueryList, EventEmitter
|
|
|
7
7
|
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
8
8
|
import { ChipComponent } from './chip.component';
|
|
9
9
|
import { closest, getStylingClasses } from '../util';
|
|
10
|
+
import { validatePackage } from '@progress/kendo-licensing';
|
|
11
|
+
import { packageMetadata } from '../package-metadata';
|
|
10
12
|
let ChipListComponent = class ChipListComponent {
|
|
11
13
|
constructor(localizationService, renderer, element) {
|
|
12
14
|
this.localizationService = localizationService;
|
|
@@ -32,6 +34,7 @@ let ChipListComponent = class ChipListComponent {
|
|
|
32
34
|
this.remove = new EventEmitter();
|
|
33
35
|
this.role = 'listbox';
|
|
34
36
|
this._size = 'medium';
|
|
37
|
+
validatePackage(packageMetadata);
|
|
35
38
|
this.direction = localizationService.rtl ? 'rtl' : 'ltr';
|
|
36
39
|
}
|
|
37
40
|
/**
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* Represents the possible fillMode options of the buttons.
|
|
7
7
|
*/
|
|
8
|
-
export declare type ButtonFillMode = 'solid' | 'flat' | 'outline' | 'link';
|
|
8
|
+
export declare type ButtonFillMode = 'solid' | 'flat' | 'outline' | 'link' | 'clear';
|
|
9
9
|
/**
|
|
10
10
|
* Represents the possible fillMode options of the Chip.
|
|
11
11
|
*/
|
|
@@ -103,18 +103,6 @@ let DropDownButtonComponent = class DropDownButtonComponent extends ListButton {
|
|
|
103
103
|
* * `null`
|
|
104
104
|
*/
|
|
105
105
|
this.rounded = 'medium';
|
|
106
|
-
/**
|
|
107
|
-
* The fillMode property specifies the background and border styles of the DropDownButton
|
|
108
|
-
* ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-fillMode)).
|
|
109
|
-
*
|
|
110
|
-
* The available values are:
|
|
111
|
-
* * `solid` (default)
|
|
112
|
-
* * `flat`
|
|
113
|
-
* * `outline`
|
|
114
|
-
* * `link`
|
|
115
|
-
* * `null`
|
|
116
|
-
*/
|
|
117
|
-
this.fillMode = 'solid';
|
|
118
106
|
/**
|
|
119
107
|
* The DropDownButton allows you to specify predefined theme colors.
|
|
120
108
|
* The theme color will be applied as a background and border color while also amending the text color accordingly
|
|
@@ -162,6 +150,7 @@ let DropDownButtonComponent = class DropDownButtonComponent extends ListButton {
|
|
|
162
150
|
*/
|
|
163
151
|
this.onBlur = new EventEmitter(); //tslint:disable-line:no-output-rename
|
|
164
152
|
this.listId = guid();
|
|
153
|
+
this._fillMode = 'solid';
|
|
165
154
|
this._itemClick = this.itemClick;
|
|
166
155
|
this._blur = this.onBlur;
|
|
167
156
|
}
|
|
@@ -203,6 +192,24 @@ let DropDownButtonComponent = class DropDownButtonComponent extends ListButton {
|
|
|
203
192
|
get data() {
|
|
204
193
|
return this._data;
|
|
205
194
|
}
|
|
195
|
+
/**
|
|
196
|
+
* The fillMode property specifies the background and border styles of the DropDownButton
|
|
197
|
+
* ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-fillMode)).
|
|
198
|
+
*
|
|
199
|
+
* The available values are:
|
|
200
|
+
* * `solid` (default)
|
|
201
|
+
* * `flat`
|
|
202
|
+
* * `outline`
|
|
203
|
+
* * `link`
|
|
204
|
+
* * `null`
|
|
205
|
+
*/
|
|
206
|
+
set fillMode(fillMode) {
|
|
207
|
+
// Temporary workaround for missing 'clear' styles
|
|
208
|
+
this._fillMode = fillMode === 'clear' ? 'flat' : fillMode;
|
|
209
|
+
}
|
|
210
|
+
get fillMode() {
|
|
211
|
+
return this._fillMode;
|
|
212
|
+
}
|
|
206
213
|
/**
|
|
207
214
|
* @hidden
|
|
208
215
|
*/
|
|
@@ -508,8 +515,9 @@ tslib_1.__decorate([
|
|
|
508
515
|
], DropDownButtonComponent.prototype, "rounded", void 0);
|
|
509
516
|
tslib_1.__decorate([
|
|
510
517
|
Input(),
|
|
511
|
-
tslib_1.__metadata("design:type", String)
|
|
512
|
-
|
|
518
|
+
tslib_1.__metadata("design:type", String),
|
|
519
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
520
|
+
], DropDownButtonComponent.prototype, "fillMode", null);
|
|
513
521
|
tslib_1.__decorate([
|
|
514
522
|
Input(),
|
|
515
523
|
tslib_1.__metadata("design:type", String)
|