@aslaluroba/help-center 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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aslaluroba/help-center",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"peerDependencies": {
|
|
@@ -13,9 +13,13 @@
|
|
|
13
13
|
"zone.js": ">=0.15.0"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"
|
|
16
|
+
"@iconify-json/solar": "^1.2.5",
|
|
17
|
+
"@tailwindcss/postcss": "^4.1.18",
|
|
18
|
+
"ably": "^2.17.0",
|
|
17
19
|
"clsx": "^2.1.1",
|
|
18
|
-
"
|
|
20
|
+
"iconify-icon": "^3.0.2",
|
|
21
|
+
"marked": "^17.0.1",
|
|
22
|
+
"postcss": "^8.5.6",
|
|
19
23
|
"prismjs": "^1.30.0",
|
|
20
24
|
"tslib": "^2.8.1"
|
|
21
25
|
},
|
|
@@ -43,13 +47,13 @@
|
|
|
43
47
|
},
|
|
44
48
|
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e",
|
|
45
49
|
"module": "fesm2022/aslaluroba-help-center.mjs",
|
|
46
|
-
"typings": "
|
|
50
|
+
"typings": "types/aslaluroba-help-center.d.ts",
|
|
47
51
|
"exports": {
|
|
48
52
|
"./package.json": {
|
|
49
53
|
"default": "./package.json"
|
|
50
54
|
},
|
|
51
55
|
".": {
|
|
52
|
-
"types": "./
|
|
56
|
+
"types": "./types/aslaluroba-help-center.d.ts",
|
|
53
57
|
"default": "./fesm2022/aslaluroba-help-center.mjs"
|
|
54
58
|
}
|
|
55
59
|
}
|
|
@@ -33,7 +33,7 @@ interface Option {
|
|
|
33
33
|
order: number;
|
|
34
34
|
icon?: string;
|
|
35
35
|
}
|
|
36
|
-
interface Message
|
|
36
|
+
interface Message {
|
|
37
37
|
id: string | number;
|
|
38
38
|
sender: 'user' | 'assistant' | 'agent';
|
|
39
39
|
senderType: number;
|
|
@@ -41,11 +41,22 @@ interface Message$1 {
|
|
|
41
41
|
sentAt: Date;
|
|
42
42
|
isSeen: boolean;
|
|
43
43
|
attachmentIds?: string[];
|
|
44
|
+
isReviewMessage?: boolean;
|
|
44
45
|
}
|
|
45
46
|
interface Tenant {
|
|
46
47
|
id: string;
|
|
47
48
|
name: string;
|
|
48
49
|
key: string;
|
|
50
|
+
logoUrl?: string | null;
|
|
51
|
+
autoCloseSessions?: boolean;
|
|
52
|
+
autoCloseSessionsAfter?: number;
|
|
53
|
+
settings?: {
|
|
54
|
+
description?: string;
|
|
55
|
+
theme?: {
|
|
56
|
+
primaryColor?: string;
|
|
57
|
+
secondaryColor?: string;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
49
60
|
}
|
|
50
61
|
interface Assistant {
|
|
51
62
|
id: string;
|
|
@@ -122,22 +133,12 @@ interface UploadResult {
|
|
|
122
133
|
error?: string;
|
|
123
134
|
}
|
|
124
135
|
|
|
125
|
-
interface Message {
|
|
126
|
-
id: string | number;
|
|
127
|
-
sender: 'user' | 'assistant' | 'agent';
|
|
128
|
-
senderType: number;
|
|
129
|
-
messageContent: string;
|
|
130
|
-
sentAt: Date;
|
|
131
|
-
isSeen: boolean;
|
|
132
|
-
attachmentIds?: string[];
|
|
133
|
-
}
|
|
134
136
|
declare class HelpCenterWidgetComponent implements OnInit, OnDestroy {
|
|
135
137
|
getToken: _angular_core.InputSignal<() => Promise<string>>;
|
|
136
138
|
helpScreenId: _angular_core.InputSignal<string>;
|
|
137
139
|
showArrow: _angular_core.InputSignal<boolean>;
|
|
138
140
|
messageLabel: _angular_core.InputSignal<string>;
|
|
139
141
|
currentLang: _angular_core.InputSignal<string>;
|
|
140
|
-
isIntroScreenEnabled: _angular_core.InputSignal<boolean>;
|
|
141
142
|
primaryColor: _angular_core.InputSignal<string>;
|
|
142
143
|
logoUrl: _angular_core.InputSignal<string>;
|
|
143
144
|
chatMessagesContainer: ElementRef;
|
|
@@ -168,6 +169,8 @@ declare class HelpCenterWidgetComponent implements OnInit, OnDestroy {
|
|
|
168
169
|
isSubmittingReview: _angular_core.WritableSignal<boolean>;
|
|
169
170
|
isStartingNewChat: _angular_core.WritableSignal<boolean>;
|
|
170
171
|
pendingNewChatOption: _angular_core.WritableSignal<Option>;
|
|
172
|
+
hasUserSentMessages: _angular_core.WritableSignal<boolean>;
|
|
173
|
+
closedSessionIdForReview: _angular_core.WritableSignal<string>;
|
|
171
174
|
private apiService;
|
|
172
175
|
private translationService;
|
|
173
176
|
private themeService;
|
|
@@ -208,27 +211,25 @@ declare class HelpCenterWidgetComponent implements OnInit, OnDestroy {
|
|
|
208
211
|
rating: number;
|
|
209
212
|
comment: string;
|
|
210
213
|
}): Promise<void>;
|
|
214
|
+
handleReviewClose(): void;
|
|
211
215
|
handleReviewSkip(): Promise<void>;
|
|
212
216
|
private endChatSession;
|
|
217
|
+
private closeSessionOnly;
|
|
213
218
|
cancelEndChat(): void;
|
|
219
|
+
closeEndChat(): void;
|
|
214
220
|
confirmStartNewChat(): Promise<void>;
|
|
215
221
|
cancelStartNewChat(): void;
|
|
222
|
+
closeStartNewChat(): void;
|
|
216
223
|
private clearCurrentChat;
|
|
217
224
|
private startNewChatWithOption;
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
* @deprecated Use chatSessionService.closeSession() instead
|
|
221
|
-
* @private
|
|
222
|
-
*/
|
|
223
|
-
private closeChatSession;
|
|
224
|
-
handleClosePopup(): void;
|
|
225
|
+
handleClosePopup(): Promise<void>;
|
|
226
|
+
handleMinimizePopup(): void;
|
|
225
227
|
handleCloseArrowAnimation(): void;
|
|
226
228
|
handleBack(): void;
|
|
227
229
|
handleShowChat(): void;
|
|
228
230
|
selectOption(option: Option): void;
|
|
229
231
|
selectNestedOption(nestedOption: Option): void;
|
|
230
232
|
handleShowHelpScreenData(): void;
|
|
231
|
-
handleHideHelpScreenData(): void;
|
|
232
233
|
private scrollTimeout?;
|
|
233
234
|
private scrollToBottom;
|
|
234
235
|
getDirection(): "ltr" | "rtl";
|
|
@@ -240,8 +241,14 @@ declare class HelpCenterWidgetComponent implements OnInit, OnDestroy {
|
|
|
240
241
|
action: () => Promise<void>;
|
|
241
242
|
}[];
|
|
242
243
|
navigateToUrl(url: string): void;
|
|
244
|
+
private addReviewMessageToChat;
|
|
245
|
+
handleReviewSubmitFromChat(reviewData: {
|
|
246
|
+
rating: number;
|
|
247
|
+
comment: string;
|
|
248
|
+
}): Promise<void>;
|
|
249
|
+
handleReviewSkipFromChat(): Promise<void>;
|
|
243
250
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HelpCenterWidgetComponent, never>;
|
|
244
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<HelpCenterWidgetComponent, "app-help-center-widget", never, { "getToken": { "alias": "getToken"; "required": true; "isSignal": true; }; "helpScreenId": { "alias": "helpScreenId"; "required": true; "isSignal": true; }; "showArrow": { "alias": "showArrow"; "required": false; "isSignal": true; }; "messageLabel": { "alias": "messageLabel"; "required": false; "isSignal": true; }; "currentLang": { "alias": "currentLang"; "required": false; "isSignal": true; }; "
|
|
251
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<HelpCenterWidgetComponent, "app-help-center-widget", never, { "getToken": { "alias": "getToken"; "required": true; "isSignal": true; }; "helpScreenId": { "alias": "helpScreenId"; "required": true; "isSignal": true; }; "showArrow": { "alias": "showArrow"; "required": false; "isSignal": true; }; "messageLabel": { "alias": "messageLabel"; "required": false; "isSignal": true; }; "currentLang": { "alias": "currentLang"; "required": false; "isSignal": true; }; "primaryColor": { "alias": "primaryColor"; "required": false; "isSignal": true; }; "logoUrl": { "alias": "logoUrl"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
245
252
|
}
|
|
246
253
|
|
|
247
254
|
type GetTokenFn = () => Promise<string>;
|
|
@@ -389,7 +396,7 @@ declare class TokenService {
|
|
|
389
396
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<TokenService>;
|
|
390
397
|
}
|
|
391
398
|
|
|
392
|
-
type TranslationKey = 'ChatIntroMessage' | 'BabylaiTitle' | 'BabylaiDescription' | 'ChatNow' | 'TryBableAI' | 'ContactUs' | '
|
|
399
|
+
type TranslationKey = 'ChatIntroMessage' | 'BabylaiTitle' | 'BabylaiDescription' | 'ChatNow' | 'TryBableAI' | 'ContactUs' | 'HelpCenter' | 'BabylAI' | 'ChatPlaceholder' | 'PoweredByBabylAI' | 'EndChat' | 'LeavingDialogTitle' | 'LeavingDialogBody' | 'StartNewChatDialogTitle' | 'StartNewChatDialogBody' | 'ReviewDialogTitle' | 'ReviewDialogDescription' | 'ReviewDialogRatingLabel' | 'ReviewDialogCommentLabel' | 'ReviewDialogCommentPlaceholder' | 'ReviewDialogSubmitButton' | 'ReviewDialogSkipButton' | 'Confirm' | 'Cancel' | 'Close' | 'Back' | 'title' | 'ErrorFetchingHelpScreen' | 'ErrorSendingMessage' | 'ErrorStartingChat' | 'ErrorEndingChat' | 'ErrorSubmittingReview' | 'ErrorClosingChat' | 'ErrorCreatingSession' | 'ErrorNetworkFailure' | 'ErrorUnknown' | 'ErrorMessageTooLong' | 'ErrorMessageEmpty' | 'CloseChat' | 'Continue';
|
|
393
400
|
/**
|
|
394
401
|
* Service for managing translations and language switching.
|
|
395
402
|
*
|
|
@@ -411,7 +418,7 @@ declare class TranslationService {
|
|
|
411
418
|
* @example
|
|
412
419
|
* ```typescript
|
|
413
420
|
* const message = translationService.translate('ChatNow');
|
|
414
|
-
* // Returns 'Chat
|
|
421
|
+
* // Returns 'Let\'s Chat' in English or 'دعنا نتحدث' in Arabic
|
|
415
422
|
* ```
|
|
416
423
|
*/
|
|
417
424
|
translate(key: TranslationKey): string;
|
|
@@ -594,4 +601,4 @@ interface ApiConfig {
|
|
|
594
601
|
}
|
|
595
602
|
|
|
596
603
|
export { ApiService, ChatSessionService, HelpCenterConfigService, HelpCenterWidgetComponent, LanguageService, TokenService, TranslatePipe, TranslationService };
|
|
597
|
-
export type { ApiConfig, Assistant, GetTokenFn, HelpScreenData, HelpScreenFile, HelpScreenOption, Language, Message
|
|
604
|
+
export type { ApiConfig, Assistant, GetTokenFn, HelpScreenData, HelpScreenFile, HelpScreenOption, Language, Message, Option, PresignDownloadResponse, PresignUploadRequestDto, PresignUploadResponse, SelectedFileDto, Tenant, TokenResponse, TranslationKey, UploadResult };
|