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

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
package/LICENSE.md CHANGED
@@ -8,4 +8,4 @@ This is commercial software. To use it, you need to agree to the [**Telerik End
8
8
 
9
9
  All available Kendo UI commercial licenses may be obtained at http://www.telerik.com/purchase/kendo-ui.
10
10
 
11
- *Copyright © 2022 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.*
11
+ *Copyright © 2023 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.*
package/NOTICE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Progress Kendo UI for Angular 2022
1
+ Progress Kendo UI for Angular 2023
2
2
 
3
3
  Copyright (c) 2016-2022 Progress Software Corporation and/or one of its
4
4
  subsidiaries or affiliates. All rights reserved.
@@ -37,7 +37,7 @@ DefinitelyTyped.org | @types/prosemirror-view | 1.11.4 - Open Source | MIT-style
37
37
  Isaac Z. Schlueter | glob | 7.1.3 - Open Source | ISC-style License
38
38
  Jorik Tangelder (Eight Media) | HammerJS | 2.0.8 - Open Source | MIT-style License
39
39
  Matt Mueller | cheerio | 0.22 - Open Source | MIT-style License
40
- Progress Software Corporation | Kendo UI Licensing CLI | 1.1 - Proprietary |
40
+ Progress Software Corporation | Kendo UI Licensing CLI | 1.1 - Proprietary |
41
41
  Progress Software Corporation | jszip-esm | 1.0.0 - Open Source | MIT-style License
42
42
  Progress Software Corporation | pako-esm | 1.0.0 - Open Source | MIT-style License
43
43
  ProseMirror | prosemiror-inputrules | 1.0.1 - Open Source | MIT-style License
@@ -433,7 +433,7 @@ subject to the following terms and conditions:
433
433
  @types/prosemirror-inputrules v1*, @types/prosemirror-keymap v1*, @types/prosemirror-model v1*,
434
434
  @types/prosemirror-schema-list v1*, @types/prosemirror-state v1*, @types/prosemirror-tables v0.9*,
435
435
  @types/prosemirror-transform v1*, and @types/prosemirror-view v1*. Such technologies are
436
- subject to the following terms and conditions:
436
+ subject to the following terms and conditions:
437
437
 
438
438
  This project is licensed under the MIT license.
439
439
  Copyrights are respective of each contributor listed at the beginning of each
@@ -640,7 +640,7 @@ Such technology is subject to the following terms and conditions:
640
640
  2. Special Notices Regarding Commercially Licensed Third-Party Components
641
641
  incorporated into the Product: NONE
642
642
 
643
- 3. Special Notices Regarding Progress Products incorporated into the Product:
643
+ 3. Special Notices Regarding Progress Products incorporated into the Product:
644
644
 
645
645
  (a) Progress Kendo UI for Angular 2022 incorporates Kendo UI Licensing CLI v1.1
646
646
  from Progress Software Corporation. See NOTICE.txt text file within product for
package/README.md CHANGED
@@ -28,6 +28,6 @@ Kendo UI for Angular is a commercial UI library designed and built for developin
28
28
  * [Feedback Portal](https://feedback.telerik.com/kendo-angular-ui)
29
29
  * [StackOverflow](https://stackoverflow.com/questions/tagged/kendo-ui-angular2)
30
30
 
31
- *Copyright © 2022 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.*
31
+ *Copyright © 2023 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.*
32
32
 
33
33
  *Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries.*
@@ -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,10 @@
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 { InjectionToken } from '@angular/core';
6
+ import { IconSettings } from './models';
7
+ /**
8
+ * A token that specifies the icons [settings ('size', 'themeColor', 'flip')](appearance_svgicon) of Kendo UI for Angular components.
9
+ */
10
+ export declare const ICON_SETTINGS: InjectionToken<IconSettings>;
@@ -0,0 +1,40 @@
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 { Subject } from 'rxjs';
6
+ import { IconSettings } from './models';
7
+ import { SVGIcon } from '@progress/kendo-svg-icons';
8
+ import * as i0 from "@angular/core";
9
+ /**
10
+ * A service that returns the current icon settings to be used in subscribers.
11
+ * Use the public `notify` method to change the icon settings dynamically.
12
+ */
13
+ export declare class IconSettingsService {
14
+ /**
15
+ * @hidden
16
+ */
17
+ readonly changes: Subject<IconSettings>;
18
+ /**
19
+ * Notifies subscribers that the icon settings were changed.
20
+ *
21
+ * @param iconSettings - (Optional) A new value for the [icon settings token]({% slug api_icons_icon_settings %}).
22
+ */
23
+ notify(iconSettings?: IconSettings): void;
24
+ /**
25
+ * Returns the [`SVGIcon`](slug:api_icons_svgicon) object for the provided key.
26
+ * Override in a custom service to provide custom SVG icons.
27
+ *
28
+ * @hidden
29
+ */
30
+ getSvgIcon(_name: string): SVGIcon;
31
+ /**
32
+ * Returns the list of classes to be rendered on the host `SPAN` element of custom font icons.
33
+ * Override in a custom service to provide classes for custom font icons.
34
+ *
35
+ * @hidden
36
+ */
37
+ getCustomFontIconClass(_key: string): string;
38
+ static ɵfac: i0.ɵɵFactoryDeclaration<IconSettingsService, never>;
39
+ static ɵprov: i0.ɵɵInjectableDeclaration<IconSettingsService>;
40
+ }
@@ -0,0 +1,40 @@
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 { Subject } from 'rxjs';
7
+ import { IconSettings } from './models';
8
+ import { IconSettingsService } from './icon-settings.service';
9
+ import { SVGIcon } from '@progress/kendo-svg-icons';
10
+ import * as i0 from "@angular/core";
11
+ /**
12
+ * @hidden
13
+ */
14
+ export declare class IconsService implements OnDestroy {
15
+ private _iconSettings;
16
+ private iconSettingsService;
17
+ /**
18
+ * Notifies subscribers of the initial icon settings, and upon each call to `notify`.
19
+ */
20
+ readonly changes: Subject<IconSettings>;
21
+ private subs;
22
+ constructor(_iconSettings: IconSettings, iconSettingsService: IconSettingsService);
23
+ /**
24
+ * @hidden
25
+ */
26
+ get iconSettings(): IconSettings;
27
+ ngOnDestroy(): void;
28
+ /**
29
+ * Returns the [`SVGIcon`](slug:api_icons_svgicon) object for the provided key.
30
+ * Override in a custom service to provide custom SVG icons.
31
+ */
32
+ getSvgIcon(name: string): SVGIcon;
33
+ /**
34
+ * Returns the list of classes to be rendered on the host `SPAN` element of custom font icons.
35
+ * Override in a custom service to provide classes for custom font icons.
36
+ */
37
+ getCustomFontIconClass(key: string): string;
38
+ static ɵfac: i0.ɵɵFactoryDeclaration<IconsService, [{ optional: true; }, { optional: true; }]>;
39
+ static ɵprov: i0.ɵɵInjectableDeclaration<IconsService>;
40
+ }
@@ -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
  /**
@@ -0,0 +1,14 @@
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 { IconFlip } from "./flip";
6
+ import { IconType } from "./icon-type";
7
+ import { IconSize } from "./size";
8
+ import { IconThemeColor } from "./theme-color";
9
+ export interface IconSettings {
10
+ type?: IconType;
11
+ themeColor?: IconThemeColor;
12
+ size?: IconSize;
13
+ flip?: IconFlip;
14
+ }
@@ -0,0 +1,5 @@
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
+ export declare type IconType = 'font' | 'svg';
@@ -1,7 +1,9 @@
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 { IconFlip } from './flip';
6
6
  export { IconSize } from './size';
7
7
  export { IconThemeColor } from './theme-color';
8
+ export * from './icon-type';
9
+ export * from './icon-settings';
@@ -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
  /**
@@ -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
  /**
@@ -0,0 +1,8 @@
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
+ /**
6
+ * @hidden
7
+ */
8
+ export declare const isPresent: Function;
@@ -1,8 +1,8 @@
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
- import { Input, HostBinding, Directive } from '@angular/core';
5
+ import { ElementRef, Input, Renderer2, HostBinding, Directive } from '@angular/core';
6
6
  import { validatePackage } from '@progress/kendo-licensing';
7
7
  import { packageMetadata } from '../package-metadata';
8
8
  import * as i0 from "@angular/core";
@@ -70,21 +70,22 @@ export class IconBaseDirective {
70
70
  *
71
71
  */
72
72
  set size(size) {
73
+ const currentClass = sizeClasses[this.size];
74
+ const newClass = sizeClasses[size];
73
75
  const element = this.element.nativeElement;
74
- this._size = size;
75
- const sizeClass = sizeClasses[this.size];
76
- this.renderer.removeClass(element, sizeClass);
77
- if (size !== 'default') {
78
- this.renderer.addClass(element, sizeClass);
76
+ this.renderer.removeClass(element, currentClass);
77
+ if (size && size !== 'default') {
78
+ this.renderer.addClass(element, newClass);
79
79
  }
80
+ this._size = size;
80
81
  }
81
82
  get size() {
82
83
  return this._size;
83
84
  }
84
85
  }
85
- 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 });
86
- 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 });
87
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IconBaseDirective, decorators: [{
86
+ 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 });
87
+ 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 });
88
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconBaseDirective, decorators: [{
88
89
  type: Directive,
89
90
  args: [{
90
91
  selector: '[kendoIconBase]'
@@ -0,0 +1,9 @@
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 { InjectionToken } from '@angular/core';
6
+ /**
7
+ * A token that specifies the icons [settings ('size', 'themeColor', 'flip')](appearance_svgicon) of Kendo UI for Angular components.
8
+ */
9
+ export const ICON_SETTINGS = new InjectionToken('Kendo UI Icon-Settings token');
@@ -0,0 +1,50 @@
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 { Injectable } from '@angular/core';
6
+ import { Subject } from 'rxjs';
7
+ import * as i0 from "@angular/core";
8
+ /**
9
+ * A service that returns the current icon settings to be used in subscribers.
10
+ * Use the public `notify` method to change the icon settings dynamically.
11
+ */
12
+ export class IconSettingsService {
13
+ constructor() {
14
+ /**
15
+ * @hidden
16
+ */
17
+ this.changes = new Subject();
18
+ }
19
+ /**
20
+ * Notifies subscribers that the icon settings were changed.
21
+ *
22
+ * @param iconSettings - (Optional) A new value for the [icon settings token]({% slug api_icons_icon_settings %}).
23
+ */
24
+ notify(iconSettings) {
25
+ this.changes.next(iconSettings);
26
+ }
27
+ /**
28
+ * Returns the [`SVGIcon`](slug:api_icons_svgicon) object for the provided key.
29
+ * Override in a custom service to provide custom SVG icons.
30
+ *
31
+ * @hidden
32
+ */
33
+ getSvgIcon(_name) {
34
+ return null;
35
+ }
36
+ /**
37
+ * Returns the list of classes to be rendered on the host `SPAN` element of custom font icons.
38
+ * Override in a custom service to provide classes for custom font icons.
39
+ *
40
+ * @hidden
41
+ */
42
+ getCustomFontIconClass(_key) {
43
+ return null;
44
+ }
45
+ }
46
+ IconSettingsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconSettingsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
47
+ IconSettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconSettingsService });
48
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconSettingsService, decorators: [{
49
+ type: Injectable
50
+ }] });
@@ -0,0 +1,68 @@
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 { Inject, Injectable, Optional } from '@angular/core';
6
+ import { BehaviorSubject, Subscription } from 'rxjs';
7
+ import { map, tap } from 'rxjs/operators';
8
+ import { isPresent } from './../common/util';
9
+ import { IconSettingsService } from './icon-settings.service';
10
+ import { ICON_SETTINGS } from './icon-settings';
11
+ import * as i0 from "@angular/core";
12
+ import * as i1 from "./icon-settings.service";
13
+ /**
14
+ * @hidden
15
+ */
16
+ export class IconsService {
17
+ constructor(_iconSettings, iconSettingsService) {
18
+ this._iconSettings = _iconSettings;
19
+ this.iconSettingsService = iconSettingsService;
20
+ /**
21
+ * Notifies subscribers of the initial icon settings, and upon each call to `notify`.
22
+ */
23
+ this.changes = new BehaviorSubject(this.iconSettings || { type: 'font' });
24
+ this.subs = new Subscription();
25
+ if (iconSettingsService) {
26
+ this.subs.add(iconSettingsService.changes
27
+ .pipe(map(iconSettings => isPresent(iconSettings) ? iconSettings : this._iconSettings), tap(iconSettings => this._iconSettings = iconSettings))
28
+ .subscribe(iconSettings => this.changes.next(iconSettings)));
29
+ }
30
+ }
31
+ /**
32
+ * @hidden
33
+ */
34
+ get iconSettings() {
35
+ return this._iconSettings;
36
+ }
37
+ ngOnDestroy() {
38
+ this.subs.unsubscribe();
39
+ }
40
+ /**
41
+ * Returns the [`SVGIcon`](slug:api_icons_svgicon) object for the provided key.
42
+ * Override in a custom service to provide custom SVG icons.
43
+ */
44
+ getSvgIcon(name) {
45
+ const customIcon = this.iconSettingsService && this.iconSettingsService.getSvgIcon(name);
46
+ return customIcon;
47
+ }
48
+ /**
49
+ * Returns the list of classes to be rendered on the host `SPAN` element of custom font icons.
50
+ * Override in a custom service to provide classes for custom font icons.
51
+ */
52
+ getCustomFontIconClass(key) {
53
+ const customClass = this.iconSettingsService && this.iconSettingsService.getCustomFontIconClass(key);
54
+ return customClass;
55
+ }
56
+ }
57
+ IconsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconsService, deps: [{ token: ICON_SETTINGS, optional: true }, { token: i1.IconSettingsService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
58
+ IconsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconsService });
59
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconsService, decorators: [{
60
+ type: Injectable
61
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
62
+ type: Optional
63
+ }, {
64
+ type: Inject,
65
+ args: [ICON_SETTINGS]
66
+ }] }, { type: i1.IconSettingsService, decorators: [{
67
+ type: Optional
68
+ }] }]; } });
@@ -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
  export {};
