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
package/lib/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { units } from '@zakodium/nmrium-core';
|
|
2
2
|
import { coerceNumberInput } from 'react-science/ui';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
+
import { convert, convertToPixels } from '../../../../elements/export/units.js';
|
|
5
|
+
import { MAX_CANVAS_AREA, MAX_CANVAS_SIDE, } from "../../../../utility/export.js";
|
|
4
6
|
const exportSizes = [
|
|
5
7
|
'Letter',
|
|
6
8
|
'Legal',
|
|
@@ -15,38 +17,87 @@ const exportSizes = [
|
|
|
15
17
|
'B5',
|
|
16
18
|
];
|
|
17
19
|
const exportLayouts = ['portrait', 'landscape'];
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
20
|
+
export const MIN_DPI = 1;
|
|
21
|
+
export const MAX_DPI = 1200;
|
|
22
|
+
const formatNumber = (value) => value.toLocaleString('en-US');
|
|
23
|
+
/** Sizes are unit-relative (m, in, cm, px...), so the only unit-agnostic invariant is being positive. */
|
|
24
|
+
export const sizeField = coerceNumberInput(z.number().positive());
|
|
25
|
+
export const dpiField = coerceNumberInput(z.number().int().min(MIN_DPI).max(MAX_DPI));
|
|
26
|
+
const sides = ['width', 'height'];
|
|
27
|
+
/** @see {import("@zakodium/nmrium-core").BasicExportSettings} */
|
|
28
|
+
function basicSettings(dpi) {
|
|
29
|
+
return z.object({
|
|
30
|
+
mode: z.literal('basic'),
|
|
31
|
+
useDefaultSettings: z.boolean(),
|
|
32
|
+
dpi,
|
|
33
|
+
size: z.enum(exportSizes),
|
|
34
|
+
layout: z.enum(exportLayouts),
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
/** @see {import("@zakodium/nmrium-core").AdvanceExportSettings} */
|
|
38
|
+
function advancedSettings(size, dpi) {
|
|
39
|
+
return z.object({
|
|
40
|
+
mode: z.literal('advance'),
|
|
41
|
+
useDefaultSettings: z.boolean(),
|
|
42
|
+
dpi,
|
|
43
|
+
width: size,
|
|
44
|
+
height: size,
|
|
45
|
+
unit: z.enum(units.map((u) => u.unit)),
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/** A canvas the browser cannot allocate makes the export fail, so the real limit is the size in pixels. */
|
|
49
|
+
function getSizeErrors(settings) {
|
|
50
|
+
const { unit, dpi, width, height } = settings;
|
|
51
|
+
const pixels = {
|
|
52
|
+
width: convertToPixels(width, unit, dpi, { precision: 0 }),
|
|
53
|
+
height: convertToPixels(height, unit, dpi, { precision: 0 }),
|
|
54
|
+
};
|
|
55
|
+
function inCurrentUnit(px) {
|
|
56
|
+
if (unit === 'px')
|
|
57
|
+
return `${formatNumber(px)} px`;
|
|
58
|
+
return `${convert(px, 'px', unit, dpi, { precision: 2 })} ${unit}`;
|
|
59
|
+
}
|
|
60
|
+
const errors = {};
|
|
61
|
+
for (const side of sides) {
|
|
62
|
+
if (pixels[side] < 1) {
|
|
63
|
+
errors[side] = `Too small to export. Use at least ${inCurrentUnit(1)}.`;
|
|
64
|
+
}
|
|
65
|
+
else if (pixels[side] > MAX_CANVAS_SIDE) {
|
|
66
|
+
errors[side] =
|
|
67
|
+
`Too large to export. Use at most ${inCurrentUnit(MAX_CANVAS_SIDE)}.`;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
const hasSideError = sides.some((side) => errors[side]);
|
|
71
|
+
if (!hasSideError && pixels.width * pixels.height > MAX_CANVAS_AREA) {
|
|
72
|
+
const message = `The export would be ${formatNumber(pixels.width)} x ${formatNumber(pixels.height)} pixels, which is too large. Try a smaller size or a lower DPI.`;
|
|
73
|
+
errors.width = message;
|
|
74
|
+
errors.height = message;
|
|
75
|
+
}
|
|
76
|
+
return errors;
|
|
77
|
+
}
|
|
44
78
|
/**
|
|
45
79
|
* @see {import("@zakodium/nmrium-core").ExportSettings}
|
|
46
80
|
*/
|
|
47
81
|
export const exportSettingsValidation = z.discriminatedUnion('mode', [
|
|
48
|
-
|
|
49
|
-
|
|
82
|
+
basicSettings(dpiField),
|
|
83
|
+
advancedSettings(sizeField, dpiField).check(({ value, issues }) => {
|
|
84
|
+
const errors = getSizeErrors(value);
|
|
85
|
+
for (const side of sides) {
|
|
86
|
+
const message = errors[side];
|
|
87
|
+
if (!message)
|
|
88
|
+
continue;
|
|
89
|
+
issues.push({
|
|
90
|
+
code: 'custom',
|
|
91
|
+
input: value[side],
|
|
92
|
+
path: [side],
|
|
93
|
+
message,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}),
|
|
97
|
+
]);
|
|
98
|
+
export const exportSettingsDecoder = z.discriminatedUnion('mode', [
|
|
99
|
+
basicSettings(coerceNumberInput()),
|
|
100
|
+
advancedSettings(coerceNumberInput(), coerceNumberInput()),
|
|
50
101
|
]);
|
|
51
102
|
/**
|
|
52
103
|
* @see {import("@zakodium/nmrium-core").ExportPreferences}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export_tab_validation.js","sourceRoot":"","sources":["../../../../../../src/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,WAAW,GAAmB;IAClC,QAAQ;IACR,OAAO;IACP,SAAS;IACT,WAAW;IACX,WAAW;IACX,OAAO;IACP,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;CACL,CAAC;AACF,MAAM,aAAa,GAAa,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;AAE1D
|
|
1
|
+
{"version":3,"file":"export_tab_validation.js","sourceRoot":"","sources":["../../../../../../src/component/modal/setting/tanstack_general_settings/validation/export_tab_validation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EACL,eAAe,EACf,eAAe,GAChB,MAAM,+BAA+B,CAAC;AAEvC,MAAM,WAAW,GAAmB;IAClC,QAAQ;IACR,OAAO;IACP,SAAS;IACT,WAAW;IACX,WAAW;IACX,OAAO;IACP,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;CACL,CAAC;AACF,MAAM,aAAa,GAAa,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;AAE1D,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC;AACzB,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,CAAC;AAE5B,MAAM,YAAY,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;AAEtE,yGAAyG;AACzG,MAAM,CAAC,MAAM,SAAS,GAAG,iBAAiB,CAAC,CAAC,CAAC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|
426
|
+
mode: z.ZodLiteral<"basic">;
|
|
427
|
+
useDefaultSettings: z.ZodBoolean;
|
|
428
|
+
dpi: z.ZodCodec<z.ZodString, z.ZodNumber>;
|
|
426
429
|
size: z.ZodEnum<{
|
|
427
430
|
Letter: "Letter";
|
|
428
431
|
Legal: "Legal";
|
|
@@ -440,10 +443,10 @@ export declare const workspaceValidation: z.ZodObject<{
|
|
|
440
443
|
portrait: "portrait";
|
|
441
444
|
landscape: "landscape";
|
|
442
445
|
}>;
|
|
446
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
447
|
+
mode: z.ZodLiteral<"advance">;
|
|
443
448
|
useDefaultSettings: z.ZodBoolean;
|
|
444
449
|
dpi: z.ZodCodec<z.ZodString, z.ZodNumber>;
|
|
445
|
-
mode: z.ZodLiteral<"basic">;
|
|
446
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
447
450
|
width: z.ZodCodec<z.ZodString, z.ZodNumber>;
|
|
448
451
|
height: z.ZodCodec<z.ZodString, z.ZodNumber>;
|
|
449
452
|
unit: z.ZodEnum<{
|
|
@@ -457,11 +460,11 @@ export declare const workspaceValidation: z.ZodObject<{
|
|
|
457
460
|
pt: "pt";
|
|
458
461
|
pc: "pc";
|
|
459
462
|
}>;
|
|
460
|
-
useDefaultSettings: z.ZodBoolean;
|
|
461
|
-
dpi: z.ZodCodec<z.ZodString, z.ZodNumber>;
|
|
462
|
-
mode: z.ZodLiteral<"advance">;
|
|
463
463
|
}, z.core.$strip>], "mode">;
|
|
464
464
|
svg: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
465
|
+
mode: z.ZodLiteral<"basic">;
|
|
466
|
+
useDefaultSettings: z.ZodBoolean;
|
|
467
|
+
dpi: z.ZodCodec<z.ZodString, z.ZodNumber>;
|
|
465
468
|
size: z.ZodEnum<{
|
|
466
469
|
Letter: "Letter";
|
|
467
470
|
Legal: "Legal";
|
|
@@ -479,10 +482,10 @@ export declare const workspaceValidation: z.ZodObject<{
|
|
|
479
482
|
portrait: "portrait";
|
|
480
483
|
landscape: "landscape";
|
|
481
484
|
}>;
|
|
485
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
486
|
+
mode: z.ZodLiteral<"advance">;
|
|
482
487
|
useDefaultSettings: z.ZodBoolean;
|
|
483
488
|
dpi: z.ZodCodec<z.ZodString, z.ZodNumber>;
|
|
484
|
-
mode: z.ZodLiteral<"basic">;
|
|
485
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
486
489
|
width: z.ZodCodec<z.ZodString, z.ZodNumber>;
|
|
487
490
|
height: z.ZodCodec<z.ZodString, z.ZodNumber>;
|
|
488
491
|
unit: z.ZodEnum<{
|
|
@@ -496,11 +499,11 @@ export declare const workspaceValidation: z.ZodObject<{
|
|
|
496
499
|
pt: "pt";
|
|
497
500
|
pc: "pc";
|
|
498
501
|
}>;
|
|
499
|
-
useDefaultSettings: z.ZodBoolean;
|
|
500
|
-
dpi: z.ZodCodec<z.ZodString, z.ZodNumber>;
|
|
501
|
-
mode: z.ZodLiteral<"advance">;
|
|
502
502
|
}, z.core.$strip>], "mode">;
|
|
503
503
|
clipboard: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
504
|
+
mode: z.ZodLiteral<"basic">;
|
|
505
|
+
useDefaultSettings: z.ZodBoolean;
|
|
506
|
+
dpi: z.ZodCodec<z.ZodString, z.ZodNumber>;
|
|
504
507
|
size: z.ZodEnum<{
|
|
505
508
|
Letter: "Letter";
|
|
506
509
|
Legal: "Legal";
|
|
@@ -518,10 +521,10 @@ export declare const workspaceValidation: z.ZodObject<{
|
|
|
518
521
|
portrait: "portrait";
|
|
519
522
|
landscape: "landscape";
|
|
520
523
|
}>;
|
|
524
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
525
|
+
mode: z.ZodLiteral<"advance">;
|
|
521
526
|
useDefaultSettings: z.ZodBoolean;
|
|
522
527
|
dpi: z.ZodCodec<z.ZodString, z.ZodNumber>;
|
|
523
|
-
mode: z.ZodLiteral<"basic">;
|
|
524
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
525
528
|
width: z.ZodCodec<z.ZodString, z.ZodNumber>;
|
|
526
529
|
height: z.ZodCodec<z.ZodString, z.ZodNumber>;
|
|
527
530
|
unit: z.ZodEnum<{
|
|
@@ -535,9 +538,6 @@ export declare const workspaceValidation: z.ZodObject<{
|
|
|
535
538
|
pt: "pt";
|
|
536
539
|
pc: "pc";
|
|
537
540
|
}>;
|
|
538
|
-
useDefaultSettings: z.ZodBoolean;
|
|
539
|
-
dpi: z.ZodCodec<z.ZodString, z.ZodNumber>;
|
|
540
|
-
mode: z.ZodLiteral<"advance">;
|
|
541
541
|
}, z.core.$strip>], "mode">;
|
|
542
542
|
}, z.core.$strip>;
|
|
543
543
|
peaksLabel: z.ZodObject<{
|
|
@@ -2,7 +2,7 @@ import type { AutoAssignmentsData } from './useAutoAssignments.js';
|
|
|
2
2
|
interface AutomaticAssignmentTableProps {
|
|
3
3
|
data: AutoAssignmentsData[];
|
|
4
4
|
}
|
|
5
|
-
declare function AutomaticAssignmentTable(
|
|
5
|
+
declare function AutomaticAssignmentTable(props: AutomaticAssignmentTableProps): import("react").JSX.Element;
|
|
6
6
|
declare const _default: import("react").MemoExoticComponent<typeof AutomaticAssignmentTable>;
|
|
7
7
|
export default _default;
|
|
8
8
|
//# sourceMappingURL=AutomaticAssignmentTable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutomaticAssignmentTable.d.ts","sourceRoot":"","sources":["../../../../src/component/panels/AutomaticAssignment/AutomaticAssignmentTable.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AutomaticAssignmentTable.d.ts","sourceRoot":"","sources":["../../../../src/component/panels/AutomaticAssignment/AutomaticAssignmentTable.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,UAAU,6BAA6B;IACrC,IAAI,EAAE,mBAAmB,EAAE,CAAC;CAC7B;AAED,iBAAS,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,+BA6DrE;;AAED,wBAA8C"}
|
|
@@ -2,8 +2,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { SvgNmrAssignment } from 'cheminfo-font';
|
|
3
3
|
import { memo, useCallback, useMemo } from 'react';
|
|
4
4
|
import { useDispatch } from '../../context/DispatchContext.js';
|
|
5
|
-
import
|
|
6
|
-
function AutomaticAssignmentTable(
|
|
5
|
+
import { TanStackTable, createTanStackColumnHelper, } from "../../elements/tanstack_table/index.js";
|
|
6
|
+
function AutomaticAssignmentTable(props) {
|
|
7
|
+
const { data } = props;
|
|
7
8
|
const dispatch = useDispatch();
|
|
8
9
|
const assignHandler = useCallback((event, row) => {
|
|
9
10
|
event.preventDefault();
|
|
@@ -13,31 +14,33 @@ function AutomaticAssignmentTable({ data }) {
|
|
|
13
14
|
payload: { assignments: row.original.assignment },
|
|
14
15
|
});
|
|
15
16
|
}, [dispatch]);
|
|
16
|
-
const COLUMNS = useMemo(() =>
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
{
|
|
24
|
-
index: 2,
|
|
25
|
-
Header: 'Score',
|
|
26
|
-
accessor: 'score',
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
index: 3,
|
|
30
|
-
Header: '',
|
|
31
|
-
style: {
|
|
32
|
-
width: '1%',
|
|
33
|
-
maxWidth: '24px',
|
|
34
|
-
minWidth: '24px',
|
|
17
|
+
const COLUMNS = useMemo(() => {
|
|
18
|
+
const columnHelper = createTanStackColumnHelper();
|
|
19
|
+
return columnHelper.columns([
|
|
20
|
+
{
|
|
21
|
+
header: '#',
|
|
22
|
+
accessorFn: (_, index) => index + 1,
|
|
23
|
+
meta: { style: { width: '1%', maxWidth: '40px', minWidth: '40px' } },
|
|
35
24
|
},
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
25
|
+
{
|
|
26
|
+
header: 'Score',
|
|
27
|
+
accessorKey: 'score',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
header: '',
|
|
31
|
+
meta: {
|
|
32
|
+
style: {
|
|
33
|
+
width: '1%',
|
|
34
|
+
maxWidth: '24px',
|
|
35
|
+
minWidth: '24px',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
id: 'assign-button',
|
|
39
|
+
cell: ({ row }) => (_jsx("button", { type: "button", className: "assign-button", onClick: (e) => assignHandler(e, row), children: _jsx(SvgNmrAssignment, {}) })),
|
|
40
|
+
},
|
|
41
|
+
]);
|
|
42
|
+
}, [assignHandler]);
|
|
43
|
+
return (_jsx(TanStackTable, { data: data, columns: COLUMNS, onClick: assignHandler, enableDefaultActiveRow: true, emptyDataRowText: "No Data" }));
|
|
41
44
|
}
|
|
42
45
|
export default memo(AutomaticAssignmentTable);
|
|
43
46
|
//# sourceMappingURL=AutomaticAssignmentTable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutomaticAssignmentTable.js","sourceRoot":"","sources":["../../../../src/component/panels/AutomaticAssignment/AutomaticAssignmentTable.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AutomaticAssignmentTable.js","sourceRoot":"","sources":["../../../../src/component/panels/AutomaticAssignment/AutomaticAssignmentTable.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAE/D,OAAO,EACL,aAAa,EACb,0BAA0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AC,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,EAAE,GAAG,CAAC,YAErC,KAAC,gBAAgB,KAAG,GACb,CACV;aACF;SACF,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,OAAO,CACL,KAAC,aAAa,IACZ,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,aAAa,EACtB,sBAAsB,QACtB,gBAAgB,EAAC,SAAS,GAC1B,CACH,CAAC;AACJ,CAAC;AAED,eAAe,IAAI,CAAC,wBAAwB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntegralTable.d.ts","sourceRoot":"","sources":["../../../../src/component/panels/IntegralsPanel/IntegralTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAc,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"IntegralTable.d.ts","sourceRoot":"","sources":["../../../../src/component/panels/IntegralsPanel/IntegralTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAc,MAAM,qBAAqB,CAAC;AAoBxE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAIlE,UAAU,kBAAmB,SAAQ,IAAI,CACvC,uBAAuB,EACvB,WAAW,CACZ;IACC,IAAI,EAAE,QAAQ,EAAE,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,iBAAS,aAAa,CAAC,KAAK,EAAE,kBAAkB,+BAoJ/C;;AAED,wBAAmC"}
|
|
@@ -7,9 +7,8 @@ import { SIGNAL_KINDS } from '../../../data/constants/signalsKinds.js';
|
|
|
7
7
|
import { useDispatch } from '../../context/DispatchContext.js';
|
|
8
8
|
import { EditableColumn } from '../../elements/EditableColumn.js';
|
|
9
9
|
import { EmptyText } from '../../elements/EmptyText.js';
|
|
10
|
-
import ReactTable from '../../elements/ReactTable/ReactTable.js';
|
|
11
|
-
import addCustomColumn, { createActionColumn, } from '../../elements/ReactTable/utility/addCustomColumn.js';
|
|
12
10
|
import Select from '../../elements/Select.js';
|
|
11
|
+
import { TanStackTable, createActionColumn, createTanStackColumnHelper, } from "../../elements/tanstack_table/index.js";
|
|
13
12
|
import { usePanelPreferences } from '../../hooks/usePanelPreferences.js';
|
|
14
13
|
import { formatNumber } from '../../utility/formatNumber.js';
|
|
15
14
|
import { NoDataForFid } from '../extra/placeholder/NoDataForFid.js';
|
|
@@ -17,8 +16,8 @@ const selectStyle = { width: '100%', border: 'none' };
|
|
|
17
16
|
function IntegralTable(props) {
|
|
18
17
|
const { activeTab, data, info } = props;
|
|
19
18
|
const dispatch = useDispatch();
|
|
20
|
-
const deleteIntegralHandler = useCallback((
|
|
21
|
-
const { id } =
|
|
19
|
+
const deleteIntegralHandler = useCallback((integral) => {
|
|
20
|
+
const { id } = integral;
|
|
22
21
|
dispatch({
|
|
23
22
|
type: 'DELETE_INTEGRAL',
|
|
24
23
|
payload: {
|
|
@@ -39,92 +38,87 @@ function IntegralTable(props) {
|
|
|
39
38
|
});
|
|
40
39
|
}, [dispatch]);
|
|
41
40
|
const integralsPreferences = usePanelPreferences('integrals', activeTab);
|
|
42
|
-
const COLUMNS = useMemo(() =>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
{
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
41
|
+
const COLUMNS = useMemo(() => {
|
|
42
|
+
const columnHelper = createTanStackColumnHelper();
|
|
43
|
+
const columns = columnHelper.columns([]);
|
|
44
|
+
// TODO: Use column visibility feature instead.
|
|
45
|
+
if (dlv(integralsPreferences, 'showSerialNumber')) {
|
|
46
|
+
columns.push({
|
|
47
|
+
id: 'rowNumber',
|
|
48
|
+
header: '#',
|
|
49
|
+
accessorFn: (_, index) => index + 1,
|
|
50
|
+
meta: { style: { width: '30px', maxWidth: '30px' } },
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
if (dlv(integralsPreferences, 'from.show')) {
|
|
54
|
+
columns.push({
|
|
55
|
+
header: 'From',
|
|
56
|
+
sortFn: 'basic',
|
|
57
|
+
accessorKey: 'from',
|
|
58
|
+
cell: ({ getValue }) => formatNumber(getValue(), integralsPreferences.from.format),
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
if (dlv(integralsPreferences, 'to.show')) {
|
|
62
|
+
columns.push({
|
|
63
|
+
header: 'To',
|
|
64
|
+
sortFn: 'basic',
|
|
65
|
+
accessorKey: 'to',
|
|
66
|
+
cell: ({ getValue }) => formatNumber(getValue(), integralsPreferences.to.format),
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
if (dlv(integralsPreferences, 'absolute.show')) {
|
|
70
|
+
columns.push({
|
|
71
|
+
header: 'Absolute',
|
|
72
|
+
accessorKey: 'absolute',
|
|
73
|
+
cell: ({ getValue }) => formatNumber(getValue(), integralsPreferences.absolute.format),
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
if (dlv(integralsPreferences, 'relative.show')) {
|
|
77
|
+
columns.push({
|
|
78
|
+
id: 'relative',
|
|
79
|
+
header: () => {
|
|
80
|
+
const n = activeTab?.replaceAll(/\d/g, '');
|
|
81
|
+
return _jsx("span", { children: `Relative ${n}` });
|
|
82
|
+
},
|
|
83
|
+
accessorKey: 'integral',
|
|
84
|
+
cell: ({ getValue, row }) => {
|
|
85
|
+
const value = formatNumber(getValue() || 0, integralsPreferences.relative.format);
|
|
86
|
+
const flag = checkIntegralKind(row.original);
|
|
87
|
+
const integral = flag ? value : `[ ${value} ]`;
|
|
88
|
+
return (_jsx(EditableColumn, { value: integral, onSave: (value) => saveRelativeHandler(value, row.original), type: "number", validate: (val) => val !== '' }, integral));
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
if (dlv(integralsPreferences, 'showKind')) {
|
|
93
|
+
columns.push({
|
|
94
|
+
header: 'Kind',
|
|
95
|
+
sortFn: 'basic',
|
|
96
|
+
accessorKey: 'kind',
|
|
97
|
+
cell: ({ getValue, row }) => (_jsx(Select, { onChange: (value) => changeIntegralDataHandler(value, row.original), items: SIGNAL_KINDS, style: selectStyle, defaultValue: getValue() })),
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
if (dlv(integralsPreferences, 'showDeleteAction')) {
|
|
101
|
+
columns.push(createActionColumn({
|
|
102
|
+
id: 'delete-action',
|
|
99
103
|
icon: _jsx(FaRegTrashAlt, {}),
|
|
100
104
|
onClick: deleteIntegralHandler,
|
|
101
|
-
})
|
|
102
|
-
}
|
|
103
|
-
|
|
105
|
+
}));
|
|
106
|
+
}
|
|
107
|
+
return columns;
|
|
108
|
+
}, [
|
|
104
109
|
activeTab,
|
|
105
110
|
changeIntegralDataHandler,
|
|
106
111
|
integralsPreferences,
|
|
107
112
|
saveRelativeHandler,
|
|
108
113
|
deleteIntegralHandler,
|
|
109
114
|
]);
|
|
110
|
-
const tableColumns = useMemo(() => {
|
|
111
|
-
const columns = [];
|
|
112
|
-
for (const col of COLUMNS) {
|
|
113
|
-
const { showWhen, ...colParams } = col;
|
|
114
|
-
if (dlv(integralsPreferences, showWhen)) {
|
|
115
|
-
addCustomColumn(columns, colParams);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
columns.sort((object1, object2) => object1.index - object2.index);
|
|
119
|
-
return columns;
|
|
120
|
-
}, [COLUMNS, integralsPreferences]);
|
|
121
115
|
if (info.isFid) {
|
|
122
116
|
return _jsx(NoDataForFid, {});
|
|
123
117
|
}
|
|
124
118
|
if (data.length === 0) {
|
|
125
119
|
return _jsx(EmptyText, { text: "No data" });
|
|
126
120
|
}
|
|
127
|
-
return _jsx(
|
|
121
|
+
return _jsx(TanStackTable, { data: data, columns: COLUMNS });
|
|
128
122
|
}
|
|
129
123
|
export default memo(IntegralTable);
|
|
130
124
|
//# sourceMappingURL=IntegralTable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntegralTable.js","sourceRoot":"","sources":["../../../../src/component/panels/IntegralsPanel/IntegralTable.tsx"],"names":[],"mappings":";AACA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"IntegralTable.js","sourceRoot":"","sources":["../../../../src/component/panels/IntegralsPanel/IntegralTable.tsx"],"names":[],"mappings":";AACA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC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,CAAC,KAAK,EAAE,CAAC;QACf,OAAO,KAAC,YAAY,KAAG,CAAC;IAC1B,CAAC;IAED,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtB,OAAO,KAAC,SAAS,IAAC,IAAI,EAAC,SAAS,GAAG,CAAC;IACtC,CAAC;IAED,OAAO,KAAC,aAAa,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,GAAI,CAAC;AACzD,CAAC;AAED,eAAe,IAAI,CAAC,aAAa,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExclusionsZonesTable.d.ts","sourceRoot":"","sources":["../../../../src/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExclusionsZonesTable.d.ts","sourceRoot":"","sources":["../../../../src/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.tsx"],"names":[],"mappings":"AAWA,wBAAgB,oBAAoB,uCA4EnC"}
|
|
@@ -1,41 +1,45 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Button, Classes } from '@blueprintjs/core';
|
|
3
|
+
import { useCallback, useMemo } from 'react';
|
|
3
4
|
import { useFormContext, useWatch } from 'react-hook-form';
|
|
4
5
|
import { FaRegTrashAlt } from 'react-icons/fa';
|
|
5
6
|
import { NumberInput2Controller } from '../../elements/NumberInput2Controller.js';
|
|
6
|
-
import
|
|
7
|
+
import { TanStackTable, createTanStackColumnHelper, } from "../../elements/tanstack_table/index.js";
|
|
7
8
|
export function ExclusionsZonesTable() {
|
|
8
|
-
const { setValue, control } = useFormContext();
|
|
9
|
+
const { setValue, control, getValues } = useFormContext();
|
|
9
10
|
const exclusionsZones = useWatch({ name: 'exclusionsZones' });
|
|
11
|
+
const handleDelete = useCallback((index) => {
|
|
12
|
+
setValue('exclusionsZones', getValues('exclusionsZones').filter((_, i) => i !== index));
|
|
13
|
+
}, [getValues, setValue]);
|
|
14
|
+
const exclusionsZonesColumns = useMemo(() => {
|
|
15
|
+
const columnHelper = createTanStackColumnHelper();
|
|
16
|
+
return columnHelper.columns([
|
|
17
|
+
{
|
|
18
|
+
header: '#',
|
|
19
|
+
meta: { style: { width: '50px' } },
|
|
20
|
+
accessorFn: (_, index) => index + 1,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
header: 'From',
|
|
24
|
+
cell: ({ row }) => (_jsx(NumberInput2Controller, { control: control, name: `exclusionsZones.${row.index}.from`, fill: true, noShadowBox: true, style: { backgroundColor: 'transparent' } })),
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
header: 'To',
|
|
28
|
+
cell: ({ row }) => (_jsx(NumberInput2Controller, { name: `exclusionsZones.${row.index}.to`, fill: true, noShadowBox: true, style: { backgroundColor: 'transparent' } })),
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
header: '',
|
|
32
|
+
meta: { style: { width: '70px' } },
|
|
33
|
+
id: 'actions',
|
|
34
|
+
cell: ({ row }) => {
|
|
35
|
+
return (_jsx(Button, { size: "small", variant: "outlined", intent: "danger", onClick: () => handleDelete(row.index), children: _jsx(FaRegTrashAlt, { className: Classes.ICON }) }));
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
]);
|
|
39
|
+
}, [control, handleDelete]);
|
|
10
40
|
if (!exclusionsZones || !Array.isArray(exclusionsZones)) {
|
|
11
41
|
return null;
|
|
12
42
|
}
|
|
13
|
-
|
|
14
|
-
setValue('exclusionsZones', exclusionsZones.filter((_, i) => i !== index));
|
|
15
|
-
}
|
|
16
|
-
const exclusionsZonesColumns = [
|
|
17
|
-
{
|
|
18
|
-
Header: '#',
|
|
19
|
-
style: { width: '50px' },
|
|
20
|
-
accessor: (_, index) => index + 1,
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
Header: 'from',
|
|
24
|
-
Cell: ({ row }) => (_jsx(NumberInput2Controller, { control: control, name: `exclusionsZones.${row.index}.from`, fill: true, noShadowBox: true, style: { backgroundColor: 'transparent' } })),
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
Header: 'To',
|
|
28
|
-
Cell: ({ row }) => (_jsx(NumberInput2Controller, { name: `exclusionsZones.${row.index}.to`, fill: true, noShadowBox: true, style: { backgroundColor: 'transparent' } })),
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
Header: '',
|
|
32
|
-
style: { width: '70px' },
|
|
33
|
-
id: 'actions',
|
|
34
|
-
Cell: ({ row }) => {
|
|
35
|
-
return (_jsx(Button, { size: "small", variant: "outlined", intent: "danger", onClick: () => handleDelete(row.index), children: _jsx(FaRegTrashAlt, { className: Classes.ICON }) }));
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
];
|
|
39
|
-
return (_jsx(ReactTable, { columns: exclusionsZonesColumns, data: exclusionsZones, emptyDataRowText: "No Zones" }));
|
|
43
|
+
return (_jsx(TanStackTable, { columns: exclusionsZonesColumns, data: exclusionsZones, emptyDataRowText: "No Zones" }));
|
|
40
44
|
}
|
|
41
45
|
//# sourceMappingURL=ExclusionsZonesTable.js.map
|