lhcb-ntuple-wizard-test 1.1.13 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/components/ConfigDict.js +39 -38
  2. package/dist/components/ConfigList.js +33 -29
  3. package/dist/components/ConfigNode.js +134 -135
  4. package/dist/components/ConfigValue.js +22 -18
  5. package/dist/components/Dataset.js +7 -3
  6. package/dist/components/Decay.js +1 -2
  7. package/dist/components/DecayItem.js +49 -45
  8. package/dist/components/DecayTag.js +10 -7
  9. package/dist/components/DecayTree.js +149 -146
  10. package/dist/components/DecaysList.js +38 -35
  11. package/dist/components/DescriptorsSearch.js +192 -187
  12. package/dist/components/EventTypeBadge.js +9 -6
  13. package/dist/components/ItemSearch.js +15 -10
  14. package/dist/components/LinesTable.js +464 -462
  15. package/dist/components/NtupleWizard.js +32 -27
  16. package/dist/components/ParticleTag.js +10 -7
  17. package/dist/components/SearchItem.js +34 -31
  18. package/dist/components/SelectParticle.js +14 -10
  19. package/dist/components/SelectTag.js +10 -9
  20. package/dist/components/SelectTool.js +10 -9
  21. package/dist/components/SelectVariables.js +24 -22
  22. package/dist/components/StrippingBadge.js +10 -7
  23. package/dist/components/StrippingLine.js +8 -6
  24. package/dist/components/TupleTool.js +4 -3
  25. package/dist/components/VariablesSearch.js +15 -10
  26. package/dist/components/loki/LokiDict.js +64 -60
  27. package/dist/components/loki/LokiEditor.js +1 -2
  28. package/dist/components/loki/LokiForm.js +32 -28
  29. package/dist/{lib → components}/semantic.js +1 -3
  30. package/dist/components/semform.js +8 -6
  31. package/dist/{lib → components}/worker.js +1 -1
  32. package/dist/contexts/MetadataContext.js +8 -7
  33. package/dist/lib/DTTConfig.js +8 -8
  34. package/package.json +18 -19
@@ -9,7 +9,9 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var _reactBootstrap = require("react-bootstrap");
10
10
  var _jsxRuntime = require("react/jsx-runtime");
