@ethora/chat-component 26.7.4 → 26.7.5
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/{VideoCallOverlay-BUfKp87t.js → VideoCallOverlay-C4M2I9oV.js} +2 -2
- package/dist/{VideoCallOverlay-BUfKp87t.js.map → VideoCallOverlay-C4M2I9oV.js.map} +1 -1
- package/dist/components/MessageBubble/QuickReplies.d.ts +18 -0
- package/dist/helpers/quickReplies.d.ts +31 -0
- package/dist/{main-DFqqDiy-.js → main-DeiuFYsl.js} +9393 -9288
- package/dist/main-DeiuFYsl.js.map +1 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +13 -12
- package/dist/types/models/config.model.d.ts +19 -0
- package/dist/types/models/message.model.d.ts +1 -0
- package/package.json +1 -1
- package/dist/main-DFqqDiy-.js.map +0 -1
package/dist/main.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ export { useQRCodeChat, handleQRChatId } from './hooks/useQRCodeChatHandler';
|
|
|
10
10
|
export { useInAppNotifications } from './hooks/useInAppNotifications';
|
|
11
11
|
export { default as usePushNotifications } from './hooks/usePushNotifications';
|
|
12
12
|
export { resendMessage } from './utils/resendMessage';
|
|
13
|
+
export { parseQuickReplies } from './helpers/quickReplies';
|
|
14
|
+
export type { QuickReply } from './helpers/quickReplies';
|
|
13
15
|
export { applyTypography, clearTypography } from './helpers/applyTypography';
|
|
14
16
|
export { useTypography } from './hooks/useTypography';
|
|
15
17
|
export type { TypographyConfig, FontFaceSource, } from './types/models/config.model';
|
package/dist/main.js
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import { m as a, R as r, C as t, M as o, n as
|
|
1
|
+
import { m as a, R as r, C as t, M as o, n as p, o as h, X as u, p as i, q as n, t as d, v as l, w as y, x as I, y as T, z as R, D as f, E as c, F as g, G as C, I as m, J as A, K as Q, L as k } from "./main-DeiuFYsl.js";
|
|
2
2
|
export {
|
|
3
3
|
a as AuthTestIds,
|
|
4
4
|
r as Chat,
|
|
5
5
|
t as ChatInputTestIds,
|
|
6
6
|
o as MessageBubbleTestIds,
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
p as RefreshFatalError,
|
|
8
|
+
h as RoomListTestIds,
|
|
9
9
|
u as XmppProvider,
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
i as applyTypography,
|
|
11
|
+
n as clearTypography,
|
|
12
12
|
d as handleQRChatId,
|
|
13
13
|
l as isRefreshFatalError,
|
|
14
14
|
y as logoutService,
|
|
15
|
-
I as
|
|
16
|
-
T as
|
|
15
|
+
I as parseQuickReplies,
|
|
16
|
+
T as refreshAuthTokens,
|
|
17
|
+
R as refreshAuthTokensQuietly,
|
|
17
18
|
f as resendMessage,
|
|
18
|
-
|
|
19
|
+
c as useInAppNotifications,
|
|
19
20
|
g as useIsUserOnline,
|
|
20
21
|
C as usePushNotifications,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
m as useQRCodeChat,
|
|
23
|
+
A as useRoomPresence,
|
|
24
|
+
Q as useTypography,
|
|
25
|
+
k as useUnread
|
|
25
26
|
};
|
|
26
27
|
//# sourceMappingURL=main.js.map
|
|
@@ -3,6 +3,7 @@ import { xmppSettingsInterface } from './xmpp.model';
|
|
|
3
3
|
import { PartialRoomWithMandatoryKeys, ConfigRoom } from './room.model';
|
|
4
4
|
import { MessageBubble, MessageProps, IMessage } from './message.model';
|
|
5
5
|
import { Iso639_1Codes } from './language.model';
|
|
6
|
+
import { QuickReply } from '../../helpers/quickReplies';
|
|
6
7
|
import { default as React } from 'react';
|
|
7
8
|
import { MessageNotificationToastProps } from '../../components/MessageNotification/MessageNotificationToast';
|
|
8
9
|
/**
|
|
@@ -375,6 +376,24 @@ export interface IConfig {
|
|
|
375
376
|
roomJID: string;
|
|
376
377
|
user: any;
|
|
377
378
|
}) => void;
|
|
379
|
+
/**
|
|
380
|
+
* Called after the user taps a button a bot attached to its message.
|
|
381
|
+
* The answer has ALREADY been sent into the room as an ordinary message
|
|
382
|
+
* by the time this fires - this is a notification, not an interception
|
|
383
|
+
* point, and a throw inside it is caught and logged.
|
|
384
|
+
*
|
|
385
|
+
* It exists so a host can drive a scripted flow (quiz, intake form,
|
|
386
|
+
* onboarding) on top of the same buttons a bot would send.
|
|
387
|
+
*/
|
|
388
|
+
onQuickReply?: (event: {
|
|
389
|
+
/** Id of the bot message that offered the buttons. */
|
|
390
|
+
messageId: string;
|
|
391
|
+
roomJID: string;
|
|
392
|
+
/** The button that was tapped. */
|
|
393
|
+
reply: QuickReply;
|
|
394
|
+
/** `reply.questionId`, or the button's index when the bot sent none. */
|
|
395
|
+
questionId: string;
|
|
396
|
+
}) => void | Promise<void>;
|
|
378
397
|
};
|
|
379
398
|
disableTypingIndicator?: boolean;
|
|
380
399
|
blockMessageSendingWhenProcessing?: boolean | {
|