config-editor-base 3.1.0 → 3.1.3
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 +90 -73
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +90 -73
- package/dist/index.modern.js.map +1 -1
- package/package.json +68 -68
package/dist/index.js
CHANGED
|
@@ -18966,15 +18966,23 @@ var PartialConfigLoader = /*#__PURE__*/function (_React$Component) {
|
|
|
18966
18966
|
className: "browse-file-name"
|
|
18967
18967
|
}, jsonFileName))), Object.keys(jsonFile).length ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("pre", {
|
|
18968
18968
|
className: "browse-file-preview"
|
|
18969
|
-
}, JSON.stringify(jsonFile, null, 2)), formData ? /*#__PURE__*/React.createElement("div", null, mergedConfigValid ? /*#__PURE__*/React.createElement("
|
|
18970
|
-
className: "btn-highlight"
|
|
18969
|
+
}, JSON.stringify(jsonFile, null, 2)), formData ? /*#__PURE__*/React.createElement("div", null, mergedConfigValid ? /*#__PURE__*/React.createElement("div", {
|
|
18970
|
+
className: "btn-highlight",
|
|
18971
|
+
style: {
|
|
18972
|
+
fontSize: "12px",
|
|
18973
|
+
marginBottom: "8px"
|
|
18974
|
+
}
|
|
18971
18975
|
}, /*#__PURE__*/React.createElement("i", {
|
|
18972
18976
|
className: "fa fa-check"
|
|
18973
|
-
}), "
|
|
18974
|
-
className: "red-text"
|
|
18977
|
+
}), " Merged Configuration File validated") : null, !mergedConfigValid ? /*#__PURE__*/React.createElement("div", {
|
|
18978
|
+
className: "red-text",
|
|
18979
|
+
style: {
|
|
18980
|
+
fontSize: "12px",
|
|
18981
|
+
marginBottom: "8px"
|
|
18982
|
+
}
|
|
18975
18983
|
}, /*#__PURE__*/React.createElement("i", {
|
|
18976
18984
|
className: "fa fa-times"
|
|
18977
|
-
}), "
|
|
18985
|
+
}), " Merged Configuration File is invalid") : null, /*#__PURE__*/React.createElement("button", {
|
|
18978
18986
|
className: "btn btn-primary",
|
|
18979
18987
|
onClick: this.onReview
|
|
18980
18988
|
}, "Merge files")) : null) : null) : /*#__PURE__*/React.createElement("div", {
|
|
@@ -19834,6 +19842,64 @@ var SimpleDropdown = /*#__PURE__*/function (_React$Component) {
|
|
|
19834
19842
|
return SimpleDropdown;
|
|
19835
19843
|
}(React.Component);
|
|
19836
19844
|
|
|
19845
|
+
var CollapsiblePreview = /*#__PURE__*/function (_React$Component) {
|
|
19846
|
+
function CollapsiblePreview() {
|
|
19847
|
+
return _React$Component.apply(this, arguments) || this;
|
|
19848
|
+
}
|
|
19849
|
+
_inheritsLoose(CollapsiblePreview, _React$Component);
|
|
19850
|
+
var _proto = CollapsiblePreview.prototype;
|
|
19851
|
+
_proto.render = function render() {
|
|
19852
|
+
var _this$props = this.props,
|
|
19853
|
+
open = _this$props.open,
|
|
19854
|
+
onToggle = _this$props.onToggle,
|
|
19855
|
+
data = _this$props.data,
|
|
19856
|
+
onDownload = _this$props.onDownload,
|
|
19857
|
+
label = _this$props.label;
|
|
19858
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
19859
|
+
style: {
|
|
19860
|
+
marginTop: "10px"
|
|
19861
|
+
}
|
|
19862
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
19863
|
+
onClick: onToggle,
|
|
19864
|
+
style: {
|
|
19865
|
+
display: "inline-flex",
|
|
19866
|
+
alignItems: "center",
|
|
19867
|
+
cursor: "pointer",
|
|
19868
|
+
fontSize: "12px",
|
|
19869
|
+
color: "#999999",
|
|
19870
|
+
userSelect: "none"
|
|
19871
|
+
}
|
|
19872
|
+
}, /*#__PURE__*/React.createElement("i", {
|
|
19873
|
+
className: open ? "fa fa-angle-down" : "fa fa-angle-right",
|
|
19874
|
+
style: {
|
|
19875
|
+
marginRight: "6px",
|
|
19876
|
+
width: "8px"
|
|
19877
|
+
}
|
|
19878
|
+
}), label || "Show partial config preview"), open ? /*#__PURE__*/React.createElement("div", {
|
|
19879
|
+
style: {
|
|
19880
|
+
marginTop: "10px"
|
|
19881
|
+
}
|
|
19882
|
+
}, /*#__PURE__*/React.createElement("pre", {
|
|
19883
|
+
className: "browse-file-preview",
|
|
19884
|
+
style: {
|
|
19885
|
+
maxHeight: "300px",
|
|
19886
|
+
overflow: "auto",
|
|
19887
|
+
fontSize: "11px"
|
|
19888
|
+
}
|
|
19889
|
+
}, JSON.stringify(data, null, 2)), onDownload ? /*#__PURE__*/React.createElement("button", {
|
|
19890
|
+
className: "btn",
|
|
19891
|
+
onClick: onDownload,
|
|
19892
|
+
style: {
|
|
19893
|
+
backgroundColor: "#fff",
|
|
19894
|
+
border: "1px solid #ccc",
|
|
19895
|
+
color: "#333",
|
|
19896
|
+
marginTop: "8px"
|
|
19897
|
+
}
|
|
19898
|
+
}, "Download JSON") : null) : null);
|
|
19899
|
+
};
|
|
19900
|
+
return CollapsiblePreview;
|
|
19901
|
+
}(React.Component);
|
|
19902
|
+
|
|
19837
19903
|
var obdPids = [
|
|
19838
19904
|
{
|
|
19839
19905
|
service: "01",
|
|
@@ -22745,48 +22811,28 @@ var OBDTool = /*#__PURE__*/function (_React$Component) {
|
|
|
22745
22811
|
marginBottom: "15px",
|
|
22746
22812
|
marginTop: "10px"
|
|
22747
22813
|
}
|
|
22748
|
-
}, "When testing supported PIDs, make sure the ignition is on for 2 minutes before you connect the device. Let the device be connected for 5 minutes to perform the test."), mergedConfigValid === false && /*#__PURE__*/React.createElement("
|
|
22749
|
-
className: "red-text"
|
|
22814
|
+
}, "When testing supported PIDs, make sure the ignition is on for 2 minutes before you connect the device. Let the device be connected for 5 minutes to perform the test."), mergedConfigValid === false && /*#__PURE__*/React.createElement("div", {
|
|
22815
|
+
className: "red-text",
|
|
22816
|
+
style: {
|
|
22817
|
+
fontSize: "12px",
|
|
22818
|
+
marginBottom: "8px"
|
|
22819
|
+
}
|
|
22750
22820
|
}, /*#__PURE__*/React.createElement("i", {
|
|
22751
22821
|
className: "fa fa-times"
|
|
22752
22822
|
}), " Merged Configuration File is invalid"), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("button", {
|
|
22753
22823
|
className: "btn btn-primary",
|
|
22754
22824
|
onClick: this.onMerge,
|
|
22755
22825
|
disabled: !formData || Object.keys(formData).length === 0 || mergedConfigValid !== true
|
|
22756
|
-
}, "Merge files"), /*#__PURE__*/React.createElement(
|
|
22757
|
-
|
|
22758
|
-
|
|
22759
|
-
disabled: Object.keys(generatedConfig).length === 0,
|
|
22760
|
-
style: {
|
|
22761
|
-
marginLeft: "10px"
|
|
22762
|
-
}
|
|
22763
|
-
}, "Download JSON"))), Object.keys(generatedConfig).length > 0 && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("label", {
|
|
22764
|
-
style: {
|
|
22765
|
-
display: "flex",
|
|
22766
|
-
alignItems: "center",
|
|
22767
|
-
cursor: "pointer",
|
|
22768
|
-
fontSize: "12px",
|
|
22769
|
-
marginTop: "8px"
|
|
22770
|
-
}
|
|
22771
|
-
}, /*#__PURE__*/React.createElement("input", {
|
|
22772
|
-
type: "checkbox",
|
|
22773
|
-
checked: showPreview,
|
|
22774
|
-
onChange: function onChange() {
|
|
22826
|
+
}, "Merge files"))), Object.keys(generatedConfig).length > 0 && /*#__PURE__*/React.createElement(CollapsiblePreview, {
|
|
22827
|
+
open: showPreview,
|
|
22828
|
+
onToggle: function onToggle() {
|
|
22775
22829
|
return _this9.setState({
|
|
22776
22830
|
showPreview: !showPreview
|
|
22777
22831
|
});
|
|
22778
22832
|
},
|
|
22779
|
-
|
|
22780
|
-
|
|
22781
|
-
|
|
22782
|
-
}
|
|
22783
|
-
}), "Show partial config preview"), showPreview && /*#__PURE__*/React.createElement("div", {
|
|
22784
|
-
style: {
|
|
22785
|
-
marginTop: "10px"
|
|
22786
|
-
}
|
|
22787
|
-
}, /*#__PURE__*/React.createElement("pre", {
|
|
22788
|
-
className: "browse-file-preview"
|
|
22789
|
-
}, JSON.stringify(combinedConfig, null, 2))))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null)));
|
|
22833
|
+
data: combinedConfig,
|
|
22834
|
+
onDownload: this.onDownload
|
|
22835
|
+
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null)));
|
|
22790
22836
|
};
|
|
22791
22837
|
return OBDTool;
|
|
22792
22838
|
}(React.Component);
|
|
@@ -25645,11 +25691,7 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
25645
25691
|
className: "btn btn-primary",
|
|
25646
25692
|
onClick: _this10.onMerge,
|
|
25647
25693
|
disabled: !_this10.props.formData || Object.keys(_this10.props.formData).length === 0 || _this10.state.mergedConfigValid !== true || !isFirmwareSupported || !isDeviceSupported
|
|
25648
|
-
}, "Merge files"),
|
|
25649
|
-
className: "btn btn-default",
|
|
25650
|
-
onClick: _this10.onDownload,
|
|
25651
|
-
disabled: Object.keys(_this10.state.generatedFilterConfig).length === 0
|
|
25652
|
-
}, "Download JSON")), function () {
|
|
25694
|
+
}, "Merge files")), function () {
|
|
25653
25695
|
var mergeDisabled = !_this10.props.formData || Object.keys(_this10.props.formData).length === 0 || _this10.state.mergedConfigValid !== true || !isFirmwareSupported || !isDeviceSupported;
|
|
25654
25696
|
if (!mergeDisabled) return null;
|
|
25655
25697
|
var reason = "";
|
|
@@ -25672,41 +25714,16 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
25672
25714
|
}
|
|
25673
25715
|
}, reason) : null;
|
|
25674
25716
|
}());
|
|
25675
|
-
}(), Object.keys(_this10.state.generatedFilterConfig).length > 0 && /*#__PURE__*/React.createElement(
|
|
25676
|
-
|
|
25677
|
-
|
|
25678
|
-
}
|
|
25679
|
-
}, /*#__PURE__*/React.createElement("label", {
|
|
25680
|
-
style: {
|
|
25681
|
-
display: "flex",
|
|
25682
|
-
alignItems: "center",
|
|
25683
|
-
cursor: "pointer",
|
|
25684
|
-
fontSize: "12px"
|
|
25685
|
-
}
|
|
25686
|
-
}, /*#__PURE__*/React.createElement("input", {
|
|
25687
|
-
type: "checkbox",
|
|
25688
|
-
checked: _this10.state.showFilterPreview,
|
|
25689
|
-
onChange: function onChange() {
|
|
25717
|
+
}(), Object.keys(_this10.state.generatedFilterConfig).length > 0 && /*#__PURE__*/React.createElement(CollapsiblePreview, {
|
|
25718
|
+
open: _this10.state.showFilterPreview,
|
|
25719
|
+
onToggle: function onToggle() {
|
|
25690
25720
|
return _this10.setState({
|
|
25691
25721
|
showFilterPreview: !_this10.state.showFilterPreview
|
|
25692
25722
|
});
|
|
25693
25723
|
},
|
|
25694
|
-
|
|
25695
|
-
|
|
25696
|
-
|
|
25697
|
-
}
|
|
25698
|
-
}), "Show partial config preview"), _this10.state.showFilterPreview && /*#__PURE__*/React.createElement("div", {
|
|
25699
|
-
style: {
|
|
25700
|
-
marginTop: "10px"
|
|
25701
|
-
}
|
|
25702
|
-
}, /*#__PURE__*/React.createElement("pre", {
|
|
25703
|
-
className: "browse-file-preview",
|
|
25704
|
-
style: {
|
|
25705
|
-
maxHeight: "300px",
|
|
25706
|
-
overflow: "auto",
|
|
25707
|
-
fontSize: "11px"
|
|
25708
|
-
}
|
|
25709
|
-
}, JSON.stringify(_this10.state.generatedFilterConfig, null, 2)))));
|
|
25724
|
+
data: _this10.state.generatedFilterConfig,
|
|
25725
|
+
onDownload: _this10.onDownload
|
|
25726
|
+
}));
|
|
25710
25727
|
}()), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null)));
|
|
25711
25728
|
};
|
|
25712
25729
|
return FilterBuilderTool;
|