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
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** @jsxImportSource @emotion/react */
|
|
2
|
+
import type { CSSObject, SerializedStyles } from '@emotion/react';
|
|
3
|
+
import type { ReactElement } from 'react';
|
|
4
|
+
import type { TanStackRowData, TanStackTableClickEvent, TanStackTableColumn, TanStackTableContextMenuProps, TanStackTableHighlightSourceProps, TanStackTableRow, TanStackTableRowStyle, TanStackTableSortEvent } from './types.ts';
|
|
5
|
+
interface TanStackTableProps<TData extends TanStackRowData> extends TanStackTableContextMenuProps<TData>, TanStackTableClickEvent<TData>, TanStackTableSortEvent<TData> {
|
|
6
|
+
data: readonly TData[];
|
|
7
|
+
columns: ReadonlyArray<TanStackTableColumn<TData, any>>;
|
|
8
|
+
approxItemHeight?: number;
|
|
9
|
+
approxColumnWidth?: number;
|
|
10
|
+
groupKey?: keyof TData;
|
|
11
|
+
indexKey?: string;
|
|
12
|
+
enableVirtualScroll?: boolean;
|
|
13
|
+
enableColumnsVirtualScroll?: boolean;
|
|
14
|
+
activeRow?: (data: TanStackTableRow<TData>) => boolean;
|
|
15
|
+
enableDefaultActiveRow?: boolean;
|
|
16
|
+
totalCount?: number;
|
|
17
|
+
emptyDataRowText?: string;
|
|
18
|
+
rowStyle?: TanStackTableRowStyle | ((row: TanStackTableRow<TData>) => TanStackTableRowStyle | undefined);
|
|
19
|
+
style?: CSSObject | SerializedStyles;
|
|
20
|
+
disableDefaultRowStyle?: boolean;
|
|
21
|
+
enableCellSpanning?: boolean;
|
|
22
|
+
}
|
|
23
|
+
type ReactTableOuterProps<TData extends TanStackRowData> = TanStackTableProps<TData> & TanStackTableHighlightSourceProps<TData>;
|
|
24
|
+
declare const _default: <TData extends TanStackRowData>(props: ReactTableOuterProps<TData>) => ReactElement;
|
|
25
|
+
export default _default;
|
|
26
|
+
//# sourceMappingURL=table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../../src/component/elements/tanstack_table/table.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGlE,OAAO,KAAK,EAGV,YAAY,EAGb,MAAM,OAAO,CAAC;AAoBf,OAAO,KAAK,EACV,eAAe,EACf,uBAAuB,EACvB,mBAAmB,EACnB,6BAA6B,EAC7B,iCAAiC,EACjC,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EAEvB,MAAM,YAAY,CAAC;AAEpB,UAAU,kBAAkB,CAAC,KAAK,SAAS,eAAe,CACxD,SACE,6BAA6B,CAAC,KAAK,CAAC,EACpC,uBAAuB,CAAC,KAAK,CAAC,EAC9B,sBAAsB,CAAC,KAAK,CAAC;IAC/B,IAAI,EAAE,SAAS,KAAK,EAAE,CAAC;IACvB,OAAO,EAAE,aAAa,CAAC,mBAAmB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;IACxD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,KAAK,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,CAAC,KAAK,CAAC,KAAK,OAAO,CAAC;IACvD,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EACL,qBAAqB,GACrB,CAAC,CAAC,GAAG,EAAE,gBAAgB,CAAC,KAAK,CAAC,KAAK,qBAAqB,GAAG,SAAS,CAAC,CAAC;IAC1E,KAAK,CAAC,EAAE,SAAS,GAAG,gBAAgB,CAAC;IACrC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AASD,KAAK,oBAAoB,CAAC,KAAK,SAAS,eAAe,IACrD,kBAAkB,CAAC,KAAK,CAAC,GAAG,iCAAiC,CAAC,KAAK,CAAC,CAAC;wBAuYjC,CAAC,KAAK,SAAS,eAAe,EAClE,KAAK,EAAE,oBAAoB,CAAC,KAAK,CAAC,KAC/B,YAAY;AAFjB,wBAEkB"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@emotion/react/jsx-runtime";
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
|
-
import {
|
|
3
|
+
import { useTable } from '@tanstack/react-table';
|
|
4
|
+
import { memo, useEffect, useLayoutEffect, useMemo, useRef, useState, } from 'react';
|
|
4
5
|
import { useResizeObserver } from 'react-d3-utils';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import useRowSpan, { prepareRowSpan } from './utility/useRowSpan.js';
|
|
6
|
+
import { BaseReactTable } from "./elements/base_react_table.js";
|
|
7
|
+
import { EmptyDataRow } from "./elements/empty_data_row.js";
|
|
8
|
+
import { TanStackTableProvider, useTanStackTableContext, } from "./elements/table_context.js";
|
|
9
|
+
import TableHeader from "./elements/table_header.js";
|
|
10
|
+
import TableRow from "./elements/table_row.js";
|
|
11
|
+
import { tanStackTableFeatures } from "./features.js";
|
|
12
12
|
const styles = {
|
|
13
13
|
table: (enableVirtualScroll, enableColumnsVirtualScroll) => {
|
|
14
14
|
const style = { tableLayout: 'auto' };
|
|
@@ -34,11 +34,10 @@ const counterStyle = {
|
|
|
34
34
|
color: 'white',
|
|
35
35
|
fontSize: '1.4em',
|
|
36
36
|
};
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const { data, columns, highlightedSource, getHighlightExtra, contextMenu = [], onContextMenuSelect, onScroll, approxItemHeight = 40, enableVirtualScroll = false, enableColumnsVirtualScroll = false, approxColumnWidth = 40, groupKey, onClick, activeRow, totalCount, indexKey = 'index', onSortEnd, rowStyle, disableDefaultRowStyle = false, enableDefaultActiveRow = false, emptyDataRowText = 'No Data', } = props;
|
|
37
|
+
function TanStackTableInner(props) {
|
|
38
|
+
const { data, columns, highlightedSource, getHighlightExtra, contextMenu = [], onContextMenuSelect, onScroll, approxItemHeight = 40, enableVirtualScroll = false, enableColumnsVirtualScroll = false, approxColumnWidth = 40, onClick, activeRow, totalCount, indexKey = 'index', onSortEnd, rowStyle, disableDefaultRowStyle = false, enableDefaultActiveRow = false, emptyDataRowText = 'No Data', containerRef, enableCellSpanning, } = props;
|
|
40
39
|
const isSortedEventTriggered = useRef(false);
|
|
41
|
-
const virtualBoundary =
|
|
40
|
+
const virtualBoundary = useTanStackTableContext();
|
|
42
41
|
const [rowIndex, setRowIndex] = useState();
|
|
43
42
|
const timeoutIdRef = useRef();
|
|
44
43
|
const [isCounterVisible, setCounterVisibility] = useState(false);
|
|
@@ -50,13 +49,14 @@ function TableInner(props, ref) {
|
|
|
50
49
|
? columns.slice(virtualBoundary.columns.start, end)
|
|
51
50
|
: columns;
|
|
52
51
|
}, [enableColumnsVirtualScroll, virtualBoundary.columns, columns]);
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
columns: memoColumns,
|
|
52
|
+
const table = useTable({
|
|
53
|
+
features: tanStackTableFeatures,
|
|
56
54
|
data,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
55
|
+
columns: memoColumns,
|
|
56
|
+
enableCellSpanning,
|
|
57
|
+
});
|
|
58
|
+
const sortBy = table.state.sorting;
|
|
59
|
+
const rows = table.getRowModel().rows;
|
|
60
60
|
function clickHandler(event, row) {
|
|
61
61
|
setRowIndex(row.index);
|
|
62
62
|
onClick?.(event, row);
|
|
@@ -92,9 +92,9 @@ function TableInner(props, ref) {
|
|
|
92
92
|
: rows;
|
|
93
93
|
const lastRow = rowsData.at(-1);
|
|
94
94
|
const index = lastRow?.original?.[indexKey] || lastRow?.index;
|
|
95
|
-
const total = totalCount
|
|
96
|
-
const startColumn = columns[virtualBoundary.columns.start]?.
|
|
97
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { ref:
|
|
95
|
+
const total = totalCount || data.length;
|
|
96
|
+
const startColumn = columns[virtualBoundary.columns.start]?.header;
|
|
97
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { ref: containerRef, className: "table-container", style: {
|
|
98
98
|
overflowY: 'auto',
|
|
99
99
|
...(enableColumnsVirtualScroll && { overflowX: 'auto' }),
|
|
100
100
|
position: 'relative',
|
|
@@ -108,26 +108,19 @@ function TableInner(props, ref) {
|
|
|
108
108
|
? approxColumnWidth * (columns.length + 1)
|
|
109
109
|
: '100%',
|
|
110
110
|
pointerEvents: 'none',
|
|
111
|
-
} }), _jsxs(BaseReactTable, {
|
|
111
|
+
} }), _jsxs(BaseReactTable, { style: styles.table(enableVirtualScroll, enableColumnsVirtualScroll), children: [_jsx(TableHeader, { headerGroups: table.getHeaderGroups(), table: table, onClick: headerClickHandler }), _jsxs("tbody", { children: [!data ||
|
|
112
112
|
(data?.length === 0 && (_jsx(EmptyDataRow, { numColumns: columns.length, text: emptyDataRowText }))), rowsData.map((row, index) => {
|
|
113
|
-
prepareRow(row);
|
|
114
|
-
prepareRowSpan(rows, enableVirtualScroll
|
|
115
|
-
? index + virtualBoundary.rows.start
|
|
116
|
-
: index, rowSpanHeaders, groupKey);
|
|
117
|
-
const { key, ...restRowProps } = row.getRowProps();
|
|
118
113
|
const highlightSourceProps = {
|
|
119
114
|
highlightedSource,
|
|
120
115
|
getHighlightExtra,
|
|
121
116
|
};
|
|
122
|
-
return (_jsx(
|
|
117
|
+
return (_jsx(TableRow, { row: row, table: table, contextMenu: contextMenu, onContextMenuSelect: onContextMenuSelect, onClick: !activeRow && enableDefaultActiveRow
|
|
123
118
|
? clickHandler
|
|
124
119
|
: onClick, isRowActive: !activeRow
|
|
125
120
|
? enableDefaultActiveRow
|
|
126
121
|
? rowIndex === index
|
|
127
122
|
: false
|
|
128
|
-
: activeRow(row), rowStyle: typeof rowStyle === 'function'
|
|
129
|
-
? rowStyle(row)
|
|
130
|
-
: rowStyle, disableDefaultRowStyle: disableDefaultRowStyle, ...highlightSourceProps }, key));
|
|
123
|
+
: activeRow(row), rowStyle: typeof rowStyle === 'function' ? rowStyle(row) : rowStyle, disableDefaultRowStyle: disableDefaultRowStyle, ...highlightSourceProps }, row.id));
|
|
131
124
|
})] })] })] }), (enableVirtualScroll || enableColumnsVirtualScroll) && (_jsxs("p", { style: {
|
|
132
125
|
...counterStyle,
|
|
133
126
|
...(enableColumnsVirtualScroll && { bottom: '15px' }),
|
|
@@ -136,7 +129,7 @@ function TableInner(props, ref) {
|
|
|
136
129
|
visibility: !isCounterVisible ? 'hidden' : 'visible',
|
|
137
130
|
}, children: [enableColumnsVirtualScroll && typeof startColumn === 'string' && (_jsxs("span", { style: { left: 0 }, children: [`Column ${startColumn}`, " "] })), typeof index === 'number' ? index + 1 : total, " / ", total] }))] }));
|
|
138
131
|
}
|
|
139
|
-
function
|
|
132
|
+
function TanStackTable(props) {
|
|
140
133
|
const { data, approxItemHeight = 40, approxColumnWidth = 40, groupKey, onSortEnd, columns, style = {}, } = props;
|
|
141
134
|
const containerRef = useRef(null);
|
|
142
135
|
const visibleRowsCountRef = useRef(0);
|
|
@@ -217,7 +210,6 @@ function ReactTable(props) {
|
|
|
217
210
|
function findEndIndex(index, numberOfVisibleRows) {
|
|
218
211
|
const newIndex = index + numberOfVisibleRows;
|
|
219
212
|
const currentIndx = newIndex >= data.length ? data.length - 1 : newIndex;
|
|
220
|
-
// return currentIndx;
|
|
221
213
|
// Look for the last index of the group
|
|
222
214
|
return lookForGroupIndex(currentIndx, 1);
|
|
223
215
|
}
|
|
@@ -236,10 +228,10 @@ function ReactTable(props) {
|
|
|
236
228
|
});
|
|
237
229
|
}
|
|
238
230
|
}
|
|
239
|
-
return (_jsx(
|
|
231
|
+
return (_jsx(TanStackTableProvider, { value: tableVirtualBoundary, children: _jsx("div", { ref: mRef, css: css({
|
|
240
232
|
position: 'relative',
|
|
241
233
|
height: '100%',
|
|
242
|
-
}, style), children: _jsx(
|
|
234
|
+
}, style), children: _jsx(TanStackTableInner, { onScroll: scrollHandler, onSortEnd: onSortEnd, containerRef: containerRef, ...props }) }) }));
|
|
243
235
|
}
|
|
244
|
-
export default memo(
|
|
245
|
-
//# sourceMappingURL=
|
|
236
|
+
export default memo(TanStackTable);
|
|
237
|
+
//# sourceMappingURL=table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.js","sourceRoot":"","sources":["../../../../src/component/elements/tanstack_table/table.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAQjD,OAAO,EACL,IAAI,EACJ,SAAS,EACT,eAAe,EACf,OAAO,EACP,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAiC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA+B,CAAC;AAC7D,OAAO,EACL,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,6BAA6B,CAAC;AACrC,OAAO,WAAW,MAAM,4BAA6B,CAAC;AACtD,OAAO,QAAQ,MAAM,y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AC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,CACL,KAAC,qBAAqB,IAAC,KAAK,EAAE,oBAAoB,YAChD,cACE,GAAG,EAAE,IAAI,EACT,GAAG,EAAE,GAAG,CACN;gBACE,QAAQ,EAAE,UAAU;gBACpB,MAAM,EAAE,MAAM;aACf,EACD,KAAK,CACN,YAED,KAAC,kBAAkB,IACjB,QAAQ,EAAE,aAAa,EACvB,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,YAAY,KACtB,KAAK,GACT,GACE,GACgB,CACzB,CAAC;AACJ,CAAC;AAED,eAAe,IAAI,CAAC,aAAa,CAEhB,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { CellData, ColumnDef, Header, HeaderGroup, ReactTable, Row, RowData } from '@tanstack/react-table';
|
|
2
|
+
import type { CSSProperties, MouseEvent } from 'react';
|
|
3
|
+
import type { HighlightEventSourceExtra, HighlightEventSourceType } from '../../highlight/index.tsx';
|
|
4
|
+
import type { BaseContextMenuProps } from '../ContextMenuBluePrint.tsx';
|
|
5
|
+
import type { TanStackTableFeatures } from './features.ts';
|
|
6
|
+
type TanStackCellData = CellData;
|
|
7
|
+
export type TanStackRowData = RowData;
|
|
8
|
+
export type TanStackReactTable<TData extends TanStackRowData> = ReactTable<TanStackTableFeatures, TData>;
|
|
9
|
+
export type TanStackTableRow<TData extends TanStackRowData> = Row<TanStackTableFeatures, TData>;
|
|
10
|
+
export type TanStackTableColumn<TData extends TanStackRowData, TValue extends TanStackCellData = TanStackCellData> = ColumnDef<TanStackTableFeatures, TData, TValue>;
|
|
11
|
+
export type TanStackTableHeader<TData extends TanStackRowData, TValue extends TanStackCellData = TanStackCellData> = Header<TanStackTableFeatures, TData, TValue>;
|
|
12
|
+
export type TanStackTableHeaderGroup<TData extends TanStackRowData> = HeaderGroup<TanStackTableFeatures, TData>;
|
|
13
|
+
export type TanStackTableHighlightSourceProps<TData extends TanStackRowData> = {
|
|
14
|
+
[K in HighlightEventSourceType]: HighlightEventSourceExtra<K> extends never ? {
|
|
15
|
+
highlightedSource?: K;
|
|
16
|
+
getHighlightExtra?: never;
|
|
17
|
+
} : {
|
|
18
|
+
highlightedSource: K;
|
|
19
|
+
getHighlightExtra: (row: TData) => HighlightEventSourceExtra<K>;
|
|
20
|
+
};
|
|
21
|
+
}[HighlightEventSourceType];
|
|
22
|
+
export interface TanStackTableRowStyle {
|
|
23
|
+
active?: CSSProperties;
|
|
24
|
+
activated?: CSSProperties;
|
|
25
|
+
hover?: CSSProperties;
|
|
26
|
+
base?: CSSProperties;
|
|
27
|
+
}
|
|
28
|
+
export interface TanStackTableContextMenuProps<TData extends TanStackRowData> {
|
|
29
|
+
contextMenu?: BaseContextMenuProps['options'];
|
|
30
|
+
onContextMenuSelect?: (selected: Parameters<BaseContextMenuProps['onSelect']>[0], data: TData) => void;
|
|
31
|
+
}
|
|
32
|
+
export interface TanStackTableClickEvent<TData extends TanStackRowData> {
|
|
33
|
+
onClick?: (event: MouseEvent, row: TanStackTableRow<TData>) => void;
|
|
34
|
+
}
|
|
35
|
+
export interface TanStackTableSortEvent<TData extends TanStackRowData> {
|
|
36
|
+
onSortEnd?: (data: TData[], isTableSorted?: boolean) => void;
|
|
37
|
+
}
|
|
38
|
+
interface VirtualBoundary {
|
|
39
|
+
start: number;
|
|
40
|
+
end: number;
|
|
41
|
+
}
|
|
42
|
+
export interface TanStackTableVirtualBoundary {
|
|
43
|
+
rows: VirtualBoundary;
|
|
44
|
+
columns: VirtualBoundary;
|
|
45
|
+
}
|
|
46
|
+
export {};
|
|
47
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/component/elements/tanstack_table/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,WAAW,EACX,UAAU,EACV,GAAG,EACH,OAAO,EACR,MAAM,uBAAu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AiB,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,yBAAyB,CAAC,CAAC,CAAC,CAAC;KACjE;CACN,CAAC,wBAAwB,CAAC,CAAC;AAE5B,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAED,MAAM,WAAW,6BAA6B,CAAC,KAAK,SAAS,eAAe;IAC1E,WAAW,CAAC,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;IAC9C,mBAAmB,CAAC,EAAE,CACpB,QAAQ,EAAE,UAAU,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,EACzD,IAAI,EAAE,KAAK,KACR,IAAI,CAAC;CACX;AAED,MAAM,WAAW,uBAAuB,CAAC,KAAK,SAAS,eAAe;IACpE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,gBAAgB,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;CACrE;AAED,MAAM,WAAW,sBAAsB,CAAC,KAAK,SAAS,eAAe;IACnE,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,aAAa,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CAC9D;AAED,UAAU,eAAe;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,eAAe,CAAC;IACtB,OAAO,EAAE,eAAe,CAAC;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/component/elements/tanstack_table/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transferStyles.d.ts","sourceRoot":"","sources":["../../../../src/component/elements/utilities/transferStyles.ts"],"names":[],"mappings":"AAmBA,wBAAgB,wBAAwB,CAAC,cAAc,EAAE,QAAQ,QAYhE"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
function getCssTextFromStyleSheet(styleSheet) {
|
|
2
|
+
try {
|
|
3
|
+
if (!styleSheet.cssRules)
|
|
4
|
+
return undefined;
|
|
5
|
+
return Array.from(styleSheet.cssRules)
|
|
6
|
+
.map((rule) => rule.cssText)
|
|
7
|
+
.join('\n');
|
|
8
|
+
}
|
|
9
|
+
catch (error) {
|
|
10
|
+
if (error instanceof DOMException &&
|
|
11
|
+
(error.name === 'SecurityError' || error.name === 'NotAllowedError')) {
|
|
12
|
+
return undefined;
|
|
13
|
+
}
|
|
14
|
+
throw error;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export function transferStylesToDocument(targetDocument) {
|
|
18
|
+
const styleSheets = Array.from(document.styleSheets);
|
|
19
|
+
const targetHead = targetDocument.head;
|
|
20
|
+
for (const styleSheet of styleSheets) {
|
|
21
|
+
const cssText = getCssTextFromStyleSheet(styleSheet);
|
|
22
|
+
if (!cssText)
|
|
23
|
+
continue;
|
|
24
|
+
const newStyleEl = document.createElement('style');
|
|
25
|
+
newStyleEl.append(document.createTextNode(cssText));
|
|
26
|
+
targetHead.append(newStyleEl);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=transferStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transferStyles.js","sourceRoot":"","sources":["../../../../src/component/elements/utilities/transferStyles.ts"],"names":[],"mappings":"AAAA,SAAS,wBAAwB,CAC/B,UAA2C;IAE3C,IAAI,CAAC;QACH,IAAI,CAAC,UAAU,CAAC,QAAQ;YAAE,OAAO,SAAS,CAAC;QAC3C,OAAO,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;aACnC,GAAG,CAAC,CAAC,IAAI,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ACa,EAEhB,KAAC,IAAI,CAAC,QAAQ,IAAC,IAAI,EAAC,aAAa,YAC9B,CAAC,KAAK,EAAE,EAAE,CAAC,CACV,KAAC,SAAS,IAAC,KAAK,EAAC,QAAQ,EAAC,MAAM,kBAC9B,KAAC,YAAY,IACX,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE,EAC9B,MAAM,EAAE,KAAK,CAAC,UAAU,EACxB,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EACxB,GAAG,EAAE,CAAC,EACN,QAAQ,EAAE,IAAI,EACd,aAAa,EAAE,IAAI,EACnB,aAAa,EAAE,IAAI,EACnB,aAAa,EAAE,CAAC,CAAC,EAAE,aAAa,EAAE,EAAE;4BAClC,KAAK,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;wBACpC,CAAC,GACD,GACQ,CACb,GACa,EAEhB,wBACE,MAAC,IAAI,CAAC,YAAY,IAChB,YAAY,EACV,CAAC,iBAAiB;wBAChB,CAAC,CAAC;4BACE,MAAM,EAAE,QAAQ;4BAChB,OAAO,EAAE,CACP,KAAC,kBAAkB,IACjB,KAAK,EAAC,mBAAmB,EACzB,WAAW,EAAC,0DAA0D,GACtE,CACH;yBACF;wBACH,CAAC,CAAC,SAAS,EAEf,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,0BAEtC,aAAa,EAAE,MAAM,gBACb,GAChB,IACW,CACpB,CAAC;AACJ,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { xyReduce } from 'ml-spectra-processing';
|
|
2
|
+
import { SVGPathBuilder } from 'react-science/ui';
|
|
2
3
|
import { getIntegralYScale } from '../1d/utilities/scale.js';
|
|
3
4
|
import { useChartData } from '../context/ChartContext.js';
|
|
4
5
|
import { useScaleChecked } from '../context/ScaleContext.js';
|
|
5
|
-
import { PathBuilder } from '../utility/PathBuilder.js';
|
|
6
6
|
import { useXScale } from './useXScale.js';
|
|
7
7
|
function useIntegralYDomain(max, scaleRatio = 1) {
|
|
8
8
|
const { height, margin } = useChartData();
|
|
@@ -25,7 +25,7 @@ export default function useIntegralPath(options) {
|
|
|
25
25
|
from,
|
|
26
26
|
to,
|
|
27
27
|
});
|
|
28
|
-
const pathBuilder = new
|
|
28
|
+
const pathBuilder = new SVGPathBuilder();
|
|
29
29
|
pathBuilder.moveTo(scaleX(xySeries.x[0]), scaleY(xySeries.y[0]));
|
|
30
30
|
for (let i = 1; i < xySeries.x.length; i++) {
|
|
31
31
|
pathBuilder.lineTo(scaleX(xySeries.x[i]), scaleY(xySeries.y[i]));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIntegralPath.js","sourceRoot":"","sources":["../../../src/component/hooks/useIntegralPath.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"useIntegralPath.js","sourceRoot":"","sources":["../../../src/component/hooks/useIntegralPath.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,SAAS,kBAAkB,CACzB,GAAW,EACX,UAAU,GAAG,CAAC;IAEd,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,YAAY,EAAE,CAAC;IAC1C,MAAM,EAAE,mBAAmB,EAAE,GAAG,eAAe,EAAE,CAAC;IAClD,OAAO,iBAAiB,CAAC;QACvB,MAAM;QACN,MAAM;QACN,OAAO,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC;QACjB,UAAU;QACV,mBAAmB;KACpB,CAAC,CAAC;AACL,CAAC;AAWD,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,OAA+B;IACrE,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC;IAEpD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,MAAM,GAAG,kBAAkB,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;IAEnD,MAAM,QAAQ,GAAG,QAAQ,CACvB,EAAE,CAAC,EAAE,CAAC,EAAE,EACR;QACE,QAAQ,EAAE,GAAG;QACb,QAAQ,EAAE,IAAI;QACd,IAAI;QACJ,EAAE;KACH,CACF,CAAC;IAEF,MAAM,WAAW,GAAG,IAAI,cAAc,EAAE,CAAC;IACzC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACjE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3C,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACnE,CAAC;IAED,OAAO,WAAW,CAAC,QAAQ,EAAE,CAAC;AAChC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImportPublicationStringModal.d.ts","sourceRoot":"","sources":["../../../src/component/modal/ImportPublicationStringModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ImportPublicationStringModal.d.ts","sourceRoot":"","sources":["../../../src/component/modal/ImportPublicationStringModal.tsx"],"names":[],"mappings":"AAmBA,UAAU,sCAAsC;IAC9C,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,UAAU,iCAAkC,SAAQ,sCAAsC;IACxF,MAAM,EAAE,OAAO,CAAC;CACjB;AAuDD,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,iCAAiC,2CAMzC"}
|
|
@@ -1,45 +1,63 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { DialogFooter } from '@blueprintjs/core';
|
|
3
|
+
import styled from '@emotion/styled';
|
|
4
|
+
import { revalidateLogic } from '@tanstack/react-form';
|
|
3
5
|
import { FifoLogger } from 'fifo-logger';
|
|
4
6
|
import debounce from 'lodash/debounce.js';
|
|
5
7
|
import { resurrect } from 'nmr-processing';
|
|
6
|
-
import { useEffect, useMemo, useRef
|
|
7
|
-
import {
|
|
8
|
+
import { useEffect, useMemo, useRef } from 'react';
|
|
9
|
+
import { AppForm, createTableColumnHelper, useForm } from 'react-science/ui';
|
|
10
|
+
import { z } from 'zod';
|
|
8
11
|
import { useDispatch } from '../context/DispatchContext.js';
|
|
9
12
|
import { useToaster } from '../context/ToasterContext.js';
|
|
10
|
-
import { GroupPane } from '../elements/GroupPane.js';
|
|
11
|
-
import ReactTable from '../elements/ReactTable/ReactTable.js';
|
|
12
13
|
import { StandardDialog } from "../elements/StandardDialog.js";
|
|
13
14
|
import { StyledDialogBody } from '../elements/StyledDialogBody.js';
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
15
|
+
import { TableSettings } from "./setting/tanstack_general_settings/ui/table.js";
|
|
16
|
+
import { TableSection } from "./setting/tanstack_general_settings/ui/table_section.js";
|
|
17
|
+
const Dialog = styled(StandardDialog) `
|
|
18
|
+
width: 800px;
|
|
19
|
+
`;
|
|
20
|
+
const Tr = styled.tr `
|
|
21
|
+
background-color: ${({ level }) => (level > 40 ? 'pink' : level === 40 ? 'lightyellow' : 'lightgreen')};
|
|
22
|
+
|
|
23
|
+
&:hover {
|
|
24
|
+
background-color: #ff6f0091 !important;
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
27
|
+
const TableWrapper = styled.div `
|
|
28
|
+
max-height: 120px;
|
|
29
|
+
overflow-y: auto;
|
|
30
|
+
`;
|
|
31
|
+
const logSchema = z.custom();
|
|
32
|
+
const formSchema = z.object({
|
|
33
|
+
publicationText: z.string().trim().min(1),
|
|
34
|
+
logs: z.array(logSchema),
|
|
35
|
+
});
|
|
25
36
|
const INITIAL_VALUES = {
|
|
37
|
+
logs: [],
|
|
26
38
|
publicationText: '1H NMR (CDCl3, 400MHz) δ 1 (s, 1H), 2 (d, 1H, J=7), 3 (t, 1H, J=7), 4 (q, 1H, J=7), 5 (quint, 1H, J=7), 6 (hex, 1H, J=7), 7 (hept, 1H, J=7), 8 (dd, 1H, J=7, J=4)',
|
|
27
39
|
};
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
const logHelper = createTableColumnHelper();
|
|
41
|
+
const logColumns = [
|
|
42
|
+
logHelper.accessor('id', {
|
|
43
|
+
header: '#',
|
|
44
|
+
meta: {
|
|
45
|
+
thStyle: {
|
|
46
|
+
width: '40px',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
}),
|
|
50
|
+
logHelper.accessor('levelLabel', {
|
|
51
|
+
header: 'Label',
|
|
52
|
+
meta: {
|
|
53
|
+
tdStyle: {
|
|
54
|
+
width: '60px',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
}),
|
|
58
|
+
logHelper.accessor('message', {
|
|
59
|
+
header: 'Message',
|
|
60
|
+
}),
|
|
43
61
|
];
|
|
44
62
|
export function ImportPublicationStringModal(props) {
|
|
45
63
|
const { onClose, isOpen } = props;
|
|
@@ -51,59 +69,59 @@ function InnerImportPublicationStringModal(props) {
|
|
|
51
69
|
const { onClose } = props;
|
|
52
70
|
const dispatch = useDispatch();
|
|
53
71
|
const toaster = useToaster();
|
|
54
|
-
const [logs, setLogs] = useState([]);
|
|
55
72
|
const loggerRef = useRef(new FifoLogger());
|
|
56
|
-
const
|
|
73
|
+
const form = useForm({
|
|
74
|
+
defaultValues: INITIAL_VALUES,
|
|
75
|
+
validationLogic: revalidateLogic({ mode: 'change' }),
|
|
76
|
+
validators: {
|
|
77
|
+
onDynamic: formSchema,
|
|
78
|
+
},
|
|
79
|
+
onSubmit: ({ value }) => {
|
|
80
|
+
const { publicationText } = formSchema.parse(value);
|
|
81
|
+
const hideLoading = toaster.showLoading({
|
|
82
|
+
message: 'Generate spectrum from publication string in progress',
|
|
83
|
+
});
|
|
84
|
+
const { ranges, info: { nucleus, solvent = '', frequency }, parts, } = resurrect(publicationText, { logger: loggerRef.current });
|
|
85
|
+
dispatch({
|
|
86
|
+
type: 'GENERATE_SPECTRUM_FROM_PUBLICATION_STRING',
|
|
87
|
+
payload: {
|
|
88
|
+
ranges,
|
|
89
|
+
info: { nucleus, solvent, frequency, name: parts[0] },
|
|
90
|
+
},
|
|
91
|
+
});
|
|
92
|
+
hideLoading();
|
|
93
|
+
onClose();
|
|
94
|
+
},
|
|
95
|
+
});
|
|
57
96
|
useEffect(() => {
|
|
58
97
|
function handleLogs({ detail: { logs } }) {
|
|
59
|
-
|
|
98
|
+
form.setFieldValue('logs', logs.slice());
|
|
60
99
|
}
|
|
61
100
|
const loggerInstance = loggerRef.current;
|
|
62
101
|
loggerInstance.addEventListener('change', handleLogs);
|
|
63
102
|
return () => {
|
|
64
103
|
loggerInstance.removeEventListener('change', handleLogs);
|
|
65
104
|
};
|
|
66
|
-
}, []);
|
|
105
|
+
}, [form]);
|
|
67
106
|
const debounceChanges = useMemo(() => debounce((value) => {
|
|
68
107
|
resurrect(value, { logger: loggerRef.current });
|
|
69
108
|
}, 250), []);
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
})();
|
|
88
|
-
}
|
|
89
|
-
function handleOnChange(value) {
|
|
90
|
-
loggerRef.current.clear();
|
|
91
|
-
if (!value) {
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
debounceChanges(value);
|
|
95
|
-
}
|
|
96
|
-
const isNotValid = logs.some((log) => ['error', 'fatal'].includes(log.levelLabel));
|
|
97
|
-
return (_jsxs(StandardDialog, { title: "Generate spectrum from publication string", isOpen: true, onClose: onClose, style: { width: 800, height: 500 }, children: [_jsx(StyledDialogBody, { children: _jsxs("div", { style: {
|
|
98
|
-
display: 'flex',
|
|
99
|
-
flexDirection: 'column',
|
|
100
|
-
height: '100%',
|
|
101
|
-
}, children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'column', flex: 1 }, children: [_jsxs("p", { children: ["Paste a publication string in the text area below and click on the button ", _jsx("i", { children: "Generate spectrum" })] }), _jsx(Controller, { control: control, name: "publicationText", rules: { required: true }, render: ({ field, fieldState: { invalid } }) => {
|
|
102
|
-
const { onChange, ...otherFieldProps } = field;
|
|
103
|
-
return (_jsx(TextArea, { ...otherFieldProps, placeholder: "Enter publication string", onChange: (event) => {
|
|
104
|
-
onChange(event);
|
|
105
|
-
handleOnChange(event.target.value);
|
|
106
|
-
}, intent: invalid ? 'danger' : 'none', style: { flex: 1, width: '100%', resize: 'none' } }));
|
|
107
|
-
} })] }), _jsx(GroupPane, { text: "Logs", children: _jsx(ReactTable, { columns: COLUMNS, data: logs, emptyDataRowText: "No Logs", rowStyle: handleRowStyle, style: { height: '120px' } }) })] }) }), _jsx(DialogFooter, { children: _jsx("div", { style: { display: 'flex', flexDirection: 'row-reverse' }, children: _jsx(Button, { onClick: () => handleSubmit(publicationStringHandler)(), disabled: isNotValid || !isValid, intent: "success", children: "Generate spectrum" }) }) })] }));
|
|
109
|
+
return (_jsx(Dialog, { title: "Generate spectrum from publication string", isOpen: true, onClose: onClose, children: _jsxs(AppForm, { form: form, children: [_jsxs(StyledDialogBody, { children: [_jsxs("p", { children: ["Paste a publication string in the text area below and click on the button ", _jsx("i", { children: "Generate spectrum" })] }), _jsx(form.AppField, { name: "publicationText", listeners: {
|
|
110
|
+
onChange: ({ value }) => {
|
|
111
|
+
debounceChanges(value);
|
|
112
|
+
},
|
|
113
|
+
}, children: (field) => (_jsx(field.TextArea, { label: "Publication text", placeholder: "Enter publication string", fill: true })) }), _jsx(form.AppField, { name: "logs", children: (field) => (_jsx(TableSection, { title: "Logs", children: _jsx(TableWrapper, { children: _jsx(TableSettings, { data: field.state.value, columns: logColumns, getRowId: getRowId, emptyContent: "No Logs", tdStyle: {
|
|
114
|
+
padding: '0.15rem 0.4rem',
|
|
115
|
+
}, renderRowTr: (trProps, row) => {
|
|
116
|
+
const level = row.original.level;
|
|
117
|
+
return _jsx(Tr, { level: level, ...trProps });
|
|
118
|
+
} }) }) })) })] }), _jsx(DialogFooter, { actions: _jsx(form.Subscribe, { selector: (store) => {
|
|
119
|
+
const { logs } = store.values;
|
|
120
|
+
const isNotValid = logs.some((log) => ['error', 'fatal'].includes(log.levelLabel));
|
|
121
|
+
return isNotValid || !store.isValid;
|
|
122
|
+
}, children: (disabled) => (_jsx(form.SubmitButton, { intent: "success", disabled: disabled, children: "Generate spectrum" })) }) })] }) }));
|
|
123
|
+
}
|
|
124
|
+
function getRowId(row) {
|
|
125
|
+
return String(row.id);
|
|
108
126
|
}
|
|
109
127
|
//# sourceMappingURL=ImportPublicationStringModal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImportPublicationStringModal.js","sourceRoot":"","sources":["../../../src/component/modal/ImportPublicationStringModal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ImportPublicationStringModal.js","sourceRoot":"","sources":["../../../src/component/modal/ImportPublicationStringModal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,QAAQ,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,uBAAuB,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,+BAAgC,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EAAE,aAAa,EAAE,MAAM,iDAAkD,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,yDAA0D,CAAC;AAUxF,MAAM,MAAM,GAAG,MAAM,CAAC,cAAc,CAAC,CAAA;;CAEpC,CAAC;AAEF,MAAM,EAAE,GAAG,MAAM,CAAC,EAAE,CAAmB;sBACjB,CAAC,EAAE,KAAK,EAAE,EAAE,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