@progress/kendo-angular-icons 2.0.3 → 11.0.0-develop.100

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.
Files changed (49) hide show
  1. package/LICENSE.md +1 -1
  2. package/NOTICE.txt +4 -4
  3. package/README.md +1 -1
  4. package/common/icon-base.d.ts +1 -1
  5. package/common/icon-settings.d.ts +10 -0
  6. package/common/icon-settings.service.d.ts +40 -0
  7. package/common/icons.service.d.ts +40 -0
  8. package/common/models/flip.d.ts +1 -1
  9. package/common/models/icon-settings.d.ts +14 -0
  10. package/common/models/icon-type.d.ts +5 -0
  11. package/common/models/index.d.ts +3 -1
  12. package/common/models/size.d.ts +1 -1
  13. package/common/models/theme-color.d.ts +1 -1
  14. package/common/util.d.ts +8 -0
  15. package/{esm2015/common/icon-base.js → esm2020/common/icon-base.mjs} +11 -10
  16. package/esm2020/common/icon-settings.mjs +9 -0
  17. package/esm2020/common/icon-settings.service.mjs +50 -0
  18. package/esm2020/common/icons.service.mjs +68 -0
  19. package/{esm2015/common/models/size.js → esm2020/common/models/flip.mjs} +1 -1
  20. package/{esm2015/common/models/theme-color.js → esm2020/common/models/icon-settings.mjs} +1 -1
  21. package/{esm2015/common/models/flip.js → esm2020/common/models/icon-type.mjs} +1 -1
  22. package/esm2020/common/models/index.mjs +6 -0
  23. package/{esm2015/common/models/index.js → esm2020/common/models/size.mjs} +1 -1
  24. package/esm2020/common/models/theme-color.mjs +5 -0
  25. package/esm2020/common/util.mjs +8 -0
  26. package/{esm2015/icon/icon.component.js → esm2020/icon/icon.component.mjs} +12 -11
  27. package/esm2020/icon-wrapper/icon-wrapper.component.mjs +109 -0
  28. package/{esm2015/icon.module.js → esm2020/icon.module.mjs} +6 -6
  29. package/{esm2015/icons.module.js → esm2020/icons.module.mjs} +27 -8
  30. package/{esm2015/main.js → esm2020/index.mjs} +5 -1
  31. package/{esm2015/package-metadata.js → esm2020/package-metadata.mjs} +3 -3
  32. package/{esm2015/kendo-angular-icons.js → esm2020/progress-kendo-angular-icons.mjs} +2 -2
  33. package/{esm2015/svg-icon/svg-icon.component.js → esm2020/svg-icon/svg-icon.component.mjs} +12 -9
  34. package/{esm2015/svg-icon.module.js → esm2020/svg-icon.module.mjs} +5 -5
  35. package/fesm2015/progress-kendo-angular-icons.mjs +622 -0
  36. package/{fesm2015/kendo-angular-icons.js → fesm2020/progress-kendo-angular-icons.mjs} +288 -57
  37. package/icon/icon.component.d.ts +1 -1
  38. package/icon-wrapper/icon-wrapper.component.d.ts +44 -0
  39. package/icon.module.d.ts +2 -2
  40. package/icons.module.d.ts +5 -4
  41. package/{main.d.ts → index.d.ts} +7 -2
  42. package/package-metadata.d.ts +1 -1
  43. package/package.json +27 -54
  44. package/{kendo-angular-icons.d.ts → progress-kendo-angular-icons.d.ts} +2 -2
  45. package/schematics/ngAdd/index.js +1 -5
  46. package/svg-icon/svg-icon.component.d.ts +1 -1
  47. package/svg-icon.module.d.ts +1 -1
  48. package/bundles/kendo-angular-icons.umd.js +0 -5
  49. package/schematics/ngAdd/index.js.map +0 -1
@@ -1,14 +1,16 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as i0 from '@angular/core';
6
- import { Directive, HostBinding, Input, Component, isDevMode, NgModule } from '@angular/core';
7
- import { validatePackage } from '@progress/kendo-licensing';
6
+ import { Directive, HostBinding, Input, Component, isDevMode, Injectable, InjectionToken, Optional, Inject, NgModule } from '@angular/core';
8
7
  import { isDocumentAvailable } from '@progress/kendo-angular-common';
