stream-chat-angular 5.9.1 → 5.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/assets/version.d.ts +1 -1
  2. package/esm2020/assets/version.mjs +2 -2
  3. package/esm2020/lib/attachment.service.mjs +3 -3
  4. package/esm2020/lib/avatar-placeholder/avatar-placeholder.component.mjs +2 -2
  5. package/esm2020/lib/channel/channel.component.mjs +2 -2
  6. package/esm2020/lib/channel.service.mjs +4 -4
  7. package/esm2020/lib/chat-client.service.mjs +2 -2
  8. package/esm2020/lib/custom-templates.service.mjs +44 -44
  9. package/esm2020/lib/icon/icon-placeholder/icon-placeholder.component.mjs +2 -2
  10. package/esm2020/lib/icon/loading-indicator-placeholder/loading-indicator-placeholder.component.mjs +2 -2
  11. package/esm2020/lib/message/message.component.mjs +3 -3
  12. package/esm2020/lib/message-actions-box/message-actions-box.component.mjs +3 -3
  13. package/esm2020/lib/message-actions.service.mjs +2 -2
  14. package/esm2020/lib/message-bounce-prompt/message-bounce-prompt.component.mjs +2 -2
  15. package/esm2020/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.mjs +86 -33
  16. package/esm2020/lib/message-input/emoji-input.service.mjs +3 -3
  17. package/esm2020/lib/message-input/message-input-config.service.mjs +10 -3
  18. package/esm2020/lib/message-input/message-input.component.mjs +2 -2
  19. package/esm2020/lib/message-input/textarea/textarea.component.mjs +2 -2
  20. package/esm2020/lib/message-reactions/message-reactions.component.mjs +3 -3
  21. package/esm2020/lib/message-reactions-selector/message-reactions-selector.component.mjs +3 -3
  22. package/esm2020/lib/message-reactions.service.mjs +2 -2
  23. package/esm2020/lib/notification/notification.component.mjs +2 -2
  24. package/esm2020/lib/notification.service.mjs +2 -2
  25. package/esm2020/lib/stream-i18n.service.mjs +2 -2
  26. package/esm2020/lib/theme.service.mjs +2 -2
  27. package/esm2020/lib/thread/thread.component.mjs +2 -2
  28. package/esm2020/lib/types.mjs +1 -1
  29. package/fesm2015/stream-chat-angular.mjs +164 -107
  30. package/fesm2015/stream-chat-angular.mjs.map +1 -1
  31. package/fesm2020/stream-chat-angular.mjs +162 -104
  32. package/fesm2020/stream-chat-angular.mjs.map +1 -1
  33. package/lib/attachment.service.d.ts +3 -3
  34. package/lib/avatar-placeholder/avatar-placeholder.component.d.ts +1 -1
  35. package/lib/channel/channel.component.d.ts +1 -1
  36. package/lib/channel.service.d.ts +15 -15
  37. package/lib/chat-client.service.d.ts +3 -3
  38. package/lib/custom-templates.service.d.ts +43 -43
  39. package/lib/icon/icon-placeholder/icon-placeholder.component.d.ts +1 -1
  40. package/lib/icon/loading-indicator-placeholder/loading-indicator-placeholder.component.d.ts +1 -1
  41. package/lib/message/message.component.d.ts +2 -2
  42. package/lib/message-actions-box/message-actions-box.component.d.ts +2 -2
  43. package/lib/message-actions.service.d.ts +2 -2
  44. package/lib/message-bounce-prompt/message-bounce-prompt.component.d.ts +1 -1
  45. package/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.d.ts +8 -5
  46. package/lib/message-input/emoji-input.service.d.ts +2 -2
  47. package/lib/message-input/message-input-config.service.d.ts +11 -3
  48. package/lib/message-input/message-input.component.d.ts +6 -6
  49. package/lib/message-input/textarea/textarea.component.d.ts +2 -2
  50. package/lib/message-reactions/message-reactions.component.d.ts +2 -2
  51. package/lib/message-reactions-selector/message-reactions-selector.component.d.ts +2 -2
  52. package/lib/message-reactions.service.d.ts +2 -2
  53. package/lib/notification/notification.component.d.ts +1 -1
  54. package/lib/notification.service.d.ts +1 -1
  55. package/lib/stream-i18n.service.d.ts +1 -1
  56. package/lib/theme.service.d.ts +1 -1
  57. package/lib/thread/thread.component.d.ts +1 -1
  58. package/lib/types.d.ts +39 -0
  59. package/package.json +1 -1
  60. package/src/assets/version.ts +1 -1
