@onedeskpro/chatbot-react 0.1.0 → 0.2.0
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 +61 -9
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +19 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +76 -57
- package/package.json +19 -16
package/README.md
CHANGED
|
@@ -27,43 +27,95 @@ export default function App() {
|
|
|
27
27
|
}
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
`ChatbotProvider` accepts every `ChatbotInitOptions` field as a prop — `apiKey`, `apiBaseUrl`, `chatbotName`, `primaryColor`, `theme`, `position`, `welcomeMessage`, `placeholder`, `autoOpen`, `
|
|
30
|
+
`ChatbotProvider` accepts every `ChatbotInitOptions` field as a prop — `apiKey`, `apiBaseUrl`, `chatbotName`, `primaryColor`, `theme`, `position`, `welcomeMessage`, `placeholder`, `autoOpen`, `requestTimeoutMs`. Only `apiKey` is required. The `sessionId` prop is deprecated and ignored.
|
|
31
|
+
|
|
32
|
+
`ChatbotWidget` handles the whole flow itself: it asks a new visitor for their name and phone number before the chat opens, and shows the controls and banners for handing a conversation to a human agent.
|
|
31
33
|
|
|
32
34
|
The components are client-side; in Next.js App Router they carry `'use client'` already, so importing them from a server component is fine as long as the provider itself renders on the client.
|
|
33
35
|
|
|
34
36
|
## Custom UI
|
|
35
37
|
|
|
36
|
-
`useChatbot` gives you the whole conversation state and controls:
|
|
38
|
+
`useChatbot` gives you the whole conversation state and controls. A custom UI has to cover the two steps the built-in widget handles for you: identifying the visitor, and showing the conversation mode.
|
|
37
39
|
|
|
38
40
|
```tsx
|
|
39
41
|
import { useChatbot } from '@onedeskpro/chatbot-react';
|
|
40
42
|
|
|
41
43
|
function SupportPanel() {
|
|
42
|
-
const {
|
|
44
|
+
const {
|
|
45
|
+
messages,
|
|
46
|
+
isLoading,
|
|
47
|
+
isReady,
|
|
48
|
+
needsIdentify,
|
|
49
|
+
mode,
|
|
50
|
+
sendMessage,
|
|
51
|
+
submitIdentify,
|
|
52
|
+
requestHuman,
|
|
53
|
+
resetSession,
|
|
54
|
+
} = useChatbot();
|
|
43
55
|
|
|
44
56
|
if (!isReady) return null;
|
|
45
57
|
|
|
58
|
+
if (needsIdentify) {
|
|
59
|
+
// Collect these from your own form. Phone must include the country code.
|
|
60
|
+
return (
|
|
61
|
+
<button
|
|
62
|
+
onClick={() => submitIdentify({ name: 'Ada Lovelace', phone: '+8801712345678' })}
|
|
63
|
+
disabled={isLoading}
|
|
64
|
+
>
|
|
65
|
+
Start chatting
|
|
66
|
+
</button>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
46
70
|
return (
|
|
47
71
|
<div>
|
|
48
72
|
{messages.map((m) => (
|
|
49
|
-
<p key={m.id}>
|
|
73
|
+
<p key={m.id}>
|
|
74
|
+
{m.message.type}: {m.message.content}
|
|
75
|
+
</p>
|
|
50
76
|
))}
|
|
51
|
-
|
|
77
|
+
{mode === 'waiting' && <p>Waiting for a human agent…</p>}
|
|
78
|
+
<button onClick={() => sendMessage('Hello')} disabled={isLoading || mode === 'closed'}>
|
|
52
79
|
Send
|
|
53
80
|
</button>
|
|
54
|
-
<button onClick={
|
|
81
|
+
{mode === 'ai' && <button onClick={requestHuman}>Talk to a person</button>}
|
|
82
|
+
{mode === 'closed' && <button onClick={resetSession}>New conversation</button>}
|
|
55
83
|
</div>
|
|
56
84
|
);
|
|
57
85
|
}
|
|
58
86
|
```
|
|
59
87
|
|
|
60
|
-
`useChatbot` returns
|
|
88
|
+
`useChatbot` returns:
|
|
89
|
+
|
|
90
|
+
| Field | Description |
|
|
91
|
+
| --- | --- |
|
|
92
|
+
| `messages` | The conversation. `message.type` is `'human'` (the visitor), `'ai'`, or `'agent'` (a human agent). |
|
|
93
|
+
| `isOpen`, `isLoading`, `isReady` | Panel visibility, a request in flight, and whether the agent can answer. |
|
|
94
|
+
| `needsIdentify` | `true` until the visitor has identified. `sendMessage` rejects while it is. |
|
|
95
|
+
| `visitorToken`, `visitorName` | The identified visitor, or `null`. |
|
|
96
|
+
| `mode` | `'ai'`, `'waiting'`, `'human'`, or `'closed'`. |
|
|
97
|
+
| `blockReason`, `error` | Why the agent cannot answer, and the last error message. |
|
|
98
|
+
| `submitIdentify({ name, phone, email? })` | Identifies the visitor and unlocks the chat. |
|
|
99
|
+
| `sendMessage(text)` | Sends a message. |
|
|
100
|
+
| `requestHuman()` | Escalates to a human agent. Does nothing unless `mode` is `'ai'` and a conversation has started. |
|
|
101
|
+
| `resetSession()` | Clears a `closed` conversation. Does nothing in any other mode. |
|
|
102
|
+
| `open()`, `close()`, `toggle()` | Control the built-in widget's panel. |
|
|
103
|
+
| `sessionId` | Deprecated alias of `visitorToken`. |
|
|
61
104
|
|
|
62
|
-
|
|
105
|
+
`mode` also changes on its own — when the AI escalates, or an agent takes over, hands back, or closes the conversation — so render from it rather than from the result of your own calls. See the [`@onedeskpro/chatbot-core` README](https://www.npmjs.com/package/@onedeskpro/chatbot-core) for what each mode means.
|
|
106
|
+
|
|
107
|
+
For custom chrome around the built-in behavior, `ChatbotHeadless` takes `renderLauncher` and `renderWindow` render props instead of shipping any markup of its own. Its render props do not carry the identify or handoff controls; read those from `useChatbot` inside your render function.
|
|
63
108
|
|
|
64
109
|
## Exports
|
|
65
110
|
|
|
66
|
-
`ChatbotProvider`, `ChatbotWidget`, `ChatbotHeadless`, `useChatbot`, `ChatbotContext`, plus the `ChatbotInitOptions`, `ChatbotState`, `ChatMessage`, and `
|
|
111
|
+
`ChatbotProvider`, `ChatbotWidget`, `ChatbotHeadless`, `useChatbot`, `ChatbotContext`, plus the `ChatbotProviderProps`, `ChatbotHeadlessProps`, `UseChatbotReturn`, `ChatbotInitOptions`, `ChatbotState`, `ChatMessage`, `ChatbotEventMap`, `ChatbotTicketMode`, and `TicketStatusData` types.
|
|
112
|
+
|
|
113
|
+
## Upgrading from 0.1
|
|
114
|
+
|
|
115
|
+
0.2.0 is a breaking release. The API no longer accepts the chat requests that 0.1 sends, so 0.1 cannot chat against the current API.
|
|
116
|
+
|
|
117
|
+
- With `ChatbotWidget`, upgrading is enough.
|
|
118
|
+
- With a custom UI built on `useChatbot`, add an identify step before the first `sendMessage`, and render `'agent'` messages. `resetSession` now only clears a `closed` conversation.
|
|
67
119
|
|
|
68
120
|
## License
|
|
69
121
|
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,s)=>(s=n==null?{}:e(i(n)),o(r||!n||!n.__esModule||!a.call(n,`default`)?t(s,`default`,{value:n,enumerable:!0}):s,n));let c=require("react");c=s(c,1);let l=require("@onedeskpro/chatbot-core"),u=require("react/jsx-runtime");var d=(0,c.createContext)(null);function f(){let e=(0,c.useContext)(d);if(!e)throw Error(`useChatbot must be used inside <ChatbotProvider>.`);return e}function p({children:e,...t}){let n=(0,c.useRef)(null);return n.current||=new l.ChatbotCore,(0,c.useEffect)(()=>{let e=n.current;return e.init(t).catch(e=>{console.error(`[onedeskpro-chatbot] Failed to initialise:`,e)}),()=>e.destroy()},[]),(0,u.jsx)(d.Provider,{value:n.current,children:e})}function m(){let e=f(),[t,n]=(0,c.useState)(()=>e.getState());(0,c.useEffect)(()=>{let t=e.on(`state-change`,e=>n({...e}));return n({...e.getState()}),t},[e]);let r=(0,c.useCallback)(t=>e.sendMessage(t),[e]),i=(0,c.useCallback)(t=>e.submitIdentify(t),[e]),a=(0,c.useCallback)(()=>e.requestHuman(),[e]),o=(0,c.useCallback)(()=>e.open(),[e]),s=(0,c.useCallback)(()=>e.close(),[e]),l=(0,c.useCallback)(()=>e.toggle(),[e]),u=(0,c.useCallback)(()=>e.resetSession(),[e]);return{messages:t.messages,isOpen:t.isOpen,isLoading:t.isLoading,isReady:t.isReady,needsIdentify:t.needsIdentify,blockReason:t.blockReason,error:t.error,visitorToken:t.visitorToken,visitorName:t.visitorName,mode:t.mode,sessionId:t.visitorToken,sendMessage:r,submitIdentify:i,requestHuman:a,open:o,close:s,toggle:l,resetSession:u}}function h(){let e=f();return(0,c.useEffect)(()=>{},[e]),(0,u.jsx)(`div`,{style:{display:`none`},"aria-hidden":`true`})}function g({renderLauncher:e,renderWindow:t}){let{isOpen:n,toggle:r,open:i,close:a,messages:o,sendMessage:s,isLoading:c,error:l}=m();return(0,u.jsxs)(u.Fragment,{children:[e({isOpen:n,toggle:r,open:i,close:a}),t({isOpen:n,messages:o,sendMessage:s,isLoading:c,error:l,close:a})]})}exports.ChatbotContext=d,exports.ChatbotHeadless=g,exports.ChatbotProvider=p,exports.ChatbotWidget=h,exports.useChatbot=m;
|
package/dist/index.d.cts
CHANGED
|
@@ -3,10 +3,12 @@ import { ChatbotCore } from '@onedeskpro/chatbot-core';
|
|
|
3
3
|
import { ChatbotEventMap } from '@onedeskpro/chatbot-types';
|
|
4
4
|
import { ChatbotInitOptions } from '@onedeskpro/chatbot-types';
|
|
5
5
|
import { ChatbotState } from '@onedeskpro/chatbot-types';
|
|
6
|
+
import { ChatbotTicketMode } from '@onedeskpro/chatbot-types';
|
|
6
7
|
import { ChatMessage } from '@onedeskpro/chatbot-types';
|
|
7
8
|
import { Context } from 'react';
|
|
8
9
|
import { default as default_2 } from 'react';
|
|
9
10
|
import { ReactNode } from 'react';
|
|
11
|
+
import { TicketStatusData } from '@onedeskpro/chatbot-types';
|
|
10
12
|
|
|
11
13
|
export declare const ChatbotContext: Context<ChatbotCore | null>;
|
|
12
14
|
|
|
@@ -45,6 +47,8 @@ export declare type ChatbotProviderProps = ChatbotInitOptions & {
|
|
|
45
47
|
|
|
46
48
|
export { ChatbotState }
|
|
47
49
|
|
|
50
|
+
export { ChatbotTicketMode }
|
|
51
|
+
|
|
48
52
|
/**
|
|
49
53
|
* Default floating widget — delegates rendering to the core Shadow DOM widget
|
|
50
54
|
* that ChatbotCore.init() mounts into document.body. This component just
|
|
@@ -54,6 +58,8 @@ export declare function ChatbotWidget(): default_2.JSX.Element;
|
|
|
54
58
|
|
|
55
59
|
export { ChatMessage }
|
|
56
60
|
|
|
61
|
+
export { TicketStatusData }
|
|
62
|
+
|
|
57
63
|
export declare function useChatbot(): UseChatbotReturn;
|
|
58
64
|
|
|
59
65
|
export declare interface UseChatbotReturn {
|
|
@@ -61,10 +67,23 @@ export declare interface UseChatbotReturn {
|
|
|
61
67
|
isOpen: boolean;
|
|
62
68
|
isLoading: boolean;
|
|
63
69
|
isReady: boolean;
|
|
70
|
+
needsIdentify: boolean;
|
|
64
71
|
blockReason: ChatbotBlockReason;
|
|
65
72
|
error: string | null;
|
|
73
|
+
visitorToken: string | null;
|
|
74
|
+
visitorName: string | null;
|
|
75
|
+
/** Ticket episode mode: ai | waiting | human | closed. */
|
|
76
|
+
mode: ChatbotTicketMode;
|
|
77
|
+
/** @deprecated Use visitorToken. */
|
|
66
78
|
sessionId: string | null;
|
|
67
79
|
sendMessage: (text: string) => Promise<void>;
|
|
80
|
+
submitIdentify: (payload: {
|
|
81
|
+
name: string;
|
|
82
|
+
phone: string;
|
|
83
|
+
email?: string;
|
|
84
|
+
}) => Promise<void>;
|
|
85
|
+
/** Escalate the open AI ticket to a human agent (no-op unless mode is `ai`). */
|
|
86
|
+
requestHuman: () => Promise<void>;
|
|
68
87
|
open: () => void;
|
|
69
88
|
close: () => void;
|
|
70
89
|
toggle: () => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,10 +3,12 @@ import { ChatbotCore } from '@onedeskpro/chatbot-core';
|
|
|
3
3
|
import { ChatbotEventMap } from '@onedeskpro/chatbot-types';
|
|
4
4
|
import { ChatbotInitOptions } from '@onedeskpro/chatbot-types';
|
|
5
5
|
import { ChatbotState } from '@onedeskpro/chatbot-types';
|
|
6
|
+
import { ChatbotTicketMode } from '@onedeskpro/chatbot-types';
|
|
6
7
|
import { ChatMessage } from '@onedeskpro/chatbot-types';
|
|
7
8
|
import { Context } from 'react';
|
|
8
9
|
import { default as default_2 } from 'react';
|
|
9
10
|
import { ReactNode } from 'react';
|
|
11
|
+
import { TicketStatusData } from '@onedeskpro/chatbot-types';
|
|
10
12
|
|
|
11
13
|
export declare const ChatbotContext: Context<ChatbotCore | null>;
|
|
12
14
|
|
|
@@ -45,6 +47,8 @@ export declare type ChatbotProviderProps = ChatbotInitOptions & {
|
|
|
45
47
|
|
|
46
48
|
export { ChatbotState }
|
|
47
49
|
|
|
50
|
+
export { ChatbotTicketMode }
|
|
51
|
+
|
|
48
52
|
/**
|
|
49
53
|
* Default floating widget — delegates rendering to the core Shadow DOM widget
|
|
50
54
|
* that ChatbotCore.init() mounts into document.body. This component just
|
|
@@ -54,6 +58,8 @@ export declare function ChatbotWidget(): default_2.JSX.Element;
|
|
|
54
58
|
|
|
55
59
|
export { ChatMessage }
|
|
56
60
|
|
|
61
|
+
export { TicketStatusData }
|
|
62
|
+
|
|
57
63
|
export declare function useChatbot(): UseChatbotReturn;
|
|
58
64
|
|
|
59
65
|
export declare interface UseChatbotReturn {
|
|
@@ -61,10 +67,23 @@ export declare interface UseChatbotReturn {
|
|
|
61
67
|
isOpen: boolean;
|
|
62
68
|
isLoading: boolean;
|
|
63
69
|
isReady: boolean;
|
|
70
|
+
needsIdentify: boolean;
|
|
64
71
|
blockReason: ChatbotBlockReason;
|
|
65
72
|
error: string | null;
|
|
73
|
+
visitorToken: string | null;
|
|
74
|
+
visitorName: string | null;
|
|
75
|
+
/** Ticket episode mode: ai | waiting | human | closed. */
|
|
76
|
+
mode: ChatbotTicketMode;
|
|
77
|
+
/** @deprecated Use visitorToken. */
|
|
66
78
|
sessionId: string | null;
|
|
67
79
|
sendMessage: (text: string) => Promise<void>;
|
|
80
|
+
submitIdentify: (payload: {
|
|
81
|
+
name: string;
|
|
82
|
+
phone: string;
|
|
83
|
+
email?: string;
|
|
84
|
+
}) => Promise<void>;
|
|
85
|
+
/** Escalate the open AI ticket to a human agent (no-op unless mode is `ai`). */
|
|
86
|
+
requestHuman: () => Promise<void>;
|
|
68
87
|
open: () => void;
|
|
69
88
|
close: () => void;
|
|
70
89
|
toggle: () => void;
|
package/dist/index.js
CHANGED
|
@@ -1,62 +1,81 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { createContext as e, useCallback as t, useContext as n, useEffect as r, useRef as i, useState as a } from "react";
|
|
2
|
+
import { ChatbotCore as o } from "@onedeskpro/chatbot-core";
|
|
3
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
4
|
+
//#region src/context.ts
|
|
5
|
+
var u = e(null);
|
|
6
|
+
function d() {
|
|
7
|
+
let e = n(u);
|
|
8
|
+
if (!e) throw Error("useChatbot must be used inside <ChatbotProvider>.");
|
|
9
|
+
return e;
|
|
9
10
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/chatbot-provider.tsx
|
|
13
|
+
function f({ children: e, ...t }) {
|
|
14
|
+
let n = i(null);
|
|
15
|
+
return n.current ||= new o(), r(() => {
|
|
16
|
+
let e = n.current;
|
|
17
|
+
return e.init(t).catch((e) => {
|
|
18
|
+
console.error("[onedeskpro-chatbot] Failed to initialise:", e);
|
|
19
|
+
}), () => e.destroy();
|
|
20
|
+
}, []), /* @__PURE__ */ c(u.Provider, {
|
|
21
|
+
value: n.current,
|
|
22
|
+
children: e
|
|
23
|
+
});
|
|
18
24
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/hooks/use-chatbot.ts
|
|
27
|
+
function p() {
|
|
28
|
+
let e = d(), [n, i] = a(() => e.getState());
|
|
29
|
+
r(() => {
|
|
30
|
+
let t = e.on("state-change", (e) => i({ ...e }));
|
|
31
|
+
return i({ ...e.getState() }), t;
|
|
32
|
+
}, [e]);
|
|
33
|
+
let o = t((t) => e.sendMessage(t), [e]), s = t((t) => e.submitIdentify(t), [e]), c = t(() => e.requestHuman(), [e]), l = t(() => e.open(), [e]), u = t(() => e.close(), [e]), f = t(() => e.toggle(), [e]), p = t(() => e.resetSession(), [e]);
|
|
34
|
+
return {
|
|
35
|
+
messages: n.messages,
|
|
36
|
+
isOpen: n.isOpen,
|
|
37
|
+
isLoading: n.isLoading,
|
|
38
|
+
isReady: n.isReady,
|
|
39
|
+
needsIdentify: n.needsIdentify,
|
|
40
|
+
blockReason: n.blockReason,
|
|
41
|
+
error: n.error,
|
|
42
|
+
visitorToken: n.visitorToken,
|
|
43
|
+
visitorName: n.visitorName,
|
|
44
|
+
mode: n.mode,
|
|
45
|
+
sessionId: n.visitorToken,
|
|
46
|
+
sendMessage: o,
|
|
47
|
+
submitIdentify: s,
|
|
48
|
+
requestHuman: c,
|
|
49
|
+
open: l,
|
|
50
|
+
close: u,
|
|
51
|
+
toggle: f,
|
|
52
|
+
resetSession: p
|
|
53
|
+
};
|
|
43
54
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/chatbot-widget.tsx
|
|
57
|
+
function m() {
|
|
58
|
+
let e = d();
|
|
59
|
+
return r(() => {}, [e]), /* @__PURE__ */ c("div", {
|
|
60
|
+
style: { display: "none" },
|
|
61
|
+
"aria-hidden": "true"
|
|
62
|
+
});
|
|
48
63
|
}
|
|
49
|
-
function
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
64
|
+
function h({ renderLauncher: e, renderWindow: t }) {
|
|
65
|
+
let { isOpen: n, toggle: r, open: i, close: a, messages: o, sendMessage: c, isLoading: u, error: d } = p();
|
|
66
|
+
return /* @__PURE__ */ l(s, { children: [e({
|
|
67
|
+
isOpen: n,
|
|
68
|
+
toggle: r,
|
|
69
|
+
open: i,
|
|
70
|
+
close: a
|
|
71
|
+
}), t({
|
|
72
|
+
isOpen: n,
|
|
73
|
+
messages: o,
|
|
74
|
+
sendMessage: c,
|
|
75
|
+
isLoading: u,
|
|
76
|
+
error: d,
|
|
77
|
+
close: a
|
|
78
|
+
})] });
|
|
55
79
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
O as ChatbotHeadless,
|
|
59
|
-
L as ChatbotProvider,
|
|
60
|
-
M as ChatbotWidget,
|
|
61
|
-
v as useChatbot
|
|
62
|
-
};
|
|
80
|
+
//#endregion
|
|
81
|
+
export { u as ChatbotContext, h as ChatbotHeadless, f as ChatbotProvider, m as ChatbotWidget, p as useChatbot };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onedeskpro/chatbot-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "React SDK for the Onedesk Pro Chatbot",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Typetech IT <support@onedeskpro.com>",
|
|
@@ -50,23 +50,26 @@
|
|
|
50
50
|
"react-dom": ">=18.0.0"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@onedeskpro/chatbot-core": "0.
|
|
54
|
-
"@onedeskpro/chatbot-types": "0.
|
|
53
|
+
"@onedeskpro/chatbot-core": "0.2.0",
|
|
54
|
+
"@onedeskpro/chatbot-types": "0.2.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@
|
|
58
|
-
"@testing-library/
|
|
59
|
-
"@testing-library/
|
|
60
|
-
"@
|
|
61
|
-
"@
|
|
62
|
-
"@
|
|
63
|
-
"
|
|
64
|
-
"react": "^
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
57
|
+
"@microsoft/api-extractor": "^7.59.4",
|
|
58
|
+
"@testing-library/dom": "^10.4.2",
|
|
59
|
+
"@testing-library/jest-dom": "^7.0.1",
|
|
60
|
+
"@testing-library/react": "^16.3.3",
|
|
61
|
+
"@testing-library/user-event": "^14.6.7",
|
|
62
|
+
"@types/react": "^19.3.0",
|
|
63
|
+
"@types/react-dom": "^19.3.0",
|
|
64
|
+
"@vitejs/plugin-react": "^6.1.2",
|
|
65
|
+
"jsdom": "^30.1.2",
|
|
66
|
+
"msw": "^2.15.0",
|
|
67
|
+
"react": "^19.3.0",
|
|
68
|
+
"react-dom": "^19.3.0",
|
|
69
|
+
"typescript": "^6",
|
|
70
|
+
"vite": "^8.3.4",
|
|
71
|
+
"vite-plugin-dts": "^5.1.2",
|
|
72
|
+
"vitest": "^5.0.4"
|
|
70
73
|
},
|
|
71
74
|
"scripts": {
|
|
72
75
|
"build": "vite build && cp dist/index.d.ts dist/index.d.cts",
|