@microsoft/omnichannel-chat-widget 0.1.0-main.edd8c2a → 0.1.0-main.fb426ed
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 +227 -0
- package/lib/cjs/assets/Audios.js +8 -0
- package/lib/cjs/assets/Icons.js +28 -0
- package/lib/cjs/common/Constants.js +38 -4
- package/lib/cjs/common/contextDataStore/DataStoreManager.js +14 -0
- package/lib/cjs/{assets/assets.d.js → common/interfaces/IContextDataStore.js} +0 -0
- package/lib/cjs/common/telemetry/TelemetryConstants.js +42 -3
- package/lib/cjs/common/telemetry/TelemetryHelper.js +22 -4
- package/lib/cjs/common/telemetry/TelemetryManager.js +28 -9
- package/lib/cjs/common/telemetry/defaultConfigs/defaultAriaConfig.js +3 -3
- package/lib/cjs/common/telemetry/defaultConfigs/defaultTelemetryConfiguration.js +4 -1
- package/lib/cjs/common/telemetry/loggers/ariaTelemetryLogger.js +48 -15
- package/lib/cjs/common/telemetry/loggers/consoleLogger.js +9 -5
- package/lib/cjs/common/utils.js +16 -2
- package/lib/cjs/components/callingcontainerstateful/CallingContainerStateful.js +14 -0
- package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +1 -1
- package/lib/cjs/components/confirmationpanestateful/ConfirmationPaneStateful.js +8 -54
- package/lib/cjs/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +2 -2
- package/lib/cjs/components/footerstateful/FooterStateful.js +4 -5
- package/lib/cjs/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +1 -1
- package/lib/cjs/components/headerstateful/HeaderStateful.js +11 -8
- package/lib/cjs/components/livechatwidget/common/createMarkdown.js +3 -4
- package/lib/cjs/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +18 -22
- package/lib/cjs/components/livechatwidget/common/disposeTelemetryLoggers.js +14 -0
- package/lib/cjs/components/livechatwidget/common/endChat.js +103 -50
- package/lib/cjs/components/livechatwidget/common/initCallingSdk.js +5 -0
- package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +33 -9
- package/lib/cjs/components/livechatwidget/common/reconnectChatHelper.js +105 -20
- package/lib/cjs/components/livechatwidget/common/registerTelemetryLoggers.js +11 -7
- package/lib/cjs/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +26 -24
- package/lib/cjs/components/livechatwidget/common/startChat.js +128 -54
- package/lib/cjs/components/livechatwidget/common/startProactiveChat.js +3 -3
- package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +120 -33
- package/lib/cjs/components/loadingpanestateful/LoadingPaneStateful.js +1 -1
- package/lib/cjs/components/ooohpanestateful/OOOHPaneStateful.js +8 -0
- package/lib/cjs/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +8 -0
- package/lib/cjs/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +25 -10
- package/lib/cjs/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +10 -4
- package/lib/cjs/components/proactivechatpanestateful/interfaces/IProactiveChatNotificationConfig.js +1 -0
- package/lib/cjs/components/webchatcontainerstateful/common/mockchatsdk.js +4 -0
- package/lib/cjs/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.js +51 -73
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +9 -46
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +3 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.js +6 -6
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.js +45 -0
- package/lib/cjs/contexts/common/ConversationState.js +3 -2
- package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +10 -7
- package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +10 -3
- package/lib/cjs/contexts/createReducer.js +28 -10
- package/lib/cjs/controller/componentController.js +2 -2
- package/lib/cjs/plugins/newMessageEventHandler.js +99 -0
- package/lib/esm/assets/Audios.js +1 -0
- package/lib/esm/assets/Icons.js +11 -0
- package/lib/esm/common/Constants.js +34 -3
- package/lib/esm/common/contextDataStore/DataStoreManager.js +5 -0
- package/lib/esm/common/interfaces/IContextDataStore.js +1 -0
- package/lib/esm/common/telemetry/TelemetryConstants.js +38 -2
- package/lib/esm/common/telemetry/TelemetryHelper.js +22 -5
- package/lib/esm/common/telemetry/TelemetryManager.js +22 -9
- package/lib/esm/common/telemetry/defaultConfigs/defaultAriaConfig.js +3 -3
- package/lib/esm/common/telemetry/defaultConfigs/defaultTelemetryConfiguration.js +4 -1
- package/lib/esm/common/telemetry/loggers/ariaTelemetryLogger.js +50 -15
- package/lib/esm/common/telemetry/loggers/consoleLogger.js +9 -5
- package/lib/esm/common/utils.js +12 -1
- package/lib/esm/components/callingcontainerstateful/CallingContainerStateful.js +14 -0
- package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +1 -1
- package/lib/esm/components/confirmationpanestateful/ConfirmationPaneStateful.js +8 -50
- package/lib/esm/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +2 -2
- package/lib/esm/components/footerstateful/FooterStateful.js +4 -5
- package/lib/esm/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +1 -1
- package/lib/esm/components/headerstateful/HeaderStateful.js +12 -9
- package/lib/esm/components/livechatwidget/common/createMarkdown.js +3 -3
- package/lib/esm/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +16 -23
- package/lib/esm/components/livechatwidget/common/disposeTelemetryLoggers.js +4 -0
- package/lib/esm/components/livechatwidget/common/endChat.js +101 -47
- package/lib/esm/components/livechatwidget/common/initCallingSdk.js +3 -0
- package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +29 -9
- package/lib/esm/components/livechatwidget/common/reconnectChatHelper.js +94 -20
- package/lib/esm/components/livechatwidget/common/registerTelemetryLoggers.js +10 -3
- package/lib/esm/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +23 -22
- package/lib/esm/components/livechatwidget/common/startChat.js +123 -51
- package/lib/esm/components/livechatwidget/common/startProactiveChat.js +5 -5
- package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +111 -34
- package/lib/esm/components/loadingpanestateful/LoadingPaneStateful.js +1 -1
- package/lib/esm/components/ooohpanestateful/OOOHPaneStateful.js +6 -0
- package/lib/esm/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +6 -0
- package/lib/esm/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +23 -9
- package/lib/esm/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +9 -5
- package/lib/esm/components/proactivechatpanestateful/interfaces/IProactiveChatNotificationConfig.js +1 -0
- package/lib/esm/components/webchatcontainerstateful/common/mockchatsdk.js +4 -0
- package/lib/esm/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.js +2 -12
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +7 -44
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +2 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.js +6 -6
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.js +32 -0
- package/lib/esm/contexts/common/ConversationState.js +3 -2
- package/lib/esm/contexts/common/LiveChatWidgetActionType.js +10 -7
- package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +10 -3
- package/lib/esm/contexts/createReducer.js +28 -9
- package/lib/esm/controller/componentController.js +2 -2
- package/lib/esm/plugins/newMessageEventHandler.js +82 -0
- package/lib/types/assets/Audios.d.ts +1 -0
- package/lib/types/assets/Icons.d.ts +11 -0
- package/lib/types/common/Constants.d.ts +19 -1
- package/lib/types/common/contextDataStore/DataStoreManager.d.ts +4 -0
- package/lib/types/common/interfaces/IContextDataStore.d.ts +14 -0
- package/lib/types/common/telemetry/TelemetryConstants.d.ts +27 -1
- package/lib/types/common/telemetry/TelemetryHelper.d.ts +2 -0
- package/lib/types/common/telemetry/TelemetryManager.d.ts +1 -0
- package/lib/types/common/telemetry/definitions/Contracts.d.ts +3 -0
- package/lib/types/common/telemetry/definitions/Payload.d.ts +15 -9
- package/lib/types/common/telemetry/interfaces/IChatSDKLogger.d.ts +1 -0
- package/lib/types/common/telemetry/interfaces/IInternalTelemetryData.d.ts +2 -0
- package/lib/types/common/telemetry/interfaces/ITelemetryConfig.d.ts +12 -0
- package/lib/types/common/utils.d.ts +1 -0
- package/lib/types/components/confirmationpanestateful/interfaces/IConfirmationPaneStatefulParams.d.ts +5 -2
- package/lib/types/components/footerstateful/audionotificationstateful/interfaces/IAudioNotificationStatefulParams.d.ts +0 -1
- package/lib/types/components/headerstateful/interfaces/IHeaderStatefulParams.d.ts +4 -1
- package/lib/types/components/livechatwidget/common/disposeTelemetryLoggers.d.ts +1 -0
- package/lib/types/components/livechatwidget/common/endChat.d.ts +4 -1
- package/lib/types/components/livechatwidget/common/reconnectChatHelper.d.ts +5 -2
- package/lib/types/components/livechatwidget/common/setPostChatContextAndLoadSurvey.d.ts +1 -1
- package/lib/types/components/livechatwidget/common/startChat.d.ts +1 -1
- package/lib/types/components/livechatwidget/common/startProactiveChat.d.ts +2 -1
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetComponentOverrides.d.ts +1 -0
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +3 -1
- package/lib/types/components/prechatsurveypanestateful/interfaces/IPreChatSurveyPaneStatefulParams.d.ts +1 -1
- package/lib/types/components/proactivechatpanestateful/interfaces/IProactiveChatNotificationConfig.d.ts +3 -0
- package/lib/types/components/reconnectchatpanestateful/interfaces/IReconnectChatPaneStatefulProps.d.ts +1 -0
- package/lib/types/components/webchatcontainerstateful/common/mockchatsdk.d.ts +1 -0
- package/lib/types/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.d.ts +1 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.d.ts +0 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.d.ts +1 -0
- package/lib/types/contexts/common/ConversationState.d.ts +3 -2
- package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +3 -0
- package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +11 -8
- package/lib/types/plugins/newMessageEventHandler.d.ts +2 -0
- package/package.json +11 -11
- package/lib/cjs/assets/audios/newMessageNotification.mp3 +0 -0
- package/lib/cjs/assets/icons/archiveIcon.svg +0 -3
- package/lib/cjs/assets/icons/audioIcon.svg +0 -6
- package/lib/cjs/assets/icons/blankIcon.svg +0 -6
- package/lib/cjs/assets/icons/excelIcon.svg +0 -6
- package/lib/cjs/assets/icons/imageIcon.svg +0 -6
- package/lib/cjs/assets/icons/oneNoteIcon.svg +0 -6
- package/lib/cjs/assets/icons/pdfIcon.svg +0 -6
- package/lib/cjs/assets/icons/powerpointIcon.svg +0 -6
- package/lib/cjs/assets/icons/videoIcon.svg +0 -6
- package/lib/cjs/assets/icons/visioIcon.svg +0 -6
- package/lib/cjs/assets/icons/wordIcon.svg +0 -6
- package/lib/esm/assets/assets.d.js +0 -0
- package/lib/esm/assets/audios/newMessageNotification.mp3 +0 -0
- package/lib/esm/assets/icons/archiveIcon.svg +0 -3
- package/lib/esm/assets/icons/audioIcon.svg +0 -6
- package/lib/esm/assets/icons/blankIcon.svg +0 -6
- package/lib/esm/assets/icons/excelIcon.svg +0 -6
- package/lib/esm/assets/icons/imageIcon.svg +0 -6
- package/lib/esm/assets/icons/oneNoteIcon.svg +0 -6
- package/lib/esm/assets/icons/pdfIcon.svg +0 -6
- package/lib/esm/assets/icons/powerpointIcon.svg +0 -6
- package/lib/esm/assets/icons/videoIcon.svg +0 -6
- package/lib/esm/assets/icons/visioIcon.svg +0 -6
- package/lib/esm/assets/icons/wordIcon.svg +0 -6
|
@@ -26,7 +26,7 @@ export const ChatButtonStateful = props => {
|
|
|
26
26
|
dir: state.domainStates.globalDir,
|
|
27
27
|
titleText: "Let's Chat!",
|
|
28
28
|
subtitleText: "We're online.",
|
|
29
|
-
hideNotificationBubble:
|
|
29
|
+
hideNotificationBubble: (buttonProps === null || buttonProps === void 0 ? void 0 : (_buttonProps$controlP = buttonProps.controlProps) === null || _buttonProps$controlP === void 0 ? void 0 : _buttonProps$controlP.hideNotificationBubble) === true || state.appStates.isMinimized === false,
|
|
30
30
|
unreadMessageCount: state.appStates.unreadMessageCount ? state.appStates.unreadMessageCount > Constants.maximumUnreadMessageCount ? Constants.maximumUnreadMessageCount.toString() + "+" : state.appStates.unreadMessageCount.toString() : "0",
|
|
31
31
|
onClick: async () => {
|
|
32
32
|
TelemetryHelper.logActionEvent(LogLevel.INFO, {
|
|
@@ -1,40 +1,30 @@
|
|
|
1
1
|
import { LogLevel, TelemetryEvent } from "../../common/telemetry/TelemetryConstants";
|
|
2
|
+
import { ConfirmationPane } from "@microsoft/omnichannel-chat-components";
|
|
2
3
|
import React, { useEffect } from "react";
|
|
3
4
|
import { findAllFocusableElement, findParentFocusableElementsWithoutChildContainer, preventFocusToMoveOutOfElement, setFocusOnElement, setFocusOnSendBox, setTabIndices } from "../../common/utils";
|
|
4
|
-
import { ConfirmationPane } from "@microsoft/omnichannel-chat-components";
|
|
5
|
-
import { Constants } from "../../common/Constants";
|
|
6
|
-
import { ConversationState } from "../../contexts/common/ConversationState";
|
|
7
5
|
import { DimLayer } from "../dimlayer/DimLayer";
|
|
8
6
|
import { LiveChatWidgetActionType } from "../../contexts/common/LiveChatWidgetActionType";
|
|
9
7
|
import { NotificationHandler } from "../webchatcontainerstateful/webchatcontroller/notification/NotificationHandler";
|
|
10
8
|
import { NotificationScenarios } from "../webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios";
|
|
11
|
-
import { PostChatSurveyMode } from "../postchatsurveypanestateful/enums/PostChatSurveyMode";
|
|
12
9
|
import { TelemetryHelper } from "../../common/telemetry/TelemetryHelper";
|
|
13
10
|
import useChatAdapterStore from "../../hooks/useChatAdapterStore";
|
|
14
|
-
import useChatContextStore from "../../hooks/useChatContextStore";
|
|
15
|
-
import useChatSDKStore from "../../hooks/useChatSDKStore"; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11
|
+
import useChatContextStore from "../../hooks/useChatContextStore"; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
12
|
|
|
17
13
|
export const ConfirmationPaneStateful = props => {
|
|
18
|
-
var _state$domainStates$l, _state$domainStates$l2, _state$domainStates$l3, _state$domainStates$l4;
|
|
19
|
-
|
|
20
14
|
const initialTabIndexMap = new Map();
|
|
21
15
|
let elements = [];
|
|
22
16
|
const [state, dispatch] = useChatContextStore();
|
|
23
17
|
const {
|
|
24
|
-
|
|
25
|
-
endChat
|
|
18
|
+
prepareEndChat
|
|
26
19
|
} = props; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27
|
-
|
|
28
|
-
const chatSDK = useChatSDKStore(); // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
29
21
|
|
|
30
22
|
const [adapter] = useChatAdapterStore();
|
|
31
|
-
const isPostChatEnabled = (_state$domainStates$l = state.domainStates.liveChatConfig) === null || _state$domainStates$l === void 0 ? void 0 : (_state$domainStates$l2 = _state$domainStates$l.LiveWSAndLiveChatEngJoin) === null || _state$domainStates$l2 === void 0 ? void 0 : _state$domainStates$l2.msdyn_postconversationsurveyenable;
|
|
32
|
-
const postChatSurveyMode = (_state$domainStates$l3 = state.domainStates.liveChatConfig) === null || _state$domainStates$l3 === void 0 ? void 0 : (_state$domainStates$l4 = _state$domainStates$l3.LiveWSAndLiveChatEngJoin) === null || _state$domainStates$l4 === void 0 ? void 0 : _state$domainStates$l4.msdyn_postconversationsurveymode;
|
|
33
23
|
const controlProps = {
|
|
34
24
|
id: "oc-lcw-confirmation-pane",
|
|
35
25
|
dir: state.domainStates.globalDir,
|
|
36
26
|
onConfirm: async () => {
|
|
37
|
-
TelemetryHelper.
|
|
27
|
+
TelemetryHelper.logActionEvent(LogLevel.INFO, {
|
|
38
28
|
Event: TelemetryEvent.ConfirmationConfirmButtonClicked,
|
|
39
29
|
Description: "Confirmation pane Confirm button clicked"
|
|
40
30
|
});
|
|
@@ -44,40 +34,8 @@ export const ConfirmationPaneStateful = props => {
|
|
|
44
34
|
});
|
|
45
35
|
|
|
46
36
|
try {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
if (isPostChatEnabled === "true" && postChatSurveyMode === PostChatSurveyMode.Embed && conversationDetails.canRenderPostChat === Constants.truePascal) {
|
|
51
|
-
dispatch({
|
|
52
|
-
type: LiveChatWidgetActionType.SET_SHOULD_SHOW_POST_CHAT,
|
|
53
|
-
payload: true
|
|
54
|
-
});
|
|
55
|
-
dispatch({
|
|
56
|
-
type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
57
|
-
payload: ConversationState.Loading
|
|
58
|
-
});
|
|
59
|
-
await setPostChatContext();
|
|
60
|
-
|
|
61
|
-
if (state.domainStates.postChatContext) {
|
|
62
|
-
dispatch({
|
|
63
|
-
type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
64
|
-
payload: ConversationState.Postchat
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
} else {
|
|
68
|
-
setTabIndices(elements, initialTabIndexMap, true);
|
|
69
|
-
|
|
70
|
-
try {
|
|
71
|
-
await endChat(adapter);
|
|
72
|
-
} catch (error) {
|
|
73
|
-
TelemetryHelper.logSDKEvent(LogLevel.ERROR, {
|
|
74
|
-
Event: TelemetryEvent.CloseChatMethodException,
|
|
75
|
-
ExceptionDetails: {
|
|
76
|
-
exception: `Failed to endChat: ${error}`
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
}
|
|
37
|
+
setTabIndices(elements, initialTabIndexMap, true);
|
|
38
|
+
await prepareEndChat(adapter, state);
|
|
81
39
|
} catch (ex) {
|
|
82
40
|
TelemetryHelper.logSDKEvent(LogLevel.ERROR, {
|
|
83
41
|
Event: TelemetryEvent.GetConversationDetailsCallFailed,
|
|
@@ -89,7 +47,7 @@ export const ConfirmationPaneStateful = props => {
|
|
|
89
47
|
}
|
|
90
48
|
},
|
|
91
49
|
onCancel: () => {
|
|
92
|
-
TelemetryHelper.
|
|
50
|
+
TelemetryHelper.logActionEvent(LogLevel.INFO, {
|
|
93
51
|
Event: TelemetryEvent.ConfirmationCancelButtonClicked,
|
|
94
52
|
Description: "Confirmation pane Cancel button clicked."
|
|
95
53
|
});
|
|
@@ -68,8 +68,8 @@ export const EmailTranscriptPaneStateful = props => {
|
|
|
68
68
|
},
|
|
69
69
|
onCancel: () => {
|
|
70
70
|
TelemetryHelper.logActionEvent(LogLevel.INFO, {
|
|
71
|
-
Event: TelemetryEvent.
|
|
72
|
-
Description: "Email Transcript button clicked."
|
|
71
|
+
Event: TelemetryEvent.EmailTranscriptCancelButtonClicked,
|
|
72
|
+
Description: "Email Transcript cancel button clicked."
|
|
73
73
|
});
|
|
74
74
|
closeEmailTranscriptPane();
|
|
75
75
|
},
|
|
@@ -4,13 +4,13 @@ import AudioNotificationStateful from "./audionotificationstateful/AudioNotifica
|
|
|
4
4
|
import { Constants } from "../../common/Constants";
|
|
5
5
|
import { Footer } from "@microsoft/omnichannel-chat-components";
|
|
6
6
|
import { LiveChatWidgetActionType } from "../../contexts/common/LiveChatWidgetActionType";
|
|
7
|
+
import { NewMessageNotificationSoundBase64 } from "../../assets/Audios";
|
|
7
8
|
import { NotificationHandler } from "../webchatcontainerstateful/webchatcontroller/notification/NotificationHandler";
|
|
8
9
|
import { NotificationScenarios } from "../webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios";
|
|
9
10
|
import { TelemetryHelper } from "../../common/telemetry/TelemetryHelper";
|
|
10
11
|
import { downloadTranscript } from "./downloadtranscriptstateful/DownloadTranscriptStateful";
|
|
11
12
|
import useChatContextStore from "../../hooks/useChatContextStore";
|
|
12
|
-
import useChatSDKStore from "../../hooks/useChatSDKStore";
|
|
13
|
-
import newMessageNotification from "../../assets/audios/newMessageNotification.mp3"; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13
|
+
import useChatSDKStore from "../../hooks/useChatSDKStore"; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14
14
|
|
|
15
15
|
export const FooterStateful = props => {
|
|
16
16
|
var _footerProps$controlP3, _footerProps$controlP4;
|
|
@@ -96,9 +96,8 @@ export const FooterStateful = props => {
|
|
|
96
96
|
controlProps: controlProps,
|
|
97
97
|
styleProps: footerProps === null || footerProps === void 0 ? void 0 : footerProps.styleProps
|
|
98
98
|
}), /*#__PURE__*/React.createElement(AudioNotificationStateful, {
|
|
99
|
-
audioSrc: (audioNotificationProps === null || audioNotificationProps === void 0 ? void 0 : audioNotificationProps.audioSrc) ??
|
|
100
|
-
|
|
101
|
-
isAudioMuted: state.appStates.isAudioMuted ?? false
|
|
99
|
+
audioSrc: (audioNotificationProps === null || audioNotificationProps === void 0 ? void 0 : audioNotificationProps.audioSrc) ?? NewMessageNotificationSoundBase64,
|
|
100
|
+
isAudioMuted: state.appStates.isAudioMuted === null ? (footerProps === null || footerProps === void 0 ? void 0 : (_footerProps$controlP4 = footerProps.controlProps) === null || _footerProps$controlP4 === void 0 ? void 0 : _footerProps$controlP4.hideAudioNotificationButton) ?? false : state.appStates.isAudioMuted ?? false
|
|
102
101
|
}));
|
|
103
102
|
};
|
|
104
103
|
export default FooterStateful;
|
package/lib/esm/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js
CHANGED
|
@@ -127,7 +127,7 @@ const beautifyChatTranscripts = (chatTranscripts, renderMarkDown, attachmentMess
|
|
|
127
127
|
|
|
128
128
|
if (value.attachments && value.attachments.length > 0 && value.attachments[0].name) {
|
|
129
129
|
fileAttachmentName = value.attachments[0].name;
|
|
130
|
-
value.content = attachmentMessage
|
|
130
|
+
value.content = attachmentMessage ? attachmentMessage + " " + fileAttachmentName : "The following attachment was uploaded during the conversation: " + fileAttachmentName;
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LogLevel, TelemetryEvent } from "../../common/telemetry/TelemetryConstants";
|
|
2
|
-
import React, { useEffect, useState } from "react";
|
|
2
|
+
import React, { useEffect, useRef, useState } from "react";
|
|
3
3
|
import { ConversationState } from "../../contexts/common/ConversationState";
|
|
4
4
|
import { Header } from "@microsoft/omnichannel-chat-components";
|
|
5
5
|
import { LiveChatWidgetActionType } from "../../contexts/common/LiveChatWidgetActionType";
|
|
@@ -21,6 +21,7 @@ export const HeaderStateful = props => {
|
|
|
21
21
|
|
|
22
22
|
const [outOfOperatingHours, setOutOfOperatingHours] = useState(((_state$domainStates$l = state.domainStates.liveChatConfig) === null || _state$domainStates$l === void 0 ? void 0 : (_state$domainStates$l2 = _state$domainStates$l.LiveWSAndLiveChatEngJoin) === null || _state$domainStates$l2 === void 0 ? void 0 : _state$domainStates$l2.OutOfOperatingHours) === "True");
|
|
23
23
|
const outOfOfficeStyleProps = Object.assign({}, defaultOutOfOfficeHeaderStyleProps, outOfOfficeHeaderProps === null || outOfOfficeHeaderProps === void 0 ? void 0 : outOfOfficeHeaderProps.styleProps);
|
|
24
|
+
const conversationState = useRef(state.appStates.conversationState);
|
|
24
25
|
const controlProps = {
|
|
25
26
|
id: "oc-lcw-header",
|
|
26
27
|
dir: state.domainStates.globalDir,
|
|
@@ -40,17 +41,15 @@ export const HeaderStateful = props => {
|
|
|
40
41
|
Description: "Header Close button clicked."
|
|
41
42
|
});
|
|
42
43
|
|
|
43
|
-
if (
|
|
44
|
+
if (conversationState.current === ConversationState.Active) {
|
|
44
45
|
dispatch({
|
|
45
46
|
type: LiveChatWidgetActionType.SET_SHOW_CONFIRMATION,
|
|
46
47
|
payload: true
|
|
47
48
|
});
|
|
48
|
-
} else
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
});
|
|
53
|
-
await endChat(adapter);
|
|
49
|
+
} else {
|
|
50
|
+
const skipEndChatSDK = true;
|
|
51
|
+
const skipCloseChat = false;
|
|
52
|
+
await endChat(adapter, skipEndChatSDK, skipCloseChat);
|
|
54
53
|
}
|
|
55
54
|
|
|
56
55
|
dispatch({
|
|
@@ -82,7 +81,11 @@ export const HeaderStateful = props => {
|
|
|
82
81
|
if (state.appStates.outsideOperatingHours) {
|
|
83
82
|
setOutOfOperatingHours(true);
|
|
84
83
|
}
|
|
85
|
-
|
|
84
|
+
|
|
85
|
+
if (state.appStates.conversationState) {
|
|
86
|
+
conversationState.current = state.appStates.conversationState;
|
|
87
|
+
}
|
|
88
|
+
}, [state.appStates]);
|
|
86
89
|
return /*#__PURE__*/React.createElement(Header, {
|
|
87
90
|
componentOverrides: headerProps === null || headerProps === void 0 ? void 0 : headerProps.componentOverrides,
|
|
88
91
|
controlProps: outOfOperatingHours || state.appStates.conversationState === ConversationState.OutOfOffice ? outOfOfficeControlProps : controlProps,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import MarkdownIt from "markdown-it";
|
|
2
|
-
import MarkdownSlack from "slack-markdown-it";
|
|
3
2
|
import MarkdownItForInline from "markdown-it-for-inline";
|
|
4
3
|
import { defaultMarkdownLocalizedTexts } from "../../webchatcontainerstateful/common/defaultProps/defaultMarkdownLocalizedTexts";
|
|
5
4
|
import { Constants } from "../../../common/Constants"; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -12,8 +11,9 @@ export const createMarkdown = (disableMarkdownMessageFormatting, disableNewLineM
|
|
|
12
11
|
html: true,
|
|
13
12
|
linkify: true,
|
|
14
13
|
breaks: !disableNewLineMarkdownSupport
|
|
15
|
-
});
|
|
16
|
-
markdown.use(MarkdownSlack);
|
|
14
|
+
}); // ToDo: Commenting below usage of plugin until deferred bug is resolved: https://github.com/mayashavin/markdown-it-slack/issues/1
|
|
15
|
+
// markdown.use(MarkdownSlack);
|
|
16
|
+
// Markdown override for open link in new tab
|
|
17
17
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, quotes
|
|
18
18
|
|
|
19
19
|
markdown.use(MarkdownItForInline, "url_new_win", "link_open", function (tokens, idx, env) {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-empty-function, @typescript-eslint/no-explicit-any */
|
|
2
|
+
import { ChatReconnectIconBase64, CloseChatButtonIconBase64, ModernChatIconBase64, ProactiveChatBannerBase64 } from "@microsoft/omnichannel-chat-components";
|
|
2
3
|
import MockAdapter from "../../../webchatcontainerstateful/common/mockadapter";
|
|
4
|
+
import { NewMessageNotificationSoundBase64 } from "../../../../assets/Audios";
|
|
3
5
|
import { WebChatStoreLoader } from "../../../webchatcontainerstateful/webchatcontroller/WebChatStoreLoader";
|
|
4
6
|
import { activityStatusMiddleware } from "../../../webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware";
|
|
5
7
|
import { createActivityMiddleware } from "../../../webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware";
|
|
@@ -7,11 +9,12 @@ import createAttachmentMiddleware from "../../../webchatcontainerstateful/webcha
|
|
|
7
9
|
import { createAvatarMiddleware } from "../../../webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/avatarMiddleware";
|
|
8
10
|
import { createMarkdown } from "../createMarkdown";
|
|
9
11
|
import { groupActivitiesMiddleware } from "../../../webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/groupActivitiesMiddleware";
|
|
10
|
-
import { typingIndicatorMiddleware } from "../../../webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/typingIndicatorMiddleware";
|
|
12
|
+
import { typingIndicatorMiddleware } from "../../../webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/typingIndicatorMiddleware";
|
|
13
|
+
import { createWebChatTelemetry } from "../../../webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger"; // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
11
14
|
|
|
12
15
|
export const dummyDefaultProps = {
|
|
13
16
|
audioNotificationProps: {
|
|
14
|
-
audioSrc:
|
|
17
|
+
audioSrc: NewMessageNotificationSoundBase64
|
|
15
18
|
},
|
|
16
19
|
callingContainerProps: {
|
|
17
20
|
controlProps: {
|
|
@@ -250,18 +253,6 @@ export const dummyDefaultProps = {
|
|
|
250
253
|
width: "50px",
|
|
251
254
|
fontSize: "18px"
|
|
252
255
|
},
|
|
253
|
-
currentCallTimerStyleProps: {
|
|
254
|
-
borderRadius: "2px",
|
|
255
|
-
margin: "1px",
|
|
256
|
-
color: "#FFFFFF",
|
|
257
|
-
paddingTop: "18px",
|
|
258
|
-
fontSize: 12,
|
|
259
|
-
fontFamily: "Segoe UI, Arial, sans-serif",
|
|
260
|
-
backgroundColor: "darkgrey",
|
|
261
|
-
height: "45px",
|
|
262
|
-
width: "50px",
|
|
263
|
-
textAlign: "center"
|
|
264
|
-
},
|
|
265
256
|
videoTileStyleProps: {
|
|
266
257
|
width: "100%",
|
|
267
258
|
marginLeft: "auto",
|
|
@@ -366,7 +357,7 @@ export const dummyDefaultProps = {
|
|
|
366
357
|
margin: "-2px -2px -2px -3px",
|
|
367
358
|
justifyContent: "center",
|
|
368
359
|
backgroundSize: "65% 65%",
|
|
369
|
-
backgroundImage:
|
|
360
|
+
backgroundImage: `url(${ModernChatIconBase64})`,
|
|
370
361
|
display: "flex",
|
|
371
362
|
backgroundRepeat: "no-repeat",
|
|
372
363
|
backgroundPosition: "center"
|
|
@@ -887,7 +878,7 @@ export const dummyDefaultProps = {
|
|
|
887
878
|
},
|
|
888
879
|
headerIconProps: {
|
|
889
880
|
id: "oc-lcw-header-icon",
|
|
890
|
-
src:
|
|
881
|
+
src: ModernChatIconBase64,
|
|
891
882
|
alt: "Chat Icon",
|
|
892
883
|
className: undefined
|
|
893
884
|
},
|
|
@@ -1012,7 +1003,7 @@ export const dummyDefaultProps = {
|
|
|
1012
1003
|
alignSelf: "auto"
|
|
1013
1004
|
},
|
|
1014
1005
|
iconImageProps: {
|
|
1015
|
-
src: "
|
|
1006
|
+
src: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxnIGZpbHRlcj0idXJsKCNmaWx0ZXIwX2lpKSI+DQo8cGF0aCBkPSJNMTUuMTk3MSAxNi4yNzI1VjI1Ljg1MjRDMTUuMTk3MSAyNy4zODExIDE1Ljg0MDEgMjcuNTIwMSAxNi45ODMyIDI3LjUyMDFMMjYuNzA4NCAyNy41NjQ5TDMxLjAwMzkgMzIuMzEyM1YyNy41NjQ5SDMxLjg5N0MzMi4xNzQzIDI3LjU2MzcgMzIuNDQ4NyAyNy41MDc3IDMyLjcwNDUgMjcuNDAwMUMzMi45NjAzIDI3LjI5MjQgMzMuMTkyNSAyNy4xMzUzIDMzLjM4NzggMjYuOTM3NUMzMy41ODMxIDI2LjczOTggMzMuNzM3NyAyNi41MDU0IDMzLjg0MjcgMjYuMjQ3N0MzMy45NDc4IDI1Ljk5IDM0LjAwMTMgMjUuNzE0IDM0LjAwMDEgMjUuNDM1NVYxNi4zMDM4QzM0LjAwMTMgMTYuMDI1NCAzMy45NDc4IDE1Ljc0OTQgMzMuODQyNyAxNS40OTE3QzMzLjczNzcgMTUuMjM0IDMzLjU4MzEgMTQuOTk5NiAzMy4zODc4IDE0LjgwMThDMzMuMTkyNSAxNC42MDQxIDMyLjk2MDMgMTQuNDQ2OSAzMi43MDQ1IDE0LjMzOTNDMzIuNDQ4NyAxNC4yMzE2IDMyLjE3NDMgMTQuMTc1NiAzMS44OTcgMTQuMTc0NEwx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iIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMTI3IDAiIHJlc3VsdD0iaGFyZEFscGhhIi8+DQo8ZmVPZmZzZXQgZHg9Ii0xIiBkeT0iLTEiLz4NCjxmZUNvbXBvc2l0ZSBpbjI9ImhhcmRBbHBoYSIgb3BlcmF0b3I9ImFyaXRobWV0aWMiIGsyPSItMSIgazM9IjEiLz4NCjxmZUNvbG9yTWF0cml4IHR5cGU9Im1hdHJpeCIgdmFsdWVzPSIwIDAgMCAwIDEgMCAwIDAgMCAxIDAgMCAwIDAgMSAwIDAgMCAwLjE2IDAiLz4NCjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW4yPSJlZmZlY3QyX2lubmVyU2hhZG93IiByZXN1bHQ9ImVmZmVjdDNfaW5uZXJTaGFkb3ciLz4NCjwvZmlsdGVyPg0KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyIiB4MT0iLTAuMzk1MDAxIiB5MT0iMjMuMTI4MiIgeDI9IjIwLjEwNTgiIHkyPSIzNy44NDc0IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+DQo8c3RvcCBzdG9wLWNvbG9yPSIjRUZFRkVGIi8+DQo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IndoaXRlIi8+DQo8L2xpbmVhckdyYWRpZW50Pg0KPC9kZWZzPg0KPC9zdmc+DQo=",
|
|
1016
1007
|
imageFit: 0,
|
|
1017
1008
|
width: "86px",
|
|
1018
1009
|
height: "86px",
|
|
@@ -1220,7 +1211,7 @@ export const dummyDefaultProps = {
|
|
|
1220
1211
|
},
|
|
1221
1212
|
headerContainerStyleProps: {
|
|
1222
1213
|
backgroundColor: "rgb(49, 95, 162)",
|
|
1223
|
-
backgroundImage:
|
|
1214
|
+
backgroundImage: `url(${ProactiveChatBannerBase64})`,
|
|
1224
1215
|
backgroundPosition: "initial",
|
|
1225
1216
|
backgroundRepeat: "no-repeat",
|
|
1226
1217
|
borderTopLeftRadius: "inherit",
|
|
@@ -1248,7 +1239,7 @@ export const dummyDefaultProps = {
|
|
|
1248
1239
|
fontWeight: "600"
|
|
1249
1240
|
},
|
|
1250
1241
|
closeButtonStyleProps: {
|
|
1251
|
-
backgroundImage:
|
|
1242
|
+
backgroundImage: `url(${CloseChatButtonIconBase64})`,
|
|
1252
1243
|
backgroundPosition: "center",
|
|
1253
1244
|
backgroundRepeat: "no-repeat",
|
|
1254
1245
|
color: "#605e5c",
|
|
@@ -1371,7 +1362,7 @@ export const dummyDefaultProps = {
|
|
|
1371
1362
|
lineHeight: "19px"
|
|
1372
1363
|
},
|
|
1373
1364
|
iconStyleProps: {
|
|
1374
|
-
backgroundImage:
|
|
1365
|
+
backgroundImage: `url(${ChatReconnectIconBase64})`,
|
|
1375
1366
|
backgroundPosition: "center",
|
|
1376
1367
|
backgroundRepeat: "no-repeat",
|
|
1377
1368
|
backgroundSize: "200px",
|
|
@@ -1422,7 +1413,8 @@ export const dummyDefaultProps = {
|
|
|
1422
1413
|
},
|
|
1423
1414
|
authClientFunction: undefined,
|
|
1424
1415
|
isReconnectEnabled: undefined,
|
|
1425
|
-
reconnectId: undefined
|
|
1416
|
+
reconnectId: undefined,
|
|
1417
|
+
redirectInSameWindow: undefined
|
|
1426
1418
|
},
|
|
1427
1419
|
styleProps: {
|
|
1428
1420
|
generalStyles: {
|
|
@@ -1494,7 +1486,7 @@ export const dummyDefaultProps = {
|
|
|
1494
1486
|
internalErrorBoxClass: undefined,
|
|
1495
1487
|
internalRenderErrorBox: undefined,
|
|
1496
1488
|
locale: "en-US",
|
|
1497
|
-
onTelemetry:
|
|
1489
|
+
onTelemetry: createWebChatTelemetry(),
|
|
1498
1490
|
overrideLocalizedStrings: undefined,
|
|
1499
1491
|
renderMarkdown: createMarkdown(false, false),
|
|
1500
1492
|
scrollToEndButtonMiddleware: undefined,
|
|
@@ -1685,5 +1677,6 @@ export const dummyDefaultProps = {
|
|
|
1685
1677
|
PRECHAT_REQUIRED_FIELD_MISSING_MESSAGE: "{0} field is required",
|
|
1686
1678
|
MARKDOWN_EXTERNAL_LINK_ALT: "Opens in a new window; external."
|
|
1687
1679
|
}
|
|
1688
|
-
}
|
|
1680
|
+
},
|
|
1681
|
+
telemetryConfig: undefined
|
|
1689
1682
|
};
|
|
@@ -1,53 +1,107 @@
|
|
|
1
|
-
import { LogLevel, TelemetryEvent } from "../../../common/telemetry/TelemetryConstants";
|
|
1
|
+
import { BroadcastEvent, LogLevel, TelemetryEvent } from "../../../common/telemetry/TelemetryConstants";
|
|
2
|
+
import { BroadcastService } from "@microsoft/omnichannel-chat-components";
|
|
2
3
|
import { ConversationState } from "../../../contexts/common/ConversationState";
|
|
3
4
|
import { LiveChatWidgetActionType } from "../../../contexts/common/LiveChatWidgetActionType";
|
|
4
|
-
import { NotificationHandler } from "../../webchatcontainerstateful/webchatcontroller/notification/NotificationHandler";
|
|
5
|
-
import { NotificationScenarios } from "../../webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios";
|
|
6
5
|
import { TelemetryHelper } from "../../../common/telemetry/TelemetryHelper";
|
|
7
6
|
import { WebChatStoreLoader } from "../../webchatcontainerstateful/webchatcontroller/WebChatStoreLoader";
|
|
8
7
|
import { defaultWebChatContainerStatefulProps } from "../../webchatcontainerstateful/common/defaultProps/defaultWebChatContainerStatefulProps";
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
dispatch
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
8
|
+
import { PostChatSurveyMode } from "../../postchatsurveypanestateful/enums/PostChatSurveyMode";
|
|
9
|
+
import { Constants } from "../../../common/Constants";
|
|
10
|
+
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12
|
+
const prepareEndChat = async (props, chatSDK, setAdapter, setWebChatStyles, dispatch, adapter, state) => {
|
|
13
|
+
var _state$domainStates$l, _state$domainStates$l2, _state$domainStates$l3, _state$domainStates$l4;
|
|
14
|
+
|
|
15
|
+
const isPostChatEnabled = (_state$domainStates$l = state.domainStates.liveChatConfig) === null || _state$domainStates$l === void 0 ? void 0 : (_state$domainStates$l2 = _state$domainStates$l.LiveWSAndLiveChatEngJoin) === null || _state$domainStates$l2 === void 0 ? void 0 : _state$domainStates$l2.msdyn_postconversationsurveyenable;
|
|
16
|
+
const postChatSurveyMode = (_state$domainStates$l3 = state.domainStates.liveChatConfig) === null || _state$domainStates$l3 === void 0 ? void 0 : (_state$domainStates$l4 = _state$domainStates$l3.LiveWSAndLiveChatEngJoin) === null || _state$domainStates$l4 === void 0 ? void 0 : _state$domainStates$l4.msdyn_postconversationsurveymode;
|
|
17
|
+
const conversationDetails = await chatSDK.getConversationDetails();
|
|
18
|
+
|
|
19
|
+
if (isPostChatEnabled === "true" && (conversationDetails === null || conversationDetails === void 0 ? void 0 : conversationDetails.canRenderPostChat) === Constants.truePascal) {
|
|
20
|
+
const skipEndChatSDK = false;
|
|
21
|
+
const skipCloseChat = true;
|
|
22
|
+
await endChat(props, chatSDK, setAdapter, setWebChatStyles, dispatch, adapter, skipEndChatSDK, skipCloseChat);
|
|
23
|
+
|
|
24
|
+
if (postChatSurveyMode === PostChatSurveyMode.Embed) {
|
|
25
|
+
const loadPostChatEvent = {
|
|
26
|
+
eventName: BroadcastEvent.LoadPostChatSurvey
|
|
27
|
+
};
|
|
28
|
+
BroadcastService.postMessage(loadPostChatEvent);
|
|
29
|
+
} else if (postChatSurveyMode === PostChatSurveyMode.Link) {
|
|
30
|
+
dispatch({
|
|
31
|
+
type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
32
|
+
payload: ConversationState.InActive
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
} else {
|
|
36
|
+
await endChat(props, chatSDK, setAdapter, setWebChatStyles, dispatch, adapter);
|
|
37
|
+
}
|
|
38
|
+
}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
const endChat = async (props, chatSDK, setAdapter, setWebChatStyles, dispatch, adapter, skipEndChatSDK, skipCloseChat) => {
|
|
42
|
+
if (!skipEndChatSDK) {
|
|
43
|
+
try {
|
|
44
|
+
TelemetryHelper.logSDKEvent(LogLevel.INFO, {
|
|
45
|
+
Event: TelemetryEvent.EndChatSDKCall
|
|
46
|
+
});
|
|
47
|
+
await (chatSDK === null || chatSDK === void 0 ? void 0 : chatSDK.endChat()); // Need to clear these states immediately when chat ended from OC.
|
|
48
|
+
|
|
49
|
+
dispatch({
|
|
50
|
+
type: LiveChatWidgetActionType.SET_CHAT_TOKEN,
|
|
51
|
+
payload: undefined
|
|
52
|
+
});
|
|
53
|
+
dispatch({
|
|
54
|
+
type: LiveChatWidgetActionType.SET_LIVE_CHAT_CONTEXT,
|
|
55
|
+
payload: undefined
|
|
56
|
+
});
|
|
57
|
+
} catch (ex) {
|
|
58
|
+
TelemetryHelper.logSDKEvent(LogLevel.ERROR, {
|
|
59
|
+
Event: TelemetryEvent.EndChatSDKCallFailed,
|
|
60
|
+
ExceptionDetails: {
|
|
61
|
+
exception: ex
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (!skipCloseChat) {
|
|
68
|
+
try {
|
|
69
|
+
var _props$webChatContain;
|
|
70
|
+
|
|
71
|
+
adapter === null || adapter === void 0 ? void 0 : adapter.end();
|
|
72
|
+
setAdapter(undefined);
|
|
73
|
+
setWebChatStyles({ ...defaultWebChatContainerStatefulProps.webChatStyles,
|
|
74
|
+
...((_props$webChatContain = props.webChatContainerProps) === null || _props$webChatContain === void 0 ? void 0 : _props$webChatContain.webChatStyles)
|
|
75
|
+
});
|
|
76
|
+
WebChatStoreLoader.store = null;
|
|
77
|
+
dispatch({
|
|
78
|
+
type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
79
|
+
payload: ConversationState.Closed
|
|
80
|
+
});
|
|
81
|
+
dispatch({
|
|
82
|
+
type: LiveChatWidgetActionType.SET_CONVERSATION_ENDED_BY_AGENT,
|
|
83
|
+
payload: false
|
|
84
|
+
});
|
|
85
|
+
dispatch({
|
|
86
|
+
type: LiveChatWidgetActionType.SET_RECONNECT_ID,
|
|
87
|
+
payload: undefined
|
|
88
|
+
});
|
|
89
|
+
dispatch({
|
|
90
|
+
type: LiveChatWidgetActionType.SET_AUDIO_NOTIFICATION,
|
|
91
|
+
payload: null
|
|
92
|
+
});
|
|
93
|
+
BroadcastService.postMessage({
|
|
94
|
+
eventName: BroadcastEvent.EndChat
|
|
95
|
+
});
|
|
96
|
+
} catch (error) {
|
|
97
|
+
TelemetryHelper.logActionEvent(LogLevel.ERROR, {
|
|
98
|
+
Event: TelemetryEvent.CloseChatMethodException,
|
|
99
|
+
ExceptionDetails: {
|
|
100
|
+
exception: `Failed to endChat: ${error}`
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
}
|
|
52
104
|
}
|
|
53
|
-
};
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export { prepareEndChat, endChat };
|
|
@@ -8,6 +8,9 @@ export const initCallingSdk = async (chatSDK, setVoiceVideoCallingSDK) => {
|
|
|
8
8
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9
9
|
const callingSDK = await chatSDK.getVoiceVideoCalling();
|
|
10
10
|
setVoiceVideoCallingSDK(callingSDK);
|
|
11
|
+
TelemetryHelper.logCallingEvent(LogLevel.INFO, {
|
|
12
|
+
Event: TelemetryEvent.CallingSDKLoadSuccess
|
|
13
|
+
});
|
|
11
14
|
return true;
|
|
12
15
|
}
|
|
13
16
|
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { BroadcastEvent, LogLevel, TelemetryEvent } from "../../../common/telemetry/TelemetryConstants";
|
|
1
2
|
import { createStore } from "botframework-webchat";
|
|
3
|
+
import { BroadcastService } from "@microsoft/omnichannel-chat-components";
|
|
2
4
|
import { ConversationState } from "../../../contexts/common/ConversationState";
|
|
3
5
|
import { LiveChatWidgetActionType } from "../../../contexts/common/LiveChatWidgetActionType";
|
|
4
6
|
import { PostChatSurveyMode } from "../../postchatsurveypanestateful/enums/PostChatSurveyMode";
|
|
7
|
+
import { TelemetryHelper } from "../../../common/telemetry/TelemetryHelper";
|
|
5
8
|
import { WebChatStoreLoader } from "../../webchatcontainerstateful/webchatcontroller/WebChatStoreLoader";
|
|
6
9
|
import attachmentProcessingMiddleware from "../../webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentProcessingMiddleware";
|
|
7
10
|
import { changeLanguageCodeFormatForWebChat } from "../../../common/utils";
|
|
@@ -14,6 +17,7 @@ import createConversationEndMiddleware from "../../webchatcontainerstateful/webc
|
|
|
14
17
|
import createDataMaskingMiddleware from "../../webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/dataMaskingMiddleware";
|
|
15
18
|
import { createMarkdown } from "./createMarkdown";
|
|
16
19
|
import createMaxMessageSizeValidator from "../../webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/maxMessageSizeValidator";
|
|
20
|
+
import { createWebChatTelemetry } from "../../webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger";
|
|
17
21
|
import { defaultAttachmentProps } from "../../webchatcontainerstateful/common/defaultProps/defaultAttachmentProps";
|
|
18
22
|
import { defaultMiddlewareLocalizedTexts } from "../../webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts";
|
|
19
23
|
import { defaultWebChatContainerStatefulProps } from "../../webchatcontainerstateful/common/defaultProps/defaultWebChatContainerStatefulProps";
|
|
@@ -22,8 +26,7 @@ import gifUploadMiddleware from "../../webchatcontainerstateful/webchatcontrolle
|
|
|
22
26
|
import htmlPlayerMiddleware from "../../webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlPlayerMiddleware";
|
|
23
27
|
import htmlTextMiddleware from "../../webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlTextMiddleware";
|
|
24
28
|
import preProcessingMiddleware from "../../webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/preProcessingMiddleware";
|
|
25
|
-
import sanitizationMiddleware from "../../webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/sanitizationMiddleware";
|
|
26
|
-
import { setPostChatContextAndLoadSurvey } from "./setPostChatContextAndLoadSurvey"; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
29
|
+
import sanitizationMiddleware from "../../webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/sanitizationMiddleware"; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27
30
|
|
|
28
31
|
export const initWebChatComposer = (props, chatSDK, state, dispatch, setWebChatStyles) => {
|
|
29
32
|
var _props$webChatContain, _props$webChatContain2, _props$webChatContain3, _state$domainStates$l, _state$domainStates$l2, _state$domainStates$l3, _state$domainStates$l4, _state$domainStates$l8, _state$domainStates$l9, _props$webChatContain7, _props$webChatContain8, _state$domainStates$r, _state$domainStates$r2, _props$webChatContain9, _props$webChatContain10, _state$domainStates$r3, _state$domainStates$r4, _props$webChatContain11, _props$webChatContain12, _defaultWebChatContai, _props$webChatContain13, _props$webChatContain14, _props$webChatContain15, _props$webChatContain16, _state$domainStates$r5, _state$domainStates$r6, _props$webChatContain17, _props$webChatContain18, _defaultWebChatContai2, _props$webChatContain19, _props$webChatContain20, _defaultWebChatContai3, _props$webChatContain21;
|
|
@@ -45,6 +48,11 @@ export const initWebChatComposer = (props, chatSDK, state, dispatch, setWebChatS
|
|
|
45
48
|
const conversationEndCallback = async () => {
|
|
46
49
|
var _props$webChatContain4, _props$webChatContain5;
|
|
47
50
|
|
|
51
|
+
TelemetryHelper.logActionEvent(LogLevel.INFO, {
|
|
52
|
+
Event: TelemetryEvent.ConversationEndedThreadEventReceived,
|
|
53
|
+
Description: "Conversation is ended by agent side or by timeout."
|
|
54
|
+
});
|
|
55
|
+
|
|
48
56
|
if ((props === null || props === void 0 ? void 0 : (_props$webChatContain4 = props.webChatContainerProps) === null || _props$webChatContain4 === void 0 ? void 0 : (_props$webChatContain5 = _props$webChatContain4.renderingMiddlewareProps) === null || _props$webChatContain5 === void 0 ? void 0 : _props$webChatContain5.hideSendboxOnConversationEnd) !== false) {
|
|
49
57
|
setWebChatStyles(styles => {
|
|
50
58
|
return { ...styles,
|
|
@@ -53,22 +61,33 @@ export const initWebChatComposer = (props, chatSDK, state, dispatch, setWebChatS
|
|
|
53
61
|
});
|
|
54
62
|
}
|
|
55
63
|
|
|
56
|
-
if (isPostChatEnabled === "true"
|
|
64
|
+
if (isPostChatEnabled === "true") {
|
|
65
|
+
if (postChatSurveyMode === PostChatSurveyMode.Embed) {
|
|
66
|
+
const loadPostChatEvent = {
|
|
67
|
+
eventName: BroadcastEvent.LoadPostChatSurvey
|
|
68
|
+
};
|
|
69
|
+
BroadcastService.postMessage(loadPostChatEvent);
|
|
70
|
+
} else if (postChatSurveyMode === PostChatSurveyMode.Link) {
|
|
71
|
+
dispatch({
|
|
72
|
+
type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
73
|
+
payload: ConversationState.InActive
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
} else {
|
|
57
77
|
dispatch({
|
|
58
|
-
type: LiveChatWidgetActionType.
|
|
78
|
+
type: LiveChatWidgetActionType.SET_CONVERSATION_ENDED_BY_AGENT,
|
|
59
79
|
payload: true
|
|
60
80
|
});
|
|
61
|
-
dispatch({
|
|
62
|
-
type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
63
|
-
payload: ConversationState.Loading
|
|
64
|
-
});
|
|
65
|
-
await setPostChatContextAndLoadSurvey(chatSDK, dispatch, true);
|
|
66
81
|
}
|
|
67
82
|
|
|
68
83
|
dispatch({
|
|
69
84
|
type: LiveChatWidgetActionType.SET_CHAT_TOKEN,
|
|
70
85
|
payload: undefined
|
|
71
86
|
});
|
|
87
|
+
dispatch({
|
|
88
|
+
type: LiveChatWidgetActionType.SET_LIVE_CHAT_CONTEXT,
|
|
89
|
+
payload: undefined
|
|
90
|
+
});
|
|
72
91
|
};
|
|
73
92
|
|
|
74
93
|
webChatStore = createStore({}, //initial state
|
|
@@ -89,6 +108,7 @@ export const initWebChatComposer = (props, chatSDK, state, dispatch, setWebChatS
|
|
|
89
108
|
avatarMiddleware: (_props$webChatContain15 = props.webChatContainerProps) !== null && _props$webChatContain15 !== void 0 && (_props$webChatContain16 = _props$webChatContain15.renderingMiddlewareProps) !== null && _props$webChatContain16 !== void 0 && _props$webChatContain16.disableAvatarMiddleware ? undefined : createAvatarMiddleware((_state$domainStates$r5 = state.domainStates.renderingMiddlewareProps) === null || _state$domainStates$r5 === void 0 ? void 0 : _state$domainStates$r5.avatarStyleProps, (_state$domainStates$r6 = state.domainStates.renderingMiddlewareProps) === null || _state$domainStates$r6 === void 0 ? void 0 : _state$domainStates$r6.avatarTextStyleProps),
|
|
90
109
|
groupActivitiesMiddleware: (_props$webChatContain17 = props.webChatContainerProps) !== null && _props$webChatContain17 !== void 0 && (_props$webChatContain18 = _props$webChatContain17.renderingMiddlewareProps) !== null && _props$webChatContain18 !== void 0 && _props$webChatContain18.disableGroupActivitiesMiddleware ? undefined : (_defaultWebChatContai2 = defaultWebChatContainerStatefulProps.webChatProps) === null || _defaultWebChatContai2 === void 0 ? void 0 : _defaultWebChatContai2.groupActivitiesMiddleware,
|
|
91
110
|
typingIndicatorMiddleware: (_props$webChatContain19 = props.webChatContainerProps) !== null && _props$webChatContain19 !== void 0 && (_props$webChatContain20 = _props$webChatContain19.renderingMiddlewareProps) !== null && _props$webChatContain20 !== void 0 && _props$webChatContain20.disableTypingIndicatorMiddleware ? undefined : (_defaultWebChatContai3 = defaultWebChatContainerStatefulProps.webChatProps) === null || _defaultWebChatContai3 === void 0 ? void 0 : _defaultWebChatContai3.typingIndicatorMiddleware,
|
|
111
|
+
onTelemetry: createWebChatTelemetry(),
|
|
92
112
|
...((_props$webChatContain21 = props.webChatContainerProps) === null || _props$webChatContain21 === void 0 ? void 0 : _props$webChatContain21.webChatProps)
|
|
93
113
|
};
|
|
94
114
|
return webChatProps;
|