@progress/kendo-angular-icons 25.0.0-develop.17 → 25.0.0-develop.19

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.
@@ -4,7 +4,7 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as i0 from '@angular/core';
6
6
  import { Input, HostBinding, Directive, signal, ChangeDetectionStrategy, Component, computed, isDevMode, Injectable, InjectionToken, Optional, Inject, NgModule } from '@angular/core';
7
- import { isDocumentAvailable, areObjectsEqual } from '@progress/kendo-angular-common';
7
+ import { isDocumentAvailable, areObjectsEqual, KENDO_COMPONENT_NAME } from '@progress/kendo-angular-common';
8
8
  import { validatePackage } from '@progress/kendo-licensing';
9
9
  import * as i1_1 from '@angular/platform-browser';
10
10
  import { Subject, BehaviorSubject, Subscription } from 'rxjs';
@@ -19,8 +19,8 @@ const packageMetadata = {
19
19
  productName: 'Kendo UI for Angular',
20
20
  productCode: 'KENDOUIANGULAR',
21
21
  productCodes: ['KENDOUIANGULAR'],
22
- publishDate: 1785492978,
23
- version: '25.0.0-develop.17',
22
+ publishDate: 1785503177,
23
+ version: '25.0.0-develop.19',
24
24
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
25
25
  };
26
26
 
