@microsoft/omnichannel-chat-widget 0.1.0-main.c461296 → 0.1.0-main.cda7a31
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/README.md +35 -11
- package/lib/cjs/common/Constants.js +50 -6
- package/lib/cjs/common/storage/default/defaultCacheManager.js +34 -0
- package/lib/cjs/common/storage/default/defaultClientDataStoreProvider.js +114 -0
- package/lib/cjs/common/storage/default/defaultInMemoryDataStore.js +86 -0
- package/lib/cjs/common/telemetry/TelemetryConstants.js +51 -3
- package/lib/cjs/common/telemetry/TelemetryHelper.js +13 -0
- package/lib/cjs/common/telemetry/TelemetryManager.js +16 -5
- package/lib/cjs/common/telemetry/defaultConfigs/defaultAriaConfig.js +1 -1
- package/lib/cjs/common/telemetry/defaultConfigs/defaultTelemetryConfiguration.js +4 -1
- package/lib/cjs/common/telemetry/loggers/ariaTelemetryLogger.js +54 -21
- package/lib/cjs/common/telemetry/loggers/consoleLogger.js +6 -5
- package/lib/cjs/common/utils.js +89 -2
- package/lib/cjs/components/callingcontainerstateful/CallingContainerStateful.js +14 -0
- package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +20 -4
- package/lib/cjs/components/confirmationpanestateful/ConfirmationPaneStateful.js +8 -44
- package/lib/cjs/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +4 -4
- package/lib/cjs/components/footerstateful/FooterStateful.js +6 -15
- package/lib/cjs/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +11 -2
- package/lib/cjs/components/headerstateful/HeaderStateful.js +15 -14
- package/lib/cjs/components/livechatwidget/common/ActivityStreamHandler.js +44 -0
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +23 -0
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/IActivitySubscriber.js +1 -0
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +39 -0
- package/lib/cjs/components/livechatwidget/common/ChatAdapterShim.js +70 -0
- package/lib/cjs/components/livechatwidget/common/Deferred.js +42 -0
- package/lib/cjs/components/livechatwidget/common/authHelper.js +65 -0
- package/lib/cjs/components/livechatwidget/common/createAdapter.js +13 -1
- package/lib/cjs/components/livechatwidget/common/createFooter.js +7 -16
- package/lib/cjs/components/livechatwidget/common/createInternetConnectionChangeHandler.js +12 -0
- package/lib/cjs/components/livechatwidget/common/createMarkdown.js +31 -30
- package/lib/cjs/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +36 -20
- package/lib/cjs/components/livechatwidget/common/endChat.js +93 -10
- package/lib/cjs/components/livechatwidget/common/initCallingSdk.js +1 -1
- package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +27 -3
- package/lib/cjs/components/livechatwidget/common/reconnectChatHelper.js +144 -39
- package/lib/cjs/components/livechatwidget/common/registerTelemetryLoggers.js +6 -17
- package/lib/cjs/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +0 -4
- package/lib/cjs/components/livechatwidget/common/shareObservable.js +45 -0
- package/lib/cjs/components/livechatwidget/common/startChat.js +166 -50
- package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +310 -73
- package/lib/cjs/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +8 -0
- package/lib/cjs/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +6 -4
- package/lib/cjs/components/postchatsurveypanestateful/interfaces/IPostChatSurveyPaneStatefulProps.js +1 -0
- package/lib/cjs/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +5 -10
- package/lib/cjs/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +17 -1
- package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +98 -2
- package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultWebChatContainerStatefulProps.js +4 -1
- package/lib/cjs/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.js +11 -0
- package/lib/cjs/components/webchatcontainerstateful/common/mockchatsdk.js +2 -0
- package/lib/cjs/components/webchatcontainerstateful/interfaces/IAdaptiveCardStyles.js +1 -0
- package/lib/cjs/components/webchatcontainerstateful/interfaces/IBotMagicCodeConfig.js +1 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +14 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +16 -2
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.js +2 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.js +52 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.js +98 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultReceivedMessageAnchorStyles.js +10 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.js +117 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.js +45 -0
- package/lib/cjs/contexts/common/ConversationState.js +3 -2
- package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +11 -8
- package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +15 -6
- package/lib/cjs/contexts/createReducer.js +26 -12
- package/lib/cjs/controller/componentController.js +3 -3
- package/lib/cjs/plugins/newMessageEventHandler.js +10 -13
- package/lib/esm/common/Constants.js +46 -5
- package/lib/esm/common/storage/default/defaultCacheManager.js +19 -0
- package/lib/esm/common/storage/default/defaultClientDataStoreProvider.js +102 -0
- package/lib/esm/common/storage/default/defaultInMemoryDataStore.js +71 -0
- package/lib/esm/common/telemetry/TelemetryConstants.js +51 -3
- package/lib/esm/common/telemetry/TelemetryHelper.js +13 -1
- package/lib/esm/common/telemetry/TelemetryManager.js +14 -5
- package/lib/esm/common/telemetry/defaultConfigs/defaultAriaConfig.js +1 -1
- package/lib/esm/common/telemetry/defaultConfigs/defaultTelemetryConfiguration.js +4 -1
- package/lib/esm/common/telemetry/loggers/ariaTelemetryLogger.js +55 -17
- package/lib/esm/common/telemetry/loggers/consoleLogger.js +6 -5
- package/lib/esm/common/utils.js +64 -1
- package/lib/esm/components/callingcontainerstateful/CallingContainerStateful.js +14 -0
- package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +22 -7
- package/lib/esm/components/confirmationpanestateful/ConfirmationPaneStateful.js +11 -42
- package/lib/esm/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +4 -4
- package/lib/esm/components/footerstateful/FooterStateful.js +6 -15
- package/lib/esm/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +9 -3
- package/lib/esm/components/headerstateful/HeaderStateful.js +15 -14
- package/lib/esm/components/livechatwidget/common/ActivityStreamHandler.js +34 -0
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +14 -0
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/IActivitySubscriber.js +1 -0
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +29 -0
- package/lib/esm/components/livechatwidget/common/ChatAdapterShim.js +59 -0
- package/lib/esm/components/livechatwidget/common/Deferred.js +33 -0
- package/lib/esm/components/livechatwidget/common/authHelper.js +50 -0
- package/lib/esm/components/livechatwidget/common/createAdapter.js +12 -2
- package/lib/esm/components/livechatwidget/common/createFooter.js +4 -15
- package/lib/esm/components/livechatwidget/common/createInternetConnectionChangeHandler.js +8 -0
- package/lib/esm/components/livechatwidget/common/createMarkdown.js +31 -30
- package/lib/esm/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +36 -21
- package/lib/esm/components/livechatwidget/common/endChat.js +89 -11
- package/lib/esm/components/livechatwidget/common/initCallingSdk.js +1 -1
- package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +25 -5
- package/lib/esm/components/livechatwidget/common/reconnectChatHelper.js +134 -41
- package/lib/esm/components/livechatwidget/common/registerTelemetryLoggers.js +5 -14
- package/lib/esm/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +0 -4
- package/lib/esm/components/livechatwidget/common/shareObservable.js +38 -0
- package/lib/esm/components/livechatwidget/common/startChat.js +161 -53
- package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +298 -78
- package/lib/esm/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +6 -0
- package/lib/esm/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +5 -4
- package/lib/esm/components/postchatsurveypanestateful/interfaces/IPostChatSurveyPaneStatefulProps.js +1 -0
- package/lib/esm/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +7 -11
- package/lib/esm/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +17 -1
- package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +87 -2
- package/lib/esm/components/webchatcontainerstateful/common/defaultProps/defaultWebChatContainerStatefulProps.js +3 -1
- package/lib/esm/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.js +4 -0
- package/lib/esm/components/webchatcontainerstateful/common/mockchatsdk.js +2 -0
- package/lib/esm/components/webchatcontainerstateful/interfaces/IAdaptiveCardStyles.js +1 -0
- package/lib/esm/components/webchatcontainerstateful/interfaces/IBotMagicCodeConfig.js +1 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +5 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +16 -2
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.js +2 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.js +41 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.js +94 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultReceivedMessageAnchorStyles.js +3 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.js +107 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.js +32 -0
- package/lib/esm/contexts/common/ConversationState.js +3 -2
- package/lib/esm/contexts/common/LiveChatWidgetActionType.js +11 -8
- package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +13 -6
- package/lib/esm/contexts/createReducer.js +26 -11
- package/lib/esm/controller/componentController.js +3 -3
- package/lib/esm/plugins/newMessageEventHandler.js +10 -12
- package/lib/types/common/Constants.d.ts +25 -2
- package/lib/types/common/interfaces/IContextDataStore.d.ts +2 -2
- package/lib/types/common/storage/default/defaultCacheManager.d.ts +4 -0
- package/lib/types/common/storage/default/defaultClientDataStoreProvider.d.ts +2 -0
- package/lib/types/common/storage/default/defaultInMemoryDataStore.d.ts +6 -0
- package/lib/types/common/telemetry/TelemetryConstants.d.ts +36 -5
- package/lib/types/common/telemetry/TelemetryHelper.d.ts +2 -0
- package/lib/types/common/telemetry/definitions/Payload.d.ts +12 -9
- package/lib/types/common/telemetry/interfaces/ITelemetryConfig.d.ts +3 -3
- package/lib/types/common/utils.d.ts +8 -1
- package/lib/types/components/confirmationpanestateful/interfaces/IConfirmationPaneStatefulParams.d.ts +4 -4
- package/lib/types/components/footerstateful/audionotificationstateful/interfaces/IAudioNotificationStatefulParams.d.ts +0 -1
- package/lib/types/components/headerstateful/interfaces/IHeaderStatefulParams.d.ts +2 -1
- package/lib/types/components/livechatwidget/common/ActivityStreamHandler.d.ts +14 -0
- package/lib/types/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.d.ts +5 -0
- package/lib/types/components/livechatwidget/common/ActivitySubscriber/IActivitySubscriber.d.ts +6 -0
- package/lib/types/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.d.ts +7 -0
- package/lib/types/components/livechatwidget/common/ChatAdapterShim.d.ts +7 -0
- package/lib/types/components/livechatwidget/common/Deferred.d.ts +9 -0
- package/lib/types/components/livechatwidget/common/authHelper.d.ts +5 -0
- package/lib/types/components/livechatwidget/common/endChat.d.ts +4 -1
- package/lib/types/components/livechatwidget/common/reconnectChatHelper.d.ts +6 -2
- package/lib/types/components/livechatwidget/common/shareObservable.d.ts +1 -0
- package/lib/types/components/livechatwidget/common/startChat.d.ts +4 -2
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetComponentOverrides.d.ts +1 -0
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetControlProps.d.ts +1 -0
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +4 -3
- package/lib/types/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.d.ts +2 -2
- package/lib/types/components/postchatsurveypanestateful/interfaces/IPostChatSurveyPaneStatefulProps.d.ts +4 -0
- package/lib/types/components/reconnectchatpanestateful/interfaces/IReconnectChatPaneStatefulProps.d.ts +1 -1
- package/lib/types/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.d.ts +2 -0
- package/lib/types/components/webchatcontainerstateful/common/mockchatsdk.d.ts +1 -0
- package/lib/types/components/webchatcontainerstateful/interfaces/IAdaptiveCardStyles.d.ts +4 -0
- package/lib/types/components/webchatcontainerstateful/interfaces/IBotMagicCodeConfig.d.ts +4 -0
- package/lib/types/components/webchatcontainerstateful/interfaces/IRenderingMiddlewareProps.d.ts +2 -1
- package/lib/types/components/webchatcontainerstateful/interfaces/IWebChatContainerStatefulProps.d.ts +4 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.d.ts +3 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.d.ts +1 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.d.ts +2 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.d.ts +1 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultReceivedMessageAnchorStyles.d.ts +2 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.d.ts +5 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.d.ts +1 -0
- package/lib/types/contexts/common/ConversationState.d.ts +3 -2
- package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +4 -2
- package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +12 -9
- package/lib/types/contexts/common/LiveChatWidgetContextInitialState.d.ts +1 -2
- package/package.json +9 -9
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import "regenerator-runtime/runtime";
|
|
2
|
+
import ChatConfig from "@microsoft/omnichannel-chat-sdk/lib/core/ChatConfig";
|
|
2
3
|
import { Dispatch } from "react";
|
|
3
4
|
import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
|
|
4
5
|
import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
|
|
6
|
+
declare const getChatReconnectContext: (chatSDK: any, chatConfig: ChatConfig | undefined, getAuthToken: ((authClientFunction?: string | undefined) => Promise<string | null>) | undefined, isReconnectEnabled?: boolean | undefined, reconnectId?: string | undefined) => Promise<any>;
|
|
5
7
|
declare const getReconnectIdForAuthenticatedChat: (props: ILiveChatWidgetProps, chatSDK: any) => Promise<string | undefined>;
|
|
6
|
-
declare const handleUnauthenticatedReconnectChat: (dispatch: Dispatch<ILiveChatWidgetAction>, reconnectId: string, initStartChat: any) => Promise<void>;
|
|
7
|
-
|
|
8
|
+
declare const handleUnauthenticatedReconnectChat: (chatSDK: any, chatConfig: ChatConfig | undefined, getAuthToken: ((authClientFunction?: string | undefined) => Promise<string | null>) | undefined, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, isReconnectEnabled: boolean | undefined, reconnectId: string, initStartChat: any, redirectInSameWindow: boolean | undefined) => Promise<void>;
|
|
9
|
+
declare const startUnauthenticatedReconnectChat: (chatSDK: any, chatConfig: ChatConfig | undefined, getAuthToken: ((authClientFunction?: string | undefined) => Promise<string | null>) | undefined, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, isReconnectEnabled: boolean | undefined, reconnectId: string, initStartChat: any) => Promise<void>;
|
|
10
|
+
declare const handleRedirectUnauthenticatedReconnectChat: (chatSDK: any, chatConfig: ChatConfig | undefined, getAuthToken: ((authClientFunction?: string | undefined) => Promise<string | null>) | undefined, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, initStartChat: any, isReconnectEnabled: boolean | undefined, reconnectId: string, redirectInSameWindow: boolean | undefined) => Promise<void>;
|
|
11
|
+
export { getChatReconnectContext, getReconnectIdForAuthenticatedChat, handleUnauthenticatedReconnectChat, startUnauthenticatedReconnectChat, handleRedirectUnauthenticatedReconnectChat };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function shareObservable(observable: any): any;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import ChatConfig from "@microsoft/omnichannel-chat-sdk/lib/core/ChatConfig";
|
|
1
2
|
import { Dispatch } from "react";
|
|
2
3
|
import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
|
|
3
4
|
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
4
5
|
import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
|
|
5
6
|
declare const prepareStartChat: (props: ILiveChatWidgetProps, chatSDK: any, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any) => Promise<void>;
|
|
6
|
-
declare const
|
|
7
|
-
|
|
7
|
+
declare const setPreChatAndInitiateChat: (chatSDK: any, chatConfig: ChatConfig | undefined, getAuthToken: ((authClientFunction?: string | undefined) => Promise<string | null>) | undefined, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, isProactiveChat?: boolean | undefined, proactiveChatEnablePrechatState?: boolean | undefined) => Promise<void>;
|
|
8
|
+
declare const initStartChat: (chatSDK: any, chatConfig: ChatConfig | undefined, getAuthToken: ((authClientFunction?: string | undefined) => Promise<string | null>) | undefined, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, params?: any, persistedState?: any) => Promise<void>;
|
|
9
|
+
export { prepareStartChat, initStartChat, setPreChatAndInitiateChat };
|
package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetComponentOverrides.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export interface ILiveChatWidgetComponentOverrides {
|
|
|
9
9
|
outOfOfficeHoursPane?: ReactNode | string;
|
|
10
10
|
postChatLoadingPane?: ReactNode | string;
|
|
11
11
|
postChatSurveyPane?: ReactNode | string;
|
|
12
|
+
preChatSurveyPane?: ReactNode | string;
|
|
12
13
|
proactiveChatPane?: ReactNode | string;
|
|
13
14
|
reconnectChatPane?: ReactNode | string;
|
|
14
15
|
webChatContainer?: ReactNode | string;
|
|
@@ -12,7 +12,6 @@ import { ILiveChatWidgetControlProps } from "./ILiveChatWidgetControlProps";
|
|
|
12
12
|
import { ILiveChatWidgetStyleProps } from "./ILiveChatWidgetStyleProps";
|
|
13
13
|
import { ILoadingPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/loadingpane/interfaces/ILoadingPaneProps";
|
|
14
14
|
import { IOOOHPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/outofofficehourspane/interfaces/IOOOHPaneProps";
|
|
15
|
-
import { IPostChatSurveyPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/postchatsurveypane/interfaces/IPostChatSurveyPaneProps";
|
|
16
15
|
import { IPreChatSurveyPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneProps";
|
|
17
16
|
import { IProactiveChatPaneStatefulProps } from "../../proactivechatpanestateful/interfaces/IProactiveChatPaneStatefulProps";
|
|
18
17
|
import { IReconnectChatPaneStatefulProps } from "../../reconnectchatpanestateful/interfaces/IReconnectChatPaneStatefulProps";
|
|
@@ -21,6 +20,7 @@ import { IWebChatContainerStatefulProps } from "../../webchatcontainerstateful/i
|
|
|
21
20
|
import { OmnichannelChatSDK } from "@microsoft/omnichannel-chat-sdk";
|
|
22
21
|
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
23
22
|
import { IContextDataStore } from "../../../common/interfaces/IContextDataStore";
|
|
23
|
+
import { IPostChatSurveyPaneStatefulProps } from "../../postchatsurveypanestateful/interfaces/IPostChatSurveyPaneStatefulProps";
|
|
24
24
|
export interface ILiveChatWidgetProps {
|
|
25
25
|
audioNotificationProps?: IAudioNotificationProps;
|
|
26
26
|
callingContainerProps?: ICallingContainerProps;
|
|
@@ -40,13 +40,14 @@ export interface ILiveChatWidgetProps {
|
|
|
40
40
|
outOfOfficeHeaderProps?: IHeaderProps;
|
|
41
41
|
outOfOfficeHoursPaneProps?: IOOOHPaneProps;
|
|
42
42
|
postChatLoadingPaneProps?: ILoadingPaneProps;
|
|
43
|
-
postChatSurveyPaneProps?:
|
|
43
|
+
postChatSurveyPaneProps?: IPostChatSurveyPaneStatefulProps;
|
|
44
44
|
preChatSurveyPaneProps?: IPreChatSurveyPaneProps;
|
|
45
45
|
proactiveChatPaneProps?: IProactiveChatPaneStatefulProps;
|
|
46
46
|
reconnectChatPaneProps?: IReconnectChatPaneStatefulProps;
|
|
47
47
|
styleProps?: ILiveChatWidgetStyleProps;
|
|
48
|
-
telemetryConfig
|
|
48
|
+
telemetryConfig: ITelemetryConfig;
|
|
49
49
|
webChatContainerProps?: IWebChatContainerStatefulProps;
|
|
50
50
|
liveChatContextFromCache?: ILiveChatWidgetContext;
|
|
51
51
|
contextDataStore?: IContextDataStore;
|
|
52
|
+
getAuthToken?: (authClientFunction?: string) => Promise<string | null>;
|
|
52
53
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const PostChatSurveyPaneStateful: (props:
|
|
1
|
+
import { IPostChatSurveyPaneStatefulProps } from "./interfaces/IPostChatSurveyPaneStatefulProps";
|
|
2
|
+
export declare const PostChatSurveyPaneStateful: (props: IPostChatSurveyPaneStatefulProps) => JSX.Element;
|
|
3
3
|
export default PostChatSurveyPaneStateful;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IPostChatSurveyPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/postchatsurveypane/interfaces/IPostChatSurveyPaneProps";
|
|
2
|
+
export interface IPostChatSurveyPaneStatefulProps extends IPostChatSurveyPaneProps {
|
|
3
|
+
isCustomerVoiceSurveyCompact?: boolean;
|
|
4
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IReconnectChatPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/reconnectchatpane/interfaces/IReconnectChatPaneProps";
|
|
2
2
|
export interface IReconnectChatPaneStatefulProps extends IReconnectChatPaneProps {
|
|
3
|
-
authClientFunction?: string;
|
|
4
3
|
isReconnectEnabled?: boolean;
|
|
5
4
|
reconnectId?: string;
|
|
5
|
+
redirectInSameWindow?: boolean;
|
|
6
6
|
}
|
package/lib/types/components/webchatcontainerstateful/interfaces/IRenderingMiddlewareProps.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IAttachmentProps } from "./IAttachmentProps";
|
|
2
1
|
import React from "react";
|
|
2
|
+
import { IAttachmentProps } from "./IAttachmentProps";
|
|
3
3
|
export interface IRenderingMiddlewareProps {
|
|
4
4
|
timestampDir?: "ltr" | "rtl" | "auto";
|
|
5
5
|
disableActivityMiddleware?: boolean;
|
|
@@ -28,4 +28,5 @@ export interface IRenderingMiddlewareProps {
|
|
|
28
28
|
attachmentDownloadIconStyles?: React.CSSProperties;
|
|
29
29
|
attachmentContentStyles?: React.CSSProperties;
|
|
30
30
|
attachmentSizeStyles?: React.CSSProperties;
|
|
31
|
+
receivedMessageAnchorStyles?: React.CSSProperties;
|
|
31
32
|
}
|
package/lib/types/components/webchatcontainerstateful/interfaces/IWebChatContainerStatefulProps.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { IBotMagicCodeConfig } from "./IBotMagicCodeConfig";
|
|
1
2
|
import { ILiveChatWidgetLocalizedTexts } from "../../../contexts/common/ILiveChatWidgetLocalizedTexts";
|
|
2
3
|
import { IRenderingMiddlewareProps } from "./IRenderingMiddlewareProps";
|
|
3
4
|
import { IStyle } from "@fluentui/react";
|
|
4
5
|
import { IWebChatProps } from "./IWebChatProps";
|
|
5
6
|
import { StyleOptions } from "botframework-webchat-api";
|
|
7
|
+
import { IAdaptiveCardStyles } from "./IAdaptiveCardStyles";
|
|
6
8
|
export interface IWebChatContainerStatefulProps {
|
|
7
9
|
containerStyles?: IStyle;
|
|
8
10
|
disableNewLineMarkdownSupport?: boolean;
|
|
@@ -13,4 +15,6 @@ export interface IWebChatContainerStatefulProps {
|
|
|
13
15
|
storeMiddlewares?: any[];
|
|
14
16
|
renderingMiddlewareProps?: IRenderingMiddlewareProps;
|
|
15
17
|
localizedTexts?: ILiveChatWidgetLocalizedTexts;
|
|
18
|
+
botMagicCode?: IBotMagicCodeConfig;
|
|
19
|
+
adaptiveCardStyles?: IAdaptiveCardStyles;
|
|
16
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const activityStatusMiddleware: () => (next: any) => (args: any) =>
|
|
1
|
+
export declare const activityStatusMiddleware: () => (next: any) => (args: any) => any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@testing-library/jest-dom/extend-expect";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createWebChatTelemetry(): (event: any) => void;
|
|
@@ -15,13 +15,15 @@ export interface ILiveChatWidgetContext {
|
|
|
15
15
|
telemetryInternalData: IInternalTelemetryData;
|
|
16
16
|
globalDir: "rtl" | "ltr";
|
|
17
17
|
liveChatContext: any;
|
|
18
|
+
customContext: any;
|
|
19
|
+
widgetSize: any;
|
|
20
|
+
widgetInstanceId: string;
|
|
18
21
|
};
|
|
19
22
|
appStates: {
|
|
20
23
|
conversationState: ConversationState;
|
|
21
24
|
isMinimized: boolean;
|
|
22
|
-
|
|
25
|
+
previousElementIdOnFocusBeforeModalOpen: string | null;
|
|
23
26
|
outsideOperatingHours: boolean;
|
|
24
|
-
shouldShowPostChat: boolean;
|
|
25
27
|
preChatResponseEmail: string;
|
|
26
28
|
isAudioMuted: boolean | null;
|
|
27
29
|
newMessage: boolean;
|
|
@@ -5,16 +5,16 @@ export declare enum LiveChatWidgetActionType {
|
|
|
5
5
|
SET_GLOBAL_DIR = 3,
|
|
6
6
|
SET_MINIMIZED = 4,
|
|
7
7
|
SET_CONVERSATION_STATE = 5,
|
|
8
|
-
|
|
8
|
+
SET_PREVIOUS_FOCUSED_ELEMENT_ID = 6,
|
|
9
9
|
SET_OUTSIDE_OPERATING_HOURS = 7,
|
|
10
10
|
SET_PRE_CHAT_SURVEY_RESPONSE = 8,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
SET_CUSTOM_CONTEXT = 9,
|
|
12
|
+
SET_SHOW_CONFIRMATION = 10,
|
|
13
|
+
SET_SHOW_EMAIL_TRANSCRIPT_PANE = 11,
|
|
14
|
+
SET_PRECHAT_RESPONSE_EMAIL = 12,
|
|
15
|
+
SET_AUDIO_NOTIFICATION = 13,
|
|
16
|
+
SET_E2VV_ENABLED = 14,
|
|
17
|
+
SET_POST_CHAT_CONTEXT = 15,
|
|
18
18
|
SHOW_CALLING_CONTAINER = 16,
|
|
19
19
|
SET_INCOMING_CALL = 17,
|
|
20
20
|
DISABLE_VIDEO_CALL = 18,
|
|
@@ -29,5 +29,8 @@ export declare enum LiveChatWidgetActionType {
|
|
|
29
29
|
SET_FOCUS_CHAT_BUTTON = 27,
|
|
30
30
|
SET_CONVERSATION_ENDED_BY_AGENT = 28,
|
|
31
31
|
SET_WIDGET_STATE = 29,
|
|
32
|
-
SET_LIVE_CHAT_CONTEXT = 30
|
|
32
|
+
SET_LIVE_CHAT_CONTEXT = 30,
|
|
33
|
+
SET_BOT_OAUTH_SIGNIN_ID = 31,
|
|
34
|
+
SET_WIDGET_SIZE = 32,
|
|
35
|
+
SET_WIDGET_INSTANCE_ID = 33
|
|
33
36
|
}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { ILiveChatWidgetContext } from "./ILiveChatWidgetContext";
|
|
2
1
|
import { ILiveChatWidgetProps } from "../../components/livechatwidget/interfaces/ILiveChatWidgetProps";
|
|
3
|
-
export declare const getLiveChatWidgetContextInitialState: (props: ILiveChatWidgetProps) =>
|
|
2
|
+
export declare const getLiveChatWidgetContextInitialState: (props: ILiveChatWidgetProps) => any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/omnichannel-chat-widget",
|
|
3
|
-
"version": "0.1.0-main.
|
|
3
|
+
"version": "0.1.0-main.cda7a31",
|
|
4
4
|
"description": "Microsoft Omnichannel Chat Widget",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"types": "lib/types/index.d.ts",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"import": "./lib/esm/index.js",
|
|
17
17
|
"require": "./lib/cjs/index.js",
|
|
18
18
|
"types": "./lib/types/index.d.ts"
|
|
19
|
-
}
|
|
19
|
+
},
|
|
20
|
+
"./package.json": "./package.json"
|
|
20
21
|
},
|
|
21
22
|
"devDependencies": {
|
|
22
23
|
"@babel/core": "^7.15.8",
|
|
@@ -67,22 +68,19 @@
|
|
|
67
68
|
"storybook-addon-playwright": "^4.9.2",
|
|
68
69
|
"terser-webpack-plugin": "^4.2.3",
|
|
69
70
|
"ts-loader": "^9.2.6",
|
|
70
|
-
"typescript": "
|
|
71
|
+
"typescript": "4.6.4",
|
|
71
72
|
"webpack": "^4.44.2",
|
|
72
73
|
"webpack-cli": "^4.9.2"
|
|
73
74
|
},
|
|
74
|
-
"peerDependencies": {
|
|
75
|
-
"react": "^16.14.0",
|
|
76
|
-
"react-dom": "^16.14.0"
|
|
77
|
-
},
|
|
78
75
|
"dependencies": {
|
|
79
76
|
"@fluentui/react": "^8.49.1",
|
|
80
|
-
"@microsoft/omnichannel-chat-components": "0.1.0-main.
|
|
81
|
-
"@microsoft/omnichannel-chat-sdk": "1.
|
|
77
|
+
"@microsoft/omnichannel-chat-components": "0.1.0-main.600e05c",
|
|
78
|
+
"@microsoft/omnichannel-chat-sdk": "1.1.1-main.4e1bf63",
|
|
82
79
|
"abort-controller-es5": "^2.0.1",
|
|
83
80
|
"dompurify": "^2.3.4",
|
|
84
81
|
"markdown-it": "^12.3.2",
|
|
85
82
|
"markdown-it-for-inline": "^0.1.1",
|
|
83
|
+
"md5-typescript": "^1.0.5",
|
|
86
84
|
"p-defer-es5": "^2.0.1",
|
|
87
85
|
"slack-markdown-it": "^1.0.5"
|
|
88
86
|
},
|
|
@@ -93,6 +91,8 @@
|
|
|
93
91
|
"build-storybook": "build-storybook",
|
|
94
92
|
"build": "yarn lint && yarn build:esm && yarn build:cjs && tsc",
|
|
95
93
|
"test:unit": "jest -c jest.config.unit.cjs --env=jsdom --runInBand --force-exit",
|
|
94
|
+
"test:e2e": "cd automation_tests && yarn test",
|
|
95
|
+
"test:e2e:build": "yarn build-sample && cd automation_tests && yarn test",
|
|
96
96
|
"test:visual": "jest -c jest.config.visual.cjs",
|
|
97
97
|
"test:all": "yarn test:unit && yarn test:visual",
|
|
98
98
|
"build:esm": "babel ./src --config-file ./babel.esm.config.json --out-dir lib/esm --extensions .ts,.js,.tsx --ignore **/*.test.ts,**/*.stories.tsx,**/*.test.tsx",
|