cmcts-c-agent-embedding 1.0.62-vib → 1.0.64-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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cmcts-c-agent-embedding",
3
- "version": "1.0.62-vib",
3
+ "version": "1.0.64-vib",
4
4
  "description": "Javascript library to display flowise chatbot on your website",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/public/index.html CHANGED
@@ -16,27 +16,12 @@
16
16
  </head>
17
17
 
18
18
  <body>
19
- <div id="root">
19
+ <!-- <div id="root">
20
20
  <flowise-fullchatbot></flowise-fullchatbot>
21
- </div>
21
+ </div> -->
22
22
  <script type="module">
23
23
  import Chatbot from './web.js';
24
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
25
  // Example initialization:
41
26
  // If your .env contains:
42
27
  // agent1=xyz789-uvw456,https://example.com
@@ -44,7 +29,7 @@
44
29
  // salesbot=ghi123-jkl456,https://example.com
45
30
  //
46
31
  // Then use the environment variable name as chatflowid:
47
- Chatbot.initFull({
32
+ Chatbot.init({
48
33
  // chatflowid: '6a63bb88-88f7-4c4d-805e-9c027c85707b', // or 'support', 'salesbot', etc.
49
34
  // chatflowid: 'b573e66d-0e28-4798-8e4f-fbbaff8e236f', // or 'support', 'salesbot', etc.
50
35
  // chatflowid: '7ee803b4-e3f8-4f33-bf85-ef9ab9d6f693', // or 'support', 'salesbot', etc.
@@ -55,97 +40,6 @@
55
40
  roomIds: {
56
41
  '0123456789': 'Xa6HmhfbU5K73ZhHnspzKhqs',
57
42
  },
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,
79
- },
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
43
  });
150
44
  </script>
151
45
  </body>
@@ -1,10 +0,0 @@
1
- interface ICopyMessageButtonProps {
2
- class?: string;
3
- isLoading?: boolean;
4
- onCopy?: (text: string) => void;
5
- copiedDuration?: number;
6
- textToCopy: string;
7
- }
8
- declare const CopyMessageButton: (props: ICopyMessageButtonProps) => import("solid-js").JSX.Element;
9
- export default CopyMessageButton;
10
- //# sourceMappingURL=CopyMessageButton.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CopyMessageButton.d.ts","sourceRoot":"","sources":["../../../src/components/buttons/CopyMessageButton.tsx"],"names":[],"mappings":"AAIA,UAAU,uBAAuB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,iBAAiB,UAAW,uBAAuB,mCA6CxD,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -1,8 +0,0 @@
1
- interface IEditMessageButtonProps {
2
- class?: string;
3
- isLoading?: boolean;
4
- onClick?: () => void;
5
- }
6
- declare const EditMessageButton: (props: IEditMessageButtonProps) => import("solid-js").JSX.Element;
7
- export default EditMessageButton;
8
- //# sourceMappingURL=EditMessageButton.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EditMessageButton.d.ts","sourceRoot":"","sources":["../../../src/components/buttons/EditMessageButton.tsx"],"names":[],"mappings":"AAEA,UAAU,uBAAuB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,QAAA,MAAM,iBAAiB,UAAW,uBAAuB,mCAmBxD,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -1,7 +0,0 @@
1
- interface IPopupToast {
2
- content: string;
3
- duration?: number;
4
- }
5
- declare const PopupToast: ({ content, duration }: IPopupToast) => import("solid-js").JSX.Element;
6
- export default PopupToast;
7
- //# sourceMappingURL=PopupToast.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PopupToast.d.ts","sourceRoot":"","sources":["../../../src/components/buttons/PopupToast.tsx"],"names":[],"mappings":"AAEA,UAAU,WAAW;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,QAAA,MAAM,UAAU,0BAA2B,WAAW,mCAwCrD,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1,9 +0,0 @@
1
- interface EditMessageDialogProps {
2
- isOpen: boolean;
3
- onClose: () => void;
4
- originalMessage: string;
5
- onSave: (newMessage: string) => Promise<void>;
6
- }
7
- declare const EditMessageDialog: (props: EditMessageDialogProps) => import("solid-js").JSX.Element;
8
- export default EditMessageDialog;
9
- //# sourceMappingURL=EditMessageDialog.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EditMessageDialog.d.ts","sourceRoot":"","sources":["../../../src/components/dialogs/EditMessageDialog.tsx"],"names":[],"mappings":"AAEA,UAAU,sBAAsB;IAC9B,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/C;AAED,QAAA,MAAM,iBAAiB,UAAW,sBAAsB,mCA0EvD,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -1,3 +0,0 @@
1
- import { JSX } from 'solid-js/jsx-runtime';
2
- export declare const CheckIcon: (props: JSX.SvgSVGAttributes<SVGSVGElement>) => JSX.Element;
3
- //# sourceMappingURL=CheckIcon.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CheckIcon.d.ts","sourceRoot":"","sources":["../../../src/components/icons/CheckIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAE3C,eAAO,MAAM,SAAS,UAAW,IAAI,gBAAgB,CAAC,aAAa,CAAC,gBAcnE,CAAC"}
@@ -1,5 +0,0 @@
1
- import { JSX } from 'solid-js/jsx-runtime';
2
- export declare const CopyIcon: (props: JSX.SvgSVGAttributes<SVGSVGElement> & {
3
- filled?: boolean;
4
- }) => JSX.Element;
5
- //# sourceMappingURL=CopyIcon.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CopyIcon.d.ts","sourceRoot":"","sources":["../../../src/components/icons/CopyIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAG3C,eAAO,MAAM,QAAQ,UAAW,IAAI,gBAAgB,CAAC,aAAa,CAAC,GAAG;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,gBAiBzF,CAAC"}
@@ -1,5 +0,0 @@
1
- import { JSX } from 'solid-js/jsx-runtime';
2
- export declare const EditIcon: (props: JSX.SvgSVGAttributes<SVGSVGElement> & {
3
- filled?: boolean;
4
- }) => JSX.Element;
5
- //# sourceMappingURL=EditIcon.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EditIcon.d.ts","sourceRoot":"","sources":["../../../src/components/icons/EditIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAE3C,eAAO,MAAM,QAAQ,UAAW,IAAI,gBAAgB,CAAC,aAAa,CAAC,GAAG;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,gBAiBzF,CAAC"}