@@ -8,9 +8,10 @@ import { ChatClientService } from '../../chat-client.service';
8
8
  import { TransliterationService } from '../../transliteration.service';
9
9
  import { EmojiInputService } from '../emoji-input.service';
10
10
  import { CustomTemplatesService } from '../../custom-templates.service';
11
+ import { MessageInputConfigService } from '../message-input-config.service';
11
12
  import * as i0 from "@angular/core";
12
13
  /**
13
- * The `AutocompleteTextarea` component is used by the [`MessageInput`](./MessageInputComponent.mdx) component to display the input HTML element where users can type their message.
14
+ * The `AutocompleteTextarea` component is used by the [`MessageInput`](/chat/docs/sdk/angular/components/MessageInputComponent/) component to display the input HTML element where users can type their message.
14
15
  */
15
16
  export declare class AutocompleteTextareaComponent implements TextareaInterface, OnChanges, AfterViewInit {
16
17
  private channelService;
@@ -19,6 +20,7 @@ export declare class AutocompleteTextareaComponent implements TextareaInterface,
19
20
  private emojiInputService;
20
21
  private customTemplatesService;
21
22
  private cdRef;
23
+ private messageInputConfigService;
22
24
  class: string;
23
25
  /**
24
26
  * The value of the input HTML element.
@@ -29,15 +31,15 @@ export declare class AutocompleteTextareaComponent implements TextareaInterface,
29
31
  */
30
32
  placeholder: string;
31
33
  /**
32
- * If true, users can mention other users in messages. You can also set this input on the [`MessageInput`](./MessageInputComponent.mdx/#inputs-and-outputs) component.
34
+ * If true, users can mention other users in messages. You can also set this input on the [`MessageInput`](/chat/docs/sdk/angular/components/MessageInputComponent/#inputs-and-outputs/) component.
33
35
  */
34
36
  areMentionsEnabled: boolean | undefined;
35
37
  /**
36
- * See [`MessageInputConfigService`](../services/MessageInputConfigService.mdx) for more information
38
+ * See [`MessageInputConfigService`](/chat/docs/sdk/angular/services/MessageInputConfigService) for more information
37
39
  */
38
40
  inputMode: 'desktop' | 'mobile';
39
41
  /**
40
- * 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.
42
+ * 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`](/chat/docs/sdk/angular/components/MessageInputComponent/#inputs-and-outputs) component.
41
43
  */
42
44
  mentionScope: 'channel' | 'application';
43
45
  /**
@@ -73,7 +75,7 @@ export declare class AutocompleteTextareaComponent implements TextareaInterface,
73
75
  private slashCommandConfig;
74
76
  private searchTerm$;
75
77
  private isViewInited;
76
- constructor(channelService: ChannelService, chatClientService: ChatClientService, transliterationService: TransliterationService, emojiInputService: EmojiInputService, customTemplatesService: CustomTemplatesService, cdRef: ChangeDetectorRef);
78
+ constructor(channelService: ChannelService, chatClientService: ChatClientService, transliterationService: TransliterationService, emojiInputService: EmojiInputService, customTemplatesService: CustomTemplatesService, cdRef: ChangeDetectorRef, messageInputConfigService: MessageInputConfigService);
77
79
  ngOnChanges(changes: SimpleChanges): void;
78
80
  ngAfterViewInit(): void;
79
81
  filter(searchString: string, items: {
@@ -90,6 +92,7 @@ export declare class AutocompleteTextareaComponent implements TextareaInterface,
90
92
  private transliterate;
91
93
  private updateMentionOptions;
92
94
  private updateMentionedUsersFromText;
95
+ private updateCustomAutocompleteOptions;
93
96
  static ɵfac: i0.ɵɵFactoryDeclaration<AutocompleteTextareaComponent, never>;
94
97
  static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteTextareaComponent, "stream-autocomplete-textarea", never, { "value": "value"; "placeholder": "placeholder"; "areMentionsEnabled": "areMentionsEnabled"; "inputMode": "inputMode"; "mentionScope": "mentionScope"; "autoFocus": "autoFocus"; }, { "valueChange": "valueChange"; "send": "send"; "userMentions": "userMentions"; "pasteFromClipboard": "pasteFromClipboard"; }, never, never, false, never>;
95
98
  }
@@ -1,11 +1,11 @@
1
1
  import { Subject } from 'rxjs';
2
2
  import * as i0 from "@angular/core";
3
3
  /**
4
- * If you have an emoji picker in your application, you can propagate the selected emoji to the textarea using this service, more info can be found in [custom emoji picker guide](../code-examples/emoji-picker.mdx)
4
+ * If you have an emoji picker in your application, you can propagate the selected emoji to the textarea using this service, more info can be found in [custom emoji picker guide](/chat/docs/sdk/angular/code-examples/emoji-picker/)
5
5
  */
6
6
  export declare class EmojiInputService {
7
7
  /**
8
- * If you have an emoji picker in your application, you can propagate the selected emoji to the textarea using this Subject, more info can be found in [custom emoji picker guide](../code-examples/emoji-picker.mdx)
8
+ * If you have an emoji picker in your application, you can propagate the selected emoji to the textarea using this Subject, more info can be found in [custom emoji picker guide](/chat/docs/sdk/angular/code-examples/emoji-picker/)
9
9
  */
10
10
  emojiInput$: Subject<string>;
11
11
  constructor();
@@ -1,7 +1,9 @@
1
1
  import { MessageInputComponent } from './message-input.component';
2
+ import { BehaviorSubject } from 'rxjs';
3
+ import { CustomAutocomplete } from '../types';
2
4
  import * as i0 from "@angular/core";
3
5
  /**
4
- * 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.
6
+ * The `MessageInputConfigService` is used to keep a consistent configuration among the different [`MessageInput`](/chat/docs/sdk/angular/components/MessageInputComponent/) components if your UI has more than one input component.
5
7
  */
6
8
  export declare class MessageInputConfigService {
7
9
  /**
@@ -9,7 +11,7 @@ export declare class MessageInputConfigService {
9
11
  */
10
12
  isFileUploadEnabled: boolean | undefined;
11
13
  /**
12
- * 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
+ * If true, users can mention other users in messages. You also [need to use the `AutocompleteTextarea`](/chat/docs/sdk/angular/concepts/opt-in-architecture/) for this feature to work.
13
15
  */
14
16
  areMentionsEnabled: boolean | undefined;
15
17
  /**
@@ -32,7 +34,7 @@ export declare class MessageInputConfigService {
32
34
  /**
33
35
  * Override the message input's default event handler for [paste events](https://developer.mozilla.org/en-US/docs/Web/API/Element/paste_event)
34
36
  *
35
- * The event handler will receive the event object, and the [message input component](../../components/MessageInputComponent).
37
+ * The event handler will receive the event object, and the [message input component](/chat/docs/sdk/angular/components/MessageInputComponent).
36
38
  *
37
39
  * You can use the public API of the message input component to update the composer. Typically you want to update the message text and/or attachments, this is how you can do these:
38
40
  * - Change message text: `inputComponent.textareaValue = '<new value>'`
@@ -40,6 +42,12 @@ export declare class MessageInputConfigService {
40
42
  * - Upload custom attachments: `inputComponent.attachmentService.customAttachments$.next(<custom attachments>)`
41
43
  */
42
44
  customPasteEventHandler?: (event: ClipboardEvent, inputComponent: MessageInputComponent) => void;
45
+ /**
46
+ * Add custom autocomplete configurations to the message input
47
+ *
48
+ * Only works when using StreamAutocompleteTextareaModule
49
+ */
50
+ customAutocompletes$: BehaviorSubject<CustomAutocomplete[]>;
43
51
  constructor();
44
52
  static ɵfac: i0.ɵɵFactoryDeclaration<MessageInputConfigService, never>;
45
53
  static ɵprov: i0.ɵɵInjectableDeclaration<MessageInputConfigService>;
@@ -30,15 +30,15 @@ export declare class MessageInputComponent implements OnInit, OnChanges, OnDestr
30
30
  readonly voiceRecorderService: VoiceRecorderService;
31
31
  audioRecorder?: AudioRecorderService | undefined;
32
32
  /**
33
- * 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).
33
+ * 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`](/chat/docs/sdk/angular/services/MessageInputConfigService/).
34
34
  */
35
35
  isFileUploadEnabled: boolean | undefined;
36
36
  /**
37
- * 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. If no value is provided, it is set from the [`MessageInputConfigService`](../services/MessageInputConfigService.mdx).
37
+ * If true, users can mention other users in messages. You also [need to use the `AutocompleteTextarea`](/chat/docs/sdk/angular/concepts/opt-in-architecture/) for this feature to work. If no value is provided, it is set from the [`MessageInputConfigService`](/chat/docs/sdk/angular/services/MessageInputConfigService/).
38
38
  */
39
39
  areMentionsEnabled: boolean | undefined;
40
40
  /**
41
- * 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).
41
+ * 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`](/chat/docs/sdk/angular/services/MessageInputConfigService/).
42
42
  */
43
43
  mentionScope: 'channel' | 'application' | undefined;
44
44
  /**
@@ -46,7 +46,7 @@ export declare class MessageInputComponent implements OnInit, OnChanges, OnDestr
46
46
  */
47
47
  mode: 'thread' | 'main';
48
48
  /**
49
- * If true, users can select multiple files to upload. If no value is provided, it is set from the [`MessageInputConfigService`](../services/MessageInputConfigService.mdx).
49
+ * If true, users can select multiple files to upload. If no value is provided, it is set from the [`MessageInputConfigService`](/chat/docs/sdk/angular/services/MessageInputConfigService/).
50
50
  */
51
51
  isMultipleFileUploadEnabled: boolean | undefined;
52
52
  /**
@@ -58,7 +58,7 @@ export declare class MessageInputComponent implements OnInit, OnChanges, OnDestr
58
58
  */
59
59
  sendMessage$: Observable<void> | undefined;
60
60
  /**
61
- * In `desktop` mode the `Enter` key will trigger message sending, in `mobile` mode the `Enter` key will insert a new line to the message input. If no value is provided, it is set from the [`MessageInputConfigService`](../services/MessageInputConfigService.mdx).
61
+ * In `desktop` mode the `Enter` key will trigger message sending, in `mobile` mode the `Enter` key will insert a new line to the message input. If no value is provided, it is set from the [`MessageInputConfigService`](/chat/docs/sdk/angular/services/MessageInputConfigService/).
62
62
  */
63
63
  inputMode: 'desktop' | 'mobile';
64
64
  /**
@@ -66,7 +66,7 @@ export declare class MessageInputComponent implements OnInit, OnChanges, OnDestr
66
66
  */
67
67
  autoFocus: boolean;
68
68
  /**
69
- * By default the input will react to changes in `messageToEdit$` from [`MessageActionsService`](../services/MessageActionsService.mdx) and display the message to be edited (taking into account the current `mode`).
69
+ * By default the input will react to changes in `messageToEdit$` from [`MessageActionsService`](/chat/docs/sdk/angular/services/MessageActionsService/) and display the message to be edited (taking into account the current `mode`).
70
70
  *
71
71
  * If you don't need that behavior, you can turn this of with this flag. In that case you should create your own edit message UI.
72
72
  */
@@ -4,7 +4,7 @@ import { TextareaInterface } from '../textarea.interface';
4
4
  import { UserResponse } from 'stream-chat';
5
5
  import * as i0 from "@angular/core";
6
6
  /**
7
- * The `Textarea` component is used by the [`MessageInput`](./MessageInputComponent.mdx) component to display the input HTML element where users can type their message.
7
+ * The `Textarea` component is used by the [`MessageInput`](/chat/docs/sdk/angular/components/MessageInputComponent/) component to display the input HTML element where users can type their message.
8
8
  */
9
9
  export declare class TextareaComponent implements TextareaInterface, OnChanges, OnDestroy, AfterViewInit {
10
10
  private emojiInputService;
@@ -18,7 +18,7 @@ export declare class TextareaComponent implements TextareaInterface, OnChanges,
18
18
  */
19
19
  placeholder: string;
20
20
  /**
21
- * See [`MessageInputConfigService`](../services/MessageInputConfigService.mdx) for more information
21
+ * See [`MessageInputConfigService`](/chat/docs/sdk/angular/services/MessageInputConfigService) for more information
22
22
  */
23
23
  inputMode: 'desktop' | 'mobile';
24
24
  /**
@@ -29,12 +29,12 @@ export declare class MessageReactionsComponent implements OnChanges, OnInit, Aft
29
29
  [key in MessageReactionType]?: number;
30
30
  };
31
31
  /**
32
- * List of reactions of a [message](../types/stream-message.mdx), used to display the users of a reaction type.
32
+ * List of reactions of a [message](/chat/docs/sdk/angular/types/stream-message/), used to display the users of a reaction type.
33
33
  * @deprecated you can fetch the reactions using [`messageReactionsService.queryReactions()`](https://getstream.io/chat/docs/sdk/angular/services/MessageReactionsService/#queryreactions)
34
34
  */
35
35
  latestReactions: ReactionResponse<DefaultStreamChatGenerics>[];
36
36
  /**
37
- * List of the user's own reactions of a [message](../types/stream-message.mdx), used to display the users of a reaction type.
37
+ * List of the user's own reactions of a [message](/chat/docs/sdk/angular/types/stream-message/), used to display the users of a reaction type.
38
38
  */
39
39
  ownReactions: ReactionResponse<DefaultStreamChatGenerics>[];
40
40
  private selectorContainer;
@@ -5,14 +5,14 @@ import { ChannelService } from '../channel.service';
5
5
  import { MessageReactionsService } from '../message-reactions.service';
6
6
  import * as i0 from "@angular/core";
7
7
  /**
8
- * The `MessageReactionsSelectorComponent` makes it possible for users to react to a message, the reaction options can be set using the [`MessageReactionsService`](../../services/MessageReactionsService). You can read more about [message reactions](https://getstream.io/chat/docs/javascript/send_reaction/?language=javascript) in the platform documentation.
8
+ * The `MessageReactionsSelectorComponent` makes it possible for users to react to a message, the reaction options can be set using the [`MessageReactionsService`](/chat/docs/sdk/angular/services/MessageReactionsService/). You can read more about [message reactions](https://getstream.io/chat/docs/javascript/send_reaction/?language=javascript) in the platform documentation.
9
9
  */
10
10
  export declare class MessageReactionsSelectorComponent implements OnInit, OnDestroy, AfterViewInit {
11
11
  private channelService;
12
12
  private messageReactionsService;
13
13
  private cdRef;
14
14
  /**
15
- * List of the user's own reactions of a [message](../types/stream-message.mdx), used to display the users of a reaction type.
15
+ * List of the user's own reactions of a [message](/chat/docs/sdk/angular/types/stream-message/), used to display the users of a reaction type.
16
16
  */
17
17
  ownReactions: ReactionResponse<DefaultStreamChatGenerics>[];
18
18
  /**
@@ -13,13 +13,13 @@ export declare class MessageReactionsService {
13
13
  /**
14
14
  * The enabled [reactions](https://getstream.io/chat/docs/javascript/send_reaction/?language=javascript) and the associated emoji
15
15
  *
16
- * You can provide any string as a reaction. The emoji can be provided as a string, if you want to use custom images for reactions you have to provide a [custom reactions UI](../../services/CustomTemplatesService/#messagereactionstemplate)
16
+ * You can provide any string as a reaction. The emoji can be provided as a string, if you want to use custom images for reactions you have to provide a [custom reactions UI](/chat/docs/sdk/angular/services/CustomTemplatesService/#messagereactionstemplate/)
17
17
  */
18
18
  reactions$: BehaviorSubject<{
19
19
  [x: string]: string;
20
20
  }>;
21
21
  /**
22
- * By default the [`MessageReactionsComponent`](../../components/MessageReactionsComponent) will display the reacting users when a reaction is clicked. You can override this with your own UI by providing a custom event handler.
22
+ * By default the [`MessageReactionsComponent`](/chat/docs/sdk/angular/components/MessageReactionsComponent/) will display the reacting users when a reaction is clicked. You can override this with your own UI by providing a custom event handler.
23
23
  *
24
24
  * The event handler can retrieve all reactions of a message using the [`messageReactionsService.queryReactions()`](https://getstream.io/chat/docs/sdk/angular/services/MessageReactionsService/#queryreactions)
25
25
  */
@@ -2,7 +2,7 @@ import { TemplateRef } from '@angular/core';
2
2
  import { NotificationType } from '../types';
3
3
  import * as i0 from "@angular/core";
4
4
  /**
5
- * The `Notification` component displays a notification within the [`NotificationList`](./NotificationListComponent.mdx)
5
+ * The `Notification` component displays a notification within the [`NotificationList`](/chat/docs/sdk/angular/components/NotificationListComponent/)
6
6
  */
7
7
  export declare class NotificationComponent {
8
8
  /**
@@ -3,7 +3,7 @@ import { Observable } from 'rxjs';
3
3
  import { NotificationPayload, NotificationType } from './types';
4
4
  import * as i0 from "@angular/core";
5
5
  /**
6
- * The `NotificationService` can be used to add or remove notifications. By default the [`NotificationList`](../components/NotificationListComponent.mdx) component displays the currently active notifications.
6
+ * The `NotificationService` can be used to add or remove notifications. By default the [`NotificationList`](/chat/docs/sdk/angular/components/NotificationListComponent/) component displays the currently active notifications.
7
7
  */
8
8
  export declare class NotificationService {
9
9
  /**
@@ -1,7 +1,7 @@
1
1
  import { TranslateService } from '@ngx-translate/core';
2
2
  import * as i0 from "@angular/core";
3
3
  /**
4
- * The `StreamI18nService` can be used to customize the labels of the chat UI. Our [translation guide](../concepts/translation.mdx) covers this topic in detail.
4
+ * The `StreamI18nService` can be used to customize the labels of the chat UI. Our [translation guide](/chat/docs/sdk/angular/concepts/translation/) covers this topic in detail.
5
5
  */
6
6
  export declare class StreamI18nService {
7
7
  private translteService;
@@ -1,7 +1,7 @@
1
1
  import { BehaviorSubject } from 'rxjs';
2
2
  import * as i0 from "@angular/core";
3
3
  /**
4
- * The `ThemeService` can be used to change the theme of the chat UI and to customize the theme. Our [theming guide](../theming/introduction.mdx) gives a complete overview about the topic.
4
+ * The `ThemeService` can be used to change the theme of the chat UI and to customize the theme. Our [theming guide](/chat/docs/sdk/angular/theming/themingv2/) gives a complete overview about the topic.
5
5
  */
6
6
  export declare class ThemeService {
7
7
  /**
@@ -6,7 +6,7 @@ import { CustomTemplatesService } from '../custom-templates.service';
6
6
  import { DefaultStreamChatGenerics, StreamMessage, ThreadHeaderContext } from '../types';
7
7
  import * as i0 from "@angular/core";
8
8
  /**
9
- * 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.
9
+ * 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`](/chat/docs/sdk/angular/components/MessageListComponent) and [`MessageInput`](/chat/docs/sdk/angular/components/MessageInputComponent/) components.
10
10
  */
11
11
  export declare class ThreadComponent implements OnDestroy {
12
12
  customTemplatesService: CustomTemplatesService;
package/lib/types.d.ts CHANGED
@@ -338,4 +338,43 @@ export declare type CustomAttachmentPreviewListContext<T extends DefaultStreamCh
338
338
  export declare type ThreadReplyButtonContext<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
339
339
  message: StreamMessage<T>;
340
340
  };
341
+ export declare type CustomAutocompleteItemContext = {
342
+ item: CustomAutocompleteItem;
343
+ };
344
+ export declare type CustomAutocompleteItem = {
345
+ /**
346
+ * This is the text that will be inserted into the message input once a user selects an option (appended after the trigger character)
347
+ */
348
+ autocompleteLabel: string;
349
+ };
350
+ export declare type CustomAutocomplete = {
351
+ /**
352
+ * The character that will trigger the autocomplete (for example #)
353
+ *
354
+ * The SDK supports @ and / by default, so you can't use those
355
+ */
356
+ triggerCharacter: string;
357
+ /**
358
+ * The HTML template to display an item in the autocomplete list
359
+ */
360
+ templateRef: TemplateRef<{
361
+ item: CustomAutocompleteItem;
362
+ }>;
363
+ /**
364
+ * Set to `true` if space characters can be part of the `autocompleteLabel`
365
+ */
366
+ allowSpace: boolean;
367
+ /**
368
+ * The options to choose from
369
+ *
370
+ * In case you want to use dynamic/server-side filtering, use `updateOptions` instead
371
+ */
372
+ options: CustomAutocompleteItem[];
373
+ /**
374
+ * If you want to have dynamic/server-side filtering provide a method that will be called any time the autocomplete options should be filtered
375
+ * @param searchTerm the text to filter by (without the trigger character), can be an empty string
376
+ * @returns a promise that will resolve to the options, you should take care of error handling
377
+ */
378
+ updateOptions?: (searchTerm: string) => Promise<CustomAutocompleteItem[]>;
379
+ };
341
380
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stream-chat-angular",
3
- "version": "5.9.1",
3
+ "version": "5.10.0",
4
4
  "description": "Angular components to create chat conversations or livestream style chat",
5
5
  "author": "GetStream",
6
6
  "homepage": "https://getstream.io/chat/",
@@ -1 +1 @@
1
- export const version = '5.9.1';
1
+ export const version = '5.10.0';