@microsoft/omnichannel-chat-widget 0.1.0-main.86df755 → 0.1.0-main.ae27766
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +227 -0
- package/lib/cjs/assets/Audios.js +8 -0
- package/lib/cjs/assets/Icons.js +28 -0
- package/lib/cjs/common/Constants.js +38 -4
- package/lib/cjs/common/contextDataStore/DataStoreManager.js +14 -0
- package/lib/cjs/{assets/assets.d.js → common/interfaces/IContextDataStore.js} +0 -0
- package/lib/cjs/common/telemetry/TelemetryConstants.js +37 -3
- package/lib/cjs/common/telemetry/TelemetryHelper.js +22 -4
- package/lib/cjs/common/telemetry/TelemetryManager.js +22 -9
- package/lib/cjs/common/telemetry/defaultConfigs/defaultAriaConfig.js +3 -3
- package/lib/cjs/common/telemetry/defaultConfigs/defaultTelemetryConfiguration.js +4 -1
- package/lib/cjs/common/telemetry/loggers/ariaTelemetryLogger.js +35 -3
- package/lib/cjs/common/telemetry/loggers/consoleLogger.js +3 -0
- package/lib/cjs/common/utils.js +15 -2
- package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +8 -1
- package/lib/cjs/components/confirmationpanestateful/ConfirmationPaneStateful.js +8 -54
- package/lib/cjs/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +2 -2
- package/lib/cjs/components/footerstateful/FooterStateful.js +4 -5
- package/lib/cjs/components/headerstateful/HeaderStateful.js +11 -8
- package/lib/cjs/components/livechatwidget/common/createMarkdown.js +3 -4
- package/lib/cjs/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +43 -35
- package/lib/cjs/components/livechatwidget/common/disposeTelemetryLoggers.js +14 -0
- package/lib/cjs/components/livechatwidget/common/endChat.js +102 -50
- package/lib/cjs/components/livechatwidget/common/initCallingSdk.js +5 -0
- package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +29 -9
- package/lib/cjs/components/livechatwidget/common/reconnectChatHelper.js +105 -20
- package/lib/cjs/components/livechatwidget/common/registerTelemetryLoggers.js +11 -7
- package/lib/cjs/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +26 -24
- package/lib/cjs/components/livechatwidget/common/startChat.js +113 -54
- package/lib/cjs/components/livechatwidget/common/startProactiveChat.js +3 -3
- package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +101 -32
- package/lib/cjs/components/loadingpanestateful/LoadingPaneStateful.js +1 -1
- package/lib/cjs/components/ooohpanestateful/OOOHPaneStateful.js +8 -0
- package/lib/cjs/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +8 -0
- package/lib/cjs/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +28 -11
- package/lib/cjs/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +10 -4
- package/lib/cjs/components/proactivechatpanestateful/interfaces/IProactiveChatNotificationConfig.js +1 -0
- package/lib/cjs/components/webchatcontainerstateful/common/mockchatsdk.js +4 -0
- package/lib/cjs/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.js +51 -73
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +9 -46
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +3 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.js +6 -6
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.js +44 -0
- package/lib/cjs/contexts/common/ConversationState.js +3 -2
- package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +15 -12
- package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +11 -4
- package/lib/cjs/contexts/createReducer.js +27 -10
- package/lib/cjs/controller/componentController.js +2 -2
- package/lib/cjs/plugins/newMessageEventHandler.js +102 -0
- package/lib/esm/assets/Audios.js +1 -0
- package/lib/esm/assets/Icons.js +11 -0
- package/lib/esm/common/Constants.js +34 -3
- package/lib/esm/common/contextDataStore/DataStoreManager.js +5 -0
- package/lib/esm/common/interfaces/IContextDataStore.js +1 -0
- package/lib/esm/common/telemetry/TelemetryConstants.js +33 -2
- package/lib/esm/common/telemetry/TelemetryHelper.js +22 -5
- package/lib/esm/common/telemetry/TelemetryManager.js +17 -9
- package/lib/esm/common/telemetry/defaultConfigs/defaultAriaConfig.js +3 -3
- package/lib/esm/common/telemetry/defaultConfigs/defaultTelemetryConfiguration.js +4 -1
- package/lib/esm/common/telemetry/loggers/ariaTelemetryLogger.js +32 -2
- package/lib/esm/common/telemetry/loggers/consoleLogger.js +3 -0
- package/lib/esm/common/utils.js +11 -1
- package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +9 -1
- package/lib/esm/components/confirmationpanestateful/ConfirmationPaneStateful.js +8 -50
- package/lib/esm/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +2 -2
- package/lib/esm/components/footerstateful/FooterStateful.js +4 -5
- package/lib/esm/components/headerstateful/HeaderStateful.js +12 -9
- package/lib/esm/components/livechatwidget/common/createMarkdown.js +3 -3
- package/lib/esm/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +41 -36
- package/lib/esm/components/livechatwidget/common/disposeTelemetryLoggers.js +4 -0
- package/lib/esm/components/livechatwidget/common/endChat.js +100 -47
- package/lib/esm/components/livechatwidget/common/initCallingSdk.js +3 -0
- package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +25 -9
- package/lib/esm/components/livechatwidget/common/reconnectChatHelper.js +94 -20
- package/lib/esm/components/livechatwidget/common/registerTelemetryLoggers.js +10 -3
- package/lib/esm/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +23 -22
- package/lib/esm/components/livechatwidget/common/startChat.js +108 -51
- package/lib/esm/components/livechatwidget/common/startProactiveChat.js +5 -5
- package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +94 -33
- package/lib/esm/components/loadingpanestateful/LoadingPaneStateful.js +1 -1
- package/lib/esm/components/ooohpanestateful/OOOHPaneStateful.js +6 -0
- package/lib/esm/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +6 -0
- package/lib/esm/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +26 -10
- package/lib/esm/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +9 -5
- package/lib/esm/components/proactivechatpanestateful/interfaces/IProactiveChatNotificationConfig.js +1 -0
- package/lib/esm/components/webchatcontainerstateful/common/mockchatsdk.js +4 -0
- package/lib/esm/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.js +2 -12
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +7 -44
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +2 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.js +6 -6
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.js +31 -0
- package/lib/esm/contexts/common/ConversationState.js +3 -2
- package/lib/esm/contexts/common/LiveChatWidgetActionType.js +15 -12
- package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +11 -4
- package/lib/esm/contexts/createReducer.js +27 -9
- package/lib/esm/controller/componentController.js +2 -2
- package/lib/esm/plugins/newMessageEventHandler.js +84 -0
- package/lib/types/assets/Audios.d.ts +1 -0
- package/lib/types/assets/Icons.d.ts +11 -0
- package/lib/types/common/Constants.d.ts +19 -1
- package/lib/types/common/contextDataStore/DataStoreManager.d.ts +4 -0
- package/lib/types/common/interfaces/IContextDataStore.d.ts +14 -0
- package/lib/types/common/telemetry/TelemetryConstants.d.ts +24 -1
- package/lib/types/common/telemetry/TelemetryHelper.d.ts +1 -0
- 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/common/utils.d.ts +1 -0
- package/lib/types/components/confirmationpanestateful/interfaces/IConfirmationPaneStatefulParams.d.ts +5 -2
- package/lib/types/components/footerstateful/audionotificationstateful/interfaces/IAudioNotificationStatefulParams.d.ts +0 -1
- package/lib/types/components/headerstateful/interfaces/IHeaderStatefulParams.d.ts +4 -1
- package/lib/types/components/livechatwidget/common/disposeTelemetryLoggers.d.ts +1 -0
- 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/common/setPostChatContextAndLoadSurvey.d.ts +1 -1
- package/lib/types/components/livechatwidget/common/startChat.d.ts +1 -1
- package/lib/types/components/livechatwidget/common/startProactiveChat.d.ts +2 -1
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetComponentOverrides.d.ts +1 -0
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +3 -1
- package/lib/types/components/prechatsurveypanestateful/interfaces/IPreChatSurveyPaneStatefulParams.d.ts +1 -1
- package/lib/types/components/proactivechatpanestateful/interfaces/IProactiveChatNotificationConfig.d.ts +3 -0
- package/lib/types/components/reconnectchatpanestateful/interfaces/IReconnectChatPaneStatefulProps.d.ts +1 -0
- package/lib/types/components/webchatcontainerstateful/common/mockchatsdk.d.ts +1 -0
- package/lib/types/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.d.ts +1 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.d.ts +0 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.d.ts +1 -0
- package/lib/types/contexts/common/ConversationState.d.ts +3 -2
- package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +3 -0
- package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +15 -12
- package/lib/types/plugins/newMessageEventHandler.d.ts +2 -0
- package/package.json +11 -11
- package/lib/cjs/assets/audios/newMessageNotification.mp3 +0 -0
- package/lib/cjs/assets/icons/archiveIcon.svg +0 -3
- package/lib/cjs/assets/icons/audioIcon.svg +0 -6
- package/lib/cjs/assets/icons/blankIcon.svg +0 -6
- package/lib/cjs/assets/icons/excelIcon.svg +0 -6
- package/lib/cjs/assets/icons/imageIcon.svg +0 -6
- package/lib/cjs/assets/icons/oneNoteIcon.svg +0 -6
- package/lib/cjs/assets/icons/pdfIcon.svg +0 -6
- package/lib/cjs/assets/icons/powerpointIcon.svg +0 -6
- package/lib/cjs/assets/icons/videoIcon.svg +0 -6
- package/lib/cjs/assets/icons/visioIcon.svg +0 -6
- package/lib/cjs/assets/icons/wordIcon.svg +0 -6
- package/lib/esm/assets/assets.d.js +0 -0
- package/lib/esm/assets/audios/newMessageNotification.mp3 +0 -0
- package/lib/esm/assets/icons/archiveIcon.svg +0 -3
- package/lib/esm/assets/icons/audioIcon.svg +0 -6
- package/lib/esm/assets/icons/blankIcon.svg +0 -6
- package/lib/esm/assets/icons/excelIcon.svg +0 -6
- package/lib/esm/assets/icons/imageIcon.svg +0 -6
- package/lib/esm/assets/icons/oneNoteIcon.svg +0 -6
- package/lib/esm/assets/icons/pdfIcon.svg +0 -6
- package/lib/esm/assets/icons/powerpointIcon.svg +0 -6
- package/lib/esm/assets/icons/videoIcon.svg +0 -6
- package/lib/esm/assets/icons/visioIcon.svg +0 -6
- package/lib/esm/assets/icons/wordIcon.svg +0 -6
|
@@ -7,6 +7,7 @@ export let ConversationState;
|
|
|
7
7
|
ConversationState[ConversationState["OutOfOffice"] = 3] = "OutOfOffice";
|
|
8
8
|
ConversationState[ConversationState["ProactiveChat"] = 4] = "ProactiveChat";
|
|
9
9
|
ConversationState[ConversationState["Active"] = 5] = "Active";
|
|
10
|
-
ConversationState[ConversationState["
|
|
11
|
-
ConversationState[ConversationState["
|
|
10
|
+
ConversationState[ConversationState["InActive"] = 6] = "InActive";
|
|
11
|
+
ConversationState[ConversationState["Postchat"] = 7] = "Postchat";
|
|
12
|
+
ConversationState[ConversationState["Closed"] = 8] = "Closed";
|
|
12
13
|
})(ConversationState || (ConversationState = {}));
|
|
@@ -16,16 +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["
|
|
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";
|
|
31
34
|
})(LiveChatWidgetActionType || (LiveChatWidgetActionType = {}));
|
|
@@ -3,6 +3,10 @@ import { defaultMiddlewareLocalizedTexts } from "../../components/webchatcontain
|
|
|
3
3
|
export const getLiveChatWidgetContextInitialState = props => {
|
|
4
4
|
var _props$webChatContain;
|
|
5
5
|
|
|
6
|
+
if (props !== null && props !== void 0 && props.liveChatContextFromCache) {
|
|
7
|
+
return props === null || props === void 0 ? void 0 : props.liveChatContextFromCache;
|
|
8
|
+
}
|
|
9
|
+
|
|
6
10
|
const LiveChatWidgetContextInitialState = {
|
|
7
11
|
domainStates: {
|
|
8
12
|
liveChatConfig: props.chatConfig,
|
|
@@ -13,7 +17,8 @@ export const getLiveChatWidgetContextInitialState = props => {
|
|
|
13
17
|
chatToken: undefined,
|
|
14
18
|
postChatContext: undefined,
|
|
15
19
|
telemetryInternalData: {},
|
|
16
|
-
globalDir: "ltr"
|
|
20
|
+
globalDir: "ltr",
|
|
21
|
+
liveChatContext: undefined
|
|
17
22
|
},
|
|
18
23
|
appStates: {
|
|
19
24
|
conversationState: ConversationState.Closed,
|
|
@@ -32,7 +37,8 @@ export const getLiveChatWidgetContextInitialState = props => {
|
|
|
32
37
|
proactiveChatInNewWindow: false
|
|
33
38
|
},
|
|
34
39
|
e2vvEnabled: false,
|
|
35
|
-
unreadMessageCount: 0
|
|
40
|
+
unreadMessageCount: 0,
|
|
41
|
+
conversationEndedByAgent: false
|
|
36
42
|
},
|
|
37
43
|
uiStates: {
|
|
38
44
|
showConfirmationPane: false,
|
|
@@ -41,8 +47,9 @@ export const getLiveChatWidgetContextInitialState = props => {
|
|
|
41
47
|
isIncomingCall: true,
|
|
42
48
|
disableVideoCall: true,
|
|
43
49
|
disableRemoteVideo: true,
|
|
44
|
-
disableSelfVideo: true
|
|
50
|
+
disableSelfVideo: true,
|
|
51
|
+
focusChatButton: false
|
|
45
52
|
}
|
|
46
53
|
};
|
|
47
|
-
return
|
|
54
|
+
return LiveChatWidgetContextInitialState;
|
|
48
55
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/* eslint-disable indent */
|
|
2
2
|
import { LiveChatWidgetActionType } from "./common/LiveChatWidgetActionType";
|
|
3
|
-
import { TelemetryManager } from "../common/telemetry/TelemetryManager";
|
|
4
3
|
export const createReducer = () => {
|
|
5
4
|
const reducer = (state, action) => {
|
|
6
5
|
var _action$payload, _action$payload2, _action$payload3;
|
|
@@ -84,13 +83,6 @@ export const createReducer = () => {
|
|
|
84
83
|
}
|
|
85
84
|
};
|
|
86
85
|
|
|
87
|
-
case LiveChatWidgetActionType.SET_SHOULD_SHOW_POST_CHAT:
|
|
88
|
-
return { ...state,
|
|
89
|
-
appStates: { ...state.appStates,
|
|
90
|
-
shouldShowPostChat: action.payload
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
|
|
94
86
|
case LiveChatWidgetActionType.SHOW_CALLING_CONTAINER:
|
|
95
87
|
return { ...state,
|
|
96
88
|
uiStates: { ...state.uiStates,
|
|
@@ -105,6 +97,13 @@ export const createReducer = () => {
|
|
|
105
97
|
}
|
|
106
98
|
};
|
|
107
99
|
|
|
100
|
+
case LiveChatWidgetActionType.SET_FOCUS_CHAT_BUTTON:
|
|
101
|
+
return { ...state,
|
|
102
|
+
uiStates: { ...state.uiStates,
|
|
103
|
+
focusChatButton: action.payload
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
|
|
108
107
|
case LiveChatWidgetActionType.DISABLE_VIDEO_CALL:
|
|
109
108
|
return { ...state,
|
|
110
109
|
uiStates: { ...state.uiStates,
|
|
@@ -129,6 +128,7 @@ export const createReducer = () => {
|
|
|
129
128
|
case LiveChatWidgetActionType.SET_CHAT_TOKEN:
|
|
130
129
|
return { ...state,
|
|
131
130
|
domainStates: { ...state.domainStates,
|
|
131
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
132
132
|
chatToken: action.payload
|
|
133
133
|
}
|
|
134
134
|
};
|
|
@@ -180,7 +180,6 @@ export const createReducer = () => {
|
|
|
180
180
|
};
|
|
181
181
|
|
|
182
182
|
case LiveChatWidgetActionType.SET_TELEMETRY_DATA:
|
|
183
|
-
TelemetryManager.InternalTelemetryData = action.payload;
|
|
184
183
|
return { ...state,
|
|
185
184
|
domainStates: { ...state.domainStates,
|
|
186
185
|
telemetryInternalData: action.payload
|
|
@@ -201,6 +200,25 @@ export const createReducer = () => {
|
|
|
201
200
|
}
|
|
202
201
|
};
|
|
203
202
|
|
|
203
|
+
case LiveChatWidgetActionType.SET_LIVE_CHAT_CONTEXT:
|
|
204
|
+
return { ...state,
|
|
205
|
+
domainStates: { ...state.domainStates,
|
|
206
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
207
|
+
liveChatContext: action.payload
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
case LiveChatWidgetActionType.SET_WIDGET_STATE:
|
|
212
|
+
return { ...action.payload
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
case LiveChatWidgetActionType.SET_CONVERSATION_ENDED_BY_AGENT:
|
|
216
|
+
return { ...state,
|
|
217
|
+
appStates: { ...state.appStates,
|
|
218
|
+
conversationEndedByAgent: action.payload
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
|
|
204
222
|
default:
|
|
205
223
|
return state;
|
|
206
224
|
}
|
|
@@ -9,13 +9,13 @@ export const shouldShowHeader = state => {
|
|
|
9
9
|
return !state.appStates.isMinimized && state.appStates.conversationState !== ConversationState.Closed && state.appStates.conversationState !== ConversationState.ProactiveChat;
|
|
10
10
|
};
|
|
11
11
|
export const shouldShowFooter = state => {
|
|
12
|
-
return !state.appStates.isMinimized && state.appStates.conversationState === ConversationState.Active;
|
|
12
|
+
return !state.appStates.isMinimized && (state.appStates.conversationState === ConversationState.Active || state.appStates.conversationState === ConversationState.InActive);
|
|
13
13
|
};
|
|
14
14
|
export const shouldShowEmailTranscriptPane = state => {
|
|
15
15
|
return state.uiStates.showEmailTranscriptPane;
|
|
16
16
|
};
|
|
17
17
|
export const shouldShowWebChatContainer = state => {
|
|
18
|
-
return state.appStates.conversationState === ConversationState.Active;
|
|
18
|
+
return state.appStates.conversationState === ConversationState.Active || state.appStates.conversationState === ConversationState.InActive;
|
|
19
19
|
};
|
|
20
20
|
export const shouldShowLoadingPane = state => {
|
|
21
21
|
return !state.appStates.isMinimized && !state.appStates.shouldShowPostChat && state.appStates.conversationState === ConversationState.Loading;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { BroadcastEvent, LogLevel, TelemetryEvent } from "../common/telemetry/TelemetryConstants";
|
|
2
|
+
import { BroadcastService } from "@microsoft/omnichannel-chat-components";
|
|
3
|
+
import { Constants } from "../common/Constants";
|
|
4
|
+
import { TelemetryHelper } from "../common/telemetry/TelemetryHelper";
|
|
5
|
+
import { TelemetryManager } from "../common/telemetry/TelemetryManager";
|
|
6
|
+
export const createOnNewAdapterActivityHandler = (chatId, userId) => {
|
|
7
|
+
const onNewAdapterActivityHandler = activity => {
|
|
8
|
+
var _activity$channelData, _activity$channelData2, _activity$channelData3;
|
|
9
|
+
|
|
10
|
+
const isActivityMessage = (activity === null || activity === void 0 ? void 0 : activity.type) === Constants.message;
|
|
11
|
+
const isNotHistoryMessage = isActivityMessage && !(activity !== null && activity !== void 0 && (_activity$channelData = activity.channelData) !== null && _activity$channelData !== void 0 && (_activity$channelData2 = _activity$channelData.tags) !== null && _activity$channelData2 !== void 0 && _activity$channelData2.includes(Constants.historyMessageTag)) && !(activity !== null && activity !== void 0 && (_activity$channelData3 = activity.channelData) !== null && _activity$channelData3 !== void 0 && _activity$channelData3.fromList);
|
|
12
|
+
|
|
13
|
+
if (isNotHistoryMessage) {
|
|
14
|
+
raiseMessageEvent(activity);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const raiseMessageEvent = activity => {
|
|
19
|
+
if ((activity === null || activity === void 0 ? void 0 : activity.type) === Constants.message) {
|
|
20
|
+
var _TelemetryManager$Int, _activity$from;
|
|
21
|
+
|
|
22
|
+
const payload = {
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
24
|
+
text: activity === null || activity === void 0 ? void 0 : activity.text,
|
|
25
|
+
id: activity === null || activity === void 0 ? void 0 : activity.id,
|
|
26
|
+
type: activity === null || activity === void 0 ? void 0 : activity.type,
|
|
27
|
+
timestamp: activity === null || activity === void 0 ? void 0 : activity.timestamp,
|
|
28
|
+
chatId: chatId,
|
|
29
|
+
userId: userId,
|
|
30
|
+
conversationId: ((_TelemetryManager$Int = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int === void 0 ? void 0 : _TelemetryManager$Int.conversationId) ?? "",
|
|
31
|
+
channelData: activity === null || activity === void 0 ? void 0 : activity.channelData,
|
|
32
|
+
messageType: ""
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
if ((activity === null || activity === void 0 ? void 0 : (_activity$from = activity.from) === null || _activity$from === void 0 ? void 0 : _activity$from.role) === Constants.userMessageTag) {
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
37
|
+
payload.messageType = Constants.userMessageTag;
|
|
38
|
+
const newMessageSentEvent = {
|
|
39
|
+
eventName: BroadcastEvent.NewMessageSent,
|
|
40
|
+
payload: payload
|
|
41
|
+
};
|
|
42
|
+
BroadcastService.postMessage(newMessageSentEvent);
|
|
43
|
+
TelemetryHelper.logActionEvent(LogLevel.INFO, {
|
|
44
|
+
Event: TelemetryEvent.MessageSent,
|
|
45
|
+
Description: "New message sent"
|
|
46
|
+
});
|
|
47
|
+
} else {
|
|
48
|
+
var _activity$channelData4, _activity$channelData5;
|
|
49
|
+
|
|
50
|
+
if (activity !== null && activity !== void 0 && (_activity$channelData4 = activity.channelData) !== null && _activity$channelData4 !== void 0 && (_activity$channelData5 = _activity$channelData4.tags) !== null && _activity$channelData5 !== void 0 && _activity$channelData5.includes(Constants.systemMessageTag)) {
|
|
51
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
52
|
+
payload.messageType = Constants.systemMessageTag;
|
|
53
|
+
} else {
|
|
54
|
+
var _activity$channelData6, _activity$channelData7, _activity$channelData8;
|
|
55
|
+
|
|
56
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
57
|
+
const messageHasNoText = !(activity !== null && activity !== void 0 && activity.text); // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
58
|
+
|
|
59
|
+
const messageHasNoTags = !(activity !== null && activity !== void 0 && activity.channelData) || !(activity !== null && activity !== void 0 && (_activity$channelData6 = activity.channelData) !== null && _activity$channelData6 !== void 0 && _activity$channelData6.tags) || (activity === null || activity === void 0 ? void 0 : (_activity$channelData7 = activity.channelData) === null || _activity$channelData7 === void 0 ? void 0 : (_activity$channelData8 = _activity$channelData7.tags) === null || _activity$channelData8 === void 0 ? void 0 : _activity$channelData8.length) === 0; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
60
|
+
|
|
61
|
+
const messageHasNoAttachments = !(activity !== null && activity !== void 0 && activity.attachments) || (activity === null || activity === void 0 ? void 0 : activity.attachments.length) === 0;
|
|
62
|
+
|
|
63
|
+
if (messageHasNoTags && messageHasNoText && messageHasNoAttachments) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
payload.messageType = Constants.userMessageTag;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const newMessageReceivedEvent = {
|
|
71
|
+
eventName: BroadcastEvent.NewMessageReceived,
|
|
72
|
+
payload: payload
|
|
73
|
+
};
|
|
74
|
+
BroadcastService.postMessage(newMessageReceivedEvent);
|
|
75
|
+
TelemetryHelper.logActionEvent(LogLevel.INFO, {
|
|
76
|
+
Event: TelemetryEvent.MessageReceived,
|
|
77
|
+
Description: "New message received"
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
return onNewAdapterActivityHandler;
|
|
84
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const NewMessageNotificationSoundBase64: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const ArchiveIcon = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMDQ4IDIwNDgiIHdpZHRoPSIxMnB4IiBoZWlnaHQ9IjEycHgiPg0KPHBhdGggZD0iTTE3OTIgMHEyNyAwIDUwIDEwdDQwIDI3IDI4IDQxIDEwIDUwdjQ4MHEwIDQ1LTkgNzd0LTI0IDU4LTMxIDQ2LTMxIDQwLTIzIDQ0LTEwIDU1djk5MnEwIDI3LTEwIDUwdC0yNyA0MC00MSAyOC01MCAxMEgyNTZWMGgxNTM2ek02NDAgMTI4djM4NGgyNTZWMTI4SDY0MHptMTAyNCA4MDBxMC0zMS05LTU0dC0yNC00NC0zMS00MS0zMS00NS0yMy01OC0xMC03OFYxMjhoLTUxMnY1MTJINzY4djEyOEg2NDBWNjQwSDUxMlYxMjhIMzg0djE3OTJoMzg0di0xMjhoMTI4djEyOGg3NjhWOTI4em0xMjgtODAwaC0xMjh2NDgwcTAgMjQgNCA0MnQxMyAzMyAyMCAyOSAyNyAzMnExNS0xNyAyNi0zMXQyMC0zMCAxMy0zMyA1LTQyVjEyOHpNNjQwIDg5NmgxMjh2MTI4SDY0MFY4OTZ6bTAgMjU2aDEyOHYxMjhINjQwdi0xMjh6bTAgMjU2aDEyOHYxMjhINjQwdi0xMjh6bTEyOCAyNTZ2MTI4SDY0MHYtMTI4aDEyOHptMC03NjhWNzY4aDEyOHYxMjhINzY4em0wIDI1NnYtMTI4aDEyOHYxMjhINzY4em0wIDI1NnYtMTI4aDEyOHYxMjhINzY4em0wIDI1NnYtMTI4aDEyOHYxMjhINzY4eiIgLz4NCjwvc3ZnPg==";
|
|
2
|
+
export declare const AudioIcon = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciDQogICAgdmlld0JveD0iMCAwIDIwNDggMjA0OCINCiAgICB3aWR0aD0iMTJweCINCiAgICBoZWlnaHQ9IjEycHgiPg0KICAgIDxwYXRoIGQ9Ik0xNzkyIDE0MDhxMCA2Mi0yOSAxMDl0LTc2IDgwLTEwNCA1MC0xMTEgMTdxLTU0IDAtMTExLTE3dC0xMDMtNDktNzYtODAtMzAtMTEwcTAtNjEgMjktMTA5dDc2LTgwIDEwNC01MCAxMTEtMTdxNTEgMCAxMDAgMTJ0OTIgMzlWMjI2TDc2OCA0NTB2MTIxNHEwIDYyLTI5IDEwOXQtNzYgODAtMTA0IDUwLTExMSAxN3EtNTQgMC0xMTEtMTd0LTEwMy00OS03Ni04MC0zMC0xMTBxMC02MSAyOS0xMDl0NzYtODAgMTA0LTUwIDExMS0xN3E1MSAwIDEwMCAxMnQ5MiAzOVYzNTBMMTc5MiA2MnYxMzQ2eiIgLz4NCjwvc3ZnPg==";
|
|
3
|
+
export declare const BlankIcon = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciDQogICAgdmlld0JveD0iMCAwIDIwNDggMjA0OCINCiAgICB3aWR0aD0iMTJweCINCiAgICBoZWlnaHQ9IjEycHgiPg0KICAgIDxwYXRoIGQ9Ik01NDkgMGgxMjQzdjE3NTVsLTI5MyAyOTNIMjU2VjI5M0w1NDkgMHptMTExNSAxNzAxVjEyOEg2MDNMMzg0IDM0N3YxNTczaDEwNjFsMjE5LTIxOXoiIC8+DQo8L3N2Zz4=";
|
|
4
|
+
export declare const ExcelIcon = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciDQogICAgdmlld0JveD0iMCAwIDIwNDggMjA0OCINCiAgICB3aWR0aD0iM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4Vjc5MnEzMS0xMSA2My0xN3Q2NS03em0tODA0IDMwMGgtODZWODgzaDkwcTQ3IDAgNzQgMjB0MjcgNzBxMCA1Mi0yOCA3M3QtNzcgMjJ6IiAvPg0KPC9zdmc+";
|
|
9
|
+
export declare const VideoIcon = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciDQogICAgdmlld0JveD0iMCAwIDIwNDggMjA0OCINCiAgICB3aWR0aD0iMTJweCINCiAgICBoZWlnaHQ9IjEycHgiPg0KICAgIDxwYXRoIGQ9Ik0wIDI1NmgyMDQ4djE0MDhIMFYyNTZ6bTI1NiAxMjgwdi0xMjhIMTI4djEyOGgxMjh6bTAtMjU2di0xMjhIMTI4djEyOGgxMjh6bTAtMjU2Vjg5NkgxMjh2MTI4aDEyOHptMC0yNTZWNjQwSDEyOHYxMjhoMTI4em0wLTI1NlYzODRIMTI4djEyOGgxMjh6bTE0MDggNzg2VjM4NEgzODR2ODIzbDQxMS01NDkgNzQxIDg3OC0zMjktNTU4IDEzNy0xMzcgMzIwIDQ1N3ptMjU2IDIzOHYtMTI4aC0xMjh2MTI4aDEyOHptMC0yNTZ2LTEyOGgtMTI4djEyOGgxMjh6bTAtMjU2Vjg5NmgtMTI4djEyOGgxMjh6bTAtMjU2VjY0MGgtMTI4djEyOGgxMjh6bTAtMjU2VjM4NGgtMTI4djEyOGgxMjh6IiAvPg0KPC9zdmc+";
|
|
10
|
+
export declare const VisioIcon = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciDQogICAgdmlld0JveD0iMCAwIDIwNDggMjA0OCINCiAgICB3aWR0aD0iMTJweCINCiAgICBoZWlnaHQ9IjEycHgiPg0KICAgIDxwYXRoIGQ9Ik0yMDQ4IDQ3NXYxNDQ1cTAgMjctMTAgNTB0LTI3IDQwLTQxIDI4LTUwIDEwSDY0MHEtMjcgMC01MC0xMHQtNDAtMj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xMC0yNCA5LTQ0dDI1LTM3IDM2LTI1IDQ1LTloMzk3VjEyOHEwLTI3IDEwLTUwdDI3LTQwIDQxLTI4IDUwLTEwaDkzM3EyNiAwIDQ5IDl0NDIgMjhsMzQ3IDM0N3ExOCAxOCAyNyA0MXQxMCA1MHptLTM4NC0yNTZ2MTY1aDE2NWwtMTY1LTE2NXpNMzIwIDE0MjRoMTYxcTItOCA5LTQzdDE4LTgzIDIxLTEwMyAyMi0xMDEgMTYtNzYgOC0zMWw3IDMwcTcgMzAgMTcgNzd0MjMgMTAwIDIzIDEwMyAxOSA4NCAxMCA0M2gxNjBsMTQ4LTY3Mkg4MzRsLTgwIDQzOC0xMDAtNDM4SDUwMmwtOTYgNDQwLTg2LTQ0MEgxNzBsMTUwIDY3MnptMzIwIDQ5NmgxMjgwVjUxMmgtMjU2cS0yNyAwLTUwLTEwdC00MC0yNy0yOC00MS0xMC01MFYxMjhINjQwdjM4NGgzOTdxMjQgMCA0NCA5dDM3IDI1IDI1IDM2IDkgNDV2OTIycTAgMjQtOSA0NHQtMjUgMzctMzYgMjUtNDUgOUg2NDB2MjU2em02NDAtMTAyNFY3NjhoNTEydjEyOGgtNTEyem0wIDI1NnYtMTI4aDUxMnYxMjhoLTUxMnptMCAyNTZ2LTEyOGg1MTJ2MTI4aC01MTJ6IiAvPg0KPC9zdmc+";
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export declare class Constants {
|
|
2
2
|
static readonly systemMessageTag = "system";
|
|
3
3
|
static readonly userMessageTag = "user";
|
|
4
|
+
static readonly historyMessageTag = "history";
|
|
4
5
|
static readonly agentEndConversationMessageTag = "agentendconversation";
|
|
6
|
+
static readonly supervisorForceCloseMessageTag = "supervisorforceclosedconversation";
|
|
5
7
|
static readonly receivedMessageClassName = "ms_lcw_webchat_received_message";
|
|
6
8
|
static readonly sentMessageClassName = "ms_lcw_webchat_sent_message";
|
|
7
9
|
static readonly webchatChannelId = "webchat";
|
|
@@ -13,6 +15,7 @@ export declare class Constants {
|
|
|
13
15
|
static readonly true = "true";
|
|
14
16
|
static readonly false = "false";
|
|
15
17
|
static readonly maximumUnreadMessageCount = 99;
|
|
18
|
+
static readonly widgetStateDataKey = "LcwChatWidgetState";
|
|
16
19
|
static readonly channelIdKey = "ChannelId-";
|
|
17
20
|
static readonly ChannelId = "lcw";
|
|
18
21
|
static readonly CustomerTag = "FromCustomer";
|
|
@@ -55,7 +58,6 @@ export declare class Constants {
|
|
|
55
58
|
static readonly ProactiveChatInviteTimeoutInMs = 60000;
|
|
56
59
|
static readonly InputSubmit = "InputSubmit";
|
|
57
60
|
static readonly ReconnectIdAttributeName = "oc.reconnectid";
|
|
58
|
-
static readonly redirectPageRequest = "redirectPageRequest";
|
|
59
61
|
static readonly LiveChatWidget = "LiveChatWidgetNew";
|
|
60
62
|
static readonly GuidPattern = "xx-x-4m-ym-xxx";
|
|
61
63
|
static readonly Default = "default";
|
|
@@ -134,6 +136,12 @@ export declare enum ElementType {
|
|
|
134
136
|
export declare enum ChatSDKError {
|
|
135
137
|
WidgetUseOutsideOperatingHour = "WidgetUseOutsideOperatingHour"
|
|
136
138
|
}
|
|
139
|
+
export declare enum EnvironmentVersion {
|
|
140
|
+
prod = "prod",
|
|
141
|
+
dogfood = "df",
|
|
142
|
+
int = "int",
|
|
143
|
+
test = "test"
|
|
144
|
+
}
|
|
137
145
|
export declare class TranscriptConstants {
|
|
138
146
|
static readonly ChatTranscriptsBodyColor = "#F5F5F5";
|
|
139
147
|
static readonly TranscriptMessageEmojiMessageType = "http://schema.skype.com/emoji";
|
|
@@ -146,3 +154,13 @@ export declare class TranscriptConstants {
|
|
|
146
154
|
static readonly AgentDialogColor = "#2266E3";
|
|
147
155
|
static readonly AgentFontColor = "white";
|
|
148
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
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface IContextDataStore {
|
|
2
|
+
/**
|
|
3
|
+
* getData: Get data from data store
|
|
4
|
+
*/
|
|
5
|
+
getData: (key: string, type: string) => any;
|
|
6
|
+
/**
|
|
7
|
+
* setData: Set data to data store
|
|
8
|
+
*/
|
|
9
|
+
setData: (key: string, value: any, type: string) => void;
|
|
10
|
+
/**
|
|
11
|
+
* removeData: Remove data from data store by key
|
|
12
|
+
*/
|
|
13
|
+
removeData?: (key: string) => void;
|
|
14
|
+
}
|
|
@@ -17,6 +17,21 @@ export declare enum LogLevel {
|
|
|
17
17
|
WARN = "WARN",
|
|
18
18
|
ERROR = "ERROR"
|
|
19
19
|
}
|
|
20
|
+
export declare enum BroadcastEvent {
|
|
21
|
+
LoadPostChatSurvey = "LoadPostChatSurvey",
|
|
22
|
+
EndChat = "ChatEnded",
|
|
23
|
+
NewMessageNotification = "NewMessageNotification",
|
|
24
|
+
UnreadMessageCount = "UnreadMessageCount",
|
|
25
|
+
ChatWidgetStateChanged = "ChatWidgetStateChanged",
|
|
26
|
+
ProactiveChatStartChat = "ProactiveChatStartChat",
|
|
27
|
+
ProactiveChatStartPopoutChat = "ProactiveChatStartPopoutChat",
|
|
28
|
+
InvalidAdaptiveCardFormat = "InvalidAdaptiveCardFormat",
|
|
29
|
+
NewMessageSent = "NewMessageSent",
|
|
30
|
+
NewMessageReceived = "NewMessageReceived",
|
|
31
|
+
RedirectPageRequest = "RedirectPageRequest",
|
|
32
|
+
StartChatSkippingChatButtonRendering = "StartChatSkippingChatButtonRendering",
|
|
33
|
+
StartUnauthenticatedReconnectChat = "StartUnauthenticatedReconnectChat"
|
|
34
|
+
}
|
|
20
35
|
export declare enum TelemetryEvent {
|
|
21
36
|
CallAdded = "CallAdded",
|
|
22
37
|
LocalVideoStreamAdded = "LocalVideoStreamAdded",
|
|
@@ -63,7 +78,9 @@ export declare enum TelemetryEvent {
|
|
|
63
78
|
PrechatSurveyLoaded = "PrechatSurveyLoaded",
|
|
64
79
|
PrechatSubmitted = "PrechatSubmitted",
|
|
65
80
|
StartChatSDKCall = "StartChatCall",
|
|
81
|
+
StartChatEventRecevied = "StartChatEventReceived",
|
|
66
82
|
EndChatSDKCall = "EndChatCall",
|
|
83
|
+
EndChatEventReceived = "EndChatEventReceived",
|
|
67
84
|
OnNewMessageFailed = "OnNewMessageFailed",
|
|
68
85
|
OnNewMessageAudioNotificationFailed = "OnNewMessageAudioNotificationFailed",
|
|
69
86
|
DownloadTranscriptResponseNullOrUndefined = "DownloadTranscriptResponseNullOrUndefined",
|
|
@@ -77,6 +94,7 @@ export declare enum TelemetryEvent {
|
|
|
77
94
|
LoadingPaneLoaded = "LoadingPaneLoaded",
|
|
78
95
|
EmailTranscriptLoaded = "EmailTranscriptLoaded",
|
|
79
96
|
OutOfOfficePaneLoaded = "OutOfOfficePaneLoaded",
|
|
97
|
+
PostChatSurveyLoadingPaneLoaded = "PostChatSurveyLoadingPaneLoaded",
|
|
80
98
|
PostChatSurveyLoaded = "PostChatSurveyLoaded",
|
|
81
99
|
ConfirmationPaneLoaded = "ConfirmationPaneLoaded",
|
|
82
100
|
ProactiveChatPaneLoaded = "ProactiveChatPaneLoaded",
|
|
@@ -98,7 +116,10 @@ export declare enum TelemetryEvent {
|
|
|
98
116
|
InvalidConfiguration = "InvalidConfiguration",
|
|
99
117
|
SendTypingIndicatorSucceeded = "SendTypingIndicatorSucceeded",
|
|
100
118
|
SendTypingIndicatorFailed = "SendTypingIndicatorFailed",
|
|
119
|
+
WebChatEvent = "WebChatEvent",
|
|
101
120
|
PreChatSurveyStartChatMethodFailed = "PreChatSurveyStartChatMethodFailed",
|
|
121
|
+
ChatAlreadyTriggered = "ChatAlreadyTriggered",
|
|
122
|
+
StartProactiveChatEventReceived = "StartProactiveChatEventReceived",
|
|
102
123
|
StartProactiveChatMethodFailed = "StartProactiveChatMethodFailed",
|
|
103
124
|
ProactiveChatAccepted = "ProactiveChatAccepted",
|
|
104
125
|
ProactiveChatRejected = "ProactiveChatRejected",
|
|
@@ -106,7 +127,9 @@ export declare enum TelemetryEvent {
|
|
|
106
127
|
ProactiveChatClosed = "ProactiveChatClosed",
|
|
107
128
|
ReconnectChatContinueConversation = "ReconnectChatContinueConversation",
|
|
108
129
|
ReconnectChatStartNewConversation = "ReconnectChatStartNewConversation",
|
|
109
|
-
ReconnectChatMinimize = "ReconnectChatMinimize"
|
|
130
|
+
ReconnectChatMinimize = "ReconnectChatMinimize",
|
|
131
|
+
MessageSent = "MessageSent",
|
|
132
|
+
MessageReceived = "MessageReceived"
|
|
110
133
|
}
|
|
111
134
|
export interface TelemetryInput {
|
|
112
135
|
scenarioType: ScenarioType;
|
|
@@ -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
|
}
|
|
@@ -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
|
}
|
|
@@ -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,7 +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
|
|
10
|
+
* @param adapter : The chat adapter for the live chat session
|
|
11
|
+
* @param state : The chat state where the conversation is currently in
|
|
9
12
|
*/
|
|
10
|
-
|
|
13
|
+
prepareEndChat: (adapter: any, state: ILiveChatWidgetContext) => Promise<void>;
|
|
11
14
|
}
|
|
@@ -12,6 +12,9 @@ export interface IHeaderStatefulParams {
|
|
|
12
12
|
outOfOfficeHeaderProps?: IHeaderProps;
|
|
13
13
|
/**
|
|
14
14
|
* endChat: Internal Prop injected for triggering end of a chat using chatSDK
|
|
15
|
+
* @param adapter : The chat adapter for the live chat session
|
|
16
|
+
* @param skipEndChatSDK : If set to true endchat will skip chatSDK endChat call
|
|
17
|
+
* @param skipCloseChat : If set to true endchat will skip closing the live chat instance
|
|
15
18
|
*/
|
|
16
|
-
endChat: (adapter: any) => Promise<void>;
|
|
19
|
+
endChat: (adapter: any, skipEndChatSDK?: boolean, skipCloseChat?: boolean) => Promise<void>;
|
|
17
20
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const disposeTelemetryLoggers: () => void;
|
|
@@ -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 };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Dispatch } from "react";
|
|
2
2
|
import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
|
|
3
|
-
export declare const setPostChatContextAndLoadSurvey: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>,
|
|
3
|
+
export declare const setPostChatContextAndLoadSurvey: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>, persistedChat?: boolean | undefined) => Promise<void>;
|
|
@@ -3,5 +3,5 @@ import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetA
|
|
|
3
3
|
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
4
4
|
import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
|
|
5
5
|
declare const prepareStartChat: (props: ILiveChatWidgetProps, chatSDK: any, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any) => Promise<void>;
|
|
6
|
-
declare const initStartChat: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, params?: any) => Promise<void>;
|
|
6
|
+
declare const initStartChat: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, params?: any, persistedState?: any) => Promise<void>;
|
|
7
7
|
export { prepareStartChat, initStartChat };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { Dispatch } from "react";
|
|
2
2
|
import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
|
|
3
|
-
|
|
3
|
+
import { IProactiveChatNotificationConfig } from "../../proactivechatpanestateful/interfaces/IProactiveChatNotificationConfig";
|
|
4
|
+
export declare const startProactiveChat: (dispatch: Dispatch<ILiveChatWidgetAction>, notificationConfig?: IProactiveChatNotificationConfig | undefined, enablePreChat?: boolean | undefined, inNewWindow?: boolean | undefined) => void;
|
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;
|
|
@@ -20,6 +20,7 @@ import { ITelemetryConfig } from "../../../common/telemetry/interfaces/ITelemetr
|
|
|
20
20
|
import { IWebChatContainerStatefulProps } from "../../webchatcontainerstateful/interfaces/IWebChatContainerStatefulProps";
|
|
21
21
|
import { OmnichannelChatSDK } from "@microsoft/omnichannel-chat-sdk";
|
|
22
22
|
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
23
|
+
import { IContextDataStore } from "../../../common/interfaces/IContextDataStore";
|
|
23
24
|
export interface ILiveChatWidgetProps {
|
|
24
25
|
audioNotificationProps?: IAudioNotificationProps;
|
|
25
26
|
callingContainerProps?: ICallingContainerProps;
|
|
@@ -44,7 +45,8 @@ export interface ILiveChatWidgetProps {
|
|
|
44
45
|
proactiveChatPaneProps?: IProactiveChatPaneStatefulProps;
|
|
45
46
|
reconnectChatPaneProps?: IReconnectChatPaneStatefulProps;
|
|
46
47
|
styleProps?: ILiveChatWidgetStyleProps;
|
|
47
|
-
telemetryConfig
|
|
48
|
+
telemetryConfig: ITelemetryConfig;
|
|
48
49
|
webChatContainerProps?: IWebChatContainerStatefulProps;
|
|
49
50
|
liveChatContextFromCache?: ILiveChatWidgetContext;
|
|
51
|
+
contextDataStore?: IContextDataStore;
|
|
50
52
|
}
|