config-editor-base 2.7.0 → 2.7.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.
package/dist/index.js CHANGED
@@ -590,6 +590,60 @@ var checkMissingAPN = function checkMissingAPN(content) {
590
590
  }
591
591
  };
592
592
  };
593
+ var checkIncorrectAPNTelekom = function checkIncorrectAPNTelekom(content) {
594
+ return function (dispatch) {
595
+ if (content.connect != undefined && content.connect.s3 != undefined && content.connect.s3.server != undefined && content.connect.cellular != undefined && content.connect.cellular.apn != undefined) {
596
+ if (content.connect.s3.server.endpoint != undefined && content.connect.cellular.apn != undefined) {
597
+ if (content.connect.s3.server.endpoint.includes("http") && content.connect.cellular.apn == "internet.v6.telekom") {
598
+ dispatch(set({
599
+ type: "warning",
600
+ message: "Your SIM APN is set to 'internet.v6.telekom', which is not compatible with the device - please set it to 'internet.telekom' instead",
601
+ autoClear: false
602
+ }));
603
+ }
604
+ }
605
+ }
606
+ };
607
+ };
608
+ var checkIncorrectAPNSuperSIM = function checkIncorrectAPNSuperSIM(content) {
609
+ return function (dispatch) {
610
+ if (content.connect != undefined && content.connect.s3 != undefined && content.connect.s3.server != undefined && content.connect.cellular != undefined && content.connect.cellular.apn != undefined && content.connect.s3.server.region != undefined) {
611
+ if (content.connect.s3.server.region.includes("eu") && content.connect.cellular.apn == "super") {
612
+ dispatch(set({
613
+ type: "warning",
614
+ message: "Your Super SIM APN is set to 'super', but your S3 region appears to be in EU - please set your APN to 'de1.super' for optimal speed",
615
+ autoClear: false
616
+ }));
617
+ }
618
+ }
619
+ };
620
+ };
621
+ var checkIncorrectRoamingSuperSIM = function checkIncorrectRoamingSuperSIM(content) {
622
+ return function (dispatch) {
623
+ if (content.connect != undefined && content.connect.s3 != undefined && content.connect.s3.server != undefined && content.connect.cellular != undefined && content.connect.cellular.apn != undefined && content.connect.cellular.roaming != undefined && content.connect.s3.server.endpoint != undefined) {
624
+ if (content.connect.s3.server.endpoint.includes("http") && content.connect.cellular.roaming == 0 && (content.connect.cellular.apn == "super" || content.connect.cellular.apn == "de1.super" || content.connect.cellular.apn == "sg.super")) {
625
+ dispatch(set({
626
+ type: "warning",
627
+ message: "Roaming must be enabled when using a Super SIM",
628
+ autoClear: false
629
+ }));
630
+ }
631
+ }
632
+ };
633
+ };
634
+ var checkIncorrectAPNSpaces = function checkIncorrectAPNSpaces(content) {
635
+ return function (dispatch) {
636
+ if (content.connect != undefined && content.connect.s3 != undefined && content.connect.s3.server != undefined && content.connect.cellular != undefined && content.connect.cellular.apn != undefined && content.connect.s3.server.endpoint != undefined) {
637
+ if (content.connect.s3.server.endpoint.includes("http") && (content.connect.cellular.apn.startsWith(" ") || content.connect.cellular.apn.endsWith(" "))) {
638
+ dispatch(set({
639
+ type: "warning",
640
+ message: "Your APN starts/ends with spaces - please review, as this is most likely not correct",
641
+ autoClear: false
642
+ }));
643
+ }
644
+ }
645
+ };
646
+ };
593
647
  var checkFileSplitValue = function checkFileSplitValue(content) {
594
648
  return function (dispatch) {
595
649
  if (content.log != undefined && content.log.file != undefined && content.log.file.split_time_period != undefined) {
@@ -603,6 +657,19 @@ var checkFileSplitValue = function checkFileSplitValue(content) {
603
657
  }
604
658
  };
605
659
  };
660
+ var checkGNSSEstimate = function checkGNSSEstimate(content) {
661
+ return function (dispatch) {
662
+ if (content.gnss != undefined && content.gnss.alignment != undefined && content.gnss.alignment.method != undefined) {
663
+ if (content.gnss.alignment.method == 1) {
664
+ dispatch(set({
665
+ type: "warning",
666
+ message: "Your GNSS IMU-mount alignment is set to 'Estimate' - note that the device will not record any GPS/IMU data in this mode",
667
+ autoClear: false
668
+ }));
669
+ }
670
+ }
671
+ };
672
+ };
606
673
  var saveUpdatedConfiguration = function saveUpdatedConfiguration(filename, content) {
607
674
  return function (dispatch) {
608
675
  if (content.can_2 != undefined) {
@@ -618,6 +685,11 @@ var saveUpdatedConfiguration = function saveUpdatedConfiguration(filename, conte
618
685
  dispatch(checkConfigTlsPort(content));
619
686
  dispatch(checkFileSplitValue(content));
620
687
  dispatch(checkMissingAPN(content));
688
+ dispatch(checkIncorrectAPNSuperSIM(content));
689
+ dispatch(checkIncorrectAPNTelekom(content));
690
+ dispatch(checkIncorrectAPNSpaces(content));
691
+ dispatch(checkGNSSEstimate(content));
692
+ dispatch(checkIncorrectRoamingSuperSIM(content));
621
693
  dispatch(checkConfigControlSignalZeroScalingFactor(content));
622
694
  }
623
695
  dispatch(setConfigContent(content));
@@ -728,7 +800,12 @@ var actions = {
728
800
  checkRTCAdjustment: checkRTCAdjustment,
729
801
  checkConfigTlsPort: checkConfigTlsPort,
730
802
  checkMissingAPN: checkMissingAPN,
803
+ checkIncorrectAPNTelekom: checkIncorrectAPNTelekom,
804
+ checkIncorrectAPNSuperSIM: checkIncorrectAPNSuperSIM,
805
+ checkIncorrectRoamingSuperSIM: checkIncorrectRoamingSuperSIM,
806
+ checkIncorrectAPNSpaces: checkIncorrectAPNSpaces,
731
807
  checkFileSplitValue: checkFileSplitValue,
808
+ checkGNSSEstimate: checkGNSSEstimate,
732
809
  saveUpdatedConfiguration: saveUpdatedConfiguration,
733
810
  setUpdatedFormData: setUpdatedFormData,
734
811
  setUpdatedFormDataValue: setUpdatedFormDataValue,
@@ -18146,7 +18223,12 @@ var PartialConfigLoader = /*#__PURE__*/function (_React$Component) {
18146
18223
  }, function () {});
18147
18224
  };
18148
18225
  _proto.testMergedFile = function testMergedFile() {
18149
- var mergedConfigTemp = merge(this.props.formData, this.state.jsonFile);
18226
+ var overwriteMerge = function overwriteMerge(destinationArray, sourceArray, options) {
18227
+ return sourceArray;
18228
+ };
18229
+ var mergedConfigTemp = merge(this.props.formData, this.state.jsonFile, {
18230
+ arrayMerge: overwriteMerge
18231
+ });
18150
18232
  this.setState({
18151
18233
  mergedConfig: mergedConfigTemp
18152
18234
  }, function () {