@microsoft/omnichannel-chat-widget 1.7.5-main.290ba08 → 1.7.6-main.9b09b06
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/facades/FacadeChatSDK.js +11 -1
- package/lib/cjs/common/telemetry/TelemetryConstants.js +32 -0
- package/lib/cjs/common/telemetry/TelemetryHelper.js +10 -0
- package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +15 -1
- package/lib/cjs/components/confirmationpanestateful/ConfirmationPaneStateful.js +14 -2
- package/lib/cjs/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +16 -2
- package/lib/cjs/components/footerstateful/FooterStateful.js +15 -0
- package/lib/cjs/components/headerstateful/HeaderStateful.js +16 -2
- package/lib/cjs/components/livechatwidget/LiveChatWidget.js +3 -2
- package/lib/cjs/components/livechatwidget/common/createInternetConnectionChangeHandler.js +5 -3
- package/lib/cjs/components/livechatwidget/interfaces/IFeatureConfigProps.js +1 -0
- package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +37 -4
- package/lib/cjs/components/loadingpanestateful/LoadingPaneStateful.js +20 -2
- package/lib/cjs/components/notificationpanestateful/NotificationPaneStateful.js +21 -7
- package/lib/cjs/components/ooohpanestateful/OOOHPaneStateful.js +12 -1
- package/lib/cjs/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +14 -3
- package/lib/cjs/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +13 -0
- package/lib/cjs/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +12 -0
- package/lib/cjs/components/reconnectchatpanestateful/ReconnectChatPaneStateful.js +12 -1
- package/lib/cjs/components/startchaterrorpanestateful/StartChatErrorPaneStateful.js +19 -8
- package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +14 -1
- package/lib/cjs/components/webchatcontainerstateful/common/defaultStyles/defaultWebChatStyles.js +2 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/WebChatActionType.js +1 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +7 -7
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentProcessingMiddleware.js +4 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.js +7 -4
- package/lib/cjs/plugins/createChatTranscript.js +15 -6
- package/lib/esm/common/facades/FacadeChatSDK.js +11 -1
- package/lib/esm/common/telemetry/TelemetryConstants.js +32 -0
- package/lib/esm/common/telemetry/TelemetryHelper.js +10 -0
- package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +15 -1
- package/lib/esm/components/confirmationpanestateful/ConfirmationPaneStateful.js +14 -3
- package/lib/esm/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +17 -3
- package/lib/esm/components/footerstateful/FooterStateful.js +14 -0
- package/lib/esm/components/headerstateful/HeaderStateful.js +16 -2
- package/lib/esm/components/livechatwidget/LiveChatWidget.js +3 -2
- package/lib/esm/components/livechatwidget/common/createInternetConnectionChangeHandler.js +5 -3
- package/lib/esm/components/livechatwidget/interfaces/IFeatureConfigProps.js +1 -0
- package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +37 -4
- package/lib/esm/components/loadingpanestateful/LoadingPaneStateful.js +19 -2
- package/lib/esm/components/notificationpanestateful/NotificationPaneStateful.js +21 -7
- package/lib/esm/components/ooohpanestateful/OOOHPaneStateful.js +12 -1
- package/lib/esm/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +14 -3
- package/lib/esm/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +13 -1
- package/lib/esm/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +11 -0
- package/lib/esm/components/reconnectchatpanestateful/ReconnectChatPaneStateful.js +12 -1
- package/lib/esm/components/startchaterrorpanestateful/StartChatErrorPaneStateful.js +19 -8
- package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +14 -1
- package/lib/esm/components/webchatcontainerstateful/common/defaultStyles/defaultWebChatStyles.js +2 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/WebChatActionType.js +1 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +7 -7
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentProcessingMiddleware.js +4 -4
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.js +7 -4
- package/lib/esm/plugins/createChatTranscript.js +15 -6
- package/lib/types/common/facades/FacadeChatSDK.d.ts +2 -1
- package/lib/types/common/telemetry/TelemetryConstants.d.ts +33 -1
- package/lib/types/common/telemetry/TelemetryHelper.d.ts +2 -1
- package/lib/types/common/telemetry/definitions/Contracts.d.ts +1 -1
- package/lib/types/common/telemetry/definitions/Payload.d.ts +14 -1
- package/lib/types/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.d.ts +1 -1
- package/lib/types/components/footerstateful/downloadtranscriptstateful/interfaces/IWebChatTranscriptConfig.d.ts +1 -0
- package/lib/types/components/livechatwidget/common/authHelper.d.ts +1 -1
- package/lib/types/components/livechatwidget/common/createAdapter.d.ts +1 -1
- package/lib/types/components/livechatwidget/common/createDownloadTranscriptProps.d.ts +2 -1
- package/lib/types/components/livechatwidget/common/createInternetConnectionChangeHandler.d.ts +2 -1
- package/lib/types/components/livechatwidget/common/endChat.d.ts +1 -1
- package/lib/types/components/livechatwidget/common/getMockChatSDKIfApplicable.d.ts +1 -1
- package/lib/types/components/livechatwidget/common/reconnectChatHelper.d.ts +2 -2
- package/lib/types/components/livechatwidget/common/setPostChatContextAndLoadSurvey.d.ts +1 -1
- package/lib/types/components/livechatwidget/common/startChat.d.ts +2 -2
- package/lib/types/components/livechatwidget/common/startChatErrorHandler.d.ts +1 -1
- package/lib/types/components/livechatwidget/common/startProactiveChat.d.ts +1 -1
- package/lib/types/components/livechatwidget/interfaces/IFeatureConfigProps.d.ts +3 -0
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +9 -7
- package/lib/types/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.d.ts +1 -1
- package/lib/types/components/webchatcontainerstateful/interfaces/IWebChatProps.d.ts +1 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/enums/WebChatActionType.d.ts +2 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.d.ts +1 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/avatarMiddleware.d.ts +1 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.d.ts +1 -1
- package/lib/types/hooks/useChatSDKStore.d.ts +1 -1
- package/lib/types/hooks/useDebounce.d.ts +1 -1
- package/package.json +17 -8
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { Stack } from "@fluentui/react";
|
|
4
4
|
import { LogLevel, TelemetryEvent } from "../../common/telemetry/TelemetryConstants";
|
|
5
5
|
import React, { useEffect } from "react";
|
|
6
|
+
import { createTimer, setFocusOnSendBox } from "../../common/utils";
|
|
6
7
|
import { BotMagicCodeStore } from "./webchatcontroller/BotMagicCodeStore";
|
|
7
8
|
import { Components } from "botframework-webchat";
|
|
8
9
|
import { Constants } from "../../common/Constants";
|
|
@@ -19,8 +20,8 @@ import { defaultSentMessageAnchorStyles } from "./webchatcontroller/middlewares/
|
|
|
19
20
|
import { defaultSystemMessageBoxStyles } from "./webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageBoxStyles";
|
|
20
21
|
import { defaultUserMessageBoxStyles } from "./webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageBoxStyles";
|
|
21
22
|
import { defaultWebChatContainerStatefulProps } from "./common/defaultProps/defaultWebChatContainerStatefulProps";
|
|
22
|
-
import { setFocusOnSendBox } from "../../common/utils";
|
|
23
23
|
import { useChatContextStore } from "../..";
|
|
24
|
+
let uiTimer;
|
|
24
25
|
const broadcastChannelMessageEvent = "message";
|
|
25
26
|
const postActivity = activity => {
|
|
26
27
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
@@ -48,6 +49,12 @@ const createMagicCodeSuccessResponse = signin => {
|
|
|
48
49
|
};
|
|
49
50
|
export const WebChatContainerStateful = props => {
|
|
50
51
|
var _webChatContainerProp, _webChatContainerProp2, _webChatContainerProp3, _webChatContainerProp4, _webChatContainerProp5, _webChatContainerProp6, _webChatContainerProp7, _props$webChatContain5, _props$webChatContain6, _defaultWebChatContai, _props$webChatContain7, _props$webChatContain8, _defaultWebChatContai2, _webChatContainerProp8, _webChatContainerProp9, _webChatContainerProp10, _webChatContainerProp11, _webChatContainerProp12, _webChatContainerProp13, _webChatContainerProp14, _webChatContainerProp15, _props$webChatContain9, _props$webChatContain10;
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
uiTimer = createTimer();
|
|
54
|
+
TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
|
|
55
|
+
Event: TelemetryEvent.UXWebchatContainerCompleted
|
|
56
|
+
});
|
|
57
|
+
}, []);
|
|
51
58
|
const {
|
|
52
59
|
BasicWebChat
|
|
53
60
|
} = Components;
|
|
@@ -143,6 +150,12 @@ export const WebChatContainerStateful = props => {
|
|
|
143
150
|
};
|
|
144
151
|
magicCodeBroadcastChannel.addEventListener(broadcastChannelMessageEvent, eventListener);
|
|
145
152
|
}, []);
|
|
153
|
+
useEffect(() => {
|
|
154
|
+
TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
|
|
155
|
+
Event: TelemetryEvent.UXWebchatContainerCompleted,
|
|
156
|
+
ElapsedTimeInMilliseconds: uiTimer.milliSecondsElapsed
|
|
157
|
+
});
|
|
158
|
+
}, []);
|
|
146
159
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("style", null, `
|
|
147
160
|
.webchat__stacked-layout__content .ac-pushButton {
|
|
148
161
|
cursor: pointer;
|
package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/WebChatActionType.js
CHANGED
|
@@ -21,4 +21,5 @@ export let WebChatActionType;
|
|
|
21
21
|
WebChatActionType["WEB_CHAT_DISMISS_NOTIFICATION"] = "WEB_CHAT/DISMISS_NOTIFICATION";
|
|
22
22
|
WebChatActionType["WEB_CHAT_SET_SEND_BOX"] = "WEB_CHAT/SET_SEND_BOX";
|
|
23
23
|
WebChatActionType["WEB_CHAT_SEND_FILES"] = "WEB_CHAT/SEND_FILES";
|
|
24
|
+
WebChatActionType["WEB_CHAT_SET_SEND_BOX_ATTACHMENTS"] = "WEB_CHAT/SET_SEND_BOX_ATTACHMENTS";
|
|
24
25
|
})(WebChatActionType || (WebChatActionType = {}));
|
|
@@ -8,19 +8,19 @@
|
|
|
8
8
|
import { Constants, MimeTypes, WebChatMiddlewareConstants } from "../../../../../common/Constants";
|
|
9
9
|
import React from "react";
|
|
10
10
|
import { getFileAttachmentIconData, isInlineMediaSupported } from "../../../common/utils/FileAttachmentIconManager";
|
|
11
|
+
import Attachment from "./attachments/Attachment";
|
|
11
12
|
import { BroadcastEvent } from "../../../../../common/telemetry/TelemetryConstants";
|
|
12
13
|
import { BroadcastService } from "@microsoft/omnichannel-chat-components";
|
|
14
|
+
import FileScanStatus from "./attachments/FileScanStatus";
|
|
15
|
+
import MaliciousAttachment from "./attachments/MaliciousAttachment";
|
|
16
|
+
import { NotificationHandler } from "../../notification/NotificationHandler";
|
|
17
|
+
import { NotificationScenarios } from "../../enums/NotificationScenarios";
|
|
18
|
+
import ScanInProgressAttachment from "./attachments/ScanInProgressAttachment";
|
|
13
19
|
import { WebChatActionType } from "../../enums/WebChatActionType";
|
|
14
20
|
import { defaultAttachmentAdaptiveCardStyles } from "./defaultStyles/defaultAtttachmentAdaptiveCardStyles";
|
|
15
21
|
import { defaultAttachmentProps } from "../../../common/defaultProps/defaultAttachmentProps";
|
|
16
|
-
import { useChatContextStore } from "../../../../..";
|
|
17
|
-
import { NotificationHandler } from "../../notification/NotificationHandler";
|
|
18
|
-
import { NotificationScenarios } from "../../enums/NotificationScenarios";
|
|
19
22
|
import { defaultMiddlewareLocalizedTexts } from "../../../common/defaultProps/defaultMiddlewareLocalizedTexts";
|
|
20
|
-
import
|
|
21
|
-
import ScanInProgressAttachment from "./attachments/ScanInProgressAttachment";
|
|
22
|
-
import MaliciousAttachment from "./attachments/MaliciousAttachment";
|
|
23
|
-
import FileScanStatus from "./attachments/FileScanStatus";
|
|
23
|
+
import { useChatContextStore } from "../../../../..";
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* Patch card with different attachment data.
|
|
@@ -12,7 +12,7 @@ const createSendFileAction = files => {
|
|
|
12
12
|
payload: {
|
|
13
13
|
files
|
|
14
14
|
},
|
|
15
|
-
type: WebChatActionType.
|
|
15
|
+
type: WebChatActionType.WEB_CHAT_SEND_MESSAGE
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
18
|
|
|
@@ -22,9 +22,9 @@ const attachmentProcessingMiddleware = _ref => {
|
|
|
22
22
|
dispatch
|
|
23
23
|
} = _ref;
|
|
24
24
|
return next => async action => {
|
|
25
|
-
var _action$payload, _action$payload$
|
|
26
|
-
if ((action === null || action === void 0 ? void 0 : action.type) === WebChatActionType.
|
|
27
|
-
const files = action.payload.
|
|
25
|
+
var _action$payload, _action$payload$attac;
|
|
26
|
+
if ((action === null || action === void 0 ? void 0 : action.type) === WebChatActionType.WEB_CHAT_SEND_MESSAGE && (action === null || action === void 0 ? void 0 : (_action$payload = action.payload) === null || _action$payload === void 0 ? void 0 : (_action$payload$attac = _action$payload.attachments) === null || _action$payload$attac === void 0 ? void 0 : _action$payload$attac.length) > 0) {
|
|
27
|
+
const files = action.payload.attachments;
|
|
28
28
|
if (files.length === 1) {
|
|
29
29
|
return next(action);
|
|
30
30
|
}
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
******/
|
|
6
6
|
|
|
7
7
|
import { LogLevel, TelemetryEvent } from "../../../../../common/telemetry/TelemetryConstants";
|
|
8
|
+
import { AMSConstants } from "../../../../../common/Constants";
|
|
8
9
|
import { NotificationHandler } from "../../notification/NotificationHandler";
|
|
9
10
|
import { NotificationScenarios } from "../../enums/NotificationScenarios";
|
|
10
|
-
import { WebChatActionType } from "../../enums/WebChatActionType";
|
|
11
11
|
import { TelemetryHelper } from "../../../../../common/telemetry/TelemetryHelper";
|
|
12
|
-
import {
|
|
12
|
+
import { WebChatActionType } from "../../enums/WebChatActionType";
|
|
13
13
|
const MBtoBRatio = 1000000;
|
|
14
14
|
|
|
15
15
|
/*
|
|
@@ -20,6 +20,9 @@ const validateAttachment = (action, allowedFileExtensions, maxFileSizeSupportedB
|
|
|
20
20
|
var _action$payload, _action$payload$activ, _action$payload2, _action$payload2$acti, _action$payload2$acti2, _action$payload3, _action$payload3$acti, _action$payload3$acti2;
|
|
21
21
|
const attachments = action === null || action === void 0 ? void 0 : (_action$payload = action.payload) === null || _action$payload === void 0 ? void 0 : (_action$payload$activ = _action$payload.activity) === null || _action$payload$activ === void 0 ? void 0 : _action$payload$activ.attachments;
|
|
22
22
|
const attachmentSizes = action === null || action === void 0 ? void 0 : (_action$payload2 = action.payload) === null || _action$payload2 === void 0 ? void 0 : (_action$payload2$acti = _action$payload2.activity) === null || _action$payload2$acti === void 0 ? void 0 : (_action$payload2$acti2 = _action$payload2$acti.channelData) === null || _action$payload2$acti2 === void 0 ? void 0 : _action$payload2$acti2.attachmentSizes;
|
|
23
|
+
if (!attachments || attachments.length === 0) {
|
|
24
|
+
return action;
|
|
25
|
+
}
|
|
23
26
|
if (attachments) {
|
|
24
27
|
for (let i = 0; i < attachments.length; i++) {
|
|
25
28
|
const maxUploadFileSize = getMaxUploadFileSize(maxFileSizeSupportedByDynamics, attachments[i].contentType);
|
|
@@ -190,11 +193,11 @@ const createAttachmentUploadValidatorMiddleware = (allowedFileExtensions, maxFil
|
|
|
190
193
|
} = _ref;
|
|
191
194
|
return next => action => {
|
|
192
195
|
if (action.type === WebChatActionType.DIRECT_LINE_POST_ACTIVITY) {
|
|
193
|
-
var _payload$activity, _payload$
|
|
196
|
+
var _payload$activity, _payload$activity$att, _payload$activity2, _payload$activity2$ch, _payload$activity2$ch2;
|
|
194
197
|
const {
|
|
195
198
|
payload
|
|
196
199
|
} = action;
|
|
197
|
-
if (payload !== null && payload !== void 0 &&
|
|
200
|
+
if (payload !== null && payload !== void 0 && payload.activity.attachments && payload.activity.attachments.length > 0 && (payload === null || payload === void 0 ? void 0 : (_payload$activity = payload.activity) === null || _payload$activity === void 0 ? void 0 : (_payload$activity$att = _payload$activity.attachments) === null || _payload$activity$att === void 0 ? void 0 : _payload$activity$att.length) === (payload === null || payload === void 0 ? void 0 : (_payload$activity2 = payload.activity) === null || _payload$activity2 === void 0 ? void 0 : (_payload$activity2$ch = _payload$activity2.channelData) === null || _payload$activity2$ch === void 0 ? void 0 : (_payload$activity2$ch2 = _payload$activity2$ch.attachmentSizes) === null || _payload$activity2$ch2 === void 0 ? void 0 : _payload$activity2$ch2.length)) {
|
|
198
201
|
return next(validateAttachment(action, allowedFileExtensions, maxFileSizeSupportedByDynamics, localizedTexts));
|
|
199
202
|
}
|
|
200
203
|
}
|
|
@@ -9,7 +9,7 @@ class TranscriptHTMLBuilder {
|
|
|
9
9
|
// eslint-disable-line @typescript-eslint/no-explicit-any
|
|
10
10
|
|
|
11
11
|
constructor(options) {
|
|
12
|
-
var _this$options, _this$options2, _this$options3, _this$options4, _this$options5, _this$options6, _this$options7, _this$options8, _this$options9, _this$options10, _this$options11, _this$options12;
|
|
12
|
+
var _this$options, _this$options2, _this$options3, _this$options4, _this$options5, _this$options6, _this$options7, _this$options8, _this$options9, _this$options10, _this$options11, _this$options12, _this$options13;
|
|
13
13
|
_defineProperty(this, "options", void 0);
|
|
14
14
|
_defineProperty(this, "pageTitle", "Customer Transcript");
|
|
15
15
|
_defineProperty(this, "attachmentMessage", "The following attachment was uploaded during the conversation: ");
|
|
@@ -20,6 +20,7 @@ class TranscriptHTMLBuilder {
|
|
|
20
20
|
_defineProperty(this, "agentAvatarFontColor", "#000");
|
|
21
21
|
_defineProperty(this, "customerAvatarBackgroundColor", "#2266E3");
|
|
22
22
|
_defineProperty(this, "customerAvatarFontColor", "#FFF");
|
|
23
|
+
_defineProperty(this, "customerDisplayName", "");
|
|
23
24
|
_defineProperty(this, "disableMarkdownMessageFormatting", false);
|
|
24
25
|
_defineProperty(this, "disableNewLineMarkdownSupport", false);
|
|
25
26
|
_defineProperty(this, "externalScripts", {});
|
|
@@ -55,13 +56,16 @@ class TranscriptHTMLBuilder {
|
|
|
55
56
|
if ((_this$options9 = this.options) !== null && _this$options9 !== void 0 && _this$options9.customerAvatarFontColor) {
|
|
56
57
|
this.customerAvatarFontColor = this.options.customerAvatarFontColor;
|
|
57
58
|
}
|
|
58
|
-
if ((_this$options10 = this.options) !== null && _this$options10 !== void 0 && _this$options10.
|
|
59
|
+
if ((_this$options10 = this.options) !== null && _this$options10 !== void 0 && _this$options10.customerDisplayName) {
|
|
60
|
+
this.customerDisplayName = this.options.customerDisplayName;
|
|
61
|
+
}
|
|
62
|
+
if ((_this$options11 = this.options) !== null && _this$options11 !== void 0 && _this$options11.disableMarkdownMessageFormatting) {
|
|
59
63
|
this.disableMarkdownMessageFormatting = this.options.disableMarkdownMessageFormatting;
|
|
60
64
|
}
|
|
61
|
-
if ((_this$
|
|
65
|
+
if ((_this$options12 = this.options) !== null && _this$options12 !== void 0 && _this$options12.disableNewLineMarkdownSupport) {
|
|
62
66
|
this.disableNewLineMarkdownSupport = this.options.disableNewLineMarkdownSupport;
|
|
63
67
|
}
|
|
64
|
-
if ((_this$
|
|
68
|
+
if ((_this$options13 = this.options) !== null && _this$options13 !== void 0 && _this$options13.externalScripts) {
|
|
65
69
|
this.externalScripts = this.options.externalScripts;
|
|
66
70
|
}
|
|
67
71
|
}
|
|
@@ -523,7 +527,12 @@ class TranscriptHTMLBuilder {
|
|
|
523
527
|
const avatarMiddleware = () => (next) => (...args) => {
|
|
524
528
|
const [card] = args;
|
|
525
529
|
const {fromUser, activity} = card;
|
|
526
|
-
|
|
530
|
+
let displayName = getIconText(activity.from.name);
|
|
531
|
+
let customerDisplayName = '${this.customerDisplayName}';
|
|
532
|
+
|
|
533
|
+
if (fromUser && customerDisplayName) {
|
|
534
|
+
displayName = customerDisplayName;
|
|
535
|
+
}
|
|
527
536
|
|
|
528
537
|
const avatarElement = React.createElement(
|
|
529
538
|
"div",
|
|
@@ -531,7 +540,7 @@ class TranscriptHTMLBuilder {
|
|
|
531
540
|
React.createElement(
|
|
532
541
|
"p",
|
|
533
542
|
null,
|
|
534
|
-
\`\${
|
|
543
|
+
\`\${displayName}\`
|
|
535
544
|
)
|
|
536
545
|
);
|
|
537
546
|
|
|
@@ -32,11 +32,12 @@ export declare class FacadeChatSDK {
|
|
|
32
32
|
private isAuthenticated;
|
|
33
33
|
private getAuthToken?;
|
|
34
34
|
private sdkMocked;
|
|
35
|
+
private disableReauthentication;
|
|
35
36
|
isSDKMocked(): boolean;
|
|
36
37
|
getChatSDK(): OmnichannelChatSDK;
|
|
37
38
|
destroy(): void;
|
|
38
39
|
isTokenSet(): boolean;
|
|
39
|
-
constructor(input: IFacadeChatSDKInput);
|
|
40
|
+
constructor(input: IFacadeChatSDKInput, disableReauthentication: boolean);
|
|
40
41
|
private convertExpiration;
|
|
41
42
|
private isTokenExpired;
|
|
42
43
|
private setToken;
|
|
@@ -128,6 +128,7 @@ export declare enum TelemetryEvent {
|
|
|
128
128
|
ConfirmationCancelButtonClicked = "ConfirmationCancelButtonClicked",
|
|
129
129
|
ConfirmationConfirmButtonClicked = "ConfirmationConfirmButtonClicked",
|
|
130
130
|
LoadingPaneLoaded = "LoadingPaneLoaded",
|
|
131
|
+
LoadingPaneUnloaded = "LoadingPaneUnloaded",
|
|
131
132
|
StartChatErrorPaneLoaded = "StartChatErrorPaneLoaded",
|
|
132
133
|
EmailTranscriptLoaded = "EmailTranscriptLoaded",
|
|
133
134
|
OutOfOfficePaneLoaded = "OutOfOfficePaneLoaded",
|
|
@@ -160,6 +161,7 @@ export declare enum TelemetryEvent {
|
|
|
160
161
|
SetBotAuthProviderNotFound = "SetBotAuthProviderNotFound",
|
|
161
162
|
BotAuthActivityUndefinedSignInId = "BotAuthActivityUndefinedSignInId",
|
|
162
163
|
ThirdPartyCookiesBlocked = "ThirdPartyCookiesBlocked",
|
|
164
|
+
ParticipantsRemovedEvent = "ParticipantsRemovedEvent",
|
|
163
165
|
ProcessingHTMLTextMiddlewareFailed = "ProcessingHTMLTextMiddlewareFailed",
|
|
164
166
|
ProcessingSanitizationMiddlewareFailed = "ProcessingSanitizationMiddlewareFailed",
|
|
165
167
|
FormatTagsMiddlewareJSONStringifyFailed = "FormatTagsMiddlewareJSONStringifyFailed",
|
|
@@ -210,7 +212,37 @@ export declare enum TelemetryEvent {
|
|
|
210
212
|
NewTokenSuccess = "NewTokenSuccess",
|
|
211
213
|
NewTokenFailed = "NewTokenFailed",
|
|
212
214
|
NewTokenExpired = "NewTokenExpired",
|
|
213
|
-
TokenEmptyOrSame = "TokenEmptyOrSame"
|
|
215
|
+
TokenEmptyOrSame = "TokenEmptyOrSame",
|
|
216
|
+
UXFooterStart = "UXFooterStart",
|
|
217
|
+
UXFooterCompleted = "UXFooterCompleted",
|
|
218
|
+
UXHeaderStart = "UXHeaderStart",
|
|
219
|
+
UXHeaderCompleted = "UXHeaderCompleted",
|
|
220
|
+
UXLoadingPaneStart = "UXLoadingPaneStart",
|
|
221
|
+
UXLoadingPaneCompleted = "UXLoadingPaneCompleted",
|
|
222
|
+
UXNotificationPaneStart = "UXNotificationPaneStart",
|
|
223
|
+
UXNotificationPaneCompleted = "UXNotificationPaneCompleted",
|
|
224
|
+
UXOOHPaneStart = "UXOOHPaneStart",
|
|
225
|
+
UXOOHPaneCompleted = "UXOOHPaneCompleted",
|
|
226
|
+
UXPostChatLoadingPaneStart = "UXPostChatLoadingPaneStart",
|
|
227
|
+
UXPostChatLoadingPaneCompleted = "UXPostChatLoadingPaneCompleted",
|
|
228
|
+
UXPrechatPaneStart = "UXPrechatPaneStart",
|
|
229
|
+
UXPrechatPaneCompleted = "UXPrechatPaneCompleted",
|
|
230
|
+
UXProactiveChatPaneStart = "UXProactiveChatPaneStart",
|
|
231
|
+
UXProactiveChatCompleted = "UXProactiveChatCompleted",
|
|
232
|
+
UXReconnectChatPaneStart = "UXReconnectChatPaneStart",
|
|
233
|
+
UXReconnectChatCompleted = "UXReconnectChatCompleted",
|
|
234
|
+
UXStartChatErrorPaneStart = "UXStartChatErrorPaneStart",
|
|
235
|
+
UXStartChatErrorCompleted = "UXStartChatErrorCompleted",
|
|
236
|
+
UXEmailTranscriptPaneStart = "UXEmailTranscriptPaneStart",
|
|
237
|
+
UXEmailTranscriptPaneCompleted = "UXEmailTranscriptPaneCompleted",
|
|
238
|
+
UXWebchatContainerStart = "UXWebchatContainerStart",
|
|
239
|
+
UXWebchatContainerCompleted = "UXWebchatContainerCompleted",
|
|
240
|
+
UXLCWChatButtonStart = "UXLCWChatButtonStart",
|
|
241
|
+
UXLCWChatButtonCompleted = "UXLCWChatButtonCompleted",
|
|
242
|
+
UXConfirmationPaneStart = "UXConfirmationPaneStart",
|
|
243
|
+
UXConfirmationPaneCompleted = "UXConfirmationPaneCompleted",
|
|
244
|
+
UXLivechatwidgetStart = "UXLivechatwidgetStart",
|
|
245
|
+
UXLivechatwidgetCompleted = "UXLivechatwidgetCompleted"
|
|
214
246
|
}
|
|
215
247
|
export interface TelemetryInput {
|
|
216
248
|
scenarioType: ScenarioType;
|
|
@@ -31,8 +31,9 @@ export declare class TelemetryHelper {
|
|
|
31
31
|
static addWidgetDataToTelemetry(telemetryConfig: ITelemetryConfig, telemetryInternalData: IInternalTelemetryData): IInternalTelemetryData;
|
|
32
32
|
static addSessionDataToTelemetry(chatSession: LiveChatContext, telemetryInternalData: IInternalTelemetryData): IInternalTelemetryData;
|
|
33
33
|
static addConversationDataToTelemetry(liveWorkItem: LiveWorkItemDetails, telemetryInternalData: IInternalTelemetryData): IInternalTelemetryData;
|
|
34
|
-
static logCallingEvent: (logLevel: LogLevel, payload: TelemetryEventWrapper, callId?: string
|
|
34
|
+
static logCallingEvent: (logLevel: LogLevel, payload: TelemetryEventWrapper, callId?: string) => void;
|
|
35
35
|
static logLoadingEvent: (logLevel: LogLevel, payload: TelemetryEventWrapper) => void;
|
|
36
|
+
static logUIEvent: (logLevel: LogLevel, payload: TelemetryEventWrapper) => void;
|
|
36
37
|
static logActionEvent: (logLevel: LogLevel, payload: TelemetryEventWrapper) => void;
|
|
37
38
|
static logSDKEvent: (logLevel: LogLevel, payload: TelemetryEventWrapper) => void;
|
|
38
39
|
static logConfigDataEvent: (logLevel: LogLevel, payload: TelemetryEventWrapper) => void;
|
|
@@ -74,4 +74,4 @@ export interface ACSAdapterContract extends BaseContract {
|
|
|
74
74
|
Event?: string;
|
|
75
75
|
ErrorCode?: string;
|
|
76
76
|
}
|
|
77
|
-
export
|
|
77
|
+
export type TelemetryContract = OCChatSDKContract | IC3ClientContract | ActionsContract | LoadContract | WebChatContract | ConfigValidationContract | CallingContract | ACSAdapterContract | BaseContract | any;
|
|
@@ -24,6 +24,19 @@ export interface LoadTelemetryData extends BaseTelemetryData {
|
|
|
24
24
|
OCChatComponentsVersion?: string;
|
|
25
25
|
Description?: string;
|
|
26
26
|
}
|
|
27
|
+
export interface UITelemetryData extends BaseTelemetryData {
|
|
28
|
+
Event?: string;
|
|
29
|
+
ResourcePath?: string;
|
|
30
|
+
ElapsedTimeInMilliseconds?: number;
|
|
31
|
+
WidgetState?: string;
|
|
32
|
+
ChatState?: string;
|
|
33
|
+
ChatType?: string;
|
|
34
|
+
ExceptionDetails?: object;
|
|
35
|
+
OCChatSDKVersion?: string;
|
|
36
|
+
OCChatWidgetVersion?: string;
|
|
37
|
+
OCChatComponentsVersion?: string;
|
|
38
|
+
Description?: string;
|
|
39
|
+
}
|
|
27
40
|
export interface MessageProcessingErrorData extends BaseTelemetryData {
|
|
28
41
|
Event: string;
|
|
29
42
|
ExceptionDetails: object;
|
|
@@ -89,4 +102,4 @@ export interface FacadeChatSDKTelemetryData extends BaseTelemetryData {
|
|
|
89
102
|
ExceptionDetails?: object;
|
|
90
103
|
Description?: string;
|
|
91
104
|
}
|
|
92
|
-
export
|
|
105
|
+
export type TelemetryData = ConfigValidationTelemetryData | OCChatSDKTelemetryData | IC3ClientTelemetryData | LoadTelemetryData | ActionTelemetryData | WebChatTelemetryData | CallingTelemetryData | MessageProcessingErrorData;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FacadeChatSDK } from "../../../common/facades/FacadeChatSDK";
|
|
2
2
|
import { IDownloadTranscriptProps } from "./interfaces/IDownloadTranscriptProps";
|
|
3
3
|
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
4
|
-
export declare const downloadTranscript: (facadeChatSDK: FacadeChatSDK, downloadTranscriptProps: IDownloadTranscriptProps, state?: ILiveChatWidgetContext
|
|
4
|
+
export declare const downloadTranscript: (facadeChatSDK: FacadeChatSDK, downloadTranscriptProps: IDownloadTranscriptProps, state?: ILiveChatWidgetContext) => Promise<void>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import ChatConfig from "@microsoft/omnichannel-chat-sdk/lib/core/ChatConfig";
|
|
2
2
|
import { OmnichannelChatSDK } from "@microsoft/omnichannel-chat-sdk";
|
|
3
3
|
declare const getAuthClientFunction: (chatConfig: ChatConfig | undefined) => string | undefined;
|
|
4
|
-
declare const handleAuthentication: (chatSDK: OmnichannelChatSDK, chatConfig: ChatConfig | undefined, getAuthToken: ((authClientFunction?: string
|
|
4
|
+
declare const handleAuthentication: (chatSDK: OmnichannelChatSDK, chatConfig: ChatConfig | undefined, getAuthToken: ((authClientFunction?: string) => Promise<string | null>) | undefined) => Promise<{
|
|
5
5
|
result: boolean;
|
|
6
6
|
token: string | null;
|
|
7
7
|
error?: undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { FacadeChatSDK } from "../../../common/facades/FacadeChatSDK";
|
|
2
2
|
import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
|
|
3
|
-
export declare const createAdapter: (facadeChatSDK: FacadeChatSDK, props?: ILiveChatWidgetProps
|
|
3
|
+
export declare const createAdapter: (facadeChatSDK: FacadeChatSDK, props?: ILiveChatWidgetProps) => Promise<any>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StyleOptions } from "botframework-webchat-api";
|
|
2
2
|
import { IDownloadTranscriptProps } from "../../footerstateful/downloadtranscriptstateful/interfaces/IDownloadTranscriptProps";
|
|
3
3
|
import { IWebChatContainerStatefulProps } from "../../webchatcontainerstateful/interfaces/IWebChatContainerStatefulProps";
|
|
4
|
-
declare const createDownloadTranscriptProps: (downloadTranscriptProps: IDownloadTranscriptProps, webChatStyles: StyleOptions, webChatContainerProps?: IWebChatContainerStatefulProps
|
|
4
|
+
declare const createDownloadTranscriptProps: (downloadTranscriptProps: IDownloadTranscriptProps, webChatStyles: StyleOptions, webChatContainerProps?: IWebChatContainerStatefulProps) => {
|
|
5
5
|
webChatTranscript: {
|
|
6
6
|
disableNewLineMarkdownSupport: boolean | undefined;
|
|
7
7
|
disableMarkdownMessageFormatting: boolean | undefined;
|
|
@@ -16,6 +16,7 @@ declare const createDownloadTranscriptProps: (downloadTranscriptProps: IDownload
|
|
|
16
16
|
attachmentMessage?: string | undefined;
|
|
17
17
|
networkOnlineMessage?: string | undefined;
|
|
18
18
|
networkOfflineMessage?: string | undefined;
|
|
19
|
+
customerDisplayName?: string | undefined;
|
|
19
20
|
};
|
|
20
21
|
attachmentMessage?: string | undefined;
|
|
21
22
|
bannerMessageOnError?: string | undefined;
|
package/lib/types/components/livechatwidget/common/createInternetConnectionChangeHandler.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
2
|
+
export declare const createInternetConnectionChangeHandler: (state: ILiveChatWidgetContext) => Promise<void>;
|
|
@@ -4,7 +4,7 @@ import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetA
|
|
|
4
4
|
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
5
5
|
import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
|
|
6
6
|
declare const prepareEndChat: (props: ILiveChatWidgetProps, facadeChatSDK: FacadeChatSDK, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, setWebChatStyles: any, adapter: any) => Promise<void>;
|
|
7
|
-
declare const endChat: (props: ILiveChatWidgetProps, facadeChatSDK: any, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, setWebChatStyles: any, adapter: any, skipEndChatSDK?: boolean
|
|
7
|
+
declare const endChat: (props: ILiveChatWidgetProps, facadeChatSDK: any, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, setWebChatStyles: any, adapter: any, skipEndChatSDK?: boolean, skipCloseChat?: boolean, postMessageToOtherTab?: boolean) => Promise<void>;
|
|
8
8
|
export declare const callingStateCleanUp: (dispatch: Dispatch<ILiveChatWidgetAction>) => void;
|
|
9
9
|
export declare const endChatStateCleanUp: (dispatch: Dispatch<ILiveChatWidgetAction>) => void;
|
|
10
10
|
export declare const closeChatStateCleanUp: (dispatch: Dispatch<ILiveChatWidgetAction>) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getMockChatSDKIfApplicable: (chatSDK: any, type?: string
|
|
1
|
+
export declare const getMockChatSDKIfApplicable: (chatSDK: any, type?: string) => any;
|
|
@@ -7,6 +7,6 @@ import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidget
|
|
|
7
7
|
import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
|
|
8
8
|
declare const handleChatReconnect: (facadeChatSDK: FacadeChatSDK, props: ILiveChatWidgetProps, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, initStartChat: any, state: ILiveChatWidgetContext) => Promise<boolean>;
|
|
9
9
|
declare const getChatReconnectContext: (facadeChatSDK: FacadeChatSDK, chatConfig: ChatConfig, props: any, isAuthenticatedChat: boolean, dispatch: Dispatch<ILiveChatWidgetAction>) => Promise<import("@microsoft/omnichannel-chat-sdk/lib/core/ChatReconnectContext").default | undefined>;
|
|
10
|
-
declare const isReconnectEnabled: (chatConfig?: ChatConfig
|
|
11
|
-
declare const isPersistentEnabled: (chatConfig?: ChatConfig
|
|
10
|
+
declare const isReconnectEnabled: (chatConfig?: ChatConfig) => boolean;
|
|
11
|
+
declare const isPersistentEnabled: (chatConfig?: ChatConfig) => boolean;
|
|
12
12
|
export { handleChatReconnect, isReconnectEnabled, isPersistentEnabled, getChatReconnectContext };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Dispatch } from "react";
|
|
2
2
|
import { FacadeChatSDK } from "../../../common/facades/FacadeChatSDK";
|
|
3
3
|
import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
|
|
4
|
-
export declare const setPostChatContextAndLoadSurvey: (facadeChatSDK: FacadeChatSDK, dispatch: Dispatch<ILiveChatWidgetAction>, persistedChat?: boolean
|
|
4
|
+
export declare const setPostChatContextAndLoadSurvey: (facadeChatSDK: FacadeChatSDK, dispatch: Dispatch<ILiveChatWidgetAction>, persistedChat?: boolean) => Promise<void>;
|
|
@@ -5,7 +5,7 @@ import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidget
|
|
|
5
5
|
import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
|
|
6
6
|
import StartChatOptionalParams from "@microsoft/omnichannel-chat-sdk/lib/core/StartChatOptionalParams";
|
|
7
7
|
declare const prepareStartChat: (props: ILiveChatWidgetProps, facadeChatSDK: FacadeChatSDK, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any) => Promise<void>;
|
|
8
|
-
declare const setPreChatAndInitiateChat: (facadeChatSDK: FacadeChatSDK, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, isProactiveChat?: boolean |
|
|
9
|
-
declare const initStartChat: (facadeChatSDK: FacadeChatSDK, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, state: ILiveChatWidgetContext | undefined, props?: ILiveChatWidgetProps
|
|
8
|
+
declare const setPreChatAndInitiateChat: (facadeChatSDK: FacadeChatSDK, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, isProactiveChat?: boolean | false, proactiveChatEnablePrechatState?: boolean | false, state?: ILiveChatWidgetContext, props?: ILiveChatWidgetProps) => Promise<void>;
|
|
9
|
+
declare const initStartChat: (facadeChatSDK: FacadeChatSDK, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, state: ILiveChatWidgetContext | undefined, props?: ILiveChatWidgetProps, params?: StartChatOptionalParams, persistedState?: any) => Promise<void>;
|
|
10
10
|
declare const checkIfConversationStillValid: (facadeChatSDK: FacadeChatSDK, dispatch: Dispatch<ILiveChatWidgetAction>, state: ILiveChatWidgetContext) => Promise<boolean>;
|
|
11
11
|
export { prepareStartChat, initStartChat, setPreChatAndInitiateChat, checkIfConversationStillValid };
|
|
@@ -3,4 +3,4 @@ import { FacadeChatSDK } from "../../../common/facades/FacadeChatSDK";
|
|
|
3
3
|
import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
|
|
4
4
|
import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
|
|
5
5
|
export declare const handleStartChatError: (dispatch: Dispatch<ILiveChatWidgetAction>, facadeChatSDK: FacadeChatSDK, props: ILiveChatWidgetProps | undefined, ex: any, isStartChatSuccessful: boolean) => void;
|
|
6
|
-
export declare const logWidgetLoadComplete: (additionalMessage?: string
|
|
6
|
+
export declare const logWidgetLoadComplete: (additionalMessage?: string) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Dispatch } from "react";
|
|
2
2
|
import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
|
|
3
3
|
import { IProactiveChatNotificationConfig } from "../../proactivechatpanestateful/interfaces/IProactiveChatNotificationConfig";
|
|
4
|
-
export declare const startProactiveChat: (dispatch: Dispatch<ILiveChatWidgetAction>, notificationConfig?: IProactiveChatNotificationConfig
|
|
4
|
+
export declare const startProactiveChat: (dispatch: Dispatch<ILiveChatWidgetAction>, notificationConfig?: IProactiveChatNotificationConfig, enablePreChat?: boolean, inNewWindow?: boolean) => void;
|
|
@@ -3,29 +3,30 @@ import { IAudioNotificationProps } from "../../footerstateful/audionotifications
|
|
|
3
3
|
import { ICallingContainerProps } from "@microsoft/omnichannel-chat-components/lib/types/components/callingcontainer/interfaces/ICallingContainerProps";
|
|
4
4
|
import { IChatButtonProps } from "@microsoft/omnichannel-chat-components/lib/types/components/chatbutton/interfaces/IChatButtonProps";
|
|
5
5
|
import { IConfirmationPaneStatefulProps } from "../../confirmationpanestateful/interfaces/IConfirmationPaneStatefulProps";
|
|
6
|
+
import { IContextDataStore } from "../../../common/interfaces/IContextDataStore";
|
|
6
7
|
import { IDownloadTranscriptProps } from "../../footerstateful/downloadtranscriptstateful/interfaces/IDownloadTranscriptProps";
|
|
8
|
+
import { IDraggableChatWidgetProps } from "./IDraggableChatWidgetProps";
|
|
7
9
|
import { IEmailTranscriptPaneProps } from "../../emailtranscriptpanestateful/interfaces/IEmailTranscriptPaneProps";
|
|
10
|
+
import { IFeatureConfigProps } from "./IFeatureConfigProps";
|
|
8
11
|
import { IFooterProps } from "@microsoft/omnichannel-chat-components/lib/types/components/footer/interfaces/IFooterProps";
|
|
9
12
|
import { IHeaderProps } from "@microsoft/omnichannel-chat-components/lib/types/components/header/interfaces/IHeaderProps";
|
|
10
13
|
import { ILiveChatWidgetComponentOverrides } from "./ILiveChatWidgetComponentOverrides";
|
|
14
|
+
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
11
15
|
import { ILiveChatWidgetControlProps } from "./ILiveChatWidgetControlProps";
|
|
12
16
|
import { ILiveChatWidgetStyleProps } from "./ILiveChatWidgetStyleProps";
|
|
13
17
|
import { ILoadingPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/loadingpane/interfaces/ILoadingPaneProps";
|
|
18
|
+
import { IMockProps } from "./IMockProps";
|
|
19
|
+
import { INotificationPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/notificationpane/interfaces/INotificationPaneProps";
|
|
14
20
|
import { IOOOHPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/outofofficehourspane/interfaces/IOOOHPaneProps";
|
|
21
|
+
import { IPostChatSurveyPaneStatefulProps } from "../../postchatsurveypanestateful/interfaces/IPostChatSurveyPaneStatefulProps";
|
|
15
22
|
import { IPreChatSurveyPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneProps";
|
|
16
23
|
import { IProactiveChatPaneStatefulProps } from "../../proactivechatpanestateful/interfaces/IProactiveChatPaneStatefulProps";
|
|
17
24
|
import { IReconnectChatPaneStatefulProps } from "../../reconnectchatpanestateful/interfaces/IReconnectChatPaneStatefulProps";
|
|
25
|
+
import { IScrollBarProps } from "./IScrollBarProps";
|
|
18
26
|
import { IStartChatErrorPaneProps } from "../../startchaterrorpanestateful/interfaces/IStartChatErrorPaneProps";
|
|
19
27
|
import { ITelemetryConfig } from "../../../common/telemetry/interfaces/ITelemetryConfig";
|
|
20
28
|
import { IWebChatContainerStatefulProps } from "../../webchatcontainerstateful/interfaces/IWebChatContainerStatefulProps";
|
|
21
29
|
import { OmnichannelChatSDK } from "@microsoft/omnichannel-chat-sdk";
|
|
22
|
-
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
23
|
-
import { IContextDataStore } from "../../../common/interfaces/IContextDataStore";
|
|
24
|
-
import { IPostChatSurveyPaneStatefulProps } from "../../postchatsurveypanestateful/interfaces/IPostChatSurveyPaneStatefulProps";
|
|
25
|
-
import { IScrollBarProps } from "./IScrollBarProps";
|
|
26
|
-
import { IDraggableChatWidgetProps } from "./IDraggableChatWidgetProps";
|
|
27
|
-
import { INotificationPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/notificationpane/interfaces/INotificationPaneProps";
|
|
28
|
-
import { IMockProps } from "./IMockProps";
|
|
29
30
|
export interface ILiveChatWidgetProps {
|
|
30
31
|
audioNotificationProps?: IAudioNotificationProps;
|
|
31
32
|
callingContainerProps?: ICallingContainerProps;
|
|
@@ -63,4 +64,5 @@ export interface ILiveChatWidgetProps {
|
|
|
63
64
|
initialCustomContext?: any;
|
|
64
65
|
draggableChatWidgetProps?: IDraggableChatWidgetProps;
|
|
65
66
|
mock?: IMockProps;
|
|
67
|
+
featureConfigProps?: IFeatureConfigProps;
|
|
66
68
|
}
|
package/lib/types/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.d.ts
CHANGED
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @param extension File extension
|
|
5
5
|
*/
|
|
6
|
-
export declare const getFileAttachmentIconData: (extension: string) =>
|
|
6
|
+
export declare const getFileAttachmentIconData: (extension: string) => {};
|
|
7
7
|
export declare const isInlineMediaSupported: (attachmentName: string) => boolean;
|
|
@@ -12,7 +12,7 @@ export interface IWebChatProps {
|
|
|
12
12
|
children?: ReactNode;
|
|
13
13
|
dir?: string;
|
|
14
14
|
disabled?: boolean;
|
|
15
|
-
downscaleImageToDataURL?: (blob: Blob, maxWidth: number, maxHeight: number, type: string, quality: number) =>
|
|
15
|
+
downscaleImageToDataURL?: (blob: Blob, maxWidth: number, maxHeight: number, type: string, quality: number) => Promise<URL>;
|
|
16
16
|
grammars?: any;
|
|
17
17
|
groupActivitiesMiddleware?: OneOrMany<GroupActivitiesMiddleware>;
|
|
18
18
|
internalErrorBoxClass?: React.Component | Function;
|
package/lib/types/components/webchatcontainerstateful/webchatcontroller/enums/WebChatActionType.d.ts
CHANGED
|
@@ -19,5 +19,6 @@ export declare enum WebChatActionType {
|
|
|
19
19
|
WEB_CHAT_SET_NOTIFICATION = "WEB_CHAT/SET_NOTIFICATION",
|
|
20
20
|
WEB_CHAT_DISMISS_NOTIFICATION = "WEB_CHAT/DISMISS_NOTIFICATION",
|
|
21
21
|
WEB_CHAT_SET_SEND_BOX = "WEB_CHAT/SET_SEND_BOX",
|
|
22
|
-
WEB_CHAT_SEND_FILES = "WEB_CHAT/SEND_FILES"
|
|
22
|
+
WEB_CHAT_SEND_FILES = "WEB_CHAT/SEND_FILES",
|
|
23
|
+
WEB_CHAT_SET_SEND_BOX_ATTACHMENTS = "WEB_CHAT/SET_SEND_BOX_ATTACHMENTS"
|
|
23
24
|
}
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* 3. Decodes certain html characters that came through from chat services
|
|
8
8
|
******/
|
|
9
9
|
import React from "react";
|
|
10
|
-
export declare const createActivityMiddleware: (renderMarkdown: (text: string) => string, systemMessageStyleProps?: React.CSSProperties
|
|
10
|
+
export declare const createActivityMiddleware: (renderMarkdown: (text: string) => string, systemMessageStyleProps?: React.CSSProperties, userMessageStyleProps?: React.CSSProperties) => () => (next: any) => (...args: any) => any;
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* 1. Renders the first two letters of the sender as the profile pic
|
|
6
6
|
******/
|
|
7
7
|
import React from "react";
|
|
8
|
-
export declare const createAvatarMiddleware: (avatarStyleProps?: React.CSSProperties
|
|
8
|
+
export declare const createAvatarMiddleware: (avatarStyleProps?: React.CSSProperties, avatarTextStyleProps?: React.CSSProperties) => () => (next: any) => (args_0: any) => false | (() => JSX.Element);
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Checks if the attachment being uploaded satisfies Omnichannel's requirement on file extensions and file size.
|
|
5
5
|
******/
|
|
6
|
-
import { IWebChatAction } from "../../../interfaces/IWebChatAction";
|
|
7
6
|
import { ILiveChatWidgetLocalizedTexts } from "../../../../../contexts/common/ILiveChatWidgetLocalizedTexts";
|
|
7
|
+
import { IWebChatAction } from "../../../interfaces/IWebChatAction";
|
|
8
8
|
declare const createAttachmentUploadValidatorMiddleware: (allowedFileExtensions: string, maxFileSizeSupportedByDynamics: string, localizedTexts: ILiveChatWidgetLocalizedTexts) => ({ dispatch }: {
|
|
9
9
|
dispatch: any;
|
|
10
10
|
}) => (next: any) => (action: IWebChatAction) => any;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const useChatSDKStore: () =>
|
|
1
|
+
declare const useChatSDKStore: () => {};
|
|
2
2
|
export default useChatSDKStore;
|