config-editor-base 2.7.7 → 2.7.9

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.
Files changed (33) hide show
  1. package/dist/index.js +57 -51
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.modern.js +57 -51
  4. package/dist/index.modern.js.map +1 -1
  5. package/dist/schema/Advanced/uischema-01.09.json +1012 -1012
  6. package/dist/schema/CANedge1/schema-01.09.json +2424 -2424
  7. package/dist/schema/CANedge1 GNSS/schema-01.09.json +2817 -2817
  8. package/dist/schema/CANedge2/schema-01.09.json +3002 -3002
  9. package/dist/schema/CANedge2 GNSS/schema-01.09.json +3395 -3395
  10. package/dist/schema/CANedge3 GNSS/schema-01.09.json +3214 -3214
  11. package/dist/schema/CANmod.gps/config-01.03.json +1 -0
  12. package/dist/schema/CANmod.gps/config-01.04.json +1 -0
  13. package/dist/schema/CANmod.gps/schema-01.03.json +1 -0
  14. package/dist/schema/CANmod.gps/schema-01.04.json +1 -0
  15. package/dist/schema/CANmod.gps/uischema-01.03.json +250 -0
  16. package/dist/schema/CANmod.gps/uischema-01.04.json +262 -0
  17. package/dist/schema/CANmod.input/config-01.04.json +1 -0
  18. package/dist/schema/CANmod.input/schema-01.04.json +1 -0
  19. package/dist/schema/CANmod.input/uischema-01.04.json +411 -0
  20. package/dist/schema/CANmod.router/config-01.01.json +1 -0
  21. package/dist/schema/CANmod.router/config-01.02.json +1 -0
  22. package/dist/schema/CANmod.router/schema-01.01.json +1 -0
  23. package/dist/schema/CANmod.router/schema-01.02.json +1 -0
  24. package/dist/schema/CANmod.router/uischema-01.01.json +586 -0
  25. package/dist/schema/CANmod.router/uischema-01.02.json +817 -0
  26. package/dist/schema/CANmod.temp/config-01.04.json +1 -0
  27. package/dist/schema/CANmod.temp/config-01.05.json +1 -0
  28. package/dist/schema/CANmod.temp/schema-01.04.json +1 -0
  29. package/dist/schema/CANmod.temp/schema-01.05.json +1 -0
  30. package/dist/schema/CANmod.temp/uischema-01.04.json +106 -0
  31. package/dist/schema/CANmod.temp/uischema-01.05.json +118 -0
  32. package/dist/schema/DemoConfig/config-01.09.json +414 -414
  33. package/package.json +1 -1
@@ -10,36 +10,21 @@ import applyNav, { GENERIC_NAV } from 'rjsf-tabs';
10
10
  import { ReactGhLikeDiff } from 'react-gh-like-diff';
11
11
 
12
12
  function _extends() {
13
- _extends = Object.assign ? Object.assign.bind() : function (target) {
14
- for (var i = 1; i < arguments.length; i++) {
15
- var source = arguments[i];
16
- for (var key in source) {
17
- if (Object.prototype.hasOwnProperty.call(source, key)) {
18
- target[key] = source[key];
19
- }
20
- }
13
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
14
+ for (var e = 1; e < arguments.length; e++) {
15
+ var t = arguments[e];
16
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
21
17
  }
22
- return target;
23
- };
24
- return _extends.apply(this, arguments);
18
+ return n;
19
+ }, _extends.apply(null, arguments);
25
20
  }
26
- function _inheritsLoose(subClass, superClass) {
27
- subClass.prototype = Object.create(superClass.prototype);
28
- subClass.prototype.constructor = subClass;
29
- _setPrototypeOf(subClass, superClass);
21
+ function _inheritsLoose(t, o) {
22
+ t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
30
23
  }
31
- function _setPrototypeOf(o, p) {
32
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
33
- o.__proto__ = p;
34
- return o;
35
- };
36
- return _setPrototypeOf(o, p);
37
- }
38
- function _assertThisInitialized(self) {
39
- if (self === void 0) {
40
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
41
- }
42
- return self;
24
+ function _setPrototypeOf(t, e) {
25
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
26
+ return t.__proto__ = e, t;
27
+ }, _setPrototypeOf(t, e);
43
28
  }
