@microsoft/omnichannel-chat-widget 1.5.0 → 1.5.1-main.6b98130

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/lib/cjs/common/Constants.js +19 -8
  2. package/lib/cjs/common/telemetry/TelemetryConstants.js +1 -2
  3. package/lib/cjs/common/utils.js +2 -1
  4. package/lib/cjs/components/livechatwidget/common/chatDisconnectHelper.js +31 -16
  5. package/lib/cjs/components/livechatwidget/common/endChat.js +16 -4
  6. package/lib/cjs/components/livechatwidget/common/startChat.js +19 -80
  7. package/lib/cjs/components/livechatwidget/common/startChatErrorHandler.js +219 -0
  8. package/lib/cjs/components/livechatwidget/common/startChatErrorHandler.spec.js +300 -0
  9. package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +18 -16
  10. package/lib/cjs/components/loadingpanestateful/LoadingPaneStateful.js +1 -1
  11. package/lib/cjs/components/startchaterrorpanestateful/StartChatErrorPaneStateful.js +82 -0
  12. package/lib/cjs/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneGeneralStyleProps.js +17 -0
  13. package/lib/cjs/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneIconImageProps.js +17 -0
  14. package/lib/cjs/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneIconStyleProps.js +15 -0
  15. package/lib/cjs/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneSubtitleStyleProps.js +17 -0
  16. package/lib/cjs/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneTitleStyleProps.js +17 -0
  17. package/lib/cjs/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneControlProps.js +1 -0
  18. package/lib/cjs/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneProps.js +1 -0
  19. package/lib/cjs/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneStyleProps.js +1 -0
  20. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +2 -11
  21. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.spec.js +1 -1
  22. package/lib/cjs/contexts/common/ConversationState.js +1 -0
  23. package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +37 -36
  24. package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +4 -1
  25. package/lib/cjs/contexts/common/StartChatFailureType.js +13 -0
  26. package/lib/cjs/contexts/createReducer.js +8 -0
  27. package/lib/cjs/controller/componentController.js +5 -1
  28. package/lib/esm/common/Constants.js +15 -6
  29. package/lib/esm/common/telemetry/TelemetryConstants.js +1 -2
  30. package/lib/esm/common/utils.js +3 -2
  31. package/lib/esm/components/livechatwidget/common/chatDisconnectHelper.js +31 -16
  32. package/lib/esm/components/livechatwidget/common/endChat.js +14 -3
  33. package/lib/esm/components/livechatwidget/common/startChat.js +20 -81
  34. package/lib/esm/components/livechatwidget/common/startChatErrorHandler.js +212 -0
  35. package/lib/esm/components/livechatwidget/common/startChatErrorHandler.spec.js +298 -0
  36. package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +20 -18
  37. package/lib/esm/components/loadingpanestateful/LoadingPaneStateful.js +1 -1
  38. package/lib/esm/components/startchaterrorpanestateful/StartChatErrorPaneStateful.js +71 -0
  39. package/lib/esm/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneGeneralStyleProps.js +10 -0
  40. package/lib/esm/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneIconImageProps.js +10 -0
  41. package/lib/esm/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneIconStyleProps.js +8 -0
  42. package/lib/esm/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneSubtitleStyleProps.js +10 -0
  43. package/lib/esm/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneTitleStyleProps.js +10 -0
  44. package/lib/esm/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneControlProps.js +1 -0
  45. package/lib/esm/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneProps.js +1 -0
  46. package/lib/esm/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneStyleProps.js +1 -0
  47. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +2 -11
  48. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.spec.js +1 -1
  49. package/lib/esm/contexts/common/ConversationState.js +1 -0
  50. package/lib/esm/contexts/common/LiveChatWidgetActionType.js +37 -36
  51. package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +4 -1
  52. package/lib/esm/contexts/common/StartChatFailureType.js +6 -0
  53. package/lib/esm/contexts/createReducer.js +8 -0
  54. package/lib/esm/controller/componentController.js +3 -0
  55. package/lib/types/common/Constants.d.ts +17 -4
  56. package/lib/types/common/telemetry/TelemetryConstants.d.ts +1 -1
  57. package/lib/types/components/livechatwidget/common/endChat.d.ts +4 -3
  58. package/lib/types/components/livechatwidget/common/startChatErrorHandler.d.ts +5 -0
  59. package/lib/types/components/livechatwidget/common/startChatErrorHandler.spec.d.ts +1 -0
  60. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetComponentOverrides.d.ts +1 -0
  61. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +1 -1
  62. package/lib/types/components/startchaterrorpanestateful/StartChatErrorPaneStateful.d.ts +3 -0
  63. package/lib/types/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneGeneralStyleProps.d.ts +2 -0
  64. package/lib/types/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneIconImageProps.d.ts +2 -0
  65. package/lib/types/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneIconStyleProps.d.ts +2 -0
  66. package/lib/types/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneSubtitleStyleProps.d.ts +2 -0
  67. package/lib/types/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneTitleStyleProps.d.ts +2 -0
  68. package/lib/types/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneClassNames.d.ts +5 -0
  69. package/lib/types/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneComponentOverrides.d.ts +6 -0
  70. package/lib/types/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneControlProps.d.ts +14 -0
  71. package/lib/types/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneProps.d.ts +8 -0
  72. package/lib/types/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneStyleProps.d.ts +10 -0
  73. package/lib/types/contexts/common/ConversationState.d.ts +2 -1
  74. package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +3 -0
  75. package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +37 -36
  76. package/lib/types/contexts/common/StartChatFailureType.d.ts +5 -0
  77. package/lib/types/controller/componentController.d.ts +1 -0
  78. package/package.json +3 -3
  79. package/lib/types/components/loadingpanestateful/interfaces/IStartChatErrorPaneControlProps.d.ts +0 -4
  80. package/lib/types/components/loadingpanestateful/interfaces/IStartChatErrorPaneProps.d.ts +0 -4
  81. /package/lib/cjs/components/{loadingpanestateful/interfaces/IStartChatErrorPaneControlProps.js → startchaterrorpanestateful/interfaces/IStartChatErrorPaneClassNames.js} +0 -0
  82. /package/lib/cjs/components/{loadingpanestateful/interfaces/IStartChatErrorPaneProps.js → startchaterrorpanestateful/interfaces/IStartChatErrorPaneComponentOverrides.js} +0 -0
  83. /package/lib/esm/components/{loadingpanestateful/interfaces/IStartChatErrorPaneControlProps.js → startchaterrorpanestateful/interfaces/IStartChatErrorPaneClassNames.js} +0 -0
  84. /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
