lhcb-ntuple-wizard-test 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/components/App.js +1 -1
  2. package/dist/components/ConfigDict.js +39 -40
  3. package/dist/components/ConfigList.js +27 -31
  4. package/dist/components/ConfigNode.js +122 -121
  5. package/dist/components/ConfigValue.js +18 -21
  6. package/dist/components/Dataset.js +4 -8
  7. package/dist/components/Decay.js +2 -2
  8. package/dist/components/DecayItem.js +46 -50
  9. package/dist/components/DecayTag.js +4 -5
  10. package/dist/components/DecayTree.js +151 -151
  11. package/dist/components/DecaysList.js +35 -39
  12. package/dist/components/DeleteButton.js +1 -1
  13. package/dist/components/DescriptorsSearch.js +188 -192
  14. package/dist/components/EventTypeBadge.js +1 -1
  15. package/dist/components/ItemSearch.js +8 -12
  16. package/dist/components/LinesTable.js +463 -459
  17. package/dist/components/NtupleWizard.js +28 -32
  18. package/dist/components/ParticleTag.js +4 -5
  19. package/dist/components/PolarityBadge.js +1 -1
  20. package/dist/components/SearchItem.js +29 -33
  21. package/dist/components/SelectParticle.js +6 -10
  22. package/dist/components/SelectTag.js +5 -6
  23. package/dist/components/SelectTool.js +5 -6
  24. package/dist/components/SelectVariables.js +23 -24
  25. package/dist/components/StrippingBadge.js +4 -5
  26. package/dist/components/StrippingLine.js +2 -2
  27. package/dist/components/TupleTool.js +4 -5
  28. package/dist/components/VariablesSearch.js +8 -12
  29. package/dist/components/YearBadge.js +1 -1
  30. package/dist/components/loki/LokiDict.js +180 -0
  31. package/dist/components/loki/LokiEditor.js +200 -0
  32. package/dist/components/loki/LokiForm.js +112 -0
  33. package/dist/components/semantic.js +97 -0
  34. package/dist/components/semform.js +182 -0
  35. package/dist/components/worker.js +196 -0
  36. package/dist/config.json +4 -2
  37. package/dist/contexts/MetadataContext.js +2 -2
  38. package/dist/index.js +2 -2
  39. package/dist/lib/DTTConfig.js +9 -9
  40. package/dist/lib/utils.js +1 -1
  41. package/package.json +25 -2
@@ -14,10 +14,8 @@ var _DescriptorsSearch = _interopRequireDefault(require("./DescriptorsSearch"));
14
14
  var _LinesTable = _interopRequireDefault(require("./LinesTable"));
15
15
  var _SelectVariables = _interopRequireDefault(require("./SelectVariables"));
16
16
  var _jsxRuntime = require("react/jsx-runtime");
17
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
19
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
20
- 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); } /*****************************************************************************\
17
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
18
+ /*****************************************************************************\
21
19
  * (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
22
20
  * *
23
21
  * This software is distributed under the terms of the GNU General Public *
@@ -27,37 +25,35 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
27
25
  * granted to it by virtue of its status as an Intergovernmental Organization *
28
26
  * or submit itself to any jurisdiction. *
29
27
  \*****************************************************************************/