44
29
 
45
30
  var SET = "alert/SET";
@@ -750,11 +735,32 @@ var publicSchemaFiles = function publicSchemaFiles(selectedConfig, schemaAry, co
750
735
  if (contentJSON.can_2 != undefined && contentJSON.connect && contentJSON.connect.cellular != undefined && contentJSON.gnss != undefined) {
751
736
  deviceType = "CANedge3 GNSS";
752
737
  }
738
+ if (contentJSON.sensor && contentJSON.sensor.gnss !== undefined) {
739
+ deviceType = "CANmod.gps";
740
+ }
741
+ if (contentJSON.sensor && contentJSON.sensor.channel_1 && contentJSON.sensor.channel_1.digital_low !== undefined) {
742
+ deviceType = "CANmod.input";
743
+ }
744
+ if (contentJSON.phy && contentJSON.phy.can && contentJSON.phy.can.route) {
745
+ deviceType = "CANmod.router";
746
+ }
747
+ if (contentJSON.sensor && contentJSON.sensor.top_left && contentJSON.sensor.top_left.type !== undefined) {
748
+ deviceType = "CANmod.temp";
749
+ }
750
+ var version = selectedConfig.substr(7, 5);
753
751
  var schemaAryFiltered = schemaAry.filter(function (e) {
754
- return e.includes(selectedConfig.substr(7, 5));
752
+ if (!e.includes(version)) return false;
753
+ if (deviceType && deviceType.startsWith('CANmod')) {
754
+ return e.includes(deviceType);
755
+ }
756
+ return true;
755
757
  });
756
758
  var uiSchemaAryFiltered = uiSchemaAry.filter(function (e) {
757
- return e.includes(selectedConfig.substr(7, 5));
759
+ if (!e.includes(version)) return false;
760
+ if (deviceType && deviceType.startsWith('CANmod')) {
761
+ return e.includes(deviceType);
762
+ }
763
+ return true;
758
764
  });
759
765
  if (!deviceType.includes("GNSS")) {
760
766
  schemaAryFiltered = schemaAryFiltered.filter(function (e) {
@@ -18534,7 +18540,6 @@ var selectOptions = function selectOptions(Files) {
18534
18540
  });
18535
18541
  };
18536
18542
  var EditorDropDown = /*#__PURE__*/function (_React$Component) {
18537
- _inheritsLoose(EditorDropDown, _React$Component);
18538
18543
  function EditorDropDown(props) {
18539
18544
  var _this;
18540
18545
  _this = _React$Component.call(this, props) || this;
@@ -18554,6 +18559,7 @@ var EditorDropDown = /*#__PURE__*/function (_React$Component) {
18554
18559
  };
18555
18560
  return _this;
18556
18561
  }
18562
+ _inheritsLoose(EditorDropDown, _React$Component);
18557
18563
  var _proto = EditorDropDown.prototype;
18558
18564
  _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
18559
18565
  if (nextProps.selected != "") {
@@ -18610,10 +18616,10 @@ var EditorDropDown = /*#__PURE__*/function (_React$Component) {
18610
18616
  }(React.Component);
18611
18617
 
18612
18618
  var EditorSchemaModal = /*#__PURE__*/function (_React$Component) {
18613
- _inheritsLoose(EditorSchemaModal, _React$Component);
18614
18619
  function EditorSchemaModal(props) {
18615
18620
  return _React$Component.call(this, props) || this;
18616
18621
  }
18622
+ _inheritsLoose(EditorSchemaModal, _React$Component);
18617
18623
  var _proto = EditorSchemaModal.prototype;
18618
18624
  _proto.componentWillUnmount = function componentWillUnmount() {
18619
18625
  this.props.resetFiles();
@@ -18681,15 +18687,14 @@ var EditorSchemaModal$1 = connect(null, mapDispatchToProps)(EditorSchemaModal);
18681
18687
  var yourForm;
18682
18688
  var merge = require("deepmerge");
18683
18689
  var PartialConfigLoader = /*#__PURE__*/function (_React$Component) {
18684
- _inheritsLoose(PartialConfigLoader, _React$Component);
18685
18690
  function PartialConfigLoader(props) {
18686
18691
  var _this;
18687
18692
  _this = _React$Component.call(this, props) || this;
18688
- _this.onReview = _this.onReview.bind(_assertThisInitialized(_this));
18689
- _this.onFilesError = _this.onFilesError.bind(_assertThisInitialized(_this));
18690
- _this.testMergedFile = _this.testMergedFile.bind(_assertThisInitialized(_this));
18691
- _this.onSubmit = _this.onSubmit.bind(_assertThisInitialized(_this));
18692
- _this.onValidationError = _this.onValidationError.bind(_assertThisInitialized(_this));
18693
+ _this.onReview = _this.onReview.bind(_this);
18694
+ _this.onFilesError = _this.onFilesError.bind(_this);
18695
+ _this.testMergedFile = _this.testMergedFile.bind(_this);
18696
+ _this.onSubmit = _this.onSubmit.bind(_this);
18697
+ _this.onValidationError = _this.onValidationError.bind(_this);
18693
18698
  _this.state = {
18694
18699
  jsonFile: {},
18695
18700
  jsonFileName: "",
@@ -18710,6 +18715,7 @@ var PartialConfigLoader = /*#__PURE__*/function (_React$Component) {
18710
18715
  };
18711
18716
  return _this;
18712
18717
  }
18718
+ _inheritsLoose(PartialConfigLoader, _React$Component);
18713
18719
  var _proto = PartialConfigLoader.prototype;
18714
18720
  _proto.onSubmit = function onSubmit() {
18715
18721
  this.setState({
@@ -18847,10 +18853,10 @@ var mapDispatchToProps$1 = function mapDispatchToProps(dispatch) {
18847
18853
  var PartialConfigLoader$1 = connect(mapStateToProps, mapDispatchToProps$1)(PartialConfigLoader);
18848
18854
 
18849
18855
  var EditorToolButton = /*#__PURE__*/function (_React$Component) {
18850
- _inheritsLoose(EditorToolButton, _React$Component);
18851
18856
  function EditorToolButton(props) {
18852
18857
  return _React$Component.call(this, props) || this;
18853
18858
  }
18859
+ _inheritsLoose(EditorToolButton, _React$Component);
18854
18860
  var _proto = EditorToolButton.prototype;
18855
18861
  _proto.render = function render() {
18856
18862
  return /*#__PURE__*/React.createElement("div", {
@@ -18872,10 +18878,10 @@ var EditorToolButton = /*#__PURE__*/function (_React$Component) {
18872
18878
  }(React.Component);
18873
18879
 
18874
18880
  var EditorToolModalWrapper = /*#__PURE__*/function (_React$Component) {
18875
- _inheritsLoose(EditorToolModalWrapper, _React$Component);
18876
18881
  function EditorToolModalWrapper(props) {
18877
18882
  return _React$Component.call(this, props) || this;
18878
18883
  }
18884
+ _inheritsLoose(EditorToolModalWrapper, _React$Component);
18879
18885
  var _proto = EditorToolModalWrapper.prototype;
18880
18886
  _proto.render = function render() {
18881
18887
  return /*#__PURE__*/React.createElement("div", {
@@ -18990,7 +18996,6 @@ var _require$1 = require("detect-browser"),
18990
18996
  var browser$1 = detect$1();
18991
18997
  var crcBrowserSupport$1 = ["chrome", "firefox", "opera", "safari", "edge"].includes(browser$1.name);
18992
18998
  var EditorChangesComparison = /*#__PURE__*/function (_React$Component) {
18993
- _inheritsLoose(EditorChangesComparison, _React$Component);
18994
18999
  function EditorChangesComparison(props) {
18995
19000
  var _this;
18996
19001
  _this = _React$Component.call(this, props) || this;
@@ -19002,13 +19007,14 @@ var EditorChangesComparison = /*#__PURE__*/function (_React$Component) {
19002
19007
  _this.handleSelectChange = function (selectedValue) {
19003
19008
  _this.props.handleDropdownChange(selectedValue.value, "Previous Configuration File");
19004
19009
  };
19005
- _this.toggleCheckbox = _this.toggleCheckbox.bind(_assertThisInitialized(_this));
19006
- _this.handleSelectChange = _this.handleSelectChange.bind(_assertThisInitialized(_this));
19010
+ _this.toggleCheckbox = _this.toggleCheckbox.bind(_this);
19011
+ _this.handleSelectChange = _this.handleSelectChange.bind(_this);
19007
19012
  _this.state = {
19008
19013
  hideWhiteSpace: true
19009
19014
  };
19010
19015
  return _this;
19011
19016
  }
19017
+ _inheritsLoose(EditorChangesComparison, _React$Component);
19012
19018
  var _proto = EditorChangesComparison.prototype;
19013
19019
  _proto.render = function render() {
19014
19020
  var _this$props = this.props,
@@ -19123,7 +19129,6 @@ var regexRevision = new RegExp('\\d{2}\\.\\d{2}\\.json', 'g');
19123
19129
  var isDownloadConfig = false;
19124
19130
  var activatedTab;
19125
19131
  var EditorSection = /*#__PURE__*/function (_React$Component) {
19126
- _inheritsLoose(EditorSection, _React$Component);
19127
19132
  function EditorSection(props) {
19128
19133
  var _this;
19129
19134
  _this = _React$Component.call(this, props) || this;
@@ -19135,14 +19140,14 @@ var EditorSection = /*#__PURE__*/function (_React$Component) {
19135
19140
  activatedTab = nav[0];
19136
19141
  };
19137
19142
  _this.editorForm = React.createRef();
19138
- _this.handleCompareChanges = _this.handleCompareChanges.bind(_assertThisInitialized(_this));
19139
- _this.closeChangesModal = _this.closeChangesModal.bind(_assertThisInitialized(_this));
19140
- _this.handleError = _this.handleError.bind(_assertThisInitialized(_this));
19141
- _this.onSubmit = _this.onSubmit.bind(_assertThisInitialized(_this));
19142
- _this.escFunction = _this.escFunction.bind(_assertThisInitialized(_this));
19143
- _this.subMenuBtnClick = _this.subMenuBtnClick.bind(_assertThisInitialized(_this));
19144
- _this.handleDropdownChange = _this.handleDropdownChange.bind(_assertThisInitialized(_this));
19145
- _this.hideUischemaModal = _this.hideUischemaModal.bind(_assertThisInitialized(_this));
19143
+ _this.handleCompareChanges = _this.handleCompareChanges.bind(_this);
19144
+ _this.closeChangesModal = _this.closeChangesModal.bind(_this);
19145
+ _this.handleError = _this.handleError.bind(_this);
19146
+ _this.onSubmit = _this.onSubmit.bind(_this);
19147
+ _this.escFunction = _this.escFunction.bind(_this);
19148
+ _this.subMenuBtnClick = _this.subMenuBtnClick.bind(_this);
19149
+ _this.handleDropdownChange = _this.handleDropdownChange.bind(_this);
19150
+ _this.hideUischemaModal = _this.hideUischemaModal.bind(_this);
19146
19151
  _this.state = {
19147
19152
  showUischemaModal: true,
19148
19153
  schema: '',
@@ -19164,6 +19169,7 @@ var EditorSection = /*#__PURE__*/function (_React$Component) {
19164
19169
  _this.s3 = _this.props.fetchFileContentExt ? true : false;
19165
19170
  return _this;
19166
19171
  }
19172
+ _inheritsLoose(EditorSection, _React$Component);
19167
19173
  var _proto = EditorSection.prototype;
19168
19174
  _proto.escFunction = function escFunction(event) {
19169
19175
  if (event.keyCode === 27) {