@syncfusion/ej2-maps 20.3.47 → 20.3.49

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.
@@ -1634,7 +1634,7 @@ function checkShapeDataFields(dataSource, properties, dataPath, propertyPath, la
1634
1634
  dataSource[i][dataPath]);
1635
1635
  const shapePath = checkPropertyPath(shapeDataPath, propertyPath, properties);
1636
1636
  const shapeDataPathValue = !isNullOrUndefined(shapeDataPath) && isNaN(properties[shapePath])
1637
- ? shapeDataPath.toLowerCase() : shapeDataPath;
1637
+ ? (typeof shapeDataPath === 'string' ? shapeDataPath.toLowerCase() : shapeDataPath) : shapeDataPath;
1638
1638
  const propertiesShapePathValue = !isNullOrUndefined(properties[shapePath]) && isNaN(properties[shapePath])
1639
1639
  ? properties[shapePath].toLowerCase() : properties[shapePath];
1640
1640
  if (shapeDataPathValue === propertiesShapePathValue) {
@@ -1658,7 +1658,8 @@ function checkPropertyPath(shapeData, shapePropertyPath, shape) {
1658
1658
  const properties = (Object.prototype.toString.call(shapePropertyPath) === '[object Array]' ?
1659
1659
  shapePropertyPath : [shapePropertyPath]);
1660
1660
  for (let i = 0; i < properties.length; i++) {
1661
- const shapeDataValue = !isNullOrUndefined(shapeData) ? shapeData.toLowerCase() : shapeData;
1661
+ const shapeDataValue = !isNullOrUndefined(shapeData) && typeof shapeData === 'string' ?
1662
+ shapeData.toLowerCase() : shapeData;
1662
1663
  const shapePropertiesValue = !isNullOrUndefined(shape[properties[i]])
1663
1664
  && isNaN(shape[properties[i]])
1664
1665
  ? shape[properties[i]].toLowerCase() : shape[properties[i]];
@@ -8538,7 +8539,7 @@ let Maps = class Maps extends Component {
8538
8539
  const propertyName = !isNullOrUndefined(shapeData[i]['properties'][popertyNameArray[j]])
8539
8540
  && isNaN(shapeData[i]['properties'][popertyNameArray[j]]) ?
8540
8541
  shapeData[i]['properties'][popertyNameArray[j]].toLowerCase() : shapeData[i]['properties'][popertyNameArray[j]];
8541
- const shapeName = !isNullOrUndefined(name) ? name.toLowerCase() : name;
8542
+ const shapeName = !isNullOrUndefined(name) && typeof name === 'string' ? name.toLowerCase() : name;
8542
8543
  let k;
8543
8544
  if (propertyName === shapeName) {
8544
8545
  if (!isNullOrUndefined(this.layers[layerIndex].shapeSettings.colorValuePath)) {
@@ -9668,10 +9669,10 @@ class DataLabel {
9668
9669
  for (let i = 0; i < dataSource.length; i++) {
9669
9670
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9670
9671
  const data = dataSource[i];
9671
- const dataShapePathValue = !isNullOrUndefined(data[shapeDataPath]) && isNaN(data[shapeDataPath]) ?
9672
- data[shapeDataPath].toLowerCase() : data[shapeDataPath];
9673
- shapeName = !isNullOrUndefined(shapeName) ? shapeName.toString() : shapeName;
9674
- shapeNameValue = !isNullOrUndefined(shapeName) ? shapeName.toLowerCase() : shapeName;
9672
+ const dataShapePathValue = !isNullOrUndefined(data[shapeDataPath]) && isNaN(data[shapeDataPath]) &&
9673
+ typeof data[shapeDataPath] === 'string' ? data[shapeDataPath].toLowerCase() : data[shapeDataPath];
9674
+ shapeName = !isNullOrUndefined(shapeName) && typeof shapeName === 'string' ? shapeName.toString() : shapeName;
9675
+ shapeNameValue = !isNullOrUndefined(shapeName) && typeof shapeName === 'string' ? shapeName.toLowerCase() : shapeName;
9675
9676
  if ((dataShapePathValue) === shapeNameValue) {
9676
9677
  text = data;
9677
9678
  break;
@@ -12267,10 +12268,11 @@ class Legend {
12267
12268
  const shapeData = layerData[i];
12268
12269
  const dataPathValue = (dataPath.indexOf('.') > -1) ? getValueFromObject(data, dataPath) : data[dataPath];
12269
12270
  const shapePath = checkPropertyPath(data[dataPath], shapePropertyPath, shapeData['properties']);
12270
- const dataPathValueCase = !isNullOrUndefined(dataPathValue)
12271
- ? dataPathValue.toLowerCase() : dataPathValue;
12271
+ const dataPathValueCase = !isNullOrUndefined(dataPathValue) &&
12272
+ typeof dataPathValue === 'string' ? dataPathValue.toLowerCase() : dataPathValue;
12272
12273
  const shapeDataValueCase = !isNullOrUndefined(shapeData['properties'][shapePath])
12273
- && isNaN(shapeData['properties'][shapePath]) ? shapeData['properties'][shapePath].toLowerCase() : shapeData['properties'][shapePath];
12274
+ && isNaN(shapeData['properties'][shapePath]) ?
12275
+ shapeData['properties'][shapePath].toLowerCase() : shapeData['properties'][shapePath];
12274
12276
  if (shapeDataValueCase === dataPathValueCase) {
12275
12277
  if (shapeData['geometry']['type'] != 'MultiPoint') {
12276
12278
  legendData.push({