stream-chat-angular 2.20.2 → 3.0.0-beta.10

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 (127) hide show
  1. package/README.md +44 -12
  2. package/assets/version.d.ts +1 -1
  3. package/bundles/stream-chat-angular.umd.js +780 -534
  4. package/bundles/stream-chat-angular.umd.js.map +1 -1
  5. package/esm2015/assets/version.js +2 -2
  6. package/esm2015/lib/attachment-list/attachment-list.component.js +27 -15
  7. package/esm2015/lib/attachment-preview-list/attachment-preview-list.component.js +28 -22
  8. package/esm2015/lib/attachment.service.js +11 -5
  9. package/esm2015/lib/avatar-placeholder/avatar-placeholder.component.js +41 -0
  10. package/esm2015/lib/channel-header/channel-header.component.js +26 -12
  11. package/esm2015/lib/channel-list/channel-list.component.js +23 -13
  12. package/esm2015/lib/channel-preview/channel-preview.component.js +3 -3
  13. package/esm2015/lib/channel.service.js +28 -35
  14. package/esm2015/lib/chat-client.service.js +5 -4
  15. package/esm2015/lib/custom-templates.service.js +139 -0
  16. package/esm2015/lib/icon-placeholder/icon-placeholder.component.js +34 -0
  17. package/esm2015/lib/loading-indicator-placeholder/loading-indicator-placeholder.component.js +42 -0
  18. package/esm2015/lib/message/message.component.js +74 -29
  19. package/esm2015/lib/message-actions-box/message-actions-box.component.js +114 -99
  20. package/esm2015/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.js +13 -13
  21. package/esm2015/lib/message-input/message-input-config.service.js +1 -1
  22. package/esm2015/lib/message-input/message-input.component.js +56 -45
  23. package/esm2015/lib/message-input/textarea.directive.js +2 -18
  24. package/esm2015/lib/message-input/textarea.interface.js +1 -1
  25. package/esm2015/lib/message-list/message-list.component.js +32 -93
  26. package/esm2015/lib/message-preview.js +4 -17
  27. package/esm2015/lib/message-reactions/message-reactions.component.js +3 -3
  28. package/esm2015/lib/modal/modal.component.js +9 -6
  29. package/esm2015/lib/notification/notification.component.js +5 -2
  30. package/esm2015/lib/notification-list/notification-list.component.js +12 -10
  31. package/esm2015/lib/read-by.js +1 -1
  32. package/esm2015/lib/stream-avatar.module.js +5 -4
  33. package/esm2015/lib/stream-chat.module.js +13 -3
  34. package/esm2015/lib/thread/thread.component.js +19 -11
  35. package/esm2015/lib/types.js +1 -1
  36. package/esm2015/public-api.js +5 -1
  37. package/fesm2015/stream-chat-angular.js +723 -449
  38. package/fesm2015/stream-chat-angular.js.map +1 -1
  39. package/lib/attachment-list/attachment-list.component.d.ts +12 -8
  40. package/lib/attachment-preview-list/attachment-preview-list.component.d.ts +17 -7
  41. package/lib/attachment.service.d.ts +1 -1
  42. package/lib/avatar-placeholder/avatar-placeholder.component.d.ts +25 -0
  43. package/lib/channel-header/channel-header.component.d.ts +15 -12
  44. package/lib/channel-list/channel-list.component.d.ts +14 -11
  45. package/lib/channel-preview/channel-preview.component.d.ts +3 -2
  46. package/lib/channel.service.d.ts +32 -31
  47. package/lib/chat-client.service.d.ts +12 -11
  48. package/lib/custom-templates.service.d.ts +132 -0
  49. package/lib/icon-placeholder/icon-placeholder.component.d.ts +22 -0
  50. package/lib/loading-indicator-placeholder/loading-indicator-placeholder.component.d.ts +21 -0
  51. package/lib/message/message.component.d.ts +42 -30
  52. package/lib/message-actions-box/message-actions-box.component.d.ts +22 -26
  53. package/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.d.ts +7 -11
  54. package/lib/message-input/message-input-config.service.d.ts +0 -19
  55. package/lib/message-input/message-input.component.d.ts +40 -26
  56. package/lib/message-input/textarea.directive.d.ts +3 -6
  57. package/lib/message-input/textarea.interface.d.ts +1 -4
  58. package/lib/message-list/group-styles.d.ts +1 -1
  59. package/lib/message-list/message-list.component.d.ts +10 -34
  60. package/lib/message-preview.d.ts +2 -1
  61. package/lib/message-reactions/message-reactions.component.d.ts +4 -5
  62. package/lib/modal/modal.component.d.ts +7 -3
  63. package/lib/notification/notification.component.d.ts +6 -1
  64. package/lib/notification-list/notification-list.component.d.ts +4 -2
  65. package/lib/read-by.d.ts +2 -1
  66. package/lib/stream-avatar.module.d.ts +4 -3
  67. package/lib/stream-chat.module.d.ts +6 -4
  68. package/lib/thread/thread.component.d.ts +6 -3
  69. package/lib/types.d.ts +115 -9
  70. package/package.json +2 -3
  71. package/public-api.d.ts +4 -0
  72. package/src/assets/styles/assets/EmojiOneColor.woff2 +0 -0
  73. package/src/assets/styles/assets/NotoColorEmoji-flags.woff2 +0 -0
  74. package/src/assets/styles/assets/Poweredby_100px-White_VertText.png +0 -0
  75. package/src/assets/styles/assets/str-chat__reaction-list-sprite@1x.png +0 -0
  76. package/src/assets/styles/assets/str-chat__reaction-list-sprite@2x.png +0 -0
  77. package/src/assets/styles/assets/str-chat__reaction-list-sprite@3x.png +0 -0
  78. package/src/assets/styles/css/index.css +1 -0
  79. package/src/assets/styles/css/index.css.map +1 -0
  80. package/src/assets/styles/scss/ActionsBox.scss +56 -0
  81. package/src/assets/styles/scss/Attachment.scss +227 -0
  82. package/src/assets/styles/scss/AttachmentActions.scss +44 -0
  83. package/src/assets/styles/scss/Audio.scss +112 -0
  84. package/src/assets/styles/scss/Avatar.scss +79 -0
  85. package/src/assets/styles/scss/Card.scss +100 -0
  86. package/src/assets/styles/scss/ChannelHeader.scss +284 -0
  87. package/src/assets/styles/scss/ChannelList.scss +117 -0
  88. package/src/assets/styles/scss/ChannelListMessenger.scss +9 -0
  89. package/src/assets/styles/scss/ChannelPreview.scss +108 -0
  90. package/src/assets/styles/scss/ChannelSearch.scss +111 -0
  91. package/src/assets/styles/scss/ChatDown.scss +15 -0
  92. package/src/assets/styles/scss/DateSeparator.scss +51 -0
  93. package/src/assets/styles/scss/EditMessageForm.scss +112 -0
  94. package/src/assets/styles/scss/EventComponent.scss +48 -0
  95. package/src/assets/styles/scss/Gallery.scss +135 -0
  96. package/src/assets/styles/scss/InfiniteScrollPaginator.scss +6 -0
  97. package/src/assets/styles/scss/LoadMoreButton.scss +44 -0
  98. package/src/assets/styles/scss/LoadingChannels.scss +70 -0
  99. package/src/assets/styles/scss/LoadingIndicator.scss +38 -0
  100. package/src/assets/styles/scss/Message.scss +1261 -0
  101. package/src/assets/styles/scss/MessageActions.scss +112 -0
  102. package/src/assets/styles/scss/MessageCommerce.scss +564 -0
  103. package/src/assets/styles/scss/MessageInput.scss +385 -0
  104. package/src/assets/styles/scss/MessageInputFlat.scss +305 -0
  105. package/src/assets/styles/scss/MessageList.scss +203 -0
  106. package/src/assets/styles/scss/MessageLivestream.scss +325 -0
  107. package/src/assets/styles/scss/MessageNotification.scss +49 -0
  108. package/src/assets/styles/scss/MessageRepliesCountButton.scss +33 -0
  109. package/src/assets/styles/scss/MessageTeam.scss +617 -0
  110. package/src/assets/styles/scss/Modal.scss +77 -0
  111. package/src/assets/styles/scss/ReactionList.scss +183 -0
  112. package/src/assets/styles/scss/ReactionSelector.scss +212 -0
  113. package/src/assets/styles/scss/SendButton.scss +14 -0
  114. package/src/assets/styles/scss/SimpleReactionsList.scss +76 -0
  115. package/src/assets/styles/scss/SmallMessageInput.scss +172 -0
  116. package/src/assets/styles/scss/Thread.scss +306 -0
  117. package/src/assets/styles/scss/Tooltip.scss +38 -0
  118. package/src/assets/styles/scss/TypingIndicator.scss +75 -0
  119. package/src/assets/styles/scss/VirtualMessage.scss +291 -0
  120. package/src/assets/styles/scss/_base.scss +206 -0
  121. package/src/assets/styles/scss/_variables.scss +158 -0
  122. package/src/assets/styles/scss/index.scss +50 -0
  123. package/src/assets/styles/scss/vendor/emoji-mart.scss +495 -0
  124. package/src/assets/styles/scss/vendor/mml-react.scss +1749 -0
  125. package/src/assets/styles/scss/vendor/react-file-utils.scss +378 -0
  126. package/src/assets/styles/scss/vendor/react-image-gallery.scss +224 -0
  127. package/src/assets/version.ts +1 -1
