config-editor-base 3.0.6 → 3.0.7

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.
package/dist/index.js CHANGED
@@ -24082,16 +24082,24 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
24082
24082
  var fileList = dbcData.filesWithoutPrefix.join(', ');
24083
24083
  this.props.showAlert("warning", "No valid CAN channel prefix found for: " + fileList + ". Specify the relevant channel via e.g. \"can1-\", \"can2-\" prefixes in the DBC file names.");
24084
24084
  }
24085
+ var validFileNames = dbcData.parsedFiles.filter(function (f) {
24086
+ return f.hasValidPrefix;
24087
+ }).map(function (f) {
24088
+ return f.filename;
24089
+ });
24085
24090
  this.setState({
24086
24091
  dbcData: dbcData,
24092
+ dbcFileNames: validFileNames,
24087
24093
  isLoading: false
24088
24094
  }, function () {
24089
24095
  _this5.mergeData();
24090
24096
  });
24091
- var validFiles = dbcData.parsedFiles.filter(function (f) {
24092
- return f.hasValidPrefix;
24093
- }).length;
24094
- this.props.showAlert("success", "Loaded " + validFiles + " DBC file(s) with valid prefix");
24097
+ var validFiles = validFileNames.length;
24098
+ if (validFiles === 0) {
24099
+ this.props.showAlert("warning", "Loaded 0 DBC file(s) with valid prefix - add a prefix such as 'can1-' or 'can2-' in order to use the DBC");
24100
+ } else {
24101
+ this.props.showAlert("success", "Loaded " + validFiles + " DBC file(s) with valid prefix");
24102
+ }
24095
24103
  } catch (e) {
24096
24104
  this.props.showAlert("danger", "Error parsing DBC files: " + e.message);
24097
24105
  this.setState({