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,7 +12,6 @@ const DispatchContext_1 = require("../context/DispatchContext");
|
|
|
12
12
|
const Button_1 = __importDefault(require("../elements/Button"));
|
|
13
13
|
const CloseButton_1 = __importDefault(require("../elements/CloseButton"));
|
|
14
14
|
const Context_1 = require("../elements/popup/Alert/Context");
|
|
15
|
-
const Types_1 = require("../reducer/types/Types");
|
|
16
15
|
const FileUtility_1 = require("../utility/FileUtility");
|
|
17
16
|
const styles = (0, react_1.css) `
|
|
18
17
|
display: flex;
|
|
@@ -80,8 +79,8 @@ function LoadJCAMPModal({ onClose, startLoading, }) {
|
|
|
80
79
|
entries: [{ relativePath: pathname, baseURL: origin }],
|
|
81
80
|
}).then((nmriumState) => {
|
|
82
81
|
dispatch({
|
|
83
|
-
type:
|
|
84
|
-
payload: {
|
|
82
|
+
type: 'LOAD_DROP_FILES',
|
|
83
|
+
payload: { nmriumState, resetSourceObject: false },
|
|
85
84
|
});
|
|
86
85
|
onClose?.();
|
|
87
86
|
});
|
|
@@ -8,12 +8,10 @@ const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
|
8
8
|
/** @jsxImportSource @emotion/react */
|
|
9
9
|
const react_1 = require("react");
|
|
10
10
|
const full_1 = require("react-ocl/full");
|
|
11
|
-
const isMolFileEmpty_1 = require("../../data/utilities/isMolFileEmpty");
|
|
12
11
|
const DispatchContext_1 = require("../context/DispatchContext");
|
|
13
12
|
const ActionButtons_1 = __importDefault(require("../elements/ActionButtons"));
|
|
14
13
|
const Modal_1 = require("../elements/popup/Modal");
|
|
15
14
|
const options_1 = require("../elements/popup/options");
|
|
16
|
-
const Types_1 = require("../reducer/types/Types");
|
|
17
15
|
const ModalStyle_1 = require("./ModalStyle");
|
|
18
16
|
function MoleculeStructureEditorModal(props) {
|
|
19
17
|
const { onClose = () => null, selectedMolecule } = props;
|
|
@@ -27,28 +25,35 @@ function MoleculeStructureEditorModal(props) {
|
|
|
27
25
|
setMolfile(null);
|
|
28
26
|
}
|
|
29
27
|
}, [selectedMolecule]);
|
|
30
|
-
const cb = (0, react_1.useCallback)((newMolfile) => {
|
|
31
|
-
|
|
28
|
+
const cb = (0, react_1.useCallback)((newMolfile, molecule) => {
|
|
29
|
+
if (molecule.getAllAtoms() === 0) {
|
|
30
|
+
setMolfile(null);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
setMolfile(newMolfile);
|
|
34
|
+
}
|
|
32
35
|
}, [setMolfile]);
|
|
33
36
|
const handleClose = (0, react_1.useCallback)(() => {
|
|
34
37
|
onClose();
|
|
35
38
|
}, [onClose]);
|
|
36
39
|
const handleSave = (0, react_1.useCallback)(() => {
|
|
37
|
-
if (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
40
|
+
if (molfile) {
|
|
41
|
+
if (selectedMolecule) {
|
|
42
|
+
const { id, label } = selectedMolecule;
|
|
43
|
+
dispatch({
|
|
44
|
+
type: 'SET_MOLECULE',
|
|
45
|
+
payload: {
|
|
46
|
+
molfile,
|
|
47
|
+
id,
|
|
48
|
+
label,
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
onClose('replace');
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
dispatch({ type: 'ADD_MOLECULE', payload: { molfile } });
|
|
55
|
+
onClose('new');
|
|
56
|
+
}
|
|
52
57
|
}
|
|
53
58
|
}, [dispatch, selectedMolecule, molfile, onClose]);
|
|
54
59
|
return ((0, jsx_runtime_1.jsxs)("div", { css: ModalStyle_1.ModalStyles, children: [(0, jsx_runtime_1.jsx)(full_1.StructureEditor, { initialMolfile: selectedMolecule?.molfile, svgMenu: true, fragment: false, onChange: cb }), (0, jsx_runtime_1.jsx)("div", { className: "footer-container", children: (0, jsx_runtime_1.jsx)(ActionButtons_1.default, { style: { flexDirection: 'row-reverse', margin: 0 }, onDone: handleSave, doneLabel: "Save", onCancel: handleClose }) })] }));
|
|
@@ -46,7 +46,6 @@ const FormikErrorsSummary_1 = __importDefault(require("../elements/formik/Formik
|
|
|
46
46
|
const FormikInput_1 = __importDefault(require("../elements/formik/FormikInput"));
|
|
47
47
|
const FormikSelect_1 = __importDefault(require("../elements/formik/FormikSelect"));
|
|
48
48
|
const Alert_1 = require("../elements/popup/Alert");
|
|
49
|
-
const Types_1 = require("../reducer/types/Types");
|
|
50
49
|
const LocalStorage_1 = require("../utility/LocalStorage");
|
|
51
50
|
const ModalStyle_1 = require("./ModalStyle");
|
|
52
51
|
const styles = (0, react_1.css) `
|
|
@@ -161,26 +160,30 @@ function PredictSpectraModal({ onClose = () => null, molfile, }) {
|
|
|
161
160
|
}, [predictionPreferences, predictionIndex]);
|
|
162
161
|
const submitHandler = (0, react_2.useCallback)((values) => {
|
|
163
162
|
void (async () => {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
163
|
+
if (molfile) {
|
|
164
|
+
setPredictionPreferences({ ...values, isApproved });
|
|
165
|
+
dispatch({
|
|
166
|
+
type: 'SET_LOADING_FLAG',
|
|
167
|
+
payload: {
|
|
168
|
+
isLoading: true,
|
|
169
|
+
},
|
|
170
|
+
});
|
|
171
|
+
const predictedSpectra = Object.entries(values.spectra)
|
|
172
|
+
.map(([key, value]) => {
|
|
173
|
+
if (value) {
|
|
174
|
+
return key;
|
|
175
|
+
}
|
|
176
|
+
return undefined;
|
|
177
|
+
})
|
|
178
|
+
.join(',');
|
|
179
|
+
const hideLoading = await alert.showLoading(`Predict ${predictedSpectra} in progress`);
|
|
180
|
+
dispatch({
|
|
181
|
+
type: 'PREDICT_SPECTRA',
|
|
182
|
+
payload: { molfile, options: values },
|
|
183
|
+
});
|
|
184
|
+
hideLoading();
|
|
185
|
+
onClose();
|
|
186
|
+
}
|
|
184
187
|
})();
|
|
185
188
|
}, [alert, dispatch, isApproved, molfile, onClose, setPredictionPreferences]);
|
|
186
189
|
const approveCheckHandler = (0, react_2.useCallback)((e) => {
|
|
@@ -59,7 +59,7 @@ function SelectMolecule(props) {
|
|
|
59
59
|
}, [currentIndex, element, molecules]);
|
|
60
60
|
const setValue = (0, react_2.useCallback)((index) => {
|
|
61
61
|
setCurrentIndex(index);
|
|
62
|
-
setFieldValue(props.name, molecules[index]);
|
|
62
|
+
void setFieldValue(props.name, molecules[index]);
|
|
63
63
|
}, [molecules, props.name, setFieldValue]);
|
|
64
64
|
(0, react_2.useEffect)(() => {
|
|
65
65
|
if (molecules && molecules.length > 0) {
|
|
@@ -20,7 +20,6 @@ const FormikOnChange_1 = __importDefault(require("../../elements/formik/FormikOn
|
|
|
20
20
|
const usePanelPreferences_1 = require("../../hooks/usePanelPreferences");
|
|
21
21
|
const useSpectrum_1 = __importDefault(require("../../hooks/useSpectrum"));
|
|
22
22
|
const MultiplicityUtilities_1 = require("../../panels/extra/utilities/MultiplicityUtilities");
|
|
23
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
24
23
|
const formatNumber_1 = require("../../utility/formatNumber");
|
|
25
24
|
const SignalsForm_1 = __importDefault(require("./forms/components/SignalsForm"));
|
|
26
25
|
const EditRangeValidation_1 = __importDefault(require("./forms/validation/EditRangeValidation"));
|
|
@@ -108,12 +107,12 @@ function EditRangeModal({ onSaveEditRangeModal = () => null, onCloseEditRangeMod
|
|
|
108
107
|
multiplicity,
|
|
109
108
|
coupling: '',
|
|
110
109
|
};
|
|
111
|
-
if ((0, MultiplicityUtilities_1.hasCouplingConstant)(multiplicity) && signal?.js) {
|
|
110
|
+
if ((0, MultiplicityUtilities_1.hasCouplingConstant)(multiplicity) && signal?.js.length > 0) {
|
|
112
111
|
js = { ...signal.js[counterJ] };
|
|
113
112
|
js.coupling = Number((0, formatNumber_1.formatNumber)(js.coupling, rangesPreferences.coupling.format));
|
|
114
113
|
counterJ++;
|
|
115
114
|
}
|
|
116
|
-
js.multiplicity = (0, nmr_processing_1.translateMultiplet)(js.multiplicity ||
|
|
115
|
+
js.multiplicity = (0, nmr_processing_1.translateMultiplet)(js.multiplicity || multiplicity);
|
|
117
116
|
couplings.push(js);
|
|
118
117
|
}
|
|
119
118
|
}
|
|
@@ -132,7 +131,7 @@ function EditRangeModal({ onSaveEditRangeModal = () => null, onCloseEditRangeMod
|
|
|
132
131
|
return value;
|
|
133
132
|
})) {
|
|
134
133
|
dispatch({
|
|
135
|
-
type:
|
|
134
|
+
type: 'UPDATE_RANGE',
|
|
136
135
|
payload: { range: { ...range, signals } },
|
|
137
136
|
});
|
|
138
137
|
}
|
|
@@ -72,8 +72,8 @@ function AddSignalFormTab({ onFocus, onBlur, range, preferences }, ref) {
|
|
|
72
72
|
js: [{ multiplicity: (0, nmr_processing_1.translateMultiplet)('m'), coupling: '' }],
|
|
73
73
|
};
|
|
74
74
|
const _signals = values.signals.slice().concat(newSignal);
|
|
75
|
-
setFieldValue('signals', _signals);
|
|
76
|
-
setFieldValue('activeTab', String(_signals.length - 1));
|
|
75
|
+
void setFieldValue('signals', _signals);
|
|
76
|
+
void setFieldValue('activeTab', String(_signals.length - 1));
|
|
77
77
|
}, [setFieldValue, values.signals]);
|
|
78
78
|
const validation = (0, react_2.useMemo)(() => {
|
|
79
79
|
return Yup.object().shape({
|
|
@@ -44,7 +44,7 @@ function CouplingsTable({ push, remove, onFocus, onBlur, }) {
|
|
|
44
44
|
const { values, setFieldValue } = (0, formik_1.useFormikContext)();
|
|
45
45
|
const multiplicityChangeHandler = (0, react_2.useCallback)((value, name) => {
|
|
46
46
|
if (!(0, MultiplicityUtilities_1.hasCouplingConstant)(value)) {
|
|
47
|
-
setFieldValue(name, '');
|
|
47
|
+
void setFieldValue(name, '');
|
|
48
48
|
}
|
|
49
49
|
}, [setFieldValue]);
|
|
50
50
|
const couplingsList = (0, get_1.default)(values, `signals[${values.activeTab}].js`, []);
|
|
@@ -41,7 +41,6 @@ const ReactTable_1 = __importDefault(require("../../elements/ReactTable/ReactTab
|
|
|
41
41
|
const FormikInput_1 = __importDefault(require("../../elements/formik/FormikInput"));
|
|
42
42
|
const FormikSelect_1 = __importDefault(require("../../elements/formik/FormikSelect"));
|
|
43
43
|
const Context_1 = require("../../elements/popup/Alert/Context");
|
|
44
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
45
44
|
const convertPathArrayToString_1 = require("../../utility/convertPathArrayToString");
|
|
46
45
|
const getSpectraObjectPaths_1 = require("../../utility/getSpectraObjectPaths");
|
|
47
46
|
const ModalStyle_1 = require("../ModalStyle");
|
|
@@ -160,7 +159,7 @@ function MetaImportationModal({ onClose, file }) {
|
|
|
160
159
|
}
|
|
161
160
|
catch (error) {
|
|
162
161
|
if (error instanceof parseMeta_1.TargetPathError) {
|
|
163
|
-
formRef.current?.setFieldValue('target', null);
|
|
162
|
+
void formRef.current?.setFieldValue('target', null);
|
|
164
163
|
formRef.current?.setFieldError('target', '');
|
|
165
164
|
}
|
|
166
165
|
alert.error(error.message);
|
|
@@ -189,7 +188,7 @@ function MetaImportationModal({ onClose, file }) {
|
|
|
189
188
|
}
|
|
190
189
|
function handleImport() {
|
|
191
190
|
dispatch({
|
|
192
|
-
type:
|
|
191
|
+
type: 'IMPORT_SPECTRA_META_INFO',
|
|
193
192
|
payload: { spectraMeta: matches },
|
|
194
193
|
});
|
|
195
194
|
onClose?.();
|
|
@@ -41,7 +41,7 @@ function DatabasesTabContent({ currentWorkspace, originalWorkspaces, }) {
|
|
|
41
41
|
function deleteHandler(index) {
|
|
42
42
|
const _database = databases.data.slice();
|
|
43
43
|
_database.splice(index, 1);
|
|
44
|
-
setFieldValue('databases.data', _database);
|
|
44
|
+
void setFieldValue('databases.data', _database);
|
|
45
45
|
}
|
|
46
46
|
function addHandler() {
|
|
47
47
|
const newDatabase = {
|
|
@@ -50,17 +50,17 @@ function DatabasesTabContent({ currentWorkspace, originalWorkspaces, }) {
|
|
|
50
50
|
url: '',
|
|
51
51
|
enabled: true,
|
|
52
52
|
};
|
|
53
|
-
setFieldValue('databases.data', [...databases.data, newDatabase]);
|
|
53
|
+
void setFieldValue('databases.data', [...databases.data, newDatabase]);
|
|
54
54
|
}
|
|
55
55
|
function resetHandler() {
|
|
56
56
|
const workSpaceDisplayPreferences = (0, getPreferencesByWorkspace_1.getPreferencesByWorkspace)(currentWorkspace, originalWorkspaces);
|
|
57
57
|
const database = workSpaceDisplayPreferences.databases.data;
|
|
58
|
-
setFieldValue('databases.data', database);
|
|
58
|
+
void setFieldValue('databases.data', database);
|
|
59
59
|
}
|
|
60
60
|
return ((0, jsx_runtime_1.jsx)("fieldset", { onClick: (e) => {
|
|
61
61
|
if (e.target.checked) {
|
|
62
62
|
e.target.checked = false;
|
|
63
|
-
setFieldValue('databases.defaultDatabase', '');
|
|
63
|
+
void setFieldValue('databases.defaultDatabase', '');
|
|
64
64
|
}
|
|
65
65
|
}, children: (0, jsx_runtime_1.jsx)(GroupPane_1.GroupPane, { text: "Databases", renderHeader: (text) => {
|
|
66
66
|
return ((0, jsx_runtime_1.jsx)(DataBaseHeader, { text: text, onReset: resetHandler, onAdd: addHandler }));
|
|
@@ -64,7 +64,7 @@ function FormattingTabContent() {
|
|
|
64
64
|
_nuclei[nucleus] = nuclei[nucleus];
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
setFieldValue('formatting.nuclei', _nuclei);
|
|
67
|
+
void setFieldValue('formatting.nuclei', _nuclei);
|
|
68
68
|
}
|
|
69
69
|
function addHandler() {
|
|
70
70
|
const newFormat = {
|
|
@@ -74,7 +74,7 @@ function FormattingTabContent() {
|
|
|
74
74
|
};
|
|
75
75
|
const key = (0, uuid_1.v4)();
|
|
76
76
|
const newNuclei = { ...nuclei, [key]: newFormat };
|
|
77
|
-
setFieldValue('formatting.nuclei', newNuclei);
|
|
77
|
+
void setFieldValue('formatting.nuclei', newNuclei);
|
|
78
78
|
}
|
|
79
79
|
const nucleiList = Object.keys(nuclei);
|
|
80
80
|
return ((0, jsx_runtime_1.jsx)(GroupPane_1.GroupPane, { text: "Number formatting for crosshair and info line", children: (0, jsx_runtime_1.jsx)("div", { css: styles, children: (0, jsx_runtime_1.jsxs)("table", { children: [(0, jsx_runtime_1.jsx)("thead", { children: (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("th", { className: "counter-col", children: "#" }), (0, jsx_runtime_1.jsx)("th", { className: "nucleus-label-col", children: "Nucleus " }), (0, jsx_runtime_1.jsx)("th", { className: "nucleus-format-input-col", children: "\u03B4 (ppm)" }), (0, jsx_runtime_1.jsx)("th", { className: "nucleus-format-input-col", children: "Coupling (Hz)" }), (0, jsx_runtime_1.jsx)("th", { className: "nucleus-format-input-col" })] }) }), (0, jsx_runtime_1.jsx)("tbody", { children: nucleiList?.map((key, index) => {
|
|
@@ -43,11 +43,11 @@ function InfoBlockTabContent() {
|
|
|
43
43
|
else {
|
|
44
44
|
columns.push(emptyField);
|
|
45
45
|
}
|
|
46
|
-
setFieldValue('infoBlock.fields', columns);
|
|
46
|
+
void setFieldValue('infoBlock.fields', columns);
|
|
47
47
|
}, [setFieldValue]);
|
|
48
48
|
const deleteHandler = (0, react_1.useCallback)((data, index) => {
|
|
49
49
|
const _fields = data.filter((_, columnIndex) => columnIndex !== index);
|
|
50
|
-
setFieldValue('infoBlock.fields', _fields);
|
|
50
|
+
void setFieldValue('infoBlock.fields', _fields);
|
|
51
51
|
}, [setFieldValue]);
|
|
52
52
|
const COLUMNS = (0, react_1.useMemo)(() => [
|
|
53
53
|
{
|
|
@@ -8,14 +8,13 @@ const cheminfo_font_1 = require("cheminfo-font");
|
|
|
8
8
|
const react_1 = require("react");
|
|
9
9
|
const DispatchContext_1 = require("../../context/DispatchContext");
|
|
10
10
|
const ReactTable_1 = __importDefault(require("../../elements/ReactTable/ReactTable"));
|
|
11
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
12
11
|
function AutomaticAssignmentTable({ data }) {
|
|
13
12
|
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
14
13
|
const assignHandler = (0, react_1.useCallback)((e, row) => {
|
|
15
14
|
e.preventDefault();
|
|
16
15
|
e.stopPropagation();
|
|
17
16
|
dispatch({
|
|
18
|
-
type:
|
|
17
|
+
type: 'SET_AUTOMATIC_ASSIGNMENTS',
|
|
19
18
|
payload: { assignments: row.original.assignment },
|
|
20
19
|
});
|
|
21
20
|
}, [dispatch]);
|
|
@@ -10,7 +10,6 @@ const react_1 = require("react");
|
|
|
10
10
|
const ChartContext_1 = require("../../context/ChartContext");
|
|
11
11
|
const DispatchContext_1 = require("../../context/DispatchContext");
|
|
12
12
|
const Alert_1 = require("../../elements/popup/Alert");
|
|
13
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
14
13
|
const assert_1 = require("../../utility/assert");
|
|
15
14
|
function mapSpectra(data) {
|
|
16
15
|
return data.map((spectrum) => {
|
|
@@ -34,10 +33,12 @@ function useAutoAssignments() {
|
|
|
34
33
|
const alert = (0, Alert_1.useAlert)();
|
|
35
34
|
const [assignments, setAssignments] = (0, react_1.useState)([]);
|
|
36
35
|
function restAssignments() {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
if (originData.current) {
|
|
37
|
+
dispatch({
|
|
38
|
+
type: 'SET_AUTOMATIC_ASSIGNMENTS',
|
|
39
|
+
payload: { assignments: originData.current },
|
|
40
|
+
});
|
|
41
|
+
}
|
|
41
42
|
}
|
|
42
43
|
function getAssignments() {
|
|
43
44
|
void (async () => {
|
|
@@ -53,7 +54,7 @@ function useAutoAssignments() {
|
|
|
53
54
|
}, { minScore: 0 });
|
|
54
55
|
if (result[0]?.assignment) {
|
|
55
56
|
dispatch({
|
|
56
|
-
type:
|
|
57
|
+
type: 'SET_AUTOMATIC_ASSIGNMENTS',
|
|
57
58
|
payload: { assignments: result[0].assignment },
|
|
58
59
|
});
|
|
59
60
|
}
|
|
@@ -77,12 +77,12 @@ const columns = [
|
|
|
77
77
|
}, children: `${row.original.value}` })),
|
|
78
78
|
},
|
|
79
79
|
];
|
|
80
|
-
function InformationPanelInner({ info, meta,
|
|
80
|
+
function InformationPanelInner({ info, meta, customInfo, }) {
|
|
81
81
|
const [searchKey, setSearchKey] = (0, react_1.useState)();
|
|
82
82
|
const [panelsStatus, openPanel] = (0, react_1.useState)({
|
|
83
83
|
info: true,
|
|
84
84
|
meta: true,
|
|
85
|
-
|
|
85
|
+
customInfo: true,
|
|
86
86
|
});
|
|
87
87
|
function handleSearch(e) {
|
|
88
88
|
const searchKey = e.target.value.toLowerCase();
|
|
@@ -90,7 +90,7 @@ function InformationPanelInner({ info, meta, metaInfo, }) {
|
|
|
90
90
|
}
|
|
91
91
|
const matchesInfo = filter(searchKey, info);
|
|
92
92
|
const matchesMeta = filter(searchKey, meta);
|
|
93
|
-
const matchesMetaInfo = filter(searchKey,
|
|
93
|
+
const matchesMetaInfo = filter(searchKey, customInfo);
|
|
94
94
|
function handleOpen(key) {
|
|
95
95
|
openPanel((prevPanelsStatus) => ({
|
|
96
96
|
...prevPanelsStatus,
|
|
@@ -100,12 +100,12 @@ function InformationPanelInner({ info, meta, metaInfo, }) {
|
|
|
100
100
|
return ((0, jsx_runtime_1.jsxs)("div", { style: styles.container, children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(Input_1.default, { placeholder: "Search for parameter...", onChange: handleSearch, debounceTime: 250, style: {
|
|
101
101
|
inputWrapper: { width: '100%' },
|
|
102
102
|
input: { textAlign: 'left', padding: '5px' },
|
|
103
|
-
} }) }), (0, jsx_runtime_1.jsxs)("div", { style: styles.tableContainer, children: [(0, jsx_runtime_1.jsx)(InformationTable, { data:
|
|
103
|
+
} }) }), (0, jsx_runtime_1.jsxs)("div", { style: styles.tableContainer, children: [(0, jsx_runtime_1.jsx)(InformationTable, { data: matchesMetaInfo, columns: columns, title: "Custom information", onClick: () => handleOpen('customInfo'), isOpen: panelsStatus.customInfo }), (0, jsx_runtime_1.jsx)(InformationTable, { data: matchesInfo, columns: columns, title: "Spectrum information", onClick: () => handleOpen('info'), isOpen: panelsStatus.info }), (0, jsx_runtime_1.jsx)(InformationTable, { data: matchesMeta, columns: columns, title: "Other spectrum parameters", onClick: () => handleOpen('meta'), isOpen: panelsStatus.meta })] })] }));
|
|
104
104
|
}
|
|
105
105
|
const MemoizedInformationPanel = (0, react_1.memo)(InformationPanelInner);
|
|
106
106
|
const emptyData = { info: {}, meta: {} };
|
|
107
107
|
function InformationPanel() {
|
|
108
|
-
const { info, meta,
|
|
109
|
-
return (0, jsx_runtime_1.jsx)(MemoizedInformationPanel, {
|
|
108
|
+
const { info, meta, customInfo } = (0, useSpectrum_1.default)(emptyData);
|
|
109
|
+
return (0, jsx_runtime_1.jsx)(MemoizedInformationPanel, { info, meta, customInfo });
|
|
110
110
|
}
|
|
111
111
|
exports.default = InformationPanel;
|
|
@@ -12,12 +12,11 @@ const react_2 = require("react");
|
|
|
12
12
|
const im_1 = require("react-icons/im");
|
|
13
13
|
const ChartContext_1 = require("../../context/ChartContext");
|
|
14
14
|
const DispatchContext_1 = require("../../context/DispatchContext");
|
|
15
|
-
const
|
|
15
|
+
const ActiveButton_1 = __importDefault(require("../../elements/ActiveButton"));
|
|
16
16
|
const ToolTip_1 = __importDefault(require("../../elements/ToolTip/ToolTip"));
|
|
17
17
|
const Modal_1 = require("../../elements/popup/Modal");
|
|
18
18
|
const useSpectrum_1 = __importDefault(require("../../hooks/useSpectrum"));
|
|
19
19
|
const ChangeSumModal_1 = __importDefault(require("../../modal/changeSum/ChangeSumModal"));
|
|
20
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
21
20
|
const BasicPanelStyle_1 = require("../extra/BasicPanelStyle");
|
|
22
21
|
const DefaultPanelHeader_1 = __importDefault(require("../header/DefaultPanelHeader"));
|
|
23
22
|
const PreferencesHeader_1 = __importDefault(require("../header/PreferencesHeader"));
|
|
@@ -31,12 +30,6 @@ const style = (0, react_1.css) `
|
|
|
31
30
|
align-items: center;
|
|
32
31
|
justify-content: center;
|
|
33
32
|
}
|
|
34
|
-
|
|
35
|
-
.fix-integral-toggle-btn {
|
|
36
|
-
svg {
|
|
37
|
-
font-size: 12px !important;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
33
|
`;
|
|
41
34
|
function IntegralPanelInner({ integrals, info, activeTab, xDomain, }) {
|
|
42
35
|
const [filterIsActive, setFilterIsActive] = (0, react_2.useState)(false);
|
|
@@ -45,7 +38,7 @@ function IntegralPanelInner({ integrals, info, activeTab, xDomain, }) {
|
|
|
45
38
|
const [isFlipped, setFlipStatus] = (0, react_2.useState)(false);
|
|
46
39
|
const settingRef = (0, react_2.useRef)();
|
|
47
40
|
const yesHandler = (0, react_2.useCallback)(() => {
|
|
48
|
-
dispatch({ type:
|
|
41
|
+
dispatch({ type: 'DELETE_INTEGRAL', payload: {} });
|
|
49
42
|
}, [dispatch]);
|
|
50
43
|
const handleDeleteAll = (0, react_2.useCallback)(() => {
|
|
51
44
|
modal.showConfirmDialog({
|
|
@@ -53,8 +46,8 @@ function IntegralPanelInner({ integrals, info, activeTab, xDomain, }) {
|
|
|
53
46
|
buttons: [{ text: 'Yes', handler: yesHandler }, { text: 'No' }],
|
|
54
47
|
});
|
|
55
48
|
}, [modal, yesHandler]);
|
|
56
|
-
const changeIntegralSumHandler = (0, react_2.useCallback)((
|
|
57
|
-
dispatch({ type:
|
|
49
|
+
const changeIntegralSumHandler = (0, react_2.useCallback)((options) => {
|
|
50
|
+
dispatch({ type: 'CHANGE_INTEGRAL_SUM', payload: { options } });
|
|
58
51
|
modal.close();
|
|
59
52
|
}, [dispatch, modal]);
|
|
60
53
|
const currentSum = (0, react_2.useMemo)(() => {
|
|
@@ -75,8 +68,8 @@ function IntegralPanelInner({ integrals, info, activeTab, xDomain, }) {
|
|
|
75
68
|
const handleOnFilter = (0, react_2.useCallback)(() => {
|
|
76
69
|
setFilterIsActive(!filterIsActive);
|
|
77
70
|
}, [filterIsActive]);
|
|
78
|
-
const toggleConstantSumHandler = (0, react_2.useCallback)((
|
|
79
|
-
dispatch({ type:
|
|
71
|
+
const toggleConstantSumHandler = (0, react_2.useCallback)(() => {
|
|
72
|
+
dispatch({ type: 'CHANGE_INTEGRALS_SUM_FLAG' });
|
|
80
73
|
}, [dispatch]);
|
|
81
74
|
const filteredData = (0, react_2.useMemo)(() => {
|
|
82
75
|
function isInRange(from, to) {
|
|
@@ -110,18 +103,16 @@ function IntegralPanelInner({ integrals, info, activeTab, xDomain, }) {
|
|
|
110
103
|
`,
|
|
111
104
|
], children: [!isFlipped && ((0, jsx_runtime_1.jsxs)(DefaultPanelHeader_1.default, { counter: integrals?.values?.length, onDelete: handleDeleteAll, deleteToolTip: "Delete All Integrals", onFilter: handleOnFilter, filterToolTip: filterIsActive ? 'Show all integrals' : 'Hide integrals out of view', filterIsActive: filterIsActive, counterFiltered: filteredData.length, showSettingButton: true, onSettingClick: settingsPanelHandler, children: [(0, jsx_runtime_1.jsx)(ToolTip_1.default, { title: currentSum
|
|
112
105
|
? `Change Integrals Sum (${Number(currentSum).toFixed(2)})`
|
|
113
|
-
: 'Change Integrals Sum', popupPlacement: "right", children: (0, jsx_runtime_1.jsx)("button", { className: "sum-button", type: "button", onClick: showChangeIntegralSumModal, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrSum, {}) }) }), (0, jsx_runtime_1.jsx)(
|
|
106
|
+
: 'Change Integrals Sum', popupPlacement: "right", children: (0, jsx_runtime_1.jsx)("button", { className: "sum-button", type: "button", onClick: showChangeIntegralSumModal, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrSum, {}) }) }), (0, jsx_runtime_1.jsx)(ActiveButton_1.default, { className: "icon", popupTitle: "Fix integral values", popupPlacement: "right", onClick: toggleConstantSumHandler, value: integrals?.options?.isSumConstant || false, children: (0, jsx_runtime_1.jsx)(im_1.ImLink, {}) })] })), isFlipped && ((0, jsx_runtime_1.jsx)(PreferencesHeader_1.default, { onSave: saveSettingHandler, onClose: settingsPanelHandler })), (0, jsx_runtime_1.jsx)("div", { className: "inner-container", children: !isFlipped ? ((0, jsx_runtime_1.jsx)(IntegralTable_1.default, { data: filteredData, activeTab: activeTab })) : ((0, jsx_runtime_1.jsx)(IntegralsPreferences_1.default, { ref: settingRef })) })] }));
|
|
114
107
|
}
|
|
115
108
|
const MemoizedIntegralPanel = (0, react_2.memo)(IntegralPanelInner);
|
|
116
109
|
const emptyData = { integrals: {}, info: {} };
|
|
117
110
|
function IntegralPanel() {
|
|
118
111
|
const { xDomain, view: { spectra: { activeTab }, }, } = (0, ChartContext_1.useChartData)();
|
|
119
112
|
const { integrals, info } = (0, useSpectrum_1.default)(emptyData);
|
|
120
|
-
return ((0, jsx_runtime_1.jsx)(MemoizedIntegralPanel, {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
activeTab,
|
|
125
|
-
} }));
|
|
113
|
+
return ((0, jsx_runtime_1.jsx)(MemoizedIntegralPanel, { integrals,
|
|
114
|
+
info,
|
|
115
|
+
xDomain,
|
|
116
|
+
activeTab }));
|
|
126
117
|
}
|
|
127
118
|
exports.default = IntegralPanel;
|
|
@@ -15,7 +15,6 @@ const ReactTable_1 = __importDefault(require("../../elements/ReactTable/ReactTab
|
|
|
15
15
|
const addCustomColumn_1 = __importDefault(require("../../elements/ReactTable/utility/addCustomColumn"));
|
|
16
16
|
const Select_1 = __importDefault(require("../../elements/Select"));
|
|
17
17
|
const usePanelPreferences_1 = require("../../hooks/usePanelPreferences");
|
|
18
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
19
18
|
const formatNumber_1 = require("../../utility/formatNumber");
|
|
20
19
|
const NoTableData_1 = __importDefault(require("../extra/placeholder/NoTableData"));
|
|
21
20
|
const selectStyle = { width: '100%', border: 'none' };
|
|
@@ -24,17 +23,19 @@ function IntegralTable({ activeTab, data }) {
|
|
|
24
23
|
const deleteIntegralHandler = (0, react_1.useCallback)((e, row) => {
|
|
25
24
|
e.preventDefault();
|
|
26
25
|
e.stopPropagation();
|
|
27
|
-
const
|
|
26
|
+
const { id } = row.original;
|
|
28
27
|
dispatch({
|
|
29
|
-
type:
|
|
30
|
-
|
|
28
|
+
type: 'DELETE_INTEGRAL',
|
|
29
|
+
payload: {
|
|
30
|
+
id,
|
|
31
|
+
},
|
|
31
32
|
});
|
|
32
33
|
}, [dispatch]);
|
|
33
34
|
const changeIntegralDataHandler = (0, react_1.useCallback)((value, row) => {
|
|
34
|
-
const
|
|
35
|
+
const integral = { ...row.original, kind: value };
|
|
35
36
|
dispatch({
|
|
36
|
-
type:
|
|
37
|
-
payload: {
|
|
37
|
+
type: 'CHANGE_INTEGRAL',
|
|
38
|
+
payload: { integral },
|
|
38
39
|
});
|
|
39
40
|
}, [dispatch]);
|
|
40
41
|
const initialColumns = (0, react_1.useMemo)(() => [
|
|
@@ -42,42 +43,31 @@ function IntegralTable({ activeTab, data }) {
|
|
|
42
43
|
index: 1,
|
|
43
44
|
Header: '#',
|
|
44
45
|
accessor: (_, index) => index + 1,
|
|
45
|
-
width:
|
|
46
|
+
style: { width: '30px', maxWidth: '30px' },
|
|
46
47
|
},
|
|
47
48
|
{
|
|
48
49
|
index: 2,
|
|
49
50
|
Header: 'From',
|
|
50
51
|
sortType: 'basic',
|
|
51
|
-
resizable: true,
|
|
52
52
|
accessor: (row) => row.from.toFixed(2),
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
index: 3,
|
|
56
56
|
Header: 'To',
|
|
57
57
|
sortType: 'basic',
|
|
58
|
-
resizable: true,
|
|
59
58
|
accessor: (row) => row.to.toFixed(2),
|
|
60
59
|
},
|
|
61
|
-
{
|
|
62
|
-
index: 6,
|
|
63
|
-
Header: 'Kind',
|
|
64
|
-
sortType: 'basic',
|
|
65
|
-
resizable: true,
|
|
66
|
-
accessor: 'kind',
|
|
67
|
-
Cell: ({ row }) => ((0, jsx_runtime_1.jsx)(Select_1.default, { onChange: (value) => changeIntegralDataHandler(value, row), items: SignalsKinds_1.SignalKinds, style: selectStyle, defaultValue: row.original.kind })),
|
|
68
|
-
},
|
|
69
60
|
{
|
|
70
61
|
index: 7,
|
|
71
62
|
style: { width: '1%', maxWidth: '24px', minWidth: '24px' },
|
|
72
63
|
id: 'delete-button',
|
|
73
64
|
Cell: ({ row }) => ((0, jsx_runtime_1.jsx)("button", { type: "button", className: "delete-button", onClick: (e) => deleteIntegralHandler(e, row), children: (0, jsx_runtime_1.jsx)(fa_1.FaRegTrashAlt, {}) })),
|
|
74
65
|
},
|
|
75
|
-
], [
|
|
66
|
+
], [deleteIntegralHandler]);
|
|
76
67
|
const saveRelativeHandler = (0, react_1.useCallback)((event, row) => {
|
|
77
|
-
const data = { value: event.target.value, id: row.id };
|
|
78
68
|
dispatch({
|
|
79
|
-
type:
|
|
80
|
-
payload: {
|
|
69
|
+
type: 'CHANGE_INTEGRAL_RELATIVE',
|
|
70
|
+
payload: { value: event.target.value, id: row.id },
|
|
81
71
|
});
|
|
82
72
|
}, [dispatch]);
|
|
83
73
|
const integralsPreferences = (0, usePanelPreferences_1.usePanelPreferences)('integrals', activeTab);
|
|
@@ -108,7 +98,21 @@ function IntegralTable({ activeTab, data }) {
|
|
|
108
98
|
return ((0, jsx_runtime_1.jsx)(EditableColumn_1.default, { value: integral, onSave: (event) => saveRelativeHandler(event, row.original), type: "number" }));
|
|
109
99
|
},
|
|
110
100
|
},
|
|
111
|
-
|
|
101
|
+
{
|
|
102
|
+
index: 6,
|
|
103
|
+
Header: 'Kind',
|
|
104
|
+
sortType: 'basic',
|
|
105
|
+
resizable: true,
|
|
106
|
+
accessor: 'kind',
|
|
107
|
+
showWhen: 'showKind',
|
|
108
|
+
Cell: ({ row }) => ((0, jsx_runtime_1.jsx)(Select_1.default, { onChange: (value) => changeIntegralDataHandler(value, row), items: SignalsKinds_1.SignalKinds, style: selectStyle, defaultValue: row.original.kind })),
|
|
109
|
+
},
|
|
110
|
+
], [
|
|
111
|
+
activeTab,
|
|
112
|
+
changeIntegralDataHandler,
|
|
113
|
+
integralsPreferences,
|
|
114
|
+
saveRelativeHandler,
|
|
115
|
+
]);
|
|
112
116
|
const tableColumns = (0, react_1.useMemo)(() => {
|
|
113
117
|
let columns = [...initialColumns];
|
|
114
118
|
for (const col of COLUMNS) {
|
|
@@ -28,6 +28,12 @@ const formatFields = [
|
|
|
28
28
|
checkControllerName: 'relative.show',
|
|
29
29
|
formatControllerName: 'relative.format',
|
|
30
30
|
},
|
|
31
|
+
{
|
|
32
|
+
id: 3,
|
|
33
|
+
label: 'Kind :',
|
|
34
|
+
checkControllerName: 'showKind',
|
|
35
|
+
hideFormatField: true,
|
|
36
|
+
},
|
|
31
37
|
];
|
|
32
38
|
function IntegralsPreferences(props, ref) {
|
|
33
39
|
const preferences = (0, PreferencesContext_1.usePreferences)();
|
|
@@ -35,9 +41,6 @@ function IntegralsPreferences(props, ref) {
|
|
|
35
41
|
const nuclei = (0, react_1.useMemo)(() => (0, getUniqueNuclei_1.getUniqueNuclei)(nucleus), [nucleus]);
|
|
36
42
|
const preferencesByNuclei = (0, usePanelPreferences_1.usePanelPreferencesByNuclei)('integrals', nuclei);
|
|
37
43
|
const formRef = (0, react_1.useRef)();
|
|
38
|
-
(0, react_1.useEffect)(() => {
|
|
39
|
-
formRef.current.setValues(preferencesByNuclei);
|
|
40
|
-
}, [preferencesByNuclei]);
|
|
41
44
|
const saveHandler = (0, react_1.useCallback)((values) => {
|
|
42
45
|
preferences.dispatch({
|
|
43
46
|
type: 'SET_PANELS_PREFERENCES',
|
|
@@ -49,7 +52,7 @@ function IntegralsPreferences(props, ref) {
|
|
|
49
52
|
formRef.current.submitForm();
|
|
50
53
|
},
|
|
51
54
|
}));
|
|
52
|
-
return ((0, jsx_runtime_1.jsx)(PreferencesContainer_1.PreferencesContainer, { children: (0, jsx_runtime_1.jsx)(formik_1.Formik, { initialValues:
|
|
55
|
+
return ((0, jsx_runtime_1.jsx)(PreferencesContainer_1.PreferencesContainer, { children: (0, jsx_runtime_1.jsx)(formik_1.Formik, { initialValues: preferencesByNuclei, onSubmit: saveHandler, innerRef: formRef, children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: nuclei?.map((n) => ((0, jsx_runtime_1.jsx)(NucleusPreferences_1.NucleusPreferences, { nucleus: n, fields: formatFields, renderTop: () => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(FormikColorInput_1.default, { name: `nuclei.${n}.color` }), (0, jsx_runtime_1.jsx)(Label_1.default, { title: "stroke width :", style: {
|
|
53
56
|
label: {
|
|
54
57
|
fontSize: '11px',
|
|
55
58
|
fontWeight: 'bold',
|
|
@@ -24,7 +24,7 @@ function ExclusionsZonesTable() {
|
|
|
24
24
|
return null;
|
|
25
25
|
}
|
|
26
26
|
function handleDelete(index) {
|
|
27
|
-
setFieldValue('exclusionsZones', values.exclusionsZones.filter((_, i) => i !== index));
|
|
27
|
+
void setFieldValue('exclusionsZones', values.exclusionsZones.filter((_, i) => i !== index));
|
|
28
28
|
}
|
|
29
29
|
const exclusionsZonesColumns = [
|
|
30
30
|
{
|