@microsoft/omnichannel-chat-widget 0.1.0-main.7a3ed6a → 0.1.0-main.861673e
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 +1 -0
- package/lib/cjs/common/telemetry/TelemetryHelper.js +9 -4
- package/lib/cjs/common/telemetry/TelemetryManager.js +12 -4
- package/lib/cjs/common/telemetry/defaultConfigs/defaultAriaConfig.js +3 -3
- package/lib/cjs/common/telemetry/loggers/ariaTelemetryLogger.js +14 -1
- package/lib/cjs/common/telemetry/loggers/consoleLogger.js +3 -0
- package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +8 -1
- package/lib/cjs/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +27 -26
- package/lib/cjs/components/livechatwidget/common/disposeTelemetryLoggers.js +14 -0
- package/lib/cjs/components/livechatwidget/common/endChat.js +4 -0
- package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +5 -0
- package/lib/cjs/components/livechatwidget/common/registerTelemetryLoggers.js +3 -5
- package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +14 -4
- package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +2 -0
- package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +4 -2
- package/lib/cjs/contexts/createReducer.js +14 -0
- package/lib/esm/common/telemetry/TelemetryConstants.js +1 -0
- package/lib/esm/common/telemetry/TelemetryHelper.js +9 -4
- package/lib/esm/common/telemetry/TelemetryManager.js +8 -4
- package/lib/esm/common/telemetry/defaultConfigs/defaultAriaConfig.js +3 -3
- package/lib/esm/common/telemetry/loggers/ariaTelemetryLogger.js +14 -1
- package/lib/esm/common/telemetry/loggers/consoleLogger.js +3 -0
- package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +9 -1
- package/lib/esm/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +29 -28
- package/lib/esm/components/livechatwidget/common/disposeTelemetryLoggers.js +4 -0
- package/lib/esm/components/livechatwidget/common/endChat.js +4 -0
- package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +5 -0
- package/lib/esm/components/livechatwidget/common/registerTelemetryLoggers.js +3 -2
- package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +11 -4
- package/lib/esm/contexts/common/LiveChatWidgetActionType.js +2 -0
- package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +4 -2
- package/lib/esm/contexts/createReducer.js +14 -0
- package/lib/types/common/telemetry/TelemetryConstants.d.ts +2 -1
- package/lib/types/common/telemetry/TelemetryManager.d.ts +1 -0
- package/lib/types/common/telemetry/definitions/Contracts.d.ts +3 -0
- package/lib/types/common/telemetry/definitions/Payload.d.ts +3 -0
- package/lib/types/common/telemetry/interfaces/IChatSDKLogger.d.ts +1 -0
- package/lib/types/common/telemetry/interfaces/IInternalTelemetryData.d.ts +2 -0
- package/lib/types/common/telemetry/interfaces/ITelemetryConfig.d.ts +12 -0
- package/lib/types/components/livechatwidget/common/disposeTelemetryLoggers.d.ts +1 -0
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +1 -1
- package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +2 -0
- package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +3 -1
- package/package.json +1 -1
|
@@ -123,6 +123,7 @@ exports.TelemetryEvent = TelemetryEvent;
|
|
|
123
123
|
TelemetryEvent["ReconnectChatContinueConversation"] = "ReconnectChatContinueConversation";
|
|
124
124
|
TelemetryEvent["ReconnectChatStartNewConversation"] = "ReconnectChatStartNewConversation";
|
|
125
125
|
TelemetryEvent["ReconnectChatMinimize"] = "ReconnectChatMinimize";
|
|
126
|
+
TelemetryEvent["ChatWidgetStateChanged"] = "ChatWidgetStateChanged";
|
|
126
127
|
})(TelemetryEvent || (exports.TelemetryEvent = TelemetryEvent = {}));
|
|
127
128
|
|
|
128
129
|
class TelemetryConstants {
|
|
@@ -109,6 +109,8 @@ class TelemetryHelper {
|
|
|
109
109
|
static conformToLoadContract(level, input) {
|
|
110
110
|
const payload = input.payload;
|
|
111
111
|
return TelemetryHelper.populate(level, payload, event => {
|
|
112
|
+
var _TelemetryManager$Int11, _TelemetryManager$Int12, _TelemetryManager$Int13;
|
|
113
|
+
|
|
112
114
|
event.Event = payload.Event;
|
|
113
115
|
event.ResourcePath = payload.ResourcePath;
|
|
114
116
|
event.WidgetState = payload.WidgetState;
|
|
@@ -116,16 +118,19 @@ class TelemetryHelper {
|
|
|
116
118
|
event.ChatType = payload.ChatType;
|
|
117
119
|
event.ElapsedTimeInMilliseconds = payload.ElapsedTimeInMilliseconds;
|
|
118
120
|
event.ExceptionDetails = JSON.stringify(payload.ExceptionDetails);
|
|
121
|
+
event.OCChatSDKVersion = ((_TelemetryManager$Int11 = _TelemetryManager.TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int11 === void 0 ? void 0 : _TelemetryManager$Int11.OCChatSDKVersion) ?? "";
|
|
122
|
+
event.OCChatWidgetVersion = ((_TelemetryManager$Int12 = _TelemetryManager.TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int12 === void 0 ? void 0 : _TelemetryManager$Int12.chatWidgetVersion) ?? "";
|
|
123
|
+
event.OCChatComponentsVersion = ((_TelemetryManager$Int13 = _TelemetryManager.TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int13 === void 0 ? void 0 : _TelemetryManager$Int13.chatComponentVersion) ?? "";
|
|
119
124
|
});
|
|
120
125
|
}
|
|
121
126
|
|
|
122
127
|
static conformToIC3ClientContract(level, input) {
|
|
123
128
|
const payload = input.payload;
|
|
124
129
|
return TelemetryHelper.populate(level, payload, event => {
|
|
125
|
-
var _TelemetryManager$
|
|
130
|
+
var _TelemetryManager$Int14;
|
|
126
131
|
|
|
127
132
|
event.Event = payload.Event;
|
|
128
|
-
event.IC3ClientVersion = (_TelemetryManager$
|
|
133
|
+
event.IC3ClientVersion = (_TelemetryManager$Int14 = _TelemetryManager.TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int14 === void 0 ? void 0 : _TelemetryManager$Int14.IC3ClientVersion;
|
|
129
134
|
event.SubscriptionId = payload.SubscriptionId;
|
|
130
135
|
event.EndpointUrl = payload.EndpointUrl;
|
|
131
136
|
event.EndpointId = payload.EndpointId;
|
|
@@ -249,14 +254,14 @@ _defineProperty(TelemetryHelper, "logActionEvent", (logLevel, payload) => {
|
|
|
249
254
|
});
|
|
250
255
|
|
|
251
256
|
_defineProperty(TelemetryHelper, "logSDKEvent", (logLevel, payload) => {
|
|
252
|
-
var _TelemetryManager$
|
|
257
|
+
var _TelemetryManager$Int15;
|
|
253
258
|
|
|
254
259
|
const telemetryEvent = {
|
|
255
260
|
eventName: (payload === null || payload === void 0 ? void 0 : payload.Event) ?? "",
|
|
256
261
|
logLevel: logLevel,
|
|
257
262
|
payload: { ...payload,
|
|
258
263
|
TransactionId: (0, _utils.newGuid)(),
|
|
259
|
-
RequestId: (_TelemetryManager$
|
|
264
|
+
RequestId: (_TelemetryManager$Int15 = _TelemetryManager.TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int15 === void 0 ? void 0 : _TelemetryManager$Int15.currentRequestId
|
|
260
265
|
}
|
|
261
266
|
};
|
|
262
267
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.TelemetryTimers = exports.TelemetryManager = exports.RegisterLoggers = void 0;
|
|
6
|
+
exports.disposeLoggers = exports.TelemetryTimers = exports.TelemetryManager = exports.RegisterLoggers = void 0;
|
|
7
7
|
|
|
8
8
|
var _TelemetryConstants = require("./TelemetryConstants");
|
|
9
9
|
|
|
@@ -31,15 +31,23 @@ exports.TelemetryManager = TelemetryManager;
|
|
|
31
31
|
|
|
32
32
|
_defineProperty(TelemetryManager, "InternalTelemetryData", void 0);
|
|
33
33
|
|
|
34
|
-
const
|
|
35
|
-
|
|
34
|
+
const loggers = [];
|
|
35
|
+
|
|
36
|
+
const disposeLoggers = () => {
|
|
37
|
+
loggers.map(logger => {
|
|
38
|
+
logger.dispose();
|
|
39
|
+
});
|
|
40
|
+
};
|
|
36
41
|
|
|
42
|
+
exports.disposeLoggers = disposeLoggers;
|
|
43
|
+
|
|
44
|
+
const RegisterLoggers = () => {
|
|
37
45
|
const registerLoggers = () => {
|
|
38
46
|
var _TelemetryManager$Int, _TelemetryManager$Int2, _TelemetryManager$Int3, _TelemetryManager$Int4, _TelemetryManager$Int5, _TelemetryManager$Int6, _TelemetryManager$Int7, _TelemetryManager$Int8;
|
|
39
47
|
|
|
40
48
|
if (!((_TelemetryManager$Int = TelemetryManager.InternalTelemetryData) !== null && _TelemetryManager$Int !== void 0 && (_TelemetryManager$Int2 = _TelemetryManager$Int.telemetryConfig) !== null && _TelemetryManager$Int2 !== void 0 && _TelemetryManager$Int2.disableConsoleLog) || !((_TelemetryManager$Int3 = TelemetryManager.InternalTelemetryData) !== null && _TelemetryManager$Int3 !== void 0 && (_TelemetryManager$Int4 = _TelemetryManager$Int3.telemetryConfig) !== null && _TelemetryManager$Int4 !== void 0 && _TelemetryManager$Int4.telemetryDisabled)) {
|
|
41
49
|
_omnichannelChatComponents.BroadcastService.getAnyMessage().subscribe(event => {
|
|
42
|
-
if (event.payload) {
|
|
50
|
+
if (event.payload && event.eventName !== _TelemetryConstants.TelemetryEvent.ChatWidgetStateChanged) {
|
|
43
51
|
logTelemetry(event);
|
|
44
52
|
}
|
|
45
53
|
});
|
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.defaultAriaConfig = void 0;
|
|
7
7
|
const defaultAriaConfig = {
|
|
8
|
-
collectorUriForTelemetry: "
|
|
9
|
-
ariaTelemetryKey: "
|
|
10
|
-
ariaTelemetryApplicationName: "
|
|
8
|
+
collectorUriForTelemetry: "",
|
|
9
|
+
ariaTelemetryKey: "c7655518acf1403f93ff6b9f77942f0a-d01a02fd-6b50-4de3-a566-62eda11f93bc-7083",
|
|
10
|
+
ariaTelemetryApplicationName: "",
|
|
11
11
|
disableCookieUsage: true
|
|
12
12
|
};
|
|
13
13
|
exports.defaultAriaConfig = defaultAriaConfig;
|
|
@@ -32,7 +32,15 @@ const ariaTelemetryLogger = (ariaTelemetryKey, disabledCookieUsage, collectiorUr
|
|
|
32
32
|
configuration.collectorUri = collectiorUriForTelemetry;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
try {
|
|
36
|
+
_logger = _AWTLogManager.default.initialize(ariaTelemetryKey, configuration);
|
|
37
|
+
|
|
38
|
+
if (_logger === undefined) {
|
|
39
|
+
_logger = _AWTLogManager.default.getLogger(ariaTelemetryKey);
|
|
40
|
+
}
|
|
41
|
+
} catch (error) {
|
|
42
|
+
console.log(error);
|
|
43
|
+
}
|
|
36
44
|
}
|
|
37
45
|
|
|
38
46
|
return _logger;
|
|
@@ -54,6 +62,11 @@ const ariaTelemetryLogger = (ariaTelemetryKey, disabledCookieUsage, collectiorUr
|
|
|
54
62
|
|
|
55
63
|
eventProperties.setPropertyWithPii(ariaTelemetryApplicationName, _Constants.Constants.LiveChatWidget, _Enums.AWTPiiKind.GenericData);
|
|
56
64
|
logger() ? logger().logEvent(eventProperties) : console.log("Unable to initialize aria logger");
|
|
65
|
+
},
|
|
66
|
+
dispose: () => {
|
|
67
|
+
_AWTLogManager.default.flush(function () {
|
|
68
|
+
console.log("Aria logger disposed");
|
|
69
|
+
});
|
|
57
70
|
}
|
|
58
71
|
};
|
|
59
72
|
return ariaLogger;
|
|
@@ -98,7 +98,14 @@ const ChatButtonStateful = props => {
|
|
|
98
98
|
ElapsedTimeInMilliseconds: _TelemetryManager.TelemetryTimers.LcwLoadToChatButtonTimer.milliSecondsElapsed
|
|
99
99
|
});
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
if (state.uiStates.focusChatButton) {
|
|
102
|
+
(0, _utils.setFocusOnElement)(document.getElementById((controlProps === null || controlProps === void 0 ? void 0 : controlProps.id) ?? "oc-lcw-chat-button"));
|
|
103
|
+
} else {
|
|
104
|
+
dispatch({
|
|
105
|
+
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_FOCUS_CHAT_BUTTON,
|
|
106
|
+
payload: true
|
|
107
|
+
});
|
|
108
|
+
}
|
|
102
109
|
}, []);
|
|
103
110
|
return /*#__PURE__*/_react.default.createElement(_omnichannelChatComponents.ChatButton, {
|
|
104
111
|
componentOverrides: buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.componentOverrides,
|
|
@@ -150,7 +150,7 @@ const dummyDefaultProps = {
|
|
|
150
150
|
id: "oc-lcw-CurrentCall-timer",
|
|
151
151
|
showHours: false,
|
|
152
152
|
timerStyles: {
|
|
153
|
-
color: "
|
|
153
|
+
color: "#FFFFFF",
|
|
154
154
|
textAlign: "center",
|
|
155
155
|
backgroundColor: "#3d3c3c",
|
|
156
156
|
height: "45px",
|
|
@@ -181,8 +181,8 @@ const dummyDefaultProps = {
|
|
|
181
181
|
},
|
|
182
182
|
audioCallButtonStyleProps: {
|
|
183
183
|
borderRadius: "50%",
|
|
184
|
-
color: "
|
|
185
|
-
backgroundColor: "
|
|
184
|
+
color: "#FFFFFF",
|
|
185
|
+
backgroundColor: "#008000",
|
|
186
186
|
lineHeight: "40px",
|
|
187
187
|
height: "40px",
|
|
188
188
|
width: "40px",
|
|
@@ -193,8 +193,8 @@ const dummyDefaultProps = {
|
|
|
193
193
|
},
|
|
194
194
|
videoCallButtonStyleProps: {
|
|
195
195
|
borderRadius: "50%",
|
|
196
|
-
color: "
|
|
197
|
-
backgroundColor: "
|
|
196
|
+
color: "#FFFFFF",
|
|
197
|
+
backgroundColor: "#008000",
|
|
198
198
|
lineHeight: "40px",
|
|
199
199
|
height: "40px",
|
|
200
200
|
width: "40px",
|
|
@@ -209,8 +209,8 @@ const dummyDefaultProps = {
|
|
|
209
209
|
},
|
|
210
210
|
declineCallButtonStyleProps: {
|
|
211
211
|
borderRadius: "50%",
|
|
212
|
-
color: "
|
|
213
|
-
backgroundColor: "
|
|
212
|
+
color: "#FFFFFF",
|
|
213
|
+
backgroundColor: "#DC0000",
|
|
214
214
|
lineHeight: "40px",
|
|
215
215
|
height: "40px",
|
|
216
216
|
width: "40px",
|
|
@@ -219,12 +219,12 @@ const dummyDefaultProps = {
|
|
|
219
219
|
},
|
|
220
220
|
incomingCallTitleStyleProps: {
|
|
221
221
|
margin: "0 5px",
|
|
222
|
-
color: "
|
|
222
|
+
color: "#FFFFFF",
|
|
223
223
|
fontSize: 12,
|
|
224
224
|
fontFamily: "Segoe UI, Arial, sans-serif"
|
|
225
225
|
},
|
|
226
226
|
itemFocusStyleProps: {
|
|
227
|
-
outline: "2px solid
|
|
227
|
+
outline: "2px solid #FFFFFF"
|
|
228
228
|
}
|
|
229
229
|
},
|
|
230
230
|
currentCallStyleProps: {
|
|
@@ -236,7 +236,7 @@ const dummyDefaultProps = {
|
|
|
236
236
|
},
|
|
237
237
|
micButtonStyleProps: {
|
|
238
238
|
borderRadius: "2px",
|
|
239
|
-
color: "
|
|
239
|
+
color: "#FFFFFF",
|
|
240
240
|
backgroundColor: "#3d3c3c",
|
|
241
241
|
height: "45px",
|
|
242
242
|
width: "50px",
|
|
@@ -247,7 +247,7 @@ const dummyDefaultProps = {
|
|
|
247
247
|
},
|
|
248
248
|
videoOffButtonStyleProps: {
|
|
249
249
|
borderRadius: "2px",
|
|
250
|
-
color: "
|
|
250
|
+
color: "#FFFFFF",
|
|
251
251
|
backgroundColor: "#3d3c3c",
|
|
252
252
|
height: "45px",
|
|
253
253
|
width: "50px",
|
|
@@ -261,8 +261,8 @@ const dummyDefaultProps = {
|
|
|
261
261
|
},
|
|
262
262
|
endCallButtonStyleProps: {
|
|
263
263
|
borderRadius: "2px",
|
|
264
|
-
color: "
|
|
265
|
-
backgroundColor: "
|
|
264
|
+
color: "#FFFFFF",
|
|
265
|
+
backgroundColor: "#DC0000",
|
|
266
266
|
lineHeight: "50px",
|
|
267
267
|
height: "45px",
|
|
268
268
|
width: "50px",
|
|
@@ -271,7 +271,7 @@ const dummyDefaultProps = {
|
|
|
271
271
|
currentCallTimerStyleProps: {
|
|
272
272
|
borderRadius: "2px",
|
|
273
273
|
margin: "1px",
|
|
274
|
-
color: "
|
|
274
|
+
color: "#FFFFFF",
|
|
275
275
|
paddingTop: "18px",
|
|
276
276
|
fontSize: 12,
|
|
277
277
|
fontFamily: "Segoe UI, Arial, sans-serif",
|
|
@@ -493,7 +493,7 @@ const dummyDefaultProps = {
|
|
|
493
493
|
},
|
|
494
494
|
styleProps: {
|
|
495
495
|
generalStyleProps: {
|
|
496
|
-
backgroundColor: "
|
|
496
|
+
backgroundColor: "#FFFFFF",
|
|
497
497
|
borderRadius: "2px",
|
|
498
498
|
color: "black",
|
|
499
499
|
fontFamily: "Segoe UI, Arial, sans-serif",
|
|
@@ -535,7 +535,7 @@ const dummyDefaultProps = {
|
|
|
535
535
|
},
|
|
536
536
|
confirmButtonStyleProps: {
|
|
537
537
|
backgroundColor: "rgba(9,72,159,1)",
|
|
538
|
-
color: "
|
|
538
|
+
color: "#FFFFFF",
|
|
539
539
|
fontFamily: "Segoe UI, Arial, sans-serif",
|
|
540
540
|
fontSize: "14px",
|
|
541
541
|
fontWeight: "500",
|
|
@@ -549,7 +549,7 @@ const dummyDefaultProps = {
|
|
|
549
549
|
border: "2px dotted #000"
|
|
550
550
|
},
|
|
551
551
|
cancelButtonStyleProps: {
|
|
552
|
-
backgroundColor: "
|
|
552
|
+
backgroundColor: "#FFFFFF",
|
|
553
553
|
fontFamily: "Segoe UI, Arial, sans-serif",
|
|
554
554
|
fontSize: "14px",
|
|
555
555
|
fontWeight: "500",
|
|
@@ -934,16 +934,16 @@ const dummyDefaultProps = {
|
|
|
934
934
|
fontSize: 16,
|
|
935
935
|
fontFamily: "Segoe UI, Arial, sans-serif",
|
|
936
936
|
fontWeight: "450",
|
|
937
|
-
color: "
|
|
937
|
+
color: "#FFFFFF",
|
|
938
938
|
padding: "3px 0"
|
|
939
939
|
},
|
|
940
940
|
minimizeButtonStyleProps: {
|
|
941
|
-
color: "
|
|
941
|
+
color: "#FFFFFF",
|
|
942
942
|
margin: "5px 0",
|
|
943
943
|
fontSize: "12px"
|
|
944
944
|
},
|
|
945
945
|
closeButtonStyleProps: {
|
|
946
|
-
color: "
|
|
946
|
+
color: "#FFFFFF",
|
|
947
947
|
margin: "5px 0",
|
|
948
948
|
fontSize: "12px"
|
|
949
949
|
},
|
|
@@ -1105,7 +1105,7 @@ const dummyDefaultProps = {
|
|
|
1105
1105
|
titleStyleProps: {
|
|
1106
1106
|
// ...[Existing chat button title style props]
|
|
1107
1107
|
margin: "0 0 0 10px",
|
|
1108
|
-
color: "
|
|
1108
|
+
color: "#FFFFFF"
|
|
1109
1109
|
}
|
|
1110
1110
|
}
|
|
1111
1111
|
},
|
|
@@ -1471,7 +1471,7 @@ const dummyDefaultProps = {
|
|
|
1471
1471
|
bubbleBackground: "#315FA2",
|
|
1472
1472
|
bubbleBorderRadius: 4,
|
|
1473
1473
|
bubbleBorderWidth: 0,
|
|
1474
|
-
bubbleFromUserBackground: "
|
|
1474
|
+
bubbleFromUserBackground: "#FFFFFF",
|
|
1475
1475
|
bubbleFromUserBorderRadius: 4,
|
|
1476
1476
|
bubbleFromUserBorderWidth: 1,
|
|
1477
1477
|
bubbleFromUserTextColor: "Black",
|
|
@@ -1479,7 +1479,7 @@ const dummyDefaultProps = {
|
|
|
1479
1479
|
bubbleMaxWidth: 250,
|
|
1480
1480
|
bubbleMinHeight: 34,
|
|
1481
1481
|
bubbleMinWidth: 20,
|
|
1482
|
-
bubbleTextColor: "
|
|
1482
|
+
bubbleTextColor: "#FFFFFF",
|
|
1483
1483
|
hideSendBox: false,
|
|
1484
1484
|
hideUploadButton: true,
|
|
1485
1485
|
primaryFont: "Segoe UI, Arial, sans-serif",
|
|
@@ -1488,7 +1488,7 @@ const dummyDefaultProps = {
|
|
|
1488
1488
|
sendBoxTextWrap: true,
|
|
1489
1489
|
sendBoxHeight: 60,
|
|
1490
1490
|
sendBoxMaxHeight: 96,
|
|
1491
|
-
sendBoxBackground: "
|
|
1491
|
+
sendBoxBackground: "#FFFFFF",
|
|
1492
1492
|
showAvatarInGroup: true,
|
|
1493
1493
|
suggestedActionsStackedHeight: 125,
|
|
1494
1494
|
suggestedActionsStackedOverflow: "scroll",
|
|
@@ -1599,7 +1599,7 @@ const dummyDefaultProps = {
|
|
|
1599
1599
|
fontWeight: 600,
|
|
1600
1600
|
fontSize: "13px",
|
|
1601
1601
|
lineHeight: "18px",
|
|
1602
|
-
color: "
|
|
1602
|
+
color: "#FFFFFF",
|
|
1603
1603
|
paddingTop: "7px",
|
|
1604
1604
|
WebkitUserSelect: "none",
|
|
1605
1605
|
MozUserSelect: "none",
|
|
@@ -1703,6 +1703,7 @@ const dummyDefaultProps = {
|
|
|
1703
1703
|
PRECHAT_REQUIRED_FIELD_MISSING_MESSAGE: "{0} field is required",
|
|
1704
1704
|
MARKDOWN_EXTERNAL_LINK_ALT: "Opens in a new window; external."
|
|
1705
1705
|
}
|
|
1706
|
-
}
|
|
1706
|
+
},
|
|
1707
|
+
telemetryConfig: undefined
|
|
1707
1708
|
};
|
|
1708
1709
|
exports.dummyDefaultProps = dummyDefaultProps;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.disposeTelemetryLoggers = void 0;
|
|
7
|
+
|
|
8
|
+
var _TelemetryManager = require("../../../common/telemetry/TelemetryManager");
|
|
9
|
+
|
|
10
|
+
const disposeTelemetryLoggers = () => {
|
|
11
|
+
(0, _TelemetryManager.disposeLoggers)();
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
exports.disposeTelemetryLoggers = disposeTelemetryLoggers;
|
|
@@ -43,6 +43,10 @@ const endChat = async (props, chatSDK, setAdapter, setWebChatStyles, dispatch, a
|
|
|
43
43
|
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
44
44
|
payload: _ConversationState.ConversationState.Closed
|
|
45
45
|
});
|
|
46
|
+
dispatch({
|
|
47
|
+
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CONVERSATION_ENDED_BY_AGENT,
|
|
48
|
+
payload: false
|
|
49
|
+
});
|
|
46
50
|
dispatch({
|
|
47
51
|
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_RECONNECT_ID,
|
|
48
52
|
payload: undefined
|
|
@@ -98,6 +98,11 @@ const initWebChatComposer = (props, chatSDK, state, dispatch, setWebChatStyles)
|
|
|
98
98
|
payload: _ConversationState.ConversationState.Loading
|
|
99
99
|
});
|
|
100
100
|
await (0, _setPostChatContextAndLoadSurvey.setPostChatContextAndLoadSurvey)(chatSDK, dispatch, true);
|
|
101
|
+
} else {
|
|
102
|
+
dispatch({
|
|
103
|
+
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CONVERSATION_ENDED_BY_AGENT,
|
|
104
|
+
payload: true
|
|
105
|
+
});
|
|
101
106
|
}
|
|
102
107
|
|
|
103
108
|
dispatch({
|
|
@@ -17,10 +17,6 @@ var _defaultTelemetryInternalData = require("../../../common/telemetry/defaultCo
|
|
|
17
17
|
|
|
18
18
|
var _defaultTelemetryConfiguration = require("../../../common/telemetry/defaultConfigs/defaultTelemetryConfiguration");
|
|
19
19
|
|
|
20
|
-
var _package = _interopRequireDefault(require("@microsoft/omnichannel-chat-sdk/package.json"));
|
|
21
|
-
|
|
22
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
-
|
|
24
20
|
const registerTelemetryLoggers = (props, dispatch) => {
|
|
25
21
|
var _props$liveChatContex, _props$liveChatContex2;
|
|
26
22
|
|
|
@@ -43,7 +39,9 @@ const registerTelemetryLoggers = (props, dispatch) => {
|
|
|
43
39
|
}
|
|
44
40
|
|
|
45
41
|
telemetryData = _TelemetryHelper.TelemetryHelper.addWidgetDataToTelemetry(telemetryConfig, telemetryData);
|
|
46
|
-
telemetryData.OCChatSDKVersion =
|
|
42
|
+
telemetryData.OCChatSDKVersion = telemetryConfig === null || telemetryConfig === void 0 ? void 0 : telemetryConfig.OCChatSDKVersion;
|
|
43
|
+
telemetryData.chatComponentVersion = telemetryConfig === null || telemetryConfig === void 0 ? void 0 : telemetryConfig.chatComponentVersion;
|
|
44
|
+
telemetryData.chatWidgetVersion = telemetryConfig === null || telemetryConfig === void 0 ? void 0 : telemetryConfig.chatWidgetVersion;
|
|
47
45
|
dispatch({
|
|
48
46
|
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_TELEMETRY_DATA,
|
|
49
47
|
payload: telemetryData
|
|
@@ -81,6 +81,10 @@ var _useChatContextStore = _interopRequireDefault(require("../../../hooks/useCha
|
|
|
81
81
|
|
|
82
82
|
var _useChatSDKStore = _interopRequireDefault(require("../../../hooks/useChatSDKStore"));
|
|
83
83
|
|
|
84
|
+
var _TelemetryConstants = require("../../../common/telemetry/TelemetryConstants");
|
|
85
|
+
|
|
86
|
+
var _disposeTelemetryLoggers = require("../common/disposeTelemetryLoggers");
|
|
87
|
+
|
|
84
88
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
85
89
|
|
|
86
90
|
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); }
|
|
@@ -194,11 +198,17 @@ const LiveChatWidgetStateful = props => {
|
|
|
194
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.bodyTitle, msg === null || msg === void 0 ? void 0 : (_msg$payload2 = msg.payload) === null || _msg$payload2 === void 0 ? void 0 : _msg$payload2.showPrechat, msg === null || msg === void 0 ? void 0 : (_msg$payload3 = msg.payload) === null || _msg$payload3 === void 0 ? void 0 : _msg$payload3.inNewWindow);
|
|
195
199
|
}
|
|
196
200
|
});
|
|
201
|
+
|
|
202
|
+
window.addEventListener("beforeunload", event => {
|
|
203
|
+
(0, _disposeTelemetryLoggers.disposeTelemetryLoggers)();
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
if (state.appStates.conversationEndedByAgent) {
|
|
207
|
+
(0, _endChat.endChat)(props, chatSDK, setAdapter, setWebChatStyles, dispatch, adapter);
|
|
208
|
+
}
|
|
197
209
|
}, []);
|
|
198
210
|
(0, _react2.useEffect)(() => {
|
|
199
|
-
|
|
200
|
-
canStartProactiveChat.current = false;
|
|
201
|
-
}
|
|
211
|
+
canStartProactiveChat.current = state.appStates.conversationState === _ConversationState.ConversationState.Closed;
|
|
202
212
|
|
|
203
213
|
if (state.appStates.conversationState === _ConversationState.ConversationState.Active) {
|
|
204
214
|
chatSDK === null || chatSDK === void 0 ? void 0 : chatSDK.onNewMessage(() => {
|
|
@@ -267,7 +277,7 @@ const LiveChatWidgetStateful = props => {
|
|
|
267
277
|
const confirmationPaneProps = (0, _initConfirmationPropsComposer.initConfirmationPropsComposer)(props); // publish chat widget state
|
|
268
278
|
|
|
269
279
|
const chatWidgetStateChangeEvent = {
|
|
270
|
-
eventName:
|
|
280
|
+
eventName: _TelemetryConstants.TelemetryEvent.ChatWidgetStateChanged,
|
|
271
281
|
payload: { ...state
|
|
272
282
|
}
|
|
273
283
|
};
|
|
@@ -35,4 +35,6 @@ exports.LiveChatWidgetActionType = LiveChatWidgetActionType;
|
|
|
35
35
|
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_TELEMETRY_DATA"] = 24] = "SET_TELEMETRY_DATA";
|
|
36
36
|
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_RECONNECT_ID"] = 25] = "SET_RECONNECT_ID";
|
|
37
37
|
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_UNREAD_MESSAGE_COUNT"] = 26] = "SET_UNREAD_MESSAGE_COUNT";
|
|
38
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_FOCUS_CHAT_BUTTON"] = 27] = "SET_FOCUS_CHAT_BUTTON";
|
|
39
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CONVERSATION_ENDED_BY_AGENT"] = 28] = "SET_CONVERSATION_ENDED_BY_AGENT";
|
|
38
40
|
})(LiveChatWidgetActionType || (exports.LiveChatWidgetActionType = LiveChatWidgetActionType = {}));
|
|
@@ -41,7 +41,8 @@ const getLiveChatWidgetContextInitialState = props => {
|
|
|
41
41
|
proactiveChatInNewWindow: false
|
|
42
42
|
},
|
|
43
43
|
e2vvEnabled: false,
|
|
44
|
-
unreadMessageCount: 0
|
|
44
|
+
unreadMessageCount: 0,
|
|
45
|
+
conversationEndedByAgent: false
|
|
45
46
|
},
|
|
46
47
|
uiStates: {
|
|
47
48
|
showConfirmationPane: false,
|
|
@@ -50,7 +51,8 @@ const getLiveChatWidgetContextInitialState = props => {
|
|
|
50
51
|
isIncomingCall: true,
|
|
51
52
|
disableVideoCall: true,
|
|
52
53
|
disableRemoteVideo: true,
|
|
53
|
-
disableSelfVideo: true
|
|
54
|
+
disableSelfVideo: true,
|
|
55
|
+
focusChatButton: false
|
|
54
56
|
}
|
|
55
57
|
};
|
|
56
58
|
return props.liveChatContextFromCache ?? LiveChatWidgetContextInitialState;
|
|
@@ -114,6 +114,13 @@ const createReducer = () => {
|
|
|
114
114
|
}
|
|
115
115
|
};
|
|
116
116
|
|
|
117
|
+
case _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_FOCUS_CHAT_BUTTON:
|
|
118
|
+
return { ...state,
|
|
119
|
+
uiStates: { ...state.uiStates,
|
|
120
|
+
focusChatButton: action.payload
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
|
|
117
124
|
case _LiveChatWidgetActionType.LiveChatWidgetActionType.DISABLE_VIDEO_CALL:
|
|
118
125
|
return { ...state,
|
|
119
126
|
uiStates: { ...state.uiStates,
|
|
@@ -210,6 +217,13 @@ const createReducer = () => {
|
|
|
210
217
|
}
|
|
211
218
|
};
|
|
212
219
|
|
|
220
|
+
case _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CONVERSATION_ENDED_BY_AGENT:
|
|
221
|
+
return { ...state,
|
|
222
|
+
appStates: { ...state.appStates,
|
|
223
|
+
conversationEndedByAgent: action.payload
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
|
|
213
227
|
default:
|
|
214
228
|
return state;
|
|
215
229
|
}
|
|
@@ -114,6 +114,7 @@ export let TelemetryEvent;
|
|
|
114
114
|
TelemetryEvent["ReconnectChatContinueConversation"] = "ReconnectChatContinueConversation";
|
|
115
115
|
TelemetryEvent["ReconnectChatStartNewConversation"] = "ReconnectChatStartNewConversation";
|
|
116
116
|
TelemetryEvent["ReconnectChatMinimize"] = "ReconnectChatMinimize";
|
|
117
|
+
TelemetryEvent["ChatWidgetStateChanged"] = "ChatWidgetStateChanged";
|
|
117
118
|
})(TelemetryEvent || (TelemetryEvent = {}));
|
|
118
119
|
|
|
119
120
|
export class TelemetryConstants {
|
|
@@ -98,6 +98,8 @@ export class TelemetryHelper {
|
|
|
98
98
|
static conformToLoadContract(level, input) {
|
|
99
99
|
const payload = input.payload;
|
|
100
100
|
return TelemetryHelper.populate(level, payload, event => {
|
|
101
|
+
var _TelemetryManager$Int11, _TelemetryManager$Int12, _TelemetryManager$Int13;
|
|
102
|
+
|
|
101
103
|
event.Event = payload.Event;
|
|
102
104
|
event.ResourcePath = payload.ResourcePath;
|
|
103
105
|
event.WidgetState = payload.WidgetState;
|
|
@@ -105,16 +107,19 @@ export class TelemetryHelper {
|
|
|
105
107
|
event.ChatType = payload.ChatType;
|
|
106
108
|
event.ElapsedTimeInMilliseconds = payload.ElapsedTimeInMilliseconds;
|
|
107
109
|
event.ExceptionDetails = JSON.stringify(payload.ExceptionDetails);
|
|
110
|
+
event.OCChatSDKVersion = ((_TelemetryManager$Int11 = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int11 === void 0 ? void 0 : _TelemetryManager$Int11.OCChatSDKVersion) ?? "";
|
|
111
|
+
event.OCChatWidgetVersion = ((_TelemetryManager$Int12 = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int12 === void 0 ? void 0 : _TelemetryManager$Int12.chatWidgetVersion) ?? "";
|
|
112
|
+
event.OCChatComponentsVersion = ((_TelemetryManager$Int13 = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int13 === void 0 ? void 0 : _TelemetryManager$Int13.chatComponentVersion) ?? "";
|
|
108
113
|
});
|
|
109
114
|
}
|
|
110
115
|
|
|
111
116
|
static conformToIC3ClientContract(level, input) {
|
|
112
117
|
const payload = input.payload;
|
|
113
118
|
return TelemetryHelper.populate(level, payload, event => {
|
|
114
|
-
var _TelemetryManager$
|
|
119
|
+
var _TelemetryManager$Int14;
|
|
115
120
|
|
|
116
121
|
event.Event = payload.Event;
|
|
117
|
-
event.IC3ClientVersion = (_TelemetryManager$
|
|
122
|
+
event.IC3ClientVersion = (_TelemetryManager$Int14 = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int14 === void 0 ? void 0 : _TelemetryManager$Int14.IC3ClientVersion;
|
|
118
123
|
event.SubscriptionId = payload.SubscriptionId;
|
|
119
124
|
event.EndpointUrl = payload.EndpointUrl;
|
|
120
125
|
event.EndpointId = payload.EndpointId;
|
|
@@ -233,14 +238,14 @@ _defineProperty(TelemetryHelper, "logActionEvent", (logLevel, payload) => {
|
|
|
233
238
|
});
|
|
234
239
|
|
|
235
240
|
_defineProperty(TelemetryHelper, "logSDKEvent", (logLevel, payload) => {
|
|
236
|
-
var _TelemetryManager$
|
|
241
|
+
var _TelemetryManager$Int15;
|
|
237
242
|
|
|
238
243
|
const telemetryEvent = {
|
|
239
244
|
eventName: (payload === null || payload === void 0 ? void 0 : payload.Event) ?? "",
|
|
240
245
|
logLevel: logLevel,
|
|
241
246
|
payload: { ...payload,
|
|
242
247
|
TransactionId: newGuid(),
|
|
243
|
-
RequestId: (_TelemetryManager$
|
|
248
|
+
RequestId: (_TelemetryManager$Int15 = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int15 === void 0 ? void 0 : _TelemetryManager$Int15.currentRequestId
|
|
244
249
|
}
|
|
245
250
|
};
|
|
246
251
|
BroadcastService.postMessage(telemetryEvent);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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
2
|
|
|
3
|
-
import { LogLevel, ScenarioType, TelemetryConstants } from "./TelemetryConstants";
|
|
3
|
+
import { LogLevel, ScenarioType, TelemetryConstants, TelemetryEvent } from "./TelemetryConstants";
|
|
4
4
|
import { BroadcastService } from "@microsoft/omnichannel-chat-components";
|
|
5
5
|
import { ariaTelemetryLogger } from "./loggers/ariaTelemetryLogger";
|
|
6
6
|
import { consoleLogger } from "./loggers/consoleLogger";
|
|
@@ -16,15 +16,19 @@ export class TelemetryManager {}
|
|
|
16
16
|
|
|
17
17
|
_defineProperty(TelemetryManager, "InternalTelemetryData", void 0);
|
|
18
18
|
|
|
19
|
+
const loggers = [];
|
|
20
|
+
export const disposeLoggers = () => {
|
|
21
|
+
loggers.map(logger => {
|
|
22
|
+
logger.dispose();
|
|
23
|
+
});
|
|
24
|
+
};
|
|
19
25
|
export const RegisterLoggers = () => {
|
|
20
|
-
const loggers = [];
|
|
21
|
-
|
|
22
26
|
const registerLoggers = () => {
|
|
23
27
|
var _TelemetryManager$Int, _TelemetryManager$Int2, _TelemetryManager$Int3, _TelemetryManager$Int4, _TelemetryManager$Int5, _TelemetryManager$Int6, _TelemetryManager$Int7, _TelemetryManager$Int8;
|
|
24
28
|
|
|
25
29
|
if (!((_TelemetryManager$Int = TelemetryManager.InternalTelemetryData) !== null && _TelemetryManager$Int !== void 0 && (_TelemetryManager$Int2 = _TelemetryManager$Int.telemetryConfig) !== null && _TelemetryManager$Int2 !== void 0 && _TelemetryManager$Int2.disableConsoleLog) || !((_TelemetryManager$Int3 = TelemetryManager.InternalTelemetryData) !== null && _TelemetryManager$Int3 !== void 0 && (_TelemetryManager$Int4 = _TelemetryManager$Int3.telemetryConfig) !== null && _TelemetryManager$Int4 !== void 0 && _TelemetryManager$Int4.telemetryDisabled)) {
|
|
26
30
|
BroadcastService.getAnyMessage().subscribe(event => {
|
|
27
|
-
if (event.payload) {
|
|
31
|
+
if (event.payload && event.eventName !== TelemetryEvent.ChatWidgetStateChanged) {
|
|
28
32
|
logTelemetry(event);
|
|
29
33
|
}
|
|
30
34
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const defaultAriaConfig = {
|
|
2
|
-
collectorUriForTelemetry: "
|
|
3
|
-
ariaTelemetryKey: "
|
|
4
|
-
ariaTelemetryApplicationName: "
|
|
2
|
+
collectorUriForTelemetry: "",
|
|
3
|
+
ariaTelemetryKey: "c7655518acf1403f93ff6b9f77942f0a-d01a02fd-6b50-4de3-a566-62eda11f93bc-7083",
|
|
4
|
+
ariaTelemetryApplicationName: "",
|
|
5
5
|
disableCookieUsage: true
|
|
6
6
|
};
|
|
@@ -17,7 +17,15 @@ export const ariaTelemetryLogger = (ariaTelemetryKey, disabledCookieUsage, colle
|
|
|
17
17
|
configuration.collectorUri = collectiorUriForTelemetry;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
try {
|
|
21
|
+
_logger = AWTLogManager.initialize(ariaTelemetryKey, configuration);
|
|
22
|
+
|
|
23
|
+
if (_logger === undefined) {
|
|
24
|
+
_logger = AWTLogManager.getLogger(ariaTelemetryKey);
|
|
25
|
+
}
|
|
26
|
+
} catch (error) {
|
|
27
|
+
console.log(error);
|
|
28
|
+
}
|
|
21
29
|
}
|
|
22
30
|
|
|
23
31
|
return _logger;
|
|
@@ -37,6 +45,11 @@ export const ariaTelemetryLogger = (ariaTelemetryKey, disabledCookieUsage, colle
|
|
|
37
45
|
|
|
38
46
|
eventProperties.setPropertyWithPii(ariaTelemetryApplicationName, Constants.LiveChatWidget, AWTPiiKind.GenericData);
|
|
39
47
|
logger() ? logger().logEvent(eventProperties) : console.log("Unable to initialize aria logger");
|
|
48
|
+
},
|
|
49
|
+
dispose: () => {
|
|
50
|
+
AWTLogManager.flush(function () {
|
|
51
|
+
console.log("Aria logger disposed");
|
|
52
|
+
});
|
|
40
53
|
}
|
|
41
54
|
};
|
|
42
55
|
return ariaLogger;
|
|
@@ -73,7 +73,15 @@ export const ChatButtonStateful = props => {
|
|
|
73
73
|
Event: TelemetryEvent.LCWChatButtonShow,
|
|
74
74
|
ElapsedTimeInMilliseconds: TelemetryTimers.LcwLoadToChatButtonTimer.milliSecondsElapsed
|
|
75
75
|
});
|
|
76
|
-
|
|
76
|
+
|
|
77
|
+
if (state.uiStates.focusChatButton) {
|
|
78
|
+
setFocusOnElement(document.getElementById((controlProps === null || controlProps === void 0 ? void 0 : controlProps.id) ?? "oc-lcw-chat-button"));
|
|
79
|
+
} else {
|
|
80
|
+
dispatch({
|
|
81
|
+
type: LiveChatWidgetActionType.SET_FOCUS_CHAT_BUTTON,
|
|
82
|
+
payload: true
|
|
83
|
+
});
|
|
84
|
+
}
|
|
77
85
|
}, []);
|
|
78
86
|
return /*#__PURE__*/React.createElement(ChatButton, {
|
|
79
87
|
componentOverrides: buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.componentOverrides,
|
|
@@ -7,8 +7,8 @@ import createAttachmentMiddleware from "../../../webchatcontainerstateful/webcha
|
|
|
7
7
|
import { createAvatarMiddleware } from "../../../webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/avatarMiddleware";
|
|
8
8
|
import { createMarkdown } from "../createMarkdown";
|
|
9
9
|
import { groupActivitiesMiddleware } from "../../../webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/groupActivitiesMiddleware";
|
|
10
|
-
import { typingIndicatorMiddleware } from "../../../webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/typingIndicatorMiddleware";
|
|
11
|
-
|
|
10
|
+
import { typingIndicatorMiddleware } from "../../../webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/typingIndicatorMiddleware";
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
12
12
|
export const dummyDefaultProps = {
|
|
13
13
|
audioNotificationProps: {
|
|
14
14
|
audioSrc: "assets/audios/newMessageNotification.mp3"
|
|
@@ -132,7 +132,7 @@ export const dummyDefaultProps = {
|
|
|
132
132
|
id: "oc-lcw-CurrentCall-timer",
|
|
133
133
|
showHours: false,
|
|
134
134
|
timerStyles: {
|
|
135
|
-
color: "
|
|
135
|
+
color: "#FFFFFF",
|
|
136
136
|
textAlign: "center",
|
|
137
137
|
backgroundColor: "#3d3c3c",
|
|
138
138
|
height: "45px",
|
|
@@ -163,8 +163,8 @@ export const dummyDefaultProps = {
|
|
|
163
163
|
},
|
|
164
164
|
audioCallButtonStyleProps: {
|
|
165
165
|
borderRadius: "50%",
|
|
166
|
-
color: "
|
|
167
|
-
backgroundColor: "
|
|
166
|
+
color: "#FFFFFF",
|
|
167
|
+
backgroundColor: "#008000",
|
|
168
168
|
lineHeight: "40px",
|
|
169
169
|
height: "40px",
|
|
170
170
|
width: "40px",
|
|
@@ -175,8 +175,8 @@ export const dummyDefaultProps = {
|
|
|
175
175
|
},
|
|
176
176
|
videoCallButtonStyleProps: {
|
|
177
177
|
borderRadius: "50%",
|
|
178
|
-
color: "
|
|
179
|
-
backgroundColor: "
|
|
178
|
+
color: "#FFFFFF",
|
|
179
|
+
backgroundColor: "#008000",
|
|
180
180
|
lineHeight: "40px",
|
|
181
181
|
height: "40px",
|
|
182
182
|
width: "40px",
|
|
@@ -191,8 +191,8 @@ export const dummyDefaultProps = {
|
|
|
191
191
|
},
|
|
192
192
|
declineCallButtonStyleProps: {
|
|
193
193
|
borderRadius: "50%",
|
|
194
|
-
color: "
|
|
195
|
-
backgroundColor: "
|
|
194
|
+
color: "#FFFFFF",
|
|
195
|
+
backgroundColor: "#DC0000",
|
|
196
196
|
lineHeight: "40px",
|
|
197
197
|
height: "40px",
|
|
198
198
|
width: "40px",
|
|
@@ -201,12 +201,12 @@ export const dummyDefaultProps = {
|
|
|
201
201
|
},
|
|
202
202
|
incomingCallTitleStyleProps: {
|
|
203
203
|
margin: "0 5px",
|
|
204
|
-
color: "
|
|
204
|
+
color: "#FFFFFF",
|
|
205
205
|
fontSize: 12,
|
|
206
206
|
fontFamily: "Segoe UI, Arial, sans-serif"
|
|
207
207
|
},
|
|
208
208
|
itemFocusStyleProps: {
|
|
209
|
-
outline: "2px solid
|
|
209
|
+
outline: "2px solid #FFFFFF"
|
|
210
210
|
}
|
|
211
211
|
},
|
|
212
212
|
currentCallStyleProps: {
|
|
@@ -218,7 +218,7 @@ export const dummyDefaultProps = {
|
|
|
218
218
|
},
|
|
219
219
|
micButtonStyleProps: {
|
|
220
220
|
borderRadius: "2px",
|
|
221
|
-
color: "
|
|
221
|
+
color: "#FFFFFF",
|
|
222
222
|
backgroundColor: "#3d3c3c",
|
|
223
223
|
height: "45px",
|
|
224
224
|
width: "50px",
|
|
@@ -229,7 +229,7 @@ export const dummyDefaultProps = {
|
|
|
229
229
|
},
|
|
230
230
|
videoOffButtonStyleProps: {
|
|
231
231
|
borderRadius: "2px",
|
|
232
|
-
color: "
|
|
232
|
+
color: "#FFFFFF",
|
|
233
233
|
backgroundColor: "#3d3c3c",
|
|
234
234
|
height: "45px",
|
|
235
235
|
width: "50px",
|
|
@@ -243,8 +243,8 @@ export const dummyDefaultProps = {
|
|
|
243
243
|
},
|
|
244
244
|
endCallButtonStyleProps: {
|
|
245
245
|
borderRadius: "2px",
|
|
246
|
-
color: "
|
|
247
|
-
backgroundColor: "
|
|
246
|
+
color: "#FFFFFF",
|
|
247
|
+
backgroundColor: "#DC0000",
|
|
248
248
|
lineHeight: "50px",
|
|
249
249
|
height: "45px",
|
|
250
250
|
width: "50px",
|
|
@@ -253,7 +253,7 @@ export const dummyDefaultProps = {
|
|
|
253
253
|
currentCallTimerStyleProps: {
|
|
254
254
|
borderRadius: "2px",
|
|
255
255
|
margin: "1px",
|
|
256
|
-
color: "
|
|
256
|
+
color: "#FFFFFF",
|
|
257
257
|
paddingTop: "18px",
|
|
258
258
|
fontSize: 12,
|
|
259
259
|
fontFamily: "Segoe UI, Arial, sans-serif",
|
|
@@ -475,7 +475,7 @@ export const dummyDefaultProps = {
|
|
|
475
475
|
},
|
|
476
476
|
styleProps: {
|
|
477
477
|
generalStyleProps: {
|
|
478
|
-
backgroundColor: "
|
|
478
|
+
backgroundColor: "#FFFFFF",
|
|
479
479
|
borderRadius: "2px",
|
|
480
480
|
color: "black",
|
|
481
481
|
fontFamily: "Segoe UI, Arial, sans-serif",
|
|
@@ -517,7 +517,7 @@ export const dummyDefaultProps = {
|
|
|
517
517
|
},
|
|
518
518
|
confirmButtonStyleProps: {
|
|
519
519
|
backgroundColor: "rgba(9,72,159,1)",
|
|
520
|
-
color: "
|
|
520
|
+
color: "#FFFFFF",
|
|
521
521
|
fontFamily: "Segoe UI, Arial, sans-serif",
|
|
522
522
|
fontSize: "14px",
|
|
523
523
|
fontWeight: "500",
|
|
@@ -531,7 +531,7 @@ export const dummyDefaultProps = {
|
|
|
531
531
|
border: "2px dotted #000"
|
|
532
532
|
},
|
|
533
533
|
cancelButtonStyleProps: {
|
|
534
|
-
backgroundColor: "
|
|
534
|
+
backgroundColor: "#FFFFFF",
|
|
535
535
|
fontFamily: "Segoe UI, Arial, sans-serif",
|
|
536
536
|
fontSize: "14px",
|
|
537
537
|
fontWeight: "500",
|
|
@@ -916,16 +916,16 @@ export const dummyDefaultProps = {
|
|
|
916
916
|
fontSize: 16,
|
|
917
917
|
fontFamily: "Segoe UI, Arial, sans-serif",
|
|
918
918
|
fontWeight: "450",
|
|
919
|
-
color: "
|
|
919
|
+
color: "#FFFFFF",
|
|
920
920
|
padding: "3px 0"
|
|
921
921
|
},
|
|
922
922
|
minimizeButtonStyleProps: {
|
|
923
|
-
color: "
|
|
923
|
+
color: "#FFFFFF",
|
|
924
924
|
margin: "5px 0",
|
|
925
925
|
fontSize: "12px"
|
|
926
926
|
},
|
|
927
927
|
closeButtonStyleProps: {
|
|
928
|
-
color: "
|
|
928
|
+
color: "#FFFFFF",
|
|
929
929
|
margin: "5px 0",
|
|
930
930
|
fontSize: "12px"
|
|
931
931
|
},
|
|
@@ -1087,7 +1087,7 @@ export const dummyDefaultProps = {
|
|
|
1087
1087
|
titleStyleProps: {
|
|
1088
1088
|
// ...[Existing chat button title style props]
|
|
1089
1089
|
margin: "0 0 0 10px",
|
|
1090
|
-
color: "
|
|
1090
|
+
color: "#FFFFFF"
|
|
1091
1091
|
}
|
|
1092
1092
|
}
|
|
1093
1093
|
},
|
|
@@ -1453,7 +1453,7 @@ export const dummyDefaultProps = {
|
|
|
1453
1453
|
bubbleBackground: "#315FA2",
|
|
1454
1454
|
bubbleBorderRadius: 4,
|
|
1455
1455
|
bubbleBorderWidth: 0,
|
|
1456
|
-
bubbleFromUserBackground: "
|
|
1456
|
+
bubbleFromUserBackground: "#FFFFFF",
|
|
1457
1457
|
bubbleFromUserBorderRadius: 4,
|
|
1458
1458
|
bubbleFromUserBorderWidth: 1,
|
|
1459
1459
|
bubbleFromUserTextColor: "Black",
|
|
@@ -1461,7 +1461,7 @@ export const dummyDefaultProps = {
|
|
|
1461
1461
|
bubbleMaxWidth: 250,
|
|
1462
1462
|
bubbleMinHeight: 34,
|
|
1463
1463
|
bubbleMinWidth: 20,
|
|
1464
|
-
bubbleTextColor: "
|
|
1464
|
+
bubbleTextColor: "#FFFFFF",
|
|
1465
1465
|
hideSendBox: false,
|
|
1466
1466
|
hideUploadButton: true,
|
|
1467
1467
|
primaryFont: "Segoe UI, Arial, sans-serif",
|
|
@@ -1470,7 +1470,7 @@ export const dummyDefaultProps = {
|
|
|
1470
1470
|
sendBoxTextWrap: true,
|
|
1471
1471
|
sendBoxHeight: 60,
|
|
1472
1472
|
sendBoxMaxHeight: 96,
|
|
1473
|
-
sendBoxBackground: "
|
|
1473
|
+
sendBoxBackground: "#FFFFFF",
|
|
1474
1474
|
showAvatarInGroup: true,
|
|
1475
1475
|
suggestedActionsStackedHeight: 125,
|
|
1476
1476
|
suggestedActionsStackedOverflow: "scroll",
|
|
@@ -1581,7 +1581,7 @@ export const dummyDefaultProps = {
|
|
|
1581
1581
|
fontWeight: 600,
|
|
1582
1582
|
fontSize: "13px",
|
|
1583
1583
|
lineHeight: "18px",
|
|
1584
|
-
color: "
|
|
1584
|
+
color: "#FFFFFF",
|
|
1585
1585
|
paddingTop: "7px",
|
|
1586
1586
|
WebkitUserSelect: "none",
|
|
1587
1587
|
MozUserSelect: "none",
|
|
@@ -1685,5 +1685,6 @@ export const dummyDefaultProps = {
|
|
|
1685
1685
|
PRECHAT_REQUIRED_FIELD_MISSING_MESSAGE: "{0} field is required",
|
|
1686
1686
|
MARKDOWN_EXTERNAL_LINK_ALT: "Opens in a new window; external."
|
|
1687
1687
|
}
|
|
1688
|
-
}
|
|
1688
|
+
},
|
|
1689
|
+
telemetryConfig: undefined
|
|
1689
1690
|
};
|
|
@@ -26,6 +26,10 @@ export const endChat = async (props, chatSDK, setAdapter, setWebChatStyles, disp
|
|
|
26
26
|
type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
27
27
|
payload: ConversationState.Closed
|
|
28
28
|
});
|
|
29
|
+
dispatch({
|
|
30
|
+
type: LiveChatWidgetActionType.SET_CONVERSATION_ENDED_BY_AGENT,
|
|
31
|
+
payload: false
|
|
32
|
+
});
|
|
29
33
|
dispatch({
|
|
30
34
|
type: LiveChatWidgetActionType.SET_RECONNECT_ID,
|
|
31
35
|
payload: undefined
|
|
@@ -63,6 +63,11 @@ export const initWebChatComposer = (props, chatSDK, state, dispatch, setWebChatS
|
|
|
63
63
|
payload: ConversationState.Loading
|
|
64
64
|
});
|
|
65
65
|
await setPostChatContextAndLoadSurvey(chatSDK, dispatch, true);
|
|
66
|
+
} else {
|
|
67
|
+
dispatch({
|
|
68
|
+
type: LiveChatWidgetActionType.SET_CONVERSATION_ENDED_BY_AGENT,
|
|
69
|
+
payload: true
|
|
70
|
+
});
|
|
66
71
|
}
|
|
67
72
|
|
|
68
73
|
dispatch({
|
|
@@ -4,7 +4,6 @@ import { TelemetryHelper } from "../../../common/telemetry/TelemetryHelper";
|
|
|
4
4
|
import { defaultAriaConfig } from "../../../common/telemetry/defaultConfigs/defaultAriaConfig";
|
|
5
5
|
import { defaultInternalTelemetryData } from "../../../common/telemetry/defaultConfigs/defaultTelemetryInternalData";
|
|
6
6
|
import { defaultTelemetryConfiguration } from "../../../common/telemetry/defaultConfigs/defaultTelemetryConfiguration";
|
|
7
|
-
import packageInfo from "@microsoft/omnichannel-chat-sdk/package.json";
|
|
8
7
|
export const registerTelemetryLoggers = (props, dispatch) => {
|
|
9
8
|
var _props$liveChatContex, _props$liveChatContex2;
|
|
10
9
|
|
|
@@ -27,7 +26,9 @@ export const registerTelemetryLoggers = (props, dispatch) => {
|
|
|
27
26
|
}
|
|
28
27
|
|
|
29
28
|
telemetryData = TelemetryHelper.addWidgetDataToTelemetry(telemetryConfig, telemetryData);
|
|
30
|
-
telemetryData.OCChatSDKVersion =
|
|
29
|
+
telemetryData.OCChatSDKVersion = telemetryConfig === null || telemetryConfig === void 0 ? void 0 : telemetryConfig.OCChatSDKVersion;
|
|
30
|
+
telemetryData.chatComponentVersion = telemetryConfig === null || telemetryConfig === void 0 ? void 0 : telemetryConfig.chatComponentVersion;
|
|
31
|
+
telemetryData.chatWidgetVersion = telemetryConfig === null || telemetryConfig === void 0 ? void 0 : telemetryConfig.chatWidgetVersion;
|
|
31
32
|
dispatch({
|
|
32
33
|
type: LiveChatWidgetActionType.SET_TELEMETRY_DATA,
|
|
33
34
|
payload: telemetryData
|
|
@@ -39,6 +39,8 @@ import { startProactiveChat } from "../common/startProactiveChat";
|
|
|
39
39
|
import useChatAdapterStore from "../../../hooks/useChatAdapterStore";
|
|
40
40
|
import useChatContextStore from "../../../hooks/useChatContextStore";
|
|
41
41
|
import useChatSDKStore from "../../../hooks/useChatSDKStore";
|
|
42
|
+
import { TelemetryEvent } from "../../../common/telemetry/TelemetryConstants";
|
|
43
|
+
import { disposeTelemetryLoggers } from "../common/disposeTelemetryLoggers";
|
|
42
44
|
export const LiveChatWidgetStateful = props => {
|
|
43
45
|
var _props$webChatContain, _props$styleProps, _props$controlProps, _props$webChatContain3, _props$webChatContain4, _props$styleProps2, _props$controlProps5, _props$componentOverr, _props$controlProps6, _props$componentOverr2, _props$controlProps7, _props$componentOverr3, _props$controlProps8, _props$componentOverr4, _props$controlProps9, _props$componentOverr5, _props$controlProps10, _props$componentOverr6, _props$controlProps11, _props$controlProps12, _props$controlProps13, _props$componentOverr7, _props$controlProps14, _props$componentOverr8, _props$controlProps15, _props$componentOverr9, _props$componentOverr10, _props$componentOverr11;
|
|
44
46
|
|
|
@@ -144,11 +146,16 @@ export const LiveChatWidgetStateful = props => {
|
|
|
144
146
|
startProactiveChat(dispatch, msg === null || msg === void 0 ? void 0 : (_msg$payload = msg.payload) === null || _msg$payload === void 0 ? void 0 : _msg$payload.bodyTitle, msg === null || msg === void 0 ? void 0 : (_msg$payload2 = msg.payload) === null || _msg$payload2 === void 0 ? void 0 : _msg$payload2.showPrechat, msg === null || msg === void 0 ? void 0 : (_msg$payload3 = msg.payload) === null || _msg$payload3 === void 0 ? void 0 : _msg$payload3.inNewWindow);
|
|
145
147
|
}
|
|
146
148
|
});
|
|
149
|
+
window.addEventListener("beforeunload", event => {
|
|
150
|
+
disposeTelemetryLoggers();
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
if (state.appStates.conversationEndedByAgent) {
|
|
154
|
+
endChat(props, chatSDK, setAdapter, setWebChatStyles, dispatch, adapter);
|
|
155
|
+
}
|
|
147
156
|
}, []);
|
|
148
157
|
useEffect(() => {
|
|
149
|
-
|
|
150
|
-
canStartProactiveChat.current = false;
|
|
151
|
-
}
|
|
158
|
+
canStartProactiveChat.current = state.appStates.conversationState === ConversationState.Closed;
|
|
152
159
|
|
|
153
160
|
if (state.appStates.conversationState === ConversationState.Active) {
|
|
154
161
|
chatSDK === null || chatSDK === void 0 ? void 0 : chatSDK.onNewMessage(() => {
|
|
@@ -215,7 +222,7 @@ export const LiveChatWidgetStateful = props => {
|
|
|
215
222
|
const confirmationPaneProps = initConfirmationPropsComposer(props); // publish chat widget state
|
|
216
223
|
|
|
217
224
|
const chatWidgetStateChangeEvent = {
|
|
218
|
-
eventName:
|
|
225
|
+
eventName: TelemetryEvent.ChatWidgetStateChanged,
|
|
219
226
|
payload: { ...state
|
|
220
227
|
}
|
|
221
228
|
};
|
|
@@ -28,4 +28,6 @@ export let LiveChatWidgetActionType;
|
|
|
28
28
|
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_TELEMETRY_DATA"] = 24] = "SET_TELEMETRY_DATA";
|
|
29
29
|
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_RECONNECT_ID"] = 25] = "SET_RECONNECT_ID";
|
|
30
30
|
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_UNREAD_MESSAGE_COUNT"] = 26] = "SET_UNREAD_MESSAGE_COUNT";
|
|
31
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_FOCUS_CHAT_BUTTON"] = 27] = "SET_FOCUS_CHAT_BUTTON";
|
|
32
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CONVERSATION_ENDED_BY_AGENT"] = 28] = "SET_CONVERSATION_ENDED_BY_AGENT";
|
|
31
33
|
})(LiveChatWidgetActionType || (LiveChatWidgetActionType = {}));
|
|
@@ -32,7 +32,8 @@ export const getLiveChatWidgetContextInitialState = props => {
|
|
|
32
32
|
proactiveChatInNewWindow: false
|
|
33
33
|
},
|
|
34
34
|
e2vvEnabled: false,
|
|
35
|
-
unreadMessageCount: 0
|
|
35
|
+
unreadMessageCount: 0,
|
|
36
|
+
conversationEndedByAgent: false
|
|
36
37
|
},
|
|
37
38
|
uiStates: {
|
|
38
39
|
showConfirmationPane: false,
|
|
@@ -41,7 +42,8 @@ export const getLiveChatWidgetContextInitialState = props => {
|
|
|
41
42
|
isIncomingCall: true,
|
|
42
43
|
disableVideoCall: true,
|
|
43
44
|
disableRemoteVideo: true,
|
|
44
|
-
disableSelfVideo: true
|
|
45
|
+
disableSelfVideo: true,
|
|
46
|
+
focusChatButton: false
|
|
45
47
|
}
|
|
46
48
|
};
|
|
47
49
|
return props.liveChatContextFromCache ?? LiveChatWidgetContextInitialState;
|
|
@@ -105,6 +105,13 @@ export const createReducer = () => {
|
|
|
105
105
|
}
|
|
106
106
|
};
|
|
107
107
|
|
|
108
|
+
case LiveChatWidgetActionType.SET_FOCUS_CHAT_BUTTON:
|
|
109
|
+
return { ...state,
|
|
110
|
+
uiStates: { ...state.uiStates,
|
|
111
|
+
focusChatButton: action.payload
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
|
|
108
115
|
case LiveChatWidgetActionType.DISABLE_VIDEO_CALL:
|
|
109
116
|
return { ...state,
|
|
110
117
|
uiStates: { ...state.uiStates,
|
|
@@ -201,6 +208,13 @@ export const createReducer = () => {
|
|
|
201
208
|
}
|
|
202
209
|
};
|
|
203
210
|
|
|
211
|
+
case LiveChatWidgetActionType.SET_CONVERSATION_ENDED_BY_AGENT:
|
|
212
|
+
return { ...state,
|
|
213
|
+
appStates: { ...state.appStates,
|
|
214
|
+
conversationEndedByAgent: action.payload
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
|
|
204
218
|
default:
|
|
205
219
|
return state;
|
|
206
220
|
}
|
|
@@ -106,7 +106,8 @@ export declare enum TelemetryEvent {
|
|
|
106
106
|
ProactiveChatClosed = "ProactiveChatClosed",
|
|
107
107
|
ReconnectChatContinueConversation = "ReconnectChatContinueConversation",
|
|
108
108
|
ReconnectChatStartNewConversation = "ReconnectChatStartNewConversation",
|
|
109
|
-
ReconnectChatMinimize = "ReconnectChatMinimize"
|
|
109
|
+
ReconnectChatMinimize = "ReconnectChatMinimize",
|
|
110
|
+
ChatWidgetStateChanged = "ChatWidgetStateChanged"
|
|
110
111
|
}
|
|
111
112
|
export interface TelemetryInput {
|
|
112
113
|
scenarioType: ScenarioType;
|
|
@@ -24,6 +24,9 @@ export interface LoadContract extends BaseContract {
|
|
|
24
24
|
WidgetState?: string;
|
|
25
25
|
ChatState?: string;
|
|
26
26
|
ChatType?: string;
|
|
27
|
+
OCChatSDKVersion: string;
|
|
28
|
+
OCChatWidgetVersion: string;
|
|
29
|
+
OCChatComponentsVersion: string;
|
|
27
30
|
}
|
|
28
31
|
export interface ActionsContract extends BaseContract {
|
|
29
32
|
Event?: string;
|
|
@@ -16,6 +16,9 @@ export interface LoadTelemetryData {
|
|
|
16
16
|
ChatState?: string;
|
|
17
17
|
ChatType?: string;
|
|
18
18
|
ExceptionDetails?: object;
|
|
19
|
+
OCChatSDKVersion?: string;
|
|
20
|
+
OCChatWidgetVersion?: string;
|
|
21
|
+
OCChatComponentsVersion?: string;
|
|
19
22
|
}
|
|
20
23
|
export interface MessageProcessingErrorData {
|
|
21
24
|
Event: string;
|
|
@@ -29,4 +29,16 @@ export interface ITelemetryConfig {
|
|
|
29
29
|
* custom loggers list
|
|
30
30
|
*/
|
|
31
31
|
telemetryLoggers?: IChatSDKLogger[];
|
|
32
|
+
/**
|
|
33
|
+
* Omnichannel chat widget version
|
|
34
|
+
*/
|
|
35
|
+
chatWidgetVersion?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Omnichannel chat components version
|
|
38
|
+
*/
|
|
39
|
+
chatComponentVersion?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Omnichannel Chat SDK Version
|
|
42
|
+
*/
|
|
43
|
+
OCChatSDKVersion?: string;
|
|
32
44
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const disposeTelemetryLoggers: () => void;
|
|
@@ -44,7 +44,7 @@ export interface ILiveChatWidgetProps {
|
|
|
44
44
|
proactiveChatPaneProps?: IProactiveChatPaneStatefulProps;
|
|
45
45
|
reconnectChatPaneProps?: IReconnectChatPaneStatefulProps;
|
|
46
46
|
styleProps?: ILiveChatWidgetStyleProps;
|
|
47
|
-
telemetryConfig
|
|
47
|
+
telemetryConfig: ITelemetryConfig;
|
|
48
48
|
webChatContainerProps?: IWebChatContainerStatefulProps;
|
|
49
49
|
liveChatContextFromCache?: ILiveChatWidgetContext;
|
|
50
50
|
}
|
|
@@ -33,6 +33,7 @@ export interface ILiveChatWidgetContext {
|
|
|
33
33
|
};
|
|
34
34
|
e2vvEnabled: boolean;
|
|
35
35
|
unreadMessageCount: number;
|
|
36
|
+
conversationEndedByAgent: boolean;
|
|
36
37
|
};
|
|
37
38
|
uiStates: {
|
|
38
39
|
showConfirmationPane: boolean;
|
|
@@ -42,5 +43,6 @@ export interface ILiveChatWidgetContext {
|
|
|
42
43
|
disableRemoteVideo: boolean;
|
|
43
44
|
disableSelfVideo: boolean;
|
|
44
45
|
isIncomingCall: boolean;
|
|
46
|
+
focusChatButton: boolean;
|
|
45
47
|
};
|
|
46
48
|
}
|
|
@@ -25,5 +25,7 @@ export declare enum LiveChatWidgetActionType {
|
|
|
25
25
|
SET_PROACTIVE_CHAT_PARAMS = 23,
|
|
26
26
|
SET_TELEMETRY_DATA = 24,
|
|
27
27
|
SET_RECONNECT_ID = 25,
|
|
28
|
-
SET_UNREAD_MESSAGE_COUNT = 26
|
|
28
|
+
SET_UNREAD_MESSAGE_COUNT = 26,
|
|
29
|
+
SET_FOCUS_CHAT_BUTTON = 27,
|
|
30
|
+
SET_CONVERSATION_ENDED_BY_AGENT = 28
|
|
29
31
|
}
|