nmrium 0.51.0 → 0.52.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.
Files changed (98) hide show
  1. package/lib/component/1d/LinesSeries.js +1 -1
  2. package/lib/component/EventsTrackers/KeysListenerTracker.js +3 -3
  3. package/lib/component/context/DispatchContext.d.ts +1 -1
  4. package/lib/component/elements/Label.js +1 -1
  5. package/lib/component/header/ApodizationOptionsPanel.js +1 -1
  6. package/lib/component/header/AutoPeakPickingOptionPanel.js +1 -1
  7. package/lib/component/header/BaseLineCorrectionPanel.js +2 -2
  8. package/lib/component/header/Header.js +1 -1
  9. package/lib/component/header/PhaseCorrectionPanel.js +1 -1
  10. package/lib/component/header/PhaseCorrectionTwoDimensionsPanel.js +2 -2
  11. package/lib/component/header/RangesPickingOptionPanel.js +1 -1
  12. package/lib/component/header/ZeroFillingOptionsPanel.js +1 -1
  13. package/lib/component/header/Zones2DOptionPanel.js +6 -2
  14. package/lib/component/hooks/useToolsFunctions.d.ts +1 -1
  15. package/lib/component/hooks/useToolsFunctions.js +3 -3
  16. package/lib/component/modal/AboutPredictionModal.js +1 -1
  17. package/lib/component/modal/AboutSpectrumSimulationModal.js +1 -1
  18. package/lib/component/modal/EditPeakShapeModal.js +1 -1
  19. package/lib/component/modal/LoadJCAMPModal.js +1 -1
  20. package/lib/component/modal/LogsHistoryModal.js +1 -1
  21. package/lib/component/modal/MultipletAnalysisModal.js +1 -1
  22. package/lib/component/modal/SaveAsModal.js +2 -2
  23. package/lib/component/modal/editZone/EditPathLengthFormik.js +2 -2
  24. package/lib/component/modal/editZone/EditZoneModal.js +1 -1
  25. package/lib/component/modal/metaImportation/MetaImportationModal.js +1 -1
  26. package/lib/component/modal/setting/GeneralSettings.js +2 -2
  27. package/lib/component/modal/setting/settings-tabs/GeneralTabContent.js +1 -1
  28. package/lib/component/modal/setting/settings-tabs/InfoBlockTabContent.js +1 -1
  29. package/lib/component/modal/setting/settings-tabs/OnLoadProcessingTabContent.js +1 -1
  30. package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +1 -1
  31. package/lib/component/panels/Panels.js +5 -5
  32. package/lib/component/panels/RangesPanel/RangesPanel.js +1 -1
  33. package/lib/component/panels/RangesPanel/RangesPreferences.js +1 -1
  34. package/lib/component/panels/SpectraPanel/SpectraPanelHeader.d.ts +5 -0
  35. package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/SpectraPanelHeader.js +8 -8
  36. package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/SpectraTable.js +1 -1
  37. package/lib/component/panels/SpectraPanel/SpectraTabs.d.ts +1 -0
  38. package/lib/component/panels/{SpectrumsPanel/SpectrumsTabs.js → SpectraPanel/SpectraTabs.js} +6 -6
  39. package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/SpectrumListPanel.js +2 -2
  40. package/lib/component/panels/databasePanel/DatabasePreferences.js +1 -1
  41. package/lib/component/panels/header/SpectraAutomaticPickingButton.js +1 -1
  42. package/lib/component/panels/multipleAnalysisPanel/AlignSpectra.js +1 -1
  43. package/lib/component/panels/multipleAnalysisPanel/AnalysisChart.js +2 -2
  44. package/lib/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisPanel.js +1 -1
  45. package/lib/component/panels/multipleAnalysisPanel/preferences/index.js +1 -1
  46. package/lib/component/panels/predictionPanel/PredictionOptionsPanel.js +2 -2
  47. package/lib/component/panels/predictionPanel/PredictionSimpleOptions.js +1 -1
  48. package/lib/component/panels/spectrumSimulation/SpectrumSimulationPreferences.js +1 -1
  49. package/lib/component/panels/spectrumSimulation/SpectrumSimulationSimpleOptions.js +1 -1
  50. package/lib/component/reducer/IgnoreActions.js +1 -1
  51. package/lib/component/reducer/Reducer.d.ts +1 -0
  52. package/lib/component/reducer/Reducer.js +17 -16
  53. package/lib/component/reducer/actions/DomainActions.js +3 -3
  54. package/lib/component/reducer/actions/LoadActions.js +1 -1
  55. package/lib/component/reducer/actions/PreferencesActions.js +2 -2
  56. package/lib/component/reducer/actions/ToolsActions.d.ts +3 -3
  57. package/lib/component/reducer/actions/ToolsActions.js +8 -8
  58. package/lib/component/reducer/actions/ZonesActions.d.ts +2 -0
  59. package/lib/component/reducer/actions/ZonesActions.js +5 -1
  60. package/lib/component/toolbar/ToolBar.js +15 -15
  61. package/lib/component/toolbar/toolbarMenu.js +4 -4
  62. package/lib/constants.js +5 -5
  63. package/lib/data/data2d/Spectrum2D/getSlice.js +1 -1
  64. package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.d.ts +1 -0
  65. package/lib/versionInfo.js +1 -1
  66. package/package.json +2 -1
  67. package/lib/component/panels/SpectrumsPanel/SpectraPanelHeader.d.ts +0 -5
  68. package/lib/component/panels/SpectrumsPanel/SpectrumsTabs.d.ts +0 -1
  69. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/SpectraPreferences.d.ts +0 -0
  70. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/SpectraPreferences.js +0 -0
  71. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/SpectraTable.d.ts +0 -0
  72. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/SpectrumListPanel.d.ts +0 -0
  73. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/ColorIndicator.d.ts +0 -0
  74. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/ColorIndicator.js +0 -0
  75. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/RenderAsHTML.d.ts +0 -0
  76. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/RenderAsHTML.js +0 -0
  77. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/ShowHideSpectrumButton.d.ts +0 -0
  78. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/ShowHideSpectrumButton.js +0 -0
  79. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/SpectraColumnsManager.d.ts +0 -0
  80. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/SpectraColumnsManager.js +0 -0
  81. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/SpectrumName.d.ts +0 -0
  82. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/SpectrumName.js +0 -0
  83. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/PlotChart.d.ts +0 -0
  84. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/PlotChart.js +0 -0
  85. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum1DHistogram.d.ts +0 -0
  86. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum1DHistogram.js +0 -0
  87. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum1DSetting.d.ts +0 -0
  88. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum1DSetting.js +0 -0
  89. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum2DHistogram.d.ts +0 -0
  90. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum2DHistogram.js +0 -0
  91. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum2DSetting.d.ts +0 -0
  92. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum2DSetting.js +0 -0
  93. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/SpectrumSetting.d.ts +0 -0
  94. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/SpectrumSetting.js +0 -0
  95. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/processSnapPlot.d.ts +0 -0
  96. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/processSnapPlot.js +0 -0
  97. /package/lib/component/reducer/actions/{SpectrumsActions.d.ts → SpectraActions.d.ts} +0 -0
  98. /package/lib/component/reducer/actions/{SpectrumsActions.js → SpectraActions.js} +0 -0
@@ -49,7 +49,7 @@ var SpectraContextMenuOptionsKeys;
49
49
  })(SpectraContextMenuOptionsKeys || (SpectraContextMenuOptionsKeys = {}));
