@coreui/icons-angular 3.0.0-alpha.0 → 3.0.0-alpha.4
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/README.md +59 -24
- package/{esm2015/coreui-icons-angular.js → esm2020/coreui-icons-angular.mjs} +0 -0
- package/esm2020/lib/icon/icon.component.mjs +110 -0
- package/esm2020/lib/icon/icon.directive.mjs +127 -0
- package/esm2020/lib/icon/icon.interface.mjs +2 -0
- package/esm2020/lib/icon/icon.module.mjs +34 -0
- package/{esm2015/lib/icon-set/icon-set.module.js → esm2020/lib/icon-set/icon-set.module.mjs} +4 -4
- package/esm2020/lib/icon-set/icon-set.service.mjs +37 -0
- package/esm2020/lib/icon-set/index.mjs +2 -0
- package/esm2020/lib/icon-set/public_api.mjs +3 -0
- package/{esm2015/lib/shared/html-attr.directive.js → esm2020/lib/shared/html-attr.directive.mjs} +3 -3
- package/esm2020/public-api.mjs +9 -0
- package/fesm2015/coreui-icons-angular.mjs +402 -0
- package/fesm2015/coreui-icons-angular.mjs.map +1 -0
- package/fesm2020/coreui-icons-angular.mjs +393 -0
- package/fesm2020/coreui-icons-angular.mjs.map +1 -0
- package/lib/icon/icon.component.d.ts +19 -14
- package/lib/icon/icon.directive.d.ts +41 -0
- package/lib/icon/icon.interface.d.ts +15 -0
- package/lib/icon/icon.module.d.ts +3 -2
- package/lib/icon-set/icon-set.service.d.ts +5 -1
- package/lib/icon-set/index.d.ts +1 -0
- package/lib/icon-set/public_api.d.ts +2 -0
- package/package.json +21 -8
- package/public-api.d.ts +1 -0
- package/bundles/coreui-icons-angular.umd.js +0 -328
- package/bundles/coreui-icons-angular.umd.js.map +0 -1
- package/esm2015/lib/icon/icon.component.js +0 -100
- package/esm2015/lib/icon/icon.module.js +0 -29
- package/esm2015/lib/icon-set/icon-set.service.js +0 -30
- package/esm2015/public-api.js +0 -8
- package/fesm2015/coreui-icons-angular.js +0 -249
- package/fesm2015/coreui-icons-angular.js.map +0 -1
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, NgModule, Optional, SkipSelf, Directive, Input, HostBinding, ElementRef, Component, ViewChild } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/platform-browser';
|
|
4
|
+
import * as i3 from '@angular/common';
|
|
5
|
+
import { CommonModule } from '@angular/common';
|
|
6
|
+
|
|
7
|
+
class IconSetService {
|
|
8
|
+
constructor() {
|
|
9
|
+
this._iconNames = {};
|
|
10
|
+
this._icons = {};
|
|
11
|
+
}
|
|
12
|
+
get iconNames() {
|
|
13
|
+
return this._iconNames;
|
|
14
|
+
}
|
|
15
|
+
;
|
|
16
|
+
get icons() {
|
|
17
|
+
return this._icons;
|
|
18
|
+
}
|
|
19
|
+
set icons(iconSet) {
|
|
20
|
+
for (const iconsKey in iconSet) {
|
|
21
|
+
this._iconNames[iconsKey] = iconsKey;
|
|
22
|
+
}
|
|
23
|
+
this._icons = iconSet;
|
|
24
|
+
}
|
|
25
|
+
getIcon(name) {
|
|
26
|
+
const icon = this.icons[name];
|
|
27
|
+
if (!icon) {
|
|
28
|
+
console.warn(`CoreUI WARN: Icon ${name} is not registered in IconService`);
|
|
29
|
+
}
|
|
30
|
+
return this.icons[name];
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
IconSetService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: IconSetService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
34
|
+
IconSetService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: IconSetService, providedIn: 'root' });
|
|
35
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: IconSetService, decorators: [{
|
|
36
|
+
type: Injectable,
|
|
37
|
+
args: [{
|
|
38
|
+
providedIn: 'root'
|
|
39
|
+
}]
|
|
40
|
+
}], ctorParameters: function () { return []; } });
|
|
41
|
+
|
|
42
|
+
class IconSetModule {
|
|
43
|
+
constructor(parentModule) {
|
|
44
|
+
if (parentModule) {
|
|
45
|
+
throw new Error('CoreUI IconSetModule is already loaded. Import it in the AppModule only');
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
static forRoot() {
|
|
49
|
+
return {
|
|
50
|
+
ngModule: IconSetModule,
|
|
51
|
+
providers: [
|
|
52
|
+
{ provide: IconSetService }
|
|
53
|
+
]
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
IconSetModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: IconSetModule, deps: [{ token: IconSetModule, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
58
|
+
IconSetModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: IconSetModule, imports: [CommonModule] });
|
|
59
|
+
IconSetModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: IconSetModule, providers: [
|
|
60
|
+
IconSetService
|
|
61
|
+
], imports: [[
|
|
62
|
+
CommonModule
|
|
63
|
+
]] });
|
|
64
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: IconSetModule, decorators: [{
|
|
65
|
+
type: NgModule,
|
|
66
|
+
args: [{
|
|
67
|
+
imports: [
|
|
68
|
+
CommonModule
|
|
69
|
+
],
|
|
70
|
+
providers: [
|
|
71
|
+
IconSetService
|
|
72
|
+
]
|
|
73
|
+
}]
|
|
74
|
+
}], ctorParameters: function () { return [{ type: IconSetModule, decorators: [{
|
|
75
|
+
type: Optional
|
|
76
|
+
}, {
|
|
77
|
+
type: SkipSelf
|
|
78
|
+
}] }]; } });
|
|
79
|
+
|
|
80
|
+
class IconDirective {
|
|
81
|
+
constructor(renderer, elementRef, sanitizer, iconSet) {
|
|
82
|
+
this.renderer = renderer;
|
|
83
|
+
this.elementRef = elementRef;
|
|
84
|
+
this.sanitizer = sanitizer;
|
|
85
|
+
this.iconSet = iconSet;
|
|
86
|
+
this.size = '';
|
|
87
|
+
this.xmlns = 'http://www.w3.org/2000/svg';
|
|
88
|
+
this.pointerEvents = 'none';
|
|
89
|
+
this.role = 'img';
|
|
90
|
+
}
|
|
91
|
+
set name(name) {
|
|
92
|
+
this._name = name?.includes('-') ? this.toCamelCase(name) : name;
|
|
93
|
+
}
|
|
94
|
+
get name() {
|
|
95
|
+
return this._name;
|
|
96
|
+
}
|
|
97
|
+
set viewBox(viewBox) {
|
|
98
|
+
this._viewBox = viewBox;
|
|
99
|
+
}
|
|
100
|
+
get viewBox() {
|
|
101
|
+
return this._viewBox ?? this.scale;
|
|
102
|
+
}
|
|
103
|
+
get hostClasses() {
|
|
104
|
+
const classes = {
|
|
105
|
+
icon: true,
|
|
106
|
+
[`icon-${this.computedSize}`]: !!this.computedSize
|
|
107
|
+
};
|
|
108
|
+
return this.customClasses ?? classes;
|
|
109
|
+
}
|
|
110
|
+
get innerHtml() {
|
|
111
|
+
const code = Array.isArray(this.code) ? this.code[1] || this.code[0] : this.code ?? '';
|
|
112
|
+
// todo proper sanitize
|
|
113
|
+
// const sanitized = this.sanitizer.sanitize(SecurityContext.HTML, code);
|
|
114
|
+
return this.sanitizer.bypassSecurityTrustHtml((this.titleCode + code) ?? '');
|
|
115
|
+
}
|
|
116
|
+
get titleCode() {
|
|
117
|
+
return this.title ? `<title>${this.title}</title>` : '';
|
|
118
|
+
}
|
|
119
|
+
get code() {
|
|
120
|
+
if (this.content) {
|
|
121
|
+
return this.content;
|
|
122
|
+
}
|
|
123
|
+
if (this.iconSet && this.name) {
|
|
124
|
+
return this.iconSet.getIcon(this.name);
|
|
125
|
+
}
|
|
126
|
+
if (this.name && !this.iconSet?.icons[this.name])
|
|
127
|
+
console.warn(`c-icon component: icon name '${this.name}' does not exist for IconSet service. ` +
|
|
128
|
+
`To use icon by 'name' prop you need to add it to IconSet service. \n`, this.name);
|
|
129
|
+
return undefined;
|
|
130
|
+
}
|
|
131
|
+
get scale() {
|
|
132
|
+
return Array.isArray(this.code) && this.code.length > 1 ? `0 0 ${this.code[0]}` : '0 0 64 64';
|
|
133
|
+
}
|
|
134
|
+
get computedSize() {
|
|
135
|
+
const addCustom = !this.size && (this.width || this.height);
|
|
136
|
+
return this.size === 'custom' || addCustom ? 'custom-size' : this.size;
|
|
137
|
+
}
|
|
138
|
+
get computedClasses() {
|
|
139
|
+
const classes = {
|
|
140
|
+
icon: true,
|
|
141
|
+
[`icon-${this.computedSize}`]: !!this.computedSize
|
|
142
|
+
};
|
|
143
|
+
return !!this.customClasses ? this.customClasses : classes;
|
|
144
|
+
}
|
|
145
|
+
toCamelCase(str) {
|
|
146
|
+
return str.replace(/([-_][a-z0-9])/ig, ($1) => {
|
|
147
|
+
return $1.toUpperCase().replace('-', '');
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
IconDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: IconDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i1.DomSanitizer }, { token: IconSetService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
152
|
+
IconDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.3", type: IconDirective, selector: "svg[cIcon]", inputs: { content: ["cIcon", "content"], size: "size", title: "title", customClasses: "customClasses", width: "width", height: "height", name: "name", viewBox: "viewBox", xmlns: "xmlns", pointerEvents: ["pointer-events", "pointerEvents"], role: "role" }, host: { properties: { "attr.viewBox": "this.viewBox", "attr.xmlns": "this.xmlns", "attr.pointer-events": "this.pointerEvents", "attr.role": "this.role", "class": "this.hostClasses", "innerHtml": "this.innerHtml" } }, exportAs: ["cIcon"], ngImport: i0 });
|
|
153
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: IconDirective, decorators: [{
|
|
154
|
+
type: Directive,
|
|
155
|
+
args: [{
|
|
156
|
+
selector: 'svg[cIcon]',
|
|
157
|
+
exportAs: 'cIcon'
|
|
158
|
+
}]
|
|
159
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i1.DomSanitizer }, { type: IconSetService }]; }, propDecorators: { content: [{
|
|
160
|
+
type: Input,
|
|
161
|
+
args: ['cIcon']
|
|
162
|
+
}], size: [{
|
|
163
|
+
type: Input
|
|
164
|
+
}], title: [{
|
|
165
|
+
type: Input
|
|
166
|
+
}], customClasses: [{
|
|
167
|
+
type: Input
|
|
168
|
+
}], width: [{
|
|
169
|
+
type: Input
|
|
170
|
+
}], height: [{
|
|
171
|
+
type: Input
|
|
172
|
+
}], name: [{
|
|
173
|
+
type: Input
|
|
174
|
+
}], viewBox: [{
|
|
175
|
+
type: HostBinding,
|
|
176
|
+
args: ['attr.viewBox']
|
|
177
|
+
}, {
|
|
178
|
+
type: Input
|
|
179
|
+
}], xmlns: [{
|
|
180
|
+
type: HostBinding,
|
|
181
|
+
args: ['attr.xmlns']
|
|
182
|
+
}, {
|
|
183
|
+
type: Input
|
|
184
|
+
}], pointerEvents: [{
|
|
185
|
+
type: HostBinding,
|
|
186
|
+
args: ['attr.pointer-events']
|
|
187
|
+
}, {
|
|
188
|
+
type: Input,
|
|
189
|
+
args: ['pointer-events']
|
|
190
|
+
}], role: [{
|
|
191
|
+
type: HostBinding,
|
|
192
|
+
args: ['attr.role']
|
|
193
|
+
}, {
|
|
194
|
+
type: Input
|
|
195
|
+
}], hostClasses: [{
|
|
196
|
+
type: HostBinding,
|
|
197
|
+
args: ['class']
|
|
198
|
+
}], innerHtml: [{
|
|
199
|
+
type: HostBinding,
|
|
200
|
+
args: ['innerHtml']
|
|
201
|
+
}] } });
|
|
202
|
+
|
|
203
|
+
class HtmlAttributesDirective {
|
|
204
|
+
constructor(renderer, el) {
|
|
205
|
+
this.renderer = renderer;
|
|
206
|
+
this.el = el;
|
|
207
|
+
}
|
|
208
|
+
ngOnInit() {
|
|
209
|
+
const attribs = this.cHtmlAttr;
|
|
210
|
+
for (const attr in attribs) {
|
|
211
|
+
if (attr === 'style' && typeof (attribs[attr]) === 'object') {
|
|
212
|
+
this.setStyle(attribs[attr]);
|
|
213
|
+
}
|
|
214
|
+
else if (attr === 'class') {
|
|
215
|
+
this.addClass(attribs[attr]);
|
|
216
|
+
}
|
|
217
|
+
else {
|
|
218
|
+
this.setAttrib(attr, attribs[attr]);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
setStyle(styles) {
|
|
223
|
+
// tslint:disable-next-line:forin
|
|
224
|
+
for (const style in styles) {
|
|
225
|
+
this.renderer.setStyle(this.el.nativeElement, style, styles[style]);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
addClass(classes) {
|
|
229
|
+
const classArray = (Array.isArray(classes) ? classes : classes.split(' '));
|
|
230
|
+
classArray.filter((element) => element.length > 0).forEach(element => {
|
|
231
|
+
this.renderer.addClass(this.el.nativeElement, element);
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
setAttrib(key, value) {
|
|
235
|
+
value !== null ?
|
|
236
|
+
this.renderer.setAttribute(this.el.nativeElement, key, value) :
|
|
237
|
+
this.renderer.removeAttribute(this.el.nativeElement, key);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
HtmlAttributesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: HtmlAttributesDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
241
|
+
HtmlAttributesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.3", type: HtmlAttributesDirective, selector: "[cHtmlAttr]", inputs: { cHtmlAttr: "cHtmlAttr" }, exportAs: ["cHtmlAttr"], ngImport: i0 });
|
|
242
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: HtmlAttributesDirective, decorators: [{
|
|
243
|
+
type: Directive,
|
|
244
|
+
args: [{
|
|
245
|
+
selector: '[cHtmlAttr]',
|
|
246
|
+
exportAs: 'cHtmlAttr'
|
|
247
|
+
}]
|
|
248
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { cHtmlAttr: [{
|
|
249
|
+
type: Input
|
|
250
|
+
}] } });
|
|
251
|
+
|
|
252
|
+
class IconComponent {
|
|
253
|
+
constructor(renderer, elementRef, sanitizer, iconSet) {
|
|
254
|
+
this.renderer = renderer;
|
|
255
|
+
this.elementRef = elementRef;
|
|
256
|
+
this.sanitizer = sanitizer;
|
|
257
|
+
this.iconSet = iconSet;
|
|
258
|
+
this.attributes = { role: 'img' };
|
|
259
|
+
this.size = '';
|
|
260
|
+
this.use = '';
|
|
261
|
+
this.customClasses = '';
|
|
262
|
+
this.renderer.setStyle(this.elementRef.nativeElement, 'display', 'none');
|
|
263
|
+
}
|
|
264
|
+
set name(name) {
|
|
265
|
+
this._name = name.includes('-') ? this.toCamelCase(name) : name;
|
|
266
|
+
}
|
|
267
|
+
get name() {
|
|
268
|
+
return this._name;
|
|
269
|
+
}
|
|
270
|
+
set viewBox(viewBox) {
|
|
271
|
+
this._viewBox = viewBox;
|
|
272
|
+
}
|
|
273
|
+
get viewBox() {
|
|
274
|
+
return this._viewBox ?? this.scale;
|
|
275
|
+
}
|
|
276
|
+
get innerHtml() {
|
|
277
|
+
const code = Array.isArray(this.code) ? this.code[1] || this.code[0] : this.code ?? '';
|
|
278
|
+
// todo proper sanitize
|
|
279
|
+
// const sanitized = this.sanitizer.sanitize(SecurityContext.HTML, code);
|
|
280
|
+
return this.sanitizer.bypassSecurityTrustHtml((this.titleCode + code) ?? '');
|
|
281
|
+
}
|
|
282
|
+
ngAfterViewInit() {
|
|
283
|
+
this.elementRef.nativeElement.classList.forEach((item) => {
|
|
284
|
+
this.renderer.addClass(this.svgElementRef.nativeElement, item);
|
|
285
|
+
});
|
|
286
|
+
const parentElement = this.renderer.parentNode(this.elementRef.nativeElement);
|
|
287
|
+
const svgElement = this.svgElementRef.nativeElement;
|
|
288
|
+
this.renderer.insertBefore(parentElement, svgElement, this.elementRef.nativeElement);
|
|
289
|
+
this.renderer.removeChild(parentElement, this.elementRef.nativeElement);
|
|
290
|
+
}
|
|
291
|
+
get titleCode() {
|
|
292
|
+
return this.title ? `<title>${this.title}</title>` : '';
|
|
293
|
+
}
|
|
294
|
+
get code() {
|
|
295
|
+
if (this.content) {
|
|
296
|
+
return this.content;
|
|
297
|
+
}
|
|
298
|
+
if (this.iconSet && this.name) {
|
|
299
|
+
return this.iconSet.getIcon(this.name);
|
|
300
|
+
}
|
|
301
|
+
if (this.name && !this.iconSet?.icons[this.name])
|
|
302
|
+
console.warn(`c-icon component: icon name '${this.name}' does not exist for IconSet service. ` +
|
|
303
|
+
`To use icon by 'name' prop you need to add it to IconSet service. \n`, this.name);
|
|
304
|
+
return undefined;
|
|
305
|
+
}
|
|
306
|
+
get scale() {
|
|
307
|
+
return Array.isArray(this.code) && this.code.length > 1 ? `0 0 ${this.code[0]}` : '0 0 64 64';
|
|
308
|
+
}
|
|
309
|
+
get computedSize() {
|
|
310
|
+
const addCustom = !this.size && (this.width || this.height);
|
|
311
|
+
return this.size === 'custom' || addCustom ? 'custom-size' : this.size;
|
|
312
|
+
}
|
|
313
|
+
get computedClasses() {
|
|
314
|
+
const classes = {
|
|
315
|
+
icon: true,
|
|
316
|
+
[`icon-${this.computedSize}`]: !!this.computedSize
|
|
317
|
+
};
|
|
318
|
+
return !!this.customClasses ? this.customClasses : classes;
|
|
319
|
+
}
|
|
320
|
+
toCamelCase(str) {
|
|
321
|
+
return str.replace(/([-_][a-z0-9])/ig, ($1) => {
|
|
322
|
+
return $1.toUpperCase().replace('-', '');
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
IconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: IconComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i1.DomSanitizer }, { token: IconSetService }], target: i0.ɵɵFactoryTarget.Component });
|
|
327
|
+
IconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: IconComponent, selector: "c-icon", inputs: { attributes: "attributes", content: "content", size: "size", title: "title", use: "use", customClasses: "customClasses", width: "width", height: "height", name: "name", viewBox: "viewBox" }, viewQueries: [{ propertyName: "svgElementRef", first: true, predicate: ["svgElement"], descendants: true, read: ElementRef }], ngImport: i0, template: "<svg *ngIf=\"(!use) && (!!code)\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n [attr.width]=\"width\"\r\n [attr.height]=\"height || width\"\r\n [attr.viewBox]=\"viewBox\"\r\n [innerHtml]=\"innerHtml\"\r\n [ngClass]=\"computedClasses\"\r\n [cHtmlAttr]=\"attributes\"\r\n role=\"img\"\r\n pointer-events=\"none\"\r\n #svgElement\r\n>\r\n</svg>\r\n\r\n<svg *ngIf=\"use\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n [attr.width]=\"width\"\r\n [attr.height]=\"height || width\"\r\n [ngClass]=\"computedClasses\"\r\n [cHtmlAttr]=\"attributes\"\r\n role=\"img\"\r\n pointer-events=\"none\"\r\n>\r\n <use [attr.href]=\"use\"></use>\r\n</svg>\r\n", styles: [".icon{display:inline-block;color:inherit;text-align:center;vertical-align:-.125rem;fill:currentColor}.icon:not(.icon-c-s):not(.icon-custom-size){width:1rem;height:1rem;font-size:1rem}.icon:not(.icon-c-s):not(.icon-custom-size).icon-xxl{width:2rem;height:2rem;font-size:2rem}.icon:not(.icon-c-s):not(.icon-custom-size).icon-xl{width:1.5rem;height:1.5rem;font-size:1.5rem}.icon:not(.icon-c-s):not(.icon-custom-size).icon-lg{width:1.25rem;height:1.25rem;font-size:1.25rem}.icon:not(.icon-c-s):not(.icon-custom-size).icon-sm{width:.875rem;height:.875rem;font-size:.875rem}.icon:not(.icon-c-s):not(.icon-custom-size).icon-3xl{width:3rem;height:3rem;font-size:3rem}.icon:not(.icon-c-s):not(.icon-custom-size).icon-4xl{width:4rem;height:4rem;font-size:4rem}.icon:not(.icon-c-s):not(.icon-custom-size).icon-5xl{width:5rem;height:5rem;font-size:5rem}.icon:not(.icon-c-s):not(.icon-custom-size).icon-6xl{width:6rem;height:6rem;font-size:6rem}.icon:not(.icon-c-s):not(.icon-custom-size).icon-7xl{width:7rem;height:7rem;font-size:7rem}.icon:not(.icon-c-s):not(.icon-custom-size).icon-8xl{width:8rem;height:8rem;font-size:8rem}.icon:not(.icon-c-s):not(.icon-custom-size).icon-9xl{width:9rem;height:9rem;font-size:9rem}\n"], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: HtmlAttributesDirective, selector: "[cHtmlAttr]", inputs: ["cHtmlAttr"], exportAs: ["cHtmlAttr"] }] });
|
|
328
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: IconComponent, decorators: [{
|
|
329
|
+
type: Component,
|
|
330
|
+
args: [{ selector: 'c-icon', template: "<svg *ngIf=\"(!use) && (!!code)\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n [attr.width]=\"width\"\r\n [attr.height]=\"height || width\"\r\n [attr.viewBox]=\"viewBox\"\r\n [innerHtml]=\"innerHtml\"\r\n [ngClass]=\"computedClasses\"\r\n [cHtmlAttr]=\"attributes\"\r\n role=\"img\"\r\n pointer-events=\"none\"\r\n #svgElement\r\n>\r\n</svg>\r\n\r\n<svg *ngIf=\"use\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n [attr.width]=\"width\"\r\n [attr.height]=\"height || width\"\r\n [ngClass]=\"computedClasses\"\r\n [cHtmlAttr]=\"attributes\"\r\n role=\"img\"\r\n pointer-events=\"none\"\r\n>\r\n <use [attr.href]=\"use\"></use>\r\n</svg>\r\n", styles: [".icon{display:inline-block;color:inherit;text-align:center;vertical-align:-.125rem;fill:currentColor}.icon:not(.icon-c-s):not(.icon-custom-size){width:1rem;height:1rem;font-size:1rem}.icon:not(.icon-c-s):not(.icon-custom-size).icon-xxl{width:2rem;height:2rem;font-size:2rem}.icon:not(.icon-c-s):not(.icon-custom-size).icon-xl{width:1.5rem;height:1.5rem;font-size:1.5rem}.icon:not(.icon-c-s):not(.icon-custom-size).icon-lg{width:1.25rem;height:1.25rem;font-size:1.25rem}.icon:not(.icon-c-s):not(.icon-custom-size).icon-sm{width:.875rem;height:.875rem;font-size:.875rem}.icon:not(.icon-c-s):not(.icon-custom-size).icon-3xl{width:3rem;height:3rem;font-size:3rem}.icon:not(.icon-c-s):not(.icon-custom-size).icon-4xl{width:4rem;height:4rem;font-size:4rem}.icon:not(.icon-c-s):not(.icon-custom-size).icon-5xl{width:5rem;height:5rem;font-size:5rem}.icon:not(.icon-c-s):not(.icon-custom-size).icon-6xl{width:6rem;height:6rem;font-size:6rem}.icon:not(.icon-c-s):not(.icon-custom-size).icon-7xl{width:7rem;height:7rem;font-size:7rem}.icon:not(.icon-c-s):not(.icon-custom-size).icon-8xl{width:8rem;height:8rem;font-size:8rem}.icon:not(.icon-c-s):not(.icon-custom-size).icon-9xl{width:9rem;height:9rem;font-size:9rem}\n"] }]
|
|
331
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i1.DomSanitizer }, { type: IconSetService }]; }, propDecorators: { attributes: [{
|
|
332
|
+
type: Input
|
|
333
|
+
}], content: [{
|
|
334
|
+
type: Input
|
|
335
|
+
}], size: [{
|
|
336
|
+
type: Input
|
|
337
|
+
}], title: [{
|
|
338
|
+
type: Input
|
|
339
|
+
}], use: [{
|
|
340
|
+
type: Input
|
|
341
|
+
}], customClasses: [{
|
|
342
|
+
type: Input
|
|
343
|
+
}], width: [{
|
|
344
|
+
type: Input
|
|
345
|
+
}], height: [{
|
|
346
|
+
type: Input
|
|
347
|
+
}], name: [{
|
|
348
|
+
type: Input
|
|
349
|
+
}], viewBox: [{
|
|
350
|
+
type: Input
|
|
351
|
+
}], svgElementRef: [{
|
|
352
|
+
type: ViewChild,
|
|
353
|
+
args: ['svgElement', { read: ElementRef }]
|
|
354
|
+
}] } });
|
|
355
|
+
|
|
356
|
+
class IconModule {
|
|
357
|
+
}
|
|
358
|
+
IconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: IconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
359
|
+
IconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: IconModule, declarations: [IconComponent,
|
|
360
|
+
HtmlAttributesDirective,
|
|
361
|
+
IconDirective], imports: [CommonModule], exports: [IconComponent,
|
|
362
|
+
IconDirective] });
|
|
363
|
+
IconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: IconModule, imports: [[
|
|
364
|
+
CommonModule,
|
|
365
|
+
]] });
|
|
366
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: IconModule, decorators: [{
|
|
367
|
+
type: NgModule,
|
|
368
|
+
args: [{
|
|
369
|
+
declarations: [
|
|
370
|
+
IconComponent,
|
|
371
|
+
HtmlAttributesDirective,
|
|
372
|
+
IconDirective
|
|
373
|
+
],
|
|
374
|
+
imports: [
|
|
375
|
+
CommonModule,
|
|
376
|
+
],
|
|
377
|
+
exports: [
|
|
378
|
+
IconComponent,
|
|
379
|
+
IconDirective
|
|
380
|
+
],
|
|
381
|
+
}]
|
|
382
|
+
}] });
|
|
383
|
+
|
|
384
|
+
/*
|
|
385
|
+
* Public API Surface of @coreui/icons-angular
|
|
386
|
+
*/
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Generated bundle index. Do not edit.
|
|
390
|
+
*/
|
|
391
|
+
|
|
392
|
+
export { IconComponent, IconDirective, IconModule, IconSetModule, IconSetService };
|
|
393
|
+
//# sourceMappingURL=coreui-icons-angular.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coreui-icons-angular.mjs","sources":["../../../projects/coreui-icons-angular/src/lib/icon-set/icon-set.service.ts","../../../projects/coreui-icons-angular/src/lib/icon-set/icon-set.module.ts","../../../projects/coreui-icons-angular/src/lib/icon/icon.directive.ts","../../../projects/coreui-icons-angular/src/lib/shared/html-attr.directive.ts","../../../projects/coreui-icons-angular/src/lib/icon/icon.component.ts","../../../projects/coreui-icons-angular/src/lib/icon/icon.component.svg","../../../projects/coreui-icons-angular/src/lib/icon/icon.module.ts","../../../projects/coreui-icons-angular/src/public-api.ts","../../../projects/coreui-icons-angular/src/coreui-icons-angular.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\n\r\nexport interface IIconSet {\r\n [iconName: string]: string[];\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class IconSetService {\r\n\r\n constructor() {}\r\n\r\n public get iconNames() {\r\n return this._iconNames;\r\n };\r\n private _iconNames: { [key: string]: string } = {};\r\n\r\n get icons(): IIconSet {\r\n return this._icons;\r\n }\r\n set icons(iconSet) {\r\n for (const iconsKey in iconSet) {\r\n this._iconNames[iconsKey] = iconsKey;\r\n }\r\n this._icons = iconSet;\r\n }\r\n private _icons: IIconSet = {};\r\n\r\n public getIcon(name: string): string[] {\r\n const icon = this.icons[name];\r\n if (!icon) {\r\n console.warn(`CoreUI WARN: Icon ${name} is not registered in IconService`);\r\n }\r\n return this.icons[name];\r\n }\r\n}\r\n","import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { IconSetService } from './icon-set.service';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n providers: [\r\n IconSetService\r\n ]\r\n})\r\nexport class IconSetModule {\r\n constructor(@Optional() @SkipSelf() parentModule?: IconSetModule) {\r\n if (parentModule) {\r\n throw new Error(\r\n 'CoreUI IconSetModule is already loaded. Import it in the AppModule only');\r\n }\r\n }\r\n\r\n static forRoot(): ModuleWithProviders<IconSetModule> {\r\n return {\r\n ngModule: IconSetModule,\r\n providers: [\r\n { provide: IconSetService }\r\n ]\r\n };\r\n }\r\n}\r\n","import { Directive, ElementRef, HostBinding, Input, Renderer2 } from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { IconSetService } from '../icon-set';\n\nimport { IconSize, IIcon } from './icon.interface';\n\n@Directive({\n selector: 'svg[cIcon]',\n exportAs: 'cIcon'\n})\nexport class IconDirective implements IIcon {\n\n @Input('cIcon') content?: string | string[] | any[];\n @Input() size: IconSize = '';\n @Input() title?: string;\n @Input() customClasses?: string | string[] | Set<string> | { [klass: string]: any };\n @Input() width?: string;\n @Input() height?: string;\n\n @Input()\n set name(name: string) {\n this._name = name?.includes('-') ? this.toCamelCase(name) : name;\n }\n get name(): string {\n return this._name;\n }\n private _name!: string;\n\n @HostBinding('attr.viewBox')\n @Input()\n set viewBox(viewBox: string) {\n this._viewBox = viewBox;\n }\n get viewBox(): string {\n return this._viewBox ?? this.scale;\n }\n private _viewBox!: string;\n\n @HostBinding('attr.xmlns')\n @Input() xmlns = 'http://www.w3.org/2000/svg';\n\n @HostBinding('attr.pointer-events')\n @Input('pointer-events') pointerEvents = 'none';\n\n @HostBinding('attr.role')\n @Input() role = 'img';\n\n @HostBinding('class')\n get hostClasses() {\n const classes = {\n icon: true,\n [`icon-${this.computedSize}`]: !!this.computedSize\n };\n return this.customClasses ?? classes;\n }\n\n @HostBinding('innerHtml')\n get innerHtml() {\n const code = Array.isArray(this.code) ? this.code[1] || this.code[0] : this.code ?? '';\n // todo proper sanitize\n // const sanitized = this.sanitizer.sanitize(SecurityContext.HTML, code);\n return this.sanitizer.bypassSecurityTrustHtml((this.titleCode + code) ?? '');\n }\n\n constructor(\n private renderer: Renderer2,\n private elementRef: ElementRef,\n private sanitizer: DomSanitizer,\n private iconSet: IconSetService\n ) { }\n\n get titleCode(): string {\n return this.title ? `<title>${this.title}</title>` : '';\n }\n\n get code(): string | string[] | undefined {\n if (this.content) {\n return this.content;\n }\n if (this.iconSet && this.name) {\n return this.iconSet.getIcon(this.name);\n }\n if (this.name && !this.iconSet?.icons[this.name])\n console.warn(`c-icon component: icon name '${this.name}' does not exist for IconSet service. ` +\n `To use icon by 'name' prop you need to add it to IconSet service. \\n`,\n this.name\n );\n return undefined;\n }\n\n get scale(): string {\n return Array.isArray(this.code) && this.code.length > 1 ? `0 0 ${this.code[0]}` : '0 0 64 64';\n }\n\n get computedSize(): Exclude<IconSize, 'custom'> | undefined {\n const addCustom = !this.size && (this.width || this.height);\n return this.size === 'custom' || addCustom ? 'custom-size' : this.size;\n }\n\n get computedClasses(): any {\n const classes = {\n icon: true,\n [`icon-${this.computedSize}`]: !!this.computedSize\n };\n return !!this.customClasses ? this.customClasses : classes;\n }\n\n toCamelCase(str: string): any {\n return str.replace(/([-_][a-z0-9])/ig, ($1: string) => {\n return $1.toUpperCase().replace('-', '');\n });\n }\n}\n","import { Directive, ElementRef, Input, OnInit, Renderer2 } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[cHtmlAttr]',\r\n exportAs: 'cHtmlAttr'\r\n})\r\nexport class HtmlAttributesDirective implements OnInit {\r\n\r\n @Input() cHtmlAttr?: { [key: string]: any };\r\n\r\n constructor(\r\n private renderer: Renderer2,\r\n private el: ElementRef\r\n ) {}\r\n\r\n ngOnInit(): void {\r\n const attribs = this.cHtmlAttr;\r\n for (const attr in attribs) {\r\n if (attr === 'style' && typeof (attribs[attr]) === 'object') {\r\n this.setStyle(attribs[attr]);\r\n } else if (attr === 'class') {\r\n this.addClass(attribs[attr]);\r\n } else {\r\n this.setAttrib(attr, attribs[attr]);\r\n }\r\n }\r\n }\r\n\r\n private setStyle(styles: any): void {\r\n // tslint:disable-next-line:forin\r\n for (const style in styles) {\r\n this.renderer.setStyle(this.el.nativeElement, style, styles[style]);\r\n }\r\n }\r\n\r\n private addClass(classes: string | string[]): void {\r\n const classArray = (Array.isArray(classes) ? classes : classes.split(' '));\r\n classArray.filter((element) => element.length > 0).forEach(element => {\r\n this.renderer.addClass(this.el.nativeElement, element);\r\n });\r\n }\r\n\r\n private setAttrib(key: string, value: string | null): void {\r\n value !== null ?\r\n this.renderer.setAttribute(this.el.nativeElement, key, value) :\r\n this.renderer.removeAttribute(this.el.nativeElement, key);\r\n }\r\n}\r\n","import { AfterViewInit, Component, ElementRef, Input, Renderer2, ViewChild } from '@angular/core';\r\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\r\nimport { IconSetService } from '../icon-set/icon-set.service';\r\nimport { IconSize, IIcon } from './icon.interface';\r\n\r\n@Component({\r\n selector: 'c-icon',\r\n templateUrl: './icon.component.svg',\r\n styleUrls: ['./icon.component.scss']\r\n})\r\nexport class IconComponent implements IIcon, AfterViewInit {\r\n\r\n @Input() attributes: any = {role: 'img'};\r\n @Input() content?: string | string[] | any[];\r\n @Input() size: IconSize = '';\r\n @Input() title?: string;\r\n @Input() use = '';\r\n @Input() customClasses?: string | string[] | Set<string> | { [klass: string]: any } = '';\r\n @Input() width?: string;\r\n @Input() height?: string;\r\n\r\n @Input()\r\n set name(name: string) {\r\n this._name = name.includes('-') ? this.toCamelCase(name) : name;\r\n }\r\n get name(): string {\r\n return this._name;\r\n }\r\n private _name!: string;\r\n\r\n @Input()\r\n set viewBox(viewBox: string) {\r\n this._viewBox = viewBox;\r\n }\r\n get viewBox(): string {\r\n return this._viewBox ?? this.scale;\r\n }\r\n private _viewBox!: string;\r\n\r\n @ViewChild('svgElement', {read: ElementRef}) svgElementRef!: ElementRef;\r\n\r\n get innerHtml(): SafeHtml {\r\n const code = Array.isArray(this.code) ? this.code[1] || this.code[0] : this.code ?? '';\r\n // todo proper sanitize\r\n // const sanitized = this.sanitizer.sanitize(SecurityContext.HTML, code);\r\n return this.sanitizer.bypassSecurityTrustHtml((this.titleCode + code) ?? '');\r\n }\r\n\r\n constructor(\r\n private renderer: Renderer2,\r\n private elementRef: ElementRef,\r\n private sanitizer: DomSanitizer,\r\n private iconSet: IconSetService\r\n ) {\r\n this.renderer.setStyle(this.elementRef.nativeElement, 'display', 'none');\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.elementRef.nativeElement.classList.forEach((item: string) => {\r\n this.renderer.addClass(this.svgElementRef.nativeElement, item);\r\n });\r\n const parentElement = this.renderer.parentNode(this.elementRef.nativeElement);\r\n const svgElement = this.svgElementRef.nativeElement;\r\n this.renderer.insertBefore(parentElement, svgElement, this.elementRef.nativeElement);\r\n this.renderer.removeChild(parentElement, this.elementRef.nativeElement);\r\n }\r\n\r\n get titleCode(): string {\r\n return this.title ? `<title>${this.title}</title>` : '';\r\n }\r\n\r\n get code(): string | string[] | undefined {\r\n if (this.content) {\r\n return this.content;\r\n }\r\n if (this.iconSet && this.name) {\r\n return this.iconSet.getIcon(this.name);\r\n }\r\n if (this.name && !this.iconSet?.icons[this.name])\r\n console.warn(`c-icon component: icon name '${this.name}' does not exist for IconSet service. ` +\r\n `To use icon by 'name' prop you need to add it to IconSet service. \\n`,\r\n this.name\r\n );\r\n return undefined;\r\n }\r\n\r\n get scale(): string {\r\n return Array.isArray(this.code) && this.code.length > 1 ? `0 0 ${this.code[0]}` : '0 0 64 64';\r\n }\r\n\r\n get computedSize(): Exclude<IconSize, 'custom'> | undefined {\r\n const addCustom = !this.size && (this.width || this.height);\r\n return this.size === 'custom' || addCustom ? 'custom-size' : this.size;\r\n }\r\n\r\n get computedClasses(): any {\r\n const classes = {\r\n icon: true,\r\n [`icon-${this.computedSize}`]: !!this.computedSize\r\n };\r\n return !!this.customClasses ? this.customClasses : classes;\r\n }\r\n\r\n toCamelCase(str: string): any {\r\n return str.replace(/([-_][a-z0-9])/ig, ($1: string) => {\r\n return $1.toUpperCase().replace('-', '');\r\n });\r\n }\r\n}\r\n","<svg *ngIf=\"(!use) && (!!code)\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n [attr.width]=\"width\"\r\n [attr.height]=\"height || width\"\r\n [attr.viewBox]=\"viewBox\"\r\n [innerHtml]=\"innerHtml\"\r\n [ngClass]=\"computedClasses\"\r\n [cHtmlAttr]=\"attributes\"\r\n role=\"img\"\r\n pointer-events=\"none\"\r\n #svgElement\r\n>\r\n</svg>\r\n\r\n<svg *ngIf=\"use\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n [attr.width]=\"width\"\r\n [attr.height]=\"height || width\"\r\n [ngClass]=\"computedClasses\"\r\n [cHtmlAttr]=\"attributes\"\r\n role=\"img\"\r\n pointer-events=\"none\"\r\n>\r\n <use [attr.href]=\"use\"></use>\r\n</svg>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { IconComponent } from './icon.component';\r\nimport { IconDirective } from './icon.directive';\r\nimport { HtmlAttributesDirective } from '../shared/html-attr.directive';\r\n\r\n@NgModule({\r\n declarations: [\r\n IconComponent,\r\n HtmlAttributesDirective,\r\n IconDirective\r\n ],\r\n imports: [\r\n CommonModule,\r\n ],\r\n exports: [\r\n IconComponent,\r\n IconDirective\r\n ],\r\n})\r\nexport class IconModule {\r\n}\r\n","/*\n * Public API Surface of @coreui/icons-angular\n */\nexport { IconDirective } from './lib/icon/icon.directive';\nexport { IconComponent } from './lib/icon/icon.component';\nexport { IconModule } from './lib/icon/icon.module';\nexport { IconSetService, IIconSet } from './lib/icon-set/icon-set.service';\nexport { IconSetModule } from './lib/icon-set/icon-set.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './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I;sBADP,KAAK;gBAUF,OAAO;sBADV,KAAK;gBASuC,aAAa;sBAAzD,SAAS;uBAAC,YAAY,EAAE,EAAC,IAAI,EAAE,UAAU,EAAC;;;MElBhC,UAAU;;uGAAV,UAAU;wGAAV,UAAU,iBAZnB,aAAa;QACb,uBAAuB;QACvB,aAAa,aAGb,YAAY,aAGZ,aAAa;QACb,aAAa;wGAGJ,UAAU,YARZ;YACP,YAAY;SACb;2FAMU,UAAU;kBAdtB,QAAQ;mBAAC;oBACR,YAAY,EAAE;wBACZ,aAAa;wBACb,uBAAuB;wBACvB,aAAa;qBACd;oBACD,OAAO,EAAE;wBACP,YAAY;qBACb;oBACD,OAAO,EAAE;wBACP,aAAa;wBACb,aAAa;qBACd;iBACF;;;ACpBD;;;;ACAA;;;;;;"}
|
|
@@ -1,34 +1,39 @@
|
|
|
1
|
+
import { AfterViewInit, ElementRef, Renderer2 } from '@angular/core';
|
|
1
2
|
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
|
2
3
|
import { IconSetService } from '../icon-set/icon-set.service';
|
|
4
|
+
import { IconSize, IIcon } from './icon.interface';
|
|
3
5
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class IconComponent {
|
|
6
|
+
export declare class IconComponent implements IIcon, AfterViewInit {
|
|
7
|
+
private renderer;
|
|
8
|
+
private elementRef;
|
|
5
9
|
private sanitizer;
|
|
6
10
|
private iconSet;
|
|
7
11
|
attributes: any;
|
|
8
|
-
content?: string | string[];
|
|
9
|
-
size:
|
|
10
|
-
src?: string;
|
|
12
|
+
content?: string | string[] | any[];
|
|
13
|
+
size: IconSize;
|
|
11
14
|
title?: string;
|
|
12
15
|
use: string;
|
|
13
|
-
customClasses
|
|
16
|
+
customClasses?: string | string[] | Set<string> | {
|
|
14
17
|
[klass: string]: any;
|
|
15
18
|
};
|
|
16
19
|
width?: string;
|
|
17
20
|
height?: string;
|
|
18
|
-
constructor(sanitizer: DomSanitizer, iconSet: IconSetService);
|
|
19
|
-
private _name;
|
|
20
|
-
get name(): string;
|
|
21
21
|
set name(name: string);
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
get name(): string;
|
|
23
|
+
private _name;
|
|
24
24
|
set viewBox(viewBox: string);
|
|
25
|
+
get viewBox(): string;
|
|
26
|
+
private _viewBox;
|
|
27
|
+
svgElementRef: ElementRef;
|
|
28
|
+
get innerHtml(): SafeHtml;
|
|
29
|
+
constructor(renderer: Renderer2, elementRef: ElementRef, sanitizer: DomSanitizer, iconSet: IconSetService);
|
|
30
|
+
ngAfterViewInit(): void;
|
|
25
31
|
get titleCode(): string;
|
|
26
|
-
get code(): string[] | undefined
|
|
27
|
-
get iconCode(): SafeHtml;
|
|
32
|
+
get code(): string | string[] | undefined;
|
|
28
33
|
get scale(): string;
|
|
29
|
-
get computedSize(): 'custom
|
|
34
|
+
get computedSize(): Exclude<IconSize, 'custom'> | undefined;
|
|
30
35
|
get computedClasses(): any;
|
|
31
36
|
toCamelCase(str: string): any;
|
|
32
37
|
static ɵfac: i0.ɵɵFactoryDeclaration<IconComponent, never>;
|
|
33
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<IconComponent, "c-icon", never, { "attributes": "attributes"; "content": "content"; "size": "size"; "
|
|
38
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IconComponent, "c-icon", never, { "attributes": "attributes"; "content": "content"; "size": "size"; "title": "title"; "use": "use"; "customClasses": "customClasses"; "width": "width"; "height": "height"; "name": "name"; "viewBox": "viewBox"; }, {}, never, never>;
|
|
34
39
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ElementRef, Renderer2 } from '@angular/core';
|
|
2
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
3
|
+
import { IconSetService } from '../icon-set';
|
|
4
|
+
import { IconSize, IIcon } from './icon.interface';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class IconDirective implements IIcon {
|
|
7
|
+
private renderer;
|
|
8
|
+
private elementRef;
|
|
9
|
+
private sanitizer;
|
|
10
|
+
private iconSet;
|
|
11
|
+
content?: string | string[] | any[];
|
|
12
|
+
size: IconSize;
|
|
13
|
+
title?: string;
|
|
14
|
+
customClasses?: string | string[] | Set<string> | {
|
|
15
|
+
[klass: string]: any;
|
|
16
|
+
};
|
|
17
|
+
width?: string;
|
|
18
|
+
height?: string;
|
|
19
|
+
set name(name: string);
|
|
20
|
+
get name(): string;
|
|
21
|
+
private _name;
|
|
22
|
+
set viewBox(viewBox: string);
|
|
23
|
+
get viewBox(): string;
|
|
24
|
+
private _viewBox;
|
|
25
|
+
xmlns: string;
|
|
26
|
+
pointerEvents: string;
|
|
27
|
+
role: string;
|
|
28
|
+
get hostClasses(): string | {
|
|
29
|
+
[klass: string]: any;
|
|
30
|
+
};
|
|
31
|
+
get innerHtml(): import("@angular/platform-browser").SafeHtml;
|
|
32
|
+
constructor(renderer: Renderer2, elementRef: ElementRef, sanitizer: DomSanitizer, iconSet: IconSetService);
|
|
33
|
+
get titleCode(): string;
|
|
34
|
+
get code(): string | string[] | undefined;
|
|
35
|
+
get scale(): string;
|
|
36
|
+
get computedSize(): Exclude<IconSize, 'custom'> | undefined;
|
|
37
|
+
get computedClasses(): any;
|
|
38
|
+
toCamelCase(str: string): any;
|
|
39
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IconDirective, never>;
|
|
40
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<IconDirective, "svg[cIcon]", ["cIcon"], { "content": "cIcon"; "size": "size"; "title": "title"; "customClasses": "customClasses"; "width": "width"; "height": "height"; "name": "name"; "viewBox": "viewBox"; "xmlns": "xmlns"; "pointerEvents": "pointer-events"; "role": "role"; }, {}, never>;
|
|
41
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface IIcon {
|
|
2
|
+
content?: string | string[] | any[];
|
|
3
|
+
customClasses?: string | string[] | Set<string> | {
|
|
4
|
+
[klass: string]: any;
|
|
5
|
+
};
|
|
6
|
+
height?: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
pointerEvents?: string;
|
|
9
|
+
size?: IconSize;
|
|
10
|
+
title?: string;
|
|
11
|
+
viewBox?: string;
|
|
12
|
+
width?: string;
|
|
13
|
+
xmlns?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare type IconSize = 'custom' | 'custom-size' | 'sm' | 'lg' | 'xl' | 'xxl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | '8xl' | '9xl' | string;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./icon.component";
|
|
3
3
|
import * as i2 from "../shared/html-attr.directive";
|
|
4
|
-
import * as i3 from "
|
|
4
|
+
import * as i3 from "./icon.directive";
|
|
5
|
+
import * as i4 from "@angular/common";
|
|
5
6
|
export declare class IconModule {
|
|
6
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<IconModule, never>;
|
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<IconModule, [typeof i1.IconComponent, typeof i2.HtmlAttributesDirective], [typeof
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<IconModule, [typeof i1.IconComponent, typeof i2.HtmlAttributesDirective, typeof i3.IconDirective], [typeof i4.CommonModule], [typeof i1.IconComponent, typeof i3.IconDirective]>;
|
|
8
9
|
static ɵinj: i0.ɵɵInjectorDeclaration<IconModule>;
|
|
9
10
|
}
|
|
@@ -4,9 +4,13 @@ export interface IIconSet {
|
|
|
4
4
|
}
|
|
5
5
|
export declare class IconSetService {
|
|
6
6
|
constructor();
|
|
7
|
-
|
|
7
|
+
get iconNames(): {
|
|
8
|
+
[key: string]: string;
|
|
9
|
+
};
|
|
10
|
+
private _iconNames;
|
|
8
11
|
get icons(): IIconSet;
|
|
9
12
|
set icons(iconSet: IIconSet);
|
|
13
|
+
private _icons;
|
|
10
14
|
getIcon(name: string): string[];
|
|
11
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<IconSetService, never>;
|
|
12
16
|
static ɵprov: i0.ɵɵInjectableDeclaration<IconSetService>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './public_api';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coreui/icons-angular",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.4",
|
|
4
4
|
"description": "CoreUI Icons Angular component and service",
|
|
5
5
|
"copyright": "Copyright 2021 creativeLabs Łukasz Holeczek",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"url": "https://github.com/coreui/coreui-icons-angular/issues"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@angular/common": "^
|
|
29
|
-
"@angular/core": "^
|
|
28
|
+
"@angular/common": "^13.0.0",
|
|
29
|
+
"@angular/core": "^13.0.0"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"tslib": "^2.3.0"
|
|
@@ -42,11 +42,24 @@
|
|
|
42
42
|
"component",
|
|
43
43
|
"angular"
|
|
44
44
|
],
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"fesm2015": "fesm2015/coreui-icons-angular.
|
|
45
|
+
"module": "fesm2015/coreui-icons-angular.mjs",
|
|
46
|
+
"es2020": "fesm2020/coreui-icons-angular.mjs",
|
|
47
|
+
"esm2020": "esm2020/coreui-icons-angular.mjs",
|
|
48
|
+
"fesm2020": "fesm2020/coreui-icons-angular.mjs",
|
|
49
|
+
"fesm2015": "fesm2015/coreui-icons-angular.mjs",
|
|
50
50
|
"typings": "coreui-icons-angular.d.ts",
|
|
51
|
+
"exports": {
|
|
52
|
+
"./package.json": {
|
|
53
|
+
"default": "./package.json"
|
|
54
|
+
},
|
|
55
|
+
".": {
|
|
56
|
+
"types": "./coreui-icons-angular.d.ts",
|
|
57
|
+
"esm2020": "./esm2020/coreui-icons-angular.mjs",
|
|
58
|
+
"es2020": "./fesm2020/coreui-icons-angular.mjs",
|
|
59
|
+
"es2015": "./fesm2015/coreui-icons-angular.mjs",
|
|
60
|
+
"node": "./fesm2015/coreui-icons-angular.mjs",
|
|
61
|
+
"default": "./fesm2020/coreui-icons-angular.mjs"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
51
64
|
"sideEffects": false
|
|
52
65
|
}
|