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
|
@@ -16,10 +16,11 @@ import {
|
|
|
16
16
|
import type { Draft } from 'immer';
|
|
17
17
|
import { useMemo } from 'react';
|
|
18
18
|
import { useAccordionControls } from 'react-science/ui';
|
|
19
|
+
import { match } from 'ts-pattern';
|
|
19
20
|
import { useEventCallback } from 'usehooks-ts';
|
|
20
21
|
|
|
21
22
|
import { initializeContoursLevels } from '../../data/data2d/Spectrum2D/contours.ts';
|
|
22
|
-
import type { State } from '../reducer/Reducer.ts';
|
|
23
|
+
import type { LiveEdit, State } from '../reducer/Reducer.ts';
|
|
23
24
|
import { setDomain, setMode } from '../reducer/actions/DomainActions.ts';
|
|
24
25
|
import { updateView } from '../reducer/actions/FiltersActions.ts';
|
|
25
26
|
import { restoreLastZoomDomain } from '../reducer/helper/ZoomHistoryManager.ts';
|
|
@@ -33,6 +34,15 @@ export type ProcessingsMutations = ReturnType<
|
|
|
33
34
|
typeof useProcessingsMutationsAPI
|
|
34
35
|
>;
|
|
35
36
|
|
|
37
|
+
interface PrepareLiveChangeOptions {
|
|
38
|
+
operationUid: string;
|
|
39
|
+
shouldProcessAll: boolean;
|
|
40
|
+
shouldUpdateView: boolean;
|
|
41
|
+
liveOperation?: SpectrumProcessingOperation<unknown, unknown>;
|
|
42
|
+
preProcessOnly?: boolean;
|
|
43
|
+
enforceSpectrum?: Spectrum;
|
|
44
|
+
}
|
|
45
|
+
|
|
36
46
|
export function useProcessingsMutationsAPI() {
|
|
37
47
|
const core = useCore();
|
|
38
48
|
const state = useChartData();
|
|
@@ -90,6 +100,8 @@ export function useProcessingsMutationsAPI() {
|
|
|
90
100
|
onProduce: (draft) => onProduce(draft, processedSpectrum),
|
|
91
101
|
},
|
|
92
102
|
});
|
|
103
|
+
|
|
104
|
+
return spectrum;
|
|
93
105
|
}
|
|
94
106
|
|
|
95
107
|
function resetSelectedTool() {
|
|
@@ -101,11 +113,14 @@ export function useProcessingsMutationsAPI() {
|
|
|
101
113
|
|
|
102
114
|
// --- API --- //
|
|
103
115
|
|
|
104
|
-
const resetLiveChange = useEventCallback(function resetLiveChange(
|
|
116
|
+
const resetLiveChange = useEventCallback(function resetLiveChange(
|
|
117
|
+
updateView: boolean,
|
|
118
|
+
) {
|
|
105
119
|
dispatch({
|
|
106
120
|
type: 'SET_SPECTRUM_LIVE_PROCESSED',
|
|
107
121
|
payload: {
|
|
108
122
|
spectrumLiveProcessed: undefined,
|
|
123
|
+
updateView,
|
|
109
124
|
},
|
|
110
125
|
});
|
|
111
126
|
});
|
|
@@ -203,11 +218,19 @@ export function useProcessingsMutationsAPI() {
|
|
|
203
218
|
});
|
|
204
219
|
|
|
205
220
|
// Related to live update
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
221
|
+
async function prepareLiveChange(options: PrepareLiveChangeOptions) {
|
|
222
|
+
const {
|
|
223
|
+
operationUid: uid,
|
|
224
|
+
shouldProcessAll,
|
|
225
|
+
shouldUpdateView,
|
|
226
|
+
liveOperation,
|
|
227
|
+
preProcessOnly = false,
|
|
228
|
+
enforceSpectrum,
|
|
229
|
+
} = options;
|
|
230
|
+
|
|
231
|
+
const { spectrum } = enforceSpectrum
|
|
232
|
+
? { spectrum: sliceSpectrum(enforceSpectrum) }
|
|
233
|
+
: getSpectrum();
|
|
211
234
|
if (!spectrum?.processings) return;
|
|
212
235
|
|
|
213
236
|
const preProcessings: typeof spectrum.processings = [];
|
|
@@ -215,7 +238,12 @@ export function useProcessingsMutationsAPI() {
|
|
|
215
238
|
|
|
216
239
|
let didFindUid = false;
|
|
217
240
|
for (const operation of spectrum.processings) {
|
|
218
|
-
if (uid === operation.uid)
|
|
241
|
+
if (uid === operation.uid) {
|
|
242
|
+
didFindUid = true;
|
|
243
|
+
processings.push(structuredClone(liveOperation ?? operation));
|
|
244
|
+
continue;
|
|
245
|
+
}
|
|
246
|
+
|
|
219
247
|
if (didFindUid) processings.push(structuredClone(operation));
|
|
220
248
|
else preProcessings.push(structuredClone(operation));
|
|
221
249
|
}
|
|
@@ -229,6 +257,9 @@ export function useProcessingsMutationsAPI() {
|
|
|
229
257
|
preProcessedSpectrum.originalInfo = structuredClone(
|
|
230
258
|
preProcessedSpectrum.info,
|
|
231
259
|
);
|
|
260
|
+
preProcessedSpectrum.originalProcessingInfo = structuredClone(
|
|
261
|
+
preProcessedSpectrum.processingInfo,
|
|
262
|
+
);
|
|
232
263
|
if (isSpectrum1D(preProcessedSpectrum)) {
|
|
233
264
|
preProcessedSpectrum.originalData = sliceData1D(
|
|
234
265
|
preProcessedSpectrum.data,
|
|
@@ -241,6 +272,18 @@ export function useProcessingsMutationsAPI() {
|
|
|
241
272
|
assertUnreachable(preProcessedSpectrum);
|
|
242
273
|
}
|
|
243
274
|
|
|
275
|
+
// stop here preProcessOnly
|
|
276
|
+
if (preProcessOnly) {
|
|
277
|
+
dispatch({
|
|
278
|
+
type: 'SET_SPECTRUM_LIVE_PROCESSED',
|
|
279
|
+
payload: {
|
|
280
|
+
spectrumLiveProcessed: preProcessedSpectrum,
|
|
281
|
+
updateView: shouldUpdateView,
|
|
282
|
+
},
|
|
283
|
+
});
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
|
|
244
287
|
// apply the rest of processings
|
|
245
288
|
const savedProcessings = structuredClone(preProcessedSpectrum.processings);
|
|
246
289
|
|
|
@@ -257,9 +300,10 @@ export function useProcessingsMutationsAPI() {
|
|
|
257
300
|
type: 'SET_SPECTRUM_LIVE_PROCESSED',
|
|
258
301
|
payload: {
|
|
259
302
|
spectrumLiveProcessed: processedSpectrum,
|
|
303
|
+
updateView: shouldUpdateView,
|
|
260
304
|
},
|
|
261
305
|
});
|
|
262
|
-
}
|
|
306
|
+
}
|
|
263
307
|
|
|
264
308
|
const applyLiveChange = useEventCallback(async function applyLiveChange(
|
|
265
309
|
operation: SpectrumProcessingOperation<any, any>,
|
|
@@ -289,10 +333,61 @@ export function useProcessingsMutationsAPI() {
|
|
|
289
333
|
type: 'SET_SPECTRUM_LIVE_PROCESSED',
|
|
290
334
|
payload: {
|
|
291
335
|
spectrumLiveProcessed: processedSpectrum,
|
|
336
|
+
updateView: false,
|
|
292
337
|
},
|
|
293
338
|
});
|
|
294
339
|
});
|
|
295
340
|
|
|
341
|
+
const handleLiveChange = useEventCallback(async function handleLiveChange(
|
|
342
|
+
liveEdit: LiveEdit,
|
|
343
|
+
operationUid: string,
|
|
344
|
+
) {
|
|
345
|
+
const ui = core.slotOperator(operationUid);
|
|
346
|
+
const previousLiveEdit = state.processingOperators.liveEdit ?? {
|
|
347
|
+
checked: ui?.isLiveEditable ?? false,
|
|
348
|
+
shouldProcessNext:
|
|
349
|
+
ui?.defaultShouldProcessAll ?? liveEdit.shouldProcessNext,
|
|
350
|
+
};
|
|
351
|
+
const shouldUpdateView =
|
|
352
|
+
previousLiveEdit.shouldProcessNext !== liveEdit.shouldProcessNext;
|
|
353
|
+
const liveOperation = state.processingOperators.liveOperation;
|
|
354
|
+
|
|
355
|
+
await match(liveEdit)
|
|
356
|
+
// spectrum fully processed with live operation
|
|
357
|
+
.with({ checked: true, shouldProcessNext: true }, async () => {
|
|
358
|
+
await prepareLiveChange({
|
|
359
|
+
operationUid,
|
|
360
|
+
shouldProcessAll: true,
|
|
361
|
+
shouldUpdateView,
|
|
362
|
+
liveOperation,
|
|
363
|
+
});
|
|
364
|
+
})
|
|
365
|
+
// spectrum fully processed with original operation
|
|
366
|
+
// ie: no `state.spectrumLiveProcessed`
|
|
367
|
+
.with({ checked: false, shouldProcessNext: true }, async () => {
|
|
368
|
+
resetLiveChange(true);
|
|
369
|
+
})
|
|
370
|
+
// spectrum processed until the operation (stop before) then apply the live operation
|
|
371
|
+
.with({ checked: true, shouldProcessNext: false }, async () => {
|
|
372
|
+
await prepareLiveChange({
|
|
373
|
+
operationUid,
|
|
374
|
+
shouldProcessAll: false,
|
|
375
|
+
shouldUpdateView,
|
|
376
|
+
liveOperation,
|
|
377
|
+
});
|
|
378
|
+
})
|
|
379
|
+
// spectrum processed until the operation (stop before)
|
|
380
|
+
.with({ checked: false, shouldProcessNext: false }, async () => {
|
|
381
|
+
await prepareLiveChange({
|
|
382
|
+
operationUid,
|
|
383
|
+
shouldProcessAll: false,
|
|
384
|
+
shouldUpdateView,
|
|
385
|
+
preProcessOnly: true,
|
|
386
|
+
});
|
|
387
|
+
})
|
|
388
|
+
.exhaustive();
|
|
389
|
+
});
|
|
390
|
+
|
|
296
391
|
const triggerOperation = useEventCallback(async function triggerOperation(
|
|
297
392
|
operation: SpectrumProcessingOperation<any, any>,
|
|
298
393
|
) {
|
|
@@ -319,8 +414,8 @@ export function useProcessingsMutationsAPI() {
|
|
|
319
414
|
assertNotNullish(operator);
|
|
320
415
|
|
|
321
416
|
openPanel('processingsPanel');
|
|
322
|
-
resetLiveChange();
|
|
323
|
-
await submit(spectrum, indexSpectrum, (draft) =>
|
|
417
|
+
resetLiveChange(false);
|
|
418
|
+
const processedSpectrum = await submit(spectrum, indexSpectrum, (draft) =>
|
|
324
419
|
updateView(draft, operator.domainUpdateRules),
|
|
325
420
|
);
|
|
326
421
|
|
|
@@ -337,10 +432,13 @@ export function useProcessingsMutationsAPI() {
|
|
|
337
432
|
}
|
|
338
433
|
|
|
339
434
|
if (operatorUI.isLiveEditable) {
|
|
340
|
-
await prepareLiveChange(
|
|
341
|
-
operation.uid,
|
|
342
|
-
|
|
343
|
-
|
|
435
|
+
await prepareLiveChange({
|
|
436
|
+
operationUid: operation.uid,
|
|
437
|
+
liveOperation: operation,
|
|
438
|
+
shouldProcessAll: operatorUI.defaultShouldProcessAll ?? false,
|
|
439
|
+
shouldUpdateView: true,
|
|
440
|
+
enforceSpectrum: processedSpectrum,
|
|
441
|
+
});
|
|
344
442
|
}
|
|
345
443
|
});
|
|
346
444
|
|
|
@@ -351,15 +449,15 @@ export function useProcessingsMutationsAPI() {
|
|
|
351
449
|
remove,
|
|
352
450
|
removeAll,
|
|
353
451
|
switchEnabled,
|
|
354
|
-
prepareLiveChange,
|
|
355
452
|
resetLiveChange,
|
|
356
453
|
applyLiveChange,
|
|
454
|
+
handleLiveChange,
|
|
357
455
|
triggerOperation,
|
|
358
456
|
}),
|
|
359
457
|
[
|
|
360
458
|
apply,
|
|
361
459
|
applyLiveChange,
|
|
362
|
-
|
|
460
|
+
handleLiveChange,
|
|
363
461
|
remove,
|
|
364
462
|
removeAll,
|
|
365
463
|
reorder,
|
|
@@ -39,7 +39,7 @@ interface AnchorPosition {
|
|
|
39
39
|
interface AnchorProps {
|
|
40
40
|
position: AnchorPosition;
|
|
41
41
|
shape?: AnchorShape;
|
|
42
|
-
containerRef: RefObject<HTMLElement>;
|
|
42
|
+
containerRef: RefObject<HTMLElement | null>;
|
|
43
43
|
anchorStyle?: AnchorStyle;
|
|
44
44
|
restoreFocusOnLeave?: boolean;
|
|
45
45
|
onDragMove: (newX: number) => void;
|
|
@@ -57,7 +57,7 @@ interface DraggableDialogProps
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
interface InnerDraggableDialogProps extends DraggableDialogProps {
|
|
60
|
-
innerDialogRef: RefObject<HTMLDivElement>;
|
|
60
|
+
innerDialogRef: RefObject<HTMLDivElement | null>;
|
|
61
61
|
}
|
|
62
62
|
export function DraggableDialog(props: DraggableDialogProps) {
|
|
63
63
|
const {
|
|
@@ -84,7 +84,7 @@ export function DraggableDialog(props: DraggableDialogProps) {
|
|
|
84
84
|
/>
|
|
85
85
|
<Overlay2
|
|
86
86
|
{...otherProps}
|
|
87
|
-
childRef={dialogRef}
|
|
87
|
+
childRef={dialogRef as RefObject<HTMLDivElement>}
|
|
88
88
|
onClose={onClose}
|
|
89
89
|
className="draggable-portal"
|
|
90
90
|
hasBackdrop={hasBackdrop}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { InputGroupProps } from '@blueprintjs/core';
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
|
-
import type { CSSProperties, KeyboardEvent,
|
|
3
|
+
import type { CSSProperties, KeyboardEvent, ReactNode } from 'react';
|
|
4
4
|
import {
|
|
5
|
+
createContext,
|
|
5
6
|
forwardRef,
|
|
7
|
+
isValidElement,
|
|
6
8
|
useCallback,
|
|
9
|
+
useContext,
|
|
7
10
|
useEffect,
|
|
8
11
|
useImperativeHandle,
|
|
12
|
+
useRef,
|
|
9
13
|
useState,
|
|
10
14
|
} from 'react';
|
|
11
15
|
|
|
@@ -53,12 +57,16 @@ function extractNumber(val: string | number, type: string) {
|
|
|
53
57
|
return val;
|
|
54
58
|
}
|
|
55
59
|
|
|
56
|
-
function handleMousedown(event: MouseEvent) {
|
|
57
|
-
event.stopPropagation();
|
|
58
|
-
}
|
|
59
|
-
|
|
60
60
|
const style: CSSProperties = { minWidth: 60 };
|
|
61
61
|
const className = 'editable-column';
|
|
62
|
+
const CloseEditContext = createContext<(() => void) | undefined>(undefined);
|
|
63
|
+
|
|
64
|
+
export function CloseEditOnClick(props: { children: ReactNode }) {
|
|
65
|
+
const { children } = props;
|
|
66
|
+
const closeEdit = useContext(CloseEditContext);
|
|
67
|
+
|
|
68
|
+
return <span onClick={closeEdit}>{children}</span>;
|
|
69
|
+
}
|
|
62
70
|
|
|
63
71
|
interface BaseEditableColumnProps {
|
|
64
72
|
type: 'number' | 'text';
|
|
@@ -66,7 +74,8 @@ interface BaseEditableColumnProps {
|
|
|
66
74
|
validate?: (value: string | number) => boolean;
|
|
67
75
|
}
|
|
68
76
|
|
|
69
|
-
export interface EditableColumnProps
|
|
77
|
+
export interface EditableColumnProps
|
|
78
|
+
extends BaseEditableColumnProps, Pick<InputGroupProps, 'rightElement'> {
|
|
70
79
|
onSave?: (value: string | number) => void;
|
|
71
80
|
onEditStart?: (element: boolean) => void;
|
|
72
81
|
editStatus?: boolean;
|
|
@@ -91,6 +100,7 @@ export const EditableColumn = forwardRef(function EditableColumn(
|
|
|
91
100
|
onEditStart,
|
|
92
101
|
editStatus = false,
|
|
93
102
|
validate,
|
|
103
|
+
rightElement,
|
|
94
104
|
textOverflowEllipses = false,
|
|
95
105
|
clickType = 'single',
|
|
96
106
|
} = props;
|
|
@@ -109,17 +119,7 @@ export const EditableColumn = forwardRef(function EditableColumn(
|
|
|
109
119
|
},
|
|
110
120
|
}));
|
|
111
121
|
|
|
112
|
-
const mouseClickCallback = useCallback((e: globalThis.MouseEvent) => {
|
|
113
|
-
if (!(e.target as HTMLInputElement).classList.contains('editable-column')) {
|
|
114
|
-
enableEdit(false);
|
|
115
|
-
// TODO: refactor this
|
|
116
|
-
// eslint-disable-next-line react-hooks/immutability
|
|
117
|
-
globalThis.removeEventListener('mousedown', mouseClickCallback);
|
|
118
|
-
}
|
|
119
|
-
}, []);
|
|
120
|
-
|
|
121
122
|
function startEditHandler() {
|
|
122
|
-
globalThis.addEventListener('mousedown', mouseClickCallback);
|
|
123
123
|
onEditStart?.(true);
|
|
124
124
|
enableEdit(true);
|
|
125
125
|
}
|
|
@@ -127,12 +127,10 @@ export const EditableColumn = forwardRef(function EditableColumn(
|
|
|
127
127
|
function onConfirm(value: string | number) {
|
|
128
128
|
onSave?.(value);
|
|
129
129
|
enableEdit(false);
|
|
130
|
-
globalThis.removeEventListener('mousedown', mouseClickCallback);
|
|
131
130
|
}
|
|
132
131
|
|
|
133
132
|
function onCancel() {
|
|
134
133
|
enableEdit(false);
|
|
135
|
-
globalThis.removeEventListener('mousedown', mouseClickCallback);
|
|
136
134
|
}
|
|
137
135
|
|
|
138
136
|
let clickHandler = {};
|
|
@@ -165,6 +163,7 @@ export const EditableColumn = forwardRef(function EditableColumn(
|
|
|
165
163
|
onConfirm={onConfirm}
|
|
166
164
|
onCancel={onCancel}
|
|
167
165
|
validate={validate}
|
|
166
|
+
rightElement={rightElement}
|
|
168
167
|
/>
|
|
169
168
|
</div>
|
|
170
169
|
)}
|
|
@@ -175,21 +174,52 @@ export const EditableColumn = forwardRef(function EditableColumn(
|
|
|
175
174
|
interface EditFieldProps extends BaseEditableColumnProps {
|
|
176
175
|
onConfirm: (value: string | number) => void;
|
|
177
176
|
onCancel: (event?: KeyboardEvent<HTMLInputElement>) => void;
|
|
177
|
+
rightElement?: ReactNode;
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
function EditField(props: EditFieldProps) {
|
|
181
|
-
const {
|
|
181
|
+
const {
|
|
182
|
+
value: externalValue,
|
|
183
|
+
type,
|
|
184
|
+
onConfirm,
|
|
185
|
+
onCancel,
|
|
186
|
+
validate,
|
|
187
|
+
rightElement,
|
|
188
|
+
} = props;
|
|
182
189
|
|
|
183
190
|
const [isValid, setValid] = useState<boolean>(true);
|
|
184
191
|
const [value, setVal] = useState(() => extractNumber(externalValue, type));
|
|
192
|
+
const editFieldRef = useRef<HTMLDivElement>(null);
|
|
193
|
+
const closeEdit = useCallback(() => onCancel(), [onCancel]);
|
|
185
194
|
|
|
186
|
-
|
|
195
|
+
const confirmValue = useCallback(() => {
|
|
187
196
|
const valid = typeof validate === 'function' ? validate(value) : true;
|
|
188
197
|
setValid(valid);
|
|
189
|
-
|
|
190
|
-
if (valid && ['Enter', 'Tab'].includes(event.key)) {
|
|
198
|
+
if (valid) {
|
|
191
199
|
onConfirm(value);
|
|
192
200
|
}
|
|
201
|
+
}, [onConfirm, validate, value]);
|
|
202
|
+
|
|
203
|
+
useEffect(() => {
|
|
204
|
+
function handleOutsideMouseDown(event: globalThis.MouseEvent) {
|
|
205
|
+
if (
|
|
206
|
+
!(event.target instanceof Node) ||
|
|
207
|
+
!editFieldRef.current?.contains(event.target)
|
|
208
|
+
) {
|
|
209
|
+
confirmValue();
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
globalThis.addEventListener('mousedown', handleOutsideMouseDown);
|
|
214
|
+
return () =>
|
|
215
|
+
globalThis.removeEventListener('mousedown', handleOutsideMouseDown);
|
|
216
|
+
}, [confirmValue]);
|
|
217
|
+
|
|
218
|
+
function handleKeydown(event: KeyboardEvent<HTMLInputElement>) {
|
|
219
|
+
// when press Enter or Tab
|
|
220
|
+
if (['Enter', 'Tab'].includes(event.key)) {
|
|
221
|
+
confirmValue();
|
|
222
|
+
}
|
|
193
223
|
// close edit mode if press Enter, Tab or Escape
|
|
194
224
|
if (['Escape'].includes(event.key)) {
|
|
195
225
|
onCancel(event);
|
|
@@ -201,52 +231,52 @@ function EditField(props: EditFieldProps) {
|
|
|
201
231
|
}
|
|
202
232
|
|
|
203
233
|
const intent = !isValid ? 'danger' : 'none';
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
variant="minimal"
|
|
208
|
-
icon="cross"
|
|
209
|
-
onMouseDown={handleMousedown}
|
|
210
|
-
onClick={() => onCancel()}
|
|
211
|
-
/>
|
|
212
|
-
);
|
|
234
|
+
const inputRightElement = isValidElement(rightElement)
|
|
235
|
+
? rightElement
|
|
236
|
+
: undefined;
|
|
213
237
|
|
|
214
238
|
if (type === 'number') {
|
|
215
239
|
return (
|
|
216
|
-
<
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
240
|
+
<CloseEditContext.Provider value={closeEdit}>
|
|
241
|
+
<div ref={editFieldRef}>
|
|
242
|
+
<NumberInput2
|
|
243
|
+
intent={intent}
|
|
244
|
+
style={style}
|
|
245
|
+
autoSelect
|
|
246
|
+
className={className}
|
|
247
|
+
value={value}
|
|
248
|
+
onValueChange={(valueAsNumber, valueString) =>
|
|
249
|
+
handleChange(valueString ?? Number(valueString))
|
|
250
|
+
}
|
|
251
|
+
onKeyDown={handleKeydown}
|
|
252
|
+
size="small"
|
|
253
|
+
fill
|
|
254
|
+
buttonPosition="none"
|
|
255
|
+
stepSize={0.1}
|
|
256
|
+
minorStepSize={0.01}
|
|
257
|
+
majorStepSize={1}
|
|
258
|
+
rightElement={inputRightElement}
|
|
259
|
+
/>
|
|
260
|
+
</div>
|
|
261
|
+
</CloseEditContext.Provider>
|
|
235
262
|
);
|
|
236
263
|
}
|
|
237
264
|
|
|
238
265
|
return (
|
|
239
|
-
<
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
266
|
+
<CloseEditContext.Provider value={closeEdit}>
|
|
267
|
+
<div ref={editFieldRef}>
|
|
268
|
+
<Input2
|
|
269
|
+
intent={intent}
|
|
270
|
+
style={style}
|
|
271
|
+
autoSelect
|
|
272
|
+
className={className}
|
|
273
|
+
value={value as string}
|
|
274
|
+
onChange={(value) => handleChange(value)}
|
|
275
|
+
onKeyDown={handleKeydown}
|
|
276
|
+
size="small"
|
|
277
|
+
rightElement={inputRightElement}
|
|
278
|
+
/>
|
|
279
|
+
</div>
|
|
280
|
+
</CloseEditContext.Provider>
|
|
251
281
|
);
|
|
252
282
|
}
|
|
@@ -21,7 +21,7 @@ export function ResizerWithScale(props: ResizerWithScaleProps) {
|
|
|
21
21
|
const x2 = scaleX()(from);
|
|
22
22
|
const x1 = scaleX()(to);
|
|
23
23
|
const [position, setPosition] = useState({ x1, x2 });
|
|
24
|
-
const startPositionRef = useRef<Position>();
|
|
24
|
+
const startPositionRef = useRef<Position>(undefined);
|
|
25
25
|
|
|
26
26
|
useEffect(() => {
|
|
27
27
|
const x2 = scaleX()(from);
|
|
@@ -33,7 +33,7 @@ interface ExportManagerState {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
const ExportManagerContext =
|
|
36
|
-
createContext<RefObject<ExportManagerState> | null>(null);
|
|
36
|
+
createContext<RefObject<ExportManagerState | null> | null>(null);
|
|
37
37
|
|
|
38
38
|
export function useExportManagerAPI() {
|
|
39
39
|
const context = useContext(ExportManagerContext);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { CSSProperties, MouseEvent, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
import type { TanStackRowData, TanStackTableColumn } from './types.ts';
|
|
4
|
+
|
|
5
|
+
interface CreateActionColumnOptions<TData extends TanStackRowData> {
|
|
6
|
+
onClick: (row: TData, event?: MouseEvent<HTMLButtonElement>) => void;
|
|
7
|
+
icon: ReactNode;
|
|
8
|
+
style?: CSSProperties;
|
|
9
|
+
id?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function createActionColumn<TData extends TanStackRowData>(
|
|
13
|
+
options: CreateActionColumnOptions<TData>,
|
|
14
|
+
): TanStackTableColumn<TData> {
|
|
15
|
+
const { onClick, icon, style = {}, id } = options;
|
|
16
|
+
|
|
17
|
+
return {
|
|
18
|
+
id,
|
|
19
|
+
header: '',
|
|
20
|
+
meta: {
|
|
21
|
+
style: {
|
|
22
|
+
width: '1%',
|
|
23
|
+
maxWidth: '20px',
|
|
24
|
+
minWidth: '20px',
|
|
25
|
+
padding: '0px',
|
|
26
|
+
textAlign: 'center',
|
|
27
|
+
...style,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
cell: ({ row }) => (
|
|
31
|
+
<button
|
|
32
|
+
type="button"
|
|
33
|
+
onClick={(event) => {
|
|
34
|
+
event.preventDefault();
|
|
35
|
+
event.stopPropagation();
|
|
36
|
+
onClick(row.original, event);
|
|
37
|
+
}}
|
|
38
|
+
>
|
|
39
|
+
{icon}
|
|
40
|
+
</button>
|
|
41
|
+
),
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ColumnHelper } from '@tanstack/react-table';
|
|
2
|
+
import { createColumnHelper } from '@tanstack/react-table';
|
|
3
|
+
|
|
4
|
+
import type { TanStackTableFeatures } from './features.ts';
|
|
5
|
+
import type { TanStackRowData } from './types.ts';
|
|
6
|
+
|
|
7
|
+
export function createTanStackColumnHelper<
|
|
8
|
+
TData extends TanStackRowData,
|
|
9
|
+
>(): ColumnHelper<TanStackTableFeatures, TData> {
|
|
10
|
+
return createColumnHelper<TanStackTableFeatures, TData>();
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
|
|
3
|
+
import type { TanStackTableVirtualBoundary } from '../types.ts';
|
|
4
|
+
|
|
5
|
+
const reactContext = createContext<TanStackTableVirtualBoundary | null>(null);
|
|
6
|
+
|
|
7
|
+
export const TanStackTableProvider = reactContext.Provider;
|
|
8
|
+
|
|
9
|
+
export function useTanStackTableContext() {
|
|
10
|
+
const context = useContext(reactContext);
|
|
11
|
+
if (!context) {
|
|
12
|
+
throw new Error('table context was not found');
|
|
13
|
+
}
|
|
14
|
+
return context;
|
|
15
|
+
}
|