valtech-components 4.0.253 → 4.0.255
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/components/organisms/chat-window/chat-window.component.mjs +12 -4
- package/esm2022/lib/components/organisms/preferences-view/preferences-view.component.mjs +7 -11
- package/esm2022/lib/components/organisms/thread-panel/thread-panel.component.mjs +1 -1
- package/esm2022/lib/services/firebase/config.mjs +6 -3
- package/esm2022/lib/services/firebase/messaging.service.mjs +58 -21
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +81 -36
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/organisms/chat-window/chat-window.component.d.ts +6 -3
- package/lib/components/organisms/preferences-view/preferences-view.component.d.ts +2 -2
- package/lib/services/firebase/messaging.service.d.ts +15 -3
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -35,8 +35,11 @@ export declare class ChatWindowComponent {
|
|
|
35
35
|
readonly isOpen: import("@angular/core").InputSignal<boolean>;
|
|
36
36
|
readonly typingUsers: import("@angular/core").InputSignal<string[]>;
|
|
37
37
|
readonly isLoading: import("@angular/core").InputSignal<boolean>;
|
|
38
|
-
/**
|
|
39
|
-
|
|
38
|
+
/** Botón de adjuntar archivos/imágenes. */
|
|
39
|
+
readonly showAttach: import("@angular/core").InputSignal<boolean>;
|
|
40
|
+
/** Botón de dictado voz→texto (SpeechRecognition). */
|
|
41
|
+
readonly showDictation: import("@angular/core").InputSignal<boolean>;
|
|
42
|
+
/** Botón de mensaje de voz (grabar clip de audio). */
|
|
40
43
|
readonly showVoiceMessage: import("@angular/core").InputSignal<boolean>;
|
|
41
44
|
readonly sendMessage: import("@angular/core").OutputEmitterRef<ChatComposerSendEvent>;
|
|
42
45
|
readonly loadMore: import("@angular/core").OutputEmitterRef<void>;
|
|
@@ -62,6 +65,6 @@ export declare class ChatWindowComponent {
|
|
|
62
65
|
protected onAction(event: MessageBubbleAction): void;
|
|
63
66
|
t(key: string): string;
|
|
64
67
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChatWindowComponent, never>;
|
|
65
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ChatWindowComponent, "val-chat-window", never, { "convId": { "alias": "convId"; "required": false; "isSignal": true; }; "messages": { "alias": "messages"; "required": false; "isSignal": true; }; "currentUserId": { "alias": "currentUserId"; "required": false; "isSignal": true; }; "isOpen": { "alias": "isOpen"; "required": false; "isSignal": true; }; "typingUsers": { "alias": "typingUsers"; "required": false; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; "showVoiceMessage": { "alias": "showVoiceMessage"; "required": false; "isSignal": true; }; }, { "sendMessage": "sendMessage"; "loadMore": "loadMore"; "reactionClick": "reactionClick"; "deleteMessage": "deleteMessage"; "replyTo": "replyTo"; "editMessage": "editMessage"; "typing": "typing"; "voice": "voice"; }, never, never, true, never>;
|
|
68
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChatWindowComponent, "val-chat-window", never, { "convId": { "alias": "convId"; "required": false; "isSignal": true; }; "messages": { "alias": "messages"; "required": false; "isSignal": true; }; "currentUserId": { "alias": "currentUserId"; "required": false; "isSignal": true; }; "isOpen": { "alias": "isOpen"; "required": false; "isSignal": true; }; "typingUsers": { "alias": "typingUsers"; "required": false; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; "showAttach": { "alias": "showAttach"; "required": false; "isSignal": true; }; "showDictation": { "alias": "showDictation"; "required": false; "isSignal": true; }; "showVoiceMessage": { "alias": "showVoiceMessage"; "required": false; "isSignal": true; }; }, { "sendMessage": "sendMessage"; "loadMore": "loadMore"; "reactionClick": "reactionClick"; "deleteMessage": "deleteMessage"; "replyTo": "replyTo"; "editMessage": "editMessage"; "typing": "typing"; "voice": "voice"; }, never, never, true, never>;
|
|
66
69
|
}
|
|
67
70
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LanguageSelectorV2Metadata } from '../../molecules/language-selector-v2/language-selector-v2.component';
|
|
2
2
|
import { PopoverSelectorMetadata } from '../../molecules/popover-selector/types';
|
|
3
3
|
import { PreferencesService } from '../../../services/preferences/preferences.service';
|
|
4
4
|
import { PreferencesViewConfig } from './types';
|
|
@@ -43,7 +43,7 @@ export declare class PreferencesViewComponent {
|
|
|
43
43
|
readonly langHint: import("@angular/core").Signal<string>;
|
|
44
44
|
readonly fontSizeTitle: import("@angular/core").Signal<string>;
|
|
45
45
|
readonly fontSizeHint: import("@angular/core").Signal<string>;
|
|
46
|
-
readonly langProps: import("@angular/core").Signal<
|
|
46
|
+
readonly langProps: import("@angular/core").Signal<LanguageSelectorV2Metadata>;
|
|
47
47
|
readonly themePickerProps: import("@angular/core").Signal<PopoverSelectorMetadata>;
|
|
48
48
|
readonly fontSizePickerProps: import("@angular/core").Signal<PopoverSelectorMetadata>;
|
|
49
49
|
constructor();
|
|
@@ -89,6 +89,8 @@ export declare class MessagingService {
|
|
|
89
89
|
* Es un *optimistic hint* — la verdad la confirma el siguiente `getToken()`.
|
|
90
90
|
*/
|
|
91
91
|
private readonly TOKEN_STORAGE_KEY;
|
|
92
|
+
private readonly FCM_SW_URL;
|
|
93
|
+
private readonly FCM_SW_SCOPE;
|
|
92
94
|
/**
|
|
93
95
|
* Timeout (ms) para `navigator.serviceWorker.ready` dentro de `getToken()`.
|
|
94
96
|
*
|
|
@@ -97,6 +99,14 @@ export declare class MessagingService {
|
|
|
97
99
|
* de colgarse indefinidamente.
|
|
98
100
|
*/
|
|
99
101
|
private readonly SW_READY_TIMEOUT_MS;
|
|
102
|
+
/**
|
|
103
|
+
* Timeout duro para la llamada de Firebase `getToken()`.
|
|
104
|
+
*
|
|
105
|
+
* En Chromium puede quedar pendiente sin resolver si la registración FCM no
|
|
106
|
+
* responde (VAPID/proyecto/API/red). Sin este timeout, el watchdog externo
|
|
107
|
+
* fuerza un reload que no corrige la causa y deja un diagnóstico pobre.
|
|
108
|
+
*/
|
|
109
|
+
private readonly FCM_GET_TOKEN_TIMEOUT_MS;
|
|
100
110
|
/**
|
|
101
111
|
* Timeout (ms) del watchdog de `enable()` antes de auto-recargar la página.
|
|
102
112
|
*
|
|
@@ -105,7 +115,7 @@ export declare class MessagingService {
|
|
|
105
115
|
* cold load. El timeout de `getToken()` (SW_READY_TIMEOUT_MS) no cubre eso;
|
|
106
116
|
* por eso `enable()` envuelve el flujo completo en este watchdog.
|
|
107
117
|
*
|
|
108
|
-
* Un flujo exitoso real llega a token+device en ~4s;
|
|
118
|
+
* Un flujo exitoso real llega a token+device en ~4s; 25s es holgado y no
|
|
109
119
|
* atrapa un éxito lento.
|
|
110
120
|
*/
|
|
111
121
|
private readonly ENABLE_WATCHDOG_MS;
|
|
@@ -231,12 +241,13 @@ export declare class MessagingService {
|
|
|
231
241
|
/**
|
|
232
242
|
* Resuelve el `ServiceWorkerRegistration` del SW de FCM.
|
|
233
243
|
*
|
|
234
|
-
* El SW
|
|
235
|
-
*
|
|
244
|
+
* El SW de FCM ya se registra una vez en el bootstrap de la app (`config.ts`)
|
|
245
|
+
* con un scope dedicado. Reutilizamos ese registro en lugar de re-registrarlo
|
|
236
246
|
* en cada `getToken()` — re-registrar repetidamente dispara revalidaciones del
|
|
237
247
|
* SW en iOS PWA. Solo registramos como fallback si todavía no existe.
|
|
238
248
|
*/
|
|
239
249
|
private resolveServiceWorkerRegistration;
|
|
250
|
+
private findFcmServiceWorkerRegistration;
|
|
240
251
|
/**
|
|
241
252
|
* Espera a que el Service Worker quede activo (`navigator.serviceWorker.ready`)
|
|
242
253
|
* pero con un timeout duro.
|
|
@@ -251,6 +262,7 @@ export declare class MessagingService {
|
|
|
251
262
|
* El timer se limpia en ambas ramas para no dejar timers colgando.
|
|
252
263
|
*/
|
|
253
264
|
private waitForServiceWorkerReady;
|
|
265
|
+
private withTimeout;
|
|
254
266
|
/**
|
|
255
267
|
* Persiste el token FCM en localStorage (o lo limpia si es null/empty).
|
|
256
268
|
*/
|
package/lib/version.d.ts
CHANGED