cmcts-c-agent-embedding 1.0.60-vib → 1.0.62-vib

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/.env +5 -36
  2. package/.env.example +34 -34
  3. package/.eslintrc.cjs +14 -14
  4. package/.prettierignore +3 -3
  5. package/.prettierrc +8 -8
  6. package/README.md +349 -349
  7. package/base.json +21 -21
  8. package/dist/components/Bot.d.ts.map +1 -1
  9. package/dist/components/bubbles/BotBubble.d.ts.map +1 -1
  10. package/dist/components/bubbles/LoadingBubble.d.ts +1 -0
  11. package/dist/components/bubbles/LoadingBubble.d.ts.map +1 -1
  12. package/dist/components/bubbles/SourceBubble.d.ts.map +1 -1
  13. package/dist/components/buttons/CopyMessageButton.d.ts +10 -0
  14. package/dist/components/buttons/CopyMessageButton.d.ts.map +1 -0
  15. package/dist/components/buttons/EditMessageButton.d.ts +8 -0
  16. package/dist/components/buttons/EditMessageButton.d.ts.map +1 -0
  17. package/dist/components/buttons/PopupToast.d.ts +7 -0
  18. package/dist/components/buttons/PopupToast.d.ts.map +1 -0
  19. package/dist/components/dialogs/EditMessageDialog.d.ts +9 -0
  20. package/dist/components/dialogs/EditMessageDialog.d.ts.map +1 -0
  21. package/dist/components/icons/CheckIcon.d.ts +3 -0
  22. package/dist/components/icons/CheckIcon.d.ts.map +1 -0
  23. package/dist/components/icons/CopyIcon.d.ts +5 -0
  24. package/dist/components/icons/CopyIcon.d.ts.map +1 -0
  25. package/dist/components/icons/EditIcon.d.ts +5 -0
  26. package/dist/components/icons/EditIcon.d.ts.map +1 -0
  27. package/dist/components/inputs/textInput/components/ShortTextInput.d.ts +3 -0
  28. package/dist/components/inputs/textInput/components/ShortTextInput.d.ts.map +1 -1
  29. package/dist/components/inputs/textInput/components/TextInput.d.ts.map +1 -1
  30. package/dist/features/popup/components/Popup.d.ts.map +1 -1
  31. package/dist/web.js +1 -1
  32. package/package.json +4 -4
  33. package/public/index.html +140 -32
  34. package/server.js +401 -401
  35. package/.idea/AugmentWebviewStateStore.xml +0 -10
  36. package/.idea/Flowise-share-chatbox.iml +0 -12
  37. package/.idea/codeStyles/Project.xml +0 -60
  38. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  39. package/.idea/inspectionProfiles/Project_Default.xml +0 -16
  40. package/.idea/modules.xml +0 -8
  41. package/.idea/prettier.xml +0 -6
  42. package/.idea/vcs.xml +0 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cmcts-c-agent-embedding",
3
- "version": "1.0.60-vib",
3
+ "version": "1.0.62-vib",
4
4
  "description": "Javascript library to display flowise chatbot on your website",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -32,12 +32,12 @@
32
32
  "express": "^4.21.1",
33
33
  "form-data": "^4.0.1",
34
34
  "lodash": "^4.17.21",
35
- "multer": "^1.4.5-lts.1",
35
+ "multer": "^2.0.1",
36
36
  "node-fetch": "^3.3.2",
37
37
  "pdfjs-dist": "3.11.174",
38
38
  "prettier": "^3.4.2",
39
39
  "solid-element": "1.7.0",
40
- "solid-js": "1.7.1",
40
+ "solid-js": "^1.9.4",
41
41
  "zod": "^3.22.4"
42
42
  },
43
43
  "devDependencies": {
@@ -76,4 +76,4 @@
76
76
  "uuid": "^9.0.1"
77
77
  },
78
78
  "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
79
- }
79
+ }
package/public/index.html CHANGED
@@ -8,38 +8,146 @@
8
8
 
9
9
  <!doctype html>
10
10
  <html lang="en">
