@progress/kendo-angular-icons 2.0.3-dev.202211170752 → 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.
- package/LICENSE.md +1 -1
- package/NOTICE.txt +4 -4
- package/README.md +1 -1
- package/common/icon-base.d.ts +1 -1
- package/common/icon-settings.d.ts +10 -0
- package/common/icon-settings.service.d.ts +40 -0
- package/common/icons.service.d.ts +40 -0
- package/common/models/flip.d.ts +1 -1
- package/common/models/icon-settings.d.ts +14 -0
- package/common/models/icon-type.d.ts +5 -0
- package/common/models/index.d.ts +3 -1
- package/common/models/size.d.ts +1 -1
- package/common/models/theme-color.d.ts +1 -1
- package/common/util.d.ts +8 -0
- package/{esm2015/common/icon-base.js → esm2020/common/icon-base.mjs} +11 -10
- package/esm2020/common/icon-settings.mjs +9 -0
- package/esm2020/common/icon-settings.service.mjs +50 -0
- package/esm2020/common/icons.service.mjs +68 -0
- package/{esm2015/common/models/size.js → esm2020/common/models/flip.mjs} +1 -1
- package/{esm2015/common/models/theme-color.js → esm2020/common/models/icon-settings.mjs} +1 -1
- package/{esm2015/common/models/flip.js → esm2020/common/models/icon-type.mjs} +1 -1
- package/esm2020/common/models/index.mjs +6 -0
- package/{esm2015/common/models/index.js → esm2020/common/models/size.mjs} +1 -1
- package/esm2020/common/models/theme-color.mjs +5 -0
- package/esm2020/common/util.mjs +8 -0
- package/{esm2015/icon/icon.component.js → esm2020/icon/icon.component.mjs} +12 -11
- package/esm2020/icon-wrapper/icon-wrapper.component.mjs +109 -0
- package/{esm2015/icon.module.js → esm2020/icon.module.mjs} +6 -6
- package/{esm2015/icons.module.js → esm2020/icons.module.mjs} +27 -8
- package/{esm2015/main.js → esm2020/index.mjs} +5 -1
- package/{esm2015/package-metadata.js → esm2020/package-metadata.mjs} +3 -3
- package/{esm2015/kendo-angular-icons.js → esm2020/progress-kendo-angular-icons.mjs} +2 -2
- package/{esm2015/svg-icon/svg-icon.component.js → esm2020/svg-icon/svg-icon.component.mjs} +12 -9
- package/{esm2015/svg-icon.module.js → esm2020/svg-icon.module.mjs} +5 -5
- package/fesm2015/progress-kendo-angular-icons.mjs +622 -0
- package/{fesm2015/kendo-angular-icons.js → fesm2020/progress-kendo-angular-icons.mjs} +288 -57
- package/icon/icon.component.d.ts +1 -1
- package/icon-wrapper/icon-wrapper.component.d.ts +44 -0
- package/icon.module.d.ts +2 -2
- package/icons.module.d.ts +5 -4
- package/{main.d.ts → index.d.ts} +7 -2
- package/package-metadata.d.ts +1 -1
- package/package.json +27 -54
- package/{kendo-angular-icons.d.ts → progress-kendo-angular-icons.d.ts} +2 -2
- package/schematics/ngAdd/index.js +1 -5
- package/svg-icon/svg-icon.component.d.ts +1 -1
- package/svg-icon.module.d.ts +1 -1
- package/bundles/kendo-angular-icons.umd.js +0 -5
- package/schematics/ngAdd/index.js.map +0 -1
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
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
|
|
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:
|
|
22
|
+
publishDate: 1673469086,
|
|
21
23
|
version: '',
|
|
22
|
-
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license
|
|
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.
|
|
91
|
-
|
|
92
|
-
|
|
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: "
|
|
102
|
-
IconBaseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
103
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
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
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
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: "
|
|
149
|
-
IconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
150
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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: "
|
|
213
|
-
SVGIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
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:
|
|
217
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
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
|
-
|
|
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$
|
|
238
|
-
...exportedModules$
|
|
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: "
|
|
274
|
-
IconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
275
|
-
IconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
276
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
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$
|
|
280
|
-
exports: [exportedModules$
|
|
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: "
|
|
325
|
-
SVGIconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
326
|
-
SVGIconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
327
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
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: "
|
|
370
|
-
IconsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
371
|
-
SVGIconModule]
|
|
372
|
-
|
|
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: "
|
|
598
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconsModule, decorators: [{
|
|
375
599
|
type: NgModule,
|
|
376
600
|
args: [{
|
|
377
|
-
|
|
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
|
|
package/icon/icon.component.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
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 ©
|
|
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 ©
|
|
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.
|
|
7
|
-
import * as i2 from "./
|
|
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,
|
|
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
|
}
|
package/{main.d.ts → index.d.ts}
RENAMED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
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';
|
package/package-metadata.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
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';
|