stream-chat-angular 2.12.3 → 2.14.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 (43) hide show
  1. package/assets/version.d.ts +1 -1
  2. package/bundles/stream-chat-angular.umd.js +450 -55
  3. package/bundles/stream-chat-angular.umd.js.map +1 -1
  4. package/esm2015/assets/version.js +2 -2
  5. package/esm2015/lib/attachment.service.js +29 -1
  6. package/esm2015/lib/channel-list/channel-list-toggle.service.js +20 -1
  7. package/esm2015/lib/channel.service.js +146 -3
  8. package/esm2015/lib/chat-client.service.js +25 -1
  9. package/esm2015/lib/message/message.component.js +5 -1
  10. package/esm2015/lib/message-actions-box/message-actions-box.component.js +1 -1
  11. package/esm2015/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.js +21 -9
  12. package/esm2015/lib/message-input/emoji-input.service.js +23 -0
  13. package/esm2015/lib/message-input/message-input-config.service.js +16 -1
  14. package/esm2015/lib/message-input/message-input.component.js +36 -20
  15. package/esm2015/lib/message-input/textarea/textarea.component.js +22 -6
  16. package/esm2015/lib/message-list/image-load.service.js +7 -1
  17. package/esm2015/lib/message-list/message-list.component.js +18 -5
  18. package/esm2015/lib/message-reactions/message-reactions.component.js +2 -2
  19. package/esm2015/lib/notification.service.js +19 -1
  20. package/esm2015/lib/stream-i18n.service.js +9 -1
  21. package/esm2015/lib/theme.service.js +23 -1
  22. package/esm2015/lib/transliteration.service.js +9 -1
  23. package/esm2015/public-api.js +2 -1
  24. package/fesm2015/stream-chat-angular.js +406 -40
  25. package/fesm2015/stream-chat-angular.js.map +1 -1
  26. package/lib/attachment.service.d.ts +34 -0
  27. package/lib/channel-list/channel-list-toggle.service.d.ts +22 -0
  28. package/lib/channel.service.d.ts +172 -0
  29. package/lib/chat-client.service.d.ts +39 -0
  30. package/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.d.ts +3 -1
  31. package/lib/message-input/emoji-input.service.d.ts +14 -0
  32. package/lib/message-input/message-input-config.service.d.ts +27 -1
  33. package/lib/message-input/message-input.component.d.ts +8 -3
  34. package/lib/message-input/textarea/textarea.component.d.ts +7 -3
  35. package/lib/message-list/image-load.service.d.ts +6 -0
  36. package/lib/message-list/message-list.component.d.ts +10 -2
  37. package/lib/notification.service.d.ts +21 -0
  38. package/lib/stream-i18n.service.d.ts +8 -0
  39. package/lib/theme.service.d.ts +22 -0
  40. package/lib/transliteration.service.d.ts +8 -0
  41. package/package.json +4 -3
  42. package/public-api.d.ts +1 -0
  43. package/src/assets/version.ts +1 -1
@@ -6,11 +6,32 @@ export declare type NotificationPayload = {
6
6
  text: string;
7
7
  translateParams?: Object;
8
8
  };
