lhcb-ntuple-wizard-test 1.1.14 → 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 (35) hide show
  1. package/dist/components/ConfigDict.js +39 -38
  2. package/dist/components/ConfigList.js +33 -29
  3. package/dist/components/ConfigNode.js +135 -132
  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 +153 -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 +184 -0
  27. package/dist/components/loki/LokiEditor.js +199 -0
  28. package/dist/components/loki/LokiForm.js +116 -0
  29. package/dist/components/semantic.js +97 -0
  30. package/dist/components/semform.js +184 -0
  31. package/dist/components/worker.js +196 -0
  32. package/dist/config.json +1 -1
  33. package/dist/contexts/MetadataContext.js +8 -7
  34. package/dist/lib/DTTConfig.js +8 -8
  35. package/package.json +25 -2
@@ -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
  })
@@ -12,12 +12,17 @@ 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
20
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
20
- /*****************************************************************************\
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); } /*****************************************************************************\
21
26
  * (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
22
27
  * *
23
28
  * This software is distributed under the terms of the GNU General Public *
@@ -27,134 +32,135 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
27
32
  * granted to it by virtue of its status as an Intergovernmental Organization *
28
33
  * or submit itself to any jurisdiction. *
29
34
  \*****************************************************************************/
30
-
31
35
  class ParticleConfig extends _react.default.Component {
32
- static contextType = (() => _MetadataContext.default)();
33
- state = {
34
- dtt: this.props.dtt,
35
- openAddTool: false,
36
- openConfigTool: false,
37
- expandedTool: {
38
- tool: "",
39
- open: false
40
- },
41
- selectedToolClass: "",
42
- selectedToolName: ""
43
- };
44
- handleOpen = type => () => {
45
- this.setState({
46
- [`open${type}Tool`]: true
47
- });
48
- };
49
- handleClose = type => () => {
50
- this.setState({
51
- [`open${type}Tool`]: false
52
- });
53
- this.clearSelectedTool();
54
- this.props.parentCallbackClose();
55
- this.props.parentCallbackUpdated();
56
- };
57
- clearSelectedTool = () => {
58
- 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
+ },
59
46
  selectedToolClass: "",
60
47
  selectedToolName: ""
61
48
  });
