Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-svg-icon

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-svg-icon - npm Package Compare versions

Comparing version 17.0.0 to 18.0.0

12

lib/svg-icon-registry.service.d.ts
import { InjectionToken, Optional } from '@angular/core';
import { Observable } from 'rxjs';
import { SvgLoader } from './svg-loader';
import * as i0 from "@angular/core";

@@ -8,9 +7,6 @@ export declare const SERVER_URL: InjectionToken<string>;

private loader;
private platformId;
protected serverUrl: string | undefined;
private _document;
protected serverUrl: string | null | undefined;
private document;
private iconsByUrl;
private iconsLoadingByUrl;
constructor(loader: SvgLoader, platformId: Object, serverUrl: string | undefined, _document: any);
/** Add a SVG to the registry by passing a name and the SVG. */

@@ -24,10 +20,10 @@ addSvg(name: string, data: string): void;

unloadSvg(url: string): void;
static ɵfac: i0.ɵɵFactoryDeclaration<SvgIconRegistryService, [null, null, { optional: true; }, { optional: true; }]>;
static ɵfac: i0.ɵɵFactoryDeclaration<SvgIconRegistryService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<SvgIconRegistryService>;
}
export declare function SVG_ICON_REGISTRY_PROVIDER_FACTORY(parentRegistry: SvgIconRegistryService, loader: SvgLoader, platformId: object, serverUrl?: string, document?: any): SvgIconRegistryService;
export declare function SVG_ICON_REGISTRY_PROVIDER_FACTORY(parentRegistry: SvgIconRegistryService): SvgIconRegistryService;
export declare const SVG_ICON_REGISTRY_PROVIDER: {
provide: typeof SvgIconRegistryService;
deps: (typeof SvgLoader | Optional[])[];
deps: Optional[][];
useFactory: typeof SVG_ICON_REGISTRY_PROVIDER_FACTORY;
};

@@ -1,5 +0,4 @@