11
- <head>
12
- <meta charset="UTF-8" />
13
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
14
- <title>Flowise Chatbot Widget</title>
15
- </head>
16
11
 
17
- <body>
18
- <div id="root">
19
- <!-- <flowise-fullchatbot></flowise-fullchatbot>-->
20
- </div>
21
- <script type="module">
22
- import Chatbot from './web.js';
12
+ <head>
13
+ <meta charset="UTF-8" />
14
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
15
+ <title>Flowise Chatbot Widget</title>
16
+ </head>
23
17
 
24
- // Example initialization:
25
- // If your .env contains:
26
- // agent1=xyz789-uvw456,https://example.com
27
- // support=abc123-def456,https://example.com
28
- // salesbot=ghi123-jkl456,https://example.com
29
- //
30
- // Then use the environment variable name as chatflowid:
31
- Chatbot.init({
32
- // chatflowid: '6a63bb88-88f7-4c4d-805e-9c027c85707b', // or 'support', 'salesbot', etc.
33
- // chatflowid: 'b573e66d-0e28-4798-8e4f-fbbaff8e236f', // or 'support', 'salesbot', etc.
34
- // chatflowid: '7ee803b4-e3f8-4f33-bf85-ef9ab9d6f693', // or 'support', 'salesbot', etc.
35
- chatflowid: '1755164d-cb72-4325-9831-83b295ce42bc', // or 'support', 'salesbot', etc.
36
- apiHost: 'https://vib.cagent.cmcts.ai',
37
- // apiHost: 'https://c-agent.cmcts.studio.ai.vn',
38
- chatwootUrl: 'https://livechat.cagent.cmcts.ai',
39
- roomIds: {
40
- '0123456789': 'Xa6HmhfbU5K73ZhHnspzKhqs',
18
+ <body>
19
+ <div id="root">
20
+ <flowise-fullchatbot></flowise-fullchatbot>
21
+ </div>
22
+ <script type="module">
23
+ import Chatbot from './web.js';
24
+
25
+ const customStringify = (obj) => {
26
+ let stringified = JSON.stringify(obj, null, 4)
27
+ .replace(/"([^"]+)":/g, '$1:')
28
+ .replace(/: "([^"]+)"/g, (match, value) => (value.includes('<') ? `: "${value}"` : `: '${value}'`))
29
+ .replace(/: "(true|false|\d+)"/g, ': $1')
30
+ .replace(/customCSS: ""/g, 'customCSS: ``');
31
+ return stringified
32
+ .split('\n')
33
+ .map((line, index) => {
34
+ if (index === 0) return line;
35
+ return ' '.repeat(8) + line;
36
+ })
37
+ .join('\n');
38
+ };
39
+
40
+ // Example initialization:
41
+ // If your .env contains:
42
+ // agent1=xyz789-uvw456,https://example.com
43
+ // support=abc123-def456,https://example.com
44
+ // salesbot=ghi123-jkl456,https://example.com
45
+ //
46
+ // Then use the environment variable name as chatflowid:
47
+ Chatbot.initFull({
48
+ // chatflowid: '6a63bb88-88f7-4c4d-805e-9c027c85707b', // or 'support', 'salesbot', etc.
49
+ // chatflowid: 'b573e66d-0e28-4798-8e4f-fbbaff8e236f', // or 'support', 'salesbot', etc.
50
+ // chatflowid: '7ee803b4-e3f8-4f33-bf85-ef9ab9d6f693', // or 'support', 'salesbot', etc.
51
+ chatflowid: '1755164d-cb72-4325-9831-83b295ce42bc', // or 'support', 'salesbot', etc.
52
+ apiHost: 'https://vib.cagent.cmcts.ai',
53
+ // apiHost: 'https://c-agent.cmcts.studio.ai.vn',
54
+ chatwootUrl: 'https://livechat.cagent.cmcts.ai',
55
+ roomIds: {
56
+ '0123456789': 'Xa6HmhfbU5K73ZhHnspzKhqs',
57
+ },
58
+ theme: customStringify({
59
+ button: {
60
+ backgroundColor: '#3B81F6',
61
+ right: 20,
62
+ bottom: 20,
63
+ size: 48,
64
+ dragAndDrop: true,
65
+ iconColor: 'white',
66
+ customIconSrc: 'https://raw.githubusercontent.com/walkxcode/dashboard-icons/main/svg/google-messages.svg',
67
+ autoWindowOpen: {
68
+ autoOpen: true,
69
+ openDelay: 2,
70
+ autoOpenOnMobile: false,
71
+ },
72
+ },
73
+ tooltip: {
74
+ showTooltip: true,
75
+ tooltipMessage: 'Hi There 👋!',
76
+ tooltipBackgroundColor: 'black',
77
+ tooltipTextColor: 'white',
78
+ tooltipFontSize: 16,
41
79
  },
42
- });
43
- </script>
44
- </body>
45
- </html>
80
+ disclaimer: {
81
+ title: 'Disclaimer',
82
+ message: 'By using this chatbot, you agree to the <a target="_blank" href="https://flowiseai.com/terms">Terms & Condition</a>',
83
+ textColor: 'black',
84
+ buttonColor: '#3b82f6',
85
+ buttonText: 'Start Chatting',
86
+ buttonTextColor: 'white',
87
+ blurredBackgroundColor: 'rgba(0, 0, 0, 0.4)',
88
+ backgroundColor: 'white',
89
+ },
90
+ customCSS: ``,
91
+ chatWindow: {
92
+ showTitle: true,
93
+ showAgentMessages: true,
94
+ title: 'Agent Studio Bot',
95
+ titleAvatarSrc: 'https://raw.githubusercontent.com/walkxcode/dashboard-icons/main/svg/google-messages.svg',
96
+ welcomeMessage: 'Hello! This is custom welcome message',
97
+ errorMessage: 'This is a custom error message',
98
+ backgroundColor: '#ffffff',
99
+ backgroundImage: 'enter image path or link',
100
+ height: 700,
101
+ width: 400,
102
+ fontSize: 16,
103
+ starterPrompts: ['What is a bot?', 'Who are you?'],
104
+ starterPromptFontSize: 15,
105
+ clearChatOnReload: false,
106
+ sourceDocsTitle: 'Sources:',
107
+ renderHTML: true,
108
+ botMessage: {
109
+ backgroundColor: '#f7f8ff',
110
+ textColor: '#303235',
111
+ showAvatar: true,
112
+ avatarSrc: 'https://raw.githubusercontent.com/zahidkhawaja/langchain-chat-nextjs/main/public/parroticon.png',
113
+ },
114
+ userMessage: {
115
+ backgroundColor: '#3B81F6',
116
+ textColor: '#ffffff',
117
+ showAvatar: true,
118
+ avatarSrc: 'https://raw.githubusercontent.com/zahidkhawaja/langchain-chat-nextjs/main/public/usericon.png',
119
+ },
120
+ textInput: {
121
+ placeholder: 'Type your question',
122
+ backgroundColor: '#ffffff',
123
+ textColor: '#303235',
124
+ sendButtonColor: '#3B81F6',
125
+ maxChars: 50,
126
+ maxCharsWarningMessage: 'You exceeded the characters limit. Please input less than 50 characters.',
127
+ autoFocus: true,
128
+ sendMessageSound: true,
129
+ sendSoundLocation: 'send_message.mp3',
130
+ receiveMessageSound: true,
131
+ receiveSoundLocation: 'receive_message.mp3',
132
+ },
133
+ feedback: {
134
+ color: '#303235',
135
+ },
136
+ dateTimeToggle: {
137
+ date: true,
138
+ time: true,
139
+ },
140
+ footer: {
141
+ textColor: '#303235',
142
+ text: 'Powered by',
143
+ company: 'Agent Studio',
144
+ // companyLink: 'https://flowiseai.com'
145
+ companyLink: '#',
146
+ },
147
+ },
148
+ }),
149
+ });
150
+ </script>
151
+ </body>
152
+
153
+ </html>