valtech-components 4.0.225 → 4.0.226
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 +238 -0
- package/esm2022/lib/components/molecules/conversation-list-item/conversation-list-item.component.mjs +108 -0
- package/esm2022/lib/components/molecules/message-bubble/message-bubble.component.mjs +259 -191
- package/esm2022/lib/components/molecules/typing-indicator/typing-indicator.component.mjs +11 -12
- package/esm2022/lib/components/organisms/chat-window/chat-window.component.mjs +217 -184
- package/esm2022/lib/components/organisms/thread-panel/thread-panel.component.mjs +1 -1
- package/esm2022/lib/services/chat/types.mjs +1 -1
- package/esm2022/lib/shared/utils/datetime.mjs +54 -1
- package/esm2022/lib/version.mjs +2 -2
- package/esm2022/public-api.mjs +4 -2
- package/fesm2022/valtech-components.mjs +865 -380
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/molecules/chat-composer/chat-composer.component.d.ts +46 -0
- package/lib/components/molecules/conversation-list-item/conversation-list-item.component.d.ts +30 -0
- package/lib/components/molecules/message-bubble/message-bubble.component.d.ts +33 -32
- package/lib/components/molecules/typing-indicator/typing-indicator.component.d.ts +5 -4
- package/lib/components/organisms/chat-window/chat-window.component.d.ts +52 -52
- package/lib/services/chat/types.d.ts +6 -2
- package/lib/shared/utils/datetime.d.ts +19 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +3 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { MessageReplyTo } from '../../../services/chat/types';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* val-chat-composer — barra de redacción de chat moderna (signal inputs).
|
|
5
|
+
*
|
|
6
|
+
* Pill con: adjuntar (+), textarea auto-grow, emoji (fila rápida) y mic/enviar
|
|
7
|
+
* (mic cuando está vacío, enviar cuando hay texto — patrón WhatsApp/Telegram).
|
|
8
|
+
* Muestra una barra de contexto "respondiendo a" cuando `replyingTo` está seteado.
|
|
9
|
+
* `typing` se emite con debounce (máx. 1 vez cada 2s) para no spamear writes.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ChatComposerComponent {
|
|
12
|
+
private i18n;
|
|
13
|
+
readonly placeholder: import("@angular/core").InputSignal<string>;
|
|
14
|
+
readonly disabled: import("@angular/core").InputSignal<boolean>;
|
|
15
|
+
readonly maxLength: import("@angular/core").InputSignal<number>;
|
|
16
|
+
readonly replyingTo: import("@angular/core").InputSignal<MessageReplyTo>;
|
|
17
|
+
readonly showAttach: import("@angular/core").InputSignal<boolean>;
|
|
18
|
+
readonly showEmoji: import("@angular/core").InputSignal<boolean>;
|
|
19
|
+
readonly showMic: import("@angular/core").InputSignal<boolean>;
|
|
20
|
+
readonly send: import("@angular/core").OutputEmitterRef<string>;
|
|
21
|
+
readonly typing: import("@angular/core").OutputEmitterRef<void>;
|
|
22
|
+
readonly attach: import("@angular/core").OutputEmitterRef<File>;
|
|
23
|
+
readonly voice: import("@angular/core").OutputEmitterRef<void>;
|
|
24
|
+
readonly cancelReply: import("@angular/core").OutputEmitterRef<void>;
|
|
25
|
+
protected readonly body: import("@angular/core").WritableSignal<string>;
|
|
26
|
+
protected readonly emojiOpen: import("@angular/core").WritableSignal<boolean>;
|
|
27
|
+
protected readonly quickEmojis: string[];
|
|
28
|
+
private lastTypingEmit;
|
|
29
|
+
constructor();
|
|
30
|
+
protected readonly canSend: import("@angular/core").Signal<boolean>;
|
|
31
|
+
protected readonly placeholderText: import("@angular/core").Signal<string>;
|
|
32
|
+
protected onInput(event: Event): void;
|
|
33
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
34
|
+
protected onSend(): void;
|
|
35
|
+
protected toggleEmoji(): void;
|
|
36
|
+
protected insertEmoji(emoji: string): void;
|
|
37
|
+
protected onFile(event: Event): void;
|
|
38
|
+
/**
|
|
39
|
+
* Emite typing como máximo 1 vez cada 2s. No usa Date.now() directo en plantillas
|
|
40
|
+
* de workflow; aquí estamos en runtime de navegador, performance.now es seguro.
|
|
41
|
+
*/
|
|
42
|
+
private emitTypingDebounced;
|
|
43
|
+
t(key: string): string;
|
|
44
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatComposerComponent, never>;
|
|
45
|
+
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>;
|
|
46
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* val-conversation-list-item — fila de lista de conversaciones estilo
|
|
4
|
+
* Telegram/WhatsApp: avatar (imagen o iniciales), nombre + hora relativa,
|
|
5
|
+
* preview del último mensaje + badge de no-leídos. Signal inputs, dark-safe.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* <val-conversation-list-item
|
|
9
|
+
* [name]="conv.name"
|
|
10
|
+
* [lastMessage]="conv.lastMsgPreview"
|
|
11
|
+
* [timestamp]="conv.lastMsgAt"
|
|
12
|
+
* [unreadCount]="conv.unread"
|
|
13
|
+
* (select)="open(conv.convId)" />
|
|
14
|
+
*/
|
|
15
|
+
export declare class ConversationListItemComponent {
|
|
16
|
+
private i18n;
|
|
17
|
+
readonly name: import("@angular/core").InputSignal<string>;
|
|
18
|
+
readonly avatarUrl: import("@angular/core").InputSignal<string>;
|
|
19
|
+
readonly lastMessage: import("@angular/core").InputSignal<string>;
|
|
20
|
+
readonly timestamp: import("@angular/core").InputSignal<string | Date>;
|
|
21
|
+
readonly unreadCount: import("@angular/core").InputSignal<number>;
|
|
22
|
+
readonly locale: import("@angular/core").InputSignal<string>;
|
|
23
|
+
readonly select: import("@angular/core").OutputEmitterRef<void>;
|
|
24
|
+
constructor();
|
|
25
|
+
protected readonly initials: import("@angular/core").Signal<string>;
|
|
26
|
+
protected readonly timeLabel: import("@angular/core").Signal<string>;
|
|
27
|
+
protected emptyText(): string;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConversationListItemComponent, never>;
|
|
29
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ConversationListItemComponent, "val-conversation-list-item", never, { "name": { "alias": "name"; "required": false; "isSignal": true; }; "avatarUrl": { "alias": "avatarUrl"; "required": false; "isSignal": true; }; "lastMessage": { "alias": "lastMessage"; "required": false; "isSignal": true; }; "timestamp": { "alias": "timestamp"; "required": false; "isSignal": true; }; "unreadCount": { "alias": "unreadCount"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; }, { "select": "select"; }, never, never, true, never>;
|
|
30
|
+
}
|
|
@@ -1,40 +1,41 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { I18nService } from '../../../services/i18n';
|
|
3
|
-
import { MessageBubbleMetadata, MessageReactionClickEvent, MessageReplyClickEvent, MessageDeleteClickEvent, MessageEditClickEvent } from './types';
|
|
4
|
-
import { MessageReaction } from '../../../services/chat/types';
|
|
1
|
+
import { MessageBubbleMetadata } from './types';
|
|
5
2
|
import * as i0 from "@angular/core";
|
|
3
|
+
/** Acción disparada desde una burbuja. Un solo output tipado en vez de 4. */
|
|
4
|
+
export interface MessageBubbleAction {
|
|
5
|
+
type: 'reply' | 'edit' | 'delete' | 'react';
|
|
6
|
+
msgId: string;
|
|
7
|
+
/** Token del emoji, solo para type 'react'. */
|
|
8
|
+
token?: string;
|
|
9
|
+
}
|
|
6
10
|
/**
|
|
7
|
-
* val-message-bubble
|
|
11
|
+
* val-message-bubble — burbuja de mensaje presentacional (signal inputs).
|
|
8
12
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
13
|
+
* Sin lógica de negocio: el contenedor (`val-chat-window`) decide agrupación y
|
|
14
|
+
* pasa flags (showAvatar/showName/tail). Las acciones (responder/editar/borrar/
|
|
15
|
+
* reaccionar) NO están siempre visibles: se revelan en hover (desktop) o al tocar
|
|
16
|
+
* la burbuja (móvil), y se emiten por un único `(action)` tipado.
|
|
12
17
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* [props]="msg"
|
|
16
|
-
* (reactionClick)="onReaction($event)"
|
|
17
|
-
* (replyClick)="onReply($event)"
|
|
18
|
-
* (deleteClick)="onDelete($event)"
|
|
19
|
-
* />
|
|
18
|
+
* Read receipts estilo WhatsApp: sending → reloj, sent → ✓, delivered/read → ✓✓
|
|
19
|
+
* (read en color), failed → alerta.
|
|
20
20
|
*/
|
|
21
|
-
export declare class MessageBubbleComponent
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
export declare class MessageBubbleComponent {
|
|
22
|
+
private i18n;
|
|
23
|
+
readonly msg: import("@angular/core").InputSignal<MessageBubbleMetadata>;
|
|
24
|
+
readonly showAvatar: import("@angular/core").InputSignal<boolean>;
|
|
25
|
+
readonly showName: import("@angular/core").InputSignal<boolean>;
|
|
26
|
+
readonly tail: import("@angular/core").InputSignal<boolean>;
|
|
27
|
+
readonly locale: import("@angular/core").InputSignal<string>;
|
|
28
|
+
readonly action: import("@angular/core").OutputEmitterRef<MessageBubbleAction>;
|
|
29
|
+
protected readonly actionsOpen: import("@angular/core").WritableSignal<boolean>;
|
|
28
30
|
constructor();
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
statusIcon()
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
onEditClick(): void;
|
|
31
|
+
protected readonly time: import("@angular/core").Signal<string>;
|
|
32
|
+
protected readonly initials: import("@angular/core").Signal<string>;
|
|
33
|
+
protected readonly imageAttachments: import("@angular/core").Signal<import("valtech-components").MessageAttachment[]>;
|
|
34
|
+
protected readonly fileAttachments: import("@angular/core").Signal<import("valtech-components").MessageAttachment[]>;
|
|
35
|
+
protected readonly statusIcon: import("@angular/core").Signal<"time-outline" | "alert-circle" | "checkmark-done" | "checkmark">;
|
|
36
|
+
protected toggleActions(): void;
|
|
37
|
+
protected emit(type: MessageBubbleAction['type'], token?: string): void;
|
|
38
|
+
t(key: string): string;
|
|
38
39
|
static ɵfac: i0.ɵɵFactoryDeclaration<MessageBubbleComponent, never>;
|
|
39
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MessageBubbleComponent, "val-message-bubble", never, { "
|
|
40
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MessageBubbleComponent, "val-message-bubble", never, { "msg": { "alias": "msg"; "required": true; "isSignal": true; }; "showAvatar": { "alias": "showAvatar"; "required": false; "isSignal": true; }; "showName": { "alias": "showName"; "required": false; "isSignal": true; }; "tail": { "alias": "tail"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; }, { "action": "action"; }, never, never, true, never>;
|
|
40
41
|
}
|
|
@@ -3,17 +3,18 @@ import * as i0 from "@angular/core";
|
|
|
3
3
|
/**
|
|
4
4
|
* val-typing-indicator
|
|
5
5
|
*
|
|
6
|
-
* Muestra quienes estan escribiendo
|
|
7
|
-
*
|
|
6
|
+
* Muestra quienes estan escribiendo con animacion de tres puntos. Se oculta
|
|
7
|
+
* si `typingUsers` esta vacio. Usa signal input para que `typingText` (computed)
|
|
8
|
+
* recompute al cambiar la lista.
|
|
8
9
|
*
|
|
9
10
|
* @example
|
|
10
11
|
* <val-typing-indicator [typingUsers]="['Maria', 'Carlos']" />
|
|
11
12
|
*/
|
|
12
13
|
export declare class TypingIndicatorComponent {
|
|
13
14
|
protected i18n: I18nService;
|
|
14
|
-
typingUsers: string[]
|
|
15
|
+
readonly typingUsers: import("@angular/core").InputSignal<string[]>;
|
|
15
16
|
constructor();
|
|
16
17
|
protected typingText: import("@angular/core").Signal<string>;
|
|
17
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<TypingIndicatorComponent, never>;
|
|
18
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TypingIndicatorComponent, "val-typing-indicator", never, { "typingUsers": { "alias": "typingUsers"; "required": false; }; }, {}, never, never, true, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TypingIndicatorComponent, "val-typing-indicator", never, { "typingUsers": { "alias": "typingUsers"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
19
20
|
}
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { MessageBubbleMetadata
|
|
1
|
+
import { MessageReplyTo } from '../../../services/chat/types';
|
|
2
|
+
import { MessageBubbleAction } from '../../molecules/message-bubble/message-bubble.component';
|
|
3
|
+
import { MessageBubbleMetadata } from '../../molecules/message-bubble/types';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
5
|
+
type ChatRow = {
|
|
6
|
+
kind: 'date';
|
|
7
|
+
id: string;
|
|
8
|
+
label: string;
|
|
9
|
+
} | {
|
|
10
|
+
kind: 'msg';
|
|
11
|
+
id: string;
|
|
12
|
+
msg: MessageBubbleMetadata;
|
|
13
|
+
showName: boolean;
|
|
14
|
+
showAvatar: boolean;
|
|
15
|
+
tail: boolean;
|
|
16
|
+
};
|
|
10
17
|
/**
|
|
11
|
-
* val-chat-window
|
|
18
|
+
* val-chat-window — ventana de chat completa (signal inputs).
|
|
12
19
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
20
|
+
* Agrupa mensajes consecutivos del mismo emisor y por día (separadores sticky),
|
|
21
|
+
* muestra avatar/nombre solo en los bordes del grupo, scroll-to-bottom inteligente
|
|
22
|
+
* (auto-scroll si estás abajo, pill "mensajes nuevos" si estás leyendo arriba),
|
|
23
|
+
* composer moderno con contexto de respuesta, y typing indicator.
|
|
17
24
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* [messages]="messages()"
|
|
22
|
-
* [currentUserId]="userId"
|
|
23
|
-
* [isOpen]="conv.status === 'open'"
|
|
24
|
-
* [typingUsers]="typingUsers()"
|
|
25
|
-
* (sendMessage)="onSend($event)"
|
|
26
|
-
* (reactionClick)="onReaction($event)"
|
|
27
|
-
* />
|
|
25
|
+
* API pública estable (consumida por thread-panel y showcase): inputs convId,
|
|
26
|
+
* messages, currentUserId, isOpen, typingUsers, isLoading; outputs sendMessage,
|
|
27
|
+
* loadMore, reactionClick, deleteMessage, replyTo (+ editMessage/attach/voice nuevos).
|
|
28
28
|
*/
|
|
29
|
-
export declare class ChatWindowComponent
|
|
30
|
-
|
|
31
|
-
convId: string
|
|
32
|
-
messages: MessageBubbleMetadata[]
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
reactionClick: EventEmitter<{
|
|
29
|
+
export declare class ChatWindowComponent {
|
|
30
|
+
private i18n;
|
|
31
|
+
readonly convId: import("@angular/core").InputSignal<string>;
|
|
32
|
+
readonly messages: import("@angular/core").InputSignal<MessageBubbleMetadata[]>;
|
|
33
|
+
readonly currentUserId: import("@angular/core").InputSignal<string>;
|
|
34
|
+
readonly isOpen: import("@angular/core").InputSignal<boolean>;
|
|
35
|
+
readonly typingUsers: import("@angular/core").InputSignal<string[]>;
|
|
36
|
+
readonly isLoading: import("@angular/core").InputSignal<boolean>;
|
|
37
|
+
readonly sendMessage: import("@angular/core").OutputEmitterRef<string>;
|
|
38
|
+
readonly loadMore: import("@angular/core").OutputEmitterRef<void>;
|
|
39
|
+
readonly reactionClick: import("@angular/core").OutputEmitterRef<{
|
|
41
40
|
msgId: string;
|
|
42
41
|
token: string;
|
|
43
42
|
}>;
|
|
44
|
-
deleteMessage:
|
|
45
|
-
replyTo:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
readonly deleteMessage: import("@angular/core").OutputEmitterRef<string>;
|
|
44
|
+
readonly replyTo: import("@angular/core").OutputEmitterRef<string>;
|
|
45
|
+
readonly editMessage: import("@angular/core").OutputEmitterRef<string>;
|
|
46
|
+
readonly typing: import("@angular/core").OutputEmitterRef<void>;
|
|
47
|
+
readonly attach: import("@angular/core").OutputEmitterRef<File>;
|
|
48
|
+
readonly voice: import("@angular/core").OutputEmitterRef<void>;
|
|
49
|
+
private readonly msgsEl;
|
|
50
|
+
protected readonly replyingTo: import("@angular/core").WritableSignal<MessageReplyTo>;
|
|
51
|
+
protected readonly atBottom: import("@angular/core").WritableSignal<boolean>;
|
|
52
|
+
protected readonly hasNew: import("@angular/core").WritableSignal<boolean>;
|
|
53
|
+
protected readonly locale: import("@angular/core").Signal<"es-CL" | "en-US">;
|
|
50
54
|
constructor();
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
protected
|
|
54
|
-
protected
|
|
55
|
-
protected
|
|
56
|
-
|
|
57
|
-
protected onEditClick(_msgId: string): void;
|
|
58
|
-
protected onTyping(): void;
|
|
59
|
-
private scrollToBottom;
|
|
60
|
-
private formatDateLabel;
|
|
55
|
+
protected readonly rows: import("@angular/core").Signal<ChatRow[]>;
|
|
56
|
+
protected onScroll(): void;
|
|
57
|
+
protected scrollToBottom(smooth: boolean): void;
|
|
58
|
+
protected onSend(body: string): void;
|
|
59
|
+
protected onAction(event: MessageBubbleAction): void;
|
|
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; }; "messages": { "alias": "messages"; "required": false;
|
|
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"; "attach": "attach"; "voice": "voice"; }, never, never, true, never>;
|
|
63
63
|
}
|
|
64
64
|
export {};
|
|
@@ -70,8 +70,12 @@ export interface Conversation {
|
|
|
70
70
|
}
|
|
71
71
|
/** Tipo de mensaje. */
|
|
72
72
|
export type MessageType = 'text' | 'image' | 'file' | 'system';
|
|
73
|
-
/**
|
|
74
|
-
|
|
73
|
+
/**
|
|
74
|
+
* Estado de envio/entrega de un mensaje (para read receipts estilo WhatsApp):
|
|
75
|
+
* sending → reloj · sent → ✓ · delivered → ✓✓ gris · read → ✓✓ primary · failed → alerta.
|
|
76
|
+
* El backend hoy solo emite hasta `sent`; los demas estan soportados para el futuro.
|
|
77
|
+
*/
|
|
78
|
+
export type MessageStatus = 'sending' | 'sent' | 'delivered' | 'read' | 'failed';
|
|
75
79
|
/** Archivo adjunto en un mensaje. */
|
|
76
80
|
export interface MessageAttachment {
|
|
77
81
|
/** Nombre del archivo. */
|
|
@@ -19,3 +19,22 @@ export type TimeOfDayKey = 'goodMorning' | 'goodAfternoon' | 'goodEvening';
|
|
|
19
19
|
* const text = i18n.t(key); // 'Buenos días' | 'Buenas tardes' | 'Buenas noches'
|
|
20
20
|
*/
|
|
21
21
|
export declare function getTimeOfDayKey(date?: Date): TimeOfDayKey;
|
|
22
|
+
/** Hora corta local, ej. "14:05". */
|
|
23
|
+
export declare function formatClockTime(value: Date | string | undefined | null, locale?: string): string;
|
|
24
|
+
/**
|
|
25
|
+
* Etiqueta corta para listas de conversaciones (estilo Telegram/WhatsApp):
|
|
26
|
+
* hoy → hora ("14:05"), ayer → label `yesterday`, esta semana → día de semana,
|
|
27
|
+
* más viejo → fecha corta. `labels.today/yesterday` se inyectan ya traducidos.
|
|
28
|
+
*/
|
|
29
|
+
export declare function formatRelativeTime(value: Date | string | undefined | null, locale?: string, labels?: {
|
|
30
|
+
today?: string;
|
|
31
|
+
yesterday?: string;
|
|
32
|
+
}): string;
|
|
33
|
+
/**
|
|
34
|
+
* Etiqueta para separadores de fecha dentro de un chat: "Hoy" / "Ayer" /
|
|
35
|
+
* fecha larga ("12 de junio de 2026"). `labels.today/yesterday` ya traducidos.
|
|
36
|
+
*/
|
|
37
|
+
export declare function formatDateSeparator(value: Date | string | undefined | null, locale?: string, labels?: {
|
|
38
|
+
today?: string;
|
|
39
|
+
yesterday?: string;
|
|
40
|
+
}): string;
|
package/lib/version.d.ts
CHANGED
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -474,10 +474,12 @@ export { ConversationService } from './lib/services/chat/conversation.service';
|
|
|
474
474
|
export { provideValtechChat, VALTECH_CHAT_CONFIG } from './lib/services/chat/config';
|
|
475
475
|
export type { ValtechChatConfig } from './lib/services/chat/config';
|
|
476
476
|
export * from './lib/services/chat/types';
|
|
477
|
-
export { MessageBubbleComponent } from './lib/components/molecules/message-bubble/message-bubble.component';
|
|
477
|
+
export { MessageBubbleComponent, type MessageBubbleAction, } from './lib/components/molecules/message-bubble/message-bubble.component';
|
|
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';
|
|
482
|
+
export { ConversationListItemComponent } from './lib/components/molecules/conversation-list-item/conversation-list-item.component';
|
|
481
483
|
export { TypingIndicatorComponent } from './lib/components/molecules/typing-indicator/typing-indicator.component';
|
|
482
484
|
export { ChatWindowComponent } from './lib/components/organisms/chat-window/chat-window.component';
|
|
483
485
|
export * from './lib/components/organisms/chat-window/types';
|