stream-chat-angular 4.53.0 → 4.54.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/assets/i18n/en.d.ts +1 -0
- package/assets/version.d.ts +1 -1
- package/bundles/stream-chat-angular.umd.js +187 -54
- package/bundles/stream-chat-angular.umd.js.map +1 -1
- package/esm2015/assets/i18n/en.js +2 -1
- package/esm2015/assets/version.js +2 -2
- package/esm2015/lib/channel.service.js +38 -1
- package/esm2015/lib/message-list/message-list.component.js +2 -2
- package/esm2015/lib/message-reactions/message-reactions.component.js +78 -8
- package/fesm2015/stream-chat-angular.js +134 -30
- package/fesm2015/stream-chat-angular.js.map +1 -1
- package/lib/channel.service.d.ts +13 -3
- package/lib/message-reactions/message-reactions.component.d.ts +15 -3
- package/package.json +1 -1
- package/src/assets/i18n/en.ts +1 -0
- package/src/assets/styles/v2/css/index.css +1 -1
- package/src/assets/styles/v2/css/index.layout.css +1 -1
- package/src/assets/styles/v2/scss/AttachmentList/AttachmentList-layout.scss +1 -0
- package/src/assets/styles/v2/scss/AttachmentList/AttachmentList-theme.scss +3 -3
- package/src/assets/styles/v2/scss/AttachmentPreviewList/AttachmentPreviewList-layout.scss +4 -0
- package/src/assets/styles/v2/scss/BaseImage/BaseImage-layout.scss +21 -0
- package/src/assets/styles/v2/scss/BaseImage/BaseImage-theme.scss +35 -0
- package/src/assets/styles/v2/scss/BaseImage/index.scss +2 -0
- package/src/assets/styles/v2/scss/Message/Message-layout.scss +59 -9
- package/src/assets/styles/v2/scss/Message/Message-theme.scss +32 -1
- package/src/assets/styles/v2/scss/MessageReactions/MessageReactions-layout.scss +68 -0
- package/src/assets/styles/v2/scss/MessageReactions/MessageReactions-theme.scss +17 -0
- package/src/assets/styles/v2/scss/_global-theme-variables.scss +3 -0
- package/src/assets/styles/v2/scss/_icons.scss +3 -0
- package/src/assets/styles/v2/scss/_utils.scss +12 -0
- package/src/assets/styles/v2/scss/index.layout.scss +2 -0
- package/src/assets/styles/v2/scss/index.scss +1 -0
- package/src/assets/styles/v2/scss/vendor/react-image-gallery.scss +19 -0
- package/src/assets/version.ts +1 -1
package/lib/channel.service.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NgZone } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { Attachment, Channel, ChannelFilters, ChannelOptions, ChannelResponse, ChannelSort, Event, MessageResponse, UserResponse } from 'stream-chat';
|
|
3
|
+
import { Attachment, Channel, ChannelFilters, ChannelOptions, ChannelResponse, ChannelSort, Event, FormatMessageResponse, MessageResponse, ReactionResponse, UserResponse } from 'stream-chat';
|
|
4
4
|
import { ChatClientService, ClientEvent } from './chat-client.service';
|
|
5
5
|
import { NotificationService } from './notification.service';
|
|
6
6
|
import { AttachmentUpload, ChannelQueryState, DefaultStreamChatGenerics, MessageInput, MessageReactionType, NextPageConfiguration, StreamMessage } from './types';
|
|
@@ -329,9 +329,9 @@ export declare class ChannelService<T extends DefaultStreamChatGenerics = Defaul
|
|
|
329
329
|
i18n?: (import("stream-chat").RequireAtLeastOne<Record<"_text" | "so_text" | "hr_text" | "th_text" | "tr_text" | "no_text" | "af_text" | "am_text" | "ar_text" | "az_text" | "bg_text" | "bn_text" | "bs_text" | "cs_text" | "da_text" | "de_text" | "el_text" | "en_text" | "es_text" | "es-MX_text" | "et_text" | "fa_text" | "fa-AF_text" | "fi_text" | "fr_text" | "fr-CA_text" | "ha_text" | "he_text" | "hi_text" | "hu_text" | "id_text" | "it_text" | "ja_text" | "ka_text" | "ko_text" | "lt_text" | "lv_text" | "ms_text" | "nl_text" | "pl_text" | "ps_text" | "pt_text" | "ro_text" | "ru_text" | "sk_text" | "sl_text" | "sq_text" | "sr_text" | "sv_text" | "sw_text" | "ta_text" | "tl_text" | "uk_text" | "ur_text" | "vi_text" | "zh_text" | "zh-TW_text", string>> & {
|
|
330
330
|
language: import("stream-chat").TranslationLanguages;
|
|
331
331
|
}) | undefined;
|
|
332
|
-
latest_reactions?:
|
|
332
|
+
latest_reactions?: ReactionResponse<T>[] | undefined;
|
|
333
333
|
mentioned_users?: UserResponse<T>[] | undefined;
|
|
334
|
-
own_reactions?:
|
|
334
|
+
own_reactions?: ReactionResponse<T>[] | null | undefined;
|
|
335
335
|
pin_expires?: string | null | undefined;
|
|
336
336
|
pinned_at?: string | null | undefined;
|
|
337
337
|
pinned_by?: UserResponse<T> | null | undefined;
|
|
@@ -444,6 +444,16 @@ export declare class ChannelService<T extends DefaultStreamChatGenerics = Defaul
|
|
|
444
444
|
* The current active channel
|
|
445
445
|
*/
|
|
446
446
|
get activeChannel(): Channel<T> | undefined;
|
|
447
|
+
/**
|
|
448
|
+
* The current active channel messages
|
|
449
|
+
*/
|
|
450
|
+
get activeChannelMessages(): (StreamMessage<T> | MessageResponse<T> | FormatMessageResponse<T>)[];
|
|
451
|
+
/**
|
|
452
|
+
* Get all reactions of a message in the current active channel
|
|
453
|
+
* @param messageId
|
|
454
|
+
* @returns all reactions of a message
|
|
455
|
+
*/
|
|
456
|
+
getMessageReactions(messageId: string): Promise<ReactionResponse<T>[]>;
|
|
447
457
|
private messageUpdated;
|
|
448
458
|
private messageReactionEventReceived;
|
|
449
459
|
private formatMessage;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { AfterViewChecked, ChangeDetectorRef, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { ReactionResponse } from 'stream-chat';
|
|
2
|
+
import { ReactionResponse, UserResponse } from 'stream-chat';
|
|
3
3
|
import { ChannelService } from '../channel.service';
|
|
4
4
|
import { MessageReactionType, DefaultStreamChatGenerics } from '../types';
|
|
5
5
|
import { NgxPopperjsTriggers, NgxPopperjsPlacements } from 'ngx-popperjs';
|
|
6
6
|
import { MessageReactionsService } from '../message-reactions.service';
|
|
7
|
+
import { CustomTemplatesService } from '../custom-templates.service';
|
|
8
|
+
import { ThemeService } from '../theme.service';
|
|
7
9
|
import * as i0 from "@angular/core";
|
|
8
10
|
/**
|
|
9
11
|
* 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.
|
|
@@ -12,6 +14,8 @@ export declare class MessageReactionsComponent implements AfterViewChecked, OnCh
|
|
|
12
14
|
private cdRef;
|
|
13
15
|
private channelService;
|
|
14
16
|
private messageReactionsService;
|
|
17
|
+
customTemplatesService: CustomTemplatesService;
|
|
18
|
+
private themeService;
|
|
15
19
|
/**
|
|
16
20
|
* The id of the message the reactions belong to
|
|
17
21
|
*/
|
|
@@ -48,24 +52,32 @@ export declare class MessageReactionsComponent implements AfterViewChecked, OnCh
|
|
|
48
52
|
currentTooltipTarget: HTMLElement | undefined;
|
|
49
53
|
popperTriggerHover: NgxPopperjsTriggers;
|
|
50
54
|
popperPlacementAuto: NgxPopperjsPlacements;
|
|
51
|
-
|
|
55
|
+
selectedReactionType: string | undefined;
|
|
56
|
+
isLoading: boolean;
|
|
57
|
+
reactions: ReactionResponse[];
|
|
58
|
+
constructor(cdRef: ChangeDetectorRef, channelService: ChannelService, messageReactionsService: MessageReactionsService, customTemplatesService: CustomTemplatesService, themeService: ThemeService);
|
|
52
59
|
ngOnChanges(changes: SimpleChanges): void;
|
|
53
60
|
ngAfterViewChecked(): void;
|
|
54
61
|
get existingReactions(): MessageReactionType[];
|
|
55
62
|
get reactionsCount(): number;
|
|
56
63
|
get reactionOptions(): MessageReactionType[];
|
|
57
|
-
getLatestUserByReaction(reactionType: MessageReactionType):
|
|
64
|
+
getLatestUserByReaction(reactionType: MessageReactionType): UserResponse<DefaultStreamChatGenerics> | null | undefined;
|
|
58
65
|
getEmojiByReaction(reactionType: MessageReactionType): string;
|
|
66
|
+
reactionSelected(event: Event, reactionType: string): void;
|
|
59
67
|
getUsersByReaction(reactionType: MessageReactionType): string;
|
|
68
|
+
getAllUsersByReaction(reactionType?: MessageReactionType): UserResponse<DefaultStreamChatGenerics>[];
|
|
60
69
|
showTooltip(event: Event, reactionType: MessageReactionType): void;
|
|
61
70
|
hideTooltip(): void;
|
|
62
71
|
trackByMessageReaction(index: number, item: MessageReactionType): string;
|
|
72
|
+
trackByUserId(index: number, item: UserResponse): string;
|
|
63
73
|
react(type: MessageReactionType): void;
|
|
64
74
|
isOwnReaction(reactionType: MessageReactionType): boolean;
|
|
75
|
+
isOpenChange: (isOpen: boolean) => void;
|
|
65
76
|
private eventHandler;
|
|
66
77
|
private watchForOutsideClicks;
|
|
67
78
|
private stopWatchForOutsideClicks;
|
|
68
79
|
private setTooltipPosition;
|
|
80
|
+
private fetchAllReactions;
|
|
69
81
|
static ɵfac: i0.ɵɵFactoryDeclaration<MessageReactionsComponent, never>;
|
|
70
82
|
static ɵcmp: i0.ɵɵComponentDeclaration<MessageReactionsComponent, "stream-message-reactions", never, { "messageId": "messageId"; "messageReactionCounts": "messageReactionCounts"; "isSelectorOpen": "isSelectorOpen"; "latestReactions": "latestReactions"; "ownReactions": "ownReactions"; }, { "isSelectorOpenChange": "isSelectorOpenChange"; }, never, never>;
|
|
71
83
|
}
|
package/package.json
CHANGED
package/src/assets/i18n/en.ts
CHANGED
|
@@ -19,6 +19,7 @@ export const en = {
|
|
|
19
19
|
'Error connecting to chat, refresh the page to try again.':
|
|
20
20
|
'Error connecting to chat, refresh the page to try again',
|
|
21
21
|
'Error deleting message': 'Error deleting message',
|
|
22
|
+
'Error loading reactions': 'Error loading reactions',
|
|
22
23
|
'Error muting a user ...': 'Error muting a user ...',
|
|
23
24
|
'Error pinning message': 'Error pinning message',
|
|
24
25
|
'Error removing message pin': 'Error removing message pin',
|