@ngxi/simple-icons 0.12.0-beta.3 → 0.12.0-beta.5
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/dist/index.js +9 -7
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { inject, input, computed, Directive } from "@angular/core";
|
|
3
|
-
import { DomSanitizer } from "@angular/platform-browser";
|
|
2
|
+
import { inject, ElementRef, Renderer2, input, computed, effect, Directive } from "@angular/core";
|
|
4
3
|
const simpleIcons42 = {
|
|
5
4
|
"body": '<path fill="currentColor" d="M19.581 16.851H24v-4.439ZM24 3.574h-4.419v4.42l-4.419 4.418v4.44h4.419v-4.44L24 7.993Zm-4.419 0h-4.419v4.42zm-6.324 8.838H4.419l8.838-8.838H8.838L0 12.412v3.595h8.838v4.419h4.419z"/>',
|
|
6
5
|
"width": 24,
|
|
@@ -21385,7 +21384,8 @@ typeof SuppressedError === "function" ? SuppressedError : function(error, suppre
|
|
|
21385
21384
|
};
|
|
21386
21385
|
class Ngxi {
|
|
21387
21386
|
constructor() {
|
|
21388
|
-
this.
|
|
21387
|
+
this.el = inject(ElementRef);
|
|
21388
|
+
this.renderer = inject(Renderer2);
|
|
21389
21389
|
this.icon = input(null);
|
|
21390
21390
|
this.width = input();
|
|
21391
21391
|
this.height = input();
|
|
@@ -21393,13 +21393,16 @@ class Ngxi {
|
|
|
21393
21393
|
this.resolvedWidth = computed(() => this.width() ?? this.icon()?.width);
|
|
21394
21394
|
this.resolvedHeight = computed(() => this.height() ?? this.icon()?.height);
|
|
21395
21395
|
this.resolvedViewBox = computed(() => this.viewBox() ?? this.icon()?.viewBox);
|
|
21396
|
-
this.
|
|
21396
|
+
this.setBody = effect(() => {
|
|
21397
|
+
const icon = this.icon();
|
|
21398
|
+
this.renderer.setProperty(this.el.nativeElement, "innerHTML", icon?.body ?? "");
|
|
21399
|
+
});
|
|
21397
21400
|
}
|
|
21398
21401
|
static {
|
|
21399
21402
|
this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: Ngxi, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
21400
21403
|
}
|
|
21401
21404
|
static {
|
|
21402
|
-
this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.4", type: Ngxi, isStandalone: true, selector: "svg[ngxi]", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, viewBox: { classPropertyName: "viewBox", publicName: "viewBox", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "img" }, properties: { "attr.width": "resolvedWidth()", "attr.height": "resolvedHeight()", "attr.viewBox": "resolvedViewBox()"
|
|
21405
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.4", type: Ngxi, isStandalone: true, selector: "svg[ngxi]", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, viewBox: { classPropertyName: "viewBox", publicName: "viewBox", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "img" }, properties: { "attr.width": "resolvedWidth()", "attr.height": "resolvedHeight()", "attr.viewBox": "resolvedViewBox()" } }, ngImport: i0 });
|
|
21403
21406
|
}
|
|
21404
21407
|
}
|
|
21405
21408
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: Ngxi, decorators: [{
|
|
@@ -21411,8 +21414,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
21411
21414
|
"role": "img",
|
|
21412
21415
|
"[attr.width]": "resolvedWidth()",
|
|
21413
21416
|
"[attr.height]": "resolvedHeight()",
|
|
21414
|
-
"[attr.viewBox]": "resolvedViewBox()"
|
|
21415
|
-
"[innerHTML]": "resolvedBody()"
|
|
21417
|
+
"[attr.viewBox]": "resolvedViewBox()"
|
|
21416
21418
|
}
|
|
21417
21419
|
}]
|
|
21418
21420
|
}] });
|