@opencx/widget 3.0.16 → 3.0.18
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/dist/designs.cjs +63 -63
- package/dist/designs.cjs.map +1 -1
- package/dist/designs.js +6276 -6258
- package/dist/designs.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +2 -2
- package/dist/src/designs/react/components/SuggestedReplies.d.ts +1 -6
- package/dist/src/designs/react/components/WidgetHeader.d.ts +2 -0
- package/dist/src/designs/translation/translation.types.d.ts +1 -1
- package/dist/src/headless/core/context/message.ctx.d.ts +8 -6
- package/dist/src/headless/core/sdk/schema.d.ts +2 -5
- package/dist/src/headless/react/hooks/useMessages.d.ts +1 -1
- package/dist/{useUploadFiles-Eo0ts3JJ.js → useUploadFiles-Bw5PXhkI.js} +3 -3
- package/dist/{useUploadFiles-Eo0ts3JJ.js.map → useUploadFiles-Bw5PXhkI.js.map} +1 -1
- package/dist/{useUploadFiles-B0k9SD0m.cjs → useUploadFiles-DnInAFaL.cjs} +2 -2
- package/dist/{useUploadFiles-B0k9SD0m.cjs.map → useUploadFiles-DnInAFaL.cjs.map} +1 -1
- package/dist/widget.ctx-BXzbhG8U.cjs +2 -0
- package/dist/widget.ctx-BXzbhG8U.cjs.map +1 -0
- package/dist/{widget.ctx-BN_4PZd7.js → widget.ctx-m7KQtnuH.js} +55 -44
- package/dist/widget.ctx-m7KQtnuH.js.map +1 -0
- package/dist-embed/script.js +103 -103
- package/dist-embed/script.js.map +1 -1
- package/package.json +1 -1
- package/dist/src/designs/react/screens/chat/ChatHeader.d.ts +0 -2
- package/dist/widget.ctx-BIZw5Z1d.cjs +0 -2
- package/dist/widget.ctx-BIZw5Z1d.cjs.map +0 -1
- package/dist/widget.ctx-BN_4PZd7.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./widget.ctx-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./widget.ctx-BXzbhG8U.cjs");exports.PrimitiveState=t.PrimitiveState;exports.WidgetCtx=t.WidgetCtx;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
package/dist/react.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./useUploadFiles-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./useUploadFiles-DnInAFaL.cjs");function a(t,s,u){const{widgetCtx:{api:i}}=e.useWidget();return e._default(async o=>o==="up"?i.vote({action:"upvote",messagePublicId:t,sessionId:s}).then(u):i.vote({action:"downvote",messagePublicId:t,sessionId:s}).then(u),[i,t,s,u])}exports.WidgetProvider=e.WidgetProvider;exports.useConfig=e.useConfig;exports.useContact=e.useContact;exports.useIsAwaitingBotReply=e.useIsAwaitingBotReply;exports.useMessages=e.useMessages;exports.usePreludeData=e.usePreludeData;exports.usePrimitiveState=e.usePrimitiveState;exports.useSessions=e.useSessions;exports.useUploadFiles=e.useUploadFiles;exports.useWidget=e.useWidget;exports.useWidgetRouter=e.useWidgetRouter;exports.useVote=a;
|
|
2
2
|
//# sourceMappingURL=react.cjs.map
|
package/dist/react.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { u as i, _ as o } from "./useUploadFiles-
|
|
2
|
-
import { W as l, a as p, b as f, c as m, d as v, e as c, f as P, g as W, i as b, h } from "./useUploadFiles-
|
|
1
|
+
import { u as i, _ as o } from "./useUploadFiles-Bw5PXhkI.js";
|
|
2
|
+
import { W as l, a as p, b as f, c as m, d as v, e as c, f as P, g as W, i as b, h } from "./useUploadFiles-Bw5PXhkI.js";
|
|
3
3
|
function n(e, t, s) {
|
|
4
4
|
const { widgetCtx: { api: a } } = i();
|
|
5
5
|
return o(
|
|
@@ -1,7 +1,2 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
options: string[];
|
|
4
|
-
onKeyboardClick: (option: string) => void;
|
|
5
|
-
};
|
|
6
|
-
export declare function SuggestedReplies({ options, onKeyboardClick }: Props): React.JSX.Element;
|
|
7
|
-
export {};
|
|
2
|
+
export declare function SuggestedReplies(): React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type TranslationKeysU = "ok" | "yes" | "no" | "agree" | "cancel" | "yes-exit" | "yes-reset" | "no-cancel" | "are-you-sure" | "recording" | "thank-you" | "sorry-try-again" | "error-occurred" | "please-try-again" | "write-a-message" | "send-message" | "connected" | "connecting" | "reconnecting" | "reconnected" | "disconnecting" | "disconnected" | "error" | "persist-session" | "settings" | "close" | "help" | "chat" | "send" | "copy" | "copied" | "sound-effects" | "language" | "select" | "agent" | "user" | "bot" | "close-widget" | "got-any-questions" | "typical-response-time" | "session-closed-lead" | "create-new-ticket" | "exit" | "reset-conversation" | "new-conversation" | "welcome-title" | "welcome-description" | "your-name" | "your-email" | "start-chat" | "starting-chat" | "hello-greeting";
|
|
1
|
+
export type TranslationKeysU = "ok" | "yes" | "no" | "agree" | "cancel" | "yes-exit" | "yes-reset" | "no-cancel" | "are-you-sure" | "recording" | "thank-you" | "sorry-try-again" | "error-occurred" | "please-try-again" | "write-a-message" | "send-message" | "connected" | "connecting" | "reconnecting" | "reconnected" | "disconnecting" | "disconnected" | "error" | "persist-session" | "settings" | "close" | "help" | "chat" | "send" | "copy" | "copied" | "sound-effects" | "language" | "select" | "agent" | "user" | "bot" | "close-widget" | "got-any-questions" | "typical-response-time" | "session-closed-lead" | "create-new-ticket" | "exit" | "reset-conversation" | "new-conversation" | "welcome-title" | "welcome-description" | "your-name" | "your-email" | "start-chat" | "starting-chat" | "hello-greeting" | "i-need-more-help" | "this-was-helpful";
|
|
2
2
|
export type TranslationInterface = {
|
|
3
3
|
[K in TranslationKeysU]: string;
|
|
4
4
|
};
|
|
@@ -5,17 +5,18 @@ import { MessageType } from '../types/messages';
|
|
|
5
5
|
import { SendMessageDto } from '../types/schemas';
|
|
6
6
|
import { PrimitiveState } from '../utils/PrimitiveState';
|
|
7
7
|
import { SessionCtx } from './session.ctx';
|
|
8
|
+
type MessageCtxState = {
|
|
9
|
+
messages: MessageType[];
|
|
10
|
+
isSendingMessage: boolean;
|
|
11
|
+
lastAIResMightSolveUserIssue: boolean;
|
|
12
|
+
isInitialFetchLoading: boolean;
|
|
13
|
+
};
|
|
8
14
|
export declare class MessageCtx {
|
|
9
15
|
private config;
|
|
10
16
|
private api;
|
|
11
17
|
private sessionCtx;
|
|
12
18
|
private poller;
|
|
13
|
-
state: PrimitiveState<
|
|
14
|
-
messages: MessageType[];
|
|
15
|
-
isSendingMessage: boolean;
|
|
16
|
-
suggestedReplies: string[] | null;
|
|
17
|
-
isInitialFetchLoading: boolean;
|
|
18
|
-
}>;
|
|
19
|
+
state: PrimitiveState<MessageCtxState>;
|
|
19
20
|
private sendMessageAbortController;
|
|
20
21
|
constructor({ config, api, sessionCtx, }: {
|
|
21
22
|
config: WidgetConfig;
|
|
@@ -32,3 +33,4 @@ export declare class MessageCtx {
|
|
|
32
33
|
private static toBotMessage;
|
|
33
34
|
private static toErrorMessage;
|
|
34
35
|
}
|
|
36
|
+
export {};
|
|
@@ -168,11 +168,6 @@ export interface components {
|
|
|
168
168
|
/** @enum {boolean} */
|
|
169
169
|
success: true;
|
|
170
170
|
code?: string | "session_assigned_to_human_agent";
|
|
171
|
-
options?: {
|
|
172
|
-
/** @enum {string} */
|
|
173
|
-
type: "options";
|
|
174
|
-
value: string[];
|
|
175
|
-
};
|
|
176
171
|
autopilotResponse?: {
|
|
177
172
|
/** @enum {string} */
|
|
178
173
|
type: "text";
|
|
@@ -181,6 +176,7 @@ export interface components {
|
|
|
181
176
|
content: string;
|
|
182
177
|
};
|
|
183
178
|
id?: string;
|
|
179
|
+
mightSolveUserIssue: boolean;
|
|
184
180
|
};
|
|
185
181
|
uiResponse?: {
|
|
186
182
|
/** @enum {string} */
|
|
@@ -192,6 +188,7 @@ export interface components {
|
|
|
192
188
|
name: string;
|
|
193
189
|
content?: string;
|
|
194
190
|
};
|
|
191
|
+
mightSolveUserIssue: boolean;
|
|
195
192
|
};
|
|
196
193
|
sessionIsHandedOff?: boolean;
|
|
197
194
|
} | {
|
|
@@ -2,7 +2,7 @@ export declare function useMessages(): {
|
|
|
2
2
|
messagesState: {
|
|
3
3
|
messages: import('../../core').MessageType[];
|
|
4
4
|
isSendingMessage: boolean;
|
|
5
|
-
|
|
5
|
+
lastAIResMightSolveUserIssue: boolean;
|
|
6
6
|
isInitialFetchLoading: boolean;
|
|
7
7
|
};
|
|
8
8
|
sendMessage: (input: import('../../core').SomeOptional<import('../../core').SafeOmit<import('../../core').SendMessageDto, "bot_token" | "uuid">, "session_id" | "user">) => Promise<void>;
|
|
@@ -3,7 +3,7 @@ var kt = (e, t, n) => t in e ? Kt(e, t, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var Ye = (e, t, n) => kt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import k, { createContext as rt, useContext as ot, useRef as H, useMemo as Ve, useSyncExternalStore as zt, useEffect as st, useLayoutEffect as Yt, useCallback as Ee, useDebugValue as Jt, useState as Xt } from "react";
|
|
5
5
|
import { jsx as Qt } from "react/jsx-runtime";
|
|
6
|
-
import { W as Zt } from "./widget.ctx-
|
|
6
|
+
import { W as Zt } from "./widget.ctx-m7KQtnuH.js";
|
|
7
7
|
import { v4 as en } from "uuid";
|
|
8
8
|
class tn {
|
|
9
9
|
constructor(t) {
|
|
@@ -50,7 +50,7 @@ function nn(e) {
|
|
|
50
50
|
return r;
|
|
51
51
|
}, t.Provider];
|
|
52
52
|
}
|
|
53
|
-
const rn = "3.0.
|
|
53
|
+
const rn = "3.0.18", [z, on] = nn();
|
|
54
54
|
function tr({
|
|
55
55
|
options: e,
|
|
56
56
|
children: t,
|
|
@@ -1345,4 +1345,4 @@ export {
|
|
|
1345
1345
|
ir as n,
|
|
1346
1346
|
z as u
|
|
1347
1347
|
};
|
|
1348
|
-
//# sourceMappingURL=useUploadFiles-
|
|
1348
|
+
//# sourceMappingURL=useUploadFiles-Bw5PXhkI.js.map
|