versacall-dashboards-library-react 2.0.17 → 2.0.18

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.
@@ -367,17 +367,17 @@ class DashboardsMainMessaging extends _react.Component {
367
367
  var replaceIndex = 0;
368
368
 
369
369
  if (replaceValue === 'FIRST') {
370
- replaceIndex = 2;
370
+ replaceIndex = 1;
371
371
  } else if (replaceValue === 'LAST') {
372
- replaceIndex = processedEvent.configurationIds.length - 1;
372
+ replaceIndex = processedEvent.alerts ? processedEvent.alerts.length : 0;
373
373
  } else if (Number.isInteger(parseInt(replaceValue, 10))) {
374
- replaceIndex = parseInt(replaceValue, 10) + 1;
374
+ replaceIndex = parseInt(replaceValue, 10);
375
375
  }
376
376
 
377
- if (replaceIndex > 1 && replaceIndex < processedEvent.configurationIds.length) {
378
- var currentMonitoringPoint = processedEvent.moduleConfiguration.moduleConfiguration.monitoringPoints.find(mp => mp.id === processedEvent.configurationIds[replaceIndex]);
377
+ if (replaceIndex > 0 && processedEvent.alerts && replaceIndex <= processedEvent.alerts.length) {
378
+ var currentMonitoringPoint = processedEvent.moduleConfiguration.moduleConfiguration.monitoringPoints.find(mp => mp.id === processedEvent.alerts[replaceIndex - 1].id);
379
379
 
380
- if (currentMonitoringPoint.communicationPaths) {
380
+ if (currentMonitoringPoint && currentMonitoringPoint.communicationPaths) {
381
381
  replaceValue = currentMonitoringPoint.name;
382
382
  } else {
383
383
  canReplace = false;
package/package.json CHANGED
@@ -2,10 +2,10 @@
2
2
  "versacall": {
3
3
  "title": "Versacall Dashboards Library React",
4
4
  "applicationType": "react-library",
5
- "build": 17
5
+ "build": 18
6
6
  },
7
7
  "name": "versacall-dashboards-library-react",
8
- "version": "2.0.17",
8
+ "version": "2.0.18",
9
9
  "description": "Versacall Dashboards Library",
10
10
  "main": "dist/index.js",
11
11
  "module": "dist/index.js",