valtech-components 4.0.219 → 4.0.220
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 +157 -0
- package/esm2022/lib/components/molecules/chat-input/types.mjs +2 -0
- package/esm2022/lib/components/molecules/message-bubble/message-bubble.component.mjs +244 -0
- package/esm2022/lib/components/molecules/message-bubble/types.mjs +2 -0
- package/esm2022/lib/components/molecules/typing-indicator/typing-indicator.component.mjs +76 -0
- package/esm2022/lib/components/organisms/chat-window/chat-window.component.mjs +246 -0
- package/esm2022/lib/components/organisms/chat-window/types.mjs +2 -0
- package/esm2022/lib/components/organisms/thread-panel/thread-panel.component.mjs +211 -0
- package/esm2022/lib/services/chat/config.mjs +35 -0
- package/esm2022/lib/services/chat/conversation.service.mjs +274 -0
- package/esm2022/lib/services/chat/types.mjs +10 -0
- package/esm2022/lib/services/entity-feed/entity-feed.service.mjs +103 -0
- package/esm2022/lib/services/entity-feed/index.mjs +2 -0
- package/esm2022/lib/services/entity-feed/types.mjs +2 -0
- package/esm2022/lib/services/i18n/default-content.mjs +65 -1
- package/esm2022/public-api.mjs +16 -1
- package/fesm2022/valtech-components.mjs +1369 -2
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/atoms/glow/glow.component.d.ts +1 -1
- package/lib/components/atoms/rights-footer/rights-footer.component.d.ts +2 -2
- package/lib/components/atoms/text/text.component.d.ts +1 -1
- package/lib/components/atoms/user-avatar/user-avatar.component.d.ts +2 -2
- package/lib/components/molecules/article-card/article-card.component.d.ts +1 -1
- package/lib/components/molecules/chat-input/chat-input.component.d.ts +38 -0
- package/lib/components/molecules/chat-input/types.d.ts +20 -0
- package/lib/components/molecules/content-reaction/content-reaction.component.d.ts +2 -2
- package/lib/components/molecules/cta-card/cta-card.component.d.ts +1 -1
- package/lib/components/molecules/features-list/features-list.component.d.ts +4 -4
- package/lib/components/molecules/load-more/load-more.component.d.ts +1 -1
- package/lib/components/molecules/media-object/media-object.component.d.ts +1 -1
- package/lib/components/molecules/message-bubble/message-bubble.component.d.ts +40 -0
- package/lib/components/molecules/message-bubble/types.d.ts +64 -0
- package/lib/components/molecules/metric-card/metric-card.component.d.ts +1 -1
- package/lib/components/molecules/typing-indicator/typing-indicator.component.d.ts +19 -0
- package/lib/components/organisms/account-view/account-view.component.d.ts +1 -1
- package/lib/components/organisms/article/article.component.d.ts +6 -6
- package/lib/components/organisms/auth-cta/auth-cta.component.d.ts +1 -1
- package/lib/components/organisms/bottom-nav/bottom-nav.component.d.ts +1 -1
- package/lib/components/organisms/chat-window/chat-window.component.d.ts +63 -0
- package/lib/components/organisms/chat-window/types.d.ts +36 -0
- package/lib/components/organisms/landing-steps/landing-steps.component.d.ts +1 -1
- package/lib/components/organisms/login/login.component.d.ts +1 -1
- package/lib/components/organisms/member-import-modal/member-import-modal.component.d.ts +1 -1
- package/lib/components/organisms/notification-preferences-view/notification-preferences-view.component.d.ts +1 -1
- package/lib/components/organisms/organization-view/organization-view.component.d.ts +1 -1
- package/lib/components/organisms/thread-panel/thread-panel.component.d.ts +55 -0
- package/lib/components/templates/page-wrapper/page-wrapper.component.d.ts +2 -2
- package/lib/services/chat/config.d.ts +37 -0
- package/lib/services/chat/conversation.service.d.ts +147 -0
- package/lib/services/chat/types.d.ts +145 -0
- package/lib/services/entity-feed/entity-feed.service.d.ts +71 -0
- package/lib/services/entity-feed/index.d.ts +2 -0
- package/lib/services/entity-feed/types.d.ts +26 -0
- package/package.json +1 -1
- package/public-api.d.ts +13 -0
|
@@ -30,7 +30,7 @@ export declare class GlowComponent {
|
|
|
30
30
|
protected intensity: import("@angular/core").Signal<GlowIntensity>;
|
|
31
31
|
protected shape: import("@angular/core").Signal<GlowShape>;
|
|
32
32
|
protected animated: import("@angular/core").Signal<boolean>;
|
|
33
|
-
protected blendMode: import("@angular/core").Signal<"
|
|
33
|
+
protected blendMode: import("@angular/core").Signal<"overlay" | "normal" | "multiply" | "screen" | "soft-light" | "hard-light" | "color-dodge">;
|
|
34
34
|
protected colorRgbVar: import("@angular/core").Signal<string>;
|
|
35
35
|
protected secondaryColorRgbVar: import("@angular/core").Signal<string>;
|
|
36
36
|
protected positionCss: import("@angular/core").Signal<string>;
|
|
@@ -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<"
|
|
42
|
+
propsAlign: import("@angular/core").Signal<"center" | "left" | "right">;
|
|
43
43
|
/**
|
|
44
44
|
* Computed helper for color prop in template.
|
|
45
45
|
*/
|
|
46
|
-
propsColor: import("@angular/core").Signal<"
|
|
46
|
+
propsColor: import("@angular/core").Signal<"success" | "warning" | "primary" | "secondary" | "tertiary" | "danger" | "light" | "medium" | "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<"
|
|
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,8 +38,8 @@ 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<"
|
|
42
|
-
readonly shapeClass: import("@angular/core").Signal<"
|
|
41
|
+
readonly sizeClass: import("@angular/core").Signal<"small" | "medium" | "large" | "xlarge" | "xsmall">;
|
|
42
|
+
readonly shapeClass: import("@angular/core").Signal<"square" | "circle">;
|
|
43
43
|
/** Background — explicito o derivado deterministicamente del user. */
|
|
44
44
|
readonly bgColor: import("@angular/core").Signal<string>;
|
|
45
45
|
readonly ariaLabel: import("@angular/core").Signal<string>;
|
|
@@ -32,7 +32,7 @@ export declare class ArticleCardComponent {
|
|
|
32
32
|
/** Emitted when the card is clicked */
|
|
33
33
|
onClick: EventEmitter<ArticleCardClickEvent>;
|
|
34
34
|
/** Merged configuration with defaults */
|
|
35
|
-
config: import("@angular/core").Signal<ArticleCardMetadata & Required<Pick<ArticleCardMetadata, "
|
|
35
|
+
config: import("@angular/core").Signal<ArticleCardMetadata & Required<Pick<ArticleCardMetadata, "bordered" | "shadowed" | "aspectRatio" | "excerptLines">>>;
|
|
36
36
|
isClickable: import("@angular/core").Signal<boolean>;
|
|
37
37
|
getTopicColor(): string | null;
|
|
38
38
|
handleClick(event: MouseEvent): void;
|
|
@@ -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
|
+
}
|
|
@@ -43,8 +43,8 @@ export declare class ContentReactionComponent implements OnInit, OnChanges {
|
|
|
43
43
|
commentOnValues: ReactionValue[];
|
|
44
44
|
commentPlaceholder: string;
|
|
45
45
|
maxCommentLength: number;
|
|
46
|
-
emojis: [string, string] | [string, string
|
|
47
|
-
emojiLabels: [string, string] | [string, string
|
|
46
|
+
emojis: [string, string, string] | [string, string];
|
|
47
|
+
emojiLabels: [string, string, string] | [string, string];
|
|
48
48
|
showThankYou: boolean;
|
|
49
49
|
thankYouMessage: string;
|
|
50
50
|
disabled: boolean;
|
|
@@ -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, "
|
|
38
|
+
config: import("@angular/core").Signal<CtaCardMetadata & Required<Pick<CtaCardMetadata, "align" | "borderRadius" | "padding" | "bordered" | "shadowed">>>;
|
|
39
39
|
getBackground(): string;
|
|
40
40
|
getColor(): string | null;
|
|
41
41
|
static ɵfac: i0.ɵɵFactoryDeclaration<CtaCardComponent, never>;
|
|
@@ -40,10 +40,10 @@ export declare class FeaturesListComponent {
|
|
|
40
40
|
i18nNamespace?: string;
|
|
41
41
|
iconColor: string;
|
|
42
42
|
iconSize: number;
|
|
43
|
-
mode: "
|
|
44
|
-
gap: "
|
|
45
|
-
alignment: "
|
|
46
|
-
imageShape: "
|
|
43
|
+
mode: "vertical" | "horizontal";
|
|
44
|
+
gap: "small" | "medium" | "large";
|
|
45
|
+
alignment: "start" | "center";
|
|
46
|
+
imageShape: "square" | "circle";
|
|
47
47
|
maxVisible: number;
|
|
48
48
|
showMoreLabel?: string;
|
|
49
49
|
showLessLabel?: string;
|
|
@@ -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<"
|
|
29
|
+
readonly size: import("@angular/core").Signal<"small" | "large" | "default">;
|
|
30
30
|
readonly threshold: import("@angular/core").Signal<string>;
|
|
31
31
|
readonly label: import("@angular/core").Signal<string>;
|
|
32
32
|
private readonly _pendingComplete;
|
|
@@ -30,7 +30,7 @@ export declare class MediaObjectComponent {
|
|
|
30
30
|
/** Emitted when the inline link is clicked */
|
|
31
31
|
onLinkClick: EventEmitter<string>;
|
|
32
32
|
/** Merged configuration with defaults */
|
|
33
|
-
config: import("@angular/core").Signal<MediaObjectMetadata & Required<Pick<MediaObjectMetadata, "rounded" | "
|
|
33
|
+
config: import("@angular/core").Signal<MediaObjectMetadata & Required<Pick<MediaObjectMetadata, "rounded" | "align" | "circle" | "mediaWidth" | "reversed">>>;
|
|
34
34
|
getColor(): string;
|
|
35
35
|
handleLinkClick(event: MouseEvent): void;
|
|
36
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<MediaObjectComponent, never>;
|
|
@@ -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, "
|
|
31
|
+
config: import("@angular/core").Signal<MetricCardMetadata & Required<Pick<MetricCardMetadata, "borderRadius" | "padding" | "bordered" | "shadowed">>>;
|
|
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
|
+
}
|
|
@@ -34,7 +34,7 @@ export declare class AccountViewComponent {
|
|
|
34
34
|
* mergea con los defaults — `@Input` gana sobre route data.
|
|
35
35
|
*/
|
|
36
36
|
config?: AccountViewConfig;
|
|
37
|
-
readonly resolvedConfig: import("@angular/core").Signal<Required<Omit<AccountViewConfig, "
|
|
37
|
+
readonly resolvedConfig: import("@angular/core").Signal<Required<Omit<AccountViewConfig, "onOrgCreated" | "onOrgSwitched" | "onLoggedOut" | "onAccountDeleted">> & Pick<AccountViewConfig, "onOrgCreated" | "onOrgSwitched" | "onLoggedOut" | "onAccountDeleted">>;
|
|
38
38
|
/** Namespace i18n resuelto (capturado para llamadas no-reactivas). */
|
|
39
39
|
private get ns();
|
|
40
40
|
readonly createOrgOpen: import("@angular/core").WritableSignal<boolean>;
|
|
@@ -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: "
|
|
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?: "
|
|
60
|
+
alignment?: "center" | "left" | "right";
|
|
61
61
|
showQuoteMark?: boolean;
|
|
62
62
|
};
|
|
63
63
|
getHighlightTextProps(element: ArticleElement): {
|
|
64
|
-
size: "
|
|
64
|
+
size: "small" | "medium" | "large" | "xlarge";
|
|
65
65
|
color: import("@ionic/core").Color;
|
|
66
66
|
content?: string;
|
|
67
67
|
bold: boolean;
|
|
@@ -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?: "
|
|
97
|
-
fill?: "
|
|
98
|
-
type: "
|
|
96
|
+
size?: "small" | "large" | "default";
|
|
97
|
+
fill?: "clear" | "solid" | "outline" | "default";
|
|
98
|
+
type: "submit" | "button" | "reset";
|
|
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, "
|
|
38
|
+
config: import("@angular/core").Signal<AuthCtaMetadata & Required<Pick<AuthCtaMetadata, "align" | "borderRadius" | "padding">>>;
|
|
39
39
|
loginLabel: import("@angular/core").Signal<string>;
|
|
40
40
|
registerLabel: import("@angular/core").Signal<string>;
|
|
41
41
|
topLogoProps: import("@angular/core").Signal<{
|
|
@@ -63,7 +63,7 @@ export declare class BottomNavComponent implements OnInit, OnDestroy {
|
|
|
63
63
|
i18nNamespace?: string;
|
|
64
64
|
hideLabels: boolean;
|
|
65
65
|
safeArea: boolean;
|
|
66
|
-
animation: "
|
|
66
|
+
animation: "fade" | "scale" | "slide" | "none";
|
|
67
67
|
maxWidth: string;
|
|
68
68
|
}>;
|
|
69
69
|
/** Computed tabs with FAB inserted if present */
|
|
@@ -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<
|
|
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>;
|
|
@@ -48,7 +48,7 @@ export declare class LoginComponent implements OnInit, OnDestroy {
|
|
|
48
48
|
private _mfaVerifyFormState;
|
|
49
49
|
private _mfaMethod;
|
|
50
50
|
/** Método MFA pendiente — expuesto al template para gatear el link de backup (solo TOTP). */
|
|
51
|
-
readonly mfaMethod: import("@angular/core").Signal<"
|
|
51
|
+
readonly mfaMethod: import("@angular/core").Signal<"SMS" | "TOTP" | "EMAIL">;
|
|
52
52
|
/** A: el user togglea a "código de respaldo" (8 chars alfanuméricos) cuando perdió el 2º factor. */
|
|
53
53
|
readonly mfaUseBackupCode: import("@angular/core").WritableSignal<boolean>;
|
|
54
54
|
isMFAResetModalOpen: boolean;
|
|
@@ -28,7 +28,7 @@ export declare class MemberImportModalComponent implements OnInit {
|
|
|
28
28
|
/** Namespace i18n. */
|
|
29
29
|
i18nNamespace: string;
|
|
30
30
|
csv: string;
|
|
31
|
-
readonly importMode: import("@angular/core").WritableSignal<"
|
|
31
|
+
readonly importMode: import("@angular/core").WritableSignal<"file" | "paste">;
|
|
32
32
|
readonly onConflictControl: FormControl<string>;
|
|
33
33
|
readonly sendActivationControl: FormControl<boolean>;
|
|
34
34
|
readonly conflictSelectProps: import("@angular/core").Signal<Partial<InputMetadata>>;
|
|
@@ -90,7 +90,7 @@ export declare class NotificationPreferencesViewComponent implements OnInit, OnD
|
|
|
90
90
|
readonly busyLabel: import("@angular/core").Signal<string>;
|
|
91
91
|
readonly contextMessage: import("@angular/core").Signal<string>;
|
|
92
92
|
readonly alertVariant: import("@angular/core").Signal<"warning" | "danger" | "info">;
|
|
93
|
-
readonly alertIcon: import("@angular/core").Signal<"
|
|
93
|
+
readonly alertIcon: import("@angular/core").Signal<"close-circle-outline" | "alert-circle-outline">;
|
|
94
94
|
readonly toggleProps: import("@angular/core").Signal<ToggleInputMetadata>;
|
|
95
95
|
readonly retryButtonProps: import("@angular/core").Signal<Partial<ButtonMetadata>>;
|
|
96
96
|
readonly tokenPreview: import("@angular/core").Signal<string>;
|
|
@@ -53,7 +53,7 @@ export declare class OrganizationViewComponent {
|
|
|
53
53
|
* `resolvedConfig` mergea con los defaults — `@Input` gana sobre route data.
|
|
54
54
|
*/
|
|
55
55
|
config?: OrganizationViewConfig;
|
|
56
|
-
readonly resolvedConfig: import("@angular/core").Signal<Required<Omit<OrganizationViewConfig, "
|
|
56
|
+
readonly resolvedConfig: import("@angular/core").Signal<Required<Omit<OrganizationViewConfig, "onOrgEdited" | "onMemberInvited" | "onOwnershipTransferred" | "onLeftOrg" | "onOrgDeleted" | "onOrgCreated">> & Pick<OrganizationViewConfig, "onOrgEdited" | "onMemberInvited" | "onOwnershipTransferred" | "onLeftOrg" | "onOrgDeleted" | "onOrgCreated">>;
|
|
57
57
|
/** Namespace i18n resuelto (capturado para llamadas no-reactivas). */
|
|
58
58
|
private get ns();
|
|
59
59
|
readonly org: import("@angular/core").WritableSignal<Organization>;
|
|
@@ -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
|
+
}
|
|
@@ -50,7 +50,7 @@ export declare class PageWrapperComponent implements ViewWillEnter, ViewWillLeav
|
|
|
50
50
|
* Default header configuration (cached to avoid infinite change detection).
|
|
51
51
|
*/
|
|
52
52
|
private readonly defaultHeader;
|
|
53
|
-
headerProps: import("@angular/core").Signal<
|
|
53
|
+
headerProps: import("@angular/core").Signal<{
|
|
54
54
|
bordered: boolean;
|
|
55
55
|
translucent: boolean;
|
|
56
56
|
toolbar: {
|
|
@@ -77,7 +77,7 @@ export declare class PageWrapperComponent implements ViewWillEnter, ViewWillLeav
|
|
|
77
77
|
};
|
|
78
78
|
}[];
|
|
79
79
|
};
|
|
80
|
-
}>;
|
|
80
|
+
} | import("valtech-components").HeaderMetadata>;
|
|
81
81
|
contentId: import("@angular/core").Signal<string>;
|
|
82
82
|
propsFooter: import("@angular/core").Signal<import("valtech-components").CompanyFooterMetadata>;
|
|
83
83
|
contentMaxWidth: import("@angular/core").Signal<ContainerSize>;
|