8
+ import { validatePackage } from '@progress/kendo-licensing';
9
9
  import * as i1 from '@angular/platform-browser';
10
- import * as i2 from '@angular/common';
10
+ import * as i4 from '@angular/common';
11
11
  import { CommonModule } from '@angular/common';
12
+ import { Subject, BehaviorSubject, Subscription } from 'rxjs';
13
+ import { map, tap } from 'rxjs/operators';
12
14
 
13
15
  /**
14
16
  * @hidden
@@ -17,9 +19,9 @@ const packageMetadata = {
17
19
  name: '@progress/kendo-angular-icons',
18
20
  productName: 'Kendo UI for Angular',
19
21
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
20
- publishDate: 1668698255,
22
+ publishDate: 1673469086,
21
23
  version: '',
22
- licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
24
+ licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
23
25
  };
24
26
 
25
27
  const sizeClasses = {
@@ -86,21 +88,22 @@ class IconBaseDirective {
86
88
  *
87
89
  */
88
90
  set size(size) {
91
+ const currentClass = sizeClasses[this.size];
92
+ const newClass = sizeClasses[size];
89
93
  const element = this.element.nativeElement;
90
- this._size = size;
91
- const sizeClass = sizeClasses[this.size];
92
- this.renderer.removeClass(element, sizeClass);
93
- if (size !== 'default') {
94
- this.renderer.addClass(element, sizeClass);
94
+ this.renderer.removeClass(element, currentClass);
95
+ if (size && size !== 'default') {
96
+ this.renderer.addClass(element, newClass);
95
97
  }
98
+ this._size = size;
96
99
  }
97
100
  get size() {
98
101
  return this._size;
99
102
  }
100
103
  }
