valtech-components 4.0.233 → 4.0.234
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 +68 -47
- package/esm2022/lib/components/organisms/chat-window/chat-window.component.mjs +5 -8
- package/esm2022/lib/components/organisms/thread-panel/thread-panel.component.mjs +6 -4
- package/esm2022/lib/version.mjs +2 -2
- package/esm2022/public-api.mjs +2 -2
- package/fesm2022/valtech-components.mjs +76 -56
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/molecules/chat-composer/chat-composer.component.d.ts +11 -5
- package/lib/components/organisms/chat-window/chat-window.component.d.ts +4 -4
- package/lib/components/organisms/thread-panel/thread-panel.component.d.ts +4 -1
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -1
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { OnDestroy } from '@angular/core';
|
|
2
2
|
import { MessageReplyTo } from '../../../services/chat/types';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
+
type PendingKind = 'image' | 'audio' | 'file';
|
|
4
5
|
interface PendingAttachment {
|
|
5
6
|
id: number;
|
|
6
7
|
file: File;
|
|
7
8
|
url?: string;
|
|
8
|
-
|
|
9
|
+
kind: PendingKind;
|
|
10
|
+
}
|
|
11
|
+
/** Evento de envío: texto (caption) + adjuntos staged. files vacío => solo texto. */
|
|
12
|
+
export interface ChatComposerSendEvent {
|
|
13
|
+
text: string;
|
|
14
|
+
files: File[];
|
|
9
15
|
}
|
|
10
16
|
/**
|
|
11
17
|
* val-chat-composer — barra de redacción de chat moderna (signal inputs).
|
|
@@ -24,9 +30,8 @@ export declare class ChatComposerComponent implements OnDestroy {
|
|
|
24
30
|
readonly replyingTo: import("@angular/core").InputSignal<MessageReplyTo>;
|
|
25
31
|
readonly showAttach: import("@angular/core").InputSignal<boolean>;
|
|
26
32
|
readonly showMic: import("@angular/core").InputSignal<boolean>;
|
|
27
|
-
readonly send: import("@angular/core").OutputEmitterRef<
|
|
33
|
+
readonly send: import("@angular/core").OutputEmitterRef<ChatComposerSendEvent>;
|
|
28
34
|
readonly typing: import("@angular/core").OutputEmitterRef<void>;
|
|
29
|
-
readonly attach: import("@angular/core").OutputEmitterRef<File>;
|
|
30
35
|
readonly voice: import("@angular/core").OutputEmitterRef<void>;
|
|
31
36
|
readonly cancelReply: import("@angular/core").OutputEmitterRef<void>;
|
|
32
37
|
protected readonly body: import("@angular/core").WritableSignal<string>;
|
|
@@ -58,12 +63,13 @@ export declare class ChatComposerComponent implements OnDestroy {
|
|
|
58
63
|
/** Selecciona un mimeType de audio soportado por el navegador. */
|
|
59
64
|
private pickAudioMime;
|
|
60
65
|
protected startRecording(): Promise<void>;
|
|
61
|
-
|
|
66
|
+
/** Para la grabación y la stagea como adjunto pendiente (con preview de audio). */
|
|
67
|
+
protected finishRecording(): void;
|
|
62
68
|
protected cancelRecording(): void;
|
|
63
69
|
private cleanupRecording;
|
|
64
70
|
ngOnDestroy(): void;
|
|
65
71
|
t(key: string): string;
|
|
66
72
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChatComposerComponent, never>;
|
|
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"; "
|
|
73
|
+
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"; "voice": "voice"; "cancelReply": "cancelReply"; }, never, never, true, never>;
|
|
68
74
|
}
|
|
69
75
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { MessageReplyTo } from '../../../services/chat/types';
|
|
2
2
|
import { MessageBubbleAction } from '../../molecules/message-bubble/message-bubble.component';
|
|
3
3
|
import { MessageBubbleMetadata } from '../../molecules/message-bubble/types';
|
|
4
|
+
import { ChatComposerSendEvent } from '../../molecules/chat-composer/chat-composer.component';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
type ChatRow = {
|
|
6
7
|
kind: 'date';
|
|
@@ -34,7 +35,7 @@ export declare class ChatWindowComponent {
|
|
|
34
35
|
readonly isOpen: import("@angular/core").InputSignal<boolean>;
|
|
35
36
|
readonly typingUsers: import("@angular/core").InputSignal<string[]>;
|
|
36
37
|
readonly isLoading: import("@angular/core").InputSignal<boolean>;
|
|
37
|
-
readonly sendMessage: import("@angular/core").OutputEmitterRef<
|
|
38
|
+
readonly sendMessage: import("@angular/core").OutputEmitterRef<ChatComposerSendEvent>;
|
|
38
39
|
readonly loadMore: import("@angular/core").OutputEmitterRef<void>;
|
|
39
40
|
readonly reactionClick: import("@angular/core").OutputEmitterRef<{
|
|
40
41
|
msgId: string;
|
|
@@ -44,7 +45,6 @@ export declare class ChatWindowComponent {
|
|
|
44
45
|
readonly replyTo: import("@angular/core").OutputEmitterRef<string>;
|
|
45
46
|
readonly editMessage: import("@angular/core").OutputEmitterRef<string>;
|
|
46
47
|
readonly typing: import("@angular/core").OutputEmitterRef<void>;
|
|
47
|
-
readonly attach: import("@angular/core").OutputEmitterRef<File>;
|
|
48
48
|
readonly voice: import("@angular/core").OutputEmitterRef<void>;
|
|
49
49
|
private readonly msgsEl;
|
|
50
50
|
protected readonly replyingTo: import("@angular/core").WritableSignal<MessageReplyTo>;
|
|
@@ -55,10 +55,10 @@ export declare class ChatWindowComponent {
|
|
|
55
55
|
protected readonly rows: import("@angular/core").Signal<ChatRow[]>;
|
|
56
56
|
protected onScroll(): void;
|
|
57
57
|
protected scrollToBottom(smooth: boolean): void;
|
|
58
|
-
protected onSend(
|
|
58
|
+
protected onSend(event: ChatComposerSendEvent): void;
|
|
59
59
|
protected onAction(event: MessageBubbleAction): void;
|
|
60
60
|
t(key: string): string;
|
|
61
61
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChatWindowComponent, never>;
|
|
62
|
-
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; }; }, { "sendMessage": "sendMessage"; "loadMore": "loadMore"; "reactionClick": "reactionClick"; "deleteMessage": "deleteMessage"; "replyTo": "replyTo"; "editMessage": "editMessage"; "typing": "typing"; "
|
|
62
|
+
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; }; }, { "sendMessage": "sendMessage"; "loadMore": "loadMore"; "reactionClick": "reactionClick"; "deleteMessage": "deleteMessage"; "replyTo": "replyTo"; "editMessage": "editMessage"; "typing": "typing"; "voice": "voice"; }, never, never, true, never>;
|
|
63
63
|
}
|
|
64
64
|
export {};
|
|
@@ -42,7 +42,10 @@ export declare class ThreadPanelComponent implements OnInit, OnDestroy {
|
|
|
42
42
|
protected isConvOpen: import("@angular/core").Signal<boolean>;
|
|
43
43
|
protected loadingText: import("@angular/core").Signal<string>;
|
|
44
44
|
protected bubbleMessages: import("@angular/core").Signal<MessageBubbleMetadata[]>;
|
|
45
|
-
protected onSend(
|
|
45
|
+
protected onSend(event: {
|
|
46
|
+
text: string;
|
|
47
|
+
files: File[];
|
|
48
|
+
}): void;
|
|
46
49
|
protected onReactionClick(event: {
|
|
47
50
|
msgId: string;
|
|
48
51
|
token: string;
|
package/lib/version.d.ts
CHANGED
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -478,7 +478,7 @@ export { MessageBubbleComponent, type MessageBubbleAction, } from './lib/compone
|
|
|
478
478
|
export * from './lib/components/molecules/message-bubble/types';
|
|
479
479
|
export { ChatInputComponent } from './lib/components/molecules/chat-input/chat-input.component';
|
|
480
480
|
export * from './lib/components/molecules/chat-input/types';
|
|
481
|
-
export { ChatComposerComponent } from './lib/components/molecules/chat-composer/chat-composer.component';
|
|
481
|
+
export { ChatComposerComponent, type ChatComposerSendEvent, } from './lib/components/molecules/chat-composer/chat-composer.component';
|
|
482
482
|
export { ConversationListItemComponent } from './lib/components/molecules/conversation-list-item/conversation-list-item.component';
|
|
483
483
|
export { TypingIndicatorComponent } from './lib/components/molecules/typing-indicator/typing-indicator.component';
|
|
484
484
|
export { ChatWindowComponent } from './lib/components/organisms/chat-window/chat-window.component';
|