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