62
- };
63
- handleRemoveTool = tool => () => {
64
- this.state.dtt.removeTool(this.props.particleID, tool);
65
- this.setState({
66
- dtt: this.state.dtt
67
- });
68
- this.props.parentCallbackUpdated();
69
- };
70
- handleConfigTool = tool => () => {
71
- const splitArr = tool.split("/");
72
- const toolClass = splitArr[0];
73
- const toolName = splitArr.length > 1 ? splitArr[1] : "";
74
- this.setState({
75
- openConfigTool: true,
76
- selectedToolClass: toolClass,
77
- selectedToolName: toolName
78
- });
79
- };
80
- handleUpdateTool = (tool, parameter) => value => {
81
- let parameters = this.state.dtt.getToolConfig(this.props.particleID, tool);
82
- const signalUpdated = parameters[parameter] !== value;
83
- parameters[parameter] = value;
84
- this.state.dtt.configureTool(this.props.particleID, tool, parameters);
85
- this.setState({
86
- dtt: this.state.dtt
49
+ _defineProperty(this, "handleOpen", type => () => {
50
+ this.setState({
51
+ ["open".concat(type, "Tool")]: true
52
+ });
87
53
  });
88
- if (signalUpdated) {
54
+ _defineProperty(this, "handleClose", type => () => {
55
+ this.setState({
56
+ ["open".concat(type, "Tool")]: false
57
+ });
58
+ this.clearSelectedTool();
59
+ this.props.parentCallbackClose();
89
60
  this.props.parentCallbackUpdated();
90
- }
91
- };
92
- setToolClass = option => {
93
- this.setState({
94
- selectedToolClass: option.value
95
61
  });
96
- };
97
- setToolName = _ref => {
98
- let {
99
- target
100
- } = _ref;
101
- this.setState({
102
- selectedToolName: target.value.replaceAll(/[^\w]/g, "")
103
- });
104
- };
105
- handleAddTool = () => {
106
- const {
107
- selectedToolClass,
108
- selectedToolName
109
- } = this.state;
110
- if (selectedToolClass) {
111
- this.state.dtt.addTool(this.props.particleID, selectedToolClass, selectedToolName);
62
+ _defineProperty(this, "clearSelectedTool", () => {
112
63
  this.setState({
113
- dtt: this.state.dtt,
114
64
  selectedToolClass: "",
115
65
  selectedToolName: ""
116
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
+ });
117
73
  this.props.parentCallbackUpdated();
118
- }
119
- };
120
- getSelectedTool = () => {
121
- const {
122
- selectedToolClass,
123
- selectedToolName
124
- } = this.state;
125
- let selectedTool = selectedToolClass;
126
- if (selectedToolName) {
127
- selectedTool = `${selectedToolClass}/${selectedToolName}`;
128
- }
129
- return selectedTool;
130
- };
131
- toolExists = () => {
132
- const selectedTool = this.getSelectedTool();
133
- return this.state.dtt.listTools(this.props.particleID).includes(selectedTool);
134
- };
135
- getParam = (tool, param) => {
136
- const toolClass = tool.split("/")[0];
137
- const toolInterface = this.context.metadata.tupleTools.tupleTools[toolClass].interface;
138
- const paramInfo = toolInterface.filter(i => i.name === param);
139
- if (paramInfo.length === 1) {
140
- return paramInfo[0];
141
- } else {
142
- console.warn("Cannot find " + param + " in:");
143
- console.warn(toolInterface);
144
- return {
145
- type: "str",
146
- 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
147
158
  };
148
- }
149
- };
150
- displayDoxygen = () => {
151
- const html = {
152
- __html: this.context.metadata.tupleTools.tupleTools[this.state.selectedToolClass].documentation
153
- };
154
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
155
- dangerouslySetInnerHTML: html
159
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
160
+ dangerouslySetInnerHTML: html
161
+ });
156
162
  });
157
- };
163
+ }
158
164
  render() {
159
165
  const toolList = this.state.dtt.listTools(this.props.particleID);
160
166
  const nTools = toolList.length;
@@ -217,12 +223,11 @@ class ParticleConfig extends _react.default.Component {
217
223
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactBootstrap.Modal.Body, {
218
224
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactBootstrap.InputGroup, {
219
225
  hasValidation: true,
220
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_SelectTool.default, {
226
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_SelectTool.default, _objectSpread({
221
227
  filterToolTags: this.props.filterToolTags,
222
228
  placeholder: "TupleTool class",
223
- onChange: this.setToolClass,
224
- ...selectToolProps
225
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.FormControl, {
229
+ onChange: this.setToolClass
230
+ }, selectToolProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.FormControl, {
226
231
  placeholder: "TupleTool name",
227
232
  onChange: this.setToolName,
228
233
  disabled: this.state.selectedToolClass === "",
@@ -251,9 +256,7 @@ class ParticleConfig extends _react.default.Component {
251
256
  children: [selectedTool ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.Form, {
252
257
  children: Object.entries(this.state.dtt.getToolConfig(this.props.particleID, selectedTool)).map(_ref2 => {
253
258
  let [param, value] = _ref2;
254
- const paramObj = {
255
- ...this.getParam(selectedTool, param)
256
- };
259
+ const paramObj = _objectSpread({}, this.getParam(selectedTool, param));
257
260
  const {
258
261
  description,
259
262
  type
@@ -266,18 +269,17 @@ class ParticleConfig extends _react.default.Component {
266
269
  defaultValue: defaultValue,
267
270
  callback: this.handleUpdateTool(selectedTool, param)
268
271
  };
269
- const inputBox = type.match(list_re) !== null ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ConfigList.default, {
270
- type: type.match(list_re)[1],
271
- ...configProps
272
- }) : type.match(dict_re) !== null ? /*#__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({
273
277
  keyType: type.match(dict_re)[1],
274
- valType: type.match(dict_re)[2],
275
- ...configProps
276
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ConfigValue.default, {
278
+ valType: type.match(dict_re)[2]
279
+ }, configProps)) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ConfigValue.default, _objectSpread({
277
280
  type: type,
278
- param: param,
279
- ...configProps
280
- });
281
+ param: param
282
+ }, configProps));
281
283
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactBootstrap.Form.Group, {
282
284
  as: _reactBootstrap.Row,
283
285
  className: "mb-2",
@@ -310,6 +312,7 @@ class ParticleConfig extends _react.default.Component {
310
312
  });
311
313
  }
312
314
  }
315
+ _defineProperty(ParticleConfig, "contextType", _MetadataContext.default);
313
316
  ParticleConfig.propTypes = {
314
317
  dtt: _propTypes.default.object,
315
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
  * *