diff --git a/docusaurus/angular_versioned_docs/version-5/assets/message-menu-after-desktop.png b/docusaurus/angular_versioned_docs/version-5/assets/message-menu-after-desktop.png new file mode 100644 index 00000000..829f5613 Binary files /dev/null and b/docusaurus/angular_versioned_docs/version-5/assets/message-menu-after-desktop.png differ diff --git a/docusaurus/angular_versioned_docs/version-5/assets/message-menu-after-mobile.png b/docusaurus/angular_versioned_docs/version-5/assets/message-menu-after-mobile.png new file mode 100644 index 00000000..3c23613e Binary files /dev/null and b/docusaurus/angular_versioned_docs/version-5/assets/message-menu-after-mobile.png differ diff --git a/docusaurus/angular_versioned_docs/version-5/assets/message-menu-before.png b/docusaurus/angular_versioned_docs/version-5/assets/message-menu-before.png new file mode 100644 index 00000000..76ee46cd Binary files /dev/null and b/docusaurus/angular_versioned_docs/version-5/assets/message-menu-before.png differ diff --git a/docusaurus/angular_versioned_docs/version-5/assets/message-reactions-selector-screenshot.png b/docusaurus/angular_versioned_docs/version-5/assets/message-reactions-selector-screenshot.png index 82c2a427..0596a3ec 100644 Binary files a/docusaurus/angular_versioned_docs/version-5/assets/message-reactions-selector-screenshot.png and b/docusaurus/angular_versioned_docs/version-5/assets/message-reactions-selector-screenshot.png differ diff --git a/docusaurus/angular_versioned_docs/version-5/basics/upgrade-v4.mdx b/docusaurus/angular_versioned_docs/version-5/basics/upgrade-v4.mdx index 7095302a..7c5f0259 100644 --- a/docusaurus/angular_versioned_docs/version-5/basics/upgrade-v4.mdx +++ b/docusaurus/angular_versioned_docs/version-5/basics/upgrade-v4.mdx @@ -5,6 +5,10 @@ title: Upgrade from v4 import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; +import MessageMenuBefore from "../assets/message-menu-before.png"; +import MessageMenuAfterDesktop from "../assets/message-menu-after-desktop.png"; +import MessageMenuAfterMobile from "../assets/message-menu-after-mobile.png"; +import ImageShowcase from "@site/src/components/ImageShowcase"; ## Highlights @@ -69,6 +73,49 @@ No futher action is required for customers who were already using theme-v2. Customers who used to use theme-v1 now need to use theme-v2. Updating from theme-v1 to theme-v2 will require to rewrite your custom CSS code as the new theme has a new variable system, and all the components were restructured. To help you get started please refer our [theming guide](../theming/introduction.mdx). +### New message menu UI + +The old message menu UI caused usability issues on mobile devices. The new UI address these issues, and adds some other improvements as well. + + + + + +With the new UI these component-level changes are introduced: + +- The [`MessageListComponent`](../../components/MessageListComponent) no longer supports the `messageOptionsTrigger` parameter as this was a workaround for mobile UX problems. On desktop devices the message menu will be triggered by hovering anywhere in the message area. On mobile devices the message menu will be triggered by a longpress insde the message bubble area. +- The [`MessageReactionsComponent`](../../components/MessageReactionsComponent) was split into two components. The `MessageReactionsComponent` is only responsible for displaying the existing reactions, and with that the `isSelectorOpen` input and `isSelectorOpenChange` output was removed. The [`MessageReactionsSelector`](../../components/MessageReactionsSelectorComponent) is a new component, that's responsible for adding/removing message reactions. + ### Removed deprecated features #### `MessageListComponent` @@ -116,6 +163,8 @@ In previous versions if an error occured during channel load, the `channelServic - Event handlers with `Function` type are changed to `() => void` - Event handlers with `any` return types are changed to `void` return type +- The action handler signature of (custom) message actions was changed from `(message: StreamMessage, isMine: boolean) => void` to `(message: StreamMessage, extraParams: MessageActionHandlerExtraParams) => void`. The `isMine` flag is part of the `MessageActionHandlerExtraParams` object. +- The `MessageActionBoxItemContext` is changed, `isMine` is removed, and `params: MessageActionHandlerExtraParams` is added. The `isMine` flag is part of the `MessageActionHandlerExtraParams` object. ### Default reactions diff --git a/docusaurus/angular_versioned_docs/version-5/components/AttachmentListComponent.mdx b/docusaurus/angular_versioned_docs/version-5/components/AttachmentListComponent.mdx index b77067de..141e285c 100644 --- a/docusaurus/angular_versioned_docs/version-5/components/AttachmentListComponent.mdx +++ b/docusaurus/angular_versioned_docs/version-5/components/AttachmentListComponent.mdx @@ -122,7 +122,7 @@ The id of the message the attachments belong to #### Defined in -[projects/stream-chat-angular/src/lib/attachment-list/attachment-list.component.ts:39](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/attachment-list/attachment-list.component.ts#L39) +[projects/stream-chat-angular/src/lib/attachment-list/attachment-list.component.ts:39](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/attachment-list/attachment-list.component.ts#L39) --- @@ -134,7 +134,7 @@ The parent id of the message the attachments belong to #### Defined in -[projects/stream-chat-angular/src/lib/attachment-list/attachment-list.component.ts:43](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/attachment-list/attachment-list.component.ts#L43) +[projects/stream-chat-angular/src/lib/attachment-list/attachment-list.component.ts:43](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/attachment-list/attachment-list.component.ts#L43) --- @@ -146,7 +146,7 @@ The attachments to display #### Defined in -[projects/stream-chat-angular/src/lib/attachment-list/attachment-list.component.ts:47](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/attachment-list/attachment-list.component.ts#L47) +[projects/stream-chat-angular/src/lib/attachment-list/attachment-list.component.ts:47](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/attachment-list/attachment-list.component.ts#L47) --- @@ -158,6 +158,6 @@ Emits the state of the image carousel window #### Defined in -[projects/stream-chat-angular/src/lib/attachment-list/attachment-list.component.ts:51](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/attachment-list/attachment-list.component.ts#L51) +[projects/stream-chat-angular/src/lib/attachment-list/attachment-list.component.ts:51](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/attachment-list/attachment-list.component.ts#L51) [//]: # "End of generated content" diff --git a/docusaurus/angular_versioned_docs/version-5/components/AttachmentPreviewListComponent.mdx b/docusaurus/angular_versioned_docs/version-5/components/AttachmentPreviewListComponent.mdx index afeac8a8..9de2ed2b 100644 --- a/docusaurus/angular_versioned_docs/version-5/components/AttachmentPreviewListComponent.mdx +++ b/docusaurus/angular_versioned_docs/version-5/components/AttachmentPreviewListComponent.mdx @@ -47,7 +47,7 @@ A stream that emits the current file uploads and their states #### Defined in -[projects/stream-chat-angular/src/lib/attachment-preview-list/attachment-preview-list.component.ts:17](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/attachment-preview-list/attachment-preview-list.component.ts#L17) +[projects/stream-chat-angular/src/lib/attachment-preview-list/attachment-preview-list.component.ts:17](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/attachment-preview-list/attachment-preview-list.component.ts#L17) --- @@ -59,7 +59,7 @@ An output to notify the parent component if the user tries to retry a failed upl #### Defined in -[projects/stream-chat-angular/src/lib/attachment-preview-list/attachment-preview-list.component.ts:21](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/attachment-preview-list/attachment-preview-list.component.ts#L21) +[projects/stream-chat-angular/src/lib/attachment-preview-list/attachment-preview-list.component.ts:21](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/attachment-preview-list/attachment-preview-list.component.ts#L21) --- @@ -71,6 +71,6 @@ An output to notify the parent component if the user wants to delete a file #### Defined in -[projects/stream-chat-angular/src/lib/attachment-preview-list/attachment-preview-list.component.ts:25](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/attachment-preview-list/attachment-preview-list.component.ts#L25) +[projects/stream-chat-angular/src/lib/attachment-preview-list/attachment-preview-list.component.ts:25](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/attachment-preview-list/attachment-preview-list.component.ts#L25) [//]: # "End of generated content" diff --git a/docusaurus/angular_versioned_docs/version-5/components/AutocompleteTextareaComponent.mdx b/docusaurus/angular_versioned_docs/version-5/components/AutocompleteTextareaComponent.mdx index 19f91fc2..a6624d24 100644 --- a/docusaurus/angular_versioned_docs/version-5/components/AutocompleteTextareaComponent.mdx +++ b/docusaurus/angular_versioned_docs/version-5/components/AutocompleteTextareaComponent.mdx @@ -51,7 +51,7 @@ TextareaInterface.value #### Defined in -[projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts:49](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts#L49) +[projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts:49](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts#L49) --- @@ -67,7 +67,7 @@ TextareaInterface.placeholder #### Defined in -[projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts:53](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts#L53) +[projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts:53](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts#L53) --- @@ -83,7 +83,7 @@ TextareaInterface.areMentionsEnabled #### Defined in -[projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts:57](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts#L57) +[projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts:57](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts#L57) --- @@ -99,7 +99,7 @@ TextareaInterface.inputMode #### Defined in -[projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts:61](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts#L61) +[projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts:61](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts#L61) --- @@ -115,7 +115,7 @@ TextareaInterface.mentionScope #### Defined in -[projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts:65](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts#L65) +[projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts:65](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts#L65) --- @@ -131,7 +131,7 @@ TextareaInterface.autoFocus #### Defined in -[projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts:69](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts#L69) +[projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts:69](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts#L69) --- @@ -147,7 +147,7 @@ TextareaInterface.valueChange #### Defined in -[projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts:73](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts#L73) +[projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts:73](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts#L73) --- @@ -163,7 +163,7 @@ TextareaInterface.send #### Defined in -[projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts:77](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts#L77) +[projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts:77](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts#L77) --- @@ -179,6 +179,6 @@ TextareaInterface.userMentions #### Defined in -[projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts:81](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts#L81) +[projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts:81](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.ts#L81) [//]: # "End of generated content" diff --git a/docusaurus/angular_versioned_docs/version-5/components/AvatarComponent.mdx b/docusaurus/angular_versioned_docs/version-5/components/AvatarComponent.mdx index 5f3e3de8..ba4b45f8 100644 --- a/docusaurus/angular_versioned_docs/version-5/components/AvatarComponent.mdx +++ b/docusaurus/angular_versioned_docs/version-5/components/AvatarComponent.mdx @@ -71,7 +71,7 @@ An optional name of the image, used for fallback image or image title (if `image #### Defined in -[projects/stream-chat-angular/src/lib/avatar/avatar.component.ts:35](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/avatar/avatar.component.ts#L35) +[projects/stream-chat-angular/src/lib/avatar/avatar.component.ts:35](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/avatar/avatar.component.ts#L35) --- @@ -83,7 +83,7 @@ The URL of the image to be displayed. If the image can't be displayed the first #### Defined in -[projects/stream-chat-angular/src/lib/avatar/avatar.component.ts:39](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/avatar/avatar.component.ts#L39) +[projects/stream-chat-angular/src/lib/avatar/avatar.component.ts:39](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/avatar/avatar.component.ts#L39) --- @@ -95,7 +95,7 @@ The location the avatar will be displayed in #### Defined in -[projects/stream-chat-angular/src/lib/avatar/avatar.component.ts:43](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/avatar/avatar.component.ts#L43) +[projects/stream-chat-angular/src/lib/avatar/avatar.component.ts:43](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/avatar/avatar.component.ts#L43) --- @@ -107,7 +107,7 @@ The channel the avatar belongs to (if avatar of a channel is displayed) #### Defined in -[projects/stream-chat-angular/src/lib/avatar/avatar.component.ts:47](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/avatar/avatar.component.ts#L47) +[projects/stream-chat-angular/src/lib/avatar/avatar.component.ts:47](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/avatar/avatar.component.ts#L47) --- @@ -119,7 +119,7 @@ The user the avatar belongs to (if avatar of a user is displayed) #### Defined in -[projects/stream-chat-angular/src/lib/avatar/avatar.component.ts:51](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/avatar/avatar.component.ts#L51) +[projects/stream-chat-angular/src/lib/avatar/avatar.component.ts:51](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/avatar/avatar.component.ts#L51) --- @@ -131,7 +131,7 @@ The type of the avatar: channel if channel avatar is displayed, user if user ava #### Defined in -[projects/stream-chat-angular/src/lib/avatar/avatar.component.ts:55](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/avatar/avatar.component.ts#L55) +[projects/stream-chat-angular/src/lib/avatar/avatar.component.ts:55](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/avatar/avatar.component.ts#L55) --- @@ -143,7 +143,7 @@ If a channel avatar is displayed, and if the channel has exactly two members a g #### Defined in -[projects/stream-chat-angular/src/lib/avatar/avatar.component.ts:59](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/avatar/avatar.component.ts#L59) +[projects/stream-chat-angular/src/lib/avatar/avatar.component.ts:59](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/avatar/avatar.component.ts#L59) --- @@ -155,6 +155,6 @@ If channel/user image isn't provided the initials of the name of the channel/use #### Defined in -[projects/stream-chat-angular/src/lib/avatar/avatar.component.ts:63](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/avatar/avatar.component.ts#L63) +[projects/stream-chat-angular/src/lib/avatar/avatar.component.ts:63](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/avatar/avatar.component.ts#L63) [//]: # "End of generated content" diff --git a/docusaurus/angular_versioned_docs/version-5/components/AvatarPlaceholderComponent.mdx b/docusaurus/angular_versioned_docs/version-5/components/AvatarPlaceholderComponent.mdx index 581917d3..8f3d17b7 100644 --- a/docusaurus/angular_versioned_docs/version-5/components/AvatarPlaceholderComponent.mdx +++ b/docusaurus/angular_versioned_docs/version-5/components/AvatarPlaceholderComponent.mdx @@ -12,7 +12,7 @@ An optional name of the image, used for fallback image or image title (if `image #### Defined in -[projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts:23](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts#L23) +[projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts:23](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts#L23) --- @@ -24,7 +24,7 @@ The URL of the image to be displayed. If the image can't be displayed the first #### Defined in -[projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts:27](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts#L27) +[projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts:27](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts#L27) --- @@ -36,7 +36,7 @@ The location the avatar will be displayed in #### Defined in -[projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts:31](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts#L31) +[projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts:31](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts#L31) --- @@ -48,7 +48,7 @@ The channel the avatar belongs to (if avatar of a channel is displayed) #### Defined in -[projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts:35](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts#L35) +[projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts:35](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts#L35) --- @@ -60,7 +60,7 @@ The user the avatar belongs to (if avatar of a user is displayed) #### Defined in -[projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts:39](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts#L39) +[projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts:39](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts#L39) --- @@ -72,7 +72,7 @@ The type of the avatar: channel if channel avatar is displayed, user if user ava #### Defined in -[projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts:43](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts#L43) +[projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts:43](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts#L43) --- @@ -84,7 +84,7 @@ If channel/user image isn't provided the initials of the name of the channel/use #### Defined in -[projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts:47](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts#L47) +[projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts:47](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts#L47) --- @@ -96,6 +96,6 @@ If a channel avatar is displayed, and if the channel has exactly two members a g #### Defined in -[projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts:53](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts#L53) +[projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts:53](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/avatar-placeholder/avatar-placeholder.component.ts#L53) [//]: # "End of generated content" diff --git a/docusaurus/angular_versioned_docs/version-5/components/ChannelPreviewComponent.mdx b/docusaurus/angular_versioned_docs/version-5/components/ChannelPreviewComponent.mdx index 2d7fb5bc..b0701c43 100644 --- a/docusaurus/angular_versioned_docs/version-5/components/ChannelPreviewComponent.mdx +++ b/docusaurus/angular_versioned_docs/version-5/components/ChannelPreviewComponent.mdx @@ -37,6 +37,6 @@ The channel to be displayed #### Defined in -[projects/stream-chat-angular/src/lib/channel-preview/channel-preview.component.ts:28](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel-preview/channel-preview.component.ts#L28) +[projects/stream-chat-angular/src/lib/channel-preview/channel-preview.component.ts:28](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel-preview/channel-preview.component.ts#L28) [//]: # "End of generated content" diff --git a/docusaurus/angular_versioned_docs/version-5/components/IconComponent.mdx b/docusaurus/angular_versioned_docs/version-5/components/IconComponent.mdx index 0eb9f18b..759b40ac 100644 --- a/docusaurus/angular_versioned_docs/version-5/components/IconComponent.mdx +++ b/docusaurus/angular_versioned_docs/version-5/components/IconComponent.mdx @@ -33,6 +33,6 @@ The icon to display, the list of [supported icons](https://github.com/GetStream/ #### Defined in -[projects/stream-chat-angular/src/lib/icon/icon.component.ts:37](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/icon/icon.component.ts#L37) +[projects/stream-chat-angular/src/lib/icon/icon.component.ts:37](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/icon/icon.component.ts#L37) [//]: # "End of generated content" diff --git a/docusaurus/angular_versioned_docs/version-5/components/IconPlaceholderComponent.mdx b/docusaurus/angular_versioned_docs/version-5/components/IconPlaceholderComponent.mdx index 7b5dc28e..2abcd1f7 100644 --- a/docusaurus/angular_versioned_docs/version-5/components/IconPlaceholderComponent.mdx +++ b/docusaurus/angular_versioned_docs/version-5/components/IconPlaceholderComponent.mdx @@ -12,6 +12,6 @@ The icon to display, the list of [supported icons](https://github.com/GetStream/ #### Defined in -[projects/stream-chat-angular/src/lib/icon-placeholder/icon-placeholder.component.ts:18](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/icon-placeholder/icon-placeholder.component.ts#L18) +[projects/stream-chat-angular/src/lib/icon-placeholder/icon-placeholder.component.ts:18](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/icon-placeholder/icon-placeholder.component.ts#L18) [//]: # "End of generated content" diff --git a/docusaurus/angular_versioned_docs/version-5/components/MessageActionsBoxComponent.mdx b/docusaurus/angular_versioned_docs/version-5/components/MessageActionsBoxComponent.mdx index 297b4c61..2e6ff182 100644 --- a/docusaurus/angular_versioned_docs/version-5/components/MessageActionsBoxComponent.mdx +++ b/docusaurus/angular_versioned_docs/version-5/components/MessageActionsBoxComponent.mdx @@ -46,7 +46,7 @@ Indicates if the message actions are belonging to a message that was sent by the #### Defined in -[projects/stream-chat-angular/src/lib/message-actions-box/message-actions-box.component.ts:36](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-actions-box/message-actions-box.component.ts#L36) +[projects/stream-chat-angular/src/lib/message-actions-box/message-actions-box.component.ts:38](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-actions-box/message-actions-box.component.ts#L38) --- @@ -58,7 +58,19 @@ The message the actions will be executed on #### Defined in -[projects/stream-chat-angular/src/lib/message-actions-box/message-actions-box.component.ts:40](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-actions-box/message-actions-box.component.ts#L40) +[projects/stream-chat-angular/src/lib/message-actions-box/message-actions-box.component.ts:42](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-actions-box/message-actions-box.component.ts#L42) + +--- + +### messageTextHtmlElement + +• **messageTextHtmlElement**: `undefined` \| `HTMLElement` + +The HTML element which contains the message text, it's used for the "copy message text" action + +#### Defined in + +[projects/stream-chat-angular/src/lib/message-actions-box/message-actions-box.component.ts:46](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-actions-box/message-actions-box.component.ts#L46) --- @@ -70,6 +82,6 @@ The list of [channel capabilities](https://getstream.io/chat/docs/javascript/cha #### Defined in -[projects/stream-chat-angular/src/lib/message-actions-box/message-actions-box.component.ts:44](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-actions-box/message-actions-box.component.ts#L44) +[projects/stream-chat-angular/src/lib/message-actions-box/message-actions-box.component.ts:50](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-actions-box/message-actions-box.component.ts#L50) [//]: # "End of generated content" diff --git a/docusaurus/angular_versioned_docs/version-5/components/MessageComponent.mdx b/docusaurus/angular_versioned_docs/version-5/components/MessageComponent.mdx index 791469e2..0e8dbdd0 100644 --- a/docusaurus/angular_versioned_docs/version-5/components/MessageComponent.mdx +++ b/docusaurus/angular_versioned_docs/version-5/components/MessageComponent.mdx @@ -73,7 +73,7 @@ The message to be displayed #### Defined in -[projects/stream-chat-angular/src/lib/message/message.component.ts:58](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message/message.component.ts#L58) +[projects/stream-chat-angular/src/lib/message/message.component.ts:63](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message/message.component.ts#L63) --- @@ -85,7 +85,7 @@ The list of [channel capabilities](https://getstream.io/chat/docs/javascript/cha #### Defined in -[projects/stream-chat-angular/src/lib/message/message.component.ts:62](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message/message.component.ts#L62) +[projects/stream-chat-angular/src/lib/message/message.component.ts:67](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message/message.component.ts#L67) --- @@ -97,7 +97,7 @@ If `true`, the message status (sending, sent, who read the message) is displayed #### Defined in -[projects/stream-chat-angular/src/lib/message/message.component.ts:66](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message/message.component.ts#L66) +[projects/stream-chat-angular/src/lib/message/message.component.ts:71](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message/message.component.ts#L71) --- @@ -109,7 +109,7 @@ Determines if the message is being dispalyed in a channel or in a [thread](https #### Defined in -[projects/stream-chat-angular/src/lib/message/message.component.ts:70](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message/message.component.ts#L70) +[projects/stream-chat-angular/src/lib/message/message.component.ts:75](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message/message.component.ts#L75) --- @@ -121,6 +121,6 @@ Highlighting is used to add visual emphasize to a message when jumping to the me #### Defined in -[projects/stream-chat-angular/src/lib/message/message.component.ts:74](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message/message.component.ts#L74) +[projects/stream-chat-angular/src/lib/message/message.component.ts:79](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message/message.component.ts#L79) [//]: # "End of generated content" diff --git a/docusaurus/angular_versioned_docs/version-5/components/MessageInputComponent.mdx b/docusaurus/angular_versioned_docs/version-5/components/MessageInputComponent.mdx index a11b3507..7933cfc7 100644 --- a/docusaurus/angular_versioned_docs/version-5/components/MessageInputComponent.mdx +++ b/docusaurus/angular_versioned_docs/version-5/components/MessageInputComponent.mdx @@ -60,7 +60,7 @@ If file upload is enabled, the user can open a file selector from the input. Ple #### Defined in -[projects/stream-chat-angular/src/lib/message-input/message-input.component.ts:60](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-input/message-input.component.ts#L60) +[projects/stream-chat-angular/src/lib/message-input/message-input.component.ts:60](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-input/message-input.component.ts#L60) --- @@ -72,7 +72,7 @@ If true, users can mention other users in messages. You also [need to use the `A #### Defined in -[projects/stream-chat-angular/src/lib/message-input/message-input.component.ts:64](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-input/message-input.component.ts#L64) +[projects/stream-chat-angular/src/lib/message-input/message-input.component.ts:64](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-input/message-input.component.ts#L64) --- @@ -84,7 +84,7 @@ The scope for user mentions, either members of the current channel of members of #### Defined in -[projects/stream-chat-angular/src/lib/message-input/message-input.component.ts:68](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-input/message-input.component.ts#L68) +[projects/stream-chat-angular/src/lib/message-input/message-input.component.ts:68](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-input/message-input.component.ts#L68) --- @@ -96,7 +96,7 @@ Determines if the message is being dispalyed in a channel or in a [thread](https #### Defined in -[projects/stream-chat-angular/src/lib/message-input/message-input.component.ts:72](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-input/message-input.component.ts#L72) +[projects/stream-chat-angular/src/lib/message-input/message-input.component.ts:72](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-input/message-input.component.ts#L72) --- @@ -108,7 +108,7 @@ If true, users can select multiple files to upload. If no value is provided, it #### Defined in -[projects/stream-chat-angular/src/lib/message-input/message-input.component.ts:76](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-input/message-input.component.ts#L76) +[projects/stream-chat-angular/src/lib/message-input/message-input.component.ts:76](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-input/message-input.component.ts#L76) --- @@ -120,7 +120,7 @@ The message to edit #### Defined in -[projects/stream-chat-angular/src/lib/message-input/message-input.component.ts:80](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-input/message-input.component.ts#L80) +[projects/stream-chat-angular/src/lib/message-input/message-input.component.ts:80](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-input/message-input.component.ts#L80) --- @@ -132,7 +132,7 @@ An observable that can be used to trigger message sending from the outside #### Defined in -[projects/stream-chat-angular/src/lib/message-input/message-input.component.ts:84](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-input/message-input.component.ts#L84) +[projects/stream-chat-angular/src/lib/message-input/message-input.component.ts:84](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-input/message-input.component.ts#L84) --- @@ -144,7 +144,7 @@ In `desktop` mode the `Enter` key will trigger message sending, in `mobile` mode #### Defined in -[projects/stream-chat-angular/src/lib/message-input/message-input.component.ts:88](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-input/message-input.component.ts#L88) +[projects/stream-chat-angular/src/lib/message-input/message-input.component.ts:88](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-input/message-input.component.ts#L88) --- @@ -156,7 +156,7 @@ Enables or disables auto focus on the textarea element #### Defined in -[projects/stream-chat-angular/src/lib/message-input/message-input.component.ts:92](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-input/message-input.component.ts#L92) +[projects/stream-chat-angular/src/lib/message-input/message-input.component.ts:92](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-input/message-input.component.ts#L92) --- @@ -168,6 +168,6 @@ Emits when a message was successfuly sent or updated #### Defined in -[projects/stream-chat-angular/src/lib/message-input/message-input.component.ts:96](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-input/message-input.component.ts#L96) +[projects/stream-chat-angular/src/lib/message-input/message-input.component.ts:96](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-input/message-input.component.ts#L96) [//]: # "End of generated content" diff --git a/docusaurus/angular_versioned_docs/version-5/components/MessageListComponent.mdx b/docusaurus/angular_versioned_docs/version-5/components/MessageListComponent.mdx index 4c9799d3..bf656caf 100644 --- a/docusaurus/angular_versioned_docs/version-5/components/MessageListComponent.mdx +++ b/docusaurus/angular_versioned_docs/version-5/components/MessageListComponent.mdx @@ -33,7 +33,7 @@ Determines if the message list should display channel messages or [thread messag #### Defined in -[projects/stream-chat-angular/src/lib/message-list/message-list.component.ts:53](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-list/message-list.component.ts#L53) +[projects/stream-chat-angular/src/lib/message-list/message-list.component.ts:53](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-list/message-list.component.ts#L53) --- @@ -45,19 +45,7 @@ The direction of the messages in the list, `bottom-to-top` means newest message #### Defined in -[projects/stream-chat-angular/src/lib/message-list/message-list.component.ts:57](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-list/message-list.component.ts#L57) - ---- - -### messageOptionsTrigger - -• **messageOptionsTrigger**: `"message-row"` \| `"message-bubble"` = `'message-row'` - -Determines what triggers the appearance of the message options: by default you can hover (click on mobile) anywhere in the row of the message (`message-row` option), or you can set `message-bubble`, in that case only a hover (click on mobile) in the message bubble will trigger the options to appear. - -#### Defined in - -[projects/stream-chat-angular/src/lib/message-list/message-list.component.ts:61](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-list/message-list.component.ts#L61) +[projects/stream-chat-angular/src/lib/message-list/message-list.component.ts:57](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-list/message-list.component.ts#L57) --- @@ -69,7 +57,7 @@ You can hide the "jump to latest" button while scrolling. A potential use-case f #### Defined in -[projects/stream-chat-angular/src/lib/message-list/message-list.component.ts:67](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-list/message-list.component.ts#L67) +[projects/stream-chat-angular/src/lib/message-list/message-list.component.ts:62](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-list/message-list.component.ts#L62) --- @@ -81,7 +69,7 @@ If `true` date separators will be displayed #### Defined in -[projects/stream-chat-angular/src/lib/message-list/message-list.component.ts:71](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-list/message-list.component.ts#L71) +[projects/stream-chat-angular/src/lib/message-list/message-list.component.ts:66](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-list/message-list.component.ts#L66) --- @@ -93,7 +81,7 @@ If `true` unread indicator will be displayed #### Defined in -[projects/stream-chat-angular/src/lib/message-list/message-list.component.ts:75](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-list/message-list.component.ts#L75) +[projects/stream-chat-angular/src/lib/message-list/message-list.component.ts:70](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-list/message-list.component.ts#L70) --- @@ -105,7 +93,7 @@ If date separators are displayed, you can set the horizontal position of the dat #### Defined in -[projects/stream-chat-angular/src/lib/message-list/message-list.component.ts:79](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-list/message-list.component.ts#L79) +[projects/stream-chat-angular/src/lib/message-list/message-list.component.ts:74](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-list/message-list.component.ts#L74) --- @@ -117,7 +105,7 @@ If date separators are displayed, you can set the horizontal position of the dat #### Defined in -[projects/stream-chat-angular/src/lib/message-list/message-list.component.ts:83](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-list/message-list.component.ts#L83) +[projects/stream-chat-angular/src/lib/message-list/message-list.component.ts:78](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-list/message-list.component.ts#L78) --- @@ -131,7 +119,7 @@ This is only applicable for `main` mode, as threads doesn't have read infromatio #### Defined in -[projects/stream-chat-angular/src/lib/message-list/message-list.component.ts:90](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-list/message-list.component.ts#L90) +[projects/stream-chat-angular/src/lib/message-list/message-list.component.ts:85](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-list/message-list.component.ts#L85) --- @@ -143,6 +131,16 @@ You can turn on and off the loading indicator that signals to users that more me #### Defined in -[projects/stream-chat-angular/src/lib/message-list/message-list.component.ts:94](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-list/message-list.component.ts#L94) +[projects/stream-chat-angular/src/lib/message-list/message-list.component.ts:89](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-list/message-list.component.ts#L89) + +--- + +### limitNumberOfMessagesInList + +• **limitNumberOfMessagesInList**: `boolean` = `true` + +#### Defined in + +[projects/stream-chat-angular/src/lib/message-list/message-list.component.ts:93](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-list/message-list.component.ts#L93) [//]: # "End of generated content" diff --git a/docusaurus/angular_versioned_docs/version-5/components/MessageReactionsComponent.mdx b/docusaurus/angular_versioned_docs/version-5/components/MessageReactionsComponent.mdx index 73672101..dd12c91b 100644 --- a/docusaurus/angular_versioned_docs/version-5/components/MessageReactionsComponent.mdx +++ b/docusaurus/angular_versioned_docs/version-5/components/MessageReactionsComponent.mdx @@ -1,8 +1,7 @@ import MessageReactionsScreenshot from "../assets/message-reactions-screenshot.png"; import MessageReactionsDetailsScreenshot from "../assets/reaction-details.png"; -import MessageReactionsSelectorScreenshot from "../assets/message-reactions-selector-screenshot.png"; -The `MessageReactions` component displays the reactions of a message, the current user can add and remove reactions. You can read more about [message reactions](https://getstream.io/chat/docs/javascript/send_reaction/?language=javascript) in the platform documentation. +The `MessageReactions` component displays the reactions of a message. You can read more about [message reactions](https://getstream.io/chat/docs/javascript/send_reaction/?language=javascript) in the platform documentation. **Example 1** - displaying reactions of a message: @@ -12,10 +11,6 @@ The `MessageReactions` component displays the reactions of a message, the curren -**Example 3** - adding/removing a reaction: - - - ## Basic usage A typical use case for the `MessageReactions` component would be to use in your custom components that will completely override the message component. @@ -25,7 +20,6 @@ A typical use case for the `MessageReactions` component would be to use in your selector: "app-custom-message", template: ` - -Indicates if the selector should be opened or closed. Adding a UI element to open and close the selector is the parent's component responsibility. - -#### Defined in - -[projects/stream-chat-angular/src/lib/message-reactions/message-reactions.component.ts:57](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-reactions/message-reactions.component.ts#L57) +[projects/stream-chat-angular/src/lib/message-reactions/message-reactions.component.ts:46](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-reactions/message-reactions.component.ts#L46) [//]: # "End of generated content" diff --git a/docusaurus/angular_versioned_docs/version-5/components/MessageReactionsSelectorComponent.mdx b/docusaurus/angular_versioned_docs/version-5/components/MessageReactionsSelectorComponent.mdx new file mode 100644 index 00000000..4cd4914a --- /dev/null +++ b/docusaurus/angular_versioned_docs/version-5/components/MessageReactionsSelectorComponent.mdx @@ -0,0 +1,63 @@ +import MessageReactionsSelectorScreenshot from "../assets/message-reactions-selector-screenshot.png"; + +The `MessageReactionsSelectorComponent` makes it possible for users to react to a message, the reaction options can be set using the [`MessageReactionsService`](../../services/MessageReactionsService). You can read more about [message reactions](https://getstream.io/chat/docs/javascript/send_reaction/?language=javascript) in the platform documentation. + +**Example** - reacting to a message + + + +The `MessageReactionsSelectorComponent` is displayed inside the built-in [`MessageActionsBoxComponent`](../../components/MessageActionsBoxComponent). + +## Basic usage + +A typical use case for the `MessageReactionsSelectorComponent` would be to use in your custom components that will completely override the message component. + +```typescript +@Component({ + selector: "app-custom-message", + template: ` + + + `, +}) +export class CustomMessageComponent { + @Input() message: StreamMessage; +} +``` + +## Customization + +You can override the default reaction options using the [`MessageReactionsService`](../services/MessageReactionsService.mdx). + +You can provide your own message reaction selector component by the [`CustomTemplatesService`](../services/CustomTemplatesService.mdx). + +[//]: # "Start of generated content" + +## Inputs and outputs + +### ownReactions + +• **ownReactions**: `ReactionResponse`\<`DefaultStreamChatGenerics`\>[] = `[]` + +List of the user's own reactions of a [message](../types/stream-message.mdx), used to display the users of a reaction type. + +#### Defined in + +[projects/stream-chat-angular/src/lib/message-reactions-selector/message-reactions-selector.component.ts:29](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-reactions-selector/message-reactions-selector.component.ts#L29) + +--- + +### messageId + +• **messageId**: `undefined` \| `string` + +The id of the message the reactions belong to + +#### Defined in + +[projects/stream-chat-angular/src/lib/message-reactions-selector/message-reactions-selector.component.ts:33](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-reactions-selector/message-reactions-selector.component.ts#L33) + +[//]: # "End of generated content" diff --git a/docusaurus/angular_versioned_docs/version-5/components/ModalComponent.mdx b/docusaurus/angular_versioned_docs/version-5/components/ModalComponent.mdx index 5678af94..dc55e26e 100644 --- a/docusaurus/angular_versioned_docs/version-5/components/ModalComponent.mdx +++ b/docusaurus/angular_versioned_docs/version-5/components/ModalComponent.mdx @@ -28,7 +28,7 @@ If `true` the modal will be displayed, if `false` the modal will be hidden #### Defined in -[projects/stream-chat-angular/src/lib/modal/modal.component.ts:25](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/modal/modal.component.ts#L25) +[projects/stream-chat-angular/src/lib/modal/modal.component.ts:25](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/modal/modal.component.ts#L25) --- @@ -40,7 +40,7 @@ The content of the modal (can also be provided using `ng-content`) #### Defined in -[projects/stream-chat-angular/src/lib/modal/modal.component.ts:29](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/modal/modal.component.ts#L29) +[projects/stream-chat-angular/src/lib/modal/modal.component.ts:29](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/modal/modal.component.ts#L29) --- @@ -52,6 +52,6 @@ Emits `true` if the modal becomes visible, and `false` if the modal is closed. #### Defined in -[projects/stream-chat-angular/src/lib/modal/modal.component.ts:33](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/modal/modal.component.ts#L33) +[projects/stream-chat-angular/src/lib/modal/modal.component.ts:33](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/modal/modal.component.ts#L33) [//]: # "End of generated content" diff --git a/docusaurus/angular_versioned_docs/version-5/components/NotificationComponent.mdx b/docusaurus/angular_versioned_docs/version-5/components/NotificationComponent.mdx index 4cc1203e..7012176f 100644 --- a/docusaurus/angular_versioned_docs/version-5/components/NotificationComponent.mdx +++ b/docusaurus/angular_versioned_docs/version-5/components/NotificationComponent.mdx @@ -24,7 +24,7 @@ The type of the notification #### Defined in -[projects/stream-chat-angular/src/lib/notification/notification.component.ts:16](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/notification/notification.component.ts#L16) +[projects/stream-chat-angular/src/lib/notification/notification.component.ts:16](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/notification/notification.component.ts#L16) --- @@ -36,6 +36,6 @@ The content of the notification (can also be provided using `ng-content`) #### Defined in -[projects/stream-chat-angular/src/lib/notification/notification.component.ts:20](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/notification/notification.component.ts#L20) +[projects/stream-chat-angular/src/lib/notification/notification.component.ts:20](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/notification/notification.component.ts#L20) [//]: # "End of generated content" diff --git a/docusaurus/angular_versioned_docs/version-5/components/TextareaComponent.mdx b/docusaurus/angular_versioned_docs/version-5/components/TextareaComponent.mdx index 19d669b8..f9a46a17 100644 --- a/docusaurus/angular_versioned_docs/version-5/components/TextareaComponent.mdx +++ b/docusaurus/angular_versioned_docs/version-5/components/TextareaComponent.mdx @@ -48,7 +48,7 @@ TextareaInterface.value #### Defined in -[projects/stream-chat-angular/src/lib/message-input/textarea/textarea.component.ts:35](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-input/textarea/textarea.component.ts#L35) +[projects/stream-chat-angular/src/lib/message-input/textarea/textarea.component.ts:35](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-input/textarea/textarea.component.ts#L35) --- @@ -64,7 +64,7 @@ TextareaInterface.placeholder #### Defined in -[projects/stream-chat-angular/src/lib/message-input/textarea/textarea.component.ts:39](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-input/textarea/textarea.component.ts#L39) +[projects/stream-chat-angular/src/lib/message-input/textarea/textarea.component.ts:39](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-input/textarea/textarea.component.ts#L39) --- @@ -80,7 +80,7 @@ TextareaInterface.inputMode #### Defined in -[projects/stream-chat-angular/src/lib/message-input/textarea/textarea.component.ts:43](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-input/textarea/textarea.component.ts#L43) +[projects/stream-chat-angular/src/lib/message-input/textarea/textarea.component.ts:43](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-input/textarea/textarea.component.ts#L43) --- @@ -96,7 +96,7 @@ TextareaInterface.autoFocus #### Defined in -[projects/stream-chat-angular/src/lib/message-input/textarea/textarea.component.ts:47](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-input/textarea/textarea.component.ts#L47) +[projects/stream-chat-angular/src/lib/message-input/textarea/textarea.component.ts:47](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-input/textarea/textarea.component.ts#L47) --- @@ -112,7 +112,7 @@ TextareaInterface.valueChange #### Defined in -[projects/stream-chat-angular/src/lib/message-input/textarea/textarea.component.ts:51](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-input/textarea/textarea.component.ts#L51) +[projects/stream-chat-angular/src/lib/message-input/textarea/textarea.component.ts:51](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-input/textarea/textarea.component.ts#L51) --- @@ -128,6 +128,6 @@ TextareaInterface.send #### Defined in -[projects/stream-chat-angular/src/lib/message-input/textarea/textarea.component.ts:55](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-input/textarea/textarea.component.ts#L55) +[projects/stream-chat-angular/src/lib/message-input/textarea/textarea.component.ts:55](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-input/textarea/textarea.component.ts#L55) [//]: # "End of generated content" diff --git a/docusaurus/angular_versioned_docs/version-5/components/VoiceRecordingComponent.mdx b/docusaurus/angular_versioned_docs/version-5/components/VoiceRecordingComponent.mdx index eeaf3420..bd7a2459 100644 --- a/docusaurus/angular_versioned_docs/version-5/components/VoiceRecordingComponent.mdx +++ b/docusaurus/angular_versioned_docs/version-5/components/VoiceRecordingComponent.mdx @@ -82,6 +82,6 @@ The voice recording attachment #### Defined in -[projects/stream-chat-angular/src/lib/voice-recording/voice-recording.component.ts:28](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/voice-recording/voice-recording.component.ts#L28) +[projects/stream-chat-angular/src/lib/voice-recording/voice-recording.component.ts:28](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/voice-recording/voice-recording.component.ts#L28) [//]: # "End of generated content" diff --git a/docusaurus/angular_versioned_docs/version-5/components/VoiceRecordingWavebarComponent.mdx b/docusaurus/angular_versioned_docs/version-5/components/VoiceRecordingWavebarComponent.mdx index 9e5d1242..4011d854 100644 --- a/docusaurus/angular_versioned_docs/version-5/components/VoiceRecordingWavebarComponent.mdx +++ b/docusaurus/angular_versioned_docs/version-5/components/VoiceRecordingWavebarComponent.mdx @@ -34,7 +34,7 @@ The audio element that plays the voice recording #### Defined in -[projects/stream-chat-angular/src/lib/voice-recording/voice-recording-wavebar/voice-recording-wavebar.component.ts:28](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/voice-recording/voice-recording-wavebar/voice-recording-wavebar.component.ts#L28) +[projects/stream-chat-angular/src/lib/voice-recording/voice-recording-wavebar/voice-recording-wavebar.component.ts:28](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/voice-recording/voice-recording-wavebar/voice-recording-wavebar.component.ts#L28) --- @@ -46,7 +46,7 @@ The waveform data to visualize #### Defined in -[projects/stream-chat-angular/src/lib/voice-recording/voice-recording-wavebar/voice-recording-wavebar.component.ts:32](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/voice-recording/voice-recording-wavebar/voice-recording-wavebar.component.ts#L32) +[projects/stream-chat-angular/src/lib/voice-recording/voice-recording-wavebar/voice-recording-wavebar.component.ts:32](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/voice-recording/voice-recording-wavebar/voice-recording-wavebar.component.ts#L32) --- @@ -58,6 +58,6 @@ The duration of the voice recording in seconds #### Defined in -[projects/stream-chat-angular/src/lib/voice-recording/voice-recording-wavebar/voice-recording-wavebar.component.ts:36](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/voice-recording/voice-recording-wavebar/voice-recording-wavebar.component.ts#L36) +[projects/stream-chat-angular/src/lib/voice-recording/voice-recording-wavebar/voice-recording-wavebar.component.ts:36](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/voice-recording/voice-recording-wavebar/voice-recording-wavebar.component.ts#L36) [//]: # "End of generated content" diff --git a/docusaurus/angular_versioned_docs/version-5/concepts/message-interactions.mdx b/docusaurus/angular_versioned_docs/version-5/concepts/message-interactions.mdx index 825599dd..812c9aac 100644 --- a/docusaurus/angular_versioned_docs/version-5/concepts/message-interactions.mdx +++ b/docusaurus/angular_versioned_docs/version-5/concepts/message-interactions.mdx @@ -6,15 +6,15 @@ title: Message interactions Users can interact with the messages in the message list. The following table provides a list of possible interactions together with the [necessary capabilities](https://getstream.io/chat/docs/javascript/channel_capabilities/?language=javascript) and the corresponding components: -| Description | Necessary channel capability | Component | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------- | ------------------------------------------------------------------- | -| [Flags](https://getstream.io/chat/docs/javascript/moderation/?language=javascript) the given message | flag-message | [`MessageActionsBox`](../components/MessageActionsBoxComponent.mdx) | -| Edits a message that belongs to the user | update-own-message or update-any-message | [`MessageActionsBox`](../components/MessageActionsBoxComponent.mdx) | -| Edits any message | update-any-message | [`MessageActionsBox`](../components/MessageActionsBoxComponent.mdx) | -| Deletes a message that belongs to the user | delete-own-message or delete-any-message | [`MessageActionsBox`](../components/MessageActionsBoxComponent.mdx) | -| Deletes any message | delete-any-message | [`MessageActionsBox`](../components/MessageActionsBoxComponent.mdx) | -| Send reaction to a message | send-reaction | [`MessageReactions`](../components/MessageReactionsComponent.mdx) | -| Receive read events | read-events | [`Message`](../components/MessageComponent.mdx) | -| Reply to a message in a thread | send-reply | [`Message`](../components/MessageComponent.mdx) | -| Quote reply to a message | quote-message | [`MessageActionsBox`](../components/MessageActionsBoxComponent.mdx) | -| Mark a message as unread | read-events | [`MessageActionsBox`](../components/MessageActionsBoxComponent.mdx) | +| Description | Necessary channel capability | Component | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------- | --------------------------------------------------------------------------------- | +| [Flags](https://getstream.io/chat/docs/javascript/moderation/?language=javascript) the given message | flag-message | [`MessageActionsBox`](../components/MessageActionsBoxComponent.mdx) | +| Edits a message that belongs to the user | update-own-message or update-any-message | [`MessageActionsBox`](../components/MessageActionsBoxComponent.mdx) | +| Edits any message | update-any-message | [`MessageActionsBox`](../components/MessageActionsBoxComponent.mdx) | +| Deletes a message that belongs to the user | delete-own-message or delete-any-message | [`MessageActionsBox`](../components/MessageActionsBoxComponent.mdx) | +| Deletes any message | delete-any-message | [`MessageActionsBox`](../components/MessageActionsBoxComponent.mdx) | +| Send reaction to a message | send-reaction | [`MessageReactionsSelector`](../components/MessageReactionsSelectorComponent.mdx) | +| Receive read events | read-events | [`Message`](../components/MessageComponent.mdx) | +| Reply to a message in a thread | send-reply | [`MessageActionsBox`](../components/MessageActionsBoxComponent.mdx) | +| Quote reply to a message | quote-message | [`MessageActionsBox`](../components/MessageActionsBoxComponent.mdx) | +| Mark a message as unread | read-events | [`MessageActionsBox`](../components/MessageActionsBoxComponent.mdx) | diff --git a/docusaurus/angular_versioned_docs/version-5/services/AttachmentConfigurationService.mdx b/docusaurus/angular_versioned_docs/version-5/services/AttachmentConfigurationService.mdx index 5f0c5800..84af7c6b 100644 --- a/docusaurus/angular_versioned_docs/version-5/services/AttachmentConfigurationService.mdx +++ b/docusaurus/angular_versioned_docs/version-5/services/AttachmentConfigurationService.mdx @@ -32,7 +32,7 @@ A custom handler can be provided to override the default giphy attachment (GIFs #### Defined in -[projects/stream-chat-angular/src/lib/attachment-configuration.service.ts:37](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/attachment-configuration.service.ts#L37) +[projects/stream-chat-angular/src/lib/attachment-configuration.service.ts:37](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/attachment-configuration.service.ts#L37) --- @@ -60,7 +60,7 @@ A custom handler can be provided to override the default image attachment (image #### Defined in -[projects/stream-chat-angular/src/lib/attachment-configuration.service.ts:22](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/attachment-configuration.service.ts#L22) +[projects/stream-chat-angular/src/lib/attachment-configuration.service.ts:22](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/attachment-configuration.service.ts#L22) --- @@ -86,7 +86,7 @@ A custom handler can be provided to override the default scraped image attachmen #### Defined in -[projects/stream-chat-angular/src/lib/attachment-configuration.service.ts:43](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/attachment-configuration.service.ts#L43) +[projects/stream-chat-angular/src/lib/attachment-configuration.service.ts:43](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/attachment-configuration.service.ts#L43) --- @@ -113,7 +113,7 @@ A custom handler can be provided to override the default video attachment (video #### Defined in -[projects/stream-chat-angular/src/lib/attachment-configuration.service.ts:30](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/attachment-configuration.service.ts#L30) +[projects/stream-chat-angular/src/lib/attachment-configuration.service.ts:30](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/attachment-configuration.service.ts#L30) --- @@ -125,7 +125,7 @@ You can turn on/off thumbnail generation for video attachments #### Defined in -[projects/stream-chat-angular/src/lib/attachment-configuration.service.ts:49](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/attachment-configuration.service.ts#L49) +[projects/stream-chat-angular/src/lib/attachment-configuration.service.ts:49](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/attachment-configuration.service.ts#L49) ## Methods @@ -147,7 +147,7 @@ Handles the configuration for giphy attachments, it's possible to provide your o #### Defined in -[projects/stream-chat-angular/src/lib/attachment-configuration.service.ts:180](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/attachment-configuration.service.ts#L180) +[projects/stream-chat-angular/src/lib/attachment-configuration.service.ts:180](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/attachment-configuration.service.ts#L180) --- @@ -171,7 +171,7 @@ Handles the configuration for image attachments, it's possible to provide your o #### Defined in -[projects/stream-chat-angular/src/lib/attachment-configuration.service.ts:57](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/attachment-configuration.service.ts#L57) +[projects/stream-chat-angular/src/lib/attachment-configuration.service.ts:57](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/attachment-configuration.service.ts#L57) --- @@ -193,7 +193,7 @@ Handles the configuration for scraped image attachments, it's possible to provid #### Defined in -[projects/stream-chat-angular/src/lib/attachment-configuration.service.ts:200](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/attachment-configuration.service.ts#L200) +[projects/stream-chat-angular/src/lib/attachment-configuration.service.ts:200](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/attachment-configuration.service.ts#L200) --- @@ -216,4 +216,4 @@ Handles the configuration for video attachments, it's possible to provide your o #### Defined in -[projects/stream-chat-angular/src/lib/attachment-configuration.service.ts:123](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/attachment-configuration.service.ts#L123) +[projects/stream-chat-angular/src/lib/attachment-configuration.service.ts:123](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/attachment-configuration.service.ts#L123) diff --git a/docusaurus/angular_versioned_docs/version-5/services/AttachmentService.mdx b/docusaurus/angular_versioned_docs/version-5/services/AttachmentService.mdx index 1d2541fa..21540c79 100644 --- a/docusaurus/angular_versioned_docs/version-5/services/AttachmentService.mdx +++ b/docusaurus/angular_versioned_docs/version-5/services/AttachmentService.mdx @@ -18,7 +18,7 @@ Emits the number of uploads in progress. #### Defined in -[projects/stream-chat-angular/src/lib/attachment.service.ts:22](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/attachment.service.ts#L22) +[projects/stream-chat-angular/src/lib/attachment.service.ts:22](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/attachment.service.ts#L22) --- @@ -30,7 +30,7 @@ Emits the state of the uploads ([`AttachmentUpload[]`](https://github.com/GetStr #### Defined in -[projects/stream-chat-angular/src/lib/attachment.service.ts:26](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/attachment.service.ts#L26) +[projects/stream-chat-angular/src/lib/attachment.service.ts:26](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/attachment.service.ts#L26) ## Methods @@ -54,7 +54,7 @@ Note: If you just want to use your own CDN for file uploads, you don't necessary #### Defined in -[projects/stream-chat-angular/src/lib/attachment.service.ts:102](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/attachment.service.ts#L102) +[projects/stream-chat-angular/src/lib/attachment.service.ts:102](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/attachment.service.ts#L102) --- @@ -76,7 +76,7 @@ Maps attachments received from the Stream API to uploads. This is useful when ed #### Defined in -[projects/stream-chat-angular/src/lib/attachment.service.ts:188](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/attachment.service.ts#L188) +[projects/stream-chat-angular/src/lib/attachment.service.ts:188](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/attachment.service.ts#L188) --- @@ -98,7 +98,7 @@ Deletes an attachment, the attachment can have any state (`error`, `uploading` o #### Defined in -[projects/stream-chat-angular/src/lib/attachment.service.ts:127](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/attachment.service.ts#L127) +[projects/stream-chat-angular/src/lib/attachment.service.ts:127](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/attachment.service.ts#L127) --- @@ -122,7 +122,7 @@ A promise with the result #### Defined in -[projects/stream-chat-angular/src/lib/attachment.service.ts:54](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/attachment.service.ts#L54) +[projects/stream-chat-angular/src/lib/attachment.service.ts:54](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/attachment.service.ts#L54) --- @@ -140,7 +140,7 @@ the attachments #### Defined in -[projects/stream-chat-angular/src/lib/attachment.service.ts:157](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/attachment.service.ts#L157) +[projects/stream-chat-angular/src/lib/attachment.service.ts:157](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/attachment.service.ts#L157) --- @@ -156,7 +156,7 @@ Resets the attachments uploads (for example after the message with the attachmen #### Defined in -[projects/stream-chat-angular/src/lib/attachment.service.ts:45](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/attachment.service.ts#L45) +[projects/stream-chat-angular/src/lib/attachment.service.ts:45](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/attachment.service.ts#L45) --- @@ -180,4 +180,4 @@ A promise with the result #### Defined in -[projects/stream-chat-angular/src/lib/attachment.service.ts:112](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/attachment.service.ts#L112) +[projects/stream-chat-angular/src/lib/attachment.service.ts:112](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/attachment.service.ts#L112) diff --git a/docusaurus/angular_versioned_docs/version-5/services/ChannelService.mdx b/docusaurus/angular_versioned_docs/version-5/services/ChannelService.mdx index ae50d942..8ca6de0c 100644 --- a/docusaurus/angular_versioned_docs/version-5/services/ChannelService.mdx +++ b/docusaurus/angular_versioned_docs/version-5/services/ChannelService.mdx @@ -24,7 +24,7 @@ The active channel will always be marked as read when a new message is received #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:97](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L97) +[projects/stream-chat-angular/src/lib/channel.service.ts:97](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L97) --- @@ -38,7 +38,7 @@ This property isn't always updated, please use `channel.read` to display up-to-d #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:149](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L149) +[projects/stream-chat-angular/src/lib/channel.service.ts:149](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L149) --- @@ -50,7 +50,7 @@ Emits the list of currently loaded messages of the active channel. #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:101](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L101) +[projects/stream-chat-angular/src/lib/channel.service.ts:101](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L101) --- @@ -62,7 +62,7 @@ Emits the list of pinned messages of the active channel. #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:105](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L105) +[projects/stream-chat-angular/src/lib/channel.service.ts:105](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L105) --- @@ -76,7 +76,7 @@ This property isn't always updated, please use `channel.read` to display up-to-d #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:155](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L155) +[projects/stream-chat-angular/src/lib/channel.service.ts:155](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L155) --- @@ -88,7 +88,7 @@ Emits the currently selected parent message. If no message is selected, it emits #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:117](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L117) +[projects/stream-chat-angular/src/lib/channel.service.ts:117](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L117) --- @@ -100,7 +100,7 @@ Emits the id of the currently selected parent message. If no message is selected #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:109](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L109) +[projects/stream-chat-angular/src/lib/channel.service.ts:109](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L109) --- @@ -112,7 +112,7 @@ Emits the list of currently loaded thread replies belonging to the selected pare #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:113](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L113) +[projects/stream-chat-angular/src/lib/channel.service.ts:113](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L113) --- @@ -138,7 +138,7 @@ The provided method will be called before a new message is sent to Stream's API. #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:304](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L304) +[projects/stream-chat-angular/src/lib/channel.service.ts:304](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L304) --- @@ -164,7 +164,7 @@ The provided method will be called before a message is sent to Stream's API for #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:310](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L310) +[projects/stream-chat-angular/src/lib/channel.service.ts:310](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L310) --- @@ -178,7 +178,7 @@ If a message is bounced, it will be emitted via this `Observable`. The built-in #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:143](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L143) +[projects/stream-chat-angular/src/lib/channel.service.ts:143](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L143) --- @@ -190,7 +190,7 @@ The result of the latest channel query request. #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:87](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L87) +[projects/stream-chat-angular/src/lib/channel.service.ts:87](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L87) --- @@ -224,7 +224,7 @@ Our platform documentation covers the topic of [channel events](https://getstrea #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:83](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L83) +[projects/stream-chat-angular/src/lib/channel.service.ts:83](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L83) --- @@ -251,7 +251,7 @@ Custom event handler to call when the user is added to a channel, provide an eve #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:169](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L169) +[projects/stream-chat-angular/src/lib/channel.service.ts:169](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L169) --- @@ -282,7 +282,7 @@ Custom event handler to call when a channel is deleted, provide an event handler #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:189](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L189) +[projects/stream-chat-angular/src/lib/channel.service.ts:189](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L189) --- @@ -313,7 +313,7 @@ Custom event handler to call when a channel becomes hidden, provide an event han #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:231](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L231) +[projects/stream-chat-angular/src/lib/channel.service.ts:231](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L231) --- @@ -344,7 +344,7 @@ Custom event handler to call when a channel is truncated, provide an event handl #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:217](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L217) +[projects/stream-chat-angular/src/lib/channel.service.ts:217](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L217) --- @@ -375,7 +375,7 @@ Custom event handler to call when a channel is updated, provide an event handler #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:203](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L203) +[projects/stream-chat-angular/src/lib/channel.service.ts:203](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L203) --- @@ -406,7 +406,7 @@ Custom event handler to call when a channel becomes visible, provide an event ha #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:245](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L245) +[projects/stream-chat-angular/src/lib/channel.service.ts:245](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L245) --- @@ -433,7 +433,7 @@ You can override the default file delete request - override this if you use your #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:287](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L287) +[projects/stream-chat-angular/src/lib/channel.service.ts:287](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L287) --- @@ -460,7 +460,7 @@ You can override the default file upload request - you can use this to upload fi #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:273](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L273) +[projects/stream-chat-angular/src/lib/channel.service.ts:273](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L273) --- @@ -487,7 +487,7 @@ You can override the default image delete request - override this if you use you #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:291](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L291) +[projects/stream-chat-angular/src/lib/channel.service.ts:291](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L291) --- @@ -514,7 +514,7 @@ You can override the default image upload request - you can use this to upload i #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:280](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L280) +[projects/stream-chat-angular/src/lib/channel.service.ts:280](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L280) --- @@ -545,7 +545,7 @@ Custom event handler to call if a new message received from a channel that is be #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:259](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L259) +[projects/stream-chat-angular/src/lib/channel.service.ts:259](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L259) --- @@ -572,7 +572,7 @@ Custom event handler to call if a new message received from a channel that is no #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:159](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L159) +[projects/stream-chat-angular/src/lib/channel.service.ts:159](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L159) --- @@ -602,7 +602,7 @@ You can return either an offset, or a filter using the [`$lte`/`$gte` operator]( #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:320](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L320) +[projects/stream-chat-angular/src/lib/channel.service.ts:320](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L320) --- @@ -629,7 +629,7 @@ Custom event handler to call when the user is removed from a channel, provide an #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:179](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L179) +[projects/stream-chat-angular/src/lib/channel.service.ts:179](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L179) --- @@ -641,7 +641,7 @@ Emits `false` if there are no more pages of channels that can be loaded. #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:56](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L56) +[projects/stream-chat-angular/src/lib/channel.service.ts:56](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L56) --- @@ -653,7 +653,7 @@ Emits the ID of the message the message list should jump to (can be a channel me #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:125](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L125) +[projects/stream-chat-angular/src/lib/channel.service.ts:125](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L125) --- @@ -665,7 +665,7 @@ Emits a map that contains the date of the latest message sent by the current use #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:137](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L137) +[projects/stream-chat-angular/src/lib/channel.service.ts:137](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L137) --- @@ -691,7 +691,7 @@ The provided method will be called before deleting a message. If the returned Pr #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:298](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L298) +[projects/stream-chat-angular/src/lib/channel.service.ts:298](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L298) --- @@ -703,7 +703,7 @@ Emits the currently selected message to quote #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:121](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L121) +[projects/stream-chat-angular/src/lib/channel.service.ts:121](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L121) --- @@ -715,7 +715,7 @@ Emits the list of users that are currently typing in the channel (current user i #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:129](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L129) +[projects/stream-chat-angular/src/lib/channel.service.ts:129](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L129) --- @@ -727,7 +727,17 @@ Emits the list of users that are currently typing in the active thread (current #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:133](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L133) +[projects/stream-chat-angular/src/lib/channel.service.ts:133](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L133) + +--- + +### MAX_MESSAGE_COUNT_IN_MESSAGE_LIST + +▪ `Static` `Readonly` **MAX_MESSAGE_COUNT_IN_MESSAGE_LIST**: `250` + +#### Defined in + +[projects/stream-chat-angular/src/lib/channel.service.ts:324](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L324) --- @@ -735,11 +745,9 @@ Emits the list of users that are currently typing in the active thread (current ▪ `Static` `Readonly` **MAX_MESSAGE_REACTIONS_TO_FETCH**: `1200` -internal - #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:324](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L324) +[projects/stream-chat-angular/src/lib/channel.service.ts:328](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L328) ## Accessors @@ -755,7 +763,7 @@ The current active channel #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:1520](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L1520) +[projects/stream-chat-angular/src/lib/channel.service.ts:1553](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L1553) --- @@ -771,7 +779,7 @@ The current active channel messages #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:1527](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L1527) +[projects/stream-chat-angular/src/lib/channel.service.ts:1560](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L1560) --- @@ -787,7 +795,7 @@ The current list of channels #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:1513](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L1513) +[projects/stream-chat-angular/src/lib/channel.service.ts:1546](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L1546) --- @@ -803,7 +811,7 @@ If set to false, read events won't be sent as new messages are received. If set #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:495](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L495) +[projects/stream-chat-angular/src/lib/channel.service.ts:521](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L521) • `set` **shouldMarkActiveChannelAsRead**(`shouldMarkActiveChannelAsRead`): `void` @@ -821,7 +829,7 @@ If set to false, read events won't be sent as new messages are received. If set #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:502](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L502) +[projects/stream-chat-angular/src/lib/channel.service.ts:528](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L528) ## Methods @@ -844,7 +852,7 @@ The channel will be added to the beginning of the channel list #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:1051](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L1051) +[projects/stream-chat-angular/src/lib/channel.service.ts:1077](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L1077) --- @@ -868,7 +876,7 @@ Adds a reaction to a message. #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:742](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L742) +[projects/stream-chat-angular/src/lib/channel.service.ts:768](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L768) --- @@ -892,7 +900,23 @@ The list of members matching the search filter #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:978](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L978) +[projects/stream-chat-angular/src/lib/channel.service.ts:1004](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L1004) + +--- + +### clearMessageJump + +▸ **clearMessageJump**(): `void` + +Clears the currently selected message to jump + +#### Returns + +`void` + +#### Defined in + +[projects/stream-chat-angular/src/lib/channel.service.ts:1201](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L1201) --- @@ -914,7 +938,7 @@ Deletes an uploaded file by URL. If you want to know more about [file uploads](h #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:962](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L962) +[projects/stream-chat-angular/src/lib/channel.service.ts:988](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L988) --- @@ -937,7 +961,7 @@ Deletes the message from the active channel #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:864](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L864) +[projects/stream-chat-angular/src/lib/channel.service.ts:890](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L890) --- @@ -953,7 +977,7 @@ Deselects the currently active (if any) channel #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:549](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L549) +[projects/stream-chat-angular/src/lib/channel.service.ts:575](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L575) --- @@ -977,7 +1001,7 @@ all reactions of a message #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:1536](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L1536) +[projects/stream-chat-angular/src/lib/channel.service.ts:1569](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L1569) --- @@ -1004,7 +1028,7 @@ the list of channels found by the query #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:679](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L679) +[projects/stream-chat-angular/src/lib/channel.service.ts:705](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L705) --- @@ -1027,7 +1051,7 @@ Jumps to the selected message inside the message list, if the message is not yet #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:1147](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L1147) +[projects/stream-chat-angular/src/lib/channel.service.ts:1173](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L1173) --- @@ -1043,7 +1067,7 @@ Loads the next page of channels. The page size can be set in the [query option]( #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:732](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L732) +[projects/stream-chat-angular/src/lib/channel.service.ts:758](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L758) --- @@ -1065,7 +1089,7 @@ Loads the next page of messages of the active channel. The page size can be set #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:610](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L610) +[projects/stream-chat-angular/src/lib/channel.service.ts:636](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L636) --- @@ -1087,7 +1111,7 @@ Loads the next page of messages of the active thread. The page size can be set i #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:649](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L649) +[projects/stream-chat-angular/src/lib/channel.service.ts:675](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L675) --- @@ -1111,7 +1135,7 @@ the result of the request #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:1569](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L1569) +[projects/stream-chat-angular/src/lib/channel.service.ts:1602](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L1602) --- @@ -1133,7 +1157,23 @@ Pins the given message in the channel #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:1176](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L1176) +[projects/stream-chat-angular/src/lib/channel.service.ts:1209](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L1209) + +--- + +### removeOldMessageFromMessageList + +▸ **removeOldMessageFromMessageList**(): `void` + +internal + +#### Returns + +`void` + +#### Defined in + +[projects/stream-chat-angular/src/lib/channel.service.ts:499](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L499) --- @@ -1156,7 +1196,7 @@ Removes a reaction from a message. #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:758](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L758) +[projects/stream-chat-angular/src/lib/channel.service.ts:784](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L784) --- @@ -1178,7 +1218,7 @@ Resends the given message to the active channel #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:812](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L812) +[projects/stream-chat-angular/src/lib/channel.service.ts:838](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L838) --- @@ -1194,7 +1234,7 @@ Resets the `activeChannel$`, `channels$` and `activeChannelMessages$` Observable #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:715](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L715) +[projects/stream-chat-angular/src/lib/channel.service.ts:741](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L741) --- @@ -1216,7 +1256,7 @@ Selects or deselects the current message to quote reply to #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:1042](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L1042) +[projects/stream-chat-angular/src/lib/channel.service.ts:1068](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L1068) --- @@ -1240,7 +1280,7 @@ Selects or deselects the current message to quote reply to #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:1005](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L1005) +[projects/stream-chat-angular/src/lib/channel.service.ts:1031](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L1031) --- @@ -1267,7 +1307,7 @@ Sends a message to the active channel. The message is immediately added to the m #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:773](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L773) +[projects/stream-chat-angular/src/lib/channel.service.ts:799](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L799) --- @@ -1290,7 +1330,7 @@ If the channel wasn't previously part of the channel, it will be added to the be #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:517](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L517) +[projects/stream-chat-angular/src/lib/channel.service.ts:543](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L543) --- @@ -1313,7 +1353,7 @@ Sets the given `message` as an active parent message. If `undefined` is provided #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:575](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L575) +[projects/stream-chat-angular/src/lib/channel.service.ts:601](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L601) --- @@ -1335,7 +1375,7 @@ Call this method if user started typing in the active channel #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:1496](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L1496) +[projects/stream-chat-angular/src/lib/channel.service.ts:1529](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L1529) --- @@ -1357,7 +1397,7 @@ Call this method if user stopped typing in the active channel #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:1505](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L1505) +[projects/stream-chat-angular/src/lib/channel.service.ts:1538](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L1538) --- @@ -1379,7 +1419,7 @@ Removes the given message from pinned messages #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:1195](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L1195) +[projects/stream-chat-angular/src/lib/channel.service.ts:1228](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L1228) --- @@ -1401,7 +1441,7 @@ Updates the message in the active channel #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:829](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L829) +[projects/stream-chat-angular/src/lib/channel.service.ts:855](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L855) --- @@ -1425,4 +1465,4 @@ the result of file upload requests #### Defined in -[projects/stream-chat-angular/src/lib/channel.service.ts:896](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/channel.service.ts#L896) +[projects/stream-chat-angular/src/lib/channel.service.ts:922](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/channel.service.ts#L922) diff --git a/docusaurus/angular_versioned_docs/version-5/services/ChatClientService.mdx b/docusaurus/angular_versioned_docs/version-5/services/ChatClientService.mdx index a38aff1f..50e6aba8 100644 --- a/docusaurus/angular_versioned_docs/version-5/services/ChatClientService.mdx +++ b/docusaurus/angular_versioned_docs/version-5/services/ChatClientService.mdx @@ -18,7 +18,7 @@ Emits the current [application settings](https://getstream.io/chat/docs/javascri #### Defined in -[projects/stream-chat-angular/src/lib/chat-client.service.ts:49](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/chat-client.service.ts#L49) +[projects/stream-chat-angular/src/lib/chat-client.service.ts:49](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/chat-client.service.ts#L49) --- @@ -30,7 +30,7 @@ The [StreamChat client](https://github.com/GetStream/stream-chat-js/blob/master/ #### Defined in -[projects/stream-chat-angular/src/lib/chat-client.service.ts:38](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/chat-client.service.ts#L38) +[projects/stream-chat-angular/src/lib/chat-client.service.ts:38](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/chat-client.service.ts#L38) --- @@ -42,7 +42,7 @@ Emits the current connection state of the user (`online` or `offline`) #### Defined in -[projects/stream-chat-angular/src/lib/chat-client.service.ts:53](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/chat-client.service.ts#L53) +[projects/stream-chat-angular/src/lib/chat-client.service.ts:53](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/chat-client.service.ts#L53) --- @@ -57,7 +57,7 @@ For performance reasons this Observable operates outside of the Angular change d #### Defined in -[projects/stream-chat-angular/src/lib/chat-client.service.ts:45](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/chat-client.service.ts#L45) +[projects/stream-chat-angular/src/lib/chat-client.service.ts:45](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/chat-client.service.ts#L45) --- @@ -69,7 +69,7 @@ Emits the list of pending invites of the user. It emits every pending invitation #### Defined in -[projects/stream-chat-angular/src/lib/chat-client.service.ts:57](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/chat-client.service.ts#L57) +[projects/stream-chat-angular/src/lib/chat-client.service.ts:57](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/chat-client.service.ts#L57) --- @@ -81,7 +81,7 @@ Emits the current chat user #### Defined in -[projects/stream-chat-angular/src/lib/chat-client.service.ts:61](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/chat-client.service.ts#L61) +[projects/stream-chat-angular/src/lib/chat-client.service.ts:61](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/chat-client.service.ts#L61) ## Methods @@ -105,7 +105,7 @@ The users matching the search #### Defined in -[projects/stream-chat-angular/src/lib/chat-client.service.ts:209](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/chat-client.service.ts#L209) +[projects/stream-chat-angular/src/lib/chat-client.service.ts:209](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/chat-client.service.ts#L209) --- @@ -121,7 +121,7 @@ Disconnects the current user, and closes the WebSocket connection. Useful when d #### Defined in -[projects/stream-chat-angular/src/lib/chat-client.service.ts:178](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/chat-client.service.ts#L178) +[projects/stream-chat-angular/src/lib/chat-client.service.ts:178](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/chat-client.service.ts#L178) --- @@ -143,7 +143,7 @@ Flag the message with the given ID. If you want to know [more about flags](https #### Defined in -[projects/stream-chat-angular/src/lib/chat-client.service.ts:200](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/chat-client.service.ts#L200) +[projects/stream-chat-angular/src/lib/chat-client.service.ts:200](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/chat-client.service.ts#L200) --- @@ -159,7 +159,7 @@ Loads the current [application settings](https://getstream.io/chat/docs/javascri #### Defined in -[projects/stream-chat-angular/src/lib/chat-client.service.ts:188](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/chat-client.service.ts#L188) +[projects/stream-chat-angular/src/lib/chat-client.service.ts:188](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/chat-client.service.ts#L188) --- @@ -184,4 +184,4 @@ Creates a [`StreamChat`](https://github.com/GetStream/stream-chat-js/blob/668b3e #### Defined in -[projects/stream-chat-angular/src/lib/chat-client.service.ts:98](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/chat-client.service.ts#L98) +[projects/stream-chat-angular/src/lib/chat-client.service.ts:98](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/chat-client.service.ts#L98) diff --git a/docusaurus/angular_versioned_docs/version-5/services/CustomTemplatesService.mdx b/docusaurus/angular_versioned_docs/version-5/services/CustomTemplatesService.mdx index f97e15f7..97c97648 100644 --- a/docusaurus/angular_versioned_docs/version-5/services/CustomTemplatesService.mdx +++ b/docusaurus/angular_versioned_docs/version-5/services/CustomTemplatesService.mdx @@ -22,7 +22,7 @@ The template that can be used to override how attachment actions are displayed i #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:276](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L276) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:284](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L284) --- @@ -34,7 +34,7 @@ The template used to display attachments of a [message](../components/MessageCom #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:116](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L116) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:117](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L117) --- @@ -46,7 +46,7 @@ The template used to display attachments in the [message input](../components/Me #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:123](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L123) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:124](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L124) --- @@ -58,7 +58,7 @@ The template used to display avatars for channels and users (instead of the [def #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:130](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L130) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:131](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L131) --- @@ -70,7 +70,7 @@ The template that can be used to override how a card attachment is displayed ins #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:270](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L270) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:278](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L278) --- @@ -82,7 +82,7 @@ The template for channel actions displayed in the [channel header](../components #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:109](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L109) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:110](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L110) --- @@ -94,7 +94,7 @@ The template used to display additional information about a channel under the ch #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:227](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L227) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:235](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L235) --- @@ -106,7 +106,7 @@ Template used to display the channel information inside the [channel list item]( #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:335](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L335) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:343](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L343) --- @@ -118,7 +118,7 @@ Template used to display an item in the [channel list](../components/ChannelList #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:67](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L67) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:68](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L68) --- @@ -130,7 +130,7 @@ The autocomplete list item template for commands (used in the [`AutocompleteText #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:60](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L60) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:61](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L61) --- @@ -142,7 +142,7 @@ The template used for displaying file upload/attachment selector inside the [mes #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:234](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L234) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:242](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L242) --- @@ -154,7 +154,7 @@ Template to display custom metadata inside [message component](../components/Mes #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:220](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L220) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:228](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L228) --- @@ -166,7 +166,7 @@ The template used to display the date separator inside the [message list](../com #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:288](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L288) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:296](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L296) --- @@ -180,7 +180,7 @@ Displayed for the last message sent by the current user, if the message isn't ye #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:195](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L195) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:203](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L203) --- @@ -192,7 +192,7 @@ The template used to display the [edit message form](../components/EditMessageFo #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:322](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L322) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:330](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L330) --- @@ -204,7 +204,7 @@ The template for [emoji picker](../code-examples/emoji-picker.mdx) #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:88](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L88) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:89](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L89) --- @@ -216,7 +216,7 @@ The template to show if the main message list is empty #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:310](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L310) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:318](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L318) --- @@ -228,7 +228,7 @@ The template to show if the thread message list is empty #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:316](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L316) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:324](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L324) --- @@ -240,7 +240,7 @@ The template that can be used to override how a file attachment is displayed ins #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:264](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L264) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:272](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L272) --- @@ -252,7 +252,7 @@ The template that can be used to override how image gallery is displayed inside #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:258](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L258) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:266](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L266) --- @@ -264,7 +264,7 @@ Template for displaying icons (instead of the [default icon component](../compon #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:137](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L137) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:138](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L138) --- @@ -276,7 +276,7 @@ The template that can be used to override how a single image attachment is displ #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:240](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L240) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:248](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L248) --- @@ -288,7 +288,7 @@ Template for displaying the loading indicator (instead of the [default loading i #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:144](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L144) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:145](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L145) --- @@ -300,7 +300,7 @@ The autocomplete list item template for mentioning users (used in the [`Autocomp #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:54](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L54) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:55](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L55) --- @@ -312,7 +312,7 @@ The template used for displaying a [mention inside a message](../code-examples/m #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:81](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L81) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:82](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L82) --- @@ -324,7 +324,7 @@ The template used for displaying an item in the [message actions box](../compone #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:158](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L158) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:159](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L159) --- @@ -336,7 +336,7 @@ Template for displaying the message actions box (instead of the [default message #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:151](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L151) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:152](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L152) --- @@ -348,7 +348,7 @@ The template used to display the [message bounce prompt](../components/MessageBo #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:328](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L328) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:336](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L336) --- @@ -360,7 +360,19 @@ The message input template used when editing a message (instead of the [default #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:74](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L74) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:75](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L75) + +--- + +### messageReactionsSelectorTemplate$ + +• **messageReactionsSelectorTemplate$**: `BehaviorSubject`\<`undefined` \| `TemplateRef`\<`MessageReactionsSelectorContext`\>\> + +The template used to display the reactions of a [message](../components/MessageComponent.mdx), and the selector to add a reaction to a message (instead of the [default message reactions component](../components/MessageReactionsComponent.mdx)) + +#### Defined in + +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:173](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L173) --- @@ -372,7 +384,7 @@ The template used to display the reactions of a [message](../components/MessageC #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:165](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L165) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:166](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L166) --- @@ -384,7 +396,7 @@ The template used to display a message in the [message list](../components/Messa #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:102](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L102) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:103](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L103) --- @@ -396,7 +408,7 @@ The template used to display a modal window (instead of the [default modal](../c #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:172](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L172) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:180](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L180) --- @@ -410,7 +422,7 @@ This UI element is used to separate unread messages from read messages #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:296](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L296) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:304](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L304) --- @@ -424,7 +436,7 @@ Users can use this notification to jump to the first unread message when it's cl #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:304](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L304) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:312](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L312) --- @@ -436,7 +448,7 @@ The template used to override the [default notification component](../components #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:179](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L179) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:187](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L187) --- @@ -450,7 +462,7 @@ Displayed for the last message sent by the current user, if the message is read #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:213](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L213) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:221](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L221) --- @@ -464,7 +476,7 @@ Displayed for the last message sent by the current user, if the message is curre #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:204](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L204) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:212](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L212) --- @@ -476,7 +488,7 @@ The template used to display [system messages](https://getstream.io/chat/docs/ja #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:282](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L282) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:290](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L290) --- @@ -488,7 +500,7 @@ The template used for header of a [thread](../components/ThreadComponent.mdx) #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:186](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L186) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:194](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L194) --- @@ -500,7 +512,7 @@ The typing indicator template used in the [message list](../components/MessageLi #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:95](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L95) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:96](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L96) --- @@ -512,7 +524,7 @@ The template that can be used to override how a video attachment is displayed in #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:252](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L252) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:260](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L260) --- @@ -524,4 +536,4 @@ The template that can be used to override how a voice recording attachment is di #### Defined in -[projects/stream-chat-angular/src/lib/custom-templates.service.ts:246](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L246) +[projects/stream-chat-angular/src/lib/custom-templates.service.ts:254](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/custom-templates.service.ts#L254) diff --git a/docusaurus/angular_versioned_docs/version-5/services/DateParserService.mdx b/docusaurus/angular_versioned_docs/version-5/services/DateParserService.mdx index 354cdf3c..e162f781 100644 --- a/docusaurus/angular_versioned_docs/version-5/services/DateParserService.mdx +++ b/docusaurus/angular_versioned_docs/version-5/services/DateParserService.mdx @@ -26,7 +26,7 @@ Custom parser to override `parseDate` #### Defined in -[projects/stream-chat-angular/src/lib/date-parser.service.ts:18](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/date-parser.service.ts#L18) +[projects/stream-chat-angular/src/lib/date-parser.service.ts:18](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/date-parser.service.ts#L18) --- @@ -52,7 +52,7 @@ Custom parser to override `parseDateTime` #### Defined in -[projects/stream-chat-angular/src/lib/date-parser.service.ts:22](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/date-parser.service.ts#L22) +[projects/stream-chat-angular/src/lib/date-parser.service.ts:22](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/date-parser.service.ts#L22) --- @@ -78,7 +78,7 @@ Custom parser to override `parseTime` #### Defined in -[projects/stream-chat-angular/src/lib/date-parser.service.ts:14](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/date-parser.service.ts#L14) +[projects/stream-chat-angular/src/lib/date-parser.service.ts:14](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/date-parser.service.ts#L14) ## Methods @@ -102,7 +102,7 @@ The parsed date #### Defined in -[projects/stream-chat-angular/src/lib/date-parser.service.ts:43](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/date-parser.service.ts#L43) +[projects/stream-chat-angular/src/lib/date-parser.service.ts:43](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/date-parser.service.ts#L43) --- @@ -126,7 +126,7 @@ The parsed date #### Defined in -[projects/stream-chat-angular/src/lib/date-parser.service.ts:55](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/date-parser.service.ts#L55) +[projects/stream-chat-angular/src/lib/date-parser.service.ts:55](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/date-parser.service.ts#L55) --- @@ -150,4 +150,4 @@ The parsed time #### Defined in -[projects/stream-chat-angular/src/lib/date-parser.service.ts:31](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/date-parser.service.ts#L31) +[projects/stream-chat-angular/src/lib/date-parser.service.ts:31](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/date-parser.service.ts#L31) diff --git a/docusaurus/angular_versioned_docs/version-5/services/EmojiInputService.mdx b/docusaurus/angular_versioned_docs/version-5/services/EmojiInputService.mdx index 6f4618dd..3fd591e7 100644 --- a/docusaurus/angular_versioned_docs/version-5/services/EmojiInputService.mdx +++ b/docusaurus/angular_versioned_docs/version-5/services/EmojiInputService.mdx @@ -12,4 +12,4 @@ If you have an emoji picker in your application, you can propagate the selected #### Defined in -[projects/stream-chat-angular/src/lib/message-input/emoji-input.service.ts:14](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-input/emoji-input.service.ts#L14) +[projects/stream-chat-angular/src/lib/message-input/emoji-input.service.ts:14](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-input/emoji-input.service.ts#L14) diff --git a/docusaurus/angular_versioned_docs/version-5/services/MessageActionsService.mdx b/docusaurus/angular_versioned_docs/version-5/services/MessageActionsService.mdx index 234ab094..00a39494 100644 --- a/docusaurus/angular_versioned_docs/version-5/services/MessageActionsService.mdx +++ b/docusaurus/angular_versioned_docs/version-5/services/MessageActionsService.mdx @@ -32,7 +32,7 @@ By default the [`MessageComponent`](../../components/MessageComponent) will disp #### Defined in -[projects/stream-chat-angular/src/lib/message-actions.service.ts:122](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-actions.service.ts#L122) +[projects/stream-chat-angular/src/lib/message-actions.service.ts:181](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-actions.service.ts#L181) --- @@ -44,19 +44,19 @@ You can pass your own custom actions that will be displayed inside the built-in #### Defined in -[projects/stream-chat-angular/src/lib/message-actions.service.ts:118](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-actions.service.ts#L118) +[projects/stream-chat-angular/src/lib/message-actions.service.ts:177](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-actions.service.ts#L177) --- ### defaultActions -• `Readonly` **defaultActions**: `MessageActionItem`\<`T`\>[] +• `Readonly` **defaultActions**: (`MessageActionItem`\<`T`\> \| `MessageReactionActionItem`\<`T`\>)[] Default actions - these are the actions that are handled by the built-in component #### Defined in -[projects/stream-chat-angular/src/lib/message-actions.service.ts:26](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-actions.service.ts#L26) +[projects/stream-chat-angular/src/lib/message-actions.service.ts:28](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-actions.service.ts#L28) --- @@ -68,7 +68,7 @@ The built-in components will handle changes to this observable. #### Defined in -[projects/stream-chat-angular/src/lib/message-actions.service.ts:114](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-actions.service.ts#L114) +[projects/stream-chat-angular/src/lib/message-actions.service.ts:173](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-actions.service.ts#L173) ## Methods @@ -93,4 +93,4 @@ the count #### Defined in -[projects/stream-chat-angular/src/lib/message-actions.service.ts:136](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-actions.service.ts#L136) +[projects/stream-chat-angular/src/lib/message-actions.service.ts:195](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-actions.service.ts#L195) diff --git a/docusaurus/angular_versioned_docs/version-5/services/MessageInputConfigService.mdx b/docusaurus/angular_versioned_docs/version-5/services/MessageInputConfigService.mdx index ce5bb5d1..b503ef29 100644 --- a/docusaurus/angular_versioned_docs/version-5/services/MessageInputConfigService.mdx +++ b/docusaurus/angular_versioned_docs/version-5/services/MessageInputConfigService.mdx @@ -12,7 +12,7 @@ If true, users can mention other users in messages. You also [need to use the `A #### Defined in -[projects/stream-chat-angular/src/lib/message-input/message-input-config.service.ts:17](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-input/message-input-config.service.ts#L17) +[projects/stream-chat-angular/src/lib/message-input/message-input-config.service.ts:17](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-input/message-input-config.service.ts#L17) --- @@ -24,7 +24,7 @@ In `desktop` mode the `Enter` key will trigger message sending, in `mobile` mode #### Defined in -[projects/stream-chat-angular/src/lib/message-input/message-input-config.service.ts:30](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-input/message-input-config.service.ts#L30) +[projects/stream-chat-angular/src/lib/message-input/message-input-config.service.ts:30](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-input/message-input-config.service.ts#L30) --- @@ -36,7 +36,7 @@ If file upload is enabled, the user can open a file selector from the input. Ple #### Defined in -[projects/stream-chat-angular/src/lib/message-input/message-input-config.service.ts:13](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-input/message-input-config.service.ts#L13) +[projects/stream-chat-angular/src/lib/message-input/message-input-config.service.ts:13](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-input/message-input-config.service.ts#L13) --- @@ -48,7 +48,7 @@ If `false`, users can only upload one attachment per message #### Defined in -[projects/stream-chat-angular/src/lib/message-input/message-input-config.service.ts:21](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-input/message-input-config.service.ts#L21) +[projects/stream-chat-angular/src/lib/message-input/message-input-config.service.ts:21](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-input/message-input-config.service.ts#L21) --- @@ -60,4 +60,4 @@ The scope for user mentions, either members of the current channel of members of #### Defined in -[projects/stream-chat-angular/src/lib/message-input/message-input-config.service.ts:25](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-input/message-input-config.service.ts#L25) +[projects/stream-chat-angular/src/lib/message-input/message-input-config.service.ts:25](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-input/message-input-config.service.ts#L25) diff --git a/docusaurus/angular_versioned_docs/version-5/services/MessageReactionsService.mdx b/docusaurus/angular_versioned_docs/version-5/services/MessageReactionsService.mdx index fb34dfa6..11ab1161 100644 --- a/docusaurus/angular_versioned_docs/version-5/services/MessageReactionsService.mdx +++ b/docusaurus/angular_versioned_docs/version-5/services/MessageReactionsService.mdx @@ -28,7 +28,7 @@ The event handler can retrieve all reactions of a message inside the active chan #### Defined in -[projects/stream-chat-angular/src/lib/message-reactions.service.ts:30](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-reactions.service.ts#L30) +[projects/stream-chat-angular/src/lib/message-reactions.service.ts:30](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-reactions.service.ts#L30) --- @@ -42,7 +42,7 @@ You can provide any string as a reaction. The emoji can be provided as a string, #### Defined in -[projects/stream-chat-angular/src/lib/message-reactions.service.ts:18](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-reactions.service.ts#L18) +[projects/stream-chat-angular/src/lib/message-reactions.service.ts:18](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-reactions.service.ts#L18) ## Accessors @@ -58,7 +58,7 @@ Get the currently enabled reactions #### Defined in -[projects/stream-chat-angular/src/lib/message-reactions.service.ts:44](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-reactions.service.ts#L44) +[projects/stream-chat-angular/src/lib/message-reactions.service.ts:44](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-reactions.service.ts#L44) • `set` **reactions**(`reactions`): `void` @@ -76,4 +76,4 @@ Sets the enabled reactions #### Defined in -[projects/stream-chat-angular/src/lib/message-reactions.service.ts:37](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message-reactions.service.ts#L37) +[projects/stream-chat-angular/src/lib/message-reactions.service.ts:37](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message-reactions.service.ts#L37) diff --git a/docusaurus/angular_versioned_docs/version-5/services/MessageService.mdx b/docusaurus/angular_versioned_docs/version-5/services/MessageService.mdx index d69ea437..e710856b 100644 --- a/docusaurus/angular_versioned_docs/version-5/services/MessageService.mdx +++ b/docusaurus/angular_versioned_docs/version-5/services/MessageService.mdx @@ -26,7 +26,7 @@ You can provide a custom method to display links #### Defined in -[projects/stream-chat-angular/src/lib/message.service.ts:24](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message.service.ts#L24) +[projects/stream-chat-angular/src/lib/message.service.ts:24](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message.service.ts#L24) --- @@ -43,4 +43,4 @@ If you display messages as text the following parts are still be displayed as HT #### Defined in -[projects/stream-chat-angular/src/lib/message.service.ts:17](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/message.service.ts#L17) +[projects/stream-chat-angular/src/lib/message.service.ts:17](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/message.service.ts#L17) diff --git a/docusaurus/angular_versioned_docs/version-5/services/NotificationService.mdx b/docusaurus/angular_versioned_docs/version-5/services/NotificationService.mdx index c7d9cbbf..4afd04f9 100644 --- a/docusaurus/angular_versioned_docs/version-5/services/NotificationService.mdx +++ b/docusaurus/angular_versioned_docs/version-5/services/NotificationService.mdx @@ -12,7 +12,7 @@ Emits the currently active [notifications](https://github.com/GetStream/stream-c #### Defined in -[projects/stream-chat-angular/src/lib/notification.service.ts:15](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/notification.service.ts#L15) +[projects/stream-chat-angular/src/lib/notification.service.ts:15](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/notification.service.ts#L15) ## Methods @@ -51,7 +51,7 @@ A method to clear the notification. #### Defined in -[projects/stream-chat-angular/src/lib/notification.service.ts:68](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/notification.service.ts#L68) +[projects/stream-chat-angular/src/lib/notification.service.ts:68](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/notification.service.ts#L68) --- @@ -91,4 +91,4 @@ A method to clear the notification (before the timeout). #### Defined in -[projects/stream-chat-angular/src/lib/notification.service.ts:31](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/notification.service.ts#L31) +[projects/stream-chat-angular/src/lib/notification.service.ts:31](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/notification.service.ts#L31) diff --git a/docusaurus/angular_versioned_docs/version-5/services/StreamI18nService.mdx b/docusaurus/angular_versioned_docs/version-5/services/StreamI18nService.mdx index 571880bb..d18428fb 100644 --- a/docusaurus/angular_versioned_docs/version-5/services/StreamI18nService.mdx +++ b/docusaurus/angular_versioned_docs/version-5/services/StreamI18nService.mdx @@ -23,4 +23,4 @@ Registers the translation to the [ngx-translate](https://github.com/ngx-translat #### Defined in -[projects/stream-chat-angular/src/lib/stream-i18n.service.ts:19](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/stream-i18n.service.ts#L19) +[projects/stream-chat-angular/src/lib/stream-i18n.service.ts:19](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/stream-i18n.service.ts#L19) diff --git a/docusaurus/angular_versioned_docs/version-5/services/ThemeService.mdx b/docusaurus/angular_versioned_docs/version-5/services/ThemeService.mdx index ba7d5b61..c32749ac 100644 --- a/docusaurus/angular_versioned_docs/version-5/services/ThemeService.mdx +++ b/docusaurus/angular_versioned_docs/version-5/services/ThemeService.mdx @@ -12,4 +12,4 @@ A Subject that can be used to get or set the currently active theme. By default #### Defined in -[projects/stream-chat-angular/src/lib/theme.service.ts:14](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/theme.service.ts#L14) +[projects/stream-chat-angular/src/lib/theme.service.ts:14](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/theme.service.ts#L14) diff --git a/docusaurus/angular_versioned_docs/version-5/services/TransliterationService.mdx b/docusaurus/angular_versioned_docs/version-5/services/TransliterationService.mdx index 440ea65e..e88947fd 100644 --- a/docusaurus/angular_versioned_docs/version-5/services/TransliterationService.mdx +++ b/docusaurus/angular_versioned_docs/version-5/services/TransliterationService.mdx @@ -22,4 +22,4 @@ the result of the transliteration #### Defined in -[projects/stream-chat-angular/src/lib/transliteration.service.ts:16](https://github.com/GetStream/stream-chat-angular/blob/55bec1e16d44cb13904192a075905e7e4dcb08b3/projects/stream-chat-angular/src/lib/transliteration.service.ts#L16) +[projects/stream-chat-angular/src/lib/transliteration.service.ts:16](https://github.com/GetStream/stream-chat-angular/blob/2deda0b9963b4adafbdf6de5c656bf241a3c3e23/projects/stream-chat-angular/src/lib/transliteration.service.ts#L16) diff --git a/docusaurus/angular_versioned_docs/version-5/theming/introduction.mdx b/docusaurus/angular_versioned_docs/version-5/theming/introduction.mdx index f468badb..58fc8906 100644 --- a/docusaurus/angular_versioned_docs/version-5/theming/introduction.mdx +++ b/docusaurus/angular_versioned_docs/version-5/theming/introduction.mdx @@ -230,7 +230,7 @@ Here is an example using the [Google Material Icon library](https://fonts.google @import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200"); // Override the send icon -.str-chat__icon--send:before { +.str-chat__icon--send::before { font-family: "Material Symbols Outlined"; content: "\e163"; } @@ -240,7 +240,7 @@ It's also possible to use image files for icons: ```scss .str-chat__icon--send { - &:before { + &::before { display: none; } // Link to your image file, or encode the image inline diff --git a/package-lock.json b/package-lock.json index 21bd32e9..ff7bbc2f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "@ctrl/ngx-emoji-mart": "^8.2.0", "@floating-ui/dom": "^1.6.3", "@ngx-translate/core": "^14.0.0", - "@stream-io/stream-chat-css": "4.16.1", + "@stream-io/stream-chat-css": "4.17.0", "@stream-io/transliterate": "^1.5.2", "angular-mentions": "1.4.0", "dayjs": "^1.11.10", @@ -4967,9 +4967,9 @@ "dev": true }, "node_modules/@stream-io/stream-chat-css": { - "version": "4.16.1", - "resolved": "https://registry.npmjs.org/@stream-io/stream-chat-css/-/stream-chat-css-4.16.1.tgz", - "integrity": "sha512-wVYWBQKL2Bn0UsflqVQMdRoU6ajIaICPs272GiMWgibfWctVIkltDbDHcaeHuvJEOFkLM9tv8ibN5l49G2RLfw==" + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@stream-io/stream-chat-css/-/stream-chat-css-4.17.0.tgz", + "integrity": "sha512-PLEqyAaWAF1iWYlxhHgwikv2l1HuVc7LYiBIRakCWpNQyv0+mgrBUPHLO57+2n47XflXL1BFE/fpHn7g0JJRig==" }, "node_modules/@stream-io/transliterate": { "version": "1.5.2", @@ -27112,9 +27112,9 @@ "dev": true }, "@stream-io/stream-chat-css": { - "version": "4.16.1", - "resolved": "https://registry.npmjs.org/@stream-io/stream-chat-css/-/stream-chat-css-4.16.1.tgz", - "integrity": "sha512-wVYWBQKL2Bn0UsflqVQMdRoU6ajIaICPs272GiMWgibfWctVIkltDbDHcaeHuvJEOFkLM9tv8ibN5l49G2RLfw==" + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@stream-io/stream-chat-css/-/stream-chat-css-4.17.0.tgz", + "integrity": "sha512-PLEqyAaWAF1iWYlxhHgwikv2l1HuVc7LYiBIRakCWpNQyv0+mgrBUPHLO57+2n47XflXL1BFE/fpHn7g0JJRig==" }, "@stream-io/transliterate": { "version": "1.5.2", diff --git a/package.json b/package.json index c44db129..033ad4cd 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,9 @@ "lint:fix": "ng lint --fix", "config:dev": "ANGULAR_ENV=development ts-node set-env.ts", "config:prod": "ANGULAR_ENV=production ts-node set-env.ts", - "start-docs": "npm run config:prod && ng build --stats-json --project sample-app", - "build:sample-app": "ng build --stats-json --project sample-app", + "start-docs": "npm run generate-docs && npx stream-chat-docusaurus -s", + "start-docs:v5": "npm run generate-docs:v5 && npx stream-chat-docusaurus -s", + "build:sample-app": "npm run config:prod && ng build --stats-json --project sample-app", "preanalyze:sample-app": "npm run build:sample-app", "analyze:sample-app": "webpack-bundle-analyzer dist/sample-app/stats.json", "generate-docs": "npm run typedoc:services && npm run typedoc:components && npm run copy-docs && npm run copy-css-docs", @@ -115,7 +116,7 @@ "@ctrl/ngx-emoji-mart": "^8.2.0", "@floating-ui/dom": "^1.6.3", "@ngx-translate/core": "^14.0.0", - "@stream-io/stream-chat-css": "4.16.1", + "@stream-io/stream-chat-css": "4.17.0", "@stream-io/transliterate": "^1.5.2", "angular-mentions": "1.4.0", "dayjs": "^1.11.10", diff --git a/projects/customizations-example/src/app/app.component.html b/projects/customizations-example/src/app/app.component.html index 8d53c976..42faa81f 100644 --- a/projects/customizations-example/src/app/app.component.html +++ b/projects/customizations-example/src/app/app.component.html @@ -146,11 +146,8 @@ - - + + @@ -187,21 +184,28 @@ #messageReactionsTemplate let-messageReactionCounts="messageReactionCounts" let-latestReactions="latestReactions" - let-isSelectorOpen="isSelectorOpen" - let-isSelectorOpenChangeHandler="isSelectorOpenChangeHandler" let-messageId="messageId" let-ownReactions="ownReactions" > + + + + ; @ViewChild('loadingIndicatorTemplate') - private loadingIndicatorTemplate!: TemplateRef; + private loadingIndicatorTemplate!: TemplateRef; @ViewChild('messageActionsBoxTemplate') private messageActionsBoxTemplate!: TemplateRef; @ViewChild('messageActionItemTemplate') private messageActionItemTemplate!: TemplateRef; @ViewChild('messageReactionsTemplate') private messageReactionsTemplate!: TemplateRef; + @ViewChild('messageReactionsSelectorTemplate') + private messageReactionsSelectorTemplate!: TemplateRef; @ViewChild('modalTemplate') private modalTemplate!: TemplateRef; @ViewChild('notificationTemplate') @@ -168,6 +170,9 @@ export class AppComponent implements AfterViewInit { this.customTemplatesService.messageReactionsTemplate$.next( this.messageReactionsTemplate ); + this.customTemplatesService.messageReactionsSelectorTemplate$.next( + this.messageReactionsSelectorTemplate + ); this.customTemplatesService.modalTemplate$.next(this.modalTemplate); this.customTemplatesService.notificationTemplate$.next( this.notificationTemplate diff --git a/projects/customizations-example/src/app/message-action/message-action.component.html b/projects/customizations-example/src/app/message-action/message-action.component.html index 92055d7e..fda88808 100644 --- a/projects/customizations-example/src/app/message-action/message-action.component.html +++ b/projects/customizations-example/src/app/message-action/message-action.component.html @@ -1,4 +1,4 @@ - + + + + diff --git a/projects/stream-chat-angular/src/lib/message-actions-box/message-actions-box.component.spec.ts b/projects/stream-chat-angular/src/lib/message-actions-box/message-actions-box.component.spec.ts index 8444b602..a0eab7f8 100644 --- a/projects/stream-chat-angular/src/lib/message-actions-box/message-actions-box.component.spec.ts +++ b/projects/stream-chat-angular/src/lib/message-actions-box/message-actions-box.component.spec.ts @@ -7,7 +7,7 @@ import { } from '@angular/core/testing'; import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject, Observable } from 'rxjs'; -import { Channel, MessageResponseBase } from 'stream-chat'; +import { Channel, MessageResponseBase, ReactionResponse } from 'stream-chat'; import { TextareaComponent } from '../message-input/textarea/textarea.component'; import { ChannelService } from '../channel.service'; import { ChatClientService } from '../chat-client.service'; @@ -23,6 +23,8 @@ import { DefaultStreamChatGenerics, StreamMessage } from '../types'; import { MessageActionsBoxComponent } from './message-actions-box.component'; import { MessageActionsService } from '../message-actions.service'; +import { MessageReactionsSelectorComponent } from '../message-reactions-selector/message-reactions-selector.component'; +import { By } from '@angular/platform-browser'; describe('MessageActionsBoxComponent', () => { let component: MessageActionsBoxComponent; @@ -33,6 +35,11 @@ describe('MessageActionsBoxComponent', () => { let queryMuteAction: () => HTMLElement | null; let queryEditAction: () => HTMLElement | null; let queryDeleteAction: () => HTMLElement | null; + let queryThreadReplyAction: () => HTMLElement | null; + let queryCopyTextAction: () => HTMLElement | null; + let queryReactionSelectorComponent: () => + | MessageReactionsSelectorComponent + | undefined; let message: StreamMessage; let nativeElement: HTMLElement; let mockChatClient: MockStreamChatClient; @@ -44,6 +51,7 @@ describe('MessageActionsBoxComponent', () => { messageToQuote$: Observable; pinMessage: jasmine.Spy; unpinMessage: jasmine.Spy; + setAsActiveParentMessage: jasmine.Spy; }; beforeEach(async () => { @@ -56,10 +64,14 @@ describe('MessageActionsBoxComponent', () => { messageToQuote$: new Observable(), pinMessage: jasmine.createSpy(), unpinMessage: jasmine.createSpy(), + setAsActiveParentMessage: jasmine.createSpy(), }; await TestBed.configureTestingModule({ imports: [TranslateModule.forRoot()], - declarations: [MessageActionsBoxComponent], + declarations: [ + MessageActionsBoxComponent, + MessageReactionsSelectorComponent, + ], providers: [ { provide: ChatClientService, useValue: mockChatClient }, { provide: ChannelService, useValue: channelService }, @@ -94,6 +106,14 @@ describe('MessageActionsBoxComponent', () => { nativeElement.querySelector('[data-testid="edit-action"]'); queryDeleteAction = () => nativeElement.querySelector('[data-testid="delete-action"]'); + queryThreadReplyAction = () => + nativeElement.querySelector('[data-testid="thread-reply-action"]'); + queryReactionSelectorComponent = () => + fixture.debugElement.query( + By.directive(MessageReactionsSelectorComponent) + )?.componentInstance as MessageReactionsSelectorComponent; + queryCopyTextAction = () => + nativeElement.querySelector('[data-testid="copy-message-text-action"]'); }); it('should only display the #enabledActions', () => { @@ -387,4 +407,103 @@ describe('MessageActionsBoxComponent', () => { expect(component.visibleMessageActionItems).toContain(customAction); }); + + it('should display reactions, if user can react to message', () => { + component.enabledActions = ['send-reaction']; + component.message!.own_reactions = [ + { type: 'like', user: { id: 'jackid' } }, + ] as ReactionResponse[]; + component.ngOnChanges({ + enabledActions: {} as SimpleChange, + message: {} as SimpleChange, + }); + fixture.detectChanges(); + const reactionSelectorComponent = queryReactionSelectorComponent(); + + expect(reactionSelectorComponent?.messageId).toBe(component.message?.id); + expect(reactionSelectorComponent?.ownReactions).toEqual( + component.message?.own_reactions || [] + ); + + component.enabledActions = []; + component.ngOnChanges({ + enabledActions: {} as SimpleChange, + }); + fixture.detectChanges(); + + expect(queryReactionSelectorComponent()).toBeUndefined(); + }); + + it('should display thread reply action', () => { + component.enabledActions = ['send-reply']; + component.ngOnChanges({ + enabledActions: {} as SimpleChange, + isMine: {} as SimpleChange, + }); + fixture.detectChanges(); + queryThreadReplyAction()?.click(); + fixture.detectChanges(); + + expect(channelService.setAsActiveParentMessage).toHaveBeenCalledWith( + component.message + ); + + component.enabledActions = []; + component.ngOnChanges({ + enabledActions: {} as SimpleChange, + isMine: {} as SimpleChange, + }); + fixture.detectChanges(); + + expect(queryThreadReplyAction()).toBeNull(); + }); + + it('should display copy text action', fakeAsync(async () => { + const spy = spyOn(navigator.clipboard, 'write').and.callFake(() => + Promise.resolve() + ); + component.enabledActions = ['copy-message-text']; + component.messageTextHtmlElement = { + innerText: 'test', + innerHTML: 'test', + } as HTMLElement; + + component.ngOnChanges({ + enabledActions: {} as SimpleChange, + messageTextHtmlElement: {} as SimpleChange, + }); + fixture.detectChanges(); + queryCopyTextAction()?.click(); + fixture.detectChanges(); + tick(); + + const clipboardItem: ClipboardItem = spy.calls.mostRecent().args[0][0]; + const plainText = await new Response( + await clipboardItem.getType('text/plain') + ).text(); + const htmlText = await new Response( + await clipboardItem.getType('text/html') + ).text(); + expect(plainText).toBe('test'); + expect(htmlText).toBe('test'); + + expect(spy).toHaveBeenCalled(); + + component.message!.type = 'deleted'; + component.ngOnChanges({ + message: {} as SimpleChange, + }); + fixture.detectChanges(); + + expect(queryCopyTextAction()).toBeNull(); + + component.enabledActions = []; + component.ngOnChanges({ + enabledActions: {} as SimpleChange, + isMine: {} as SimpleChange, + }); + fixture.detectChanges(); + + expect(queryCopyTextAction()).toBeNull(); + })); }); diff --git a/projects/stream-chat-angular/src/lib/message-actions-box/message-actions-box.component.ts b/projects/stream-chat-angular/src/lib/message-actions-box/message-actions-box.component.ts index 87739a89..f06e9d7d 100644 --- a/projects/stream-chat-angular/src/lib/message-actions-box/message-actions-box.component.ts +++ b/projects/stream-chat-angular/src/lib/message-actions-box/message-actions-box.component.ts @@ -16,6 +16,8 @@ import { MessageActionBoxItemContext, MessageActionItem, MessageInputContext, + MessageReactionActionItem, + MessageReactionsSelectorContext, StreamMessage, } from '../types'; import { MessageActionsService } from '../message-actions.service'; @@ -38,6 +40,10 @@ export class MessageActionsBoxComponent * The message the actions will be executed on */ @Input() message: StreamMessage | undefined; + /** + * The HTML element which contains the message text, it's used for the "copy message text" action + */ + @Input() messageTextHtmlElement: HTMLElement | undefined; /** * The list of [channel capabilities](https://getstream.io/chat/docs/javascript/channel_capabilities/?language=javascript) that are enabled for the current user, the list of [supported interactions](../concepts/message-interactions.mdx) can be found in our message interaction guide. Unathorized actions won't be displayed on the UI. */ @@ -46,11 +52,17 @@ export class MessageActionsBoxComponent messageActionItemTemplate: | TemplateRef | undefined; - visibleMessageActionItems: (MessageActionItem | CustomMessageActionItem)[] = - []; + visibleMessageActionItems: ( + | MessageActionItem + | CustomMessageActionItem + | MessageReactionActionItem + )[] = []; isEditModalOpen = false; customActions: CustomMessageActionItem[] = []; - private readonly messageActionItems: MessageActionItem[]; + private readonly messageActionItems: ( + | MessageActionItem + | MessageReactionActionItem + )[]; private subscriptions: Subscription[] = []; private isViewInited = false; constructor( @@ -109,31 +121,64 @@ export class MessageActionsBoxComponent : actionLabelOrTranslationKey(this.message!); } - getMessageActionTemplateContext( - item: MessageActionItem | CustomMessageActionItem - ): MessageActionBoxItemContext { + getReactionSelectorTemplateContext(): MessageReactionsSelectorContext { return { - actionHandler: item.actionHandler, - isMine: this.isMine, - actionName: item.actionName, - message: this.message!, - actionLabelOrTranslationKey: item.actionLabelOrTranslationKey, + messageId: this.message?.id, + ownReactions: this.message?.own_reactions || [], }; } + getMessageActionTemplateContext( + item: + | MessageActionItem + | CustomMessageActionItem + | MessageReactionActionItem + ): MessageActionBoxItemContext { + if (this.isReactAction(item)) { + return {} as MessageActionBoxItemContext; + } else { + return { + actionHandler: item.actionHandler, + actionHandlerExtraParams: { + isMine: this.isMine, + messageTextHtmlElement: this.messageTextHtmlElement, + }, + actionName: item.actionName, + message: this.message!, + actionLabelOrTranslationKey: item.actionLabelOrTranslationKey, + }; + } + } + trackByActionName( _: number, - item: MessageActionItem | CustomMessageActionItem + item: + | MessageActionItem + | CustomMessageActionItem + | MessageReactionActionItem ) { return item.actionName; } + private isReactAction( + item: + | MessageActionItem + | CustomMessageActionItem + | MessageReactionActionItem + ): item is MessageReactionActionItem { + return item.actionName === 'react'; + } + private setVisibleActions() { - this.visibleMessageActionItems = [ - ...this.messageActionItems, - ...this.customActions, - ].filter((item) => - item.isVisible(this.enabledActions, this.isMine, this.message!) - ); + if (!this.message) { + this.visibleMessageActionItems = []; + } else { + this.visibleMessageActionItems = [ + ...this.messageActionItems, + ...this.customActions, + ].filter((item) => + item.isVisible(this.enabledActions, this.isMine, this.message!) + ); + } } } diff --git a/projects/stream-chat-angular/src/lib/message-actions.service.ts b/projects/stream-chat-angular/src/lib/message-actions.service.ts index aeadb128..4fb36502 100644 --- a/projects/stream-chat-angular/src/lib/message-actions.service.ts +++ b/projects/stream-chat-angular/src/lib/message-actions.service.ts @@ -3,8 +3,10 @@ import { BehaviorSubject } from 'rxjs'; import { CustomMessageActionItem, DefaultStreamChatGenerics, + MessageActionHandlerExtraParams, MessageActionItem, MessageActionsClickDetails, + MessageReactionActionItem, StreamMessage, } from './types'; import { ChatClientService } from './chat-client.service'; @@ -23,7 +25,16 @@ export class MessageActionsService< /** * Default actions - these are the actions that are handled by the built-in component */ - readonly defaultActions: MessageActionItem[] = [ + readonly defaultActions: ( + | MessageActionItem + | MessageReactionActionItem + )[] = [ + { + actionName: 'react', + isVisible: (enabledActions: string[]) => { + return enabledActions.indexOf('send-reaction') !== -1; + }, + }, { actionName: 'mark-unread', actionLabelOrTranslationKey: 'streamChat.Mark as unread', @@ -45,6 +56,18 @@ export class MessageActionsService< isVisible: (enabledActions: string[]) => enabledActions.indexOf('quote-message') !== -1, }, + { + actionName: 'thread-reply', + actionLabelOrTranslationKey: 'streamChat.Thread', + actionHandler: (message: StreamMessage) => { + void this.channelService.setAsActiveParentMessage(message); + }, + isVisible: ( + enabledActions: string[], + isMine: boolean, + message: StreamMessage + ) => enabledActions.indexOf('send-reply') !== -1 && !message.parent_id, + }, { actionName: 'pin', actionLabelOrTranslationKey: (message: StreamMessage) => @@ -107,6 +130,48 @@ export class MessageActionsService< enabledActions.indexOf('delete-any') !== -1 || enabledActions.indexOf('delete-any-message') !== -1, }, + { + actionName: 'copy-message-text', + actionLabelOrTranslationKey: 'streamChat.Copy text', + isVisible: (_: string[], __: boolean, message: StreamMessage) => { + const isClipboardSupported = navigator?.clipboard?.write !== undefined; + if (!isClipboardSupported) { + console.warn( + `Clipboard API isn't available, please check security and browser requirements: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/write#security_considerations` + ); + } + return ( + !!message.text && + (message.type === 'regular' || message.type === 'reply') && + isClipboardSupported + ); + }, + actionHandler: ( + message: StreamMessage, + extraParams: MessageActionHandlerExtraParams + ) => { + const fallbackContent = message.text || ''; + // Android Chrome can only copy plain text: https://issues.chromium.org/issues/40851502 + void navigator.clipboard.write([ + new ClipboardItem({ + 'text/plain': new Blob( + [ + extraParams.messageTextHtmlElement?.innerText || + fallbackContent, + ], + { type: 'text/plain' } + ), + 'text/html': new Blob( + [ + extraParams.messageTextHtmlElement?.innerHTML || + fallbackContent, + ], + { type: 'text/html' } + ), + }), + ]); + }, + }, ]; /** * The built-in components will handle changes to this observable. diff --git a/projects/stream-chat-angular/src/lib/message-list/message-list.component.html b/projects/stream-chat-angular/src/lib/message-list/message-list.component.html index 7a9a0a52..47f7d3db 100644 --- a/projects/stream-chat-angular/src/lib/message-list/message-list.component.html +++ b/projects/stream-chat-angular/src/lib/message-list/message-list.component.html @@ -62,12 +62,7 @@
-
    +
    • { let component: MessageListComponent; @@ -49,7 +50,7 @@ describe('MessageListComponent', () => { beforeEach(() => { channelServiceMock = mockChannelService(); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], + imports: [TranslateModule.forRoot(), NgxFloatUiModule], declarations: [ MessageComponent, MessageListComponent, @@ -928,19 +929,6 @@ describe('MessageListComponent', () => { expect(queryLoadingIndicator('bottom')).toBeNull(); }); - it('should add/remove CSS class based on #messageOptionsTrigger input', () => { - expect( - nativeElement.querySelector('.str-chat__message-options-in-bubble') - ).toBeNull(); - - component.messageOptionsTrigger = 'message-bubble'; - fixture.componentRef.injector.get(ChangeDetectorRef).detectChanges(); - - expect( - nativeElement.querySelector('.str-chat__message-options-in-bubble') - ).not.toBeNull(); - }); - it('should tell if two messages are on separate dates', () => { const messages = generateMockMessages(); const message = messages[0]; diff --git a/projects/stream-chat-angular/src/lib/message-list/message-list.component.ts b/projects/stream-chat-angular/src/lib/message-list/message-list.component.ts index 6293e4a0..4b180873 100644 --- a/projects/stream-chat-angular/src/lib/message-list/message-list.component.ts +++ b/projects/stream-chat-angular/src/lib/message-list/message-list.component.ts @@ -55,11 +55,6 @@ export class MessageListComponent * The direction of the messages in the list, `bottom-to-top` means newest message is at the bottom of the message list and users scroll upwards to load older messages */ @Input() direction: 'bottom-to-top' | 'top-to-bottom' = 'bottom-to-top'; - /** - * Determines what triggers the appearance of the message options: by default you can hover (click on mobile) anywhere in the row of the message (`message-row` option), or you can set `message-bubble`, in that case only a hover (click on mobile) in the message bubble will trigger the options to appear. - */ - @Input() messageOptionsTrigger: 'message-row' | 'message-bubble' = - 'message-row'; /** * You can hide the "jump to latest" button while scrolling. A potential use-case for this input would be to [workaround a known issue on iOS Safar webview](https://github.com/GetStream/stream-chat-angular/issues/418) * diff --git a/projects/stream-chat-angular/src/lib/message-reactions-selector/message-reactions-selector.component.html b/projects/stream-chat-angular/src/lib/message-reactions-selector/message-reactions-selector.component.html new file mode 100644 index 00000000..990c5a48 --- /dev/null +++ b/projects/stream-chat-angular/src/lib/message-reactions-selector/message-reactions-selector.component.html @@ -0,0 +1,42 @@ +
      +
        +
      • + + {{ getEmojiByReaction(reactionType) }} + +
      • +
      +
      diff --git a/projects/stream-chat-angular/src/lib/message-reactions-selector/message-reactions-selector.component.spec.ts b/projects/stream-chat-angular/src/lib/message-reactions-selector/message-reactions-selector.component.spec.ts new file mode 100644 index 00000000..99717998 --- /dev/null +++ b/projects/stream-chat-angular/src/lib/message-reactions-selector/message-reactions-selector.component.spec.ts @@ -0,0 +1,143 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { MessageReactionType } from '../types'; +import { ReactionResponse } from 'stream-chat'; +import { BehaviorSubject } from 'rxjs'; +import { ChannelService } from '../channel.service'; +import { MessageReactionsService } from '../message-reactions.service'; +import { MessageReactionsSelectorComponent } from './message-reactions-selector.component'; + +describe('MessageReactionsSelectorComponent', () => { + let component: MessageReactionsSelectorComponent; + let fixture: ComponentFixture; + let nativeElement: HTMLElement; + let queryEmojiOptions: () => HTMLElement[]; + let queryEmojiOption: (type: MessageReactionType) => HTMLElement | null; + const channelServiceMock = { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + addReaction: (id: string, type: MessageReactionType) => {}, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + removeReaction: (id: string, type: MessageReactionType) => {}, + getMessageReactions: () => Promise.resolve([] as ReactionResponse[]), + }; + const reactionsServiceMock = { + reactions$: new BehaviorSubject({}), + reactions: {}, + }; + + beforeEach(async () => { + reactionsServiceMock.reactions = { + like: '👍', + angry: '😠', + love: '❤️', + haha: '😂', + wow: '😮', + sad: '😞', + }; + reactionsServiceMock.reactions$ = new BehaviorSubject( + reactionsServiceMock.reactions + ); + await TestBed.configureTestingModule({ + declarations: [MessageReactionsSelectorComponent], + providers: [ + { provide: ChannelService, useValue: channelServiceMock }, + { provide: MessageReactionsService, useValue: reactionsServiceMock }, + ], + }).compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(MessageReactionsSelectorComponent); + component = fixture.componentInstance; + nativeElement = fixture.nativeElement as HTMLElement; + fixture.detectChanges(); + queryEmojiOptions = () => + Array.from( + nativeElement.querySelectorAll('[data-testclass="emoji-option"]') + ); + queryEmojiOption = (type) => + nativeElement.querySelector(`[data-testid=${type}]`); + }); + + it('should display reactions', () => { + const reactions = Object.keys(reactionsServiceMock.reactions); + const emojiOptionsCount = reactions.length; + fixture.detectChanges(); + + expect(queryEmojiOptions().length).toBe(emojiOptionsCount); + + reactions.forEach((r) => { + expect(queryEmojiOption(r)).not.toBeNull(); + }); + }); + + it('should add reaction, if user has no reaction with the type', () => { + spyOn(channelServiceMock, 'addReaction').and.callThrough(); + component.ownReactions = []; + component.messageId = 'id'; + fixture.detectChanges(); + + const likeEmojiOption = queryEmojiOptions()[0]; + likeEmojiOption.click(); + fixture.detectChanges(); + + expect(channelServiceMock.addReaction).toHaveBeenCalledWith( + component.messageId, + 'like' + ); + }); + + it('should remove reaction, if user has reaction with the type', () => { + spyOn(channelServiceMock, 'removeReaction').and.callThrough(); + component.ownReactions = [ + { type: 'like', user: { id: 'jackid' } }, + ] as ReactionResponse[]; + component.messageId = 'id'; + fixture.detectChanges(); + + const likeEmojiOption = queryEmojiOptions()[0]; + likeEmojiOption.click(); + fixture.detectChanges(); + + expect(channelServiceMock.removeReaction).toHaveBeenCalledWith( + component.messageId, + 'like' + ); + }); + + it('should mark reaction types of current user', () => { + component.ownReactions = [ + { type: 'like', user: { id: 'jackid' } }, + ] as ReactionResponse[]; + fixture.detectChanges(); + + const emojiOptions = queryEmojiOptions(); + const likeEmojiOption = emojiOptions.splice(0, 1)[0]; + const otherEmojiOptions = emojiOptions; + fixture.detectChanges(); + + expect(likeEmojiOption.classList).toContain( + 'str-chat__message-reactions-option-selected' + ); + otherEmojiOptions.forEach((o) => + expect(o.classList).not.toContain( + 'str-chat__message-reactions-option-selected' + ) + ); + }); + + it('should filter not supported reactions', () => { + reactionsServiceMock.reactions$.next({ + angry: '😠', + haha: '😂', + }); + component.ownReactions = [ + { type: 'like', user: { id: 'jackid' } }, + { type: 'haha', user: { id: 'jackid' } }, + { type: 'angry', user: { id: 'jackid' } }, + ] as ReactionResponse[]; + + expect(component.reactionOptions.length).toBe(2); + expect(component.reactionOptions.indexOf('like')).toBe(-1); + }); +}); diff --git a/projects/stream-chat-angular/src/lib/message-reactions-selector/message-reactions-selector.component.ts b/projects/stream-chat-angular/src/lib/message-reactions-selector/message-reactions-selector.component.ts new file mode 100644 index 00000000..ac29af31 --- /dev/null +++ b/projects/stream-chat-angular/src/lib/message-reactions-selector/message-reactions-selector.component.ts @@ -0,0 +1,79 @@ +import { + AfterViewInit, + ChangeDetectorRef, + Component, + Input, + OnDestroy, + OnInit, +} from '@angular/core'; +import { DefaultStreamChatGenerics, MessageReactionType } from '../types'; +import { ReactionResponse } from 'stream-chat'; +import { ChannelService } from '../channel.service'; +import { MessageReactionsService } from '../message-reactions.service'; +import { Subscription } from 'rxjs'; + +/** + * The `MessageReactionsSelectorComponent` makes it possible for users to react to a message, the reaction options can be set using the [`MessageReactionsService`](../../services/MessageReactionsService). You can read more about [message reactions](https://getstream.io/chat/docs/javascript/send_reaction/?language=javascript) in the platform documentation. + */ +@Component({ + selector: 'stream-message-reactions-selector', + templateUrl: './message-reactions-selector.component.html', + styles: [], +}) +export class MessageReactionsSelectorComponent + implements OnInit, OnDestroy, AfterViewInit +{ + /** + * List of the user's own reactions of a [message](../types/stream-message.mdx), used to display the users of a reaction type. + */ + @Input() ownReactions: ReactionResponse[] = []; + /** + * The id of the message the reactions belong to + */ + @Input() messageId: string | undefined; + reactionOptions: string[] = []; + private subscriptions: Subscription[] = []; + private isViewInited = false; + + constructor( + private channelService: ChannelService, + private messageReactionsService: MessageReactionsService, + private cdRef: ChangeDetectorRef + ) {} + ngOnInit(): void { + this.subscriptions.push( + this.messageReactionsService.reactions$.subscribe((reactions) => { + this.reactionOptions = Object.keys(reactions); + if (this.isViewInited) { + this.cdRef.detectChanges(); + } + }) + ); + } + + ngAfterViewInit(): void { + this.isViewInited = true; + } + + ngOnDestroy(): void { + this.subscriptions.forEach((s) => s.unsubscribe()); + } + + trackByMessageReaction(_: number, item: MessageReactionType) { + return item; + } + + isOwnReaction(reactionType: MessageReactionType) { + return !!this.ownReactions.find((r) => r.type === reactionType); + } + + getEmojiByReaction(reactionType: MessageReactionType) { + return this.messageReactionsService.reactions[reactionType]; + } + + async react(type: MessageReactionType) { + this.ownReactions.find((r) => r.type === type) + ? await this.channelService.removeReaction(this.messageId!, type) + : await this.channelService.addReaction(this.messageId!, type); + } +} diff --git a/projects/stream-chat-angular/src/lib/message-reactions/message-reactions.component.html b/projects/stream-chat-angular/src/lib/message-reactions/message-reactions.component.html index 83156fce..e0e2a5f9 100644 --- a/projects/stream-chat-angular/src/lib/message-reactions/message-reactions.component.html +++ b/projects/stream-chat-angular/src/lib/message-reactions/message-reactions.component.html @@ -3,7 +3,6 @@ data-testid="reaction-list" class="str-chat__reaction-list str-chat__message-reactions-container" [class.str-chat__reaction-list--reverse]="true" - [class.str-chat__reaction-list-hidden]="isSelectorOpen" >
-
-
-
- - {{ tooltipText }} - -
-
    -
  • - - {{ getEmojiByReaction(reactionType) }} - - - {{ messageReactionCounts[reactionType] }} - -
  • -
-
- - nativeElement.querySelector('[data-testid="reaction-selector"]'); - queryEmojiOptions = () => - Array.from( - nativeElement.querySelectorAll('[data-testclass="emoji-option"]') - ); - queryEmojiOptionReactionCount = (type) => - nativeElement.querySelector(`[data-testid=${type}-reaction-count]`); queryReactionCountsFromReactionList = () => Array.from( nativeElement.querySelectorAll( @@ -134,57 +116,6 @@ describe('MessageReactionsComponent', () => { expect(queryReactionList()).toBeNull(); }); - it('should display selector, if #isSelectorOpen', () => { - component.messageReactionCounts = { - haha: 1, - }; - component.ngOnChanges({ - messageReactionCounts: {} as SimpleChange, - }); - - expect(queryReactionsSelector()).toBeNull(); - expect( - nativeElement.querySelector('.str-chat__reaction-list-hidden') - ).toBeNull(); - - component.isSelectorOpen = true; - fixture.detectChanges(); - - expect(queryReactionsSelector()).not.toBeNull(); - expect( - nativeElement.querySelector('.str-chat__reaction-list-hidden') - ).not.toBeNull(); - }); - - it('should display reactions', () => { - const emojiOptionsCount = 6; - component.messageReactionCounts = { - wow: 1, - sad: 3, - like: 2, - }; - component.latestReactions = [ - { type: 'wow', user: { id: 'sara', name: 'Sara', image: 'image/url' } }, - { type: 'sad', user: { id: 'jim' } }, - { type: 'sad', user: { id: 'ben', name: 'Ben' } }, - ] as ReactionResponse[]; - component.isSelectorOpen = true; - fixture.detectChanges(); - - expect(queryEmojiOptions().length).toBe(emojiOptionsCount); - expect( - queryEmojiOptionReactionCount('wow')?.textContent?.replace(/ /g, '') - ).toBe(component.messageReactionCounts['wow']?.toString()); - - expect( - queryEmojiOptionReactionCount('sad')?.textContent?.replace(/ /g, '') - ).toBe(component.messageReactionCounts['sad']?.toString()); - - expect( - queryEmojiOptionReactionCount('like')?.textContent?.replace(/ /g, '') - ).toBe(component.messageReactionCounts['like']?.toString()); - }); - it('should display reaction details', fakeAsync(() => { component.messageReactionCounts = { wow: 3, @@ -316,100 +247,6 @@ describe('MessageReactionsComponent', () => { expect(component.selectedReactionType).toBe(undefined); })); - it('should add reaction, if user has no reaction with the type', () => { - spyOn(channelServiceMock, 'addReaction').and.callThrough(); - component.ownReactions = []; - component.isSelectorOpen = true; - component.messageId = 'id'; - fixture.detectChanges(); - - const likeEmojiOption = queryEmojiOptions()[0]; - likeEmojiOption.click(); - fixture.detectChanges(); - - expect(channelServiceMock.addReaction).toHaveBeenCalledWith( - component.messageId, - 'like' - ); - }); - - it('should remove reaction, if user has reaction with the type', () => { - spyOn(channelServiceMock, 'removeReaction').and.callThrough(); - component.ownReactions = [ - { type: 'like', user: { id: 'jackid' } }, - ] as ReactionResponse[]; - component.isSelectorOpen = true; - component.messageId = 'id'; - fixture.detectChanges(); - - const likeEmojiOption = queryEmojiOptions()[0]; - likeEmojiOption.click(); - fixture.detectChanges(); - - expect(channelServiceMock.removeReaction).toHaveBeenCalledWith( - component.messageId, - 'like' - ); - }); - - it('should emit #isSelectorOpenChange, if outside click happens', fakeAsync(() => { - let eventHandler: Function | undefined; - spyOn(window, 'addEventListener').and.callFake( - (_: string, handler: any) => { - eventHandler = handler as Function; - } - ); - const spy = jasmine.createSpy(); - component.isSelectorOpenChange.subscribe(spy); - component.isSelectorOpen = true; - component.ngOnChanges({ - isSelectorOpen: {} as any as SimpleChange, - }); - tick(); - fixture.detectChanges(); - eventHandler!(queryReactionsSelector()); - - expect(spy).toHaveBeenCalledWith(false); - })); - - it('should only watch for outside clicks if selector is open', () => { - const addEventListenerSpy = spyOn(window, 'addEventListener'); - const removeEventListenerSpy = spyOn(window, 'removeEventListener'); - component.isSelectorOpen = false; - component.ngOnChanges({ - isSelectorOpen: {} as any as SimpleChange, - }); - fixture.detectChanges(); - - expect(addEventListenerSpy).not.toHaveBeenCalled(); - expect(removeEventListenerSpy).toHaveBeenCalledWith( - 'click', - jasmine.any(Function) - ); - }); - - it('should mark reaction types of current user - selector', () => { - component.ownReactions = [ - { type: 'like', user: { id: 'jackid' } }, - ] as ReactionResponse[]; - component.isSelectorOpen = true; - fixture.detectChanges(); - - const emojiOptions = queryEmojiOptions(); - const likeEmojiOption = emojiOptions.splice(0, 1)[0]; - const otherEmojiOptions = emojiOptions; - fixture.detectChanges(); - - expect(likeEmojiOption.classList).toContain( - 'str-chat__message-reactions-option-selected' - ); - otherEmojiOptions.forEach((o) => - expect(o.classList).not.toContain( - 'str-chat__message-reactions-option-selected' - ) - ); - }); - it('should mark reaction types of current user - list', () => { component.messageReactionCounts = { wow: 3, diff --git a/projects/stream-chat-angular/src/lib/message-reactions/message-reactions.component.ts b/projects/stream-chat-angular/src/lib/message-reactions/message-reactions.component.ts index 14a8d7e3..b632c9ac 100644 --- a/projects/stream-chat-angular/src/lib/message-reactions/message-reactions.component.ts +++ b/projects/stream-chat-angular/src/lib/message-reactions/message-reactions.component.ts @@ -1,15 +1,12 @@ import { - AfterViewChecked, AfterViewInit, ChangeDetectorRef, Component, ElementRef, - EventEmitter, Input, OnChanges, OnDestroy, OnInit, - Output, SimpleChanges, ViewChild, } from '@angular/core'; @@ -21,14 +18,14 @@ import { CustomTemplatesService } from '../custom-templates.service'; import { Subscription } from 'rxjs'; /** - * The `MessageReactions` component displays the reactions of a message, the current user can add and remove reactions. You can read more about [message reactions](https://getstream.io/chat/docs/javascript/send_reaction/?language=javascript) in the platform documentation. + * The `MessageReactions` component displays the reactions of a message. You can read more about [message reactions](https://getstream.io/chat/docs/javascript/send_reaction/?language=javascript) in the platform documentation. */ @Component({ selector: 'stream-message-reactions', templateUrl: './message-reactions.component.html', }) export class MessageReactionsComponent - implements AfterViewChecked, OnChanges, OnInit, AfterViewInit, OnDestroy + implements OnChanges, OnInit, AfterViewInit, OnDestroy { /** * The id of the message the reactions belong to @@ -39,10 +36,6 @@ export class MessageReactionsComponent */ @Input() messageReactionCounts: { [key in MessageReactionType]?: number } = {}; - /** - * Indicates if the selector should be opened or closed. Adding a UI element to open and close the selector is the parent's component responsibility. - */ - @Input() isSelectorOpen: boolean = false; /** * List of reactions of a [message](../types/stream-message.mdx), used to display the users of a reaction type. */ @@ -51,19 +44,9 @@ export class MessageReactionsComponent * List of the user's own reactions of a [message](../types/stream-message.mdx), used to display the users of a reaction type. */ @Input() ownReactions: ReactionResponse[] = []; - /** - * Indicates if the selector should be opened or closed. Adding a UI element to open and close the selector is the parent's component responsibility. - */ - @Output() readonly isSelectorOpenChange = new EventEmitter(); - tooltipPositions: { arrow: number; tooltip: number } | undefined; - tooltipText: string | undefined; @ViewChild('selectorContainer') private selectorContainer: | ElementRef | undefined; - @ViewChild('selectorTooltip') private selectorTooltip: - | ElementRef - | undefined; - currentTooltipTarget: HTMLElement | undefined; selectedReactionType: string | undefined; isLoading = true; reactions: ReactionResponse[] = []; @@ -94,11 +77,6 @@ export class MessageReactionsComponent } ngOnChanges(changes: SimpleChanges) { - if (changes.isSelectorOpen) { - this.isSelectorOpen - ? setTimeout(() => this.watchForOutsideClicks()) // setTimeout: wait for current click to bubble up, and only watch for clicks after that - : this.stopWatchForOutsideClicks(); - } if (changes.messageReactionCounts) { this.setExistingReactions(); } @@ -117,22 +95,10 @@ export class MessageReactionsComponent this.isViewInited = true; } - ngAfterViewChecked(): void { - if (this.tooltipText && !this.tooltipPositions) { - this.setTooltipPosition(); - this.cdRef.detectChanges(); - } - } - ngOnDestroy(): void { this.subscriptions.forEach((s) => s.unsubscribe()); } - getLatestUserByReaction(reactionType: MessageReactionType) { - return this.latestReactions.find((r) => r.type === reactionType && r.user) - ?.user; - } - getEmojiByReaction(reactionType: MessageReactionType) { return this.messageReactionsService.reactions[reactionType]; } @@ -201,32 +167,14 @@ export class MessageReactionsComponent return users; } - showTooltip(event: Event, reactionType: MessageReactionType) { - this.currentTooltipTarget = event.target as HTMLElement; - this.tooltipText = this.getUsersByReaction(reactionType); - } - - hideTooltip() { - this.tooltipText = undefined; - this.currentTooltipTarget = undefined; - this.tooltipPositions = undefined; - } - - trackByMessageReaction(index: number, item: MessageReactionType) { + trackByMessageReaction(_: number, item: MessageReactionType) { return item; } - trackByUserId(index: number, item: UserResponse) { + trackByUserId(_: number, item: UserResponse) { return item.id; } - async react(type: MessageReactionType) { - this.ownReactions.find((r) => r.type === type) - ? await this.channelService.removeReaction(this.messageId!, type) - : await this.channelService.addReaction(this.messageId!, type); - this.isSelectorOpenChange.emit(false); - } - isOwnReaction(reactionType: MessageReactionType) { return !!this.ownReactions.find((r) => r.type === reactionType); } @@ -235,43 +183,6 @@ export class MessageReactionsComponent this.selectedReactionType = isOpen ? this.selectedReactionType : undefined; }; - private eventHandler = (event: Event) => { - if (!this.selectorContainer?.nativeElement.contains(event.target as Node)) { - this.isSelectorOpenChange.emit(false); - } - }; - - private watchForOutsideClicks() { - window.addEventListener('click', this.eventHandler); - } - - private stopWatchForOutsideClicks() { - window.removeEventListener('click', this.eventHandler); - } - - private setTooltipPosition() { - const tooltip = this.selectorTooltip?.nativeElement.getBoundingClientRect(); - const target = this.currentTooltipTarget?.getBoundingClientRect(); - - const container = - this.selectorContainer?.nativeElement.getBoundingClientRect(); - - if (!tooltip || !target || !container) return; - - const tooltipPosition = - tooltip.width === container.width || tooltip.x < container.x - ? 0 - : target.left + target.width / 2 - container.left - tooltip.width / 2; - - const arrowPosition = - target.x - tooltip.x + target.width / 2 - tooltipPosition; - - this.tooltipPositions = { - tooltip: tooltipPosition, - arrow: arrowPosition, - }; - } - private async fetchAllReactions() { if (!this.messageId) { return; diff --git a/projects/stream-chat-angular/src/lib/message/message.component.html b/projects/stream-chat-angular/src/lib/message/message.component.html index 0e72765b..2b6decf0 100644 --- a/projects/stream-chat-angular/src/lib/message/message.component.html +++ b/projects/stream-chat-angular/src/lib/message/message.component.html @@ -5,7 +5,7 @@ message?.type }} str-chat__message--{{ message?.status }} {{ message?.text ? 'str-chat__message--has-text' : 'has-no-text' - }}" + }} str-chat__message-menu-{{ areMessageOptionsOpen ? 'opened' : 'closed' }}" [class.str-chat__message--me]="isSentByCurrentUser" [class.str-chat__message--other]="!isSentByCurrentUser" [class.str-chat__message-simple--me]="isSentByCurrentUser" @@ -17,6 +17,8 @@ (message?.status === 'failed' && message?.errorStatusCode !== 403) || (message?.type === 'error' && message?.moderation_details) " + [class.str-chat__message-with-touch-support]="hasTouchSupport" + [class.str-chat__message-without-touch-support]="!hasTouchSupport" > @@ -31,10 +33,10 @@ >
- - - - - - - - -
-
- -
-
- -
+ + + + + + + + +
- +
+ +
-
+

diff --git a/projects/stream-chat-angular/src/lib/message/message.component.spec.ts b/projects/stream-chat-angular/src/lib/message/message.component.spec.ts index 7081c29b..f0d6d4c0 100644 --- a/projects/stream-chat-angular/src/lib/message/message.component.spec.ts +++ b/projects/stream-chat-angular/src/lib/message/message.component.spec.ts @@ -1,10 +1,11 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - import { - MessageResponseBase, - ReactionResponse, - UserResponse, -} from 'stream-chat'; + ComponentFixture, + TestBed, + fakeAsync, + tick, +} from '@angular/core/testing'; + +import { MessageResponseBase, UserResponse } from 'stream-chat'; import { DefaultStreamChatGenerics, StreamMessage } from '../types'; import { LoadingIndicatorComponent } from '../loading-indicator/loading-indicator.component'; import { MessageComponent } from './message.component'; @@ -23,6 +24,7 @@ import { AvatarPlaceholderComponent } from '../avatar-placeholder/avatar-placeho import { BehaviorSubject, of } from 'rxjs'; import { MessageActionsService } from '../message-actions.service'; import { MessageService } from '../message.service'; +import { NgxFloatUiModule } from 'ngx-float-ui'; describe('MessageComponent', () => { let component: MessageComponent; @@ -37,24 +39,22 @@ describe('MessageComponent', () => { let queryDeliveredIndicator: () => HTMLElement | null; let queryReadIndicator: () => HTMLElement | null; let queryAvatar: () => AvatarPlaceholderComponent; - let queryMessageOptions: () => HTMLElement | null; - let queryActionIcon: () => HTMLElement | null; let queryText: () => HTMLElement | null; let queryMessageActionsBoxComponent: () => | MessageActionsBoxComponent | undefined; let queryAttachmentComponent: () => AttachmentListComponent; - let queryReactionIcon: () => HTMLElement | null; - let queryMessageReactions: () => MessageReactionsComponent; let queryMessageInner: () => HTMLElement | null; let queryLoadingIndicator: () => HTMLElement | null; let queryDeletedMessageContainer: () => HTMLElement | null; let querySystemMessageContainer: () => HTMLElement | null; let queryReplyCountButton: () => HTMLButtonElement | null; - let queryReplyInThreadIcon: () => HTMLElement | null; let queryTranslationNotice: () => HTMLElement | null; let querySeeOriginalButton: () => HTMLButtonElement | null; let querySeeTranslationButton: () => HTMLButtonElement | null; + let queryMessageBubble: () => HTMLElement | null; + let queryMessageOptions: () => HTMLElement | null; + let queryMessageOptionsButton: () => HTMLElement | null; let resendMessageSpy: jasmine.Spy; let setAsActiveParentMessageSpy: jasmine.Spy; let jumpToMessageSpy: jasmine.Spy; @@ -69,7 +69,7 @@ describe('MessageComponent', () => { jumpToMessageSpy = jasmine.createSpy('jumpToMessage'); currentUser = mockCurrentUser(); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], + imports: [TranslateModule.forRoot(), NgxFloatUiModule], declarations: [ MessageComponent, AvatarComponent, @@ -117,24 +117,17 @@ describe('MessageComponent', () => { queryAvatar = () => fixture.debugElement.query(By.css('[data-testid="avatar"]')) ?.componentInstance as AvatarPlaceholderComponent; - queryMessageOptions = () => - nativeElement.querySelector('[data-testid=message-options]'); - queryActionIcon = () => - nativeElement.querySelector('[data-testid="action-icon"]'); queryText = () => nativeElement.querySelector('[data-testid="text"]'); - queryReactionIcon = () => - nativeElement.querySelector('[data-testid="reaction-icon"]'); - queryMessageReactions = () => - fixture.debugElement.query(By.directive(MessageReactionsComponent)) - .componentInstance as MessageReactionsComponent; queryMessageInner = () => nativeElement.querySelector('[data-testid="inner-message"]'); queryLoadingIndicator = () => nativeElement.querySelector('[data-testid="loading-indicator"]'); queryReplyCountButton = () => nativeElement.querySelector('[data-testid="reply-count-button"]'); - queryReplyInThreadIcon = () => - nativeElement.querySelector('[data-testid="reply-in-thread"]'); + queryMessageOptions = () => + nativeElement.querySelector('[data-testid="message-options"]'); + queryMessageOptionsButton = () => + nativeElement.querySelector('[data-testid="message-options-button"]'); message = mockMessage(); component.message = message; component.ngOnChanges({ message: {} as SimpleChange }); @@ -156,6 +149,8 @@ describe('MessageComponent', () => { nativeElement.querySelector('[data-testid="see-original"]'); querySeeTranslationButton = () => nativeElement.querySelector('[data-testid="see-translation"]'); + queryMessageBubble = () => + nativeElement.querySelector('[data-testid="message-bubble"]'); component.enabledMessageActions = [ 'read-events', 'send-reaction', @@ -425,7 +420,6 @@ describe('MessageComponent', () => { fixture.detectChanges(); expect(component.areOptionsVisible).toBe(false); - expect(queryMessageOptions()).toBeNull(); }); it('if message sending failed', () => { @@ -457,67 +451,159 @@ describe('MessageComponent', () => { }); }); - it('should display message options for regular messages', () => { - expect(queryMessageOptions()).not.toBeNull(); - }); + describe('message menu when touch support is available', () => { + beforeEach(() => { + component.hasTouchSupport = true; + fixture.detectChanges(); + }); - it('should display message actions for regular messages', () => { - component.enabledMessageActions = ['delete']; - component.ngOnChanges({ enabledMessageActions: {} as SimpleChange }); - fixture.detectChanges(); + it('should display message options for regular messages on long press', fakeAsync(() => { + spyOn(component['messageMenuTrigger'], 'show'); + component.hasTouchSupport = true; - expect(queryActionIcon()).not.toBeNull(); - }); + const messageBubble = queryMessageBubble()!; + const touchStart = new TouchEvent('touchstart'); + messageBubble.dispatchEvent(touchStart); + tick(200); - it(`shouldn't display message actions if there are no enabled message actions`, () => { - component.enabledMessageActions = []; - component.ngOnChanges({ enabledMessageActions: {} as SimpleChange }); - fixture.detectChanges(); + expect(component['messageMenuTrigger'].show).not.toHaveBeenCalled(); - expect(queryActionIcon()).toBeNull(); - }); + tick(200); - it(`shouldn't display message actions if there is no visible message action`, () => { - component.enabledMessageActions = ['flag-message']; - component.ngOnChanges({ enabledMessageActions: {} as SimpleChange }); - fixture.detectChanges(); + expect(component['messageMenuTrigger'].show).toHaveBeenCalled(); + })); + + it(`shouldn't display message options for regular messages on short press`, fakeAsync(() => { + spyOn(component['messageMenuTrigger'], 'show'); + component.hasTouchSupport = true; + + const messageBubble = queryMessageBubble()!; + const touchStart = new MouseEvent('touchstart'); + messageBubble.dispatchEvent(touchStart); + tick(200); - expect(queryActionIcon()).toBeNull(); + const mouseUpEvent = new MouseEvent('touchend'); + messageBubble.dispatchEvent(mouseUpEvent); + + expect(component['messageMenuTrigger'].show).not.toHaveBeenCalled(); + })); + + it(`shouldn't display message options if #areOptionsVisible is false`, fakeAsync(() => { + component.areOptionsVisible = false; + component.hasTouchSupport = true; + spyOn(component['messageMenuTrigger'], 'show'); + + const messageBubble = queryMessageBubble()!; + const mouseDownEvent = new TouchEvent('touchstart'); + messageBubble.dispatchEvent(mouseDownEvent); + tick(400); + + expect(component['messageMenuTrigger'].show).not.toHaveBeenCalled(); + })); + + it('should call custom message actions click handler', fakeAsync(() => { + const service = TestBed.inject(MessageActionsService); + const spy = jasmine.createSpy(); + service.customActionClickHandler = spy; + component.enabledMessageActions = ['update-own-message', 'flag-message']; + component.ngOnChanges({ enabledMessageActions: {} as SimpleChange }); + fixture.detectChanges(); + spyOn(component['messageMenuTrigger'], 'show'); + const messageBubble = queryMessageBubble()!; + const mouseDownEvent = new TouchEvent('touchstart'); + messageBubble.dispatchEvent(mouseDownEvent); + tick(400); + + expect(spy).toHaveBeenCalledWith({ + message: component.message, + enabledActions: component.enabledMessageActions, + isMine: component.isSentByCurrentUser, + customActions: service.customActions$.getValue(), + messageTextHtmlElement: component['messageTextElement']?.nativeElement, + }); + + expect(component['messageMenuTrigger'].show).not.toHaveBeenCalled(); + })); + + it(`shouldn't display the message options button`, () => { + expect(queryMessageOptions()).toBeNull(); + }); }); - it('should open and close message actions box', () => { - component.enabledMessageActions = ['update-own-message', 'flag-message']; - component.ngOnChanges({ enabledMessageActions: {} as SimpleChange }); - fixture.detectChanges(); + describe('message menu without touch support', () => { + beforeEach(() => { + component.hasTouchSupport = false; + fixture.detectChanges(); + }); + + it('should display message options for regular messages', () => { + expect(component.areMessageOptionsOpen).toBeFalse(); + + queryMessageOptionsButton()?.click(); + fixture.detectChanges(); + + expect(component.areMessageOptionsOpen).toBeTrue(); + }); - expect(component.isActionBoxOpen).toBe(false); + it(`shouldn't display message options for regular messages on long click`, fakeAsync(() => { + const messageBubble = queryMessageBubble()!; + const mouseDownEvent = new MouseEvent('mousedown', { button: 0 }); + messageBubble.dispatchEvent(mouseDownEvent); + tick(200); + const mouseUpEvent = new MouseEvent('mouseup'); + messageBubble.dispatchEvent(mouseUpEvent); + fixture.detectChanges(); - queryActionIcon()?.click(); + expect(component.areMessageOptionsOpen).toBeFalse(); + })); + + it(`shouldn't display message options if #areOptionsVisible is false`, fakeAsync(() => { + component.areOptionsVisible = false; + + queryMessageOptionsButton()?.click(); + fixture.detectChanges(); + + expect(component.areMessageOptionsOpen).toBeTrue(); + })); + + it('should call custom message actions click handler', () => { + const service = TestBed.inject(MessageActionsService); + const spy = jasmine.createSpy(); + service.customActionClickHandler = spy; + queryMessageOptionsButton()?.click(); + fixture.detectChanges(); + + expect(spy).toHaveBeenCalledWith({ + message: component.message, + enabledActions: component.enabledMessageActions, + isMine: component.isSentByCurrentUser, + customActions: service.customActions$.getValue(), + messageTextHtmlElement: component['messageTextElement']?.nativeElement, + }); + }); + }); + + it(`shouldn't display message options if there are no enabled message actions`, () => { + component.enabledMessageActions = []; + component.ngOnChanges({ enabledMessageActions: {} as SimpleChange }); fixture.detectChanges(); - expect(component.isActionBoxOpen).toBe(true); + expect(component.areOptionsVisible).toBeFalse(); }); - it('should call custom message actions click handler', () => { + it(`shouldn't display message actions if there is no visible message action`, () => { + component.enabledMessageActions = ['flag-message']; const service = TestBed.inject(MessageActionsService); - const spy = jasmine.createSpy(); - service.customActionClickHandler = spy; - component.enabledMessageActions = ['update-own-message', 'flag-message']; + service.defaultActions.find( + (a) => a.actionName === 'copy-message-text' + )!.isVisible = () => false; component.ngOnChanges({ enabledMessageActions: {} as SimpleChange }); fixture.detectChanges(); - queryActionIcon()?.click(); - - expect(spy).toHaveBeenCalledWith({ - message: component.message, - enabledActions: component.enabledMessageActions, - isMine: component.isSentByCurrentUser, - customActions: service.customActions$.getValue(), - }); + expect(component.areOptionsVisible).toBeFalse(); }); it('should provide #isMine to message actions box', () => { - component.isActionBoxOpen = true; fixture.detectChanges(); const messageActionsBoxComponent = queryMessageActionsBoxComponent()!; @@ -531,7 +617,6 @@ describe('MessageComponent', () => { }); it('should provide #message to message actions box', () => { - component.isActionBoxOpen = true; fixture.detectChanges(); const messageActionsBoxComponent = queryMessageActionsBoxComponent()!; @@ -579,64 +664,6 @@ describe('MessageComponent', () => { ); }); - it('should display reactions icon, if user can react to message', () => { - const message = { - ...mockMessage(), - id: 'messagId', - reaction_counts: { haha: 1 }, - latest_reactions: [ - { type: 'wow', user: { id: 'sara', name: 'Sara', image: 'image/url' } }, - { type: 'sad', user: { id: 'ben', name: 'Ben' } }, - ] as ReactionResponse[], - own_reactions: [ - { type: 'wow', user: { id: 'sara', name: 'Sara', image: 'image/url' } }, - ] as any as ReactionResponse[], - text: 'Hi', - }; - component.message = message as any as StreamMessage; - component.enabledMessageActions = []; - component.ngOnChanges({ - enabledMessageActions: {} as SimpleChange, - message: {} as SimpleChange, - }); - fixture.detectChanges(); - - expect(queryReactionIcon()).toBeNull(); - - component.enabledMessageActions = ['send-reaction']; - component.ngOnChanges({ enabledMessageActions: {} as SimpleChange }); - component.isReactionSelectorOpen = true; - fixture.detectChanges(); - const messageReactions = queryMessageReactions(); - - expect(queryReactionIcon()).not.toBeNull(); - expect(messageReactions.messageId).toBe(message.id); - expect(messageReactions.latestReactions).toBe(message.latest_reactions); - expect(messageReactions.messageReactionCounts).toBe( - message.reaction_counts - ); - - expect(messageReactions.ownReactions).toBe(message.own_reactions); - expect(messageReactions.isSelectorOpen).toBe(true); - - messageReactions.isSelectorOpenChange.next(false); - - expect(component.isReactionSelectorOpen).toBeFalse(); - }); - - it('should toggle reactions selector', () => { - component.enabledMessageActions = ['send-reaction']; - component.ngOnChanges({ enabledMessageActions: {} as SimpleChange }); - fixture.detectChanges(); - - expect(component.isReactionSelectorOpen).toBeFalse(); - - queryReactionIcon()?.click(); - fixture.detectChanges(); - - expect(component.isReactionSelectorOpen).toBeTrue(); - }); - it(`shouldn't display empty text`, () => { component.message = { ...component.message!, ...{ text: '' } }; component.ngOnChanges({ message: {} as SimpleChange }); @@ -694,7 +721,7 @@ describe('MessageComponent', () => { expect(queryDeletedMessageContainer()).not.toBeNull(); expect(queryAvatar()).toBeUndefined(); - expect(queryMessageOptions()).toBeNull(); + expect(component.areOptionsVisible).toBeFalse(); }); it('should display system message', () => { @@ -912,27 +939,6 @@ describe('MessageComponent', () => { expect(setAsActiveParentMessageSpy).toHaveBeenCalledWith(component.message); }); - it('should display reply in thread icon, if user has the necessary capability', () => { - expect(queryReplyInThreadIcon()).not.toBeNull(); - - component.enabledMessageActions = []; - component.ngOnChanges({ enabledMessageActions: {} as SimpleChange }); - fixture.detectChanges(); - - expect(queryReplyInThreadIcon()).toBeNull(); - }); - - it('should select parent message, if reply in thread is clicked', () => { - component.enabledMessageActions = ['send-reply']; - component.ngOnChanges({ enabledMessageActions: {} as SimpleChange }); - fixture.detectChanges(); - - queryReplyInThreadIcon()?.click(); - fixture.detectChanges(); - - expect(setAsActiveParentMessageSpy).toHaveBeenCalledWith(component.message); - }); - describe('in thread mode', () => { beforeEach(() => { component.mode = 'thread'; @@ -958,9 +964,8 @@ describe('MessageComponent', () => { expect(queryDeliveredIndicator()).toBeNull(); }); - it('should not display message actions for parent meesage', () => { - expect(queryActionIcon()).toBeNull(); - expect(queryReactionIcon()).toBeNull(); + it('should not display message options for parent meesage', () => { + expect(component.areOptionsVisible).toBeFalse(); }); it('should not display reply count for parent meesage', () => { @@ -969,42 +974,6 @@ describe('MessageComponent', () => { expect(queryReplyCountButton()).toBeNull(); }); - - it(`shouldn't display reply in thread for thread replies`, () => { - component.enabledMessageActions = ['send-reply']; - component.message!.parent_id = 'parentMessage'; - component.ngOnChanges({ - message: {} as SimpleChange, - enabledMessageActions: {} as SimpleChange, - }); - fixture.detectChanges(); - - expect(queryReplyInThreadIcon()).toBeNull(); - }); - - it('should display message actions for thread replies', () => { - component.enabledMessageActions = ['update-any-message']; - component.message!.parent_id = 'parentMessage'; - component.ngOnChanges({ - message: {} as SimpleChange, - enabledMessageActions: {} as SimpleChange, - }); - fixture.detectChanges(); - - expect(queryActionIcon()).not.toBeNull(); - }); - - it('should display message reactions for thread replies', () => { - component.enabledMessageActions = ['send-reaction']; - component.message!.parent_id = 'parentMessage'; - component.ngOnChanges({ - message: {} as SimpleChange, - enabledMessageActions: {} as SimpleChange, - }); - fixture.detectChanges(); - - expect(queryReactionIcon()).not.toBeNull(); - }); }); it('should apply necessary CSS class, if highlighted', () => { @@ -1031,7 +1000,7 @@ describe('MessageComponent', () => { enabledMessageActions: {} as any as SimpleChange, }); - expect(component.visibleMessageActionsCount).toBe(3); + expect(component.visibleMessageActionsCount).toBe(3 + 1); component.enabledMessageActions = [ 'pin-message', @@ -1046,7 +1015,7 @@ describe('MessageComponent', () => { enabledMessageActions: {} as any as SimpleChange, }); - expect(component.visibleMessageActionsCount).toBe(4); + expect(component.visibleMessageActionsCount).toBe(4 + 1); const customActions = [ { @@ -1059,7 +1028,7 @@ describe('MessageComponent', () => { const service = TestBed.inject(MessageActionsService); service.customActions$.next(customActions); - expect(component.visibleMessageActionsCount).toBe(5); + expect(component.visibleMessageActionsCount).toBe(5 + 1); }); describe('quoted message', () => { diff --git a/projects/stream-chat-angular/src/lib/message/message.component.ts b/projects/stream-chat-angular/src/lib/message/message.component.ts index e9c8bbb2..b3e004f3 100644 --- a/projects/stream-chat-angular/src/lib/message/message.component.ts +++ b/projects/stream-chat-angular/src/lib/message/message.component.ts @@ -8,6 +8,8 @@ import { ChangeDetectorRef, ChangeDetectionStrategy, AfterViewInit, + ViewChild, + ElementRef, } from '@angular/core'; import { Attachment, UserResponse } from 'stream-chat'; import { ChannelService } from '../channel.service'; @@ -32,7 +34,10 @@ import { listUsers } from '../list-users'; import { DateParserService } from '../date-parser.service'; import { MessageService } from '../message.service'; import { MessageActionsService } from '../message-actions.service'; -import { NgxFloatUiContentComponent } from 'ngx-float-ui'; +import { + NgxFloatUiContentComponent, + NgxFloatUiLooseDirective, +} from 'ngx-float-ui'; type MessagePart = { content: string; @@ -74,10 +79,7 @@ export class MessageComponent @Input() isHighlighted = false; canReceiveReadEvents: boolean | undefined; canReactToMessage: boolean | undefined; - isActionBoxOpen = false; isEditedFlagOpened = false; - isReactionSelectorOpen = false; - visibleMessageActionsCount = 0; messageTextParts: MessagePart[] | undefined = []; messageText?: string; shouldDisplayTranslationNotice = false; @@ -99,7 +101,9 @@ export class MessageComponent replyCountParam: { replyCount: number | undefined } = { replyCount: undefined, }; + areMessageOptionsOpen = false; canDisplayReadStatus = false; + hasTouchSupport = 'ontouchstart' in window || navigator.maxTouchPoints > 0; private quotedMessageAttachments: Attachment[] | undefined; private subscriptions: Subscription[] = []; private isViewInited = false; @@ -107,6 +111,14 @@ export class MessageComponent private readonly urlRegexp = /(?:(?:https?|ftp|file):\/\/|www\.|ftp\.)(?:\([-A-Z0-9+&@#/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#/%=~_|$?!:,.]*\)|[A-Z0-9+&@#/%=~_|$])/gim; private emojiRegexp = new RegExp(emojiRegex(), 'g'); + @ViewChild('messageMenuTrigger') + messageMenuTrigger!: NgxFloatUiLooseDirective; + @ViewChild('messageMenuFloat') + messageMenuFloat!: NgxFloatUiContentComponent; + @ViewChild('messageTextElement') messageTextElement?: ElementRef; + private showMessageMenuTimeout?: ReturnType; + private shouldPreventMessageMenuClose = false; + private _visibleMessageActionsCount = 0; constructor( private chatClientService: ChatClientService, @@ -120,6 +132,17 @@ export class MessageComponent this.displayAs = this.messageService.displayAs; } + get visibleMessageActionsCount() { + return this._visibleMessageActionsCount; + } + + set visibleMessageActionsCount(count: number) { + this._visibleMessageActionsCount = count; + if (this.areOptionsVisible && this._visibleMessageActionsCount === 0) { + this.areOptionsVisible = false; + } + } + ngOnInit(): void { this.subscriptions.push( this.chatClientService.user$.subscribe((u) => { @@ -215,16 +238,19 @@ export class MessageComponent this.shouldDisplayThreadLink = !!this.message?.reply_count && this.mode !== 'thread'; } - if (changes.message || changes.mode) { + if (changes.message || changes.mode || changes.enabledMessageActions) { this.areOptionsVisible = this.message ? !( !this.message.type || this.message.type === 'error' || this.message.type === 'system' || + this.message.type === 'deleted' || this.message.type === 'ephemeral' || this.message.status === 'failed' || this.message.status === 'sending' || - (this.mode === 'thread' && !this.message.parent_id) + (this.mode === 'thread' && !this.message.parent_id) || + this.message.deleted_at || + this.enabledMessageActions.length === 0 ) : false; } @@ -249,7 +275,45 @@ export class MessageComponent this.subscriptions.forEach((s) => s.unsubscribe()); } - messageActionsClicked() { + mousePushedDown(event: MouseEvent) { + if ( + !this.hasTouchSupport || + event.button !== 0 || + !this.areOptionsVisible + ) { + return; + } + this.startMessageMenuShowTimer({ fromTouch: false }); + } + + mouseReleased() { + this.stopMessageMenuShowTimer(); + } + + touchStarted() { + if (!this.areOptionsVisible) { + return; + } + this.startMessageMenuShowTimer({ fromTouch: true }); + } + + touchEnded() { + this.stopMessageMenuShowTimer(); + } + + messageBubbleClicked(event: Event) { + if (!this.hasTouchSupport) { + return; + } + if (this.shouldPreventMessageMenuClose) { + event.stopPropagation(); + this.shouldPreventMessageMenuClose = false; + } else if (this.areMessageOptionsOpen) { + this.messageMenuTrigger?.hide(); + } + } + + messageOptionsButtonClicked() { if (!this.message) { return; } @@ -259,9 +323,10 @@ export class MessageComponent enabledActions: this.enabledMessageActions, customActions: this.messageActionsService.customActions$.getValue(), isMine: this.isSentByCurrentUser, + messageTextHtmlElement: this.messageTextElement?.nativeElement, }); } else { - this.isActionBoxOpen = !this.isActionBoxOpen; + this.areMessageOptionsOpen = !this.areMessageOptionsOpen; } } @@ -303,9 +368,6 @@ export class MessageComponent return { messageReactionCounts: this.message?.reaction_counts || {}, latestReactions: this.message?.latest_reactions || [], - isSelectorOpen: this.isReactionSelectorOpen, - isSelectorOpenChangeHandler: (isOpen) => - (this.isReactionSelectorOpen = isOpen), messageId: this.message?.id, ownReactions: this.message?.own_reactions || [], }; @@ -347,6 +409,7 @@ export class MessageComponent isMine: this.isSentByCurrentUser, enabledActions: this.enabledMessageActions, message: this.message, + messageTextHtmlElement: this.messageTextElement?.nativeElement, }; } @@ -499,4 +562,34 @@ export class MessageComponent (u) => u.id !== this.userId )[0]; } + + private startMessageMenuShowTimer(options: { fromTouch: boolean }) { + this.stopMessageMenuShowTimer(); + this.showMessageMenuTimeout = setTimeout(() => { + if (!this.message) { + return; + } + if (this.messageActionsService.customActionClickHandler) { + this.messageActionsService.customActionClickHandler({ + message: this.message, + enabledActions: this.enabledMessageActions, + customActions: this.messageActionsService.customActions$.getValue(), + isMine: this.isSentByCurrentUser, + messageTextHtmlElement: this.messageTextElement?.nativeElement, + }); + return; + } else { + this.shouldPreventMessageMenuClose = !options.fromTouch; + this.messageMenuTrigger?.show(); + } + this.showMessageMenuTimeout = undefined; + }, 400); + } + + private stopMessageMenuShowTimer() { + if (this.showMessageMenuTimeout) { + clearTimeout(this.showMessageMenuTimeout); + this.showMessageMenuTimeout = undefined; + } + } } diff --git a/projects/stream-chat-angular/src/lib/stream-chat.module.ts b/projects/stream-chat-angular/src/lib/stream-chat.module.ts index 8494c180..df91ecc0 100644 --- a/projects/stream-chat-angular/src/lib/stream-chat.module.ts +++ b/projects/stream-chat-angular/src/lib/stream-chat.module.ts @@ -27,6 +27,7 @@ import { VoiceRecordingComponent } from './voice-recording/voice-recording.compo import { VoiceRecordingWavebarComponent } from './voice-recording/voice-recording-wavebar/voice-recording-wavebar.component'; import { NgxFloatUiModule } from 'ngx-float-ui'; import { TranslateModule } from '@ngx-translate/core'; +import { MessageReactionsSelectorComponent } from './message-reactions-selector/message-reactions-selector.component'; @NgModule({ declarations: [ @@ -54,6 +55,7 @@ import { TranslateModule } from '@ngx-translate/core'; MessageBouncePromptComponent, VoiceRecordingComponent, VoiceRecordingWavebarComponent, + MessageReactionsSelectorComponent, ], imports: [ CommonModule, @@ -86,6 +88,7 @@ import { TranslateModule } from '@ngx-translate/core'; MessageBouncePromptComponent, VoiceRecordingComponent, VoiceRecordingWavebarComponent, + MessageReactionsSelectorComponent, ], }) export class StreamChatModule {} diff --git a/projects/stream-chat-angular/src/lib/types.ts b/projects/stream-chat-angular/src/lib/types.ts index 160afb07..dd4c4038 100644 --- a/projects/stream-chat-angular/src/lib/types.ts +++ b/projects/stream-chat-angular/src/lib/types.ts @@ -235,20 +235,46 @@ export type IconContext = { icon: Icon | undefined; }; -export type MessageActionsBoxContext = { +export type MessageActionsBoxContext< + T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics +> = { isMine: boolean; - message: StreamMessage | undefined; + message: StreamMessage | undefined; enabledActions: string[]; + messageTextHtmlElement: HTMLElement | undefined; }; +export type MessageActionHandlerExtraParams = { + isMine: boolean; + messageTextHtmlElement?: HTMLElement; +}; + +export type MessageActionHandler< + T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics +> = ( + message: StreamMessage, + params: MessageActionHandlerExtraParams +) => void; + export type MessageActionBoxItemContext< T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics > = { actionName: string; actionLabelOrTranslationKey: ((message: StreamMessage) => string) | string; message: StreamMessage; - isMine: boolean; - actionHandler: (message: StreamMessage, isMine: boolean) => void; + actionHandlerExtraParams: MessageActionHandlerExtraParams; + actionHandler: MessageActionHandler; +}; + +export type MessageReactionActionItem< + T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics +> = { + actionName: 'react'; + isVisible: ( + enabledActions: string[], + isMine: boolean, + message: StreamMessage + ) => boolean; }; type MessageActionItemBase< @@ -260,13 +286,21 @@ type MessageActionItemBase< isMine: boolean, message: StreamMessage ) => boolean; - actionHandler: (message: StreamMessage, isMine: boolean) => void; + actionHandler: MessageActionHandler; }; export type MessageActionItem< T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics > = MessageActionItemBase & { - actionName: 'quote' | 'pin' | 'flag' | 'edit' | 'delete' | 'mark-unread'; + actionName: + | 'quote' + | 'pin' + | 'flag' + | 'edit' + | 'delete' + | 'mark-unread' + | 'thread-reply' + | 'copy-message-text'; }; export type CustomMessageActionItem< @@ -275,13 +309,16 @@ export type CustomMessageActionItem< actionName: string; }; +export type MessageReactionsSelectorContext = { + messageId: string | undefined; + ownReactions: ReactionResponse[]; +}; + export type MessageReactionsContext = { messageId: string | undefined; messageReactionCounts: { [key in MessageReactionType]?: number }; - isSelectorOpen: boolean; latestReactions: ReactionResponse[]; ownReactions: ReactionResponse[]; - isSelectorOpenChangeHandler: (isOpen: boolean) => void; }; export type ModalContext = { @@ -408,12 +445,7 @@ export type MessageReactionClickDetails = { export type MessageActionsClickDetails< T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics -> = { - message: StreamMessage; - enabledActions: string[]; - isMine: boolean; - customActions: CustomMessageActionItem[]; -}; +> = MessageActionsBoxContext & { customActions: CustomMessageActionItem[] }; export type GroupStyleOptions = { noGroupByUser?: boolean; diff --git a/projects/stream-chat-angular/src/public-api.ts b/projects/stream-chat-angular/src/public-api.ts index 83e19a58..151aa43e 100644 --- a/projects/stream-chat-angular/src/public-api.ts +++ b/projects/stream-chat-angular/src/public-api.ts @@ -62,3 +62,4 @@ export * from './lib/message-actions.service'; export * from './lib/voice-recording/voice-recording.component'; export * from './lib/voice-recording/voice-recording-wavebar/voice-recording-wavebar.component'; export * from './lib/is-on-separate-date'; +export * from './lib/message-reactions-selector/message-reactions-selector.component';