@microsoft/omnichannel-chat-widget 0.1.0-main.47ede4d → 0.1.0-main.72620c9
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/Constants.js +32 -4
- package/lib/cjs/common/telemetry/TelemetryConstants.js +13 -1
- package/lib/cjs/common/telemetry/TelemetryHelper.js +13 -0
- package/lib/cjs/common/telemetry/TelemetryManager.js +4 -1
- package/lib/cjs/common/telemetry/defaultConfigs/defaultTelemetryConfiguration.js +4 -1
- package/lib/cjs/common/telemetry/loggers/ariaTelemetryLogger.js +31 -10
- package/lib/cjs/common/utils.js +15 -2
- package/lib/cjs/components/confirmationpanestateful/ConfirmationPaneStateful.js +4 -39
- package/lib/cjs/components/footerstateful/FooterStateful.js +1 -2
- package/lib/cjs/components/headerstateful/HeaderStateful.js +1 -7
- package/lib/cjs/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +5 -2
- package/lib/cjs/components/livechatwidget/common/endChat.js +37 -1
- package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +3 -0
- package/lib/cjs/components/livechatwidget/common/reconnectChatHelper.js +105 -20
- package/lib/cjs/components/livechatwidget/common/registerTelemetryLoggers.js +3 -15
- package/lib/cjs/components/livechatwidget/common/startChat.js +38 -29
- package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +57 -15
- package/lib/cjs/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +8 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.js +44 -0
- package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +15 -16
- package/lib/cjs/contexts/createReducer.js +0 -7
- package/lib/esm/common/Constants.js +28 -3
- package/lib/esm/common/telemetry/TelemetryConstants.js +13 -1
- package/lib/esm/common/telemetry/TelemetryHelper.js +13 -1
- package/lib/esm/common/telemetry/TelemetryManager.js +4 -1
- package/lib/esm/common/telemetry/defaultConfigs/defaultTelemetryConfiguration.js +4 -1
- package/lib/esm/common/telemetry/loggers/ariaTelemetryLogger.js +33 -13
- package/lib/esm/common/utils.js +11 -1
- package/lib/esm/components/confirmationpanestateful/ConfirmationPaneStateful.js +7 -37
- package/lib/esm/components/footerstateful/FooterStateful.js +1 -2
- package/lib/esm/components/headerstateful/HeaderStateful.js +1 -7
- package/lib/esm/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +5 -3
- package/lib/esm/components/livechatwidget/common/endChat.js +37 -3
- package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +2 -0
- package/lib/esm/components/livechatwidget/common/reconnectChatHelper.js +94 -20
- package/lib/esm/components/livechatwidget/common/registerTelemetryLoggers.js +3 -13
- package/lib/esm/components/livechatwidget/common/startChat.js +39 -30
- package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +55 -17
- package/lib/esm/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +6 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.js +31 -0
- package/lib/esm/contexts/common/LiveChatWidgetActionType.js +15 -16
- package/lib/esm/contexts/createReducer.js +0 -7
- package/lib/types/common/Constants.d.ts +16 -1
- package/lib/types/common/interfaces/IContextDataStore.d.ts +1 -1
- package/lib/types/common/telemetry/TelemetryConstants.d.ts +9 -2
- package/lib/types/common/telemetry/TelemetryHelper.d.ts +1 -0
- package/lib/types/common/telemetry/interfaces/ITelemetryConfig.d.ts +3 -3
- package/lib/types/common/utils.d.ts +1 -0
- package/lib/types/components/confirmationpanestateful/interfaces/IConfirmationPaneStatefulParams.d.ts +4 -4
- package/lib/types/components/footerstateful/audionotificationstateful/interfaces/IAudioNotificationStatefulParams.d.ts +0 -1
- package/lib/types/components/livechatwidget/common/endChat.d.ts +4 -1
- package/lib/types/components/livechatwidget/common/reconnectChatHelper.d.ts +5 -2
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetComponentOverrides.d.ts +1 -0
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +1 -1
- package/lib/types/components/reconnectchatpanestateful/interfaces/IReconnectChatPaneStatefulProps.d.ts +1 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.d.ts +1 -0
- package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +15 -16
- package/package.json +6 -7
|
@@ -5,7 +5,7 @@ import { BroadcastService, decodeComponentString } from "@microsoft/omnichannel-
|
|
|
5
5
|
import { Stack } from "@fluentui/react";
|
|
6
6
|
import React, { useEffect, useRef, useState } from "react";
|
|
7
7
|
import { createTimer, getLocaleDirection } from "../../../common/utils";
|
|
8
|
-
import { getReconnectIdForAuthenticatedChat, handleUnauthenticatedReconnectChat } from "../common/reconnectChatHelper";
|
|
8
|
+
import { getReconnectIdForAuthenticatedChat, handleUnauthenticatedReconnectChat, startUnauthenticatedReconnectChat } from "../common/reconnectChatHelper";
|
|
9
9
|
import { initStartChat, prepareStartChat } from "../common/startChat";
|
|
10
10
|
import { shouldShowCallingContainer, shouldShowChatButton, shouldShowConfirmationPane, shouldShowEmailTranscriptPane, shouldShowHeader, shouldShowLoadingPane, shouldShowOutOfOfficeHoursPane, shouldShowPostChatLoadingPane, shouldShowPostChatSurveyPane, shouldShowPreChatSurveyPane, shouldShowProactiveChatPane, shouldShowReconnectChatPane, shouldShowWebChatContainer } from "../../../controller/componentController";
|
|
11
11
|
import CallingContainerStateful from "../../callingcontainerstateful/CallingContainerStateful";
|
|
@@ -32,7 +32,7 @@ import { createFooter } from "../common/createFooter";
|
|
|
32
32
|
import { createInternetConnectionChangeHandler } from "../common/createInternetConnectionChangeHandler";
|
|
33
33
|
import { defaultWebChatContainerStatefulProps } from "../../webchatcontainerstateful/common/defaultProps/defaultWebChatContainerStatefulProps";
|
|
34
34
|
import { disposeTelemetryLoggers } from "../common/disposeTelemetryLoggers";
|
|
35
|
-
import { endChat } from "../common/endChat";
|
|
35
|
+
import { endChat, prepareEndChat } from "../common/endChat";
|
|
36
36
|
import { getGeneralStylesForButton } from "../common/getGeneralStylesForButton";
|
|
37
37
|
import { initCallingSdk } from "../common/initCallingSdk";
|
|
38
38
|
import { initConfirmationPropsComposer } from "../common/initConfirmationPropsComposer";
|
|
@@ -44,7 +44,7 @@ import useChatAdapterStore from "../../../hooks/useChatAdapterStore";
|
|
|
44
44
|
import useChatContextStore from "../../../hooks/useChatContextStore";
|
|
45
45
|
import useChatSDKStore from "../../../hooks/useChatSDKStore";
|
|
46
46
|
export const LiveChatWidgetStateful = props => {
|
|
47
|
-
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$
|
|
47
|
+
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$componentOverr7, _props$controlProps12, _props$controlProps13, _props$componentOverr8, _props$controlProps14, _props$componentOverr9, _props$controlProps15, _props$componentOverr10, _props$componentOverr11, _props$componentOverr12;
|
|
48
48
|
|
|
49
49
|
const [state, dispatch] = useChatContextStore(); // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
50
50
|
|
|
@@ -58,7 +58,8 @@ export const LiveChatWidgetStateful = props => {
|
|
|
58
58
|
const {
|
|
59
59
|
Composer
|
|
60
60
|
} = Components;
|
|
61
|
-
const canStartProactiveChat = useRef(true);
|
|
61
|
+
const canStartProactiveChat = useRef(true);
|
|
62
|
+
const canEndChat = useRef(true); // Process general styles
|
|
62
63
|
|
|
63
64
|
const generalStyles = {
|
|
64
65
|
root: Object.assign({}, getGeneralStylesForButton(state), (_props$styleProps = props.styleProps) === null || _props$styleProps === void 0 ? void 0 : _props$styleProps.generalStyles)
|
|
@@ -90,7 +91,7 @@ export const LiveChatWidgetStateful = props => {
|
|
|
90
91
|
if (!((_props$controlProps3 = props.controlProps) !== null && _props$controlProps3 !== void 0 && _props$controlProps3.skipChatButtonRendering) && (_props$reconnectChatP = props.reconnectChatPaneProps) !== null && _props$reconnectChatP !== void 0 && _props$reconnectChatP.reconnectId) {
|
|
91
92
|
var _props$reconnectChatP2;
|
|
92
93
|
|
|
93
|
-
|
|
94
|
+
startUnauthenticatedReconnectChat(chatSDK, dispatch, setAdapter, (_props$reconnectChatP2 = props.reconnectChatPaneProps) === null || _props$reconnectChatP2 === void 0 ? void 0 : _props$reconnectChatP2.reconnectId, initStartChat);
|
|
94
95
|
} // Initialize global dir
|
|
95
96
|
|
|
96
97
|
|
|
@@ -100,13 +101,11 @@ export const LiveChatWidgetStateful = props => {
|
|
|
100
101
|
payload: globalDir
|
|
101
102
|
});
|
|
102
103
|
|
|
103
|
-
if ((_state$domainStates = state.domainStates) !== null && _state$domainStates !== void 0 && _state$domainStates.
|
|
104
|
+
if ((_state$domainStates = state.domainStates) !== null && _state$domainStates !== void 0 && _state$domainStates.liveChatContext) {
|
|
104
105
|
var _state$domainStates2;
|
|
105
106
|
|
|
106
107
|
const optionalParams = {
|
|
107
|
-
liveChatContext:
|
|
108
|
-
chatToken: (_state$domainStates2 = state.domainStates) === null || _state$domainStates2 === void 0 ? void 0 : _state$domainStates2.chatToken
|
|
109
|
-
}
|
|
108
|
+
liveChatContext: (_state$domainStates2 = state.domainStates) === null || _state$domainStates2 === void 0 ? void 0 : _state$domainStates2.liveChatContext
|
|
110
109
|
};
|
|
111
110
|
initStartChat(chatSDK, dispatch, setAdapter, optionalParams);
|
|
112
111
|
}
|
|
@@ -116,9 +115,9 @@ export const LiveChatWidgetStateful = props => {
|
|
|
116
115
|
var _props$reconnectChatP3;
|
|
117
116
|
|
|
118
117
|
if ((_props$reconnectChatP3 = props.reconnectChatPaneProps) !== null && _props$reconnectChatP3 !== void 0 && _props$reconnectChatP3.reconnectId && !state.appStates.reconnectId) {
|
|
119
|
-
var _props$reconnectChatP4;
|
|
118
|
+
var _props$reconnectChatP4, _props$reconnectChatP5;
|
|
120
119
|
|
|
121
|
-
handleUnauthenticatedReconnectChat(dispatch, (_props$reconnectChatP4 = props.reconnectChatPaneProps) === null || _props$reconnectChatP4 === void 0 ? void 0 : _props$reconnectChatP4.reconnectId, initStartChat);
|
|
120
|
+
handleUnauthenticatedReconnectChat(chatSDK, dispatch, setAdapter, (_props$reconnectChatP4 = props.reconnectChatPaneProps) === null || _props$reconnectChatP4 === void 0 ? void 0 : _props$reconnectChatP4.reconnectId, initStartChat, (_props$reconnectChatP5 = props.reconnectChatPaneProps) === null || _props$reconnectChatP5 === void 0 ? void 0 : _props$reconnectChatP5.redirectInSameWindow);
|
|
122
121
|
} else {
|
|
123
122
|
getReconnectIdForAuthenticatedChat(props, chatSDK).then(authReconnectId => {
|
|
124
123
|
if (authReconnectId && !state.appStates.reconnectId) {
|
|
@@ -131,6 +130,10 @@ export const LiveChatWidgetStateful = props => {
|
|
|
131
130
|
payload: ConversationState.ReconnectChat
|
|
132
131
|
});
|
|
133
132
|
} else {
|
|
133
|
+
const chatStartedSkippingChatButtonRendering = {
|
|
134
|
+
eventName: BroadcastEvent.StartChatSkippingChatButtonRendering
|
|
135
|
+
};
|
|
136
|
+
BroadcastService.postMessage(chatStartedSkippingChatButtonRendering);
|
|
134
137
|
dispatch({
|
|
135
138
|
type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
136
139
|
payload: ConversationState.Loading
|
|
@@ -158,6 +161,37 @@ export const LiveChatWidgetStateful = props => {
|
|
|
158
161
|
Description: "Start proactive chat method called, when chat was already triggered."
|
|
159
162
|
});
|
|
160
163
|
}
|
|
164
|
+
}); // start chat from SDK Event
|
|
165
|
+
|
|
166
|
+
BroadcastService.getMessageByEventName("StartChat").subscribe(() => {
|
|
167
|
+
TelemetryHelper.logActionEvent(LogLevel.INFO, {
|
|
168
|
+
Event: TelemetryEvent.StartChatEventRecevied,
|
|
169
|
+
Description: "Start chat event received."
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
if (state.appStates.isMinimized) {
|
|
173
|
+
dispatch({
|
|
174
|
+
type: LiveChatWidgetActionType.SET_MINIMIZED,
|
|
175
|
+
payload: false
|
|
176
|
+
});
|
|
177
|
+
} else {
|
|
178
|
+
prepareStartChat(props, chatSDK, state, dispatch, setAdapter);
|
|
179
|
+
}
|
|
180
|
+
}); // end chat from SDK Event
|
|
181
|
+
|
|
182
|
+
BroadcastService.getMessageByEventName("EndChat").subscribe(async () => {
|
|
183
|
+
TelemetryHelper.logActionEvent(LogLevel.INFO, {
|
|
184
|
+
Event: TelemetryEvent.EndChatEventReceived,
|
|
185
|
+
Description: "End chat event received."
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
if (canEndChat.current) {
|
|
189
|
+
prepareEndChat(props, chatSDK, setAdapter, setWebChatStyles, dispatch, adapter, state);
|
|
190
|
+
} else {
|
|
191
|
+
const skipEndChatSDK = true;
|
|
192
|
+
const skipCloseChat = false;
|
|
193
|
+
endChat(props, chatSDK, setAdapter, setWebChatStyles, dispatch, adapter, skipEndChatSDK, skipCloseChat);
|
|
194
|
+
}
|
|
161
195
|
});
|
|
162
196
|
window.addEventListener("beforeunload", () => {
|
|
163
197
|
disposeTelemetryLoggers();
|
|
@@ -169,6 +203,7 @@ export const LiveChatWidgetStateful = props => {
|
|
|
169
203
|
}, []);
|
|
170
204
|
useEffect(() => {
|
|
171
205
|
canStartProactiveChat.current = state.appStates.conversationState === ConversationState.Closed;
|
|
206
|
+
canEndChat.current = state.appStates.conversationState === ConversationState.Active;
|
|
172
207
|
|
|
173
208
|
if (state.appStates.conversationState === ConversationState.Active) {
|
|
174
209
|
chatSDK === null || chatSDK === void 0 ? void 0 : chatSDK.onNewMessage(() => {
|
|
@@ -226,7 +261,10 @@ export const LiveChatWidgetStateful = props => {
|
|
|
226
261
|
const setPostChatContextRelay = () => setPostChatContextAndLoadSurvey(chatSDK, dispatch); // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
227
262
|
|
|
228
263
|
|
|
229
|
-
const endChatRelay = (adapter, skipEndChatSDK, skipCloseChat) => endChat(props, chatSDK, setAdapter, setWebChatStyles, dispatch, adapter, skipEndChatSDK, skipCloseChat);
|
|
264
|
+
const endChatRelay = (adapter, skipEndChatSDK, skipCloseChat) => endChat(props, chatSDK, setAdapter, setWebChatStyles, dispatch, adapter, skipEndChatSDK, skipCloseChat); // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
const prepareEndChatRelay = (adapter, state) => prepareEndChat(props, chatSDK, setAdapter, setWebChatStyles, dispatch, adapter, state);
|
|
230
268
|
|
|
231
269
|
const prepareStartChatRelay = () => prepareStartChat(props, chatSDK, state, dispatch, setAdapter); // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
232
270
|
|
|
@@ -264,14 +302,14 @@ export const LiveChatWidgetStateful = props => {
|
|
|
264
302
|
})), !((_props$controlProps8 = props.controlProps) !== null && _props$controlProps8 !== void 0 && _props$controlProps8.hideLoadingPane) && shouldShowLoadingPane(state) && (decodeComponentString((_props$componentOverr4 = props.componentOverrides) === null || _props$componentOverr4 === void 0 ? void 0 : _props$componentOverr4.loadingPane) || /*#__PURE__*/React.createElement(LoadingPaneStateful, props.loadingPaneProps)), !((_props$controlProps9 = props.controlProps) !== null && _props$controlProps9 !== void 0 && _props$controlProps9.hideOutOfOfficeHoursPane) && shouldShowOutOfOfficeHoursPane(state) && (decodeComponentString((_props$componentOverr5 = props.componentOverrides) === null || _props$componentOverr5 === void 0 ? void 0 : _props$componentOverr5.outOfOfficeHoursPane) || /*#__PURE__*/React.createElement(OutOfOfficeHoursPaneStateful, props.outOfOfficeHoursPaneProps)), !((_props$controlProps10 = props.controlProps) !== null && _props$controlProps10 !== void 0 && _props$controlProps10.hideReconnectChatPane) && shouldShowReconnectChatPane(state) && (decodeComponentString((_props$componentOverr6 = props.componentOverrides) === null || _props$componentOverr6 === void 0 ? void 0 : _props$componentOverr6.reconnectChatPane) || /*#__PURE__*/React.createElement(ReconnectChatPaneStateful, {
|
|
265
303
|
reconnectChatProps: props.reconnectChatPaneProps,
|
|
266
304
|
initStartChat: initStartChatRelay
|
|
267
|
-
})), !((_props$controlProps11 = props.controlProps) !== null && _props$controlProps11 !== void 0 && _props$controlProps11.hidePreChatSurveyPane) && shouldShowPreChatSurveyPane(state) && /*#__PURE__*/React.createElement(PreChatSurveyPaneStateful, {
|
|
305
|
+
})), !((_props$controlProps11 = props.controlProps) !== null && _props$controlProps11 !== void 0 && _props$controlProps11.hidePreChatSurveyPane) && shouldShowPreChatSurveyPane(state) && (decodeComponentString((_props$componentOverr7 = props.componentOverrides) === null || _props$componentOverr7 === void 0 ? void 0 : _props$componentOverr7.preChatSurveyPane) || /*#__PURE__*/React.createElement(PreChatSurveyPaneStateful, {
|
|
268
306
|
surveyProps: props.preChatSurveyPaneProps,
|
|
269
307
|
initStartChat: initStartChatRelay
|
|
270
|
-
}), !((_props$controlProps12 = props.controlProps) !== null && _props$controlProps12 !== void 0 && _props$controlProps12.hideCallingContainer) && shouldShowCallingContainer(state) && /*#__PURE__*/React.createElement(CallingContainerStateful, _extends({
|
|
308
|
+
})), !((_props$controlProps12 = props.controlProps) !== null && _props$controlProps12 !== void 0 && _props$controlProps12.hideCallingContainer) && shouldShowCallingContainer(state) && /*#__PURE__*/React.createElement(CallingContainerStateful, _extends({
|
|
271
309
|
voiceVideoCallingSdk: voiceVideoCallingSDK
|
|
272
|
-
}, props.callingContainerProps)), !((_props$controlProps13 = props.controlProps) !== null && _props$controlProps13 !== void 0 && _props$controlProps13.hideWebChatContainer) && shouldShowWebChatContainer(state) && (decodeComponentString((_props$
|
|
310
|
+
}, props.callingContainerProps)), !((_props$controlProps13 = props.controlProps) !== null && _props$controlProps13 !== void 0 && _props$controlProps13.hideWebChatContainer) && shouldShowWebChatContainer(state) && (decodeComponentString((_props$componentOverr8 = props.componentOverrides) === null || _props$componentOverr8 === void 0 ? void 0 : _props$componentOverr8.webChatContainer) || /*#__PURE__*/React.createElement(WebChatContainerStateful, props.webChatContainerProps)), !((_props$controlProps14 = props.controlProps) !== null && _props$controlProps14 !== void 0 && _props$controlProps14.hideConfirmationPane) && shouldShowConfirmationPane(state) && (decodeComponentString((_props$componentOverr9 = props.componentOverrides) === null || _props$componentOverr9 === void 0 ? void 0 : _props$componentOverr9.confirmationPane) || /*#__PURE__*/React.createElement(ConfirmationPaneStateful, _extends({}, confirmationPaneProps, {
|
|
273
311
|
setPostChatContext: setPostChatContextRelay,
|
|
274
|
-
|
|
275
|
-
}))), !((_props$controlProps15 = props.controlProps) !== null && _props$controlProps15 !== void 0 && _props$controlProps15.hidePostChatLoadingPane) && shouldShowPostChatLoadingPane(state) && (decodeComponentString((_props$
|
|
312
|
+
prepareEndChat: prepareEndChatRelay
|
|
313
|
+
}))), !((_props$controlProps15 = props.controlProps) !== null && _props$controlProps15 !== void 0 && _props$controlProps15.hidePostChatLoadingPane) && shouldShowPostChatLoadingPane(state) && (decodeComponentString((_props$componentOverr10 = props.componentOverrides) === null || _props$componentOverr10 === void 0 ? void 0 : _props$componentOverr10.postChatLoadingPane) || /*#__PURE__*/React.createElement(PostChatLoadingPaneStateful, props.postChatLoadingPaneProps)), shouldShowPostChatSurveyPane(state) && (decodeComponentString((_props$componentOverr11 = props.componentOverrides) === null || _props$componentOverr11 === void 0 ? void 0 : _props$componentOverr11.postChatSurveyPane) || /*#__PURE__*/React.createElement(PostChatSurveyPaneStateful, _extends({}, props.postChatSurveyPaneProps, props.chatSDK))), createFooter(props, state), shouldShowEmailTranscriptPane(state) && (decodeComponentString((_props$componentOverr12 = props.componentOverrides) === null || _props$componentOverr12 === void 0 ? void 0 : _props$componentOverr12.emailTranscriptPane) || /*#__PURE__*/React.createElement(EmailTranscriptPaneStateful, props.emailTranscriptPane))));
|
|
276
314
|
};
|
|
277
315
|
export default LiveChatWidgetStateful;
|
|
@@ -3,6 +3,8 @@ import { LoadingPane } from "@microsoft/omnichannel-chat-components";
|
|
|
3
3
|
import { defaultGeneralPostChatLoadingPaneStyleProps } from "./common/defaultgeneralPostChatLoadingPaneStyleProps";
|
|
4
4
|
import { findAllFocusableElement } from "../../common/utils";
|
|
5
5
|
import useChatContextStore from "../../hooks/useChatContextStore";
|
|
6
|
+
import { TelemetryHelper } from "../../common/telemetry/TelemetryHelper";
|
|
7
|
+
import { LogLevel, TelemetryEvent } from "../../common/telemetry/TelemetryConstants";
|
|
6
8
|
export const PostChatLoadingPaneStateful = props => {
|
|
7
9
|
var _props$styleProps;
|
|
8
10
|
|
|
@@ -28,6 +30,10 @@ export const PostChatLoadingPaneStateful = props => {
|
|
|
28
30
|
if (firstElement && firstElement[0]) {
|
|
29
31
|
firstElement[0].focus();
|
|
30
32
|
}
|
|
33
|
+
|
|
34
|
+
TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
|
|
35
|
+
Event: TelemetryEvent.PostChatSurveyLoadingPaneLoaded
|
|
36
|
+
});
|
|
31
37
|
}, []);
|
|
32
38
|
return /*#__PURE__*/React.createElement(LoadingPane, {
|
|
33
39
|
componentOverrides: props.componentOverrides,
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { LogLevel } from "../../../../common/telemetry/TelemetryConstants";
|
|
2
|
+
import { TelemetryHelper } from "../../../../common/telemetry/TelemetryHelper";
|
|
3
|
+
export function createWebChatTelemetry() {
|
|
4
|
+
const handleTelemetry = event => {
|
|
5
|
+
const {
|
|
6
|
+
level
|
|
7
|
+
} = event;
|
|
8
|
+
const loglevel = level ? level.toUpperCase() : "";
|
|
9
|
+
|
|
10
|
+
switch (loglevel) {
|
|
11
|
+
case LogLevel.DEBUG:
|
|
12
|
+
TelemetryHelper.logWebChatEvent(LogLevel.DEBUG, event);
|
|
13
|
+
break;
|
|
14
|
+
|
|
15
|
+
case LogLevel.WARN:
|
|
16
|
+
TelemetryHelper.logWebChatEvent(LogLevel.WARN, event);
|
|
17
|
+
break;
|
|
18
|
+
|
|
19
|
+
case LogLevel.ERROR:
|
|
20
|
+
TelemetryHelper.logWebChatEvent(LogLevel.ERROR, event);
|
|
21
|
+
break;
|
|
22
|
+
|
|
23
|
+
case LogLevel.INFO:
|
|
24
|
+
default:
|
|
25
|
+
TelemetryHelper.logWebChatEvent(LogLevel.INFO, event);
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
return handleTelemetry;
|
|
31
|
+
}
|
|
@@ -16,20 +16,19 @@ export let LiveChatWidgetActionType;
|
|
|
16
16
|
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_AUDIO_NOTIFICATION"] = 12] = "SET_AUDIO_NOTIFICATION";
|
|
17
17
|
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_E2VV_ENABLED"] = 13] = "SET_E2VV_ENABLED";
|
|
18
18
|
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_POST_CHAT_CONTEXT"] = 14] = "SET_POST_CHAT_CONTEXT";
|
|
19
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
20
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
21
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
22
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
23
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
24
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
25
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
26
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
27
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
28
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
29
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
30
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
31
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
32
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
33
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["
|
|
34
|
-
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_LIVE_CHAT_CONTEXT"] = 30] = "SET_LIVE_CHAT_CONTEXT";
|
|
19
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SHOW_CALLING_CONTAINER"] = 15] = "SHOW_CALLING_CONTAINER";
|
|
20
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_INCOMING_CALL"] = 16] = "SET_INCOMING_CALL";
|
|
21
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["DISABLE_VIDEO_CALL"] = 17] = "DISABLE_VIDEO_CALL";
|
|
22
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["DISABLE_LOCAL_VIDEO"] = 18] = "DISABLE_LOCAL_VIDEO";
|
|
23
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["DISABLE_REMOTE_VIDEO"] = 19] = "DISABLE_REMOTE_VIDEO";
|
|
24
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CHAT_TOKEN"] = 20] = "SET_CHAT_TOKEN";
|
|
25
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_SKIP_CHAT_BUTTON_RENDERING"] = 21] = "SET_SKIP_CHAT_BUTTON_RENDERING";
|
|
26
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_PROACTIVE_CHAT_PARAMS"] = 22] = "SET_PROACTIVE_CHAT_PARAMS";
|
|
27
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_TELEMETRY_DATA"] = 23] = "SET_TELEMETRY_DATA";
|
|
28
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_RECONNECT_ID"] = 24] = "SET_RECONNECT_ID";
|
|
29
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_UNREAD_MESSAGE_COUNT"] = 25] = "SET_UNREAD_MESSAGE_COUNT";
|
|
30
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_FOCUS_CHAT_BUTTON"] = 26] = "SET_FOCUS_CHAT_BUTTON";
|
|
31
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CONVERSATION_ENDED_BY_AGENT"] = 27] = "SET_CONVERSATION_ENDED_BY_AGENT";
|
|
32
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_WIDGET_STATE"] = 28] = "SET_WIDGET_STATE";
|
|
33
|
+
LiveChatWidgetActionType[LiveChatWidgetActionType["SET_LIVE_CHAT_CONTEXT"] = 29] = "SET_LIVE_CHAT_CONTEXT";
|
|
35
34
|
})(LiveChatWidgetActionType || (LiveChatWidgetActionType = {}));
|
|
@@ -83,13 +83,6 @@ export const createReducer = () => {
|
|
|
83
83
|
}
|
|
84
84
|
};
|
|
85
85
|
|
|
86
|
-
case LiveChatWidgetActionType.SET_SHOULD_SHOW_POST_CHAT:
|
|
87
|
-
return { ...state,
|
|
88
|
-
appStates: { ...state.appStates,
|
|
89
|
-
shouldShowPostChat: action.payload
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
|
|
93
86
|
case LiveChatWidgetActionType.SHOW_CALLING_CONTAINER:
|
|
94
87
|
return { ...state,
|
|
95
88
|
uiStates: { ...state.uiStates,
|
|
@@ -58,7 +58,6 @@ export declare class Constants {
|
|
|
58
58
|
static readonly ProactiveChatInviteTimeoutInMs = 60000;
|
|
59
59
|
static readonly InputSubmit = "InputSubmit";
|
|
60
60
|
static readonly ReconnectIdAttributeName = "oc.reconnectid";
|
|
61
|
-
static readonly redirectPageRequest = "redirectPageRequest";
|
|
62
61
|
static readonly LiveChatWidget = "LiveChatWidgetNew";
|
|
63
62
|
static readonly GuidPattern = "xx-x-4m-ym-xxx";
|
|
64
63
|
static readonly Default = "default";
|
|
@@ -137,6 +136,12 @@ export declare enum ElementType {
|
|
|
137
136
|
export declare enum ChatSDKError {
|
|
138
137
|
WidgetUseOutsideOperatingHour = "WidgetUseOutsideOperatingHour"
|
|
139
138
|
}
|
|
139
|
+
export declare enum EnvironmentVersion {
|
|
140
|
+
prod = "prod",
|
|
141
|
+
dogfood = "df",
|
|
142
|
+
int = "int",
|
|
143
|
+
test = "test"
|
|
144
|
+
}
|
|
140
145
|
export declare class TranscriptConstants {
|
|
141
146
|
static readonly ChatTranscriptsBodyColor = "#F5F5F5";
|
|
142
147
|
static readonly TranscriptMessageEmojiMessageType = "http://schema.skype.com/emoji";
|
|
@@ -149,3 +154,13 @@ export declare class TranscriptConstants {
|
|
|
149
154
|
static readonly AgentDialogColor = "#2266E3";
|
|
150
155
|
static readonly AgentFontColor = "white";
|
|
151
156
|
}
|
|
157
|
+
export declare class AriaTelemetryConstants {
|
|
158
|
+
static readonly GERMANY_ENDPOINT: string;
|
|
159
|
+
static readonly GCCH_ENDPOINT: string;
|
|
160
|
+
static readonly DOD_ENDPOINT: string;
|
|
161
|
+
static readonly EUROPE_ENDPOINT: string;
|
|
162
|
+
static readonly MOONCAKE_ENDPOINT: string;
|
|
163
|
+
static readonly Public: string;
|
|
164
|
+
static readonly EU: string;
|
|
165
|
+
static readonly lcwEUDomainNames: Array<string>;
|
|
166
|
+
}
|
|
@@ -19,7 +19,7 @@ export declare enum LogLevel {
|
|
|
19
19
|
}
|
|
20
20
|
export declare enum BroadcastEvent {
|
|
21
21
|
LoadPostChatSurvey = "LoadPostChatSurvey",
|
|
22
|
-
EndChat = "
|
|
22
|
+
EndChat = "ChatEnded",
|
|
23
23
|
NewMessageNotification = "NewMessageNotification",
|
|
24
24
|
UnreadMessageCount = "UnreadMessageCount",
|
|
25
25
|
ChatWidgetStateChanged = "ChatWidgetStateChanged",
|
|
@@ -27,7 +27,10 @@ export declare enum BroadcastEvent {
|
|
|
27
27
|
ProactiveChatStartPopoutChat = "ProactiveChatStartPopoutChat",
|
|
28
28
|
InvalidAdaptiveCardFormat = "InvalidAdaptiveCardFormat",
|
|
29
29
|
NewMessageSent = "NewMessageSent",
|
|
30
|
-
NewMessageReceived = "NewMessageReceived"
|
|
30
|
+
NewMessageReceived = "NewMessageReceived",
|
|
31
|
+
RedirectPageRequest = "RedirectPageRequest",
|
|
32
|
+
StartChatSkippingChatButtonRendering = "StartChatSkippingChatButtonRendering",
|
|
33
|
+
StartUnauthenticatedReconnectChat = "StartUnauthenticatedReconnectChat"
|
|
31
34
|
}
|
|
32
35
|
export declare enum TelemetryEvent {
|
|
33
36
|
CallAdded = "CallAdded",
|
|
@@ -75,7 +78,9 @@ export declare enum TelemetryEvent {
|
|
|
75
78
|
PrechatSurveyLoaded = "PrechatSurveyLoaded",
|
|
76
79
|
PrechatSubmitted = "PrechatSubmitted",
|
|
77
80
|
StartChatSDKCall = "StartChatCall",
|
|
81
|
+
StartChatEventRecevied = "StartChatEventReceived",
|
|
78
82
|
EndChatSDKCall = "EndChatCall",
|
|
83
|
+
EndChatEventReceived = "EndChatEventReceived",
|
|
79
84
|
OnNewMessageFailed = "OnNewMessageFailed",
|
|
80
85
|
OnNewMessageAudioNotificationFailed = "OnNewMessageAudioNotificationFailed",
|
|
81
86
|
DownloadTranscriptResponseNullOrUndefined = "DownloadTranscriptResponseNullOrUndefined",
|
|
@@ -89,6 +94,7 @@ export declare enum TelemetryEvent {
|
|
|
89
94
|
LoadingPaneLoaded = "LoadingPaneLoaded",
|
|
90
95
|
EmailTranscriptLoaded = "EmailTranscriptLoaded",
|
|
91
96
|
OutOfOfficePaneLoaded = "OutOfOfficePaneLoaded",
|
|
97
|
+
PostChatSurveyLoadingPaneLoaded = "PostChatSurveyLoadingPaneLoaded",
|
|
92
98
|
PostChatSurveyLoaded = "PostChatSurveyLoaded",
|
|
93
99
|
ConfirmationPaneLoaded = "ConfirmationPaneLoaded",
|
|
94
100
|
ProactiveChatPaneLoaded = "ProactiveChatPaneLoaded",
|
|
@@ -110,6 +116,7 @@ export declare enum TelemetryEvent {
|
|
|
110
116
|
InvalidConfiguration = "InvalidConfiguration",
|
|
111
117
|
SendTypingIndicatorSucceeded = "SendTypingIndicatorSucceeded",
|
|
112
118
|
SendTypingIndicatorFailed = "SendTypingIndicatorFailed",
|
|
119
|
+
WebChatEvent = "WebChatEvent",
|
|
113
120
|
PreChatSurveyStartChatMethodFailed = "PreChatSurveyStartChatMethodFailed",
|
|
114
121
|
ChatAlreadyTriggered = "ChatAlreadyTriggered",
|
|
115
122
|
StartProactiveChatEventReceived = "StartProactiveChatEventReceived",
|
|
@@ -35,4 +35,5 @@ export declare class TelemetryHelper {
|
|
|
35
35
|
static logActionEvent: (logLevel: LogLevel, payload: TelemetryEventWrapper) => void;
|
|
36
36
|
static logSDKEvent: (logLevel: LogLevel, payload: TelemetryEventWrapper) => void;
|
|
37
37
|
static logConfigDataEvent: (logLevel: LogLevel, payload: TelemetryEventWrapper) => void;
|
|
38
|
+
static logWebChatEvent: (logLevel: LogLevel, payload: TelemetryEventWrapper) => void;
|
|
38
39
|
}
|
|
@@ -32,13 +32,13 @@ export interface ITelemetryConfig {
|
|
|
32
32
|
/**
|
|
33
33
|
* Omnichannel chat widget version
|
|
34
34
|
*/
|
|
35
|
-
chatWidgetVersion
|
|
35
|
+
chatWidgetVersion: string;
|
|
36
36
|
/**
|
|
37
37
|
* Omnichannel chat components version
|
|
38
38
|
*/
|
|
39
|
-
chatComponentVersion
|
|
39
|
+
chatComponentVersion: string;
|
|
40
40
|
/**
|
|
41
41
|
* Omnichannel Chat SDK Version
|
|
42
42
|
*/
|
|
43
|
-
OCChatSDKVersion
|
|
43
|
+
OCChatSDKVersion: string;
|
|
44
44
|
}
|
|
@@ -21,3 +21,4 @@ export declare const isNullOrUndefined: (obj: any) => boolean;
|
|
|
21
21
|
export declare const isNullOrEmptyString: (s: string) => boolean;
|
|
22
22
|
export declare const newGuid: () => string;
|
|
23
23
|
export declare const createTimer: () => ITimer;
|
|
24
|
+
export declare const getDomain: (hostValue: any) => string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
1
2
|
import { IConfirmationPaneStatefulProps } from "./IConfirmationPaneStatefulProps";
|
|
2
3
|
export interface IConfirmationPaneStatefulParams extends IConfirmationPaneStatefulProps {
|
|
3
4
|
/**
|
|
@@ -5,10 +6,9 @@ export interface IConfirmationPaneStatefulParams extends IConfirmationPaneStatef
|
|
|
5
6
|
*/
|
|
6
7
|
setPostChatContext: () => Promise<void>;
|
|
7
8
|
/**
|
|
8
|
-
*
|
|
9
|
+
* prepareEndChat: Internal Prop injected for checking PostChat contexts and trigerring end of chat
|
|
9
10
|
* @param adapter : The chat adapter for the live chat session
|
|
10
|
-
* @param
|
|
11
|
-
* @param skipCloseChat : If set to true endchat will skip closing the live chat instance
|
|
11
|
+
* @param state : The chat state where the conversation is currently in
|
|
12
12
|
*/
|
|
13
|
-
|
|
13
|
+
prepareEndChat: (adapter: any, state: ILiveChatWidgetContext) => Promise<void>;
|
|
14
14
|
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { Dispatch } from "react";
|
|
2
2
|
import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
|
|
3
3
|
import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
|
|
4
|
-
|
|
4
|
+
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
5
|
+
declare const prepareEndChat: (props: ILiveChatWidgetProps, chatSDK: any, setAdapter: any, setWebChatStyles: any, dispatch: Dispatch<ILiveChatWidgetAction>, adapter: any, state: ILiveChatWidgetContext) => Promise<void>;
|
|
6
|
+
declare const endChat: (props: ILiveChatWidgetProps, chatSDK: any, setAdapter: any, setWebChatStyles: any, dispatch: Dispatch<ILiveChatWidgetAction>, adapter: any, skipEndChatSDK?: boolean | undefined, skipCloseChat?: boolean | undefined) => Promise<void>;
|
|
7
|
+
export { prepareEndChat, endChat };
|
|
@@ -2,6 +2,9 @@ import "regenerator-runtime/runtime";
|
|
|
2
2
|
import { Dispatch } from "react";
|
|
3
3
|
import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
|
|
4
4
|
import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
|
|
5
|
+
declare const getChatReconnectContext: (chatSDK: any, reconnectId?: string | undefined) => Promise<any>;
|
|
5
6
|
declare const getReconnectIdForAuthenticatedChat: (props: ILiveChatWidgetProps, chatSDK: any) => Promise<string | undefined>;
|
|
6
|
-
declare const handleUnauthenticatedReconnectChat: (dispatch: Dispatch<ILiveChatWidgetAction>, reconnectId: string, initStartChat: any) => Promise<void>;
|
|
7
|
-
|
|
7
|
+
declare const handleUnauthenticatedReconnectChat: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, reconnectId: string, initStartChat: any, redirectInSameWindow: boolean | undefined) => Promise<void>;
|
|
8
|
+
declare const startUnauthenticatedReconnectChat: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, reconnectId: string, initStartChat: any) => Promise<void>;
|
|
9
|
+
declare const handleRedirectUnauthenticatedReconnectChat: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, initStartChat: any, reconnectId: string, redirectInSameWindow: boolean | undefined) => Promise<void>;
|
|
10
|
+
export { getChatReconnectContext, getReconnectIdForAuthenticatedChat, handleUnauthenticatedReconnectChat, startUnauthenticatedReconnectChat, handleRedirectUnauthenticatedReconnectChat };
|
package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetComponentOverrides.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export interface ILiveChatWidgetComponentOverrides {
|
|
|
9
9
|
outOfOfficeHoursPane?: ReactNode | string;
|
|
10
10
|
postChatLoadingPane?: ReactNode | string;
|
|
11
11
|
postChatSurveyPane?: ReactNode | string;
|
|
12
|
+
preChatSurveyPane?: ReactNode | string;
|
|
12
13
|
proactiveChatPane?: ReactNode | string;
|
|
13
14
|
reconnectChatPane?: ReactNode | string;
|
|
14
15
|
webChatContainer?: ReactNode | string;
|
|
@@ -45,7 +45,7 @@ export interface ILiveChatWidgetProps {
|
|
|
45
45
|
proactiveChatPaneProps?: IProactiveChatPaneStatefulProps;
|
|
46
46
|
reconnectChatPaneProps?: IReconnectChatPaneStatefulProps;
|
|
47
47
|
styleProps?: ILiveChatWidgetStyleProps;
|
|
48
|
-
telemetryConfig
|
|
48
|
+
telemetryConfig: ITelemetryConfig;
|
|
49
49
|
webChatContainerProps?: IWebChatContainerStatefulProps;
|
|
50
50
|
liveChatContextFromCache?: ILiveChatWidgetContext;
|
|
51
51
|
contextDataStore?: IContextDataStore;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createWebChatTelemetry(): (event: any) => void;
|
|
@@ -14,20 +14,19 @@ export declare enum LiveChatWidgetActionType {
|
|
|
14
14
|
SET_AUDIO_NOTIFICATION = 12,
|
|
15
15
|
SET_E2VV_ENABLED = 13,
|
|
16
16
|
SET_POST_CHAT_CONTEXT = 14,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
SET_LIVE_CHAT_CONTEXT = 30
|
|
17
|
+
SHOW_CALLING_CONTAINER = 15,
|
|
18
|
+
SET_INCOMING_CALL = 16,
|
|
19
|
+
DISABLE_VIDEO_CALL = 17,
|
|
20
|
+
DISABLE_LOCAL_VIDEO = 18,
|
|
21
|
+
DISABLE_REMOTE_VIDEO = 19,
|
|
22
|
+
SET_CHAT_TOKEN = 20,
|
|
23
|
+
SET_SKIP_CHAT_BUTTON_RENDERING = 21,
|
|
24
|
+
SET_PROACTIVE_CHAT_PARAMS = 22,
|
|
25
|
+
SET_TELEMETRY_DATA = 23,
|
|
26
|
+
SET_RECONNECT_ID = 24,
|
|
27
|
+
SET_UNREAD_MESSAGE_COUNT = 25,
|
|
28
|
+
SET_FOCUS_CHAT_BUTTON = 26,
|
|
29
|
+
SET_CONVERSATION_ENDED_BY_AGENT = 27,
|
|
30
|
+
SET_WIDGET_STATE = 28,
|
|
31
|
+
SET_LIVE_CHAT_CONTEXT = 29
|
|
33
32
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/omnichannel-chat-widget",
|
|
3
|
-
"version": "0.1.0-main.
|
|
3
|
+
"version": "0.1.0-main.72620c9",
|
|
4
4
|
"description": "Microsoft Omnichannel Chat Widget",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"types": "lib/types/index.d.ts",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"import": "./lib/esm/index.js",
|
|
17
17
|
"require": "./lib/cjs/index.js",
|
|
18
18
|
"types": "./lib/types/index.d.ts"
|
|
19
|
-
}
|
|
19
|
+
},
|
|
20
|
+
"./package.json": "./package.json"
|
|
20
21
|
},
|
|
21
22
|
"devDependencies": {
|
|
22
23
|
"@babel/core": "^7.15.8",
|
|
@@ -71,13 +72,9 @@
|
|
|
71
72
|
"webpack": "^4.44.2",
|
|
72
73
|
"webpack-cli": "^4.9.2"
|
|
73
74
|
},
|
|
74
|
-
"peerDependencies": {
|
|
75
|
-
"react": "^16.14.0",
|
|
76
|
-
"react-dom": "^16.14.0"
|
|
77
|
-
},
|
|
78
75
|
"dependencies": {
|
|
79
76
|
"@fluentui/react": "^8.49.1",
|
|
80
|
-
"@microsoft/omnichannel-chat-components": "0.1.0-main.
|
|
77
|
+
"@microsoft/omnichannel-chat-components": "^0.1.0-main.ae27766",
|
|
81
78
|
"@microsoft/omnichannel-chat-sdk": "1.0.1-main.077d17c",
|
|
82
79
|
"abort-controller-es5": "^2.0.1",
|
|
83
80
|
"dompurify": "^2.3.4",
|
|
@@ -93,6 +90,8 @@
|
|
|
93
90
|
"build-storybook": "build-storybook",
|
|
94
91
|
"build": "yarn lint && yarn build:esm && yarn build:cjs && tsc",
|
|
95
92
|
"test:unit": "jest -c jest.config.unit.cjs --env=jsdom --runInBand --force-exit",
|
|
93
|
+
"test:e2e": "cd automation_tests && yarn test",
|
|
94
|
+
"test:e2e:build": "yarn build-sample && cd automation_tests && yarn test",
|
|
96
95
|
"test:visual": "jest -c jest.config.visual.cjs",
|
|
97
96
|
"test:all": "yarn test:unit && yarn test:visual",
|
|
98
97
|
"build:esm": "babel ./src --config-file ./babel.esm.config.json --out-dir lib/esm --extensions .ts,.js,.tsx --ignore **/*.test.ts,**/*.stories.tsx,**/*.test.tsx",
|