stream-chat-angular 2.14.0 → 2.15.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/version.d.ts +1 -1
- package/bundles/stream-chat-angular.umd.js +159 -9
- package/bundles/stream-chat-angular.umd.js.map +1 -1
- package/esm2015/assets/version.js +2 -2
- package/esm2015/lib/attachment-list/attachment-list.component.js +7 -1
- package/esm2015/lib/attachment-preview-list/attachment-preview-list.component.js +4 -1
- package/esm2015/lib/attachment.service.js +1 -1
- package/esm2015/lib/avatar/avatar.component.js +7 -1
- package/esm2015/lib/channel/channel.component.js +4 -1
- package/esm2015/lib/channel-header/channel-header.component.js +4 -1
- package/esm2015/lib/channel-list/channel-list.component.js +4 -1
- package/esm2015/lib/channel-preview/channel-preview.component.js +4 -1
- package/esm2015/lib/channel.service.js +2 -2
- package/esm2015/lib/icon/icon.component.js +4 -1
- package/esm2015/lib/loading-indicator/loading-indicator.component.js +10 -1
- package/esm2015/lib/message/message.component.js +10 -1
- package/esm2015/lib/message-actions-box/message-actions-box.component.js +19 -1
- package/esm2015/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.js +22 -1
- package/esm2015/lib/message-input/message-input-config.service.js +2 -2
- package/esm2015/lib/message-input/message-input.component.js +10 -1
- package/esm2015/lib/message-input/textarea/textarea.component.js +13 -1
- package/esm2015/lib/message-list/message-list.component.js +9 -3
- package/esm2015/lib/message-reactions/message-reactions.component.js +22 -4
- package/esm2015/lib/modal/modal.component.js +10 -1
- package/esm2015/lib/notification/notification.component.js +4 -1
- package/esm2015/lib/notification-list/notification-list.component.js +4 -1
- package/esm2015/lib/notification.service.js +2 -2
- package/esm2015/lib/thread/thread.component.js +4 -1
- package/fesm2015/stream-chat-angular.js +159 -9
- package/fesm2015/stream-chat-angular.js.map +1 -1
- package/lib/attachment-list/attachment-list.component.d.ts +9 -0
- package/lib/attachment-preview-list/attachment-preview-list.component.d.ts +3 -0
- package/lib/attachment.service.d.ts +1 -1
- package/lib/avatar/avatar.component.d.ts +12 -0
- package/lib/channel/channel.component.d.ts +3 -0
- package/lib/channel-header/channel-header.component.d.ts +3 -0
- package/lib/channel-list/channel-list.component.d.ts +6 -0
- package/lib/channel-preview/channel-preview.component.d.ts +6 -0
- package/lib/channel.service.d.ts +1 -1
- package/lib/icon/icon.component.d.ts +9 -0
- package/lib/loading-indicator/loading-indicator.component.d.ts +9 -0
- package/lib/message/message.component.d.ts +27 -3
- package/lib/message-actions-box/message-actions-box.component.d.ts +24 -0
- package/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.d.ts +27 -0
- package/lib/message-input/message-input-config.service.d.ts +1 -1
- package/lib/message-input/message-input.component.d.ts +36 -1
- package/lib/message-input/textarea/textarea.component.d.ts +12 -0
- package/lib/message-list/message-list.component.d.ts +20 -2
- package/lib/message-reactions/message-reactions.component.d.ts +22 -1
- package/lib/modal/modal.component.d.ts +9 -0
- package/lib/notification/notification.component.d.ts +6 -0
- package/lib/notification-list/notification-list.component.d.ts +3 -0
- package/lib/notification.service.d.ts +1 -1
- package/lib/thread/thread.component.d.ts +3 -0
- package/package.json +1 -1
- package/src/assets/version.ts +1 -1
|
@@ -17,10 +17,10 @@ import transliterate from '@stream-io/transliterate';
|
|
|
17
17
|
import * as i6$1 from 'angular-mentions';
|
|
18
18
|
import { MentionModule } from 'angular-mentions';
|
|
19
19
|
|
|
20
|
-
const version = '2.
|
|
20
|
+
const version = '2.15.0';
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
* The `NotificationService` can be used to add or remove notifications. By default the [`NotificationList`](../components/
|
|
23
|
+
* The `NotificationService` can be used to add or remove notifications. By default the [`NotificationList`](../components/NotificationListComponent.mdx) component displays the currently active notifications.
|
|
24
24
|
*/
|
|
25
25
|
class NotificationService {
|
|
26
26
|
constructor() {
|
|
@@ -396,7 +396,7 @@ class ChannelService {
|
|
|
396
396
|
});
|
|
397
397
|
}
|
|
398
398
|
/**
|
|
399
|
-
* Resets the `activeChannel$`, `channels$` and `activeChannelMessages$` Observables. Useful when disconnecting a chat user, use in combination with [`disconnectUser`](./
|
|
399
|
+
* Resets the `activeChannel$`, `channels$` and `activeChannelMessages$` Observables. Useful when disconnecting a chat user, use in combination with [`disconnectUser`](./ChatClientService.mdx/#disconnectuser).
|
|
400
400
|
*/
|
|
401
401
|
reset() {
|
|
402
402
|
this.activeChannelMessagesSubject.next([]);
|
|
@@ -1481,8 +1481,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
|
|
|
1481
1481
|
}]
|
|
1482
1482
|
}], ctorParameters: function () { return [{ type: i2.TranslateService }]; } });
|
|
1483
1483
|
|
|
1484
|
+
/**
|
|
1485
|
+
* The `Avatar` component displays the provided image, with fallback to the first letter of the optional name input.
|
|
1486
|
+
*/
|
|
1484
1487
|
class AvatarComponent {
|
|
1485
1488
|
constructor() {
|
|
1489
|
+
/**
|
|
1490
|
+
* The size in pixels of the avatar image.
|
|
1491
|
+
*/
|
|
1486
1492
|
this.size = 32;
|
|
1487
1493
|
this.isLoaded = false;
|
|
1488
1494
|
this.isError = false;
|
|
@@ -1509,6 +1515,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
|
|
|
1509
1515
|
type: Input
|
|
1510
1516
|
}] } });
|
|
1511
1517
|
|
|
1518
|
+
/**
|
|
1519
|
+
* The `Icon` component can be used to display different icons (i. e. message delivered icon).
|
|
1520
|
+
*/
|
|
1512
1521
|
class IconComponent {
|
|
1513
1522
|
constructor() { }
|
|
1514
1523
|
}
|
|
@@ -1527,9 +1536,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
|
|
|
1527
1536
|
type: Input
|
|
1528
1537
|
}] } });
|
|
1529
1538
|
|
|
1539
|
+
/**
|
|
1540
|
+
* The `LoadingIndicator` component displays a spinner to indicate that an action is in progress.
|
|
1541
|
+
*/
|
|
1530
1542
|
class LoadingIndicatorComponent {
|
|
1531
1543
|
constructor() {
|
|
1544
|
+
/**
|
|
1545
|
+
* The size of the indicator (in pixels)
|
|
1546
|
+
*/
|
|
1532
1547
|
this.size = 15;
|
|
1548
|
+
/**
|
|
1549
|
+
* The color of the indicator
|
|
1550
|
+
*/
|
|
1533
1551
|
this.color = '#006CFF';
|
|
1534
1552
|
}
|
|
1535
1553
|
}
|
|
@@ -1655,7 +1673,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
|
|
|
1655
1673
|
}], ctorParameters: function () { return []; } });
|
|
1656
1674
|
|
|
1657
1675
|
/**
|
|
1658
|
-
* The `MessageInputConfigService` is used to keep a consistent configuration among the different [`MessageInput`](../components/
|
|
1676
|
+
* The `MessageInputConfigService` is used to keep a consistent configuration among the different [`MessageInput`](../components/MessageInputComponent.mdx) components if your UI has more than one input component.
|
|
1659
1677
|
*/
|
|
1660
1678
|
class MessageInputConfigService {
|
|
1661
1679
|
constructor() {
|
|
@@ -1706,10 +1724,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
|
|
|
1706
1724
|
}]
|
|
1707
1725
|
}], ctorParameters: function () { return []; } });
|
|
1708
1726
|
|
|
1727
|
+
/**
|
|
1728
|
+
* The `AttachmentList` compontent displays the attachments of a message
|
|
1729
|
+
*/
|
|
1709
1730
|
class AttachmentListComponent {
|
|
1710
1731
|
constructor(imageLoadService, channelService) {
|
|
1711
1732
|
this.imageLoadService = imageLoadService;
|
|
1712
1733
|
this.channelService = channelService;
|
|
1734
|
+
/**
|
|
1735
|
+
* The attachments to display
|
|
1736
|
+
*/
|
|
1713
1737
|
this.attachments = [];
|
|
1714
1738
|
this.orderedAttachments = [];
|
|
1715
1739
|
}
|
|
@@ -1776,6 +1800,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
|
|
|
1776
1800
|
type: Input
|
|
1777
1801
|
}] } });
|
|
1778
1802
|
|
|
1803
|
+
/**
|
|
1804
|
+
* The `AttachmentPreviewList` compontent displays a preview of the attachments uploaded to a message. Users can delete attachments using the preview component, or retry upload if it failed previously.
|
|
1805
|
+
*/
|
|
1779
1806
|
class AttachmentPreviewListComponent {
|
|
1780
1807
|
constructor(attachmentService) {
|
|
1781
1808
|
this.attachmentService = attachmentService;
|
|
@@ -1806,6 +1833,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
|
|
|
1806
1833
|
}]
|
|
1807
1834
|
}], ctorParameters: function () { return [{ type: AttachmentService }]; } });
|
|
1808
1835
|
|
|
1836
|
+
/**
|
|
1837
|
+
* 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).
|
|
1838
|
+
*/
|
|
1809
1839
|
class MessageInputComponent {
|
|
1810
1840
|
constructor(channelService, notificationService, attachmentService, configService, textareaType, componentFactoryResolver, cdRef, chatClient, emojiInputService) {
|
|
1811
1841
|
this.channelService = channelService;
|
|
@@ -1817,7 +1847,13 @@ class MessageInputComponent {
|
|
|
1817
1847
|
this.cdRef = cdRef;
|
|
1818
1848
|
this.chatClient = chatClient;
|
|
1819
1849
|
this.emojiInputService = emojiInputService;
|
|
1850
|
+
/**
|
|
1851
|
+
* Determines if the message is being dispalyed in a channel or in a [thread](https://getstream.io/chat/docs/javascript/threads/?language=javascript).
|
|
1852
|
+
*/
|
|
1820
1853
|
this.mode = 'main';
|
|
1854
|
+
/**
|
|
1855
|
+
* Emits when a message was successfuly sent or updated
|
|
1856
|
+
*/
|
|
1821
1857
|
this.messageUpdate = new EventEmitter();
|
|
1822
1858
|
this.textareaValue = '';
|
|
1823
1859
|
this.mentionedUsers = [];
|
|
@@ -2117,9 +2153,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
|
|
|
2117
2153
|
args: [TextareaDirective, { static: false }]
|
|
2118
2154
|
}] } });
|
|
2119
2155
|
|
|
2156
|
+
/**
|
|
2157
|
+
* The `Modal` component displays its content in an overlay. The modal can be closed with a close button, if the user clicks outside of the modal content, or if the escape button is pressed. The modal can also be closed from outside.
|
|
2158
|
+
*/
|
|
2120
2159
|
class ModalComponent {
|
|
2121
2160
|
constructor() {
|
|
2161
|
+
/**
|
|
2162
|
+
* If `true` the modal will be displayed, if `false` the modal will be hidden
|
|
2163
|
+
*/
|
|
2122
2164
|
this.isOpen = false;
|
|
2165
|
+
/**
|
|
2166
|
+
* Emits `true` if the modal becomes visible, and `false` if the modal is closed.
|
|
2167
|
+
*/
|
|
2123
2168
|
this.isOpenChange = new EventEmitter();
|
|
2124
2169
|
this.watchForEscPress = (event) => {
|
|
2125
2170
|
if (event.key === 'Escape') {
|
|
@@ -2176,6 +2221,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
|
|
|
2176
2221
|
args: ['content']
|
|
2177
2222
|
}] } });
|
|
2178
2223
|
|
|
2224
|
+
/**
|
|
2225
|
+
* The `Notification` component displays a notification within the [`NotificationList`](./NotificationListComponent.mdx)
|
|
2226
|
+
*/
|
|
2179
2227
|
class NotificationComponent {
|
|
2180
2228
|
constructor() { }
|
|
2181
2229
|
}
|
|
@@ -2192,6 +2240,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
|
|
|
2192
2240
|
type: Input
|
|
2193
2241
|
}] } });
|
|
2194
2242
|
|
|
2243
|
+
/**
|
|
2244
|
+
* The `NotificationList` component displays the list of active notifications.
|
|
2245
|
+
*/
|
|
2195
2246
|
class NotificationListComponent {
|
|
2196
2247
|
constructor(notificationService) {
|
|
2197
2248
|
this.notificationService = notificationService;
|
|
@@ -2212,15 +2263,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
|
|
|
2212
2263
|
}]
|
|
2213
2264
|
}], ctorParameters: function () { return [{ type: NotificationService }]; } });
|
|
2214
2265
|
|
|
2266
|
+
/**
|
|
2267
|
+
* The `MessageActionsBox` component displays a list of message actions (i.e edit), that can be opened or closed. You can find the [list of the supported actions](../concepts/message-interactions.mdx) in the message interaction guide.
|
|
2268
|
+
*/
|
|
2215
2269
|
class MessageActionsBoxComponent {
|
|
2216
2270
|
constructor(chatClientService, notificationService, channelService) {
|
|
2217
2271
|
this.chatClientService = chatClientService;
|
|
2218
2272
|
this.notificationService = notificationService;
|
|
2219
2273
|
this.channelService = channelService;
|
|
2274
|
+
/**
|
|
2275
|
+
* Indicates if the list should be opened or closed. Adding a UI element to open and close the list is the parent's component responsibility.
|
|
2276
|
+
*/
|
|
2220
2277
|
this.isOpen = false;
|
|
2278
|
+
/**
|
|
2279
|
+
* Indicates if the message actions are belonging to a message that was sent by the current user or not.
|
|
2280
|
+
*/
|
|
2221
2281
|
this.isMine = false;
|
|
2282
|
+
/**
|
|
2283
|
+
* 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.
|
|
2284
|
+
*/
|
|
2222
2285
|
this.enabledActions = [];
|
|
2286
|
+
/**
|
|
2287
|
+
* The number of authorized actions (it can be less or equal than the number of enabled actions)
|
|
2288
|
+
*/
|
|
2223
2289
|
this.displayedActionsCount = new EventEmitter();
|
|
2290
|
+
/**
|
|
2291
|
+
* An event which emits `true` if the edit message modal is open, and `false` when it is closed.
|
|
2292
|
+
*/
|
|
2224
2293
|
this.isEditing = new EventEmitter();
|
|
2225
2294
|
this.isEditModalOpen = false;
|
|
2226
2295
|
this.modalClosed = () => {
|
|
@@ -2350,6 +2419,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
|
|
|
2350
2419
|
args: [MessageInputComponent]
|
|
2351
2420
|
}] } });
|
|
2352
2421
|
|
|
2422
|
+
/**
|
|
2423
|
+
* The `Channel` component is a container component that displays the [`ChannelHeader`](./ChannelHeaderComponent.mdx), [`MessageList`](./MessageListComponent.mdx), [`NotificationList`](./NotificationListComponent.mdx) and [`MessageInput`](./MessageInputComponent.mdx) components. You can also provide the [`Thread`](./ThreadComponent.mdx) component to use message [threads](https://getstream.io/chat/docs/javascript/threads/?language=javascript).
|
|
2424
|
+
*/
|
|
2353
2425
|
class ChannelComponent {
|
|
2354
2426
|
constructor(channelService) {
|
|
2355
2427
|
this.channelService = channelService;
|
|
@@ -2450,6 +2522,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
|
|
|
2450
2522
|
args: [{ providedIn: 'root' }]
|
|
2451
2523
|
}], ctorParameters: function () { return []; } });
|
|
2452
2524
|
|
|
2525
|
+
/**
|
|
2526
|
+
* The `ChannelHeader` component displays the avatar and name of the currently active channel along with member and watcher information. You can read about [the difference between members and watchers](https://getstream.io/chat/docs/javascript/watch_channel/?language=javascript#watchers-vs-members) in the platform documentation. Please note that number of watchers is only displayed if the user has [`connect-events` capability](https://getstream.io/chat/docs/javascript/channel_capabilities/?language=javascript)
|
|
2527
|
+
*/
|
|
2453
2528
|
class ChannelHeaderComponent {
|
|
2454
2529
|
constructor(channelService, channelListToggleService) {
|
|
2455
2530
|
this.channelService = channelService;
|
|
@@ -2489,6 +2564,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
|
|
|
2489
2564
|
}]
|
|
2490
2565
|
}], ctorParameters: function () { return [{ type: ChannelService }, { type: ChannelListToggleService }]; } });
|
|
2491
2566
|
|
|
2567
|
+
/**
|
|
2568
|
+
* The `ChannelPreview` component displays a channel preview in the channel list, it consists of the image, name and latest message of the channel.
|
|
2569
|
+
*/
|
|
2492
2570
|
class ChannelPreviewComponent {
|
|
2493
2571
|
constructor(channelService, ngZone) {
|
|
2494
2572
|
this.channelService = channelService;
|
|
@@ -2576,6 +2654,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
|
|
|
2576
2654
|
type: Input
|
|
2577
2655
|
}] } });
|
|
2578
2656
|
|
|
2657
|
+
/**
|
|
2658
|
+
* The `ChannelList` component renders the list of channels.
|
|
2659
|
+
*/
|
|
2579
2660
|
class ChannelListComponent {
|
|
2580
2661
|
constructor(channelService, channelListToggleService) {
|
|
2581
2662
|
this.channelService = channelService;
|
|
@@ -2663,15 +2744,33 @@ const emojiReactionsMapping = {
|
|
|
2663
2744
|
wow: '😮',
|
|
2664
2745
|
sad: '😞',
|
|
2665
2746
|
};
|
|
2747
|
+
/**
|
|
2748
|
+
* 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.
|
|
2749
|
+
*/
|
|
2666
2750
|
class MessageReactionsComponent {
|
|
2667
2751
|
constructor(cdRef, channelService) {
|
|
2668
2752
|
this.cdRef = cdRef;
|
|
2669
2753
|
this.channelService = channelService;
|
|
2754
|
+
/**
|
|
2755
|
+
* The number of reactions grouped by [reaction types](https://github.com/GetStream/stream-chat-angular/tree/master/projects/stream-chat-angular/src/lib/message-reactions/message-reactions.component.ts)
|
|
2756
|
+
*/
|
|
2670
2757
|
this.messageReactionCounts = {};
|
|
2758
|
+
/**
|
|
2759
|
+
* 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.
|
|
2760
|
+
*/
|
|
2671
2761
|
this.isSelectorOpen = false;
|
|
2672
|
-
|
|
2762
|
+
/**
|
|
2763
|
+
* List of reactions of a [message](../types/stream-message.mdx), used to display the users of a reaction type.
|
|
2764
|
+
*/
|
|
2673
2765
|
this.latestReactions = [];
|
|
2766
|
+
/**
|
|
2767
|
+
* List of the user's own reactions of a [message](../types/stream-message.mdx), used to display the users of a reaction type.
|
|
2768
|
+
*/
|
|
2674
2769
|
this.ownReactions = [];
|
|
2770
|
+
/**
|
|
2771
|
+
* 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.
|
|
2772
|
+
*/
|
|
2773
|
+
this.isSelectorOpenChange = new EventEmitter();
|
|
2675
2774
|
this.eventHandler = (event) => {
|
|
2676
2775
|
var _a;
|
|
2677
2776
|
if (!((_a = this.selectorContainer) === null || _a === void 0 ? void 0 : _a.nativeElement.contains(event.target))) {
|
|
@@ -2770,12 +2869,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
|
|
|
2770
2869
|
type: Input
|
|
2771
2870
|
}], isSelectorOpen: [{
|
|
2772
2871
|
type: Input
|
|
2773
|
-
}], isSelectorOpenChange: [{
|
|
2774
|
-
type: Output
|
|
2775
2872
|
}], latestReactions: [{
|
|
2776
2873
|
type: Input
|
|
2777
2874
|
}], ownReactions: [{
|
|
2778
2875
|
type: Input
|
|
2876
|
+
}], isSelectorOpenChange: [{
|
|
2877
|
+
type: Output
|
|
2779
2878
|
}], selectorContainer: [{
|
|
2780
2879
|
type: ViewChild,
|
|
2781
2880
|
args: ['selectorContainer']
|
|
@@ -2784,11 +2883,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
|
|
|
2784
2883
|
args: ['selectorTooltip']
|
|
2785
2884
|
}] } });
|
|
2786
2885
|
|
|
2886
|
+
/**
|
|
2887
|
+
* The `Message` component displays a message with additional information such as sender and date, and enables [interaction with the message (i.e. edit or react)](../concepts/message-interactions.mdx).
|
|
2888
|
+
*/
|
|
2787
2889
|
class MessageComponent {
|
|
2788
2890
|
constructor(chatClientService, channelService) {
|
|
2789
2891
|
this.chatClientService = chatClientService;
|
|
2790
2892
|
this.channelService = channelService;
|
|
2893
|
+
/**
|
|
2894
|
+
* 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. The [`MessageList`](./MessageListComponent.mdx) component automatically sets this based on [channel capabilities](https://getstream.io/chat/docs/javascript/channel_capabilities/?language=javascript).
|
|
2895
|
+
*/
|
|
2791
2896
|
this.enabledMessageActions = [];
|
|
2897
|
+
/**
|
|
2898
|
+
* Determines if the message is being dispalyed in a channel or in a [thread](https://getstream.io/chat/docs/javascript/threads/?language=javascript).
|
|
2899
|
+
*/
|
|
2792
2900
|
this.mode = 'main';
|
|
2793
2901
|
this.isActionBoxOpen = false;
|
|
2794
2902
|
this.isReactionSelectorOpen = false;
|
|
@@ -2969,12 +3077,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
|
|
|
2969
3077
|
args: ['container']
|
|
2970
3078
|
}] } });
|
|
2971
3079
|
|
|
3080
|
+
/**
|
|
3081
|
+
* The `Textarea` component is used by the [`MessageInput`](./MessageInputComponent.mdx) component to display the input HTML element where users can type their message.
|
|
3082
|
+
*/
|
|
2972
3083
|
class TextareaComponent {
|
|
2973
3084
|
constructor(emojiInputService) {
|
|
2974
3085
|
this.emojiInputService = emojiInputService;
|
|
2975
3086
|
this.class = 'str-chat__textarea';
|
|
3087
|
+
/**
|
|
3088
|
+
* The value of the input HTML element.
|
|
3089
|
+
*/
|
|
2976
3090
|
this.value = '';
|
|
3091
|
+
/**
|
|
3092
|
+
* Emits the current value of the input element when a user types.
|
|
3093
|
+
*/
|
|
2977
3094
|
this.valueChange = new EventEmitter();
|
|
3095
|
+
/**
|
|
3096
|
+
* Emits when a user triggers a message send event (this happens when they hit the `Enter` key).
|
|
3097
|
+
*/
|
|
2978
3098
|
this.send = new EventEmitter();
|
|
2979
3099
|
this.subscriptions = [];
|
|
2980
3100
|
this.subscriptions.push(this.emojiInputService.emojiInput$.subscribe((emoji) => {
|
|
@@ -3044,6 +3164,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
|
|
|
3044
3164
|
args: [{ providedIn: 'root' }]
|
|
3045
3165
|
}], ctorParameters: function () { return []; } });
|
|
3046
3166
|
|
|
3167
|
+
/**
|
|
3168
|
+
* The `AutocompleteTextarea` component is used by the [`MessageInput`](./MessageInputComponent.mdx) component to display the input HTML element where users can type their message.
|
|
3169
|
+
*/
|
|
3047
3170
|
class AutocompleteTextareaComponent {
|
|
3048
3171
|
constructor(channelService, chatClientService, transliterationService, emojiInputService) {
|
|
3049
3172
|
this.channelService = channelService;
|
|
@@ -3051,11 +3174,29 @@ class AutocompleteTextareaComponent {
|
|
|
3051
3174
|
this.transliterationService = transliterationService;
|
|
3052
3175
|
this.emojiInputService = emojiInputService;
|
|
3053
3176
|
this.class = 'str-chat__textarea';
|
|
3177
|
+
/**
|
|
3178
|
+
* The value of the input HTML element.
|
|
3179
|
+
*/
|
|
3054
3180
|
this.value = '';
|
|
3181
|
+
/**
|
|
3182
|
+
* If true, users can mention other users in messages. You can also set this input on the [`MessageInput`](./MessageInputComponent.mdx/#inputs-and-outputs) component.
|
|
3183
|
+
*/
|
|
3055
3184
|
this.areMentionsEnabled = true;
|
|
3185
|
+
/**
|
|
3186
|
+
* The scope for user mentions, either members of the current channel of members of the application. You can also set this input on the [`MessageInput`](./MessageInputComponent.mdx/#inputs-and-outputs) component.
|
|
3187
|
+
*/
|
|
3056
3188
|
this.mentionScope = 'channel';
|
|
3189
|
+
/**
|
|
3190
|
+
* Emits the current value of the input element when a user types.
|
|
3191
|
+
*/
|
|
3057
3192
|
this.valueChange = new EventEmitter();
|
|
3193
|
+
/**
|
|
3194
|
+
* Emits when a user triggers a message send event (this happens when they hit the `Enter` key).
|
|
3195
|
+
*/
|
|
3058
3196
|
this.send = new EventEmitter();
|
|
3197
|
+
/**
|
|
3198
|
+
* Emits the array of users that are mentioned in the message, it is updated when a user mentions a new user or deletes a mention.
|
|
3199
|
+
*/
|
|
3059
3200
|
this.userMentions = new EventEmitter();
|
|
3060
3201
|
this.autocompleteKey = 'autocompleteLabel';
|
|
3061
3202
|
this.mentionTriggerChar = '@';
|
|
@@ -3277,20 +3418,26 @@ const isOnSameDay = (date1, date2) => {
|
|
|
3277
3418
|
date1.getDate() === date2.getDate());
|
|
3278
3419
|
};
|
|
3279
3420
|
|
|
3421
|
+
/**
|
|
3422
|
+
* The `MessageList` component renders a scrollable list of messages.
|
|
3423
|
+
*/
|
|
3280
3424
|
class MessageListComponent {
|
|
3281
3425
|
constructor(channelService, chatClientService, imageLoadService) {
|
|
3282
3426
|
this.channelService = channelService;
|
|
3283
3427
|
this.chatClientService = chatClientService;
|
|
3284
3428
|
this.imageLoadService = imageLoadService;
|
|
3285
3429
|
/**
|
|
3286
|
-
* @deprecated https://getstream.io/chat/docs/
|
|
3430
|
+
* @deprecated use [channel capabilities](https://getstream.io/chat/docs/javascript/channel_capabilities/?language=javascript) instead. If true, the message reactions are displayed. Users can also react to messages if they have the necessary [channel capability](https://getstream.io/chat/docs/javascript/channel_capabilities/?language=javascript).
|
|
3287
3431
|
*/
|
|
3288
3432
|
this.areReactionsEnabled = undefined;
|
|
3289
3433
|
/**
|
|
3290
|
-
* @deprecated https://getstream.io/chat/docs/
|
|
3434
|
+
* @deprecated use [channel capabilities](https://getstream.io/chat/docs/javascript/channel_capabilities/?language=javascript) instead. The list of [actions that are enabled](./MessageActionsBoxComponent.mdx), please note that the user also has to have the necessary [channel capabilities](https://getstream.io/chat/docs/javascript/channel_capabilities/?language=javascript) for actions to work. Unathorized actions won't be displayed on the UI. The `MessgaeList` component makes the necessary checks before passing the actions to the `Message` component.
|
|
3291
3435
|
*/
|
|
3292
3436
|
/* eslint-disable-next-line @angular-eslint/no-input-rename */
|
|
3293
3437
|
this.enabledMessageActionsInput = undefined;
|
|
3438
|
+
/**
|
|
3439
|
+
* Determines if the message list should display channel messages or [thread messages](https://getstream.io/chat/docs/javascript/threads/?language=javascript).
|
|
3440
|
+
*/
|
|
3294
3441
|
this.mode = 'main';
|
|
3295
3442
|
this.enabledMessageActions = [];
|
|
3296
3443
|
this.class = 'str-chat-angular__main-panel-inner str-chat-angular__message-list-host';
|
|
@@ -3548,6 +3695,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.5", ngImpor
|
|
|
3548
3695
|
args: ['parentMessageElement']
|
|
3549
3696
|
}] } });
|
|
3550
3697
|
|
|
3698
|
+
/**
|
|
3699
|
+
* The `Thread` component represents a [message thread](https://getstream.io/chat/docs/javascript/threads/?language=javascript), it is a container component that displays a thread with a header, [`MessageList`](./MessageListComponent.mdx) and [`MessageInput`](./MessageInputComponent.mdx) components.
|
|
3700
|
+
*/
|
|
3551
3701
|
class ThreadComponent {
|
|
3552
3702
|
constructor(channelService) {
|
|
3553
3703
|
this.channelService = channelService;
|