@microsoft/omnichannel-chat-widget 1.3.1-main.da9dc59 → 1.4.1-main.9bf5e75

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.
Files changed (59) hide show
  1. package/lib/cjs/assets/Icons.js +8 -2
  2. package/lib/cjs/common/telemetry/loggers/ariaTelemetryLogger.js +2 -22
  3. package/lib/cjs/components/livechatwidget/common/createAdapter.js +5 -0
  4. package/lib/cjs/components/livechatwidget/common/endChat.js +75 -13
  5. package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +6 -0
  6. package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +31 -17
  7. package/lib/cjs/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +5 -2
  8. package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +13 -7
  9. package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts.js +4 -3
  10. package/lib/cjs/components/webchatcontainerstateful/common/mockchatsdk.js +3 -0
  11. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +40 -101
  12. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Attachment.js +92 -0
  13. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentContent.js +17 -0
  14. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentIcon.js +21 -0
  15. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/DownloadBlockedAttachment.js +36 -0
  16. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/FileScanStatus.js +14 -0
  17. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/MaliciousAttachment.js +24 -0
  18. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/ScanInProgressAttachment.js +24 -0
  19. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Spinner.js +41 -0
  20. package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +1 -0
  21. package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +2 -1
  22. package/lib/cjs/contexts/createReducer.js +8 -0
  23. package/lib/esm/assets/Icons.js +4 -1
  24. package/lib/esm/common/telemetry/loggers/ariaTelemetryLogger.js +2 -22
  25. package/lib/esm/components/livechatwidget/common/createAdapter.js +5 -0
  26. package/lib/esm/components/livechatwidget/common/endChat.js +74 -16
  27. package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +6 -0
  28. package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +34 -20
  29. package/lib/esm/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +6 -3
  30. package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +13 -7
  31. package/lib/esm/components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts.js +4 -3
  32. package/lib/esm/components/webchatcontainerstateful/common/mockchatsdk.js +3 -0
  33. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +36 -96
  34. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Attachment.js +84 -0
  35. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentContent.js +9 -0
  36. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentIcon.js +13 -0
  37. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/DownloadBlockedAttachment.js +28 -0
  38. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/FileScanStatus.js +7 -0
  39. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/MaliciousAttachment.js +16 -0
  40. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/ScanInProgressAttachment.js +16 -0
  41. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Spinner.js +33 -0
  42. package/lib/esm/contexts/common/LiveChatWidgetActionType.js +1 -0
  43. package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +2 -1
  44. package/lib/esm/contexts/createReducer.js +8 -0
  45. package/lib/types/assets/Icons.d.ts +3 -0
  46. package/lib/types/components/livechatwidget/common/endChat.d.ts +6 -2
  47. package/lib/types/components/webchatcontainerstateful/common/mockchatsdk.d.ts +1 -0
  48. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Attachment.d.ts +2 -0
  49. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentContent.d.ts +2 -0
  50. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentIcon.d.ts +2 -0
  51. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/DownloadBlockedAttachment.d.ts +2 -0
  52. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/FileScanStatus.d.ts +6 -0
  53. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/MaliciousAttachment.d.ts +2 -0
  54. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/ScanInProgressAttachment.d.ts +2 -0
  55. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Spinner.d.ts +2 -0
  56. package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +2 -1
  57. package/lib/types/contexts/common/ILiveChatWidgetLocalizedTexts.d.ts +7 -0
  58. package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +2 -1
  59. package/package.json +5 -3
@@ -1,7 +1,7 @@
1
- import { ConfirmationState, Constants, ConversationEndEntity } from "../../../common/Constants";
1
+ import { ConfirmationState, Constants, ConversationEndEntity, ParticipantType } from "../../../common/Constants";
2
2
  import { LogLevel, TelemetryEvent } from "../../../common/telemetry/TelemetryConstants";
3
3
  import { getAuthClientFunction, handleAuthentication } from "./authHelper";
4
- import { getConversationDetailsCall, getWidgetEndChatEventName, isNullOrEmptyString } from "../../../common/utils";
4
+ import { getConversationDetailsCall, getWidgetEndChatEventName } from "../../../common/utils";
5
5
  import { getPostChatContext, initiatePostChat } from "./renderSurveyHelpers";
6
6
  import { BroadcastService } from "@microsoft/omnichannel-chat-components";
7
7
  import { ConversationState } from "../../../contexts/common/ConversationState";
@@ -9,25 +9,36 @@ import { LiveChatWidgetActionType } from "../../../contexts/common/LiveChatWidge
9
9
  import { TelemetryHelper } from "../../../common/telemetry/TelemetryHelper";
10
10
  import { WebChatStoreLoader } from "../../webchatcontainerstateful/webchatcontroller/WebChatStoreLoader";
11
11
  import { defaultWebChatContainerStatefulProps } from "../../webchatcontainerstateful/common/defaultProps/defaultWebChatContainerStatefulProps";
12
+ import { TelemetryManager } from "../../../common/telemetry/TelemetryManager";
12
13
 
