@microsoft/omnichannel-chat-widget 1.6.3-main.18ee949 → 1.6.3-main.e6221d5

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.setTabIndices = exports.setFocusOnSendBox = exports.setFocusOnElement = exports.preventFocusToMoveOutOfElement = exports.parseAdaptiveCardPayload = exports.newGuid = exports.isUndefinedOrEmpty = exports.isNullOrUndefined = exports.isNullOrEmptyString = exports.getWidgetEndChatEventName = exports.getWidgetCacheIdfromProps = exports.getWidgetCacheId = exports.getTimestampHourMinute = exports.getStateFromCache = exports.getLocaleDirection = exports.getIconText = exports.getDomain = exports.getConversationDetailsCall = exports.getBroadcastChannelName = exports.formatTemplateString = exports.findParentFocusableElementsWithoutChildContainer = exports.findAllFocusableElement = exports.extractPreChatSurveyResponseValues = exports.escapeHtml = exports.debounceLeading = exports.createTimer = exports.createFileAndDownload = exports.checkContactIdError = exports.changeLanguageCodeFormatForWebChat = exports.addDelayInMs = void 0;
6
+ exports.setTabIndices = exports.setFocusOnSendBox = exports.setFocusOnElement = exports.preventFocusToMoveOutOfElement = exports.parseLowerCaseString = exports.parseAdaptiveCardPayload = exports.newGuid = exports.isUndefinedOrEmpty = exports.isNullOrUndefined = exports.isNullOrEmptyString = exports.getWidgetEndChatEventName = exports.getWidgetCacheIdfromProps = exports.getWidgetCacheId = exports.getTimestampHourMinute = exports.getStateFromCache = exports.getLocaleDirection = exports.getIconText = exports.getDomain = exports.getConversationDetailsCall = exports.getBroadcastChannelName = exports.formatTemplateString = exports.findParentFocusableElementsWithoutChildContainer = exports.findAllFocusableElement = exports.extractPreChatSurveyResponseValues = exports.escapeHtml = exports.debounceLeading = exports.createTimer = exports.createFileAndDownload = exports.checkContactIdError = exports.changeLanguageCodeFormatForWebChat = exports.addDelayInMs = void 0;
7
7
  var _Constants = require("./Constants");
8
8
  var _TelemetryConstants = require("./telemetry/TelemetryConstants");
9
9
  var _omnichannelChatComponents = require("@microsoft/omnichannel-chat-components");
@@ -449,4 +449,8 @@ const formatTemplateString = (templateMessage, values) => {
449
449
  return typeof values[index] !== "undefined" ? values[index] : match;
450
450
  });
451
451
  };
452
- exports.formatTemplateString = formatTemplateString;
452
+ exports.formatTemplateString = formatTemplateString;
453
+ const parseLowerCaseString = property => {
454
+ return String(property).toLowerCase();
455
+ };
456
+ exports.parseLowerCaseString = parseLowerCaseString;
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.isMaskingforCustomer = void 0;
7
+ var _utils = require("../../../../common/utils");
7
8
  const isMaskingforCustomer = maskingInfo => {
8
9
  var _maskingInfo$setting;
9
10
  // If the masking info (containing masking setting and masking rules) is missing or empty, return false.
@@ -14,8 +15,9 @@ const isMaskingforCustomer = maskingInfo => {
14
15
 
15
16
  // If the masking rules are provided and;
16
17
  // If the masking setting is NOT null and masking for customer is NOT null, return the configuration
17
- if ((_maskingInfo$setting = maskingInfo.setting) !== null && _maskingInfo$setting !== void 0 && _maskingInfo$setting.msdyn_maskforcustomer) {
18
- return maskingInfo.setting.msdyn_maskforcustomer;
18
+ if (!(0, _utils.isNullOrUndefined)((_maskingInfo$setting = maskingInfo.setting) === null || _maskingInfo$setting === void 0 ? void 0 : _maskingInfo$setting.msdyn_maskforcustomer)) {
19
+ var _maskingInfo$setting2;
20
+ return (0, _utils.parseLowerCaseString)(maskingInfo === null || maskingInfo === void 0 ? void 0 : (_maskingInfo$setting2 = maskingInfo.setting) === null || _maskingInfo$setting2 === void 0 ? void 0 : _maskingInfo$setting2.msdyn_maskforcustomer) === "true";
19
21
  }
20
22
 
21
23
  // In all other cases, even if masking setting is missing, return true to apply the masking for backward compatibility (i.e. in old versions, OC does not have masking info settings)
@@ -413,4 +413,7 @@ export const formatTemplateString = (templateMessage, values) => {
413
413
  return templateMessage.replace(/{(\d+)}/g, (match, index) => {
414
414
  return typeof values[index] !== "undefined" ? values[index] : match;
415
415
  });
416
+ };
417
+ export const parseLowerCaseString = property => {
418
+ return String(property).toLowerCase();
416
419
  };
@@ -1,3 +1,4 @@
1
+ import { isNullOrUndefined, parseLowerCaseString } from "../../../../common/utils";
1
2
  export const isMaskingforCustomer = maskingInfo => {
2
3
  var _maskingInfo$setting;
3
4
  // If the masking info (containing masking setting and masking rules) is missing or empty, return false.
@@ -8,8 +9,9 @@ export const isMaskingforCustomer = maskingInfo => {
8
9
 
9
10
  // If the masking rules are provided and;
10
11
  // If the masking setting is NOT null and masking for customer is NOT null, return the configuration
11
- if ((_maskingInfo$setting = maskingInfo.setting) !== null && _maskingInfo$setting !== void 0 && _maskingInfo$setting.msdyn_maskforcustomer) {
12
- return maskingInfo.setting.msdyn_maskforcustomer;
12
+ if (!isNullOrUndefined((_maskingInfo$setting = maskingInfo.setting) === null || _maskingInfo$setting === void 0 ? void 0 : _maskingInfo$setting.msdyn_maskforcustomer)) {
13
+ var _maskingInfo$setting2;
14
+ return parseLowerCaseString(maskingInfo === null || maskingInfo === void 0 ? void 0 : (_maskingInfo$setting2 = maskingInfo.setting) === null || _maskingInfo$setting2 === void 0 ? void 0 : _maskingInfo$setting2.msdyn_maskforcustomer) === "true";
13
15
  }
14
16
 
15
17
  // In all other cases, even if masking setting is missing, return true to apply the masking for backward compatibility (i.e. in old versions, OC does not have masking info settings)
@@ -42,3 +42,4 @@ export declare const createFileAndDownload: (fileName: string, blobData: string,
42
42
  * @returns formatted string with replaced values
43
43
  */
44
44
  export declare const formatTemplateString: (templateMessage: string, values: any) => string;
45
+ export declare const parseLowerCaseString: (property: string | boolean | undefined) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/omnichannel-chat-widget",
3
- "version": "1.6.3-main.18ee949",
3
+ "version": "1.6.3-main.e6221d5",
4
4
  "description": "Microsoft Omnichannel Chat Widget",
5
5
  "main": "lib/cjs/index.js",
6
6
  "types": "lib/types/index.d.ts",
@@ -75,7 +75,7 @@
75
75
  },
76
76
  "dependencies": {
77
77
  "@microsoft/omnichannel-chat-components": "^1.1.1",
78
- "@microsoft/omnichannel-chat-sdk": "1.6.2",
78
+ "@microsoft/omnichannel-chat-sdk": "1.6.3",
79
79
  "abort-controller-es5": "^2.0.1",
80
80
  "dompurify": "^2.3.4",
81
81
  "markdown-it": "^12.3.2",