@progress/kendo-angular-buttons 17.0.0-develop.16 → 17.0.0-develop.18

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.
@@ -8,6 +8,7 @@ import { ChipRemoveEvent } from './chip-remove-event-args.interface';
8
8
  import { ChipContentClickEvent } from './chip-content-click-event-args.interface';
9
9
  import { ChipFillMode, ChipRounded, ChipSize, ChipThemeColor } from '../common/models';
10
10
  import { SVGIcon } from '@progress/kendo-svg-icons';
11
+ import { ChipAvatarSettings } from './models/avatar-settings.interface';
11
12
  import * as i0 from "@angular/core";
12
13
  /**
13
14
  * Displays a Chip that represents an input, attribute or an action.
@@ -38,9 +39,9 @@ export declare class ChipComponent implements OnInit, AfterViewInit, OnChanges {
38
39
  */
39
40
  iconClass: string;
40
41
  /**
41
- * The avatarClass allows the usage of avatar icons rendered in the Chip.
42
+ * Use these settings to render an avatar within the Chip.
42
43
  */
43
- avatarClass: string;
44
+ avatarSettings: ChipAvatarSettings;
44
45
  /**
45
46
  * Specifies the selected state of the Chip.
46
47
  * @default false
@@ -186,10 +187,6 @@ export declare class ChipComponent implements OnInit, AfterViewInit, OnChanges {
186
187
  * @hidden
187
188
  */
188
189
  get customIconClass(): string;
189
- /**
190
- * @hidden
191
- */
192
- get chipAvatarClass(): string;
193
190
  /**
194
191
  * @hidden
195
192
  */
@@ -219,5 +216,5 @@ export declare class ChipComponent implements OnInit, AfterViewInit, OnChanges {
219
216
  private handleThemeColor;
220
217
  private keyDownHandler;
221
218
  static ɵfac: i0.ɵɵFactoryDeclaration<ChipComponent, never>;
222
- static ɵcmp: i0.ɵɵComponentDeclaration<ChipComponent, "kendo-chip", never, { "label": "label"; "icon": "icon"; "svgIcon": "svgIcon"; "iconClass": "iconClass"; "avatarClass": "avatarClass"; "selected": "selected"; "removable": "removable"; "removeIcon": "removeIcon"; "removeSvgIcon": "removeSvgIcon"; "hasMenu": "hasMenu"; "menuIcon": "menuIcon"; "menuSvgIcon": "menuSvgIcon"; "disabled": "disabled"; "size": "size"; "rounded": "rounded"; "fillMode": "fillMode"; "themeColor": "themeColor"; }, { "remove": "remove"; "menuToggle": "menuToggle"; "contentClick": "contentClick"; }, never, ["*"], true, never>;
219
+ static ɵcmp: i0.ɵɵComponentDeclaration<ChipComponent, "kendo-chip", never, { "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"; }, { "remove": "remove"; "menuToggle": "menuToggle"; "contentClick": "contentClick"; }, never, ["*"], true, never>;
223
220
  }
