@microsoft/omnichannel-chat-widget 1.2.4-main.9847fc4 → 1.3.1-main.2c329a2

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/assets/Icons.js +10 -2
  2. package/lib/cjs/common/Constants.js +15 -1
  3. package/lib/cjs/common/telemetry/TelemetryConstants.js +4 -0
  4. package/lib/cjs/components/livechatwidget/common/createAdapter.js +5 -0
  5. package/lib/cjs/components/livechatwidget/common/endChat.js +53 -4
  6. package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +9 -7
  7. package/lib/cjs/components/livechatwidget/common/startChat.js +1 -1
  8. package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +24 -4
  9. package/lib/cjs/components/notificationpanestateful/NotificationPaneStateful.js +177 -0
  10. package/lib/cjs/components/notificationpanestateful/defaultProps/defaultChatDisconnectControlProps.js +41 -0
  11. package/lib/cjs/components/notificationpanestateful/defaultProps/defaultChatDisconnectStyleProps.js +98 -0
  12. package/lib/cjs/components/notificationpanestateful/interfaces/INotificationPaneStatefulProps.js +1 -0
  13. package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts.js +4 -3
  14. package/lib/cjs/components/webchatcontainerstateful/common/mockchatsdk.js +3 -0
  15. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +40 -101
  16. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Attachment.js +92 -0
  17. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentContent.js +17 -0
  18. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentIcon.js +21 -0
  19. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/DownloadBlockedAttachment.js +36 -0
  20. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/FileScanStatus.js +14 -0
  21. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/MaliciousAttachment.js +24 -0
  22. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/ScanInProgressAttachment.js +24 -0
  23. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Spinner.js +41 -0
  24. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/toastMiddleware.js +35 -0
  25. package/lib/esm/assets/Icons.js +5 -1
  26. package/lib/esm/common/Constants.js +13 -0
  27. package/lib/esm/common/telemetry/TelemetryConstants.js +4 -0
  28. package/lib/esm/components/livechatwidget/common/createAdapter.js +5 -0
  29. package/lib/esm/components/livechatwidget/common/endChat.js +51 -3
  30. package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +9 -7
  31. package/lib/esm/components/livechatwidget/common/startChat.js +1 -1
  32. package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +24 -4
  33. package/lib/esm/components/notificationpanestateful/NotificationPaneStateful.js +167 -0
  34. package/lib/esm/components/notificationpanestateful/defaultProps/defaultChatDisconnectControlProps.js +34 -0
  35. package/lib/esm/components/notificationpanestateful/defaultProps/defaultChatDisconnectStyleProps.js +91 -0
  36. package/lib/esm/components/notificationpanestateful/interfaces/INotificationPaneStatefulProps.js +1 -0
  37. package/lib/esm/components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts.js +4 -3
  38. package/lib/esm/components/webchatcontainerstateful/common/mockchatsdk.js +3 -0
  39. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +36 -96
  40. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Attachment.js +84 -0
  41. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentContent.js +9 -0
  42. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentIcon.js +13 -0
  43. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/DownloadBlockedAttachment.js +28 -0
  44. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/FileScanStatus.js +7 -0
  45. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/MaliciousAttachment.js +16 -0
  46. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/ScanInProgressAttachment.js +16 -0
  47. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Spinner.js +33 -0
  48. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/toastMiddleware.js +28 -0
  49. package/lib/types/assets/Icons.d.ts +4 -0
  50. package/lib/types/common/Constants.d.ts +14 -0
  51. package/lib/types/common/telemetry/TelemetryConstants.d.ts +2 -0
  52. package/lib/types/components/livechatwidget/common/endChat.d.ts +1 -0
  53. package/lib/types/components/livechatwidget/common/initWebChatComposer.d.ts +1 -1
  54. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +2 -0
  55. package/lib/types/components/notificationpanestateful/NotificationPaneStateful.d.ts +3 -0
  56. package/lib/types/components/notificationpanestateful/defaultProps/defaultChatDisconnectControlProps.d.ts +2 -0
  57. package/lib/types/components/notificationpanestateful/defaultProps/defaultChatDisconnectStyleProps.d.ts +2 -0
  58. package/lib/types/components/notificationpanestateful/interfaces/INotificationPaneStatefulProps.d.ts +13 -0
  59. package/lib/types/components/webchatcontainerstateful/common/mockchatsdk.d.ts +1 -0
  60. package/lib/types/components/webchatcontainerstateful/interfaces/IRenderingMiddlewareProps.d.ts +1 -0
  61. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Attachment.d.ts +2 -0
  62. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentContent.d.ts +2 -0
  63. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentIcon.d.ts +2 -0
  64. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/DownloadBlockedAttachment.d.ts +2 -0
  65. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/FileScanStatus.d.ts +6 -0
  66. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/MaliciousAttachment.d.ts +2 -0
  67. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/ScanInProgressAttachment.d.ts +2 -0
  68. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Spinner.d.ts +2 -0
  69. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/toastMiddleware.d.ts +3 -0
  70. package/lib/types/contexts/common/ILiveChatWidgetLocalizedTexts.d.ts +7 -0
  71. package/package.json +5 -3
@@ -9,4 +9,8 @@ export const PowerpointIcon = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDo
9
9
  export const VideoIcon = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciDQogICAgdmlld0JveD0iMCAwIDIwNDggMjA0OCINCiAgICB3aWR0aD0iMTJweCINCiAgICBoZWlnaHQ9IjEycHgiPg0KICAgIDxwYXRoIGQ9Ik0wIDI1NmgyMDQ4djE0MDhIMFYyNTZ6bTI1NiAxMjgwdi0xMjhIMTI4djEyOGgxMjh6bTAtMjU2di0xMjhIMTI4dj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2TDEyLjM5ODQgMC44OTg0MzhMMTMuMTAxNiAxLjYwMTU2TDcuNzEwOTQgN1oiPjwvcGF0aD48L3N2Zz4=";
@@ -239,6 +239,19 @@ _defineProperty(TranscriptConstants, "AdaptiveCardType", "adaptivecard");
239
239
  _defineProperty(TranscriptConstants, "InternalMode", "internal");
240
240
  _defineProperty(TranscriptConstants, "AgentDialogColor", "#2266E3");
241
241
  _defineProperty(TranscriptConstants, "AgentFontColor", "white");
