@microsoft/omnichannel-chat-widget 0.1.0-main.3d1c026 → 0.1.0-main.7338c17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +235 -0
- package/lib/cjs/common/Constants.js +2 -0
- package/lib/cjs/common/contextDataStore/DataStoreManager.js +14 -0
- package/lib/cjs/common/interfaces/IContextDataStore.js +1 -0
- package/lib/cjs/common/telemetry/TelemetryConstants.js +5 -1
- package/lib/cjs/components/confirmationpanestateful/ConfirmationPaneStateful.js +15 -28
- package/lib/cjs/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +2 -2
- package/lib/cjs/components/livechatwidget/common/endChat.js +7 -3
- package/lib/cjs/components/livechatwidget/common/initCallingSdk.js +5 -0
- package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +6 -12
- package/lib/cjs/components/livechatwidget/common/registerTelemetryLoggers.js +20 -3
- package/lib/cjs/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +23 -22
- package/lib/cjs/components/livechatwidget/common/startChat.js +72 -26
- package/lib/cjs/components/livechatwidget/common/startProactiveChat.js +3 -3
- package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +27 -11
- package/lib/cjs/components/loadingpanestateful/LoadingPaneStateful.js +1 -1
- package/lib/cjs/components/ooohpanestateful/OOOHPaneStateful.js +8 -0
- package/lib/cjs/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +28 -11
- package/lib/cjs/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +10 -4
- package/lib/cjs/components/proactivechatpanestateful/interfaces/IProactiveChatNotificationConfig.js +1 -0
- package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +2 -0
- package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +2 -1
- package/lib/cjs/contexts/createReducer.js +13 -0
- package/lib/esm/common/Constants.js +2 -0
- package/lib/esm/common/contextDataStore/DataStoreManager.js +5 -0
- package/lib/esm/common/interfaces/IContextDataStore.js +1 -0
- package/lib/esm/common/telemetry/TelemetryConstants.js +5 -1
- package/lib/esm/components/confirmationpanestateful/ConfirmationPaneStateful.js +15 -28
- package/lib/esm/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +2 -2
- package/lib/esm/components/livechatwidget/common/endChat.js +7 -3
- package/lib/esm/components/livechatwidget/common/initCallingSdk.js +3 -0
- package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +6 -12
- package/lib/esm/components/livechatwidget/common/registerTelemetryLoggers.js +18 -3
- package/lib/esm/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +22 -22
- package/lib/esm/components/livechatwidget/common/startChat.js +67 -22
- package/lib/esm/components/livechatwidget/common/startProactiveChat.js +5 -5
- package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +26 -11
- package/lib/esm/components/loadingpanestateful/LoadingPaneStateful.js +1 -1
- package/lib/esm/components/ooohpanestateful/OOOHPaneStateful.js +6 -0
- package/lib/esm/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +26 -10
- package/lib/esm/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +8 -4
- package/lib/esm/components/proactivechatpanestateful/interfaces/IProactiveChatNotificationConfig.js +1 -0
- package/lib/esm/contexts/common/LiveChatWidgetActionType.js +2 -0
- package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +2 -1
- package/lib/esm/contexts/createReducer.js +13 -0
- package/lib/types/common/Constants.d.ts +1 -0
- package/lib/types/common/contextDataStore/DataStoreManager.d.ts +4 -0
- package/lib/types/common/interfaces/IContextDataStore.d.ts +14 -0
- package/lib/types/common/telemetry/TelemetryConstants.d.ts +4 -0
- package/lib/types/components/livechatwidget/common/setPostChatContextAndLoadSurvey.d.ts +1 -1
- package/lib/types/components/livechatwidget/common/startChat.d.ts +1 -1
- package/lib/types/components/livechatwidget/common/startProactiveChat.d.ts +2 -1
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +3 -1
- package/lib/types/components/prechatsurveypanestateful/interfaces/IPreChatSurveyPaneStatefulParams.d.ts +1 -1
- package/lib/types/components/proactivechatpanestateful/interfaces/IProactiveChatNotificationConfig.d.ts +3 -0
- package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +1 -0
- package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +3 -1
- package/package.json +1 -1
|
@@ -5,12 +5,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.prepareStartChat = exports.initStartChat = void 0;
|
|
7
7
|
|
|
8
|
-
var _TelemetryConstants = require("../../../common/telemetry/TelemetryConstants");
|
|
9
|
-
|
|
10
8
|
var _Constants = require("../../../common/Constants");
|
|
11
9
|
|
|
10
|
+
var _TelemetryConstants = require("../../../common/telemetry/TelemetryConstants");
|
|
11
|
+
|
|
12
12
|
var _ConversationState = require("../../../contexts/common/ConversationState");
|
|
13
13
|
|
|
14
|
+
var _DataStoreManager = require("../../../common/contextDataStore/DataStoreManager");
|
|
15
|
+
|
|
14
16
|
var _LiveChatWidgetActionType = require("../../../contexts/common/LiveChatWidgetActionType");
|
|
15
17
|
|
|
16
18
|
var _NotificationHandler = require("../../webchatcontainerstateful/webchatcontroller/notification/NotificationHandler");
|
|
@@ -27,13 +29,17 @@ var _utils = require("../../../common/utils");
|
|
|
27
29
|
|
|
28
30
|
var _reconnectChatHelper = require("./reconnectChatHelper");
|
|
29
31
|
|
|
30
|
-
var _updateSessionDataForTelemetry = require("./updateSessionDataForTelemetry");
|
|
31
|
-
|
|
32
32
|
var _setPostChatContextAndLoadSurvey = require("./setPostChatContextAndLoadSurvey");
|
|
33
33
|
|
|
34
|
+
var _updateSessionDataForTelemetry = require("./updateSessionDataForTelemetry");
|
|
35
|
+
|
|
34
36
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
35
37
|
const prepareStartChat = async (props, chatSDK, state, dispatch, setAdapter) => {
|
|
36
|
-
|
|
38
|
+
if (await canConnectToExistingChat(props, chatSDK, state, dispatch, setAdapter)) {
|
|
39
|
+
return;
|
|
40
|
+
} // Getting PreChat Survey Context
|
|
41
|
+
|
|
42
|
+
|
|
37
43
|
const parseToJson = false;
|
|
38
44
|
const preChatSurveyResponse = await chatSDK.getPreChatSurvey(parseToJson);
|
|
39
45
|
const showPrechat = state.appStates.conversationState === _ConversationState.ConversationState.ProactiveChat ? preChatSurveyResponse && state.appStates.proactiveChatStates.proactiveChatEnablePrechat : preChatSurveyResponse; // Getting reconnectId for authenticated chat
|
|
@@ -70,19 +76,20 @@ const prepareStartChat = async (props, chatSDK, state, dispatch, setAdapter) =>
|
|
|
70
76
|
|
|
71
77
|
exports.prepareStartChat = prepareStartChat;
|
|
72
78
|
|
|
73
|
-
const initStartChat = async (chatSDK, dispatch, setAdapter, params) => {
|
|
79
|
+
const initStartChat = async (chatSDK, dispatch, setAdapter, params, persistedState) => {
|
|
74
80
|
try {
|
|
75
81
|
var _TelemetryTimers$Widg;
|
|
76
82
|
|
|
77
83
|
try {
|
|
78
|
-
|
|
84
|
+
_TelemetryManager.TelemetryTimers.WidgetLoadTimer = (0, _utils.createTimer)();
|
|
85
|
+
|
|
86
|
+
_TelemetryHelper.TelemetryHelper.logSDKEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
79
87
|
Event: _TelemetryConstants.TelemetryEvent.StartChatSDKCall
|
|
80
88
|
});
|
|
81
89
|
|
|
82
90
|
await chatSDK.startChat(params);
|
|
83
|
-
_TelemetryManager.TelemetryTimers.WidgetLoadTimer = (0, _utils.createTimer)();
|
|
84
91
|
} catch (error) {
|
|
85
|
-
_TelemetryHelper.TelemetryHelper.
|
|
92
|
+
_TelemetryHelper.TelemetryHelper.logSDKEvent(_TelemetryConstants.LogLevel.ERROR, {
|
|
86
93
|
Event: _TelemetryConstants.TelemetryEvent.StartChatMethodException,
|
|
87
94
|
ExceptionDetails: {
|
|
88
95
|
exception: `Failed to setup startChat: ${error}`
|
|
@@ -91,24 +98,39 @@ const initStartChat = async (chatSDK, dispatch, setAdapter, params) => {
|
|
|
91
98
|
}
|
|
92
99
|
|
|
93
100
|
const newAdapter = await (0, _createAdapter.createAdapter)(chatSDK);
|
|
94
|
-
setAdapter(newAdapter);
|
|
101
|
+
setAdapter(newAdapter);
|
|
95
102
|
|
|
96
|
-
if (
|
|
103
|
+
if (!persistedState) {
|
|
97
104
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
98
|
-
|
|
105
|
+
if (chatSDK !== null && chatSDK !== void 0 && chatSDK.getVoiceVideoCalling) {
|
|
106
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
107
|
+
const chatToken = await (chatSDK === null || chatSDK === void 0 ? void 0 : chatSDK.getChatToken());
|
|
108
|
+
dispatch({
|
|
109
|
+
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CHAT_TOKEN,
|
|
110
|
+
payload: chatToken
|
|
111
|
+
});
|
|
112
|
+
} // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
const liveChatContext = await (chatSDK === null || chatSDK === void 0 ? void 0 : chatSDK.getCurrentLiveChatContext());
|
|
99
116
|
dispatch({
|
|
100
|
-
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.
|
|
101
|
-
payload:
|
|
117
|
+
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_LIVE_CHAT_CONTEXT,
|
|
118
|
+
payload: liveChatContext
|
|
102
119
|
});
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
await (0, _setPostChatContextAndLoadSurvey.setPostChatContextAndLoadSurvey)(chatSDK, dispatch, false);
|
|
106
|
-
await (0, _updateSessionDataForTelemetry.updateSessionDataForTelemetry)(chatSDK, dispatch); // Set app state to Active
|
|
120
|
+
await (0, _setPostChatContextAndLoadSurvey.setPostChatContextAndLoadSurvey)(chatSDK, dispatch);
|
|
121
|
+
await (0, _updateSessionDataForTelemetry.updateSessionDataForTelemetry)(chatSDK, dispatch); // Set app state to Active
|
|
107
122
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
123
|
+
dispatch({
|
|
124
|
+
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
125
|
+
payload: _ConversationState.ConversationState.Active
|
|
126
|
+
});
|
|
127
|
+
} else {
|
|
128
|
+
dispatch({
|
|
129
|
+
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_WIDGET_STATE,
|
|
130
|
+
payload: persistedState
|
|
131
|
+
});
|
|
132
|
+
await (0, _setPostChatContextAndLoadSurvey.setPostChatContextAndLoadSurvey)(chatSDK, dispatch, true);
|
|
133
|
+
}
|
|
112
134
|
|
|
113
135
|
_TelemetryHelper.TelemetryHelper.logLoadingEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
114
136
|
Event: _TelemetryConstants.TelemetryEvent.WidgetLoadComplete,
|
|
@@ -117,9 +139,9 @@ const initStartChat = async (chatSDK, dispatch, setAdapter, params) => {
|
|
|
117
139
|
});
|
|
118
140
|
} catch (ex) {
|
|
119
141
|
_TelemetryHelper.TelemetryHelper.logLoadingEvent(_TelemetryConstants.LogLevel.ERROR, {
|
|
120
|
-
Event: _TelemetryConstants.TelemetryEvent.
|
|
142
|
+
Event: _TelemetryConstants.TelemetryEvent.WidgetLoadFailed,
|
|
121
143
|
ExceptionDetails: {
|
|
122
|
-
Exception: `
|
|
144
|
+
Exception: `Widget load Failed: ${ex}`
|
|
123
145
|
}
|
|
124
146
|
});
|
|
125
147
|
|
|
@@ -137,6 +159,30 @@ const initStartChat = async (chatSDK, dispatch, setAdapter, params) => {
|
|
|
137
159
|
});
|
|
138
160
|
}
|
|
139
161
|
}
|
|
140
|
-
};
|
|
162
|
+
}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
exports.initStartChat = initStartChat;
|
|
141
166
|
|
|
142
|
-
|
|
167
|
+
const canConnectToExistingChat = async (props, chatSDK, state, dispatch, setAdapter) => {
|
|
168
|
+
var _DataStoreManager$cli, _persistedState$domai;
|
|
169
|
+
|
|
170
|
+
const widgetStateFromCache = (_DataStoreManager$cli = _DataStoreManager.DataStoreManager.clientDataStore) === null || _DataStoreManager$cli === void 0 ? void 0 : _DataStoreManager$cli.getData(_Constants.Constants.widgetStateDataKey, "localStorage");
|
|
171
|
+
const persistedState = widgetStateFromCache ? JSON.parse(widgetStateFromCache) : undefined;
|
|
172
|
+
|
|
173
|
+
if (persistedState !== null && persistedState !== void 0 && (_persistedState$domai = persistedState.domainStates) !== null && _persistedState$domai !== void 0 && _persistedState$domai.liveChatContext) {
|
|
174
|
+
var _persistedState$domai2;
|
|
175
|
+
|
|
176
|
+
dispatch({
|
|
177
|
+
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
178
|
+
payload: _ConversationState.ConversationState.Loading
|
|
179
|
+
});
|
|
180
|
+
const optionalParams = {
|
|
181
|
+
liveChatContext: persistedState === null || persistedState === void 0 ? void 0 : (_persistedState$domai2 = persistedState.domainStates) === null || _persistedState$domai2 === void 0 ? void 0 : _persistedState$domai2.liveChatContext
|
|
182
|
+
};
|
|
183
|
+
await initStartChat(chatSDK, dispatch, setAdapter, optionalParams, persistedState);
|
|
184
|
+
return true;
|
|
185
|
+
} else {
|
|
186
|
+
return false;
|
|
187
|
+
}
|
|
188
|
+
};
|
|
@@ -16,12 +16,12 @@ var _TelemetryHelper = require("../../../common/telemetry/TelemetryHelper");
|
|
|
16
16
|
var _TelemetryManager = require("../../../common/telemetry/TelemetryManager");
|
|
17
17
|
|
|
18
18
|
// Defines startProactiveChat callback
|
|
19
|
-
const startProactiveChat = (dispatch,
|
|
19
|
+
const startProactiveChat = (dispatch, notificationConfig, enablePreChat, inNewWindow) => {
|
|
20
20
|
dispatch({
|
|
21
21
|
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_PROACTIVE_CHAT_PARAMS,
|
|
22
22
|
payload: {
|
|
23
|
-
proactiveChatBodyTitle:
|
|
24
|
-
proactiveChatEnablePrechat:
|
|
23
|
+
proactiveChatBodyTitle: notificationConfig && notificationConfig.message ? notificationConfig.message : "",
|
|
24
|
+
proactiveChatEnablePrechat: enablePreChat ?? false,
|
|
25
25
|
proactiveChatInNewWindow: inNewWindow ?? false
|
|
26
26
|
}
|
|
27
27
|
});
|
|
@@ -85,6 +85,10 @@ var _TelemetryConstants = require("../../../common/telemetry/TelemetryConstants"
|
|
|
85
85
|
|
|
86
86
|
var _disposeTelemetryLoggers = require("../common/disposeTelemetryLoggers");
|
|
87
87
|
|
|
88
|
+
var _DataStoreManager = require("../../../common/contextDataStore/DataStoreManager");
|
|
89
|
+
|
|
90
|
+
var _TelemetryHelper = require("../../../common/telemetry/TelemetryHelper");
|
|
91
|
+
|
|
88
92
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
89
93
|
|
|
90
94
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -121,6 +125,7 @@ const LiveChatWidgetStateful = props => {
|
|
|
121
125
|
|
|
122
126
|
(0, _registerTelemetryLoggers.registerTelemetryLoggers)(props, dispatch);
|
|
123
127
|
(0, _createInternetConnectionChangeHandler.createInternetConnectionChangeHandler)();
|
|
128
|
+
_DataStoreManager.DataStoreManager.clientDataStore = props.contextDataStore ?? undefined;
|
|
124
129
|
dispatch({
|
|
125
130
|
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_WIDGET_ELEMENT_ID,
|
|
126
131
|
payload: widgetElementId
|
|
@@ -192,10 +197,20 @@ const LiveChatWidgetStateful = props => {
|
|
|
192
197
|
}, [state.appStates.skipChatButtonRendering]);
|
|
193
198
|
(0, _react2.useEffect)(() => {
|
|
194
199
|
_omnichannelChatComponents.BroadcastService.getMessageByEventName("StartProactiveChat").subscribe(msg => {
|
|
200
|
+
_TelemetryHelper.TelemetryHelper.logActionEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
201
|
+
Event: _TelemetryConstants.TelemetryEvent.StartProactiveChatEventReceived,
|
|
202
|
+
Description: "Start proactive chat event received."
|
|
203
|
+
});
|
|
204
|
+
|
|
195
205
|
if (canStartProactiveChat.current) {
|
|
196
206
|
var _msg$payload, _msg$payload2, _msg$payload3;
|
|
197
207
|
|
|
198
|
-
(0, _startProactiveChat.startProactiveChat)(dispatch, msg === null || msg === void 0 ? void 0 : (_msg$payload = msg.payload) === null || _msg$payload === void 0 ? void 0 : _msg$payload.
|
|
208
|
+
(0, _startProactiveChat.startProactiveChat)(dispatch, msg === null || msg === void 0 ? void 0 : (_msg$payload = msg.payload) === null || _msg$payload === void 0 ? void 0 : _msg$payload.notificationConfig, msg === null || msg === void 0 ? void 0 : (_msg$payload2 = msg.payload) === null || _msg$payload2 === void 0 ? void 0 : _msg$payload2.enablePreChat, msg === null || msg === void 0 ? void 0 : (_msg$payload3 = msg.payload) === null || _msg$payload3 === void 0 ? void 0 : _msg$payload3.inNewWindow);
|
|
209
|
+
} else {
|
|
210
|
+
_TelemetryHelper.TelemetryHelper.logActionEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
211
|
+
Event: _TelemetryConstants.TelemetryEvent.ChatAlreadyTriggered,
|
|
212
|
+
Description: "Start proactive chat method called, when chat was already triggered."
|
|
213
|
+
});
|
|
199
214
|
}
|
|
200
215
|
});
|
|
201
216
|
|
|
@@ -219,7 +234,7 @@ const LiveChatWidgetStateful = props => {
|
|
|
219
234
|
} // Track the message count
|
|
220
235
|
|
|
221
236
|
|
|
222
|
-
if (state.appStates.conversationState
|
|
237
|
+
if (state.appStates.conversationState === _ConversationState.ConversationState.Active) {
|
|
223
238
|
chatSDK === null || chatSDK === void 0 ? void 0 : chatSDK.onNewMessage(() => {
|
|
224
239
|
currentMessageCountRef.current++;
|
|
225
240
|
dispatch({
|
|
@@ -265,25 +280,26 @@ const LiveChatWidgetStateful = props => {
|
|
|
265
280
|
}, [(_props$webChatContain3 = props.webChatContainerProps) === null || _props$webChatContain3 === void 0 ? void 0 : _props$webChatContain3.webChatStyles]);
|
|
266
281
|
const webChatProps = (0, _initWebChatComposer.initWebChatComposer)(props, chatSDK, state, dispatch, setWebChatStyles);
|
|
267
282
|
|
|
268
|
-
const setPostChatContextRelay = () => (0, _setPostChatContextAndLoadSurvey.setPostChatContextAndLoadSurvey)(chatSDK, dispatch
|
|
283
|
+
const setPostChatContextRelay = () => (0, _setPostChatContextAndLoadSurvey.setPostChatContextAndLoadSurvey)(chatSDK, dispatch);
|
|
269
284
|
|
|
270
285
|
const endChatRelay = () => (0, _endChat.endChat)(props, chatSDK, setAdapter, setWebChatStyles, dispatch, adapter);
|
|
271
286
|
|
|
272
287
|
const prepareStartChatRelay = () => (0, _startChat.prepareStartChat)(props, chatSDK, state, dispatch, setAdapter); // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
273
288
|
|
|
274
289
|
|
|
275
|
-
const initStartChatRelay = optionalParams => (0, _startChat.initStartChat)(chatSDK, dispatch, setAdapter, optionalParams);
|
|
290
|
+
const initStartChatRelay = (optionalParams, persistedState) => (0, _startChat.initStartChat)(chatSDK, dispatch, setAdapter, optionalParams, persistedState);
|
|
276
291
|
|
|
277
292
|
const confirmationPaneProps = (0, _initConfirmationPropsComposer.initConfirmationPropsComposer)(props); // publish chat widget state
|
|
278
293
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
_omnichannelChatComponents.BroadcastService.postMessage(chatWidgetStateChangeEvent);
|
|
294
|
+
(0, _react2.useEffect)(() => {
|
|
295
|
+
const chatWidgetStateChangeEvent = {
|
|
296
|
+
eventName: _TelemetryConstants.TelemetryEvent.ChatWidgetStateChanged,
|
|
297
|
+
payload: { ...state
|
|
298
|
+
}
|
|
299
|
+
};
|
|
286
300
|
|
|
301
|
+
_omnichannelChatComponents.BroadcastService.postMessage(chatWidgetStateChangeEvent);
|
|
302
|
+
}, [state]);
|
|
287
303
|
return /*#__PURE__*/_react2.default.createElement(Composer, _extends({}, webChatProps, {
|
|
288
304
|
styleOptions: webChatStyles,
|
|
289
305
|
directLine: ((_props$webChatContain4 = props.webChatContainerProps) === null || _props$webChatContain4 === void 0 ? void 0 : _props$webChatContain4.directLine) ?? adapter ?? _defaultWebChatContainerStatefulProps.defaultWebChatContainerStatefulProps.directLine
|
|
@@ -46,7 +46,7 @@ const LoadingPaneStateful = props => {
|
|
|
46
46
|
firstElement[0].focus();
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
_TelemetryHelper.TelemetryHelper.
|
|
49
|
+
_TelemetryHelper.TelemetryHelper.logLoadingEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
50
50
|
Event: _TelemetryConstants.TelemetryEvent.LoadingPaneLoaded,
|
|
51
51
|
Description: "Loading pane loaded."
|
|
52
52
|
});
|
|
@@ -5,10 +5,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.OutOfOfficeHoursPaneStateful = void 0;
|
|
7
7
|
|
|
8
|
+
var _TelemetryConstants = require("../../common/telemetry/TelemetryConstants");
|
|
9
|
+
|
|
8
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
11
|
|
|
10
12
|
var _omnichannelChatComponents = require("@microsoft/omnichannel-chat-components");
|
|
11
13
|
|
|
14
|
+
var _TelemetryHelper = require("../../common/telemetry/TelemetryHelper");
|
|
15
|
+
|
|
12
16
|
var _defaultgeneralOOOHPaneStyleProps = require("./common/defaultStyleProps/defaultgeneralOOOHPaneStyleProps");
|
|
13
17
|
|
|
14
18
|
var _utils = require("../../common/utils");
|
|
@@ -41,6 +45,10 @@ const OutOfOfficeHoursPaneStateful = props => {
|
|
|
41
45
|
if (firstElement && firstElement[0]) {
|
|
42
46
|
firstElement[0].focus();
|
|
43
47
|
}
|
|
48
|
+
|
|
49
|
+
_TelemetryHelper.TelemetryHelper.logLoadingEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
50
|
+
Event: _TelemetryConstants.TelemetryEvent.OutOfOfficePaneLoaded
|
|
51
|
+
});
|
|
44
52
|
}, []);
|
|
45
53
|
return /*#__PURE__*/_react.default.createElement(_omnichannelChatComponents.OutOfOfficeHoursPane, {
|
|
46
54
|
componentOverrides: props.componentOverrides,
|
|
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.PreChatSurveyPaneStateful = void 0;
|
|
7
7
|
|
|
8
|
+
var _Constants = require("../../common/Constants");
|
|
9
|
+
|
|
8
10
|
var _TelemetryConstants = require("../../common/telemetry/TelemetryConstants");
|
|
9
11
|
|
|
10
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -13,12 +15,12 @@ var _utils = require("../../common/utils");
|
|
|
13
15
|
|
|
14
16
|
var _ConversationState = require("../../contexts/common/ConversationState");
|
|
15
17
|
|
|
18
|
+
var _DataStoreManager = require("../../common/contextDataStore/DataStoreManager");
|
|
19
|
+
|
|
16
20
|
var _LiveChatWidgetActionType = require("../../contexts/common/LiveChatWidgetActionType");
|
|
17
21
|
|
|
18
22
|
var _omnichannelChatComponents = require("@microsoft/omnichannel-chat-components");
|
|
19
23
|
|
|
20
|
-
var _Constants = require("../../common/Constants");
|
|
21
|
-
|
|
22
24
|
var _TelemetryHelper = require("../../common/telemetry/TelemetryHelper");
|
|
23
25
|
|
|
24
26
|
var _defaultGeneralPreChatSurveyPaneStyleProps = require("./common/defaultStyles/defaultGeneralPreChatSurveyPaneStyleProps");
|
|
@@ -63,7 +65,7 @@ const PreChatSurveyPaneStateful = props => {
|
|
|
63
65
|
try {
|
|
64
66
|
return (0, _utils.parseAdaptiveCardPayload)(payload, requiredFieldMissingMessage);
|
|
65
67
|
} catch (ex) {
|
|
66
|
-
_TelemetryHelper.TelemetryHelper.
|
|
68
|
+
_TelemetryHelper.TelemetryHelper.logConfigDataEvent(_TelemetryConstants.LogLevel.ERROR, {
|
|
67
69
|
Event: _TelemetryConstants.TelemetryEvent.ParseAdaptiveCardFailed,
|
|
68
70
|
Description: "Adaptive Card JSON Parse Failed.",
|
|
69
71
|
ExceptionDetails: {
|
|
@@ -91,14 +93,29 @@ const PreChatSurveyPaneStateful = props => {
|
|
|
91
93
|
});
|
|
92
94
|
|
|
93
95
|
try {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
96
|
+
var _DataStoreManager$cli, _persistedState$domai;
|
|
97
|
+
|
|
98
|
+
const widgetStateFromCache = (_DataStoreManager$cli = _DataStoreManager.DataStoreManager.clientDataStore) === null || _DataStoreManager$cli === void 0 ? void 0 : _DataStoreManager$cli.getData(_Constants.Constants.widgetStateDataKey, "localStorage");
|
|
99
|
+
const persistedState = widgetStateFromCache ? JSON.parse(widgetStateFromCache) : undefined;
|
|
100
|
+
let optionalParams = {};
|
|
101
|
+
|
|
102
|
+
if (persistedState !== null && persistedState !== void 0 && (_persistedState$domai = persistedState.domainStates) !== null && _persistedState$domai !== void 0 && _persistedState$domai.liveChatContext) {
|
|
103
|
+
var _persistedState$domai2;
|
|
104
|
+
|
|
105
|
+
optionalParams = {
|
|
106
|
+
liveChatContext: persistedState === null || persistedState === void 0 ? void 0 : (_persistedState$domai2 = persistedState.domainStates) === null || _persistedState$domai2 === void 0 ? void 0 : _persistedState$domai2.liveChatContext
|
|
107
|
+
};
|
|
108
|
+
await initStartChat(optionalParams, persistedState);
|
|
109
|
+
} else {
|
|
110
|
+
const prechatResponseValues = (0, _utils.extractPreChatSurveyResponseValues)(state.domainStates.preChatSurveyResponse, values);
|
|
111
|
+
optionalParams = {
|
|
112
|
+
initContext: {
|
|
113
|
+
preChatResponse: prechatResponseValues
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
setPreChatResponseEmail(values);
|
|
117
|
+
await initStartChat(optionalParams);
|
|
118
|
+
}
|
|
102
119
|
} catch (ex) {
|
|
103
120
|
_TelemetryHelper.TelemetryHelper.logActionEvent(_TelemetryConstants.LogLevel.ERROR, {
|
|
104
121
|
Event: _TelemetryConstants.TelemetryEvent.PreChatSurveyStartChatMethodFailed,
|
|
@@ -51,7 +51,7 @@ const ProactiveChatPaneStateful = props => {
|
|
|
51
51
|
payload: _ConversationState.ConversationState.Closed
|
|
52
52
|
});
|
|
53
53
|
|
|
54
|
-
_TelemetryHelper.TelemetryHelper.
|
|
54
|
+
_TelemetryHelper.TelemetryHelper.logActionEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
55
55
|
Event: _TelemetryConstants.TelemetryEvent.ProactiveChatRejected,
|
|
56
56
|
ElapsedTimeInMilliseconds: _TelemetryManager.TelemetryTimers.LcwLoadToChatButtonTimer.milliSecondsElapsed,
|
|
57
57
|
Description: "Proactive chat invitation timed out."
|
|
@@ -75,14 +75,14 @@ const ProactiveChatPaneStateful = props => {
|
|
|
75
75
|
if (state.appStates.proactiveChatStates.proactiveChatInNewWindow) {
|
|
76
76
|
// TODO: BroadcastService: replace with the sdk broadcast service, when in place
|
|
77
77
|
const startPopoutChatEvent = {
|
|
78
|
-
eventName:
|
|
78
|
+
eventName: _TelemetryConstants.TelemetryEvent.ProactiveChatStartPopoutChat
|
|
79
79
|
};
|
|
80
80
|
|
|
81
81
|
_omnichannelChatComponents.BroadcastService.postMessage(startPopoutChatEvent);
|
|
82
82
|
|
|
83
83
|
dispatch({
|
|
84
|
-
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.
|
|
85
|
-
payload:
|
|
84
|
+
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
85
|
+
payload: _ConversationState.ConversationState.Closed
|
|
86
86
|
});
|
|
87
87
|
} else if (((_state$domainStates$l = state.domainStates.liveChatConfig) === null || _state$domainStates$l === void 0 ? void 0 : (_state$domainStates$l2 = _state$domainStates$l.LiveWSAndLiveChatEngJoin) === null || _state$domainStates$l2 === void 0 ? void 0 : _state$domainStates$l2.OutOfOperatingHours) === "True") {
|
|
88
88
|
dispatch({
|
|
@@ -94,6 +94,12 @@ const ProactiveChatPaneStateful = props => {
|
|
|
94
94
|
payload: _ConversationState.ConversationState.OutOfOffice
|
|
95
95
|
});
|
|
96
96
|
} else {
|
|
97
|
+
const proactiveChatStarted = {
|
|
98
|
+
eventName: _TelemetryConstants.TelemetryEvent.ProactiveChatStartChat
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
_omnichannelChatComponents.BroadcastService.postMessage(proactiveChatStarted);
|
|
102
|
+
|
|
97
103
|
await startChat();
|
|
98
104
|
}
|
|
99
105
|
},
|
package/lib/cjs/components/proactivechatpanestateful/interfaces/IProactiveChatNotificationConfig.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -37,4 +37,6 @@ exports.LiveChatWidgetActionType = LiveChatWidgetActionType;
|
|
|
37
37
|
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_UNREAD_MESSAGE_COUNT"] = 26] = "SET_UNREAD_MESSAGE_COUNT";
|
|
38
38
|
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_FOCUS_CHAT_BUTTON"] = 27] = "SET_FOCUS_CHAT_BUTTON";
|
|
39
39
|
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CONVERSATION_ENDED_BY_AGENT"] = 28] = "SET_CONVERSATION_ENDED_BY_AGENT";
|
|
40
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_WIDGET_STATE"] = 29] = "SET_WIDGET_STATE";
|
|
41
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_LIVE_CHAT_CONTEXT"] = 30] = "SET_LIVE_CHAT_CONTEXT";
|
|
40
42
|
})(LiveChatWidgetActionType || (exports.LiveChatWidgetActionType = LiveChatWidgetActionType = {}));
|
|
@@ -22,7 +22,8 @@ const getLiveChatWidgetContextInitialState = props => {
|
|
|
22
22
|
chatToken: undefined,
|
|
23
23
|
postChatContext: undefined,
|
|
24
24
|
telemetryInternalData: {},
|
|
25
|
-
globalDir: "ltr"
|
|
25
|
+
globalDir: "ltr",
|
|
26
|
+
liveChatContext: undefined
|
|
26
27
|
},
|
|
27
28
|
appStates: {
|
|
28
29
|
conversationState: _ConversationState.ConversationState.Closed,
|
|
@@ -145,6 +145,7 @@ const createReducer = () => {
|
|
|
145
145
|
case _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CHAT_TOKEN:
|
|
146
146
|
return { ...state,
|
|
147
147
|
domainStates: { ...state.domainStates,
|
|
148
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
148
149
|
chatToken: action.payload
|
|
149
150
|
}
|
|
150
151
|
};
|
|
@@ -217,6 +218,18 @@ const createReducer = () => {
|
|
|
217
218
|
}
|
|
218
219
|
};
|
|
219
220
|
|
|
221
|
+
case _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_LIVE_CHAT_CONTEXT:
|
|
222
|
+
return { ...state,
|
|
223
|
+
domainStates: { ...state.domainStates,
|
|
224
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
225
|
+
liveChatContext: action.payload
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
case _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_WIDGET_STATE:
|
|
230
|
+
return { ...action.payload
|
|
231
|
+
};
|
|
232
|
+
|
|
220
233
|
case _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CONVERSATION_ENDED_BY_AGENT:
|
|
221
234
|
return { ...state,
|
|
222
235
|
appStates: { ...state.appStates,
|
|
@@ -32,6 +32,8 @@ _defineProperty(Constants, "false", "false");
|
|
|
32
32
|
|
|
33
33
|
_defineProperty(Constants, "maximumUnreadMessageCount", 99);
|
|
34
34
|
|
|
35
|
+
_defineProperty(Constants, "widgetStateDataKey", "LcwChatWidgetState");
|
|
36
|
+
|
|
35
37
|
_defineProperty(Constants, "channelIdKey", "ChannelId-");
|
|
36
38
|
|
|
37
39
|
_defineProperty(Constants, "ChannelId", "lcw");
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
+
|
|
3
|
+
export class DataStoreManager {}
|
|
4
|
+
|
|
5
|
+
_defineProperty(DataStoreManager, "clientDataStore", void 0);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -106,11 +106,15 @@ export let TelemetryEvent;
|
|
|
106
106
|
TelemetryEvent["SendTypingIndicatorSucceeded"] = "SendTypingIndicatorSucceeded";
|
|
107
107
|
TelemetryEvent["SendTypingIndicatorFailed"] = "SendTypingIndicatorFailed";
|
|
108
108
|
TelemetryEvent["PreChatSurveyStartChatMethodFailed"] = "PreChatSurveyStartChatMethodFailed";
|
|
109
|
+
TelemetryEvent["ChatAlreadyTriggered"] = "ChatAlreadyTriggered";
|
|
110
|
+
TelemetryEvent["StartProactiveChatEventReceived"] = "StartProactiveChatEventReceived";
|
|
109
111
|
TelemetryEvent["StartProactiveChatMethodFailed"] = "StartProactiveChatMethodFailed";
|
|
110
112
|
TelemetryEvent["ProactiveChatAccepted"] = "ProactiveChatAccepted";
|
|
111
113
|
TelemetryEvent["ProactiveChatRejected"] = "ProactiveChatRejected";
|
|
112
114
|
TelemetryEvent["IncomingProactiveChatScreenLoaded"] = "IncomingProactiveChatScreenLoaded";
|
|
113
115
|
TelemetryEvent["ProactiveChatClosed"] = "ProactiveChatClosed";
|
|
116
|
+
TelemetryEvent["ProactiveChatStartChat"] = "ProactiveChatStartChat";
|
|
117
|
+
TelemetryEvent["ProactiveChatStartPopoutChat"] = "ProactiveChatStartPopoutChat";
|
|
114
118
|
TelemetryEvent["ReconnectChatContinueConversation"] = "ReconnectChatContinueConversation";
|
|
115
119
|
TelemetryEvent["ReconnectChatStartNewConversation"] = "ReconnectChatStartNewConversation";
|
|
116
120
|
TelemetryEvent["ReconnectChatMinimize"] = "ReconnectChatMinimize";
|
|
@@ -120,7 +124,6 @@ export let TelemetryEvent;
|
|
|
120
124
|
export class TelemetryConstants {
|
|
121
125
|
static map(eventTypeOrScenarioType) {
|
|
122
126
|
switch (eventTypeOrScenarioType) {
|
|
123
|
-
case TelemetryEvent.StartChatSDKCall:
|
|
124
127
|
case TelemetryEvent.ParseAdaptiveCardFailed:
|
|
125
128
|
return ScenarioType.CONFIG_VALIDATION;
|
|
126
129
|
|
|
@@ -159,6 +162,7 @@ export class TelemetryConstants {
|
|
|
159
162
|
case TelemetryEvent.HeaderMinimizeButtonClicked:
|
|
160
163
|
return ScenarioType.ACTIONS;
|
|
161
164
|
|
|
165
|
+
case TelemetryEvent.StartChatSDKCall:
|
|
162
166
|
case TelemetryEvent.StartChatMethodException:
|
|
163
167
|
case TelemetryEvent.CloseChatMethodException:
|
|
164
168
|
case TelemetryEvent.StartProactiveChatMethodFailed:
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { LogLevel, TelemetryEvent } from "../../common/telemetry/TelemetryConstants";
|
|
2
2
|
import React, { useEffect } from "react";
|
|
3
3
|
import { findAllFocusableElement, findParentFocusableElementsWithoutChildContainer, preventFocusToMoveOutOfElement, setFocusOnElement, setFocusOnSendBox, setTabIndices } from "../../common/utils";
|
|
4
|
-
import { ConfirmationPane } from "@microsoft/omnichannel-chat-components";
|
|
5
|
-
import { Constants } from "../../common/Constants";
|
|
6
|
-
import { ConversationState } from "../../contexts/common/ConversationState";
|
|
4
|
+
import { BroadcastService, ConfirmationPane } from "@microsoft/omnichannel-chat-components";
|
|
7
5
|
import { DimLayer } from "../dimlayer/DimLayer";
|
|
8
6
|
import { LiveChatWidgetActionType } from "../../contexts/common/LiveChatWidgetActionType";
|
|
9
7
|
import { NotificationHandler } from "../webchatcontainerstateful/webchatcontroller/notification/NotificationHandler";
|
|
@@ -12,20 +10,21 @@ import { PostChatSurveyMode } from "../postchatsurveypanestateful/enums/PostChat
|
|
|
12
10
|
import { TelemetryHelper } from "../../common/telemetry/TelemetryHelper";
|
|
13
11
|
import useChatAdapterStore from "../../hooks/useChatAdapterStore";
|
|
14
12
|
import useChatContextStore from "../../hooks/useChatContextStore";
|
|
15
|
-
import useChatSDKStore from "../../hooks/useChatSDKStore";
|
|
13
|
+
import useChatSDKStore from "../../hooks/useChatSDKStore";
|
|
14
|
+
import { Constants } from "../../common/Constants"; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
15
|
|
|
17
16
|
export const ConfirmationPaneStateful = props => {
|
|
18
17
|
var _state$domainStates$l, _state$domainStates$l2, _state$domainStates$l3, _state$domainStates$l4;
|
|
19
18
|
|
|
20
19
|
const initialTabIndexMap = new Map();
|
|
21
|
-
let elements = [];
|
|
20
|
+
let elements = []; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
|
+
|
|
22
|
+
const chatSDK = useChatSDKStore();
|
|
22
23
|
const [state, dispatch] = useChatContextStore();
|
|
23
24
|
const {
|
|
24
|
-
setPostChatContext,
|
|
25
25
|
endChat
|
|
26
26
|
} = props; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27
|
-
|
|
28
|
-
const chatSDK = useChatSDKStore(); // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
29
28
|
|
|
30
29
|
const [adapter] = useChatAdapterStore();
|
|
31
30
|
const isPostChatEnabled = (_state$domainStates$l = state.domainStates.liveChatConfig) === null || _state$domainStates$l === void 0 ? void 0 : (_state$domainStates$l2 = _state$domainStates$l.LiveWSAndLiveChatEngJoin) === null || _state$domainStates$l2 === void 0 ? void 0 : _state$domainStates$l2.msdyn_postconversationsurveyenable;
|
|
@@ -34,7 +33,7 @@ export const ConfirmationPaneStateful = props => {
|
|
|
34
33
|
id: "oc-lcw-confirmation-pane",
|
|
35
34
|
dir: state.domainStates.globalDir,
|
|
36
35
|
onConfirm: async () => {
|
|
37
|
-
TelemetryHelper.
|
|
36
|
+
TelemetryHelper.logActionEvent(LogLevel.INFO, {
|
|
38
37
|
Event: TelemetryEvent.ConfirmationConfirmButtonClicked,
|
|
39
38
|
Description: "Confirmation pane Confirm button clicked"
|
|
40
39
|
});
|
|
@@ -44,26 +43,14 @@ export const ConfirmationPaneStateful = props => {
|
|
|
44
43
|
});
|
|
45
44
|
|
|
46
45
|
try {
|
|
47
|
-
//
|
|
48
|
-
const conversationDetails = await chatSDK.getConversationDetails();
|
|
46
|
+
// check agent has joined conversation
|
|
47
|
+
const conversationDetails = await chatSDK.getConversationDetails();
|
|
49
48
|
|
|
50
49
|
if (isPostChatEnabled === "true" && postChatSurveyMode === PostChatSurveyMode.Embed && conversationDetails.canRenderPostChat === Constants.truePascal) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
dispatch({
|
|
56
|
-
type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
57
|
-
payload: ConversationState.Loading
|
|
58
|
-
});
|
|
59
|
-
await setPostChatContext();
|
|
60
|
-
|
|
61
|
-
if (state.domainStates.postChatContext) {
|
|
62
|
-
dispatch({
|
|
63
|
-
type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
64
|
-
payload: ConversationState.Postchat
|
|
65
|
-
});
|
|
66
|
-
}
|
|
50
|
+
const loadPostChatEvent = {
|
|
51
|
+
eventName: "LoadPostChatSurvey"
|
|
52
|
+
};
|
|
53
|
+
BroadcastService.postMessage(loadPostChatEvent);
|
|
67
54
|
} else {
|
|
68
55
|
setTabIndices(elements, initialTabIndexMap, true);
|
|
69
56
|
|
|
@@ -89,7 +76,7 @@ export const ConfirmationPaneStateful = props => {
|
|
|
89
76
|
}
|
|
90
77
|
},
|
|
91
78
|
onCancel: () => {
|
|
92
|
-
TelemetryHelper.
|
|
79
|
+
TelemetryHelper.logActionEvent(LogLevel.INFO, {
|
|
93
80
|
Event: TelemetryEvent.ConfirmationCancelButtonClicked,
|
|
94
81
|
Description: "Confirmation pane Cancel button clicked."
|
|
95
82
|
});
|
|
@@ -68,8 +68,8 @@ export const EmailTranscriptPaneStateful = props => {
|
|
|
68
68
|
},
|
|
69
69
|
onCancel: () => {
|
|
70
70
|
TelemetryHelper.logActionEvent(LogLevel.INFO, {
|
|
71
|
-
Event: TelemetryEvent.
|
|
72
|
-
Description: "Email Transcript button clicked."
|
|
71
|
+
Event: TelemetryEvent.EmailTranscriptCancelButtonClicked,
|
|
72
|
+
Description: "Email Transcript cancel button clicked."
|
|
73
73
|
});
|
|
74
74
|
closeEmailTranscriptPane();
|
|
75
75
|
},
|