@microsoft/omnichannel-chat-widget 0.1.0-main.0c0fd47 → 0.1.0-main.0d1c6e4
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/common/Constants.js +12 -3
- package/lib/cjs/common/storage/default/defaultCacheManager.js +2 -2
- package/lib/cjs/common/storage/default/defaultClientDataStoreProvider.js +15 -6
- package/lib/cjs/common/telemetry/TelemetryConstants.js +35 -4
- package/lib/cjs/common/telemetry/TelemetryHelper.js +2 -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 +5 -2
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js +139 -0
- 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 +14 -10
- package/lib/cjs/components/livechatwidget/common/endChat.js +43 -63
- package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +11 -49
- package/lib/cjs/components/livechatwidget/common/reconnectChatHelper.js +5 -5
- package/lib/cjs/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +254 -2
- package/lib/cjs/components/livechatwidget/common/startChat.js +70 -59
- package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +81 -43
- package/lib/cjs/components/loadingpanestateful/LoadingPaneStateful.js +8 -1
- 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/utils/FileAttachmentIconManager.js +2 -0
- 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/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/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.js +75 -11
- package/lib/cjs/contexts/common/ConversationEndEntity.js +12 -0
- package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +10 -7
- package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +8 -3
- package/lib/cjs/contexts/createReducer.js +28 -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/common/Constants.js +10 -2
- package/lib/esm/common/storage/default/defaultCacheManager.js +2 -2
- package/lib/esm/common/storage/default/defaultClientDataStoreProvider.js +15 -6
- package/lib/esm/common/telemetry/TelemetryConstants.js +35 -4
- package/lib/esm/common/telemetry/TelemetryHelper.js +2 -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 +5 -2
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js +134 -0
- 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 +14 -10
- package/lib/esm/components/livechatwidget/common/endChat.js +45 -65
- package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +13 -51
- package/lib/esm/components/livechatwidget/common/reconnectChatHelper.js +6 -5
- package/lib/esm/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +254 -3
- package/lib/esm/components/livechatwidget/common/startChat.js +70 -59
- package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +82 -44
- package/lib/esm/components/loadingpanestateful/LoadingPaneStateful.js +8 -1
- 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/utils/FileAttachmentIconManager.js +2 -0
- 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/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/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.js +75 -11
- package/lib/esm/contexts/common/ConversationEndEntity.js +5 -0
- package/lib/esm/contexts/common/LiveChatWidgetActionType.js +10 -7
- package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +8 -3
- package/lib/esm/contexts/createReducer.js +28 -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/common/Constants.d.ts +9 -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 +31 -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/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/SendingTimestamp.d.ts +1 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.d.ts +1 -1
- package/lib/types/contexts/common/ConversationEndEntity.d.ts +4 -0
- package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +5 -1
- package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +10 -7
- 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,15 +137,23 @@ 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",
|
|
148
|
+
AttachmentUploadValidatorMiddlewareFailed = "AttachmentUploadValidatorMiddlewareFailed",
|
|
137
149
|
QueuePositionMessageRecieved = "QueuePositionMessageRecieved",
|
|
138
150
|
AverageWaitTimeMessageRecieved = "AverageWaitTimeMessageRecieved",
|
|
139
151
|
DataMaskingRuleApplied = "DataMaskingRuleApplied",
|
|
140
152
|
DataMaskingRuleApplyFailed = "DataMaskingRuleApplyFailed",
|
|
141
153
|
IC3ClientEvent = "IC3ClientEvent",
|
|
142
154
|
ConversationEndedThreadEventReceived = "ConversationEndedThreadEventReceived",
|
|
155
|
+
ConversationEndedByCustomer = "ConversationEndedByCustomer",
|
|
156
|
+
ConversationEndedByAgent = "ConversationEndedByAgent",
|
|
143
157
|
InvalidConfiguration = "InvalidConfiguration",
|
|
144
158
|
SendTypingIndicatorSucceeded = "SendTypingIndicatorSucceeded",
|
|
145
159
|
SendTypingIndicatorFailed = "SendTypingIndicatorFailed",
|
|
@@ -157,9 +171,20 @@ export declare enum TelemetryEvent {
|
|
|
157
171
|
ReconnectChatMinimize = "ReconnectChatMinimize",
|
|
158
172
|
MessageSent = "MessageSent",
|
|
159
173
|
MessageReceived = "MessageReceived",
|
|
174
|
+
SystemMessageReceived = "SystemMessageReceived",
|
|
175
|
+
HistoryMessageReceived = "HistoryMessageReceived",
|
|
160
176
|
CustomContextReceived = "CustomContextReceived",
|
|
161
177
|
NetworkDisconnected = "NetworkDisconnected",
|
|
162
|
-
NetworkReconnected = "NetworkReconnected"
|
|
178
|
+
NetworkReconnected = "NetworkReconnected",
|
|
179
|
+
LinkModePostChatWorkflowStarted = "LinkModePostChatWorkflowStarted",
|
|
180
|
+
EmbedModePostChatWorkflowStarted = "EmbedModePostChatWorkflowStarted",
|
|
181
|
+
PostChatWorkflowFromCustomer = "PostChatWorkflowFromCustomer",
|
|
182
|
+
PostChatWorkflowFromAgent = "PostChatWorkflowFromAgent",
|
|
183
|
+
PostChatWorkflowFromBot = "PostChatWorkflowFromBot",
|
|
184
|
+
PostChatContextCallSucceed = "PostChatContextCallSucceed",
|
|
185
|
+
PostChatContextCallFailed = "PostChatContextCallFailed",
|
|
186
|
+
PostChatSurveyLoadingPaneLoaded = "PostChatSurveyLoadingPaneLoaded",
|
|
187
|
+
PostChatSurveyLoaded = "PostChatSurveyLoaded"
|
|
163
188
|
}
|
|
164
189
|
export interface TelemetryInput {
|
|
165
190
|
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;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
******/
|
|
6
6
|
import { IWebChatAction } from "../../../interfaces/IWebChatAction";
|
|
7
7
|
import { ILiveChatWidgetLocalizedTexts } from "../../../../../contexts/common/ILiveChatWidgetLocalizedTexts";
|
|
8
|
-
declare const createAttachmentUploadValidatorMiddleware: (allowedFileExtensions: string,
|
|
8
|
+
declare const createAttachmentUploadValidatorMiddleware: (allowedFileExtensions: string, maxFileSizeSupportedByDynamics: string, localizedTexts: ILiveChatWidgetLocalizedTexts) => ({ dispatch }: {
|
|
9
9
|
dispatch: any;
|
|
10
10
|
}) => (next: any) => (action: IWebChatAction) => any;
|
|
11
11
|
export default createAttachmentUploadValidatorMiddleware;
|
|
@@ -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;
|
|
@@ -37,7 +38,10 @@ export interface ILiveChatWidgetContext {
|
|
|
37
38
|
};
|
|
38
39
|
e2vvEnabled: boolean;
|
|
39
40
|
unreadMessageCount: number;
|
|
40
|
-
|
|
41
|
+
conversationEndedByAgentEventReceived: boolean;
|
|
42
|
+
conversationEndedBy: ConversationEndEntity | undefined;
|
|
43
|
+
postChatWorkflowInProgress: boolean;
|
|
44
|
+
shouldUseBotSurvey: boolean;
|
|
41
45
|
};
|
|
42
46
|
uiStates: {
|
|
43
47
|
showConfirmationPane: boolean;
|
|
@@ -28,11 +28,14 @@ export declare enum LiveChatWidgetActionType {
|
|
|
28
28
|
SET_RECONNECT_ID = 26,
|
|
29
29
|
SET_UNREAD_MESSAGE_COUNT = 27,
|
|
30
30
|
SET_FOCUS_CHAT_BUTTON = 28,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
|
38
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.0d1c6e4",
|
|
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",
|