11
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- /*****************************************************************************\
12
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : 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); } /*****************************************************************************\
13
15
  * (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
14
16
  * *
15
17
  * This software is distributed under the terms of the GNU General Public *
@@ -18,54 +20,53 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
18
20
  * In applying this licence, CERN does not waive the privileges and immunities *
19
21
  * granted to it by virtue of its status as an Intergovernmental Organization *
20
22
  * or submit itself to any jurisdiction. *
21
- \*****************************************************************************/
22
-
23
- //import ConfigValue from "./ConfigValue";
24
-
23
+ \*****************************************************************************/ //import ConfigValue from "./ConfigValue";
25
24
  /*
26
25
  * {str:str} -> <ConfigDict /> multiple rows of <input type="text" /> <input type="text" />
27
26
  * {str:text} -> <ConfigDict /> multiple rows of <input type="text" /> <textarea />
28
- */
29
-
30
- /*
27
+ */ /*
31
28
  * Keys have to be unique and not empty...
32
29
  * this may cause problems if the callback is executed on every keystroke
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
30
+ */
31
+ class ConfigDict extends _react.default.Component {
32
+ constructor() {
33
+ super(...arguments);
34
+ _defineProperty(this, "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: ""
43
39
  });
44
- };
45
- handleSave = () => {
46
- try {
47
- const value = JSON.parse(this.state.value);
48
- this.props.callback(value);
40
+ _defineProperty(this, "toggleEdit", () => {
49
41
  this.setState({
50
- error: ""
42
+ edit: !this.state.edit
51
43
  });
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;
52
65
  this.setState({
53
- edit: false
54
- });
55
- } catch (e) {
56
- this.setState({
57
- error: `${e}`
66
+ value: value
58
67
  });
59
- }
60
- };
61
- handleUpdate = event => {
62
- const {
63
- value
64
- } = event.target;
65
- this.setState({
66
- value: value
67
68
  });
68
- };
69
+ }
69
70
  render() {
70
71
  const errorMessage = this.state.error ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.Alert, {
71
72
  variant: "danger",
@@ -11,7 +11,11 @@ var _reactBootstrap = require("react-bootstrap");
11
11
  var _reactBootstrapIcons = require("react-bootstrap-icons");
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
13
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
- /*****************************************************************************\
14
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
15
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
16
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
18
+ 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); } /*****************************************************************************\
15
19
  * (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
16
20
  * *
17
21
  * This software is distributed under the terms of the GNU General Public *
@@ -20,34 +24,36 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
20
24
  * In applying this licence, CERN does not waive the privileges and immunities *
21
25
  * granted to it by virtue of its status as an Intergovernmental Organization *
22
26
  * or submit itself to any jurisdiction. *
23
- \*****************************************************************************/
24
-
25
- /*
27
+ \*****************************************************************************/ /*
26
28
  * [int] -> <ConfigList /> multiple rows of <input type="number" step=1 />
27
29
  * [uint] -> <ConfigList /> multiple rows of <input type="number" step=1 min=0 />
28
30
  * [float] -> <ConfigList /> multiple rows of <input type="number" />
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
- };
31
+ */
32
+ class ConfigList extends _react.default.Component {
33
+ constructor() {
34
+ super(...arguments);
35
+ _defineProperty(this, "handleUpdate", index => value => {
36
+ let listValue = this.props.value;
37
+ listValue[index] = value;
38
+ this.props.callback(listValue);
39
+ });
40
+ _defineProperty(this, "handleAdd", () => {
41
+ let listValue = this.props.value;
42
+ const index = listValue.length;
43
+ if (index < this.props.defaultValue.length) {
44
+ const defaultValue = this.props.defaultValue[index].valueOf(); // Shallow copy
45
+ listValue.push(defaultValue);
46
+ } else {
47
+ listValue.push(0);
48
+ }
49
+ this.props.callback(listValue);
50
+ });
51
+ _defineProperty(this, "handleRemove", index => () => {
52
+ let listValue = this.props.value;
53
+ listValue.splice(index, 1);
54
+ this.props.callback(listValue);
55
+ });
56
+ }
51
57
  render() {
52
58
  const configurables = this.props.value.map((value, index) => {
53
59
  const configProps = {
@@ -60,9 +66,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
60
66
  }
61
67
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.ListGroup.Item, {
62
68
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactBootstrap.InputGroup, {
63
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ConfigValue.default, {
64
- ...configProps
65
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.CloseButton, {
69
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ConfigValue.default, _objectSpread({}, configProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.CloseButton, {
66
70
  onClick: this.handleRemove(index)
67
71
  })]
68
72
  })
@@ -18,7 +18,11 @@ var _reactBootstrapIcons = require("react-bootstrap-icons");
18
18
  var _MetadataContext = _interopRequireDefault(require("../contexts/MetadataContext"));
19
19
  var _jsxRuntime = require("react/jsx-runtime");
20
20
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
21
- /*****************************************************************************\
21
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
22
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
23
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
24
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
25
+ 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); } /*****************************************************************************\
22
26
  * (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
23
27
  * *
24
28
  * This software is distributed under the terms of the GNU General Public *
@@ -28,134 +32,135 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
28
32
  * granted to it by virtue of its status as an Intergovernmental Organization *
29
33
  * or submit itself to any jurisdiction. *
30
34
  \*****************************************************************************/
31
-
32
35
  class ParticleConfig extends _react.default.Component {
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({
36
+ constructor() {
37
+ super(...arguments);
38
+ _defineProperty(this, "state", {
39
+ dtt: this.props.dtt,
40
+ openAddTool: false,
41
+ openConfigTool: false,
42
+ expandedTool: {
43
+ tool: "",
44
+ open: false
45
+ },
60
46
  selectedToolClass: "",
61
47
  selectedToolName: ""
62
48
  });
63
- };
64
- handleRemoveTool = tool => () => {
65
- this.state.dtt.removeTool(this.props.particleID, tool);
66
- this.setState({
67
- dtt: this.state.dtt
68
- });
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
79
- });
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
49
+ _defineProperty(this, "handleOpen", type => () => {
50
+ this.setState({
51
+ ["open".concat(type, "Tool")]: true
52
+ });
88
53
  });
89
- if (signalUpdated) {
54
+ _defineProperty(this, "handleClose", type => () => {
55
+ this.setState({
56
+ ["open".concat(type, "Tool")]: false
57
+ });
58
+ this.clearSelectedTool();
59
+ this.props.parentCallbackClose();
90
60
  this.props.parentCallbackUpdated();
91
- }
92
- };
93
- setToolClass = option => {
94
- this.setState({
95
- selectedToolClass: option.value
96
61
  });
97
- };
98
- setToolName = _ref => {
99
- let {
100
- target
101
- } = _ref;
102
- this.setState({
103
- selectedToolName: target.value.replaceAll(/[^\w]/g, "")
104
- });
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);
62
+ _defineProperty(this, "clearSelectedTool", () => {
113
63
  this.setState({
114
- dtt: this.state.dtt,
115
64
  selectedToolClass: "",
116
65
  selectedToolName: ""
117
66
  });
67
+ });
68
+ _defineProperty(this, "handleRemoveTool", tool => () => {
69
+ this.state.dtt.removeTool(this.props.particleID, tool);
70
+ this.setState({
71
+ dtt: this.state.dtt
72
+ });
118
73
  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"
74
+ });
75
+ _defineProperty(this, "handleConfigTool", tool => () => {
76
+ const splitArr = tool.split("/");
77
+ const toolClass = splitArr[0];
78
+ const toolName = splitArr.length > 1 ? splitArr[1] : "";
79
+ this.setState({
80
+ openConfigTool: true,
81
+ selectedToolClass: toolClass,
82
+ selectedToolName: toolName
83
+ });
84
+ });
85
+ _defineProperty(this, "handleUpdateTool", (tool, parameter) => value => {
86
+ let parameters = this.state.dtt.getToolConfig(this.props.particleID, tool);
87
+ const signalUpdated = parameters[parameter] !== value;
88
+ parameters[parameter] = value;
89
+ this.state.dtt.configureTool(this.props.particleID, tool, parameters);
90
+ this.setState({
91
+ dtt: this.state.dtt
92
+ });
93
+ if (signalUpdated) {
94
+ this.props.parentCallbackUpdated();
95
+ }
96
+ });
97
+ _defineProperty(this, "setToolClass", option => {
98
+ this.setState({
99
+ selectedToolClass: option.value
100
+ });
101
+ });
102
+ _defineProperty(this, "setToolName", _ref => {
103
+ let {
104
+ target
105
+ } = _ref;
106
+ this.setState({
107
+ selectedToolName: target.value.replaceAll(/[^\w]/g, "")
108
+ });
109
+ });
110
+ _defineProperty(this, "handleAddTool", () => {
111
+ const {
112
+ selectedToolClass,
113
+ selectedToolName
114
+ } = this.state;
115
+ if (selectedToolClass) {
116
+ this.state.dtt.addTool(this.props.particleID, selectedToolClass, selectedToolName);
117
+ this.setState({
118
+ dtt: this.state.dtt,
119
+ selectedToolClass: "",
120
+ selectedToolName: ""
121
+ });
122
+ this.props.parentCallbackUpdated();
123
+ }
124
+ });
125
+ _defineProperty(this, "getSelectedTool", () => {
126
+ const {
127
+ selectedToolClass,
128
+ selectedToolName
129
+ } = this.state;
130
+ let selectedTool = selectedToolClass;
131
+ if (selectedToolName) {
132
+ selectedTool = "".concat(selectedToolClass, "/").concat(selectedToolName);
133
+ }
134
+ return selectedTool;
135
+ });
136
+ _defineProperty(this, "toolExists", () => {
137
+ const selectedTool = this.getSelectedTool();
138
+ return this.state.dtt.listTools(this.props.particleID).includes(selectedTool);
139
+ });
140
+ _defineProperty(this, "getParam", (tool, param) => {
141
+ const toolClass = tool.split("/")[0];
142
+ const toolInterface = this.context.metadata.tupleTools.tupleTools[toolClass].interface;
143
+ const paramInfo = toolInterface.filter(i => i.name === param);
144
+ if (paramInfo.length === 1) {
145
+ return paramInfo[0];
146
+ } else {
147
+ console.warn("Cannot find " + param + " in:");
148
+ console.warn(toolInterface);
149
+ return {
150
+ type: "str",
151
+ description: "Error loading description"
152
+ };
153
+ }
154
+ });
155
+ _defineProperty(this, "displayDoxygen", () => {
156
+ const html = {
157
+ __html: this.context.metadata.tupleTools.tupleTools[this.state.selectedToolClass].documentation
148
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
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
160
+ dangerouslySetInnerHTML: html
161
+ });
157
162
  });
158
- };
163
+ }
159
164
  render() {
160
165
  const toolList = this.state.dtt.listTools(this.props.particleID);
161
166
  const nTools = toolList.length;
@@ -218,12 +223,11 @@ class ParticleConfig extends _react.default.Component {
218
223
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactBootstrap.Modal.Body, {
219
224
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactBootstrap.InputGroup, {
220
225
  hasValidation: true,
221
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_SelectTool.default, {
226
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_SelectTool.default, _objectSpread({
222
227
  filterToolTags: this.props.filterToolTags,
223
228
  placeholder: "TupleTool class",
224
- onChange: this.setToolClass,
225
- ...selectToolProps
226
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.FormControl, {
229
+ onChange: this.setToolClass
230
+ }, selectToolProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.FormControl, {
227
231
  placeholder: "TupleTool name",
228
232
  onChange: this.setToolName,
229
233
  disabled: this.state.selectedToolClass === "",
@@ -252,9 +256,7 @@ class ParticleConfig extends _react.default.Component {
252
256
  children: [selectedTool ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.Form, {
253
257
  children: Object.entries(this.state.dtt.getToolConfig(this.props.particleID, selectedTool)).map(_ref2 => {
254
258
  let [param, value] = _ref2;
255
- const paramObj = {
256
- ...this.getParam(selectedTool, param)
257
- };
259
+ const paramObj = _objectSpread({}, this.getParam(selectedTool, param));
258
260
  const {
259
261
  description,
260
262
  type
@@ -267,21 +269,17 @@ class ParticleConfig extends _react.default.Component {
267
269
  defaultValue: defaultValue,
268
270
  callback: this.handleUpdateTool(selectedTool, param)
269
271
  };
270
- const inputBox = type.match(list_re) !== null ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ConfigList.default, {
271
- type: type.match(list_re)[1],
272
- ...configProps
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, {
272
+ const inputBox = type.match(list_re) !== null ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ConfigList.default, _objectSpread({
273
+ type: type.match(list_re)[1]
274
+ }, configProps)) : type.match(dict_re) !== null ? selectedTool.includes("LoKi__Hybrid__") ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_LokiDict.default, _objectSpread({
275
+ lokiVars: this.context.metadata.lokiVariables
276
+ }, configProps)) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ConfigDict.default, _objectSpread({
277
277
  keyType: type.match(dict_re)[1],
278
- valType: type.match(dict_re)[2],
279
- ...configProps
280
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ConfigValue.default, {
278
+ valType: type.match(dict_re)[2]
279
+ }, configProps)) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ConfigValue.default, _objectSpread({
281
280
  type: type,
282
- param: param,
283
- ...configProps
284
- });
281
+ param: param
282
+ }, configProps));
285
283
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactBootstrap.Form.Group, {
286
284
  as: _reactBootstrap.Row,
287
285
  className: "mb-2",
@@ -314,6 +312,7 @@ class ParticleConfig extends _react.default.Component {
314
312
  });
315
313
  }
316
314
  }
315
+ _defineProperty(ParticleConfig, "contextType", _MetadataContext.default);
317
316
  ParticleConfig.propTypes = {
318
317
  dtt: _propTypes.default.object,
319
318
  parentCallbackClose: _propTypes.default.func,
@@ -9,7 +9,11 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var _reactBootstrap = require("react-bootstrap");
10
10
  var _jsxRuntime = require("react/jsx-runtime");
11
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- /*****************************************************************************\
12
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
13
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
14
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
15
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : 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
17
  * (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
14
18
  * *
15
19
  * This software is distributed under the terms of the GNU General Public *
@@ -18,26 +22,28 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
18
22
  * In applying this licence, CERN does not waive the privileges and immunities *
19
23
  * granted to it by virtue of its status as an Intergovernmental Organization *
20
24
  * or submit itself to any jurisdiction. *
21
- \*****************************************************************************/
22
-
23
- /*
25
+ \*****************************************************************************/ /*
24
26
  * bool -> <input type="checkbox" />
25
27
  * int -> <input type="number" step=1 />
26
28
  * uint -> <input type="number" step=1 min=0 />
27
29
  * float -> <input type="number" />
28
30
  * str -> <input type="text" />
29
31
  * text -> <textarea />
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
- };
32
+ */
33
+ class ConfigValue extends _react.default.Component {
34
+ constructor() {
35
+ super(...arguments);
36
+ _defineProperty(this, "handleUpdate", event => {
37
+ const {
38
+ value
39
+ } = event.target;
40
+ 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;
41
+ this.props.callback(sanitisedValue);
42
+ });
43
+ _defineProperty(this, "handleCheck", () => {
44
+ this.props.callback(!this.props.value);
45
+ });
46
+ }
41
47
  render() {
42
48
  const inputType = {
43
49
  bool: "switch",
@@ -66,9 +72,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
66
72
  inputBoxProps.min = 0;
67
73
  }
68
74
  }
69
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.Form.Control, {
70
- ...inputBoxProps
71
- });
75
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.Form.Control, _objectSpread({}, inputBoxProps));
72
76
  }
73
77
  }
74
78
  }
@@ -14,7 +14,9 @@ var _EventTypeBadge = _interopRequireDefault(require("./EventTypeBadge"));
14
14
  var _BKPath = _interopRequireDefault(require("../lib/BKPath"));
15
15
  var _jsxRuntime = require("react/jsx-runtime");
16
16
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
17
- /*****************************************************************************\
17
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
18
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : 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); } /*****************************************************************************\
18
20
  * (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
19
21
  * *
20
22
  * This software is distributed under the terms of the GNU General Public *
@@ -24,9 +26,11 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
24
26
  * granted to it by virtue of its status as an Intergovernmental Organization *
25
27
  * or submit itself to any jurisdiction. *
26
28
  \*****************************************************************************/
27
-
28
29
  class Dataset extends _react.default.Component {
29
- path = (() => new _BKPath.default(this.props.path))();
30
+ constructor() {
31
+ super(...arguments);
32
+ _defineProperty(this, "path", new _BKPath.default(this.props.path));
33
+ }
30
34
  render() {
31
35
  const version = this.path.getStrippingVersion();
32
36
  const eventType = this.path.getEventType();
@@ -10,8 +10,7 @@ var _mathjaxReact = require("mathjax-react");
10
10
  var _reactBootstrap = require("react-bootstrap");
11
11
  var _jsxRuntime = require("react/jsx-runtime");
12
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
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 && {}.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; }
13
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
15
14
  /*****************************************************************************\
16
15
  * (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
17
16
  * *