@microsoft/omnichannel-chat-widget 1.7.5-main.290ba08 → 1.7.6-main.d227a81
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/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 +12 -0
- package/lib/cjs/components/footerstateful/FooterStateful.js +15 -0
- package/lib/cjs/components/headerstateful/HeaderStateful.js +16 -2
- package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +35 -2
- 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/plugins/createChatTranscript.js +15 -6
- 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 +13 -1
- package/lib/esm/components/footerstateful/FooterStateful.js +14 -0
- package/lib/esm/components/headerstateful/HeaderStateful.js +16 -2
- package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +35 -2
- 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/plugins/createChatTranscript.js +15 -6
- package/lib/types/common/telemetry/TelemetryConstants.d.ts +33 -1
- package/lib/types/common/telemetry/TelemetryHelper.d.ts +1 -0
- package/lib/types/common/telemetry/definitions/Payload.d.ts +13 -0
- package/lib/types/components/footerstateful/downloadtranscriptstateful/interfaces/IWebChatTranscriptConfig.d.ts +1 -0
- package/lib/types/components/livechatwidget/common/createDownloadTranscriptProps.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import { LogLevel, TelemetryEvent } from "../../common/telemetry/TelemetryConstants";
|
|
2
2
|
import React, { useEffect } from "react";
|
|
3
|
+
import { createTimer, findAllFocusableElement } from "../../common/utils";
|
|
3
4
|
import { OutOfOfficeHoursPane } from "@microsoft/omnichannel-chat-components";
|
|
4
5
|
import { TelemetryHelper } from "../../common/telemetry/TelemetryHelper";
|
|
5
6
|
import { defaultGeneralStyleProps } from "./common/defaultStyleProps/defaultgeneralOOOHPaneStyleProps";
|
|
6
|
-
import { findAllFocusableElement } from "../../common/utils";
|
|
7
7
|
import useChatContextStore from "../../hooks/useChatContextStore";
|
|
8
|
+
let uiTimer;
|
|
8
9
|
export const OutOfOfficeHoursPaneStateful = props => {
|
|
9
10
|
var _props$styleProps;
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
uiTimer = createTimer();
|
|
13
|
+
TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
|
|
14
|
+
Event: TelemetryEvent.UXOOHPaneStart
|
|
15
|
+
});
|
|
16
|
+
}, []);
|
|
10
17
|
const [state] = useChatContextStore();
|
|
11
18
|
const generalStyleProps = Object.assign({}, defaultGeneralStyleProps, (_props$styleProps = props.styleProps) === null || _props$styleProps === void 0 ? void 0 : _props$styleProps.generalStyleProps);
|
|
12
19
|
const styleProps = {
|
|
@@ -28,6 +35,10 @@ export const OutOfOfficeHoursPaneStateful = props => {
|
|
|
28
35
|
TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
|
|
29
36
|
Event: TelemetryEvent.OutOfOfficePaneLoaded
|
|
30
37
|
});
|
|
38
|
+
TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
|
|
39
|
+
Event: TelemetryEvent.UXOOHPaneCompleted,
|
|
40
|
+
ElapsedTimeInMilliseconds: uiTimer.milliSecondsElapsed
|
|
41
|
+
});
|
|
31
42
|
}, []);
|
|
32
43
|
return /*#__PURE__*/React.createElement(OutOfOfficeHoursPane, {
|
|
33
44
|
componentOverrides: props.componentOverrides,
|
|
@@ -1,12 +1,19 @@
|
|
|
1
|
+
import { LogLevel, TelemetryEvent } from "../../common/telemetry/TelemetryConstants";
|
|
1
2
|
import React, { useEffect } from "react";
|
|
3
|
+
import { createTimer, findAllFocusableElement } from "../../common/utils";
|
|
2
4
|
import { LoadingPane } from "@microsoft/omnichannel-chat-components";
|
|
5
|
+
import { TelemetryHelper } from "../../common/telemetry/TelemetryHelper";
|
|
3
6
|
import { defaultGeneralPostChatLoadingPaneStyleProps } from "./common/defaultgeneralPostChatLoadingPaneStyleProps";
|
|
4
|
-
import { findAllFocusableElement } from "../../common/utils";
|
|
5
7
|
import useChatContextStore from "../../hooks/useChatContextStore";
|
|
6
|
-
|
|
7
|
-
import { LogLevel, TelemetryEvent } from "../../common/telemetry/TelemetryConstants";
|
|
8
|
+
let uiTimer;
|
|
8
9
|
export const PostChatLoadingPaneStateful = props => {
|
|
9
10
|
var _props$styleProps;
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
uiTimer = createTimer();
|
|
13
|
+
TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
|
|
14
|
+
Event: TelemetryEvent.UXPostChatLoadingPaneStart
|
|
15
|
+
});
|
|
16
|
+
}, []);
|
|
10
17
|
const [state] = useChatContextStore();
|
|
11
18
|
const generalStyleProps = Object.assign({}, defaultGeneralPostChatLoadingPaneStyleProps, (_props$styleProps = props.styleProps) === null || _props$styleProps === void 0 ? void 0 : _props$styleProps.generalStyleProps);
|
|
12
19
|
const styleProps = {
|
|
@@ -33,6 +40,10 @@ export const PostChatLoadingPaneStateful = props => {
|
|
|
33
40
|
TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
|
|
34
41
|
Event: TelemetryEvent.PostChatSurveyLoadingPaneLoaded
|
|
35
42
|
});
|
|
43
|
+
TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
|
|
44
|
+
Event: TelemetryEvent.UXPostChatLoadingPaneCompleted,
|
|
45
|
+
ElapsedTimeInMilliseconds: uiTimer.milliSecondsElapsed
|
|
46
|
+
});
|
|
36
47
|
}, []);
|
|
37
48
|
return /*#__PURE__*/React.createElement(LoadingPane, {
|
|
38
49
|
componentOverrides: props.componentOverrides,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HtmlAttributeNames, Regex } from "../../common/Constants";
|
|
2
2
|
import { LogLevel, TelemetryEvent } from "../../common/telemetry/TelemetryConstants";
|
|
3
3
|
import React, { useEffect } from "react";
|
|
4
|
-
import { extractPreChatSurveyResponseValues, findAllFocusableElement, getStateFromCache, getWidgetCacheId, isUndefinedOrEmpty, parseAdaptiveCardPayload } from "../../common/utils";
|
|
4
|
+
import { createTimer, extractPreChatSurveyResponseValues, findAllFocusableElement, getStateFromCache, getWidgetCacheId, isUndefinedOrEmpty, parseAdaptiveCardPayload } from "../../common/utils";
|
|
5
5
|
import { ConversationState } from "../../contexts/common/ConversationState";
|
|
6
6
|
import { LiveChatWidgetActionType } from "../../contexts/common/LiveChatWidgetActionType";
|
|
7
7
|
import MarkdownIt from "markdown-it";
|
|
@@ -10,10 +10,18 @@ import { TelemetryHelper } from "../../common/telemetry/TelemetryHelper";
|
|
|
10
10
|
import { defaultGeneralPreChatSurveyPaneStyleProps } from "./common/defaultStyles/defaultGeneralPreChatSurveyPaneStyleProps";
|
|
11
11
|
import { defaultPreChatSurveyLocalizedTexts } from "./common/defaultProps/defaultPreChatSurveyLocalizedTexts";
|
|
12
12
|
import useChatContextStore from "../../hooks/useChatContextStore";
|
|
13
|
+
let uiTimer;
|
|
13
14
|
|
|
14
15
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15
16
|
export const PreChatSurveyPaneStateful = props => {
|
|
16
17
|
var _surveyProps$stylePro, _props$surveyProps, _props$surveyProps$co;
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
uiTimer = createTimer();
|
|
20
|
+
TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
|
|
21
|
+
Event: TelemetryEvent.UXPrechatPaneStart
|
|
22
|
+
});
|
|
23
|
+
}, []);
|
|
24
|
+
|
|
17
25
|
// Set MarkDown global variable to be used for prechat adaptive cards
|
|
18
26
|
window["markdownit"] = MarkdownIt;
|
|
19
27
|
const [state, dispatch] = useChatContextStore();
|
|
@@ -136,6 +144,10 @@ export const PreChatSurveyPaneStateful = props => {
|
|
|
136
144
|
TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
|
|
137
145
|
Event: TelemetryEvent.PrechatSurveyLoaded
|
|
138
146
|
});
|
|
147
|
+
TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
|
|
148
|
+
Event: TelemetryEvent.UXPrechatPaneCompleted,
|
|
149
|
+
ElapsedTimeInMilliseconds: uiTimer.milliSecondsElapsed
|
|
150
|
+
});
|
|
139
151
|
}, []);
|
|
140
152
|
return /*#__PURE__*/React.createElement(PreChatSurveyPane, {
|
|
141
153
|
controlProps: controlProps,
|
|
@@ -9,10 +9,17 @@ import { ProactiveChatPane } from "@microsoft/omnichannel-chat-components";
|
|
|
9
9
|
import { TelemetryHelper } from "../../common/telemetry/TelemetryHelper";
|
|
10
10
|
import { TelemetryTimers } from "../../common/telemetry/TelemetryManager";
|
|
11
11
|
import useChatContextStore from "../../hooks/useChatContextStore";
|
|
12
|
+
let uiTimer;
|
|
12
13
|
|
|
13
14
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14
15
|
export const ProactiveChatPaneStateful = props => {
|
|
15
16
|
var _proactiveChatProps$c;
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
uiTimer = createTimer();
|
|
19
|
+
TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
|
|
20
|
+
Event: TelemetryEvent.UXProactiveChatPaneStart
|
|
21
|
+
});
|
|
22
|
+
}, []);
|
|
16
23
|
const [state, dispatch] = useChatContextStore();
|
|
17
24
|
const {
|
|
18
25
|
proactiveChatProps,
|
|
@@ -114,6 +121,10 @@ export const ProactiveChatPaneStateful = props => {
|
|
|
114
121
|
TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
|
|
115
122
|
Event: TelemetryEvent.ProactiveChatPaneLoaded
|
|
116
123
|
});
|
|
124
|
+
TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
|
|
125
|
+
Event: TelemetryEvent.UXProactiveChatCompleted,
|
|
126
|
+
ElapsedTimeInMilliseconds: uiTimer.milliSecondsElapsed
|
|
127
|
+
});
|
|
117
128
|
return () => {
|
|
118
129
|
clearTimeout(timeoutEvent);
|
|
119
130
|
};
|
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import { LogLevel, TelemetryEvent } from "../../common/telemetry/TelemetryConstants";
|
|
2
2
|
import React, { useEffect } from "react";
|
|
3
|
+
import { createTimer, setFocusOnElement } from "../../common/utils";
|
|
3
4
|
import { ConversationState } from "../../contexts/common/ConversationState";
|
|
4
5
|
import { LiveChatWidgetActionType } from "../../contexts/common/LiveChatWidgetActionType";
|
|
5
6
|
import { ReconnectChatPane } from "@microsoft/omnichannel-chat-components";
|
|
6
7
|
import { TelemetryHelper } from "../../common/telemetry/TelemetryHelper";
|
|
7
|
-
import { setFocusOnElement } from "../../common/utils";
|
|
8
8
|
import useChatContextStore from "../../hooks/useChatContextStore";
|
|
9
9
|
import useFacadeChatSDKStore from "../../hooks/useFacadeChatSDKStore";
|
|
10
|
+
let uiTimer;
|
|
10
11
|
export const ReconnectChatPaneStateful = props => {
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
uiTimer = createTimer();
|
|
14
|
+
TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
|
|
15
|
+
Event: TelemetryEvent.UXReconnectChatPaneStart,
|
|
16
|
+
ElapsedTimeInMilliseconds: uiTimer.milliSecondsElapsed
|
|
17
|
+
});
|
|
18
|
+
}, []);
|
|
11
19
|
const [state, dispatch] = useChatContextStore();
|
|
12
20
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13
21
|
//const chatSDK: any = useChatSDKStore();
|
|
@@ -91,6 +99,9 @@ export const ReconnectChatPaneStateful = props => {
|
|
|
91
99
|
TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
|
|
92
100
|
Event: TelemetryEvent.ReconnectChatPaneLoaded
|
|
93
101
|
});
|
|
102
|
+
TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
|
|
103
|
+
Event: TelemetryEvent.UXReconnectChatCompleted
|
|
104
|
+
});
|
|
94
105
|
}, []);
|
|
95
106
|
return /*#__PURE__*/React.createElement(ReconnectChatPane, {
|
|
96
107
|
componentOverrides: reconnectChatProps === null || reconnectChatProps === void 0 ? void 0 : reconnectChatProps.componentOverrides,
|
|
@@ -1,18 +1,25 @@
|
|
|
1
|
+
import { LogLevel, TelemetryEvent } from "../../common/telemetry/TelemetryConstants";
|
|
1
2
|
import React, { useEffect } from "react";
|
|
3
|
+
import { createTimer, findAllFocusableElement } from "../../common/utils";
|
|
2
4
|
import { LoadingPane } from "@microsoft/omnichannel-chat-components";
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
+
import { StartChatErrorPaneConstants } from "../../common/Constants";
|
|
6
|
+
import { StartChatFailureType } from "../../contexts/common/StartChatFailureType";
|
|
5
7
|
import { TelemetryHelper } from "../../common/telemetry/TelemetryHelper";
|
|
6
|
-
import { LogLevel, TelemetryEvent } from "../../common/telemetry/TelemetryConstants";
|
|
7
8
|
import { defaultStartChatErrorPaneGeneralStyleProps } from "./common/defaultStartChatErrorPaneGeneralStyleProps";
|
|
8
|
-
import { defaultStartChatErrorPaneTitleStyleProps } from "./common/defaultStartChatErrorPaneTitleStyleProps";
|
|
9
|
-
import { defaultStartChatErrorPaneSubtitleStyleProps } from "./common/defaultStartChatErrorPaneSubtitleStyleProps";
|
|
10
|
-
import { defaultStartChatErrorPaneIconStyleProps } from "./common/defaultStartChatErrorPaneIconStyleProps";
|
|
11
9
|
import { defaultStartChatErrorPaneIconImageStyleProps } from "./common/defaultStartChatErrorPaneIconImageProps";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
10
|
+
import { defaultStartChatErrorPaneIconStyleProps } from "./common/defaultStartChatErrorPaneIconStyleProps";
|
|
11
|
+
import { defaultStartChatErrorPaneSubtitleStyleProps } from "./common/defaultStartChatErrorPaneSubtitleStyleProps";
|
|
12
|
+
import { defaultStartChatErrorPaneTitleStyleProps } from "./common/defaultStartChatErrorPaneTitleStyleProps";
|
|
13
|
+
import useChatContextStore from "../../hooks/useChatContextStore";
|
|
14
|
+
let uiTimer;
|
|
14
15
|
export const StartChatErrorPaneStateful = startChatErrorPaneProps => {
|
|
15
16
|
var _startChatErrorPanePr, _startChatErrorPanePr2, _startChatErrorPanePr3, _startChatErrorPanePr4, _startChatErrorPanePr5, _startChatErrorPanePr6, _startChatErrorPanePr7, _startChatErrorPanePr8, _startChatErrorPanePr9, _startChatErrorPanePr10, _startChatErrorPanePr11;
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
uiTimer = createTimer();
|
|
19
|
+
TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
|
|
20
|
+
Event: TelemetryEvent.UXStartChatErrorPaneStart
|
|
21
|
+
});
|
|
22
|
+
}, []);
|
|
16
23
|
const [state] = useChatContextStore();
|
|
17
24
|
const generalStyleProps = Object.assign({}, defaultStartChatErrorPaneGeneralStyleProps, startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr = startChatErrorPaneProps.styleProps) === null || _startChatErrorPanePr === void 0 ? void 0 : _startChatErrorPanePr.generalStyleProps);
|
|
18
25
|
const titleStyleProps = Object.assign({}, defaultStartChatErrorPaneTitleStyleProps, startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : (_startChatErrorPanePr2 = startChatErrorPaneProps.styleProps) === null || _startChatErrorPanePr2 === void 0 ? void 0 : _startChatErrorPanePr2.titleStyleProps);
|
|
@@ -61,6 +68,10 @@ export const StartChatErrorPaneStateful = startChatErrorPaneProps => {
|
|
|
61
68
|
Event: TelemetryEvent.StartChatErrorPaneLoaded,
|
|
62
69
|
Description: "Start chat error pane loaded."
|
|
63
70
|
});
|
|
71
|
+
TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
|
|
72
|
+
Event: TelemetryEvent.UXStartChatErrorCompleted,
|
|
73
|
+
ElapsedTimeInMilliseconds: uiTimer.milliSecondsElapsed
|
|
74
|
+
});
|
|
64
75
|
}, []);
|
|
65
76
|
return /*#__PURE__*/React.createElement(LoadingPane, {
|
|
66
77
|
componentOverrides: startChatErrorPaneProps === null || startChatErrorPaneProps === void 0 ? void 0 : startChatErrorPaneProps.componentOverrides,
|
|
@@ -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;
|
|
@@ -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
|
|
|
@@ -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;
|
|
@@ -33,6 +33,7 @@ export declare class TelemetryHelper {
|
|
|
33
33
|
static addConversationDataToTelemetry(liveWorkItem: LiveWorkItemDetails, telemetryInternalData: IInternalTelemetryData): IInternalTelemetryData;
|
|
34
34
|
static logCallingEvent: (logLevel: LogLevel, payload: TelemetryEventWrapper, callId?: string | undefined) => 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;
|
|
@@ -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;
|
|
@@ -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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/omnichannel-chat-widget",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.6-main.d227a81",
|
|
4
4
|
"description": "Microsoft Omnichannel Chat Widget",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"types": "lib/types/index.d.ts",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"@azure/core-tracing": "^1.2.0",
|
|
78
78
|
"@microsoft/omnichannel-chat-components": "1.1.5",
|
|
79
|
-
"@microsoft/omnichannel-chat-sdk": "^1.10.
|
|
79
|
+
"@microsoft/omnichannel-chat-sdk": "^1.10.11",
|
|
80
80
|
"@opentelemetry/api": "^1.9.0",
|
|
81
81
|
"abort-controller-es5": "^2.0.1",
|
|
82
82
|
"dompurify": "^2.5.4",
|