@clikvn/agent-widget-embedded 1.1.0 → 1.1.2
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/.claude/settings.local.json +12 -0
- package/.idea/clik-ai-chatbot-embedded.iml +12 -0
- package/.idea/codeStyles/Project.xml +59 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/jsLinters/eslint.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/prettier.xml +6 -0
- package/.idea/vcs.xml +6 -0
- package/dist/index.html +37 -54
- package/dist/web.js +1 -1
- package/package.json +1 -1
- package/dist/index-old.html +0 -108
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
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>
|
|
@@ -0,0 +1,59 @@
|
|
|
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>
|
|
@@ -0,0 +1,8 @@
|
|
|
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>
|
package/.idea/vcs.xml
ADDED
package/dist/index.html
CHANGED
|
@@ -1,58 +1,41 @@
|
|
|
1
|
-
<!
|
|
1
|
+
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<title></title>
|
|
52
6
|
<style>
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
7
|
+
clik-agent-widget {
|
|
8
|
+
display: block;
|
|
9
|
+
height: 100vh;
|
|
56
10
|
}
|
|
57
11
|
</style>
|
|
58
|
-
|
|
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>
|