stream-chat-angular 5.0.0-v5.8 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/assets/i18n/en.d.ts +1 -0
  2. package/assets/version.d.ts +1 -1
  3. package/esm2020/assets/i18n/en.mjs +3 -2
  4. package/esm2020/assets/version.mjs +2 -2
  5. package/esm2020/lib/attachment-list/attachment-list.component.mjs +3 -3
  6. package/esm2020/lib/attachment-preview-list/attachment-preview-list.component.mjs +3 -3
  7. package/esm2020/lib/attachment.service.mjs +103 -7
  8. package/esm2020/lib/avatar/avatar.component.mjs +3 -9
  9. package/esm2020/lib/avatar-placeholder/avatar-placeholder.component.mjs +3 -11
  10. package/esm2020/lib/channel/channel.component.mjs +5 -6
  11. package/esm2020/lib/channel-header/channel-header.component.mjs +3 -3
  12. package/esm2020/lib/channel-list/channel-list.component.mjs +5 -6
  13. package/esm2020/lib/channel-preview/channel-preview.component.mjs +3 -3
  14. package/esm2020/lib/channel-query.mjs +77 -0
  15. package/esm2020/lib/channel.service.mjs +197 -135
  16. package/esm2020/lib/chat-client.service.mjs +33 -11
  17. package/esm2020/lib/custom-templates.service.mjs +6 -10
  18. package/esm2020/lib/icon/icon.component.mjs +3 -7
  19. package/esm2020/lib/icon-placeholder/icon-placeholder.component.mjs +4 -7
  20. package/esm2020/lib/loading-indicator/loading-indicator.component.mjs +6 -22
  21. package/esm2020/lib/loading-indicator-placeholder/loading-indicator-placeholder.component.mjs +5 -23
  22. package/esm2020/lib/message/message.component.mjs +129 -16
  23. package/esm2020/lib/message-actions-box/message-actions-box.component.mjs +39 -14
  24. package/esm2020/lib/message-actions.service.mjs +66 -2
  25. package/esm2020/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.mjs +16 -6
  26. package/esm2020/lib/message-input/message-input.component.mjs +76 -74
  27. package/esm2020/lib/message-input/textarea/textarea.component.mjs +13 -1
  28. package/esm2020/lib/message-list/message-list.component.mjs +83 -15
  29. package/esm2020/lib/message-reactions/message-reactions.component.mjs +7 -78
  30. package/esm2020/lib/message-reactions-selector/message-reactions-selector.component.mjs +61 -0
  31. package/esm2020/lib/message-reactions.service.mjs +3 -4
  32. package/esm2020/lib/modal/modal.component.mjs +1 -1
  33. package/esm2020/lib/stream-chat.module.mjs +8 -8
  34. package/esm2020/lib/thread/thread.component.mjs +3 -3
  35. package/esm2020/lib/types.mjs +1 -1
  36. package/esm2020/lib/voice-recording/voice-recording.component.mjs +3 -3
  37. package/esm2020/public-api.mjs +3 -2
  38. package/fesm2015/stream-chat-angular.mjs +2747 -2338
  39. package/fesm2015/stream-chat-angular.mjs.map +1 -1
  40. package/fesm2020/stream-chat-angular.mjs +2687 -2284
  41. package/fesm2020/stream-chat-angular.mjs.map +1 -1
  42. package/lib/attachment.service.d.ts +11 -4
  43. package/lib/avatar/avatar.component.d.ts +1 -5
  44. package/lib/avatar-placeholder/avatar-placeholder.component.d.ts +1 -5
  45. package/lib/channel-query.d.ts +26 -0
  46. package/lib/channel.service.d.ts +86 -57
  47. package/lib/chat-client.service.d.ts +7 -3
  48. package/lib/custom-templates.service.d.ts +8 -12
  49. package/lib/icon/icon.component.d.ts +2 -6
  50. package/lib/icon-placeholder/icon-placeholder.component.d.ts +1 -5
  51. package/lib/loading-indicator/loading-indicator.component.d.ts +1 -10
  52. package/lib/loading-indicator-placeholder/loading-indicator-placeholder.component.d.ts +1 -11
  53. package/lib/message/message.component.d.ts +31 -9
  54. package/lib/message-actions-box/message-actions-box.component.d.ts +11 -6
  55. package/lib/message-actions.service.d.ts +3 -2
  56. package/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.d.ts +1 -0
  57. package/lib/message-input/message-input.component.d.ts +19 -7
  58. package/lib/message-input/textarea/textarea.component.d.ts +1 -0
  59. package/lib/message-list/message-list.component.d.ts +11 -6
  60. package/lib/message-reactions/message-reactions.component.d.ts +6 -30
  61. package/lib/message-reactions-selector/message-reactions-selector.component.d.ts +35 -0
  62. package/lib/stream-chat.module.d.ts +5 -5
  63. package/lib/types.d.ts +28 -29
  64. package/package.json +5 -5
  65. package/public-api.d.ts +2 -1
  66. package/src/assets/assets/EmojiOneColor.woff2 +0 -0
  67. package/src/assets/assets/NotoColorEmoji-flags.woff2 +0 -0
  68. package/src/assets/assets/Poweredby_100px-White_VertText.png +0 -0
  69. package/src/assets/assets/icons/stream-chat-icons.eot +0 -0
  70. package/src/assets/assets/icons/stream-chat-icons.svg +46 -0
  71. package/src/assets/assets/icons/stream-chat-icons.ttf +0 -0
  72. package/src/assets/assets/icons/stream-chat-icons.woff +0 -0
  73. package/src/assets/assets/icons/stream-chat-icons.woff2 +0 -0
  74. package/src/assets/assets/str-chat__reaction-list-sprite@1x.png +0 -0
  75. package/src/assets/assets/str-chat__reaction-list-sprite@2x.png +0 -0
  76. package/src/assets/assets/str-chat__reaction-list-sprite@3x.png +0 -0
  77. package/src/assets/i18n/en.ts +2 -1
  78. package/src/assets/styles/css/index.css +2 -2
  79. package/src/assets/styles/css/index.layout.css +2 -2
  80. package/src/assets/styles/scss/AttachmentList/AttachmentList-layout.scss +74 -12
  81. package/src/assets/styles/scss/AttachmentList/AttachmentList-theme.scss +52 -0
  82. package/src/assets/styles/scss/AttachmentPreviewList/AttachmentPreviewList-layout.scss +24 -9
  83. package/src/assets/styles/scss/AttachmentPreviewList/AttachmentPreviewList-theme.scss +29 -0
  84. package/src/assets/styles/scss/AudioRecorder/AudioRecorder-layout.scss +89 -0
  85. package/src/assets/styles/scss/AudioRecorder/AudioRecorder-theme.scss +51 -0
  86. package/src/assets/styles/scss/Autocomplete/Autocomplete-layout.scss +1 -1
  87. package/src/assets/styles/scss/Avatar/Avatar-layout.scss +46 -0
  88. package/src/assets/styles/scss/Channel/Channel-layout.scss +1 -0
  89. package/src/assets/styles/scss/Channel/Channel-theme.scss +1 -0
  90. package/src/assets/styles/scss/ChannelList/ChannelList-layout.scss +2 -2
  91. package/src/assets/styles/scss/ChannelList/ChannelList-theme.scss +4 -2
  92. package/src/assets/styles/scss/ChannelPreview/ChannelPreview-layout.scss +2 -0
  93. package/src/assets/styles/scss/ChannelPreview/ChannelPreview-theme.scss +1 -0
  94. package/src/assets/styles/scss/EditMessageForm/EditMessageForm-theme.scss +9 -9
  95. package/src/assets/styles/scss/Icon/Icon-layout.scss +87 -0
  96. package/src/assets/styles/scss/Icon/Icon-theme.scss +13 -0
  97. package/src/assets/styles/scss/ImageCarousel/ImageCarousel-layout.scss +1 -0
  98. package/src/assets/styles/scss/ImageCarousel/ImageCarousel-theme.scss +1 -0
  99. package/src/assets/styles/scss/LoadingIndicator/LoadingIndicator-layout.scss +10 -1
  100. package/src/assets/styles/scss/LoadingIndicator/LoadingIndicator-theme.scss +6 -4
  101. package/src/assets/styles/scss/Message/Message-layout.scss +45 -6
  102. package/src/assets/styles/scss/Message/Message-theme.scss +6 -0
  103. package/src/assets/styles/scss/MessageInput/MessageInput-layout.scss +33 -1
  104. package/src/assets/styles/scss/MessageInput/MessageInput-theme.scss +65 -2
  105. package/src/assets/styles/scss/MessageList/MessageList-theme.scss +2 -0
  106. package/src/assets/styles/scss/MessageReactions/MessageReactionsSelector-layout.scss +18 -0
  107. package/src/assets/styles/scss/MessageReactions/MessageReactionsSelector-theme.scss +5 -0
  108. package/src/assets/styles/scss/Modal/Modal-layout.scss +1 -0
  109. package/src/assets/styles/scss/Modal/Modal-theme.scss +6 -0
  110. package/src/assets/styles/scss/_base.scss +4 -2
  111. package/src/assets/styles/scss/_emoji-replacement.scss +4 -2
  112. package/src/assets/styles/scss/_icons.scss +24 -2
  113. package/src/assets/styles/scss/_variables.scss +2 -0
  114. package/src/assets/styles/scss/index.layout.scss +2 -0
  115. package/src/assets/styles/scss/index.scss +2 -0
  116. package/src/assets/version.ts +1 -1
  117. package/esm2020/lib/edit-message-form/edit-message-form.component.mjs +0 -83
  118. package/lib/edit-message-form/edit-message-form.component.d.ts +0 -31