9
+ /**
10
+ * The `NotificationService` can be used to add or remove notifications. By default the [`NotificationList`](../components/notifications.mdx) component displays the currently active notifications.
11
+ */
9
12
  export declare class NotificationService {
13
+ /**
14
+ * Emits the currently active [notifications](https://github.com/GetStream/stream-chat-angular/blob/master/projects/stream-chat-angular/src/lib/notification.service.ts).
15
+ */
10
16
  notifications$: Observable<NotificationPayload[]>;
11
17
  private notificationsSubject;
12
18
  constructor();
19
+ /**
20
+ * Displays a notification for the given amount of time.
21
+ * @param text The text of the notification
22
+ * @param type The type of the notification
23
+ * @param timeout The number of milliseconds while the notification should be visible
24
+ * @param translateParams Translation parameters for the `text`
25
+ * @returns A method to clear the notification (before the timeout).
26
+ */
13
27
  addTemporaryNotification(text: string, type?: NotificationType, timeout?: number, translateParams?: Object): () => void;
28
+ /**
29
+ * Displays a notification, that will be visible until it's removed.
30
+ * @param text The text of the notification
31
+ * @param type The type of the notification
32
+ * @param translateParams Translation parameters for the `text`
33
+ * @returns A method to clear the notification.
34
+ */
14
35
  addPermanentNotification(text: string, type?: NotificationType, translateParams?: Object): () => void;
15
36
  private addNotification;
16
37
  private removeNotification;
@@ -1,8 +1,16 @@
1
1
  import { TranslateService } from '@ngx-translate/core';
2
2
  import * as i0 from "@angular/core";
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.
5
+ */
3
6
  export declare class StreamI18nService {
4
7
  private translteService;
5
8
  constructor(translteService: TranslateService);
9
+ /**
10
+ * Registers the translation to the [ngx-translate](https://github.com/ngx-translate/core) TranslateService.
11
+ * @param lang The language key to register the translation to
12
+ * @param overrides An object which keys are translation keys, and the values are custom translations
13
+ */
6
14
  setTranslation(lang?: string, overrides?: {
7
15
  [key: string]: string;
8
16
  }): void;
@@ -1,22 +1,44 @@
1
1
  import { BehaviorSubject } from 'rxjs';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare type Theme = 'light' | 'dark';
4
+ /**
5
+ * The `ThemeService` can be used to change the theme of the chat UI and to customize the theme. Our [themeing guide](../concepts/themeing-and-css.mdx) gives a complete overview about the topic.
6
+ */
4
7
  export declare class ThemeService {
8
+ /**
9
+ * A Subject that can be used to get or set the currently active theme.
10
+ */
5
11
  theme$: BehaviorSubject<Theme>;
6
12
  private _customLightThemeVariables;
7
13
  private _customDarkThemeVariables;
8
14
  private defaultDarkModeVariables;
9
15
  private variablesToDelete;
10
16
  constructor();
17
+ /**
18
+ * A getter that returns the currently set custom light theme variables.
19
+ * @returns An object where the keys are theme variables, and the values are the currently set CSS values.
20
+ */
11
21
  get customLightThemeVariables(): {
12
22
  [key: string]: string;
13
23
  } | undefined;
24
+ /**
25
+ * A setter that can be used to overwrite the values of the CSS theme variables of the light theme.
26
+ * @param variables An object where the keys are theme variables, and the values are CSS values.
27
+ */
14
28
  set customLightThemeVariables(variables: {
15
29
  [key: string]: string;
16
30
  } | undefined);
31
+ /**
32
+ * A getter that returns the currently set custom dark theme variables.
33
+ * @returns An object where the keys are theme variables, and the values are the currently set CSS values.
34
+ */
17
35
  get customDarkThemeVariables(): {
18
36
  [key: string]: string;
19
37
  } | undefined;
38
+ /**
39
+ * A setter that can be used to overwrite the values of the CSS theme variables of the dark theme.
40
+ * @param variables An object where the keys are theme variables, and the values are CSS values.
41
+ */
20
42
  set customDarkThemeVariables(variables: {
21
43
  [key: string]: string;
22
44
  } | undefined);
@@ -1,6 +1,14 @@
1
1
  import * as i0 from "@angular/core";
2
+ /**
3
+ * The `TransliterationService` wraps the [@sindresorhus/transliterate](https://www.npmjs.com/package/@sindresorhus/transliterate) library
4
+ */
2
5
  export declare class TransliterationService {
3
6
  constructor();
7
+ /**
8
+ *
9
+ * @param s the string to be transliterated
10
+ * @returns the result of the transliteration
11
+ */
4
12
  transliterate(s: string): string;
5
13
  static ɵfac: i0.ɵɵFactoryDeclaration<TransliterationService, never>;
6
14
  static ɵprov: i0.ɵɵInjectableDeclaration<TransliterationService>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stream-chat-angular",
3
- "version": "2.12.3",
3
+ "version": "2.14.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/",
@@ -12,13 +12,14 @@
12
12
  "@angular/common": "^12.2.0 || ^13.0.0",
13
13
  "@angular/core": "^12.2.0 || ^13.0.0",
14
14
  "@ngx-translate/core": "^13.0.0 || ^14.0.0",
15
- "stream-chat": ">=4.3.0",
16
- "@stream-io/stream-chat-css": "2.2.0"
15
+ "stream-chat": "^4.3.0 || ^5.0.0",
16
+ "@stream-io/stream-chat-css": "2.3.2"
17
17
  },
18
18
  "dependencies": {
19
19
  "angular-mentions": "^1.4.0",
20
20
  "@stream-io/transliterate": "^1.5.2",
21
21
  "dayjs": "^1.10.7",
22
+ "emoji-regex": "^10.0.0",
22
23
  "pretty-bytes": "^5.6.0",
23
24
  "tslib": "^2.3.0",
24
25
  "uuidv4": "^6.2.12"
package/public-api.d.ts CHANGED
@@ -21,6 +21,7 @@ export * from './lib/message-input/autocomplete-textarea/autocomplete-textarea.c
21
21
  export * from './lib/message-input/message-input-config.service';
22
22
  export * from './lib/message-input/textarea.directive';
23
23
  export * from './lib/message-input/textarea.interface';
24
+ export * from './lib/message-input/emoji-input.service';
24
25
  export * from './lib/message-list/message-list.component';
25
26
  export * from './lib/message-list/image-load.service';
26
27
  export * from './lib/message-list/group-styles';
@@ -1 +1 @@
1
- export const version = '2.12.3';
1
+ export const version = '2.14.0';