@adzen/doohbot 1.0.5 → 1.0.7
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/adzen-doohbot.mjs +1574 -1193
- package/fesm2022/adzen-doohbot.mjs.map +1 -1
- package/index.d.ts +100 -109
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/lib/app/chat/components/chat-button/chat-button.component.scss +43 -9
- package/src/lib/app/chat/components/chat-footer/chat-footer.component.scss +3 -3
- package/src/lib/app/chat/components/chat-header/chat-header.component.scss +29 -11
- package/src/lib/app/chat/components/{chat-history-sidebar/chat-history-sidebar.component.scss → chat-history/chat-history.component.scss} +46 -34
- package/src/lib/app/chat/components/chat-input/chat-input.component.scss +44 -21
- package/src/lib/app/chat/components/chat-message/chat-message.component.scss +178 -178
- package/src/lib/app/chat/components/chat-message-container/chat-message-container.component.scss +55 -24
- package/src/lib/app/chat/components/chat-window/chat-window.component.scss +282 -21
- package/src/lib/app/login/login-form.component.scss +24 -24
- package/src/lib/app/personalization/personalization-dialog.component.scss +17 -17
- package/src/lib/app/personalization/sections/account/account-section.component.scss +167 -166
- package/src/lib/app/personalization/sections/instruction/instruction-section.component.scss +47 -46
- package/src/lib/app/personalization/sections/preferences/preferences-section.component.scss +172 -170
- package/src/lib/app/personalization/sections/terms/terms-section.component.scss +58 -57
- package/src/lib/doohbot.component.scss +6 -12
- package/src/lib/shared/chips/chips.component.scss +8 -8
- package/src/lib/shared/confirmation-dialog/confirmation-dialog.component.scss +24 -0
- package/src/lib/shared/dropdown-menu/dropdown-menu.component.scss +5 -5
- package/src/lib/shared/input-dialog/input-dialog.component.scss +8 -8
- package/src/lib/shared/notification-banner/notification-banner.component.scss +342 -0
- package/src/lib/shared/snackbar/snackbar.component.scss +3 -3
- package/src/lib/styles/_theme.scss +101 -45
- package/src/lib/styles/material-override.scss +36 -26
- package/src/lib/styles/utility.scss +64 -12
- package/src/lib/theme/index.scss +7 -7
- package/src/lib/theme/palettes/aqua.scss +76 -62
- package/src/lib/theme/palettes/candy.scss +75 -61
- package/src/lib/theme/palettes/doohbot.scss +21 -7
- package/src/lib/theme/palettes/forest.scss +75 -61
- package/src/lib/theme/palettes/midnight.scss +75 -61
- package/src/lib/theme/palettes/slate.scss +75 -61
- package/src/lib/theme/palettes/sunset.scss +75 -61
- package/src/lib/shared/dialog/dialog.component.scss +0 -90
- package/src/lib/shared/menu-item/menu-item.component.scss +0 -0
- package/src/lib/theme/themes.scss +0 -7
- package/src/lib/theme/tokens/semantic.scss +0 -102
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { OnDestroy, RendererFactory2, ElementRef,
|
|
2
|
+
import { OnDestroy, RendererFactory2, ElementRef, OnInit, OnChanges, SimpleChanges, InjectionToken } from '@angular/core';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
5
5
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
@@ -306,12 +306,15 @@ interface DoohbotConfig {
|
|
|
306
306
|
* ```ts
|
|
307
307
|
* theme: {
|
|
308
308
|
* buttonStyle: 'fab',
|
|
309
|
-
*
|
|
310
|
-
*
|
|
311
|
-
*
|
|
312
|
-
*
|
|
313
|
-
*
|
|
314
|
-
*
|
|
309
|
+
* palette: 'doohbot',
|
|
310
|
+
* tokens: {
|
|
311
|
+
* primaryColor: '#4f46e5',
|
|
312
|
+
* backgroundColor: '#ffffff',
|
|
313
|
+
* textColor: '#111827',
|
|
314
|
+
* userMessageColor: '#e0e7ff',
|
|
315
|
+
* botMessageColor: '#f3f4f6',
|
|
316
|
+
* fontFamily: 'Inter, Roboto, sans-serif',
|
|
317
|
+
* },
|
|
315
318
|
* enableDrag: true,
|
|
316
319
|
* enableResize: true
|
|
317
320
|
* }
|
|
@@ -483,6 +486,7 @@ declare class SnackbarService {
|
|
|
483
486
|
static ɵprov: i0.ɵɵInjectableDeclaration<SnackbarService>;
|
|
484
487
|
}
|
|
485
488
|
|
|
489
|
+
type PrereqStatus = 'success' | 'failed' | 'pending';
|
|
486
490
|
declare class AuthService {
|
|
487
491
|
private http;
|
|
488
492
|
private storageService;
|
|
@@ -495,9 +499,25 @@ declare class AuthService {
|
|
|
495
499
|
private readonly federatedAuthTokenSubject;
|
|
496
500
|
private readonly licenseFileSubject;
|
|
497
501
|
private readonly licenseCodeSubject;
|
|
502
|
+
private readonly _isAuthenticating;
|
|
503
|
+
private readonly _loginErrorMessage;
|
|
504
|
+
private readonly _errors;
|
|
505
|
+
/** Gets the last login error message */
|
|
506
|
+
readonly loginErrorMessage: i0.Signal<string | null>;
|
|
507
|
+
/** Computed prerequisites status */
|
|
508
|
+
readonly prerequisitesStatus: i0.Signal<{
|
|
509
|
+
federatedToken: PrereqStatus;
|
|
510
|
+
licenseFile: PrereqStatus;
|
|
511
|
+
licenseCode: PrereqStatus;
|
|
512
|
+
}>;
|
|
513
|
+
/** True if all prerequisites are satisfied */
|
|
514
|
+
readonly allPrerequisitesMet: i0.Signal<boolean>;
|
|
515
|
+
private getStatus;
|
|
498
516
|
private apiBaseUrl;
|
|
499
517
|
/** Gets if user is authenticated */
|
|
500
518
|
readonly isAuthenticated: i0.Signal<boolean>;
|
|
519
|
+
/** Gets if user is currently authenticating */
|
|
520
|
+
readonly isAuthenticating: i0.Signal<boolean>;
|
|
501
521
|
/** Sets remember_me */
|
|
502
522
|
readonly setRememberMe: (value?: boolean) => void;
|
|
503
523
|
/** Gets remember_me */
|
|
@@ -508,6 +528,8 @@ declare class AuthService {
|
|
|
508
528
|
readonly username: () => string;
|
|
509
529
|
/** Logged-in user avatar URL */
|
|
510
530
|
readonly profileImageUrl: () => string | null;
|
|
531
|
+
/** `email` of logged in user */
|
|
532
|
+
readonly email: () => string | null;
|
|
511
533
|
/** `roles` of logged in user */
|
|
512
534
|
readonly roles: () => string | null;
|
|
513
535
|
/** `permissions` of logged in user */
|
|
@@ -541,18 +563,14 @@ declare class AuthService {
|
|
|
541
563
|
* Authenticate user based on stored tokens or refresh tokens.
|
|
542
564
|
*/
|
|
543
565
|
private authenticate;
|
|
544
|
-
/**
|
|
545
|
-
* Refresh login token.
|
|
546
|
-
*/
|
|
547
|
-
refreshLogin(): Observable<AuthResult | null>;
|
|
548
566
|
/**
|
|
549
567
|
* True if doohbot API requests that are auth-related
|
|
550
568
|
*/
|
|
551
569
|
isAuthUrl(url: string): boolean;
|
|
552
570
|
/**
|
|
553
|
-
* True if if not a
|
|
571
|
+
* True if if not a consumer API request (e.g. external API calls)
|
|
554
572
|
*/
|
|
555
|
-
|
|
573
|
+
isConsumerApiRequest(url: string): boolean;
|
|
556
574
|
/**
|
|
557
575
|
* Initializes the federated authentication flow.
|
|
558
576
|
*
|
|
@@ -591,6 +609,7 @@ declare class AuthService {
|
|
|
591
609
|
* This method is called when the user logs out.
|
|
592
610
|
*/
|
|
593
611
|
clearAuth(): void;
|
|
612
|
+
private extractErrorMessage;
|
|
594
613
|
static ɵfac: i0.ɵɵFactoryDeclaration<AuthService, never>;
|
|
595
614
|
static ɵprov: i0.ɵɵInjectableDeclaration<AuthService>;
|
|
596
615
|
}
|
|
@@ -599,6 +618,8 @@ interface ApiResponse<T> {
|
|
|
599
618
|
success: boolean;
|
|
600
619
|
message: string;
|
|
601
620
|
data?: T;
|
|
621
|
+
timestamp: string;
|
|
622
|
+
errorCode?: string;
|
|
602
623
|
}
|
|
603
624
|
|
|
604
625
|
interface CustomInstructions {
|
|
@@ -658,19 +679,14 @@ declare class ThemeService implements OnDestroy {
|
|
|
658
679
|
private _activeTheme;
|
|
659
680
|
activeTheme: i0.Signal<"light-theme" | "dark-theme">;
|
|
660
681
|
private observer;
|
|
661
|
-
constructor(rendererFactory: RendererFactory2, overlay: OverlayContainer, personalization: PersonalizationService, configService: DoohbotConfigService);
|
|
662
|
-
private _currentConfig;
|
|
663
682
|
private rootElement;
|
|
664
|
-
|
|
665
|
-
applyPrimaryColorToGlobal(colorInput: string): void;
|
|
683
|
+
constructor(rendererFactory: RendererFactory2, overlay: OverlayContainer, personalization: PersonalizationService, configService: DoohbotConfigService);
|
|
666
684
|
/**
|
|
667
|
-
*
|
|
685
|
+
* Called by DoohbotComponent during init
|
|
668
686
|
*/
|
|
687
|
+
setThemeConfig(elementRef: ElementRef, isDarkMode?: boolean): void;
|
|
688
|
+
applyPrimaryColorToGlobal(colorInput: string): void;
|
|
669
689
|
private hexToRgb;
|
|
670
|
-
/**
|
|
671
|
-
* Simple luminance-based contrast calculation
|
|
672
|
-
* Returns #ffffff for dark colors and #000000 for light colors
|
|
673
|
-
*/
|
|
674
690
|
private getContrastColor;
|
|
675
691
|
setTheme(mode: ThemeMode): void;
|
|
676
692
|
private updateActiveTheme;
|
|
@@ -679,12 +695,9 @@ declare class ThemeService implements OnDestroy {
|
|
|
679
695
|
private isParentDark;
|
|
680
696
|
private applyThemeToGlobal;
|
|
681
697
|
private applyPaletteToGlobal;
|
|
682
|
-
private cleanupObservers;
|
|
683
698
|
ngOnDestroy(): void;
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
*/
|
|
687
|
-
applyCssVariables(element: HTMLElement, config: DoohbotThemeConfig | undefined): void;
|
|
699
|
+
private cleanupObservers;
|
|
700
|
+
applyCssVariables(element: HTMLElement, config?: DoohbotThemeConfig): void;
|
|
688
701
|
static ɵfac: i0.ɵɵFactoryDeclaration<ThemeService, never>;
|
|
689
702
|
static ɵprov: i0.ɵɵInjectableDeclaration<ThemeService>;
|
|
690
703
|
}
|
|
@@ -711,19 +724,33 @@ interface Message {
|
|
|
711
724
|
copied?: boolean;
|
|
712
725
|
}
|
|
713
726
|
|
|
727
|
+
interface ChatSessionDto {
|
|
728
|
+
response_id: string;
|
|
729
|
+
last_message_at: Date;
|
|
730
|
+
title: string;
|
|
731
|
+
messages: Message[];
|
|
732
|
+
userId: string;
|
|
733
|
+
}
|
|
734
|
+
|
|
714
735
|
/**
|
|
715
|
-
*
|
|
716
|
-
*
|
|
717
|
-
* Manages all UI-related state for the chat component including:
|
|
718
|
-
* - Chat window open/close state
|
|
719
|
-
* - History sidebar visibility
|
|
720
|
-
* - Unread message tracking
|
|
721
|
-
* - Fullscreen state
|
|
722
|
-
*
|
|
723
|
-
* This service uses Angular signals for reactive state management,
|
|
724
|
-
* allowing components to subscribe to state changes efficiently.
|
|
736
|
+
* Prompt mode
|
|
725
737
|
*/
|
|
726
|
-
|
|
738
|
+
type PromptMode = 'markdown' | 'plain';
|
|
739
|
+
|
|
740
|
+
interface ChatStreamMessage {
|
|
741
|
+
role: MessageRole;
|
|
742
|
+
content: string;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
declare class ChatService {
|
|
746
|
+
private apiService;
|
|
747
|
+
private snackbar;
|
|
748
|
+
private authService;
|
|
749
|
+
private configService;
|
|
750
|
+
private config;
|
|
751
|
+
private chatHistoryService;
|
|
752
|
+
private markdownService;
|
|
753
|
+
private chatSessions;
|
|
727
754
|
/**
|
|
728
755
|
* Whether the chat window is currently open
|
|
729
756
|
*/
|
|
@@ -740,28 +767,29 @@ declare class ChatUIStateService {
|
|
|
740
767
|
* ID of the last message that was read by the user
|
|
741
768
|
*/
|
|
742
769
|
private lastReadMessageId;
|
|
743
|
-
/**
|
|
744
|
-
* Reference to current messages (injected from outside)
|
|
745
|
-
*/
|
|
746
|
-
private messagesSignal;
|
|
747
770
|
/**
|
|
748
771
|
* Computed number of unread bot messages
|
|
749
|
-
* TODO: Actual implementation is to be done
|
|
750
772
|
*/
|
|
751
|
-
unreadCount: Signal<number>;
|
|
773
|
+
unreadCount: i0.Signal<number>;
|
|
752
774
|
/**
|
|
753
775
|
* Effect to automatically mark messages as read when chat is opened
|
|
754
|
-
* TODO: Actual implementation is to be done
|
|
755
776
|
*/
|
|
756
|
-
|
|
777
|
+
messages: i0.WritableSignal<Message[]>;
|
|
757
778
|
/**
|
|
758
|
-
*
|
|
759
|
-
* This allows the UI state service to track messages from MessageService
|
|
779
|
+
* Determine if suggestion chips should be shown
|
|
760
780
|
*/
|
|
761
|
-
|
|
781
|
+
showSuggestionChips: i0.Signal<boolean>;
|
|
782
|
+
activeSession: i0.WritableSignal<ChatSessionDto | null>;
|
|
783
|
+
isLoadingApi: i0.WritableSignal<boolean>;
|
|
784
|
+
isBotTyping: i0.WritableSignal<boolean>;
|
|
785
|
+
promptMode: i0.WritableSignal<PromptMode>;
|
|
786
|
+
isStreaming: i0.Signal<boolean>;
|
|
787
|
+
messagesStream: Array<ChatStreamMessage>;
|
|
788
|
+
currentResponse: string;
|
|
789
|
+
getFallbackError(): string;
|
|
790
|
+
constructor();
|
|
762
791
|
/**
|
|
763
792
|
* Toggle the chat window open/close state
|
|
764
|
-
* TODO:
|
|
765
793
|
*/
|
|
766
794
|
toggleChat(): void;
|
|
767
795
|
/**
|
|
@@ -804,56 +832,6 @@ declare class ChatUIStateService {
|
|
|
804
832
|
* Get the last read message ID
|
|
805
833
|
*/
|
|
806
834
|
getLastReadMessageId(): string | null;
|
|
807
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ChatUIStateService, never>;
|
|
808
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ChatUIStateService>;
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
interface ChatSessionDto {
|
|
812
|
-
response_id: string;
|
|
813
|
-
last_message_at: Date;
|
|
814
|
-
title: string;
|
|
815
|
-
messages: Message[];
|
|
816
|
-
userId: string;
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
/**
|
|
820
|
-
* Prompt mode
|
|
821
|
-
*/
|
|
822
|
-
type PromptMode = 'markdown' | 'plain';
|
|
823
|
-
|
|
824
|
-
interface ChatStreamMessage {
|
|
825
|
-
role: MessageRole;
|
|
826
|
-
content: string;
|
|
827
|
-
}
|
|
828
|
-
|
|
829
|
-
declare class ChatService {
|
|
830
|
-
private apiService;
|
|
831
|
-
private snackbar;
|
|
832
|
-
private authService;
|
|
833
|
-
private configService;
|
|
834
|
-
private config;
|
|
835
|
-
private chatHistoryService;
|
|
836
|
-
private chatUIStateService;
|
|
837
|
-
private markdownService;
|
|
838
|
-
private chatSessions;
|
|
839
|
-
messages: i0.WritableSignal<Message[]>;
|
|
840
|
-
/**
|
|
841
|
-
* Determine if suggestion chips should be shown
|
|
842
|
-
*/
|
|
843
|
-
showSuggestionChips: i0.Signal<boolean>;
|
|
844
|
-
private activeSession;
|
|
845
|
-
isLoadingApi: i0.WritableSignal<boolean>;
|
|
846
|
-
isBotTyping: i0.WritableSignal<boolean>;
|
|
847
|
-
promptMode: i0.WritableSignal<PromptMode>;
|
|
848
|
-
isStreaming: i0.Signal<boolean>;
|
|
849
|
-
messagesStream: Array<ChatStreamMessage>;
|
|
850
|
-
currentResponse: string;
|
|
851
|
-
getFallbackError(): string;
|
|
852
|
-
constructor();
|
|
853
|
-
/**
|
|
854
|
-
* Create a new chat session
|
|
855
|
-
*/
|
|
856
|
-
createSession(userId: string, sessionId: string): ChatSessionDto;
|
|
857
835
|
/**
|
|
858
836
|
* Start a new chat session
|
|
859
837
|
*/
|
|
@@ -922,14 +900,14 @@ declare class LicenseService {
|
|
|
922
900
|
static ɵprov: i0.ɵɵInjectableDeclaration<LicenseService>;
|
|
923
901
|
}
|
|
924
902
|
|
|
903
|
+
type FullscreenMode = 'browser' | 'viewport' | 'contained';
|
|
904
|
+
|
|
925
905
|
/**
|
|
926
906
|
* Doohbot Main Component
|
|
927
907
|
* Root component of the Doohbot library
|
|
928
908
|
*/
|
|
929
|
-
declare class DoohbotComponent implements OnInit, OnDestroy {
|
|
909
|
+
declare class DoohbotComponent implements OnInit, OnChanges, OnDestroy {
|
|
930
910
|
private elementRef;
|
|
931
|
-
private renderer;
|
|
932
|
-
private uiState;
|
|
933
911
|
private themeService;
|
|
934
912
|
private licenseService;
|
|
935
913
|
private authService;
|
|
@@ -1006,15 +984,30 @@ declare class DoohbotComponent implements OnInit, OnDestroy {
|
|
|
1006
984
|
* ```
|
|
1007
985
|
*/
|
|
1008
986
|
isDarkMode?: boolean;
|
|
987
|
+
/**
|
|
988
|
+
* Fullscreen mode for the chat when fullscreen button is clicked.
|
|
989
|
+
*
|
|
990
|
+
* When `browser`, Doohbot uses browser fullscreen mode.
|
|
991
|
+
* When `viewport`, Doohbot uses visible viewport.
|
|
992
|
+
* When `contained`, Doohbot uses parent available space.
|
|
993
|
+
* When not provided, Doohbot will use 'viewport'.
|
|
994
|
+
*
|
|
995
|
+
* @example
|
|
996
|
+
* ```html
|
|
997
|
+
* <app-doohbot [fullscreenMode]="'viewport'"></app-doohbot>
|
|
998
|
+
* ```
|
|
999
|
+
*/
|
|
1000
|
+
fullscreenMode: FullscreenMode;
|
|
1009
1001
|
private destroyIsAuthenticated$;
|
|
1010
|
-
constructor(elementRef: ElementRef,
|
|
1002
|
+
constructor(elementRef: ElementRef, themeService: ThemeService, licenseService: LicenseService, authService: AuthService, chatService: ChatService, configService: DoohbotConfigService);
|
|
1011
1003
|
ngOnInit(): Promise<void>;
|
|
1012
1004
|
ngOnChanges(changes: SimpleChanges): void;
|
|
1005
|
+
private applyTheme;
|
|
1013
1006
|
private initializeUI;
|
|
1014
1007
|
private tryStartAuthFlow;
|
|
1015
1008
|
ngOnDestroy(): void;
|
|
1016
1009
|
static ɵfac: i0.ɵɵFactoryDeclaration<DoohbotComponent, never>;
|
|
1017
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DoohbotComponent, "app-doohbot", never, { "federatedToken": { "alias": "federatedToken"; "required": false; }; "session": { "alias": "session"; "required": false; }; "rememberMe": { "alias": "rememberMe"; "required": false; }; "licenseFile": { "alias": "licenseFile"; "required": false; }; "licenseCode": { "alias": "licenseCode"; "required": false; }; "isDarkMode": { "alias": "isDarkMode"; "required": false; }; }, {}, never, never, true, never>;
|
|
1010
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DoohbotComponent, "app-doohbot", never, { "federatedToken": { "alias": "federatedToken"; "required": false; }; "session": { "alias": "session"; "required": false; }; "rememberMe": { "alias": "rememberMe"; "required": false; }; "licenseFile": { "alias": "licenseFile"; "required": false; }; "licenseCode": { "alias": "licenseCode"; "required": false; }; "isDarkMode": { "alias": "isDarkMode"; "required": false; }; "fullscreenMode": { "alias": "fullscreenMode"; "required": false; }; }, {}, never, never, true, never>;
|
|
1018
1011
|
}
|
|
1019
1012
|
|
|
1020
1013
|
declare class DoohbotService {
|
|
@@ -1086,12 +1079,10 @@ declare class Logger {
|
|
|
1086
1079
|
* // Optional theme configuration if want to match doohbot to your application theme
|
|
1087
1080
|
* theme: {
|
|
1088
1081
|
* buttonStyle: 'fab',
|
|
1089
|
-
* primaryColor: '#4f46e5',
|
|
1090
|
-
* backgroundColor: '#ffffff',
|
|
1091
|
-
* textColor: '#111827',
|
|
1092
1082
|
* fontFamily: 'Inter, Roboto, sans-serif',
|
|
1093
1083
|
* enableDrag: true,
|
|
1094
|
-
* enableResize: true
|
|
1084
|
+
* enableResize: true,
|
|
1085
|
+
* palette: 'doohbot'
|
|
1095
1086
|
* }
|
|
1096
1087
|
* }),
|
|
1097
1088
|
* ],
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sources":["../../src/lib/core/models/api-config.model.ts","../../src/lib/core/models/auth-config.model.ts","../../src/lib/core/models/theme-config.model.ts","../../src/lib/core/config/doohbot-config.model.ts","../../src/lib/core/config/doohbot-config.service.ts","../../src/lib/core/auth/models/auth-result.model.ts","../../src/lib/core/auth/models/federated-login-request.model.ts","../../src/lib/core/auth/models/login-request.model.ts","../../src/lib/core/auth/storage.service.ts","../../src/lib/core/http/http.service.ts","../../src/lib/shared/snackbar/snackbar.service.ts","../../src/lib/core/auth/auth.service.ts","../../src/lib/core/models/api-response.model.ts","../../src/lib/app/personalization/personalization.service.ts","../../src/lib/core/services/theme.service.ts","../../src/lib/core/types/message-role.type.ts","../../src/lib/core/models/message.ts","../../src/lib/app/chat/
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../../src/lib/core/models/api-config.model.ts","../../src/lib/core/models/auth-config.model.ts","../../src/lib/core/models/theme-config.model.ts","../../src/lib/core/config/doohbot-config.model.ts","../../src/lib/core/config/doohbot-config.service.ts","../../src/lib/core/auth/models/auth-result.model.ts","../../src/lib/core/auth/models/federated-login-request.model.ts","../../src/lib/core/auth/models/login-request.model.ts","../../src/lib/core/auth/storage.service.ts","../../src/lib/core/http/http.service.ts","../../src/lib/shared/snackbar/snackbar.service.ts","../../src/lib/core/auth/auth.service.ts","../../src/lib/core/models/api-response.model.ts","../../src/lib/app/personalization/personalization.service.ts","../../src/lib/core/services/theme.service.ts","../../src/lib/core/types/message-role.type.ts","../../src/lib/core/models/message.ts","../../src/lib/app/chat/model/chat-session.model.ts","../../src/lib/core/types/prompt-mode.type.ts","../../src/lib/app/chat/model/chat-stream-message.model.ts","../../src/lib/app/chat/chat.service.ts","../../src/lib/core/services/license.service.ts","../../src/lib/core/directives/fullscreen.directive.ts","../../src/lib/doohbot.component.ts","../../src/lib/doohbot.service.ts","../../src/lib/core/utils/logger.service.ts","../../src/lib/doohbot.providers.ts","../../src/lib/core/config/doohbot-config.token.ts","../../src/lib/core/config/doohbot-config.resolver.ts","../../src/lib/const/doohbot-constant.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["_angular_core"],"mappings":";;;;;;;;AAAA;;;;;AAKG;;AAED;;;;;;AAMG;;AAGH;;;;;AAKG;;AAGH;;;;;;;AAOG;;AAGH;;;;;;;AAOG;;AAGH;;;;AAIG;;AAGH;;;;AAIG;;AAEJ;;ACzDD;;;;AAIG;;AAED;;;;;;AAMG;AACH;AACD;;ACdK,KAAA,WAAA;AAEN;;;AAGG;;AAED;;;AAGG;;AAGH;;;AAGG;;AAGH;;;;;;;AAOG;AACH,kBAAA,WAAA;AAEA;;;;AAIG;;AAGH;;;;AAIG;AACH;AAEA;;;AAGG;;AAGH;;;AAGG;;AAGH;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;AAEG;AACH;AAIA;;;;;AAKG;AAEH;AAkBA;;AAEG;;;;;AAyHJ;;AChiBD,cAAA,cAAA;AAKI;AACA;AACwB;;AAG1B;;;;AAIG;;AAaH;;;AAGG;;;;AAcJ;;ACzCK,KAAA,cAAA;;ACaN;;;AAGG;AACH,cAAA,gBAAA,YAAA,MAAA,EAAA,SAAA,EAAA,SAAA;AAyGI;AACA;AACA;AACA;AACA;AACA;AApGF;;;;;;;;;;AAUG;;AAGH;;;;;;;;;AASG;;AAGH;;;;;;;;;;AAUG;;AAGH;;;;;;;;;AASG;;AAGH;;;;;;;;;;AAUG;;AAGH;;;;;;;;;;;AAWG;;AAGH;;;;;;;;;;;;AAYG;;;;;;AAuDH;AAIA;AAWA;;;;AAyCD;;AC3OD,cAAA,cAAA;;;AAQE;;;AAGG;AACG,cAAA,OAAA;;;AAGP;;ACfD,cAAA,MAAA;AAYc;AAVZ;;;AAUoB,+BAAA,oBAAA;;AAKpB,0BAAA,MAAA;AAMA;;;;AAiCA;AAUA;AAIA;AAIA;;;AAGD;;ACrED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CG;AACH,iBAAA,cAAA,UAAA,OAAA,CAAA,aAAA,IAAkEA,EAAA,CAAA,oBAAA;;ACvDlE;;;AAGG;AACH,cAAA,cAAA,EAAA,cAAA,CAAA,aAAA;;ACJA;;;;;AAKG;AACH,iBAAA,oBAAA,aAAA,OAAA,CAAA,aAAA,IAAA,aAAA;;ACTA,cAAA,YAAA;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
width: 40px;
|
|
6
6
|
height: 120px;
|
|
7
7
|
border-radius: 16px 0 0 16px;
|
|
8
|
-
background: var(--
|
|
9
|
-
color: var(--
|
|
8
|
+
background: var(--db-bg-color);
|
|
9
|
+
color: var(--db-text-primary);
|
|
10
10
|
border: none;
|
|
11
|
-
box-shadow: var(--border-shadow
|
|
11
|
+
box-shadow: var(--db-border-shadow);
|
|
12
12
|
display: flex;
|
|
13
13
|
justify-content: center;
|
|
14
14
|
align-items: center;
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
height: 18px;
|
|
36
36
|
border-radius: 50%;
|
|
37
37
|
background: var(--red);
|
|
38
|
-
color: var(--
|
|
38
|
+
color: var(--db-bg-color);
|
|
39
39
|
font-size: 10px;
|
|
40
40
|
display: flex;
|
|
41
41
|
align-items: center;
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
width: 56px;
|
|
67
67
|
height: 56px;
|
|
68
68
|
border-radius: 50%;
|
|
69
|
-
background: var(--
|
|
70
|
-
color: var(--
|
|
69
|
+
background: var(--db-bg-color);
|
|
70
|
+
color: var(--db-text-primary);
|
|
71
71
|
box-shadow: 0 6px 16px rgba(var(--black-rgb), 0.2);
|
|
72
72
|
border: none;
|
|
73
73
|
cursor: pointer;
|
|
@@ -75,6 +75,39 @@
|
|
|
75
75
|
display: flex;
|
|
76
76
|
align-items: center;
|
|
77
77
|
justify-content: center;
|
|
78
|
+
overflow: hidden;
|
|
79
|
+
transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
|
|
80
|
+
|
|
81
|
+
.fab-content {
|
|
82
|
+
transition: all 0.3s ease;
|
|
83
|
+
display: flex;
|
|
84
|
+
align-items: center;
|
|
85
|
+
justify-content: center;
|
|
86
|
+
|
|
87
|
+
&.loading {
|
|
88
|
+
opacity: 0;
|
|
89
|
+
transform: scale(0.5);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.fab-loader {
|
|
94
|
+
position: absolute;
|
|
95
|
+
top: 50%;
|
|
96
|
+
left: 50%;
|
|
97
|
+
transform: translate(-50%, -50%);
|
|
98
|
+
display: flex;
|
|
99
|
+
align-items: center;
|
|
100
|
+
justify-content: center;
|
|
101
|
+
|
|
102
|
+
::ng-deep .mat-mdc-progress-spinner {
|
|
103
|
+
--mdc-circular-progress-active-indicator-color: var(--db-primary);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&[disabled] {
|
|
108
|
+
cursor: default;
|
|
109
|
+
background: var(--db-bg-color);
|
|
110
|
+
}
|
|
78
111
|
}
|
|
79
112
|
|
|
80
113
|
.chat-fab svg,
|
|
@@ -84,6 +117,7 @@
|
|
|
84
117
|
}
|
|
85
118
|
|
|
86
119
|
.chat-fab:hover {
|
|
120
|
+
// transform: rotate(15deg);
|
|
87
121
|
transform: scale(1.1);
|
|
88
122
|
}
|
|
89
123
|
|
|
@@ -92,7 +126,7 @@
|
|
|
92
126
|
top: -4px;
|
|
93
127
|
right: -4px;
|
|
94
128
|
background: var(--red);
|
|
95
|
-
color: var(--
|
|
129
|
+
color: var(--db-bg-color);
|
|
96
130
|
border-radius: 50%;
|
|
97
131
|
min-width: 18px;
|
|
98
132
|
height: 18px;
|
|
@@ -111,5 +145,5 @@
|
|
|
111
145
|
mask: url('/assets/logo.svg') no-repeat center;
|
|
112
146
|
mask-size: contain;
|
|
113
147
|
|
|
114
|
-
background-color: var(--primary
|
|
115
|
-
}
|
|
148
|
+
background-color: var(--db-primary);
|
|
149
|
+
}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
justify-content: space-between;
|
|
6
6
|
align-items: center;
|
|
7
7
|
padding: 10px 20px;
|
|
8
|
-
background-color: var(--
|
|
9
|
-
color: var(--text-
|
|
8
|
+
background-color: var(--db-bg-color);
|
|
9
|
+
color: var(--db-text-tertiary);
|
|
10
10
|
// cursor: move;
|
|
11
11
|
user-select: none;
|
|
12
12
|
}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
display: flex;
|
|
20
20
|
align-items: center;
|
|
21
21
|
gap: 6px;
|
|
22
|
-
font-family: var(--font
|
|
22
|
+
font-family: var(--db-font);
|
|
23
23
|
flex-wrap: nowrap;
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
.chat-header h2 {
|
|
34
34
|
margin: 0;
|
|
35
35
|
font-size: 1.2rem;
|
|
36
|
-
color: var(--text-
|
|
37
|
-
font-family: var(--font
|
|
36
|
+
color: var(--db-text-primary);
|
|
37
|
+
font-family: var(--db-font);
|
|
38
38
|
font-weight: bold;
|
|
39
39
|
white-space: nowrap;
|
|
40
40
|
flex-shrink: 0;
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
|
|
49
49
|
/* Header buttons: fullscreen + close (directly in header) */
|
|
50
50
|
.header-button {
|
|
51
|
-
background: var(--
|
|
52
|
-
border: 1px solid var(--
|
|
51
|
+
background: var(--db-bg-color);
|
|
52
|
+
border: 1px solid var(--db-bg-color);
|
|
53
53
|
border-radius: 50%;
|
|
54
54
|
width: 32px;
|
|
55
55
|
height: 32px;
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
align-items: center;
|
|
59
59
|
justify-content: center;
|
|
60
60
|
cursor: pointer;
|
|
61
|
-
color: var(--text-
|
|
61
|
+
color: var(--db-text-primary);
|
|
62
62
|
transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
|
|
63
63
|
outline: none;
|
|
64
64
|
|
|
@@ -69,9 +69,9 @@
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
&:hover {
|
|
72
|
-
// background-color: var(--primary
|
|
73
|
-
// border-color: var(--primary
|
|
74
|
-
// color: var(--
|
|
72
|
+
// background-color: var(--db-primary);
|
|
73
|
+
// border-color: var(--db-primary);
|
|
74
|
+
// color: var(--db-bg-color);
|
|
75
75
|
transform: translateY(-1px);
|
|
76
76
|
box-shadow: 0 4px 12px rgba(var(--black-rgb), 0.15);
|
|
77
77
|
}
|
|
@@ -79,4 +79,22 @@
|
|
|
79
79
|
&:active {
|
|
80
80
|
transform: translateY(0);
|
|
81
81
|
}
|
|
82
|
+
|
|
83
|
+
&.avatar-button {
|
|
84
|
+
overflow: hidden;
|
|
85
|
+
padding: 0;
|
|
86
|
+
|
|
87
|
+
mat-icon {
|
|
88
|
+
font-size: 22px;
|
|
89
|
+
width: 22px;
|
|
90
|
+
height: 22px;
|
|
91
|
+
color: var(--db-text-secondary);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.profile-avatar {
|
|
95
|
+
width: 100%;
|
|
96
|
+
height: 100%;
|
|
97
|
+
object-fit: cover;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
82
100
|
}
|