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
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Classes } from '@blueprintjs/core';
|
|
2
|
+
import type { WorkspacePanelPreferences } from '@zakodium/nmrium-core';
|
|
2
3
|
import dlv from 'dlv';
|
|
3
4
|
import type { DatabaseNMREntry } from 'nmr-processing';
|
|
4
5
|
import type { CSSProperties } from 'react';
|
|
@@ -7,15 +8,14 @@ import { ResponsiveChart } from 'react-d3-utils';
|
|
|
7
8
|
import { FaDownload, FaInfoCircle, FaMinus, FaPlus } from 'react-icons/fa';
|
|
8
9
|
import { IdcodeSvgRenderer, SmilesSvgRenderer } from 'react-ocl';
|
|
9
10
|
import { Button } from 'react-science/ui';
|
|
10
|
-
import type { CellProps } from 'react-table';
|
|
11
11
|
|
|
12
12
|
import type { PrepareDataResult } from '../../../data/data1d/database.js';
|
|
13
13
|
import { ColumnWrapper } from '../../elements/ColumnWrapper.js';
|
|
14
14
|
import type { ContextMenuItem } from '../../elements/ContextMenuBluePrint.tsx';
|
|
15
|
-
import
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
import {
|
|
16
|
+
TanStackTable,
|
|
17
|
+
createTanStackColumnHelper,
|
|
18
|
+
} from '../../elements/tanstack_table/index.ts';
|
|
19
19
|
import { usePanelPreferences } from '../../hooks/usePanelPreferences.js';
|
|
20
20
|
import useSpectraByActiveNucleus from '../../hooks/useSpectraPerNucleus.js';
|
|
21
21
|
import { formatNumber } from '../../utility/formatNumber.js';
|
|
@@ -47,162 +47,167 @@ const overFlowStyle: CSSProperties = {
|
|
|
47
47
|
textOverflow: 'ellipsis',
|
|
48
48
|
};
|
|
49
49
|
|
|
50
|
-
const
|
|
51
|
-
databasePreferences: any,
|
|
52
|
-
): Array<CustomColumn<PrepareDataResult> & { showWhen: string }> => [
|
|
53
|
-
{
|
|
54
|
-
showWhen: 'showNames',
|
|
55
|
-
index: 1,
|
|
56
|
-
Header: 'names',
|
|
57
|
-
accessor: (row) => (row.names ? row.names.join(',') : ''),
|
|
58
|
-
enableRowSpan: true,
|
|
59
|
-
style: {
|
|
60
|
-
width: '100px',
|
|
61
|
-
minWidth: '100px',
|
|
62
|
-
maxWidth: '100px',
|
|
63
|
-
...overFlowStyle,
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
showWhen: 'range.show',
|
|
68
|
-
index: 2,
|
|
69
|
-
Header: 'From - To',
|
|
70
|
-
accessor: (row) => {
|
|
71
|
-
const rangeFormat = databasePreferences.range.format;
|
|
72
|
-
return row?.from && row?.to
|
|
73
|
-
? `${formatNumber(row.from, rangeFormat)} - ${formatNumber(
|
|
74
|
-
row.to,
|
|
75
|
-
rangeFormat,
|
|
76
|
-
)}`
|
|
77
|
-
: '';
|
|
78
|
-
},
|
|
79
|
-
enableRowSpan: true,
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
showWhen: 'delta.show',
|
|
83
|
-
index: 3,
|
|
84
|
-
Header: 'δ (ppm)',
|
|
85
|
-
accessor: 'delta',
|
|
86
|
-
Cell: ({ row }: CellProps<PrepareDataResult>) =>
|
|
87
|
-
row.original.delta
|
|
88
|
-
? formatNumber(row.original.delta, databasePreferences.delta.format)
|
|
89
|
-
: '',
|
|
90
|
-
},
|
|
91
|
-
|
|
92
|
-
{
|
|
93
|
-
showWhen: 'showAssignment',
|
|
94
|
-
index: 4,
|
|
95
|
-
Header: 'Assignment',
|
|
96
|
-
accessor: 'assignment',
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
showWhen: 'showMultiplicity',
|
|
100
|
-
index: 5,
|
|
101
|
-
Header: 'Multi.',
|
|
102
|
-
accessor: 'multiplicity',
|
|
103
|
-
},
|
|
50
|
+
const columnHelper = createTanStackColumnHelper<PrepareDataResult>();
|
|
104
51
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
52
|
+
function databaseTableColumns(
|
|
53
|
+
databasePreferences: WorkspacePanelPreferences['database'],
|
|
54
|
+
) {
|
|
55
|
+
const columns = columnHelper.columns([]);
|
|
56
|
+
// TODO: Use column visibility feature instead.
|
|
57
|
+
if (dlv(databasePreferences, 'showNames')) {
|
|
58
|
+
columns.push({
|
|
59
|
+
header: 'names',
|
|
60
|
+
accessorFn: (row) => (row.names ? row.names.join(',') : ''),
|
|
61
|
+
spanRows: true,
|
|
62
|
+
meta: {
|
|
63
|
+
style: {
|
|
64
|
+
width: '100px',
|
|
65
|
+
minWidth: '100px',
|
|
66
|
+
maxWidth: '100px',
|
|
67
|
+
...overFlowStyle,
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
if (dlv(databasePreferences, 'range.show')) {
|
|
73
|
+
columns.push({
|
|
74
|
+
header: 'From - To',
|
|
75
|
+
accessorFn: (row) => {
|
|
76
|
+
const rangeFormat = databasePreferences.range.format;
|
|
77
|
+
return row?.from && row?.to
|
|
78
|
+
? `${formatNumber(row.from, rangeFormat)} - ${formatNumber(
|
|
79
|
+
row.to,
|
|
80
|
+
rangeFormat,
|
|
81
|
+
)}`
|
|
82
|
+
: '';
|
|
83
|
+
},
|
|
84
|
+
spanRows: true,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
if (dlv(databasePreferences, 'delta.show')) {
|
|
88
|
+
columns.push({
|
|
89
|
+
header: 'δ (ppm)',
|
|
90
|
+
accessorKey: 'delta',
|
|
91
|
+
cell: ({ row }) =>
|
|
92
|
+
row.original.delta
|
|
93
|
+
? formatNumber(row.original.delta, databasePreferences.delta.format)
|
|
94
|
+
: '',
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
if (dlv(databasePreferences, 'showAssignment')) {
|
|
98
|
+
columns.push({
|
|
99
|
+
header: 'Assignment',
|
|
100
|
+
accessorKey: 'assignment',
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
if (dlv(databasePreferences, 'showMultiplicity')) {
|
|
104
|
+
columns.push({
|
|
105
|
+
header: 'Multi.',
|
|
106
|
+
accessorKey: 'multiplicity',
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
if (dlv(databasePreferences, 'coupling.show')) {
|
|
110
|
+
columns.push({
|
|
111
|
+
header: 'J (Hz)',
|
|
112
|
+
accessorFn: (row) => {
|
|
113
|
+
if (!row?.coupling) {
|
|
114
|
+
return '';
|
|
115
|
+
} else {
|
|
116
|
+
return row.coupling
|
|
117
|
+
.split(',')
|
|
118
|
+
.map((value) =>
|
|
119
|
+
formatNumber(value, databasePreferences.coupling.format),
|
|
120
|
+
)
|
|
121
|
+
.join(',');
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
meta: {
|
|
125
|
+
style: {
|
|
126
|
+
width: '60px',
|
|
127
|
+
minWidth: '60px',
|
|
128
|
+
...overFlowStyle,
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
if (dlv(databasePreferences, 'showSolvent')) {
|
|
134
|
+
columns.push({
|
|
135
|
+
header: 'Solvent',
|
|
136
|
+
accessorKey: 'solvent',
|
|
137
|
+
meta: {
|
|
138
|
+
style: {
|
|
139
|
+
width: '80px',
|
|
140
|
+
minWidth: '80px',
|
|
141
|
+
...overFlowStyle,
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
if (dlv(databasePreferences, 'showSmiles')) {
|
|
147
|
+
columns.push({
|
|
148
|
+
header: 'structure',
|
|
149
|
+
accessorKey: 'index',
|
|
150
|
+
spanRows: true,
|
|
151
|
+
meta: { style: { height: 0 } },
|
|
152
|
+
cell({ row }) {
|
|
153
|
+
const { idCode, coordinates } = row.original?.ocl || {};
|
|
154
|
+
const smiles = row.original?.smiles;
|
|
155
|
+
const { minWidth = 0, minHeight = 0 } =
|
|
156
|
+
databasePreferences?.structureSize || {};
|
|
157
|
+
return (
|
|
158
|
+
<ResponsiveChart minWidth={minWidth} minHeight={minHeight}>
|
|
159
|
+
{({ width, height }) => {
|
|
160
|
+
if (idCode && coordinates) {
|
|
161
|
+
return (
|
|
162
|
+
<IdcodeSvgRenderer
|
|
163
|
+
height={height}
|
|
164
|
+
width={width}
|
|
165
|
+
idcode={idCode}
|
|
166
|
+
coordinates={coordinates}
|
|
167
|
+
noAtomCustomLabels
|
|
168
|
+
/>
|
|
169
|
+
);
|
|
170
|
+
} else if (smiles) {
|
|
171
|
+
return (
|
|
172
|
+
<SmilesSvgRenderer
|
|
173
|
+
height={height}
|
|
174
|
+
width={width}
|
|
175
|
+
smiles={smiles}
|
|
176
|
+
noAtomCustomLabels
|
|
177
|
+
/>
|
|
178
|
+
);
|
|
179
|
+
} else {
|
|
180
|
+
return null;
|
|
181
|
+
}
|
|
182
|
+
}}
|
|
183
|
+
</ResponsiveChart>
|
|
184
|
+
);
|
|
185
|
+
},
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
return columns;
|
|
189
|
+
}
|
|
183
190
|
|
|
184
|
-
function DatabaseTable({
|
|
185
|
-
data,
|
|
186
|
-
onAdd,
|
|
187
|
-
onRemove,
|
|
188
|
-
onSave,
|
|
189
|
-
totalCount,
|
|
190
|
-
}: DatabaseTableProps) {
|
|
191
|
+
function DatabaseTable(props: DatabaseTableProps) {
|
|
192
|
+
const { data, onAdd, onRemove, onSave, totalCount } = props;
|
|
191
193
|
const databasePreferences = usePanelPreferences('database');
|
|
192
194
|
|
|
193
|
-
const
|
|
194
|
-
(
|
|
195
|
+
const beforeColumns = useMemo(() => {
|
|
196
|
+
return columnHelper.columns([
|
|
195
197
|
{
|
|
196
|
-
index: 0,
|
|
197
198
|
id: 'meta',
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
199
|
+
header: '',
|
|
200
|
+
accessorKey: 'index',
|
|
201
|
+
spanRows: true,
|
|
202
|
+
meta: {
|
|
203
|
+
style: {
|
|
204
|
+
width: '1%',
|
|
205
|
+
maxWidth: '25px',
|
|
206
|
+
minWidth: '25px',
|
|
207
|
+
padding: 0,
|
|
208
|
+
},
|
|
204
209
|
},
|
|
205
|
-
|
|
210
|
+
cell: ({ row }) => {
|
|
206
211
|
return (
|
|
207
212
|
<Button
|
|
208
213
|
style={{ padding: 0 }}
|
|
@@ -217,22 +222,26 @@ function DatabaseTable({
|
|
|
217
222
|
/>
|
|
218
223
|
);
|
|
219
224
|
},
|
|
220
|
-
enableRowSpan: true,
|
|
221
225
|
},
|
|
226
|
+
]);
|
|
227
|
+
}, []);
|
|
228
|
+
const afterColumns = useMemo(() => {
|
|
229
|
+
return columnHelper.columns([
|
|
222
230
|
{
|
|
223
|
-
index: 10,
|
|
224
231
|
id: 'add-button',
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
232
|
+
header: '',
|
|
233
|
+
spanRows: true,
|
|
234
|
+
meta: {
|
|
235
|
+
style: {
|
|
236
|
+
width: '1%',
|
|
237
|
+
maxWidth: '60px',
|
|
238
|
+
minWidth: '60px',
|
|
239
|
+
padding: 0,
|
|
240
|
+
},
|
|
231
241
|
},
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
// TODO: Fix types or remove code.
|
|
242
|
+
accessorKey: 'index',
|
|
243
|
+
cell: ({ row }) => {
|
|
244
|
+
// TODO: Fix types or remove code. Also in getHighlightExtra
|
|
236
245
|
// @ts-expect-error jcampURL is not defined in PrepareDataResult.
|
|
237
246
|
const { jcampURL } = row.original;
|
|
238
247
|
return (
|
|
@@ -260,22 +269,15 @@ function DatabaseTable({
|
|
|
260
269
|
);
|
|
261
270
|
},
|
|
262
271
|
},
|
|
263
|
-
]
|
|
264
|
-
|
|
265
|
-
)
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
addCustomColumn(columns, colParams);
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
columns.sort((object1, object2) => object1.index - object2.index);
|
|
277
|
-
return columns;
|
|
278
|
-
}, [databasePreferences, initialColumns]);
|
|
272
|
+
]);
|
|
273
|
+
}, [databasePreferences?.allowSaveAsNMRium, onAdd, onRemove, onSave]);
|
|
274
|
+
const tableColumns = useMemo(() => {
|
|
275
|
+
return [
|
|
276
|
+
...beforeColumns,
|
|
277
|
+
...databaseTableColumns(databasePreferences),
|
|
278
|
+
...afterColumns,
|
|
279
|
+
];
|
|
280
|
+
}, [databasePreferences, beforeColumns, afterColumns]);
|
|
279
281
|
|
|
280
282
|
const selectContextMenuHandler = useCallback(
|
|
281
283
|
(option: any, data: any) => {
|
|
@@ -291,21 +293,25 @@ function DatabaseTable({
|
|
|
291
293
|
);
|
|
292
294
|
|
|
293
295
|
return (
|
|
294
|
-
<
|
|
296
|
+
<TanStackTable
|
|
295
297
|
data={data}
|
|
296
298
|
contextMenu={contextMenu}
|
|
297
299
|
onContextMenuSelect={selectContextMenuHandler}
|
|
298
300
|
columns={tableColumns}
|
|
299
301
|
highlightedSource="DATABASE"
|
|
300
302
|
getHighlightExtra={(row) => ({
|
|
303
|
+
// @ts-expect-error jcampURL is not defined in PrepareDataResult.
|
|
301
304
|
jcampURL: row.jcampURL,
|
|
305
|
+
// @ts-expect-error baseURL is not defined in PrepareDataResult.
|
|
302
306
|
baseURL: row.baseURL,
|
|
307
|
+
// @ts-expect-error ranges is not defined in PrepareDataResult.
|
|
303
308
|
ranges: row.ranges,
|
|
304
309
|
})}
|
|
305
310
|
groupKey="index"
|
|
306
311
|
approxItemHeight={23}
|
|
307
312
|
enableVirtualScroll
|
|
308
313
|
totalCount={totalCount}
|
|
314
|
+
enableCellSpanning
|
|
309
315
|
disableDefaultRowStyle
|
|
310
316
|
/>
|
|
311
317
|
);
|
|
@@ -5,7 +5,6 @@ import { useCallback, useEffect, useMemo } from 'react';
|
|
|
5
5
|
import { useForm, useWatch } from 'react-hook-form';
|
|
6
6
|
import { FaRegTrashAlt } from 'react-icons/fa';
|
|
7
7
|
import { Button } from 'react-science/ui';
|
|
8
|
-
import type { CellProps } from 'react-table';
|
|
9
8
|
import * as Yup from 'yup';
|
|
10
9
|
|
|
11
10
|
import type { ExtractFilterEntry } from '../../../../data/types/common/ExtractFilterEntry.js';
|
|
@@ -13,10 +12,12 @@ import type { ExclusionZone } from '../../../../data/types/data1d/ExclusionZone.
|
|
|
13
12
|
import { useChartData } from '../../../context/ChartContext.js';
|
|
14
13
|
import { useDispatch } from '../../../context/DispatchContext.js';
|
|
15
14
|
import { NumberInput2Controller } from '../../../elements/NumberInput2Controller.js';
|
|
16
|
-
import type { Column } from '../../../elements/ReactTable/ReactTable.js';
|
|
17
|
-
import ReactTable from '../../../elements/ReactTable/ReactTable.js';
|
|
18
15
|
import { ReadOnly } from '../../../elements/ReadOnly.js';
|
|
19
16
|
import { Sections } from '../../../elements/Sections.js';
|
|
17
|
+
import {
|
|
18
|
+
TanStackTable,
|
|
19
|
+
createTanStackColumnHelper,
|
|
20
|
+
} from '../../../elements/tanstack_table/index.ts';
|
|
20
21
|
|
|
21
22
|
import { FilterActionButtons } from './FilterActionButtons.js';
|
|
22
23
|
import { HeaderContainer, StickyHeader } from './InnerFilterHeader.js';
|
|
@@ -81,16 +82,17 @@ export default function ExclusionZonesOptionsPanel(
|
|
|
81
82
|
[getValues, setValue],
|
|
82
83
|
);
|
|
83
84
|
|
|
84
|
-
const exclusionsZonesColumns = useMemo
|
|
85
|
-
()
|
|
85
|
+
const exclusionsZonesColumns = useMemo(() => {
|
|
86
|
+
const columnHelper = createTanStackColumnHelper<ExclusionZone>();
|
|
87
|
+
return columnHelper.columns([
|
|
86
88
|
{
|
|
87
|
-
|
|
88
|
-
style: { width: '30px' },
|
|
89
|
-
|
|
89
|
+
header: '#',
|
|
90
|
+
meta: { style: { width: '30px' } },
|
|
91
|
+
accessorFn: (_, index) => index + 1,
|
|
90
92
|
},
|
|
91
93
|
{
|
|
92
|
-
|
|
93
|
-
|
|
94
|
+
header: 'From',
|
|
95
|
+
cell: ({ row }) => (
|
|
94
96
|
<NumberInput2Controller
|
|
95
97
|
control={control}
|
|
96
98
|
name={`zones.${row.index}.from`}
|
|
@@ -101,8 +103,8 @@ export default function ExclusionZonesOptionsPanel(
|
|
|
101
103
|
),
|
|
102
104
|
},
|
|
103
105
|
{
|
|
104
|
-
|
|
105
|
-
|
|
106
|
+
header: 'To',
|
|
107
|
+
cell: ({ row }) => (
|
|
106
108
|
<NumberInput2Controller
|
|
107
109
|
control={control}
|
|
108
110
|
name={`zones.${row.index}.to`}
|
|
@@ -112,12 +114,11 @@ export default function ExclusionZonesOptionsPanel(
|
|
|
112
114
|
/>
|
|
113
115
|
),
|
|
114
116
|
},
|
|
115
|
-
|
|
116
117
|
{
|
|
117
|
-
|
|
118
|
-
style: { width: '30px' },
|
|
118
|
+
header: '',
|
|
119
|
+
meta: { style: { width: '30px' } },
|
|
119
120
|
id: 'actions',
|
|
120
|
-
|
|
121
|
+
cell: ({ row }) => {
|
|
121
122
|
return (
|
|
122
123
|
<Button
|
|
123
124
|
size="small"
|
|
@@ -130,9 +131,8 @@ export default function ExclusionZonesOptionsPanel(
|
|
|
130
131
|
);
|
|
131
132
|
},
|
|
132
133
|
},
|
|
133
|
-
]
|
|
134
|
-
|
|
135
|
-
);
|
|
134
|
+
]);
|
|
135
|
+
}, [control, handleDelete]);
|
|
136
136
|
|
|
137
137
|
function handleApplyFilter(values: any) {
|
|
138
138
|
dispatch({
|
|
@@ -168,7 +168,7 @@ export default function ExclusionZonesOptionsPanel(
|
|
|
168
168
|
</StickyHeader>
|
|
169
169
|
)}
|
|
170
170
|
<Sections.Body>
|
|
171
|
-
<
|
|
171
|
+
<TanStackTable
|
|
172
172
|
columns={exclusionsZonesColumns}
|
|
173
173
|
data={exclusionsZones}
|
|
174
174
|
emptyDataRowText="No Zones"
|
|
@@ -188,7 +188,7 @@ function FiltersInner(props: FiltersInnerProps) {
|
|
|
188
188
|
|
|
189
189
|
const dispatch = useDispatch();
|
|
190
190
|
const toaster = useToaster();
|
|
191
|
-
const selectedFilterIndex = useRef<number | null>();
|
|
191
|
+
const selectedFilterIndex = useRef<number | null>(null);
|
|
192
192
|
const activeSpectrum = useActiveSpectrum();
|
|
193
193
|
|
|
194
194
|
function filterSnapShotHandler(filter: FilterEntry, index: number) {
|
|
@@ -47,8 +47,8 @@ export function usePhaseCorrection(
|
|
|
47
47
|
const [value, setValue] = useState({ ph0: 0, ph1: 0 });
|
|
48
48
|
const valueRef = useRef({ ph0: 0, ph1: 0 });
|
|
49
49
|
|
|
50
|
-
const ph0Ref = useRef<any>();
|
|
51
|
-
const ph1Ref = useRef<any>();
|
|
50
|
+
const ph0Ref = useRef<any>(undefined);
|
|
51
|
+
const ph1Ref = useRef<any>(undefined);
|
|
52
52
|
const { value: phaseCorrectionTypeItem, ...defaultSelectProps } =
|
|
53
53
|
useSelect<AlgorithmItem>({
|
|
54
54
|
defaultSelectedItem: defaultPhasingTypeItem,
|
|
@@ -46,8 +46,8 @@ export function usePhaseCorrectionTwoDimensions(filter: Filter2DEntry | null) {
|
|
|
46
46
|
const [value, setValue] = useState<PhaseOptions>(defaultPhaseOptions);
|
|
47
47
|
const valueRef = useRef<PhaseOptions>(defaultPhaseOptions);
|
|
48
48
|
|
|
49
|
-
const ph0Ref = useRef<any>();
|
|
50
|
-
const ph1Ref = useRef<any>();
|
|
49
|
+
const ph0Ref = useRef<any>(undefined);
|
|
50
|
+
const ph1Ref = useRef<any>(undefined);
|
|
51
51
|
|
|
52
52
|
const { data } = useSpectrum(emptyData) as Spectrum2D;
|
|
53
53
|
const debounceCalculation = useRef(
|
|
@@ -50,7 +50,7 @@ export function ProcessingItem(props: ProcessingItemProps) {
|
|
|
50
50
|
const isEditable = operatorUI?.isEditable;
|
|
51
51
|
const isLiveEditable = operatorUI?.isLiveEditable;
|
|
52
52
|
|
|
53
|
-
const liveEdit = useLiveEdit(operation);
|
|
53
|
+
const liveEdit = useLiveEdit(operation?.uid);
|
|
54
54
|
const [liveOperation, setLiveOperation] = useLiveOperation();
|
|
55
55
|
|
|
56
56
|
function onReorder(sourceIndex: number, targetIndex: number) {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { SpectrumProcessingOperation } from '@zakodium/nmr-types';
|
|
2
1
|
import { assertDefined } from '@zakodium/utils';
|
|
3
2
|
|
|
4
3
|
import { useChartData } from '../../../context/ChartContext.tsx';
|
|
@@ -7,9 +6,7 @@ import { useProcessingsMutations } from '../../../context/processings_mutations_
|
|
|
7
6
|
|
|
8
7
|
export type UseLiveEdit = ReturnType<typeof useLiveEdit>;
|
|
9
8
|
|
|
10
|
-
export function useLiveEdit(
|
|
11
|
-
operation: SpectrumProcessingOperation<unknown, unknown> | undefined,
|
|
12
|
-
) {
|
|
9
|
+
export function useLiveEdit(operationUid: string | undefined) {
|
|
13
10
|
const {
|
|
14
11
|
processingOperators: { liveEdit: value, liveOperation },
|
|
15
12
|
} = useChartData();
|
|
@@ -18,18 +15,13 @@ export function useLiveEdit(
|
|
|
18
15
|
|
|
19
16
|
function setLiveEditCheck(newValue: boolean) {
|
|
20
17
|
if (!value) return;
|
|
18
|
+
if (!liveOperation) return;
|
|
21
19
|
|
|
22
20
|
dispatch({ type: 'SET_LIVE_EDIT_CHECKED', payload: newValue });
|
|
23
21
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
assertDefined(operation);
|
|
28
|
-
void processingsMutations.prepareLiveChange(
|
|
29
|
-
operation.uid,
|
|
30
|
-
value.shouldProcessNext,
|
|
31
|
-
);
|
|
32
|
-
}
|
|
22
|
+
const liveEdit = { ...value, checked: newValue };
|
|
23
|
+
assertDefined(operationUid);
|
|
24
|
+
void processingsMutations.handleLiveChange(liveEdit, operationUid);
|
|
33
25
|
}
|
|
34
26
|
|
|
35
27
|
function setShouldProcessNext(newValue: boolean) {
|
|
@@ -37,10 +29,10 @@ export function useLiveEdit(
|
|
|
37
29
|
if (!liveOperation) return;
|
|
38
30
|
|
|
39
31
|
dispatch({ type: 'SET_LIVE_EDIT_SHOULD_PROCESS_NEXT', payload: newValue });
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
);
|
|
32
|
+
|
|
33
|
+
const liveEdit = { ...value, shouldProcessNext: newValue };
|
|
34
|
+
assertDefined(operationUid);
|
|
35
|
+
void processingsMutations.handleLiveChange(liveEdit, operationUid);
|
|
44
36
|
}
|
|
45
37
|
|
|
46
38
|
return { value, setLiveEditCheck, setShouldProcessNext };
|