@microsoft/omnichannel-chat-widget 1.5.1-main.e2be12d → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/common/Constants.js +23 -2
- package/lib/cjs/common/telemetry/TelemetryConstants.js +3 -0
- package/lib/cjs/components/livechatwidget/common/endChat.js +25 -3
- package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +8 -4
- package/lib/cjs/components/livechatwidget/common/startChatErrorHandler.js +35 -13
- package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +50 -6
- package/lib/cjs/components/loadingpanestateful/LoadingPaneStateful.js +1 -1
- package/lib/cjs/components/startchaterrorpanestateful/StartChatErrorPaneStateful.js +82 -0
- package/lib/cjs/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneGeneralStyleProps.js +17 -0
- package/lib/cjs/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneIconImageProps.js +17 -0
- package/lib/cjs/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneIconStyleProps.js +15 -0
- package/lib/cjs/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneSubtitleStyleProps.js +17 -0
- package/lib/cjs/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneTitleStyleProps.js +17 -0
- package/lib/cjs/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneControlProps.js +1 -0
- package/lib/cjs/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneProps.js +1 -0
- package/lib/cjs/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneStyleProps.js +1 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +2 -3
- package/lib/cjs/contexts/common/ConversationState.js +1 -0
- package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +37 -36
- package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +4 -1
- package/lib/cjs/contexts/common/StartChatFailureType.js +13 -0
- package/lib/cjs/contexts/createReducer.js +8 -0
- package/lib/cjs/controller/componentController.js +5 -1
- package/lib/esm/common/Constants.js +20 -1
- package/lib/esm/common/telemetry/TelemetryConstants.js +3 -0
- package/lib/esm/components/livechatwidget/common/endChat.js +26 -4
- package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +8 -4
- package/lib/esm/components/livechatwidget/common/startChatErrorHandler.js +36 -14
- package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +52 -8
- package/lib/esm/components/loadingpanestateful/LoadingPaneStateful.js +1 -1
- package/lib/esm/components/startchaterrorpanestateful/StartChatErrorPaneStateful.js +71 -0
- package/lib/esm/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneGeneralStyleProps.js +10 -0
- package/lib/esm/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneIconImageProps.js +10 -0
- package/lib/esm/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneIconStyleProps.js +8 -0
- package/lib/esm/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneSubtitleStyleProps.js +10 -0
- package/lib/esm/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneTitleStyleProps.js +10 -0
- package/lib/esm/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneControlProps.js +1 -0
- package/lib/esm/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneProps.js +1 -0
- package/lib/esm/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneStyleProps.js +1 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +2 -3
- package/lib/esm/contexts/common/ConversationState.js +1 -0
- package/lib/esm/contexts/common/LiveChatWidgetActionType.js +37 -36
- package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +4 -1
- package/lib/esm/contexts/common/StartChatFailureType.js +6 -0
- package/lib/esm/contexts/createReducer.js +8 -0
- package/lib/esm/controller/componentController.js +3 -0
- package/lib/types/common/Constants.d.ts +21 -0
- package/lib/types/common/telemetry/TelemetryConstants.d.ts +2 -0
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetComponentOverrides.d.ts +1 -0
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +1 -1
- package/lib/types/components/startchaterrorpanestateful/StartChatErrorPaneStateful.d.ts +3 -0
- package/lib/types/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneGeneralStyleProps.d.ts +2 -0
- package/lib/types/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneIconImageProps.d.ts +2 -0
- package/lib/types/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneIconStyleProps.d.ts +2 -0
- package/lib/types/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneSubtitleStyleProps.d.ts +2 -0
- package/lib/types/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneTitleStyleProps.d.ts +2 -0
- package/lib/types/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneClassNames.d.ts +5 -0
- package/lib/types/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneComponentOverrides.d.ts +6 -0
- package/lib/types/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneControlProps.d.ts +14 -0
- package/lib/types/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneProps.d.ts +8 -0
- package/lib/types/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneStyleProps.d.ts +10 -0
- package/lib/types/contexts/common/ConversationState.d.ts +2 -1
- package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +3 -0
- package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +37 -36
- package/lib/types/contexts/common/StartChatFailureType.d.ts +5 -0
- package/lib/types/controller/componentController.d.ts +1 -0
- package/package.json +5 -5
- package/lib/cjs/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.spec.js +0 -71
- package/lib/cjs/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.spec.js +0 -56
- package/lib/cjs/components/livechatwidget/common/startChatErrorHandler.spec.js +0 -282
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.spec.js +0 -190
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.js +0 -82
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageSequenceIdOverrideMiddleware.spec.js +0 -342
- package/lib/esm/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.spec.js +0 -69
- package/lib/esm/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.spec.js +0 -54
- package/lib/esm/components/livechatwidget/common/startChatErrorHandler.spec.js +0 -280
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.spec.js +0 -188
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.js +0 -80
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageSequenceIdOverrideMiddleware.spec.js +0 -338
- package/lib/types/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.spec.d.ts +0 -1
- package/lib/types/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.spec.d.ts +0 -1
- package/lib/types/components/livechatwidget/common/startChatErrorHandler.spec.d.ts +0 -1
- package/lib/types/components/loadingpanestateful/interfaces/IStartChatErrorPaneControlProps.d.ts +0 -4
- package/lib/types/components/loadingpanestateful/interfaces/IStartChatErrorPaneProps.d.ts +0 -4
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.spec.d.ts +0 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.d.ts +0 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageSequenceIdOverrideMiddleware.spec.d.ts +0 -1
- /package/lib/cjs/components/{loadingpanestateful/interfaces/IStartChatErrorPaneControlProps.js → startchaterrorpanestateful/interfaces/IStartChatErrorPaneClassNames.js} +0 -0
- /package/lib/cjs/components/{loadingpanestateful/interfaces/IStartChatErrorPaneProps.js → startchaterrorpanestateful/interfaces/IStartChatErrorPaneComponentOverrides.js} +0 -0
- /package/lib/esm/components/{loadingpanestateful/interfaces/IStartChatErrorPaneControlProps.js → startchaterrorpanestateful/interfaces/IStartChatErrorPaneClassNames.js} +0 -0
- /package/lib/esm/components/{loadingpanestateful/interfaces/IStartChatErrorPaneProps.js → startchaterrorpanestateful/interfaces/IStartChatErrorPaneComponentOverrides.js} +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.WidgetLoadTelemetryMessage = exports.WidgetLoadCustomErrorString = exports.WebChatMiddlewareConstants = exports.TranscriptConstants = exports.StorageType = exports.Regex = exports.ParticipantType = exports.NotificationPaneConstants = exports.MimeTypes = exports.LocaleConstants = exports.LiveWorkItemState = exports.HtmlIdNames = exports.HtmlElementSelectors = exports.HtmlClassNames = exports.HtmlAttributeNames = exports.EnvironmentVersion = exports.ElementType = exports.E2VVOptions = exports.ConversationMode = exports.ConversationEndEntity = exports.Constants = exports.ConfirmationState = exports.AriaTelemetryConstants = exports.AMSConstants = void 0;
|
|
6
|
+
exports.WidgetLoadTelemetryMessage = exports.WidgetLoadCustomErrorString = exports.WebChatMiddlewareConstants = exports.TranscriptConstants = exports.StorageType = exports.StartChatErrorPaneConstants = exports.Regex = exports.PrepareEndChatDescriptionConstants = exports.ParticipantType = exports.NotificationPaneConstants = exports.MimeTypes = exports.LocaleConstants = exports.LiveWorkItemState = exports.HtmlIdNames = exports.HtmlElementSelectors = exports.HtmlClassNames = exports.HtmlAttributeNames = exports.EnvironmentVersion = exports.ElementType = exports.E2VVOptions = exports.ConversationMode = exports.ConversationEndEntity = exports.Constants = exports.ConfirmationState = exports.AriaTelemetryConstants = exports.AMSConstants = void 0;
|
|
7
7
|
var _class;
|
|
8
8
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
9
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
@@ -274,6 +274,15 @@ _defineProperty(NotificationPaneConstants, "IconText", "Notification Icon");
|
|
|
274
274
|
_defineProperty(NotificationPaneConstants, "ChatDisconnectTitleText", "Chat disconnected");
|
|
275
275
|
_defineProperty(NotificationPaneConstants, "ChatDisconnectSubtitleText", "For additional assistance, please close the chat and try again.");
|
|
276
276
|
_defineProperty(NotificationPaneConstants, "ChromeCloseIconName", "ChromeClose");
|
|
277
|
+
class StartChatErrorPaneConstants {}
|
|
278
|
+
exports.StartChatErrorPaneConstants = StartChatErrorPaneConstants;
|
|
279
|
+
_defineProperty(StartChatErrorPaneConstants, "DefaultStartChatErrorPaneId", "oc-lcw-start-chat-error-pane");
|
|
280
|
+
_defineProperty(StartChatErrorPaneConstants, "DefaultStartChatErrorTitleText", "We are unable to load chat at this time.");
|
|
281
|
+
_defineProperty(StartChatErrorPaneConstants, "DefaultStartChatErrorSubtitleText", "Please try again later.");
|
|
282
|
+
_defineProperty(StartChatErrorPaneConstants, "DefaultStartChatErrorUnauthorizedTitleText", "Chat authentication has failed.");
|
|
283
|
+
_defineProperty(StartChatErrorPaneConstants, "DefaultStartChatErrorAuthSetupErrorTitleText", "Chat authentication has failed.");
|
|
284
|
+
_defineProperty(StartChatErrorPaneConstants, "DefaultStartChatErrorUnauthorizedSubtitleText", "UNAUTHORIZED");
|
|
285
|
+
_defineProperty(StartChatErrorPaneConstants, "DefaultStartChatErrorAuthSetupErrorSubtitleText", "AUTH SETUP ERROR");
|
|
277
286
|
class AriaTelemetryConstants {}
|
|
278
287
|
exports.AriaTelemetryConstants = AriaTelemetryConstants;
|
|
279
288
|
// Aria Endpoint for different environment types.
|
|
@@ -296,4 +305,16 @@ _defineProperty(WidgetLoadTelemetryMessage, "PersistedStateRetrievedMessage", "P
|
|
|
296
305
|
class WidgetLoadCustomErrorString {}
|
|
297
306
|
exports.WidgetLoadCustomErrorString = WidgetLoadCustomErrorString;
|
|
298
307
|
_defineProperty(WidgetLoadCustomErrorString, "AuthenticationFailedErrorString", "Authentication was not successful");
|
|
299
|
-
_defineProperty(WidgetLoadCustomErrorString, "NetworkErrorString", "Network Error");
|
|
308
|
+
_defineProperty(WidgetLoadCustomErrorString, "NetworkErrorString", "Network Error");
|
|
309
|
+
class PrepareEndChatDescriptionConstants {}
|
|
310
|
+
exports.PrepareEndChatDescriptionConstants = PrepareEndChatDescriptionConstants;
|
|
311
|
+
_defineProperty(PrepareEndChatDescriptionConstants, "ConversationEndedByCustomerWithoutPostChat", "Conversation ended by customer. Post chat not configured or should not show.");
|
|
312
|
+
_defineProperty(PrepareEndChatDescriptionConstants, "ConversationEndedByCustomerWithInvalidPostChat", "Conversation ended by customer. Post chat context is invalid.");
|
|
313
|
+
_defineProperty(PrepareEndChatDescriptionConstants, "ConversationEndedBy", "Conversation ended by");
|
|
314
|
+
_defineProperty(PrepareEndChatDescriptionConstants, "PrepareEndChatError", "There's an error while preparing to end chat. Closing chat widget.");
|
|
315
|
+
_defineProperty(PrepareEndChatDescriptionConstants, "WidgetLoadFailedAfterSessionInit", "SessionInit was successful, but widget load failed. Ending chat to avoid ghost chats in OC.");
|
|
316
|
+
_defineProperty(PrepareEndChatDescriptionConstants, "InitiateEndChatReceived", "Received InitiateEndChat BroadcastEvent while conversation state is not Active. Ending chat.");
|
|
317
|
+
_defineProperty(PrepareEndChatDescriptionConstants, "EndChatReceivedFromOtherTabs", "Received EndChat BroadcastEvent from other tabs. Closing this chat.");
|
|
318
|
+
_defineProperty(PrepareEndChatDescriptionConstants, "CustomerCloseChatOnFailureOrPostChat", "Customer is trying to close chat widget on start chat failure or post chat pane.");
|
|
319
|
+
_defineProperty(PrepareEndChatDescriptionConstants, "CustomerCloseInactiveChat", "Chat was Inactive and customer is trying to close chat widget or refreshing the page.");
|
|
320
|
+
_defineProperty(PrepareEndChatDescriptionConstants, "BrowserUnload", "Browser unload event received. Ending chat.");
|
|
@@ -123,6 +123,7 @@ exports.TelemetryEvent = TelemetryEvent;
|
|
|
123
123
|
TelemetryEvent["StartChatSDKCall"] = "StartChatCall";
|
|
124
124
|
TelemetryEvent["StartChatEventRecevied"] = "StartChatEventReceived";
|
|
125
125
|
TelemetryEvent["EndChatSDKCall"] = "EndChatSDKCall";
|
|
126
|
+
TelemetryEvent["PrepareEndChat"] = "PrepareEndChat";
|
|
126
127
|
TelemetryEvent["EndChatEventReceived"] = "EndChatEventReceived";
|
|
127
128
|
TelemetryEvent["WindowClosed"] = "WindowClosed";
|
|
128
129
|
TelemetryEvent["OnNewMessageFailed"] = "OnNewMessageFailed";
|
|
@@ -136,6 +137,7 @@ exports.TelemetryEvent = TelemetryEvent;
|
|
|
136
137
|
TelemetryEvent["ConfirmationCancelButtonClicked"] = "ConfirmationCancelButtonClicked";
|
|
137
138
|
TelemetryEvent["ConfirmationConfirmButtonClicked"] = "ConfirmationConfirmButtonClicked";
|
|
138
139
|
TelemetryEvent["LoadingPaneLoaded"] = "LoadingPaneLoaded";
|
|
140
|
+
TelemetryEvent["StartChatErrorPaneLoaded"] = "StartChatErrorPaneLoaded";
|
|
139
141
|
TelemetryEvent["EmailTranscriptLoaded"] = "EmailTranscriptLoaded";
|
|
140
142
|
TelemetryEvent["OutOfOfficePaneLoaded"] = "OutOfOfficePaneLoaded";
|
|
141
143
|
TelemetryEvent["ConfirmationPaneLoaded"] = "ConfirmationPaneLoaded";
|
|
@@ -289,6 +291,7 @@ class TelemetryConstants {
|
|
|
289
291
|
case TelemetryEvent.PostChatContextCallFailed:
|
|
290
292
|
case TelemetryEvent.PostChatContextCallSucceed:
|
|
291
293
|
case TelemetryEvent.GetConversationDetailsException:
|
|
294
|
+
case TelemetryEvent.PrepareEndChat:
|
|
292
295
|
return ScenarioType.SDK;
|
|
293
296
|
case TelemetryEvent.VideoCallAcceptButtonClick:
|
|
294
297
|
case TelemetryEvent.CallAdded:
|
|
@@ -20,7 +20,7 @@ var _omnichannelChatSdk = require("@microsoft/omnichannel-chat-sdk");
|
|
|
20
20
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
21
|
const prepareEndChat = async (props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter) => {
|
|
22
22
|
try {
|
|
23
|
-
var _conversationDetails$, _state$domainStates;
|
|
23
|
+
var _conversationDetails$, _state$domainStates, _state$appStates3;
|
|
24
24
|
// Use Case: If call is ongoing, end the call by simulating end call button click
|
|
25
25
|
endVoiceVideoCallIfOngoing(chatSDK, dispatch);
|
|
26
26
|
const conversationDetails = await (0, _utils.getConversationDetailsCall)(chatSDK);
|
|
@@ -30,8 +30,13 @@ const prepareEndChat = async (props, chatSDK, state, dispatch, setAdapter, setWe
|
|
|
30
30
|
var _state$appStates;
|
|
31
31
|
// If ended by customer, just close chat
|
|
32
32
|
if ((state === null || state === void 0 ? void 0 : (_state$appStates = state.appStates) === null || _state$appStates === void 0 ? void 0 : _state$appStates.conversationEndedBy) === _Constants.ConversationEndEntity.Customer) {
|
|
33
|
+
_TelemetryHelper.TelemetryHelper.logSDKEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
34
|
+
Event: _TelemetryConstants.TelemetryEvent.PrepareEndChat,
|
|
35
|
+
Description: _Constants.PrepareEndChatDescriptionConstants.ConversationEndedByCustomerWithoutPostChat
|
|
36
|
+
});
|
|
33
37
|
await endChat(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, false, false, true);
|
|
34
38
|
}
|
|
39
|
+
|
|
35
40
|
// Use Case: If ended by Agent, stay chat in InActive state
|
|
36
41
|
return;
|
|
37
42
|
}
|
|
@@ -51,6 +56,10 @@ const prepareEndChat = async (props, chatSDK, state, dispatch, setAdapter, setWe
|
|
|
51
56
|
var _state$appStates2;
|
|
52
57
|
// For Customer intiated conversations, just close chat widget
|
|
53
58
|
if ((state === null || state === void 0 ? void 0 : (_state$appStates2 = state.appStates) === null || _state$appStates2 === void 0 ? void 0 : _state$appStates2.conversationEndedBy) === _Constants.ConversationEndEntity.Customer) {
|
|
59
|
+
_TelemetryHelper.TelemetryHelper.logSDKEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
60
|
+
Event: _TelemetryConstants.TelemetryEvent.PrepareEndChat,
|
|
61
|
+
Description: _Constants.PrepareEndChatDescriptionConstants.ConversationEndedByCustomerWithInvalidPostChat
|
|
62
|
+
});
|
|
54
63
|
await endChat(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, false, false, true);
|
|
55
64
|
return;
|
|
56
65
|
}
|
|
@@ -62,6 +71,15 @@ const prepareEndChat = async (props, chatSDK, state, dispatch, setAdapter, setWe
|
|
|
62
71
|
});
|
|
63
72
|
return;
|
|
64
73
|
}
|
|
74
|
+
|
|
75
|
+
// Log PrepareEndChat if conversation ended by customer (bot and agent cases are handled in LiveChatWidgetStateful.tsx)
|
|
76
|
+
if (state !== null && state !== void 0 && (_state$appStates3 = state.appStates) !== null && _state$appStates3 !== void 0 && _state$appStates3.conversationEndedBy) {
|
|
77
|
+
var _state$appStates4;
|
|
78
|
+
_TelemetryHelper.TelemetryHelper.logSDKEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
79
|
+
Event: _TelemetryConstants.TelemetryEvent.PrepareEndChat,
|
|
80
|
+
Description: `${_Constants.PrepareEndChatDescriptionConstants.ConversationEndedByCustomerWithInvalidPostChat} ${state === null || state === void 0 ? void 0 : (_state$appStates4 = state.appStates) === null || _state$appStates4 === void 0 ? void 0 : _state$appStates4.conversationEndedBy}.`
|
|
81
|
+
});
|
|
82
|
+
}
|
|
65
83
|
endChat(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, false, true, true);
|
|
66
84
|
|
|
67
85
|
// Initiate post chat render
|
|
@@ -80,6 +98,10 @@ const prepareEndChat = async (props, chatSDK, state, dispatch, setAdapter, setWe
|
|
|
80
98
|
|
|
81
99
|
//Close chat widget for any failure in embedded to allow to show start chat button
|
|
82
100
|
if (((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.hideStartChatButton) === false) {
|
|
101
|
+
_TelemetryHelper.TelemetryHelper.logSDKEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
102
|
+
Event: _TelemetryConstants.TelemetryEvent.PrepareEndChat,
|
|
103
|
+
Description: _Constants.PrepareEndChatDescriptionConstants.PrepareEndChatError
|
|
104
|
+
});
|
|
83
105
|
await endChat(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, false, false, true);
|
|
84
106
|
}
|
|
85
107
|
} finally {
|
|
@@ -265,8 +287,8 @@ const endVoiceVideoCallIfOngoing = async (chatSDK, dispatch) => {
|
|
|
265
287
|
};
|
|
266
288
|
exports.endVoiceVideoCallIfOngoing = endVoiceVideoCallIfOngoing;
|
|
267
289
|
const closeChatWidget = (dispatch, props, state) => {
|
|
268
|
-
var _state$
|
|
269
|
-
if (state !== null && state !== void 0 && (_state$
|
|
290
|
+
var _state$appStates5;
|
|
291
|
+
if (state !== null && state !== void 0 && (_state$appStates5 = state.appStates) !== null && _state$appStates5 !== void 0 && _state$appStates5.hideStartChatButton) {
|
|
270
292
|
var _props$controlProps2, _props$controlProps3;
|
|
271
293
|
// Only close chat if header is enabled for popout
|
|
272
294
|
// TODO : This condition needs to be removed eventually when the filler UX is ready for popout, removing this condition would show a blank screen for OOB Widget
|
|
@@ -59,11 +59,19 @@ const initWebChatComposer = (props, state, dispatch, chatSDK, endChat) => {
|
|
|
59
59
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
60
60
|
const conversationDetails = await (0, _utils.getConversationDetailsCall)(chatSDK);
|
|
61
61
|
if ((conversationDetails === null || conversationDetails === void 0 ? void 0 : conversationDetails.participantType) === _Constants.ParticipantType.Bot) {
|
|
62
|
+
_TelemetryHelper.TelemetryHelper.logActionEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
63
|
+
Event: _TelemetryConstants.TelemetryEvent.ConversationEndedThreadEventReceived,
|
|
64
|
+
Description: "Conversation end by bot or timeout event received."
|
|
65
|
+
});
|
|
62
66
|
dispatch({
|
|
63
67
|
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CONVERSATION_ENDED_BY,
|
|
64
68
|
payload: _Constants.ConversationEndEntity.Bot
|
|
65
69
|
});
|
|
66
70
|
} else {
|
|
71
|
+
_TelemetryHelper.TelemetryHelper.logActionEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
72
|
+
Event: _TelemetryConstants.TelemetryEvent.ConversationEndedThreadEventReceived,
|
|
73
|
+
Description: "Conversation end by agent or timeout event received."
|
|
74
|
+
});
|
|
67
75
|
dispatch({
|
|
68
76
|
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CONVERSATION_ENDED_BY,
|
|
69
77
|
payload: _Constants.ConversationEndEntity.Agent
|
|
@@ -75,10 +83,6 @@ const initWebChatComposer = (props, state, dispatch, chatSDK, endChat) => {
|
|
|
75
83
|
payload: conversationDetails === null || conversationDetails === void 0 ? void 0 : conversationDetails.participantType
|
|
76
84
|
});
|
|
77
85
|
}
|
|
78
|
-
_TelemetryHelper.TelemetryHelper.logActionEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
79
|
-
Event: _TelemetryConstants.TelemetryEvent.ConversationEndedThreadEventReceived,
|
|
80
|
-
Description: "Conversation end by agent side or by timeout event received."
|
|
81
|
-
});
|
|
82
86
|
};
|
|
83
87
|
webChatStore = (0, _botframeworkWebchat.createStore)({},
|
|
84
88
|
//initial state
|
|
@@ -14,6 +14,7 @@ var _endChat = require("./endChat");
|
|
|
14
14
|
var _DataStoreManager = require("../../../common/contextDataStore/DataStoreManager");
|
|
15
15
|
var _utils = require("../../../common/utils");
|
|
16
16
|
var _Constants = require("../../../common/Constants");
|
|
17
|
+
var _StartChatFailureType = require("../../../contexts/common/StartChatFailureType");
|
|
17
18
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
19
|
const handleStartChatError = (dispatch, chatSDK, props, ex, isStartChatSuccessful) => {
|
|
19
20
|
var _props$controlProps;
|
|
@@ -23,7 +24,14 @@ const handleStartChatError = (dispatch, chatSDK, props, ex, isStartChatSuccessfu
|
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
// Handle internal or misc errors
|
|
26
|
-
if (ex.message === _Constants.WidgetLoadCustomErrorString.AuthenticationFailedErrorString
|
|
27
|
+
if (ex.message === _Constants.WidgetLoadCustomErrorString.AuthenticationFailedErrorString) {
|
|
28
|
+
dispatch({
|
|
29
|
+
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_START_CHAT_FAILURE_TYPE,
|
|
30
|
+
payload: _StartChatFailureType.StartChatFailureType.AuthSetupError
|
|
31
|
+
});
|
|
32
|
+
logWidgetLoadCompleteWithError(ex);
|
|
33
|
+
}
|
|
34
|
+
if (ex.message === _Constants.WidgetLoadCustomErrorString.NetworkErrorString) {
|
|
27
35
|
logWidgetLoadCompleteWithError(ex);
|
|
28
36
|
}
|
|
29
37
|
|
|
@@ -40,7 +48,7 @@ const handleStartChatError = (dispatch, chatSDK, props, ex, isStartChatSuccessfu
|
|
|
40
48
|
handleConversationInitializationFailure(ex);
|
|
41
49
|
break;
|
|
42
50
|
case _omnichannelChatSdk.ChatSDKErrorName.ChatTokenRetrievalFailure:
|
|
43
|
-
handleChatTokenRetrievalFailure(ex);
|
|
51
|
+
handleChatTokenRetrievalFailure(dispatch, ex);
|
|
44
52
|
break;
|
|
45
53
|
case _omnichannelChatSdk.ChatSDKErrorName.UninitializedChatSDK:
|
|
46
54
|
handleUninitializedChatSDK(ex);
|
|
@@ -60,17 +68,24 @@ const handleStartChatError = (dispatch, chatSDK, props, ex, isStartChatSuccessfu
|
|
|
60
68
|
payload: true
|
|
61
69
|
});
|
|
62
70
|
if (!(props !== null && props !== void 0 && (_props$controlProps = props.controlProps) !== null && _props$controlProps !== void 0 && _props$controlProps.hideErrorUIPane)) {
|
|
71
|
+
// New flow of leveraging ConversationState.Error
|
|
63
72
|
// Set app state to failing start chat if hideErrorUI is not turned on
|
|
64
73
|
_TelemetryHelper.TelemetryHelper.logLoadingEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
65
74
|
Event: _TelemetryConstants.TelemetryEvent.ErrorUIPaneLoaded,
|
|
66
75
|
Description: "Error UI Pane Loaded"
|
|
67
76
|
});
|
|
77
|
+
dispatch({
|
|
78
|
+
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
79
|
+
payload: _ConversationState.ConversationState.Error
|
|
80
|
+
});
|
|
81
|
+
} else {
|
|
82
|
+
// Old flow of leveraging ConversationState.Loading
|
|
83
|
+
// Show the loading pane in other cases for failure, this will help for both hideStartChatButton case
|
|
84
|
+
dispatch({
|
|
85
|
+
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
86
|
+
payload: _ConversationState.ConversationState.Loading
|
|
87
|
+
});
|
|
68
88
|
}
|
|
69
|
-
// Show the loading pane in other cases for failure, this will help for both hideStartChatButton case
|
|
70
|
-
dispatch({
|
|
71
|
-
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
72
|
-
payload: _ConversationState.ConversationState.Loading
|
|
73
|
-
});
|
|
74
89
|
|
|
75
90
|
// If sessionInit was successful but LCW startchat failed due to some reason e.g adapter didn't load
|
|
76
91
|
// we need to directly endChat to avoid leaving ghost chats in OC, not disturbing any other UI state
|
|
@@ -126,11 +141,12 @@ const logWidgetLoadCompleteWithError = ex => {
|
|
|
126
141
|
|
|
127
142
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
128
143
|
const forceEndChat = chatSDK => {
|
|
129
|
-
_TelemetryHelper.TelemetryHelper.
|
|
130
|
-
Event: _TelemetryConstants.TelemetryEvent.
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
144
|
+
_TelemetryHelper.TelemetryHelper.logSDKEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
145
|
+
Event: _TelemetryConstants.TelemetryEvent.PrepareEndChat,
|
|
146
|
+
Description: _Constants.PrepareEndChatDescriptionConstants.WidgetLoadFailedAfterSessionInit
|
|
147
|
+
});
|
|
148
|
+
_TelemetryHelper.TelemetryHelper.logSDKEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
149
|
+
Event: _TelemetryConstants.TelemetryEvent.EndChatSDKCall
|
|
134
150
|
});
|
|
135
151
|
chatSDK === null || chatSDK === void 0 ? void 0 : chatSDK.endChat();
|
|
136
152
|
};
|
|
@@ -165,10 +181,16 @@ const handleConversationInitializationFailure = ex => {
|
|
|
165
181
|
};
|
|
166
182
|
|
|
167
183
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
168
|
-
const handleChatTokenRetrievalFailure = ex => {
|
|
184
|
+
const handleChatTokenRetrievalFailure = (dispatch, ex) => {
|
|
169
185
|
if (ex.httpResponseStatusCode === 400) {
|
|
170
186
|
logWidgetLoadFailed(ex);
|
|
171
187
|
} else {
|
|
188
|
+
if (ex.httpResponseStatusCode === 401) {
|
|
189
|
+
dispatch({
|
|
190
|
+
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_START_CHAT_FAILURE_TYPE,
|
|
191
|
+
payload: _StartChatFailureType.StartChatFailureType.Unauthorized
|
|
192
|
+
});
|
|
193
|
+
}
|
|
172
194
|
logWidgetLoadCompleteWithError(ex);
|
|
173
195
|
}
|
|
174
196
|
};
|
|
@@ -55,12 +55,14 @@ var _useChatAdapterStore = _interopRequireDefault(require("../../../hooks/useCha
|
|
|
55
55
|
var _useChatContextStore = _interopRequireDefault(require("../../../hooks/useChatContextStore"));
|
|
56
56
|
var _useChatSDKStore = _interopRequireDefault(require("../../../hooks/useChatSDKStore"));
|
|
57
57
|
var _defaultAdaptiveCardStyles = require("../../webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles");
|
|
58
|
+
var _StartChatErrorPaneStateful = _interopRequireDefault(require("../../startchaterrorpanestateful/StartChatErrorPaneStateful"));
|
|
59
|
+
var _StartChatFailureType = require("../../../contexts/common/StartChatFailureType");
|
|
58
60
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
59
61
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
60
62
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
61
63
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
62
64
|
const LiveChatWidgetStateful = props => {
|
|
63
|
-
var _props$webChatContain, _props$styleProps, _props$controlProps, _props$controlProps3, _state$appStates7, _props$webChatContain5, _state$appStates14, _props$webChatContain6, _props$controlProps12, _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$
|
|
65
|
+
var _props$webChatContain, _props$styleProps, _props$controlProps, _props$controlProps3, _state$appStates7, _props$webChatContain5, _state$appStates14, _props$webChatContain6, _props$controlProps12, _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$compon8, _livechatProps$contro10, _livechatProps$contro11, _livechatProps$compon9, _livechatProps$contro12, _livechatProps$compon10, _livechatProps$contro13, _livechatProps$compon11, _livechatProps$compon12, _livechatProps$compon13;
|
|
64
66
|
const [state, dispatch] = (0, _useChatContextStore.default)();
|
|
65
67
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
66
68
|
const [adapter, setAdapter] = (0, _useChatAdapterStore.default)();
|
|
@@ -193,6 +195,14 @@ const LiveChatWidgetStateful = props => {
|
|
|
193
195
|
};
|
|
194
196
|
(0, _react2.useEffect)(() => {
|
|
195
197
|
var _props$controlProps5, _props$controlProps6, _props$controlProps7, _props$chatConfig, _props$chatConfig$Liv, _props$controlProps9, _props$chatConfig2, _props$chatConfig2$Ch, _state$appStates5;
|
|
198
|
+
dispatch({
|
|
199
|
+
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_START_CHAT_FAILING,
|
|
200
|
+
payload: false
|
|
201
|
+
});
|
|
202
|
+
dispatch({
|
|
203
|
+
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_START_CHAT_FAILURE_TYPE,
|
|
204
|
+
payload: _StartChatFailureType.StartChatFailureType.Generic
|
|
205
|
+
});
|
|
196
206
|
state.domainStates.confirmationPaneConfirmedOptionClicked = false;
|
|
197
207
|
state.domainStates.confirmationState = _Constants.ConfirmationState.NotSet;
|
|
198
208
|
setupClientDataStore();
|
|
@@ -403,9 +413,23 @@ const LiveChatWidgetStateful = props => {
|
|
|
403
413
|
|
|
404
414
|
// End chat
|
|
405
415
|
_omnichannelChatComponents.BroadcastService.getMessageByEventName(_TelemetryConstants.BroadcastEvent.InitiateEndChat).subscribe(async () => {
|
|
416
|
+
_TelemetryHelper.TelemetryHelper.logSDKEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
417
|
+
Event: _TelemetryConstants.TelemetryEvent.EndChatEventReceived,
|
|
418
|
+
Description: "Received InitiateEndChat BroadcastEvent."
|
|
419
|
+
});
|
|
420
|
+
|
|
406
421
|
// This is to ensure to get latest state from cache in multitab
|
|
407
422
|
const persistedState = (0, _utils.getStateFromCache)((0, _utils.getWidgetCacheIdfromProps)(props));
|
|
408
423
|
if (persistedState && persistedState.appStates.conversationState === _ConversationState.ConversationState.Active) {
|
|
424
|
+
// We need to simulate states for closing chat, in order to messup with close confirmation pane.
|
|
425
|
+
dispatch({
|
|
426
|
+
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CONFIRMATION_STATE,
|
|
427
|
+
payload: _Constants.ConfirmationState.Ok
|
|
428
|
+
});
|
|
429
|
+
dispatch({
|
|
430
|
+
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_SHOW_CONFIRMATION,
|
|
431
|
+
payload: false
|
|
432
|
+
});
|
|
409
433
|
dispatch({
|
|
410
434
|
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CONVERSATION_ENDED_BY,
|
|
411
435
|
payload: _Constants.ConversationEndEntity.Customer
|
|
@@ -413,6 +437,10 @@ const LiveChatWidgetStateful = props => {
|
|
|
413
437
|
} else {
|
|
414
438
|
const skipEndChatSDK = true;
|
|
415
439
|
const skipCloseChat = false;
|
|
440
|
+
_TelemetryHelper.TelemetryHelper.logSDKEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
441
|
+
Event: _TelemetryConstants.TelemetryEvent.PrepareEndChat,
|
|
442
|
+
Description: _Constants.PrepareEndChatDescriptionConstants.InitiateEndChatReceived
|
|
443
|
+
});
|
|
416
444
|
(0, _endChat.endChat)(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, skipEndChatSDK, skipCloseChat);
|
|
417
445
|
}
|
|
418
446
|
_omnichannelChatComponents.BroadcastService.postMessage({
|
|
@@ -430,6 +458,10 @@ const LiveChatWidgetStateful = props => {
|
|
|
430
458
|
_omnichannelChatComponents.BroadcastService.getMessageByEventName(endChatEventName).subscribe(msg => {
|
|
431
459
|
var _msg$payload9;
|
|
432
460
|
if ((msg === null || msg === void 0 ? void 0 : (_msg$payload9 = msg.payload) === null || _msg$payload9 === void 0 ? void 0 : _msg$payload9.runtimeId) !== _TelemetryManager.TelemetryManager.InternalTelemetryData.lcwRuntimeId) {
|
|
461
|
+
_TelemetryHelper.TelemetryHelper.logSDKEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
462
|
+
Event: _TelemetryConstants.TelemetryEvent.PrepareEndChat,
|
|
463
|
+
Description: "Received EndChat BroadcastEvent from other tabs. Closing this chat."
|
|
464
|
+
});
|
|
433
465
|
(0, _endChat.endChat)(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, true, false, false);
|
|
434
466
|
(0, _endChat.endChatStateCleanUp)(dispatch);
|
|
435
467
|
(0, _endChat.chatSDKStateCleanUp)(chatSDK);
|
|
@@ -560,12 +592,20 @@ const LiveChatWidgetStateful = props => {
|
|
|
560
592
|
|
|
561
593
|
// If start chat failed, and C2 is trying to close chat widget
|
|
562
594
|
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.ConversationState.Postchat) {
|
|
595
|
+
_TelemetryHelper.TelemetryHelper.logSDKEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
596
|
+
Event: _TelemetryConstants.TelemetryEvent.PrepareEndChat,
|
|
597
|
+
Description: _Constants.PrepareEndChatDescriptionConstants.CustomerCloseChatOnFailureOrPostChat
|
|
598
|
+
});
|
|
563
599
|
(0, _endChat.endChat)(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, true, false, true);
|
|
564
600
|
return;
|
|
565
601
|
}
|
|
566
602
|
|
|
567
603
|
// Scenario -> Chat was InActive and closing the chat (Refresh scenario on post chat)
|
|
568
604
|
if ((state === null || state === void 0 ? void 0 : (_state$appStates11 = state.appStates) === null || _state$appStates11 === void 0 ? void 0 : _state$appStates11.conversationState) === _ConversationState.ConversationState.InActive) {
|
|
605
|
+
_TelemetryHelper.TelemetryHelper.logSDKEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
606
|
+
Event: _TelemetryConstants.TelemetryEvent.PrepareEndChat,
|
|
607
|
+
Description: _Constants.PrepareEndChatDescriptionConstants.CustomerCloseInactiveChat
|
|
608
|
+
});
|
|
569
609
|
(0, _endChat.endChat)(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, false, false, true);
|
|
570
610
|
return;
|
|
571
611
|
}
|
|
@@ -618,6 +658,10 @@ const LiveChatWidgetStateful = props => {
|
|
|
618
658
|
Event: _TelemetryConstants.TelemetryEvent.BrowserUnloadEventStarted,
|
|
619
659
|
Description: "Browser unload event received."
|
|
620
660
|
});
|
|
661
|
+
_TelemetryHelper.TelemetryHelper.logSDKEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
662
|
+
Event: _TelemetryConstants.TelemetryEvent.PrepareEndChat,
|
|
663
|
+
Description: _Constants.PrepareEndChatDescriptionConstants.BrowserUnload
|
|
664
|
+
});
|
|
621
665
|
(0, _endChat.endChat)(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, false, false, false);
|
|
622
666
|
// Clean local storage
|
|
623
667
|
(_DataStoreManager$cli = _DataStoreManager.DataStoreManager.clientDataStore) === null || _DataStoreManager$cli === void 0 ? void 0 : _DataStoreManager$cli.removeData(widgetStateEventId);
|
|
@@ -707,18 +751,18 @@ const LiveChatWidgetStateful = props => {
|
|
|
707
751
|
}, headerDraggableConfig))), !((_livechatProps$contro5 = livechatProps.controlProps) !== null && _livechatProps$contro5 !== void 0 && _livechatProps$contro5.hideLoadingPane) && (0, _componentController.shouldShowLoadingPane)(state) && ((0, _omnichannelChatComponents.decodeComponentString)((_livechatProps$compon4 = livechatProps.componentOverrides) === null || _livechatProps$compon4 === void 0 ? void 0 : _livechatProps$compon4.loadingPane) || /*#__PURE__*/_react2.default.createElement(_LoadingPaneStateful.default, {
|
|
708
752
|
loadingPaneProps: livechatProps.loadingPaneProps,
|
|
709
753
|
startChatErrorPaneProps: livechatProps.startChatErrorPaneProps
|
|
710
|
-
})), !((_livechatProps$contro6 = livechatProps.controlProps) !== null && _livechatProps$contro6 !== void 0 && _livechatProps$contro6.
|
|
754
|
+
})), !((_livechatProps$contro6 = livechatProps.controlProps) !== null && _livechatProps$contro6 !== void 0 && _livechatProps$contro6.hideErrorUIPane) && (0, _componentController.shouldShowStartChatErrorPane)(state) && ((0, _omnichannelChatComponents.decodeComponentString)((_livechatProps$compon5 = livechatProps.componentOverrides) === null || _livechatProps$compon5 === void 0 ? void 0 : _livechatProps$compon5.startChatErrorPane) || /*#__PURE__*/_react2.default.createElement(_StartChatErrorPaneStateful.default, livechatProps.startChatErrorPaneProps)), !((_livechatProps$contro7 = livechatProps.controlProps) !== null && _livechatProps$contro7 !== void 0 && _livechatProps$contro7.hideOutOfOfficeHoursPane) && (0, _componentController.shouldShowOutOfOfficeHoursPane)(state) && ((0, _omnichannelChatComponents.decodeComponentString)((_livechatProps$compon6 = livechatProps.componentOverrides) === null || _livechatProps$compon6 === void 0 ? void 0 : _livechatProps$compon6.outOfOfficeHoursPane) || /*#__PURE__*/_react2.default.createElement(_OOOHPaneStateful.default, livechatProps.outOfOfficeHoursPaneProps)), !((_livechatProps$contro8 = livechatProps.controlProps) !== null && _livechatProps$contro8 !== void 0 && _livechatProps$contro8.hideReconnectChatPane) && (0, _componentController.shouldShowReconnectChatPane)(state) && ((0, _omnichannelChatComponents.decodeComponentString)((_livechatProps$compon7 = livechatProps.componentOverrides) === null || _livechatProps$compon7 === void 0 ? void 0 : _livechatProps$compon7.reconnectChatPane) || /*#__PURE__*/_react2.default.createElement(_ReconnectChatPaneStateful.default, {
|
|
711
755
|
reconnectChatProps: livechatProps.reconnectChatPaneProps,
|
|
712
756
|
initStartChat: initStartChatRelay
|
|
713
|
-
})), !((_livechatProps$
|
|
757
|
+
})), !((_livechatProps$contro9 = livechatProps.controlProps) !== null && _livechatProps$contro9 !== void 0 && _livechatProps$contro9.hidePreChatSurveyPane) && (0, _componentController.shouldShowPreChatSurveyPane)(state) && ((0, _omnichannelChatComponents.decodeComponentString)((_livechatProps$compon8 = livechatProps.componentOverrides) === null || _livechatProps$compon8 === void 0 ? void 0 : _livechatProps$compon8.preChatSurveyPane) || /*#__PURE__*/_react2.default.createElement(_PreChatSurveyPaneStateful.default, {
|
|
714
758
|
surveyProps: livechatProps.preChatSurveyPaneProps,
|
|
715
759
|
initStartChat: initStartChatRelay
|
|
716
|
-
})), !((_livechatProps$
|
|
760
|
+
})), !((_livechatProps$contro10 = livechatProps.controlProps) !== null && _livechatProps$contro10 !== void 0 && _livechatProps$contro10.hideCallingContainer) && (0, _componentController.shouldShowCallingContainer)(state) && /*#__PURE__*/_react2.default.createElement(_CallingContainerStateful.default, _extends({
|
|
717
761
|
voiceVideoCallingSdk: voiceVideoCallingSDK
|
|
718
|
-
}, livechatProps.callingContainerProps)), !((_livechatProps$
|
|
762
|
+
}, livechatProps.callingContainerProps)), !((_livechatProps$contro11 = livechatProps.controlProps) !== null && _livechatProps$contro11 !== void 0 && _livechatProps$contro11.hideWebChatContainer) && (0, _componentController.shouldShowWebChatContainer)(state) && ((0, _omnichannelChatComponents.decodeComponentString)((_livechatProps$compon9 = livechatProps.componentOverrides) === null || _livechatProps$compon9 === void 0 ? void 0 : _livechatProps$compon9.webChatContainer) || /*#__PURE__*/_react2.default.createElement(_WebChatContainerStateful.default, livechatProps)), !((_livechatProps$contro12 = livechatProps.controlProps) !== null && _livechatProps$contro12 !== void 0 && _livechatProps$contro12.hideConfirmationPane) && (0, _componentController.shouldShowConfirmationPane)(state) && ((0, _omnichannelChatComponents.decodeComponentString)((_livechatProps$compon10 = livechatProps.componentOverrides) === null || _livechatProps$compon10 === void 0 ? void 0 : _livechatProps$compon10.confirmationPane) || /*#__PURE__*/_react2.default.createElement(_ConfirmationPaneStateful.default, _extends({}, confirmationPaneProps, {
|
|
719
763
|
setPostChatContext: setPostChatContextRelay,
|
|
720
764
|
prepareEndChat: prepareEndChatRelay
|
|
721
|
-
}))), !((_livechatProps$
|
|
765
|
+
}))), !((_livechatProps$contro13 = livechatProps.controlProps) !== null && _livechatProps$contro13 !== void 0 && _livechatProps$contro13.hidePostChatLoadingPane) && (0, _componentController.shouldShowPostChatLoadingPane)(state) && ((0, _omnichannelChatComponents.decodeComponentString)((_livechatProps$compon11 = livechatProps.componentOverrides) === null || _livechatProps$compon11 === void 0 ? void 0 : _livechatProps$compon11.postChatLoadingPane) || /*#__PURE__*/_react2.default.createElement(_PostChatLoadingPaneStateful.default, livechatProps.postChatLoadingPaneProps)), (0, _componentController.shouldShowPostChatSurveyPane)(state) && ((0, _omnichannelChatComponents.decodeComponentString)((_livechatProps$compon12 = livechatProps.componentOverrides) === null || _livechatProps$compon12 === void 0 ? void 0 : _livechatProps$compon12.postChatSurveyPane) || /*#__PURE__*/_react2.default.createElement(_PostChatSurveyPaneStateful.default, _extends({}, livechatProps.postChatSurveyPaneProps, livechatProps.chatSDK))), (0, _createFooter.createFooter)(livechatProps, state), (0, _componentController.shouldShowEmailTranscriptPane)(state) && ((0, _omnichannelChatComponents.decodeComponentString)((_livechatProps$compon13 = livechatProps.componentOverrides) === null || _livechatProps$compon13 === void 0 ? void 0 : _livechatProps$compon13.emailTranscriptPane) || /*#__PURE__*/_react2.default.createElement(_EmailTranscriptPaneStateful.default, livechatProps.emailTranscriptPane))))));
|
|
722
766
|
};
|
|
723
767
|
exports.LiveChatWidgetStateful = LiveChatWidgetStateful;
|
|
724
768
|
var _default = LiveChatWidgetStateful;
|
|
@@ -9,10 +9,10 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
var _omnichannelChatComponents = require("@microsoft/omnichannel-chat-components");
|
|
10
10
|
var _TelemetryHelper = require("../../common/telemetry/TelemetryHelper");
|
|
11
11
|
var _defaultgeneralLoadingPaneStyleProps = require("./common/defaultStyleProps/defaultgeneralLoadingPaneStyleProps");
|
|
12
|
-
var _errorUILoadingPaneStyleProps = require("./common/errorUIStyleProps/errorUILoadingPaneStyleProps");
|
|
13
12
|
var _utils = require("../../common/utils");
|
|
14
13
|
var _useChatContextStore = _interopRequireDefault(require("../../hooks/useChatContextStore"));
|
|
15
14
|
var _useWindowDimensions = _interopRequireDefault(require("../../hooks/useWindowDimensions"));
|
|
15
|
+
var _errorUILoadingPaneStyleProps = require("./common/errorUIStyleProps/errorUILoadingPaneStyleProps");
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
18
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.StartChatErrorPaneStateful = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _omnichannelChatComponents = require("@microsoft/omnichannel-chat-components");
|
|
9
|
+
var _utils = require("../../common/utils");
|
|
10
|
+
var _useChatContextStore = _interopRequireDefault(require("../../hooks/useChatContextStore"));
|
|
11
|
+
var _TelemetryHelper = require("../../common/telemetry/TelemetryHelper");
|
|
12
|
+
var _TelemetryConstants = require("../../common/telemetry/TelemetryConstants");
|
|
13
|
+
var _defaultStartChatErrorPaneGeneralStyleProps = require("./common/defaultStartChatErrorPaneGeneralStyleProps");
|
|
14
|
+
var _defaultStartChatErrorPaneTitleStyleProps = require("./common/defaultStartChatErrorPaneTitleStyleProps");
|
|
15
|
+
var _defaultStartChatErrorPaneSubtitleStyleProps = require("./common/defaultStartChatErrorPaneSubtitleStyleProps");
|
|
16
|
+
var _defaultStartChatErrorPaneIconStyleProps = require("./common/defaultStartChatErrorPaneIconStyleProps");
|
|
17
|
+
var _defaultStartChatErrorPaneIconImageProps = require("./common/defaultStartChatErrorPaneIconImageProps");
|
|
18
|
+
var _Constants = require("../../common/Constants");
|
|
19
|
+
var _StartChatFailureType = require("../../contexts/common/StartChatFailureType");
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
22
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
|
+
const StartChatErrorPaneStateful = startChatErrorPaneProps => {
|
|
24
|
+
var _startChatErrorPanePr, _startChatErrorPanePr2, _startChatErrorPanePr3, _startChatErrorPanePr4, _startChatErrorPanePr5, _startChatErrorPanePr6, _startChatErrorPanePr7, _startChatErrorPanePr8, _startChatErrorPanePr9, _startChatErrorPanePr10, _startChatErrorPanePr11;
|
|
25
|
+
const [state] = (0, _useChatContextStore.default)();
|
|
26
|
+
const generalStyleProps = Object.assign({}, _defaultStartChatErrorPaneGeneralStyleProps.defaultStartChatErrorPaneGeneralStyleProps, startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr = startChatErrorPaneProps.styleProps) === null || _startChatErrorPanePr === void 0 ? void 0 : _startChatErrorPanePr.generalStyleProps);
|
|
27
|
+
const titleStyleProps = Object.assign({}, _defaultStartChatErrorPaneTitleStyleProps.defaultStartChatErrorPaneTitleStyleProps, startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr2 = startChatErrorPaneProps.styleProps) === null || _startChatErrorPanePr2 === void 0 ? void 0 : _startChatErrorPanePr2.titleStyleProps);
|
|
28
|
+
const subtitleStyleProps = Object.assign({}, _defaultStartChatErrorPaneSubtitleStyleProps.defaultStartChatErrorPaneSubtitleStyleProps, startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr3 = startChatErrorPaneProps.styleProps) === null || _startChatErrorPanePr3 === void 0 ? void 0 : _startChatErrorPanePr3.subtitleStyleProps);
|
|
29
|
+
const iconStyleProps = Object.assign({}, _defaultStartChatErrorPaneIconStyleProps.defaultStartChatErrorPaneIconStyleProps, startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr4 = startChatErrorPaneProps.styleProps) === null || _startChatErrorPanePr4 === void 0 ? void 0 : _startChatErrorPanePr4.iconStyleProps);
|
|
30
|
+
const iconImageProps = Object.assign({}, _defaultStartChatErrorPaneIconImageProps.defaultStartChatErrorPaneIconImageStyleProps, startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr5 = startChatErrorPaneProps.styleProps) === null || _startChatErrorPanePr5 === void 0 ? void 0 : _startChatErrorPanePr5.iconImageProps);
|
|
31
|
+
const errorUIStyleProps = {
|
|
32
|
+
generalStyleProps: generalStyleProps,
|
|
33
|
+
titleStyleProps: titleStyleProps,
|
|
34
|
+
subtitleStyleProps: subtitleStyleProps,
|
|
35
|
+
iconStyleProps: iconStyleProps,
|
|
36
|
+
iconImageProps: iconImageProps
|
|
37
|
+
};
|
|
38
|
+
let errorPaneTitleText;
|
|
39
|
+
let errorPaneSubtitleText;
|
|
40
|
+
switch (state.domainStates.startChatFailureType) {
|
|
41
|
+
case _StartChatFailureType.StartChatFailureType.Unauthorized:
|
|
42
|
+
errorPaneTitleText = (startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr6 = startChatErrorPaneProps.controlProps) === null || _startChatErrorPanePr6 === void 0 ? void 0 : _startChatErrorPanePr6.unauthorizedTitleText) ?? _Constants.StartChatErrorPaneConstants.DefaultStartChatErrorUnauthorizedTitleText;
|
|
43
|
+
errorPaneSubtitleText = (startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr7 = startChatErrorPaneProps.controlProps) === null || _startChatErrorPanePr7 === void 0 ? void 0 : _startChatErrorPanePr7.unauthorizedSubtitleText) ?? _Constants.StartChatErrorPaneConstants.DefaultStartChatErrorUnauthorizedSubtitleText;
|
|
44
|
+
break;
|
|
45
|
+
case _StartChatFailureType.StartChatFailureType.AuthSetupError:
|
|
46
|
+
errorPaneTitleText = (startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr8 = startChatErrorPaneProps.controlProps) === null || _startChatErrorPanePr8 === void 0 ? void 0 : _startChatErrorPanePr8.authSetupErrorTitleText) ?? _Constants.StartChatErrorPaneConstants.DefaultStartChatErrorAuthSetupErrorTitleText;
|
|
47
|
+
errorPaneSubtitleText = (startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr9 = startChatErrorPaneProps.controlProps) === null || _startChatErrorPanePr9 === void 0 ? void 0 : _startChatErrorPanePr9.authSetupErrorSubtitleText) ?? _Constants.StartChatErrorPaneConstants.DefaultStartChatErrorAuthSetupErrorSubtitleText;
|
|
48
|
+
break;
|
|
49
|
+
default:
|
|
50
|
+
errorPaneTitleText = (startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr10 = startChatErrorPaneProps.controlProps) === null || _startChatErrorPanePr10 === void 0 ? void 0 : _startChatErrorPanePr10.titleText) ?? _Constants.StartChatErrorPaneConstants.DefaultStartChatErrorTitleText;
|
|
51
|
+
errorPaneSubtitleText = (startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr11 = startChatErrorPaneProps.controlProps) === null || _startChatErrorPanePr11 === void 0 ? void 0 : _startChatErrorPanePr11.subtitleText) ?? _Constants.StartChatErrorPaneConstants.DefaultStartChatErrorSubtitleText;
|
|
52
|
+
}
|
|
53
|
+
const errorUIControlProps = {
|
|
54
|
+
id: _Constants.StartChatErrorPaneConstants.DefaultStartChatErrorPaneId,
|
|
55
|
+
dir: state.domainStates.globalDir,
|
|
56
|
+
hideSpinner: true,
|
|
57
|
+
hideSpinnerText: true,
|
|
58
|
+
...(startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : startChatErrorPaneProps.controlProps),
|
|
59
|
+
titleText: errorPaneTitleText,
|
|
60
|
+
subtitleText: errorPaneSubtitleText
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
// Move focus to the first button
|
|
64
|
+
(0, _react.useEffect)(() => {
|
|
65
|
+
const firstElement = (0, _utils.findAllFocusableElement)(`#${state.domainStates.widgetElementId}`);
|
|
66
|
+
if (firstElement && firstElement[0]) {
|
|
67
|
+
firstElement[0].focus();
|
|
68
|
+
}
|
|
69
|
+
_TelemetryHelper.TelemetryHelper.logLoadingEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
70
|
+
Event: _TelemetryConstants.TelemetryEvent.StartChatErrorPaneLoaded,
|
|
71
|
+
Description: "Start chat error pane loaded."
|
|
72
|
+
});
|
|
73
|
+
}, []);
|
|
74
|
+
return /*#__PURE__*/_react.default.createElement(_omnichannelChatComponents.LoadingPane, {
|
|
75
|
+
componentOverrides: startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : startChatErrorPaneProps.componentOverrides,
|
|
76
|
+
controlProps: errorUIControlProps,
|
|
77
|
+
styleProps: errorUIStyleProps
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
exports.StartChatErrorPaneStateful = StartChatErrorPaneStateful;
|
|
81
|
+
var _default = StartChatErrorPaneStateful;
|
|
82
|
+
exports.default = _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.defaultStartChatErrorPaneGeneralStyleProps = void 0;
|
|
7
|
+
const defaultStartChatErrorPaneGeneralStyleProps = {
|
|
8
|
+
position: "initial",
|
|
9
|
+
width: "100%",
|
|
10
|
+
height: "100%",
|
|
11
|
+
left: "0%",
|
|
12
|
+
top: "0%",
|
|
13
|
+
borderRadius: "0 0 4px 4px",
|
|
14
|
+
borderWidth: "0px",
|
|
15
|
+
backgroundColor: "#FFFFFF"
|
|
16
|
+
};
|
|
17
|
+
exports.defaultStartChatErrorPaneGeneralStyleProps = defaultStartChatErrorPaneGeneralStyleProps;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.defaultStartChatErrorPaneIconImageStyleProps = void 0;
|
|
7
|
+
var _react = require("@fluentui/react");
|
|
8
|
+
var _Icons = require("../../../assets/Icons");
|
|
9
|
+
const defaultStartChatErrorPaneIconImageStyleProps = {
|
|
10
|
+
src: _Icons.AlertIcon,
|
|
11
|
+
imageFit: _react.ImageFit.centerContain,
|
|
12
|
+
width: "86px",
|
|
13
|
+
height: "86px",
|
|
14
|
+
shouldFadeIn: false,
|
|
15
|
+
shouldStartVisible: true
|
|
16
|
+
};
|
|
17
|
+
exports.defaultStartChatErrorPaneIconImageStyleProps = defaultStartChatErrorPaneIconImageStyleProps;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.defaultStartChatErrorPaneIconStyleProps = void 0;
|
|
7
|
+
const defaultStartChatErrorPaneIconStyleProps = {
|
|
8
|
+
display: "flex",
|
|
9
|
+
order: 1,
|
|
10
|
+
alignSelf: "auto",
|
|
11
|
+
backgroundColor: "#FFFFFF",
|
|
12
|
+
boxShadow: "#FFFFFF 0px 0px 0px 0px",
|
|
13
|
+
margin: "0px 0px 0px 0px"
|
|
14
|
+
};
|
|
15
|
+
exports.defaultStartChatErrorPaneIconStyleProps = defaultStartChatErrorPaneIconStyleProps;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.defaultStartChatErrorPaneSubtitleStyleProps = void 0;
|
|
7
|
+
const defaultStartChatErrorPaneSubtitleStyleProps = {
|
|
8
|
+
fontFamily: "'Segoe UI',Arial,sans-serif",
|
|
9
|
+
fontWeight: "normal",
|
|
10
|
+
fontSize: "18px",
|
|
11
|
+
color: "#36454F",
|
|
12
|
+
textAlign: "center",
|
|
13
|
+
display: "flex",
|
|
14
|
+
order: 3,
|
|
15
|
+
alignSelf: "auto"
|
|
16
|
+
};
|
|
17
|
+
exports.defaultStartChatErrorPaneSubtitleStyleProps = defaultStartChatErrorPaneSubtitleStyleProps;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.defaultStartChatErrorPaneTitleStyleProps = void 0;
|
|
7
|
+
const defaultStartChatErrorPaneTitleStyleProps = {
|
|
8
|
+
fontFamily: "'Segoe UI',Arial,sans-serif",
|
|
9
|
+
fontWeight: "normal",
|
|
10
|
+
fontSize: "18px",
|
|
11
|
+
color: "#36454F",
|
|
12
|
+
textAlign: "center",
|
|
13
|
+
display: "flex",
|
|
14
|
+
order: 2,
|
|
15
|
+
alignSelf: "auto"
|
|
16
|
+
};
|
|
17
|
+
exports.defaultStartChatErrorPaneTitleStyleProps = defaultStartChatErrorPaneTitleStyleProps;
|
package/lib/cjs/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneControlProps.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|