@microsoft/omnichannel-chat-widget 1.7.5-main.290ba08 → 1.7.6-main.aac589b

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 (71) hide show
  1. package/lib/cjs/common/telemetry/TelemetryConstants.js +32 -0
  2. package/lib/cjs/common/telemetry/TelemetryHelper.js +10 -0
  3. package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +15 -1
  4. package/lib/cjs/components/confirmationpanestateful/ConfirmationPaneStateful.js +14 -2
  5. package/lib/cjs/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +12 -0
  6. package/lib/cjs/components/footerstateful/FooterStateful.js +15 -0
  7. package/lib/cjs/components/headerstateful/HeaderStateful.js +16 -2
  8. package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +36 -3
  9. package/lib/cjs/components/loadingpanestateful/LoadingPaneStateful.js +20 -2
  10. package/lib/cjs/components/notificationpanestateful/NotificationPaneStateful.js +21 -7
  11. package/lib/cjs/components/ooohpanestateful/OOOHPaneStateful.js +12 -1
  12. package/lib/cjs/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +14 -3
  13. package/lib/cjs/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +13 -0
  14. package/lib/cjs/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +12 -0
  15. package/lib/cjs/components/reconnectchatpanestateful/ReconnectChatPaneStateful.js +12 -1
  16. package/lib/cjs/components/startchaterrorpanestateful/StartChatErrorPaneStateful.js +19 -8
  17. package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +14 -1
  18. package/lib/cjs/components/webchatcontainerstateful/common/defaultStyles/defaultWebChatStyles.js +2 -1
  19. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/WebChatActionType.js +1 -0
  20. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +7 -7
  21. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentProcessingMiddleware.js +4 -4
  22. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.js +7 -4
  23. package/lib/cjs/plugins/createChatTranscript.js +15 -6
  24. package/lib/esm/common/telemetry/TelemetryConstants.js +32 -0
  25. package/lib/esm/common/telemetry/TelemetryHelper.js +10 -0
  26. package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +15 -1
  27. package/lib/esm/components/confirmationpanestateful/ConfirmationPaneStateful.js +14 -3
  28. package/lib/esm/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +13 -1
  29. package/lib/esm/components/footerstateful/FooterStateful.js +14 -0
  30. package/lib/esm/components/headerstateful/HeaderStateful.js +16 -2
  31. package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +36 -3
  32. package/lib/esm/components/loadingpanestateful/LoadingPaneStateful.js +19 -2
  33. package/lib/esm/components/notificationpanestateful/NotificationPaneStateful.js +21 -7
  34. package/lib/esm/components/ooohpanestateful/OOOHPaneStateful.js +12 -1
  35. package/lib/esm/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +14 -3
  36. package/lib/esm/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +13 -1
  37. package/lib/esm/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +11 -0
  38. package/lib/esm/components/reconnectchatpanestateful/ReconnectChatPaneStateful.js +12 -1
  39. package/lib/esm/components/startchaterrorpanestateful/StartChatErrorPaneStateful.js +19 -8
  40. package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +14 -1
  41. package/lib/esm/components/webchatcontainerstateful/common/defaultStyles/defaultWebChatStyles.js +2 -1
  42. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/WebChatActionType.js +1 -0
  43. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +7 -7
  44. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentProcessingMiddleware.js +4 -4
  45. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.js +7 -4
  46. package/lib/esm/plugins/createChatTranscript.js +15 -6
  47. package/lib/types/common/telemetry/TelemetryConstants.d.ts +33 -1
  48. package/lib/types/common/telemetry/TelemetryHelper.d.ts +2 -1
  49. package/lib/types/common/telemetry/definitions/Contracts.d.ts +1 -1
  50. package/lib/types/common/telemetry/definitions/Payload.d.ts +14 -1
  51. package/lib/types/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.d.ts +1 -1
  52. package/lib/types/components/footerstateful/downloadtranscriptstateful/interfaces/IWebChatTranscriptConfig.d.ts +1 -0
  53. package/lib/types/components/livechatwidget/common/authHelper.d.ts +1 -1
  54. package/lib/types/components/livechatwidget/common/createAdapter.d.ts +1 -1
  55. package/lib/types/components/livechatwidget/common/createDownloadTranscriptProps.d.ts +2 -1
  56. package/lib/types/components/livechatwidget/common/endChat.d.ts +1 -1
  57. package/lib/types/components/livechatwidget/common/getMockChatSDKIfApplicable.d.ts +1 -1
  58. package/lib/types/components/livechatwidget/common/reconnectChatHelper.d.ts +2 -2
  59. package/lib/types/components/livechatwidget/common/setPostChatContextAndLoadSurvey.d.ts +1 -1
  60. package/lib/types/components/livechatwidget/common/startChat.d.ts +2 -2
  61. package/lib/types/components/livechatwidget/common/startChatErrorHandler.d.ts +1 -1
  62. package/lib/types/components/livechatwidget/common/startProactiveChat.d.ts +1 -1
  63. package/lib/types/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.d.ts +1 -1
  64. package/lib/types/components/webchatcontainerstateful/interfaces/IWebChatProps.d.ts +1 -1
  65. package/lib/types/components/webchatcontainerstateful/webchatcontroller/enums/WebChatActionType.d.ts +2 -1
  66. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.d.ts +1 -1
  67. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/avatarMiddleware.d.ts +1 -1
  68. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.d.ts +1 -1
  69. package/lib/types/hooks/useChatSDKStore.d.ts +1 -1
  70. package/lib/types/hooks/useDebounce.d.ts +1 -1
  71. package/package.json +17 -8
