@microsoft/omnichannel-chat-widget 1.5.1-main.132e1c6 → 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
@@ -7,40 +7,41 @@ export declare enum LiveChatWidgetActionType {
7
7
  SET_CONVERSATION_STATE = 5,
8
8
  SET_PREVIOUS_FOCUSED_ELEMENT_ID = 6,
9
9
  SET_START_CHAT_FAILING = 7,
10
- SET_OUTSIDE_OPERATING_HOURS = 8,
11
- SET_PRE_CHAT_SURVEY_RESPONSE = 9,
12
- SET_CUSTOM_CONTEXT = 10,
13
- SET_SHOW_CONFIRMATION = 11,
14
- SET_SHOW_EMAIL_TRANSCRIPT_PANE = 12,
15
- SET_PRECHAT_RESPONSE_EMAIL = 13,
16
- SET_AUDIO_NOTIFICATION = 14,
17
- SET_E2VV_ENABLED = 15,
18
- SET_POST_CHAT_CONTEXT = 16,
19
- SHOW_CALLING_CONTAINER = 17,
20
- SET_INCOMING_CALL = 18,
21
- DISABLE_VIDEO_CALL = 19,
22
- DISABLE_LOCAL_VIDEO = 20,
23
- DISABLE_REMOTE_VIDEO = 21,
24
- SET_CHAT_TOKEN = 22,
25
- SET_START_CHAT_BUTTON_DISPLAY = 23,
26
- SET_PROACTIVE_CHAT_PARAMS = 24,
27
- SET_TELEMETRY_DATA = 25,
28
- SET_RECONNECT_ID = 26,
29
- SET_UNREAD_MESSAGE_COUNT = 27,
30
- SET_FOCUS_CHAT_BUTTON = 28,
31
- SET_CONVERSATION_ENDED_BY_AGENT_EVENT_RECEIVED = 29,
32
- SET_CONVERSATION_ENDED_BY = 30,
33
- SET_WIDGET_STATE = 31,
34
- SET_LIVE_CHAT_CONTEXT = 32,
35
- SET_BOT_OAUTH_SIGNIN_ID = 33,
36
- SET_WIDGET_SIZE = 34,
37
- SET_WIDGET_INSTANCE_ID = 35,
38
- SET_LIVE_CHAT_CONFIG = 36,
39
- SET_POST_CHAT_WORKFLOW_IN_PROGRESS = 37,
40
- SET_INITIAL_CHAT_SDK_REQUEST_ID = 38,
41
- SET_SHOULD_USE_BOT_SURVEY = 39,
42
- SET_CHAT_DISCONNECT_EVENT_RECEIVED = 40,
43
- SET_SURVEY_MODE = 41,
44
- SET_CONFIRMATION_STATE = 42,
45
- SET_POST_CHAT_PARTICIPANT_TYPE = 43
10
+ SET_START_CHAT_FAILURE_TYPE = 8,
11
+ SET_OUTSIDE_OPERATING_HOURS = 9,
12
+ SET_PRE_CHAT_SURVEY_RESPONSE = 10,
13
+ SET_CUSTOM_CONTEXT = 11,
14
+ SET_SHOW_CONFIRMATION = 12,
15
+ SET_SHOW_EMAIL_TRANSCRIPT_PANE = 13,
16
+ SET_PRECHAT_RESPONSE_EMAIL = 14,
17
+ SET_AUDIO_NOTIFICATION = 15,
18
+ SET_E2VV_ENABLED = 16,
19
+ SET_POST_CHAT_CONTEXT = 17,
20
+ SHOW_CALLING_CONTAINER = 18,
21
+ SET_INCOMING_CALL = 19,
22
+ DISABLE_VIDEO_CALL = 20,
23
+ DISABLE_LOCAL_VIDEO = 21,
24
+ DISABLE_REMOTE_VIDEO = 22,
25
+ SET_CHAT_TOKEN = 23,
26
+ SET_START_CHAT_BUTTON_DISPLAY = 24,
27
+ SET_PROACTIVE_CHAT_PARAMS = 25,
28
+ SET_TELEMETRY_DATA = 26,
29
+ SET_RECONNECT_ID = 27,
30
+ SET_UNREAD_MESSAGE_COUNT = 28,
31
+ SET_FOCUS_CHAT_BUTTON = 29,
32
+ SET_CONVERSATION_ENDED_BY_AGENT_EVENT_RECEIVED = 30,
33
+ SET_CONVERSATION_ENDED_BY = 31,
34
+ SET_WIDGET_STATE = 32,
35
+ SET_LIVE_CHAT_CONTEXT = 33,
36
+ SET_BOT_OAUTH_SIGNIN_ID = 34,
37
+ SET_WIDGET_SIZE = 35,
38
+ SET_WIDGET_INSTANCE_ID = 36,
39
+ SET_LIVE_CHAT_CONFIG = 37,
40
+ SET_POST_CHAT_WORKFLOW_IN_PROGRESS = 38,
41
+ SET_INITIAL_CHAT_SDK_REQUEST_ID = 39,
42
+ SET_SHOULD_USE_BOT_SURVEY = 40,
43
+ SET_CHAT_DISCONNECT_EVENT_RECEIVED = 41,
44
+ SET_SURVEY_MODE = 42,
45
+ SET_CONFIRMATION_STATE = 43,
46
+ SET_POST_CHAT_PARTICIPANT_TYPE = 44
46
47
  }
