@aslaluroba/help-center 3.0.14 → 3.1.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.
- package/fesm2022/aslaluroba-help-center.mjs +881 -307
- package/fesm2022/aslaluroba-help-center.mjs.map +1 -1
- package/index.d.ts +5 -275
- package/package.json +2 -2
- package/public_api.d.ts +12 -0
- package/src/app/chat/chat.component.d.ts +38 -0
- package/src/app/chat/components/chat-avatar/chat-avatar.component.d.ts +8 -0
- package/src/app/chat/components/chat-input/chat-input.component.d.ts +42 -0
- package/src/app/chat/components/chat-message/chat-message.component.d.ts +18 -0
- package/src/app/chat/components/chat-separator/chat-separator.component.d.ts +5 -0
- package/src/app/chat/components/chat-typing-indicator/chat-typing-indicator.component.d.ts +5 -0
- package/src/app/chat/components/image-attachment/image-attachment.component.d.ts +18 -0
- package/src/app/chat/components/image-preview-dialog/image-preview-dialog.component.d.ts +25 -0
- package/src/app/help-center-widget/components/arrow-animation/arrow-animation.component.d.ts +11 -0
- package/src/app/help-center-widget/components/footer/footer.component.d.ts +7 -0
- package/src/app/help-center-widget/components/help-button/help-button.component.d.ts +8 -0
- package/src/app/help-center-widget/components/help-popup/help-popup.component.d.ts +105 -0
- package/src/app/help-center-widget/components/index.d.ts +5 -0
- package/src/app/help-center-widget/components/intro-section/intro-section.component.d.ts +11 -0
- package/src/app/help-center-widget/help-center-widget.component.d.ts +134 -0
- package/src/app/help-screen-data/help-screen-data.component.d.ts +59 -0
- package/src/app/language.service.d.ts +11 -0
- package/src/app/pipes/translate.pipe.d.ts +9 -0
- package/src/app/services/ably.service.d.ts +13 -0
- package/src/app/services/api.service.d.ts +16 -0
- package/src/app/services/file-upload.service.d.ts +33 -0
- package/src/app/services/help-center-config.service.d.ts +12 -0
- package/src/app/services/theme.service.d.ts +40 -0
- package/src/app/services/token.service.d.ts +10 -0
- package/src/app/services/translation.service.d.ts +15 -0
- package/src/app/shared/components/back-button/back-button.component.d.ts +10 -0
- package/src/app/shared/components/back-button/index.d.ts +1 -0
- package/src/app/shared/components/button/button.component.d.ts +36 -0
- package/src/app/shared/components/button/index.d.ts +1 -0
- package/src/app/shared/components/card/card.component.d.ts +38 -0
- package/src/app/shared/components/card/index.d.ts +1 -0
- package/src/app/shared/components/chat-header/chat-header.component.d.ts +11 -0
- package/src/app/shared/components/chat-header/index.d.ts +1 -0
- package/src/app/shared/components/close-button/close-button.component.d.ts +9 -0
- package/src/app/shared/components/close-button/index.d.ts +1 -0
- package/src/app/shared/components/confirmation-dialog/confirmation-dialog.component.d.ts +12 -0
- package/src/app/shared/components/confirmation-dialog/index.d.ts +1 -0
- package/src/app/shared/components/header/header.component.d.ts +16 -0
- package/src/app/shared/components/header/index.d.ts +1 -0
- package/src/app/shared/components/index.d.ts +13 -0
- package/src/app/shared/components/loading/index.d.ts +1 -0
- package/src/app/shared/components/loading/loading.component.d.ts +6 -0
- package/src/app/shared/components/logo/index.d.ts +1 -0
- package/src/app/shared/components/logo/logo.component.d.ts +9 -0
- package/src/app/shared/components/markdown-renderer/index.d.ts +1 -0
- package/src/app/shared/components/markdown-renderer/markdown-renderer.component.d.ts +16 -0
- package/src/app/shared/components/menu-dropdown/index.d.ts +1 -0
- package/src/app/shared/components/menu-dropdown/menu-dropdown.component.d.ts +11 -0
- package/src/app/shared/components/review-dialog/index.d.ts +1 -0
- package/src/app/shared/components/review-dialog/review-dialog.component.d.ts +32 -0
- package/src/app/shared/components/simple-close-button/index.d.ts +1 -0
- package/src/app/shared/components/simple-close-button/simple-close-button.component.d.ts +7 -0
- package/src/app/types.d.ts +73 -0
package/index.d.ts
CHANGED
|
@@ -1,275 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
interface TokenResponse {
|
|
7
|
-
token: string;
|
|
8
|
-
expiresIn: number;
|
|
9
|
-
}
|
|
10
|
-
interface Option$1 {
|
|
11
|
-
id: string;
|
|
12
|
-
helpScreenId: string;
|
|
13
|
-
parentOptionId: string | null;
|
|
14
|
-
nestedOptions: Option$1[];
|
|
15
|
-
title: string;
|
|
16
|
-
paragraphs: string[];
|
|
17
|
-
chatWithUs: boolean;
|
|
18
|
-
assistantId?: string;
|
|
19
|
-
assistant?: {
|
|
20
|
-
id: string;
|
|
21
|
-
tenantId: string;
|
|
22
|
-
tenant: {
|
|
23
|
-
id: string;
|
|
24
|
-
name: string;
|
|
25
|
-
key: string;
|
|
26
|
-
};
|
|
27
|
-
name: string;
|
|
28
|
-
openAIAssistantId: string;
|
|
29
|
-
greeting: string;
|
|
30
|
-
closing: string;
|
|
31
|
-
};
|
|
32
|
-
hasNestedOptions: boolean;
|
|
33
|
-
order: number;
|
|
34
|
-
}
|
|
35
|
-
interface Message$1 {
|
|
36
|
-
id: string | number;
|
|
37
|
-
sender: 'user' | 'assistant' | 'agent';
|
|
38
|
-
senderType: number;
|
|
39
|
-
messageContent: string;
|
|
40
|
-
sentAt: Date;
|
|
41
|
-
isSeen: boolean;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
declare class ApiService {
|
|
45
|
-
private getTokenFunction;
|
|
46
|
-
private baseUrl;
|
|
47
|
-
/**
|
|
48
|
-
* Initialize the API service with optional configuration
|
|
49
|
-
* @param config Configuration object containing token function and optional base URL
|
|
50
|
-
*/
|
|
51
|
-
initialize(config: ApiConfig): void;
|
|
52
|
-
getValidToken(forceRefresh?: boolean): Promise<string>;
|
|
53
|
-
private fetchWithAuth;
|
|
54
|
-
apiRequest(endpoint: string, method?: string, body?: any, customHeaders?: Record<string, string>): Promise<Response>;
|
|
55
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ApiService, never>;
|
|
56
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ApiService>;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
type TranslationKey = 'ChatIntroMessage' | 'BabylaiTitle' | 'BabylaiDescription' | 'ChatNow' | 'TryBableAI' | 'ContactUs' | 'PickTopicTitle' | 'BabylAI' | 'ChatPlaceholder' | 'PoweredByBabylAI' | 'EndChat' | 'LeavingDialogTitle' | 'LeavingDialogBody' | 'StartNewChatDialogTitle' | 'StartNewChatDialogBody' | 'ReviewDialogTitle' | 'ReviewDialogDescription' | 'ReviewDialogRatingLabel' | 'ReviewDialogCommentLabel' | 'ReviewDialogCommentPlaceholder' | 'ReviewDialogSubmitButton' | 'ReviewDialogSkipButton' | 'Confirm' | 'Cancel' | 'title';
|
|
60
|
-
declare class TranslationService {
|
|
61
|
-
private translations;
|
|
62
|
-
private _currentLang;
|
|
63
|
-
readonly currentLang: Observable<Language>;
|
|
64
|
-
constructor();
|
|
65
|
-
translate(key: TranslationKey): string;
|
|
66
|
-
setLanguage(lang: Language): void;
|
|
67
|
-
getCurrentLang(): Language;
|
|
68
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TranslationService, never>;
|
|
69
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<TranslationService>;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
declare class ThemeService {
|
|
73
|
-
private primaryColor;
|
|
74
|
-
private logoUrl;
|
|
75
|
-
private isDarkMode;
|
|
76
|
-
constructor();
|
|
77
|
-
/**
|
|
78
|
-
* Initialize dark mode detection based on browser preferences
|
|
79
|
-
*/
|
|
80
|
-
private initializeDarkModeDetection;
|
|
81
|
-
/**
|
|
82
|
-
* Update dark mode state based on current browser preference
|
|
83
|
-
*/
|
|
84
|
-
private updateDarkModeState;
|
|
85
|
-
/**
|
|
86
|
-
* Get current dark mode state
|
|
87
|
-
*/
|
|
88
|
-
getDarkModeState(): i0.Signal<boolean>;
|
|
89
|
-
/**
|
|
90
|
-
* Check if dark mode is currently active
|
|
91
|
-
*/
|
|
92
|
-
isDarkModeActive(): boolean;
|
|
93
|
-
setPrimaryColor(color: string): void;
|
|
94
|
-
setLogoUrl(url: string): void;
|
|
95
|
-
getPrimaryColor(): string;
|
|
96
|
-
getLogoUrl(): string;
|
|
97
|
-
private updateCSSVariables;
|
|
98
|
-
private generateColorVariations;
|
|
99
|
-
/**
|
|
100
|
-
* Lighten a color by a percentage
|
|
101
|
-
*/
|
|
102
|
-
private lightenColor;
|
|
103
|
-
/**
|
|
104
|
-
* Darken a color by a percentage
|
|
105
|
-
*/
|
|
106
|
-
private darkenColor;
|
|
107
|
-
initializeTheme(primaryColor: string, logoUrl: string): void;
|
|
108
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ThemeService, never>;
|
|
109
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ThemeService>;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
interface Option {
|
|
113
|
-
id: string;
|
|
114
|
-
helpScreenId: string;
|
|
115
|
-
parentOptionId: string | null;
|
|
116
|
-
nestedOptions: Option[];
|
|
117
|
-
title: string;
|
|
118
|
-
paragraphs: string[];
|
|
119
|
-
chatWithUs: boolean;
|
|
120
|
-
assistantId?: string;
|
|
121
|
-
assistant?: {
|
|
122
|
-
id: string;
|
|
123
|
-
tenantId: string;
|
|
124
|
-
tenant: {
|
|
125
|
-
id: string;
|
|
126
|
-
name: string;
|
|
127
|
-
key: string;
|
|
128
|
-
};
|
|
129
|
-
name: string;
|
|
130
|
-
openAIAssistantId: string;
|
|
131
|
-
greeting: string;
|
|
132
|
-
closing: string;
|
|
133
|
-
};
|
|
134
|
-
hasNestedOptions: boolean;
|
|
135
|
-
order: number;
|
|
136
|
-
}
|
|
137
|
-
interface Message {
|
|
138
|
-
id: string | number;
|
|
139
|
-
sender: 'user' | 'assistant' | 'agent';
|
|
140
|
-
senderType: number;
|
|
141
|
-
messageContent: string;
|
|
142
|
-
sentAt: Date;
|
|
143
|
-
isSeen: boolean;
|
|
144
|
-
}
|
|
145
|
-
declare class HelpCenterWidgetComponent implements OnInit, OnDestroy, OnChanges {
|
|
146
|
-
private apiService;
|
|
147
|
-
private translationService;
|
|
148
|
-
private themeService;
|
|
149
|
-
getToken: () => Promise<string>;
|
|
150
|
-
helpScreenId: string;
|
|
151
|
-
showArrow: boolean;
|
|
152
|
-
messageLabel: string | null;
|
|
153
|
-
set currentLang(value: string);
|
|
154
|
-
get currentLang(): string;
|
|
155
|
-
isIntroScreenEnabled: boolean;
|
|
156
|
-
primaryColor: string;
|
|
157
|
-
logoUrl: string;
|
|
158
|
-
chatMessagesContainer: ElementRef;
|
|
159
|
-
private _currentLang;
|
|
160
|
-
private langSubscription?;
|
|
161
|
-
isRTL: boolean;
|
|
162
|
-
isPopupOpen: boolean;
|
|
163
|
-
helpScreenData: any;
|
|
164
|
-
status: string;
|
|
165
|
-
error: string | null;
|
|
166
|
-
showArrowAnimation: boolean;
|
|
167
|
-
showTooltip: boolean;
|
|
168
|
-
sessionId: string | null;
|
|
169
|
-
isAblyConnected: boolean;
|
|
170
|
-
isChatClosed: boolean;
|
|
171
|
-
showChat: boolean;
|
|
172
|
-
messageText: string;
|
|
173
|
-
isTyping: boolean;
|
|
174
|
-
messages: Message[];
|
|
175
|
-
showHelpScreenData: boolean;
|
|
176
|
-
chatIsLoading: boolean;
|
|
177
|
-
ablyToken: string | null;
|
|
178
|
-
isOpen: boolean;
|
|
179
|
-
needsAgent: boolean;
|
|
180
|
-
assistantStatus: string;
|
|
181
|
-
selectedOption: Option | null;
|
|
182
|
-
selectedNestedOption: Option | null;
|
|
183
|
-
showEndChatConfirmation: boolean;
|
|
184
|
-
showStartNewChatConfirmation: boolean;
|
|
185
|
-
showReviewDialog: boolean;
|
|
186
|
-
isSubmittingReview: boolean;
|
|
187
|
-
pendingNewChatOption: Option | null;
|
|
188
|
-
constructor(apiService: ApiService, translationService: TranslationService, themeService: ThemeService);
|
|
189
|
-
ngOnInit(): void;
|
|
190
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
191
|
-
ngOnDestroy(): void;
|
|
192
|
-
handleTogglePopup(): Promise<void>;
|
|
193
|
-
private fetchHelpScreenData;
|
|
194
|
-
createChatSession(option?: Option): Promise<any>;
|
|
195
|
-
sendMessage(messageText?: string): Promise<void>;
|
|
196
|
-
handleReceiveMessage(message: string, senderType: string, needsAgent: boolean): void;
|
|
197
|
-
private getSenderType;
|
|
198
|
-
private hasActiveChatSession;
|
|
199
|
-
private isWelcomeMessage;
|
|
200
|
-
handleStartNewChat(option: Option): Promise<void>;
|
|
201
|
-
private startNewChatSession;
|
|
202
|
-
handleStartChat(option: any): Promise<void>;
|
|
203
|
-
handleEndChat(): Promise<void>;
|
|
204
|
-
confirmEndChat(): Promise<void>;
|
|
205
|
-
handleReviewSubmit(reviewData: {
|
|
206
|
-
rating: number;
|
|
207
|
-
comment: string;
|
|
208
|
-
}): Promise<void>;
|
|
209
|
-
handleReviewSkip(): Promise<void>;
|
|
210
|
-
private endChatSession;
|
|
211
|
-
cancelEndChat(): void;
|
|
212
|
-
confirmStartNewChat(): Promise<void>;
|
|
213
|
-
cancelStartNewChat(): void;
|
|
214
|
-
private clearCurrentChat;
|
|
215
|
-
private startNewChatWithOption;
|
|
216
|
-
closeChatSession(chatSessionId: string): Promise<any>;
|
|
217
|
-
handleClosePopup(): void;
|
|
218
|
-
handleCloseArrowAnimation(): void;
|
|
219
|
-
handleBack(): void;
|
|
220
|
-
handleShowChat(): void;
|
|
221
|
-
selectOption(option: Option): void;
|
|
222
|
-
selectNestedOption(nestedOption: Option): void;
|
|
223
|
-
handleShowHelpScreenData(): void;
|
|
224
|
-
handleHideHelpScreenData(): void;
|
|
225
|
-
private scrollToBottom;
|
|
226
|
-
getDirection(): "ltr" | "rtl";
|
|
227
|
-
get helpScreenDataList(): any;
|
|
228
|
-
navigateToUrl(url: string): void;
|
|
229
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<HelpCenterWidgetComponent, never>;
|
|
230
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<HelpCenterWidgetComponent, "app-help-center-widget", never, { "getToken": { "alias": "getToken"; "required": false; }; "helpScreenId": { "alias": "helpScreenId"; "required": false; }; "showArrow": { "alias": "showArrow"; "required": false; }; "messageLabel": { "alias": "messageLabel"; "required": false; }; "currentLang": { "alias": "currentLang"; "required": false; }; "isIntroScreenEnabled": { "alias": "isIntroScreenEnabled"; "required": false; }; "primaryColor": { "alias": "primaryColor"; "required": false; }; "logoUrl": { "alias": "logoUrl"; "required": false; }; }, {}, never, never, true, never>;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
type GetTokenFn = () => Promise<string>;
|
|
234
|
-
declare class HelpCenterConfigService {
|
|
235
|
-
private _apiBaseUrl;
|
|
236
|
-
private _getTokenFn?;
|
|
237
|
-
setApiBaseUrl(url: string): void;
|
|
238
|
-
getApiBaseUrl(): string;
|
|
239
|
-
setGetTokenFn(fn: GetTokenFn): void;
|
|
240
|
-
getTokenFn(): GetTokenFn | undefined;
|
|
241
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<HelpCenterConfigService, never>;
|
|
242
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<HelpCenterConfigService>;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
declare class TokenService {
|
|
246
|
-
private config;
|
|
247
|
-
constructor(config: HelpCenterConfigService);
|
|
248
|
-
getToken(): Promise<TokenResponse>;
|
|
249
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TokenService, never>;
|
|
250
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<TokenService>;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
declare class LanguageService {
|
|
254
|
-
private translationService;
|
|
255
|
-
constructor(translationService: TranslationService);
|
|
256
|
-
switchLanguage(language: Language): void;
|
|
257
|
-
getCurrentLang(): Language;
|
|
258
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<LanguageService, never>;
|
|
259
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<LanguageService>;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
declare class TranslatePipe implements PipeTransform {
|
|
263
|
-
private translationService;
|
|
264
|
-
transform(key: TranslationKey): string;
|
|
265
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TranslatePipe, never>;
|
|
266
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<TranslatePipe, "translate", true>;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
interface ApiConfig {
|
|
270
|
-
getToken: () => Promise<string>;
|
|
271
|
-
baseUrl?: string;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
export { ApiService, HelpCenterConfigService, HelpCenterWidgetComponent, LanguageService, TokenService, TranslatePipe, TranslationService };
|
|
275
|
-
export type { ApiConfig, GetTokenFn, Language, Message$1 as Message, Option$1 as Option, TokenResponse, TranslationKey };
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
/// <amd-module name="@aslaluroba/help-center" />
|
|
5
|
+
export * from './public_api';
|
package/package.json
CHANGED
package/public_api.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './src/app/types';
|
|
2
|
+
export interface ApiConfig {
|
|
3
|
+
getToken: () => Promise<string>;
|
|
4
|
+
baseUrl?: string;
|
|
5
|
+
}
|
|
6
|
+
export * from './src/app/help-center-widget/help-center-widget.component';
|
|
7
|
+
export * from './src/app/services/help-center-config.service';
|
|
8
|
+
export * from './src/app/services/api.service';
|
|
9
|
+
export * from './src/app/services/token.service';
|
|
10
|
+
export * from './src/app/services/translation.service';
|
|
11
|
+
export * from './src/app/language.service';
|
|
12
|
+
export * from './src/app/pipes/translate.pipe';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { EventEmitter, ElementRef, OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { Message } from '../types';
|
|
3
|
+
import 'prismjs';
|
|
4
|
+
import 'prismjs/components/prism-typescript';
|
|
5
|
+
import 'prismjs/components/prism-javascript';
|
|
6
|
+
import 'prismjs/components/prism-css';
|
|
7
|
+
import 'prismjs/components/prism-json';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export declare class ChatComponent implements OnInit, OnChanges {
|
|
10
|
+
messages: Message[];
|
|
11
|
+
needsAgent: boolean;
|
|
12
|
+
assistantStatus: string;
|
|
13
|
+
isAblyConnected: boolean;
|
|
14
|
+
isChatClosed: boolean;
|
|
15
|
+
currentLang: string;
|
|
16
|
+
loading: boolean;
|
|
17
|
+
sessionId: string | null;
|
|
18
|
+
sendMessageEvent: EventEmitter<{
|
|
19
|
+
text: string;
|
|
20
|
+
attachmentIds: string[];
|
|
21
|
+
pendingFiles?: File[];
|
|
22
|
+
}>;
|
|
23
|
+
chatMessagesContainer: ElementRef;
|
|
24
|
+
firstAgentMessageIndex: number;
|
|
25
|
+
ngOnInit(): void;
|
|
26
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
27
|
+
findFirstAgentMessageIndex(): void;
|
|
28
|
+
handleSendMessage(event: {
|
|
29
|
+
text: string;
|
|
30
|
+
attachmentIds: string[];
|
|
31
|
+
pendingFiles?: File[];
|
|
32
|
+
}): void;
|
|
33
|
+
ngAfterViewChecked(): void;
|
|
34
|
+
scrollToBottom(): void;
|
|
35
|
+
hasAgentMessageBeenSent(messages: any[]): boolean;
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatComponent, never>;
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChatComponent, "app-chat", never, { "messages": { "alias": "messages"; "required": false; }; "needsAgent": { "alias": "needsAgent"; "required": false; }; "assistantStatus": { "alias": "assistantStatus"; "required": false; }; "isAblyConnected": { "alias": "isAblyConnected"; "required": false; }; "isChatClosed": { "alias": "isChatClosed"; "required": false; }; "currentLang": { "alias": "currentLang"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "sessionId": { "alias": "sessionId"; "required": false; }; }, { "sendMessageEvent": "sendMessageEvent"; }, never, never, true, never>;
|
|
38
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class ChatAvatarComponent {
|
|
3
|
+
senderType: number;
|
|
4
|
+
needsAgent: boolean;
|
|
5
|
+
isHidden: boolean;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatAvatarComponent, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChatAvatarComponent, "app-chat-avatar", never, { "senderType": { "alias": "senderType"; "required": false; }; "needsAgent": { "alias": "needsAgent"; "required": false; }; "isHidden": { "alias": "isHidden"; "required": false; }; }, {}, never, never, true, never>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { EventEmitter, ElementRef, OnInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { SelectedFileDto } from '../../../types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ChatInputComponent implements OnInit, OnDestroy {
|
|
5
|
+
isChatClosed: boolean;
|
|
6
|
+
assistantStatus: string;
|
|
7
|
+
currentLang: string;
|
|
8
|
+
set sessionId(value: string | null);
|
|
9
|
+
get sessionId(): string | null;
|
|
10
|
+
private _sessionId;
|
|
11
|
+
sendMessage: EventEmitter<{
|
|
12
|
+
text: string;
|
|
13
|
+
attachmentIds: string[];
|
|
14
|
+
pendingFiles?: File[];
|
|
15
|
+
}>;
|
|
16
|
+
messageInput: ElementRef;
|
|
17
|
+
fileInput: ElementRef<HTMLInputElement>;
|
|
18
|
+
private readonly fileUploadService;
|
|
19
|
+
messageContent: import("@angular/core").WritableSignal<string>;
|
|
20
|
+
selectedFiles: import("@angular/core").WritableSignal<SelectedFileDto[]>;
|
|
21
|
+
previewImageUrl: import("@angular/core").WritableSignal<string>;
|
|
22
|
+
previewImageIndex: import("@angular/core").WritableSignal<number>;
|
|
23
|
+
isUploading: import("@angular/core").Signal<boolean>;
|
|
24
|
+
hasUploadErrors: import("@angular/core").Signal<boolean>;
|
|
25
|
+
canSend: import("@angular/core").Signal<boolean>;
|
|
26
|
+
ngOnInit(): void;
|
|
27
|
+
ngOnDestroy(): void;
|
|
28
|
+
handleFileSelect(event: Event): void;
|
|
29
|
+
handleAttachClick(): void;
|
|
30
|
+
removeFile(index: number): void;
|
|
31
|
+
/**
|
|
32
|
+
* Upload pending files that don't have an uploadedId yet
|
|
33
|
+
*/
|
|
34
|
+
uploadPendingFiles(): void;
|
|
35
|
+
uploadFiles(files: File[]): void;
|
|
36
|
+
handleSendMessage(): void;
|
|
37
|
+
handlePreviewImage(index: number): void;
|
|
38
|
+
closePreview(): void;
|
|
39
|
+
adjustTextareaHeight(): void;
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatInputComponent, never>;
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChatInputComponent, "app-chat-input", never, { "isChatClosed": { "alias": "isChatClosed"; "required": false; }; "assistantStatus": { "alias": "assistantStatus"; "required": false; }; "currentLang": { "alias": "currentLang"; "required": false; }; "sessionId": { "alias": "sessionId"; "required": false; }; }, { "sendMessage": "sendMessage"; }, never, never, true, never>;
|
|
42
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Message } from './../../../types';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ChatMessageComponent {
|
|
4
|
+
message: Message;
|
|
5
|
+
needsAgent: boolean;
|
|
6
|
+
currentLang: string;
|
|
7
|
+
isHidden: boolean;
|
|
8
|
+
private readonly fileUploadService;
|
|
9
|
+
previewImageUrls: import("@angular/core").WritableSignal<string[]>;
|
|
10
|
+
previewImageIndex: import("@angular/core").WritableSignal<number>;
|
|
11
|
+
isPreviewOpen: import("@angular/core").WritableSignal<boolean>;
|
|
12
|
+
hasAttachments: import("@angular/core").Signal<boolean>;
|
|
13
|
+
cleanMessageContent(content: string): string;
|
|
14
|
+
handleImageClick(clickedIndex: number): void;
|
|
15
|
+
closePreview(): void;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatMessageComponent, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChatMessageComponent, "app-chat-message", never, { "message": { "alias": "message"; "required": false; }; "needsAgent": { "alias": "needsAgent"; "required": false; }; "currentLang": { "alias": "currentLang"; "required": false; }; "isHidden": { "alias": "isHidden"; "required": false; }; }, {}, never, never, true, never>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class ChatSeparatorComponent {
|
|
3
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatSeparatorComponent, never>;
|
|
4
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChatSeparatorComponent, "app-chat-separator", never, {}, {}, never, never, true, never>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class ChatTypingIndicatorComponent {
|
|
3
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatTypingIndicatorComponent, never>;
|
|
4
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChatTypingIndicatorComponent, "app-chat-typing-indicator", never, {}, {}, never, never, true, never>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { EventEmitter, OnInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ImageAttachmentComponent implements OnInit, OnDestroy {
|
|
4
|
+
fileId: string;
|
|
5
|
+
enablePreview: boolean;
|
|
6
|
+
className: string;
|
|
7
|
+
imageClick: EventEmitter<void>;
|
|
8
|
+
private readonly fileUploadService;
|
|
9
|
+
imageUrl: import("@angular/core").WritableSignal<string>;
|
|
10
|
+
isLoading: import("@angular/core").WritableSignal<boolean>;
|
|
11
|
+
hasError: import("@angular/core").WritableSignal<boolean>;
|
|
12
|
+
ngOnInit(): void;
|
|
13
|
+
ngOnDestroy(): void;
|
|
14
|
+
private loadImage;
|
|
15
|
+
handleClick(): void;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ImageAttachmentComponent, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ImageAttachmentComponent, "app-image-attachment", never, { "fileId": { "alias": "fileId"; "required": false; }; "enablePreview": { "alias": "enablePreview"; "required": false; }; "className": { "alias": "className"; "required": false; }; }, { "imageClick": "imageClick"; }, never, never, true, never>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { EventEmitter, OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ImagePreviewDialogComponent implements OnInit, OnChanges {
|
|
4
|
+
imageUrls: string[];
|
|
5
|
+
initialIndex: number;
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
close: EventEmitter<void>;
|
|
8
|
+
currentIndex: import("@angular/core").WritableSignal<number>;
|
|
9
|
+
currentImageUrl: import("@angular/core").Signal<string>;
|
|
10
|
+
imageCounter: import("@angular/core").Signal<string>;
|
|
11
|
+
hasMultipleImages: import("@angular/core").Signal<boolean>;
|
|
12
|
+
canGoPrevious: import("@angular/core").Signal<boolean>;
|
|
13
|
+
canGoNext: import("@angular/core").Signal<boolean>;
|
|
14
|
+
ngOnInit(): void;
|
|
15
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
16
|
+
handleEscapeKey(event: KeyboardEvent): void;
|
|
17
|
+
handleArrowLeft(event: KeyboardEvent): void;
|
|
18
|
+
handleArrowRight(event: KeyboardEvent): void;
|
|
19
|
+
handleClose(): void;
|
|
20
|
+
handleBackdropClick(event: MouseEvent): void;
|
|
21
|
+
handlePrevious(): void;
|
|
22
|
+
handleNext(): void;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ImagePreviewDialogComponent, never>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ImagePreviewDialogComponent, "app-image-preview-dialog", never, { "imageUrls": { "alias": "imageUrls"; "required": false; }; "initialIndex": { "alias": "initialIndex"; "required": false; }; "isOpen": { "alias": "isOpen"; "required": false; }; }, { "close": "close"; }, never, never, true, never>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ArrowAnimationComponent {
|
|
4
|
+
showArrowAnimation: boolean;
|
|
5
|
+
isPopupOpen: boolean;
|
|
6
|
+
messageLabel: string | null;
|
|
7
|
+
closeArrowAnimation: EventEmitter<void>;
|
|
8
|
+
handleCloseArrowAnimation(): void;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ArrowAnimationComponent, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ArrowAnimationComponent, "app-arrow-animation", never, { "showArrowAnimation": { "alias": "showArrowAnimation"; "required": false; }; "isPopupOpen": { "alias": "isPopupOpen"; "required": false; }; "messageLabel": { "alias": "messageLabel"; "required": false; }; }, { "closeArrowAnimation": "closeArrowAnimation"; }, never, never, true, never>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class FooterComponent {
|
|
3
|
+
showHelpScreenData: boolean;
|
|
4
|
+
showChat: boolean;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FooterComponent, never>;
|
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FooterComponent, "app-footer", never, { "showHelpScreenData": { "alias": "showHelpScreenData"; "required": false; }; "showChat": { "alias": "showChat"; "required": false; }; }, {}, never, never, true, never>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class HelpButtonComponent {
|
|
4
|
+
togglePopup: EventEmitter<void>;
|
|
5
|
+
handleTogglePopup(): void;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HelpButtonComponent, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HelpButtonComponent, "app-help-button", never, {}, { "togglePopup": "togglePopup"; }, never, never, true, never>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
interface Option {
|
|
4
|
+
id: string;
|
|
5
|
+
helpScreenId: string;
|
|
6
|
+
parentOptionId: string | null;
|
|
7
|
+
nestedOptions: Option[];
|
|
8
|
+
title: string;
|
|
9
|
+
paragraphs: string[];
|
|
10
|
+
chatWithUs: boolean;
|
|
11
|
+
assistantId?: string;
|
|
12
|
+
assistant?: {
|
|
13
|
+
id: string;
|
|
14
|
+
tenantId: string;
|
|
15
|
+
tenant: {
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
key: string;
|
|
19
|
+
};
|
|
20
|
+
name: string;
|
|
21
|
+
openAIAssistantId: string;
|
|
22
|
+
greeting: string;
|
|
23
|
+
closing: string;
|
|
24
|
+
};
|
|
25
|
+
hasNestedOptions: boolean;
|
|
26
|
+
order: number;
|
|
27
|
+
}
|
|
28
|
+
interface Message {
|
|
29
|
+
id: string | number;
|
|
30
|
+
sender: 'user' | 'assistant' | 'agent';
|
|
31
|
+
senderType: number;
|
|
32
|
+
messageContent: string;
|
|
33
|
+
sentAt: Date;
|
|
34
|
+
isSeen: boolean;
|
|
35
|
+
}
|
|
36
|
+
export declare class HelpPopupComponent {
|
|
37
|
+
isPopupOpen: boolean;
|
|
38
|
+
showHelpScreenData: boolean;
|
|
39
|
+
showChat: boolean;
|
|
40
|
+
status: string;
|
|
41
|
+
error: string | null;
|
|
42
|
+
helpScreenData: any;
|
|
43
|
+
messages: Message[];
|
|
44
|
+
needsAgent: boolean;
|
|
45
|
+
assistantStatus: string;
|
|
46
|
+
isAblyConnected: boolean;
|
|
47
|
+
isChatClosed: boolean;
|
|
48
|
+
currentLang: string;
|
|
49
|
+
chatIsLoading: boolean;
|
|
50
|
+
sessionId: string | null;
|
|
51
|
+
isIntroScreenEnabled: boolean;
|
|
52
|
+
selectedOption: Option | null;
|
|
53
|
+
selectedNestedOption: Option | null;
|
|
54
|
+
showEndChatConfirmation: boolean;
|
|
55
|
+
showStartNewChatConfirmation: boolean;
|
|
56
|
+
showReviewDialog: boolean;
|
|
57
|
+
isSubmittingReview: boolean;
|
|
58
|
+
closePopup: EventEmitter<void>;
|
|
59
|
+
back: EventEmitter<void>;
|
|
60
|
+
showChatEvent: EventEmitter<void>;
|
|
61
|
+
endChat: EventEmitter<void>;
|
|
62
|
+
confirmEndChat: EventEmitter<void>;
|
|
63
|
+
cancelEndChat: EventEmitter<void>;
|
|
64
|
+
confirmStartNewChat: EventEmitter<void>;
|
|
65
|
+
cancelStartNewChat: EventEmitter<void>;
|
|
66
|
+
reviewSubmit: EventEmitter<{
|
|
67
|
+
rating: number;
|
|
68
|
+
comment: string;
|
|
69
|
+
}>;
|
|
70
|
+
reviewSkip: EventEmitter<void>;
|
|
71
|
+
sendMessageEvent: EventEmitter<{
|
|
72
|
+
text: string;
|
|
73
|
+
attachmentIds: string[];
|
|
74
|
+
pendingFiles?: File[];
|
|
75
|
+
}>;
|
|
76
|
+
startNewChat: EventEmitter<Option>;
|
|
77
|
+
showHelpScreenDataEvent: EventEmitter<void>;
|
|
78
|
+
hideHelpScreenData: EventEmitter<void>;
|
|
79
|
+
navigateToUrl: EventEmitter<string>;
|
|
80
|
+
handleClosePopup(): void;
|
|
81
|
+
handleBack(): void;
|
|
82
|
+
handleShowChat(): void;
|
|
83
|
+
handleEndChat(): void;
|
|
84
|
+
handleConfirmEndChat(): void;
|
|
85
|
+
handleCancelEndChat(): void;
|
|
86
|
+
handleConfirmStartNewChat(): void;
|
|
87
|
+
handleCancelStartNewChat(): void;
|
|
88
|
+
handleReviewSubmit(reviewData: {
|
|
89
|
+
rating: number;
|
|
90
|
+
comment: string;
|
|
91
|
+
}): void;
|
|
92
|
+
handleReviewSkip(): void;
|
|
93
|
+
handleSendMessage(event: {
|
|
94
|
+
text: string;
|
|
95
|
+
attachmentIds: string[];
|
|
96
|
+
pendingFiles?: File[];
|
|
97
|
+
}): void;
|
|
98
|
+
handleStartNewChat(option: Option): void;
|
|
99
|
+
handleShowHelpScreenData(): void;
|
|
100
|
+
handleHideHelpScreenData(): void;
|
|
101
|
+
handleNavigateToUrl(url: string): void;
|
|
102
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HelpPopupComponent, never>;
|
|
103
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HelpPopupComponent, "app-help-popup", never, { "isPopupOpen": { "alias": "isPopupOpen"; "required": false; }; "showHelpScreenData": { "alias": "showHelpScreenData"; "required": false; }; "showChat": { "alias": "showChat"; "required": false; }; "status": { "alias": "status"; "required": false; }; "error": { "alias": "error"; "required": false; }; "helpScreenData": { "alias": "helpScreenData"; "required": false; }; "messages": { "alias": "messages"; "required": false; }; "needsAgent": { "alias": "needsAgent"; "required": false; }; "assistantStatus": { "alias": "assistantStatus"; "required": false; }; "isAblyConnected": { "alias": "isAblyConnected"; "required": false; }; "isChatClosed": { "alias": "isChatClosed"; "required": false; }; "currentLang": { "alias": "currentLang"; "required": false; }; "chatIsLoading": { "alias": "chatIsLoading"; "required": false; }; "sessionId": { "alias": "sessionId"; "required": false; }; "isIntroScreenEnabled": { "alias": "isIntroScreenEnabled"; "required": false; }; "selectedOption": { "alias": "selectedOption"; "required": false; }; "selectedNestedOption": { "alias": "selectedNestedOption"; "required": false; }; "showEndChatConfirmation": { "alias": "showEndChatConfirmation"; "required": false; }; "showStartNewChatConfirmation": { "alias": "showStartNewChatConfirmation"; "required": false; }; "showReviewDialog": { "alias": "showReviewDialog"; "required": false; }; "isSubmittingReview": { "alias": "isSubmittingReview"; "required": false; }; }, { "closePopup": "closePopup"; "back": "back"; "showChatEvent": "showChatEvent"; "endChat": "endChat"; "confirmEndChat": "confirmEndChat"; "cancelEndChat": "cancelEndChat"; "confirmStartNewChat": "confirmStartNewChat"; "cancelStartNewChat": "cancelStartNewChat"; "reviewSubmit": "reviewSubmit"; "reviewSkip": "reviewSkip"; "sendMessageEvent": "sendMessageEvent"; "startNewChat": "startNewChat"; "showHelpScreenDataEvent": "showHelpScreenDataEvent"; "hideHelpScreenData": "hideHelpScreenData"; "navigateToUrl": "navigateToUrl"; }, never, never, true, never>;
|
|
104
|
+
}
|
|
105
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { ArrowAnimationComponent } from './arrow-animation/arrow-animation.component';
|
|
2
|
+
export { HelpButtonComponent } from './help-button/help-button.component';
|
|
3
|
+
export { HelpPopupComponent } from './help-popup/help-popup.component';
|
|
4
|
+
export { IntroSectionComponent } from './intro-section/intro-section.component';
|
|
5
|
+
export { FooterComponent } from './footer/footer.component';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class IntroSectionComponent {
|
|
4
|
+
currentLang: string;
|
|
5
|
+
showHelpScreenData: EventEmitter<void>;
|
|
6
|
+
navigateToUrl: EventEmitter<string>;
|
|
7
|
+
handleShowHelpScreenData(): void;
|
|
8
|
+
handleNavigateToUrl(url: string): void;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IntroSectionComponent, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IntroSectionComponent, "app-intro-section", never, { "currentLang": { "alias": "currentLang"; "required": false; }; }, { "showHelpScreenData": "showHelpScreenData"; "navigateToUrl": "navigateToUrl"; }, never, never, true, never>;
|
|
11
|
+
}
|