101
- IconBaseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IconBaseDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
102
- IconBaseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: IconBaseDirective, selector: "[kendoIconBase]", inputs: { flip: "flip", themeColor: "themeColor", size: "size" }, host: { properties: { "class.k-flip-h": "this.horizontalFlip", "class.k-flip-v": "this.verticalFlip" } }, ngImport: i0 });
103
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IconBaseDirective, decorators: [{
104
+ IconBaseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconBaseDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
105
+ IconBaseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: IconBaseDirective, selector: "[kendoIconBase]", inputs: { flip: "flip", themeColor: "themeColor", size: "size" }, host: { properties: { "class.k-flip-h": "this.horizontalFlip", "class.k-flip-v": "this.verticalFlip" } }, ngImport: i0 });
106
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconBaseDirective, decorators: [{
104
107
  type: Directive,
105
108
  args: [{
106
109
  selector: '[kendoIconBase]'
@@ -134,25 +137,25 @@ class IconComponent extends IconBaseDirective {
134
137
  * All [Kendo UI Icons]({% slug icons %}#toc-list-of-font-icons) are supported.
135
138
  */
136
139
  set name(name) {
137
- const element = this.element.nativeElement;
138
- this.renderer.removeClass(element, `k-i-${this.name}`);
139
- this._name = name;
140
- if (name) {
141
- this.renderer.addClass(element, `k-i-${this.name}`);
140
+ if (isDocumentAvailable()) {
141
+ const element = this.element.nativeElement;
142
+ this.renderer.removeClass(element, `k-i-${this.name}`);
143
+ this.renderer.addClass(element, `k-i-${name}`);
142
144
  }
145
+ this._name = name;
143
146
  }
144
147
  get name() {
145
148
  return this._name;
146
149
  }
147
150
  }
148
- IconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IconComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
149
- IconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: IconComponent, selector: "kendo-icon", inputs: { name: "name" }, host: { properties: { "class.k-icon": "this.hostClass" } }, exportAs: ["kendoIcon"], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
150
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IconComponent, decorators: [{
151
+ IconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
152
+ IconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: IconComponent, selector: "kendo-icon", inputs: { name: "name" }, host: { properties: { "class.k-icon": "this.hostClass" } }, exportAs: ["kendoIcon"], usesInheritance: true, ngImport: i0, template: '', isInline: true });
153
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconComponent, decorators: [{
151
154
  type: Component,
152
155
  args: [{
153
156
  exportAs: 'kendoIcon',
154
157
  selector: 'kendo-icon',
155
- template: ``
158
+ template: ''
156
159
  }]
157
160
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { hostClass: [{
158
161
  type: HostBinding,
@@ -177,18 +180,20 @@ class SVGIconComponent extends IconBaseDirective {
177
180
  */
178
181
  set icon(icon) {
179
182
  const element = this.element.nativeElement;
180
- if (this._icon && this._icon.name) {
183
+ const hasDocument = isDocumentAvailable();
184
+ if (this._icon && this._icon.name && hasDocument) {
181
185
  this.renderer.removeClass(element, `k-svg-i-${this._icon.name}`);
182
186
  }
183
187
  this._icon = icon;
184
- this.renderer.addClass(element, `k-svg-i-${this._icon.name}`);
188
+ if (hasDocument) {
189
+ this.renderer.addClass(element, `k-svg-i-${this._icon.name}`);
190
+ }
185
191
  }
186
192
  get icon() {
187
193
  return this._icon;
188
194
  }
189
195
  get content() {
190
- this.safeContent = this.safeContent || this.domSanitizer.bypassSecurityTrustHtml(this.icon.content);
191
- return this.safeContent;
196
+ return this.domSanitizer.bypassSecurityTrustHtml(this.icon.content);
192
197
  }
193
198
  get visible() {
194
199
  return this.icon && isDocumentAvailable();
@@ -209,12 +214,12 @@ class SVGIconComponent extends IconBaseDirective {
209
214
  }
210
215
  }
211
216
  }
212
- SVGIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SVGIconComponent, deps: [{ token: i1.DomSanitizer }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
213
- SVGIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SVGIconComponent, selector: "kendo-svg-icon", inputs: { icon: "icon" }, host: { properties: { "class.k-svg-icon": "this.hostClass" } }, exportAs: ["kendoSVGIcon"], usesInheritance: true, ngImport: i0, template: `
217
+ SVGIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SVGIconComponent, deps: [{ token: i1.DomSanitizer }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
218
+ SVGIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: SVGIconComponent, selector: "kendo-svg-icon", inputs: { icon: "icon" }, host: { properties: { "class.k-svg-icon": "this.hostClass" } }, exportAs: ["kendoSVGIcon"], usesInheritance: true, ngImport: i0, template: `
214
219
  <svg *ngIf="visible" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
215
220
  [attr.viewBox]="icon.viewBox" [innerHTML]="content">
216
- </svg>`, isInline: true, directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
217
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SVGIconComponent, decorators: [{
221
+ </svg>`, isInline: true, directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
222
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SVGIconComponent, decorators: [{
218
223
  type: Component,
219
224
  args: [{
220
225
  exportAs: 'kendoSVGIcon',
@@ -231,11 +236,220 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
231
236
  type: Input
232
237
  }] } });
233
238
 
234
- const exportedModules$1 = [
239
+ /**
240
+ * @hidden
241
+ */
242
+ const isPresent = (value) => value !== null && value !== undefined;
243
+
244
+ /**
245
+ * A service that returns the current icon settings to be used in subscribers.
246
+ * Use the public `notify` method to change the icon settings dynamically.
247
+ */
248
+ class IconSettingsService {
249
+ constructor() {
250
+ /**
251
+ * @hidden
252
+ */
253
+ this.changes = new Subject();
254
+ }
255
+ /**
256
+ * Notifies subscribers that the icon settings were changed.
257
+ *
258
+ * @param iconSettings - (Optional) A new value for the [icon settings token]({% slug api_icons_icon_settings %}).
259
+ */
260
+ notify(iconSettings) {
261
+ this.changes.next(iconSettings);
262
+ }
263
+ /**
264
+ * Returns the [`SVGIcon`](slug:api_icons_svgicon) object for the provided key.
265
+ * Override in a custom service to provide custom SVG icons.
266
+ *
267
+ * @hidden
268
+ */
269
+ getSvgIcon(_name) {
270
+ return null;
271
+ }
272
+ /**
273
+ * Returns the list of classes to be rendered on the host `SPAN` element of custom font icons.
274
+ * Override in a custom service to provide classes for custom font icons.
275
+ *
276
+ * @hidden
277
+ */
278
+ getCustomFontIconClass(_key) {
279
+ return null;
280
+ }
281
+ }
282
+ IconSettingsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconSettingsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
283
+ IconSettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconSettingsService });
284
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconSettingsService, decorators: [{
285
+ type: Injectable
286
+ }] });
287
+
288
+ /**
289
+ * A token that specifies the icons [settings ('size', 'themeColor', 'flip')](appearance_svgicon) of Kendo UI for Angular components.
290
+ */
291
+ const ICON_SETTINGS = new InjectionToken('Kendo UI Icon-Settings token');
292
+
293
+ /**
294
+ * @hidden
295
+ */
296
+ class IconsService {
297
+ constructor(_iconSettings, iconSettingsService) {
298
+ this._iconSettings = _iconSettings;
299
+ this.iconSettingsService = iconSettingsService;
300
+ /**
301
+ * Notifies subscribers of the initial icon settings, and upon each call to `notify`.
302
+ */
303
+ this.changes = new BehaviorSubject(this.iconSettings || { type: 'font' });
304
+ this.subs = new Subscription();
305
+ if (iconSettingsService) {
306
+ this.subs.add(iconSettingsService.changes
307
+ .pipe(map(iconSettings => isPresent(iconSettings) ? iconSettings : this._iconSettings), tap(iconSettings => this._iconSettings = iconSettings))
308
+ .subscribe(iconSettings => this.changes.next(iconSettings)));
309
+ }
310
+ }
311
+ /**
312
+ * @hidden
313
+ */
314
+ get iconSettings() {
315
+ return this._iconSettings;
316
+ }
317
+ ngOnDestroy() {
318
+ this.subs.unsubscribe();
319
+ }
320
+ /**
321
+ * Returns the [`SVGIcon`](slug:api_icons_svgicon) object for the provided key.
322
+ * Override in a custom service to provide custom SVG icons.
323
+ */
324
+ getSvgIcon(name) {
325
+ const customIcon = this.iconSettingsService && this.iconSettingsService.getSvgIcon(name);
326
+ return customIcon;
327
+ }
328
+ /**
329
+ * Returns the list of classes to be rendered on the host `SPAN` element of custom font icons.
330
+ * Override in a custom service to provide classes for custom font icons.
331
+ */
332
+ getCustomFontIconClass(key) {
333
+ const customClass = this.iconSettingsService && this.iconSettingsService.getCustomFontIconClass(key);
334
+ return customClass;
335
+ }
336
+ }
337
+ IconsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconsService, deps: [{ token: ICON_SETTINGS, optional: true }, { token: IconSettingsService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
338
+ IconsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconsService });
339
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconsService, decorators: [{
340
+ type: Injectable
341
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
342
+ type: Optional
343
+ }, {
344
+ type: Inject,
345
+ args: [ICON_SETTINGS]
346
+ }] }, { type: IconSettingsService, decorators: [{
347
+ type: Optional
348
+ }] }]; } });
349
+
350
+ /**
351
+ * @hidden
352
+ */
353
+ class IconWrapperComponent {
354
+ constructor(iconsService) {
355
+ this.iconsService = iconsService;
356
+ this.hostClass = true;
357
+ /**
358
+ * Provided by consuming components in case an additional k-specific class needs to be rendered
359
+ * on the internal Icon component.
360
+ */
361
+ this.innerCssClass = '';
362
+ /**
363
+ * Provided by consuming components in case a custom font icon class is set
364
+ * by the developer using the consuming component through its API.
365
+ */
366
+ this.customFontClass = '';
367
+ this.subs = new Subscription();
368
+ this.subs = iconsService.changes.subscribe(iconSettings => {
369
+ this.iconSettings = iconSettings;
370
+ });
371
+ }
372
+ get customClasses() {
373
+ const classes = [this.customFontClass, this.innerCssClass].filter(cl => !!cl).join(' ');
374
+ return classes;
375
+ }
376
+ get getSvgIcon() {
377
+ return this.iconsService.getSvgIcon(this.name) || this.svgIcon;
378
+ }
379
+ get customFontIconClass() {
380
+ return this.iconsService.getCustomFontIconClass(this.name) || this.customFontClass;
381
+ }
382
+ ngOnDestroy() {
383
+ this.subs.unsubscribe();
384
+ }
385
+ }
386
+ IconWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconWrapperComponent, deps: [{ token: IconsService }], target: i0.ɵɵFactoryTarget.Component });
387
+ IconWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: { name: "name", svgIcon: "svgIcon", innerCssClass: "innerCssClass", customFontClass: "customFontClass" }, host: { properties: { "class.k-icon-wrapper-host": "this.hostClass" } }, exportAs: ["kendoIconWrapper"], ngImport: i0, template: `
388
+ <kendo-svg-icon
389
+ *ngIf="iconSettings?.type === 'svg'; else font"
390
+ [ngClass]="innerCssClass"
391
+ [icon]="getSvgIcon"
392
+ [size]="iconSettings?.size"
393
+ [themeColor]="iconSettings?.themeColor"
394
+ [flip]="iconSettings?.flip"></kendo-svg-icon>
395
+ <ng-template #font>
396
+ <kendo-icon
397
+ *ngIf="!customFontIconClass; else custom"
398
+ [ngClass]="innerCssClass"
399
+ [name]="name"
400
+ [size]="iconSettings?.size"
401
+ [themeColor]="iconSettings?.themeColor"
402
+ [flip]="iconSettings?.flip"></kendo-icon>
403
+ <ng-template #custom>
404
+ <span [ngClass]="customClasses"></span>
405
+ </ng-template>
406
+ </ng-template>
407
+ `, isInline: true, components: [{ type: SVGIconComponent, selector: "kendo-svg-icon", inputs: ["icon"], exportAs: ["kendoSVGIcon"] }, { type: IconComponent, selector: "kendo-icon", inputs: ["name"], exportAs: ["kendoIcon"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
408
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconWrapperComponent, decorators: [{
409
+ type: Component,
410
+ args: [{
411
+ exportAs: 'kendoIconWrapper',
412
+ selector: 'kendo-icon-wrapper',
413
+ template: `
414
+ <kendo-svg-icon
415
+ *ngIf="iconSettings?.type === 'svg'; else font"
416
+ [ngClass]="innerCssClass"
417
+ [icon]="getSvgIcon"
418
+ [size]="iconSettings?.size"
419
+ [themeColor]="iconSettings?.themeColor"
420
+ [flip]="iconSettings?.flip"></kendo-svg-icon>
421
+ <ng-template #font>
422
+ <kendo-icon
423
+ *ngIf="!customFontIconClass; else custom"
424
+ [ngClass]="innerCssClass"
425
+ [name]="name"
426
+ [size]="iconSettings?.size"
427
+ [themeColor]="iconSettings?.themeColor"
428
+ [flip]="iconSettings?.flip"></kendo-icon>
429
+ <ng-template #custom>
430
+ <span [ngClass]="customClasses"></span>
431
+ </ng-template>
432
+ </ng-template>
433
+ `
434
+ }]
435
+ }], ctorParameters: function () { return [{ type: IconsService }]; }, propDecorators: { hostClass: [{
436
+ type: HostBinding,
437
+ args: ['class.k-icon-wrapper-host']
438
+ }], name: [{
439
+ type: Input
440
+ }], svgIcon: [{
441
+ type: Input
442
+ }], innerCssClass: [{
443
+ type: Input
444
+ }], customFontClass: [{
445
+ type: Input
446
+ }] } });
447
+
448
+ const exportedModules$2 = [
235
449
  IconComponent
236
450
  ];
237
- const declarations$1 = [
238
- ...exportedModules$1
451
+ const declarations$2 = [
452
+ ...exportedModules$2
239
453
  ];
240
454
  /**
241
455
  * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
@@ -270,23 +484,23 @@ const declarations$1 = [
270
484
  */
271
485
  class IconModule {
272
486
  }
273
- IconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
274
- IconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IconModule, declarations: [IconComponent], imports: [CommonModule], exports: [IconComponent] });
275
- IconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IconModule, imports: [[CommonModule]] });
276
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IconModule, decorators: [{
487
+ IconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
488
+ IconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconModule, declarations: [IconComponent], imports: [CommonModule], exports: [IconComponent, CommonModule] });
489
+ IconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconModule, imports: [[CommonModule], CommonModule] });
490
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconModule, decorators: [{
277
491
  type: NgModule,
278
492
  args: [{
279
- declarations: [declarations$1],
280
- exports: [exportedModules$1],
493
+ declarations: [declarations$2],
494
+ exports: [exportedModules$2, CommonModule],
281
495
  imports: [CommonModule]
282
496
  }]
283
497
  }] });