+ export const defaultStartChatErrorPaneGeneralStyleProps = {
2
+ position: "initial",
3
+ width: "100%",
4
+ height: "100%",
5
+ left: "0%",
6
+ top: "0%",
7
+ borderRadius: "0 0 4px 4px",
8
+ borderWidth: "0px",
9
+ backgroundColor: "#FFFFFF"
10
+ };
@@ -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
+ };
@@ -0,0 +1,8 @@
1
+ export const defaultStartChatErrorPaneIconStyleProps = {
2
+ display: "flex",
3
+ order: 1,
4
+ alignSelf: "auto",
5
+ backgroundColor: "#FFFFFF",
6
+ boxShadow: "#FFFFFF 0px 0px 0px 0px",
7
+ margin: "0px 0px 0px 0px"
8
+ };
@@ -0,0 +1,10 @@
1
+ export const defaultStartChatErrorPaneSubtitleStyleProps = {
2
+ fontFamily: "'Segoe UI',Arial,sans-serif",
3
+ fontWeight: "normal",
4
+ fontSize: "18px",
5
+ color: "#36454F",
6
+ textAlign: "center",
7
+ display: "flex",
8
+ order: 3,
9
+ alignSelf: "auto"
10
+ };
@@ -0,0 +1,10 @@
1
+ export const defaultStartChatErrorPaneTitleStyleProps = {
2
+ fontFamily: "'Segoe UI',Arial,sans-serif",
3
+ fontWeight: "normal",
4
+ fontSize: "18px",
5
+ color: "#36454F",
6
+ textAlign: "center",
7
+ display: "flex",
8
+ order: 2,
9
+ alignSelf: "auto"
10
+ };
@@ -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": "true",
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
  }