242
+ export class NotificationPaneConstants {}
243
+ _defineProperty(NotificationPaneConstants, "DefaultNotificationPaneId", "lcw-notification-pane");
244
+ _defineProperty(NotificationPaneConstants, "DismissId", "lcw-notification-pane-dismiss-button");
245
+ _defineProperty(NotificationPaneConstants, "DismissText", "Dismiss");
246
+ _defineProperty(NotificationPaneConstants, "DismissAriaLabel", "Notification dismiss");
247
+ _defineProperty(NotificationPaneConstants, "CloseChatId", "lcw-notification-pane-close-chat-button");
248
+ _defineProperty(NotificationPaneConstants, "CloseChatText", "Close Chat");
249
+ _defineProperty(NotificationPaneConstants, "CloseChatAriaLabel", "Close chat");
250
+ _defineProperty(NotificationPaneConstants, "IconId", "lcw-notification-pane-icon");
251
+ _defineProperty(NotificationPaneConstants, "IconText", "Notification Icon");
252
+ _defineProperty(NotificationPaneConstants, "ChatDisconnectTitleText", "Chat disconnected");
253
+ _defineProperty(NotificationPaneConstants, "ChatDisconnectSubtitleText", "For additional assistance, please close the chat and try again.");
254
+ _defineProperty(NotificationPaneConstants, "ChromeCloseIconName", "ChromeClose");
242
255
  export class AriaTelemetryConstants {}
243
256
  // Aria Endpoint for different environment types.
244
257
  _defineProperty(AriaTelemetryConstants, "GERMANY_ENDPOINT", "https://de.pipe.aria.microsoft.com/Collector/3.0/");
@@ -138,6 +138,8 @@ export let TelemetryEvent;
138
138
  TelemetryEvent["ReconnectChatPaneLoaded"] = "ReconnectChatPaneLoaded";
139
139
  TelemetryEvent["HeaderCloseButtonClicked"] = "HeaderCloseButtonClicked";
140
140
  TelemetryEvent["HeaderMinimizeButtonClicked"] = "HeaderMinimizeButtonClicked";
141
+ TelemetryEvent["NotificationCloseChatButtonClicked"] = "NotificationCloseChatButtonClicked";
142
+ TelemetryEvent["NotificationDismissButtonClicked"] = "NotificationDismissButtonClicked";
141
143
  TelemetryEvent["DownloadTranscriptButtonClicked"] = "DownloadTranscriptButtonClicked";
142
144
  TelemetryEvent["EmailTranscriptButtonClicked"] = "EmailTranscriptButtonClicked";
143
145
  TelemetryEvent["EmailTranscriptCancelButtonClicked"] = "EmailTranscriptCancelButtonClicked";
@@ -248,6 +250,8 @@ export class TelemetryConstants {
248
250
  case TelemetryEvent.PreChatSurveyStartChatMethodFailed:
249
251
  case TelemetryEvent.HeaderCloseButtonClicked:
250
252
  case TelemetryEvent.HeaderMinimizeButtonClicked:
253
+ case TelemetryEvent.NotificationCloseChatButtonClicked:
254
+ case TelemetryEvent.NotificationDismissButtonClicked:
251
255
  case TelemetryEvent.MessageSent:
252
256
  case TelemetryEvent.MessageReceived:
253
257
  case TelemetryEvent.CustomContextReceived:
@@ -23,6 +23,11 @@ export const createAdapter = async chatSDK => {
23
23
  }
24
24
  }
25
25
  }
26
+ },
27
+ ACSAdapter: {
28
+ fileScan: {
29
+ disabled: false
30
+ }
26
31
  }
27
32
  };
28
33
  let adapter = await chatSDK.createChatAdapter(chatAdapterOptionalParams);
@@ -14,20 +14,22 @@ import { defaultWebChatContainerStatefulProps } from "../../webchatcontainerstat
14
14
  const prepareEndChat = async (props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, uwid) => {
15
15
  try {
16
16
  var _conversationDetails$, _state$domainStates, _state$domainStates2;
17
+ // Use Case: If call is ongoing, end the call by simulating end call button click
18
+ endVoiceVideoCallIfOngoing(chatSDK, dispatch);
17
19
  const conversationDetails = await getConversationDetailsCall(chatSDK);
18
20
 
19
- // Use Case : When post chat is not configured
21
+ // Use Case: When post chat is not configured
20
22
  if ((conversationDetails === null || conversationDetails === void 0 ? void 0 : (_conversationDetails$ = conversationDetails.canRenderPostChat) === null || _conversationDetails$ === void 0 ? void 0 : _conversationDetails$.toLowerCase()) === Constants.false) {
21
23
  var _state$appStates;
22
24
  // If ended by customer, just close chat
23
25
  if ((state === null || state === void 0 ? void 0 : (_state$appStates = state.appStates) === null || _state$appStates === void 0 ? void 0 : _state$appStates.conversationEndedBy) === ConversationEndEntity.Customer) {
24
26
  await endChat(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, false, false, true, uwid);
25
27
  }
26
- //Use Case: If ended by Agent, stay chat in InActive state
28
+ // Use Case: If ended by Agent, stay chat in InActive state
27
29
  return;
28
30
  }
29
31
 
30
- // Use Case : Can render post chat scenarios
32
+ // Use Case: Can render post chat scenarios
31
33
  await getPostChatContext(chatSDK, state, dispatch);
32
34
 
33
35
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -135,6 +137,28 @@ const endChat = async function (props, chatSDK, state, dispatch, setAdapter, set
135
137
  });
136
138
  }
137
139
  };
140
+ const callingStateCleanUp = async dispatch => {
141
+ dispatch({
142
+ type: LiveChatWidgetActionType.SHOW_CALLING_CONTAINER,
143
+ payload: false
144
+ });
145
+ dispatch({
146
+ type: LiveChatWidgetActionType.SET_INCOMING_CALL,
147
+ payload: true
148
+ });
149
+ dispatch({
150
+ type: LiveChatWidgetActionType.DISABLE_VIDEO_CALL,
151
+ payload: true
152
+ });
153
+ dispatch({
154
+ type: LiveChatWidgetActionType.DISABLE_LOCAL_VIDEO,
155
+ payload: true
156
+ });
157
+ dispatch({
158
+ type: LiveChatWidgetActionType.DISABLE_REMOTE_VIDEO,
159
+ payload: true
160
+ });
161
+ };
138
162
  const endChatStateCleanUp = async dispatch => {
139
163
  // Need to clear these states immediately when chat ended from OC.
140
164
  dispatch({
@@ -185,6 +209,30 @@ const closeChatStateCleanUp = async dispatch => {
185
209
  }
186
210
  });
187
211
  };