@@ -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
  export {};
@@ -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
  export {};
@@ -0,0 +1,6 @@
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
+ export * from './icon-type';
6
+ export * from './icon-settings';
@@ -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
  export {};
@@ -0,0 +1,5 @@
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
+ export {};
@@ -0,0 +1,8 @@
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
+ /**
6
+ * @hidden
7
+ */
8
+ export const isPresent = (value) => value !== null && value !== undefined;
@@ -1,8 +1,9 @@
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
- import { Component, Input, HostBinding } from '@angular/core';
5
+ import { Component, ElementRef, Input, Renderer2, HostBinding } from '@angular/core';
6
+ import { isDocumentAvailable } from '@progress/kendo-angular-common';
6
7
  import { IconBaseDirective } from '../common/icon-base';
7
8
  import * as i0 from "@angular/core";
8
9
  /**
@@ -20,25 +21,25 @@ export class IconComponent extends IconBaseDirective {
20
21
  * All [Kendo UI Icons]({% slug icons %}#toc-list-of-font-icons) are supported.
21
22
  */
22
23
  set name(name) {
23
- const element = this.element.nativeElement;
24
- this.renderer.removeClass(element, `k-i-${this.name}`);
25
- this._name = name;
26
- if (name) {
27
- this.renderer.addClass(element, `k-i-${this.name}`);
24
+ if (isDocumentAvailable()) {
25
+ const element = this.element.nativeElement;
26
+ this.renderer.removeClass(element, `k-i-${this.name}`);
27
+ this.renderer.addClass(element, `k-i-${name}`);
28
28
  }
29
+ this._name = name;
29
30
  }
30
31
  get name() {
31
32
  return this._name;
32
33
  }
33
34
  }
