@microsoft/omnichannel-chat-widget 1.4.1-main.9949bfd → 1.4.1-main.c45e3b0
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.
|
@@ -13,7 +13,8 @@ var _TelemetryHelper = require("../../../common/telemetry/TelemetryHelper");
|
|
|
13
13
|
const handleChatDisconnect = (props, state, setWebChatStyles) => {
|
|
14
14
|
var _state$appStates;
|
|
15
15
|
if (state !== null && state !== void 0 && (_state$appStates = state.appStates) !== null && _state$appStates !== void 0 && _state$appStates.chatDisconnectEventReceived) {
|
|
16
|
-
var _props$webChatContain, _props$webChatContain2;
|
|
16
|
+
var _state$domainStates, _state$domainStates$m, _props$webChatContain, _props$webChatContain2;
|
|
17
|
+
const chatDisconnectMessage = (state === null || state === void 0 ? void 0 : (_state$domainStates = state.domainStates) === null || _state$domainStates === void 0 ? void 0 : (_state$domainStates$m = _state$domainStates.middlewareLocalizedTexts) === null || _state$domainStates$m === void 0 ? void 0 : _state$domainStates$m.MIDDLEWARE_BANNER_CHAT_DISCONNECT) ?? _defaultMiddlewareLocalizedTexts.defaultMiddlewareLocalizedTexts.MIDDLEWARE_BANNER_CHAT_DISCONNECT;
|
|
17
18
|
if ((props === null || props === void 0 ? void 0 : (_props$webChatContain = props.webChatContainerProps) === null || _props$webChatContain === void 0 ? void 0 : (_props$webChatContain2 = _props$webChatContain.renderingMiddlewareProps) === null || _props$webChatContain2 === void 0 ? void 0 : _props$webChatContain2.hideSendboxOnConversationEnd) !== false) {
|
|
18
19
|
setWebChatStyles(styles => {
|
|
19
20
|
return {
|
|
@@ -22,7 +23,7 @@ const handleChatDisconnect = (props, state, setWebChatStyles) => {
|
|
|
22
23
|
};
|
|
23
24
|
});
|
|
24
25
|
}
|
|
25
|
-
_NotificationHandler.NotificationHandler.notifyWarning(_NotificationScenarios.NotificationScenarios.ChatDisconnect,
|
|
26
|
+
_NotificationHandler.NotificationHandler.notifyWarning(_NotificationScenarios.NotificationScenarios.ChatDisconnect, chatDisconnectMessage);
|
|
26
27
|
_TelemetryHelper.TelemetryHelper.logActionEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
27
28
|
Event: _TelemetryConstants.TelemetryEvent.ChatDisconnectThreadEventReceived,
|
|
28
29
|
Description: "Chat disconnected due to timeout, left or removed."
|
|
@@ -7,7 +7,8 @@ import { TelemetryHelper } from "../../../common/telemetry/TelemetryHelper";
|
|
|
7
7
|
const handleChatDisconnect = (props, state, setWebChatStyles) => {
|
|
8
8
|
var _state$appStates;
|
|
9
9
|
if (state !== null && state !== void 0 && (_state$appStates = state.appStates) !== null && _state$appStates !== void 0 && _state$appStates.chatDisconnectEventReceived) {
|
|
10
|
-
var _props$webChatContain, _props$webChatContain2;
|
|
10
|
+
var _state$domainStates, _state$domainStates$m, _props$webChatContain, _props$webChatContain2;
|
|
11
|
+
const chatDisconnectMessage = (state === null || state === void 0 ? void 0 : (_state$domainStates = state.domainStates) === null || _state$domainStates === void 0 ? void 0 : (_state$domainStates$m = _state$domainStates.middlewareLocalizedTexts) === null || _state$domainStates$m === void 0 ? void 0 : _state$domainStates$m.MIDDLEWARE_BANNER_CHAT_DISCONNECT) ?? defaultMiddlewareLocalizedTexts.MIDDLEWARE_BANNER_CHAT_DISCONNECT;
|
|
11
12
|
if ((props === null || props === void 0 ? void 0 : (_props$webChatContain = props.webChatContainerProps) === null || _props$webChatContain === void 0 ? void 0 : (_props$webChatContain2 = _props$webChatContain.renderingMiddlewareProps) === null || _props$webChatContain2 === void 0 ? void 0 : _props$webChatContain2.hideSendboxOnConversationEnd) !== false) {
|
|
12
13
|
setWebChatStyles(styles => {
|
|
13
14
|
return {
|
|
@@ -16,7 +17,7 @@ const handleChatDisconnect = (props, state, setWebChatStyles) => {
|
|
|
16
17
|
};
|
|
17
18
|
});
|
|
18
19
|
}
|
|
19
|
-
NotificationHandler.notifyWarning(NotificationScenarios.ChatDisconnect,
|
|
20
|
+
NotificationHandler.notifyWarning(NotificationScenarios.ChatDisconnect, chatDisconnectMessage);
|
|
20
21
|
TelemetryHelper.logActionEvent(LogLevel.INFO, {
|
|
21
22
|
Event: TelemetryEvent.ChatDisconnectThreadEventReceived,
|
|
22
23
|
Description: "Chat disconnected due to timeout, left or removed."
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/omnichannel-chat-widget",
|
|
3
|
-
"version": "1.4.1-main.
|
|
3
|
+
"version": "1.4.1-main.c45e3b0",
|
|
4
4
|
"description": "Microsoft Omnichannel Chat Widget",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"types": "lib/types/index.d.ts",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"@microsoft/omnichannel-chat-components": "^1.0.9",
|
|
78
|
-
"@microsoft/omnichannel-chat-sdk": "1.5.
|
|
78
|
+
"@microsoft/omnichannel-chat-sdk": "1.5.7",
|
|
79
79
|
"abort-controller-es5": "^2.0.1",
|
|
80
80
|
"dompurify": "^2.3.4",
|
|
81
81
|
"markdown-it": "^12.3.2",
|