13
14
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
14
- const prepareEndChat = async (props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, uwid) => {
15
+ const prepareEndChat = async (props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter) => {
15
16
  try {
16
17
  var _conversationDetails$, _state$domainStates, _state$domainStates2;
18
+ // Use Case: If call is ongoing, end the call by simulating end call button click
19
+ endVoiceVideoCallIfOngoing(chatSDK, dispatch);
17
20
  const conversationDetails = await getConversationDetailsCall(chatSDK);
18
21
 
19
- // Use Case : When post chat is not configured
22
+ // Use Case: When post chat is not configured
20
23
  if ((conversationDetails === null || conversationDetails === void 0 ? void 0 : (_conversationDetails$ = conversationDetails.canRenderPostChat) === null || _conversationDetails$ === void 0 ? void 0 : _conversationDetails$.toLowerCase()) === Constants.false) {
21
24
  var _state$appStates;
22
25
  // If ended by customer, just close chat
23
26
  if ((state === null || state === void 0 ? void 0 : (_state$appStates = state.appStates) === null || _state$appStates === void 0 ? void 0 : _state$appStates.conversationEndedBy) === ConversationEndEntity.Customer) {
24
- await endChat(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, false, false, true, uwid);
27
+ await endChat(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, false, false, true);
25
28
  }
26
- //Use Case: If ended by Agent, stay chat in InActive state
29
+ // Use Case: If ended by Agent, stay chat in InActive state
27
30
  return;
28
31
  }
29
32
 
30
- // Use Case : Can render post chat scenarios
33
+ // Register post chat participant type
34
+ if ((conversationDetails === null || conversationDetails === void 0 ? void 0 : conversationDetails.participantType) === ParticipantType.Bot || (conversationDetails === null || conversationDetails === void 0 ? void 0 : conversationDetails.participantType) === ParticipantType.User) {
35
+ dispatch({
36
+ type: LiveChatWidgetActionType.SET_POST_CHAT_PARTICIPANT_TYPE,
37
+ payload: conversationDetails === null || conversationDetails === void 0 ? void 0 : conversationDetails.participantType
38
+ });
39
+ }
40
+
41
+ // Use Case: Can render post chat scenarios
31
42
  await getPostChatContext(chatSDK, state, dispatch);
32
43
 
33
44
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -36,7 +47,7 @@ const prepareEndChat = async (props, chatSDK, state, dispatch, setAdapter, setWe
36
47
  var _state$appStates2;
37
48
  // For Customer intiated conversations, just close chat widget
38
49
  if ((state === null || state === void 0 ? void 0 : (_state$appStates2 = state.appStates) === null || _state$appStates2 === void 0 ? void 0 : _state$appStates2.conversationEndedBy) === ConversationEndEntity.Customer) {
39
- await endChat(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, false, false, true, uwid);
50
+ await endChat(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, false, false, true);
40
51
  return;
41
52
  }
42
53
 
@@ -47,7 +58,7 @@ const prepareEndChat = async (props, chatSDK, state, dispatch, setAdapter, setWe
47
58
  });
48
59
  return;
49
60
  }
50
- endChat(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, false, true, true, uwid);
61
+ endChat(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, false, true, true);
51
62
 
52
63
  // Initiate post chat render
53
64
  if (state !== null && state !== void 0 && (_state$domainStates2 = state.domainStates) !== null && _state$domainStates2 !== void 0 && _state$domainStates2.postChatContext) {
@@ -65,7 +76,7 @@ const prepareEndChat = async (props, chatSDK, state, dispatch, setAdapter, setWe
65
76
 
66
77
  //Close chat widget for any failure in embedded to allow to show start chat button
67
78
  if (((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.hideStartChatButton) === false) {
68
- await endChat(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, false, false, true, uwid);
79
+ await endChat(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, false, false, true);
69
80
  }
70
81
  } finally {
71
82
  //Chat token clean up
@@ -74,8 +85,7 @@ const prepareEndChat = async (props, chatSDK, state, dispatch, setAdapter, setWe
74
85
  };
75
86
 
76
87
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
77
- const endChat = async function (props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, skipEndChatSDK, skipCloseChat, postMessageToOtherTab) {
78
- let uwid = arguments.length > 10 && arguments[10] !== undefined ? arguments[10] : "";
88
+ const endChat = async (props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, skipEndChatSDK, skipCloseChat, postMessageToOtherTab) => {
79
89
  if (!skipEndChatSDK && chatSDK.conversation) {
80
90
  try {
81
91
  TelemetryHelper.logSDKEvent(LogLevel.INFO, {
@@ -127,15 +137,39 @@ const endChat = async function (props, chatSDK, state, dispatch, setAdapter, set
127
137
  closeChatWidget(dispatch, props, state);
128
138
  }
129
139
  }
130
- if (postMessageToOtherTab && !isNullOrEmptyString(uwid)) {
140
+ if (postMessageToOtherTab) {
131
141
  const endChatEventName = await getEndChatEventName(chatSDK, props);
132
142
  BroadcastService.postMessage({
133
143
  eventName: endChatEventName,
134
- payload: uwid
144
+ payload: {
145
+ runtimeId: TelemetryManager.InternalTelemetryData.lcwRuntimeId
146
+ }
135
147
  });
136
148
  }
137
149
  };
138
- const endChatStateCleanUp = async dispatch => {
150
+ export const callingStateCleanUp = async dispatch => {
151
+ dispatch({
152
+ type: LiveChatWidgetActionType.SHOW_CALLING_CONTAINER,
153
+ payload: false
154
+ });
155
+ dispatch({
156
+ type: LiveChatWidgetActionType.SET_INCOMING_CALL,
157
+ payload: true
158
+ });
159
+ dispatch({
160
+ type: LiveChatWidgetActionType.DISABLE_VIDEO_CALL,
161
+ payload: true
162
+ });
163
+ dispatch({
164
+ type: LiveChatWidgetActionType.DISABLE_LOCAL_VIDEO,
165
+ payload: true
166
+ });
167
+ dispatch({
168
+ type: LiveChatWidgetActionType.DISABLE_REMOTE_VIDEO,
169
+ payload: true
170
+ });
171
+ };
172
+ export const endChatStateCleanUp = async dispatch => {
139
173
  // Need to clear these states immediately when chat ended from OC.
140
174
  dispatch({
141
175
  type: LiveChatWidgetActionType.SET_LIVE_CHAT_CONTEXT,
@@ -150,7 +184,7 @@ const endChatStateCleanUp = async dispatch => {
150
184
  payload: false
151
185
  });
152
186
  };
153
- const closeChatStateCleanUp = async dispatch => {
187
+ export const closeChatStateCleanUp = async dispatch => {
154
188
  dispatch({
155
189
  type: LiveChatWidgetActionType.SET_CHAT_TOKEN,
156
190
  payload: undefined
@@ -185,6 +219,30 @@ const closeChatStateCleanUp = async dispatch => {
185
219
  }
186
220
  });
187
221
  };
222
+
223
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
224
+ export const endVoiceVideoCallIfOngoing = async (chatSDK, dispatch) => {
225
+ let callId = "";
226
+ try {
227
+ const voiceVideoCallingSdk = await chatSDK.getVoiceVideoCalling();
228
+ if (voiceVideoCallingSdk && voiceVideoCallingSdk.isInACall()) {
229
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
230
+ callId = voiceVideoCallingSdk.callId;
231
+ voiceVideoCallingSdk.stopCall();
232
+ TelemetryHelper.logCallingEvent(LogLevel.INFO, {
233
+ Event: TelemetryEvent.EndCallButtonClick
234
+ }, callId);
235
+ callingStateCleanUp(dispatch);
236
+ }
237
+ } catch (error) {
238
+ TelemetryHelper.logCallingEvent(LogLevel.ERROR, {
239
+ Event: TelemetryEvent.EndCallButtonClickException,
240
+ ExceptionDetails: {
241
+ exception: `Failed to End Call: ${error}`
242
+ }
243
+ }, callId);
244
+ }
245
+ };
188
246
  const closeChatWidget = (dispatch, props, state) => {
189
247
  var _state$appStates3;
190
248
  if (state !== null && state !== void 0 && (_state$appStates3 = state.appStates) !== null && _state$appStates3 !== void 0 && _state$appStates3.hideStartChatButton) {
@@ -63,6 +63,12 @@ export const initWebChatComposer = (props, state, dispatch, chatSDK, endChat) =>
63
63
  payload: ConversationEndEntity.Agent
64
64
  });
65
65
  }
66
+ if ((conversationDetails === null || conversationDetails === void 0 ? void 0 : conversationDetails.participantType) === ParticipantType.Bot || (conversationDetails === null || conversationDetails === void 0 ? void 0 : conversationDetails.participantType) === ParticipantType.User) {
67
+ dispatch({
68
+ type: LiveChatWidgetActionType.SET_POST_CHAT_PARTICIPANT_TYPE,
69
+ payload: conversationDetails === null || conversationDetails === void 0 ? void 0 : conversationDetails.participantType
70
+ });
71
+ }
66
72
  TelemetryHelper.logActionEvent(LogLevel.INFO, {
67
73
  Event: TelemetryEvent.ConversationEndedThreadEventReceived,
68
74
  Description: "Conversation end by agent side or by timeout event received."
@@ -6,9 +6,9 @@ import { ConfirmationState, Constants, ConversationEndEntity, E2VVOptions, LiveW
6
6
  import { Stack } from "@fluentui/react";
7
7
  import React, { useEffect, useRef, useState } from "react";
8
8
  import { checkIfConversationStillValid, initStartChat, prepareStartChat, setPreChatAndInitiateChat } from "../common/startChat";
9
- import { createTimer, getBroadcastChannelName, getConversationDetailsCall, getLocaleDirection, getStateFromCache, getWidgetCacheIdfromProps, getWidgetEndChatEventName, isNullOrEmptyString, isUndefinedOrEmpty, newGuid } from "../../../common/utils";
9
+ import { createTimer, getBroadcastChannelName, getConversationDetailsCall, getLocaleDirection, getStateFromCache, getWidgetCacheIdfromProps, getWidgetEndChatEventName, isNullOrEmptyString, isNullOrUndefined, isUndefinedOrEmpty } from "../../../common/utils";
10
10
  import { defaultClientDataStoreProvider, isCookieAllowed } from "../../../common/storage/default/defaultClientDataStoreProvider";
11
- import { endChat, prepareEndChat } from "../common/endChat";
11
+ import { endChat, endChatStateCleanUp, prepareEndChat } from "../common/endChat";
12
12
  import { handleChatReconnect, isPersistentEnabled, isReconnectEnabled } from "../common/reconnectChatHelper";
13
13
  import { shouldShowCallingContainer, shouldShowChatButton, shouldShowConfirmationPane, shouldShowEmailTranscriptPane, shouldShowHeader, shouldShowLoadingPane, shouldShowOutOfOfficeHoursPane, shouldShowPostChatLoadingPane, shouldShowPostChatSurveyPane, shouldShowPreChatSurveyPane, shouldShowProactiveChatPane, shouldShowReconnectChatPane, shouldShowWebChatContainer } from "../../../controller/componentController";
14
14
  import { ActivityStreamHandler } from "../common/ActivityStreamHandler";
@@ -30,7 +30,7 @@ import PreChatSurveyPaneStateful from "../../prechatsurveypanestateful/PreChatSu
30
30
  import ProactiveChatPaneStateful from "../../proactivechatpanestateful/ProactiveChatPaneStateful";
31
31
  import ReconnectChatPaneStateful from "../../reconnectchatpanestateful/ReconnectChatPaneStateful";
32
32
  import { TelemetryHelper } from "../../../common/telemetry/TelemetryHelper";
33
- import { TelemetryTimers } from "../../../common/telemetry/TelemetryManager";
33
+ import { TelemetryManager, TelemetryTimers } from "../../../common/telemetry/TelemetryManager";
34
34
  import WebChatContainerStateful from "../../webchatcontainerstateful/WebChatContainerStateful";
35
35
  import createDownloadTranscriptProps from "../common/createDownloadTranscriptProps";
36
36
  import { createFooter } from "../common/createFooter";
@@ -50,8 +50,10 @@ import { startProactiveChat } from "../common/startProactiveChat";
50
50
  import useChatAdapterStore from "../../../hooks/useChatAdapterStore";
51
51
  import useChatContextStore from "../../../hooks/useChatContextStore";
52
52
  import useChatSDKStore from "../../../hooks/useChatSDKStore";
53
+ import { defaultAdaptiveCardStyles } from "../../webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles";
54
+ import { uuidv4 } from "@microsoft/omnichannel-chat-sdk";
53
55
  export const LiveChatWidgetStateful = props => {
54
- var _props$webChatContain, _props$styleProps, _chatSDK$omnichannelC, _props$controlProps, _props$controlProps2, _state$appStates7, _props$webChatContain5, _state$appStates14, _props$webChatContain6, _props$controlProps11, _props$draggableChatW, _props$draggableChatW2, _props$draggableChatW3, _props$draggableChatW4, _props$draggableChatW5, _livechatProps$webCha, _livechatProps$styleP, _livechatProps$contro, _livechatProps$contro2, _livechatProps$compon, _livechatProps$contro3, _livechatProps$compon2, _livechatProps$contro4, _livechatProps$compon3, _livechatProps$contro5, _livechatProps$compon4, _livechatProps$contro6, _livechatProps$compon5, _livechatProps$contro7, _livechatProps$compon6, _livechatProps$contro8, _livechatProps$compon7, _livechatProps$contro9, _livechatProps$contro10, _livechatProps$compon8, _livechatProps$contro11, _livechatProps$compon9, _livechatProps$contro12, _livechatProps$compon10, _livechatProps$compon11, _livechatProps$compon12;
56
+ var _props$webChatContain, _props$styleProps, _chatSDK$omnichannelC, _props$controlProps, _props$controlProps2, _state$appStates7, _props$webChatContain5, _state$appStates14, _props$webChatContain6, _props$controlProps11, _props$draggableChatW, _props$draggableChatW2, _props$draggableChatW3, _props$draggableChatW4, _props$draggableChatW5, _props$webChatContain7, _props$webChatContain8, _props$webChatContain9, _props$webChatContain10, _livechatProps$webCha, _livechatProps$styleP, _livechatProps$contro, _livechatProps$contro2, _livechatProps$compon, _livechatProps$contro3, _livechatProps$compon2, _livechatProps$contro4, _livechatProps$compon3, _livechatProps$contro5, _livechatProps$compon4, _livechatProps$contro6, _livechatProps$compon5, _livechatProps$contro7, _livechatProps$compon6, _livechatProps$contro8, _livechatProps$compon7, _livechatProps$contro9, _livechatProps$contro10, _livechatProps$compon8, _livechatProps$contro11, _livechatProps$compon9, _livechatProps$contro12, _livechatProps$compon10, _livechatProps$compon11, _livechatProps$compon12;
55
57
  const [state, dispatch] = useChatContextStore();
56
58
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
57
59
  const [adapter, setAdapter] = useChatAdapterStore();
@@ -84,8 +86,6 @@ export const LiveChatWidgetStateful = props => {
84
86
  const lastLWICheckTimeRef = useRef(0);
85
87
  let optionalParams;
86
88
  let activeCachedChatExist = false;
87
- const uwid = useRef(""); // its an uniqueid per chatr instance
88
-
89
89
  const setOptionalParams = () => {
90
90
  var _state$appStates, _state$domainStates, _state$appStates3;
91
91
  if (!isUndefinedOrEmpty((_state$appStates = state.appStates) === null || _state$appStates === void 0 ? void 0 : _state$appStates.reconnectId)) {
@@ -186,7 +186,6 @@ export const LiveChatWidgetStateful = props => {
186
186
  setupClientDataStore();
187
187
  registerTelemetryLoggers(props, dispatch);
188
188
  createInternetConnectionChangeHandler();
189
- uwid.current = newGuid();
190
189
  dispatch({
191
190
  type: LiveChatWidgetActionType.SET_WIDGET_ELEMENT_ID,
192
191
  payload: widgetElementId
@@ -319,23 +318,27 @@ export const LiveChatWidgetStateful = props => {
319
318
 
320
319
  // Start chat from SDK Event
321
320
  BroadcastService.getMessageByEventName(BroadcastEvent.StartChat).subscribe(msg => {
322
- var _msg$payload4;
321
+ var _msg$payload4, _msg$payload5, _msg$payload6;
322
+ // If the startChat event is not initiated by the same tab. Ignore the call
323
+ if (!isNullOrUndefined(msg === null || msg === void 0 ? void 0 : (_msg$payload4 = msg.payload) === null || _msg$payload4 === void 0 ? void 0 : _msg$payload4.runtimeId) && (msg === null || msg === void 0 ? void 0 : (_msg$payload5 = msg.payload) === null || _msg$payload5 === void 0 ? void 0 : _msg$payload5.runtimeId) !== TelemetryManager.InternalTelemetryData.lcwRuntimeId) {
324
+ return;
325
+ }
323
326
  let stateWithUpdatedContext = state;
324
- if (msg !== null && msg !== void 0 && (_msg$payload4 = msg.payload) !== null && _msg$payload4 !== void 0 && _msg$payload4.customContext) {
325
- var _msg$payload5, _msg$payload6;
327
+ if (msg !== null && msg !== void 0 && (_msg$payload6 = msg.payload) !== null && _msg$payload6 !== void 0 && _msg$payload6.customContext) {
328
+ var _msg$payload7, _msg$payload8;
326
329
  TelemetryHelper.logActionEvent(LogLevel.INFO, {
327
330
  Event: TelemetryEvent.CustomContextReceived,
328
331
  Description: "CustomContext received through startChat event."
329
332
  });
330
333
  dispatch({
331
334
  type: LiveChatWidgetActionType.SET_CUSTOM_CONTEXT,
332
- payload: msg === null || msg === void 0 ? void 0 : (_msg$payload5 = msg.payload) === null || _msg$payload5 === void 0 ? void 0 : _msg$payload5.customContext
335
+ payload: msg === null || msg === void 0 ? void 0 : (_msg$payload7 = msg.payload) === null || _msg$payload7 === void 0 ? void 0 : _msg$payload7.customContext
333
336
  });
334
337
  stateWithUpdatedContext = {
335
338
  ...state,
336
339
  domainStates: {
337
340
  ...state.domainStates,
338
- customContext: msg === null || msg === void 0 ? void 0 : (_msg$payload6 = msg.payload) === null || _msg$payload6 === void 0 ? void 0 : _msg$payload6.customContext
341
+ customContext: msg === null || msg === void 0 ? void 0 : (_msg$payload8 = msg.payload) === null || _msg$payload8 === void 0 ? void 0 : _msg$payload8.customContext
339
342
  }
340
343
  };
341
344
  }
@@ -413,9 +416,16 @@ export const LiveChatWidgetStateful = props => {
413
416
  // Listen to end chat event from other tabs
414
417
  const endChatEventName = getWidgetEndChatEventName(chatSDK === null || chatSDK === void 0 ? void 0 : (_chatSDK$omnichannelC2 = chatSDK.omnichannelConfig) === null || _chatSDK$omnichannelC2 === void 0 ? void 0 : _chatSDK$omnichannelC2.orgId, chatSDK === null || chatSDK === void 0 ? void 0 : (_chatSDK$omnichannelC3 = chatSDK.omnichannelConfig) === null || _chatSDK$omnichannelC3 === void 0 ? void 0 : _chatSDK$omnichannelC3.widgetId, ((_props$controlProps10 = props.controlProps) === null || _props$controlProps10 === void 0 ? void 0 : _props$controlProps10.widgetInstanceId) ?? "");
415
418
  BroadcastService.getMessageByEventName(endChatEventName).subscribe(msg => {
416
- console.log("Receiving end chat event", JSON.stringify(msg.payload));
417
- if (msg.payload !== uwid.current) {
419
+ var _msg$payload9;
420
+ if ((msg === null || msg === void 0 ? void 0 : (_msg$payload9 = msg.payload) === null || _msg$payload9 === void 0 ? void 0 : _msg$payload9.runtimeId) !== TelemetryManager.InternalTelemetryData.lcwRuntimeId) {
418
421
  endChat(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, true, false, false);
422
+ endChatStateCleanUp(dispatch);
423
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
424
+ chatSDK.requestId = uuidv4();
425
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
426
+ chatSDK.chatToken = {};
427
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
428
+ chatSDK.reconnectId = null;
419
429
  return;
420
430
  }
421
431
  });
@@ -543,13 +553,13 @@ export const LiveChatWidgetStateful = props => {
543
553
 
544
554
  // If start chat failed, and C2 is trying to close chat widget
545
555
  if (state !== null && state !== void 0 && (_state$appStates9 = state.appStates) !== null && _state$appStates9 !== void 0 && _state$appStates9.startChatFailed || (state === null || state === void 0 ? void 0 : (_state$appStates10 = state.appStates) === null || _state$appStates10 === void 0 ? void 0 : _state$appStates10.conversationState) === ConversationState.Postchat) {
546
- endChat(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, true, false, true, uwid.current);
556
+ endChat(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, true, false, true);
547
557
  return;
548
558
  }
549
559
 
550
560
  // Scenario -> Chat was InActive and closing the chat (Refresh scenario on post chat)
551
561
  if ((state === null || state === void 0 ? void 0 : (_state$appStates11 = state.appStates) === null || _state$appStates11 === void 0 ? void 0 : _state$appStates11.conversationState) === ConversationState.InActive) {
552
- endChat(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, false, false, true, uwid.current);
562
+ endChat(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, false, false, true);
553
563
  return;
554
564
  }
555
565
  if ((state === null || state === void 0 ? void 0 : (_state$appStates12 = state.appStates) === null || _state$appStates12 === void 0 ? void 0 : _state$appStates12.conversationEndedBy) === ConversationEndEntity.Agent || (state === null || state === void 0 ? void 0 : (_state$appStates13 = state.appStates) === null || _state$appStates13 === void 0 ? void 0 : _state$appStates13.conversationEndedBy) === ConversationEndEntity.Bot) {
@@ -560,7 +570,7 @@ export const LiveChatWidgetStateful = props => {
560
570
  }
561
571
 
562
572
  // All other cases
563
- prepareEndChat(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, uwid.current);
573
+ prepareEndChat(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter);
564
574
  }, [state === null || state === void 0 ? void 0 : (_state$appStates14 = state.appStates) === null || _state$appStates14 === void 0 ? void 0 : _state$appStates14.conversationEndedBy]);
565
575
 
566
576
  // Publish chat widget state
@@ -618,13 +628,13 @@ export const LiveChatWidgetStateful = props => {
618
628
  };
619
629
  const setPostChatContextRelay = () => setPostChatContextAndLoadSurvey(chatSDK, dispatch);
620
630
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
621
- const endChatRelay = (adapter, skipEndChatSDK, skipCloseChat, postMessageToOtherTab) => endChat(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, skipEndChatSDK, skipCloseChat, postMessageToOtherTab, uwid.current);
631
+ const endChatRelay = (adapter, skipEndChatSDK, skipCloseChat, postMessageToOtherTab) => endChat(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, skipEndChatSDK, skipCloseChat, postMessageToOtherTab);
622
632
  const prepareStartChatRelay = () => prepareStartChat(props, chatSDK, state, dispatch, setAdapter);
623
633
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
624
634
  const initStartChatRelay = (optionalParams, persistedState) => initStartChat(chatSDK, dispatch, setAdapter, state, props, optionalParams, persistedState);
625
635
  const confirmationPaneProps = initConfirmationPropsComposer(props);
626
636
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
627
- const prepareEndChatRelay = () => prepareEndChat(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, uwid.current);
637
+ const prepareEndChatRelay = () => prepareEndChat(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter);
628
638
  const webChatProps = initWebChatComposer(props, state, dispatch, chatSDK, endChatRelay);
629
639
  const downloadTranscriptProps = createDownloadTranscriptProps(props.downloadTranscriptProps, {
630
640
  ...(defaultWebChatContainerStatefulProps === null || defaultWebChatContainerStatefulProps === void 0 ? void 0 : defaultWebChatContainerStatefulProps.webChatStyles),
@@ -668,7 +678,11 @@ export const LiveChatWidgetStateful = props => {
668
678
  background: ${scrollbarProps.thumbHoverColor};
669
679
  }
670
680
  `), /*#__PURE__*/React.createElement(DraggableChatWidget, chatWidgetDraggableConfig, /*#__PURE__*/React.createElement(Composer, _extends({}, webChatProps, {
671
- styleOptions: webChatStyles,
681
+ styleOptions: {
682
+ ...webChatStyles,
683
+ bubbleBackground: ((_props$webChatContain7 = props.webChatContainerProps) === null || _props$webChatContain7 === void 0 ? void 0 : (_props$webChatContain8 = _props$webChatContain7.adaptiveCardStyles) === null || _props$webChatContain8 === void 0 ? void 0 : _props$webChatContain8.background) ?? defaultAdaptiveCardStyles.background,
684
+ bubbleTextColor: ((_props$webChatContain9 = props.webChatContainerProps) === null || _props$webChatContain9 === void 0 ? void 0 : (_props$webChatContain10 = _props$webChatContain9.adaptiveCardStyles) === null || _props$webChatContain10 === void 0 ? void 0 : _props$webChatContain10.color) ?? defaultAdaptiveCardStyles.color
685
+ },
672
686
  directLine: ((_livechatProps$webCha = livechatProps.webChatContainerProps) === null || _livechatProps$webCha === void 0 ? void 0 : _livechatProps$webCha.directLine) ?? adapter ?? defaultWebChatContainerStatefulProps.directLine
673
687
  }), /*#__PURE__*/React.createElement(Stack, {
674
688
  id: widgetElementId,
@@ -1,6 +1,6 @@
1
1
  import { LogLevel, TelemetryEvent } from "../../common/telemetry/TelemetryConstants";
2
2
  import React, { useEffect } from "react";
3
- import { ConversationEndEntity } from "../../common/Constants";
3
+ import { ParticipantType } from "../../common/Constants";
4
4
  import { CustomerVoiceEvents } from "./enums/CustomerVoiceEvents";
5
5
  import { PostChatSurveyMode } from "./enums/PostChatSurveyMode";
6
6
  import { PostChatSurveyPane } from "@microsoft/omnichannel-chat-components";
@@ -18,14 +18,17 @@ const generateSurveyInviteLink = function (surveyInviteLink, isEmbed, locale, co
18
18
  return surveyLink;
19
19
  };
20
20
  export const PostChatSurveyPaneStateful = props => {
21
- var _props$styleProps, _state$appStates, _state$appStates2, _props$controlProps;
21
+ var _props$styleProps, _state$appStates, _props$controlProps;
22
22
  const [state] = useChatContextStore();
23
23
  const generalStyleProps = Object.assign({}, defaultGeneralPostChatSurveyPaneStyleProps, (_props$styleProps = props.styleProps) === null || _props$styleProps === void 0 ? void 0 : _props$styleProps.generalStyleProps, {
24
24
  display: state.appStates.isMinimized ? "none" : "contents"
25
25
  });
26
26
  let surveyInviteLink = "";
27
27
  const surveyMode = (state === null || state === void 0 ? void 0 : (_state$appStates = state.appStates) === null || _state$appStates === void 0 ? void 0 : _state$appStates.selectedSurveyMode) === PostChatSurveyMode.Embed;
28
- if ((state === null || state === void 0 ? void 0 : (_state$appStates2 = state.appStates) === null || _state$appStates2 === void 0 ? void 0 : _state$appStates2.conversationEndedBy) === ConversationEndEntity.Bot && state.domainStates.postChatContext.botSurveyInviteLink) {
28
+ if (state.domainStates.postChatContext.botSurveyInviteLink &&
29
+ // Bot survey enabled
30
+ state.appStates.postChatParticipantType === ParticipantType.Bot) {
31
+ // Only Bot has engaged
29
32
  surveyInviteLink = generateSurveyInviteLink(state.domainStates.postChatContext.botSurveyInviteLink, surveyMode, state.domainStates.postChatContext.botFormsProLocale, props.isCustomerVoiceSurveyCompact ?? true);
30
33
  } else {
31
34
  surveyInviteLink = generateSurveyInviteLink(state.domainStates.postChatContext.surveyInviteLink, surveyMode, state.domainStates.postChatContext.formsProLocale, props.isCustomerVoiceSurveyCompact ?? true);
@@ -47,7 +47,7 @@ const createMagicCodeSuccessResponse = signin => {
47
47
  };
48
48
  };
49
49
  export const WebChatContainerStateful = props => {
50
- var _webChatContainerProp, _webChatContainerProp2, _webChatContainerProp3, _webChatContainerProp4, _webChatContainerProp5, _webChatContainerProp6, _webChatContainerProp7, _webChatContainerProp8, _webChatContainerProp9, _webChatContainerProp10, _webChatContainerProp11, _webChatContainerProp12, _webChatContainerProp13, _webChatContainerProp14, _webChatContainerProp15;
50
+ var _webChatContainerProp, _webChatContainerProp2, _webChatContainerProp3, _webChatContainerProp4, _webChatContainerProp5, _webChatContainerProp6, _props$webChatContain3, _props$webChatContain4, _defaultWebChatContai, _props$webChatContain5, _props$webChatContain6, _defaultWebChatContai2, _webChatContainerProp7, _webChatContainerProp8, _webChatContainerProp9, _webChatContainerProp10, _webChatContainerProp11, _webChatContainerProp12, _webChatContainerProp13, _webChatContainerProp14;
51
51
  const {
52
52
  BasicWebChat
53
53
  } = Components;
@@ -145,21 +145,27 @@ export const WebChatContainerStateful = props => {
145
145
  }
146
146
 
147
147
  div[class="ac-textBlock"] *,
148
- div[class="ac-input-container"] * {color:${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp6 = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp6 === void 0 ? void 0 : _webChatContainerProp6.color) ?? defaultAdaptiveCardStyles.color}; white-space:${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp7 = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp7 === void 0 ? void 0 : _webChatContainerProp7.textWhiteSpace) ?? defaultAdaptiveCardStyles.textWhiteSpace}}
148
+ div[class="ac-input-container"] * {white-space:${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp6 = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp6 === void 0 ? void 0 : _webChatContainerProp6.textWhiteSpace) ?? defaultAdaptiveCardStyles.textWhiteSpace}}
149
+
150
+ .ms_lcw_webchat_received_message>div.webchat__stacked-layout>div.webchat__stacked-layout__main>div.webchat__stacked-layout__content>div.webchat__stacked-layout__message-row>[class^=webchat]:not(.webchat__bubble--from-user)>.webchat__bubble__content {
151
+ background-color: ${((_props$webChatContain3 = props.webChatContainerProps) === null || _props$webChatContain3 === void 0 ? void 0 : (_props$webChatContain4 = _props$webChatContain3.webChatStyles) === null || _props$webChatContain4 === void 0 ? void 0 : _props$webChatContain4.bubbleBackground) ?? ((_defaultWebChatContai = defaultWebChatContainerStatefulProps.webChatStyles) === null || _defaultWebChatContai === void 0 ? void 0 : _defaultWebChatContai.bubbleBackground)};
152
+ color:${((_props$webChatContain5 = props.webChatContainerProps) === null || _props$webChatContain5 === void 0 ? void 0 : (_props$webChatContain6 = _props$webChatContain5.webChatStyles) === null || _props$webChatContain6 === void 0 ? void 0 : _props$webChatContain6.bubbleTextColor) ?? ((_defaultWebChatContai2 = defaultWebChatContainerStatefulProps.webChatStyles) === null || _defaultWebChatContai2 === void 0 ? void 0 : _defaultWebChatContai2.bubbleTextColor)};
153
+ }
154
+
149
155
  div[class="ac-textBlock"] a:link,
150
156
  div[class="ac-textBlock"] a:visited,
151
157
  div[class="ac-textBlock"] a:hover,
152
158
  div[class="ac-textBlock"] a:active {
153
- color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp8 = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp8 === void 0 ? void 0 : _webChatContainerProp8.anchorColor) ?? defaultAdaptiveCardStyles.anchorColor};
159
+ color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp7 = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp7 === void 0 ? void 0 : _webChatContainerProp7.anchorColor) ?? defaultAdaptiveCardStyles.anchorColor};
154
160
  }
155
161
 
156
- .webchat__stacked-layout__content .ac-actionSet > .ac-pushButton > div {white-space: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp9 = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp9 === void 0 ? void 0 : _webChatContainerProp9.buttonWhiteSpace) ?? defaultAdaptiveCardStyles.buttonWhiteSpace} !important;}
162
+ .webchat__stacked-layout__content .ac-actionSet > .ac-pushButton > div {white-space: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp8 = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp8 === void 0 ? void 0 : _webChatContainerProp8.buttonWhiteSpace) ?? defaultAdaptiveCardStyles.buttonWhiteSpace} !important;}
157
163
 
158
164
  .ms_lcw_webchat_received_message img.webchat__markdown__external-link-icon {
159
165
  background-image : url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIzIDMgMTggMTgiICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik03LjI1MDEgNC41MDAxN0gxMC43NDk1QzExLjE2MzcgNC41MDAxNyAxMS40OTk1IDQuODM1OTYgMTEuNDk5NSA1LjI1MDE3QzExLjQ5OTUgNS42Mjk4NiAxMS4yMTczIDUuOTQzNjYgMTAuODUxMyA1Ljk5MzMyTDEwLjc0OTUgNi4wMDAxN0g3LjI0OTc0QzYuMDcwNzkgNS45OTk2MSA1LjEwMzQ5IDYuOTA2NTYgNS4wMDc4NiA4LjA2MTEyTDUuMDAwMjggOC4yMjAwM0w1LjAwMzEyIDE2Ljc1MDdDNS4wMDM0MyAxNy45NDE1IDUuOTI4ODUgMTguOTE2MSA3LjA5OTY2IDE4Ljk5NDlMNy4yNTM3MSAxOS4wMDAxTDE1Ljc1MTggMTguOTg4NEMxNi45NDE1IDE4Ljk4NjggMTcuOTE0NSAxOC4wNjIgMTcuOTkzNSAxNi44OTIzTDE3Ljk5ODcgMTYuNzM4NFYxMy4yMzIxQzE3Ljk5ODcgMTIuODE3OSAxOC4zMzQ1IDEyLjQ4MjEgMTguNzQ4NyAxMi40ODIxQzE5LjEyODQgMTIuNDgyMSAxOS40NDIyIDEyLjc2NDMgMTkuNDkxOCAxMy4xMzAzTDE5LjQ5ODcgMTMuMjMyMVYxNi43Mzg0QzE5LjQ5ODcgMTguNzQwNyAxNy45MjkzIDIwLjM3NjkgMTUuOTUyOCAyMC40ODI5TDE1Ljc1MzggMjAuNDg4NEw3LjI1ODI3IDIwLjUwMDFMNy4wNTQ5NSAyMC40OTQ5QzUuMTQyMzkgMjAuMzk1NCAzLjYwODk1IDE4Ljg2MjcgMy41MDgzNyAxNi45NTAyTDMuNTAzMTIgMTYuNzUxMUwzLjUwMDg5IDguMjUyN0wzLjUwNTI5IDguMDUwMkMzLjYwNTM5IDYuMTM3NDkgNS4xMzg2NyA0LjYwNDQ5IDcuMDUwOTYgNC41MDUyN0w3LjI1MDEgNC41MDAxN0gxMC43NDk1SDcuMjUwMVpNMTMuNzQ4MSAzLjAwMTQ2TDIwLjMwMTggMy4wMDE5N0wyMC40MDE0IDMuMDE1NzVMMjAuNTAyMiAzLjA0MzkzTDIwLjU1OSAzLjA2ODAzQzIwLjYxMjIgMy4wOTEyMiAyMC42NjM0IDMuMTIxNjMgMjAuNzExMSAzLjE1ODg1TDIwLjc4MDQgMy4yMjE1NkwyMC44NjQxIDMuMzIwMTRMMjAuOTE4MyAzLjQxMDI1TDIwLjk1NyAzLjUwMDU3TDIwLjk3NjIgMy41NjQ3NkwyMC45ODk4IDMuNjI4NjJMMjAuOTk5MiAzLjcyMjgyTDIwLjk5OTcgMTAuMjU1NEMyMC45OTk3IDEwLjY2OTYgMjAuNjYzOSAxMS4wMDU0IDIwLjI0OTcgMTEuMDA1NEMxOS44NyAxMS4wMDU0IDE5LjU1NjIgMTAuNzIzMiAxOS41MDY1IDEwLjM1NzFMMTkuNDk5NyAxMC4yNTU0TDE5LjQ5ODkgNS41NjE0N0wxMi4yNzk3IDEyLjc4NDdDMTIuMDEzNCAxMy4wNTEgMTEuNTk2OCAxMy4wNzUzIDExLjMwMzEgMTIuODU3NUwxMS4yMTkgMTIuNzg0OUMxMC45NTI3IDEyLjUxODcgMTAuOTI4NCAxMi4xMDIxIDExLjE0NjIgMTEuODA4NEwxMS4yMTg4IDExLjcyNDNMMTguNDM2OSA0LjUwMTQ2SDEzLjc0ODFDMTMuMzY4NCA0LjUwMTQ2IDEzLjA1NDYgNC4yMTkzMSAxMy4wMDUgMy44NTMyNEwxMi45OTgxIDMuNzUxNDZDMTIuOTk4MSAzLjM3MTc3IDEzLjI4MDMgMy4wNTc5NyAxMy42NDY0IDMuMDA4MzFMMTMuNzQ4MSAzLjAwMTQ2WiIgZmlsbD0iI0ZGRkZGRiIgLz48L3N2Zz4) !important;
160
166
  height: '.75em';
161
167
  marginLeft: '.25em';
162
- filter:${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp10 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp10 === void 0 ? void 0 : (_webChatContainerProp11 = _webChatContainerProp10.receivedMessageAnchorStyles) === null || _webChatContainerProp11 === void 0 ? void 0 : _webChatContainerProp11.filter) ?? (defaultReceivedMessageAnchorStyles === null || defaultReceivedMessageAnchorStyles === void 0 ? void 0 : defaultReceivedMessageAnchorStyles.filter)};
168
+ filter:${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp9 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp9 === void 0 ? void 0 : (_webChatContainerProp10 = _webChatContainerProp9.receivedMessageAnchorStyles) === null || _webChatContainerProp10 === void 0 ? void 0 : _webChatContainerProp10.filter) ?? (defaultReceivedMessageAnchorStyles === null || defaultReceivedMessageAnchorStyles === void 0 ? void 0 : defaultReceivedMessageAnchorStyles.filter)};
163
169
  }
164
170
  pre {
165
171
  white-space: pre-wrap;
@@ -172,13 +178,13 @@ export const WebChatContainerStateful = props => {
172
178
  .ms_lcw_webchat_received_message a:visited,
173
179
  .ms_lcw_webchat_received_message a:hover,
174
180
  .ms_lcw_webchat_received_message a:active {
175
- color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp12 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp12 === void 0 ? void 0 : (_webChatContainerProp13 = _webChatContainerProp12.receivedMessageAnchorStyles) === null || _webChatContainerProp13 === void 0 ? void 0 : _webChatContainerProp13.color) ?? (defaultReceivedMessageAnchorStyles === null || defaultReceivedMessageAnchorStyles === void 0 ? void 0 : defaultReceivedMessageAnchorStyles.color)};
181
+ color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp11 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp11 === void 0 ? void 0 : (_webChatContainerProp12 = _webChatContainerProp11.receivedMessageAnchorStyles) === null || _webChatContainerProp12 === void 0 ? void 0 : _webChatContainerProp12.color) ?? (defaultReceivedMessageAnchorStyles === null || defaultReceivedMessageAnchorStyles === void 0 ? void 0 : defaultReceivedMessageAnchorStyles.color)};
176
182
  }
177
183
  .ms_lcw_webchat_sent_message a:link,
178
184
  .ms_lcw_webchat_sent_message a:visited,
179
185
  .ms_lcw_webchat_sent_message a:hover,
180
186
  .ms_lcw_webchat_sent_message a:active {
181
- color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp14 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp14 === void 0 ? void 0 : (_webChatContainerProp15 = _webChatContainerProp14.sentMessageAnchorStyles) === null || _webChatContainerProp15 === void 0 ? void 0 : _webChatContainerProp15.color) ?? (defaultSentMessageAnchorStyles === null || defaultSentMessageAnchorStyles === void 0 ? void 0 : defaultSentMessageAnchorStyles.color)};
187
+ color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp13 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp13 === void 0 ? void 0 : (_webChatContainerProp14 = _webChatContainerProp13.sentMessageAnchorStyles) === null || _webChatContainerProp14 === void 0 ? void 0 : _webChatContainerProp14.color) ?? (defaultSentMessageAnchorStyles === null || defaultSentMessageAnchorStyles === void 0 ? void 0 : defaultSentMessageAnchorStyles.color)};
182
188
  }
183
189
  `), /*#__PURE__*/React.createElement(Stack, {
184
190
  styles: containerStyles
@@ -1,8 +1,8 @@
1
- /*
1
+ /*
2
2
  MIDDLEWARE_BANNER_FILE parameters:
3
3
  {0} = File limit size
4
4
  {1} = File extension
5
- {2} = File name
5
+ {2} = File name
6
6
  */
7
7
 
8
8
  export const defaultMiddlewareLocalizedTexts = {
@@ -25,5 +25,6 @@ export const defaultMiddlewareLocalizedTexts = {
25
25
  MIDDLEWARE_MESSAGE_NOT_DELIVERED: "Not Delivered",
26
26
  MIDDLEWARE_MESSAGE_RETRY: "Retry",
27
27
  MIDDLEWARE_BANNER_CHAT_DISCONNECT: "Your conversation has been disconnected. For additional assistance, please start a new chat.",
28
- THIRD_PARTY_COOKIES_BLOCKED_ALERT_MESSAGE: "Third party cookies are blocked. Reloading this page will start a new conversation."
28
+ THIRD_PARTY_COOKIES_BLOCKED_ALERT_MESSAGE: "Third party cookies are blocked. Reloading this page will start a new conversation.",
29
+ MIDDLEWARE_BANNER_FILE_IS_MALICIOUS: "{0} has been blocked because the file may contain a malware."
29
30
  };
@@ -53,4 +53,7 @@ export class MockChatSDK {
53
53
  reconnectId: "123"
54
54
  };
55
55
  }
56
+ getVoiceVideoCalling() {
57
+ return null;
58
+ }
56
59
  }