212
+
213
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
214
+ export const endVoiceVideoCallIfOngoing = async (chatSDK, dispatch) => {
215
+ let callId = "";
216
+ try {
217
+ const voiceVideoCallingSdk = await chatSDK.getVoiceVideoCalling();
218
+ if (voiceVideoCallingSdk && voiceVideoCallingSdk.isInACall()) {
219
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
220
+ callId = voiceVideoCallingSdk.callId;
221
+ voiceVideoCallingSdk.stopCall();
222
+ TelemetryHelper.logCallingEvent(LogLevel.INFO, {
223
+ Event: TelemetryEvent.EndCallButtonClick
224
+ }, callId);
225
+ callingStateCleanUp(dispatch);
226
+ }
227
+ } catch (error) {
228
+ TelemetryHelper.logCallingEvent(LogLevel.ERROR, {
229
+ Event: TelemetryEvent.EndCallButtonClickException,
230
+ ExceptionDetails: {
231
+ exception: `Failed to End Call: ${error}`
232
+ }
233
+ }, callId);
234
+ }
235
+ };
188
236
  const closeChatWidget = (dispatch, props, state) => {
189
237
  var _state$appStates3;
190
238
  if (state !== null && state !== void 0 && (_state$appStates3 = state.appStates) !== null && _state$appStates3 !== void 0 && _state$appStates3.hideStartChatButton) {
@@ -30,10 +30,11 @@ import preProcessingMiddleware from "../../webchatcontainerstateful/webchatcontr
30
30
  import sanitizationMiddleware from "../../webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/sanitizationMiddleware";
31
31
  import DOMPurify from "dompurify";
32
32
  import createMessageSequenceIdOverrideMiddleware from "../../webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageSequenceIdOverrideMiddleware";
33
+ import createToastMiddleware from "../../webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/toastMiddleware";
33
34
 
34
35
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
35
- export const initWebChatComposer = (props, state, dispatch, chatSDK) => {
36
- var _props$webChatContain, _props$webChatContain2, _props$webChatContain3, _props$webChatContain4, _state$domainStates$l4, _state$domainStates$l5, _props$webChatContain9, _props$webChatContain10, _state$domainStates$r, _state$domainStates$r2, _props$webChatContain11, _props$webChatContain12, _state$domainStates$r3, _state$domainStates$r4, _props$webChatContain13, _props$webChatContain14, _defaultWebChatContai, _props$webChatContain15, _props$webChatContain16, _state$domainStates$r5, _state$domainStates$r6, _props$webChatContain17, _props$webChatContain18, _defaultWebChatContai2, _props$webChatContain19, _props$webChatContain20, _defaultWebChatContai3, _props$webChatContain21, _props$webChatContain22;
36
+ export const initWebChatComposer = (props, state, dispatch, chatSDK, endChat) => {
37
+ var _props$webChatContain, _props$webChatContain2, _props$webChatContain3, _props$webChatContain4, _state$domainStates$l4, _state$domainStates$l5, _props$webChatContain9, _props$webChatContain10, _state$domainStates$r, _state$domainStates$r2, _props$webChatContain11, _props$webChatContain12, _state$domainStates$r3, _state$domainStates$r4, _props$webChatContain13, _props$webChatContain14, _defaultWebChatContai, _props$webChatContain15, _props$webChatContain16, _props$webChatContain17, _props$webChatContain18, _state$domainStates$r5, _state$domainStates$r6, _props$webChatContain19, _props$webChatContain20, _defaultWebChatContai2, _props$webChatContain21, _props$webChatContain22, _defaultWebChatContai3, _props$webChatContain23, _props$webChatContain24;
37
38
  // Add a hook to make all links open a new window
38
39
  postDomPurifyActivities();
39
40
  const localizedTexts = {
@@ -108,14 +109,15 @@ export const initWebChatComposer = (props, state, dispatch, chatSDK) => {
108
109
  activityMiddleware: (_props$webChatContain9 = props.webChatContainerProps) !== null && _props$webChatContain9 !== void 0 && (_props$webChatContain10 = _props$webChatContain9.renderingMiddlewareProps) !== null && _props$webChatContain10 !== void 0 && _props$webChatContain10.disableActivityMiddleware ? undefined : createActivityMiddleware((_state$domainStates$r = state.domainStates.renderingMiddlewareProps) === null || _state$domainStates$r === void 0 ? void 0 : _state$domainStates$r.systemMessageStyleProps, (_state$domainStates$r2 = state.domainStates.renderingMiddlewareProps) === null || _state$domainStates$r2 === void 0 ? void 0 : _state$domainStates$r2.userMessageStyleProps),
109
110
  attachmentMiddleware: (_props$webChatContain11 = props.webChatContainerProps) !== null && _props$webChatContain11 !== void 0 && (_props$webChatContain12 = _props$webChatContain11.renderingMiddlewareProps) !== null && _props$webChatContain12 !== void 0 && _props$webChatContain12.disableAttachmentMiddleware ? undefined : createAttachmentMiddleware(((_state$domainStates$r3 = state.domainStates.renderingMiddlewareProps) === null || _state$domainStates$r3 === void 0 ? void 0 : (_state$domainStates$r4 = _state$domainStates$r3.attachmentProps) === null || _state$domainStates$r4 === void 0 ? void 0 : _state$domainStates$r4.enableInlinePlaying) ?? defaultAttachmentProps.enableInlinePlaying),
110
111
  activityStatusMiddleware: (_props$webChatContain13 = props.webChatContainerProps) !== null && _props$webChatContain13 !== void 0 && (_props$webChatContain14 = _props$webChatContain13.renderingMiddlewareProps) !== null && _props$webChatContain14 !== void 0 && _props$webChatContain14.disableActivityStatusMiddleware ? undefined : (_defaultWebChatContai = defaultWebChatContainerStatefulProps.webChatProps) === null || _defaultWebChatContai === void 0 ? void 0 : _defaultWebChatContai.activityStatusMiddleware,
112
+ toastMiddleware: (_props$webChatContain15 = props.webChatContainerProps) !== null && _props$webChatContain15 !== void 0 && (_props$webChatContain16 = _props$webChatContain15.renderingMiddlewareProps) !== null && _props$webChatContain16 !== void 0 && _props$webChatContain16.disableToastMiddleware ? undefined : createToastMiddleware(props.notificationPaneProps, endChat),
111
113
  renderMarkdown,
112
- avatarMiddleware: (_props$webChatContain15 = props.webChatContainerProps) !== null && _props$webChatContain15 !== void 0 && (_props$webChatContain16 = _props$webChatContain15.renderingMiddlewareProps) !== null && _props$webChatContain16 !== void 0 && _props$webChatContain16.disableAvatarMiddleware ? undefined : createAvatarMiddleware((_state$domainStates$r5 = state.domainStates.renderingMiddlewareProps) === null || _state$domainStates$r5 === void 0 ? void 0 : _state$domainStates$r5.avatarStyleProps, (_state$domainStates$r6 = state.domainStates.renderingMiddlewareProps) === null || _state$domainStates$r6 === void 0 ? void 0 : _state$domainStates$r6.avatarTextStyleProps),
113
- groupActivitiesMiddleware: (_props$webChatContain17 = props.webChatContainerProps) !== null && _props$webChatContain17 !== void 0 && (_props$webChatContain18 = _props$webChatContain17.renderingMiddlewareProps) !== null && _props$webChatContain18 !== void 0 && _props$webChatContain18.disableGroupActivitiesMiddleware ? undefined : (_defaultWebChatContai2 = defaultWebChatContainerStatefulProps.webChatProps) === null || _defaultWebChatContai2 === void 0 ? void 0 : _defaultWebChatContai2.groupActivitiesMiddleware,
114
- typingIndicatorMiddleware: (_props$webChatContain19 = props.webChatContainerProps) !== null && _props$webChatContain19 !== void 0 && (_props$webChatContain20 = _props$webChatContain19.renderingMiddlewareProps) !== null && _props$webChatContain20 !== void 0 && _props$webChatContain20.disableTypingIndicatorMiddleware ? undefined : (_defaultWebChatContai3 = defaultWebChatContainerStatefulProps.webChatProps) === null || _defaultWebChatContai3 === void 0 ? void 0 : _defaultWebChatContai3.typingIndicatorMiddleware,
114
+ avatarMiddleware: (_props$webChatContain17 = props.webChatContainerProps) !== null && _props$webChatContain17 !== void 0 && (_props$webChatContain18 = _props$webChatContain17.renderingMiddlewareProps) !== null && _props$webChatContain18 !== void 0 && _props$webChatContain18.disableAvatarMiddleware ? undefined : createAvatarMiddleware((_state$domainStates$r5 = state.domainStates.renderingMiddlewareProps) === null || _state$domainStates$r5 === void 0 ? void 0 : _state$domainStates$r5.avatarStyleProps, (_state$domainStates$r6 = state.domainStates.renderingMiddlewareProps) === null || _state$domainStates$r6 === void 0 ? void 0 : _state$domainStates$r6.avatarTextStyleProps),
115
+ groupActivitiesMiddleware: (_props$webChatContain19 = props.webChatContainerProps) !== null && _props$webChatContain19 !== void 0 && (_props$webChatContain20 = _props$webChatContain19.renderingMiddlewareProps) !== null && _props$webChatContain20 !== void 0 && _props$webChatContain20.disableGroupActivitiesMiddleware ? undefined : (_defaultWebChatContai2 = defaultWebChatContainerStatefulProps.webChatProps) === null || _defaultWebChatContai2 === void 0 ? void 0 : _defaultWebChatContai2.groupActivitiesMiddleware,
116
+ typingIndicatorMiddleware: (_props$webChatContain21 = props.webChatContainerProps) !== null && _props$webChatContain21 !== void 0 && (_props$webChatContain22 = _props$webChatContain21.renderingMiddlewareProps) !== null && _props$webChatContain22 !== void 0 && _props$webChatContain22.disableTypingIndicatorMiddleware ? undefined : (_defaultWebChatContai3 = defaultWebChatContainerStatefulProps.webChatProps) === null || _defaultWebChatContai3 === void 0 ? void 0 : _defaultWebChatContai3.typingIndicatorMiddleware,
115
117
  onTelemetry: createWebChatTelemetry(),
116
- cardActionMiddleware: createCardActionMiddleware(((_props$webChatContain21 = props.webChatContainerProps) === null || _props$webChatContain21 === void 0 ? void 0 : _props$webChatContain21.botMagicCode) || undefined),
118
+ cardActionMiddleware: createCardActionMiddleware(((_props$webChatContain23 = props.webChatContainerProps) === null || _props$webChatContain23 === void 0 ? void 0 : _props$webChatContain23.botMagicCode) || undefined),
117
119
  sendTypingIndicator: true,
118
- ...((_props$webChatContain22 = props.webChatContainerProps) === null || _props$webChatContain22 === void 0 ? void 0 : _props$webChatContain22.webChatProps)
120
+ ...((_props$webChatContain24 = props.webChatContainerProps) === null || _props$webChatContain24 === void 0 ? void 0 : _props$webChatContain24.webChatProps)
119
121
  };
120
122
  return webChatProps;
121
123
  };
@@ -50,7 +50,7 @@ const prepareStartChat = async (props, chatSDK, state, dispatch, setAdapter) =>
50
50
  const isPreChatEnabledInProactiveChat = state.appStates.proactiveChatStates.proactiveChatEnablePrechat;
51
51
 
52
52
  //Setting PreChat and intiate chat
53
- await setPreChatAndInitiateChat(chatSDK, dispatch, setAdapter, isProactiveChat, isPreChatEnabledInProactiveChat, undefined, props);
53
+ await setPreChatAndInitiateChat(chatSDK, dispatch, setAdapter, isProactiveChat, isPreChatEnabledInProactiveChat, state, props);
54
54
  };
55
55
 
56
56
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -318,7 +318,27 @@ export const LiveChatWidgetStateful = props => {
318
318
  });
319
319
 
320
320
  // Start chat from SDK Event
321
- BroadcastService.getMessageByEventName(BroadcastEvent.StartChat).subscribe(() => {
321
+ BroadcastService.getMessageByEventName(BroadcastEvent.StartChat).subscribe(msg => {
322
+ var _msg$payload4;
323
+ let stateWithUpdatedContext = state;
324
+ if (msg !== null && msg !== void 0 && (_msg$payload4 = msg.payload) !== null && _msg$payload4 !== void 0 && _msg$payload4.customContext) {
325
+ var _msg$payload5, _msg$payload6;
326
+ TelemetryHelper.logActionEvent(LogLevel.INFO, {
327
+ Event: TelemetryEvent.CustomContextReceived,
328
+ Description: "CustomContext received through startChat event."
329
+ });
330
+ dispatch({
331
+ type: LiveChatWidgetActionType.SET_CUSTOM_CONTEXT,
332
+ payload: msg === null || msg === void 0 ? void 0 : (_msg$payload5 = msg.payload) === null || _msg$payload5 === void 0 ? void 0 : _msg$payload5.customContext
333
+ });
334
+ stateWithUpdatedContext = {
335
+ ...state,
336
+ domainStates: {
337
+ ...state.domainStates,
338
+ customContext: msg === null || msg === void 0 ? void 0 : (_msg$payload6 = msg.payload) === null || _msg$payload6 === void 0 ? void 0 : _msg$payload6.customContext
339
+ }
340
+ };
341
+ }
322
342
  TelemetryHelper.logActionEvent(LogLevel.INFO, {
323
343
  Event: TelemetryEvent.StartChatEventRecevied,
324
344
  Description: "Start chat event received."
@@ -332,7 +352,7 @@ export const LiveChatWidgetStateful = props => {
332
352
  BroadcastService.postMessage({
333
353
  eventName: BroadcastEvent.ChatInitiated
334
354
  });
335
- prepareStartChat(props, chatSDK, state, dispatch, setAdapter);
355
+ prepareStartChat(props, chatSDK, stateWithUpdatedContext, dispatch, setAdapter);
336
356
  return;
337
357
  }
338
358
 
@@ -344,7 +364,7 @@ export const LiveChatWidgetStateful = props => {
344
364
  BroadcastService.postMessage({
345
365
  eventName: BroadcastEvent.ChatInitiated
346
366
  });
347
- prepareStartChat(props, chatSDK, state, dispatch, setAdapter);
367
+ prepareStartChat(props, chatSDK, stateWithUpdatedContext, dispatch, setAdapter);
348
368
  return;
349
369
  }
350
370
 
@@ -596,7 +616,6 @@ export const LiveChatWidgetStateful = props => {
596
616
  eventName: BroadcastEvent.ClosePopoutWindow
597
617
  });
598
618
  };
599
- const webChatProps = initWebChatComposer(props, state, dispatch, chatSDK);
600
619
  const setPostChatContextRelay = () => setPostChatContextAndLoadSurvey(chatSDK, dispatch);
601
620
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
602
621
  const endChatRelay = (adapter, skipEndChatSDK, skipCloseChat, postMessageToOtherTab) => endChat(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, skipEndChatSDK, skipCloseChat, postMessageToOtherTab, uwid.current);
@@ -606,6 +625,7 @@ export const LiveChatWidgetStateful = props => {
606
625
  const confirmationPaneProps = initConfirmationPropsComposer(props);
607
626
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
608
627
  const prepareEndChatRelay = () => prepareEndChat(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, uwid.current);
628
+ const webChatProps = initWebChatComposer(props, state, dispatch, chatSDK, endChatRelay);
609
629
  const downloadTranscriptProps = createDownloadTranscriptProps(props.downloadTranscriptProps, {
610
630
  ...(defaultWebChatContainerStatefulProps === null || defaultWebChatContainerStatefulProps === void 0 ? void 0 : defaultWebChatContainerStatefulProps.webChatStyles),
611
631
  ...((_props$webChatContain6 = props.webChatContainerProps) === null || _props$webChatContain6 === void 0 ? void 0 : _props$webChatContain6.webChatStyles)
@@ -0,0 +1,167 @@
1
+ import React, { useEffect, useRef } from "react";
2
+ import { NotificationPane } from "@microsoft/omnichannel-chat-components";
3
+ import { hooks } from "botframework-webchat";
4
+ import { useCallback } from "react";
5
+ import { NotificationScenarios } from "../webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios";
6
+ import useChatAdapterStore from "../../hooks/useChatAdapterStore";
7
+ import useChatContextStore from "../../hooks/useChatContextStore";
8
+ import { TelemetryHelper } from "../../common/telemetry/TelemetryHelper";
9
+ import { LogLevel, TelemetryEvent } from "../../common/telemetry/TelemetryConstants";
10
+ import { LiveChatWidgetActionType } from "../../contexts/common/LiveChatWidgetActionType";
11
+ import { ConfirmationState, NotificationPaneConstants } from "../../common/Constants";
12
+ import { defaultChatDisconnectStyleProps } from "./defaultProps/defaultChatDisconnectStyleProps";
13
+ import { defaultChatDisconnectControlProps } from "./defaultProps/defaultChatDisconnectControlProps";
14
+ export const NotificationPaneStateful = props => {
15
+ var _state$domainStates, _state$domainStates3;
16
+ const {
17
+ notificationPaneProps,
18
+ notificationScenarioType,
19
+ endChat
20
+ } = props;
21
+ const [state, dispatch] = useChatContextStore();
22
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
23
+ const [adapter] = useChatAdapterStore();
24
+ const localConfirmationPaneState = useRef(state === null || state === void 0 ? void 0 : (_state$domainStates = state.domainStates) === null || _state$domainStates === void 0 ? void 0 : _state$domainStates.confirmationState);
25
+ const onCloseChatClick = async () => {
26
+ TelemetryHelper.logActionEvent(LogLevel.INFO, {
27
+ Event: TelemetryEvent.NotificationCloseChatButtonClicked,
28
+ Description: "Notification Close Chat button clicked."
29
+ });
30
+ if (localConfirmationPaneState.current !== ConfirmationState.Ok) {
31
+ dispatch({
32
+ type: LiveChatWidgetActionType.SET_SHOW_CONFIRMATION,
33
+ payload: true
34
+ });
35
+ } else {
36
+ const skipEndChatSDK = true;
37
+ const skipCloseChat = false;
38
+ const postMessageToOtherTabs = true;
39
+ await endChat(adapter, skipEndChatSDK, skipCloseChat, postMessageToOtherTabs);
40
+ }
41
+ };
42
+ useEffect(() => {
43
+ var _state$domainStates2;
44
+ localConfirmationPaneState.current = state === null || state === void 0 ? void 0 : (_state$domainStates2 = state.domainStates) === null || _state$domainStates2 === void 0 ? void 0 : _state$domainStates2.confirmationState;
45
+ }, [state === null || state === void 0 ? void 0 : (_state$domainStates3 = state.domainStates) === null || _state$domainStates3 === void 0 ? void 0 : _state$domainStates3.confirmationState]);
46
+ const {
47
+ useDismissNotification
48
+ } = hooks;
49
+ const dismissNotification = useDismissNotification();
50
+ const handleDismissNotification = useCallback(() => {
51
+ TelemetryHelper.logActionEvent(LogLevel.INFO, {
52
+ Event: TelemetryEvent.NotificationDismissButtonClicked,
53
+ Description: `${notificationScenarioType} Notification Dismiss button clicked.`
54
+ });
55
+ dismissNotification(notificationScenarioType ?? "");
56
+ }, [notificationScenarioType]);
57
+
58
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
59
+ const populateTitleInternalProps = notificationProps => {
60
+ var _notificationProps$co, _notificationProps$co2, _notificationProps$st, _notificationProps$st2, _notificationProps$st3, _defaultChatDisconnec;
61
+ return {
62
+ hideTitle: ((_notificationProps$co = notificationProps.controlProps) === null || _notificationProps$co === void 0 ? void 0 : _notificationProps$co.hideTitle) ?? defaultChatDisconnectControlProps.hideTitle,
63
+ titleText: ((_notificationProps$co2 = notificationProps.controlProps) === null || _notificationProps$co2 === void 0 ? void 0 : _notificationProps$co2.titleText) ?? defaultChatDisconnectControlProps.titleText,
64
+ titleStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.titleStyleProps, (_notificationProps$st = notificationProps.styleProps) === null || _notificationProps$st === void 0 ? void 0 : _notificationProps$st.titleStyleProps),
65
+ titleClassName: ((_notificationProps$st2 = notificationProps.styleProps) === null || _notificationProps$st2 === void 0 ? void 0 : (_notificationProps$st3 = _notificationProps$st2.classNames) === null || _notificationProps$st3 === void 0 ? void 0 : _notificationProps$st3.titleClassName) ?? ((_defaultChatDisconnec = defaultChatDisconnectStyleProps.classNames) === null || _defaultChatDisconnec === void 0 ? void 0 : _defaultChatDisconnec.titleClassName)
66
+ };
67
+ };
68
+
69
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
70
+ const populateSubtitleInternalProps = notificationProps => {
71
+ var _notificationProps$co3, _notificationProps$co4, _notificationProps$st4, _notificationProps$st5, _notificationProps$st6, _defaultChatDisconnec2;
72
+ return {
73
+ hideSubtitle: ((_notificationProps$co3 = notificationProps.controlProps) === null || _notificationProps$co3 === void 0 ? void 0 : _notificationProps$co3.hideSubtitle) ?? defaultChatDisconnectControlProps.hideSubtitle,
74
+ subtitleText: ((_notificationProps$co4 = notificationProps.controlProps) === null || _notificationProps$co4 === void 0 ? void 0 : _notificationProps$co4.subtitleText) ?? defaultChatDisconnectControlProps.subtitleText,
75
+ subtitleStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.subtitleStyleProps, (_notificationProps$st4 = notificationProps.styleProps) === null || _notificationProps$st4 === void 0 ? void 0 : _notificationProps$st4.subtitleStyleProps),
76
+ subtitleClassName: ((_notificationProps$st5 = notificationProps.styleProps) === null || _notificationProps$st5 === void 0 ? void 0 : (_notificationProps$st6 = _notificationProps$st5.classNames) === null || _notificationProps$st6 === void 0 ? void 0 : _notificationProps$st6.subtitleClassName) ?? ((_defaultChatDisconnec2 = defaultChatDisconnectStyleProps.classNames) === null || _defaultChatDisconnec2 === void 0 ? void 0 : _defaultChatDisconnec2.subtitleClassName)
77
+ };
78
+ };
79
+
80
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
81
+ const populateHyperlinkInternalProps = notificationProps => {
82
+ var _notificationProps$co5, _notificationProps$co6, _notificationProps$co7, _notificationProps$co8, _notificationProps$st7, _notificationProps$st8, _notificationProps$st9, _notificationProps$st10, _defaultChatDisconnec3;
83
+ return {
84
+ hideHyperlink: ((_notificationProps$co5 = notificationProps.controlProps) === null || _notificationProps$co5 === void 0 ? void 0 : _notificationProps$co5.hideHyperlink) ?? defaultChatDisconnectControlProps.hideHyperlink,
85
+ hyperlinkText: ((_notificationProps$co6 = notificationProps.controlProps) === null || _notificationProps$co6 === void 0 ? void 0 : _notificationProps$co6.hyperlinkText) ?? defaultChatDisconnectControlProps.hyperlinkText,
86
+ hyperlinkAriaLabel: ((_notificationProps$co7 = notificationProps.controlProps) === null || _notificationProps$co7 === void 0 ? void 0 : _notificationProps$co7.hyperlinkAriaLabel) ?? defaultChatDisconnectControlProps.hyperlinkAriaLabel,
87
+ hyperlinkHref: ((_notificationProps$co8 = notificationProps.controlProps) === null || _notificationProps$co8 === void 0 ? void 0 : _notificationProps$co8.hyperlinkHref) ?? defaultChatDisconnectControlProps.hyperlinkHref,
88
+ hyperlinkStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.hyperlinkStyleProps, (_notificationProps$st7 = notificationProps.styleProps) === null || _notificationProps$st7 === void 0 ? void 0 : _notificationProps$st7.hyperlinkStyleProps),
89
+ hyperlinkHoverStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.hyperlinkHoverStyleProps, (_notificationProps$st8 = notificationProps.styleProps) === null || _notificationProps$st8 === void 0 ? void 0 : _notificationProps$st8.hyperlinkHoverStyleProps),
90
+ hyperlinkClassName: ((_notificationProps$st9 = notificationProps.styleProps) === null || _notificationProps$st9 === void 0 ? void 0 : (_notificationProps$st10 = _notificationProps$st9.classNames) === null || _notificationProps$st10 === void 0 ? void 0 : _notificationProps$st10.hyperlinkClassName) ?? ((_defaultChatDisconnec3 = defaultChatDisconnectStyleProps.classNames) === null || _defaultChatDisconnec3 === void 0 ? void 0 : _defaultChatDisconnec3.hyperlinkClassName)
91
+ };
92
+ };
93
+
94
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
95
+ const populateNotificationIconInternalProps = notificationProps => {
96
+ var _notificationProps$co9, _notificationProps$co10, _notificationProps$st11, _notificationProps$st12, _notificationProps$st13, _defaultChatDisconnec4, _notificationProps$st14;
97
+ return {
98
+ hideNotificationIcon: ((_notificationProps$co9 = notificationProps.controlProps) === null || _notificationProps$co9 === void 0 ? void 0 : _notificationProps$co9.hideIcon) ?? defaultChatDisconnectControlProps.hideIcon,
99
+ notificationIconProps: Object.assign({}, defaultChatDisconnectControlProps.notificationIconProps, (_notificationProps$co10 = notificationProps.controlProps) === null || _notificationProps$co10 === void 0 ? void 0 : _notificationProps$co10.notificationIconProps),
100
+ notificationIconStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.notificationIconStyleProps, (_notificationProps$st11 = notificationProps.styleProps) === null || _notificationProps$st11 === void 0 ? void 0 : _notificationProps$st11.notificationIconStyleProps),
101
+ notificationIconClassName: ((_notificationProps$st12 = notificationProps.styleProps) === null || _notificationProps$st12 === void 0 ? void 0 : (_notificationProps$st13 = _notificationProps$st12.classNames) === null || _notificationProps$st13 === void 0 ? void 0 : _notificationProps$st13.notificationIconClassName) ?? ((_defaultChatDisconnec4 = defaultChatDisconnectStyleProps.classNames) === null || _defaultChatDisconnec4 === void 0 ? void 0 : _defaultChatDisconnec4.notificationIconClassName),
102
+ notificationIconContainerStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.notificationIconContainerStyleProps, (_notificationProps$st14 = notificationProps.styleProps) === null || _notificationProps$st14 === void 0 ? void 0 : _notificationProps$st14.notificationIconContainerStyleProps)
103
+ };
104
+ };
105
+
106
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
107
+ const populateDismissButtonInternalProps = notificationProps => {
108
+ var _notificationProps$co11, _notificationProps$co12, _notificationProps$st15, _notificationProps$st16, _notificationProps$st17, _notificationProps$st18, _defaultChatDisconnec5;
109
+ return {
110
+ hideDismissButton: ((_notificationProps$co11 = notificationProps.controlProps) === null || _notificationProps$co11 === void 0 ? void 0 : _notificationProps$co11.hideDismissButton) ?? defaultChatDisconnectControlProps.hideDismissButton,
111
+ dismissButtonProps: Object.assign({
112
+ onClick: handleDismissNotification
113
+ }, defaultChatDisconnectControlProps.dismissButtonProps, (_notificationProps$co12 = notificationProps.controlProps) === null || _notificationProps$co12 === void 0 ? void 0 : _notificationProps$co12.dismissButtonProps),
114
+ dismissButtonStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.dismissButtonStyleProps, (_notificationProps$st15 = notificationProps.styleProps) === null || _notificationProps$st15 === void 0 ? void 0 : _notificationProps$st15.dismissButtonStyleProps),
115
+ dismissButtonHoverStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.dismissButtonHoverStyleProps, (_notificationProps$st16 = notificationProps.styleProps) === null || _notificationProps$st16 === void 0 ? void 0 : _notificationProps$st16.dismissButtonHoverStyleProps),
116
+ dismissButtonClassName: ((_notificationProps$st17 = notificationProps.styleProps) === null || _notificationProps$st17 === void 0 ? void 0 : (_notificationProps$st18 = _notificationProps$st17.classNames) === null || _notificationProps$st18 === void 0 ? void 0 : _notificationProps$st18.dismissButtonClassName) ?? ((_defaultChatDisconnec5 = defaultChatDisconnectStyleProps.classNames) === null || _defaultChatDisconnec5 === void 0 ? void 0 : _defaultChatDisconnec5.dismissButtonClassName)
117
+ };
118
+ };
119
+
120
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
121
+ const populateCloseChatButtonInternalProps = notificationProps => {
122
+ var _notificationProps$co13, _notificationProps$co14, _notificationProps$st19, _notificationProps$st20, _notificationProps$st21, _notificationProps$st22, _defaultChatDisconnec6;
123
+ return {
124
+ hideCloseChatButton: ((_notificationProps$co13 = notificationProps.controlProps) === null || _notificationProps$co13 === void 0 ? void 0 : _notificationProps$co13.hideCloseChatButton) ?? defaultChatDisconnectControlProps.hideCloseChatButton,
125
+ closeChatButtonProps: Object.assign({
126
+ onClick: onCloseChatClick
127
+ }, defaultChatDisconnectControlProps.closeChatButtonProps, (_notificationProps$co14 = notificationProps.controlProps) === null || _notificationProps$co14 === void 0 ? void 0 : _notificationProps$co14.closeChatButtonProps),
128
+ closeChatButtonStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.closeChatButtonStyleProps, (_notificationProps$st19 = notificationProps.styleProps) === null || _notificationProps$st19 === void 0 ? void 0 : _notificationProps$st19.closeChatButtonStyleProps),
129
+ closeChatButtonHoverStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.closeChatButtonHoverStyleProps, (_notificationProps$st20 = notificationProps.styleProps) === null || _notificationProps$st20 === void 0 ? void 0 : _notificationProps$st20.closeChatButtonHoverStyleProps),
130
+ closeChatButtonClassName: ((_notificationProps$st21 = notificationProps.styleProps) === null || _notificationProps$st21 === void 0 ? void 0 : (_notificationProps$st22 = _notificationProps$st21.classNames) === null || _notificationProps$st22 === void 0 ? void 0 : _notificationProps$st22.closeChatButtonClassName) ?? ((_defaultChatDisconnec6 = defaultChatDisconnectStyleProps.classNames) === null || _defaultChatDisconnec6 === void 0 ? void 0 : _defaultChatDisconnec6.closeChatButtonClassName)
131
+ };
132
+ };
133
+ let genericPropsObj = {};
134
+
135
+ // Populate INotificationPaneInternal after merging customized props with default props
136
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
137
+ const populateInternalProps = notificationProps => {
138
+ var _notificationProps$st23, _notificationProps$st24, _notificationProps$st25, _defaultChatDisconnec7, _notificationProps$st26, _notificationProps$st27;
139
+ if (!notificationProps) {
140
+ notificationProps = {};
141
+ }
142
+ genericPropsObj = {
143
+ id: notificationProps.id ?? NotificationPaneConstants.DefaultNotificationPaneId,
144
+ dir: notificationProps.dir,
145
+ generalStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.generalStyleProps, (_notificationProps$st23 = notificationProps.styleProps) === null || _notificationProps$st23 === void 0 ? void 0 : _notificationProps$st23.generalStyleProps),
146
+ containerClassName: ((_notificationProps$st24 = notificationProps.styleProps) === null || _notificationProps$st24 === void 0 ? void 0 : (_notificationProps$st25 = _notificationProps$st24.classNames) === null || _notificationProps$st25 === void 0 ? void 0 : _notificationProps$st25.containerClassName) ?? ((_defaultChatDisconnec7 = defaultChatDisconnectStyleProps.classNames) === null || _defaultChatDisconnec7 === void 0 ? void 0 : _defaultChatDisconnec7.containerClassName),
147
+ componentOverrides: notificationProps.componentOverrides,
148
+ infoGroupStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.infoGroupStyleProps, (_notificationProps$st26 = notificationProps.styleProps) === null || _notificationProps$st26 === void 0 ? void 0 : _notificationProps$st26.infoGroupStyleProps),
149
+ buttonGroupStyleProps: Object.assign({}, defaultChatDisconnectStyleProps.buttonGroupStyleProps, (_notificationProps$st27 = notificationProps.styleProps) === null || _notificationProps$st27 === void 0 ? void 0 : _notificationProps$st27.buttonGroupStyleProps),
150
+ ...populateTitleInternalProps(notificationProps),
151
+ ...populateSubtitleInternalProps(notificationProps),
152
+ ...populateHyperlinkInternalProps(notificationProps),
153
+ ...populateNotificationIconInternalProps(notificationProps),
154
+ ...populateDismissButtonInternalProps(notificationProps),
155
+ ...populateCloseChatButtonInternalProps(notificationProps)
156
+ };
157
+ };
158
+ switch (notificationScenarioType) {
159
+ case NotificationScenarios.ChatDisconnect:
160
+ populateInternalProps(notificationPaneProps === null || notificationPaneProps === void 0 ? void 0 : notificationPaneProps.chatDisconnectNotificationProps);
161
+ break;
162
+ // TODO additional scenarios to be added...
163
+ }
164
+
165
+ return /*#__PURE__*/React.createElement(NotificationPane, genericPropsObj);
166
+ };
167
+ export default NotificationPaneStateful;
@@ -0,0 +1,34 @@
1
+ import { NotificationPaneConstants } from "../../../common/Constants";
2
+ import { NotificationAlertIcon } from "../../../assets/Icons";
3
+ export const defaultChatDisconnectControlProps = {
4
+ hideTitle: false,
5
+ titleText: NotificationPaneConstants.ChatDisconnectTitleText,
6
+ hideSubtitle: false,
7
+ subtitleText: NotificationPaneConstants.ChatDisconnectSubtitleText,
8
+ hideIcon: false,
9
+ notificationIconProps: {
10
+ id: NotificationPaneConstants.IconId,
11
+ src: NotificationAlertIcon,
12
+ alt: NotificationPaneConstants.IconText
13
+ },
14
+ hideHyperlink: true,
15
+ hyperlinkText: "Learn more",
16
+ hyperlinkAriaLabel: "Learn more",
17
+ hyperlinkHref: "https://www.microsoft.com",
18
+ hideDismissButton: false,
19
+ dismissButtonProps: {
20
+ id: NotificationPaneConstants.DismissId,
21
+ text: NotificationPaneConstants.DismissText,
22
+ type: "icon",
23
+ iconName: NotificationPaneConstants.ChromeCloseIconName,
24
+ ariaLabel: NotificationPaneConstants.DismissAriaLabel
25
+ },
26
+ hideCloseChatButton: false,
27
+ closeChatButtonProps: {
28
+ id: NotificationPaneConstants.CloseChatId,
29
+ text: NotificationPaneConstants.CloseChatText,
30
+ type: "text",
31
+ iconName: NotificationPaneConstants.ChromeCloseIconName,
32
+ ariaLabel: NotificationPaneConstants.CloseChatAriaLabel
33
+ }
34
+ };
@@ -0,0 +1,91 @@
1
+ export const defaultChatDisconnectStyleProps = {
2
+ generalStyleProps: {
3
+ backgroundColor: "#FFF4CE",
4
+ display: "flex"
5
+ },
6
+ notificationIconStyleProps: {
7
+ display: "flex",
8
+ height: "19px",
9
+ width: "19px"
10
+ },
11
+ notificationIconContainerStyleProps: {
12
+ display: "flex",
13
+ width: "36px",
14
+ height: "32px",
15
+ flexShrink: "0",
16
+ justifyContent: "center",
17
+ alignItems: "center"
18
+ },
19
+ titleStyleProps: {
20
+ fontFamily: "'Segoe UI', Arial, sans-serif",
21
+ fontSize: "87.5%",
22
+ minHeight: "32px",
23
+ fontWeight: "bold"
24
+ },
25
+ subtitleStyleProps: {
26
+ fontFamily: "'Segoe UI', Arial, sans-serif",
27
+ fontSize: "87.5%",
28
+ fontWeight: "normal"
29
+ },
30
+ hyperlinkStyleProps: {
31
+ fontFamily: "'Segoe UI', Arial, sans-serif",
32
+ fontSize: "87.5%",
33
+ textDecoration: "none",
34
+ color: "#0078d4",
35
+ fontWeight: "normal"
36
+ },
37
+ hyperlinkHoverStyleProps: {
38
+ textDecoration: "none",
39
+ color: "#005a9e"
40
+ },
41
+ dismissButtonStyleProps: {
42
+ width: "22px",
43
+ height: "22px",
44
+ borderRadius: "3px",
45
+ border: "0",
46
+ margin: "4px",
47
+ backgroundColor: "transparent",
48
+ color: "black",
49
+ icon: {
50
+ fontSize: "14px"
51
+ }
52
+ },
53
+ dismissButtonHoverStyleProps: {
54
+ filter: "brightness(0.8)",
55
+ icon: {
56
+ color: "black"
57
+ }
58
+ },
59
+ closeChatButtonStyleProps: {
60
+ backgroundColor: "white",
61
+ fontFamily: "Segoe UI, Arial, sans-serif",
62
+ fontSize: "87.5%",
63
+ fontWeight: "500",
64
+ height: "32px",
65
+ width: "80px",
66
+ padding: "0px"
67
+ },
68
+ closeChatButtonHoverStyleProps: {
69
+ filter: "brightness(0.8)"
70
+ },
71
+ infoGroupStyleProps: {
72
+ display: "flex",
73
+ justifyContent: "space-between",
74
+ flex: "1 1 0%",
75
+ marginTop: "2px"
76
+ },
77
+ buttonGroupStyleProps: {
78
+ display: "flex",
79
+ justifyContent: "flex-end",
80
+ margin: "8px"
81
+ },
82
+ classNames: {
83
+ containerClassName: "chat-disconnect-container",
84
+ titleClassName: "chat-disconnect-title",
85
+ subtitleClassName: "chat-disconnect-subtitle",
86
+ dismissButtonClassName: "chat-disconnect-dismiss-button",
87
+ hyperlinkClassName: "chat-disconnect-hyperlink",
88
+ notificationIconClassName: "chat-disconnect-notification-icon",
89
+ closeChatButtonClassName: "chat-disconnect-close-chat-button"
90
+ }
91
+ };
@@ -1,8 +1,8 @@
1
- /*
1
+ /*
2
2
  MIDDLEWARE_BANNER_FILE parameters:
3
3
  {0} = File limit size
4
4
  {1} = File extension
5
- {2} = File name
5
+ {2} = File name
6
6
  */
7
7
 
8
8
  export const defaultMiddlewareLocalizedTexts = {
@@ -25,5 +25,6 @@ export const defaultMiddlewareLocalizedTexts = {
25
25
  MIDDLEWARE_MESSAGE_NOT_DELIVERED: "Not Delivered",
26
26
  MIDDLEWARE_MESSAGE_RETRY: "Retry",
27
27
  MIDDLEWARE_BANNER_CHAT_DISCONNECT: "Your conversation has been disconnected. For additional assistance, please start a new chat.",
28
- THIRD_PARTY_COOKIES_BLOCKED_ALERT_MESSAGE: "Third party cookies are blocked. Reloading this page will start a new conversation."
28
+ THIRD_PARTY_COOKIES_BLOCKED_ALERT_MESSAGE: "Third party cookies are blocked. Reloading this page will start a new conversation.",
29
+ MIDDLEWARE_BANNER_FILE_IS_MALICIOUS: "{0} has been blocked because the file may contain a malware."
29
30
  };
@@ -53,4 +53,7 @@ export class MockChatSDK {
53
53
  reconnectId: "123"
54
54
  };
55
55
  }
56
+ getVoiceVideoCalling() {
57
+ return null;
58
+ }
56
59
  }