@clikvn/agent-widget-embedded 1.0.39-dev → 1.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.
@@ -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,41 +1,58 @@
1
- <!DOCTYPE html>
1
+ <!doctype html>
2
2
  <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <title></title>
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <!-- <meta charset="UTF-8" /> -->
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Clik Agent Widget - Dev</title>
8
+ <script type="module">
9
+ import Agent from 'http://localhost:3000/web.js'; // Change to from './web.js' to 'https://localhost:5678/web.js'
10
+ Agent.initWidget({
11
+ apiHost: 'https://ci-api.clik.vn/chatbot',
12
+ agentId: '6141dbff-28f9-456c-af38-3f7495e4b6d4',
13
+ overrideConfig: {
14
+ chatId: '2e8bc776-7137-407b-84b6-a647471a59a2',
15
+ skipSuggestion: true,
16
+ overrideConfig: {
17
+ vars: {
18
+ TOUR_CODE: 'TOUR_KUFGDEPDTJA4',
19
+ LANGUAGE: 'EN',
20
+ // CLIK_VIRTUALTOUR_API: 'https://api.clik.vn/vt360',
21
+ SHOWROOM_CODE: 'SHR_XRUXUDP4JF47',
22
+ SCENE_CODE: 'SCENE_FR7N2UTHFL94',
23
+ CATEGORY_CODE: 'CAT_7EMJZAYNVJA4',
24
+ CLIK_PROD_GRAPHQL_API: 'https://ci-api.clik.vn/graphql',
25
+ USER_LOCALE: 'EN',
26
+ USER_IP: '116.109.107.182',
27
+ PRODUCT_CODE: '',
28
+ },
29
+ },
30
+ },
31
+ listeners: {
32
+ ON_LINK_CLICK: console.log,
33
+ },
34
+ theme: {
35
+ // simplified: true,
36
+ autoCloseAudioPlayer: true,
37
+ hideAudioMetadata: true,
38
+ modeButtonChat: true,
39
+ gapInput: 30,
40
+ },
41
+ onLoaded: (tool) => {
42
+ window.tool = tool;
43
+ },
44
+ });
45
+ </script>
46
+ </head>
47
+ <body>
48
+ <div style="width: 100vw; height: 100vh">
49
+ <clik-agent-widget></clik-agent-widget>
50
+ </div>
51
+ </body>
6
52
  <style>
