lhcb-ntuple-wizard-test 1.0.6 → 1.0.8

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 +117 -120
  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 +147 -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 +1 -1
@@ -0,0 +1,182 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _Form = _interopRequireDefault(require("react-bootstrap/Form"));
8
+ var _Button = _interopRequireDefault(require("react-bootstrap/Button"));
9
+ var _semantic = require("./semantic");
10
+ var _react = require("react");
11
+ var _MetadataContext = _interopRequireDefault(require("../contexts/MetadataContext"));
12
+ var _propTypes = _interopRequireDefault(require("prop-types"));
13
+ var _DeleteButton = _interopRequireDefault(require("./DeleteButton"));
14
+ var _jsxRuntime = require("react/jsx-runtime");
15
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
+ /*****************************************************************************\
17
+ * (c) Copyright 2024 CERN for the benefit of the LHCb Collaboration *
18
+ * *
19
+ * This software is distributed under the terms of the GNU General Public *
20
+ * Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". *
21
+ * *
22
+ * In applying this licence, CERN does not waive the privileges and immunities *
23
+ * granted to it by virtue of its status as an Intergovernmental Organization *
24
+ * or submit itself to any jurisdiction. *
25
+ \*****************************************************************************/
26
+
27
+ function getmetafromcontext() {
28
+ const context = (0, _react.useContext)(_MetadataContext.default);
29
+ return context;
30
+ }
31
+
32
+ /**
33
+ * Make the output of the search more readable
34
+ * @param {Array} data
35
+ * @returns
36
+ */
37
+ function FormatOutput(_ref) {
38
+ let {
39
+ data
40
+ } = _ref;
41
+ let topchoice_ttool = [data.ttool[0]];
42
+ let data_ttool = data.ttool.slice(1);
43
+ let topchoice_loki = [data.loki[0]];
44
+ let data_loki = data.loki.slice(1);
45
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
46
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
47
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("h2", {
48
+ children: "Best match (TupleTools):"
49
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
50
+ children: topchoice_ttool.map((item, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)("li", {
51
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("strong", {
52
+ children: "Matched TupleTool:"
53
+ }), " ", item[2] === "LoKi_functors" ? "LoKi__Hybrid__TupleTool" : item[2], /*#__PURE__*/(0, _jsxRuntime.jsxs)("ul", {
54
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("li", {
55
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("strong", {
56
+ children: "Variable name:"
57
+ }), " ", item[1]]
58
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("li", {
59
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("strong", {
60
+ children: "Definition:"
61
+ }), " ", item[0]]
62
+ })]
63
+ })]
64
+ }, index))
65
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("h3", {
66
+ children: "Other matches (TupleTools):"
67
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
68
+ children: data_ttool.map((item, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)("li", {
69
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("strong", {
70
+ children: "Matched TupleTool:"
71
+ }), " ", item[2] === "LoKi_functors" ? "LoKi__Hybrid__TupleTool" : item[2], /*#__PURE__*/(0, _jsxRuntime.jsxs)("ul", {
72
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("li", {
73
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("strong", {
74
+ children: "Variable name:"
75
+ }), " ", item[1]]
76
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("li", {
77
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("strong", {
78
+ children: "Definition:"
79
+ }), " ", item[0]]
80
+ })]
81
+ })]
82
+ }, index))
83
+ })]
84
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
85
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("h2", {
86
+ children: "Best match (LoKi functors):"
87
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
88
+ children: topchoice_loki.map((item, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)("li", {
89
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("strong", {
90
+ children: "Matched TupleTool:"
91
+ }), " ", item[2] === "LoKi_functors" ? "LoKi__Hybrid__TupleTool" : item[2], /*#__PURE__*/(0, _jsxRuntime.jsxs)("ul", {
92
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("li", {
93
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("strong", {
94
+ children: "Variable name:"
95
+ }), " ", item[1]]
96
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("li", {
97
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("strong", {
98
+ children: "Definition:"
99
+ }), " ", item[0]]
100
+ })]
101
+ })]
102
+ }, index))
103
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("h3", {
104
+ children: "Other matches (LoKi functors):"
105
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
106
+ children: data_loki.map((item, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)("li", {
107
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("strong", {
108
+ children: "Matched TupleTool:"
109
+ }), " ", item[2] === "LoKi_functors" ? "LoKi__Hybrid__TupleTool" : item[2], /*#__PURE__*/(0, _jsxRuntime.jsxs)("ul", {
110
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("li", {
111
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("strong", {
112
+ children: "Variable name:"
113
+ }), " ", item[1]]
114
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("li", {
115
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("strong", {
116
+ children: "Definition:"
117
+ }), " ", item[0]]
118
+ })]
119
+ })]
120
+ }, index))
121
+ })]
122
+ })]
123
+ });
124
+ }
125
+ FormatOutput.propTypes = {
126
+ data: _propTypes.default.objectOf(_propTypes.default.array).isRequired
127
+ };
128
+ const SearchTTool = () => {
129
+ const [inputData, setInputData] = (0, _react.useState)({
130
+ query: ""
131
+ });
132
+ const [responseData, setResponseData] = (0, _react.useState)(null);
133
+ let metadata = getmetafromcontext();
134
+ // Load the model and embed the corpus when the component mounts
135
+ (0, _react.useMemo)(async () => {
136
+ await (0, _semantic.loadModel)("TaylorAI/gte-tiny");
137
+ await (0, _semantic.embedCorpus)(metadata);
138
+ }, []);
139
+ const handleChange = event => {
140
+ setInputData({
141
+ ...inputData,
142
+ query: event.target.value
143
+ });
144
+ };
145
+ const handleSubmit = async event => {
146
+ event.preventDefault();
147
+ // clean input field
148
+ setInputData({
149
+ query: ""
150
+ });
151
+ let response = await (0, _semantic.getSimilarity)(inputData.query);
152
+ setResponseData(response);
153
+ };
154
+ const handleDelete = () => {
155
+ setResponseData(null);
156
+ };
157
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Form.default, {
158
+ onSubmit: handleSubmit,
159
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Form.default.Group, {
160
+ controlId: "formQuery",
161
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Form.default.Label, {
162
+ children: "Search for TupleTools"
163
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Form.default.Control, {
164
+ type: "text",
165
+ value: inputData.query,
166
+ onChange: handleChange
167
+ })]
168
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
169
+ variant: "primary",
170
+ type: "submit",
171
+ children: "Submit"
172
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_DeleteButton.default, {
173
+ disabled: !responseData,
174
+ action: handleDelete
175
+ }), responseData && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
176
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(FormatOutput, {
177
+ data: responseData
178
+ })
179
+ })]
180
+ });
181
+ };
182
+ var _default = exports.default = SearchTTool;
@@ -0,0 +1,196 @@
1
+ "use strict";
2
+
3
+ var _transformers = require("@xenova/transformers");
4
+ /*****************************************************************************\
5
+ * (c) Copyright 2024 CERN for the benefit of the LHCb Collaboration *
6
+ * *
7
+ * This software is distributed under the terms of the GNU General Public *
8
+ * Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". *
9
+ * *
10
+ * In applying this licence, CERN does not waive the privileges and immunities *
11
+ * granted to it by virtue of its status as an Intergovernmental Organization *
12
+ * or submit itself to any jurisdiction. *
13
+ \*****************************************************************************/
14
+
15
+ // This is so that we will download the models from huggingface.co
16
+ _transformers.env.allowLocalModels = false;
17
+ _transformers.env.useBrowserCache = false;
18
+ // store the embeddings in a dict
19
+ let query_embedding;
20
+ /**
21
+ * @type {Object.<string, Array>}
22
+ */
23
+ let embedding_dict = {};
24
+ /**
25
+ * @type {pipeline}
26
+ */
27
+ let embedder;
28
+
29
+ // these will hold the information to tie variable explanations to TupleTools
30
+ let dataKeys;
31
+ let paths;
32
+ /**
33
+ * @type {Array}
34
+ * */
35
+ let vars;
36
+ /**
37
+ * This function calculates the embedding and stores it in a dict.
38
+ * If the text is already embedded, it will return the embedding from the dict.
39
+ * @param {string} text
40
+ * @param {bool} embedNew
41
+ * @returns embeddingVector
42
+ */
43
+ async function embed(text) {
44
+ let embedNew = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
45
+ if (text in embedding_dict) {
46
+ return embedding_dict[text];
47
+ }
48
+ const e0 = await embedder(text, {
49
+ pooling: "mean",
50
+ normalize: true
51
+ });
52
+ if (embedNew) {
53
+ embedding_dict[text] = e0.data;
54
+ }
55
+ return e0.data;
56
+ }
57
+ /**
58
+ * This function calculates the cosine similarity between two embeddings.
59
+ * @param {Array} corpus_embedding
60
+ * @param {Array} query_embedding
61
+ * @returns cosine similarity
62
+ * */
63
+ function calcCosSim(corpus_embedding, query_embedding) {
64
+ let dotProduct = 0;
65
+ let queryMag = 0;
66
+ let embMag = 0;
67
+ let loop_length = query_embedding.length;
68
+ // because the embeddings might have different dimensions
69
+ if (query_embedding.length > corpus_embedding.length) {
70
+ loop_length = corpus_embedding.length;
71
+ }
72
+ for (let i = 0; i < loop_length; i++) {
73
+ dotProduct += query_embedding[i] * corpus_embedding[i];
74
+ queryMag += query_embedding[i] * query_embedding[i];
75
+ embMag += corpus_embedding[i] * corpus_embedding[i];
76
+ }
77
+ const sim = dotProduct / (Math.sqrt(queryMag) * Math.sqrt(embMag));
78
+ return sim;
79
+ }
80
+ /**This is a helper function to read the nested json file containing the documentation.
81
+ * @returns [vars, paths, dataKeys]
82
+ */
83
+
84
+ function readJsonFile(data) {
85
+ // go through nested object
86
+ vars = [];
87
+ paths = [];
88
+ const iterateObject = function (obj) {
89
+ let path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
90
+ Object.keys(obj).forEach(key => {
91
+ const currentPath = path ? `${path}.${key}` : key;
92
+ if (obj[key] instanceof Object) {
93
+ iterateObject(obj[key], currentPath);
94
+ } else {
95
+ vars.push(obj[key]);
96
+ paths.push(currentPath);
97
+ }
98
+ });
99
+ };
100
+
101
+ // go through data and put it into an array
102
+ const dataArray = Object.values(data);
103
+ dataKeys = Object.keys(data);
104
+ iterateObject(dataArray);
105
+ return [vars, paths, dataKeys];
106
+ }
107
+
108
+ // worker on message definition
109
+ self.onmessage = async event => {
110
+ const message = event.data;
111
+ switch (message.type) {
112
+ case "init":
113
+ // load the model and reset the embedding dict
114
+ embedding_dict = {};
115
+ embedder = await (0, _transformers.pipeline)("feature-extraction", message.model, {
116
+ progress_callback: progress => {
117
+ self.postMessage({
118
+ type: "progress",
119
+ progress: progress
120
+ });
121
+ }
122
+ });
123
+ break;
124
+ case "corpus":
125
+ {
126
+ // embed the corpus or load the embeddings
127
+ readJsonFile(message.kgdoc); // this is so we can later match variables to tupletools
128
+
129
+ Object.keys(message.emb).forEach(key => {
130
+ let embarr = [];
131
+ for (const fl of message.emb[key].split(",")) {
132
+ embarr.push(fl.replace("[", "").replace("]", "").replace("np.float32", "").replace("(", "").replace(")", "").replace(" ", ""));
133
+ }
134
+ embedding_dict[key] = embarr;
135
+ });
136
+ self.postMessage({
137
+ type: "corpus"
138
+ });
139
+ break;
140
+ }
141
+ case "similarity":
142
+ {
143
+ //calculate query embedding and then calculate similarity
144
+ query_embedding = await embed(message.query, false);
145
+ let sim_dict = {};
146
+ Object.keys(embedding_dict).forEach(key => {
147
+ sim_dict[key] = calcCosSim(embedding_dict[key], query_embedding);
148
+ });
149
+ // sort by highest similarity (closest to 1)
150
+ const sortedSimDict = Object.fromEntries(Object.entries(sim_dict).sort((_ref, _ref2) => {
151
+ let [, a] = _ref;
152
+ let [, b] = _ref2;
153
+ return b - a;
154
+ }));
155
+ const top5 = Object.fromEntries(Object.entries(sortedSimDict).slice(0, 20));
156
+ let loki_result = [];
157
+ let ttool_result = [];
158
+ let result = {
159
+ loki: loki_result,
160
+ ttool: ttool_result
161
+ };
162
+ Object.keys(top5).forEach(key => {
163
+ if (key === "basic,charged: : ") {
164
+ return;
165
+ } // This is a workaround until we implement a fix in Analysis (and corresponding DaVinci release)
166
+ let description = key.substring(key.indexOf(":") + 2);
167
+ let variable = key.substring(0, key.indexOf(":") - 1);
168
+ let varpath = paths[vars.indexOf(description)];
169
+ let tupletool = dataKeys[varpath.split(".")[0]];
170
+ if (tupletool === "LoKi_functors") {
171
+ if (top5[key] > 0.86) {
172
+ if (loki_result.length < 5) {
173
+ loki_result.push([description, variable, tupletool]);
174
+ }
175
+ }
176
+ } else {
177
+ if (top5[key] > 0.75) {
178
+ if (ttool_result.length < 5) {
179
+ ttool_result.push([description, variable, tupletool]);
180
+ }
181
+ }
182
+ }
183
+ });
184
+ if (loki_result.length === 0) {
185
+ loki_result.push(["No matches found", "No matches found", "No matches found"]);
186
+ }
187
+ if (ttool_result.length === 0) {
188
+ ttool_result.push(["No matches found", "No matches found", "No matches found"]);
189
+ }
190
+ self.postMessage({
191
+ type: "result",
192
+ result: result
193
+ });
194
+ }
195
+ }
196
+ };
package/dist/config.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "metadata_baseurl": "https://lbwizard-metadata.web.cern.ch/2.1.0/",
2
+ "metadata_baseurl": "https://lbwizard-metadata.web.cern.ch/3.0.1/",
3
3
  "metadata_files": {
4
4
  "particleProperties": "particle_properties",
5
5
  "lokiVariables": "loki",
@@ -8,7 +8,9 @@
8
8
  "strippingHints": "stripping_hints",
9
9
  "userHints": "user_hints",
10
10
  "tupleTools": "tupletools",
11
- "dataset": "dataset"
11
+ "dataset": "dataset",
12
+ "kgdoc": "kgdoc",
13
+ "embedding": "embedding"
12
14
  },
