@aslaluroba/help-center 1.0.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/.editorconfig +17 -0
- package/README.md +76 -0
- package/angular.json +106 -0
- package/ng-package.json +29 -0
- package/package-lock.json +16479 -0
- package/package.json +62 -0
- package/postcss.config.js +6 -0
- package/proxy.conf.json +4 -0
- package/public/Shape.png +0 -0
- package/public/favicon.ico +0 -0
- package/public_api.ts +5 -0
- package/src/app/app.component.html +336 -0
- package/src/app/app.component.scss +0 -0
- package/src/app/app.component.spec.ts +29 -0
- package/src/app/app.component.ts +59 -0
- package/src/app/app.config.ts +47 -0
- package/src/app/app.routes.ts +3 -0
- package/src/app/chat/chat.component.html +102 -0
- package/src/app/chat/chat.component.ts +88 -0
- package/src/app/help-center-widget/help-center-widget.component.html +224 -0
- package/src/app/help-center-widget/help-center-widget.component.scss +427 -0
- package/src/app/help-center-widget/help-center-widget.component.spec.ts +23 -0
- package/src/app/help-center-widget/help-center-widget.component.ts +446 -0
- package/src/app/help-center-widget/help-center.module.ts +15 -0
- package/src/app/help-screen-data/help-screen-data.component.html +46 -0
- package/src/app/help-screen-data/help-screen-data.component.ts +83 -0
- package/src/app/language.service.ts +17 -0
- package/src/app/services/api.service.ts +89 -0
- package/src/app/services/help-center-config.service.ts +16 -0
- package/src/app/services/signalrService.service.ts +104 -0
- package/src/app/services/token.service.ts +44 -0
- package/src/app/shared/components/button/button.component.ts +81 -0
- package/src/app/shared/components/button/index.ts +1 -0
- package/src/app/shared/components/card/card.component.ts +106 -0
- package/src/app/shared/components/card/index.ts +1 -0
- package/src/app/shared/components/confirmation-dialog/confirmation-dialog.component.ts +40 -0
- package/src/app/shared/components/header/header.component.ts +119 -0
- package/src/app/shared/components/header/index.ts +1 -0
- package/src/app/shared/components/loading/loading.component.ts +14 -0
- package/src/app/shared/utils/class-utils.ts +9 -0
- package/src/app/transloco-loader.ts +12 -0
- package/src/assets/i18n/ar.json +17 -0
- package/src/assets/i18n/en.json +17 -0
- package/src/assets/icons/arrow-stripped-colored.svg +3 -0
- package/src/assets/icons/arrow-stripped.svg +3 -0
- package/src/assets/icons/chat.svg +4 -0
- package/src/assets/icons/close-circle.svg +3 -0
- package/src/assets/icons/menu.svg +3 -0
- package/src/assets/icons/person.svg +4 -0
- package/src/assets/icons/send.svg +3 -0
- package/src/assets/images/animatedLogo.gif +0 -0
- package/src/assets/images/seperator.svg +5 -0
- package/src/assets/images/stars.svg +7 -0
- package/src/assets/logo-primary.svg +6 -0
- package/src/assets/logo-white.svg +6 -0
- package/src/index.html +13 -0
- package/src/main.ts +5 -0
- package/src/styles.scss +43 -0
- package/tailwind.config.ts +175 -0
- package/transloco.config.ts +9 -0
- package/tsconfig.app.json +15 -0
- package/tsconfig.json +31 -0
- package/tsconfig.spec.json +15 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
<div class="babylai-flex babylai-flex-col babylai-h-full babylai-overflow-hidden">
|
|
2
|
+
<div class="babylai-flex-1 babylai-overflow-y-auto babylai-pb-4 babylai-flex babylai-flex-col babylai-gap-2" #chatMessagesContainer>
|
|
3
|
+
<div *ngFor="let message of messages; let i = index" class="babylai-flex babylai-flex-col babylai-gap-2">
|
|
4
|
+
<div class="babylai-w-full" *ngIf="i === firstAgentMessageIndex && message.senderType === 2">
|
|
5
|
+
<img src="/images/seperator.svg" class="babylai-w-full" />
|
|
6
|
+
</div>
|
|
7
|
+
<div class="babylai-flex babylai-items-start babylai-gap-2" [class.babylai-flex-row-reverse]="message.senderType === 1">
|
|
8
|
+
<div
|
|
9
|
+
class="babylai-messageIcon babylai-mt-2"
|
|
10
|
+
[class.babylai-invisible]="i > 0 && messages[i - 1].senderType === message.senderType"
|
|
11
|
+
>
|
|
12
|
+
@if (message.senderType === 3) {
|
|
13
|
+
<span
|
|
14
|
+
class="babylai-flex babylai-items-center babylai-justify-center babylai-w-10 babylai-h-10 babylai-rounded-full babylai-bg-primary babylai-p-[10px]"
|
|
15
|
+
>
|
|
16
|
+
<img src="/logo-white.svg" alt="robot" class="babylai-w-full" />
|
|
17
|
+
</span>
|
|
18
|
+
} @else if (needsAgent || message.senderType === 2) {
|
|
19
|
+
<span
|
|
20
|
+
class="babylai-flex babylai-items-center babylai-justify-center babylai-w-10 babylai-h-10 babylai-rounded-full babylai-bg-black-white-50 babylai-p-[10px]"
|
|
21
|
+
>
|
|
22
|
+
<img src="/icons/person.svg" alt="robot" class="babylai-w-full" />
|
|
23
|
+
</span>
|
|
24
|
+
}
|
|
25
|
+
</div>
|
|
26
|
+
<app-card
|
|
27
|
+
variant="rounded"
|
|
28
|
+
[class]="
|
|
29
|
+
'babylai-max-w-[80%] babylai-relative ' +
|
|
30
|
+
(message.senderType === 1
|
|
31
|
+
? 'babylai-self-start babylai-bg-primary babylai-text-white babylai-rtl'
|
|
32
|
+
: 'babylai-self-end babylai-bg-black-white-100 babylai-text-black babylai-rtl')
|
|
33
|
+
"
|
|
34
|
+
>
|
|
35
|
+
<app-card-content>
|
|
36
|
+
<div class="babylai-messageContent babylai-whitespace-pre-wrap">
|
|
37
|
+
<markdown
|
|
38
|
+
[data]="cleanMessageContent(message.messageContent)"
|
|
39
|
+
ngPreserveWhitespaces
|
|
40
|
+
[inline]="false"
|
|
41
|
+
class="babylai-prose babylai-max-w-none babylai-break-words [&>*:first-child]:babylai-mt-0 [&>*:last-child]:babylai-mb-0 [&>p]:babylai-my-2 [&>ul]:babylai-my-2 [&>ol]:babylai-my-2 [&>blockquote]:babylai-my-2"
|
|
42
|
+
[class.babylai-prose-invert]="message.senderType === 1"
|
|
43
|
+
>
|
|
44
|
+
</markdown>
|
|
45
|
+
</div>
|
|
46
|
+
</app-card-content>
|
|
47
|
+
</app-card>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<div *ngIf="assistantStatus === 'typing' && firstAgentMessageIndex === -1" class="babylai-flex babylai-items-start babylai-gap-2">
|
|
52
|
+
<div class="babylai-messageIcon babylai-mt-2">
|
|
53
|
+
<span
|
|
54
|
+
class="babylai-flex babylai-items-center babylai-justify-center babylai-w-10 babylai-h-10 babylai-rounded-full babylai-bg-black-white-50 babylai-p-[10px]"
|
|
55
|
+
>
|
|
56
|
+
<img src="/images/animatedLogo.gif" alt="Loading" class="babylai-w-full" />
|
|
57
|
+
</span>
|
|
58
|
+
</div>
|
|
59
|
+
<app-card
|
|
60
|
+
variant="rounded"
|
|
61
|
+
class="babylai-max-w-[80%] babylai-relative babylai-self-end babylai-bg-black-white-100 babylai-text-black"
|
|
62
|
+
>
|
|
63
|
+
<app-card-content>
|
|
64
|
+
<div id="wave">
|
|
65
|
+
<span class="dot"></span>
|
|
66
|
+
<span class="dot"></span>
|
|
67
|
+
<span class="dot"></span>
|
|
68
|
+
</div>
|
|
69
|
+
</app-card-content>
|
|
70
|
+
</app-card>
|
|
71
|
+
</div>
|
|
72
|
+
<div *ngIf="loading" class="babylai-flex babylai-items-center babylai-justify-center babylai-h-full">
|
|
73
|
+
<app-loading />
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
<form (ngSubmit)="sendMessage()" class="babylai-relative">
|
|
78
|
+
<div class="babylai-relative babylai-w-full">
|
|
79
|
+
<input
|
|
80
|
+
type="text"
|
|
81
|
+
[(ngModel)]="messageText"
|
|
82
|
+
name="messageText"
|
|
83
|
+
[placeholder]="'ChatPlaceholder' | transloco"
|
|
84
|
+
[disabled]="isChatClosed"
|
|
85
|
+
class="babylai-flex-1 babylai-min-h-16 babylai-w-full babylai-ps-3 babylai-pe-12 babylai-rounded-full focus:babylai-outline-none babylai-px-0 babylai-py-2 disabled:babylai-bg-black-white-200"
|
|
86
|
+
/>
|
|
87
|
+
<app-button
|
|
88
|
+
type="submit"
|
|
89
|
+
[disabled]="!messageText.trim() || !isSignalRConnected || isChatClosed"
|
|
90
|
+
variant="icon-bg"
|
|
91
|
+
className="babylai-absolute babylai-end-1 babylai-top-1/2 babylai-transform -babylai-translate-y-1/2 babylai-w-10 babylai-h-10 babylai-opacity-100 babylai-py-0 babylai-px-0 !babylai-p-3 babylai-inline-flex babylai-items-center babylai-justify-center disabled:babylai-opacity-50 disabled:babylai-cursor-not-allowed"
|
|
92
|
+
>
|
|
93
|
+
<img
|
|
94
|
+
src="/icons/send.svg"
|
|
95
|
+
alt="send-message"
|
|
96
|
+
class="babylai-w-full"
|
|
97
|
+
[ngClass]="currentLang === 'ar' ? 'babylai-rotate-[270deg]' : ''"
|
|
98
|
+
/>
|
|
99
|
+
</app-button>
|
|
100
|
+
</div>
|
|
101
|
+
</form>
|
|
102
|
+
</div>
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { Component, Input, Output, EventEmitter, ViewChild, ElementRef, OnInit } from '@angular/core'
|
|
2
|
+
import { CommonModule } from '@angular/common'
|
|
3
|
+
import { FormsModule } from '@angular/forms'
|
|
4
|
+
import { MarkdownComponent, MarkdownModule } from 'ngx-markdown'
|
|
5
|
+
import { TranslocoModule } from '@jsverse/transloco'
|
|
6
|
+
import { ButtonComponent } from '../shared/components/button'
|
|
7
|
+
import { CardComponent, CardContentComponent } from '../shared/components/card'
|
|
8
|
+
import { LoadingComponent } from '../shared/components/loading/loading.component'
|
|
9
|
+
import 'prismjs'
|
|
10
|
+
import 'prismjs/components/prism-typescript'
|
|
11
|
+
import 'prismjs/components/prism-javascript'
|
|
12
|
+
import 'prismjs/components/prism-css'
|
|
13
|
+
import 'prismjs/components/prism-json'
|
|
14
|
+
import 'prismjs/components/prism-markdown'
|
|
15
|
+
import 'prismjs/themes/prism-okaidia.css'
|
|
16
|
+
|
|
17
|
+
interface Message {
|
|
18
|
+
id: string | number
|
|
19
|
+
sender: 'user' | 'assistant' | 'agent'
|
|
20
|
+
senderType: number
|
|
21
|
+
messageContent: string
|
|
22
|
+
sentAt: Date
|
|
23
|
+
isSeen: boolean
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@Component({
|
|
27
|
+
selector: 'app-chat',
|
|
28
|
+
standalone: true,
|
|
29
|
+
imports: [
|
|
30
|
+
CommonModule,
|
|
31
|
+
FormsModule,
|
|
32
|
+
MarkdownComponent,
|
|
33
|
+
TranslocoModule,
|
|
34
|
+
ButtonComponent,
|
|
35
|
+
CardComponent,
|
|
36
|
+
CardContentComponent,
|
|
37
|
+
LoadingComponent
|
|
38
|
+
],
|
|
39
|
+
templateUrl: './chat.component.html'
|
|
40
|
+
})
|
|
41
|
+
export class ChatComponent implements OnInit {
|
|
42
|
+
@Input() messages: Message[] = []
|
|
43
|
+
@Input() needsAgent: boolean = false
|
|
44
|
+
@Input() assistantStatus: string = 'idle'
|
|
45
|
+
@Input() isSignalRConnected: boolean = false
|
|
46
|
+
@Input() isChatClosed: boolean = false
|
|
47
|
+
@Output() sendMessageEvent = new EventEmitter<string>()
|
|
48
|
+
@ViewChild('chatMessagesContainer') chatMessagesContainer!: ElementRef
|
|
49
|
+
@Input() currentLang: string = 'en'
|
|
50
|
+
@Input() loading: boolean = false
|
|
51
|
+
|
|
52
|
+
messageText: string = ''
|
|
53
|
+
|
|
54
|
+
get firstAgentMessageIndex(): number {
|
|
55
|
+
return this.messages.findIndex((message) => message.senderType === 2)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
cleanMessageContent(content: string): string {
|
|
59
|
+
// Remove excessive newlines (more than 2 consecutive newlines)
|
|
60
|
+
return content.replace(/\n{3,}/g, '\n\n').trim()
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
ngOnInit(): void {
|
|
64
|
+
// Initialize component
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
ngAfterViewChecked(): void {
|
|
68
|
+
this.scrollToBottom()
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
scrollToBottom(): void {
|
|
72
|
+
try {
|
|
73
|
+
this.chatMessagesContainer.nativeElement.scrollTop = this.chatMessagesContainer.nativeElement.scrollHeight
|
|
74
|
+
} catch (err) {
|
|
75
|
+
console.error('Error scrolling to bottom:', err)
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
sendMessage(): void {
|
|
80
|
+
if (!this.messageText.trim() || !this.isSignalRConnected || this.isChatClosed) return
|
|
81
|
+
this.sendMessageEvent.emit(this.messageText)
|
|
82
|
+
this.messageText = ''
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
hasAgentMessageBeenSent(messages: any[]): boolean {
|
|
86
|
+
return messages.some((message) => message.senderType === 2 || message.senderType === 3)
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
<div class="babylai-fixed babylai-bottom-5 babylai-right-5 babylai-z-[9999]" [dir]="getDirection()">
|
|
2
|
+
<!-- Arrow Animation -->
|
|
3
|
+
<div
|
|
4
|
+
*ngIf="showArrowAnimation && !isPopupOpen"
|
|
5
|
+
class="babylai-fixed babylai-bottom-20 babylai-right-4 babylai-z-[1300] babylai-flex babylai-flex-col babylai-items-end babylai-animate-float"
|
|
6
|
+
>
|
|
7
|
+
<div
|
|
8
|
+
class="babylai-bg-primary babylai-text-white babylai-py-3 babylai-px-4 babylai-rounded-3xl babylai-shadow-lg babylai-mb-4 babylai-max-w-[200px] babylai-relative"
|
|
9
|
+
>
|
|
10
|
+
<p class="babylai-text-xs babylai-font-bold babylai-m-0">
|
|
11
|
+
{{ messageLabel || 'Need assistance Or You want to try the Product? Click here' }}
|
|
12
|
+
</p>
|
|
13
|
+
<button
|
|
14
|
+
class="babylai-absolute babylai-top-[-8px] babylai-right-[-8px] babylai-w-5 babylai-h-5 babylai-rounded-full babylai-bg-white babylai-border-none babylai-cursor-pointer babylai-flex babylai-items-center babylai-justify-center babylai-text-black babylai-p-[3px] hover:babylai-bg-primary-700 hover:babylai-text-white"
|
|
15
|
+
(click)="handleCloseArrowAnimation()"
|
|
16
|
+
>
|
|
17
|
+
<svg width="12" height="12" viewBox="0 0 12 12">
|
|
18
|
+
<path d="M1 1L11 11M1 11L11 1" stroke="currentColor" strokeWidth="2" />
|
|
19
|
+
</svg>
|
|
20
|
+
</button>
|
|
21
|
+
<div
|
|
22
|
+
class="babylai-absolute babylai-bottom-[-10px] babylai-right-5 babylai-w-0 babylai-h-0 babylai-border-l-[10px] babylai-border-r-[10px] babylai-border-t-[10px] babylai-border-l-transparent babylai-border-r-transparent babylai-border-t-primary"
|
|
23
|
+
></div>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<!-- Help Button -->
|
|
28
|
+
<button
|
|
29
|
+
class="babylai-w-14 babylai-h-14 babylai-rounded-full babylai-bg-primary babylai-text-white babylai-border-none babylai-cursor-pointer babylai-flex babylai-items-center babylai-justify-center babylai-shadow-md babylai-transition-transform babylai-duration-200 babylai-fixed babylai-bottom-5 babylai-right-5 babylai-z-[1000] hover:babylai-bg-primary-700 hover:babylai-scale-105 active:babylai-scale-95"
|
|
30
|
+
(click)="handleTogglePopup()"
|
|
31
|
+
>
|
|
32
|
+
<span class="babylai-flex babylai-items-center babylai-justify-center">
|
|
33
|
+
<img src="/logo-white.svg" alt="BabylAI Logo" class="babylai-w-6 babylai-h-6" />
|
|
34
|
+
</span>
|
|
35
|
+
</button>
|
|
36
|
+
|
|
37
|
+
<!-- Help Popup -->
|
|
38
|
+
<div
|
|
39
|
+
*ngIf="isPopupOpen"
|
|
40
|
+
[ngClass]="{
|
|
41
|
+
'babylai-fixed babylai-bottom-20 babylai-right-5 babylai-w-[360px] babylai-h-[684px] babylai-rounded-3xl babylai-shadow-lg babylai-flex babylai-flex-col babylai-z-[1000] babylai-bg-black-white-100': true,
|
|
42
|
+
'babylai-w-[360px]': isPopupOpen,
|
|
43
|
+
'babylai-w-[60px]': !isPopupOpen,
|
|
44
|
+
'babylai-bg-gradient-to-b babylai-from-primary-500 babylai-to-primary-500/60': isPopupOpen && !showHelpScreenData && !showChat
|
|
45
|
+
}"
|
|
46
|
+
>
|
|
47
|
+
<app-confirmation-dialog
|
|
48
|
+
*ngIf="showEndChatConfirmation"
|
|
49
|
+
[title]="'LeavingDialogTitle' | transloco"
|
|
50
|
+
[body]="'LeavingDialogBody' | transloco"
|
|
51
|
+
[confirmText]="'Confirm' | transloco"
|
|
52
|
+
[cancelText]="'Cancel' | transloco"
|
|
53
|
+
(onConfirm)="confirmEndChat()"
|
|
54
|
+
(onCancel)="cancelEndChat()"
|
|
55
|
+
></app-confirmation-dialog>
|
|
56
|
+
<!-- Loading State -->
|
|
57
|
+
<div *ngIf="status === 'loading'">
|
|
58
|
+
<!-- Using existing header -->
|
|
59
|
+
<ng-container *ngIf="!showHelpScreenData">
|
|
60
|
+
<app-header
|
|
61
|
+
[showBackButton]="!!selectedOption || !!selectedNestedOption"
|
|
62
|
+
[showLogo]="true"
|
|
63
|
+
(onBack)="handleBack()"
|
|
64
|
+
(onClose)="handleClosePopup()"
|
|
65
|
+
>
|
|
66
|
+
</app-header>
|
|
67
|
+
</ng-container>
|
|
68
|
+
<ng-container *ngIf="showHelpScreenData">
|
|
69
|
+
<app-header [showLogo]="false" (onClose)="handleHideHelpScreenData()"> </app-header>
|
|
70
|
+
</ng-container>
|
|
71
|
+
|
|
72
|
+
<!-- Animated Logo -->
|
|
73
|
+
<app-loading></app-loading>
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
<!-- Error State -->
|
|
77
|
+
<div
|
|
78
|
+
*ngIf="status === 'failed'"
|
|
79
|
+
class="babylai-fixed babylai-bottom-[90px] babylai-right-5 babylai-p-4 babylai-bg-white babylai-rounded-xl babylai-shadow-lg"
|
|
80
|
+
>
|
|
81
|
+
<span>Error: {{ error }}</span>
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
<!-- Content -->
|
|
85
|
+
<ng-container *ngIf="status === 'succeeded'">
|
|
86
|
+
<!-- Header -->
|
|
87
|
+
<ng-container *ngIf="!showHelpScreenData && !showChat">
|
|
88
|
+
<app-header
|
|
89
|
+
[showBackButton]="!!selectedOption || !!selectedNestedOption"
|
|
90
|
+
[showLogo]="true"
|
|
91
|
+
(onBack)="handleBack()"
|
|
92
|
+
(onClose)="handleClosePopup()"
|
|
93
|
+
>
|
|
94
|
+
</app-header>
|
|
95
|
+
</ng-container>
|
|
96
|
+
<ng-container *ngIf="showHelpScreenData && !showChat">
|
|
97
|
+
<app-header
|
|
98
|
+
[showBackButton]="showHelpScreenData"
|
|
99
|
+
[showLogo]="false"
|
|
100
|
+
(onClose)="handleHideHelpScreenData()"
|
|
101
|
+
(onBack)="handleBack()"
|
|
102
|
+
[language]="currentLang"
|
|
103
|
+
>
|
|
104
|
+
</app-header>
|
|
105
|
+
|
|
106
|
+
<ng-container *ngIf="showHelpScreenData && sessionId">
|
|
107
|
+
<app-button
|
|
108
|
+
variant="icon-bg"
|
|
109
|
+
(click)="handleShowChat()"
|
|
110
|
+
className="babylai-absolute babylai-bottom-5 babylai-right-5 !babylai-p-3"
|
|
111
|
+
>
|
|
112
|
+
<img src="/icons/chat.svg" alt="Close" class="babylai-w-full" />
|
|
113
|
+
</app-button>
|
|
114
|
+
</ng-container>
|
|
115
|
+
</ng-container>
|
|
116
|
+
<ng-container *ngIf="showChat">
|
|
117
|
+
<app-chat-header
|
|
118
|
+
[showBackButton]="showChat"
|
|
119
|
+
[showLogo]="false"
|
|
120
|
+
(onClose)="handleEndChat()"
|
|
121
|
+
(onBack)="handleBack()"
|
|
122
|
+
[language]="currentLang"
|
|
123
|
+
>
|
|
124
|
+
</app-chat-header>
|
|
125
|
+
|
|
126
|
+
<app-chat
|
|
127
|
+
class="babylai-h-full babylai-mt-2 babylai-p-2 babylai-max-h-[85%]"
|
|
128
|
+
[messages]="messages"
|
|
129
|
+
[needsAgent]="needsAgent"
|
|
130
|
+
[assistantStatus]="assistantStatus"
|
|
131
|
+
[isSignalRConnected]="isSignalRConnected"
|
|
132
|
+
[isChatClosed]="isChatClosed"
|
|
133
|
+
(sendMessageEvent)="sendMessage($event)"
|
|
134
|
+
[currentLang]="currentLang"
|
|
135
|
+
[loading]="chatIsLoading"
|
|
136
|
+
>
|
|
137
|
+
</app-chat>
|
|
138
|
+
</ng-container>
|
|
139
|
+
|
|
140
|
+
<!-- Content -->
|
|
141
|
+
<div class="babylai-flex-1 babylai-flex babylai-flex-col babylai-gap-4 babylai-overflow-y-auto babylai-p-4" *ngIf="!showChat">
|
|
142
|
+
<ng-container *ngIf="!showHelpScreenData">
|
|
143
|
+
<div class="babylai-flex babylai-flex-col babylai-gap-4">
|
|
144
|
+
<h1 class="babylai-text-6xl babylai-font-bold babylai-text-black-white-50">{{ 'ChatIntroMessage' | transloco }}</h1>
|
|
145
|
+
</div>
|
|
146
|
+
|
|
147
|
+
<div class="babylai-flex babylai-flex-col babylai-gap-4 babylai-mt-8">
|
|
148
|
+
<app-card variant="rounded">
|
|
149
|
+
<app-card-content>
|
|
150
|
+
<div class="babylai-flex babylai-flex-col babylai-gap-4">
|
|
151
|
+
<div class="babylai-flex babylai-items-center babylai-justify-start babylai-gap-3">
|
|
152
|
+
<div
|
|
153
|
+
class="babylai-flex babylai-items-center babylai-justify-center babylai-max-w-12 babylai-min-w-12 babylai-w-12 babylai-h-12 babylai-rounded-full babylai-bg-primary"
|
|
154
|
+
>
|
|
155
|
+
<img src="/logo-white.svg" alt="Chat" class="babylai-w-5 babylai-h-5" />
|
|
156
|
+
</div>
|
|
157
|
+
<div class="babylai-flex babylai-flex-col babylai-items-start babylai-justify-start babylai-gap-0">
|
|
158
|
+
<h4 class="babylai-text-base babylai-text-black-white-400 babylai-font-semibold">
|
|
159
|
+
{{ 'BabylaiTitle' | transloco }}
|
|
160
|
+
</h4>
|
|
161
|
+
<p class="babylai-text-base babylai-text-black-white-800">{{ 'BabylaiDescription' | transloco }}</p>
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
<app-button variant="default" [fullWidth]="true" (click)="handleShowHelpScreenData()">
|
|
165
|
+
{{ 'ChatNow' | transloco }}
|
|
166
|
+
</app-button>
|
|
167
|
+
</div>
|
|
168
|
+
</app-card-content>
|
|
169
|
+
</app-card>
|
|
170
|
+
|
|
171
|
+
<app-card variant="rounded">
|
|
172
|
+
<app-card-content>
|
|
173
|
+
<div class="babylai-flex babylai-items-center babylai-justify-between babylai-gap-4">
|
|
174
|
+
<p class="babylai-text-base babylai-text-black-white-800">{{ 'TryBableAI' | transloco }}</p>
|
|
175
|
+
<app-button variant="icon-bg" (click)="navigateToUrl('https://babylai.net/signup')">
|
|
176
|
+
<img
|
|
177
|
+
src="/icons/arrow-stripped.svg"
|
|
178
|
+
alt="Arrow Right"
|
|
179
|
+
[ngClass]="{ 'babylai-w-5 babylai-h-5': true, 'babylai-rotate-180': currentLang === 'ar' }"
|
|
180
|
+
/>
|
|
181
|
+
</app-button>
|
|
182
|
+
</div>
|
|
183
|
+
</app-card-content>
|
|
184
|
+
</app-card>
|
|
185
|
+
|
|
186
|
+
<app-card variant="rounded">
|
|
187
|
+
<app-card-content>
|
|
188
|
+
<div class="babylai-flex babylai-items-center babylai-justify-between babylai-gap-4">
|
|
189
|
+
<p class="babylai-text-base babylai-text-black-white-800">{{ 'ContactUs' | transloco }}</p>
|
|
190
|
+
<app-button variant="icon-bg" (click)="navigateToUrl('https://babylai.net')">
|
|
191
|
+
<img
|
|
192
|
+
src="/icons/arrow-stripped.svg"
|
|
193
|
+
alt="Arrow Right"
|
|
194
|
+
[ngClass]="{ 'babylai-w-5 babylai-h-5': true, 'babylai-rotate-180': currentLang === 'ar' }"
|
|
195
|
+
/>
|
|
196
|
+
</app-button>
|
|
197
|
+
</div>
|
|
198
|
+
</app-card-content>
|
|
199
|
+
</app-card>
|
|
200
|
+
</div>
|
|
201
|
+
</ng-container>
|
|
202
|
+
<ng-container *ngIf="showHelpScreenData">
|
|
203
|
+
<app-help-screen-data
|
|
204
|
+
[helpScreenData]="helpScreenData"
|
|
205
|
+
title="PickTopicTitle"
|
|
206
|
+
(handleStartNewChat)="handleStartNewChat($event)"
|
|
207
|
+
></app-help-screen-data>
|
|
208
|
+
</ng-container>
|
|
209
|
+
</div>
|
|
210
|
+
|
|
211
|
+
<!-- Footer -->
|
|
212
|
+
<div class="babylai-flex babylai-justify-between babylai-items-center babylai-px-5 babylai-py-2.5">
|
|
213
|
+
<a
|
|
214
|
+
href="https://babylai.net"
|
|
215
|
+
target="_blank"
|
|
216
|
+
class="babylai-text-xs babylai-text-black-white-300 babylai-w-full babylai-text-center"
|
|
217
|
+
[ngClass]="!showHelpScreenData && !showChat ? 'babylai-text-black-white-50' : ''"
|
|
218
|
+
>
|
|
219
|
+
{{ 'PoweredByBabylAI' | transloco }}
|
|
220
|
+
</a>
|
|
221
|
+
</div>
|
|
222
|
+
</ng-container>
|
|
223
|
+
</div>
|
|
224
|
+
</div>
|