@@ -349,19 +349,21 @@ class IconSettingsService {
349
349
  /**
350
350
  * Returns the [`SVGIcon`](https://www.telerik.com/kendo-angular-ui/components/icons/api/svgicon) object for the provided key.
351
351
  * Override in a custom service to provide custom SVG icons.
352
+ * The optional `_component` parameter carries the host component identity (e.g. `'dateinput'`, `'grid'`)
353
+ * so subclasses can return different icons for the same name depending on the requesting component.
352
354
  *
353
- * @hidden
354
355
  */
355
- getSvgIcon(_name) {
356
+ getSvgIcon(_name, _component) {
356
357
  return null;
357
358
  }
358
359
  /**
359
360
  * Returns the list of classes to be rendered on the host `SPAN` element of custom font icons.
360
361
  * Override in a custom service to provide classes for custom font icons.
362
+ * The optional `_component` parameter carries the host component identity so subclasses can
363
+ * return different classes for the same key depending on the requesting component.
361
364
  *
362
- * @hidden
363
365
  */
364
- getCustomFontIconClass(_key) {
366
+ getCustomFontIconClass(_key, _component) {
365
367
  return null;
366
368
  }
367
369
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.26", ngImport: i0, type: IconSettingsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
@@ -439,20 +441,40 @@ class IconsService {
439
441
  /**
440
442
  * Returns the [`SVGIcon`](https://www.telerik.com/kendo-angular-ui/components/icons/api/svgicon) object for the provided key.
441
443
  * Override in a custom service to provide custom SVG icons.
444
+ * Walks the `componentChain` outermost-first so the closest explicitly configured ancestor wins,
445
+ * falling back to a global (no component) lookup when no level in the chain matches.
442
446
  * @hidden
443
447
  */
444
- getSvgIcon(name) {
445
- const customIcon = this.iconSettingsService && this.iconSettingsService.getSvgIcon(name);
446
- return customIcon;
448
+ getSvgIcon(name, componentChain) {
449
+ if (!this.iconSettingsService) {
450
+ return null;
451
+ }
452
+ for (const component of componentChain ?? []) {
453
+ const scoped = this.iconSettingsService.getSvgIcon(name, component.toLowerCase());
454
+ if (scoped) {
455
+ return scoped;
456
+ }
457
+ }
458
+ return this.iconSettingsService.getSvgIcon(name);
447
459
  }
448
460
  /**
449
461
  * Returns the list of classes to be rendered on the host `SPAN` element of custom font icons.
450
462
  * Override in a custom service to provide classes for custom font icons.
463
+ * Walks the `componentChain` outermost-first so the closest explicitly configured ancestor wins,
464
+ * falling back to a global (no component) lookup when no level in the chain matches.
451
465
  * @hidden
452
466
  */
453
- getCustomFontIconClass(key) {
454
- const customClass = this.iconSettingsService && this.iconSettingsService.getCustomFontIconClass(key);
455
- return customClass;
467
+ getCustomFontIconClass(key, componentChain) {
468
+ if (!this.iconSettingsService) {
469
+ return null;
470
+ }
471
+ for (const component of componentChain ?? []) {
472
+ const scoped = this.iconSettingsService.getCustomFontIconClass(key, component.toLowerCase());
473
+ if (scoped) {
474
+ return scoped;
475
+ }
476
+ }
477
+ return this.iconSettingsService.getCustomFontIconClass(key);
456
478
  }
457
479
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.26", ngImport: i0, type: IconsService, deps: [{ token: ICON_SETTINGS, optional: true }, { token: IconSettingsService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
458
480
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.26", ngImport: i0, type: IconsService, providedIn: 'root' });
@@ -477,6 +499,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.26", ngImpo
477
499
  class IconWrapperComponent {
478
500
  iconsService;
479
501
  element;
502
+ componentChain;
480
503
  hostClass = true;
481
504
  /**
482
505
  * Sets the name for an existing font icon in a Kendo UI theme to render.
@@ -518,7 +541,7 @@ class IconWrapperComponent {
518
541
  get iconSettings() { return this._iconSettings(); }
519
542
  // Resolves the effective SVG icon: prefer service-provided icon, then fall back to the svgIcon input.
520
543
  // Extracted from hasSvgIcon getter to avoid writing to a signal inside a reactive context.
521
- _resolvedSvgIcon = computed(() => this.iconsService.getSvgIcon(this._name()) || this._svgIcon(), ...(ngDevMode ? [{ debugName: "_resolvedSvgIcon" }] : []));
544
+ _resolvedSvgIcon = computed(() => this.iconsService.getSvgIcon(this._name(), this.componentChain) || this._svgIcon(), ...(ngDevMode ? [{ debugName: "_resolvedSvgIcon" }] : []));
522
545
  get resolvedSvgIcon() { return this._resolvedSvgIcon(); }
523
546
  get hasSvgIcon() {
524
547
  if (this._resolvedSvgIcon()) {
@@ -545,12 +568,13 @@ https://www.telerik.com/design-system/docs/foundation/iconography/icon-list/
545
568
  return false;
546
569
  }
547
570
  get customFontIconClass() {
548
- return this.iconsService.getCustomFontIconClass(this.name) || this.customFontClass;
571
+ return this.iconsService.getCustomFontIconClass(this.name, this.componentChain) || this.customFontClass;
549
572
  }
550
573
  subs = new Subscription();
551
- constructor(iconsService, element) {
574
+ constructor(iconsService, element, componentChain) {
552
575
  this.iconsService = iconsService;
553
576
  this.element = element;
577
+ this.componentChain = componentChain;
554
578
  this.subs = iconsService.changes.subscribe(iconSettings => {
555
579
  this._iconSettings.set(iconSettings);
556
580
  });
@@ -558,7 +582,7 @@ https://www.telerik.com/design-system/docs/foundation/iconography/icon-list/
558
582
  ngOnDestroy() {
559
583
  this.subs.unsubscribe();
560
584
  }
561
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.26", ngImport: i0, type: IconWrapperComponent, deps: [{ token: IconsService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
585
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.26", ngImport: i0, type: IconWrapperComponent, deps: [{ token: IconsService }, { token: i0.ElementRef }, { token: KENDO_COMPONENT_NAME, optional: true }], target: i0.ɵɵFactoryTarget.Component });
562
586
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.26", type: IconWrapperComponent, isStandalone: true, selector: "kendo-icon-wrapper", inputs: { name: "name", svgIcon: "svgIcon", innerCssClass: "innerCssClass", customFontClass: "customFontClass", size: "size" }, host: { properties: { "class.k-icon-wrapper-host": "this.hostClass" } }, exportAs: ["kendoIconWrapper"], ngImport: i0, template: `
563
587
  @if (iconSettings?.type === 'svg' && hasSvgIcon) {
564
588
  <kendo-svgicon
@@ -613,7 +637,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.26", ngImpo
613
637
  changeDetection: ChangeDetectionStrategy.OnPush,
614
638
  imports: [NgClass, IconComponent, SVGIconComponent]
615
639
  }]
616
- }], ctorParameters: () => [{ type: IconsService }, { type: i0.ElementRef }], propDecorators: { hostClass: [{
640
+ }], ctorParameters: () => [{ type: IconsService }, { type: i0.ElementRef }, { type: undefined, decorators: [{
641
+ type: Optional
642
+ }, {
643
+ type: Inject,
644
+ args: [KENDO_COMPONENT_NAME]
645
+ }] }], propDecorators: { hostClass: [{
617
646
  type: HostBinding,
618
647
  args: ['class.k-icon-wrapper-host']
619
648
  }], name: [{
package/index.d.ts CHANGED
@@ -241,17 +241,19 @@ declare class IconSettingsService {
241
241
  /**
242
242
  * Returns the [`SVGIcon`](https://www.telerik.com/kendo-angular-ui/components/icons/api/svgicon) object for the provided key.
243
243
  * Override in a custom service to provide custom SVG icons.
244
+ * The optional `_component` parameter carries the host component identity (e.g. `'dateinput'`, `'grid'`)
245
+ * so subclasses can return different icons for the same name depending on the requesting component.
244
246
  *
245
- * @hidden
246
247
  */
247
- getSvgIcon(_name: string): SVGIcon;
248
+ getSvgIcon(_name: string, _component?: string): SVGIcon;
248
249
  /**
249
250
  * Returns the list of classes to be rendered on the host `SPAN` element of custom font icons.
250
251
  * Override in a custom service to provide classes for custom font icons.
252
+ * The optional `_component` parameter carries the host component identity so subclasses can
253
+ * return different classes for the same key depending on the requesting component.
251
254
  *
252
- * @hidden
253
255
  */
254
- getCustomFontIconClass(_key: string): string;
256
+ getCustomFontIconClass(_key: string, _component?: string): string;
255
257
  static ɵfac: i0.ɵɵFactoryDeclaration<IconSettingsService, never>;
256
258
  static ɵprov: i0.ɵɵInjectableDeclaration<IconSettingsService>;
257
259
  }
@@ -292,15 +294,19 @@ declare class IconsService implements OnDestroy {
292
294
  /**
293
295
  * Returns the [`SVGIcon`](https://www.telerik.com/kendo-angular-ui/components/icons/api/svgicon) object for the provided key.
294
296
  * Override in a custom service to provide custom SVG icons.
297
+ * Walks the `componentChain` outermost-first so the closest explicitly configured ancestor wins,
298
+ * falling back to a global (no component) lookup when no level in the chain matches.
295
299
  * @hidden
296
300
  */
297
- getSvgIcon(name: string): SVGIcon;
301
+ getSvgIcon(name: string, componentChain?: string[]): SVGIcon;
298
302
  /**
299
303
  * Returns the list of classes to be rendered on the host `SPAN` element of custom font icons.
300
304
  * Override in a custom service to provide classes for custom font icons.
305
+ * Walks the `componentChain` outermost-first so the closest explicitly configured ancestor wins,
306
+ * falling back to a global (no component) lookup when no level in the chain matches.
301
307
  * @hidden
302
308
  */
303
- getCustomFontIconClass(key: string): string;
309
+ getCustomFontIconClass(key: string, componentChain?: string[]): string;
304
310
  static ɵfac: i0.ɵɵFactoryDeclaration<IconsService, [{ optional: true; }, { optional: true; }]>;
305
311
  static ɵprov: i0.ɵɵInjectableDeclaration<IconsService>;
306
312
  }
@@ -311,6 +317,7 @@ declare class IconsService implements OnDestroy {
311
317
  declare class IconWrapperComponent implements OnDestroy {
312
318
  private iconsService;
313
319
  element: ElementRef;
320
+ private componentChain;
314
321
  hostClass: boolean;
315
322
  /**
316
323
  * Sets the name for an existing font icon in a Kendo UI theme to render.
@@ -351,9 +358,9 @@ declare class IconWrapperComponent implements OnDestroy {
351
358
  get hasSvgIcon(): boolean;
352
359
  get customFontIconClass(): string;
353
360
  private subs;
354
- constructor(iconsService: IconsService, element: ElementRef);
361
+ constructor(iconsService: IconsService, element: ElementRef, componentChain: string[]);
355
362
  ngOnDestroy(): void;
356
- static ɵfac: i0.ɵɵFactoryDeclaration<IconWrapperComponent, never>;
363
+ static ɵfac: i0.ɵɵFactoryDeclaration<IconWrapperComponent, [null, null, { optional: true; }]>;
357
364
  static ɵcmp: i0.ɵɵComponentDeclaration<IconWrapperComponent, "kendo-icon-wrapper", ["kendoIconWrapper"], { "name": { "alias": "name"; "required": false; }; "svgIcon": { "alias": "svgIcon"; "required": false; }; "innerCssClass": { "alias": "innerCssClass"; "required": false; }; "customFontClass": { "alias": "customFontClass"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, {}, never, never, true, never>;
358
365
  }
359
366
 
@@ -7,7 +7,7 @@ export const packageMetadata = {
7
7
  "productCodes": [
8
8
  "KENDOUIANGULAR"
9
9
  ],
10
- "publishDate": 1785492978,
11
- "version": "25.0.0-develop.17",
10
+ "publishDate": 1785503177,
11
+ "version": "25.0.0-develop.19",
12
12
  "licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
13
13
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-icons",
3
- "version": "25.0.0-develop.17",
3
+ "version": "25.0.0-develop.19",
4
4
  "description": "Kendo UI Angular component starter template",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -31,7 +31,7 @@
31
31
  "package": {
32
32
  "productName": "Kendo UI for Angular",
33
33
  "productCode": "KENDOUIANGULAR",
34
- "publishDate": 1785492978,
34
+ "publishDate": 1785503177,
35
35
  "licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
36
36
  }
37
37
  },
@@ -42,7 +42,7 @@
42
42
  "@angular/platform-browser": "20 - 22",
43
43
  "@progress/kendo-licensing": "^1.11.0",
44
44
  "@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
45
- "@progress/kendo-angular-common": "25.0.0-develop.17",
45
+ "@progress/kendo-angular-common": "25.0.0-develop.19",
46
46
  "rxjs": "^6.5.3 || ^7.0.0"
47
47
  },
48
48
  "peerDependenciesMeta": {
@@ -52,7 +52,7 @@
52
52
  },
53
53
  "dependencies": {
54
54
  "tslib": "^2.3.1",
55
- "@progress/kendo-angular-schematics": "25.0.0-develop.17"
55
+ "@progress/kendo-angular-schematics": "25.0.0-develop.19"
56
56
  },
57
57
  "schematics": "./schematics/collection.json",
58
58
  "module": "fesm2022/progress-kendo-angular-icons.mjs",