valtech-components 4.0.227 → 4.0.228
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-input/chat-input.component.mjs +9 -1
- package/esm2022/lib/components/molecules/message-bubble/message-bubble.component.mjs +191 -274
- package/esm2022/lib/components/molecules/typing-indicator/typing-indicator.component.mjs +12 -11
- package/esm2022/lib/components/organisms/chat-window/chat-window.component.mjs +203 -216
- package/esm2022/lib/components/organisms/thread-panel/thread-panel.component.mjs +10 -10
- package/esm2022/lib/services/chat/conversation.service.mjs +14 -37
- package/esm2022/lib/services/chat/types.mjs +1 -1
- package/esm2022/lib/services/i18n/default-content.mjs +1 -5
- package/esm2022/lib/shared/utils/datetime.mjs +1 -54
- package/esm2022/lib/version.mjs +2 -2
- package/esm2022/public-api.mjs +2 -4
- package/fesm2022/valtech-components.mjs +428 -1080
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/molecules/message-bubble/message-bubble.component.d.ts +32 -34
- package/lib/components/molecules/typing-indicator/typing-indicator.component.d.ts +4 -5
- package/lib/components/organisms/chat-window/chat-window.component.d.ts +56 -52
- package/lib/services/chat/conversation.service.d.ts +5 -12
- package/lib/services/chat/types.d.ts +52 -86
- package/lib/shared/utils/datetime.d.ts +0 -19
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -3
- package/src/lib/services/firebase/firebase-messaging-sw.js +125 -70
- package/esm2022/lib/components/molecules/chat-composer/chat-composer.component.mjs +0 -391
- package/esm2022/lib/components/molecules/conversation-list-item/conversation-list-item.component.mjs +0 -108
- package/lib/components/molecules/chat-composer/chat-composer.component.d.ts +0 -63
- package/lib/components/molecules/conversation-list-item/conversation-list-item.component.d.ts +0 -30
|
@@ -1,42 +1,40 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { I18nService } from '../../../services/i18n';
|
|
3
|
+
import { MessageBubbleMetadata, MessageReactionClickEvent, MessageReplyClickEvent, MessageDeleteClickEvent, MessageEditClickEvent } from './types';
|
|
4
|
+
import { MessageReaction } from '../../../services/chat/types';
|
|
2
5
|
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
|
-
}
|
|
10
6
|
/**
|
|
11
|
-
* val-message-bubble
|
|
7
|
+
* val-message-bubble
|
|
12
8
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* la burbuja (móvil), y se emiten por un único `(action)` tipado.
|
|
9
|
+
* Burbuja de mensaje para el chat. Alineada a la derecha si isMine, a la izquierda si no.
|
|
10
|
+
* Muestra nombre del emisor, cuerpo, timestamp, estado de envio, reacciones y acciones.
|
|
11
|
+
* Si el mensaje fue eliminado muestra un texto en gris sin acciones.
|
|
17
12
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
13
|
+
* @example
|
|
14
|
+
* <val-message-bubble
|
|
15
|
+
* [props]="msg"
|
|
16
|
+
* (reactionClick)="onReaction($event)"
|
|
17
|
+
* (replyClick)="onReply($event)"
|
|
18
|
+
* (deleteClick)="onDelete($event)"
|
|
19
|
+
* />
|
|
20
20
|
*/
|
|
21
|
-
export declare class MessageBubbleComponent {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
readonly action: import("@angular/core").OutputEmitterRef<MessageBubbleAction>;
|
|
29
|
-
protected readonly actionsOpen: import("@angular/core").WritableSignal<boolean>;
|
|
21
|
+
export declare class MessageBubbleComponent implements OnInit {
|
|
22
|
+
protected i18n: I18nService;
|
|
23
|
+
props: MessageBubbleMetadata;
|
|
24
|
+
reactionClick: EventEmitter<MessageReactionClickEvent>;
|
|
25
|
+
replyClick: EventEmitter<MessageReplyClickEvent>;
|
|
26
|
+
deleteClick: EventEmitter<MessageDeleteClickEvent>;
|
|
27
|
+
editClick: EventEmitter<MessageEditClickEvent>;
|
|
30
28
|
constructor();
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
29
|
+
ngOnInit(): void;
|
|
30
|
+
deletedText(): string;
|
|
31
|
+
editedLabel(): string;
|
|
32
|
+
formatTime(date: Date): string;
|
|
33
|
+
statusIcon(): string;
|
|
34
|
+
onReactionClick(reaction: MessageReaction): void;
|
|
35
|
+
onReplyClick(): void;
|
|
36
|
+
onDeleteClick(): void;
|
|
37
|
+
onEditClick(): void;
|
|
40
38
|
static ɵfac: i0.ɵɵFactoryDeclaration<MessageBubbleComponent, never>;
|
|
41
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MessageBubbleComponent, "val-message-bubble", never, { "
|
|
39
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MessageBubbleComponent, "val-message-bubble", never, { "props": { "alias": "props"; "required": false; }; }, { "reactionClick": "reactionClick"; "replyClick": "replyClick"; "deleteClick": "deleteClick"; "editClick": "editClick"; }, never, never, true, never>;
|
|
42
40
|
}
|
|
@@ -3,18 +3,17 @@ import * as i0 from "@angular/core";
|
|
|
3
3
|
/**
|
|
4
4
|
* val-typing-indicator
|
|
5
5
|
*
|
|
6
|
-
* Muestra quienes estan escribiendo con animacion de tres puntos.
|
|
7
|
-
* si
|
|
8
|
-
* recompute al cambiar la lista.
|
|
6
|
+
* Muestra quienes estan escribiendo en el chat con animacion de tres puntos.
|
|
7
|
+
* Se oculta automaticamente si typingUsers esta vacio.
|
|
9
8
|
*
|
|
10
9
|
* @example
|
|
11
10
|
* <val-typing-indicator [typingUsers]="['Maria', 'Carlos']" />
|
|
12
11
|
*/
|
|
13
12
|
export declare class TypingIndicatorComponent {
|
|
14
13
|
protected i18n: I18nService;
|
|
15
|
-
|
|
14
|
+
typingUsers: string[];
|
|
16
15
|
constructor();
|
|
17
16
|
protected typingText: import("@angular/core").Signal<string>;
|
|
18
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<TypingIndicatorComponent, never>;
|
|
19
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TypingIndicatorComponent, "val-typing-indicator", never, { "typingUsers": { "alias": "typingUsers"; "required": false;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TypingIndicatorComponent, "val-typing-indicator", never, { "typingUsers": { "alias": "typingUsers"; "required": false; }; }, {}, never, never, true, never>;
|
|
20
19
|
}
|
|
@@ -1,64 +1,68 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { MessageBubbleMetadata } from '../../molecules/message-bubble/types';
|
|
1
|
+
import { EventEmitter, OnChanges, OnDestroy, SimpleChanges, AfterViewChecked, AfterViewInit } from '@angular/core';
|
|
2
|
+
import { I18nService } from '../../../services/i18n';
|
|
3
|
+
import { MessageBubbleMetadata, MessageReactionClickEvent } from '../../molecules/message-bubble/types';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
kind: 'msg';
|
|
11
|
-
id: string;
|
|
12
|
-
msg: MessageBubbleMetadata;
|
|
13
|
-
showName: boolean;
|
|
14
|
-
showAvatar: boolean;
|
|
15
|
-
tail: boolean;
|
|
16
|
-
};
|
|
5
|
+
/** Estructura interna para agrupar mensajes por fecha. */
|
|
6
|
+
interface MessageGroup {
|
|
7
|
+
dateLabel: string;
|
|
8
|
+
messages: MessageBubbleMetadata[];
|
|
9
|
+
}
|
|
17
10
|
/**
|
|
18
|
-
* val-chat-window
|
|
11
|
+
* val-chat-window
|
|
19
12
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
13
|
+
* Ventana de chat completa. Muestra la lista de mensajes agrupados por fecha,
|
|
14
|
+
* el indicador de escritura, el input de mensaje (solo si isOpen) y un banner
|
|
15
|
+
* cuando la conversacion esta cerrada. Auto-scroll al ultimo mensaje cuando
|
|
16
|
+
* llegan mensajes nuevos.
|
|
24
17
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
18
|
+
* @example
|
|
19
|
+
* <val-chat-window
|
|
20
|
+
* [convId]="conv.id"
|
|
21
|
+
* [messages]="messages()"
|
|
22
|
+
* [currentUserId]="userId"
|
|
23
|
+
* [isOpen]="conv.status === 'open'"
|
|
24
|
+
* [typingUsers]="typingUsers()"
|
|
25
|
+
* (sendMessage)="onSend($event)"
|
|
26
|
+
* (reactionClick)="onReaction($event)"
|
|
27
|
+
* />
|
|
28
28
|
*/
|
|
29
|
-
export declare class ChatWindowComponent {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
29
|
+
export declare class ChatWindowComponent implements OnChanges, AfterViewInit, AfterViewChecked, OnDestroy {
|
|
30
|
+
protected i18n: I18nService;
|
|
31
|
+
convId: string;
|
|
32
|
+
messages: MessageBubbleMetadata[];
|
|
33
|
+
participants: string[];
|
|
34
|
+
currentUserId: string;
|
|
35
|
+
isOpen: boolean;
|
|
36
|
+
typingUsers: string[];
|
|
37
|
+
isLoading: boolean;
|
|
38
|
+
sendMessage: EventEmitter<string>;
|
|
39
|
+
loadMore: EventEmitter<void>;
|
|
40
|
+
reactionClick: EventEmitter<{
|
|
40
41
|
msgId: string;
|
|
41
42
|
token: string;
|
|
42
43
|
}>;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
private
|
|
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">;
|
|
44
|
+
deleteMessage: EventEmitter<string>;
|
|
45
|
+
replyTo: EventEmitter<string>;
|
|
46
|
+
private messagesListRef?;
|
|
47
|
+
private chatWindowElRef?;
|
|
48
|
+
private prevMessageCount;
|
|
49
|
+
private shouldScrollToBottom;
|
|
50
|
+
private vvListener?;
|
|
54
51
|
constructor();
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
52
|
+
ngAfterViewInit(): void;
|
|
53
|
+
ngOnDestroy(): void;
|
|
54
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
55
|
+
ngAfterViewChecked(): void;
|
|
56
|
+
private adjustToKeyboard;
|
|
57
|
+
protected messageGroups: import("@angular/core").Signal<MessageGroup[]>;
|
|
58
|
+
protected closedText: import("@angular/core").Signal<string>;
|
|
59
|
+
protected loadingText: import("@angular/core").Signal<string>;
|
|
60
|
+
protected onReactionClick(event: MessageReactionClickEvent): void;
|
|
61
|
+
protected onEditClick(_msgId: string): void;
|
|
62
|
+
protected onTyping(): void;
|
|
63
|
+
private scrollToBottom;
|
|
64
|
+
private formatDateLabel;
|
|
61
65
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChatWindowComponent, never>;
|
|
62
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ChatWindowComponent, "val-chat-window", never, { "convId": { "alias": "convId"; "required": false;
|
|
66
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChatWindowComponent, "val-chat-window", never, { "convId": { "alias": "convId"; "required": false; }; "messages": { "alias": "messages"; "required": false; }; "participants": { "alias": "participants"; "required": false; }; "currentUserId": { "alias": "currentUserId"; "required": false; }; "isOpen": { "alias": "isOpen"; "required": false; }; "typingUsers": { "alias": "typingUsers"; "required": false; }; "isLoading": { "alias": "isLoading"; "required": false; }; }, { "sendMessage": "sendMessage"; "loadMore": "loadMore"; "reactionClick": "reactionClick"; "deleteMessage": "deleteMessage"; "replyTo": "replyTo"; }, never, never, true, never>;
|
|
63
67
|
}
|
|
64
68
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import { Conversation, ConversationType, CreateConversationRequest, ListConversationsResponse, Message,
|
|
2
|
+
import { Conversation, ConversationType, CreateConversationRequest, ListConversationsResponse, Message, UpdateConversationRequest } from './types';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
/**
|
|
5
5
|
* ConversationService
|
|
@@ -33,17 +33,12 @@ export declare class ConversationService {
|
|
|
33
33
|
private get baseUrl();
|
|
34
34
|
/**
|
|
35
35
|
* Crea una nueva conversacion.
|
|
36
|
-
* El backend responde con un envelope { operationId, conversation } — lo
|
|
37
|
-
* desenvolvemos para devolver la Conversation directa.
|
|
38
36
|
*/
|
|
39
37
|
createConversation(req: CreateConversationRequest): Observable<Conversation>;
|
|
40
38
|
/**
|
|
41
|
-
* Obtiene o crea una conversacion asociada a una entidad (post, request,
|
|
39
|
+
* Obtiene o crea una conversacion asociada a una entidad (post, request, etc.).
|
|
42
40
|
* Usa el patron upsert del backend: si ya existe una conversacion para esa entidad,
|
|
43
41
|
* la devuelve; si no, la crea.
|
|
44
|
-
*
|
|
45
|
-
* El backend espera { entityRef: { type, id }, type } y responde con un envelope
|
|
46
|
-
* { operationId, conversation, created }.
|
|
47
42
|
*/
|
|
48
43
|
getOrCreateForEntity(entityType: string, entityId: string, type?: ConversationType): Observable<Conversation>;
|
|
49
44
|
/**
|
|
@@ -55,7 +50,7 @@ export declare class ConversationService {
|
|
|
55
50
|
*/
|
|
56
51
|
getConversation(convId: string): Observable<Conversation>;
|
|
57
52
|
/**
|
|
58
|
-
* Actualiza el
|
|
53
|
+
* Actualiza el titulo o estado de una conversacion.
|
|
59
54
|
*/
|
|
60
55
|
updateConversation(convId: string, req: UpdateConversationRequest): Observable<Conversation>;
|
|
61
56
|
/**
|
|
@@ -75,11 +70,9 @@ export declare class ConversationService {
|
|
|
75
70
|
*/
|
|
76
71
|
removeParticipant(convId: string, userId: string): Observable<void>;
|
|
77
72
|
/**
|
|
78
|
-
* Envia un mensaje a una conversacion
|
|
79
|
-
* El backend espera `attachments: { url, type, name, size }[]` (key `type` = MIME),
|
|
80
|
-
* mientras que el front usa `mimeType` — se mapea aqui.
|
|
73
|
+
* Envia un mensaje a una conversacion.
|
|
81
74
|
*/
|
|
82
|
-
sendMessage(convId: string, body: string
|
|
75
|
+
sendMessage(convId: string, body: string): Observable<Message>;
|
|
83
76
|
/**
|
|
84
77
|
* Elimina (marca como eliminado) un mensaje.
|
|
85
78
|
*/
|
|
@@ -7,75 +7,50 @@
|
|
|
7
7
|
* /apps/{appId}/orgs/{orgId}/conversations/{convId}/typing/{userId}
|
|
8
8
|
*/
|
|
9
9
|
import { FirestoreDocument } from '../firebase/types';
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
|
|
26
|
-
/** Si la conversacion esta abierta para enviar mensajes. */
|
|
27
|
-
isOpen: boolean;
|
|
28
|
-
/** Quien puede unirse. */
|
|
29
|
-
visibility: ConvVisibility;
|
|
30
|
-
/** Si admite participantes anonimos. */
|
|
31
|
-
allowAnonymous: boolean;
|
|
32
|
-
/** Si requiere membresia de la org. */
|
|
33
|
-
requireMembership: boolean;
|
|
34
|
-
/** Maximo de participantes (0 = sin limite). */
|
|
35
|
-
maxParticipants: number;
|
|
10
|
+
/** Tipo de conversacion. */
|
|
11
|
+
export type ConversationType = 'direct' | 'group' | 'entity';
|
|
12
|
+
/** Estado de una conversacion. */
|
|
13
|
+
export type ConversationStatus = 'open' | 'closed';
|
|
14
|
+
/** Participante de una conversacion. */
|
|
15
|
+
export interface ConversationParticipant {
|
|
16
|
+
/** ID del usuario. */
|
|
17
|
+
userId: string;
|
|
18
|
+
/** Nombre visible del usuario. */
|
|
19
|
+
displayName: string;
|
|
20
|
+
/** URL del avatar del usuario (opcional). */
|
|
21
|
+
avatarUrl?: string;
|
|
22
|
+
/** Fecha en que se unio a la conversacion. */
|
|
23
|
+
joinedAt: Date;
|
|
24
|
+
/** Ultimo mensaje leido por este participante. */
|
|
25
|
+
lastReadMsgId?: string;
|
|
36
26
|
}
|
|
37
|
-
/**
|
|
38
|
-
|
|
39
|
-
* (services/conversation/types.go) — la fuente de verdad es DynamoDB y el doc se
|
|
40
|
-
* proyecta a Firestore para las reglas de membresia. Por eso los campos son
|
|
41
|
-
* `convId`/`name`/`participants: string[]` y NO el shape antiguo.
|
|
42
|
-
*/
|
|
43
|
-
export interface Conversation {
|
|
44
|
-
/** ID de la conversacion. */
|
|
45
|
-
convId: string;
|
|
27
|
+
/** Documento de conversacion en Firestore. */
|
|
28
|
+
export interface Conversation extends FirestoreDocument {
|
|
46
29
|
/** Tipo de conversacion. */
|
|
47
30
|
type: ConversationType;
|
|
48
|
-
/**
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
|
|
62
|
-
/** Fecha
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
|
|
66
|
-
/** Fecha del ultimo mensaje (ISO string). */
|
|
67
|
-
lastMsgAt?: string;
|
|
68
|
-
/** Preview del ultimo mensaje. */
|
|
69
|
-
lastMsgPreview?: string;
|
|
31
|
+
/** Estado de la conversacion. */
|
|
32
|
+
status: ConversationStatus;
|
|
33
|
+
/** Participantes. */
|
|
34
|
+
participants: ConversationParticipant[];
|
|
35
|
+
/** Tipo de entidad asociada (para tipo entity). */
|
|
36
|
+
entityType?: string;
|
|
37
|
+
/** ID de la entidad asociada. */
|
|
38
|
+
entityId?: string;
|
|
39
|
+
/** Titulo de la conversacion (para grupos). */
|
|
40
|
+
title?: string;
|
|
41
|
+
/** ID del ultimo mensaje. */
|
|
42
|
+
lastMsgId?: string;
|
|
43
|
+
/** Texto del ultimo mensaje (preview). */
|
|
44
|
+
lastMsgBody?: string;
|
|
45
|
+
/** Fecha del ultimo mensaje. */
|
|
46
|
+
lastMsgAt?: Date;
|
|
47
|
+
/** Conteo de mensajes no leidos por userId. */
|
|
48
|
+
unreadCount?: Record<string, number>;
|
|
70
49
|
}
|
|
71
50
|
/** Tipo de mensaje. */
|
|
72
51
|
export type MessageType = 'text' | 'image' | 'file' | 'system';
|
|
73
|
-
/**
|
|
74
|
-
|
|
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';
|
|
52
|
+
/** Estado de envio del mensaje. */
|
|
53
|
+
export type MessageStatus = 'sending' | 'sent' | 'failed';
|
|
79
54
|
/** Archivo adjunto en un mensaje. */
|
|
80
55
|
export interface MessageAttachment {
|
|
81
56
|
/** Nombre del archivo. */
|
|
@@ -143,37 +118,28 @@ export interface TypingDocument extends FirestoreDocument {
|
|
|
143
118
|
export interface CreateConversationRequest {
|
|
144
119
|
/** Tipo de conversacion. */
|
|
145
120
|
type: ConversationType;
|
|
146
|
-
/**
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
|
|
121
|
+
/** IDs de los participantes iniciales. */
|
|
122
|
+
participantIds?: string[];
|
|
123
|
+
/** Para tipo entity: tipo de la entidad. */
|
|
124
|
+
entityType?: string;
|
|
125
|
+
/** Para tipo entity: ID de la entidad. */
|
|
126
|
+
entityId?: string;
|
|
127
|
+
/** Titulo (para grupos). */
|
|
128
|
+
title?: string;
|
|
154
129
|
}
|
|
155
130
|
/** Request para actualizar una conversacion. */
|
|
156
131
|
export interface UpdateConversationRequest {
|
|
157
|
-
/** Nuevo
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
|
|
161
|
-
}
|
|
162
|
-
/** Response que envuelve una sola conversacion (create / get / update / get-or-create). */
|
|
163
|
-
export interface ConversationResponse {
|
|
164
|
-
/** ID de operacion para tracing. */
|
|
165
|
-
operationId: string;
|
|
166
|
-
/** La conversacion. */
|
|
167
|
-
conversation: Conversation;
|
|
168
|
-
/** Si fue creada en esta llamada (solo get-or-create). */
|
|
169
|
-
created?: boolean;
|
|
132
|
+
/** Nuevo titulo (opcional). */
|
|
133
|
+
title?: string;
|
|
134
|
+
/** Nuevo estado (opcional). */
|
|
135
|
+
status?: ConversationStatus;
|
|
170
136
|
}
|
|
171
137
|
/** Response de listado de conversaciones. */
|
|
172
138
|
export interface ListConversationsResponse {
|
|
173
|
-
/** ID de operacion para tracing. */
|
|
174
|
-
operationId: string;
|
|
175
139
|
/** Lista de conversaciones. */
|
|
176
140
|
conversations: Conversation[];
|
|
177
141
|
/** Cursor para paginacion. */
|
|
178
142
|
nextCursor?: string;
|
|
143
|
+
/** Si hay mas paginas. */
|
|
144
|
+
hasMore: boolean;
|
|
179
145
|
}
|
|
@@ -19,22 +19,3 @@ 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,12 +474,10 @@ 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
|
|
477
|
+
export { MessageBubbleComponent } 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';
|
|
483
481
|
export { TypingIndicatorComponent } from './lib/components/molecules/typing-indicator/typing-indicator.component';
|
|
484
482
|
export { ChatWindowComponent } from './lib/components/organisms/chat-window/chat-window.component';
|
|
485
483
|
export * from './lib/components/organisms/chat-window/types';
|