nmrium 0.38.1 → 0.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/component/1d/ApodizationLine.js +27 -4
- package/lib/component/1d/ExclusionZoneAnnotation.js +1 -1
- package/lib/component/1d/ExclusionZonesAnnotations.js +1 -1
- package/lib/component/1d/FooterBanner.js +5 -5
- package/lib/component/1d/SpectraLegends.js +2 -3
- package/lib/component/1d/Viewer1D.js +1 -1
- package/lib/component/1d/integral/Integral.d.ts +1 -1
- package/lib/component/1d/integral/IntegralResizable.d.ts +1 -1
- package/lib/component/1d/jCouplingGraph/JsCouplings.d.ts +1 -1
- package/lib/component/1d/multiAnalysis/MultiAnalysisRanges.js +2 -2
- package/lib/component/1d/multiplicityTree/LevelNode.d.ts +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.d.ts +1 -1
- package/lib/component/1d/multiplicityTree/StringNode.d.ts +1 -1
- package/lib/component/1d/multiplicityTree/buildTreeNode.d.ts +1 -1
- package/lib/component/1d/peaks/usePeakShapesPath.d.ts +2 -1
- package/lib/component/1d/ranges/Range.d.ts +1 -1
- package/lib/component/1d/tool/PeakPointer.js +6 -6
- package/lib/component/1d/tool/XLabelPointer.js +5 -5
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.d.ts +1 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/index.d.ts +1 -1
- package/lib/component/1d-2d/tools/BrushX.js +2 -3
- package/lib/component/1d-2d/tools/BrushXY.js +2 -3
- package/lib/component/1d-2d/tools/CrossLinePointer.js +4 -5
- package/lib/component/2d/Chart2D.js +4 -4
- package/lib/component/2d/FooterBanner.js +5 -5
- package/lib/component/2d/Viewer2D.js +1 -1
- package/lib/component/2d/tools/XYLabelPointer.js +5 -5
- package/lib/component/2d/zones/Signal.d.ts +1 -1
- package/lib/component/2d/zones/SignalCrosshair.d.ts +1 -1
- package/lib/component/2d/zones/Zone.d.ts +1 -1
- package/lib/component/EventsTrackers/BrushTracker.d.ts +20 -12
- package/lib/component/EventsTrackers/BrushTracker.js +35 -22
- package/lib/component/EventsTrackers/KeysListenerTracker.js +90 -67
- package/lib/component/EventsTrackers/MouseTracker.d.ts +6 -2
- package/lib/component/EventsTrackers/MouseTracker.js +4 -1
- package/lib/component/NMRium.d.ts +5 -5
- package/lib/component/NMRium.js +15 -16
- package/lib/component/assignment/AssignmentsReducer.d.ts +2 -2
- package/lib/component/context/LoggerContext.js +5 -0
- package/lib/component/context/PreferencesContext.d.ts +10 -8
- package/lib/component/elements/Button.d.ts +13 -11
- package/lib/component/elements/Button.js +16 -25
- package/lib/component/elements/ColorInput.d.ts +0 -1
- package/lib/component/elements/ColorInput.js +2 -2
- package/lib/component/elements/EditableColumn.js +5 -2
- package/lib/component/elements/Input.js +2 -4
- package/lib/component/elements/Label.d.ts +1 -0
- package/lib/component/elements/Label.js +2 -2
- package/lib/component/elements/MolecularFormulaInput.d.ts +2 -2
- package/lib/component/elements/MolecularFormulaInput.js +15 -18
- package/lib/component/elements/NextPrev.d.ts +5 -3
- package/lib/component/elements/NextPrev.js +26 -8
- package/lib/component/elements/NumberInput.js +2 -2
- package/lib/component/elements/ReactTable/ReactTable.js +4 -4
- package/lib/component/elements/formik/FormikCheckBox.d.ts +2 -1
- package/lib/component/elements/formik/FormikCheckBox.js +2 -2
- package/lib/component/elements/formik/FormikColumnFormatField.d.ts +4 -0
- package/lib/component/elements/formik/FormikColumnFormatField.js +19 -16
- package/lib/component/elements/formik/FormikError.d.ts +8 -0
- package/lib/component/elements/formik/FormikError.js +22 -0
- package/lib/component/elements/formik/FormikInput.js +10 -6
- package/lib/component/elements/formik/FormikSelect.js +1 -1
- package/lib/component/header/ApodizationOptionsPanel.js +4 -3
- package/lib/component/header/AutoPeakPickingOptionPanel.js +16 -7
- package/lib/component/header/BaseLineCorrectionPanel.js +5 -2
- package/lib/component/header/PhaseCorrectionPanel.js +5 -2
- package/lib/component/header/RangesPickingOptionPanel.js +15 -7
- package/lib/component/header/ZeroFillingOptionsPanel.js +1 -1
- package/lib/component/highlight/index.d.ts +1 -1
- package/lib/component/hooks/useActiveSpectra.d.ts +1 -1
- package/lib/component/hooks/useActiveSpectrum.d.ts +1 -1
- package/lib/component/hooks/useActiveSpectrumPeaksViewState.d.ts +1 -1
- package/lib/component/hooks/useCheckPointsNumberInWindowArea.d.ts +2 -0
- package/lib/component/hooks/useCheckPointsNumberInWindowArea.js +17 -0
- package/lib/component/hooks/useCheckToolsVisibility.d.ts +2 -2
- package/lib/component/hooks/useDatumWithSpectraStatistics.d.ts +3 -2
- package/lib/component/hooks/useExport.js +1 -1
- package/lib/component/hooks/useFilter.d.ts +2 -1
- package/lib/component/hooks/usePanelPreferences.d.ts +3 -3
- package/lib/component/hooks/usePanelPreferences.js +4 -0
- package/lib/component/hooks/useSaveSettings.d.ts +1 -1
- package/lib/component/hooks/useSaveSettings.js +17 -15
- package/lib/component/hooks/useVerticalAlign.d.ts +1 -1
- package/lib/component/loader/DropZone.js +1 -2
- package/lib/component/modal/EditPeakShapeModal.d.ts +2 -2
- package/lib/component/modal/LoadJCAMPModal.d.ts +3 -3
- package/lib/component/modal/LoadJCAMPModal.js +56 -74
- package/lib/component/modal/ModalStyle.js +0 -10
- package/lib/component/modal/MoleculeStructureEditorModal.d.ts +2 -1
- package/lib/component/modal/MoleculeStructureEditorModal.js +12 -6
- package/lib/component/modal/MultipletAnalysisModal.d.ts +2 -2
- package/lib/component/modal/PredictSpectraModal.d.ts +4 -2
- package/lib/component/modal/PredictSpectraModal.js +53 -105
- package/lib/component/modal/SaveAsModal.d.ts +2 -0
- package/lib/component/modal/SaveAsModal.js +21 -14
- package/lib/component/modal/changeSum/ChangeSumModal.js +25 -38
- package/lib/component/modal/editRange/EditRangeModal.d.ts +7 -6
- package/lib/component/modal/editRange/EditRangeModal.js +33 -13
- package/lib/component/modal/editRange/forms/components/AddSignalFormTab.d.ts +1 -1
- package/lib/component/modal/editRange/forms/components/DeltaInput.js +2 -0
- package/lib/component/modal/editRange/forms/components/SignalsForm.d.ts +2 -2
- package/lib/component/modal/metaImportation/MetaImportationModal.js +15 -5
- package/lib/component/modal/setting/GeneralSettings.js +2 -7
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralPanel.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +7 -15
- package/lib/component/panels/MoleculesPanel/MoleculeHeader.js +2 -2
- package/lib/component/panels/MoleculesPanel/MoleculePanel.d.ts +1 -11
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js +20 -25
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts +6 -11
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +71 -81
- package/lib/component/panels/MoleculesPanel/Utilities.d.ts +1 -1
- package/lib/component/panels/MoleculesPanel/Utilities.js +3 -1
- package/lib/component/panels/MultipleSpectraAnalysisPanel/base/AnalysisColumnHeader.js +6 -6
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.js +2 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/index.js +2 -2
- package/lib/component/panels/Panels.js +2 -2
- package/lib/component/panels/PeaksPanel/PeaksPanel.d.ts +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.js +39 -53
- package/lib/component/panels/RangesPanel/RangesPreferences.d.ts +1 -1
- package/lib/component/panels/RangesPanel/RangesPreferences.js +7 -22
- package/lib/component/panels/RangesPanel/RangesTable.d.ts +2 -2
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.d.ts +1 -1
- package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.d.ts +1 -1
- package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.js +9 -12
- package/lib/component/panels/RangesPanel/hooks/useMapRanges.d.ts +1 -1
- package/lib/component/panels/SpectrumsPanel/SpectraTable.js +5 -1
- package/lib/component/panels/SpectrumsPanel/base/SpectraColumnsManager.js +10 -4
- package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.d.ts +2 -2
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.d.ts +1 -1
- package/lib/component/panels/ZonesPanel/hooks/useMapZones.d.ts +1 -1
- package/lib/component/panels/databasePanel/DatabasePanel.d.ts +1 -1
- package/lib/component/panels/databasePanel/DatabasePanel.js +5 -24
- package/lib/component/panels/databasePanel/DatabasePreferences.js +2 -2
- package/lib/component/panels/header/DefaultPanelHeader.d.ts +2 -3
- package/lib/component/panels/header/DefaultPanelHeader.js +18 -26
- package/lib/component/panels/header/PanelHeader.d.ts +7 -0
- package/lib/component/panels/header/PanelHeader.js +12 -0
- package/lib/component/panels/predictionPanel/PredictionOptionsPanel.d.ts +9 -0
- package/lib/component/panels/predictionPanel/PredictionOptionsPanel.js +94 -0
- package/lib/component/panels/predictionPanel/PredictionPanel.d.ts +1 -1
- package/lib/component/panels/predictionPanel/PredictionPanel.js +109 -37
- package/lib/component/panels/predictionPanel/PredictionPreferences.d.ts +3 -0
- package/lib/component/panels/predictionPanel/PredictionPreferences.js +24 -0
- package/lib/component/panels/predictionPanel/PredictionSimpleOptions.d.ts +2 -0
- package/lib/component/panels/predictionPanel/PredictionSimpleOptions.js +44 -0
- package/lib/component/reducer/Reducer.d.ts +5 -87
- package/lib/component/reducer/Reducer.js +1 -29
- package/lib/component/reducer/actions/DatabaseActions.js +6 -4
- package/lib/component/reducer/actions/DomainActions.js +3 -0
- package/lib/component/reducer/actions/FiltersActions.d.ts +1 -2
- package/lib/component/reducer/actions/FiltersActions.js +47 -52
- package/lib/component/reducer/actions/HistoryActions.d.ts +4 -0
- package/lib/component/reducer/actions/HistoryActions.js +40 -0
- package/lib/component/reducer/actions/IntegralsActions.d.ts +1 -1
- package/lib/component/reducer/actions/IntegralsActions.js +3 -1
- package/lib/component/reducer/actions/LoadActions.d.ts +1 -2
- package/lib/component/reducer/actions/LoadActions.js +1 -1
- package/lib/component/reducer/actions/MoleculeActions.d.ts +7 -4
- package/lib/component/reducer/actions/MoleculeActions.js +57 -28
- package/lib/component/reducer/actions/PeaksActions.d.ts +1 -2
- package/lib/component/reducer/actions/PeaksActions.js +3 -3
- package/lib/component/reducer/actions/RangesActions.d.ts +4 -5
- package/lib/component/reducer/actions/RangesActions.js +5 -27
- package/lib/component/reducer/actions/SpectrumsActions.js +8 -8
- package/lib/component/reducer/actions/ToolsActions.d.ts +2 -2
- package/lib/component/reducer/actions/ToolsActions.js +3 -32
- package/lib/component/reducer/actions/ZonesActions.d.ts +2 -1
- package/lib/component/reducer/actions/ZonesActions.js +3 -6
- package/lib/component/reducer/helper/ZoomHistoryManager.d.ts +8 -0
- package/lib/component/reducer/helper/ZoomHistoryManager.js +35 -0
- package/lib/component/reducer/helper/getActiveSpectra.d.ts +1 -1
- package/lib/component/reducer/helper/getActiveSpectrum.d.ts +1 -1
- package/lib/component/reducer/helper/getVerticalAlign.d.ts +1 -1
- package/lib/component/reducer/preferences/actions/addWorkspace.js +2 -2
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts +1 -1
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +3 -3
- package/lib/component/reducer/preferences/utilities/getActiveWorkspace.d.ts +1 -1
- package/lib/component/reducer/preferences/utilities/getPreferencesByWorkspace.d.ts +2 -3
- package/lib/component/reducer/preferences/utilities/initWorkspace.d.ts +1 -1
- package/lib/component/reducer/preferences/utilities/mapNucleiFormatting.d.ts +1 -1
- package/lib/component/reducer/preferences/utilities/mapWorkspaces.d.ts +1 -1
- package/lib/component/toolbar/BasicToolBar.js +6 -11
- package/lib/component/toolbar/ToolTypes.d.ts +2 -2
- package/lib/component/toolbar/ToolTypes.js +1 -1
- package/lib/component/workspaces/assignment.d.ts +1 -1
- package/lib/component/workspaces/basic.d.ts +1 -1
- package/lib/component/workspaces/embedded.d.ts +1 -1
- package/lib/component/workspaces/exercise.d.ts +1 -1
- package/lib/component/workspaces/index.d.ts +6 -6
- package/lib/component/workspaces/prediction.d.ts +1 -1
- package/lib/component/workspaces/prediction.js +193 -0
- package/lib/component/workspaces/process1D.d.ts +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.d.ts +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.js +1 -1
- package/lib/data/PredictionManager.d.ts +3 -1
- package/lib/data/PredictionManager.js +43 -3
- package/lib/data/SpectraManager.d.ts +1 -2
- package/lib/data/constants/DefaultApodizationOptions.d.ts +2 -0
- package/lib/data/constants/DefaultApodizationOptions.js +5 -0
- package/lib/data/data1d/Spectrum1D/SumManager.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/convertDataToFloat64Array.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/generateJGraphData.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/generateSpectrumFromPublicationString.d.ts +1 -2
- package/lib/data/data1d/Spectrum1D/index.d.ts +1 -5
- package/lib/data/data1d/Spectrum1D/index.js +1 -5
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +3 -3
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.d.ts +3 -2
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +1 -1
- package/lib/data/data1d/Spectrum1D/isRangeAssigned.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.d.ts +2 -1
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +1 -2
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.d.ts +3 -2
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.js +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/lookupPeak.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.d.ts +2 -1
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js +1 -2
- package/lib/data/data1d/Spectrum1D/ranges/addRange.d.ts +7 -7
- package/lib/data/data1d/Spectrum1D/ranges/addRange.js +5 -24
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.d.ts +2 -1
- package/lib/data/data1d/Spectrum1D/ranges/changeRange.d.ts +2 -1
- package/lib/data/data1d/Spectrum1D/ranges/changeRange.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/checkRangeKind.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRange.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.js +1 -2
- package/lib/data/data1d/Spectrum1D/ranges/detectSignal.js +13 -6
- package/lib/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.js +23 -18
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +37 -2
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.js +1 -1
- package/lib/data/data1d/database.js +2 -4
- package/lib/data/data1d/multipleSpectraAnalysis.d.ts +3 -30
- package/lib/data/data1d/multipleSpectraAnalysis.js +4 -15
- package/lib/data/data2d/Spectrum2D/getMissingProjection.d.ts +3 -2
- package/lib/data/data2d/Spectrum2D/getShift.js +1 -1
- package/lib/data/data2d/Spectrum2D/getSlice.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZones.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts +3 -2
- package/lib/data/data2d/Spectrum2D/zones/isZoneExists.d.ts +2 -1
- package/lib/data/data2d/Spectrum2D/zones/mapZones.d.ts +3 -2
- package/lib/data/getDefaultMatrixFilters.d.ts +1 -1
- package/lib/data/types/data1d/ComplexData1D.d.ts +2 -2
- package/lib/data/types/data1d/RangeDetectionResult.d.ts +1 -1
- package/lib/data/utilities/FindUtilities.d.ts +2 -1
- package/lib/data/utilities/RangeUtilities.d.ts +1 -1
- package/lib/data/utilities/ZoneUtilities.d.ts +1 -1
- package/lib/data/utilities/calculateSanPlot.d.ts +2 -2
- package/lib/types/NMRiumDataReturn.d.ts +1 -3
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/ApodizationLine.js +28 -5
- package/lib-cjs/component/1d/ExclusionZoneAnnotation.js +3 -26
- package/lib-cjs/component/1d/ExclusionZonesAnnotations.js +5 -28
- package/lib-cjs/component/1d/FooterBanner.js +2 -2
- package/lib-cjs/component/1d/SpectraLegends.js +1 -2
- package/lib-cjs/component/1d/multiAnalysis/MultiAnalysisRanges.js +2 -2
- package/lib-cjs/component/1d/tool/PeakPointer.js +3 -3
- package/lib-cjs/component/1d/tool/XLabelPointer.js +2 -2
- package/lib-cjs/component/1d-2d/tools/BrushX.js +1 -2
- package/lib-cjs/component/1d-2d/tools/BrushXY.js +1 -2
- package/lib-cjs/component/1d-2d/tools/CrossLinePointer.js +2 -3
- package/lib-cjs/component/2d/Chart2D.js +4 -4
- package/lib-cjs/component/2d/FooterBanner.js +2 -2
- package/lib-cjs/component/2d/tools/XYLabelPointer.js +2 -2
- package/lib-cjs/component/EventsTrackers/BrushTracker.js +36 -22
- package/lib-cjs/component/EventsTrackers/KeysListenerTracker.js +90 -67
- package/lib-cjs/component/EventsTrackers/MouseTracker.js +4 -1
- package/lib-cjs/component/NMRium.js +12 -13
- package/lib-cjs/component/context/LoggerContext.js +5 -0
- package/lib-cjs/component/elements/Button.js +16 -25
- package/lib-cjs/component/elements/ColorInput.js +2 -2
- package/lib-cjs/component/elements/EditableColumn.js +5 -2
- package/lib-cjs/component/elements/Input.js +2 -4
- package/lib-cjs/component/elements/Label.js +2 -2
- package/lib-cjs/component/elements/MolecularFormulaInput.js +14 -16
- package/lib-cjs/component/elements/NextPrev.js +26 -8
- package/lib-cjs/component/elements/NumberInput.js +2 -2
- package/lib-cjs/component/elements/ReactTable/ReactTable.js +4 -4
- package/lib-cjs/component/elements/formik/FormikCheckBox.js +2 -2
- package/lib-cjs/component/elements/formik/FormikColumnFormatField.js +20 -16
- package/lib-cjs/component/elements/formik/FormikError.js +27 -0
- package/lib-cjs/component/elements/formik/FormikInput.js +10 -6
- package/lib-cjs/component/elements/formik/FormikSelect.js +1 -1
- package/lib-cjs/component/header/ApodizationOptionsPanel.js +6 -5
- package/lib-cjs/component/header/AutoPeakPickingOptionPanel.js +15 -6
- package/lib-cjs/component/header/BaseLineCorrectionPanel.js +6 -3
- package/lib-cjs/component/header/PhaseCorrectionPanel.js +6 -26
- package/lib-cjs/component/header/RangesPickingOptionPanel.js +15 -7
- package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +2 -25
- package/lib-cjs/component/hooks/useCheckPointsNumberInWindowArea.js +24 -0
- package/lib-cjs/component/hooks/useExport.js +1 -1
- package/lib-cjs/component/hooks/usePanelPreferences.js +4 -0
- package/lib-cjs/component/hooks/useSaveSettings.js +16 -14
- package/lib-cjs/component/loader/DropZone.js +1 -2
- package/lib-cjs/component/modal/LoadJCAMPModal.js +81 -75
- package/lib-cjs/component/modal/ModalStyle.js +0 -10
- package/lib-cjs/component/modal/MoleculeStructureEditorModal.js +12 -6
- package/lib-cjs/component/modal/PredictSpectraModal.js +53 -126
- package/lib-cjs/component/modal/SaveAsModal.js +22 -14
- package/lib-cjs/component/modal/changeSum/ChangeSumModal.js +24 -37
- package/lib-cjs/component/modal/editRange/EditRangeModal.js +32 -12
- package/lib-cjs/component/modal/editRange/forms/components/DeltaInput.js +2 -0
- package/lib-cjs/component/modal/metaImportation/MetaImportationModal.js +15 -5
- package/lib-cjs/component/modal/setting/GeneralSettings.js +2 -7
- package/lib-cjs/component/panels/IntegralsPanel/IntegralsPreferences.js +6 -14
- package/lib-cjs/component/panels/MoleculesPanel/MoleculeHeader.js +2 -2
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +19 -24
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +76 -86
- package/lib-cjs/component/panels/MoleculesPanel/Utilities.js +3 -1
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/base/AnalysisColumnHeader.js +6 -6
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.js +2 -2
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/index.js +2 -2
- package/lib-cjs/component/panels/Panels.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +38 -52
- package/lib-cjs/component/panels/RangesPanel/RangesPreferences.js +5 -20
- package/lib-cjs/component/panels/RangesPanel/hooks/useEditRangeModal.js +9 -12
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraTable.js +5 -1
- package/lib-cjs/component/panels/SpectrumsPanel/base/SpectraColumnsManager.js +10 -4
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +1 -1
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +1 -1
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +5 -24
- package/lib-cjs/component/panels/databasePanel/DatabasePreferences.js +25 -2
- package/lib-cjs/component/panels/header/DefaultPanelHeader.js +18 -26
- package/lib-cjs/component/panels/header/PanelHeader.js +15 -0
- package/lib-cjs/component/panels/predictionPanel/PredictionOptionsPanel.js +122 -0
- package/lib-cjs/component/panels/predictionPanel/PredictionPanel.js +109 -37
- package/lib-cjs/component/panels/predictionPanel/PredictionPreferences.js +29 -0
- package/lib-cjs/component/panels/predictionPanel/PredictionSimpleOptions.js +72 -0
- package/lib-cjs/component/reducer/Reducer.js +2 -31
- package/lib-cjs/component/reducer/actions/DatabaseActions.js +6 -4
- package/lib-cjs/component/reducer/actions/DomainActions.js +3 -0
- package/lib-cjs/component/reducer/actions/FiltersActions.js +66 -94
- package/lib-cjs/component/reducer/actions/HistoryActions.js +45 -0
- package/lib-cjs/component/reducer/actions/IntegralsActions.js +3 -1
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +58 -32
- package/lib-cjs/component/reducer/actions/PeaksActions.js +3 -3
- package/lib-cjs/component/reducer/actions/RangesActions.js +7 -52
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +10 -33
- package/lib-cjs/component/reducer/actions/ToolsActions.js +26 -32
- package/lib-cjs/component/reducer/actions/ZonesActions.js +6 -32
- package/lib-cjs/component/reducer/helper/ZoomHistoryManager.js +37 -0
- package/lib-cjs/component/reducer/preferences/actions/addWorkspace.js +2 -2
- package/lib-cjs/component/toolbar/BasicToolBar.js +5 -10
- package/lib-cjs/component/toolbar/ToolTypes.js +9 -32
- package/lib-cjs/component/workspaces/prediction.js +193 -0
- package/lib-cjs/component/workspaces/workspaceDefaultProperties.js +21 -44
- package/lib-cjs/data/PredictionManager.js +43 -3
- package/lib-cjs/data/constants/DefaultApodizationOptions.js +8 -0
- package/lib-cjs/data/data1d/Spectrum1D/index.js +7 -11
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +9 -32
- package/lib-cjs/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +1 -2
- package/lib-cjs/data/data1d/Spectrum1D/peaks/initiatePeaks.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/peaks/optimizePeaks.js +1 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/addRange.js +7 -26
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRange.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectRange.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectRanges.js +3 -4
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectSignal.js +13 -6
- package/lib-cjs/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.js +23 -18
- package/lib-cjs/data/data1d/Spectrum1D/ranges/initiateRanges.js +2 -2
- package/lib-cjs/data/data1d/database.js +2 -4
- package/lib-cjs/data/data1d/multipleSpectraAnalysis.js +5 -16
- package/lib-cjs/data/data2d/Spectrum2D/getShift.js +3 -26
- package/lib-cjs/data/data2d/Spectrum2D/initiateDatum2D.js +2 -25
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +29 -29
- package/lib/component/panels/predictionPanel/PredictionOptions.d.ts +0 -7
- package/lib/component/panels/predictionPanel/PredictionOptions.js +0 -74
- package/lib/component/workspaces/Workspace.d.ts +0 -188
- package/lib/component/workspaces/Workspace.js +0 -1
- package/lib/data/Filters.d.ts +0 -12
- package/lib/data/Filters.js +0 -12
- package/lib/data/FiltersManager.d.ts +0 -30
- package/lib/data/FiltersManager.js +0 -175
- package/lib/data/data1d/Spectrum1D/getShiftX.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/getShiftX.js +0 -6
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.js +0 -4
- package/lib/data/data1d/Spectrum1D/integrals/checkIntegralKind.d.ts +0 -7
- package/lib/data/data1d/Spectrum1D/integrals/checkIntegralKind.js +0 -9
- package/lib/data/data1d/Spectrum1D/integrals/mapIntegrals.d.ts +0 -12
- package/lib/data/data1d/Spectrum1D/integrals/mapIntegrals.js +0 -36
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegrals.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegrals.js +0 -6
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegralsRelativeValues.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegralsRelativeValues.js +0 -5
- package/lib/data/data1d/Spectrum1D/integrals/updateRelatives.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/integrals/updateRelatives.js +0 -26
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.d.ts +0 -3
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.js +0 -45
- package/lib/data/data1d/Spectrum1D/peaks/updatePeaks.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/peaks/updatePeaks.js +0 -7
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.d.ts +0 -4
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.js +0 -78
- package/lib/data/data1d/Spectrum1D/ranges/updateRanges.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/ranges/updateRanges.js +0 -9
- package/lib/data/data1d/Spectrum1D/ranges/updateRangesRelativeValues.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/ranges/updateRangesRelativeValues.js +0 -5
- package/lib/data/data1d/filter1d/apodization.d.ts +0 -27
- package/lib/data/data1d/filter1d/apodization.js +0 -81
- package/lib/data/data1d/filter1d/baselineCorrection.d.ts +0 -33
- package/lib/data/data1d/filter1d/baselineCorrection.js +0 -51
- package/lib/data/data1d/filter1d/digitalFilter.d.ts +0 -20
- package/lib/data/data1d/filter1d/digitalFilter.js +0 -44
- package/lib/data/data1d/filter1d/equallySpaced.d.ts +0 -33
- package/lib/data/data1d/filter1d/equallySpaced.js +0 -52
- package/lib/data/data1d/filter1d/exclusionZones.d.ts +0 -15
- package/lib/data/data1d/filter1d/exclusionZones.js +0 -32
- package/lib/data/data1d/filter1d/fft.d.ts +0 -18
- package/lib/data/data1d/filter1d/fft.js +0 -90
- package/lib/data/data1d/filter1d/phaseCorrection.d.ts +0 -26
- package/lib/data/data1d/filter1d/phaseCorrection.js +0 -64
- package/lib/data/data1d/filter1d/shiftX.d.ts +0 -20
- package/lib/data/data1d/filter1d/shiftX.js +0 -26
- package/lib/data/data1d/filter1d/signalProcessing.d.ts +0 -26
- package/lib/data/data1d/filter1d/signalProcessing.js +0 -65
- package/lib/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.d.ts +0 -2
- package/lib/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +0 -35
- package/lib/data/data1d/filter1d/zeroFilling.d.ts +0 -22
- package/lib/data/data1d/filter1d/zeroFilling.js +0 -60
- package/lib/data/data2d/filter2d/shiftX.d.ts +0 -18
- package/lib/data/data2d/filter2d/shiftX.js +0 -27
- package/lib/data/data2d/filter2d/shiftY.d.ts +0 -18
- package/lib/data/data2d/filter2d/shiftY.js +0 -27
- package/lib/data/types/view-state/PeaksViewState.d.ts +0 -17
- package/lib/data/types/view-state/PeaksViewState.js +0 -1
- package/lib/types/NMRiumGeneralPreferences.d.ts +0 -7
- package/lib/types/NMRiumGeneralPreferences.js +0 -1
- package/lib/types/NMRiumPanelPreferences.d.ts +0 -17
- package/lib/types/NMRiumPanelPreferences.js +0 -1
- package/lib/types/NMRiumToolBarPreferences.d.ts +0 -22
- package/lib/types/NMRiumToolBarPreferences.js +0 -1
- package/lib/types/PanelPreferencesType.d.ts +0 -4
- package/lib/types/PanelPreferencesType.js +0 -1
- package/lib-cjs/component/panels/predictionPanel/PredictionOptions.js +0 -102
- package/lib-cjs/component/workspaces/Workspace.js +0 -2
- package/lib-cjs/data/Filters.js +0 -38
- package/lib-cjs/data/FiltersManager.js +0 -206
- package/lib-cjs/data/data1d/Spectrum1D/getShiftX.js +0 -33
- package/lib-cjs/data/data1d/Spectrum1D/getSpectrumErrorValue.js +0 -8
- package/lib-cjs/data/data1d/Spectrum1D/integrals/checkIntegralKind.js +0 -13
- package/lib-cjs/data/data1d/Spectrum1D/integrals/mapIntegrals.js +0 -40
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateIntegrals.js +0 -10
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateIntegralsRelativeValues.js +0 -9
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateRelatives.js +0 -30
- package/lib-cjs/data/data1d/Spectrum1D/peaks/mapPeaks.js +0 -49
- package/lib-cjs/data/data1d/Spectrum1D/peaks/updatePeaks.js +0 -11
- package/lib-cjs/data/data1d/Spectrum1D/ranges/mapRanges.js +0 -82
- package/lib-cjs/data/data1d/Spectrum1D/ranges/updateRanges.js +0 -13
- package/lib-cjs/data/data1d/Spectrum1D/ranges/updateRangesRelativeValues.js +0 -9
- package/lib-cjs/data/data1d/filter1d/apodization.js +0 -88
- package/lib-cjs/data/data1d/filter1d/baselineCorrection.js +0 -60
- package/lib-cjs/data/data1d/filter1d/digitalFilter.js +0 -50
- package/lib-cjs/data/data1d/filter1d/equallySpaced.js +0 -61
- package/lib-cjs/data/data1d/filter1d/exclusionZones.js +0 -38
- package/lib-cjs/data/data1d/filter1d/fft.js +0 -96
- package/lib-cjs/data/data1d/filter1d/phaseCorrection.js +0 -70
- package/lib-cjs/data/data1d/filter1d/shiftX.js +0 -32
- package/lib-cjs/data/data1d/filter1d/signalProcessing.js +0 -95
- package/lib-cjs/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +0 -39
- package/lib-cjs/data/data1d/filter1d/zeroFilling.js +0 -66
- package/lib-cjs/data/data2d/filter2d/shiftX.js +0 -33
- package/lib-cjs/data/data2d/filter2d/shiftY.js +0 -33
- package/lib-cjs/data/types/view-state/PeaksViewState.js +0 -2
- package/lib-cjs/types/NMRiumGeneralPreferences.js +0 -2
- package/lib-cjs/types/NMRiumPanelPreferences.js +0 -2
- package/lib-cjs/types/NMRiumToolBarPreferences.js +0 -2
- package/lib-cjs/types/PanelPreferencesType.js +0 -2
|
@@ -29,81 +29,98 @@ function KeysListenerTracker() {
|
|
|
29
29
|
return displayerMode === DISPLAYER_MODE.DM_1D && data && data.length > 0;
|
|
30
30
|
}, [data, displayerMode]);
|
|
31
31
|
const deleteHandler = useCallback(async (sourceData) => {
|
|
32
|
-
const { type, extra
|
|
32
|
+
const { type, extra } = sourceData;
|
|
33
33
|
switch (type) {
|
|
34
34
|
case HighlightEventSource.INTEGRAL: {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
const { id } = extra || {};
|
|
36
|
+
if (id) {
|
|
37
|
+
dispatch({
|
|
38
|
+
type: 'DELETE_INTEGRAL',
|
|
39
|
+
payload: {
|
|
40
|
+
id,
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
// remove keys from the highlighted list after delete
|
|
44
|
+
remove();
|
|
45
|
+
}
|
|
43
46
|
break;
|
|
44
47
|
}
|
|
45
48
|
case HighlightEventSource.PEAK: {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
const { id } = extra || {};
|
|
50
|
+
if (id) {
|
|
51
|
+
dispatch({
|
|
52
|
+
type: 'DELETE_PEAK',
|
|
53
|
+
payload: {
|
|
54
|
+
id,
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
// remove keys from the highlighted list after delete
|
|
58
|
+
remove();
|
|
59
|
+
}
|
|
54
60
|
break;
|
|
55
61
|
}
|
|
56
62
|
case HighlightEventSource.RANGE: {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
const { id } = extra || {};
|
|
64
|
+
if (id) {
|
|
65
|
+
dispatch({
|
|
66
|
+
type: 'DELETE_RANGE',
|
|
67
|
+
payload: {
|
|
68
|
+
id,
|
|
69
|
+
assignmentData,
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
// remove keys from the highlighted list after delete
|
|
73
|
+
remove();
|
|
74
|
+
}
|
|
66
75
|
break;
|
|
67
76
|
}
|
|
68
77
|
case HighlightEventSource.ZONE: {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
+
const { id } = extra || {};
|
|
79
|
+
if (id) {
|
|
80
|
+
dispatch({
|
|
81
|
+
type: 'DELETE_2D_ZONE',
|
|
82
|
+
payload: {
|
|
83
|
+
id,
|
|
84
|
+
assignmentData,
|
|
85
|
+
},
|
|
86
|
+
});
|
|
87
|
+
// remove keys from the highlighted list after delete
|
|
88
|
+
remove();
|
|
89
|
+
}
|
|
78
90
|
break;
|
|
79
91
|
}
|
|
80
92
|
case HighlightEventSource.EXCLUSION_ZONE: {
|
|
93
|
+
const { zone, spectrumID } = extra || {};
|
|
81
94
|
const buttons = [
|
|
82
95
|
{
|
|
83
96
|
text: 'Yes, for all spectra',
|
|
84
97
|
handler: async () => {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
98
|
+
if (zone) {
|
|
99
|
+
const hideLoading = await alert.showLoading('Delete all spectra exclusion zones in progress');
|
|
100
|
+
dispatch({
|
|
101
|
+
type: 'DELETE_EXCLUSION_ZONE',
|
|
102
|
+
payload: {
|
|
103
|
+
zone,
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
hideLoading();
|
|
107
|
+
}
|
|
93
108
|
},
|
|
94
109
|
},
|
|
95
110
|
{
|
|
96
111
|
text: 'Yes',
|
|
97
112
|
handler: async () => {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
113
|
+
if (spectrumID) {
|
|
114
|
+
const hideLoading = await alert.showLoading('Delete exclusion zones in progress');
|
|
115
|
+
dispatch({
|
|
116
|
+
type: 'DELETE_EXCLUSION_ZONE',
|
|
117
|
+
payload: {
|
|
118
|
+
zone,
|
|
119
|
+
spectrumId: spectrumID,
|
|
120
|
+
},
|
|
121
|
+
});
|
|
122
|
+
hideLoading();
|
|
123
|
+
}
|
|
107
124
|
},
|
|
108
125
|
},
|
|
109
126
|
{ text: 'No' },
|
|
@@ -115,19 +132,22 @@ function KeysListenerTracker() {
|
|
|
115
132
|
break;
|
|
116
133
|
}
|
|
117
134
|
case HighlightEventSource.MATRIX_GENERATION_EXCLUSION_ZONE: {
|
|
135
|
+
const { zone } = extra || {};
|
|
118
136
|
const buttons = [
|
|
119
137
|
{
|
|
120
138
|
text: 'Yes',
|
|
121
139
|
handler: async () => {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
140
|
+
if (zone) {
|
|
141
|
+
const hideLoading = await alert.showLoading('Delete all spectra exclusion zones in progress');
|
|
142
|
+
dispatchPreferences({
|
|
143
|
+
type: 'DELETE_MATRIX_GENERATION_EXCLUSION_ZONE',
|
|
144
|
+
payload: {
|
|
145
|
+
zone,
|
|
146
|
+
nucleus: activeTab,
|
|
147
|
+
},
|
|
148
|
+
});
|
|
149
|
+
hideLoading();
|
|
150
|
+
}
|
|
131
151
|
},
|
|
132
152
|
},
|
|
133
153
|
{ text: 'No' },
|
|
@@ -139,12 +159,15 @@ function KeysListenerTracker() {
|
|
|
139
159
|
break;
|
|
140
160
|
}
|
|
141
161
|
case HighlightEventSource.MULTIPLE_ANALYSIS_ZONE: {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
162
|
+
const { colKey } = extra || {};
|
|
163
|
+
if (colKey) {
|
|
164
|
+
dispatchPreferences({
|
|
165
|
+
type: 'DELETE_ANALYSIS_COLUMN',
|
|
166
|
+
payload: { columnKey: colKey, nucleus: activeTab },
|
|
167
|
+
});
|
|
168
|
+
// remove keys from the highlighted list after delete
|
|
169
|
+
remove();
|
|
170
|
+
}
|
|
148
171
|
break;
|
|
149
172
|
}
|
|
150
173
|
default:
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
interface MouseTrackerData {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
}
|
|
6
|
+
export declare const MouseContext: import("react").Context<MouseTrackerData | null>;
|
|
7
|
+
export declare function useMouseTracker(): MouseTrackerData | null;
|
|
4
8
|
interface MouseTrackerProps {
|
|
5
9
|
children: ReactNode;
|
|
6
10
|
className?: string;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { createContext, useCallback, useState, useContext, } from 'react';
|
|
3
|
-
export const MouseContext = createContext(
|
|
3
|
+
export const MouseContext = createContext(null);
|
|
4
4
|
const MouseProvider = MouseContext.Provider;
|
|
5
5
|
export function useMouseTracker() {
|
|
6
|
+
if (!MouseContext) {
|
|
7
|
+
throw new Error('Mouse context was not found');
|
|
8
|
+
}
|
|
6
9
|
return useContext(MouseContext);
|
|
7
10
|
}
|
|
8
11
|
export function MouseTracker({ children, className, style, noPropagation, }) {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/** @jsxImportSource @emotion/react */
|
|
2
|
+
import { WebSource } from 'filelist-utils';
|
|
2
3
|
import { CorrelationData } from 'nmr-correlation';
|
|
3
|
-
import {
|
|
4
|
+
import { NmriumState, CustomWorkspaces, WorkspacePreferences as NMRiumPreferences, Spectrum } from 'nmr-load-save';
|
|
4
5
|
import { ReactElement, ReactNode } from 'react';
|
|
5
6
|
import { ErrorBoundaryPropsWithComponent } from 'react-error-boundary';
|
|
6
7
|
import { BlobObject } from './utility/export';
|
|
7
|
-
import { CustomWorkspaces, WorkspacePreferences as NMRiumPreferences } from './workspaces/Workspace';
|
|
8
8
|
export { serializeNmriumState } from 'nmr-load-save';
|
|
9
|
-
export type { NmriumState } from 'nmr-load-save';
|
|
10
|
-
export type { WorkspacePreferences as NMRiumPreferences } from './workspaces/Workspace';
|
|
9
|
+
export type { NmriumState, WorkspacePreferences as NMRiumPreferences, } from 'nmr-load-save';
|
|
11
10
|
export type NMRiumWorkspace = 'exercise' | 'process1D' | 'default' | 'prediction' | 'embedded' | 'assignment' | (string & {});
|
|
12
11
|
export type OnNMRiumChange = (state: NmriumState, source: 'data' | 'view' | 'settings') => void;
|
|
13
12
|
export interface NMRiumProps {
|
|
14
13
|
data?: NMRiumData;
|
|
15
14
|
onChange?: OnNMRiumChange;
|
|
15
|
+
noErrorBoundary?: boolean;
|
|
16
16
|
onError?: ErrorBoundaryPropsWithComponent['onError'];
|
|
17
17
|
workspace?: NMRiumWorkspace;
|
|
18
18
|
customWorkspaces?: CustomWorkspaces;
|
|
@@ -30,7 +30,7 @@ type DeepPartial<T> = {
|
|
|
30
30
|
[P in keyof T]?: DeepPartial<T[P]>;
|
|
31
31
|
};
|
|
32
32
|
export interface NMRiumData {
|
|
33
|
-
source?:
|
|
33
|
+
source?: WebSource;
|
|
34
34
|
molecules?: Molecules;
|
|
35
35
|
spectra: DeepPartial<Spectrum>[];
|
|
36
36
|
correlations?: CorrelationData;
|
package/lib/component/NMRium.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
2
|
/** @jsxImportSource @emotion/react */
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
|
-
import { readNMRiumObject } from 'nmr-load-save';
|
|
5
|
-
import { useEffect, useCallback, useReducer,
|
|
4
|
+
import { readNMRiumObject, } from 'nmr-load-save';
|
|
5
|
+
import { useEffect, useCallback, useReducer, useRef, memo, forwardRef, useImperativeHandle, } from 'react';
|
|
6
6
|
import { ErrorBoundary, } from 'react-error-boundary';
|
|
7
7
|
import { RootLayout, useOnOff } from 'react-science/ui';
|
|
8
8
|
import { useFullscreen } from 'react-use';
|
|
@@ -28,7 +28,7 @@ import DropZone from './loader/DropZone';
|
|
|
28
28
|
import { defaultGetSpinner, SpinnerProvider } from './loader/SpinnerContext';
|
|
29
29
|
import Panels from './panels/Panels';
|
|
30
30
|
import checkActionType from './reducer/IgnoreActions';
|
|
31
|
-
import { spectrumReducer, initialState,
|
|
31
|
+
import { spectrumReducer, initialState, initState } from './reducer/Reducer';
|
|
32
32
|
import { DISPLAYER_MODE } from './reducer/core/Constants';
|
|
33
33
|
import preferencesReducer, { preferencesInitialState, initPreferencesState, } from './reducer/preferences/preferencesReducer';
|
|
34
34
|
import ToolBar from './toolbar/ToolBar';
|
|
@@ -79,14 +79,17 @@ const defaultData = {
|
|
|
79
79
|
spectra: [],
|
|
80
80
|
};
|
|
81
81
|
const NMRium = forwardRef(function NMRium(props, ref) {
|
|
82
|
-
const { onError, ...otherProps } = props;
|
|
83
|
-
|
|
82
|
+
const { noErrorBoundary = false, onError, ...otherProps } = props;
|
|
83
|
+
const innerNmrium = _jsx(InnerNMRium, { ...otherProps, innerRef: ref });
|
|
84
|
+
const children = noErrorBoundary ? (innerNmrium) : (_jsx(ErrorBoundary, { FallbackComponent: ErrorOverlay, onError: onError, children: innerNmrium }));
|
|
85
|
+
return _jsx(RootLayout, { style: { width: '100%' }, children: children });
|
|
84
86
|
});
|
|
85
87
|
function InnerNMRium({ data: dataProp = defaultData, workspace, customWorkspaces, preferences, getSpinner = defaultGetSpinner, onChange, emptyText, innerRef, }) {
|
|
86
88
|
const rootRef = useRef(null);
|
|
87
89
|
const elementsWrapperRef = useRef(null);
|
|
88
90
|
const viewerRef = useRef(null);
|
|
89
91
|
const [show, , setOff, toggle] = useOnOff(false);
|
|
92
|
+
const mainDivRef = useRef(null);
|
|
90
93
|
const handleChange = useRef(onChange);
|
|
91
94
|
useEffect(() => {
|
|
92
95
|
handleChange.current = onChange;
|
|
@@ -124,9 +127,6 @@ function InnerNMRium({ data: dataProp = defaultData, workspace, customWorkspaces
|
|
|
124
127
|
// trigger onChange callback if settings changed
|
|
125
128
|
handleChange.current?.(stateRef.current, 'settings');
|
|
126
129
|
}, [preferencesState]);
|
|
127
|
-
const dispatchMiddleWare = useMemo(() => {
|
|
128
|
-
return dispatchMiddleware(dispatch);
|
|
129
|
-
}, []);
|
|
130
130
|
useEffect(() => {
|
|
131
131
|
rootRef.current?.focus();
|
|
132
132
|
}, [isFullscreen]);
|
|
@@ -147,14 +147,14 @@ function InnerNMRium({ data: dataProp = defaultData, workspace, customWorkspaces
|
|
|
147
147
|
},
|
|
148
148
|
}), []);
|
|
149
149
|
useEffect(() => {
|
|
150
|
-
|
|
150
|
+
dispatch({
|
|
151
151
|
type: 'SET_LOADING_FLAG',
|
|
152
152
|
payload: { isLoading: true },
|
|
153
153
|
});
|
|
154
154
|
if (dataProp) {
|
|
155
155
|
void readNMRiumObject(dataProp)
|
|
156
156
|
.then((nmriumState) => {
|
|
157
|
-
|
|
157
|
+
dispatch({ type: 'INITIATE', payload: { nmriumState } });
|
|
158
158
|
})
|
|
159
159
|
.catch((error) => {
|
|
160
160
|
dispatch({ type: 'SET_LOADING_FLAG', payload: { isLoading: false } });
|
|
@@ -163,26 +163,25 @@ function InnerNMRium({ data: dataProp = defaultData, workspace, customWorkspaces
|
|
|
163
163
|
reportError(error);
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
|
-
}, [dataProp
|
|
166
|
+
}, [dataProp]);
|
|
167
167
|
const preventContextMenuHandler = useCallback((e) => {
|
|
168
168
|
if (!checkModifierKeyActivated(e)) {
|
|
169
169
|
e.preventDefault();
|
|
170
170
|
}
|
|
171
171
|
}, []);
|
|
172
|
-
const mainDivRef = useRef(null);
|
|
173
172
|
useEffect(() => {
|
|
174
173
|
const div = mainDivRef.current;
|
|
175
174
|
if (!div) {
|
|
176
175
|
return;
|
|
177
176
|
}
|
|
178
177
|
function mouseEnterHandler() {
|
|
179
|
-
|
|
178
|
+
dispatch({
|
|
180
179
|
type: 'SET_MOUSE_OVER_DISPLAYER',
|
|
181
180
|
payload: { isMouseOverDisplayer: true },
|
|
182
181
|
});
|
|
183
182
|
}
|
|
184
183
|
function mouseLeaveHandler() {
|
|
185
|
-
|
|
184
|
+
dispatch({
|
|
186
185
|
type: 'SET_MOUSE_OVER_DISPLAYER',
|
|
187
186
|
payload: { isMouseOverDisplayer: false },
|
|
188
187
|
});
|
|
@@ -193,12 +192,12 @@ function InnerNMRium({ data: dataProp = defaultData, workspace, customWorkspaces
|
|
|
193
192
|
div.removeEventListener('mouseenter', mouseEnterHandler);
|
|
194
193
|
div.removeEventListener('mouseleave', mouseLeaveHandler);
|
|
195
194
|
};
|
|
196
|
-
}, [
|
|
195
|
+
}, []);
|
|
197
196
|
return (_jsx(GlobalProvider, { value: {
|
|
198
197
|
rootRef: rootRef.current,
|
|
199
198
|
elementsWrapperRef: elementsWrapperRef.current,
|
|
200
199
|
viewerRef: viewerRef.current,
|
|
201
|
-
}, children: _jsx(PreferencesProvider, { value: preferencesState, children: _jsx("div", { ref: mainDivRef, style: { height: '100%', position: 'relative' }, children: _jsx(LoggerProvider, { children: _jsx(AlertProvider, { wrapperRef: elementsWrapperRef.current, children: _jsx(DispatchProvider, { value:
|
|
200
|
+
}, children: _jsx(PreferencesProvider, { value: preferencesState, children: _jsx("div", { ref: mainDivRef, style: { height: '100%', position: 'relative' }, children: _jsx(LoggerProvider, { children: _jsx(AlertProvider, { wrapperRef: elementsWrapperRef.current, children: _jsx(DispatchProvider, { value: dispatch, children: _jsx(ChartDataProvider, { value: state, children: _jsx(ModalProvider, { wrapperRef: elementsWrapperRef.current, children: _jsx(HighlightProvider, { children: _jsx(AssignmentProvider, { spectraData: spectraData, children: _jsx(SpinnerProvider, { value: getSpinner, children: _jsx("div", { className: "nmrium-container", ref: rootRef, css: containerStyles, onContextMenu: preventContextMenuHandler, style: { height: '100%', width: '100%' }, children: _jsx(DropZone, { children: _jsxs("div", { style: {
|
|
202
201
|
display: 'flex',
|
|
203
202
|
flexDirection: 'column',
|
|
204
203
|
backgroundColor: 'white',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NmrData1D, NmrData2D } from 'cheminfo-types';
|
|
2
2
|
import { ActionType } from '../reducer/types/ActionType';
|
|
3
3
|
import { AssignmentDimension, AssignmentState, Axis } from './AssignmentsContext';
|
|
4
4
|
export type InitiateAction = ActionType<'INITIATE_ASSIGNMENTS', {
|
|
5
|
-
spectra: (
|
|
5
|
+
spectra: (NmrData1D | NmrData2D)[];
|
|
6
6
|
}>;
|
|
7
7
|
export type ToggleAction = ActionType<'TOGGLE', {
|
|
8
8
|
atomIDs: string[];
|
|
@@ -16,6 +16,11 @@ export function LoggerProvider({ children }) {
|
|
|
16
16
|
const [logsHistory, setLogsHistory] = useState([]);
|
|
17
17
|
const loggerRef = useRef(new FifoLogger({
|
|
18
18
|
onChange: (log, logs) => {
|
|
19
|
+
if (log?.error &&
|
|
20
|
+
(log?.levelLabel === 'error' || log?.levelLabel === 'fatal')) {
|
|
21
|
+
// eslint-disable-next-line no-console
|
|
22
|
+
console.error(log.error);
|
|
23
|
+
}
|
|
19
24
|
setLogsHistory(logs.slice());
|
|
20
25
|
},
|
|
21
26
|
}));
|
|
@@ -15,8 +15,8 @@ export declare function usePreferences(): {
|
|
|
15
15
|
dispatch: (action?: ({
|
|
16
16
|
type: "ADD_WORKSPACE";
|
|
17
17
|
payload: {
|
|
18
|
-
|
|
19
|
-
data?: Omit<import("
|
|
18
|
+
workspaceKey: string;
|
|
19
|
+
data?: Omit<import("nmr-load-save").Workspace, "label" | "version"> | undefined;
|
|
20
20
|
};
|
|
21
21
|
} | {
|
|
22
22
|
type: "ANALYZE_SPECTRA";
|
|
@@ -43,12 +43,12 @@ export declare function usePreferences(): {
|
|
|
43
43
|
type: "SET_SPECTRA_ANALYSIS_PREFERENCES";
|
|
44
44
|
payload: {
|
|
45
45
|
nucleus: string;
|
|
46
|
-
data: import("
|
|
46
|
+
data: import("nmr-load-save").MultipleSpectraAnalysisPreferences;
|
|
47
47
|
};
|
|
48
48
|
} | {
|
|
49
49
|
type: "APPLY_General_PREFERENCES";
|
|
50
50
|
payload: {
|
|
51
|
-
data: Omit<import("
|
|
51
|
+
data: Omit<import("nmr-load-save").Workspace, "label" | "version">;
|
|
52
52
|
};
|
|
53
53
|
} | {
|
|
54
54
|
type: "ADD_MATRIX_GENERATION_EXCLUSION_ZONE";
|
|
@@ -76,15 +76,17 @@ export declare function usePreferences(): {
|
|
|
76
76
|
} | import("../reducer/preferences/preferencesReducer").SetWorkspaceAction | {
|
|
77
77
|
type: "INIT_PREFERENCES";
|
|
78
78
|
payload: {
|
|
79
|
-
display: import("
|
|
79
|
+
display: import("nmr-load-save").WorkspacePreferences;
|
|
80
80
|
workspace: import("../NMRium").NMRiumWorkspace;
|
|
81
|
-
customWorkspaces: Record<string, import("
|
|
81
|
+
customWorkspaces: Record<string, import("nmr-load-save").Workspace>;
|
|
82
82
|
dispatch: any;
|
|
83
83
|
};
|
|
84
|
-
} | {
|
|
84
|
+
} | ({
|
|
85
85
|
type: "SET_PREFERENCES";
|
|
86
|
-
payload: Partial<import("
|
|
86
|
+
payload: Partial<import("nmr-load-save").Workspace>;
|
|
87
87
|
} | {
|
|
88
|
+
type: "SET_PREFERENCES";
|
|
89
|
+
}) | {
|
|
88
90
|
type: "SET_PANELS_PREFERENCES";
|
|
89
91
|
payload: {
|
|
90
92
|
key: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsxImportSource @emotion/react */
|
|
2
2
|
import { CSSObject } from '@emotion/react';
|
|
3
|
-
import {
|
|
3
|
+
import { CSSProperties, ComponentPropsWithoutRef, ElementType } from 'react';
|
|
4
4
|
type Size = 'xSmall' | 'small' | 'medium' | 'large';
|
|
5
5
|
type Color = CSSProperties['color'];
|
|
6
6
|
interface BaseColor {
|
|
@@ -21,21 +21,23 @@ interface ButtonStyle {
|
|
|
21
21
|
wrapperStyle?: CSSProperties;
|
|
22
22
|
}
|
|
23
23
|
type TooltipOrientation = 'vertical' | 'horizontal';
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
children: ReactNode;
|
|
24
|
+
type ElementProps<E = unknown> = E extends ElementType ? ComponentPropsWithoutRef<E> : never;
|
|
25
|
+
export interface InnerButtonProps<E extends ElementType = 'button'> extends Partial<ButtonStyle> {
|
|
27
26
|
toolTip?: string;
|
|
28
27
|
tooltipOrientation?: TooltipOrientation;
|
|
29
28
|
wrapperClassName?: string;
|
|
30
29
|
theme?: ColorTheme;
|
|
30
|
+
as?: E;
|
|
31
|
+
disabled?: boolean;
|
|
31
32
|
}
|
|
32
|
-
|
|
33
|
+
export type ButtonProps<E extends ElementType = 'button'> = InnerButtonProps<E> & Omit<ElementProps<E>, 'color' | 'style' | 'disabled' | 'fill'>;
|
|
34
|
+
declare function Button<E extends ElementType = 'button'>(props: ButtonProps<E>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
33
35
|
declare namespace Button {
|
|
34
|
-
var Done: (props: ButtonProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
35
|
-
var Danger: (props: ButtonProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
36
|
-
var Action: (props: ButtonProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
37
|
-
var Secondary: (props: ButtonProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
38
|
-
var Info: (props: Omit<ButtonProps
|
|
39
|
-
var BarButton: (props: ButtonProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
36
|
+
var Done: <E extends ElementType = "button">(props: ButtonProps<E>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
37
|
+
var Danger: <E extends ElementType = "button">(props: ButtonProps<E>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
38
|
+
var Action: <E extends ElementType = "button">(props: ButtonProps<E>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
39
|
+
var Secondary: <E extends ElementType = "button">(props: ButtonProps<E>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
40
|
+
var Info: <E extends ElementType = "button">(props: Omit<ButtonProps<E>, "children">) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
41
|
+
var BarButton: <E extends ElementType = "button">(props: ButtonProps<E>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
40
42
|
}
|
|
41
43
|
export default Button;
|
|
@@ -91,7 +91,7 @@ function getFillStyle(props) {
|
|
|
91
91
|
}
|
|
92
92
|
const styles = {
|
|
93
93
|
button: (props) => {
|
|
94
|
-
const { size, backgroundColor: { hover, active }, color, borderRadius, } = props;
|
|
94
|
+
const { size, backgroundColor: { hover, active }, color, borderRadius, element, } = props;
|
|
95
95
|
const basic = css `
|
|
96
96
|
display: flex;
|
|
97
97
|
flex-direction: row;
|
|
@@ -103,17 +103,18 @@ const styles = {
|
|
|
103
103
|
}
|
|
104
104
|
`;
|
|
105
105
|
const fillStyle = getFillStyle(props);
|
|
106
|
-
const
|
|
107
|
-
&:disabled
|
|
106
|
+
const basicDisabledStyle = css `
|
|
107
|
+
&:disabled,
|
|
108
|
+
&.disabled {
|
|
108
109
|
opacity: 0.25;
|
|
109
110
|
}
|
|
110
|
-
|
|
111
|
-
|
|
111
|
+
`;
|
|
112
|
+
const colorStyle = css `
|
|
113
|
+
&:not(${element === 'button' ? '[disabled]' : '.disabled'}):hover {
|
|
112
114
|
background-color: ${hover};
|
|
113
115
|
color: ${color.hover};
|
|
114
116
|
}
|
|
115
|
-
|
|
116
|
-
&:not([disabled]):active {
|
|
117
|
+
&:not(${element === 'button' ? '[disabled]' : '.disabled'}):active {
|
|
117
118
|
background-color: ${active || hover};
|
|
118
119
|
color: ${color?.active || color.hover};
|
|
119
120
|
}
|
|
@@ -122,6 +123,7 @@ const styles = {
|
|
|
122
123
|
basic,
|
|
123
124
|
sizeConfig[size],
|
|
124
125
|
fillStyle,
|
|
126
|
+
basicDisabledStyle,
|
|
125
127
|
colorStyle,
|
|
126
128
|
{ borderRadius },
|
|
127
129
|
]);
|
|
@@ -161,8 +163,11 @@ function Button(props) {
|
|
|
161
163
|
base,
|
|
162
164
|
hover: shade,
|
|
163
165
|
active: tint,
|
|
164
|
-
}, borderColor = 'transparent', fill = 'solid', borderRadius, style = {}, wrapperStyle = {}, toolTip, tooltipOrientation = 'vertical', wrapperClassName, ...restProps } = buttonProps;
|
|
165
|
-
|
|
166
|
+
}, borderColor = 'transparent', fill = 'solid', borderRadius, style = {}, wrapperStyle = {}, toolTip, tooltipOrientation = 'vertical', wrapperClassName = '', as: Wrapper = 'button', disabled = false, className = '', ...restProps } = buttonProps;
|
|
167
|
+
const isDivDisabled = Wrapper === 'div' && disabled;
|
|
168
|
+
return (_jsxs("div", { style: { position: 'relative', ...wrapperStyle }, className: wrapperClassName, children: [_jsx(Wrapper, { ...(Wrapper === 'button' && { type: 'button', disabled }), onClick: Wrapper === 'button' || (Wrapper === 'div' && !disabled)
|
|
169
|
+
? onClick
|
|
170
|
+
: (e) => e.stopPropagation(), css: [
|
|
166
171
|
styles.button({
|
|
167
172
|
size,
|
|
168
173
|
backgroundColor,
|
|
@@ -170,29 +175,15 @@ function Button(props) {
|
|
|
170
175
|
borderColor,
|
|
171
176
|
fill,
|
|
172
177
|
borderRadius,
|
|
178
|
+
element: Wrapper,
|
|
173
179
|
}),
|
|
174
180
|
style,
|
|
175
|
-
], ...restProps, children: _jsx("span", { style: { flex: 1, pointerEvents: 'none' }, children: props.children }) }), toolTip && (_jsx("div", { className: "content", css: toolTipStyle(tooltipOrientation), children: _jsx("span", { style: {
|
|
181
|
+
], className: `${className} ${isDivDisabled ? 'disabled' : ''}`, ...restProps, children: _jsx("span", { style: { flex: 1, pointerEvents: 'none' }, children: props.children }) }), toolTip && (_jsx("div", { className: "content", css: toolTipStyle(tooltipOrientation), children: _jsx("span", { style: {
|
|
176
182
|
display: 'flex',
|
|
177
183
|
margin: 'auto',
|
|
178
184
|
justifyContent: 'center',
|
|
179
185
|
}, children: toolTip }) }))] }));
|
|
180
186
|
}
|
|
181
|
-
// function ThemeButton(props: { colorTheme: ColorTheme } & ButtonProps) {
|
|
182
|
-
// const { colorTheme, ...buttonProps } = props;
|
|
183
|
-
// const { base, shade, tint } = colorPalettes[colorTheme];
|
|
184
|
-
// const {
|
|
185
|
-
// color = { base: shade, hover: 'white' },
|
|
186
|
-
// backgroundColor = {
|
|
187
|
-
// base,
|
|
188
|
-
// hover: shade,
|
|
189
|
-
// active: tint,
|
|
190
|
-
// },
|
|
191
|
-
// fill = 'solid',
|
|
192
|
-
// ...restProps
|
|
193
|
-
// } = buttonProps;
|
|
194
|
-
// return <Button {...{ fill, ...restProps, backgroundColor, color }} />;
|
|
195
|
-
// }
|
|
196
187
|
Button.Done = function ButtonDone(props) {
|
|
197
188
|
return _jsx(Button, { ...props, theme: "success" });
|
|
198
189
|
};
|
|
@@ -64,7 +64,7 @@ const style = css `
|
|
|
64
64
|
}
|
|
65
65
|
`;
|
|
66
66
|
function ColorInput(props) {
|
|
67
|
-
const {
|
|
67
|
+
const { onColorChange = () => null, name, value = '#000000' } = props;
|
|
68
68
|
const [displayColorPicker, showColorPicker] = useState(false);
|
|
69
69
|
const [selectedColor, setColor] = useState(value);
|
|
70
70
|
useEffect(() => {
|
|
@@ -81,6 +81,6 @@ function ColorInput(props) {
|
|
|
81
81
|
setColor(hex);
|
|
82
82
|
onColorChange({ ...colorEvent, hex, name });
|
|
83
83
|
}, [name, onColorChange]);
|
|
84
|
-
return (_jsxs("div", { css: style, children: [
|
|
84
|
+
return (_jsxs("div", { css: style, children: [_jsxs("div", { className: "swatch", onClick: handleClick, children: [_jsx("div", { className: "color", style: { backgroundColor: selectedColor } }), _jsx("input", { type: "hidden", value: selectedColor, name: name })] }), displayColorPicker ? (_jsxs("div", { className: "color-popover", children: [_jsx("div", { className: "cover", onClick: handleClose }), _jsx(ColorPicker, { color: { hex: selectedColor }, onChangeComplete: handleOnColorChanged })] })) : null] }));
|
|
85
85
|
}
|
|
86
86
|
export default memo(ColorInput);
|
|
@@ -52,14 +52,17 @@ const EditableColumn = forwardRef(function EditableColumn(props, ref) {
|
|
|
52
52
|
}, className: "editable-column-input", onDoubleClick: startEditHandler, children: [!enabled && (_jsx("span", { style: {
|
|
53
53
|
display: 'table-cell',
|
|
54
54
|
verticalAlign: 'middle',
|
|
55
|
-
width: '
|
|
55
|
+
width: '100%',
|
|
56
56
|
...(textOverFlowEllipses
|
|
57
57
|
? { textOverflow: 'ellipsis', overflow: 'hidden' }
|
|
58
58
|
: {}),
|
|
59
59
|
}, children: value })), enabled && (_jsx("div", { style: { display: 'table-cell', verticalAlign: 'middle' }, children: _jsx(Input, { style: {
|
|
60
60
|
inputWrapper: {
|
|
61
|
-
width: '100%',
|
|
62
61
|
...(!isValid && { borderColor: 'red' }),
|
|
62
|
+
width: '100%',
|
|
63
|
+
},
|
|
64
|
+
input: {
|
|
65
|
+
width: '100%',
|
|
63
66
|
},
|
|
64
67
|
}, enableAutoSelect: true, className: "editable-column", value: value, type: type, onKeyUp: editHandler, ...InputProps }) }))] }));
|
|
65
68
|
});
|