@microsoft/omnichannel-chat-widget 1.2.4-main.9847fc4 → 1.3.1-main.57e27d3

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 (40) hide show
  1. package/lib/cjs/assets/Icons.js +4 -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/endChat.js +53 -4
  5. package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +9 -7
  6. package/lib/cjs/components/livechatwidget/common/startChat.js +1 -1
  7. package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +24 -4
  8. package/lib/cjs/components/notificationpanestateful/NotificationPaneStateful.js +177 -0
  9. package/lib/cjs/components/notificationpanestateful/defaultProps/defaultChatDisconnectControlProps.js +41 -0
  10. package/lib/cjs/components/notificationpanestateful/defaultProps/defaultChatDisconnectStyleProps.js +98 -0
  11. package/lib/cjs/components/notificationpanestateful/interfaces/INotificationPaneStatefulProps.js +1 -0
  12. package/lib/cjs/components/webchatcontainerstateful/common/mockchatsdk.js +3 -0
  13. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/toastMiddleware.js +35 -0
  14. package/lib/esm/assets/Icons.js +2 -1
  15. package/lib/esm/common/Constants.js +13 -0
  16. package/lib/esm/common/telemetry/TelemetryConstants.js +4 -0
  17. package/lib/esm/components/livechatwidget/common/endChat.js +51 -3
  18. package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +9 -7
  19. package/lib/esm/components/livechatwidget/common/startChat.js +1 -1
  20. package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +24 -4
  21. package/lib/esm/components/notificationpanestateful/NotificationPaneStateful.js +167 -0
  22. package/lib/esm/components/notificationpanestateful/defaultProps/defaultChatDisconnectControlProps.js +34 -0
  23. package/lib/esm/components/notificationpanestateful/defaultProps/defaultChatDisconnectStyleProps.js +91 -0
  24. package/lib/esm/components/notificationpanestateful/interfaces/INotificationPaneStatefulProps.js +1 -0
  25. package/lib/esm/components/webchatcontainerstateful/common/mockchatsdk.js +3 -0
  26. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/toastMiddleware.js +28 -0
  27. package/lib/types/assets/Icons.d.ts +1 -0
  28. package/lib/types/common/Constants.d.ts +14 -0
  29. package/lib/types/common/telemetry/TelemetryConstants.d.ts +2 -0
  30. package/lib/types/components/livechatwidget/common/endChat.d.ts +1 -0
  31. package/lib/types/components/livechatwidget/common/initWebChatComposer.d.ts +1 -1
  32. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +2 -0
  33. package/lib/types/components/notificationpanestateful/NotificationPaneStateful.d.ts +3 -0
  34. package/lib/types/components/notificationpanestateful/defaultProps/defaultChatDisconnectControlProps.d.ts +2 -0
  35. package/lib/types/components/notificationpanestateful/defaultProps/defaultChatDisconnectStyleProps.d.ts +2 -0
  36. package/lib/types/components/notificationpanestateful/interfaces/INotificationPaneStatefulProps.d.ts +13 -0
  37. package/lib/types/components/webchatcontainerstateful/common/mockchatsdk.d.ts +1 -0
  38. package/lib/types/components/webchatcontainerstateful/interfaces/IRenderingMiddlewareProps.d.ts +1 -0
  39. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/toastMiddleware.d.ts +3 -0
  40. package/package.json +3 -3
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.WordIcon = exports.VisioIcon = exports.VideoIcon = exports.PowerpointIcon = exports.PDFIcon = exports.OneNoteIcon = exports.ImageIcon = exports.ExcelIcon = exports.BlankIcon = exports.AudioIcon = exports.ArchiveIcon = exports.AlertIcon = void 0;
6
+ exports.WordIcon = exports.VisioIcon = exports.VideoIcon = exports.PowerpointIcon = exports.PDFIcon = exports.OneNoteIcon = exports.NotificationAlertIcon = exports.ImageIcon = exports.ExcelIcon = exports.BlankIcon = exports.AudioIcon = exports.ArchiveIcon = exports.AlertIcon = void 0;
7
7
  const ArchiveIcon = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMDQ4IDIwNDgiIHdpZHRoPSIxMnB4IiBoZWlnaHQ9IjEycHgiPg0KPHBhdGggZD0iTTE3OTIgMHEyNyAwIDUwIDEwdDQwIDI3IDI4IDQxIDEwIDUwdjQ4MHEwIDQ1LTkgNzd0LTI0IDU4LTMxIDQ2LTMxIDQwLTIzIDQ0LTEwIDU1djk5MnEwIDI3LTEwIDUwdC0yNyA0MC00MSAyOC01MCAxMEgyNTZWMGgxNTM2ek02NDAgMTI4djM4NGgyNTZWMTI4SDY0MHptMTAyNCA4MDBxMC0zMS05LTU0dC0yNC00NC0zMS00MS0zMS00NS0yMy01OC0xMC03OFYxMjhoLTUxMnY1MTJINzY4djEyOEg2NDBWNjQwSDUxMlYxMjhIMzg0djE3OTJoMzg0di0xMjhoMTI4djEyOGg3NjhWOTI4em0xMjgtODAwaC0xMjh2NDgwcTAgMjQgNCA0MnQxMyAzMyAyMCAyOSAyNyAzMnExNS0xNyAyNi0zMXQyMC0zMCAxMy0zMyA1LTQyVjEyOHpNNjQwIDg5NmgxMjh2MTI4SDY0MFY4OTZ6bTAgMjU2aDEyOHYxMjhINjQwdi0xMjh6bTAgMjU2aDEyOHYxMjhINjQwdi0xMjh6bTEyOCAyNTZ2MTI4SDY0MHYtMTI4aDEyOHptMC03NjhWNzY4aDEyOHYxMjhINzY4em0wIDI1NnYtMTI4aDEyOHYxMjhINzY4em0wIDI1NnYtMTI4aDEyOHYxMjhINzY4em0wIDI1NnYtMTI4aDEyOHYxMjhINzY4eiIgLz4NCjwvc3ZnPg==";
8
8
  exports.ArchiveIcon = ArchiveIcon;
