@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.
Files changed (74) hide show
  1. package/README.md +1 -1
  2. package/lib/cjs/assets/Icons.js +8 -2
  3. package/lib/cjs/common/telemetry/loggers/ariaTelemetryLogger.js +2 -22
  4. package/lib/cjs/common/utils.js +19 -2
  5. package/lib/cjs/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +4 -1
  6. package/lib/cjs/components/livechatwidget/common/createAdapter.js +5 -0
  7. package/lib/cjs/components/livechatwidget/common/endChat.js +77 -17
  8. package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +6 -0
  9. package/lib/cjs/components/livechatwidget/common/reconnectChatHelper.js +1 -1
  10. package/lib/cjs/components/livechatwidget/common/renderSurveyHelpers.js +11 -9
  11. package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +52 -33
  12. package/lib/cjs/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +5 -2
  13. package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +32 -13
  14. package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts.js +6 -3
  15. package/lib/cjs/components/webchatcontainerstateful/common/mockchatsdk.js +3 -0
  16. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios.js +1 -0
  17. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +40 -101
  18. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Attachment.js +92 -0
  19. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentContent.js +17 -0
  20. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentIcon.js +21 -0
  21. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/DownloadBlockedAttachment.js +36 -0
  22. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/FileScanStatus.js +14 -0
  23. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/MaliciousAttachment.js +24 -0
  24. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/ScanInProgressAttachment.js +24 -0
  25. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Spinner.js +41 -0
  26. package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +1 -0
  27. package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +2 -1
  28. package/lib/cjs/contexts/createReducer.js +8 -0
  29. package/lib/esm/assets/Icons.js +4 -1
  30. package/lib/esm/common/telemetry/loggers/ariaTelemetryLogger.js +2 -22
  31. package/lib/esm/common/utils.js +16 -0
  32. package/lib/esm/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +5 -2
  33. package/lib/esm/components/livechatwidget/common/createAdapter.js +5 -0
  34. package/lib/esm/components/livechatwidget/common/endChat.js +76 -20
  35. package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +6 -0
  36. package/lib/esm/components/livechatwidget/common/reconnectChatHelper.js +1 -1
  37. package/lib/esm/components/livechatwidget/common/renderSurveyHelpers.js +11 -9
  38. package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +55 -36
  39. package/lib/esm/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +6 -3
  40. package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +32 -13
  41. package/lib/esm/components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts.js +6 -3
  42. package/lib/esm/components/webchatcontainerstateful/common/mockchatsdk.js +3 -0
  43. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios.js +1 -0
  44. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +36 -96
  45. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Attachment.js +84 -0
  46. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentContent.js +9 -0
  47. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentIcon.js +13 -0
  48. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/DownloadBlockedAttachment.js +28 -0
  49. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/FileScanStatus.js +7 -0
  50. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/MaliciousAttachment.js +16 -0
  51. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/ScanInProgressAttachment.js +16 -0
  52. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Spinner.js +33 -0
  53. package/lib/esm/contexts/common/LiveChatWidgetActionType.js +1 -0
  54. package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +2 -1
  55. package/lib/esm/contexts/createReducer.js +8 -0
  56. package/lib/types/assets/Icons.d.ts +3 -0
  57. package/lib/types/common/utils.d.ts +9 -0
  58. package/lib/types/components/livechatwidget/common/endChat.d.ts +6 -2
  59. package/lib/types/components/livechatwidget/common/renderSurveyHelpers.d.ts +1 -1
  60. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetControlProps.d.ts +1 -0
  61. package/lib/types/components/webchatcontainerstateful/common/mockchatsdk.d.ts +1 -0
  62. package/lib/types/components/webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios.d.ts +1 -0
  63. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Attachment.d.ts +2 -0
  64. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentContent.d.ts +2 -0
  65. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentIcon.d.ts +2 -0
  66. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/DownloadBlockedAttachment.d.ts +2 -0
  67. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/FileScanStatus.d.ts +6 -0
  68. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/MaliciousAttachment.d.ts +2 -0
  69. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/ScanInProgressAttachment.d.ts +2 -0
  70. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Spinner.d.ts +2 -0
  71. package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +2 -1
  72. package/lib/types/contexts/common/ILiveChatWidgetLocalizedTexts.d.ts +16 -0
  73. package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +2 -1
  74. 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, uwid: string) => 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, uwid?: string) => Promise<void>;
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<void>;
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 };
@@ -17,4 +17,5 @@ export interface ILiveChatWidgetControlProps {
17
17
  hideStartChatButton?: boolean;
18
18
  widgetInstanceId?: string | undefined;
19
19
  cacheTtlInMins?: number;
20
+ skipBroadcastChannelInit?: boolean;
20
21
  }
@@ -27,4 +27,5 @@ export declare class MockChatSDK {
27
27
  getChatReconnectContext(): {
28
28
  reconnectId: string;
29
29
  };
30
+ getVoiceVideoCalling(): null;
30
31
  }
@@ -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",
@@ -0,0 +1,2 @@
1
+ declare const Attachment: (props: any) => JSX.Element;
2
+ export default Attachment;
@@ -0,0 +1,2 @@
1
+ declare const AttachmentContent: (props: any) => JSX.Element;
2
+ export default AttachmentContent;
@@ -0,0 +1,2 @@
1
+ declare const AttachmentIcon: (props: any) => JSX.Element;
2
+ export default AttachmentIcon;
@@ -0,0 +1,2 @@
1
+ declare const DownloadBlockedAttachment: (props: any) => JSX.Element;
2
+ export default DownloadBlockedAttachment;
@@ -0,0 +1,6 @@
1
+ declare enum FileScanStatus {
2
+ PASSED = "passed",
3
+ MALWARE = "malware",
4
+ INPROGRESS = "in progress"
5
+ }
6
+ export default FileScanStatus;
@@ -0,0 +1,2 @@
1
+ declare const MaliciousAttachment: (props: any) => JSX.Element;
2
+ export default MaliciousAttachment;
@@ -0,0 +1,2 @@
1
+ declare const ScanInProgressAttachment: (props: any) => JSX.Element;
2
+ export default ScanInProgressAttachment;
@@ -0,0 +1,2 @@
1
+ declare const Spinner: (props: any) => JSX.Element;
2
+ export default Spinner;
@@ -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
  }
@@ -41,5 +41,6 @@ export declare enum LiveChatWidgetActionType {
41
41
  SET_SHOULD_USE_BOT_SURVEY = 39,
42
42
  SET_CHAT_DISCONNECT_EVENT_RECEIVED = 40,
43
43
  SET_SURVEY_MODE = 41,
44
- SET_CONFIRMATION_STATE = 42
44
+ SET_CONFIRMATION_STATE = 42,
45
+ SET_POST_CHAT_PARTICIPANT_TYPE = 43
45
46
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/omnichannel-chat-widget",
3
- "version": "1.3.1-main.da9dc59",
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.7",
78
- "@microsoft/omnichannel-chat-sdk": "1.4.7",
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",