nmrium 0.51.0 → 0.53.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 (119) hide show
  1. package/lib/component/1d/LinesSeries.js +1 -1
  2. package/lib/component/1d/ranges/AssignmentLabel.d.ts +7 -0
  3. package/lib/component/1d/ranges/AssignmentLabel.js +10 -0
  4. package/lib/component/1d/ranges/Range.js +2 -1
  5. package/lib/component/EventsTrackers/KeysListenerTracker.js +3 -3
  6. package/lib/component/context/DispatchContext.d.ts +1 -1
  7. package/lib/component/elements/EditableColumn.js +3 -3
  8. package/lib/component/elements/Label.js +1 -1
  9. package/lib/component/header/ApodizationOptionsPanel.js +1 -1
  10. package/lib/component/header/AutoPeakPickingOptionPanel.js +1 -1
  11. package/lib/component/header/BaseLineCorrectionPanel.js +2 -2
  12. package/lib/component/header/Header.js +1 -1
  13. package/lib/component/header/PhaseCorrectionPanel.js +1 -1
  14. package/lib/component/header/PhaseCorrectionTwoDimensionsPanel.js +2 -2
  15. package/lib/component/header/RangesPickingOptionPanel.js +1 -1
  16. package/lib/component/header/ZeroFillingOptionsPanel.js +1 -1
  17. package/lib/component/header/Zones2DOptionPanel.js +6 -2
  18. package/lib/component/hooks/useActiveSpectrumRangesViewState.js +1 -0
  19. package/lib/component/hooks/useActiveSpectrumZonesViewState.js +1 -0
  20. package/lib/component/hooks/useToolsFunctions.d.ts +1 -1
  21. package/lib/component/hooks/useToolsFunctions.js +10 -4
  22. package/lib/component/main/NMRiumStateProvider.js +1 -1
  23. package/lib/component/modal/AboutPredictionModal.js +1 -1
  24. package/lib/component/modal/AboutSpectrumSimulationModal.js +1 -1
  25. package/lib/component/modal/EditPeakShapeModal.js +1 -1
  26. package/lib/component/modal/ImportPublicationStringModal.d.ts +5 -3
  27. package/lib/component/modal/ImportPublicationStringModal.js +7 -4
  28. package/lib/component/modal/LoadJCAMPModal.js +1 -1
  29. package/lib/component/modal/LogsHistoryModal.js +1 -1
  30. package/lib/component/modal/MultipletAnalysisModal.js +1 -1
  31. package/lib/component/modal/SaveAsModal.js +2 -2
  32. package/lib/component/modal/editZone/EditPathLengthFormik.js +2 -2
  33. package/lib/component/modal/editZone/EditZoneModal.js +1 -1
  34. package/lib/component/modal/metaImportation/MetaImportationModal.js +1 -1
  35. package/lib/component/modal/setting/GeneralSettings.js +2 -2
  36. package/lib/component/modal/setting/settings-tabs/GeneralTabContent.js +1 -1
  37. package/lib/component/modal/setting/settings-tabs/InfoBlockTabContent.js +1 -1
  38. package/lib/component/modal/setting/settings-tabs/OnLoadProcessingTabContent.js +1 -1
  39. package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +1 -1
  40. package/lib/component/panels/Panels.js +5 -5
  41. package/lib/component/panels/RangesPanel/RangesHeader.js +21 -7
  42. package/lib/component/panels/RangesPanel/RangesPanel.js +1 -1
  43. package/lib/component/panels/RangesPanel/RangesPreferences.js +9 -3
  44. package/lib/component/panels/RangesPanel/RangesTable.js +1 -1
  45. package/lib/component/panels/RangesPanel/RangesTableRow.js +2 -1
  46. package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentColumn.d.ts +7 -0
  47. package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentColumn.js +16 -0
  48. package/lib/component/panels/SpectraPanel/SpectraPanelHeader.d.ts +5 -0
  49. package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/SpectraPanelHeader.js +8 -8
  50. package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/SpectraTable.js +1 -1
  51. package/lib/component/panels/SpectraPanel/SpectraTabs.d.ts +1 -0
  52. package/lib/component/panels/{SpectrumsPanel/SpectrumsTabs.js → SpectraPanel/SpectraTabs.js} +6 -6
  53. package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/SpectrumListPanel.js +2 -2
  54. package/lib/component/panels/databasePanel/DatabasePreferences.js +1 -1
  55. package/lib/component/panels/header/SpectraAutomaticPickingButton.js +1 -1
  56. package/lib/component/panels/multipleAnalysisPanel/AlignSpectra.js +1 -1
  57. package/lib/component/panels/multipleAnalysisPanel/AnalysisChart.js +2 -2
  58. package/lib/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisPanel.js +1 -1
  59. package/lib/component/panels/multipleAnalysisPanel/preferences/index.js +1 -1
  60. package/lib/component/panels/predictionPanel/PredictionOptionsPanel.js +2 -2
  61. package/lib/component/panels/predictionPanel/PredictionSimpleOptions.js +1 -1
  62. package/lib/component/panels/spectrumSimulation/SpectrumSimulation.js +8 -1
  63. package/lib/component/panels/spectrumSimulation/SpectrumSimulationPreferences.js +1 -1
  64. package/lib/component/panels/spectrumSimulation/SpectrumSimulationSimpleOptions.js +2 -2
  65. package/lib/component/panels/spectrumSimulation/SpinSystemTable.js +1 -1
  66. package/lib/component/reducer/IgnoreActions.js +1 -1
  67. package/lib/component/reducer/Reducer.d.ts +1 -0
  68. package/lib/component/reducer/Reducer.js +19 -16
  69. package/lib/component/reducer/actions/DomainActions.js +3 -3
  70. package/lib/component/reducer/actions/FiltersActions.js +337 -317
  71. package/lib/component/reducer/actions/LoadActions.js +1 -1
  72. package/lib/component/reducer/actions/PreferencesActions.js +2 -2
  73. package/lib/component/reducer/actions/RangesActions.d.ts +7 -2
  74. package/lib/component/reducer/actions/RangesActions.js +16 -2
  75. package/lib/component/reducer/actions/ToolsActions.d.ts +3 -3
  76. package/lib/component/reducer/actions/ToolsActions.js +21 -28
  77. package/lib/component/reducer/actions/ZonesActions.d.ts +2 -0
  78. package/lib/component/reducer/actions/ZonesActions.js +5 -1
  79. package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +6 -4
  80. package/lib/component/toolbar/ToolBar.js +16 -16
  81. package/lib/component/toolbar/toolbarMenu.js +4 -4
  82. package/lib/component/utility/export.js +1 -1
  83. package/lib/constants.js +5 -5
  84. package/lib/data/data2d/Spectrum2D/getSlice.js +1 -1
  85. package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.d.ts +1 -0
  86. package/lib/versionInfo.js +1 -1
  87. package/package.json +16 -15
  88. package/lib/component/panels/SpectrumsPanel/SpectraPanelHeader.d.ts +0 -5
  89. package/lib/component/panels/SpectrumsPanel/SpectrumsTabs.d.ts +0 -1
  90. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/SpectraPreferences.d.ts +0 -0
  91. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/SpectraPreferences.js +0 -0
  92. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/SpectraTable.d.ts +0 -0
  93. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/SpectrumListPanel.d.ts +0 -0
  94. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/ColorIndicator.d.ts +0 -0
  95. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/ColorIndicator.js +0 -0
  96. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/RenderAsHTML.d.ts +0 -0
  97. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/RenderAsHTML.js +0 -0
  98. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/ShowHideSpectrumButton.d.ts +0 -0
  99. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/ShowHideSpectrumButton.js +0 -0
  100. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/SpectraColumnsManager.d.ts +0 -0
  101. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/SpectraColumnsManager.js +0 -0
  102. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/SpectrumName.d.ts +0 -0
  103. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/SpectrumName.js +0 -0
  104. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/PlotChart.d.ts +0 -0
  105. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/PlotChart.js +0 -0
  106. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum1DHistogram.d.ts +0 -0
  107. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum1DHistogram.js +0 -0
  108. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum1DSetting.d.ts +0 -0
  109. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum1DSetting.js +0 -0
  110. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum2DHistogram.d.ts +0 -0
  111. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum2DHistogram.js +0 -0
  112. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum2DSetting.d.ts +0 -0
  113. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/Spectrum2DSetting.js +0 -0
  114. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/SpectrumSetting.d.ts +0 -0
  115. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/SpectrumSetting.js +0 -0
  116. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/processSnapPlot.d.ts +0 -0
  117. /package/lib/component/panels/{SpectrumsPanel → SpectraPanel}/base/setting/processSnapPlot.js +0 -0
  118. /package/lib/component/reducer/actions/{SpectrumsActions.d.ts → SpectraActions.d.ts} +0 -0
  119. /package/lib/component/reducer/actions/{SpectrumsActions.js → SpectraActions.js} +0 -0
@@ -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':
@@ -367,6 +368,8 @@ function innerSpectrumReducer(draft, action) {
367
368
  return RangesActions.handleChangePeaksDisplayingMode(draft);
368
369
  case 'DELETE_RANGE_PEAK':
369
370
  return RangesActions.handleDeleteRangePeak(draft, action);
371
+ case 'CHANGE_RANGE_ASSIGNMENT_LABEL':
372
+ return RangesActions.handleChangeRangeAssignmentLabel(draft, action);
370
373
  case 'SET_KEY_PREFERENCES':
371
374
  return PreferencesActions.handleSetKeyPreferences(draft, action);
372
375
  case 'APPLY_KEY_PREFERENCES':
@@ -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
  });