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
|
@@ -6,16 +6,17 @@ import { useCallback, useMemo } from 'react';
|
|
|
6
6
|
import { Controller, useForm, useWatch } from 'react-hook-form';
|
|
7
7
|
import { FaPlus, FaRegTrashAlt } from 'react-icons/fa';
|
|
8
8
|
import { Button } from 'react-science/ui';
|
|
9
|
-
import type { CellProps } from 'react-table';
|
|
10
9
|
import { array, mixed, object, string } from 'yup';
|
|
11
10
|
|
|
12
11
|
import { useDispatch } from '../../context/DispatchContext.js';
|
|
13
12
|
import { Input2Controller } from '../../elements/Input2Controller.js';
|
|
14
|
-
import type { Column } from '../../elements/ReactTable/ReactTable.js';
|
|
15
|
-
import ReactTable from '../../elements/ReactTable/ReactTable.js';
|
|
16
13
|
import { Select2Controller } from '../../elements/Select2Controller.tsx';
|
|
17
14
|
import { StandardDialog } from '../../elements/StandardDialog.tsx';
|
|
18
15
|
import { StyledDialogBody } from '../../elements/StyledDialogBody.js';
|
|
16
|
+
import {
|
|
17
|
+
TanStackTable,
|
|
18
|
+
createTanStackColumnHelper,
|
|
19
|
+
} from '../../elements/tanstack_table/index.ts';
|
|
19
20
|
import { useSelectedSpectra } from '../../hooks/useSelectedSpectra.ts';
|
|
20
21
|
import { checkUniqueByKey } from '../../utility/checkUniqueByKey.js';
|
|
21
22
|
|
|
@@ -289,7 +290,7 @@ function InnerInformationPanel(props: InnerInformationPanelProps) {
|
|
|
289
290
|
const dispatch = useDispatch();
|
|
290
291
|
const spectra = useSelectedSpectra();
|
|
291
292
|
const disabled = (spectra?.length ?? 0) < 2;
|
|
292
|
-
const { handleSubmit, reset, control } = useForm<{
|
|
293
|
+
const { handleSubmit, reset, control, getValues } = useForm<{
|
|
293
294
|
metaInfo: MetaInfoItem[];
|
|
294
295
|
}>({
|
|
295
296
|
defaultValues: { metaInfo },
|
|
@@ -297,28 +298,30 @@ function InnerInformationPanel(props: InnerInformationPanelProps) {
|
|
|
297
298
|
});
|
|
298
299
|
|
|
299
300
|
const addHandler = useCallback(
|
|
300
|
-
(
|
|
301
|
-
const meta = {
|
|
301
|
+
(index = 0) => {
|
|
302
|
+
const meta: MetaInfoItem = {
|
|
302
303
|
key: '',
|
|
303
304
|
value: '',
|
|
304
305
|
scope: 'all',
|
|
305
|
-
spectra: spectra?.map(({ id }) => id),
|
|
306
|
+
spectra: spectra?.map(({ id }) => id) || [],
|
|
306
307
|
};
|
|
308
|
+
const data = getValues('metaInfo') || [];
|
|
307
309
|
reset({
|
|
308
310
|
metaInfo: [...data.slice(0, index), meta, ...data.slice(index)],
|
|
309
311
|
});
|
|
310
312
|
},
|
|
311
|
-
[reset, spectra],
|
|
313
|
+
[getValues, reset, spectra],
|
|
312
314
|
);
|
|
313
315
|
|
|
314
316
|
const deleteHandler = useCallback(
|
|
315
|
-
(
|
|
317
|
+
(index: number) => {
|
|
318
|
+
const data = getValues('metaInfo') || [];
|
|
316
319
|
const meta = data.filter(
|
|
317
320
|
(_: any, columnIndex: any) => columnIndex !== index,
|
|
318
321
|
);
|
|
319
322
|
reset({ metaInfo: meta });
|
|
320
323
|
},
|
|
321
|
-
[reset],
|
|
324
|
+
[getValues, reset],
|
|
322
325
|
);
|
|
323
326
|
|
|
324
327
|
function saveHandler(values: any) {
|
|
@@ -328,17 +331,18 @@ function InnerInformationPanel(props: InnerInformationPanelProps) {
|
|
|
328
331
|
onCloseDialog();
|
|
329
332
|
}
|
|
330
333
|
|
|
331
|
-
const COLUMNS = useMemo
|
|
332
|
-
()
|
|
334
|
+
const COLUMNS = useMemo(() => {
|
|
335
|
+
const columnHelper = createTanStackColumnHelper<MetaInfoItem>();
|
|
336
|
+
return columnHelper.columns([
|
|
333
337
|
{
|
|
334
|
-
|
|
335
|
-
style: { width: '25px', textAlign: 'center' },
|
|
336
|
-
|
|
338
|
+
header: '#',
|
|
339
|
+
meta: { style: { width: '25px', textAlign: 'center' } },
|
|
340
|
+
accessorFn: (_, index) => index + 1,
|
|
337
341
|
},
|
|
338
342
|
{
|
|
339
|
-
|
|
340
|
-
style: { padding: 0 },
|
|
341
|
-
|
|
343
|
+
header: 'Key',
|
|
344
|
+
meta: { style: { padding: 0 } },
|
|
345
|
+
cell: ({ row }) => {
|
|
342
346
|
return (
|
|
343
347
|
<Input2Controller
|
|
344
348
|
control={control}
|
|
@@ -350,9 +354,9 @@ function InnerInformationPanel(props: InnerInformationPanelProps) {
|
|
|
350
354
|
},
|
|
351
355
|
},
|
|
352
356
|
{
|
|
353
|
-
|
|
354
|
-
style: { padding: 0 },
|
|
355
|
-
|
|
357
|
+
header: 'Value',
|
|
358
|
+
meta: { style: { padding: 0 } },
|
|
359
|
+
cell: ({ row }) => {
|
|
356
360
|
const values = Object.values(row.original.values || {});
|
|
357
361
|
const uniqueValues = new Set(values);
|
|
358
362
|
const isMixed = uniqueValues.size > 1;
|
|
@@ -378,9 +382,9 @@ function InnerInformationPanel(props: InnerInformationPanelProps) {
|
|
|
378
382
|
},
|
|
379
383
|
},
|
|
380
384
|
{
|
|
381
|
-
|
|
382
|
-
style: { padding: 0 },
|
|
383
|
-
|
|
385
|
+
header: 'Scope',
|
|
386
|
+
meta: { style: { padding: 0 } },
|
|
387
|
+
cell: ({ row }) => {
|
|
384
388
|
return (
|
|
385
389
|
<Select2Controller
|
|
386
390
|
disabled={disabled}
|
|
@@ -400,9 +404,9 @@ function InnerInformationPanel(props: InnerInformationPanelProps) {
|
|
|
400
404
|
},
|
|
401
405
|
},
|
|
402
406
|
{
|
|
403
|
-
|
|
404
|
-
style: { padding: 0 },
|
|
405
|
-
|
|
407
|
+
header: 'Spectra',
|
|
408
|
+
meta: { style: { padding: 0 } },
|
|
409
|
+
cell: ({ row }) => {
|
|
406
410
|
return (
|
|
407
411
|
<Controller
|
|
408
412
|
name={`metaInfo.${row.index}.spectra`}
|
|
@@ -422,10 +426,10 @@ function InnerInformationPanel(props: InnerInformationPanelProps) {
|
|
|
422
426
|
},
|
|
423
427
|
},
|
|
424
428
|
{
|
|
425
|
-
|
|
426
|
-
style: { width: '60px' },
|
|
429
|
+
header: '',
|
|
430
|
+
meta: { style: { width: '60px' } },
|
|
427
431
|
id: 'action-button',
|
|
428
|
-
|
|
432
|
+
cell: ({ row }) => {
|
|
429
433
|
return (
|
|
430
434
|
<div style={{ display: 'flex', justifyContent: 'space-evenly' }}>
|
|
431
435
|
<Button
|
|
@@ -435,7 +439,7 @@ function InnerInformationPanel(props: InnerInformationPanelProps) {
|
|
|
435
439
|
tooltipProps={{ content: '', disabled: true }}
|
|
436
440
|
onClick={(e) => {
|
|
437
441
|
e.stopPropagation();
|
|
438
|
-
addHandler(
|
|
442
|
+
addHandler(row.index + 1);
|
|
439
443
|
}}
|
|
440
444
|
>
|
|
441
445
|
<FaPlus className={Classes.ICON} />
|
|
@@ -447,7 +451,7 @@ function InnerInformationPanel(props: InnerInformationPanelProps) {
|
|
|
447
451
|
tooltipProps={{ content: '', disabled: true }}
|
|
448
452
|
onClick={(e) => {
|
|
449
453
|
e.stopPropagation();
|
|
450
|
-
deleteHandler(
|
|
454
|
+
deleteHandler(row.index);
|
|
451
455
|
}}
|
|
452
456
|
>
|
|
453
457
|
<FaRegTrashAlt className={Classes.ICON} />
|
|
@@ -456,9 +460,8 @@ function InnerInformationPanel(props: InnerInformationPanelProps) {
|
|
|
456
460
|
);
|
|
457
461
|
},
|
|
458
462
|
},
|
|
459
|
-
]
|
|
460
|
-
|
|
461
|
-
);
|
|
463
|
+
]);
|
|
464
|
+
}, [addHandler, control, deleteHandler, disabled]);
|
|
462
465
|
|
|
463
466
|
const values = useWatch({ name: 'metaInfo', control });
|
|
464
467
|
|
|
@@ -472,7 +475,7 @@ function InnerInformationPanel(props: InnerInformationPanelProps) {
|
|
|
472
475
|
size="medium"
|
|
473
476
|
variant="outlined"
|
|
474
477
|
icon="plus"
|
|
475
|
-
onClick={() => addHandler(
|
|
478
|
+
onClick={() => addHandler()}
|
|
476
479
|
tooltipProps={{ content: '', disabled: true }}
|
|
477
480
|
>
|
|
478
481
|
Add a new meta
|
|
@@ -480,7 +483,7 @@ function InnerInformationPanel(props: InnerInformationPanelProps) {
|
|
|
480
483
|
<RowCount>{spectra?.length} spectra selected</RowCount>
|
|
481
484
|
</Toolbar>
|
|
482
485
|
|
|
483
|
-
<
|
|
486
|
+
<TanStackTable
|
|
484
487
|
data={values}
|
|
485
488
|
columns={COLUMNS}
|
|
486
489
|
emptyDataRowText="No meta"
|
|
@@ -1,48 +1,41 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
|
-
import {
|
|
2
|
+
import { revalidateLogic } from '@tanstack/react-form';
|
|
3
3
|
import type { Spectrum1D } from '@zakodium/nmrium-core';
|
|
4
4
|
import { xFindClosestIndex } from 'ml-spectra-processing';
|
|
5
5
|
import { useMemo } from 'react';
|
|
6
|
-
import { useForm } from 'react-
|
|
7
|
-
import
|
|
6
|
+
import { AppForm, Button, coerceNumberInput, useForm } from 'react-science/ui';
|
|
7
|
+
import { z } from 'zod';
|
|
8
8
|
|
|
9
9
|
import { REFERENCES } from '../../../data/constants/References.js';
|
|
10
10
|
import type { CalibrateOptions } from '../../../data/data1d/Spectrum1D/getReferenceShift.js';
|
|
11
11
|
import { useDispatch } from '../../context/DispatchContext.js';
|
|
12
12
|
import { useToaster } from '../../context/ToasterContext.js';
|
|
13
|
-
import ActionButtons from '../../elements/ActionButtons.js';
|
|
14
|
-
import type { LabelStyle } from '../../elements/Label.js';
|
|
15
|
-
import Label from '../../elements/Label.js';
|
|
16
|
-
import { NumberInput2Controller } from '../../elements/NumberInput2Controller.js';
|
|
17
|
-
import { Select2 } from '../../elements/Select2.js';
|
|
18
13
|
import useSpectraByActiveNucleus from '../../hooks/useSpectraPerNucleus.js';
|
|
19
14
|
import { useEvent } from '../../utility/Events.js';
|
|
20
15
|
|
|
21
|
-
const labelStyle: LabelStyle = {
|
|
22
|
-
label: { flex: 4, fontWeight: '500' },
|
|
23
|
-
wrapper: { flex: 8, display: 'flex', alignItems: 'center' },
|
|
24
|
-
container: { padding: '5px 0' },
|
|
25
|
-
};
|
|
26
|
-
|
|
27
16
|
const baseList = [{ key: 1, value: 'manual', label: 'Manual' }];
|
|
28
17
|
|
|
29
18
|
interface AlignSpectraProps {
|
|
30
|
-
nucleus:
|
|
19
|
+
nucleus: string;
|
|
31
20
|
onClose: () => void;
|
|
32
21
|
}
|
|
33
22
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
23
|
+
type FormInput = z.input<typeof schemaValidation>;
|
|
24
|
+
|
|
25
|
+
const DEFAULT_OPTIONS: FormInput = {
|
|
26
|
+
from: '-1',
|
|
27
|
+
to: '1',
|
|
28
|
+
nbPeaks: '1',
|
|
29
|
+
targetX: '0',
|
|
30
|
+
options: 'manual',
|
|
39
31
|
};
|
|
40
32
|
|
|
41
|
-
const schemaValidation =
|
|
42
|
-
from:
|
|
43
|
-
to:
|
|
44
|
-
nbPeaks:
|
|
45
|
-
targetX:
|
|
33
|
+
const schemaValidation = z.object({
|
|
34
|
+
from: coerceNumberInput(),
|
|
35
|
+
to: coerceNumberInput(),
|
|
36
|
+
nbPeaks: coerceNumberInput(),
|
|
37
|
+
targetX: coerceNumberInput(),
|
|
38
|
+
options: z.string(),
|
|
46
39
|
});
|
|
47
40
|
|
|
48
41
|
function checkSpectra(options: CalibrateOptions, spectra: Spectrum1D[]) {
|
|
@@ -51,11 +44,14 @@ function checkSpectra(options: CalibrateOptions, spectra: Spectrum1D[]) {
|
|
|
51
44
|
const {
|
|
52
45
|
data: { x },
|
|
53
46
|
} = spectrum;
|
|
47
|
+
|
|
54
48
|
const min = x[0];
|
|
55
49
|
const max = x.at(-1) as number;
|
|
50
|
+
|
|
56
51
|
if (from < min || to > max) {
|
|
57
52
|
throw new Error('Some spectra do not have data in the selected range');
|
|
58
53
|
}
|
|
54
|
+
|
|
59
55
|
if (Math.abs(xFindClosestIndex(x, from) - xFindClosestIndex(x, to)) < 10) {
|
|
60
56
|
throw new Error(
|
|
61
57
|
'The selected range is too small to provide accurate results',
|
|
@@ -66,18 +62,23 @@ function checkSpectra(options: CalibrateOptions, spectra: Spectrum1D[]) {
|
|
|
66
62
|
|
|
67
63
|
function checkOptions(options: CalibrateOptions) {
|
|
68
64
|
const returnedOptions = { ...options };
|
|
65
|
+
|
|
69
66
|
if (options.from > options.to) {
|
|
70
67
|
returnedOptions.to = options.from;
|
|
71
68
|
returnedOptions.from = options.to;
|
|
72
69
|
}
|
|
70
|
+
|
|
73
71
|
return returnedOptions;
|
|
74
72
|
}
|
|
75
73
|
|
|
76
|
-
function getList(nucleus:
|
|
77
|
-
|
|
74
|
+
function getList(nucleus: string) {
|
|
75
|
+
const references = REFERENCES as any;
|
|
76
|
+
|
|
77
|
+
if (!references?.[nucleus]) {
|
|
78
78
|
return [];
|
|
79
79
|
}
|
|
80
|
-
|
|
80
|
+
|
|
81
|
+
const list = Object.entries(references[nucleus]).map((item) => ({
|
|
81
82
|
value: item[0],
|
|
82
83
|
label: item[0],
|
|
83
84
|
}));
|
|
@@ -93,8 +94,9 @@ const Container = styled.div`
|
|
|
93
94
|
padding: 10px 0 5px 20px;
|
|
94
95
|
|
|
95
96
|
.body {
|
|
97
|
+
flex: 1;
|
|
96
98
|
overflow: auto;
|
|
97
|
-
padding: 10px 10px 25px
|
|
99
|
+
padding: 10px 10px 25px 1px;
|
|
98
100
|
}
|
|
99
101
|
|
|
100
102
|
.header {
|
|
@@ -102,38 +104,54 @@ const Container = styled.div`
|
|
|
102
104
|
font-weight: bold;
|
|
103
105
|
padding: 5px 0;
|
|
104
106
|
}
|
|
107
|
+
`;
|
|
105
108
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
109
|
+
const Footer = styled.div`
|
|
110
|
+
display: flex;
|
|
111
|
+
flex-direction: row;
|
|
112
|
+
gap: 5px;
|
|
110
113
|
`;
|
|
111
114
|
|
|
112
|
-
function AlignSpectra(
|
|
115
|
+
export default function AlignSpectra(props: AlignSpectraProps) {
|
|
116
|
+
const { onClose = () => null, nucleus } = props;
|
|
113
117
|
const spectra = useSpectraByActiveNucleus();
|
|
114
118
|
const dispatch = useDispatch();
|
|
115
119
|
const toaster = useToaster();
|
|
116
|
-
const { handleSubmit, reset, control, getValues } = useForm<CalibrateOptions>(
|
|
117
|
-
{
|
|
118
|
-
defaultValues: DEFAULT_OPTIONS,
|
|
119
|
-
resolver: yupResolver(schemaValidation),
|
|
120
|
-
},
|
|
121
|
-
);
|
|
122
120
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
try {
|
|
127
|
-
checkSpectra(options, spectra as Spectrum1D[]);
|
|
121
|
+
const optionList = useMemo(() => {
|
|
122
|
+
return getList(nucleus);
|
|
123
|
+
}, [nucleus]);
|
|
128
124
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
125
|
+
const form = useForm({
|
|
126
|
+
defaultValues: {
|
|
127
|
+
...DEFAULT_OPTIONS,
|
|
128
|
+
options: optionList[0].value,
|
|
129
|
+
},
|
|
130
|
+
validationLogic: revalidateLogic({ mode: 'change' }),
|
|
131
|
+
onSubmit: ({ value, formApi }) => {
|
|
132
|
+
const parsed = schemaValidation.parse(value);
|
|
133
|
+
const options = checkOptions(parsed);
|
|
134
|
+
|
|
135
|
+
formApi.reset(
|
|
136
|
+
schemaValidation.encode({
|
|
137
|
+
...options,
|
|
138
|
+
options: optionList[0].value,
|
|
139
|
+
}),
|
|
140
|
+
);
|
|
133
141
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
142
|
+
try {
|
|
143
|
+
checkSpectra(options, spectra as Spectrum1D[]);
|
|
144
|
+
dispatch({ type: 'ALIGN_SPECTRA', payload: options });
|
|
145
|
+
onClose();
|
|
146
|
+
} catch (error: unknown) {
|
|
147
|
+
const message = (error as Error).message;
|
|
148
|
+
toaster.show({ intent: 'danger', message });
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
validators: {
|
|
152
|
+
onDynamic: schemaValidation,
|
|
153
|
+
},
|
|
154
|
+
});
|
|
137
155
|
|
|
138
156
|
useEvent({
|
|
139
157
|
onBrushEnd: (options) => {
|
|
@@ -141,62 +159,74 @@ function AlignSpectra({ onClose = () => null, nucleus }: AlignSpectraProps) {
|
|
|
141
159
|
range: [from, to],
|
|
142
160
|
shiftKey,
|
|
143
161
|
} = options;
|
|
162
|
+
|
|
144
163
|
if (shiftKey) {
|
|
145
|
-
|
|
164
|
+
form.setFieldValue('from', String(from));
|
|
165
|
+
form.setFieldValue('to', String(to));
|
|
146
166
|
}
|
|
147
167
|
},
|
|
148
168
|
});
|
|
149
169
|
|
|
150
|
-
function
|
|
170
|
+
function optionChangeHandlerRefactor(key: string) {
|
|
151
171
|
const { delta: targetX = 0, ...otherOptions } =
|
|
152
172
|
(REFERENCES as any)?.[nucleus]?.[key] || {};
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
173
|
+
|
|
174
|
+
form.reset(
|
|
175
|
+
schemaValidation.encode({
|
|
176
|
+
from: otherOptions.from ?? Number(DEFAULT_OPTIONS.from),
|
|
177
|
+
to: otherOptions.to ?? Number(DEFAULT_OPTIONS.to),
|
|
178
|
+
nbPeaks: otherOptions.nbPeaks ?? Number(DEFAULT_OPTIONS.nbPeaks),
|
|
179
|
+
options: key,
|
|
180
|
+
targetX,
|
|
181
|
+
}),
|
|
182
|
+
);
|
|
159
183
|
}
|
|
160
|
-
const List = useMemo(() => getList(nucleus), [nucleus]);
|
|
161
184
|
|
|
162
185
|
return (
|
|
163
|
-
<
|
|
164
|
-
<
|
|
165
|
-
<div className="
|
|
166
|
-
<
|
|
186
|
+
<AppForm form={form} layout="inline">
|
|
187
|
+
<Container>
|
|
188
|
+
<div className="body">
|
|
189
|
+
<form.Section title="Spectra calibration">
|
|
190
|
+
<form.AppField
|
|
191
|
+
name="options"
|
|
192
|
+
listeners={{
|
|
193
|
+
onChange: ({ value }) => {
|
|
194
|
+
optionChangeHandlerRefactor(value);
|
|
195
|
+
},
|
|
196
|
+
}}
|
|
197
|
+
>
|
|
198
|
+
{(field) => <field.Select label="Options" items={optionList} />}
|
|
199
|
+
</form.AppField>
|
|
200
|
+
</form.Section>
|
|
201
|
+
|
|
202
|
+
<form.Section title="Range">
|
|
203
|
+
<form.AppField name="from">
|
|
204
|
+
{(field) => <field.NumericInput label="From" fill />}
|
|
205
|
+
</form.AppField>
|
|
206
|
+
|
|
207
|
+
<form.AppField name="to">
|
|
208
|
+
{(field) => <field.NumericInput label="To" fill />}
|
|
209
|
+
</form.AppField>
|
|
210
|
+
</form.Section>
|
|
211
|
+
|
|
212
|
+
<form.Section title="Configuration">
|
|
213
|
+
<form.AppField name="nbPeaks">
|
|
214
|
+
{(field) => <field.NumericInput label="Number of peaks" />}
|
|
215
|
+
</form.AppField>
|
|
216
|
+
|
|
217
|
+
<form.AppField name="targetX">
|
|
218
|
+
{(field) => <field.NumericInput label="Target PPM" />}
|
|
219
|
+
</form.AppField>
|
|
220
|
+
</form.Section>
|
|
167
221
|
</div>
|
|
168
|
-
<
|
|
169
|
-
<
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
</
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
<Label title="From">
|
|
178
|
-
<NumberInput2Controller control={control} name="from" fill />
|
|
179
|
-
</Label>
|
|
180
|
-
<Label title="To" style={{ label: { padding: '0 10px' } }}>
|
|
181
|
-
<NumberInput2Controller control={control} name="to" fill />
|
|
182
|
-
</Label>
|
|
183
|
-
</Label>
|
|
184
|
-
|
|
185
|
-
<Label title="Number of peaks" style={labelStyle}>
|
|
186
|
-
<NumberInput2Controller control={control} name="nbPeaks" fill />
|
|
187
|
-
</Label>
|
|
188
|
-
<Label title="Target PPM" style={labelStyle}>
|
|
189
|
-
<NumberInput2Controller control={control} name="targetX" fill />
|
|
190
|
-
</Label>
|
|
191
|
-
</div>
|
|
192
|
-
<div className="footer">
|
|
193
|
-
<ActionButtons
|
|
194
|
-
onDone={() => handleSubmit(submitHandler)()}
|
|
195
|
-
onCancel={onClose}
|
|
196
|
-
/>
|
|
197
|
-
</div>
|
|
198
|
-
</Container>
|
|
222
|
+
<Footer>
|
|
223
|
+
<form.SubmitButton intent="success">Apply</form.SubmitButton>
|
|
224
|
+
|
|
225
|
+
<Button intent="danger" variant="outlined" onClick={onClose}>
|
|
226
|
+
Cancel
|
|
227
|
+
</Button>
|
|
228
|
+
</Footer>
|
|
229
|
+
</Container>
|
|
230
|
+
</AppForm>
|
|
199
231
|
);
|
|
200
232
|
}
|
|
201
|
-
|
|
202
|
-
export default AlignSpectra;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
2
|
import { Fragment, useMemo } from 'react';
|
|
3
|
-
import type { CellProps, Row } from 'react-table';
|
|
4
3
|
|
|
5
4
|
import type { SpectraAnalysisData } from '../../../data/data1d/multipleSpectraAnalysis.js';
|
|
6
5
|
import { usePreferences } from '../../context/PreferencesContext.js';
|
|
7
6
|
import { useSortSpectra } from '../../context/SortSpectraContext.js';
|
|
8
7
|
import { ColorDot } from '../../elements/ColorDot.tsx';
|
|
9
8
|
import { EmptyText } from '../../elements/EmptyText.js';
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
import {
|
|
10
|
+
TanStackTable,
|
|
11
|
+
createTanStackColumnHelper,
|
|
12
|
+
} from '../../elements/tanstack_table/index.ts';
|
|
13
13
|
import { useFormatNumberByNucleus } from '../../hooks/useFormatNumberByNucleus.js';
|
|
14
14
|
import { usePanelPreferences } from '../../hooks/usePanelPreferences.js';
|
|
15
15
|
import evaluate from '../../utility/Evaluate.js';
|
|
@@ -44,6 +44,8 @@ interface MultipleSpectraAnalysisTableProps {
|
|
|
44
44
|
|
|
45
45
|
type ValueType = SpectraAnalysisData['values'][number];
|
|
46
46
|
|
|
47
|
+
const columnHelper = createTanStackColumnHelper<ValueType>();
|
|
48
|
+
|
|
47
49
|
function MultipleSpectraAnalysisTable(
|
|
48
50
|
props: MultipleSpectraAnalysisTableProps,
|
|
49
51
|
) {
|
|
@@ -81,20 +83,19 @@ function MultipleSpectraAnalysisTable(
|
|
|
81
83
|
});
|
|
82
84
|
}
|
|
83
85
|
|
|
84
|
-
const columns
|
|
86
|
+
const columns = columnHelper.columns([
|
|
85
87
|
{
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
Cell: ({ row, data }: CellProps<any>) => {
|
|
88
|
+
header: '#',
|
|
89
|
+
accessorFn: (_, index) => index !== undefined && index + 1,
|
|
90
|
+
enableSorting: false,
|
|
91
|
+
cell: ({ row }) => {
|
|
91
92
|
const spectrumId = row.original[Object.keys(row.original)[0]].SID;
|
|
92
93
|
const color = spectraColors?.[spectrumId] || '#000000';
|
|
93
94
|
return (
|
|
94
95
|
<SerialWrapper>
|
|
95
96
|
<Serial>
|
|
96
97
|
{String(row.index + 1).padStart(
|
|
97
|
-
String(data.length).length,
|
|
98
|
+
String(data.values.length).length,
|
|
98
99
|
'0',
|
|
99
100
|
)}
|
|
100
101
|
</Serial>
|
|
@@ -103,10 +104,10 @@ function MultipleSpectraAnalysisTable(
|
|
|
103
104
|
);
|
|
104
105
|
},
|
|
105
106
|
},
|
|
106
|
-
];
|
|
107
|
+
]);
|
|
107
108
|
|
|
108
|
-
function cellHandler(row:
|
|
109
|
-
const value = row
|
|
109
|
+
function cellHandler(row: ValueType, columnKey: string) {
|
|
110
|
+
const value = row[columnKey].value;
|
|
110
111
|
return (
|
|
111
112
|
<AnalysisCell
|
|
112
113
|
value={value}
|
|
@@ -140,25 +141,23 @@ function MultipleSpectraAnalysisTable(
|
|
|
140
141
|
if (panelPreferences?.analysisOptions?.columns) {
|
|
141
142
|
const analysisColumns = panelPreferences?.analysisOptions?.columns;
|
|
142
143
|
for (const columnKey in analysisColumns) {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
index: columnIndex + 1,
|
|
146
|
-
Header: () => headerHandler(analysisColumns[columnKey], columnKey),
|
|
144
|
+
columns.push({
|
|
145
|
+
header: () => headerHandler(analysisColumns[columnKey], columnKey),
|
|
147
146
|
id: columnKey,
|
|
148
|
-
|
|
147
|
+
accessorFn: (row) => {
|
|
149
148
|
return row[columnKey].value;
|
|
150
149
|
},
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
style: { padding: 0 },
|
|
150
|
+
cell: ({ row }) => cellHandler(row.original, columnKey),
|
|
151
|
+
meta: { style: { padding: 0 } },
|
|
154
152
|
});
|
|
155
153
|
}
|
|
156
154
|
}
|
|
157
|
-
|
|
155
|
+
|
|
158
156
|
return columns;
|
|
159
157
|
}, [
|
|
160
158
|
activeTab,
|
|
161
159
|
dispatchPreferences,
|
|
160
|
+
data.values.length,
|
|
162
161
|
format,
|
|
163
162
|
panelPreferences?.analysisOptions?.columns,
|
|
164
163
|
spectraColors,
|
|
@@ -187,7 +186,7 @@ function MultipleSpectraAnalysisTable(
|
|
|
187
186
|
}
|
|
188
187
|
return data?.values.length > 0 ? (
|
|
189
188
|
<Fragment>
|
|
190
|
-
<
|
|
189
|
+
<TanStackTable
|
|
191
190
|
data={data.values}
|
|
192
191
|
columns={tableColumns}
|
|
193
192
|
onSortEnd={handleSortEnd}
|