@sendbird/ai-agent-messenger-react 1.21.3 → 1.23.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/dist/cjs/BBssumix.cjs +1 -0
- package/dist/cjs/BCDZXq61.cjs +1 -0
- package/dist/cjs/Bz2jHC-Z.cjs +1 -0
- package/dist/cjs/CFY_588Z.cjs +1 -0
- package/dist/cjs/CHz4H01e.cjs +1 -0
- package/dist/cjs/CfhYXtgc.cjs +1 -0
- package/dist/cjs/Jlh8RyJW.cjs +1 -0
- package/dist/cjs/RKaCusvu.cjs +1 -0
- package/dist/cjs/Sz9ta-fi.cjs +1 -0
- package/dist/es/{DuNYicWu.js → 5tV340wv.js} +78 -21
- package/dist/es/{BtQecLIw.js → 7vCh5QlQ.js} +78 -21
- package/dist/es/{IxuoSGGX.js → BEqaF3DV.js} +78 -21
- package/dist/es/{PQi1lji5.js → BUKDIngh.js} +76 -19
- package/dist/es/{BxxBjc14.js → CKLYurhd.js} +78 -21
- package/dist/es/{g-NLyB8N.js → CXt8kUk8.js} +78 -21
- package/dist/es/{QVU1iD0e.js → CkoDhLul.js} +78 -21
- package/dist/es/{KPAYWEjC.js → CsqVHJCI.js} +76 -19
- package/dist/es/{B7zqM9VD.js → ZdYGAJn_.js} +78 -21
- package/dist/index.cjs +306 -137
- package/dist/index.d.ts +230 -18
- package/dist/index.js +6556 -3621
- package/package.json +2 -2
- package/dist/cjs/B8e5M4M9.cjs +0 -1
- package/dist/cjs/Ba_JKDGK.cjs +0 -1
- package/dist/cjs/BqsoHLlP.cjs +0 -1
- package/dist/cjs/CSOR33ij.cjs +0 -1
- package/dist/cjs/Cdz9XkkI.cjs +0 -1
- package/dist/cjs/DR4bCizU.cjs +0 -1
- package/dist/cjs/DW6lSsOu.cjs +0 -1
- package/dist/cjs/cDxb_gcv.cjs +0 -1
- package/dist/cjs/zu820q6g.cjs +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { AIAgentGroupChannelListQuery } from '@sendbird/chat/aiAgent';
|
|
|
4
4
|
import { AIAgentModule } from '@sendbird/chat/aiAgent';
|
|
5
5
|
import { BaseChannel } from '@sendbird/chat';
|
|
6
6
|
import { BaseMessage } from '@sendbird/chat/message';
|
|
7
|
+
import type { CollectionEventSource } from '@sendbird/chat';
|
|
7
8
|
import { ComponentType } from 'react';
|
|
8
9
|
import { ConnectionHandler } from '@sendbird/chat';
|
|
9
10
|
import { Context } from 'react';
|
|
@@ -188,6 +189,7 @@ rootElement?: HTMLElement;
|
|
|
188
189
|
theme?: {
|
|
189
190
|
palette?: Partial<PaletteShape>;
|
|
190
191
|
typography?: Partial<{ [K in keyof TypographyShape]: Partial<TypographyShape[K]>; }>;
|
|
192
|
+
colors?: ColorSetInput;
|
|
191
193
|
};
|
|
192
194
|
/**
|
|
193
195
|
* @public
|
|
@@ -286,7 +288,7 @@ __internalVariables?: InternalMessageTemplateVariables;
|
|
|
286
288
|
children?: ReactNode | undefined;
|
|
287
289
|
} & RefAttributes<MessengerSessionRef>>;
|
|
288
290
|
|
|
289
|
-
export declare function AgentUIProviderContainer({ appearance, rootElement, logger, language, stringSet, children, messageTemplate, theme, }: Props): JSX.Element;
|
|
291
|
+
export declare function AgentUIProviderContainer({ appearance, rootElement, logger, language, languageCode, stringSet, children, messageTemplate, theme, }: Props): JSX.Element;
|
|
290
292
|
|
|
291
293
|
declare abstract class AIAgentBaseStats {
|
|
292
294
|
protected timers: Map<string, TimerData> = new Map();
|
|
@@ -485,6 +487,7 @@ declare interface AIAgentConversationContextValue {
|
|
|
485
487
|
messages: BaseMessage[];
|
|
486
488
|
newMessages: BaseMessage[];
|
|
487
489
|
initialized: boolean;
|
|
490
|
+
subscribeMessageEvents: (listener: (event: ConversationMessageEvent) => void) => () => void;
|
|
488
491
|
loadPrevious: () => Promise<void>;
|
|
489
492
|
loadNext: () => Promise<void>;
|
|
490
493
|
sendUserMessage: (params: UserMessageCreateParams) => Promise<UserMessage>;
|
|
@@ -760,6 +763,7 @@ export declare type AIAgentProps = PropsWithChildren<{
|
|
|
760
763
|
typography?: Partial<{
|
|
761
764
|
[K in keyof TypographyShape]: Partial<TypographyShape[K]>;
|
|
762
765
|
}>;
|
|
766
|
+
colors?: ColorSetInput;
|
|
763
767
|
};
|
|
764
768
|
/**
|
|
765
769
|
* @public
|
|
@@ -969,19 +973,69 @@ declare interface AIAgentStringSet {
|
|
|
969
973
|
failed_message_remove: string;
|
|
970
974
|
|
|
971
975
|
file_upload_no_supported_files: string;
|
|
976
|
+
file_upload_replace_alert_title: string;
|
|
977
|
+
file_upload_replace_alert_description: string;
|
|
972
978
|
|
|
973
979
|
// Accessibility
|
|
974
980
|
a11y_message_list: string;
|
|
975
981
|
a11y_scroll_to_bottom: string;
|
|
976
982
|
a11y_scroll_to_new_messages: string;
|
|
983
|
+
/** @deprecated Use a11y_menu instead. */
|
|
977
984
|
a11y_open_conversation_list: string;
|
|
985
|
+
a11y_open_conversation: string;
|
|
986
|
+
a11y_open_conversations: string;
|
|
987
|
+
a11y_close_conversation: string;
|
|
988
|
+
a11y_close_conversations: string;
|
|
989
|
+
a11y_menu: string;
|
|
990
|
+
a11y_message_input: string;
|
|
991
|
+
a11y_send_message: string;
|
|
992
|
+
a11y_attach_file: string;
|
|
993
|
+
a11y_close_messenger: string;
|
|
994
|
+
a11y_expand_messenger: string;
|
|
995
|
+
a11y_collapse_messenger: string;
|
|
996
|
+
a11y_connect_agent: string;
|
|
997
|
+
a11y_message_sender_you: string;
|
|
998
|
+
a11y_suggested_reply: string;
|
|
999
|
+
a11y_typing_indicator: string;
|
|
1000
|
+
a11y_code_block_placeholder: string;
|
|
1001
|
+
a11y_typing_format: (name: string) => string;
|
|
1002
|
+
a11y_message_failed: string;
|
|
1003
|
+
a11y_new_messages_received: (count: number) => string;
|
|
1004
|
+
a11y_new_messages_received_from_sender: (sender: string, count: number) => string;
|
|
1005
|
+
a11y_agent_connected: (name: string) => string;
|
|
1006
|
+
a11y_conversation_closed: string;
|
|
1007
|
+
a11y_file_image: (name: string) => string;
|
|
1008
|
+
a11y_file_video: (name: string) => string;
|
|
1009
|
+
a11y_file_document: (name: string) => string;
|
|
1010
|
+
a11y_screen_conversation: string;
|
|
1011
|
+
a11y_screen_conversation_with_agent: (name: string) => string;
|
|
1012
|
+
a11y_screen_conversation_list_no_count: string;
|
|
1013
|
+
a11y_screen_conversation_list_with_count: (count: number) => string;
|
|
1014
|
+
a11y_csat_displayed: string;
|
|
1015
|
+
a11y_empty_conversation: string;
|
|
1016
|
+
a11y_input_disabled: string;
|
|
1017
|
+
a11y_file_size_exceeded: (maxSizeMB: number) => string;
|
|
1018
|
+
a11y_csat_form_error: string;
|
|
1019
|
+
a11y_hint_send_message: string;
|
|
1020
|
+
a11y_hint_open_conversation: string;
|
|
1021
|
+
a11y_hint_open_conversations: string;
|
|
1022
|
+
a11y_hint_close_conversation: string;
|
|
1023
|
+
a11y_hint_open_menu: string;
|
|
1024
|
+
a11y_hint_connect_to_agent: string;
|
|
1025
|
+
a11y_hint_attach_file: string;
|
|
1026
|
+
a11y_hint_view_new_messages: string;
|
|
1027
|
+
a11y_hint_open_file: string;
|
|
1028
|
+
a11y_hint_open_image: string;
|
|
1029
|
+
a11y_hint_send_reply: string;
|
|
978
1030
|
};
|
|
979
1031
|
|
|
980
1032
|
conversation_list: {
|
|
981
1033
|
header_title: string;
|
|
982
1034
|
ended: string;
|
|
1035
|
+
system_message: string;
|
|
983
1036
|
footer_title: string;
|
|
984
1037
|
multiple_files_count: (count: number) => string;
|
|
1038
|
+
a11y_conversation_item: (agent: string, status: string, time: string, count: number) => string;
|
|
985
1039
|
};
|
|
986
1040
|
|
|
987
1041
|
date_format: {
|
|
@@ -1003,6 +1057,8 @@ declare interface AIAgentStringSet {
|
|
|
1003
1057
|
question: string;
|
|
1004
1058
|
submit_label: string;
|
|
1005
1059
|
submission_expired: string;
|
|
1060
|
+
a11y_rating_label: (score: number, label: string) => string;
|
|
1061
|
+
a11y_hint_select_rating: string;
|
|
1006
1062
|
};
|
|
1007
1063
|
|
|
1008
1064
|
form: {
|
|
@@ -1015,6 +1071,8 @@ declare interface AIAgentStringSet {
|
|
|
1015
1071
|
placeholder_no_messages: string;
|
|
1016
1072
|
placeholder_no_conversations: string;
|
|
1017
1073
|
placeholder_something_went_wrong_retry_label: string;
|
|
1074
|
+
button_ok: string;
|
|
1075
|
+
button_cancel: string;
|
|
1018
1076
|
};
|
|
1019
1077
|
|
|
1020
1078
|
feedback: {
|
|
@@ -1107,6 +1165,55 @@ declare interface CloseConversationCommandParams {
|
|
|
1107
1165
|
channelUrl: string;
|
|
1108
1166
|
}
|
|
1109
1167
|
|
|
1168
|
+
/**
|
|
1169
|
+
* Output type — the resolved shape of theme.colors.
|
|
1170
|
+
* All values are plain strings. This is what components consume.
|
|
1171
|
+
*/
|
|
1172
|
+
declare interface ColorSet {
|
|
1173
|
+
base: {
|
|
1174
|
+
primary: string;
|
|
1175
|
+
primaryContrastContent: string;
|
|
1176
|
+
background: string;
|
|
1177
|
+
headerBackground: string;
|
|
1178
|
+
modalContentBackground: string;
|
|
1179
|
+
};
|
|
1180
|
+
messageInput: {
|
|
1181
|
+
text: string;
|
|
1182
|
+
placeholderText: string;
|
|
1183
|
+
background: string;
|
|
1184
|
+
};
|
|
1185
|
+
messageIncoming: {
|
|
1186
|
+
text: string;
|
|
1187
|
+
background: string;
|
|
1188
|
+
};
|
|
1189
|
+
messageOutgoing: {
|
|
1190
|
+
text: string;
|
|
1191
|
+
background: string;
|
|
1192
|
+
};
|
|
1193
|
+
csat: {
|
|
1194
|
+
background: string;
|
|
1195
|
+
};
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
/**
|
|
1199
|
+
* Input type — what users pass via the colors prop.
|
|
1200
|
+
* Each string field is replaced with ColorValue for light/dark support.
|
|
1201
|
+
* All fields are optional (partial override).
|
|
1202
|
+
*/
|
|
1203
|
+
declare type ColorSetInput = {
|
|
1204
|
+
[K in keyof ColorSet]?: {
|
|
1205
|
+
[P in keyof ColorSet[K]]?: ColorValue;
|
|
1206
|
+
};
|
|
1207
|
+
};
|
|
1208
|
+
|
|
1209
|
+
/**
|
|
1210
|
+
* A color value that can be:
|
|
1211
|
+
* - A single hex string (applied to both light and dark themes)
|
|
1212
|
+
* - An object with optional light/dark hex strings (theme-specific).
|
|
1213
|
+
* When only one side is provided, the other falls back to the auto-generated value.
|
|
1214
|
+
*/
|
|
1215
|
+
declare type ColorValue = HexColor | { light?: HexColor; dark?: HexColor };
|
|
1216
|
+
|
|
1110
1217
|
declare interface CommandPayloads {
|
|
1111
1218
|
[CommandType.ConversationClose]: undefined | CloseConversationCommandParams;
|
|
1112
1219
|
[CommandType.MessengerSettingsUpdated]: MessengerSettingsUpdatedParams;
|
|
@@ -1137,7 +1244,7 @@ declare interface ContextObject {
|
|
|
1137
1244
|
context: Record<string, string>;
|
|
1138
1245
|
}
|
|
1139
1246
|
|
|
1140
|
-
export declare const Conversation: ({ children, onNavigateToConversationList, channelUrl, onClearChannelUrl, shouldMarkAsRead, style, closedChannelUrl, onClearClosedChannelUrl, }: Props_3) => JSX.Element;
|
|
1247
|
+
export declare const Conversation: ({ children, onNavigateToConversationList, channelUrl, onClearChannelUrl, shouldMarkAsRead, announcementsEnabled, style, closedChannelUrl, onClearClosedChannelUrl, }: Props_3) => JSX.Element;
|
|
1141
1248
|
|
|
1142
1249
|
export declare const ConversationContext: Context<ConversationContextValue | null>;
|
|
1143
1250
|
|
|
@@ -1387,7 +1494,7 @@ declare class ConversationInitialRenderStatsTracker {
|
|
|
1387
1494
|
export declare const ConversationLayout: {
|
|
1388
1495
|
(props: PropsWithChildren): ReactNode;
|
|
1389
1496
|
defaults: {
|
|
1390
|
-
template: ComponentType<
|
|
1497
|
+
template: ComponentType<ConversationLayoutTemplateProps>;
|
|
1391
1498
|
components: {
|
|
1392
1499
|
Header: () => ReactNode;
|
|
1393
1500
|
Body: () => JSX.Element;
|
|
@@ -1395,15 +1502,15 @@ export declare const ConversationLayout: {
|
|
|
1395
1502
|
};
|
|
1396
1503
|
};
|
|
1397
1504
|
Template: ({ template, children }: {
|
|
1398
|
-
template?: ComponentType<
|
|
1505
|
+
template?: ComponentType<ConversationLayoutTemplateProps> | undefined;
|
|
1399
1506
|
children?: ReactNode;
|
|
1400
1507
|
}) => JSX.Element;
|
|
1401
|
-
Context: Context<LayoutContextValue<
|
|
1508
|
+
Context: Context<LayoutContextValue<ConversationLayoutTemplateProps, {
|
|
1402
1509
|
Header: () => ReactNode;
|
|
1403
1510
|
Body: () => JSX.Element;
|
|
1404
1511
|
Footer: () => JSX.Element;
|
|
1405
1512
|
}>>;
|
|
1406
|
-
useContext: () => LayoutContextValue<
|
|
1513
|
+
useContext: () => LayoutContextValue<ConversationLayoutTemplateProps, {
|
|
1407
1514
|
Header: () => ReactNode;
|
|
1408
1515
|
Body: () => JSX.Element;
|
|
1409
1516
|
Footer: () => JSX.Element;
|
|
@@ -1420,6 +1527,9 @@ export declare const ConversationLayout: {
|
|
|
1420
1527
|
}) => null;
|
|
1421
1528
|
};
|
|
1422
1529
|
|
|
1530
|
+
declare interface ConversationLayoutTemplateProps {
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1423
1533
|
export declare const ConversationList: ({ conversationListLimit, conversationListFilter, children, onOpenConversationView, style, }: Props_4) => JSX.Element;
|
|
1424
1534
|
|
|
1425
1535
|
/**
|
|
@@ -1939,6 +2049,25 @@ export declare const ConversationListLayout: {
|
|
|
1939
2049
|
}) => null;
|
|
1940
2050
|
};
|
|
1941
2051
|
|
|
2052
|
+
declare type ConversationMessageEvent = ConversationMessageEventPayload & { id: number };
|
|
2053
|
+
|
|
2054
|
+
declare type ConversationMessageEventPayload =
|
|
2055
|
+
| {
|
|
2056
|
+
kind: 'messagesAdded';
|
|
2057
|
+
source: CollectionEventSource;
|
|
2058
|
+
messages: BaseMessage[];
|
|
2059
|
+
}
|
|
2060
|
+
| {
|
|
2061
|
+
kind: 'messagesUpdated';
|
|
2062
|
+
source: CollectionEventSource;
|
|
2063
|
+
messages: BaseMessage[];
|
|
2064
|
+
}
|
|
2065
|
+
| {
|
|
2066
|
+
kind: 'initialized';
|
|
2067
|
+
source: 'cache' | 'api';
|
|
2068
|
+
messages: BaseMessage[];
|
|
2069
|
+
};
|
|
2070
|
+
|
|
1942
2071
|
declare interface ConversationScrollContextValue {
|
|
1943
2072
|
ref: RefObject<HTMLDivElement | null> | ((element: HTMLDivElement | null) => void);
|
|
1944
2073
|
state: {
|
|
@@ -2273,6 +2402,13 @@ export declare interface GroundednessInfo {
|
|
|
2273
2402
|
preview_title: string;
|
|
2274
2403
|
}
|
|
2275
2404
|
|
|
2405
|
+
/**
|
|
2406
|
+
* Hex color string type. Enforces '#' prefix at compile time.
|
|
2407
|
+
* Only validates the prefix — does not guarantee valid hex digits or length.
|
|
2408
|
+
* Invalid values (e.g. '#zzz') will produce undefined rendering behavior.
|
|
2409
|
+
*/
|
|
2410
|
+
declare type HexColor = `#${string}`;
|
|
2411
|
+
|
|
2276
2412
|
/**
|
|
2277
2413
|
* frequently used icons are imported statically, and others are imported dynamically.
|
|
2278
2414
|
* */
|
|
@@ -2380,12 +2516,13 @@ declare type IncomingMessageBodyProps<T extends MessageType = MessageType> = Inc
|
|
|
2380
2516
|
bubbleContentColor?: string;
|
|
2381
2517
|
bubbleBackgroundColor?: string;
|
|
2382
2518
|
};
|
|
2519
|
+
surface?: 'bubble' | 'plain';
|
|
2383
2520
|
};
|
|
2384
2521
|
|
|
2385
2522
|
export declare const IncomingMessageLayout: {
|
|
2386
2523
|
(props: PropsWithChildren): ReactNode;
|
|
2387
2524
|
defaults: {
|
|
2388
|
-
template: ComponentType<
|
|
2525
|
+
template: ComponentType<IncomingMessageTemplateProps>;
|
|
2389
2526
|
components: {
|
|
2390
2527
|
SenderName: ({ sender }: Pick<IncomingMessageProps, "sender">) => ReactNode;
|
|
2391
2528
|
SenderAvatar: ({ sender, isBotMessage, }: Pick<IncomingMessageProps, "sender" | "isBotMessage">) => ReactNode;
|
|
@@ -2633,10 +2770,10 @@ export declare const IncomingMessageLayout: {
|
|
|
2633
2770
|
};
|
|
2634
2771
|
};
|
|
2635
2772
|
Template: ({ template, children }: {
|
|
2636
|
-
template?: ComponentType<
|
|
2773
|
+
template?: ComponentType<IncomingMessageTemplateProps> | undefined;
|
|
2637
2774
|
children?: ReactNode;
|
|
2638
2775
|
}) => JSX.Element;
|
|
2639
|
-
Context: Context<LayoutContextValue<
|
|
2776
|
+
Context: Context<LayoutContextValue<IncomingMessageTemplateProps, {
|
|
2640
2777
|
SenderName: ({ sender }: Pick<IncomingMessageProps, "sender">) => ReactNode;
|
|
2641
2778
|
SenderAvatar: ({ sender, isBotMessage, }: Pick<IncomingMessageProps, "sender" | "isBotMessage">) => ReactNode;
|
|
2642
2779
|
SentTime: ({ createdAt }: Pick<IncomingMessageProps, "createdAt">) => ReactNode;
|
|
@@ -2881,7 +3018,7 @@ export declare const IncomingMessageLayout: {
|
|
|
2881
3018
|
Feedback: ({ isBotMessage, isConversationClosed, isStreaming, isFeedbackEnabled, isFeedbackCommentEnabled, extendedMessagePayload, onFeedbackUpdate, }: IncomingMessageProps) => ReactNode;
|
|
2882
3019
|
MessageLogs: (_: IncomingMessageProps) => ReactNode;
|
|
2883
3020
|
}>>;
|
|
2884
|
-
useContext: () => LayoutContextValue<
|
|
3021
|
+
useContext: () => LayoutContextValue<IncomingMessageTemplateProps, {
|
|
2885
3022
|
SenderName: ({ sender }: Pick<IncomingMessageProps, "sender">) => ReactNode;
|
|
2886
3023
|
SenderAvatar: ({ sender, isBotMessage, }: Pick<IncomingMessageProps, "sender" | "isBotMessage">) => ReactNode;
|
|
2887
3024
|
SentTime: ({ createdAt }: Pick<IncomingMessageProps, "createdAt">) => ReactNode;
|
|
@@ -3409,6 +3546,8 @@ export declare const IncomingMessageLayout: {
|
|
|
3409
3546
|
export declare type IncomingMessageProps<T extends IncomingMessageUnion['messageType'] = IncomingMessageUnion['messageType']> =
|
|
3410
3547
|
PickMessageProps<IncomingMessageUnion, T>;
|
|
3411
3548
|
|
|
3549
|
+
declare type IncomingMessageTemplateProps = IncomingMessageProps & Partial<InternalExtraProps>;
|
|
3550
|
+
|
|
3412
3551
|
declare type IncomingMessageUnion =
|
|
3413
3552
|
| IncomingBaseMessageProps<{
|
|
3414
3553
|
messageType: 'user';
|
|
@@ -3435,7 +3574,10 @@ declare type IncomingMessageUnion =
|
|
|
3435
3574
|
|
|
3436
3575
|
declare function IncomingTextBody(props: IncomingMessageBodyProps): JSX.Element | null;
|
|
3437
3576
|
|
|
3577
|
+
declare type InputMode = 'enabled' | 'readOnly' | 'disabled';
|
|
3578
|
+
|
|
3438
3579
|
declare type InputState = {
|
|
3580
|
+
_mode: InputMode;
|
|
3439
3581
|
disabled: boolean;
|
|
3440
3582
|
disabledBy:
|
|
3441
3583
|
| 'unavailable'
|
|
@@ -3450,6 +3592,11 @@ declare type InputState = {
|
|
|
3450
3592
|
| (string & {});
|
|
3451
3593
|
};
|
|
3452
3594
|
|
|
3595
|
+
declare type InternalExtraProps = {
|
|
3596
|
+
maxBodyWidth?: number;
|
|
3597
|
+
testerMode?: boolean;
|
|
3598
|
+
};
|
|
3599
|
+
|
|
3453
3600
|
declare interface InternalMessageTemplateVariables {
|
|
3454
3601
|
carousel_padding_left?: number;
|
|
3455
3602
|
carousel_padding_right?: number;
|
|
@@ -3464,7 +3611,7 @@ declare interface LanguageSet extends Omit<AIAgentLanguageSet, 'strings'> {
|
|
|
3464
3611
|
stringSet: StringSet;
|
|
3465
3612
|
}
|
|
3466
3613
|
|
|
3467
|
-
export declare function LauncherBase({ className, isOpened, onClick, type, imageUrl, dir, animated, backgroundColor, size, }: LauncherProps): JSX.Element;
|
|
3614
|
+
export declare function LauncherBase({ className, children, isOpened, onClick, ariaLabel, 'aria-label': ariaLabelProp, 'aria-describedby': ariaDescribedBy, type, imageUrl, dir, animated, backgroundColor, size, }: LauncherProps): JSX.Element;
|
|
3468
3615
|
|
|
3469
3616
|
declare type LauncherImageType = 'default_icon' | 'custom_image';
|
|
3470
3617
|
|
|
@@ -3475,8 +3622,12 @@ declare interface LauncherInfo {
|
|
|
3475
3622
|
|
|
3476
3623
|
declare type LauncherProps = {
|
|
3477
3624
|
className?: string;
|
|
3625
|
+
children?: ReactNode;
|
|
3478
3626
|
isOpened: boolean;
|
|
3479
3627
|
onClick?: () => void;
|
|
3628
|
+
ariaLabel?: string;
|
|
3629
|
+
'aria-label'?: string;
|
|
3630
|
+
'aria-describedby'?: string;
|
|
3480
3631
|
type: LauncherImageType;
|
|
3481
3632
|
imageUrl: string;
|
|
3482
3633
|
backgroundColor: string;
|
|
@@ -3494,6 +3645,7 @@ declare interface LayoutContextValue<Props, Components extends Record<string, Co
|
|
|
3494
3645
|
|
|
3495
3646
|
declare interface LocalizationContextValue extends LanguageSet {
|
|
3496
3647
|
format: typeof format;
|
|
3648
|
+
defaultStringSet: StringSet;
|
|
3497
3649
|
}
|
|
3498
3650
|
|
|
3499
3651
|
declare interface Loggable {
|
|
@@ -3546,7 +3698,7 @@ export declare const MessageListUILayout: {
|
|
|
3546
3698
|
template: ComponentType<unknown>;
|
|
3547
3699
|
components: {
|
|
3548
3700
|
DateSeparator: ({ className, date, style }: DateSeparatorProps) => ReactNode;
|
|
3549
|
-
ScrollToBottomButton: ({ className, style, onClick
|
|
3701
|
+
ScrollToBottomButton: ({ className, style, onClick }: ScrollToBottomButtonProps) => ReactNode;
|
|
3550
3702
|
};
|
|
3551
3703
|
};
|
|
3552
3704
|
Template: ({ template, children }: {
|
|
@@ -3555,18 +3707,18 @@ export declare const MessageListUILayout: {
|
|
|
3555
3707
|
}) => JSX.Element;
|
|
3556
3708
|
Context: Context<LayoutContextValue<unknown, {
|
|
3557
3709
|
DateSeparator: ({ className, date, style }: DateSeparatorProps) => ReactNode;
|
|
3558
|
-
ScrollToBottomButton: ({ className, style, onClick
|
|
3710
|
+
ScrollToBottomButton: ({ className, style, onClick }: ScrollToBottomButtonProps) => ReactNode;
|
|
3559
3711
|
}>>;
|
|
3560
3712
|
useContext: () => LayoutContextValue<unknown, {
|
|
3561
3713
|
DateSeparator: ({ className, date, style }: DateSeparatorProps) => ReactNode;
|
|
3562
|
-
ScrollToBottomButton: ({ className, style, onClick
|
|
3714
|
+
ScrollToBottomButton: ({ className, style, onClick }: ScrollToBottomButtonProps) => ReactNode;
|
|
3563
3715
|
}>;
|
|
3564
3716
|
} & {
|
|
3565
3717
|
DateSeparator: (props: {
|
|
3566
3718
|
component: ({ className, date, style }: DateSeparatorProps) => ReactNode;
|
|
3567
3719
|
}) => null;
|
|
3568
3720
|
ScrollToBottomButton: (props: {
|
|
3569
|
-
component: ({ className, style, onClick
|
|
3721
|
+
component: ({ className, style, onClick }: ScrollToBottomButtonProps) => ReactNode;
|
|
3570
3722
|
}) => null;
|
|
3571
3723
|
};
|
|
3572
3724
|
|
|
@@ -4039,11 +4191,14 @@ declare type Props = {
|
|
|
4039
4191
|
logger?: Loggable;
|
|
4040
4192
|
stringSet?: Partial<StringSet>;
|
|
4041
4193
|
language?: string;
|
|
4194
|
+
/** @internal DO NOT USE THIS **/
|
|
4195
|
+
languageCode?: string;
|
|
4042
4196
|
theme?: {
|
|
4043
4197
|
palette?: Partial<PaletteShape>;
|
|
4044
4198
|
typography?: Partial<{
|
|
4045
4199
|
[K in keyof TypographyShape]: Partial<TypographyShape[K]>;
|
|
4046
4200
|
}>;
|
|
4201
|
+
colors?: ColorSetInput;
|
|
4047
4202
|
};
|
|
4048
4203
|
/** @internal DO NOT USE THIS **/
|
|
4049
4204
|
messageTemplate?: {
|
|
@@ -4080,6 +4235,7 @@ declare type Props_3 = PropsWithChildren<{
|
|
|
4080
4235
|
onClearChannelUrl?: () => void;
|
|
4081
4236
|
onNavigateToConversationList?: () => void;
|
|
4082
4237
|
shouldMarkAsRead?: boolean;
|
|
4238
|
+
announcementsEnabled?: boolean;
|
|
4083
4239
|
/** Custom styles for the conversation container. */
|
|
4084
4240
|
style?: CSSProperties;
|
|
4085
4241
|
/** @deprecated Please use `channelUrl` instead. **/
|
|
@@ -4106,7 +4262,6 @@ declare type SBUFoundationProps<T = NonNullable<unknown>> = T & {
|
|
|
4106
4262
|
|
|
4107
4263
|
export declare type ScrollToBottomButtonProps = SBUFoundationProps<{
|
|
4108
4264
|
onClick: () => void;
|
|
4109
|
-
ariaLabel?: string;
|
|
4110
4265
|
}>;
|
|
4111
4266
|
|
|
4112
4267
|
declare interface SearchConversationParams {
|
|
@@ -4175,6 +4330,7 @@ declare type StringSet = {
|
|
|
4175
4330
|
MESSAGE_INPUT__PLACE_HOLDER__DISABLED: string;
|
|
4176
4331
|
MESSAGE_INPUT__PLACE_HOLDER__STEWARD: string;
|
|
4177
4332
|
MESSAGE_INPUT__PLACE_HOLDER__RECONNECTING: string;
|
|
4333
|
+
BUTTON__OK: string;
|
|
4178
4334
|
BUTTON__CANCEL: string;
|
|
4179
4335
|
BUTTON__SUBMIT: string;
|
|
4180
4336
|
RETRY: string;
|
|
@@ -4194,6 +4350,8 @@ declare type StringSet = {
|
|
|
4194
4350
|
FILE_UPLOAD_NO_SUPPORTED_FILES: string;
|
|
4195
4351
|
FILE_UPLOAD_PHOTOS: string;
|
|
4196
4352
|
FILE_UPLOAD_FILES: string;
|
|
4353
|
+
FILE_UPLOAD_REPLACE_ALERT__TITLE: string;
|
|
4354
|
+
FILE_UPLOAD_REPLACE_ALERT__DESCRIPTION: string;
|
|
4197
4355
|
FILE_VIEWER__UNSUPPORT: string;
|
|
4198
4356
|
IMAGE_VIEWER__DEFAULT_TITLE: string;
|
|
4199
4357
|
CSAT_TITLE_UNSUBMITTED: string;
|
|
@@ -4222,6 +4380,7 @@ declare type StringSet = {
|
|
|
4222
4380
|
CONVERSATION_LIST__HEADER_TITLE: string;
|
|
4223
4381
|
CONVERSATION_LIST__NO_CONVERSATIONS: string;
|
|
4224
4382
|
CONVERSATION_LIST__ENDED: string;
|
|
4383
|
+
CONVERSATION_LIST__SYSTEM_MESSAGE: string;
|
|
4225
4384
|
CONVERSATION_LIST__MULTIPLE_FILES_COUNT: (count: number) => string;
|
|
4226
4385
|
CITATION_SOURCE_TITLE: string;
|
|
4227
4386
|
FORM_PLACEHOLDER: string;
|
|
@@ -4250,12 +4409,67 @@ declare type StringSet = {
|
|
|
4250
4409
|
A11Y_MESSAGE_LIST: string;
|
|
4251
4410
|
A11Y_SCROLL_TO_BOTTOM: string;
|
|
4252
4411
|
A11Y_SCROLL_TO_NEW_MESSAGES: string;
|
|
4412
|
+
/** @deprecated Use A11Y_MENU instead. */
|
|
4253
4413
|
A11Y_OPEN_CONVERSATION_LIST: string;
|
|
4414
|
+
A11Y_OPEN_CONVERSATION: string;
|
|
4415
|
+
A11Y_OPEN_CONVERSATIONS: string;
|
|
4416
|
+
A11Y_CLOSE_CONVERSATION: string;
|
|
4417
|
+
A11Y_CLOSE_CONVERSATIONS: string;
|
|
4418
|
+
A11Y_MENU: string;
|
|
4419
|
+
A11Y_MESSAGE_INPUT: string;
|
|
4420
|
+
A11Y_SEND_MESSAGE: string;
|
|
4254
4421
|
A11Y_IMAGE_VIEWER_CLOSE: string;
|
|
4255
4422
|
A11Y_IMAGE_VIEWER_PREVIOUS: string;
|
|
4256
4423
|
A11Y_IMAGE_VIEWER_NEXT: string;
|
|
4257
4424
|
A11Y_IMAGE_VIEWER_DOWNLOAD: string;
|
|
4258
4425
|
A11Y_ATTACH_FILE: string;
|
|
4426
|
+
A11Y_MESSAGE_SENDER_YOU: string;
|
|
4427
|
+
A11Y_SUGGESTED_REPLY: string;
|
|
4428
|
+
A11Y_TYPING_INDICATOR: string;
|
|
4429
|
+
A11Y_CODE_BLOCK_PLACEHOLDER: string;
|
|
4430
|
+
A11Y_CSAT_RATING_LABEL: (score: number, label: string) => string;
|
|
4431
|
+
A11Y_FILE_UPLOAD_OPTIONS: string;
|
|
4432
|
+
A11Y_FAILED_MESSAGE_OPTIONS: string;
|
|
4433
|
+
A11Y_FEEDBACK_OPTIONS: string;
|
|
4434
|
+
A11Y_CSAT_TEXT_INPUT_LABEL: string;
|
|
4435
|
+
A11Y_TYPING_FORMAT: (name: string) => string;
|
|
4436
|
+
A11Y_MESSAGE_FAILED: string;
|
|
4437
|
+
A11Y_NEW_MESSAGES_RECEIVED: (count: number) => string;
|
|
4438
|
+
A11Y_NEW_MESSAGES_RECEIVED_FROM_SENDER: (sender: string, count: number) => string;
|
|
4439
|
+
A11Y_AGENT_CONNECTED: (name: string) => string;
|
|
4440
|
+
A11Y_CONVERSATION_CLOSED: string;
|
|
4441
|
+
A11Y_FILE_IMAGE: (name: string) => string;
|
|
4442
|
+
A11Y_FILE_VIDEO: (name: string) => string;
|
|
4443
|
+
A11Y_FILE_DOCUMENT: (name: string) => string;
|
|
4444
|
+
A11Y_FILE_SELECTED?: (label: string) => string;
|
|
4445
|
+
A11Y_FILE_REMOVE_BUTTON: (name: string) => string;
|
|
4446
|
+
A11Y_SCREEN_CONVERSATION: string;
|
|
4447
|
+
A11Y_SCREEN_CONVERSATION_WITH_AGENT: (name: string) => string;
|
|
4448
|
+
A11Y_SCREEN_CONVERSATION_LIST_NO_COUNT: string;
|
|
4449
|
+
A11Y_SCREEN_CONVERSATION_LIST_WITH_COUNT: (count: number) => string;
|
|
4450
|
+
A11Y_CSAT_DISPLAYED: string;
|
|
4451
|
+
A11Y_EMPTY_CONVERSATION: string;
|
|
4452
|
+
A11Y_INPUT_DISABLED: string;
|
|
4453
|
+
A11Y_FILE_SIZE_EXCEEDED: (maxSizeMB: number) => string;
|
|
4454
|
+
A11Y_CSAT_FORM_ERROR: string;
|
|
4455
|
+
A11Y_CONVERSATION_ITEM: (agent: string, status: string, time: string, count: number) => string;
|
|
4456
|
+
A11Y_RATING_LABEL: (score: number, label: string) => string;
|
|
4457
|
+
A11Y_CONNECT_AGENT: string;
|
|
4458
|
+
A11Y_CLOSE_MESSENGER: string;
|
|
4459
|
+
A11Y_EXPAND_MESSENGER: string;
|
|
4460
|
+
A11Y_COLLAPSE_MESSENGER: string;
|
|
4461
|
+
A11Y_HINT_SEND_MESSAGE: string;
|
|
4462
|
+
A11Y_HINT_OPEN_CONVERSATION: string;
|
|
4463
|
+
A11Y_HINT_OPEN_CONVERSATIONS: string;
|
|
4464
|
+
A11Y_HINT_CLOSE_CONVERSATION: string;
|
|
4465
|
+
A11Y_HINT_OPEN_MENU: string;
|
|
4466
|
+
A11Y_HINT_CONNECT_TO_AGENT: string;
|
|
4467
|
+
A11Y_HINT_ATTACH_FILE: string;
|
|
4468
|
+
A11Y_HINT_VIEW_NEW_MESSAGES: string;
|
|
4469
|
+
A11Y_HINT_OPEN_FILE: string;
|
|
4470
|
+
A11Y_HINT_OPEN_IMAGE: string;
|
|
4471
|
+
A11Y_HINT_SEND_REPLY: string;
|
|
4472
|
+
A11Y_HINT_SELECT_RATING: string;
|
|
4259
4473
|
SCROLL_TO_NEW_MESSAGES_LABEL: (messages: BaseMessage[]) => string;
|
|
4260
4474
|
HANDOFF_CONFIRM__TITLE: string;
|
|
4261
4475
|
HANDOFF_CONFIRM__DESCRIPTION: string;
|
|
@@ -4276,8 +4490,6 @@ declare type StringSet = {
|
|
|
4276
4490
|
/** @deprecated Unused string **/
|
|
4277
4491
|
BUTTON__SAVE: string;
|
|
4278
4492
|
/** @deprecated Unused string **/
|
|
4279
|
-
BUTTON__OK: string;
|
|
4280
|
-
/** @deprecated Unused string **/
|
|
4281
4493
|
NO_NAME: string;
|
|
4282
4494
|
/** @deprecated Unused string **/
|
|
4283
4495
|
CHANNEL_FROZEN: string;
|