nmrium 2.7.0 → 3.0.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/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/SVGContent1D.js +3 -3
- 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/inset/DraggableInset.d.ts +1 -1
- package/lib/component/1d/inset/DraggableInset.d.ts.map +1 -1
- package/lib/component/1d/inset/DraggableInset.js.map +1 -1
- package/lib/component/1d/inset/InsetProvider.d.ts +1 -1
- package/lib/component/1d/inset/InsetProvider.d.ts.map +1 -1
- package/lib/component/1d/inset/InsetProvider.js.map +1 -1
- package/lib/component/1d/inset/SpectraInsets.d.ts +0 -23
- package/lib/component/1d/inset/SpectraInsets.d.ts.map +1 -1
- package/lib/component/1d/inset/SpectraInsets.js +1 -1
- package/lib/component/1d/inset/SpectraInsets.js.map +1 -1
- package/lib/component/1d/peaks/PeakEditionManager.d.ts +1 -1
- package/lib/component/1d/peaks/PeakEditionManager.d.ts.map +1 -1
- package/lib/component/1d/peaks/PeaksShapes.d.ts +1 -2
- package/lib/component/1d/peaks/PeaksShapes.d.ts.map +1 -1
- package/lib/component/1d/peaks/PeaksShapes.js +31 -17
- package/lib/component/1d/peaks/PeaksShapes.js.map +1 -1
- package/lib/component/1d/peaks/usePeakShapesPath.d.ts +1 -2
- package/lib/component/1d/peaks/usePeakShapesPath.d.ts.map +1 -1
- package/lib/component/1d/peaks/usePeakShapesPath.js +2 -3
- 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 +1 -1
- package/lib/component/1d/plugin_svg_chart.d.ts.map +1 -1
- package/lib/component/1d/plugin_svg_chart.js +16 -11
- package/lib/component/1d/plugin_svg_chart.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/1d-2d/tools/CursorToolIcon.d.ts.map +1 -1
- package/lib/component/1d-2d/tools/CursorToolIcon.js +23 -6
- package/lib/component/1d-2d/tools/CursorToolIcon.js.map +1 -1
- package/lib/component/2d/BrushTracker2D.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/KeysListenerTracker.d.ts +1 -1
- package/lib/component/EventsTrackers/KeysListenerTracker.d.ts.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/LoggerContext.js +1 -1
- package/lib/component/context/LoggerContext.js.map +1 -1
- package/lib/component/context/ScaleContext.d.ts +1 -1
- package/lib/component/context/ScaleContext.d.ts.map +1 -1
- package/lib/component/context/ScaleContext.js.map +1 -1
- package/lib/component/context/processings_mutations_context.api.d.ts +3 -2
- package/lib/component/context/processings_mutations_context.api.d.ts.map +1 -1
- package/lib/component/context/processings_mutations_context.api.js +82 -10
- package/lib/component/context/processings_mutations_context.api.js.map +1 -1
- package/lib/component/elements/Anchor.d.ts +1 -1
- package/lib/component/elements/Anchor.d.ts.map +1 -1
- package/lib/component/elements/DraggableDialog.js.map +1 -1
- package/lib/component/elements/EditableColumn.d.ts +6 -2
- package/lib/component/elements/EditableColumn.d.ts.map +1 -1
- package/lib/component/elements/EditableColumn.js +35 -25
- package/lib/component/elements/EditableColumn.js.map +1 -1
- package/lib/component/elements/ResizerWithScale.js +1 -1
- package/lib/component/elements/ResizerWithScale.js.map +1 -1
- package/lib/component/elements/export/ExportManager.d.ts +1 -1
- package/lib/component/elements/export/ExportManager.d.ts.map +1 -1
- package/lib/component/elements/export/ExportManager.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} +30 -38
- 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/header/AutoPeakPickingOptionPanel.js +1 -1
- package/lib/component/header/AutoPeakPickingOptionPanel.js.map +1 -1
- package/lib/component/header/Header.js +1 -1
- package/lib/component/header/Header.js.map +1 -1
- package/lib/component/hooks/reduce2DSpectrum.js +1 -1
- package/lib/component/hooks/useCombinedRefs.d.ts +2 -2
- package/lib/component/hooks/useCombinedRefs.d.ts.map +1 -1
- package/lib/component/hooks/useCombinedRefs.js +1 -1
- package/lib/component/hooks/useCombinedRefs.js.map +1 -1
- package/lib/component/hooks/useSaveSettings.js +1 -1
- package/lib/component/hooks/useSaveSettings.js.map +1 -1
- package/lib/component/hooks/use_axis_unit.d.ts +3 -3
- package/lib/component/main/InnerNMRiumContents.d.ts +4 -4
- package/lib/component/main/InnerNMRiumContents.d.ts.map +1 -1
- package/lib/component/main/NMRium.d.ts +1 -1
- package/lib/component/main/NMRium.d.ts.map +1 -1
- package/lib/component/main/NMRiumRefAPI.d.ts +1 -1
- package/lib/component/main/NMRiumRefAPI.d.ts.map +1 -1
- package/lib/component/main/NMRiumRefAPI.js.map +1 -1
- package/lib/component/main/NMRiumStateProvider.d.ts.map +1 -1
- package/lib/component/main/NMRiumStateProvider.js +4 -2
- package/lib/component/main/NMRiumStateProvider.js.map +1 -1
- package/lib/component/main/NMRiumViewer.d.ts +1 -1
- package/lib/component/main/NMRiumViewer.d.ts.map +1 -1
- package/lib/component/main/NMRiumViewerWrapper.d.ts +1 -1
- package/lib/component/main/NMRiumViewerWrapper.d.ts.map +1 -1
- package/lib/component/main/types.d.ts +2 -2
- package/lib/component/main/types.d.ts.map +1 -1
- package/lib/component/modal/ImportPublicationStringModal.d.ts.map +1 -1
- package/lib/component/modal/ImportPublicationStringModal.js +96 -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/changeSum/SelectMolecule.js +2 -2
- package/lib/component/modal/changeSum/SelectMolecule.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 +81 -81
- package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.d.ts +81 -81
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts +81 -81
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.d.ts +54 -54
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts +54 -54
- package/lib/component/modal/setting/tanstack_general_settings/hooks/use_safe_workspace.d.ts +9 -9
- package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts +54 -54
- package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.d.ts +54 -54
- package/lib/component/modal/setting/tanstack_general_settings/tabs/database_tab.d.ts +54 -54
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts +54 -54
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.d.ts +2 -2
- package/lib/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.d.ts +54 -54
- package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts +54 -54
- package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.d.ts +54 -54
- package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.d.ts +54 -54
- package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.d.ts +54 -54
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_colors_tab.d.ts +54 -54
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts +54 -54
- package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts +54 -54
- package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.d.ts +54 -54
- package/lib/component/modal/setting/tanstack_general_settings/validation/auto_processing_tab_validation.d.ts +28 -28
- package/lib/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.d.ts +10 -10
- package/lib/component/modal/setting/tanstack_general_settings/validation/general_tab_validation.d.ts +6 -6
- package/lib/component/modal/setting/tanstack_general_settings/validation/import_filters_tab_validation.d.ts +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/validation.d.ts +27 -27
- 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/AutomaticAssignment/useAutoAssignments.js +1 -1
- package/lib/component/panels/AutomaticAssignment/useAutoAssignments.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/IntegralsPanel/IntegralsPreferences.d.ts +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/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.d.ts +1 -0
- package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.js +30 -6
- package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.js.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksPreferences.d.ts +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/RangesPanel/TableColumns/SignalAssignmentColumn.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentColumn.js +33 -2
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentColumn.js.map +1 -1
- package/lib/component/panels/SpectraPanel/SpectraPreferences.d.ts +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/SpectrumListPanel.js +1 -1
- package/lib/component/panels/SpectraPanel/SpectrumListPanel.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/ZonesPreferences.d.ts +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/Filters/FiltersSectionsPanel.d.ts +1 -1
- package/lib/component/panels/filtersPanel/Filters/FiltersSectionsPanel.js +1 -1
- package/lib/component/panels/filtersPanel/Filters/FiltersSectionsPanel.js.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/hooks/usePhaseCorrection.d.ts +2 -2
- package/lib/component/panels/filtersPanel/Filters/hooks/usePhaseCorrection.js +2 -2
- package/lib/component/panels/filtersPanel/Filters/hooks/usePhaseCorrection.js.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/hooks/usePhaseCorrectionTwoDimensions.d.ts +2 -2
- package/lib/component/panels/filtersPanel/Filters/hooks/usePhaseCorrectionTwoDimensions.js +2 -2
- package/lib/component/panels/filtersPanel/Filters/hooks/usePhaseCorrectionTwoDimensions.js.map +1 -1
- package/lib/component/panels/filtersPanel/processings/processing_item.js +1 -1
- package/lib/component/panels/filtersPanel/processings/processing_item.js.map +1 -1
- package/lib/component/panels/filtersPanel/processings/use_live_edit.d.ts +2 -6
- package/lib/component/panels/filtersPanel/processings/use_live_edit.d.ts.map +1 -1
- package/lib/component/panels/filtersPanel/processings/use_live_edit.js +9 -9
- package/lib/component/panels/filtersPanel/processings/use_live_edit.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/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/Reducer.d.ts +5 -6
- package/lib/component/reducer/Reducer.d.ts.map +1 -1
- package/lib/component/reducer/Reducer.js +1 -1
- package/lib/component/reducer/Reducer.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 +2 -3
- package/lib/component/reducer/actions/InsetActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/InsetActions.js +4 -5
- package/lib/component/reducer/actions/InsetActions.js.map +1 -1
- package/lib/component/reducer/actions/RangesActions.d.ts +1 -0
- package/lib/component/reducer/actions/RangesActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/RangesActions.js +33 -11
- package/lib/component/reducer/actions/RangesActions.js.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/actions/processings_actions.d.ts +1 -0
- package/lib/component/reducer/actions/processings_actions.d.ts.map +1 -1
- package/lib/component/reducer/actions/processings_actions.js +4 -2
- package/lib/component/reducer/actions/processings_actions.js.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 +2 -2
- package/lib/component/reducer/helper/ZoomHistoryManager.d.ts.map +1 -1
- package/lib/component/reducer/helper/removeSpectrumRelatedObjectsById.js +1 -1
- package/lib/component/reducer/helper/removeSpectrumRelatedObjectsById.js.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/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_mouse_icon.d.ts +9 -0
- package/lib/component/utility/core_slots/core_operator_chart_mouse_icon.d.ts.map +1 -0
- package/lib/component/utility/core_slots/core_operator_chart_mouse_icon.js +14 -0
- package/lib/component/utility/core_slots/core_operator_chart_mouse_icon.js.map +1 -0
- package/lib/component/utility/core_slots/core_operator_chart_svg.js +1 -13
- package/lib/component/utility/core_slots/core_operator_chart_svg.js.map +1 -1
- package/lib/component/utility/core_slots/core_operator_expanded.d.ts +1 -1
- package/lib/component/utility/core_slots/core_operator_expanded.d.ts.map +1 -1
- package/lib/component/utility/core_slots/core_slot.d.ts +1 -1
- package/lib/component/utility/core_slots/core_slot.d.ts.map +1 -1
- package/lib/component/utility/filterDatabaseInfoEntry.js +1 -1
- package/lib/component/utility/filterDatabaseInfoEntry.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +2 -0
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectSignals.d.ts +1 -0
- package/lib/data/data1d/Spectrum1D/ranges/detectSignals.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/contours.js +2 -2
- package/lib/data/data2d/Spectrum2D/get2DColor.js +5 -5
- package/lib/data/data2d/Spectrum2D/get2DColor.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +2 -0
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js.map +1 -1
- package/lib/utils/clipboard/clipboardComponents.js.map +1 -1
- package/lib/versionInfo.js +1 -1
- package/package.json +34 -36
- package/src/component/1d/BrushTracker1D.tsx +19 -21
- package/src/component/1d/SVGContent1D.tsx +3 -3
- package/src/component/1d/Viewer1D.tsx +2 -0
- package/src/component/1d/inset/DraggableInset.tsx +2 -1
- package/src/component/1d/inset/InsetProvider.tsx +1 -2
- package/src/component/1d/inset/SpectraInsets.tsx +1 -32
- package/src/component/1d/peaks/PeaksShapes.tsx +62 -40
- package/src/component/1d/peaks/usePeakShapesPath.ts +2 -4
- package/src/component/1d/plugin_chart_brush_tracker.tsx +63 -0
- package/src/component/1d/plugin_svg_chart.tsx +26 -15
- package/src/component/1d-2d/tools/BrushXY.tsx +1 -1
- package/src/component/1d-2d/tools/CrossLinePointer.tsx +1 -1
- package/src/component/1d-2d/tools/CursorToolIcon.tsx +38 -16
- package/src/component/2d/BrushTracker2D.tsx +5 -5
- package/src/component/2d/utilities/DimensionLayout.ts +1 -1
- package/src/component/EventsTrackers/BrushTracker.tsx +119 -119
- package/src/component/EventsTrackers/KeysListenerTracker.tsx +1 -1
- 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/LoggerContext.tsx +1 -1
- package/src/component/context/ScaleContext.tsx +2 -1
- package/src/component/context/processings_mutations_context.api.ts +115 -17
- package/src/component/elements/Anchor.tsx +1 -1
- package/src/component/elements/DraggableDialog.tsx +2 -2
- package/src/component/elements/EditableColumn.tsx +93 -63
- package/src/component/elements/ResizerWithScale.tsx +1 -1
- package/src/component/elements/export/ExportManager.tsx +1 -1
- 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} +79 -158
- package/src/component/elements/tanstack_table/types.ts +86 -0
- package/src/component/header/AutoPeakPickingOptionPanel.tsx +1 -1
- package/src/component/header/Header.tsx +1 -1
- package/src/component/hooks/reduce2DSpectrum.ts +1 -1
- package/src/component/hooks/useCombinedRefs.ts +3 -3
- package/src/component/hooks/useSaveSettings.tsx +1 -1
- package/src/component/main/InnerNMRiumContents.tsx +4 -4
- package/src/component/main/NMRiumRefAPI.ts +1 -1
- package/src/component/main/NMRiumStateProvider.tsx +4 -2
- package/src/component/main/NMRiumViewer.tsx +1 -1
- package/src/component/main/NMRiumViewerWrapper.tsx +1 -1
- package/src/component/main/types.ts +3 -3
- package/src/component/modal/ImportPublicationStringModal.tsx +167 -136
- package/src/component/modal/LogsHistoryModal.tsx +32 -25
- package/src/component/modal/changeSum/SelectMolecule.tsx +2 -2
- 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/panels/AutomaticAssignment/AutomaticAssignmentTable.tsx +27 -25
- package/src/component/panels/AutomaticAssignment/useAutoAssignments.ts +1 -1
- package/src/component/panels/IntegralsPanel/IntegralTable.tsx +75 -89
- package/src/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.tsx +68 -60
- package/src/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.ts +40 -8
- 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/RangesPanel/TableColumns/SignalAssignmentColumn.tsx +52 -2
- package/src/component/panels/SpectraPanel/SpectraTable.tsx +58 -36
- package/src/component/panels/SpectraPanel/SpectrumListPanel.tsx +1 -1
- 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/Filters/FiltersSectionsPanel.tsx +1 -1
- package/src/component/panels/filtersPanel/Filters/hooks/usePhaseCorrection.tsx +2 -2
- package/src/component/panels/filtersPanel/Filters/hooks/usePhaseCorrectionTwoDimensions.tsx +2 -2
- package/src/component/panels/filtersPanel/processings/processing_item.tsx +1 -1
- package/src/component/panels/filtersPanel/processings/use_live_edit.ts +9 -17
- package/src/component/panels/informationPanel/InformationEditionModal.tsx +40 -37
- 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/Reducer.ts +7 -4
- package/src/component/reducer/actions/DatabaseActions.ts +4 -3
- package/src/component/reducer/actions/InsetActions.ts +8 -10
- package/src/component/reducer/actions/RangesActions.ts +78 -20
- package/src/component/reducer/actions/ToolsActions.ts +1 -1
- package/src/component/reducer/actions/processings_actions.ts +5 -2
- package/src/component/reducer/helper/Zoom1DManager.ts +1 -1
- package/src/component/reducer/helper/ZoomHistoryManager.ts +2 -2
- package/src/component/reducer/helper/removeSpectrumRelatedObjectsById.ts +1 -1
- package/src/component/reducer/preferences/actions/matrixGeneration.ts +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_mouse_icon.tsx +32 -0
- package/src/component/utility/core_slots/core_operator_chart_svg.tsx +2 -17
- package/src/component/utility/filterDatabaseInfoEntry.ts +1 -1
- package/src/data/data1d/Spectrum1D/initiateDatum1D.ts +3 -0
- package/src/data/data2d/Spectrum2D/contours.ts +2 -2
- package/src/data/data2d/Spectrum2D/get2DColor.ts +5 -5
- package/src/data/data2d/Spectrum2D/initiateDatum2D.ts +4 -0
- package/src/utils/clipboard/clipboardComponents.tsx +5 -5
- 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/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/{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
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import { filterAssignedIDs } from '../../assignment/utilities/filterAssignedIDs.js';
|
|
12
12
|
import { useDispatch } from '../../context/DispatchContext.js';
|
|
13
13
|
import { ContextMenu } from '../../elements/ContextMenuBluePrint.js';
|
|
14
|
-
import type {
|
|
14
|
+
import type { TanStackTableContextMenuProps } from '../../elements/tanstack_table/index.ts';
|
|
15
15
|
import { useHighlight } from '../../highlight/index.js';
|
|
16
16
|
|
|
17
17
|
import AbsoluteColumn from './TableColumns/AbsoluteColumn.js';
|
|
@@ -33,7 +33,7 @@ const ConstantlyHighlightedRowStyle = {
|
|
|
33
33
|
backgroundColor: '#f5f5dc',
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
interface RangesTableRowProps extends
|
|
36
|
+
interface RangesTableRowProps extends TanStackTableContextMenuProps<RangeData> {
|
|
37
37
|
rowData: RangeData;
|
|
38
38
|
preferences: WorkspacePanelPreferences['ranges'];
|
|
39
39
|
info: Info1D;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
import { Button } from 'react-science/ui';
|
|
2
|
+
|
|
1
3
|
import { useDispatch } from '../../../context/DispatchContext.js';
|
|
2
4
|
import type { EditableColumnProps } from '../../../elements/EditableColumn.js';
|
|
3
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
CloseEditOnClick,
|
|
7
|
+
EditableColumn,
|
|
8
|
+
} from '../../../elements/EditableColumn.js';
|
|
9
|
+
import { useExtractAtomAssignmentLabel } from '../../MoleculesPanel/hooks/useExtractAtomAssignmentLabel.js';
|
|
4
10
|
import type { BaseRangeColumnProps, OnHoverEvent } from '../RangesTableRow.js';
|
|
5
11
|
|
|
6
12
|
interface SignalAssignmentColumnProps
|
|
@@ -14,6 +20,8 @@ export function SignalAssignmentColumn(props: SignalAssignmentColumnProps) {
|
|
|
14
20
|
const { row, onHover } = props;
|
|
15
21
|
const dispatch = useDispatch();
|
|
16
22
|
const signal = row.tableMetaInfo.signal;
|
|
23
|
+
const { getAssignmentLabelByDiaIDs } = useExtractAtomAssignmentLabel();
|
|
24
|
+
const assignmentLabel = signal?.assignment || '';
|
|
17
25
|
|
|
18
26
|
const saveHandler: EditableColumnProps['onSave'] = (value) => {
|
|
19
27
|
dispatch({
|
|
@@ -26,14 +34,56 @@ export function SignalAssignmentColumn(props: SignalAssignmentColumnProps) {
|
|
|
26
34
|
});
|
|
27
35
|
};
|
|
28
36
|
|
|
37
|
+
function handleAssignmentLabel() {
|
|
38
|
+
if (!signal?.diaIDs || signal.diaIDs.length === 0) return;
|
|
39
|
+
|
|
40
|
+
const isAutoAssignment = !signal.isAutoAssignment;
|
|
41
|
+
const { id, diaIDs } = signal;
|
|
42
|
+
let { assignment = '' } = signal;
|
|
43
|
+
|
|
44
|
+
if (isAutoAssignment) {
|
|
45
|
+
const autoLabel = getAssignmentLabelByDiaIDs(diaIDs);
|
|
46
|
+
if (!autoLabel) return;
|
|
47
|
+
assignment = autoLabel;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
dispatch({
|
|
51
|
+
type: 'CHANGE_1D_SIGNAL_ASSIGNMENT_LABEL',
|
|
52
|
+
payload: {
|
|
53
|
+
value: assignment,
|
|
54
|
+
rangeId: row.id,
|
|
55
|
+
signalId: id,
|
|
56
|
+
isAutoAssignment,
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const hasLink = signal?.diaIDs && signal.diaIDs.length > 0;
|
|
62
|
+
|
|
29
63
|
return (
|
|
30
64
|
<td {...onHover}>
|
|
31
65
|
<EditableColumn
|
|
32
|
-
value={
|
|
66
|
+
value={assignmentLabel}
|
|
33
67
|
onSave={saveHandler}
|
|
34
68
|
style={{ padding: '0.1rem 0.4rem' }}
|
|
35
69
|
type="text"
|
|
36
70
|
clickType={signal ? 'single' : 'none'}
|
|
71
|
+
rightElement={
|
|
72
|
+
<CloseEditOnClick>
|
|
73
|
+
<Button
|
|
74
|
+
variant="minimal"
|
|
75
|
+
icon={signal?.isAutoAssignment ? 'link' : 'unlink'}
|
|
76
|
+
|
|
77
|
+
onClick={handleAssignmentLabel}
|
|
78
|
+
disabled={!signal?.isAutoAssignment && !hasLink}
|
|
79
|
+
tooltipProps={{
|
|
80
|
+
content: signal?.isAutoAssignment
|
|
81
|
+
? 'Switch to manual assignment'
|
|
82
|
+
: 'Switch to automatic assignment',
|
|
83
|
+
}}
|
|
84
|
+
/>
|
|
85
|
+
</CloseEditOnClick>
|
|
86
|
+
}
|
|
37
87
|
/>
|
|
38
88
|
</td>
|
|
39
89
|
);
|
|
@@ -13,7 +13,6 @@ import type { CSSProperties, MouseEvent } from 'react';
|
|
|
13
13
|
import { useCallback, useMemo, useState } from 'react';
|
|
14
14
|
import { FaCopy, FaFileExport, FaRegTrashAlt } from 'react-icons/fa';
|
|
15
15
|
import { IoColorPaletteOutline } from 'react-icons/io5';
|
|
16
|
-
import type { CellProps } from 'react-table';
|
|
17
16
|
|
|
18
17
|
import { exportForCT } from '../../../data/SpectraManager.js';
|
|
19
18
|
import { ClipboardFallbackModal } from '../../../utils/clipboard/clipboardComponents.js';
|
|
@@ -24,8 +23,14 @@ import { useSortSpectra } from '../../context/SortSpectraContext.js';
|
|
|
24
23
|
import { useToaster } from '../../context/ToasterContext.js';
|
|
25
24
|
import type { ContextMenuItem } from '../../elements/ContextMenuBluePrint.js';
|
|
26
25
|
import { ContextMenu } from '../../elements/ContextMenuBluePrint.js';
|
|
27
|
-
import type {
|
|
28
|
-
|
|
26
|
+
import type {
|
|
27
|
+
TanStackTableColumn,
|
|
28
|
+
TanStackTableRow,
|
|
29
|
+
} from '../../elements/tanstack_table/index.ts';
|
|
30
|
+
import {
|
|
31
|
+
TanStackTable,
|
|
32
|
+
createTanStackColumnHelper,
|
|
33
|
+
} from '../../elements/tanstack_table/index.ts';
|
|
29
34
|
import { usePanelPreferences } from '../../hooks/usePanelPreferences.js';
|
|
30
35
|
import ExportAsJcampModal from '../../modal/ExportAsJcampModal.js';
|
|
31
36
|
import { getValueByPath } from '../../utility/getValueByPath.ts';
|
|
@@ -146,6 +151,8 @@ function isValidExportForCT(spectrum: Spectrum, molecules: StateMolecule[]) {
|
|
|
146
151
|
return true;
|
|
147
152
|
}
|
|
148
153
|
|
|
154
|
+
const columnHelper = createTanStackColumnHelper<Spectrum>();
|
|
155
|
+
|
|
149
156
|
export function SpectraTable(props: SpectraTableProps) {
|
|
150
157
|
const {
|
|
151
158
|
data,
|
|
@@ -165,18 +172,23 @@ export function SpectraTable(props: SpectraTableProps) {
|
|
|
165
172
|
const { sort, reset } = useSortSpectra();
|
|
166
173
|
|
|
167
174
|
const COLUMNS: Partial<
|
|
168
|
-
Record<
|
|
175
|
+
Record<
|
|
176
|
+
(string & {}) | PredefinedSpectraColumn,
|
|
177
|
+
TanStackTableColumn<Spectrum>
|
|
178
|
+
>
|
|
169
179
|
> = useMemo(
|
|
170
180
|
() => ({
|
|
171
181
|
visible: {
|
|
172
182
|
id: 'hide-show-spectrum',
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
183
|
+
header: '',
|
|
184
|
+
meta: {
|
|
185
|
+
style: {
|
|
186
|
+
width: '35px',
|
|
187
|
+
maxWidth: '55px',
|
|
188
|
+
height: '24px',
|
|
189
|
+
},
|
|
178
190
|
},
|
|
179
|
-
|
|
191
|
+
cell: ({ row }) => {
|
|
180
192
|
return (
|
|
181
193
|
<ShowHideSpectrumButton
|
|
182
194
|
data={row.original}
|
|
@@ -187,12 +199,14 @@ export function SpectraTable(props: SpectraTableProps) {
|
|
|
187
199
|
},
|
|
188
200
|
color: {
|
|
189
201
|
id: 'spectrum-actions',
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
202
|
+
meta: {
|
|
203
|
+
style: {
|
|
204
|
+
width: '30px',
|
|
205
|
+
maxWidth: '30px',
|
|
206
|
+
height: '24px',
|
|
207
|
+
},
|
|
194
208
|
},
|
|
195
|
-
|
|
209
|
+
cell: ({ row }) => {
|
|
196
210
|
const {
|
|
197
211
|
display,
|
|
198
212
|
info: { dimension, isFid },
|
|
@@ -215,7 +229,7 @@ export function SpectraTable(props: SpectraTableProps) {
|
|
|
215
229
|
);
|
|
216
230
|
|
|
217
231
|
const selectContextMenuHandler = useCallback(
|
|
218
|
-
async (option: any, spectrum:
|
|
232
|
+
async (option: any, spectrum: Spectrum) => {
|
|
219
233
|
const { id } = option;
|
|
220
234
|
switch (id) {
|
|
221
235
|
case SpectraContextMenuOptionsKeys.CopyToClipboard: {
|
|
@@ -288,13 +302,14 @@ export function SpectraTable(props: SpectraTableProps) {
|
|
|
288
302
|
[dispatch, molecules, rawWriteWithType, toaster],
|
|
289
303
|
);
|
|
290
304
|
|
|
291
|
-
function handleActiveRow(row:
|
|
292
|
-
return activeSpectraSet.has(row
|
|
305
|
+
function handleActiveRow(row: TanStackTableRow<Spectrum>) {
|
|
306
|
+
return activeSpectraSet.has(row.original.id);
|
|
293
307
|
}
|
|
294
308
|
|
|
295
309
|
const tableColumns = useMemo(() => {
|
|
296
|
-
const columns
|
|
297
|
-
|
|
310
|
+
const columns = columnHelper.columns([]);
|
|
311
|
+
const columnIdCounts = new Map<string, number>();
|
|
312
|
+
// TODO: use column visibility feature
|
|
298
313
|
const visibleColumns = spectraPreferences.columns.filter(
|
|
299
314
|
(col) => col.visible,
|
|
300
315
|
);
|
|
@@ -305,32 +320,37 @@ export function SpectraTable(props: SpectraTableProps) {
|
|
|
305
320
|
if (name && COLUMNS[name]) {
|
|
306
321
|
columns.push({
|
|
307
322
|
...COLUMNS[name],
|
|
308
|
-
|
|
323
|
+
header: () => <ColumnHeader label={col.label} col={col} />,
|
|
309
324
|
id: name,
|
|
310
325
|
});
|
|
311
326
|
} else {
|
|
312
327
|
const pathString = pathToString(jpath);
|
|
313
328
|
let style: CSSProperties = columnStyle;
|
|
314
|
-
let cellRender:
|
|
329
|
+
let cellRender: TanStackTableColumn<Spectrum>['cell'] | null = null;
|
|
315
330
|
if (pathString === 'info.name') {
|
|
316
331
|
if (visibleColumns.length > 3) {
|
|
317
332
|
style = { ...columnStyle, width: '50%' };
|
|
318
333
|
}
|
|
319
|
-
cellRender = ({ row }
|
|
334
|
+
cellRender = ({ row }) => {
|
|
320
335
|
return <SpectrumName data={row.original} />;
|
|
321
336
|
};
|
|
322
337
|
}
|
|
323
338
|
|
|
324
339
|
if (pathString === 'info.solvent') {
|
|
325
|
-
cellRender = ({ row }
|
|
340
|
+
cellRender = ({ row }) => {
|
|
326
341
|
return <RenderAsHTML data={row.original} jpath={pathString} />;
|
|
327
342
|
};
|
|
328
343
|
}
|
|
329
344
|
|
|
330
|
-
const
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
345
|
+
const baseColumnId = `jpath:${pathString}`;
|
|
346
|
+
const duplicateIndex = columnIdCounts.get(baseColumnId) ?? 0;
|
|
347
|
+
columnIdCounts.set(baseColumnId, duplicateIndex + 1);
|
|
348
|
+
|
|
349
|
+
const cell: TanStackTableColumn<Spectrum> = {
|
|
350
|
+
header: () => <ColumnHeader label={col.label} col={col} />,
|
|
351
|
+
accessorFn: (value) => getValueByPath(value, jpath, format),
|
|
352
|
+
cell: ({ getValue }) => {
|
|
353
|
+
const val = getValue() as any;
|
|
334
354
|
return (
|
|
335
355
|
<Tooltip
|
|
336
356
|
content={val}
|
|
@@ -340,19 +360,21 @@ export function SpectraTable(props: SpectraTableProps) {
|
|
|
340
360
|
/>
|
|
341
361
|
);
|
|
342
362
|
},
|
|
343
|
-
...(cellRender && {
|
|
344
|
-
id:
|
|
345
|
-
|
|
363
|
+
...(cellRender && { cell: cellRender }),
|
|
364
|
+
id:
|
|
365
|
+
duplicateIndex === 0
|
|
366
|
+
? baseColumnId
|
|
367
|
+
: `${baseColumnId}:${duplicateIndex}`,
|
|
368
|
+
meta: { style },
|
|
346
369
|
};
|
|
347
370
|
|
|
348
371
|
columns.push(cell);
|
|
349
372
|
}
|
|
350
|
-
index++;
|
|
351
373
|
}
|
|
352
374
|
return columns;
|
|
353
375
|
}, [COLUMNS, spectraPreferences.columns]);
|
|
354
376
|
|
|
355
|
-
function handleSortEnd(data: any, isTabledSorted
|
|
377
|
+
function handleSortEnd(data: any, isTabledSorted?: boolean) {
|
|
356
378
|
if (isTabledSorted) {
|
|
357
379
|
sort({ sortType: 'sortByReferenceIndexes', sortByReferences: data });
|
|
358
380
|
} else {
|
|
@@ -360,9 +382,9 @@ export function SpectraTable(props: SpectraTableProps) {
|
|
|
360
382
|
}
|
|
361
383
|
}
|
|
362
384
|
|
|
363
|
-
function handleRowStyle(
|
|
385
|
+
function handleRowStyle(row: TanStackTableRow<Spectrum>) {
|
|
364
386
|
return {
|
|
365
|
-
base: activeSpectraSet.has(
|
|
387
|
+
base: activeSpectraSet.has(row.original.id) ? { opacity: 0.2 } : {},
|
|
366
388
|
activated: { opacity: 1 },
|
|
367
389
|
};
|
|
368
390
|
}
|
|
@@ -375,7 +397,7 @@ export function SpectraTable(props: SpectraTableProps) {
|
|
|
375
397
|
: Spectra2DContextMenuOptions;
|
|
376
398
|
return (
|
|
377
399
|
<>
|
|
378
|
-
<
|
|
400
|
+
<TanStackTable
|
|
379
401
|
rowStyle={handleRowStyle}
|
|
380
402
|
activeRow={handleActiveRow}
|
|
381
403
|
data={data}
|
|
@@ -4,12 +4,13 @@ import { useMemo } from 'react';
|
|
|
4
4
|
import { useFormContext } from 'react-hook-form';
|
|
5
5
|
import { FaPlus, FaRegTrashAlt } from 'react-icons/fa';
|
|
6
6
|
import { Button } from 'react-science/ui';
|
|
7
|
-
import type { CellProps } from 'react-table';
|
|
8
7
|
|
|
9
8
|
import type { InputStyle } from '../../../elements/Input.js';
|
|
10
9
|
import { Input2Controller } from '../../../elements/Input2Controller.js';
|
|
11
|
-
import
|
|
12
|
-
|
|
10
|
+
import {
|
|
11
|
+
TanStackTable,
|
|
12
|
+
createTanStackColumnHelper,
|
|
13
|
+
} from '../../../elements/tanstack_table/index.ts';
|
|
13
14
|
import { convertPathArrayToString } from '../../../utility/convertPathArrayToString.js';
|
|
14
15
|
|
|
15
16
|
const inputStyle: InputStyle = {
|
|
@@ -42,26 +43,22 @@ interface SpectraColumnsManagerProps {
|
|
|
42
43
|
mapOnChangeValue: (value: string) => string;
|
|
43
44
|
}
|
|
44
45
|
|
|
45
|
-
export function SpectraColumnsManager({
|
|
46
|
-
nucleus,
|
|
47
|
-
onAdd,
|
|
48
|
-
onDelete,
|
|
49
|
-
datalist,
|
|
50
|
-
mapOnChangeValue,
|
|
51
|
-
}: SpectraColumnsManagerProps) {
|
|
46
|
+
export function SpectraColumnsManager(props: SpectraColumnsManagerProps) {
|
|
47
|
+
const { nucleus, onAdd, onDelete, datalist, mapOnChangeValue } = props;
|
|
52
48
|
const { control, getValues, register } = useFormContext();
|
|
53
49
|
|
|
54
|
-
const COLUMNS = useMemo
|
|
55
|
-
()
|
|
50
|
+
const COLUMNS = useMemo(() => {
|
|
51
|
+
const columnHelper = createTanStackColumnHelper<SpectraTableColumn>();
|
|
52
|
+
return columnHelper.columns([
|
|
56
53
|
{
|
|
57
|
-
|
|
58
|
-
style: { width: '25px' },
|
|
59
|
-
|
|
54
|
+
header: '#',
|
|
55
|
+
meta: { style: { width: '25px' } },
|
|
56
|
+
accessorFn: (_, index) => index + 1,
|
|
60
57
|
},
|
|
61
58
|
{
|
|
62
|
-
|
|
63
|
-
style: { padding: 0 },
|
|
64
|
-
|
|
59
|
+
header: 'Label',
|
|
60
|
+
meta: { style: { padding: 0 } },
|
|
61
|
+
cell: ({ row }) => {
|
|
65
62
|
const name = getObjectKey(nucleus, row.index, 'label');
|
|
66
63
|
return (
|
|
67
64
|
<Input2Controller
|
|
@@ -74,9 +71,9 @@ export function SpectraColumnsManager({
|
|
|
74
71
|
},
|
|
75
72
|
},
|
|
76
73
|
{
|
|
77
|
-
|
|
78
|
-
style: { padding: 0 },
|
|
79
|
-
|
|
74
|
+
header: 'Column',
|
|
75
|
+
meta: { style: { padding: 0 } },
|
|
76
|
+
cell: ({ row }) => {
|
|
80
77
|
const column: any = row.original;
|
|
81
78
|
|
|
82
79
|
if (column?.name) {
|
|
@@ -106,10 +103,10 @@ export function SpectraColumnsManager({
|
|
|
106
103
|
},
|
|
107
104
|
},
|
|
108
105
|
{
|
|
109
|
-
|
|
110
|
-
style: { padding: 0 },
|
|
111
|
-
|
|
112
|
-
const column
|
|
106
|
+
header: 'Format',
|
|
107
|
+
meta: { style: { padding: 0 } },
|
|
108
|
+
cell: ({ row }) => {
|
|
109
|
+
const column = row.original as any;
|
|
113
110
|
const name = getObjectKey(nucleus, row.index, 'format');
|
|
114
111
|
return (
|
|
115
112
|
<Input2Controller
|
|
@@ -123,9 +120,9 @@ export function SpectraColumnsManager({
|
|
|
123
120
|
},
|
|
124
121
|
},
|
|
125
122
|
{
|
|
126
|
-
|
|
127
|
-
style: { width: '30px', textAlign: 'center' },
|
|
128
|
-
|
|
123
|
+
header: 'Visible',
|
|
124
|
+
meta: { style: { width: '30px', textAlign: 'center' } },
|
|
125
|
+
cell: ({ row }) => (
|
|
129
126
|
<Checkbox
|
|
130
127
|
style={{ margin: 0 }}
|
|
131
128
|
{...register(getObjectKey(nucleus, row.index, 'visible'))}
|
|
@@ -133,10 +130,10 @@ export function SpectraColumnsManager({
|
|
|
133
130
|
),
|
|
134
131
|
},
|
|
135
132
|
{
|
|
136
|
-
|
|
137
|
-
style: { width: '65px' },
|
|
133
|
+
header: '',
|
|
134
|
+
meta: { style: { width: '65px' } },
|
|
138
135
|
id: 'op-buttons',
|
|
139
|
-
|
|
136
|
+
cell: ({ row }) => {
|
|
140
137
|
const record: any = row.original;
|
|
141
138
|
return (
|
|
142
139
|
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
|
@@ -164,12 +161,11 @@ export function SpectraColumnsManager({
|
|
|
164
161
|
);
|
|
165
162
|
},
|
|
166
163
|
},
|
|
167
|
-
]
|
|
168
|
-
|
|
169
|
-
);
|
|
164
|
+
]);
|
|
165
|
+
}, [control, datalist, mapOnChangeValue, nucleus, onAdd, onDelete, register]);
|
|
170
166
|
|
|
171
167
|
return (
|
|
172
|
-
<
|
|
168
|
+
<TanStackTable
|
|
173
169
|
data={getValues().nuclei[nucleus]?.columns || []}
|
|
174
170
|
columns={COLUMNS}
|
|
175
171
|
rowStyle={{
|
|
@@ -3,16 +3,17 @@ import { yupResolver } from '@hookform/resolvers/yup';
|
|
|
3
3
|
import type { CorrelationTolerance } from 'nmr-processing';
|
|
4
4
|
import { useMemo } from 'react';
|
|
5
5
|
import { useForm } from 'react-hook-form';
|
|
6
|
-
import type { CellProps } from 'react-table';
|
|
7
6
|
import * as Yup from 'yup';
|
|
8
7
|
|
|
9
8
|
import { useChartData } from '../../context/ChartContext.js';
|
|
10
9
|
import { useDispatch } from '../../context/DispatchContext.js';
|
|
11
10
|
import Button from '../../elements/Button.js';
|
|
12
11
|
import { NumberInput2Controller } from '../../elements/NumberInput2Controller.js';
|
|
13
|
-
import type { Column } from '../../elements/ReactTable/ReactTable.js';
|
|
14
|
-
import ReactTable from '../../elements/ReactTable/ReactTable.js';
|
|
15
12
|
import { StandardDialog } from '../../elements/StandardDialog.tsx';
|
|
13
|
+
import {
|
|
14
|
+
TanStackTable,
|
|
15
|
+
createTanStackColumnHelper,
|
|
16
|
+
} from '../../elements/tanstack_table/index.ts';
|
|
16
17
|
|
|
17
18
|
interface ToleranceItem {
|
|
18
19
|
atom: string;
|
|
@@ -50,6 +51,10 @@ export function SetShiftToleranceModal(props: SetShiftToleranceModalProps) {
|
|
|
50
51
|
return <InnerSetShiftToleranceModal {...otherPros} />;
|
|
51
52
|
}
|
|
52
53
|
|
|
54
|
+
interface FormData {
|
|
55
|
+
tolerances: ToleranceItem[];
|
|
56
|
+
}
|
|
57
|
+
|
|
53
58
|
function InnerSetShiftToleranceModal(props: InnerSetShiftToleranceModalProps) {
|
|
54
59
|
const { onClose } = props;
|
|
55
60
|
const { correlations } = useChartData();
|
|
@@ -66,13 +71,13 @@ function InnerSetShiftToleranceModal(props: InnerSetShiftToleranceModalProps) {
|
|
|
66
71
|
handleSubmit,
|
|
67
72
|
control,
|
|
68
73
|
formState: { isValid },
|
|
69
|
-
} = useForm<
|
|
74
|
+
} = useForm<FormData>({
|
|
70
75
|
defaultValues: { tolerances: tolerancesData },
|
|
71
76
|
resolver: yupResolver(schema),
|
|
72
77
|
mode: 'onChange',
|
|
73
78
|
});
|
|
74
79
|
|
|
75
|
-
function onSaveHandler(data:
|
|
80
|
+
function onSaveHandler(data: FormData) {
|
|
76
81
|
const tolerance: CorrelationTolerance = {};
|
|
77
82
|
for (const { atom, value } of data.tolerances) {
|
|
78
83
|
tolerance[atom] = value;
|
|
@@ -86,22 +91,23 @@ function InnerSetShiftToleranceModal(props: InnerSetShiftToleranceModalProps) {
|
|
|
86
91
|
onClose?.();
|
|
87
92
|
}
|
|
88
93
|
|
|
89
|
-
const COLUMNS
|
|
90
|
-
()
|
|
94
|
+
const COLUMNS = useMemo(() => {
|
|
95
|
+
const columnHelper = createTanStackColumnHelper<ToleranceItem>();
|
|
96
|
+
return columnHelper.columns([
|
|
91
97
|
{
|
|
92
|
-
|
|
93
|
-
style: { width: '25px', textAlign: 'center' },
|
|
94
|
-
|
|
98
|
+
header: '#',
|
|
99
|
+
meta: { style: { width: '25px', textAlign: 'center' } },
|
|
100
|
+
accessorFn: (_, index) => index + 1,
|
|
95
101
|
},
|
|
96
102
|
{
|
|
97
|
-
|
|
98
|
-
style: { width: '25px', textAlign: 'center' },
|
|
99
|
-
|
|
103
|
+
header: 'Atom',
|
|
104
|
+
meta: { style: { width: '25px', textAlign: 'center' } },
|
|
105
|
+
accessorKey: 'atom',
|
|
100
106
|
},
|
|
101
107
|
{
|
|
102
|
-
|
|
103
|
-
style: { padding: 0 },
|
|
104
|
-
|
|
108
|
+
header: 'Value',
|
|
109
|
+
meta: { style: { padding: 0 } },
|
|
110
|
+
cell: (cell) => {
|
|
105
111
|
return (
|
|
106
112
|
<NumberInput2Controller
|
|
107
113
|
name={`tolerances.${cell.row.index}.value`}
|
|
@@ -111,9 +117,8 @@ function InnerSetShiftToleranceModal(props: InnerSetShiftToleranceModalProps) {
|
|
|
111
117
|
);
|
|
112
118
|
},
|
|
113
119
|
},
|
|
114
|
-
]
|
|
115
|
-
|
|
116
|
-
);
|
|
120
|
+
]);
|
|
121
|
+
}, [control]);
|
|
117
122
|
|
|
118
123
|
return (
|
|
119
124
|
<StandardDialog
|
|
@@ -123,7 +128,7 @@ function InnerSetShiftToleranceModal(props: InnerSetShiftToleranceModalProps) {
|
|
|
123
128
|
style={{ width: 400 }}
|
|
124
129
|
>
|
|
125
130
|
<DialogBody>
|
|
126
|
-
<
|
|
131
|
+
<TanStackTable
|
|
127
132
|
data={tolerancesData}
|
|
128
133
|
columns={COLUMNS}
|
|
129
134
|
emptyDataRowText="No atoms"
|
|
@@ -4,7 +4,7 @@ import type { CSSProperties, MouseEvent } from 'react';
|
|
|
4
4
|
import type { Axis } from '../../assignment/AssignmentsContext.js';
|
|
5
5
|
import { useAssignment } from '../../assignment/AssignmentsContext.js';
|
|
6
6
|
import { ContextMenu } from '../../elements/ContextMenuBluePrint.js';
|
|
7
|
-
import type {
|
|
7
|
+
import type { TanStackTableContextMenuProps } from '../../elements/tanstack_table/index.ts';
|
|
8
8
|
import { useHighlight } from '../../highlight/index.js';
|
|
9
9
|
import { usePanelPreferences } from '../../hooks/usePanelPreferences.js';
|
|
10
10
|
|
|
@@ -24,7 +24,7 @@ export interface AssignmentsColumnProps {
|
|
|
24
24
|
onUnlink: (event: MouseEvent, flag: boolean, axis: Axis) => void;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
interface ZonesTableRowProps extends
|
|
27
|
+
interface ZonesTableRowProps extends TanStackTableContextMenuProps<ZoneData> {
|
|
28
28
|
rowData: ZoneData;
|
|
29
29
|
onUnlink: (
|
|
30
30
|
rowData: ZoneData,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
initiateDatabase,
|
|
21
21
|
prepareData,
|
|
22
22
|
} from '../../../data/data1d/database.js';
|
|
23
|
-
import type { BrushTrackerData } from '../../EventsTrackers/
|
|
23
|
+
import type { BrushTrackerData } from '../../EventsTrackers/brush_tracker.types.ts';
|
|
24
24
|
import { useChartData } from '../../context/ChartContext.js';
|
|
25
25
|
import { useCore } from '../../context/CoreContext.js';
|
|
26
26
|
import { useDispatch } from '../../context/DispatchContext.js';
|