valtech-components 4.0.226 → 4.0.227
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/molecules/chat-composer/chat-composer.component.mjs +224 -71
- package/esm2022/lib/components/molecules/message-bubble/message-bubble.component.mjs +19 -4
- package/esm2022/lib/services/chat/conversation.service.mjs +15 -4
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +255 -76
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/molecules/chat-composer/chat-composer.component.d.ts +18 -1
- package/lib/components/molecules/message-bubble/message-bubble.component.d.ts +1 -0
- package/lib/services/chat/conversation.service.d.ts +5 -3
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
1
2
|
import { MessageReplyTo } from '../../../services/chat/types';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
/**
|
|
@@ -8,7 +9,7 @@ import * as i0 from "@angular/core";
|
|
|
8
9
|
* Muestra una barra de contexto "respondiendo a" cuando `replyingTo` está seteado.
|
|
9
10
|
* `typing` se emite con debounce (máx. 1 vez cada 2s) para no spamear writes.
|
|
10
11
|
*/
|
|
11
|
-
export declare class ChatComposerComponent {
|
|
12
|
+
export declare class ChatComposerComponent implements OnDestroy {
|
|
12
13
|
private i18n;
|
|
13
14
|
readonly placeholder: import("@angular/core").InputSignal<string>;
|
|
14
15
|
readonly disabled: import("@angular/core").InputSignal<boolean>;
|
|
@@ -25,6 +26,13 @@ export declare class ChatComposerComponent {
|
|
|
25
26
|
protected readonly body: import("@angular/core").WritableSignal<string>;
|
|
26
27
|
protected readonly emojiOpen: import("@angular/core").WritableSignal<boolean>;
|
|
27
28
|
protected readonly quickEmojis: string[];
|
|
29
|
+
protected readonly recording: import("@angular/core").WritableSignal<boolean>;
|
|
30
|
+
private readonly recSeconds;
|
|
31
|
+
private recorder?;
|
|
32
|
+
private recStream?;
|
|
33
|
+
private recChunks;
|
|
34
|
+
private recTimer?;
|
|
35
|
+
protected readonly recTimeLabel: import("@angular/core").Signal<string>;
|
|
28
36
|
private lastTypingEmit;
|
|
29
37
|
constructor();
|
|
30
38
|
protected readonly canSend: import("@angular/core").Signal<boolean>;
|
|
@@ -35,11 +43,20 @@ export declare class ChatComposerComponent {
|
|
|
35
43
|
protected toggleEmoji(): void;
|
|
36
44
|
protected insertEmoji(emoji: string): void;
|
|
37
45
|
protected onFile(event: Event): void;
|
|
46
|
+
/** Pegar imagen desde el portapapeles (captura de pantalla, copiar imagen). */
|
|
47
|
+
protected onPaste(event: ClipboardEvent): void;
|
|
38
48
|
/**
|
|
39
49
|
* Emite typing como máximo 1 vez cada 2s. No usa Date.now() directo en plantillas
|
|
40
50
|
* de workflow; aquí estamos en runtime de navegador, performance.now es seguro.
|
|
41
51
|
*/
|
|
42
52
|
private emitTypingDebounced;
|
|
53
|
+
/** Selecciona un mimeType de audio soportado por el navegador. */
|
|
54
|
+
private pickAudioMime;
|
|
55
|
+
protected startRecording(): Promise<void>;
|
|
56
|
+
protected stopAndSend(): void;
|
|
57
|
+
protected cancelRecording(): void;
|
|
58
|
+
private cleanupRecording;
|
|
59
|
+
ngOnDestroy(): void;
|
|
43
60
|
t(key: string): string;
|
|
44
61
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChatComposerComponent, never>;
|
|
45
62
|
static ɵcmp: i0.ɵɵComponentDeclaration<ChatComposerComponent, "val-chat-composer", never, { "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "maxLength": { "alias": "maxLength"; "required": false; "isSignal": true; }; "replyingTo": { "alias": "replyingTo"; "required": false; "isSignal": true; }; "showAttach": { "alias": "showAttach"; "required": false; "isSignal": true; }; "showEmoji": { "alias": "showEmoji"; "required": false; "isSignal": true; }; "showMic": { "alias": "showMic"; "required": false; "isSignal": true; }; }, { "send": "send"; "typing": "typing"; "attach": "attach"; "voice": "voice"; "cancelReply": "cancelReply"; }, never, never, true, never>;
|
|
@@ -31,6 +31,7 @@ export declare class MessageBubbleComponent {
|
|
|
31
31
|
protected readonly time: import("@angular/core").Signal<string>;
|
|
32
32
|
protected readonly initials: import("@angular/core").Signal<string>;
|
|
33
33
|
protected readonly imageAttachments: import("@angular/core").Signal<import("valtech-components").MessageAttachment[]>;
|
|
34
|
+
protected readonly audioAttachments: import("@angular/core").Signal<import("valtech-components").MessageAttachment[]>;
|
|
34
35
|
protected readonly fileAttachments: import("@angular/core").Signal<import("valtech-components").MessageAttachment[]>;
|
|
35
36
|
protected readonly statusIcon: import("@angular/core").Signal<"time-outline" | "alert-circle" | "checkmark-done" | "checkmark">;
|
|
36
37
|
protected toggleActions(): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import { Conversation, ConversationType, CreateConversationRequest, ListConversationsResponse, Message, UpdateConversationRequest } from './types';
|
|
2
|
+
import { Conversation, ConversationType, CreateConversationRequest, ListConversationsResponse, Message, MessageAttachment, UpdateConversationRequest } from './types';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
/**
|
|
5
5
|
* ConversationService
|
|
@@ -75,9 +75,11 @@ export declare class ConversationService {
|
|
|
75
75
|
*/
|
|
76
76
|
removeParticipant(convId: string, userId: string): Observable<void>;
|
|
77
77
|
/**
|
|
78
|
-
* Envia un mensaje a una conversacion.
|
|
78
|
+
* Envia un mensaje a una conversacion, opcionalmente con adjuntos.
|
|
79
|
+
* El backend espera `attachments: { url, type, name, size }[]` (key `type` = MIME),
|
|
80
|
+
* mientras que el front usa `mimeType` — se mapea aqui.
|
|
79
81
|
*/
|
|
80
|
-
sendMessage(convId: string, body: string): Observable<Message>;
|
|
82
|
+
sendMessage(convId: string, body: string, attachments?: MessageAttachment[]): Observable<Message>;
|
|
81
83
|
/**
|
|
82
84
|
* Elimina (marca como eliminado) un mensaje.
|
|
83
85
|
*/
|
package/lib/version.d.ts
CHANGED