valtech-components 4.0.227 → 4.0.229
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 +80 -61
- package/esm2022/lib/components/organisms/chat-window/chat-window.component.mjs +2 -2
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +80 -61
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/molecules/chat-composer/chat-composer.component.d.ts +18 -12
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
import { OnDestroy } from '@angular/core';
|
|
2
2
|
import { MessageReplyTo } from '../../../services/chat/types';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
+
interface PendingAttachment {
|
|
5
|
+
id: number;
|
|
6
|
+
file: File;
|
|
7
|
+
url?: string;
|
|
8
|
+
isImage: boolean;
|
|
9
|
+
}
|
|
4
10
|
/**
|
|
5
11
|
* val-chat-composer — barra de redacción de chat moderna (signal inputs).
|
|
6
12
|
*
|
|
7
|
-
* Pill con: adjuntar (+), textarea auto-grow,
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
13
|
+
* Pill con: adjuntar (+), textarea auto-grow, y mic/enviar (mic cuando está vacío,
|
|
14
|
+
* enviar cuando hay texto o adjuntos). Los adjuntos (botón + / pegar imagen) se
|
|
15
|
+
* acumulan como PREVIEW (miniaturas) y se emiten por `(attach)` recién al ENVIAR
|
|
16
|
+
* — no se van solos al chat. Audio grabado se emite directo al parar.
|
|
17
|
+
* No incluye picker de emoji: el teclado del sistema ya lo trae.
|
|
11
18
|
*/
|
|
12
19
|
export declare class ChatComposerComponent implements OnDestroy {
|
|
13
20
|
private i18n;
|
|
@@ -16,7 +23,6 @@ export declare class ChatComposerComponent implements OnDestroy {
|
|
|
16
23
|
readonly maxLength: import("@angular/core").InputSignal<number>;
|
|
17
24
|
readonly replyingTo: import("@angular/core").InputSignal<MessageReplyTo>;
|
|
18
25
|
readonly showAttach: import("@angular/core").InputSignal<boolean>;
|
|
19
|
-
readonly showEmoji: import("@angular/core").InputSignal<boolean>;
|
|
20
26
|
readonly showMic: import("@angular/core").InputSignal<boolean>;
|
|
21
27
|
readonly send: import("@angular/core").OutputEmitterRef<string>;
|
|
22
28
|
readonly typing: import("@angular/core").OutputEmitterRef<void>;
|
|
@@ -24,8 +30,8 @@ export declare class ChatComposerComponent implements OnDestroy {
|
|
|
24
30
|
readonly voice: import("@angular/core").OutputEmitterRef<void>;
|
|
25
31
|
readonly cancelReply: import("@angular/core").OutputEmitterRef<void>;
|
|
26
32
|
protected readonly body: import("@angular/core").WritableSignal<string>;
|
|
27
|
-
protected readonly
|
|
28
|
-
|
|
33
|
+
protected readonly pending: import("@angular/core").WritableSignal<PendingAttachment[]>;
|
|
34
|
+
private pendingId;
|
|
29
35
|
protected readonly recording: import("@angular/core").WritableSignal<boolean>;
|
|
30
36
|
private readonly recSeconds;
|
|
31
37
|
private recorder?;
|
|
@@ -40,14 +46,13 @@ export declare class ChatComposerComponent implements OnDestroy {
|
|
|
40
46
|
protected onInput(event: Event): void;
|
|
41
47
|
protected onKeydown(event: KeyboardEvent): void;
|
|
42
48
|
protected onSend(): void;
|
|
43
|
-
protected toggleEmoji(): void;
|
|
44
|
-
protected insertEmoji(emoji: string): void;
|
|
45
49
|
protected onFile(event: Event): void;
|
|
46
50
|
/** Pegar imagen desde el portapapeles (captura de pantalla, copiar imagen). */
|
|
47
51
|
protected onPaste(event: ClipboardEvent): void;
|
|
52
|
+
private addPending;
|
|
53
|
+
protected removePending(id: number): void;
|
|
48
54
|
/**
|
|
49
|
-
* Emite typing como máximo 1 vez cada 2s.
|
|
50
|
-
* de workflow; aquí estamos en runtime de navegador, performance.now es seguro.
|
|
55
|
+
* Emite typing como máximo 1 vez cada 2s. performance.now es seguro en runtime.
|
|
51
56
|
*/
|
|
52
57
|
private emitTypingDebounced;
|
|
53
58
|
/** Selecciona un mimeType de audio soportado por el navegador. */
|
|
@@ -59,5 +64,6 @@ export declare class ChatComposerComponent implements OnDestroy {
|
|
|
59
64
|
ngOnDestroy(): void;
|
|
60
65
|
t(key: string): string;
|
|
61
66
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChatComposerComponent, never>;
|
|
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; }; "
|
|
67
|
+
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; }; "showMic": { "alias": "showMic"; "required": false; "isSignal": true; }; }, { "send": "send"; "typing": "typing"; "attach": "attach"; "voice": "voice"; "cancelReply": "cancelReply"; }, never, never, true, never>;
|
|
63
68
|
}
|
|
69
|
+
export {};
|
package/lib/version.d.ts
CHANGED