7
- clik-agent-widget {
8
- display: block;
9
- height: 100vh;
53
+ html,
54
+ body {
55
+ font-size: 14px;
10
56
  }
11
57
  </style>
12
- <script type="module">
13
- import Agent from 'http://localhost:3000/web.js'; // Change to from './web.js' to 'https://localhost:5678/web.js'
14
- Agent.initWidget({
15
- apiHost: 'https://ci-api.clik.vn/chatbot',
16
- agentId: '697a9f37-2ed6-4d90-b540-6682eabdc5eb',
17
- overrideConfig: {
18
- chatId: '09472a87-b9ed-480a-8369-382aa2b61bda',
19
- overrideConfig: {
20
- vars: {
21
- SHOWROOM_CODE: 'SHR_XRUXUDP4JF47',
22
- TOUR_CODE: 'TOUR_KUFGDEPDTJA4',
23
- LANGUAGE: 'VN',
24
- CLIK_GRAPHQL_API: 'https://ci-api.clik.vn/graphql',
25
- CLIK_VIRTUALTOUR_API: 'https://ci-api.clik.vn/vt360',
26
- BRAND_API: 'https://ci-api.clik.vn/showroom',
27
- }
28
- },
29
- },
30
- listeners: {
31
- ON_LINK_CLICK: console.log,
32
- CMD_CALLBACK: console.log,
33
- }
34
- });
35
- </script>
36
-
37
- </head>
38
- <body>
39
- <clik-agent-widget></clik-agent-widget>
40
- </body>
41
- </html>
58
+ </html>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@clikvn/agent-widget-embedded",
3
3
  "description": "This is agent widget",
4
- "version": "1.0.39-dev",
4
+ "version": "1.1.0",
5
5
  "author": "Clik JSC",
6
6
  "license": "ISC",
7
7
  "type": "module",
@@ -1,12 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(yarn lint:fix)",
5
- "Bash(yarn build)",
6
- "Bash(yarn lint src/components/Chat/Message.tsx src/utils/toolUtils.ts src/utils/messageUtils.ts)",
7
- "Bash(yarn lint src/components/Chat/ProductList.tsx)"
8
- ],
9
- "deny": [],
10
- "ask": []
11
- }
12
- }
@@ -1,12 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="WEB_MODULE" version="4">
3
- <component name="NewModuleRootManager">
4
- <content url="file://$MODULE_DIR$">
5
- <excludeFolder url="file://$MODULE_DIR$/.tmp" />
6
- <excludeFolder url="file://$MODULE_DIR$/temp" />
7
- <excludeFolder url="file://$MODULE_DIR$/tmp" />
8
- </content>
9
- <orderEntry type="inheritedJdk" />
10
- <orderEntry type="sourceFolder" forTests="false" />
11
- </component>
12
- </module>
@@ -1,59 +0,0 @@
1
- <component name="ProjectCodeStyleConfiguration">
2
- <code_scheme name="Project" version="173">
3
- <HTMLCodeStyleSettings>
4
- <option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
5
- </HTMLCodeStyleSettings>
6
- <JSCodeStyleSettings version="0">
7
- <option name="FORCE_SEMICOLON_STYLE" value="true" />
8
- <option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
9
- <option name="USE_DOUBLE_QUOTES" value="false" />
10
- <option name="FORCE_QUOTE_STYlE" value="true" />
11
- <option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
12
- <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
13
- <option name="SPACES_WITHIN_IMPORTS" value="true" />
14
- </JSCodeStyleSettings>
15
- <TypeScriptCodeStyleSettings version="0">
16
- <option name="FORCE_SEMICOLON_STYLE" value="true" />
17
- <option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
18
- <option name="USE_DOUBLE_QUOTES" value="false" />
19
- <option name="FORCE_QUOTE_STYlE" value="true" />
20
- <option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
21
- <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
22
- <option name="SPACES_WITHIN_IMPORTS" value="true" />
23
- </TypeScriptCodeStyleSettings>
24
- <VueCodeStyleSettings>
25
- <option name="INTERPOLATION_NEW_LINE_AFTER_START_DELIMITER" value="false" />
26
- <option name="INTERPOLATION_NEW_LINE_BEFORE_END_DELIMITER" value="false" />
27
- </VueCodeStyleSettings>
28
- <codeStyleSettings language="HTML">
29
- <option name="SOFT_MARGINS" value="80" />
30
- <indentOptions>
31
- <option name="INDENT_SIZE" value="2" />
32
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
33
- <option name="TAB_SIZE" value="2" />
34
- </indentOptions>
35
- </codeStyleSettings>
36
- <codeStyleSettings language="JavaScript">
37
- <option name="SOFT_MARGINS" value="80" />
38
- <indentOptions>
39
- <option name="INDENT_SIZE" value="2" />
40
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
41
- <option name="TAB_SIZE" value="2" />
42
- </indentOptions>
43
- </codeStyleSettings>
44
- <codeStyleSettings language="TypeScript">
45
- <option name="SOFT_MARGINS" value="80" />
46
- <indentOptions>
47
- <option name="INDENT_SIZE" value="2" />
48
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
49
- <option name="TAB_SIZE" value="2" />
50
- </indentOptions>
51
- </codeStyleSettings>
52
- <codeStyleSettings language="Vue">
53
- <option name="SOFT_MARGINS" value="80" />
54
- <indentOptions>
55
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
56
- </indentOptions>
57
- </codeStyleSettings>
58
- </code_scheme>
59
- </component>
@@ -1,5 +0,0 @@
1
- <component name="ProjectCodeStyleConfiguration">
2
- <state>
3
- <option name="USE_PER_PROJECT_SETTINGS" value="true" />
4
- </state>
5
- </component>
@@ -1,6 +0,0 @@
1
- <component name="InspectionProjectProfileManager">
2
- <profile version="1.0">
3
- <option name="myName" value="Project Default" />
4
- <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
5
- </profile>
6
- </component>
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="EslintConfiguration">
4
- <custom-configuration-file used="true" path="$PROJECT_DIR$/.eslintrc" />
5
- </component>
6
- </project>
package/.idea/modules.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/clik-ai-chatbot-embedded.iml" filepath="$PROJECT_DIR$/.idea/clik-ai-chatbot-embedded.iml" />
6
- </modules>
7
- </component>
8
- </project>
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="PrettierConfiguration">
4
- <option name="myConfigurationMode" value="AUTOMATIC" />
5
- </component>
6
- </project>
package/.idea/vcs.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
- </component>
6
- </project>