13
15
  "batch_size": 10,
14
16
  "particleTagGroupStyles": {
@@ -15,7 +15,7 @@ var _react = require("react");
15
15
  var _utils = require("../lib/utils");
16
16
  var _config2 = _interopRequireDefault(require("../config"));
17
17
  var _jsxRuntime = require("react/jsx-runtime");
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
19
19
  /*****************************************************************************\
20
20
  * (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
21
21
  * *
@@ -67,7 +67,7 @@ function createMetadataProvider(_config, _ref) {
67
67
  }, []);
68
68
  if (error) {
69
69
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("h1", {
70
- children: ["Oops: ", "".concat(error)]
70
+ children: ["Oops: ", `${error}`]
71
71
  });
72
72
  } else {
73
73
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(MetadataContext.Provider, {
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  var _reactDom = _interopRequireDefault(require("react-dom"));
4
4
  var _App = _interopRequireDefault(require("./components/App"));
5
5
  var _jsxRuntime = require("react/jsx-runtime");
6
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
7
7
  /*****************************************************************************\
8
8
  * (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
9
9
  * *
@@ -15,4 +15,4 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
15
15
  * or submit itself to any jurisdiction. *
16
16
  \*****************************************************************************/
17
17
 
18
- _reactDom.default.render( /*#__PURE__*/(0, _jsxRuntime.jsx)(_App.default, {}), document.getElementById("root"));
18
+ _reactDom.default.render(/*#__PURE__*/(0, _jsxRuntime.jsx)(_App.default, {}), document.getElementById("root"));
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _lodash = _interopRequireDefault(require("lodash"));
8
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
9
  /*****************************************************************************\
10
10
  * (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
11
11
  * *
@@ -64,7 +64,7 @@ class DTTConfig {
64
64
  // Set the class+name combination
65
65
  setName(name) {
66
66
  const safeName = name.replace(/\W/g, "");
67
- this.config.name = "DecayTreeTuple/".concat(safeName);
67
+ this.config.name = `DecayTreeTuple/${safeName}`;
68
68
  }
69
69
 
70
70
  // Return the name of the DecayTreeTuple algorithm
@@ -89,16 +89,16 @@ class DTTConfig {
89
89
  this.pruneGroups();
90
90
  if (branch.length === 0) {
91
91
  return this.config;
92
- } else if ("".concat(branch) in this.config.branches) {
92
+ } else if (`${branch}` in this.config.branches) {
93
93
  return this.config.branches[branch];
94
94
  } else {
95
- if (!("".concat(branch) in this.config.groups)) {
96
- this.config.groups["".concat(branch)] = {
95
+ if (!(`${branch}` in this.config.groups)) {
96
+ this.config.groups[`${branch}`] = {
97
97
  particles: branch.map(element => this.config.branches[element].particle),
98
98
  tools: []
99
99
  };
100
100
  }
101
- return this.config.groups["".concat(branch)];
101
+ return this.config.groups[`${branch}`];
102
102
  }
103
103
  }
104
104
 
@@ -106,7 +106,7 @@ class DTTConfig {
106
106
  findTool(target, toolString) {
107
107
  const index = target.tools.findIndex(tool => toolString in tool);
108
108
  if (index < 0) {
109
- throw new Error("".concat(toolString, " not found in ").concat(target));
109
+ throw new Error(`${toolString} not found in ${target}`);
110
110
  }
111
111
  return index;
112
112
  }
@@ -117,7 +117,7 @@ class DTTConfig {
117
117
  let target = this.getTarget(branch);
118
118
  // The toolString identifies the tool in the target's tool list
119
119
  // If the tool is given a name (recommended), append it following a slash
120
- const toolString = toolName.length ? "".concat(toolClass, "/").concat(toolName) : toolClass;
120
+ const toolString = toolName.length ? `${toolClass}/${toolName}` : toolClass;
121
121
  // Add the tool to the list if not already there
122
122
  try {
123
123
  this.findTool(target, toolString);
@@ -128,7 +128,7 @@ class DTTConfig {
128
128
  target.tools.push(toolConfig);
129
129
  return true;
130
130
  }
131
- throw new Error("".concat(toolString, " already exists in ").concat(target));
131
+ throw new Error(`${toolString} already exists in ${target}`);
132
132
  }
133
133
 
134
134
  // Return a dict containing the default configuration of a TupleTool
package/dist/lib/utils.js CHANGED
@@ -21,7 +21,7 @@ var _pako = _interopRequireDefault(require("pako"));
21
21
  var _config = _interopRequireDefault(require("../config"));
22
22
  var _jszip = _interopRequireDefault(require("jszip"));
23
23
  var _jsxRuntime = require("react/jsx-runtime");
24
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
25
25
  /*****************************************************************************\
26
26
  * (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
27
27
  * *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lhcb-ntuple-wizard-test",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "An application to access large-scale open data from LHCb",
5
5
  "url": "https://gitlab.cern.ch/lhcb-dpa/wp6-analysis-preservation-and-open-data/lhcb-ntuple-wizard-frontend/issues",
6
6
  "private": false,