@cometchat/chat-uikit-angular 4.0.0 → 4.0.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.
Files changed (55) hide show
  1. package/AI/AIConversationStarter/AIConversationStarter.d.ts +7 -0
  2. package/AI/AIConversationStarter/AIConversationStarterDecorator.d.ts +6 -0
  3. package/AI/AIEnabler.d.ts +8 -0
  4. package/AI/AIEnablerDecorator.d.ts +7 -0
  5. package/AI/AISmartReplies/AISmartReplies.d.ts +7 -0
  6. package/AI/AISmartReplies/AISmartRepliesDecorator.d.ts +6 -0
  7. package/CometChatConversationsWithMessages/cometchat-conversations-with-messages/cometchat-conversations-with-messages.component.d.ts +0 -4
  8. package/CometChatConversationsWithMessages/cometchat-conversations-with-messages.module.d.ts +2 -4
  9. package/CometChatGroupsWithMessages/cometchat-groups-with-messages.module.d.ts +2 -4
  10. package/CometChatMessageComposer/cometchat-message-composer/cometchat-message-composer.component.d.ts +14 -0
  11. package/CometChatMessageComposer/cometchat-message-composer.module.d.ts +2 -1
  12. package/CometChatMessageList/cometchat-message-list/cometchat-message-list.component.d.ts +17 -0
  13. package/CometChatThreadedMessages/cometchat-threaded-messages/cometchat-threaded-messages.component.d.ts +0 -4
  14. package/CometChatUsersWithMessages/cometchat-users-with-messages.module.d.ts +1 -3
  15. package/LICENSE.md +3 -0
  16. package/README.md +3 -3
  17. package/Shared/Views/CometChatCardView/cometchat-card-view/cometchat-card-view.component.d.ts +71 -0
  18. package/Shared/Views/CometChatCardView/cometchat-card-view.module.d.ts +8 -0
  19. package/assets/Reply@2x.svg +0 -0
  20. package/assets/ai-bot.svg +24 -0
  21. package/assets/ai-empty.svg +22 -0
  22. package/assets/ai-error.svg +21 -0
  23. package/assets/message-privately.svg +0 -0
  24. package/assets/mic.svg +0 -0
  25. package/assets/new-chat.svg +0 -0
  26. package/assets/pause-icon.svg +0 -0
  27. package/assets/play-icon.svg +0 -0
  28. package/assets/record-icon.svg +0 -0
  29. package/assets/start-conversation.svg +0 -0
  30. package/assets/stop.svg +0 -0
  31. package/esm2020/AI/AIConversationStarter/AIConversationStarter.mjs +18 -0
  32. package/esm2020/AI/AIConversationStarter/AIConversationStarterDecorator.mjs +10 -0
  33. package/esm2020/AI/AIEnabler.mjs +70 -0
  34. package/esm2020/AI/AIEnablerDecorator.mjs +10 -0
  35. package/esm2020/AI/AISmartReplies/AISmartReplies.mjs +18 -0
  36. package/esm2020/AI/AISmartReplies/AISmartRepliesDecorator.mjs +10 -0
  37. package/esm2020/CometChatConversationsWithMessages/cometchat-conversations-with-messages/cometchat-conversations-with-messages.component.mjs +4 -10
  38. package/esm2020/CometChatConversationsWithMessages/cometchat-conversations-with-messages.module.mjs +1 -9
  39. package/esm2020/CometChatGroupsWithMessages/cometchat-groups-with-messages.module.mjs +1 -9
  40. package/esm2020/CometChatMessageComposer/cometchat-message-composer/cometchat-message-composer.component.mjs +134 -5
  41. package/esm2020/CometChatMessageComposer/cometchat-message-composer.module.mjs +6 -2
  42. package/esm2020/CometChatMessageList/cometchat-message-list/cometchat-message-list.component.mjs +90 -3
  43. package/esm2020/CometChatMessages/cometchat-messages/cometchat-messages.component.mjs +3 -3
  44. package/esm2020/CometChatThreadedMessages/cometchat-threaded-messages/cometchat-threaded-messages.component.mjs +4 -10
  45. package/esm2020/CometChatUsersWithMessages/cometchat-users-with-messages.module.mjs +2 -10
  46. package/esm2020/Shared/CometChatUIkit/CometChatUIKit.mjs +14 -4
  47. package/esm2020/Shared/Views/CometChatCardView/cometchat-card-view/cometchat-card-view.component.mjs +117 -0
  48. package/esm2020/Shared/Views/CometChatCardView/cometchat-card-view.module.mjs +23 -0
  49. package/esm2020/public-api.mjs +8 -1
  50. package/fesm2015/cometchat-chat-uikit-angular.mjs +496 -51
  51. package/fesm2015/cometchat-chat-uikit-angular.mjs.map +1 -1
  52. package/fesm2020/cometchat-chat-uikit-angular.mjs +495 -49
  53. package/fesm2020/cometchat-chat-uikit-angular.mjs.map +1 -1
  54. package/package.json +6 -5
  55. package/public-api.d.ts +6 -0
