@microsoft/omnichannel-chat-widget 0.1.0-main.0ec5410 → 0.1.0-main.106d830

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 (60) hide show
  1. package/README.md +3 -11
  2. package/lib/cjs/common/Constants.js +34 -4
  3. package/lib/cjs/common/telemetry/TelemetryConstants.js +13 -1
  4. package/lib/cjs/common/telemetry/TelemetryHelper.js +13 -0
  5. package/lib/cjs/common/telemetry/TelemetryManager.js +10 -5
  6. package/lib/cjs/common/telemetry/defaultConfigs/defaultAriaConfig.js +1 -1
  7. package/lib/cjs/common/telemetry/loggers/ariaTelemetryLogger.js +21 -2
  8. package/lib/cjs/common/utils.js +15 -2
  9. package/lib/cjs/components/confirmationpanestateful/ConfirmationPaneStateful.js +4 -39
  10. package/lib/cjs/components/footerstateful/FooterStateful.js +1 -2
  11. package/lib/cjs/components/headerstateful/HeaderStateful.js +1 -7
  12. package/lib/cjs/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +5 -2
  13. package/lib/cjs/components/livechatwidget/common/endChat.js +37 -1
  14. package/lib/cjs/components/livechatwidget/common/initCallingSdk.js +1 -1
  15. package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +3 -0
  16. package/lib/cjs/components/livechatwidget/common/reconnectChatHelper.js +105 -20
  17. package/lib/cjs/components/livechatwidget/common/registerTelemetryLoggers.js +7 -6
  18. package/lib/cjs/components/livechatwidget/common/startChat.js +38 -29
  19. package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +55 -11
  20. package/lib/cjs/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +8 -0
  21. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.js +6 -6
  22. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.js +44 -0
  23. package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +15 -16
  24. package/lib/cjs/contexts/createReducer.js +0 -10
  25. package/lib/esm/common/Constants.js +30 -3
  26. package/lib/esm/common/telemetry/TelemetryConstants.js +13 -1
  27. package/lib/esm/common/telemetry/TelemetryHelper.js +13 -1
  28. package/lib/esm/common/telemetry/TelemetryManager.js +9 -5
  29. package/lib/esm/common/telemetry/defaultConfigs/defaultAriaConfig.js +1 -1
  30. package/lib/esm/common/telemetry/loggers/ariaTelemetryLogger.js +18 -1
  31. package/lib/esm/common/utils.js +11 -1
  32. package/lib/esm/components/confirmationpanestateful/ConfirmationPaneStateful.js +7 -37
  33. package/lib/esm/components/footerstateful/FooterStateful.js +1 -2
  34. package/lib/esm/components/headerstateful/HeaderStateful.js +1 -7
  35. package/lib/esm/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +5 -3
  36. package/lib/esm/components/livechatwidget/common/endChat.js +37 -3
  37. package/lib/esm/components/livechatwidget/common/initCallingSdk.js +1 -1
  38. package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +2 -0
  39. package/lib/esm/components/livechatwidget/common/reconnectChatHelper.js +94 -20
  40. package/lib/esm/components/livechatwidget/common/registerTelemetryLoggers.js +4 -3
  41. package/lib/esm/components/livechatwidget/common/startChat.js +39 -30
  42. package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +53 -13
  43. package/lib/esm/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +6 -0
  44. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.js +6 -6
  45. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.js +31 -0
  46. package/lib/esm/contexts/common/LiveChatWidgetActionType.js +15 -16
  47. package/lib/esm/contexts/createReducer.js +0 -9
  48. package/lib/types/common/Constants.d.ts +17 -1
  49. package/lib/types/common/telemetry/TelemetryConstants.d.ts +9 -2
  50. package/lib/types/common/telemetry/TelemetryHelper.d.ts +1 -0
  51. package/lib/types/common/utils.d.ts +1 -0
  52. package/lib/types/components/confirmationpanestateful/interfaces/IConfirmationPaneStatefulParams.d.ts +4 -4
  53. package/lib/types/components/footerstateful/audionotificationstateful/interfaces/IAudioNotificationStatefulParams.d.ts +0 -1
  54. package/lib/types/components/livechatwidget/common/endChat.d.ts +4 -1
  55. package/lib/types/components/livechatwidget/common/reconnectChatHelper.d.ts +5 -2
  56. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetComponentOverrides.d.ts +1 -0
  57. package/lib/types/components/reconnectchatpanestateful/interfaces/IReconnectChatPaneStatefulProps.d.ts +1 -0
  58. package/lib/types/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.d.ts +1 -0
  59. package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +15 -16
  60. package/package.json +3 -1