@@ -0,0 +1,5 @@
1
+ export declare enum StartChatFailureType {
2
+ Unauthorized = "unauthorized",
3
+ AuthSetupError = "authSetupError",
4
+ Generic = "generic"
5
+ }
@@ -6,6 +6,7 @@ export declare const shouldShowFooter: (state: ILiveChatWidgetContext) => boolea
6
6
  export declare const shouldShowEmailTranscriptPane: (state: ILiveChatWidgetContext) => boolean;
7
7
  export declare const shouldShowWebChatContainer: (state: ILiveChatWidgetContext) => boolean;
8
8
  export declare const shouldShowLoadingPane: (state: ILiveChatWidgetContext) => boolean;
9
+ export declare const shouldShowStartChatErrorPane: (state: ILiveChatWidgetContext) => boolean;
9
10
  export declare const shouldShowReconnectChatPane: (state: ILiveChatWidgetContext) => boolean;
10
11
  export declare const shouldShowPostChatLoadingPane: (state: ILiveChatWidgetContext) => boolean;
11
12
  export declare const shouldShowOutOfOfficeHoursPane: (state: ILiveChatWidgetContext) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/omnichannel-chat-widget",
3
- "version": "1.5.1-main.132e1c6",
3
+ "version": "1.5.1-main.6b98130",
4
4
  "description": "Microsoft Omnichannel Chat Widget",
5
5
  "main": "lib/cjs/index.js",
6
6
  "types": "lib/types/index.d.ts",
@@ -74,8 +74,8 @@
74
74
  "webpack-cli": "^4.9.2"
75
75
  },
76
76
  "dependencies": {
77
- "@microsoft/omnichannel-chat-components": "^1.0.9",
78
- "@microsoft/omnichannel-chat-sdk": "1.5.7",
77
+ "@microsoft/omnichannel-chat-components": "^1.1.0",
78
+ "@microsoft/omnichannel-chat-sdk": "1.6.2",
79
79
  "abort-controller-es5": "^2.0.1",
80
80
  "dompurify": "^2.3.4",
81
81
  "markdown-it": "^12.3.2",
@@ -1,4 +0,0 @@
1
- export interface IStartChatErrorPaneControlProps {
2
- titleText?: string;
3
- subtitleText?: string;
4
- }
@@ -1,4 +0,0 @@
1
- import { IStartChatErrorPaneControlProps } from "./IStartChatErrorPaneControlProps";
2
- export interface IStartChatErrorPaneProps {
3
- controlProps?: IStartChatErrorPaneControlProps;
4
- }