@ngxi/streamline-cyber 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 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,
@@ -3001,19 +3000,10 @@ const streamlineCyberWrenchScrewdriver = {
3001
3000
  "height": 24,
3002
3001
  "viewBox": "0 0 24 24"
3003
3002
  };
3004
- function __decorate(decorators, target, key, desc) {
3005
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3006
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
3007
- 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;
3008
- return c > 3 && r && Object.defineProperty(target, key, r), r;
3009
- }
3010
- typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
3011
- var e = new Error(message);
3012
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
3013
- };
3014
3003
  class Ngxi {
3015
3004
  constructor() {
3016
- this.sanitizer = inject(DomSanitizer);
3005
+ this.el = inject(ElementRef);
3006
+ this.renderer = inject(Renderer2);
3017
3007
  this.icon = input(null);
3018
3008
  this.width = input();
3019
3009
  this.height = input();
@@ -3021,13 +3011,16 @@ class Ngxi {
3021
3011
  this.resolvedWidth = computed(() => this.width() ?? this.icon()?.width);
3022
3012
  this.resolvedHeight = computed(() => this.height() ?? this.icon()?.height);
3023
3013
  this.resolvedViewBox = computed(() => this.viewBox() ?? this.icon()?.viewBox);
3024
- this.resolvedBody = computed(() => this.sanitizer.bypassSecurityTrustHtml(this.icon()?.body ?? ""));
3014
+ this.setBody = effect(() => {
3015
+ const icon = this.icon();
3016
+ this.renderer.setProperty(this.el.nativeElement, "innerHTML", icon?.body ?? "");
3017
+ });
3025
3018
  }
3026
3019
  static {
3027
3020
  this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: Ngxi, deps: [], target: i0.ɵɵFactoryTarget.Directive });
3028
3021
  }
3029
3022
  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()", "innerHTML": "resolvedBody()" } }, ngImport: i0 });
3023
+ 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
3024
  }
3032
3025
  }
3033
3026
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: Ngxi, decorators: [{
@@ -3039,18 +3032,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
3039
3032
  "role": "img",
3040
3033
  "[attr.width]": "resolvedWidth()",
3041
3034
  "[attr.height]": "resolvedHeight()",
3042
- "[attr.viewBox]": "resolvedViewBox()",
3043
- "[innerHTML]": "resolvedBody()"
3035
+ "[attr.viewBox]": "resolvedViewBox()"
3044
3036
  }
3045
3037
  }]
3046
3038
  }] });
3047
- let NgxiStreamlineCyber = class NgxiStreamlineCyber2 {
3039
+ class NgxiStreamlineCyber {
3048
3040
  constructor() {
3049
3041
  this.ngxiStreamlineCyber = input.required();
3050
3042
  }
3051
- };
3052
- NgxiStreamlineCyber = __decorate([
3053
- Directive({
3043
+ static {
3044
+ this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxiStreamlineCyber, deps: [], target: i0.ɵɵFactoryTarget.Directive });
3045
+ }
3046
+ static {
3047
+ this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.4", 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 });
3048
+ }
3049
+ }
3050
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxiStreamlineCyber, decorators: [{
3051
+ type: Directive,
3052
+ args: [{
3054
3053
  standalone: true,
3055
3054
  selector: "svg[ngxiStreamlineCyber]",
3056
3055
  hostDirectives: [
@@ -3059,8 +3058,8 @@ NgxiStreamlineCyber = __decorate([
3059
3058
  inputs: ["icon:ngxiStreamlineCyber", "width", "height", "viewBox"]
3060
3059
  }
3061
3060
  ]
3062
- })
3063
- ], NgxiStreamlineCyber);
3061
+ }]
3062
+ }] });
3064
3063
  export {
3065
3064
  NgxiStreamlineCyber,
3066
3065
  streamlineCyber3dGlasses,