@@ -1,13 +1,14 @@
1
- import { OnChanges, SimpleChanges, OnDestroy, OnInit, ChangeDetectorRef, AfterViewInit } from '@angular/core';
1
+ import { OnChanges, SimpleChanges, OnDestroy, OnInit, ChangeDetectorRef, AfterViewInit, ElementRef, NgZone } from '@angular/core';
2
2
  import { UserResponse } from 'stream-chat';
3
3
  import { ChannelService } from '../channel.service';
4
4
  import { ChatClientService } from '../chat-client.service';
5
5
  import { AttachmentListContext, MentionTemplateContext, MessageActionsBoxContext, MessageReactionsContext, DefaultStreamChatGenerics, StreamMessage, DeliveredStatusContext, SendingStatusContext, ReadStatusContext, SystemMessageContext, CustomMetadataContext } from '../types';
6
+ import { Observable } from 'rxjs';
6
7
  import { CustomTemplatesService } from '../custom-templates.service';
7
8
  import { DateParserService } from '../date-parser.service';
8
9
  import { MessageService } from '../message.service';
9
10
  import { MessageActionsService } from '../message-actions.service';
10
- import { NgxFloatUiContentComponent } from 'ngx-float-ui';
11
+ import { NgxFloatUiContentComponent, NgxFloatUiLooseDirective } from 'ngx-float-ui';
11
12
  import * as i0 from "@angular/core";
12
13
  declare type MessagePart = {
13
14
  content: string;
@@ -24,7 +25,8 @@ export declare class MessageComponent implements OnInit, OnChanges, OnDestroy, A
24
25
  private cdRef;
25
26
  private dateParser;
26
27
  private messageService;
27
- private messageActionsService;
28
+ messageActionsService: MessageActionsService;
29
+ private ngZone;
28
30
  /**
29
31
  * The message to be displayed
30
32
  */
@@ -45,12 +47,13 @@ export declare class MessageComponent implements OnInit, OnChanges, OnDestroy, A
45
47
  * Highlighting is used to add visual emphasize to a message when jumping to the message
46
48
  */
47
49
  isHighlighted: boolean;
50
+ /**
51
+ * An Observable that emits when the message list is scrolled, it's used to prevent opening the message menu while scroll is in progress
52
+ */
53
+ scroll$?: Observable<void>;
48
54
  canReceiveReadEvents: boolean | undefined;
49
55
  canReactToMessage: boolean | undefined;
50
- isActionBoxOpen: boolean;
51
56
  isEditedFlagOpened: boolean;
52
- isReactionSelectorOpen: boolean;
53
- visibleMessageActionsCount: number;
54
57
  messageTextParts: MessagePart[] | undefined;
55
58
  messageText?: string;
56
59
  shouldDisplayTranslationNotice: boolean;
@@ -72,19 +75,35 @@ export declare class MessageComponent implements OnInit, OnChanges, OnDestroy, A
72
75
  replyCountParam: {
73
76
  replyCount: number | undefined;
74
77
  };
78
+ areMessageOptionsOpen: boolean;
75
79
  canDisplayReadStatus: boolean;
80
+ hasTouchSupport: boolean;
76
81
  private quotedMessageAttachments;
77
82
  private subscriptions;
78
83
  private isViewInited;
79
84
  private userId?;
80
85
  private readonly urlRegexp;
81
86
  private emojiRegexp;
82
- constructor(chatClientService: ChatClientService, channelService: ChannelService, customTemplatesService: CustomTemplatesService, cdRef: ChangeDetectorRef, dateParser: DateParserService, messageService: MessageService, messageActionsService: MessageActionsService);
87
+ messageMenuTrigger: NgxFloatUiLooseDirective;
88
+ messageMenuFloat: NgxFloatUiContentComponent;
89
+ messageTextElement?: ElementRef<HTMLElement>;
90
+ messageBubble?: ElementRef<HTMLElement>;
91
+ private showMessageMenuTimeout?;
92
+ private shouldPreventMessageMenuClose;
93
+ private _visibleMessageActionsCount;
94
+ constructor(chatClientService: ChatClientService, channelService: ChannelService, customTemplatesService: CustomTemplatesService, cdRef: ChangeDetectorRef, dateParser: DateParserService, messageService: MessageService, messageActionsService: MessageActionsService, ngZone: NgZone);
95
+ get visibleMessageActionsCount(): number;
96
+ set visibleMessageActionsCount(count: number);
83
97
  ngOnInit(): void;
84
98
  ngOnChanges(changes: SimpleChanges): void;
85
99
  ngAfterViewInit(): void;
86
100
  ngOnDestroy(): void;
87
- messageActionsClicked(): void;
101
+ mousePushedDown(event: MouseEvent): void;
102
+ mouseReleased(): void;
103
+ touchStarted(): void;
104
+ touchEnded(): void;
105
+ messageBubbleClicked(event: Event): void;
106
+ messageOptionsButtonClicked(): void;
88
107
  messageActionsBoxClicked(floatingContent: NgxFloatUiContentComponent): void;
89
108
  getAttachmentListContext(): AttachmentListContext;
90
109
  getMessageContext(): SystemMessageContext;
@@ -109,7 +128,10 @@ export declare class MessageComponent implements OnInit, OnChanges, OnDestroy, A
109
128
  private wrapLinksWithAnchorTag;
110
129
  private setIsSentByCurrentUser;
111
130
  private setLastReadUser;
131
+ private startMessageMenuShowTimer;
132
+ private registerMenuTriggerEventHandlers;
133
+ private stopMessageMenuShowTimer;
112
134
  static ɵfac: i0.ɵɵFactoryDeclaration<MessageComponent, never>;
113
- static ɵcmp: i0.ɵɵComponentDeclaration<MessageComponent, "stream-message", never, { "message": "message"; "enabledMessageActions": "enabledMessageActions"; "isLastSentMessage": "isLastSentMessage"; "mode": "mode"; "isHighlighted": "isHighlighted"; }, {}, never, never, false, never>;
135
+ static ɵcmp: i0.ɵɵComponentDeclaration<MessageComponent, "stream-message", never, { "message": "message"; "enabledMessageActions": "enabledMessageActions"; "isLastSentMessage": "isLastSentMessage"; "mode": "mode"; "isHighlighted": "isHighlighted"; "scroll$": "scroll$"; }, {}, never, never, false, never>;
114
136
  }
