valtech-components 2.0.901 → 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/device.service.mjs +5 -3
- package/esm2022/lib/services/auth/handoff.service.mjs +5 -3
- package/esm2022/lib/services/auth/notification-action.service.mjs +5 -3
- package/esm2022/lib/services/auth/oauth.service.mjs +5 -3
- package/esm2022/lib/services/auth/session.service.mjs +5 -3
- package/esm2022/lib/services/auth/storage.service.mjs +5 -3
- package/esm2022/lib/services/auth/sync.service.mjs +5 -3
- package/esm2022/lib/services/auth/types.mjs +1 -1
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +61 -13
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/atoms/rights-footer/rights-footer.component.d.ts +1 -1
- package/lib/components/molecules/content-reaction/content-reaction.component.d.ts +2 -2
- package/lib/components/organisms/article/article.component.d.ts +4 -4
- package/lib/components/organisms/toolbar/toolbar.component.d.ts +3 -3
- package/lib/services/auth/auth.service.d.ts +7 -2
- package/lib/services/auth/device.service.d.ts +2 -2
- package/lib/services/auth/handoff.service.d.ts +2 -2
- package/lib/services/auth/notification-action.service.d.ts +2 -2
- package/lib/services/auth/oauth.service.d.ts +2 -2
- package/lib/services/auth/session.service.d.ts +2 -2
- package/lib/services/auth/storage.service.d.ts +2 -2
- package/lib/services/auth/sync.service.d.ts +2 -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
|
*/
|
|
@@ -34,8 +34,8 @@ export declare class ContentReactionComponent implements OnInit, OnChanges {
|
|
|
34
34
|
commentOnValues: ReactionValue[];
|
|
35
35
|
commentPlaceholder: string;
|
|
36
36
|
maxCommentLength: number;
|
|
37
|
-
emojis: [string, string
|
|
38
|
-
emojiLabels: [string, string
|
|
37
|
+
emojis: [string, string] | [string, string, string];
|
|
38
|
+
emojiLabels: [string, string] | [string, string, string];
|
|
39
39
|
showThankYou: boolean;
|
|
40
40
|
thankYouMessage: string;
|
|
41
41
|
disabled: boolean;
|
|
@@ -76,7 +76,7 @@ export declare class ArticleComponent implements OnInit {
|
|
|
76
76
|
getHighlightColor(element: ArticleElement): string;
|
|
77
77
|
getButtonProps(element: ArticleElement): {
|
|
78
78
|
actionType?: import("valtech-components").ActionType;
|
|
79
|
-
expand?: "
|
|
79
|
+
expand?: "full" | "block";
|
|
80
80
|
link?: string;
|
|
81
81
|
href?: string;
|
|
82
82
|
target?: "_blank" | "_self" | "_parent" | "_top";
|
|
@@ -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?: "
|
|
94
|
-
fill?: "default" | "
|
|
95
|
-
type: "
|
|
93
|
+
size?: "small" | "large" | "default";
|
|
94
|
+
fill?: "default" | "clear" | "outline" | "solid";
|
|
95
|
+
type: "button" | "submit" | "reset";
|
|
96
96
|
token?: string;
|
|
97
97
|
ref?: any;
|
|
98
98
|
handler?: (value: any) => any;
|
|
@@ -72,10 +72,10 @@ export declare class ToolbarComponent implements OnInit {
|
|
|
72
72
|
};
|
|
73
73
|
showFlags?: boolean;
|
|
74
74
|
color: import("@ionic/core").Color;
|
|
75
|
-
size?: "
|
|
76
|
-
fill?: "default" | "
|
|
75
|
+
size?: "small" | "large" | "default";
|
|
76
|
+
fill?: "default" | "clear" | "outline" | "solid";
|
|
77
77
|
shape?: "round";
|
|
78
|
-
expand?: "
|
|
78
|
+
expand?: "full" | "block";
|
|
79
79
|
disabled?: boolean;
|
|
80
80
|
customLanguageNames?: Record<string, string>;
|
|
81
81
|
forceReload?: boolean;
|
|
@@ -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
|
}
|
|
@@ -31,7 +31,7 @@ import * as i0 from "@angular/core";
|
|
|
31
31
|
export declare class DeviceService {
|
|
32
32
|
private config;
|
|
33
33
|
private http;
|
|
34
|
-
constructor(config: ValtechAuthConfig, http: HttpClient);
|
|
34
|
+
constructor(config: ValtechAuthConfig | null, http: HttpClient);
|
|
35
35
|
private get baseUrl();
|
|
36
36
|
/**
|
|
37
37
|
* Lista todos los dispositivos registrados del usuario.
|
|
@@ -96,6 +96,6 @@ export declare class DeviceService {
|
|
|
96
96
|
* ```
|
|
97
97
|
*/
|
|
98
98
|
executeAction(token: string): Observable<DeviceActionResponse>;
|
|
99
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DeviceService,
|
|
99
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DeviceService, [{ optional: true; }, null]>;
|
|
100
100
|
static ɵprov: i0.ɵɵInjectableDeclaration<DeviceService>;
|
|
101
101
|
}
|
|
@@ -107,7 +107,7 @@ export declare class HandoffService {
|
|
|
107
107
|
private auth;
|
|
108
108
|
private router;
|
|
109
109
|
private detected;
|
|
110
|
-
constructor(config: ValtechAuthConfig, http: HttpClient, auth: AuthService, router: Router);
|
|
110
|
+
constructor(config: ValtechAuthConfig | null, http: HttpClient, auth: AuthService, router: Router);
|
|
111
111
|
/**
|
|
112
112
|
* Create a handoff token. Caller must be authenticated.
|
|
113
113
|
*
|
|
@@ -154,6 +154,6 @@ export declare class HandoffService {
|
|
|
154
154
|
*/
|
|
155
155
|
private installSession;
|
|
156
156
|
private get baseUrl();
|
|
157
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<HandoffService,
|
|
157
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HandoffService, [{ optional: true; }, null, null, null]>;
|
|
158
158
|
static ɵprov: i0.ɵɵInjectableDeclaration<HandoffService>;
|
|
159
159
|
}
|
|
@@ -14,7 +14,7 @@ export declare class NotificationActionService {
|
|
|
14
14
|
private handoff;
|
|
15
15
|
private notifications;
|
|
16
16
|
private router;
|
|
17
|
-
constructor(config: ValtechAuthConfig, auth: AuthService, orgSwitch: OrgSwitchService, handoff: HandoffService, notifications: NotificationsService, router: Router);
|
|
17
|
+
constructor(config: ValtechAuthConfig | null, auth: AuthService, orgSwitch: OrgSwitchService, handoff: HandoffService, notifications: NotificationsService, router: Router);
|
|
18
18
|
/**
|
|
19
19
|
* Abre la notificación: marca como leída, switch-org si toca, navegación local o
|
|
20
20
|
* redirect cross-app vía handoff.
|
|
@@ -29,6 +29,6 @@ export declare class NotificationActionService {
|
|
|
29
29
|
* params existentes de la baseUrl.
|
|
30
30
|
*/
|
|
31
31
|
private buildHandoffUrl;
|
|
32
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NotificationActionService,
|
|
32
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NotificationActionService, [{ optional: true; }, null, null, null, null, null]>;
|
|
33
33
|
static ɵprov: i0.ɵɵInjectableDeclaration<NotificationActionService>;
|
|
34
34
|
}
|
|
@@ -44,7 +44,7 @@ export declare class OAuthService {
|
|
|
44
44
|
private popup;
|
|
45
45
|
private messageHandler;
|
|
46
46
|
private checkClosedInterval;
|
|
47
|
-
constructor(config: ValtechAuthConfig, http: HttpClient, ngZone: NgZone);
|
|
47
|
+
constructor(config: ValtechAuthConfig | null, http: HttpClient, ngZone: NgZone);
|
|
48
48
|
/**
|
|
49
49
|
* Inicia flujo OAuth en popup.
|
|
50
50
|
* Retorna Observable que emite cuando el usuario completa el flujo.
|
|
@@ -94,6 +94,6 @@ export declare class OAuthService {
|
|
|
94
94
|
* Limpia recursos del popup.
|
|
95
95
|
*/
|
|
96
96
|
private cleanup;
|
|
97
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<OAuthService,
|
|
97
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OAuthService, [{ optional: true; }, null, null]>;
|
|
98
98
|
static ɵprov: i0.ɵɵInjectableDeclaration<OAuthService>;
|
|
99
99
|
}
|
|
@@ -36,7 +36,7 @@ import * as i0 from "@angular/core";
|
|
|
36
36
|
export declare class SessionService {
|
|
37
37
|
private config;
|
|
38
38
|
private http;
|
|
39
|
-
constructor(config: ValtechAuthConfig, http: HttpClient);
|
|
39
|
+
constructor(config: ValtechAuthConfig | null, http: HttpClient);
|
|
40
40
|
private get baseUrl();
|
|
41
41
|
/**
|
|
42
42
|
* Lista todas las sesiones activas del usuario.
|
|
@@ -55,6 +55,6 @@ export declare class SessionService {
|
|
|
55
55
|
* @returns Número de sesiones revocadas
|
|
56
56
|
*/
|
|
57
57
|
revokeAllSessions(): Observable<RevokeSessionsResponse>;
|
|
58
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SessionService,
|
|
58
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SessionService, [{ optional: true; }, null]>;
|
|
59
59
|
static ɵprov: i0.ɵɵInjectableDeclaration<SessionService>;
|
|
60
60
|
}
|
|
@@ -7,7 +7,7 @@ export declare class AuthStorageService {
|
|
|
7
7
|
private config;
|
|
8
8
|
private keys;
|
|
9
9
|
private readonly isBrowser;
|
|
10
|
-
constructor(config: ValtechAuthConfig, platformId: Object);
|
|
10
|
+
constructor(config: ValtechAuthConfig | null, platformId: Object);
|
|
11
11
|
/**
|
|
12
12
|
* Guarda el estado completo de autenticación.
|
|
13
13
|
*/
|
|
@@ -48,6 +48,6 @@ export declare class AuthStorageService {
|
|
|
48
48
|
* Verifica si hay estado guardado.
|
|
49
49
|
*/
|
|
50
50
|
hasStoredState(): boolean;
|
|
51
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AuthStorageService,
|
|
51
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthStorageService, [{ optional: true; }, null]>;
|
|
52
52
|
static ɵprov: i0.ɵɵInjectableDeclaration<AuthStorageService>;
|
|
53
53
|
}
|
|
@@ -15,7 +15,7 @@ export declare class AuthSyncService implements OnDestroy {
|
|
|
15
15
|
/** Observable de eventos de sincronización */
|
|
16
16
|
readonly onEvent$: Observable<AuthSyncEvent>;
|
|
17
17
|
private readonly isBrowser;
|
|
18
|
-
constructor(config: ValtechAuthConfig, platformId: Object);
|
|
18
|
+
constructor(config: ValtechAuthConfig | null, platformId: Object);
|
|
19
19
|
/**
|
|
20
20
|
* Inicia la sincronización entre pestañas.
|
|
21
21
|
* SSR-noop — sync de pestañas solo aplica en browser.
|
|
@@ -46,6 +46,6 @@ export declare class AuthSyncService implements OnDestroy {
|
|
|
46
46
|
* Maneja un evento recibido.
|
|
47
47
|
*/
|
|
48
48
|
private handleEvent;
|
|
49
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AuthSyncService,
|
|
49
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthSyncService, [{ optional: true; }, null]>;
|
|
50
50
|
static ɵprov: i0.ɵɵInjectableDeclaration<AuthSyncService>;
|
|
51
51
|
}
|
|
@@ -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