50
50
  const Spectra2DContextMenuOptions = [
51
51
  {
52
- text: 'Copy to Clipboard',
52
+ text: 'Copy to clipboard',
53
53
  icon: _jsx(FaCopy, {}),
54
54
  data: { id: SpectraContextMenuOptionsKeys.CopyToClipboard },
55
55
  },
@@ -0,0 +1 @@
1
+ export default function SpectraTabs(): import("@emotion/react/jsx-runtime").JSX.Element;
@@ -11,12 +11,12 @@ import { useSetActiveSpectrumAction } from '../../hooks/useSetActiveSpectrumActi
11
11
  import groupByInfoKey from '../../utility/GroupByInfoKey';
12
12
  import { SpectraTable } from './SpectraTable';
13
13
  import SpectrumSetting from './base/setting/SpectrumSetting';
14
- function SpectrumsTabsInner({ data, activeSpectra, activeTab, }) {
14
+ function SpectraTabsInner({ data, activeSpectra, activeTab, }) {
15
15
  const [selectedSpectrumData, setSelectedSpectrum] = useState(null);
16
16
  const [settingModalPosition, setSettingModalPosition] = useState(null);
17
17
  const [isSettingModalDisplayed, setIsSettingModalDisplayed] = useState(false);
18
18
  const dispatch = useDispatch();
19
- const spectrumsGroupByNucleus = useMemo(() => {
19
+ const spectraGroupByNucleus = useMemo(() => {
20
20
  if (!data)
21
21
  return [];
22
22
  const groupByNucleus = groupByInfoKey('nucleus');
@@ -54,11 +54,11 @@ function SpectrumsTabsInner({ data, activeSpectra, activeTab, }) {
54
54
  tbody tr {
55
55
  height: 20px;
56
56
  }
57
- `, children: [_jsx(Tabs, { activeTab: activeTab, onClick: onTabChangeHandler, children: spectrumsGroupByNucleus &&
58
- Object.keys(spectrumsGroupByNucleus).map((nucleus) => (_jsx(Tab, { render: ({ title }) => _jsx(IsotopesViewer, { value: title }), title: nucleus, tabid: nucleus, children: _jsx(SpectraTable, { nucleus: nucleus, data: spectrumsGroupByNucleus[nucleus], activeSpectra: activeSpectra?.[nucleus] || null, onChangeVisibility: handleChangeVisibility, onChangeActiveSpectrum: handleChangeActiveSpectrum, onOpenSettingModal: openSettingHandler }) }, nucleus))) }, activeTab), isSettingModalDisplayed ? (_jsx(SpectrumSetting, { onClose: mouseLeaveHandler, data: selectedSpectrumData, position: settingModalPosition })) : null] }));
57
+ `, children: [_jsx(Tabs, { activeTab: activeTab, onClick: onTabChangeHandler, children: spectraGroupByNucleus &&
58
+ Object.keys(spectraGroupByNucleus).map((nucleus) => (_jsx(Tab, { render: ({ title }) => _jsx(IsotopesViewer, { value: title }), title: nucleus, tabid: nucleus, children: _jsx(SpectraTable, { nucleus: nucleus, data: spectraGroupByNucleus[nucleus], activeSpectra: activeSpectra?.[nucleus] || null, onChangeVisibility: handleChangeVisibility, onChangeActiveSpectrum: handleChangeActiveSpectrum, onOpenSettingModal: openSettingHandler }) }, nucleus))) }, activeTab), isSettingModalDisplayed ? (_jsx(SpectrumSetting, { onClose: mouseLeaveHandler, data: selectedSpectrumData, position: settingModalPosition })) : null] }));
59
59
  }
60
- const MemoizedSpectra = memo(SpectrumsTabsInner);
61
- export default function SpectrumsTabs() {
60
+ const MemoizedSpectra = memo(SpectraTabsInner);
61
+ export default function SpectraTabs() {
62
62
  const { data, view: { spectra: { activeTab, activeSpectra }, }, } = useChartData();
63
63
  return _jsx(MemoizedSpectra, { data, activeSpectra, activeTab });
64
64
  }
@@ -3,7 +3,7 @@ import { memo, useState, useRef } from 'react';
3
3
  import PreferencesHeader from '../header/PreferencesHeader';
4
4
  import SpectraPanelHeader from './SpectraPanelHeader';
5
5
  import SpectraPreferences from './SpectraPreferences';
6
- import SpectrumsTabs from './SpectrumsTabs';
6
+ import SpectraTabs from './SpectraTabs';
7
7
  const styles = {
8
8
  overflow: 'hidden',
9
9
  height: '100%',
@@ -23,6 +23,6 @@ function SpectrumListPanel() {
23
23
  setFlipStatus(!isFlipped);
24
24
  }
25
25
  }
26
- return (_jsx("div", { style: styles, children: isFlipped ? (_jsxs(_Fragment, { children: [_jsx(PreferencesHeader, { onSave: saveSettingHandler, onClose: settingsPanelHandler }), _jsx(SpectraPreferences, { ref: settingsRef })] })) : (_jsxs(_Fragment, { children: [_jsx(SpectraPanelHeader, { onSettingClick: settingsPanelHandler }), _jsx(SpectrumsTabs, {})] })) }));
26
+ return (_jsx("div", { style: styles, children: isFlipped ? (_jsxs(_Fragment, { children: [_jsx(PreferencesHeader, { onSave: saveSettingHandler, onClose: settingsPanelHandler }), _jsx(SpectraPreferences, { ref: settingsRef })] })) : (_jsxs(_Fragment, { children: [_jsx(SpectraPanelHeader, { onSettingClick: settingsPanelHandler }), _jsx(SpectraTabs, {})] })) }));
27
27
  }
28
28
  export default memo(SpectrumListPanel);
@@ -27,6 +27,6 @@ function DatabasePreferences(props, ref) {
27
27
  formRef.current.submitForm();
28
28
  },
29
29
  }));
30
- return (_jsx(PreferencesContainer, { children: _jsx(Formik, { initialValues: {}, onSubmit: saveHandler, innerRef: formRef, children: _jsxs(_Fragment, { children: [_jsxs(PreferencesGroup, { children: [_jsx(FormikColumnFormatField, { label: "Preview jcamp", checkControllerName: "previewJcamp", hideFormatField: true }), _jsx(Label, { title: "Color", style: formatFieldLabelStyle, children: _jsx(FormikColorPickerDropdown, { name: "color" }) }), _jsx(Label, { title: "Margin bottom (px) :", style: formatFieldLabelStyle, children: _jsx(FormikInput, { name: "marginBottom", type: "number", style: formatFieldInputStyle }) })] }), _jsxs(PreferencesGroup, { header: "Table Preferences", children: [_jsx(FormikColumnFormatField, { label: "Structure", checkControllerName: "showSmiles", hideFormatField: true }), _jsx(FormikColumnFormatField, { label: "Solvent", checkControllerName: "showSolvent", hideFormatField: true }), _jsx(FormikColumnFormatField, { label: "Names", checkControllerName: "showNames", hideFormatField: true }), _jsx(FormikColumnFormatField, { label: "Range", checkControllerName: "range.show", formatControllerName: "range.format" }), _jsx(FormikColumnFormatField, { label: "\u03B4 (ppm)", checkControllerName: "delta.show", formatControllerName: "delta.format" }), _jsx(FormikColumnFormatField, { label: "Assignment", checkControllerName: "showAssignment", hideFormatField: true }), _jsx(FormikColumnFormatField, { label: "J (Hz)", checkControllerName: "coupling.show", formatControllerName: "coupling.format" }), _jsx(FormikColumnFormatField, { label: "Multiplicity", checkControllerName: "showMultiplicity", hideFormatField: true }), _jsx(FormikColumnFormatField, { label: "Save as nmrium", checkControllerName: "allowSaveAsNMRium", hideFormatField: true })] })] }) }) }));
30
+ return (_jsx(PreferencesContainer, { children: _jsx(Formik, { initialValues: {}, onSubmit: saveHandler, innerRef: formRef, children: _jsxs(_Fragment, { children: [_jsxs(PreferencesGroup, { children: [_jsx(FormikColumnFormatField, { label: "Preview jcamp", checkControllerName: "previewJcamp", hideFormatField: true }), _jsx(Label, { title: "Color", style: formatFieldLabelStyle, children: _jsx(FormikColorPickerDropdown, { name: "color" }) }), _jsx(Label, { title: "Margin bottom (px):", style: formatFieldLabelStyle, children: _jsx(FormikInput, { name: "marginBottom", type: "number", style: formatFieldInputStyle }) })] }), _jsxs(PreferencesGroup, { header: "Table Preferences", children: [_jsx(FormikColumnFormatField, { label: "Structure", checkControllerName: "showSmiles", hideFormatField: true }), _jsx(FormikColumnFormatField, { label: "Solvent", checkControllerName: "showSolvent", hideFormatField: true }), _jsx(FormikColumnFormatField, { label: "Names", checkControllerName: "showNames", hideFormatField: true }), _jsx(FormikColumnFormatField, { label: "Range", checkControllerName: "range.show", formatControllerName: "range.format" }), _jsx(FormikColumnFormatField, { label: "\u03B4 (ppm)", checkControllerName: "delta.show", formatControllerName: "delta.format" }), _jsx(FormikColumnFormatField, { label: "Assignment", checkControllerName: "showAssignment", hideFormatField: true }), _jsx(FormikColumnFormatField, { label: "J (Hz)", checkControllerName: "coupling.show", formatControllerName: "coupling.format" }), _jsx(FormikColumnFormatField, { label: "Multiplicity", checkControllerName: "showMultiplicity", hideFormatField: true }), _jsx(FormikColumnFormatField, { label: "Save as nmrium", checkControllerName: "allowSaveAsNMRium", hideFormatField: true })] })] }) }) }));
31
31
  }
