valtech-components 4.0.30 → 4.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,6 +32,15 @@ export declare class AvatarUploadComponent {
32
32
  fileInput: ElementRef<HTMLInputElement>;
33
33
  /** Component configuration */
34
34
  readonly props: import("@angular/core").InputSignal<AvatarUploadMetadata>;
35
+ /** Custom storage path for the full-size image (e.g. 'orgs/{orgId}/logo.jpg').
36
+ * When provided, overrides the default 'users/{userId}/avatar.jpg' path. */
37
+ readonly customPath: import("@angular/core").InputSignal<string>;
38
+ /** Custom storage path for the thumbnail (e.g. 'orgs/{orgId}/thumb.jpg').
39
+ * When provided, overrides the default 'users/{userId}/thumb.jpg' path. */
40
+ readonly customThumbPath: import("@angular/core").InputSignal<string>;
41
+ /** When true, skips the AuthService.updateAvatar() backend sync call after upload.
42
+ * Use this when the caller will handle the backend update (e.g. via OrgService). */
43
+ readonly skipBackendSync: import("@angular/core").InputSignal<boolean>;
35
44
  /** Emitted after successful upload and backend sync */
36
45
  uploaded: EventEmitter<AvatarUploadResult>;
37
46
  /** Emitted on any error during the process */
@@ -86,5 +95,5 @@ export declare class AvatarUploadComponent {
86
95
  /** Emit error event */
87
96
  private emitError;
88
97
  static ɵfac: i0.ɵɵFactoryDeclaration<AvatarUploadComponent, never>;
89
- static ɵcmp: i0.ɵɵComponentDeclaration<AvatarUploadComponent, "val-avatar-upload", never, { "props": { "alias": "props"; "required": false; "isSignal": true; }; }, { "uploaded": "uploaded"; "error": "error"; "uploadStart": "uploadStart"; }, never, never, true, never>;
98
+ static ɵcmp: i0.ɵɵComponentDeclaration<AvatarUploadComponent, "val-avatar-upload", never, { "props": { "alias": "props"; "required": false; "isSignal": true; }; "customPath": { "alias": "customPath"; "required": false; "isSignal": true; }; "customThumbPath": { "alias": "customThumbPath"; "required": false; "isSignal": true; }; "skipBackendSync": { "alias": "skipBackendSync"; "required": false; "isSignal": true; }; }, { "uploaded": "uploaded"; "error": "error"; "uploadStart": "uploadStart"; }, never, never, true, never>;
90
99
  }
@@ -1,4 +1,5 @@
1
1
  import { OnInit, WritableSignal } from '@angular/core';
2
+ import { AvatarUploadResult } from '../avatar-upload/types';
2
3
  import { FormMetadata, FormSubmit } from '../../types';
3
4
  import { Organization } from '../../../services/org/types';
4
5
  import * as i0 from "@angular/core";
@@ -35,13 +36,16 @@ export declare class EditOrgModalComponent implements OnInit {
35
36
  /** Namespace i18n con que la vista resuelve sus textos. */
36
37
  i18nNamespace: string;
37
38
  private readonly saving;
39
+ protected readonly logoUrl: WritableSignal<string>;
38
40
  readonly formMeta: WritableSignal<FormMetadata>;
41
+ protected readonly orgInitials: import("@angular/core").Signal<string>;
39
42
  constructor();
40
43
  ngOnInit(): void;
41
- private get activeOrgId();
44
+ protected get activeOrgId(): string;
42
45
  private buildFormMeta;
43
46
  onFormSubmit(event: FormSubmit): void;
44
47
  private save;
48
+ onLogoUploaded(result: AvatarUploadResult): Promise<void>;
45
49
  dismiss(): void;
46
50
  t(key: string): string;
47
51
  static ɵfac: i0.ɵɵFactoryDeclaration<EditOrgModalComponent, never>;
@@ -28,20 +28,25 @@ export declare class SwitchOrgModalComponent {
28
28
  };
29
29
  /** Callback tras un switch exitoso (pasado por `componentProps`). */
30
30
  onSuccess?: () => void;
31
+ /** Callback al hacer clic en "Mi perfil" (pasado por `componentProps`). */
32
+ onProfileClick?: () => void;
31
33
  /** Namespace i18n con que la vista resuelve sus textos. */
32
34
  i18nNamespace: string;
33
35
  readonly orgs: import("@angular/core").WritableSignal<Organization[]>;
34
36
  readonly loading: import("@angular/core").WritableSignal<boolean>;
35
37
  readonly query: import("@angular/core").WritableSignal<string>;
36
38
  readonly switchingId: import("@angular/core").WritableSignal<string>;
39
+ protected readonly user: import("@angular/core").Signal<import("valtech-components").AuthUser>;
40
+ protected readonly userInitials: import("@angular/core").Signal<string>;
37
41
  readonly activeOrgId: import("@angular/core").Signal<string>;
38
42
  readonly filteredOrgs: import("@angular/core").Signal<Organization[]>;
39
43
  constructor();
40
44
  onQueryChange(value: string): void;
41
45
  onSelect(org: Organization): Promise<void>;
42
46
  private loadOrgs;
47
+ onProfile(): void;
43
48
  dismiss(): void;
44
49
  t(key: string): string;
45
50
  static ɵfac: i0.ɵɵFactoryDeclaration<SwitchOrgModalComponent, never>;
46
- static ɵcmp: i0.ɵɵComponentDeclaration<SwitchOrgModalComponent, "val-switch-org-modal", never, { "_modalRef": { "alias": "_modalRef"; "required": false; }; "onSuccess": { "alias": "onSuccess"; "required": false; }; "i18nNamespace": { "alias": "i18nNamespace"; "required": false; }; }, {}, never, never, true, never>;
51
+ static ɵcmp: i0.ɵɵComponentDeclaration<SwitchOrgModalComponent, "val-switch-org-modal", never, { "_modalRef": { "alias": "_modalRef"; "required": false; }; "onSuccess": { "alias": "onSuccess"; "required": false; }; "onProfileClick": { "alias": "onProfileClick"; "required": false; }; "i18nNamespace": { "alias": "i18nNamespace"; "required": false; }; }, {}, never, never, true, never>;
47
52
  }
@@ -10,6 +10,7 @@ export interface Organization {
10
10
  isActive: boolean;
11
11
  createdAt: string;
12
12
  updatedAt?: string;
13
+ logoUrl?: string;
13
14
  }
14
15
  export interface ListMyOrgsResponse {
15
16
  operationId: string;
@@ -29,6 +30,7 @@ export interface CreateOrgRequest {
29
30
  export interface UpdateOrgRequest {
30
31
  name?: string;
31
32
  description?: string;
33
+ logoUrl?: string;
32
34
  }
33
35
  export interface InviteUserRequest {
34
36
  email?: string;
package/lib/version.d.ts CHANGED
@@ -2,4 +2,4 @@
2
2
  * Current version of valtech-components.
3
3
  * This is automatically updated during the publish process.
4
4
  */
5
- export declare const VERSION = "4.0.30";
5
+ export declare const VERSION = "4.0.32";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "4.0.30",
3
+ "version": "4.0.32",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "valtech-firebase-config": "./src/lib/services/firebase/scripts/generate-sw-config.js"