284
498
 
285
- const exportedModules = [
499
+ const exportedModules$1 = [
286
500
  SVGIconComponent
287
501
  ];
288
- const declarations = [
289
- ...exportedModules
502
+ const declarations$1 = [
503
+ ...exportedModules$1
290
504
  ];
291
505
  /**
292
506
  * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
@@ -321,18 +535,24 @@ const declarations = [
321
535
  */
322
536
  class SVGIconModule {
323
537
  }
324
- SVGIconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SVGIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
325
- SVGIconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SVGIconModule, declarations: [SVGIconComponent], imports: [CommonModule], exports: [SVGIconComponent] });
326
- SVGIconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SVGIconModule, imports: [[CommonModule]] });
327
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SVGIconModule, decorators: [{
538
+ SVGIconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SVGIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
539
+ SVGIconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SVGIconModule, declarations: [SVGIconComponent], imports: [CommonModule], exports: [SVGIconComponent] });
540
+ SVGIconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SVGIconModule, imports: [[CommonModule]] });
541
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SVGIconModule, decorators: [{
328
542
  type: NgModule,
329
543
  args: [{
330
- declarations: [declarations],
331
- exports: [exportedModules],
544
+ declarations: [declarations$1],
545
+ exports: [exportedModules$1],
332
546
  imports: [CommonModule]
333
547
  }]
334
548
  }] });
