@progress/kendo-angular-icons 15.4.0-develop.3 → 15.4.0-develop.5

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.
@@ -23,9 +23,12 @@ export class IconComponent extends IconBaseDirective {
23
23
  */
24
24
  set name(name) {
25
25
  if (isDocumentAvailable()) {
26
- const element = this.element.nativeElement;
27
- this.renderer.removeClass(element, `k-i-${this.name}`);
28
- this.renderer.addClass(element, `k-i-${name}`);
26
+ const newName = name !== this._name;
27
+ if (newName) {
28
+ const element = this.element.nativeElement;
29
+ this.renderer.removeClass(element, `k-i-${this.name}`);
30
+ this.renderer.addClass(element, `k-i-${name}`);
31
+ }
29
32
  }
30
33
  this._name = name;
31
34
  }
@@ -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: 1711470919,
13
- version: '15.4.0-develop.3',
12
+ publishDate: 1711962288,
13
+ version: '15.4.0-develop.5',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
15
15
  };
@@ -9,6 +9,7 @@ import { IconBaseDirective } from '../common/icon-base';
9
9
  import * as i0 from "@angular/core";
10
10
  import * as i1 from "@angular/platform-browser";
11
11
  import * as i2 from "@angular/common";
12
+ const areSame = (i1, i2) => i1?.name === i2?.name && i1.content === i2.content && i1.viewBox === i2.viewBox;
12
13
  /**
13
14
  * Represents the Kendo UI SVG Icon component for Angular.
14
15
  */
@@ -27,11 +28,14 @@ export class SVGIconComponent extends IconBaseDirective {
27
28
  set icon(icon) {
28
29
  const element = this.element.nativeElement;
29
30
  const hasDocument = isDocumentAvailable();
30
- if (this._icon && this._icon.name && hasDocument) {
31
+ const newName = icon?.name && icon.name !== this._icon?.name;
32
+ if (this._icon && this._icon.name && newName && hasDocument) {
31
33
  this.renderer.removeClass(element, `k-svg-i-${this._icon.name}`);
32
34
  }
33
- this._icon = icon;
34
- if (hasDocument) {
35
+ if (!areSame(icon, this._icon)) {
36
+ this._icon = icon;
37
+ }
38
+ if (hasDocument && newName) {
35
39
  this.renderer.addClass(element, `k-svg-i-${this._icon.name}`);
36
40
  }
37
41
  }
@@ -19,8 +19,8 @@ const packageMetadata = {
19
19
  name: '@progress/kendo-angular-icons',
20
20
  productName: 'Kendo UI for Angular',
21
21
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
22
- publishDate: 1711470919,
23
- version: '15.4.0-develop.3',
22
+ publishDate: 1711962288,
23
+ version: '15.4.0-develop.5',
24
24
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
25
25
  };
26
26
 
@@ -147,9 +147,12 @@ class IconComponent extends IconBaseDirective {
147
147
  */
148
148
  set name(name) {
149
149
  if (isDocumentAvailable()) {
150
- const element = this.element.nativeElement;
151
- this.renderer.removeClass(element, `k-i-${this.name}`);
152
- this.renderer.addClass(element, `k-i-${name}`);
150
+ const newName = name !== this._name;
151
+ if (newName) {
152
+ const element = this.element.nativeElement;
153
+ this.renderer.removeClass(element, `k-i-${this.name}`);
154
+ this.renderer.addClass(element, `k-i-${name}`);
155
+ }
153
156
  }
154
157
  this._name = name;
155
158
  }
@@ -179,6 +182,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
179
182
  type: Input
180
183
  }] } });
181
184
 
185
+ const areSame = (i1, i2) => (i1 === null || i1 === void 0 ? void 0 : i1.name) === (i2 === null || i2 === void 0 ? void 0 : i2.name) && i1.content === i2.content && i1.viewBox === i2.viewBox;
182
186
  /**
183
187
  * Represents the Kendo UI SVG Icon component for Angular.
184
188
  */