@@ -20,7 +20,7 @@ describe("activityMiddleware test", () => {
20
20
  };
21
21
  const results = createActivityMiddleware()()(next)(args);
22
22
  expect(results()).toEqual(false);
23
- expect(TelemetryHelper.logActionEvent).toHaveBeenCalledTimes(1);
23
+ expect(TelemetryHelper.logActionEvent).toHaveBeenCalledTimes(0);
24
24
  });
25
25
  it("createActivityMiddleware() with Hidden tag should return nothing", () => {
26
26
  spyOn(TelemetryHelper, "logActionEvent").and.callFake(() => false);
@@ -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["SET_OUTSIDE_OPERATING_HOURS"] = 8] = "SET_OUTSIDE_OPERATING_HOURS";
12
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_PRE_CHAT_SURVEY_RESPONSE"] = 9] = "SET_PRE_CHAT_SURVEY_RESPONSE";
13
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CUSTOM_CONTEXT"] = 10] = "SET_CUSTOM_CONTEXT";
14
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_SHOW_CONFIRMATION"] = 11] = "SET_SHOW_CONFIRMATION";
15
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_SHOW_EMAIL_TRANSCRIPT_PANE"] = 12] = "SET_SHOW_EMAIL_TRANSCRIPT_PANE";
16
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_PRECHAT_RESPONSE_EMAIL"] = 13] = "SET_PRECHAT_RESPONSE_EMAIL";
17
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_AUDIO_NOTIFICATION"] = 14] = "SET_AUDIO_NOTIFICATION";
18
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_E2VV_ENABLED"] = 15] = "SET_E2VV_ENABLED";
19
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_POST_CHAT_CONTEXT"] = 16] = "SET_POST_CHAT_CONTEXT";
20
- LiveChatWidgetActionType[LiveChatWidgetActionType["SHOW_CALLING_CONTAINER"] = 17] = "SHOW_CALLING_CONTAINER";
21
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_INCOMING_CALL"] = 18] = "SET_INCOMING_CALL";
22
- LiveChatWidgetActionType[LiveChatWidgetActionType["DISABLE_VIDEO_CALL"] = 19] = "DISABLE_VIDEO_CALL";
23
- LiveChatWidgetActionType[LiveChatWidgetActionType["DISABLE_LOCAL_VIDEO"] = 20] = "DISABLE_LOCAL_VIDEO";
24
- LiveChatWidgetActionType[LiveChatWidgetActionType["DISABLE_REMOTE_VIDEO"] = 21] = "DISABLE_REMOTE_VIDEO";
25
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CHAT_TOKEN"] = 22] = "SET_CHAT_TOKEN";
26
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_START_CHAT_BUTTON_DISPLAY"] = 23] = "SET_START_CHAT_BUTTON_DISPLAY";
27
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_PROACTIVE_CHAT_PARAMS"] = 24] = "SET_PROACTIVE_CHAT_PARAMS";
28
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_TELEMETRY_DATA"] = 25] = "SET_TELEMETRY_DATA";
29
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_RECONNECT_ID"] = 26] = "SET_RECONNECT_ID";
30
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_UNREAD_MESSAGE_COUNT"] = 27] = "SET_UNREAD_MESSAGE_COUNT";
31
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_FOCUS_CHAT_BUTTON"] = 28] = "SET_FOCUS_CHAT_BUTTON";
32
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CONVERSATION_ENDED_BY_AGENT_EVENT_RECEIVED"] = 29] = "SET_CONVERSATION_ENDED_BY_AGENT_EVENT_RECEIVED";
33
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CONVERSATION_ENDED_BY"] = 30] = "SET_CONVERSATION_ENDED_BY";
34
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_WIDGET_STATE"] = 31] = "SET_WIDGET_STATE";
35
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_LIVE_CHAT_CONTEXT"] = 32] = "SET_LIVE_CHAT_CONTEXT";
36
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_BOT_OAUTH_SIGNIN_ID"] = 33] = "SET_BOT_OAUTH_SIGNIN_ID";
37
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_WIDGET_SIZE"] = 34] = "SET_WIDGET_SIZE";
38
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_WIDGET_INSTANCE_ID"] = 35] = "SET_WIDGET_INSTANCE_ID";
39
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_LIVE_CHAT_CONFIG"] = 36] = "SET_LIVE_CHAT_CONFIG";
40
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_POST_CHAT_WORKFLOW_IN_PROGRESS"] = 37] = "SET_POST_CHAT_WORKFLOW_IN_PROGRESS";
41
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_INITIAL_CHAT_SDK_REQUEST_ID"] = 38] = "SET_INITIAL_CHAT_SDK_REQUEST_ID";
42
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_SHOULD_USE_BOT_SURVEY"] = 39] = "SET_SHOULD_USE_BOT_SURVEY";
43
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CHAT_DISCONNECT_EVENT_RECEIVED"] = 40] = "SET_CHAT_DISCONNECT_EVENT_RECEIVED";
44
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_SURVEY_MODE"] = 41] = "SET_SURVEY_MODE";
45
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CONFIRMATION_STATE"] = 42] = "SET_CONFIRMATION_STATE";
46
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_POST_CHAT_PARTICIPANT_TYPE"] = 43] = "SET_POST_CHAT_PARTICIPANT_TYPE";
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,11 @@ 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
+ }
@@ -120,10 +120,10 @@ export declare enum TelemetryEvent {
120
120
  ErrorUIPaneLoaded = "ErrorUIPaneLoaded",
121
121
  DownloadTranscriptFailed = "DownloadTranscriptFailed",
122
122
  StartChatFailed = "StartChatFailed",
123
- IC3ThreadUpdateEventReceived = "IC3ThreadUpdateEventReceived",
124
123
  ConfirmationCancelButtonClicked = "ConfirmationCancelButtonClicked",
125
124
  ConfirmationConfirmButtonClicked = "ConfirmationConfirmButtonClicked",
126
125
  LoadingPaneLoaded = "LoadingPaneLoaded",
126
+ StartChatErrorPaneLoaded = "StartChatErrorPaneLoaded",
127
127
  EmailTranscriptLoaded = "EmailTranscriptLoaded",
128
128
  OutOfOfficePaneLoaded = "OutOfOfficePaneLoaded",
129
129
  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>) => Promise<void>;
