@mxmweb/aichat 1.4.2 → 1.4.3

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.
@@ -1,9 +1,40 @@
1
+ import { default as React } from 'react';
1
2
  import { default as AiChat } from '../../components/AiChat';
3
+ import { AiChatStyles } from '../../components/defaultStyleSet';
4
+ interface SenderConfig {
5
+ actions?: Array<{
6
+ name: string;
7
+ icon?: React.ReactNode;
8
+ badgeCount?: number;
9
+ enabled?: boolean;
10
+ [key: string]: any;
11
+ }>;
12
+ switchs?: Array<{
13
+ name: string;
14
+ label: string;
15
+ enabled?: boolean;
16
+ [key: string]: any;
17
+ }>;
18
+ [key: string]: any;
19
+ }
20
+ interface CustomComponents {
21
+ LogoBox?: React.ComponentType<any> | null;
22
+ AiChatBox?: React.ComponentType<any>;
23
+ UserChatBox?: React.ComponentType<any>;
24
+ WelcomeComponent?: React.ComponentType<any>;
25
+ DisplayLoading?: React.ComponentType<any>;
26
+ DisplayError?: React.ComponentType<any>;
27
+ AppError?: React.ComponentType<any>;
28
+ AppLoading?: React.ComponentType<any>;
29
+ [key: string]: React.ComponentType<any> | null | undefined;
30
+ }
2
31
  interface GientechChatAdopterProps {
3
32
  token: string;
4
33
  url?: string;
5
- styles?: any;
34
+ styles?: AiChatStyles;
6
35
  eventsEmit?: (eventName: string, data: any) => void;
36
+ CustomComponents?: CustomComponents;
37
+ senderConfig?: SenderConfig;
7
38
  [key: string]: any;
8
39
  }
9
40
  export default function withGientechChatAdopter(WrappedComponent?: typeof AiChat): ({ token, url, styles, eventsEmit, ...rest }: GientechChatAdopterProps) => import("react/jsx-runtime").JSX.Element;
@@ -12,37 +12,43 @@ export interface ThemeColors {
12
12
  success: string;
13
13
  warning: string;
14
14
  error: string;
15
- info: string;
16
- background: string;
17
- text: string;
18
- border: string;
19
- disabled: string;
20
- disabledBackground: string;
15
+ info?: string;
16
+ background?: string;
17
+ text?: string;
18
+ border?: string;
19
+ disabled?: string;
20
+ disabledBackground?: string;
21
21
  disabledText: string;
22
- shadow: string;
23
- appBackground: string;
22
+ shadow?: string;
23
+ appBackground?: string;
24
+ [key: string]: string | undefined;
24
25
  }
25
26
  export interface ThemeOthers {
26
27
  }
27
28
  export interface ThemeSpace {
28
- sidebar: string;
29
- size: string;
30
- radius: string;
31
- padding: string;
32
- margin: string;
33
- shadow: string;
34
- lineHeight: string;
29
+ sidebar?: string;
30
+ size?: string;
31
+ radius?: string;
32
+ padding?: string;
33
+ margin?: string;
34
+ shadow?: string;
35
+ lineHeight?: string;
36
+ [key: string]: string | undefined;
35
37
  }
36
38
  export interface ThemeIcons {
37
- aiAvatar: string;
38
- userAvatar: string;
39
- pdf: string;
40
- word: string;
41
- image: string;
42
- video: string;
43
- audio: string;
44
- excel: string;
45
- ppt: string;
39
+ aiAvatar?: string;
40
+ userAvatar?: string;
41
+ pdf?: string;
42
+ word?: string;
43
+ image?: string;
44
+ video?: string;
45
+ audio?: string;
46
+ excel?: string;
47
+ ppt?: string;
48
+ docx?: string;
49
+ sheets?: string;
50
+ pptx?: string;
51
+ [key: string]: string | undefined;
46
52
  }
47
53
  export interface AppTheme {
48
54
  colors: ThemeColors;