34
- 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 });
35
- 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 });
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: IconComponent, decorators: [{
35
+ 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 });
36
+ 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 });
37
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconComponent, decorators: [{
37
38
  type: Component,
38
39
  args: [{
39
40
  exportAs: 'kendoIcon',
40
41
  selector: 'kendo-icon',
41
- template: ``
42
+ template: ''
42
43
  }]
43
44
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { hostClass: [{
44
45
  type: HostBinding,
@@ -0,0 +1,109 @@
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 { Component, HostBinding, Input } from '@angular/core';
6
+ import { Subscription } from 'rxjs';
7
+ import { IconsService } from '../common/icons.service';
8
+ import * as i0 from "@angular/core";
9
+ import * as i1 from "../common/icons.service";
10
+ import * as i2 from "../svg-icon/svg-icon.component";
11
+ import * as i3 from "../icon/icon.component";
12
+ import * as i4 from "@angular/common";
13
+ /**
14
+ * @hidden
15
+ */
16
+ export class IconWrapperComponent {
17
+ constructor(iconsService) {
18
+ this.iconsService = iconsService;
19
+ this.hostClass = true;
20
+ /**
21
+ * Provided by consuming components in case an additional k-specific class needs to be rendered
22
+ * on the internal Icon component.
23
+ */
24
+ this.innerCssClass = '';
25
+ /**
26
+ * Provided by consuming components in case a custom font icon class is set
27
+ * by the developer using the consuming component through its API.
28
+ */
29
+ this.customFontClass = '';
30
+ this.subs = new Subscription();
31
+ this.subs = iconsService.changes.subscribe(iconSettings => {
32
+ this.iconSettings = iconSettings;
33
+ });
34
+ }
35
+ get customClasses() {
36
+ const classes = [this.customFontClass, this.innerCssClass].filter(cl => !!cl).join(' ');
37
+ return classes;
38
+ }
39
+ get getSvgIcon() {
40
+ return this.iconsService.getSvgIcon(this.name) || this.svgIcon;
41
+ }
42
+ get customFontIconClass() {
43
+ return this.iconsService.getCustomFontIconClass(this.name) || this.customFontClass;
44
+ }
45
+ ngOnDestroy() {
46
+ this.subs.unsubscribe();
47
+ }
48
+ }
49
+ IconWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconWrapperComponent, deps: [{ token: i1.IconsService }], target: i0.ɵɵFactoryTarget.Component });
50
+ 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: `
51
+ <kendo-svg-icon
52
+ *ngIf="iconSettings?.type === 'svg'; else font"
53
+ [ngClass]="innerCssClass"
54
+ [icon]="getSvgIcon"
55
+ [size]="iconSettings?.size"
56
+ [themeColor]="iconSettings?.themeColor"
57
+ [flip]="iconSettings?.flip"></kendo-svg-icon>
58
+ <ng-template #font>
59
+ <kendo-icon
60
+ *ngIf="!customFontIconClass; else custom"
61
+ [ngClass]="innerCssClass"
62
+ [name]="name"
63
+ [size]="iconSettings?.size"
64
+ [themeColor]="iconSettings?.themeColor"
65
+ [flip]="iconSettings?.flip"></kendo-icon>
66
+ <ng-template #custom>
67
+ <span [ngClass]="customClasses"></span>
68
+ </ng-template>
69
+ </ng-template>
70
+ `, isInline: true, components: [{ type: i2.SVGIconComponent, selector: "kendo-svg-icon", inputs: ["icon"], exportAs: ["kendoSVGIcon"] }, { type: i3.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"] }] });
71
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconWrapperComponent, decorators: [{
72
+ type: Component,
73
+ args: [{
74
+ exportAs: 'kendoIconWrapper',
75
+ selector: 'kendo-icon-wrapper',
76
+ template: `
77
+ <kendo-svg-icon
78
+ *ngIf="iconSettings?.type === 'svg'; else font"
79
+ [ngClass]="innerCssClass"
80
+ [icon]="getSvgIcon"
81
+ [size]="iconSettings?.size"
82
+ [themeColor]="iconSettings?.themeColor"
83
+ [flip]="iconSettings?.flip"></kendo-svg-icon>
84
+ <ng-template #font>
85
+ <kendo-icon
86
+ *ngIf="!customFontIconClass; else custom"
87
+ [ngClass]="innerCssClass"
88
+ [name]="name"
89
+ [size]="iconSettings?.size"
90
+ [themeColor]="iconSettings?.themeColor"
91
+ [flip]="iconSettings?.flip"></kendo-icon>
92
+ <ng-template #custom>
93
+ <span [ngClass]="customClasses"></span>
94
+ </ng-template>
95
+ </ng-template>
96
+ `
97
+ }]
98
+ }], ctorParameters: function () { return [{ type: i1.IconsService }]; }, propDecorators: { hostClass: [{
99
+ type: HostBinding,
100
+ args: ['class.k-icon-wrapper-host']
101
+ }], name: [{
102
+ type: Input
103
+ }], svgIcon: [{
104
+ type: Input
105
+ }], innerCssClass: [{
106
+ type: Input
107
+ }], customFontClass: [{
108
+ type: Input
109
+ }] } });