valtech-components 4.0.241 → 4.0.243
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 +147 -57
- package/esm2022/lib/components/molecules/message-bubble/message-bubble.component.mjs +42 -7
- package/esm2022/lib/components/organisms/media-viewer-modal/media-viewer-modal.component.mjs +112 -0
- package/esm2022/lib/version.mjs +2 -2
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/valtech-components.mjs +291 -64
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/molecules/chat-composer/chat-composer.component.d.ts +8 -0
- package/lib/components/molecules/message-bubble/message-bubble.component.d.ts +12 -0
- package/lib/components/organisms/media-viewer-modal/media-viewer-modal.component.d.ts +22 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -27,6 +27,7 @@ export interface ChatComposerSendEvent {
|
|
|
27
27
|
*/
|
|
28
28
|
export declare class ChatComposerComponent implements OnDestroy {
|
|
29
29
|
private i18n;
|
|
30
|
+
private modal;
|
|
30
31
|
readonly placeholder: import("@angular/core").InputSignal<string>;
|
|
31
32
|
readonly disabled: import("@angular/core").InputSignal<boolean>;
|
|
32
33
|
readonly maxLength: import("@angular/core").InputSignal<number>;
|
|
@@ -62,6 +63,8 @@ export declare class ChatComposerComponent implements OnDestroy {
|
|
|
62
63
|
protected onFile(event: Event): void;
|
|
63
64
|
private addPending;
|
|
64
65
|
protected removePending(id: number): void;
|
|
66
|
+
/** Abre el adjunto staged en el visor de medios (imagen full / descarga). */
|
|
67
|
+
protected viewAttachment(att: PendingAttachment): void;
|
|
65
68
|
private emitTypingDebounced;
|
|
66
69
|
private pickAudioMime;
|
|
67
70
|
protected startRecording(): Promise<void>;
|
|
@@ -69,6 +72,11 @@ export declare class ChatComposerComponent implements OnDestroy {
|
|
|
69
72
|
protected finishRecording(): void;
|
|
70
73
|
protected cancelRecording(): void;
|
|
71
74
|
private cleanupRecording;
|
|
75
|
+
/** Diagnóstico: el navegador no pudo reproducir el adjunto de audio. */
|
|
76
|
+
protected onAudioError(where: string, file: File, event: Event): void;
|
|
77
|
+
protected onAudioLoaded(where: string, file: File, event: Event): void;
|
|
78
|
+
/** ¿El navegador declara que puede reproducir este tipo? '' / 'maybe' / 'probably'. */
|
|
79
|
+
private canPlay;
|
|
72
80
|
ngOnDestroy(): void;
|
|
73
81
|
t(key: string): string;
|
|
74
82
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChatComposerComponent, never>;
|
|
@@ -20,6 +20,7 @@ export interface MessageBubbleAction {
|
|
|
20
20
|
*/
|
|
21
21
|
export declare class MessageBubbleComponent {
|
|
22
22
|
private i18n;
|
|
23
|
+
private modal;
|
|
23
24
|
readonly msg: import("@angular/core").InputSignal<MessageBubbleMetadata>;
|
|
24
25
|
readonly showAvatar: import("@angular/core").InputSignal<boolean>;
|
|
25
26
|
readonly showName: import("@angular/core").InputSignal<boolean>;
|
|
@@ -36,6 +37,17 @@ export declare class MessageBubbleComponent {
|
|
|
36
37
|
protected readonly statusIcon: import("@angular/core").Signal<"time-outline" | "alert-circle" | "checkmark-done" | "checkmark">;
|
|
37
38
|
protected toggleActions(): void;
|
|
38
39
|
protected emit(type: MessageBubbleAction['type'], token?: string): void;
|
|
40
|
+
/** Abre la imagen adjunta en el visor de medios a pantalla completa. */
|
|
41
|
+
protected viewAttachment(att: {
|
|
42
|
+
url: string;
|
|
43
|
+
name?: string;
|
|
44
|
+
mimeType?: string;
|
|
45
|
+
}): void;
|
|
46
|
+
/** Diagnóstico: el navegador no pudo reproducir el audio recibido. */
|
|
47
|
+
protected onAudioError(att: {
|
|
48
|
+
url: string;
|
|
49
|
+
mimeType?: string;
|
|
50
|
+
}, event: Event): void;
|
|
39
51
|
t(key: string): string;
|
|
40
52
|
static ɵfac: i0.ɵɵFactoryDeclaration<MessageBubbleComponent, never>;
|
|
41
53
|
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>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* `val-media-viewer-modal` — visor de un adjunto a pantalla completa. Imagen →
|
|
4
|
+
* `<img>` contenido; audio → `<audio controls>`; otros → icono + descargar.
|
|
5
|
+
* Se abre con `ModalService.open({ component, componentProps: { url, mimeType, name } })`.
|
|
6
|
+
* Header canónico (Regla #5): botón Cerrar en `slot=end`.
|
|
7
|
+
*/
|
|
8
|
+
export declare class MediaViewerModalComponent {
|
|
9
|
+
private readonly i18n;
|
|
10
|
+
url: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
mimeType?: string;
|
|
13
|
+
_modalRef?: {
|
|
14
|
+
dismiss: (data?: unknown, role?: string) => void;
|
|
15
|
+
};
|
|
16
|
+
constructor();
|
|
17
|
+
protected kind(): 'image' | 'audio' | 'file';
|
|
18
|
+
t(key: string): string;
|
|
19
|
+
close(): void;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MediaViewerModalComponent, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MediaViewerModalComponent, "val-media-viewer-modal", never, { "url": { "alias": "url"; "required": false; }; "name": { "alias": "name"; "required": false; }; "mimeType": { "alias": "mimeType"; "required": false; }; "_modalRef": { "alias": "_modalRef"; "required": false; }; }, {}, never, never, true, never>;
|
|
22
|
+
}
|
package/lib/version.d.ts
CHANGED
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -214,6 +214,7 @@ export * from './lib/components/organisms/banner/types';
|
|
|
214
214
|
export * from './lib/components/organisms/change-password-modal/change-password-modal.component';
|
|
215
215
|
export * from './lib/components/organisms/change-email-modal/change-email-modal.component';
|
|
216
216
|
export * from './lib/components/organisms/html-viewer-modal/html-viewer-modal.component';
|
|
217
|
+
export * from './lib/components/organisms/media-viewer-modal/media-viewer-modal.component';
|
|
217
218
|
export * from './lib/components/organisms/share-profile-modal/share-profile-modal.component';
|
|
218
219
|
export * from './lib/components/organisms/share-profile-modal/types';
|
|
219
220
|
export * from './lib/components/organisms/fun-modal/fun-modal.component';
|