@ngxi/streamline-cyber 0.12.19 → 0.12.21
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 +20 -39
- package/dist/index.js.map +1 -1
- package/dist/lib/streamline-cyber.d.ts +1 -0
- package/package.json +5 -3
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { inject,
|
|
3
|
-
import {
|
|
2
|
+
import { inject, input, computed, Directive } from "@angular/core";
|
|
3
|
+
import { DomSanitizer } from "@angular/platform-browser";
|
|
4
4
|
const streamlineCyber3dGlasses = {
|
|
5
5
|
"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
6
|
"width": 24,
|
|
@@ -3003,44 +3003,24 @@ const streamlineCyberWrenchScrewdriver = {
|
|
|
3003
3003
|
};
|
|
3004
3004
|
class Ngxi {
|
|
3005
3005
|
constructor() {
|
|
3006
|
-
this.
|
|
3007
|
-
this.
|
|
3008
|
-
this.
|
|
3009
|
-
this.
|
|
3010
|
-
this.
|
|
3011
|
-
this.
|
|
3012
|
-
this.
|
|
3013
|
-
this.
|
|
3014
|
-
this.
|
|
3015
|
-
this.resolvedViewBox = computed(() => this.viewBox() ?? this.icon()?.viewBox);
|
|
3016
|
-
this.setBody = effect(() => {
|
|
3017
|
-
const icon = this.icon();
|
|
3018
|
-
if (!icon) {
|
|
3019
|
-
this.renderer.setProperty(this.el.nativeElement, "innerHTML", "");
|
|
3020
|
-
return;
|
|
3021
|
-
}
|
|
3022
|
-
if (isPlatformServer(this.platform)) {
|
|
3023
|
-
this.el.nativeElement.innerHTML = icon.body;
|
|
3024
|
-
this.el.nativeElement.setAttribute("data-ngxi-ssr", "");
|
|
3025
|
-
return;
|
|
3026
|
-
}
|
|
3027
|
-
if (this.el.nativeElement.hasAttribute("data-ngxi-ssr")) {
|
|
3028
|
-
this.el.nativeElement.removeAttribute("data-ngxi-ssr");
|
|
3029
|
-
if (this.el.nativeElement.innerHTML === icon.body) {
|
|
3030
|
-
return;
|
|
3031
|
-
}
|
|
3032
|
-
}
|
|
3033
|
-
this.renderer.setProperty(this.el.nativeElement, "innerHTML", icon.body);
|
|
3034
|
-
});
|
|
3006
|
+
this.sanitizer = inject(DomSanitizer);
|
|
3007
|
+
this.icon = input(...[]);
|
|
3008
|
+
this.width = input(...[]);
|
|
3009
|
+
this.height = input(...[]);
|
|
3010
|
+
this.viewBox = input(...[]);
|
|
3011
|
+
this.resolvedWidth = computed(() => this.width() ?? this.icon()?.width, ...[]);
|
|
3012
|
+
this.resolvedHeight = computed(() => this.height() ?? this.icon()?.height, ...[]);
|
|
3013
|
+
this.resolvedViewBox = computed(() => this.viewBox() ?? this.icon()?.viewBox, ...[]);
|
|
3014
|
+
this.safeSVG = computed(() => this.sanitizer.bypassSecurityTrustHtml(this.icon()?.body ?? ""), ...[]);
|
|
3035
3015
|
}
|
|
3036
3016
|
static {
|
|
3037
|
-
this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3017
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.2", ngImport: i0, type: Ngxi, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3038
3018
|
}
|
|
3039
3019
|
static {
|
|
3040
|
-
this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
3020
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.2.2", 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()", "innerHTML": "safeSVG()" } }, ngImport: i0 });
|
|
3041
3021
|
}
|
|
3042
3022
|
}
|
|
3043
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3023
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.2", ngImport: i0, type: Ngxi, decorators: [{
|
|
3044
3024
|
type: Directive,
|
|
3045
3025
|
args: [{
|
|
3046
3026
|
standalone: true,
|
|
@@ -3049,22 +3029,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3049
3029
|
"role": "img",
|
|
3050
3030
|
"[attr.width]": "resolvedWidth()",
|
|
3051
3031
|
"[attr.height]": "resolvedHeight()",
|
|
3052
|
-
"[attr.viewBox]": "resolvedViewBox()"
|
|
3032
|
+
"[attr.viewBox]": "resolvedViewBox()",
|
|
3033
|
+
"[innerHTML]": "safeSVG()"
|
|
3053
3034
|
}
|
|
3054
3035
|
}]
|
|
3055
3036
|
}] });
|
|
3056
3037
|
class NgxiStreamlineCyber {
|
|
3057
3038
|
constructor() {
|
|
3058
|
-
this.ngxiStreamlineCyber = input.required();
|
|
3039
|
+
this.ngxiStreamlineCyber = input.required(...[]);
|
|
3059
3040
|
}
|
|
3060
3041
|
static {
|
|
3061
|
-
this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3042
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.2", ngImport: i0, type: NgxiStreamlineCyber, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3062
3043
|
}
|
|
3063
3044
|
static {
|
|
3064
|
-
this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
3045
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.2.2", type: NgxiStreamlineCyber, isStandalone: true, selector: "svg[ngxiStreamlineCyber]", inputs: { ngxiStreamlineCyber: { classPropertyName: "ngxiStreamlineCyber", publicName: "ngxiStreamlineCyber", isSignal: true, isRequired: true, transformFunction: null } }, hostDirectives: [{ directive: Ngxi, inputs: ["icon", "ngxiStreamlineCyber", "width", "width", "height", "height", "viewBox", "viewBox"] }], ngImport: i0 });
|
|
3065
3046
|
}
|
|
3066
3047
|
}
|
|
3067
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3048
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.2", ngImport: i0, type: NgxiStreamlineCyber, decorators: [{
|
|
3068
3049
|
type: Directive,
|
|
3069
3050
|
args: [{
|
|
3070
3051
|
standalone: true,
|