@@ -0,0 +1,33 @@
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 interface ChipAvatarSettings {
6
+ /**
7
+ * The CSS styles that will be rendered on the wrapper element of the avatar.
8
+ * Supports the type of values that are supported by [ngStyle](link:site.data.urls.angular['ngstyleapi']).
9
+ */
10
+ cssStyle?: any;
11
+ /**
12
+ * Sets `initials` to the Chip avatar.
13
+ */
14
+ initials?: string;
15
+ /**
16
+ * The CSS styles that will be rendered on the wrapper element of the avatar initials.
17
+ * Supports the type of values that are supported by [ngStyle](link:site.data.urls.angular['ngstyleapi']).
18
+ */
19
+ initialsCssStyle?: any;
20
+ /**
21
+ * Sets the `image` source of the Chip avatar.
22
+ */
23
+ imageSrc?: string;
24
+ /**
25
+ * Allows setting the `alt` attribute of a Chip avatar image.
26
+ */
27
+ imageAltText?: string;
28
+ /**
29
+ * The CSS styles that will be rendered on the avatar image element.
30
+ * Supports the type of values that are supported by [ngStyle](link:site.data.urls.angular['ngstyleapi']).
31
+ */
32
+ imageCssStyle?: any;
33
+ }
@@ -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.avatarClass);
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, this.avatarClass]);
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, this.avatarClass]);
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", avatarClass: "avatarClass", 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: [
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="avatarClass"
351
- class="k-chip-avatar k-avatar k-avatar-md k-avatar-solid k-avatar-solid-primary k-rounded-full">
352
- <span class="k-avatar-image" [ngClass]="chipAvatarClass"></span>
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"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
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="avatarClass"
403
- class="k-chip-avatar k-avatar k-avatar-md k-avatar-solid k-avatar-solid-primary k-rounded-full">
404
- <span class="k-avatar-image" [ngClass]="chipAvatarClass"></span>
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
- }], avatarClass: [{
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 {};
@@ -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: 1729497523,
13
- version: '17.0.0-develop.16',
12
+ publishDate: 1729598773,
13
+ version: '17.0.0-develop.18',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
15
15
  };
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;
@@ -12,7 +12,7 @@ import { LocalizationService, L10N_PREFIX, ComponentMessages } from '@progress/k
12
12
  import { Subject, Subscription, fromEvent, merge } from 'rxjs';
13
13
  import { validatePackage } from '@progress/kendo-licensing';
14
14
  import { IconWrapperComponent, IconsService } from '@progress/kendo-angular-icons';
15
- import { NgIf, NgClass, NgFor, NgTemplateOutlet, NgStyle } from '@angular/common';
15
+ import { NgIf, NgClass, NgStyle, NgFor, NgTemplateOutlet } from '@angular/common';
16
16
  import { filter, tap, take } from 'rxjs/operators';
17
17
  import * as i3 from '@progress/kendo-angular-popup';
18
18
  import { PopupService } from '@progress/kendo-angular-popup';
@@ -26,8 +26,8 @@ const packageMetadata = {
26
26
  name: '@progress/kendo-angular-buttons',
27
27
  productName: 'Kendo UI for Angular',
28
28
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
29
- publishDate: 1729497523,
30
- version: '17.0.0-develop.16',
29
+ publishDate: 1729598773,
30
+ version: '17.0.0-develop.18',
31
31
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
32
32
  };
33
33
 
@@ -122,6 +122,12 @@ const getThemeColorClasses = (componentType, prevFillMode, fillMode, previousVal
122
122
  toAdd: newValue !== 'none' ? `k-${componentType}-${fillMode}-${newValue}` : ''
123
123
  };
124
124
  };
125
+ /**
126
+ * @hidden
127
+ *
128
+ * Checks for an empty object - {}
129
+ */
130
+ const isObjectEmpty = (obj) => obj && Object.keys(obj).length === 0 && obj.constructor === Object;
125
131
 
126
132
  /**
127
133
  * @hidden
@@ -1124,7 +1130,7 @@ class ChipComponent {
1124
1130
  return this._themeColor;
1125
1131
  }
1126
1132
  get hasIconClass() {
1127
- return Boolean(this.icon || this.iconClass || this.avatarClass);
1133
+ return Boolean(this.icon || this.iconClass || (this.avatarSettings && !isObjectEmpty(this.avatarSettings)));
1128
1134
  }
1129
1135
  get disabledClass() {
1130
1136
  return this.disabled;
@@ -1163,23 +1169,16 @@ class ChipComponent {
1163
1169
  * @hidden
1164
1170
  */
1165
1171
  get kendoIconClass() {
1166
- this.verifyIconSettings([this.iconClass, this.avatarClass]);
1172
+ this.verifyIconSettings([this.iconClass]);
1167
1173
  return `k-i-${this.icon}`;
1168
1174
  }
1169
1175
  /**
1170
1176
  * @hidden
1171
1177
  */
