@microsoft/omnichannel-chat-widget 1.3.1-main.da9dc59 → 1.4.1-main.22cb7d3
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 +1 -1
- package/lib/cjs/assets/Icons.js +8 -2
- package/lib/cjs/common/telemetry/loggers/ariaTelemetryLogger.js +2 -22
- package/lib/cjs/common/utils.js +19 -2
- package/lib/cjs/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +4 -1
- package/lib/cjs/components/livechatwidget/common/createAdapter.js +5 -0
- package/lib/cjs/components/livechatwidget/common/endChat.js +77 -17
- package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +6 -0
- package/lib/cjs/components/livechatwidget/common/reconnectChatHelper.js +1 -1
- package/lib/cjs/components/livechatwidget/common/renderSurveyHelpers.js +11 -9
- package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +52 -33
- package/lib/cjs/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +5 -2
- package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +32 -13
- package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts.js +6 -3
- package/lib/cjs/components/webchatcontainerstateful/common/mockchatsdk.js +3 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios.js +1 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +40 -101
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Attachment.js +92 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentContent.js +17 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentIcon.js +21 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/DownloadBlockedAttachment.js +36 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/FileScanStatus.js +14 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/MaliciousAttachment.js +24 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/ScanInProgressAttachment.js +24 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Spinner.js +41 -0
- package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +1 -0
- package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +2 -1
- package/lib/cjs/contexts/createReducer.js +8 -0
- package/lib/esm/assets/Icons.js +4 -1
- package/lib/esm/common/telemetry/loggers/ariaTelemetryLogger.js +2 -22
- package/lib/esm/common/utils.js +16 -0
- package/lib/esm/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +5 -2
- package/lib/esm/components/livechatwidget/common/createAdapter.js +5 -0
- package/lib/esm/components/livechatwidget/common/endChat.js +76 -20
- package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +6 -0
- package/lib/esm/components/livechatwidget/common/reconnectChatHelper.js +1 -1
- package/lib/esm/components/livechatwidget/common/renderSurveyHelpers.js +11 -9
- package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +55 -36
- package/lib/esm/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +6 -3
- package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +32 -13
- package/lib/esm/components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts.js +6 -3
- package/lib/esm/components/webchatcontainerstateful/common/mockchatsdk.js +3 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios.js +1 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +36 -96
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Attachment.js +84 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentContent.js +9 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentIcon.js +13 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/DownloadBlockedAttachment.js +28 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/FileScanStatus.js +7 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/MaliciousAttachment.js +16 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/ScanInProgressAttachment.js +16 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Spinner.js +33 -0
- package/lib/esm/contexts/common/LiveChatWidgetActionType.js +1 -0
- package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +2 -1
- package/lib/esm/contexts/createReducer.js +8 -0
- package/lib/types/assets/Icons.d.ts +3 -0
- package/lib/types/common/utils.d.ts +9 -0
- package/lib/types/components/livechatwidget/common/endChat.d.ts +6 -2
- package/lib/types/components/livechatwidget/common/renderSurveyHelpers.d.ts +1 -1
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetControlProps.d.ts +1 -0
- package/lib/types/components/webchatcontainerstateful/common/mockchatsdk.d.ts +1 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios.d.ts +1 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Attachment.d.ts +2 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentContent.d.ts +2 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentIcon.d.ts +2 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/DownloadBlockedAttachment.d.ts +2 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/FileScanStatus.d.ts +6 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/MaliciousAttachment.d.ts +2 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/ScanInProgressAttachment.d.ts +2 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Spinner.d.ts +2 -0
- package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +2 -1
- package/lib/types/contexts/common/ILiveChatWidgetLocalizedTexts.d.ts +16 -0
- package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +2 -1
- package/package.json +5 -3
|
@@ -2,6 +2,10 @@ import { Dispatch } from "react";
|
|
|
2
2
|
import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
|
|
3
3
|
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
4
4
|
import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
|
|
5
|
-
declare const prepareEndChat: (props: ILiveChatWidgetProps, chatSDK: any, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, setWebChatStyles: any, adapter: any
|
|
6
|
-
declare const endChat: (props: ILiveChatWidgetProps, chatSDK: any, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, setWebChatStyles: any, adapter: any, skipEndChatSDK?: boolean | undefined, skipCloseChat?: boolean | undefined, postMessageToOtherTab?: boolean | undefined
|
|
5
|
+
declare const prepareEndChat: (props: ILiveChatWidgetProps, chatSDK: any, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, setWebChatStyles: any, adapter: any) => Promise<void>;
|
|
6
|
+
declare const endChat: (props: ILiveChatWidgetProps, chatSDK: any, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, setWebChatStyles: any, adapter: any, skipEndChatSDK?: boolean | undefined, skipCloseChat?: boolean | undefined, postMessageToOtherTab?: boolean | undefined) => Promise<void>;
|
|
7
|
+
export declare const callingStateCleanUp: (dispatch: Dispatch<ILiveChatWidgetAction>) => Promise<void>;
|
|
8
|
+
export declare const endChatStateCleanUp: (dispatch: Dispatch<ILiveChatWidgetAction>) => Promise<void>;
|
|
9
|
+
export declare const closeChatStateCleanUp: (dispatch: Dispatch<ILiveChatWidgetAction>) => Promise<void>;
|
|
10
|
+
export declare const endVoiceVideoCallIfOngoing: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>) => Promise<void>;
|
|
7
11
|
export { prepareEndChat, endChat };
|
|
@@ -4,6 +4,6 @@ import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidget
|
|
|
4
4
|
import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
|
|
5
5
|
declare const initiatePostChat: (props: ILiveChatWidgetProps, conversationDetailsParam: any, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>, postchatContext: any) => Promise<void>;
|
|
6
6
|
declare const isPostChatEnabled: (props: ILiveChatWidgetProps, state: ILiveChatWidgetContext) => boolean;
|
|
7
|
-
declare const getPostChatContext: (chatSDK: any, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>) => Promise<
|
|
7
|
+
declare const getPostChatContext: (chatSDK: any, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>) => Promise<any>;
|
|
8
8
|
declare const setWidgetStateToInactive: (dispatch: Dispatch<ILiveChatWidgetAction>) => Promise<void>;
|
|
9
9
|
export { initiatePostChat, setWidgetStateToInactive, getPostChatContext, isPostChatEnabled as checkPostChatEnabled };
|
|
@@ -2,6 +2,7 @@ export declare enum NotificationScenarios {
|
|
|
2
2
|
Connection = "connection",
|
|
3
3
|
DownloadTranscriptError = "download transcript",
|
|
4
4
|
EmailTranscriptError = "email transcript",
|
|
5
|
+
EmailAddressSaved = "email address saved",
|
|
5
6
|
AttachmentError = "attachment",
|
|
6
7
|
InternetConnection = "internet connection",
|
|
7
8
|
MaxSizeError = "max size",
|
|
@@ -3,7 +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 { ConfirmationState, ConversationEndEntity } from "../../common/Constants";
|
|
6
|
+
import { ConfirmationState, ConversationEndEntity, ParticipantType } from "../../common/Constants";
|
|
7
7
|
export interface ILiveChatWidgetContext {
|
|
8
8
|
domainStates: {
|
|
9
9
|
liveChatConfig: ChatConfig | undefined;
|
|
@@ -45,6 +45,7 @@ export interface ILiveChatWidgetContext {
|
|
|
45
45
|
conversationEndedBy: ConversationEndEntity;
|
|
46
46
|
chatDisconnectEventReceived: boolean;
|
|
47
47
|
selectedSurveyMode: string | null;
|
|
48
|
+
postChatParticipantType: undefined | ParticipantType;
|
|
48
49
|
};
|
|
49
50
|
uiStates: {
|
|
50
51
|
showConfirmationPane: boolean;
|
|
@@ -21,4 +21,20 @@ export interface ILiveChatWidgetLocalizedTexts {
|
|
|
21
21
|
MARKDOWN_EXTERNAL_LINK_ALT?: string;
|
|
22
22
|
MIDDLEWARE_BANNER_CHAT_DISCONNECT?: string;
|
|
23
23
|
THIRD_PARTY_COOKIES_BLOCKED_ALERT_MESSAGE?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Error message shown when the file is malicious
|
|
26
|
+
* Variable replacement:
|
|
27
|
+
* {0} - File name
|
|
28
|
+
* e.g. "{0} has been blocked because the file may contain a malware."
|
|
29
|
+
*/
|
|
30
|
+
MIDDLEWARE_BANNER_FILE_IS_MALICIOUS?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Success message, indicating the email address introduced has been registered to receive the transcript.
|
|
33
|
+
*/
|
|
34
|
+
MIDDLEWARE_BANNER_FILE_EMAIL_ADDRESS_RECORDED_SUCCESS?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Error message, indicating the email address introduced couldnt be registered.
|
|
37
|
+
* {0} - e-mail address introduced
|
|
38
|
+
*/
|
|
39
|
+
MIDDLEWARE_BANNER_FILE_EMAIL_ADDRESS_RECORDED_ERROR?: string;
|
|
24
40
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/omnichannel-chat-widget",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1-main.22cb7d3",
|
|
4
4
|
"description": "Microsoft Omnichannel Chat Widget",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"types": "lib/types/index.d.ts",
|
|
@@ -74,11 +74,13 @@
|
|
|
74
74
|
"webpack-cli": "^4.9.2"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@microsoft/omnichannel-chat-components": "^1.0.
|
|
78
|
-
"@microsoft/omnichannel-chat-sdk": "1.
|
|
77
|
+
"@microsoft/omnichannel-chat-components": "^1.0.9",
|
|
78
|
+
"@microsoft/omnichannel-chat-sdk": "1.5.5",
|
|
79
79
|
"abort-controller-es5": "^2.0.1",
|
|
80
80
|
"dompurify": "^2.3.4",
|
|
81
81
|
"markdown-it": "^12.3.2",
|
|
82
|
+
"markdown-it-attrs": "^4.1.6",
|
|
83
|
+
"markdown-it-attrs-es5": "^2.0.2",
|
|
82
84
|
"markdown-it-for-inline": "^0.1.1",
|
|
83
85
|
"md5-typescript": "^1.0.5",
|
|
84
86
|
"p-defer-es5": "^2.0.1",
|