115
137
  export {};
@@ -1,6 +1,6 @@
1
1
  import { AfterViewInit, ChangeDetectorRef, OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef } from '@angular/core';
2
2
  import { CustomTemplatesService } from '../custom-templates.service';
3
- import { CustomMessageActionItem, MessageActionBoxItemContext, MessageActionItem, MessageInputContext, StreamMessage } from '../types';
3
+ import { CustomMessageActionItem, MessageActionBoxItemContext, MessageActionItem, MessageReactionActionItem, MessageReactionsSelectorContext, StreamMessage } from '../types';
4
4
  import { MessageActionsService } from '../message-actions.service';
5
5
  import * as i0 from "@angular/core";
6
6
  /**
@@ -18,13 +18,16 @@ export declare class MessageActionsBoxComponent implements OnInit, OnChanges, On
18
18
  * The message the actions will be executed on
19
19
  */
20
20
  message: StreamMessage | undefined;
21
+ /**
22
+ * The HTML element which contains the message text, it's used for the "copy message text" action
23
+ */
24
+ messageTextHtmlElement: HTMLElement | undefined;
21
25
  /**
22
26
  * 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.
23
27
  */
24
28
  enabledActions: string[];
25
- messageInputTemplate: TemplateRef<MessageInputContext> | undefined;
26
29
  messageActionItemTemplate: TemplateRef<MessageActionBoxItemContext> | undefined;
27
- visibleMessageActionItems: (MessageActionItem | CustomMessageActionItem)[];
30
+ visibleMessageActionItems: (MessageActionItem | CustomMessageActionItem | MessageReactionActionItem)[];
28
31
  isEditModalOpen: boolean;
29
32
  customActions: CustomMessageActionItem[];
30
33
  private readonly messageActionItems;
@@ -36,9 +39,11 @@ export declare class MessageActionsBoxComponent implements OnInit, OnChanges, On
36
39
  ngAfterViewInit(): void;
37
40
  ngOnDestroy(): void;
38
41
  getActionLabel(actionLabelOrTranslationKey: ((message: StreamMessage) => string) | string): string;
39
- getMessageActionTemplateContext(item: MessageActionItem | CustomMessageActionItem): MessageActionBoxItemContext;
40
- trackByActionName(_: number, item: MessageActionItem | CustomMessageActionItem): string;
42
+ getReactionSelectorTemplateContext(): MessageReactionsSelectorContext;
43
+ getMessageActionTemplateContext(item: MessageActionItem | CustomMessageActionItem | MessageReactionActionItem): MessageActionBoxItemContext;
44
+ trackByActionName(_: number, item: MessageActionItem | CustomMessageActionItem | MessageReactionActionItem): string;
45
+ private isReactAction;
41
46
  private setVisibleActions;
42
47
  static ɵfac: i0.ɵɵFactoryDeclaration<MessageActionsBoxComponent, never>;
43
- static ɵcmp: i0.ɵɵComponentDeclaration<MessageActionsBoxComponent, "stream-message-actions-box", never, { "isMine": "isMine"; "message": "message"; "enabledActions": "enabledActions"; }, {}, never, never, false, never>;
48
+ static ɵcmp: i0.ɵɵComponentDeclaration<MessageActionsBoxComponent, "stream-message-actions-box", never, { "isMine": "isMine"; "message": "message"; "messageTextHtmlElement": "messageTextHtmlElement"; "enabledActions": "enabledActions"; }, {}, never, never, false, never>;
44
49
  }
@@ -1,5 +1,5 @@
1
1
  import { BehaviorSubject } from 'rxjs';
2
- import { CustomMessageActionItem, DefaultStreamChatGenerics, MessageActionItem, MessageActionsClickDetails, StreamMessage } from './types';
2
+ import { CustomMessageActionItem, DefaultStreamChatGenerics, MessageActionItem, MessageActionsClickDetails, MessageReactionActionItem, StreamMessage } from './types';
3
3
  import { ChatClientService } from './chat-client.service';
4
4
  import { NotificationService } from './notification.service';
5
5
  import { ChannelService } from './channel.service';
@@ -14,7 +14,7 @@ export declare class MessageActionsService<T extends DefaultStreamChatGenerics =
14
14
  /**
15
15
  * Default actions - these are the actions that are handled by the built-in component
16
16
  */
17
- readonly defaultActions: MessageActionItem<T>[];
17
+ readonly defaultActions: (MessageActionItem<T> | MessageReactionActionItem<T>)[];
18
18
  /**
19
19
  * The built-in components will handle changes to this observable.
20
20
  */
@@ -27,6 +27,7 @@ export declare class MessageActionsService<T extends DefaultStreamChatGenerics =
27
27
  * By default the [`MessageComponent`](../../components/MessageComponent) will display the [`MessageActionsBoxComponent`](../../components/MessageActionsBoxComponent). You can override that behavior by providing your own event handler.
28
28
  */
29
29
  customActionClickHandler?: (details: MessageActionsClickDetails<T>) => void;
