stream-chat-angular 4.40.0 → 4.42.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.
@@ -161,6 +161,10 @@ export declare class ChannelService<T extends DefaultStreamChatGenerics = Defaul
161
161
  * You can override the default image delete request - override this if you use your own CDN
162
162
  */
163
163
  customImageDeleteRequest?: (url: string, channel: Channel<T>) => Promise<void>;
164
+ /**
165
+ * The provided method will be called before deleting a message. If the returned Promise resolves to `true` to deletion will go ahead. If `false` is returned, the message won't be deleted.
166
+ */
167
+ messageDeleteConfirmationHandler?: (message: StreamMessage<T>) => Promise<boolean>;
164
168
  private channelsSubject;
165
169
  private activeChannelSubject;
166
170
  private activeChannelMessagesSubject;
@@ -320,7 +324,9 @@ export declare class ChannelService<T extends DefaultStreamChatGenerics = Defaul
320
324
  reply_count?: number | undefined;
321
325
  shadowed?: boolean | undefined;
322
326
  status?: string | undefined;
323
- thread_participants?: UserResponse<T>[] | undefined;
327
+ thread_participants?: UserResponse<T>[] | undefined; /**
328
+ * If set to false, read events won't be sent as new messages are received. If set to true active channel (if any) will immediately be marked as read.
329
+ */
324
330
  updated_at?: string | undefined;
325
331
  } & {
326
332
  quoted_message?: import("stream-chat").MessageResponseBase<T> | undefined;
@@ -41,6 +41,10 @@ export declare class AutocompleteTextareaComponent implements TextareaInterface,
41
41
  * 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
42
  */
43
43
  mentionScope: 'channel' | 'application';
44
+ /**
45
+ * Enables or disables auto focus on the textarea element
46
+ */
47
+ autoFocus: boolean;
44
48
  /**
45
49
  * Emits the current value of the input element when a user types.
46
50
  */
@@ -84,5 +88,5 @@ export declare class AutocompleteTextareaComponent implements TextareaInterface,
84
88
  private updateMentionOptions;
85
89
  private updateMentionedUsersFromText;
86
90
  static ɵfac: i0.ɵɵFactoryDeclaration<AutocompleteTextareaComponent, never>;
87
- static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteTextareaComponent, "stream-autocomplete-textarea", never, { "value": "value"; "placeholder": "placeholder"; "areMentionsEnabled": "areMentionsEnabled"; "inputMode": "inputMode"; "mentionScope": "mentionScope"; }, { "valueChange": "valueChange"; "send": "send"; "userMentions": "userMentions"; }, never, never>;
91
+ 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"; }, never, never>;
88
92
  }
@@ -58,6 +58,10 @@ export declare class MessageInputComponent implements OnInit, OnChanges, OnDestr
58
58
  * 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).
59
59
  */
60
60
  inputMode: 'desktop' | 'mobile';
61
+ /**
62
+ * Enables or disables auto focus on the textarea element
63
+ */
64
+ autoFocus: boolean;
61
65
  /**
62
66
  * Emits when a message was successfuly sent or updated
63
67
  */
@@ -138,5 +142,5 @@ export declare class MessageInputComponent implements OnInit, OnChanges, OnDestr
138
142
  private startCooldown;
139
143
  private stopCooldown;
140
144
  static ɵfac: i0.ɵɵFactoryDeclaration<MessageInputComponent, never>;
141
- static ɵcmp: i0.ɵɵComponentDeclaration<MessageInputComponent, "stream-message-input", never, { "isFileUploadEnabled": "isFileUploadEnabled"; "areMentionsEnabled": "areMentionsEnabled"; "mentionScope": "mentionScope"; "mode": "mode"; "isMultipleFileUploadEnabled": "isMultipleFileUploadEnabled"; "message": "message"; "sendMessage$": "sendMessage$"; "inputMode": "inputMode"; }, { "messageUpdate": "messageUpdate"; }, never, never>;
145
+ static ɵcmp: i0.ɵɵComponentDeclaration<MessageInputComponent, "stream-message-input", never, { "isFileUploadEnabled": "isFileUploadEnabled"; "areMentionsEnabled": "areMentionsEnabled"; "mentionScope": "mentionScope"; "mode": "mode"; "isMultipleFileUploadEnabled": "isMultipleFileUploadEnabled"; "message": "message"; "sendMessage$": "sendMessage$"; "inputMode": "inputMode"; "autoFocus": "autoFocus"; }, { "messageUpdate": "messageUpdate"; }, never, never>;
142
146
  }
