config-editor-base 3.0.4 → 3.0.6
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 +207 -113
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +207 -113
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1445,7 +1445,7 @@ var lodash = createCommonjsModule(function (module, exports) {
|
|
|
1445
1445
|
var undefined$1;
|
|
1446
1446
|
|
|
1447
1447
|
/** Used as the semantic version number. */
|
|
1448
|
-
var VERSION = '4.17.
|
|
1448
|
+
var VERSION = '4.17.23';
|
|
1449
1449
|
|
|
1450
1450
|
/** Used as the size to enable large array optimizations. */
|
|
1451
1451
|
var LARGE_ARRAY_SIZE = 200;
|
|
@@ -5199,7 +5199,7 @@ var lodash = createCommonjsModule(function (module, exports) {
|
|
|
5199
5199
|
if (isArray(iteratee)) {
|
|
5200
5200
|
return function(value) {
|
|
5201
5201
|
return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
|
|
5202
|
-
}
|
|
5202
|
+
};
|
|
5203
5203
|
}
|
|
5204
5204
|
return iteratee;
|
|
5205
5205
|
});
|
|
@@ -5803,8 +5803,47 @@ var lodash = createCommonjsModule(function (module, exports) {
|
|
|
5803
5803
|
*/
|
|
5804
5804
|
function baseUnset(object, path) {
|
|
5805
5805
|
path = castPath(path, object);
|
|
5806
|
-
|
|
5807
|
-
|
|
5806
|
+
|
|
5807
|
+
// Prevent prototype pollution, see: https://github.com/lodash/lodash/security/advisories/GHSA-xxjr-mmjv-4gpg
|
|
5808
|
+
var index = -1,
|
|
5809
|
+
length = path.length;
|
|
5810
|
+
|
|
5811
|
+
if (!length) {
|
|
5812
|
+
return true;
|
|
5813
|
+
}
|
|
5814
|
+
|
|
5815
|
+
var isRootPrimitive = object == null || (typeof object !== 'object' && typeof object !== 'function');
|
|
5816
|
+
|
|
5817
|
+
while (++index < length) {
|
|
5818
|
+
var key = path[index];
|
|
5819
|
+
|
|
5820
|
+
// skip non-string keys (e.g., Symbols, numbers)
|
|
5821
|
+
if (typeof key !== 'string') {
|
|
5822
|
+
continue;
|
|
5823
|
+
}
|
|
5824
|
+
|
|
5825
|
+
// Always block "__proto__" anywhere in the path if it's not expected
|
|
5826
|
+
if (key === '__proto__' && !hasOwnProperty.call(object, '__proto__')) {
|
|
5827
|
+
return false;
|
|
5828
|
+
}
|
|
5829
|
+
|
|
5830
|
+
// Block "constructor.prototype" chains
|
|
5831
|
+
if (key === 'constructor' &&
|
|
5832
|
+
(index + 1) < length &&
|
|
5833
|
+
typeof path[index + 1] === 'string' &&
|
|
5834
|
+
path[index + 1] === 'prototype') {
|
|
5835
|
+
|
|
5836
|
+
// Allow ONLY when the path starts at a primitive root, e.g., _.unset(0, 'constructor.prototype.a')
|
|
5837
|
+
if (isRootPrimitive && index === 0) {
|
|
5838
|
+
continue;
|
|
5839
|
+
}
|
|
5840
|
+
|
|
5841
|
+
return false;
|
|
5842
|
+
}
|
|
5843
|
+
}
|
|
5844
|
+
|
|
5845
|
+
var obj = parent(object, path);
|
|
5846
|
+
return obj == null || delete obj[toKey(last(path))];
|
|
5808
5847
|
}
|
|
5809
5848
|
|
|
5810
5849
|
/**
|
|
@@ -18995,8 +19034,18 @@ var EditorToolModalWrapper = /*#__PURE__*/function (_React$Component) {
|
|
|
18995
19034
|
var _proto = EditorToolModalWrapper.prototype;
|
|
18996
19035
|
_proto.render = function render() {
|
|
18997
19036
|
return /*#__PURE__*/React.createElement("div", {
|
|
18998
|
-
className:
|
|
18999
|
-
|
|
19037
|
+
className: classNames('tools-side-bar', {
|
|
19038
|
+
'tools-side-bar-expanded': this.props.isExpanded
|
|
19039
|
+
})
|
|
19040
|
+
}, this.props.name === 'filter-builder-modal' && /*#__PURE__*/React.createElement("button", {
|
|
19041
|
+
type: "button",
|
|
19042
|
+
className: "close expand-toggle",
|
|
19043
|
+
onClick: this.props.onToggleExpand
|
|
19044
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
19045
|
+
style: {
|
|
19046
|
+
color: "gray"
|
|
19047
|
+
}
|
|
19048
|
+
}, this.props.isExpanded ? "\xBB" : "\xAB")), /*#__PURE__*/React.createElement("button", {
|
|
19000
19049
|
type: "button",
|
|
19001
19050
|
className: "close",
|
|
19002
19051
|
onClick: this.props.onClick
|
|
@@ -19274,6 +19323,7 @@ var EditorSection = /*#__PURE__*/function (_React$Component) {
|
|
|
19274
19323
|
isDownloadConfig: false,
|
|
19275
19324
|
isCompareChanges: false,
|
|
19276
19325
|
activeSideBar: 'schema-modal',
|
|
19326
|
+
isSideBarExpanded: false,
|
|
19277
19327
|
showNewToolsHighlight: true
|
|
19278
19328
|
};
|
|
19279
19329
|
setTimeout(function () {
|
|
@@ -19281,6 +19331,7 @@ var EditorSection = /*#__PURE__*/function (_React$Component) {
|
|
|
19281
19331
|
showNewToolsHighlight: false
|
|
19282
19332
|
});
|
|
19283
19333
|
}, 10000);
|
|
19334
|
+
_this.toggleSideBarExpand = _this.toggleSideBarExpand.bind(_this);
|
|
19284
19335
|
_this.input = '';
|
|
19285
19336
|
_this.s3 = _this.props.fetchFileContentExt ? true : false;
|
|
19286
19337
|
return _this;
|
|
@@ -19296,11 +19347,17 @@ var EditorSection = /*#__PURE__*/function (_React$Component) {
|
|
|
19296
19347
|
var _this2 = this;
|
|
19297
19348
|
var sideBar = this.state.activeSideBar == name ? 'none' : name;
|
|
19298
19349
|
this.setState({
|
|
19299
|
-
activeSideBar: sideBar
|
|
19350
|
+
activeSideBar: sideBar,
|
|
19351
|
+
isSideBarExpanded: sideBar === 'none' ? false : this.state.isSideBarExpanded
|
|
19300
19352
|
}, function () {
|
|
19301
19353
|
_this2.props.setConfigContentPreSubmit();
|
|
19302
19354
|
});
|
|
19303
19355
|
};
|
|
19356
|
+
_proto.toggleSideBarExpand = function toggleSideBarExpand() {
|
|
19357
|
+
this.setState({
|
|
19358
|
+
isSideBarExpanded: !this.state.isSideBarExpanded
|
|
19359
|
+
});
|
|
19360
|
+
};
|
|
19304
19361
|
_proto.hideUischemaModal = function hideUischemaModal() {
|
|
19305
19362
|
this.setState({
|
|
19306
19363
|
showUischemaModal: false
|
|
@@ -19490,7 +19547,8 @@ var EditorSection = /*#__PURE__*/function (_React$Component) {
|
|
|
19490
19547
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
19491
19548
|
className: classNames({
|
|
19492
19549
|
'config-editor fe-header': true,
|
|
19493
|
-
'encryption-padding': this.state.activeSideBar != 'none'
|
|
19550
|
+
'encryption-padding': this.state.activeSideBar != 'none' && !this.state.isSideBarExpanded,
|
|
19551
|
+
'encryption-padding-expanded': this.state.activeSideBar != 'none' && this.state.isSideBarExpanded
|
|
19494
19552
|
})
|
|
19495
19553
|
}, /*#__PURE__*/React.createElement("header", {
|
|
19496
19554
|
className: "top-header-offline"
|
|
@@ -19502,9 +19560,12 @@ var EditorSection = /*#__PURE__*/function (_React$Component) {
|
|
|
19502
19560
|
}
|
|
19503
19561
|
}, /*#__PURE__*/React.createElement(EditorToolModalWrapper, {
|
|
19504
19562
|
modal: modal.modal,
|
|
19563
|
+
name: modal.name,
|
|
19505
19564
|
onClick: function onClick() {
|
|
19506
19565
|
return _this6.subMenuBtnClick('none');
|
|
19507
|
-
}
|
|
19566
|
+
},
|
|
19567
|
+
isExpanded: _this6.state.isSideBarExpanded,
|
|
19568
|
+
onToggleExpand: _this6.toggleSideBarExpand
|
|
19508
19569
|
}));
|
|
19509
19570
|
}), /*#__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("div", null, editorConfigFiles.length == 0 && this.props.demoMode == false ? /*#__PURE__*/React.createElement("div", {
|
|
19510
19571
|
className: "schema-loader-callout config-loader"
|
|
@@ -21760,6 +21821,8 @@ function parseSupportedPids(csvContent) {
|
|
|
21760
21821
|
var SUPPORTED_PIDS_QUERY_VALUES = [0x00, 0x20, 0x40, 0x60, 0x80, 0xA0, 0xC0];
|
|
21761
21822
|
var protocolsDetected = new Set();
|
|
21762
21823
|
var supportedPidsSet = new Set();
|
|
21824
|
+
var foundSupportedPidQueries = new Set();
|
|
21825
|
+
var rangesIndicatingMore = new Set();
|
|
21763
21826
|
for (var _iterator = _createForOfIteratorHelperLoose(relevantResponses), _step; !(_step = _iterator()).done;) {
|
|
21764
21827
|
var frame = _step.value;
|
|
21765
21828
|
var data = frame.dataBytes.toUpperCase();
|
|
@@ -21768,16 +21831,40 @@ function parseSupportedPids(csvContent) {
|
|
|
21768
21831
|
var pidRangeStart = parseInt(data.substring(4, 6), 16);
|
|
21769
21832
|
if (!SUPPORTED_PIDS_QUERY_VALUES.includes(pidRangeStart)) continue;
|
|
21770
21833
|
protocolsDetected.add('OBD2');
|
|
21834
|
+
foundSupportedPidQueries.add(pidRangeStart);
|
|
21771
21835
|
var supportBits = data.substring(6, 14);
|
|
21836
|
+
var bitmapValue = parseInt(supportBits, 16);
|
|
21837
|
+
if (bitmapValue & 1) {
|
|
21838
|
+
rangesIndicatingMore.add(pidRangeStart);
|
|
21839
|
+
}
|
|
21772
21840
|
extractSupportedPidsFromBitmap(pidRangeStart, supportBits, supportedPidsSet);
|
|
21773
21841
|
} else if (data.substring(2, 6) === '62F4') {
|
|
21774
21842
|
var _pidRangeStart = parseInt(data.substring(6, 8), 16);
|
|
21775
21843
|
if (!SUPPORTED_PIDS_QUERY_VALUES.includes(_pidRangeStart)) continue;
|
|
21776
21844
|
protocolsDetected.add('WWH-OBD');
|
|
21845
|
+
foundSupportedPidQueries.add(_pidRangeStart);
|
|
21777
21846
|
var _supportBits = data.substring(8, 16);
|
|
21847
|
+
var _bitmapValue = parseInt(_supportBits, 16);
|
|
21848
|
+
if (_bitmapValue & 1) {
|
|
21849
|
+
rangesIndicatingMore.add(_pidRangeStart);
|
|
21850
|
+
}
|
|
21778
21851
|
extractSupportedPidsFromBitmap(_pidRangeStart, _supportBits, supportedPidsSet);
|
|
21779
21852
|
}
|
|
21780
21853
|
}
|
|
21854
|
+
var missingSupportedPidQueries = [];
|
|
21855
|
+
if (foundSupportedPidQueries.size > 0) {
|
|
21856
|
+
if (!foundSupportedPidQueries.has(0x00)) {
|
|
21857
|
+
missingSupportedPidQueries.push('00');
|
|
21858
|
+
}
|
|
21859
|
+
var rangeChain = [0x00, 0x20, 0x40, 0x60, 0x80, 0xA0, 0xC0];
|
|
21860
|
+
for (var i = 0; i < rangeChain.length - 1; i++) {
|
|
21861
|
+
var currentRange = rangeChain[i];
|
|
21862
|
+
var nextRange = rangeChain[i + 1];
|
|
21863
|
+
if (rangesIndicatingMore.has(currentRange) && !foundSupportedPidQueries.has(nextRange)) {
|
|
21864
|
+
missingSupportedPidQueries.push(nextRange.toString(16).toUpperCase().padStart(2, '0'));
|
|
21865
|
+
}
|
|
21866
|
+
}
|
|
21867
|
+
}
|
|
21781
21868
|
var hasMixedProtocols = protocolsDetected.size > 1;
|
|
21782
21869
|
var protocol = protocolsDetected.size > 0 ? Array.from(protocolsDetected)[0] : null;
|
|
21783
21870
|
var supportedPids = Array.from(supportedPidsSet).sort(function (a, b) {
|
|
@@ -21796,7 +21883,8 @@ function parseSupportedPids(csvContent) {
|
|
|
21796
21883
|
hasMixedProtocols: hasMixedProtocols,
|
|
21797
21884
|
allProtocolsDetected: Array.from(protocolsDetected),
|
|
21798
21885
|
obd11BitCount: obd11BitResponses.length,
|
|
21799
|
-
obd29BitCount: obd29BitResponses.length
|
|
21886
|
+
obd29BitCount: obd29BitResponses.length,
|
|
21887
|
+
missingSupportedPidQueries: missingSupportedPidQueries
|
|
21800
21888
|
};
|
|
21801
21889
|
}
|
|
21802
21890
|
function extractSupportedPidsFromBitmap(rangeStart, bitmapHex, supportedSet) {
|
|
@@ -22077,7 +22165,13 @@ var OBDTool = /*#__PURE__*/function (_React$Component) {
|
|
|
22077
22165
|
stateUpdate.mixedWarning = null;
|
|
22078
22166
|
}
|
|
22079
22167
|
this.setState(stateUpdate);
|
|
22080
|
-
|
|
22168
|
+
var responseId = result.canIdType === '29bit' ? '18DAF1XX' : '7E8';
|
|
22169
|
+
var baseMessage = "Loaded " + result.totalFrames + " frames: " + result.supportedPids.length + " PIDs are supported with response CAN ID " + responseId + " and protocol " + (result.protocol || 'Unknown') + ".";
|
|
22170
|
+
if (result.missingSupportedPidQueries && result.missingSupportedPidQueries.length > 0) {
|
|
22171
|
+
this.props.showAlert("warning", baseMessage + "\n\nWarning: No response data was found for the following 'supported PID' PIDs: " + result.missingSupportedPidQueries.join(', ') + ".\n\nTo properly evaluate supported PIDs, use the mode 'Identify supported PIDs' to create your evaluation Configuration File.");
|
|
22172
|
+
} else {
|
|
22173
|
+
this.props.showAlert("success", baseMessage);
|
|
22174
|
+
}
|
|
22081
22175
|
} catch (e) {
|
|
22082
22176
|
this.props.showAlert("danger", "Error parsing CSV file: " + e.message);
|
|
22083
22177
|
}
|
|
@@ -24262,7 +24356,7 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
24262
24356
|
});
|
|
24263
24357
|
};
|
|
24264
24358
|
_proto.generateFilterConfig = function generateFilterConfig() {
|
|
24265
|
-
var
|
|
24359
|
+
var _this0 = this;
|
|
24266
24360
|
var _this$state6 = this.state,
|
|
24267
24361
|
mergedEntries = _this$state6.mergedEntries,
|
|
24268
24362
|
groupJ1939Pgns = _this$state6.groupJ1939Pgns,
|
|
@@ -24306,8 +24400,8 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
24306
24400
|
} else {
|
|
24307
24401
|
var count11Bit = 0;
|
|
24308
24402
|
var count29Bit = 0;
|
|
24309
|
-
for (var
|
|
24310
|
-
var entry =
|
|
24403
|
+
for (var _iterator0 = _createForOfIteratorHelperLoose(entries), _step0; !(_step0 = _iterator0()).done;) {
|
|
24404
|
+
var entry = _step0.value;
|
|
24311
24405
|
if (entry.isGroup && entry.groupedIds) {
|
|
24312
24406
|
count29Bit += 1;
|
|
24313
24407
|
} else if (entry.idInt > 0x7FF) {
|
|
@@ -24344,8 +24438,8 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
24344
24438
|
var configKey = channelToConfigKey[_channel];
|
|
24345
24439
|
if (!configKey) continue;
|
|
24346
24440
|
var filters = [];
|
|
24347
|
-
for (var
|
|
24348
|
-
var _entry4 =
|
|
24441
|
+
for (var _iterator1 = _createForOfIteratorHelperLoose(_entries), _step1; !(_step1 = _iterator1()).done;) {
|
|
24442
|
+
var _entry4 = _step1.value;
|
|
24349
24443
|
var prescaler_type = 0;
|
|
24350
24444
|
var prescaler_value = undefined;
|
|
24351
24445
|
var filterTypeValue = filterType === "rejection" ? 1 : 0;
|
|
@@ -24481,12 +24575,12 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
24481
24575
|
this.setState({
|
|
24482
24576
|
generatedFilterConfig: filterConfig
|
|
24483
24577
|
}, function () {
|
|
24484
|
-
|
|
24578
|
+
_this0.testMergedFile();
|
|
24485
24579
|
});
|
|
24486
24580
|
return filterConfig;
|
|
24487
24581
|
};
|
|
24488
24582
|
_proto.testMergedFile = function testMergedFile() {
|
|
24489
|
-
var
|
|
24583
|
+
var _this1 = this;
|
|
24490
24584
|
var _this$state7 = this.state,
|
|
24491
24585
|
generatedFilterConfig = _this$state7.generatedFilterConfig,
|
|
24492
24586
|
filterMergeMode = _this$state7.filterMergeMode;
|
|
@@ -24520,7 +24614,7 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
24520
24614
|
this.setState({
|
|
24521
24615
|
mergedConfig: mergedConfigTemp
|
|
24522
24616
|
}, function () {
|
|
24523
|
-
var schemaContent =
|
|
24617
|
+
var schemaContent = _this1.props.schemaContent;
|
|
24524
24618
|
if (schemaContent && mergedConfigTemp) {
|
|
24525
24619
|
try {
|
|
24526
24620
|
var ajv = new Ajv({
|
|
@@ -24533,12 +24627,12 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
24533
24627
|
if (!valid && validate.errors) {
|
|
24534
24628
|
console.log("AJV validation errors:", validate.errors);
|
|
24535
24629
|
}
|
|
24536
|
-
|
|
24630
|
+
_this1.setState({
|
|
24537
24631
|
mergedConfigValid: valid
|
|
24538
24632
|
});
|
|
24539
24633
|
} catch (e) {
|
|
24540
24634
|
console.log("AJV compilation/validation exception:", e);
|
|
24541
|
-
|
|
24635
|
+
_this1.setState({
|
|
24542
24636
|
mergedConfigValid: false
|
|
24543
24637
|
});
|
|
24544
24638
|
}
|
|
@@ -24605,8 +24699,8 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
24605
24699
|
var existing11Bit = 0;
|
|
24606
24700
|
var existing29Bit = 0;
|
|
24607
24701
|
if (formData[_configKey] && formData[_configKey].filter && formData[_configKey].filter.id) {
|
|
24608
|
-
for (var
|
|
24609
|
-
var filter =
|
|
24702
|
+
for (var _iterator10 = _createForOfIteratorHelperLoose(formData[_configKey].filter.id), _step10; !(_step10 = _iterator10()).done;) {
|
|
24703
|
+
var filter = _step10.value;
|
|
24610
24704
|
if (filter.id_format === 1) {
|
|
24611
24705
|
existing29Bit++;
|
|
24612
24706
|
} else {
|
|
@@ -24617,8 +24711,8 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
24617
24711
|
var new11Bit = 0;
|
|
24618
24712
|
var new29Bit = 0;
|
|
24619
24713
|
if (generatedFilterConfig[_configKey] && generatedFilterConfig[_configKey].filter && generatedFilterConfig[_configKey].filter.id) {
|
|
24620
|
-
for (var
|
|
24621
|
-
var _filter3 =
|
|
24714
|
+
for (var _iterator11 = _createForOfIteratorHelperLoose(generatedFilterConfig[_configKey].filter.id), _step11; !(_step11 = _iterator11()).done;) {
|
|
24715
|
+
var _filter3 = _step11.value;
|
|
24622
24716
|
if (_filter3.id_format === 1) {
|
|
24623
24717
|
new29Bit++;
|
|
24624
24718
|
} else {
|
|
@@ -24658,8 +24752,8 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
24658
24752
|
var filters = config.phy[channel].filter;
|
|
24659
24753
|
var seen = new Set();
|
|
24660
24754
|
var uniqueFilters = [];
|
|
24661
|
-
for (var
|
|
24662
|
-
var filter =
|
|
24755
|
+
for (var _iterator12 = _createForOfIteratorHelperLoose(filters), _step12; !(_step12 = _iterator12()).done;) {
|
|
24756
|
+
var filter = _step12.value;
|
|
24663
24757
|
var fieldsWithoutName = _objectWithoutPropertiesLoose(filter, _excluded);
|
|
24664
24758
|
var key = JSON.stringify(fieldsWithoutName);
|
|
24665
24759
|
if (!seen.has(key)) {
|
|
@@ -24680,8 +24774,8 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
24680
24774
|
var _filters = config[_channel3].filter.id;
|
|
24681
24775
|
var _seen = new Set();
|
|
24682
24776
|
var _uniqueFilters = [];
|
|
24683
|
-
for (var
|
|
24684
|
-
var _filter4 =
|
|
24777
|
+
for (var _iterator13 = _createForOfIteratorHelperLoose(_filters), _step13; !(_step13 = _iterator13()).done;) {
|
|
24778
|
+
var _filter4 = _step13.value;
|
|
24685
24779
|
var _fieldsWithoutName = _objectWithoutPropertiesLoose(_filter4, _excluded2);
|
|
24686
24780
|
var _key = JSON.stringify(_fieldsWithoutName);
|
|
24687
24781
|
if (!_seen.has(_key)) {
|
|
@@ -24777,15 +24871,15 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
24777
24871
|
});
|
|
24778
24872
|
};
|
|
24779
24873
|
_proto.render = function render() {
|
|
24780
|
-
var
|
|
24781
|
-
var _this$
|
|
24782
|
-
csvFileName = _this$
|
|
24783
|
-
dbcFileNames = _this$
|
|
24784
|
-
csvData = _this$
|
|
24785
|
-
mergedEntries = _this$
|
|
24786
|
-
searchQuery = _this$
|
|
24787
|
-
groupJ1939Pgns = _this$
|
|
24788
|
-
isLoading = _this$
|
|
24874
|
+
var _this10 = this;
|
|
24875
|
+
var _this$state0 = this.state,
|
|
24876
|
+
csvFileName = _this$state0.csvFileName,
|
|
24877
|
+
dbcFileNames = _this$state0.dbcFileNames,
|
|
24878
|
+
csvData = _this$state0.csvData,
|
|
24879
|
+
mergedEntries = _this$state0.mergedEntries,
|
|
24880
|
+
searchQuery = _this$state0.searchQuery,
|
|
24881
|
+
groupJ1939Pgns = _this$state0.groupJ1939Pgns,
|
|
24882
|
+
isLoading = _this$state0.isLoading;
|
|
24789
24883
|
var filteredEntries = this.getFilteredEntries();
|
|
24790
24884
|
var allFilteredSelected = filteredEntries.length > 0 && filteredEntries.every(function (e) {
|
|
24791
24885
|
return e.selected;
|
|
@@ -24816,7 +24910,7 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
24816
24910
|
}, /*#__PURE__*/React.createElement(Files, {
|
|
24817
24911
|
onChange: this.handleCsvUpload,
|
|
24818
24912
|
onError: function onError(error) {
|
|
24819
|
-
return
|
|
24913
|
+
return _this10.props.showAlert("danger", error.message);
|
|
24820
24914
|
},
|
|
24821
24915
|
accepts: [".csv"],
|
|
24822
24916
|
multiple: false,
|
|
@@ -24830,7 +24924,7 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
24830
24924
|
}, /*#__PURE__*/React.createElement(Files, {
|
|
24831
24925
|
onChange: this.handleDbcUpload,
|
|
24832
24926
|
onError: function onError(error) {
|
|
24833
|
-
return
|
|
24927
|
+
return _this10.props.showAlert("danger", error.message);
|
|
24834
24928
|
},
|
|
24835
24929
|
accepts: [".dbc"],
|
|
24836
24930
|
multiple: true,
|
|
@@ -24840,14 +24934,14 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
24840
24934
|
}, /*#__PURE__*/React.createElement("button", {
|
|
24841
24935
|
className: "btn btn-primary"
|
|
24842
24936
|
}, "Load DBC(s)"))), function () {
|
|
24843
|
-
var isFirmwareSupported =
|
|
24844
|
-
var isCanmod =
|
|
24845
|
-
var isCanmodRouter = isCanmod &&
|
|
24937
|
+
var isFirmwareSupported = _this10.isFirmwareVersionSupported();
|
|
24938
|
+
var isCanmod = _this10.props.deviceType === "CANmod";
|
|
24939
|
+
var isCanmodRouter = isCanmod && _this10.isCanmodRouter();
|
|
24846
24940
|
var isDeviceSupported = !isCanmod || isCanmodRouter;
|
|
24847
|
-
var hasConfig =
|
|
24941
|
+
var hasConfig = _this10.props.formData && Object.keys(_this10.props.formData).length > 0;
|
|
24848
24942
|
return /*#__PURE__*/React.createElement("button", {
|
|
24849
24943
|
className: "btn",
|
|
24850
|
-
onClick:
|
|
24944
|
+
onClick: _this10.onReset,
|
|
24851
24945
|
disabled: !hasConfig || !isFirmwareSupported || !isDeviceSupported,
|
|
24852
24946
|
style: {
|
|
24853
24947
|
backgroundColor: "#fff",
|
|
@@ -24881,10 +24975,10 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
24881
24975
|
type: "checkbox",
|
|
24882
24976
|
checked: groupJ1939Pgns,
|
|
24883
24977
|
onChange: function onChange() {
|
|
24884
|
-
|
|
24978
|
+
_this10.setState({
|
|
24885
24979
|
groupJ1939Pgns: !groupJ1939Pgns
|
|
24886
24980
|
}, function () {
|
|
24887
|
-
|
|
24981
|
+
_this10.mergeData();
|
|
24888
24982
|
});
|
|
24889
24983
|
},
|
|
24890
24984
|
style: {
|
|
@@ -24894,7 +24988,7 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
24894
24988
|
}), "Group 29-bit IDs as PGNs"), /*#__PURE__*/React.createElement("p", {
|
|
24895
24989
|
className: "field-description field-description-shift"
|
|
24896
24990
|
}, "In J1939/ISOBUS/NMEA protocol use cases it can be relevant to evaluate messages at the 18-bit PGN level instead of the 29-bit ID level.")), csvData && function () {
|
|
24897
|
-
var isEnabled =
|
|
24991
|
+
var isEnabled = _this10.props.formData && _this10.isFirmwareVersionSupported();
|
|
24898
24992
|
return /*#__PURE__*/React.createElement("div", {
|
|
24899
24993
|
className: "form-group pl0 field-string",
|
|
24900
24994
|
style: {
|
|
@@ -24911,9 +25005,9 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
24911
25005
|
}
|
|
24912
25006
|
}, /*#__PURE__*/React.createElement("input", {
|
|
24913
25007
|
type: "checkbox",
|
|
24914
|
-
checked:
|
|
25008
|
+
checked: _this10.state.showFilteredSummary,
|
|
24915
25009
|
onChange: function onChange() {
|
|
24916
|
-
return
|
|
25010
|
+
return _this10.toggleFilteredSummary();
|
|
24917
25011
|
},
|
|
24918
25012
|
disabled: !isEnabled,
|
|
24919
25013
|
style: {
|
|
@@ -24962,10 +25056,10 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
24962
25056
|
}, label, ":"), /*#__PURE__*/React.createElement("input", {
|
|
24963
25057
|
type: "text",
|
|
24964
25058
|
className: "form-control encryption-input",
|
|
24965
|
-
value:
|
|
25059
|
+
value: _this10.state["channelMap" + label],
|
|
24966
25060
|
onChange: function onChange(e) {
|
|
24967
|
-
var
|
|
24968
|
-
return
|
|
25061
|
+
var _this10$setState;
|
|
25062
|
+
return _this10.setState((_this10$setState = {}, _this10$setState["channelMap" + label] = e.target.value, _this10$setState));
|
|
24969
25063
|
},
|
|
24970
25064
|
style: {
|
|
24971
25065
|
width: "36px",
|
|
@@ -25081,11 +25175,11 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
25081
25175
|
marginLeft: "8px"
|
|
25082
25176
|
}
|
|
25083
25177
|
}, "Signals")), filteredEntries.map(function (entry) {
|
|
25084
|
-
var isChannelValid =
|
|
25178
|
+
var isChannelValid = _this10.props.deviceType === "CANmod" ? _this10.isChannelValid(entry.channel) : true;
|
|
25085
25179
|
return /*#__PURE__*/React.createElement("div", {
|
|
25086
25180
|
key: entry.uniqueId,
|
|
25087
25181
|
onClick: function onClick() {
|
|
25088
|
-
return isChannelValid &&
|
|
25182
|
+
return isChannelValid && _this10.handleEntryToggle(entry.uniqueId);
|
|
25089
25183
|
},
|
|
25090
25184
|
style: {
|
|
25091
25185
|
display: "flex",
|
|
@@ -25113,7 +25207,7 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
25113
25207
|
checked: entry.selected,
|
|
25114
25208
|
disabled: !isChannelValid,
|
|
25115
25209
|
onChange: function onChange() {
|
|
25116
|
-
return isChannelValid &&
|
|
25210
|
+
return isChannelValid && _this10.handleEntryToggle(entry.uniqueId);
|
|
25117
25211
|
}
|
|
25118
25212
|
}), /*#__PURE__*/React.createElement("span", null))), /*#__PURE__*/React.createElement("span", {
|
|
25119
25213
|
className: "binary-text-alt-2",
|
|
@@ -25150,7 +25244,7 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
25150
25244
|
display: "flex",
|
|
25151
25245
|
alignItems: "center"
|
|
25152
25246
|
}
|
|
25153
|
-
},
|
|
25247
|
+
}, _this10.renderBarChart(entry.isGroup ? entry.groupedPercentage : entry.percentage, maxPercentage), /*#__PURE__*/React.createElement("span", {
|
|
25154
25248
|
style: {
|
|
25155
25249
|
marginLeft: "4px",
|
|
25156
25250
|
fontFamily: "monospace",
|
|
@@ -25241,7 +25335,7 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
25241
25335
|
marginLeft: "4px"
|
|
25242
25336
|
},
|
|
25243
25337
|
onClick: function onClick() {
|
|
25244
|
-
return
|
|
25338
|
+
return _this10.selectTop(30);
|
|
25245
25339
|
}
|
|
25246
25340
|
}, "Top 30"), /*#__PURE__*/React.createElement("span", {
|
|
25247
25341
|
style: {
|
|
@@ -25254,7 +25348,7 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
25254
25348
|
cursor: "pointer"
|
|
25255
25349
|
},
|
|
25256
25350
|
onClick: function onClick() {
|
|
25257
|
-
return
|
|
25351
|
+
return _this10.selectTop(50);
|
|
25258
25352
|
}
|
|
25259
25353
|
}, "Top 50"), /*#__PURE__*/React.createElement("span", {
|
|
25260
25354
|
style: {
|
|
@@ -25267,7 +25361,7 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
25267
25361
|
cursor: "pointer"
|
|
25268
25362
|
},
|
|
25269
25363
|
onClick: function onClick() {
|
|
25270
|
-
return
|
|
25364
|
+
return _this10.selectMatched(true);
|
|
25271
25365
|
}
|
|
25272
25366
|
}, "Matched"), /*#__PURE__*/React.createElement("span", {
|
|
25273
25367
|
style: {
|
|
@@ -25280,13 +25374,13 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
25280
25374
|
cursor: "pointer"
|
|
25281
25375
|
},
|
|
25282
25376
|
onClick: function onClick() {
|
|
25283
|
-
return
|
|
25377
|
+
return _this10.selectMatched(false);
|
|
25284
25378
|
}
|
|
25285
25379
|
}, "Unmatched")), csvData && function () {
|
|
25286
|
-
var activeCsvData =
|
|
25287
|
-
var isFiltered =
|
|
25288
|
-
var originalFileSize =
|
|
25289
|
-
var filteredFileSize = isFiltered ? originalFileSize * (1 -
|
|
25380
|
+
var activeCsvData = _this10.state.showFilteredSummary && _this10.state.filteredCsvData ? _this10.state.filteredCsvData : csvData;
|
|
25381
|
+
var isFiltered = _this10.state.showFilteredSummary && _this10.state.filteredCsvData;
|
|
25382
|
+
var originalFileSize = _this10.csvFileSize / (1024 * 1024);
|
|
25383
|
+
var filteredFileSize = isFiltered ? originalFileSize * (1 - _this10.state.filterReductionPercent / 100) : originalFileSize;
|
|
25290
25384
|
return /*#__PURE__*/React.createElement("div", {
|
|
25291
25385
|
style: {
|
|
25292
25386
|
fontSize: "12px",
|
|
@@ -25313,7 +25407,7 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
25313
25407
|
color: "#5cb85c",
|
|
25314
25408
|
marginTop: "4px"
|
|
25315
25409
|
}
|
|
25316
|
-
}, "Showing filtered summary (reduction: ", /*#__PURE__*/React.createElement("strong", null,
|
|
25410
|
+
}, "Showing filtered summary (reduction: ", /*#__PURE__*/React.createElement("strong", null, _this10.state.filterReductionPercent.toFixed(1), "%"), ")"));
|
|
25317
25411
|
}(), function () {
|
|
25318
25412
|
var hasSelection = mergedEntries.some(function (e) {
|
|
25319
25413
|
return e.selected;
|
|
@@ -25339,10 +25433,10 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
25339
25433
|
}, /*#__PURE__*/React.createElement("div", {
|
|
25340
25434
|
className: "col-xs-6",
|
|
25341
25435
|
style: {
|
|
25342
|
-
opacity:
|
|
25343
|
-
pointerEvents:
|
|
25436
|
+
opacity: _this10.props.deviceType === "CANmod" ? 0.5 : 1,
|
|
25437
|
+
pointerEvents: _this10.props.deviceType === "CANmod" ? "none" : "auto"
|
|
25344
25438
|
},
|
|
25345
|
-
title:
|
|
25439
|
+
title: _this10.props.deviceType === "CANmod" ? "CANmod only supports acceptance filters" : ""
|
|
25346
25440
|
}, /*#__PURE__*/React.createElement(SimpleDropdown, {
|
|
25347
25441
|
name: "Type",
|
|
25348
25442
|
options: [{
|
|
@@ -25352,53 +25446,53 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
25352
25446
|
value: "rejection",
|
|
25353
25447
|
label: "Rejection"
|
|
25354
25448
|
}],
|
|
25355
|
-
value:
|
|
25449
|
+
value: _this10.state.filterType,
|
|
25356
25450
|
onChange: function onChange(opt) {
|
|
25357
|
-
return
|
|
25451
|
+
return _this10.setState({
|
|
25358
25452
|
filterType: opt.value
|
|
25359
25453
|
}, function () {
|
|
25360
|
-
return
|
|
25454
|
+
return _this10.generateFilterConfig();
|
|
25361
25455
|
});
|
|
25362
25456
|
}
|
|
25363
|
-
})),
|
|
25457
|
+
})), _this10.state.filterType === "acceptance" && /*#__PURE__*/React.createElement("div", {
|
|
25364
25458
|
className: "col-xs-6"
|
|
25365
25459
|
}, /*#__PURE__*/React.createElement(SimpleDropdown, {
|
|
25366
25460
|
name: "Prescaler",
|
|
25367
25461
|
options: prescalerOptions,
|
|
25368
|
-
value:
|
|
25462
|
+
value: _this10.state.prescalerType,
|
|
25369
25463
|
onChange: function onChange(opt) {
|
|
25370
|
-
return
|
|
25464
|
+
return _this10.setState({
|
|
25371
25465
|
prescalerType: opt.value
|
|
25372
25466
|
}, function () {
|
|
25373
|
-
return
|
|
25467
|
+
return _this10.generateFilterConfig();
|
|
25374
25468
|
});
|
|
25375
25469
|
}
|
|
25376
|
-
}))),
|
|
25470
|
+
}))), _this10.state.filterType === "acceptance" && _this10.state.prescalerType !== "none" && /*#__PURE__*/React.createElement("div", {
|
|
25377
25471
|
className: "form-group pl0 field-string"
|
|
25378
|
-
},
|
|
25472
|
+
}, _this10.state.prescalerType === "count" && "Count value", _this10.state.prescalerType === "time" && "Time interval (ms)", _this10.state.prescalerType === "data" && "Data mask (hex)", (_this10.state.prescalerType === "count" || _this10.state.prescalerType === "time") && /*#__PURE__*/React.createElement("input", {
|
|
25379
25473
|
type: "number",
|
|
25380
25474
|
className: "form-control encryption-input",
|
|
25381
25475
|
min: "1",
|
|
25382
|
-
max:
|
|
25383
|
-
value:
|
|
25476
|
+
max: _this10.state.prescalerType === "count" ? 256 : 4194304,
|
|
25477
|
+
value: _this10.state.prescalerValue,
|
|
25384
25478
|
onChange: function onChange(e) {
|
|
25385
|
-
return
|
|
25479
|
+
return _this10.setState({
|
|
25386
25480
|
prescalerValue: parseInt(e.target.value) || 1
|
|
25387
25481
|
}, function () {
|
|
25388
|
-
return
|
|
25482
|
+
return _this10.generateFilterConfig();
|
|
25389
25483
|
});
|
|
25390
25484
|
}
|
|
25391
|
-
}),
|
|
25485
|
+
}), _this10.state.prescalerType === "data" && /*#__PURE__*/React.createElement("input", {
|
|
25392
25486
|
type: "text",
|
|
25393
25487
|
className: "form-control encryption-input",
|
|
25394
|
-
value:
|
|
25488
|
+
value: _this10.state.dataPrescalerMask,
|
|
25395
25489
|
onChange: function onChange(e) {
|
|
25396
25490
|
var val = e.target.value.toUpperCase();
|
|
25397
25491
|
if (/^[a-fA-F0-9]*$/.test(val) && val.length <= 16) {
|
|
25398
|
-
|
|
25492
|
+
_this10.setState({
|
|
25399
25493
|
dataPrescalerMask: val
|
|
25400
25494
|
}, function () {
|
|
25401
|
-
return
|
|
25495
|
+
return _this10.generateFilterConfig();
|
|
25402
25496
|
});
|
|
25403
25497
|
}
|
|
25404
25498
|
},
|
|
@@ -25409,7 +25503,7 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
25409
25503
|
}
|
|
25410
25504
|
}), /*#__PURE__*/React.createElement("span", {
|
|
25411
25505
|
className: "field-description field-description-shift"
|
|
25412
|
-
},
|
|
25506
|
+
}, _this10.state.prescalerType === "count" && "Accept every Nth message (1-256)", _this10.state.prescalerType === "time" && "Minimum time between messages (1-4194304 ms)", _this10.state.prescalerType === "data" && "Hex mask for data change detection")), /*#__PURE__*/React.createElement("div", {
|
|
25413
25507
|
className: "form-group pl0 field-string",
|
|
25414
25508
|
style: {
|
|
25415
25509
|
marginBottom: "10px"
|
|
@@ -25432,12 +25526,12 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
25432
25526
|
type: "radio",
|
|
25433
25527
|
name: "filterMergeMode",
|
|
25434
25528
|
value: "replace",
|
|
25435
|
-
checked:
|
|
25529
|
+
checked: _this10.state.filterMergeMode === "replace",
|
|
25436
25530
|
onChange: function onChange(e) {
|
|
25437
|
-
return
|
|
25531
|
+
return _this10.setState({
|
|
25438
25532
|
filterMergeMode: e.target.value
|
|
25439
25533
|
}, function () {
|
|
25440
|
-
return
|
|
25534
|
+
return _this10.generateFilterConfig();
|
|
25441
25535
|
});
|
|
25442
25536
|
},
|
|
25443
25537
|
style: {
|
|
@@ -25460,12 +25554,12 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
25460
25554
|
type: "radio",
|
|
25461
25555
|
name: "filterMergeMode",
|
|
25462
25556
|
value: "append_top",
|
|
25463
|
-
checked:
|
|
25557
|
+
checked: _this10.state.filterMergeMode === "append_top",
|
|
25464
25558
|
onChange: function onChange(e) {
|
|
25465
|
-
return
|
|
25559
|
+
return _this10.setState({
|
|
25466
25560
|
filterMergeMode: e.target.value
|
|
25467
25561
|
}, function () {
|
|
25468
|
-
return
|
|
25562
|
+
return _this10.generateFilterConfig();
|
|
25469
25563
|
});
|
|
25470
25564
|
},
|
|
25471
25565
|
style: {
|
|
@@ -25488,12 +25582,12 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
25488
25582
|
type: "radio",
|
|
25489
25583
|
name: "filterMergeMode",
|
|
25490
25584
|
value: "append_bottom",
|
|
25491
|
-
checked:
|
|
25585
|
+
checked: _this10.state.filterMergeMode === "append_bottom",
|
|
25492
25586
|
onChange: function onChange(e) {
|
|
25493
|
-
return
|
|
25587
|
+
return _this10.setState({
|
|
25494
25588
|
filterMergeMode: e.target.value
|
|
25495
25589
|
}, function () {
|
|
25496
|
-
return
|
|
25590
|
+
return _this10.generateFilterConfig();
|
|
25497
25591
|
});
|
|
25498
25592
|
},
|
|
25499
25593
|
style: {
|
|
@@ -25529,9 +25623,9 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
25529
25623
|
}, 0);
|
|
25530
25624
|
return " (" + count11Bit + " 11-bit, " + count29Bit + " 29-bit) | " + sizePercent.toFixed(1) + "%";
|
|
25531
25625
|
}()), function () {
|
|
25532
|
-
var isFirmwareSupported =
|
|
25533
|
-
var isCanmod =
|
|
25534
|
-
var isCanmodRouter = isCanmod &&
|
|
25626
|
+
var isFirmwareSupported = _this10.isFirmwareVersionSupported();
|
|
25627
|
+
var isCanmod = _this10.props.deviceType === "CANmod";
|
|
25628
|
+
var isCanmodRouter = isCanmod && _this10.isCanmodRouter();
|
|
25535
25629
|
var minFirmware = isCanmod ? MIN_FIRMWARE_CANMOD_ROUTER : MIN_FIRMWARE_CANEDGE;
|
|
25536
25630
|
var isDeviceSupported = !isCanmod || isCanmodRouter;
|
|
25537
25631
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
@@ -25542,25 +25636,25 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
25542
25636
|
}
|
|
25543
25637
|
}, /*#__PURE__*/React.createElement("button", {
|
|
25544
25638
|
className: "btn btn-primary",
|
|
25545
|
-
onClick:
|
|
25546
|
-
disabled: !
|
|
25639
|
+
onClick: _this10.onMerge,
|
|
25640
|
+
disabled: !_this10.props.formData || Object.keys(_this10.props.formData).length === 0 || _this10.state.mergedConfigValid !== true || !isFirmwareSupported || !isDeviceSupported
|
|
25547
25641
|
}, "Merge files"), /*#__PURE__*/React.createElement("button", {
|
|
25548
25642
|
className: "btn btn-default",
|
|
25549
|
-
onClick:
|
|
25550
|
-
disabled: Object.keys(
|
|
25643
|
+
onClick: _this10.onDownload,
|
|
25644
|
+
disabled: Object.keys(_this10.state.generatedFilterConfig).length === 0
|
|
25551
25645
|
}, "Download JSON")), function () {
|
|
25552
|
-
var mergeDisabled = !
|
|
25646
|
+
var mergeDisabled = !_this10.props.formData || Object.keys(_this10.props.formData).length === 0 || _this10.state.mergedConfigValid !== true || !isFirmwareSupported || !isDeviceSupported;
|
|
25553
25647
|
if (!mergeDisabled) return null;
|
|
25554
25648
|
var reason = "";
|
|
25555
|
-
if (!
|
|
25649
|
+
if (!_this10.props.formData || Object.keys(_this10.props.formData).length === 0) {
|
|
25556
25650
|
reason = "No configuration file loaded";
|
|
25557
25651
|
} else if (!isDeviceSupported) {
|
|
25558
25652
|
reason = "Only CANmod.router is supported for CANmod devices";
|
|
25559
25653
|
} else if (!isFirmwareSupported) {
|
|
25560
25654
|
reason = "Merging requires firmware " + minFirmware + ".XX+ - please update your device";
|
|
25561
|
-
} else if (
|
|
25655
|
+
} else if (_this10.state.mergedConfigValid === "Unknown") {
|
|
25562
25656
|
reason = "No filters selected";
|
|
25563
|
-
} else if (
|
|
25657
|
+
} else if (_this10.state.mergedConfigValid === false) {
|
|
25564
25658
|
reason = "Generated filter configuration is invalid";
|
|
25565
25659
|
}
|
|
25566
25660
|
return reason ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -25571,7 +25665,7 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
25571
25665
|
}
|
|
25572
25666
|
}, reason) : null;
|
|
25573
25667
|
}());
|
|
25574
|
-
}(), Object.keys(
|
|
25668
|
+
}(), Object.keys(_this10.state.generatedFilterConfig).length > 0 && /*#__PURE__*/React.createElement("div", {
|
|
25575
25669
|
style: {
|
|
25576
25670
|
marginTop: "10px"
|
|
25577
25671
|
}
|
|
@@ -25584,17 +25678,17 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
25584
25678
|
}
|
|
25585
25679
|
}, /*#__PURE__*/React.createElement("input", {
|
|
25586
25680
|
type: "checkbox",
|
|
25587
|
-
checked:
|
|
25681
|
+
checked: _this10.state.showFilterPreview,
|
|
25588
25682
|
onChange: function onChange() {
|
|
25589
|
-
return
|
|
25590
|
-
showFilterPreview: !
|
|
25683
|
+
return _this10.setState({
|
|
25684
|
+
showFilterPreview: !_this10.state.showFilterPreview
|
|
25591
25685
|
});
|
|
25592
25686
|
},
|
|
25593
25687
|
style: {
|
|
25594
25688
|
marginRight: "6px",
|
|
25595
25689
|
marginBottom: "4px"
|
|
25596
25690
|
}
|
|
25597
|
-
}), "Show partial config preview"),
|
|
25691
|
+
}), "Show partial config preview"), _this10.state.showFilterPreview && /*#__PURE__*/React.createElement("div", {
|
|
25598
25692
|
style: {
|
|
25599
25693
|
marginTop: "10px"
|
|
25600
25694
|
}
|
|
@@ -25605,7 +25699,7 @@ var FilterBuilderTool = /*#__PURE__*/function (_React$Component) {
|
|
|
25605
25699
|
overflow: "auto",
|
|
25606
25700
|
fontSize: "11px"
|
|
25607
25701
|
}
|
|
25608
|
-
}, JSON.stringify(
|
|
25702
|
+
}, JSON.stringify(_this10.state.generatedFilterConfig, null, 2)))));
|
|
25609
25703
|
}()), /*#__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)));
|
|
25610
25704
|
};
|
|
25611
25705
|
return FilterBuilderTool;
|