30
+ private hasDisplayedClipboardWarning;
30
31
  constructor(chatClientService: ChatClientService, notificationService: NotificationService, channelService: ChannelService);
31
32
  /**
32
33
  * This method returns how many authorized actions are available to the given message
@@ -70,6 +70,7 @@ export declare class AutocompleteTextareaComponent implements TextareaInterface,
70
70
  private userMentionConfig;
71
71
  private slashCommandConfig;
72
72
  private searchTerm$;
73
+ private isViewInited;
73
74
  constructor(channelService: ChannelService, chatClientService: ChatClientService, transliterationService: TransliterationService, emojiInputService: EmojiInputService, customTemplatesService: CustomTemplatesService, themeService: ThemeService, cdRef: ChangeDetectorRef);
74
75
  ngOnChanges(changes: SimpleChanges): void;
75
76
  ngAfterViewInit(): void;
@@ -1,5 +1,4 @@
1
1
  import { AfterViewInit, ChangeDetectorRef, ComponentFactoryResolver, ComponentRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef, Type } from '@angular/core';
2
- import { ChatClientService } from '../chat-client.service';
3
2
  import { Observable, Subject } from 'rxjs';
4
3
  import { UserResponse } from 'stream-chat';
5
4
  import { AttachmentService } from '../attachment.service';
@@ -10,6 +9,7 @@ import { MessageInputConfigService } from './message-input-config.service';
10
9
  import { TextareaInterface } from './textarea.interface';
11
10
  import { EmojiInputService } from './emoji-input.service';
12
11
  import { CustomTemplatesService } from '../custom-templates.service';
12
+ import { MessageActionsService } from '../message-actions.service';
13
13
  import * as i0 from "@angular/core";
14
14
  /**
15
15
  * The `MessageInput` component displays an input where users can type their messages and upload files, and sends the message to the active channel. The component can be used to compose new messages or update existing ones. To send messages, the chat user needs to have the necessary [channel capability](https://getstream.io/chat/docs/javascript/channel_capabilities/?language=javascript).
@@ -22,9 +22,9 @@ export declare class MessageInputComponent implements OnInit, OnChanges, OnDestr
22
22
  private textareaType;
23
23
  private componentFactoryResolver;
24
24
  private cdRef;
25
- private chatClient;
26
25
  private emojiInputService;
27
26
  private customTemplatesService;
27
+ private messageActionsService;
28
28
  /**
29
29
  * If file upload is enabled, the user can open a file selector from the input. Please note that the user also needs to have the necessary [channel capability](https://getstream.io/chat/docs/javascript/channel_capabilities/?language=javascript). If no value is provided, it is set from the [`MessageInputConfigService`](../services/MessageInputConfigService.mdx).
30
30
  */
@@ -61,6 +61,16 @@ export declare class MessageInputComponent implements OnInit, OnChanges, OnDestr
61
61
  * Enables or disables auto focus on the textarea element
62
62
  */
63
63
  autoFocus: boolean;
64
+ /**
65
+ * By default the input will react to changes in `messageToEdit$` from [`MessageActionsService`](../services/MessageActionsService.mdx) and display the message to be edited (taking into account the current `mode`).
66
+ *
67
+ * If you don't need that behavior, you can turn this of with this flag. In that case you should create your own edit message UI.
68
+ */
69
+ watchForMessageToEdit: boolean;
70
+ /**
71
+ * Use this input to control wether a send button is rendered or not. If you don't render a send button, you can still trigger message send using the `sendMessage$` input.
72
+ */
73
+ displaySendButton: boolean;
64
74
  /**
65
75
  * Emits when a message was successfuly sent or updated
66
76
  */
@@ -90,12 +100,12 @@ export declare class MessageInputComponent implements OnInit, OnChanges, OnDestr
90
100
  private subscriptions;
91
101
  private hideNotification;
92
102
  private isViewInited;
93
- private appSettings;
94
103
  private channel;
95
104
  private sendMessageSubcription;
96
105
  private readonly defaultTextareaPlaceholder;
97
106
  private readonly slowModeTextareaPlaceholder;
98
- constructor(channelService: ChannelService, notificationService: NotificationService, attachmentService: AttachmentService, configService: MessageInputConfigService, textareaType: Type<TextareaInterface>, componentFactoryResolver: ComponentFactoryResolver, cdRef: ChangeDetectorRef, chatClient: ChatClientService, emojiInputService: EmojiInputService, customTemplatesService: CustomTemplatesService);
107
+ private messageToEdit?;
108
+ constructor(channelService: ChannelService, notificationService: NotificationService, attachmentService: AttachmentService, configService: MessageInputConfigService, textareaType: Type<TextareaInterface>, componentFactoryResolver: ComponentFactoryResolver, cdRef: ChangeDetectorRef, emojiInputService: EmojiInputService, customTemplatesService: CustomTemplatesService, messageActionsService: MessageActionsService);
99
109
  ngOnInit(): void;
100
110
  ngAfterViewInit(): void;
101
111
  ngOnChanges(changes: SimpleChanges): void;
@@ -128,19 +138,21 @@ export declare class MessageInputComponent implements OnInit, OnChanges, OnDestr
128
138
  get disabledTextareaText(): "" | "streamChat.You can't send thread replies in this channel" | "streamChat.You can't send messages in this channel";
129
139
  filesSelected(fileList: FileList | null): Promise<void>;
130
140
  deselectMessageToQuote(): void;
141
+ deselectMessageToEdit(): void;
131
142
  getEmojiPickerContext(): EmojiPickerContext;
132
143
  getAttachmentPreviewListContext(): AttachmentPreviewListContext;
133
144
  getAttachmentUploadContext(): CustomAttachmentUploadContext;
145
+ get isUpdate(): boolean;
134
146
  private deleteUpload;
135
147
  private retryUpload;
136
148
  private clearFileInput;
137
- private get isUpdate();
138
149
  private initTextarea;
139
- private areAttachemntsValid;
140
150
  private setCanSendMessages;
141
151
  private get parentMessageId();
142
152
  private startCooldown;
143
153
  private stopCooldown;
154
+ private checkIfInEditMode;
155
+ private messageToUpdateChanged;
144
156
  static ɵfac: i0.ɵɵFactoryDeclaration<MessageInputComponent, never>;
145
- static ɵcmp: i0.ɵɵComponentDeclaration<MessageInputComponent, "stream-message-input", never, { "isFileUploadEnabled": "isFileUploadEnabled"; "areMentionsEnabled": "areMentionsEnabled"; "mentionScope": "mentionScope"; "mode": "mode"; "isMultipleFileUploadEnabled": "isMultipleFileUploadEnabled"; "message": "message"; "sendMessage$": "sendMessage$"; "inputMode": "inputMode"; "autoFocus": "autoFocus"; }, { "messageUpdate": "messageUpdate"; }, never, never, false, never>;
157
+ static ɵcmp: i0.ɵɵComponentDeclaration<MessageInputComponent, "stream-message-input", never, { "isFileUploadEnabled": "isFileUploadEnabled"; "areMentionsEnabled": "areMentionsEnabled"; "mentionScope": "mentionScope"; "mode": "mode"; "isMultipleFileUploadEnabled": "isMultipleFileUploadEnabled"; "message": "message"; "sendMessage$": "sendMessage$"; "inputMode": "inputMode"; "autoFocus": "autoFocus"; "watchForMessageToEdit": "watchForMessageToEdit"; "displaySendButton": "displaySendButton"; }, { "messageUpdate": "messageUpdate"; }, never, never, false, never>;
146
158
  }
