@chat-leo/chatleo 0.0.0-stage → 2.0.0
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/LICENSE +21 -0
- package/dist/chatleo/chatleo.esm.js +1 -0
- package/dist/chatleo/index.esm.js +1 -0
- package/dist/chatleo/p-43ada232.entry.js +1 -0
- package/dist/chatleo/p-4485e141.entry.js +1 -0
- package/dist/chatleo/p-BnCPdbII.js +1 -0
- package/dist/chatleo/p-C-l90Wre.js +1 -0
- package/dist/chatleo/p-DQuL1Twl.js +1 -0
- package/dist/chatleo/p-DmL518NK.js +3 -0
- package/dist/chatleo/p-aed60255.entry.js +1 -0
- package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
- package/dist/cjs/chatleo-avatar_13.cjs.entry.js +2986 -0
- package/dist/cjs/chatleo-call-adapter-B2OfC0VZ.js +35 -0
- package/dist/cjs/chatleo-chat-input.cjs.entry.js +67 -0
- package/dist/cjs/chatleo.cjs.js +25 -0
- package/dist/cjs/index-DkSDLR0y.js +56 -0
- package/dist/cjs/index-Dxw4YCA_.js +1741 -0
- package/dist/cjs/index.cjs.js +7 -0
- package/dist/cjs/loader.cjs.js +13 -0
- package/dist/cjs/my-component.cjs.entry.js +33 -0
- package/dist/collection/__mocks__/stencil-core.js +26 -0
- package/dist/collection/collection-manifest.json +27 -0
- package/dist/collection/components/chatleo-avatar/chatleo-avatar.css +40 -0
- package/dist/collection/components/chatleo-avatar/chatleo-avatar.js +116 -0
- package/dist/collection/components/chatleo-chat/chatleo-chat.css +108 -0
- package/dist/collection/components/chatleo-chat/chatleo-chat.js +459 -0
- package/dist/collection/components/chatleo-chat-header/chatleo-chat-header.css +22 -0
- package/dist/collection/components/chatleo-chat-header/chatleo-chat-header.js +105 -0
- package/dist/collection/components/chatleo-chat-input/chatleo-chat-input.css +84 -0
- package/dist/collection/components/chatleo-chat-input/chatleo-chat-input.js +141 -0
- package/dist/collection/components/chatleo-chat-message/chatleo-chat-message.css +149 -0
- package/dist/collection/components/chatleo-chat-message/chatleo-chat-message.js +259 -0
- package/dist/collection/components/chatleo-component/chatleo-component.css +271 -0
- package/dist/collection/components/chatleo-component/chatleo-component.js +1366 -0
- package/dist/collection/components/chatleo-new-message-selector/chatleo-new-message-selector.css +96 -0
- package/dist/collection/components/chatleo-new-message-selector/chatleo-new-message-selector.js +231 -0
- package/dist/collection/components/chatleo-rich-input/chatleo-rich-input.css +352 -0
- package/dist/collection/components/chatleo-rich-input/chatleo-rich-input.js +976 -0
- package/dist/collection/components/chatleo-rich-message-renderer/chatleo-rich-message-renderer.css +169 -0
- package/dist/collection/components/chatleo-rich-message-renderer/chatleo-rich-message-renderer.js +400 -0
- package/dist/collection/components/chatleo-room-list/chatleo-room-list.css +111 -0
- package/dist/collection/components/chatleo-room-list/chatleo-room-list.js +180 -0
- package/dist/collection/components/chatleo-room-tile-component/chatleo-room-tile-component.css +110 -0
- package/dist/collection/components/chatleo-room-tile-component/chatleo-room-tile-component.js +241 -0
- package/dist/collection/components/chatleo-room-view/chatleo-room-view.css +93 -0
- package/dist/collection/components/chatleo-room-view/chatleo-room-view.js +593 -0
- package/dist/collection/components/chatleo-tray-component/chatleo-tray-component.css +284 -0
- package/dist/collection/components/chatleo-tray-component/chatleo-tray-component.js +391 -0
- package/dist/collection/components/chatleo-user-tile/chatleo-user-tile.css +56 -0
- package/dist/collection/components/chatleo-user-tile/chatleo-user-tile.js +149 -0
- package/dist/collection/components/my-component/my-component.css +4 -0
- package/dist/collection/components/my-component/my-component.js +95 -0
- package/dist/collection/index.js +10 -0
- package/dist/collection/utils/call-entry.js +34 -0
- package/dist/collection/utils/delivery.js +7 -0
- package/dist/collection/utils/utils.js +51 -0
- package/dist/components/chatleo-avatar.d.ts +11 -0
- package/dist/components/chatleo-avatar.js +1 -0
- package/dist/components/chatleo-chat-header.d.ts +11 -0
- package/dist/components/chatleo-chat-header.js +1 -0
- package/dist/components/chatleo-chat-input.d.ts +11 -0
- package/dist/components/chatleo-chat-input.js +1 -0
- package/dist/components/chatleo-chat-message.d.ts +11 -0
- package/dist/components/chatleo-chat-message.js +1 -0
- package/dist/components/chatleo-chat.d.ts +11 -0
- package/dist/components/chatleo-chat.js +1 -0
- package/dist/components/chatleo-component.d.ts +11 -0
- package/dist/components/chatleo-component.js +1 -0
- package/dist/components/chatleo-new-message-selector.d.ts +11 -0
- package/dist/components/chatleo-new-message-selector.js +1 -0
- package/dist/components/chatleo-rich-input.d.ts +11 -0
- package/dist/components/chatleo-rich-input.js +1 -0
- package/dist/components/chatleo-rich-message-renderer.d.ts +11 -0
- package/dist/components/chatleo-rich-message-renderer.js +1 -0
- package/dist/components/chatleo-room-list.d.ts +11 -0
- package/dist/components/chatleo-room-list.js +1 -0
- package/dist/components/chatleo-room-tile-component.d.ts +11 -0
- package/dist/components/chatleo-room-tile-component.js +1 -0
- package/dist/components/chatleo-room-view.d.ts +11 -0
- package/dist/components/chatleo-room-view.js +1 -0
- package/dist/components/chatleo-tray-component.d.ts +11 -0
- package/dist/components/chatleo-tray-component.js +1 -0
- package/dist/components/chatleo-user-tile.d.ts +11 -0
- package/dist/components/chatleo-user-tile.js +1 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +1 -0
- package/dist/components/my-component.d.ts +11 -0
- package/dist/components/my-component.js +1 -0
- package/dist/components/p-8kvQ-Uh-.js +1 -0
- package/dist/components/p-B7cdqAgv.js +1 -0
- package/dist/components/p-BdiOcOYZ.js +1 -0
- package/dist/components/p-BlbDSb7D.js +1 -0
- package/dist/components/p-BnCPdbII.js +1 -0
- package/dist/components/p-C-v19aUJ.js +1 -0
- package/dist/components/p-C1mF0s8g.js +1 -0
- package/dist/components/p-CRtBdzP3.js +1 -0
- package/dist/components/p-CfayCm9O.js +1 -0
- package/dist/components/p-DGjAxoQy.js +1 -0
- package/dist/components/p-Exj_2-yI.js +1 -0
- package/dist/components/p-XlwGxsqT.js +1 -0
- package/dist/components/p-fjMaTJam.js +1 -0
- package/dist/components/p-xt4kzz3B.js +1 -0
- package/dist/esm/app-globals-DQuL1Twl.js +3 -0
- package/dist/esm/chatleo-avatar_13.entry.js +2972 -0
- package/dist/esm/chatleo-call-adapter-BnCPdbII.js +33 -0
- package/dist/esm/chatleo-chat-input.entry.js +65 -0
- package/dist/esm/chatleo.js +21 -0
- package/dist/esm/index-C-l90Wre.js +53 -0
- package/dist/esm/index-DmL518NK.js +1733 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/my-component.entry.js +31 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/__mocks__/stencil-core.d.ts +24 -0
- package/dist/types/components/chatleo-avatar/chatleo-avatar.d.ts +27 -0
- package/dist/types/components/chatleo-chat/chatleo-chat.d.ts +75 -0
- package/dist/types/components/chatleo-chat-header/chatleo-chat-header.d.ts +27 -0
- package/dist/types/components/chatleo-chat-input/chatleo-chat-input.d.ts +31 -0
- package/dist/types/components/chatleo-chat-message/chatleo-chat-message.d.ts +22 -0
- package/dist/types/components/chatleo-component/chatleo-component.d.ts +278 -0
- package/dist/types/components/chatleo-new-message-selector/chatleo-new-message-selector.d.ts +68 -0
- package/dist/types/components/chatleo-rich-input/chatleo-rich-input.d.ts +216 -0
- package/dist/types/components/chatleo-rich-message-renderer/chatleo-rich-message-renderer.d.ts +77 -0
- package/dist/types/components/chatleo-room-list/chatleo-room-list.d.ts +52 -0
- package/dist/types/components/chatleo-room-tile-component/chatleo-room-tile-component.d.ts +59 -0
- package/dist/types/components/chatleo-room-view/chatleo-room-view.d.ts +91 -0
- package/dist/types/components/chatleo-tray-component/chatleo-tray-component.d.ts +112 -0
- package/dist/types/components/chatleo-user-tile/chatleo-user-tile.d.ts +36 -0
- package/dist/types/components/my-component/my-component.d.ts +16 -0
- package/dist/types/components.d.ts +1593 -0
- package/dist/types/index.d.ts +12 -0
- package/dist/types/stencil-public-runtime.d.ts +1879 -0
- package/dist/types/utils/call-entry.d.ts +9 -0
- package/dist/types/utils/delivery.d.ts +7 -0
- package/dist/types/utils/utils.d.ts +24 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +70 -3
- package/readme.md +111 -0
- package/README.md +0 -3
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import type { RichInputContent, StructuredMessageContent } from '@chat-leo/chatleolib';
|
|
3
|
+
/**
|
|
4
|
+
* ChatleoRichInput
|
|
5
|
+
*
|
|
6
|
+
* A Stencil-based rich text input component that supports:
|
|
7
|
+
* - Free text entry in a contenteditable div
|
|
8
|
+
* - Drag-and-drop and file picker attachments (single or multiple)
|
|
9
|
+
* - Inline, non-editable attachment blocks with thumbnails for images
|
|
10
|
+
*
|
|
11
|
+
* Component produces two payload formats:
|
|
12
|
+
* - Legacy RichInputContent: { text: string, attachments: FileAttachment[] }
|
|
13
|
+
* - StructuredMessageContent: blocks[] + generated html for richer, future-proof messaging
|
|
14
|
+
*
|
|
15
|
+
* Core data flow:
|
|
16
|
+
* - User types or adds files → editor DOM updates
|
|
17
|
+
* - handleInput/handleFiles/drag handlers → emitContentChange/extractContent
|
|
18
|
+
* - Send via Enter key or send button → handleSendMessage
|
|
19
|
+
* - Builds both legacy and structured payloads via extractContent and extractStructuredContent
|
|
20
|
+
* - Emits messageSend (primary)
|
|
21
|
+
*/
|
|
22
|
+
export declare class ChatleoRichInput {
|
|
23
|
+
/**
|
|
24
|
+
* A reference to the root host element of the component, injected by Stencil's decorator.
|
|
25
|
+
*/
|
|
26
|
+
hostElement: HTMLElement;
|
|
27
|
+
/**
|
|
28
|
+
* If `true`, the editor and all associated buttons will be disabled, preventing user interaction.
|
|
29
|
+
*/
|
|
30
|
+
disabled: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* The placeholder text that appears in the editor when it is empty.
|
|
33
|
+
*/
|
|
34
|
+
placeholder: string;
|
|
35
|
+
/**
|
|
36
|
+
* A CSS string that defines the maximum height of the editor area before it starts scrolling.
|
|
37
|
+
*/
|
|
38
|
+
maxHeight: string;
|
|
39
|
+
/**
|
|
40
|
+
* A comma-separated string of MIME types or file extensions that the file input should accept. This is passed to the `accept` attribute of the hidden file input element.
|
|
41
|
+
*/
|
|
42
|
+
acceptFiles: string;
|
|
43
|
+
isDragOver: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* A state property that is `true` if the editor contains any text or attachments. It is used to enable or disable the send button.
|
|
46
|
+
*/
|
|
47
|
+
hasContent: boolean;
|
|
48
|
+
/** Fires whenever the legacy content snapshot changes (typing, attachments). */
|
|
49
|
+
contentChange: EventEmitter<RichInputContent>;
|
|
50
|
+
/** Primary event emitted on send with structured content blocks and generated HTML. */
|
|
51
|
+
messageSend: EventEmitter<StructuredMessageContent>;
|
|
52
|
+
/** Contenteditable editor element reference. */
|
|
53
|
+
private editorRef?;
|
|
54
|
+
/** Hidden file input element reference. */
|
|
55
|
+
private fileInputRef?;
|
|
56
|
+
/** Current plain text of the composer. */
|
|
57
|
+
getText(): Promise<string>;
|
|
58
|
+
/** Replaces the composer content with `text` (used to restore a draft after an update). */
|
|
59
|
+
setText(text: string): Promise<void>;
|
|
60
|
+
/** Adds files to the composer as attachment blocks (used by the share target). */
|
|
61
|
+
addFiles(files: File[]): Promise<void>;
|
|
62
|
+
/** Focuses the editor and puts the caret at the end. */
|
|
63
|
+
focusEditor(): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Generates a unique attachment id.
|
|
66
|
+
* Combines timestamp and a local counter to avoid collisions.
|
|
67
|
+
*/
|
|
68
|
+
private generateAttachmentId;
|
|
69
|
+
/**
|
|
70
|
+
* Returns true if the given File is an image (based on MIME type).
|
|
71
|
+
*/
|
|
72
|
+
private isImageFile;
|
|
73
|
+
/**
|
|
74
|
+
* Classifies a file as 'image' | 'document' | 'other' for UI and message blocks.
|
|
75
|
+
*/
|
|
76
|
+
/**
|
|
77
|
+
* Generates a small dataURL thumbnail for image files using Canvas.
|
|
78
|
+
* Steps:
|
|
79
|
+
* - Read as DataURL
|
|
80
|
+
* - Load into Image
|
|
81
|
+
* - Draw to canvas constrained to max size
|
|
82
|
+
* - Return JPEG dataURL or undefined if not image
|
|
83
|
+
*/
|
|
84
|
+
private generateThumbnail;
|
|
85
|
+
/**
|
|
86
|
+
* Central file intake handler.
|
|
87
|
+
* - Normalizes FileList into an array
|
|
88
|
+
* - Builds FileAttachment objects and generates image previews
|
|
89
|
+
* - Inserts attachments as a single "attachment-block" at the caret
|
|
90
|
+
* - Emits contentChange after DOM updates
|
|
91
|
+
*/
|
|
92
|
+
private handleFiles;
|
|
93
|
+
/**
|
|
94
|
+
* Get the current selection scoped to the editor (supports ShadowRoot selection where available).
|
|
95
|
+
* Returns null if the selection is not inside the editor.
|
|
96
|
+
*/
|
|
97
|
+
private getEditorSelection;
|
|
98
|
+
/**
|
|
99
|
+
* Place caret at the end of the editor.
|
|
100
|
+
*/
|
|
101
|
+
private placeCaretAtEnd;
|
|
102
|
+
/**
|
|
103
|
+
* Inserts a non-editable "attachment-block" element at the current caret.
|
|
104
|
+
* - Creates the block via createAttachmentBlock
|
|
105
|
+
* - Ensures a line break before/after and moves the caret after the block
|
|
106
|
+
* - Falls back to appending at the end when selection is unavailable or outside editor
|
|
107
|
+
*/
|
|
108
|
+
private insertAttachmentsAtCursor;
|
|
109
|
+
/**
|
|
110
|
+
* Builds the DOM for an attachment block containing one or more attachments.
|
|
111
|
+
* - Stores attachments on the element for later extraction (legacy and new)
|
|
112
|
+
* - Renders thumbnails for images and generic icons for others
|
|
113
|
+
* - Adds per-attachment remove buttons, delegating to removeAttachmentFromBlock
|
|
114
|
+
*/
|
|
115
|
+
private createAttachmentBlock;
|
|
116
|
+
/**
|
|
117
|
+
* Removes a single attachment from the given block.
|
|
118
|
+
* - If block becomes empty, removes the entire block
|
|
119
|
+
* - Otherwise rebuilds the block's DOM with remaining attachments
|
|
120
|
+
* - Maintains legacy single-attachment metadata for backward compatibility
|
|
121
|
+
* - Emits contentChange after updates
|
|
122
|
+
*/
|
|
123
|
+
private removeAttachmentFromBlock;
|
|
124
|
+
/**
|
|
125
|
+
* Removes the entire attachment block and adjacent trailing <br> if present.
|
|
126
|
+
* Emits contentChange afterward.
|
|
127
|
+
*/
|
|
128
|
+
private removeAttachmentBlock;
|
|
129
|
+
/**
|
|
130
|
+
* Editor input handler that emits a legacy content snapshot.
|
|
131
|
+
*/
|
|
132
|
+
private handleInput;
|
|
133
|
+
/**
|
|
134
|
+
* Extracts legacy content:
|
|
135
|
+
* - Walks the editor DOM collecting plain text and attachment data
|
|
136
|
+
* - Inserts textual placeholders around attachments to retain context
|
|
137
|
+
* - Returns trimmed text and a flat list of FileAttachment
|
|
138
|
+
*/
|
|
139
|
+
private extractContent;
|
|
140
|
+
/**
|
|
141
|
+
* Generates an HTML representation from structured blocks.
|
|
142
|
+
* - Escapes text content and preserves line breaks
|
|
143
|
+
* - Attachment blocks include data-* metadata for downstream consumers
|
|
144
|
+
*/
|
|
145
|
+
private generateHtmlContent;
|
|
146
|
+
/**
|
|
147
|
+
* Escapes user text for safe embedding into HTML.
|
|
148
|
+
*/
|
|
149
|
+
private escapeHtml;
|
|
150
|
+
/**
|
|
151
|
+
* Extracts the structured content model from the editor:
|
|
152
|
+
* - Iterates top-level children to preserve block boundaries
|
|
153
|
+
* - Aggregates contiguous text into TextBlock(s)
|
|
154
|
+
* - Converts each attachment DOM block to an AttachmentBlock
|
|
155
|
+
* - Produces parallel HTML via generateHtmlContent
|
|
156
|
+
* This is the source of the primary messageSend payload.
|
|
157
|
+
*/
|
|
158
|
+
private extractStructuredContent;
|
|
159
|
+
/**
|
|
160
|
+
* Returns true if the element is a block-level element where a visual line break is implied.
|
|
161
|
+
* Used by extractStructuredContent to preserve newlines across block boundaries.
|
|
162
|
+
*/
|
|
163
|
+
private isBlockElement;
|
|
164
|
+
/**
|
|
165
|
+
* Keyboard handler:
|
|
166
|
+
* - Enter sends the message
|
|
167
|
+
* - Shift+Enter inserts a newline (default behavior)
|
|
168
|
+
*/
|
|
169
|
+
private handleKeyDown;
|
|
170
|
+
/**
|
|
171
|
+
* Opens the hidden file input to pick files.
|
|
172
|
+
*/
|
|
173
|
+
private handleFileButtonClick;
|
|
174
|
+
/**
|
|
175
|
+
* Forwards files selected from the file input to handleFiles and resets the input.
|
|
176
|
+
*/
|
|
177
|
+
private handleFileInputChange;
|
|
178
|
+
/**
|
|
179
|
+
* Drag handlers to improve UX:
|
|
180
|
+
* - handleDragOver/handleDragLeave toggle a visual overlay
|
|
181
|
+
* - handleDrop moves the caret to the drop location and forwards files
|
|
182
|
+
*/
|
|
183
|
+
private handleDragOver;
|
|
184
|
+
private handleDragLeave;
|
|
185
|
+
/**
|
|
186
|
+
* Accepts dropped files:
|
|
187
|
+
* - Places caret at the drop point within the editor when possible
|
|
188
|
+
* - Delegates to handleFiles for processing and insertion
|
|
189
|
+
*/
|
|
190
|
+
private handleDrop;
|
|
191
|
+
/**
|
|
192
|
+
* Sends the current message:
|
|
193
|
+
* - Builds both legacy and structured payloads
|
|
194
|
+
* - Emits messageSend (structured)
|
|
195
|
+
* - Clears the editor if there was content
|
|
196
|
+
*/
|
|
197
|
+
private handleSendMessage;
|
|
198
|
+
/**
|
|
199
|
+
* Emits a contentChange event with the current legacy content snapshot.
|
|
200
|
+
* Also updates hasContent state to trigger re-render.
|
|
201
|
+
*/
|
|
202
|
+
private emitContentChange;
|
|
203
|
+
/**
|
|
204
|
+
* Formats a byte size into a human-readable string (Bytes, KB, MB, GB).
|
|
205
|
+
*/
|
|
206
|
+
private formatFileSize;
|
|
207
|
+
/**
|
|
208
|
+
* Renders the component:
|
|
209
|
+
* - Contenteditable editor with placeholder
|
|
210
|
+
* - File and send action buttons
|
|
211
|
+
* - Hidden file input
|
|
212
|
+
* - Drag-and-drop overlay
|
|
213
|
+
* The send button is disabled when there is no content or when disabled.
|
|
214
|
+
*/
|
|
215
|
+
render(): any;
|
|
216
|
+
}
|
package/dist/types/components/chatleo-rich-message-renderer/chatleo-rich-message-renderer.d.ts
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { StructuredMessageContent, AttachmentDownloadInfo } from '@chat-leo/chatleolib';
|
|
2
|
+
interface AttachmentLoadingState {
|
|
3
|
+
isLoading: boolean;
|
|
4
|
+
retryCount: number;
|
|
5
|
+
hasError: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* @component ChatleoRichMessageRenderer
|
|
9
|
+
* @description This component is responsible for rendering structured message content, which can include text and attachments. It takes a `StructuredMessageContent` object and renders it as a series of blocks.
|
|
10
|
+
* @property {StructuredMessageContent} content - The structured message content object to be rendered. This object contains an array of blocks, each of which can be a text or attachment block.
|
|
11
|
+
* @property {Record<string, AttachmentDownloadInfo>} downloadUrls - A map where keys are attachment IDs and values are objects containing download information for those attachments, such as the download URL.
|
|
12
|
+
* @property {'left' | 'right'} alignment - This property determines the text alignment of the message content. It can be either `'left'` or `'right'`.
|
|
13
|
+
*/
|
|
14
|
+
export declare class ChatleoRichMessageRenderer {
|
|
15
|
+
/**
|
|
16
|
+
* The structured message content object to be rendered. This object contains an array of blocks, each of which can be a text or attachment block.
|
|
17
|
+
*/
|
|
18
|
+
content: StructuredMessageContent;
|
|
19
|
+
/**
|
|
20
|
+
* A map where keys are attachment IDs and values are objects containing download information for those attachments, such as the download URL.
|
|
21
|
+
*/
|
|
22
|
+
downloadUrls: Record<string, AttachmentDownloadInfo>;
|
|
23
|
+
/**
|
|
24
|
+
* This property determines the text alignment of the message content. It can be either `'left'` or `'right'`.
|
|
25
|
+
*/
|
|
26
|
+
alignment: 'left' | 'right';
|
|
27
|
+
/**
|
|
28
|
+
* Optional translations overriding the default UI strings (e.g. `unsupported_content`).
|
|
29
|
+
*/
|
|
30
|
+
translations: Record<string, string>;
|
|
31
|
+
/**
|
|
32
|
+
* State to track loading status and retry attempts for each attachment
|
|
33
|
+
*/
|
|
34
|
+
attachmentStates: Record<string, AttachmentLoadingState>;
|
|
35
|
+
private readonly MAX_RETRIES;
|
|
36
|
+
private readonly INITIAL_RETRY_DELAY_MS;
|
|
37
|
+
private readonly FETCH_TIMEOUT_MS;
|
|
38
|
+
/**
|
|
39
|
+
* Initialize attachment state if it doesn't exist
|
|
40
|
+
*/
|
|
41
|
+
private initAttachmentState;
|
|
42
|
+
/**
|
|
43
|
+
* Handle image load error with retry logic
|
|
44
|
+
*/
|
|
45
|
+
private handleImageError;
|
|
46
|
+
/**
|
|
47
|
+
* Render a loading spinner
|
|
48
|
+
*/
|
|
49
|
+
private renderLoadingSpinner;
|
|
50
|
+
private readonly defaultTranslations;
|
|
51
|
+
private t;
|
|
52
|
+
/**
|
|
53
|
+
* Renders text as text nodes separated by <br/> elements. Never uses innerHTML,
|
|
54
|
+
* so markup in block text is displayed literally.
|
|
55
|
+
*/
|
|
56
|
+
private renderPlainText;
|
|
57
|
+
private renderTextBlock;
|
|
58
|
+
/**
|
|
59
|
+
* Fallback for unknown block types: show `fallback_text` if provided, otherwise a
|
|
60
|
+
* neutral notice, so a message is never rendered empty.
|
|
61
|
+
*/
|
|
62
|
+
private renderUnknownBlock;
|
|
63
|
+
/**
|
|
64
|
+
* Registry of block renderers keyed by block type.
|
|
65
|
+
*/
|
|
66
|
+
private readonly blockRenderers;
|
|
67
|
+
private generateThumbnail;
|
|
68
|
+
private getPlaceholderIcon;
|
|
69
|
+
private renderAttachmentBlock;
|
|
70
|
+
/**
|
|
71
|
+
* @function render
|
|
72
|
+
* @description The render method for the `ChatleoRichMessageRenderer` component. It iterates over the blocks in the `content` prop and renders each one using the appropriate rendering method (looked up in the `blockRenderers` registry, with `renderUnknownBlock` as fallback).
|
|
73
|
+
* @returns {any} A VNode representing the component's UI.
|
|
74
|
+
*/
|
|
75
|
+
render(): any;
|
|
76
|
+
}
|
|
77
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ChatRoom } from "@chat-leo/chatleolib";
|
|
2
|
+
import { ChatStore } from "@chat-leo/chatleolib";
|
|
3
|
+
/**
|
|
4
|
+
* @component ChatleoRoomList
|
|
5
|
+
* @description This component is responsible for displaying a list of chat rooms. It takes an array of `ChatRoom` objects and renders them as a list of `chatleo-room-tile-component` instances. It also offers a "new message" action that opens a user selector to start a direct message.
|
|
6
|
+
* @property {ChatRoom[]} rooms - An array of `ChatRoom` objects to be displayed in the list.
|
|
7
|
+
* @property {ChatStore} chatStore - An instance of the `ChatStore` class, which is used to get user presence information.
|
|
8
|
+
* @property {string} selectedRoomId - The ID of the currently selected room.
|
|
9
|
+
*/
|
|
10
|
+
export declare class ChatleoRoomList {
|
|
11
|
+
/**
|
|
12
|
+
* An array of `ChatRoom` objects to be displayed in the list.
|
|
13
|
+
*/
|
|
14
|
+
rooms: ChatRoom[];
|
|
15
|
+
/**
|
|
16
|
+
* An instance of the `ChatStore` class, which is used to get user presence information.
|
|
17
|
+
*/
|
|
18
|
+
chatStore?: ChatStore;
|
|
19
|
+
/**
|
|
20
|
+
* The ID of the currently selected room.
|
|
21
|
+
*/
|
|
22
|
+
selectedRoomId?: string;
|
|
23
|
+
_version: number;
|
|
24
|
+
/** Whether the new-message user selector is shown instead of the room list. */
|
|
25
|
+
isNewChatOpen: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* @function onChatStoreChange
|
|
28
|
+
* @description A Stencil watcher that is called when the `chatStore` prop changes. It attaches a listener to the `presenceChanged` event on the new store to trigger a re-render when a user's presence status changes.
|
|
29
|
+
* @param {ChatStore} chatStore - The new `ChatStore` instance.
|
|
30
|
+
* @param {ChatStore} _oldValue - The previous `ChatStore` instance.
|
|
31
|
+
*/
|
|
32
|
+
onChatStoreChange(chatStore: ChatStore, _oldValue: ChatStore): void;
|
|
33
|
+
/**
|
|
34
|
+
* @function onPresenceChange
|
|
35
|
+
* @description This event handler is called when a user's presence status changes. It increments a version counter to force a re-render of the component, ensuring that the online status of users in the room list is updated.
|
|
36
|
+
*/
|
|
37
|
+
onPresenceChange(): void;
|
|
38
|
+
private toggleNewChat;
|
|
39
|
+
private closeNewChat;
|
|
40
|
+
/**
|
|
41
|
+
* Starting a direct message is handled by `chatleo-component`. Close the selector
|
|
42
|
+
* once a user has been picked, whether or not the room opens in this view.
|
|
43
|
+
*/
|
|
44
|
+
onUserSelected(): void;
|
|
45
|
+
private renderHeader;
|
|
46
|
+
/**
|
|
47
|
+
* @function render
|
|
48
|
+
* @description The render method for the `ChatleoRoomList` component. It maps over the `rooms` array and renders a `chatleo-room-tile-component` for each room, passing the necessary props. When the new-message action is active it renders the user selector instead.
|
|
49
|
+
* @returns {any} A VNode representing the component's UI.
|
|
50
|
+
*/
|
|
51
|
+
render(): any;
|
|
52
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
+
import { ChatRoom } from "@chat-leo/chatleolib";
|
|
3
|
+
import { ChatStore } from "@chat-leo/chatleolib";
|
|
4
|
+
/**
|
|
5
|
+
* @component ChatLeoRoomTileComponent
|
|
6
|
+
* @description This component displays a single chat room in a list. It shows the room's avatar, name, the last message, a timestamp, and a count of unread messages. Clicking on the tile fires an event to select the room.
|
|
7
|
+
* @property {ChatRoom} room - The `ChatRoom` object containing the data for the room to be displayed.
|
|
8
|
+
* @property {ChatStore} chatStore - An instance of the `ChatStore` class, used to retrieve user information, such as avatar URLs.
|
|
9
|
+
* @property {string[]} onlineUserIds - An array of user IDs for the participants in the room who are currently online.
|
|
10
|
+
* @property {string} lastMessage - The content of the last message sent in the room.
|
|
11
|
+
* @property {string} timestamp - The timestamp of the last message.
|
|
12
|
+
* @property {number} unreadCount - The number of unread messages in the room.
|
|
13
|
+
* @property {boolean} isActive - Indicates whether this room is currently selected/active.
|
|
14
|
+
* @fires roomClicked - This event is emitted when the user clicks on the room tile. The event detail contains the ID of the clicked room.
|
|
15
|
+
*/
|
|
16
|
+
export declare class ChatLeoRoomTileComponent {
|
|
17
|
+
/**
|
|
18
|
+
* The `ChatRoom` object containing the data for the room to be displayed.
|
|
19
|
+
*/
|
|
20
|
+
room: ChatRoom;
|
|
21
|
+
/**
|
|
22
|
+
* An instance of the `ChatStore` class, used to retrieve user information, such as avatar URLs.
|
|
23
|
+
*/
|
|
24
|
+
chatStore?: ChatStore;
|
|
25
|
+
/**
|
|
26
|
+
* An array of user IDs for the participants in the room who are currently online.
|
|
27
|
+
*/
|
|
28
|
+
onlineUserIds: string[];
|
|
29
|
+
/**
|
|
30
|
+
* The content of the last message sent in the room.
|
|
31
|
+
*/
|
|
32
|
+
lastMessage: string;
|
|
33
|
+
/**
|
|
34
|
+
* The timestamp of the last message.
|
|
35
|
+
*/
|
|
36
|
+
timestamp: string;
|
|
37
|
+
/**
|
|
38
|
+
* The number of unread messages in the room.
|
|
39
|
+
*/
|
|
40
|
+
unreadCount: number;
|
|
41
|
+
/**
|
|
42
|
+
* Indicates whether this room is currently selected/active.
|
|
43
|
+
*/
|
|
44
|
+
isActive: boolean;
|
|
45
|
+
roomClicked: EventEmitter<{
|
|
46
|
+
id: string;
|
|
47
|
+
}>;
|
|
48
|
+
/**
|
|
49
|
+
* @function onClick
|
|
50
|
+
* @description This method is called when the room tile is clicked. It emits the `roomClicked` event with the room's ID.
|
|
51
|
+
*/
|
|
52
|
+
onClick(): void;
|
|
53
|
+
/**
|
|
54
|
+
* @function render
|
|
55
|
+
* @description The render method for the `ChatLeoRoomTileComponent`. It constructs the UI for the room tile, including the avatar, room name, last message, timestamp, and unread count.
|
|
56
|
+
* @returns {any} A VNode representing the component's UI.
|
|
57
|
+
*/
|
|
58
|
+
render(): any;
|
|
59
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import { ChatMessageSent } from '@chat-leo/chatleolib';
|
|
3
|
+
import { ChatStore } from '@chat-leo/chatleolib';
|
|
4
|
+
/**
|
|
5
|
+
* @component ChatleoRoomView
|
|
6
|
+
* @description This component displays a single chat room view without the room list. It shows the chat header, message display, and input area for a specific room. It communicates directly with the ChatStore to load and display messages.
|
|
7
|
+
* @property {ChatStore} chatStore - An instance of the `ChatStore` class, which manages the application's state, including rooms, messages, and user profiles.
|
|
8
|
+
* @property {string} roomId - The ID of the room to display. When this changes, the component will load messages for the new room.
|
|
9
|
+
* @property {boolean} isOnline - Indicates the current user's online status.
|
|
10
|
+
* @property {boolean} pending - If `true`, the component will display a loading state instead of the message list.
|
|
11
|
+
* @fires messageChatSent - This event is emitted when a user sends a message. The event detail contains the message payload, including the room ID, content, and sender information.
|
|
12
|
+
*/
|
|
13
|
+
export declare class ChatleoRoomView {
|
|
14
|
+
/**
|
|
15
|
+
* An instance of the `ChatStore` class, which manages the application's state, including rooms, messages, and user profiles.
|
|
16
|
+
*/
|
|
17
|
+
chatStore?: ChatStore;
|
|
18
|
+
/**
|
|
19
|
+
* The ID of the room to display.
|
|
20
|
+
*/
|
|
21
|
+
roomId?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Indicates the current user's online status.
|
|
24
|
+
*/
|
|
25
|
+
isOnline: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* If `true`, the component will display a loading state instead of the message list.
|
|
28
|
+
*/
|
|
29
|
+
pending?: boolean;
|
|
30
|
+
/** True when the server advertises calls and the host did not disable them. */
|
|
31
|
+
callsAvailable: boolean;
|
|
32
|
+
/** True while this client is in the room's call (keeps the banner from showing). */
|
|
33
|
+
inCall: boolean;
|
|
34
|
+
callRequested: EventEmitter<{
|
|
35
|
+
roomId: string;
|
|
36
|
+
callId?: string;
|
|
37
|
+
}>;
|
|
38
|
+
_version: number;
|
|
39
|
+
private messagesContainerRef?;
|
|
40
|
+
private richInputRef?;
|
|
41
|
+
private resizeObserver?;
|
|
42
|
+
private stickToBottom;
|
|
43
|
+
private lastMessageCount;
|
|
44
|
+
private boundRoomAddedHandler?;
|
|
45
|
+
private boundRoomMessageAddedHandler?;
|
|
46
|
+
private boundRoomMessageChangedHandler?;
|
|
47
|
+
private boundPresenceChangedHandler?;
|
|
48
|
+
private loadingOlder;
|
|
49
|
+
private olderExhausted;
|
|
50
|
+
private previousScrollHeight;
|
|
51
|
+
private previousScrollTop;
|
|
52
|
+
private restoreScrollAfterRender;
|
|
53
|
+
/**
|
|
54
|
+
* @function onChatStoreChange
|
|
55
|
+
* @description This watcher is triggered whenever the `chatStore` prop changes. It is responsible for setting up event listeners on the new store to update the component when data changes, such as when a new room is added or a message is received.
|
|
56
|
+
* @param {ChatStore} newStore - The new `ChatStore` instance.
|
|
57
|
+
* @param {ChatStore} oldStore - The previous `ChatStore` instance.
|
|
58
|
+
*/
|
|
59
|
+
onChatStoreChange(newStore: ChatStore, oldStore: ChatStore): void;
|
|
60
|
+
disconnectedCallback(): void;
|
|
61
|
+
/** Reset scroll tracking when switching rooms and report the new room as active/read. */
|
|
62
|
+
onRoomIdChanged(): void;
|
|
63
|
+
componentDidLoad(): void;
|
|
64
|
+
getDraft(): Promise<string>;
|
|
65
|
+
setDraft(text: string): Promise<void>;
|
|
66
|
+
addFiles(files: File[]): Promise<void>;
|
|
67
|
+
focusComposer(): Promise<void>;
|
|
68
|
+
messageRetryHandler(event: CustomEvent<string>): void;
|
|
69
|
+
private requestCall;
|
|
70
|
+
messageDiscardHandler(event: CustomEvent<string>): void;
|
|
71
|
+
messageChatSent: EventEmitter<ChatMessageSent>;
|
|
72
|
+
/**
|
|
73
|
+
* @function messageSendHandler
|
|
74
|
+
* @description This listener handles the `messageSend` event from the `chatleo-rich-input` component. It processes the rich content payload, sanitizing it by removing base64 image previews from attachments to reduce payload size. It then constructs a `ChatMessageSent` object and emits it.
|
|
75
|
+
* @param {CustomEvent<any>} event - The custom event containing the structured message content.
|
|
76
|
+
*/
|
|
77
|
+
messageSendHandler(event: CustomEvent<any>): void;
|
|
78
|
+
/** Scroll helpers */
|
|
79
|
+
private scrollToBottom;
|
|
80
|
+
private scrollToBottomNextTick;
|
|
81
|
+
/** Load an older page when the user scrolls near the top, keeping the viewport stable. */
|
|
82
|
+
private onMessagesScroll;
|
|
83
|
+
/** After every render, if messages for the selected room changed, scroll to bottom */
|
|
84
|
+
componentDidRender(): void;
|
|
85
|
+
/**
|
|
86
|
+
* @function render
|
|
87
|
+
* @description The render method for the `ChatleoRoomView` component. It displays the chat header, a list of messages grouped by date, and the chat input for a single room.
|
|
88
|
+
* @returns {any} A VNode representing the component's UI.
|
|
89
|
+
*/
|
|
90
|
+
render(): any;
|
|
91
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
+
import { ChatStore } from "@chat-leo/chatleolib";
|
|
3
|
+
import type { ConnectionStatus } from "@chat-leo/chatleolib";
|
|
4
|
+
import { ChatMessageSent } from "@chat-leo/chatleolib";
|
|
5
|
+
/**
|
|
6
|
+
* @component ChatLeoTrayComponent
|
|
7
|
+
* @description This component implements a chat tray that can be opened and closed. It contains a list of chat rooms and can open a message panel for a selected room or a user selector to start a new chat.
|
|
8
|
+
* @property {ChatStore} chatStore - An instance of the `ChatStore` class, which provides the state for the chat application.
|
|
9
|
+
* @fires newChatClicked - This event is emitted when the user clicks the "new chat" button.
|
|
10
|
+
* @fires messageChatSent - This event is emitted when a message is sent from the chat panel.
|
|
11
|
+
*/
|
|
12
|
+
export declare class ChatLeoTrayComponent {
|
|
13
|
+
/**
|
|
14
|
+
* An instance of the `ChatStore` class, which provides the state for the chat application.
|
|
15
|
+
*/
|
|
16
|
+
chatStore?: ChatStore;
|
|
17
|
+
isChatOpen: boolean;
|
|
18
|
+
isNewChatSelectorOpen: boolean;
|
|
19
|
+
isMessagesOpen: boolean;
|
|
20
|
+
selectedRoomId?: string;
|
|
21
|
+
isPending: boolean;
|
|
22
|
+
_version: number;
|
|
23
|
+
isSessionExpired: boolean;
|
|
24
|
+
connectionStatus: ConnectionStatus;
|
|
25
|
+
private messagesContainerRef?;
|
|
26
|
+
private lastMessageCount;
|
|
27
|
+
private boundOnPresenceChange;
|
|
28
|
+
private boundOnRoomMessageAdded;
|
|
29
|
+
private boundOnSessionExpiredChanged;
|
|
30
|
+
private boundOnConnectionStatusChanged;
|
|
31
|
+
private boundOnRoomReadCountChanged;
|
|
32
|
+
/**
|
|
33
|
+
* @function onChatStoreChange
|
|
34
|
+
* @description A Stencil watcher that is called when the `chatStore` prop changes. It attaches event listeners to the new store to handle presence changes and new messages.
|
|
35
|
+
* @param {ChatStore} chatStore - The new `ChatStore` instance.
|
|
36
|
+
* @param {ChatStore} _oldValue - The previous `ChatStore` instance.
|
|
37
|
+
*/
|
|
38
|
+
onChatStoreChange(chatStore: ChatStore, oldValue: ChatStore): void;
|
|
39
|
+
/**
|
|
40
|
+
* Reset message count tracking when switching rooms to force a scroll on first render
|
|
41
|
+
*/
|
|
42
|
+
onSelectedRoomIdChanged(): void;
|
|
43
|
+
/**
|
|
44
|
+
* @function onPresenceChange
|
|
45
|
+
* @description This event handler is called when a user's presence status changes. It increments a version counter to force a re-render of the component.
|
|
46
|
+
*/
|
|
47
|
+
onPresenceChange(): void;
|
|
48
|
+
/**
|
|
49
|
+
* @function onRoomMessageAdded
|
|
50
|
+
* @description This event handler is called when a new message is added to a room. It increments a version counter to force a re-render and display the new message.
|
|
51
|
+
* @param {CustomEvent<ChatMessageSent>} event - The custom event containing the new message.
|
|
52
|
+
*/
|
|
53
|
+
onRoomMessageAdded(event: CustomEvent<any>): void;
|
|
54
|
+
onSessionExpiredChanged(event: CustomEvent<{
|
|
55
|
+
isSessionExpired: boolean;
|
|
56
|
+
}>): void;
|
|
57
|
+
onConnectionStatusChanged(event: CustomEvent<{
|
|
58
|
+
status: ConnectionStatus;
|
|
59
|
+
}>): void;
|
|
60
|
+
private toggleChat;
|
|
61
|
+
newChatClicked: EventEmitter<string>;
|
|
62
|
+
/**
|
|
63
|
+
* @function onNewChatClicked
|
|
64
|
+
* @description This method is called when the "new chat" button is clicked. It toggles the visibility of the new chat selector panel and emits the `newChatClicked` event.
|
|
65
|
+
*/
|
|
66
|
+
onNewChatClicked(): void;
|
|
67
|
+
private onUserSelected;
|
|
68
|
+
private onSelectorClose;
|
|
69
|
+
/**
|
|
70
|
+
* @function roomClickedHandler
|
|
71
|
+
* @description This listener is triggered when a room is clicked in the room list. It opens the message panel for the selected room.
|
|
72
|
+
* @param {CustomEvent<{ id: string }>} event - The custom event containing the ID of the clicked room.
|
|
73
|
+
*/
|
|
74
|
+
roomClickedHandler(event: CustomEvent<{
|
|
75
|
+
id: string;
|
|
76
|
+
}>): void;
|
|
77
|
+
messageChatSent: EventEmitter<ChatMessageSent>;
|
|
78
|
+
/**
|
|
79
|
+
* @function messageSendHandler
|
|
80
|
+
* @description This listener handles the `messageSend` event from the rich input component. It sanitizes the message content and emits a `messageChatSent` event.
|
|
81
|
+
* @param {CustomEvent<any>} event - The custom event containing the message content.
|
|
82
|
+
*/
|
|
83
|
+
messageSendHandler(event: CustomEvent<any>): void;
|
|
84
|
+
/**
|
|
85
|
+
* @function openChatPanel
|
|
86
|
+
* @description This method programmatically opens the message panel for a specific room.
|
|
87
|
+
* @param {string} roomId - The ID of the room to open.
|
|
88
|
+
* @param {boolean} pending - If `true`, the panel will be opened in a pending state.
|
|
89
|
+
*/
|
|
90
|
+
openChatPanel(roomId?: string, pending?: boolean): Promise<void>;
|
|
91
|
+
/**
|
|
92
|
+
* @function onDoClose
|
|
93
|
+
* @description This method is called when the close button in the message panel is clicked. It closes the message panel.
|
|
94
|
+
* @param {Event} e - The click event from the close button.
|
|
95
|
+
*/
|
|
96
|
+
onDoClose(e: Event): void;
|
|
97
|
+
/**
|
|
98
|
+
* Scroll helpers
|
|
99
|
+
*/
|
|
100
|
+
private scrollToBottom;
|
|
101
|
+
private scrollToBottomNextTick;
|
|
102
|
+
/**
|
|
103
|
+
* After every render, if messages for the selected room changed, scroll to the bottom
|
|
104
|
+
*/
|
|
105
|
+
componentDidRender(): void;
|
|
106
|
+
/**
|
|
107
|
+
* @function render
|
|
108
|
+
* @description The render method for the `ChatLeoTrayComponent`. It renders the different panels of the tray component based on the component's state.
|
|
109
|
+
* @returns {any} A VNode representing the component's UI.
|
|
110
|
+
*/
|
|
111
|
+
render(): any;
|
|
112
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
+
import type { UserProfile } from "@chat-leo/chatleolib";
|
|
3
|
+
/**
|
|
4
|
+
* @component ChatleoUserTile
|
|
5
|
+
* @description This component displays a tile for a single user, showing their avatar, name, and online status. It is typically used in a list of users.
|
|
6
|
+
* @property {UserProfile} profile - The `UserProfile` object for the user to be displayed. This includes the user's name and avatar URL.
|
|
7
|
+
* @property {boolean} isOnline - A boolean indicating whether the user is currently online.
|
|
8
|
+
* @property {string} lastSeen - A string indicating when the user was last seen online. This is displayed if the user is not currently online.
|
|
9
|
+
* @fires userClicked - This event is emitted when the user tile is clicked. The event detail contains the `UserProfile` of the clicked user.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ChatleoUserTile {
|
|
12
|
+
/**
|
|
13
|
+
* The `UserProfile` object for the user to be displayed. This includes the user's name and avatar URL.
|
|
14
|
+
*/
|
|
15
|
+
profile?: UserProfile;
|
|
16
|
+
/**
|
|
17
|
+
* A boolean indicating whether the user is currently online.
|
|
18
|
+
*/
|
|
19
|
+
isOnline: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* A string indicating when the user was last seen online. This is displayed if the user is not currently online.
|
|
22
|
+
*/
|
|
23
|
+
lastSeen?: string;
|
|
24
|
+
userClicked: EventEmitter<UserProfile>;
|
|
25
|
+
/**
|
|
26
|
+
* @function onClick
|
|
27
|
+
* @description This method is called when the user tile is clicked. It emits the `userClicked` event with the user's profile.
|
|
28
|
+
*/
|
|
29
|
+
onClick(): void;
|
|
30
|
+
/**
|
|
31
|
+
* @function render
|
|
32
|
+
* @description The render method for the `ChatleoUserTile` component. It constructs the UI for the user tile, including the avatar, name, and status.
|
|
33
|
+
* @returns {any} A VNode representing the component's UI.
|
|
34
|
+
*/
|
|
35
|
+
render(): any;
|
|
36
|
+
}
|