@microsoft/omnichannel-chat-widget 1.0.6-main.ffb4e2a → 1.1.1-main.1f4a6a7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/common/Constants.js +2 -0
- package/lib/cjs/common/storage/default/defaultClientDataStoreProvider.js +20 -15
- package/lib/cjs/common/telemetry/TelemetryConstants.js +2 -0
- package/lib/cjs/common/telemetry/TelemetryHelper.js +25 -15
- package/lib/cjs/common/utils.js +17 -2
- package/lib/cjs/components/draggable/DraggableChatWidget.js +168 -0
- package/lib/cjs/components/draggable/DraggableEventEmitter.js +74 -0
- package/lib/cjs/components/draggable/DraggableEventNames.js +14 -0
- package/lib/cjs/components/draggable/DraggableEventReceiver.js +34 -0
- package/lib/cjs/components/draggable/IDraggableElementPosition.js +1 -0
- package/lib/cjs/components/draggable/IDraggableElementPositionDelta.js +1 -0
- package/lib/cjs/components/draggable/IDraggableEvent.js +1 -0
- package/lib/cjs/components/footerstateful/FooterStateful.js +2 -2
- package/lib/cjs/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +21 -12
- package/lib/cjs/components/footerstateful/downloadtranscriptstateful/interfaces/IWebChatTranscriptConfig.js +1 -0
- package/lib/cjs/components/headerstateful/HeaderStateful.js +27 -0
- package/lib/cjs/components/livechatwidget/common/createDownloadTranscriptProps.js +27 -0
- package/lib/cjs/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +13 -2
- package/lib/cjs/components/livechatwidget/common/registerTelemetryLoggers.js +15 -5
- package/lib/cjs/components/livechatwidget/common/startChat.js +1 -1
- package/lib/cjs/components/livechatwidget/interfaces/IDraggableChatWidgetProps.js +1 -0
- package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +58 -30
- package/lib/cjs/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +6 -0
- package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +48 -13
- package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts.js +2 -1
- package/lib/cjs/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.js +1 -0
- package/lib/cjs/components/webchatcontainerstateful/common/mockchatsdk.js +5 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios.js +1 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSentMessageAnchorStyles.js +10 -0
- package/lib/cjs/plugins/createChatTranscript.js +548 -0
- package/lib/esm/common/Constants.js +2 -0
- package/lib/esm/common/storage/default/defaultClientDataStoreProvider.js +18 -14
- package/lib/esm/common/telemetry/TelemetryConstants.js +2 -0
- package/lib/esm/common/telemetry/TelemetryHelper.js +25 -15
- package/lib/esm/common/utils.js +15 -1
- package/lib/esm/components/draggable/DraggableChatWidget.js +158 -0
- package/lib/esm/components/draggable/DraggableEventEmitter.js +64 -0
- package/lib/esm/components/draggable/DraggableEventNames.js +7 -0
- package/lib/esm/components/draggable/DraggableEventReceiver.js +25 -0
- package/lib/esm/components/draggable/IDraggableElementPosition.js +1 -0
- package/lib/esm/components/draggable/IDraggableElementPositionDelta.js +1 -0
- package/lib/esm/components/draggable/IDraggableEvent.js +1 -0
- package/lib/esm/components/footerstateful/FooterStateful.js +2 -2
- package/lib/esm/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +22 -13
- package/lib/esm/components/footerstateful/downloadtranscriptstateful/interfaces/IWebChatTranscriptConfig.js +1 -0
- package/lib/esm/components/headerstateful/HeaderStateful.js +27 -0
- package/lib/esm/components/livechatwidget/common/createDownloadTranscriptProps.js +20 -0
- package/lib/esm/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +13 -2
- package/lib/esm/components/livechatwidget/common/registerTelemetryLoggers.js +15 -5
- package/lib/esm/components/livechatwidget/common/startChat.js +1 -1
- package/lib/esm/components/livechatwidget/interfaces/IDraggableChatWidgetProps.js +1 -0
- package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +58 -30
- package/lib/esm/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +6 -0
- package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +48 -13
- package/lib/esm/components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts.js +2 -1
- package/lib/esm/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.js +1 -0
- package/lib/esm/components/webchatcontainerstateful/common/mockchatsdk.js +5 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios.js +1 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSentMessageAnchorStyles.js +3 -0
- package/lib/esm/plugins/createChatTranscript.js +543 -0
- package/lib/types/common/Constants.d.ts +2 -0
- package/lib/types/common/storage/default/defaultClientDataStoreProvider.d.ts +1 -0
- package/lib/types/common/telemetry/TelemetryConstants.d.ts +1 -0
- package/lib/types/common/telemetry/definitions/Contracts.d.ts +1 -0
- package/lib/types/common/utils.d.ts +1 -0
- package/lib/types/components/draggable/DraggableChatWidget.d.ts +9 -0
- package/lib/types/components/draggable/DraggableEventEmitter.d.ts +27 -0
- package/lib/types/components/draggable/DraggableEventNames.d.ts +6 -0
- package/lib/types/components/draggable/DraggableEventReceiver.d.ts +27 -0
- package/lib/types/components/draggable/IDraggableElementPosition.d.ts +5 -0
- package/lib/types/components/draggable/IDraggableElementPositionDelta.d.ts +5 -0
- package/lib/types/components/draggable/IDraggableEvent.d.ts +12 -0
- package/lib/types/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.d.ts +2 -1
- package/lib/types/components/footerstateful/downloadtranscriptstateful/interfaces/IDownloadTranscriptProps.d.ts +5 -0
- package/lib/types/components/footerstateful/downloadtranscriptstateful/interfaces/IWebChatTranscriptConfig.d.ts +13 -0
- package/lib/types/components/headerstateful/interfaces/IHeaderStatefulParams.d.ts +12 -0
- package/lib/types/components/livechatwidget/common/createDownloadTranscriptProps.d.ts +24 -0
- package/lib/types/components/livechatwidget/interfaces/IDraggableChatWidgetProps.d.ts +10 -0
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +2 -0
- package/lib/types/components/webchatcontainerstateful/WebChatContainerStateful.d.ts +2 -2
- package/lib/types/components/webchatcontainerstateful/common/mockchatsdk.d.ts +5 -0
- package/lib/types/components/webchatcontainerstateful/interfaces/IAdaptiveCardStyles.d.ts +1 -0
- package/lib/types/components/webchatcontainerstateful/interfaces/IRenderingMiddlewareProps.d.ts +3 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios.d.ts +2 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSentMessageAnchorStyles.d.ts +2 -0
- package/lib/types/contexts/common/ILiveChatWidgetLocalizedTexts.d.ts +1 -0
- package/lib/types/plugins/createChatTranscript.d.ts +2 -0
- package/package.json +4 -4
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import DraggableEventNames from "./DraggableEventNames";
|
|
2
|
+
import IDraggableElementPosition from "./IDraggableElementPosition";
|
|
3
|
+
interface IDraggableEvent {
|
|
4
|
+
channel: string;
|
|
5
|
+
eventName: DraggableEventNames | string;
|
|
6
|
+
offset?: {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
};
|
|
10
|
+
position?: IDraggableElementPosition;
|
|
11
|
+
}
|
|
12
|
+
export default IDraggableEvent;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
2
|
-
|
|
2
|
+
import { IDownloadTranscriptProps } from "./interfaces/IDownloadTranscriptProps";
|
|
3
|
+
export declare const downloadTranscript: (chatSDK: any, downloadTranscriptProps: IDownloadTranscriptProps, state?: ILiveChatWidgetContext | undefined) => Promise<void>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IWebChatTranscriptConfig } from "./IWebChatTranscriptConfig";
|
|
1
2
|
export interface IDownloadTranscriptProps {
|
|
2
3
|
/**
|
|
3
4
|
* Attachment message prefix for download chat transcript
|
|
@@ -11,4 +12,8 @@ export interface IDownloadTranscriptProps {
|
|
|
11
12
|
* Callback function for markdown render for chat transcript
|
|
12
13
|
*/
|
|
13
14
|
renderMarkDown?: (transcriptContent: string) => string;
|
|
15
|
+
/**
|
|
16
|
+
* WebChat Transcript config
|
|
17
|
+
*/
|
|
18
|
+
webChatTranscript?: IWebChatTranscriptConfig;
|
|
14
19
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface IWebChatTranscriptConfig {
|
|
2
|
+
disabled?: boolean;
|
|
3
|
+
fileName?: string;
|
|
4
|
+
pageTitle?: string;
|
|
5
|
+
attachmentMessage?: string;
|
|
6
|
+
networkOnlineMessage?: string;
|
|
7
|
+
networkOfflineMessage?: string;
|
|
8
|
+
transcriptBackgroundColor?: string;
|
|
9
|
+
agentAvatarBackgroundColor?: string;
|
|
10
|
+
agentAvatarFontColor?: string;
|
|
11
|
+
customerAvatarBackgroundColor?: string;
|
|
12
|
+
customerAvatarFontColor?: string;
|
|
13
|
+
}
|
|
@@ -18,4 +18,16 @@ export interface IHeaderStatefulParams {
|
|
|
18
18
|
* @param postMessageToOtherTab : If set to true endchat will send a message to other tabs(multi-tabs)
|
|
19
19
|
*/
|
|
20
20
|
endChat: (adapter: any, skipEndChatSDK?: boolean, skipCloseChat?: boolean, postMessageToOtherTab?: boolean) => Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* draggableEventChannel: Channel to send/receive draggable events
|
|
23
|
+
*/
|
|
24
|
+
draggableEventChannel?: string;
|
|
25
|
+
/**
|
|
26
|
+
* draggableEventEmitterTargetWindow: Target window to post IDraggableEvent messages
|
|
27
|
+
*/
|
|
28
|
+
draggableEventEmitterTargetWindow?: Window;
|
|
29
|
+
/**
|
|
30
|
+
* draggable: Whether the header is draggable
|
|
31
|
+
*/
|
|
32
|
+
draggable?: boolean;
|
|
21
33
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { StyleOptions } from "botframework-webchat-api";
|
|
2
|
+
import { IDownloadTranscriptProps } from "../../footerstateful/downloadtranscriptstateful/interfaces/IDownloadTranscriptProps";
|
|
3
|
+
import { IWebChatContainerStatefulProps } from "../../webchatcontainerstateful/interfaces/IWebChatContainerStatefulProps";
|
|
4
|
+
declare const createDownloadTranscriptProps: (downloadTranscriptProps: IDownloadTranscriptProps, webChatStyles: StyleOptions, webChatContainerProps?: IWebChatContainerStatefulProps | undefined) => {
|
|
5
|
+
webChatTranscript: {
|
|
6
|
+
disableNewLineMarkdownSupport: boolean | undefined;
|
|
7
|
+
disableMarkdownMessageFormatting: boolean | undefined;
|
|
8
|
+
transcriptBackgroundColor: string | undefined;
|
|
9
|
+
agentAvatarBackgroundColor: string | undefined;
|
|
10
|
+
agentAvatarFontColor: string | undefined;
|
|
11
|
+
customerAvatarBackgroundColor: string | undefined;
|
|
12
|
+
customerAvatarFontColor: string | undefined;
|
|
13
|
+
disabled?: boolean | undefined;
|
|
14
|
+
fileName?: string | undefined;
|
|
15
|
+
pageTitle?: string | undefined;
|
|
16
|
+
attachmentMessage?: string | undefined;
|
|
17
|
+
networkOnlineMessage?: string | undefined;
|
|
18
|
+
networkOfflineMessage?: string | undefined;
|
|
19
|
+
};
|
|
20
|
+
attachmentMessage?: string | undefined;
|
|
21
|
+
bannerMessageOnError?: string | undefined;
|
|
22
|
+
renderMarkDown?: ((transcriptContent: string) => string) | undefined;
|
|
23
|
+
};
|
|
24
|
+
export default createDownloadTranscriptProps;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface IDraggableChatWidgetProps {
|
|
2
|
+
/**
|
|
3
|
+
* Whether to enable Draggable Chat Widget.
|
|
4
|
+
*/
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* To specify whether the iframe is used to drag. The IDraggableEvent would be posted to the parent window if set to true.
|
|
8
|
+
*/
|
|
9
|
+
targetIframe?: boolean;
|
|
10
|
+
}
|
|
@@ -23,6 +23,7 @@ import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidget
|
|
|
23
23
|
import { IContextDataStore } from "../../../common/interfaces/IContextDataStore";
|
|
24
24
|
import { IPostChatSurveyPaneStatefulProps } from "../../postchatsurveypanestateful/interfaces/IPostChatSurveyPaneStatefulProps";
|
|
25
25
|
import { IScrollBarProps } from "./IScrollBarProps";
|
|
26
|
+
import { IDraggableChatWidgetProps } from "./IDraggableChatWidgetProps";
|
|
26
27
|
export interface ILiveChatWidgetProps {
|
|
27
28
|
audioNotificationProps?: IAudioNotificationProps;
|
|
28
29
|
callingContainerProps?: ICallingContainerProps;
|
|
@@ -57,4 +58,5 @@ export interface ILiveChatWidgetProps {
|
|
|
57
58
|
useSessionStorage?: boolean;
|
|
58
59
|
allowSdkChatSupport?: boolean;
|
|
59
60
|
initialCustomContext?: any;
|
|
61
|
+
draggableChatWidgetProps?: IDraggableChatWidgetProps;
|
|
60
62
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const WebChatContainerStateful: (props:
|
|
1
|
+
import { ILiveChatWidgetProps } from "../livechatwidget/interfaces/ILiveChatWidgetProps";
|
|
2
|
+
export declare const WebChatContainerStateful: (props: ILiveChatWidgetProps) => JSX.Element;
|
|
3
3
|
export default WebChatContainerStateful;
|
|
@@ -3,6 +3,11 @@ import MockAdapter from "./mockadapter";
|
|
|
3
3
|
export declare class MockChatSDK {
|
|
4
4
|
protected sleep: (ms: any) => Promise<unknown>;
|
|
5
5
|
isMockModeOn: boolean;
|
|
6
|
+
omnichannelConfig: {
|
|
7
|
+
widgetId: string;
|
|
8
|
+
orgId: string;
|
|
9
|
+
orgUrl: string;
|
|
10
|
+
};
|
|
6
11
|
startChat(): Promise<void>;
|
|
7
12
|
endChat(): null;
|
|
8
13
|
getChatToken(): null;
|
package/lib/types/components/webchatcontainerstateful/interfaces/IRenderingMiddlewareProps.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { IAttachmentProps } from "./IAttachmentProps";
|
|
2
|
+
import React from "react";
|
|
3
3
|
export interface IRenderingMiddlewareProps {
|
|
4
4
|
timestampDir?: "ltr" | "rtl" | "auto";
|
|
5
5
|
disableActivityMiddleware?: boolean;
|
|
@@ -8,6 +8,7 @@ export interface IRenderingMiddlewareProps {
|
|
|
8
8
|
disableAvatarMiddleware?: boolean;
|
|
9
9
|
disableGroupActivitiesMiddleware?: boolean;
|
|
10
10
|
disableTypingIndicatorMiddleware?: boolean;
|
|
11
|
+
disableThirdPartyCookiesAlert?: boolean;
|
|
11
12
|
hideSendboxOnConversationEnd?: boolean;
|
|
12
13
|
userMessageStyleProps?: React.CSSProperties;
|
|
13
14
|
systemMessageStyleProps?: React.CSSProperties;
|
|
@@ -31,4 +32,5 @@ export interface IRenderingMiddlewareProps {
|
|
|
31
32
|
attachmentContentStyles?: React.CSSProperties;
|
|
32
33
|
attachmentSizeStyles?: React.CSSProperties;
|
|
33
34
|
receivedMessageAnchorStyles?: React.CSSProperties;
|
|
35
|
+
sentMessageAnchorStyles?: React.CSSProperties;
|
|
34
36
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/omnichannel-chat-widget",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1-main.1f4a6a7",
|
|
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.
|
|
78
|
-
"@microsoft/omnichannel-chat-sdk": "1.4.
|
|
77
|
+
"@microsoft/omnichannel-chat-components": "^1.0.3",
|
|
78
|
+
"@microsoft/omnichannel-chat-sdk": "1.4.3",
|
|
79
79
|
"abort-controller-es5": "^2.0.1",
|
|
80
80
|
"dompurify": "^2.3.4",
|
|
81
81
|
"markdown-it": "^12.3.2",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"build-sample": "yarn build && webpack --config ./webpack.config.cjs",
|
|
103
103
|
"build-sample:dev": "yarn build && webpack --config ./webpack.dev.config.cjs",
|
|
104
104
|
"test:visual:build": "yarn build-storybook && yarn test:visual",
|
|
105
|
-
"lint": "yarn eslint ."
|
|
105
|
+
"lint": "yarn eslint . --max-warnings=0"
|
|
106
106
|
},
|
|
107
107
|
"resolutions": {
|
|
108
108
|
"**/url-parse": "1.5.9",
|