@ngxi/streamline-cyber 0.12.0-beta.2 → 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 streamlineCyber3dGlasses = {
|
|
5
4
|
"body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"><path d="m22.5 10.5l-5.75-5H14.5m-14 5l5.75-5H8.5m-8 5l2 9H8l3.5-3.5l3.5 3.5h5.5l2-9m-22 0h22"/><path d="M3.25 12.5h7.25V14L7 17.5H4.5zm16.5 0H12.5V14l3.5 3.5h2.5z"/></g>',
|
|
6
5
|
"width": 24,
|
|
@@ -3013,7 +3012,8 @@ typeof SuppressedError === "function" ? SuppressedError : function(error, suppre
|
|
|
3013
3012
|
};
|
|
3014
3013
|
class Ngxi {
|
|
3015
3014
|
constructor() {
|
|
3016
|
-
this.
|
|
3015
|
+
this.el = inject(ElementRef);
|
|
3016
|
+
this.renderer = inject(Renderer2);
|
|
3017
3017
|
this.icon = input(null);
|
|
3018
3018
|
this.width = input();
|
|
3019
3019
|
this.height = input();
|
|
@@ -3021,13 +3021,16 @@ class Ngxi {
|
|
|
3021
3021
|
this.resolvedWidth = computed(() => this.width() ?? this.icon()?.width);
|
|
3022
3022
|
this.resolvedHeight = computed(() => this.height() ?? this.icon()?.height);
|
|
3023
3023
|
this.resolvedViewBox = computed(() => this.viewBox() ?? this.icon()?.viewBox);
|
|
3024
|
-
this.
|
|
3024
|
+
this.setBody = effect(() => {
|
|
3025
|
+
const icon = this.icon();
|
|
3026
|
+
this.renderer.setProperty(this.el.nativeElement, "innerHTML", icon?.body ?? "");
|
|
3027
|
+
});
|
|
3025
3028
|
}
|
|
3026
3029
|
static {
|
|
3027
3030
|
this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: Ngxi, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3028
3031
|
}
|
|
3029
3032
|
static {
|
|
3030
|
-
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()"
|
|
3033
|
+
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 });
|
|
3031
3034
|
}
|
|
3032
3035
|
}
|
|
3033
3036
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: Ngxi, decorators: [{
|
|
@@ -3039,8 +3042,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
3039
3042
|
"role": "img",
|
|
3040
3043
|
"[attr.width]": "resolvedWidth()",
|
|
3041
3044
|
"[attr.height]": "resolvedHeight()",
|
|
3042
|
-
"[attr.viewBox]": "resolvedViewBox()"
|
|
3043
|
-
"[innerHTML]": "resolvedBody()"
|
|
3045
|
+
"[attr.viewBox]": "resolvedViewBox()"
|
|
3044
3046
|
}
|
|
3045
3047
|
}]
|
|
3046
3048
|
}] });
|