@@ -195,13 +199,17 @@ class SVGIconComponent extends IconBaseDirective {
195
199
  * Defines the SVG icon, which will be rendered. All [Kendo UI SVG Icons](slug:svgicon_list) are supported.
196
200
  */
197
201
  set icon(icon) {
202
+ var _a;
198
203
  const element = this.element.nativeElement;
199
204
  const hasDocument = isDocumentAvailable();
200
- if (this._icon && this._icon.name && hasDocument) {
205
+ const newName = (icon === null || icon === void 0 ? void 0 : icon.name) && icon.name !== ((_a = this._icon) === null || _a === void 0 ? void 0 : _a.name);
206
+ if (this._icon && this._icon.name && newName && hasDocument) {
201
207
  this.renderer.removeClass(element, `k-svg-i-${this._icon.name}`);
202
208
  }
203
- this._icon = icon;
204
- if (hasDocument) {
209
+ if (!areSame(icon, this._icon)) {
210
+ this._icon = icon;
211
+ }
212
+ if (hasDocument && newName) {
205
213
  this.renderer.addClass(element, `k-svg-i-${this._icon.name}`);
206
214
  }
207
215
  }
@@ -19,8 +19,8 @@ const packageMetadata = {
19
19
  name: '@progress/kendo-angular-icons',
20
20
  productName: 'Kendo UI for Angular',
21
21
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
22
- publishDate: 1711470919,
23
- version: '15.4.0-develop.3',
22
+ publishDate: 1711962288,
23
+ version: '15.4.0-develop.5',
24
24
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
25
25
  };
26
26
 
@@ -147,9 +147,12 @@ class IconComponent extends IconBaseDirective {
147
147
  */
148
148
  set name(name) {
149
149
  if (isDocumentAvailable()) {
150
- const element = this.element.nativeElement;
151
- this.renderer.removeClass(element, `k-i-${this.name}`);
152
- this.renderer.addClass(element, `k-i-${name}`);
150
+ const newName = name !== this._name;
151
+ if (newName) {
152
+ const element = this.element.nativeElement;
153
+ this.renderer.removeClass(element, `k-i-${this.name}`);
154
+ this.renderer.addClass(element, `k-i-${name}`);
155
+ }
153
156
  }
154
157
  this._name = name;
155
158
  }
@@ -179,6 +182,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
179
182
  type: Input
180
183
  }] } });
181
184
 
185
+ const areSame = (i1, i2) => i1?.name === i2?.name && i1.content === i2.content && i1.viewBox === i2.viewBox;
182
186
  /**
183
187
  * Represents the Kendo UI SVG Icon component for Angular.
184
188
  */
@@ -197,11 +201,14 @@ class SVGIconComponent extends IconBaseDirective {
197
201
  set icon(icon) {
198
202
  const element = this.element.nativeElement;
199
203
  const hasDocument = isDocumentAvailable();
200
- if (this._icon && this._icon.name && hasDocument) {
204
+ const newName = icon?.name && icon.name !== this._icon?.name;
205
+ if (this._icon && this._icon.name && newName && hasDocument) {
201
206
  this.renderer.removeClass(element, `k-svg-i-${this._icon.name}`);
202
207
  }
203
- this._icon = icon;
204
- if (hasDocument) {
208
+ if (!areSame(icon, this._icon)) {
209
+ this._icon = icon;
210
+ }
211
+ if (hasDocument && newName) {
205
212
  this.renderer.addClass(element, `k-svg-i-${this._icon.name}`);
206
213
  }
207
214
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-icons",
3
- "version": "15.4.0-develop.3",
3
+ "version": "15.4.0-develop.5",
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": "13 - 17",
23
23
  "@progress/kendo-licensing": "^1.0.2",
24
24
  "@progress/kendo-svg-icons": "^2.0.0",
25
- "@progress/kendo-angular-common": "15.4.0-develop.3",
25
+ "@progress/kendo-angular-common": "15.4.0-develop.5",
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": "15.4.0-develop.3"
30
+ "@progress/kendo-angular-schematics": "15.4.0-develop.5"
31
31
  },
32
32
  "schematics": "./schematics/collection.json",
33
33
  "module": "fesm2015/progress-kendo-angular-icons.mjs",
@@ -23,7 +23,6 @@ export declare class SVGIconComponent extends IconBaseDirective implements OnIni
23
23
  get icon(): SVGIcon;
24
24
  get content(): SafeHtml;
25
25
  get visible(): boolean;
26
- private safeContent;
27
26
  private _icon;
28
27
  constructor(domSanitizer: DomSanitizer, element: ElementRef, renderer: Renderer2);
29
28
  ngOnInit(): void;