nmrium 0.32.0 → 0.33.0-pre.1667755480
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/Chart1D.js +1 -1
- package/lib/component/1d/LinesSeries.js +1 -1
- package/lib/component/1d/SpectraTracker.js +1 -1
- package/lib/component/1d/Viewer1D.js +1 -1
- package/lib/component/1d/XAxis.js +1 -1
- package/lib/component/1d/database/DatabaseSpectrum.js +2 -1
- package/lib/component/1d/database/ResurrectedDatabaseRanges.js +2 -2
- package/lib/component/1d/{Integral.d.ts → integral/Integral.d.ts} +0 -0
- package/lib/component/1d/{Integral.js → integral/Integral.js} +2 -2
- package/lib/component/1d/integral/IntegralIndicator.d.ts +9 -0
- package/lib/component/1d/integral/IntegralIndicator.js +27 -0
- package/lib/component/1d/{IntegralResizable.d.ts → integral/IntegralResizable.d.ts} +0 -0
- package/lib/component/1d/integral/IntegralResizable.js +69 -0
- package/lib/component/1d/{IntegralsSeries.d.ts → integral/IntegralsSeries.d.ts} +0 -0
- package/lib/component/1d/{IntegralsSeries.js → integral/IntegralsSeries.js} +4 -4
- package/lib/component/1d/multiAnalysis/MultiAnalysisRanges.js +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js +4 -4
- package/lib/component/1d/multiplicityTree/buildTreeNode.js +3 -3
- package/lib/component/1d/peaks/PeakAnnotation.js +1 -1
- package/lib/component/1d/peaks/usePeakShapesPath.js +10 -6
- package/lib/component/1d/ranges/Range.js +27 -50
- package/lib/component/1d/tool/PeakPointer.js +1 -1
- package/lib/component/1d/utilities/scale.js +2 -2
- package/lib/component/2d/Contours.js +61 -42
- package/lib/component/2d/FooterBanner.js +2 -2
- package/lib/component/2d/Viewer2D.js +11 -14
- package/lib/component/2d/tools/XYLabelPointer.js +2 -2
- package/lib/component/2d/tools/slicing/VerticalSliceChart.js +1 -1
- package/lib/component/2d/zones/IndicationLines.js +5 -8
- package/lib/component/EventsTrackers/KeysListenerTracker.js +14 -15
- package/lib/component/NMRium.d.ts +1 -1
- package/lib/component/NMRium.js +6 -6
- package/lib/component/assignment/actions/initAssignment.js +17 -17
- package/lib/component/assignment/index.js +2 -2
- package/lib/component/context/PreferencesContext.js +3 -6
- package/lib/component/elements/Button.js +1 -1
- package/lib/component/elements/CheckBoxCell.js +1 -1
- package/lib/component/elements/ContextMenu.js +2 -2
- package/lib/component/elements/EditableColumn.js +3 -5
- package/lib/component/elements/GroupPane.d.ts +12 -0
- package/lib/component/elements/GroupPane.js +14 -0
- package/lib/component/elements/Input.js +7 -4
- package/lib/component/elements/IsotopesViewer.js +1 -1
- package/lib/component/elements/Label.js +1 -2
- package/lib/component/elements/MolecularFormulaInput.js +2 -0
- package/lib/component/elements/NumberInput.js +2 -2
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.js +1 -1
- package/lib/component/elements/ReactTable/ReactTable.d.ts +2 -1
- package/lib/component/elements/ReactTable/ReactTable.js +72 -38
- package/lib/component/elements/ReactTable/ReactTableFlexLayout.d.ts +3 -2
- package/lib/component/elements/ReactTable/ReactTableFlexLayout.js +2 -2
- package/lib/component/elements/ReactTable/utility/addCustomColumn.js +3 -3
- package/lib/component/elements/ReactTable/utility/useRowSpan.js +3 -7
- package/lib/component/elements/accordion/Accordion.js +2 -2
- package/lib/component/elements/draggble/useDraggable.js +1 -3
- package/lib/component/elements/dropDownButton/DropDownList.js +1 -2
- package/lib/component/elements/formik/FormikCheckBox.js +1 -1
- package/lib/component/elements/formik/FormikColorPicker.d.ts +0 -1
- package/lib/component/elements/formik/FormikColorPicker.js +5 -8
- package/lib/component/elements/formik/FormikErrorsSummary.js +2 -2
- package/lib/component/elements/formik/FormikForm.js +2 -2
- package/lib/component/elements/formik/FormikInput.d.ts +0 -1
- package/lib/component/elements/formik/FormikInput.js +12 -20
- package/lib/component/elements/formik/FormikOnChange.d.ts +1 -1
- package/lib/component/elements/formik/FormikOnChange.js +13 -10
- package/lib/component/elements/formik/FormikSelect.js +1 -1
- package/lib/component/elements/formik/FormikSlider.d.ts +2 -4
- package/lib/component/elements/formik/FormikSlider.js +8 -11
- package/lib/component/elements/formik/FormikTextarea.js +1 -1
- package/lib/component/elements/linearAxis/LinearVerticalAxis.js +2 -2
- package/lib/component/elements/popup/Alert/Provider.js +7 -7
- package/lib/component/elements/popup/Alert/index.d.ts +3 -4
- package/lib/component/elements/popup/Alert/index.js +3 -4
- package/lib/component/elements/popup/Modal/ModalContent.js +3 -1
- package/lib/component/elements/popup/Modal/Provider.js +16 -31
- package/lib/component/elements/popup/Modal/index.d.ts +4 -5
- package/lib/component/elements/popup/Modal/index.js +4 -5
- package/lib/component/header/Header.js +1 -1
- package/lib/component/hooks/useCombinedRefs.js +2 -2
- package/lib/component/hooks/useExport.d.ts +1 -1
- package/lib/component/hooks/useExport.js +9 -6
- package/lib/component/hooks/useFormatNumberByNucleus.js +1 -1
- package/lib/component/hooks/usePanelPreferences.js +9 -7
- package/lib/component/loader/DropZone.js +4 -4
- package/lib/component/modal/AlignSpectraModal.js +1 -1
- package/lib/component/modal/ExportAsMatrixModal.js +1 -1
- package/lib/component/modal/LoadJCAMPModal.js +2 -2
- package/lib/component/modal/MultipleSpectraFiltersModal/index.js +1 -1
- package/lib/component/modal/MultipletAnalysisModal.js +3 -3
- package/lib/component/modal/PredictSpectraModal.js +5 -5
- package/lib/component/modal/editRange/EditRangeModal.js +4 -4
- package/lib/component/modal/editRange/forms/components/SignalFormInfo.js +1 -1
- package/lib/component/modal/editRange/forms/validation/EditRangeValidation.js +2 -2
- package/lib/component/modal/setting/DatabasesTabContent.js +25 -20
- package/lib/component/modal/setting/DisplayTabContent.js +21 -27
- package/lib/component/modal/setting/FormattingTabContent.js +10 -10
- package/lib/component/modal/setting/GeneralSettings.js +11 -14
- package/lib/component/modal/setting/GeneralTabContent.js +3 -1
- package/lib/component/modal/setting/ToolsTabContent.js +18 -19
- package/lib/component/modal/setting/WorkspaceItem.d.ts +2 -1
- package/lib/component/modal/setting/WorkspaceItem.js +36 -48
- package/lib/component/modal/setting/settingsValidation.d.ts +58 -57
- package/lib/component/modal/setting/settingsValidation.js +14 -12
- package/lib/component/panels/AutomaticAssignment/useAutoAssignments.js +8 -7
- package/lib/component/panels/InformationPanel.js +52 -56
- package/lib/component/panels/IntegralsPanel/IntegralTable.js +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +1 -1
- package/lib/component/panels/MoleculesPanel/Utilities.js +6 -6
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.js +16 -17
- package/lib/component/panels/MultipleSpectraAnalysisPanel/ColumnHeader.js +1 -1
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleAnalysisCodeEditor.js +1 -1
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +1 -1
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPreferences.js +18 -17
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +2 -2
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +1 -1
- package/lib/component/panels/PeaksPanel/PeaksTable.js +2 -2
- package/lib/component/panels/RangesPanel/RangesHeader.js +1 -1
- package/lib/component/panels/RangesPanel/RangesPanel.js +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.js +1 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.js +1 -3
- package/lib/component/panels/RangesPanel/TableColumns/CouplingColumn.js +1 -1
- package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.js +2 -2
- package/lib/component/panels/RangesPanel/hooks/useMapRanges.js +8 -8
- package/lib/component/panels/SpectrumsPanel/SpectrumListItem.js +6 -6
- package/lib/component/panels/SpectrumsPanel/SpectrumListPanel.js +3 -3
- package/lib/component/panels/SpectrumsPanel/SpectrumsTabs.js +5 -5
- package/lib/component/panels/SpectrumsPanel/base/ColorIndicator.js +2 -2
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DSetting.d.ts +1 -1
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DSetting.js +2 -1
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DSetting.d.ts +1 -1
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DSetting.js +2 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +13 -17
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +16 -17
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +20 -21
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +12 -12
- package/lib/component/panels/SummaryPanel/SetShiftTolerancesModal.js +1 -5
- package/lib/component/panels/SummaryPanel/utilities/Utilities.js +105 -94
- package/lib/component/panels/ZonesPanel/ZonesTable.js +8 -8
- package/lib/component/panels/databasePanel/DatabasePanel.js +5 -4
- package/lib/component/panels/databasePanel/DatabaseTable.d.ts +2 -1
- package/lib/component/panels/databasePanel/DatabaseTable.js +20 -5
- package/lib/component/panels/extra/preferences/ColumnsHelper.js +5 -2
- package/lib/component/panels/extra/utilities/MultiplicityUtilities.d.ts +2 -2
- package/lib/component/panels/extra/utilities/MultiplicityUtilities.js +2 -2
- package/lib/component/panels/filtersPanel/FiltersTable.js +1 -1
- package/lib/component/reducer/IgnoreActions.js +3 -3
- package/lib/component/reducer/Reducer.d.ts +40 -14
- package/lib/component/reducer/Reducer.js +12 -11
- package/lib/component/reducer/actions/CorrelationsActions.js +4 -4
- package/lib/component/reducer/actions/DomainActions.d.ts +2 -2
- package/lib/component/reducer/actions/DomainActions.js +49 -67
- package/lib/component/reducer/actions/FiltersActions.js +3 -3
- package/lib/component/reducer/actions/HistoryActions.js +5 -5
- package/lib/component/reducer/actions/LoadActions.js +12 -0
- package/lib/component/reducer/actions/PreferencesActions.js +18 -37
- package/lib/component/reducer/actions/RangesActions.js +14 -12
- package/lib/component/reducer/actions/SpectrumsActions.js +10 -4
- package/lib/component/reducer/actions/ToolsActions.js +20 -35
- package/lib/component/reducer/actions/ZonesActions.js +2 -2
- package/lib/component/reducer/core/Constants.js +1 -1
- package/lib/component/reducer/helper/GetClosestNumber.js +2 -1
- package/lib/component/reducer/helper/Zoom1DManager.js +11 -10
- package/lib/component/reducer/helper/getSpectrum.js +3 -5
- package/lib/component/reducer/helper/getStrongestPeak.d.ts +1 -1
- package/lib/component/reducer/helper/getStrongestPeak.js +2 -3
- package/lib/component/reducer/preferences/actions/removeWorkspace.js +3 -10
- package/lib/component/reducer/preferences/actions/setPreferences.js +5 -6
- package/lib/component/reducer/preferences/utilities/mapNucleiFormatting.d.ts +1 -4
- package/lib/component/reducer/preferences/utilities/mapNucleiFormatting.js +7 -5
- package/lib/component/tool/BrushX.js +3 -3
- package/lib/component/tool/BrushXY.js +5 -5
- package/lib/component/tool/CrossLinePointer.js +3 -3
- package/lib/component/toolbar/BasicToolBar.js +1 -1
- package/lib/component/utility/Evaluate.js +2 -2
- package/lib/component/utility/FileUtility.d.ts +2 -9
- package/lib/component/utility/FileUtility.js +11 -28
- package/lib/component/utility/GroupByInfoKey.d.ts +1 -1
- package/lib/component/utility/GroupByInfoKey.js +11 -13
- package/lib/component/utility/PathBuilder.js +1 -1
- package/lib/component/utility/PreferencesHelper.js +2 -3
- package/lib/component/utility/{Export.d.ts → export.d.ts} +0 -0
- package/lib/component/utility/{Export.js → export.js} +53 -78
- package/lib/component/utility/formatNumber.d.ts +6 -1
- package/lib/component/utility/formatNumber.js +5 -4
- package/lib/data/Filters.d.ts +16 -17
- package/lib/data/Filters.js +16 -17
- package/lib/data/FiltersManager.js +4 -3
- package/lib/data/PredictionManager.js +8 -10
- package/lib/data/SpectraManager.d.ts +1 -2
- package/lib/data/SpectraManager.js +25 -60
- package/lib/data/data1d/MultipleAnalysis.js +74 -70
- package/lib/data/data1d/Spectrum1D/SumManager.js +1 -1
- package/lib/data/data1d/Spectrum1D/generateJGraphData.js +1 -1
- package/lib/data/data1d/Spectrum1D/index.d.ts +24 -25
- package/lib/data/data1d/Spectrum1D/index.js +24 -25
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +1 -1
- package/lib/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.js +6 -5
- package/lib/data/data1d/Spectrum1D/integrals/updateRelatives.js +8 -10
- package/lib/data/data1d/Spectrum1D/peaks/lookupPeak.js +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/addRange.js +3 -2
- package/lib/data/data1d/Spectrum1D/ranges/changeRange.js +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +35 -1
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.d.ts +35 -1
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.js +6 -7
- package/lib/data/data1d/database.js +45 -28
- package/lib/data/data1d/filter1d/apodization.js +2 -1
- package/lib/data/data1d/filter1d/fft.js +24 -7
- package/lib/data/data1d/filter1d/phaseCorrection.js +2 -2
- package/lib/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +1 -1
- package/lib/data/data1d/filter1d/zeroFilling.js +1 -1
- package/lib/data/data2d/Processing2D.d.ts +3 -3
- package/lib/data/data2d/Processing2D.js +7 -18
- package/lib/data/data2d/Spectrum2D/contours.d.ts +40 -0
- package/lib/data/data2d/Spectrum2D/contours.js +132 -0
- package/lib/data/data2d/Spectrum2D/index.d.ts +10 -11
- package/lib/data/data2d/Spectrum2D/index.js +10 -11
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +3 -4
- package/lib/data/data2d/Spectrum2D/shift/getShift.js +4 -5
- package/lib/data/data2d/Spectrum2D/zones/detectZones.js +11 -8
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.js +1 -1
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.js +1 -2
- package/lib/data/molecules/MoleculeManager.js +1 -1
- package/lib/data/types/common/Source.d.ts +1 -0
- package/lib/data/types/data1d/index.d.ts +12 -13
- package/lib/data/types/data2d/Data2D.d.ts +2 -0
- package/lib/data/types/data2d/Datum2D.d.ts +0 -1
- package/lib/data/types/data2d/index.d.ts +8 -9
- package/lib/data/utilities/RangeUtilities.js +13 -9
- package/lib/data/utilities/ZoneUtilities.js +17 -13
- package/lib/data/utilities/checkModifierKeyActivated.js +1 -2
- package/lib/data/utilities/generateChar.js +8 -6
- package/lib/data/utilities/getAtom.js +1 -1
- package/lib/data/utilities/getAtomsFromMF.js +2 -2
- package/lib/data/utilities/getColor.js +3 -3
- package/lib/data/utilities/getSum.js +6 -3
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/Chart1D.js +1 -1
- package/lib-cjs/component/1d/LinesSeries.js +1 -1
- package/lib-cjs/component/1d/SpectraTracker.js +1 -1
- package/lib-cjs/component/1d/Viewer1D.js +1 -1
- package/lib-cjs/component/1d/XAxis.js +1 -1
- package/lib-cjs/component/1d/database/DatabaseSpectrum.js +2 -1
- package/lib-cjs/component/1d/database/ResurrectedDatabaseRanges.js +2 -2
- package/lib-cjs/component/1d/{Integral.js → integral/Integral.js} +2 -2
- package/lib-cjs/component/1d/integral/IntegralIndicator.js +31 -0
- package/lib-cjs/component/1d/integral/IntegralResizable.js +74 -0
- package/lib-cjs/component/1d/{IntegralsSeries.js → integral/IntegralsSeries.js} +4 -4
- package/lib-cjs/component/1d/multiAnalysis/MultiAnalysisRanges.js +1 -1
- package/lib-cjs/component/1d/multiplicityTree/MultiplicityTree.js +4 -4
- package/lib-cjs/component/1d/multiplicityTree/buildTreeNode.js +3 -3
- package/lib-cjs/component/1d/peaks/PeakAnnotation.js +1 -1
- package/lib-cjs/component/1d/peaks/usePeakShapesPath.js +10 -6
- package/lib-cjs/component/1d/ranges/Range.js +27 -50
- package/lib-cjs/component/1d/tool/PeakPointer.js +1 -1
- package/lib-cjs/component/1d/utilities/scale.js +2 -2
- package/lib-cjs/component/2d/Contours.js +60 -41
- package/lib-cjs/component/2d/FooterBanner.js +2 -2
- package/lib-cjs/component/2d/Viewer2D.js +11 -14
- package/lib-cjs/component/2d/tools/XYLabelPointer.js +2 -2
- package/lib-cjs/component/2d/tools/slicing/VerticalSliceChart.js +1 -1
- package/lib-cjs/component/2d/zones/IndicationLines.js +5 -8
- package/lib-cjs/component/EventsTrackers/KeysListenerTracker.js +14 -15
- package/lib-cjs/component/NMRium.js +7 -7
- package/lib-cjs/component/assignment/actions/initAssignment.js +17 -17
- package/lib-cjs/component/assignment/index.js +2 -2
- package/lib-cjs/component/context/PreferencesContext.js +3 -6
- package/lib-cjs/component/elements/Button.js +1 -1
- package/lib-cjs/component/elements/CheckBoxCell.js +1 -1
- package/lib-cjs/component/elements/ContextMenu.js +2 -2
- package/lib-cjs/component/elements/EditableColumn.js +3 -5
- package/lib-cjs/component/elements/GroupPane.js +18 -0
- package/lib-cjs/component/elements/Input.js +7 -4
- package/lib-cjs/component/elements/IsotopesViewer.js +1 -1
- package/lib-cjs/component/elements/Label.js +1 -2
- package/lib-cjs/component/elements/MolecularFormulaInput.js +2 -0
- package/lib-cjs/component/elements/NumberInput.js +2 -2
- package/lib-cjs/component/elements/ReactTable/Elements/ReactTableRow.js +1 -1
- package/lib-cjs/component/elements/ReactTable/ReactTable.js +71 -37
- package/lib-cjs/component/elements/ReactTable/ReactTableFlexLayout.js +2 -2
- package/lib-cjs/component/elements/ReactTable/utility/addCustomColumn.js +3 -3
- package/lib-cjs/component/elements/ReactTable/utility/useRowSpan.js +3 -7
- package/lib-cjs/component/elements/accordion/Accordion.js +2 -2
- package/lib-cjs/component/elements/draggble/useDraggable.js +1 -3
- package/lib-cjs/component/elements/dropDownButton/DropDownList.js +1 -2
- package/lib-cjs/component/elements/formik/FormikCheckBox.js +1 -1
- package/lib-cjs/component/elements/formik/FormikColorPicker.js +4 -7
- package/lib-cjs/component/elements/formik/FormikErrorsSummary.js +2 -2
- package/lib-cjs/component/elements/formik/FormikForm.js +2 -2
- package/lib-cjs/component/elements/formik/FormikInput.js +12 -20
- package/lib-cjs/component/elements/formik/FormikOnChange.js +13 -10
- package/lib-cjs/component/elements/formik/FormikSelect.js +1 -1
- package/lib-cjs/component/elements/formik/FormikSlider.js +7 -10
- package/lib-cjs/component/elements/formik/FormikTextarea.js +1 -1
- package/lib-cjs/component/elements/linearAxis/LinearVerticalAxis.js +2 -2
- package/lib-cjs/component/elements/popup/Alert/Provider.js +8 -8
- package/lib-cjs/component/elements/popup/Alert/index.js +5 -5
- package/lib-cjs/component/elements/popup/Modal/ModalContent.js +3 -1
- package/lib-cjs/component/elements/popup/Modal/Provider.js +16 -31
- package/lib-cjs/component/elements/popup/Modal/index.js +7 -7
- package/lib-cjs/component/header/Header.js +1 -1
- package/lib-cjs/component/hooks/useCombinedRefs.js +2 -2
- package/lib-cjs/component/hooks/useExport.js +14 -11
- package/lib-cjs/component/hooks/useFormatNumberByNucleus.js +1 -1
- package/lib-cjs/component/hooks/usePanelPreferences.js +9 -7
- package/lib-cjs/component/loader/DropZone.js +4 -4
- package/lib-cjs/component/modal/AlignSpectraModal.js +1 -1
- package/lib-cjs/component/modal/ExportAsMatrixModal.js +2 -2
- package/lib-cjs/component/modal/LoadJCAMPModal.js +2 -2
- package/lib-cjs/component/modal/MultipleSpectraFiltersModal/index.js +1 -1
- package/lib-cjs/component/modal/MultipletAnalysisModal.js +3 -3
- package/lib-cjs/component/modal/PredictSpectraModal.js +5 -5
- package/lib-cjs/component/modal/editRange/EditRangeModal.js +4 -4
- package/lib-cjs/component/modal/editRange/forms/components/SignalFormInfo.js +1 -1
- package/lib-cjs/component/modal/editRange/forms/validation/EditRangeValidation.js +2 -2
- package/lib-cjs/component/modal/setting/DatabasesTabContent.js +25 -20
- package/lib-cjs/component/modal/setting/DisplayTabContent.js +21 -27
- package/lib-cjs/component/modal/setting/FormattingTabContent.js +10 -10
- package/lib-cjs/component/modal/setting/GeneralSettings.js +11 -14
- package/lib-cjs/component/modal/setting/GeneralTabContent.js +3 -1
- package/lib-cjs/component/modal/setting/ToolsTabContent.js +18 -19
- package/lib-cjs/component/modal/setting/WorkspaceItem.js +37 -49
- package/lib-cjs/component/modal/setting/settingsValidation.js +14 -12
- package/lib-cjs/component/panels/AutomaticAssignment/useAutoAssignments.js +8 -7
- package/lib-cjs/component/panels/InformationPanel.js +51 -55
- package/lib-cjs/component/panels/IntegralsPanel/IntegralTable.js +1 -1
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +4 -4
- package/lib-cjs/component/panels/MoleculesPanel/Utilities.js +6 -6
- package/lib-cjs/component/panels/MoleculesPanel/useAtomAssignment.js +16 -17
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/ColumnHeader.js +1 -1
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleAnalysisCodeEditor.js +1 -1
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +2 -2
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPreferences.js +18 -17
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +2 -2
- package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +1 -1
- package/lib-cjs/component/panels/PeaksPanel/PeaksTable.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/RangesTable.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/RangesTableRow.js +1 -3
- package/lib-cjs/component/panels/RangesPanel/TableColumns/CouplingColumn.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/hooks/useEditRangeModal.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/hooks/useMapRanges.js +8 -8
- package/lib-cjs/component/panels/SpectrumsPanel/SpectrumListItem.js +6 -6
- package/lib-cjs/component/panels/SpectrumsPanel/SpectrumListPanel.js +3 -3
- package/lib-cjs/component/panels/SpectrumsPanel/SpectrumsTabs.js +6 -6
- package/lib-cjs/component/panels/SpectrumsPanel/base/ColorIndicator.js +2 -2
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum1DSetting.js +2 -1
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum2DSetting.js +2 -1
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +13 -17
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +16 -17
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +20 -21
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +12 -12
- package/lib-cjs/component/panels/SummaryPanel/SetShiftTolerancesModal.js +1 -5
- package/lib-cjs/component/panels/SummaryPanel/utilities/Utilities.js +105 -94
- package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +8 -8
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +5 -4
- package/lib-cjs/component/panels/databasePanel/DatabaseTable.js +20 -5
- package/lib-cjs/component/panels/extra/preferences/ColumnsHelper.js +5 -2
- package/lib-cjs/component/panels/extra/utilities/MultiplicityUtilities.js +2 -2
- package/lib-cjs/component/panels/filtersPanel/FiltersTable.js +1 -1
- package/lib-cjs/component/reducer/IgnoreActions.js +3 -3
- package/lib-cjs/component/reducer/Reducer.js +11 -10
- package/lib-cjs/component/reducer/actions/CorrelationsActions.js +4 -4
- package/lib-cjs/component/reducer/actions/DomainActions.js +49 -67
- package/lib-cjs/component/reducer/actions/FiltersActions.js +3 -3
- package/lib-cjs/component/reducer/actions/HistoryActions.js +5 -5
- package/lib-cjs/component/reducer/actions/LoadActions.js +12 -0
- package/lib-cjs/component/reducer/actions/PreferencesActions.js +18 -37
- package/lib-cjs/component/reducer/actions/RangesActions.js +14 -12
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +9 -3
- package/lib-cjs/component/reducer/actions/ToolsActions.js +20 -35
- package/lib-cjs/component/reducer/actions/ZonesActions.js +2 -2
- package/lib-cjs/component/reducer/core/Constants.js +1 -1
- package/lib-cjs/component/reducer/helper/GetClosestNumber.js +2 -1
- package/lib-cjs/component/reducer/helper/Zoom1DManager.js +11 -10
- package/lib-cjs/component/reducer/helper/getSpectrum.js +3 -5
- package/lib-cjs/component/reducer/helper/getStrongestPeak.js +2 -3
- package/lib-cjs/component/reducer/preferences/actions/removeWorkspace.js +3 -10
- package/lib-cjs/component/reducer/preferences/actions/setPreferences.js +5 -9
- package/lib-cjs/component/reducer/preferences/utilities/mapNucleiFormatting.js +7 -5
- package/lib-cjs/component/tool/BrushX.js +3 -3
- package/lib-cjs/component/tool/BrushXY.js +5 -5
- package/lib-cjs/component/tool/CrossLinePointer.js +3 -3
- package/lib-cjs/component/toolbar/BasicToolBar.js +1 -1
- package/lib-cjs/component/utility/Evaluate.js +2 -2
- package/lib-cjs/component/utility/FileUtility.js +11 -29
- package/lib-cjs/component/utility/GroupByInfoKey.js +11 -13
- package/lib-cjs/component/utility/PathBuilder.js +1 -1
- package/lib-cjs/component/utility/PreferencesHelper.js +2 -3
- package/lib-cjs/component/utility/{Export.js → export.js} +77 -79
- package/lib-cjs/component/utility/formatNumber.js +5 -4
- package/lib-cjs/data/Filters.js +17 -33
- package/lib-cjs/data/FiltersManager.js +4 -3
- package/lib-cjs/data/PredictionManager.js +8 -10
- package/lib-cjs/data/SpectraManager.js +26 -62
- package/lib-cjs/data/data1d/MultipleAnalysis.js +74 -70
- package/lib-cjs/data/data1d/Spectrum1D/SumManager.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/generateJGraphData.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/index.js +25 -25
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.js +6 -5
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateRelatives.js +8 -10
- package/lib-cjs/data/data1d/Spectrum1D/peaks/lookupPeak.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/peaks/optimizePeaks.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/addRange.js +3 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRange.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/mapRanges.js +6 -7
- package/lib-cjs/data/data1d/database.js +45 -28
- package/lib-cjs/data/data1d/filter1d/apodization.js +2 -1
- package/lib-cjs/data/data1d/filter1d/fft.js +23 -6
- package/lib-cjs/data/data1d/filter1d/phaseCorrection.js +2 -2
- package/lib-cjs/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +1 -1
- package/lib-cjs/data/data1d/filter1d/zeroFilling.js +1 -1
- package/lib-cjs/data/data2d/Processing2D.js +7 -18
- package/lib-cjs/data/data2d/Spectrum2D/contours.js +138 -0
- package/lib-cjs/data/data2d/Spectrum2D/index.js +11 -11
- package/lib-cjs/data/data2d/Spectrum2D/initiateDatum2D.js +3 -4
- package/lib-cjs/data/data2d/Spectrum2D/shift/getShift.js +4 -5
- package/lib-cjs/data/data2d/Spectrum2D/zones/detectZones.js +11 -8
- package/lib-cjs/data/data2d/Spectrum2D/zones/detectZonesManual.js +1 -1
- package/lib-cjs/data/data2d/Spectrum2D/zones/getDetectionZones.js +1 -2
- package/lib-cjs/data/molecules/MoleculeManager.js +1 -1
- package/lib-cjs/data/utilities/RangeUtilities.js +13 -9
- package/lib-cjs/data/utilities/ZoneUtilities.js +17 -13
- package/lib-cjs/data/utilities/checkModifierKeyActivated.js +1 -2
- package/lib-cjs/data/utilities/generateChar.js +8 -6
- package/lib-cjs/data/utilities/getAtom.js +1 -1
- package/lib-cjs/data/utilities/getAtomsFromMF.js +2 -2
- package/lib-cjs/data/utilities/getColor.js +3 -3
- package/lib-cjs/data/utilities/getSum.js +6 -3
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +30 -26
- package/lib/component/1d/IntegralResizable.js +0 -72
- package/lib/component/elements/popup/helpers.d.ts +0 -1
- package/lib/component/elements/popup/helpers.js +0 -9
- package/lib/component/panels/RangesPanel/TableColumns/format.d.ts +0 -1
- package/lib/component/panels/RangesPanel/TableColumns/format.js +0 -8
- package/lib/data/data1d/Data1DManager.d.ts +0 -3
- package/lib/data/data1d/Data1DManager.js +0 -98
- package/lib/data/data2d/Data2DManager.d.ts +0 -3
- package/lib/data/data2d/Data2DManager.js +0 -34
- package/lib/data/types/data2d/Contour.d.ts +0 -4
- package/lib/data/types/data2d/Contour.js +0 -1
- package/lib/data/types/data2d/Contours.d.ts +0 -2
- package/lib/data/types/data2d/Contours.js +0 -1
- package/lib-cjs/component/1d/IntegralResizable.js +0 -77
- package/lib-cjs/component/elements/popup/helpers.js +0 -13
- package/lib-cjs/component/panels/RangesPanel/TableColumns/format.js +0 -14
- package/lib-cjs/data/data1d/Data1DManager.js +0 -104
- package/lib-cjs/data/data2d/Data2DManager.js +0 -40
- package/lib-cjs/data/types/data2d/Contour.js +0 -2
- package/lib-cjs/data/types/data2d/Contours.js +0 -2
|
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
const react_1 = require("react");
|
|
8
7
|
const CheckBoxCell_1 = require("../../elements/CheckBoxCell");
|
|
9
8
|
const ReactTable_1 = __importDefault(require("../../elements/ReactTable/ReactTable"));
|
|
10
9
|
const LIST = [
|
|
@@ -60,36 +59,31 @@ const LIST = [
|
|
|
60
59
|
label: 'Automatic assignment panel',
|
|
61
60
|
name: 'panels.automaticAssignmentPanel',
|
|
62
61
|
},
|
|
62
|
+
];
|
|
63
|
+
const COLUMNS = [
|
|
64
|
+
{
|
|
65
|
+
index: 1,
|
|
66
|
+
Header: '#',
|
|
67
|
+
Cell: ({ row }) => row.index + 1,
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
index: 1,
|
|
71
|
+
Header: 'Feature',
|
|
72
|
+
accessor: 'label',
|
|
73
|
+
style: { width: '60%' },
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
index: 2,
|
|
77
|
+
Header: 'Active',
|
|
78
|
+
Cell: ({ row }) => ((0, jsx_runtime_1.jsx)(CheckBoxCell_1.CheckBoxCell, { name: `display.${row.original.name}.display`, defaultValue: false })),
|
|
79
|
+
},
|
|
63
80
|
{
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
81
|
+
index: 3,
|
|
82
|
+
Header: 'Open on load',
|
|
83
|
+
Cell: ({ row }) => ((0, jsx_runtime_1.jsx)(CheckBoxCell_1.CheckBoxCell, { name: `display.${row.original.name}.open`, defaultValue: false })),
|
|
67
84
|
},
|
|
68
85
|
];
|
|
69
86
|
function DisplayTabContent() {
|
|
70
|
-
const COLUMNS = (0, react_1.useMemo)(() => [
|
|
71
|
-
{
|
|
72
|
-
index: 1,
|
|
73
|
-
Header: '#',
|
|
74
|
-
Cell: ({ row }) => row.index + 1,
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
index: 1,
|
|
78
|
-
Header: 'Feature',
|
|
79
|
-
accessor: 'label',
|
|
80
|
-
style: { width: '60%' },
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
index: 2,
|
|
84
|
-
Header: 'Active',
|
|
85
|
-
Cell: ({ row }) => ((0, jsx_runtime_1.jsx)(CheckBoxCell_1.CheckBoxCell, { name: `display.${row.original.name}.display`, defaultValue: false })),
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
index: 3,
|
|
89
|
-
Header: 'Open on load',
|
|
90
|
-
Cell: ({ row }) => !row.original.hideOpenOption ? ((0, jsx_runtime_1.jsx)(CheckBoxCell_1.CheckBoxCell, { name: `display.${row.original.name}.open`, defaultValue: false })) : ((0, jsx_runtime_1.jsx)("div", {})),
|
|
91
|
-
},
|
|
92
|
-
], []);
|
|
93
87
|
return ((0, jsx_runtime_1.jsx)("div", { style: { width: '100%', overflow: 'hidden' }, children: (0, jsx_runtime_1.jsx)(ReactTable_1.default, { columns: COLUMNS, data: LIST }) }));
|
|
94
88
|
}
|
|
95
89
|
exports.default = DisplayTabContent;
|
|
@@ -9,9 +9,9 @@ const react_1 = require("@emotion/react");
|
|
|
9
9
|
const uuid_1 = require("@lukeed/uuid");
|
|
10
10
|
const formik_1 = require("formik");
|
|
11
11
|
const get_1 = __importDefault(require("lodash/get"));
|
|
12
|
-
const react_2 = require("react");
|
|
13
12
|
const fa_1 = require("react-icons/fa");
|
|
14
13
|
const Button_1 = __importDefault(require("../../elements/Button"));
|
|
14
|
+
const GroupPane_1 = require("../../elements/GroupPane");
|
|
15
15
|
const FormikInput_1 = __importDefault(require("../../elements/formik/FormikInput"));
|
|
16
16
|
const styles = (0, react_1.css) `
|
|
17
17
|
.counter-col {
|
|
@@ -52,8 +52,8 @@ const styles = (0, react_1.css) `
|
|
|
52
52
|
`;
|
|
53
53
|
function FormattingTabContent() {
|
|
54
54
|
const { values, setFieldValue } = (0, formik_1.useFormikContext)();
|
|
55
|
-
const nuclei = (0,
|
|
56
|
-
|
|
55
|
+
const nuclei = (0, get_1.default)(values, 'formatting.nuclei', {});
|
|
56
|
+
function deleteHandler(key) {
|
|
57
57
|
let _nuclei = {};
|
|
58
58
|
for (const nucleus in nuclei) {
|
|
59
59
|
if (nucleus !== key) {
|
|
@@ -61,8 +61,8 @@ function FormattingTabContent() {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
setFieldValue('formatting.nuclei', _nuclei);
|
|
64
|
-
}
|
|
65
|
-
|
|
64
|
+
}
|
|
65
|
+
function addHandler() {
|
|
66
66
|
const newFormat = {
|
|
67
67
|
name: '',
|
|
68
68
|
ppm: '0.00',
|
|
@@ -71,11 +71,11 @@ function FormattingTabContent() {
|
|
|
71
71
|
const key = (0, uuid_1.v4)();
|
|
72
72
|
const newNuclei = { ...nuclei, [key]: newFormat };
|
|
73
73
|
setFieldValue('formatting.nuclei', newNuclei);
|
|
74
|
-
}
|
|
74
|
+
}
|
|
75
75
|
const nucleiList = Object.keys(nuclei);
|
|
76
|
-
return ((0, jsx_runtime_1.
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
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) => {
|
|
77
|
+
const num = index + 1;
|
|
78
|
+
return ((0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsxs)("td", { className: "counter-col", children: [(0, jsx_runtime_1.jsxs)("span", { children: [num, " - "] }), ' '] }), (0, jsx_runtime_1.jsx)("td", { className: "nucleus-label-col", children: (0, jsx_runtime_1.jsx)(FormikInput_1.default, { name: `formatting.nuclei.${key}.name`, className: "input", checkErrorAfterInputTouched: false }) }), (0, jsx_runtime_1.jsx)("td", { className: "nucleus-format-input-col", children: (0, jsx_runtime_1.jsx)(FormikInput_1.default, { name: `formatting.nuclei.${key}.ppm`, className: "input" }) }), (0, jsx_runtime_1.jsx)("td", { className: "nucleus-format-input-col", children: (0, jsx_runtime_1.jsx)(FormikInput_1.default, { name: `formatting.nuclei.${key}.hz`, className: "input" }) }), (0, jsx_runtime_1.jsxs)("td", { className: "operation-container", children: [(0, jsx_runtime_1.jsx)(Button_1.default.Danger, { style: { fontSize: '14px' }, fill: "clear", onClick: () => deleteHandler(key), children: (0, jsx_runtime_1.jsx)(fa_1.FaTimes, {}) }), nucleiList.length === index + 1 && ((0, jsx_runtime_1.jsx)(Button_1.default.Done, { fill: "clear", style: { fontSize: '14px' }, onClick: addHandler, children: (0, jsx_runtime_1.jsx)(fa_1.FaPlus, {}) }))] })] }, `${key}`));
|
|
79
|
+
}) })] }) }) }));
|
|
80
80
|
}
|
|
81
81
|
exports.default = FormattingTabContent;
|
|
@@ -135,9 +135,6 @@ function GeneralSettings({ onClose }) {
|
|
|
135
135
|
},
|
|
136
136
|
]);
|
|
137
137
|
}, [workspaces]);
|
|
138
|
-
const handleSave = () => {
|
|
139
|
-
refForm.current.submitForm();
|
|
140
|
-
};
|
|
141
138
|
const handleReset = () => {
|
|
142
139
|
const workSpaceDisplayPreferences = (0, getPreferencesByWorkspace_1.getPreferencesByWorkspace)(preferences.workspace.current);
|
|
143
140
|
refForm.current.setValues(workSpaceDisplayPreferences);
|
|
@@ -145,15 +142,15 @@ function GeneralSettings({ onClose }) {
|
|
|
145
142
|
const handleClose = () => {
|
|
146
143
|
onClose?.();
|
|
147
144
|
};
|
|
148
|
-
|
|
145
|
+
function submitHandler(values) {
|
|
149
146
|
dispatch({ type: 'SET_PREFERENCES', payload: values });
|
|
150
147
|
alert.success('Settings saved successfully');
|
|
151
148
|
onClose?.();
|
|
152
|
-
}
|
|
149
|
+
}
|
|
153
150
|
const tabChangeHandler = (0, react_2.useCallback)((tab) => {
|
|
154
151
|
setActiveTab(tab.tabid);
|
|
155
152
|
}, []);
|
|
156
|
-
|
|
153
|
+
function addWorkSpaceHandler(name) {
|
|
157
154
|
dispatch({
|
|
158
155
|
type: 'ADD_WORKSPACE',
|
|
159
156
|
payload: {
|
|
@@ -161,28 +158,28 @@ function GeneralSettings({ onClose }) {
|
|
|
161
158
|
data: refForm.current.values,
|
|
162
159
|
},
|
|
163
160
|
});
|
|
164
|
-
}
|
|
165
|
-
|
|
161
|
+
}
|
|
162
|
+
function deleteWorkSpaceHandler(key) {
|
|
166
163
|
dispatch({
|
|
167
164
|
type: 'REMOVE_WORKSPACE',
|
|
168
165
|
payload: {
|
|
169
166
|
workspace: key,
|
|
170
167
|
},
|
|
171
168
|
});
|
|
172
|
-
}
|
|
173
|
-
|
|
169
|
+
}
|
|
170
|
+
function ChangeWorkspaceHandler(option) {
|
|
174
171
|
dispatch({
|
|
175
172
|
type: 'SET_WORKSPACE',
|
|
176
173
|
payload: {
|
|
177
174
|
workspace: option.key,
|
|
178
175
|
},
|
|
179
176
|
});
|
|
180
|
-
}
|
|
181
|
-
|
|
177
|
+
}
|
|
178
|
+
function renderItem(item) {
|
|
182
179
|
return ((0, jsx_runtime_1.jsx)(WorkspaceItem_1.default, { item: item, onSave: addWorkSpaceHandler, onDelete: deleteWorkSpaceHandler }));
|
|
183
|
-
}
|
|
180
|
+
}
|
|
184
181
|
return ((0, jsx_runtime_1.jsxs)("div", { css: [ModalStyle_1.ModalStyles, styles], children: [(0, jsx_runtime_1.jsxs)("div", { className: "header handle", children: [(0, jsx_runtime_1.jsx)("span", { children: "General Settings" }), (0, jsx_runtime_1.jsx)(CloseButton_1.default, { onClick: onClose, className: "close-bt" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "workspace-container", children: [(0, jsx_runtime_1.jsx)("span", { className: "label", children: "Workspace : " }), (0, jsx_runtime_1.jsx)(DropDownButton_1.default, { data: workspacesList, renderItem: renderItem, selectedKey: preferences?.workspace.current, onSelect: ChangeWorkspaceHandler }), (0, jsx_runtime_1.jsx)(Button_1.default.Danger, { fill: "outline", size: "xSmall", onClick: handleReset, style: {
|
|
185
182
|
marginLeft: '10px',
|
|
186
|
-
}, children: "Reset workspace settings" })] }), (0, jsx_runtime_1.jsx)("div", { className: "main-content", children: (0, jsx_runtime_1.jsx)(FormikForm_1.default, { ref: refForm, initialValues: currentWorkspace, validationSchema: settingsValidation_1.validation, onSubmit: submitHandler, children: (0, jsx_runtime_1.jsxs)(Tabs_1.default, { position: Tabs_1.PositionsEnum.LEFT, activeTab: activeTab, onClick: tabChangeHandler, children: [(0, jsx_runtime_1.jsx)(Tab_1.default, { tablabel: "General", tabid: "general", children: (0, jsx_runtime_1.jsx)("div", { className: "inner-content", children: (0, jsx_runtime_1.jsx)(GeneralTabContent_1.default, {}) }) }), (0, jsx_runtime_1.jsx)(Tab_1.default, { tablabel: "Formatting", tabid: "formatting", children: (0, jsx_runtime_1.jsx)("div", { className: "inner-content", children: (0, jsx_runtime_1.jsx)(FormattingTabContent_1.default, {}) }) }), (0, jsx_runtime_1.jsx)(Tab_1.default, { tablabel: "Panels", tabid: "display", children: (0, jsx_runtime_1.jsx)("div", { className: "inner-content", children: (0, jsx_runtime_1.jsx)(DisplayTabContent_1.default, {}) }) }), (0, jsx_runtime_1.jsx)(Tab_1.default, { tablabel: "Tools", tabid: "tools", children: (0, jsx_runtime_1.jsx)("div", { className: "inner-content", children: (0, jsx_runtime_1.jsx)(ToolsTabContent_1.default, {}) }) }), (0, jsx_runtime_1.jsx)(Tab_1.default, { tablabel: "Databases", tabid: "databases", children: (0, jsx_runtime_1.jsx)("div", { className: "inner-content", children: (0, jsx_runtime_1.jsx)(DatabasesTabContent_1.default, { currentWorkspace: preferences.workspace.current }) }) })] }) }, JSON.stringify(currentWorkspace)) }), (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:
|
|
183
|
+
}, children: "Reset workspace settings" })] }), (0, jsx_runtime_1.jsx)("div", { className: "main-content", children: (0, jsx_runtime_1.jsx)(FormikForm_1.default, { ref: refForm, initialValues: currentWorkspace, validationSchema: settingsValidation_1.validation, onSubmit: submitHandler, children: (0, jsx_runtime_1.jsxs)(Tabs_1.default, { position: Tabs_1.PositionsEnum.LEFT, activeTab: activeTab, onClick: tabChangeHandler, children: [(0, jsx_runtime_1.jsx)(Tab_1.default, { tablabel: "General", tabid: "general", children: (0, jsx_runtime_1.jsx)("div", { className: "inner-content", children: (0, jsx_runtime_1.jsx)(GeneralTabContent_1.default, {}) }) }), (0, jsx_runtime_1.jsx)(Tab_1.default, { tablabel: "Formatting", tabid: "formatting", children: (0, jsx_runtime_1.jsx)("div", { className: "inner-content", children: (0, jsx_runtime_1.jsx)(FormattingTabContent_1.default, {}) }) }), (0, jsx_runtime_1.jsx)(Tab_1.default, { tablabel: "Panels", tabid: "display", children: (0, jsx_runtime_1.jsx)("div", { className: "inner-content", children: (0, jsx_runtime_1.jsx)(DisplayTabContent_1.default, {}) }) }), (0, jsx_runtime_1.jsx)(Tab_1.default, { tablabel: "Tools", tabid: "tools", children: (0, jsx_runtime_1.jsx)("div", { className: "inner-content", children: (0, jsx_runtime_1.jsx)(ToolsTabContent_1.default, {}) }) }), (0, jsx_runtime_1.jsx)(Tab_1.default, { tablabel: "Databases", tabid: "databases", children: (0, jsx_runtime_1.jsx)("div", { className: "inner-content", children: (0, jsx_runtime_1.jsx)(DatabasesTabContent_1.default, { currentWorkspace: preferences.workspace.current }) }) })] }) }, JSON.stringify(currentWorkspace)) }), (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: () => refForm.current.submitForm(), doneLabel: "Save", onCancel: handleClose }) })] }));
|
|
187
184
|
}
|
|
188
185
|
exports.default = GeneralSettings;
|
|
@@ -4,9 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const GroupPane_1 = require("../../elements/GroupPane");
|
|
7
8
|
const Label_1 = __importDefault(require("../../elements/Label"));
|
|
9
|
+
const FormikCheckBox_1 = __importDefault(require("../../elements/formik/FormikCheckBox"));
|
|
8
10
|
const FormikInput_1 = __importDefault(require("../../elements/formik/FormikInput"));
|
|
9
11
|
function GeneralTabContent() {
|
|
10
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(
|
|
12
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(GroupPane_1.GroupPane, { text: "Spectra", children: (0, jsx_runtime_1.jsx)(Label_1.default, { title: "Opacity of dimmed spectra [ 0 - 1 ]", children: (0, jsx_runtime_1.jsx)(FormikInput_1.default, { name: "general.dimmedSpectraOpacity", checkValue: (value) => value >= 0 && value <= 1, type: "number" }) }) }), (0, jsx_runtime_1.jsx)(GroupPane_1.GroupPane, { text: "Experimental features", children: (0, jsx_runtime_1.jsx)(Label_1.default, { title: "Enable experimental features", htmlFor: "display.general.experimentalFeatures.display", children: (0, jsx_runtime_1.jsx)(FormikCheckBox_1.default, { name: "display.general.experimentalFeatures.display" }) }) })] }));
|
|
11
13
|
}
|
|
12
14
|
exports.default = GeneralTabContent;
|
|
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
const react_1 = require("react");
|
|
8
7
|
const CheckBoxCell_1 = require("../../elements/CheckBoxCell");
|
|
9
8
|
const ReactTable_1 = __importDefault(require("../../elements/ReactTable/ReactTable"));
|
|
10
9
|
const LIST = [
|
|
@@ -85,25 +84,25 @@ const LIST = [
|
|
|
85
84
|
name: 'toolBarButtons.multipleSpectraAnalysis',
|
|
86
85
|
},
|
|
87
86
|
];
|
|
87
|
+
const COLUMNS = [
|
|
88
|
+
{
|
|
89
|
+
index: 1,
|
|
90
|
+
Header: '#',
|
|
91
|
+
Cell: ({ row }) => row.index + 1,
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
index: 1,
|
|
95
|
+
Header: 'Tool',
|
|
96
|
+
accessor: 'label',
|
|
97
|
+
style: { width: '60%' },
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
index: 2,
|
|
101
|
+
Header: 'Active',
|
|
102
|
+
Cell: ({ row }) => ((0, jsx_runtime_1.jsx)(CheckBoxCell_1.CheckBoxCell, { name: `display.${row.original.name}`, defaultValue: false })),
|
|
103
|
+
},
|
|
104
|
+
];
|
|
88
105
|
function ToolsTabContent() {
|
|
89
|
-
const COLUMNS = (0, react_1.useMemo)(() => [
|
|
90
|
-
{
|
|
91
|
-
index: 1,
|
|
92
|
-
Header: '#',
|
|
93
|
-
Cell: ({ row }) => row.index + 1,
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
index: 1,
|
|
97
|
-
Header: 'Tool',
|
|
98
|
-
accessor: 'label',
|
|
99
|
-
style: { width: '60%' },
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
index: 2,
|
|
103
|
-
Header: 'Active',
|
|
104
|
-
Cell: ({ row }) => ((0, jsx_runtime_1.jsx)(CheckBoxCell_1.CheckBoxCell, { name: `display.${row.original.name}`, defaultValue: false })),
|
|
105
|
-
},
|
|
106
|
-
], []);
|
|
107
106
|
return ((0, jsx_runtime_1.jsx)("div", { style: { width: '100%', overflow: 'hidden' }, children: (0, jsx_runtime_1.jsx)(ReactTable_1.default, { columns: COLUMNS, data: LIST }) }));
|
|
108
107
|
}
|
|
109
108
|
exports.default = ToolsTabContent;
|
|
@@ -3,62 +3,50 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const jsx_runtime_1 = require("
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
const
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const fa_1 = require("react-icons/fa");
|
|
9
|
+
const Button_1 = __importDefault(require("../../elements/Button"));
|
|
10
10
|
const workspaces_1 = __importDefault(require("../../workspaces"));
|
|
11
|
-
const styles =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.delete-button:hover {
|
|
37
|
-
color: white;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.save-button:hover {
|
|
41
|
-
color: green;
|
|
42
|
-
}
|
|
43
|
-
.delete-button,
|
|
44
|
-
.save-button {
|
|
45
|
-
padding: 5px;
|
|
46
|
-
}
|
|
47
|
-
`;
|
|
11
|
+
const styles = {
|
|
12
|
+
container: {
|
|
13
|
+
display: 'flex',
|
|
14
|
+
},
|
|
15
|
+
item: {
|
|
16
|
+
flex: '1',
|
|
17
|
+
textAlign: 'left',
|
|
18
|
+
fontSize: '11px',
|
|
19
|
+
padding: '5px',
|
|
20
|
+
},
|
|
21
|
+
newContainer: {
|
|
22
|
+
backgroundColor: '#f6f6f6',
|
|
23
|
+
display: 'flex',
|
|
24
|
+
padding: '0.3em',
|
|
25
|
+
},
|
|
26
|
+
input: {
|
|
27
|
+
padding: '0.5em 0.8em',
|
|
28
|
+
fontSize: '12px',
|
|
29
|
+
color: 'black',
|
|
30
|
+
outline: 'none',
|
|
31
|
+
backgroundColor: 'transparent',
|
|
32
|
+
},
|
|
33
|
+
};
|
|
48
34
|
function WorkspaceItem({ item, onSave, onDelete }) {
|
|
49
|
-
const [name, setName] = (0,
|
|
50
|
-
|
|
35
|
+
const [name, setName] = (0, react_1.useState)('');
|
|
36
|
+
// Add new workspace
|
|
37
|
+
function addHandler(e) {
|
|
51
38
|
e.stopPropagation();
|
|
52
39
|
setName('');
|
|
53
40
|
onSave(name);
|
|
54
|
-
}
|
|
55
|
-
|
|
41
|
+
}
|
|
42
|
+
// bubble onDelete
|
|
43
|
+
function deleteHandler(e) {
|
|
56
44
|
e.stopPropagation();
|
|
57
45
|
onDelete(item.key);
|
|
58
|
-
}
|
|
59
|
-
|
|
46
|
+
}
|
|
47
|
+
function onTextChange(e) {
|
|
60
48
|
setName(e.target.value);
|
|
61
|
-
}
|
|
62
|
-
return ((0, jsx_runtime_1.jsx)("div", {
|
|
49
|
+
}
|
|
50
|
+
return ((0, jsx_runtime_1.jsx)("div", { children: item.key === 'new' ? ((0, jsx_runtime_1.jsxs)("div", { style: styles.newContainer, children: [(0, jsx_runtime_1.jsx)("input", { style: styles.input, value: name, placeholder: "Custom workspace", onClick: (e) => e.stopPropagation(), onChange: onTextChange }), (0, jsx_runtime_1.jsx)(Button_1.default.Done, { onClick: addHandler, disabled: !name, style: { fontSize: '11px' }, children: "Save" })] })) : ((0, jsx_runtime_1.jsxs)("div", { style: styles.container, children: [(0, jsx_runtime_1.jsx)("span", { style: styles.item, children: item.label }), !workspaces_1.default[item.key] && ((0, jsx_runtime_1.jsx)(Button_1.default.Danger, { onClick: deleteHandler, size: "xSmall", fill: "clear", children: (0, jsx_runtime_1.jsx)(fa_1.FaTimes, {}) }))] })) }));
|
|
63
51
|
}
|
|
64
52
|
exports.default = WorkspaceItem;
|
|
@@ -25,14 +25,16 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.validation = void 0;
|
|
27
27
|
const Yup = __importStar(require("yup"));
|
|
28
|
-
const formattingElementValidation = (obj) =>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
},
|
|
28
|
+
const formattingElementValidation = (obj) => {
|
|
29
|
+
return Object.fromEntries(Object.keys(obj.formatting.nuclei).map((key) => [
|
|
30
|
+
key,
|
|
31
|
+
Yup.object().shape({
|
|
32
|
+
name: Yup.string().trim().required('Nucleus is a required field'),
|
|
33
|
+
ppm: Yup.string().trim().required('PPM format is a required field'),
|
|
34
|
+
hz: Yup.string().trim().required('Hz format is a required field'),
|
|
35
|
+
}),
|
|
36
|
+
]));
|
|
37
|
+
};
|
|
36
38
|
const formattingValidation = (obj) => Yup.object().shape({
|
|
37
39
|
nuclei: Yup.object()
|
|
38
40
|
.shape(formattingElementValidation(obj))
|
|
@@ -50,15 +52,15 @@ const formattingValidation = (obj) => Yup.object().shape({
|
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
54
|
}
|
|
53
|
-
const errors =
|
|
55
|
+
const errors = [];
|
|
56
|
+
for (const key in nucleusFrequencies) {
|
|
54
57
|
const { value, fields } = nucleusFrequencies[key];
|
|
55
58
|
if (value > 1) {
|
|
56
59
|
for (let field of fields) {
|
|
57
|
-
|
|
60
|
+
errors.push(new Yup.ValidationError(`${key} nucleus must te be unique`, nuclei[key].name, `${this.path}.${field}.name`));
|
|
58
61
|
}
|
|
59
62
|
}
|
|
60
|
-
|
|
61
|
-
}, []);
|
|
63
|
+
}
|
|
62
64
|
return new Yup.ValidationError(errors);
|
|
63
65
|
}),
|
|
64
66
|
});
|
|
@@ -11,20 +11,21 @@ const ChartContext_1 = require("../../context/ChartContext");
|
|
|
11
11
|
const DispatchContext_1 = require("../../context/DispatchContext");
|
|
12
12
|
const Alert_1 = require("../../elements/popup/Alert");
|
|
13
13
|
const Types_1 = require("../../reducer/types/Types");
|
|
14
|
+
const assert_1 = require("../../utility/assert");
|
|
14
15
|
function mapSpectra(data) {
|
|
15
|
-
return data.
|
|
16
|
+
return data.map((spectrum) => {
|
|
16
17
|
const { id, info } = spectrum;
|
|
17
|
-
const dimension =
|
|
18
|
+
const dimension = info.dimension;
|
|
19
|
+
(0, assert_1.assert)(dimension === 1 || dimension === 2, 'dimension must be 1 or 2');
|
|
18
20
|
if (dimension === 1) {
|
|
19
21
|
const ranges = spectrum.ranges.values;
|
|
20
|
-
|
|
22
|
+
return { id, info, ranges };
|
|
21
23
|
}
|
|
22
|
-
else
|
|
24
|
+
else {
|
|
23
25
|
const zones = spectrum.zones.values;
|
|
24
|
-
|
|
26
|
+
return { id, info, zones };
|
|
25
27
|
}
|
|
26
|
-
|
|
27
|
-
}, []);
|
|
28
|
+
});
|
|
28
29
|
}
|
|
29
30
|
function useAutoAssignments() {
|
|
30
31
|
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
7
|
const react_1 = require("react");
|
|
8
|
+
const Input_1 = __importDefault(require("../elements/Input"));
|
|
8
9
|
const ReactTableFlexLayout_1 = __importDefault(require("../elements/ReactTable/ReactTableFlexLayout"));
|
|
9
10
|
const useSpectrum_1 = __importDefault(require("../hooks/useSpectrum"));
|
|
10
11
|
const styles = {
|
|
@@ -15,67 +16,62 @@ const styles = {
|
|
|
15
16
|
width: '100%',
|
|
16
17
|
},
|
|
17
18
|
tableContainer: {
|
|
18
|
-
height: 'calc(100% - 30px)',
|
|
19
19
|
overflow: 'auto',
|
|
20
20
|
display: 'block',
|
|
21
21
|
},
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
marginBottom: '2px',
|
|
22
|
+
tableHeader: {
|
|
23
|
+
padding: ' 5px 10px',
|
|
24
|
+
backgroundColor: ' #f8f8f8',
|
|
25
|
+
borderBottom: '1px solid gray',
|
|
26
|
+
fontSize: '1em',
|
|
28
27
|
},
|
|
29
28
|
};
|
|
30
|
-
function
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const values = Object.keys(information).filter((key) => key
|
|
36
|
-
.toLowerCase()
|
|
37
|
-
.includes(e.target ? e.target.value.toLowerCase() : e.toLowerCase()));
|
|
38
|
-
setMatchesData(values);
|
|
39
|
-
}, [information]);
|
|
40
|
-
(0, react_1.useEffect)(() => {
|
|
41
|
-
if (searchRef.current) {
|
|
42
|
-
handleSearch(searchRef.current.value);
|
|
29
|
+
function filter(searchKey, data) {
|
|
30
|
+
const result = [];
|
|
31
|
+
for (const key in data) {
|
|
32
|
+
if (!searchKey || key.toLowerCase().includes(searchKey)) {
|
|
33
|
+
result.push({ key, value: data[key] });
|
|
43
34
|
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
35
|
+
}
|
|
36
|
+
return result;
|
|
37
|
+
}
|
|
38
|
+
const columns = [
|
|
39
|
+
{
|
|
40
|
+
Header: 'Parameter',
|
|
41
|
+
sortType: 'basic',
|
|
42
|
+
minWidth: 100,
|
|
43
|
+
width: 20,
|
|
44
|
+
maxWidth: 20,
|
|
45
|
+
accessor: 'key',
|
|
46
|
+
Cell: ({ row }) => ((0, jsx_runtime_1.jsx)("p", { style: { padding: '5px', backgroundColor: 'white' }, children: row.original.key })),
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
Header: 'Value',
|
|
50
|
+
sortType: 'basic',
|
|
51
|
+
resizable: true,
|
|
52
|
+
accessor: 'value',
|
|
53
|
+
Cell: ({ row }) => ((0, jsx_runtime_1.jsx)("p", { style: {
|
|
54
|
+
backgroundColor: '#efefef',
|
|
55
|
+
height: '100%',
|
|
56
|
+
padding: '5px',
|
|
57
|
+
fontFamily: 'monospace',
|
|
58
|
+
whiteSpace: 'pre',
|
|
59
|
+
overflow: 'hidden',
|
|
60
|
+
}, children: `${row.original.value}` })),
|
|
61
|
+
},
|
|
62
|
+
];
|
|
63
|
+
function InformationPanelInner({ info, meta }) {
|
|
64
|
+
const [searchKey, setSearchKey] = (0, react_1.useState)();
|
|
65
|
+
function handleSearch(e) {
|
|
66
|
+
const searchKey = e.target.value.toLowerCase();
|
|
67
|
+
setSearchKey(searchKey);
|
|
68
|
+
}
|
|
69
|
+
const matchesInfo = filter(searchKey, info);
|
|
70
|
+
const matchesMeta = filter(searchKey, meta);
|
|
71
|
+
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: {
|
|
72
|
+
inputWrapper: { width: '100%' },
|
|
73
|
+
input: { textAlign: 'left', padding: '5px' },
|
|
74
|
+
} }) }), (0, jsx_runtime_1.jsxs)("div", { style: styles.tableContainer, children: [(0, jsx_runtime_1.jsx)("p", { style: styles.tableHeader, children: "Spectrum information" }), (0, jsx_runtime_1.jsx)(ReactTableFlexLayout_1.default, { data: matchesInfo, columns: columns, style: { height: 'auto' } }), (0, jsx_runtime_1.jsx)("p", { style: styles.tableHeader, children: "Other parameters" }), (0, jsx_runtime_1.jsx)(ReactTableFlexLayout_1.default, { data: matchesMeta, columns: columns, style: { height: 'auto' } })] })] }));
|
|
79
75
|
}
|
|
80
76
|
const MemoizedInformationPanel = (0, react_1.memo)(InformationPanelInner);
|
|
81
77
|
const emptyData = { info: {}, meta: {} };
|
|
@@ -93,7 +93,7 @@ function IntegralTable({ activeTab, data }) {
|
|
|
93
93
|
index: 5,
|
|
94
94
|
id: 'relative',
|
|
95
95
|
Header: () => {
|
|
96
|
-
const n = activeTab?.replace(/
|
|
96
|
+
const n = activeTab?.replace(/\d/g, '');
|
|
97
97
|
return (0, jsx_runtime_1.jsx)("span", { children: `Relative ${n}` });
|
|
98
98
|
},
|
|
99
99
|
accessor: (row) => {
|
|
@@ -21,7 +21,7 @@ const Alert_1 = require("../../elements/popup/Alert");
|
|
|
21
21
|
const Modal_1 = require("../../elements/popup/Modal");
|
|
22
22
|
const PredictSpectraModal_1 = __importDefault(require("../../modal/PredictSpectraModal"));
|
|
23
23
|
const Types_1 = require("../../reducer/types/Types");
|
|
24
|
-
const
|
|
24
|
+
const export_1 = require("../../utility/export");
|
|
25
25
|
const toolbarStyle = (0, react_1.css) `
|
|
26
26
|
display: flex;
|
|
27
27
|
flex-direction: row;
|
|
@@ -72,17 +72,17 @@ function MoleculePanelHeader({ currentIndex, molecules, floatingMolecules, onMol
|
|
|
72
72
|
const saveAsSVGHandler = (0, react_2.useCallback)(() => {
|
|
73
73
|
if (!rootRef)
|
|
74
74
|
return;
|
|
75
|
-
(0,
|
|
75
|
+
(0, export_1.exportAsSVG)(rootRef, `molSVG${currentIndex}`, 'molFile');
|
|
76
76
|
}, [rootRef, currentIndex]);
|
|
77
77
|
const saveAsPNGHandler = (0, react_2.useCallback)(() => {
|
|
78
78
|
if (!rootRef)
|
|
79
79
|
return;
|
|
80
|
-
(0,
|
|
80
|
+
(0, export_1.copyPNGToClipboard)(rootRef, `molSVG${currentIndex}`);
|
|
81
81
|
alert.success('MOL copied as PNG to clipboard');
|
|
82
82
|
}, [rootRef, alert, currentIndex]);
|
|
83
83
|
const saveAsMolHandler = (0, react_2.useCallback)(() => {
|
|
84
84
|
if (molecules[currentIndex]) {
|
|
85
|
-
void (0,
|
|
85
|
+
void (0, export_1.copyTextToClipboard)(molecules[currentIndex].molfile).then((flag) => {
|
|
86
86
|
if (flag) {
|
|
87
87
|
alert.success('MOLFile copied to clipboard');
|
|
88
88
|
}
|