@progress/kendo-angular-icons 2.0.3 → 11.0.0-develop.80
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/NOTICE.txt +3 -3
- 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 +105 -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} +11 -7
- package/{esm2015/svg-icon.module.js → esm2020/svg-icon.module.mjs} +5 -5
- package/fesm2015/progress-kendo-angular-icons.mjs +619 -0
- package/{fesm2015/kendo-angular-icons.js → fesm2020/progress-kendo-angular-icons.mjs} +283 -55
- package/icon/icon.component.d.ts +1 -1
- package/icon-wrapper/icon-wrapper.component.d.ts +43 -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 © 2022 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: 1672394341,
|
|
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,11 +180,14 @@ 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;
|
|
@@ -209,12 +215,12 @@ class SVGIconComponent extends IconBaseDirective {
|
|
|
209
215
|
}
|
|
210
216
|
}
|
|
211
217
|
}
|
|
212
|
-
SVGIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
213
|
-
SVGIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
218
|
+
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 });
|
|
219
|
+
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
220
|
<svg *ngIf="visible" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
215
221
|
[attr.viewBox]="icon.viewBox" [innerHTML]="content">
|
|
216
|
-
</svg>`, isInline: true, directives: [{ type:
|
|
217
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
222
|
+
</svg>`, isInline: true, directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
223
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SVGIconComponent, decorators: [{
|
|
218
224
|
type: Component,
|
|
219
225
|
args: [{
|
|
220
226
|
exportAs: 'kendoSVGIcon',
|
|
@@ -231,11 +237,216 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
231
237
|
type: Input
|
|
232
238
|
}] } });
|
|
233
239
|
|
|
234
|
-
|
|
240
|
+
/**
|
|
241
|
+
* @hidden
|
|
242
|
+
*/
|
|
243
|
+
const isPresent = (value) => value !== null && value !== undefined;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* A service that returns the current icon settings to be used in subscribers.
|
|
247
|
+
* Use the public `notify` method to change the icon settings dynamically.
|
|
248
|
+
*/
|
|
249
|
+
class IconSettingsService {
|
|
250
|
+
constructor() {
|
|
251
|
+
/**
|
|
252
|
+
* @hidden
|
|
253
|
+
*/
|
|
254
|
+
this.changes = new Subject();
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Notifies subscribers that the icon settings were changed.
|
|
258
|
+
*
|
|
259
|
+
* @param iconSettings - (Optional) A new value for the [icon settings token]({% slug api_icons_icon_settings %}).
|
|
260
|
+
*/
|
|
261
|
+
notify(iconSettings) {
|
|
262
|
+
this.changes.next(iconSettings);
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Returns the [`SVGIcon`](slug:api_icons_svgicon) object for the provided key.
|
|
266
|
+
* Override in a custom service to provide custom SVG icons.
|
|
267
|
+
*
|
|
268
|
+
* @hidden
|
|
269
|
+
*/
|
|
270
|
+
getSvgIcon(_name) {
|
|
271
|
+
return null;
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Returns the list of classes to be rendered on the host `SPAN` element of custom font icons.
|
|
275
|
+
* Override in a custom service to provide classes for custom font icons.
|
|
276
|
+
*
|
|
277
|
+
* @hidden
|
|
278
|
+
*/
|
|
279
|
+
getCustomFontIconClass(_key) {
|
|
280
|
+
return null;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
IconSettingsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconSettingsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
284
|
+
IconSettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconSettingsService });
|
|
285
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconSettingsService, decorators: [{
|
|
286
|
+
type: Injectable
|
|
287
|
+
}] });
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* A token that specifies the icons [settings ('size', 'themeColor', 'flip')](appearance_svgicon) of Kendo UI for Angular components.
|
|
291
|
+
*/
|
|
292
|
+
const ICON_SETTINGS = new InjectionToken('Kendo UI Icon-Settings token');
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* @hidden
|
|
296
|
+
*/
|
|
297
|
+
class IconsService {
|
|
298
|
+
constructor(_iconSettings, iconSettingsService) {
|
|
299
|
+
this._iconSettings = _iconSettings;
|
|
300
|
+
this.iconSettingsService = iconSettingsService;
|
|
301
|
+
/**
|
|
302
|
+
* Notifies subscribers of the initial icon settings, and upon each call to `notify`.
|
|
303
|
+
*/
|
|
304
|
+
this.changes = new BehaviorSubject(this.iconSettings || { type: 'font' });
|
|
305
|
+
this.subs = new Subscription();
|
|
306
|
+
if (iconSettingsService) {
|
|
307
|
+
this.subs.add(iconSettingsService.changes
|
|
308
|
+
.pipe(map(iconSettings => isPresent(iconSettings) ? iconSettings : this._iconSettings), tap(iconSettings => this._iconSettings = iconSettings))
|
|
309
|
+
.subscribe(iconSettings => this.changes.next(iconSettings)));
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* @hidden
|
|
314
|
+
*/
|
|
315
|
+
get iconSettings() {
|
|
316
|
+
return this._iconSettings;
|
|
317
|
+
}
|
|
318
|
+
ngOnDestroy() {
|
|
319
|
+
this.subs.unsubscribe();
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Returns the [`SVGIcon`](slug:api_icons_svgicon) object for the provided key.
|
|
323
|
+
* Override in a custom service to provide custom SVG icons.
|
|
324
|
+
*/
|
|
325
|
+
getSvgIcon(name) {
|
|
326
|
+
const customIcon = this.iconSettingsService && this.iconSettingsService.getSvgIcon(name);
|
|
327
|
+
return customIcon;
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Returns the list of classes to be rendered on the host `SPAN` element of custom font icons.
|
|
331
|
+
* Override in a custom service to provide classes for custom font icons.
|
|
332
|
+
*/
|
|
333
|
+
getCustomFontIconClass(key) {
|
|
334
|
+
const customClass = this.iconSettingsService && this.iconSettingsService.getCustomFontIconClass(key);
|
|
335
|
+
return customClass;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
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 });
|
|
339
|
+
IconsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconsService });
|
|
340
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconsService, decorators: [{
|
|
341
|
+
type: Injectable
|
|
342
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
343
|
+
type: Optional
|
|
344
|
+
}, {
|
|
345
|
+
type: Inject,
|
|
346
|
+
args: [ICON_SETTINGS]
|
|
347
|
+
}] }, { type: IconSettingsService, decorators: [{
|
|
348
|
+
type: Optional
|
|
349
|
+
}] }]; } });
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* @hidden
|
|
353
|
+
*/
|
|
354
|
+
class IconWrapperComponent {
|
|
355
|
+
constructor(iconsService) {
|
|
356
|
+
this.iconsService = iconsService;
|
|
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" }, 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: { name: [{
|
|
436
|
+
type: Input
|
|
437
|
+
}], svgIcon: [{
|
|
438
|
+
type: Input
|
|
439
|
+
}], innerCssClass: [{
|
|
440
|
+
type: Input
|
|
441
|
+
}], customFontClass: [{
|
|
442
|
+
type: Input
|
|
443
|
+
}] } });
|
|
444
|
+
|
|
445
|
+
const exportedModules$2 = [
|
|
235
446
|
IconComponent
|
|
236
447
|
];
|
|
237
|
-
const declarations$
|
|
238
|
-
...exportedModules$
|
|
448
|
+
const declarations$2 = [
|
|
449
|
+
...exportedModules$2
|
|
239
450
|
];
|
|
240
451
|
/**
|
|
241
452
|
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
|
|
@@ -270,23 +481,23 @@ const declarations$1 = [
|
|
|
270
481
|
*/
|
|
271
482
|
class IconModule {
|
|
272
483
|
}
|
|
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: "
|
|
484
|
+
IconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
485
|
+
IconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconModule, declarations: [IconComponent], imports: [CommonModule], exports: [IconComponent, CommonModule] });
|
|
486
|
+
IconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconModule, imports: [[CommonModule], CommonModule] });
|
|
487
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconModule, decorators: [{
|
|
277
488
|
type: NgModule,
|
|
278
489
|
args: [{
|
|
279
|
-
declarations: [declarations$
|
|
280
|
-
exports: [exportedModules$
|
|
490
|
+
declarations: [declarations$2],
|
|
491
|
+
exports: [exportedModules$2, CommonModule],
|
|
281
492
|
imports: [CommonModule]
|
|
282
493
|
}]
|
|
283
494
|
}] });
|
|
284
495
|
|
|
285
|
-
const exportedModules = [
|
|
496
|
+
const exportedModules$1 = [
|
|
286
497
|
SVGIconComponent
|
|
287
498
|
];
|
|
288
|
-
const declarations = [
|
|
289
|
-
...exportedModules
|
|
499
|
+
const declarations$1 = [
|
|
500
|
+
...exportedModules$1
|
|
290
501
|
];
|
|
291
502
|
/**
|
|
292
503
|
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
|
|
@@ -321,18 +532,24 @@ const declarations = [
|
|
|
321
532
|
*/
|
|
322
533
|
class SVGIconModule {
|
|
323
534
|
}
|
|
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: "
|
|
535
|
+
SVGIconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SVGIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
536
|
+
SVGIconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SVGIconModule, declarations: [SVGIconComponent], imports: [CommonModule], exports: [SVGIconComponent] });
|
|
537
|
+
SVGIconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SVGIconModule, imports: [[CommonModule]] });
|
|
538
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SVGIconModule, decorators: [{
|
|
328
539
|
type: NgModule,
|
|
329
540
|
args: [{
|
|
330
|
-
declarations: [declarations],
|
|
331
|
-
exports: [exportedModules],
|
|
541
|
+
declarations: [declarations$1],
|
|
542
|
+
exports: [exportedModules$1],
|
|
332
543
|
imports: [CommonModule]
|
|
333
544
|
}]
|
|
334
545
|
}] });
|
|
335
546
|
|
|
547
|
+
const exportedModules = [
|
|
548
|
+
IconWrapperComponent
|
|
549
|
+
];
|
|
550
|
+
const declarations = [
|
|
551
|
+
...exportedModules
|
|
552
|
+
];
|
|
336
553
|
/**
|
|
337
554
|
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
|
|
338
555
|
* definition for the Icons components.
|
|
@@ -366,18 +583,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
366
583
|
*/
|
|
367
584
|
class IconsModule {
|
|
368
585
|
}
|
|
369
|
-
IconsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
370
|
-
IconsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
371
|
-
SVGIconModule]
|
|
372
|
-
|
|
586
|
+
IconsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
587
|
+
IconsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconsModule, declarations: [IconWrapperComponent], imports: [IconModule,
|
|
588
|
+
SVGIconModule], exports: [IconModule,
|
|
589
|
+
SVGIconModule, IconWrapperComponent] });
|
|
590
|
+
IconsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconsModule, providers: [IconsService], imports: [[
|
|
591
|
+
IconModule,
|
|
592
|
+
SVGIconModule
|
|
593
|
+
], IconModule,
|
|
373
594
|
SVGIconModule] });
|
|
374
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
595
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: IconsModule, decorators: [{
|
|
375
596
|
type: NgModule,
|
|
376
597
|
args: [{
|
|
377
|
-
|
|
598
|
+
declarations,
|
|
599
|
+
imports: [
|
|
378
600
|
IconModule,
|
|
379
601
|
SVGIconModule
|
|
380
|
-
]
|
|
602
|
+
],
|
|
603
|
+
exports: [
|
|
604
|
+
IconModule,
|
|
605
|
+
SVGIconModule,
|
|
606
|
+
exportedModules
|
|
607
|
+
],
|
|
608
|
+
providers: [IconsService]
|
|
381
609
|
}]
|
|
382
610
|
}] });
|
|
383
611
|
|
|
@@ -385,5 +613,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
385
613
|
* Generated bundle index. Do not edit.
|
|
386
614
|
*/
|
|
387
615
|
|
|
388
|
-
export { IconComponent, IconModule, IconsModule, SVGIconComponent, SVGIconModule };
|
|
616
|
+
export { ICON_SETTINGS, IconComponent, IconModule, IconSettingsService, IconWrapperComponent, IconsModule, IconsService, SVGIconComponent, SVGIconModule };
|
|
389
617
|
|
package/icon/icon.component.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2022 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,43 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2022 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
|
+
/**
|
|
16
|
+
* Defines the name for an existing font icon in a Kendo UI theme, which will be rendered.
|
|
17
|
+
* All [Kendo UI Icons]({% slug icons %}#toc-list-of-font-icons) are supported.
|
|
18
|
+
*/
|
|
19
|
+
name: string;
|
|
20
|
+
/**
|
|
21
|
+
* Defines a [SVGIcon](slug:api_icons_svgicon) to be rendered.
|
|
22
|
+
*/
|
|
23
|
+
svgIcon: SVGIcon;
|
|
24
|
+
/**
|
|
25
|
+
* Provided by consuming components in case an additional k-specific class needs to be rendered
|
|
26
|
+
* on the internal Icon component.
|
|
27
|
+
*/
|
|
28
|
+
innerCssClass: string;
|
|
29
|
+
/**
|
|
30
|
+
* Provided by consuming components in case a custom font icon class is set
|
|
31
|
+
* by the developer using the consuming component through its API.
|
|
32
|
+
*/
|
|
33
|
+
customFontClass: string;
|
|
34
|
+
get customClasses(): string;
|
|
35
|
+
iconSettings: IconSettings;
|
|
36
|
+
get getSvgIcon(): SVGIcon;
|
|
37
|
+
get customFontIconClass(): string;
|
|
38
|
+
private subs;
|
|
39
|
+
constructor(iconsService: IconsService);
|
|
40
|
+
ngOnDestroy(): void;
|
|
41
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IconWrapperComponent, never>;
|
|
42
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IconWrapperComponent, "kendo-icon-wrapper", ["kendoIconWrapper"], { "name": "name"; "svgIcon": "svgIcon"; "innerCssClass": "innerCssClass"; "customFontClass": "customFontClass"; }, {}, never, never>;
|
|
43
|
+
}
|
package/icon.module.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2022 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 © 2022 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 © 2022 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 © 2022 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';
|