335
549
 
550
+ const exportedModules = [
551
+ IconWrapperComponent
552
+ ];
553
+ const declarations = [
554
+ ...exportedModules
555
+ ];
336
556
  /**
337
557
  * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
338
558
  * definition for the Icons components.
@@ -366,18 +586,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
366
586
  */
367
587
  class IconsModule {
368
588
  }
369
- IconsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IconsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
370
- IconsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IconsModule, exports: [IconModule,
371
- SVGIconModule] });
372
- IconsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IconsModule, imports: [IconModule,
589
+ IconsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
590
+ IconsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconsModule, declarations: [IconWrapperComponent], imports: [IconModule,
591
+ SVGIconModule], exports: [IconModule,
592
+ SVGIconModule, IconWrapperComponent] });
593
+ IconsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconsModule, providers: [IconsService], imports: [[
594
+ IconModule,
595
+ SVGIconModule
596
+ ], IconModule,
373
597
  SVGIconModule] });
374
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IconsModule, decorators: [{
598
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconsModule, decorators: [{
375
599
  type: NgModule,
376
600
  args: [{
377
- exports: [
601
+ declarations,
602
+ imports: [
378
603
  IconModule,
379
604
  SVGIconModule
380
- ]
605
+ ],
606
+ exports: [
607
+ IconModule,
608
+ SVGIconModule,
609
+ exportedModules
610
+ ],
611
+ providers: [IconsService]
381
612
  }]
382
613
  }] });