8
- export declare const endChatStateCleanUp: (dispatch: Dispatch<ILiveChatWidgetAction>) => Promise<void>;
9
- export declare const closeChatStateCleanUp: (dispatch: Dispatch<ILiveChatWidgetAction>) => Promise<void>;
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;
@@ -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 "../../loadingpanestateful/interfaces/IStartChatErrorPaneProps";
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,3 @@
1
+ import { IStartChatErrorPaneProps } from "./interfaces/IStartChatErrorPaneProps";
2
+ export declare const StartChatErrorPaneStateful: (startChatErrorPaneProps: IStartChatErrorPaneProps) => JSX.Element;
3
+ export default StartChatErrorPaneStateful;
@@ -0,0 +1,2 @@
1
+ import { IStyle } from "@fluentui/react";
2
+ export declare const defaultStartChatErrorPaneGeneralStyleProps: IStyle;
@@ -0,0 +1,2 @@
1
+ import { IImageProps } from "@fluentui/react";
2
+ export declare const defaultStartChatErrorPaneIconImageStyleProps: IImageProps;
@@ -0,0 +1,2 @@
1
+ import { IStyle } from "@fluentui/react";
2
+ export declare const defaultStartChatErrorPaneIconStyleProps: IStyle;
@@ -0,0 +1,2 @@
1
+ import { IStyle } from "@fluentui/react";
2
+ export declare const defaultStartChatErrorPaneSubtitleStyleProps: IStyle;
@@ -0,0 +1,2 @@
1
+ import { IStyle } from "@fluentui/react";
2
+ export declare const defaultStartChatErrorPaneTitleStyleProps: IStyle;
@@ -0,0 +1,5 @@
1
+ export interface IStartChatErrorPaneClassNames {
2
+ iconClassName?: string;
3
+ titleClassName?: string;
4
+ subtitleClassName?: string;
5
+ }
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from "react";
2
+ export interface IStartChatErrorPaneComponentOverrides {
3
+ icon?: ReactNode | string;
4
+ title?: ReactNode | string;
5
+ subtitle?: ReactNode | string;
6
+ }
@@ -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
+ }
@@ -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
+ }
@@ -8,5 +8,6 @@ export declare enum ConversationState {
8
8
  InActive = 6,
9
9
  PostchatLoading = 7,
10
10
  Postchat = 8,
11
- Closed = 9
11
+ Closed = 9,
12
+ Error = 10
12
13
  }
@@ -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;