@clikvn/agent-widget-embedded 1.1.15 → 1.2.0-hotfix-1

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.
Files changed (42) hide show
  1. package/.idea/clik-ai-chatbot-embedded.iml +8 -11
  2. package/.idea/codeStyles/codeStyleConfig.xml +4 -4
  3. package/.idea/inspectionProfiles/Project_Default.xml +30 -0
  4. package/.idea/jsLinters/eslint.xml +6 -5
  5. package/.idea/misc.xml +9 -0
  6. package/.idea/modules.xml +7 -7
  7. package/.idea/prettier.xml +7 -5
  8. package/.idea/vcs.xml +5 -5
  9. package/README.md +20 -20
  10. package/dist/commons/constants/variables.d.ts +1 -0
  11. package/dist/commons/constants/variables.d.ts.map +1 -1
  12. package/dist/components/Chat/AudioPlayerSimple.d.ts +9 -0
  13. package/dist/components/Chat/AudioPlayerSimple.d.ts.map +1 -0
  14. package/dist/components/Chat/Icons.d.ts +2 -1
  15. package/dist/components/Chat/Icons.d.ts.map +1 -1
  16. package/dist/components/Chat/Message.d.ts.map +1 -1
  17. package/dist/components/Chat/MultimodalInputSimple.d.ts +22 -0
  18. package/dist/components/Chat/MultimodalInputSimple.d.ts.map +1 -0
  19. package/dist/components/Chat/ProductDetail.d.ts +2 -0
  20. package/dist/components/Chat/ProductDetail.d.ts.map +1 -1
  21. package/dist/components/Chat/ProductList.d.ts +3 -2
  22. package/dist/components/Chat/ProductList.d.ts.map +1 -1
  23. package/dist/components/Chat/Sidebar.d.ts +8 -0
  24. package/dist/components/Chat/Sidebar.d.ts.map +1 -0
  25. package/dist/hooks/useScrollToBottom.d.ts +7 -0
  26. package/dist/hooks/useScrollToBottom.d.ts.map +1 -0
  27. package/dist/index.html +65 -0
  28. package/dist/models.d.ts +1 -1
  29. package/dist/models.d.ts.map +1 -1
  30. package/dist/serve.json +11 -0
  31. package/dist/services/vt360.service.d.ts.map +1 -1
  32. package/dist/simplifiedRegister.d.ts +53 -0
  33. package/dist/simplifiedRegister.d.ts.map +1 -0
  34. package/dist/utils/commonUtils.d.ts +1 -0
  35. package/dist/utils/commonUtils.d.ts.map +1 -1
  36. package/dist/web.css +3680 -0
  37. package/dist/web.d.ts.map +1 -1
  38. package/dist/web.js +1 -1
  39. package/package.json +101 -101
  40. package/public/index.html +54 -54
  41. package/.claude/settings.local.json +0 -12
  42. package/.idea/codeStyles/Project.xml +0 -59
