@progress/kendo-angular-icons 17.1.1-develop.6 → 17.1.1-develop.8

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.
@@ -35,6 +35,7 @@ export declare class IconsService implements OnDestroy {
35
35
  * Override in a custom service to provide classes for custom font icons.
36
36
  */
37
37
  getCustomFontIconClass(key: string): string;
38
+ private areSettingsEqual;
38
39
  static ɵfac: i0.ɵɵFactoryDeclaration<IconsService, [{ optional: true; }, { optional: true; }]>;
39
40
  static ɵprov: i0.ɵɵInjectableDeclaration<IconsService>;
40
41
  }
@@ -10,6 +10,7 @@ import { IconSettingsService } from './icon-settings.service';
10
10
  import { ICON_SETTINGS } from './icon-settings';
11
11
  import * as i0 from "@angular/core";
12
12
  import * as i1 from "./icon-settings.service";
13
+ const DEFAULT_ICON_SETTINGS = { type: 'svg' };
13
14
  /**
14
15
  * @hidden
15
16
  */
@@ -19,7 +20,7 @@ export class IconsService {
19
20
  /**
20
21
  * Notifies subscribers of the initial icon settings, and upon each call to `notify`.
21
22
  */
22
- changes = new BehaviorSubject(this.iconSettings || { type: 'svg' });
23
+ changes = new BehaviorSubject(this.iconSettings || DEFAULT_ICON_SETTINGS);
23
24
  subs = new Subscription();
24
25
  constructor(_iconSettings, iconSettingsService) {
25
26
  this._iconSettings = _iconSettings;
@@ -29,6 +30,9 @@ export class IconsService {
29
30
  .pipe(map(iconSettings => isPresent(iconSettings) ? iconSettings : this._iconSettings), tap(iconSettings => this._iconSettings = iconSettings))
30
31
  .subscribe(iconSettings => this.changes.next(iconSettings)));
31
32
  }
33
+ if (isPresent(this.iconSettings) && !this.areSettingsEqual()) {
34
+ this.changes.next(this.iconSettings);
35
+ }
32
36
  }
33
37
  /**
34
38
  * @hidden
@@ -55,6 +59,14 @@ export class IconsService {
55
59
  const customClass = this.iconSettingsService && this.iconSettingsService.getCustomFontIconClass(key);
56
60
  return customClass;
57
61
  }
62
+ areSettingsEqual() {
63
+ if (Object.keys(this.iconSettings).length !== Object.keys(DEFAULT_ICON_SETTINGS).length) {
64
+ return false;
65
+ }
66
+ const equalSettings = Object.entries(this.iconSettings)
67
+ .filter(([key, value]) => value === DEFAULT_ICON_SETTINGS[key.toString()]);
68
+ return equalSettings.length === Object.keys(this.iconSettings).length;
69
+ }
58
70
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IconsService, deps: [{ token: ICON_SETTINGS, optional: true }, { token: i1.IconSettingsService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
59
71
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IconsService, providedIn: 'root' });
60
72
  }
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-icons',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1733316079,
13
- version: '17.1.1-develop.6',
12
+ publishDate: 1733414297,
13
+ version: '17.1.1-develop.8',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
15
15
  };
@@ -18,8 +18,8 @@ const packageMetadata = {
18
18
  name: '@progress/kendo-angular-icons',
19
19
  productName: 'Kendo UI for Angular',
20
20
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
21
- publishDate: 1733316079,
22
- version: '17.1.1-develop.6',
21
+ publishDate: 1733414297,
22
+ version: '17.1.1-develop.8',
23
23
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
24
24
  };
25
25
 
@@ -346,6 +346,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
346
346
  */
347
347
  const ICON_SETTINGS = new InjectionToken('Kendo UI Icon-Settings token');
348
348
 
349
+ const DEFAULT_ICON_SETTINGS = { type: 'svg' };
349
350
  /**
350
351
  * @hidden
351
352
  */
@@ -355,7 +356,7 @@ class IconsService {
355
356
  /**
356
357
  * Notifies subscribers of the initial icon settings, and upon each call to `notify`.
357
358
  */
358
- changes = new BehaviorSubject(this.iconSettings || { type: 'svg' });
359
+ changes = new BehaviorSubject(this.iconSettings || DEFAULT_ICON_SETTINGS);
359
360
  subs = new Subscription();
360
361
  constructor(_iconSettings, iconSettingsService) {
361
362
  this._iconSettings = _iconSettings;
@@ -365,6 +366,9 @@ class IconsService {
365
366
  .pipe(map(iconSettings => isPresent(iconSettings) ? iconSettings : this._iconSettings), tap(iconSettings => this._iconSettings = iconSettings))
366
367
  .subscribe(iconSettings => this.changes.next(iconSettings)));
367
368
  }
369
+ if (isPresent(this.iconSettings) && !this.areSettingsEqual()) {
370
+ this.changes.next(this.iconSettings);
371
+ }
368
372
  }
369
373
  /**
370
374
  * @hidden
@@ -391,6 +395,14 @@ class IconsService {
391
395
  const customClass = this.iconSettingsService && this.iconSettingsService.getCustomFontIconClass(key);
392
396
  return customClass;
393
397
  }
398
+ areSettingsEqual() {
399
+ if (Object.keys(this.iconSettings).length !== Object.keys(DEFAULT_ICON_SETTINGS).length) {
400
+ return false;
401
+ }
402
+ const equalSettings = Object.entries(this.iconSettings)
403
+ .filter(([key, value]) => value === DEFAULT_ICON_SETTINGS[key.toString()]);
404
+ return equalSettings.length === Object.keys(this.iconSettings).length;
405
+ }
394
406
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IconsService, deps: [{ token: ICON_SETTINGS, optional: true }, { token: IconSettingsService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
395
407
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IconsService, providedIn: 'root' });
396
408
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-icons",
3
- "version": "17.1.1-develop.6",
3
+ "version": "17.1.1-develop.8",
4
4
  "description": "Kendo UI Angular component starter template",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -22,12 +22,12 @@
22
22
  "@angular/platform-browser": "16 - 19",
23
23
  "@progress/kendo-licensing": "^1.0.2",
24
24
  "@progress/kendo-svg-icons": "^4.0.0",
25
- "@progress/kendo-angular-common": "17.1.1-develop.6",
25
+ "@progress/kendo-angular-common": "17.1.1-develop.8",
26
26
  "rxjs": "^6.5.3 || ^7.0.0"
27
27
  },
28
28
  "dependencies": {
29
29
  "tslib": "^2.3.1",
30
- "@progress/kendo-angular-schematics": "17.1.1-develop.6"
30
+ "@progress/kendo-angular-schematics": "17.1.1-develop.8"
31
31
  },
32
32
  "schematics": "./schematics/collection.json",
33
33
  "module": "fesm2022/progress-kendo-angular-icons.mjs",