@@ -0,0 +1,132 @@
1
+ import { TemplateRef } from '@angular/core';
2
+ import { BehaviorSubject } from 'rxjs';
3
+ import { AttachmentListContext, AttachmentPreviewListContext, AvatarContext, ChannelActionsContext, ChannelPreviewContext, CommandAutocompleteListItemContext, EmojiPickerContext, IconContext, LoadingIndicatorContext, MentionAutcompleteListItemContext, MentionTemplateContext, MessageActionBoxItemContext, MessageActionsBoxContext, MessageContext, MessageInputContext, MessageReactionsContext, ModalContext, NotificationContext, ThreadHeaderContext, TypingIndicatorContext } from './types';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * A central location for registering your custom templates to override parts of the chat application.
7
+ *
8
+ * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
9
+ */
10
+ export declare class CustomTemplatesService {
11
+ /**
12
+ * The autocomplete list item template for mentioning users (used in the [`AutocompleteTextareaComponent`](../components/AutocompleteTextareaComponent.mdx))
13
+ */
14
+ mentionAutocompleteItemTemplate$: BehaviorSubject<TemplateRef<MentionAutcompleteListItemContext> | undefined>;
15
+ /**
16
+ * The autocomplete list item template for commands (used in the [`AutocompleteTextareaComponent`](../components/AutocompleteTextareaComponent.mdx))
17
+ *
18
+ * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
19
+ */
20
+ commandAutocompleteItemTemplate$: BehaviorSubject<TemplateRef<CommandAutocompleteListItemContext> | undefined>;
21
+ /**
22
+ * Template used to display an item in the [channel list](../components/ChannelListComponent.mdx) (instead of the default [channal list item](../components/ChannelPreviewComponent.mdx))
23
+ *
24
+ * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
25
+ */
26
+ channelPreviewTemplate$: BehaviorSubject<TemplateRef<ChannelPreviewContext<import("./types").DefaultStreamChatGenerics>> | undefined>;
27
+ /**
28
+ * The message input template used when editing a message (instead of the [default message input](../components/MessageInputComponent.mdx))
29
+ *
30
+ * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
31
+ */
32
+ messageInputTemplate$: BehaviorSubject<TemplateRef<MessageInputContext> | undefined>;
33
+ /**
34
+ * The template used for displaying a [mention inside a message](../code-examples/mention-actions.mdx)
35
+ *
36
+ * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
37
+ */
38
+ mentionTemplate$: BehaviorSubject<TemplateRef<MentionTemplateContext> | undefined>;
39
+ /**
40
+ * The template for [emoji picker](../code-examples/emoji-picker.mdx)
41
+ *
42
+ * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
43
+ */
44
+ emojiPickerTemplate$: BehaviorSubject<TemplateRef<EmojiPickerContext> | undefined>;
45
+ /**
46
+ * The typing indicator template used in the [message list](../components/MessageListComponent.mdx)
47
+ *
48
+ * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
49
+ */
50
+ typingIndicatorTemplate$: BehaviorSubject<TemplateRef<TypingIndicatorContext> | undefined>;
51
+ /**
52
+ * The template used to display a message in the [message list](../components/MessageListComponent.mdx) (instead of the [default message component](../components/MessageComponent.mdx))
53
+ *
54
+ * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
55
+ */
56
+ messageTemplate$: BehaviorSubject<TemplateRef<MessageContext> | undefined>;
57
+ /**
58
+ * The template for channel actions displayed in the [channel header](../components/ChannelHeaderComponent.mdx) (by default no channel action is displayed)
59
+ *
60
+ * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
61
+ */
62
+ channelActionsTemplate$: BehaviorSubject<TemplateRef<ChannelActionsContext<import("./types").DefaultStreamChatGenerics>> | undefined>;
63
+ /**
64
+ * The template used to display attachments of a [message](../components/MessageComponent.mdx) (instead of the [default attachment list](../components/AttachmentListComponent.mdx))
65
+ *
66
+ * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
67
+ */
68
+ attachmentListTemplate$: BehaviorSubject<TemplateRef<AttachmentListContext> | undefined>;
69
+ /**
70
+ * The template used to display attachments in the [message input](../components/MessageInputComponent.mdx) component (instead of the [default attachment preview](../components/AttachmentPreviewListComponent.mdx))
71
+ *
72
+ * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
73
+ */
74
+ attachmentPreviewListTemplate$: BehaviorSubject<TemplateRef<AttachmentPreviewListContext> | undefined>;
75
+ /**
76
+ * The template used to display avatars for channels and users (instead of the [default avatar](../components/AvatarComponent.mdx))
77
+ *
78
+ * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
79
+ */
80
+ avatarTemplate$: BehaviorSubject<TemplateRef<AvatarContext> | undefined>;
81
+ /**
82
+ * Template for displaying icons (instead of the [default icon component](../components/IconComponent.mdx))
83
+ *
84
+ * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
85
+ */
86
+ iconTemplate$: BehaviorSubject<TemplateRef<IconContext> | undefined>;
87
+ /**
88
+ * Template for displaying the loading indicator (instead of the [default loading indicator](../components/LoadingIndicatorComponent.mdx))
89
+ *
90
+ * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
91
+ */
92
+ loadingIndicatorTemplate$: BehaviorSubject<TemplateRef<LoadingIndicatorContext> | undefined>;
93
+ /**
94
+ * Template for displaying the message actions box (instead of the [default message actions box](../components/MessageActionsBoxComponent.mdx))
95
+ *
96
+ * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
97
+ */
98
+ messageActionsBoxTemplate$: BehaviorSubject<TemplateRef<MessageActionsBoxContext> | undefined>;
99
+ /**
100
+ * The template used for displaying an item in the [message actions box](../components/MessageActionsBoxComponent.mdx)
101
+ *
102
+ * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
103
+ */
104
+ messageActionsBoxItemTemplate$: BehaviorSubject<TemplateRef<MessageActionBoxItemContext> | undefined>;
105
+ /**
106
+ * The template used to display the reactions of a [message](../components/MessageComponent.mdx), and the selector to add a reaction to a message (instead of the [default message reactions component](../components/MessageReactionsComponent.mdx))
107
+ *
108
+ * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
109
+ */
110
+ messageReactionsTemplate$: BehaviorSubject<TemplateRef<MessageReactionsContext> | undefined>;
111
+ /**
112
+ * The template used to display a modal window (instead of the [default modal](../components/ModalComponent.mdx))
113
+ *
114
+ * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
115
+ */
116
+ modalTemplate$: BehaviorSubject<TemplateRef<ModalContext> | undefined>;
117
+ /**
118
+ * The template used to override the [default notification component](../components/NotificationComponent.mdx)
119
+ *
120
+ * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
121
+ */
122
+ notificationTemplate$: BehaviorSubject<TemplateRef<NotificationContext> | undefined>;
123
+ /**
124
+ * The template used for header of a [thread](../components/ThreadComponent.mdx)
125
+ *
126
+ * For code examples to the different customizations see our [customizations example application](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example), specifically the [AppComponent](https://github.com/GetStream/stream-chat-angular/tree/master/projects/customizations-example/src/app) (see [README](https://github.com/GetStream/stream-chat-angular/blob/master/README.md#customization-examples) for instructions on how to start the application).
127
+ */
128
+ threadHeaderTemplate$: BehaviorSubject<TemplateRef<ThreadHeaderContext> | undefined>;
129
+ constructor();
130
+ static ɵfac: i0.ɵɵFactoryDeclaration<CustomTemplatesService, never>;
131
+ static ɵprov: i0.ɵɵInjectableDeclaration<CustomTemplatesService>;
132
+ }
@@ -0,0 +1,22 @@
1
+ import { CustomTemplatesService } from '../custom-templates.service';
2
+ import { Icon } from '../icon/icon.component';
3
+ import { IconContext } from '../types';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * The `IconPlaceholder` component displays the [default icons](./IconComponent.mdx) unless a [custom template](../services/CustomTemplatesService.mdx) is provided. This componet is used by the SDK internally, you likely won't need to use it.
7
+ */
8
+ export declare class IconPlaceholderComponent {
9
+ customTemplatesService: CustomTemplatesService;
10
+ /**
11
+ * The icon to display, the list of [supported icons](https://github.com/GetStream/stream-chat-angular/tree/master/projects/stream-chat-angular/src/lib/icon/icon.component.ts) can be found on GitHub.
12
+ */
13
+ icon: Icon | undefined;
14
+ /**
15
+ * The size of the icon (in pixels)
16
+ */
17
+ size: number | undefined;
18
+ constructor(customTemplatesService: CustomTemplatesService);
19
+ getIconContext(): IconContext;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<IconPlaceholderComponent, never>;
21
+ static ɵcmp: i0.ɵɵComponentDeclaration<IconPlaceholderComponent, "stream-icon-placeholder", never, { "icon": "icon"; "size": "size"; }, {}, never, never>;
22
+ }
@@ -0,0 +1,21 @@
1
+ import { CustomTemplatesService } from '../custom-templates.service';
2
+ import { LoadingIndicatorContext } from '../types';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * The `LoadingInficatorPlaceholder` component displays the [default loading indicator](./LoadingIndicatorComponent.mdx) unless a [custom template](../services/CustomTemplatesService.mdx) is provided. This componet is used by the SDK internally, you likely won't need to use it.
6
+ */
7
+ export declare class LoadingIndicatorPlaceholderComponent {
8
+ customTemplatesService: CustomTemplatesService;
9
+ /**
10
+ * The size of the indicator (in pixels)
11
+ */
12
+ size: number;
13
+ /**
14
+ * The color of the indicator
15
+ */
16
+ color: string;
17
+ constructor(customTemplatesService: CustomTemplatesService);
18
+ getLoadingIndicatorContext(): LoadingIndicatorContext;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<LoadingIndicatorPlaceholderComponent, never>;
20
+ static ɵcmp: i0.ɵɵComponentDeclaration<LoadingIndicatorPlaceholderComponent, "stream-loading-indicator-placeholder", never, { "size": "size"; "color": "color"; }, {}, never, never>;
21
+ }
@@ -1,8 +1,9 @@
1
- import { TemplateRef, OnChanges, SimpleChanges } from '@angular/core';
1
+ import { TemplateRef, OnChanges, SimpleChanges, OnDestroy, OnInit, ChangeDetectorRef } 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
- import { DefaultUserType, StreamMessage } from '../types';
5
+ import { AttachmentListContext, MentionTemplateContext, MessageActionsBoxContext, MessageReactionsContext, DefaultStreamChatGenerics, StreamMessage } from '../types';
6
+ import { CustomTemplatesService } from '../custom-templates.service';
6
7
  import * as i0 from "@angular/core";
