@microsoft/omnichannel-chat-widget 0.1.0-main.170e416 → 0.1.0-main.18d1166
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 +7 -34
- package/lib/cjs/assets/Icons.js +4 -2
- package/lib/cjs/common/Constants.js +9 -3
- package/lib/cjs/common/KeyCodes.js +3 -1
- package/lib/cjs/common/contextDataStore/DataStoreManager.js +3 -1
- package/lib/cjs/common/storage/default/defaultCacheManager.js +5 -3
- package/lib/cjs/common/storage/default/defaultClientDataStoreProvider.js +15 -6
- package/lib/cjs/common/telemetry/TelemetryConstants.js +34 -4
- package/lib/cjs/common/telemetry/TelemetryHelper.js +5 -2
- package/lib/cjs/common/telemetry/TelemetryManager.js +3 -1
- package/lib/cjs/common/utils.js +23 -2
- package/lib/cjs/components/confirmationpanestateful/ConfirmationPaneStateful.js +12 -19
- package/lib/cjs/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +1 -1
- package/lib/cjs/components/headerstateful/HeaderStateful.js +7 -4
- package/lib/cjs/components/livechatwidget/common/ActivityStreamHandler.js +3 -1
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js +139 -0
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +3 -1
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +3 -1
- package/lib/cjs/components/livechatwidget/common/ChatAdapterShim.js +3 -1
- package/lib/cjs/components/livechatwidget/common/Deferred.js +3 -1
- package/lib/cjs/components/livechatwidget/common/agentEndConversationHelper.js +36 -0
- package/lib/cjs/components/livechatwidget/common/createAdapter.js +2 -0
- package/lib/cjs/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +66 -14
- package/lib/cjs/components/livechatwidget/common/endChat.js +41 -49
- package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +11 -49
- package/lib/cjs/components/livechatwidget/common/reconnectChatHelper.js +6 -9
- package/lib/cjs/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +254 -2
- package/lib/cjs/components/livechatwidget/common/startChat.js +76 -53
- package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +82 -44
- package/lib/cjs/components/loadingpanestateful/LoadingPaneStateful.js +22 -2
- package/lib/cjs/components/loadingpanestateful/common/errorUIStyleProps/errorUILoadingPaneStyleProps.js +57 -0
- package/lib/cjs/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +3 -1
- package/lib/cjs/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +1 -1
- package/lib/cjs/components/prechatsurveypanestateful/common/defaultStyles/defaultGeneralPreChatSurveyPaneStyleProps.js +1 -1
- package/lib/cjs/components/webchatcontainerstateful/common/mockadapter.js +3 -1
- package/lib/cjs/components/webchatcontainerstateful/common/mockchatsdk.js +3 -1
- package/lib/cjs/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.js +2 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +3 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/WebChatStoreLoader.js +3 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.js +1 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +2 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageBoxStyles.js +1 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageBoxStyles.js +1 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +5 -6
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +2 -14
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/SendingTimestamp.js +2 -11
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/typingIndicatorMiddleware.js +7 -3
- package/lib/cjs/contexts/common/ConversationEndEntity.js +12 -0
- package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +32 -28
- package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +9 -3
- package/lib/cjs/contexts/createReducer.js +36 -2
- package/lib/cjs/hooks/useDebounce.js +28 -0
- package/lib/cjs/hooks/useWindowDimensions.js +30 -0
- package/lib/cjs/plugins/newMessageEventHandler.js +14 -0
- package/lib/esm/assets/Icons.js +2 -1
- package/lib/esm/common/Constants.js +9 -3
- package/lib/esm/common/KeyCodes.js +3 -1
- package/lib/esm/common/contextDataStore/DataStoreManager.js +3 -1
- package/lib/esm/common/storage/default/defaultCacheManager.js +5 -3
- package/lib/esm/common/storage/default/defaultClientDataStoreProvider.js +15 -6
- package/lib/esm/common/telemetry/TelemetryConstants.js +34 -4
- package/lib/esm/common/telemetry/TelemetryHelper.js +5 -2
- package/lib/esm/common/telemetry/TelemetryManager.js +3 -1
- package/lib/esm/common/utils.js +20 -0
- package/lib/esm/components/confirmationpanestateful/ConfirmationPaneStateful.js +12 -19
- package/lib/esm/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +1 -1
- package/lib/esm/components/headerstateful/HeaderStateful.js +7 -4
- package/lib/esm/components/livechatwidget/common/ActivityStreamHandler.js +3 -1
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js +134 -0
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +3 -1
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +3 -1
- package/lib/esm/components/livechatwidget/common/ChatAdapterShim.js +3 -1
- package/lib/esm/components/livechatwidget/common/Deferred.js +3 -1
- package/lib/esm/components/livechatwidget/common/agentEndConversationHelper.js +30 -0
- package/lib/esm/components/livechatwidget/common/createAdapter.js +2 -0
- package/lib/esm/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +66 -14
- package/lib/esm/components/livechatwidget/common/endChat.js +43 -51
- package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +13 -51
- package/lib/esm/components/livechatwidget/common/reconnectChatHelper.js +7 -9
- package/lib/esm/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +254 -3
- package/lib/esm/components/livechatwidget/common/startChat.js +76 -53
- package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +83 -45
- package/lib/esm/components/loadingpanestateful/LoadingPaneStateful.js +22 -2
- package/lib/esm/components/loadingpanestateful/common/errorUIStyleProps/errorUILoadingPaneStyleProps.js +50 -0
- package/lib/esm/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +3 -1
- package/lib/esm/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +1 -1
- package/lib/esm/components/prechatsurveypanestateful/common/defaultStyles/defaultGeneralPreChatSurveyPaneStyleProps.js +1 -1
- package/lib/esm/components/webchatcontainerstateful/common/mockadapter.js +3 -1
- package/lib/esm/components/webchatcontainerstateful/common/mockchatsdk.js +3 -1
- package/lib/esm/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.js +2 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +3 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/WebChatStoreLoader.js +3 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.js +1 -3
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +2 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageBoxStyles.js +1 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageBoxStyles.js +1 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +5 -6
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +2 -14
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/SendingTimestamp.js +2 -11
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/typingIndicatorMiddleware.js +5 -3
- package/lib/esm/contexts/common/ConversationEndEntity.js +5 -0
- package/lib/esm/contexts/common/LiveChatWidgetActionType.js +32 -28
- package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +9 -3
- package/lib/esm/contexts/createReducer.js +36 -2
- package/lib/esm/hooks/useDebounce.js +22 -0
- package/lib/esm/hooks/useWindowDimensions.js +23 -0
- package/lib/esm/plugins/newMessageEventHandler.js +14 -0
- package/lib/types/assets/Icons.d.ts +1 -0
- package/lib/types/common/Constants.d.ts +4 -0
- package/lib/types/common/storage/default/defaultCacheManager.d.ts +1 -1
- package/lib/types/common/storage/default/defaultClientDataStoreProvider.d.ts +1 -1
- package/lib/types/common/telemetry/TelemetryConstants.d.ts +30 -6
- package/lib/types/common/telemetry/definitions/Contracts.d.ts +2 -0
- package/lib/types/common/telemetry/definitions/Payload.d.ts +1 -0
- package/lib/types/common/telemetry/interfaces/ITelemetryConfig.d.ts +4 -0
- package/lib/types/common/utils.d.ts +1 -0
- package/lib/types/components/confirmationpanestateful/interfaces/IConfirmationPaneStatefulParams.d.ts +0 -7
- package/lib/types/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.d.ts +9 -0
- package/lib/types/components/livechatwidget/common/agentEndConversationHelper.d.ts +6 -0
- package/lib/types/components/livechatwidget/common/initWebChatComposer.d.ts +1 -1
- package/lib/types/components/livechatwidget/common/setPostChatContextAndLoadSurvey.d.ts +6 -1
- package/lib/types/components/livechatwidget/common/startChat.d.ts +3 -3
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetControlProps.d.ts +2 -0
- package/lib/types/components/loadingpanestateful/common/errorUIStyleProps/errorUILoadingPaneStyleProps.d.ts +2 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/SendingTimestamp.d.ts +1 -1
- package/lib/types/contexts/common/ConversationEndEntity.d.ts +4 -0
- package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +6 -1
- package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +32 -28
- package/lib/types/hooks/useDebounce.d.ts +3 -0
- package/lib/types/hooks/useWindowDimensions.d.ts +4 -0
- package/package.json +3 -3
|
@@ -42,7 +42,13 @@ export declare enum BroadcastEvent {
|
|
|
42
42
|
CloseChat = "CloseChat",
|
|
43
43
|
InitiateEndChatOnBrowserUnload = "InitiateEndChatOnBrowserUnload",
|
|
44
44
|
ClosePopoutWindow = "ClosePopoutWindow",
|
|
45
|
-
RaiseErrorEvent = "RaiseErrorEvent"
|
|
45
|
+
RaiseErrorEvent = "RaiseErrorEvent",
|
|
46
|
+
NetworkDisconnected = "NetworkDisconnected",
|
|
47
|
+
NetworkReconnected = "NetworkReconnected",
|
|
48
|
+
SigninCardReceived = "SignInCardReceived",
|
|
49
|
+
BotAuthConfigRequest = "BotAuthConfigRequest",
|
|
50
|
+
BotAuthConfigResponse = "BotAuthConfigResponse",
|
|
51
|
+
HideChatVisibilityChangeEvent = "hideChatVisibilityChangeEvent"
|
|
46
52
|
}
|
|
47
53
|
export declare enum TelemetryEvent {
|
|
48
54
|
CallAdded = "CallAdded",
|
|
@@ -77,11 +83,10 @@ export declare enum TelemetryEvent {
|
|
|
77
83
|
GetConversationDetailsCallFailed = "GetConversationDetailsCallFailed",
|
|
78
84
|
EndChatSDKCallFailed = "EndChatSDKCallFailed",
|
|
79
85
|
GetChatReconnectContextSDKCallFailed = "GetChatReconnectContextSDKCallFailed",
|
|
80
|
-
PostChatContextCallSucceed = "PostChatContextCallSucceed",
|
|
81
|
-
PostChatContextCallFailed = "PostChatContextCallFailed",
|
|
82
86
|
ParseAdaptiveCardFailed = "ParseAdaptiveCardFailed",
|
|
83
87
|
ClientDataStoreProviderFailed = "ClientDataStoreProviderFailed",
|
|
84
88
|
InMemoryDataStoreFailed = "InMemoryDataStoreFailed",
|
|
89
|
+
ChatVisibilityChanged = "ChatVisibilityChanged",
|
|
85
90
|
WebChatLoaded = "WebChatLoaded",
|
|
86
91
|
LCWChatButtonClicked = "LCWChatButtonClicked",
|
|
87
92
|
LCWChatButtonShow = "LCWChatButtonShow",
|
|
@@ -89,6 +94,7 @@ export declare enum TelemetryEvent {
|
|
|
89
94
|
WidgetLoadComplete = "WidgetLoadComplete",
|
|
90
95
|
WidgetLoadFailed = "WidgetLoadFailed",
|
|
91
96
|
StartChatMethodException = "StartChatMethodException",
|
|
97
|
+
CloseChatCall = "CloseChatCall",
|
|
92
98
|
CloseChatMethodException = "CloseChatMethodException",
|
|
93
99
|
PrechatSurveyLoaded = "PrechatSurveyLoaded",
|
|
94
100
|
PrechatSubmitted = "PrechatSubmitted",
|
|
@@ -102,6 +108,7 @@ export declare enum TelemetryEvent {
|
|
|
102
108
|
DownloadTranscriptResponseNullOrUndefined = "DownloadTranscriptResponseNullOrUndefined",
|
|
103
109
|
EmailTranscriptSent = "EmailTranscriptSent",
|
|
104
110
|
EmailTranscriptFailed = "EmailTranscriptFailed",
|
|
111
|
+
ErrorUIPaneLoaded = "ErrorUIPaneLoaded",
|
|
105
112
|
DownloadTranscriptFailed = "DownloadTranscriptFailed",
|
|
106
113
|
StartChatFailed = "StartChatFailed",
|
|
107
114
|
IC3ThreadUpdateEventReceived = "IC3ThreadUpdateEventReceived",
|
|
@@ -110,8 +117,6 @@ export declare enum TelemetryEvent {
|
|
|
110
117
|
LoadingPaneLoaded = "LoadingPaneLoaded",
|
|
111
118
|
EmailTranscriptLoaded = "EmailTranscriptLoaded",
|
|
112
119
|
OutOfOfficePaneLoaded = "OutOfOfficePaneLoaded",
|
|
113
|
-
PostChatSurveyLoadingPaneLoaded = "PostChatSurveyLoadingPaneLoaded",
|
|
114
|
-
PostChatSurveyLoaded = "PostChatSurveyLoaded",
|
|
115
120
|
ConfirmationPaneLoaded = "ConfirmationPaneLoaded",
|
|
116
121
|
ProactiveChatPaneLoaded = "ProactiveChatPaneLoaded",
|
|
117
122
|
ReconnectChatPaneLoaded = "ReconnectChatPaneLoaded",
|
|
@@ -124,6 +129,7 @@ export declare enum TelemetryEvent {
|
|
|
124
129
|
SuppressBotMagicCodeSucceeded = "SuppressBotMagicCodeSucceeded",
|
|
125
130
|
SuppressBotMagicCodeFailed = "SuppressBotMagicCodeFailed",
|
|
126
131
|
GetConversationDetailsException = "GetConversationDetailsException",
|
|
132
|
+
AppStatesException = "AppStatesException",
|
|
127
133
|
BrowserUnloadEventStarted = "BrowserUnloadEventStarted",
|
|
128
134
|
GetAuthTokenCalled = "GetAuthTokenCalled",
|
|
129
135
|
GetAuthTokenFailed = "GetAuthTokenFailed",
|
|
@@ -131,6 +137,11 @@ export declare enum TelemetryEvent {
|
|
|
131
137
|
CustomerVoiceResponsePageLoaded = "CustomerVoiceResponsePageLoaded",
|
|
132
138
|
CustomerVoiceFormResponseSubmitted = "CustomerVoiceFormResponseSubmitted",
|
|
133
139
|
CustomerVoiceFormResponseError = "CustomerVoiceFormResponseError",
|
|
140
|
+
BotAuthActivityEmptySasUrl = "BotAuthActivityEmptySasUrl",
|
|
141
|
+
SetBotAuthProviderFetchConfig = "SetBotAuthProviderFetchConfig",
|
|
142
|
+
SetBotAuthProviderHideCard = "SetBotAuthProviderHideCard",
|
|
143
|
+
SetBotAuthProviderDisplayCard = "SetBotAuthProviderDisplayCard",
|
|
144
|
+
SetBotAuthProviderNotFound = "SetBotAuthProviderNotFound",
|
|
134
145
|
ProcessingHTMLTextMiddlewareFailed = "ProcessingHTMLTextMiddlewareFailed",
|
|
135
146
|
ProcessingSanitizationMiddlewareFailed = "ProcessingSanitizationMiddlewareFailed",
|
|
136
147
|
FormatTagsMiddlewareJSONStringifyFailed = "FormatTagsMiddlewareJSONStringifyFailed",
|
|
@@ -140,6 +151,8 @@ export declare enum TelemetryEvent {
|
|
|
140
151
|
DataMaskingRuleApplyFailed = "DataMaskingRuleApplyFailed",
|
|
141
152
|
IC3ClientEvent = "IC3ClientEvent",
|
|
142
153
|
ConversationEndedThreadEventReceived = "ConversationEndedThreadEventReceived",
|
|
154
|
+
ConversationEndedByCustomer = "ConversationEndedByCustomer",
|
|
155
|
+
ConversationEndedByAgent = "ConversationEndedByAgent",
|
|
143
156
|
InvalidConfiguration = "InvalidConfiguration",
|
|
144
157
|
SendTypingIndicatorSucceeded = "SendTypingIndicatorSucceeded",
|
|
145
158
|
SendTypingIndicatorFailed = "SendTypingIndicatorFailed",
|
|
@@ -157,9 +170,20 @@ export declare enum TelemetryEvent {
|
|
|
157
170
|
ReconnectChatMinimize = "ReconnectChatMinimize",
|
|
158
171
|
MessageSent = "MessageSent",
|
|
159
172
|
MessageReceived = "MessageReceived",
|
|
173
|
+
SystemMessageReceived = "SystemMessageReceived",
|
|
174
|
+
HistoryMessageReceived = "HistoryMessageReceived",
|
|
160
175
|
CustomContextReceived = "CustomContextReceived",
|
|
161
176
|
NetworkDisconnected = "NetworkDisconnected",
|
|
162
|
-
NetworkReconnected = "NetworkReconnected"
|
|
177
|
+
NetworkReconnected = "NetworkReconnected",
|
|
178
|
+
LinkModePostChatWorkflowStarted = "LinkModePostChatWorkflowStarted",
|
|
179
|
+
EmbedModePostChatWorkflowStarted = "EmbedModePostChatWorkflowStarted",
|
|
180
|
+
PostChatWorkflowFromCustomer = "PostChatWorkflowFromCustomer",
|
|
181
|
+
PostChatWorkflowFromAgent = "PostChatWorkflowFromAgent",
|
|
182
|
+
PostChatWorkflowFromBot = "PostChatWorkflowFromBot",
|
|
183
|
+
PostChatContextCallSucceed = "PostChatContextCallSucceed",
|
|
184
|
+
PostChatContextCallFailed = "PostChatContextCallFailed",
|
|
185
|
+
PostChatSurveyLoadingPaneLoaded = "PostChatSurveyLoadingPaneLoaded",
|
|
186
|
+
PostChatSurveyLoaded = "PostChatSurveyLoaded"
|
|
163
187
|
}
|
|
164
188
|
export interface TelemetryInput {
|
|
165
189
|
scenarioType: ScenarioType;
|
|
@@ -32,6 +32,8 @@ export interface LoadContract extends BaseContract {
|
|
|
32
32
|
export interface ActionsContract extends BaseContract {
|
|
33
33
|
Event?: string;
|
|
34
34
|
ActionType?: string;
|
|
35
|
+
Description?: string;
|
|
36
|
+
CustomProperties?: any;
|
|
35
37
|
}
|
|
36
38
|
export interface IC3ClientContract extends BaseContract {
|
|
37
39
|
Event?: string;
|
|
@@ -72,6 +72,7 @@ export interface ActionTelemetryData extends BaseTelemetryData {
|
|
|
72
72
|
ActionType?: string;
|
|
73
73
|
ExceptionDetails?: object;
|
|
74
74
|
Description?: string;
|
|
75
|
+
CustomProperties?: any;
|
|
75
76
|
}
|
|
76
77
|
export interface CallingTelemetryData extends BaseTelemetryData {
|
|
77
78
|
CallId?: string;
|
|
@@ -28,3 +28,4 @@ export declare const getStateFromCache: (orgId: string, widgetId: string, widget
|
|
|
28
28
|
export declare const isUndefinedOrEmpty: (object: any) => boolean;
|
|
29
29
|
export declare const addDelayInMs: (ms: number) => Promise<void>;
|
|
30
30
|
export declare const getBroadcastChannelName: (widgetId: string, widgetInstanceId: string) => string;
|
|
31
|
+
export declare const debounceLeading: (fn: any, ms?: number) => (...args: any[]) => void;
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
2
1
|
import { IConfirmationPaneStatefulProps } from "./IConfirmationPaneStatefulProps";
|
|
3
2
|
export interface IConfirmationPaneStatefulParams extends IConfirmationPaneStatefulProps {
|
|
4
3
|
/**
|
|
5
4
|
* setPostChatContext: Internal Prop injected for setting Post Chat Context
|
|
6
5
|
*/
|
|
7
6
|
setPostChatContext: () => Promise<void>;
|
|
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
|
|
12
|
-
*/
|
|
13
|
-
prepareEndChat: (adapter: any, state: ILiveChatWidgetContext) => Promise<void>;
|
|
14
7
|
}
|
package/lib/types/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IActivitySubscriber } from "./IActivitySubscriber";
|
|
2
|
+
export declare class BotAuthActivitySubscriber implements IActivitySubscriber {
|
|
3
|
+
observer: any;
|
|
4
|
+
private signInCardSeen;
|
|
5
|
+
constructor();
|
|
6
|
+
applicable(activity: any): boolean;
|
|
7
|
+
apply(activity: any): Promise<any>;
|
|
8
|
+
next(activity: any): Promise<any>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Dispatch } from "react";
|
|
2
|
+
import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
|
|
3
|
+
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
4
|
+
import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
|
|
5
|
+
declare const handleAgentEndConversation: (props: ILiveChatWidgetProps, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>) => void;
|
|
6
|
+
export { handleAgentEndConversation };
|
|
@@ -3,4 +3,4 @@ import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetA
|
|
|
3
3
|
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
4
4
|
import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
|
|
5
5
|
import { IWebChatProps } from "../../webchatcontainerstateful/interfaces/IWebChatProps";
|
|
6
|
-
export declare const initWebChatComposer: (props: ILiveChatWidgetProps, chatSDK: any, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>, setWebChatStyles: any) => IWebChatProps;
|
|
6
|
+
export declare const initWebChatComposer: (props: ILiveChatWidgetProps, chatSDK: any, setAdapter: any, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>, adapter: any, setWebChatStyles: any) => IWebChatProps;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import { Dispatch } from "react";
|
|
2
2
|
import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
|
|
3
|
-
|
|
3
|
+
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
4
|
+
import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
|
|
5
|
+
declare const setPostChatContextAndLoadSurvey: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>, persistedChat?: boolean | undefined) => Promise<void>;
|
|
6
|
+
declare const checkPostChatEnabled: (props: ILiveChatWidgetProps, state: ILiveChatWidgetContext) => boolean;
|
|
7
|
+
declare const initiatePostChat: (props: ILiveChatWidgetProps, chatSDK: any, setAdapter: any, setWebChatStyles: any, dispatch: Dispatch<ILiveChatWidgetAction>, adapter: any, state: ILiveChatWidgetContext) => Promise<void>;
|
|
8
|
+
export { setPostChatContextAndLoadSurvey, checkPostChatEnabled, initiatePostChat };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import ChatConfig from "@microsoft/omnichannel-chat-sdk/lib/core/ChatConfig";
|
|
2
1
|
import { Dispatch } from "react";
|
|
3
2
|
import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
|
|
4
3
|
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
5
4
|
import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
|
|
5
|
+
import StartChatOptionalParams from "@microsoft/omnichannel-chat-sdk/lib/core/StartChatOptionalParams";
|
|
6
6
|
declare const prepareStartChat: (props: ILiveChatWidgetProps, chatSDK: any, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any) => Promise<void>;
|
|
7
7
|
declare const setPreChatAndInitiateChat: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, isProactiveChat?: boolean | undefined, proactiveChatEnablePrechatState?: boolean | undefined, state?: ILiveChatWidgetContext | undefined, props?: ILiveChatWidgetProps | undefined) => Promise<void>;
|
|
8
|
-
declare const initStartChat: (chatSDK: any,
|
|
9
|
-
declare const checkIfConversationStillValid: (chatSDK: any, props:
|
|
8
|
+
declare const initStartChat: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, props?: ILiveChatWidgetProps | undefined, params?: StartChatOptionalParams | undefined, persistedState?: any) => Promise<void>;
|
|
9
|
+
declare const checkIfConversationStillValid: (chatSDK: any, props: ILiveChatWidgetProps, requestId: any, dispatch: Dispatch<ILiveChatWidgetAction>) => Promise<boolean>;
|
|
10
10
|
export { prepareStartChat, initStartChat, setPreChatAndInitiateChat, checkIfConversationStillValid };
|
|
@@ -4,6 +4,7 @@ export interface ILiveChatWidgetControlProps {
|
|
|
4
4
|
hideCallingContainer?: boolean;
|
|
5
5
|
hideChatButton?: boolean;
|
|
6
6
|
hideConfirmationPane?: boolean;
|
|
7
|
+
hideErrorUIPane?: boolean;
|
|
7
8
|
hideFooter?: boolean;
|
|
8
9
|
hideHeader?: boolean;
|
|
9
10
|
hideLoadingPane?: boolean;
|
|
@@ -15,4 +16,5 @@ export interface ILiveChatWidgetControlProps {
|
|
|
15
16
|
hideWebChatContainer?: boolean;
|
|
16
17
|
hideStartChatButton?: boolean;
|
|
17
18
|
widgetInstanceId?: string | undefined;
|
|
19
|
+
cacheTtlInMins?: number;
|
|
18
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SendingTimestamp: (
|
|
1
|
+
export declare const SendingTimestamp: () => JSX.Element;
|
|
@@ -3,6 +3,7 @@ import { ConversationState } from "./ConversationState";
|
|
|
3
3
|
import { IInternalTelemetryData } from "../../common/telemetry/interfaces/IInternalTelemetryData";
|
|
4
4
|
import { ILiveChatWidgetLocalizedTexts } from "./ILiveChatWidgetLocalizedTexts";
|
|
5
5
|
import { IRenderingMiddlewareProps } from "../../components/webchatcontainerstateful/interfaces/IRenderingMiddlewareProps";
|
|
6
|
+
import { ConversationEndEntity } from "./ConversationEndEntity";
|
|
6
7
|
export interface ILiveChatWidgetContext {
|
|
7
8
|
domainStates: {
|
|
8
9
|
liveChatConfig: ChatConfig | undefined;
|
|
@@ -23,6 +24,7 @@ export interface ILiveChatWidgetContext {
|
|
|
23
24
|
conversationState: ConversationState;
|
|
24
25
|
isMinimized: boolean;
|
|
25
26
|
previousElementIdOnFocusBeforeModalOpen: string | null;
|
|
27
|
+
isStartChatFailing: boolean;
|
|
26
28
|
outsideOperatingHours: boolean;
|
|
27
29
|
preChatResponseEmail: string;
|
|
28
30
|
isAudioMuted: boolean | null;
|
|
@@ -36,7 +38,10 @@ export interface ILiveChatWidgetContext {
|
|
|
36
38
|
};
|
|
37
39
|
e2vvEnabled: boolean;
|
|
38
40
|
unreadMessageCount: number;
|
|
39
|
-
|
|
41
|
+
conversationEndedByAgentEventReceived: boolean;
|
|
42
|
+
conversationEndedBy: ConversationEndEntity | undefined;
|
|
43
|
+
postChatWorkflowInProgress: boolean;
|
|
44
|
+
shouldUseBotSurvey: boolean;
|
|
40
45
|
};
|
|
41
46
|
uiStates: {
|
|
42
47
|
showConfirmationPane: boolean;
|
|
@@ -6,32 +6,36 @@ export declare enum LiveChatWidgetActionType {
|
|
|
6
6
|
SET_MINIMIZED = 4,
|
|
7
7
|
SET_CONVERSATION_STATE = 5,
|
|
8
8
|
SET_PREVIOUS_FOCUSED_ELEMENT_ID = 6,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
9
|
+
SET_START_CHAT_FAILING = 7,
|
|
10
|
+
SET_OUTSIDE_OPERATING_HOURS = 8,
|
|
11
|
+
SET_PRE_CHAT_SURVEY_RESPONSE = 9,
|
|
12
|
+
SET_CUSTOM_CONTEXT = 10,
|
|
13
|
+
SET_SHOW_CONFIRMATION = 11,
|
|
14
|
+
SET_SHOW_EMAIL_TRANSCRIPT_PANE = 12,
|
|
15
|
+
SET_PRECHAT_RESPONSE_EMAIL = 13,
|
|
16
|
+
SET_AUDIO_NOTIFICATION = 14,
|
|
17
|
+
SET_E2VV_ENABLED = 15,
|
|
18
|
+
SET_POST_CHAT_CONTEXT = 16,
|
|
19
|
+
SHOW_CALLING_CONTAINER = 17,
|
|
20
|
+
SET_INCOMING_CALL = 18,
|
|
21
|
+
DISABLE_VIDEO_CALL = 19,
|
|
22
|
+
DISABLE_LOCAL_VIDEO = 20,
|
|
23
|
+
DISABLE_REMOTE_VIDEO = 21,
|
|
24
|
+
SET_CHAT_TOKEN = 22,
|
|
25
|
+
SET_START_CHAT_BUTTON_DISPLAY = 23,
|
|
26
|
+
SET_PROACTIVE_CHAT_PARAMS = 24,
|
|
27
|
+
SET_TELEMETRY_DATA = 25,
|
|
28
|
+
SET_RECONNECT_ID = 26,
|
|
29
|
+
SET_UNREAD_MESSAGE_COUNT = 27,
|
|
30
|
+
SET_FOCUS_CHAT_BUTTON = 28,
|
|
31
|
+
SET_CONVERSATION_ENDED_BY_AGENT_EVENT_RECEIVED = 29,
|
|
32
|
+
SET_CONVERSATION_ENDED_BY = 30,
|
|
33
|
+
SET_WIDGET_STATE = 31,
|
|
34
|
+
SET_LIVE_CHAT_CONTEXT = 32,
|
|
35
|
+
SET_BOT_OAUTH_SIGNIN_ID = 33,
|
|
36
|
+
SET_WIDGET_SIZE = 34,
|
|
37
|
+
SET_WIDGET_INSTANCE_ID = 35,
|
|
38
|
+
SET_LIVE_CHAT_CONFIG = 36,
|
|
39
|
+
SET_POST_CHAT_WORKFLOW_IN_PROGRESS = 37,
|
|
40
|
+
SET_SHOULD_USE_BOT_SURVEY = 38
|
|
37
41
|
}
|
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.18d1166",
|
|
4
4
|
"description": "Microsoft Omnichannel Chat Widget",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"types": "lib/types/index.d.ts",
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
76
|
"@fluentui/react": "^8.49.1",
|
|
77
|
-
"@microsoft/omnichannel-chat-components": "0.1.0-main.
|
|
78
|
-
"@microsoft/omnichannel-chat-sdk": "1.
|
|
77
|
+
"@microsoft/omnichannel-chat-components": "0.1.0-main.f4c21f0",
|
|
78
|
+
"@microsoft/omnichannel-chat-sdk": "1.2.1-main.171bfbe",
|
|
79
79
|
"abort-controller-es5": "^2.0.1",
|
|
80
80
|
"dompurify": "^2.3.4",
|
|
81
81
|
"markdown-it": "^12.3.2",
|