nmrium 2.6.0 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/component/1d/ApodizationLine.js +2 -2
- package/lib/component/1d/ApodizationLine.js.map +1 -1
- package/lib/component/1d/BrushTracker1D.d.ts.map +1 -1
- package/lib/component/1d/BrushTracker1D.js +15 -14
- package/lib/component/1d/BrushTracker1D.js.map +1 -1
- package/lib/component/1d/Line.js +2 -2
- package/lib/component/1d/Line.js.map +1 -1
- package/lib/component/1d/SVGContent1D.d.ts.map +1 -1
- package/lib/component/1d/SVGContent1D.js +4 -1
- package/lib/component/1d/SVGContent1D.js.map +1 -1
- package/lib/component/1d/Viewer1D.d.ts.map +1 -1
- package/lib/component/1d/Viewer1D.js +2 -1
- package/lib/component/1d/Viewer1D.js.map +1 -1
- package/lib/component/1d/baseline/BaselinePreview.js +2 -2
- package/lib/component/1d/baseline/BaselinePreview.js.map +1 -1
- package/lib/component/1d/database/DatabaseSpectrum.js +2 -2
- package/lib/component/1d/database/DatabaseSpectrum.js.map +1 -1
- package/lib/component/1d/database/ResurrectedDatabaseRanges.js +2 -2
- package/lib/component/1d/database/ResurrectedDatabaseRanges.js.map +1 -1
- package/lib/component/1d/matrix/Boxplot.js +5 -5
- package/lib/component/1d/matrix/Boxplot.js.map +1 -1
- package/lib/component/1d/matrix/Stocsy.js +2 -2
- package/lib/component/1d/matrix/Stocsy.js.map +1 -1
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.d.ts.map +1 -1
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.js +12 -3
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.js.map +1 -1
- package/lib/component/1d/peaks/usePeakShapesPath.js +2 -2
- package/lib/component/1d/peaks/usePeakShapesPath.js.map +1 -1
- package/lib/component/1d/plugin_chart_brush_tracker.d.ts +2 -0
- package/lib/component/1d/plugin_chart_brush_tracker.d.ts.map +1 -0
- package/lib/component/1d/plugin_chart_brush_tracker.js +41 -0
- package/lib/component/1d/plugin_chart_brush_tracker.js.map +1 -0
- package/lib/component/1d/plugin_svg_chart.d.ts +2 -0
- package/lib/component/1d/plugin_svg_chart.d.ts.map +1 -0
- package/lib/component/1d/plugin_svg_chart.js +43 -0
- package/lib/component/1d/plugin_svg_chart.js.map +1 -0
- package/lib/component/1d-2d/components/RangeIndicator.d.ts.map +1 -1
- package/lib/component/1d-2d/components/RangeIndicator.js +1 -7
- package/lib/component/1d-2d/components/RangeIndicator.js.map +1 -1
- package/lib/component/1d-2d/tools/BrushXY.d.ts +1 -1
- package/lib/component/1d-2d/tools/BrushXY.d.ts.map +1 -1
- package/lib/component/1d-2d/tools/BrushXY.js.map +1 -1
- package/lib/component/1d-2d/tools/CrossLinePointer.d.ts +1 -1
- package/lib/component/1d-2d/tools/CrossLinePointer.d.ts.map +1 -1
- package/lib/component/1d-2d/tools/CrossLinePointer.js.map +1 -1
- package/lib/component/2d/1d-tracer/HorizontalSliceChart.js +2 -2
- package/lib/component/2d/1d-tracer/HorizontalSliceChart.js.map +1 -1
- package/lib/component/2d/1d-tracer/Left1DChart.js +2 -2
- package/lib/component/2d/1d-tracer/Left1DChart.js.map +1 -1
- package/lib/component/2d/1d-tracer/Top1DChart.js +2 -2
- package/lib/component/2d/1d-tracer/Top1DChart.js.map +1 -1
- package/lib/component/2d/1d-tracer/VerticalSliceChart.js +2 -2
- package/lib/component/2d/1d-tracer/VerticalSliceChart.js.map +1 -1
- package/lib/component/2d/1d-tracer/phase-correction-traces/SpectrumPhaseTrace.js +3 -3
- package/lib/component/2d/1d-tracer/phase-correction-traces/SpectrumPhaseTrace.js.map +1 -1
- package/lib/component/2d/BrushTracker2D.js.map +1 -1
- package/lib/component/2d/ft/Contours.js +2 -2
- package/lib/component/2d/ft/Contours.js.map +1 -1
- package/lib/component/2d/utilities/DimensionLayout.d.ts +1 -1
- package/lib/component/2d/utilities/DimensionLayout.d.ts.map +1 -1
- package/lib/component/EventsTrackers/BrushTracker.d.ts +1 -84
- package/lib/component/EventsTrackers/BrushTracker.d.ts.map +1 -1
- package/lib/component/EventsTrackers/BrushTracker.js +70 -3
- package/lib/component/EventsTrackers/BrushTracker.js.map +1 -1
- package/lib/component/EventsTrackers/brush_tracker.types.d.ts +93 -0
- package/lib/component/EventsTrackers/brush_tracker.types.d.ts.map +1 -0
- package/lib/component/EventsTrackers/brush_tracker.types.js +2 -0
- package/lib/component/EventsTrackers/brush_tracker.types.js.map +1 -0
- package/lib/component/EventsTrackers/brush_tracker_events_listeners.d.ts +7 -0
- package/lib/component/EventsTrackers/brush_tracker_events_listeners.d.ts.map +1 -0
- package/lib/component/EventsTrackers/brush_tracker_events_listeners.js +15 -0
- package/lib/component/EventsTrackers/brush_tracker_events_listeners.js.map +1 -0
- package/lib/component/context/ScaleContext.d.ts +1 -1
- package/lib/component/context/ScaleContext.d.ts.map +1 -1
- package/lib/component/elements/D3Axis.d.ts.map +1 -1
- package/lib/component/elements/D3Axis.js +15 -32
- package/lib/component/elements/D3Axis.js.map +1 -1
- package/lib/component/elements/export/ExportContent.d.ts.map +1 -1
- package/lib/component/elements/export/ExportContent.js +2 -2
- package/lib/component/elements/export/ExportContent.js.map +1 -1
- package/lib/component/elements/export/ExportOptionsModal.d.ts.map +1 -1
- package/lib/component/elements/export/ExportOptionsModal.js +9 -3
- package/lib/component/elements/export/ExportOptionsModal.js.map +1 -1
- package/lib/component/elements/export/useExportConfigurer.d.ts +1 -0
- package/lib/component/elements/export/useExportConfigurer.d.ts.map +1 -1
- package/lib/component/elements/export/useExportConfigurer.js +5 -0
- package/lib/component/elements/export/useExportConfigurer.js.map +1 -1
- package/lib/component/elements/print/PrintContent.d.ts.map +1 -1
- package/lib/component/elements/print/PrintContent.js +6 -25
- package/lib/component/elements/print/PrintContent.js.map +1 -1
- package/lib/component/elements/tanstack_table/create_action_column.d.ts +11 -0
- package/lib/component/elements/tanstack_table/create_action_column.d.ts.map +1 -0
- package/lib/component/elements/tanstack_table/create_action_column.js +24 -0
- package/lib/component/elements/tanstack_table/create_action_column.js.map +1 -0
- package/lib/component/elements/tanstack_table/create_column_helper.d.ts +5 -0
- package/lib/component/elements/tanstack_table/create_column_helper.d.ts.map +1 -0
- package/lib/component/elements/tanstack_table/create_column_helper.js +5 -0
- package/lib/component/elements/tanstack_table/create_column_helper.js.map +1 -0
- package/lib/component/elements/{ReactTable/BaseReactTable.d.ts → tanstack_table/elements/base_react_table.d.ts} +1 -1
- package/lib/component/elements/tanstack_table/elements/base_react_table.d.ts.map +1 -0
- package/lib/component/elements/{ReactTable/BaseReactTable.js → tanstack_table/elements/base_react_table.js} +1 -1
- package/lib/component/elements/tanstack_table/elements/base_react_table.js.map +1 -0
- package/lib/component/elements/{ReactTable/Elements/EmptyDataRow.d.ts → tanstack_table/elements/empty_data_row.d.ts} +1 -1
- package/lib/component/elements/tanstack_table/elements/empty_data_row.d.ts.map +1 -0
- package/lib/component/elements/{ReactTable/Elements/EmptyDataRow.js → tanstack_table/elements/empty_data_row.js} +1 -1
- package/lib/component/elements/tanstack_table/elements/empty_data_row.js.map +1 -0
- package/lib/component/elements/tanstack_table/elements/table_context.d.ts +4 -0
- package/lib/component/elements/tanstack_table/elements/table_context.d.ts.map +1 -0
- package/lib/component/elements/tanstack_table/elements/table_context.js +11 -0
- package/lib/component/elements/tanstack_table/elements/table_context.js.map +1 -0
- package/lib/component/elements/tanstack_table/elements/table_header.d.ts +12 -0
- package/lib/component/elements/tanstack_table/elements/table_header.d.ts.map +1 -0
- package/lib/component/elements/tanstack_table/elements/table_header.js +42 -0
- package/lib/component/elements/tanstack_table/elements/table_header.js.map +1 -0
- package/lib/component/elements/tanstack_table/elements/table_row.d.ts +12 -0
- package/lib/component/elements/tanstack_table/elements/table_row.d.ts.map +1 -0
- package/lib/component/elements/{ReactTable/Elements/ReactTableRow.js → tanstack_table/elements/table_row.js} +18 -17
- package/lib/component/elements/tanstack_table/elements/table_row.js.map +1 -0
- package/lib/component/elements/tanstack_table/features.d.ts +21 -0
- package/lib/component/elements/tanstack_table/features.d.ts.map +1 -0
- package/lib/component/elements/tanstack_table/features.js +14 -0
- package/lib/component/elements/tanstack_table/features.js.map +1 -0
- package/lib/component/elements/tanstack_table/index.d.ts +6 -0
- package/lib/component/elements/tanstack_table/index.d.ts.map +1 -0
- package/lib/component/elements/tanstack_table/index.js +6 -0
- package/lib/component/elements/tanstack_table/index.js.map +1 -0
- package/lib/component/elements/tanstack_table/table.d.ts +26 -0
- package/lib/component/elements/tanstack_table/table.d.ts.map +1 -0
- package/lib/component/elements/{ReactTable/ReactTable.js → tanstack_table/table.js} +29 -37
- package/lib/component/elements/tanstack_table/table.js.map +1 -0
- package/lib/component/elements/tanstack_table/types.d.ts +47 -0
- package/lib/component/elements/tanstack_table/types.d.ts.map +1 -0
- package/lib/component/elements/tanstack_table/types.js +2 -0
- package/lib/component/elements/tanstack_table/types.js.map +1 -0
- package/lib/component/elements/utilities/transferStyles.d.ts +2 -0
- package/lib/component/elements/utilities/transferStyles.d.ts.map +1 -0
- package/lib/component/elements/utilities/transferStyles.js +29 -0
- package/lib/component/elements/utilities/transferStyles.js.map +1 -0
- package/lib/component/header/AutoPeakPickingOptionPanel.js +1 -1
- package/lib/component/header/AutoPeakPickingOptionPanel.js.map +1 -1
- package/lib/component/hooks/useIntegralPath.js +2 -2
- package/lib/component/hooks/useIntegralPath.js.map +1 -1
- package/lib/component/modal/ImportPublicationStringModal.d.ts.map +1 -1
- package/lib/component/modal/ImportPublicationStringModal.js +91 -73
- package/lib/component/modal/ImportPublicationStringModal.js.map +1 -1
- package/lib/component/modal/LogsHistoryModal.d.ts.map +1 -1
- package/lib/component/modal/LogsHistoryModal.js +44 -40
- package/lib/component/modal/LogsHistoryModal.js.map +1 -1
- package/lib/component/modal/editRange/forms/components/signal-tabs/SignalJCouplingsTable.d.ts.map +1 -1
- package/lib/component/modal/editRange/forms/components/signal-tabs/SignalJCouplingsTable.js +48 -44
- package/lib/component/modal/editRange/forms/components/signal-tabs/SignalJCouplingsTable.js.map +1 -1
- package/lib/component/modal/editRange/forms/components/signal-tabs/SignalPeaksTable.d.ts.map +1 -1
- package/lib/component/modal/editRange/forms/components/signal-tabs/SignalPeaksTable.js +36 -32
- package/lib/component/modal/editRange/forms/components/signal-tabs/SignalPeaksTable.js.map +1 -1
- package/lib/component/modal/metaImportation/MetaImportationModal.d.ts.map +1 -1
- package/lib/component/modal/metaImportation/MetaImportationModal.js +15 -14
- package/lib/component/modal/metaImportation/MetaImportationModal.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/errors/context.d.ts +106 -105
- package/lib/component/modal/setting/tanstack_general_settings/errors/context.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.d.ts +106 -105
- package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts +106 -105
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.d.ts +91 -90
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts +91 -90
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/hooks/use_safe_workspace.d.ts +15 -15
- package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts +91 -90
- package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.d.ts +91 -90
- package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/database_tab.d.ts +91 -90
- package/lib/component/modal/setting/tanstack_general_settings/tabs/database_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts +91 -90
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.d.ts +12 -10
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.js +32 -40
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.d.ts +91 -90
- package/lib/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts +91 -90
- package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.d.ts +91 -90
- package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.d.ts +91 -90
- package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.d.ts +91 -90
- package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_colors_tab.d.ts +91 -90
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_colors_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts +91 -90
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts +91 -90
- package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.d.ts +91 -90
- package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.d.ts +61 -17
- package/lib/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.js +79 -28
- package/lib/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/validation.d.ts +15 -15
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.d.ts +1 -1
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.d.ts.map +1 -1
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +29 -26
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js.map +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts.map +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.js +70 -76
- package/lib/component/panels/IntegralsPanel/IntegralTable.js.map +1 -1
- package/lib/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.d.ts.map +1 -1
- package/lib/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.js +33 -29
- package/lib/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.js.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksTable.d.ts +8 -6
- package/lib/component/panels/PeaksPanel/PeaksTable.d.ts.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksTable.js +116 -126
- package/lib/component/panels/PeaksPanel/PeaksTable.js.map +1 -1
- package/lib/component/panels/PeaksPanel/peaksToTSV.d.ts +2 -2
- package/lib/component/panels/PeaksPanel/peaksToTSV.d.ts.map +1 -1
- package/lib/component/panels/PeaksPanel/peaksToTSV.js +9 -11
- package/lib/component/panels/PeaksPanel/peaksToTSV.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.d.ts +3 -2
- package/lib/component/panels/RangesPanel/RangesTable.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +2 -2
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts.map +1 -1
- package/lib/component/panels/SpectraPanel/SpectraTable.d.ts.map +1 -1
- package/lib/component/panels/SpectraPanel/SpectraTable.js +37 -26
- package/lib/component/panels/SpectraPanel/SpectraTable.js.map +1 -1
- package/lib/component/panels/SpectraPanel/base/SpectraColumnsManager.d.ts +1 -1
- package/lib/component/panels/SpectraPanel/base/SpectraColumnsManager.d.ts.map +1 -1
- package/lib/component/panels/SpectraPanel/base/SpectraColumnsManager.js +56 -52
- package/lib/component/panels/SpectraPanel/base/SpectraColumnsManager.js.map +1 -1
- package/lib/component/panels/SummaryPanel/SetShiftTolerancesModal.d.ts.map +1 -1
- package/lib/component/panels/SummaryPanel/SetShiftTolerancesModal.js +23 -20
- package/lib/component/panels/SummaryPanel/SetShiftTolerancesModal.js.map +1 -1
- package/lib/component/panels/ZonesPanel/ZonesTableRow.d.ts +2 -2
- package/lib/component/panels/ZonesPanel/ZonesTableRow.d.ts.map +1 -1
- package/lib/component/panels/databasePanel/DatabaseTable.d.ts +1 -1
- package/lib/component/panels/databasePanel/DatabaseTable.d.ts.map +1 -1
- package/lib/component/panels/databasePanel/DatabaseTable.js +171 -153
- package/lib/component/panels/databasePanel/DatabaseTable.js.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/ExclusionZonesOptionsPanel.d.ts.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/ExclusionZonesOptionsPanel.js +27 -24
- package/lib/component/panels/filtersPanel/Filters/ExclusionZonesOptionsPanel.js.map +1 -1
- package/lib/component/panels/filtersPanel/processings_sections_panel.js +1 -1
- package/lib/component/panels/filtersPanel/processings_sections_panel.js.map +1 -1
- package/lib/component/panels/informationPanel/InformationEditionModal.d.ts.map +1 -1
- package/lib/component/panels/informationPanel/InformationEditionModal.js +69 -64
- package/lib/component/panels/informationPanel/InformationEditionModal.js.map +1 -1
- package/lib/component/panels/multipleAnalysisPanel/AlignSpectra.d.ts +3 -3
- package/lib/component/panels/multipleAnalysisPanel/AlignSpectra.d.ts.map +1 -1
- package/lib/component/panels/multipleAnalysisPanel/AlignSpectra.js +69 -56
- package/lib/component/panels/multipleAnalysisPanel/AlignSpectra.js.map +1 -1
- package/lib/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisPanel.js +1 -1
- package/lib/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisPanel.js.map +1 -1
- package/lib/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisTable.d.ts.map +1 -1
- package/lib/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisTable.js +17 -20
- package/lib/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisTable.js.map +1 -1
- package/lib/component/panels/multipleAnalysisPanel/preferences/AnalysisTablePreferences.d.ts.map +1 -1
- package/lib/component/panels/multipleAnalysisPanel/preferences/AnalysisTablePreferences.js +25 -20
- package/lib/component/panels/multipleAnalysisPanel/preferences/AnalysisTablePreferences.js.map +1 -1
- package/lib/component/panels/multipleAnalysisPanel/preferences/LegendsPreferences.d.ts.map +1 -1
- package/lib/component/panels/multipleAnalysisPanel/preferences/LegendsPreferences.js +41 -36
- package/lib/component/panels/multipleAnalysisPanel/preferences/LegendsPreferences.js.map +1 -1
- package/lib/component/panels/spectrumSimulation/SpinSystemTable.d.ts.map +1 -1
- package/lib/component/panels/spectrumSimulation/SpinSystemTable.js +14 -15
- package/lib/component/panels/spectrumSimulation/SpinSystemTable.js.map +1 -1
- package/lib/component/reducer/actions/DatabaseActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/DatabaseActions.js +3 -2
- package/lib/component/reducer/actions/DatabaseActions.js.map +1 -1
- package/lib/component/reducer/actions/InsetActions.d.ts +1 -1
- package/lib/component/reducer/actions/InsetActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/ToolsActions.d.ts +1 -1
- package/lib/component/reducer/actions/ToolsActions.d.ts.map +1 -1
- package/lib/component/reducer/helper/Zoom1DManager.d.ts +1 -1
- package/lib/component/reducer/helper/Zoom1DManager.d.ts.map +1 -1
- package/lib/component/reducer/helper/ZoomHistoryManager.d.ts +1 -1
- package/lib/component/reducer/helper/ZoomHistoryManager.d.ts.map +1 -1
- package/lib/component/reducer/preferences/actions/matrixGeneration.d.ts +1 -1
- package/lib/component/reducer/preferences/actions/matrixGeneration.d.ts.map +1 -1
- package/lib/component/toolbar/nmr_toolbar.js +1 -1
- package/lib/component/toolbar/nmr_toolbar.js.map +1 -1
- package/lib/component/utility/Events.d.ts +1 -1
- package/lib/component/utility/Events.d.ts.map +1 -1
- package/lib/component/utility/core_slots/core_operator_brush.commons.d.ts +9 -0
- package/lib/component/utility/core_slots/core_operator_brush.commons.d.ts.map +1 -0
- package/lib/component/utility/core_slots/core_operator_brush.commons.js +15 -0
- package/lib/component/utility/core_slots/core_operator_brush.commons.js.map +1 -0
- package/lib/component/utility/core_slots/core_operator_chart_brush.commons.d.ts +7 -0
- package/lib/component/utility/core_slots/core_operator_chart_brush.commons.d.ts.map +1 -0
- package/lib/component/utility/core_slots/core_operator_chart_brush.commons.js +82 -0
- package/lib/component/utility/core_slots/core_operator_chart_brush.commons.js.map +1 -0
- package/lib/component/utility/core_slots/core_operator_chart_brush_tracker.d.ts +8 -0
- package/lib/component/utility/core_slots/core_operator_chart_brush_tracker.d.ts.map +1 -0
- package/lib/component/utility/core_slots/core_operator_chart_brush_tracker.js +11 -0
- package/lib/component/utility/core_slots/core_operator_chart_brush_tracker.js.map +1 -0
- package/lib/component/utility/core_slots/core_operator_chart_svg.d.ts +8 -0
- package/lib/component/utility/core_slots/core_operator_chart_svg.d.ts.map +1 -0
- package/lib/component/utility/core_slots/core_operator_chart_svg.js +11 -0
- package/lib/component/utility/core_slots/core_operator_chart_svg.js.map +1 -0
- package/lib/component/utility/core_slots/core_operator_panel_tool.d.ts +2 -8
- package/lib/component/utility/core_slots/core_operator_panel_tool.d.ts.map +1 -1
- package/lib/component/utility/core_slots/core_operator_panel_tool.js +8 -6
- package/lib/component/utility/core_slots/core_operator_panel_tool.js.map +1 -1
- package/lib/component/utility/core_slots/core_operator_tool.commons.d.ts +11 -0
- package/lib/component/utility/core_slots/core_operator_tool.commons.d.ts.map +1 -0
- package/lib/component/utility/core_slots/core_operator_tool.commons.js +30 -0
- package/lib/component/utility/core_slots/core_operator_tool.commons.js.map +1 -0
- package/lib/component/utility/core_slots/core_operator_tool.d.ts +2 -8
- package/lib/component/utility/core_slots/core_operator_tool.d.ts.map +1 -1
- package/lib/component/utility/core_slots/core_operator_tool.js +8 -6
- package/lib/component/utility/core_slots/core_operator_tool.js.map +1 -1
- package/lib/component/utility/export.d.ts +5 -0
- package/lib/component/utility/export.d.ts.map +1 -1
- package/lib/component/utility/export.js +22 -0
- package/lib/component/utility/export.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/contours.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/contours.js +23 -10
- package/lib/data/data2d/Spectrum2D/contours.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/findBestMinContour/estimateNoiseLevel.d.ts +13 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/estimateNoiseLevel.d.ts.map +1 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/estimateNoiseLevel.js +40 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/estimateNoiseLevel.js.map +1 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/evaluation.d.ts +27 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/evaluation.d.ts.map +1 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/evaluation.js +230 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/evaluation.js.map +1 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/findAutomaticContourLevels.d.ts +227 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/findAutomaticContourLevels.d.ts.map +1 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/findAutomaticContourLevels.js +67 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/findAutomaticContourLevels.js.map +1 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/math.d.ts +4 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/math.d.ts.map +1 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/math.js +42 -0
- package/lib/data/data2d/Spectrum2D/findBestMinContour/math.js.map +1 -0
- package/lib/data/utilities/calculateSanPlot.d.ts +3 -1
- package/lib/data/utilities/calculateSanPlot.d.ts.map +1 -1
- package/lib/data/utilities/calculateSanPlot.js +2 -2
- package/lib/data/utilities/calculateSanPlot.js.map +1 -1
- package/lib/versionInfo.js +1 -1
- package/package.json +7 -8
- package/src/component/1d/ApodizationLine.tsx +2 -2
- package/src/component/1d/BrushTracker1D.tsx +19 -21
- package/src/component/1d/Line.tsx +2 -2
- package/src/component/1d/SVGContent1D.tsx +6 -0
- package/src/component/1d/Viewer1D.tsx +2 -0
- package/src/component/1d/baseline/BaselinePreview.tsx +2 -2
- package/src/component/1d/database/DatabaseSpectrum.tsx +2 -2
- package/src/component/1d/database/ResurrectedDatabaseRanges.tsx +2 -2
- package/src/component/1d/matrix/Boxplot.tsx +5 -5
- package/src/component/1d/matrix/Stocsy.tsx +2 -2
- package/src/component/1d/peaks/PeakAnnotationsSpreadMode.tsx +17 -3
- package/src/component/1d/peaks/usePeakShapesPath.ts +2 -2
- package/src/component/1d/plugin_chart_brush_tracker.tsx +63 -0
- package/src/component/1d/plugin_svg_chart.tsx +60 -0
- package/src/component/1d-2d/components/RangeIndicator.tsx +8 -9
- package/src/component/1d-2d/tools/BrushXY.tsx +1 -1
- package/src/component/1d-2d/tools/CrossLinePointer.tsx +1 -1
- package/src/component/2d/1d-tracer/HorizontalSliceChart.tsx +2 -2
- package/src/component/2d/1d-tracer/Left1DChart.tsx +2 -2
- package/src/component/2d/1d-tracer/Top1DChart.tsx +2 -2
- package/src/component/2d/1d-tracer/VerticalSliceChart.tsx +2 -2
- package/src/component/2d/1d-tracer/phase-correction-traces/SpectrumPhaseTrace.tsx +3 -3
- package/src/component/2d/BrushTracker2D.tsx +5 -5
- package/src/component/2d/ft/Contours.tsx +2 -2
- package/src/component/2d/utilities/DimensionLayout.ts +1 -1
- package/src/component/EventsTrackers/BrushTracker.tsx +118 -115
- package/src/component/EventsTrackers/brush_tracker.types.ts +111 -0
- package/src/component/EventsTrackers/brush_tracker_events_listeners.ts +32 -0
- package/src/component/context/ScaleContext.tsx +1 -1
- package/src/component/elements/D3Axis.tsx +49 -67
- package/src/component/elements/export/ExportContent.tsx +3 -2
- package/src/component/elements/export/ExportOptionsModal.tsx +32 -1
- package/src/component/elements/export/useExportConfigurer.tsx +6 -0
- package/src/component/elements/print/PrintContent.tsx +6 -27
- package/src/component/elements/tanstack_table/create_action_column.tsx +43 -0
- package/src/component/elements/tanstack_table/create_column_helper.ts +11 -0
- package/src/component/elements/tanstack_table/elements/table_context.ts +15 -0
- package/src/component/elements/tanstack_table/elements/table_header.tsx +111 -0
- package/src/component/elements/{ReactTable/Elements/ReactTableRow.tsx → tanstack_table/elements/table_row.tsx} +51 -50
- package/src/component/elements/tanstack_table/features.ts +33 -0
- package/src/component/elements/tanstack_table/index.ts +5 -0
- package/src/component/elements/{ReactTable/ReactTable.tsx → tanstack_table/table.tsx} +78 -157
- package/src/component/elements/tanstack_table/types.ts +86 -0
- package/src/component/elements/utilities/transferStyles.ts +32 -0
- package/src/component/header/AutoPeakPickingOptionPanel.tsx +1 -1
- package/src/component/hooks/useIntegralPath.ts +2 -2
- package/src/component/modal/ImportPublicationStringModal.tsx +160 -136
- package/src/component/modal/LogsHistoryModal.tsx +32 -25
- package/src/component/modal/editRange/forms/components/signal-tabs/SignalJCouplingsTable.tsx +28 -24
- package/src/component/modal/editRange/forms/components/signal-tabs/SignalPeaksTable.tsx +27 -25
- package/src/component/modal/metaImportation/MetaImportationModal.tsx +19 -15
- package/src/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.tsx +47 -57
- package/src/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.ts +100 -28
- package/src/component/panels/AutomaticAssignment/AutomaticAssignmentTable.tsx +27 -25
- package/src/component/panels/IntegralsPanel/IntegralTable.tsx +75 -89
- package/src/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.tsx +68 -60
- package/src/component/panels/PeaksPanel/PeaksTable.tsx +126 -124
- package/src/component/panels/PeaksPanel/peaksToTSV.ts +14 -15
- package/src/component/panels/RangesPanel/RangesTable.tsx +3 -2
- package/src/component/panels/RangesPanel/RangesTableRow.tsx +2 -2
- package/src/component/panels/SpectraPanel/SpectraTable.tsx +58 -36
- package/src/component/panels/SpectraPanel/base/SpectraColumnsManager.tsx +31 -35
- package/src/component/panels/SummaryPanel/SetShiftTolerancesModal.tsx +25 -20
- package/src/component/panels/ZonesPanel/ZonesTableRow.tsx +2 -2
- package/src/component/panels/databasePanel/DatabasePanel.tsx +1 -1
- package/src/component/panels/databasePanel/DatabaseTable.tsx +189 -183
- package/src/component/panels/filtersPanel/Filters/ExclusionZonesOptionsPanel.tsx +20 -20
- package/src/component/panels/filtersPanel/processings_sections_panel.tsx +1 -1
- package/src/component/panels/informationPanel/InformationEditionModal.tsx +40 -37
- package/src/component/panels/multipleAnalysisPanel/AlignSpectra.tsx +128 -98
- package/src/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisPanel.tsx +1 -1
- package/src/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisTable.tsx +23 -24
- package/src/component/panels/multipleAnalysisPanel/preferences/AnalysisTablePreferences.tsx +33 -24
- package/src/component/panels/multipleAnalysisPanel/preferences/LegendsPreferences.tsx +34 -31
- package/src/component/panels/spectrumSimulation/SpinSystemTable.tsx +19 -18
- package/src/component/reducer/actions/DatabaseActions.ts +4 -3
- package/src/component/reducer/actions/InsetActions.ts +1 -1
- package/src/component/reducer/actions/ToolsActions.ts +1 -1
- package/src/component/reducer/helper/Zoom1DManager.ts +1 -1
- package/src/component/reducer/helper/ZoomHistoryManager.ts +1 -1
- package/src/component/reducer/preferences/actions/matrixGeneration.ts +1 -1
- package/src/component/toolbar/nmr_toolbar.tsx +1 -1
- package/src/component/utility/Events.tsx +1 -1
- package/src/component/utility/core_slots/core_operator_brush.commons.ts +18 -0
- package/src/component/utility/core_slots/core_operator_chart_brush.commons.ts +138 -0
- package/src/component/utility/core_slots/core_operator_chart_brush_tracker.tsx +27 -0
- package/src/component/utility/core_slots/core_operator_chart_svg.tsx +46 -0
- package/src/component/utility/core_slots/core_operator_panel_tool.tsx +9 -27
- package/src/component/utility/core_slots/core_operator_tool.commons.ts +63 -0
- package/src/component/utility/core_slots/core_operator_tool.tsx +9 -27
- package/src/component/utility/export.ts +34 -0
- package/src/data/data2d/Spectrum2D/contours.ts +40 -14
- package/src/data/data2d/Spectrum2D/findBestMinContour/estimateNoiseLevel.ts +67 -0
- package/src/data/data2d/Spectrum2D/findBestMinContour/evaluation.ts +432 -0
- package/src/data/data2d/Spectrum2D/findBestMinContour/findAutomaticContourLevels.ts +431 -0
- package/src/data/data2d/Spectrum2D/findBestMinContour/math.ts +59 -0
- package/src/data/utilities/calculateSanPlot.ts +2 -1
- package/src/versionInfo.ts +1 -1
- package/lib/component/elements/ReactTable/BaseReactTable.d.ts.map +0 -1
- package/lib/component/elements/ReactTable/BaseReactTable.js.map +0 -1
- package/lib/component/elements/ReactTable/Elements/EmptyDataRow.d.ts.map +0 -1
- package/lib/component/elements/ReactTable/Elements/EmptyDataRow.js.map +0 -1
- package/lib/component/elements/ReactTable/Elements/ReactTableHeader.d.ts +0 -10
- package/lib/component/elements/ReactTable/Elements/ReactTableHeader.d.ts.map +0 -1
- package/lib/component/elements/ReactTable/Elements/ReactTableHeader.js +0 -27
- package/lib/component/elements/ReactTable/Elements/ReactTableHeader.js.map +0 -1
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.d.ts +0 -16
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.d.ts.map +0 -1
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.js.map +0 -1
- package/lib/component/elements/ReactTable/ReactTable.d.ts +0 -64
- package/lib/component/elements/ReactTable/ReactTable.d.ts.map +0 -1
- package/lib/component/elements/ReactTable/ReactTable.js.map +0 -1
- package/lib/component/elements/ReactTable/utility/ReactTableContext.d.ts +0 -4
- package/lib/component/elements/ReactTable/utility/ReactTableContext.d.ts.map +0 -1
- package/lib/component/elements/ReactTable/utility/ReactTableContext.js +0 -11
- package/lib/component/elements/ReactTable/utility/ReactTableContext.js.map +0 -1
- package/lib/component/elements/ReactTable/utility/addCustomColumn.d.ts +0 -19
- package/lib/component/elements/ReactTable/utility/addCustomColumn.d.ts.map +0 -1
- package/lib/component/elements/ReactTable/utility/addCustomColumn.js +0 -36
- package/lib/component/elements/ReactTable/utility/addCustomColumn.js.map +0 -1
- package/lib/component/elements/ReactTable/utility/useRowSpan.d.ts +0 -9
- package/lib/component/elements/ReactTable/utility/useRowSpan.d.ts.map +0 -1
- package/lib/component/elements/ReactTable/utility/useRowSpan.js +0 -40
- package/lib/component/elements/ReactTable/utility/useRowSpan.js.map +0 -1
- package/lib/component/elements/export/utilities/transferDocumentStyles.d.ts +0 -2
- package/lib/component/elements/export/utilities/transferDocumentStyles.d.ts.map +0 -1
- package/lib/component/elements/export/utilities/transferDocumentStyles.js +0 -21
- package/lib/component/elements/export/utilities/transferDocumentStyles.js.map +0 -1
- package/lib/component/utility/PathBuilder.d.ts +0 -10
- package/lib/component/utility/PathBuilder.d.ts.map +0 -1
- package/lib/component/utility/PathBuilder.js +0 -38
- package/lib/component/utility/PathBuilder.js.map +0 -1
- package/src/component/elements/ReactTable/Elements/ReactTableHeader.tsx +0 -81
- package/src/component/elements/ReactTable/utility/ReactTableContext.ts +0 -14
- package/src/component/elements/ReactTable/utility/addCustomColumn.tsx +0 -75
- package/src/component/elements/ReactTable/utility/useRowSpan.ts +0 -61
- package/src/component/elements/export/utilities/transferDocumentStyles.ts +0 -21
- package/src/component/utility/PathBuilder.ts +0 -41
- /package/src/component/elements/{ReactTable/BaseReactTable.tsx → tanstack_table/elements/base_react_table.tsx} +0 -0
- /package/src/component/elements/{ReactTable/Elements/EmptyDataRow.tsx → tanstack_table/elements/empty_data_row.tsx} +0 -0
|
@@ -8,12 +8,13 @@ import { useCallback, useMemo, useRef } from 'react';
|
|
|
8
8
|
import { useFormContext, useWatch } from 'react-hook-form';
|
|
9
9
|
import { FaPlus, FaRegTrashAlt } from 'react-icons/fa';
|
|
10
10
|
import { Toolbar } from 'react-science/ui';
|
|
11
|
-
import type { CellProps } from 'react-table';
|
|
12
11
|
|
|
13
12
|
import { NumberInput2Controller } from '../../../../../elements/NumberInput2Controller.js';
|
|
14
|
-
import type { Column } from '../../../../../elements/ReactTable/ReactTable.js';
|
|
15
|
-
import ReactTable from '../../../../../elements/ReactTable/ReactTable.js';
|
|
16
13
|
import { useTabsController } from '../../../../../elements/TabsProvider.js';
|
|
14
|
+
import {
|
|
15
|
+
TanStackTable,
|
|
16
|
+
createTanStackColumnHelper,
|
|
17
|
+
} from '../../../../../elements/tanstack_table/index.ts';
|
|
17
18
|
import useSpectrum from '../../../../../hooks/useSpectrum.js';
|
|
18
19
|
import { useEvent } from '../../../../../utility/Events.js';
|
|
19
20
|
import { useEventFocusInput } from '../SignalsContent.js';
|
|
@@ -49,7 +50,7 @@ function getPeakKey(
|
|
|
49
50
|
export function SignalPeaksTable(props: SignalPeaksTableProps) {
|
|
50
51
|
const { focusSource, setFocusSource } = useEventFocusInput();
|
|
51
52
|
|
|
52
|
-
const { setValue, control, setFocus } = useFormContext();
|
|
53
|
+
const { setValue, control, setFocus, getValues } = useFormContext();
|
|
53
54
|
const { signals } = useWatch();
|
|
54
55
|
const { selectedTabId: signalIndex = 0 } = useTabsController<number>();
|
|
55
56
|
|
|
@@ -123,7 +124,8 @@ export function SignalPeaksTable(props: SignalPeaksTableProps) {
|
|
|
123
124
|
);
|
|
124
125
|
|
|
125
126
|
const deleteHandler = useCallback(
|
|
126
|
-
(
|
|
127
|
+
(index: number) => {
|
|
128
|
+
const data = getValues(`signals.${signalIndex}.peaks`) || [];
|
|
127
129
|
const peaks = data.filter(
|
|
128
130
|
(_: any, columnIndex: number) => columnIndex !== index,
|
|
129
131
|
);
|
|
@@ -133,7 +135,7 @@ export function SignalPeaksTable(props: SignalPeaksTableProps) {
|
|
|
133
135
|
lastSelectedPeakIndexRef.current = null;
|
|
134
136
|
}
|
|
135
137
|
},
|
|
136
|
-
[setValue, signalIndex],
|
|
138
|
+
[getValues, setValue, signalIndex],
|
|
137
139
|
);
|
|
138
140
|
|
|
139
141
|
function deleteAllHandler() {
|
|
@@ -150,17 +152,18 @@ export function SignalPeaksTable(props: SignalPeaksTableProps) {
|
|
|
150
152
|
[re, setValue, signalIndex, xArray],
|
|
151
153
|
);
|
|
152
154
|
|
|
153
|
-
const COLUMNS = useMemo
|
|
154
|
-
()
|
|
155
|
+
const COLUMNS = useMemo(() => {
|
|
156
|
+
const columnHelper = createTanStackColumnHelper<NMRPeak1D>();
|
|
157
|
+
return columnHelper.columns([
|
|
155
158
|
{
|
|
156
|
-
|
|
157
|
-
style: { width: '25px', ...styles.column },
|
|
158
|
-
|
|
159
|
+
header: '#',
|
|
160
|
+
meta: { style: { width: '25px', ...styles.column } },
|
|
161
|
+
accessorFn: (_: any, index) => index + 1,
|
|
159
162
|
},
|
|
160
163
|
{
|
|
161
|
-
|
|
162
|
-
style: { padding: 0, ...styles.column },
|
|
163
|
-
|
|
164
|
+
header: 'delta',
|
|
165
|
+
meta: { style: { padding: 0, ...styles.column } },
|
|
166
|
+
cell: ({ row }) => {
|
|
164
167
|
return (
|
|
165
168
|
<NumberInput2Controller
|
|
166
169
|
control={control}
|
|
@@ -178,9 +181,9 @@ export function SignalPeaksTable(props: SignalPeaksTableProps) {
|
|
|
178
181
|
},
|
|
179
182
|
},
|
|
180
183
|
{
|
|
181
|
-
|
|
182
|
-
style: { padding: 0, ...styles.column },
|
|
183
|
-
|
|
184
|
+
header: 'Intensity',
|
|
185
|
+
meta: { style: { padding: 0, ...styles.column } },
|
|
186
|
+
cell: ({ row }) => {
|
|
184
187
|
return (
|
|
185
188
|
<NumberInput2Controller
|
|
186
189
|
control={control}
|
|
@@ -195,10 +198,10 @@ export function SignalPeaksTable(props: SignalPeaksTableProps) {
|
|
|
195
198
|
},
|
|
196
199
|
},
|
|
197
200
|
{
|
|
198
|
-
|
|
199
|
-
style: { width: '70px', ...styles.column },
|
|
201
|
+
header: '',
|
|
202
|
+
meta: { style: { width: '70px', ...styles.column } },
|
|
200
203
|
id: 'action-button',
|
|
201
|
-
|
|
204
|
+
cell: ({ row }) => {
|
|
202
205
|
const record: any = row.original;
|
|
203
206
|
return (
|
|
204
207
|
<div style={{ display: 'flex', justifyContent: 'space-around' }}>
|
|
@@ -207,7 +210,7 @@ export function SignalPeaksTable(props: SignalPeaksTableProps) {
|
|
|
207
210
|
size="small"
|
|
208
211
|
variant="outlined"
|
|
209
212
|
intent="danger"
|
|
210
|
-
onClick={() => deleteHandler(
|
|
213
|
+
onClick={() => deleteHandler(row.index)}
|
|
211
214
|
>
|
|
212
215
|
<FaRegTrashAlt className={Classes.ICON} />
|
|
213
216
|
</Button>
|
|
@@ -216,9 +219,8 @@ export function SignalPeaksTable(props: SignalPeaksTableProps) {
|
|
|
216
219
|
);
|
|
217
220
|
},
|
|
218
221
|
},
|
|
219
|
-
]
|
|
220
|
-
|
|
221
|
-
);
|
|
222
|
+
]);
|
|
223
|
+
}, [changeDeltaHandler, control, deleteHandler, signalIndex]);
|
|
222
224
|
|
|
223
225
|
function selectRowHandler(index: number) {
|
|
224
226
|
setFocusSource('peak');
|
|
@@ -250,7 +252,7 @@ export function SignalPeaksTable(props: SignalPeaksTableProps) {
|
|
|
250
252
|
overflow: 'auto',
|
|
251
253
|
}}
|
|
252
254
|
>
|
|
253
|
-
<
|
|
255
|
+
<TanStackTable
|
|
254
256
|
data={signal?.peaks || []}
|
|
255
257
|
columns={COLUMNS}
|
|
256
258
|
onClick={(e, rowData: any) => selectRowHandler(rowData.index)}
|
|
@@ -21,10 +21,13 @@ import { useToaster } from '../../context/ToasterContext.js';
|
|
|
21
21
|
import Button from '../../elements/Button.js';
|
|
22
22
|
import { Input2Controller } from '../../elements/Input2Controller.js';
|
|
23
23
|
import Label from '../../elements/Label.js';
|
|
24
|
-
import type { Column } from '../../elements/ReactTable/ReactTable.js';
|
|
25
|
-
import ReactTable from '../../elements/ReactTable/ReactTable.js';
|
|
26
24
|
import { Select2Controller } from '../../elements/Select2Controller.js';
|
|
27
25
|
import { StandardDialog } from '../../elements/StandardDialog.tsx';
|
|
26
|
+
import type { TanStackTableRow } from '../../elements/tanstack_table/index.ts';
|
|
27
|
+
import {
|
|
28
|
+
TanStackTable,
|
|
29
|
+
createTanStackColumnHelper,
|
|
30
|
+
} from '../../elements/tanstack_table/index.ts';
|
|
28
31
|
import { convertPathArrayToString } from '../../utility/convertPathArrayToString.js';
|
|
29
32
|
import { getSpectraObjectPaths } from '../../utility/getSpectraObjectPaths.js';
|
|
30
33
|
|
|
@@ -164,9 +167,10 @@ function InnerMetaImportationModal({
|
|
|
164
167
|
|
|
165
168
|
const columns = useMemo(() => {
|
|
166
169
|
const fields = parseResult?.meta.fields || [];
|
|
167
|
-
const
|
|
168
|
-
|
|
169
|
-
|
|
170
|
+
const columnHelper = createTanStackColumnHelper<any>();
|
|
171
|
+
const columns = columnHelper.columns([
|
|
172
|
+
{ header: '#', accessorFn: (_: any, index) => index + 1 },
|
|
173
|
+
]);
|
|
170
174
|
|
|
171
175
|
function getRowValue(val: any) {
|
|
172
176
|
if (typeof val === 'string') return val;
|
|
@@ -177,9 +181,9 @@ function InnerMetaImportationModal({
|
|
|
177
181
|
for (const fieldName of fields) {
|
|
178
182
|
if (fieldName) {
|
|
179
183
|
columns.push({
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
style: styles.column,
|
|
184
|
+
header: fieldName,
|
|
185
|
+
accessorFn: (row: any) => getRowValue(row[fieldName]),
|
|
186
|
+
meta: { style: styles.column },
|
|
183
187
|
});
|
|
184
188
|
}
|
|
185
189
|
}
|
|
@@ -217,24 +221,24 @@ function InnerMetaImportationModal({
|
|
|
217
221
|
}
|
|
218
222
|
}
|
|
219
223
|
|
|
220
|
-
function handleActiveRow(
|
|
221
|
-
const record = compareResults[
|
|
224
|
+
function handleActiveRow(row: TanStackTableRow<any>) {
|
|
225
|
+
const record = compareResults[row.index] || null;
|
|
222
226
|
if (
|
|
223
227
|
record?.isDuplicated ||
|
|
224
228
|
record?.spectraIDs.length > 0 ||
|
|
225
|
-
errors?.[
|
|
229
|
+
errors?.[row.index]
|
|
226
230
|
) {
|
|
227
231
|
return true;
|
|
228
232
|
}
|
|
229
233
|
return false;
|
|
230
234
|
}
|
|
231
235
|
|
|
232
|
-
function handleRowStyle(
|
|
233
|
-
const record = compareResults[
|
|
236
|
+
function handleRowStyle(row: TanStackTableRow<any>) {
|
|
237
|
+
const record = compareResults[row.index] || null;
|
|
234
238
|
if (
|
|
235
239
|
record?.isDuplicated ||
|
|
236
240
|
record?.spectraIDs.length > 1 ||
|
|
237
|
-
errors?.[
|
|
241
|
+
errors?.[row.index]
|
|
238
242
|
) {
|
|
239
243
|
return rowColors.noMatch;
|
|
240
244
|
} else if (record) {
|
|
@@ -303,7 +307,7 @@ function InnerMetaImportationModal({
|
|
|
303
307
|
</Button.Done>
|
|
304
308
|
</div>
|
|
305
309
|
<div style={{ height: 'calc(100% - 160px)' }}>
|
|
306
|
-
<
|
|
310
|
+
<TanStackTable
|
|
307
311
|
columns={columns}
|
|
308
312
|
data={metadata}
|
|
309
313
|
approxItemHeight={25}
|
|
@@ -14,7 +14,14 @@ import {
|
|
|
14
14
|
getExportOptions,
|
|
15
15
|
} from '../../../../elements/export/utilities/getExportOptions.js';
|
|
16
16
|
import { pageSizes } from '../../../../elements/print/pageSize.js';
|
|
17
|
-
import {
|
|
17
|
+
import {
|
|
18
|
+
MAX_DPI,
|
|
19
|
+
MIN_DPI,
|
|
20
|
+
dpiField,
|
|
21
|
+
exportSettingsDecoder,
|
|
22
|
+
exportSettingsValidation,
|
|
23
|
+
sizeField,
|
|
24
|
+
} from '../validation/export_tab_validation.js';
|
|
18
25
|
import { defaultGeneralSettingsFormValues } from '../validation.js';
|
|
19
26
|
|
|
20
27
|
type Mode = 'basic' | 'advance';
|
|
@@ -48,96 +55,69 @@ const layoutItems: Array<SelectItem<Layout>> = [
|
|
|
48
55
|
{ value: 'landscape', label: 'Landscape' },
|
|
49
56
|
];
|
|
50
57
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
58
|
+
/** Returns null for values the schema rejects */
|
|
59
|
+
function parsePositiveNumber(str: string) {
|
|
60
|
+
const value = Number(str);
|
|
61
|
+
if (!Number.isFinite(value) || value <= 0) return null;
|
|
54
62
|
return value;
|
|
55
63
|
}
|
|
56
64
|
|
|
57
|
-
function safeStringNumber(str: string, onInvalid: (str: string) => void) {
|
|
58
|
-
let isInvalid = false;
|
|
59
|
-
let value = Number(str);
|
|
60
|
-
if (Number.isNaN(value)) {
|
|
61
|
-
value = 1;
|
|
62
|
-
isInvalid = true;
|
|
63
|
-
}
|
|
64
|
-
if (value <= 0) {
|
|
65
|
-
value = 1;
|
|
66
|
-
isInvalid = true;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
if (!isInvalid) {
|
|
70
|
-
const result = String(value);
|
|
71
|
-
onInvalid(result);
|
|
72
|
-
return result;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
return str;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
65
|
export const ExportFields = withFieldGroup({
|
|
79
66
|
defaultValues: defaultGeneralSettingsFormValues.export.png,
|
|
80
67
|
render: function ExportFields({ group }) {
|
|
81
68
|
const inputValues = useSelector(group.store, (s) => s.values);
|
|
82
69
|
|
|
83
70
|
const outputValues = useMemo(() => {
|
|
84
|
-
return
|
|
71
|
+
return exportSettingsDecoder.decode(inputValues);
|
|
85
72
|
}, [inputValues]);
|
|
86
73
|
|
|
87
74
|
const advancedTransforms = useExportConfigurer(outputValues);
|
|
88
75
|
|
|
89
76
|
function onModeChange({ value }: { value: Mode }) {
|
|
90
|
-
const
|
|
77
|
+
const defaultOptions = getExportDefaultOptionsByMode(value);
|
|
78
|
+
const newOptions = exportSettingsValidation.encode(defaultOptions);
|
|
91
79
|
|
|
92
80
|
for (const [key, value] of Object.entries(newOptions)) {
|
|
93
81
|
group.setFieldValue(key as keyof typeof newOptions, value, {
|
|
94
82
|
dontRunListeners: true,
|
|
95
83
|
});
|
|
96
84
|
}
|
|
85
|
+
// keep the aspect ratio if the options is activated
|
|
86
|
+
advancedTransforms.resetSize(defaultOptions);
|
|
97
87
|
}
|
|
98
88
|
|
|
99
89
|
function onChangeUnit({ value }: { value: Unit }) {
|
|
100
90
|
const { width, height } = advancedTransforms.changeUnit({ unit: value });
|
|
101
|
-
group.setFieldValue('width', String(
|
|
91
|
+
group.setFieldValue('width', String(width), {
|
|
102
92
|
dontRunListeners: true,
|
|
103
93
|
});
|
|
104
|
-
group.setFieldValue('height', String(
|
|
94
|
+
group.setFieldValue('height', String(height), {
|
|
105
95
|
dontRunListeners: true,
|
|
106
96
|
});
|
|
107
97
|
}
|
|
108
98
|
|
|
109
99
|
function onWidthChange({ value }: { value: string }) {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
);
|
|
100
|
+
const width = parsePositiveNumber(value);
|
|
101
|
+
if (width === null) return;
|
|
113
102
|
|
|
114
|
-
const height = advancedTransforms.changeSize(
|
|
115
|
-
Number(value),
|
|
116
|
-
'height',
|
|
117
|
-
'width',
|
|
118
|
-
);
|
|
103
|
+
const height = advancedTransforms.changeSize(width, 'height', 'width');
|
|
119
104
|
if (!advancedTransforms.isAspectRatioEnabled) {
|
|
120
105
|
return;
|
|
121
106
|
}
|
|
122
|
-
group.setFieldValue('height', String(
|
|
107
|
+
group.setFieldValue('height', String(height), {
|
|
123
108
|
dontRunListeners: true,
|
|
124
109
|
});
|
|
125
110
|
}
|
|
126
111
|
|
|
127
112
|
function onHeightChange({ value }: { value: string }) {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
);
|
|
113
|
+
const height = parsePositiveNumber(value);
|
|
114
|
+
if (height === null) return;
|
|
131
115
|
|
|
132
|
-
const width = advancedTransforms.changeSize(
|
|
133
|
-
Number(value),
|
|
134
|
-
'width',
|
|
135
|
-
'height',
|
|
136
|
-
);
|
|
116
|
+
const width = advancedTransforms.changeSize(height, 'width', 'height');
|
|
137
117
|
if (!advancedTransforms.isAspectRatioEnabled) {
|
|
138
118
|
return;
|
|
139
119
|
}
|
|
140
|
-
group.setFieldValue('width', String(
|
|
120
|
+
group.setFieldValue('width', String(width), {
|
|
141
121
|
dontRunListeners: true,
|
|
142
122
|
});
|
|
143
123
|
}
|
|
@@ -146,14 +126,14 @@ export const ExportFields = withFieldGroup({
|
|
|
146
126
|
if (inputValues.mode !== 'advance') return;
|
|
147
127
|
if (inputValues.unit !== 'px') return;
|
|
148
128
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
const { width, height } = advancedTransforms.changeDPI(
|
|
153
|
-
group.setFieldValue('width', String(
|
|
129
|
+
const dpi = parsePositiveNumber(value);
|
|
130
|
+
if (dpi === null || dpi < MIN_DPI || dpi > MAX_DPI) return;
|
|
131
|
+
|
|
132
|
+
const { width, height } = advancedTransforms.changeDPI(dpi);
|
|
133
|
+
group.setFieldValue('width', String(width), {
|
|
154
134
|
dontRunListeners: true,
|
|
155
135
|
});
|
|
156
|
-
group.setFieldValue('height', String(
|
|
136
|
+
group.setFieldValue('height', String(height), {
|
|
157
137
|
dontRunListeners: true,
|
|
158
138
|
});
|
|
159
139
|
}
|
|
@@ -179,6 +159,8 @@ export const ExportFields = withFieldGroup({
|
|
|
179
159
|
}}
|
|
180
160
|
>
|
|
181
161
|
{({ mode, layout, unit }) => {
|
|
162
|
+
const minSize = unit === 'px' ? 1 : 0;
|
|
163
|
+
|
|
182
164
|
switch (mode) {
|
|
183
165
|
case 'basic':
|
|
184
166
|
return (
|
|
@@ -218,11 +200,12 @@ export const ExportFields = withFieldGroup({
|
|
|
218
200
|
<AppField
|
|
219
201
|
name="width"
|
|
220
202
|
listeners={{ onChange: onWidthChange }}
|
|
203
|
+
validators={{ onChange: sizeField }}
|
|
221
204
|
>
|
|
222
205
|
{({ NumericInput }) => (
|
|
223
206
|
<NumericInput
|
|
224
207
|
label="Width"
|
|
225
|
-
min={
|
|
208
|
+
min={minSize}
|
|
226
209
|
rightElement={<Tag>{unit}</Tag>}
|
|
227
210
|
/>
|
|
228
211
|
)}
|
|
@@ -230,11 +213,12 @@ export const ExportFields = withFieldGroup({
|
|
|
230
213
|
<AppField
|
|
231
214
|
name="height"
|
|
232
215
|
listeners={{ onChange: onHeightChange }}
|
|
216
|
+
validators={{ onChange: sizeField }}
|
|
233
217
|
>
|
|
234
218
|
{({ NumericInput }) => (
|
|
235
219
|
<NumericInput
|
|
236
220
|
label="Height"
|
|
237
|
-
min={
|
|
221
|
+
min={minSize}
|
|
238
222
|
rightElement={<Tag>{unit}</Tag>}
|
|
239
223
|
/>
|
|
240
224
|
)}
|
|
@@ -246,8 +230,14 @@ export const ExportFields = withFieldGroup({
|
|
|
246
230
|
}
|
|
247
231
|
}}
|
|
248
232
|
</Subscribe>
|
|
249
|
-
<AppField
|
|
250
|
-
|
|
233
|
+
<AppField
|
|
234
|
+
name="dpi"
|
|
235
|
+
listeners={{ onChange: onDPIChange }}
|
|
236
|
+
validators={{ onChange: dpiField }}
|
|
237
|
+
>
|
|
238
|
+
{({ NumericInput }) => (
|
|
239
|
+
<NumericInput label="DPI" min={MIN_DPI} max={MAX_DPI} />
|
|
240
|
+
)}
|
|
251
241
|
</AppField>
|
|
252
242
|
<AppField name="useDefaultSettings">
|
|
253
243
|
{({ Checkbox }) => (
|
package/src/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.ts
CHANGED
|
@@ -3,6 +3,12 @@ import { units } from '@zakodium/nmrium-core';
|
|
|
3
3
|
import { coerceNumberInput } from 'react-science/ui';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
|
|
6
|
+
import { convert, convertToPixels } from '../../../../elements/export/units.js';
|
|
7
|
+
import {
|
|
8
|
+
MAX_CANVAS_AREA,
|
|
9
|
+
MAX_CANVAS_SIDE,
|
|
10
|
+
} from '../../../../utility/export.ts';
|
|
11
|
+
|
|
6
12
|
const exportSizes: PageSizeName[] = [
|
|
7
13
|
'Letter',
|
|
8
14
|
'Legal',
|
|
@@ -18,40 +24,106 @@ const exportSizes: PageSizeName[] = [
|
|
|
18
24
|
];
|
|
19
25
|
const exportLayouts: Layout[] = ['portrait', 'landscape'];
|
|
20
26
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
*/
|
|
24
|
-
const baseExportSettings = z.object({
|
|
25
|
-
useDefaultSettings: z.boolean(),
|
|
26
|
-
dpi: coerceNumberInput(),
|
|
27
|
-
});
|
|
27
|
+
export const MIN_DPI = 1;
|
|
28
|
+
export const MAX_DPI = 1200;
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
*/
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
30
|
+
const formatNumber = (value: number) => value.toLocaleString('en-US');
|
|
31
|
+
|
|
32
|
+
/** Sizes are unit-relative (m, in, cm, px...), so the only unit-agnostic invariant is being positive. */
|
|
33
|
+
export const sizeField = coerceNumberInput(z.number().positive());
|
|
34
|
+
export const dpiField = coerceNumberInput(
|
|
35
|
+
z.number().int().min(MIN_DPI).max(MAX_DPI),
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
type NumberField = ReturnType<typeof coerceNumberInput>;
|
|
39
|
+
type Side = 'width' | 'height';
|
|
40
|
+
|
|
41
|
+
const sides: Side[] = ['width', 'height'];
|
|
42
|
+
|
|
43
|
+
/** @see {import("@zakodium/nmrium-core").BasicExportSettings} */
|
|
44
|
+
function basicSettings(dpi: NumberField) {
|
|
45
|
+
return z.object({
|
|
46
|
+
mode: z.literal('basic'),
|
|
47
|
+
useDefaultSettings: z.boolean(),
|
|
48
|
+
dpi,
|
|
49
|
+
size: z.enum(exportSizes),
|
|
50
|
+
layout: z.enum(exportLayouts),
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/** @see {import("@zakodium/nmrium-core").AdvanceExportSettings} */
|
|
55
|
+
function advancedSettings(size: NumberField, dpi: NumberField) {
|
|
56
|
+
return z.object({
|
|
57
|
+
mode: z.literal('advance'),
|
|
58
|
+
useDefaultSettings: z.boolean(),
|
|
59
|
+
dpi,
|
|
60
|
+
width: size,
|
|
61
|
+
height: size,
|
|
62
|
+
unit: z.enum(units.map((u) => u.unit)),
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
type AdvancedSettings = z.output<ReturnType<typeof advancedSettings>>;
|
|
67
|
+
|
|
68
|
+
/** A canvas the browser cannot allocate makes the export fail, so the real limit is the size in pixels. */
|
|
69
|
+
function getSizeErrors(settings: AdvancedSettings) {
|
|
70
|
+
const { unit, dpi, width, height } = settings;
|
|
71
|
+
const pixels = {
|
|
72
|
+
width: convertToPixels(width, unit, dpi, { precision: 0 }),
|
|
73
|
+
height: convertToPixels(height, unit, dpi, { precision: 0 }),
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
function inCurrentUnit(px: number) {
|
|
77
|
+
if (unit === 'px') return `${formatNumber(px)} px`;
|
|
78
|
+
return `${convert(px, 'px', unit, dpi, { precision: 2 })} ${unit}`;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const errors: Partial<Record<Side, string>> = {};
|
|
82
|
+
|
|
83
|
+
for (const side of sides) {
|
|
84
|
+
if (pixels[side] < 1) {
|
|
85
|
+
errors[side] = `Too small to export. Use at least ${inCurrentUnit(1)}.`;
|
|
86
|
+
} else if (pixels[side] > MAX_CANVAS_SIDE) {
|
|
87
|
+
errors[side] =
|
|
88
|
+
`Too large to export. Use at most ${inCurrentUnit(MAX_CANVAS_SIDE)}.`;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const hasSideError = sides.some((side) => errors[side]);
|
|
93
|
+
if (!hasSideError && pixels.width * pixels.height > MAX_CANVAS_AREA) {
|
|
94
|
+
const message = `The export would be ${formatNumber(pixels.width)} x ${formatNumber(pixels.height)} pixels, which is too large. Try a smaller size or a lower DPI.`;
|
|
95
|
+
errors.width = message;
|
|
96
|
+
errors.height = message;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return errors;
|
|
100
|
+
}
|
|
48
101
|
|
|
49
102
|
/**
|
|
50
103
|
* @see {import("@zakodium/nmrium-core").ExportSettings}
|
|
51
104
|
*/
|
|
52
105
|
export const exportSettingsValidation = z.discriminatedUnion('mode', [
|
|
53
|
-
|
|
54
|
-
|
|
106
|
+
basicSettings(dpiField),
|
|
107
|
+
advancedSettings(sizeField, dpiField).check(({ value, issues }) => {
|
|
108
|
+
const errors = getSizeErrors(value);
|
|
109
|
+
|
|
110
|
+
for (const side of sides) {
|
|
111
|
+
const message = errors[side];
|
|
112
|
+
if (!message) continue;
|
|
113
|
+
|
|
114
|
+
issues.push({
|
|
115
|
+
code: 'custom',
|
|
116
|
+
input: value[side],
|
|
117
|
+
path: [side],
|
|
118
|
+
message,
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
}),
|
|
122
|
+
]);
|
|
123
|
+
|
|
124
|
+
export const exportSettingsDecoder = z.discriminatedUnion('mode', [
|
|
125
|
+
basicSettings(coerceNumberInput()),
|
|
126
|
+
advancedSettings(coerceNumberInput(), coerceNumberInput()),
|
|
55
127
|
]);
|
|
56
128
|
|
|
57
129
|
/**
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { SvgNmrAssignment } from 'cheminfo-font';
|
|
2
2
|
import type { MouseEvent } from 'react';
|
|
3
3
|
import { memo, useCallback, useMemo } from 'react';
|
|
4
|
-
import type { CellProps } from 'react-table';
|
|
5
4
|
|
|
6
5
|
import { useDispatch } from '../../context/DispatchContext.js';
|
|
7
|
-
import
|
|
8
|
-
import
|
|
6
|
+
import type { TanStackTableRow } from '../../elements/tanstack_table/index.ts';
|
|
7
|
+
import {
|
|
8
|
+
TanStackTable,
|
|
9
|
+
createTanStackColumnHelper,
|
|
10
|
+
} from '../../elements/tanstack_table/index.ts';
|
|
9
11
|
|
|
10
12
|
import type { AutoAssignmentsData } from './useAutoAssignments.js';
|
|
11
13
|
|
|
@@ -13,11 +15,12 @@ interface AutomaticAssignmentTableProps {
|
|
|
13
15
|
data: AutoAssignmentsData[];
|
|
14
16
|
}
|
|
15
17
|
|
|
16
|
-
function AutomaticAssignmentTable(
|
|
18
|
+
function AutomaticAssignmentTable(props: AutomaticAssignmentTableProps) {
|
|
19
|
+
const { data } = props;
|
|
17
20
|
const dispatch = useDispatch();
|
|
18
21
|
|
|
19
22
|
const assignHandler = useCallback(
|
|
20
|
-
(event: MouseEvent, row:
|
|
23
|
+
(event: MouseEvent, row: TanStackTableRow<AutoAssignmentsData>) => {
|
|
21
24
|
event.preventDefault();
|
|
22
25
|
event.stopPropagation();
|
|
23
26
|
|
|
@@ -29,29 +32,29 @@ function AutomaticAssignmentTable({ data }: AutomaticAssignmentTableProps) {
|
|
|
29
32
|
[dispatch],
|
|
30
33
|
);
|
|
31
34
|
|
|
32
|
-
const COLUMNS = useMemo
|
|
33
|
-
()
|
|
35
|
+
const COLUMNS = useMemo(() => {
|
|
36
|
+
const columnHelper = createTanStackColumnHelper<AutoAssignmentsData>();
|
|
37
|
+
return columnHelper.columns([
|
|
34
38
|
{
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
style: { width: '1%', maxWidth: '40px', minWidth: '40px' },
|
|
39
|
+
header: '#',
|
|
40
|
+
accessorFn: (_, index) => index + 1,
|
|
41
|
+
meta: { style: { width: '1%', maxWidth: '40px', minWidth: '40px' } },
|
|
39
42
|
},
|
|
40
43
|
{
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
accessor: 'score',
|
|
44
|
+
header: 'Score',
|
|
45
|
+
accessorKey: 'score',
|
|
44
46
|
},
|
|
45
47
|
{
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
header: '',
|
|
49
|
+
meta: {
|
|
50
|
+
style: {
|
|
51
|
+
width: '1%',
|
|
52
|
+
maxWidth: '24px',
|
|
53
|
+
minWidth: '24px',
|
|
54
|
+
},
|
|
52
55
|
},
|
|
53
56
|
id: 'assign-button',
|
|
54
|
-
|
|
57
|
+
cell: ({ row }) => (
|
|
55
58
|
<button
|
|
56
59
|
type="button"
|
|
57
60
|
className="assign-button"
|
|
@@ -61,12 +64,11 @@ function AutomaticAssignmentTable({ data }: AutomaticAssignmentTableProps) {
|
|
|
61
64
|
</button>
|
|
62
65
|
),
|
|
63
66
|
},
|
|
64
|
-
]
|
|
65
|
-
|
|
66
|
-
);
|
|
67
|
+
]);
|
|
68
|
+
}, [assignHandler]);
|
|
67
69
|
|
|
68
70
|
return (
|
|
69
|
-
<
|
|
71
|
+
<TanStackTable
|
|
70
72
|
data={data}
|
|
71
73
|
columns={COLUMNS}
|
|
72
74
|
onClick={assignHandler}
|