1172
1178
  get customIconClass() {
1173
- this.verifyIconSettings([this.icon, this.avatarClass]);
1179
+ this.verifyIconSettings([this.icon]);
1174
1180
  return this.iconClass;
1175
1181
  }
1176
- /**
1177
- * @hidden
1178
- */
1179
- get chipAvatarClass() {
1180
- this.verifyIconSettings([this.icon, this.iconClass]);
1181
- return this.avatarClass;
1182
- }
1183
1182
  /**
1184
1183
  * @hidden
1185
1184
  */
@@ -1292,7 +1291,7 @@ class ChipComponent {
1292
1291
  }
1293
1292
  }
1294
1293
  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 });
1295
- 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", avatarClass: "avatarClass", 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: [
1294
+ 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: [
1296
1295
  LocalizationService,
1297
1296
  {
1298
1297
  provide: L10N_PREFIX,
@@ -1311,11 +1310,19 @@ ChipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version:
1311
1310
  size="small"
1312
1311
  innerCssClass="k-chip-icon"
1313
1312
  [customFontClass]="customIconClass"></kendo-icon-wrapper>
1314
-
1315
1313
  <span
1316
- *ngIf="avatarClass"
1317
- class="k-chip-avatar k-avatar k-avatar-md k-avatar-solid k-avatar-solid-primary k-rounded-full">
1318
- <span class="k-avatar-image" [ngClass]="chipAvatarClass"></span>
1314
+ *ngIf="avatarSettings"
1315
+ class="k-chip-avatar k-avatar k-avatar-sm k-avatar-solid k-avatar-solid-primary k-rounded-full"
1316
+ [ngStyle]="avatarSettings.cssStyle">
1317
+ <ng-container *ngIf="avatarSettings?.imageSrc">
1318
+ <span class="k-avatar-image">
1319
+ <img src="{{ avatarSettings.imageSrc }}" [ngStyle]="avatarSettings.imageCssStyle" [attr.alt]="avatarSettings.imageAltText" />
1320
+ </span>
1321
+ </ng-container>
1322
+
1323
+ <ng-container *ngIf="avatarSettings?.initials">
1324
+ <span class="k-avatar-text" [ngStyle]="avatarSettings.initialsCssStyle">{{ avatarSettings.initials.substring(0, 2) }}</span>
1325
+ </ng-container>
1319
1326
  </span>
1320
1327
 
1321
1328
  <span class="k-chip-content">
@@ -1345,7 +1352,7 @@ ChipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version:
1345
1352
  [customFontClass]="removeIcon"></kendo-icon-wrapper>
1346
1353
  </span>
1347
1354
  </span>
1348
- `, 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"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
1355
+ `, 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"] }] });
1349
1356
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChipComponent, decorators: [{
1350
1357
  type: Component,
1351
1358
  args: [{
@@ -1363,11 +1370,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
1363
1370
  size="small"
1364
1371
  innerCssClass="k-chip-icon"
1365
1372
  [customFontClass]="customIconClass"></kendo-icon-wrapper>
1366
-
1367
1373
  <span
1368
- *ngIf="avatarClass"
1369
- class="k-chip-avatar k-avatar k-avatar-md k-avatar-solid k-avatar-solid-primary k-rounded-full">
1370
- <span class="k-avatar-image" [ngClass]="chipAvatarClass"></span>
1374
+ *ngIf="avatarSettings"
1375
+ class="k-chip-avatar k-avatar k-avatar-sm k-avatar-solid k-avatar-solid-primary k-rounded-full"
1376
+ [ngStyle]="avatarSettings.cssStyle">
1377
+ <ng-container *ngIf="avatarSettings?.imageSrc">
1378
+ <span class="k-avatar-image">
1379
+ <img src="{{ avatarSettings.imageSrc }}" [ngStyle]="avatarSettings.imageCssStyle" [attr.alt]="avatarSettings.imageAltText" />
1380
+ </span>
1381
+ </ng-container>
1382
+
1383
+ <ng-container *ngIf="avatarSettings?.initials">
1384
+ <span class="k-avatar-text" [ngStyle]="avatarSettings.initialsCssStyle">{{ avatarSettings.initials.substring(0, 2) }}</span>
1385
+ </ng-container>
1371
1386
  </span>
1372
1387
 
1373
1388
  <span class="k-chip-content">
@@ -1406,7 +1421,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
1406
1421
  }
1407
1422
  ],
1408
1423
  standalone: true,
1409
- imports: [NgIf, IconWrapperComponent, NgClass]
1424
+ imports: [NgIf, NgStyle, IconWrapperComponent, NgClass]
1410
1425
  }]
1411
1426
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i1.LocalizationService }]; }, propDecorators: { label: [{
1412
1427
  type: Input
@@ -1416,7 +1431,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
1416
1431
  type: Input
1417
1432
  }], iconClass: [{
1418
1433
  type: Input
1419
- }], avatarClass: [{
1434
+ }], avatarSettings: [{
1420
1435
  type: Input
1421
1436
  }], selected: [{
1422
1437
  type: Input
@@ -12,7 +12,7 @@ import * as i1 from '@progress/kendo-angular-l10n';
12
12
  import { LocalizationService, L10N_PREFIX, ComponentMessages } from '@progress/kendo-angular-l10n';
13
13
  import { validatePackage } from '@progress/kendo-licensing';
14
14
  import { IconWrapperComponent, IconsService } from '@progress/kendo-angular-icons';
15
- import { NgIf, NgClass, NgFor, NgTemplateOutlet, NgStyle } from '@angular/common';
15
+ import { NgIf, NgClass, NgStyle, NgFor, NgTemplateOutlet } from '@angular/common';
16
16
  import { filter, tap, take } from 'rxjs/operators';
17
17
  import * as i3 from '@progress/kendo-angular-popup';
18
18
  import { PopupService } from '@progress/kendo-angular-popup';
@@ -44,8 +44,8 @@ const packageMetadata = {
44
44
  name: '@progress/kendo-angular-buttons',
45
45
  productName: 'Kendo UI for Angular',
46
46
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
47
- publishDate: 1729497523,
48
- version: '17.0.0-develop.16',
47
+ publishDate: 1729598773,
48
+ version: '17.0.0-develop.18',
49
49
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
50
50
  };
51
51
 
@@ -140,6 +140,12 @@ const getThemeColorClasses = (componentType, prevFillMode, fillMode, previousVal
140
140
  toAdd: newValue !== 'none' ? `k-${componentType}-${fillMode}-${newValue}` : ''
141
141
  };
142
142
  };
143
+ /**
144
+ * @hidden
145
+ *
146
+ * Checks for an empty object - {}
147
+ */
148
+ const isObjectEmpty = (obj) => obj && Object.keys(obj).length === 0 && obj.constructor === Object;
143
149
 
144
150
  const DEFAULT_ROUNDED$3 = 'medium';
145
151
  const DEFAULT_SIZE$2 = 'medium';
@@ -1122,7 +1128,7 @@ class ChipComponent {
1122
1128
  return this._themeColor;
1123
1129
  }
1124
1130
  get hasIconClass() {
1125
- return Boolean(this.icon || this.iconClass || this.avatarClass);
1131
+ return Boolean(this.icon || this.iconClass || (this.avatarSettings && !isObjectEmpty(this.avatarSettings)));
1126
1132
  }
1127
1133
  get disabledClass() {
1128
1134
  return this.disabled;
@@ -1161,23 +1167,16 @@ class ChipComponent {
1161
1167
  * @hidden
1162
1168
  */
1163
1169
  get kendoIconClass() {
1164
- this.verifyIconSettings([this.iconClass, this.avatarClass]);
1170
+ this.verifyIconSettings([this.iconClass]);
1165
1171
  return `k-i-${this.icon}`;
1166
1172
  }
1167
1173
  /**
1168
1174
  * @hidden
1169
1175
  */
1170
1176
  get customIconClass() {
1171
- this.verifyIconSettings([this.icon, this.avatarClass]);
1177
+ this.verifyIconSettings([this.icon]);
1172
1178
  return this.iconClass;
1173
1179
  }
1174
- /**
1175
- * @hidden
1176
- */
1177
- get chipAvatarClass() {
1178
- this.verifyIconSettings([this.icon, this.iconClass]);
1179
- return this.avatarClass;
1180
- }
1181
1180
  /**
1182
1181
  * @hidden
1183
1182
  */
@@ -1290,7 +1289,7 @@ class ChipComponent {
1290
1289
  }
1291
1290
  }
1292
1291
  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 });
1293
- 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", avatarClass: "avatarClass", 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: [
1292
+ 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: [
1294
1293
  LocalizationService,
1295
1294
  {
1296
1295
  provide: L10N_PREFIX,
@@ -1309,11 +1308,19 @@ ChipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version:
1309
1308
  size="small"
1310
1309
  innerCssClass="k-chip-icon"
1311
1310
  [customFontClass]="customIconClass"></kendo-icon-wrapper>
1312
-
1313
1311
  <span
1314
- *ngIf="avatarClass"
1315
- class="k-chip-avatar k-avatar k-avatar-md k-avatar-solid k-avatar-solid-primary k-rounded-full">
1316
- <span class="k-avatar-image" [ngClass]="chipAvatarClass"></span>
1312
+ *ngIf="avatarSettings"
1313
+ class="k-chip-avatar k-avatar k-avatar-sm k-avatar-solid k-avatar-solid-primary k-rounded-full"
1314
+ [ngStyle]="avatarSettings.cssStyle">
1315
+ <ng-container *ngIf="avatarSettings?.imageSrc">
1316
+ <span class="k-avatar-image">
1317
+ <img src="{{ avatarSettings.imageSrc }}" [ngStyle]="avatarSettings.imageCssStyle" [attr.alt]="avatarSettings.imageAltText" />
1318
+ </span>
1319
+ </ng-container>
1320
+
1321
+ <ng-container *ngIf="avatarSettings?.initials">
1322
+ <span class="k-avatar-text" [ngStyle]="avatarSettings.initialsCssStyle">{{ avatarSettings.initials.substring(0, 2) }}</span>
1323
+ </ng-container>
1317
1324
  </span>
1318
1325
 
1319
1326
  <span class="k-chip-content">
@@ -1343,7 +1350,7 @@ ChipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version:
1343
1350
  [customFontClass]="removeIcon"></kendo-icon-wrapper>
1344
1351
  </span>
1345
1352
  </span>
1346
- `, 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"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
1353
+ `, 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"] }] });
1347
1354
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChipComponent, decorators: [{
1348
1355
  type: Component,
1349
1356
  args: [{
@@ -1361,11 +1368,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
1361
1368
  size="small"
1362
1369
  innerCssClass="k-chip-icon"
1363
1370
  [customFontClass]="customIconClass"></kendo-icon-wrapper>
1364
-
1365
1371
  <span
1366
- *ngIf="avatarClass"
1367
- class="k-chip-avatar k-avatar k-avatar-md k-avatar-solid k-avatar-solid-primary k-rounded-full">
1368
- <span class="k-avatar-image" [ngClass]="chipAvatarClass"></span>
1372
+ *ngIf="avatarSettings"
1373
+ class="k-chip-avatar k-avatar k-avatar-sm k-avatar-solid k-avatar-solid-primary k-rounded-full"
1374
+ [ngStyle]="avatarSettings.cssStyle">
1375
+ <ng-container *ngIf="avatarSettings?.imageSrc">
1376
+ <span class="k-avatar-image">
1377
+ <img src="{{ avatarSettings.imageSrc }}" [ngStyle]="avatarSettings.imageCssStyle" [attr.alt]="avatarSettings.imageAltText" />
1378
+ </span>
1379
+ </ng-container>
1380
+
1381
+ <ng-container *ngIf="avatarSettings?.initials">
1382
+ <span class="k-avatar-text" [ngStyle]="avatarSettings.initialsCssStyle">{{ avatarSettings.initials.substring(0, 2) }}</span>
1383
+ </ng-container>
1369
1384
  </span>
1370
1385
 
1371
1386
  <span class="k-chip-content">
@@ -1404,7 +1419,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
1404
1419
  }
1405
1420
  ],
1406
1421
  standalone: true,
1407
- imports: [NgIf, IconWrapperComponent, NgClass]
1422
+ imports: [NgIf, NgStyle, IconWrapperComponent, NgClass]
1408
1423
  }]
1409
1424
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i1.LocalizationService }]; }, propDecorators: { label: [{
1410
1425
  type: Input
@@ -1414,7 +1429,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
1414
1429
  type: Input
1415
1430
  }], iconClass: [{
1416
1431
  type: Input
1417
- }], avatarClass: [{
1432
+ }], avatarSettings: [{
1418
1433
  type: Input
1419
1434
  }], selected: [{
1420
1435
  type: Input
package/index.d.ts CHANGED
@@ -25,6 +25,7 @@ export { ChipModule } from './chip/chip.module';
25
25
  export { ChipListSelection } from './chip/models/selection';
26
26
  export { ChipRemoveEvent } from './chip/chip-remove-event-args.interface';
27
27
  export { ChipListRemoveEvent } from './chip/chip-list-remove-event-args.interface';
28
+ export { ChipAvatarSettings } from './chip/models/avatar-settings.interface';
28
29
  export { FloatingActionButtonModule } from './floatingactionbutton/floatingactionbutton.module';
29
30
  export { FloatingActionButtonComponent } from './floatingactionbutton/floatingactionbutton.component';
30
31
  export { FloatingActionButtonTemplateDirective } from './floatingactionbutton/templates/fab-template.directive';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-buttons",
3
- "version": "17.0.0-develop.16",
3
+ "version": "17.0.0-develop.18",
4
4
  "description": "Buttons Package for Angular",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -25,15 +25,15 @@
25
25
  "@angular/core": "15 - 18",
26
26
  "@angular/platform-browser": "15 - 18",
27
27
  "@progress/kendo-licensing": "^1.0.2",
28
- "@progress/kendo-angular-common": "17.0.0-develop.16",
29
- "@progress/kendo-angular-l10n": "17.0.0-develop.16",
30
- "@progress/kendo-angular-popup": "17.0.0-develop.16",
31
- "@progress/kendo-angular-icons": "17.0.0-develop.16",
28
+ "@progress/kendo-angular-common": "17.0.0-develop.18",
29
+ "@progress/kendo-angular-l10n": "17.0.0-develop.18",
30
+ "@progress/kendo-angular-popup": "17.0.0-develop.18",
31
+ "@progress/kendo-angular-icons": "17.0.0-develop.18",
32
32
  "rxjs": "^6.5.3 || ^7.0.0"
33
33
  },
34
34
  "dependencies": {
35
35
  "tslib": "^2.3.1",
36
- "@progress/kendo-angular-schematics": "17.0.0-develop.16",
36
+ "@progress/kendo-angular-schematics": "17.0.0-develop.18",
37
37
  "@progress/kendo-common": "^0.2.1"
38
38
  },
39
39
  "schematics": "./schematics/collection.json",
package/util.d.ts CHANGED
@@ -39,3 +39,9 @@ export declare const getStylingClasses: (componentType: any, stylingOption: stri
39
39
  * Returns the themeColor classes to be added and removed
40
40
  */
41
41
  export declare const getThemeColorClasses: (componentType: any, prevFillMode: any, fillMode: any, previousValue: any, newValue: any) => ButtonStylingClasses;
42
+ /**
43
+ * @hidden
44
+ *
45
+ * Checks for an empty object - {}
46
+ */
47
+ export declare const isObjectEmpty: (obj: any) => boolean;