UNPKG

ng-zorro-antd

Version:

An enterprise-class UI components based on Ant Design and Angular

1 lines 25.1 kB
{"version":3,"file":"ng-zorro-antd-icon.mjs","sources":["../../components/icon/icons.ts","../../components/icon/icon.service.ts","../../components/icon/icon.directive.ts","../../components/icon/provide-icons.ts","../../components/icon/icon.module.ts","../../components/icon/public-api.ts","../../components/icon/ng-zorro-antd-icon.ts"],"sourcesContent":["/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { IconDefinition } from '@ant-design/icons-angular';\nimport {\n BarsOutline,\n CalendarOutline,\n CaretDownFill,\n CaretDownOutline,\n CaretUpFill,\n CaretUpOutline,\n CheckCircleFill,\n CheckCircleOutline,\n CheckOutline,\n ClockCircleOutline,\n CloseCircleFill,\n CloseCircleOutline,\n CloseOutline,\n CopyOutline,\n DeleteOutline,\n DoubleLeftOutline,\n DoubleRightOutline,\n DownOutline,\n EditOutline,\n EllipsisOutline,\n ExclamationCircleFill,\n ExclamationCircleOutline,\n EyeInvisibleOutline,\n EyeOutline,\n FileFill,\n FileOutline,\n FilterFill,\n InfoCircleFill,\n InfoCircleOutline,\n LeftOutline,\n LoadingOutline,\n PaperClipOutline,\n QuestionCircleOutline,\n RightOutline,\n RotateLeftOutline,\n RotateRightOutline,\n SearchOutline,\n StarFill,\n SwapOutline,\n SwapRightOutline,\n UploadOutline,\n UpOutline,\n VerticalAlignTopOutline,\n ZoomInOutline,\n ZoomOutOutline\n} from '@ant-design/icons-angular/icons';\n\nexport const NZ_ICONS_USED_BY_ZORRO: IconDefinition[] = [\n BarsOutline,\n CalendarOutline,\n CaretUpFill,\n CaretUpOutline,\n CaretDownFill,\n CaretDownOutline,\n CheckCircleFill,\n CheckCircleOutline,\n CheckOutline,\n ClockCircleOutline,\n CloseCircleOutline,\n CloseCircleFill,\n CloseOutline,\n CopyOutline,\n DeleteOutline,\n DoubleLeftOutline,\n DoubleRightOutline,\n DownOutline,\n EditOutline,\n EllipsisOutline,\n ExclamationCircleFill,\n ExclamationCircleOutline,\n EyeOutline,\n EyeInvisibleOutline,\n FileFill,\n FileOutline,\n FilterFill,\n InfoCircleFill,\n InfoCircleOutline,\n LeftOutline,\n LoadingOutline,\n PaperClipOutline,\n QuestionCircleOutline,\n RightOutline,\n RotateRightOutline,\n RotateLeftOutline,\n StarFill,\n SearchOutline,\n StarFill,\n UploadOutline,\n VerticalAlignTopOutline,\n UpOutline,\n SwapOutline,\n SwapRightOutline,\n ZoomInOutline,\n ZoomOutOutline\n];\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { Platform } from '@angular/cdk/platform';\nimport { inject, Injectable, InjectionToken } from '@angular/core';\nimport { Subject } from 'rxjs';\n\nimport { IconDefinition, IconService } from '@ant-design/icons-angular';\n\nimport { IconConfig, NzConfigService, onConfigChangeEventForComponent } from 'ng-zorro-antd/core/config';\nimport { warn } from 'ng-zorro-antd/core/logger';\n\nimport { NZ_ICONS_USED_BY_ZORRO } from './icons';\n\nexport interface NzIconfontOption {\n scriptUrl: string;\n}\n\nexport const NZ_ICONS = new InjectionToken<IconDefinition[]>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'nz-icons' : ''\n);\nexport const NZ_ICON_DEFAULT_TWOTONE_COLOR = new InjectionToken(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'nz-icon-default-twotone-color' : ''\n);\nexport const DEFAULT_TWOTONE_COLOR = '#1890ff';\n\n/**\n * It should be a global singleton, otherwise registered icons could not be found.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class NzIconService extends IconService {\n protected readonly nzConfigService = inject(NzConfigService);\n private readonly platform = inject(Platform);\n configUpdated$ = new Subject<void>();\n\n protected override get _disableDynamicLoading(): boolean {\n return !this.platform.isBrowser;\n }\n\n private iconfontCache = new Set<string>();\n\n normalizeSvgElement(svg: SVGElement): void {\n if (!svg.getAttribute('viewBox')) {\n this.renderer.setAttribute(svg, 'viewBox', '0 0 1024 1024');\n }\n if (!svg.getAttribute('width') || !svg.getAttribute('height')) {\n this.renderer.setAttribute(svg, 'width', '1em');\n this.renderer.setAttribute(svg, 'height', '1em');\n }\n if (!svg.getAttribute('fill')) {\n this.renderer.setAttribute(svg, 'fill', 'currentColor');\n }\n }\n\n fetchFromIconfont(opt: NzIconfontOption): void {\n const { scriptUrl } = opt;\n if (this.document && !this.iconfontCache.has(scriptUrl)) {\n const script = this.renderer.createElement('script');\n this.renderer.setAttribute(script, 'src', scriptUrl);\n this.renderer.setAttribute(script, 'data-namespace', scriptUrl.replace(/^(https?|http):/g, ''));\n this.renderer.appendChild(this.document.body, script);\n this.iconfontCache.add(scriptUrl);\n }\n }\n\n createIconfontIcon(type: string): SVGElement {\n return this._createSVGElementFromString(`<svg><use xlink:href=\"${type}\"></svg>`);\n }\n\n constructor() {\n super();\n this.addIcon(...NZ_ICONS_USED_BY_ZORRO, ...(inject(NZ_ICONS, { optional: true }) || []));\n\n this.onConfigChange();\n this.configDefaultTwotoneColor();\n this.configDefaultTheme();\n }\n\n private onConfigChange(): void {\n onConfigChangeEventForComponent('icon', () => {\n this.configDefaultTwotoneColor();\n this.configDefaultTheme();\n this.configUpdated$.next();\n });\n }\n\n private configDefaultTheme(): void {\n const iconConfig = this.getConfig();\n this.defaultTheme = iconConfig.nzTheme || 'outline';\n }\n\n private configDefaultTwotoneColor(): void {\n const iconConfig = this.getConfig();\n const defaultTwotoneColor = iconConfig.nzTwotoneColor || DEFAULT_TWOTONE_COLOR;\n\n let primaryColor = DEFAULT_TWOTONE_COLOR;\n\n if (defaultTwotoneColor) {\n if (defaultTwotoneColor.startsWith('#')) {\n primaryColor = defaultTwotoneColor;\n } else {\n warn('Twotone color must be a hex color!');\n }\n }\n\n this.twoToneColor = { primaryColor };\n }\n\n private getConfig(): IconConfig {\n return this.nzConfigService.getConfigForComponent('icon') || {};\n }\n}\n\nexport const NZ_ICONS_PATCH = new InjectionToken<IconDefinition[]>('nz_icons_patch');\n\n@Injectable()\nexport class NzIconPatchService {\n private readonly extraIcons = inject(NZ_ICONS_PATCH, { self: true });\n private readonly rootIconService = inject(NzIconService);\n patched = false;\n\n doPatch(): void {\n if (this.patched) {\n return;\n }\n\n this.extraIcons.forEach(iconDefinition => this.rootIconService.addIcon(iconDefinition));\n this.patched = true;\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n AfterContentChecked,\n ChangeDetectorRef,\n DestroyRef,\n Directive,\n input,\n NgZone,\n PLATFORM_ID,\n PendingTasks,\n booleanAttribute,\n inject,\n numberAttribute,\n effect,\n computed,\n ElementRef,\n Renderer2\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { animationFrameScheduler, asapScheduler, debounceTime, finalize } from 'rxjs';\n\nimport { IconBase, RenderMeta, ThemeType } from '@ant-design/icons-angular';\n\nimport { warn } from 'ng-zorro-antd/core/logger';\nimport { wrapIntoObservable } from 'ng-zorro-antd/core/util';\n\nimport { NzIconPatchService, NzIconService } from './icon.service';\n\n@Directive({\n selector: 'nz-icon,[nz-icon]',\n exportAs: 'nzIcon',\n host: {\n role: 'img',\n '[class]': `hostClass()`,\n '[attr.aria-label]': 'nzType()'\n }\n})\nexport class NzIconDirective extends IconBase implements AfterContentChecked {\n private readonly ngZone = inject(NgZone);\n private readonly changeDetectorRef = inject(ChangeDetectorRef);\n private readonly destroyRef = inject(DestroyRef);\n private readonly pendingTasks = inject(PendingTasks);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n protected readonly el = inject(ElementRef).nativeElement as HTMLElement;\n protected readonly renderer = inject(Renderer2);\n protected readonly iconService = inject(NzIconService);\n\n readonly nzType = input<string>();\n readonly nzTheme = input<ThemeType>();\n readonly nzTwotoneColor = input<string>();\n readonly nzSpin = input(false, { transform: booleanAttribute });\n readonly nzRotate = input(0, { transform: numberAttribute });\n readonly nzIconfont = input<string>();\n\n protected readonly hostClass = computed(() => {\n const type = this.nzType();\n const spin = this.nzSpin();\n const cls = ['anticon'];\n if (type) {\n cls.push(`anticon-${type}`);\n }\n if (spin || type === 'loading') {\n cls.push('anticon-spin');\n }\n return cls;\n });\n\n protected get selfRenderMeta(): RenderMeta {\n return {\n type: this.nzType() as string,\n theme: this.nzTheme(),\n twoToneColor: this.nzTwotoneColor()\n };\n }\n\n constructor() {\n super();\n inject(NzIconPatchService, { optional: true })?.doPatch();\n\n let renderedIcon = false;\n effect(() => {\n void this.nzType();\n void this.nzTwotoneColor();\n void this.nzTheme();\n // This is used to reduce the number of change detections\n // while the icon is being loaded asynchronously.\n if (this.nzType()) {\n renderedIcon = true;\n this.ngZone.runOutsideAngular(() => this.changeIcon2());\n } else if (renderedIcon) {\n renderedIcon = false;\n this._clearSVGElement();\n }\n });\n\n effect(() => {\n void this.nzRotate();\n this.handleRotate(this.el.firstChild as SVGElement | null);\n });\n\n effect(() => {\n const iconfont = this.nzIconfont();\n if (iconfont) {\n this._setSVGElement(this.iconService.createIconfontIcon(`#${iconfont}`));\n }\n });\n }\n\n /**\n * If custom content is provided, try to normalize SVG elements.\n */\n ngAfterContentChecked(): void {\n if (!this.nzType()) {\n const children = this.el.children;\n for (let index = children.length - 1; index >= 0; index--) {\n const child = children[index];\n if (child.tagName.toLowerCase() === 'svg') {\n this.iconService.normalizeSvgElement(child as SVGElement);\n }\n }\n }\n }\n\n /**\n * Replacement of `changeIcon` for more modifications.\n */\n private changeIcon2(): void {\n // It is used to hydrate the icon component properly when\n // zoneless change detection is used in conjunction with server-side rendering.\n const removeTask = this.pendingTasks.add();\n\n const svgOrRemove$ = wrapIntoObservable(this._changeIcon()).pipe(\n // We need to individually debounce the icon rendering on each animation\n // frame to prevent frame drops when many icons are being rendered on the\n // page, such as in a `@for` loop.\n debounceTime(0, this.isBrowser ? animationFrameScheduler : asapScheduler),\n takeUntilDestroyed(this.destroyRef),\n finalize(removeTask)\n );\n\n svgOrRemove$.subscribe({\n next: svg => {\n // Get back into the Angular zone after completing all the tasks.\n // Since we manually run change detection locally, we have to re-enter\n // the zone because the change detection might also be run on other local\n // components, leading them to handle template functions outside of the Angular zone.\n this.ngZone.run(() => {\n // The _changeIcon method would call Renderer to remove the element of the old icon,\n // which would call `markElementAsRemoved` eventually,\n // so we should call `detectChanges` to tell Angular remove the DOM node.\n // #7186\n this.changeDetectorRef.detectChanges();\n\n if (svg) {\n this.setSVGData(svg);\n this.handleRotate(svg);\n }\n });\n },\n error: warn\n });\n }\n\n private handleRotate(svg: SVGElement | null): void {\n if (!svg) {\n return;\n }\n\n const rotate = this.nzRotate();\n if (rotate) {\n this.renderer.setAttribute(svg, 'style', `transform: rotate(${rotate}deg)`);\n } else {\n this.renderer.removeAttribute(svg, 'style');\n }\n }\n\n private setSVGData(svg: SVGElement): void {\n this.renderer.setAttribute(svg, 'data-icon', this.nzType() as string);\n this.renderer.setAttribute(svg, 'aria-hidden', 'true');\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { EnvironmentProviders, makeEnvironmentProviders, Provider } from '@angular/core';\n\nimport { IconDefinition } from '@ant-design/icons-angular';\n\nimport { NZ_ICONS, NZ_ICONS_PATCH, NzIconPatchService } from './icon.service';\n\n/**\n * Provide icon definitions for NzIcon in root\n *\n * @param icons Icon definitions\n */\nexport const provideNzIcons = (icons: IconDefinition[]): EnvironmentProviders => {\n return makeEnvironmentProviders([\n {\n provide: NZ_ICONS,\n useValue: icons\n }\n ]);\n};\n\n/**\n * Provide icon definitions for NzIcon in feature module or standalone component\n *\n * @param icons Icon definitions\n */\nexport const provideNzIconsPatch = (icons: IconDefinition[]): Provider[] => {\n return [\n NzIconPatchService,\n {\n provide: NZ_ICONS_PATCH,\n useValue: icons\n }\n ];\n};\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { IconDefinition } from '@ant-design/icons-angular';\n\nimport { NzIconDirective } from './icon.directive';\nimport { provideNzIcons, provideNzIconsPatch } from './provide-icons';\n\n@NgModule({\n imports: [NzIconDirective],\n exports: [NzIconDirective]\n})\nexport class NzIconModule {\n static forRoot(icons: IconDefinition[]): ModuleWithProviders<NzIconModule> {\n return {\n ngModule: NzIconModule,\n providers: [provideNzIcons(icons)]\n };\n }\n\n static forChild(icons: IconDefinition[]): ModuleWithProviders<NzIconModule> {\n return {\n ngModule: NzIconModule,\n providers: [provideNzIconsPatch(icons)]\n };\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nexport * from './icon.module';\nexport * from './icon.directive';\nexport * from './icon.service';\nexport * from './icons';\nexport * from './provide-icons';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;AAGG;AAmDI,MAAM,sBAAsB,GAAqB;IACtD,WAAW;IACX,eAAe;IACf,WAAW;IACX,cAAc;IACd,aAAa;IACb,gBAAgB;IAChB,eAAe;IACf,kBAAkB;IAClB,YAAY;IACZ,kBAAkB;IAClB,kBAAkB;IAClB,eAAe;IACf,YAAY;IACZ,WAAW;IACX,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IAClB,WAAW;IACX,WAAW;IACX,eAAe;IACf,qBAAqB;IACrB,wBAAwB;IACxB,UAAU;IACV,mBAAmB;IACnB,QAAQ;IACR,WAAW;IACX,UAAU;IACV,cAAc;IACd,iBAAiB;IACjB,WAAW;IACX,cAAc;IACd,gBAAgB;IAChB,qBAAqB;IACr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