@aakash58/chatbot 1.1.16 → 1.1.18
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/esm2022/aakash58-chatbot.mjs +5 -0
- package/esm2022/lib/app/chat/chat-ui-state.service.mjs +170 -0
- package/esm2022/lib/app/chat/chat.service.mjs +445 -0
- package/esm2022/lib/app/chat/components/chat-button/chat-button.component.mjs +50 -0
- package/esm2022/lib/app/chat/components/chat-footer/chat-footer.component.mjs +12 -0
- package/esm2022/lib/app/chat/components/chat-header/chat-header.component.mjs +66 -0
- package/esm2022/lib/app/chat/components/chat-history-sidebar/chat-history-sidebar.component.mjs +186 -0
- package/esm2022/lib/app/chat/components/chat-window/chat-window.component.mjs +312 -0
- package/esm2022/lib/app/chat/components/message-input/message-input.component.mjs +36 -0
- package/esm2022/lib/app/chat/components/message-list/message-list.component.mjs +115 -0
- package/esm2022/lib/app/chat/model/chat-history.model.mjs +2 -0
- package/esm2022/lib/app/chat/model/chat-request.model.mjs +2 -0
- package/esm2022/lib/app/chat/model/chat-response.model.mjs +2 -0
- package/esm2022/lib/app/chat/model/chat-session.model.mjs +2 -0
- package/esm2022/lib/app/chat/model/chat-stream-message.model.mjs +2 -0
- package/esm2022/lib/app/chat/model/chat-stream-response.model.mjs +2 -0
- package/esm2022/lib/app/chat/services/chat-api.service.mjs +61 -0
- package/esm2022/lib/app/chat/services/chat-audio.service.mjs +50 -0
- package/esm2022/lib/app/chat/services/chat-history.service.mjs +252 -0
- package/esm2022/lib/app/login/login-form.component.mjs +46 -0
- package/esm2022/lib/app/personalization/personalization-dialog.component.mjs +194 -0
- package/esm2022/lib/app/personalization/personalization.service.mjs +149 -0
- package/esm2022/lib/app/personalization/sections/account/account-section.component.mjs +122 -0
- package/esm2022/lib/app/personalization/sections/preferences/color-picker-dialog.component.mjs +86 -0
- package/esm2022/lib/app/personalization/sections/preferences/preferences-section.component.mjs +115 -0
- package/esm2022/lib/app/personalization/sections/profile/profile-section.component.mjs +29 -0
- package/esm2022/lib/app/personalization/sections/settings/setting-section.component.mjs +30 -0
- package/esm2022/lib/app/personalization/sections/terms/terms-section.component.mjs +12 -0
- package/esm2022/lib/constant/doohbot-constant.mjs +28 -0
- package/esm2022/lib/constant/html-entities.mjs +9 -0
- package/esm2022/lib/constant/utf8.mjs +10 -0
- package/esm2022/lib/core/app-const.mjs +61 -0
- package/esm2022/lib/core/auth/account-api.service.mjs +40 -0
- package/esm2022/lib/core/auth/auth.service.mjs +391 -0
- package/esm2022/lib/core/auth/models/auth-result.model.mjs +3 -0
- package/esm2022/lib/core/auth/models/federated-login-request.model.mjs +6 -0
- package/esm2022/lib/core/auth/models/login-request.model.mjs +6 -0
- package/esm2022/lib/core/auth/storage.service.mjs +110 -0
- package/esm2022/lib/core/directives/draggable/draggable-dialog.directive.mjs +112 -0
- package/esm2022/lib/core/directives/fullscreen/fullscreen.directive.mjs +55 -0
- package/esm2022/lib/core/directives/resizable/resizable-dialog.directive.mjs +179 -0
- package/esm2022/lib/core/environments/environment.mjs +15 -0
- package/esm2022/lib/core/environments/environment.prod.mjs +15 -0
- package/esm2022/lib/core/helpers/crypto-helper.service.mjs +52 -0
- package/esm2022/lib/core/http/http-stream.service.mjs +97 -0
- package/esm2022/lib/core/http/http.service.mjs +103 -0
- package/esm2022/lib/core/interceptors/auth.interceptor.mjs +96 -0
- package/esm2022/lib/core/interceptors/license.interceptor.mjs +44 -0
- package/esm2022/lib/core/models/api-config.model.mjs +18 -0
- package/esm2022/lib/core/models/api-request.model.mjs +2 -0
- package/esm2022/lib/core/models/api-response.model.mjs +8 -0
- package/esm2022/lib/core/models/doohbot-config.model.mjs +18 -0
- package/esm2022/lib/core/models/license.model.mjs +2 -0
- package/esm2022/lib/core/models/message.mjs +2 -0
- package/esm2022/lib/core/models/theme-config.model.mjs +2 -0
- package/esm2022/lib/core/services/core-config.service.mjs +52 -0
- package/esm2022/lib/core/services/license.service.mjs +145 -0
- package/esm2022/lib/core/services/markdown.service.mjs +64 -0
- package/esm2022/lib/core/services/theme.service.mjs +248 -0
- package/esm2022/lib/core/types/auth-mode.type.mjs +2 -0
- package/esm2022/lib/core/types/auth-status.type.mjs +5 -0
- package/esm2022/lib/core/types/chat-stream.type.mjs +2 -0
- package/esm2022/lib/core/types/message-role.type.mjs +2 -0
- package/esm2022/lib/core/types/prompt-mode.type.mjs +5 -0
- package/esm2022/lib/core/types/snackbar-error.type.mjs +5 -0
- package/esm2022/lib/core/types/tenant-resolution-strategy.type.mjs +2 -0
- package/esm2022/lib/core/utils/logger.service.mjs +42 -0
- package/esm2022/lib/doohbot-input.mjs +20 -0
- package/esm2022/lib/doohbot.component.mjs +444 -0
- package/esm2022/lib/predefined_messages.mjs +15 -0
- package/esm2022/lib/shared/chips/chips.component.mjs +28 -0
- package/esm2022/lib/shared/dialog/dialog.component.mjs +36 -0
- package/esm2022/lib/shared/dialog/dialog.service.mjs +64 -0
- package/esm2022/lib/shared/dialog/dialog.utils.mjs +85 -0
- package/esm2022/lib/shared/dropdown-menu/dropdown-menu.component.mjs +29 -0
- package/esm2022/lib/shared/input-dialog/input-dialog.component.mjs +38 -0
- package/esm2022/lib/shared/menu-item/menu-item.component.mjs +24 -0
- package/esm2022/lib/shared/pipes/simple-markdown.pipe.mjs +27 -0
- package/esm2022/lib/shared/snackbar/snackbar.component.mjs +43 -0
- package/esm2022/lib/shared/snackbar/snackbar.service.mjs +46 -0
- package/esm2022/lib/shared/snackbar/snackbar.utils.mjs +43 -0
- package/esm2022/public-api.mjs +37 -0
- package/fesm2022/aakash58-chatbot.mjs +1037 -827
- package/fesm2022/aakash58-chatbot.mjs.map +1 -1
- package/index.d.ts +3 -373
- package/lib/app/chat/chat-ui-state.service.d.ts +96 -0
- package/lib/app/chat/chat.service.d.ts +88 -0
- package/lib/app/chat/components/chat-button/chat-button.component.d.ts +16 -0
- package/lib/app/chat/components/chat-footer/chat-footer.component.d.ts +5 -0
- package/lib/app/chat/components/chat-header/chat-header.component.d.ts +24 -0
- package/lib/app/chat/components/chat-history-sidebar/chat-history-sidebar.component.d.ts +49 -0
- package/lib/app/chat/components/chat-window/chat-window.component.d.ts +107 -0
- package/lib/app/chat/components/message-input/message-input.component.d.ts +12 -0
- package/lib/app/chat/components/message-list/message-list.component.d.ts +40 -0
- package/lib/app/chat/model/chat-history.model.d.ts +51 -0
- package/lib/app/chat/model/chat-request.model.d.ts +10 -0
- package/lib/app/chat/model/chat-response.model.d.ts +9 -0
- package/lib/app/chat/model/chat-session.model.d.ts +12 -0
- package/lib/app/chat/model/chat-stream-message.model.d.ts +5 -0
- package/lib/app/chat/model/chat-stream-response.model.d.ts +10 -0
- package/lib/app/chat/services/chat-api.service.d.ts +30 -0
- package/lib/app/chat/services/chat-audio.service.d.ts +19 -0
- package/lib/app/chat/services/chat-history.service.d.ts +53 -0
- package/lib/app/login/login-form.component.d.ts +20 -0
- package/lib/app/personalization/personalization-dialog.component.d.ts +53 -0
- package/lib/app/personalization/personalization.service.d.ts +66 -0
- package/lib/app/personalization/sections/account/account-section.component.d.ts +30 -0
- package/lib/app/personalization/sections/preferences/color-picker-dialog.component.d.ts +17 -0
- package/lib/app/personalization/sections/preferences/preferences-section.component.d.ts +27 -0
- package/lib/app/personalization/sections/profile/profile-section.component.d.ts +17 -0
- package/lib/app/personalization/sections/settings/setting-section.component.d.ts +10 -0
- package/lib/app/personalization/sections/terms/terms-section.component.d.ts +5 -0
- package/lib/constant/doohbot-constant.d.ts +12 -0
- package/lib/constant/html-entities.d.ts +8 -0
- package/lib/constant/utf8.d.ts +9 -0
- package/lib/core/app-const.d.ts +11 -0
- package/lib/core/auth/account-api.service.d.ts +20 -0
- package/lib/core/auth/auth.service.d.ts +90 -0
- package/lib/core/auth/models/auth-result.model.d.ts +4 -0
- package/lib/core/auth/models/federated-login-request.model.d.ts +5 -0
- package/lib/core/auth/models/login-request.model.d.ts +6 -0
- package/lib/core/auth/storage.service.d.ts +21 -0
- package/lib/core/directives/draggable/draggable-dialog.directive.d.ts +23 -0
- package/lib/core/directives/fullscreen/fullscreen.directive.d.ts +14 -0
- package/lib/core/directives/resizable/resizable-dialog.directive.d.ts +30 -0
- package/lib/core/environments/environment.d.ts +7 -0
- package/lib/core/environments/environment.prod.d.ts +7 -0
- package/lib/core/helpers/crypto-helper.service.d.ts +12 -0
- package/lib/core/http/http-stream.service.d.ts +18 -0
- package/lib/core/http/http.service.d.ts +20 -0
- package/lib/core/interceptors/auth.interceptor.d.ts +18 -0
- package/lib/core/interceptors/license.interceptor.d.ts +11 -0
- package/lib/core/models/api-config.model.d.ts +58 -0
- package/lib/core/models/api-request.model.d.ts +77 -0
- package/lib/core/models/api-response.model.d.ts +6 -0
- package/lib/core/models/doohbot-config.model.d.ts +81 -0
- package/lib/core/models/license.model.d.ts +23 -0
- package/lib/core/models/message.d.ts +16 -0
- package/lib/core/models/theme-config.model.d.ts +28 -0
- package/lib/core/services/core-config.service.d.ts +23 -0
- package/lib/core/services/license.service.d.ts +33 -0
- package/lib/core/services/markdown.service.d.ts +8 -0
- package/lib/core/services/theme.service.d.ts +40 -0
- package/lib/core/types/auth-mode.type.d.ts +4 -0
- package/lib/core/types/auth-status.type.d.ts +4 -0
- package/lib/core/types/chat-stream.type.d.ts +4 -0
- package/lib/core/types/message-role.type.d.ts +4 -0
- package/lib/core/types/prompt-mode.type.d.ts +4 -0
- package/lib/core/types/snackbar-error.type.d.ts +4 -0
- package/lib/core/types/tenant-resolution-strategy.type.d.ts +4 -0
- package/lib/core/utils/logger.service.d.ts +11 -0
- package/lib/doohbot-input.d.ts +19 -0
- package/lib/doohbot.component.d.ts +108 -0
- package/lib/predefined_messages.d.ts +2 -0
- package/lib/shared/chips/chips.component.d.ts +10 -0
- package/lib/shared/dialog/dialog.component.d.ts +19 -0
- package/lib/shared/dialog/dialog.service.d.ts +29 -0
- package/lib/shared/dialog/dialog.utils.d.ts +41 -0
- package/lib/shared/dropdown-menu/dropdown-menu.component.d.ts +11 -0
- package/lib/shared/input-dialog/input-dialog.component.d.ts +20 -0
- package/lib/shared/menu-item/menu-item.component.d.ts +9 -0
- package/lib/shared/pipes/simple-markdown.pipe.d.ts +10 -0
- package/lib/shared/snackbar/snackbar.component.d.ts +14 -0
- package/lib/shared/snackbar/snackbar.service.d.ts +19 -0
- package/lib/shared/snackbar/snackbar.utils.d.ts +33 -0
- package/package.json +4 -2
- package/public-api.d.ts +11 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { LicensingContext } from '../models/license.model';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class LicenseService {
|
|
4
|
+
private http;
|
|
5
|
+
private coreConfig;
|
|
6
|
+
private registry;
|
|
7
|
+
/**
|
|
8
|
+
* Load the license configuration from a JSON file.
|
|
9
|
+
* Supports both Hierarchical (entitlements) and Flat-map (package:key) formats.
|
|
10
|
+
* @param filePath Path to the license JSON file
|
|
11
|
+
*/
|
|
12
|
+
loadLicenseFile(filePath?: string): Promise<void>;
|
|
13
|
+
private processHierarchicalLicense;
|
|
14
|
+
private processFlatMapLicense;
|
|
15
|
+
/**
|
|
16
|
+
* Resolve the correct license key based on context and requested package
|
|
17
|
+
* @param context The current licensing context (tenant, user, roles)
|
|
18
|
+
* @param packageId The ID of the package requesting a license
|
|
19
|
+
* @returns The resolved license key, or null if unauthorized
|
|
20
|
+
*/
|
|
21
|
+
resolveLicenseKey(context: LicensingContext, packageId: string): string | null;
|
|
22
|
+
private resolveFromRegistry;
|
|
23
|
+
/**
|
|
24
|
+
* Resolves the license key for the current tenant.
|
|
25
|
+
*/
|
|
26
|
+
resolveTenantLicenseKey(tenancyName?: string): string | null;
|
|
27
|
+
/**
|
|
28
|
+
* Check if a registry is currently loaded
|
|
29
|
+
*/
|
|
30
|
+
isRegistryLoaded(): boolean;
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LicenseService, never>;
|
|
32
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<LicenseService>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class MarkdownService {
|
|
3
|
+
constructor();
|
|
4
|
+
convert(markdown: string): string;
|
|
5
|
+
private escapeHtml;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MarkdownService, never>;
|
|
7
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MarkdownService>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { OnDestroy, RendererFactory2 } from '@angular/core';
|
|
2
|
+
import { OverlayContainer } from '@angular/cdk/overlay';
|
|
3
|
+
import { DoohbotThemeConfig } from '../models/theme-config.model';
|
|
4
|
+
import { PersonalizationService } from '../../app/personalization/personalization.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export type ThemeMode = 'light' | 'dark' | 'auto';
|
|
7
|
+
export declare class ThemeService implements OnDestroy {
|
|
8
|
+
private overlay;
|
|
9
|
+
private personalization;
|
|
10
|
+
private renderer;
|
|
11
|
+
private _theme;
|
|
12
|
+
theme: import("@angular/core").Signal<ThemeMode>;
|
|
13
|
+
private _activeTheme;
|
|
14
|
+
activeTheme: import("@angular/core").Signal<"light-theme" | "dark-theme">;
|
|
15
|
+
private observer;
|
|
16
|
+
constructor(rendererFactory: RendererFactory2, overlay: OverlayContainer, personalization: PersonalizationService);
|
|
17
|
+
private _currentConfig;
|
|
18
|
+
private rootElement;
|
|
19
|
+
setThemeConfig(config: DoohbotThemeConfig, rootElement: HTMLElement): void;
|
|
20
|
+
applyPrimaryColorToGlobal(colorInput: string): void;
|
|
21
|
+
/**
|
|
22
|
+
* Simple luminance-based contrast calculation
|
|
23
|
+
* Returns #ffffff for dark colors and #000000 for light colors
|
|
24
|
+
*/
|
|
25
|
+
private getContrastColor;
|
|
26
|
+
setTheme(mode: ThemeMode): void;
|
|
27
|
+
private updateActiveTheme;
|
|
28
|
+
private handleAutoTheme;
|
|
29
|
+
private detectAndApplyParentTheme;
|
|
30
|
+
private isParentDark;
|
|
31
|
+
private applyThemeToGlobal;
|
|
32
|
+
private cleanupObservers;
|
|
33
|
+
ngOnDestroy(): void;
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated Manual CSS variable application is now handled via theme.css tokens
|
|
36
|
+
*/
|
|
37
|
+
applyCssVariables(element: HTMLElement, config: DoohbotThemeConfig | undefined): void;
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ThemeService, never>;
|
|
39
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ThemeService>;
|
|
40
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare class Logger {
|
|
2
|
+
private static prefix;
|
|
3
|
+
private static styles;
|
|
4
|
+
private static canLog;
|
|
5
|
+
static log(message: string, ...args: any[]): void;
|
|
6
|
+
static info(message: string, ...args: any[]): void;
|
|
7
|
+
static warn(message: string, ...args: any[]): void;
|
|
8
|
+
static error(message: string, ...args: any[]): void;
|
|
9
|
+
static debug(message: string, ...args: any[]): void;
|
|
10
|
+
}
|
|
11
|
+
export default Logger;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare class DoohbotInput {
|
|
2
|
+
username: string;
|
|
3
|
+
password: string;
|
|
4
|
+
rememberMe?: boolean;
|
|
5
|
+
authToken?: string;
|
|
6
|
+
license?: string;
|
|
7
|
+
licenseCode?: string;
|
|
8
|
+
licenseKey?: string;
|
|
9
|
+
licenseFilePath?: string;
|
|
10
|
+
apiBaseUrl?: string;
|
|
11
|
+
apiSegment?: string;
|
|
12
|
+
tenancyName?: string;
|
|
13
|
+
storageKey?: string;
|
|
14
|
+
secretKey?: string;
|
|
15
|
+
companyCode?: string;
|
|
16
|
+
buttonStyle?: 'fab' | 'sidebar' | 'sidebar-top' | 'sidebar-bottom';
|
|
17
|
+
primaryColor?: string;
|
|
18
|
+
accentColor?: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { ElementRef, OnDestroy, OnInit, Renderer2, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { LoginRequest } from './core/auth/models/login-request.model';
|
|
3
|
+
import { DoohbotInput } from './doohbot-input';
|
|
4
|
+
import { DoohbotApiConfig } from './core/models/api-config.model';
|
|
5
|
+
import { DoohbotThemeConfig } from './core/models/theme-config.model';
|
|
6
|
+
import { FullscreenDirective } from './core/directives/fullscreen/fullscreen.directive';
|
|
7
|
+
import { ChatSession } from './app/chat/model/chat-session.model';
|
|
8
|
+
import { AuthStatus } from './core/types/auth-status.type';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
export declare class Doohbot extends DoohbotInput implements OnInit, OnDestroy {
|
|
11
|
+
private elementRef;
|
|
12
|
+
private renderer;
|
|
13
|
+
config: DoohbotInput;
|
|
14
|
+
buttonStyle?: 'fab' | 'sidebar' | 'sidebar-top' | 'sidebar-bottom';
|
|
15
|
+
enableDrag: boolean;
|
|
16
|
+
enableResize: boolean;
|
|
17
|
+
apiConfig?: DoohbotApiConfig;
|
|
18
|
+
themeConfig: DoohbotThemeConfig | undefined;
|
|
19
|
+
private chatHistory;
|
|
20
|
+
private uiState;
|
|
21
|
+
private themeService;
|
|
22
|
+
private authService;
|
|
23
|
+
private chatService;
|
|
24
|
+
private dialogService;
|
|
25
|
+
private snackbarService;
|
|
26
|
+
private personalization;
|
|
27
|
+
private licenseService;
|
|
28
|
+
isChatOpen: import("@angular/core").WritableSignal<boolean>;
|
|
29
|
+
isHistorySidebarOpen: import("@angular/core").WritableSignal<boolean>;
|
|
30
|
+
isFullScreen: import("@angular/core").WritableSignal<boolean>;
|
|
31
|
+
unreadCount: import("@angular/core").Signal<number>;
|
|
32
|
+
messages: import("@angular/core").WritableSignal<import("./core/models/message").Message[]>;
|
|
33
|
+
isBotTyping: import("@angular/core").WritableSignal<boolean>;
|
|
34
|
+
isStreaming: import("@angular/core").WritableSignal<boolean>;
|
|
35
|
+
messageError: import("@angular/core").Signal<string | null>;
|
|
36
|
+
showSuggestionChips: import("@angular/core").Signal<boolean>;
|
|
37
|
+
chatSessions: import("@angular/core").WritableSignal<ChatSession[]>;
|
|
38
|
+
hasMoreHistory: import("@angular/core").WritableSignal<boolean>;
|
|
39
|
+
isLoadingMore: import("@angular/core").WritableSignal<boolean>;
|
|
40
|
+
isLoadingSessions: import("@angular/core").WritableSignal<boolean>;
|
|
41
|
+
processingSessionId: import("@angular/core").WritableSignal<string | null>;
|
|
42
|
+
isLoggingIn: import("@angular/core").WritableSignal<boolean>;
|
|
43
|
+
authError: import("@angular/core").WritableSignal<string | null>;
|
|
44
|
+
authSuccess: import("@angular/core").WritableSignal<string | null>;
|
|
45
|
+
activeButtonStyle: import("@angular/core").Signal<"fab" | "sidebar" | "sidebar-top" | "sidebar-bottom">;
|
|
46
|
+
userName: string;
|
|
47
|
+
predefinedMessages: string[];
|
|
48
|
+
suggestedMessages: string[];
|
|
49
|
+
maxMessageLength: number;
|
|
50
|
+
readonly DoohbotConst: {
|
|
51
|
+
appTitle: string;
|
|
52
|
+
appSubtitle: string;
|
|
53
|
+
welcomeDescription: string;
|
|
54
|
+
hintText: string;
|
|
55
|
+
errorMessage: string;
|
|
56
|
+
appLogo: string;
|
|
57
|
+
appTextLogo: string;
|
|
58
|
+
appHeaderLogo: string;
|
|
59
|
+
userAvatar: string;
|
|
60
|
+
botAvatar: string;
|
|
61
|
+
};
|
|
62
|
+
private contextCleanup?;
|
|
63
|
+
authStatus: import("@angular/core").WritableSignal<AuthStatus>;
|
|
64
|
+
isAuthenticated: import("@angular/core").WritableSignal<boolean>;
|
|
65
|
+
chatWindowRef: ElementRef;
|
|
66
|
+
fullscreenDirective: FullscreenDirective;
|
|
67
|
+
constructor(elementRef: ElementRef, renderer: Renderer2);
|
|
68
|
+
ngOnInit(): Promise<void>;
|
|
69
|
+
private canAttemptFederatedLogin;
|
|
70
|
+
private initializeUI;
|
|
71
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
72
|
+
onNormalLogin(credentials: LoginRequest): void;
|
|
73
|
+
onFederatedLogin(token?: string): Promise<void>;
|
|
74
|
+
performLogout(): void;
|
|
75
|
+
toggleChat(): void;
|
|
76
|
+
sendMessage(text: string): Promise<void>;
|
|
77
|
+
onStopRequest(): void;
|
|
78
|
+
clearChat(): void;
|
|
79
|
+
clearMessageError(): void;
|
|
80
|
+
toggleHistorySidebar(): void;
|
|
81
|
+
loadChatSession(session: ChatSession): void;
|
|
82
|
+
deleteSession(sessionId: string): void;
|
|
83
|
+
deleteAllSessions(): void;
|
|
84
|
+
renameSession(event: {
|
|
85
|
+
sessionId: string;
|
|
86
|
+
newTitle: string;
|
|
87
|
+
}): void;
|
|
88
|
+
private loadUserSessions;
|
|
89
|
+
/**
|
|
90
|
+
* Load more sessions for infinite scroll
|
|
91
|
+
*/
|
|
92
|
+
loadMoreHistory(): void;
|
|
93
|
+
/**
|
|
94
|
+
* Manually refresh history
|
|
95
|
+
*/
|
|
96
|
+
refreshHistory(): void;
|
|
97
|
+
toggleFullScreen(): void;
|
|
98
|
+
trackByMessageId(index: number, item: any): string;
|
|
99
|
+
/**
|
|
100
|
+
* Resolve and update the username from all available sources
|
|
101
|
+
*/
|
|
102
|
+
private updateUserName;
|
|
103
|
+
userAvatarUrl(): string;
|
|
104
|
+
ngOnDestroy(): void;
|
|
105
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Doohbot, never>;
|
|
106
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Doohbot, "app-doohbot", never, { "config": { "alias": "config"; "required": false; }; "buttonStyle": { "alias": "buttonStyle"; "required": false; }; "enableDrag": { "alias": "enableDrag"; "required": false; }; "enableResize": { "alias": "enableResize"; "required": false; }; "apiConfig": { "alias": "apiConfig"; "required": false; }; "themeConfig": { "alias": "themeConfig"; "required": false; }; }, {}, never, never, true, never>;
|
|
107
|
+
}
|
|
108
|
+
export declare function initializeApp(): Promise<any>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class Chips {
|
|
4
|
+
messages: string[];
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
chipClick: EventEmitter<string>;
|
|
7
|
+
onChipClick(msg: string): void;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Chips, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Chips, "app-chips", never, { "messages": { "alias": "messages"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "chipClick": "chipClick"; }, never, never, true, never>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export interface DialogData {
|
|
4
|
+
title: string;
|
|
5
|
+
message: string;
|
|
6
|
+
confirmText?: string;
|
|
7
|
+
cancelText?: string;
|
|
8
|
+
confirmButtonColor?: 'primary' | 'accent' | 'warn';
|
|
9
|
+
icon?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class DialogComponent {
|
|
12
|
+
dialogRef: MatDialogRef<DialogComponent>;
|
|
13
|
+
data: DialogData;
|
|
14
|
+
constructor(dialogRef: MatDialogRef<DialogComponent>, data: DialogData);
|
|
15
|
+
onCancel(): void;
|
|
16
|
+
onConfirm(): void;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DialogComponent, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DialogComponent, "app-dialog", never, {}, {}, never, never, true, never>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { DialogData } from './dialog.component';
|
|
4
|
+
import { InputDialogData } from '../input-dialog/input-dialog.component';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class DialogService {
|
|
7
|
+
private dialog;
|
|
8
|
+
constructor(dialog: MatDialog);
|
|
9
|
+
/**
|
|
10
|
+
* Opens a confirmation dialog with customizable options
|
|
11
|
+
* @param data Configuration for the dialog
|
|
12
|
+
* @returns Observable that emits true if confirmed, false if cancelled
|
|
13
|
+
*/
|
|
14
|
+
open(data: DialogData): Observable<boolean>;
|
|
15
|
+
/**
|
|
16
|
+
* Convenience method for delete confirmation dialogs
|
|
17
|
+
* @param itemName Name of the item being deleted
|
|
18
|
+
* @returns Observable that emits true if confirmed, false if cancelled
|
|
19
|
+
*/
|
|
20
|
+
confirmDelete(itemName?: string): Observable<boolean>;
|
|
21
|
+
/**
|
|
22
|
+
* Opens a dialog with an input field
|
|
23
|
+
* @param data Configuration for the input dialog
|
|
24
|
+
* @returns Observable that emits the input value if confirmed, null if cancelled
|
|
25
|
+
*/
|
|
26
|
+
openInput(data: InputDialogData): Observable<string | null>;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DialogService, never>;
|
|
28
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DialogService>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { DialogService } from './dialog.service';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
/**
|
|
4
|
+
* Utility class for common dialog operations
|
|
5
|
+
* Provides reusable dialog configurations for consistency across the application
|
|
6
|
+
*/
|
|
7
|
+
export declare class DialogUtils {
|
|
8
|
+
/**
|
|
9
|
+
* Show a logout confirmation dialog
|
|
10
|
+
* @param dialogService The DialogService instance
|
|
11
|
+
* @returns Observable that emits true if confirmed, false if cancelled
|
|
12
|
+
*/
|
|
13
|
+
static confirmLogout(dialogService: DialogService): Observable<boolean>;
|
|
14
|
+
/**
|
|
15
|
+
* Show a reset confirmation dialog
|
|
16
|
+
* @param dialogService The DialogService instance
|
|
17
|
+
* @param itemName Optional name of what is being reset (default: 'preferences')
|
|
18
|
+
* @returns Observable that emits true if confirmed, false if cancelled
|
|
19
|
+
*/
|
|
20
|
+
static confirmReset(dialogService: DialogService, itemName?: string): Observable<boolean>;
|
|
21
|
+
/**
|
|
22
|
+
* Show a delete confirmation dialog
|
|
23
|
+
* @param dialogService The DialogService instance
|
|
24
|
+
* @param itemName Name of the item being deleted
|
|
25
|
+
* @returns Observable that emits true if confirmed, false if cancelled
|
|
26
|
+
*/
|
|
27
|
+
static confirmDelete(dialogService: DialogService, itemName?: string): Observable<boolean>;
|
|
28
|
+
/**
|
|
29
|
+
* Show a clear all confirmation dialog
|
|
30
|
+
* @param dialogService The DialogService instance
|
|
31
|
+
* @param itemName Name of what is being cleared (e.g., 'chat history', 'all sessions')
|
|
32
|
+
* @returns Observable that emits true if confirmed, false if cancelled
|
|
33
|
+
*/
|
|
34
|
+
static confirmClearAll(dialogService: DialogService, itemName?: string): Observable<boolean>;
|
|
35
|
+
/**
|
|
36
|
+
* Show a discard changes confirmation dialog
|
|
37
|
+
* @param dialogService The DialogService instance
|
|
38
|
+
* @returns Observable that emits true if confirmed, false if cancelled
|
|
39
|
+
*/
|
|
40
|
+
static confirmDiscardChanges(dialogService: DialogService): Observable<boolean>;
|
|
41
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AfterContentInit, ElementRef, QueryList } from '@angular/core';
|
|
2
|
+
import { MenuItem } from '../menu-item/menu-item.component';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class DropdownMenu implements AfterContentInit {
|
|
5
|
+
detailsRef: ElementRef<HTMLDetailsElement>;
|
|
6
|
+
menuItems: QueryList<MenuItem>;
|
|
7
|
+
ngAfterContentInit(): void;
|
|
8
|
+
close(): void;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DropdownMenu, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DropdownMenu, "app-dropdown-menu", never, {}, {}, ["menuItems"], ["[trigger]", "*"], true, never>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export interface InputDialogData {
|
|
4
|
+
title: string;
|
|
5
|
+
message: string;
|
|
6
|
+
initialValue: string;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
confirmText?: string;
|
|
9
|
+
cancelText?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class InputDialogComponent {
|
|
12
|
+
dialogRef: MatDialogRef<InputDialogComponent>;
|
|
13
|
+
data: InputDialogData;
|
|
14
|
+
value: string;
|
|
15
|
+
constructor(dialogRef: MatDialogRef<InputDialogComponent>, data: InputDialogData);
|
|
16
|
+
onCancel(): void;
|
|
17
|
+
onConfirm(): void;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InputDialogComponent, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InputDialogComponent, "app-input-dialog", never, {}, {}, never, never, true, never>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class MenuItem {
|
|
4
|
+
href: string;
|
|
5
|
+
selected: EventEmitter<void>;
|
|
6
|
+
onClick(event: Event): void;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuItem, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MenuItem, "app-menu-item", never, { "href": { "alias": "href"; "required": false; }; }, { "selected": "selected"; }, never, ["*"], true, never>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { SafeHtml } from '@angular/platform-browser';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class MarkdownPipe implements PipeTransform {
|
|
5
|
+
private markdownService;
|
|
6
|
+
private sanitizer;
|
|
7
|
+
transform(value: string | undefined | null): SafeHtml;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MarkdownPipe, never>;
|
|
9
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<MarkdownPipe, "Markdown", true>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { SnackBarError } from '../../core/types/snackbar-error.type';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class SnackBar implements OnInit {
|
|
5
|
+
private snackBarRef;
|
|
6
|
+
private data;
|
|
7
|
+
message: string | null;
|
|
8
|
+
type: SnackBarError;
|
|
9
|
+
ngOnInit(): void;
|
|
10
|
+
close(): void;
|
|
11
|
+
get icon(): string;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SnackBar, never>;
|
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SnackBar, "app-snackbar", never, {}, {}, never, never, true, never>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SnackBarError } from '../../core/types/snackbar-error.type';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export interface SnackbarConfig {
|
|
4
|
+
message: string;
|
|
5
|
+
duration?: number;
|
|
6
|
+
type: SnackBarError;
|
|
7
|
+
}
|
|
8
|
+
export declare class SnackbarService {
|
|
9
|
+
private snackBar;
|
|
10
|
+
constructor();
|
|
11
|
+
private show;
|
|
12
|
+
success(message: string, duration?: number): void;
|
|
13
|
+
warn(message: string, duration?: number): void;
|
|
14
|
+
error(message: string, duration?: number): void;
|
|
15
|
+
info(message: string, duration?: number): void;
|
|
16
|
+
clear(): void;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SnackbarService, never>;
|
|
18
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SnackbarService>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { SnackbarService } from './snackbar.service';
|
|
2
|
+
/**
|
|
3
|
+
* Utility class for common snackbar operations
|
|
4
|
+
* Provides reusable snackbar configurations for consistency across the application
|
|
5
|
+
*/
|
|
6
|
+
export declare class SnackbarUtils {
|
|
7
|
+
private static service;
|
|
8
|
+
/**
|
|
9
|
+
* Initialize the utility with a SnackbarService instance
|
|
10
|
+
* @param service The SnackbarService instance
|
|
11
|
+
*/
|
|
12
|
+
static init(service: SnackbarService): void;
|
|
13
|
+
/**
|
|
14
|
+
* Show a success snackbar
|
|
15
|
+
* @param message The message to show
|
|
16
|
+
*/
|
|
17
|
+
static success(message: string): void;
|
|
18
|
+
/**
|
|
19
|
+
* Show an error snackbar
|
|
20
|
+
* @param message The message to show
|
|
21
|
+
*/
|
|
22
|
+
static error(message: string): void;
|
|
23
|
+
/**
|
|
24
|
+
* Show a warning snackbar
|
|
25
|
+
* @param message The message to show
|
|
26
|
+
*/
|
|
27
|
+
static warn(message: string): void;
|
|
28
|
+
/**
|
|
29
|
+
* Show an info snackbar
|
|
30
|
+
* @param message The message to show
|
|
31
|
+
*/
|
|
32
|
+
static info(message: string): void;
|
|
33
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aakash58/chatbot",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.1.18",
|
|
4
|
+
"description": "version downgrade",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^20.3.0",
|
|
7
7
|
"@angular/core": "^20.3.0",
|
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
".": {
|
|
24
24
|
"types": "./index.d.ts",
|
|
25
|
+
"esm2022": "./esm2022/aakash58-chatbot.mjs",
|
|
26
|
+
"esm": "./esm2022/aakash58-chatbot.mjs",
|
|
25
27
|
"default": "./fesm2022/aakash58-chatbot.mjs"
|
|
26
28
|
}
|
|
27
29
|
}
|
package/public-api.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './lib/doohbot.component';
|
|
2
|
+
export * from './lib/doohbot-input';
|
|
3
|
+
export * from './lib/core/models/api-config.model';
|
|
4
|
+
export * from './lib/constant/doohbot-constant';
|
|
5
|
+
export * from './lib/core/models/theme-config.model';
|
|
6
|
+
export * from './lib/shared/dialog/dialog.component';
|
|
7
|
+
export * from './lib/shared/dialog/dialog.service';
|
|
8
|
+
export * from './lib/shared/chips/chips.component';
|
|
9
|
+
export * from './lib/shared/snackbar/snackbar.component';
|
|
10
|
+
export * from './lib/shared/dropdown-menu/dropdown-menu.component';
|
|
11
|
+
export * from './lib/shared/menu-item/menu-item.component';
|