@@ -0,0 +1,7 @@
1
+ import { AIExtensionDataSource } from "@cometchat/uikit-shared";
2
+ export declare class AIConversationStarterExtension extends AIExtensionDataSource {
3
+ constructor();
4
+ addExtension(): void;
5
+ getExtensionId(): string;
6
+ enable(): void;
7
+ }
@@ -0,0 +1,6 @@
1
+ import { DataSourceDecorator } from "../../Shared/Framework/DataSourceDecorator";
2
+ import { DataSource } from "../../Shared/Framework/DataSource";
3
+ export declare class AIConversationStarterDecorator extends DataSourceDecorator {
4
+ constructor(dataSource: DataSource);
5
+ getId(): string;
6
+ }
@@ -0,0 +1,8 @@
1
+ import { AIExtensionDataSource } from "@cometchat/uikit-shared";
2
+ export declare class AIEnabler extends AIExtensionDataSource {
3
+ defaultAIFeatures: AIExtensionDataSource[] | undefined;
4
+ constructor(defaultFeatures?: AIExtensionDataSource[]);
5
+ addExtension(): void;
6
+ getExtensionId(): string;
7
+ enable(): void;
8
+ }
@@ -0,0 +1,7 @@
1
+ import { DataSource } from "../Shared/Framework/DataSource";
2
+ import { DataSourceDecorator } from "../Shared/Framework/DataSourceDecorator";
3
+ export declare class AIEnablerDecorator extends DataSourceDecorator {
4
+ newDataSource: DataSource;
5
+ constructor(dataSource: DataSource, features?: any);
6
+ getId(): string;
7
+ }
@@ -0,0 +1,7 @@
1
+ import { AIExtensionDataSource } from "@cometchat/uikit-shared";
2
+ export declare class AISmartRepliesExtension extends AIExtensionDataSource {
3
+ constructor();
4
+ addExtension(): void;
5
+ getExtensionId(): string;
6
+ enable(): void;
7
+ }
@@ -0,0 +1,6 @@
1
+ import { DataSource } from "../../Shared/Framework/DataSource";
2
+ import { DataSourceDecorator } from "../../Shared/Framework/DataSourceDecorator";
3
+ export declare class AISmartRepliesExtensionDecorator extends DataSourceDecorator {
4
+ constructor(dataSource: DataSource);
5
+ getId(): string;
6
+ }
@@ -1,6 +1,4 @@
1
1
  import { OnInit, OnChanges, SimpleChanges, ChangeDetectorRef, ElementRef } from "@angular/core";
2
- import { CometChatMessagesComponent } from "../../CometChatMessages/cometchat-messages/cometchat-messages.component";
3
- import { CometChatConversationsComponent } from "../../CometChatConversations/cometchat-conversations/cometchat-conversations.component";
4
2
  import { WithMessagesStyle, MessagesConfiguration, ConversationsConfiguration, ContactsConfiguration } from '@cometchat/uikit-shared';
5
3
  import { CometChatTheme } from '@cometchat/uikit-resources';
6
4
  import '@cometchat/uikit-elements';
@@ -20,8 +18,6 @@ export declare class CometChatConversationsWithMessagesComponent implements OnIn
20
18
  private elementRef;
21
19
  private ref;
22
20
  private themeService;
23
- conversationRef: CometChatConversationsComponent;
24
- messageListRef: CometChatMessagesComponent;
25
21
  user: CometChat.User | null;
26
22
  group: CometChat.Group | null;
27
23
  isMobileView: boolean;
@@ -3,11 +3,9 @@ import * as i1 from "./cometchat-conversations-with-messages/cometchat-conversat
3
3
  import * as i2 from "@angular/common";
4
4
  import * as i3 from "../CometChatConversations/cometchat-conversations.module";
5
5
  import * as i4 from "../CometChatMessages/cometchat-messages.module";
6
- import * as i5 from "@angular/platform-browser";
7
- import * as i6 from "@angular/platform-browser/animations";
8
- import * as i7 from "../CometChatContacts/cometchat-contacts.module";
6
+ import * as i5 from "../CometChatContacts/cometchat-contacts.module";
9
7
  export declare class CometChatConversationsWithMessages {
10
8
  static ɵfac: i0.ɵɵFactoryDeclaration<CometChatConversationsWithMessages, never>;
11
- static ɵmod: i0.ɵɵNgModuleDeclaration<CometChatConversationsWithMessages, [typeof i1.CometChatConversationsWithMessagesComponent], [typeof i2.CommonModule, typeof i3.CometChatConversations, typeof i4.CometChatMessages, typeof i5.BrowserModule, typeof i6.BrowserAnimationsModule, typeof i7.CometChatContacts], [typeof i1.CometChatConversationsWithMessagesComponent]>;
9
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CometChatConversationsWithMessages, [typeof i1.CometChatConversationsWithMessagesComponent], [typeof i2.CommonModule, typeof i3.CometChatConversations, typeof i4.CometChatMessages, typeof i5.CometChatContacts], [typeof i1.CometChatConversationsWithMessagesComponent]>;
12
10
  static ɵinj: i0.ɵɵInjectorDeclaration<CometChatConversationsWithMessages>;
13
11
  }
@@ -3,11 +3,9 @@ import * as i1 from "./cometchat-groups-with-messages/cometchat-groups-with-mess
3
3
  import * as i2 from "@angular/common";
4
4
  import * as i3 from "../CometChatGroups/cometchat-groups.module";
5
5
  import * as i4 from "../CometChatMessages/cometchat-messages.module";
6
- import * as i5 from "@angular/platform-browser";
7
- import * as i6 from "@angular/platform-browser/animations";
8
- import * as i7 from "../CometChatMessageHeader/cometchat-message-header.module";
6
+ import * as i5 from "../CometChatMessageHeader/cometchat-message-header.module";
9
7
  export declare class CometChatGroupsWithMessages {
10
8
  static ɵfac: i0.ɵɵFactoryDeclaration<CometChatGroupsWithMessages, never>;
11
- static ɵmod: i0.ɵɵNgModuleDeclaration<CometChatGroupsWithMessages, [typeof i1.CometChatGroupsWithMessagesComponent], [typeof i2.CommonModule, typeof i3.CometChatGroups, typeof i4.CometChatMessages, typeof i5.BrowserModule, typeof i6.BrowserAnimationsModule, typeof i7.CometChatMessageHeader], [typeof i1.CometChatGroupsWithMessagesComponent]>;
9
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CometChatGroupsWithMessages, [typeof i1.CometChatGroupsWithMessagesComponent], [typeof i2.CommonModule, typeof i3.CometChatGroups, typeof i4.CometChatMessages, typeof i5.CometChatMessageHeader], [typeof i1.CometChatGroupsWithMessagesComponent]>;
12
10
  static ɵinj: i0.ɵɵInjectorDeclaration<CometChatGroupsWithMessages>;
13
11
  }