32
32
  export default forwardRef(DatabasePreferences);
@@ -27,5 +27,5 @@ export function SpectraAutomaticPickingButton() {
27
27
  !isToolVisible('autoRangeAndZonePicking')) {
28
28
  return null;
29
29
  }
30
- return (_jsx(Toolbar.Item, { icon: _jsx(SvgNmrRangePicking, {}), title: "Automatic Ranges/Zones picking for all spectra", onClick: automaticPickingHandler }));
30
+ return (_jsx(Toolbar.Item, { icon: _jsx(SvgNmrRangePicking, {}), title: "Automatic ranges/zones picking for all spectra", onClick: automaticPickingHandler }));
31
31
  }
@@ -131,6 +131,6 @@ function AlignSpectra({ onClose = () => null, nucleus }) {
131
131
  padding-top: 5px;
132
132
  }
133
133
  `;
134
- return (_jsx("div", { css: styles, children: _jsx(Formik, { initialValues: options, enableReinitialize: true, onSubmit: submitHandler, validationSchema: schemaValidation, validate: () => setError(''), children: ({ submitForm }) => (_jsxs(_Fragment, { children: [_jsxs("div", { className: "body", style: { flex: 1 }, children: [_jsx("div", { className: "header", children: _jsx("span", { children: "Spectra calibration" }) }), error && _jsx(Message, { type: "error", children: error }), _jsx(Label, { title: "Options", style: labelStyle, children: _jsx(Select, { items: List, style: { width: '100%', height: 30 }, onChange: optionChangeHandler }) }), _jsxs(Label, { title: "Range", style: labelStyle, children: [_jsx(Label, { title: "From", children: _jsx(FormikInput, { name: "from", type: "number", style: inputStyle }) }), _jsx(Label, { title: "To", style: { label: { padding: '0 10px' } }, children: _jsx(FormikInput, { name: "to", type: "number", style: inputStyle }) })] }), _jsx(Label, { title: "Number of Peaks", style: labelStyle, children: _jsx(FormikInput, { name: "nbPeaks", type: "number", style: inputStyle }) }), _jsx(Label, { title: "Target PPM", style: labelStyle, children: _jsx(FormikInput, { name: "targetX", type: "number", style: inputStyle }) })] }), _jsx("div", { className: "footer", children: _jsx(ActionButtons, { onDone: submitForm, onCancel: onClose }) })] })) }) }));
134
+ return (_jsx("div", { css: styles, children: _jsx(Formik, { initialValues: options, enableReinitialize: true, onSubmit: submitHandler, validationSchema: schemaValidation, validate: () => setError(''), children: ({ submitForm }) => (_jsxs(_Fragment, { children: [_jsxs("div", { className: "body", style: { flex: 1 }, children: [_jsx("div", { className: "header", children: _jsx("span", { children: "Spectra calibration" }) }), error && _jsx(Message, { type: "error", children: error }), _jsx(Label, { title: "Options", style: labelStyle, children: _jsx(Select, { items: List, style: { width: '100%', height: 30 }, onChange: optionChangeHandler }) }), _jsxs(Label, { title: "Range", style: labelStyle, children: [_jsx(Label, { title: "From", children: _jsx(FormikInput, { name: "from", type: "number", style: inputStyle }) }), _jsx(Label, { title: "To", style: { label: { padding: '0 10px' } }, children: _jsx(FormikInput, { name: "to", type: "number", style: inputStyle }) })] }), _jsx(Label, { title: "Number of peaks", style: labelStyle, children: _jsx(FormikInput, { name: "nbPeaks", type: "number", style: inputStyle }) }), _jsx(Label, { title: "Target PPM", style: labelStyle, children: _jsx(FormikInput, { name: "targetX", type: "number", style: inputStyle }) })] }), _jsx("div", { className: "footer", children: _jsx(ActionButtons, { onDone: submitForm, onCancel: onClose }) })] })) }) }));
135
135
  }
136
136
  export default AlignSpectra;
@@ -100,9 +100,9 @@ export default function AnalysisChart(props) {
100
100
  const plotData = usePlotData(spectraAnalysisData, { ...plotOptions, paths });
101
101
  const xLabel = paths?.[plotOptions.xPath]?.at(-1) || '';
102
102
  const yLabel = paths?.[plotOptions.yPath]?.at(-1) || '';
103
- return (_jsxs("div", { children: [_jsxs("div", { style: { display: 'flex', padding: '5px' }, children: [_jsx(Label, { title: "X ", children: _jsx(Input, { name: "xPath", style: {
103
+ return (_jsxs("div", { children: [_jsxs("div", { style: { display: 'flex', padding: '5px' }, children: [_jsx(Label, { title: "X", children: _jsx(Input, { name: "xPath", style: {
104
104
  input: { padding: '5px' },
105
- }, value: plotOptions.xPath, datalist: datalist, onChange: handleChangeKey }) }), _jsx(Label, { title: "Y ", style: { container: { paddingLeft: '5px' } }, children: _jsx(Input, { name: "yPath", style: {
105
+ }, value: plotOptions.xPath, datalist: datalist, onChange: handleChangeKey }) }), _jsx(Label, { title: "Y", style: { container: { paddingLeft: '5px' } }, children: _jsx(Input, { name: "yPath", style: {
106
106
  input: { padding: '5px' },
107
107
  }, value: plotOptions.yPath, datalist: datalist, onChange: handleChangeKey }) }), _jsx(Button.BarButton, { toolTip: "Copy chart to clipboard", onClick: handleCopy, children: _jsx(FaFileExport, {}) })] }), _jsx("div", { style: {
108
108
  width: '100%',
@@ -61,7 +61,7 @@ function MultipleSpectraAnalysisPanelInner({ activeTab, spectra, showLegend, dis
61
61
  let lefButtons = [
62
62
  {
63
63
  icon: _jsx(FaFileExport, {}),
64
- title: 'Copy To Clipboard',
64
+ title: 'Copy to clipboard',
65
65
  onClick: copyToClipboardHandler,
66
66
  },
67
67
  ];
@@ -57,7 +57,7 @@ function MultipleSpectraAnalysisPreferences({ data, activeTab, onAfterSave }, re
57
57
  }, children: _jsx(LegendsPreferences, {}) }), _jsx(GroupPane, { text: "General", style: {
58
58
  header: { color: 'black' },
59
59
  container: { padding: '5px' },
60
- }, children: _jsx(Label, { title: "Enable resort spectra", htmlFor: "resortSpectra", children: _jsx(FormikCheckBox, { name: "resortSpectra" }) }) }), _jsx(GroupPane, { text: "Columns Settings ", style: {
60
+ }, children: _jsx(Label, { title: "Enable resort spectra", children: _jsx(FormikCheckBox, { name: "resortSpectra" }) }) }), _jsx(GroupPane, { text: "Columns Settings ", style: {
61
61
  header: { color: 'black' },
62
62
  container: { padding: '5px' },
63
63
  }, children: _jsx(AnalysisTablePreferences, {}) }), isExperimental && (_jsx(GroupPane, { text: "Execute code ", style: {
@@ -79,9 +79,9 @@ function PredictionOptionsPanel(props, ref) {
79
79
  const { options, onSubmit, hideName = false } = props;
80
80
  return (_jsx(Formik, { initialValues: options, validationSchema: predictionFormValidation, enableReinitialize: true, onSubmit: onSubmit, innerRef: ref, children: _jsxs(_Fragment, { children: [_jsx(FormikErrorsSummary, {}), !hideName && (_jsx(Label, { title: "Name", style: labelStyle, children: _jsx(FormikInput, { name: "name", style: inputStyle }) })), _jsx(Label, { title: "Frequency", style: labelStyle, children: _jsx(FormikSelect, { items: FREQUENCIES, style: styles.select, name: "frequency" }) }), _jsxs(GroupPane, { text: "1D Options", style: {
81
81
  header: styles.groupHeader,
82
- }, children: [_jsx(Label, { title: "Auto extend range", style: labelStyle, children: _jsx(FormikCheckBox, { name: "autoExtendRange" }) }), _jsxs(Label, { title: "1H", renderTitle: (title) => (_jsx(IsotopesViewer, { value: title, className: "custom-label" })), style: labelStyle, children: [_jsx(Label, { title: "From", children: _jsx(FormikInput, { name: "1d.1H.from", type: "number", style: inputStyle }) }), _jsx(Label, { title: "To", style: { label: { padding: '0 10px' } }, children: _jsx(FormikInput, { name: "1d.1H.to", type: "number", style: inputStyle }) })] }), _jsxs(Label, { title: "13C", renderTitle: (title) => (_jsx(IsotopesViewer, { value: title, className: "custom-label" })), style: labelStyle, children: [_jsx(Label, { title: "From", children: _jsx(FormikInput, { name: "1d.13C.from", type: "number", style: inputStyle }) }), _jsx(Label, { title: "To", style: { label: { padding: '0 10px' } }, children: _jsx(FormikInput, { name: "1d.13C.to", type: "number", style: inputStyle }) })] }), _jsxs(Label, { title: "Line Width", style: labelStyle, children: [_jsx(FormikInput, { name: "1d.lineWidth", type: "number", style: inputStyle }), _jsx("span", { style: { paddingLeft: '0.4rem' }, children: " Hz " })] }), _jsx(Label, { title: "Number of Points", style: labelStyle, children: _jsx(FormikSelect, { items: NUMBER_OF_POINTS_1D, name: "1d.nbPoints", style: styles.select }) })] }), _jsx(GroupPane, { text: "2D Options", style: {
82
+ }, children: [_jsx(Label, { title: "Auto extend range", style: labelStyle, children: _jsx(FormikCheckBox, { name: "autoExtendRange" }) }), _jsxs(Label, { title: "1H", renderTitle: (title) => (_jsx(IsotopesViewer, { value: title, className: "custom-label" })), style: labelStyle, children: [_jsx(Label, { title: "From", children: _jsx(FormikInput, { name: "1d.1H.from", type: "number", style: inputStyle }) }), _jsx(Label, { title: "To", style: { label: { padding: '0 10px' } }, children: _jsx(FormikInput, { name: "1d.1H.to", type: "number", style: inputStyle }) })] }), _jsxs(Label, { title: "13C", renderTitle: (title) => (_jsx(IsotopesViewer, { value: title, className: "custom-label" })), style: labelStyle, children: [_jsx(Label, { title: "From", children: _jsx(FormikInput, { name: "1d.13C.from", type: "number", style: inputStyle }) }), _jsx(Label, { title: "To", style: { label: { padding: '0 10px' } }, children: _jsx(FormikInput, { name: "1d.13C.to", type: "number", style: inputStyle }) })] }), _jsxs(Label, { title: "Line width", style: labelStyle, children: [_jsx(FormikInput, { name: "1d.lineWidth", type: "number", style: inputStyle }), _jsx("span", { style: { paddingLeft: '0.4rem' }, children: " Hz " })] }), _jsx(Label, { title: "Number of points", style: labelStyle, children: _jsx(FormikSelect, { items: NUMBER_OF_POINTS_1D, name: "1d.nbPoints", style: styles.select }) })] }), _jsx(GroupPane, { text: "2D Options", style: {
83
83
  header: styles.groupHeader,
84
- }, children: _jsxs(Label, { title: "Number of Points", style: labelStyle, children: [_jsx(FormikSelect, { items: NUMBER_OF_POINTS_2D, name: "2d.nbPoints.x", style: { margin: 0, height: 30 } }), _jsx("span", { style: { padding: '0 10px' }, children: " X " }), _jsx(FormikSelect, { items: NUMBER_OF_POINTS_2D, name: "2d.nbPoints.y", style: { margin: 0, height: 30 } })] }) }), _jsx(GroupPane, { text: "Spectra", style: {
84
+ }, children: _jsxs(Label, { title: "Number of points", style: labelStyle, children: [_jsx(FormikSelect, { items: NUMBER_OF_POINTS_2D, name: "2d.nbPoints.x", style: { margin: 0, height: 30 } }), _jsx("span", { style: { padding: '0 10px' }, children: " X " }), _jsx(FormikSelect, { items: NUMBER_OF_POINTS_2D, name: "2d.nbPoints.y", style: { margin: 0, height: 30 } })] }) }), _jsx(GroupPane, { text: "Spectra", style: {
85
85
  header: styles.groupHeader,
86
86
  }, children: _jsxs("div", { style: { display: 'flex', justifyContent: 'space-around' }, children: [_jsx(IsotopesOption, { title: "1H", name: "spectra.proton" }), _jsx(IsotopesOption, { title: "13C", name: "spectra.carbon" }), _jsx(IsotopesOption, { title: "COSY", name: "spectra.cosy" }), _jsx(IsotopesOption, { title: "HSQC", name: "spectra.hsqc" }), _jsx(IsotopesOption, { title: "HMBC", name: "spectra.hmbc" })] }) })] }) }));
87
87
  }
@@ -39,6 +39,6 @@ function PredictionSimpleOptions() {
39
39
  justifyContent: 'flex-end',
40
40
  flex: '1',
41
41
  height: '100%',
42
- }, children: [_jsx(Label, { title: "Frequency", style: labelStyle, children: _jsx(FormikSelect, { items: FREQUENCIES, style: selectStyles, name: "frequency" }) }), _jsxs(Label, { title: "Line Width", style: labelStyle, children: [_jsx(FormikInput, { name: "1d.lineWidth", type: "number", style: { input: { width: '40px', textAlign: 'center' } } }), _jsx("span", { style: { padding: '0 5px' }, children: "Hz" })] }), _jsx(FormikOnChange, { enableValidation: true, onChange: optionsChangeHandler })] }) }));
42
+ }, children: [_jsx(Label, { title: "Frequency", style: labelStyle, children: _jsx(FormikSelect, { items: FREQUENCIES, style: selectStyles, name: "frequency" }) }), _jsxs(Label, { title: "Line width", style: labelStyle, children: [_jsx(FormikInput, { name: "1d.lineWidth", type: "number", style: { input: { width: '40px', textAlign: 'center' } } }), _jsx("span", { style: { padding: '0 5px' }, children: "Hz" })] }), _jsx(FormikOnChange, { enableValidation: true, onChange: optionsChangeHandler })] }) }));
43
43
  }
44
44
  export default PredictionSimpleOptions;
@@ -32,6 +32,6 @@ function SpectrumSimulationPreferences({ options, onSave }, ref) {
32
32
  void formRef.current?.submitForm();
33
33
  },
34
34
  }), []);
35
- return (_jsx(PreferencesContainer, { style: { backgroundColor: 'white' }, children: _jsx(Formik, { initialValues: options, onSubmit: onSave, innerRef: formRef, children: _jsxs(_Fragment, { children: [_jsx(Label, { title: "Frequency", style: labelStyle, children: _jsx(FormikSelect, { items: FREQUENCIES, style: selectStyles, name: "options.frequency" }) }), _jsx(Label, { title: "Number of Points", style: labelStyle, children: _jsx(FormikSelect, { items: SIMULATION_NUMBER_OF_POINTS, name: "options.nbPoints", style: selectStyles }) }), _jsxs(Label, { title: "Range", style: labelStyle, children: [_jsx(Label, { title: "From", children: _jsx(FormikInput, { name: "options.from", type: "number", style: inputStyle }) }), _jsx(Label, { title: "To", style: { label: { padding: '0 10px' } }, children: _jsx(FormikInput, { name: "options.to", type: "number", style: inputStyle }) })] }), _jsxs(Label, { title: "Line Width", style: labelStyle, children: [_jsx(FormikInput, { name: "options.lineWidth", type: "number", style: inputStyle }), _jsx("span", { style: { paddingLeft: '0.4rem' }, children: " Hz " })] })] }) }) }));
35
+ return (_jsx(PreferencesContainer, { style: { backgroundColor: 'white' }, children: _jsx(Formik, { initialValues: options, onSubmit: onSave, innerRef: formRef, children: _jsxs(_Fragment, { children: [_jsx(Label, { title: "Frequency", style: labelStyle, children: _jsx(FormikSelect, { items: FREQUENCIES, style: selectStyles, name: "options.frequency" }) }), _jsx(Label, { title: "Number of points", style: labelStyle, children: _jsx(FormikSelect, { items: SIMULATION_NUMBER_OF_POINTS, name: "options.nbPoints", style: selectStyles }) }), _jsxs(Label, { title: "Range", style: labelStyle, children: [_jsx(Label, { title: "From", children: _jsx(FormikInput, { name: "options.from", type: "number", style: inputStyle }) }), _jsx(Label, { title: "To", style: { label: { padding: '0 10px' } }, children: _jsx(FormikInput, { name: "options.to", type: "number", style: inputStyle }) })] }), _jsxs(Label, { title: "Line width", style: labelStyle, children: [_jsx(FormikInput, { name: "options.lineWidth", type: "number", style: inputStyle }), _jsx("span", { style: { paddingLeft: '0.4rem' }, children: " Hz " })] })] }) }) }));
36
36
  }
37
37
  export default forwardRef(SpectrumSimulationPreferences);
@@ -20,7 +20,7 @@ export default function SpectrumSimulationSimpleOptions({ onSpinSystemChange, sp
20
20
  display: 'flex',
21
21
  justifyContent: 'flex-end',
22
22
  flex: '1',
23
- }, children: [_jsx(Label, { title: "", style: labelStyle, children: _jsx(Select, { items: SPIN_SYSTEMS, style: selectStyles, onChange: onSpinSystemChange, value: spinSystem }) }), _jsx(Label, { title: "Frequency", style: labelStyle, children: _jsx(FormikSelect, { items: FREQUENCIES, style: selectStyles, name: "options.frequency" }) }), _jsxs(Label, { title: "Line Width", style: labelStyle, children: [_jsx(FormikInput, { name: "options.lineWidth", type: "number", style: {
23
+ }, children: [_jsx(Label, { title: "", style: labelStyle, children: _jsx(Select, { items: SPIN_SYSTEMS, style: selectStyles, onChange: onSpinSystemChange, value: spinSystem }) }), _jsx(Label, { title: "Frequency", style: labelStyle, children: _jsx(FormikSelect, { items: FREQUENCIES, style: selectStyles, name: "options.frequency" }) }), _jsxs(Label, { title: "Line width", style: labelStyle, children: [_jsx(FormikInput, { name: "options.lineWidth", type: "number", style: {
24
24
  input: {
25
25
  width: '40px',
26
26
  textAlign: 'center',
@@ -7,7 +7,7 @@ const ignoreActions = new Set([
7
7
  'SET_KEY_PREFERENCES',
8
8
  'SET_LOADING_FLAG',
9
9
  'SET_SELECTED_TOOL',
10
- 'SET_SPECTRUMS_VERTICAL_ALIGN',
10
+ 'SET_SPECTRA_VERTICAL_ALIGN',
11
11
  'SET_ONE_DIMENSION_PIVOT_POINT',
12
12
  'SET_TWO_DIMENSION_PIVOT_POINT',
13
13
  'SET_DIMENSIONS',
@@ -206,6 +206,7 @@ export interface State {
206
206
  */
207
207
  twoDimensionPhaseCorrection: TwoDimensionPhaseCorrection;
208
208
  zonesNoiseFactor: number;
209
+ zonesMinMaxRatio: number;
209
210
  /**
210
211
  * The current active Filter
211
212
  * @default null
@@ -14,8 +14,8 @@ import * as MoleculeActions from './actions/MoleculeActions';
14
14
  import * as PeaksActions from './actions/PeaksActions';
15
15
  import * as PreferencesActions from './actions/PreferencesActions';
16
16
  import * as RangesActions from './actions/RangesActions';
17
+ import * as SpectraActions from './actions/SpectraActions';
17
18
  import * as SpectraAnalysisActions from './actions/SpectraAnalysisAction';
18
- import * as SpectrumsActions from './actions/SpectrumsActions';
19
19
  import * as ToolsActions from './actions/ToolsActions';
20
20
  import * as ZonesActions from './actions/ZonesActions';
21
21
  export const getDefaultTwoDimensionsPhaseCorrectionTraceOptions = () => {
@@ -115,6 +115,7 @@ export const getInitialState = () => ({
115
115
  },
116
116
  pivot: { value: 0, index: 0 },
117
117
  zonesNoiseFactor: 1,
118
+ zonesMinMaxRatio: 0.03,
118
119
  activeFilterID: null,
119
120
  predictionIndex: 0,
120
121
  },
@@ -246,31 +247,31 @@ function innerSpectrumReducer(draft, action) {
246
247
  case 'APPLY_MANUAL_PHASE_CORRECTION_TOW_DIMENSION_FILTER':
247
248
  return FiltersActions.handleApplyManualTowDimensionsPhaseCorrectionFilter(draft);
248
249
  case 'CHANGE_SPECTRUM_VISIBILITY':
249
- return SpectrumsActions.handleChangeSpectrumVisibilityById(draft, action);
250
+ return SpectraActions.handleChangeSpectrumVisibilityById(draft, action);
250
251
  case 'CHANGE_SPECTRA_VISIBILITY_BY_NUCLEUS':
251
- return SpectrumsActions.handleChangeSpectraVisibilityByNucleus(draft, action);
252
+ return SpectraActions.handleChangeSpectraVisibilityByNucleus(draft, action);
252
253
  case 'CHANGE_ACTIVE_SPECTRUM':
253
- return SpectrumsActions.handleChangeActiveSpectrum(draft, action);
254
+ return SpectraActions.handleChangeActiveSpectrum(draft, action);
254
255
  case 'CHANGE_SPECTRUM_SETTING':
255
- return SpectrumsActions.handleChangeSpectrumSetting(draft, action);
256
+ return SpectraActions.handleChangeSpectrumSetting(draft, action);
256
257
  case 'ALIGN_SPECTRA':
257
- return SpectrumsActions.handleAlignSpectraHandler(draft, action);
258
+ return SpectraActions.handleAlignSpectraHandler(draft, action);
258
259
  case 'DELETE_SPECTRA':
259
- return SpectrumsActions.handleDeleteSpectra(draft, action);
260
+ return SpectraActions.handleDeleteSpectra(draft, action);
260
261
  case 'ADD_MISSING_PROJECTION':
261
- return SpectrumsActions.handleAddMissingProjectionHandler(draft, action);
262
+ return SpectraActions.handleAddMissingProjectionHandler(draft, action);
262
263
  case 'GENERATE_SPECTRUM_FROM_PUBLICATION_STRING':
263
- return SpectrumsActions.handleGenerateSpectrumFromPublicationStringHandler(draft, action);
264
+ return SpectraActions.handleGenerateSpectrumFromPublicationStringHandler(draft, action);
264
265
  case 'IMPORT_SPECTRA_META_INFO':
265
- return SpectrumsActions.handleImportSpectraMetaInfo(draft, action);
266
+ return SpectraActions.handleImportSpectraMetaInfo(draft, action);
266
267
  case 'TOGGLE_SPECTRA_LEGEND':
267
- return SpectrumsActions.handleToggleSpectraLegend(draft);
268
+ return SpectraActions.handleToggleSpectraLegend(draft);
268
269
  case 'RECOLOR_SPECTRA_COLOR':
269
- return SpectrumsActions.handleRecolorSpectraBasedOnDistinctValue(draft, action);
270
+ return SpectraActions.handleRecolorSpectraBasedOnDistinctValue(draft, action);
270
271
  case 'ORDER_SPECTRA':
271
- return SpectrumsActions.handleOrderSpectra(draft, action);
272
+ return SpectraActions.handleOrderSpectra(draft, action);
272
273
  case 'SIMULATE_SPECTRUM':
273
- return SpectrumsActions.handleSimulateSpectrum(draft, action);
274
+ return SpectraActions.handleSimulateSpectrum(draft, action);
274
275
  case 'SET_SELECTED_TOOL':
275
276
  return ToolsActions.setSelectedTool(draft, action);
276
277
  case 'RESET_SELECTED_TOOL':
@@ -289,8 +290,8 @@ function innerSpectrumReducer(draft, action) {
289
290
  return ToolsActions.handleChangeSpectrumDisplayMode(draft);
290
291
  case 'BRUSH_END':
291
292
  return ToolsActions.handleBrushEnd(draft, action);
292
- case 'SET_SPECTRUMS_VERTICAL_ALIGN':
293
- return ToolsActions.setSpectrumsVerticalAlign(draft);
293
+ case 'SET_SPECTRA_VERTICAL_ALIGN':
294
+ return ToolsActions.setSpectraVerticalAlign(draft);
294
295
  case 'SET_ACTIVE_TAB':
295
296
  return ToolsActions.handelSetActiveTab(draft, action);
296
297
  case 'ADD_BASE_LINE_ZONE':
@@ -87,15 +87,15 @@ function get2DDomain(state) {
87
87
  reportError(error);
88
88
  }
89
89
  }
90
- const spectrumsIDs = new Set();
90
+ const spectraIDs = new Set();
91
91
  for (const n of nucleus) {
92
92
  const spectra = activeSpectra[n];
93
93
  if (spectra?.length === 1) {
94
- spectrumsIDs.add(spectra[0].id);
94
+ spectraIDs.add(spectra[0].id);
95
95
  }
96
96
  }
97
97
  const filteredData = data
98
- .filter((d) => spectrumsIDs.has(d.id) && d.info.dimension === 1)
98
+ .filter((d) => spectraIDs.has(d.id) && d.info.dimension === 1)
99
99
  .map((datum) => {
100
100
  return datum;
101
101
  });
@@ -9,7 +9,7 @@ import { linkMetaWithSpectra } from '../../../data/parseMeta/linkMetaWithSpectra
9
9
  import { DefaultTolerance } from '../../panels/SummaryPanel/CorrelationTable/Constants';
10
10
  import { getDefaultViewState, getInitialState } from '../Reducer';
11
11
  import { changeSpectrumVerticalAlignment } from './PreferencesActions';
12
- import { setSpectraMetaInfo } from './SpectrumsActions';
12
+ import { setSpectraMetaInfo } from './SpectraActions';
13
13
  import { setActiveTab } from './ToolsActions';
14
14
  function convertHybridizationStringValuesInCorrelations(correlations) {
15
15
  return {
@@ -50,8 +50,8 @@ function handleSetKeyPreferences(draft, action) {
50
50
  const activeSpectrum = getActiveSpectrum(draft);
51
51
  if (activeTab) {
52
52
  const groupByNucleus = groupByInfoKey('nucleus');
53
- const spectrumsGroupsList = groupByNucleus(data);
54
- const spectra = spectrumsGroupsList[activeTab];
53
+ const spectraGroupsList = groupByNucleus(data);
54
+ const spectra = spectraGroupsList[activeTab];
55
55
  keysPreferences[keyCode] = {
56
56
  activeSpectrum,
57
57
  displayerMode,
@@ -47,7 +47,7 @@ type SetActiveTabAction = ActionType<'SET_ACTIVE_TAB', {
47
47
  type LevelChangeAction = ActionType<'SET_2D_LEVEL', {
48
48
  options: ZoomOptions;
49
49
  }>;
50
- export type ToolsActions = ActionType<'TOGGLE_REAL_IMAGINARY_VISIBILITY' | 'RESET_SELECTED_TOOL' | 'SET_SPECTRUMS_VERTICAL_ALIGN' | 'CHANGE_SPECTRUM_DISPLAY_VIEW_MODE' | 'SET_SPECTRA_SAME_TOP' | 'RESET_SPECTRA_SCALE'> | SetSelectedToolAction | AddBaseLineZoneAction | DeleteBaseLineZoneAction | ResizeBaseLineZoneAction | BrushEndAction | ZoomAction | ZoomOutAction | SetActiveTabAction | LevelChangeAction;
50
+ export type ToolsActions = ActionType<'TOGGLE_REAL_IMAGINARY_VISIBILITY' | 'RESET_SELECTED_TOOL' | 'SET_SPECTRA_VERTICAL_ALIGN' | 'CHANGE_SPECTRUM_DISPLAY_VIEW_MODE' | 'SET_SPECTRA_SAME_TOP' | 'RESET_SPECTRA_SCALE'> | SetSelectedToolAction | AddBaseLineZoneAction | DeleteBaseLineZoneAction | ResizeBaseLineZoneAction | BrushEndAction | ZoomAction | ZoomOutAction | SetActiveTabAction | LevelChangeAction;
51
51
  declare function handleResetSelectedTool(draft: Draft<State>): void;
52
52
  declare function resetSelectedTool(draft: Draft<State>): void;
53
53
  interface ActivateToolOptions {
@@ -56,7 +56,7 @@ interface ActivateToolOptions {
56
56
  }
57
57
  declare function activateTool(draft: Draft<State>, options: ActivateToolOptions): void;
58
58
  declare function setSelectedTool(draft: Draft<State>, action: SetSelectedToolAction): void;
59
- declare function setSpectrumsVerticalAlign(draft: Draft<State>): void;
59
+ declare function setSpectraVerticalAlign(draft: Draft<State>): void;
60
60
  declare function handleChangeSpectrumDisplayMode(draft: Draft<State>): void;
61
61
  declare function handleAddBaseLineZone(draft: Draft<State>, action: AddBaseLineZoneAction): void;
62
62
  declare function handleResizeBaseLineZone(draft: Draft<State>, action: ResizeBaseLineZoneAction): void;
@@ -72,4 +72,4 @@ declare function handelSetActiveTab(draft: Draft<State>, action: SetActiveTabAct
72
72
  declare function levelChangeHandler(draft: Draft<State>, action: LevelChangeAction): void;
73
73
  declare function setSpectraSameTopHandler(draft: Draft<State>): void;
74
74
  declare function resetSpectraScale(draft: Draft<State>): void;
75
- export { handleResetSelectedTool, resetSelectedTool, setSelectedTool, activateTool, setSpectrumsVerticalAlign, handleChangeSpectrumDisplayMode, handleAddBaseLineZone, handleDeleteBaseLineZone, handleResizeBaseLineZone, handleToggleRealImaginaryVisibility, handleBrushEnd, handleZoom, zoomOut, handelSetActiveTab, levelChangeHandler, setActiveTab, setTab, setSpectraSameTopHandler, resetSpectraScale, setMargin, };
75
+ export { handleResetSelectedTool, resetSelectedTool, setSelectedTool, activateTool, setSpectraVerticalAlign, handleChangeSpectrumDisplayMode, handleAddBaseLineZone, handleDeleteBaseLineZone, handleResizeBaseLineZone, handleToggleRealImaginaryVisibility, handleBrushEnd, handleZoom, zoomOut, handelSetActiveTab, levelChangeHandler, setActiveTab, setTab, setSpectraSameTopHandler, resetSpectraScale, setMargin, };
@@ -95,7 +95,7 @@ function getSpectrumID(draft, index) {
95
95
  }
96
96
  return null;
97
97
  }
98
- function setSpectrumsVerticalAlign(draft) {
98
+ function setSpectraVerticalAlign(draft) {
99
99
  const currentVerticalAlign = getVerticalAlign(draft);
100
100
  const verticalAlign = ['stack', 'bottom'].includes(currentVerticalAlign)
101
101
  ? 'center'
@@ -401,16 +401,16 @@ function setTabActiveSpectrum(draft, dataGroupByTab) {
401
401
  const tabSpectra = dataGroupByTab[tabKey];
402
402
  const tabSpectraLength = tabSpectra.length;
403
403
  if (tabSpectraLength >= 2) {
404
- const FTSpectrums = tabSpectra.filter((d) => !d.info.isFid);
405
- if (FTSpectrums.length > 0) {
404
+ const FTSpectra = tabSpectra.filter((d) => !d.info.isFid);
405
+ if (FTSpectra.length > 0) {
406
406
  const selected = nucleusLength === 2 ||
407
- (nucleusLength === 1 && tabSpectraLength !== FTSpectrums.length);
408
- const index = draft.data.findIndex((datum) => datum.id === FTSpectrums[0].id);
407
+ (nucleusLength === 1 && tabSpectraLength !== FTSpectra.length);
408
+ const index = draft.data.findIndex((datum) => datum.id === FTSpectra[0].id);
409
409
  tabActiveSpectrum[tabKey] = [
410
- { id: FTSpectrums[0].id, index, selected },
410
+ { id: FTSpectra[0].id, index, selected },
411
411
  ];
412
412
  }
413
- else if (tabSpectraLength - FTSpectrums > 0) {
413
+ else if (tabSpectraLength - FTSpectra > 0) {
414
414
  const id = tabSpectra[0].id;
415
415
  const index = draft.data.findIndex((datum) => datum.id === id);
416
416
  tabActiveSpectrum[tabKey] = [{ id, index, selected: true }];
@@ -505,4 +505,4 @@ function resetSpectraScale(draft) {
505
505
  draft.yDomain = draft.originDomain.yDomain;
506
506
  setZoom(draft, { scale: 0.8 });
507
507
  }
508
- export { handleResetSelectedTool, resetSelectedTool, setSelectedTool, activateTool, setSpectrumsVerticalAlign, handleChangeSpectrumDisplayMode, handleAddBaseLineZone, handleDeleteBaseLineZone, handleResizeBaseLineZone, handleToggleRealImaginaryVisibility, handleBrushEnd, handleZoom, zoomOut, handelSetActiveTab, levelChangeHandler, setActiveTab, setTab, setSpectraSameTopHandler, resetSpectraScale, setMargin, };
508
+ export { handleResetSelectedTool, resetSelectedTool, setSelectedTool, activateTool, setSpectraVerticalAlign, handleChangeSpectrumDisplayMode, handleAddBaseLineZone, handleDeleteBaseLineZone, handleResizeBaseLineZone, handleToggleRealImaginaryVisibility, handleBrushEnd, handleZoom, zoomOut, handelSetActiveTab, levelChangeHandler, setActiveTab, setTab, setSpectraSameTopHandler, resetSpectraScale, setMargin, };
@@ -16,10 +16,12 @@ interface DeleteSignal2DProps {
16
16
  }
17
17
  type ChangeZonesFactorAction = ActionType<'CHANGE_ZONES_NOISE_FACTOR', {
18
18
  zonesNoiseFactor: number;
19
+ zonesMinMaxRatio: number;
19
20
  }>;
20
21
  type Add2dZoneAction = ActionType<'ADD_2D_ZONE', ZoneBoundary>;
21
22
  type AutoZonesDetectionAction = ActionType<'AUTO_ZONES_DETECTION', {
22
23
  zonesNoiseFactor: number;
24
+ zonesMinMaxRatio: number;
23
25
  }>;
24
26
  type ChangeZoneSignalDeltaAction = ActionType<'CHANGE_ZONE_SIGNAL_VALUE', {
25
27
  zoneId: string;
@@ -14,6 +14,7 @@ import { setDomain } from './DomainActions';
14
14
  //action
15
15
  function handleChangeZonesFactor(draft, action) {
16
16
  draft.toolOptions.data.zonesNoiseFactor = action.payload.zonesNoiseFactor;
17
+ draft.toolOptions.data.zonesMinMaxRatio = action.payload.zonesMinMaxRatio;
17
18
  }
18
19
  //action
19
20
  function handleAdd2dZone(draft, action) {
@@ -25,6 +26,7 @@ function handleAdd2dZone(draft, action) {
25
26
  const zones = detectZonesManual(original(datum), {
26
27
  selectedZone: drawnZone,
27
28
  thresholdFactor: draft.toolOptions.data.zonesNoiseFactor,
29
+ maxPercentCutOff: draft.toolOptions.data.zonesMinMaxRatio,
28
30
  convolutionByFFT: false,
29
31
  });
30
32
  datum.zones.values = datum.zones.values.concat(zones);
@@ -36,12 +38,13 @@ function handleAutoZonesDetection(draft, action) {
36
38
  const activeSpectrum = getActiveSpectrum(draft);
37
39
  if (activeSpectrum?.id) {
38
40
  const { index } = activeSpectrum;
39
- const { zonesNoiseFactor: thresholdFactor } = action.payload;
41
+ const { zonesNoiseFactor: thresholdFactor, zonesMinMaxRatio: maxPercentCutOff, } = action.payload;
40
42
  const [fromX, toX] = draft.xDomain;
41
43
  const [fromY, toY] = draft.yDomain;
42
44
  const detectionOptions = {
43
45
  selectedZone: { fromX, toX, fromY, toY },
44
46
  thresholdFactor,
47
+ maxPercentCutOff,
45
48
  };
46
49
  const datum = draft.data[index];
47
50
  const zones = detectZones(original(datum), detectionOptions);
@@ -58,6 +61,7 @@ function handleAutoSpectraZonesDetection(draft) {
58
61
  const detectionOptions = {
59
62
  selectedZone: { fromX: minX, toX: maxX, fromY: minY, toY: maxY },
60
63
  thresholdFactor: 1,
64
+ maxPercentCutOff: 0.03,
61
65
  };
62
66
  const zones = detectZones(original(datum), detectionOptions);
63
67
  datum.zones.values = datum.zones.values.concat(zones);
@@ -28,7 +28,7 @@ export default function ToolBar() {
28
28
  const { toolOptions: { selectedTool }, } = useChartData();
29
29
  const isButtonVisible = useCheckToolsVisibility();
30
30
  const dispatch = useDispatch();
31
- const { isRealSpectrumShown, changeSpectrumViewHandler, changeDisplayViewModeHandler, alignSpectrumsVerticallyHandler, handleChangeOption, handleFullZoomOut, } = useToolsFunctions();
31
+ const { isRealSpectrumShown, changeSpectrumViewHandler, changeDisplayViewModeHandler, alignSpectraVerticallyHandler, handleChangeOption, handleFullZoomOut, } = useToolsFunctions();
32
32
  const handleChange = useCallback((selectedOption) => {
33
33
  handleChangeOption(selectedOption);
34
34
  }, [handleChangeOption]);
@@ -110,23 +110,23 @@ export default function ToolBar() {
110
110
  },
111
111
  {
112
112
  id: 'zoomOut',
113
- title: 'Horizontal zoom out ( Press f ), Horizontal and Vertical zoom out, double click ( Press ff )',
113
+ title: 'Horizontal zoom out (Press f), Horizontal and Vertical zoom out, double click (Press ff)',
114
114
  onClick: handleFullZoomOut,
115
115
  icon: _jsx(FaExpand, {}),
116
116
  },
117
117
  {
118
118
  id: 'peakPicking',
119
- title: `${options.peakPicking.label} ( Press p )`,
119
+ title: `${options.peakPicking.label} (Press p)`,
120
120
  icon: _jsx(SvgNmrPeakPicking, {}),
121
121
  },
122
122
  {
123
123
  id: 'integral',
124
- title: `${options.integral.label} ( Press i )`,
124
+ title: `${options.integral.label} (Press i)`,
125
125
  icon: _jsx(SvgNmrIntegrate, {}),
126
126
  },
127
127
  {
128
128
  id: 'zonePicking',
129
- title: `${options.zonePicking.label} ( Press r )`,
129
+ title: `${options.zonePicking.label} (Press r)`,
130
130
  icon: _jsx(FaDiceFour, {}),
131
131
  },
132
132
  {
@@ -136,7 +136,7 @@ export default function ToolBar() {
136
136
  },
137
137
  {
138
138
  id: 'rangePicking',
139
- title: `${options.rangePicking.label} ( Press r )`,
139
+ title: `${options.rangePicking.label} (Press r)`,
140
140
  icon: _jsx(SvgNmrRangePicking, {}),
141
141
  },
142
142
  {
@@ -153,34 +153,34 @@ export default function ToolBar() {
153
153
  },
154
154
  {
155
155
  id: 'zeroFilling',
156
- title: `${options.zeroFilling.label} ( Press z )`,
156
+ title: `${options.zeroFilling.label} (Press z)`,
157
157
  icon: _jsx(SvgNmrZeroFilling, {}),
158
158
  },
159
159
  {
160
160
  id: 'phaseCorrection',
161
- title: `${options.phaseCorrection.label} ( Press a )`,
161
+ title: `${options.phaseCorrection.label} (Press a)`,
162
162
  icon: _jsx(SvgNmrPhaseCorrection, {}),
163
163
  },
164
164
  {
165
165
  id: 'phaseCorrectionTwoDimensions',
166
- title: `${options.phaseCorrectionTwoDimensions.label} ( Press a )`,
166
+ title: `${options.phaseCorrectionTwoDimensions.label} (Press a)`,
167
167
  icon: _jsx(SvgNmrPhaseCorrection, {}),
168
168
  },
169
169
  {
170
170
  id: 'baselineCorrection',
171
- title: `${options.baselineCorrection.label} ( Press b )`,
171
+ title: `${options.baselineCorrection.label} (Press b)`,
172
172
  icon: _jsx(SvgNmrBaselineCorrection, {}),
173
173
  },
174
174
  {
175
175
  id: 'exclusionZones',
176
- title: `${options.exclusionZones.label} ( Press e )`,
176
+ title: `${options.exclusionZones.label} (Press e)`,
177
177
  icon: _jsx(SvgNmrMultipleAnalysis, {}),
178
178
  checkOptions: { checkSpectrumType: false },
179
179
  condition: ftCounter > 0,
180
180
  },
181
181
  {
182
182
  id: 'fft',
183
- title: `${options.fft.label} ( Press t )`,
183
+ title: `${options.fft.label} (Press t)`,
184
184
  onClick: handleOnFFTFilter,
185
185
  icon: _jsx(SvgNmrFourierTransform, {}),
186
186
  },
@@ -212,7 +212,7 @@ export default function ToolBar() {
212
212
  },
213
213
  {
214
214
  id: 'spectraStackAlignments',
215
- title: `${options.spectraStackAlignments.label} ( Press s )`,
215
+ title: `${options.spectraStackAlignments.label} (Press s)`,
216
216
  icon: verticalAlign === 'stack' ? (_jsx(SvgNmrOverlay3Aligned, {})) : (_jsx(SvgNmrOverlay3, {})),
217
217
  condition: ftCounter > 1,
218
218
  onClick: changeDisplayViewModeHandler,
@@ -225,10 +225,10 @@ export default function ToolBar() {
225
225
  },
226
226
  {
227
227
  id: 'spectraCenterAlignments',
228
- title: `Baseline ${verticalAlign === 'bottom' ? 'center' : 'bottom'} ( Press c )`,
228
+ title: `Baseline ${verticalAlign === 'bottom' ? 'center' : 'bottom'} (Press c)`,
229
229
  icon: verticalAlign === 'bottom' ? (_jsx(SvgNmrAlignCenter, {})) : (_jsx(SvgNmrAlignBottom, {})),
230
230
  condition: ftCounter > 0 || fidCounter > 0,
231
- onClick: alignSpectrumsVerticallyHandler,
231
+ onClick: alignSpectraVerticallyHandler,
232
232
  },
233
233
  ];
234
234
  return (_jsxs(_Fragment, { children: [_jsx(LoadJCAMPModal, { isOpen: dialog.loadJCAMP, onCloseDialog: closeDialog }), _jsx(ImportPublicationStringModal, { isOpen: dialog.importPublicationString, onClose: closeDialog }), _jsx(MetaImportationModal, { isOpen: dialog.metaImportation, onCloseDialog: closeDialog }), _jsx(SaveAsModal, { isOpen: dialog.saveAs, onCloseDialog: closeDialog }), _jsx(Toolbar, { vertical: true, children: toolItems.map((item) => {
@@ -3,7 +3,7 @@ import { FaCopy, FaDownload, FaFile, FaFileDownload, FaFileImage, } from 'react-
3
3
  const IMPORT_MENU = [
4
4
  {
5
5
  icon: _jsx(FaFile, {}),
6
- text: 'Import from file system (Press Ctrl + O)',
6
+ text: 'Import from file system (Press Ctrl+o)',
7
7
  data: {
8
8
  id: 'importFile',
9
9
  },
@@ -47,14 +47,14 @@ const EXPORT_MENU = [
47
47
  },
48
48
  {
49
49
  icon: _jsx(FaFileDownload, {}),
50
- text: 'Save data ( Press Ctrl + S )',
50
+ text: 'Save data (Press Ctrl+s)',
51
51
  data: {
52
52
  id: 'json',
53
53
  },
54
54
  },
55
55
  {
56
56
  icon: _jsx(FaFileDownload, {}),
57
- text: 'Save data as ( Press Ctrl + Shift + S )',
57
+ text: 'Save data as (Press Ctrl+Shift+s)',
58
58
  data: {
59
59
  id: 'advance_save',
60
60
  },
@@ -68,7 +68,7 @@ const EXPORT_MENU = [
68
68
  },
69
69
  {
70
70
  icon: _jsx(FaCopy, {}),
71
- text: 'Copy image to Clipboard ( Press Ctrl + C )',
71
+ text: 'Copy image to clipboard (Press Ctrl+c)',
72
72
  data: {
73
73
  id: 'copy',
74
74
  },