widget-chatbot 2.0.4 → 2.0.6

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/README.md CHANGED
@@ -1,85 +1,85 @@
1
- ### Built With
2
-
3
- - [![React][react.js]][react-url]
4
- - [![Socket-io][socket-io-img]][socket-io-url]
5
- - [![Chart.js][chart.js-img]][chart.js-url]
6
-
7
- ### Requirements
8
-
9
- - Node : >=21.7.3
10
- - react : >=^17.0.2
11
- - react-dom : >=^17.0.2
12
- - @emoji-mart/react
13
- - @ant-design/plots
14
- - antd
15
- - axios
16
- - react-markdown
17
- - remark-gfm
18
-
19
- ## Getting Started
20
-
21
- ```sh
22
- npm i widget-chatbot
23
- ```
24
-
25
- ## Usage
26
-
27
- ```sh
28
- import Widget from 'widget-chatbot';
29
- import { createBrowserHistory } from 'history';
30
- import 'widget-chatbot/dist/widget-chatbot.css';
31
-
32
-
33
- const history = createBrowserHistory();
34
-
35
-
36
- const App = ()=>{
37
- const initPayload = {
38
- access_token: 'jwt token',
39
- refresh_token: 'refresh token',
40
- uagent: window.navigator.userAgent,
41
- uriBackend: 'uri backend',
42
- uriService: 'uri open ai service chatbot',
43
- companyid: 'coid',
44
- companycode:'companycode',
45
- lang:'EN',
46
- uriBackendEnt: 'uri backend go',
47
- uriBackendHRMGO: 'uri backend hrm go',
48
- config: cookies?.CHATBOT?.config,
49
- }
50
-
51
- const textSayHiAndGetStarted = 'Hi and get started';
52
-
53
-
54
- return (
55
- <Widget
56
- getStartedPayload={getInitPayload()}
57
- history={history}
58
- keyEncrypt={keyEncrypt}
59
- onPayslipFn={{
60
- onCheckPYAccess,
61
- onSubmitPYPwd,
62
- }}
63
- socketPath={socketPath || ''}
64
- socketURL={socketUrl}
65
- subTitle={textSayHiAndGetStarted}
66
- title={textSunfishAssistantTitle}
67
- isSF
68
- />
69
- )
70
- }
71
- ```
72
-
73
- ## [Click this for Publish Process](./publish_process/README.md)
74
-
75
- <!-- Read [This](./publish_process/README.md) -->
76
-
77
- <!-- MARKDOWN LINKS & IMAGES -->
78
- <!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
79
-
80
- [react.js]: https://img.shields.io/badge/React-20232A?style=for-the-badge&logo=react&logoColor=61DAFB
81
- [react-url]: https://reactjs.org/
82
- [socket-io-url]: https://socket.io/
83
- [socket-io-img]: https://img.shields.io/badge/Socket-io?logo=socketdotio&label=Socket.io
84
- [chart.js-url]: https://www.chartjs.org/
85
- [chart.js-img]: https://img.shields.io/badge/Chart-js?logo=chartdotjs&logoColor=%23FF6384&label=Chart.js&labelColor=white&color=%23FF6384
1
+ ### Built With
2
+
3
+ - [![React][react.js]][react-url]
4
+ - [![Socket-io][socket-io-img]][socket-io-url]
5
+ - [![Chart.js][chart.js-img]][chart.js-url]
6
+
7
+ ### Requirements
8
+
9
+ - Node : >=21.7.3
10
+ - react : >=^17.0.2
11
+ - react-dom : >=^17.0.2
12
+ - @emoji-mart/react
13
+ - @ant-design/plots
14
+ - antd
15
+ - axios
16
+ - react-markdown
17
+ - remark-gfm
18
+
19
+ ## Getting Started
20
+
21
+ ```sh
22
+ npm i widget-chatbot
23
+ ```
24
+
25
+ ## Usage
26
+
27
+ ```sh
28
+ import Widget from 'widget-chatbot';
29
+ import { createBrowserHistory } from 'history';
30
+ import 'widget-chatbot/dist/widget-chatbot.css';
31
+
32
+
33
+ const history = createBrowserHistory();
34
+
35
+
36
+ const App = ()=>{
37
+ const initPayload = {
38
+ access_token: 'jwt token',
39
+ refresh_token: 'refresh token',
40
+ uagent: window.navigator.userAgent,
41
+ uriBackend: 'uri backend',
42
+ uriService: 'uri open ai service chatbot',
43
+ companyid: 'coid',
44
+ companycode:'companycode',
45
+ lang:'EN',
46
+ uriBackendEnt: 'uri backend go',
47
+ uriBackendHRMGO: 'uri backend hrm go',
48
+ config: cookies?.CHATBOT?.config,
49
+ }
50
+
51
+ const textSayHiAndGetStarted = 'Hi and get started';
52
+
53
+
54
+ return (
55
+ <Widget
56
+ getStartedPayload={getInitPayload()}
57
+ history={history}
58
+ keyEncrypt={keyEncrypt}
59
+ onPayslipFn={{
60
+ onCheckPYAccess,
61
+ onSubmitPYPwd,
62
+ }}
63
+ socketPath={socketPath || ''}
64
+ socketURL={socketUrl}
65
+ subTitle={textSayHiAndGetStarted}
66
+ title={textSunfishAssistantTitle}
67
+ isSF
68
+ />
69
+ )
70
+ }
71
+ ```
72
+
73
+ ## [Click this for Publish Process](./publish_process/README.md)
74
+
75
+ <!-- Read [This](./publish_process/README.md) -->
76
+
77
+ <!-- MARKDOWN LINKS & IMAGES -->
78
+ <!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
79
+
80
+ [react.js]: https://img.shields.io/badge/React-20232A?style=for-the-badge&logo=react&logoColor=61DAFB
81
+ [react-url]: https://reactjs.org/
82
+ [socket-io-url]: https://socket.io/
83
+ [socket-io-img]: https://img.shields.io/badge/Socket-io?logo=socketdotio&label=Socket.io
84
+ [chart.js-url]: https://www.chartjs.org/
85
+ [chart.js-img]: https://img.shields.io/badge/Chart-js?logo=chartdotjs&logoColor=%23FF6384&label=Chart.js&labelColor=white&color=%23FF6384
package/dist/index.d.ts CHANGED
@@ -1,25 +1,25 @@
1
- import { Axios } from "axios";
2
- import { ReactNode } from "react";
3
-
4
- declare module "widget-chatbot" {
5
- type PayslipFn = {
6
- onSubmitPYPwd: () => Axios;
7
- onCheckPYAccess: () => void;
8
- };
9
-
10
- export type WidgetChatbotProps = {
11
- getStartedPayload: string;
12
- socketURL: string;
13
- socketPath: string;
14
- onPayslipFn: PayslipFn;
15
- title: string;
16
- subTitle: string;
17
- keyEncrypt: string;
18
- history: Object;
19
- isSF?: boolean;
20
- };
21
-
22
- const WidgetChatbot: (props: WidgetChatbotProps) => ReactNode;
23
-
24
- export default WidgetChatbot;
25
- }
1
+ import { Axios } from "axios";
2
+ import { ReactNode } from "react";
3
+
4
+ declare module "widget-chatbot" {
5
+ type PayslipFn = {
6
+ onSubmitPYPwd: () => Axios;
7
+ onCheckPYAccess: () => void;
8
+ };
9
+
10
+ export type WidgetChatbotProps = {
11
+ getStartedPayload: string;
12
+ socketURL: string;
13
+ socketPath: string;
14
+ onPayslipFn: PayslipFn;
15
+ title: string;
16
+ subTitle: string;
17
+ keyEncrypt: string;
18
+ history: Object;
19
+ isSF?: boolean;
20
+ };
21
+
22
+ const WidgetChatbot: (props: WidgetChatbotProps) => ReactNode;
23
+
24
+ export default WidgetChatbot;
25
+ }
@@ -662,7 +662,7 @@ function ro() {
662
662
  return mn || (mn = 1, process.env.NODE_ENV === "production" ? lt.exports = to() : lt.exports = no()), lt.exports;
663
663
  }
