stream-chat-angular 6.4.1 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -18
- package/assets/version.d.ts +1 -1
- package/{esm2020 → esm2022}/assets/version.mjs +2 -2
- package/{esm2020 → esm2022}/lib/attachment-configuration.service.mjs +4 -4
- package/esm2022/lib/attachment-list/attachment-list.component.mjs +232 -0
- package/esm2022/lib/attachment-preview-list/attachment-preview-list.component.mjs +55 -0
- package/{esm2020 → esm2022}/lib/attachment.service.mjs +5 -5
- package/{esm2020 → esm2022}/lib/avatar/avatar.component.mjs +5 -5
- package/{esm2020 → esm2022}/lib/avatar-placeholder/avatar-placeholder.component.mjs +6 -6
- package/esm2022/lib/channel/channel.component.mjs +45 -0
- package/{esm2020 → esm2022}/lib/channel-header/channel-header.component.mjs +6 -6
- package/esm2022/lib/channel-list/channel-list.component.mjs +47 -0
- package/{esm2020 → esm2022}/lib/channel-preview/channel-preview.component.mjs +6 -6
- package/esm2022/lib/channel.service.mjs +1575 -0
- package/{esm2020 → esm2022}/lib/chat-client.service.mjs +5 -5
- package/{esm2020 → esm2022}/lib/custom-templates.service.mjs +5 -5
- package/{esm2020 → esm2022}/lib/date-parser.service.mjs +5 -5
- package/{esm2020 → esm2022}/lib/icon/icon-placeholder/icon-placeholder.component.mjs +6 -6
- package/{esm2020 → esm2022}/lib/icon/icon.component.mjs +5 -5
- package/{esm2020 → esm2022}/lib/icon/icon.module.mjs +11 -11
- package/{esm2020 → esm2022}/lib/icon/loading-indicator/loading-indicator.component.mjs +5 -5
- package/{esm2020 → esm2022}/lib/icon/loading-indicator-placeholder/loading-indicator-placeholder.component.mjs +6 -6
- package/esm2022/lib/message/message.component.mjs +501 -0
- package/{esm2020 → esm2022}/lib/message-actions-box/message-actions-box.component.mjs +6 -6
- package/{esm2020 → esm2022}/lib/message-actions.service.mjs +5 -5
- package/{esm2020 → esm2022}/lib/message-blocked/message-blocked.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/message-bounce-prompt/message-bounce-prompt.component.mjs +6 -6
- package/{esm2020 → esm2022}/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.mjs +6 -6
- package/{esm2020 → esm2022}/lib/message-input/emoji-input.service.mjs +5 -5
- package/{esm2020 → esm2022}/lib/message-input/message-input-config.service.mjs +5 -5
- package/{esm2020 → esm2022}/lib/message-input/message-input.component.mjs +7 -7
- package/{esm2020 → esm2022}/lib/message-input/textarea/textarea.component.mjs +5 -5
- package/{esm2020 → esm2022}/lib/message-input/textarea.directive.mjs +5 -5
- package/{esm2020 → esm2022}/lib/message-input/voice-recorder.service.mjs +5 -5
- package/esm2022/lib/message-list/message-list.component.mjs +717 -0
- package/{esm2020 → esm2022}/lib/message-reactions/message-reactions.component.mjs +6 -6
- package/{esm2020 → esm2022}/lib/message-reactions-selector/message-reactions-selector.component.mjs +5 -5
- package/{esm2020 → esm2022}/lib/message-reactions.service.mjs +5 -5
- package/{esm2020 → esm2022}/lib/message-text/message-text.component.mjs +6 -6
- package/{esm2020 → esm2022}/lib/message.service.mjs +5 -5
- package/{esm2020 → esm2022}/lib/modal/modal.component.mjs +6 -6
- package/{esm2020 → esm2022}/lib/modal/stream-modal.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/notification/notification.component.mjs +6 -6
- package/{esm2020 → esm2022}/lib/notification-list/notification-list.component.mjs +6 -6
- package/{esm2020 → esm2022}/lib/notification-list/stream-notification.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/notification.service.mjs +5 -5
- package/{esm2020 → esm2022}/lib/paginated-list/paginated-list.component.mjs +6 -6
- package/{esm2020 → esm2022}/lib/paginated-list/stream-paginated-list.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/polls/base-poll.component.mjs +5 -5
- package/esm2022/lib/polls/poll/poll.component.mjs +34 -0
- package/{esm2020 → esm2022}/lib/polls/poll-actions/add-option/add-option.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/polls/poll-actions/poll-actions.component.mjs +6 -6
- package/esm2022/lib/polls/poll-actions/poll-answers-list/poll-answers-list.component.mjs +82 -0
- package/esm2022/lib/polls/poll-actions/poll-results/poll-results-list/poll-results-list.component.mjs +63 -0
- package/{esm2020 → esm2022}/lib/polls/poll-actions/poll-results/poll-vote/poll-vote.component.mjs +6 -6
- package/{esm2020 → esm2022}/lib/polls/poll-actions/poll-results/poll-vote-results-list/poll-vote-results-list.component.mjs +5 -5
- package/{esm2020 → esm2022}/lib/polls/poll-actions/upsert-answer/upsert-answer.component.mjs +4 -4
- package/esm2022/lib/polls/poll-composer/poll-composer.component.mjs +134 -0
- package/{esm2020 → esm2022}/lib/polls/poll-header/poll-header.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/polls/poll-option-selector/poll-option-selector.component.mjs +5 -5
- package/{esm2020 → esm2022}/lib/polls/poll-options-list/poll-options-list.component.mjs +5 -5
- package/{esm2020 → esm2022}/lib/polls/poll-preview/poll-preview.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/polls/stream-polls.module.mjs +41 -41
- package/esm2022/lib/stream-autocomplete-textarea.module.mjs +33 -0
- package/{esm2020 → esm2022}/lib/stream-avatar.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/stream-chat.module.mjs +67 -67
- package/esm2022/lib/stream-i18n.service.mjs +34 -0
- package/esm2022/lib/stream-textarea.module.mjs +31 -0
- package/{esm2020 → esm2022}/lib/theme.service.mjs +5 -5
- package/{esm2020 → esm2022}/lib/thread/thread.component.mjs +6 -6
- package/{esm2020 → esm2022}/lib/transliteration.service.mjs +5 -5
- package/{esm2020 → esm2022}/lib/types.mjs +1 -1
- package/{esm2020 → esm2022}/lib/user-list/user-list.component.mjs +5 -5
- package/{esm2020 → esm2022}/lib/voice-recorder/amplitude-recorder.service.mjs +5 -5
- package/{esm2020 → esm2022}/lib/voice-recorder/audio-recorder.service.mjs +5 -5
- package/{esm2020 → esm2022}/lib/voice-recorder/transcoder.service.mjs +5 -5
- package/{esm2020 → esm2022}/lib/voice-recorder/voice-recorder-wavebar/voice-recorder-wavebar.component.mjs +5 -5
- package/{esm2020 → esm2022}/lib/voice-recorder/voice-recorder.component.mjs +6 -6
- package/{esm2020 → esm2022}/lib/voice-recorder/voice-recorder.module.mjs +9 -9
- package/{esm2020 → esm2022}/lib/voice-recording/voice-recording-wavebar/voice-recording-wavebar.component.mjs +5 -5
- package/{esm2020 → esm2022}/lib/voice-recording/voice-recording.component.mjs +6 -6
- package/{esm2020 → esm2022}/lib/voice-recording/voice-recording.module.mjs +5 -5
- package/{fesm2020 → fesm2022}/stream-chat-angular.mjs +463 -470
- package/fesm2022/stream-chat-angular.mjs.map +1 -0
- package/lib/attachment-list/attachment-list.component.d.ts +1 -1
- package/lib/attachment-preview-list/attachment-preview-list.component.d.ts +1 -1
- package/lib/avatar/avatar.component.d.ts +1 -1
- package/lib/avatar-placeholder/avatar-placeholder.component.d.ts +1 -1
- package/lib/channel-preview/channel-preview.component.d.ts +1 -1
- package/lib/chat-client.service.d.ts +1 -1
- package/lib/custom-templates.service.d.ts +1 -0
- package/lib/icon/icon-placeholder/icon-placeholder.component.d.ts +1 -1
- package/lib/icon/icon.component.d.ts +2 -2
- package/lib/message/message.component.d.ts +1 -1
- package/lib/message-actions-box/message-actions-box.component.d.ts +1 -1
- package/lib/message-blocked/message-blocked.component.d.ts +1 -1
- package/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.d.ts +1 -1
- package/lib/message-input/message-input.component.d.ts +1 -1
- package/lib/message-input/textarea/textarea.component.d.ts +1 -1
- package/lib/message-input/textarea.directive.d.ts +1 -1
- package/lib/message-list/group-styles.d.ts +1 -1
- package/lib/message-list/message-list.component.d.ts +1 -1
- package/lib/message-reactions/message-reactions.component.d.ts +1 -1
- package/lib/message-reactions-selector/message-reactions-selector.component.d.ts +1 -1
- package/lib/message-text/message-text.component.d.ts +2 -2
- package/lib/modal/modal.component.d.ts +1 -1
- package/lib/notification/notification.component.d.ts +1 -1
- package/lib/paginated-list/paginated-list.component.d.ts +5 -2
- package/lib/polls/base-poll.component.d.ts +1 -1
- package/lib/polls/poll-actions/add-option/add-option.component.d.ts +1 -1
- package/lib/polls/poll-actions/poll-actions.component.d.ts +2 -2
- package/lib/polls/poll-actions/poll-answers-list/poll-answers-list.component.d.ts +1 -1
- package/lib/polls/poll-actions/poll-results/poll-vote/poll-vote.component.d.ts +1 -1
- package/lib/polls/poll-actions/poll-results/poll-vote-results-list/poll-vote-results-list.component.d.ts +1 -1
- package/lib/polls/poll-actions/upsert-answer/upsert-answer.component.d.ts +1 -1
- package/lib/polls/poll-composer/poll-composer.component.d.ts +2 -2
- package/lib/polls/poll-header/poll-header.component.d.ts +1 -1
- package/lib/polls/poll-option-selector/poll-option-selector.component.d.ts +1 -1
- package/lib/polls/poll-options-list/poll-options-list.component.d.ts +1 -1
- package/lib/types.d.ts +79 -79
- package/lib/user-list/user-list.component.d.ts +1 -1
- package/lib/voice-recorder/amplitude-recorder.service.d.ts +2 -2
- package/lib/voice-recorder/media-recorder.d.ts +2 -2
- package/lib/voice-recorder/transcoder.service.d.ts +4 -4
- package/lib/voice-recorder/voice-recorder.component.d.ts +1 -1
- package/lib/voice-recording/voice-recording-wavebar/voice-recording-wavebar.component.d.ts +1 -1
- package/lib/voice-recording/voice-recording.component.d.ts +1 -1
- package/package.json +11 -17
- package/src/assets/version.ts +1 -1
- package/esm2020/lib/attachment-list/attachment-list.component.mjs +0 -232
- package/esm2020/lib/attachment-preview-list/attachment-preview-list.component.mjs +0 -55
- package/esm2020/lib/channel/channel.component.mjs +0 -45
- package/esm2020/lib/channel-list/channel-list.component.mjs +0 -47
- package/esm2020/lib/channel.service.mjs +0 -1575
- package/esm2020/lib/message/message.component.mjs +0 -501
- package/esm2020/lib/message-list/message-list.component.mjs +0 -717
- package/esm2020/lib/polls/poll/poll.component.mjs +0 -34
- package/esm2020/lib/polls/poll-actions/poll-answers-list/poll-answers-list.component.mjs +0 -82
- package/esm2020/lib/polls/poll-actions/poll-results/poll-results-list/poll-results-list.component.mjs +0 -63
- package/esm2020/lib/polls/poll-composer/poll-composer.component.mjs +0 -134
- package/esm2020/lib/stream-autocomplete-textarea.module.mjs +0 -33
- package/esm2020/lib/stream-i18n.service.mjs +0 -41
- package/esm2020/lib/stream-textarea.module.mjs +0 -31
- package/fesm2015/stream-chat-angular.mjs +0 -10596
- package/fesm2015/stream-chat-angular.mjs.map +0 -1
- package/fesm2020/stream-chat-angular.mjs.map +0 -1
- /package/{esm2020 → esm2022}/assets/i18n/en.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/channel-query.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/file-utils.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/format-duration.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/get-channel-display-text.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/get-message-translation.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/injection-tokens.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/is-image-attachment.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/is-on-separate-date.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/is-safari.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/list-users.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/message-input/textarea.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/message-list/group-styles.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/message-preview.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/parse-date.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/polls/poll-composer/validators.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/polls/unique.validator.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/read-by.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/types-custom.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/virtualized-list.service.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/virtualized-message-list.service.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/voice-recorder/media-recorder.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/voice-recorder/mp3-transcoder.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/wave-form-sampler.mjs +0 -0
- /package/{esm2020 → esm2022}/public-api.mjs +0 -0
- /package/{esm2020 → esm2022}/stream-chat-angular.mjs +0 -0
- /package/{esm2020 → esm2022}/stream-chat.mjs +0 -0
package/lib/types.d.ts
CHANGED
|
@@ -3,14 +3,14 @@ import { Observable, Subject } from 'rxjs';
|
|
|
3
3
|
import type { Attachment, Channel, ChannelFilters, ChannelMemberResponse, CommandResponse, CustomMessageData, FormatMessageResponse, MessageResponseBase, ReactionGroupResponse, ReactionResponse, User, UserResponse } from 'stream-chat';
|
|
4
4
|
import { AttachmentService } from './attachment.service';
|
|
5
5
|
import { Icon } from './icon/icon.component';
|
|
6
|
-
export
|
|
7
|
-
export
|
|
6
|
+
export type UnknownType = Record<string, unknown>;
|
|
7
|
+
export type CustomTrigger = {
|
|
8
8
|
[key: string]: {
|
|
9
9
|
componentProps: UnknownType;
|
|
10
10
|
data: UnknownType;
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type StreamMessage = FormatMessageResponse & {
|
|
14
14
|
readBy: UserResponse[];
|
|
15
15
|
translation?: string;
|
|
16
16
|
errorStatusCode?: number;
|
|
@@ -18,8 +18,8 @@ export declare type StreamMessage = FormatMessageResponse & {
|
|
|
18
18
|
translation?: string;
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
|
-
export
|
|
22
|
-
export
|
|
21
|
+
export type AttachmentUploadErrorReason = 'file-size' | 'file-extension' | 'unknown';
|
|
22
|
+
export type AttachmentUpload = {
|
|
23
23
|
file: File;
|
|
24
24
|
state: 'error' | 'success' | 'uploading';
|
|
25
25
|
errorReason?: AttachmentUploadErrorReason;
|
|
@@ -33,20 +33,20 @@ export declare type AttachmentUpload = {
|
|
|
33
33
|
extraData?: Partial<Attachment>;
|
|
34
34
|
fromAttachment?: Attachment;
|
|
35
35
|
};
|
|
36
|
-
export
|
|
36
|
+
export type MentionAutcompleteListItemContext = {
|
|
37
37
|
item: MentionAutcompleteListItem;
|
|
38
38
|
};
|
|
39
|
-
export
|
|
39
|
+
export type CommandAutocompleteListItemContext = {
|
|
40
40
|
item: ComandAutocompleteListItem;
|
|
41
41
|
};
|
|
42
|
-
export
|
|
42
|
+
export type MentionAutcompleteListItem = (ChannelMemberResponse | UserResponse) & {
|
|
43
43
|
autocompleteLabel: string;
|
|
44
44
|
};
|
|
45
|
-
export
|
|
45
|
+
export type ComandAutocompleteListItem = CommandResponse & {
|
|
46
46
|
autocompleteLabel: string;
|
|
47
47
|
};
|
|
48
|
-
export
|
|
49
|
-
export
|
|
48
|
+
export type NotificationType = 'success' | 'error' | 'info';
|
|
49
|
+
export type NotificationPayload<T = object> = {
|
|
50
50
|
id: string;
|
|
51
51
|
type: NotificationType;
|
|
52
52
|
text?: string;
|
|
@@ -55,10 +55,10 @@ export declare type NotificationPayload<T = object> = {
|
|
|
55
55
|
templateContext?: T;
|
|
56
56
|
dismissFn: () => void;
|
|
57
57
|
};
|
|
58
|
-
export
|
|
58
|
+
export type ChannelPreviewContext = {
|
|
59
59
|
channel: Channel;
|
|
60
60
|
};
|
|
61
|
-
export
|
|
61
|
+
export type ChannelPreviewInfoContext = ChannelPreviewContext & {
|
|
62
62
|
latestMessage?: StreamMessage;
|
|
63
63
|
/**
|
|
64
64
|
* The text of the latest message, or some meta information (for example: "Nothing yet")
|
|
@@ -78,17 +78,17 @@ export declare type ChannelPreviewInfoContext = ChannelPreviewContext & {
|
|
|
78
78
|
latestMessageTime?: string;
|
|
79
79
|
unreadCount: number;
|
|
80
80
|
};
|
|
81
|
-
export
|
|
81
|
+
export type MentionTemplateContext = {
|
|
82
82
|
content: string;
|
|
83
83
|
user: UserResponse;
|
|
84
84
|
};
|
|
85
|
-
export
|
|
85
|
+
export type EmojiPickerContext = {
|
|
86
86
|
emojiInput$: Subject<string>;
|
|
87
87
|
};
|
|
88
|
-
export
|
|
88
|
+
export type TypingIndicatorContext = {
|
|
89
89
|
usersTyping$: Observable<UserResponse[]>;
|
|
90
90
|
};
|
|
91
|
-
export
|
|
91
|
+
export type MessageContext = {
|
|
92
92
|
message: StreamMessage | undefined;
|
|
93
93
|
enabledMessageActions: string[];
|
|
94
94
|
isLastSentMessage: boolean | undefined;
|
|
@@ -97,24 +97,24 @@ export declare type MessageContext = {
|
|
|
97
97
|
customActions: CustomMessageActionItem[];
|
|
98
98
|
scroll$?: Observable<void>;
|
|
99
99
|
};
|
|
100
|
-
export
|
|
100
|
+
export type ChannelActionsContext = {
|
|
101
101
|
channel: Channel;
|
|
102
102
|
};
|
|
103
|
-
export
|
|
103
|
+
export type CustomAttachmentListContext = {
|
|
104
104
|
messageId: string;
|
|
105
105
|
attachments: Attachment[];
|
|
106
106
|
parentMessageId?: string;
|
|
107
107
|
};
|
|
108
|
-
export
|
|
108
|
+
export type AttachmentListContext = CustomAttachmentListContext & {
|
|
109
109
|
imageModalStateChangeHandler?: (state: 'opened' | 'closed') => void;
|
|
110
110
|
};
|
|
111
|
-
export
|
|
112
|
-
export
|
|
111
|
+
export type AvatarType = 'channel' | 'user';
|
|
112
|
+
export type AvatarLocation = 'channel-preview' | 'channel-header' | 'message-sender' | 'message-reader' | 'quoted-message-sender' | 'autocomplete-item' | 'typing-indicator' | 'poll-voter'
|
|
113
113
|
/**
|
|
114
114
|
* @deprecated this will be renamed to user-list in the next major release
|
|
115
115
|
*/
|
|
116
116
|
| 'reaction';
|
|
117
|
-
export
|
|
117
|
+
export type AvatarContext = {
|
|
118
118
|
name: string | undefined;
|
|
119
119
|
imageUrl: string | undefined;
|
|
120
120
|
type: AvatarType | undefined;
|
|
@@ -124,53 +124,53 @@ export declare type AvatarContext = {
|
|
|
124
124
|
initialsType?: 'first-letter-of-first-word' | 'first-letter-of-each-word';
|
|
125
125
|
showOnlineIndicator?: boolean;
|
|
126
126
|
};
|
|
127
|
-
export
|
|
127
|
+
export type AttachmentPreviewListContext = {
|
|
128
128
|
attachmentUploads$: Observable<AttachmentUpload[]> | undefined;
|
|
129
129
|
retryUploadHandler: (f: File) => void;
|
|
130
130
|
deleteUploadHandler: (u: AttachmentUpload) => void;
|
|
131
131
|
service: AttachmentService;
|
|
132
132
|
};
|
|
133
|
-
export
|
|
133
|
+
export type IconContext = {
|
|
134
134
|
icon: Icon | undefined;
|
|
135
135
|
};
|
|
136
|
-
export
|
|
136
|
+
export type MessageActionsBoxContext = {
|
|
137
137
|
isMine: boolean;
|
|
138
138
|
message: StreamMessage | undefined;
|
|
139
139
|
enabledActions: string[];
|
|
140
140
|
messageTextHtmlElement: HTMLElement | undefined;
|
|
141
141
|
};
|
|
142
|
-
export
|
|
142
|
+
export type MessageActionHandlerExtraParams = {
|
|
143
143
|
isMine: boolean;
|
|
144
144
|
messageTextHtmlElement?: HTMLElement;
|
|
145
145
|
};
|
|
146
|
-
export
|
|
147
|
-
export
|
|
146
|
+
export type MessageActionHandler = (message: StreamMessage, params: MessageActionHandlerExtraParams) => void;
|
|
147
|
+
export type MessageActionBoxItemContext = {
|
|
148
148
|
actionName: string;
|
|
149
149
|
actionLabelOrTranslationKey: ((message: StreamMessage) => string) | string;
|
|
150
150
|
message: StreamMessage;
|
|
151
151
|
actionHandlerExtraParams: MessageActionHandlerExtraParams;
|
|
152
152
|
actionHandler: MessageActionHandler;
|
|
153
153
|
};
|
|
154
|
-
export
|
|
154
|
+
export type MessageReactionActionItem = {
|
|
155
155
|
actionName: 'react';
|
|
156
156
|
isVisible: (enabledActions: string[], isMine: boolean, message: StreamMessage) => boolean;
|
|
157
157
|
};
|
|
158
|
-
|
|
158
|
+
type MessageActionItemBase = {
|
|
159
159
|
actionLabelOrTranslationKey: ((message: StreamMessage) => string) | string;
|
|
160
160
|
isVisible: (enabledActions: string[], isMine: boolean, message: StreamMessage) => boolean;
|
|
161
161
|
actionHandler: MessageActionHandler;
|
|
162
162
|
};
|
|
163
|
-
export
|
|
163
|
+
export type MessageActionItem = MessageActionItemBase & {
|
|
164
164
|
actionName: 'quote' | 'pin' | 'flag' | 'edit' | 'delete' | 'mark-unread' | 'thread-reply' | 'copy-message-text';
|
|
165
165
|
};
|
|
166
|
-
export
|
|
166
|
+
export type CustomMessageActionItem = MessageActionItemBase & {
|
|
167
167
|
actionName: string;
|
|
168
168
|
};
|
|
169
|
-
export
|
|
169
|
+
export type MessageReactionsSelectorContext = {
|
|
170
170
|
messageId: string | undefined;
|
|
171
171
|
ownReactions: ReactionResponse[];
|
|
172
172
|
};
|
|
173
|
-
export
|
|
173
|
+
export type MessageReactionsContext = {
|
|
174
174
|
messageId: string | undefined;
|
|
175
175
|
/** @deprecated use `messageReactionGroups` */
|
|
176
176
|
messageReactionCounts: {
|
|
@@ -183,77 +183,77 @@ export declare type MessageReactionsContext = {
|
|
|
183
183
|
[key in MessageReactionType]: ReactionGroupResponse;
|
|
184
184
|
};
|
|
185
185
|
};
|
|
186
|
-
export
|
|
186
|
+
export type ModalContext = {
|
|
187
187
|
isOpen: boolean;
|
|
188
188
|
isOpenChangeHandler: (isOpen: boolean) => void;
|
|
189
189
|
content: TemplateRef<void>;
|
|
190
190
|
};
|
|
191
|
-
export
|
|
191
|
+
export type NotificationContext = {
|
|
192
192
|
type: NotificationType | undefined;
|
|
193
193
|
content: TemplateRef<void> | undefined;
|
|
194
194
|
};
|
|
195
|
-
export
|
|
195
|
+
export type ThreadHeaderContext = {
|
|
196
196
|
parentMessage: StreamMessage | undefined;
|
|
197
197
|
closeThreadHandler: () => void;
|
|
198
198
|
};
|
|
199
|
-
export
|
|
200
|
-
export
|
|
199
|
+
export type MessageReactionType = string;
|
|
200
|
+
export type AttachmentConfigration = {
|
|
201
201
|
url: string;
|
|
202
202
|
height: string;
|
|
203
203
|
width: string;
|
|
204
204
|
};
|
|
205
|
-
export
|
|
205
|
+
export type ImageAttachmentConfiguration = AttachmentConfigration & {
|
|
206
206
|
originalHeight: number;
|
|
207
207
|
originalWidth: number;
|
|
208
208
|
};
|
|
209
|
-
export
|
|
209
|
+
export type VideoAttachmentConfiguration = ImageAttachmentConfiguration & {
|
|
210
210
|
thumbUrl?: string;
|
|
211
211
|
};
|
|
212
|
-
export
|
|
212
|
+
export type DeliveredStatusContext = {
|
|
213
213
|
message: StreamMessage;
|
|
214
214
|
};
|
|
215
|
-
export
|
|
215
|
+
export type SendingStatusContext = {
|
|
216
216
|
message: StreamMessage;
|
|
217
217
|
};
|
|
218
|
-
export
|
|
218
|
+
export type CustomMetadataContext = {
|
|
219
219
|
message: StreamMessage;
|
|
220
220
|
};
|
|
221
|
-
export
|
|
221
|
+
export type ReadStatusContext = {
|
|
222
222
|
message: StreamMessage;
|
|
223
223
|
readByText: string;
|
|
224
224
|
};
|
|
225
|
-
export
|
|
225
|
+
export type ChannelHeaderInfoContext = {
|
|
226
226
|
channel: Channel;
|
|
227
227
|
};
|
|
228
|
-
export
|
|
228
|
+
export type CustomAttachmentUploadContext = {
|
|
229
229
|
isMultipleFileUploadEnabled: boolean | undefined;
|
|
230
230
|
attachmentService: AttachmentService;
|
|
231
231
|
};
|
|
232
|
-
export
|
|
232
|
+
export type AttachmentContext = {
|
|
233
233
|
attachment: Attachment;
|
|
234
234
|
};
|
|
235
|
-
export
|
|
235
|
+
export type GalleryAttachmentContext = {
|
|
236
236
|
attachment: GalleryAttachment;
|
|
237
237
|
};
|
|
238
|
-
export
|
|
238
|
+
export type SystemMessageContext = MessageContext & {
|
|
239
239
|
parsedDate: string | undefined;
|
|
240
240
|
};
|
|
241
|
-
export
|
|
241
|
+
export type DateSeparatorContext = {
|
|
242
242
|
date: Date;
|
|
243
243
|
parsedDate: string;
|
|
244
244
|
};
|
|
245
|
-
export
|
|
245
|
+
export type UnreadMessagesIndicatorContext = {
|
|
246
246
|
unreadCount: number;
|
|
247
247
|
};
|
|
248
|
-
export
|
|
248
|
+
export type UnreadMessagesNotificationContext = UnreadMessagesIndicatorContext & {
|
|
249
249
|
onJump: () => void;
|
|
250
250
|
onDismiss: () => void;
|
|
251
251
|
};
|
|
252
|
-
export
|
|
252
|
+
export type ChannelQueryState = {
|
|
253
253
|
state: 'in-progress' | 'success' | 'error';
|
|
254
254
|
error?: unknown;
|
|
255
255
|
};
|
|
256
|
-
export
|
|
256
|
+
export type MessageInput = {
|
|
257
257
|
text: string;
|
|
258
258
|
attachments: Attachment[];
|
|
259
259
|
mentionedUsers: UserResponse[];
|
|
@@ -262,64 +262,64 @@ export declare type MessageInput = {
|
|
|
262
262
|
customData: undefined | CustomMessageData;
|
|
263
263
|
pollId: string | undefined;
|
|
264
264
|
};
|
|
265
|
-
export
|
|
265
|
+
export type OffsetNextPageConfiguration = {
|
|
266
266
|
type: 'offset';
|
|
267
267
|
offset: number;
|
|
268
268
|
};
|
|
269
|
-
export
|
|
269
|
+
export type FiltertNextPageConfiguration = {
|
|
270
270
|
type: 'filter';
|
|
271
271
|
paginationFilter: ChannelFilters;
|
|
272
272
|
};
|
|
273
|
-
export
|
|
274
|
-
export
|
|
273
|
+
export type NextPageConfiguration = OffsetNextPageConfiguration | FiltertNextPageConfiguration | undefined;
|
|
274
|
+
export type MessageReactionClickDetails = {
|
|
275
275
|
messageId: string;
|
|
276
276
|
reactionType: string;
|
|
277
277
|
};
|
|
278
|
-
export
|
|
278
|
+
export type MessageActionsClickDetails = MessageActionsBoxContext & {
|
|
279
279
|
customActions: CustomMessageActionItem[];
|
|
280
280
|
};
|
|
281
|
-
export
|
|
281
|
+
export type GroupStyleOptions = {
|
|
282
282
|
noGroupByUser?: boolean;
|
|
283
283
|
lastReadMessageId?: string;
|
|
284
284
|
noGroupByReadState?: boolean;
|
|
285
285
|
};
|
|
286
|
-
export
|
|
287
|
-
export
|
|
286
|
+
export type ChannelQueryType = 'first-page' | 'next-page' | 'recover-state';
|
|
287
|
+
export type ChannelQueryResult = {
|
|
288
288
|
channels: Channel[];
|
|
289
289
|
hasMorePage: boolean;
|
|
290
290
|
};
|
|
291
|
-
export
|
|
292
|
-
export
|
|
291
|
+
export type VirtualizedListScrollPosition = 'top' | 'bottom' | 'middle';
|
|
292
|
+
export type VirtualizedListQueryState = {
|
|
293
293
|
state: 'loading-top' | 'loading-bottom' | 'success' | 'error';
|
|
294
294
|
error?: unknown;
|
|
295
295
|
};
|
|
296
|
-
export
|
|
297
|
-
export
|
|
298
|
-
export
|
|
296
|
+
export type VirtualizedListQueryDirection = 'top' | 'bottom';
|
|
297
|
+
export type VirtualizedListVerticalItemPosition = 'top' | 'bottom' | 'middle';
|
|
298
|
+
export type AudioRecording = MediaRecording & {
|
|
299
299
|
waveform_data: number[];
|
|
300
300
|
};
|
|
301
|
-
export
|
|
301
|
+
export type MediaRecording = {
|
|
302
302
|
recording: File;
|
|
303
303
|
duration: number;
|
|
304
304
|
mime_type: string;
|
|
305
305
|
asset_url: string | ArrayBuffer | undefined;
|
|
306
306
|
};
|
|
307
|
-
export
|
|
308
|
-
|
|
307
|
+
export type CustomAttachmentPreviewListContext = {
|
|
308
|
+
service: AttachmentService;
|
|
309
309
|
};
|
|
310
|
-
export
|
|
310
|
+
export type ThreadReplyButtonContext = {
|
|
311
311
|
message: StreamMessage;
|
|
312
312
|
};
|
|
313
|
-
export
|
|
313
|
+
export type CustomAutocompleteItemContext = {
|
|
314
314
|
item: CustomAutocompleteItem;
|
|
315
315
|
};
|
|
316
|
-
export
|
|
316
|
+
export type CustomAutocompleteItem = {
|
|
317
317
|
/**
|
|
318
318
|
* This is the text that will be inserted into the message input once a user selects an option (appended after the trigger character)
|
|
319
319
|
*/
|
|
320
320
|
autocompleteLabel: string;
|
|
321
321
|
};
|
|
322
|
-
export
|
|
322
|
+
export type CustomAutocomplete = {
|
|
323
323
|
/**
|
|
324
324
|
* The character that will trigger the autocomplete (for example #)
|
|
325
325
|
*
|
|
@@ -349,16 +349,16 @@ export declare type CustomAutocomplete = {
|
|
|
349
349
|
*/
|
|
350
350
|
updateOptions?: (searchTerm: string) => Promise<CustomAutocompleteItem[]>;
|
|
351
351
|
};
|
|
352
|
-
export
|
|
352
|
+
export type MessageTextContext = {
|
|
353
353
|
message: StreamMessage | undefined | MessageResponseBase;
|
|
354
354
|
isQuoted: boolean;
|
|
355
355
|
shouldTranslate: boolean;
|
|
356
356
|
};
|
|
357
|
-
export
|
|
357
|
+
export type GalleryAttachment = {
|
|
358
358
|
type: 'gallery';
|
|
359
359
|
images: Attachment[];
|
|
360
360
|
};
|
|
361
|
-
export
|
|
361
|
+
export type MessageBlockedContext = {
|
|
362
362
|
message: StreamMessage;
|
|
363
363
|
isMyMessage: boolean;
|
|
364
364
|
};
|
|
@@ -25,5 +25,5 @@ export declare class UserListComponent {
|
|
|
25
25
|
readonly loadMore: EventEmitter<void>;
|
|
26
26
|
trackByUserId(_: number, item: UserResponse): string;
|
|
27
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<UserListComponent, never>;
|
|
28
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<UserListComponent, "stream-user-list", never, { "users": "users"; "isLoading": "isLoading"; "hasMore": "hasMore"; }, { "loadMore": "loadMore"; }, never, never, false, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UserListComponent, "stream-user-list", never, { "users": { "alias": "users"; "required": false; }; "isLoading": { "alias": "isLoading"; "required": false; }; "hasMore": { "alias": "hasMore"; "required": false; }; }, { "loadMore": "loadMore"; }, never, never, false, never>;
|
|
29
29
|
}
|
|
@@ -20,8 +20,8 @@ import * as i0 from "@angular/core";
|
|
|
20
20
|
* where 0 dB is the loudest possible sound, -10 dB is a 10th of that, etc.
|
|
21
21
|
* The default value is -100 dB.
|
|
22
22
|
*/
|
|
23
|
-
export
|
|
24
|
-
export
|
|
23
|
+
export type AmplitudeAnalyserConfig = Pick<AnalyserNode, 'fftSize' | 'maxDecibels' | 'minDecibels'>;
|
|
24
|
+
export type AmplitudeRecorderConfig = {
|
|
25
25
|
analyserConfig: AmplitudeAnalyserConfig;
|
|
26
26
|
sampleCount: number;
|
|
27
27
|
samplingFrequencyMs: number;
|
|
@@ -3,14 +3,14 @@ import { NotificationService } from '../notification.service';
|
|
|
3
3
|
import { ChatClientService } from '../chat-client.service';
|
|
4
4
|
import { TranscoderService } from './transcoder.service';
|
|
5
5
|
import { MediaRecording } from '../types';
|
|
6
|
-
export
|
|
6
|
+
export type MediaRecorderConfig = Omit<MediaRecorderOptions, 'mimeType'> & Required<Pick<MediaRecorderOptions, 'mimeType'>>;
|
|
7
7
|
export declare enum MediaRecordingState {
|
|
8
8
|
PAUSED = "paused",
|
|
9
9
|
RECORDING = "recording",
|
|
10
10
|
STOPPED = "stopped",
|
|
11
11
|
ERROR = "error"
|
|
12
12
|
}
|
|
13
|
-
export
|
|
13
|
+
export type MediaRecordingTitleOptions = {
|
|
14
14
|
mimeType: string;
|
|
15
15
|
};
|
|
16
16
|
export declare abstract class MultimediaRecorder<T = null> {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
export
|
|
2
|
+
export type TranscoderConfig = {
|
|
3
3
|
sampleRate: number;
|
|
4
4
|
};
|
|
5
|
-
export
|
|
5
|
+
export type TranscodeParams = TranscoderConfig & {
|
|
6
6
|
blob: Blob;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
type WriteWaveHeaderParams = {
|
|
9
9
|
arrayBuffer: ArrayBuffer;
|
|
10
10
|
channelCount: number;
|
|
11
11
|
sampleRate: number;
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
type WriteAudioDataParams = {
|
|
14
14
|
arrayBuffer: ArrayBuffer;
|
|
15
15
|
dataByChannel: Float32Array[];
|
|
16
16
|
};
|
|
@@ -26,5 +26,5 @@ export declare class VoiceRecorderComponent implements OnInit, OnDestroy, OnChan
|
|
|
26
26
|
resume(): void;
|
|
27
27
|
uploadRecording(): void;
|
|
28
28
|
static ɵfac: i0.ɵɵFactoryDeclaration<VoiceRecorderComponent, never>;
|
|
29
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<VoiceRecorderComponent, "stream-voice-recorder", never, { "voiceRecorderService": "voiceRecorderService"; }, {}, never, never, false, never>;
|
|
29
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<VoiceRecorderComponent, "stream-voice-recorder", never, { "voiceRecorderService": { "alias": "voiceRecorderService"; "required": false; }; }, {}, never, never, false, never>;
|
|
30
30
|
}
|
|
@@ -32,5 +32,5 @@ export declare class VoiceRecordingWavebarComponent implements OnInit, OnChanges
|
|
|
32
32
|
trackByIndex(index: number): number;
|
|
33
33
|
private containerSizeChanged;
|
|
34
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<VoiceRecordingWavebarComponent, never>;
|
|
35
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<VoiceRecordingWavebarComponent, "stream-voice-recording-wavebar", never, { "audioElement": "audioElement"; "waveFormData": "waveFormData"; "duration": "duration"; }, {}, never, never, false, never>;
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<VoiceRecordingWavebarComponent, "stream-voice-recording-wavebar", never, { "audioElement": { "alias": "audioElement"; "required": false; }; "waveFormData": { "alias": "waveFormData"; "required": false; }; "duration": { "alias": "duration"; "required": false; }; }, {}, never, never, false, never>;
|
|
36
36
|
}
|
|
@@ -25,5 +25,5 @@ export declare class VoiceRecordingComponent implements OnChanges, AfterViewInit
|
|
|
25
25
|
private getFormattedDuration;
|
|
26
26
|
private getFileSize;
|
|
27
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<VoiceRecordingComponent, never>;
|
|
28
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<VoiceRecordingComponent, "stream-voice-recording", never, { "attachment": "attachment"; }, {}, never, never, false, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<VoiceRecordingComponent, "stream-voice-recording", never, { "attachment": { "alias": "attachment"; "required": false; }; }, {}, never, never, false, never>;
|
|
29
29
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stream-chat-angular",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.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/",
|
|
@@ -20,19 +20,17 @@
|
|
|
20
20
|
},
|
|
21
21
|
".": {
|
|
22
22
|
"types": "./index.d.ts",
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"node": "./fesm2015/stream-chat-angular.mjs",
|
|
27
|
-
"default": "./fesm2020/stream-chat-angular.mjs"
|
|
23
|
+
"esm2022": "./esm2022/stream-chat-angular.mjs",
|
|
24
|
+
"esm": "./esm2022/stream-chat-angular.mjs",
|
|
25
|
+
"default": "./fesm2022/stream-chat-angular.mjs"
|
|
28
26
|
}
|
|
29
27
|
},
|
|
30
28
|
"peerDependencies": {
|
|
31
|
-
"@angular/common": "^
|
|
32
|
-
"@angular/core": "^
|
|
33
|
-
"@angular/forms": "^
|
|
29
|
+
"@angular/common": "^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^21.0.0-rc.2",
|
|
30
|
+
"@angular/core": "^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^21.0.0-rc.2",
|
|
31
|
+
"@angular/forms": "^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^21.0.0-rc.2",
|
|
34
32
|
"@breezystack/lamejs": "^1.2.7",
|
|
35
|
-
"@ngx-translate/core": "^
|
|
33
|
+
"@ngx-translate/core": "^17.0.0",
|
|
36
34
|
"rxjs": "^7.4.0",
|
|
37
35
|
"stream-chat": "^9.20.0"
|
|
38
36
|
},
|
|
@@ -47,20 +45,16 @@
|
|
|
47
45
|
"dependencies": {
|
|
48
46
|
"@floating-ui/dom": "^1.6.3",
|
|
49
47
|
"@stream-io/transliterate": "^1.5.2",
|
|
50
|
-
"angular-mentions": "^1.
|
|
48
|
+
"angular-mentions": "^1.5.0",
|
|
51
49
|
"dayjs": "^1.11.10",
|
|
52
50
|
"emoji-regex": "^10.3.0",
|
|
53
51
|
"fix-webm-duration": "^1.0.6",
|
|
54
|
-
"ngx-float-ui": "^
|
|
52
|
+
"ngx-float-ui": "^17.0.0 || ^18.0.0 || ^18.0.1-rc.0 || ^19.0.0 || ^20.0.0",
|
|
55
53
|
"pretty-bytes": "^6.1.1",
|
|
56
54
|
"tslib": "^2.3.0",
|
|
57
55
|
"uuid": "^9.0.1"
|
|
58
56
|
},
|
|
59
|
-
"module": "
|
|
60
|
-
"es2020": "fesm2020/stream-chat-angular.mjs",
|
|
61
|
-
"esm2020": "esm2020/stream-chat-angular.mjs",
|
|
62
|
-
"fesm2020": "fesm2020/stream-chat-angular.mjs",
|
|
63
|
-
"fesm2015": "fesm2015/stream-chat-angular.mjs",
|
|
57
|
+
"module": "fesm2022/stream-chat-angular.mjs",
|
|
64
58
|
"typings": "index.d.ts",
|
|
65
59
|
"sideEffects": false
|
|
66
60
|
}
|
package/src/assets/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '
|
|
1
|
+
export const version = '7.0.0';
|