@microsoft/omnichannel-chat-widget 1.5.1-main.76c6a71 → 1.5.1-main.7897747
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 +31 -8
- package/lib/cjs/common/telemetry/TelemetryConstants.js +3 -2
- package/lib/cjs/common/utils.js +2 -1
- package/lib/cjs/components/livechatwidget/common/chatDisconnectHelper.js +31 -16
- package/lib/cjs/components/livechatwidget/common/endChat.js +41 -7
- package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +8 -4
- package/lib/cjs/components/livechatwidget/common/startChat.js +16 -84
- package/lib/cjs/components/livechatwidget/common/startChatErrorHandler.js +220 -0
- package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +52 -16
- 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 -11
- 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 +26 -6
- package/lib/esm/common/telemetry/TelemetryConstants.js +3 -2
- package/lib/esm/common/utils.js +3 -2
- package/lib/esm/components/livechatwidget/common/chatDisconnectHelper.js +31 -16
- package/lib/esm/components/livechatwidget/common/endChat.js +40 -7
- package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +8 -4
- package/lib/esm/components/livechatwidget/common/startChat.js +17 -85
- package/lib/esm/components/livechatwidget/common/startChatErrorHandler.js +213 -0
- package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +55 -19
- 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 -11
- 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 +29 -4
- package/lib/types/common/telemetry/TelemetryConstants.d.ts +2 -1
- package/lib/types/components/livechatwidget/common/endChat.d.ts +4 -3
- package/lib/types/components/livechatwidget/common/startChatErrorHandler.d.ts +5 -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/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/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/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
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import React, { useEffect } from "react";
|
|
2
|
+
import { LoadingPane } from "@microsoft/omnichannel-chat-components";
|
|
3
|
+
import { findAllFocusableElement } from "../../common/utils";
|
|
4
|
+
import useChatContextStore from "../../hooks/useChatContextStore";
|
|
5
|
+
import { TelemetryHelper } from "../../common/telemetry/TelemetryHelper";
|
|
6
|
+
import { LogLevel, TelemetryEvent } from "../../common/telemetry/TelemetryConstants";
|
|
7
|
+
import { defaultStartChatErrorPaneGeneralStyleProps } from "./common/defaultStartChatErrorPaneGeneralStyleProps";
|
|
8
|
+
import { defaultStartChatErrorPaneTitleStyleProps } from "./common/defaultStartChatErrorPaneTitleStyleProps";
|
|
9
|
+
import { defaultStartChatErrorPaneSubtitleStyleProps } from "./common/defaultStartChatErrorPaneSubtitleStyleProps";
|
|
10
|
+
import { defaultStartChatErrorPaneIconStyleProps } from "./common/defaultStartChatErrorPaneIconStyleProps";
|
|
11
|
+
import { defaultStartChatErrorPaneIconImageStyleProps } from "./common/defaultStartChatErrorPaneIconImageProps";
|
|
12
|
+
import { StartChatErrorPaneConstants } from "../../common/Constants";
|
|
13
|
+
import { StartChatFailureType } from "../../contexts/common/StartChatFailureType";
|
|
14
|
+
export const StartChatErrorPaneStateful = startChatErrorPaneProps => {
|
|
15
|
+
var _startChatErrorPanePr, _startChatErrorPanePr2, _startChatErrorPanePr3, _startChatErrorPanePr4, _startChatErrorPanePr5, _startChatErrorPanePr6, _startChatErrorPanePr7, _startChatErrorPanePr8, _startChatErrorPanePr9, _startChatErrorPanePr10, _startChatErrorPanePr11;
|
|
16
|
+
const [state] = useChatContextStore();
|
|
17
|
+
const generalStyleProps = Object.assign({}, defaultStartChatErrorPaneGeneralStyleProps, startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr = startChatErrorPaneProps.styleProps) === null || _startChatErrorPanePr === void 0 ? void 0 : _startChatErrorPanePr.generalStyleProps);
|
|
18
|
+
const titleStyleProps = Object.assign({}, defaultStartChatErrorPaneTitleStyleProps, startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr2 = startChatErrorPaneProps.styleProps) === null || _startChatErrorPanePr2 === void 0 ? void 0 : _startChatErrorPanePr2.titleStyleProps);
|
|
19
|
+
const subtitleStyleProps = Object.assign({}, defaultStartChatErrorPaneSubtitleStyleProps, startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr3 = startChatErrorPaneProps.styleProps) === null || _startChatErrorPanePr3 === void 0 ? void 0 : _startChatErrorPanePr3.subtitleStyleProps);
|
|
20
|
+
const iconStyleProps = Object.assign({}, defaultStartChatErrorPaneIconStyleProps, startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr4 = startChatErrorPaneProps.styleProps) === null || _startChatErrorPanePr4 === void 0 ? void 0 : _startChatErrorPanePr4.iconStyleProps);
|
|
21
|
+
const iconImageProps = Object.assign({}, defaultStartChatErrorPaneIconImageStyleProps, startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr5 = startChatErrorPaneProps.styleProps) === null || _startChatErrorPanePr5 === void 0 ? void 0 : _startChatErrorPanePr5.iconImageProps);
|
|
22
|
+
const errorUIStyleProps = {
|
|
23
|
+
generalStyleProps: generalStyleProps,
|
|
24
|
+
titleStyleProps: titleStyleProps,
|
|
25
|
+
subtitleStyleProps: subtitleStyleProps,
|
|
26
|
+
iconStyleProps: iconStyleProps,
|
|
27
|
+
iconImageProps: iconImageProps
|
|
28
|
+
};
|
|
29
|
+
let errorPaneTitleText;
|
|
30
|
+
let errorPaneSubtitleText;
|
|
31
|
+
switch (state.domainStates.startChatFailureType) {
|
|
32
|
+
case StartChatFailureType.Unauthorized:
|
|
33
|
+
errorPaneTitleText = (startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr6 = startChatErrorPaneProps.controlProps) === null || _startChatErrorPanePr6 === void 0 ? void 0 : _startChatErrorPanePr6.unauthorizedTitleText) ?? StartChatErrorPaneConstants.DefaultStartChatErrorUnauthorizedTitleText;
|
|
34
|
+
errorPaneSubtitleText = (startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr7 = startChatErrorPaneProps.controlProps) === null || _startChatErrorPanePr7 === void 0 ? void 0 : _startChatErrorPanePr7.unauthorizedSubtitleText) ?? StartChatErrorPaneConstants.DefaultStartChatErrorUnauthorizedSubtitleText;
|
|
35
|
+
break;
|
|
36
|
+
case StartChatFailureType.AuthSetupError:
|
|
37
|
+
errorPaneTitleText = (startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr8 = startChatErrorPaneProps.controlProps) === null || _startChatErrorPanePr8 === void 0 ? void 0 : _startChatErrorPanePr8.authSetupErrorTitleText) ?? StartChatErrorPaneConstants.DefaultStartChatErrorAuthSetupErrorTitleText;
|
|
38
|
+
errorPaneSubtitleText = (startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr9 = startChatErrorPaneProps.controlProps) === null || _startChatErrorPanePr9 === void 0 ? void 0 : _startChatErrorPanePr9.authSetupErrorSubtitleText) ?? StartChatErrorPaneConstants.DefaultStartChatErrorAuthSetupErrorSubtitleText;
|
|
39
|
+
break;
|
|
40
|
+
default:
|
|
41
|
+
errorPaneTitleText = (startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr10 = startChatErrorPaneProps.controlProps) === null || _startChatErrorPanePr10 === void 0 ? void 0 : _startChatErrorPanePr10.titleText) ?? StartChatErrorPaneConstants.DefaultStartChatErrorTitleText;
|
|
42
|
+
errorPaneSubtitleText = (startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr11 = startChatErrorPaneProps.controlProps) === null || _startChatErrorPanePr11 === void 0 ? void 0 : _startChatErrorPanePr11.subtitleText) ?? StartChatErrorPaneConstants.DefaultStartChatErrorSubtitleText;
|
|
43
|
+
}
|
|
44
|
+
const errorUIControlProps = {
|
|
45
|
+
id: StartChatErrorPaneConstants.DefaultStartChatErrorPaneId,
|
|
46
|
+
dir: state.domainStates.globalDir,
|
|
47
|
+
hideSpinner: true,
|
|
48
|
+
hideSpinnerText: true,
|
|
49
|
+
...(startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : startChatErrorPaneProps.controlProps),
|
|
50
|
+
titleText: errorPaneTitleText,
|
|
51
|
+
subtitleText: errorPaneSubtitleText
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
// Move focus to the first button
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
const firstElement = findAllFocusableElement(`#${state.domainStates.widgetElementId}`);
|
|
57
|
+
if (firstElement && firstElement[0]) {
|
|
58
|
+
firstElement[0].focus();
|
|
59
|
+
}
|
|
60
|
+
TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
|
|
61
|
+
Event: TelemetryEvent.StartChatErrorPaneLoaded,
|
|
62
|
+
Description: "Start chat error pane loaded."
|
|
63
|
+
});
|
|
64
|
+
}, []);
|
|
65
|
+
return /*#__PURE__*/React.createElement(LoadingPane, {
|
|
66
|
+
componentOverrides: startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : startChatErrorPaneProps.componentOverrides,
|
|
67
|
+
controlProps: errorUIControlProps,
|
|
68
|
+
styleProps: errorUIStyleProps
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
export default StartChatErrorPaneStateful;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ImageFit } from "@fluentui/react";
|
|
2
|
+
import { AlertIcon } from "../../../assets/Icons";
|
|
3
|
+
export const defaultStartChatErrorPaneIconImageStyleProps = {
|
|
4
|
+
src: AlertIcon,
|
|
5
|
+
imageFit: ImageFit.centerContain,
|
|
6
|
+
width: "86px",
|
|
7
|
+
height: "86px",
|
|
8
|
+
shouldFadeIn: false,
|
|
9
|
+
shouldStartVisible: true
|
|
10
|
+
};
|
package/lib/esm/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneControlProps.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/esm/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneStyleProps.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -11,7 +11,6 @@ import { LogLevel, TelemetryEvent } from "../../../../../common/telemetry/Teleme
|
|
|
11
11
|
import { Constants } from "../../../../../common/Constants";
|
|
12
12
|
import { DirectLineActivityType } from "../../enums/DirectLineActivityType";
|
|
13
13
|
import { DirectLineSenderRole } from "../../enums/DirectLineSenderRole";
|
|
14
|
-
import { MessageTypes } from "../../enums/MessageType";
|
|
15
14
|
import React from "react";
|
|
16
15
|
import { TelemetryHelper } from "../../../../../common/telemetry/TelemetryHelper";
|
|
17
16
|
import { defaultSystemMessageStyles } from "./defaultStyles/defaultSystemMessageStyles";
|
|
@@ -48,7 +47,7 @@ const handleSystemMessage = (next, args, card, systemMessageStyleProps) => {
|
|
|
48
47
|
return () => /*#__PURE__*/React.createElement("div", {
|
|
49
48
|
key: card.activity.id,
|
|
50
49
|
style: systemMessageStyles,
|
|
51
|
-
"aria-hidden": "
|
|
50
|
+
"aria-hidden": "false",
|
|
52
51
|
dangerouslySetInnerHTML: {
|
|
53
52
|
__html: escapeHtml(card.activity.text)
|
|
54
53
|
}
|
|
@@ -74,13 +73,6 @@ export const createActivityMiddleware = (systemMessageStyleProps, userMessageSty
|
|
|
74
73
|
if (card.activity) {
|
|
75
74
|
var _card$activity$from;
|
|
76
75
|
if (((_card$activity$from = card.activity.from) === null || _card$activity$from === void 0 ? void 0 : _card$activity$from.role) === DirectLineSenderRole.Channel) {
|
|
77
|
-
var _card$activity$channe3;
|
|
78
|
-
if (((_card$activity$channe3 = card.activity.channelData) === null || _card$activity$channe3 === void 0 ? void 0 : _card$activity$channe3.type) === MessageTypes.Thread) {
|
|
79
|
-
TelemetryHelper.logActionEvent(LogLevel.INFO, {
|
|
80
|
-
Event: TelemetryEvent.IC3ThreadUpdateEventReceived,
|
|
81
|
-
Description: "IC3 ThreadUpdateEvent Received"
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
76
|
return () => false;
|
|
85
77
|
}
|
|
86
78
|
if (isTagIncluded(card, Constants.hiddenTag)) {
|
|
@@ -101,8 +93,7 @@ export const createActivityMiddleware = (systemMessageStyleProps, userMessageSty
|
|
|
101
93
|
return function () {
|
|
102
94
|
return /*#__PURE__*/React.createElement("div", {
|
|
103
95
|
className: card.activity.from.role === DirectLineSenderRole.User ? Constants.sentMessageClassName : Constants.receivedMessageClassName,
|
|
104
|
-
style: userMessageStyles
|
|
105
|
-
"aria-hidden": "true"
|
|
96
|
+
style: userMessageStyles
|
|
106
97
|
}, next(...args)(...arguments));
|
|
107
98
|
};
|
|
108
99
|
}
|
|
@@ -10,4 +10,5 @@ export let ConversationState;
|
|
|
10
10
|
ConversationState[ConversationState["PostchatLoading"] = 7] = "PostchatLoading";
|
|
11
11
|
ConversationState[ConversationState["Postchat"] = 8] = "Postchat";
|
|
12
12
|
ConversationState[ConversationState["Closed"] = 9] = "Closed";
|
|
13
|
+
ConversationState[ConversationState["Error"] = 10] = "Error";
|
|
13
14
|
})(ConversationState || (ConversationState = {}));
|
|
@@ -8,40 +8,41 @@ export let LiveChatWidgetActionType;
|
|
|
8
8
|
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CONVERSATION_STATE"] = 5] = "SET_CONVERSATION_STATE";
|
|
9
9
|
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_PREVIOUS_FOCUSED_ELEMENT_ID"] = 6] = "SET_PREVIOUS_FOCUSED_ELEMENT_ID";
|
|
10
10
|
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_START_CHAT_FAILING"] = 7] = "SET_START_CHAT_FAILING";
|
|
11
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
12
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
13
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
14
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
15
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
16
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
17
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
18
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
19
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
20
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
21
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
22
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
23
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
24
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
25
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
26
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
27
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
28
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
29
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
30
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
31
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
32
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
33
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
34
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
35
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
36
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
37
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
38
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
39
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
40
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
41
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
42
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
43
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
44
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
45
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
46
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
11
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_START_CHAT_FAILURE_TYPE"] = 8] = "SET_START_CHAT_FAILURE_TYPE";
|
|
12
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_OUTSIDE_OPERATING_HOURS"] = 9] = "SET_OUTSIDE_OPERATING_HOURS";
|
|
13
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_PRE_CHAT_SURVEY_RESPONSE"] = 10] = "SET_PRE_CHAT_SURVEY_RESPONSE";
|
|
14
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CUSTOM_CONTEXT"] = 11] = "SET_CUSTOM_CONTEXT";
|
|
15
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_SHOW_CONFIRMATION"] = 12] = "SET_SHOW_CONFIRMATION";
|
|
16
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_SHOW_EMAIL_TRANSCRIPT_PANE"] = 13] = "SET_SHOW_EMAIL_TRANSCRIPT_PANE";
|
|
17
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_PRECHAT_RESPONSE_EMAIL"] = 14] = "SET_PRECHAT_RESPONSE_EMAIL";
|
|
18
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_AUDIO_NOTIFICATION"] = 15] = "SET_AUDIO_NOTIFICATION";
|
|
19
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_E2VV_ENABLED"] = 16] = "SET_E2VV_ENABLED";
|
|
20
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_POST_CHAT_CONTEXT"] = 17] = "SET_POST_CHAT_CONTEXT";
|
|
21
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SHOW_CALLING_CONTAINER"] = 18] = "SHOW_CALLING_CONTAINER";
|
|
22
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_INCOMING_CALL"] = 19] = "SET_INCOMING_CALL";
|
|
23
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["DISABLE_VIDEO_CALL"] = 20] = "DISABLE_VIDEO_CALL";
|
|
24
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["DISABLE_LOCAL_VIDEO"] = 21] = "DISABLE_LOCAL_VIDEO";
|
|
25
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["DISABLE_REMOTE_VIDEO"] = 22] = "DISABLE_REMOTE_VIDEO";
|
|
26
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CHAT_TOKEN"] = 23] = "SET_CHAT_TOKEN";
|
|
27
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_START_CHAT_BUTTON_DISPLAY"] = 24] = "SET_START_CHAT_BUTTON_DISPLAY";
|
|
28
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_PROACTIVE_CHAT_PARAMS"] = 25] = "SET_PROACTIVE_CHAT_PARAMS";
|
|
29
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_TELEMETRY_DATA"] = 26] = "SET_TELEMETRY_DATA";
|
|
30
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_RECONNECT_ID"] = 27] = "SET_RECONNECT_ID";
|
|
31
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_UNREAD_MESSAGE_COUNT"] = 28] = "SET_UNREAD_MESSAGE_COUNT";
|
|
32
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_FOCUS_CHAT_BUTTON"] = 29] = "SET_FOCUS_CHAT_BUTTON";
|
|
33
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CONVERSATION_ENDED_BY_AGENT_EVENT_RECEIVED"] = 30] = "SET_CONVERSATION_ENDED_BY_AGENT_EVENT_RECEIVED";
|
|
34
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CONVERSATION_ENDED_BY"] = 31] = "SET_CONVERSATION_ENDED_BY";
|
|
35
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_WIDGET_STATE"] = 32] = "SET_WIDGET_STATE";
|
|
36
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_LIVE_CHAT_CONTEXT"] = 33] = "SET_LIVE_CHAT_CONTEXT";
|
|
37
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_BOT_OAUTH_SIGNIN_ID"] = 34] = "SET_BOT_OAUTH_SIGNIN_ID";
|
|
38
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_WIDGET_SIZE"] = 35] = "SET_WIDGET_SIZE";
|
|
39
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_WIDGET_INSTANCE_ID"] = 36] = "SET_WIDGET_INSTANCE_ID";
|
|
40
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_LIVE_CHAT_CONFIG"] = 37] = "SET_LIVE_CHAT_CONFIG";
|
|
41
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_POST_CHAT_WORKFLOW_IN_PROGRESS"] = 38] = "SET_POST_CHAT_WORKFLOW_IN_PROGRESS";
|
|
42
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_INITIAL_CHAT_SDK_REQUEST_ID"] = 39] = "SET_INITIAL_CHAT_SDK_REQUEST_ID";
|
|
43
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_SHOULD_USE_BOT_SURVEY"] = 40] = "SET_SHOULD_USE_BOT_SURVEY";
|
|
44
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CHAT_DISCONNECT_EVENT_RECEIVED"] = 41] = "SET_CHAT_DISCONNECT_EVENT_RECEIVED";
|
|
45
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_SURVEY_MODE"] = 42] = "SET_SURVEY_MODE";
|
|
46
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CONFIRMATION_STATE"] = 43] = "SET_CONFIRMATION_STATE";
|
|
47
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_POST_CHAT_PARTICIPANT_TYPE"] = 44] = "SET_POST_CHAT_PARTICIPANT_TYPE";
|
|
47
48
|
})(LiveChatWidgetActionType || (LiveChatWidgetActionType = {}));
|
|
@@ -3,6 +3,7 @@ import { defaultMiddlewareLocalizedTexts } from "../../components/webchatcontain
|
|
|
3
3
|
import { getWidgetCacheIdfromProps, isNullOrUndefined } from "../../common/utils";
|
|
4
4
|
import { defaultClientDataStoreProvider } from "../../common/storage/default/defaultClientDataStoreProvider";
|
|
5
5
|
import { ConfirmationState, Constants, ConversationEndEntity, StorageType } from "../../common/Constants";
|
|
6
|
+
import { StartChatFailureType } from "./StartChatFailureType";
|
|
6
7
|
export const getLiveChatWidgetContextInitialState = props => {
|
|
7
8
|
var _props$controlProps, _props$webChatContain;
|
|
8
9
|
const widgetCacheId = getWidgetCacheIdfromProps(props);
|
|
@@ -31,7 +32,8 @@ export const getLiveChatWidgetContextInitialState = props => {
|
|
|
31
32
|
initialChatSdkRequestId: "",
|
|
32
33
|
transcriptRequestId: "",
|
|
33
34
|
confirmationPaneConfirmedOptionClicked: false,
|
|
34
|
-
confirmationState: ConfirmationState.NotSet
|
|
35
|
+
confirmationState: ConfirmationState.NotSet,
|
|
36
|
+
startChatFailureType: StartChatFailureType.Generic
|
|
35
37
|
},
|
|
36
38
|
appStates: {
|
|
37
39
|
conversationState: ConversationState.Closed,
|
|
@@ -58,6 +60,7 @@ export const getLiveChatWidgetContextInitialState = props => {
|
|
|
58
60
|
},
|
|
59
61
|
uiStates: {
|
|
60
62
|
showConfirmationPane: false,
|
|
63
|
+
showStartChatErrorPane: false,
|
|
61
64
|
showEmailTranscriptPane: false,
|
|
62
65
|
showCallingPopup: false,
|
|
63
66
|
isIncomingCall: true,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export let StartChatFailureType;
|
|
2
|
+
(function (StartChatFailureType) {
|
|
3
|
+
StartChatFailureType["Unauthorized"] = "unauthorized";
|
|
4
|
+
StartChatFailureType["AuthSetupError"] = "authSetupError";
|
|
5
|
+
StartChatFailureType["Generic"] = "generic";
|
|
6
|
+
})(StartChatFailureType || (StartChatFailureType = {}));
|
|
@@ -61,6 +61,14 @@ export const createReducer = () => {
|
|
|
61
61
|
startChatFailed: action.payload
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
|
+
case LiveChatWidgetActionType.SET_START_CHAT_FAILURE_TYPE:
|
|
65
|
+
return {
|
|
66
|
+
...state,
|
|
67
|
+
domainStates: {
|
|
68
|
+
...state.domainStates,
|
|
69
|
+
startChatFailureType: action.payload
|
|
70
|
+
}
|
|
71
|
+
};
|
|
64
72
|
case LiveChatWidgetActionType.SET_OUTSIDE_OPERATING_HOURS:
|
|
65
73
|
return {
|
|
66
74
|
...state,
|
|
@@ -22,6 +22,9 @@ export const shouldShowWebChatContainer = state => {
|
|
|
22
22
|
export const shouldShowLoadingPane = state => {
|
|
23
23
|
return !state.appStates.isMinimized && state.appStates.conversationState === ConversationState.Loading;
|
|
24
24
|
};
|
|
25
|
+
export const shouldShowStartChatErrorPane = state => {
|
|
26
|
+
return !state.appStates.isMinimized && state.appStates.conversationState === ConversationState.Error;
|
|
27
|
+
};
|
|
25
28
|
export const shouldShowReconnectChatPane = state => {
|
|
26
29
|
return !state.appStates.isMinimized && state.appStates.conversationState === ConversationState.ReconnectChat;
|
|
27
30
|
};
|
|
@@ -160,10 +160,6 @@ export declare class LocaleConstants {
|
|
|
160
160
|
export declare enum ElementType {
|
|
161
161
|
CallingContainerSDK = "CallingContainerSDK"
|
|
162
162
|
}
|
|
163
|
-
export declare enum ChatSDKError {
|
|
164
|
-
WidgetUseOutsideOperatingHour = "WidgetUseOutsideOperatingHour",
|
|
165
|
-
AuthContactIdNotFoundFailure = "AuthContactIdNotFoundFailure"
|
|
166
|
-
}
|
|
167
163
|
export declare enum EnvironmentVersion {
|
|
168
164
|
prod = "prod",
|
|
169
165
|
dogfood = "df",
|
|
@@ -231,6 +227,15 @@ export declare class NotificationPaneConstants {
|
|
|
231
227
|
static readonly ChatDisconnectSubtitleText = "For additional assistance, please close the chat and try again.";
|
|
232
228
|
static readonly ChromeCloseIconName = "ChromeClose";
|
|
233
229
|
}
|
|
230
|
+
export declare class StartChatErrorPaneConstants {
|
|
231
|
+
static readonly DefaultStartChatErrorPaneId = "oc-lcw-start-chat-error-pane";
|
|
232
|
+
static readonly DefaultStartChatErrorTitleText = "We are unable to load chat at this time.";
|
|
233
|
+
static readonly DefaultStartChatErrorSubtitleText = "Please try again later.";
|
|
234
|
+
static readonly DefaultStartChatErrorUnauthorizedTitleText = "Chat authentication has failed.";
|
|
235
|
+
static readonly DefaultStartChatErrorAuthSetupErrorTitleText = "Chat authentication has failed.";
|
|
236
|
+
static readonly DefaultStartChatErrorUnauthorizedSubtitleText = "UNAUTHORIZED";
|
|
237
|
+
static readonly DefaultStartChatErrorAuthSetupErrorSubtitleText = "AUTH SETUP ERROR";
|
|
238
|
+
}
|
|
234
239
|
export declare class AriaTelemetryConstants {
|
|
235
240
|
static readonly GERMANY_ENDPOINT: string;
|
|
236
241
|
static readonly GCCH_ENDPOINT: string;
|
|
@@ -241,3 +246,23 @@ export declare class AriaTelemetryConstants {
|
|
|
241
246
|
static readonly EU: string;
|
|
242
247
|
static readonly lcwEUDomainNames: Array<string>;
|
|
243
248
|
}
|
|
249
|
+
export declare class WidgetLoadTelemetryMessage {
|
|
250
|
+
static readonly OOOHMessage = "Widget is OOOH";
|
|
251
|
+
static readonly PersistedStateRetrievedMessage = "Persisted state retrieved";
|
|
252
|
+
}
|
|
253
|
+
export declare class WidgetLoadCustomErrorString {
|
|
254
|
+
static readonly AuthenticationFailedErrorString = "Authentication was not successful";
|
|
255
|
+
static readonly NetworkErrorString = "Network Error";
|
|
256
|
+
}
|
|
257
|
+
export declare class PrepareEndChatDescriptionConstants {
|
|
258
|
+
static readonly ConversationEndedByCustomerWithoutPostChat = "Conversation ended by customer. Post chat not configured or should not show.";
|
|
259
|
+
static readonly ConversationEndedByCustomerWithInvalidPostChat = "Conversation ended by customer. Post chat context is invalid.";
|
|
260
|
+
static readonly ConversationEndedBy = "Conversation ended by";
|
|
261
|
+
static readonly PrepareEndChatError = "There's an error while preparing to end chat. Closing chat widget.";
|
|
262
|
+
static readonly WidgetLoadFailedAfterSessionInit = "SessionInit was successful, but widget load failed. Ending chat to avoid ghost chats in OC.";
|
|
263
|
+
static readonly InitiateEndChatReceived = "Received InitiateEndChat BroadcastEvent while conversation state is not Active. Ending chat.";
|
|
264
|
+
static readonly EndChatReceivedFromOtherTabs = "Received EndChat BroadcastEvent from other tabs. Closing this chat.";
|
|
265
|
+
static readonly CustomerCloseChatOnFailureOrPostChat = "Customer is trying to close chat widget on start chat failure or post chat pane.";
|
|
266
|
+
static readonly CustomerCloseInactiveChat = "Chat was Inactive and customer is trying to close chat widget or refreshing the page.";
|
|
267
|
+
static readonly BrowserUnload = "Browser unload event received. Ending chat.";
|
|
268
|
+
}
|
|
@@ -110,6 +110,7 @@ export declare enum TelemetryEvent {
|
|
|
110
110
|
StartChatSDKCall = "StartChatCall",
|
|
111
111
|
StartChatEventRecevied = "StartChatEventReceived",
|
|
112
112
|
EndChatSDKCall = "EndChatSDKCall",
|
|
113
|
+
PrepareEndChat = "PrepareEndChat",
|
|
113
114
|
EndChatEventReceived = "EndChatEventReceived",
|
|
114
115
|
WindowClosed = "WindowClosed",
|
|
115
116
|
OnNewMessageFailed = "OnNewMessageFailed",
|
|
@@ -120,10 +121,10 @@ export declare enum TelemetryEvent {
|
|
|
120
121
|
ErrorUIPaneLoaded = "ErrorUIPaneLoaded",
|
|
121
122
|
DownloadTranscriptFailed = "DownloadTranscriptFailed",
|
|
122
123
|
StartChatFailed = "StartChatFailed",
|
|
123
|
-
IC3ThreadUpdateEventReceived = "IC3ThreadUpdateEventReceived",
|
|
124
124
|
ConfirmationCancelButtonClicked = "ConfirmationCancelButtonClicked",
|
|
125
125
|
ConfirmationConfirmButtonClicked = "ConfirmationConfirmButtonClicked",
|
|
126
126
|
LoadingPaneLoaded = "LoadingPaneLoaded",
|
|
127
|
+
StartChatErrorPaneLoaded = "StartChatErrorPaneLoaded",
|
|
127
128
|
EmailTranscriptLoaded = "EmailTranscriptLoaded",
|
|
128
129
|
OutOfOfficePaneLoaded = "OutOfOfficePaneLoaded",
|
|
129
130
|
ConfirmationPaneLoaded = "ConfirmationPaneLoaded",
|
|
@@ -4,8 +4,9 @@ import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidget
|
|
|
4
4
|
import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
|
|
5
5
|
declare const prepareEndChat: (props: ILiveChatWidgetProps, chatSDK: any, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, setWebChatStyles: any, adapter: any) => Promise<void>;
|
|
6
6
|
declare const endChat: (props: ILiveChatWidgetProps, chatSDK: any, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, setWebChatStyles: any, adapter: any, skipEndChatSDK?: boolean | undefined, skipCloseChat?: boolean | undefined, postMessageToOtherTab?: boolean | undefined) => Promise<void>;
|
|
7
|
-
export declare const callingStateCleanUp: (dispatch: Dispatch<ILiveChatWidgetAction>) =>
|
|
8
|
-
export declare const endChatStateCleanUp: (dispatch: Dispatch<ILiveChatWidgetAction>) =>
|
|
9
|
-
export declare const closeChatStateCleanUp: (dispatch: Dispatch<ILiveChatWidgetAction>) =>
|
|
7
|
+
export declare const callingStateCleanUp: (dispatch: Dispatch<ILiveChatWidgetAction>) => void;
|
|
8
|
+
export declare const endChatStateCleanUp: (dispatch: Dispatch<ILiveChatWidgetAction>) => void;
|
|
9
|
+
export declare const closeChatStateCleanUp: (dispatch: Dispatch<ILiveChatWidgetAction>) => void;
|
|
10
|
+
export declare const chatSDKStateCleanUp: (chatSDK: any) => void;
|
|
10
11
|
export declare const endVoiceVideoCallIfOngoing: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>) => Promise<void>;
|
|
11
12
|
export { prepareEndChat, endChat };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Dispatch } from "react";
|
|
2
|
+
import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
|
|
3
|
+
import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
|
|
4
|
+
export declare const handleStartChatError: (dispatch: Dispatch<ILiveChatWidgetAction>, chatSDK: any, props: ILiveChatWidgetProps | undefined, ex: any, isStartChatSuccessful: boolean) => void;
|
|
5
|
+
export declare const logWidgetLoadComplete: (additionalMessage?: string | undefined) => void;
|
package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetComponentOverrides.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export interface ILiveChatWidgetComponentOverrides {
|
|
|
6
6
|
emailTranscriptPane?: ReactNode | string;
|
|
7
7
|
header?: ReactNode | string;
|
|
8
8
|
loadingPane?: ReactNode | string;
|
|
9
|
+
startChatErrorPane?: ReactNode | string;
|
|
9
10
|
outOfOfficeHoursPane?: ReactNode | string;
|
|
10
11
|
postChatLoadingPane?: ReactNode | string;
|
|
11
12
|
postChatSurveyPane?: ReactNode | string;
|
|
@@ -15,7 +15,7 @@ import { IOOOHPaneProps } from "@microsoft/omnichannel-chat-components/lib/types
|
|
|
15
15
|
import { IPreChatSurveyPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneProps";
|
|
16
16
|
import { IProactiveChatPaneStatefulProps } from "../../proactivechatpanestateful/interfaces/IProactiveChatPaneStatefulProps";
|
|
17
17
|
import { IReconnectChatPaneStatefulProps } from "../../reconnectchatpanestateful/interfaces/IReconnectChatPaneStatefulProps";
|
|
18
|
-
import { IStartChatErrorPaneProps } from "../../
|
|
18
|
+
import { IStartChatErrorPaneProps } from "../../startchaterrorpanestateful/interfaces/IStartChatErrorPaneProps";
|
|
19
19
|
import { ITelemetryConfig } from "../../../common/telemetry/interfaces/ITelemetryConfig";
|
|
20
20
|
import { IWebChatContainerStatefulProps } from "../../webchatcontainerstateful/interfaces/IWebChatContainerStatefulProps";
|
|
21
21
|
import { OmnichannelChatSDK } from "@microsoft/omnichannel-chat-sdk";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface IStartChatErrorPaneControlProps {
|
|
2
|
+
id?: string;
|
|
3
|
+
role?: string;
|
|
4
|
+
dir?: "rtl" | "ltr" | "auto";
|
|
5
|
+
hideIcon?: boolean;
|
|
6
|
+
hideTitle?: boolean;
|
|
7
|
+
hideSubtitle?: boolean;
|
|
8
|
+
titleText?: string;
|
|
9
|
+
subtitleText?: string;
|
|
10
|
+
unauthorizedTitleText?: string;
|
|
11
|
+
unauthorizedSubtitleText?: string;
|
|
12
|
+
authSetupErrorTitleText?: string;
|
|
13
|
+
authSetupErrorSubtitleText?: string;
|
|
14
|
+
}
|
package/lib/types/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneProps.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IStartChatErrorPaneComponentOverrides } from "./IStartChatErrorPaneComponentOverrides";
|
|
2
|
+
import { IStartChatErrorPaneControlProps } from "./IStartChatErrorPaneControlProps";
|
|
3
|
+
import { IStartChatErrorPaneStyleProps } from "./IStartChatErrorPaneStyleProps";
|
|
4
|
+
export interface IStartChatErrorPaneProps {
|
|
5
|
+
componentOverrides?: IStartChatErrorPaneComponentOverrides;
|
|
6
|
+
controlProps?: IStartChatErrorPaneControlProps;
|
|
7
|
+
styleProps?: IStartChatErrorPaneStyleProps;
|
|
8
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IImageProps, IStyle } from "@fluentui/react";
|
|
2
|
+
import { IStartChatErrorPaneClassNames } from "./IStartChatErrorPaneClassNames";
|
|
3
|
+
export interface IStartChatErrorPaneStyleProps {
|
|
4
|
+
generalStyleProps?: IStyle;
|
|
5
|
+
titleStyleProps?: IStyle;
|
|
6
|
+
subtitleStyleProps?: IStyle;
|
|
7
|
+
iconStyleProps?: IStyle;
|
|
8
|
+
iconImageProps?: IImageProps;
|
|
9
|
+
classNames?: IStartChatErrorPaneClassNames;
|
|
10
|
+
}
|
|
@@ -4,6 +4,7 @@ import { IInternalTelemetryData } from "../../common/telemetry/interfaces/IInter
|
|
|
4
4
|
import { ILiveChatWidgetLocalizedTexts } from "./ILiveChatWidgetLocalizedTexts";
|
|
5
5
|
import { IRenderingMiddlewareProps } from "../../components/webchatcontainerstateful/interfaces/IRenderingMiddlewareProps";
|
|
6
6
|
import { ConfirmationState, ConversationEndEntity, ParticipantType } from "../../common/Constants";
|
|
7
|
+
import { StartChatFailureType } from "./StartChatFailureType";
|
|
7
8
|
export interface ILiveChatWidgetContext {
|
|
8
9
|
domainStates: {
|
|
9
10
|
liveChatConfig: ChatConfig | undefined;
|
|
@@ -23,6 +24,7 @@ export interface ILiveChatWidgetContext {
|
|
|
23
24
|
transcriptRequestId: string;
|
|
24
25
|
confirmationPaneConfirmedOptionClicked: boolean;
|
|
25
26
|
confirmationState: ConfirmationState;
|
|
27
|
+
startChatFailureType: StartChatFailureType;
|
|
26
28
|
};
|
|
27
29
|
appStates: {
|
|
28
30
|
conversationState: ConversationState;
|
|
@@ -49,6 +51,7 @@ export interface ILiveChatWidgetContext {
|
|
|
49
51
|
};
|
|
50
52
|
uiStates: {
|
|
51
53
|
showConfirmationPane: boolean;
|
|
54
|
+
showStartChatErrorPane: boolean;
|
|
52
55
|
showEmailTranscriptPane: boolean;
|
|
53
56
|
disableVideoCall: boolean;
|
|
54
57
|
showCallingPopup: boolean;
|