383
614
 
@@ -385,5 +616,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
385
616
  * Generated bundle index. Do not edit.
386
617
  */
387
618
 
388
- export { IconComponent, IconModule, IconsModule, SVGIconComponent, SVGIconModule };
619
+ export { ICON_SETTINGS, IconComponent, IconModule, IconSettingsService, IconWrapperComponent, IconsModule, IconsService, SVGIconComponent, SVGIconModule };
389
620
 
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { ElementRef, Renderer2 } from '@angular/core';
@@ -0,0 +1,44 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { OnDestroy } from '@angular/core';
6
+ import { SVGIcon } from '@progress/kendo-svg-icons';
7
+ import { IconsService } from '../common/icons.service';
8
+ import { IconSettings } from '../common/models';
9
+ import * as i0 from "@angular/core";
10
+ /**
11
+ * @hidden
12
+ */
13
+ export declare class IconWrapperComponent implements OnDestroy {
14
+ private iconsService;
15
+ hostClass: boolean;
16
+ /**
17
+ * Defines the name for an existing font icon in a Kendo UI theme, which will be rendered.
18
+ * All [Kendo UI Icons]({% slug icons %}#toc-list-of-font-icons) are supported.
19
+ */
20
+ name: string;
21
+ /**
22
+ * Defines a [SVGIcon](slug:api_icons_svgicon) to be rendered.
23
+ */
24
+ svgIcon: SVGIcon;
25
+ /**
26
+ * Provided by consuming components in case an additional k-specific class needs to be rendered
27
+ * on the internal Icon component.
28
+ */
29
+ innerCssClass: string;
30
+ /**
31
+ * Provided by consuming components in case a custom font icon class is set
32
+ * by the developer using the consuming component through its API.
33
+ */
34
+ customFontClass: string;
35
+ get customClasses(): string;
36
+ iconSettings: IconSettings;
37
+ get getSvgIcon(): SVGIcon;
38
+ get customFontIconClass(): string;
39
+ private subs;
40
+ constructor(iconsService: IconsService);
41
+ ngOnDestroy(): void;
42
+ static ɵfac: i0.ɵɵFactoryDeclaration<IconWrapperComponent, never>;
43
+ static ɵcmp: i0.ɵɵComponentDeclaration<IconWrapperComponent, "kendo-icon-wrapper", ["kendoIconWrapper"], { "name": "name"; "svgIcon": "svgIcon"; "innerCssClass": "innerCssClass"; "customFontClass": "customFontClass"; }, {}, never, never>;
44
+ }
package/icon.module.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as i0 from "@angular/core";
@@ -38,6 +38,6 @@ import * as i2 from "@angular/common";
38
38
  */