9
9
  const AudioIcon = "data:image/svg+xml;base64,PHN2ZyB4b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ExIDIuMzYzMjggMTMuNDc2NkMyLjcxNDg0IDE0LjA3NTUgMy4xMzgwMiAxNC42MjI0IDMuNjMyODEgMTUuMTE3MkM0LjEyNzYgMTUuNjEyIDQuNjc0NDggMTYuMDM1MiA1LjI3MzQ0IDE2LjM4NjdDNS44Nzg5MSAxNi43MzgzIDYuNTI2NjkgMTcuMDExNyA3LjIxNjggMTcuMjA3QzcuOTA2OSAxNy40MDIzIDguNjI2MyAxNy41IDkuMzc1IDE3LjVaTTguNzUgNUgxMFYxMS4yNUg4Ljc1VjVaTTguNzUgMTIuNUgxMFYxMy43NUg4Ljc1VjEyLjVaIj48L3BhdGg+PC9zdmc+";
32
+ exports.NotificationAlertIcon = NotificationAlertIcon;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.WebChatMiddlewareConstants = exports.TranscriptConstants = exports.StorageType = exports.Regex = exports.ParticipantType = exports.MimeTypes = exports.LocaleConstants = exports.LiveWorkItemState = exports.HtmlIdNames = exports.HtmlElementSelectors = exports.HtmlClassNames = exports.HtmlAttributeNames = exports.EnvironmentVersion = exports.ElementType = exports.E2VVOptions = exports.ConversationMode = exports.ConversationEndEntity = exports.Constants = exports.ConfirmationState = exports.ChatSDKError = exports.AriaTelemetryConstants = exports.AMSConstants = void 0;
6
+ exports.WebChatMiddlewareConstants = exports.TranscriptConstants = exports.StorageType = exports.Regex = exports.ParticipantType = exports.NotificationPaneConstants = exports.MimeTypes = exports.LocaleConstants = exports.LiveWorkItemState = exports.HtmlIdNames = exports.HtmlElementSelectors = exports.HtmlClassNames = exports.HtmlAttributeNames = exports.EnvironmentVersion = exports.ElementType = exports.E2VVOptions = exports.ConversationMode = exports.ConversationEndEntity = exports.Constants = exports.ConfirmationState = exports.ChatSDKError = exports.AriaTelemetryConstants = exports.AMSConstants = void 0;
7
7
  var _class;
8
8
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
9
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
@@ -266,6 +266,20 @@ _defineProperty(TranscriptConstants, "AdaptiveCardType", "adaptivecard");
266
266
  _defineProperty(TranscriptConstants, "InternalMode", "internal");
267
267
  _defineProperty(TranscriptConstants, "AgentDialogColor", "#2266E3");
268
268
  _defineProperty(TranscriptConstants, "AgentFontColor", "white");
269
+ class NotificationPaneConstants {}
270
+ exports.NotificationPaneConstants = NotificationPaneConstants;
271
+ _defineProperty(NotificationPaneConstants, "DefaultNotificationPaneId", "lcw-notification-pane");
272
+ _defineProperty(NotificationPaneConstants, "DismissId", "lcw-notification-pane-dismiss-button");
273
+ _defineProperty(NotificationPaneConstants, "DismissText", "Dismiss");
274
+ _defineProperty(NotificationPaneConstants, "DismissAriaLabel", "Notification dismiss");
275
+ _defineProperty(NotificationPaneConstants, "CloseChatId", "lcw-notification-pane-close-chat-button");
276
+ _defineProperty(NotificationPaneConstants, "CloseChatText", "Close Chat");
277
+ _defineProperty(NotificationPaneConstants, "CloseChatAriaLabel", "Close chat");
278
+ _defineProperty(NotificationPaneConstants, "IconId", "lcw-notification-pane-icon");
279
+ _defineProperty(NotificationPaneConstants, "IconText", "Notification Icon");
280
+ _defineProperty(NotificationPaneConstants, "ChatDisconnectTitleText", "Chat disconnected");
281
+ _defineProperty(NotificationPaneConstants, "ChatDisconnectSubtitleText", "For additional assistance, please close the chat and try again.");
282
+ _defineProperty(NotificationPaneConstants, "ChromeCloseIconName", "ChromeClose");
269
283
  class AriaTelemetryConstants {}
270
284
  exports.AriaTelemetryConstants = AriaTelemetryConstants;
271
285
  // Aria Endpoint for different environment types.
@@ -144,6 +144,8 @@ exports.TelemetryEvent = TelemetryEvent;
144
144
  TelemetryEvent["ReconnectChatPaneLoaded"] = "ReconnectChatPaneLoaded";
145
145
  TelemetryEvent["HeaderCloseButtonClicked"] = "HeaderCloseButtonClicked";
146
146
  TelemetryEvent["HeaderMinimizeButtonClicked"] = "HeaderMinimizeButtonClicked";
147
+ TelemetryEvent["NotificationCloseChatButtonClicked"] = "NotificationCloseChatButtonClicked";
148
+ TelemetryEvent["NotificationDismissButtonClicked"] = "NotificationDismissButtonClicked";
147
149
  TelemetryEvent["DownloadTranscriptButtonClicked"] = "DownloadTranscriptButtonClicked";
148
150
  TelemetryEvent["EmailTranscriptButtonClicked"] = "EmailTranscriptButtonClicked";
149
151
  TelemetryEvent["EmailTranscriptCancelButtonClicked"] = "EmailTranscriptCancelButtonClicked";
