@microsoft/omnichannel-chat-widget 1.8.1-main.f0e9e2f → 1.8.2-main.3368d1f

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 (31) hide show
  1. package/lib/cjs/common/Constants.js +1 -1
  2. package/lib/cjs/common/facades/FacadeChatSDK.js +49 -7
  3. package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +8 -2
  4. package/lib/cjs/components/confirmationpanestateful/ConfirmationPaneStateful.js +7 -3
  5. package/lib/cjs/components/headerstateful/HeaderStateful.js +8 -4
  6. package/lib/cjs/components/livechatwidget/LiveChatWidget.js +4 -3
  7. package/lib/cjs/components/livechatwidget/common/liveChatConfigUtils.js +1 -1
  8. package/lib/cjs/components/livechatwidget/common/persistentChatHelper.js +12 -5
  9. package/lib/cjs/components/livechatwidget/common/startChat.js +2 -2
  10. package/lib/cjs/components/livechatwidget/common/startChatErrorHandler.js +25 -8
  11. package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +21 -17
  12. package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +42 -8
  13. package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +1 -1
  14. package/lib/esm/common/Constants.js +1 -1
  15. package/lib/esm/common/facades/FacadeChatSDK.js +49 -7
  16. package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +8 -2
  17. package/lib/esm/components/confirmationpanestateful/ConfirmationPaneStateful.js +7 -3
  18. package/lib/esm/components/headerstateful/HeaderStateful.js +8 -4
  19. package/lib/esm/components/livechatwidget/LiveChatWidget.js +4 -3
  20. package/lib/esm/components/livechatwidget/common/liveChatConfigUtils.js +1 -1
  21. package/lib/esm/components/livechatwidget/common/persistentChatHelper.js +12 -5
  22. package/lib/esm/components/livechatwidget/common/startChat.js +2 -2
  23. package/lib/esm/components/livechatwidget/common/startChatErrorHandler.js +25 -8
  24. package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +21 -17
  25. package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +42 -8
  26. package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +1 -1
  27. package/lib/types/common/Constants.d.ts +1 -1
  28. package/lib/types/common/facades/FacadeChatSDK.d.ts +1 -0
  29. package/lib/types/components/livechatwidget/common/liveChatConfigUtils.d.ts +1 -1
  30. package/lib/types/components/livechatwidget/common/persistentChatHelper.d.ts +2 -1
  31. package/package.json +2 -2
@@ -24,7 +24,7 @@ export const getLiveChatWidgetContextInitialState = props => {
24
24
  * as part of the flow, the pre-chat will be detected and then it will be displayed properly
25
25
  * this case is only and only for pre-chat pane.
26
26
  * **/
27
- if (initialStateFromCache.appStates.conversationState === ConversationState.Prechat || initialStateFromCache.appStates.conversationState === ConversationState.OutOfOffice || outsideOperatingHours) {
27
+ if (initialStateFromCache.appStates.conversationState === ConversationState.Prechat || initialStateFromCache.appStates.conversationState === ConversationState.OutOfOffice || outsideOperatingHours && initialStateFromCache.appStates.conversationState !== ConversationState.Active) {
28
28
  initialStateFromCache.appStates.conversationState = ConversationState.Closed;
29
29
  // if we are resetting the conversation state, there is no point to obtain minimized state from cache
30
30
  initialStateFromCache.appStates.isMinimized = undefined;
@@ -97,7 +97,7 @@ export declare class Constants {
97
97
  }
98
98
  export declare const Regex: {
99
99
  new (): {};
100
- readonly EmailRegex: "(?:[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])";
100
+ readonly EmailRegex: "^(?:[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*\")@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?)*|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\])$";
101
101
  };
102
102
  export declare class HtmlIdNames {
103
103
  static readonly MSLiveChatWidget = "MSLiveChatWidget";
@@ -72,4 +72,5 @@ export declare class FacadeChatSDK {
72
72
  getVoiceVideoCalling(params?: VoiceVideoCallingOptionalParams): Promise<GetVoiceVideoCallingResponse>;
73
73
  getPostChatSurveyContext(): Promise<PostChatContext>;
74
74
  getAgentAvailability(optionalParams?: GetAgentAvailabilityOptionalParams): Promise<GetAgentAvailabilityResponse>;
75
+ getReconnectableChats(reconnectableChatsParams?: any): Promise<any>;
75
76
  }
@@ -1,3 +1,3 @@
1
1
  import { FacadeChatSDK } from "../../../common/facades/FacadeChatSDK";
2
2
  export declare const isPostChatSurveyEnabled: (facadeChatSDK: FacadeChatSDK) => Promise<boolean>;
3
- export declare const isPersistentChatEnabled: (conversationMode: string | undefined) => Promise<boolean>;
3
+ export declare const isPersistentChatEnabled: (conversationMode: string | undefined) => boolean;
@@ -1 +1,2 @@
1
- export declare const shouldSetPreChatIfPersistentChat: (chatSDK: any, conversationMode: string, showPreChat: boolean) => Promise<boolean>;
1
+ import { FacadeChatSDK } from "../../../common/facades/FacadeChatSDK";
2
+ export declare const shouldSetPreChatIfPersistentChat: (facadeChatSDK: FacadeChatSDK, conversationMode: string, showPreChat: boolean) => Promise<boolean>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/omnichannel-chat-widget",
3
- "version": "1.8.1-main.f0e9e2f",
3
+ "version": "1.8.2-main.3368d1f",
4
4
  "description": "Microsoft Omnichannel Chat Widget",
5
5
  "main": "lib/cjs/index.js",
6
6
  "types": "lib/types/index.d.ts",
@@ -87,7 +87,7 @@
87
87
  "@azure/core-tracing": "^1.2.0",
88
88
  "@microsoft/applicationinsights-web": "^3.3.6",
89
89
  "@microsoft/omnichannel-chat-components": "1.1.12",
90
- "@microsoft/omnichannel-chat-sdk": "^1.11.1",
90
+ "@microsoft/omnichannel-chat-sdk": "^1.11.3",
91
91
  "@opentelemetry/api": "^1.9.0",
92
92
  "abort-controller": "^3",
93
93
  "abort-controller-es5": "^2.0.1",