28
+
30
29
  class NtupleWizard extends _react.default.Component {
31
- constructor() {
32
- super(...arguments);
33
- _defineProperty(this, "state", {
34
- rows: JSON.parse(localStorage.getItem("rows") || "[]"),
35
- productionName: localStorage.getItem("name") || "",
36
- contactEmail: (localStorage.getItem("email") || "").split(/,/).filter(s => s),
37
- reasonForRequest: localStorage.getItem("reasonForRequest") || ""
38
- });
39
- _defineProperty(this, "callbackUpdateRows", rows => {
40
- const newRows = rows.map(row => ({
41
- ...row,
42
- dtt: row.dtt ? _lodash.default.cloneDeep(row.dtt.config) : false
43
- }));
44
- this.setState({
45
- rows: newRows
46
- });
47
- const rowString = JSON.stringify(newRows);
48
- localStorage.setItem("rows", rowString);
30
+ state = (() => ({
31
+ rows: JSON.parse(localStorage.getItem("rows") || "[]"),
32
+ productionName: localStorage.getItem("name") || "",
33
+ contactEmail: (localStorage.getItem("email") || "").split(/,/).filter(s => s),
34
+ reasonForRequest: localStorage.getItem("reasonForRequest") || ""
35
+ }))();
36
+ callbackUpdateRows = rows => {
37
+ const newRows = rows.map(row => ({
38
+ ...row,
39
+ dtt: row.dtt ? _lodash.default.cloneDeep(row.dtt.config) : false
40
+ }));
41
+ this.setState({
42
+ rows: newRows
49
43
  });
50
- _defineProperty(this, "callbackUpdateInfo", (name, email, reasonForRequest) => {
51
- this.setState({
52
- productionName: name,
53
- contactEmail: email,
54
- reasonForRequest: reasonForRequest
55
- });
56
- localStorage.setItem("name", name);
57
- localStorage.setItem("email", email.join(","));
58
- localStorage.setItem("reasonForRequest", reasonForRequest);
44
+ const rowString = JSON.stringify(newRows);
45
+ localStorage.setItem("rows", rowString);
46
+ };
47
+ callbackUpdateInfo = (name, email, reasonForRequest) => {
48
+ this.setState({
49
+ productionName: name,
50
+ contactEmail: email,
51
+ reasonForRequest: reasonForRequest
59
52
  });
60
- }
53
+ localStorage.setItem("name", name);
54
+ localStorage.setItem("email", email.join(","));
55
+ localStorage.setItem("reasonForRequest", reasonForRequest);
56
+ };
61
57
  render() {
62
58
  let {
63
59
  basePath,
@@ -10,10 +10,8 @@ var _reactBootstrap = require("react-bootstrap");
10
10
  var _MetadataContext = _interopRequireDefault(require("../contexts/MetadataContext"));
11
11
  var _config = _interopRequireDefault(require("../config"));
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
16
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*****************************************************************************\
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
+ /*****************************************************************************\
17
15
  * (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
18
16
  * *
19
17
  * This software is distributed under the terms of the GNU General Public *
@@ -23,7 +21,9 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
23
21
  * granted to it by virtue of its status as an Intergovernmental Organization *
24
22
  * or submit itself to any jurisdiction. *
25
23
  \*****************************************************************************/
24
+
26
25
  class ParticleTag extends _react.default.Component {
26
+ static contextType = (() => _MetadataContext.default)();
27
27
  render() {
28
28
  const background = this.context.loaded.userHints ? _config.default.particleTagGroupStyles[this.context.metadata.userHints.particleTags[this.props.tag].group] : "dark";
29
29
  const foreground = "light";
@@ -45,7 +45,6 @@ class ParticleTag extends _react.default.Component {
45
45
  }
46
46
  }
47
47
  exports.ParticleTag = ParticleTag;
48
- _defineProperty(ParticleTag, "contextType", _MetadataContext.default);
49
48
  ParticleTag.propTypes = {
50
49
  tag: _propTypes.default.string
51
50
  };
@@ -8,7 +8,7 @@ var _react = _interopRequireDefault(require("react"));
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var _reactBootstrap = require("react-bootstrap");
10
10
  var _jsxRuntime = require("react/jsx-runtime");
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
12
  /*****************************************************************************\
13
13
  * (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
14
14
  * *
@@ -10,10 +10,8 @@ var _reactSelect = _interopRequireDefault(require("react-select"));
10
10
  var _Tooltip = _interopRequireDefault(require("react-bootstrap/Tooltip"));
11
11
  var _OverlayTrigger = _interopRequireDefault(require("react-bootstrap/OverlayTrigger"));
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
16
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*****************************************************************************\
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
+ /*****************************************************************************\
17
15
  * (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
18
16
  * *
19
17
  * This software is distributed under the terms of the GNU General Public *
@@ -23,39 +21,14 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
23
21
  * granted to it by virtue of its status as an Intergovernmental Organization *
24
22
  * or submit itself to any jurisdiction. *
25
23
  \*****************************************************************************/
24
+
26
25
  function compare(a, b) {
27
26
  return a.value > b.value ? 1 : b.value > a.value ? -1 : 0;
28
27
  }
29
28
  class SearchItem extends _react.default.Component {
30
- constructor() {
31
- super(...arguments);
32
- _defineProperty(this, "state", {
33
- variables: this.variablesOptions(this.props.variables)
34
- });
35
- _defineProperty(this, "onInputChange", inputValue => {
36
- const nInclOptions = this.state.variables.filter(variable => !variable.value.toLowerCase().includes(inputValue.toLowerCase()));
37
- const inclOptions = this.state.variables.filter(variable => variable.value.toLowerCase().includes(inputValue.toLowerCase()) && variable.value.toLowerCase() !== inputValue.toLowerCase());
38
- const matchedOptions = this.state.variables.filter(variable => variable.value.toLowerCase() === inputValue.toLowerCase());
39
- const orderedNewOptions = matchedOptions.sort(compare);
40
- this.setState({
41
- variables: orderedNewOptions.concat(inclOptions).concat(nInclOptions)
42
- });
43
- });
44
- _defineProperty(this, "customSelectStyles", {
45
- option: (provided, state) => ({
46
- ...provided,
47
- borderBottom: "3px dotted red",
48
- color: state.isSelected ? "red" : "blue",
49
- padding: 10,
50
- width: 535
51
- }),
52
- menu: styles => ({
53
- ...styles,
54
- width: "540px",
55
- height: "35px"
56
- })
57
- });
58
- }
29
+ state = {
30
+ variables: this.variablesOptions(this.props.variables)
31
+ };
59
32
  variablesOptions(variables) {
60
33
  let result_options = [];
61
34
  //const options = list_to_options(variables)
@@ -82,6 +55,29 @@ class SearchItem extends _react.default.Component {
82
55
  });
83
56
  return result_options;
84
57
  }
58
+ onInputChange = inputValue => {
59
+ const nInclOptions = this.state.variables.filter(variable => !variable.value.toLowerCase().includes(inputValue.toLowerCase()));
60
+ const inclOptions = this.state.variables.filter(variable => variable.value.toLowerCase().includes(inputValue.toLowerCase()) && variable.value.toLowerCase() !== inputValue.toLowerCase());
61
+ const matchedOptions = this.state.variables.filter(variable => variable.value.toLowerCase() === inputValue.toLowerCase());
62
+ const orderedNewOptions = matchedOptions.sort(compare);
63
+ this.setState({
64
+ variables: orderedNewOptions.concat(inclOptions).concat(nInclOptions)
65
+ });
66
+ };
67
+ customSelectStyles = {
68
+ option: (provided, state) => ({
69
+ ...provided,
70
+ borderBottom: "3px dotted red",
71
+ color: state.isSelected ? "red" : "blue",
72
+ padding: 10,
73
+ width: 535
74
+ }),
75
+ menu: styles => ({
76
+ ...styles,
77
+ width: "540px",
78
+ height: "35px"
79
+ })
80
+ };
85
81
  render() {
86
82
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
87
83
  width: "20px",
@@ -10,12 +10,10 @@ var _mathjaxReact = require("mathjax-react");
10
10
  var _reactSelect = _interopRequireDefault(require("react-select"));
11
11
  var _MetadataContext = _interopRequireDefault(require("../contexts/MetadataContext"));
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
14
  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); }
15
- 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 && Object.prototype.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; }
16
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
17
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(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
+ 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; }
16
+ /*****************************************************************************\
19
17
  * (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
20
18
  * *
21
19
  * This software is distributed under the terms of the GNU General Public *
@@ -25,11 +23,10 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
25
23
  * granted to it by virtue of its status as an Intergovernmental Organization *
26
24
  * or submit itself to any jurisdiction. *
27
25
  \*****************************************************************************/
26
+
28
27
  class SelectParticle extends React.Component {
29
- constructor() {
30
- super(...arguments);
31
- _defineProperty(this, "allowedParticles", () => this.props.onlyHeads ? [...new Set(Object.values(this.context.metadata.decays).map(decay => decay.descriptors.list[0]))] : this.props.onlyKnown ? Object.keys(this.context.metadata.particleProperties).filter(key => !this.context.metadata.particleProperties[key].hide) : Object.keys(this.context.metadata.particleProperties));
32
- }
28
+ static contextType = (() => _MetadataContext.default)();
29
+ allowedParticles = () => this.props.onlyHeads ? [...new Set(Object.values(this.context.metadata.decays).map(decay => decay.descriptors.list[0]))] : this.props.onlyKnown ? Object.keys(this.context.metadata.particleProperties).filter(key => !this.context.metadata.particleProperties[key].hide) : Object.keys(this.context.metadata.particleProperties);
33
30
  render() {
34
31
  let remainingProps = this.props;
35
32
  delete remainingProps.options;
@@ -52,7 +49,6 @@ class SelectParticle extends React.Component {
52
49
  });
53
50
  }
54
51
  }
55
- _defineProperty(SelectParticle, "contextType", _MetadataContext.default);
56
52
  SelectParticle.propTypes = {
57
53
  options: _propTypes.default.arrayOf(_propTypes.default.object),
58
54
  onlyHeads: _propTypes.default.bool,
@@ -10,12 +10,10 @@ var _reactSelect = _interopRequireDefault(require("react-select"));
10
10
  var _reactBootstrap = require("react-bootstrap");
11
11
  var _MetadataContext = _interopRequireDefault(require("../contexts/MetadataContext"));
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
14
  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); }
15
- 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 && Object.prototype.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; }
16
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
17
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(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
+ 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; }
16
+ /*****************************************************************************\
19
17
  * (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
20
18
  * *
21
19
  * This software is distributed under the terms of the GNU General Public *
@@ -25,7 +23,9 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
25
23
  * granted to it by virtue of its status as an Intergovernmental Organization *
26
24
  * or submit itself to any jurisdiction. *
27
25
  \*****************************************************************************/
26
+
28
27
  class SelectTag extends React.Component {
28
+ static contextType = (() => _MetadataContext.default)();
29
29
  static createOptions(tags, filter) {
30
30
  return Object.keys(tags).filter(key => filter(tags[key])).map(key => Object({
31
31
  value: key,
@@ -56,7 +56,6 @@ class SelectTag extends React.Component {
56
56
  });
57
57
  }
58
58
  }
59
- _defineProperty(SelectTag, "contextType", _MetadataContext.default);
60
59
  SelectTag.propTypes = {
61
60
  options: _propTypes.default.array,
62
61
  isLoading: _propTypes.default.bool,
@@ -10,12 +10,10 @@ var _reactSelect = _interopRequireDefault(require("react-select"));
10
10
  var _TupleTool = _interopRequireDefault(require("./TupleTool"));
11
11
  var _MetadataContext = _interopRequireDefault(require("../contexts/MetadataContext"));
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
14
  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); }
15
- 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 && Object.prototype.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; }
16
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
17
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(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
+ 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; }
16
+ /*****************************************************************************\
19
17
  * (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
20
18
  * *
21
19
  * This software is distributed under the terms of the GNU General Public *
@@ -25,7 +23,9 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
25
23
  * granted to it by virtue of its status as an Intergovernmental Organization *
26
24
  * or submit itself to any jurisdiction. *
27
25
  \*****************************************************************************/
26
+
28
27
  class SelectTool extends React.Component {
28
+ static contextType = (() => _MetadataContext.default)();
29
29
  render() {
30
30
  let remainingProps = this.props;
31
31
  delete remainingProps.options;
@@ -50,7 +50,6 @@ class SelectTool extends React.Component {
50
50
  });
51
51
  }
52
52
  }
53
- _defineProperty(SelectTool, "contextType", _MetadataContext.default);
54
53
  SelectTool.propTypes = {
55
54
  options: _propTypes.default.array,
56
55
  isLoading: _propTypes.default.bool,
@@ -11,10 +11,8 @@ var _reactRouterDom = require("react-router-dom");
11
11
  var _MetadataContext = require("../contexts/MetadataContext");
12
12
  var _DecayTree = _interopRequireDefault(require("./DecayTree"));
13
13
  var _jsxRuntime = require("react/jsx-runtime");
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
16
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
17
- 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); } /*****************************************************************************\
14
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
+ /*****************************************************************************\
18
16
  * (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
19
17
  * *
20
18
  * This software is distributed under the terms of the GNU General Public *
@@ -24,30 +22,32 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
24
22
  * granted to it by virtue of its status as an Intergovernmental Organization *
25
23
  * or submit itself to any jurisdiction. *
26
24
  \*****************************************************************************/
25
+
27
26
  class SelectVariables extends _react.default.Component {
28
27
  constructor(props) {
29
28
  super(props);
30
- _defineProperty(this, "state", {
31
- selectedRows: this.props.rows.map(row => ({
32
- ...row,
33
- dtt: {
34
- config: row.dtt
35
- }
36
- }))
37
- });
38
- _defineProperty(this, "callbackFunction", index => childConfig => {
39
- let updatedRows = [...this.state.selectedRows];
40
- updatedRows.filter(row => row.id === index)[0].dtt.config = childConfig;
41
- this.setState({
42
- selectedRows: updatedRows
43
- });
44
- this.props.parentCallback(updatedRows);
45
- });
46
- _defineProperty(this, "handeReturn", history => {
47
- history.push(this.propsVar.basePath);
48
- });
49
29
  this.propsVar = this.props;
50
30
  }
31
+ static contextType = (() => _MetadataContext.MetadataContext)();
32
+ state = {
33
+ selectedRows: this.props.rows.map(row => ({
34
+ ...row,
35
+ dtt: {
36
+ config: row.dtt
37
+ }
38
+ }))
39
+ };
40
+ callbackFunction = index => childConfig => {
41
+ let updatedRows = [...this.state.selectedRows];
42
+ updatedRows.filter(row => row.id === index)[0].dtt.config = childConfig;
43
+ this.setState({
44
+ selectedRows: updatedRows
45
+ });
46
+ this.props.parentCallback(updatedRows);
47
+ };
48
+ handeReturn = history => {
49
+ history.push(this.propsVar.basePath);
50
+ };
51
51
  render() {
52
52
  const innerContent = this.context.loaded.tupleTools ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
53
53
  children: this.state.selectedRows.filter(row => row.editTree).map(row => {
@@ -97,7 +97,6 @@ class SelectVariables extends _react.default.Component {
97
97
  });
98
98
  }
99
99
  }
100
- _defineProperty(SelectVariables, "contextType", _MetadataContext.MetadataContext);
101
100
  SelectVariables.propTypes = {
102
101
  rows: _propTypes.default.arrayOf(_propTypes.default.object),
103
102
  parentCallback: _propTypes.default.func
@@ -9,10 +9,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var _reactBootstrap = require("react-bootstrap");
10
10
  var _MetadataContext = _interopRequireDefault(require("../contexts/MetadataContext"));
11
11
  var _jsxRuntime = require("react/jsx-runtime");
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
14
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
15
- 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); } /*****************************************************************************\
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
+ /*****************************************************************************\
16
14
  * (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
17
15
  * *
18
16
  * This software is distributed under the terms of the GNU General Public *
@@ -22,7 +20,9 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
22
20
  * granted to it by virtue of its status as an Intergovernmental Organization *
23
21
  * or submit itself to any jurisdiction. *
24
22
  \*****************************************************************************/
23
+
25
24
  class StrippingBadge extends _react.default.Component {
25
+ static contextType = (() => _MetadataContext.default)();
26
26
  render() {
27
27
  // TODO: configurable baseURL, remove baseURL from metadata (or make it a top-level key)
28
28
  const url = this.props.line && this.context.loaded.stripping ? this.context.metadata.stripping[this.props.version][this.props.line].url[this.props.stream] : "http://lhcbdoc.web.cern.ch/lhcbdoc/stripping/config/stripping" + this.props.version + "/index.html";
@@ -51,7 +51,6 @@ class StrippingBadge extends _react.default.Component {
51
51
  });
52
52
  }
53
53
  }
