@quidgest/chatbot 0.0.8 → 0.1.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/dist/components/CBMessage.vue.d.ts +59 -2
- package/dist/components/ChatBot.vue.d.ts +25 -26
- package/dist/components/PulseDots.vue.d.ts +2 -0
- package/dist/index.js +68 -9
- package/dist/index.mjs +2532 -1304
- package/dist/style.css +1 -1
- package/dist/types/chatbot.type.d.ts +14 -0
- package/dist/types/message.type.d.ts +7 -1
- package/package.json +13 -12
- package/src/assets/copy.svg +7 -0
- package/src/assets/styles/styles.scss +107 -23
- package/src/assets/thumbDown.svg +9 -0
- package/src/assets/thumbUp.svg +9 -0
- package/src/assets/user_avatar.png +0 -0
- package/src/components/CBMessage.vue +235 -40
- package/src/components/ChatBot.vue +439 -334
- package/src/components/PulseDots.vue +15 -0
- package/src/types/chatbot.type.ts +15 -0
- package/src/types/message.type.ts +8 -1
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { ChatBotMessageSender } from '../types/message.type';
|
|
2
|
+
import { ResourceStrings } from '../types/texts.type';
|
|
3
|
+
|
|
1
4
|
export interface CBMessageProps {
|
|
2
|
-
sender?:
|
|
5
|
+
sender?: ChatBotMessageSender;
|
|
3
6
|
message?: string;
|
|
4
7
|
date?: Date;
|
|
5
8
|
loading?: boolean;
|
|
@@ -7,16 +10,70 @@ export interface CBMessageProps {
|
|
|
7
10
|
* Project locale
|
|
8
11
|
*/
|
|
9
12
|
dateFormat?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Image preview URL
|
|
15
|
+
*/
|
|
16
|
+
imagePreviewUrl?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Default chatBot texts
|
|
19
|
+
*/
|
|
20
|
+
texts?: ResourceStrings;
|
|
21
|
+
/**
|
|
22
|
+
* Default api endpoint
|
|
23
|
+
*/
|
|
24
|
+
apiEndpoint?: String;
|
|
25
|
+
/**
|
|
26
|
+
* Session ID
|
|
27
|
+
*/
|
|
28
|
+
sessionID?: String;
|
|
29
|
+
/**
|
|
30
|
+
* User image
|
|
31
|
+
*/
|
|
32
|
+
userImage: string;
|
|
33
|
+
/**
|
|
34
|
+
* Chatbot image
|
|
35
|
+
*/
|
|
36
|
+
chatbotImage: string;
|
|
37
|
+
/**
|
|
38
|
+
* Flag to mark welcome messages
|
|
39
|
+
*/
|
|
40
|
+
isWelcomeMessage?: boolean;
|
|
10
41
|
}
|
|
11
42
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CBMessageProps>, {
|
|
12
43
|
sender: string;
|
|
44
|
+
userImage: undefined;
|
|
13
45
|
date: () => Date;
|
|
46
|
+
texts: () => {
|
|
47
|
+
commentDialogTitle: string;
|
|
48
|
+
commentPlaceholder: string;
|
|
49
|
+
goodResponse: string;
|
|
50
|
+
badResponse: string;
|
|
51
|
+
copyResponse: string;
|
|
52
|
+
submitButton: string;
|
|
53
|
+
cancelButton: string;
|
|
54
|
+
senderImage: string;
|
|
55
|
+
imagePreview: string;
|
|
56
|
+
};
|
|
14
57
|
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CBMessageProps>, {
|
|
15
58
|
sender: string;
|
|
59
|
+
userImage: undefined;
|
|
16
60
|
date: () => Date;
|
|
61
|
+
texts: () => {
|
|
62
|
+
commentDialogTitle: string;
|
|
63
|
+
commentPlaceholder: string;
|
|
64
|
+
goodResponse: string;
|
|
65
|
+
badResponse: string;
|
|
66
|
+
copyResponse: string;
|
|
67
|
+
submitButton: string;
|
|
68
|
+
cancelButton: string;
|
|
69
|
+
senderImage: string;
|
|
70
|
+
imagePreview: string;
|
|
71
|
+
};
|
|
17
72
|
}>>> & Readonly<{}>, {
|
|
18
|
-
sender:
|
|
73
|
+
sender: ChatBotMessageSender;
|
|
19
74
|
date: Date;
|
|
75
|
+
texts: ResourceStrings;
|
|
76
|
+
userImage: string;
|
|
20
77
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
21
78
|
export default _default;
|
|
22
79
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,50 +1,49 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChatBotProps } from '../types/chatbot.type';
|
|
2
2
|
|
|
3
|
-
export type ChatBotProps = {
|
|
4
|
-
/**
|
|
5
|
-
* API Enpoint URL
|
|
6
|
-
*/
|
|
7
|
-
apiEndpoint?: string;
|
|
8
|
-
/**
|
|
9
|
-
* Static resource texts used by ChatBot
|
|
10
|
-
*/
|
|
11
|
-
texts?: ResourceStrings;
|
|
12
|
-
/**
|
|
13
|
-
* Genio username
|
|
14
|
-
*/
|
|
15
|
-
username: string;
|
|
16
|
-
/**
|
|
17
|
-
* Project aplication path
|
|
18
|
-
*/
|
|
19
|
-
projectPath: string;
|
|
20
|
-
/**
|
|
21
|
-
* Project locale
|
|
22
|
-
*/
|
|
23
|
-
dateFormat?: string;
|
|
24
|
-
};
|
|
25
3
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ChatBotProps>, {
|
|
26
4
|
apiEndpoint: string;
|
|
5
|
+
userImage: string;
|
|
6
|
+
chatbotImage: string;
|
|
7
|
+
mode: string;
|
|
27
8
|
texts: () => {
|
|
28
9
|
chatbotTitle: string;
|
|
29
|
-
|
|
10
|
+
sendMessage: string;
|
|
11
|
+
clearChat: string;
|
|
30
12
|
inputLabel: string;
|
|
13
|
+
imageUpload: string;
|
|
14
|
+
imageUploadQButton: string;
|
|
15
|
+
goodResponse: string;
|
|
16
|
+
badResponse: string;
|
|
31
17
|
initialMessage: string;
|
|
18
|
+
initialAgentMessage: string;
|
|
32
19
|
loginError: string;
|
|
33
20
|
botIsSick: string;
|
|
34
21
|
};
|
|
35
22
|
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ChatBotProps>, {
|
|
36
23
|
apiEndpoint: string;
|
|
24
|
+
userImage: string;
|
|
25
|
+
chatbotImage: string;
|
|
26
|
+
mode: string;
|
|
37
27
|
texts: () => {
|
|
38
28
|
chatbotTitle: string;
|
|
39
|
-
|
|
29
|
+
sendMessage: string;
|
|
30
|
+
clearChat: string;
|
|
40
31
|
inputLabel: string;
|
|
32
|
+
imageUpload: string;
|
|
33
|
+
imageUploadQButton: string;
|
|
34
|
+
goodResponse: string;
|
|
35
|
+
badResponse: string;
|
|
41
36
|
initialMessage: string;
|
|
37
|
+
initialAgentMessage: string;
|
|
42
38
|
loginError: string;
|
|
43
39
|
botIsSick: string;
|
|
44
40
|
};
|
|
45
41
|
}>>> & Readonly<{}>, {
|
|
42
|
+
texts: import('../types/texts.type').ResourceStrings;
|
|
46
43
|
apiEndpoint: string;
|
|
47
|
-
|
|
44
|
+
userImage: string;
|
|
45
|
+
chatbotImage: string;
|
|
46
|
+
mode: import('../types/chatbot.type').ChatBotMode;
|
|
48
47
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
49
48
|
export default _default;
|
|
50
49
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|