You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(1) `currentUserId` is required to display UI and trigger actions according to the user using the chat (ex: messages position on the right, etc.)
196
-
197
-
(2) `loadingRooms` can be used to show/hide a spinner icon while rooms are loading
198
-
199
-
(3) `roomId` can be used to load a specific room at any time
200
-
201
-
(4) `loadFirstRoom` can be used to remove the default behaviour of opening the first room at initialization
202
-
203
-
(5) `roomMessage` can be used to add a default textarea value
204
-
205
-
(6) `messagesLoaded` must be manually set to `true` when all messages of a conversation have been loaded. Meaning the user cannot scroll on top anymore
206
-
207
-
(7) `menuActions` can be used to display your own buttons when clicking the vertical dots icon inside a room.<br>
208
-
You can then use the [menuActionHandler](#events-api) event to call your own action after clicking a button. Ex:
(1) `current-user-id` is required to display UI and trigger actions according to the user using the chat (ex: messages position on the right, etc.)
196
+
197
+
(2) `loading-rooms` can be used to show/hide a spinner icon while rooms are loading
198
+
199
+
(3) `room-id` can be used to load a specific room at any time
200
+
201
+
(4) `load-first-room` can be used to remove the default behaviour of opening the first room at initialization
202
+
203
+
(5) `room-message` can be used to add a default textarea value
204
+
205
+
(6) `messages-loaded` must be manually set to `true` when all messages of a conversation have been loaded. Meaning the user cannot scroll on top anymore
206
+
207
+
(7) `menu-actions` can be used to display your own buttons when clicking the vertical dots icon inside a room.<br>
208
+
You can then use the [menu-action-handler](#events-api) event to call your own action after clicking a button. Ex:
209
209
210
210
```javascript
211
-
menuActions="[
211
+
menu-actions="[
212
212
{
213
213
name: 'inviteUser',
214
214
title: 'Invite User'
@@ -224,11 +224,11 @@ menuActions="[
224
224
]"
225
225
```
226
226
227
-
(8) `messageActions` can be used to display your own buttons when clicking the dropdown icon inside a message.<br>
228
-
You can then use the [messageActionHandler](#events-api) event to call your own action after clicking a button. Ex:
227
+
(8) `message-actions` can be used to display your own buttons when clicking the dropdown icon inside a message.<br>
228
+
You can then use the [message-action-handler](#events-api) event to call your own action after clicking a button. Ex:
229
229
230
230
```javascript
231
-
messageActions="[
231
+
message-actions="[
232
232
{
233
233
name: 'addMessageToFavorite',
234
234
title: 'Add To Favorite'
@@ -240,7 +240,7 @@ messageActions="[
240
240
]"
241
241
```
242
242
243
-
You can use built-in `messageActions` names to trigger specific UI modifications when clicked.<br>
243
+
You can use built-in `message-actions` names to trigger specific UI modifications when clicked.<br>
244
244
Currently, `replyMessage`, `editMessage` and `deleteMessage` action names are available.<br>
245
245
If `messageActions` is not set, it will use the default values below.<br>
246
246
If you don't want to display this `messageActions` menu, you can pass it an empty array.
@@ -264,12 +264,12 @@ messageActions="[
264
264
]"
265
265
```
266
266
267
-
(9) `showNewMessagesDivider` can be used to show/hide the blue line divider between seen and unseen messages.
267
+
(9) `show-new-messages-divider` can be used to show/hide the blue line divider between seen and unseen messages.
268
268
269
-
(10) `textMessages` can be used to replace default i18n texts. Ex:
269
+
(10) `text-messages` can be used to replace default i18n texts. Ex:
270
270
271
271
```javascript
272
-
textMessages="{
272
+
text-messages="{
273
273
ROOMS_EMPTY: 'Aucune conversation',
274
274
ROOM_EMPTY: 'Aucune conversation sélectionnée',
275
275
NEW_MESSAGES: 'Nouveaux messages',
@@ -284,10 +284,10 @@ textMessages="{
284
284
}"
285
285
```
286
286
287
-
(11) `textFormatting` can be used to add text formatting. Currently, bold, italic, strikethrough, underline, inline code and multiline code formatting are available and can be used in conjonction. You can disable text formatting by passing the prop as `:textFormatting="false"`.
287
+
(11) `text-formatting` can be used to add text formatting. Currently, bold, italic, strikethrough, underline, inline code and multiline code formatting are available and can be used in conjonction. You can disable text formatting by passing the prop as `:textFormatting="false"`.
| Bold |`* *`|`*This is bold text*`|**This is bold text**|
292
292
| Italic |`_ _`|`_This text is italicized_`|_This text is italicized_|
293
293
| Strikethrough |`~ ~`|`~This was mistaken text~`|~~This was mistaken text~~|
@@ -311,13 +311,13 @@ This is
311
311
multiline code
312
312
```
313
313
314
-
(12) `responsiveBreakpoint` can be used to collapse the rooms list on the left when then viewport size goes below the specified width.
314
+
(12) `responsive-breakpoint` can be used to collapse the rooms list on the left when then viewport size goes below the specified width.
315
315
316
-
(13) `singleRoom` can be used if you never want to show the rooms list on the left. You still need to pass the `rooms` prop as an array with a single element.
316
+
(13) `single-room` can be used if you never want to show the rooms list on the left. You still need to pass the `rooms` prop as an array with a single element.
317
317
318
318
(14) `theme` can be used to change the chat theme. Currently, only `light` and `dark` are available.
319
319
320
-
(15) `acceptedFiles` can be used to set specifics file types allowed in chat. By default, all file types are allowed: `"*"`.
320
+
(15) `accepted-files` can be used to set specifics file types allowed in chat. By default, all file types are allowed: `"*"`.
321
321
322
322
Example: set `"accepted-files="image/png, image/jpeg, application/pdf"` to allow `JPG``PNG` and `PDF` files
|fetchMessages (1) |`{ room, options }`| A user has scrolled on top to load more messages |
566
-
|sendMessage|`{ roomId, content, file (5), replyMessage (6) }`| A user has sent a message |
567
-
|editMessage|`{ roomId, messageId, newContent, file (5), replyMessage (6) }`| A user has edited a message |
568
-
|deleteMessage|`{ roomId, messageId }`| A user has deleted a message |
569
-
|openFile|`{ message, action }`| A user has clicked to view or download a file |
570
-
|addRoom| - | A user clicks on the plus icon next to searchbar |
571
-
|menuActionHandler (2) |`{ roomId, action }`| A user clicks on the vertical dots icon inside a room |
572
-
|messageActionHandler (3) |`{ roomId, action, message }`| A user clicks on the dropdown icon inside a message |
573
-
|sendMessageReaction|`{ roomId, messageId, reaction, remove }`| A user clicks on the emoji icon inside a message |
574
-
|roomInfo|`room`| A user clicks the room header bar |
575
-
|textareaActionHandler (4) |`{ roomId, message }`| A user clicks on custom icon inside the footer |
576
-
|typingMessage|`{ message, roomId }`| A user is typing a message |
577
-
578
-
(1) `fetchMessages` is triggered every time a room is opened. If the room is opened for the first time, the `options` param will hold `reset: true`
579
-
(1) `fetchMessages` should be a method implementing a pagination system. Its purpose is to load older messages of a conversation when the user scroll on top
580
-
581
-
(2) `menuActionHandler` is the result of the `menuActions` prop.<br>
|fetch-messages (1)|`{ room, options }`| A user has scrolled on top to load more messages |
566
+
|send-message |`{ roomId, content, file (5), replyMessage (6) }`| A user has sent a message |
567
+
|edit-message |`{ roomId, messageId, newContent, file (5), replyMessage (6) }`| A user has edited a message |
568
+
|delete-message |`{ roomId, messageId }`| A user has deleted a message |
569
+
|open-file |`{ message, action }`| A user has clicked to view or download a file |
570
+
|add-room | - | A user clicks on the plus icon next to searchbar |
571
+
|menu-action-handler (2) |`{ roomId, action }`| A user clicks on the vertical dots icon inside a room |
572
+
|message-action-handler (3) |`{ roomId, action, message }`| A user clicks on the dropdown icon inside a message |
573
+
|send-message-reaction|`{ roomId, messageId, reaction, remove }`| A user clicks on the emoji icon inside a message |
574
+
|room-info |`room`| A user clicks the room header bar |
575
+
|textarea-action-handler (4) |`{ roomId, message }`| A user clicks on custom icon inside the footer |
576
+
|typing-message |`{ message, roomId }`| A user is typing a message |
577
+
578
+
(1) `fetch-messages` is triggered every time a room is opened. If the room is opened for the first time, the `options` param will hold `reset: true`.<br>
579
+
(1) `fetch-messages` should be a method implementing a pagination system. Its purpose is to load older messages of a conversation when the user scroll on top.
580
+
581
+
(2) `menu-action-handler` is the result of the `menuActions` prop.<br>
582
582
When clicking a button from your `menuActions` array, `menuActionHandler` will give you the name of the button that was click.
(3) `messageActionHandler` is the result of the `messageActions` prop.<br>
599
-
When clicking a message menu button from your `messageActions` array, `messageActionHandler` will give you the name of the button that was click and the corresponding message data.
598
+
(3) `message-action-handler` is the result of the `message-actions` prop.<br>
599
+
When clicking a message menu button from your `message-actions` array, `message-action-handler` will give you the name of the button that was click and the corresponding message data.
(4) `textareaActionHandler` can be used to add an extra icon on the right of the textarea, and recieve an event when clicking it.
613
+
(4) `textarea-action-handler` can be used to add an extra icon on the right of the textarea, and recieve an event when clicking it.
614
614
615
615
(5) All file params contain: `{ blob, localURL, name, size, type }`
616
616
617
-
(6) `replyMessage` object is available when the user replied to another message by clicking the corresponding icon, and contains the message information that was clicked
617
+
(6) `replyMessage` object is available when the user replied to another message by clicking the corresponding icon, and contains the message information that was clicked.
0 commit comments