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,11 +1,8 @@
|
|
|
1
|
-
import { assert } from '@zakodium/utils';
|
|
1
|
+
import { assert, noop } from '@zakodium/utils';
|
|
2
2
|
import type {
|
|
3
|
-
CSSProperties,
|
|
4
3
|
KeyboardEvent,
|
|
5
4
|
MouseEvent,
|
|
6
5
|
PointerEvent,
|
|
7
|
-
ReactNode,
|
|
8
|
-
Reducer,
|
|
9
6
|
WheelEvent,
|
|
10
7
|
} from 'react';
|
|
11
8
|
import {
|
|
@@ -16,54 +13,32 @@ import {
|
|
|
16
13
|
useReducer,
|
|
17
14
|
useRef,
|
|
18
15
|
} from 'react';
|
|
16
|
+
import { useEventCallback } from 'usehooks-ts';
|
|
19
17
|
|
|
20
|
-
import type { EventModifierKeys } from '../context/KeyModifierContext.js';
|
|
21
18
|
import type { ActionType } from '../reducer/types/ActionType.js';
|
|
22
19
|
|
|
23
|
-
type
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
import type {
|
|
21
|
+
BaseDetectBrushingOptions,
|
|
22
|
+
BrushCoordination,
|
|
23
|
+
BrushTrackerData,
|
|
24
|
+
BrushTrackerProps,
|
|
25
|
+
BrushTrackerState,
|
|
26
26
|
DetectBrushingOptions,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
startY: number;
|
|
37
|
-
endY: number;
|
|
38
|
-
mouseButton: MouseButton;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
type MouseButton = 'main' | 'secondary' | 'unknown';
|
|
27
|
+
DetectBrushingResult,
|
|
28
|
+
MouseButton,
|
|
29
|
+
Position,
|
|
30
|
+
} from './brush_tracker.types.ts';
|
|
31
|
+
import type { BrushTrackerEventEmitter } from './brush_tracker_events_listeners.ts';
|
|
32
|
+
import {
|
|
33
|
+
BrushTrackerEventEmitterProvider,
|
|
34
|
+
useInitBrushTrackerEventEmitter,
|
|
35
|
+
} from './brush_tracker_events_listeners.ts';
|
|
42
36
|
|
|
43
37
|
const MouseButtons: Record<number, MouseButton> = {
|
|
44
38
|
0: 'main',
|
|
45
39
|
2: 'secondary',
|
|
46
40
|
} as const;
|
|
47
41
|
|
|
48
|
-
export interface BrushCoordination {
|
|
49
|
-
startX: number;
|
|
50
|
-
endX: number;
|
|
51
|
-
startY: number;
|
|
52
|
-
endY: number;
|
|
53
|
-
}
|
|
54
|
-
interface BrushScreenCoordination {
|
|
55
|
-
startScreenX: number;
|
|
56
|
-
startScreenY: number;
|
|
57
|
-
startClientX: number;
|
|
58
|
-
startClientY: number;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
interface BrushTrackerState
|
|
62
|
-
extends BrushTrackerData, BrushCoordination, BrushScreenCoordination {
|
|
63
|
-
step: Step;
|
|
64
|
-
boundingRect: DOMRect | null;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
42
|
const initialState: BrushTrackerState = {
|
|
68
43
|
step: 'initial',
|
|
69
44
|
mouseButton: 'unknown',
|
|
@@ -105,35 +80,6 @@ export function useBrushTracker() {
|
|
|
105
80
|
return useContext(BrushContext);
|
|
106
81
|
}
|
|
107
82
|
|
|
108
|
-
interface Position {
|
|
109
|
-
x: number;
|
|
110
|
-
y: number;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export type ClickOptions = MouseEvent & Position;
|
|
114
|
-
export type OnClick = (element: ClickOptions) => void;
|
|
115
|
-
export type { OnClick as OnDoubleClick };
|
|
116
|
-
export type ZoomOptions = Pick<
|
|
117
|
-
WheelEvent,
|
|
118
|
-
'deltaY' | 'shiftKey' | 'deltaMode' | 'altKey' | 'deltaX' | 'ctrlKey'
|
|
119
|
-
> &
|
|
120
|
-
Position & { invertScroll?: boolean; isBidirectionalZoom: boolean };
|
|
121
|
-
export type OnZoom = (options: ZoomOptions) => void;
|
|
122
|
-
export type OnBrush = (state: BrushTrackerData) => void;
|
|
123
|
-
|
|
124
|
-
interface BrushTrackerProps {
|
|
125
|
-
children: ReactNode;
|
|
126
|
-
className?: string;
|
|
127
|
-
style?: CSSProperties;
|
|
128
|
-
onBrushEnd?: OnBrush;
|
|
129
|
-
onBrush?: OnBrush;
|
|
130
|
-
onZoom?: OnZoom;
|
|
131
|
-
onDoubleClick?: OnClick;
|
|
132
|
-
onClick?: OnClick;
|
|
133
|
-
noPropagation?: boolean;
|
|
134
|
-
brushDetectionOptions?: BaseDetectBrushingOptions;
|
|
135
|
-
clickTriggerMode?: 'native' | 'debounced';
|
|
136
|
-
}
|
|
137
83
|
function isSelfControlledTarget(target: EventTarget) {
|
|
138
84
|
return (target as Element).closest('[data-self-control="true"]') !== null;
|
|
139
85
|
}
|
|
@@ -151,19 +97,12 @@ export function BrushTracker(options: BrushTrackerProps) {
|
|
|
151
97
|
children,
|
|
152
98
|
className,
|
|
153
99
|
style,
|
|
154
|
-
onBrushEnd,
|
|
155
|
-
onBrush,
|
|
156
|
-
onZoom = () => null,
|
|
157
|
-
onDoubleClick = () => null,
|
|
158
|
-
onClick = () => null,
|
|
159
100
|
noPropagation,
|
|
160
101
|
brushDetectionOptions = { thresholdFormat: 'fixed' },
|
|
161
102
|
clickTriggerMode = 'native',
|
|
162
103
|
} = options;
|
|
163
104
|
|
|
164
|
-
const [state, dispatch] = useReducer
|
|
165
|
-
Reducer<BrushTrackerState, BrushTrackerAction>
|
|
166
|
-
>(reducer, initialState);
|
|
105
|
+
const [state, dispatch] = useReducer(reducer, initialState);
|
|
167
106
|
const clickCountRef = useRef(0);
|
|
168
107
|
const timeoutRef = useRef<NodeJS.Timeout | null>(null);
|
|
169
108
|
const lastPointRef = useRef<number>(0);
|
|
@@ -173,6 +112,9 @@ export function BrushTracker(options: BrushTrackerProps) {
|
|
|
173
112
|
const lastRef = useRef<Position>({ x: 0, y: 0 });
|
|
174
113
|
const isSelfControlledRef = useRef(false);
|
|
175
114
|
|
|
115
|
+
const { onClick, onDoubleClick, onBrush, onBrushEnd, onZoom, emitter } =
|
|
116
|
+
useWrappedEvents(options);
|
|
117
|
+
|
|
176
118
|
const handleClickWithDebounce = useCallback(
|
|
177
119
|
(event: MouseEvent, currentTarget: Element) => {
|
|
178
120
|
const { x, y } = getMouseXY(event, currentTarget);
|
|
@@ -425,7 +367,9 @@ export function BrushTracker(options: BrushTrackerProps) {
|
|
|
425
367
|
window.removeEventListener('wheel', stopPageScrolling);
|
|
426
368
|
}}
|
|
427
369
|
>
|
|
428
|
-
{
|
|
370
|
+
<BrushTrackerEventEmitterProvider value={emitter}>
|
|
371
|
+
{children}
|
|
372
|
+
</BrushTrackerEventEmitterProvider>
|
|
429
373
|
</div>
|
|
430
374
|
</BrushContext.Provider>
|
|
431
375
|
</BrushDetectionOptionsContext.Provider>
|
|
@@ -517,45 +461,6 @@ function reducer(
|
|
|
517
461
|
}
|
|
518
462
|
}
|
|
519
463
|
|
|
520
|
-
interface DetectBrushingResult extends BrushCoordination {
|
|
521
|
-
type: BrushAxis;
|
|
522
|
-
scaleX: number;
|
|
523
|
-
scaleY: number;
|
|
524
|
-
directionX: number;
|
|
525
|
-
directionY: number;
|
|
526
|
-
xThreshold: number;
|
|
527
|
-
yThreshold: number;
|
|
528
|
-
}
|
|
529
|
-
interface DetectBrushingThreshold {
|
|
530
|
-
/** Width in pixels */
|
|
531
|
-
width: number;
|
|
532
|
-
/** Height in pixels */
|
|
533
|
-
height: number;
|
|
534
|
-
/**
|
|
535
|
-
* Threshold as a percentage of width and height (value between 0 and 1).
|
|
536
|
-
* @default 0.02
|
|
537
|
-
*/
|
|
538
|
-
threshold?: number;
|
|
539
|
-
thresholdFormat: 'relative';
|
|
540
|
-
}
|
|
541
|
-
interface DetectBrushingThresholdSize {
|
|
542
|
-
/** Width in pixels */
|
|
543
|
-
width: number;
|
|
544
|
-
/** Height in pixels */
|
|
545
|
-
height: number;
|
|
546
|
-
/**
|
|
547
|
-
* Threshold size in pixels.
|
|
548
|
-
* @default 80
|
|
549
|
-
*/
|
|
550
|
-
thresholdSize?: number;
|
|
551
|
-
thresholdFormat: 'fixed';
|
|
552
|
-
}
|
|
553
|
-
type BrushDetectionThresholdAxis = 'both' | 'x' | 'y';
|
|
554
|
-
|
|
555
|
-
type DetectBrushingOptions = { thresholdAxis?: BrushDetectionThresholdAxis } & (
|
|
556
|
-
DetectBrushingThreshold | DetectBrushingThresholdSize
|
|
557
|
-
);
|
|
558
|
-
|
|
559
464
|
export function detectBrushing(
|
|
560
465
|
coordination: BrushCoordination,
|
|
561
466
|
options: DetectBrushingOptions,
|
|
@@ -682,3 +587,98 @@ export function detectBrushing(
|
|
|
682
587
|
...common,
|
|
683
588
|
};
|
|
684
589
|
}
|
|
590
|
+
|
|
591
|
+
type UseWrappedEventsProps = Pick<
|
|
592
|
+
BrushTrackerProps,
|
|
593
|
+
'onBrush' | 'onBrushEnd' | 'onClick' | 'onDoubleClick' | 'onZoom'
|
|
594
|
+
>;
|
|
595
|
+
|
|
596
|
+
interface UseWrappedEvents extends Required<UseWrappedEventsProps> {
|
|
597
|
+
emitter: BrushTrackerEventEmitter;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
/**
|
|
601
|
+
* Wrap events to forward them to props AND an emitter.
|
|
602
|
+
* So `ProcessingOperatorUI.ChartBrushTracker` can listen on events.
|
|
603
|
+
*
|
|
604
|
+
* @param props
|
|
605
|
+
*/
|
|
606
|
+
function useWrappedEvents(props: UseWrappedEventsProps): UseWrappedEvents {
|
|
607
|
+
const {
|
|
608
|
+
onBrushEnd: onBrushEndProp = noop,
|
|
609
|
+
onBrush: onBrushProp = noop,
|
|
610
|
+
onZoom: onZoomProp = noop,
|
|
611
|
+
onDoubleClick: onDoubleClickProp = noop,
|
|
612
|
+
onClick: onClickProp = noop,
|
|
613
|
+
} = props;
|
|
614
|
+
const emitter = useInitBrushTrackerEventEmitter();
|
|
615
|
+
|
|
616
|
+
const onClick = useEventCallback<Parameters<typeof onClickProp>, void>(
|
|
617
|
+
(event) => {
|
|
618
|
+
try {
|
|
619
|
+
emitter.emit('click', event);
|
|
620
|
+
} catch (error) {
|
|
621
|
+
reportError(error);
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
if (event.isPropagationStopped()) return;
|
|
625
|
+
if (event.isDefaultPrevented()) return;
|
|
626
|
+
|
|
627
|
+
onClickProp(event);
|
|
628
|
+
},
|
|
629
|
+
);
|
|
630
|
+
|
|
631
|
+
const onDoubleClick = useEventCallback<
|
|
632
|
+
Parameters<typeof onDoubleClickProp>,
|
|
633
|
+
void
|
|
634
|
+
>((event) => {
|
|
635
|
+
try {
|
|
636
|
+
emitter.emit('click-double', event);
|
|
637
|
+
} catch (error) {
|
|
638
|
+
reportError(error);
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
if (event.isPropagationStopped()) return;
|
|
642
|
+
if (event.isDefaultPrevented()) return;
|
|
643
|
+
|
|
644
|
+
onDoubleClickProp(event);
|
|
645
|
+
});
|
|
646
|
+
|
|
647
|
+
const onZoom = useEventCallback<Parameters<typeof onZoomProp>, void>(
|
|
648
|
+
(event) => {
|
|
649
|
+
try {
|
|
650
|
+
emitter.emit('zoom', event);
|
|
651
|
+
} catch (error) {
|
|
652
|
+
reportError(error);
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
onZoomProp(event);
|
|
656
|
+
},
|
|
657
|
+
);
|
|
658
|
+
|
|
659
|
+
const onBrush = useEventCallback<Parameters<typeof onBrushProp>, void>(
|
|
660
|
+
(event) => {
|
|
661
|
+
try {
|
|
662
|
+
emitter.emit('brush', event);
|
|
663
|
+
} catch (error) {
|
|
664
|
+
reportError(error);
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
onBrushProp(event);
|
|
668
|
+
},
|
|
669
|
+
);
|
|
670
|
+
|
|
671
|
+
const onBrushEnd = useEventCallback<Parameters<typeof onBrushEndProp>, void>(
|
|
672
|
+
(event) => {
|
|
673
|
+
try {
|
|
674
|
+
emitter.emit('brush-end', event);
|
|
675
|
+
} catch (error) {
|
|
676
|
+
reportError(error);
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
onBrushEndProp(event);
|
|
680
|
+
},
|
|
681
|
+
);
|
|
682
|
+
|
|
683
|
+
return { onClick, onDoubleClick, onBrush, onBrushEnd, onZoom, emitter };
|
|
684
|
+
}
|
|
@@ -20,7 +20,7 @@ import SaveAsModal from '../modal/SaveAsModal.js';
|
|
|
20
20
|
import { options } from '../toolbar/ToolTypes.js';
|
|
21
21
|
|
|
22
22
|
interface KeysListenerTrackerProps {
|
|
23
|
-
mainDivRef: RefObject<HTMLDivElement>;
|
|
23
|
+
mainDivRef: RefObject<HTMLDivElement | null>;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
function KeysListenerTracker(props: KeysListenerTrackerProps) {
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import type { CSSProperties, MouseEvent, ReactNode, WheelEvent } from 'react';
|
|
2
|
+
|
|
3
|
+
import type { EventModifierKeys } from '../context/KeyModifierContext.tsx';
|
|
4
|
+
|
|
5
|
+
type AdvanceOmit<T, K extends keyof any> = T extends any ? Omit<T, K> : never;
|
|
6
|
+
type Step = 'initial' | 'start' | 'end' | 'brushing';
|
|
7
|
+
|
|
8
|
+
export interface BrushCoordination {
|
|
9
|
+
startX: number;
|
|
10
|
+
endX: number;
|
|
11
|
+
startY: number;
|
|
12
|
+
endY: number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface BrushTrackerData extends EventModifierKeys, BrushCoordination {
|
|
16
|
+
step: Step;
|
|
17
|
+
mouseButton: MouseButton;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type MouseButton = 'main' | 'secondary' | 'unknown';
|
|
21
|
+
|
|
22
|
+
interface BrushScreenCoordination {
|
|
23
|
+
startScreenX: number;
|
|
24
|
+
startScreenY: number;
|
|
25
|
+
startClientX: number;
|
|
26
|
+
startClientY: number;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface BrushTrackerState
|
|
30
|
+
extends BrushTrackerData, BrushScreenCoordination {
|
|
31
|
+
step: Step;
|
|
32
|
+
boundingRect: DOMRect | null;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface Position {
|
|
36
|
+
x: number;
|
|
37
|
+
y: number;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export type ClickOptions = MouseEvent & Position;
|
|
41
|
+
export type OnClick = (element: ClickOptions) => void;
|
|
42
|
+
export type OnDoubleClick = OnClick;
|
|
43
|
+
export type ZoomOptions = Pick<
|
|
44
|
+
WheelEvent,
|
|
45
|
+
'deltaY' | 'shiftKey' | 'deltaMode' | 'altKey' | 'deltaX' | 'ctrlKey'
|
|
46
|
+
> &
|
|
47
|
+
Position & { invertScroll?: boolean; isBidirectionalZoom: boolean };
|
|
48
|
+
export type OnZoom = (options: ZoomOptions) => void;
|
|
49
|
+
export type OnBrush = (state: BrushTrackerData) => void;
|
|
50
|
+
type OnBrushEnd = OnBrush;
|
|
51
|
+
|
|
52
|
+
export type BaseDetectBrushingOptions = AdvanceOmit<
|
|
53
|
+
DetectBrushingOptions,
|
|
54
|
+
'width' | 'height'
|
|
55
|
+
>;
|
|
56
|
+
|
|
57
|
+
export interface BrushTrackerProps {
|
|
58
|
+
children: ReactNode;
|
|
59
|
+
className?: string;
|
|
60
|
+
style?: CSSProperties;
|
|
61
|
+
onBrushEnd?: OnBrushEnd;
|
|
62
|
+
onBrush?: OnBrush;
|
|
63
|
+
onZoom?: OnZoom;
|
|
64
|
+
onDoubleClick?: OnDoubleClick;
|
|
65
|
+
onClick?: OnClick;
|
|
66
|
+
noPropagation?: boolean;
|
|
67
|
+
brushDetectionOptions?: BaseDetectBrushingOptions;
|
|
68
|
+
clickTriggerMode?: 'native' | 'debounced';
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export type BrushAxis = 'X' | 'Y' | 'XY';
|
|
72
|
+
export type DetectBrushingOptions = {
|
|
73
|
+
thresholdAxis?: BrushDetectionThresholdAxis;
|
|
74
|
+
} & (DetectBrushingThreshold | DetectBrushingThresholdSize);
|
|
75
|
+
export interface DetectBrushingResult extends BrushCoordination {
|
|
76
|
+
type: BrushAxis;
|
|
77
|
+
scaleX: number;
|
|
78
|
+
scaleY: number;
|
|
79
|
+
directionX: number;
|
|
80
|
+
directionY: number;
|
|
81
|
+
xThreshold: number;
|
|
82
|
+
yThreshold: number;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
interface DetectBrushingThreshold {
|
|
86
|
+
/** Width in pixels */
|
|
87
|
+
width: number;
|
|
88
|
+
/** Height in pixels */
|
|
89
|
+
height: number;
|
|
90
|
+
/**
|
|
91
|
+
* Threshold as a percentage of width and height (value between 0 and 1).
|
|
92
|
+
* @default 0.02
|
|
93
|
+
*/
|
|
94
|
+
threshold?: number;
|
|
95
|
+
thresholdFormat: 'relative';
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
interface DetectBrushingThresholdSize {
|
|
99
|
+
/** Width in pixels */
|
|
100
|
+
width: number;
|
|
101
|
+
/** Height in pixels */
|
|
102
|
+
height: number;
|
|
103
|
+
/**
|
|
104
|
+
* Threshold size in pixels.
|
|
105
|
+
* @default 80
|
|
106
|
+
*/
|
|
107
|
+
thresholdSize?: number;
|
|
108
|
+
thresholdFormat: 'fixed';
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
type BrushDetectionThresholdAxis = 'both' | 'x' | 'y';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { assert } from '@zakodium/utils';
|
|
2
|
+
import { EventEmitter } from 'eventemitter3';
|
|
3
|
+
import { createContext, useContext, useState } from 'react';
|
|
4
|
+
|
|
5
|
+
export type BrushTrackerEventEmitterSupportedEvents =
|
|
6
|
+
'click' | 'click-double' | 'zoom' | 'brush' | 'brush-end';
|
|
7
|
+
export type BrushTrackerEventEmitter =
|
|
8
|
+
EventEmitter<BrushTrackerEventEmitterSupportedEvents>;
|
|
9
|
+
|
|
10
|
+
const BrushTrackerEventEmitterContext =
|
|
11
|
+
createContext<BrushTrackerEventEmitter | null>(null);
|
|
12
|
+
|
|
13
|
+
export const BrushTrackerEventEmitterProvider =
|
|
14
|
+
BrushTrackerEventEmitterContext.Provider;
|
|
15
|
+
|
|
16
|
+
export function useBrushTrackerEventEmitter() {
|
|
17
|
+
const context = useContext(BrushTrackerEventEmitterContext);
|
|
18
|
+
assert(
|
|
19
|
+
context,
|
|
20
|
+
'useBrushTrackerEventEmitter hook must be use within a BrushTrackerEventEmitterProvider tree',
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
return context;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function useInitBrushTrackerEventEmitter() {
|
|
27
|
+
const [emitter] = useState(
|
|
28
|
+
() => new EventEmitter<BrushTrackerEventEmitterSupportedEvents>(),
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
return emitter;
|
|
32
|
+
}
|
|
@@ -57,7 +57,7 @@ export function LoggerProvider({ children }: LoggerProviderProps) {
|
|
|
57
57
|
const [lastReadLogId, setLastLogId] = useState(0);
|
|
58
58
|
const [logsHistory, setLogsHistory] = useState<LogEntry[]>([]);
|
|
59
59
|
const [isLogHistoryOpened, openLogHistory] = useState(false);
|
|
60
|
-
const popupLoggingLevelRef = useRef<LogEntry['levelLabel']>();
|
|
60
|
+
const popupLoggingLevelRef = useRef<LogEntry['levelLabel']>(undefined);
|
|
61
61
|
const [logger] = useState(() => new FifoLogger());
|
|
62
62
|
|
|
63
63
|
useEffect(() => {
|
|
@@ -18,7 +18,8 @@ export interface ScaleLinearNumberOptions {
|
|
|
18
18
|
spectrumId?: number | null | string;
|
|
19
19
|
customDomain?: number[];
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
|
|
22
|
+
export type ScaleLinearNumberFunction = (
|
|
22
23
|
options?: ScaleLinearNumberOptions,
|
|
23
24
|
) => ScaleLinear<number, number>;
|
|
24
25
|
|