39
39
  export declare class IconModule {
40
40
  static ɵfac: i0.ɵɵFactoryDeclaration<IconModule, never>;
41
- static ɵmod: i0.ɵɵNgModuleDeclaration<IconModule, [typeof i1.IconComponent], [typeof i2.CommonModule], [typeof i1.IconComponent]>;
41
+ static ɵmod: i0.ɵɵNgModuleDeclaration<IconModule, [typeof i1.IconComponent], [typeof i2.CommonModule], [typeof i1.IconComponent, typeof i2.CommonModule]>;
42
42
  static ɵinj: i0.ɵɵInjectorDeclaration<IconModule>;
43
43
  }
package/icons.module.d.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as i0 from "@angular/core";
6
- import * as i1 from "./icon.module";
7
- import * as i2 from "./svg-icon.module";
6
+ import * as i1 from "./icon-wrapper/icon-wrapper.component";
7
+ import * as i2 from "./icon.module";
8
+ import * as i3 from "./svg-icon.module";
8
9
  /**
9
10
  * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
10
11
  * definition for the Icons components.
@@ -38,6 +39,6 @@ import * as i2 from "./svg-icon.module";
38
39
  */
39
40
  export declare class IconsModule {
40
41
  static ɵfac: i0.ɵɵFactoryDeclaration<IconsModule, never>;
41
- static ɵmod: i0.ɵɵNgModuleDeclaration<IconsModule, never, never, [typeof i1.IconModule, typeof i2.SVGIconModule]>;
42
+ static ɵmod: i0.ɵɵNgModuleDeclaration<IconsModule, [typeof i1.IconWrapperComponent], [typeof i2.IconModule, typeof i3.SVGIconModule], [typeof i2.IconModule, typeof i3.SVGIconModule, typeof i1.IconWrapperComponent]>;
42
43
  static ɵinj: i0.ɵɵInjectorDeclaration<IconsModule>;
43
44
  }
@@ -1,10 +1,15 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  export { IconComponent } from './icon/icon.component';
6
6
  export { SVGIconComponent } from './svg-icon/svg-icon.component';
7
+ export { IconWrapperComponent } from './icon-wrapper/icon-wrapper.component';
7
8
  export { IconModule } from './icon.module';
8
9
  export { SVGIconModule } from './svg-icon.module';
9
10
  export { IconsModule } from './icons.module';
10
- export { IconFlip, IconSize, IconThemeColor } from './common/models';
11
+ export { IconFlip, IconSize, IconThemeColor, IconType, IconSettings } from './common/models';
12
+ export { IconsService } from './common/icons.service';
13
+ export { IconSettingsService } from './common/icon-settings.service';
14
+ export { ICON_SETTINGS } from './common/icon-settings';
15
+ export { SVGIcon } from '@progress/kendo-svg-icons';
@@ -1,5 +1,5 @@
1
1
  /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { PackageMetadata } from '@progress/kendo-licensing';