@@ -6,6 +6,7 @@ import { MessageComposerStyle, StickersConfiguration, StickersStyle, CreatePollS
6
6
  import { CometChatThemeService } from '../../CometChatTheme.service';
7
7
  import '@cometchat/uikit-shared';
8
8
  import '@cometchat/uikit-elements';
9
+ import { Buttons } from '../../Shared/Views/CometChatCardView/cometchat-card-view/cometchat-card-view.component';
9
10
  import * as i0 from "@angular/core";
10
11
  /**
11
12
  *
@@ -25,6 +26,7 @@ export declare class CometChatMessageComposerComponent implements OnInit, OnChan
25
26
  actionSheetRef: ElementRef;
26
27
  stickerButtonRef: ElementRef;
27
28
  mediaRecordedRef: ElementRef;
29
+ aiButtonRef: ElementRef;
28
30
  user: CometChat.User;
29
31
  group: CometChat.Group;
30
32
  disableSoundForMessages: boolean;
@@ -59,9 +61,12 @@ export declare class CometChatMessageComposerComponent implements OnInit, OnChan
59
61
  showCreatePolls: boolean;
60
62
  showStickerKeyboard: boolean;
61
63
  showActionSheetItem: boolean;
64
+ showAiFeatures: boolean;
62
65
  showPreview: boolean;
66
+ aiFeaturesCloseCallback: (() => void) | null;
63
67
  editPreviewObject: CometChat.TextMessage;
64
68
  ccMessageEdit: Subscription;
69
+ ccComposeMessage: Subscription;
65
70
  acceptHandlers: any;
66
71
  enableStickerKeyboard: boolean;
67
72
  toggleMediaRecorded: boolean;
@@ -70,6 +75,7 @@ export declare class CometChatMessageComposerComponent implements OnInit, OnChan
70
75
  configuration?: StickersConfiguration;
71
76
  };
72
77
  closeButtonIconURL: string;
78
+ buttons: Buttons[];
73
79
  sendButtonStyle: any;
74
80
  liveReactionStyle: any;
75
81
  localize: typeof localize;
@@ -84,6 +90,7 @@ export declare class CometChatMessageComposerComponent implements OnInit, OnChan
84
90
  storeTypingInterval: any;
85
91
  emojiPopover: PopoverStyle;
86
92
  stickerPopover: PopoverStyle;
93
+ aiPopover: PopoverStyle;
87
94
  mediaRecordedPopover: PopoverStyle;
88
95
  popoverStyle: PopoverStyle;
89
96
  sendButtonIconURL: string;
@@ -98,6 +105,8 @@ export declare class CometChatMessageComposerComponent implements OnInit, OnChan
98
105
  messageToBeEdited: CometChat.TextMessage;
99
106
  showSendButton: boolean;
100
107
  showEmojiKeyboard: boolean;
108
+ isAiEnabled: boolean;
109
+ smartReplies: string[];
101
110
  loggedInUser: CometChat.User | null;
102
111
  sendMessageOnEnter: (event: any) => void;
103
112
  messageInputChanged: (event: any) => void;
@@ -114,6 +123,7 @@ export declare class CometChatMessageComposerComponent implements OnInit, OnChan
114
123
  subscribeToEvents(): void;
115
124
  openEditPreview(): void;
116
125
  unsubscribeToEvents(): void;
126
+ closeModals(): void;
117
127
  constructor(ref: ChangeDetectorRef, themeService: CometChatThemeService);
118
128
  ngOnChanges(changes: SimpleChanges): void;
119
129
  customSendMethod(message: String): void;
@@ -162,12 +172,16 @@ export declare class CometChatMessageComposerComponent implements OnInit, OnChan
162
172
  openvideoPicker: () => void;
163
173
  openAudioPicker: () => void;
164
174
  openActionSheet: (event: any) => void;
175
+ handleAiFeaturesClose: (callback: () => void) => void;
176
+ openAiFeatures: (event: any) => void;
165
177
  openEmojiKeyboard: (event: any) => void;
166
178
  openMediaRecorded: (event: any) => void;
167
179
  openStickerKeyboard: (event: any) => void;
168
180
  closePopovers(): void;
169
181
  getComposerId(): ComposerId;
170
182
  ngOnInit(): void;
183
+ getSmartReplies: () => Promise<unknown>;
184
+ enableAiFeatures(): void;
171
185
  composerWrapperStyle(): {
172
186
  background: string | undefined;
173
187
  };
@@ -2,8 +2,9 @@ import '@cometchat/uikit-elements';
2
2
  import * as i0 from "@angular/core";
3
3
  import * as i1 from "./cometchat-message-composer/cometchat-message-composer.component";
4
4
  import * as i2 from "@angular/common";
5
+ import * as i3 from "../Shared/Views/CometChatCardView/cometchat-card-view.module";
5
6
  export declare class CometChatMessageComposer {
6
7
  static ɵfac: i0.ɵɵFactoryDeclaration<CometChatMessageComposer, never>;
7
- static ɵmod: i0.ɵɵNgModuleDeclaration<CometChatMessageComposer, [typeof i1.CometChatMessageComposerComponent], [typeof i2.CommonModule], [typeof i1.CometChatMessageComposerComponent]>;
8
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CometChatMessageComposer, [typeof i1.CometChatMessageComposerComponent], [typeof i2.CommonModule, typeof i3.CometChatCardView], [typeof i1.CometChatMessageComposerComponent]>;
8
9
  static ɵinj: i0.ɵɵInjectorDeclaration<CometChatMessageComposer>;
9
10
  }
@@ -80,12 +80,20 @@ export declare class CometChatMessageListComponent implements OnInit, OnDestroy,
80
80
  imageModerationStyle: ImageModerationStyle;
81
81
  timestampEnum: typeof TimestampAlignment;
82
82
  chatChanged: boolean;
83
+ starterErrorStateText: string;
84
+ starterEmptyStateText: string;
85
+ starterLoadingStateText: string;
83
86
  requestBuilder: any;
84
87
  closeImageModeration: any;
85
88
  timeStampColor: string;
86
89
  timeStampFont: string;
87
90
  smartReplyStyle: SmartRepliesStyle;
91
+ conversationStarterStyle: SmartRepliesStyle;
88
92
  showSmartReply: boolean;
93
+ enableConversationStarter: boolean;
94
+ showConversationStarter: boolean;
95
+ conversationStarterState: States;
96
+ conversationStarterReplies: string[];
89
97
  ccHidePanel: Subscription;
90
98
  ccShowPanel: Subscription;
91
99
  smartReplyMessage: CometChat.BaseMessage | null;
@@ -494,6 +502,8 @@ export declare class CometChatMessageListComponent implements OnInit, OnDestroy,
494
502
  subscribeToEvents(): void;
495
503
  closeSmartReply: () => void;
496
504
  sendReply: (event: any) => void;
505
+ sendConversationStarter: (event: any) => void;
506
+ fetchConversationStarter(): void;
497
507
  getReplies(): string[] | null;
498
508
  unsubscribeToEvents(): void;
499
509
  /**
@@ -510,6 +520,10 @@ export declare class CometChatMessageListComponent implements OnInit, OnDestroy,
510
520
  textFont: string | undefined;
511
521
  textColor: string | undefined;
512
522
  };
523
+ conversationStarterStateStyle: () => {
524
+ textFont: string;
525
+ textColor: string | undefined;
526
+ };
513
527
  emptyStyle: () => {
514
528
  textFont: string | undefined;
515
529
  textColor: string | undefined;
@@ -517,6 +531,9 @@ export declare class CometChatMessageListComponent implements OnInit, OnDestroy,
517
531
  loadingStyle: () => {
518
532
  iconTint: string | undefined;
519
533
  };
534
+ conversationStarterLoader: () => {
535
+ iconTint: string | undefined;
536
+ };
520
537
  wrapperStyle: () => {
521
538
  height: string | undefined;
522
539
  width: string | undefined;
@@ -1,6 +1,4 @@
1
1
  import { OnInit, OnChanges, SimpleChanges, ChangeDetectorRef, TemplateRef } from "@angular/core";
2
- import { CometChatMessageComposerComponent } from "../../CometChatMessageComposer/cometchat-message-composer/cometchat-message-composer.component";
3
- import { CometChatMessageListComponent } from "../../CometChatMessageList/cometchat-message-list/cometchat-message-list.component";
4
2
  import { AvatarStyle, ListItemStyle, BaseStyle } from '@cometchat/uikit-elements';
5
3
  import { Subscription } from "rxjs";
6
4
  import { CometChatThemeService } from "../../CometChatTheme.service";
@@ -18,8 +16,6 @@ import * as i0 from "@angular/core";
18
16
  export declare class CometChatThreadedMessagesComponent implements OnInit, OnChanges {
19
17
  private ref;
20
18
  private themeService;
21
- messageComposerRef: CometChatMessageComposerComponent;
22
- messageListRef: CometChatMessageListComponent;
23
19
  onClose: (() => void) | null;
24
20
  onError: ((error: CometChat.CometChatException) => void) | null;
25
21
  parentMessage: any;
@@ -3,10 +3,8 @@ import * as i1 from "./cometchat-users-with-messages/cometchat-users-with-messag
3
3
  import * as i2 from "@angular/common";
4
4
  import * as i3 from "../CometChatUsers/cometchat-users.module";
5
5
  import * as i4 from "../CometChatMessages/cometchat-messages.module";
6
- import * as i5 from "@angular/platform-browser";
7
- import * as i6 from "@angular/platform-browser/animations";
8
6
  export declare class CometChatUsersWithMessages {
9
7
  static ɵfac: i0.ɵɵFactoryDeclaration<CometChatUsersWithMessages, never>;
10
- static ɵmod: i0.ɵɵNgModuleDeclaration<CometChatUsersWithMessages, [typeof i1.CometChatUsersWithMessagesComponent], [typeof i2.CommonModule, typeof i3.CometChatUsers, typeof i4.CometChatMessages, typeof i5.BrowserModule, typeof i6.BrowserAnimationsModule], [typeof i1.CometChatUsersWithMessagesComponent]>;
8
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CometChatUsersWithMessages, [typeof i1.CometChatUsersWithMessagesComponent], [typeof i2.CommonModule, typeof i3.CometChatUsers, typeof i4.CometChatMessages], [typeof i1.CometChatUsersWithMessagesComponent]>;
11
9
  static ɵinj: i0.ɵɵInjectorDeclaration<CometChatUsersWithMessages>;
12
10
  }
package/LICENSE.md ADDED
@@ -0,0 +1,3 @@
1
+ Copyright (c) 2023 CometChat Inc.
2
+
3
+ License agreement: https://www.cometchat.com/legal-terms-of-service
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  <br>
5
5
  <div align="center">Full-fledged Chat UIKit built with <a href="https://angular.io/">Angular</a>. </div>
6
6
  <div align="center">
7
- <a href="https://www.cometchat.com/docs/v4/angular-v4-uikit/overview"><strong>Explore CometChat docs »</strong></a>
7
+ <a href="https://www.cometchat.com/docs/v4/angular-uikit/overview"><strong>Explore CometChat docs »</strong></a>
8
8
  </div>
9
9
  <br />
10
10
  <br />
@@ -34,8 +34,8 @@ CometChat Angular UIKit provides pre-built user interface kit that developers ca
34
34
  To set up Angular Chat UIKit and utilize CometChat for your chat functionality, you'll need to follow these steps:
35
35
  - Registration: Go to the CometChat website (https://www.cometchat.com/) and sign up for an account.
36
36
  - Create an App: After registering, log in to your CometChat account and create a new app. Provide the necessary details such as the app name, platform (Angular), and other relevant information. Once you've created the app, CometChat will generate an Auth Key and App ID for you. Make sure to keep these credentials secure, as you'll need them later.
37
- - Make sure you've read the [key concepts](https://www.cometchat.com/docs/v4/angular-v4-uikit/key-concepts)
38
- - Follow the steps provided in the integration section [here](https://www.cometchat.com/docs/v4/angular-v4-uikit/integration#getting-started)
37
+ - Make sure you've read the [key concepts](https://www.cometchat.com/docs/v4/angular-uikit/key-concepts)
38
+ - Follow the steps provided in the integration section [here](https://www.cometchat.com/docs/v4/angular-uikit/integration#getting-started)
39
39
 
40
40
 
41
41
  ## Versioning
@@ -0,0 +1,71 @@
1
+ import { OnInit, ChangeDetectorRef } from '@angular/core';
2
+ import '@cometchat/uikit-elements';
3
+ import { CometChatTheme, States, localize } from '@cometchat/uikit-resources';
4
+ import { CometChatThemeService } from '../../../../CometChatTheme.service';
5
+ import * as i0 from "@angular/core";
6
+ export declare class CometChatCardViewComponent implements OnInit {
7
+ private themeService;
8
+ private ref;
9
+ buttons: Buttons[];
10
+ closeCallback: ((callback: () => void) => void) | null;
11
+ replies: string[];
12
+ currentSection: Buttons | undefined;
13
+ activeButtonText: string;
14
+ state: States;
15
+ states: typeof States;
16
+ errorStateText: string;
17
+ emptyStateText: string;
18
+ loadingStateText: string;
19
+ theme: CometChatTheme;
20
+ localize: typeof localize;
21
+ constructor(themeService: CometChatThemeService, ref: ChangeDetectorRef);
22
+ fetchButtonContent(button: Buttons): void;
23
+ handleGoBack: () => void;
24
+ ngOnInit(): void;
25
+ stateLoader: () => {
26
+ iconTint: string | undefined;
27
+ };
28
+ repliesStateStyle: () => {
29
+ textFont: string;
30
+ textColor: string | undefined;
31
+ };
32
+ buttonStyles(): {
33
+ height: string;
34
+ width: string;
35
+ padding: string;
36
+ background: string | undefined;
37
+ border: string;
38
+ borderRadius: string;
39
+ buttonTextColor: string | undefined;
40
+ buttonTextFont: string;
41
+ margin: string;
42
+ };
43
+ repliesViewStyle(): {
44
+ width: string;
45
+ padding: string;
46
+ background: string | undefined;
47
+ border: string;
48
+ borderRadius: string;
49
+ buttonTextColor: string | undefined;
50
+ buttonTextFont: string;
51
+ margin: string;
52
+ };
53
+ backButtonStyle(): {
54
+ height: string;
55
+ width: string;
56
+ background: string;
57
+ border: string;
58
+ buttonIconTint: string | undefined;
59
+ position: string;
60
+ top: string;
61
+ left: string;
62
+ zIndex: number;
63
+ };
64
+ static ɵfac: i0.ɵɵFactoryDeclaration<CometChatCardViewComponent, never>;
65
+ static ɵcmp: i0.ɵɵComponentDeclaration<CometChatCardViewComponent, "cometchat-card-view", never, { "buttons": "buttons"; "closeCallback": "closeCallback"; }, {}, never, never>;
66
+ }
67
+ export interface Buttons {
68
+ title: string;
69
+ id: string;
70
+ onClick: () => Promise<unknown>;
71
+ }
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./cometchat-card-view/cometchat-card-view.component";
3
+ import * as i2 from "@angular/common";
4
+ export declare class CometChatCardView {
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<CometChatCardView, never>;
6
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CometChatCardView, [typeof i1.CometChatCardViewComponent], [typeof i2.CommonModule], [typeof i1.CometChatCardViewComponent]>;
7
+ static ɵinj: i0.ɵɵInjectorDeclaration<CometChatCardView>;
8
+ }
File without changes
@@ -0,0 +1,24 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
3
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
+ <svg version="1.0" xmlns="http://www.w3.org/2000/svg"
5
+ width="100.000000pt" height="100.000000pt" viewBox="0 0 100.000000 100.000000"
6
+ preserveAspectRatio="xMidYMid meet">
7
+
8
+ <g transform="translate(0.000000,100.000000) scale(0.100000,-0.100000)"
9
+ fill="#000000" stroke="none">
10
+ <path d="M727 854 c-4 -4 -7 -15 -7 -24 0 -21 -28 -47 -55 -52 -14 -2 -20 -11
11
+ -20 -28 0 -17 6 -26 20 -28 28 -6 53 -30 57 -56 2 -15 10 -21 28 -21 18 0 26
12
+ 6 28 21 4 26 29 50 57 56 29 5 28 52 -1 56 -26 4 -51 29 -56 57 -3 20 -37 32
13
+ -51 19z"/>
14
+ <path d="M350 761 c-5 -11 -10 -32 -10 -48 -1 -74 -86 -160 -178 -178 -50 -10
15
+ -57 -14 -57 -36 0 -20 6 -25 42 -31 117 -20 170 -76 198 -211 12 -58 65 -38
16
+ 65 25 0 84 88 168 193 186 36 6 42 11 42 31 0 22 -7 26 -56 36 -91 18 -162 84
17
+ -175 165 -12 76 -41 104 -64 61z m80 -212 c14 -14 33 -30 43 -35 15 -9 10 -17
18
+ -40 -69 l-58 -60 -57 59 c-57 59 -57 60 -35 75 30 20 87 82 88 95 0 6 8 0 17
19
+ -14 9 -14 28 -37 42 -51z"/>
20
+ <path d="M727 354 c-4 -4 -7 -15 -7 -24 0 -21 -28 -47 -55 -52 -14 -2 -20 -11
21
+ -20 -28 0 -17 6 -26 20 -28 28 -6 53 -30 57 -56 4 -30 52 -30 56 0 4 26 29 50
22
+ 57 56 29 5 28 52 -1 56 -26 4 -51 29 -56 57 -3 20 -37 32 -51 19z"/>
23
+ </g>
24
+ </svg>
@@ -0,0 +1,22 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
3
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
+ <svg version="1.0" xmlns="http://www.w3.org/2000/svg"
5
+ width="100.000000pt" height="100.000000pt" viewBox="0 0 100.000000 100.000000"
6
+ preserveAspectRatio="xMidYMid meet">
7
+
8
+ <g transform="translate(0.000000,100.000000) scale(0.100000,-0.100000)"
9
+ fill="#000000" stroke="none">
10
+ <path d="M375 847 c-221 -73 -326 -269 -254 -472 l22 -62 -25 -74 c-14 -41
11
+ -23 -80 -21 -86 6 -17 42 -15 138 6 77 17 82 17 138 -1 72 -22 199 -25 216 -4
12
+ 6 7 9 21 5 30 -5 13 -21 16 -79 16 -44 0 -98 8 -136 19 -58 18 -67 19 -123 6
13
+ -89 -21 -88 -23 -65 42 l20 58 -26 56 c-52 116 -25 240 69 327 77 71 123 87
14
+ 246 87 123 0 169 -16 245 -86 64 -59 88 -108 94 -199 5 -68 8 -75 28 -78 36
15
+ -5 48 38 33 118 -22 125 -94 215 -218 273 -59 28 -79 32 -167 34 -63 2 -115
16
+ -2 -140 -10z"/>
17
+ <path d="M687 313 c-16 -15 -4 -42 38 -83 l45 -44 -45 -46 c-47 -48 -56 -74
18
+ -28 -84 11 -5 31 8 64 40 l48 47 50 -46 c54 -50 61 -53 79 -35 18 18 15 25
19
+ -35 79 l-46 50 48 49 c41 42 46 51 35 65 -19 23 -30 19 -80 -30 l-46 -45 -44
20
+ 45 c-41 42 -68 54 -83 38z"/>
21
+ </g>
22
+ </svg>
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
3
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
+ <svg version="1.0" xmlns="http://www.w3.org/2000/svg"
5
+ width="100.000000pt" height="100.000000pt" viewBox="0 0 100.000000 100.000000"
6
+ preserveAspectRatio="xMidYMid meet">
7
+
8
+ <g transform="translate(0.000000,100.000000) scale(0.100000,-0.100000)"
9
+ fill="#000000" stroke="none">
10
+ <path d="M375 847 c-221 -73 -326 -269 -254 -472 l22 -62 -25 -74 c-14 -41
11
+ -23 -80 -21 -86 6 -17 42 -15 138 6 77 17 82 17 138 -1 91 -28 257 -20 278 13
12
+ 12 20 -9 52 -29 44 -9 -4 -51 -10 -94 -12 -59 -4 -92 -1 -145 15 -63 19 -72
13
+ 20 -128 7 -88 -21 -87 -23 -64 42 l20 58 -26 56 c-52 116 -25 240 69 327 77
14
+ 71 123 87 246 87 87 0 113 -4 152 -22 101 -47 188 -160 188 -246 0 -69 36
15
+ -102 61 -56 8 16 8 37 -1 83 -24 122 -96 212 -218 269 -59 28 -79 32 -167 34
16
+ -63 2 -115 -2 -140 -10z"/>
17
+ <path d="M764 347 c-2 -8 -4 -47 -2 -88 3 -71 4 -74 28 -74 25 0 25 1 25 85 0
18
+ 81 -1 85 -23 88 -12 2 -24 -3 -28 -11z"/>
19
+ <path d="M764 95 c-4 -9 0 -23 8 -31 20 -20 50 -7 46 20 -4 26 -45 35 -54 11z"/>
20
+ </g>
21
+ </svg>
File without changes
package/assets/mic.svg CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/assets/stop.svg CHANGED
File without changes
@@ -0,0 +1,18 @@
1
+ import { AIExtensionDataSource } from "@cometchat/uikit-shared";
2
+ import { ChatConfigurator } from "../../Shared/Framework/ChatConfigurator";
3
+ import { AIConversationStarterDecorator } from "./AIConversationStarterDecorator";
4
+ export class AIConversationStarterExtension extends AIExtensionDataSource {
5
+ constructor() {
6
+ super();
7
+ }
8
+ addExtension() {
9
+ ChatConfigurator.enable((dataSource) => new AIConversationStarterDecorator(dataSource));
10
+ }
11
+ getExtensionId() {
12
+ return "conversation-starter";
13
+ }
14
+ enable() {
15
+ this.addExtension();
16
+ }
17
+ }
18
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQUlDb252ZXJzYXRpb25TdGFydGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY2hhdC11aWtpdC1hbmd1bGFyL3NyYy9BSS9BSUNvbnZlcnNhdGlvblN0YXJ0ZXIvQUlDb252ZXJzYXRpb25TdGFydGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBc0MscUJBQXFCLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUNwRyxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSx5Q0FBeUMsQ0FBQztBQUMzRSxPQUFPLEVBQUcsOEJBQThCLEVBQUUsTUFBTSxrQ0FBa0MsQ0FBQztBQUNuRixNQUFNLE9BQU8sOEJBQStCLFNBQVEscUJBQXFCO0lBQ3ZFO1FBQ0UsS0FBSyxFQUFFLENBQUE7SUFFVCxDQUFDO0lBQ1EsWUFBWTtRQUNuQixnQkFBZ0IsQ0FBQyxNQUFNLENBQUMsQ0FBQyxVQUFlLEVBQUUsRUFBRSxDQUFDLElBQUksOEJBQThCLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQztJQUMvRixDQUFDO0lBQ1EsY0FBYztRQUNyQixPQUFPLHNCQUFzQixDQUFDO0lBQ2hDLENBQUM7SUFDUSxNQUFNO1FBQ2IsSUFBSSxDQUFDLFlBQVksRUFBRSxDQUFBO0lBQ3JCLENBQUM7Q0FFRiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEFJQ29udmVyc2F0aW9uU3RhcnRlckNvbmZpZ3VyYXRpb24sIEFJRXh0ZW5zaW9uRGF0YVNvdXJjZSB9IGZyb20gXCJAY29tZXRjaGF0L3Vpa2l0LXNoYXJlZFwiO1xuaW1wb3J0IHsgQ2hhdENvbmZpZ3VyYXRvciB9IGZyb20gXCIuLi8uLi9TaGFyZWQvRnJhbWV3b3JrL0NoYXRDb25maWd1cmF0b3JcIjtcbmltcG9ydCB7ICBBSUNvbnZlcnNhdGlvblN0YXJ0ZXJEZWNvcmF0b3IgfSBmcm9tIFwiLi9BSUNvbnZlcnNhdGlvblN0YXJ0ZXJEZWNvcmF0b3JcIjtcbmV4cG9ydCBjbGFzcyBBSUNvbnZlcnNhdGlvblN0YXJ0ZXJFeHRlbnNpb24gZXh0ZW5kcyBBSUV4dGVuc2lvbkRhdGFTb3VyY2Uge1xuICBjb25zdHJ1Y3Rvcigpe1xuICAgIHN1cGVyKClcblxuICB9XG4gIG92ZXJyaWRlIGFkZEV4dGVuc2lvbigpOiB2b2lkIHtcbiAgICBDaGF0Q29uZmlndXJhdG9yLmVuYWJsZSgoZGF0YVNvdXJjZTogYW55KSA9PiBuZXcgQUlDb252ZXJzYXRpb25TdGFydGVyRGVjb3JhdG9yKGRhdGFTb3VyY2UpKTtcbiAgfVxuICBvdmVycmlkZSBnZXRFeHRlbnNpb25JZCgpOiBzdHJpbmcge1xuICAgIHJldHVybiBcImNvbnZlcnNhdGlvbi1zdGFydGVyXCI7XG4gIH1cbiAgb3ZlcnJpZGUgZW5hYmxlKCk6IHZvaWQge1xuICAgIHRoaXMuYWRkRXh0ZW5zaW9uKClcbiAgfVxuXG59Il19
@@ -0,0 +1,10 @@
1
+ import { DataSourceDecorator } from "../../Shared/Framework/DataSourceDecorator";
2
+ export class AIConversationStarterDecorator extends DataSourceDecorator {
3
+ constructor(dataSource) {
4
+ super(dataSource);
5
+ }
6
+ getId() {
7
+ return "aiconversationstarter";
8
+ }
9
+ }
10
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQUlDb252ZXJzYXRpb25TdGFydGVyRGVjb3Jh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YXJ0ZXJcIlxufVxufVxuXG5cblxuIl19
@@ -0,0 +1,70 @@
1
+ import { ChatConfigurator } from "./../Shared/Framework/ChatConfigurator";
2
+ import { AIEnablerDecorator } from "./AIEnablerDecorator";
3
+ import { CometChat } from "@cometchat/chat-sdk-javascript";
4
+ import { AISmartRepliesExtension } from "./AISmartReplies/AISmartReplies";
5
+ import { AIConversationStarterExtension } from "./AIConversationStarter/AIConversationStarter";
6
+ import { AIExtensionDataSource } from "@cometchat/uikit-shared";
7
+ export class AIEnabler extends AIExtensionDataSource {
8
+ constructor(defaultFeatures) {
9
+ super();
10
+ this.defaultAIFeatures = defaultFeatures;
11
+ }
12
+ addExtension() {
13
+ }
14
+ getExtensionId() {
15
+ return "ai-enabler";
16
+ }
17
+ enable() {
18
+ let features = {};
19
+ const processFeatures = (feature) => {
20
+ return CometChat.isAIFeatureEnabled(feature.getExtensionId())
21
+ .then((response) => {
22
+ if (response) {
23
+ feature?.enable();
24
+ if (feature.getExtensionId() !== "conversation-starter") {
25
+ features[feature.getExtensionId()] = {
26
+ enabled: true,
27
+ configuration: feature.getConfiguration(),
28
+ enabler: feature,
29
+ };
30
+ }
31
+ }
32
+ })
33
+ .catch((err) => {
34
+ console.error(err);
35
+ });
36
+ };
37
+ if (this.defaultAIFeatures && this.defaultAIFeatures.length >= 1) {
38
+ const promises = this.defaultAIFeatures.map((feature) => processFeatures(feature));
39
+ Promise.all(promises)
40
+ .then(() => {
41
+ if (Object.keys(features).length > 0) {
42
+ ChatConfigurator.enable((dataSource) => new AIEnablerDecorator(dataSource, features));
43
+ }
44
+ })
45
+ .catch((err) => {
46
+ console.error(err);
47
+ });
48
+ }
49
+ else if (this.defaultAIFeatures?.length === 0) {
50
+ return;
51
+ }
52
+ else {
53
+ const defaultFeatures = [
54
+ new AISmartRepliesExtension(),
55
+ new AIConversationStarterExtension(),
56
+ ];
57
+ const promises = defaultFeatures.map((feature) => processFeatures(feature));
58
+ Promise.all(promises)
59
+ .then(() => {
60
+ if (Object.keys(features).length > 0) {
61
+ ChatConfigurator.enable((dataSource) => new AIEnablerDecorator(dataSource, features));
62
+ }
63
+ })
64
+ .catch((err) => {
65
+ console.error(err);
66
+ });
67
+ }
68
+ }
69
+ }
70
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQUlFbmFibGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvY2hhdC11aWtpdC1hbmd1bGFyL3NyYy9BSS9BSUVuYWJsZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sd0NBQXdDLENBQUM7QUFDMUUsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDMUQsT0FBTyxFQUFDLFNBQVMsRUFBQyxNQUFNLGdDQUFnQyxDQUFDO0FBQ3pELE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBQzFFLE9BQU8sRUFBRSw4QkFBOEIsRUFBRSxNQUFNLCtDQUErQyxDQUFDO0FBQy9GLE9BQU8sRUFBMEIscUJBQXFCLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUN4RixNQUFNLE9BQU8sU0FBVSxTQUFRLHFCQUFxQjtJQUVoRCxZQUFZLGVBQXdDO1FBQ2hELEtBQUssRUFBRSxDQUFBO1FBQ1AsSUFBSSxDQUFDLGlCQUFpQixHQUFHLGVBQWUsQ0FBQTtJQUM1QyxDQUFDO0lBQ00sWUFBWTtJQUVyQixDQUFDO0lBQ1EsY0FBYztRQUNyQixPQUFPLFlBQVksQ0FBQztJQUN0QixDQUFDO0lBQ1EsTUFBTTtRQUNiLElBQUksUUFBUSxHQUFRLEVBQUUsQ0FBQztRQUV2QixNQUFNLGVBQWUsR0FBRyxDQUFDLE9BQThCLEVBQUUsRUFBR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XTtcbiAgXG4gICAgICBjb25zdCBwcm9taXNlcyA9IGRlZmF1bHRGZWF0dXJlcy5tYXAoKGZlYXR1cmUpID0+XG4gICAgICAgIHByb2Nlc3NGZWF0dXJlcyhmZWF0dXJlKVxuICAgICAgKTtcbiAgXG4gICAgICBQcm9taXNlLmFsbChwcm9taXNlcylcbiAgICAgICAgLnRoZW4oKCkgPT4ge1xuICAgICAgICAgIGlmIChPYmplY3Qua2V5cyhmZWF0dXJlcykubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgQ2hhdENvbmZpZ3VyYXRvci5lbmFibGUoXG4gICAgICAgICAgICAgIChkYXRhU291cmNlOiBEYXRhU291cmNlKSA9PlxuICAgICAgICAgICAgICAgIG5ldyBBSUVuYWJsZXJEZWNvcmF0b3IoZGF0YVNvdXJjZSwgZmVhdHVyZXMpXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSlcbiAgICAgICAgLmNhdGNoKChlcnIpID0+IHtcbiAgICAgICAgICBjb25zb2xlLmVycm9yKGVycik7XG4gICAgICAgIH0pO1xuICAgIH1cbiAgfVxuXG59Il19
@@ -0,0 +1,10 @@
1
+ import { DataSourceDecorator } from "../Shared/Framework/DataSourceDecorator";
2
+ export class AIEnablerDecorator extends DataSourceDecorator {
3
+ constructor(dataSource, features) {
4
+ super(dataSource);
5
+ }
6
+ getId() {
7
+ return "aienabler";
8
+ }
9
+ }
10
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQUlFbmFibGVyRGVjb3JhdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvY2hhdC11aWtpdC1hbmd1bGFyL3NyYy9BSS9BSUVuYWJsZXJEZWNvcmF0b3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFFLG1CQUFtQixFQUFFLE1BQU0seUNBQXlDLENBQUM7QUFFOUUsTUFBTSxPQUFPLGtCQUFtQixTQUFRLG1CQUFtQjtJQUkzRCxZQUFZLFVBQXFCLEVBQUUsUUFBYTtRQUM1QyxLQUFLLENBQUMsVUFBVSxDQUFDLENBQUM7SUFLdEIsQ0FBQztJQUNRLEtBQUs7UUFDVixPQUFPLFdBQVcsQ0FBQTtJQUV0QixDQUFDO0NBQ0EiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBEYXRhU291cmNlIH0gZnJvbSBcIi4uL1NoYXJlZC9GcmFtZXdvcmsvRGF0YVNvdXJjZVwiO1xuaW1wb3J0IHsgRGF0YVNvdXJjZURlY29yYXRvciB9IGZyb20gXCIuLi9TaGFyZWQvRnJhbWV3b3JrL0RhdGFTb3VyY2VEZWNvcmF0b3JcIjtcblxuZXhwb3J0IGNsYXNzIEFJRW5hYmxlckRlY29yYXRvciBleHRlbmRzIERhdGFTb3VyY2VEZWNvcmF0b3Ige1xuXG4gICAgcHVibGljIG5ld0RhdGFTb3VyY2UhOiBEYXRhU291cmNlO1xuICAgXG5jb25zdHJ1Y3RvcihkYXRhU291cmNlOkRhdGFTb3VyY2UsIGZlYXR1cmVzPzphbnkpe1xuICAgIHN1cGVyKGRhdGFTb3VyY2UpO1xuXG5cbiBcblxufVxub3ZlcnJpZGUgZ2V0SWQoKXtcbiAgICByZXR1cm4gXCJhaWVuYWJsZXJcIlxuXG59XG59XG5cblxuXG5cblxuXG5cbiJdfQ==
@@ -0,0 +1,18 @@
1
+ import { AIExtensionDataSource } from "@cometchat/uikit-shared";
2
+ import { ChatConfigurator } from "../../Shared/Framework/ChatConfigurator";
3
+ import { AISmartRepliesExtensionDecorator } from "./AISmartRepliesDecorator";
4
+ export class AISmartRepliesExtension extends AIExtensionDataSource {
5
+ constructor() {
6
+ super();
7
+ }
8
+ addExtension() {
9
+ ChatConfigurator.enable((dataSource) => new AISmartRepliesExtensionDecorator(dataSource));
10
+ }
11
+ getExtensionId() {
12
+ return "smart-replies";
13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