@progress/kendo-angular-buttons 17.0.0-develop.2 → 17.0.0-develop.21
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/README.md +27 -106
- package/button/button.component.d.ts +3 -9
- package/buttongroup/buttongroup.component.d.ts +2 -2
- package/chip/chip-list.component.d.ts +3 -3
- package/chip/chip.component.d.ts +4 -7
- package/chip/models/avatar-settings.interface.d.ts +33 -0
- package/dropdownbutton/dropdownbutton.component.d.ts +0 -1
- package/esm2020/button/button.component.mjs +18 -60
- package/esm2020/buttongroup/buttongroup.component.mjs +5 -7
- package/esm2020/chip/chip-list.component.mjs +4 -4
- package/esm2020/chip/chip.component.mjs +33 -24
- package/esm2020/chip/models/avatar-settings.interface.mjs +5 -0
- package/esm2020/dropdownbutton/dropdownbutton.component.mjs +8 -8
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/splitbutton/splitbutton.component.mjs +1 -1
- package/esm2020/util.mjs +6 -0
- package/fesm2015/progress-kendo-angular-buttons.mjs +76 -105
- package/fesm2020/progress-kendo-angular-buttons.mjs +76 -105
- package/index.d.ts +1 -0
- package/package.json +6 -6
- package/util.d.ts +6 -0
|
@@ -8,10 +8,10 @@ import { isDocumentAvailable, Keys } from '@progress/kendo-angular-common';
|
|
|
8
8
|
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
9
9
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
10
10
|
import { packageMetadata } from '../package-metadata';
|
|
11
|
-
import { closest, getStylingClasses, getThemeColorClasses } from '../util';
|
|
11
|
+
import { closest, getStylingClasses, getThemeColorClasses, isObjectEmpty } from '../util';
|
|
12
12
|
import { moreVerticalIcon, xCircleIcon } from '@progress/kendo-svg-icons';
|
|
13
13
|
import { IconWrapperComponent } from '@progress/kendo-angular-icons';
|
|
14
|
-
import { NgIf, NgClass } from '@angular/common';
|
|
14
|
+
import { NgIf, NgClass, NgStyle } from '@angular/common';
|
|
15
15
|
import * as i0 from "@angular/core";
|
|
16
16
|
import * as i1 from "@progress/kendo-angular-l10n";
|
|
17
17
|
const DEFAULT_SIZE = 'medium';
|
|
@@ -158,7 +158,7 @@ export class ChipComponent {
|
|
|
158
158
|
return this._themeColor;
|
|
159
159
|
}
|
|
160
160
|
get hasIconClass() {
|
|
161
|
-
return Boolean(this.icon || this.iconClass || this.
|
|
161
|
+
return Boolean(this.icon || this.iconClass || (this.avatarSettings && !isObjectEmpty(this.avatarSettings)));
|
|
162
162
|
}
|
|
163
163
|
get disabledClass() {
|
|
164
164
|
return this.disabled;
|
|
@@ -197,23 +197,16 @@ export class ChipComponent {
|
|
|
197
197
|
* @hidden
|
|
198
198
|
*/
|
|
199
199
|
get kendoIconClass() {
|
|
200
|
-
this.verifyIconSettings([this.iconClass
|
|
200
|
+
this.verifyIconSettings([this.iconClass]);
|
|
201
201
|
return `k-i-${this.icon}`;
|
|
202
202
|
}
|
|
203
203
|
/**
|
|
204
204
|
* @hidden
|
|
205
205
|
*/
|
|
206
206
|
get customIconClass() {
|
|
207
|
-
this.verifyIconSettings([this.icon
|
|
207
|
+
this.verifyIconSettings([this.icon]);
|
|
208
208
|
return this.iconClass;
|
|
209
209
|
}
|
|
210
|
-
/**
|
|
211
|
-
* @hidden
|
|
212
|
-
*/
|
|
213
|
-
get chipAvatarClass() {
|
|
214
|
-
this.verifyIconSettings([this.icon, this.iconClass]);
|
|
215
|
-
return this.avatarClass;
|
|
216
|
-
}
|
|
217
210
|
/**
|
|
218
211
|
* @hidden
|
|
219
212
|
*/
|
|
@@ -326,7 +319,7 @@ export class ChipComponent {
|
|
|
326
319
|
}
|
|
327
320
|
}
|
|
328
321
|
ChipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChipComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
329
|
-
ChipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ChipComponent, isStandalone: true, selector: "kendo-chip", inputs: { label: "label", icon: "icon", svgIcon: "svgIcon", iconClass: "iconClass",
|
|
322
|
+
ChipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ChipComponent, isStandalone: true, selector: "kendo-chip", inputs: { label: "label", icon: "icon", svgIcon: "svgIcon", iconClass: "iconClass", avatarSettings: "avatarSettings", selected: "selected", removable: "removable", removeIcon: "removeIcon", removeSvgIcon: "removeSvgIcon", hasMenu: "hasMenu", menuIcon: "menuIcon", menuSvgIcon: "menuSvgIcon", disabled: "disabled", size: "size", rounded: "rounded", fillMode: "fillMode", themeColor: "themeColor" }, outputs: { remove: "remove", menuToggle: "menuToggle", contentClick: "contentClick" }, host: { properties: { "attr.tabindex": "this.tabIndex", "class.k-chip": "this.hostClass", "class.k-chip-has-icon": "this.hasIconClass", "attr.aria-disabled": "this.disabledClass", "class.k-disabled": "this.disabledClass", "class.k-selected": "this.selectedClass", "class.k-focus": "this.focusedClass", "attr.dir": "this.direction" } }, providers: [
|
|
330
323
|
LocalizationService,
|
|
331
324
|
{
|
|
332
325
|
provide: L10N_PREFIX,
|
|
@@ -345,11 +338,19 @@ ChipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version:
|
|
|
345
338
|
size="small"
|
|
346
339
|
innerCssClass="k-chip-icon"
|
|
347
340
|
[customFontClass]="customIconClass"></kendo-icon-wrapper>
|
|
348
|
-
|
|
349
341
|
<span
|
|
350
|
-
*ngIf="
|
|
351
|
-
class="k-chip-avatar k-avatar k-avatar-
|
|
352
|
-
|
|
342
|
+
*ngIf="avatarSettings"
|
|
343
|
+
class="k-chip-avatar k-avatar k-avatar-sm k-avatar-solid k-avatar-solid-primary k-rounded-full"
|
|
344
|
+
[ngStyle]="avatarSettings.cssStyle">
|
|
345
|
+
<ng-container *ngIf="avatarSettings?.imageSrc">
|
|
346
|
+
<span class="k-avatar-image">
|
|
347
|
+
<img src="{{ avatarSettings.imageSrc }}" [ngStyle]="avatarSettings.imageCssStyle" [attr.alt]="avatarSettings.imageAltText" />
|
|
348
|
+
</span>
|
|
349
|
+
</ng-container>
|
|
350
|
+
|
|
351
|
+
<ng-container *ngIf="avatarSettings?.initials">
|
|
352
|
+
<span class="k-avatar-text" [ngStyle]="avatarSettings.initialsCssStyle">{{ avatarSettings.initials.substring(0, 2) }}</span>
|
|
353
|
+
</ng-container>
|
|
353
354
|
</span>
|
|
354
355
|
|
|
355
356
|
<span class="k-chip-content">
|
|
@@ -379,7 +380,7 @@ ChipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version:
|
|
|
379
380
|
[customFontClass]="removeIcon"></kendo-icon-wrapper>
|
|
380
381
|
</span>
|
|
381
382
|
</span>
|
|
382
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }
|
|
383
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
|
|
383
384
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChipComponent, decorators: [{
|
|
384
385
|
type: Component,
|
|
385
386
|
args: [{
|
|
@@ -397,11 +398,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
397
398
|
size="small"
|
|
398
399
|
innerCssClass="k-chip-icon"
|
|
399
400
|
[customFontClass]="customIconClass"></kendo-icon-wrapper>
|
|
400
|
-
|
|
401
401
|
<span
|
|
402
|
-
*ngIf="
|
|
403
|
-
class="k-chip-avatar k-avatar k-avatar-
|
|
404
|
-
|
|
402
|
+
*ngIf="avatarSettings"
|
|
403
|
+
class="k-chip-avatar k-avatar k-avatar-sm k-avatar-solid k-avatar-solid-primary k-rounded-full"
|
|
404
|
+
[ngStyle]="avatarSettings.cssStyle">
|
|
405
|
+
<ng-container *ngIf="avatarSettings?.imageSrc">
|
|
406
|
+
<span class="k-avatar-image">
|
|
407
|
+
<img src="{{ avatarSettings.imageSrc }}" [ngStyle]="avatarSettings.imageCssStyle" [attr.alt]="avatarSettings.imageAltText" />
|
|
408
|
+
</span>
|
|
409
|
+
</ng-container>
|
|
410
|
+
|
|
411
|
+
<ng-container *ngIf="avatarSettings?.initials">
|
|
412
|
+
<span class="k-avatar-text" [ngStyle]="avatarSettings.initialsCssStyle">{{ avatarSettings.initials.substring(0, 2) }}</span>
|
|
413
|
+
</ng-container>
|
|
405
414
|
</span>
|
|
406
415
|
|
|
407
416
|
<span class="k-chip-content">
|
|
@@ -440,7 +449,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
440
449
|
}
|
|
441
450
|
],
|
|
442
451
|
standalone: true,
|
|
443
|
-
imports: [NgIf, IconWrapperComponent, NgClass]
|
|
452
|
+
imports: [NgIf, NgStyle, IconWrapperComponent, NgClass]
|
|
444
453
|
}]
|
|
445
454
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i1.LocalizationService }]; }, propDecorators: { label: [{
|
|
446
455
|
type: Input
|
|
@@ -450,7 +459,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
450
459
|
type: Input
|
|
451
460
|
}], iconClass: [{
|
|
452
461
|
type: Input
|
|
453
|
-
}],
|
|
462
|
+
}], avatarSettings: [{
|
|
454
463
|
type: Input
|
|
455
464
|
}], selected: [{
|
|
456
465
|
type: Input
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
export {};
|
|
@@ -184,9 +184,6 @@ export class DropDownButtonComponent extends ListButton {
|
|
|
184
184
|
get focused() {
|
|
185
185
|
return this._isFocused && !this._disabled;
|
|
186
186
|
}
|
|
187
|
-
get widgetClasses() {
|
|
188
|
-
return true;
|
|
189
|
-
}
|
|
190
187
|
get dir() {
|
|
191
188
|
return this.direction;
|
|
192
189
|
}
|
|
@@ -269,6 +266,10 @@ export class DropDownButtonComponent extends ListButton {
|
|
|
269
266
|
this.containerService.container = this.container;
|
|
270
267
|
this.containerService.template = this.popupTemplate;
|
|
271
268
|
this.handleButtonAttributes(this.buttonAttributes);
|
|
269
|
+
const arrowWrapper = this.button.nativeElement.querySelector('.k-button-arrow');
|
|
270
|
+
if (arrowWrapper) {
|
|
271
|
+
this.renderer.addClass(arrowWrapper, 'k-menu-button-arrow');
|
|
272
|
+
}
|
|
272
273
|
}
|
|
273
274
|
/**
|
|
274
275
|
* @hidden
|
|
@@ -308,7 +309,7 @@ export class DropDownButtonComponent extends ListButton {
|
|
|
308
309
|
}
|
|
309
310
|
}
|
|
310
311
|
DropDownButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DropDownButtonComponent, deps: [{ token: i1.FocusService }, { token: i2.NavigationService }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i3.PopupService }, { token: i0.ElementRef }, { token: i4.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i5.PopupContainerService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
311
|
-
DropDownButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DropDownButtonComponent, isStandalone: true, selector: "kendo-dropdownbutton", inputs: { arrowIcon: "arrowIcon", icon: "icon", svgIcon: "svgIcon", iconClass: "iconClass", imageUrl: "imageUrl", textField: "textField", data: "data", size: "size", rounded: "rounded", fillMode: "fillMode", themeColor: "themeColor", buttonAttributes: "buttonAttributes" }, outputs: { itemClick: "itemClick", onFocus: "focus", onBlur: "blur" }, host: { listeners: { "keydown": "keydown($event)", "keyup": "keyup($event)", "mousedown": "mousedown($event)", "mouseup": "mouseup($event)" }, properties: { "class.k-focus": "this.focused", "
|
|
312
|
+
DropDownButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DropDownButtonComponent, isStandalone: true, selector: "kendo-dropdownbutton", inputs: { arrowIcon: "arrowIcon", icon: "icon", svgIcon: "svgIcon", iconClass: "iconClass", imageUrl: "imageUrl", textField: "textField", data: "data", size: "size", rounded: "rounded", fillMode: "fillMode", themeColor: "themeColor", buttonAttributes: "buttonAttributes" }, outputs: { itemClick: "itemClick", onFocus: "focus", onBlur: "blur" }, host: { listeners: { "keydown": "keydown($event)", "keyup": "keyup($event)", "mousedown": "mousedown($event)", "mouseup": "mouseup($event)" }, properties: { "class.k-focus": "this.focused", "attr.dir": "this.dir" } }, providers: [
|
|
312
313
|
FocusService,
|
|
313
314
|
NavigationService,
|
|
314
315
|
NAVIGATION_SETTINGS_PROVIDER,
|
|
@@ -323,6 +324,7 @@ DropDownButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
|
|
|
323
324
|
type="button"
|
|
324
325
|
[id]="buttonId"
|
|
325
326
|
[tabindex]="componentTabIndex"
|
|
327
|
+
class="k-menu-button"
|
|
326
328
|
[class.k-active]="active"
|
|
327
329
|
[disabled]="disabled"
|
|
328
330
|
[icon]="icon"
|
|
@@ -361,7 +363,7 @@ DropDownButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
|
|
|
361
363
|
</kendo-button-list>
|
|
362
364
|
</ng-template>
|
|
363
365
|
<ng-container #container></ng-container>
|
|
364
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]
|
|
366
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ListComponent, selector: "kendo-button-list", inputs: ["data", "textField", "itemTemplate", "size"], outputs: ["onItemClick", "onItemBlur"] }] });
|
|
365
367
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DropDownButtonComponent, decorators: [{
|
|
366
368
|
type: Component,
|
|
367
369
|
args: [{
|
|
@@ -383,6 +385,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
383
385
|
type="button"
|
|
384
386
|
[id]="buttonId"
|
|
385
387
|
[tabindex]="componentTabIndex"
|
|
388
|
+
class="k-menu-button"
|
|
386
389
|
[class.k-active]="active"
|
|
387
390
|
[disabled]="disabled"
|
|
388
391
|
[icon]="icon"
|
|
@@ -460,9 +463,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
460
463
|
}], focused: [{
|
|
461
464
|
type: HostBinding,
|
|
462
465
|
args: ['class.k-focus']
|
|
463
|
-
}], widgetClasses: [{
|
|
464
|
-
type: HostBinding,
|
|
465
|
-
args: ['class.k-dropdown-button']
|
|
466
466
|
}], dir: [{
|
|
467
467
|
type: HostBinding,
|
|
468
468
|
args: ['attr.dir']
|
|
@@ -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:
|
|
13
|
-
version: '17.0.0-develop.
|
|
12
|
+
publishDate: 1729874032,
|
|
13
|
+
version: '17.0.0-develop.21',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
15
15
|
};
|
|
@@ -642,7 +642,7 @@ SplitButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", v
|
|
|
642
642
|
</kendo-button-list>
|
|
643
643
|
</ng-template>
|
|
644
644
|
<ng-container #container></ng-container>
|
|
645
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedSplitButtonMessagesDirective, selector: "[kendoSplitButtonLocalizedMessages]" }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]
|
|
645
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedSplitButtonMessagesDirective, selector: "[kendoSplitButtonLocalizedMessages]" }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ListComponent, selector: "kendo-button-list", inputs: ["data", "textField", "itemTemplate", "size"], outputs: ["onItemClick", "onItemBlur"] }] });
|
|
646
646
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SplitButtonComponent, decorators: [{
|
|
647
647
|
type: Component,
|
|
648
648
|
args: [{
|
package/esm2020/util.mjs
CHANGED
|
@@ -93,3 +93,9 @@ export const getThemeColorClasses = (componentType, prevFillMode, fillMode, prev
|
|
|
93
93
|
toAdd: newValue !== 'none' ? `k-${componentType}-${fillMode}-${newValue}` : ''
|
|
94
94
|
};
|
|
95
95
|
};
|
|
96
|
+
/**
|
|
97
|
+
* @hidden
|
|
98
|
+
*
|
|
99
|
+
* Checks for an empty object - {}
|
|
100
|
+
*/
|
|
101
|
+
export const isObjectEmpty = (obj) => obj && Object.keys(obj).length === 0 && obj.constructor === Object;
|