54
- _defineProperty(StrippingBadge, "contextType", _MetadataContext.default);
55
54
  StrippingBadge.propTypes = {
56
55
  line: _propTypes.default.string,
57
56
  version: _propTypes.default.string,
@@ -9,7 +9,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var _reactBootstrap = require("react-bootstrap");
10
10
  var _StrippingBadge = _interopRequireDefault(require("./StrippingBadge"));
11
11
  var _jsxRuntime = require("react/jsx-runtime");
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
13
  /*****************************************************************************\
14
14
  * (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
15
15
  * *
@@ -27,7 +27,7 @@ class StrippingLine extends _react.default.Component {
27
27
  version: version,
28
28
  showlink: this.props.showlink,
29
29
  ...this.props
30
- }, "".concat(this.props.line, "-S").concat(version, "-badge")));
30
+ }, `${this.props.line}-S${version}-badge`));
31
31
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
32
32
  children: [this.props.line, /*#__PURE__*/(0, _jsxRuntime.jsx)("br", {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.Stack, {
33
33
  direction: "horizontal",
@@ -10,10 +10,8 @@ var _reactBootstrap = require("react-bootstrap");
10
10
  var _MetadataContext = _interopRequireDefault(require("../contexts/MetadataContext"));
11
11
  var _utils = require("../lib/utils");
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
16
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*****************************************************************************\
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
+ /*****************************************************************************\
17
15
  * (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
18
16
  * *
19
17
  * This software is distributed under the terms of the GNU General Public *
@@ -23,7 +21,9 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
23
21
  * granted to it by virtue of its status as an Intergovernmental Organization *
24
22
  * or submit itself to any jurisdiction. *
25
23
  \*****************************************************************************/
24
+
26
25
  class TupleTool extends _react.default.Component {
26
+ static contextType = (() => _MetadataContext.default)();
27
27
  render() {
28
28
  const toolClass = this.props.tool.split("/")[0];
29
29
  const description = this.context.loaded.tupleTools ? (0, _utils.get_tupleTool_description)(toolClass, this.context.metadata.tupleTools.tupleTools) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactBootstrap.Spinner, {
@@ -39,7 +39,6 @@ class TupleTool extends _react.default.Component {
39
39
  });
40
40
  }
41
41
  }
42
- _defineProperty(TupleTool, "contextType", _MetadataContext.default);
43
42
  TupleTool.propTypes = {
44
43
  tool: _propTypes.default.string
45
44
  };
@@ -10,10 +10,8 @@ var _Tooltip = _interopRequireDefault(require("react-bootstrap/Tooltip"));
10
10
  var _OverlayTrigger = _interopRequireDefault(require("react-bootstrap/OverlayTrigger"));
11
11
  var _MetadataContext = _interopRequireDefault(require("../MetadataContext"));
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
16
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*****************************************************************************\
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
+ /*****************************************************************************\
17
15
  * (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
18
16
  * *
19
17
  * This software is distributed under the terms of the GNU General Public *
@@ -23,6 +21,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
23
21
  * granted to it by virtue of its status as an Intergovernmental Organization *
24
22
  * or submit itself to any jurisdiction. *
25
23
  \*****************************************************************************/
24
+
26
25
  const {
27
26
  search
28
27
  } = window.location;
@@ -33,13 +32,11 @@ function compare(a, b) {
33
32
  return Object.keys(a)[0] > Object.keys(b)[0] ? 1 : Object.keys(a)[0] < Object.keys(b)[0] ? -1 : 0;
34
33
  }
35
34
  class VariablesSearch extends _react.default.Component {
36
- constructor() {
37
- super(...arguments);
38
- _defineProperty(this, "state", {
39
- variables: (0, _utils.parse_searchitem_descriptions)(this.context.metadata.lokiVariables),
40
- searchQuery: query || ""
41
- });
42
- }
35
+ static contextType = (() => _MetadataContext.default)();
36
+ state = (() => ({
37
+ variables: (0, _utils.parse_searchitem_descriptions)(this.context.metadata.lokiVariables),
38
+ searchQuery: query || ""
39
+ }))();
43
40
  filterVariables(variables, query) {
44
41
  /*
45
42
  const nInclOptions = variables.filter(
@@ -116,7 +113,6 @@ class VariablesSearch extends _react.default.Component {
116
113
  });
117
114
  }
118
115
  }
119
- _defineProperty(VariablesSearch, "contextType", _MetadataContext.default);
120
116
  var _default = exports.default = VariablesSearch;
121
117
  /* <div>
122
118
  <ul>
@@ -8,7 +8,7 @@ var _react = _interopRequireDefault(require("react"));
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var _reactBootstrap = require("react-bootstrap");
10
10
  var _jsxRuntime = require("react/jsx-runtime");
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
12
  /*****************************************************************************\
13
13
  * (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
14
14
  * *