@@ -36,6 +36,7 @@ export declare class TextareaComponent implements TextareaInterface, OnChanges,
36
36
  readonly send: EventEmitter<void>;
37
37
  private messageInput;
38
38
  private subscriptions;
39
+ private isViewInited;
39
40
  constructor(emojiInputService: EmojiInputService, themeService: ThemeService);
40
41
  ngOnChanges(changes: SimpleChanges): void;
41
42
  ngAfterViewInit(): void;
@@ -1,6 +1,6 @@
1
1
  import { AfterViewChecked, AfterViewInit, ChangeDetectorRef, NgZone, OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef } from '@angular/core';
2
2
  import { ChannelService } from '../channel.service';
3
- import { Observable } from 'rxjs';
3
+ import { Observable, Subject } from 'rxjs';
4
4
  import { MessageContext, StreamMessage, TypingIndicatorContext, DateSeparatorContext, UnreadMessagesNotificationContext, UnreadMessagesIndicatorContext } from '../types';
5
5
  import { ChatClientService } from '../chat-client.service';
6
6
  import { GroupStyle } from './group-styles';
@@ -26,10 +26,6 @@ export declare class MessageListComponent implements AfterViewChecked, OnChanges
26
26
  * 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
27
27
  */
28
28
  direction: 'bottom-to-top' | 'top-to-bottom';
29
- /**
30
- * 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.
31
- */
32
- messageOptionsTrigger: 'message-row' | 'message-bubble';
33
29
  /**
34
30
  * 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)
35
31
  *
@@ -61,6 +57,10 @@ export declare class MessageListComponent implements AfterViewChecked, OnChanges
61
57
  * You can turn on and off the loading indicator that signals to users that more messages are being loaded to the message list
62
58
  */
63
59
  displayLoadingIndicator: boolean;
60
+ /**
61
+ * @internal
62
+ */
63
+ limitNumberOfMessagesInList: boolean;
64
64
  typingIndicatorTemplate: TemplateRef<TypingIndicatorContext> | undefined;
65
65
  messageTemplate: TemplateRef<MessageContext> | undefined;
66
66
  customDateSeparatorTemplate: TemplateRef<DateSeparatorContext> | undefined;
@@ -86,6 +86,7 @@ export declare class MessageListComponent implements AfterViewChecked, OnChanges
86
86
  unreadCount?: number;
87
87
  isJumpingToLatestUnreadMessage: boolean;
88
88
  isJumpToLatestButtonVisible: boolean;
89
+ scroll$: Subject<void>;
89
90
  private scrollContainer;
90
91
  private parentMessageElement;
91
92
  private latestMessage;
@@ -105,6 +106,10 @@ export declare class MessageListComponent implements AfterViewChecked, OnChanges
105
106
  private isViewInited;
106
107
  private checkIfUnreadNotificationIsVisibleTimeout?;
107
108
  private jumpToLatestButtonVisibilityTimeout?;
109
+ private messageRemoveTimeout?;
110
+ private removeOldMessagesSubscription?;
111
+ private isSafari;
112
+ private forceRepaintSubject;
108
113
  private get class();
109
114
  constructor(channelService: ChannelService, chatClientService: ChatClientService, customTemplatesService: CustomTemplatesService, dateParser: DateParserService, ngZone: NgZone, cdRef: ChangeDetectorRef);
110
115
  messageNotificationJumpClicked: () => void;
@@ -141,5 +146,5 @@ export declare class MessageListComponent implements AfterViewChecked, OnChanges
141
146
  private newMessageReceived;
142
147
  private checkIfOnSeparateDates;
143
148
  static ɵfac: i0.ɵɵFactoryDeclaration<MessageListComponent, never>;
144
- static ɵcmp: i0.ɵɵComponentDeclaration<MessageListComponent, "stream-message-list", never, { "mode": "mode"; "direction": "direction"; "messageOptionsTrigger": "messageOptionsTrigger"; "hideJumpToLatestButtonDuringScroll": "hideJumpToLatestButtonDuringScroll"; "displayDateSeparator": "displayDateSeparator"; "displayUnreadSeparator": "displayUnreadSeparator"; "dateSeparatorTextPos": "dateSeparatorTextPos"; "openMessageListAt": "openMessageListAt"; "hideUnreadCountForNotificationAndIndicator": "hideUnreadCountForNotificationAndIndicator"; "displayLoadingIndicator": "displayLoadingIndicator"; }, {}, never, never, false, never>;
149
+ static ɵcmp: i0.ɵɵComponentDeclaration<MessageListComponent, "stream-message-list", never, { "mode": "mode"; "direction": "direction"; "hideJumpToLatestButtonDuringScroll": "hideJumpToLatestButtonDuringScroll"; "displayDateSeparator": "displayDateSeparator"; "displayUnreadSeparator": "displayUnreadSeparator"; "dateSeparatorTextPos": "dateSeparatorTextPos"; "openMessageListAt": "openMessageListAt"; "hideUnreadCountForNotificationAndIndicator": "hideUnreadCountForNotificationAndIndicator"; "displayLoadingIndicator": "displayLoadingIndicator"; "limitNumberOfMessagesInList": "limitNumberOfMessagesInList"; }, {}, never, never, false, never>;
145
150
  }
