nmrium 0.20.1 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/component/1d/ExclusionZonesAnnotations.js +1 -2
- package/lib/component/1d/Integral.js +1 -6
- package/lib/component/1d/Viewer1D.js +4 -4
- package/lib/component/1d/ranges/RangeIntegral.js +2 -6
- package/lib/component/1d/utilities/scale.d.ts +1 -1
- package/lib/component/1d/utilities/scale.js +7 -6
- package/lib/component/2d/Viewer2D.js +5 -5
- package/lib/component/EventsTrackers/KeysListenerTracker.js +98 -81
- package/lib/component/NMRium.d.ts +9 -2
- package/lib/component/NMRium.js +9 -9
- package/lib/component/elements/EditableColumn.d.ts +1 -1
- package/lib/component/elements/NumberInput.d.ts +1 -2
- package/lib/component/elements/Tab/Tab.js +1 -0
- package/lib/component/header/Header.js +13 -10
- package/lib/component/hooks/useCheckExperimentalFeature.js +2 -1
- package/lib/component/hooks/useCheckToolsVisibility.d.ts +1 -0
- package/lib/component/hooks/useCheckToolsVisibility.js +6 -0
- package/lib/component/{1d/utilities → hooks}/useIntegralPath.d.ts +0 -0
- package/lib/component/hooks/useIntegralPath.js +53 -0
- package/lib/component/hooks/useToolsFunctions.js +6 -6
- package/lib/component/hooks/useXScale.d.ts +2 -0
- package/lib/component/hooks/useXScale.js +7 -0
- package/lib/component/loader/DropZone.js +88 -88
- package/lib/component/modal/changeSum/ChangeSumModal.js +4 -2
- package/lib/component/modal/editRange/forms/validation/EditRangeValidation.js +1 -1
- package/lib/component/modal/editZone/EditPathLengthFormik.d.ts +5 -0
- package/lib/component/modal/editZone/EditPathLengthFormik.js +72 -0
- package/lib/component/modal/editZone/EditZoneModal.d.ts +8 -0
- package/lib/component/modal/editZone/EditZoneModal.js +96 -0
- package/lib/component/modal/editZone/SignalFormTab.d.ts +6 -0
- package/lib/component/modal/editZone/SignalFormTab.js +6 -0
- package/lib/component/modal/editZone/SignalsForm.d.ts +2 -0
- package/lib/component/modal/editZone/SignalsForm.js +62 -0
- package/lib/component/modal/editZone/validation/EditZoneValidation.d.ts +534 -0
- package/lib/component/modal/editZone/validation/EditZoneValidation.js +17 -0
- package/lib/component/modal/editZone/validation/isDefaultPathLength.d.ts +3 -0
- package/lib/component/modal/editZone/validation/isDefaultPathLength.js +7 -0
- package/lib/component/modal/setting/ControllersTabContent.js +1 -1
- package/lib/component/modal/setting/DisplayTabContent.js +1 -1
- package/lib/component/modal/setting/GeneralSettings.d.ts +1 -2
- package/lib/component/modal/setting/GeneralSettings.js +13 -9
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignment.d.ts +2 -0
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignment.js +13 -0
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.d.ts +7 -0
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +38 -0
- package/lib/component/panels/IntegralsPanel/IntegralPanel.js +0 -3
- package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +4 -17
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js +1 -1
- package/lib/component/panels/Panels.d.ts +1 -1
- package/lib/component/panels/Panels.js +10 -14
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +0 -3
- package/lib/component/panels/PeaksPanel/PeaksPreferences.js +5 -14
- package/lib/component/panels/RangesPanel/RangesPanel.js +2 -5
- package/lib/component/panels/RangesPanel/RangesPreferences.js +5 -18
- package/lib/component/panels/SpectrumsPanel/SpectraPanelHeader.js +13 -3
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +7 -2
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +7 -2
- package/lib/component/panels/SummaryPanel/CorrelationTable/Constants.d.ts +1 -6
- package/lib/component/panels/SummaryPanel/CorrelationTable/Constants.js +1 -7
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.d.ts +2 -3
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.js +4 -5
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.d.ts +2 -3
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +21 -25
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditLinkModal.js +24 -30
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.d.ts +8 -0
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.js +89 -0
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.d.ts +6 -6
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +1 -1
- package/lib/component/panels/SummaryPanel/SummaryPanel.js +40 -43
- package/lib/component/panels/SummaryPanel/utilities/IsInView.d.ts +6 -0
- package/lib/component/panels/SummaryPanel/utilities/IsInView.js +16 -0
- package/lib/component/panels/SummaryPanel/utilities/Utilities.d.ts +29 -0
- package/lib/component/panels/SummaryPanel/{Utilities.js → utilities/Utilities.js} +155 -19
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.d.ts +1 -0
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +26 -3
- package/lib/component/panels/ZonesPanel/ZonesPanel.js +12 -7
- package/lib/component/panels/ZonesPanel/ZonesPreferences.js +5 -18
- package/lib/component/panels/ZonesPanel/ZonesTable.d.ts +3 -2
- package/lib/component/panels/ZonesPanel/ZonesTable.js +5 -2
- package/lib/component/panels/databasePanel/DatabasePanel.js +0 -3
- package/lib/component/panels/databasePanel/DatabasePreferences.js +4 -17
- package/lib/component/reducer/IgnoreActions.js +2 -1
- package/lib/component/reducer/Reducer.d.ts +20 -34
- package/lib/component/reducer/Reducer.js +7 -8
- package/lib/component/reducer/actions/CorrelationsActions.d.ts +7 -7
- package/lib/component/reducer/actions/CorrelationsActions.js +1 -1
- package/lib/component/reducer/actions/DatabaseActions.js +1 -1
- package/lib/component/reducer/actions/DomainActions.d.ts +3 -1
- package/lib/component/reducer/actions/DomainActions.js +20 -1
- package/lib/component/reducer/actions/IntegralsActions.js +2 -0
- package/lib/component/reducer/actions/LoadActions.js +22 -1
- package/lib/component/reducer/actions/PreferencesActions.js +0 -2
- package/lib/component/reducer/actions/RangesActions.js +3 -1
- package/lib/component/reducer/actions/SpectrumsActions.js +1 -1
- package/lib/component/reducer/actions/ToolsActions.js +43 -56
- package/lib/component/reducer/actions/ZonesActions.d.ts +3 -1
- package/lib/component/reducer/actions/ZonesActions.js +33 -2
- package/lib/component/reducer/helper/Zoom1DManager.d.ts +17 -21
- package/lib/component/reducer/helper/Zoom1DManager.js +53 -69
- package/lib/component/reducer/helper/ZoomHistoryManager.d.ts +1 -0
- package/lib/component/reducer/helper/ZoomHistoryManager.js +2 -1
- package/lib/component/reducer/preferencesReducer.d.ts +3 -8
- package/lib/component/reducer/preferencesReducer.js +87 -37
- package/lib/component/reducer/types/Types.d.ts +3 -1
- package/lib/component/reducer/types/Types.js +3 -1
- package/lib/component/toolbar/FunctionToolBar.js +7 -10
- package/lib/component/toolbar/ToolTypes.js +3 -3
- package/lib/component/workspaces/Workspace.d.ts +6 -0
- package/lib/component/workspaces/Workspace.js +1 -0
- package/lib/component/workspaces/basic.d.ts +2 -0
- package/lib/component/workspaces/basic.js +45 -0
- package/lib/component/workspaces/exercise1D.d.ts +2 -0
- package/lib/component/workspaces/exercise1D.js +45 -0
- package/lib/component/workspaces/index.d.ts +6 -0
- package/lib/component/workspaces/index.js +4 -0
- package/lib/component/workspaces/process1D.d.ts +2 -0
- package/lib/component/workspaces/process1D.js +43 -0
- package/lib/data/constants/DefaultPathLengths.d.ts +6 -0
- package/lib/data/constants/DefaultPathLengths.js +8 -0
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.d.ts +2 -0
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.js +4 -0
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +7 -19
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.d.ts +11 -0
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +11 -0
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +2 -21
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.d.ts +9 -0
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.js +7 -0
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.d.ts +2 -0
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.js +29 -0
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +13 -0
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.js +14 -0
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.js +13 -8
- package/lib/data/migration/MigrationManager.js +3 -0
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/ExclusionZonesAnnotations.js +1 -2
- package/lib-cjs/component/1d/Integral.js +1 -6
- package/lib-cjs/component/1d/Viewer1D.js +4 -4
- package/lib-cjs/component/1d/ranges/RangeIntegral.js +2 -6
- package/lib-cjs/component/1d/utilities/scale.js +7 -6
- package/lib-cjs/component/2d/Viewer2D.js +4 -4
- package/lib-cjs/component/EventsTrackers/KeysListenerTracker.js +98 -81
- package/lib-cjs/component/NMRium.js +10 -10
- package/lib-cjs/component/elements/Tab/Tab.js +1 -0
- package/lib-cjs/component/header/Header.js +13 -10
- package/lib-cjs/component/hooks/useCheckExperimentalFeature.js +5 -1
- package/lib-cjs/component/hooks/useCheckToolsVisibility.js +13 -0
- package/lib-cjs/component/hooks/useIntegralPath.js +56 -0
- package/lib-cjs/component/hooks/useToolsFunctions.js +6 -6
- package/lib-cjs/component/hooks/useXScale.js +11 -0
- package/lib-cjs/component/loader/DropZone.js +88 -88
- package/lib-cjs/component/modal/changeSum/ChangeSumModal.js +4 -2
- package/lib-cjs/component/modal/editRange/forms/validation/EditRangeValidation.js +1 -1
- package/lib-cjs/component/modal/editZone/EditPathLengthFormik.js +77 -0
- package/lib-cjs/component/modal/editZone/EditZoneModal.js +101 -0
- package/lib-cjs/component/modal/editZone/SignalFormTab.js +11 -0
- package/lib-cjs/component/modal/editZone/SignalsForm.js +67 -0
- package/lib-cjs/component/modal/editZone/validation/EditZoneValidation.js +38 -0
- package/lib-cjs/component/modal/editZone/validation/isDefaultPathLength.js +12 -0
- package/lib-cjs/component/modal/setting/ControllersTabContent.js +1 -1
- package/lib-cjs/component/modal/setting/DisplayTabContent.js +1 -1
- package/lib-cjs/component/modal/setting/GeneralSettings.js +12 -8
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignment.js +18 -0
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +43 -0
- package/lib-cjs/component/panels/IntegralsPanel/IntegralPanel.js +0 -3
- package/lib-cjs/component/panels/IntegralsPanel/IntegralsPreferences.js +3 -16
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +1 -1
- package/lib-cjs/component/panels/Panels.js +11 -15
- package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +0 -3
- package/lib-cjs/component/panels/PeaksPanel/PeaksPreferences.js +4 -13
- package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +2 -5
- package/lib-cjs/component/panels/RangesPanel/RangesPreferences.js +4 -17
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraPanelHeader.js +13 -3
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +7 -2
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +7 -2
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/Constants.js +1 -8
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.js +4 -5
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +21 -25
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/EditLinkModal.js +43 -30
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.js +94 -0
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +1 -1
- package/lib-cjs/component/panels/SummaryPanel/SummaryPanel.js +38 -41
- package/lib-cjs/component/panels/SummaryPanel/utilities/IsInView.js +18 -0
- package/lib-cjs/component/panels/SummaryPanel/{Utilities.js → utilities/Utilities.js} +157 -19
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +24 -1
- package/lib-cjs/component/panels/ZonesPanel/ZonesPanel.js +12 -7
- package/lib-cjs/component/panels/ZonesPanel/ZonesPreferences.js +4 -17
- package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +5 -2
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +0 -3
- package/lib-cjs/component/panels/databasePanel/DatabasePreferences.js +3 -16
- package/lib-cjs/component/reducer/IgnoreActions.js +2 -1
- package/lib-cjs/component/reducer/Reducer.js +7 -8
- package/lib-cjs/component/reducer/actions/DatabaseActions.js +2 -2
- package/lib-cjs/component/reducer/actions/DomainActions.js +21 -1
- package/lib-cjs/component/reducer/actions/IntegralsActions.js +2 -0
- package/lib-cjs/component/reducer/actions/LoadActions.js +22 -1
- package/lib-cjs/component/reducer/actions/PreferencesActions.js +0 -2
- package/lib-cjs/component/reducer/actions/RangesActions.js +2 -0
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +2 -2
- package/lib-cjs/component/reducer/actions/ToolsActions.js +50 -63
- package/lib-cjs/component/reducer/actions/ZonesActions.js +35 -2
- package/lib-cjs/component/reducer/helper/Zoom1DManager.js +55 -73
- package/lib-cjs/component/reducer/helper/ZoomHistoryManager.js +2 -1
- package/lib-cjs/component/reducer/preferencesReducer.js +87 -37
- package/lib-cjs/component/reducer/types/Types.js +6 -4
- package/lib-cjs/component/toolbar/FunctionToolBar.js +7 -10
- package/lib-cjs/component/toolbar/ToolTypes.js +3 -3
- package/lib-cjs/component/workspaces/Workspace.js +2 -0
- package/lib-cjs/component/workspaces/basic.js +48 -0
- package/lib-cjs/component/workspaces/exercise1D.js +48 -0
- package/lib-cjs/component/workspaces/index.js +6 -0
- package/lib-cjs/component/workspaces/process1D.js +46 -0
- package/lib-cjs/data/constants/DefaultPathLengths.js +10 -0
- package/lib-cjs/data/data1d/Spectrum1D/getSpectrumErrorValue.js +8 -0
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +7 -19
- package/lib-cjs/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +18 -0
- package/lib-cjs/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +2 -21
- package/lib-cjs/data/data1d/Spectrum1D/peaks/initiatePeaks.js +14 -0
- package/lib-cjs/data/data1d/Spectrum1D/peaks/mapPeaks.js +36 -0
- package/lib-cjs/data/data1d/Spectrum1D/ranges/initiateRanges.js +21 -0
- package/lib-cjs/data/data1d/Spectrum1D/ranges/mapRanges.js +13 -8
- package/lib-cjs/data/migration/MigrationManager.js +3 -0
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +15 -16
- package/lib/component/1d/utilities/useIntegralPath.js +0 -63
- package/lib/component/nmriumMode/basic.d.ts +0 -38
- package/lib/component/nmriumMode/basic.js +0 -37
- package/lib/component/nmriumMode/exercise1D.d.ts +0 -38
- package/lib/component/nmriumMode/exercise1D.js +0 -37
- package/lib/component/nmriumMode/process1D.d.ts +0 -38
- package/lib/component/nmriumMode/process1D.js +0 -37
- package/lib/component/panels/SummaryPanel/Utilities.d.ts +0 -25
- package/lib/component/reducer/actions/Zoom.d.ts +0 -16
- package/lib/component/reducer/actions/Zoom.js +0 -92
- package/lib-cjs/component/1d/utilities/useIntegralPath.js +0 -66
- package/lib-cjs/component/nmriumMode/basic.js +0 -39
- package/lib-cjs/component/nmriumMode/exercise1D.js +0 -39
- package/lib-cjs/component/nmriumMode/process1D.js +0 -39
- package/lib-cjs/component/reducer/actions/Zoom.js +0 -116
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const ml_spectra_processing_1 = require("ml-spectra-processing");
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const ChartContext_1 = require("../../context/ChartContext");
|
|
6
|
-
const ScaleContext_1 = require("../../context/ScaleContext");
|
|
7
|
-
const PathBuilder_1 = require("../../utility/PathBuilder");
|
|
8
|
-
const scale_1 = require("./scale");
|
|
9
|
-
function useIntegralPath(integralOptions) {
|
|
10
|
-
const { xDomain, height, yDomain, margin, verticalAlign, data, activeSpectrum, zoom, } = (0, ChartContext_1.useChartData)();
|
|
11
|
-
const { scaleX } = (0, ScaleContext_1.useScale)();
|
|
12
|
-
const scaleY = (0, react_1.useMemo)(() => {
|
|
13
|
-
const scale = zoom.integral.scales[activeSpectrum?.id || ''];
|
|
14
|
-
const scaledYDomain = (0, scale_1.reScaleY)(scale === undefined ? 1 : scale < 0.1 ? 0.05 : scale, {
|
|
15
|
-
domain: [yDomain[0], yDomain[1] / 20],
|
|
16
|
-
height,
|
|
17
|
-
margin,
|
|
18
|
-
});
|
|
19
|
-
return (0, scale_1.getYScale)({
|
|
20
|
-
height,
|
|
21
|
-
margin,
|
|
22
|
-
verticalAlign,
|
|
23
|
-
yDomain: scaledYDomain,
|
|
24
|
-
});
|
|
25
|
-
}, [
|
|
26
|
-
activeSpectrum?.id,
|
|
27
|
-
height,
|
|
28
|
-
margin,
|
|
29
|
-
verticalAlign,
|
|
30
|
-
yDomain,
|
|
31
|
-
zoom.integral.scales,
|
|
32
|
-
]);
|
|
33
|
-
const integral = (0, react_1.useMemo)(() => {
|
|
34
|
-
if (activeSpectrum) {
|
|
35
|
-
const { x, re } = data[activeSpectrum?.index].data;
|
|
36
|
-
const { from, to } = integralOptions;
|
|
37
|
-
return (0, ml_spectra_processing_1.xyIntegral)({ x, y: re }, {
|
|
38
|
-
from,
|
|
39
|
-
to,
|
|
40
|
-
reverse: true,
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
return { x: [], y: [] };
|
|
44
|
-
}, [activeSpectrum, data, integralOptions]);
|
|
45
|
-
const paths = (0, react_1.useMemo)(() => {
|
|
46
|
-
if (integral && scaleX) {
|
|
47
|
-
const xySeries = (0, ml_spectra_processing_1.xyReduce)(integral, {
|
|
48
|
-
from: xDomain[0],
|
|
49
|
-
to: xDomain[1],
|
|
50
|
-
nbPoints: 200,
|
|
51
|
-
optimize: true,
|
|
52
|
-
});
|
|
53
|
-
const pathBuilder = new PathBuilder_1.PathBuilder();
|
|
54
|
-
pathBuilder.moveTo(scaleX()(xySeries.x[0]), scaleY(xySeries.y[0]));
|
|
55
|
-
for (let i = 1; i < xySeries.x.length; i++) {
|
|
56
|
-
pathBuilder.lineTo(scaleX()(xySeries.x[i]), scaleY(xySeries.y[i]));
|
|
57
|
-
}
|
|
58
|
-
return pathBuilder.toString();
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
return '';
|
|
62
|
-
}
|
|
63
|
-
}, [integral, scaleX, scaleY, xDomain]);
|
|
64
|
-
return paths;
|
|
65
|
-
}
|
|
66
|
-
exports.default = useIntegralPath;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = {
|
|
4
|
-
general: {
|
|
5
|
-
disableMultipletAnalysis: false,
|
|
6
|
-
hideSetSumFromMolecule: false,
|
|
7
|
-
},
|
|
8
|
-
panels: {
|
|
9
|
-
hideSpectraPanel: false,
|
|
10
|
-
hideInformationPanel: false,
|
|
11
|
-
hidePeaksPanel: false,
|
|
12
|
-
hideIntegralsPanel: false,
|
|
13
|
-
hideRangesPanel: false,
|
|
14
|
-
hideStructuresPanel: false,
|
|
15
|
-
hideFiltersPanel: false,
|
|
16
|
-
hideZonesPanel: false,
|
|
17
|
-
hideSummaryPanel: true,
|
|
18
|
-
hideMultipleSpectraAnalysisPanel: true,
|
|
19
|
-
hideDatabasePanel: false,
|
|
20
|
-
},
|
|
21
|
-
toolBarButtons: {
|
|
22
|
-
hideZoomTool: false,
|
|
23
|
-
hideZoomOutTool: false,
|
|
24
|
-
hideImport: false,
|
|
25
|
-
hideExportAs: false,
|
|
26
|
-
hideSpectraStackAlignments: false,
|
|
27
|
-
hideSpectraCenterAlignments: false,
|
|
28
|
-
hideRealImaginary: false,
|
|
29
|
-
hidePeakTool: false,
|
|
30
|
-
hideIntegralTool: false,
|
|
31
|
-
hideAutoRangesTool: false,
|
|
32
|
-
hideZeroFillingTool: false,
|
|
33
|
-
hidePhaseCorrectionTool: false,
|
|
34
|
-
hideBaseLineCorrectionTool: false,
|
|
35
|
-
hideFFTTool: false,
|
|
36
|
-
hideMultipleSpectraAnalysisTool: false,
|
|
37
|
-
},
|
|
38
|
-
hideExperimentalFeatures: true,
|
|
39
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = {
|
|
4
|
-
general: {
|
|
5
|
-
disableMultipletAnalysis: true,
|
|
6
|
-
hideSetSumFromMolecule: false,
|
|
7
|
-
},
|
|
8
|
-
panels: {
|
|
9
|
-
hideSpectraPanel: false,
|
|
10
|
-
hideInformationPanel: false,
|
|
11
|
-
hidePeaksPanel: false,
|
|
12
|
-
hideIntegralsPanel: false,
|
|
13
|
-
hideRangesPanel: true,
|
|
14
|
-
hideStructuresPanel: false,
|
|
15
|
-
hideFiltersPanel: true,
|
|
16
|
-
hideZonesPanel: true,
|
|
17
|
-
hideSummaryPanel: true,
|
|
18
|
-
hideMultipleSpectraAnalysisPanel: true,
|
|
19
|
-
hideDatabasePanel: false,
|
|
20
|
-
},
|
|
21
|
-
toolBarButtons: {
|
|
22
|
-
hideZoomTool: false,
|
|
23
|
-
hideZoomOutTool: false,
|
|
24
|
-
hideImport: true,
|
|
25
|
-
hideExportAs: true,
|
|
26
|
-
hideSpectraStackAlignments: false,
|
|
27
|
-
hideSpectraCenterAlignments: false,
|
|
28
|
-
hideRealImaginary: true,
|
|
29
|
-
hidePeakTool: false,
|
|
30
|
-
hideIntegralTool: false,
|
|
31
|
-
hideAutoRangesTool: true,
|
|
32
|
-
hideZeroFillingTool: true,
|
|
33
|
-
hidePhaseCorrectionTool: true,
|
|
34
|
-
hideBaseLineCorrectionTool: true,
|
|
35
|
-
hideFFTTool: true,
|
|
36
|
-
hideMultipleSpectraAnalysisTool: true,
|
|
37
|
-
hideExclusionZonesTool: true,
|
|
38
|
-
},
|
|
39
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = {
|
|
4
|
-
general: {
|
|
5
|
-
disableMultipletAnalysis: true,
|
|
6
|
-
hideSetSumFromMolecule: false,
|
|
7
|
-
},
|
|
8
|
-
panels: {
|
|
9
|
-
hideSpectraPanel: false,
|
|
10
|
-
hideInformationPanel: false,
|
|
11
|
-
hidePeaksPanel: false,
|
|
12
|
-
hideIntegralsPanel: false,
|
|
13
|
-
hideRangesPanel: true,
|
|
14
|
-
hideStructuresPanel: false,
|
|
15
|
-
hideFiltersPanel: false,
|
|
16
|
-
hideZonesPanel: true,
|
|
17
|
-
hideSummaryPanel: true,
|
|
18
|
-
hideMultipleSpectraAnalysisPanel: true,
|
|
19
|
-
hideDatabasePanel: false,
|
|
20
|
-
},
|
|
21
|
-
toolBarButtons: {
|
|
22
|
-
hideZoomTool: false,
|
|
23
|
-
hideZoomOutTool: false,
|
|
24
|
-
hideImport: true,
|
|
25
|
-
hideExportAs: true,
|
|
26
|
-
hideSpectraStackAlignments: false,
|
|
27
|
-
hideSpectraCenterAlignments: false,
|
|
28
|
-
hideRealImaginary: false,
|
|
29
|
-
hidePeakTool: false,
|
|
30
|
-
hideIntegralTool: false,
|
|
31
|
-
hideAutoRangesTool: true,
|
|
32
|
-
hideZeroFillingTool: false,
|
|
33
|
-
hidePhaseCorrectionTool: false,
|
|
34
|
-
hideBaseLineCorrectionTool: false,
|
|
35
|
-
hideFFTTool: false,
|
|
36
|
-
hideMultipleSpectraAnalysisTool: true,
|
|
37
|
-
hideExclusionZonesTool: true,
|
|
38
|
-
},
|
|
39
|
-
};
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.setZoom1D = exports.setZoom = exports.wheel = exports.ZoomType = void 0;
|
|
23
|
-
const d3_1 = require("d3");
|
|
24
|
-
const Zoom1DManager_1 = __importStar(require("../helper/Zoom1DManager"));
|
|
25
|
-
exports.ZoomType = {
|
|
26
|
-
HORIZONTAL: 'HORIZONTAL',
|
|
27
|
-
VERTICAL: 'VERTICAL',
|
|
28
|
-
STEP_HORIZONTAL: 'STEP_HORIZONTAL',
|
|
29
|
-
FULL: 'FULL',
|
|
30
|
-
};
|
|
31
|
-
function wheel(deltaY, deltaMode, draft, id = null) {
|
|
32
|
-
if (draft.activeSpectrum?.id || id) {
|
|
33
|
-
(0, Zoom1DManager_1.default)(draft.zoom.spectra).wheel(deltaY, id || draft.activeSpectrum?.id);
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
const zoomManager = (0, Zoom1DManager_1.default)(draft.zoom.spectra);
|
|
37
|
-
draft.data.forEach((datum) => {
|
|
38
|
-
if (datum.info.dimension === 1 &&
|
|
39
|
-
draft.activeTab === datum.info.nucleus) {
|
|
40
|
-
zoomManager.wheel(deltaY, datum.id);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
exports.wheel = wheel;
|
|
46
|
-
function setZoom(draft, options = {}) {
|
|
47
|
-
const { height, margin, activeSpectrum } = draft;
|
|
48
|
-
const { scale = null, spectrumID = null } = options;
|
|
49
|
-
if (scale && !spectrumID) {
|
|
50
|
-
(0, Zoom1DManager_1.setAllScales)(draft.zoom.spectra, scale);
|
|
51
|
-
}
|
|
52
|
-
const zoomManager = (0, Zoom1DManager_1.default)(draft.zoom.spectra);
|
|
53
|
-
if (activeSpectrum === null && spectrumID === null) {
|
|
54
|
-
const { shareYDomain, yDomain, yDomains } = draft.originDomain;
|
|
55
|
-
draft.yDomains = Object.keys(draft.yDomains).reduce((acc, id) => {
|
|
56
|
-
const scale = zoomManager.getScale(id);
|
|
57
|
-
const _scale = (0, d3_1.scaleLinear)(shareYDomain ? yDomain : yDomains[id], [
|
|
58
|
-
height - margin.bottom,
|
|
59
|
-
margin.top,
|
|
60
|
-
]);
|
|
61
|
-
const [min, max] = shareYDomain ? yDomain : yDomains[id];
|
|
62
|
-
const maxPoint = Math.max(Math.abs(max), Math.abs(min));
|
|
63
|
-
const scalePoint = maxPoint === max ? 0 : min;
|
|
64
|
-
const t = d3_1.zoomIdentity
|
|
65
|
-
.translate(0, Math.sign(scalePoint) >= 0 ? _scale(scalePoint) : _scale(scalePoint))
|
|
66
|
-
.scale(scale)
|
|
67
|
-
.translate(0, -_scale(0));
|
|
68
|
-
const newYDomain = t.rescaleY(_scale).domain();
|
|
69
|
-
acc[id] = newYDomain;
|
|
70
|
-
return acc;
|
|
71
|
-
}, {});
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
const spectrumId = spectrumID || activeSpectrum?.id;
|
|
75
|
-
if (spectrumId) {
|
|
76
|
-
if (scale) {
|
|
77
|
-
zoomManager.setScale(scale, spectrumId);
|
|
78
|
-
}
|
|
79
|
-
const scaleFactor = scale ? scale : zoomManager.getScale(spectrumId);
|
|
80
|
-
const _scale = (0, d3_1.scaleLinear)(draft.originDomain.yDomains[spectrumId], [
|
|
81
|
-
height - margin.bottom,
|
|
82
|
-
margin.top,
|
|
83
|
-
]);
|
|
84
|
-
const t = d3_1.zoomIdentity
|
|
85
|
-
.translate(0, _scale(0))
|
|
86
|
-
.scale(scaleFactor)
|
|
87
|
-
.translate(0, -_scale(0));
|
|
88
|
-
const yDomain = t.rescaleY(_scale).domain();
|
|
89
|
-
draft.yDomains = {
|
|
90
|
-
...draft.yDomains,
|
|
91
|
-
[spectrumId]: yDomain,
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
exports.setZoom = setZoom;
|
|
97
|
-
function setZoom1D(draft, height, margin, index, defaultScale) {
|
|
98
|
-
const { originDomain, tabActiveSpectrum, activeTab } = draft;
|
|
99
|
-
const { id } = tabActiveSpectrum[activeTab.split(',')[index]];
|
|
100
|
-
const { setScale, getScale } = (0, Zoom1DManager_1.default)(draft.zoom.spectra);
|
|
101
|
-
if (defaultScale) {
|
|
102
|
-
setScale(defaultScale, id);
|
|
103
|
-
}
|
|
104
|
-
const scale = getScale(id);
|
|
105
|
-
const _scale = (0, d3_1.scaleLinear)(originDomain.yDomains[id], [
|
|
106
|
-
height - margin,
|
|
107
|
-
margin,
|
|
108
|
-
]);
|
|
109
|
-
const t = d3_1.zoomIdentity
|
|
110
|
-
.translate(0, _scale(0))
|
|
111
|
-
.scale(scale)
|
|
112
|
-
.translate(0, -_scale(0));
|
|
113
|
-
let yDomain = t.rescaleY(_scale).domain();
|
|
114
|
-
draft.yDomains[id] = yDomain;
|
|
115
|
-
}
|
|
116
|
-
exports.setZoom1D = setZoom1D;
|