nmrium 0.36.0 → 0.38.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/FooterBanner.js +1 -1
- package/lib/component/1d/Viewer1D.js +26 -21
- package/lib/component/1d/integral/Integral.d.ts +2 -6
- package/lib/component/1d/integral/IntegralResizable.d.ts +2 -6
- package/lib/component/1d/integral/IntegralResizable.js +2 -3
- package/lib/component/1d/multiAnalysis/MultiAnalysisRanges.js +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js +7 -9
- package/lib/component/1d/peaks/PeakAnnotation.js +1 -2
- package/lib/component/1d/ranges/Range.js +9 -8
- package/lib/component/1d/ranges/Ranges.js +5 -7
- package/lib/component/1d/tool/BaseLineZones.js +1 -2
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +4 -5
- package/lib/component/1d-2d/components/FloatMoleculeStructures/index.js +13 -17
- package/lib/component/2d/1d-tracer/Left1DChart.js +1 -1
- package/lib/component/2d/1d-tracer/VerticalSliceChart.js +1 -1
- package/lib/component/2d/Chart2D.js +1 -1
- package/lib/component/2d/Viewer2D.js +10 -9
- package/lib/component/2d/fid/FidCanvas.js +4 -6
- package/lib/component/2d/ft/Contours.js +1 -7
- package/lib/component/2d/utilities/DimensionLayout.d.ts +9 -24
- package/lib/component/2d/utilities/scale.d.ts +2 -1
- package/lib/component/2d/utilities/scale.js +1 -1
- package/lib/component/2d/zones/Zones.js +1 -1
- package/lib/component/EventsTrackers/KeysListenerTracker.js +28 -21
- package/lib/component/NMRium.d.ts +2 -0
- package/lib/component/NMRium.js +22 -15
- package/lib/component/assignment/AssignmentsReducer.d.ts +1 -1
- package/lib/component/context/DispatchContext.d.ts +23 -3
- package/lib/component/context/DispatchContext.js +1 -1
- package/lib/component/context/LoggerContext.js +1 -1
- package/lib/component/elements/Button.js +7 -9
- package/lib/component/elements/IsotopesViewer.js +1 -1
- package/lib/component/elements/ReactTable/ReactTable.js +1 -2
- package/lib/component/elements/RemoveAssignmentsButton.d.ts +4 -0
- package/lib/component/{panels/RangesPanel/TableColumns → elements}/RemoveAssignmentsButton.js +14 -1
- package/lib/component/elements/formik/FormikCheckBox.js +1 -1
- package/lib/component/elements/formik/FormikColorInput.js +1 -1
- package/lib/component/elements/formik/FormikColorPicker.js +1 -1
- package/lib/component/elements/formik/FormikColumnFormatField.js +1 -1
- package/lib/component/elements/formik/FormikInput.js +1 -1
- package/lib/component/elements/formik/FormikSelect.js +2 -2
- package/lib/component/elements/formik/FormikSlider.js +1 -1
- package/lib/component/elements/formik/FormikTextarea.js +2 -2
- package/lib/component/header/ApodizationOptionsPanel.js +4 -5
- package/lib/component/header/AutoPeakPickingOptionPanel.js +1 -2
- package/lib/component/header/BaseLineCorrectionPanel.js +4 -5
- package/lib/component/header/Header.js +5 -7
- package/lib/component/header/PhaseCorrectionPanel.js +7 -8
- package/lib/component/header/RangesPickingOptionPanel.js +1 -2
- package/lib/component/header/ZeroFillingOptionsPanel.js +3 -11
- package/lib/component/header/Zones2DOptionPanel.js +5 -6
- package/lib/component/hooks/useExport.js +1 -0
- package/lib/component/hooks/useToolsFunctions.js +8 -10
- package/lib/component/loader/DropZone.js +4 -5
- package/lib/component/loader/NoData.js +1 -1
- package/lib/component/modal/AboutPredictionModal.d.ts +2 -0
- package/lib/component/modal/AboutPredictionModal.js +49 -0
- package/lib/component/modal/AlignSpectraModal.js +1 -2
- package/lib/component/modal/EditPeakShapeModal.js +1 -2
- package/lib/component/modal/ImportPublicationStringModal.js +1 -2
- package/lib/component/modal/LoadJCAMPModal.js +2 -3
- package/lib/component/modal/MoleculeStructureEditorModal.js +24 -19
- package/lib/component/modal/PredictSpectraModal.js +24 -21
- package/lib/component/modal/changeSum/SelectMolecule.js +1 -1
- package/lib/component/modal/editRange/EditRangeModal.js +3 -4
- package/lib/component/modal/editRange/forms/components/AddSignalFormTab.js +2 -2
- package/lib/component/modal/editRange/forms/components/CouplingsTable.js +1 -1
- package/lib/component/modal/metaImportation/MetaImportationModal.js +2 -3
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.js +4 -4
- package/lib/component/modal/setting/settings-tabs/FormattingTabContent.js +2 -2
- package/lib/component/modal/setting/settings-tabs/InfoBlockTabContent.js +2 -2
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +1 -2
- package/lib/component/panels/AutomaticAssignment/useAutoAssignments.js +7 -6
- package/lib/component/panels/InformationPanel.js +6 -6
- package/lib/component/panels/IntegralsPanel/IntegralPanel.js +11 -20
- package/lib/component/panels/IntegralsPanel/IntegralTable.js +27 -23
- package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +8 -5
- package/lib/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.js +1 -1
- package/lib/component/panels/MatrixGenerationPanel/FiltersOptions.js +4 -4
- package/lib/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +1 -2
- package/lib/component/panels/MoleculesPanel/MoleculeHeader.js +1 -2
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js +10 -13
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts +1 -0
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +7 -7
- package/lib/component/panels/MoleculesPanel/Utilities.d.ts +4 -1
- package/lib/component/panels/MoleculesPanel/Utilities.js +2 -2
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.js +8 -9
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +3 -4
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +1 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.js +2 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/LegendsPreferences.js +2 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/MultipleAnalysisCodeEditor.js +1 -1
- package/lib/component/panels/Panels.js +1 -1
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +4 -5
- package/lib/component/panels/PeaksPanel/PeaksTable.js +4 -5
- package/lib/component/panels/RangesPanel/RangesHeader.js +12 -15
- package/lib/component/panels/RangesPanel/RangesPanel.js +24 -29
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +0 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.js +0 -11
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -3
- package/lib/component/panels/RangesPanel/TableColumns/RelativeColumn.js +3 -3
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +2 -3
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +1 -2
- package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.d.ts +1 -1
- package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.js +16 -14
- package/lib/component/panels/SpectrumsPanel/SpectraPanelHeader.js +16 -16
- package/lib/component/panels/SpectrumsPanel/SpectraPreferences.js +2 -2
- package/lib/component/panels/SpectrumsPanel/SpectraTable.js +7 -5
- package/lib/component/panels/SpectrumsPanel/SpectrumsTabs.js +4 -5
- package/lib/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.js +3 -7
- package/lib/component/panels/SpectrumsPanel/base/SpectraColumnsManager.js +1 -1
- package/lib/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +4 -2
- package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +2 -2
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +4 -8
- package/lib/component/panels/SummaryPanel/SummaryPanel.js +39 -34
- package/lib/component/panels/SummaryPanel/utilities/Utilities.js +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.d.ts +2 -21
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +22 -20
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.d.ts +4 -5
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +12 -16
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.d.ts +3 -7
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +2 -2
- package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.d.ts +2 -2
- package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +6 -7
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.d.ts +4 -5
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +27 -19
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.d.ts +3 -7
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.js +2 -2
- package/lib/component/panels/ZonesPanel/ZonesPanel.js +15 -18
- package/lib/component/panels/ZonesPanel/ZonesTable.js +2 -51
- package/lib/component/panels/ZonesPanel/ZonesTableRow.d.ts +3 -3
- package/lib/component/panels/ZonesPanel/ZonesTableRow.js +2 -22
- package/lib/component/panels/ZonesPanel/hooks/useMapZones.d.ts +16 -0
- package/lib/component/panels/ZonesPanel/hooks/useMapZones.js +52 -0
- package/lib/component/panels/databasePanel/DatabasePanel.js +9 -7
- package/lib/component/panels/filtersPanel/FilterPanel.js +1 -2
- package/lib/component/panels/filtersPanel/FiltersTable.js +8 -9
- package/lib/component/panels/header/DefaultPanelHeader.js +1 -1
- package/lib/component/panels/header/SpectraAutomaticPickingButton.js +2 -3
- package/lib/component/panels/predictionPanel/PredictionPanel.js +10 -6
- package/lib/component/reducer/IgnoreActions.d.ts +2 -1
- package/lib/component/reducer/IgnoreActions.js +35 -32
- package/lib/component/reducer/Reducer.d.ts +8 -5
- package/lib/component/reducer/Reducer.js +199 -221
- package/lib/component/reducer/actions/AssignmentsActions.d.ts +7 -6
- package/lib/component/reducer/actions/AssignmentsActions.js +2 -2
- package/lib/component/reducer/actions/CorrelationsActions.d.ts +21 -13
- package/lib/component/reducer/actions/CorrelationsActions.js +25 -20
- package/lib/component/reducer/actions/DatabaseActions.d.ts +15 -2
- package/lib/component/reducer/actions/DatabaseActions.js +5 -2
- package/lib/component/reducer/actions/DimensionsActions.d.ts +8 -3
- package/lib/component/reducer/actions/DimensionsActions.js +3 -5
- package/lib/component/reducer/actions/DomainActions.d.ts +11 -5
- package/lib/component/reducer/actions/DomainActions.js +13 -19
- package/lib/component/reducer/actions/FiltersActions.d.ts +70 -23
- package/lib/component/reducer/actions/FiltersActions.js +250 -255
- package/lib/component/reducer/actions/GlobalActions.d.ts +7 -2
- package/lib/component/reducer/actions/GlobalActions.js +3 -3
- package/lib/component/reducer/actions/IntegralsActions.d.ts +28 -7
- package/lib/component/reducer/actions/IntegralsActions.js +16 -15
- package/lib/component/reducer/actions/LoadActions.d.ts +23 -5
- package/lib/component/reducer/actions/LoadActions.js +65 -57
- package/lib/component/reducer/actions/MoleculeActions.d.ts +38 -9
- package/lib/component/reducer/actions/MoleculeActions.js +53 -20
- package/lib/component/reducer/actions/PeaksActions.d.ts +39 -8
- package/lib/component/reducer/actions/PeaksActions.js +19 -11
- package/lib/component/reducer/actions/PreferencesActions.d.ts +8 -3
- package/lib/component/reducer/actions/PreferencesActions.js +22 -7
- package/lib/component/reducer/actions/RangesActions.d.ts +85 -18
- package/lib/component/reducer/actions/RangesActions.js +80 -65
- package/lib/component/reducer/actions/SpectraAnalysisAction.d.ts +7 -1
- package/lib/component/reducer/actions/SpectrumsActions.d.ts +57 -24
- package/lib/component/reducer/actions/SpectrumsActions.js +69 -60
- package/lib/component/reducer/actions/ToolsActions.d.ts +59 -21
- package/lib/component/reducer/actions/ToolsActions.js +54 -32
- package/lib/component/reducer/actions/ZonesActions.d.ts +79 -15
- package/lib/component/reducer/actions/ZonesActions.js +68 -49
- package/lib/component/reducer/helper/Zoom1DManager.d.ts +6 -5
- package/lib/component/reducer/helper/Zoom1DManager.js +1 -1
- package/lib/component/reducer/helper/ZoomHistoryManager.js +2 -2
- package/lib/component/reducer/helper/get2DRange.d.ts +7 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +1 -0
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +1 -1
- package/lib/component/reducer/types/ActionType.d.ts +6 -0
- package/lib/component/reducer/types/ActionType.js +1 -0
- package/lib/component/toolbar/BasicToolBar.js +6 -9
- package/lib/component/toolbar/FunctionToolBar.js +4 -9
- package/lib/component/toolbar/ToolBar.js +1 -1
- package/lib/component/toolbar/ToolTypes.d.ts +2 -2
- package/lib/component/utility/Events.d.ts +4 -4
- package/lib/component/utility/Events.js +2 -2
- package/lib/component/utility/GroupByInfoKey.js +1 -1
- package/lib/component/utility/getSpectraObjectPaths.js +1 -1
- package/lib/component/workspaces/Workspace.d.ts +2 -1
- package/lib/component/workspaces/exercise.js +31 -0
- package/lib/component/workspaces/workspaceDefaultProperties.js +1 -0
- package/lib/data/PredictionManager.d.ts +5 -8
- package/lib/data/PredictionManager.js +3 -3
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.js +1 -1
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.d.ts +2 -3
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +5 -4
- package/lib/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.d.ts +5 -3
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +1 -35
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.d.ts +2 -35
- package/lib/data/data1d/filter1d/baselineCorrection.d.ts +7 -10
- package/lib/data/data1d/multipleSpectraAnalysis.d.ts +1 -1
- package/lib/data/data2d/Processing2D.d.ts +3 -3
- package/lib/data/data2d/Spectrum2D/contours.d.ts +1 -4
- package/lib/data/data2d/Spectrum2D/contours.js +0 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +1 -1
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.d.ts +5 -1
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.js +6 -8
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts +2 -0
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts +2 -0
- package/lib/data/data2d/Spectrum2D/zones/mapZones.d.ts +2 -0
- package/lib/data/matrixGeneration.js +4 -2
- package/lib/data/molecules/Molecule.d.ts +3 -3
- package/lib/data/molecules/MoleculeManager.d.ts +5 -5
- package/lib/data/molecules/MoleculeManager.js +1 -1
- package/lib/data/utilities/ZoneUtilities.js +0 -1
- package/lib/data/utilities/generateColor.js +1 -1
- package/lib/data/utilities/isNumber.d.ts +1 -0
- package/lib/data/utilities/isNumber.js +3 -0
- package/lib/types/NMRiumGeneralPreferences.d.ts +1 -0
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/FooterBanner.js +1 -1
- package/lib-cjs/component/1d/Viewer1D.js +25 -20
- package/lib-cjs/component/1d/integral/IntegralResizable.js +2 -3
- package/lib-cjs/component/1d/multiAnalysis/MultiAnalysisRanges.js +1 -1
- package/lib-cjs/component/1d/multiplicityTree/MultiplicityTree.js +7 -9
- package/lib-cjs/component/1d/peaks/PeakAnnotation.js +1 -2
- package/lib-cjs/component/1d/ranges/Range.js +9 -8
- package/lib-cjs/component/1d/ranges/Ranges.js +5 -7
- package/lib-cjs/component/1d/tool/BaseLineZones.js +1 -2
- package/lib-cjs/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +4 -5
- package/lib-cjs/component/1d-2d/components/FloatMoleculeStructures/index.js +13 -17
- package/lib-cjs/component/2d/1d-tracer/Left1DChart.js +1 -1
- package/lib-cjs/component/2d/1d-tracer/VerticalSliceChart.js +1 -1
- package/lib-cjs/component/2d/Chart2D.js +1 -1
- package/lib-cjs/component/2d/Viewer2D.js +10 -9
- package/lib-cjs/component/2d/fid/FidCanvas.js +4 -6
- package/lib-cjs/component/2d/ft/Contours.js +1 -7
- package/lib-cjs/component/2d/utilities/scale.js +1 -1
- package/lib-cjs/component/2d/zones/Zones.js +1 -1
- package/lib-cjs/component/EventsTrackers/KeysListenerTracker.js +28 -21
- package/lib-cjs/component/NMRium.js +19 -12
- package/lib-cjs/component/context/DispatchContext.js +1 -1
- package/lib-cjs/component/context/LoggerContext.js +1 -1
- package/lib-cjs/component/elements/Button.js +7 -9
- package/lib-cjs/component/elements/IsotopesViewer.js +1 -1
- package/lib-cjs/component/elements/ReactTable/ReactTable.js +1 -2
- package/lib-cjs/component/{panels/RangesPanel/TableColumns → elements}/RemoveAssignmentsButton.js +15 -2
- package/lib-cjs/component/elements/Tab/Tabs.js +1 -1
- package/lib-cjs/component/elements/formik/FormikCheckBox.js +1 -1
- package/lib-cjs/component/elements/formik/FormikColorInput.js +1 -1
- package/lib-cjs/component/elements/formik/FormikColorPicker.js +1 -1
- package/lib-cjs/component/elements/formik/FormikColumnFormatField.js +1 -1
- package/lib-cjs/component/elements/formik/FormikInput.js +1 -1
- package/lib-cjs/component/elements/formik/FormikSelect.js +2 -2
- package/lib-cjs/component/elements/formik/FormikSlider.js +1 -1
- package/lib-cjs/component/elements/formik/FormikTextarea.js +2 -2
- package/lib-cjs/component/header/ApodizationOptionsPanel.js +3 -4
- package/lib-cjs/component/header/AutoPeakPickingOptionPanel.js +1 -2
- package/lib-cjs/component/header/BaseLineCorrectionPanel.js +4 -5
- package/lib-cjs/component/header/Header.js +5 -7
- package/lib-cjs/component/header/PhaseCorrectionPanel.js +7 -8
- package/lib-cjs/component/header/RangesPickingOptionPanel.js +1 -2
- package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +3 -11
- package/lib-cjs/component/header/Zones2DOptionPanel.js +5 -6
- package/lib-cjs/component/highlight/index.js +1 -1
- package/lib-cjs/component/hooks/useExport.js +1 -0
- package/lib-cjs/component/hooks/useTableSortBy.js +1 -1
- package/lib-cjs/component/hooks/useToolsFunctions.js +8 -10
- package/lib-cjs/component/hooks/useXYReduce.js +1 -1
- package/lib-cjs/component/loader/DropZone.js +4 -5
- package/lib-cjs/component/loader/NoData.js +1 -1
- package/lib-cjs/component/modal/AboutPredictionModal.js +54 -0
- package/lib-cjs/component/modal/AlignSpectraModal.js +1 -2
- package/lib-cjs/component/modal/EditPeakShapeModal.js +1 -2
- package/lib-cjs/component/modal/ImportPublicationStringModal.js +1 -2
- package/lib-cjs/component/modal/LoadJCAMPModal.js +2 -3
- package/lib-cjs/component/modal/MoleculeStructureEditorModal.js +24 -19
- package/lib-cjs/component/modal/PredictSpectraModal.js +24 -21
- package/lib-cjs/component/modal/changeSum/SelectMolecule.js +1 -1
- package/lib-cjs/component/modal/editRange/EditRangeModal.js +3 -4
- package/lib-cjs/component/modal/editRange/forms/components/AddSignalFormTab.js +2 -2
- package/lib-cjs/component/modal/editRange/forms/components/CouplingsTable.js +1 -1
- package/lib-cjs/component/modal/metaImportation/MetaImportationModal.js +2 -3
- package/lib-cjs/component/modal/setting/settings-tabs/DatabasesTabContent.js +4 -4
- package/lib-cjs/component/modal/setting/settings-tabs/FormattingTabContent.js +2 -2
- package/lib-cjs/component/modal/setting/settings-tabs/InfoBlockTabContent.js +2 -2
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +1 -2
- package/lib-cjs/component/panels/AutomaticAssignment/useAutoAssignments.js +7 -6
- package/lib-cjs/component/panels/InformationPanel.js +6 -6
- package/lib-cjs/component/panels/IntegralsPanel/IntegralPanel.js +11 -20
- package/lib-cjs/component/panels/IntegralsPanel/IntegralTable.js +27 -23
- package/lib-cjs/component/panels/IntegralsPanel/IntegralsPreferences.js +7 -4
- package/lib-cjs/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.js +1 -1
- package/lib-cjs/component/panels/MatrixGenerationPanel/FiltersOptions.js +4 -4
- package/lib-cjs/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +1 -2
- package/lib-cjs/component/panels/MoleculesPanel/MoleculeHeader.js +1 -2
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +10 -13
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +7 -7
- package/lib-cjs/component/panels/MoleculesPanel/Utilities.js +2 -2
- package/lib-cjs/component/panels/MoleculesPanel/useAtomAssignment.js +8 -9
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +3 -4
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +1 -2
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.js +2 -2
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/LegendsPreferences.js +2 -2
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/MultipleAnalysisCodeEditor.js +1 -1
- package/lib-cjs/component/panels/Panels.js +1 -1
- package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +4 -5
- package/lib-cjs/component/panels/PeaksPanel/PeaksTable.js +4 -5
- package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +12 -15
- package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +24 -29
- package/lib-cjs/component/panels/RangesPanel/RangesTableRow.js +0 -12
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -3
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RelativeColumn.js +3 -3
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +2 -3
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +1 -2
- package/lib-cjs/component/panels/RangesPanel/hooks/useEditRangeModal.js +16 -14
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraPanelHeader.js +16 -16
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraPreferences.js +2 -2
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraTable.js +7 -5
- package/lib-cjs/component/panels/SpectrumsPanel/SpectrumsTabs.js +4 -5
- package/lib-cjs/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.js +3 -7
- package/lib-cjs/component/panels/SpectrumsPanel/base/SpectraColumnsManager.js +1 -1
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +4 -2
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +2 -2
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +4 -8
- package/lib-cjs/component/panels/SummaryPanel/SummaryPanel.js +39 -34
- package/lib-cjs/component/panels/SummaryPanel/utilities/Utilities.js +1 -1
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +22 -20
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +12 -19
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +2 -2
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +6 -7
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +27 -22
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.js +2 -2
- package/lib-cjs/component/panels/ZonesPanel/ZonesPanel.js +15 -18
- package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +2 -51
- package/lib-cjs/component/panels/ZonesPanel/ZonesTableRow.js +1 -21
- package/lib-cjs/component/panels/ZonesPanel/hooks/useMapZones.js +56 -0
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +8 -6
- package/lib-cjs/component/panels/filtersPanel/FilterPanel.js +1 -2
- package/lib-cjs/component/panels/filtersPanel/FiltersTable.js +8 -9
- package/lib-cjs/component/panels/header/DefaultPanelHeader.js +1 -1
- package/lib-cjs/component/panels/header/SpectraAutomaticPickingButton.js +2 -3
- package/lib-cjs/component/panels/predictionPanel/PredictionPanel.js +10 -6
- package/lib-cjs/component/reducer/IgnoreActions.js +35 -55
- package/lib-cjs/component/reducer/Reducer.js +199 -221
- package/lib-cjs/component/reducer/actions/AssignmentsActions.js +3 -3
- package/lib-cjs/component/reducer/actions/CorrelationsActions.js +23 -18
- package/lib-cjs/component/reducer/actions/DatabaseActions.js +4 -1
- package/lib-cjs/component/reducer/actions/DimensionsActions.js +3 -6
- package/lib-cjs/component/reducer/actions/DomainActions.js +15 -23
- package/lib-cjs/component/reducer/actions/FiltersActions.js +267 -272
- package/lib-cjs/component/reducer/actions/GlobalActions.js +4 -4
- package/lib-cjs/component/reducer/actions/IntegralsActions.js +19 -18
- package/lib-cjs/component/reducer/actions/LoadActions.js +68 -60
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +56 -23
- package/lib-cjs/component/reducer/actions/PeaksActions.js +23 -15
- package/lib-cjs/component/reducer/actions/PreferencesActions.js +24 -9
- package/lib-cjs/component/reducer/actions/RangesActions.js +81 -64
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +77 -67
- package/lib-cjs/component/reducer/actions/ToolsActions.js +54 -31
- package/lib-cjs/component/reducer/actions/ZonesActions.js +73 -52
- package/lib-cjs/component/reducer/core/Constants.js +1 -1
- package/lib-cjs/component/reducer/helper/Zoom1DManager.js +2 -2
- package/lib-cjs/component/reducer/helper/ZoomHistoryManager.js +2 -2
- package/lib-cjs/component/reducer/preferences/panelsPreferencesDefaultValues.js +1 -0
- package/lib-cjs/component/reducer/types/ActionType.js +2 -0
- package/lib-cjs/component/toolbar/BasicToolBar.js +6 -9
- package/lib-cjs/component/toolbar/FunctionToolBar.js +4 -9
- package/lib-cjs/component/toolbar/ToolBar.js +1 -1
- package/lib-cjs/component/utility/GroupByInfoKey.js +1 -1
- package/lib-cjs/component/utility/getSpectraObjectPaths.js +1 -1
- package/lib-cjs/component/workspaces/exercise.js +31 -0
- package/lib-cjs/component/workspaces/workspaceDefaultProperties.js +1 -0
- package/lib-cjs/data/PredictionManager.js +3 -3
- package/lib-cjs/data/SpectraManager.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/getSpectrumErrorValue.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +5 -4
- package/lib-cjs/data/data1d/multipleSpectraAnalysis.js +2 -2
- package/lib-cjs/data/data2d/Spectrum2D/contours.js +0 -1
- package/lib-cjs/data/data2d/Spectrum2D/initiateDatum2D.js +1 -1
- package/lib-cjs/data/data2d/Spectrum2D/zones/changeZoneSignal.js +6 -8
- package/lib-cjs/data/matrixGeneration.js +4 -2
- package/lib-cjs/data/molecules/MoleculeManager.js +1 -1
- package/lib-cjs/data/utilities/ZoneUtilities.js +0 -1
- package/lib-cjs/data/utilities/generateColor.js +1 -1
- package/lib-cjs/data/utilities/isNumber.js +7 -0
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +35 -34
- package/lib/component/panels/RangesPanel/TableColumns/RemoveAssignmentsButton.d.ts +0 -3
- package/lib/component/reducer/actions/HistoryActions.d.ts +0 -4
- package/lib/component/reducer/actions/HistoryActions.js +0 -40
- package/lib/component/reducer/types/HistoryTypes.d.ts +0 -4
- package/lib/component/reducer/types/HistoryTypes.js +0 -4
- package/lib/component/reducer/types/Types.d.ts +0 -132
- package/lib/component/reducer/types/Types.js +0 -126
- package/lib/component/toolbar/HistoryToolBar.d.ts +0 -8
- package/lib/component/toolbar/HistoryToolBar.js +0 -30
- package/lib/data/utilities/isMolFileEmpty.d.ts +0 -1
- package/lib/data/utilities/isMolFileEmpty.js +0 -6
- package/lib-cjs/component/reducer/actions/HistoryActions.js +0 -45
- package/lib-cjs/component/reducer/types/HistoryTypes.js +0 -7
- package/lib-cjs/component/reducer/types/Types.js +0 -131
- package/lib-cjs/component/toolbar/HistoryToolBar.js +0 -35
- package/lib-cjs/data/utilities/isMolFileEmpty.js +0 -10
|
@@ -12,8 +12,6 @@ const DispatchContext_1 = require("../../../context/DispatchContext");
|
|
|
12
12
|
const Select_1 = __importDefault(require("../../../elements/Select"));
|
|
13
13
|
const Modal_1 = require("../../../elements/popup/Modal");
|
|
14
14
|
const EditZoneModal_1 = __importDefault(require("../../../modal/editZone/EditZoneModal"));
|
|
15
|
-
const Types_1 = require("../../../reducer/types/Types");
|
|
16
|
-
const ToolTypes_1 = require("../../../toolbar/ToolTypes");
|
|
17
15
|
const selectBoxStyle = {
|
|
18
16
|
marginLeft: 2,
|
|
19
17
|
marginRight: 2,
|
|
@@ -24,18 +22,18 @@ function ActionsColumn({ rowData, rowSpanTags }) {
|
|
|
24
22
|
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
25
23
|
const assignmentData = (0, AssignmentsContext_1.useAssignmentData)();
|
|
26
24
|
const modal = (0, Modal_1.useModal)();
|
|
27
|
-
const changeSignalKindHandler = (0, react_1.useCallback)((
|
|
25
|
+
const changeSignalKindHandler = (0, react_1.useCallback)((kind) => {
|
|
28
26
|
dispatch({
|
|
29
|
-
type:
|
|
27
|
+
type: 'CHANGE_ZONE_SIGNAL_KIND',
|
|
30
28
|
payload: {
|
|
31
|
-
rowData,
|
|
32
|
-
|
|
29
|
+
zoneData: rowData,
|
|
30
|
+
kind,
|
|
33
31
|
},
|
|
34
32
|
});
|
|
35
33
|
}, [dispatch, rowData]);
|
|
36
34
|
const deleteZoneHandler = (0, react_1.useCallback)(() => {
|
|
37
35
|
dispatch({
|
|
38
|
-
type:
|
|
36
|
+
type: 'DELETE_2D_ZONE',
|
|
39
37
|
payload: {
|
|
40
38
|
id: rowData.id,
|
|
41
39
|
assignmentData,
|
|
@@ -45,31 +43,35 @@ function ActionsColumn({ rowData, rowSpanTags }) {
|
|
|
45
43
|
const zoomZoneHandler = (0, react_1.useCallback)(() => {
|
|
46
44
|
const xMargin = Math.abs(rowData.x.from - rowData.x.to) * 10;
|
|
47
45
|
dispatch({
|
|
48
|
-
type:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
type: 'SET_X_DOMAIN',
|
|
47
|
+
payload: {
|
|
48
|
+
xDomain: rowData.x.from <= rowData.x.to
|
|
49
|
+
? [rowData.x.from - xMargin, rowData.x.to + xMargin]
|
|
50
|
+
: [rowData.x.to - xMargin, rowData.x.from + xMargin],
|
|
51
|
+
},
|
|
52
52
|
});
|
|
53
53
|
const yMargin = Math.abs(rowData.y.from - rowData.y.to) * 10;
|
|
54
54
|
dispatch({
|
|
55
|
-
type:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
type: 'SET_Y_DOMAIN',
|
|
56
|
+
payload: {
|
|
57
|
+
yDomain: rowData.y.from <= rowData.y.to
|
|
58
|
+
? [rowData.y.from - yMargin, rowData.y.to + yMargin]
|
|
59
|
+
: [rowData.y.to - yMargin, rowData.y.from + yMargin],
|
|
60
|
+
},
|
|
59
61
|
});
|
|
60
62
|
}, [dispatch, rowData.x.from, rowData.x.to, rowData.y.from, rowData.y.to]);
|
|
61
|
-
const saveEditZoneHandler = (0, react_1.useCallback)((
|
|
63
|
+
const saveEditZoneHandler = (0, react_1.useCallback)((zone) => {
|
|
62
64
|
dispatch({
|
|
63
|
-
type:
|
|
65
|
+
type: 'SAVE_EDITED_ZONE',
|
|
64
66
|
payload: {
|
|
65
|
-
|
|
67
|
+
zone,
|
|
66
68
|
},
|
|
67
69
|
});
|
|
68
70
|
}, [dispatch]);
|
|
69
71
|
const openEditZoneHandler = (0, react_1.useCallback)(() => {
|
|
70
72
|
dispatch({
|
|
71
|
-
type:
|
|
72
|
-
payload: { selectedTool:
|
|
73
|
+
type: 'SET_SELECTED_TOOL',
|
|
74
|
+
payload: { selectedTool: 'editRange' },
|
|
73
75
|
});
|
|
74
76
|
modal.show((0, jsx_runtime_1.jsx)(EditZoneModal_1.default, { onCloseEditZoneModal: () => modal.close(), onSaveEditZoneModal: saveEditZoneHandler, onZoomEditZoneModal: () => zoomZoneHandler(), rowData: rowData }), {
|
|
75
77
|
position: Modal_1.positions.MIDDLE_RIGHT,
|
|
@@ -1,23 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
visibility: showUnlinkButton ? 'visible' : 'hidden',
|
|
19
|
-
padding: 0,
|
|
20
|
-
margin: 0,
|
|
21
|
-
}, onClick: (e) => onUnlink(e, false, axis), children: (0, jsx_runtime_1.jsx)(fa_1.FaMinusCircle, { color: "red" }) }) })] })) : assignment.isActive && assignment.activated?.axis === axis ? ('0') : ('') }));
|
|
3
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
4
|
+
const RemoveAssignmentsButton_1 = require("../../../elements/RemoveAssignmentsButton");
|
|
5
|
+
function SignalAssignmentsColumn({ rowData, assignment, highlight, onHover, onClick, onUnlink, axis, }) {
|
|
6
|
+
const diaIDs = rowData?.tableMetaInfo?.signal?.[axis]?.diaIDs || [];
|
|
7
|
+
const isAssignmentActive = assignment.isActive && assignment.activated?.axis === axis;
|
|
8
|
+
const tdCss = assignment.isActive || highlight.isActive
|
|
9
|
+
? {
|
|
10
|
+
color: 'red',
|
|
11
|
+
fontWeight: 'bold',
|
|
12
|
+
}
|
|
13
|
+
: {};
|
|
14
|
+
return ((0, jsx_runtime_1.jsx)("td", { ...onHover, onClick: (e) => onClick(e, assignment, axis), style: { padding: '0', ...tdCss }, css: !isAssignmentActive && RemoveAssignmentsButton_1.removeAssignmentCssStyle, children: (diaIDs?.length > 0 || isAssignmentActive) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { children: diaIDs?.length || 0 }), (0, jsx_runtime_1.jsx)(RemoveAssignmentsButton_1.RemoveAssignmentsButton, { onClick: (e) => onUnlink(e, false, axis) })] })) }));
|
|
22
15
|
}
|
|
23
16
|
exports.default = SignalAssignmentsColumn;
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
7
|
const react_1 = require("react");
|
|
8
8
|
const SignalAssignmentsColumn_1 = __importDefault(require("./SignalAssignmentsColumn"));
|
|
9
|
-
function SignalAssignmentsColumns({ rowData, assignmentSignal, onHoverSignalX, onHoverSignalY,
|
|
10
|
-
return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(SignalAssignmentsColumn_1.default, { rowData: rowData, assignment: assignmentSignal, highlight: highlightSignalX, onHover: onHoverSignalX, onClick: onClick, onUnlink: onUnlink, axis: "x"
|
|
9
|
+
function SignalAssignmentsColumns({ rowData, assignmentSignal, onHoverSignalX, onHoverSignalY, onClick, onUnlink, highlightSignalX, highlightSignalY, }) {
|
|
10
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(SignalAssignmentsColumn_1.default, { rowData: rowData, assignment: assignmentSignal, highlight: highlightSignalX, onHover: onHoverSignalX, onClick: onClick, onUnlink: onUnlink, axis: "x" }), (0, jsx_runtime_1.jsx)(SignalAssignmentsColumn_1.default, { rowData: rowData, assignment: assignmentSignal, highlight: highlightSignalY, onHover: onHoverSignalY, onClick: onClick, onUnlink: onUnlink, axis: "y" })] }));
|
|
11
11
|
}
|
|
12
12
|
exports.default = SignalAssignmentsColumns;
|
|
@@ -8,7 +8,6 @@ const get_1 = __importDefault(require("lodash/get"));
|
|
|
8
8
|
const react_1 = require("react");
|
|
9
9
|
const DispatchContext_1 = require("../../../context/DispatchContext");
|
|
10
10
|
const EditableColumn_1 = __importDefault(require("../../../elements/EditableColumn"));
|
|
11
|
-
const Types_1 = require("../../../reducer/types/Types");
|
|
12
11
|
const formatNumber_1 = require("../../../utility/formatNumber");
|
|
13
12
|
function SignalDeltaColumn({ rowData, onHoverSignalX, onHoverSignalY, format, }) {
|
|
14
13
|
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
@@ -18,20 +17,20 @@ function SignalDeltaColumn({ rowData, onHoverSignalX, onHoverSignalY, format, })
|
|
|
18
17
|
const saveXHandler = (0, react_1.useCallback)((event) => {
|
|
19
18
|
const value = event.target.value;
|
|
20
19
|
dispatch({
|
|
21
|
-
type:
|
|
20
|
+
type: 'CHANGE_ZONE_SIGNAL_VALUE',
|
|
22
21
|
payload: {
|
|
23
|
-
|
|
24
|
-
signal: { id,
|
|
22
|
+
zoneId: rowData.id,
|
|
23
|
+
signal: { id, deltaX: value },
|
|
25
24
|
},
|
|
26
25
|
});
|
|
27
26
|
}, [dispatch, id, rowData.id]);
|
|
28
27
|
const saveYHandler = (0, react_1.useCallback)((event) => {
|
|
29
28
|
const value = event.target.value;
|
|
30
29
|
dispatch({
|
|
31
|
-
type:
|
|
30
|
+
type: 'CHANGE_ZONE_SIGNAL_VALUE',
|
|
32
31
|
payload: {
|
|
33
|
-
|
|
34
|
-
signal: { id,
|
|
32
|
+
zoneId: rowData.id,
|
|
33
|
+
signal: { id, deltaY: value },
|
|
35
34
|
},
|
|
36
35
|
});
|
|
37
36
|
}, [dispatch, id, rowData.id]);
|
|
@@ -1,26 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
3
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
4
|
+
const RemoveAssignmentsButton_1 = require("../../../elements/RemoveAssignmentsButton");
|
|
5
|
+
function getStyle(flag, isCompletelyAssigned) {
|
|
6
|
+
if (flag) {
|
|
7
|
+
return {
|
|
8
|
+
color: 'red',
|
|
9
|
+
fontWeight: 'bold',
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
else if (isCompletelyAssigned) {
|
|
13
|
+
return { color: 'green', fontWeight: 'bold' };
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
return { color: 'black', fontWeight: 'normal' };
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function ZoneAssignmentColumn({ rowData, assignment, highlight, onHover, onClick, onUnlink, axis, rowSpanTags, }) {
|
|
20
|
+
const diaIDs = rowData?.[axis].diaIDs || []; // diaIds at the level of zone
|
|
21
|
+
const isAssignmentActive = assignment.isActive && assignment.activated?.axis === axis;
|
|
22
|
+
const flag = isAssignmentActive ||
|
|
23
|
+
(assignment.isOver && assignment.highlighted?.axis === axis) ||
|
|
24
|
+
highlight.isActive;
|
|
25
|
+
let totalNumberOfAtoms = rowData?.[axis]?.nbAtoms || 0;
|
|
26
|
+
for (const signal of rowData?.signals || []) {
|
|
27
|
+
totalNumberOfAtoms += signal?.[axis]?.nbAtoms || 0;
|
|
28
|
+
}
|
|
29
|
+
return ((0, jsx_runtime_1.jsx)("td", { ...rowSpanTags, ...onHover, onClick: (e) => onClick(e, assignment, axis), css: !isAssignmentActive && RemoveAssignmentsButton_1.removeAssignmentCssStyle, children: (totalNumberOfAtoms > 0 || isAssignmentActive) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [totalNumberOfAtoms, " ", ' ( ', (0, jsx_runtime_1.jsx)("span", { style: getStyle(flag, false), children: diaIDs?.length || 0 }), ' ) ', (0, jsx_runtime_1.jsx)(RemoveAssignmentsButton_1.RemoveAssignmentsButton, { onClick: (e) => onUnlink(e, true, axis) })] })) }));
|
|
25
30
|
}
|
|
26
31
|
exports.default = ZoneAssignmentColumn;
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
7
|
const react_1 = require("react");
|
|
8
8
|
const ZoneAssignmentsColumn_1 = __importDefault(require("./ZoneAssignmentsColumn"));
|
|
9
|
-
function ZoneAssignmentsColumns({ rowData, assignmentZone, onHoverZoneX, onHoverZoneY,
|
|
10
|
-
return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ZoneAssignmentsColumn_1.default, { rowData: rowData, assignment: assignmentZone, highlight: highlightZoneX, onHover: onHoverZoneX, onClick: onClick, onUnlink: onUnlink, axis: 'x',
|
|
9
|
+
function ZoneAssignmentsColumns({ rowData, assignmentZone, onHoverZoneX, onHoverZoneY, rowSpanTags, onClick, onUnlink, highlightZoneX, highlightZoneY, }) {
|
|
10
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ZoneAssignmentsColumn_1.default, { rowData: rowData, assignment: assignmentZone, highlight: highlightZoneX, onHover: onHoverZoneX, onClick: onClick, onUnlink: onUnlink, axis: 'x', rowSpanTags: rowSpanTags }), (0, jsx_runtime_1.jsx)(ZoneAssignmentsColumn_1.default, { rowData: rowData, assignment: assignmentZone, highlight: highlightZoneY, onHover: onHoverZoneY, onClick: onClick, onUnlink: onUnlink, axis: 'y', rowSpanTags: rowSpanTags })] }));
|
|
11
11
|
}
|
|
12
12
|
exports.default = ZoneAssignmentsColumns;
|
|
@@ -16,7 +16,6 @@ const ToolTip_1 = __importDefault(require("../../elements/ToolTip/ToolTip"));
|
|
|
16
16
|
const Modal_1 = require("../../elements/popup/Modal");
|
|
17
17
|
const useSpectrum_1 = __importDefault(require("../../hooks/useSpectrum"));
|
|
18
18
|
const Reducer_1 = require("../../reducer/Reducer");
|
|
19
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
20
19
|
const BasicPanelStyle_1 = require("../extra/BasicPanelStyle");
|
|
21
20
|
const NoTableData_1 = __importDefault(require("../extra/placeholder/NoTableData"));
|
|
22
21
|
const DefaultPanelHeader_1 = __importDefault(require("../header/DefaultPanelHeader"));
|
|
@@ -86,11 +85,11 @@ function ZonesPanelInner({ zones, activeTab, xDomain, yDomain, experiment, showZ
|
|
|
86
85
|
const handleOnFilter = (0, react_2.useCallback)(() => {
|
|
87
86
|
setFilterIsActive(!filterIsActive);
|
|
88
87
|
}, [filterIsActive]);
|
|
89
|
-
const unlinkZoneHandler = (0, react_2.useCallback)((zoneData
|
|
88
|
+
const unlinkZoneHandler = (0, react_2.useCallback)((zoneData, isOnZoneLevel = undefined, signalIndex = -1, axis = undefined) => {
|
|
90
89
|
dispatch({
|
|
91
|
-
type:
|
|
90
|
+
type: 'UNLINK_ZONE',
|
|
92
91
|
payload: {
|
|
93
|
-
zoneData,
|
|
92
|
+
zone: zoneData,
|
|
94
93
|
assignmentData,
|
|
95
94
|
isOnZoneLevel,
|
|
96
95
|
signalIndex,
|
|
@@ -114,7 +113,7 @@ function ZonesPanelInner({ zones, activeTab, xDomain, yDomain, experiment, showZ
|
|
|
114
113
|
{
|
|
115
114
|
text: 'Yes',
|
|
116
115
|
handler: () => {
|
|
117
|
-
dispatch({ type:
|
|
116
|
+
dispatch({ type: 'DELETE_2D_ZONE', payload: { assignmentData } });
|
|
118
117
|
},
|
|
119
118
|
},
|
|
120
119
|
{ text: 'No' },
|
|
@@ -129,13 +128,13 @@ function ZonesPanelInner({ zones, activeTab, xDomain, yDomain, experiment, showZ
|
|
|
129
128
|
setFlipStatus(false);
|
|
130
129
|
}, []);
|
|
131
130
|
const handleSetShowZones = () => {
|
|
132
|
-
dispatch({ type:
|
|
131
|
+
dispatch({ type: 'SHOW_ZONES', payload: { id } });
|
|
133
132
|
};
|
|
134
133
|
const handleSetShowSignals = () => {
|
|
135
|
-
dispatch({ type:
|
|
134
|
+
dispatch({ type: 'SHOW_ZONES_SIGNALS', payload: { id } });
|
|
136
135
|
};
|
|
137
136
|
const handleSetShowPeaks = () => {
|
|
138
|
-
dispatch({ type:
|
|
137
|
+
dispatch({ type: 'SHOW_ZONES_PEAKS', payload: { id } });
|
|
139
138
|
};
|
|
140
139
|
return ((0, jsx_runtime_1.jsxs)("div", { css: [
|
|
141
140
|
BasicPanelStyle_1.tablePanelStyle,
|
|
@@ -156,15 +155,13 @@ function ZonesPanel() {
|
|
|
156
155
|
const { displayerKey, xDomain, yDomain, view: { zones: zoneState, spectra: { activeTab }, }, } = (0, ChartContext_1.useChartData)();
|
|
157
156
|
const { zones, info, id } = (0, useSpectrum_1.default)(emptyData);
|
|
158
157
|
const zoneProps = zoneState.find((r) => r.spectrumID === id) || Reducer_1.zoneStateInit;
|
|
159
|
-
return ((0, jsx_runtime_1.jsx)(MemoizedZonesPanel, {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
...zoneProps,
|
|
168
|
-
} }));
|
|
158
|
+
return ((0, jsx_runtime_1.jsx)(MemoizedZonesPanel, { id,
|
|
159
|
+
xDomain,
|
|
160
|
+
yDomain,
|
|
161
|
+
activeTab,
|
|
162
|
+
displayerKey,
|
|
163
|
+
zones,
|
|
164
|
+
experiment: info.experiment,
|
|
165
|
+
...zoneProps }));
|
|
169
166
|
}
|
|
170
167
|
exports.default = ZonesPanel;
|
|
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
7
7
|
/** @jsxImportSource @emotion/react */
|
|
8
8
|
const react_1 = require("@emotion/react");
|
|
9
|
-
const react_2 = require("react");
|
|
10
9
|
const fa_1 = require("react-icons/fa");
|
|
11
10
|
const usePanelPreferences_1 = require("../../hooks/usePanelPreferences");
|
|
12
11
|
const useTableSortBy_1 = __importDefault(require("../../hooks/useTableSortBy"));
|
|
13
12
|
const ZonesTableRow_1 = __importDefault(require("./ZonesTableRow"));
|
|
13
|
+
const useMapZones_1 = require("./hooks/useMapZones");
|
|
14
14
|
const tableStyle = (0, react_1.css) `
|
|
15
15
|
border-spacing: 0;
|
|
16
16
|
border: 1px solid #dedede;
|
|
@@ -64,56 +64,7 @@ const tableStyle = (0, react_1.css) `
|
|
|
64
64
|
}
|
|
65
65
|
`;
|
|
66
66
|
function ZonesTable({ tableData, onUnlink, nuclei, experiment, }) {
|
|
67
|
-
const data = (0,
|
|
68
|
-
const data = [];
|
|
69
|
-
for (const [i, zone] of tableData.entries()) {
|
|
70
|
-
if (zone.signals.length === 1) {
|
|
71
|
-
data.push({
|
|
72
|
-
...zone,
|
|
73
|
-
tableMetaInfo: {
|
|
74
|
-
...zone.tableMetaInfo,
|
|
75
|
-
signal: zone.signals[0],
|
|
76
|
-
rowIndex: i,
|
|
77
|
-
signalIndex: 0,
|
|
78
|
-
id: zone.signals[0].id,
|
|
79
|
-
experiment,
|
|
80
|
-
nuclei,
|
|
81
|
-
},
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
else if (zone.signals.length > 1) {
|
|
85
|
-
for (const [j, signal] of zone.signals.entries()) {
|
|
86
|
-
let hide = false;
|
|
87
|
-
let rowSpan = null;
|
|
88
|
-
if (j < zone.signals.length - 1) {
|
|
89
|
-
if (j === 0) {
|
|
90
|
-
rowSpan = zone.signals.length;
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
hide = true;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
hide = true;
|
|
98
|
-
}
|
|
99
|
-
data.push({
|
|
100
|
-
...zone,
|
|
101
|
-
tableMetaInfo: {
|
|
102
|
-
...zone.tableMetaInfo,
|
|
103
|
-
signal,
|
|
104
|
-
rowSpan,
|
|
105
|
-
hide,
|
|
106
|
-
rowIndex: i,
|
|
107
|
-
signalIndex: j,
|
|
108
|
-
id: signal.id,
|
|
109
|
-
experiment,
|
|
110
|
-
},
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
return data;
|
|
116
|
-
}, [experiment, nuclei, tableData]);
|
|
67
|
+
const data = (0, useMapZones_1.useMapZones)(tableData, { nuclei, experiment });
|
|
117
68
|
const { items: sortedData, isSortedDesc, onSort } = (0, useTableSortBy_1.default)(data);
|
|
118
69
|
const { deltaPPM: deltaX } = (0, usePanelPreferences_1.usePanelPreferences)('zones', nuclei[0]);
|
|
119
70
|
const { deltaPPM: deltaY } = (0, usePanelPreferences_1.usePanelPreferences)('zones', nuclei[1]);
|
|
@@ -25,10 +25,6 @@ function ZonesTableRow({ rowData, onUnlink, contextMenu = [], onContextMenuSelec
|
|
|
25
25
|
const assignmentSignal = (0, AssignmentsContext_1.useAssignment)(rowData.tableMetaInfo.id);
|
|
26
26
|
const highlightSignalX = (0, highlight_1.useHighlight)([(0, Concatenation_1.buildID)(assignmentSignal.id, 'X')].concat(assignmentSignal.assigned?.x || [], (0, Concatenation_1.buildID)(assignmentSignal.id, 'Crosshair')));
|
|
27
27
|
const highlightSignalY = (0, highlight_1.useHighlight)([(0, Concatenation_1.buildID)(assignmentSignal.id, 'Y')].concat(assignmentSignal.assigned?.y || [], (0, Concatenation_1.buildID)(assignmentSignal.id, 'Crosshair')));
|
|
28
|
-
const [showUnlinkButtonZoneX, setShowUnlinkButtonZoneX] = (0, react_1.useState)(false);
|
|
29
|
-
const [showUnlinkButtonZoneY, setShowUnlinkButtonZoneY] = (0, react_1.useState)(false);
|
|
30
|
-
const [showUnlinkButtonSignalX, setShowUnlinkButtonSignalX] = (0, react_1.useState)(false);
|
|
31
|
-
const [showUnlinkButtonSignalY, setShowUnlinkButtonSignalY] = (0, react_1.useState)(false);
|
|
32
28
|
const rowSpanTags = (0, react_1.useMemo)(() => {
|
|
33
29
|
return {
|
|
34
30
|
rowSpan: rowData.tableMetaInfo.rowSpan,
|
|
@@ -46,43 +42,27 @@ function ZonesTableRow({ rowData, onUnlink, contextMenu = [], onContextMenuSelec
|
|
|
46
42
|
if (axis === 'x') {
|
|
47
43
|
if (isOnZoneLevel !== undefined) {
|
|
48
44
|
if (isOnZoneLevel) {
|
|
49
|
-
setShowUnlinkButtonZoneX(false);
|
|
50
45
|
assignmentZone.removeAll('x');
|
|
51
46
|
}
|
|
52
47
|
else {
|
|
53
|
-
setShowUnlinkButtonSignalX(false);
|
|
54
48
|
assignmentSignal.removeAll('x');
|
|
55
49
|
}
|
|
56
50
|
}
|
|
57
|
-
else {
|
|
58
|
-
setShowUnlinkButtonZoneX(false);
|
|
59
|
-
setShowUnlinkButtonSignalX(false);
|
|
60
|
-
}
|
|
61
51
|
}
|
|
62
52
|
else if (axis === 'y') {
|
|
63
53
|
if (isOnZoneLevel !== undefined) {
|
|
64
54
|
if (isOnZoneLevel) {
|
|
65
|
-
setShowUnlinkButtonZoneY(false);
|
|
66
55
|
assignmentZone.removeAll('y');
|
|
67
56
|
}
|
|
68
57
|
else {
|
|
69
|
-
setShowUnlinkButtonSignalY(false);
|
|
70
58
|
assignmentSignal.removeAll('y');
|
|
71
59
|
}
|
|
72
60
|
}
|
|
73
|
-
else {
|
|
74
|
-
setShowUnlinkButtonZoneY(false);
|
|
75
|
-
setShowUnlinkButtonSignalY(false);
|
|
76
|
-
}
|
|
77
61
|
}
|
|
78
62
|
else {
|
|
79
|
-
setShowUnlinkButtonZoneX(false);
|
|
80
63
|
assignmentZone.removeAll('x');
|
|
81
|
-
setShowUnlinkButtonSignalX(false);
|
|
82
64
|
assignmentSignal.removeAll('x');
|
|
83
|
-
setShowUnlinkButtonZoneY(false);
|
|
84
65
|
assignmentZone.removeAll('y');
|
|
85
|
-
setShowUnlinkButtonSignalY(false);
|
|
86
66
|
assignmentSignal.removeAll('y');
|
|
87
67
|
}
|
|
88
68
|
}, [assignmentSignal, assignmentZone, onUnlink, rowData]);
|
|
@@ -142,6 +122,6 @@ function ZonesTableRow({ rowData, onUnlink, contextMenu = [], onContextMenuSelec
|
|
|
142
122
|
? HighlightedRowStyle
|
|
143
123
|
: (0, get_1.default)(rowData, 'tableMetaInfo.isConstantlyHighlighted', false)
|
|
144
124
|
? ConstantlyHighlightedRowStyle
|
|
145
|
-
: null, ...highlightZone.onHover, children: [(0, jsx_runtime_1.jsx)("td", { ...rowSpanTags, children: rowIndex + 1 }), (0, jsx_runtime_1.jsx)(SignalDeltaColumn_1.default, { rowData: rowData, onHoverSignalX: onHoverSignalX, onHoverSignalY: onHoverSignalY, format: format }), (0, jsx_runtime_1.jsx)(SignalAssignmentsColumns_1.default, { rowData: rowData, assignmentSignal: assignmentSignal, onHoverSignalX: onHoverSignalX, onHoverSignalY: onHoverSignalY,
|
|
125
|
+
: null, ...highlightZone.onHover, children: [(0, jsx_runtime_1.jsx)("td", { ...rowSpanTags, children: rowIndex + 1 }), (0, jsx_runtime_1.jsx)(SignalDeltaColumn_1.default, { rowData: rowData, onHoverSignalX: onHoverSignalX, onHoverSignalY: onHoverSignalY, format: format }), (0, jsx_runtime_1.jsx)(SignalAssignmentsColumns_1.default, { rowData: rowData, assignmentSignal: assignmentSignal, onHoverSignalX: onHoverSignalX, onHoverSignalY: onHoverSignalY, onClick: clickHandler, onUnlink: unlinkHandler, highlightSignalX: highlightSignalX, highlightSignalY: highlightSignalY }), (0, jsx_runtime_1.jsx)(ZoneAssignmentsColumns_1.default, { rowData: rowData, assignmentZone: assignmentZone, onHoverZoneX: onHoverZoneX, onHoverZoneY: onHoverZoneY, rowSpanTags: rowSpanTags, onClick: clickHandler, onUnlink: unlinkHandler, highlightZoneX: highlightZoneX, highlightZoneY: highlightZoneY }), (0, jsx_runtime_1.jsx)(ActionsColumn_1.default, { rowData: rowData, rowSpanTags: rowSpanTags })] }));
|
|
146
126
|
}
|
|
147
127
|
exports.default = ZonesTableRow;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useMapZones = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
function useMapZones(data, info) {
|
|
6
|
+
return (0, react_1.useMemo)(() => {
|
|
7
|
+
const zonesData = [];
|
|
8
|
+
for (const [i, zone] of data.entries()) {
|
|
9
|
+
if (zone.signals.length === 1) {
|
|
10
|
+
zonesData.push({
|
|
11
|
+
...zone,
|
|
12
|
+
tableMetaInfo: {
|
|
13
|
+
...zone.tableMetaInfo,
|
|
14
|
+
signal: zone.signals[0],
|
|
15
|
+
rowIndex: i,
|
|
16
|
+
signalIndex: 0,
|
|
17
|
+
id: zone.signals[0].id,
|
|
18
|
+
...info,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
else if (zone.signals.length > 1) {
|
|
23
|
+
for (const [j, signal] of zone.signals.entries()) {
|
|
24
|
+
let hide = false;
|
|
25
|
+
let rowSpan = null;
|
|
26
|
+
if (j < zone.signals.length - 1) {
|
|
27
|
+
if (j === 0) {
|
|
28
|
+
rowSpan = zone.signals.length;
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
hide = true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
hide = true;
|
|
36
|
+
}
|
|
37
|
+
zonesData.push({
|
|
38
|
+
...zone,
|
|
39
|
+
tableMetaInfo: {
|
|
40
|
+
...zone.tableMetaInfo,
|
|
41
|
+
signal,
|
|
42
|
+
rowSpan,
|
|
43
|
+
hide,
|
|
44
|
+
rowIndex: i,
|
|
45
|
+
signalIndex: j,
|
|
46
|
+
id: signal.id,
|
|
47
|
+
experiment: info.experiment,
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return zonesData;
|
|
54
|
+
}, [data, info]);
|
|
55
|
+
}
|
|
56
|
+
exports.useMapZones = useMapZones;
|
|
@@ -28,7 +28,6 @@ const Modal_1 = require("../../elements/popup/Modal");
|
|
|
28
28
|
const useFormatNumberByNucleus_1 = require("../../hooks/useFormatNumberByNucleus");
|
|
29
29
|
const useToolsFunctions_1 = __importDefault(require("../../hooks/useToolsFunctions"));
|
|
30
30
|
const Constants_1 = require("../../reducer/core/Constants");
|
|
31
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
32
31
|
const ToolTypes_1 = require("../../toolbar/ToolTypes");
|
|
33
32
|
const Events_1 = __importDefault(require("../../utility/Events"));
|
|
34
33
|
const export_1 = require("../../utility/export");
|
|
@@ -203,10 +202,13 @@ function DatabasePanelInner({ nucleus, selectedTool, databases, defaultDatabase,
|
|
|
203
202
|
const { data } = await (0, nmr_load_save_1.readFromWebSource)({
|
|
204
203
|
entries: [{ baseURL, relativePath: jcampRelativeURL }],
|
|
205
204
|
});
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
205
|
+
const spectrum = data?.spectra?.[0] || null;
|
|
206
|
+
if (spectrum && (0, Spectrum1D_1.isSpectrum1D)(spectrum)) {
|
|
207
|
+
dispatch({
|
|
208
|
+
type: 'RESURRECTING_SPECTRUM_FROM_JCAMP',
|
|
209
|
+
payload: { ranges, spectrum },
|
|
210
|
+
});
|
|
211
|
+
}
|
|
210
212
|
}
|
|
211
213
|
catch {
|
|
212
214
|
alert.error(`Failed to load Jcamp`);
|
|
@@ -218,7 +220,7 @@ function DatabasePanelInner({ nucleus, selectedTool, databases, defaultDatabase,
|
|
|
218
220
|
}
|
|
219
221
|
else {
|
|
220
222
|
dispatch({
|
|
221
|
-
type:
|
|
223
|
+
type: 'RESURRECTING_SPECTRUM_FROM_RANGES',
|
|
222
224
|
payload: { ranges, info: { solvent, nucleus, name: names[0] } },
|
|
223
225
|
});
|
|
224
226
|
}
|
|
@@ -7,7 +7,6 @@ const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
|
7
7
|
const DispatchContext_1 = require("../../context/DispatchContext");
|
|
8
8
|
const Context_1 = require("../../elements/popup/Alert/Context");
|
|
9
9
|
const Context_2 = require("../../elements/popup/Modal/Context");
|
|
10
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
11
10
|
const BasicPanelStyle_1 = require("../extra/BasicPanelStyle");
|
|
12
11
|
const DefaultPanelHeader_1 = __importDefault(require("../header/DefaultPanelHeader"));
|
|
13
12
|
const FiltersTable_1 = __importDefault(require("./FiltersTable"));
|
|
@@ -21,7 +20,7 @@ function FiltersPanel() {
|
|
|
21
20
|
text: 'Yes',
|
|
22
21
|
handler: async () => {
|
|
23
22
|
const hideLoading = await alert.showLoading('Delete filters process in progress');
|
|
24
|
-
dispatch({ type:
|
|
23
|
+
dispatch({ type: 'DELETE_FILTER', payload: {} });
|
|
25
24
|
hideLoading();
|
|
26
25
|
},
|
|
27
26
|
},
|
|
@@ -17,7 +17,6 @@ const Alert_1 = require("../../elements/popup/Alert");
|
|
|
17
17
|
const Modal_1 = require("../../elements/popup/Modal");
|
|
18
18
|
const useSpectraPerNucleus_1 = __importDefault(require("../../hooks/useSpectraPerNucleus"));
|
|
19
19
|
const useSpectrum_1 = __importDefault(require("../../hooks/useSpectrum"));
|
|
20
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
21
20
|
const rowColors = {
|
|
22
21
|
active: {
|
|
23
22
|
base: {
|
|
@@ -39,11 +38,11 @@ function FiltersTableInner({ filters, spectraCounter, activeFilterID, }) {
|
|
|
39
38
|
const modal = (0, Modal_1.useModal)();
|
|
40
39
|
const alert = (0, Alert_1.useAlert)();
|
|
41
40
|
const selectedFilterIndex = (0, react_1.useRef)();
|
|
42
|
-
const handelFilterCheck = (0, react_1.useCallback)((id,
|
|
41
|
+
const handelFilterCheck = (0, react_1.useCallback)((id, enabled) => {
|
|
43
42
|
void (async () => {
|
|
44
|
-
const hideLoading = await alert.showLoading(`${
|
|
43
|
+
const hideLoading = await alert.showLoading(`${enabled ? 'Enable' : 'Disable'} filter in progress`);
|
|
45
44
|
setTimeout(() => {
|
|
46
|
-
dispatch({ type:
|
|
45
|
+
dispatch({ type: 'ENABLE_FILTER', payload: { id, enabled } });
|
|
47
46
|
hideLoading();
|
|
48
47
|
}, 0);
|
|
49
48
|
})();
|
|
@@ -54,7 +53,7 @@ function FiltersTableInner({ filters, spectraCounter, activeFilterID, }) {
|
|
|
54
53
|
text: 'Yes',
|
|
55
54
|
handler: async () => {
|
|
56
55
|
const hideLoading = await alert.showLoading('Delete filter process in progress');
|
|
57
|
-
dispatch({ type:
|
|
56
|
+
dispatch({ type: 'DELETE_FILTER', payload: { id } });
|
|
58
57
|
hideLoading();
|
|
59
58
|
},
|
|
60
59
|
},
|
|
@@ -66,8 +65,8 @@ function FiltersTableInner({ filters, spectraCounter, activeFilterID, }) {
|
|
|
66
65
|
handler: async () => {
|
|
67
66
|
const hideLoading = await alert.showLoading('Delete all spectra filter process in progress');
|
|
68
67
|
dispatch({
|
|
69
|
-
type:
|
|
70
|
-
payload: {
|
|
68
|
+
type: 'DELETE_SPECTRA_FILTER',
|
|
69
|
+
payload: { filterName: name },
|
|
71
70
|
});
|
|
72
71
|
hideLoading();
|
|
73
72
|
},
|
|
@@ -86,7 +85,7 @@ function FiltersTableInner({ filters, spectraCounter, activeFilterID, }) {
|
|
|
86
85
|
void (async () => {
|
|
87
86
|
const hideLoading = await alert.showLoading('Filter snapshot process in progress');
|
|
88
87
|
setTimeout(() => {
|
|
89
|
-
dispatch({ type:
|
|
88
|
+
dispatch({ type: 'SET_FILTER_SNAPSHOT', payload: filter });
|
|
90
89
|
hideLoading();
|
|
91
90
|
}, 0);
|
|
92
91
|
})();
|
|
@@ -149,6 +148,6 @@ function FilterTable() {
|
|
|
149
148
|
const { toolOptions: { data: { activeFilterID }, }, } = (0, ChartContext_1.useChartData)();
|
|
150
149
|
const { filters } = (0, useSpectrum_1.default)(emptyData);
|
|
151
150
|
const spectraCounter = (0, useSpectraPerNucleus_1.default)().length;
|
|
152
|
-
return ((0, jsx_runtime_1.jsx)(MemoizedFiltersTable, {
|
|
151
|
+
return ((0, jsx_runtime_1.jsx)(MemoizedFiltersTable, { filters, spectraCounter, activeFilterID }));
|
|
153
152
|
}
|
|
154
153
|
exports.default = FilterTable;
|
|
@@ -32,7 +32,7 @@ const styles = (0, react_1.css) `
|
|
|
32
32
|
}
|
|
33
33
|
`;
|
|
34
34
|
function DefaultPanelHeader({ counter, onDelete = () => null, deleteToolTip = 'Delete', onFilter = () => null, filterToolTip = '', filterIsActive = false, counterFiltered = 0, children, onSettingClick = () => null, showSettingButton = false, canDelete = true, disableDelete = false, style = {}, className = '', renderRightButtons, }) {
|
|
35
|
-
return ((0, jsx_runtime_1.jsxs)("div", { css: styles,
|
|
35
|
+
return ((0, jsx_runtime_1.jsxs)("div", { css: styles, style, className, children: [(0, jsx_runtime_1.jsxs)("div", { className: "left-container", children: [canDelete && ((0, jsx_runtime_1.jsx)(Button_1.default.BarButton, { color: { base: 'black', hover: 'red' }, onClick: onDelete, disabled: counter === 0 || disableDelete, toolTip: deleteToolTip, tooltipOrientation: "horizontal", children: (0, jsx_runtime_1.jsx)(fa_1.FaRegTrashAlt, {}) })), filterToolTip ? ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { popupTitle: filterToolTip, popupPlacement: "right", onClick: onFilter, defaultValue: filterIsActive, children: (0, jsx_runtime_1.jsx)(fa_1.FaFilter, { style: { pointerEvents: 'none', fontSize: '12px' } }) })) : null, children] }), renderRightButtons?.(), counter !== undefined && ((0, jsx_runtime_1.jsxs)("p", { className: "counter-label", children: ["[", ' ', filterIsActive && counterFiltered !== undefined
|
|
36
36
|
? `${counterFiltered}/${counter}`
|
|
37
37
|
: counter, ' ', "]"] })), showSettingButton && ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { title: "Preferences", popupPlacement: "left", children: (0, jsx_runtime_1.jsx)("button", { type: "button", onClick: onSettingClick, children: (0, jsx_runtime_1.jsx)(fa_1.FaCog, {}) }) }))] }));
|
|
38
38
|
}
|