664
664
  var t = ro();
665
- const oo = "2.0.4-alpha.3", Vn = "chat_session", so = "user_uttered", io = "bot_uttered", ao = "ehelp_bot_uttered";
665
+ const oo = "2.0.6", Vn = "chat_session", so = "user_uttered", io = "bot_uttered", ao = "ehelp_bot_uttered";
666
666
  JSON.stringify({
667
667
  enabled_agents: ["Alice", "Maria", "Jani"],
668
668
  default_active_agent: "Alice"
@@ -2086,7 +2086,7 @@ const Le = (e = ".w-wrapper-body") => {
2086
2086
  chats: W
2087
2087
  };
2088
2088
  }
2089
- return (e == null ? void 0 : e.message_id) === (K == null ? void 0 : K.message_id) ? {
2089
+ return (e == null ? void 0 : e.id) === (K == null ? void 0 : K.id) ? {
2090
2090
  ...K,
2091
2091
  feedback: y
2092
2092
  } : K;
package/package.json CHANGED
@@ -1,54 +1,54 @@
1
- {
2
- "name": "widget-chatbot",
3
- "version": "2.0.4",
4
- "type": "module",
5
- "license": "Apache-2.0",
6
- "files": [
7
- "dist"
8
- ],
9
- "keywords": [
10
- "widget-chatbot",
11
- "chatbot",
12
- "react",
13
- "react-component",
14
- "component"
15
- ],
16
- "types": "dist/index.d.ts",
17
- "main": "dist/widget-chatbot.es.js",
18
- "author": "Restu Averian Putra <restuaverianputra123@gmail.com>",
19
- "scripts": {
20
- "start": "vite",
21
- "build": "rm -rf dist/ && vite build",
22
- "lint": "eslint .",
23
- "preview": "vite preview"
24
- },
25
- "peerDependencies": {
26
- "@ant-design/charts": "^1.4.0",
27
- "antd": "^4.20.5",
28
- "axios": "^1.9.0",
29
- "emoji-mart": "^5.6.0",
30
- "react": "^17.0.2",
31
- "react-dom": "^17.0.2",
32
- "react-markdown": "^8.0.7",
33
- "remark-gfm": "^3.0.0"
34
- },
35
- "dependencies": {
36
- "crypto-js": "^4.1.1",
37
- "dayjs": "^1.11.9",
38
- "react-draggable": "^4.5.0",
39
- "react-syntax-highlighter": "^15.5.13",
40
- "socket.io-client": "^4.8.1"
41
- },
42
- "devDependencies": {
43
- "@eslint/js": "^9.22.0",
44
- "@types/react": "17.0.62",
45
- "@types/react-dom": "17.0.20",
46
- "@vitejs/plugin-react-swc": "^3.9.0",
47
- "eslint": "^9.22.0",
48
- "eslint-plugin-react-hooks": "^5.2.0",
49
- "eslint-plugin-react-refresh": "^0.4.19",
50
- "globals": "^16.0.0",
51
- "rollup-plugin-visualizer": "^5.14.0",
52
- "vite": "^6.3.1"
53
- }
54
- }
1
+ {
2
+ "name": "widget-chatbot",
3
+ "version": "2.0.6",
4
+ "type": "module",
5
+ "license": "Apache-2.0",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "keywords": [
10
+ "widget-chatbot",
11
+ "chatbot",
12
+ "react",
13
+ "react-component",
14
+ "component"
15
+ ],
16
+ "types": "dist/index.d.ts",
17
+ "main": "dist/widget-chatbot.es.js",
18
+ "author": "Restu Averian Putra <restuaverianputra123@gmail.com>",
19
+ "scripts": {
20
+ "start": "vite",
21
+ "build": "rm -rf dist/ && vite build",
22
+ "lint": "eslint .",
23
+ "preview": "vite preview"
24
+ },
25
+ "peerDependencies": {
26
+ "@ant-design/charts": "^1.4.0",
27
+ "antd": "^4.20.5",
28
+ "axios": "^1.9.0",
29
+ "emoji-mart": "^5.6.0",
30
+ "react": "^17.0.2",
31
+ "react-dom": "^17.0.2",
32
+ "react-markdown": "^8.0.7",
33
+ "remark-gfm": "^3.0.0"
34
+ },
35
+ "dependencies": {
36
+ "crypto-js": "^4.1.1",
37
+ "dayjs": "^1.11.9",
38
+ "react-draggable": "^4.5.0",
39
+ "react-syntax-highlighter": "^15.5.13",
40
+ "socket.io-client": "^4.8.1"
41
+ },
42
+ "devDependencies": {
43
+ "@eslint/js": "^9.22.0",
44
+ "@types/react": "17.0.62",
45
+ "@types/react-dom": "17.0.20",
46
+ "@vitejs/plugin-react-swc": "^3.9.0",
47
+ "eslint": "^9.22.0",
48
+ "eslint-plugin-react-hooks": "^5.2.0",
49
+ "eslint-plugin-react-refresh": "^0.4.19",
50
+ "globals": "^16.0.0",
51
+ "rollup-plugin-visualizer": "^5.14.0",
52
+ "vite": "^6.3.1"
53
+ }
54
+ }