@ngstarter-ui/components 21.0.57 → 21.0.58

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ngstarter-ui/components",
3
3
  "description": "NgStarter - AI-friendly Enterprise Angular UI Components and Admin Panel",
4
- "version": "21.0.57",
4
+ "version": "21.0.58",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/elementarlabsdev/ngstarter.git"
@@ -49,8 +49,6 @@
49
49
  "@codemirror/lang-json": "^6.0.2",
50
50
  "@codemirror/lang-sass": "^6.0.2",
51
51
  "@ctrl/tinycolor": "^4.1.0",
52
- "@dicebear/collection": "^9.2.2",
53
- "@dicebear/core": "^9.4.2",
54
52
  "@embedpdf/core": "^2.14.3",
55
53
  "@embedpdf/engines": "^2.14.3",
56
54
  "@embedpdf/models": "^2.14.3",
@@ -1,32 +1,61 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { InjectionToken, OnInit, OnChanges, AfterViewInit, SimpleChanges } from '@angular/core';
2
+ import { InjectionToken, OnInit, OnChanges, AfterViewInit, SimpleChanges, EnvironmentProviders } from '@angular/core';
3
3
 
4
4
  declare const AVATAR_ACCESSOR: InjectionToken<unknown>;
5
5
  type AvatarPresenceIndicator = 'online' | 'offline' | 'away' | null | string;
6
+ type AvatarAppearance = 'default' | 'identicon' | 'initials' | string;
7
+ type AvatarKey = string | number | null | undefined;
6
8
  type AvatarVariant = 'solid' | 'tonal' | 'outlined' | 'plain' | string;
7
9
 
10
+ interface GeneratedAvatarCell {
11
+ id: string;
12
+ x: number;
13
+ y: number;
14
+ }
15
+ interface GeneratedAvatar {
16
+ kind: 'identicon' | 'initials';
17
+ background: string;
18
+ foreground: string;
19
+ label: string;
20
+ cells: GeneratedAvatarCell[];
21
+ }
22
+
8
23
  declare class Avatar implements OnInit, OnChanges, AfterViewInit {
9
24
  private _elementRef;
25
+ private _config;
26
+ private readonly _avatarGenerator;
10
27
  image: _angular_core.InputSignal<string>;
11
28
  variant: _angular_core.InputSignal<string>;
12
29
  clickable: _angular_core.InputSignalWithTransform<boolean, unknown>;
13
30
  label: _angular_core.InputSignal<string>;
31
+ key: _angular_core.InputSignal<AvatarKey>;
32
+ appearance: _angular_core.InputSignal<string | undefined>;
33
+ backgroundColors: _angular_core.InputSignal<string[]>;
34
+ foregroundColors: _angular_core.InputSignal<string[]>;
14
35
  alt: _angular_core.InputSignal<string>;
15
36
  automaticColor: _angular_core.InputSignal<unknown>;
16
37
  presenceIndicator: _angular_core.InputSignal<AvatarPresenceIndicator>;
17
38
  protected imageLoaded: boolean;
18
39
  protected showLabel: boolean;
40
+ protected readonly generatedAvatar: _angular_core.Signal<GeneratedAvatar | null>;
19
41
  ngOnInit(): void;
20
42
  ngAfterViewInit(): void;
21
43
  ngOnChanges(changes: SimpleChanges): void;
22
44
  onImageLoaded(): void;
23
45
  private _setAutomaticColor;
24
46
  private _newShade;
47
+ private _seed;
25
48
  isValidHex(color: any): boolean;
26
49
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<Avatar, never>;
27
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<Avatar, "ngs-avatar,[ngs-avatar]", ["ngsAvatar"], { "image": { "alias": "image"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "clickable": { "alias": "clickable"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "alt": { "alias": "alt"; "required": false; "isSignal": true; }; "automaticColor": { "alias": "automaticColor"; "required": false; "isSignal": true; }; "presenceIndicator": { "alias": "presenceIndicator"; "required": false; "isSignal": true; }; }, {}, never, ["mat-icon,ngs-icon"], true, never>;
50
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<Avatar, "ngs-avatar,[ngs-avatar]", ["ngsAvatar"], { "image": { "alias": "image"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "clickable": { "alias": "clickable"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "key": { "alias": "key"; "required": false; "isSignal": true; }; "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "backgroundColors": { "alias": "backgroundColors"; "required": false; "isSignal": true; }; "foregroundColors": { "alias": "foregroundColors"; "required": false; "isSignal": true; }; "alt": { "alias": "alt"; "required": false; "isSignal": true; }; "automaticColor": { "alias": "automaticColor"; "required": false; "isSignal": true; }; "presenceIndicator": { "alias": "presenceIndicator"; "required": false; "isSignal": true; }; }, {}, never, ["mat-icon,ngs-icon"], true, never>;
28
51
  }
29
52
 
53
+ interface AvatarConfig {
54
+ appearance?: AvatarAppearance;
55
+ }
56
+ declare const AVATAR_CONFIG: InjectionToken<AvatarConfig>;
57
+ declare function provideAvatar(config: AvatarConfig): EnvironmentProviders;
58
+
30
59
  declare class AvatarGroup {
31
60
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AvatarGroup, never>;
32
61
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<AvatarGroup, "ngs-avatar-group", ["ngsAvatarGroup"], {}, {}, never, ["*"], true, never>;
@@ -42,28 +71,5 @@ declare class AvatarTotal {
42
71
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<AvatarTotal, "ngs-avatar-total,[ngs-avatar-total]", ["ngsAvatarTotal"], {}, {}, never, ["*"], true, never>;
43
72
  }
44
73
 
45
- interface Preset {
46
- style: any;
47
- options?: {
48
- scale?: number;
49
- backgroundColor?: string[];
50
- fontWeight?: number;
51
- };
52
- }
53
- declare class Dicebear implements OnInit {
54
- image: _angular_core.InputSignal<string>;
55
- clickable: _angular_core.InputSignalWithTransform<boolean, unknown>;
56
- key: _angular_core.InputSignal<any>;
57
- preset: _angular_core.InputSignal<string>;
58
- alt: _angular_core.InputSignal<string | undefined>;
59
- presenceIndicator: _angular_core.InputSignal<AvatarPresenceIndicator>;
60
- protected imageLoaded: boolean;
61
- protected svg: string;
62
- ngOnInit(): void;
63
- onImageLoaded(): void;
64
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<Dicebear, never>;
65
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<Dicebear, "ngs-dicebear,[ngs-dicebear]", ["ngsDicebear"], { "image": { "alias": "image"; "required": false; "isSignal": true; }; "clickable": { "alias": "clickable"; "required": false; "isSignal": true; }; "key": { "alias": "key"; "required": false; "isSignal": true; }; "preset": { "alias": "preset"; "required": false; "isSignal": true; }; "alt": { "alias": "alt"; "required": false; "isSignal": true; }; "presenceIndicator": { "alias": "presenceIndicator"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
66
- }
67
-
68
- export { AVATAR_ACCESSOR, Avatar, AvatarGroup, AvatarMore, AvatarTotal, Dicebear };
69
- export type { AvatarPresenceIndicator, AvatarVariant, Preset };
74
+ export { AVATAR_ACCESSOR, AVATAR_CONFIG, Avatar, AvatarGroup, AvatarMore, AvatarTotal, provideAvatar };
75
+ export type { AvatarAppearance, AvatarConfig, AvatarKey, AvatarPresenceIndicator, AvatarVariant };