package/package.json CHANGED
@@ -1,101 +1,101 @@
1
- {
2
- "name": "@clikvn/agent-widget-embedded",
3
- "description": "This is agent widget",
4
- "version": "1.1.15",
5
- "author": "Clik JSC",
6
- "license": "ISC",
7
- "type": "module",
8
- "main": "dist/index.js",
9
- "types": "dist/index.d.ts",
10
- "scripts": {
11
- "dev": "rollup --watch --config rollup.config.js",
12
- "build": "rollup --config rollup.config.js",
13
- "lint": "eslint src",
14
- "lint:fix": "eslint --fix src",
15
- "prettier": "prettier --write .",
16
- "pub": "publish --access public",
17
- "deploy": "yarn build && yarn publish --access public"
18
- },
19
- "dependencies": {
20
- "@clikvn/agent-voice-embedded": "^0.0.10-dev",
21
- "@fortawesome/fontawesome-svg-core": "^6.6.0",
22
- "@fortawesome/free-brands-svg-icons": "^6.6.0",
23
- "@fortawesome/free-regular-svg-icons": "^6.6.0",
24
- "@fortawesome/free-solid-svg-icons": "^6.6.0",
25
- "@fortawesome/react-fontawesome": "^0.2.2",
26
- "@radix-ui/react-dropdown-menu": "^2.1.16",
27
- "@radix-ui/react-slot": "^1.1.1",
28
- "@ts-stack/markdown": "1.4.0",
29
- "class-variance-authority": "^0.7.1",
30
- "classnames": "^2.5.1",
31
- "clsx": "^2.1.1",
32
- "date-fns": "^4.1.0",
33
- "device-detector-js": "^3.0.3",
34
- "framer-motion": "^11.18.0",
35
- "lucide-react": "^0.546.0",
36
- "react": "^18.3.1",
37
- "react-datepicker": "^8.8.0",
38
- "react-dom": "^18.3.1",
39
- "react-markdown": "^9.0.3",
40
- "react-phone-number-input": "^3.4.12",
41
- "remark-gfm": "^4.0.0",
42
- "swr": "^2.3.0",
43
- "usehooks-ts": "^3.1.0",
44
- "web-vitals": "^2.1.0"
45
- },
46
- "eslintConfig": {
47
- "extends": [
48
- "react-app",
49
- "react-app/jest"
50
- ]
51
- },
52
- "browserslist": {
53
- "production": [
54
- ">0.2%",
55
- "not dead",
56
- "not op_mini all"
57
- ],
58
- "development": [
59
- "last 1 chrome version",
60
- "last 1 firefox version",
61
- "last 1 safari version"
62
- ]
63
- },
64
- "devDependencies": {
65
- "@rollup/plugin-babel": "^6.0.4",
66
- "@rollup/plugin-commonjs": "^28.0.1",
67
- "@rollup/plugin-json": "^6.1.0",
68
- "@rollup/plugin-node-resolve": "^15.3.0",
69
- "@rollup/plugin-typescript": "^12.1.1",
70
- "@tailwindcss/typography": "^0.5.15",
71
- "@testing-library/jest-dom": "^5.14.1",
72
- "@testing-library/react": "^13.0.0",
73
- "@testing-library/user-event": "^13.2.1",
74
- "@types/jest": "^29.5.14",
75
- "@types/node": "^22.9.0",
76
- "@types/react": "^18.3.12",
77
- "@types/react-dom": "^18.3.1",
78
- "@typescript-eslint/eslint-plugin": "^8.20.0",
79
- "@typescript-eslint/parser": "^8.20.0",
80
- "autoprefixer": "^10.4.20",
81
- "eslint": "^8.57.0",
82
- "eslint-config-prettier": "^10.0.1",
83
- "eslint-plugin-prettier": "^5.2.2",
84
- "prettier": "^3.4.2",
85
- "react-scripts": "5.0.1",
86
- "rollup": "^4.26.0",
87
- "rollup-plugin-peer-deps-external": "^2.2.4",
88
- "rollup-plugin-postcss": "^4.0.2",
89
- "rollup-plugin-replace": "^2.2.0",
90
- "rollup-plugin-terser": "^7.0.2",
91
- "rollup-plugin-typescript-paths": "^1.5.0",
92
- "rollup-plugin-uglify": "^6.0.4",
93
- "tailwind-merge": "^2.6.0",
94
- "tailwindcss": "^3.4.15",
95
- "tailwindcss-animate": "^1.0.7",
96
- "typescript": "^5.6.3"
97
- },
98
- "engines": {
99
- "node": ">=18.18.0"
100
- }
101
- }
1
+ {
2
+ "name": "@clikvn/agent-widget-embedded",
3
+ "description": "This is agent widget",
4
+ "version": "1.2.0-hotfix-1",
5
+ "author": "Clik JSC",
6
+ "license": "ISC",
7
+ "type": "module",
8
+ "main": "dist/index.js",
9
+ "types": "dist/index.d.ts",
10
+ "scripts": {
11
+ "dev": "rollup --watch --config rollup.config.js",
12
+ "build": "rollup --config rollup.config.js",
13
+ "lint": "eslint src",
14
+ "lint:fix": "eslint --fix src",
15
+ "prettier": "prettier --write .",
16
+ "pub": "publish --access public",
17
+ "deploy": "yarn build && npm publish --access public"
18
+ },
19
+ "dependencies": {
20
+ "@clikvn/agent-voice-embedded": "^0.0.10-dev",
21
+ "@fortawesome/fontawesome-svg-core": "^6.6.0",
22
+ "@fortawesome/free-brands-svg-icons": "^6.6.0",
23
+ "@fortawesome/free-regular-svg-icons": "^6.6.0",
24
+ "@fortawesome/free-solid-svg-icons": "^6.6.0",
25
+ "@fortawesome/react-fontawesome": "^0.2.2",
26
+ "@radix-ui/react-dropdown-menu": "^2.1.16",
27
+ "@radix-ui/react-slot": "^1.1.1",
28
+ "@ts-stack/markdown": "1.4.0",
29
+ "class-variance-authority": "^0.7.1",
30
+ "classnames": "^2.5.1",
31
+ "clsx": "^2.1.1",
32
+ "date-fns": "^4.1.0",
33
+ "device-detector-js": "^3.0.3",
34
+ "framer-motion": "^11.18.0",
35
+ "lucide-react": "^0.546.0",
36
+ "react": "^18.3.1",
37
+ "react-datepicker": "^8.8.0",
38
+ "react-dom": "^18.3.1",
39
+ "react-markdown": "^9.0.3",
40
+ "react-phone-number-input": "^3.4.12",
41
+ "remark-gfm": "^4.0.0",
42
+ "swr": "^2.3.0",
43
+ "usehooks-ts": "^3.1.0",
44
+ "web-vitals": "^2.1.0"
45
+ },
46
+ "eslintConfig": {
47
+ "extends": [
48
+ "react-app",
49
+ "react-app/jest"
50
+ ]
51
+ },
52
+ "browserslist": {
53
+ "production": [
54
+ ">0.2%",
55
+ "not dead",
56
+ "not op_mini all"
57
+ ],
58
+ "development": [
59
+ "last 1 chrome version",
60
+ "last 1 firefox version",
61
+ "last 1 safari version"
62
+ ]
63
+ },
64
+ "devDependencies": {
65
+ "@rollup/plugin-babel": "^6.0.4",
66
+ "@rollup/plugin-commonjs": "^28.0.1",
67
+ "@rollup/plugin-json": "^6.1.0",
68
+ "@rollup/plugin-node-resolve": "^15.3.0",
69
+ "@rollup/plugin-typescript": "^12.1.1",
70
+ "@tailwindcss/typography": "^0.5.15",
71
+ "@testing-library/jest-dom": "^5.14.1",
72
+ "@testing-library/react": "^13.0.0",
73
+ "@testing-library/user-event": "^13.2.1",
74
+ "@types/jest": "^29.5.14",
75
+ "@types/node": "^22.9.0",
76
+ "@types/react": "^18.3.12",
77
+ "@types/react-dom": "^18.3.1",
78
+ "@typescript-eslint/eslint-plugin": "^8.20.0",
79
+ "@typescript-eslint/parser": "^8.20.0",
80
+ "autoprefixer": "^10.4.20",
81
+ "eslint": "^8.57.0",
82
+ "eslint-config-prettier": "^10.0.1",
83
+ "eslint-plugin-prettier": "^5.2.2",
84
+ "prettier": "^3.4.2",
85
+ "react-scripts": "5.0.1",
86
+ "rollup": "^4.26.0",
87
+ "rollup-plugin-peer-deps-external": "^2.2.4",
88
+ "rollup-plugin-postcss": "^4.0.2",
89
+ "rollup-plugin-replace": "^2.2.0",
90
+ "rollup-plugin-terser": "^7.0.2",
91
+ "rollup-plugin-typescript-paths": "^1.5.0",
92
+ "rollup-plugin-uglify": "^6.0.4",
93
+ "tailwind-merge": "^2.6.0",
94
+ "tailwindcss": "^3.4.15",
95
+ "tailwindcss-animate": "^1.0.7",
96
+ "typescript": "^5.6.3"
97
+ },
98
+ "engines": {
99
+ "node": ">=18.18.0"
100
+ }
101
+ }
package/public/index.html CHANGED
@@ -1,54 +1,54 @@
1
- <!doctype html>
2
- <html lang="vi">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>Clik Agent Widget - Dev</title>
7
- <style>
8
- html,
9
- body {
10
- height: 100%;
11
- margin: 0;
12
- }
13
-
14
- body {
15
- display: flex;
16
- align-items: center;
17
- justify-content: center;
18
- }
19
- </style>
20
- <script type="module">
21
- import Agent from 'http://localhost:3000/web.js'; // Change to from './web.js' to 'https://localhost:5678/web.js'
22
- Agent.initWidget({
23
- apiHost: 'https://ci-api.clik.vn/chatbot',
24
- agentId: 'fe4cf6a9-fa43-4986-bc6f-df67092568c6',
25
- overrideConfig: {
26
- chatId: 'f6a855d2-7edc-4fb8-9dd3-74204aa1e2a2',
27
- skipSuggestion: true,
28
- overrideConfig: {
29
- vars: {
30
- TOUR_CODE: 'TOUR_K9EK76KTX7K4',
31
- LANGUAGE: 'VN',
32
- CLIK_GRAPHQL_API: 'https://api.clik.vn/graphql',
33
- CLIK_VIRTUALTOUR_API: 'https://api.clik.vn/vt360',
34
- },
35
- },
36
- },
37
- listeners: {
38
- ON_LINK_CLICK: console.log,
39
- },
40
- theme: {
41
- simplified: true,
42
- autoCloseAudioPlayer: true,
43
- hideAudioMetadata: true,
44
- },
45
- onLoaded: (tool) => {
46
- window.tool = tool;
47
- },
48
- });
49
- </script>
50
- </head>
51
- <body>
52
- <clik-agent-widget></clik-agent-widget>
53
- </body>
54
- </html>
1
+ <!doctype html>
2
+ <html lang="vi">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Clik Agent Widget - Dev</title>
7
+ <style>
8
+ html,
9
+ body {
10
+ height: 100%;
11
+ margin: 0;
12
+ }
13
+
14
+ body {
15
+ display: flex;
16
+ align-items: center;
17
+ justify-content: center;
18
+ }
19
+ </style>
20
+ <script type="module">
21
+ import Agent from 'http://localhost:3000/web.js'; // Change to from './web.js' to 'https://localhost:5678/web.js'
22
+ Agent.initWidget({
23
+ apiHost: 'https://ci-api.clik.vn/chatbot',
24
+ agentId: 'fe4cf6a9-fa43-4986-bc6f-df67092568c6',
25
+ overrideConfig: {
26
+ chatId: 'f6a855d2-7edc-4fb8-9dd3-74204aa1e2a2',
27
+ skipSuggestion: true,
28
+ overrideConfig: {
29
+ vars: {
30
+ TOUR_CODE: 'TOUR_K9EK76KTX7K4',
31
+ LANGUAGE: 'VN',
32
+ CLIK_GRAPHQL_API: 'https://api.clik.vn/graphql',
33
+ CLIK_VIRTUALTOUR_API: 'https://api.clik.vn/vt360',
34
+ },
35
+ },
36
+ },
37
+ listeners: {
38
+ ON_LINK_CLICK: console.log,
39
+ },
40
+ theme: {
41
+ simplified: true,
42
+ autoCloseAudioPlayer: true,
43
+ hideAudioMetadata: true,
44
+ },
45
+ onLoaded: (tool) => {
46
+ window.tool = tool;
47
+ },
48
+ });
49
+ </script>
50
+ </head>
51
+ <body>
52
+ <clik-agent-widget></clik-agent-widget>
53
+ </body>
54
+ </html>
@@ -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,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>