7
8
  declare type MessagePart = {
8
9
  content: string;
@@ -12,17 +13,11 @@ declare type MessagePart = {
12
13
  /**
13
14
  * 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).
14
15
  */
15
- export declare class MessageComponent implements OnChanges {
16
+ export declare class MessageComponent implements OnInit, OnChanges, OnDestroy {
16
17
  private chatClientService;
17
18
  private channelService;
18
- /**
19
- * The input used for message edit. By default, the [default message input component](./MessageInputComponent.mdx) is used. To change the input for message edit, provide [your own custom template](./MessageInputComponent.mdx/#customization).
20
- */
21
- messageInputTemplate: TemplateRef<any> | undefined;
22
- /**
23
- * The template used to display a mention in a message. It receives the mentioned user in a variable called `user` with the type [`UserResponse`](https://github.com/GetStream/stream-chat-js/blob/master/src/types.ts). You can provide your own template if you want to [add actions to mentions](../code-examples/mention-actions.mdx).
24
- */
25
- mentionTemplate: TemplateRef<any> | undefined;
19
+ private customTemplatesService;
20
+ private cdRef;
26
21
  /**
27
22
  * The message to be displayed
28
23
  */
@@ -31,42 +26,36 @@ export declare class MessageComponent implements OnChanges {
31
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. The [`MessageList`](./MessageListComponent.mdx) component automatically sets this based on [channel capabilities](https://getstream.io/chat/docs/javascript/channel_capabilities/?language=javascript).
32
27
  */
33
28
  enabledMessageActions: string[];
34
- /**
35
- * If true, the message reactions are displayed. If you use the default chat UI you can also set this using the [`MessageList`](./MessageListComponent.mdx) component.
36
- * @deprecated use [channel capabilities](https://getstream.io/chat/docs/javascript/channel_capabilities/?language=javascript) instead
37
- */
38
- areReactionsEnabled: boolean | undefined;
39
- /**
40
- * If true, the user can add reactions to the message. The [`MessageList`](./MessageListComponent.mdx) component automatically sets this based on [channel capability](https://getstream.io/chat/docs/javascript/channel_capabilities/?language=javascript).
41
- * @deprecated use [channel capabilities](https://getstream.io/chat/docs/javascript/channel_capabilities/?language=javascript) instead
42
- */
43
- canReactToMessage: boolean | undefined;
44
29
  /**
45
30
  * If `true`, the message status (sending, sent, who read the message) is displayed.
46
31
  */
47
32
  isLastSentMessage: boolean | undefined;
48
- /**
49
- * If true, the read indicator is displayed. The [`MessageList`](./MessageListComponent.mdx) component automatically sets this based on [channel capability](https://getstream.io/chat/docs/javascript/channel_capabilities/?language=javascript).
50
- * @deprecated use [channel capabilities](https://getstream.io/chat/docs/javascript/channel_capabilities/?language=javascript) instead
51
- */
52
- canReceiveReadEvents: boolean | undefined;
53
33
  /**
54
34
  * Determines if the message is being dispalyed in a channel or in a [thread](https://getstream.io/chat/docs/javascript/threads/?language=javascript).
55
35
  */
56
36
  mode: 'thread' | 'main';
37
+ canReceiveReadEvents: boolean | undefined;
38
+ canReactToMessage: boolean | undefined;
57
39
  isEditing: boolean | undefined;
58
40
  isActionBoxOpen: boolean;
59
41
  isReactionSelectorOpen: boolean;
60
42
  isPressedOnMobile: boolean;
61
43
  visibleMessageActionsCount: number;
62
44
  messageTextParts: MessagePart[];
45
+ mentionTemplate: TemplateRef<MentionTemplateContext> | undefined;
46
+ attachmentListTemplate: TemplateRef<AttachmentListContext> | undefined;
47
+ messageActionsBoxTemplate: TemplateRef<MessageActionsBoxContext> | undefined;
48
+ messageReactionsTemplate: TemplateRef<MessageReactionsContext> | undefined;
63
49
  private user;
50
+ private subscriptions;
64
51
  private container;
65
- constructor(chatClientService: ChatClientService, channelService: ChannelService);
52
+ constructor(chatClientService: ChatClientService, channelService: ChannelService, customTemplatesService: CustomTemplatesService, cdRef: ChangeDetectorRef);
53
+ ngOnInit(): void;
66
54
  ngOnChanges(changes: SimpleChanges): void;
55
+ ngOnDestroy(): void;
67
56
  get isSentByCurrentUser(): boolean;
68
57
  get readByText(): string;
69
- get lastReadUser(): UserResponse<DefaultUserType<import("../types").DefaultUserTypeInternal>> | undefined;
58
+ get lastReadUser(): UserResponse<DefaultStreamChatGenerics> | undefined;
70
59
  get isOnlyReadByMe(): boolean | undefined;
71
60
  get isReadByMultipleUsers(): boolean | undefined;
72
61
  get isMessageDeliveredAndRead(): boolean | undefined;
@@ -78,12 +67,35 @@ export declare class MessageComponent implements OnChanges {
78
67
  replyCount: number | undefined;
79
68
  };
80
69
  get canDisplayReadStatus(): boolean;
81
- get quotedMessageAttachments(): import("stream-chat").Attachment<import("../types").DefaultAttachmentType>[];
70
+ get quotedMessageAttachments(): import("stream-chat").Attachment<{
71
+ attachmentType: import("stream-chat").UR & import("../types").UnknownType & {
72
+ asset_url?: string | undefined;
73
+ id?: string | undefined;
74
+ images?: import("stream-chat").Attachment<DefaultStreamChatGenerics>[] | undefined;
75
+ mime_type?: string | undefined;
76
+ };
77
+ channelType: import("stream-chat").UR & import("../types").UnknownType & {
78
+ image?: string | undefined;
79
+ member_count?: number | undefined;
80
+ subtitle?: string | undefined;
81
+ };
82
+ commandType: string & {};
83
+ eventType: import("stream-chat").UR & import("../types").UnknownType;
84
+ messageType: {};
85
+ reactionType: import("stream-chat").UR & import("../types").UnknownType;
86
+ userType: import("stream-chat").UR & import("../types").UnknownType & import("../types").DefaultUserTypeInternal & {
87
+ mutes?: import("stream-chat").Mute<DefaultStreamChatGenerics>[] | undefined;
88
+ };
89
+ }>[];
90
+ getAttachmentListContext(): AttachmentListContext;
91
+ getMessageReactionsContext(): MessageReactionsContext;
82
92
  resendMessage(): void;
83
93
  textClicked(): void;
84
94
  setAsActiveParentMessage(): void;
95
+ getMentionContext(messagePart: MessagePart): MentionTemplateContext;
96
+ getMessageActionsBoxContext(): MessageActionsBoxContext;
85
97
  private createMessageParts;
86
98
  static ɵfac: i0.ɵɵFactoryDeclaration<MessageComponent, never>;
87
- static ɵcmp: i0.ɵɵComponentDeclaration<MessageComponent, "stream-message", never, { "messageInputTemplate": "messageInputTemplate"; "mentionTemplate": "mentionTemplate"; "message": "message"; "enabledMessageActions": "enabledMessageActions"; "areReactionsEnabled": "areReactionsEnabled"; "canReactToMessage": "canReactToMessage"; "isLastSentMessage": "isLastSentMessage"; "canReceiveReadEvents": "canReceiveReadEvents"; "mode": "mode"; }, {}, never, never>;
99
+ static ɵcmp: i0.ɵɵComponentDeclaration<MessageComponent, "stream-message", never, { "message": "message"; "enabledMessageActions": "enabledMessageActions"; "isLastSentMessage": "isLastSentMessage"; "mode": "mode"; }, {}, never, never>;
88
100
  }
89
101
  export {};
@@ -1,24 +1,19 @@
1
- import { EventEmitter, OnChanges, SimpleChanges, TemplateRef } from '@angular/core';
1
+ import { EventEmitter, OnChanges, OnDestroy, SimpleChanges, TemplateRef } from '@angular/core';
2
+ import { Observable, Subscription } from 'rxjs';
2
3
  import { ChannelService } from '../channel.service';
3
4
  import { ChatClientService } from '../chat-client.service';
5
+ import { CustomTemplatesService } from '../custom-templates.service';
4
6
  import { NotificationService } from '../notification.service';
5
- import { StreamMessage } from '../types';
7
+ import { MessageActionBoxItemContext, MessageActionItem, MessageInputContext, ModalContext, StreamMessage } from '../types';
6
8
  import * as i0 from "@angular/core";
7
- /**
8
- * @deprecated https://getstream.io/chat/docs/sdk/angular/components/message-actions/#required-enabledactions
9
- */
10
- export declare type MessageActions = 'edit' | 'delete' | 'edit-any' | 'delete-any' | 'pin' | 'quote' | 'flag' | 'mute';
11
9
  /**
12
10
  * 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.
13
11
  */
14
- export declare class MessageActionsBoxComponent implements OnChanges {
12
+ export declare class MessageActionsBoxComponent implements OnChanges, OnDestroy {
15
13
  private chatClientService;
16
14
  private notificationService;
17
15
  private channelService;
18
- /**
19
- * The input used for message edit. By default, the [default message input component](./MessageInputComponent.mdx) is used. To change the input for message edit, provide [your own custom template](./MessageInputComponent.mdx/#customization).
20
- */
21
- messageInputTemplate: TemplateRef<any> | undefined;
16
+ private customTemplatesService;
22
17
  /**
23
18
  * 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.
24
19
  */
@@ -44,23 +39,24 @@ export declare class MessageActionsBoxComponent implements OnChanges {
44
39
  */
45
40
  readonly isEditing: EventEmitter<boolean>;
46
41
  isEditModalOpen: boolean;
47
- private messageInput;
48
- constructor(chatClientService: ChatClientService, notificationService: NotificationService, channelService: ChannelService);
42
+ messageInputTemplate: TemplateRef<MessageInputContext> | undefined;
43
+ messageActionItemTemplate: TemplateRef<MessageActionBoxItemContext> | undefined;
44
+ modalTemplate: TemplateRef<ModalContext> | undefined;
45
+ subscriptions: Subscription[];
46
+ visibleMessageActionItems: MessageActionItem[];
47
+ sendMessage$: Observable<void>;
48
+ private readonly messageActionItems;
49
+ private modalContent;
50
+ private sendMessageSubject;
51
+ constructor(chatClientService: ChatClientService, notificationService: NotificationService, channelService: ChannelService, customTemplatesService: CustomTemplatesService);
49
52
  ngOnChanges(changes: SimpleChanges): void;
50
- get isQuoteVisible(): boolean;
51
- get isEditVisible(): boolean;
52
- get isDeleteVisible(): boolean;
53
- get isMuteVisible(): boolean;
54
- get isFlagVisible(): boolean;
55
- get isPinVisible(): boolean;
56
- pinClicked(): void;
57
- flagClicked(): Promise<void>;
58
- muteClicked(): void;
59
- quoteClicked(): void;
60
- editClicked(): void;
53
+ ngOnDestroy(): void;
54
+ getActionLabel(actionLabelOrTranslationKey: (() => string) | string): string;
61
55
  sendClicked(): void;
62
56
  modalClosed: () => void;
63
- deleteClicked(): Promise<void>;
57
+ getMessageInputContext(): MessageInputContext;
58
+ getEditModalContext(): ModalContext;
59
+ trackByActionName(_: number, item: MessageActionItem): "delete" | "flag" | "quote" | "pin" | "edit";
64
60
  static ɵfac: i0.ɵɵFactoryDeclaration<MessageActionsBoxComponent, never>;
65
- static ɵcmp: i0.ɵɵComponentDeclaration<MessageActionsBoxComponent, "stream-message-actions-box", never, { "messageInputTemplate": "messageInputTemplate"; "isOpen": "isOpen"; "isMine": "isMine"; "message": "message"; "enabledActions": "enabledActions"; }, { "displayedActionsCount": "displayedActionsCount"; "isEditing": "isEditing"; }, never, never>;
61
+ static ɵcmp: i0.ɵɵComponentDeclaration<MessageActionsBoxComponent, "stream-message-actions-box", never, { "isOpen": "isOpen"; "isMine": "isMine"; "message": "message"; "enabledActions": "enabledActions"; }, { "displayedActionsCount": "displayedActionsCount"; "isEditing": "isEditing"; }, never, never>;
66
62
  }
@@ -7,6 +7,7 @@ import { TextareaInterface } from '../textarea.interface';
7
7
  import { ChatClientService } from '../../chat-client.service';
8
8
  import { TransliterationService } from '../../transliteration.service';
9
9
  import { EmojiInputService } from '../emoji-input.service';
10
+ import { CustomTemplatesService } from '../../custom-templates.service';
10
11
  import * as i0 from "@angular/core";
11
12
  /**
12
13
  * The `AutocompleteTextarea` component is used by the [`MessageInput`](./MessageInputComponent.mdx) component to display the input HTML element where users can type their message.
@@ -16,6 +17,7 @@ export declare class AutocompleteTextareaComponent implements TextareaInterface,
16
17
  private chatClientService;
17
18
  private transliterationService;
18
19
  private emojiInputService;
20
+ private customTemplatesService;
19
21
  class: string;
20
22
  /**
21
23
  * The value of the input HTML element.
@@ -25,14 +27,6 @@ export declare class AutocompleteTextareaComponent implements TextareaInterface,
25
27
  * If true, users can mention other users in messages. You can also set this input on the [`MessageInput`](./MessageInputComponent.mdx/#inputs-and-outputs) component.
26
28
  */
27
29
  areMentionsEnabled: boolean | undefined;
28
- /**
29
- * You can provide your own template for the autocomplete list for user mentions. You can also set this input on the [`MessageInput`](./MessageInputComponent.mdx/#inputs-and-outputs) component.
30
- */
31
- mentionAutocompleteItemTemplate: TemplateRef<MentionAutcompleteListItemContext> | undefined;
32
- /**
33
- * You can provide your own template for the autocomplete list for commands. You can also set this input on the [`MessageInput`](./MessageInputComponent.mdx/#inputs-and-outputs) component.
34
- */
35
- commandAutocompleteItemTemplate: TemplateRef<CommandAutocompleteListItemContext> | undefined;
36
30
  /**
37
31
  * 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.
38
32
  */
@@ -48,7 +42,9 @@ export declare class AutocompleteTextareaComponent implements TextareaInterface,
48
42
  /**
49
43
  * 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.
50
44
  */
51
- readonly userMentions: EventEmitter<UserResponse<import("stream-chat").UR>[]>;
45
+ readonly userMentions: EventEmitter<UserResponse<import("stream-chat").DefaultGenerics>[]>;
46
+ mentionAutocompleteItemTemplate: TemplateRef<MentionAutcompleteListItemContext> | undefined;
47
+ commandAutocompleteItemTemplate: TemplateRef<CommandAutocompleteListItemContext> | undefined;
52
48
  private readonly autocompleteKey;
53
49
  private readonly mentionTriggerChar;
54
50
  private readonly commandTriggerChar;
@@ -59,7 +55,7 @@ export declare class AutocompleteTextareaComponent implements TextareaInterface,
59
55
  private userMentionConfig;
60
56
  private slashCommandConfig;
61
57
  private searchTerm$;
62
- constructor(channelService: ChannelService, chatClientService: ChatClientService, transliterationService: TransliterationService, emojiInputService: EmojiInputService);
58
+ constructor(channelService: ChannelService, chatClientService: ChatClientService, transliterationService: TransliterationService, emojiInputService: EmojiInputService, customTemplatesService: CustomTemplatesService);
63
59
  ngOnChanges(changes: SimpleChanges): void;
64
60
  filter(searchString: string, items: {
65
61
  autocompleteLabel: string;
@@ -75,5 +71,5 @@ export declare class AutocompleteTextareaComponent implements TextareaInterface,
75
71
  private updateMentionOptions;
76
72
  private updateMentionedUsersFromText;
77
73
  static ɵfac: i0.ɵɵFactoryDeclaration<AutocompleteTextareaComponent, never>;
78
- static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteTextareaComponent, "stream-autocomplete-textarea", never, { "value": "value"; "areMentionsEnabled": "areMentionsEnabled"; "mentionAutocompleteItemTemplate": "mentionAutocompleteItemTemplate"; "commandAutocompleteItemTemplate": "commandAutocompleteItemTemplate"; "mentionScope": "mentionScope"; }, { "valueChange": "valueChange"; "send": "send"; "userMentions": "userMentions"; }, never, never>;
74
+ static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteTextareaComponent, "stream-autocomplete-textarea", never, { "value": "value"; "areMentionsEnabled": "areMentionsEnabled"; "mentionScope": "mentionScope"; }, { "valueChange": "valueChange"; "send": "send"; "userMentions": "userMentions"; }, never, never>;
79
75
  }
@@ -1,5 +1,3 @@
1
- import { TemplateRef } from '@angular/core';
2
- import { CommandAutocompleteListItemContext, MentionAutcompleteListItemContext } from '../types';
3
1
  import * as i0 from "@angular/core";
4
2
  /**
5
3
  * 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.
@@ -13,23 +11,6 @@ export declare class MessageInputConfigService {
13
11
  * If true, users can mention other users in messages. You also [need to use the `AutocompleteTextarea`](../concepts/opt-in-architecture.mdx) for this feature to work.
14
12
  */
15
13
  areMentionsEnabled: boolean | undefined;
16
- /**
17
- * You can provide your own template for the autocomplete list for user mentions. You also [need to use the `AutocompleteTextarea`](../concepts/opt-in-architecture.mdx) for this feature to work.
18
- */
19
- mentionAutocompleteItemTemplate: TemplateRef<MentionAutcompleteListItemContext> | undefined;
20
- /**
21
- * You can provide your own template for the autocomplete list for commands. You also [need to use the `AutocompleteTextarea`](../concepts/opt-in-architecture.mdx) for this feature to work.
22
- */
23
- commandAutocompleteItemTemplate: TemplateRef<CommandAutocompleteListItemContext> | undefined;
24
- /**
25
- * You can add an emoji picker by [providing your own emoji picker template](../code-examples/emoji-picker.mdx)
26
- */
27
- emojiPickerTemplate: TemplateRef<void> | undefined;
28
- /**
29
- * You can narrow the accepted file types by providing the [accepted types](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept). By default every file type is accepted.
30
- * @deprecated use [application settings](https://getstream.io/chat/docs/javascript/app_setting_overview/?language=javascript#file-uploads) instead
31
- */
32
- acceptedFileTypes: string[] | undefined;
33
14
  /**
34
15
  * If `false`, users can only upload one attachment per message
35
16
  */
@@ -1,19 +1,20 @@
1
- import { AfterViewInit, ChangeDetectorRef, ComponentFactoryResolver, ComponentRef, EventEmitter, OnChanges, OnDestroy, SimpleChanges, TemplateRef, Type } from '@angular/core';
1
+ import { AfterViewInit, ChangeDetectorRef, ComponentFactoryResolver, ComponentRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef, Type } from '@angular/core';
2
2
  import { ChatClientService } from '../chat-client.service';
3
3
  import { Observable, Subject } from 'rxjs';
4
4
  import { UserResponse } from 'stream-chat';
5
5
  import { AttachmentService } from '../attachment.service';
6
6
  import { ChannelService } from '../channel.service';
7
7
  import { NotificationService } from '../notification.service';
8
- import { AttachmentUpload, CommandAutocompleteListItemContext, MentionAutcompleteListItemContext, StreamMessage } from '../types';
8
+ import { AttachmentPreviewListContext, AttachmentUpload, DefaultStreamChatGenerics, EmojiPickerContext, StreamMessage } from '../types';
9
9
  import { MessageInputConfigService } from './message-input-config.service';
10
10
  import { TextareaInterface } from './textarea.interface';
11
11
  import { EmojiInputService } from './emoji-input.service';
12
+ import { CustomTemplatesService } from '../custom-templates.service';
12
13
  import * as i0 from "@angular/core";
13
14
  /**
14
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).
15
16
  */
16
- export declare class MessageInputComponent implements OnChanges, OnDestroy, AfterViewInit {
17
+ export declare class MessageInputComponent implements OnInit, OnChanges, OnDestroy, AfterViewInit {
17
18
  private channelService;
18
19
  private notificationService;
19
20
  private attachmentService;
@@ -22,7 +23,8 @@ export declare class MessageInputComponent implements OnChanges, OnDestroy, Afte
22
23
  private componentFactoryResolver;
23
24
  private cdRef;
24
25
  private chatClient;
25
- emojiInputService: EmojiInputService;
26
+ private emojiInputService;
27
+ private customTemplatesService;
26
28
  /**
27
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).
28
30
  */
@@ -35,28 +37,10 @@ export declare class MessageInputComponent implements OnChanges, OnDestroy, Afte
35
37
  * The scope for user mentions, either members of the current channel of members of the application. If no value is provided, it is set from the [`MessageInputConfigService`](../services/MessageInputConfigService.mdx).
36
38
  */
37
39
  mentionScope: 'channel' | 'application' | undefined;
38
- /**
39
- * You can provide your own template for the autocomplete list for user mentions. You also [need to use the `AutocompleteTextarea`](../concepts/opt-in-architecture.mdx) for this feature to work. If no value is provided, it is set from the [`MessageInputConfigService`](../services/MessageInputConfigService.mdx).
40
- */
41
- mentionAutocompleteItemTemplate: TemplateRef<MentionAutcompleteListItemContext> | undefined;
42
- /**
43
- * You can provide your own template for the autocomplete list for commands. You also [need to use the `AutocompleteTextarea`](../concepts/opt-in-architecture.mdx) for this feature to work. If no value is provided, it is set from the [`MessageInputConfigService`](../services/MessageInputConfigService.mdx).
44
- */
45
- commandAutocompleteItemTemplate: TemplateRef<CommandAutocompleteListItemContext> | undefined;
46
- /**
47
- * You can add an emoji picker by [providing your own emoji picker template](../code-examples/emoji-picker.mdx)
48
- */
49
- emojiPickerTemplate: TemplateRef<void> | undefined;
50
40
  /**
51
41
  * Determines if the message is being dispalyed in a channel or in a [thread](https://getstream.io/chat/docs/javascript/threads/?language=javascript).
52
42
  */
53
43
  mode: 'thread' | 'main';
54
- /**
55
- * You can narrow the accepted file types by providing the [accepted types](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept). By default every file type is accepted.
56
- * If no value is provided, it is set from the [`MessageInputConfigService`](../services/MessageInputConfigService.mdx).
57
- * @deprecated use [application settings](https://getstream.io/chat/docs/javascript/app_setting_overview/?language=javascript#file-uploads) instead
58
- */
59
- acceptedFileTypes: string[] | undefined;
60
44
  /**
61
45
  * If true, users can select multiple files to upload. If no value is provided, it is set from the [`MessageInputConfigService`](../services/MessageInputConfigService.mdx).
62
46
  */
@@ -65,6 +49,10 @@ export declare class MessageInputComponent implements OnChanges, OnDestroy, Afte
65
49
  * The message to edit
66
50
  */
67
51
  message: StreamMessage | undefined;
52
+ /**
53
+ * An observable that can be used to trigger message sending from the outside
54
+ */
55
+ sendMessage$: Observable<void> | undefined;
68
56
  /**
69
57
  * Emits when a message was successfuly sent or updated
70
58
  */
@@ -80,6 +68,8 @@ export declare class MessageInputComponent implements OnChanges, OnDestroy, Afte
80
68
  typingStart$: Subject<void>;
81
69
  cooldown$: Observable<number> | undefined;
82
70
  isCooldownInProgress: boolean;
71
+ emojiPickerTemplate: TemplateRef<EmojiPickerContext> | undefined;
72
+ attachmentPreviewListTemplate: TemplateRef<AttachmentPreviewListContext> | undefined;
83
73
  private fileInput;
84
74
  private textareaAnchor;
85
75
  private subscriptions;
@@ -87,17 +77,41 @@ export declare class MessageInputComponent implements OnChanges, OnDestroy, Afte
87
77
  private isViewInited;
88
78
  private appSettings;
89
79
  private channel;
90
- constructor(channelService: ChannelService, notificationService: NotificationService, attachmentService: AttachmentService, configService: MessageInputConfigService, textareaType: Type<TextareaInterface>, componentFactoryResolver: ComponentFactoryResolver, cdRef: ChangeDetectorRef, chatClient: ChatClientService, emojiInputService: EmojiInputService);
80
+ private sendMessageSubcription;
81
+ constructor(channelService: ChannelService, notificationService: NotificationService, attachmentService: AttachmentService, configService: MessageInputConfigService, textareaType: Type<TextareaInterface>, componentFactoryResolver: ComponentFactoryResolver, cdRef: ChangeDetectorRef, chatClient: ChatClientService, emojiInputService: EmojiInputService, customTemplatesService: CustomTemplatesService);
82
+ ngOnInit(): void;
91
83
  ngAfterViewInit(): void;
92
84
  ngOnChanges(changes: SimpleChanges): void;
93
85
  ngOnDestroy(): void;
94
86
  messageSent(): Promise<void>;
95
87
  get containsLinks(): boolean;
96
- get accept(): string;
97
- get quotedMessageAttachments(): import("stream-chat").Attachment<import("../types").DefaultAttachmentType>[];
88
+ get quotedMessageAttachments(): import("stream-chat").Attachment<{
89
+ attachmentType: import("stream-chat").UR & import("../types").UnknownType & {
90
+ asset_url?: string | undefined;
91
+ id?: string | undefined;
92
+ images?: import("stream-chat").Attachment<DefaultStreamChatGenerics>[] | undefined;
93
+ mime_type?: string | undefined;
94
+ };
95
+ channelType: import("stream-chat").UR & import("../types").UnknownType & {
96
+ image?: string | undefined;
97
+ member_count?: number | undefined;
98
+ subtitle?: string | undefined;
99
+ };
100
+ commandType: string & {};
101
+ eventType: import("stream-chat").UR & import("../types").UnknownType;
102
+ messageType: {};
103
+ reactionType: import("stream-chat").UR & import("../types").UnknownType;
104
+ userType: import("stream-chat").UR & import("../types").UnknownType & import("../types").DefaultUserTypeInternal & {
105
+ mutes?: import("stream-chat").Mute<DefaultStreamChatGenerics>[] | undefined;
106
+ };
107
+ }>[];
98
108
  get disabledTextareaText(): "" | "streamChat.You can't send thread replies in this channel" | "streamChat.You can't send messages in this channel" | "streamChat.Slow Mode ON";
99
109
  filesSelected(fileList: FileList | null): Promise<void>;
100
110
  deselectMessageToQuote(): void;
111
+ getEmojiPickerContext(): EmojiPickerContext;
112
+ getAttachmentPreviewListContext(): AttachmentPreviewListContext;
113
+ private deleteUpload;
114
+ private retryUpload;
101
115
  private clearFileInput;
102
116
  private get isUpdate();
103
117
  private initTextarea;
@@ -107,5 +121,5 @@ export declare class MessageInputComponent implements OnChanges, OnDestroy, Afte
107
121
  private startCooldown;
108
122
  private stopCooldown;
109
123
  static ɵfac: i0.ɵɵFactoryDeclaration<MessageInputComponent, never>;
110
- static ɵcmp: i0.ɵɵComponentDeclaration<MessageInputComponent, "stream-message-input", never, { "isFileUploadEnabled": "isFileUploadEnabled"; "areMentionsEnabled": "areMentionsEnabled"; "mentionScope": "mentionScope"; "mentionAutocompleteItemTemplate": "mentionAutocompleteItemTemplate"; "commandAutocompleteItemTemplate": "commandAutocompleteItemTemplate"; "emojiPickerTemplate": "emojiPickerTemplate"; "mode": "mode"; "acceptedFileTypes": "acceptedFileTypes"; "isMultipleFileUploadEnabled": "isMultipleFileUploadEnabled"; "message": "message"; }, { "messageUpdate": "messageUpdate"; }, never, never>;
124
+ static ɵcmp: i0.ɵɵComponentDeclaration<MessageInputComponent, "stream-message-input", never, { "isFileUploadEnabled": "isFileUploadEnabled"; "areMentionsEnabled": "areMentionsEnabled"; "mentionScope": "mentionScope"; "mode": "mode"; "isMultipleFileUploadEnabled": "isMultipleFileUploadEnabled"; "message": "message"; "sendMessage$": "sendMessage$"; }, { "messageUpdate": "messageUpdate"; }, never, never>;
111
125
  }