@@ -1,4 +1,4 @@
1
- import { AfterViewChecked, AfterViewInit, ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
1
+ import { AfterViewInit, ChangeDetectorRef, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
2
2
  import { ReactionResponse, UserResponse } from 'stream-chat';
3
3
  import { ChannelService } from '../channel.service';
4
4
  import { MessageReactionType, DefaultStreamChatGenerics } from '../types';
@@ -6,9 +6,9 @@ import { MessageReactionsService } from '../message-reactions.service';
6
6
  import { CustomTemplatesService } from '../custom-templates.service';
7
7
  import * as i0 from "@angular/core";
8
8
  /**
9
- * 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.
9
+ * 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.
10
10
  */
11
- export declare class MessageReactionsComponent implements AfterViewChecked, OnChanges, OnInit, AfterViewInit, OnDestroy {
11
+ export declare class MessageReactionsComponent implements OnChanges, OnInit, AfterViewInit, OnDestroy {
12
12
  private cdRef;
13
13
  private channelService;
14
14
  private messageReactionsService;
@@ -23,10 +23,6 @@ export declare class MessageReactionsComponent implements AfterViewChecked, OnCh
23
23
  messageReactionCounts: {
24
24
  [key in MessageReactionType]?: number;
25
25
  };
26
- /**
27
- * 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.
28
- */
29
- isSelectorOpen: boolean;
30
26
  /**
31
27
  * List of reactions of a [message](../types/stream-message.mdx), used to display the users of a reaction type.
32
28
  */
@@ -35,18 +31,7 @@ export declare class MessageReactionsComponent implements AfterViewChecked, OnCh
35
31
  * List of the user's own reactions of a [message](../types/stream-message.mdx), used to display the users of a reaction type.
36
32
  */
37
33
  ownReactions: ReactionResponse<DefaultStreamChatGenerics>[];
38
- /**
39
- * 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.
40
- */
41
- readonly isSelectorOpenChange: EventEmitter<boolean>;
42
- tooltipPositions: {
43
- arrow: number;
44
- tooltip: number;
45
- } | undefined;
46
- tooltipText: string | undefined;
47
34
  private selectorContainer;
48
- private selectorTooltip;
49
- currentTooltipTarget: HTMLElement | undefined;
50
35
  selectedReactionType: string | undefined;
51
36
  isLoading: boolean;
52
37
  reactions: ReactionResponse[];
@@ -60,26 +45,17 @@ export declare class MessageReactionsComponent implements AfterViewChecked, OnCh
60
45
  ngOnInit(): void;
61
46
  ngOnChanges(changes: SimpleChanges): void;
62
47
  ngAfterViewInit(): void;
63
- ngAfterViewChecked(): void;
64
48
  ngOnDestroy(): void;
65
- getLatestUserByReaction(reactionType: MessageReactionType): UserResponse<DefaultStreamChatGenerics> | null | undefined;
66
49
  getEmojiByReaction(reactionType: MessageReactionType): string;
67
50
  reactionSelected(reactionType: string): void;
68
51
  getUsersByReaction(reactionType: MessageReactionType): string;
69
52
  getAllUsersByReaction(reactionType?: MessageReactionType): UserResponse<DefaultStreamChatGenerics>[];
70
- showTooltip(event: Event, reactionType: MessageReactionType): void;
71
- hideTooltip(): void;
72
- trackByMessageReaction(index: number, item: MessageReactionType): string;
73
- trackByUserId(index: number, item: UserResponse): string;
74
- react(type: MessageReactionType): Promise<void>;
53
+ trackByMessageReaction(_: number, item: MessageReactionType): string;
54
+ trackByUserId(_: number, item: UserResponse): string;
75
55
  isOwnReaction(reactionType: MessageReactionType): boolean;
76
56
  isOpenChange: (isOpen: boolean) => void;
77
- private eventHandler;
78
- private watchForOutsideClicks;
79
- private stopWatchForOutsideClicks;
80
- private setTooltipPosition;
81
57
  private fetchAllReactions;
82
58
  private setExistingReactions;
83
59
  static ɵfac: i0.ɵɵFactoryDeclaration<MessageReactionsComponent, never>;
84
- static ɵcmp: i0.ɵɵComponentDeclaration<MessageReactionsComponent, "stream-message-reactions", never, { "messageId": "messageId"; "messageReactionCounts": "messageReactionCounts"; "isSelectorOpen": "isSelectorOpen"; "latestReactions": "latestReactions"; "ownReactions": "ownReactions"; }, { "isSelectorOpenChange": "isSelectorOpenChange"; }, never, never, false, never>;
60
+ static ɵcmp: i0.ɵɵComponentDeclaration<MessageReactionsComponent, "stream-message-reactions", never, { "messageId": "messageId"; "messageReactionCounts": "messageReactionCounts"; "latestReactions": "latestReactions"; "ownReactions": "ownReactions"; }, {}, never, never, false, never>;
85
61
  }
@@ -0,0 +1,35 @@
1
+ import { AfterViewInit, ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
2
+ import { DefaultStreamChatGenerics, MessageReactionType } from '../types';
3
+ import { ReactionResponse } from 'stream-chat';
4
+ import { ChannelService } from '../channel.service';
5
+ import { MessageReactionsService } from '../message-reactions.service';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * 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.
9
+ */
10
+ export declare class MessageReactionsSelectorComponent implements OnInit, OnDestroy, AfterViewInit {
11
+ private channelService;
12
+ private messageReactionsService;
13
+ private cdRef;
14
+ /**
15
+ * List of the user's own reactions of a [message](../types/stream-message.mdx), used to display the users of a reaction type.
16
+ */
17
+ ownReactions: ReactionResponse<DefaultStreamChatGenerics>[];
18
+ /**
19
+ * The id of the message the reactions belong to
20
+ */
21
+ messageId: string | undefined;
22
+ reactionOptions: string[];
23
+ private subscriptions;
24
+ private isViewInited;
25
+ constructor(channelService: ChannelService, messageReactionsService: MessageReactionsService, cdRef: ChangeDetectorRef);
26
+ ngOnInit(): void;
27
+ ngAfterViewInit(): void;
28
+ ngOnDestroy(): void;
29
+ trackByMessageReaction(_: number, item: MessageReactionType): string;
30
+ isOwnReaction(reactionType: MessageReactionType): boolean;
31
+ getEmojiByReaction(reactionType: MessageReactionType): string;
32
+ react(type: MessageReactionType): Promise<void>;
33
+ static ɵfac: i0.ɵɵFactoryDeclaration<MessageReactionsSelectorComponent, never>;
34
+ static ɵcmp: i0.ɵɵComponentDeclaration<MessageReactionsSelectorComponent, "stream-message-reactions-selector", never, { "ownReactions": "ownReactions"; "messageId": "messageId"; }, {}, never, never, false, never>;
35
+ }
@@ -19,16 +19,16 @@ import * as i17 from "./message-input/textarea.directive";
19
19
  import * as i18 from "./thread/thread.component";
20
20
  import * as i19 from "./icon-placeholder/icon-placeholder.component";
21
21
  import * as i20 from "./loading-indicator-placeholder/loading-indicator-placeholder.component";
22
- import * as i21 from "./edit-message-form/edit-message-form.component";
23
- import * as i22 from "./message-bounce-prompt/message-bounce-prompt.component";
24
- import * as i23 from "./voice-recording/voice-recording.component";
25
- import * as i24 from "./voice-recording/voice-recording-wavebar/voice-recording-wavebar.component";
22
+ import * as i21 from "./message-bounce-prompt/message-bounce-prompt.component";
23
+ import * as i22 from "./voice-recording/voice-recording.component";
24
+ import * as i23 from "./voice-recording/voice-recording-wavebar/voice-recording-wavebar.component";
25
+ import * as i24 from "./message-reactions-selector/message-reactions-selector.component";
26
26
  import * as i25 from "@angular/common";
27
27
  import * as i26 from "ngx-float-ui";
28
28
  import * as i27 from "./stream-avatar.module";
29
29
  import * as i28 from "@ngx-translate/core";
30
30
  export declare class StreamChatModule {
31
31
  static ɵfac: i0.ɵɵFactoryDeclaration<StreamChatModule, never>;
32
- static ɵmod: i0.ɵɵNgModuleDeclaration<StreamChatModule, [typeof i1.ChannelComponent, typeof i2.ChannelHeaderComponent, typeof i3.ChannelListComponent, typeof i4.ChannelPreviewComponent, typeof i5.MessageComponent, typeof i6.MessageInputComponent, typeof i7.MessageListComponent, typeof i8.LoadingIndicatorComponent, typeof i9.IconComponent, typeof i10.MessageActionsBoxComponent, typeof i11.AttachmentListComponent, typeof i12.MessageReactionsComponent, typeof i13.NotificationComponent, typeof i14.NotificationListComponent, typeof i15.AttachmentPreviewListComponent, typeof i16.ModalComponent, typeof i17.TextareaDirective, typeof i18.ThreadComponent, typeof i19.IconPlaceholderComponent, typeof i20.LoadingIndicatorPlaceholderComponent, typeof i21.EditMessageFormComponent, typeof i22.MessageBouncePromptComponent, typeof i23.VoiceRecordingComponent, typeof i24.VoiceRecordingWavebarComponent], [typeof i25.CommonModule, typeof i26.NgxFloatUiModule, typeof i27.StreamAvatarModule, typeof i28.TranslateModule], [typeof i1.ChannelComponent, typeof i2.ChannelHeaderComponent, typeof i3.ChannelListComponent, typeof i4.ChannelPreviewComponent, typeof i5.MessageComponent, typeof i6.MessageInputComponent, typeof i7.MessageListComponent, typeof i8.LoadingIndicatorComponent, typeof i9.IconComponent, typeof i10.MessageActionsBoxComponent, typeof i11.AttachmentListComponent, typeof i12.MessageReactionsComponent, typeof i13.NotificationComponent, typeof i14.NotificationListComponent, typeof i15.AttachmentPreviewListComponent, typeof i16.ModalComponent, typeof i27.StreamAvatarModule, typeof i18.ThreadComponent, typeof i19.IconPlaceholderComponent, typeof i20.LoadingIndicatorPlaceholderComponent, typeof i21.EditMessageFormComponent, typeof i22.MessageBouncePromptComponent, typeof i23.VoiceRecordingComponent, typeof i24.VoiceRecordingWavebarComponent]>;
32
+ static ɵmod: i0.ɵɵNgModuleDeclaration<StreamChatModule, [typeof i1.ChannelComponent, typeof i2.ChannelHeaderComponent, typeof i3.ChannelListComponent, typeof i4.ChannelPreviewComponent, typeof i5.MessageComponent, typeof i6.MessageInputComponent, typeof i7.MessageListComponent, typeof i8.LoadingIndicatorComponent, typeof i9.IconComponent, typeof i10.MessageActionsBoxComponent, typeof i11.AttachmentListComponent, typeof i12.MessageReactionsComponent, typeof i13.NotificationComponent, typeof i14.NotificationListComponent, typeof i15.AttachmentPreviewListComponent, typeof i16.ModalComponent, typeof i17.TextareaDirective, typeof i18.ThreadComponent, typeof i19.IconPlaceholderComponent, typeof i20.LoadingIndicatorPlaceholderComponent, typeof i21.MessageBouncePromptComponent, typeof i22.VoiceRecordingComponent, typeof i23.VoiceRecordingWavebarComponent, typeof i24.MessageReactionsSelectorComponent], [typeof i25.CommonModule, typeof i26.NgxFloatUiModule, typeof i27.StreamAvatarModule, typeof i28.TranslateModule], [typeof i1.ChannelComponent, typeof i2.ChannelHeaderComponent, typeof i3.ChannelListComponent, typeof i4.ChannelPreviewComponent, typeof i5.MessageComponent, typeof i6.MessageInputComponent, typeof i7.MessageListComponent, typeof i8.LoadingIndicatorComponent, typeof i9.IconComponent, typeof i10.MessageActionsBoxComponent, typeof i11.AttachmentListComponent, typeof i12.MessageReactionsComponent, typeof i13.NotificationComponent, typeof i14.NotificationListComponent, typeof i15.AttachmentPreviewListComponent, typeof i16.ModalComponent, typeof i27.StreamAvatarModule, typeof i18.ThreadComponent, typeof i19.IconPlaceholderComponent, typeof i20.LoadingIndicatorPlaceholderComponent, typeof i21.MessageBouncePromptComponent, typeof i22.VoiceRecordingComponent, typeof i23.VoiceRecordingWavebarComponent, typeof i24.MessageReactionsSelectorComponent]>;
33
33
  static ɵinj: i0.ɵɵInjectorDeclaration<StreamChatModule>;
34
34
  }
package/lib/types.d.ts CHANGED
@@ -109,16 +109,6 @@ export declare type ChannelPreviewInfoContext<T extends DefaultStreamChatGeneric
109
109
  latestMessageTime?: string;
110
110
  unreadCount: number;
111
111
  };
112
- export declare type MessageInputContext = {
113
- isFileUploadEnabled: boolean | undefined;
114
- areMentionsEnabled: boolean | undefined;
115
- mentionScope: 'channel' | 'application' | undefined;
116
- mode: 'thread' | 'main' | undefined;
117
- isMultipleFileUploadEnabled: boolean | undefined;
118
- message: StreamMessage | undefined;
119
- messageUpdateHandler: () => void | undefined;
120
- sendMessage$: Observable<void>;
121
- };
122
112
  export declare type MentionTemplateContext = {
123
113
  content: string;
124
114
  user: UserResponse;
@@ -136,6 +126,7 @@ export declare type MessageContext = {
136
126
  mode: 'thread' | 'main';
137
127
  isHighlighted: boolean;
138
128
  customActions: CustomMessageActionItem[];
129
+ scroll$?: Observable<void>;
139
130
  };
140
131
  export declare type ChannelActionsContext<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
141
132
  channel: Channel<T>;
@@ -151,7 +142,6 @@ export declare type AvatarLocation = 'channel-preview' | 'channel-header' | 'mes
151
142
  export declare type AvatarContext = {
152
143
  name: string | undefined;
153
144
  imageUrl: string | undefined;
154
- size: number | undefined;
155
145
  type: AvatarType | undefined;
156
146
  location: AvatarLocation | undefined;
157
147
  channel?: Channel<DefaultStreamChatGenerics>;
@@ -166,44 +156,51 @@ export declare type AttachmentPreviewListContext = {
166
156
  };
167
157
  export declare type IconContext = {
168
158
  icon: Icon | undefined;
169
- size: number | undefined;
170
159
  };
171
- export declare type LoadingIndicatorContext = {
172
- size: number | undefined;
173
- color: string | undefined;
174
- };
175
- export declare type MessageActionsBoxContext = {
160
+ export declare type MessageActionsBoxContext<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
176
161
  isMine: boolean;
177
- message: StreamMessage | undefined;
162
+ message: StreamMessage<T> | undefined;
178
163
  enabledActions: string[];
164
+ messageTextHtmlElement: HTMLElement | undefined;
179
165
  };
166
+ export declare type MessageActionHandlerExtraParams = {
167
+ isMine: boolean;
168
+ messageTextHtmlElement?: HTMLElement;
169
+ };
170
+ export declare type MessageActionHandler<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = (message: StreamMessage<T>, params: MessageActionHandlerExtraParams) => void;
180
171
  export declare type MessageActionBoxItemContext<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
181
172
  actionName: string;
182
173
  actionLabelOrTranslationKey: ((message: StreamMessage<T>) => string) | string;
183
174
  message: StreamMessage<T>;
184
- isMine: boolean;
185
- actionHandler: (message: StreamMessage<T>, isMine: boolean) => void;
175
+ actionHandlerExtraParams: MessageActionHandlerExtraParams;
176
+ actionHandler: MessageActionHandler<T>;
177
+ };
178
+ export declare type MessageReactionActionItem<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
179
+ actionName: 'react';
180
+ isVisible: (enabledActions: string[], isMine: boolean, message: StreamMessage<T>) => boolean;
186
181
  };
187
182
  declare type MessageActionItemBase<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
188
183
  actionLabelOrTranslationKey: ((message: StreamMessage<T>) => string) | string;
189
184
  isVisible: (enabledActions: string[], isMine: boolean, message: StreamMessage<T>) => boolean;
190
- actionHandler: (message: StreamMessage<T>, isMine: boolean) => void;
185
+ actionHandler: MessageActionHandler;
191
186
  };
192
187
  export declare type MessageActionItem<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = MessageActionItemBase<T> & {
193
- actionName: 'quote' | 'pin' | 'flag' | 'edit' | 'delete' | 'mark-unread';
188
+ actionName: 'quote' | 'pin' | 'flag' | 'edit' | 'delete' | 'mark-unread' | 'thread-reply' | 'copy-message-text';
194
189
  };
195
190
  export declare type CustomMessageActionItem<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = MessageActionItemBase<T> & {
196
191
  actionName: string;
197
192
  };
193
+ export declare type MessageReactionsSelectorContext = {
194
+ messageId: string | undefined;
195
+ ownReactions: ReactionResponse<DefaultStreamChatGenerics>[];
196
+ };
198
197
  export declare type MessageReactionsContext = {
199
198
  messageId: string | undefined;
200
199
  messageReactionCounts: {
201
200
  [key in MessageReactionType]?: number;
202
201
  };
203
- isSelectorOpen: boolean;
204
202
  latestReactions: ReactionResponse<DefaultStreamChatGenerics>[];
205
203
  ownReactions: ReactionResponse<DefaultStreamChatGenerics>[];
206
- isSelectorOpenChangeHandler: (isOpen: boolean) => void;
207
204
  };
208
205
  export declare type ModalContext = {
209
206
  isOpen: boolean;
@@ -288,15 +285,12 @@ export declare type FiltertNextPageConfiguration<T extends DefaultStreamChatGene
288
285
  type: 'filter';
289
286
  paginationFilter: ChannelFilters<T>;
290
287
  };
291
- export declare type NextPageConfiguration = OffsetNextPageConfiguration | FiltertNextPageConfiguration;
288
+ export declare type NextPageConfiguration = OffsetNextPageConfiguration | FiltertNextPageConfiguration | undefined;
292
289
  export declare type MessageReactionClickDetails = {
293
290
  messageId: string;
294
291
  reactionType: string;
295
292
  };
296
- export declare type MessageActionsClickDetails<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
297
- message: StreamMessage<T>;
298
- enabledActions: string[];
299
- isMine: boolean;
293
+ export declare type MessageActionsClickDetails<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = MessageActionsBoxContext<T> & {
300
294
  customActions: CustomMessageActionItem[];
301
295
  };
302
296
  export declare type GroupStyleOptions = {
@@ -304,4 +298,9 @@ export declare type GroupStyleOptions = {
304
298
  lastReadMessageId?: string;
305
299
  noGroupByReadState?: boolean;
306
300
  };
301
+ export declare type ChannelQueryType = 'first-page' | 'next-page' | 'recover-state';
302
+ export declare type ChannelQueryResult<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
303
+ channels: Channel<T>[];
304
+ hasMorePage: boolean;
305
+ };
307
306
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stream-chat-angular",
3
- "version": "5.0.0-v5.8",
3
+ "version": "5.0.0",
4
4
  "description": "Angular components to create chat conversations or livestream style chat",
5
5
  "author": "GetStream",
6
6
  "homepage": "https://getstream.io/chat/",
@@ -9,12 +9,12 @@
9
9
  "url": "https://github.com/GetStream/stream-chat-angular.git"
10
10
  },
11
11
  "peerDependencies": {
12
- "@angular/common": "^15.0.0 || ^16.0.0 || ^17.0.0",
13
- "@angular/core": "^15.0.0 || ^16.0.0 || ^17.0.0",
12
+ "@angular/common": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0",
13
+ "@angular/core": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0",
14
14
  "@floating-ui/dom": "^1.6.3",
15
15
  "@ngx-translate/core": "^14.0.0 || ^15.0.0",
16
16
  "angular-mentions": "^1.4.0",
17
- "ngx-float-ui": "^15.0.0|| ^16.0.0 || ^17.0.0",
17
+ "ngx-float-ui": "^15.0.0|| ^16.0.0 || ^17.0.0 || ^18.0.0 || ^18.0.1-rc.0",
18
18
  "rxjs": "^7.4.0",
19
19
  "stream-chat": "^8.26.0"
20
20
  },
@@ -24,7 +24,7 @@
24
24
  "emoji-regex": "^10.3.0",
25
25
  "pretty-bytes": "^6.1.1",
26
26
  "tslib": "^2.3.0",
27
- "uuidv4": "^6.2.13"
27
+ "uuid": "^9.0.1"
28
28
  },
29
29
  "module": "fesm2015/stream-chat-angular.mjs",
30
30
  "es2020": "fesm2020/stream-chat-angular.mjs",
package/public-api.d.ts CHANGED
@@ -19,7 +19,6 @@ export * from './lib/message/message.component';
19
19
  export * from './lib/parse-date';
20
20
  export * from './lib/list-users';
21
21
  export * from './lib/message-input/message-input.component';
22
- export * from './lib/edit-message-form/edit-message-form.component';
23
22
  export * from './lib/message-bounce-prompt/message-bounce-prompt.component';
24
23
  export * from './lib/message-input/textarea/textarea.component';
25
24
  export * from './lib/message-input/autocomplete-textarea/autocomplete-textarea.component';
@@ -58,3 +57,5 @@ export * from './lib/message-actions.service';
58
57
  export * from './lib/voice-recording/voice-recording.component';
59
58
  export * from './lib/voice-recording/voice-recording-wavebar/voice-recording-wavebar.component';
60
59
  export * from './lib/is-on-separate-date';
60
+ export * from './lib/message-reactions-selector/message-reactions-selector.component';
61
+ export * from './lib/channel-query';