@@ -254,6 +256,8 @@ class TelemetryConstants {
254
256
  case TelemetryEvent.PreChatSurveyStartChatMethodFailed:
255
257
  case TelemetryEvent.HeaderCloseButtonClicked:
256
258
  case TelemetryEvent.HeaderMinimizeButtonClicked:
259
+ case TelemetryEvent.NotificationCloseChatButtonClicked:
260
+ case TelemetryEvent.NotificationDismissButtonClicked:
257
261
  case TelemetryEvent.MessageSent:
258
262
  case TelemetryEvent.MessageReceived:
259
263
  case TelemetryEvent.CustomContextReceived:
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.prepareEndChat = exports.endChat = void 0;
6
+ exports.prepareEndChat = exports.endVoiceVideoCallIfOngoing = exports.endChat = void 0;
7
7
  var _Constants = require("../../../common/Constants");
8
8
  var _TelemetryConstants = require("../../../common/telemetry/TelemetryConstants");
9
9
  var _authHelper = require("./authHelper");
@@ -19,20 +19,22 @@ var _defaultWebChatContainerStatefulProps = require("../../webchatcontainerstate
19
19
  const prepareEndChat = async (props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, uwid) => {
20
20
  try {
21
21
  var _conversationDetails$, _state$domainStates, _state$domainStates2;
22
+ // Use Case: If call is ongoing, end the call by simulating end call button click
23
+ endVoiceVideoCallIfOngoing(chatSDK, dispatch);
22
24
  const conversationDetails = await (0, _utils.getConversationDetailsCall)(chatSDK);
23
25
 
24
- // Use Case : When post chat is not configured
26
+ // Use Case: When post chat is not configured
25
27
  if ((conversationDetails === null || conversationDetails === void 0 ? void 0 : (_conversationDetails$ = conversationDetails.canRenderPostChat) === null || _conversationDetails$ === void 0 ? void 0 : _conversationDetails$.toLowerCase()) === _Constants.Constants.false) {
26
28
  var _state$appStates;
27
29
  // If ended by customer, just close chat
28
30
  if ((state === null || state === void 0 ? void 0 : (_state$appStates = state.appStates) === null || _state$appStates === void 0 ? void 0 : _state$appStates.conversationEndedBy) === _Constants.ConversationEndEntity.Customer) {
29
31
  await endChat(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, false, false, true, uwid);
30
32
  }
31
- //Use Case: If ended by Agent, stay chat in InActive state
33
+ // Use Case: If ended by Agent, stay chat in InActive state
32
34
  return;
33
35
  }
34
36
 
35
- // Use Case : Can render post chat scenarios
37
+ // Use Case: Can render post chat scenarios
36
38
  await (0, _renderSurveyHelpers.getPostChatContext)(chatSDK, state, dispatch);
37
39
 
38
40
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -142,6 +144,28 @@ const endChat = async function (props, chatSDK, state, dispatch, setAdapter, set
142
144
  }
143
145
  };
144
146
  exports.endChat = endChat;
147
+ const callingStateCleanUp = async dispatch => {
148
+ dispatch({
149
+ type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SHOW_CALLING_CONTAINER,
150
+ payload: false
151
+ });
152
+ dispatch({
153
+ type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_INCOMING_CALL,
154
+ payload: true
155
+ });
156
+ dispatch({
157
+ type: _LiveChatWidgetActionType.LiveChatWidgetActionType.DISABLE_VIDEO_CALL,
158
+ payload: true
159
+ });
160
+ dispatch({
161
+ type: _LiveChatWidgetActionType.LiveChatWidgetActionType.DISABLE_LOCAL_VIDEO,
162
+ payload: true
163
+ });
164
+ dispatch({
165
+ type: _LiveChatWidgetActionType.LiveChatWidgetActionType.DISABLE_REMOTE_VIDEO,
166
+ payload: true
167
+ });
168
+ };
145
169
  const endChatStateCleanUp = async dispatch => {
146
170
  // Need to clear these states immediately when chat ended from OC.
147
171
  dispatch({
@@ -192,6 +216,31 @@ const closeChatStateCleanUp = async dispatch => {
192
216
  }
193
217
  });
194
218
  };
219
+
220
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
221
+ const endVoiceVideoCallIfOngoing = async (chatSDK, dispatch) => {
222
+ let callId = "";
223
+ try {
224
+ const voiceVideoCallingSdk = await chatSDK.getVoiceVideoCalling();
225
+ if (voiceVideoCallingSdk && voiceVideoCallingSdk.isInACall()) {
226
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
227
+ callId = voiceVideoCallingSdk.callId;
228
+ voiceVideoCallingSdk.stopCall();
229
+ _TelemetryHelper.TelemetryHelper.logCallingEvent(_TelemetryConstants.LogLevel.INFO, {
230
+ Event: _TelemetryConstants.TelemetryEvent.EndCallButtonClick
231
+ }, callId);
232
+ callingStateCleanUp(dispatch);
233
+ }
234
+ } catch (error) {
235
+ _TelemetryHelper.TelemetryHelper.logCallingEvent(_TelemetryConstants.LogLevel.ERROR, {
236
+ Event: _TelemetryConstants.TelemetryEvent.EndCallButtonClickException,
237
+ ExceptionDetails: {
238
+ exception: `Failed to End Call: ${error}`
239
+ }
240
+ }, callId);
241
+ }
242
+ };
243
+ exports.endVoiceVideoCallIfOngoing = endVoiceVideoCallIfOngoing;
195
244
  const closeChatWidget = (dispatch, props, state) => {
196
245
  var _state$appStates3;
197
246
  if (state !== null && state !== void 0 && (_state$appStates3 = state.appStates) !== null && _state$appStates3 !== void 0 && _state$appStates3.hideStartChatButton) {
@@ -36,10 +36,11 @@ var _preProcessingMiddleware = _interopRequireDefault(require("../../webchatcont
36
36
  var _sanitizationMiddleware = _interopRequireDefault(require("../../webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/sanitizationMiddleware"));
37
37
  var _dompurify = _interopRequireDefault(require("dompurify"));
38
38
  var _messageSequenceIdOverrideMiddleware = _interopRequireDefault(require("../../webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageSequenceIdOverrideMiddleware"));
39
+ var _toastMiddleware = _interopRequireDefault(require("../../webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/toastMiddleware"));
39
40
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
40
41
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
41
- const initWebChatComposer = (props, state, dispatch, chatSDK) => {
42
- 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;
42
+ const initWebChatComposer = (props, state, dispatch, chatSDK, endChat) => {
43
+ 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;
43
44
  // Add a hook to make all links open a new window
44
45
  postDomPurifyActivities();
45
46
  const localizedTexts = {
@@ -114,14 +115,15 @@ const initWebChatComposer = (props, state, dispatch, chatSDK) => {
114
115
  activityMiddleware: (_props$webChatContain9 = props.webChatContainerProps) !== null && _props$webChatContain9 !== void 0 && (_props$webChatContain10 = _props$webChatContain9.renderingMiddlewareProps) !== null && _props$webChatContain10 !== void 0 && _props$webChatContain10.disableActivityMiddleware ? undefined : (0, _activityMiddleware.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),
115
116
  attachmentMiddleware: (_props$webChatContain11 = props.webChatContainerProps) !== null && _props$webChatContain11 !== void 0 && (_props$webChatContain12 = _props$webChatContain11.renderingMiddlewareProps) !== null && _props$webChatContain12 !== void 0 && _props$webChatContain12.disableAttachmentMiddleware ? undefined : (0, _attachmentMiddleware.default)(((_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.defaultAttachmentProps.enableInlinePlaying),
116
117
  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.defaultWebChatContainerStatefulProps.webChatProps) === null || _defaultWebChatContai === void 0 ? void 0 : _defaultWebChatContai.activityStatusMiddleware,
118
+ toastMiddleware: (_props$webChatContain15 = props.webChatContainerProps) !== null && _props$webChatContain15 !== void 0 && (_props$webChatContain16 = _props$webChatContain15.renderingMiddlewareProps) !== null && _props$webChatContain16 !== void 0 && _props$webChatContain16.disableToastMiddleware ? undefined : (0, _toastMiddleware.default)(props.notificationPaneProps, endChat),
117
119
  renderMarkdown,
118
- avatarMiddleware: (_props$webChatContain15 = props.webChatContainerProps) !== null && _props$webChatContain15 !== void 0 && (_props$webChatContain16 = _props$webChatContain15.renderingMiddlewareProps) !== null && _props$webChatContain16 !== void 0 && _props$webChatContain16.disableAvatarMiddleware ? undefined : (0, _avatarMiddleware.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),
119
- 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.defaultWebChatContainerStatefulProps.webChatProps) === null || _defaultWebChatContai2 === void 0 ? void 0 : _defaultWebChatContai2.groupActivitiesMiddleware,
120
- 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.defaultWebChatContainerStatefulProps.webChatProps) === null || _defaultWebChatContai3 === void 0 ? void 0 : _defaultWebChatContai3.typingIndicatorMiddleware,
120
+ avatarMiddleware: (_props$webChatContain17 = props.webChatContainerProps) !== null && _props$webChatContain17 !== void 0 && (_props$webChatContain18 = _props$webChatContain17.renderingMiddlewareProps) !== null && _props$webChatContain18 !== void 0 && _props$webChatContain18.disableAvatarMiddleware ? undefined : (0, _avatarMiddleware.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),
121
+ 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.defaultWebChatContainerStatefulProps.webChatProps) === null || _defaultWebChatContai2 === void 0 ? void 0 : _defaultWebChatContai2.groupActivitiesMiddleware,
122
+ 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.defaultWebChatContainerStatefulProps.webChatProps) === null || _defaultWebChatContai3 === void 0 ? void 0 : _defaultWebChatContai3.typingIndicatorMiddleware,
121
123
  onTelemetry: (0, _WebChatLogger.createWebChatTelemetry)(),
122
- cardActionMiddleware: (0, _cardActionMiddleware.createCardActionMiddleware)(((_props$webChatContain21 = props.webChatContainerProps) === null || _props$webChatContain21 === void 0 ? void 0 : _props$webChatContain21.botMagicCode) || undefined),
124
+ cardActionMiddleware: (0, _cardActionMiddleware.createCardActionMiddleware)(((_props$webChatContain23 = props.webChatContainerProps) === null || _props$webChatContain23 === void 0 ? void 0 : _props$webChatContain23.botMagicCode) || undefined),
123
125
  sendTypingIndicator: true,
124
- ...((_props$webChatContain22 = props.webChatContainerProps) === null || _props$webChatContain22 === void 0 ? void 0 : _props$webChatContain22.webChatProps)
126
+ ...((_props$webChatContain24 = props.webChatContainerProps) === null || _props$webChatContain24 === void 0 ? void 0 : _props$webChatContain24.webChatProps)
125
127
  };
126
128
  return webChatProps;
127
129
  };
@@ -55,7 +55,7 @@ const prepareStartChat = async (props, chatSDK, state, dispatch, setAdapter) =>
55
55
  const isPreChatEnabledInProactiveChat = state.appStates.proactiveChatStates.proactiveChatEnablePrechat;
56
56
 
57
57
  //Setting PreChat and intiate chat
58
- await setPreChatAndInitiateChat(chatSDK, dispatch, setAdapter, isProactiveChat, isPreChatEnabledInProactiveChat, undefined, props);
58
+ await setPreChatAndInitiateChat(chatSDK, dispatch, setAdapter, isProactiveChat, isPreChatEnabledInProactiveChat, state, props);
59
59
  };
60
60
 
61
61
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -326,7 +326,27 @@ const LiveChatWidgetStateful = props => {
326
326
  });
327
327
 
328
328
  // Start chat from SDK Event
329
- _omnichannelChatComponents.BroadcastService.getMessageByEventName(_TelemetryConstants.BroadcastEvent.StartChat).subscribe(() => {
329
+ _omnichannelChatComponents.BroadcastService.getMessageByEventName(_TelemetryConstants.BroadcastEvent.StartChat).subscribe(msg => {
330
+ var _msg$payload4;
331
+ let stateWithUpdatedContext = state;
332
+ if (msg !== null && msg !== void 0 && (_msg$payload4 = msg.payload) !== null && _msg$payload4 !== void 0 && _msg$payload4.customContext) {
333
+ var _msg$payload5, _msg$payload6;
334
+ _TelemetryHelper.TelemetryHelper.logActionEvent(_TelemetryConstants.LogLevel.INFO, {
335
+ Event: _TelemetryConstants.TelemetryEvent.CustomContextReceived,
336
+ Description: "CustomContext received through startChat event."
337
+ });
338
+ dispatch({
339
+ type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CUSTOM_CONTEXT,
340
+ payload: msg === null || msg === void 0 ? void 0 : (_msg$payload5 = msg.payload) === null || _msg$payload5 === void 0 ? void 0 : _msg$payload5.customContext
341
+ });
342
+ stateWithUpdatedContext = {
343
+ ...state,
344
+ domainStates: {
345
+ ...state.domainStates,
346
+ customContext: msg === null || msg === void 0 ? void 0 : (_msg$payload6 = msg.payload) === null || _msg$payload6 === void 0 ? void 0 : _msg$payload6.customContext
347
+ }
348
+ };
349
+ }
330
350
  _TelemetryHelper.TelemetryHelper.logActionEvent(_TelemetryConstants.LogLevel.INFO, {
331
351
  Event: _TelemetryConstants.TelemetryEvent.StartChatEventRecevied,
332
352
  Description: "Start chat event received."
@@ -340,7 +360,7 @@ const LiveChatWidgetStateful = props => {
340
360
  _omnichannelChatComponents.BroadcastService.postMessage({
341
361
  eventName: _TelemetryConstants.BroadcastEvent.ChatInitiated
342
362
  });
343
- (0, _startChat.prepareStartChat)(props, chatSDK, state, dispatch, setAdapter);
363
+ (0, _startChat.prepareStartChat)(props, chatSDK, stateWithUpdatedContext, dispatch, setAdapter);
344
364
  return;
345
365
  }
346
366
 
@@ -352,7 +372,7 @@ const LiveChatWidgetStateful = props => {
352
372
  _omnichannelChatComponents.BroadcastService.postMessage({
353
373
  eventName: _TelemetryConstants.BroadcastEvent.ChatInitiated
354
374
  });
355
- (0, _startChat.prepareStartChat)(props, chatSDK, state, dispatch, setAdapter);
375
+ (0, _startChat.prepareStartChat)(props, chatSDK, stateWithUpdatedContext, dispatch, setAdapter);
356
376
  return;
357
377
  }
358
378
 
@@ -604,7 +624,6 @@ const LiveChatWidgetStateful = props => {
604
624
  eventName: _TelemetryConstants.BroadcastEvent.ClosePopoutWindow
605
625
  });
606
626
  };
607
- const webChatProps = (0, _initWebChatComposer.initWebChatComposer)(props, state, dispatch, chatSDK);
608
627
  const setPostChatContextRelay = () => (0, _setPostChatContextAndLoadSurvey.setPostChatContextAndLoadSurvey)(chatSDK, dispatch);
609
628
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
610
629
  const endChatRelay = (adapter, skipEndChatSDK, skipCloseChat, postMessageToOtherTab) => (0, _endChat.endChat)(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, skipEndChatSDK, skipCloseChat, postMessageToOtherTab, uwid.current);
@@ -614,6 +633,7 @@ const LiveChatWidgetStateful = props => {
614
633
  const confirmationPaneProps = (0, _initConfirmationPropsComposer.initConfirmationPropsComposer)(props);
615
634
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
616
635
  const prepareEndChatRelay = () => (0, _endChat.prepareEndChat)(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, uwid.current);
636
+ const webChatProps = (0, _initWebChatComposer.initWebChatComposer)(props, state, dispatch, chatSDK, endChatRelay);
617
637
  const downloadTranscriptProps = (0, _createDownloadTranscriptProps.default)(props.downloadTranscriptProps, {
618
638
  ...(_defaultWebChatContainerStatefulProps.defaultWebChatContainerStatefulProps === null || _defaultWebChatContainerStatefulProps.defaultWebChatContainerStatefulProps === void 0 ? void 0 : _defaultWebChatContainerStatefulProps.defaultWebChatContainerStatefulProps.webChatStyles),
619
639
  ...((_props$webChatContain6 = props.webChatContainerProps) === null || _props$webChatContain6 === void 0 ? void 0 : _props$webChatContain6.webChatStyles)
@@ -0,0 +1,177 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.NotificationPaneStateful = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _omnichannelChatComponents = require("@microsoft/omnichannel-chat-components");
9
+ var _botframeworkWebchat = require("botframework-webchat");
10
+ var _NotificationScenarios = require("../webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios");
11
+ var _useChatAdapterStore = _interopRequireDefault(require("../../hooks/useChatAdapterStore"));
12
+ var _useChatContextStore = _interopRequireDefault(require("../../hooks/useChatContextStore"));
13
+ var _TelemetryHelper = require("../../common/telemetry/TelemetryHelper");
14
+ var _TelemetryConstants = require("../../common/telemetry/TelemetryConstants");
15
+ var _LiveChatWidgetActionType = require("../../contexts/common/LiveChatWidgetActionType");
16
+ var _Constants = require("../../common/Constants");
17
+ var _defaultChatDisconnectStyleProps = require("./defaultProps/defaultChatDisconnectStyleProps");
18
+ var _defaultChatDisconnectControlProps = require("./defaultProps/defaultChatDisconnectControlProps");
19
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
21
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
22
+ const NotificationPaneStateful = props => {
23
+ var _state$domainStates, _state$domainStates3;
24
+ const {
25
+ notificationPaneProps,
26
+ notificationScenarioType,
27
+ endChat
28
+ } = props;
29
+ const [state, dispatch] = (0, _useChatContextStore.default)();
30
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
31
+ const [adapter] = (0, _useChatAdapterStore.default)();
32
+ const localConfirmationPaneState = (0, _react.useRef)(state === null || state === void 0 ? void 0 : (_state$domainStates = state.domainStates) === null || _state$domainStates === void 0 ? void 0 : _state$domainStates.confirmationState);
33
+ const onCloseChatClick = async () => {
34
+ _TelemetryHelper.TelemetryHelper.logActionEvent(_TelemetryConstants.LogLevel.INFO, {
35
+ Event: _TelemetryConstants.TelemetryEvent.NotificationCloseChatButtonClicked,
36
+ Description: "Notification Close Chat button clicked."
37
+ });
38
+ if (localConfirmationPaneState.current !== _Constants.ConfirmationState.Ok) {
39
+ dispatch({
40
+ type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_SHOW_CONFIRMATION,
41
+ payload: true
42
+ });
43
+ } else {
44
+ const skipEndChatSDK = true;
45
+ const skipCloseChat = false;
46
+ const postMessageToOtherTabs = true;
47
+ await endChat(adapter, skipEndChatSDK, skipCloseChat, postMessageToOtherTabs);
48
+ }
49
+ };
50
+ (0, _react.useEffect)(() => {
51
+ var _state$domainStates2;
52
+ localConfirmationPaneState.current = state === null || state === void 0 ? void 0 : (_state$domainStates2 = state.domainStates) === null || _state$domainStates2 === void 0 ? void 0 : _state$domainStates2.confirmationState;
53
+ }, [state === null || state === void 0 ? void 0 : (_state$domainStates3 = state.domainStates) === null || _state$domainStates3 === void 0 ? void 0 : _state$domainStates3.confirmationState]);
54
+ const {
55
+ useDismissNotification
56
+ } = _botframeworkWebchat.hooks;
57
+ const dismissNotification = useDismissNotification();
58
+ const handleDismissNotification = (0, _react.useCallback)(() => {
59
+ _TelemetryHelper.TelemetryHelper.logActionEvent(_TelemetryConstants.LogLevel.INFO, {
60
+ Event: _TelemetryConstants.TelemetryEvent.NotificationDismissButtonClicked,
61
+ Description: `${notificationScenarioType} Notification Dismiss button clicked.`
62
+ });
63
+ dismissNotification(notificationScenarioType ?? "");
64
+ }, [notificationScenarioType]);
65
+
66
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
67
+ const populateTitleInternalProps = notificationProps => {
68
+ var _notificationProps$co, _notificationProps$co2, _notificationProps$st, _notificationProps$st2, _notificationProps$st3, _defaultChatDisconnec;
69
+ return {
70
+ hideTitle: ((_notificationProps$co = notificationProps.controlProps) === null || _notificationProps$co === void 0 ? void 0 : _notificationProps$co.hideTitle) ?? _defaultChatDisconnectControlProps.defaultChatDisconnectControlProps.hideTitle,
71
+ titleText: ((_notificationProps$co2 = notificationProps.controlProps) === null || _notificationProps$co2 === void 0 ? void 0 : _notificationProps$co2.titleText) ?? _defaultChatDisconnectControlProps.defaultChatDisconnectControlProps.titleText,
72
+ titleStyleProps: Object.assign({}, _defaultChatDisconnectStyleProps.defaultChatDisconnectStyleProps.titleStyleProps, (_notificationProps$st = notificationProps.styleProps) === null || _notificationProps$st === void 0 ? void 0 : _notificationProps$st.titleStyleProps),
73
+ 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.defaultChatDisconnectStyleProps.classNames) === null || _defaultChatDisconnec === void 0 ? void 0 : _defaultChatDisconnec.titleClassName)
74
+ };
75
+ };
76
+
77
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
78
+ const populateSubtitleInternalProps = notificationProps => {
79
+ var _notificationProps$co3, _notificationProps$co4, _notificationProps$st4, _notificationProps$st5, _notificationProps$st6, _defaultChatDisconnec2;
80
+ return {
81
+ hideSubtitle: ((_notificationProps$co3 = notificationProps.controlProps) === null || _notificationProps$co3 === void 0 ? void 0 : _notificationProps$co3.hideSubtitle) ?? _defaultChatDisconnectControlProps.defaultChatDisconnectControlProps.hideSubtitle,
82
+ subtitleText: ((_notificationProps$co4 = notificationProps.controlProps) === null || _notificationProps$co4 === void 0 ? void 0 : _notificationProps$co4.subtitleText) ?? _defaultChatDisconnectControlProps.defaultChatDisconnectControlProps.subtitleText,
83
+ subtitleStyleProps: Object.assign({}, _defaultChatDisconnectStyleProps.defaultChatDisconnectStyleProps.subtitleStyleProps, (_notificationProps$st4 = notificationProps.styleProps) === null || _notificationProps$st4 === void 0 ? void 0 : _notificationProps$st4.subtitleStyleProps),
84
+ 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.defaultChatDisconnectStyleProps.classNames) === null || _defaultChatDisconnec2 === void 0 ? void 0 : _defaultChatDisconnec2.subtitleClassName)
85
+ };
86
+ };
87
+
88
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
89
+ const populateHyperlinkInternalProps = notificationProps => {
90
+ var _notificationProps$co5, _notificationProps$co6, _notificationProps$co7, _notificationProps$co8, _notificationProps$st7, _notificationProps$st8, _notificationProps$st9, _notificationProps$st10, _defaultChatDisconnec3;
91
+ return {
92
+ hideHyperlink: ((_notificationProps$co5 = notificationProps.controlProps) === null || _notificationProps$co5 === void 0 ? void 0 : _notificationProps$co5.hideHyperlink) ?? _defaultChatDisconnectControlProps.defaultChatDisconnectControlProps.hideHyperlink,
93
+ hyperlinkText: ((_notificationProps$co6 = notificationProps.controlProps) === null || _notificationProps$co6 === void 0 ? void 0 : _notificationProps$co6.hyperlinkText) ?? _defaultChatDisconnectControlProps.defaultChatDisconnectControlProps.hyperlinkText,
94
+ hyperlinkAriaLabel: ((_notificationProps$co7 = notificationProps.controlProps) === null || _notificationProps$co7 === void 0 ? void 0 : _notificationProps$co7.hyperlinkAriaLabel) ?? _defaultChatDisconnectControlProps.defaultChatDisconnectControlProps.hyperlinkAriaLabel,
95
+ hyperlinkHref: ((_notificationProps$co8 = notificationProps.controlProps) === null || _notificationProps$co8 === void 0 ? void 0 : _notificationProps$co8.hyperlinkHref) ?? _defaultChatDisconnectControlProps.defaultChatDisconnectControlProps.hyperlinkHref,
96
+ hyperlinkStyleProps: Object.assign({}, _defaultChatDisconnectStyleProps.defaultChatDisconnectStyleProps.hyperlinkStyleProps, (_notificationProps$st7 = notificationProps.styleProps) === null || _notificationProps$st7 === void 0 ? void 0 : _notificationProps$st7.hyperlinkStyleProps),
97
+ hyperlinkHoverStyleProps: Object.assign({}, _defaultChatDisconnectStyleProps.defaultChatDisconnectStyleProps.hyperlinkHoverStyleProps, (_notificationProps$st8 = notificationProps.styleProps) === null || _notificationProps$st8 === void 0 ? void 0 : _notificationProps$st8.hyperlinkHoverStyleProps),
98
+ 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.defaultChatDisconnectStyleProps.classNames) === null || _defaultChatDisconnec3 === void 0 ? void 0 : _defaultChatDisconnec3.hyperlinkClassName)
99
+ };
100
+ };
101
+
102
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
103
+ const populateNotificationIconInternalProps = notificationProps => {
104
+ var _notificationProps$co9, _notificationProps$co10, _notificationProps$st11, _notificationProps$st12, _notificationProps$st13, _defaultChatDisconnec4, _notificationProps$st14;
105
+ return {
106
+ hideNotificationIcon: ((_notificationProps$co9 = notificationProps.controlProps) === null || _notificationProps$co9 === void 0 ? void 0 : _notificationProps$co9.hideIcon) ?? _defaultChatDisconnectControlProps.defaultChatDisconnectControlProps.hideIcon,
107
+ notificationIconProps: Object.assign({}, _defaultChatDisconnectControlProps.defaultChatDisconnectControlProps.notificationIconProps, (_notificationProps$co10 = notificationProps.controlProps) === null || _notificationProps$co10 === void 0 ? void 0 : _notificationProps$co10.notificationIconProps),
108
+ notificationIconStyleProps: Object.assign({}, _defaultChatDisconnectStyleProps.defaultChatDisconnectStyleProps.notificationIconStyleProps, (_notificationProps$st11 = notificationProps.styleProps) === null || _notificationProps$st11 === void 0 ? void 0 : _notificationProps$st11.notificationIconStyleProps),
109
+ 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.defaultChatDisconnectStyleProps.classNames) === null || _defaultChatDisconnec4 === void 0 ? void 0 : _defaultChatDisconnec4.notificationIconClassName),
110
+ notificationIconContainerStyleProps: Object.assign({}, _defaultChatDisconnectStyleProps.defaultChatDisconnectStyleProps.notificationIconContainerStyleProps, (_notificationProps$st14 = notificationProps.styleProps) === null || _notificationProps$st14 === void 0 ? void 0 : _notificationProps$st14.notificationIconContainerStyleProps)
111
+ };
112
+ };
113
+
114
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
115
+ const populateDismissButtonInternalProps = notificationProps => {
116
+ var _notificationProps$co11, _notificationProps$co12, _notificationProps$st15, _notificationProps$st16, _notificationProps$st17, _notificationProps$st18, _defaultChatDisconnec5;
117
+ return {
118
+ hideDismissButton: ((_notificationProps$co11 = notificationProps.controlProps) === null || _notificationProps$co11 === void 0 ? void 0 : _notificationProps$co11.hideDismissButton) ?? _defaultChatDisconnectControlProps.defaultChatDisconnectControlProps.hideDismissButton,
119
+ dismissButtonProps: Object.assign({
120
+ onClick: handleDismissNotification
121
+ }, _defaultChatDisconnectControlProps.defaultChatDisconnectControlProps.dismissButtonProps, (_notificationProps$co12 = notificationProps.controlProps) === null || _notificationProps$co12 === void 0 ? void 0 : _notificationProps$co12.dismissButtonProps),
122
+ dismissButtonStyleProps: Object.assign({}, _defaultChatDisconnectStyleProps.defaultChatDisconnectStyleProps.dismissButtonStyleProps, (_notificationProps$st15 = notificationProps.styleProps) === null || _notificationProps$st15 === void 0 ? void 0 : _notificationProps$st15.dismissButtonStyleProps),
123
+ dismissButtonHoverStyleProps: Object.assign({}, _defaultChatDisconnectStyleProps.defaultChatDisconnectStyleProps.dismissButtonHoverStyleProps, (_notificationProps$st16 = notificationProps.styleProps) === null || _notificationProps$st16 === void 0 ? void 0 : _notificationProps$st16.dismissButtonHoverStyleProps),
124
+ 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.defaultChatDisconnectStyleProps.classNames) === null || _defaultChatDisconnec5 === void 0 ? void 0 : _defaultChatDisconnec5.dismissButtonClassName)
125
+ };
126
+ };
127
+
128
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
129
+ const populateCloseChatButtonInternalProps = notificationProps => {
130
+ var _notificationProps$co13, _notificationProps$co14, _notificationProps$st19, _notificationProps$st20, _notificationProps$st21, _notificationProps$st22, _defaultChatDisconnec6;
131
+ return {
132
+ hideCloseChatButton: ((_notificationProps$co13 = notificationProps.controlProps) === null || _notificationProps$co13 === void 0 ? void 0 : _notificationProps$co13.hideCloseChatButton) ?? _defaultChatDisconnectControlProps.defaultChatDisconnectControlProps.hideCloseChatButton,
133
+ closeChatButtonProps: Object.assign({
134
+ onClick: onCloseChatClick
135
+ }, _defaultChatDisconnectControlProps.defaultChatDisconnectControlProps.closeChatButtonProps, (_notificationProps$co14 = notificationProps.controlProps) === null || _notificationProps$co14 === void 0 ? void 0 : _notificationProps$co14.closeChatButtonProps),
136
+ closeChatButtonStyleProps: Object.assign({}, _defaultChatDisconnectStyleProps.defaultChatDisconnectStyleProps.closeChatButtonStyleProps, (_notificationProps$st19 = notificationProps.styleProps) === null || _notificationProps$st19 === void 0 ? void 0 : _notificationProps$st19.closeChatButtonStyleProps),
137
+ closeChatButtonHoverStyleProps: Object.assign({}, _defaultChatDisconnectStyleProps.defaultChatDisconnectStyleProps.closeChatButtonHoverStyleProps, (_notificationProps$st20 = notificationProps.styleProps) === null || _notificationProps$st20 === void 0 ? void 0 : _notificationProps$st20.closeChatButtonHoverStyleProps),
138
+ 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.defaultChatDisconnectStyleProps.classNames) === null || _defaultChatDisconnec6 === void 0 ? void 0 : _defaultChatDisconnec6.closeChatButtonClassName)
139
+ };
140
+ };
141
+ let genericPropsObj = {};
142
+
143
+ // Populate INotificationPaneInternal after merging customized props with default props
144
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
145
+ const populateInternalProps = notificationProps => {
146
+ var _notificationProps$st23, _notificationProps$st24, _notificationProps$st25, _defaultChatDisconnec7, _notificationProps$st26, _notificationProps$st27;
147
+ if (!notificationProps) {
148
+ notificationProps = {};
149
+ }
150
+ genericPropsObj = {
151
+ id: notificationProps.id ?? _Constants.NotificationPaneConstants.DefaultNotificationPaneId,
152
+ dir: notificationProps.dir,
153
+ generalStyleProps: Object.assign({}, _defaultChatDisconnectStyleProps.defaultChatDisconnectStyleProps.generalStyleProps, (_notificationProps$st23 = notificationProps.styleProps) === null || _notificationProps$st23 === void 0 ? void 0 : _notificationProps$st23.generalStyleProps),
154
+ 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.defaultChatDisconnectStyleProps.classNames) === null || _defaultChatDisconnec7 === void 0 ? void 0 : _defaultChatDisconnec7.containerClassName),
155
+ componentOverrides: notificationProps.componentOverrides,
156
+ infoGroupStyleProps: Object.assign({}, _defaultChatDisconnectStyleProps.defaultChatDisconnectStyleProps.infoGroupStyleProps, (_notificationProps$st26 = notificationProps.styleProps) === null || _notificationProps$st26 === void 0 ? void 0 : _notificationProps$st26.infoGroupStyleProps),
157
+ buttonGroupStyleProps: Object.assign({}, _defaultChatDisconnectStyleProps.defaultChatDisconnectStyleProps.buttonGroupStyleProps, (_notificationProps$st27 = notificationProps.styleProps) === null || _notificationProps$st27 === void 0 ? void 0 : _notificationProps$st27.buttonGroupStyleProps),
158
+ ...populateTitleInternalProps(notificationProps),
159
+ ...populateSubtitleInternalProps(notificationProps),
160
+ ...populateHyperlinkInternalProps(notificationProps),
161
+ ...populateNotificationIconInternalProps(notificationProps),
162
+ ...populateDismissButtonInternalProps(notificationProps),
163
+ ...populateCloseChatButtonInternalProps(notificationProps)
164
+ };
165
+ };
166
+ switch (notificationScenarioType) {
167
+ case _NotificationScenarios.NotificationScenarios.ChatDisconnect:
168
+ populateInternalProps(notificationPaneProps === null || notificationPaneProps === void 0 ? void 0 : notificationPaneProps.chatDisconnectNotificationProps);
169
+ break;
170
+ // TODO additional scenarios to be added...
171
+ }
172
+
173
+ return /*#__PURE__*/_react.default.createElement(_omnichannelChatComponents.NotificationPane, genericPropsObj);
174
+ };
175
+ exports.NotificationPaneStateful = NotificationPaneStateful;
176
+ var _default = NotificationPaneStateful;
177
+ exports.default = _default;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.defaultChatDisconnectControlProps = void 0;
7
+ var _Constants = require("../../../common/Constants");
8
+ var _Icons = require("../../../assets/Icons");
9
+ const defaultChatDisconnectControlProps = {
10
+ hideTitle: false,
11
+ titleText: _Constants.NotificationPaneConstants.ChatDisconnectTitleText,
12
+ hideSubtitle: false,
13
+ subtitleText: _Constants.NotificationPaneConstants.ChatDisconnectSubtitleText,
14
+ hideIcon: false,
15
+ notificationIconProps: {
16
+ id: _Constants.NotificationPaneConstants.IconId,
17
+ src: _Icons.NotificationAlertIcon,
18
+ alt: _Constants.NotificationPaneConstants.IconText
19
+ },
20
+ hideHyperlink: true,
21
+ hyperlinkText: "Learn more",
22
+ hyperlinkAriaLabel: "Learn more",
23
+ hyperlinkHref: "https://www.microsoft.com",
24
+ hideDismissButton: false,
25
+ dismissButtonProps: {
26
+ id: _Constants.NotificationPaneConstants.DismissId,
27
+ text: _Constants.NotificationPaneConstants.DismissText,
28
+ type: "icon",
29
+ iconName: _Constants.NotificationPaneConstants.ChromeCloseIconName,
30
+ ariaLabel: _Constants.NotificationPaneConstants.DismissAriaLabel
31
+ },
32
+ hideCloseChatButton: false,
33
+ closeChatButtonProps: {
34
+ id: _Constants.NotificationPaneConstants.CloseChatId,
35
+ text: _Constants.NotificationPaneConstants.CloseChatText,
36
+ type: "text",
37
+ iconName: _Constants.NotificationPaneConstants.ChromeCloseIconName,
38
+ ariaLabel: _Constants.NotificationPaneConstants.CloseChatAriaLabel
39
+ }
40
+ };
41
+ exports.defaultChatDisconnectControlProps = defaultChatDisconnectControlProps;
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.defaultChatDisconnectStyleProps = void 0;
7
+ const defaultChatDisconnectStyleProps = {
8
+ generalStyleProps: {
9
+ backgroundColor: "#FFF4CE",
10
+ display: "flex"
11
+ },
12
+ notificationIconStyleProps: {
13
+ display: "flex",
14
+ height: "19px",
15
+ width: "19px"
16
+ },
17
+ notificationIconContainerStyleProps: {
18
+ display: "flex",
19
+ width: "36px",
20
+ height: "32px",
21
+ flexShrink: "0",
22
+ justifyContent: "center",
23
+ alignItems: "center"
24
+ },
25
+ titleStyleProps: {
26
+ fontFamily: "'Segoe UI', Arial, sans-serif",
27
+ fontSize: "87.5%",
28
+ minHeight: "32px",
29
+ fontWeight: "bold"
30
+ },
31
+ subtitleStyleProps: {
32
+ fontFamily: "'Segoe UI', Arial, sans-serif",
33
+ fontSize: "87.5%",
34
+ fontWeight: "normal"
35
+ },
36
+ hyperlinkStyleProps: {
37
+ fontFamily: "'Segoe UI', Arial, sans-serif",
38
+ fontSize: "87.5%",
39
+ textDecoration: "none",
40
+ color: "#0078d4",
41
+ fontWeight: "normal"
42
+ },
43
+ hyperlinkHoverStyleProps: {
44
+ textDecoration: "none",
45
+ color: "#005a9e"
46
+ },
47
+ dismissButtonStyleProps: {
48
+ width: "22px",
49
+ height: "22px",
50
+ borderRadius: "3px",
51
+ border: "0",
52
+ margin: "4px",
53
+ backgroundColor: "transparent",
54
+ color: "black",
55
+ icon: {
56
+ fontSize: "14px"
57
+ }
58
+ },
59
+ dismissButtonHoverStyleProps: {
60
+ filter: "brightness(0.8)",
61
+ icon: {
62
+ color: "black"
63
+ }
64
+ },
65
+ closeChatButtonStyleProps: {
66
+ backgroundColor: "white",
67
+ fontFamily: "Segoe UI, Arial, sans-serif",
68
+ fontSize: "87.5%",
69
+ fontWeight: "500",
70
+ height: "32px",
71
+ width: "80px",
72
+ padding: "0px"
73
+ },
74
+ closeChatButtonHoverStyleProps: {
75
+ filter: "brightness(0.8)"
76
+ },
77
+ infoGroupStyleProps: {
78
+ display: "flex",
79
+ justifyContent: "space-between",
80
+ flex: "1 1 0%",
81
+ marginTop: "2px"
82
+ },
83
+ buttonGroupStyleProps: {
84
+ display: "flex",
85
+ justifyContent: "flex-end",
86
+ margin: "8px"
87
+ },
88
+ classNames: {
89
+ containerClassName: "chat-disconnect-container",
90
+ titleClassName: "chat-disconnect-title",
91
+ subtitleClassName: "chat-disconnect-subtitle",
92
+ dismissButtonClassName: "chat-disconnect-dismiss-button",
93
+ hyperlinkClassName: "chat-disconnect-hyperlink",
94
+ notificationIconClassName: "chat-disconnect-notification-icon",
95
+ closeChatButtonClassName: "chat-disconnect-close-chat-button"
96
+ }
97
+ };
98
+ exports.defaultChatDisconnectStyleProps = defaultChatDisconnectStyleProps;