nmrium 2.6.0 → 2.8.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/ApodizationLine.js +2 -2
- package/lib/component/1d/ApodizationLine.js.map +1 -1
- package/lib/component/1d/BrushTracker1D.d.ts.map +1 -1
- package/lib/component/1d/BrushTracker1D.js +15 -14
- package/lib/component/1d/BrushTracker1D.js.map +1 -1
- package/lib/component/1d/Line.js +2 -2
- package/lib/component/1d/Line.js.map +1 -1
- package/lib/component/1d/SVGContent1D.d.ts.map +1 -1
- package/lib/component/1d/SVGContent1D.js +4 -1
- package/lib/component/1d/SVGContent1D.js.map +1 -1
- package/lib/component/1d/Viewer1D.d.ts.map +1 -1
- package/lib/component/1d/Viewer1D.js +2 -1
- package/lib/component/1d/Viewer1D.js.map +1 -1
- package/lib/component/1d/baseline/BaselinePreview.js +2 -2
- package/lib/component/1d/baseline/BaselinePreview.js.map +1 -1
- package/lib/component/1d/database/DatabaseSpectrum.js +2 -2
- package/lib/component/1d/database/DatabaseSpectrum.js.map +1 -1
- package/lib/component/1d/database/ResurrectedDatabaseRanges.js +2 -2
- package/lib/component/1d/database/ResurrectedDatabaseRanges.js.map +1 -1
- package/lib/component/1d/matrix/Boxplot.js +5 -5
- package/lib/component/1d/matrix/Boxplot.js.map +1 -1
- package/lib/component/1d/matrix/Stocsy.js +2 -2
- package/lib/component/1d/matrix/Stocsy.js.map +1 -1
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.d.ts.map +1 -1
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.js +12 -3
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.js.map +1 -1
- package/lib/component/1d/peaks/usePeakShapesPath.js +2 -2
- package/lib/component/1d/peaks/usePeakShapesPath.js.map +1 -1
- package/lib/component/1d/plugin_chart_brush_tracker.d.ts +2 -0
- package/lib/component/1d/plugin_chart_brush_tracker.d.ts.map +1 -0
- package/lib/component/1d/plugin_chart_brush_tracker.js +41 -0
- package/lib/component/1d/plugin_chart_brush_tracker.js.map +1 -0
- package/lib/component/1d/plugin_svg_chart.d.ts +2 -0
- package/lib/component/1d/plugin_svg_chart.d.ts.map +1 -0
- package/lib/component/1d/plugin_svg_chart.js +43 -0
- package/lib/component/1d/plugin_svg_chart.js.map +1 -0
- package/lib/component/1d-2d/components/RangeIndicator.d.ts.map +1 -1
- package/lib/component/1d-2d/components/RangeIndicator.js +1 -7
- package/lib/component/1d-2d/components/RangeIndicator.js.map +1 -1
- package/lib/component/1d-2d/tools/BrushXY.d.ts +1 -1
- package/lib/component/1d-2d/tools/BrushXY.d.ts.map +1 -1
- package/lib/component/1d-2d/tools/BrushXY.js.map +1 -1
- package/lib/component/1d-2d/tools/CrossLinePointer.d.ts +1 -1
- package/lib/component/1d-2d/tools/CrossLinePointer.d.ts.map +1 -1
- package/lib/component/1d-2d/tools/CrossLinePointer.js.map +1 -1
- package/lib/component/2d/1d-tracer/HorizontalSliceChart.js +2 -2
- package/lib/component/2d/1d-tracer/HorizontalSliceChart.js.map +1 -1
- package/lib/component/2d/1d-tracer/Left1DChart.js +2 -2
- package/lib/component/2d/1d-tracer/Left1DChart.js.map +1 -1
- package/lib/component/2d/1d-tracer/Top1DChart.js +2 -2
- package/lib/component/2d/1d-tracer/Top1DChart.js.map +1 -1
- package/lib/component/2d/1d-tracer/VerticalSliceChart.js +2 -2
- package/lib/component/2d/1d-tracer/VerticalSliceChart.js.map +1 -1
- package/lib/component/2d/1d-tracer/phase-correction-traces/SpectrumPhaseTrace.js +3 -3
- package/lib/component/2d/1d-tracer/phase-correction-traces/SpectrumPhaseTrace.js.map +1 -1
- package/lib/component/2d/BrushTracker2D.js.map +1 -1
- package/lib/component/2d/ft/Contours.js +2 -2
- package/lib/component/2d/ft/Contours.js.map +1 -1
- package/lib/component/2d/utilities/DimensionLayout.d.ts +1 -1
- package/lib/component/2d/utilities/DimensionLayout.d.ts.map +1 -1
- package/lib/component/EventsTrackers/BrushTracker.d.ts +1 -84
- package/lib/component/EventsTrackers/BrushTracker.d.ts.map +1 -1
- package/lib/component/EventsTrackers/BrushTracker.js +70 -3
- package/lib/component/EventsTrackers/BrushTracker.js.map +1 -1
- package/lib/component/EventsTrackers/brush_tracker.types.d.ts +93 -0
- package/lib/component/EventsTrackers/brush_tracker.types.d.ts.map +1 -0
- package/lib/component/EventsTrackers/brush_tracker.types.js +2 -0
- package/lib/component/EventsTrackers/brush_tracker.types.js.map +1 -0
- package/lib/component/EventsTrackers/brush_tracker_events_listeners.d.ts +7 -0
- package/lib/component/EventsTrackers/brush_tracker_events_listeners.d.ts.map +1 -0
- package/lib/component/EventsTrackers/brush_tracker_events_listeners.js +15 -0
- package/lib/component/EventsTrackers/brush_tracker_events_listeners.js.map +1 -0
- package/lib/component/context/ScaleContext.d.ts +1 -1
- package/lib/component/context/ScaleContext.d.ts.map +1 -1
- package/lib/component/elements/D3Axis.d.ts.map +1 -1
- package/lib/component/elements/D3Axis.js +15 -32
- package/lib/component/elements/D3Axis.js.map +1 -1
- package/lib/component/elements/export/ExportContent.d.ts.map +1 -1
- package/lib/component/elements/export/ExportContent.js +2 -2
- package/lib/component/elements/export/ExportContent.js.map +1 -1
- package/lib/component/elements/export/ExportOptionsModal.d.ts.map +1 -1
- package/lib/component/elements/export/ExportOptionsModal.js +9 -3
- package/lib/component/elements/export/ExportOptionsModal.js.map +1 -1
- package/lib/component/elements/export/useExportConfigurer.d.ts +1 -0
- package/lib/component/elements/export/useExportConfigurer.d.ts.map +1 -1
- package/lib/component/elements/export/useExportConfigurer.js +5 -0
- package/lib/component/elements/export/useExportConfigurer.js.map +1 -1
- package/lib/component/elements/print/PrintContent.d.ts.map +1 -1
- package/lib/component/elements/print/PrintContent.js +6 -25
- package/lib/component/elements/print/PrintContent.js.map +1 -1
- package/lib/component/elements/tanstack_table/create_action_column.d.ts +11 -0
- package/lib/component/elements/tanstack_table/create_action_column.d.ts.map +1 -0
- package/lib/component/elements/tanstack_table/create_action_column.js +24 -0
- package/lib/component/elements/tanstack_table/create_action_column.js.map +1 -0
- package/lib/component/elements/tanstack_table/create_column_helper.d.ts +5 -0
- package/lib/component/elements/tanstack_table/create_column_helper.d.ts.map +1 -0
- package/lib/component/elements/tanstack_table/create_column_helper.js +5 -0
- package/lib/component/elements/tanstack_table/create_column_helper.js.map +1 -0
- package/lib/component/elements/{ReactTable/BaseReactTable.d.ts → tanstack_table/elements/base_react_table.d.ts} +1 -1
- package/lib/component/elements/tanstack_table/elements/base_react_table.d.ts.map +1 -0
- package/lib/component/elements/{ReactTable/BaseReactTable.js → tanstack_table/elements/base_react_table.js} +1 -1
- package/lib/component/elements/tanstack_table/elements/base_react_table.js.map +1 -0
- package/lib/component/elements/{ReactTable/Elements/EmptyDataRow.d.ts → tanstack_table/elements/empty_data_row.d.ts} +1 -1
- package/lib/component/elements/tanstack_table/elements/empty_data_row.d.ts.map +1 -0
- package/lib/component/elements/{ReactTable/Elements/EmptyDataRow.js → tanstack_table/elements/empty_data_row.js} +1 -1
- package/lib/component/elements/tanstack_table/elements/empty_data_row.js.map +1 -0
- package/lib/component/elements/tanstack_table/elements/table_context.d.ts +4 -0
- package/lib/component/elements/tanstack_table/elements/table_context.d.ts.map +1 -0
- package/lib/component/elements/tanstack_table/elements/table_context.js +11 -0
- package/lib/component/elements/tanstack_table/elements/table_context.js.map +1 -0
- package/lib/component/elements/tanstack_table/elements/table_header.d.ts +12 -0
- package/lib/component/elements/tanstack_table/elements/table_header.d.ts.map +1 -0
- package/lib/component/elements/tanstack_table/elements/table_header.js +42 -0
- package/lib/component/elements/tanstack_table/elements/table_header.js.map +1 -0
- package/lib/component/elements/tanstack_table/elements/table_row.d.ts +12 -0
- package/lib/component/elements/tanstack_table/elements/table_row.d.ts.map +1 -0
- package/lib/component/elements/{ReactTable/Elements/ReactTableRow.js → tanstack_table/elements/table_row.js} +18 -17
- package/lib/component/elements/tanstack_table/elements/table_row.js.map +1 -0
- package/lib/component/elements/tanstack_table/features.d.ts +21 -0
- package/lib/component/elements/tanstack_table/features.d.ts.map +1 -0
- package/lib/component/elements/tanstack_table/features.js +14 -0
- package/lib/component/elements/tanstack_table/features.js.map +1 -0
- package/lib/component/elements/tanstack_table/index.d.ts +6 -0
- package/lib/component/elements/tanstack_table/index.d.ts.map +1 -0
- package/lib/component/elements/tanstack_table/index.js +6 -0
- package/lib/component/elements/tanstack_table/index.js.map +1 -0
- package/lib/component/elements/tanstack_table/table.d.ts +26 -0
- package/lib/component/elements/tanstack_table/table.d.ts.map +1 -0
- package/lib/component/elements/{ReactTable/ReactTable.js → tanstack_table/table.js} +29 -37
- package/lib/component/elements/tanstack_table/table.js.map +1 -0
- package/lib/component/elements/tanstack_table/types.d.ts +47 -0
- package/lib/component/elements/tanstack_table/types.d.ts.map +1 -0
- package/lib/component/elements/tanstack_table/types.js +2 -0
- package/lib/component/elements/tanstack_table/types.js.map +1 -0
- package/lib/component/elements/utilities/transferStyles.d.ts +2 -0
- package/lib/component/elements/utilities/transferStyles.d.ts.map +1 -0
- package/lib/component/elements/utilities/transferStyles.js +29 -0
- package/lib/component/elements/utilities/transferStyles.js.map +1 -0
- package/lib/component/header/AutoPeakPickingOptionPanel.js +1 -1
- package/lib/component/header/AutoPeakPickingOptionPanel.js.map +1 -1
- package/lib/component/hooks/useIntegralPath.js +2 -2
- package/lib/component/hooks/useIntegralPath.js.map +1 -1
- package/lib/component/modal/ImportPublicationStringModal.d.ts.map +1 -1
- package/lib/component/modal/ImportPublicationStringModal.js +91 -73
- package/lib/component/modal/ImportPublicationStringModal.js.map +1 -1
- package/lib/component/modal/LogsHistoryModal.d.ts.map +1 -1
- package/lib/component/modal/LogsHistoryModal.js +44 -40
- package/lib/component/modal/LogsHistoryModal.js.map +1 -1
- package/lib/component/modal/editRange/forms/components/signal-tabs/SignalJCouplingsTable.d.ts.map +1 -1
- package/lib/component/modal/editRange/forms/components/signal-tabs/SignalJCouplingsTable.js +48 -44
- package/lib/component/modal/editRange/forms/components/signal-tabs/SignalJCouplingsTable.js.map +1 -1
- package/lib/component/modal/editRange/forms/components/signal-tabs/SignalPeaksTable.d.ts.map +1 -1
- package/lib/component/modal/editRange/forms/components/signal-tabs/SignalPeaksTable.js +36 -32
- package/lib/component/modal/editRange/forms/components/signal-tabs/SignalPeaksTable.js.map +1 -1
- package/lib/component/modal/metaImportation/MetaImportationModal.d.ts.map +1 -1
- package/lib/component/modal/metaImportation/MetaImportationModal.js +15 -14
- package/lib/component/modal/metaImportation/MetaImportationModal.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/errors/context.d.ts +106 -105
- package/lib/component/modal/setting/tanstack_general_settings/errors/context.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.d.ts +106 -105
- package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts +106 -105
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.d.ts +91 -90
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts +91 -90
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/hooks/use_safe_workspace.d.ts +15 -15
- package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts +91 -90
- package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.d.ts +91 -90
- package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/database_tab.d.ts +91 -90
- package/lib/component/modal/setting/tanstack_general_settings/tabs/database_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts +91 -90
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.d.ts +12 -10
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.js +32 -40
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.d.ts +91 -90
- package/lib/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts +91 -90
- package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.d.ts +91 -90
- package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.d.ts +91 -90
- package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.d.ts +91 -90
- package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_colors_tab.d.ts +91 -90
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_colors_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts +91 -90
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts +91 -90
- package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.d.ts +91 -90
- package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.d.ts +61 -17
- package/lib/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.js +79 -28
- package/lib/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/validation.d.ts +15 -15
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.d.ts +1 -1
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.d.ts.map +1 -1
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +29 -26
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js.map +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts.map +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.js +70 -76
- package/lib/component/panels/IntegralsPanel/IntegralTable.js.map +1 -1
- package/lib/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.d.ts.map +1 -1
- package/lib/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.js +33 -29
- package/lib/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.js.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksTable.d.ts +8 -6
- package/lib/component/panels/PeaksPanel/PeaksTable.d.ts.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksTable.js +116 -126
- package/lib/component/panels/PeaksPanel/PeaksTable.js.map +1 -1
- package/lib/component/panels/PeaksPanel/peaksToTSV.d.ts +2 -2
- package/lib/component/panels/PeaksPanel/peaksToTSV.d.ts.map +1 -1
- package/lib/component/panels/PeaksPanel/peaksToTSV.js +9 -11
- package/lib/component/panels/PeaksPanel/peaksToTSV.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.d.ts +3 -2
- package/lib/component/panels/RangesPanel/RangesTable.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +2 -2
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts.map +1 -1
- package/lib/component/panels/SpectraPanel/SpectraTable.d.ts.map +1 -1
- package/lib/component/panels/SpectraPanel/SpectraTable.js +37 -26
- package/lib/component/panels/SpectraPanel/SpectraTable.js.map +1 -1
- package/lib/component/panels/SpectraPanel/base/SpectraColumnsManager.d.ts +1 -1
- package/lib/component/panels/SpectraPanel/base/SpectraColumnsManager.d.ts.map +1 -1
- package/lib/component/panels/SpectraPanel/base/SpectraColumnsManager.js +56 -52
- package/lib/component/panels/SpectraPanel/base/SpectraColumnsManager.js.map +1 -1
- package/lib/component/panels/SummaryPanel/SetShiftTolerancesModal.d.ts.map +1 -1
- package/lib/component/panels/SummaryPanel/SetShiftTolerancesModal.js +23 -20
- package/lib/component/panels/SummaryPanel/SetShiftTolerancesModal.js.map +1 -1
- package/lib/component/panels/ZonesPanel/ZonesTableRow.d.ts +2 -2
- package/lib/component/panels/ZonesPanel/ZonesTableRow.d.ts.map +1 -1
- package/lib/component/panels/databasePanel/DatabaseTable.d.ts +1 -1
- package/lib/component/panels/databasePanel/DatabaseTable.d.ts.map +1 -1
- package/lib/component/panels/databasePanel/DatabaseTable.js +171 -153
- package/lib/component/panels/databasePanel/DatabaseTable.js.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/ExclusionZonesOptionsPanel.d.ts.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/ExclusionZonesOptionsPanel.js +27 -24
- package/lib/component/panels/filtersPanel/Filters/ExclusionZonesOptionsPanel.js.map +1 -1
- package/lib/component/panels/filtersPanel/processings_sections_panel.js +1 -1
- package/lib/component/panels/filtersPanel/processings_sections_panel.js.map +1 -1
- package/lib/component/panels/informationPanel/InformationEditionModal.d.ts.map +1 -1
- package/lib/component/panels/informationPanel/InformationEditionModal.js +69 -64
- package/lib/component/panels/informationPanel/InformationEditionModal.js.map +1 -1
- package/lib/component/panels/multipleAnalysisPanel/AlignSpectra.d.ts +3 -3
- package/lib/component/panels/multipleAnalysisPanel/AlignSpectra.d.ts.map +1 -1
- package/lib/component/panels/multipleAnalysisPanel/AlignSpectra.js +69 -56
- package/lib/component/panels/multipleAnalysisPanel/AlignSpectra.js.map +1 -1
- package/lib/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisPanel.js +1 -1
- package/lib/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisPanel.js.map +1 -1
- package/lib/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisTable.d.ts.map +1 -1
- package/lib/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisTable.js +17 -20
- package/lib/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisTable.js.map +1 -1
- package/lib/component/panels/multipleAnalysisPanel/preferences/AnalysisTablePreferences.d.ts.map +1 -1
- package/lib/component/panels/multipleAnalysisPanel/preferences/AnalysisTablePreferences.js +25 -20
- package/lib/component/panels/multipleAnalysisPanel/preferences/AnalysisTablePreferences.js.map +1 -1
- package/lib/component/panels/multipleAnalysisPanel/preferences/LegendsPreferences.d.ts.map +1 -1
- package/lib/component/panels/multipleAnalysisPanel/preferences/LegendsPreferences.js +41 -36
- package/lib/component/panels/multipleAnalysisPanel/preferences/LegendsPreferences.js.map +1 -1
- package/lib/component/panels/spectrumSimulation/SpinSystemTable.d.ts.map +1 -1
- package/lib/component/panels/spectrumSimulation/SpinSystemTable.js +14 -15
- package/lib/component/panels/spectrumSimulation/SpinSystemTable.js.map +1 -1
- package/lib/component/reducer/actions/DatabaseActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/DatabaseActions.js +3 -2
- package/lib/component/reducer/actions/DatabaseActions.js.map +1 -1
- package/lib/component/reducer/actions/InsetActions.d.ts +1 -1
- package/lib/component/reducer/actions/InsetActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/ToolsActions.d.ts +1 -1
- package/lib/component/reducer/actions/ToolsActions.d.ts.map +1 -1
- package/lib/component/reducer/helper/Zoom1DManager.d.ts +1 -1
- package/lib/component/reducer/helper/Zoom1DManager.d.ts.map +1 -1
- package/lib/component/reducer/helper/ZoomHistoryManager.d.ts +1 -1
- package/lib/component/reducer/helper/ZoomHistoryManager.d.ts.map +1 -1
- package/lib/component/reducer/preferences/actions/matrixGeneration.d.ts +1 -1
- package/lib/component/reducer/preferences/actions/matrixGeneration.d.ts.map +1 -1
- package/lib/component/toolbar/nmr_toolbar.js +1 -1
- package/lib/component/toolbar/nmr_toolbar.js.map +1 -1
- package/lib/component/utility/Events.d.ts +1 -1
- package/lib/component/utility/Events.d.ts.map +1 -1
- package/lib/component/utility/core_slots/core_operator_brush.commons.d.ts +9 -0
- package/lib/component/utility/core_slots/core_operator_brush.commons.d.ts.map +1 -0
- package/lib/component/utility/core_slots/core_operator_brush.commons.js +15 -0
- package/lib/component/utility/core_slots/core_operator_brush.commons.js.map +1 -0
- package/lib/component/utility/core_slots/core_operator_chart_brush.commons.d.ts +7 -0
- package/lib/component/utility/core_slots/core_operator_chart_brush.commons.d.ts.map +1 -0
- package/lib/component/utility/core_slots/core_operator_chart_brush.commons.js +82 -0
- package/lib/component/utility/core_slots/core_operator_chart_brush.commons.js.map +1 -0
- package/lib/component/utility/core_slots/core_operator_chart_brush_tracker.d.ts +8 -0
- package/lib/component/utility/core_slots/core_operator_chart_brush_tracker.d.ts.map +1 -0
- package/lib/component/utility/core_slots/core_operator_chart_brush_tracker.js +11 -0
- package/lib/component/utility/core_slots/core_operator_chart_brush_tracker.js.map +1 -0
- package/lib/component/utility/core_slots/core_operator_chart_svg.d.ts +8 -0
- package/lib/component/utility/core_slots/core_operator_chart_svg.d.ts.map +1 -0
- package/lib/component/utility/core_slots/core_operator_chart_svg.js +11 -0
- package/lib/component/utility/core_slots/core_operator_chart_svg.js.map +1 -0
- package/lib/component/utility/core_slots/core_operator_panel_tool.d.ts +2 -8
- package/lib/component/utility/core_slots/core_operator_panel_tool.d.ts.map +1 -1
- package/lib/component/utility/core_slots/core_operator_panel_tool.js +8 -6
- package/lib/component/utility/core_slots/core_operator_panel_tool.js.map +1 -1
- package/lib/component/utility/core_slots/core_operator_tool.commons.d.ts +11 -0
- package/lib/component/utility/core_slots/core_operator_tool.commons.d.ts.map +1 -0
- package/lib/component/utility/core_slots/core_operator_tool.commons.js +30 -0
- package/lib/component/utility/core_slots/core_operator_tool.commons.js.map +1 -0
- package/lib/component/utility/core_slots/core_operator_tool.d.ts +2 -8
- package/lib/component/utility/core_slots/core_operator_tool.d.ts.map +1 -1
- package/lib/component/utility/core_slots/core_operator_tool.js +8 -6
- package/lib/component/utility/core_slots/core_operator_tool.js.map +1 -1
- package/lib/component/utility/export.d.ts +5 -0
- package/lib/component/utility/export.d.ts.map +1 -1
- package/lib/component/utility/export.js +22 -0
- package/lib/component/utility/export.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/contours.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/contours.js +23 -10
- package/lib/data/data2d/Spectrum2D/contours.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/findBestMinContour/estimateNoiseLevel.d.ts +13 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/estimateNoiseLevel.d.ts.map +1 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/estimateNoiseLevel.js +40 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/estimateNoiseLevel.js.map +1 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/evaluation.d.ts +27 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/evaluation.d.ts.map +1 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/evaluation.js +230 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/evaluation.js.map +1 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/findAutomaticContourLevels.d.ts +227 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/findAutomaticContourLevels.d.ts.map +1 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/findAutomaticContourLevels.js +67 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/findAutomaticContourLevels.js.map +1 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/math.d.ts +4 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/math.d.ts.map +1 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/math.js +42 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/math.js.map +1 -0
- package/lib/data/utilities/calculateSanPlot.d.ts +3 -1
- package/lib/data/utilities/calculateSanPlot.d.ts.map +1 -1
- package/lib/data/utilities/calculateSanPlot.js +2 -2
- package/lib/data/utilities/calculateSanPlot.js.map +1 -1
- package/lib/versionInfo.js +1 -1
- package/package.json +7 -8
- package/src/component/1d/ApodizationLine.tsx +2 -2
- package/src/component/1d/BrushTracker1D.tsx +19 -21
- package/src/component/1d/Line.tsx +2 -2
- package/src/component/1d/SVGContent1D.tsx +6 -0
- package/src/component/1d/Viewer1D.tsx +2 -0
- package/src/component/1d/baseline/BaselinePreview.tsx +2 -2
- package/src/component/1d/database/DatabaseSpectrum.tsx +2 -2
- package/src/component/1d/database/ResurrectedDatabaseRanges.tsx +2 -2
- package/src/component/1d/matrix/Boxplot.tsx +5 -5
- package/src/component/1d/matrix/Stocsy.tsx +2 -2
- package/src/component/1d/peaks/PeakAnnotationsSpreadMode.tsx +17 -3
- package/src/component/1d/peaks/usePeakShapesPath.ts +2 -2
- package/src/component/1d/plugin_chart_brush_tracker.tsx +63 -0
- package/src/component/1d/plugin_svg_chart.tsx +60 -0
- package/src/component/1d-2d/components/RangeIndicator.tsx +8 -9
- package/src/component/1d-2d/tools/BrushXY.tsx +1 -1
- package/src/component/1d-2d/tools/CrossLinePointer.tsx +1 -1
- package/src/component/2d/1d-tracer/HorizontalSliceChart.tsx +2 -2
- package/src/component/2d/1d-tracer/Left1DChart.tsx +2 -2
- package/src/component/2d/1d-tracer/Top1DChart.tsx +2 -2
- package/src/component/2d/1d-tracer/VerticalSliceChart.tsx +2 -2
- package/src/component/2d/1d-tracer/phase-correction-traces/SpectrumPhaseTrace.tsx +3 -3
- package/src/component/2d/BrushTracker2D.tsx +5 -5
- package/src/component/2d/ft/Contours.tsx +2 -2
- package/src/component/2d/utilities/DimensionLayout.ts +1 -1
- package/src/component/EventsTrackers/BrushTracker.tsx +118 -115
- package/src/component/EventsTrackers/brush_tracker.types.ts +111 -0
- package/src/component/EventsTrackers/brush_tracker_events_listeners.ts +32 -0
- package/src/component/context/ScaleContext.tsx +1 -1
- package/src/component/elements/D3Axis.tsx +49 -67
- package/src/component/elements/export/ExportContent.tsx +3 -2
- package/src/component/elements/export/ExportOptionsModal.tsx +32 -1
- package/src/component/elements/export/useExportConfigurer.tsx +6 -0
- package/src/component/elements/print/PrintContent.tsx +6 -27
- package/src/component/elements/tanstack_table/create_action_column.tsx +43 -0
- package/src/component/elements/tanstack_table/create_column_helper.ts +11 -0
- package/src/component/elements/tanstack_table/elements/table_context.ts +15 -0
- package/src/component/elements/tanstack_table/elements/table_header.tsx +111 -0
- package/src/component/elements/{ReactTable/Elements/ReactTableRow.tsx → tanstack_table/elements/table_row.tsx} +51 -50
- package/src/component/elements/tanstack_table/features.ts +33 -0
- package/src/component/elements/tanstack_table/index.ts +5 -0
- package/src/component/elements/{ReactTable/ReactTable.tsx → tanstack_table/table.tsx} +78 -157
- package/src/component/elements/tanstack_table/types.ts +86 -0
- package/src/component/elements/utilities/transferStyles.ts +32 -0
- package/src/component/header/AutoPeakPickingOptionPanel.tsx +1 -1
- package/src/component/hooks/useIntegralPath.ts +2 -2
- package/src/component/modal/ImportPublicationStringModal.tsx +160 -136
- package/src/component/modal/LogsHistoryModal.tsx +32 -25
- package/src/component/modal/editRange/forms/components/signal-tabs/SignalJCouplingsTable.tsx +28 -24
- package/src/component/modal/editRange/forms/components/signal-tabs/SignalPeaksTable.tsx +27 -25
- package/src/component/modal/metaImportation/MetaImportationModal.tsx +19 -15
- package/src/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.tsx +47 -57
- package/src/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.ts +100 -28
- package/src/component/panels/AutomaticAssignment/AutomaticAssignmentTable.tsx +27 -25
- package/src/component/panels/IntegralsPanel/IntegralTable.tsx +75 -89
- package/src/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.tsx +68 -60
- package/src/component/panels/PeaksPanel/PeaksTable.tsx +126 -124
- package/src/component/panels/PeaksPanel/peaksToTSV.ts +14 -15
- package/src/component/panels/RangesPanel/RangesTable.tsx +3 -2
- package/src/component/panels/RangesPanel/RangesTableRow.tsx +2 -2
- package/src/component/panels/SpectraPanel/SpectraTable.tsx +58 -36
- package/src/component/panels/SpectraPanel/base/SpectraColumnsManager.tsx +31 -35
- package/src/component/panels/SummaryPanel/SetShiftTolerancesModal.tsx +25 -20
- package/src/component/panels/ZonesPanel/ZonesTableRow.tsx +2 -2
- package/src/component/panels/databasePanel/DatabasePanel.tsx +1 -1
- package/src/component/panels/databasePanel/DatabaseTable.tsx +189 -183
- package/src/component/panels/filtersPanel/Filters/ExclusionZonesOptionsPanel.tsx +20 -20
- package/src/component/panels/filtersPanel/processings_sections_panel.tsx +1 -1
- package/src/component/panels/informationPanel/InformationEditionModal.tsx +40 -37
- package/src/component/panels/multipleAnalysisPanel/AlignSpectra.tsx +128 -98
- package/src/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisPanel.tsx +1 -1
- package/src/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisTable.tsx +23 -24
- package/src/component/panels/multipleAnalysisPanel/preferences/AnalysisTablePreferences.tsx +33 -24
- package/src/component/panels/multipleAnalysisPanel/preferences/LegendsPreferences.tsx +34 -31
- package/src/component/panels/spectrumSimulation/SpinSystemTable.tsx +19 -18
- package/src/component/reducer/actions/DatabaseActions.ts +4 -3
- package/src/component/reducer/actions/InsetActions.ts +1 -1
- package/src/component/reducer/actions/ToolsActions.ts +1 -1
- package/src/component/reducer/helper/Zoom1DManager.ts +1 -1
- package/src/component/reducer/helper/ZoomHistoryManager.ts +1 -1
- package/src/component/reducer/preferences/actions/matrixGeneration.ts +1 -1
- package/src/component/toolbar/nmr_toolbar.tsx +1 -1
- package/src/component/utility/Events.tsx +1 -1
- package/src/component/utility/core_slots/core_operator_brush.commons.ts +18 -0
- package/src/component/utility/core_slots/core_operator_chart_brush.commons.ts +138 -0
- package/src/component/utility/core_slots/core_operator_chart_brush_tracker.tsx +27 -0
- package/src/component/utility/core_slots/core_operator_chart_svg.tsx +46 -0
- package/src/component/utility/core_slots/core_operator_panel_tool.tsx +9 -27
- package/src/component/utility/core_slots/core_operator_tool.commons.ts +63 -0
- package/src/component/utility/core_slots/core_operator_tool.tsx +9 -27
- package/src/component/utility/export.ts +34 -0
- package/src/data/data2d/Spectrum2D/contours.ts +40 -14
- package/src/data/data2d/Spectrum2D/findBestMinContour/estimateNoiseLevel.ts +67 -0
- package/src/data/data2d/Spectrum2D/findBestMinContour/evaluation.ts +432 -0
- package/src/data/data2d/Spectrum2D/findBestMinContour/findAutomaticContourLevels.ts +431 -0
- package/src/data/data2d/Spectrum2D/findBestMinContour/math.ts +59 -0
- package/src/data/utilities/calculateSanPlot.ts +2 -1
- package/src/versionInfo.ts +1 -1
- package/lib/component/elements/ReactTable/BaseReactTable.d.ts.map +0 -1
- package/lib/component/elements/ReactTable/BaseReactTable.js.map +0 -1
- package/lib/component/elements/ReactTable/Elements/EmptyDataRow.d.ts.map +0 -1
- package/lib/component/elements/ReactTable/Elements/EmptyDataRow.js.map +0 -1
- package/lib/component/elements/ReactTable/Elements/ReactTableHeader.d.ts +0 -10
- package/lib/component/elements/ReactTable/Elements/ReactTableHeader.d.ts.map +0 -1
- package/lib/component/elements/ReactTable/Elements/ReactTableHeader.js +0 -27
- package/lib/component/elements/ReactTable/Elements/ReactTableHeader.js.map +0 -1
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.d.ts +0 -16
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.d.ts.map +0 -1
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.js.map +0 -1
- package/lib/component/elements/ReactTable/ReactTable.d.ts +0 -64
- package/lib/component/elements/ReactTable/ReactTable.d.ts.map +0 -1
- package/lib/component/elements/ReactTable/ReactTable.js.map +0 -1
- package/lib/component/elements/ReactTable/utility/ReactTableContext.d.ts +0 -4
- package/lib/component/elements/ReactTable/utility/ReactTableContext.d.ts.map +0 -1
- package/lib/component/elements/ReactTable/utility/ReactTableContext.js +0 -11
- package/lib/component/elements/ReactTable/utility/ReactTableContext.js.map +0 -1
- package/lib/component/elements/ReactTable/utility/addCustomColumn.d.ts +0 -19
- package/lib/component/elements/ReactTable/utility/addCustomColumn.d.ts.map +0 -1
- package/lib/component/elements/ReactTable/utility/addCustomColumn.js +0 -36
- package/lib/component/elements/ReactTable/utility/addCustomColumn.js.map +0 -1
- package/lib/component/elements/ReactTable/utility/useRowSpan.d.ts +0 -9
- package/lib/component/elements/ReactTable/utility/useRowSpan.d.ts.map +0 -1
- package/lib/component/elements/ReactTable/utility/useRowSpan.js +0 -40
- package/lib/component/elements/ReactTable/utility/useRowSpan.js.map +0 -1
- package/lib/component/elements/export/utilities/transferDocumentStyles.d.ts +0 -2
- package/lib/component/elements/export/utilities/transferDocumentStyles.d.ts.map +0 -1
- package/lib/component/elements/export/utilities/transferDocumentStyles.js +0 -21
- package/lib/component/elements/export/utilities/transferDocumentStyles.js.map +0 -1
- package/lib/component/utility/PathBuilder.d.ts +0 -10
- package/lib/component/utility/PathBuilder.d.ts.map +0 -1
- package/lib/component/utility/PathBuilder.js +0 -38
- package/lib/component/utility/PathBuilder.js.map +0 -1
- package/src/component/elements/ReactTable/Elements/ReactTableHeader.tsx +0 -81
- package/src/component/elements/ReactTable/utility/ReactTableContext.ts +0 -14
- package/src/component/elements/ReactTable/utility/addCustomColumn.tsx +0 -75
- package/src/component/elements/ReactTable/utility/useRowSpan.ts +0 -61
- package/src/component/elements/export/utilities/transferDocumentStyles.ts +0 -21
- package/src/component/utility/PathBuilder.ts +0 -41
- /package/src/component/elements/{ReactTable/BaseReactTable.tsx → tanstack_table/elements/base_react_table.tsx} +0 -0
- /package/src/component/elements/{ReactTable/Elements/EmptyDataRow.tsx → tanstack_table/elements/empty_data_row.tsx} +0 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ProcessingOperatorId } from '@zakodium/nmr-types';
|
|
2
|
+
import type {
|
|
3
|
+
ProcessingOperatorUI,
|
|
4
|
+
ProcessingOperatorUIChartSVGProps,
|
|
5
|
+
} from '@zakodium/nmrium-core';
|
|
6
|
+
import { ErrorBoundary } from 'react-error-boundary';
|
|
7
|
+
|
|
8
|
+
import { LogError } from './core_operator_brush.commons.ts';
|
|
9
|
+
|
|
10
|
+
interface CoreOperatorChartSVGProps extends ProcessingOperatorUIChartSVGProps<ProcessingOperatorId> {
|
|
11
|
+
operatorUI: ProcessingOperatorUI<ProcessingOperatorId>;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function CoreOperatorChartSVG(props: CoreOperatorChartSVGProps) {
|
|
15
|
+
const {
|
|
16
|
+
operatorUI,
|
|
17
|
+
core,
|
|
18
|
+
spectrum,
|
|
19
|
+
operation,
|
|
20
|
+
height,
|
|
21
|
+
width,
|
|
22
|
+
margin,
|
|
23
|
+
indicatorLineColor,
|
|
24
|
+
scaleX,
|
|
25
|
+
scaleY,
|
|
26
|
+
} = props;
|
|
27
|
+
|
|
28
|
+
const { ChartSVG } = operatorUI;
|
|
29
|
+
if (!ChartSVG) return null;
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<ErrorBoundary FallbackComponent={LogError}>
|
|
33
|
+
<ChartSVG
|
|
34
|
+
core={core}
|
|
35
|
+
spectrum={spectrum}
|
|
36
|
+
operation={operation}
|
|
37
|
+
height={height}
|
|
38
|
+
width={width}
|
|
39
|
+
margin={margin}
|
|
40
|
+
scaleX={scaleX}
|
|
41
|
+
scaleY={scaleY}
|
|
42
|
+
indicatorLineColor={indicatorLineColor}
|
|
43
|
+
/>
|
|
44
|
+
</ErrorBoundary>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
@@ -1,41 +1,23 @@
|
|
|
1
|
-
import type { ProcessingOperatorId } from '@zakodium/nmr-types';
|
|
2
|
-
import type {
|
|
3
|
-
ProcessingOperatorUI,
|
|
4
|
-
ProcessingOperatorUIToolProps,
|
|
5
|
-
} from '@zakodium/nmrium-core';
|
|
6
|
-
import type { PartialPick } from '@zakodium/utils';
|
|
7
1
|
import { ErrorBoundary } from 'react-error-boundary';
|
|
8
2
|
|
|
9
|
-
import { useCore } from '../../context/CoreContext.tsx';
|
|
10
3
|
import { ToolbarItemError } from '../toolbar_item_error.tsx';
|
|
11
4
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
5
|
+
import type { CoreOperatorToolProps } from './core_operator_tool.commons.ts';
|
|
6
|
+
import { useToolProps } from './core_operator_tool.commons.ts';
|
|
15
7
|
|
|
16
|
-
export function CoreOperatorPanelTool(
|
|
17
|
-
props
|
|
18
|
-
|
|
19
|
-
'spectrum'
|
|
20
|
-
> &
|
|
21
|
-
CoreOperatorPanelToolProps,
|
|
22
|
-
) {
|
|
23
|
-
const { spectrum, activeOperatorId, onTriggerOperation, operator } = props;
|
|
24
|
-
const core = useCore();
|
|
8
|
+
export function CoreOperatorPanelTool(props: CoreOperatorToolProps) {
|
|
9
|
+
const { spectrum, operatorUI } = props;
|
|
10
|
+
const toolProps = useToolProps(props);
|
|
25
11
|
|
|
26
12
|
if (!spectrum) return null;
|
|
27
|
-
if (!
|
|
13
|
+
if (!toolProps) return null;
|
|
14
|
+
if (!operatorUI.PanelTool) return null;
|
|
28
15
|
|
|
29
|
-
const { PanelTool } =
|
|
16
|
+
const { PanelTool } = operatorUI;
|
|
30
17
|
|
|
31
18
|
return (
|
|
32
19
|
<ErrorBoundary FallbackComponent={ToolbarItemError}>
|
|
33
|
-
<PanelTool
|
|
34
|
-
core={core}
|
|
35
|
-
spectrum={spectrum}
|
|
36
|
-
activeOperatorId={activeOperatorId}
|
|
37
|
-
onTriggerOperation={onTriggerOperation}
|
|
38
|
-
/>
|
|
20
|
+
<PanelTool {...toolProps} />
|
|
39
21
|
</ErrorBoundary>
|
|
40
22
|
);
|
|
41
23
|
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ProcessingOperatorId,
|
|
3
|
+
SpectrumProcessingOperation,
|
|
4
|
+
} from '@zakodium/nmr-types';
|
|
5
|
+
import type {
|
|
6
|
+
ProcessingOperatorUI,
|
|
7
|
+
ProcessingOperatorUIToolProps,
|
|
8
|
+
} from '@zakodium/nmrium-core';
|
|
9
|
+
import { generateID } from '@zakodium/nmrium-core';
|
|
10
|
+
import type { PartialPick } from '@zakodium/utils';
|
|
11
|
+
import { assertDefined, assertNotNullish } from '@zakodium/utils';
|
|
12
|
+
import { useEventCallback } from 'usehooks-ts';
|
|
13
|
+
|
|
14
|
+
import { useCore } from '../../context/CoreContext.tsx';
|
|
15
|
+
|
|
16
|
+
interface CoreOperatorToolExtraProps {
|
|
17
|
+
operatorUI: ProcessingOperatorUI<ProcessingOperatorId>;
|
|
18
|
+
onTriggerOperation: (
|
|
19
|
+
operation: SpectrumProcessingOperation<any, any>,
|
|
20
|
+
) => void;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type CoreOperatorToolProps = PartialPick<
|
|
24
|
+
Omit<ProcessingOperatorUIToolProps, 'core' | 'onTriggerOperation'>,
|
|
25
|
+
'spectrum'
|
|
26
|
+
> &
|
|
27
|
+
CoreOperatorToolExtraProps;
|
|
28
|
+
|
|
29
|
+
export function useToolProps(
|
|
30
|
+
props: CoreOperatorToolProps,
|
|
31
|
+
): ProcessingOperatorUIToolProps | null {
|
|
32
|
+
const {
|
|
33
|
+
spectrum,
|
|
34
|
+
activeOperatorId,
|
|
35
|
+
onTriggerOperation: onTriggerOperationProp,
|
|
36
|
+
operatorUI,
|
|
37
|
+
} = props;
|
|
38
|
+
const core = useCore();
|
|
39
|
+
|
|
40
|
+
const onTriggerOperation = useEventCallback(() => {
|
|
41
|
+
const operator = core.getOperator(operatorUI.id);
|
|
42
|
+
assertNotNullish(operator);
|
|
43
|
+
assertDefined(spectrum);
|
|
44
|
+
|
|
45
|
+
onTriggerOperationProp({
|
|
46
|
+
operatorId: operatorUI.id,
|
|
47
|
+
uid: generateID(),
|
|
48
|
+
settings: operator.getDefaultSettings(spectrum),
|
|
49
|
+
options: undefined,
|
|
50
|
+
enabled: true,
|
|
51
|
+
error: undefined,
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
if (!spectrum) return null;
|
|
56
|
+
|
|
57
|
+
return {
|
|
58
|
+
core,
|
|
59
|
+
spectrum,
|
|
60
|
+
activeOperatorId,
|
|
61
|
+
onTriggerOperation,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
@@ -1,41 +1,23 @@
|
|
|
1
|
-
import type { ProcessingOperatorId } from '@zakodium/nmr-types';
|
|
2
|
-
import type {
|
|
3
|
-
ProcessingOperatorUI,
|
|
4
|
-
ProcessingOperatorUIToolProps,
|
|
5
|
-
} from '@zakodium/nmrium-core';
|
|
6
|
-
import type { PartialPick } from '@zakodium/utils';
|
|
7
1
|
import { ErrorBoundary } from 'react-error-boundary';
|
|
8
2
|
|
|
9
|
-
import { useCore } from '../../context/CoreContext.tsx';
|
|
10
3
|
import { ToolbarItemError } from '../toolbar_item_error.tsx';
|
|
11
4
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
5
|
+
import type { CoreOperatorToolProps } from './core_operator_tool.commons.ts';
|
|
6
|
+
import { useToolProps } from './core_operator_tool.commons.ts';
|
|
15
7
|
|
|
16
|
-
export function CoreOperatorTool(
|
|
17
|
-
props
|
|
18
|
-
|
|
19
|
-
'spectrum'
|
|
20
|
-
> &
|
|
21
|
-
CoreOperatorToolProps,
|
|
22
|
-
) {
|
|
23
|
-
const { spectrum, activeOperatorId, onTriggerOperation, operator } = props;
|
|
24
|
-
const core = useCore();
|
|
8
|
+
export function CoreOperatorTool(props: CoreOperatorToolProps) {
|
|
9
|
+
const { spectrum, operatorUI } = props;
|
|
10
|
+
const toolProps = useToolProps(props);
|
|
25
11
|
|
|
26
12
|
if (!spectrum) return null;
|
|
27
|
-
if (!
|
|
13
|
+
if (!toolProps) return null;
|
|
14
|
+
if (!operatorUI.Tool) return null;
|
|
28
15
|
|
|
29
|
-
const { Tool } =
|
|
16
|
+
const { Tool } = operatorUI;
|
|
30
17
|
|
|
31
18
|
return (
|
|
32
19
|
<ErrorBoundary FallbackComponent={ToolbarItemError}>
|
|
33
|
-
<Tool
|
|
34
|
-
core={core}
|
|
35
|
-
spectrum={spectrum}
|
|
36
|
-
activeOperatorId={activeOperatorId}
|
|
37
|
-
onTriggerOperation={onTriggerOperation}
|
|
38
|
-
/>
|
|
20
|
+
<Tool {...toolProps} />
|
|
39
21
|
</ErrorBoundary>
|
|
40
22
|
);
|
|
41
23
|
}
|
|
@@ -139,6 +139,39 @@ interface CreateCanvasByChunksOptions {
|
|
|
139
139
|
scaleFactor?: number;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
+
/**
|
|
143
|
+
* Browsers limits.
|
|
144
|
+
*/
|
|
145
|
+
export const MAX_CANVAS_SIDE = 32_767;
|
|
146
|
+
export const MAX_CANVAS_AREA = 268_435_456;
|
|
147
|
+
|
|
148
|
+
function formatPixels(value: number) {
|
|
149
|
+
return Math.round(value).toLocaleString('en-US');
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/** throw error if canvas size exceeds browsers limits */
|
|
153
|
+
function assertCanvasSize(width: number, height: number) {
|
|
154
|
+
const size = `${formatPixels(width)} x ${formatPixels(height)} px`;
|
|
155
|
+
|
|
156
|
+
if (width < 1 || height < 1) {
|
|
157
|
+
throw new Error(
|
|
158
|
+
`Export size is too small: ${size}. Increase the size or the DPI.`,
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
if (width > MAX_CANVAS_SIDE || height > MAX_CANVAS_SIDE) {
|
|
163
|
+
throw new Error(
|
|
164
|
+
`Export size is too large: ${size}. Each side must be at most ${formatPixels(MAX_CANVAS_SIDE)} px. Reduce the size or the DPI.`,
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
if (width * height > MAX_CANVAS_AREA) {
|
|
169
|
+
throw new Error(
|
|
170
|
+
`Export size is too large: ${size} is over the ${formatPixels(MAX_CANVAS_AREA)} px limit. Reduce the size or the DPI.`,
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
142
175
|
interface DrawImageOptions {
|
|
143
176
|
context: OffscreenCanvasRenderingContext2D;
|
|
144
177
|
chunkX: number;
|
|
@@ -203,6 +236,7 @@ async function createCanvasByChunks(
|
|
|
203
236
|
context: OffscreenCanvasRenderingContext2D;
|
|
204
237
|
}> {
|
|
205
238
|
const { width, height, scaleFactor = 1, chunkSize = 512 } = options;
|
|
239
|
+
assertCanvasSize(width, height);
|
|
206
240
|
const canvas = new OffscreenCanvas(width, height);
|
|
207
241
|
canvas.width = width;
|
|
208
242
|
canvas.height = height;
|
|
@@ -2,10 +2,12 @@ import type { Spectrum2D, Spectrum } from '@zakodium/nmrium-core';
|
|
|
2
2
|
import { isSpectrum2DFt } from '@zakodium/nmrium-core';
|
|
3
3
|
import type { NmrData2DFt } from 'cheminfo-types';
|
|
4
4
|
import { Conrec } from 'ml-conrec';
|
|
5
|
-
import {
|
|
5
|
+
import { matrixToArray } from 'ml-spectra-processing';
|
|
6
6
|
|
|
7
7
|
import type { SpectrumFTData } from '../../../component/hooks/use2DReducer.tsx';
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
import { estimateNoiseLevel } from './findBestMinContour/estimateNoiseLevel.js';
|
|
10
|
+
import { findAutomaticContourLevels } from './findBestMinContour/findAutomaticContourLevels.ts';
|
|
9
11
|
|
|
10
12
|
interface Level {
|
|
11
13
|
positive: ContourItem;
|
|
@@ -26,6 +28,7 @@ interface BaseWheelOptions {
|
|
|
26
28
|
altKey: boolean;
|
|
27
29
|
invertScroll?: boolean;
|
|
28
30
|
}
|
|
31
|
+
|
|
29
32
|
interface WheelOptions extends BaseWheelOptions {
|
|
30
33
|
contourOptions: ContourOptions;
|
|
31
34
|
}
|
|
@@ -40,6 +43,7 @@ const DEFAULT_CONTOURS_OPTIONS: ContourOptions = {
|
|
|
40
43
|
numberOfLayers: 10,
|
|
41
44
|
},
|
|
42
45
|
};
|
|
46
|
+
|
|
43
47
|
type LevelSign = keyof Level;
|
|
44
48
|
|
|
45
49
|
const LEVEL_SIGNS: Readonly<[LevelSign, LevelSign]> = ['positive', 'negative'];
|
|
@@ -56,21 +60,43 @@ function getDefaultContoursLevel(spectrum: Spectrum2D, quadrant = 'rr') {
|
|
|
56
60
|
// @ts-expect-error type of NmrData2D should have a discriminator field to separate fid and ft
|
|
57
61
|
const quadrantData = data[quadrant];
|
|
58
62
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
const {
|
|
64
|
+
experiment = '',
|
|
65
|
+
// @ts-expect-error will be included in nexts versions
|
|
66
|
+
noise,
|
|
67
|
+
} = info;
|
|
68
|
+
const matrix = matrixToArray(quadrantData.z);
|
|
69
|
+
|
|
70
|
+
const noiseLevel = (noise as { positive: number; negative: number })
|
|
71
|
+
? Math.max(noise.positive, noise.negative)
|
|
72
|
+
: estimateNoiseLevel(matrix);
|
|
73
|
+
|
|
74
|
+
const bestMinLevel = findAutomaticContourLevels(
|
|
75
|
+
matrix,
|
|
76
|
+
quadrantData.z.length,
|
|
77
|
+
quadrantData.z[0].length,
|
|
78
|
+
noiseLevel,
|
|
79
|
+
{
|
|
80
|
+
maxFdr: 0.005,
|
|
81
|
+
diagnostics: false,
|
|
82
|
+
maxOccupancy: 0.005,
|
|
83
|
+
persistenceLevels: 5,
|
|
84
|
+
contourRatio: 1.8,
|
|
85
|
+
minPersistence: 0.5,
|
|
86
|
+
maxVerticalRidgeScore: 0.05,
|
|
87
|
+
maxHorizontalRidgeScore: 0.05,
|
|
88
|
+
ridgeCoverageThreshold: experiment.includes('jres') ? 0.9 : 0.1,
|
|
89
|
+
},
|
|
66
90
|
);
|
|
67
91
|
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
const minLevel = Math.max(minAbsPeakBase, minAllowed);
|
|
92
|
+
const { hasT1Noise, minLevelWithoutT1Noise, minLevel, maxAbsoluteValue } =
|
|
93
|
+
bestMinLevel;
|
|
72
94
|
const minContourLevel = Math.min(
|
|
73
|
-
calculateValueOfLevel(
|
|
95
|
+
calculateValueOfLevel(
|
|
96
|
+
hasT1Noise ? minLevelWithoutT1Noise : minLevel,
|
|
97
|
+
maxAbsoluteValue,
|
|
98
|
+
true,
|
|
99
|
+
),
|
|
74
100
|
DEFAULT_CONTOURS_OPTIONS.positive.contourLevels[1] -
|
|
75
101
|
DEFAULT_CONTOURS_OPTIONS.positive.numberOfLayers,
|
|
76
102
|
);
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { xMedian } from 'ml-spectra-processing';
|
|
2
|
+
|
|
3
|
+
const GAUSSIAN_MAD_SCALE = 1 / 0.6744897501960817;
|
|
4
|
+
const DEFAULT_MAX_SAMPLES = 65_536;
|
|
5
|
+
|
|
6
|
+
export interface EstimateNoiseLevelOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Maximum number of evenly spaced finite values used for estimation.
|
|
9
|
+
* @default 65536
|
|
10
|
+
*/
|
|
11
|
+
maxSamples?: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Estimates the standard deviation of signed Gaussian noise using a
|
|
16
|
+
* deterministically downsampled median absolute deviation.
|
|
17
|
+
*/
|
|
18
|
+
export function estimateNoiseLevel(
|
|
19
|
+
matrix: ArrayLike<number>,
|
|
20
|
+
options: EstimateNoiseLevelOptions = {},
|
|
21
|
+
): number {
|
|
22
|
+
const { maxSamples = DEFAULT_MAX_SAMPLES } = options;
|
|
23
|
+
|
|
24
|
+
if (!Number.isInteger(maxSamples) || maxSamples <= 0) {
|
|
25
|
+
throw new Error('maxSamples must be a positive integer');
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const sample = collectFiniteSample(matrix, maxSamples);
|
|
29
|
+
|
|
30
|
+
if (sample.length === 0) {
|
|
31
|
+
throw new Error('matrix must contain at least one finite value');
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const median = xMedian(sample);
|
|
35
|
+
|
|
36
|
+
if (median === 0) {
|
|
37
|
+
return 1; //assume NUS reconstruction.
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const averageDeviations = new Float64Array(sample.length);
|
|
41
|
+
for (let i = 0; i < sample.length; i++) {
|
|
42
|
+
averageDeviations[i] = Math.abs(sample[i] - median);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const noiseLevel = xMedian(averageDeviations) * GAUSSIAN_MAD_SCALE;
|
|
46
|
+
|
|
47
|
+
if (!Number.isFinite(noiseLevel) || noiseLevel < 0) {
|
|
48
|
+
throw new Error('unable to estimate a positive noise level');
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return noiseLevel;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function collectFiniteSample(
|
|
55
|
+
matrix: ArrayLike<number>,
|
|
56
|
+
maxSamples: number,
|
|
57
|
+
): Float64Array {
|
|
58
|
+
const step = Math.max(1, Math.ceil(matrix.length / maxSamples));
|
|
59
|
+
const sample = new Float64Array(Math.ceil(matrix.length / step));
|
|
60
|
+
let sampleIndex = 0;
|
|
61
|
+
|
|
62
|
+
for (let index = 0; index < matrix.length; index += step) {
|
|
63
|
+
sample[sampleIndex++] = matrix[index];
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return sample;
|
|
67
|
+
}
|