@clikvn/agent-widget-embedded 1.0.25-dev → 1.0.27-dev
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/hooks/useChatData.d.ts.map +1 -1
- package/dist/index-old.html +108 -0
- package/dist/index.html +16 -45
- package/dist/web.js +1 -1
- package/package.json +1 -1
- package/.idea/clik-ai-chatbot-embedded.iml +0 -9
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/inspectionProfiles/Project_Default.xml +0 -36
- package/.idea/jsLinters/eslint.xml +0 -7
- package/.idea/misc.xml +0 -9
- package/.idea/modules.xml +0 -8
- package/.idea/prettier.xml +0 -8
- package/.idea/vcs.xml +0 -6
- package/dist/components/Chat/AudioPlayerSimple.d.ts +0 -9
- package/dist/components/Chat/AudioPlayerSimple.d.ts.map +0 -1
- package/dist/components/Chat/MultimodalInputSimple.d.ts +0 -22
- package/dist/components/Chat/MultimodalInputSimple.d.ts.map +0 -1
- package/dist/components/Chat/Sidebar.d.ts +0 -8
- package/dist/components/Chat/Sidebar.d.ts.map +0 -1
- package/dist/serve.json +0 -11
- package/dist/web.css +0 -3680
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChatData.d.ts","sourceRoot":"","sources":["../../src/hooks/useChatData.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"useChatData.d.ts","sourceRoot":"","sources":["../../src/hooks/useChatData.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqD,MAAM,OAAO,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAIxD,KAAK,QAAQ,GAAG;IACd,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC,CAAC;IACtD,eAAe,CAAC,EAAE,eAAe,EAAE,CAAC;IACpC,gBAAgB,CAAC,EAAE,cAAc,EAAE,CAAC;CACrC,CAAC;AAEF,KAAK,OAAO,GAAG;IACb,SAAS,CAAC,EAAE,MAAM,MAAM,CAAC;CAC1B,CAAC;AAMF,eAAO,MAAM,gBAAgB,wBAG1B;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,EAAE,QAAQ,CAAC;CAChB,4CAqEA,CAAC;AAEF,eAAO,MAAM,WAAW,0BAMvB,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<title></title>
|
|
6
|
+
<script type="module">
|
|
7
|
+
import Agent from 'http://localhost:3000/web.js'; // Change to from './web.js' to 'https://localhost:5678/web.js'
|
|
8
|
+
Agent.initWidget({
|
|
9
|
+
apiHost: 'http://localhost:8085/chatbot',
|
|
10
|
+
agentId: '6d02b23f-465f-44ec-8766-27a82890a9b8',
|
|
11
|
+
theme: {
|
|
12
|
+
input: {
|
|
13
|
+
placeholder: 'Tin nhắn...',
|
|
14
|
+
},
|
|
15
|
+
overview: {
|
|
16
|
+
title: 'Van Mieu, Quoc Tu Giam',
|
|
17
|
+
description:
|
|
18
|
+
'Your personal AI tutor by Khan Academy! Im Khanmigo Lite - here to help you with math, science, and humanities and questions.',
|
|
19
|
+
},
|
|
20
|
+
header: {
|
|
21
|
+
title: 'tung test',
|
|
22
|
+
},
|
|
23
|
+
language: {
|
|
24
|
+
code: 'global',
|
|
25
|
+
options: [
|
|
26
|
+
{
|
|
27
|
+
name: 'en',
|
|
28
|
+
code: 'global',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'vi',
|
|
32
|
+
code: 'vi',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'us',
|
|
36
|
+
code: 'en',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'jp',
|
|
40
|
+
code: 'jp',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'kr',
|
|
44
|
+
code: 'kr',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'cn',
|
|
48
|
+
code: 'cn',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: 'th',
|
|
52
|
+
code: 'th',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'tw',
|
|
56
|
+
code: 'tw',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'sg',
|
|
60
|
+
code: 'sg',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: 'my',
|
|
64
|
+
code: 'my',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'kh',
|
|
68
|
+
code: 'kh',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: 'au',
|
|
72
|
+
code: 'au',
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
overrideConfig: {
|
|
78
|
+
// chatId: '14342fe3-8991-4a67-afea-b1c4266da82b',
|
|
79
|
+
chatId: 'f547e5e3-363f-425c-adc1-7f618330d551',
|
|
80
|
+
overrideConfig: {
|
|
81
|
+
vars: {
|
|
82
|
+
POI_CODE: 'MLI_VKLVVAJEFHLH',
|
|
83
|
+
LANGUAGE: 'US',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
// suggestedActions: [
|
|
87
|
+
// {
|
|
88
|
+
// title: 'How are you?',
|
|
89
|
+
// label: 'are you?',
|
|
90
|
+
// action: 'How are you?'
|
|
91
|
+
// }
|
|
92
|
+
// ]
|
|
93
|
+
},
|
|
94
|
+
});
|
|
95
|
+
</script>
|
|
96
|
+
<style>
|
|
97
|
+
.chatbox {
|
|
98
|
+
width: 100%;
|
|
99
|
+
height: 100vh;
|
|
100
|
+
}
|
|
101
|
+
</style>
|
|
102
|
+
</head>
|
|
103
|
+
<body>
|
|
104
|
+
<div class="chatbox">
|
|
105
|
+
<clik-agent-widget></clik-agent-widget>
|
|
106
|
+
</div>
|
|
107
|
+
</body>
|
|
108
|
+
</html>
|
package/dist/index.html
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
<!
|
|
1
|
+
<!doctype html>
|
|
2
2
|
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8"
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
6
5
|
<title>Title</title>
|
|
7
6
|
<script type="module">
|
|
8
|
-
import Agent from '
|
|
7
|
+
import Agent from 'http://localhost:3000/web.js'; // Change to from './web.js' to 'https://localhost:5678/web.js'
|
|
9
8
|
Agent.initWidget({
|
|
10
9
|
apiHost: 'https://ci-api.clik.vn/chatbot',
|
|
11
10
|
agentId: 'fe4cf6a9-fa43-4986-bc6f-df67092568c6',
|
|
@@ -17,55 +16,27 @@
|
|
|
17
16
|
TOUR_CODE: 'TOUR_K9EK76KTX7K4',
|
|
18
17
|
LANGUAGE: 'VN',
|
|
19
18
|
CLIK_GRAPHQL_API: 'https://api.clik.vn/graphql',
|
|
20
|
-
CLIK_VIRTUALTOUR_API: 'https://api.clik.vn/vt360'
|
|
21
|
-
}
|
|
22
|
-
}
|
|
19
|
+
CLIK_VIRTUALTOUR_API: 'https://api.clik.vn/vt360',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
23
22
|
},
|
|
24
23
|
listeners: {
|
|
25
24
|
ON_LINK_CLICK: console.log,
|
|
26
|
-
ON_CLICK: (arg) => {
|
|
27
|
-
console.log('ON_CLICK', arg);
|
|
28
|
-
},
|
|
29
|
-
'ON_START_RECORDING': () => {
|
|
30
|
-
console.log('ON_START_RECORDING');
|
|
31
|
-
},
|
|
32
|
-
'ON_CANCEL_RECORDING': () => {
|
|
33
|
-
console.log('ON_CANCEL_RECORDING');
|
|
34
|
-
},
|
|
35
|
-
'ON_FINISHED_RECORDING': () => {
|
|
36
|
-
console.log('ON_FINISHED_RECORDING');
|
|
37
|
-
},
|
|
38
|
-
'ON_SUBMIT_MESSAGE': () => {
|
|
39
|
-
console.log('ON_SUBMIT_MESSAGE');
|
|
40
|
-
},
|
|
41
|
-
'ON_FINISHED_SUBMITTING_MESSAGE': () => {
|
|
42
|
-
console.log('ON_FINISHED_SUBMITTING_MESSAGE');
|
|
43
|
-
},
|
|
44
|
-
'ON_PLAY_AUDIO': () => {
|
|
45
|
-
console.log('ON_PLAY_AUDIO');
|
|
46
|
-
},
|
|
47
|
-
'ON_PAUSE_AUDIO': () => {
|
|
48
|
-
console.log('ON_PAUSE_AUDIO');
|
|
49
|
-
},
|
|
50
|
-
'ON_ENDED_AUDIO': () => {
|
|
51
|
-
console.log('ON_ENDED_AUDIO');
|
|
52
|
-
}
|
|
53
25
|
},
|
|
54
26
|
theme: {
|
|
55
|
-
|
|
56
|
-
simplified: true,
|
|
27
|
+
// simplified: true,
|
|
57
28
|
autoCloseAudioPlayer: true,
|
|
58
29
|
hideAudioMetadata: true,
|
|
59
|
-
|
|
30
|
+
// modeButtonChat: true,
|
|
31
|
+
gapInput: 30,
|
|
60
32
|
},
|
|
61
33
|
onLoaded: (tool) => {
|
|
62
|
-
console.log('Chatbot loaded!!!');
|
|
63
34
|
window.tool = tool;
|
|
64
|
-
}
|
|
35
|
+
},
|
|
65
36
|
});
|
|
66
37
|
</script>
|
|
67
|
-
</head>
|
|
68
|
-
<body
|
|
69
|
-
<clik-agent-widget></clik-agent-widget>
|
|
70
|
-
</body>
|
|
71
|
-
</html>
|
|
38
|
+
</head>
|
|
39
|
+
<body>
|
|
40
|
+
<clik-agent-widget></clik-agent-widget>
|
|
41
|
+
</body>
|
|
42
|
+
</html>
|