lhcb-ntuple-wizard-test 1.0.5 → 1.0.7
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/components/App.js +1 -1
- package/dist/components/ConfigDict.js +39 -40
- package/dist/components/ConfigList.js +27 -31
- package/dist/components/ConfigNode.js +122 -121
- package/dist/components/ConfigValue.js +18 -21
- package/dist/components/Dataset.js +4 -8
- package/dist/components/Decay.js +2 -2
- package/dist/components/DecayItem.js +46 -50
- package/dist/components/DecayTag.js +4 -5
- package/dist/components/DecayTree.js +151 -151
- package/dist/components/DecaysList.js +35 -39
- package/dist/components/DeleteButton.js +1 -1
- package/dist/components/DescriptorsSearch.js +188 -192
- package/dist/components/EventTypeBadge.js +1 -1
- package/dist/components/ItemSearch.js +8 -12
- package/dist/components/LinesTable.js +463 -459
- package/dist/components/NtupleWizard.js +28 -32
- package/dist/components/ParticleTag.js +4 -5
- package/dist/components/PolarityBadge.js +1 -1
- package/dist/components/SearchItem.js +29 -33
- package/dist/components/SelectParticle.js +6 -10
- package/dist/components/SelectTag.js +5 -6
- package/dist/components/SelectTool.js +5 -6
- package/dist/components/SelectVariables.js +23 -24
- package/dist/components/StrippingBadge.js +4 -5
- package/dist/components/StrippingLine.js +2 -2
- package/dist/components/TupleTool.js +4 -5
- package/dist/components/VariablesSearch.js +8 -12
- package/dist/components/YearBadge.js +1 -1
- package/dist/components/loki/LokiDict.js +180 -0
- package/dist/components/loki/LokiEditor.js +200 -0
- package/dist/components/loki/LokiForm.js +112 -0
- package/dist/components/semantic.js +97 -0
- package/dist/components/semform.js +182 -0
- package/dist/components/worker.js +196 -0
- package/dist/config.json +4 -2
- package/dist/contexts/MetadataContext.js +2 -2
- package/dist/index.js +2 -2
- package/dist/lib/DTTConfig.js +13 -9
- package/dist/lib/utils.js +1 -1
- package/package.json +25 -2
package/dist/components/App.js
CHANGED
|
@@ -11,7 +11,7 @@ var _reactBootstrapIcons = require("react-bootstrap-icons");
|
|
|
11
11
|
var _config = _interopRequireDefault(require("../config"));
|
|
12
12
|
var _NtupleWizard = _interopRequireDefault(require("./NtupleWizard"));
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
-
function _interopRequireDefault(
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
15
|
/*****************************************************************************\
|
|
16
16
|
* (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
|
|
17
17
|
* *
|
|
@@ -8,10 +8,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
var _reactBootstrap = require("react-bootstrap");
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
function _interopRequireDefault(
|
|
12
|
-
|
|
13
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
14
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*****************************************************************************\
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
/*****************************************************************************\
|
|
15
13
|
* (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
|
|
16
14
|
* *
|
|
17
15
|
* This software is distributed under the terms of the GNU General Public *
|
|
@@ -20,53 +18,54 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
20
18
|
* In applying this licence, CERN does not waive the privileges and immunities *
|
|
21
19
|
* granted to it by virtue of its status as an Intergovernmental Organization *
|
|
22
20
|
* or submit itself to any jurisdiction. *
|
|
23
|
-
\*****************************************************************************/
|
|
21
|
+
\*****************************************************************************/
|
|
22
|
+
|
|
23
|
+
//import ConfigValue from "./ConfigValue";
|
|
24
|
+
|
|
24
25
|
/*
|
|
25
26
|
* {str:str} -> <ConfigDict /> multiple rows of <input type="text" /> <input type="text" />
|
|
26
27
|
* {str:text} -> <ConfigDict /> multiple rows of <input type="text" /> <textarea />
|
|
27
|
-
*/
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/*
|
|
28
31
|
* Keys have to be unique and not empty...
|
|
29
32
|
* this may cause problems if the callback is executed on every keystroke
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
*/class ConfigDict extends _react.default.Component {
|
|
34
|
+
state = (() => ({
|
|
35
|
+
value: JSON.stringify(this.props.value, null, 2),
|
|
36
|
+
// Object.keys(this.props.value).map((key) => [key, this.props.value[key].valueOf()]),
|
|
37
|
+
edit: false,
|
|
38
|
+
error: ""
|
|
39
|
+
}))();
|
|
40
|
+
toggleEdit = () => {
|
|
41
|
+
this.setState({
|
|
42
|
+
edit: !this.state.edit
|
|
39
43
|
});
|
|
40
|
-
|
|
44
|
+
};
|
|
45
|
+
handleSave = () => {
|
|
46
|
+
try {
|
|
47
|
+
const value = JSON.parse(this.state.value);
|
|
48
|
+
this.props.callback(value);
|
|
41
49
|
this.setState({
|
|
42
|
-
|
|
50
|
+
error: ""
|
|
43
51
|
});
|
|
44
|
-
});
|
|
45
|
-
_defineProperty(this, "handleSave", () => {
|
|
46
|
-
try {
|
|
47
|
-
const value = JSON.parse(this.state.value);
|
|
48
|
-
this.props.callback(value);
|
|
49
|
-
this.setState({
|
|
50
|
-
error: ""
|
|
51
|
-
});
|
|
52
|
-
this.setState({
|
|
53
|
-
edit: false
|
|
54
|
-
});
|
|
55
|
-
} catch (e) {
|
|
56
|
-
this.setState({
|
|
57
|
-
error: "".concat(e)
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
_defineProperty(this, "handleUpdate", event => {
|
|
62
|
-
const {
|
|
63
|
-
value
|
|
64
|
-
} = event.target;
|
|
65
52
|
this.setState({
|
|
66
|
-
|
|
53
|
+
edit: false
|
|
67
54
|
});
|
|
55
|
+
} catch (e) {
|
|
56
|
+
this.setState({
|
|
57
|
+
error: `${e}`
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
handleUpdate = event => {
|
|
62
|
+
const {
|
|
63
|
+
value
|
|
64
|
+
} = event.target;
|
|
65
|
+
this.setState({
|
|
66
|
+
value: value
|
|
68
67
|
});
|
|
69
|
-
}
|
|
68
|
+
};
|
|
70
69
|
render() {
|
|
71
70
|
const errorMessage = this.state.error ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.Alert, {
|
|
72
71
|
variant: "danger",
|
|
@@ -10,10 +10,8 @@ var _ConfigValue = _interopRequireDefault(require("./ConfigValue"));
|
|
|
10
10
|
var _reactBootstrap = require("react-bootstrap");
|
|
11
11
|
var _reactBootstrapIcons = require("react-bootstrap-icons");
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
function _interopRequireDefault(
|
|
14
|
-
|
|
15
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
16
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*****************************************************************************\
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
/*****************************************************************************\
|
|
17
15
|
* (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
|
|
18
16
|
* *
|
|
19
17
|
* This software is distributed under the terms of the GNU General Public *
|
|
@@ -22,36 +20,34 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
22
20
|
* In applying this licence, CERN does not waive the privileges and immunities *
|
|
23
21
|
* granted to it by virtue of its status as an Intergovernmental Organization *
|
|
24
22
|
* or submit itself to any jurisdiction. *
|
|
25
|
-
\*****************************************************************************/
|
|
23
|
+
\*****************************************************************************/
|
|
24
|
+
|
|
25
|
+
/*
|
|
26
26
|
* [int] -> <ConfigList /> multiple rows of <input type="number" step=1 />
|
|
27
27
|
* [uint] -> <ConfigList /> multiple rows of <input type="number" step=1 min=0 />
|
|
28
28
|
* [float] -> <ConfigList /> multiple rows of <input type="number" />
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
listValue.splice(index, 1);
|
|
52
|
-
this.props.callback(listValue);
|
|
53
|
-
});
|
|
54
|
-
}
|
|
29
|
+
*/class ConfigList extends _react.default.Component {
|
|
30
|
+
handleUpdate = index => value => {
|
|
31
|
+
let listValue = this.props.value;
|
|
32
|
+
listValue[index] = value;
|
|
33
|
+
this.props.callback(listValue);
|
|
34
|
+
};
|
|
35
|
+
handleAdd = () => {
|
|
36
|
+
let listValue = this.props.value;
|
|
37
|
+
const index = listValue.length;
|
|
38
|
+
if (index < this.props.defaultValue.length) {
|
|
39
|
+
const defaultValue = this.props.defaultValue[index].valueOf(); // Shallow copy
|
|
40
|
+
listValue.push(defaultValue);
|
|
41
|
+
} else {
|
|
42
|
+
listValue.push(0);
|
|
43
|
+
}
|
|
44
|
+
this.props.callback(listValue);
|
|
45
|
+
};
|
|
46
|
+
handleRemove = index => () => {
|
|
47
|
+
let listValue = this.props.value;
|
|
48
|
+
listValue.splice(index, 1);
|
|
49
|
+
this.props.callback(listValue);
|
|
50
|
+
};
|
|
55
51
|
render() {
|
|
56
52
|
const configurables = this.props.value.map((value, index) => {
|
|
57
53
|
const configProps = {
|
|
@@ -12,14 +12,13 @@ var _ConfigValue = _interopRequireDefault(require("./ConfigValue"));
|
|
|
12
12
|
var _ConfigList = _interopRequireDefault(require("./ConfigList"));
|
|
13
13
|
var _ConfigDict = _interopRequireDefault(require("./ConfigDict"));
|
|
14
14
|
var _DeleteButton = _interopRequireDefault(require("./DeleteButton"));
|
|
15
|
+
var _LokiDict = _interopRequireDefault(require("./loki/LokiDict"));
|
|
15
16
|
var _reactBootstrap = require("react-bootstrap");
|
|
16
17
|
var _reactBootstrapIcons = require("react-bootstrap-icons");
|
|
17
18
|
var _MetadataContext = _interopRequireDefault(require("../contexts/MetadataContext"));
|
|
18
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
function _interopRequireDefault(
|
|
20
|
-
|
|
21
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
22
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*****************************************************************************\
|
|
20
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
21
|
+
/*****************************************************************************\
|
|
23
22
|
* (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
|
|
24
23
|
* *
|
|
25
24
|
* This software is distributed under the terms of the GNU General Public *
|
|
@@ -29,135 +28,134 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
29
28
|
* granted to it by virtue of its status as an Intergovernmental Organization *
|
|
30
29
|
* or submit itself to any jurisdiction. *
|
|
31
30
|
\*****************************************************************************/
|
|
31
|
+
|
|
32
32
|
class ParticleConfig extends _react.default.Component {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
33
|
+
static contextType = (() => _MetadataContext.default)();
|
|
34
|
+
state = {
|
|
35
|
+
dtt: this.props.dtt,
|
|
36
|
+
openAddTool: false,
|
|
37
|
+
openConfigTool: false,
|
|
38
|
+
expandedTool: {
|
|
39
|
+
tool: "",
|
|
40
|
+
open: false
|
|
41
|
+
},
|
|
42
|
+
selectedToolClass: "",
|
|
43
|
+
selectedToolName: ""
|
|
44
|
+
};
|
|
45
|
+
handleOpen = type => () => {
|
|
46
|
+
this.setState({
|
|
47
|
+
[`open${type}Tool`]: true
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
handleClose = type => () => {
|
|
51
|
+
this.setState({
|
|
52
|
+
[`open${type}Tool`]: false
|
|
53
|
+
});
|
|
54
|
+
this.clearSelectedTool();
|
|
55
|
+
this.props.parentCallbackClose();
|
|
56
|
+
this.props.parentCallbackUpdated();
|
|
57
|
+
};
|
|
58
|
+
clearSelectedTool = () => {
|
|
59
|
+
this.setState({
|
|
43
60
|
selectedToolClass: "",
|
|
44
61
|
selectedToolName: ""
|
|
45
62
|
});
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
63
|
+
};
|
|
64
|
+
handleRemoveTool = tool => () => {
|
|
65
|
+
this.state.dtt.removeTool(this.props.particleID, tool);
|
|
66
|
+
this.setState({
|
|
67
|
+
dtt: this.state.dtt
|
|
50
68
|
});
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
69
|
+
this.props.parentCallbackUpdated();
|
|
70
|
+
};
|
|
71
|
+
handleConfigTool = tool => () => {
|
|
72
|
+
const splitArr = tool.split("/");
|
|
73
|
+
const toolClass = splitArr[0];
|
|
74
|
+
const toolName = splitArr.length > 1 ? splitArr[1] : "";
|
|
75
|
+
this.setState({
|
|
76
|
+
openConfigTool: true,
|
|
77
|
+
selectedToolClass: toolClass,
|
|
78
|
+
selectedToolName: toolName
|
|
58
79
|
});
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
80
|
+
};
|
|
81
|
+
handleUpdateTool = (tool, parameter) => value => {
|
|
82
|
+
let parameters = this.state.dtt.getToolConfig(this.props.particleID, tool);
|
|
83
|
+
const signalUpdated = parameters[parameter] !== value;
|
|
84
|
+
parameters[parameter] = value;
|
|
85
|
+
this.state.dtt.configureTool(this.props.particleID, tool, parameters);
|
|
86
|
+
this.setState({
|
|
87
|
+
dtt: this.state.dtt
|
|
64
88
|
});
|
|
65
|
-
|
|
66
|
-
this.state.dtt.removeTool(this.props.particleID, tool);
|
|
67
|
-
this.setState({
|
|
68
|
-
dtt: this.state.dtt
|
|
69
|
-
});
|
|
89
|
+
if (signalUpdated) {
|
|
70
90
|
this.props.parentCallbackUpdated();
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
setToolClass = option => {
|
|
94
|
+
this.setState({
|
|
95
|
+
selectedToolClass: option.value
|
|
71
96
|
});
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
selectedToolName: toolName
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
_defineProperty(this, "handleUpdateTool", (tool, parameter) => value => {
|
|
83
|
-
let parameters = this.state.dtt.getToolConfig(this.props.particleID, tool);
|
|
84
|
-
const signalUpdated = parameters[parameter] !== value;
|
|
85
|
-
parameters[parameter] = value;
|
|
86
|
-
this.state.dtt.configureTool(this.props.particleID, tool, parameters);
|
|
87
|
-
this.setState({
|
|
88
|
-
dtt: this.state.dtt
|
|
89
|
-
});
|
|
90
|
-
if (signalUpdated) {
|
|
91
|
-
this.props.parentCallbackUpdated();
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
_defineProperty(this, "setToolClass", option => {
|
|
95
|
-
this.setState({
|
|
96
|
-
selectedToolClass: option.value
|
|
97
|
-
});
|
|
97
|
+
};
|
|
98
|
+
setToolName = _ref => {
|
|
99
|
+
let {
|
|
100
|
+
target
|
|
101
|
+
} = _ref;
|
|
102
|
+
this.setState({
|
|
103
|
+
selectedToolName: target.value.replaceAll(/[^\w]/g, "")
|
|
98
104
|
});
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
105
|
+
};
|
|
106
|
+
handleAddTool = () => {
|
|
107
|
+
const {
|
|
108
|
+
selectedToolClass,
|
|
109
|
+
selectedToolName
|
|
110
|
+
} = this.state;
|
|
111
|
+
if (selectedToolClass) {
|
|
112
|
+
this.state.dtt.addTool(this.props.particleID, selectedToolClass, selectedToolName);
|
|
103
113
|
this.setState({
|
|
104
|
-
|
|
114
|
+
dtt: this.state.dtt,
|
|
115
|
+
selectedToolClass: "",
|
|
116
|
+
selectedToolName: ""
|
|
105
117
|
});
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
});
|
|
137
|
-
_defineProperty(this, "getParam", (tool, param) => {
|
|
138
|
-
const toolClass = tool.split("/")[0];
|
|
139
|
-
const toolInterface = this.context.metadata.tupleTools.tupleTools[toolClass].interface;
|
|
140
|
-
const paramInfo = toolInterface.filter(i => i.name === param);
|
|
141
|
-
if (paramInfo.length === 1) {
|
|
142
|
-
return paramInfo[0];
|
|
143
|
-
} else {
|
|
144
|
-
console.warn("Cannot find " + param + " in:");
|
|
145
|
-
console.warn(toolInterface);
|
|
146
|
-
return {
|
|
147
|
-
type: "str",
|
|
148
|
-
description: "Error loading description"
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
_defineProperty(this, "displayDoxygen", () => {
|
|
153
|
-
const html = {
|
|
154
|
-
__html: this.context.metadata.tupleTools.tupleTools[this.state.selectedToolClass].documentation
|
|
118
|
+
this.props.parentCallbackUpdated();
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
getSelectedTool = () => {
|
|
122
|
+
const {
|
|
123
|
+
selectedToolClass,
|
|
124
|
+
selectedToolName
|
|
125
|
+
} = this.state;
|
|
126
|
+
let selectedTool = selectedToolClass;
|
|
127
|
+
if (selectedToolName) {
|
|
128
|
+
selectedTool = `${selectedToolClass}/${selectedToolName}`;
|
|
129
|
+
}
|
|
130
|
+
return selectedTool;
|
|
131
|
+
};
|
|
132
|
+
toolExists = () => {
|
|
133
|
+
const selectedTool = this.getSelectedTool();
|
|
134
|
+
return this.state.dtt.listTools(this.props.particleID).includes(selectedTool);
|
|
135
|
+
};
|
|
136
|
+
getParam = (tool, param) => {
|
|
137
|
+
const toolClass = tool.split("/")[0];
|
|
138
|
+
const toolInterface = this.context.metadata.tupleTools.tupleTools[toolClass].interface;
|
|
139
|
+
const paramInfo = toolInterface.filter(i => i.name === param);
|
|
140
|
+
if (paramInfo.length === 1) {
|
|
141
|
+
return paramInfo[0];
|
|
142
|
+
} else {
|
|
143
|
+
console.warn("Cannot find " + param + " in:");
|
|
144
|
+
console.warn(toolInterface);
|
|
145
|
+
return {
|
|
146
|
+
type: "str",
|
|
147
|
+
description: "Error loading description"
|
|
155
148
|
};
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
displayDoxygen = () => {
|
|
152
|
+
const html = {
|
|
153
|
+
__html: this.context.metadata.tupleTools.tupleTools[this.state.selectedToolClass].documentation
|
|
154
|
+
};
|
|
155
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
156
|
+
dangerouslySetInnerHTML: html
|
|
159
157
|
});
|
|
160
|
-
}
|
|
158
|
+
};
|
|
161
159
|
render() {
|
|
162
160
|
const toolList = this.state.dtt.listTools(this.props.particleID);
|
|
163
161
|
const nTools = toolList.length;
|
|
@@ -272,12 +270,16 @@ class ParticleConfig extends _react.default.Component {
|
|
|
272
270
|
const inputBox = type.match(list_re) !== null ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ConfigList.default, {
|
|
273
271
|
type: type.match(list_re)[1],
|
|
274
272
|
...configProps
|
|
275
|
-
}) : type.match(dict_re) !== null ? /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
273
|
+
}) : type.match(dict_re) !== null ? selectedTool.includes("LoKi__Hybrid__") ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_LokiDict.default, {
|
|
274
|
+
lokiVars: this.context.metadata.lokiVariables,
|
|
275
|
+
...configProps
|
|
276
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ConfigDict.default, {
|
|
276
277
|
keyType: type.match(dict_re)[1],
|
|
277
278
|
valType: type.match(dict_re)[2],
|
|
278
279
|
...configProps
|
|
279
280
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ConfigValue.default, {
|
|
280
281
|
type: type,
|
|
282
|
+
param: param,
|
|
281
283
|
...configProps
|
|
282
284
|
});
|
|
283
285
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactBootstrap.Form.Group, {
|
|
@@ -312,7 +314,6 @@ class ParticleConfig extends _react.default.Component {
|
|
|
312
314
|
});
|
|
313
315
|
}
|
|
314
316
|
}
|
|
315
|
-
_defineProperty(ParticleConfig, "contextType", _MetadataContext.default);
|
|
316
317
|
ParticleConfig.propTypes = {
|
|
317
318
|
dtt: _propTypes.default.object,
|
|
318
319
|
parentCallbackClose: _propTypes.default.func,
|
|
@@ -8,10 +8,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
var _reactBootstrap = require("react-bootstrap");
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
function _interopRequireDefault(
|
|
12
|
-
|
|
13
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
14
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*****************************************************************************\
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
/*****************************************************************************\
|
|
15
13
|
* (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
|
|
16
14
|
* *
|
|
17
15
|
* This software is distributed under the terms of the GNU General Public *
|
|
@@ -20,28 +18,26 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
20
18
|
* In applying this licence, CERN does not waive the privileges and immunities *
|
|
21
19
|
* granted to it by virtue of its status as an Intergovernmental Organization *
|
|
22
20
|
* or submit itself to any jurisdiction. *
|
|
23
|
-
\*****************************************************************************/
|
|
21
|
+
\*****************************************************************************/
|
|
22
|
+
|
|
23
|
+
/*
|
|
24
24
|
* bool -> <input type="checkbox" />
|
|
25
25
|
* int -> <input type="number" step=1 />
|
|
26
26
|
* uint -> <input type="number" step=1 min=0 />
|
|
27
27
|
* float -> <input type="number" />
|
|
28
28
|
* str -> <input type="text" />
|
|
29
29
|
* text -> <textarea />
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
_defineProperty(this, "handleCheck", () => {
|
|
42
|
-
this.props.callback(!this.props.value);
|
|
43
|
-
});
|
|
44
|
-
}
|
|
30
|
+
*/class ConfigValue extends _react.default.Component {
|
|
31
|
+
handleUpdate = event => {
|
|
32
|
+
const {
|
|
33
|
+
value
|
|
34
|
+
} = event.target;
|
|
35
|
+
const sanitisedValue = this.props.type === "int" ? Math.trunc(value) : this.props.type === "uint" ? Math.trunc(Math.abs(value)) : this.props.type === "text" ? value.split(/\r?\n/) : this.props.param === "ExtraName" ? value.replaceAll(/[^\w]/g, "") : value;
|
|
36
|
+
this.props.callback(sanitisedValue);
|
|
37
|
+
};
|
|
38
|
+
handleCheck = () => {
|
|
39
|
+
this.props.callback(!this.props.value);
|
|
40
|
+
};
|
|
45
41
|
render() {
|
|
46
42
|
const inputType = {
|
|
47
43
|
bool: "switch",
|
|
@@ -80,6 +76,7 @@ ConfigValue.propTypes = {
|
|
|
80
76
|
type: _propTypes.default.string,
|
|
81
77
|
callback: _propTypes.default.func,
|
|
82
78
|
value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.bool, _propTypes.default.number, _propTypes.default.arrayOf(_propTypes.default.string)]),
|
|
83
|
-
defaultValue: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.bool, _propTypes.default.number, _propTypes.default.arrayOf(_propTypes.default.string)])
|
|
79
|
+
defaultValue: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.bool, _propTypes.default.number, _propTypes.default.arrayOf(_propTypes.default.string)]),
|
|
80
|
+
param: _propTypes.default.string
|
|
84
81
|
};
|
|
85
82
|
var _default = exports.default = ConfigValue;
|
|
@@ -13,10 +13,8 @@ var _StrippingBadge = _interopRequireDefault(require("./StrippingBadge"));
|
|
|
13
13
|
var _EventTypeBadge = _interopRequireDefault(require("./EventTypeBadge"));
|
|
14
14
|
var _BKPath = _interopRequireDefault(require("../lib/BKPath"));
|
|
15
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
-
function _interopRequireDefault(
|
|
17
|
-
|
|
18
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
19
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*****************************************************************************\
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
+
/*****************************************************************************\
|
|
20
18
|
* (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
|
|
21
19
|
* *
|
|
22
20
|
* This software is distributed under the terms of the GNU General Public *
|
|
@@ -26,11 +24,9 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
26
24
|
* granted to it by virtue of its status as an Intergovernmental Organization *
|
|
27
25
|
* or submit itself to any jurisdiction. *
|
|
28
26
|
\*****************************************************************************/
|
|
27
|
+
|
|
29
28
|
class Dataset extends _react.default.Component {
|
|
30
|
-
|
|
31
|
-
super(...arguments);
|
|
32
|
-
_defineProperty(this, "path", new _BKPath.default(this.props.path));
|
|
33
|
-
}
|
|
29
|
+
path = (() => new _BKPath.default(this.props.path))();
|
|
34
30
|
render() {
|
|
35
31
|
const version = this.path.getStrippingVersion();
|
|
36
32
|
const eventType = this.path.getEventType();
|
package/dist/components/Decay.js
CHANGED
|
@@ -9,9 +9,9 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
9
9
|
var _mathjaxReact = require("mathjax-react");
|
|
10
10
|
var _reactBootstrap = require("react-bootstrap");
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
-
function _interopRequireDefault(
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
13
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
14
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
14
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
15
|
/*****************************************************************************\
|
|
16
16
|
* (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
|
|
17
17
|
* *
|