import { ChangeDetectorRef, DoCheck, ElementRef, KeyValueDiffers, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges } from '@angular/core';
import { SvgIconRegistryService } from './svg-icon-registry.service';
import { OnDestroy } from '@angular/core';
import * as i0 from "@angular/core";
export declare class SvgIconComponent implements OnInit, OnDestroy, OnChanges, DoCheck {
export declare class SvgIconComponent implements OnDestroy {
private element;

@@ -9,28 +8,23 @@ private differs;

private iconReg;
private cdr;
src: string;
name?: string;
stretch: boolean;
applyClass: boolean;
/** @deprecated since 9.1.0 */
applyCss: boolean;
svgClass?: any;
klass?: any;
viewBox?: string;
svgAriaLabel?: string;
set svgStyle(values: {
src: import("@angular/core").InputSignal<string>;
name: import("@angular/core").InputSignal<string | undefined>;
stretch: import("@angular/core").InputSignal<boolean>;
applyClass: import("@angular/core").InputSignal<boolean>;
svgClass: import("@angular/core").InputSignal<any>;
klass: import("@angular/core").InputSignal<any>;
viewBox: import("@angular/core").InputSignal<string | undefined>;
svgAriaLabel: import("@angular/core").InputSignal<string | undefined>;
svg: import("@angular/core").WritableSignal<number>;
svgStyle: import("@angular/core").InputSignal<{
[klass: string]: any;
} | null);
} | null | undefined>;
private helper;
private _svgStyle;
constructor(element: ElementRef, differs: KeyValueDiffers, renderer: Renderer2, iconReg: SvgIconRegistryService, cdr: ChangeDetectorRef);
ngOnInit(): void;
constructor();
ngOnDestroy(): void;
ngOnChanges(changeRecord: SimpleChanges): void;
ngDoCheck(): void;
get elemSvg(): any;
private init;
private initSvg;
private destroy;
private resetDiffer;
private setSvg;
private updateViewBox;
private copyNgContentAttribute;

@@ -44,3 +38,3 @@ private setNgContentAttribute;

static ɵfac: i0.ɵɵFactoryDeclaration<SvgIconComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SvgIconComponent, "svg-icon", never, { "src": { "alias": "src"; "required": false; }; "name": { "alias": "name"; "required": false; }; "stretch": { "alias": "stretch"; "required": false; }; "applyClass": { "alias": "applyClass"; "required": false; }; "applyCss": { "alias": "applyCss"; "required": false; }; "svgClass": { "alias": "svgClass"; "required": false; }; "klass": { "alias": "class"; "required": false; }; "viewBox": { "alias": "viewBox"; "required": false; }; "svgAriaLabel": { "alias": "svgAriaLabel"; "required": false; }; "svgStyle": { "alias": "svgStyle"; "required": false; }; }, {}, never, ["*"], true, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SvgIconComponent, "svg-icon", never, { "src": { "alias": "src"; "required": true; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "stretch": { "alias": "stretch"; "required": false; "isSignal": true; }; "applyClass": { "alias": "applyClass"; "required": false; "isSignal": true; }; "svgClass": { "alias": "svgClass"; "required": false; "isSignal": true; }; "klass": { "alias": "class"; "required": false; "isSignal": true; }; "viewBox": { "alias": "viewBox"; "required": false; "isSignal": true; }; "svgAriaLabel": { "alias": "svgAriaLabel"; "required": false; "isSignal": true; }; "svgStyle": { "alias": "svgStyle"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
}
{
"name": "angular-svg-icon",
"description": "Angular 17 component and service for inlining SVGs allowing them to be easily styled with CSS.",
"version": "17.0.0",
"description": "Angular 18 component and service for inlining SVGs allowing them to be easily styled with CSS.",
"version": "18.0.0",
"repository": {
"type": "git",
"url": "https://github.com/czeckd/angular-svg-icon.git"
"url": "git+https://github.com/czeckd/angular-svg-icon.git"
},

@@ -17,4 +17,4 @@ "author": "David Czeck",

"peerDependencies": {
"@angular/core": ">=17.0.0",
"@angular/common": ">=17.0.0",
"@angular/core": ">=18.0.0",
"@angular/common": ">=18.0.0",
"rxjs": ">=6.6.3"

@@ -39,2 +39,2 @@ },

"sideEffects": false
}
}

@@ -6,3 +6,3 @@ [![npm version](https://badge.fury.io/js/angular-svg-icon.svg)](https://badge.fury.io/js/angular-svg-icon)

The **angular-svg-icon** is an Angular 17 service and component that provides a
The **angular-svg-icon** is an Angular 18 service and component that provides a
means to inline SVG files to allow for them to be easily styled by CSS and code.

@@ -22,3 +22,13 @@

```
## Versions
The latest version of the package is for Angular 18.
:grey_exclamation: **BREAKING CHANGE**: as of angular-svg-icon@18.0.0, the package was converted to use
`inject` and `signal` from `@common/core` for improved performance. Thus method calls that are inputs
should be avoided. Inputs are now signal inputs.
**Note on earlier versions of Angular:**
- For Angular 17, use angular-svg-icon@17.0.0
- For Angular 16, use angular-svg-icon@16.1.0

@@ -72,3 +82,3 @@ - For Angular 15, use angular-svg-icon@15.0.0

**BREAKING CHANGE**: as of angular-svg-icon@9.0.0, an explicit call to `forRoot()`
:grey_exclamation: **BREAKING CHANGE**: as of angular-svg-icon@9.0.0, an explicit call to `forRoot()`
must be made on the module's import.

@@ -329,3 +339,4 @@

## Author
- David Czeck [@czeckd](https://github.com/czeckd)
- David Czeck [@czeckd](https://github.com/czeckd) and
[community contributors](https://github.com/czeckd/angular-svg-icon/graphs/contributors). Thank you!

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc