lhcb-ntuple-wizard-test 1.3.3 → 2.0.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/README.md +1 -2
- package/dist/App.d.ts +12 -0
- package/dist/App.js +22 -0
- package/dist/components/ConfigFilesUploadingAlert.d.ts +1 -0
- package/dist/components/ConfigFilesUploadingAlert.js +5 -0
- package/dist/components/DatasetEventTypeBadge.d.ts +5 -0
- package/dist/components/DatasetEventTypeBadge.js +23 -0
- package/dist/components/DatasetInfo.d.ts +5 -0
- package/dist/components/DatasetInfo.js +21 -0
- package/dist/components/DecayLatex.d.ts +7 -0
- package/dist/components/DecayLatex.js +103 -0
- package/dist/components/DecayList.d.ts +8 -0
- package/dist/components/DecayList.js +37 -0
- package/dist/components/DecayListItem.d.ts +11 -0
- package/dist/components/DecayListItem.js +23 -0
- package/dist/components/DecayTagBadge.d.ts +5 -0
- package/dist/components/DecayTagBadge.js +21 -0
- package/dist/components/DecayTreeCard.d.ts +7 -0
- package/dist/components/DecayTreeCard.js +43 -0
- package/dist/components/DecayTreeCardHeader.d.ts +7 -0
- package/dist/components/DecayTreeCardHeader.js +5 -0
- package/dist/components/DecayTreeGraph.d.ts +9 -0
- package/dist/components/DecayTreeGraph.js +89 -0
- package/dist/components/DeleteButton.d.ts +9 -0
- package/dist/components/DeleteButton.js +16 -53
- package/dist/components/DttNameInput.d.ts +9 -0
- package/dist/components/DttNameInput.js +73 -0
- package/dist/components/LineTableRow.d.ts +9 -0
- package/dist/components/LineTableRow.js +123 -0
- package/dist/components/LoadingIndicator.d.ts +6 -0
- package/dist/components/LoadingIndicator.js +5 -0
- package/dist/components/NtupleWizard.d.ts +26 -0
- package/dist/components/NtupleWizard.js +28 -137
- package/dist/components/NumStrippingLinesBadge.d.ts +8 -0
- package/dist/components/NumStrippingLinesBadge.js +10 -0
- package/dist/components/ParticleDropdown.d.ts +8 -0
- package/dist/components/ParticleDropdown.js +33 -0
- package/dist/components/ParticleTagBadge.d.ts +9 -0
- package/dist/components/ParticleTagBadge.js +22 -0
- package/dist/components/ParticleTagFilters.d.ts +6 -0
- package/dist/components/ParticleTagFilters.js +51 -0
- package/dist/components/PolarityBadge.d.ts +5 -0
- package/dist/components/PolarityBadge.js +13 -33
- package/dist/components/StrippingLineBadge.d.ts +7 -0
- package/dist/components/StrippingLineBadge.js +29 -0
- package/dist/components/StrippingLineInfo.d.ts +8 -0
- package/dist/components/StrippingLineInfo.js +17 -0
- package/dist/components/SubmitRequestButton.d.ts +11 -0
- package/dist/components/SubmitRequestButton.js +39 -0
- package/dist/components/TagDropdown.d.ts +12 -0
- package/dist/components/TagDropdown.js +31 -0
- package/dist/components/TupleToolDocsAccordion.d.ts +5 -0
- package/dist/components/TupleToolDocsAccordion.js +14 -0
- package/dist/components/TupleToolDropdown.d.ts +21 -0
- package/dist/components/TupleToolDropdown.js +29 -0
- package/dist/components/TupleToolGroup.d.ts +6 -0
- package/dist/components/TupleToolGroup.js +22 -0
- package/dist/components/TupleToolLabel.d.ts +6 -0
- package/dist/components/TupleToolLabel.js +20 -0
- package/dist/components/TupleToolList.d.ts +7 -0
- package/dist/components/TupleToolList.js +38 -0
- package/dist/components/YearBadge.d.ts +5 -0
- package/dist/components/YearBadge.js +13 -33
- package/dist/components/modals/AddTupleToolModal.d.ts +7 -0
- package/dist/components/modals/AddTupleToolModal.js +32 -0
- package/dist/components/modals/ConfigureTupleToolModal.d.ts +8 -0
- package/dist/components/modals/ConfigureTupleToolModal.js +43 -0
- package/dist/components/modals/ReasonForRequestModal.d.ts +8 -0
- package/dist/components/modals/ReasonForRequestModal.js +49 -0
- package/dist/components/modals/UploadDttConfigModal.d.ts +7 -0
- package/dist/components/modals/UploadDttConfigModal.js +35 -0
- package/dist/components/modals/UploadProdConfigModal.d.ts +5 -0
- package/dist/components/modals/UploadProdConfigModal.js +27 -0
- package/dist/components/tupleToolParams/BoolParamInput.d.ts +16 -0
- package/dist/components/tupleToolParams/BoolParamInput.js +15 -0
- package/dist/components/tupleToolParams/DictParamInput.d.ts +14 -0
- package/dist/components/tupleToolParams/DictParamInput.js +31 -0
- package/dist/components/tupleToolParams/ListParamInput.d.ts +14 -0
- package/dist/components/tupleToolParams/ListParamInput.js +46 -0
- package/dist/components/tupleToolParams/NumParamInput.d.ts +18 -0
- package/dist/components/tupleToolParams/NumParamInput.js +25 -0
- package/dist/components/tupleToolParams/StrParamInput.d.ts +19 -0
- package/dist/components/tupleToolParams/StrParamInput.js +22 -0
- package/dist/config.d.ts +78 -0
- package/dist/config.js +72 -0
- package/dist/{style/DecaysList.css → index.d.ts} +2 -6
- package/dist/index.js +2 -11
- package/dist/models/bkPath.d.ts +11 -0
- package/dist/models/bkPath.js +40 -0
- package/dist/models/blobFile.d.ts +12 -0
- package/dist/models/blobFile.js +1 -0
- package/dist/models/decayData.d.ts +15 -0
- package/dist/models/decayData.js +1 -0
- package/dist/models/dropdownOption.d.ts +5 -0
- package/dist/models/dropdownOption.js +1 -0
- package/dist/models/dtt.d.ts +108 -0
- package/dist/models/dtt.js +149 -0
- package/dist/models/jobConfig.d.ts +7 -0
- package/dist/models/jobConfig.js +1 -0
- package/dist/models/particle.d.ts +12 -0
- package/dist/models/particle.js +1 -0
- package/dist/models/particleTag.d.ts +4 -0
- package/dist/models/particleTag.js +1 -0
- package/dist/models/rowData.d.ts +15 -0
- package/dist/models/rowData.js +1 -0
- package/dist/models/strippingLine.d.ts +5 -0
- package/dist/models/strippingLine.js +1 -0
- package/dist/models/strippingLineOption.d.ts +6 -0
- package/dist/models/strippingLineOption.js +1 -0
- package/dist/models/tupleTool.d.ts +8 -0
- package/dist/models/tupleTool.js +18 -0
- package/dist/models/tupleTreeGraphData.d.ts +20 -0
- package/dist/models/tupleTreeGraphData.js +1 -0
- package/dist/models/yamlFile.d.ts +11 -0
- package/dist/models/yamlFile.js +78 -0
- package/dist/pages/DecaySearchPage.d.ts +5 -0
- package/dist/pages/DecaySearchPage.js +197 -0
- package/dist/pages/DecayTreeConfigPage.d.ts +5 -0
- package/dist/pages/DecayTreeConfigPage.js +63 -0
- package/dist/pages/LinesTablePage.d.ts +14 -0
- package/dist/pages/LinesTablePage.js +120 -0
- package/dist/providers/DttProvider.d.ts +24 -0
- package/dist/providers/DttProvider.js +77 -0
- package/dist/providers/MetadataProvider.d.ts +87 -0
- package/dist/providers/MetadataProvider.js +50 -0
- package/dist/providers/ProductionConfigProvider.d.ts +14 -0
- package/dist/providers/ProductionConfigProvider.js +76 -0
- package/dist/providers/RequestProvider.d.ts +15 -0
- package/dist/providers/RequestProvider.js +35 -0
- package/dist/providers/RowsProvider.d.ts +14 -0
- package/dist/providers/RowsProvider.js +31 -0
- package/dist/utils/mathjaxUtils.d.ts +12 -0
- package/dist/utils/mathjaxUtils.js +24 -0
- package/dist/utils/utils.d.ts +31 -0
- package/dist/utils/utils.js +80 -0
- package/package.json +43 -21
- package/dist/components/App.js +0 -99
- package/dist/components/ConfigDict.js +0 -103
- package/dist/components/ConfigList.js +0 -94
- package/dist/components/ConfigNode.js +0 -320
- package/dist/components/ConfigValue.js +0 -86
- package/dist/components/Dataset.js +0 -67
- package/dist/components/Decay.js +0 -50
- package/dist/components/DecayItem.js +0 -101
- package/dist/components/DecayTag.js +0 -52
- package/dist/components/DecayTree.js +0 -451
- package/dist/components/DecaysList.js +0 -107
- package/dist/components/DescriptorsSearch.js +0 -352
- package/dist/components/EventTypeBadge.js +0 -45
- package/dist/components/ItemSearch.js +0 -120
- package/dist/components/LinesTable.js +0 -1105
- package/dist/components/ParticleTag.js +0 -54
- package/dist/components/SearchItem.js +0 -99
- package/dist/components/SelectParticle.js +0 -61
- package/dist/components/SelectTag.js +0 -66
- package/dist/components/SelectTool.js +0 -59
- package/dist/components/SelectVariables.js +0 -106
- package/dist/components/StrippingBadge.js +0 -64
- package/dist/components/StrippingLine.js +0 -50
- package/dist/components/TupleTool.js +0 -46
- package/dist/components/VariablesSearch.js +0 -128
- package/dist/config.json +0 -72
- package/dist/contexts/MetadataContext.js +0 -135
- package/dist/lib/BKPath.js +0 -58
- package/dist/lib/DTTConfig.js +0 -178
- package/dist/lib/mathjax.js +0 -35
- package/dist/lib/utils.js +0 -191
package/dist/lib/utils.js
DELETED
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.dec_to_options = dec_to_options;
|
|
7
|
-
exports.download = download;
|
|
8
|
-
exports.downloadBlob = downloadBlob;
|
|
9
|
-
exports.downloadConfig_old = downloadConfig_old;
|
|
10
|
-
exports.downloadZip = downloadZip;
|
|
11
|
-
exports.getDTreeName = getDTreeName;
|
|
12
|
-
exports.get_tupleTool_config = get_tupleTool_config;
|
|
13
|
-
exports.get_tupleTool_description = get_tupleTool_description;
|
|
14
|
-
exports.list_to_options = list_to_options;
|
|
15
|
-
exports.loadDict = loadDict;
|
|
16
|
-
exports.parse_searchitem_descriptions = parse_searchitem_descriptions;
|
|
17
|
-
exports.parse_tupleTools = parse_tupleTools;
|
|
18
|
-
exports.tupletools_to_option = tupletools_to_option;
|
|
19
|
-
var _mathjaxReact = require("mathjax-react");
|
|
20
|
-
var _pako = _interopRequireDefault(require("pako"));
|
|
21
|
-
var _config = _interopRequireDefault(require("../config"));
|
|
22
|
-
var _jszip = _interopRequireDefault(require("jszip"));
|
|
23
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
24
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
25
|
-
/*****************************************************************************\
|
|
26
|
-
* (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration *
|
|
27
|
-
* *
|
|
28
|
-
* This software is distributed under the terms of the GNU General Public *
|
|
29
|
-
* Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". *
|
|
30
|
-
* *
|
|
31
|
-
* In applying this licence, CERN does not waive the privileges and immunities *
|
|
32
|
-
* granted to it by virtue of its status as an Intergovernmental Organization *
|
|
33
|
-
* or submit itself to any jurisdiction. *
|
|
34
|
-
\*****************************************************************************/
|
|
35
|
-
|
|
36
|
-
async function loadDict(path) {
|
|
37
|
-
const url = _config.default["metadata_baseurl"] + path + ".json.gz";
|
|
38
|
-
const response = await fetch(url);
|
|
39
|
-
if (!response.ok) {
|
|
40
|
-
console.error(response);
|
|
41
|
-
return null;
|
|
42
|
-
}
|
|
43
|
-
const data = await response.arrayBuffer();
|
|
44
|
-
const unzipped = await _pako.default.inflate(new Uint8Array(data));
|
|
45
|
-
const decoded = new TextDecoder("utf-8").decode(unzipped);
|
|
46
|
-
const content = JSON.parse(decoded);
|
|
47
|
-
return content;
|
|
48
|
-
}
|
|
49
|
-
function dec_to_options(decays) {
|
|
50
|
-
const arr = decays.map(decay => Object({
|
|
51
|
-
value: decay.list.plain,
|
|
52
|
-
label: /*#__PURE__*/(0, _jsxRuntime.jsx)(_mathjaxReact.MathComponent, {
|
|
53
|
-
tex: decay.descriptors.latex,
|
|
54
|
-
display: false
|
|
55
|
-
})
|
|
56
|
-
}));
|
|
57
|
-
return arr;
|
|
58
|
-
}
|
|
59
|
-
function tupletools_to_option(toolDict) {
|
|
60
|
-
let arr = [];
|
|
61
|
-
Object.keys(toolDict).forEach(tool => {
|
|
62
|
-
arr.push({
|
|
63
|
-
value: toolDict[tool]["description"],
|
|
64
|
-
label: tool
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
return arr;
|
|
68
|
-
}
|
|
69
|
-
function list_to_options(lines) {
|
|
70
|
-
let arr = [];
|
|
71
|
-
lines.forEach(line => {
|
|
72
|
-
arr.push({
|
|
73
|
-
value: line,
|
|
74
|
-
label: line
|
|
75
|
-
});
|
|
76
|
-
});
|
|
77
|
-
return arr;
|
|
78
|
-
}
|
|
79
|
-
function parse_searchitem_descriptions(data) {
|
|
80
|
-
let arr = [];
|
|
81
|
-
Object.keys(data).forEach(name => {
|
|
82
|
-
arr.push({
|
|
83
|
-
[name]: data[name]["description"]
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
return arr;
|
|
87
|
-
}
|
|
88
|
-
function parse_tupleTools(data) {
|
|
89
|
-
let tupleTools = {};
|
|
90
|
-
Object.keys(data).forEach(item => {
|
|
91
|
-
tupleTools[item] = data[item]["description"];
|
|
92
|
-
});
|
|
93
|
-
return tupleTools;
|
|
94
|
-
}
|
|
95
|
-
function get_tupleTool_description(tool_name, data) {
|
|
96
|
-
let key_arr = Object.keys(data).filter(item => item === tool_name);
|
|
97
|
-
if (key_arr.length > 0) {
|
|
98
|
-
return data[key_arr[0]]["description"];
|
|
99
|
-
}
|
|
100
|
-
return "";
|
|
101
|
-
}
|
|
102
|
-
function get_tupleTool_config(tool_name, data) {
|
|
103
|
-
let key_arr = Object.keys(data).filter(item => item === tool_name);
|
|
104
|
-
if (key_arr.length > 0) {
|
|
105
|
-
return data[key_arr[0]]["description"];
|
|
106
|
-
}
|
|
107
|
-
return "";
|
|
108
|
-
}
|
|
109
|
-
function downloadConfig_old(output) {
|
|
110
|
-
let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "file.txt";
|
|
111
|
-
const blob = new Blob([output], {
|
|
112
|
-
type: "text/plain"
|
|
113
|
-
});
|
|
114
|
-
//if (
|
|
115
|
-
// window.navigator &&
|
|
116
|
-
// window.navigator.msSaveOrOpenBlob
|
|
117
|
-
//) return window.navigator.msSaveOrOpenBlob(blob);
|
|
118
|
-
|
|
119
|
-
// For other browsers:
|
|
120
|
-
// Create a link pointing to the ObjectURL containing the blob.
|
|
121
|
-
const data = window.URL.createObjectURL(blob);
|
|
122
|
-
const link = document.createElement("a");
|
|
123
|
-
link.href = data;
|
|
124
|
-
link.download = name;
|
|
125
|
-
|
|
126
|
-
// this is necessary as link.click() does not work on the latest firefox
|
|
127
|
-
link.dispatchEvent(new MouseEvent("click", {
|
|
128
|
-
bubbles: true,
|
|
129
|
-
cancelable: true,
|
|
130
|
-
view: window
|
|
131
|
-
}));
|
|
132
|
-
setTimeout(() => {
|
|
133
|
-
// For Firefox it is necessary to delay revoking the ObjectURL
|
|
134
|
-
window.URL.revokeObjectURL(data);
|
|
135
|
-
link.remove();
|
|
136
|
-
}, 100);
|
|
137
|
-
}
|
|
138
|
-
function downloadBlob(blob, name) {
|
|
139
|
-
// Convert your blob into a Blob URL (a special url that points to an object in the browser's memory)
|
|
140
|
-
const blobUrl = URL.createObjectURL(blob);
|
|
141
|
-
|
|
142
|
-
// Create a link element
|
|
143
|
-
const link = document.createElement("a");
|
|
144
|
-
|
|
145
|
-
// Set link's href to point to the Blob URL
|
|
146
|
-
link.href = blobUrl;
|
|
147
|
-
link.download = name;
|
|
148
|
-
|
|
149
|
-
// Append link to the body
|
|
150
|
-
document.body.appendChild(link);
|
|
151
|
-
|
|
152
|
-
// Dispatch click event on the link
|
|
153
|
-
// This is necessary as link.click() does not work on the latest firefox
|
|
154
|
-
link.dispatchEvent(new MouseEvent("click", {
|
|
155
|
-
bubbles: true,
|
|
156
|
-
cancelable: true,
|
|
157
|
-
view: window
|
|
158
|
-
}));
|
|
159
|
-
// Remove link from body
|
|
160
|
-
document.body.removeChild(link);
|
|
161
|
-
}
|
|
162
|
-
function download(output) {
|
|
163
|
-
let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "file.txt";
|
|
164
|
-
let type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "text/plain";
|
|
165
|
-
const blob = new Blob([output], {
|
|
166
|
-
type: type
|
|
167
|
-
});
|
|
168
|
-
downloadBlob(blob, name);
|
|
169
|
-
}
|
|
170
|
-
function downloadZip(files) {
|
|
171
|
-
let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "archive.zip";
|
|
172
|
-
const zip = (0, _jszip.default)();
|
|
173
|
-
files.forEach(_ref => {
|
|
174
|
-
let [name, output] = _ref;
|
|
175
|
-
const blob = new Blob([output], {
|
|
176
|
-
type: "text/plain"
|
|
177
|
-
});
|
|
178
|
-
zip.file(name, blob);
|
|
179
|
-
});
|
|
180
|
-
zip.generateAsync({
|
|
181
|
-
type: "blob"
|
|
182
|
-
}).then(blob => downloadBlob(blob, name));
|
|
183
|
-
}
|
|
184
|
-
function getDTreeName(mappedList) {
|
|
185
|
-
let name = "";
|
|
186
|
-
mappedList.forEach(part => {
|
|
187
|
-
name += part["particle"];
|
|
188
|
-
});
|
|
189
|
-
//let name = descriptor.split(' ').join('');
|
|
190
|
-
return name;
|
|
191
|
-
}
|