@microsoft/omnichannel-chat-widget 1.8.4-main.7bdb634 → 1.8.4-main.9ae37a9
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 +27 -0
- package/lib/cjs/common/Constants.js +3 -0
- package/lib/cjs/common/telemetry/AppInsightsEvents.js +14 -9
- package/lib/cjs/common/telemetry/TelemetryConstants.js +15 -2
- package/lib/cjs/common/telemetry/TelemetryManager.js +10 -7
- package/lib/cjs/common/telemetry/loggers/appInsightsLogger.js +26 -10
- package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +16 -4
- package/lib/cjs/components/citationpanestateful/CitationPaneStateful.js +20 -1
- package/lib/cjs/components/headerstateful/HeaderStateful.js +8 -2
- package/lib/cjs/components/livechatwidget/common/ChatWidgetEvents.js +1 -1
- package/lib/cjs/components/livechatwidget/common/PersistentConversationHandler.js +26 -20
- package/lib/cjs/components/livechatwidget/common/defaultProps/defaultPersistentChatHistoryProps.js +1 -2
- package/lib/cjs/components/livechatwidget/common/endChat.js +21 -9
- package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +9 -2
- package/lib/cjs/components/livechatwidget/common/registerTelemetryLoggers.js +3 -0
- package/lib/cjs/components/livechatwidget/common/renderSurveyHelpers.js +2 -2
- package/lib/cjs/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +3 -3
- package/lib/cjs/components/livechatwidget/common/startChat.js +5 -1
- package/lib/cjs/components/livechatwidget/common/startChatErrorHandler.js +24 -4
- package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +123 -28
- package/lib/cjs/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +31 -4
- package/lib/cjs/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +12 -3
- package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +30 -29
- package/lib/cjs/components/webchatcontainerstateful/common/activityConverters/convertPersistentChatHistoryMessageToActivity.js +8 -2
- package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts.js +2 -1
- package/lib/cjs/components/webchatcontainerstateful/hooks/usePersistentChatHistory.js +1 -3
- package/lib/cjs/components/webchatcontainerstateful/interfaces/IExtendedChatConffig.js +1 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/WebChatEventSubscribers.js +6 -7
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/ConversationDividerActivity.js +30 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.js +21 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +7 -2
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +1 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/citationsMiddleware.js +6 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/localizedStringsBotInitialsMiddleware.js +29 -7
- package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +1 -0
- package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +7 -1
- package/lib/cjs/contexts/createReducer.js +15 -0
- package/lib/cjs/firstresponselatency/FirstMessageTrackerFromBot.js +3 -2
- package/lib/cjs/firstresponselatency/FirstResponseLatencyTracker.js +6 -2
- package/lib/cjs/plugins/newMessageEventHandler.js +4 -1
- package/lib/esm/common/Constants.js +3 -0
- package/lib/esm/common/telemetry/AppInsightsEvents.js +14 -9
- package/lib/esm/common/telemetry/TelemetryConstants.js +13 -1
- package/lib/esm/common/telemetry/TelemetryManager.js +10 -7
- package/lib/esm/common/telemetry/loggers/appInsightsLogger.js +27 -11
- package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +17 -5
- package/lib/esm/components/citationpanestateful/CitationPaneStateful.js +20 -1
- package/lib/esm/components/headerstateful/HeaderStateful.js +9 -3
- package/lib/esm/components/livechatwidget/common/ChatWidgetEvents.js +1 -1
- package/lib/esm/components/livechatwidget/common/PersistentConversationHandler.js +26 -20
- package/lib/esm/components/livechatwidget/common/defaultProps/defaultPersistentChatHistoryProps.js +1 -2
- package/lib/esm/components/livechatwidget/common/endChat.js +21 -9
- package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +9 -2
- package/lib/esm/components/livechatwidget/common/registerTelemetryLoggers.js +3 -0
- package/lib/esm/components/livechatwidget/common/renderSurveyHelpers.js +2 -2
- package/lib/esm/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +3 -3
- package/lib/esm/components/livechatwidget/common/startChat.js +7 -3
- package/lib/esm/components/livechatwidget/common/startChatErrorHandler.js +23 -4
- package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +124 -29
- package/lib/esm/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +33 -6
- package/lib/esm/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +13 -4
- package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +30 -32
- package/lib/esm/components/webchatcontainerstateful/common/activityConverters/convertPersistentChatHistoryMessageToActivity.js +8 -2
- package/lib/esm/components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts.js +2 -1
- package/lib/esm/components/webchatcontainerstateful/hooks/usePersistentChatHistory.js +1 -3
- package/lib/esm/components/webchatcontainerstateful/interfaces/IExtendedChatConffig.js +1 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/WebChatEventSubscribers.js +6 -7
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/ConversationDividerActivity.js +30 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.js +21 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +7 -2
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +1 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/citationsMiddleware.js +6 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/localizedStringsBotInitialsMiddleware.js +29 -7
- package/lib/esm/contexts/common/LiveChatWidgetActionType.js +1 -0
- package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +7 -1
- package/lib/esm/contexts/createReducer.js +15 -0
- package/lib/esm/firstresponselatency/FirstMessageTrackerFromBot.js +3 -2
- package/lib/esm/firstresponselatency/FirstResponseLatencyTracker.js +6 -2
- package/lib/esm/plugins/newMessageEventHandler.js +4 -1
- package/lib/types/common/Constants.d.ts +3 -0
- package/lib/types/common/telemetry/TelemetryConstants.d.ts +12 -1
- package/lib/types/common/telemetry/interfaces/IInternalTelemetryData.d.ts +1 -0
- package/lib/types/components/livechatwidget/common/ChatWidgetEvents.d.ts +1 -1
- package/lib/types/components/livechatwidget/common/startChatErrorHandler.d.ts +1 -0
- package/lib/types/components/livechatwidget/interfaces/IPersistentChatHistoryProps.d.ts +5 -1
- package/lib/types/components/webchatcontainerstateful/interfaces/IExtendedChatConffig.d.ts +15 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/WebChatEventSubscribers.d.ts +1 -2
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.d.ts +1 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.d.ts +2 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/localizedStringsBotInitialsMiddleware.d.ts +1 -1
- package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +1 -0
- package/lib/types/contexts/common/ILiveChatWidgetLocalizedTexts.d.ts +5 -0
- package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +2 -1
- package/package.json +2 -2
|
@@ -7,6 +7,7 @@ function _toPrimitive(input, hint) { if (typeof input !== "object" || input ===
|
|
|
7
7
|
import { BroadcastEvent, LogLevel, TelemetryEvent } from "../common/telemetry/TelemetryConstants";
|
|
8
8
|
import { BroadcastService } from "@microsoft/omnichannel-chat-components";
|
|
9
9
|
import { TelemetryHelper } from "../common/telemetry/TelemetryHelper";
|
|
10
|
+
import { Constants } from "../common/Constants";
|
|
10
11
|
export let FirstResponseLatencyTracker = /*#__PURE__*/function () {
|
|
11
12
|
function FirstResponseLatencyTracker() {
|
|
12
13
|
_classCallCheck(this, FirstResponseLatencyTracker);
|
|
@@ -127,7 +128,8 @@ export let FirstResponseLatencyTracker = /*#__PURE__*/function () {
|
|
|
127
128
|
CustomProperties: {
|
|
128
129
|
elapsedTime,
|
|
129
130
|
userMessage: this.startTrackingMessage,
|
|
130
|
-
botMessage: this.stopTrackingMessage
|
|
131
|
+
botMessage: this.stopTrackingMessage,
|
|
132
|
+
type: payload === null || payload === void 0 ? void 0 : payload.type
|
|
131
133
|
}
|
|
132
134
|
});
|
|
133
135
|
}
|
|
@@ -168,7 +170,9 @@ export let FirstResponseLatencyTracker = /*#__PURE__*/function () {
|
|
|
168
170
|
value: function stopClock(payload) {
|
|
169
171
|
try {
|
|
170
172
|
if (!payload || !payload.Id) {
|
|
171
|
-
|
|
173
|
+
if ((payload === null || payload === void 0 ? void 0 : payload.type) !== Constants.typing) {
|
|
174
|
+
throw new Error("Invalid payload");
|
|
175
|
+
}
|
|
172
176
|
}
|
|
173
177
|
|
|
174
178
|
// Only allow stopTracking if sender is valid and tracking is active
|
|
@@ -78,6 +78,9 @@ export const createOnNewAdapterActivityHandler = (chatId, userId, startTime) =>
|
|
|
78
78
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
79
79
|
const messageHasNoAttachments = !(activity !== null && activity !== void 0 && activity.attachments) || (activity === null || activity === void 0 ? void 0 : activity.attachments.length) === 0;
|
|
80
80
|
if (messageHasNoTags && messageHasNoText && messageHasNoAttachments) {
|
|
81
|
+
if ((activity === null || activity === void 0 ? void 0 : activity.type) === Constants.typing) {
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
81
84
|
return false;
|
|
82
85
|
}
|
|
83
86
|
return true;
|
|
@@ -106,7 +109,7 @@ export const createOnNewAdapterActivityHandler = (chatId, userId, startTime) =>
|
|
|
106
109
|
});
|
|
107
110
|
};
|
|
108
111
|
const raiseMessageEvent = activity => {
|
|
109
|
-
if ((activity === null || activity === void 0 ? void 0 : activity.type) === Constants.message) {
|
|
112
|
+
if ((activity === null || activity === void 0 ? void 0 : activity.type) === Constants.message || (activity === null || activity === void 0 ? void 0 : activity.type) === Constants.typing) {
|
|
110
113
|
const scenarioType = getScenarioType(activity);
|
|
111
114
|
switch (scenarioType) {
|
|
112
115
|
case ScenarioType.UserSendMessageStrategy:
|
|
@@ -46,6 +46,7 @@ export declare class Constants {
|
|
|
46
46
|
static readonly averageWaitTimeMessageTag = "averagewaittime";
|
|
47
47
|
static readonly message = "message";
|
|
48
48
|
static readonly hiddenTag = "Hidden";
|
|
49
|
+
static readonly typing = "typing";
|
|
49
50
|
static readonly prefixTimestampTag = "ServerMessageTimestamp_";
|
|
50
51
|
static readonly acsChannel = "ACS_CHANNEL";
|
|
51
52
|
static readonly publicMessageTag = "public";
|
|
@@ -106,6 +107,7 @@ export declare class Constants {
|
|
|
106
107
|
static readonly customEventValue = "customEventValue";
|
|
107
108
|
static readonly Hidden = "Hidden";
|
|
108
109
|
static readonly EndConversationDueToOverflow = "endconversationduetooverflow";
|
|
110
|
+
static readonly SkipSessionCloseForPersistentChatFlag = "skipSessionCloseForPersistentChat";
|
|
109
111
|
}
|
|
110
112
|
export declare const Regex: {
|
|
111
113
|
new (): {};
|
|
@@ -284,6 +286,7 @@ export declare class PrepareEndChatDescriptionConstants {
|
|
|
284
286
|
static readonly PrepareEndChatError = "There's an error while preparing to end chat. Closing chat widget.";
|
|
285
287
|
static readonly WidgetLoadFailedAfterSessionInit = "SessionInit was successful, but widget load failed. Ending chat to avoid ghost chats in OC.";
|
|
286
288
|
static readonly InitiateEndChatReceived = "Received InitiateEndChat BroadcastEvent while conversation state is not Active. Ending chat.";
|
|
289
|
+
static readonly InitiateEndChatReceivedActiveChat = "Received InitiateEndChat BroadcastEvent while conversation state is Active. Updating conversation states.";
|
|
287
290
|
static readonly EndChatReceivedFromOtherTabs = "Received EndChat BroadcastEvent from other tabs. Closing this chat.";
|
|
288
291
|
static readonly CustomerCloseChatOnFailureOrPostChat = "Customer is trying to close chat widget on start chat failure or post chat pane.";
|
|
289
292
|
static readonly CustomerCloseInactiveChat = "Chat was Inactive and customer is trying to close chat widget or refreshing the page.";
|
|
@@ -106,6 +106,7 @@ export declare enum TelemetryEvent {
|
|
|
106
106
|
EndChatFailed = "EndChatFailed",
|
|
107
107
|
SettingCustomContext = "SettingCustomContext",
|
|
108
108
|
WebChatLoaded = "WebChatLoaded",
|
|
109
|
+
PersistentChatHistoryEnabled = "PersistentChatHistoryEnabled",
|
|
109
110
|
LCWChatButtonActionCompleted = "LCWChatButtonActionCompleted",
|
|
110
111
|
LCWChatButtonClicked = "LCWChatButtonClicked",
|
|
111
112
|
LCWChatButtonShow = "LCWChatButtonShow",
|
|
@@ -270,6 +271,8 @@ export declare enum TelemetryEvent {
|
|
|
270
271
|
UXCitationPaneCompleted = "UXCitationPaneCompleted",
|
|
271
272
|
UXLiveChatWidgetStart = "UXLiveChatWidgetStart",
|
|
272
273
|
UXLiveChatWidgetCompleted = "UXLiveChatWidgetCompleted",
|
|
274
|
+
UXPostChatPaneStarted = "UXPostChatPaneStarted",
|
|
275
|
+
UXPostChatPaneCompleted = "UXPostChatPaneCompleted",
|
|
273
276
|
AppInsightsInitialized = "AppInsightsInitialized",
|
|
274
277
|
AppInsightsInitFailed = "AppInsightsInitFailed",
|
|
275
278
|
ConvertPersistentChatHistoryMessageToActivityFailed = "ConvertPersistentChatHistoryMessageToActivityFailed",
|
|
@@ -285,6 +288,7 @@ export declare enum TelemetryEvent {
|
|
|
285
288
|
LCWPersistentConversationHandlerInitialized = "LCWPersistentConversationHandlerInitialized",
|
|
286
289
|
LCWPersistentHistoryPullBlocked = "LCWPersistentHistoryPullBlocked",
|
|
287
290
|
LCWPersistentHistoryPullCompleted = "LCWPersistentHistoryPullCompleted",
|
|
291
|
+
LCWPersistentHistoryReturnedNull = "LCWPersistentHistoryReturnedNull",
|
|
288
292
|
LCWLazyLoadInitializationStarted = "LCWLazyLoadInitializationStarted",
|
|
289
293
|
LCWLazyLoadContainerNotFound = "LCWLazyLoadContainerNotFound",
|
|
290
294
|
LCWLazyLoadInitializationCompleted = "LCWLazyLoadInitializationCompleted",
|
|
@@ -294,10 +298,12 @@ export declare enum TelemetryEvent {
|
|
|
294
298
|
LCWLazyLoadActivityMounted = "LCWLazyLoadActivityMounted",
|
|
295
299
|
LCWLazyLoadReset = "LCWLazyLoadReset",
|
|
296
300
|
LCWLazyLoadNoMoreHistory = "LCWLazyLoadNoMoreHistory",
|
|
301
|
+
LCWLazyLoadHistoryError = "LCWLazyLoadHistoryError",
|
|
297
302
|
LCWLazyLoadDestroyed = "LCWLazyLoadDestroyed",
|
|
298
303
|
SecureEventBusUnauthorizedDispatch = "SecureEventBusUnauthorizedDispatch",
|
|
299
304
|
SecureEventBusListenerError = "SecureEventBusListenerError",
|
|
300
|
-
SecureEventBusDispatchError = "SecureEventBusDispatchError"
|
|
305
|
+
SecureEventBusDispatchError = "SecureEventBusDispatchError",
|
|
306
|
+
StartChatComplete = "StartChatComplete"
|
|
301
307
|
}
|
|
302
308
|
export interface TelemetryInput {
|
|
303
309
|
scenarioType: ScenarioType;
|
|
@@ -308,3 +314,8 @@ export declare class TelemetryConstants {
|
|
|
308
314
|
private static map;
|
|
309
315
|
static mapEventToScenario(eventTypeOrScenarioType: TelemetryEvent): ScenarioType;
|
|
310
316
|
}
|
|
317
|
+
export declare enum ConversationStage {
|
|
318
|
+
Initialization = "Initialization",
|
|
319
|
+
CSREngagement = "CSR Engagement",
|
|
320
|
+
ConversationEnd = "Conversation End"
|
|
321
|
+
}
|
|
@@ -2,6 +2,6 @@ declare enum ChatWidgetEvents {
|
|
|
2
2
|
ADD_ACTIVITY = "CHAT_WIDGET/ADD_ACTIVITY",
|
|
3
3
|
FETCH_PERSISTENT_CHAT_HISTORY = "CHAT_WIDGET/FETCH_PERSISTENT_CHAT_HISTORY",
|
|
4
4
|
NO_MORE_HISTORY_AVAILABLE = "CHAT_WIDGET/NO_MORE_HISTORY_AVAILABLE",
|
|
5
|
-
|
|
5
|
+
HISTORY_LOAD_ERROR = "CHAT_WIDGET/HISTORY_LOAD_ERROR"
|
|
6
6
|
}
|
|
7
7
|
export default ChatWidgetEvents;
|
|
@@ -4,4 +4,5 @@ import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetA
|
|
|
4
4
|
import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
|
|
5
5
|
export declare const handleStartChatError: (dispatch: Dispatch<ILiveChatWidgetAction>, facadeChatSDK: FacadeChatSDK, props: ILiveChatWidgetProps | undefined, ex: any, isStartChatSuccessful: boolean) => void;
|
|
6
6
|
export declare const logWidgetLoadComplete: (additionalMessage?: string) => void;
|
|
7
|
+
export declare const logStartChatComplete: (additionalMessage?: string) => void;
|
|
7
8
|
export declare const logWidgetLoadWithUnexpectedError: (ex: any) => void;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { IStyle } from "@fluentui/react";
|
|
2
2
|
export interface IPersistentChatHistoryProps {
|
|
3
|
-
persistentChatHistoryEnabled?: boolean;
|
|
4
3
|
pageSize?: number;
|
|
5
4
|
dividerActivityStyle?: IStyle;
|
|
5
|
+
/**
|
|
6
|
+
* Accessible label announced by screen readers for the conversation divider element.
|
|
7
|
+
* If not supplied, a default provided in defaultPersistentChatHistoryProps will be used.
|
|
8
|
+
*/
|
|
9
|
+
dividerActivityAriaLabel?: string;
|
|
6
10
|
bannerStyle?: IStyle;
|
|
7
11
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface ExtendedChatConfig {
|
|
2
|
+
LcwFcbConfiguration?: LcwFcbConfiguration;
|
|
3
|
+
LiveChatConfigAuthSettings?: LiveChatConfigAuthSettings;
|
|
4
|
+
LiveWSAndLiveChatEngJoin?: {
|
|
5
|
+
msdyn_conversationmode?: string;
|
|
6
|
+
msdyn_enablepersistentchatpreviousconversations?: boolean;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
interface LcwFcbConfiguration {
|
|
10
|
+
lcwPersistentChatHistoryEnabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
interface LiveChatConfigAuthSettings {
|
|
13
|
+
msdyn_javascriptclientfunction?: string;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
package/lib/types/components/webchatcontainerstateful/webchatcontroller/WebChatEventSubscribers.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { IPersistentChatHistoryProps } from "../../livechatwidget/interfaces/IPersistentChatHistoryProps";
|
|
2
1
|
/**
|
|
3
2
|
* Component to handle persistent chat history events.
|
|
4
3
|
* Uses WebChatStoreLoader instead of hooks to avoid context issues.
|
|
5
4
|
*/
|
|
6
|
-
declare const WebChatEventSubscribers: (
|
|
5
|
+
declare const WebChatEventSubscribers: () => null;
|
|
7
6
|
export default WebChatEventSubscribers;
|
|
@@ -53,7 +53,7 @@ declare class LazyLoadHandler {
|
|
|
53
53
|
static paused: boolean;
|
|
54
54
|
static observer: IntersectionObserver | null;
|
|
55
55
|
private static scrollState;
|
|
56
|
-
|
|
56
|
+
static pendingScrollAction: boolean;
|
|
57
57
|
private static retryTimeouts;
|
|
58
58
|
static resetPending: boolean;
|
|
59
59
|
private static initTimer;
|
|
@@ -6,5 +6,6 @@
|
|
|
6
6
|
* 2. Changes the font size of user messages
|
|
7
7
|
* 3. Decodes certain html characters that came through from chat services
|
|
8
8
|
******/
|
|
9
|
+
import { ILiveChatWidgetLocalizedTexts } from "../../../../../contexts/common/ILiveChatWidgetLocalizedTexts";
|
|
9
10
|
import React from "react";
|
|
10
|
-
export declare const createActivityMiddleware: (renderMarkdown: (text: string) => string, systemMessageStyleProps?: React.CSSProperties, userMessageStyleProps?: React.CSSProperties) => () => (next: any) => (...args: any) => any;
|
|
11
|
+
export declare const createActivityMiddleware: (renderMarkdown: (text: string) => string, systemMessageStyleProps?: React.CSSProperties, userMessageStyleProps?: React.CSSProperties, localizedTexts?: ILiveChatWidgetLocalizedTexts) => () => (next: any) => (...args: any) => any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IWebChatAction } from "../../../interfaces/IWebChatAction";
|
|
2
|
-
export declare const localizedStringsBotInitialsMiddleware: () => ({ dispatch }: {
|
|
2
|
+
export declare const localizedStringsBotInitialsMiddleware: (onInitialsChange?: (initials: string) => void) => ({ dispatch }: {
|
|
3
3
|
dispatch: any;
|
|
4
4
|
}) => (next: any) => (action: IWebChatAction) => any;
|
|
5
5
|
export declare const getOverriddenLocalizedStrings: (existingOverrides?: any) => (strings: any) => any;
|
|
@@ -26,6 +26,7 @@ export interface ILiveChatWidgetContext {
|
|
|
26
26
|
confirmationPaneConfirmedOptionClicked: boolean;
|
|
27
27
|
confirmationState: ConfirmationState;
|
|
28
28
|
startChatFailureType: StartChatFailureType;
|
|
29
|
+
botAvatarInitials?: string;
|
|
29
30
|
};
|
|
30
31
|
appStates: {
|
|
31
32
|
conversationState: ConversationState;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
export interface ILiveChatWidgetLocalizedTexts {
|
|
2
2
|
PREVIOUS_MESSAGES_LOADING?: string;
|
|
3
|
+
/**
|
|
4
|
+
* Aria label announced by screen readers for the conversation history divider element.
|
|
5
|
+
* e.g. "Conversation history divider" or localized equivalent.
|
|
6
|
+
*/
|
|
7
|
+
CONVERSATION_DIVIDER_ARIA_LABEL?: string;
|
|
3
8
|
MIDDLEWARE_BANNER_FILE_NULL_ERROR?: string;
|
|
4
9
|
MIDDLEWARE_BANNER_FILE_SIZE_WITHOUT_EXTENSION_ERROR?: string;
|
|
5
10
|
MIDDLEWARE_BANNER_FILE_SIZE_EXTENSION_ERROR?: string;
|
|
@@ -47,5 +47,6 @@ export declare enum LiveChatWidgetActionType {
|
|
|
47
47
|
SET_POST_CHAT_PARTICIPANT_TYPE = 45,
|
|
48
48
|
SET_CONVERSATIONAL_SURVEY_ENABLED = 46,
|
|
49
49
|
SET_CONVERSATIONAL_SURVEY_DISPLAY = 47,
|
|
50
|
-
GET_IN_MEMORY_STATE = 48
|
|
50
|
+
GET_IN_MEMORY_STATE = 48,
|
|
51
|
+
SET_BOT_AVATAR_INITIALS = 49
|
|
51
52
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/omnichannel-chat-widget",
|
|
3
|
-
"version": "1.8.4-main.
|
|
3
|
+
"version": "1.8.4-main.9ae37a9",
|
|
4
4
|
"description": "Microsoft Omnichannel Chat Widget",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"types": "lib/types/index.d.ts",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"dependencies": {
|
|
87
87
|
"@azure/core-tracing": "^1.2.0",
|
|
88
88
|
"@microsoft/applicationinsights-web": "^3.3.6",
|
|
89
|
-
"@microsoft/omnichannel-chat-components": "1.1.
|
|
89
|
+
"@microsoft/omnichannel-chat-components": "1.1.16",
|
|
90
90
|
"@microsoft/omnichannel-chat-sdk": "^1.11.7-main.3418dc3",
|
|
91
91
|
"@opentelemetry/api": "^1.9.0",
|
|
92
92
|
"abort-controller": "^3",
|