valtech-components 4.0.219 → 4.0.221

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.
Files changed (46) hide show
  1. package/esm2022/lib/components/molecules/chat-input/chat-input.component.mjs +157 -0
  2. package/esm2022/lib/components/molecules/chat-input/types.mjs +2 -0
  3. package/esm2022/lib/components/molecules/message-bubble/message-bubble.component.mjs +244 -0
  4. package/esm2022/lib/components/molecules/message-bubble/types.mjs +2 -0
  5. package/esm2022/lib/components/molecules/typing-indicator/typing-indicator.component.mjs +76 -0
  6. package/esm2022/lib/components/organisms/chat-window/chat-window.component.mjs +246 -0
  7. package/esm2022/lib/components/organisms/chat-window/types.mjs +2 -0
  8. package/esm2022/lib/components/organisms/thread-panel/thread-panel.component.mjs +211 -0
  9. package/esm2022/lib/services/chat/config.mjs +35 -0
  10. package/esm2022/lib/services/chat/conversation.service.mjs +274 -0
  11. package/esm2022/lib/services/chat/types.mjs +10 -0
  12. package/esm2022/lib/services/entity-feed/entity-feed.service.mjs +103 -0
  13. package/esm2022/lib/services/entity-feed/index.mjs +2 -0
  14. package/esm2022/lib/services/entity-feed/types.mjs +2 -0
  15. package/esm2022/lib/services/i18n/default-content.mjs +65 -1
  16. package/esm2022/lib/version.mjs +2 -2
  17. package/esm2022/public-api.mjs +16 -1
  18. package/fesm2022/valtech-components.mjs +1370 -3
  19. package/fesm2022/valtech-components.mjs.map +1 -1
  20. package/lib/components/atoms/rights-footer/rights-footer.component.d.ts +2 -2
  21. package/lib/components/atoms/text/text.component.d.ts +1 -1
  22. package/lib/components/atoms/user-avatar/user-avatar.component.d.ts +1 -1
  23. package/lib/components/molecules/chat-input/chat-input.component.d.ts +38 -0
  24. package/lib/components/molecules/chat-input/types.d.ts +20 -0
  25. package/lib/components/molecules/cta-card/cta-card.component.d.ts +1 -1
  26. package/lib/components/molecules/features-list/features-list.component.d.ts +1 -1
  27. package/lib/components/molecules/load-more/load-more.component.d.ts +1 -1
  28. package/lib/components/molecules/message-bubble/message-bubble.component.d.ts +40 -0
  29. package/lib/components/molecules/message-bubble/types.d.ts +64 -0
  30. package/lib/components/molecules/metric-card/metric-card.component.d.ts +1 -1
  31. package/lib/components/molecules/typing-indicator/typing-indicator.component.d.ts +19 -0
  32. package/lib/components/organisms/article/article.component.d.ts +7 -7
  33. package/lib/components/organisms/auth-cta/auth-cta.component.d.ts +1 -1
  34. package/lib/components/organisms/chat-window/chat-window.component.d.ts +63 -0
  35. package/lib/components/organisms/chat-window/types.d.ts +36 -0
  36. package/lib/components/organisms/landing-steps/landing-steps.component.d.ts +1 -1
  37. package/lib/components/organisms/thread-panel/thread-panel.component.d.ts +55 -0
  38. package/lib/services/chat/config.d.ts +37 -0
  39. package/lib/services/chat/conversation.service.d.ts +147 -0
  40. package/lib/services/chat/types.d.ts +145 -0
  41. package/lib/services/entity-feed/entity-feed.service.d.ts +71 -0
  42. package/lib/services/entity-feed/index.d.ts +2 -0
  43. package/lib/services/entity-feed/types.d.ts +26 -0
  44. package/lib/version.d.ts +1 -1
  45. package/package.json +2 -2
  46. package/public-api.d.ts +13 -0
