valtech-components 2.0.902 → 2.0.903
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/esm2022/lib/services/auth/auth.service.mjs +40 -4
- package/esm2022/lib/services/auth/types.mjs +1 -1
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +39 -5
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/atoms/rights-footer/rights-footer.component.d.ts +1 -1
- package/lib/components/organisms/article/article.component.d.ts +2 -2
- package/lib/components/organisms/toolbar/toolbar.component.d.ts +1 -1
- package/lib/services/auth/auth.service.d.ts +7 -2
- package/lib/services/auth/types.d.ts +7 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -43,7 +43,7 @@ export declare class RightsFooterComponent {
|
|
|
43
43
|
/**
|
|
44
44
|
* Computed helper for color prop in template.
|
|
45
45
|
*/
|
|
46
|
-
propsColor: import("@angular/core").Signal<"
|
|
46
|
+
propsColor: import("@angular/core").Signal<"medium" | "primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | "light" | "dark">;
|
|
47
47
|
/**
|
|
48
48
|
* Computed helper for withMargin prop in template.
|
|
49
49
|
*/
|
|
@@ -90,9 +90,9 @@ export declare class ArticleComponent implements OnInit {
|
|
|
90
90
|
contentInterpolation?: Record<string, string | number>;
|
|
91
91
|
icon?: import("valtech-components").IconMetada;
|
|
92
92
|
shape?: "round";
|
|
93
|
-
size?: "
|
|
93
|
+
size?: "small" | "large" | "default";
|
|
94
94
|
fill?: "default" | "clear" | "outline" | "solid";
|
|
95
|
-
type: "
|
|
95
|
+
type: "button" | "submit" | "reset";
|
|
96
96
|
token?: string;
|
|
97
97
|
ref?: any;
|
|
98
98
|
handler?: (value: any) => any;
|
|
@@ -72,7 +72,7 @@ export declare class ToolbarComponent implements OnInit {
|
|
|
72
72
|
};
|
|
73
73
|
showFlags?: boolean;
|
|
74
74
|
color: import("@ionic/core").Color;
|
|
75
|
-
size?: "
|
|
75
|
+
size?: "small" | "large" | "default";
|
|
76
76
|
fill?: "default" | "clear" | "outline" | "solid";
|
|
77
77
|
shape?: "round";
|
|
78
78
|
expand?: "full" | "block";
|
|
@@ -10,6 +10,7 @@ import { SigninRequest, SigninResponse, SignupRequest, SignupResponse, VerifyEma
|
|
|
10
10
|
import { OAuthService } from './oauth.service';
|
|
11
11
|
import { FirebaseService, MessagingService } from '../firebase';
|
|
12
12
|
import { I18nService } from '../i18n';
|
|
13
|
+
import { Firestore } from '@angular/fire/firestore';
|
|
13
14
|
import { ConfirmationDialogService } from '../confirmation-dialog/confirmation-dialog.service';
|
|
14
15
|
import * as i0 from "@angular/core";
|
|
15
16
|
/**
|
|
@@ -47,9 +48,11 @@ export declare class AuthService implements OnDestroy {
|
|
|
47
48
|
private messagingService;
|
|
48
49
|
private i18nService;
|
|
49
50
|
private confirmationService;
|
|
51
|
+
private firestoreInstance;
|
|
50
52
|
private refreshTimerId;
|
|
51
53
|
private syncSubscription;
|
|
52
|
-
|
|
54
|
+
private firestoreRBACUnsubscribe;
|
|
55
|
+
constructor(config: ValtechAuthConfig | null, http: HttpClient, router: Router, stateService: AuthStateService, tokenService: TokenService, storageService: AuthStorageService, syncService: AuthSyncService, firebaseService: FirebaseService, oauthService: OAuthService, messagingService: MessagingService | null, i18nService: I18nService | null, confirmationService: ConfirmationDialogService, firestoreInstance: Firestore | null);
|
|
53
56
|
/** Estado completo de autenticación */
|
|
54
57
|
readonly state: import("@angular/core").Signal<import("./types").AuthState>;
|
|
55
58
|
/** Usuario está autenticado */
|
|
@@ -348,6 +351,8 @@ export declare class AuthService implements OnDestroy {
|
|
|
348
351
|
private get usersBaseUrl();
|
|
349
352
|
private handleSuccessfulAuth;
|
|
350
353
|
private clearState;
|
|
354
|
+
private setupFirestoreRBACSync;
|
|
355
|
+
private teardownFirestoreRBACSync;
|
|
351
356
|
private startRefreshTimer;
|
|
352
357
|
private stopRefreshTimer;
|
|
353
358
|
private handleSyncEvent;
|
|
@@ -459,6 +464,6 @@ export declare class AuthService implements OnDestroy {
|
|
|
459
464
|
* Detecta información de la plataforma del dispositivo.
|
|
460
465
|
*/
|
|
461
466
|
private detectPlatformInfo;
|
|
462
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AuthService, [{ optional: true; }, null, null, null, null, null, null, null, null, { optional: true; }, { optional: true; }, null]>;
|
|
467
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthService, [{ optional: true; }, null, null, null, null, null, null, null, null, { optional: true; }, { optional: true; }, null, { optional: true; }]>;
|
|
463
468
|
static ɵprov: i0.ɵɵInjectableDeclaration<AuthService>;
|
|
464
469
|
}
|
|
@@ -38,6 +38,13 @@ export interface ValtechAuthConfig {
|
|
|
38
38
|
* NotificationActionService usa este map al disparar handoff a otra app.
|
|
39
39
|
*/
|
|
40
40
|
appUrls?: Record<string, string>;
|
|
41
|
+
/**
|
|
42
|
+
* Habilitar sincronización reactiva de permisos via Firestore onSnapshot (default: false).
|
|
43
|
+
* Requiere enableFirebaseIntegration: true. Cuando un admin asigna o revoca un rol,
|
|
44
|
+
* el frontend actualiza roles/permisos sin recargar la página (~1-3s latencia).
|
|
45
|
+
* Requiere que el backend tenga SyncRBACToFirestore activo.
|
|
46
|
+
*/
|
|
47
|
+
enableFirestoreRBAC?: boolean;
|
|
41
48
|
}
|
|
42
49
|
/**
|
|
43
50
|
* Estado completo de autenticación.
|
package/lib/version.d.ts
CHANGED