@ng-icons/core 16.0.0 → 17.0.0

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.
@@ -32,9 +32,9 @@ export class IconComponent {
32
32
  return this._size;
33
33
  }
34
34
  }
35
- IconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: IconComponent, deps: [{ token: i0.ElementRef }, { token: i1.DomSanitizer }, { token: i2.IconService }], target: i0.ɵɵFactoryTarget.Component });
36
- IconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.4", type: IconComponent, selector: "ng-icon", inputs: { name: "name", size: "size", strokeWidth: "strokeWidth", color: "color" }, host: { properties: { "innerHTML": "this.template", "style.--ng-icon__size": "this.size", "style.--ng-icon__stroke-width": "this.strokeWidth", "style.color": "this.color" } }, ngImport: i0, template: '', isInline: true, styles: [":host{display:inline-block;width:var(--ng-icon__size);height:var(--ng-icon__size)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
37
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: IconComponent, decorators: [{
35
+ IconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: IconComponent, deps: [{ token: i0.ElementRef }, { token: i1.DomSanitizer }, { token: i2.IconService }], target: i0.ɵɵFactoryTarget.Component });
36
+ IconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: IconComponent, selector: "ng-icon", inputs: { name: "name", size: "size", strokeWidth: "strokeWidth", color: "color" }, host: { properties: { "innerHTML": "this.template", "style.--ng-icon__size": "this.size", "style.--ng-icon__stroke-width": "this.strokeWidth", "style.color": "this.color" } }, ngImport: i0, template: '', isInline: true, styles: [":host{display:inline-block;width:var(--ng-icon__size);height:var(--ng-icon__size)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
37
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: IconComponent, decorators: [{
38
38
  type: Component,
39
39
  args: [{ selector: 'ng-icon', template: '', changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:inline-block;width:var(--ng-icon__size);height:var(--ng-icon__size)}\n"] }]
40
40
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.DomSanitizer }, { type: i2.IconService }]; }, propDecorators: { name: [{
@@ -20,10 +20,10 @@ export class NgIconsModule {
20
20
  return { ngModule: NgIconsModule };
21
21
  }
22
22
  }
23
- NgIconsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: NgIconsModule, deps: [{ token: i1.IconService }], target: i0.ɵɵFactoryTarget.NgModule });
24
- NgIconsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: NgIconsModule, declarations: [IconComponent], exports: [IconComponent] });
25
- NgIconsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: NgIconsModule });
26
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: NgIconsModule, decorators: [{
23
+ NgIconsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: NgIconsModule, deps: [{ token: i1.IconService }], target: i0.ɵɵFactoryTarget.NgModule });
24
+ NgIconsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.0", ngImport: i0, type: NgIconsModule, declarations: [IconComponent], exports: [IconComponent] });
25
+ NgIconsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: NgIconsModule });
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: NgIconsModule, decorators: [{
27
27
  type: NgModule,
28
28
  args: [{
29
29
  declarations: [IconComponent],
@@ -14,9 +14,9 @@ export class IconService {
14
14
  }
15
15
  /** Store the available icons. */
16
16
  IconService.icons = {};
17
- IconService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: IconService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
18
- IconService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: IconService, providedIn: 'root' });
19
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: IconService, decorators: [{
17
+ IconService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: IconService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
18
+ IconService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: IconService, providedIn: 'root' });
19
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: IconService, decorators: [{
20
20
  type: Injectable,
21
21
  args: [{
22
22
  providedIn: 'root',
@@ -38,9 +38,9 @@ class IconService {
38
38
  }
39
39
  /** Store the available icons. */
40
40
  IconService.icons = {};
41
- IconService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: IconService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
42
- IconService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: IconService, providedIn: 'root' });
43
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: IconService, decorators: [{
41
+ IconService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: IconService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
42
+ IconService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: IconService, providedIn: 'root' });
43
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: IconService, decorators: [{
44
44
  type: Injectable,
45
45
  args: [{
46
46
  providedIn: 'root',
@@ -74,9 +74,9 @@ class IconComponent {
74
74
  return this._size;
75
75
  }
76
76
  }
77
- IconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: IconComponent, deps: [{ token: i0.ElementRef }, { token: i1.DomSanitizer }, { token: IconService }], target: i0.ɵɵFactoryTarget.Component });
78
- IconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.4", type: IconComponent, selector: "ng-icon", inputs: { name: "name", size: "size", strokeWidth: "strokeWidth", color: "color" }, host: { properties: { "innerHTML": "this.template", "style.--ng-icon__size": "this.size", "style.--ng-icon__stroke-width": "this.strokeWidth", "style.color": "this.color" } }, ngImport: i0, template: '', isInline: true, styles: [":host{display:inline-block;width:var(--ng-icon__size);height:var(--ng-icon__size)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
79
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: IconComponent, decorators: [{
77
+ IconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: IconComponent, deps: [{ token: i0.ElementRef }, { token: i1.DomSanitizer }, { token: IconService }], target: i0.ɵɵFactoryTarget.Component });
78
+ IconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: IconComponent, selector: "ng-icon", inputs: { name: "name", size: "size", strokeWidth: "strokeWidth", color: "color" }, host: { properties: { "innerHTML": "this.template", "style.--ng-icon__size": "this.size", "style.--ng-icon__stroke-width": "this.strokeWidth", "style.color": "this.color" } }, ngImport: i0, template: '', isInline: true, styles: [":host{display:inline-block;width:var(--ng-icon__size);height:var(--ng-icon__size)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
79
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: IconComponent, decorators: [{
80
80
  type: Component,
81
81
  args: [{ selector: 'ng-icon', template: '', changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:inline-block;width:var(--ng-icon__size);height:var(--ng-icon__size)}\n"] }]
82
82
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.DomSanitizer }, { type: IconService }]; }, propDecorators: { name: [{
@@ -124,10 +124,10 @@ class NgIconsModule {
124
124
  return { ngModule: NgIconsModule };
125
125
  }
126
126
  }
127
- NgIconsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: NgIconsModule, deps: [{ token: IconService }], target: i0.ɵɵFactoryTarget.NgModule });
128
- NgIconsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: NgIconsModule, declarations: [IconComponent], exports: [IconComponent] });
129
- NgIconsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: NgIconsModule });
130
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: NgIconsModule, decorators: [{
127
+ NgIconsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: NgIconsModule, deps: [{ token: IconService }], target: i0.ɵɵFactoryTarget.NgModule });
128
+ NgIconsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.0", ngImport: i0, type: NgIconsModule, declarations: [IconComponent], exports: [IconComponent] });
129
+ NgIconsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: NgIconsModule });
130
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: NgIconsModule, decorators: [{
131
131
  type: NgModule,
132
132
  args: [{
133
133
  declarations: [IconComponent],
@@ -1 +1 @@
1
- {"version":3,"file":"ng-icons-core.mjs","sources":["../../../../packages/core/src/lib/utils/format.ts","../../../../packages/core/src/lib/icon.service.ts","../../../../packages/core/src/lib/icon.component.ts","../../../../packages/core/src/lib/icon.module.ts","../../../../packages/core/src/ng-icons-core.ts"],"sourcesContent":["/**\n * Hyphenated to UpperCamelCase\n */\nexport function toUpperCamelCase(str: string): string {\n return toCapitalCase(toPropertyName(str));\n}\n\n/**\n * Hyphenated to lowerCamelCase\n */\nexport function toPropertyName(str: string): string {\n return str\n .replace(/([^a-zA-Z0-9])+(.)?/g, (_, __, chr) =>\n chr ? chr.toUpperCase() : '',\n )\n .replace(/[^a-zA-Z\\d]/g, '')\n .replace(/^([A-Z])/, m => m.toLowerCase());\n}\n\n/**\n * Capitalizes the first letter of a string\n */\nexport function toCapitalCase(str: string): string {\n return str.charAt(0).toUpperCase() + str.substr(1);\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class IconService {\n /** Store the available icons. */\n private static icons: Readonly<Record<string, string>> = {};\n\n /** Access the icons in the class. */\n get icons(): Readonly<Record<string, string>> {\n return IconService.icons;\n }\n\n /**\n * Insert icons into the iconset\n */\n static addIcons(icons: Record<string, string>): void {\n IconService.icons = { ...IconService.icons, ...icons };\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Input,\n} from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { IconName } from './icon-name';\nimport { IconService } from './icon.service';\nimport { toUpperCamelCase } from './utils/format';\n\n@Component({\n selector: 'ng-icon',\n template: '',\n styleUrls: ['./icon.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class IconComponent {\n /** Define the name of the icon to display */\n @Input() set name(name: IconName | string) {\n name = toUpperCamelCase(name);\n\n // if there is no icon with this name warn the user as they probably forgot to import it\n if (!this.iconService.icons.hasOwnProperty(name)) {\n console.warn(\n `No icon named ${name} was found. You may need to import it using the withIcons function.`,\n );\n return;\n }\n\n // insert the SVG into the template\n this.template = this.sanitizer.bypassSecurityTrustHtml(\n this.iconService.icons[name],\n );\n }\n\n /** Store the formatted icon name */\n @HostBinding('innerHTML') template?: SafeHtml;\n\n /** Define the size of the icon */\n @HostBinding('style.--ng-icon__size')\n @Input()\n set size(size: string) {\n // if the size only contains numbers, assume it is in pixels\n this._size = coerceCssPixelValue(size);\n }\n\n get size(): string {\n return this._size;\n }\n\n private _size: string = '1em';\n\n /** Define the stroke-width of the icon */\n @HostBinding('style.--ng-icon__stroke-width')\n @Input()\n strokeWidth?: string | number;\n\n /** Define the color of the icon */\n @HostBinding('style.color')\n @Input()\n color?: string;\n\n constructor(\n private readonly elementRef: ElementRef<HTMLElement>,\n private readonly sanitizer: DomSanitizer,\n private readonly iconService: IconService,\n ) {}\n}\n\nfunction coerceCssPixelValue(value: string): string {\n if (value == null) {\n return '';\n }\n\n return /^\\d+$/.test(value) ? `${value}px` : value;\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { IconComponent } from './icon.component';\nimport { IconService } from './icon.service';\n\n@NgModule({\n declarations: [IconComponent],\n exports: [IconComponent],\n})\nexport class NgIconsModule {\n constructor(private readonly iconService: IconService) {\n if (Object.keys(this.iconService.icons).length === 0) {\n throw new Error(\n 'No icons have been provided. Ensure to include some icons by importing them using NgIconsModule.withIcons({ ... }).',\n );\n }\n }\n\n /**\n * Define the icons that will be included in the application. This allows unused icons to\n * be tree-shaken away to reduce bundle size\n * @param icons The object containing the required icons\n */\n static withIcons(\n icons: Record<string, string>,\n ): ModuleWithProviders<NgIconsModule> {\n IconService.addIcons(icons);\n\n return { ngModule: NgIconsModule };\n }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AAM,IAAI,KAAK,CACb,qHAAqH,CACtH,CAAC;SACH;KACF;;;;;;IAOD,OAAO,SAAS,CACd,KAA6B;QAE7B,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAE5B,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;KACpC;;0GApBU,aAAa;2GAAb,aAAa,iBAHT,aAAa,aAClB,aAAa;2GAEZ,aAAa;2FAAb,aAAa;kBAJzB,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,aAAa,CAAC;oBAC7B,OAAO,EAAE,CAAC,aAAa,CAAC;iBACzB;;;ACPD;;;;;;"}
1
+ {"version":3,"file":"ng-icons-core.mjs","sources":["../../../../packages/core/src/lib/utils/format.ts","../../../../packages/core/src/lib/icon.service.ts","../../../../packages/core/src/lib/icon.component.ts","../../../../packages/core/src/lib/icon.module.ts","../../../../packages/core/src/ng-icons-core.ts"],"sourcesContent":["/**\n * Hyphenated to UpperCamelCase\n */\nexport function toUpperCamelCase(str: string): string {\n return toCapitalCase(toPropertyName(str));\n}\n\n/**\n * Hyphenated to lowerCamelCase\n */\nexport function toPropertyName(str: string): string {\n return str\n .replace(/([^a-zA-Z0-9])+(.)?/g, (_, __, chr) =>\n chr ? chr.toUpperCase() : '',\n )\n .replace(/[^a-zA-Z\\d]/g, '')\n .replace(/^([A-Z])/, m => m.toLowerCase());\n}\n\n/**\n * Capitalizes the first letter of a string\n */\nexport function toCapitalCase(str: string): string {\n return str.charAt(0).toUpperCase() + str.substr(1);\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class IconService {\n /** Store the available icons. */\n private static icons: Readonly<Record<string, string>> = {};\n\n /** Access the icons in the class. */\n get icons(): Readonly<Record<string, string>> {\n return IconService.icons;\n }\n\n /**\n * Insert icons into the iconset\n */\n static addIcons(icons: Record<string, string>): void {\n IconService.icons = { ...IconService.icons, ...icons };\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Input,\n} from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { IconName } from './icon-name';\nimport { IconService } from './icon.service';\nimport { toUpperCamelCase } from './utils/format';\n\n@Component({\n selector: 'ng-icon',\n template: '',\n styleUrls: ['./icon.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class IconComponent {\n /** Define the name of the icon to display */\n @Input() set name(name: IconName | string) {\n name = toUpperCamelCase(name);\n\n // if there is no icon with this name warn the user as they probably forgot to import it\n if (!this.iconService.icons.hasOwnProperty(name)) {\n console.warn(\n `No icon named ${name} was found. You may need to import it using the withIcons function.`,\n );\n return;\n }\n\n // insert the SVG into the template\n this.template = this.sanitizer.bypassSecurityTrustHtml(\n this.iconService.icons[name],\n );\n }\n\n /** Store the formatted icon name */\n @HostBinding('innerHTML') template?: SafeHtml;\n\n /** Define the size of the icon */\n @HostBinding('style.--ng-icon__size')\n @Input()\n set size(size: string) {\n // if the size only contains numbers, assume it is in pixels\n this._size = coerceCssPixelValue(size);\n }\n\n get size(): string {\n return this._size;\n }\n\n private _size: string = '1em';\n\n /** Define the stroke-width of the icon */\n @HostBinding('style.--ng-icon__stroke-width')\n @Input()\n strokeWidth?: string | number;\n\n /** Define the color of the icon */\n @HostBinding('style.color')\n @Input()\n color?: string;\n\n constructor(\n private readonly elementRef: ElementRef<HTMLElement>,\n private readonly sanitizer: DomSanitizer,\n private readonly iconService: IconService,\n ) {}\n}\n\nfunction coerceCssPixelValue(value: string): string {\n if (value == null) {\n return '';\n }\n\n return /^\\d+$/.test(value) ? `${value}px` : value;\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { IconComponent } from './icon.component';\nimport { IconService } from './icon.service';\n\n@NgModule({\n declarations: [IconComponent],\n exports: [IconComponent],\n})\nexport class NgIconsModule {\n constructor(private readonly iconService: IconService) {\n if (Object.keys(this.iconService.icons).length === 0) {\n throw new Error(\n 'No icons have been provided. Ensure to include some icons by importing them using NgIconsModule.withIcons({ ... }).',\n );\n }\n }\n\n /**\n * Define the icons that will be included in the application. This allows unused icons to\n * be tree-shaken away to reduce bundle size\n * @param icons The object containing the required icons\n */\n static withIcons(\n icons: Record<string, string>,\n ): ModuleWithProviders<NgIconsModule> {\n IconService.addIcons(icons);\n\n return { ngModule: NgIconsModule };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2.IconService","i1.IconService"],"mappings":";;;;AAAA;;AAEG;AACG,SAAU,gBAAgB,CAAC,GAAW,EAAA;AAC1C,IAAA,OAAO,aAAa,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;AAC5C,CAAC;AAED;;AAEG;AACG,SAAU,cAAc,CAAC,GAAW,EAAA;AACxC,IAAA,OAAO,GAAG;SACP,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,GAAG,KAC1C,GAAG,GAAG,GAAG,CAAC,WAAW,EAAE,GAAG,EAAE,CAC7B;AACA,SAAA,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC;AAC3B,SAAA,OAAO,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;AAC/C,CAAC;AAED;;AAEG;AACG,SAAU,aAAa,CAAC,GAAW,EAAA;AACvC,IAAA,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACrD;;MCnBa,WAAW,CAAA;;AAKtB,IAAA,IAAI,KAAK,GAAA;QACP,OAAO,WAAW,CAAC,KAAK,CAAC;KAC1B;AAED;;AAEG;IACH,OAAO,QAAQ,CAAC,KAA6B,EAAA;QAC3C,WAAW,CAAC,KAAK,GAAQ,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,WAAW,CAAC,KAAK,CAAA,EAAK,KAAK,CAAE,CAAC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ion: "12.0.0", version: "13.3.4", ngImport: i0, type: IconService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
20
- IconService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: IconService, providedIn: 'root' });
21
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: IconService, decorators: [{
19
+ IconService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: IconService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
20
+ IconService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: IconService, providedIn: 'root' });
21
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: IconService, decorators: [{
22
22
  type: Injectable,
23
23
  args: [{
24
24
  providedIn: 'root',
@@ -74,9 +74,9 @@ class IconComponent {
74
74
  return this._size;
75
75
  }
76
76
  }
77
- IconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: IconComponent, deps: [{ token: i0.ElementRef }, { token: i1.DomSanitizer }, { token: IconService }], target: i0.ɵɵFactoryTarget.Component });
78
- IconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.4", type: IconComponent, selector: "ng-icon", inputs: { name: "name", size: "size", strokeWidth: "strokeWidth", color: "color" }, host: { properties: { "innerHTML": "this.template", "style.--ng-icon__size": "this.size", "style.--ng-icon__stroke-width": "this.strokeWidth", "style.color": "this.color" } }, ngImport: i0, template: '', isInline: true, styles: [":host{display:inline-block;width:var(--ng-icon__size);height:var(--ng-icon__size)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
79
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: IconComponent, decorators: [{
77
+ IconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: IconComponent, deps: [{ token: i0.ElementRef }, { token: i1.DomSanitizer }, { token: IconService }], target: i0.ɵɵFactoryTarget.Component });
78
+ IconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: IconComponent, selector: "ng-icon", inputs: { name: "name", size: "size", strokeWidth: "strokeWidth", color: "color" }, host: { properties: { "innerHTML": "this.template", "style.--ng-icon__size": "this.size", "style.--ng-icon__stroke-width": "this.strokeWidth", "style.color": "this.color" } }, ngImport: i0, template: '', isInline: true, styles: [":host{display:inline-block;width:var(--ng-icon__size);height:var(--ng-icon__size)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
79
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: IconComponent, decorators: [{
80
80
  type: Component,
81
81
  args: [{ selector: 'ng-icon', template: '', changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:inline-block;width:var(--ng-icon__size);height:var(--ng-icon__size)}\n"] }]
82
82
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.DomSanitizer }, { type: IconService }]; }, propDecorators: { name: [{
@@ -124,10 +124,10 @@ class NgIconsModule {
124
124
  return { ngModule: NgIconsModule };
125
125
  }
126
126
  }
127
- NgIconsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: NgIconsModule, deps: [{ token: IconService }], target: i0.ɵɵFactoryTarget.NgModule });
128
- NgIconsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: NgIconsModule, declarations: [IconComponent], exports: [IconComponent] });
129
- NgIconsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: NgIconsModule });
130
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.4", ngImport: i0, type: NgIconsModule, decorators: [{
127
+ NgIconsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: NgIconsModule, deps: [{ token: IconService }], target: i0.ɵɵFactoryTarget.NgModule });
128
+ NgIconsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.0", ngImport: i0, type: NgIconsModule, declarations: [IconComponent], exports: [IconComponent] });
129
+ NgIconsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: NgIconsModule });
130
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: NgIconsModule, decorators: [{
131
131
  type: NgModule,
132
132
  args: [{
133
133
  declarations: [IconComponent],
@@ -1 +1 @@
1
- {"version":3,"file":"ng-icons-core.mjs","sources":["../../../../packages/core/src/lib/icon.service.ts","../../../../packages/core/src/lib/utils/format.ts","../../../../packages/core/src/lib/icon.component.ts","../../../../packages/core/src/lib/icon.module.ts","../../../../packages/core/src/ng-icons-core.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class IconService {\n /** Store the available icons. */\n private static icons: Readonly<Record<string, string>> = {};\n\n /** Access the icons in the class. */\n get icons(): Readonly<Record<string, string>> {\n return IconService.icons;\n }\n\n /**\n * Insert icons into the iconset\n */\n static addIcons(icons: Record<string, string>): void {\n IconService.icons = { ...IconService.icons, ...icons };\n }\n}\n","/**\n * Hyphenated to UpperCamelCase\n */\nexport function toUpperCamelCase(str: string): string {\n return toCapitalCase(toPropertyName(str));\n}\n\n/**\n * Hyphenated to lowerCamelCase\n */\nexport function toPropertyName(str: string): string {\n return str\n .replace(/([^a-zA-Z0-9])+(.)?/g, (_, __, chr) =>\n chr ? chr.toUpperCase() : '',\n )\n .replace(/[^a-zA-Z\\d]/g, '')\n .replace(/^([A-Z])/, m => m.toLowerCase());\n}\n\n/**\n * Capitalizes the first letter of a string\n */\nexport function toCapitalCase(str: string): string {\n return str.charAt(0).toUpperCase() + str.substr(1);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Input,\n} from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { IconName } from './icon-name';\nimport { IconService } from './icon.service';\nimport { toUpperCamelCase } from './utils/format';\n\n@Component({\n selector: 'ng-icon',\n template: '',\n styleUrls: ['./icon.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class IconComponent {\n /** Define the name of the icon to display */\n @Input() set name(name: IconName | string) {\n name = toUpperCamelCase(name);\n\n // if there is no icon with this name warn the user as they probably forgot to import it\n if (!this.iconService.icons.hasOwnProperty(name)) {\n console.warn(\n `No icon named ${name} was found. You may need to import it using the withIcons function.`,\n );\n return;\n }\n\n // insert the SVG into the template\n this.template = this.sanitizer.bypassSecurityTrustHtml(\n this.iconService.icons[name],\n );\n }\n\n /** Store the formatted icon name */\n @HostBinding('innerHTML') template?: SafeHtml;\n\n /** Define the size of the icon */\n @HostBinding('style.--ng-icon__size')\n @Input()\n set size(size: string) {\n // if the size only contains numbers, assume it is in pixels\n this._size = coerceCssPixelValue(size);\n }\n\n get size(): string {\n return this._size;\n }\n\n private _size: string = '1em';\n\n /** Define the stroke-width of the icon */\n @HostBinding('style.--ng-icon__stroke-width')\n @Input()\n strokeWidth?: string | number;\n\n /** Define the color of the icon */\n @HostBinding('style.color')\n @Input()\n color?: string;\n\n constructor(\n private readonly elementRef: ElementRef<HTMLElement>,\n private readonly sanitizer: DomSanitizer,\n private readonly iconService: IconService,\n ) {}\n}\n\nfunction coerceCssPixelValue(value: string): string {\n if (value == null) {\n return '';\n }\n\n return /^\\d+$/.test(value) ? `${value}px` : value;\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { IconComponent } from './icon.component';\nimport { IconService } from './icon.service';\n\n@NgModule({\n declarations: [IconComponent],\n exports: [IconComponent],\n})\nexport class NgIconsModule {\n constructor(private readonly iconService: IconService) {\n if (Object.keys(this.iconService.icons).length === 0) {\n throw new Error(\n 'No icons have been provided. Ensure to include some icons by importing them using NgIconsModule.withIcons({ ... }).',\n );\n }\n }\n\n /**\n * Define the icons that will be included in the application. This allows unused icons to\n * be tree-shaken away to reduce bundle size\n * @param icons The object containing the required icons\n */\n static withIcons(\n icons: Record<string, string>,\n ): ModuleWithProviders<NgIconsModule> {\n IconService.addIcons(icons);\n\n return { ngModule: NgIconsModule };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAKa,WAAW;;IAKtB,IAAI,KAAK;QACP,OAAO,WAAW,CAAC,KAAK,CAAC;KAC1B;;;;IAKD,OAAO,QAAQ,CAAC,KAA6B;QAC3C,WAAW,CAAC,KAAK,GAAG,EAAE,GAAG,WAAW,CAAC,KAAK,EAAE,GAAG,KAAK,EAAE,CAAC;KACxD;;AAbD;AACe,iBAAK,GAAqC,EAAG,CAAA;wGAFjD,WAAW;4GAAX,WAAW,cAFV,MAAM;2FAEP,WAAW;kBAHvB,UAAU;mBAAC;oBACV,UAAU,EAAE,MAAM;iBACnB;;;ACJD;;;SAGgB,gBAAgB,CAAC,GAAW;IAC1C,OAAO,aAAa,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;AAC5C,CAAC;AAED;;;SAGgB,cAAc,CAAC,GAAW;IACxC,OAAO,GAAG;SACP,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,GAAG,KAC1C,GAAG,GAAG,GAAG,CAAC,WAAW,EAAE,GAAG,EAAE,CAC7B;SACA,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC;SAC3B,OAAO,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;AAC/C,CAAC;AAED;;;SAGgB,aAAa,CAAC,GAAW;I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,SAAS,mBAAmB,CAAC,KAAa;IACxC,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,OAAO,EAAE,CAAC;KACX;IAED,OAAO,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,KAAK,IAAI,GAAG,KAAK,CAAC;AACpD;;MCrEa,aAAa;IACxB,YAA6B,WAAwB;QAAxB,gBAAW,GAAX,WAAW,CAAa;QACnD,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;YACpD,MAAM,IAAI,KAAK,CACb,qHAAqH,CACtH,CAAC;SACH;KACF;;;;;;IAOD,OAAO,SAAS,CACd,KAA6B;QAE7B,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAE5B,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;KACpC;;0GApBU,aAAa;2GAAb,aAAa,iBAHT,aAAa,aAClB,aAAa;2GAEZ,aAAa;2FAAb,aAAa;kBAJzB,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,aAAa,CAAC;oBAC7B,OAAO,EAAE,CAAC,aAAa,CAAC;iBACzB;;;ACPD;;;;;;"}
1
+ {"version":3,"file":"ng-icons-core.mjs","sources":["../../../../packages/core/src/lib/icon.service.ts","../../../../packages/core/src/lib/utils/format.ts","../../../../packages/core/src/lib/icon.component.ts","../../../../packages/core/src/lib/icon.module.ts","../../../../packages/core/src/ng-icons-core.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class IconService {\n /** Store the available icons. */\n private static icons: Readonly<Record<string, string>> = {};\n\n /** Access the icons in the class. */\n get icons(): Readonly<Record<string, string>> {\n return IconService.icons;\n }\n\n /**\n * Insert icons into the iconset\n */\n static addIcons(icons: Record<string, string>): void {\n IconService.icons = { ...IconService.icons, ...icons };\n }\n}\n","/**\n * Hyphenated to UpperCamelCase\n */\nexport function toUpperCamelCase(str: string): string {\n return toCapitalCase(toPropertyName(str));\n}\n\n/**\n * Hyphenated to lowerCamelCase\n */\nexport function toPropertyName(str: string): string {\n return str\n .replace(/([^a-zA-Z0-9])+(.)?/g, (_, __, chr) =>\n chr ? chr.toUpperCase() : '',\n )\n .replace(/[^a-zA-Z\\d]/g, '')\n .replace(/^([A-Z])/, m => m.toLowerCase());\n}\n\n/**\n * Capitalizes the first letter of a string\n */\nexport function toCapitalCase(str: string): string {\n return str.charAt(0).toUpperCase() + str.substr(1);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Input,\n} from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { IconName } from './icon-name';\nimport { IconService } from './icon.service';\nimport { toUpperCamelCase } from './utils/format';\n\n@Component({\n selector: 'ng-icon',\n template: '',\n styleUrls: ['./icon.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class IconComponent {\n /** Define the name of the icon to display */\n @Input() set name(name: IconName | string) {\n name = toUpperCamelCase(name);\n\n // if there is no icon with this name warn the user as they probably forgot to import it\n if (!this.iconService.icons.hasOwnProperty(name)) {\n console.warn(\n `No icon named ${name} was found. You may need to import it using the withIcons function.`,\n );\n return;\n }\n\n // insert the SVG into the template\n this.template = this.sanitizer.bypassSecurityTrustHtml(\n this.iconService.icons[name],\n );\n }\n\n /** Store the formatted icon name */\n @HostBinding('innerHTML') template?: SafeHtml;\n\n /** Define the size of the icon */\n @HostBinding('style.--ng-icon__size')\n @Input()\n set size(size: string) {\n // if the size only contains numbers, assume it is in pixels\n this._size = coerceCssPixelValue(size);\n }\n\n get size(): string {\n return this._size;\n }\n\n private _size: string = '1em';\n\n /** Define the stroke-width of the icon */\n @HostBinding('style.--ng-icon__stroke-width')\n @Input()\n strokeWidth?: string | number;\n\n /** Define the color of the icon */\n @HostBinding('style.color')\n @Input()\n color?: string;\n\n constructor(\n private readonly elementRef: ElementRef<HTMLElement>,\n private readonly sanitizer: DomSanitizer,\n private readonly iconService: IconService,\n ) {}\n}\n\nfunction coerceCssPixelValue(value: string): string {\n if (value == null) {\n return '';\n }\n\n return /^\\d+$/.test(value) ? `${value}px` : value;\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { IconComponent } from './icon.component';\nimport { IconService } from './icon.service';\n\n@NgModule({\n declarations: [IconComponent],\n exports: [IconComponent],\n})\nexport class NgIconsModule {\n constructor(private readonly iconService: IconService) {\n if (Object.keys(this.iconService.icons).length === 0) {\n throw new Error(\n 'No icons have been provided. Ensure to include some icons by importing them using NgIconsModule.withIcons({ ... }).',\n );\n }\n }\n\n /**\n * Define the icons that will be included in the application. This allows unused icons to\n * be tree-shaken away to reduce bundle size\n * @param icons The object containing the required icons\n */\n static withIcons(\n icons: Record<string, string>,\n ): ModuleWithProviders<NgIconsModule> {\n IconService.addIcons(icons);\n\n return { ngModule: NgIconsModule };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2.IconService","i1.IconService"],"mappings":";;;;MAKa,WAAW,CAAA;;AAKtB,IAAA,IAAI,KAAK,GAAA;QACP,OAAO,WAAW,CAAC,KAAK,CAAC;KAC1B;AAED;;AAEG;IACH,OAAO,QAAQ,CAAC,KAA6B,EAAA;AAC3C,QAAA,WAAW,CAAC,KAAK,GAAG,EAAE,GAAG,WAAW,CAAC,KAAK,EAAE,GAAG,KAAK,EAAE,CAAC;KACxD;;AAbD;AACe,WAAK,CAAA,KAAA,GAAqC,EAAG,CAAA;wGAFjD,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAX,WAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,cAFV,MAAM,EAAA,C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