@@ -22,6 +22,10 @@ export declare class TextareaComponent implements TextareaInterface, OnChanges,
22
22
  * See [`MessageInputConfigService`](../services/MessageInputConfigService.mdx) for more information
23
23
  */
24
24
  inputMode: 'desktop' | 'mobile';
25
+ /**
26
+ * Enables or disables auto focus on the textarea element
27
+ */
28
+ autoFocus: boolean;
25
29
  /**
26
30
  * Emits the current value of the input element when a user types.
27
31
  */
@@ -40,5 +44,5 @@ export declare class TextareaComponent implements TextareaInterface, OnChanges,
40
44
  enterHit(event: Event): void;
41
45
  private adjustTextareaHeight;
42
46
  static ɵfac: i0.ɵɵFactoryDeclaration<TextareaComponent, never>;
43
- static ɵcmp: i0.ɵɵComponentDeclaration<TextareaComponent, "stream-textarea", never, { "value": "value"; "placeholder": "placeholder"; "inputMode": "inputMode"; }, { "valueChange": "valueChange"; "send": "send"; }, never, never>;
47
+ static ɵcmp: i0.ɵɵComponentDeclaration<TextareaComponent, "stream-textarea", never, { "value": "value"; "placeholder": "placeholder"; "inputMode": "inputMode"; "autoFocus": "autoFocus"; }, { "valueChange": "valueChange"; "send": "send"; }, never, never>;
44
48
  }
@@ -10,6 +10,7 @@ export declare class TextareaDirective implements OnChanges {
10
10
  inputMode: 'mobile' | 'desktop';
11
11
  value: string;
12
12
  placeholder: string | undefined;
13
+ autoFocus: boolean;
13
14
  readonly valueChange: EventEmitter<string>;
14
15
  readonly send: EventEmitter<void>;
15
16
  readonly userMentions: EventEmitter<UserResponse<import("stream-chat").DefaultGenerics>[]>;
@@ -18,5 +19,5 @@ export declare class TextareaDirective implements OnChanges {
18
19
  constructor(viewContainerRef: ViewContainerRef);
19
20
  ngOnChanges(changes: SimpleChanges): void;
20
21
  static ɵfac: i0.ɵɵFactoryDeclaration<TextareaDirective, never>;
21
- static ɵdir: i0.ɵɵDirectiveDeclaration<TextareaDirective, "[streamTextarea]", never, { "componentRef": "componentRef"; "areMentionsEnabled": "areMentionsEnabled"; "mentionScope": "mentionScope"; "inputMode": "inputMode"; "value": "value"; "placeholder": "placeholder"; }, { "valueChange": "valueChange"; "send": "send"; "userMentions": "userMentions"; }, never>;
22
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TextareaDirective, "[streamTextarea]", never, { "componentRef": "componentRef"; "areMentionsEnabled": "areMentionsEnabled"; "mentionScope": "mentionScope"; "inputMode": "inputMode"; "value": "value"; "placeholder": "placeholder"; "autoFocus": "autoFocus"; }, { "valueChange": "valueChange"; "send": "send"; "userMentions": "userMentions"; }, never>;
22
23
  }
@@ -9,4 +9,5 @@ export interface TextareaInterface extends OnChanges {
9
9
  mentionScope?: 'channel' | 'application';
10
10
  placeholder?: string;
11
11
  inputMode: 'mobile' | 'desktop';
12
+ autoFocus: boolean;
12
13
  }
@@ -30,6 +30,8 @@ export declare class MessageListComponent implements AfterViewChecked, OnChanges
30
30
  messageOptionsTrigger: 'message-row' | 'message-bubble';
31
31
  /**
32
32
  * You can hide the "jump to latest" button while scrolling. A potential use-case for this input would be to [workaround a known issue on iOS Safar](https://github.com/GetStream/stream-chat-angular/issues/418)
33
+ *
34
+ * @deprecated This scroll issue has been resolved, no need to use this workaround anymore.
33
35
  */
34
36
  hideJumpToLatestButtonDuringScroll: boolean;
35
37
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stream-chat-angular",
3
- "version": "4.40.0",
3
+ "version": "4.42.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 = '4.40.0';
1
+ export const version = '4.42.0';