@@ -39,11 +39,11 @@ export declare class RightsFooterComponent {
39
39
  /**
40
40
  * Computed helper for align prop in template.
41
41
  */
42
- propsAlign: import("@angular/core").Signal<"right" | "center" | "left">;
42
+ propsAlign: import("@angular/core").Signal<"left" | "center" | "right">;
43
43
  /**
44
44
  * Computed helper for color prop in template.
45
45
  */
46
- propsColor: import("@angular/core").Signal<"primary" | "secondary" | "tertiary" | "success" | "warning" | "danger" | "light" | "medium" | "dark">;
46
+ propsColor: import("@angular/core").Signal<"success" | "medium" | "primary" | "secondary" | "tertiary" | "warning" | "danger" | "light" | "dark">;
47
47
  /**
48
48
  * Computed helper for withMargin prop in template.
49
49
  */
@@ -11,7 +11,7 @@ export declare class TextComponent {
11
11
  */
12
12
  displayContent: import("@angular/core").Signal<string>;
13
13
  propsColor: import("@angular/core").Signal<import("@ionic/core").Color>;
14
- propsSize: import("@angular/core").Signal<"medium" | "small" | "large" | "xlarge">;
14
+ propsSize: import("@angular/core").Signal<"small" | "medium" | "large" | "xlarge">;
15
15
  propsBold: import("@angular/core").Signal<boolean>;
16
16
  propsProcessLinks: import("@angular/core").Signal<boolean>;
17
17
  propsAllowPartialBold: import("@angular/core").Signal<boolean>;
@@ -38,7 +38,7 @@ export declare class UserAvatarComponent {
38
38
  readonly imageUrl: import("@angular/core").Signal<string>;
39
39
  /** Iniciales — 1-2 chars derivados de name (preferred) o email prefix. */
40
40
  readonly initials: import("@angular/core").Signal<string>;
41
- readonly sizeClass: import("@angular/core").Signal<"medium" | "small" | "large" | "xlarge" | "xsmall">;
41
+ readonly sizeClass: import("@angular/core").Signal<"small" | "medium" | "large" | "xlarge" | "xsmall">;
42
42
  readonly shapeClass: import("@angular/core").Signal<"circle" | "square">;
43
43
  /** Background — explicito o derivado deterministicamente del user. */
44
44
  readonly bgColor: import("@angular/core").Signal<string>;
@@ -0,0 +1,38 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { I18nService } from '../../../services/i18n';
3
+ import { ChatInputMetadata } from './types';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * val-chat-input
7
+ *
8
+ * Campo de entrada para mensajes de chat. Textarea auto-grow con contador
9
+ * de caracteres y boton de enviar. Emite send() al pulsar el boton o Enter
10
+ * (sin Shift), y typing() en cada keydown.
11
+ *
12
+ * @example
13
+ * <val-chat-input
14
+ * [props]="{ placeholder: 'Mensaje...', maxLength: 1000 }"
15
+ * (send)="onSend($event)"
16
+ * (typing)="onTyping()"
17
+ * />
18
+ */
19
+ export declare class ChatInputComponent {
20
+ protected i18n: I18nService;
21
+ props: ChatInputMetadata;
22
+ send: EventEmitter<string>;
23
+ typing: EventEmitter<void>;
24
+ protected body: import("@angular/core").WritableSignal<string>;
25
+ constructor();
26
+ protected maxLen: import("@angular/core").Signal<number>;
27
+ protected canSend: import("@angular/core").Signal<boolean>;
28
+ protected isNearLimit: import("@angular/core").Signal<boolean>;
29
+ protected isAtLimit: import("@angular/core").Signal<boolean>;
30
+ protected placeholderText: import("@angular/core").Signal<string>;
31
+ protected sendLabel: import("@angular/core").Signal<string>;
32
+ protected counterText: import("@angular/core").Signal<string>;
33
+ protected onInput(event: Event): void;
34
+ protected onKeydown(event: KeyboardEvent): void;
35
+ protected onSend(): void;
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<ChatInputComponent, never>;
37
+ static ɵcmp: i0.ɵɵComponentDeclaration<ChatInputComponent, "val-chat-input", never, { "props": { "alias": "props"; "required": false; }; }, { "send": "send"; "typing": "typing"; }, never, never, true, never>;
38
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Configuracion del componente de input de chat.
3
+ */
4
+ export interface ChatInputMetadata {
5
+ /** Placeholder del textarea (opcional). */
6
+ placeholder?: string;
7
+ /** Si el input esta deshabilitado. */
8
+ disabled?: boolean;
9
+ /** Cantidad maxima de caracteres (default: 2000). */
10
+ maxLength?: number;
11
+ /** Si se permiten archivos adjuntos (no implementado en esta version). */
12
+ allowAttachments?: boolean;
13
+ }
14
+ /**
15
+ * Evento emitido al enviar un mensaje.
16
+ */
17
+ export interface ChatInputSendEvent {
18
+ /** Cuerpo del mensaje. */
19
+ body: string;
20
+ }
@@ -35,7 +35,7 @@ export declare class CtaCardComponent {
35
35
  /** Emitted with the token of the clicked action button */
36
36
  onAction: EventEmitter<string>;
37
37
  /** Merged configuration with defaults */
38
- config: import("@angular/core").Signal<CtaCardMetadata & Required<Pick<CtaCardMetadata, "padding" | "borderRadius" | "bordered" | "shadowed" | "align">>>;
38
+ config: import("@angular/core").Signal<CtaCardMetadata & Required<Pick<CtaCardMetadata, "borderRadius" | "bordered" | "shadowed" | "align" | "padding">>>;
39
39
  getBackground(): string;
40
40
  getColor(): string | null;
41
41
  static ɵfac: i0.ɵɵFactoryDeclaration<CtaCardComponent, never>;
@@ -41,7 +41,7 @@ export declare class FeaturesListComponent {
41
41
  iconColor: string;
42
42
  iconSize: number;
43
43
  mode: "horizontal" | "vertical";
44
- gap: "medium" | "small" | "large";
44
+ gap: "small" | "medium" | "large";
45
45
  alignment: "center" | "start";
46
46
  imageShape: "circle" | "square";
47
47
  maxVisible: number;
@@ -26,7 +26,7 @@ export declare class LoadMoreComponent {
26
26
  readonly color: import("@angular/core").Signal<string>;
27
27
  readonly fill: import("@angular/core").Signal<string>;
28
28
  readonly shape: import("@angular/core").Signal<string>;
29
- readonly size: import("@angular/core").Signal<"default" | "small" | "large">;
29
+ readonly size: import("@angular/core").Signal<"small" | "default" | "large">;
30
30
  readonly threshold: import("@angular/core").Signal<string>;
31
31
  readonly label: import("@angular/core").Signal<string>;
32
32
  private readonly _pendingComplete;
@@ -0,0 +1,40 @@
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';
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * val-message-bubble
8
+ *
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.
12
+ *
13
+ * @example
14
+ * <val-message-bubble
15
+ * [props]="msg"
16
+ * (reactionClick)="onReaction($event)"
17
+ * (replyClick)="onReply($event)"
18
+ * (deleteClick)="onDelete($event)"
19
+ * />
20
+ */
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>;
28
+ constructor();
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;
38
+ static ɵfac: i0.ɵɵFactoryDeclaration<MessageBubbleComponent, 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>;
40
+ }
@@ -0,0 +1,64 @@
1
+ import { MessageAttachment, MessageReaction, MessageReplyTo, MessageStatus, MessageType } from '../../../services/chat/types';
2
+ /**
3
+ * Datos necesarios para renderizar una burbuja de mensaje.
4
+ */
5
+ export interface MessageBubbleMetadata {
6
+ /** ID unico del mensaje. */
7
+ msgId: string;
8
+ /** ID del emisor. */
9
+ senderId: string;
10
+ /** Nombre visible del emisor. */
11
+ senderName: string;
12
+ /** URL del avatar del emisor (opcional). */
13
+ senderAvatar?: string;
14
+ /** Cuerpo del mensaje. */
15
+ body: string;
16
+ /** Tipo de mensaje. */
17
+ type: MessageType;
18
+ /** Fecha de creacion del mensaje. */
19
+ createdAt: Date;
20
+ /** Si el mensaje es del usuario actual (alineacion derecha). */
21
+ isMine: boolean;
22
+ /** Si el mensaje fue eliminado. */
23
+ isDeleted?: boolean;
24
+ /** Si el mensaje fue editado. */
25
+ isEdited?: boolean;
26
+ /** Mensaje al que responde (opcional). */
27
+ replyTo?: MessageReplyTo;
28
+ /** Archivos adjuntos (opcional). */
29
+ attachments?: MessageAttachment[];
30
+ /** Reacciones del mensaje (opcional). */
31
+ reactions?: MessageReaction[];
32
+ /** Estado de envio (para mensajes optimistas del lado del cliente). */
33
+ status?: MessageStatus;
34
+ }
35
+ /**
36
+ * Evento emitido cuando el usuario hace clic en una reaccion.
37
+ */
38
+ export interface MessageReactionClickEvent {
39
+ /** Token de la reaccion clickeada. */
40
+ token: string;
41
+ /** ID del mensaje. */
42
+ msgId: string;
43
+ }
44
+ /**
45
+ * Evento emitido cuando el usuario responde a un mensaje.
46
+ */
47
+ export interface MessageReplyClickEvent {
48
+ /** ID del mensaje al que se responde. */
49
+ msgId: string;
50
+ }
51
+ /**
52
+ * Evento emitido cuando el usuario elimina un mensaje.
53
+ */
54
+ export interface MessageDeleteClickEvent {
55
+ /** ID del mensaje a eliminar. */
56
+ msgId: string;
57
+ }
58
+ /**
59
+ * Evento emitido cuando el usuario edita un mensaje.
60
+ */
61
+ export interface MessageEditClickEvent {
62
+ /** ID del mensaje a editar. */
63
+ msgId: string;
64
+ }
@@ -28,7 +28,7 @@ export declare class MetricCardComponent {
28
28
  /** Emitted with the token of the clicked action */
29
29
  onAction: EventEmitter<string>;
30
30
  /** Merged configuration with defaults */
31
- config: import("@angular/core").Signal<MetricCardMetadata & Required<Pick<MetricCardMetadata, "padding" | "borderRadius" | "bordered" | "shadowed">>>;
31
+ config: import("@angular/core").Signal<MetricCardMetadata & Required<Pick<MetricCardMetadata, "borderRadius" | "bordered" | "shadowed" | "padding">>>;
32
32
  static ɵfac: i0.ɵɵFactoryDeclaration<MetricCardComponent, never>;
33
33
  static ɵcmp: i0.ɵɵComponentDeclaration<MetricCardComponent, "val-metric-card", never, { "props": { "alias": "props"; "required": false; "isSignal": true; }; }, { "onAction": "onAction"; }, never, never, true, never>;
34
34
  }
@@ -0,0 +1,19 @@
1
+ import { I18nService } from '../../../services/i18n';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * val-typing-indicator
5
+ *
6
+ * Muestra quienes estan escribiendo en el chat con animacion de tres puntos.
7
+ * Se oculta automaticamente si typingUsers esta vacio.
8
+ *
9
+ * @example
10
+ * <val-typing-indicator [typingUsers]="['Maria', 'Carlos']" />
11
+ */
12
+ export declare class TypingIndicatorComponent {
13
+ protected i18n: I18nService;
14
+ typingUsers: string[];
15
+ constructor();
16
+ protected typingText: import("@angular/core").Signal<string>;
17
+ 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
+ }
@@ -45,7 +45,7 @@ export declare class ArticleComponent implements OnInit {
45
45
  getVideoElement(element: ArticleElement): ArticleVideoElement;
46
46
  getCustomElement(element: ArticleElement): ArticleCustomElement;
47
47
  getQuoteTextProps(element: ArticleElement): {
48
- size: "medium" | "small" | "large" | "xlarge";
48
+ size: "small" | "medium" | "large" | "xlarge";
49
49
  color: import("@ionic/core").Color;
50
50
  content?: string;
51
51
  bold: boolean;
@@ -57,11 +57,11 @@ export declare class ArticleComponent implements OnInit {
57
57
  linkConfig?: import("valtech-components").LinkProcessorConfig;
58
58
  allowPartialBold?: boolean;
59
59
  authorColor?: import("@ionic/core").Color;
60
- alignment?: "right" | "center" | "left";
60
+ alignment?: "left" | "center" | "right";
61
61
  showQuoteMark?: boolean;
62
62
  };
63
63
  getHighlightTextProps(element: ArticleElement): {
64
- size: "medium" | "small" | "large" | "xlarge";
64
+ size: "small" | "medium" | "large" | "xlarge";
65
65
  color: import("@ionic/core").Color;
66
66
  content?: string;
67
67
  bold: boolean;
@@ -78,7 +78,7 @@ export declare class ArticleComponent implements OnInit {
78
78
  actionType?: import("valtech-components").ActionType; /**
79
79
  * Obtiene los estilos de padding para el contenedor article
80
80
  */
81
- expand?: "block" | "full";
81
+ expand?: "full" | "block";
82
82
  link?: string;
83
83
  href?: string;
84
84
  routerLink?: string | any[];
@@ -93,9 +93,9 @@ export declare class ArticleComponent implements OnInit {
93
93
  contentInterpolation?: Record<string, string | number>;
94
94
  icon?: import("valtech-components").IconMetada;
95
95
  shape?: "round";
96
- size?: "default" | "small" | "large";
97
- fill?: "solid" | "clear" | "outline" | "default";
98
- type: "button" | "submit" | "reset";
96
+ size?: "small" | "default" | "large";
97
+ fill?: "default" | "clear" | "outline" | "solid";
98
+ type: "reset" | "submit" | "button";
99
99
  token?: string;
100
100
  ref?: any;
101
101
  handler?: (value: any) => any;
@@ -35,7 +35,7 @@ export declare class AuthCtaComponent {
35
35
  onRegister: EventEmitter<void>;
36
36
  constructor();
37
37
  /** Merged configuration with defaults */
38
- config: import("@angular/core").Signal<AuthCtaMetadata & Required<Pick<AuthCtaMetadata, "padding" | "borderRadius" | "align">>>;
38
+ config: import("@angular/core").Signal<AuthCtaMetadata & Required<Pick<AuthCtaMetadata, "borderRadius" | "align" | "padding">>>;
39
39
  loginLabel: import("@angular/core").Signal<string>;
40
40
  registerLabel: import("@angular/core").Signal<string>;
41
41
  topLogoProps: import("@angular/core").Signal<{
@@ -0,0 +1,63 @@
1
+ import { EventEmitter, OnChanges, SimpleChanges, AfterViewChecked } from '@angular/core';
2
+ import { I18nService } from '../../../services/i18n';
3
+ import { MessageBubbleMetadata, MessageReactionClickEvent } from '../../molecules/message-bubble/types';
4
+ import * as i0 from "@angular/core";
5
+ /** Estructura interna para agrupar mensajes por fecha. */
6
+ interface MessageGroup {
7
+ dateLabel: string;
8
+ messages: MessageBubbleMetadata[];
9
+ }
10
+ /**
11
+ * val-chat-window
12
+ *
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.
17
+ *
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
+ */
29
+ export declare class ChatWindowComponent implements OnChanges, AfterViewChecked {
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<{
41
+ msgId: string;
42
+ token: string;
43
+ }>;
44
+ deleteMessage: EventEmitter<string>;
45
+ replyTo: EventEmitter<string>;
46
+ private messagesListRef?;
47
+ private prevMessageCount;
48
+ private shouldScrollToBottom;
49
+ constructor();
50
+ ngOnChanges(changes: SimpleChanges): void;
51
+ ngAfterViewChecked(): void;
52
+ protected messageGroups: import("@angular/core").Signal<MessageGroup[]>;
53
+ protected closedText: import("@angular/core").Signal<string>;
54
+ protected loadingText: import("@angular/core").Signal<string>;
55
+ protected onReactionClick(event: MessageReactionClickEvent): void;
56
+ protected onEditClick(_msgId: string): void;
57
+ protected onTyping(): void;
58
+ private scrollToBottom;
59
+ private formatDateLabel;
60
+ static ɵfac: i0.ɵɵFactoryDeclaration<ChatWindowComponent, never>;
61
+ 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>;
62
+ }
63
+ export {};
@@ -0,0 +1,36 @@
1
+ import { MessageBubbleMetadata } from '../../molecules/message-bubble/types';
2
+ /**
3
+ * Configuracion del componente de ventana de chat.
4
+ */
5
+ export interface ChatWindowMetadata {
6
+ /** ID de la conversacion. */
7
+ convId: string;
8
+ /** Lista de mensajes a mostrar. */
9
+ messages?: MessageBubbleMetadata[];
10
+ /** IDs o nombres de participantes. */
11
+ participants?: string[];
12
+ /** ID del usuario actual (para marcar mensajes propios). */
13
+ currentUserId?: string;
14
+ /** Si la conversacion esta abierta para enviar mensajes. */
15
+ isOpen?: boolean;
16
+ /** Usuarios que estan escribiendo en este momento. */
17
+ typingUsers?: string[];
18
+ /** Si esta cargando mensajes. */
19
+ isLoading?: boolean;
20
+ }
21
+ /**
22
+ * Evento emitido al enviar un mensaje desde la ventana de chat.
23
+ */
24
+ export interface ChatWindowSendEvent {
25
+ /** Cuerpo del mensaje. */
26
+ body: string;
27
+ }
28
+ /**
29
+ * Evento emitido al hacer clic en una reaccion de un mensaje.
30
+ */
31
+ export interface ChatWindowReactionEvent {
32
+ /** ID del mensaje. */
33
+ msgId: string;
34
+ /** Token de la reaccion. */
35
+ token: string;
36
+ }
@@ -4,7 +4,7 @@ export declare class LandingStepsComponent {
4
4
  private readonly props_;
5
5
  set props(v: LandingStepsMetadata);
6
6
  readonly p: import("@angular/core").Signal<LandingStepsMetadata>;
7
- readonly cols: import("@angular/core").Signal<3 | 2 | 4>;
7
+ readonly cols: import("@angular/core").Signal<2 | 3 | 4>;
8
8
  readonly accentColor: import("@angular/core").Signal<string>;
9
9
  static ɵfac: i0.ɵɵFactoryDeclaration<LandingStepsComponent, never>;
10
10
  static ɵcmp: i0.ɵɵComponentDeclaration<LandingStepsComponent, "val-landing-steps", never, { "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
@@ -0,0 +1,55 @@
1
+ import { OnInit, OnDestroy } from '@angular/core';
2
+ import { I18nService } from '../../../services/i18n';
3
+ import { Conversation, Message } from '../../../services/chat/types';
4
+ import { MessageBubbleMetadata } from '../../molecules/message-bubble/types';
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * val-thread-panel
8
+ *
9
+ * Panel de hilo de conversacion asociado a una entidad (post, request, etc.).
10
+ * Internamente usa ConversationService.getOrCreateForEntity() para inicializar
11
+ * la conversacion y luego watchMessages() para escuchar en tiempo real.
12
+ * Renderiza val-chat-window con los mensajes ya mapeados.
13
+ *
14
+ * Requiere provideValtechChat() y provideValtechFirebase() en main.ts.
15
+ *
16
+ * @example
17
+ * <val-thread-panel
18
+ * entityType="post"
19
+ * entityId="post-abc123"
20
+ * currentUserId="user-xyz"
21
+ * title="Comentarios"
22
+ * />
23
+ */
24
+ export declare class ThreadPanelComponent implements OnInit, OnDestroy {
25
+ protected i18n: I18nService;
26
+ private conversationSvc;
27
+ private chatConfig;
28
+ private auth;
29
+ entityType: string;
30
+ entityId: string;
31
+ currentUserId: string;
32
+ title?: string;
33
+ protected loading: import("@angular/core").WritableSignal<boolean>;
34
+ protected conv: import("@angular/core").WritableSignal<Conversation>;
35
+ protected messages: import("@angular/core").WritableSignal<Message[]>;
36
+ protected typingUsers: import("@angular/core").WritableSignal<string[]>;
37
+ private msgSub?;
38
+ private typingSub?;
39
+ constructor();
40
+ ngOnInit(): Promise<void>;
41
+ ngOnDestroy(): void;
42
+ protected isConvOpen: import("@angular/core").Signal<boolean>;
43
+ protected loadingText: import("@angular/core").Signal<string>;
44
+ protected bubbleMessages: import("@angular/core").Signal<MessageBubbleMetadata[]>;
45
+ protected onSend(body: string): void;
46
+ protected onReactionClick(event: {
47
+ msgId: string;
48
+ token: string;
49
+ }): void;
50
+ protected onDeleteMessage(msgId: string): void;
51
+ protected onReplyTo(_msgId: string): void;
52
+ private getOrgId;
53
+ static ɵfac: i0.ɵɵFactoryDeclaration<ThreadPanelComponent, never>;
54
+ static ɵcmp: i0.ɵɵComponentDeclaration<ThreadPanelComponent, "val-thread-panel", never, { "entityType": { "alias": "entityType"; "required": false; }; "entityId": { "alias": "entityId"; "required": false; }; "currentUserId": { "alias": "currentUserId"; "required": false; }; "title": { "alias": "title"; "required": false; }; }, {}, never, never, true, never>;
55
+ }
@@ -0,0 +1,37 @@
1
+ import { EnvironmentProviders, InjectionToken } from '@angular/core';
2
+ /**
3
+ * Configuracion del servicio de Chat.
4
+ */
5
+ export interface ValtechChatConfig {
6
+ /** URL base de la API del backend (ej: 'https://api.myvaltech.com'). */
7
+ apiUrl: string;
8
+ /** ID de la aplicacion (ej: 'showcase'). */
9
+ appId: string;
10
+ /** Prefijo del endpoint de chat (default: '/v2/chat'). */
11
+ chatPrefix?: string;
12
+ }
13
+ /**
14
+ * Token de inyeccion para la configuracion del Chat.
15
+ */
16
+ export declare const VALTECH_CHAT_CONFIG: InjectionToken<ValtechChatConfig>;
17
+ /**
18
+ * Configuracion por defecto del Chat.
19
+ */
20
+ export declare const DEFAULT_CHAT_CONFIG: Partial<ValtechChatConfig>;
21
+ /**
22
+ * Provee el servicio de Chat a la aplicacion Angular.
23
+ *
24
+ * @example
25
+ * // main.ts
26
+ * import { provideValtechChat } from 'valtech-components';
27
+ *
28
+ * bootstrapApplication(AppComponent, {
29
+ * providers: [
30
+ * provideValtechChat({
31
+ * apiUrl: environment.apiUrl,
32
+ * appId: 'showcase',
33
+ * }),
34
+ * ],
35
+ * });
36
+ */
37
+ export declare function provideValtechChat(config: ValtechChatConfig): EnvironmentProviders;