@microsoft/omnichannel-chat-widget 1.8.2-main.4b1a5f0 → 1.8.2-main.5195aba
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 +2 -0
- package/lib/cjs/common/Constants.js +12 -4
- package/lib/cjs/common/telemetry/TelemetryConstants.js +1 -0
- package/lib/cjs/common/utils.js +7 -1
- package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +28 -15
- package/lib/cjs/components/draggable/DraggableChatWidget.js +16 -1
- package/lib/cjs/components/headerstateful/HeaderStateful.js +12 -2
- package/lib/cjs/components/livechatwidget/LiveChatWidget.js +2 -8
- package/lib/cjs/components/livechatwidget/common/createInternetConnectionChangeHandler.js +22 -9
- package/lib/cjs/components/livechatwidget/common/endChat.js +18 -7
- package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +30 -1
- package/lib/cjs/components/livechatwidget/common/liveChatConfigUtils.js +18 -1
- package/lib/cjs/components/livechatwidget/common/renderSurveyHelpers.js +31 -7
- package/lib/cjs/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +15 -2
- package/lib/cjs/components/livechatwidget/common/startChat.js +5 -3
- package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +22 -11
- package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +52 -14
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/channelDataMiddleware.js +4 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.js +12 -6
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/queueOverflowHandlerMiddleware.js +45 -0
- package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +3 -1
- package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +3 -1
- package/lib/cjs/contexts/createReducer.js +30 -0
- package/lib/cjs/controller/componentController.js +2 -2
- package/lib/cjs/firstresponselatency/util.js +52 -27
- package/lib/cjs/plugins/newMessageEventHandler.js +12 -6
- package/lib/esm/common/Constants.js +10 -3
- package/lib/esm/common/telemetry/TelemetryConstants.js +1 -0
- package/lib/esm/common/utils.js +4 -0
- package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +28 -15
- package/lib/esm/components/draggable/DraggableChatWidget.js +16 -1
- package/lib/esm/components/headerstateful/HeaderStateful.js +12 -2
- package/lib/esm/components/livechatwidget/LiveChatWidget.js +2 -8
- package/lib/esm/components/livechatwidget/common/createInternetConnectionChangeHandler.js +22 -9
- package/lib/esm/components/livechatwidget/common/endChat.js +18 -7
- package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +30 -1
- package/lib/esm/components/livechatwidget/common/liveChatConfigUtils.js +16 -0
- package/lib/esm/components/livechatwidget/common/renderSurveyHelpers.js +33 -9
- package/lib/esm/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +16 -3
- package/lib/esm/components/livechatwidget/common/startChat.js +5 -3
- package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +22 -11
- package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +52 -14
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/channelDataMiddleware.js +4 -4
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.js +12 -6
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/queueOverflowHandlerMiddleware.js +38 -0
- package/lib/esm/contexts/common/LiveChatWidgetActionType.js +3 -1
- package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +3 -1
- package/lib/esm/contexts/createReducer.js +30 -0
- package/lib/esm/controller/componentController.js +2 -2
- package/lib/esm/firstresponselatency/util.js +49 -25
- package/lib/esm/plugins/newMessageEventHandler.js +12 -6
- package/lib/types/common/Constants.d.ts +9 -3
- package/lib/types/common/telemetry/TelemetryConstants.d.ts +1 -0
- package/lib/types/common/utils.d.ts +5 -0
- package/lib/types/components/livechatwidget/common/liveChatConfigUtils.d.ts +1 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/channelDataMiddleware.d.ts +1 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.d.ts +1 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/queueOverflowHandlerMiddleware.d.ts +5 -0
- package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +2 -0
- package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +3 -1
- package/lib/types/firstresponselatency/util.d.ts +17 -0
- package/lib/types/plugins/newMessageEventHandler.d.ts +1 -1
- package/package.json +4 -4
|
@@ -51,23 +51,34 @@ const setSurveyMode = async (props, participantType, state, dispatch) => {
|
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
54
|
-
const renderSurvey = async (postChatContext, dispatch) => {
|
|
54
|
+
const renderSurvey = async (postChatContext, state, dispatch) => {
|
|
55
55
|
if (postChatSurveyMode === _PostChatSurveyMode.PostChatSurveyMode.Link) {
|
|
56
56
|
setWidgetStateToInactive(dispatch);
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
59
59
|
if (postChatSurveyMode === _PostChatSurveyMode.PostChatSurveyMode.Embed) {
|
|
60
|
-
await embedModePostChatWorkflow(postChatContext, dispatch);
|
|
60
|
+
await embedModePostChatWorkflow(postChatContext, state, dispatch);
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
63
|
|
|
64
64
|
// Function for embed mode postchat workflow which is essentially same for both customer and agent
|
|
65
65
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
66
|
-
const embedModePostChatWorkflow = async (postChatContext, dispatch) => {
|
|
66
|
+
const embedModePostChatWorkflow = async (postChatContext, state, dispatch) => {
|
|
67
67
|
_TelemetryHelper.TelemetryHelper.logActionEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
68
68
|
Event: _TelemetryConstants.TelemetryEvent.EmbedModePostChatWorkflowStarted
|
|
69
69
|
});
|
|
70
70
|
if (postChatContext) {
|
|
71
|
+
if (postChatContext.isConversationalSurveyEnabled && postChatContext.surveyProvider === _Constants.SurveyProvider.MicrosoftCopilotStudio) {
|
|
72
|
+
dispatch({
|
|
73
|
+
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
74
|
+
payload: _ConversationState.ConversationState.Postchat
|
|
75
|
+
});
|
|
76
|
+
dispatch({
|
|
77
|
+
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CONVERSATIONAL_SURVEY_DISPLAY,
|
|
78
|
+
payload: true
|
|
79
|
+
});
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
71
82
|
dispatch({
|
|
72
83
|
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
73
84
|
payload: _ConversationState.ConversationState.PostchatLoading
|
|
@@ -94,7 +105,7 @@ const initiatePostChat = async (props, conversationDetailsParam, state, dispatch
|
|
|
94
105
|
conversationDetails = conversationDetailsParam;
|
|
95
106
|
const participantType = ((_conversationDetails = conversationDetails) === null || _conversationDetails === void 0 ? void 0 : _conversationDetails.participantType) ?? postchatContext.participantType;
|
|
96
107
|
await setSurveyMode(props, participantType, state, dispatch);
|
|
97
|
-
await renderSurvey(postchatContext, dispatch);
|
|
108
|
+
await renderSurvey(postchatContext, state, dispatch);
|
|
98
109
|
};
|
|
99
110
|
|
|
100
111
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -109,7 +120,14 @@ const isPostChatEnabled = (props, state) => {
|
|
|
109
120
|
exports.checkPostChatEnabled = isPostChatEnabled;
|
|
110
121
|
const getPostChatContext = async (facadeChatSDK, state, dispatch) => {
|
|
111
122
|
try {
|
|
112
|
-
const
|
|
123
|
+
const postChatConfig = await (0, _liveChatConfigUtils.getPostChatSurveyConfig)(facadeChatSDK);
|
|
124
|
+
const postChatEnabled = postChatConfig.postChatEnabled;
|
|
125
|
+
if (postChatConfig.isConversationalSurveyEnabled) {
|
|
126
|
+
dispatch({
|
|
127
|
+
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CONVERSATIONAL_SURVEY_ENABLED,
|
|
128
|
+
payload: true
|
|
129
|
+
});
|
|
130
|
+
}
|
|
113
131
|
if (postChatEnabled) {
|
|
114
132
|
var _state$domainStates2;
|
|
115
133
|
if ((state === null || state === void 0 ? void 0 : (_state$domainStates2 = state.domainStates) === null || _state$domainStates2 === void 0 ? void 0 : _state$domainStates2.postChatContext) === undefined) {
|
|
@@ -119,11 +137,17 @@ const getPostChatContext = async (facadeChatSDK, state, dispatch) => {
|
|
|
119
137
|
Event: _TelemetryConstants.TelemetryEvent.PostChatContextCallSucceed,
|
|
120
138
|
Description: _Constants.PostChatSurveyTelemetryMessage.PostChatContextCallSucceed
|
|
121
139
|
});
|
|
140
|
+
|
|
141
|
+
// Merge postChatConfig with postChatSurveyContext
|
|
142
|
+
const mergedContext = {
|
|
143
|
+
...context,
|
|
144
|
+
...postChatConfig
|
|
145
|
+
};
|
|
122
146
|
dispatch({
|
|
123
147
|
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_POST_CHAT_CONTEXT,
|
|
124
|
-
payload:
|
|
148
|
+
payload: mergedContext
|
|
125
149
|
});
|
|
126
|
-
return
|
|
150
|
+
return mergedContext;
|
|
127
151
|
}
|
|
128
152
|
}
|
|
129
153
|
} catch (error) {
|
|
@@ -14,7 +14,14 @@ var _liveChatConfigUtils = require("./liveChatConfigUtils");
|
|
|
14
14
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15
15
|
const setPostChatContextAndLoadSurvey = async (facadeChatSDK, dispatch, persistedChat) => {
|
|
16
16
|
try {
|
|
17
|
-
const
|
|
17
|
+
const postChatConfig = await (0, _liveChatConfigUtils.getPostChatSurveyConfig)(facadeChatSDK);
|
|
18
|
+
if (postChatConfig.isConversationalSurveyEnabled) {
|
|
19
|
+
dispatch({
|
|
20
|
+
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CONVERSATIONAL_SURVEY_ENABLED,
|
|
21
|
+
payload: true
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
const postChatEnabled = postChatConfig.postChatEnabled;
|
|
18
25
|
if (postChatEnabled) {
|
|
19
26
|
if (!persistedChat) {
|
|
20
27
|
_TelemetryHelper.TelemetryHelper.logSDKEventToAllTelemetry(_TelemetryConstants.LogLevel.INFO, {
|
|
@@ -27,9 +34,15 @@ const setPostChatContextAndLoadSurvey = async (facadeChatSDK, dispatch, persiste
|
|
|
27
34
|
Event: _TelemetryConstants.TelemetryEvent.PostChatContextCallSucceed,
|
|
28
35
|
Description: _Constants.PostChatSurveyTelemetryMessage.PostChatContextCallSucceed
|
|
29
36
|
});
|
|
37
|
+
|
|
38
|
+
// Merge postChatConfig with postChatSurveyContext
|
|
39
|
+
const mergedContext = {
|
|
40
|
+
...context,
|
|
41
|
+
...postChatConfig
|
|
42
|
+
};
|
|
30
43
|
dispatch({
|
|
31
44
|
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_POST_CHAT_CONTEXT,
|
|
32
|
-
payload:
|
|
45
|
+
payload: mergedContext
|
|
33
46
|
});
|
|
34
47
|
}
|
|
35
48
|
}
|
|
@@ -204,8 +204,11 @@ const initStartChat = async (facadeChatSDK, dispatch, setAdapter, state, props,
|
|
|
204
204
|
portalContactId: (_window$Microsoft = window.Microsoft) === null || _window$Microsoft === void 0 ? void 0 : (_window$Microsoft$Dyn = _window$Microsoft.Dynamic365) === null || _window$Microsoft$Dyn === void 0 ? void 0 : (_window$Microsoft$Dyn2 = _window$Microsoft$Dyn.Portal) === null || _window$Microsoft$Dyn2 === void 0 ? void 0 : (_window$Microsoft$Dyn3 = _window$Microsoft$Dyn2.User) === null || _window$Microsoft$Dyn3 === void 0 ? void 0 : _window$Microsoft$Dyn3.contactId
|
|
205
205
|
};
|
|
206
206
|
const startChatOptionalParams = Object.assign({}, params, optionalParams, defaultOptionalParams);
|
|
207
|
+
// startTime is used to determine if a message is history or new, better to be set before creating the adapter to get bandwidth
|
|
208
|
+
const startTime = new Date().getTime();
|
|
207
209
|
await facadeChatSDK.startChat(startChatOptionalParams);
|
|
208
210
|
isStartChatSuccessful = true;
|
|
211
|
+
await createAdapterAndSubscribe(facadeChatSDK, dispatch, setAdapter, startTime, props);
|
|
209
212
|
} catch (error) {
|
|
210
213
|
(0, _utils.checkContactIdError)(error);
|
|
211
214
|
_TelemetryHelper.TelemetryHelper.logSDKEvent(_TelemetryConstants.LogLevel.ERROR, {
|
|
@@ -223,7 +226,6 @@ const initStartChat = async (facadeChatSDK, dispatch, setAdapter, state, props,
|
|
|
223
226
|
isStartChatSuccessful = false;
|
|
224
227
|
throw error;
|
|
225
228
|
}
|
|
226
|
-
await createAdapterAndSubscribe(facadeChatSDK, dispatch, setAdapter, props);
|
|
227
229
|
|
|
228
230
|
// Set app state to Active
|
|
229
231
|
if (isStartChatSuccessful) {
|
|
@@ -274,7 +276,7 @@ const initStartChat = async (facadeChatSDK, dispatch, setAdapter, state, props,
|
|
|
274
276
|
|
|
275
277
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
276
278
|
exports.initStartChat = initStartChat;
|
|
277
|
-
const createAdapterAndSubscribe = async (facadeChatSDK, dispatch, setAdapter, props) => {
|
|
279
|
+
const createAdapterAndSubscribe = async (facadeChatSDK, dispatch, setAdapter, startTime, props) => {
|
|
278
280
|
// New adapter creation
|
|
279
281
|
const newAdapter = await (0, _createAdapter.createAdapter)(facadeChatSDK, props);
|
|
280
282
|
setAdapter(newAdapter);
|
|
@@ -285,7 +287,7 @@ const createAdapterAndSubscribe = async (facadeChatSDK, dispatch, setAdapter, pr
|
|
|
285
287
|
});
|
|
286
288
|
if (chatToken !== null && chatToken !== void 0 && chatToken.chatId && chatToken !== null && chatToken !== void 0 && chatToken.visitorId) {
|
|
287
289
|
var _newAdapter$activity$;
|
|
288
|
-
newAdapter === null || newAdapter === void 0 ? void 0 : (_newAdapter$activity$ = newAdapter.activity$) === null || _newAdapter$activity$ === void 0 ? void 0 : _newAdapter$activity$.subscribe((0, _newMessageEventHandler.createOnNewAdapterActivityHandler)(chatToken.chatId, chatToken.visitorId));
|
|
290
|
+
newAdapter === null || newAdapter === void 0 ? void 0 : (_newAdapter$activity$ = newAdapter.activity$) === null || _newAdapter$activity$ === void 0 ? void 0 : _newAdapter$activity$.subscribe((0, _newMessageEventHandler.createOnNewAdapterActivityHandler)(chatToken.chatId, chatToken.visitorId, startTime));
|
|
289
291
|
}
|
|
290
292
|
};
|
|
291
293
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -619,12 +619,15 @@ const LiveChatWidgetStateful = props => {
|
|
|
619
619
|
payload: null
|
|
620
620
|
});
|
|
621
621
|
if ("participantsRemoved" in event && (inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta5 = inMemoryState.appStates) === null || _inMemoryState$appSta5 === void 0 ? void 0 : _inMemoryState$appSta5.conversationState) === _ConversationState.ConversationState.Active) {
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
622
|
+
var _inMemoryState$appSta6;
|
|
623
|
+
if ((inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta6 = inMemoryState.appStates) === null || _inMemoryState$appSta6 === void 0 ? void 0 : _inMemoryState$appSta6.isConversationalSurveyEnabled) === false) {
|
|
624
|
+
setWebChatStyles(styles => {
|
|
625
|
+
return {
|
|
626
|
+
...styles,
|
|
627
|
+
hideSendBox: true
|
|
628
|
+
};
|
|
629
|
+
});
|
|
630
|
+
}
|
|
628
631
|
_TelemetryHelper.TelemetryHelper.logSDKEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
629
632
|
Event: _TelemetryConstants.TelemetryEvent.ParticipantsRemovedEvent,
|
|
630
633
|
Description: "Participants removed event received."
|
|
@@ -720,7 +723,15 @@ const LiveChatWidgetStateful = props => {
|
|
|
720
723
|
(0, _endChat.endChat)(props, facadeChatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, false, false, true);
|
|
721
724
|
return;
|
|
722
725
|
}
|
|
723
|
-
|
|
726
|
+
const inMemoryState = (0, _createReducer.executeReducer)(state, {
|
|
727
|
+
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.GET_IN_MEMORY_STATE,
|
|
728
|
+
payload: null
|
|
729
|
+
});
|
|
730
|
+
let isConversationalSurveyEnabled = state.appStates.isConversationalSurveyEnabled;
|
|
731
|
+
|
|
732
|
+
// In conversational survey, we need to check post chat survey logics before we set ConversationState to InActive
|
|
733
|
+
// Hence setting ConversationState to InActive will be done later in the post chat flows
|
|
734
|
+
if (!isConversationalSurveyEnabled && ((state === null || state === void 0 ? void 0 : (_state$appStates12 = state.appStates) === null || _state$appStates12 === void 0 ? void 0 : _state$appStates12.conversationEndedBy) === _Constants.ConversationEndEntity.Agent || (state === null || state === void 0 ? void 0 : (_state$appStates13 = state.appStates) === null || _state$appStates13 === void 0 ? void 0 : _state$appStates13.conversationEndedBy) === _Constants.ConversationEndEntity.Bot)) {
|
|
724
735
|
dispatch({
|
|
725
736
|
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
726
737
|
payload: _ConversationState.ConversationState.InActive
|
|
@@ -761,13 +772,13 @@ const LiveChatWidgetStateful = props => {
|
|
|
761
772
|
|
|
762
773
|
// Handle Chat disconnect cases
|
|
763
774
|
(0, _react2.useEffect)(() => {
|
|
764
|
-
var _inMemoryState$
|
|
775
|
+
var _inMemoryState$appSta7;
|
|
765
776
|
const inMemoryState = (0, _createReducer.executeReducer)(state, {
|
|
766
777
|
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.GET_IN_MEMORY_STATE,
|
|
767
778
|
payload: null
|
|
768
779
|
});
|
|
769
780
|
(0, _chatDisconnectHelper.handleChatDisconnect)(props, inMemoryState, setWebChatStyles);
|
|
770
|
-
const chatDisconnectState = inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$
|
|
781
|
+
const chatDisconnectState = inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta7 = inMemoryState.appStates) === null || _inMemoryState$appSta7 === void 0 ? void 0 : _inMemoryState$appSta7.chatDisconnectEventReceived;
|
|
771
782
|
if (chatDisconnectState && adapter) {
|
|
772
783
|
try {
|
|
773
784
|
adapter.end();
|
|
@@ -895,8 +906,8 @@ const LiveChatWidgetStateful = props => {
|
|
|
895
906
|
margin-left: .25em;
|
|
896
907
|
}
|
|
897
908
|
${(sendBoxTextArea === null || sendBoxTextArea === void 0 ? void 0 : sendBoxTextArea.minHeight) && `
|
|
898
|
-
textarea.webchat__send-box-text-
|
|
899
|
-
min-height: ${sendBoxTextArea === null || sendBoxTextArea === void 0 ? void 0 : sendBoxTextArea.minHeight};
|
|
909
|
+
.webchat__auto-resize-textarea.webchat__send-box-text-box__text-area {
|
|
910
|
+
min-height: ${sendBoxTextArea === null || sendBoxTextArea === void 0 ? void 0 : sendBoxTextArea.minHeight} !important;
|
|
900
911
|
}`}
|
|
901
912
|
`), /*#__PURE__*/_react2.default.createElement(_DraggableChatWidget.default, chatWidgetDraggableConfig, /*#__PURE__*/_react2.default.createElement(Composer, _extends({}, webChatProps, {
|
|
902
913
|
userID: userID,
|
|
@@ -56,7 +56,7 @@ const createMagicCodeSuccessResponse = signin => {
|
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
58
|
const WebChatContainerStateful = props => {
|
|
59
|
-
var _webChatContainerProp, _webChatContainerProp2, _webChatContainerProp3, _webChatContainerProp4, _webChatContainerProp5, _webChatContainerProp6, _webChatContainerProp7, _props$webChatContain5, _props$webChatContain6, _defaultWebChatContai, _props$webChatContain7, _props$webChatContain8, _defaultWebChatContai2,
|
|
59
|
+
var _webChatContainerProp, _webChatContainerProp2, _webChatContainerProp3, _webChatContainerProp4, _webChatContainerProp5, _webChatContainerProp6, _webChatContainerProp7, _webChatContainerProp8, _props$webChatContain5, _props$webChatContain6, _defaultWebChatContai, _props$webChatContain7, _props$webChatContain8, _defaultWebChatContai2, _webChatContainerProp9, _webChatContainerProp10, _webChatContainerProp11, _webChatContainerProp12, _webChatContainerProp13, _webChatContainerProp14, _webChatContainerProp15, _webChatContainerProp16, _webChatContainerProp17, _webChatContainerProp18, _webChatContainerProp19, _webChatContainerProp20, _webChatContainerProp21, _webChatContainerProp22, _webChatContainerProp23, _props$webChatContain9, _props$webChatContain10;
|
|
60
60
|
(0, _react2.useEffect)(() => {
|
|
61
61
|
uiTimer = (0, _utils.createTimer)();
|
|
62
62
|
_TelemetryHelper.TelemetryHelper.logLoadingEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
@@ -185,20 +185,24 @@ const WebChatContainerStateful = props => {
|
|
|
185
185
|
background: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp === void 0 ? void 0 : _webChatContainerProp.background) ?? _defaultAdaptiveCardStyles.defaultAdaptiveCardStyles.background};
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
+
.webchat__bubble__content>div#ms_lcw_webchat_adaptive_card .ac-textBlock {
|
|
189
|
+
color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp2 = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp2 === void 0 ? void 0 : _webChatContainerProp2.color) ?? _defaultAdaptiveCardStyles.defaultAdaptiveCardStyles.color} !important;
|
|
190
|
+
}
|
|
191
|
+
|
|
188
192
|
.webchat__stacked-layout__content div.webchat__stacked-layout__message-row div.webchat__bubble--from-user {
|
|
189
|
-
max-width: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
193
|
+
max-width: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp3 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp3 === void 0 ? void 0 : (_webChatContainerProp4 = _webChatContainerProp3.userMessageBoxStyles) === null || _webChatContainerProp4 === void 0 ? void 0 : _webChatContainerProp4.maxWidth) ?? (_defaultUserMessageBoxStyles.defaultUserMessageBoxStyles === null || _defaultUserMessageBoxStyles.defaultUserMessageBoxStyles === void 0 ? void 0 : _defaultUserMessageBoxStyles.defaultUserMessageBoxStyles.maxWidth)}
|
|
190
194
|
}
|
|
191
195
|
|
|
192
196
|
.webchat__stacked-layout--show-avatar div.webchat__stacked-layout__content div.webchat__stacked-layout__message-row div.webchat__stacked-layout__message {
|
|
193
|
-
max-width: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
197
|
+
max-width: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp5 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp5 === void 0 ? void 0 : (_webChatContainerProp6 = _webChatContainerProp5.systemMessageBoxStyles) === null || _webChatContainerProp6 === void 0 ? void 0 : _webChatContainerProp6.maxWidth) ?? (_defaultSystemMessageBoxStyles.defaultSystemMessageBoxStyles === null || _defaultSystemMessageBoxStyles.defaultSystemMessageBoxStyles === void 0 ? void 0 : _defaultSystemMessageBoxStyles.defaultSystemMessageBoxStyles.maxWidth)}
|
|
194
198
|
}
|
|
195
199
|
|
|
196
200
|
div[class="ac-textBlock"] *,
|
|
197
|
-
div[class="ac-input-container"] * {white-space:${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
201
|
+
div[class="ac-input-container"] * {white-space:${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp7 = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp7 === void 0 ? void 0 : _webChatContainerProp7.textWhiteSpace) ?? _defaultAdaptiveCardStyles.defaultAdaptiveCardStyles.textWhiteSpace}}
|
|
198
202
|
|
|
199
203
|
div[class="ac-input-container"] input.ac-multichoiceInput,
|
|
200
204
|
div[class="ac-input-container"] select.ac-multichoiceInput {
|
|
201
|
-
${webChatContainerProps !== null && webChatContainerProps !== void 0 && (
|
|
205
|
+
${webChatContainerProps !== null && webChatContainerProps !== void 0 && (_webChatContainerProp8 = webChatContainerProps.adaptiveCardStyles) !== null && _webChatContainerProp8 !== void 0 && _webChatContainerProp8.choiceInputPadding ? `padding: ${webChatContainerProps.adaptiveCardStyles.choiceInputPadding} !important;` : ""}
|
|
202
206
|
}
|
|
203
207
|
|
|
204
208
|
.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 {
|
|
@@ -210,20 +214,54 @@ const WebChatContainerStateful = props => {
|
|
|
210
214
|
div[class="ac-textBlock"] a:visited,
|
|
211
215
|
div[class="ac-textBlock"] a:hover,
|
|
212
216
|
div[class="ac-textBlock"] a:active {
|
|
213
|
-
color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
217
|
+
color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp9 = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp9 === void 0 ? void 0 : _webChatContainerProp9.anchorColor) ?? _defaultAdaptiveCardStyles.defaultAdaptiveCardStyles.anchorColor};
|
|
214
218
|
}
|
|
215
219
|
|
|
216
|
-
.webchat__stacked-layout__content .ac-actionSet > .ac-pushButton > div {white-space: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
220
|
+
.webchat__stacked-layout__content .ac-actionSet > .ac-pushButton > div {white-space: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp10 = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp10 === void 0 ? void 0 : _webChatContainerProp10.buttonWhiteSpace) ?? _defaultAdaptiveCardStyles.defaultAdaptiveCardStyles.buttonWhiteSpace} !important;}
|
|
217
221
|
|
|
218
222
|
.ms_lcw_webchat_received_message img.webchat__render-markdown__external-link-icon {
|
|
219
|
-
|
|
223
|
+
/* Fallback for browsers that don't support mask */
|
|
224
|
+
background-image: url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIzIDMgMTggMTgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcuMjUwMSA0LjUwMDE3SDEwLjc0OTVDMTEuMTYzNyA0LjUwMDE3IDExLjQ5OTUgNC44MzU5NiAxMS40OTk1IDUuMjUwMTdDMTEuNDk5NSA1LjYyOTg2IDExLjIxNzMgNS45NDM2NiAxMC44NTEzIDUuOTkzMzJMMTAuNzQ5NSA2LjAwMDE3SDcuMjQ5NzRDNi4wNzA3OSA1Ljk5OTYxIDUuMTAzNDkgNi45MDY1NiA1LjAwNzg2IDguMDYxMTJMNS4wMDAyOCA4LjIyMDAzTDUuMDAzMTIgMTYuNzUwN0M1LjAwMzQzIDE3Ljk0MTUgNS45Mjg4NSAxOC45MTYxIDcuMDk5NjYgMTguOTk0OUw3LjI1MzcxIDE5LjAwMDFMMTUuNzUxOCAxOC45ODg0QzE2Ljk0MTUgMTguOTg2OCAxNy45MTQ1IDE4LjA2MiAxNy45OTM1IDE2Ljg5MjNMMTcuOTk4NyAxNi43Mzg0VjEzLjIzMjFDMTcuOTk4NyAxMi44MTc5IDE4LjMzNDUgMTIuNDgyMSAxOC43NDg3IDEyLjQ4MjFDMTkuMTI4NCAxMi40ODIxIDE5LjQ0MjIgMTIuNzY0MyAxOS40OTE4IDEzLjEzMDNMMTkuNDk4NyAxMy4yMzIxVjE2LjczODRDMTkuNDk4NyAxOC43NDA3IDE3LjkyOTMgMjAuMzc2OSAxNS45NTI4IDIwLjQ4MjlMMTUuNzUzOCAyMC40ODg0TDcuMjU4MjcgMjAuNTAwMUw3LjA1NDk1IDIwLjQ5NDlDNS4xNDIzOSAyMC4zOTU0IDMuNjA4OTUgMTguODYyNyAzLjUwODM3IDE2Ljk1MDJMMy41MDMxMiAxNi43NTExTDMuNTAwODkgOC4yNTI3TDMuNTA1MjkgOC4wNTAyQzMuNjA1MzkgNi4xMzc0OSA1LjEzODY3IDQuNjA0NDkgNy4wNTA5NiA0LjUwNTI3TDcuMjUwMSA0LjUwMDE3SDEwLjc0OTVINy4yNTAxWk0xMy43NDgxIDMuMDAxNDZMMjAuMzAxOCAzLjAwMTk3TDIwLjQwMTQgMy4wMTU3NUwyMC41MDIyIDMuMDQzOTNMMjAuNTU5IDMuMDY4MDNDMjAuNjEyMiAzLjA5MTIyIDIwLjY2MzQgMy4xMjE2MyAyMC43MTExIDMuMTU4ODVMMjAuNzgwNCAzLjIyMTU2TDIwLjg2NDEgMy4zMjAxNEwyMC45MTgzIDMuNDEwMjVMMjAuOTU3IDMuNTAwNTdMMjAuOTc2MiAzLjU2NDc2TDIwLjk4OTggMy42Mjg2MkwyMC45OTkyIDMuNzIyODJMMjAuOTk5NyAxMC4yNTU0QzIwLjk5OTcgMTAuNjY5NiAyMC42NjM5IDExLjAwNTQgMjAuMjQ5NyAxMS4wMDU0QzE5Ljg3IDExLjAwNTQgMTkuNTU2MiAxMC43MjMyIDE5LjUwNjUgMTAuMzU3MUwxOS40OTk3IDEwLjI1NTRMMTkuNDk4OSA1LjU2MTQ3TDEyLjI3OTcgMTIuNzg0N0MxMi4wMTM0IDEzLjA1MSAxMS41OTY4IDEzLjA3NTMgMTEuMzAzMSAxMi44NTc1TDExLjIxOSAxMi43ODQ5QzEwLjk1MjcgMTIuNTE4NyAxMC45Mjg0IDEyLjEwMjEgMTEuMTQ2MiAxMS44MDg0TDExLjIxODggMTEuNzI0M0wxOC40MzY5IDQuNTAxNDZIMTMuNzQ4MUMxMy4zNjg0IDQuNTAxNDYgMTMuMDU0NiA0LjIxOTMxIDEzLjAwNSAzLjg1MzI0TDEyLjk5ODEgMy43NTE0NkMxMi45OTgxIDMuMzcxNzcgMTMuMjgwMyAzLjA1Nzk3IDEzLjY0NjQgMy4wMDgzMUwxMy43NDgxIDMuMDAxNDZaIiBmaWxsPSIjRkZGRkZGIiAvPjwvc3ZnPg==);
|
|
225
|
+
filter: ${(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.filter) ?? (_defaultReceivedMessageAnchorStyles.defaultReceivedMessageAnchorStyles === null || _defaultReceivedMessageAnchorStyles.defaultReceivedMessageAnchorStyles === void 0 ? void 0 : _defaultReceivedMessageAnchorStyles.defaultReceivedMessageAnchorStyles.filter)};
|
|
226
|
+
height: .75em;
|
|
227
|
+
width: .75em;
|
|
228
|
+
margin-left: .25em;
|
|
229
|
+
display: inline-block;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.ms_lcw_webchat_sent_message img.webchat__render-markdown__external-link-icon {
|
|
233
|
+
/* Fallback for browsers that don't support mask */
|
|
234
|
+
background-image: url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIzIDMgMTggMTgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcuMjUwMSA0LjUwMDE3SDEwLjc0OTVDMTEuMTYzNyA0LjUwMDE3IDExLjQ5OTUgNC44MzU5NiAxMS40OTk1IDUuMjUwMTdDMTEuNDk5NSA1LjYyOTg2IDExLjIxNzMgNS45NDM2NiAxMC44NTEzIDUuOTkzMzJMMTAuNzQ5NSA2LjAwMDE3SDcuMjQ5NzRDNi4wNzA3OSA1Ljk5OTYxIDUuMTAzNDkgNi45MDY1NiA1LjAwNzg2IDguMDYxMTJMNS4wMDAyOCA4LjIyMDAzTDUuMDAzMTIgMTYuNzUwN0M1LjAwMzQzIDE3Ljk0MTUgNS45Mjg4NSAxOC45MTYxIDcuMDk5NjYgMTguOTk0OUw3LjI1MzcxIDE5LjAwMDFMMTUuNzUxOCAxOC45ODg0QzE2Ljk0MTUgMTguOTg2OCAxNy45MTQ1IDE4LjA2MiAxNy45OTM1IDE2Ljg5MjNMMTcuOTk4NyAxNi43Mzg0VjEzLjIzMjFDMTcuOTk4NyAxMi44MTc5IDE4LjMzNDUgMTIuNDgyMSAxOC43NDg3IDEyLjQ4MjFDMTkuMTI4NCAxMi40ODIxIDE5LjQ0MjIgMTIuNzY0MyAxOS40OTE4IDEzLjEzMDNMMTkuNDk4NyAxMy4yMzIxVjE2LjczODRDMTkuNDk4NyAxOC43NDA3IDE3LjkyOTMgMjAuMzc2OSAxNS45NTI4IDIwLjQ4MjlMMTUuNzUzOCAyMC40ODg0TDcuMjU4MjcgMjAuNTAwMUw3LjA1NDk1IDIwLjQ5NDlDNS4xNDIzOSAyMC4zOTU0IDMuNjA4OTUgMTguODYyNyAzLjUwODM3IDE2Ljk1MDJMMy41MDMxMiAxNi43NTExTDMuNTAwODkgOC4yNTI3TDMuNTA1MjkgOC4wNTAyQzMuNjA1MzkgNi4xMzc0OSA1LjEzODY3IDQuNjA0NDkgNy4wNTA5NiA0LjUwNTI3TDcuMjUwMSA0LjUwMDE3SDEwLjc0OTVINy4yNTAxWk0xMy43NDgxIDMuMDAxNDZMMjAuMzAxOCAzLjAwMTk3TDIwLjQwMTQgMy4wMTU3NUwyMC41MDIyIDMuMDQzOTNMMjAuNTU5IDMuMDY4MDNDMjAuNjEyMiAzLjA5MTIyIDIwLjY2MzQgMy4xMjE2MyAyMC43MTExIDMuMTU4ODVMMjAuNzgwNCAzLjIyMTU2TDIwLjg2NDEgMy4zMjAxNEwyMC45MTgzIDMuNDEwMjVMMjAuOTU3IDMuNTAwNTdMMjAuOTc2MiAzLjU2NDc2TDIwLjk4OTggMy42Mjg2MkwyMC45OTkyIDMuNzIyODJMMjAuOTk5NyAxMC4yNTU0QzIwLjk5OTcgMTAuNjY5NiAyMC42NjM5IDExLjAwNTQgMjAuMjQ5NyAxMS4wMDU0QzE5Ljg3IDExLjAwNTQgMTkuNTU2MiAxMC43MjMyIDE5LjUwNjUgMTAuMzU3MUwxOS40OTk3IDEwLjI1NTRMMTkuNDk4OSA1LjU2MTQ3TDEyLjI3OTcgMTIuNzg0N0MxMi4wMTM0IDEzLjA1MSAxMS41OTY4IDEzLjA3NTMgMTEuMzAzMSAxMi44NTc1TDExLjIxOSAxMi43ODQ5QzEwLjk1MjcgMTIuNTE4NyAxMC45Mjg0IDEyLjEwMjEgMTEuMTQ2MiAxMS44MDg0TDExLjIxODggMTEuNzI0M0wxOC40MzY5IDQuNTAxNDZIMTMuNzQ4MUMxMy4zNjg0IDQuNTAxNDYgMTMuMDU0NiA0LjIxOTMxIDEzLjAwNSAzLjg1MzI0TDEyLjk5ODEgMy43NTE0NkMxMi45OTgxIDMuMzcxNzcgMTMuMjgwMyAzLjA1Nzk3IDEzLjY0NjQgMy4wMDgzMUwxMy43NDgxIDMuMDAxNDZaIiBmaWxsPSIjRkZGRkZGIiAvPjwvc3ZnPg==);
|
|
235
|
+
filter: ${(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.filter) ?? (_defaultSentMessageAnchorStyles.defaultSentMessageAnchorStyles === null || _defaultSentMessageAnchorStyles.defaultSentMessageAnchorStyles === void 0 ? void 0 : _defaultSentMessageAnchorStyles.defaultSentMessageAnchorStyles.filter)};
|
|
220
236
|
height: .75em;
|
|
237
|
+
width: .75em;
|
|
221
238
|
margin-left: .25em;
|
|
222
|
-
|
|
239
|
+
display: inline-block;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/* Modern browsers with mask support */
|
|
243
|
+
@supports (mask: url()) or (-webkit-mask: url()) {
|
|
244
|
+
.ms_lcw_webchat_received_message img.webchat__render-markdown__external-link-icon {
|
|
245
|
+
background-color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp15 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp15 === void 0 ? void 0 : (_webChatContainerProp16 = _webChatContainerProp15.receivedMessageAnchorStyles) === null || _webChatContainerProp16 === void 0 ? void 0 : _webChatContainerProp16.color) ?? (_defaultReceivedMessageAnchorStyles.defaultReceivedMessageAnchorStyles === null || _defaultReceivedMessageAnchorStyles.defaultReceivedMessageAnchorStyles === void 0 ? void 0 : _defaultReceivedMessageAnchorStyles.defaultReceivedMessageAnchorStyles.color)} !important;
|
|
246
|
+
background-image: none !important;
|
|
247
|
+
filter: none !important;
|
|
248
|
+
mask: url("data:image/svg+xml,%3Csvg viewBox='3 3 18 18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.2501 4.50017H10.7495C11.1637 4.50017 11.4995 4.83596 11.4995 5.25017C11.4995 5.62986 11.2173 5.94366 10.8513 5.99332L10.7495 6.00017H7.24974C6.07079 5.99961 5.10349 6.90656 5.00786 8.06112L5.00028 8.22003L5.00312 16.7507C5.00343 17.9415 5.92885 18.9161 7.09966 18.9949L7.25371 19.0001L15.7518 18.9884C16.9415 18.9868 17.9145 18.062 17.9935 16.8923L17.9987 16.7384V13.2321C17.9987 12.8179 18.3345 12.4821 18.7487 12.4821C19.1284 12.4821 19.4422 12.7643 19.4918 13.1303L19.4987 13.2321V16.7384C19.4987 18.7407 17.9293 20.3769 15.9528 20.4829L15.7538 20.4884L7.25827 20.5001L7.05495 20.4949C5.14239 20.3954 3.60895 18.8627 3.50837 16.9502L3.50312 16.7511L3.50089 8.2527L3.50529 8.0502C3.60539 6.13749 5.13867 4.60449 7.05096 4.50527L7.2501 4.50017H10.7495H7.2501ZM13.7481 3.00146L20.3018 3.00197L20.4014 3.01575L20.5022 3.04393L20.559 3.06803C20.6122 3.09122 20.6634 3.12163 20.7111 3.15885L20.7804 3.22156L20.8641 3.32014L20.9183 3.41025L20.957 3.50057L20.9762 3.56476L20.9898 3.62862L20.9992 3.72282L20.9997 10.2554C20.9997 10.6696 20.6639 11.0054 20.2497 11.0054C19.87 11.0054 19.5562 10.7232 19.5065 10.3571L19.4997 10.2554L19.4989 5.56147L12.2797 12.7847C12.0134 13.051 11.5968 13.0753 11.3031 12.8575L11.219 12.7849C10.9527 12.5187 10.9284 12.1021 11.1462 11.8084L11.2188 11.7243L18.4369 4.50146H13.7481C13.3684 4.50146 13.0546 4.21931 13.005 3.85324L12.9981 3.75146C12.9981 3.37177 13.2803 3.05797 13.6464 3.00831L13.7481 3.00146Z' fill='currentColor' /%3E%3C/svg%3E") no-repeat center;
|
|
249
|
+
-webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='3 3 18 18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.2501 4.50017H10.7495C11.1637 4.50017 11.4995 4.83596 11.4995 5.25017C11.4995 5.62986 11.2173 5.94366 10.8513 5.99332L10.7495 6.00017H7.24974C6.07079 5.99961 5.10349 6.90656 5.00786 8.06112L5.00028 8.22003L5.00312 16.7507C5.00343 17.9415 5.92885 18.9161 7.09966 18.9949L7.25371 19.0001L15.7518 18.9884C16.9415 18.9868 17.9145 18.062 17.9935 16.8923L17.9987 16.7384V13.2321C17.9987 12.8179 18.3345 12.4821 18.7487 12.4821C19.1284 12.4821 19.4422 12.7643 19.4918 13.1303L19.4987 13.2321V16.7384C19.4987 18.7407 17.9293 20.3769 15.9528 20.4829L15.7538 20.4884L7.25827 20.5001L7.05495 20.4949C5.14239 20.3954 3.60895 18.8627 3.50837 16.9502L3.50312 16.7511L3.50089 8.2527L3.50529 8.0502C3.60539 6.13749 5.13867 4.60449 7.05096 4.50527L7.2501 4.50017H10.7495H7.2501ZM13.7481 3.00146L20.3018 3.00197L20.4014 3.01575L20.5022 3.04393L20.559 3.06803C20.6122 3.09122 20.6634 3.12163 20.7111 3.15885L20.7804 3.22156L20.8641 3.32014L20.9183 3.41025L20.957 3.50057L20.9762 3.56476L20.9898 3.62862L20.9992 3.72282L20.9997 10.2554C20.9997 10.6696 20.6639 11.0054 20.2497 11.0054C19.87 11.0054 19.5562 10.7232 19.5065 10.3571L19.4997 10.2554L19.4989 5.56147L12.2797 12.7847C12.0134 13.051 11.5968 13.0753 11.3031 12.8575L11.219 12.7849C10.9527 12.5187 10.9284 12.1021 11.1462 11.8084L11.2188 11.7243L18.4369 4.50146H13.7481C13.3684 4.50146 13.0546 4.21931 13.005 3.85324L12.9981 3.75146C12.9981 3.37177 13.2803 3.05797 13.6464 3.00831L13.7481 3.00146Z' fill='currentColor' /%3E%3C/svg%3E") no-repeat center;
|
|
250
|
+
mask-size: contain;
|
|
251
|
+
-webkit-mask-size: contain;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.ms_lcw_webchat_sent_message img.webchat__render-markdown__external-link-icon {
|
|
255
|
+
background-color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp17 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp17 === void 0 ? void 0 : (_webChatContainerProp18 = _webChatContainerProp17.sentMessageAnchorStyles) === null || _webChatContainerProp18 === void 0 ? void 0 : _webChatContainerProp18.color) ?? (_defaultSentMessageAnchorStyles.defaultSentMessageAnchorStyles === null || _defaultSentMessageAnchorStyles.defaultSentMessageAnchorStyles === void 0 ? void 0 : _defaultSentMessageAnchorStyles.defaultSentMessageAnchorStyles.color)} !important;
|
|
256
|
+
background-image: none !important;
|
|
257
|
+
filter: none !important;
|
|
258
|
+
mask: url("data:image/svg+xml,%3Csvg viewBox='3 3 18 18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.2501 4.50017H10.7495C11.1637 4.50017 11.4995 4.83596 11.4995 5.25017C11.4995 5.62986 11.2173 5.94366 10.8513 5.99332L10.7495 6.00017H7.24974C6.07079 5.99961 5.10349 6.90656 5.00786 8.06112L5.00028 8.22003L5.00312 16.7507C5.00343 17.9415 5.92885 18.9161 7.09966 18.9949L7.25371 19.0001L15.7518 18.9884C16.9415 18.9868 17.9145 18.062 17.9935 16.8923L17.9987 16.7384V13.2321C17.9987 12.8179 18.3345 12.4821 18.7487 12.4821C19.1284 12.4821 19.4422 12.7643 19.4918 13.1303L19.4987 13.2321V16.7384C19.4987 18.7407 17.9293 20.3769 15.9528 20.4829L15.7538 20.4884L7.25827 20.5001L7.05495 20.4949C5.14239 20.3954 3.60895 18.8627 3.50837 16.9502L3.50312 16.7511L3.50089 8.2527L3.50529 8.0502C3.60539 6.13749 5.13867 4.60449 7.05096 4.50527L7.2501 4.50017H10.7495H7.2501ZM13.7481 3.00146L20.3018 3.00197L20.4014 3.01575L20.5022 3.04393L20.559 3.06803C20.6122 3.09122 20.6634 3.12163 20.7111 3.15885L20.7804 3.22156L20.8641 3.32014L20.9183 3.41025L20.957 3.50057L20.9762 3.56476L20.9898 3.62862L20.9992 3.72282L20.9997 10.2554C20.9997 10.6696 20.6639 11.0054 20.2497 11.0054C19.87 11.0054 19.5562 10.7232 19.5065 10.3571L19.4997 10.2554L19.4989 5.56147L12.2797 12.7847C12.0134 13.051 11.5968 13.0753 11.3031 12.8575L11.219 12.7849C10.9527 12.5187 10.9284 12.1021 11.1462 11.8084L11.2188 11.7243L18.4369 4.50146H13.7481C13.3684 4.50146 13.0546 4.21931 13.005 3.85324L12.9981 3.75146C12.9981 3.37177 13.2803 3.05797 13.6464 3.00831L13.7481 3.00146Z' fill='currentColor' /%3E%3C/svg%3E") no-repeat center;
|
|
259
|
+
-webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='3 3 18 18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.2501 4.50017H10.7495C11.1637 4.50017 11.4995 4.83596 11.4995 5.25017C11.4995 5.62986 11.2173 5.94366 10.8513 5.99332L10.7495 6.00017H7.24974C6.07079 5.99961 5.10349 6.90656 5.00786 8.06112L5.00028 8.22003L5.00312 16.7507C5.00343 17.9415 5.92885 18.9161 7.09966 18.9949L7.25371 19.0001L15.7518 18.9884C16.9415 18.9868 17.9145 18.062 17.9935 16.8923L17.9987 16.7384V13.2321C17.9987 12.8179 18.3345 12.4821 18.7487 12.4821C19.1284 12.4821 19.4422 12.7643 19.4918 13.1303L19.4987 13.2321V16.7384C19.4987 18.7407 17.9293 20.3769 15.9528 20.4829L15.7538 20.4884L7.25827 20.5001L7.05495 20.4949C5.14239 20.3954 3.60895 18.8627 3.50837 16.9502L3.50312 16.7511L3.50089 8.2527L3.50529 8.0502C3.60539 6.13749 5.13867 4.60449 7.05096 4.50527L7.2501 4.50017H10.7495H7.2501ZM13.7481 3.00146L20.3018 3.00197L20.4014 3.01575L20.5022 3.04393L20.559 3.06803C20.6122 3.09122 20.6634 3.12163 20.7111 3.15885L20.7804 3.22156L20.8641 3.32014L20.9183 3.41025L20.957 3.50057L20.9762 3.56476L20.9898 3.62862L20.9992 3.72282L20.9997 10.2554C20.9997 10.6696 20.6639 11.0054 20.2497 11.0054C19.87 11.0054 19.5562 10.7232 19.5065 10.3571L19.4997 10.2554L19.4989 5.56147L12.2797 12.7847C12.0134 13.051 11.5968 13.0753 11.3031 12.8575L11.219 12.7849C10.9527 12.5187 10.9284 12.1021 11.1462 11.8084L11.2188 11.7243L18.4369 4.50146H13.7481C13.3684 4.50146 13.0546 4.21931 13.005 3.85324L12.9981 3.75146C12.9981 3.37177 13.2803 3.05797 13.6464 3.00831L13.7481 3.00146Z' fill='currentColor' /%3E%3C/svg%3E") no-repeat center;
|
|
260
|
+
mask-size: contain;
|
|
261
|
+
-webkit-mask-size: contain;
|
|
262
|
+
}
|
|
223
263
|
}
|
|
224
264
|
pre {
|
|
225
|
-
white-space: pre-wrap;
|
|
226
|
-
white-space: -moz-pre-wrap;
|
|
227
265
|
white-space: -pre-wrap;
|
|
228
266
|
white-space: -o-pre-wrap;
|
|
229
267
|
word-wrap: break-word;
|
|
@@ -232,18 +270,18 @@ const WebChatContainerStateful = props => {
|
|
|
232
270
|
.ms_lcw_webchat_received_message a:visited,
|
|
233
271
|
.ms_lcw_webchat_received_message a:hover,
|
|
234
272
|
.ms_lcw_webchat_received_message a:active {
|
|
235
|
-
color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
273
|
+
color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp19 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp19 === void 0 ? void 0 : (_webChatContainerProp20 = _webChatContainerProp19.receivedMessageAnchorStyles) === null || _webChatContainerProp20 === void 0 ? void 0 : _webChatContainerProp20.color) ?? (_defaultReceivedMessageAnchorStyles.defaultReceivedMessageAnchorStyles === null || _defaultReceivedMessageAnchorStyles.defaultReceivedMessageAnchorStyles === void 0 ? void 0 : _defaultReceivedMessageAnchorStyles.defaultReceivedMessageAnchorStyles.color)};
|
|
236
274
|
}
|
|
237
275
|
.ms_lcw_webchat_sent_message a:link,
|
|
238
276
|
.ms_lcw_webchat_sent_message a:visited,
|
|
239
277
|
.ms_lcw_webchat_sent_message a:hover,
|
|
240
278
|
.ms_lcw_webchat_sent_message a:active {
|
|
241
|
-
color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
279
|
+
color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp21 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp21 === void 0 ? void 0 : (_webChatContainerProp22 = _webChatContainerProp21.sentMessageAnchorStyles) === null || _webChatContainerProp22 === void 0 ? void 0 : _webChatContainerProp22.color) ?? (_defaultSentMessageAnchorStyles.defaultSentMessageAnchorStyles === null || _defaultSentMessageAnchorStyles.defaultSentMessageAnchorStyles === void 0 ? void 0 : _defaultSentMessageAnchorStyles.defaultSentMessageAnchorStyles.color)};
|
|
242
280
|
}
|
|
243
281
|
|
|
244
282
|
// we had a nasty bug long time ago with crashing borders messing with the sendbox, so if customer adds this value, they need to deal with that
|
|
245
283
|
.webchat__bubble:not(.webchat__bubble--from-user) .webchat__bubble__content {
|
|
246
|
-
border-radius: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
284
|
+
border-radius: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp23 = webChatContainerProps.webChatStyles) === null || _webChatContainerProp23 === void 0 ? void 0 : _webChatContainerProp23.bubbleBorderRadius) ?? 0} !important; /* Override border-radius */
|
|
247
285
|
}
|
|
248
286
|
|
|
249
287
|
.webchat__stacked-layout_container>div {
|
|
@@ -14,13 +14,13 @@ var _WebChatActionType = require("../../enums/WebChatActionType");
|
|
|
14
14
|
******/
|
|
15
15
|
|
|
16
16
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unused-vars
|
|
17
|
-
const channelDataMiddleware = _ref => {
|
|
17
|
+
const channelDataMiddleware = addConversationalSurveyTagsCallback => _ref => {
|
|
18
18
|
let {
|
|
19
19
|
dispatch
|
|
20
20
|
} = _ref;
|
|
21
21
|
return next => action => {
|
|
22
|
-
var _action$payload,
|
|
23
|
-
if ((action === null ||
|
|
22
|
+
var _action, _action2, _action2$payload, _action2$payload$acti;
|
|
23
|
+
if (((_action = action) === null || _action === void 0 ? void 0 : _action.type) === _WebChatActionType.WebChatActionType.DIRECT_LINE_POST_ACTIVITY_PENDING && (_action2 = action) !== null && _action2 !== void 0 && (_action2$payload = _action2.payload) !== null && _action2$payload !== void 0 && (_action2$payload$acti = _action2$payload.activity) !== null && _action2$payload$acti !== void 0 && _action2$payload$acti.channelData) {
|
|
24
24
|
const channelIdTag = `${_Constants.Constants.channelIdKey}${_Constants.Constants.ChannelId}`;
|
|
25
25
|
const customerMessageTag = `${_Constants.Constants.CustomerTag}`;
|
|
26
26
|
if (action.payload.activity.channelData.tags) {
|
|
@@ -34,6 +34,7 @@ const channelDataMiddleware = _ref => {
|
|
|
34
34
|
action.payload.activity.channelData.tags = [channelIdTag];
|
|
35
35
|
action.payload.activity.channelData.tags.push(customerMessageTag);
|
|
36
36
|
}
|
|
37
|
+
action = addConversationalSurveyTagsCallback(action);
|
|
37
38
|
action.payload.activity.channelData.metadata = {
|
|
38
39
|
deliveryMode: _omnichannelChatSdk.DeliveryMode.Bridged
|
|
39
40
|
};
|
|
@@ -16,27 +16,33 @@ var _WebChatActionType = require("../../enums/WebChatActionType");
|
|
|
16
16
|
******/
|
|
17
17
|
|
|
18
18
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unused-vars
|
|
19
|
-
const createConversationEndMiddleware = conversationEndCallback => _ref => {
|
|
19
|
+
const createConversationEndMiddleware = (conversationEndCallback, startConversationalSurveyCallback, endConversationalSurveyCallback) => _ref => {
|
|
20
20
|
let {
|
|
21
21
|
dispatch
|
|
22
22
|
} = _ref;
|
|
23
23
|
return next => action => {
|
|
24
24
|
var _action$payload;
|
|
25
25
|
if ((action === null || action === void 0 ? void 0 : action.type) == _WebChatActionType.WebChatActionType.DIRECT_LINE_INCOMING_ACTIVITY && (_action$payload = action.payload) !== null && _action$payload !== void 0 && _action$payload.activity) {
|
|
26
|
-
var _activity$from2, _activity$
|
|
26
|
+
var _activity$from2, _activity$channelData17, _activity$channelData18;
|
|
27
27
|
const activity = action.payload.activity;
|
|
28
28
|
if (activity.channelId === "ACS_CHANNEL") {
|
|
29
29
|
var _activity$from;
|
|
30
30
|
if (((_activity$from = activity.from) === null || _activity$from === void 0 ? void 0 : _activity$from.role) === _DirectLineSenderRole.DirectLineSenderRole.Bot) {
|
|
31
|
-
var _activity$channelData, _activity$channelData2, _activity$channelData3, _activity$channelData4, _activity$channelData5, _activity$channelData6;
|
|
31
|
+
var _activity$channelData, _activity$channelData2, _activity$channelData3, _activity$channelData4, _activity$channelData5, _activity$channelData6, _activity$channelData7, _activity$channelData8, _activity$channelData9, _activity$channelData10, _activity$channelData11, _activity$channelData12, _activity$channelData13, _activity$channelData14, _activity$channelData15, _activity$channelData16;
|
|
32
32
|
if ((_activity$channelData = activity.channelData) !== null && _activity$channelData !== void 0 && (_activity$channelData2 = _activity$channelData.tags) !== null && _activity$channelData2 !== void 0 && _activity$channelData2.includes(_Constants.Constants.systemMessageTag) && ((_activity$channelData3 = activity.channelData) !== null && _activity$channelData3 !== void 0 && (_activity$channelData4 = _activity$channelData3.tags) !== null && _activity$channelData4 !== void 0 && _activity$channelData4.includes(_Constants.Constants.agentEndConversationMessageTag) || (_activity$channelData5 = activity.channelData) !== null && _activity$channelData5 !== void 0 && (_activity$channelData6 = _activity$channelData5.tags) !== null && _activity$channelData6 !== void 0 && _activity$channelData6.includes(_Constants.Constants.supervisorForceCloseMessageTag))) {
|
|
33
33
|
conversationEndCallback();
|
|
34
34
|
}
|
|
35
|
+
if ((_activity$channelData7 = activity.channelData) !== null && _activity$channelData7 !== void 0 && (_activity$channelData8 = _activity$channelData7.tags) !== null && _activity$channelData8 !== void 0 && _activity$channelData8.includes(_Constants.Constants.systemMessageTag) && ((_activity$channelData9 = activity.channelData) !== null && _activity$channelData9 !== void 0 && (_activity$channelData10 = _activity$channelData9.tags) !== null && _activity$channelData10 !== void 0 && _activity$channelData10.includes(_Constants.Constants.startConversationalSurveyMessageTag) || (_activity$channelData11 = activity.channelData) !== null && _activity$channelData11 !== void 0 && (_activity$channelData12 = _activity$channelData11.tags) !== null && _activity$channelData12 !== void 0 && _activity$channelData12.includes(_Constants.Constants.startConversationalSurveyMessageTag))) {
|
|
36
|
+
startConversationalSurveyCallback();
|
|
37
|
+
}
|
|
38
|
+
if ((_activity$channelData13 = activity.channelData) !== null && _activity$channelData13 !== void 0 && (_activity$channelData14 = _activity$channelData13.tags) !== null && _activity$channelData14 !== void 0 && _activity$channelData14.includes(_Constants.Constants.systemMessageTag) && (_activity$channelData15 = activity.channelData) !== null && _activity$channelData15 !== void 0 && (_activity$channelData16 = _activity$channelData15.tags) !== null && _activity$channelData16 !== void 0 && _activity$channelData16.includes(_Constants.Constants.endConversationalSurveyMessageTag)) {
|
|
39
|
+
endConversationalSurveyCallback();
|
|
40
|
+
}
|
|
35
41
|
}
|
|
36
|
-
} else if (((_activity$from2 = activity.from) === null || _activity$from2 === void 0 ? void 0 : _activity$from2.role) === _DirectLineSenderRole.DirectLineSenderRole.Channel && ((_activity$
|
|
37
|
-
var _activity$
|
|
42
|
+
} else if (((_activity$from2 = activity.from) === null || _activity$from2 === void 0 ? void 0 : _activity$from2.role) === _DirectLineSenderRole.DirectLineSenderRole.Channel && ((_activity$channelData17 = activity.channelData) === null || _activity$channelData17 === void 0 ? void 0 : _activity$channelData17.type) === _MessageType.MessageTypes.Thread && (_activity$channelData18 = activity.channelData) !== null && _activity$channelData18 !== void 0 && _activity$channelData18.properties) {
|
|
43
|
+
var _activity$channelData19, _activity$channelData20, _activity$channelData21, _activity$channelData22;
|
|
38
44
|
// IC3
|
|
39
|
-
if (((_activity$
|
|
45
|
+
if (((_activity$channelData19 = activity.channelData) === null || _activity$channelData19 === void 0 ? void 0 : (_activity$channelData20 = _activity$channelData19.properties) === null || _activity$channelData20 === void 0 ? void 0 : _activity$channelData20.isdeleted) === _Constants.Constants.truePascal || !((_activity$channelData21 = activity.channelData) !== null && _activity$channelData21 !== void 0 && (_activity$channelData22 = _activity$channelData21.properties) !== null && _activity$channelData22 !== void 0 && _activity$channelData22.containsExternalEntitiesListeningAll)) {
|
|
40
46
|
conversationEndCallback();
|
|
41
47
|
}
|
|
42
48
|
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createQueueOverflowMiddleware = void 0;
|
|
7
|
+
var _WebChatActionType = require("../../enums/WebChatActionType");
|
|
8
|
+
var _TelemetryConstants = require("../../../../../common/telemetry/TelemetryConstants");
|
|
9
|
+
var _TelemetryHelper = require("../../../../../common/telemetry/TelemetryHelper");
|
|
10
|
+
var _LiveChatWidgetActionType = require("../../../../../contexts/common/LiveChatWidgetActionType");
|
|
11
|
+
var _createReducer = require("../../../../../contexts/createReducer");
|
|
12
|
+
var _utils = require("../../../../../common/utils");
|
|
13
|
+
const queueOverflowHandlingHelper = async (state, dispatch) => {
|
|
14
|
+
const {
|
|
15
|
+
appStates
|
|
16
|
+
} = (0, _createReducer.executeReducer)(state, {
|
|
17
|
+
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.GET_IN_MEMORY_STATE,
|
|
18
|
+
payload: undefined
|
|
19
|
+
});
|
|
20
|
+
if (!appStates.chatDisconnectEventReceived) {
|
|
21
|
+
dispatch({
|
|
22
|
+
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CHAT_DISCONNECT_EVENT_RECEIVED,
|
|
23
|
+
payload: true
|
|
24
|
+
});
|
|
25
|
+
_TelemetryHelper.TelemetryHelper.logActionEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
26
|
+
Event: _TelemetryConstants.TelemetryEvent.QueueOverflowEvent,
|
|
27
|
+
Description: "Set chat disconnect event received."
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
const createQueueOverflowMiddleware = (state, dispatch) => () => next => action => {
|
|
32
|
+
var _action$payload;
|
|
33
|
+
if ((action === null || action === void 0 ? void 0 : action.type) == _WebChatActionType.WebChatActionType.DIRECT_LINE_INCOMING_ACTIVITY && (_action$payload = action.payload) !== null && _action$payload !== void 0 && _action$payload.activity) {
|
|
34
|
+
const activity = action.payload.activity;
|
|
35
|
+
if ((0, _utils.isEndConversationDueToOverflowActivity)(activity)) {
|
|
36
|
+
_TelemetryHelper.TelemetryHelper.logActionEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
37
|
+
Event: _TelemetryConstants.TelemetryEvent.QueueOverflowEvent,
|
|
38
|
+
Description: "Queue overflow event received."
|
|
39
|
+
});
|
|
40
|
+
queueOverflowHandlingHelper(state, dispatch);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return next(action);
|
|
44
|
+
};
|
|
45
|
+
exports.createQueueOverflowMiddleware = createQueueOverflowMiddleware;
|
|
@@ -52,5 +52,7 @@ exports.LiveChatWidgetActionType = LiveChatWidgetActionType;
|
|
|
52
52
|
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_SURVEY_MODE"] = 42] = "SET_SURVEY_MODE";
|
|
53
53
|
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CONFIRMATION_STATE"] = 43] = "SET_CONFIRMATION_STATE";
|
|
54
54
|
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_POST_CHAT_PARTICIPANT_TYPE"] = 44] = "SET_POST_CHAT_PARTICIPANT_TYPE";
|
|
55
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
55
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CONVERSATIONAL_SURVEY_ENABLED"] = 45] = "SET_CONVERSATIONAL_SURVEY_ENABLED";
|
|
56
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CONVERSATIONAL_SURVEY_DISPLAY"] = 46] = "SET_CONVERSATIONAL_SURVEY_DISPLAY";
|
|
57
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["GET_IN_MEMORY_STATE"] = 47] = "GET_IN_MEMORY_STATE";
|
|
56
58
|
})(LiveChatWidgetActionType || (exports.LiveChatWidgetActionType = LiveChatWidgetActionType = {}));
|
|
@@ -83,7 +83,9 @@ const getLiveChatWidgetContextInitialState = props => {
|
|
|
83
83
|
conversationEndedBy: _Constants.ConversationEndEntity.NotSet,
|
|
84
84
|
chatDisconnectEventReceived: false,
|
|
85
85
|
selectedSurveyMode: null,
|
|
86
|
-
postChatParticipantType: undefined
|
|
86
|
+
postChatParticipantType: undefined,
|
|
87
|
+
isConversationalSurvey: false,
|
|
88
|
+
isConversationalSurveyEnabled: false
|
|
87
89
|
},
|
|
88
90
|
uiStates: {
|
|
89
91
|
showConfirmationPane: false,
|
|
@@ -656,6 +656,36 @@ const reducer = (state, action) => {
|
|
|
656
656
|
postChatParticipantType: action.payload
|
|
657
657
|
}
|
|
658
658
|
};
|
|
659
|
+
case _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CONVERSATIONAL_SURVEY_ENABLED:
|
|
660
|
+
inMemory = {
|
|
661
|
+
...inMemory,
|
|
662
|
+
appStates: {
|
|
663
|
+
...inMemory.appStates,
|
|
664
|
+
isConversationalSurveyEnabled: action.payload
|
|
665
|
+
}
|
|
666
|
+
};
|
|
667
|
+
return {
|
|
668
|
+
...state,
|
|
669
|
+
appStates: {
|
|
670
|
+
...state.appStates,
|
|
671
|
+
isConversationalSurveyEnabled: action.payload
|
|
672
|
+
}
|
|
673
|
+
};
|
|
674
|
+
case _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CONVERSATIONAL_SURVEY_DISPLAY:
|
|
675
|
+
inMemory = {
|
|
676
|
+
...inMemory,
|
|
677
|
+
appStates: {
|
|
678
|
+
...inMemory.appStates,
|
|
679
|
+
isConversationalSurvey: action.payload
|
|
680
|
+
}
|
|
681
|
+
};
|
|
682
|
+
return {
|
|
683
|
+
...state,
|
|
684
|
+
appStates: {
|
|
685
|
+
...state.appStates,
|
|
686
|
+
isConversationalSurvey: action.payload
|
|
687
|
+
}
|
|
688
|
+
};
|
|
659
689
|
case _LiveChatWidgetActionType.LiveChatWidgetActionType.GET_IN_MEMORY_STATE:
|
|
660
690
|
return inMemory;
|
|
661
691
|
default:
|
|
@@ -27,7 +27,7 @@ const shouldShowEmailTranscriptPane = state => {
|
|
|
27
27
|
};
|
|
28
28
|
exports.shouldShowEmailTranscriptPane = shouldShowEmailTranscriptPane;
|
|
29
29
|
const shouldShowWebChatContainer = state => {
|
|
30
|
-
return !state.appStates.isMinimized && state.appStates.conversationState === _ConversationState.ConversationState.Active || state.appStates.conversationState === _ConversationState.ConversationState.InActive;
|
|
30
|
+
return !state.appStates.isMinimized && state.appStates.conversationState === _ConversationState.ConversationState.Active || state.appStates.conversationState === _ConversationState.ConversationState.InActive || state.appStates.conversationState === _ConversationState.ConversationState.Postchat && state.appStates.isConversationalSurveyEnabled && state.appStates.isConversationalSurvey;
|
|
31
31
|
};
|
|
32
32
|
exports.shouldShowWebChatContainer = shouldShowWebChatContainer;
|
|
33
33
|
const shouldShowLoadingPane = state => {
|
|
@@ -60,7 +60,7 @@ const shouldShowConfirmationPane = state => {
|
|
|
60
60
|
};
|
|
61
61
|
exports.shouldShowConfirmationPane = shouldShowConfirmationPane;
|
|
62
62
|
const shouldShowPostChatSurveyPane = state => {
|
|
63
|
-
return state.appStates.conversationState === _ConversationState.ConversationState.Postchat;
|
|
63
|
+
return state.appStates.conversationState === _ConversationState.ConversationState.Postchat && !state.appStates.isConversationalSurvey;
|
|
64
64
|
};
|
|
65
65
|
exports.shouldShowPostChatSurveyPane = shouldShowPostChatSurveyPane;
|
|
66
66
|
const shouldShowCallingContainer = state => {
|