config-editor-base 2.8.1 → 2.8.2

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.
@@ -1167,21 +1167,7 @@ var checkGNSSEstimate = function checkGNSSEstimate(content) {
1167
1167
  }
1168
1168
  };
1169
1169
  };
1170
- var checkCANmodMonitoringMode = function checkCANmodMonitoringMode(content) {
1171
- return function (dispatch) {
1172
- var _content$phy, _content$phy$can, _content$phy$can$phy;
1173
- if (((_content$phy = content.phy) === null || _content$phy === void 0 ? void 0 : (_content$phy$can = _content$phy.can) === null || _content$phy$can === void 0 ? void 0 : (_content$phy$can$phy = _content$phy$can.phy) === null || _content$phy$can$phy === void 0 ? void 0 : _content$phy$can$phy.mode) !== undefined) {
1174
- if (content.phy.can.phy.mode !== 0) {
1175
- dispatch(set({
1176
- type: "warning",
1177
- message: "Your CANmod primary CAN bus mode must be set to 'Normal' if you want the CANmod to output CAN messages",
1178
- autoClear: false
1179
- }));
1180
- }
1181
- }
1182
- };
1183
- };
1184
- var saveUpdatedConfiguration = function saveUpdatedConfiguration(filename, content) {
1170
+ var runConfigurationWarningChecks = function runConfigurationWarningChecks(content) {
1185
1171
  return function (dispatch) {
1186
1172
  if (content.can_2 != undefined) {
1187
1173
  dispatch(checkConfigTransmitPeriodDelay(content));
@@ -1208,6 +1194,24 @@ var saveUpdatedConfiguration = function saveUpdatedConfiguration(filename, conte
1208
1194
  dispatch(checkConfigControlSignalZeroScalingFactor(content));
1209
1195
  }
1210
1196
  dispatch(checkCANmodMonitoringMode(content));
1197
+ };
1198
+ };
1199
+ var checkCANmodMonitoringMode = function checkCANmodMonitoringMode(content) {
1200
+ return function (dispatch) {
1201
+ var _content$phy, _content$phy$can, _content$phy$can$phy;
1202
+ if (((_content$phy = content.phy) === null || _content$phy === void 0 ? void 0 : (_content$phy$can = _content$phy.can) === null || _content$phy$can === void 0 ? void 0 : (_content$phy$can$phy = _content$phy$can.phy) === null || _content$phy$can$phy === void 0 ? void 0 : _content$phy$can$phy.mode) !== undefined) {
1203
+ if (content.phy.can.phy.mode !== 0) {
1204
+ dispatch(set({
1205
+ type: "warning",
1206
+ message: "Your CANmod primary CAN bus mode must be set to 'Normal' if you want the CANmod to output CAN messages",
1207
+ autoClear: false
1208
+ }));
1209
+ }
1210
+ }
1211
+ };
1212
+ };
1213
+ var saveUpdatedConfiguration = function saveUpdatedConfiguration(filename, content) {
1214
+ return function (dispatch) {
1211
1215
  dispatch(setConfigContent(content));
1212
1216
  var blob = new Blob([JSON.stringify(content, null, 2)], {
1213
1217
  type: "text/json"
@@ -1326,6 +1330,7 @@ var actions = {
1326
1330
  checkIncorrectAPNSpaces: checkIncorrectAPNSpaces,
1327
1331
  checkFileSplitValue: checkFileSplitValue,
1328
1332
  checkGNSSEstimate: checkGNSSEstimate,
1333
+ runConfigurationWarningChecks: runConfigurationWarningChecks,
1329
1334
  checkCANmodMonitoringMode: checkCANmodMonitoringMode,
1330
1335
  saveUpdatedConfiguration: saveUpdatedConfiguration,
1331
1336
  setUpdatedFormData: setUpdatedFormData,
@@ -19319,6 +19324,7 @@ var EditorSection = /*#__PURE__*/function (_React$Component) {
19319
19324
  var revisedConfigFileSchema = _this5.state.schema;
19320
19325
  var revisedConfigFile = "config-" + revisedConfigFileSchema.match(regexRevision);
19321
19326
  if (_this5.state.isCompareChanges === false) {
19327
+ _this5.props.runConfigurationWarningChecks(formData);
19322
19328
  _this5.setState({
19323
19329
  isCompareChanges: true,
19324
19330
  revisedConfigFile: {
@@ -19518,6 +19524,9 @@ var mapDispatchToProps$2 = function mapDispatchToProps(dispatch) {
19518
19524
  },
19519
19525
  publicUiSchemaFiles: function publicUiSchemaFiles$1(uiSchemaAry, schemaAry, demoMode) {
19520
19526
  return dispatch(publicUiSchemaFiles(uiSchemaAry, schemaAry, demoMode));
19527
+ },
19528
+ runConfigurationWarningChecks: function runConfigurationWarningChecks$1(content) {
19529
+ return dispatch(runConfigurationWarningChecks(content));
19521
19530
  }
19522
19531
  };
19523
19532
  };