@@ -128,6 +128,7 @@ export declare enum TelemetryEvent {
128
128
  ConfirmationCancelButtonClicked = "ConfirmationCancelButtonClicked",
129
129
  ConfirmationConfirmButtonClicked = "ConfirmationConfirmButtonClicked",
130
130
  LoadingPaneLoaded = "LoadingPaneLoaded",
131
+ LoadingPaneUnloaded = "LoadingPaneUnloaded",
131
132
  StartChatErrorPaneLoaded = "StartChatErrorPaneLoaded",
132
133
  EmailTranscriptLoaded = "EmailTranscriptLoaded",
133
134
  OutOfOfficePaneLoaded = "OutOfOfficePaneLoaded",
@@ -160,6 +161,7 @@ export declare enum TelemetryEvent {
160
161
  SetBotAuthProviderNotFound = "SetBotAuthProviderNotFound",
161
162
  BotAuthActivityUndefinedSignInId = "BotAuthActivityUndefinedSignInId",
162
163
  ThirdPartyCookiesBlocked = "ThirdPartyCookiesBlocked",
164
+ ParticipantsRemovedEvent = "ParticipantsRemovedEvent",
163
165
  ProcessingHTMLTextMiddlewareFailed = "ProcessingHTMLTextMiddlewareFailed",
164
166
  ProcessingSanitizationMiddlewareFailed = "ProcessingSanitizationMiddlewareFailed",
165
167
  FormatTagsMiddlewareJSONStringifyFailed = "FormatTagsMiddlewareJSONStringifyFailed",
@@ -210,7 +212,37 @@ export declare enum TelemetryEvent {
210
212
  NewTokenSuccess = "NewTokenSuccess",
211
213
  NewTokenFailed = "NewTokenFailed",
212
214
  NewTokenExpired = "NewTokenExpired",
213
- TokenEmptyOrSame = "TokenEmptyOrSame"
215
+ TokenEmptyOrSame = "TokenEmptyOrSame",
216
+ UXFooterStart = "UXFooterStart",
217
+ UXFooterCompleted = "UXFooterCompleted",
218
+ UXHeaderStart = "UXHeaderStart",
219
+ UXHeaderCompleted = "UXHeaderCompleted",
220
+ UXLoadingPaneStart = "UXLoadingPaneStart",
221
+ UXLoadingPaneCompleted = "UXLoadingPaneCompleted",
222
+ UXNotificationPaneStart = "UXNotificationPaneStart",
223
+ UXNotificationPaneCompleted = "UXNotificationPaneCompleted",
224
+ UXOOHPaneStart = "UXOOHPaneStart",
225
+ UXOOHPaneCompleted = "UXOOHPaneCompleted",
226
+ UXPostChatLoadingPaneStart = "UXPostChatLoadingPaneStart",
227
+ UXPostChatLoadingPaneCompleted = "UXPostChatLoadingPaneCompleted",
228
+ UXPrechatPaneStart = "UXPrechatPaneStart",
229
+ UXPrechatPaneCompleted = "UXPrechatPaneCompleted",
230
+ UXProactiveChatPaneStart = "UXProactiveChatPaneStart",
231
+ UXProactiveChatCompleted = "UXProactiveChatCompleted",
232
+ UXReconnectChatPaneStart = "UXReconnectChatPaneStart",
233
+ UXReconnectChatCompleted = "UXReconnectChatCompleted",
234
+ UXStartChatErrorPaneStart = "UXStartChatErrorPaneStart",
235
+ UXStartChatErrorCompleted = "UXStartChatErrorCompleted",
236
+ UXEmailTranscriptPaneStart = "UXEmailTranscriptPaneStart",
237
+ UXEmailTranscriptPaneCompleted = "UXEmailTranscriptPaneCompleted",
238
+ UXWebchatContainerStart = "UXWebchatContainerStart",
239
+ UXWebchatContainerCompleted = "UXWebchatContainerCompleted",
240
+ UXLCWChatButtonStart = "UXLCWChatButtonStart",
241
+ UXLCWChatButtonCompleted = "UXLCWChatButtonCompleted",
242
+ UXConfirmationPaneStart = "UXConfirmationPaneStart",
243
+ UXConfirmationPaneCompleted = "UXConfirmationPaneCompleted",
244
+ UXLivechatwidgetStart = "UXLivechatwidgetStart",
245
+ UXLivechatwidgetCompleted = "UXLivechatwidgetCompleted"
214
246
  }
215
247
  export interface TelemetryInput {
216
248
  scenarioType: ScenarioType;
@@ -31,8 +31,9 @@ export declare class TelemetryHelper {
31
31
  static addWidgetDataToTelemetry(telemetryConfig: ITelemetryConfig, telemetryInternalData: IInternalTelemetryData): IInternalTelemetryData;
32
32
  static addSessionDataToTelemetry(chatSession: LiveChatContext, telemetryInternalData: IInternalTelemetryData): IInternalTelemetryData;
33
33
  static addConversationDataToTelemetry(liveWorkItem: LiveWorkItemDetails, telemetryInternalData: IInternalTelemetryData): IInternalTelemetryData;
34
- static logCallingEvent: (logLevel: LogLevel, payload: TelemetryEventWrapper, callId?: string | undefined) => void;
34
+ static logCallingEvent: (logLevel: LogLevel, payload: TelemetryEventWrapper, callId?: string) => void;
35
35
  static logLoadingEvent: (logLevel: LogLevel, payload: TelemetryEventWrapper) => void;
36
+ static logUIEvent: (logLevel: LogLevel, payload: TelemetryEventWrapper) => void;
36
37
  static logActionEvent: (logLevel: LogLevel, payload: TelemetryEventWrapper) => void;
37
38
  static logSDKEvent: (logLevel: LogLevel, payload: TelemetryEventWrapper) => void;
38
39
  static logConfigDataEvent: (logLevel: LogLevel, payload: TelemetryEventWrapper) => void;
@@ -74,4 +74,4 @@ export interface ACSAdapterContract extends BaseContract {
74
74
  Event?: string;
75
75
  ErrorCode?: string;
76
76
  }
77
- export declare type TelemetryContract = OCChatSDKContract | IC3ClientContract | ActionsContract | LoadContract | WebChatContract | ConfigValidationContract | CallingContract | ACSAdapterContract | BaseContract | any;
77
+ export type TelemetryContract = OCChatSDKContract | IC3ClientContract | ActionsContract | LoadContract | WebChatContract | ConfigValidationContract | CallingContract | ACSAdapterContract | BaseContract | any;
@@ -24,6 +24,19 @@ export interface LoadTelemetryData extends BaseTelemetryData {
24
24
  OCChatComponentsVersion?: string;
25
25
  Description?: string;
26
26
  }
27
+ export interface UITelemetryData extends BaseTelemetryData {
28
+ Event?: string;
29
+ ResourcePath?: string;
30
+ ElapsedTimeInMilliseconds?: number;
31
+ WidgetState?: string;
32
+ ChatState?: string;
33
+ ChatType?: string;
34
+ ExceptionDetails?: object;
35
+ OCChatSDKVersion?: string;
36
+ OCChatWidgetVersion?: string;
37
+ OCChatComponentsVersion?: string;
38
+ Description?: string;
39
+ }
27
40
  export interface MessageProcessingErrorData extends BaseTelemetryData {
28
41
  Event: string;
29
42
  ExceptionDetails: object;
@@ -89,4 +102,4 @@ export interface FacadeChatSDKTelemetryData extends BaseTelemetryData {
89
102
  ExceptionDetails?: object;
90
103
  Description?: string;
91
104
  }
92
- export declare type TelemetryData = ConfigValidationTelemetryData | OCChatSDKTelemetryData | IC3ClientTelemetryData | LoadTelemetryData | ActionTelemetryData | WebChatTelemetryData | CallingTelemetryData | MessageProcessingErrorData;
105
+ export type TelemetryData = ConfigValidationTelemetryData | OCChatSDKTelemetryData | IC3ClientTelemetryData | LoadTelemetryData | ActionTelemetryData | WebChatTelemetryData | CallingTelemetryData | MessageProcessingErrorData;
@@ -1,4 +1,4 @@
1
1
  import { FacadeChatSDK } from "../../../common/facades/FacadeChatSDK";
2
2
  import { IDownloadTranscriptProps } from "./interfaces/IDownloadTranscriptProps";
3
3
  import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
4
- export declare const downloadTranscript: (facadeChatSDK: FacadeChatSDK, downloadTranscriptProps: IDownloadTranscriptProps, state?: ILiveChatWidgetContext | undefined) => Promise<void>;
4
+ export declare const downloadTranscript: (facadeChatSDK: FacadeChatSDK, downloadTranscriptProps: IDownloadTranscriptProps, state?: ILiveChatWidgetContext) => Promise<void>;
@@ -10,4 +10,5 @@ export interface IWebChatTranscriptConfig {
10
10
  agentAvatarFontColor?: string;
11
11
  customerAvatarBackgroundColor?: string;
12
12
  customerAvatarFontColor?: string;
13
+ customerDisplayName?: string;
13
14
  }
@@ -1,7 +1,7 @@
1
1
  import ChatConfig from "@microsoft/omnichannel-chat-sdk/lib/core/ChatConfig";
2
2
  import { OmnichannelChatSDK } from "@microsoft/omnichannel-chat-sdk";
3
3
  declare const getAuthClientFunction: (chatConfig: ChatConfig | undefined) => string | undefined;
4
- declare const handleAuthentication: (chatSDK: OmnichannelChatSDK, chatConfig: ChatConfig | undefined, getAuthToken: ((authClientFunction?: string | undefined) => Promise<string | null>) | undefined) => Promise<{
4
+ declare const handleAuthentication: (chatSDK: OmnichannelChatSDK, chatConfig: ChatConfig | undefined, getAuthToken: ((authClientFunction?: string) => Promise<string | null>) | undefined) => Promise<{
5
5
  result: boolean;
6
6
  token: string | null;
7
7
  error?: undefined;
@@ -1,3 +1,3 @@
1
1
  import { FacadeChatSDK } from "../../../common/facades/FacadeChatSDK";
2
2
  import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
3
- export declare const createAdapter: (facadeChatSDK: FacadeChatSDK, props?: ILiveChatWidgetProps | undefined) => Promise<any>;
3
+ export declare const createAdapter: (facadeChatSDK: FacadeChatSDK, props?: ILiveChatWidgetProps) => Promise<any>;
@@ -1,7 +1,7 @@
1
1
  import { StyleOptions } from "botframework-webchat-api";
2
2
  import { IDownloadTranscriptProps } from "../../footerstateful/downloadtranscriptstateful/interfaces/IDownloadTranscriptProps";
3
3
  import { IWebChatContainerStatefulProps } from "../../webchatcontainerstateful/interfaces/IWebChatContainerStatefulProps";
4
- declare const createDownloadTranscriptProps: (downloadTranscriptProps: IDownloadTranscriptProps, webChatStyles: StyleOptions, webChatContainerProps?: IWebChatContainerStatefulProps | undefined) => {
4
+ declare const createDownloadTranscriptProps: (downloadTranscriptProps: IDownloadTranscriptProps, webChatStyles: StyleOptions, webChatContainerProps?: IWebChatContainerStatefulProps) => {
5
5
  webChatTranscript: {
6
6
  disableNewLineMarkdownSupport: boolean | undefined;
7
7
  disableMarkdownMessageFormatting: boolean | undefined;
@@ -16,6 +16,7 @@ declare const createDownloadTranscriptProps: (downloadTranscriptProps: IDownload
16
16
  attachmentMessage?: string | undefined;
17
17
  networkOnlineMessage?: string | undefined;
18
18
  networkOfflineMessage?: string | undefined;
19
+ customerDisplayName?: string | undefined;
19
20
  };
20
21
  attachmentMessage?: string | undefined;
21
22
  bannerMessageOnError?: string | undefined;
@@ -4,7 +4,7 @@ import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetA
4
4
  import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
5
5
  import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
6
6
  declare const prepareEndChat: (props: ILiveChatWidgetProps, facadeChatSDK: FacadeChatSDK, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, setWebChatStyles: any, adapter: any) => Promise<void>;
7
- declare const endChat: (props: ILiveChatWidgetProps, facadeChatSDK: any, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, setWebChatStyles: any, adapter: any, skipEndChatSDK?: boolean | undefined, skipCloseChat?: boolean | undefined, postMessageToOtherTab?: boolean | undefined) => Promise<void>;
7
+ declare const endChat: (props: ILiveChatWidgetProps, facadeChatSDK: any, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, setWebChatStyles: any, adapter: any, skipEndChatSDK?: boolean, skipCloseChat?: boolean, postMessageToOtherTab?: boolean) => Promise<void>;
8
8
  export declare const callingStateCleanUp: (dispatch: Dispatch<ILiveChatWidgetAction>) => void;
9
9
  export declare const endChatStateCleanUp: (dispatch: Dispatch<ILiveChatWidgetAction>) => void;
10
10
  export declare const closeChatStateCleanUp: (dispatch: Dispatch<ILiveChatWidgetAction>) => void;
@@ -1 +1 @@
1
- export declare const getMockChatSDKIfApplicable: (chatSDK: any, type?: string | undefined) => any;
1
+ export declare const getMockChatSDKIfApplicable: (chatSDK: any, type?: string) => any;
@@ -7,6 +7,6 @@ import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidget
7
7
  import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
8
8
  declare const handleChatReconnect: (facadeChatSDK: FacadeChatSDK, props: ILiveChatWidgetProps, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, initStartChat: any, state: ILiveChatWidgetContext) => Promise<boolean>;
9
9
  declare const getChatReconnectContext: (facadeChatSDK: FacadeChatSDK, chatConfig: ChatConfig, props: any, isAuthenticatedChat: boolean, dispatch: Dispatch<ILiveChatWidgetAction>) => Promise<import("@microsoft/omnichannel-chat-sdk/lib/core/ChatReconnectContext").default | undefined>;
10
- declare const isReconnectEnabled: (chatConfig?: ChatConfig | undefined) => boolean;
11
- declare const isPersistentEnabled: (chatConfig?: ChatConfig | undefined) => boolean;
10
+ declare const isReconnectEnabled: (chatConfig?: ChatConfig) => boolean;
11
+ declare const isPersistentEnabled: (chatConfig?: ChatConfig) => boolean;
12
12
  export { handleChatReconnect, isReconnectEnabled, isPersistentEnabled, getChatReconnectContext };
@@ -1,4 +1,4 @@
1
1
  import { Dispatch } from "react";
2
2
  import { FacadeChatSDK } from "../../../common/facades/FacadeChatSDK";
3
3
  import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
4
- export declare const setPostChatContextAndLoadSurvey: (facadeChatSDK: FacadeChatSDK, dispatch: Dispatch<ILiveChatWidgetAction>, persistedChat?: boolean | undefined) => Promise<void>;
4
+ export declare const setPostChatContextAndLoadSurvey: (facadeChatSDK: FacadeChatSDK, dispatch: Dispatch<ILiveChatWidgetAction>, persistedChat?: boolean) => Promise<void>;
@@ -5,7 +5,7 @@ import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidget
5
5
  import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
6
6
  import StartChatOptionalParams from "@microsoft/omnichannel-chat-sdk/lib/core/StartChatOptionalParams";
7
7
  declare const prepareStartChat: (props: ILiveChatWidgetProps, facadeChatSDK: FacadeChatSDK, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any) => Promise<void>;
8
- declare const setPreChatAndInitiateChat: (facadeChatSDK: FacadeChatSDK, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, isProactiveChat?: boolean | undefined, proactiveChatEnablePrechatState?: boolean | undefined, state?: ILiveChatWidgetContext | undefined, props?: ILiveChatWidgetProps | undefined) => Promise<void>;
9
- declare const initStartChat: (facadeChatSDK: FacadeChatSDK, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, state: ILiveChatWidgetContext | undefined, props?: ILiveChatWidgetProps | undefined, params?: StartChatOptionalParams | undefined, persistedState?: any) => Promise<void>;
8
+ declare const setPreChatAndInitiateChat: (facadeChatSDK: FacadeChatSDK, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, isProactiveChat?: boolean | false, proactiveChatEnablePrechatState?: boolean | false, state?: ILiveChatWidgetContext, props?: ILiveChatWidgetProps) => Promise<void>;
9
+ declare const initStartChat: (facadeChatSDK: FacadeChatSDK, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, state: ILiveChatWidgetContext | undefined, props?: ILiveChatWidgetProps, params?: StartChatOptionalParams, persistedState?: any) => Promise<void>;
10
10
  declare const checkIfConversationStillValid: (facadeChatSDK: FacadeChatSDK, dispatch: Dispatch<ILiveChatWidgetAction>, state: ILiveChatWidgetContext) => Promise<boolean>;
11
11
  export { prepareStartChat, initStartChat, setPreChatAndInitiateChat, checkIfConversationStillValid };
@@ -3,4 +3,4 @@ import { FacadeChatSDK } from "../../../common/facades/FacadeChatSDK";
3
3
  import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
4
4
  import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
5
5
  export declare const handleStartChatError: (dispatch: Dispatch<ILiveChatWidgetAction>, facadeChatSDK: FacadeChatSDK, props: ILiveChatWidgetProps | undefined, ex: any, isStartChatSuccessful: boolean) => void;
6
- export declare const logWidgetLoadComplete: (additionalMessage?: string | undefined) => void;
6
+ export declare const logWidgetLoadComplete: (additionalMessage?: string) => void;
@@ -1,4 +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;
4
+ export declare const startProactiveChat: (dispatch: Dispatch<ILiveChatWidgetAction>, notificationConfig?: IProactiveChatNotificationConfig, enablePreChat?: boolean, inNewWindow?: boolean) => void;
@@ -3,5 +3,5 @@
3
3
  *
4
4
  * @param extension File extension
5
5
  */
6
- export declare const getFileAttachmentIconData: (extension: string) => unknown;
6
+ export declare const getFileAttachmentIconData: (extension: string) => {};
7
7
  export declare const isInlineMediaSupported: (attachmentName: string) => boolean;
@@ -12,7 +12,7 @@ export interface IWebChatProps {
12
12
  children?: ReactNode;
13
13
  dir?: string;
14
14
  disabled?: boolean;
15
- downscaleImageToDataURL?: (blob: Blob, maxWidth: number, maxHeight: number, type: string, quality: number) => string;
15
+ downscaleImageToDataURL?: (blob: Blob, maxWidth: number, maxHeight: number, type: string, quality: number) => Promise<URL>;
16
16
  grammars?: any;
17
17
  groupActivitiesMiddleware?: OneOrMany<GroupActivitiesMiddleware>;
18
18
  internalErrorBoxClass?: React.Component | Function;
@@ -19,5 +19,6 @@ export declare enum WebChatActionType {
19
19
  WEB_CHAT_SET_NOTIFICATION = "WEB_CHAT/SET_NOTIFICATION",
20
20
  WEB_CHAT_DISMISS_NOTIFICATION = "WEB_CHAT/DISMISS_NOTIFICATION",
21
21
  WEB_CHAT_SET_SEND_BOX = "WEB_CHAT/SET_SEND_BOX",
22
- WEB_CHAT_SEND_FILES = "WEB_CHAT/SEND_FILES"
22
+ WEB_CHAT_SEND_FILES = "WEB_CHAT/SEND_FILES",
23
+ WEB_CHAT_SET_SEND_BOX_ATTACHMENTS = "WEB_CHAT/SET_SEND_BOX_ATTACHMENTS"
23
24
  }
@@ -7,4 +7,4 @@
7
7
  * 3. Decodes certain html characters that came through from chat services
8
8
  ******/
9
9
  import React from "react";
10
- export declare const createActivityMiddleware: (renderMarkdown: (text: string) => string, systemMessageStyleProps?: React.CSSProperties | undefined, userMessageStyleProps?: React.CSSProperties | undefined) => () => (next: any) => (...args: any) => any;
10
+ export declare const createActivityMiddleware: (renderMarkdown: (text: string) => string, systemMessageStyleProps?: React.CSSProperties, userMessageStyleProps?: React.CSSProperties) => () => (next: any) => (...args: any) => any;
@@ -5,4 +5,4 @@
5
5
  * 1. Renders the first two letters of the sender as the profile pic
6
6
  ******/
7
7
  import React from "react";
8
- export declare const createAvatarMiddleware: (avatarStyleProps?: React.CSSProperties | undefined, avatarTextStyleProps?: React.CSSProperties | undefined) => () => (next: any) => (args_0: any) => false | (() => JSX.Element);
8
+ export declare const createAvatarMiddleware: (avatarStyleProps?: React.CSSProperties, avatarTextStyleProps?: React.CSSProperties) => () => (next: any) => (args_0: any) => false | (() => JSX.Element);
@@ -3,8 +3,8 @@
3
3
  *
4
4
  * Checks if the attachment being uploaded satisfies Omnichannel's requirement on file extensions and file size.
5
5
  ******/
6
- import { IWebChatAction } from "../../../interfaces/IWebChatAction";
7
6
  import { ILiveChatWidgetLocalizedTexts } from "../../../../../contexts/common/ILiveChatWidgetLocalizedTexts";
7
+ import { IWebChatAction } from "../../../interfaces/IWebChatAction";
8
8
  declare const createAttachmentUploadValidatorMiddleware: (allowedFileExtensions: string, maxFileSizeSupportedByDynamics: string, localizedTexts: ILiveChatWidgetLocalizedTexts) => ({ dispatch }: {
9
9
  dispatch: any;
10
10
  }) => (next: any) => (action: IWebChatAction) => any;
@@ -1,2 +1,2 @@
1
- declare const useChatSDKStore: () => unknown;
1
+ declare const useChatSDKStore: () => {};
2
2
  export default useChatSDKStore;
@@ -1,3 +1,3 @@
1
- declare type FunctionType = (...args: unknown[]) => void;
1
+ type FunctionType = (...args: unknown[]) => void;
2
2
  export default function useDebounce<Fn extends FunctionType>(func: Fn, delay?: number): Fn;
3
3
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/omnichannel-chat-widget",
3
- "version": "1.7.5-main.290ba08",
3
+ "version": "1.7.6-main.aac589b",
4
4
  "description": "Microsoft Omnichannel Chat Widget",
5
5
  "main": "lib/cjs/index.js",
6
6
  "types": "lib/types/index.d.ts",
@@ -60,26 +60,28 @@
60
60
  "jest-dom": "^4.0.0",
61
61
  "jest-image-snapshot": "^4.5.1",
62
62
  "json": "^11.0.0",
63
- "playwright": "^1.16.3",
63
+ "p-defer": "^4.0.1",
64
+ "playwright": "^1.20.0",
64
65
  "postcss": "^8.3.9",
65
66
  "react": "^17.0.2",
67
+ "react-docgen-typescript-plugin": "^1.0.8",
66
68
  "react-dom": "^17.0.2",
67
69
  "react-test-renderer": "^17.0.2",
68
70
  "storybook-addon-playwright": "^4.9.2",
69
71
  "swiper": "^9.0.5",
70
72
  "terser-webpack-plugin": "^4.2.3",
71
73
  "ts-loader": "^9.2.6",
72
- "typescript": "4.6.4",
74
+ "typescript": "4.9.5",
73
75
  "webpack": "^4.44.2",
74
76
  "webpack-cli": "^4.9.2"
75
77
  },
76
78
  "dependencies": {
77
79
  "@azure/core-tracing": "^1.2.0",
78
- "@microsoft/omnichannel-chat-components": "1.1.5",
79
- "@microsoft/omnichannel-chat-sdk": "^1.10.6",
80
+ "@microsoft/omnichannel-chat-components": "1.1.8",
81
+ "@microsoft/omnichannel-chat-sdk": "^1.10.11",
80
82
  "@opentelemetry/api": "^1.9.0",
81
83
  "abort-controller-es5": "^2.0.1",
82
- "dompurify": "^2.5.4",
84
+ "dompurify": "^3.2.4",
83
85
  "markdown-it": "^12.3.2",
84
86
  "markdown-it-attrs": "^4.1.6",
85
87
  "markdown-it-attrs-es5": "^2.0.2",
@@ -99,7 +101,7 @@
99
101
  "test:unit": "jest -c jest.config.unit.cjs --env=jsdom --runInBand --force-exit",
100
102
  "test:e2e": "cd automation_tests && yarn test",
101
103
  "test:e2e:build": "yarn build-sample && cd automation_tests && yarn test",
102
- "test:visual": "jest -c jest.config.visual.cjs",
104
+ "test:visual": "jest -c jest.config.visual.cjs --verbose",
103
105
  "test:all": "yarn test:unit && yarn test:visual",
104
106
  "build:esm": "babel ./src --config-file ./babel.esm.config.json --out-dir lib/esm --extensions .ts,.js,.tsx --ignore **/*.test.ts,**/*.stories.tsx,**/*.test.tsx,**/*.spec.ts,**/*.spec.tsx",
105
107
  "build:cjs": "babel ./src --config-file ./babel.config.json --out-dir lib/cjs --extensions .ts,.js,.tsx --ignore **/*.test.ts,**/*.stories.tsx,**/*.test.tsx,**/*.spec.ts,**/*.spec.tsx",
@@ -109,7 +111,8 @@
109
111
  "build-sample": "yarn build && webpack --config ./webpack.config.cjs",
110
112
  "build-sample:dev": "yarn build && webpack --config ./webpack.dev.config.cjs",
111
113
  "test:visual:build": "yarn build-storybook && yarn test:visual",
112
- "lint": "yarn eslint . --max-warnings=0"
114
+ "lint": "yarn eslint . --max-warnings=0",
115
+ "postinstall": "yarn playwright install"
113
116
  },
114
117
  "resolutions": {
115
118
  "**/url-parse": "1.5.9",
@@ -117,5 +120,11 @@
117
120
  "**/abort-controller-es5": "^2.0.1",
118
121
  "**/minimist": "1.2.6",
119
122
  "**/sanitize-html": "2.12.1"
123
+ },
124
+ "jest": {
125
+ "verbose": true,
126
+ "reporters": [
127
+ "default"
128
+ ]
120
129
  }
121
130
  }