package/README.md CHANGED
@@ -11,8 +11,7 @@
11
11
  1. [Installation](#installation)
12
12
  1. [Example Usage](#example-usage)
13
13
  1. [Components](#components)
14
- 1. [Telemetry](#telemetry)
15
- 1. [Features](#features)
14
+ 1. [See Also](#see-also)
16
15
 
17
16
  ## Introduction
18
17
 
@@ -84,15 +83,7 @@ const render = async () => {
84
83
  }
85
84
  },
86
85
  chatSDK: chatSDK, // mandatory
87
- chatConfig: chatConfig, // mandatory
88
- telemetryConfig: { //mandatory
89
- orgId: omnichannelConfig.orgId,
90
- orgUrl: omnichannelConfig.orgUrl,
91
- appId: omnichannelConfig.widgetId,
92
- OCChatSDKVersion: chatSdkVersion,
93
- chatComponentVersion: chatComponentVersion,
94
- chatWidgetVersion: chatWidgetVersion
95
- }
86
+ chatConfig: chatConfig // mandatory
96
87
  };
97
88
 
98
89
  ReactDOM.render(
@@ -134,6 +125,7 @@ These are components that are included in the ```@microsoft/omnichannel-chat-com
134
125
 
135
126
  | Component | Default Usage | Interface |
136
127
  | ----- | -------- | ----- |
128
+ | WebChatContainer | The default wrapper around BotFramework's [WebChat](https://github.com/microsoft/BotFramework-WebChat), which is the message container we are using | [IWebChatContainerStatefulProps](https://github.com/microsoft/omnichannel-chat-widget/blob/main/chat-widget/src/components/webchatcontainerstateful/interfaces/IWebChatContainerStatefulProps.ts) |
137
129
  | LiveChatWidget | The default widget that stitches the UI components with Chat SDK | [ILiveChatWidgetProps](https://github.com/microsoft/omnichannel-chat-widget/blob/main/chat-widget/src/components/livechatwidget/interfaces/ILiveChatWidgetProps.ts) |
138
130
 
139
131
  Some of the interfaces listed in the Stateless table have Stateful counterparts defined in the ```@microsoft/omnichannel-chat-widget``` package. For example, [IConfirmationPaneStatefulProps](https://github.com/microsoft/omnichannel-chat-widget/blob/main/chat-widget/src/components/confirmationpanestateful/interfaces/IConfirmationPaneStatefulProps.ts) extends [IConfirmationPaneProps](https://github.com/microsoft/omnichannel-chat-widget/blob/main/chat-components/src/components/confirmationpane/interfaces/IConfirmationPaneProps.ts) with additional attributes that only makes sense in the stateful context.
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.WebChatMiddlewareConstants = exports.TranscriptConstants = exports.Regex = exports.MimeTypes = exports.LocaleConstants = exports.HtmlIdNames = exports.HtmlElementSelectors = exports.HtmlClassNames = exports.HtmlAttributeNames = exports.ElementType = exports.Constants = exports.ChatSDKError = void 0;
6
+ exports.WebChatMiddlewareConstants = exports.TranscriptConstants = exports.Regex = exports.MimeTypes = exports.LocaleConstants = exports.HtmlIdNames = exports.HtmlElementSelectors = exports.HtmlClassNames = exports.HtmlAttributeNames = exports.EnvironmentVersion = exports.ElementType = exports.Constants = exports.ChatSDKError = exports.AriaTelemetryConstants = void 0;
7
7
 
8
8
  var _class;
9
9
 
@@ -21,6 +21,8 @@ _defineProperty(Constants, "historyMessageTag", "history");
21
21
 
22
22
  _defineProperty(Constants, "agentEndConversationMessageTag", "agentendconversation");
23
23
 
24
+ _defineProperty(Constants, "supervisorForceCloseMessageTag", "supervisorforceclosedconversation");
25
+
24
26
  _defineProperty(Constants, "receivedMessageClassName", "ms_lcw_webchat_received_message");
25
27
 
26
28
  _defineProperty(Constants, "sentMessageClassName", "ms_lcw_webchat_sent_message");
@@ -129,8 +131,6 @@ _defineProperty(Constants, "InputSubmit", "InputSubmit");
129
131
 
130
132
  _defineProperty(Constants, "ReconnectIdAttributeName", "oc.reconnectid");
131
133
 
132
- _defineProperty(Constants, "redirectPageRequest", "redirectPageRequest");
133
-
134
134
  _defineProperty(Constants, "LiveChatWidget", "LiveChatWidgetNew");
135
135
 
136
136
  _defineProperty(Constants, "GuidPattern", "xx-x-4m-ym-xxx");
@@ -282,6 +282,16 @@ exports.ChatSDKError = ChatSDKError;
282
282
  ChatSDKError["WidgetUseOutsideOperatingHour"] = "WidgetUseOutsideOperatingHour";
283
283
  })(ChatSDKError || (exports.ChatSDKError = ChatSDKError = {}));
284
284
 
285
+ let EnvironmentVersion;
286
+ exports.EnvironmentVersion = EnvironmentVersion;
287
+
288
+ (function (EnvironmentVersion) {
289
+ EnvironmentVersion["prod"] = "prod";
290
+ EnvironmentVersion["dogfood"] = "df";
291
+ EnvironmentVersion["int"] = "int";
292
+ EnvironmentVersion["test"] = "test";
293
+ })(EnvironmentVersion || (exports.EnvironmentVersion = EnvironmentVersion = {}));
294
+
285
295
  class TranscriptConstants {}
286
296
 
287
297
  exports.TranscriptConstants = TranscriptConstants;
@@ -304,4 +314,24 @@ _defineProperty(TranscriptConstants, "InternalMode", "internal");
304
314
 
305
315
  _defineProperty(TranscriptConstants, "AgentDialogColor", "#2266E3");
306
316
 
307
- _defineProperty(TranscriptConstants, "AgentFontColor", "white");
317
+ _defineProperty(TranscriptConstants, "AgentFontColor", "white");
318
+
319
+ class AriaTelemetryConstants {}
320
+
321
+ exports.AriaTelemetryConstants = AriaTelemetryConstants;
322
+
323
+ _defineProperty(AriaTelemetryConstants, "GERMANY_ENDPOINT", "https://de.pipe.aria.microsoft.com/Collector/3.0/");
324
+
325
+ _defineProperty(AriaTelemetryConstants, "GCCH_ENDPOINT", "https://tb.pipe.aria.microsoft.com/Collector/3.0/");
326
+
327
+ _defineProperty(AriaTelemetryConstants, "DOD_ENDPOINT", "https://pf.pipe.aria.microsoft.com/Collector/3.0");
328
+
329
+ _defineProperty(AriaTelemetryConstants, "EUROPE_ENDPOINT", "https://eu-mobile.events.data.microsoft.com/Collector/3.0/");
330
+
331
+ _defineProperty(AriaTelemetryConstants, "MOONCAKE_ENDPOINT", "");
332
+
333
+ _defineProperty(AriaTelemetryConstants, "Public", "Public");
334
+
335
+ _defineProperty(AriaTelemetryConstants, "EU", "Europe");
336
+
337
+ _defineProperty(AriaTelemetryConstants, "lcwEUDomainNames", ["crm4.omnichannelengagementhub.com", "crm12.omnichannelengagementhub.com", "crm16.omnichannelengagementhub.com", "crm17.omnichannelengagementhub.com", "crm19.omnichannelengagementhub.com"]);
@@ -37,7 +37,7 @@ exports.BroadcastEvent = BroadcastEvent;
37
37
 
38
38
  (function (BroadcastEvent) {
39
39
  BroadcastEvent["LoadPostChatSurvey"] = "LoadPostChatSurvey";
40
- BroadcastEvent["EndChat"] = "EndChat";
40
+ BroadcastEvent["EndChat"] = "ChatEnded";
41
41
  BroadcastEvent["NewMessageNotification"] = "NewMessageNotification";
42
42
  BroadcastEvent["UnreadMessageCount"] = "UnreadMessageCount";
43
43
  BroadcastEvent["ChatWidgetStateChanged"] = "ChatWidgetStateChanged";
@@ -46,6 +46,9 @@ exports.BroadcastEvent = BroadcastEvent;
46
46
  BroadcastEvent["InvalidAdaptiveCardFormat"] = "InvalidAdaptiveCardFormat";
47
47
  BroadcastEvent["NewMessageSent"] = "NewMessageSent";
48
48
  BroadcastEvent["NewMessageReceived"] = "NewMessageReceived";
49
+ BroadcastEvent["RedirectPageRequest"] = "RedirectPageRequest";
50
+ BroadcastEvent["StartChatSkippingChatButtonRendering"] = "StartChatSkippingChatButtonRendering";
51
+ BroadcastEvent["StartUnauthenticatedReconnectChat"] = "StartUnauthenticatedReconnectChat";
49
52
  })(BroadcastEvent || (exports.BroadcastEvent = BroadcastEvent = {}));
50
53
 
51
54
  let TelemetryEvent;
@@ -97,7 +100,9 @@ exports.TelemetryEvent = TelemetryEvent;
97
100
  TelemetryEvent["PrechatSurveyLoaded"] = "PrechatSurveyLoaded";
98
101
  TelemetryEvent["PrechatSubmitted"] = "PrechatSubmitted";
99
102
  TelemetryEvent["StartChatSDKCall"] = "StartChatCall";
103
+ TelemetryEvent["StartChatEventRecevied"] = "StartChatEventReceived";
100
104
  TelemetryEvent["EndChatSDKCall"] = "EndChatCall";
105
+ TelemetryEvent["EndChatEventReceived"] = "EndChatEventReceived";
101
106
  TelemetryEvent["OnNewMessageFailed"] = "OnNewMessageFailed";
102
107
  TelemetryEvent["OnNewMessageAudioNotificationFailed"] = "OnNewMessageAudioNotificationFailed";
103
108
  TelemetryEvent["DownloadTranscriptResponseNullOrUndefined"] = "DownloadTranscriptResponseNullOrUndefined";
@@ -111,6 +116,7 @@ exports.TelemetryEvent = TelemetryEvent;
111
116
  TelemetryEvent["LoadingPaneLoaded"] = "LoadingPaneLoaded";
112
117
  TelemetryEvent["EmailTranscriptLoaded"] = "EmailTranscriptLoaded";
113
118
  TelemetryEvent["OutOfOfficePaneLoaded"] = "OutOfOfficePaneLoaded";
119
+ TelemetryEvent["PostChatSurveyLoadingPaneLoaded"] = "PostChatSurveyLoadingPaneLoaded";
114
120
  TelemetryEvent["PostChatSurveyLoaded"] = "PostChatSurveyLoaded";
115
121
  TelemetryEvent["ConfirmationPaneLoaded"] = "ConfirmationPaneLoaded";
116
122
  TelemetryEvent["ProactiveChatPaneLoaded"] = "ProactiveChatPaneLoaded";
@@ -132,6 +138,7 @@ exports.TelemetryEvent = TelemetryEvent;
132
138
  TelemetryEvent["InvalidConfiguration"] = "InvalidConfiguration";
133
139
  TelemetryEvent["SendTypingIndicatorSucceeded"] = "SendTypingIndicatorSucceeded";
134
140
  TelemetryEvent["SendTypingIndicatorFailed"] = "SendTypingIndicatorFailed";
141
+ TelemetryEvent["WebChatEvent"] = "WebChatEvent";
135
142
  TelemetryEvent["PreChatSurveyStartChatMethodFailed"] = "PreChatSurveyStartChatMethodFailed";
136
143
  TelemetryEvent["ChatAlreadyTriggered"] = "ChatAlreadyTriggered";
137
144
  TelemetryEvent["StartProactiveChatEventReceived"] = "StartProactiveChatEventReceived";
@@ -160,6 +167,7 @@ class TelemetryConstants {
160
167
  case TelemetryEvent.LCWChatButtonShow:
161
168
  case TelemetryEvent.PrechatSurveyLoaded:
162
169
  case TelemetryEvent.LoadingPaneLoaded:
170
+ case TelemetryEvent.PostChatSurveyLoadingPaneLoaded:
163
171
  case TelemetryEvent.PostChatSurveyLoaded:
164
172
  case TelemetryEvent.EmailTranscriptLoaded:
165
173
  case TelemetryEvent.OutOfOfficePaneLoaded:
@@ -189,12 +197,16 @@ class TelemetryConstants {
189
197
  return ScenarioType.ACTIONS;
190
198
 
191
199
  case TelemetryEvent.StartChatSDKCall:
200
+ case TelemetryEvent.StartChatEventRecevied:
192
201
  case TelemetryEvent.StartChatMethodException:
193
202
  case TelemetryEvent.CloseChatMethodException:
203
+ case TelemetryEvent.StartProactiveChatEventReceived:
194
204
  case TelemetryEvent.StartProactiveChatMethodFailed:
195
205
  case TelemetryEvent.OnNewMessageFailed:
196
206
  case TelemetryEvent.OnNewMessageAudioNotificationFailed:
197
207
  case TelemetryEvent.GetConversationDetailsCallFailed:
208
+ case TelemetryEvent.EndChatSDKCall:
209
+ case TelemetryEvent.EndChatEventReceived:
198
210
  case TelemetryEvent.EndChatSDKCallFailed:
199
211
  case TelemetryEvent.PostChatContextCallFailed:
200
212
  case TelemetryEvent.PostChatContextCallSucceed:
@@ -276,5 +276,18 @@ _defineProperty(TelemetryHelper, "logConfigDataEvent", (logLevel, payload) => {
276
276
  }
277
277
  };
278
278
 
279
+ _omnichannelChatComponents.BroadcastService.postMessage(telemetryEvent);
280
+ });
281
+
282
+ _defineProperty(TelemetryHelper, "logWebChatEvent", (logLevel, payload) => {
283
+ const telemetryEvent = {
284
+ eventName: _TelemetryConstants.TelemetryEvent.WebChatEvent,
285
+ logLevel: logLevel,
286
+ payload: { ...payload,
287
+ type: _TelemetryConstants.TelemetryEvent.WebChatEvent,
288
+ scenarioType: _TelemetryConstants.ScenarioType.WEBCHAT
289
+ }
290
+ };
291
+
279
292
  _omnichannelChatComponents.BroadcastService.postMessage(telemetryEvent);
280
293
  });
@@ -13,6 +13,8 @@ var _ariaTelemetryLogger = require("./loggers/ariaTelemetryLogger");
13
13
 
14
14
  var _consoleLogger = require("./loggers/consoleLogger");
15
15
 
16
+ var _defaultAriaConfig = require("./defaultConfigs/defaultAriaConfig");
17
+
16
18
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
17
19
 
18
20
  class TelemetryTimers {}
@@ -45,7 +47,7 @@ const RegisterLoggers = () => {
45
47
  const registerLoggers = () => {
46
48
  var _TelemetryManager$Int, _TelemetryManager$Int2, _TelemetryManager$Int3, _TelemetryManager$Int4, _TelemetryManager$Int5, _TelemetryManager$Int6, _TelemetryManager$Int7, _TelemetryManager$Int8;
47
49
 
48
- if (!((_TelemetryManager$Int = TelemetryManager.InternalTelemetryData) !== null && _TelemetryManager$Int !== void 0 && (_TelemetryManager$Int2 = _TelemetryManager$Int.telemetryConfig) !== null && _TelemetryManager$Int2 !== void 0 && _TelemetryManager$Int2.disableConsoleLog) || !((_TelemetryManager$Int3 = TelemetryManager.InternalTelemetryData) !== null && _TelemetryManager$Int3 !== void 0 && (_TelemetryManager$Int4 = _TelemetryManager$Int3.telemetryConfig) !== null && _TelemetryManager$Int4 !== void 0 && _TelemetryManager$Int4.telemetryDisabled)) {
50
+ if (((_TelemetryManager$Int = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int === void 0 ? void 0 : (_TelemetryManager$Int2 = _TelemetryManager$Int.telemetryConfig) === null || _TelemetryManager$Int2 === void 0 ? void 0 : _TelemetryManager$Int2.disableConsoleLog) === false || ((_TelemetryManager$Int3 = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int3 === void 0 ? void 0 : (_TelemetryManager$Int4 = _TelemetryManager$Int3.telemetryConfig) === null || _TelemetryManager$Int4 === void 0 ? void 0 : _TelemetryManager$Int4.telemetryDisabled) === false) {
49
51
  _omnichannelChatComponents.BroadcastService.getAnyMessage().subscribe(event => {
50
52
  if (event.payload && event.eventName in _TelemetryConstants.TelemetryEvent) {
51
53
  logTelemetry(event);
@@ -53,17 +55,17 @@ const RegisterLoggers = () => {
53
55
  });
54
56
  }
55
57
 
56
- if (!((_TelemetryManager$Int5 = TelemetryManager.InternalTelemetryData) !== null && _TelemetryManager$Int5 !== void 0 && (_TelemetryManager$Int6 = _TelemetryManager$Int5.telemetryConfig) !== null && _TelemetryManager$Int6 !== void 0 && _TelemetryManager$Int6.disableConsoleLog)) {
58
+ if (((_TelemetryManager$Int5 = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int5 === void 0 ? void 0 : (_TelemetryManager$Int6 = _TelemetryManager$Int5.telemetryConfig) === null || _TelemetryManager$Int6 === void 0 ? void 0 : _TelemetryManager$Int6.disableConsoleLog) === false) {
57
59
  loggers.push((0, _consoleLogger.consoleLogger)());
58
60
  }
59
61
 
60
- if (!((_TelemetryManager$Int7 = TelemetryManager.InternalTelemetryData) !== null && _TelemetryManager$Int7 !== void 0 && (_TelemetryManager$Int8 = _TelemetryManager$Int7.telemetryConfig) !== null && _TelemetryManager$Int8 !== void 0 && _TelemetryManager$Int8.telemetryDisabled)) {
62
+ if (((_TelemetryManager$Int7 = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int7 === void 0 ? void 0 : (_TelemetryManager$Int8 = _TelemetryManager$Int7.telemetryConfig) === null || _TelemetryManager$Int8 === void 0 ? void 0 : _TelemetryManager$Int8.telemetryDisabled) === false) {
61
63
  var _TelemetryManager$Int9, _TelemetryManager$Int18, _TelemetryManager$Int19;
62
64
 
63
65
  if ((_TelemetryManager$Int9 = TelemetryManager.InternalTelemetryData) !== null && _TelemetryManager$Int9 !== void 0 && _TelemetryManager$Int9.ariaConfig) {
64
66
  var _TelemetryManager$Int10, _TelemetryManager$Int11, _TelemetryManager$Int12, _TelemetryManager$Int13, _TelemetryManager$Int14, _TelemetryManager$Int15, _TelemetryManager$Int16, _TelemetryManager$Int17;
65
67
 
66
- loggers.push((0, _ariaTelemetryLogger.ariaTelemetryLogger)(((_TelemetryManager$Int10 = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int10 === void 0 ? void 0 : (_TelemetryManager$Int11 = _TelemetryManager$Int10.ariaConfig) === null || _TelemetryManager$Int11 === void 0 ? void 0 : _TelemetryManager$Int11.ariaTelemetryKey) ?? "", ((_TelemetryManager$Int12 = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int12 === void 0 ? void 0 : (_TelemetryManager$Int13 = _TelemetryManager$Int12.ariaConfig) === null || _TelemetryManager$Int13 === void 0 ? void 0 : _TelemetryManager$Int13.disableCookieUsage) ?? false, ((_TelemetryManager$Int14 = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int14 === void 0 ? void 0 : (_TelemetryManager$Int15 = _TelemetryManager$Int14.ariaConfig) === null || _TelemetryManager$Int15 === void 0 ? void 0 : _TelemetryManager$Int15.collectorUriForTelemetry) ?? "", ((_TelemetryManager$Int16 = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int16 === void 0 ? void 0 : (_TelemetryManager$Int17 = _TelemetryManager$Int16.ariaConfig) === null || _TelemetryManager$Int17 === void 0 ? void 0 : _TelemetryManager$Int17.ariaTelemetryApplicationName) ?? "OmniChannelProd_Web"));
68
+ loggers.push((0, _ariaTelemetryLogger.ariaTelemetryLogger)(((_TelemetryManager$Int10 = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int10 === void 0 ? void 0 : (_TelemetryManager$Int11 = _TelemetryManager$Int10.ariaConfig) === null || _TelemetryManager$Int11 === void 0 ? void 0 : _TelemetryManager$Int11.ariaTelemetryKey) ?? _defaultAriaConfig.defaultAriaConfig.ariaTelemetryKey, ((_TelemetryManager$Int12 = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int12 === void 0 ? void 0 : (_TelemetryManager$Int13 = _TelemetryManager$Int12.ariaConfig) === null || _TelemetryManager$Int13 === void 0 ? void 0 : _TelemetryManager$Int13.disableCookieUsage) ?? _defaultAriaConfig.defaultAriaConfig.disableCookieUsage, ((_TelemetryManager$Int14 = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int14 === void 0 ? void 0 : (_TelemetryManager$Int15 = _TelemetryManager$Int14.ariaConfig) === null || _TelemetryManager$Int15 === void 0 ? void 0 : _TelemetryManager$Int15.collectorUriForTelemetry) ?? _defaultAriaConfig.defaultAriaConfig.collectorUriForTelemetry, ((_TelemetryManager$Int16 = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int16 === void 0 ? void 0 : (_TelemetryManager$Int17 = _TelemetryManager$Int16.ariaConfig) === null || _TelemetryManager$Int17 === void 0 ? void 0 : _TelemetryManager$Int17.ariaTelemetryApplicationName) ?? _defaultAriaConfig.defaultAriaConfig.ariaTelemetryApplicationName));
67
69
  }
68
70
 
69
71
  const customLoggers = (_TelemetryManager$Int18 = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int18 === void 0 ? void 0 : (_TelemetryManager$Int19 = _TelemetryManager$Int18.telemetryConfig) === null || _TelemetryManager$Int19 === void 0 ? void 0 : _TelemetryManager$Int19.telemetryLoggers;
@@ -86,8 +88,11 @@ const RegisterLoggers = () => {
86
88
 
87
89
  const logTelemetry = telemetryEvent => {
88
90
  loggers.map(logger => {
91
+ var _payload;
92
+
89
93
  const logLevel = telemetryEvent.logLevel ?? _TelemetryConstants.LogLevel.INFO;
90
- logger.log(logLevel, parseInput(telemetryEvent === null || telemetryEvent === void 0 ? void 0 : telemetryEvent.payload));
94
+ const scenarioType = ((_payload = telemetryEvent.payload) === null || _payload === void 0 ? void 0 : _payload.scenarioType) ?? _TelemetryConstants.ScenarioType.UNDEFINED;
95
+ logger.log(logLevel, parseInput(telemetryEvent === null || telemetryEvent === void 0 ? void 0 : telemetryEvent.payload, scenarioType));
91
96
  });
92
97
  };
93
98
 
@@ -7,7 +7,7 @@ exports.defaultAriaConfig = void 0;
7
7
  const defaultAriaConfig = {
8
8
  collectorUriForTelemetry: "",
9
9
  ariaTelemetryKey: "c7655518acf1403f93ff6b9f77942f0a-d01a02fd-6b50-4de3-a566-62eda11f93bc-7083",
10
- ariaTelemetryApplicationName: "",
10
+ ariaTelemetryApplicationName: "D365_Omnichannel_Client_Public_Prod",
11
11
  disableCookieUsage: true
12
12
  };
13
13
  exports.defaultAriaConfig = defaultAriaConfig;
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.ariaTelemetryLogger = void 0;
7
7
 
8
+ var _Constants = require("../../../../src/common/Constants");
9
+
8
10
  var _utils = require("../../utils");
9
11
 
10
12
  var _AWTEventProperties = _interopRequireDefault(require("@microsoft/omnichannel-chat-sdk/lib/external/aria/webjs/AWTEventProperties"));
@@ -13,10 +15,12 @@ var _AWTLogManager = _interopRequireDefault(require("@microsoft/omnichannel-chat
13
15
 
14
16
  var _Enums = require("@microsoft/omnichannel-chat-sdk/lib/external/aria/common/Enums");
15
17
 
16
- var _Constants = require("../../Constants");
18
+ var _Constants2 = require("../../Constants");
17
19
 
18
20
  var _TelemetryHelper = require("../TelemetryHelper");
19
21
 
22
+ var _TelemetryManager = require("../TelemetryManager");
23
+
20
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
25
 
22
26
  const ariaTelemetryLogger = (ariaTelemetryKey, disabledCookieUsage, collectiorUriForTelemetry, ariaTelemetryApplicationName) => {
@@ -30,6 +34,21 @@ const ariaTelemetryLogger = (ariaTelemetryKey, disabledCookieUsage, collectiorUr
30
34
 
31
35
  if (!(0, _utils.isNullOrEmptyString)(collectiorUriForTelemetry)) {
32
36
  configuration.collectorUri = collectiorUriForTelemetry;
37
+ } else {
38
+ if (_TelemetryManager.TelemetryManager.InternalTelemetryData.environmentVersion == _Constants.EnvironmentVersion.prod) {
39
+ var _TelemetryManager$Int;
40
+
41
+ const orgUrl = (_TelemetryManager$Int = _TelemetryManager.TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int === void 0 ? void 0 : _TelemetryManager$Int.orgUrl;
42
+
43
+ if (!(0, _utils.isNullOrUndefined)(orgUrl)) {
44
+ // If the given org is a Production EU org, modify the Aria collector uri
45
+ const region = (0, _utils.getDomain)(orgUrl);
46
+
47
+ if (region === _Constants.AriaTelemetryConstants.EU) {
48
+ configuration.collectorUri = _Constants.AriaTelemetryConstants.EUROPE_ENDPOINT;
49
+ }
50
+ }
51
+ }
33
52
  }
34
53
 
35
54
  try {
@@ -60,7 +79,7 @@ const ariaTelemetryLogger = (ariaTelemetryKey, disabledCookieUsage, collectiorUr
60
79
  eventProperties.setProperty(key, property);
61
80
  }
62
81
 
63
- eventProperties.setPropertyWithPii(ariaTelemetryApplicationName, _Constants.Constants.LiveChatWidget, _Enums.AWTPiiKind.GenericData);
82
+ eventProperties.setPropertyWithPii(ariaTelemetryApplicationName, _Constants2.Constants.LiveChatWidget, _Enums.AWTPiiKind.GenericData);
64
83
  logger() ? logger().logEvent(eventProperties) : console.log("Unable to initialize aria logger");
65
84
  },
66
85
  dispose: () => {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.setTabIndices = exports.setFocusOnSendBox = exports.setFocusOnElement = exports.preventFocusToMoveOutOfElement = exports.parseAdaptiveCardPayload = exports.newGuid = exports.isNullOrUndefined = exports.isNullOrEmptyString = exports.getTimestampHourMinute = exports.getLocaleDirection = exports.getIconText = exports.findParentFocusableElementsWithoutChildContainer = exports.findAllFocusableElement = exports.extractPreChatSurveyResponseValues = exports.escapeHtml = exports.createTimer = exports.changeLanguageCodeFormatForWebChat = void 0;
6
+ exports.setTabIndices = exports.setFocusOnSendBox = exports.setFocusOnElement = exports.preventFocusToMoveOutOfElement = exports.parseAdaptiveCardPayload = exports.newGuid = exports.isNullOrUndefined = exports.isNullOrEmptyString = exports.getTimestampHourMinute = exports.getLocaleDirection = exports.getIconText = exports.getDomain = exports.findParentFocusableElementsWithoutChildContainer = exports.findAllFocusableElement = exports.extractPreChatSurveyResponseValues = exports.escapeHtml = exports.createTimer = exports.changeLanguageCodeFormatForWebChat = void 0;
7
7
 
8
8
  var _Constants = require("./Constants");
9
9
 
@@ -332,6 +332,19 @@ const createTimer = () => {
332
332
  }
333
333
 
334
334
  };
335
+ }; // Returns the domain of the org
336
+
337
+
338
+ exports.createTimer = createTimer;
339
+
340
+ const getDomain = hostValue => {
341
+ for (let i = 0; i < _Constants.AriaTelemetryConstants.lcwEUDomainNames.length; i++) {
342
+ if (hostValue.endsWith(_Constants.AriaTelemetryConstants.lcwEUDomainNames[i])) {
343
+ return _Constants.AriaTelemetryConstants.EU;
344
+ }
345
+ }
346
+
347
+ return _Constants.AriaTelemetryConstants.Public;
335
348
  };
336
349
 
337
- exports.createTimer = createTimer;
350
+ exports.getDomain = getDomain;
@@ -13,10 +13,6 @@ var _react = _interopRequireWildcard(require("react"));
13
13
 
14
14
  var _utils = require("../../common/utils");
15
15
 
16
- var _Constants = require("../../common/Constants");
17
-
18
- var _ConversationState = require("../../contexts/common/ConversationState");
19
-
20
16
  var _DimLayer = require("../dimlayer/DimLayer");
21
17
 
22
18
  var _LiveChatWidgetActionType = require("../../contexts/common/LiveChatWidgetActionType");
@@ -25,16 +21,12 @@ var _NotificationHandler = require("../webchatcontainerstateful/webchatcontrolle
25
21
 
26
22
  var _NotificationScenarios = require("../webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios");
27
23
 
28
- var _PostChatSurveyMode = require("../postchatsurveypanestateful/enums/PostChatSurveyMode");
29
-
30
24
  var _TelemetryHelper = require("../../common/telemetry/TelemetryHelper");
31
25
 
32
26
  var _useChatAdapterStore = _interopRequireDefault(require("../../hooks/useChatAdapterStore"));
33
27
 
34
28
  var _useChatContextStore = _interopRequireDefault(require("../../hooks/useChatContextStore"));
35
29
 
36
- var _useChatSDKStore = _interopRequireDefault(require("../../hooks/useChatSDKStore"));
37
-
38
30
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
39
31
 
40
32
  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); }
@@ -43,21 +35,15 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
43
35
 
44
36
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
45
37
  const ConfirmationPaneStateful = props => {
46
- var _state$domainStates$l, _state$domainStates$l2, _state$domainStates$l3, _state$domainStates$l4;
47
-
48
38
  const initialTabIndexMap = new Map();
49
- let elements = []; // eslint-disable-next-line @typescript-eslint/no-explicit-any
50
-
51
- const chatSDK = (0, _useChatSDKStore.default)();
39
+ let elements = [];
52
40
  const [state, dispatch] = (0, _useChatContextStore.default)();
53
41
  const {
54
- endChat
42
+ prepareEndChat
55
43
  } = props; // eslint-disable-next-line @typescript-eslint/no-explicit-any
56
44
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
57
45
 
58
46
  const [adapter] = (0, _useChatAdapterStore.default)();
59
- const isPostChatEnabled = (_state$domainStates$l = state.domainStates.liveChatConfig) === null || _state$domainStates$l === void 0 ? void 0 : (_state$domainStates$l2 = _state$domainStates$l.LiveWSAndLiveChatEngJoin) === null || _state$domainStates$l2 === void 0 ? void 0 : _state$domainStates$l2.msdyn_postconversationsurveyenable;
60
- const postChatSurveyMode = (_state$domainStates$l3 = state.domainStates.liveChatConfig) === null || _state$domainStates$l3 === void 0 ? void 0 : (_state$domainStates$l4 = _state$domainStates$l3.LiveWSAndLiveChatEngJoin) === null || _state$domainStates$l4 === void 0 ? void 0 : _state$domainStates$l4.msdyn_postconversationsurveymode;
61
47
  const controlProps = {
62
48
  id: "oc-lcw-confirmation-pane",
63
49
  dir: state.domainStates.globalDir,
@@ -73,29 +59,8 @@ const ConfirmationPaneStateful = props => {
73
59
  });
74
60
 
75
61
  try {
76
- // check agent has joined conversation
77
- const conversationDetails = await chatSDK.getConversationDetails();
78
-
79
- if (isPostChatEnabled === "true" && (conversationDetails === null || conversationDetails === void 0 ? void 0 : conversationDetails.canRenderPostChat) === _Constants.Constants.truePascal) {
80
- if (postChatSurveyMode === _PostChatSurveyMode.PostChatSurveyMode.Embed) {
81
- const loadPostChatEvent = {
82
- eventName: _TelemetryConstants.BroadcastEvent.LoadPostChatSurvey
83
- };
84
-
85
- _omnichannelChatComponents.BroadcastService.postMessage(loadPostChatEvent);
86
- } else if (postChatSurveyMode === _PostChatSurveyMode.PostChatSurveyMode.Link) {
87
- const skipEndChatSDK = false;
88
- const skipCloseChat = true;
89
- await endChat(adapter, skipEndChatSDK, skipCloseChat);
90
- dispatch({
91
- type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CONVERSATION_STATE,
92
- payload: _ConversationState.ConversationState.InActive
93
- });
94
- }
95
- } else {
96
- (0, _utils.setTabIndices)(elements, initialTabIndexMap, true);
97
- await endChat(adapter);
98
- }
62
+ (0, _utils.setTabIndices)(elements, initialTabIndexMap, true);
63
+ await prepareEndChat(adapter, state);
99
64
  } catch (ex) {
100
65
  _TelemetryHelper.TelemetryHelper.logSDKEvent(_TelemetryConstants.LogLevel.ERROR, {
101
66
  Event: _TelemetryConstants.TelemetryEvent.GetConversationDetailsCallFailed,
@@ -123,8 +123,7 @@ const FooterStateful = props => {
123
123
  styleProps: footerProps === null || footerProps === void 0 ? void 0 : footerProps.styleProps
124
124
  }), /*#__PURE__*/_react.default.createElement(_AudioNotificationStateful.default, {
125
125
  audioSrc: (audioNotificationProps === null || audioNotificationProps === void 0 ? void 0 : audioNotificationProps.audioSrc) ?? _Audios.NewMessageNotificationSoundBase64,
126
- hideAudioNotificationButton: (footerProps === null || footerProps === void 0 ? void 0 : (_footerProps$controlP4 = footerProps.controlProps) === null || _footerProps$controlP4 === void 0 ? void 0 : _footerProps$controlP4.hideAudioNotificationButton) ?? false,
127
- isAudioMuted: state.appStates.isAudioMuted ?? false
126
+ isAudioMuted: state.appStates.isAudioMuted === null ? (footerProps === null || footerProps === void 0 ? void 0 : (_footerProps$controlP4 = footerProps.controlProps) === null || _footerProps$controlP4 === void 0 ? void 0 : _footerProps$controlP4.hideAudioNotificationButton) ?? false : state.appStates.isAudioMuted ?? false
128
127
  }));
129
128
  };
130
129
 
@@ -69,13 +69,7 @@ const HeaderStateful = props => {
69
69
  type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_SHOW_CONFIRMATION,
70
70
  payload: true
71
71
  });
72
- } else if (conversationState.current === _ConversationState.ConversationState.Postchat) {
73
- dispatch({
74
- type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_SHOULD_SHOW_POST_CHAT,
75
- payload: false
76
- });
77
- await endChat(adapter);
78
- } else if (conversationState.current === _ConversationState.ConversationState.InActive) {
72
+ } else {
79
73
  const skipEndChatSDK = true;
80
74
  const skipCloseChat = false;
81
75
  await endChat(adapter, skipEndChatSDK, skipCloseChat);
@@ -27,6 +27,8 @@ var _groupActivitiesMiddleware = require("../../../webchatcontainerstateful/webc
27
27
 
28
28
  var _typingIndicatorMiddleware = require("../../../webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/typingIndicatorMiddleware");
29
29
 
30
+ var _WebChatLogger = require("../../../webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger");
31
+
30
32
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
31
33
 
32
34
  /* eslint-disable @typescript-eslint/no-empty-function, @typescript-eslint/no-explicit-any */
@@ -1444,7 +1446,8 @@ const dummyDefaultProps = {
1444
1446
  },
1445
1447
  authClientFunction: undefined,
1446
1448
  isReconnectEnabled: undefined,
1447
- reconnectId: undefined
1449
+ reconnectId: undefined,
1450
+ redirectInSameWindow: undefined
1448
1451
  },
1449
1452
  styleProps: {
1450
1453
  generalStyles: {
@@ -1516,7 +1519,7 @@ const dummyDefaultProps = {
1516
1519
  internalErrorBoxClass: undefined,
1517
1520
  internalRenderErrorBox: undefined,
1518
1521
  locale: "en-US",
1519
- onTelemetry: undefined,
1522
+ onTelemetry: (0, _WebChatLogger.createWebChatTelemetry)(),
1520
1523
  overrideLocalizedStrings: undefined,
1521
1524
  renderMarkdown: (0, _createMarkdown.createMarkdown)(false, false),
1522
1525
  scrollToEndButtonMiddleware: undefined,
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.endChat = void 0;
6
+ exports.prepareEndChat = exports.endChat = void 0;
7
7
 
8
8
  var _TelemetryConstants = require("../../../common/telemetry/TelemetryConstants");
9
9
 
@@ -19,7 +19,43 @@ var _WebChatStoreLoader = require("../../webchatcontainerstateful/webchatcontrol
19
19
 
20
20
  var _defaultWebChatContainerStatefulProps = require("../../webchatcontainerstateful/common/defaultProps/defaultWebChatContainerStatefulProps");
21
21
 
22
+ var _PostChatSurveyMode = require("../../postchatsurveypanestateful/enums/PostChatSurveyMode");
23
+
24
+ var _Constants = require("../../../common/Constants");
25
+
22
26
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
27
+ const prepareEndChat = async (props, chatSDK, setAdapter, setWebChatStyles, dispatch, adapter, state) => {
28
+ var _state$domainStates$l, _state$domainStates$l2, _state$domainStates$l3, _state$domainStates$l4;
29
+
30
+ const isPostChatEnabled = (_state$domainStates$l = state.domainStates.liveChatConfig) === null || _state$domainStates$l === void 0 ? void 0 : (_state$domainStates$l2 = _state$domainStates$l.LiveWSAndLiveChatEngJoin) === null || _state$domainStates$l2 === void 0 ? void 0 : _state$domainStates$l2.msdyn_postconversationsurveyenable;
31
+ const postChatSurveyMode = (_state$domainStates$l3 = state.domainStates.liveChatConfig) === null || _state$domainStates$l3 === void 0 ? void 0 : (_state$domainStates$l4 = _state$domainStates$l3.LiveWSAndLiveChatEngJoin) === null || _state$domainStates$l4 === void 0 ? void 0 : _state$domainStates$l4.msdyn_postconversationsurveymode;
32
+ const conversationDetails = await chatSDK.getConversationDetails();
33
+
34
+ if (isPostChatEnabled === "true" && (conversationDetails === null || conversationDetails === void 0 ? void 0 : conversationDetails.canRenderPostChat) === _Constants.Constants.truePascal) {
35
+ const skipEndChatSDK = false;
36
+ const skipCloseChat = true;
37
+ await endChat(props, chatSDK, setAdapter, setWebChatStyles, dispatch, adapter, skipEndChatSDK, skipCloseChat);
38
+
39
+ if (postChatSurveyMode === _PostChatSurveyMode.PostChatSurveyMode.Embed) {
40
+ const loadPostChatEvent = {
41
+ eventName: _TelemetryConstants.BroadcastEvent.LoadPostChatSurvey
42
+ };
43
+
44
+ _omnichannelChatComponents.BroadcastService.postMessage(loadPostChatEvent);
45
+ } else if (postChatSurveyMode === _PostChatSurveyMode.PostChatSurveyMode.Link) {
46
+ dispatch({
47
+ type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CONVERSATION_STATE,
48
+ payload: _ConversationState.ConversationState.InActive
49
+ });
50
+ }
51
+ } else {
52
+ await endChat(props, chatSDK, setAdapter, setWebChatStyles, dispatch, adapter);
53
+ }
54
+ }; // eslint-disable-next-line @typescript-eslint/no-explicit-any
55
+
56
+
57
+ exports.prepareEndChat = prepareEndChat;
58
+
23
59
  const endChat = async (props, chatSDK, setAdapter, setWebChatStyles, dispatch, adapter, skipEndChatSDK, skipCloseChat) => {
24
60
  if (!skipEndChatSDK) {
25
61
  try {
@@ -18,7 +18,7 @@ const initCallingSdk = async (chatSDK, setVoiceVideoCallingSDK) => {
18
18
  const callingSDK = await chatSDK.getVoiceVideoCalling();
19
19
  setVoiceVideoCallingSDK(callingSDK);
20
20
 
21
- _TelemetryHelper.TelemetryHelper.logCallingEvent(_TelemetryConstants.LogLevel.ERROR, {
21
+ _TelemetryHelper.TelemetryHelper.logCallingEvent(_TelemetryConstants.LogLevel.INFO, {
22
22
  Event: _TelemetryConstants.TelemetryEvent.CallingSDKLoadSuccess
23
23
  });
24
24
 
@@ -43,6 +43,8 @@ var _createMarkdown = require("./createMarkdown");
43
43
 
44
44
  var _maxMessageSizeValidator = _interopRequireDefault(require("../../webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/maxMessageSizeValidator"));
45
45
 
46
+ var _WebChatLogger = require("../../webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger");
47
+
46
48
  var _defaultAttachmentProps = require("../../webchatcontainerstateful/common/defaultProps/defaultAttachmentProps");
47
49
 
48
50
  var _defaultMiddlewareLocalizedTexts = require("../../webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts");
@@ -141,6 +143,7 @@ const initWebChatComposer = (props, chatSDK, state, dispatch, setWebChatStyles)
141
143
  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),
142
144
  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,
143
145
  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,
146
+ onTelemetry: (0, _WebChatLogger.createWebChatTelemetry)(),
144
147
  ...((_props$webChatContain21 = props.webChatContainerProps) === null || _props$webChatContain21 === void 0 ? void 0 : _props$webChatContain21.webChatProps)
145
148
  };
146
149
  return webChatProps;