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