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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SVGAttributes } from 'react';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
|
-
import type {
|
|
3
|
+
import type { UseLinearPrimaryTicksResult } from 'react-d3-utils';
|
|
4
4
|
import type {
|
|
5
5
|
SVGStyledLineProps,
|
|
6
6
|
SVGStyledLineUserConfig,
|
|
@@ -49,6 +49,16 @@ function isVerticalAxis(axisPosition: AxisPosition) {
|
|
|
49
49
|
return ['left', 'right'].includes(axisPosition);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
function getSecondaryTickPositions(ticks: Array<{ position: number }>) {
|
|
53
|
+
return ticks
|
|
54
|
+
.slice(0, -1)
|
|
55
|
+
.map((tick, index) => (tick.position + ticks[index + 1].position) / 2);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function getTickTransform(position: number, isVertical: boolean) {
|
|
59
|
+
return `translate(${isVertical ? `0,${position}` : `${position},0`})`;
|
|
60
|
+
}
|
|
61
|
+
|
|
52
62
|
function BaseLine(props: BaseLineProps) {
|
|
53
63
|
const { axisPosition, tickLength = 6, scale } = props;
|
|
54
64
|
const { primaryTicks } = useTicksConfig();
|
|
@@ -100,86 +110,58 @@ function Tickets(props: TicketsProps) {
|
|
|
100
110
|
: { y1: positionSign * tickLength, y2: 0 };
|
|
101
111
|
|
|
102
112
|
const secondaryTickLength = tickLength / 2;
|
|
103
|
-
const secondaryTickOffset = getSecondaryTickOffset(ticks, positionSign);
|
|
104
113
|
const positionSecondaryLineConfig: SVGStyledLineProps = isVertical
|
|
105
114
|
? {
|
|
106
115
|
x1: positionSign * secondaryTickLength,
|
|
107
116
|
x2: 0,
|
|
108
|
-
y1: secondaryTickOffset,
|
|
109
|
-
y2: secondaryTickOffset,
|
|
110
117
|
}
|
|
111
118
|
: {
|
|
112
119
|
y1: positionSign * secondaryTickLength,
|
|
113
120
|
y2: 0,
|
|
114
|
-
x1: secondaryTickOffset,
|
|
115
|
-
x2: secondaryTickOffset,
|
|
116
121
|
};
|
|
117
|
-
const
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
y1: -secondaryTickOffset,
|
|
122
|
-
y2: -secondaryTickOffset,
|
|
123
|
-
}
|
|
124
|
-
: {
|
|
125
|
-
y1: positionSign * secondaryTickLength,
|
|
126
|
-
y2: 0,
|
|
127
|
-
x1: -secondaryTickOffset,
|
|
128
|
-
x2: -secondaryTickOffset,
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
return ticks.map(({ label, position }, index) => {
|
|
132
|
-
const isFirst = index === 0;
|
|
122
|
+
const secondaryTickPositions =
|
|
123
|
+
secondaryTicks.enabled && ticks.length > 1
|
|
124
|
+
? getSecondaryTickPositions(ticks)
|
|
125
|
+
: [];
|
|
133
126
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
127
|
+
return (
|
|
128
|
+
<>
|
|
129
|
+
{ticks.map(({ label, position }) => {
|
|
130
|
+
return (
|
|
131
|
+
<g key={`primary-${label}-${position}`} className="tick">
|
|
132
|
+
<line
|
|
133
|
+
data-testid="axis-primary-tick-line"
|
|
134
|
+
transform={getTickTransform(position, isVertical)}
|
|
135
|
+
{...positionPrimaryLineConfig}
|
|
136
|
+
stroke="black"
|
|
137
|
+
{...primaryTicks.tickStyle}
|
|
138
|
+
/>
|
|
139
|
+
|
|
140
|
+
<SVGStyledText
|
|
141
|
+
transform={getTickTransform(position, isVertical)}
|
|
142
|
+
fill="black"
|
|
143
|
+
data-testid="axis-primary-tick-label"
|
|
144
|
+
{...primaryTicks.textStyle}
|
|
145
|
+
{...positionTextConfig}
|
|
146
|
+
>
|
|
147
|
+
{label}
|
|
148
|
+
</SVGStyledText>
|
|
149
|
+
</g>
|
|
150
|
+
);
|
|
151
|
+
})}
|
|
147
152
|
|
|
153
|
+
{secondaryTickPositions.map((secondaryTickPosition) => (
|
|
148
154
|
<line
|
|
149
|
-
|
|
155
|
+
data-testid="axis-secondary-tick-line"
|
|
156
|
+
key={`secondary-${secondaryTickPosition}`}
|
|
157
|
+
transform={getTickTransform(secondaryTickPosition, isVertical)}
|
|
158
|
+
{...positionSecondaryLineConfig}
|
|
150
159
|
stroke="black"
|
|
151
|
-
{...
|
|
160
|
+
{...secondaryTicks.tickStyle}
|
|
152
161
|
/>
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
{...positionSecondaryLineConfig}
|
|
157
|
-
stroke="black"
|
|
158
|
-
{...secondaryTicks.tickStyle}
|
|
159
|
-
/>
|
|
160
|
-
)}
|
|
161
|
-
|
|
162
|
-
<SVGStyledText
|
|
163
|
-
fill="black"
|
|
164
|
-
{...primaryTicks.textStyle}
|
|
165
|
-
{...positionTextConfig}
|
|
166
|
-
>
|
|
167
|
-
{label}
|
|
168
|
-
</SVGStyledText>
|
|
169
|
-
</g>
|
|
170
|
-
);
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
function getSecondaryTickOffset(ticks: Array<Tick<number>>, direction: -1 | 1) {
|
|
175
|
-
if (ticks.length < 2) return 0;
|
|
176
|
-
|
|
177
|
-
let [first, second] = ticks;
|
|
178
|
-
if (direction === -1) {
|
|
179
|
-
[first, second] = [second, first];
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
return (second.position - first.position) / 2;
|
|
162
|
+
))}
|
|
163
|
+
</>
|
|
164
|
+
);
|
|
183
165
|
}
|
|
184
166
|
|
|
185
167
|
function getLinePosition(
|
|
@@ -3,12 +3,13 @@ import type { ReactNode } from 'react';
|
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import { createPortal } from 'react-dom';
|
|
5
5
|
|
|
6
|
+
import { transferStylesToDocument } from '../utilities/transferStyles.js';
|
|
7
|
+
|
|
6
8
|
import { ExportOptionsModal } from './ExportOptionsModal.js';
|
|
7
9
|
import { ExportSettingsProvider } from './ExportSettingsProvider.js';
|
|
8
10
|
import { RenderDetector } from './RenderDetector.js';
|
|
9
11
|
import { INITIAL_BASIC_EXPORT_OPTIONS } from './utilities/getExportOptions.js';
|
|
10
12
|
import { getSizeInPixel } from './utilities/getSizeInPixel.js';
|
|
11
|
-
import { transferDocumentStyles } from './utilities/transferDocumentStyles.js';
|
|
12
13
|
|
|
13
14
|
export interface BaseExportProps {
|
|
14
15
|
onExportOptionsChange: (options: ExportSettings) => void;
|
|
@@ -112,7 +113,7 @@ function InnerPrintFrame(props: InnerExportFrameProps) {
|
|
|
112
113
|
const document = frame.contentWindow?.document;
|
|
113
114
|
if (!document) return;
|
|
114
115
|
setIframeDocument(document);
|
|
115
|
-
|
|
116
|
+
transferStylesToDocument(document);
|
|
116
117
|
}
|
|
117
118
|
|
|
118
119
|
const exportWidthInPixel = Math.round(width);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { DialogFooter } from '@blueprintjs/core';
|
|
1
|
+
import { Callout, DialogFooter } from '@blueprintjs/core';
|
|
2
|
+
import { revalidateLogic } from '@tanstack/react-form';
|
|
2
3
|
import { useMemo } from 'react';
|
|
3
4
|
import { AppForm, Button, useForm } from 'react-science/ui';
|
|
4
5
|
import { z } from 'zod/v4';
|
|
@@ -52,6 +53,8 @@ function InnerExportOptionsModal(props: InnerExportOptionsModalProps) {
|
|
|
52
53
|
validators: {
|
|
53
54
|
onDynamic: validator,
|
|
54
55
|
},
|
|
56
|
+
// onDynamic validators are ignored by the default validation logic
|
|
57
|
+
validationLogic: revalidateLogic({ mode: 'change' }),
|
|
55
58
|
onSubmit: ({ value: { values } }) => {
|
|
56
59
|
const parsedValues = exportSettingsValidation.parse(values);
|
|
57
60
|
onExportOptionsChange(parsedValues);
|
|
@@ -69,6 +72,34 @@ function InnerExportOptionsModal(props: InnerExportOptionsModalProps) {
|
|
|
69
72
|
>
|
|
70
73
|
<AppForm form={form} layout="inline">
|
|
71
74
|
<StyledDialogBody>
|
|
75
|
+
<form.Subscribe
|
|
76
|
+
selector={(state) =>
|
|
77
|
+
Array.from(
|
|
78
|
+
new Set(
|
|
79
|
+
Object.values(state.errorMap.onDynamic ?? {})
|
|
80
|
+
.flat()
|
|
81
|
+
.map((error) => error?.message)
|
|
82
|
+
.filter((message) => typeof message === 'string'),
|
|
83
|
+
),
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
>
|
|
87
|
+
{(messages) =>
|
|
88
|
+
messages.length > 0 && (
|
|
89
|
+
<Callout
|
|
90
|
+
intent="danger"
|
|
91
|
+
title="Invalid export options"
|
|
92
|
+
style={{ marginBottom: 10 }}
|
|
93
|
+
>
|
|
94
|
+
<ul style={{ margin: 0, paddingInlineStart: '1.2em' }}>
|
|
95
|
+
{messages.map((message) => (
|
|
96
|
+
<li key={message}>{message}</li>
|
|
97
|
+
))}
|
|
98
|
+
</ul>
|
|
99
|
+
</Callout>
|
|
100
|
+
)
|
|
101
|
+
}
|
|
102
|
+
</form.Subscribe>
|
|
72
103
|
<ExportFields form={form} fields="values" />
|
|
73
104
|
</StyledDialogBody>
|
|
74
105
|
<DialogFooter
|
|
@@ -12,6 +12,11 @@ export function useExportConfigurer(options: ExportSettings) {
|
|
|
12
12
|
const refSize = useRef({ width, height, dpi });
|
|
13
13
|
const previousUnit = useDeferredValue(unit);
|
|
14
14
|
|
|
15
|
+
function resetSize(newOptions: ExportSettings) {
|
|
16
|
+
const { width, height, dpi } = getExportOptions(newOptions);
|
|
17
|
+
refSize.current = { width, height, dpi };
|
|
18
|
+
}
|
|
19
|
+
|
|
15
20
|
function changeSize(
|
|
16
21
|
value: number,
|
|
17
22
|
target: 'width' | 'height',
|
|
@@ -65,5 +70,6 @@ export function useExportConfigurer(options: ExportSettings) {
|
|
|
65
70
|
changeUnit,
|
|
66
71
|
changeSize,
|
|
67
72
|
enableAspectRatio,
|
|
73
|
+
resetSize,
|
|
68
74
|
};
|
|
69
75
|
}
|
|
@@ -10,6 +10,7 @@ import { z } from 'zod';
|
|
|
10
10
|
|
|
11
11
|
import { StandardDialog } from '../StandardDialog.tsx';
|
|
12
12
|
import { StyledDialogBody } from '../StyledDialogBody.js';
|
|
13
|
+
import { transferStylesToDocument } from '../utilities/transferStyles.ts';
|
|
13
14
|
|
|
14
15
|
import { PrintProvider } from './PrintProvider.js';
|
|
15
16
|
import { getSizesList, pageSizes } from './pageSize.js';
|
|
@@ -142,16 +143,16 @@ function InnerPrintFrame(props: InnerPrintFrameProps) {
|
|
|
142
143
|
function refHandler(frame: HTMLIFrameElement | null) {
|
|
143
144
|
if (!frame) return;
|
|
144
145
|
|
|
145
|
-
const
|
|
146
|
+
const targetDocument = frame.contentWindow?.document;
|
|
146
147
|
|
|
147
|
-
if (!
|
|
148
|
+
if (!targetDocument) {
|
|
148
149
|
onError?.(new Error('Print document is not available'));
|
|
149
150
|
return;
|
|
150
151
|
}
|
|
151
152
|
|
|
152
|
-
|
|
153
|
-
appendPrintPageStyle(
|
|
154
|
-
setIframeDocument(
|
|
153
|
+
transferStylesToDocument(targetDocument);
|
|
154
|
+
appendPrintPageStyle(targetDocument, { size, layout, margin });
|
|
155
|
+
setIframeDocument(targetDocument);
|
|
155
156
|
}
|
|
156
157
|
|
|
157
158
|
useEffect(() => {
|
|
@@ -250,28 +251,6 @@ function appendPrintPageStyle(document: Document, style: Style = {}) {
|
|
|
250
251
|
document.head.append(styleElement);
|
|
251
252
|
}
|
|
252
253
|
|
|
253
|
-
function transferStyles(targetDocument: Document) {
|
|
254
|
-
// Copy the style from the main page and inject it inside the iframe
|
|
255
|
-
const styleSheets = Array.from(document.styleSheets);
|
|
256
|
-
const targetHead = targetDocument.head;
|
|
257
|
-
|
|
258
|
-
for (const styleSheet of styleSheets) {
|
|
259
|
-
try {
|
|
260
|
-
if (styleSheet.cssRules) {
|
|
261
|
-
const newStyleEl = document.createElement('style');
|
|
262
|
-
const cssRules = Array.from(styleSheet.cssRules);
|
|
263
|
-
const cssText = cssRules.map((rule) => rule.cssText).join('\n');
|
|
264
|
-
|
|
265
|
-
newStyleEl.append(document.createTextNode(cssText));
|
|
266
|
-
targetHead.append(newStyleEl);
|
|
267
|
-
}
|
|
268
|
-
} catch (error) {
|
|
269
|
-
// eslint-disable-next-line no-console
|
|
270
|
-
console.error('Error transferring styles:', error);
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
|
|
275
254
|
interface InnerPrintOptionsModalProps extends BasePrintProps {
|
|
276
255
|
onCloseDialog: () => void;
|
|
277
256
|
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { CSSProperties, MouseEvent, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
import type { TanStackRowData, TanStackTableColumn } from './types.ts';
|
|
4
|
+
|
|
5
|
+
interface CreateActionColumnOptions<TData extends TanStackRowData> {
|
|
6
|
+
onClick: (row: TData, event?: MouseEvent<HTMLButtonElement>) => void;
|
|
7
|
+
icon: ReactNode;
|
|
8
|
+
style?: CSSProperties;
|
|
9
|
+
id?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function createActionColumn<TData extends TanStackRowData>(
|
|
13
|
+
options: CreateActionColumnOptions<TData>,
|
|
14
|
+
): TanStackTableColumn<TData> {
|
|
15
|
+
const { onClick, icon, style = {}, id } = options;
|
|
16
|
+
|
|
17
|
+
return {
|
|
18
|
+
id,
|
|
19
|
+
header: '',
|
|
20
|
+
meta: {
|
|
21
|
+
style: {
|
|
22
|
+
width: '1%',
|
|
23
|
+
maxWidth: '20px',
|
|
24
|
+
minWidth: '20px',
|
|
25
|
+
padding: '0px',
|
|
26
|
+
textAlign: 'center',
|
|
27
|
+
...style,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
cell: ({ row }) => (
|
|
31
|
+
<button
|
|
32
|
+
type="button"
|
|
33
|
+
onClick={(event) => {
|
|
34
|
+
event.preventDefault();
|
|
35
|
+
event.stopPropagation();
|
|
36
|
+
onClick(row.original, event);
|
|
37
|
+
}}
|
|
38
|
+
>
|
|
39
|
+
{icon}
|
|
40
|
+
</button>
|
|
41
|
+
),
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ColumnHelper } from '@tanstack/react-table';
|
|
2
|
+
import { createColumnHelper } from '@tanstack/react-table';
|
|
3
|
+
|
|
4
|
+
import type { TanStackTableFeatures } from './features.ts';
|
|
5
|
+
import type { TanStackRowData } from './types.ts';
|
|
6
|
+
|
|
7
|
+
export function createTanStackColumnHelper<
|
|
8
|
+
TData extends TanStackRowData,
|
|
9
|
+
>(): ColumnHelper<TanStackTableFeatures, TData> {
|
|
10
|
+
return createColumnHelper<TanStackTableFeatures, TData>();
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
|
|
3
|
+
import type { TanStackTableVirtualBoundary } from '../types.ts';
|
|
4
|
+
|
|
5
|
+
const reactContext = createContext<TanStackTableVirtualBoundary | null>(null);
|
|
6
|
+
|
|
7
|
+
export const TanStackTableProvider = reactContext.Provider;
|
|
8
|
+
|
|
9
|
+
export function useTanStackTableContext() {
|
|
10
|
+
const context = useContext(reactContext);
|
|
11
|
+
if (!context) {
|
|
12
|
+
throw new Error('table context was not found');
|
|
13
|
+
}
|
|
14
|
+
return context;
|
|
15
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import type { CSSProperties, MouseEvent } from 'react';
|
|
2
|
+
import { FaSortAmountDown, FaSortAmountUp } from 'react-icons/fa';
|
|
3
|
+
|
|
4
|
+
import type {
|
|
5
|
+
TanStackReactTable,
|
|
6
|
+
TanStackRowData,
|
|
7
|
+
TanStackTableHeader,
|
|
8
|
+
TanStackTableHeaderGroup,
|
|
9
|
+
} from '../types.ts';
|
|
10
|
+
|
|
11
|
+
interface TableCellEvent {
|
|
12
|
+
onClick: (e: MouseEvent<HTMLTableCellElement>) => void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface TableHeaderProps<
|
|
16
|
+
TData extends TanStackRowData,
|
|
17
|
+
> extends TableCellEvent {
|
|
18
|
+
headerGroups: Array<TanStackTableHeaderGroup<TData>>;
|
|
19
|
+
table: TanStackReactTable<TData>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const sortIconStyle: CSSProperties = {
|
|
23
|
+
position: 'absolute',
|
|
24
|
+
top: '50%',
|
|
25
|
+
transform: 'translateY(-50%)',
|
|
26
|
+
left: '2px',
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export default function TableHeader<TData extends TanStackRowData>(
|
|
30
|
+
props: TableHeaderProps<TData>,
|
|
31
|
+
) {
|
|
32
|
+
const { headerGroups, table, onClick } = props;
|
|
33
|
+
return (
|
|
34
|
+
<thead>
|
|
35
|
+
{headerGroups.map((headerGroup) => {
|
|
36
|
+
return (
|
|
37
|
+
<tr key={headerGroup.id}>
|
|
38
|
+
{headerGroup.headers.map((header) => (
|
|
39
|
+
<HeaderCell
|
|
40
|
+
key={header.id}
|
|
41
|
+
header={header}
|
|
42
|
+
table={table}
|
|
43
|
+
onClick={onClick}
|
|
44
|
+
/>
|
|
45
|
+
))}
|
|
46
|
+
</tr>
|
|
47
|
+
);
|
|
48
|
+
})}
|
|
49
|
+
</thead>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
interface HeaderCellProps<
|
|
54
|
+
TData extends TanStackRowData,
|
|
55
|
+
> extends TableCellEvent {
|
|
56
|
+
header: TanStackTableHeader<TData>;
|
|
57
|
+
table: TanStackReactTable<TData>;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function HeaderCell<TData extends TanStackRowData>(
|
|
61
|
+
props: HeaderCellProps<TData>,
|
|
62
|
+
) {
|
|
63
|
+
const { header, table, onClick } = props;
|
|
64
|
+
|
|
65
|
+
const meta = header.column.columnDef.meta;
|
|
66
|
+
const canSort = header.column.getCanSort();
|
|
67
|
+
const toggleSortingHandler = canSort
|
|
68
|
+
? header.column.getToggleSortingHandler()
|
|
69
|
+
: undefined;
|
|
70
|
+
const isSorted = header.column.getIsSorted();
|
|
71
|
+
|
|
72
|
+
function clickHandler(event: MouseEvent<HTMLTableCellElement>) {
|
|
73
|
+
if (toggleSortingHandler) {
|
|
74
|
+
toggleSortingHandler(event);
|
|
75
|
+
onClick(event);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return (
|
|
80
|
+
<th
|
|
81
|
+
colSpan={header.colSpan}
|
|
82
|
+
style={{
|
|
83
|
+
height: '1px',
|
|
84
|
+
cursor: canSort ? 'pointer' : undefined,
|
|
85
|
+
...meta?.style,
|
|
86
|
+
...meta?.thStyle,
|
|
87
|
+
}}
|
|
88
|
+
title={
|
|
89
|
+
canSort
|
|
90
|
+
? header.column.getNextSortingOrder() === 'asc'
|
|
91
|
+
? 'Sort ascending'
|
|
92
|
+
: header.column.getNextSortingOrder() === 'desc'
|
|
93
|
+
? 'Sort descending'
|
|
94
|
+
: 'Clear sort'
|
|
95
|
+
: undefined
|
|
96
|
+
}
|
|
97
|
+
onClick={clickHandler}
|
|
98
|
+
>
|
|
99
|
+
<span style={sortIconStyle}>
|
|
100
|
+
{isSorted ? (
|
|
101
|
+
isSorted === 'desc' ? (
|
|
102
|
+
<FaSortAmountDown />
|
|
103
|
+
) : (
|
|
104
|
+
<FaSortAmountUp />
|
|
105
|
+
)
|
|
106
|
+
) : null}
|
|
107
|
+
</span>
|
|
108
|
+
<table.FlexRender header={header} />
|
|
109
|
+
</th>
|
|
110
|
+
);
|
|
111
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/** @jsxImportSource @emotion/react */
|
|
2
|
-
|
|
3
2
|
import type { CSSObject, SerializedStyles } from '@emotion/react';
|
|
4
3
|
import { css } from '@emotion/react';
|
|
5
4
|
import type { MouseEvent } from 'react';
|
|
@@ -7,16 +6,21 @@ import { useCallback, useEffect, useMemo } from 'react';
|
|
|
7
6
|
|
|
8
7
|
import type { HighlightEventSource } from '../../../highlight/index.js';
|
|
9
8
|
import { useHighlight } from '../../../highlight/index.js';
|
|
9
|
+
import type { BaseContextMenuProps } from '../../ContextMenuBluePrint.js';
|
|
10
10
|
import { ContextMenu } from '../../ContextMenuBluePrint.js';
|
|
11
11
|
import type {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
TanStackReactTable,
|
|
13
|
+
TanStackRowData,
|
|
14
|
+
TanStackTableClickEvent,
|
|
15
|
+
TanStackTableContextMenuProps,
|
|
16
|
+
TanStackTableHighlightSourceProps,
|
|
17
|
+
TanStackTableRow,
|
|
18
|
+
TanStackTableRowStyle,
|
|
19
|
+
} from '../types.ts';
|
|
16
20
|
|
|
17
21
|
function getRowStyle(
|
|
18
22
|
isActive: boolean,
|
|
19
|
-
rowStyle:
|
|
23
|
+
rowStyle: TanStackTableRowStyle = {},
|
|
20
24
|
disableDefaultRowStyle?: boolean,
|
|
21
25
|
): SerializedStyles {
|
|
22
26
|
const { hover = {}, active = {}, base = {}, activated = {} } = rowStyle;
|
|
@@ -40,19 +44,17 @@ function getRowStyle(
|
|
|
40
44
|
]);
|
|
41
45
|
}
|
|
42
46
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
interface ReactTableRowProps extends ClickEvent, TableContextMenuProps {
|
|
48
|
-
row: any;
|
|
47
|
+
interface TableRowProps<TData extends TanStackRowData>
|
|
48
|
+
extends TanStackTableClickEvent<TData>, TanStackTableContextMenuProps<TData> {
|
|
49
|
+
row: TanStackTableRow<TData>;
|
|
50
|
+
table: TanStackReactTable<TData>;
|
|
49
51
|
isRowActive: boolean;
|
|
50
|
-
rowStyle:
|
|
52
|
+
rowStyle: TanStackTableRowStyle | undefined;
|
|
51
53
|
disableDefaultRowStyle?: boolean;
|
|
52
54
|
}
|
|
53
55
|
|
|
54
|
-
type
|
|
55
|
-
|
|
56
|
+
type TableRowPropsWithHighlight<TData extends TanStackRowData> =
|
|
57
|
+
TableRowProps<TData> & TanStackTableHighlightSourceProps<TData>;
|
|
56
58
|
|
|
57
59
|
function getIDs(row: any): string[] {
|
|
58
60
|
const id = row.original.id;
|
|
@@ -66,9 +68,12 @@ function getIDs(row: any): string[] {
|
|
|
66
68
|
return [''];
|
|
67
69
|
}
|
|
68
70
|
|
|
69
|
-
function
|
|
71
|
+
export default function TableRow<TData extends TanStackRowData>(
|
|
72
|
+
props: TableRowPropsWithHighlight<TData>,
|
|
73
|
+
) {
|
|
70
74
|
const {
|
|
71
75
|
row,
|
|
76
|
+
table,
|
|
72
77
|
highlightedSource = 'UNKNOWN',
|
|
73
78
|
getHighlightExtra,
|
|
74
79
|
onContextMenuSelect,
|
|
@@ -103,54 +108,50 @@ function ReactTableRow(props: ReactTableRowPropsWithHighlight) {
|
|
|
103
108
|
[onClick, row],
|
|
104
109
|
);
|
|
105
110
|
|
|
106
|
-
const { key: rowKey, ...otherKeyProps } = row.getRowProps();
|
|
107
111
|
return (
|
|
108
112
|
<ContextMenu
|
|
109
113
|
data={row.original}
|
|
110
114
|
options={contextMenu}
|
|
111
|
-
onSelect={(selected) =>
|
|
115
|
+
onSelect={(selected: Parameters<BaseContextMenuProps['onSelect']>[0]) =>
|
|
116
|
+
onContextMenuSelect?.(selected, row.original)
|
|
117
|
+
}
|
|
112
118
|
as="tr"
|
|
113
119
|
style={{ position: 'static' }}
|
|
114
|
-
key={rowKey}
|
|
115
120
|
css={getRowStyle(
|
|
116
121
|
highlight.isActive || isRowActive,
|
|
117
122
|
rowStyle,
|
|
118
123
|
disableDefaultRowStyle,
|
|
119
124
|
)}
|
|
120
|
-
{...otherKeyProps}
|
|
121
125
|
{...highlight.onHover}
|
|
122
126
|
>
|
|
123
|
-
{row.
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}
|
|
127
|
+
{row.getAllCells().map((cell) => {
|
|
128
|
+
const rowSpan = cell.getRowSpan();
|
|
129
|
+
const colSpan = cell.getColSpan();
|
|
130
|
+
// When span is 0, it means that the cell is covered by another one,
|
|
131
|
+
// so it should not be rendered.
|
|
132
|
+
if (rowSpan === 0 || colSpan === 0) return null;
|
|
133
|
+
|
|
134
|
+
const meta = cell.column.columnDef.meta;
|
|
135
|
+
return (
|
|
136
|
+
<td
|
|
137
|
+
key={cell.id}
|
|
138
|
+
rowSpan={rowSpan}
|
|
139
|
+
colSpan={colSpan}
|
|
140
|
+
onContextMenu={(e) => {
|
|
141
|
+
e.preventDefault();
|
|
142
|
+
|
|
143
|
+
return false;
|
|
144
|
+
}}
|
|
145
|
+
style={{
|
|
146
|
+
...meta?.style,
|
|
147
|
+
...meta?.tdStyle,
|
|
148
|
+
}}
|
|
149
|
+
onClick={clickHandler}
|
|
150
|
+
>
|
|
151
|
+
<table.FlexRender cell={cell} />
|
|
152
|
+
</td>
|
|
153
|
+
);
|
|
151
154
|
})}
|
|
152
155
|
</ContextMenu>
|
|
153
156
|
);
|
|
154
157
|
}
|
|
155
|
-
|
|
156
|
-
export default ReactTableRow;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cellSpanningFeature,
|
|
3
|
+
createSortedRowModel,
|
|
4
|
+
metaHelper,
|
|
5
|
+
rowSortingFeature,
|
|
6
|
+
sortFn_alphanumeric as sortFnAlphanumeric,
|
|
7
|
+
sortFn_basic as sortFnBasic,
|
|
8
|
+
sortFn_datetime as sortFnDatetime,
|
|
9
|
+
sortFn_text as sortFnText,
|
|
10
|
+
tableFeatures,
|
|
11
|
+
} from '@tanstack/react-table';
|
|
12
|
+
import type { CSSProperties } from 'react';
|
|
13
|
+
|
|
14
|
+
interface TanStackTableColumnMeta {
|
|
15
|
+
style?: CSSProperties;
|
|
16
|
+
thStyle?: CSSProperties;
|
|
17
|
+
tdStyle?: CSSProperties;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const tanStackTableFeatures = tableFeatures({
|
|
21
|
+
cellSpanningFeature,
|
|
22
|
+
rowSortingFeature,
|
|
23
|
+
sortedRowModel: createSortedRowModel(),
|
|
24
|
+
sortFns: {
|
|
25
|
+
alphanumeric: sortFnAlphanumeric,
|
|
26
|
+
basic: sortFnBasic,
|
|
27
|
+
datetime: sortFnDatetime,
|
|
28
|
+
text: sortFnText,
|
|
29
|
+
},
|
|
30
|
+
columnMeta: metaHelper<TanStackTableColumnMeta>(),
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export type TanStackTableFeatures = typeof tanStackTableFeatures;
|