ng-hub-ui-avatar 22.4.0 → 22.5.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.
package/README.md
CHANGED
|
@@ -86,7 +86,7 @@ Fallback uses a source priority order. By default, the component tries the suppo
|
|
|
86
86
|
- **Flexible Shape**: Round or square avatars with configurable corner radius and border.
|
|
87
87
|
- **CSS Variables**: Full theming via canonical `--hub-avatar-*` custom properties.
|
|
88
88
|
- **Signals API**: Modern Angular inputs/outputs built on signals.
|
|
89
|
-
- **
|
|
89
|
+
- **Standalone-first**: `<hub-avatar>` is a standalone component — import it directly, no `NgModule` required. Customize colors, source priority order and cache behavior via `provideAvatar()`.
|
|
90
90
|
|
|
91
91
|
## Installation
|
|
92
92
|
|
|
@@ -97,59 +97,67 @@ npm install ng-hub-ui-avatar
|
|
|
97
97
|
## Quick Start
|
|
98
98
|
|
|
99
99
|
```typescript
|
|
100
|
-
import {
|
|
101
|
-
import { BrowserModule } from '@angular/platform-browser';
|
|
100
|
+
import { bootstrapApplication } from '@angular/platform-browser';
|
|
102
101
|
import { provideHttpClient } from '@angular/common/http';
|
|
103
|
-
import {
|
|
102
|
+
import { provideAvatar } from 'ng-hub-ui-avatar';
|
|
104
103
|
import { AppComponent } from './app.component';
|
|
105
104
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
})
|
|
112
|
-
export class AppModule {}
|
|
105
|
+
bootstrapApplication(AppComponent, {
|
|
106
|
+
providers: [
|
|
107
|
+
provideHttpClient(), // required for async remote sources (Gravatar, GitHub…)
|
|
108
|
+
provideAvatar() // optional — pass a config to customise sources/colours/cache
|
|
109
|
+
]
|
|
110
|
+
});
|
|
113
111
|
```
|
|
114
112
|
|
|
115
|
-
|
|
113
|
+
Then import the standalone component and use it in any template:
|
|
116
114
|
|
|
117
|
-
|
|
115
|
+
```typescript
|
|
116
|
+
import { Component } from '@angular/core';
|
|
117
|
+
import { AvatarComponent } from 'ng-hub-ui-avatar';
|
|
118
118
|
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
@Component({
|
|
120
|
+
selector: 'app-profile',
|
|
121
|
+
standalone: true,
|
|
122
|
+
imports: [AvatarComponent],
|
|
123
|
+
template: `<hub-avatar name="John Doe" [round]="true" size="64"></hub-avatar>`
|
|
124
|
+
})
|
|
125
|
+
export class ProfileComponent {}
|
|
121
126
|
```
|
|
122
127
|
|
|
128
|
+
> `provideAvatar()` is optional — `<hub-avatar>` works out of the box with defaults. `HttpClient` is only needed for async remote sources (Gravatar, GitHub).
|
|
129
|
+
|
|
123
130
|
## Usage
|
|
124
131
|
|
|
125
|
-
|
|
132
|
+
`<hub-avatar>` is a **standalone** component: import `AvatarComponent` directly into the `imports` of any standalone component (as shown above). No `NgModule` is required.
|
|
126
133
|
|
|
127
|
-
###
|
|
134
|
+
### Configuration
|
|
128
135
|
|
|
129
|
-
|
|
130
|
-
import { AvatarModule } from 'ng-hub-ui-avatar';
|
|
136
|
+
Customise source priority, colour palette or src-cache behaviour with `provideAvatar()`:
|
|
131
137
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
135
|
-
|
|
138
|
+
```typescript
|
|
139
|
+
import { provideAvatar } from 'ng-hub-ui-avatar';
|
|
140
|
+
import { AvatarSource } from 'ng-hub-ui-avatar';
|
|
141
|
+
|
|
142
|
+
providers: [
|
|
143
|
+
provideAvatar({
|
|
144
|
+
sourcePriorityOrder: [AvatarSource.CUSTOM, AvatarSource.GRAVATAR, AvatarSource.INITIALS],
|
|
145
|
+
colors: ['#1abc9c', '#3498db', '#9b59b6']
|
|
146
|
+
})
|
|
147
|
+
];
|
|
136
148
|
```
|
|
137
149
|
|
|
138
|
-
###
|
|
150
|
+
### Legacy `NgModule` (deprecated)
|
|
139
151
|
|
|
140
|
-
|
|
152
|
+
`AvatarModule` is still exported for backward compatibility and now simply re-exports the standalone component. It is **deprecated** — prefer importing `AvatarComponent` and using `provideAvatar()`.
|
|
141
153
|
|
|
142
154
|
```typescript
|
|
143
|
-
import {
|
|
144
|
-
import { AvatarModule } from 'ng-hub-ui-avatar';
|
|
155
|
+
import { AvatarModule } from 'ng-hub-ui-avatar'; // deprecated
|
|
145
156
|
|
|
146
|
-
@
|
|
147
|
-
|
|
148
|
-
standalone: true,
|
|
149
|
-
imports: [AvatarModule],
|
|
150
|
-
template: `<hub-avatar name="John Doe" [round]="true" size="64"></hub-avatar>`
|
|
157
|
+
@NgModule({
|
|
158
|
+
imports: [AvatarModule] // AvatarModule.forRoot(config) still works too
|
|
151
159
|
})
|
|
152
|
-
export class
|
|
160
|
+
export class FeatureModule {}
|
|
153
161
|
```
|
|
154
162
|
|
|
155
163
|
### Examples
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, Optional, Inject, Injectable, input, computed, output, SecurityContext, ViewChild, Component, NgModule } from '@angular/core';
|
|
2
|
+
import { InjectionToken, Optional, Inject, Injectable, input, computed, output, SecurityContext, ViewChild, Component, NgModule, makeEnvironmentProviders } from '@angular/core';
|
|
3
3
|
import * as i3 from '@angular/platform-browser';
|
|
4
4
|
import { takeWhile, map } from 'rxjs/operators';
|
|
5
5
|
import * as i1 from '@angular/common/http';
|
|
6
6
|
import { Md5 } from 'ts-md5';
|
|
7
|
-
import { CommonModule } from '@angular/common';
|
|
8
7
|
|
|
9
8
|
/**
|
|
10
9
|
* Token used to inject the AvatarConfig object
|
|
@@ -724,7 +723,7 @@ class AvatarComponent {
|
|
|
724
723
|
this.sources = this.sources.filter((source) => source.sourceType !== sourceType);
|
|
725
724
|
}
|
|
726
725
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: AvatarComponent, deps: [{ token: SourceFactory }, { token: AvatarService }, { token: i3.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
|
|
727
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: AvatarComponent, isStandalone:
|
|
726
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: AvatarComponent, isStandalone: true, selector: "hub-avatar", inputs: { round: { classPropertyName: "round", publicName: "round", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, textSizeRatio: { classPropertyName: "textSizeRatio", publicName: "textSizeRatio", isSignal: true, isRequired: false, transformFunction: null }, bgColor: { classPropertyName: "bgColor", publicName: "bgColor", isSignal: true, isRequired: false, transformFunction: null }, fgColor: { classPropertyName: "fgColor", publicName: "fgColor", isSignal: true, isRequired: false, transformFunction: null }, borderColor: { classPropertyName: "borderColor", publicName: "borderColor", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, cornerRadius: { classPropertyName: "cornerRadius", publicName: "cornerRadius", isSignal: true, isRequired: false, transformFunction: null }, facebook: { classPropertyName: "facebook", publicName: "facebookId", isSignal: true, isRequired: false, transformFunction: null }, gravatar: { classPropertyName: "gravatar", publicName: "gravatarId", isSignal: true, isRequired: false, transformFunction: null }, github: { classPropertyName: "github", publicName: "githubId", isSignal: true, isRequired: false, transformFunction: null }, custom: { classPropertyName: "custom", publicName: "src", isSignal: true, isRequired: false, transformFunction: null }, customAlt: { classPropertyName: "customAlt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null }, initials: { classPropertyName: "initials", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, referrerpolicy: { classPropertyName: "referrerpolicy", publicName: "referrerpolicy", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, initialsSize: { classPropertyName: "initialsSize", publicName: "initialsSize", isSignal: true, isRequired: false, transformFunction: null }, badge: { classPropertyName: "badge", publicName: "badge", isSignal: true, isRequired: false, transformFunction: null }, badgeColor: { classPropertyName: "badgeColor", publicName: "badgeColor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clickOnAvatar: "clickOnAvatar" }, host: { properties: { "attr.data-badge-color": "badgeColor() || null", "style.--hub-avatar-size": "avatarSizePx" } }, viewQueries: [{ propertyName: "customContentRef", first: true, predicate: ["customContent"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
728
727
|
<div (click)="onAvatarClicked()" class="avatar-container" [class.hub-avatar--custom]="hasCustomContent" [style]="hostStyle">
|
|
729
728
|
<span #customContent class="hub-avatar__custom" [style]="customContentStyle"><ng-content></ng-content></span>
|
|
730
729
|
@if (!hasCustomContent) {
|
|
@@ -762,7 +761,7 @@ class AvatarComponent {
|
|
|
762
761
|
}
|
|
763
762
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: AvatarComponent, decorators: [{
|
|
764
763
|
type: Component,
|
|
765
|
-
args: [{ selector: 'hub-avatar', standalone:
|
|
764
|
+
args: [{ selector: 'hub-avatar', standalone: true, template: `
|
|
766
765
|
<div (click)="onAvatarClicked()" class="avatar-container" [class.hub-avatar--custom]="hasCustomContent" [style]="hostStyle">
|
|
767
766
|
<span #customContent class="hub-avatar__custom" [style]="customContentStyle"><ng-content></ng-content></span>
|
|
768
767
|
@if (!hasCustomContent) {
|
|
@@ -805,7 +804,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
805
804
|
args: ['customContent', { static: true }]
|
|
806
805
|
}] } });
|
|
807
806
|
|
|
807
|
+
/**
|
|
808
|
+
* Backward-compatibility module for `<hub-avatar>`.
|
|
809
|
+
*
|
|
810
|
+
* @deprecated `AvatarComponent` is now a standalone component. Import it directly
|
|
811
|
+
* (`imports: [AvatarComponent]`) and, if you need custom configuration, register
|
|
812
|
+
* `provideAvatar()` in your application providers. This module only re-exports the
|
|
813
|
+
* standalone component and will be removed in a future major version.
|
|
814
|
+
*/
|
|
808
815
|
class AvatarModule {
|
|
816
|
+
/**
|
|
817
|
+
* @deprecated Use `provideAvatar(config)` with the standalone APIs instead.
|
|
818
|
+
* Kept so existing `AvatarModule.forRoot()` consumers keep working.
|
|
819
|
+
*/
|
|
809
820
|
static forRoot(avatarConfig) {
|
|
810
821
|
return {
|
|
811
822
|
ngModule: AvatarModule,
|
|
@@ -818,19 +829,47 @@ class AvatarModule {
|
|
|
818
829
|
};
|
|
819
830
|
}
|
|
820
831
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: AvatarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
821
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.1", ngImport: i0, type: AvatarModule,
|
|
822
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: AvatarModule
|
|
832
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.1", ngImport: i0, type: AvatarModule, imports: [AvatarComponent], exports: [AvatarComponent] });
|
|
833
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: AvatarModule });
|
|
823
834
|
}
|
|
824
835
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: AvatarModule, decorators: [{
|
|
825
836
|
type: NgModule,
|
|
826
837
|
args: [{
|
|
827
|
-
imports: [
|
|
828
|
-
declarations: [AvatarComponent],
|
|
829
|
-
providers: [SourceFactory, AvatarService, AvatarConfigService],
|
|
838
|
+
imports: [AvatarComponent],
|
|
830
839
|
exports: [AvatarComponent]
|
|
831
840
|
}]
|
|
832
841
|
}] });
|
|
833
842
|
|
|
843
|
+
/**
|
|
844
|
+
* Registers the avatar configuration for standalone applications.
|
|
845
|
+
*
|
|
846
|
+
* Standalone-friendly replacement for `AvatarModule.forRoot()`. Add it to your
|
|
847
|
+
* `bootstrapApplication` providers (or a route's `providers`) to customise the
|
|
848
|
+
* avatar source priority, colour palette or src-cache behaviour. Calling it is
|
|
849
|
+
* optional — `<hub-avatar>` works out of the box with sensible defaults.
|
|
850
|
+
*
|
|
851
|
+
* ```ts
|
|
852
|
+
* import { provideAvatar } from 'ng-hub-ui-avatar';
|
|
853
|
+
*
|
|
854
|
+
* bootstrapApplication(AppComponent, {
|
|
855
|
+
* providers: [
|
|
856
|
+
* provideAvatar({ sourcePriorityOrder: [AvatarSource.GRAVATAR, AvatarSource.INITIALS] })
|
|
857
|
+
* ]
|
|
858
|
+
* });
|
|
859
|
+
* ```
|
|
860
|
+
*
|
|
861
|
+
* @param config Optional avatar configuration.
|
|
862
|
+
* @returns Environment providers to add to the application config.
|
|
863
|
+
*/
|
|
864
|
+
function provideAvatar(config) {
|
|
865
|
+
return makeEnvironmentProviders([
|
|
866
|
+
{
|
|
867
|
+
provide: AVATAR_CONFIG,
|
|
868
|
+
useValue: config ?? {}
|
|
869
|
+
}
|
|
870
|
+
]);
|
|
871
|
+
}
|
|
872
|
+
|
|
834
873
|
/*
|
|
835
874
|
* Public API Surface of ng-hub-ui-avatar
|
|
836
875
|
*/
|
|
@@ -839,5 +878,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
839
878
|
* Generated bundle index. Do not edit.
|
|
840
879
|
*/
|
|
841
880
|
|
|
842
|
-
export { AvatarComponent, AvatarModule, AvatarService, AvatarSource, defaultColors, defaultDisableSrcCache, defaultSources };
|
|
881
|
+
export { AvatarComponent, AvatarModule, AvatarService, AvatarSource, defaultColors, defaultDisableSrcCache, defaultSources, provideAvatar };
|
|
843
882
|
//# sourceMappingURL=ng-hub-ui-avatar.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-hub-ui-avatar.mjs","sources":["../../../projects/avatar/src/lib/avatar-config.token.ts","../../../projects/avatar/src/lib/avatar-config.service.ts","../../../projects/avatar/src/lib/sources/avatar-source.enum.ts","../../../projects/avatar/src/lib/avatar.service.ts","../../../projects/avatar/src/lib/sources/async-source.ts","../../../projects/avatar/src/lib/sources/facebook.ts","../../../projects/avatar/src/lib/sources/custom.ts","../../../projects/avatar/src/lib/sources/initials.ts","../../../projects/avatar/src/lib/sources/gravatar.ts","../../../projects/avatar/src/lib/sources/value.ts","../../../projects/avatar/src/lib/sources/github.ts","../../../projects/avatar/src/lib/sources/custom-no-cache.ts","../../../projects/avatar/src/lib/sources/source.factory.ts","../../../projects/avatar/src/lib/avatar.component.ts","../../../projects/avatar/src/lib/avatar.module.ts","../../../projects/avatar/src/public_api.ts","../../../projects/avatar/src/ng-hub-ui-avatar.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nimport { AvatarConfig } from './avatar-config';\n/**\n * Token used to inject the AvatarConfig object\n */\nexport const AVATAR_CONFIG = new InjectionToken<AvatarConfig>('avatar.config');\n","import { Inject, Injectable, Optional } from '@angular/core';\n\nimport type { AvatarConfig } from './avatar-config';\nimport { AVATAR_CONFIG } from './avatar-config.token';\nimport { AvatarSource } from './sources/avatar-source.enum';\n\n@Injectable({ providedIn: 'root' })\nexport class AvatarConfigService {\n\tconstructor(\n\t\t@Optional()\n\t\t@Inject(AVATAR_CONFIG)\n\t\tpublic userConfig: AvatarConfig\n\t) {}\n\n\tpublic getAvatarSources(defaultSources: AvatarSource[]): AvatarSource[] {\n\t\tif (\n\t\t\tthis.userConfig &&\n\t\t\tthis.userConfig.sourcePriorityOrder &&\n\t\t\tthis.userConfig.sourcePriorityOrder.length\n\t\t) {\n\t\t\tconst uniqueSources = [\n\t\t\t\t...new Set(this.userConfig.sourcePriorityOrder)\n\t\t\t];\n\t\t\tconst validSources = uniqueSources.filter((source) =>\n\t\t\t\tdefaultSources.includes(source)\n\t\t\t);\n\t\t\treturn [\n\t\t\t\t...validSources,\n\t\t\t\t...defaultSources.filter(\n\t\t\t\t\t(source) => !validSources.includes(source)\n\t\t\t\t)\n\t\t\t];\n\t\t}\n\t\treturn defaultSources;\n\t}\n\n\tpublic getAvatarColors(defaultColors: string[]): string[] {\n\t\treturn (\n\t\t\t(this.userConfig &&\n\t\t\t\tthis.userConfig.colors &&\n\t\t\t\tthis.userConfig.colors.length &&\n\t\t\t\tthis.userConfig.colors) ||\n\t\t\tdefaultColors\n\t\t);\n\t}\n\n\tpublic getDisableSrcCache(defaultDisableSrcCache: boolean): boolean {\n\t\tif (\n\t\t\tthis.userConfig == null ||\n\t\t\tthis.userConfig.disableSrcCache == null\n\t\t) {\n\t\t\treturn defaultDisableSrcCache;\n\t\t} else {\n\t\t\treturn this.userConfig.disableSrcCache;\n\t\t}\n\t}\n}\n","export enum AvatarSource {\n FACEBOOK = 'facebook',\n GRAVATAR = 'gravatar',\n GITHUB = 'github',\n CUSTOM = 'custom',\n INITIALS = 'initials',\n VALUE = 'value'\n}\n","import { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\n\nimport { Observable } from 'rxjs';\n\nimport { AvatarConfigService } from './avatar-config.service';\nimport { AvatarSource } from './sources/avatar-source.enum';\nimport { Source } from './sources/source';\n\n/**\n * list of Supported avatar sources\n */\nexport const defaultSources = [\n AvatarSource.FACEBOOK,\n AvatarSource.GRAVATAR,\n AvatarSource.GITHUB,\n AvatarSource.CUSTOM,\n AvatarSource.INITIALS,\n AvatarSource.VALUE\n];\n\n/**\n * list of default colors\n */\nexport const defaultColors = [\n '#1abc9c',\n '#3498db',\n '#f1c40f',\n '#8e44ad',\n '#e74c3c',\n '#d35400',\n '#2c3e50',\n '#7f8c8d'\n];\n\n/**\n * Default disable custom source cache settings\n */\nexport const defaultDisableSrcCache = false;\n\n/**\n * Provides utilities methods related to Avatar component\n */\n@Injectable({providedIn: 'root'})\nexport class AvatarService {\n public avatarSources: AvatarSource[] = defaultSources;\n public avatarColors: string[] = defaultColors;\n\n private readonly failedSources = new Map<string, Source>();\n\n constructor(\n private http: HttpClient,\n private avatarConfigService: AvatarConfigService\n ) {\n this.overrideAvatarSources();\n this.overrideAvatarColors();\n }\n\n public fetchAvatar(avatarUrl: string): Observable<unknown> {\n return this.http.get(avatarUrl);\n }\n\n public getRandomColor(avatarText: string): string {\n if (!avatarText) {\n return 'transparent';\n }\n const asciiCodeSum = this.calculateAsciiCode(avatarText);\n return this.avatarColors[asciiCodeSum % this.avatarColors.length];\n }\n\n public compareSources(\n sourceType1: AvatarSource,\n sourceType2: AvatarSource\n ): number {\n return (\n this.getSourcePriority(sourceType1) - this.getSourcePriority(sourceType2)\n );\n }\n\n public isSource(source: string): boolean {\n return this.avatarSources.includes(source as AvatarSource);\n }\n\n public isTextAvatar(sourceType: AvatarSource): boolean {\n return [AvatarSource.INITIALS, AvatarSource.VALUE].includes(sourceType);\n }\n\n private buildSourceKey(source: Source): string {\n return source.sourceType + '-' + source.sourceId;\n }\n\n public sourceHasFailedBefore(source: Source): boolean {\n return this.failedSources.has(this.buildSourceKey(source));\n }\n\n public markSourceAsFailed(source: Source): void {\n this.failedSources.set(this.buildSourceKey(source), source);\n }\n\n private overrideAvatarSources(): void {\n this.avatarSources = this.avatarConfigService.getAvatarSources(\n defaultSources\n );\n }\n\n private overrideAvatarColors(): void {\n this.avatarColors = this.avatarConfigService.getAvatarColors(defaultColors);\n }\n\n private calculateAsciiCode(value: string): number {\n return value\n .split('')\n .map(letter => letter.charCodeAt(0))\n .reduce((previous: number, current: number) => previous + current);\n }\n\n private getSourcePriority(sourceType: AvatarSource) {\n return this.avatarSources.indexOf(sourceType);\n }\n}\n","import { Source } from './source';\nimport { AvatarSource } from './avatar-source.enum';\n\n/**\n * Contract of all async sources.\n * Every async source must implement the processResponse method that extracts the avatar url from the data\n */\nexport abstract class AsyncSource implements Source {\n readonly abstract sourceType: AvatarSource;\n\n constructor(public sourceId: string) {}\n\n abstract getAvatar(size: number): string;\n abstract processResponse(data: unknown, size?: number): string | null;\n}\n","import { Source } from './source';\nimport { AvatarSource } from './avatar-source.enum';\n/**\n * Facebook source implementation.\n * Fetch avatar source based on facebook identifier\n * and image size\n */\nexport class Facebook implements Source {\n readonly sourceType: AvatarSource = AvatarSource.FACEBOOK;\n\n constructor(public sourceId: string) {}\n\n public getAvatar(size: number): string {\n return (\n 'https://graph.facebook.com/' +\n `${this.sourceId}/picture?width=${size}&height=${size}`\n );\n }\n}\n","import { Source } from './source';\nimport { AvatarSource } from './avatar-source.enum';\n/**\n * Custom source implementation.\n * return custom image as an avatar\n *\n */\nexport class Custom implements Source {\n readonly sourceType: AvatarSource = AvatarSource.CUSTOM;\n\n constructor(public sourceId: string) {}\n\n public getAvatar(): string {\n return this.sourceId;\n }\n}\n","import { Source } from './source';\nimport { AvatarSource } from './avatar-source.enum';\n\n/**\n * Initials source implementation.\n * return the initials of the given value\n */\nexport class Initials implements Source {\n readonly sourceType: AvatarSource = AvatarSource.INITIALS;\n\n constructor(public sourceId: string) {}\n\n public getAvatar(size: number): string {\n return this.getInitials(this.sourceId, size);\n }\n\n /**\n * Returns the initial letters of a name in a string.\n */\n private getInitials(name: string, size: number): string {\n name = name.trim();\n\n if (!name) {\n return '';\n }\n\n const initials = name.split(' ');\n\n if (size && size < initials.length) {\n return this.constructInitials(initials.slice(0, size));\n } else {\n return this.constructInitials(initials);\n }\n }\n\n /**\n * Iterates a person's name string to get the initials of each word in uppercase.\n */\n private constructInitials(elements: string[]): string {\n if (!elements || !elements.length) {\n return '';\n }\n\n return elements\n .filter(element => element && element.length > 0)\n .map(element => element[0].toUpperCase())\n .join('');\n }\n}\n","import { Md5 } from 'ts-md5';\nimport { Source } from './source';\nimport { AvatarSource } from './avatar-source.enum';\n\nfunction isRetina(): boolean {\n if (typeof window !== 'undefined' && window !== null) {\n if (window.devicePixelRatio > 1.25) {\n return true;\n }\n\n const mediaQuery = '(-webkit-min-device-pixel-ratio: 1.25), (min--moz-device-pixel-ratio: 1.25), (-o-min-device-pixel-ratio: 5/4), (min-resolution: 1.25dppx)';\n if (window.matchMedia && window.matchMedia(mediaQuery).matches) {\n return true;\n }\n }\n\n return false;\n}\n\n/**\n * Gravatar source implementation.\n * Fetch avatar source based on gravatar email\n */\nexport class Gravatar implements Source {\n readonly sourceType: AvatarSource = AvatarSource.GRAVATAR;\n public sourceId: string;\n\n constructor(public value: string) {\n this.sourceId = value.match('^[a-f0-9]{32}$')\n ? value\n : Md5.hashStr(value).toString();\n }\n\n public getAvatar(size: number): string {\n const avatarSize = isRetina() ? size * 2 : size;\n return `https://secure.gravatar.com/avatar/${\n this.sourceId\n }?s=${avatarSize}&d=404`;\n }\n}\n","import { Source } from './source';\nimport { AvatarSource } from './avatar-source.enum';\n\n/**\n * Value source implementation.\n * return the value as avatar\n */\nexport class Value implements Source {\n readonly sourceType: AvatarSource = AvatarSource.VALUE;\n\n constructor(public sourceId: string) {}\n\n public getAvatar(): string {\n return this.sourceId;\n }\n}\n","import { AsyncSource } from './async-source';\nimport { AvatarSource } from './avatar-source.enum';\n\n/**\n * GitHub source implementation.\n * Fetch avatar source based on github identifier\n */\nexport class Github extends AsyncSource {\n readonly sourceType: AvatarSource = AvatarSource.GITHUB;\n\n constructor(sourceId: string) {\n super(sourceId);\n }\n\n public getAvatar(): string {\n return `https://api.github.com/users/${this.sourceId}`;\n }\n\n /**\n * extract github avatar from json data\n */\n public processResponse(data: { avatar_url: string }, size?: number): string {\n if (size) {\n return `${data.avatar_url}&s=${size}`;\n }\n return data.avatar_url;\n }\n}\n","import {Source} from './source';\nimport {AvatarSource} from './avatar-source.enum';\n\n/**\n * Custom source implementation (with no cache).\n * return custom image as an avatar\n *\n */\nexport class CustomNoCache implements Source {\n readonly sourceType: AvatarSource = AvatarSource.CUSTOM;\n\n constructor(public sourceId: string) {}\n\n public getAvatar(): string {\n const urlSuffix = Math.random();\n return `${this.sourceId}${this.sourceId.indexOf('?') > -1 ? '&' : '?'}_=${urlSuffix}`;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Source } from './source';\nimport { Facebook } from './facebook';\nimport { Custom } from './custom';\nimport { Initials } from './initials';\nimport { Gravatar } from './gravatar';\nimport { Value } from './value';\nimport { Github } from './github';\nimport { SourceCreator } from './source.creator';\nimport { AvatarSource } from './avatar-source.enum';\nimport { AvatarConfigService } from '../avatar-config.service';\nimport { defaultDisableSrcCache } from '../avatar.service';\nimport { CustomNoCache } from './custom-no-cache';\n\n/**\n * Factory class that implements factory method pattern.\n * Used to create Source implementation class based\n * on the source Type\n */\n@Injectable({providedIn: 'root'})\nexport class SourceFactory {\n private sources: { [key: string]: SourceCreator } = {};\n\n constructor(avatarConfigService: AvatarConfigService) {\n const disableSrcCache = avatarConfigService.getDisableSrcCache(defaultDisableSrcCache);\n this.sources[AvatarSource.FACEBOOK] = Facebook;\n this.sources[AvatarSource.GRAVATAR] = Gravatar;\n this.sources[AvatarSource.CUSTOM] = disableSrcCache ? CustomNoCache : Custom;\n this.sources[AvatarSource.INITIALS] = Initials;\n this.sources[AvatarSource.VALUE] = Value;\n this.sources[AvatarSource.GITHUB] = Github;\n }\n\n public newInstance(sourceType: AvatarSource, sourceValue: string): Source {\n return new this.sources[sourceType](sourceValue);\n }\n}\n","import { AfterContentInit, Component, ElementRef, OnChanges, OnDestroy, SecurityContext, SimpleChanges, ViewChild, computed, input, output } from '@angular/core';\n\nimport { DomSanitizer, SafeUrl } from '@angular/platform-browser';\nimport { map, takeWhile } from 'rxjs/operators';\nimport { AvatarService } from './avatar.service';\nimport { AsyncSource } from './sources/async-source';\nimport { AvatarSource } from './sources/avatar-source.enum';\nimport { Source } from './sources/source';\nimport { SourceFactory } from './sources/source.factory';\n\ntype StyleObject = Record<string, string | number | null | undefined>;\ntype Style = StyleObject | string;\n\n/**\n * Semantic colours for the avatar badge and the avatar colour variants. Each maps\n * to a design-system `--hub-sys-color-*` token. Use them to colour a presence dot\n * (e.g. `success` = online, `warning` = away, `danger` = busy, `secondary` = offline)\n * or a labelled badge. Any custom string is also accepted (set `--hub-avatar-badge-color`).\n */\nexport type HubAvatarBadgeColor = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark';\n\n/**\n * Universal avatar component that\n * generates avatar from different sources\n *\n * export\n * class AvatarComponent\n * implements {OnChanges}\n */\n\n@Component({\n\t// tslint:disable-next-line:component-selector\n\tselector: 'hub-avatar',\n\tstandalone: false,\n\tstyleUrl: './avatar.component.scss',\n\ttemplate: `\n\t\t<div (click)=\"onAvatarClicked()\" class=\"avatar-container\" [class.hub-avatar--custom]=\"hasCustomContent\" [style]=\"hostStyle\">\n\t\t\t<span #customContent class=\"hub-avatar__custom\" [style]=\"customContentStyle\"><ng-content></ng-content></span>\n\t\t\t@if (!hasCustomContent) {\n\t\t\t\t@if (avatarSrc) {\n\t\t\t\t\t<img\n\t\t\t\t\t\t[src]=\"avatarSrc\"\n\t\t\t\t\t\t[alt]=\"customAlt() ? customAlt() : avatarAlt\"\n\t\t\t\t\t\t[width]=\"size()\"\n\t\t\t\t\t\t[height]=\"size()\"\n\t\t\t\t\t\t[style]=\"avatarStyle\"\n\t\t\t\t\t\t[referrerPolicy]=\"referrerpolicy()\"\n\t\t\t\t\t\t(error)=\"fetchAvatarSource()\"\n\t\t\t\t\t\tclass=\"avatar-content\"\n\t\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\t/>\n\t\t\t\t} @else {\n\t\t\t\t\t@if (avatarText) {\n\t\t\t\t\t\t<div class=\"avatar-content\" [style]=\"avatarStyle\">\n\t\t\t\t\t\t\t{{ avatarText }}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t</div>\n\t\t@if (_hasBadge()) {\n\t\t\t<span\n\t\t\t\tclass=\"hub-avatar__badge\"\n\t\t\t\t[class.hub-avatar__badge--dot]=\"_isDot()\"\n\t\t\t\t[class.hub-avatar__badge--label]=\"!_isDot()\"\n\t\t\t\t[attr.aria-hidden]=\"_isDot() ? 'true' : null\"\n\t\t\t\t>{{ _badgeText() }}</span\n\t\t\t>\n\t\t}\n\t`,\n\thost: {\n\t\t'[attr.data-badge-color]': 'badgeColor() || null',\n\t\t'[style.--hub-avatar-size]': 'avatarSizePx'\n\t}\n})\nexport class AvatarComponent implements AfterContentInit, OnChanges, OnDestroy {\n\treadonly round = input(true);\n\treadonly size = input<string | number>(50);\n\treadonly textSizeRatio = input(3);\n\treadonly bgColor = input<string>();\n\treadonly fgColor = input('#FFF');\n\treadonly borderColor = input<string>();\n\treadonly style = input<Style>({});\n\treadonly cornerRadius = input<string | number>(0);\n\treadonly facebook = input<string | null>(undefined, { alias: 'facebookId' });\n\treadonly gravatar = input<string | null>(undefined, { alias: 'gravatarId' });\n\treadonly github = input<string | null>(undefined, { alias: 'githubId' });\n\treadonly custom = input<string | SafeUrl | null>(undefined, { alias: 'src' });\n\treadonly customAlt = input<string | null>(undefined, { alias: 'alt' });\n\treadonly initials = input<string | null>(undefined, { alias: 'name' });\n\treadonly value = input<string | null>();\n\treadonly referrerpolicy = input<string | null>();\n\treadonly placeholder = input<string>();\n\treadonly initialsSize = input<string | number>(0);\n\t/**\n\t * Overlay badge at the bottom-end corner. A boolean / empty value renders a plain\n\t * dot (great for a presence indicator); a string or number renders a labelled badge\n\t * (e.g. a count like `\"4k\"`). `null` / absent (default) renders nothing.\n\t *\n\t * @example <hub-avatar badge badgeColor=\"success\" /> // dot\n\t * @example <hub-avatar badge=\"4k\" badgeColor=\"danger\" /> // labelled\n\t */\n\treadonly badge = input<string | number | boolean | null>(null);\n\n\t/**\n\t * Semantic colour of the {@link badge} (and, as a host class, of the avatar itself).\n\t * Maps to a `--hub-sys-color-*` token; any custom string also works (set\n\t * `--hub-avatar-badge-color`). When unset the badge uses a neutral default.\n\t */\n\treadonly badgeColor = input<HubAvatarBadgeColor | (string & {}) | null>(null);\n\n\t/** True when a badge should be rendered (the `badge` input is set to anything but `null` / `false`). */\n\tprotected readonly _hasBadge = computed(() => {\n\t\tconst b = this.badge();\n\t\treturn b !== null && b !== undefined && b !== false;\n\t});\n\n\t/** The badge's text content; empty for a plain dot (`badge` is `true` or an empty string). */\n\tprotected readonly _badgeText = computed(() => {\n\t\tconst b = this.badge();\n\t\tif (b === true || b === '' || b === null || b === undefined || b === false) {\n\t\t\treturn '';\n\t\t}\n\t\treturn String(b);\n\t});\n\n\t/** True when the badge is a plain dot (shown, but with no text content). */\n\tprotected readonly _isDot = computed(() => this._hasBadge() && this._badgeText() === '');\n\n\treadonly clickOnAvatar = output<Source>();\n\n\t/** Wrapper around the projected content (`<ng-content>`), used to detect whether the consumer projected anything. */\n\t@ViewChild('customContent', { static: true }) private customContentRef?: ElementRef<HTMLElement>;\n\n\t/** True when the consumer projected custom content (an icon, SVG, image, …) into the avatar. */\n\thasCustomContent = false;\n\n\t/** Inline style applied to the projected-content slot (honours `bgColor` / `fgColor` / `borderColor` / `style`). */\n\tcustomContentStyle: StyleObject = {};\n\n\tisAlive = true;\n\tavatarSrc: SafeUrl | null = null;\n\tavatarAlt: SafeUrl | null = null;\n\tavatarText: string | null = null;\n\tavatarStyle: StyleObject = {};\n\thostStyle: StyleObject = {};\n\n\tprivate currentIndex = -1;\n\tprivate sources: Source[] = [];\n\n\tconstructor(\n\t\tprivate sourceFactory: SourceFactory,\n\t\tprivate avatarService: AvatarService,\n\t\tprivate sanitizer: DomSanitizer\n\t) {}\n\n\tonAvatarClicked(): void {\n\t\tthis.clickOnAvatar.emit(this.sources[this.currentIndex]);\n\t}\n\n\t/**\n\t * Detects projected content once it is available and, when present, computes its style.\n\t * Runs after content init so `<ng-content>` nodes are already in place.\n\t */\n\tngAfterContentInit(): void {\n\t\tconst host = this.customContentRef?.nativeElement;\n\t\tthis.hasCustomContent = !!host && this.hasMeaningfulProjectedContent(host);\n\t\tif (this.hasCustomContent) {\n\t\t\tthis.customContentStyle = this.getCustomContentStyle();\n\t\t}\n\t}\n\n\t/**\n\t * Returns true when the projected slot holds a real element or non-whitespace text,\n\t * so whitespace-only projection does not flip the avatar into custom-content mode.\n\t *\n\t * @param host The element wrapping the projected content.\n\t */\n\tprivate hasMeaningfulProjectedContent(host: HTMLElement): boolean {\n\t\treturn Array.from(host.childNodes).some(\n\t\t\t(node) =>\n\t\t\t\tnode.nodeType === Node.ELEMENT_NODE ||\n\t\t\t\t(node.nodeType === Node.TEXT_NODE && (node.textContent ?? '').trim().length > 0)\n\t\t);\n\t}\n\n\t/**\n\t * Builds the inline style for the projected-content slot. Sensible visible defaults\n\t * (a themed background circle and a readable foreground colour) come from CSS tokens;\n\t * the `bgColor` / `fgColor` / `borderColor` / `style` inputs override them when set.\n\t */\n\tprivate getCustomContentStyle(): StyleObject {\n\t\tconst borderColor = this.borderColor();\n\t\tconst bgColor = this.bgColor();\n\t\tconst hasCustomFgColor = this.fgColor() !== '#FFF';\n\t\treturn {\n\t\t\tbackgroundColor: bgColor ? bgColor : undefined,\n\t\t\tcolor: hasCustomFgColor ? this.fgColor() : undefined,\n\t\t\tborder: borderColor ? '1px solid ' + borderColor : undefined,\n\t\t\t...this.getCustomStyleObject()\n\t\t};\n\t}\n\n\t/**\n\t * The avatar size as a px string. Exposed on the host as `--hub-avatar-size`\n\t * so the status dot (and any token-driven child) scales with the avatar.\n\t */\n\tget avatarSizePx(): string {\n\t\treturn (parseFloat(String(this.size())) || 50) + 'px';\n\t}\n\n\t/**\n\t * Detect inputs change\n\t *\n\t * param {{ [propKey: string]: SimpleChange }} changes\n\t *\n\t * memberof AvatarComponent\n\t */\n\tngOnChanges(changes: SimpleChanges): void {\n\t\tfor (const propName in changes) {\n\t\t\tif (this.avatarService.isSource(propName)) {\n\t\t\t\tconst sourceType: AvatarSource = AvatarSource[propName.toUpperCase() as keyof typeof AvatarSource];\n\t\t\t\tconst currentValue = changes[propName].currentValue;\n\t\t\t\tif (currentValue && typeof currentValue === 'string') {\n\t\t\t\t\tthis.addSource(sourceType, currentValue);\n\t\t\t\t} else {\n\t\t\t\t\tconst sanitized = this.sanitizer.sanitize(SecurityContext.URL, currentValue);\n\t\t\t\t\tif (sanitized) {\n\t\t\t\t\t\tthis.addSource(sourceType, sanitized);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.removeSource(sourceType);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Reinitialize when any source input changes so fallback order is recalculated.\n\t\tthis.initializeAvatar();\n\t\tif (this.hasCustomContent) {\n\t\t\tthis.customContentStyle = this.getCustomContentStyle();\n\t\t}\n\t}\n\n\t/**\n\t * Fetch avatar source\n\t *\n\t * memberOf AvatarComponent\n\t */\n\tfetchAvatarSource(): void {\n\t\tconst previousSource = this.sources[this.currentIndex];\n\t\tif (previousSource) {\n\t\t\tthis.avatarService.markSourceAsFailed(previousSource);\n\t\t}\n\n\t\tconst source = this.findNextSource();\n\t\tif (!source) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.avatarService.isTextAvatar(source.sourceType)) {\n\t\t\tthis.buildTextAvatar(source);\n\t\t\tthis.avatarSrc = null;\n\t\t} else {\n\t\t\tthis.buildImageAvatar(source);\n\t\t}\n\t}\n\n\tprivate findNextSource(): Source | null {\n\t\twhile (++this.currentIndex < this.sources.length) {\n\t\t\tconst source = this.sources[this.currentIndex];\n\t\t\tif (source && !this.avatarService.sourceHasFailedBefore(source)) {\n\t\t\t\treturn source;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis.isAlive = false;\n\t}\n\n\t/**\n\t * Initialize the avatar component and its fallback system\n\t */\n\tprivate initializeAvatar(): void {\n\t\tconst computedBorderRadius = this.round()\n\t\t\t? '50%'\n\t\t\t: this.cornerRadius() + 'px';\n\t\tthis.hostStyle = {\n\t\t\twidth: this.size() + 'px',\n\t\t\theight: this.size() + 'px',\n\t\t\tborderRadius: computedBorderRadius\n\t\t};\n\n\t\tthis.currentIndex = -1;\n\t\tif (this.sources.length > 0) {\n\t\t\tthis.sortAvatarSources();\n\t\t\tthis.fetchAvatarSource();\n\t\t}\n\t}\n\n\tprivate sortAvatarSources(): void {\n\t\tthis.sources.sort((source1: Source, source2: Source) =>\n\t\t\tthis.avatarService.compareSources(source1.sourceType, source2.sourceType)\n\t\t);\n\t}\n\n\tprivate buildTextAvatar(avatarSource: Source): void {\n\t\tthis.avatarText = avatarSource.getAvatar(+this.initialsSize());\n\t\tthis.avatarStyle = this.getInitialsStyle(avatarSource.sourceId);\n\t}\n\n\tprivate buildImageAvatar(avatarSource: Source): void {\n\t\tthis.avatarStyle = this.getImageStyle();\n\t\tif (avatarSource instanceof AsyncSource) {\n\t\t\tthis.fetchAndProcessAsyncAvatar(avatarSource);\n\t\t} else {\n\t\t\tthis.avatarSrc = this.sanitizer.bypassSecurityTrustUrl(avatarSource.getAvatar(+this.size()));\n\t\t\tthis.avatarAlt = avatarSource.getAvatar(+this.size());\n\t\t}\n\t}\n\n\t/**\n\t *\n\t * returns initials style\n\t *\n\t * memberOf AvatarComponent\n\t */\n\tprivate getInitialsStyle(avatarValue: string): StyleObject {\n\t\tconst borderColor = this.borderColor();\n\t\tconst bgColor = this.bgColor();\n\t\tconst hasCornerRadius = !this.round() || +this.cornerRadius() > 0;\n\t\tconst hasCustomFgColor = this.fgColor() !== '#FFF';\n\t\treturn {\n\t\t\ttextAlign: 'center',\n\t\t\tborderRadius: hasCornerRadius ? (this.round() ? '100%' : this.cornerRadius() + 'px') : undefined,\n\t\t\tborder: borderColor ? '1px solid ' + borderColor : undefined,\n\t\t\ttextTransform: 'uppercase',\n\t\t\tcolor: hasCustomFgColor ? this.fgColor() : undefined,\n\t\t\tbackgroundColor: bgColor ? bgColor : this.avatarService.getRandomColor(avatarValue),\n\t\t\tfont: Math.floor(+this.size() / this.textSizeRatio()) + 'px Helvetica, Arial, sans-serif',\n\t\t\tlineHeight: this.size() + 'px',\n\t\t\t...this.getCustomStyleObject()\n\t\t};\n\t}\n\n\t/**\n\t *\n\t * returns image style\n\t *\n\t * memberOf AvatarComponent\n\t */\n\tprivate getImageStyle(): StyleObject {\n\t\tconst borderColor = this.borderColor();\n\t\tconst hasCornerRadius = !this.round() || +this.cornerRadius() > 0;\n\t\treturn {\n\t\t\tmaxWidth: '100%',\n\t\t\tborderRadius: hasCornerRadius ? (this.round() ? '50%' : this.cornerRadius() + 'px') : undefined,\n\t\t\tborder: borderColor ? '1px solid ' + borderColor : undefined,\n\t\t\twidth: this.size() + 'px',\n\t\t\theight: this.size() + 'px',\n\t\t\t...this.getCustomStyleObject()\n\t\t};\n\t}\n\n\tprivate getCustomStyleObject(): StyleObject {\n\t\tconst customStyle = this.style();\n\t\tif (!customStyle) {\n\t\t\treturn {};\n\t\t}\n\n\t\tif (typeof customStyle === 'string') {\n\t\t\treturn this.parseInlineStyleString(customStyle);\n\t\t}\n\n\t\treturn customStyle;\n\t}\n\n\tprivate parseInlineStyleString(styleString: string): StyleObject {\n\t\tconst styleObject: StyleObject = {};\n\t\tstyleString\n\t\t\t.split(';')\n\t\t\t.map((declaration) => declaration.trim())\n\t\t\t.filter((declaration) => declaration.length > 0)\n\t\t\t.forEach((declaration) => {\n\t\t\t\tconst separatorIndex = declaration.indexOf(':');\n\t\t\t\tif (separatorIndex <= 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst property = declaration.slice(0, separatorIndex).trim();\n\t\t\t\tconst value = declaration.slice(separatorIndex + 1).trim();\n\t\t\t\tif (property && value) {\n\t\t\t\t\tstyleObject[property] = value;\n\t\t\t\t}\n\t\t\t});\n\t\treturn styleObject;\n\t}\n\n\t/**\n\t * Fetch avatar image asynchronously.\n\t *\n\t * param {Source} source represents avatar source\n\t * memberof AvatarComponent\n\t */\n\tprivate fetchAndProcessAsyncAvatar(source: AsyncSource): void {\n\t\tif (this.avatarService.sourceHasFailedBefore(source)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.avatarService\n\t\t\t.fetchAvatar(source.getAvatar(+this.size()))\n\t\t\t.pipe(\n\t\t\t\ttakeWhile(() => this.isAlive),\n\t\t\t\tmap((response) => source.processResponse(response, +this.size()))\n\t\t\t)\n\t\t\t.subscribe({\n\t\t\t\tnext: (avatarSrc) => (this.avatarSrc = avatarSrc),\n\t\t\t\terror: () => {\n\t\t\t\t\tthis.fetchAvatarSource();\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\t/**\n\t * Add avatar source\n\t *\n\t * param sourceType avatar source type e.g facebook,twitter, etc.\n\t * param sourceValue source value e.g facebookId value, etc.\n\t */\n\tprivate addSource(sourceType: AvatarSource, sourceValue: string): void {\n\t\tconst source = this.sources.find((s) => s.sourceType === sourceType);\n\t\tif (source) {\n\t\t\tsource.sourceId = sourceValue;\n\t\t} else {\n\t\t\tthis.sources.push(this.sourceFactory.newInstance(sourceType, sourceValue));\n\t\t}\n\t}\n\n\t/**\n\t * Remove avatar source\n\t *\n\t * param sourceType avatar source type e.g facebook,twitter, etc.\n\t */\n\tprivate removeSource(sourceType: AvatarSource): void {\n\t\tthis.sources = this.sources.filter((source) => source.sourceType !== sourceType);\n\t}\n}\n","import { CommonModule } from '@angular/common';\nimport { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { AvatarConfig } from './avatar-config';\nimport { AvatarConfigService } from './avatar-config.service';\nimport { AVATAR_CONFIG } from './avatar-config.token';\nimport { AvatarComponent } from './avatar.component';\nimport { AvatarService } from './avatar.service';\nimport { SourceFactory } from './sources/source.factory';\n\n@NgModule({\n\timports: [CommonModule],\n\tdeclarations: [AvatarComponent],\n\tproviders: [SourceFactory, AvatarService, AvatarConfigService],\n\texports: [AvatarComponent]\n})\nexport class AvatarModule {\n\tstatic forRoot(\n\t\tavatarConfig?: AvatarConfig\n\t): ModuleWithProviders<AvatarModule> {\n\t\treturn {\n\t\t\tngModule: AvatarModule,\n\t\t\tproviders: [\n\t\t\t\t{\n\t\t\t\t\tprovide: AVATAR_CONFIG,\n\t\t\t\t\tuseValue: avatarConfig ? avatarConfig : {}\n\t\t\t\t}\n\t\t\t]\n\t\t};\n\t}\n}\n","/*\n * Public API Surface of ng-hub-ui-avatar\n */\nexport * from './lib/avatar-config';\nexport * from './lib/avatar.component';\nexport * from './lib/avatar.module';\nexport * from './lib/avatar.service';\nexport * from './lib/sources/avatar-source.enum';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i2.AvatarConfigService","i1.AvatarConfigService","i1.SourceFactory","i2.AvatarService"],"mappings":";;;;;;;;AAGA;;AAEG;AACI,MAAM,aAAa,GAAG,IAAI,cAAc,CAAe,eAAe,CAAC;;MCCjE,mBAAmB,CAAA;AAIvB,IAAA,UAAA;AAHR,IAAA,WAAA,CAGQ,UAAwB,EAAA;QAAxB,IAAA,CAAA,UAAU,GAAV,UAAU;IACf;AAEI,IAAA,gBAAgB,CAAC,cAA8B,EAAA;QACrD,IACC,IAAI,CAAC,UAAU;YACf,IAAI,CAAC,UAAU,CAAC,mBAAmB;AACnC,YAAA,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC,MAAM,EACzC;AACD,YAAA,MAAM,aAAa,GAAG;gBACrB,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,mBAAmB;aAC9C;AACD,YAAA,MAAM,YAAY,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC,MAAM,KAChD,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,CAC/B;YACD,OAAO;AACN,gBAAA,GAAG,YAAY;AACf,gBAAA,GAAG,cAAc,CAAC,MAAM,CACvB,CAAC,MAAM,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC;aAE3C;QACF;AACA,QAAA,OAAO,cAAc;IACtB;AAEO,IAAA,eAAe,CAAC,aAAuB,EAAA;AAC7C,QAAA,QACC,CAAC,IAAI,CAAC,UAAU;YACf,IAAI,CAAC,UAAU,CAAC,MAAM;AACtB,YAAA,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM;AAC7B,YAAA,IAAI,CAAC,UAAU,CAAC,M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AA,CAJT,eAAe,CAAA,EAAA,OAAA,EAAA,CADpB,YAAY,aAGZ,eAAe,CAAA,EAAA,CAAA;wGAEb,YAAY,EAAA,SAAA,EAHb,CAAC,aAAa,EAAE,aAAa,EAAE,mBAAmB,CAAC,EAAA,OAAA,EAAA,CAFpD,YAAY,CAAA,EAAA,CAAA;;2FAKV,YAAY,EAAA,UAAA,EAAA,CAAA;kBANxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACT,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,YAAY,EAAE,CAAC,eAAe,CAAC;AAC/B,oBAAA,SAAS,EAAE,CAAC,aAAa,EAAE,aAAa,EAAE,mBAAmB,CAAC;oBAC9D,OAAO,EAAE,CAAC,eAAe;AACzB,iBAAA;;;ACfD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-hub-ui-avatar.mjs","sources":["../../../projects/avatar/src/lib/avatar-config.token.ts","../../../projects/avatar/src/lib/avatar-config.service.ts","../../../projects/avatar/src/lib/sources/avatar-source.enum.ts","../../../projects/avatar/src/lib/avatar.service.ts","../../../projects/avatar/src/lib/sources/async-source.ts","../../../projects/avatar/src/lib/sources/facebook.ts","../../../projects/avatar/src/lib/sources/custom.ts","../../../projects/avatar/src/lib/sources/initials.ts","../../../projects/avatar/src/lib/sources/gravatar.ts","../../../projects/avatar/src/lib/sources/value.ts","../../../projects/avatar/src/lib/sources/github.ts","../../../projects/avatar/src/lib/sources/custom-no-cache.ts","../../../projects/avatar/src/lib/sources/source.factory.ts","../../../projects/avatar/src/lib/avatar.component.ts","../../../projects/avatar/src/lib/avatar.module.ts","../../../projects/avatar/src/lib/avatar.providers.ts","../../../projects/avatar/src/public_api.ts","../../../projects/avatar/src/ng-hub-ui-avatar.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nimport { AvatarConfig } from './avatar-config';\n/**\n * Token used to inject the AvatarConfig object\n */\nexport const AVATAR_CONFIG = new InjectionToken<AvatarConfig>('avatar.config');\n","import { Inject, Injectable, Optional } from '@angular/core';\n\nimport type { AvatarConfig } from './avatar-config';\nimport { AVATAR_CONFIG } from './avatar-config.token';\nimport { AvatarSource } from './sources/avatar-source.enum';\n\n@Injectable({ providedIn: 'root' })\nexport class AvatarConfigService {\n\tconstructor(\n\t\t@Optional()\n\t\t@Inject(AVATAR_CONFIG)\n\t\tpublic userConfig: AvatarConfig\n\t) {}\n\n\tpublic getAvatarSources(defaultSources: AvatarSource[]): AvatarSource[] {\n\t\tif (\n\t\t\tthis.userConfig &&\n\t\t\tthis.userConfig.sourcePriorityOrder &&\n\t\t\tthis.userConfig.sourcePriorityOrder.length\n\t\t) {\n\t\t\tconst uniqueSources = [\n\t\t\t\t...new Set(this.userConfig.sourcePriorityOrder)\n\t\t\t];\n\t\t\tconst validSources = uniqueSources.filter((source) =>\n\t\t\t\tdefaultSources.includes(source)\n\t\t\t);\n\t\t\treturn [\n\t\t\t\t...validSources,\n\t\t\t\t...defaultSources.filter(\n\t\t\t\t\t(source) => !validSources.includes(source)\n\t\t\t\t)\n\t\t\t];\n\t\t}\n\t\treturn defaultSources;\n\t}\n\n\tpublic getAvatarColors(defaultColors: string[]): string[] {\n\t\treturn (\n\t\t\t(this.userConfig &&\n\t\t\t\tthis.userConfig.colors &&\n\t\t\t\tthis.userConfig.colors.length &&\n\t\t\t\tthis.userConfig.colors) ||\n\t\t\tdefaultColors\n\t\t);\n\t}\n\n\tpublic getDisableSrcCache(defaultDisableSrcCache: boolean): boolean {\n\t\tif (\n\t\t\tthis.userConfig == null ||\n\t\t\tthis.userConfig.disableSrcCache == null\n\t\t) {\n\t\t\treturn defaultDisableSrcCache;\n\t\t} else {\n\t\t\treturn this.userConfig.disableSrcCache;\n\t\t}\n\t}\n}\n","export enum AvatarSource {\n FACEBOOK = 'facebook',\n GRAVATAR = 'gravatar',\n GITHUB = 'github',\n CUSTOM = 'custom',\n INITIALS = 'initials',\n VALUE = 'value'\n}\n","import { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\n\nimport { Observable } from 'rxjs';\n\nimport { AvatarConfigService } from './avatar-config.service';\nimport { AvatarSource } from './sources/avatar-source.enum';\nimport { Source } from './sources/source';\n\n/**\n * list of Supported avatar sources\n */\nexport const defaultSources = [\n AvatarSource.FACEBOOK,\n AvatarSource.GRAVATAR,\n AvatarSource.GITHUB,\n AvatarSource.CUSTOM,\n AvatarSource.INITIALS,\n AvatarSource.VALUE\n];\n\n/**\n * list of default colors\n */\nexport const defaultColors = [\n '#1abc9c',\n '#3498db',\n '#f1c40f',\n '#8e44ad',\n '#e74c3c',\n '#d35400',\n '#2c3e50',\n '#7f8c8d'\n];\n\n/**\n * Default disable custom source cache settings\n */\nexport const defaultDisableSrcCache = false;\n\n/**\n * Provides utilities methods related to Avatar component\n */\n@Injectable({providedIn: 'root'})\nexport class AvatarService {\n public avatarSources: AvatarSource[] = defaultSources;\n public avatarColors: string[] = defaultColors;\n\n private readonly failedSources = new Map<string, Source>();\n\n constructor(\n private http: HttpClient,\n private avatarConfigService: AvatarConfigService\n ) {\n this.overrideAvatarSources();\n this.overrideAvatarColors();\n }\n\n public fetchAvatar(avatarUrl: string): Observable<unknown> {\n return this.http.get(avatarUrl);\n }\n\n public getRandomColor(avatarText: string): string {\n if (!avatarText) {\n return 'transparent';\n }\n const asciiCodeSum = this.calculateAsciiCode(avatarText);\n return this.avatarColors[asciiCodeSum % this.avatarColors.length];\n }\n\n public compareSources(\n sourceType1: AvatarSource,\n sourceType2: AvatarSource\n ): number {\n return (\n this.getSourcePriority(sourceType1) - this.getSourcePriority(sourceType2)\n );\n }\n\n public isSource(source: string): boolean {\n return this.avatarSources.includes(source as AvatarSource);\n }\n\n public isTextAvatar(sourceType: AvatarSource): boolean {\n return [AvatarSource.INITIALS, AvatarSource.VALUE].includes(sourceType);\n }\n\n private buildSourceKey(source: Source): string {\n return source.sourceType + '-' + source.sourceId;\n }\n\n public sourceHasFailedBefore(source: Source): boolean {\n return this.failedSources.has(this.buildSourceKey(source));\n }\n\n public markSourceAsFailed(source: Source): void {\n this.failedSources.set(this.buildSourceKey(source), source);\n }\n\n private overrideAvatarSources(): void {\n this.avatarSources = this.avatarConfigService.getAvatarSources(\n defaultSources\n );\n }\n\n private overrideAvatarColors(): void {\n this.avatarColors = this.avatarConfigService.getAvatarColors(defaultColors);\n }\n\n private calculateAsciiCode(value: string): number {\n return value\n .split('')\n .map(letter => letter.charCodeAt(0))\n .reduce((previous: number, current: number) => previous + current);\n }\n\n private getSourcePriority(sourceType: AvatarSource) {\n return this.avatarSources.indexOf(sourceType);\n }\n}\n","import { Source } from './source';\nimport { AvatarSource } from './avatar-source.enum';\n\n/**\n * Contract of all async sources.\n * Every async source must implement the processResponse method that extracts the avatar url from the data\n */\nexport abstract class AsyncSource implements Source {\n readonly abstract sourceType: AvatarSource;\n\n constructor(public sourceId: string) {}\n\n abstract getAvatar(size: number): string;\n abstract processResponse(data: unknown, size?: number): string | null;\n}\n","import { Source } from './source';\nimport { AvatarSource } from './avatar-source.enum';\n/**\n * Facebook source implementation.\n * Fetch avatar source based on facebook identifier\n * and image size\n */\nexport class Facebook implements Source {\n readonly sourceType: AvatarSource = AvatarSource.FACEBOOK;\n\n constructor(public sourceId: string) {}\n\n public getAvatar(size: number): string {\n return (\n 'https://graph.facebook.com/' +\n `${this.sourceId}/picture?width=${size}&height=${size}`\n );\n }\n}\n","import { Source } from './source';\nimport { AvatarSource } from './avatar-source.enum';\n/**\n * Custom source implementation.\n * return custom image as an avatar\n *\n */\nexport class Custom implements Source {\n readonly sourceType: AvatarSource = AvatarSource.CUSTOM;\n\n constructor(public sourceId: string) {}\n\n public getAvatar(): string {\n return this.sourceId;\n }\n}\n","import { Source } from './source';\nimport { AvatarSource } from './avatar-source.enum';\n\n/**\n * Initials source implementation.\n * return the initials of the given value\n */\nexport class Initials implements Source {\n readonly sourceType: AvatarSource = AvatarSource.INITIALS;\n\n constructor(public sourceId: string) {}\n\n public getAvatar(size: number): string {\n return this.getInitials(this.sourceId, size);\n }\n\n /**\n * Returns the initial letters of a name in a string.\n */\n private getInitials(name: string, size: number): string {\n name = name.trim();\n\n if (!name) {\n return '';\n }\n\n const initials = name.split(' ');\n\n if (size && size < initials.length) {\n return this.constructInitials(initials.slice(0, size));\n } else {\n return this.constructInitials(initials);\n }\n }\n\n /**\n * Iterates a person's name string to get the initials of each word in uppercase.\n */\n private constructInitials(elements: string[]): string {\n if (!elements || !elements.length) {\n return '';\n }\n\n return elements\n .filter(element => element && element.length > 0)\n .map(element => element[0].toUpperCase())\n .join('');\n }\n}\n","import { Md5 } from 'ts-md5';\nimport { Source } from './source';\nimport { AvatarSource } from './avatar-source.enum';\n\nfunction isRetina(): boolean {\n if (typeof window !== 'undefined' && window !== null) {\n if (window.devicePixelRatio > 1.25) {\n return true;\n }\n\n const mediaQuery = '(-webkit-min-device-pixel-ratio: 1.25), (min--moz-device-pixel-ratio: 1.25), (-o-min-device-pixel-ratio: 5/4), (min-resolution: 1.25dppx)';\n if (window.matchMedia && window.matchMedia(mediaQuery).matches) {\n return true;\n }\n }\n\n return false;\n}\n\n/**\n * Gravatar source implementation.\n * Fetch avatar source based on gravatar email\n */\nexport class Gravatar implements Source {\n readonly sourceType: AvatarSource = AvatarSource.GRAVATAR;\n public sourceId: string;\n\n constructor(public value: string) {\n this.sourceId = value.match('^[a-f0-9]{32}$')\n ? value\n : Md5.hashStr(value).toString();\n }\n\n public getAvatar(size: number): string {\n const avatarSize = isRetina() ? size * 2 : size;\n return `https://secure.gravatar.com/avatar/${\n this.sourceId\n }?s=${avatarSize}&d=404`;\n }\n}\n","import { Source } from './source';\nimport { AvatarSource } from './avatar-source.enum';\n\n/**\n * Value source implementation.\n * return the value as avatar\n */\nexport class Value implements Source {\n readonly sourceType: AvatarSource = AvatarSource.VALUE;\n\n constructor(public sourceId: string) {}\n\n public getAvatar(): string {\n return this.sourceId;\n }\n}\n","import { AsyncSource } from './async-source';\nimport { AvatarSource } from './avatar-source.enum';\n\n/**\n * GitHub source implementation.\n * Fetch avatar source based on github identifier\n */\nexport class Github extends AsyncSource {\n readonly sourceType: AvatarSource = AvatarSource.GITHUB;\n\n constructor(sourceId: string) {\n super(sourceId);\n }\n\n public getAvatar(): string {\n return `https://api.github.com/users/${this.sourceId}`;\n }\n\n /**\n * extract github avatar from json data\n */\n public processResponse(data: { avatar_url: string }, size?: number): string {\n if (size) {\n return `${data.avatar_url}&s=${size}`;\n }\n return data.avatar_url;\n }\n}\n","import {Source} from './source';\nimport {AvatarSource} from './avatar-source.enum';\n\n/**\n * Custom source implementation (with no cache).\n * return custom image as an avatar\n *\n */\nexport class CustomNoCache implements Source {\n readonly sourceType: AvatarSource = AvatarSource.CUSTOM;\n\n constructor(public sourceId: string) {}\n\n public getAvatar(): string {\n const urlSuffix = Math.random();\n return `${this.sourceId}${this.sourceId.indexOf('?') > -1 ? '&' : '?'}_=${urlSuffix}`;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Source } from './source';\nimport { Facebook } from './facebook';\nimport { Custom } from './custom';\nimport { Initials } from './initials';\nimport { Gravatar } from './gravatar';\nimport { Value } from './value';\nimport { Github } from './github';\nimport { SourceCreator } from './source.creator';\nimport { AvatarSource } from './avatar-source.enum';\nimport { AvatarConfigService } from '../avatar-config.service';\nimport { defaultDisableSrcCache } from '../avatar.service';\nimport { CustomNoCache } from './custom-no-cache';\n\n/**\n * Factory class that implements factory method pattern.\n * Used to create Source implementation class based\n * on the source Type\n */\n@Injectable({providedIn: 'root'})\nexport class SourceFactory {\n private sources: { [key: string]: SourceCreator } = {};\n\n constructor(avatarConfigService: AvatarConfigService) {\n const disableSrcCache = avatarConfigService.getDisableSrcCache(defaultDisableSrcCache);\n this.sources[AvatarSource.FACEBOOK] = Facebook;\n this.sources[AvatarSource.GRAVATAR] = Gravatar;\n this.sources[AvatarSource.CUSTOM] = disableSrcCache ? CustomNoCache : Custom;\n this.sources[AvatarSource.INITIALS] = Initials;\n this.sources[AvatarSource.VALUE] = Value;\n this.sources[AvatarSource.GITHUB] = Github;\n }\n\n public newInstance(sourceType: AvatarSource, sourceValue: string): Source {\n return new this.sources[sourceType](sourceValue);\n }\n}\n","import { AfterContentInit, Component, ElementRef, OnChanges, OnDestroy, SecurityContext, SimpleChanges, ViewChild, computed, input, output } from '@angular/core';\n\nimport { DomSanitizer, SafeUrl } from '@angular/platform-browser';\nimport { map, takeWhile } from 'rxjs/operators';\nimport { AvatarService } from './avatar.service';\nimport { AsyncSource } from './sources/async-source';\nimport { AvatarSource } from './sources/avatar-source.enum';\nimport { Source } from './sources/source';\nimport { SourceFactory } from './sources/source.factory';\n\ntype StyleObject = Record<string, string | number | null | undefined>;\ntype Style = StyleObject | string;\n\n/**\n * Semantic colours for the avatar badge and the avatar colour variants. Each maps\n * to a design-system `--hub-sys-color-*` token. Use them to colour a presence dot\n * (e.g. `success` = online, `warning` = away, `danger` = busy, `secondary` = offline)\n * or a labelled badge. Any custom string is also accepted (set `--hub-avatar-badge-color`).\n */\nexport type HubAvatarBadgeColor = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark';\n\n/**\n * Universal avatar component that\n * generates avatar from different sources\n *\n * export\n * class AvatarComponent\n * implements {OnChanges}\n */\n\n@Component({\n\t// tslint:disable-next-line:component-selector\n\tselector: 'hub-avatar',\n\tstandalone: true,\n\tstyleUrl: './avatar.component.scss',\n\ttemplate: `\n\t\t<div (click)=\"onAvatarClicked()\" class=\"avatar-container\" [class.hub-avatar--custom]=\"hasCustomContent\" [style]=\"hostStyle\">\n\t\t\t<span #customContent class=\"hub-avatar__custom\" [style]=\"customContentStyle\"><ng-content></ng-content></span>\n\t\t\t@if (!hasCustomContent) {\n\t\t\t\t@if (avatarSrc) {\n\t\t\t\t\t<img\n\t\t\t\t\t\t[src]=\"avatarSrc\"\n\t\t\t\t\t\t[alt]=\"customAlt() ? customAlt() : avatarAlt\"\n\t\t\t\t\t\t[width]=\"size()\"\n\t\t\t\t\t\t[height]=\"size()\"\n\t\t\t\t\t\t[style]=\"avatarStyle\"\n\t\t\t\t\t\t[referrerPolicy]=\"referrerpolicy()\"\n\t\t\t\t\t\t(error)=\"fetchAvatarSource()\"\n\t\t\t\t\t\tclass=\"avatar-content\"\n\t\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\t/>\n\t\t\t\t} @else {\n\t\t\t\t\t@if (avatarText) {\n\t\t\t\t\t\t<div class=\"avatar-content\" [style]=\"avatarStyle\">\n\t\t\t\t\t\t\t{{ avatarText }}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t</div>\n\t\t@if (_hasBadge()) {\n\t\t\t<span\n\t\t\t\tclass=\"hub-avatar__badge\"\n\t\t\t\t[class.hub-avatar__badge--dot]=\"_isDot()\"\n\t\t\t\t[class.hub-avatar__badge--label]=\"!_isDot()\"\n\t\t\t\t[attr.aria-hidden]=\"_isDot() ? 'true' : null\"\n\t\t\t\t>{{ _badgeText() }}</span\n\t\t\t>\n\t\t}\n\t`,\n\thost: {\n\t\t'[attr.data-badge-color]': 'badgeColor() || null',\n\t\t'[style.--hub-avatar-size]': 'avatarSizePx'\n\t}\n})\nexport class AvatarComponent implements AfterContentInit, OnChanges, OnDestroy {\n\treadonly round = input(true);\n\treadonly size = input<string | number>(50);\n\treadonly textSizeRatio = input(3);\n\treadonly bgColor = input<string>();\n\treadonly fgColor = input('#FFF');\n\treadonly borderColor = input<string>();\n\treadonly style = input<Style>({});\n\treadonly cornerRadius = input<string | number>(0);\n\treadonly facebook = input<string | null>(undefined, { alias: 'facebookId' });\n\treadonly gravatar = input<string | null>(undefined, { alias: 'gravatarId' });\n\treadonly github = input<string | null>(undefined, { alias: 'githubId' });\n\treadonly custom = input<string | SafeUrl | null>(undefined, { alias: 'src' });\n\treadonly customAlt = input<string | null>(undefined, { alias: 'alt' });\n\treadonly initials = input<string | null>(undefined, { alias: 'name' });\n\treadonly value = input<string | null>();\n\treadonly referrerpolicy = input<string | null>();\n\treadonly placeholder = input<string>();\n\treadonly initialsSize = input<string | number>(0);\n\t/**\n\t * Overlay badge at the bottom-end corner. A boolean / empty value renders a plain\n\t * dot (great for a presence indicator); a string or number renders a labelled badge\n\t * (e.g. a count like `\"4k\"`). `null` / absent (default) renders nothing.\n\t *\n\t * @example <hub-avatar badge badgeColor=\"success\" /> // dot\n\t * @example <hub-avatar badge=\"4k\" badgeColor=\"danger\" /> // labelled\n\t */\n\treadonly badge = input<string | number | boolean | null>(null);\n\n\t/**\n\t * Semantic colour of the {@link badge} (and, as a host class, of the avatar itself).\n\t * Maps to a `--hub-sys-color-*` token; any custom string also works (set\n\t * `--hub-avatar-badge-color`). When unset the badge uses a neutral default.\n\t */\n\treadonly badgeColor = input<HubAvatarBadgeColor | (string & {}) | null>(null);\n\n\t/** True when a badge should be rendered (the `badge` input is set to anything but `null` / `false`). */\n\tprotected readonly _hasBadge = computed(() => {\n\t\tconst b = this.badge();\n\t\treturn b !== null && b !== undefined && b !== false;\n\t});\n\n\t/** The badge's text content; empty for a plain dot (`badge` is `true` or an empty string). */\n\tprotected readonly _badgeText = computed(() => {\n\t\tconst b = this.badge();\n\t\tif (b === true || b === '' || b === null || b === undefined || b === false) {\n\t\t\treturn '';\n\t\t}\n\t\treturn String(b);\n\t});\n\n\t/** True when the badge is a plain dot (shown, but with no text content). */\n\tprotected readonly _isDot = computed(() => this._hasBadge() && this._badgeText() === '');\n\n\treadonly clickOnAvatar = output<Source>();\n\n\t/** Wrapper around the projected content (`<ng-content>`), used to detect whether the consumer projected anything. */\n\t@ViewChild('customContent', { static: true }) private customContentRef?: ElementRef<HTMLElement>;\n\n\t/** True when the consumer projected custom content (an icon, SVG, image, …) into the avatar. */\n\thasCustomContent = false;\n\n\t/** Inline style applied to the projected-content slot (honours `bgColor` / `fgColor` / `borderColor` / `style`). */\n\tcustomContentStyle: StyleObject = {};\n\n\tisAlive = true;\n\tavatarSrc: SafeUrl | null = null;\n\tavatarAlt: SafeUrl | null = null;\n\tavatarText: string | null = null;\n\tavatarStyle: StyleObject = {};\n\thostStyle: StyleObject = {};\n\n\tprivate currentIndex = -1;\n\tprivate sources: Source[] = [];\n\n\tconstructor(\n\t\tprivate sourceFactory: SourceFactory,\n\t\tprivate avatarService: AvatarService,\n\t\tprivate sanitizer: DomSanitizer\n\t) {}\n\n\tonAvatarClicked(): void {\n\t\tthis.clickOnAvatar.emit(this.sources[this.currentIndex]);\n\t}\n\n\t/**\n\t * Detects projected content once it is available and, when present, computes its style.\n\t * Runs after content init so `<ng-content>` nodes are already in place.\n\t */\n\tngAfterContentInit(): void {\n\t\tconst host = this.customContentRef?.nativeElement;\n\t\tthis.hasCustomContent = !!host && this.hasMeaningfulProjectedContent(host);\n\t\tif (this.hasCustomContent) {\n\t\t\tthis.customContentStyle = this.getCustomContentStyle();\n\t\t}\n\t}\n\n\t/**\n\t * Returns true when the projected slot holds a real element or non-whitespace text,\n\t * so whitespace-only projection does not flip the avatar into custom-content mode.\n\t *\n\t * @param host The element wrapping the projected content.\n\t */\n\tprivate hasMeaningfulProjectedContent(host: HTMLElement): boolean {\n\t\treturn Array.from(host.childNodes).some(\n\t\t\t(node) =>\n\t\t\t\tnode.nodeType === Node.ELEMENT_NODE ||\n\t\t\t\t(node.nodeType === Node.TEXT_NODE && (node.textContent ?? '').trim().length > 0)\n\t\t);\n\t}\n\n\t/**\n\t * Builds the inline style for the projected-content slot. Sensible visible defaults\n\t * (a themed background circle and a readable foreground colour) come from CSS tokens;\n\t * the `bgColor` / `fgColor` / `borderColor` / `style` inputs override them when set.\n\t */\n\tprivate getCustomContentStyle(): StyleObject {\n\t\tconst borderColor = this.borderColor();\n\t\tconst bgColor = this.bgColor();\n\t\tconst hasCustomFgColor = this.fgColor() !== '#FFF';\n\t\treturn {\n\t\t\tbackgroundColor: bgColor ? bgColor : undefined,\n\t\t\tcolor: hasCustomFgColor ? this.fgColor() : undefined,\n\t\t\tborder: borderColor ? '1px solid ' + borderColor : undefined,\n\t\t\t...this.getCustomStyleObject()\n\t\t};\n\t}\n\n\t/**\n\t * The avatar size as a px string. Exposed on the host as `--hub-avatar-size`\n\t * so the status dot (and any token-driven child) scales with the avatar.\n\t */\n\tget avatarSizePx(): string {\n\t\treturn (parseFloat(String(this.size())) || 50) + 'px';\n\t}\n\n\t/**\n\t * Detect inputs change\n\t *\n\t * param {{ [propKey: string]: SimpleChange }} changes\n\t *\n\t * memberof AvatarComponent\n\t */\n\tngOnChanges(changes: SimpleChanges): void {\n\t\tfor (const propName in changes) {\n\t\t\tif (this.avatarService.isSource(propName)) {\n\t\t\t\tconst sourceType: AvatarSource = AvatarSource[propName.toUpperCase() as keyof typeof AvatarSource];\n\t\t\t\tconst currentValue = changes[propName].currentValue;\n\t\t\t\tif (currentValue && typeof currentValue === 'string') {\n\t\t\t\t\tthis.addSource(sourceType, currentValue);\n\t\t\t\t} else {\n\t\t\t\t\tconst sanitized = this.sanitizer.sanitize(SecurityContext.URL, currentValue);\n\t\t\t\t\tif (sanitized) {\n\t\t\t\t\t\tthis.addSource(sourceType, sanitized);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.removeSource(sourceType);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Reinitialize when any source input changes so fallback order is recalculated.\n\t\tthis.initializeAvatar();\n\t\tif (this.hasCustomContent) {\n\t\t\tthis.customContentStyle = this.getCustomContentStyle();\n\t\t}\n\t}\n\n\t/**\n\t * Fetch avatar source\n\t *\n\t * memberOf AvatarComponent\n\t */\n\tfetchAvatarSource(): void {\n\t\tconst previousSource = this.sources[this.currentIndex];\n\t\tif (previousSource) {\n\t\t\tthis.avatarService.markSourceAsFailed(previousSource);\n\t\t}\n\n\t\tconst source = this.findNextSource();\n\t\tif (!source) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.avatarService.isTextAvatar(source.sourceType)) {\n\t\t\tthis.buildTextAvatar(source);\n\t\t\tthis.avatarSrc = null;\n\t\t} else {\n\t\t\tthis.buildImageAvatar(source);\n\t\t}\n\t}\n\n\tprivate findNextSource(): Source | null {\n\t\twhile (++this.currentIndex < this.sources.length) {\n\t\t\tconst source = this.sources[this.currentIndex];\n\t\t\tif (source && !this.avatarService.sourceHasFailedBefore(source)) {\n\t\t\t\treturn source;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis.isAlive = false;\n\t}\n\n\t/**\n\t * Initialize the avatar component and its fallback system\n\t */\n\tprivate initializeAvatar(): void {\n\t\tconst computedBorderRadius = this.round()\n\t\t\t? '50%'\n\t\t\t: this.cornerRadius() + 'px';\n\t\tthis.hostStyle = {\n\t\t\twidth: this.size() + 'px',\n\t\t\theight: this.size() + 'px',\n\t\t\tborderRadius: computedBorderRadius\n\t\t};\n\n\t\tthis.currentIndex = -1;\n\t\tif (this.sources.length > 0) {\n\t\t\tthis.sortAvatarSources();\n\t\t\tthis.fetchAvatarSource();\n\t\t}\n\t}\n\n\tprivate sortAvatarSources(): void {\n\t\tthis.sources.sort((source1: Source, source2: Source) =>\n\t\t\tthis.avatarService.compareSources(source1.sourceType, source2.sourceType)\n\t\t);\n\t}\n\n\tprivate buildTextAvatar(avatarSource: Source): void {\n\t\tthis.avatarText = avatarSource.getAvatar(+this.initialsSize());\n\t\tthis.avatarStyle = this.getInitialsStyle(avatarSource.sourceId);\n\t}\n\n\tprivate buildImageAvatar(avatarSource: Source): void {\n\t\tthis.avatarStyle = this.getImageStyle();\n\t\tif (avatarSource instanceof AsyncSource) {\n\t\t\tthis.fetchAndProcessAsyncAvatar(avatarSource);\n\t\t} else {\n\t\t\tthis.avatarSrc = this.sanitizer.bypassSecurityTrustUrl(avatarSource.getAvatar(+this.size()));\n\t\t\tthis.avatarAlt = avatarSource.getAvatar(+this.size());\n\t\t}\n\t}\n\n\t/**\n\t *\n\t * returns initials style\n\t *\n\t * memberOf AvatarComponent\n\t */\n\tprivate getInitialsStyle(avatarValue: string): StyleObject {\n\t\tconst borderColor = this.borderColor();\n\t\tconst bgColor = this.bgColor();\n\t\tconst hasCornerRadius = !this.round() || +this.cornerRadius() > 0;\n\t\tconst hasCustomFgColor = this.fgColor() !== '#FFF';\n\t\treturn {\n\t\t\ttextAlign: 'center',\n\t\t\tborderRadius: hasCornerRadius ? (this.round() ? '100%' : this.cornerRadius() + 'px') : undefined,\n\t\t\tborder: borderColor ? '1px solid ' + borderColor : undefined,\n\t\t\ttextTransform: 'uppercase',\n\t\t\tcolor: hasCustomFgColor ? this.fgColor() : undefined,\n\t\t\tbackgroundColor: bgColor ? bgColor : this.avatarService.getRandomColor(avatarValue),\n\t\t\tfont: Math.floor(+this.size() / this.textSizeRatio()) + 'px Helvetica, Arial, sans-serif',\n\t\t\tlineHeight: this.size() + 'px',\n\t\t\t...this.getCustomStyleObject()\n\t\t};\n\t}\n\n\t/**\n\t *\n\t * returns image style\n\t *\n\t * memberOf AvatarComponent\n\t */\n\tprivate getImageStyle(): StyleObject {\n\t\tconst borderColor = this.borderColor();\n\t\tconst hasCornerRadius = !this.round() || +this.cornerRadius() > 0;\n\t\treturn {\n\t\t\tmaxWidth: '100%',\n\t\t\tborderRadius: hasCornerRadius ? (this.round() ? '50%' : this.cornerRadius() + 'px') : undefined,\n\t\t\tborder: borderColor ? '1px solid ' + borderColor : undefined,\n\t\t\twidth: this.size() + 'px',\n\t\t\theight: this.size() + 'px',\n\t\t\t...this.getCustomStyleObject()\n\t\t};\n\t}\n\n\tprivate getCustomStyleObject(): StyleObject {\n\t\tconst customStyle = this.style();\n\t\tif (!customStyle) {\n\t\t\treturn {};\n\t\t}\n\n\t\tif (typeof customStyle === 'string') {\n\t\t\treturn this.parseInlineStyleString(customStyle);\n\t\t}\n\n\t\treturn customStyle;\n\t}\n\n\tprivate parseInlineStyleString(styleString: string): StyleObject {\n\t\tconst styleObject: StyleObject = {};\n\t\tstyleString\n\t\t\t.split(';')\n\t\t\t.map((declaration) => declaration.trim())\n\t\t\t.filter((declaration) => declaration.length > 0)\n\t\t\t.forEach((declaration) => {\n\t\t\t\tconst separatorIndex = declaration.indexOf(':');\n\t\t\t\tif (separatorIndex <= 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst property = declaration.slice(0, separatorIndex).trim();\n\t\t\t\tconst value = declaration.slice(separatorIndex + 1).trim();\n\t\t\t\tif (property && value) {\n\t\t\t\t\tstyleObject[property] = value;\n\t\t\t\t}\n\t\t\t});\n\t\treturn styleObject;\n\t}\n\n\t/**\n\t * Fetch avatar image asynchronously.\n\t *\n\t * param {Source} source represents avatar source\n\t * memberof AvatarComponent\n\t */\n\tprivate fetchAndProcessAsyncAvatar(source: AsyncSource): void {\n\t\tif (this.avatarService.sourceHasFailedBefore(source)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.avatarService\n\t\t\t.fetchAvatar(source.getAvatar(+this.size()))\n\t\t\t.pipe(\n\t\t\t\ttakeWhile(() => this.isAlive),\n\t\t\t\tmap((response) => source.processResponse(response, +this.size()))\n\t\t\t)\n\t\t\t.subscribe({\n\t\t\t\tnext: (avatarSrc) => (this.avatarSrc = avatarSrc),\n\t\t\t\terror: () => {\n\t\t\t\t\tthis.fetchAvatarSource();\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\t/**\n\t * Add avatar source\n\t *\n\t * param sourceType avatar source type e.g facebook,twitter, etc.\n\t * param sourceValue source value e.g facebookId value, etc.\n\t */\n\tprivate addSource(sourceType: AvatarSource, sourceValue: string): void {\n\t\tconst source = this.sources.find((s) => s.sourceType === sourceType);\n\t\tif (source) {\n\t\t\tsource.sourceId = sourceValue;\n\t\t} else {\n\t\t\tthis.sources.push(this.sourceFactory.newInstance(sourceType, sourceValue));\n\t\t}\n\t}\n\n\t/**\n\t * Remove avatar source\n\t *\n\t * param sourceType avatar source type e.g facebook,twitter, etc.\n\t */\n\tprivate removeSource(sourceType: AvatarSource): void {\n\t\tthis.sources = this.sources.filter((source) => source.sourceType !== sourceType);\n\t}\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { AvatarConfig } from './avatar-config';\nimport { AVATAR_CONFIG } from './avatar-config.token';\nimport { AvatarComponent } from './avatar.component';\n\n/**\n * Backward-compatibility module for `<hub-avatar>`.\n *\n * @deprecated `AvatarComponent` is now a standalone component. Import it directly\n * (`imports: [AvatarComponent]`) and, if you need custom configuration, register\n * `provideAvatar()` in your application providers. This module only re-exports the\n * standalone component and will be removed in a future major version.\n */\n@NgModule({\n\timports: [AvatarComponent],\n\texports: [AvatarComponent]\n})\nexport class AvatarModule {\n\t/**\n\t * @deprecated Use `provideAvatar(config)` with the standalone APIs instead.\n\t * Kept so existing `AvatarModule.forRoot()` consumers keep working.\n\t */\n\tstatic forRoot(avatarConfig?: AvatarConfig): ModuleWithProviders<AvatarModule> {\n\t\treturn {\n\t\t\tngModule: AvatarModule,\n\t\t\tproviders: [\n\t\t\t\t{\n\t\t\t\t\tprovide: AVATAR_CONFIG,\n\t\t\t\t\tuseValue: avatarConfig ? avatarConfig : {}\n\t\t\t\t}\n\t\t\t]\n\t\t};\n\t}\n}\n","import { EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\nimport { AvatarConfig } from './avatar-config';\nimport { AVATAR_CONFIG } from './avatar-config.token';\n\n/**\n * Registers the avatar configuration for standalone applications.\n *\n * Standalone-friendly replacement for `AvatarModule.forRoot()`. Add it to your\n * `bootstrapApplication` providers (or a route's `providers`) to customise the\n * avatar source priority, colour palette or src-cache behaviour. Calling it is\n * optional — `<hub-avatar>` works out of the box with sensible defaults.\n *\n * ```ts\n * import { provideAvatar } from 'ng-hub-ui-avatar';\n *\n * bootstrapApplication(AppComponent, {\n * providers: [\n * provideAvatar({ sourcePriorityOrder: [AvatarSource.GRAVATAR, AvatarSource.INITIALS] })\n * ]\n * });\n * ```\n *\n * @param config Optional avatar configuration.\n * @returns Environment providers to add to the application config.\n */\nexport function provideAvatar(config?: AvatarConfig): EnvironmentProviders {\n\treturn makeEnvironmentProviders([\n\t\t{\n\t\t\tprovide: AVATAR_CONFIG,\n\t\t\tuseValue: config ?? {}\n\t\t}\n\t]);\n}\n","/*\n * Public API Surface of ng-hub-ui-avatar\n */\nexport * from './lib/avatar-config';\nexport * from './lib/avatar.component';\nexport * from './lib/avatar.module';\nexport * from './lib/avatar.providers';\nexport * from './lib/avatar.service';\nexport * from './lib/sources/avatar-source.enum';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i2.AvatarConfigService","i1.AvatarConfigService","i1.SourceFactory","i2.AvatarService"],"mappings":";;;;;;;AAGA;;AAEG;AACI,MAAM,aAAa,GAAG,IAAI,cAAc,CAAe,eAAe,CAAC;;MCCjE,mBAAmB,CAAA;AAIvB,IAAA,UAAA;AAHR,IAAA,WAAA,CAGQ,UAAwB,EAAA;QAAxB,IAAA,CAAA,UAAU,GAAV,UAAU;IACf;AAEI,IAAA,gBAAgB,CAAC,cAA8B,EAAA;QACrD,IACC,IAAI,CAAC,UAAU;YACf,IAAI,CAAC,UAAU,CAAC,mBAAmB;AACnC,YAAA,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC,MAAM,EACzC;AACD,YAAA,MAAM,aAAa,GAAG;gBACrB,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,mBAAmB;aAC9C;AACD,YAAA,MAAM,YAAY,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC,MAAM,KAChD,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,CAC/B;YACD,OAAO;AACN,gBAAA,GAAG,YAAY;AACf,gBAAA,GAAG,cAAc,CAAC,MAAM,CACvB,CAAC,MAAM,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC;aAE3C;QACF;AACA,QAAA,OAAO,cAAc;IACtB;AAEO,IAAA,eAAe,CAAC,aAAuB,EAAA;AAC7C,QAAA,QACC,CAAC,IAAI,CAAC,UAAU;YACf,IAAI,CAAC,UAAU,CAAC,MAAM;AACtB,YAAA,IAAI,CAAC,UAAU,CAA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Ae,CAAA,EAAA,CAAA;wGAEb,YAAY,EAAA,CAAA;;2FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACT,OAAO,EAAE,CAAC,eAAe,CAAC;oBAC1B,OAAO,EAAE,CAAC,eAAe;AACzB,iBAAA;;;ACbD;;;;;;;;;;;;;;;;;;;;AAoBG;AACG,SAAU,aAAa,CAAC,MAAqB,EAAA;AAClD,IAAA,OAAO,wBAAwB,CAAC;AAC/B,QAAA;AACC,YAAA,OAAO,EAAE,aAAa;YACtB,QAAQ,EAAE,MAAM,IAAI;AACpB;AACD,KAAA,CAAC;AACH;;AChCA;;AAEG;;ACFH;;AAEG;;;;"}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ng-hub-ui-avatar",
|
|
3
3
|
"description": "A universal avatar component for Angular applications that fetches / generates avatar based on the information you have about the user. Supports initials, Gravatar integration, custom images and styling options. Perfect for user profiles and comment systems.",
|
|
4
|
-
"version": "22.
|
|
4
|
+
"version": "22.5.0",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
7
7
|
"avatar",
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { AfterContentInit, OnChanges, OnDestroy, SimpleChanges, ModuleWithProviders } from '@angular/core';
|
|
2
|
+
import { AfterContentInit, OnChanges, OnDestroy, SimpleChanges, ModuleWithProviders, EnvironmentProviders } from '@angular/core';
|
|
3
3
|
import { SafeUrl, DomSanitizer } from '@angular/platform-browser';
|
|
4
4
|
import { HttpClient } from '@angular/common/http';
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
6
|
-
import * as i2 from '@angular/common';
|
|
7
6
|
|
|
8
7
|
declare enum AvatarSource {
|
|
9
8
|
FACEBOOK = "facebook",
|
|
@@ -274,15 +273,50 @@ declare class AvatarComponent implements AfterContentInit, OnChanges, OnDestroy
|
|
|
274
273
|
*/
|
|
275
274
|
private removeSource;
|
|
276
275
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AvatarComponent, never>;
|
|
277
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AvatarComponent, "hub-avatar", never, { "round": { "alias": "round"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "textSizeRatio": { "alias": "textSizeRatio"; "required": false; "isSignal": true; }; "bgColor": { "alias": "bgColor"; "required": false; "isSignal": true; }; "fgColor": { "alias": "fgColor"; "required": false; "isSignal": true; }; "borderColor": { "alias": "borderColor"; "required": false; "isSignal": true; }; "style": { "alias": "style"; "required": false; "isSignal": true; }; "cornerRadius": { "alias": "cornerRadius"; "required": false; "isSignal": true; }; "facebook": { "alias": "facebookId"; "required": false; "isSignal": true; }; "gravatar": { "alias": "gravatarId"; "required": false; "isSignal": true; }; "github": { "alias": "githubId"; "required": false; "isSignal": true; }; "custom": { "alias": "src"; "required": false; "isSignal": true; }; "customAlt": { "alias": "alt"; "required": false; "isSignal": true; }; "initials": { "alias": "name"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "referrerpolicy": { "alias": "referrerpolicy"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "initialsSize": { "alias": "initialsSize"; "required": false; "isSignal": true; }; "badge": { "alias": "badge"; "required": false; "isSignal": true; }; "badgeColor": { "alias": "badgeColor"; "required": false; "isSignal": true; }; }, { "clickOnAvatar": "clickOnAvatar"; }, never, ["*"],
|
|
276
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AvatarComponent, "hub-avatar", never, { "round": { "alias": "round"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "textSizeRatio": { "alias": "textSizeRatio"; "required": false; "isSignal": true; }; "bgColor": { "alias": "bgColor"; "required": false; "isSignal": true; }; "fgColor": { "alias": "fgColor"; "required": false; "isSignal": true; }; "borderColor": { "alias": "borderColor"; "required": false; "isSignal": true; }; "style": { "alias": "style"; "required": false; "isSignal": true; }; "cornerRadius": { "alias": "cornerRadius"; "required": false; "isSignal": true; }; "facebook": { "alias": "facebookId"; "required": false; "isSignal": true; }; "gravatar": { "alias": "gravatarId"; "required": false; "isSignal": true; }; "github": { "alias": "githubId"; "required": false; "isSignal": true; }; "custom": { "alias": "src"; "required": false; "isSignal": true; }; "customAlt": { "alias": "alt"; "required": false; "isSignal": true; }; "initials": { "alias": "name"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "referrerpolicy": { "alias": "referrerpolicy"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "initialsSize": { "alias": "initialsSize"; "required": false; "isSignal": true; }; "badge": { "alias": "badge"; "required": false; "isSignal": true; }; "badgeColor": { "alias": "badgeColor"; "required": false; "isSignal": true; }; }, { "clickOnAvatar": "clickOnAvatar"; }, never, ["*"], true, never>;
|
|
278
277
|
}
|
|
279
278
|
|
|
279
|
+
/**
|
|
280
|
+
* Backward-compatibility module for `<hub-avatar>`.
|
|
281
|
+
*
|
|
282
|
+
* @deprecated `AvatarComponent` is now a standalone component. Import it directly
|
|
283
|
+
* (`imports: [AvatarComponent]`) and, if you need custom configuration, register
|
|
284
|
+
* `provideAvatar()` in your application providers. This module only re-exports the
|
|
285
|
+
* standalone component and will be removed in a future major version.
|
|
286
|
+
*/
|
|
280
287
|
declare class AvatarModule {
|
|
288
|
+
/**
|
|
289
|
+
* @deprecated Use `provideAvatar(config)` with the standalone APIs instead.
|
|
290
|
+
* Kept so existing `AvatarModule.forRoot()` consumers keep working.
|
|
291
|
+
*/
|
|
281
292
|
static forRoot(avatarConfig?: AvatarConfig): ModuleWithProviders<AvatarModule>;
|
|
282
293
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AvatarModule, never>;
|
|
283
|
-
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AvatarModule,
|
|
294
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AvatarModule, never, [typeof AvatarComponent], [typeof AvatarComponent]>;
|
|
284
295
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<AvatarModule>;
|
|
285
296
|
}
|
|
286
297
|
|
|
287
|
-
|
|
298
|
+
/**
|
|
299
|
+
* Registers the avatar configuration for standalone applications.
|
|
300
|
+
*
|
|
301
|
+
* Standalone-friendly replacement for `AvatarModule.forRoot()`. Add it to your
|
|
302
|
+
* `bootstrapApplication` providers (or a route's `providers`) to customise the
|
|
303
|
+
* avatar source priority, colour palette or src-cache behaviour. Calling it is
|
|
304
|
+
* optional — `<hub-avatar>` works out of the box with sensible defaults.
|
|
305
|
+
*
|
|
306
|
+
* ```ts
|
|
307
|
+
* import { provideAvatar } from 'ng-hub-ui-avatar';
|
|
308
|
+
*
|
|
309
|
+
* bootstrapApplication(AppComponent, {
|
|
310
|
+
* providers: [
|
|
311
|
+
* provideAvatar({ sourcePriorityOrder: [AvatarSource.GRAVATAR, AvatarSource.INITIALS] })
|
|
312
|
+
* ]
|
|
313
|
+
* });
|
|
314
|
+
* ```
|
|
315
|
+
*
|
|
316
|
+
* @param config Optional avatar configuration.
|
|
317
|
+
* @returns Environment providers to add to the application config.
|
|
318
|
+
*/
|
|
319
|
+
declare function provideAvatar(config?: AvatarConfig): EnvironmentProviders;
|
|
320
|
+
|
|
321
|
+
export { AvatarComponent, AvatarModule, AvatarService, AvatarSource, defaultColors, defaultDisableSrcCache, defaultSources, provideAvatar };
|
|
288
322
|
export type { AvatarConfig, HubAvatarBadgeColor };
|