@microsoft/omnichannel-chat-widget 0.1.0-main.63cfb47 → 0.1.0-main.84a7035

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.
@@ -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
 
@@ -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"]);
@@ -11,6 +11,9 @@ const defaultTelemetryConfiguration = {
11
11
  telemetryDisabled: false,
12
12
  disableConsoleLog: false,
13
13
  telemetryLoggers: [],
14
- ariaConfigurations: _defaultAriaConfig.defaultAriaConfig
14
+ ariaConfigurations: _defaultAriaConfig.defaultAriaConfig,
15
+ chatWidgetVersion: "0.0.0-0",
16
+ chatComponentVersion: "0.0.0-0",
17
+ OCChatSDKVersion: "0.0.0-0"
15
18
  };
16
19
  exports.defaultTelemetryConfiguration = defaultTelemetryConfiguration;
@@ -17,6 +17,8 @@ var _Constants = require("../../Constants");
17
17
 
18
18
  var _TelemetryHelper = require("../TelemetryHelper");
19
19
 
20
+ var _TelemetryManager = require("../TelemetryManager");
21
+
20
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
23
 
22
24
  const ariaTelemetryLogger = (ariaTelemetryKey, disabledCookieUsage, collectiorUriForTelemetry, ariaTelemetryApplicationName) => {
@@ -30,6 +32,21 @@ const ariaTelemetryLogger = (ariaTelemetryKey, disabledCookieUsage, collectiorUr
30
32
 
31
33
  if (!(0, _utils.isNullOrEmptyString)(collectiorUriForTelemetry)) {
32
34
  configuration.collectorUri = collectiorUriForTelemetry;
35
+ } else {
36
+ if (_TelemetryManager.TelemetryManager.InternalTelemetryData.environmentVersion == _Constants.EnvironmentVersion.prod) {
37
+ var _TelemetryManager$Int;
38
+
39
+ const orgUrl = (_TelemetryManager$Int = _TelemetryManager.TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int === void 0 ? void 0 : _TelemetryManager$Int.orgUrl;
40
+
41
+ if (!(0, _utils.isNullOrUndefined)(orgUrl)) {
42
+ // If the given org is a Production EU org, modify the Aria collector uri
43
+ const region = (0, _utils.getDomain)(orgUrl);
44
+
45
+ if (region === _Constants.AriaTelemetryConstants.EU) {
46
+ configuration.collectorUri = _Constants.AriaTelemetryConstants.EUROPE_ENDPOINT;
47
+ }
48
+ }
49
+ }
33
50
  }
34
51
 
35
52
  try {
@@ -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;
@@ -11,10 +11,6 @@ var _LiveChatWidgetActionType = require("../../../contexts/common/LiveChatWidget
11
11
 
12
12
  var _TelemetryHelper = require("../../../common/telemetry/TelemetryHelper");
13
13
 
14
- var _package = require("@microsoft/omnichannel-chat-components/package.json");
15
-
16
- var _package2 = require("@microsoft/omnichannel-chat-sdk/package.json");
17
-
18
14
  var _defaultAriaConfig = require("../../../common/telemetry/defaultConfigs/defaultAriaConfig");
19
15
 
20
16
  var _defaultTelemetryInternalData = require("../../../common/telemetry/defaultConfigs/defaultTelemetryInternalData");
@@ -24,14 +20,6 @@ var _defaultTelemetryConfiguration = require("../../../common/telemetry/defaultC
24
20
  const registerTelemetryLoggers = (props, dispatch) => {
25
21
  var _props$liveChatContex, _props$liveChatContex2;
26
22
 
27
- let widgetPackageInfo;
28
-
29
- try {
30
- widgetPackageInfo = require("@microsoft/omnichannel-chat-widget/package.json");
31
- } catch (error) {
32
- widgetPackageInfo = "0.0.0-0";
33
- }
34
-
35
23
  const telemetryConfig = { ..._defaultTelemetryConfiguration.defaultTelemetryConfiguration,
36
24
  ...props.telemetryConfig
37
25
  };
@@ -53,9 +41,9 @@ const registerTelemetryLoggers = (props, dispatch) => {
53
41
  }
54
42
 
55
43
  telemetryData = _TelemetryHelper.TelemetryHelper.addWidgetDataToTelemetry(telemetryConfig, telemetryData);
56
- telemetryData.OCChatSDKVersion = _package2.version;
57
- telemetryData.chatComponentVersion = _package.version;
58
- telemetryData.chatWidgetVersion = widgetPackageInfo;
44
+ telemetryData.OCChatSDKVersion = telemetryConfig.OCChatSDKVersion ?? "0.0.0-0";
45
+ telemetryData.chatComponentVersion = telemetryConfig.chatComponentVersion ?? "0.0.0-0";
46
+ telemetryData.chatWidgetVersion = telemetryConfig.chatWidgetVersion ?? "0.0.0-0";
59
47
  telemetryData.orgId = (_props$chatSDK = props.chatSDK) === null || _props$chatSDK === void 0 ? void 0 : (_props$chatSDK$omnich = _props$chatSDK.omnichannelConfig) === null || _props$chatSDK$omnich === void 0 ? void 0 : _props$chatSDK$omnich.orgId;
60
48
  telemetryData.widgetId = (_props$chatSDK2 = props.chatSDK) === null || _props$chatSDK2 === void 0 ? void 0 : (_props$chatSDK2$omnic = _props$chatSDK2.omnichannelConfig) === null || _props$chatSDK2$omnic === void 0 ? void 0 : _props$chatSDK2$omnic.widgetId;
61
49
  telemetryData.orgUrl = (_props$chatSDK3 = props.chatSDK) === null || _props$chatSDK3 === void 0 ? void 0 : (_props$chatSDK3$omnic = _props$chatSDK3.omnichannelConfig) === null || _props$chatSDK3$omnic === void 0 ? void 0 : _props$chatSDK3$omnic.orgUrl;
@@ -155,13 +155,11 @@ const LiveChatWidgetStateful = props => {
155
155
  payload: globalDir
156
156
  });
157
157
 
158
- if ((_state$domainStates = state.domainStates) !== null && _state$domainStates !== void 0 && _state$domainStates.chatToken) {
158
+ if ((_state$domainStates = state.domainStates) !== null && _state$domainStates !== void 0 && _state$domainStates.liveChatContext) {
159
159
  var _state$domainStates2;
160
160
 
161
161
  const optionalParams = {
162
- liveChatContext: {
163
- chatToken: (_state$domainStates2 = state.domainStates) === null || _state$domainStates2 === void 0 ? void 0 : _state$domainStates2.chatToken
164
- }
162
+ liveChatContext: (_state$domainStates2 = state.domainStates) === null || _state$domainStates2 === void 0 ? void 0 : _state$domainStates2.liveChatContext
165
163
  };
166
164
  (0, _startChat.initStartChat)(chatSDK, dispatch, setAdapter, optionalParams);
167
165
  }
@@ -255,6 +255,15 @@ export let ChatSDKError;
255
255
  ChatSDKError["WidgetUseOutsideOperatingHour"] = "WidgetUseOutsideOperatingHour";
256
256
  })(ChatSDKError || (ChatSDKError = {}));
257
257
 
258
+ export let EnvironmentVersion;
259
+
260
+ (function (EnvironmentVersion) {
261
+ EnvironmentVersion["prod"] = "prod";
262
+ EnvironmentVersion["dogfood"] = "df";
263
+ EnvironmentVersion["int"] = "int";
264
+ EnvironmentVersion["test"] = "test";
265
+ })(EnvironmentVersion || (EnvironmentVersion = {}));
266
+
258
267
  export class TranscriptConstants {}
259
268
 
260
269
  _defineProperty(TranscriptConstants, "ChatTranscriptsBodyColor", "#F5F5F5");
@@ -275,4 +284,22 @@ _defineProperty(TranscriptConstants, "InternalMode", "internal");
275
284
 
276
285
  _defineProperty(TranscriptConstants, "AgentDialogColor", "#2266E3");
277
286
 
278
- _defineProperty(TranscriptConstants, "AgentFontColor", "white");
287
+ _defineProperty(TranscriptConstants, "AgentFontColor", "white");
288
+
289
+ export class AriaTelemetryConstants {}
290
+
291
+ _defineProperty(AriaTelemetryConstants, "GERMANY_ENDPOINT", "https://de.pipe.aria.microsoft.com/Collector/3.0/");
292
+
293
+ _defineProperty(AriaTelemetryConstants, "GCCH_ENDPOINT", "https://tb.pipe.aria.microsoft.com/Collector/3.0/");
294
+
295
+ _defineProperty(AriaTelemetryConstants, "DOD_ENDPOINT", "https://pf.pipe.aria.microsoft.com/Collector/3.0");
296
+
297
+ _defineProperty(AriaTelemetryConstants, "EUROPE_ENDPOINT", "https://eu-mobile.events.data.microsoft.com/Collector/3.0/");
298
+
299
+ _defineProperty(AriaTelemetryConstants, "MOONCAKE_ENDPOINT", "");
300
+
301
+ _defineProperty(AriaTelemetryConstants, "Public", "Public");
302
+
303
+ _defineProperty(AriaTelemetryConstants, "EU", "Europe");
304
+
305
+ _defineProperty(AriaTelemetryConstants, "lcwEUDomainNames", ["crm4.omnichannelengagementhub.com", "crm12.omnichannelengagementhub.com", "crm16.omnichannelengagementhub.com", "crm17.omnichannelengagementhub.com", "crm19.omnichannelengagementhub.com"]);
@@ -3,5 +3,8 @@ export const defaultTelemetryConfiguration = {
3
3
  telemetryDisabled: false,
4
4
  disableConsoleLog: false,
5
5
  telemetryLoggers: [],
6
- ariaConfigurations: defaultAriaConfig
6
+ ariaConfigurations: defaultAriaConfig,
7
+ chatWidgetVersion: "0.0.0-0",
8
+ chatComponentVersion: "0.0.0-0",
9
+ OCChatSDKVersion: "0.0.0-0"
7
10
  };
@@ -1,9 +1,10 @@
1
- import { isNullOrEmptyString, isNullOrUndefined } from "../../utils";
1
+ import { getDomain, isNullOrEmptyString, isNullOrUndefined } from "../../utils";
2
2
  import AWTEventProperties from "@microsoft/omnichannel-chat-sdk/lib/external/aria/webjs/AWTEventProperties";
3
3
  import AWTLogManager from "@microsoft/omnichannel-chat-sdk/lib/external/aria/webjs/AWTLogManager";
4
4
  import { AWTPiiKind } from "@microsoft/omnichannel-chat-sdk/lib/external/aria/common/Enums";
5
- import { Constants } from "../../Constants";
5
+ import { Constants, AriaTelemetryConstants, EnvironmentVersion } from "../../Constants";
6
6
  import { TelemetryHelper } from "../TelemetryHelper";
7
+ import { TelemetryManager } from "../TelemetryManager";
7
8
  export const ariaTelemetryLogger = (ariaTelemetryKey, disabledCookieUsage, collectiorUriForTelemetry, ariaTelemetryApplicationName) => {
8
9
  let _logger;
9
10
 
@@ -15,6 +16,21 @@ export const ariaTelemetryLogger = (ariaTelemetryKey, disabledCookieUsage, colle
15
16
 
16
17
  if (!isNullOrEmptyString(collectiorUriForTelemetry)) {
17
18
  configuration.collectorUri = collectiorUriForTelemetry;
19
+ } else {
20
+ if (TelemetryManager.InternalTelemetryData.environmentVersion == EnvironmentVersion.prod) {
21
+ var _TelemetryManager$Int;
22
+
23
+ const orgUrl = (_TelemetryManager$Int = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int === void 0 ? void 0 : _TelemetryManager$Int.orgUrl;
24
+
25
+ if (!isNullOrUndefined(orgUrl)) {
26
+ // If the given org is a Production EU org, modify the Aria collector uri
27
+ const region = getDomain(orgUrl);
28
+
29
+ if (region === AriaTelemetryConstants.EU) {
30
+ configuration.collectorUri = AriaTelemetryConstants.EUROPE_ENDPOINT;
31
+ }
32
+ }
33
+ }
18
34
  }
19
35
 
20
36
  try {
@@ -1,4 +1,4 @@
1
- import { Constants, LocaleConstants } from "./Constants";
1
+ import { AriaTelemetryConstants, Constants, LocaleConstants } from "./Constants";
2
2
  import { KeyCodes } from "./KeyCodes";
3
3
 
4
4
  const getElementBySelector = selector => {
@@ -276,4 +276,14 @@ export const createTimer = () => {
276
276
  }
277
277
 
278
278
  };
279
+ }; // Returns the domain of the org
280
+
281
+ export const getDomain = hostValue => {
282
+ for (let i = 0; i < AriaTelemetryConstants.lcwEUDomainNames.length; i++) {
283
+ if (hostValue.endsWith(AriaTelemetryConstants.lcwEUDomainNames[i])) {
284
+ return AriaTelemetryConstants.EU;
285
+ }
286
+ }
287
+
288
+ return AriaTelemetryConstants.Public;
279
289
  };
@@ -1,22 +1,12 @@
1
1
  import { RegisterLoggers, TelemetryManager } from "../../../common/telemetry/TelemetryManager";
2
2
  import { LiveChatWidgetActionType } from "../../../contexts/common/LiveChatWidgetActionType";
3
3
  import { TelemetryHelper } from "../../../common/telemetry/TelemetryHelper";
4
- import { version as chatComponentVersion } from "@microsoft/omnichannel-chat-components/package.json";
5
- import { version as chatSdkVersion } from "@microsoft/omnichannel-chat-sdk/package.json";
6
4
  import { defaultAriaConfig } from "../../../common/telemetry/defaultConfigs/defaultAriaConfig";
7
5
  import { defaultInternalTelemetryData } from "../../../common/telemetry/defaultConfigs/defaultTelemetryInternalData";
8
6
  import { defaultTelemetryConfiguration } from "../../../common/telemetry/defaultConfigs/defaultTelemetryConfiguration";
9
7
  export const registerTelemetryLoggers = (props, dispatch) => {
10
8
  var _props$liveChatContex, _props$liveChatContex2;
11
9
 
12
- let widgetPackageInfo;
13
-
14
- try {
15
- widgetPackageInfo = require("@microsoft/omnichannel-chat-widget/package.json");
16
- } catch (error) {
17
- widgetPackageInfo = "0.0.0-0";
18
- }
19
-
20
10
  const telemetryConfig = { ...defaultTelemetryConfiguration,
21
11
  ...props.telemetryConfig
22
12
  };
@@ -38,9 +28,9 @@ export const registerTelemetryLoggers = (props, dispatch) => {
38
28
  }
39
29
 
40
30
  telemetryData = TelemetryHelper.addWidgetDataToTelemetry(telemetryConfig, telemetryData);
41
- telemetryData.OCChatSDKVersion = chatSdkVersion;
42
- telemetryData.chatComponentVersion = chatComponentVersion;
43
- telemetryData.chatWidgetVersion = widgetPackageInfo;
31
+ telemetryData.OCChatSDKVersion = telemetryConfig.OCChatSDKVersion ?? "0.0.0-0";
32
+ telemetryData.chatComponentVersion = telemetryConfig.chatComponentVersion ?? "0.0.0-0";
33
+ telemetryData.chatWidgetVersion = telemetryConfig.chatWidgetVersion ?? "0.0.0-0";
44
34
  telemetryData.orgId = (_props$chatSDK = props.chatSDK) === null || _props$chatSDK === void 0 ? void 0 : (_props$chatSDK$omnich = _props$chatSDK.omnichannelConfig) === null || _props$chatSDK$omnich === void 0 ? void 0 : _props$chatSDK$omnich.orgId;
45
35
  telemetryData.widgetId = (_props$chatSDK2 = props.chatSDK) === null || _props$chatSDK2 === void 0 ? void 0 : (_props$chatSDK2$omnic = _props$chatSDK2.omnichannelConfig) === null || _props$chatSDK2$omnic === void 0 ? void 0 : _props$chatSDK2$omnic.widgetId;
46
36
  telemetryData.orgUrl = (_props$chatSDK3 = props.chatSDK) === null || _props$chatSDK3 === void 0 ? void 0 : (_props$chatSDK3$omnic = _props$chatSDK3.omnichannelConfig) === null || _props$chatSDK3$omnic === void 0 ? void 0 : _props$chatSDK3$omnic.orgUrl;
@@ -101,13 +101,11 @@ export const LiveChatWidgetStateful = props => {
101
101
  payload: globalDir
102
102
  });
103
103
 
104
- if ((_state$domainStates = state.domainStates) !== null && _state$domainStates !== void 0 && _state$domainStates.chatToken) {
104
+ if ((_state$domainStates = state.domainStates) !== null && _state$domainStates !== void 0 && _state$domainStates.liveChatContext) {
105
105
  var _state$domainStates2;
106
106
 
107
107
  const optionalParams = {
108
- liveChatContext: {
109
- chatToken: (_state$domainStates2 = state.domainStates) === null || _state$domainStates2 === void 0 ? void 0 : _state$domainStates2.chatToken
110
- }
108
+ liveChatContext: (_state$domainStates2 = state.domainStates) === null || _state$domainStates2 === void 0 ? void 0 : _state$domainStates2.liveChatContext
111
109
  };
112
110
  initStartChat(chatSDK, dispatch, setAdapter, optionalParams);
113
111
  }
@@ -136,6 +136,12 @@ export declare enum ElementType {
136
136
  export declare enum ChatSDKError {
137
137
  WidgetUseOutsideOperatingHour = "WidgetUseOutsideOperatingHour"
138
138
  }
139
+ export declare enum EnvironmentVersion {
140
+ prod = "prod",
141
+ dogfood = "df",
142
+ int = "int",
143
+ test = "test"
144
+ }
139
145
  export declare class TranscriptConstants {
140
146
  static readonly ChatTranscriptsBodyColor = "#F5F5F5";
141
147
  static readonly TranscriptMessageEmojiMessageType = "http://schema.skype.com/emoji";
@@ -148,3 +154,13 @@ export declare class TranscriptConstants {
148
154
  static readonly AgentDialogColor = "#2266E3";
149
155
  static readonly AgentFontColor = "white";
150
156
  }
157
+ export declare class AriaTelemetryConstants {
158
+ static readonly GERMANY_ENDPOINT: string;
159
+ static readonly GCCH_ENDPOINT: string;
160
+ static readonly DOD_ENDPOINT: string;
161
+ static readonly EUROPE_ENDPOINT: string;
162
+ static readonly MOONCAKE_ENDPOINT: string;
163
+ static readonly Public: string;
164
+ static readonly EU: string;
165
+ static readonly lcwEUDomainNames: Array<string>;
166
+ }
@@ -6,7 +6,7 @@ export interface IContextDataStore {
6
6
  /**
7
7
  * setData: Set data to data store
8
8
  */
9
- setData: (key: string, value: string) => void;
9
+ setData: (key: string, value: any, type: string) => void;
10
10
  /**
11
11
  * removeData: Remove data from data store by key
12
12
  */
@@ -32,13 +32,13 @@ export interface ITelemetryConfig {
32
32
  /**
33
33
  * Omnichannel chat widget version
34
34
  */
35
- chatWidgetVersion?: string;
35
+ chatWidgetVersion: string;
36
36
  /**
37
37
  * Omnichannel chat components version
38
38
  */
39
- chatComponentVersion?: string;
39
+ chatComponentVersion: string;
40
40
  /**
41
41
  * Omnichannel Chat SDK Version
42
42
  */
43
- OCChatSDKVersion?: string;
43
+ OCChatSDKVersion: string;
44
44
  }
@@ -21,3 +21,4 @@ export declare const isNullOrUndefined: (obj: any) => boolean;
21
21
  export declare const isNullOrEmptyString: (s: string) => boolean;
22
22
  export declare const newGuid: () => string;
23
23
  export declare const createTimer: () => ITimer;
24
+ export declare const getDomain: (hostValue: any) => string;
@@ -45,7 +45,7 @@ export interface ILiveChatWidgetProps {
45
45
  proactiveChatPaneProps?: IProactiveChatPaneStatefulProps;
46
46
  reconnectChatPaneProps?: IReconnectChatPaneStatefulProps;
47
47
  styleProps?: ILiveChatWidgetStyleProps;
48
- telemetryConfig?: ITelemetryConfig;
48
+ telemetryConfig: ITelemetryConfig;
49
49
  webChatContainerProps?: IWebChatContainerStatefulProps;
50
50
  liveChatContextFromCache?: ILiveChatWidgetContext;
51
51
  contextDataStore?: IContextDataStore;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/omnichannel-chat-widget",
3
- "version": "0.1.0-main.63cfb47",
3
+ "version": "0.1.0-main.84a7035",
4
4
  "description": "Microsoft Omnichannel Chat Widget",
5
5
  "main": "lib/cjs/index.js",
6
6
  "types": "lib/types/index.d.ts",
@@ -16,7 +16,8 @@
16
16
  "import": "./lib/esm/index.js",
17
17
  "require": "./lib/cjs/index.js",
18
18
  "types": "./lib/types/index.d.ts"
19
- }
19
+ },
20
+ "./package.json": "./package.json"
20
21
  },
21
22
  "devDependencies": {
22
23
  "@babel/core": "^7.15.8",
@@ -71,10 +72,6 @@
71
72
  "webpack": "^4.44.2",
72
73
  "webpack-cli": "^4.9.2"
73
74
  },
74
- "peerDependencies": {
75
- "react": "^16.14.0",
76
- "react-dom": "^16.14.0"
77
- },
78
75
  "dependencies": {
79
76
  "@fluentui/react": "^8.49.1",
80
77
  "@microsoft/omnichannel-chat-components": "0.1.0-main.2eda736",