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