@ngxi/eva 0.12.0-beta.3 → 0.12.0-beta.7
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 +22 -23
- package/dist/index.js.map +1 -1
- package/dist/lib/eva.d.ts +5 -0
- package/package.json +16 -6
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 evaActivityFill = {
|
|
5
4
|
"body": '<path fill="currentColor" d="M14.33 20h-.21a2 2 0 0 1-1.76-1.58L9.68 6l-2.76 6.4A1 1 0 0 1 6 13H3a1 1 0 0 1 0-2h2.34l2.51-5.79a2 2 0 0 1 3.79.38L14.32 18l2.76-6.38A1 1 0 0 1 18 11h3a1 1 0 0 1 0 2h-2.34l-2.51 5.79A2 2 0 0 1 14.33 20"/>',
|
|
6
5
|
"width": 24,
|
|
@@ -2941,19 +2940,10 @@ const evaWifiOutline = {
|
|
|
2941
2940
|
"height": 24,
|
|
2942
2941
|
"viewBox": "0 0 24 24"
|
|
2943
2942
|
};
|
|
2944
|
-
function __decorate(decorators, target, key, desc) {
|
|
2945
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2946
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2947
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2948
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2949
|
-
}
|
|
2950
|
-
typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
|
|
2951
|
-
var e = new Error(message);
|
|
2952
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
2953
|
-
};
|
|
2954
2943
|
class Ngxi {
|
|
2955
2944
|
constructor() {
|
|
2956
|
-
this.
|
|
2945
|
+
this.el = inject(ElementRef);
|
|
2946
|
+
this.renderer = inject(Renderer2);
|
|
2957
2947
|
this.icon = input(null);
|
|
2958
2948
|
this.width = input();
|
|
2959
2949
|
this.height = input();
|
|
@@ -2961,13 +2951,16 @@ class Ngxi {
|
|
|
2961
2951
|
this.resolvedWidth = computed(() => this.width() ?? this.icon()?.width);
|
|
2962
2952
|
this.resolvedHeight = computed(() => this.height() ?? this.icon()?.height);
|
|
2963
2953
|
this.resolvedViewBox = computed(() => this.viewBox() ?? this.icon()?.viewBox);
|
|
2964
|
-
this.
|
|
2954
|
+
this.setBody = effect(() => {
|
|
2955
|
+
const icon = this.icon();
|
|
2956
|
+
this.renderer.setProperty(this.el.nativeElement, "innerHTML", icon?.body ?? "");
|
|
2957
|
+
});
|
|
2965
2958
|
}
|
|
2966
2959
|
static {
|
|
2967
2960
|
this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: Ngxi, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2968
2961
|
}
|
|
2969
2962
|
static {
|
|
2970
|
-
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()"
|
|
2963
|
+
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 });
|
|
2971
2964
|
}
|
|
2972
2965
|
}
|
|
2973
2966
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: Ngxi, decorators: [{
|
|
@@ -2979,18 +2972,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
2979
2972
|
"role": "img",
|
|
2980
2973
|
"[attr.width]": "resolvedWidth()",
|
|
2981
2974
|
"[attr.height]": "resolvedHeight()",
|
|
2982
|
-
"[attr.viewBox]": "resolvedViewBox()"
|
|
2983
|
-
"[innerHTML]": "resolvedBody()"
|
|
2975
|
+
"[attr.viewBox]": "resolvedViewBox()"
|
|
2984
2976
|
}
|
|
2985
2977
|
}]
|
|
2986
2978
|
}] });
|
|
2987
|
-
|
|
2979
|
+
class NgxiEva {
|
|
2988
2980
|
constructor() {
|
|
2989
2981
|
this.ngxiEva = input.required();
|
|
2990
2982
|
}
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2983
|
+
static {
|
|
2984
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxiEva, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2985
|
+
}
|
|
2986
|
+
static {
|
|
2987
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.4", type: NgxiEva, isStandalone: true, selector: "svg[ngxiEva]", inputs: { ngxiEva: { classPropertyName: "ngxiEva", publicName: "ngxiEva", isSignal: true, isRequired: true, transformFunction: null } }, hostDirectives: [{ directive: Ngxi, inputs: ["icon", "ngxiEva", "width", "width", "height", "height", "viewBox", "viewBox"] }], ngImport: i0 });
|
|
2988
|
+
}
|
|
2989
|
+
}
|
|
2990
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxiEva, decorators: [{
|
|
2991
|
+
type: Directive,
|
|
2992
|
+
args: [{
|
|
2994
2993
|
standalone: true,
|
|
2995
2994
|
selector: "svg[ngxiEva]",
|
|
2996
2995
|
hostDirectives: [
|
|
@@ -2999,8 +2998,8 @@ NgxiEva = __decorate([
|
|
|
2999
2998
|
inputs: ["icon:ngxiEva", "width", "height", "viewBox"]
|
|
3000
2999
|
}
|
|
3001
3000
|
]
|
|
3002
|
-
}
|
|
3003
|
-
]
|
|
3001
|
+
}]
|
|
3002
|
+
}] });
|
|
3004
3003
|
export {
|
|
3005
3004
|
NgxiEva,
|
|
3006
3005
|
evaActivityFill,
|