stream-chat-angular 4.37.0 → 4.38.1

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.
@@ -1,13 +1,17 @@
1
- import { OnChanges } from '@angular/core';
1
+ import { AfterViewInit, ChangeDetectorRef, ElementRef, OnChanges, OnDestroy } from '@angular/core';
2
2
  import { Channel, User } from 'stream-chat';
3
3
  import { CustomTemplatesService } from '../custom-templates.service';
4
4
  import { AvatarContext, AvatarLocation, AvatarType, DefaultStreamChatGenerics } from '../types';
5
+ import { ThemeService } from '../theme.service';
5
6
  import * as i0 from "@angular/core";
6
7
  /**
7
8
  * The `AvatarPlaceholder` component displays the [default avatar](./AvatarComponent.mdx) unless a [custom template](../services/CustomTemplatesService.mdx) is provided. This component is used by the SDK internally, you likely won't need to use it.
8
9
  */
9
- export declare class AvatarPlaceholderComponent implements OnChanges {
10
+ export declare class AvatarPlaceholderComponent implements OnChanges, AfterViewInit, OnDestroy {
10
11
  customTemplatesService: CustomTemplatesService;
12
+ private hostElement;
13
+ private cdRef;
14
+ private themeService;
11
15
  /**
12
16
  * An optional name of the image, used for fallback image or image title (if `imageUrl` is provided)
13
17
  */
@@ -40,9 +44,18 @@ export declare class AvatarPlaceholderComponent implements OnChanges {
40
44
  * If channel/user image isn't provided the initials of the name of the channel/user is shown instead, you can choose how the initals should be computed
41
45
  */
42
46
  initialsType: 'first-letter-of-first-word' | 'first-letter-of-each-word';
47
+ /**
48
+ * If a channel avatar is displayed, and if the channel has exactly two members a green dot is displayed if the other member is online. Set this flag to `false` to turn off this behavior.
49
+ */
50
+ showOnlineIndicator: boolean;
43
51
  context: AvatarContext;
44
- constructor(customTemplatesService: CustomTemplatesService);
52
+ isVisible: boolean;
53
+ private mutationObserver?;
54
+ constructor(customTemplatesService: CustomTemplatesService, hostElement: ElementRef<HTMLElement>, cdRef: ChangeDetectorRef, themeService: ThemeService);
55
+ ngAfterViewInit(): void;
45
56
  ngOnChanges(): void;
57
+ ngOnDestroy(): void;
58
+ private checkIfVisible;
46
59
  static ɵfac: i0.ɵɵFactoryDeclaration<AvatarPlaceholderComponent, never>;
47
- static ɵcmp: i0.ɵɵComponentDeclaration<AvatarPlaceholderComponent, "stream-avatar-placeholder", never, { "name": "name"; "imageUrl": "imageUrl"; "size": "size"; "location": "location"; "channel": "channel"; "user": "user"; "type": "type"; "initialsType": "initialsType"; }, {}, never, never>;
60
+ static ɵcmp: i0.ɵɵComponentDeclaration<AvatarPlaceholderComponent, "stream-avatar-placeholder", never, { "name": "name"; "imageUrl": "imageUrl"; "size": "size"; "location": "location"; "channel": "channel"; "user": "user"; "type": "type"; "initialsType": "initialsType"; "showOnlineIndicator": "showOnlineIndicator"; }, {}, never, never>;
48
61
  }
package/lib/types.d.ts CHANGED
@@ -132,6 +132,7 @@ export declare type AvatarContext = {
132
132
  channel?: Channel<DefaultStreamChatGenerics>;
133
133
  user?: User<DefaultStreamChatGenerics>;
134
134
  initialsType?: 'first-letter-of-first-word' | 'first-letter-of-each-word';
135
+ showOnlineIndicator?: boolean;
135
136
  };
136
137
  export declare type AttachmentPreviewListContext = {
137
138
  attachmentUploads$: Observable<AttachmentUpload[]> | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stream-chat-angular",
3
- "version": "4.37.0",
3
+ "version": "4.38.1",
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.37.0';
1
+ export const version = '4.38.1';