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
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.toggleDiaIDs = exports.getCurrentDiaIDsToHighlight = exports.getHighlightsOnHover = exports.findDatumAndSignalIndex = exports.extractFromAtom = void 0;
|
|
4
4
|
function getElements(activeTab) {
|
|
5
5
|
const nuclei = activeTab.split(',');
|
|
6
|
-
return nuclei.map((nucleus) => nucleus.replace(/
|
|
6
|
+
return nuclei.map((nucleus) => nucleus.replace(/\d/g, ''));
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
9
|
* Returns the OCL id(s) and number of atoms of an atom when hovering over
|
|
@@ -97,15 +97,15 @@ function toggleDiaIDs(diaIDs, atomInformation) {
|
|
|
97
97
|
let _diaIDs = diaIDs ? diaIDs.slice() : [];
|
|
98
98
|
const { nbAtoms, oclIDs } = atomInformation;
|
|
99
99
|
let tempNbAtoms = nbAtoms;
|
|
100
|
-
oclIDs
|
|
101
|
-
if (_diaIDs.includes(
|
|
100
|
+
for (const oclID of oclIDs) {
|
|
101
|
+
if (_diaIDs.includes(oclID)) {
|
|
102
102
|
tempNbAtoms *= -1;
|
|
103
|
-
_diaIDs = _diaIDs.filter((_id) => _id !==
|
|
103
|
+
_diaIDs = _diaIDs.filter((_id) => _id !== oclID);
|
|
104
104
|
}
|
|
105
105
|
else {
|
|
106
|
-
_diaIDs.push(
|
|
106
|
+
_diaIDs.push(oclID);
|
|
107
107
|
}
|
|
108
|
-
}
|
|
108
|
+
}
|
|
109
109
|
return [_diaIDs, tempNbAtoms];
|
|
110
110
|
}
|
|
111
111
|
exports.toggleDiaIDs = toggleDiaIDs;
|
|
@@ -78,24 +78,23 @@ function useAtomAssignment({ displayerMode, activeTab: nucleus, zones, ranges, }
|
|
|
78
78
|
// used for atom highlighting for now, until we would like to highlight atoms per axis separately
|
|
79
79
|
const assignedDiaIDsMerged = (0, react_1.useMemo)(() => assignedDiaIDs.x.concat(assignedDiaIDs.y), [assignedDiaIDs.x, assignedDiaIDs.y]);
|
|
80
80
|
const currentDiaIDsToHighlight = (0, react_1.useMemo)(() => {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
.flat());
|
|
97
|
-
}
|
|
81
|
+
const highlights = highlightData.highlight.highlighted
|
|
82
|
+
.filter((highlightID) => {
|
|
83
|
+
return assignments.data.assignments[highlightID];
|
|
84
|
+
})
|
|
85
|
+
.flatMap((highlightID) => {
|
|
86
|
+
const { datum } = (0, Utilities_1.findDatumAndSignalIndex)(data, highlightID);
|
|
87
|
+
const type = highlightData.highlight.sourceData?.type;
|
|
88
|
+
if (datum &&
|
|
89
|
+
(type === highlight_1.HighlightEventSource.ZONE ||
|
|
90
|
+
type === highlight_1.HighlightEventSource.RANGE ||
|
|
91
|
+
type === highlight_1.HighlightEventSource.ATOM)) {
|
|
92
|
+
// we are on range/zone level only, so add the belonging signal IDs to highlight too
|
|
93
|
+
return datum.signals.flatMap((signal) => (0, filterForIDsWithAssignment_1.filterForIDsWithAssignment)(assignments, [signal.id]).length > 0
|
|
94
|
+
? signal.diaIDs
|
|
95
|
+
: []);
|
|
98
96
|
}
|
|
97
|
+
return [];
|
|
99
98
|
});
|
|
100
99
|
return (0, Utilities_1.getCurrentDiaIDsToHighlight)(assignments).concat(highlights);
|
|
101
100
|
}, [
|
|
@@ -59,6 +59,6 @@ function ColumnHeader({ charLabel, rangeLabel, data, onColumnFilter, }) {
|
|
|
59
59
|
const deleteHandler = (0, react_2.useCallback)(() => {
|
|
60
60
|
dispatch({ type: Types_1.DELETE_ANALYZE_SPECTRA_RANGE, colKey: charLabel });
|
|
61
61
|
}, [charLabel, dispatch]);
|
|
62
|
-
return ((0, jsx_runtime_1.jsxs)("div", { css: styles, children: [(0, jsx_runtime_1.jsxs)("div", { className: "container", children: [data.type === MultipleAnalysis_1.COLUMNS_TYPES.NORMAL && ((0, jsx_runtime_1.jsx)("div", { className: "dropDown-container", children: (0, jsx_runtime_1.jsx)(DropDownButton_1.default, { data: columnsFilters, formatSelectedValue: (item) => item.label.
|
|
62
|
+
return ((0, jsx_runtime_1.jsxs)("div", { css: styles, children: [(0, jsx_runtime_1.jsxs)("div", { className: "container", children: [data.type === MultipleAnalysis_1.COLUMNS_TYPES.NORMAL && ((0, jsx_runtime_1.jsx)("div", { className: "dropDown-container", children: (0, jsx_runtime_1.jsx)(DropDownButton_1.default, { data: columnsFilters, formatSelectedValue: (item) => item.label.slice(0, 3), selectedKey: data.valueKey, onSelect: onColumnFilter }) })), (0, jsx_runtime_1.jsxs)("div", { className: "label-container", children: [(0, jsx_runtime_1.jsxs)("span", { className: "label", children: [" ", charLabel] }), (0, jsx_runtime_1.jsx)("span", { className: "label", children: rangeLabel })] })] }), (0, jsx_runtime_1.jsx)(DeleteButton_1.default, { onDelete: deleteHandler })] }));
|
|
63
63
|
}
|
|
64
64
|
exports.default = ColumnHeader;
|
|
@@ -16,7 +16,7 @@ const initCode = `function run(data) {
|
|
|
16
16
|
`;
|
|
17
17
|
function MultipleAnalysisCodeEditor({ data }) {
|
|
18
18
|
const { values, setFieldValue } = (0, formik_1.useFormikContext)();
|
|
19
|
-
const [code, setCode] = (0, react_1.useState)(values.code
|
|
19
|
+
const [code, setCode] = (0, react_1.useState)(values.code || initCode);
|
|
20
20
|
const [result, setResult] = (0, react_1.useState)('');
|
|
21
21
|
(0, react_1.useEffect)(() => {
|
|
22
22
|
const evalResult = (0, Evaluate_1.default)(code, data);
|
package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js
CHANGED
|
@@ -20,7 +20,7 @@ const Modal_1 = require("../../elements/popup/Modal");
|
|
|
20
20
|
const AlignSpectraModal_1 = __importDefault(require("../../modal/AlignSpectraModal"));
|
|
21
21
|
const Types_1 = require("../../reducer/types/Types");
|
|
22
22
|
const Events_1 = __importDefault(require("../../utility/Events"));
|
|
23
|
-
const
|
|
23
|
+
const export_1 = require("../../utility/export");
|
|
24
24
|
const BasicPanelStyle_1 = require("../extra/BasicPanelStyle");
|
|
25
25
|
const DefaultPanelHeader_1 = __importDefault(require("../header/DefaultPanelHeader"));
|
|
26
26
|
const PreferencesHeader_1 = __importDefault(require("../header/PreferencesHeader"));
|
|
@@ -62,7 +62,7 @@ function MultipleSpectraAnalysisPanelInner({ activeTab, spectraAnalysis, }) {
|
|
|
62
62
|
const copyToClipboardHandler = (0, react_2.useCallback)(() => {
|
|
63
63
|
void (async () => {
|
|
64
64
|
const data = (0, MultipleAnalysis_1.getDataAsString)(spectraAnalysis, activeTab);
|
|
65
|
-
const success = await (0,
|
|
65
|
+
const success = await (0, export_1.copyTextToClipboard)(data);
|
|
66
66
|
if (success) {
|
|
67
67
|
alert.success('Data copied to clipboard');
|
|
68
68
|
}
|
package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPreferences.js
CHANGED
|
@@ -97,10 +97,10 @@ function MultipleSpectraAnalysisPreferences({ data, onAfterSave }, ref) {
|
|
|
97
97
|
},
|
|
98
98
|
}));
|
|
99
99
|
(0, react_2.useEffect)(() => {
|
|
100
|
-
const result = Object.keys(data.columns).
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
100
|
+
const result = Object.fromEntries(Object.keys(data.columns).map((key) => [
|
|
101
|
+
key,
|
|
102
|
+
{ ...data.columns[key], tempKey: key },
|
|
103
|
+
]));
|
|
104
104
|
setColumns(result);
|
|
105
105
|
refForm.current.setValues({ columns: result, code: data.code });
|
|
106
106
|
}, [data]);
|
|
@@ -109,26 +109,27 @@ function MultipleSpectraAnalysisPreferences({ data, onAfterSave }, ref) {
|
|
|
109
109
|
}, [columns]);
|
|
110
110
|
const preferncesSchema = (0, react_2.useMemo)(() => {
|
|
111
111
|
function columnSchema() {
|
|
112
|
-
return columnsKeys.
|
|
113
|
-
|
|
112
|
+
return Object.fromEntries(columnsKeys.map((key) => [
|
|
113
|
+
key,
|
|
114
|
+
Yup.object().shape({
|
|
114
115
|
tempKey: Yup.string()
|
|
115
116
|
.required()
|
|
116
117
|
.test('unique', 'must be unique column name', (colmnName) => {
|
|
117
118
|
const formData = refForm.current.values.columns;
|
|
118
|
-
|
|
119
|
+
const cols = [];
|
|
120
|
+
for (const colKey of Object.keys(formData)) {
|
|
119
121
|
if (formData[colKey].tempKey === colmnName) {
|
|
120
|
-
|
|
122
|
+
cols.push(colmnName);
|
|
121
123
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
+
}
|
|
125
|
+
return cols.length === 1;
|
|
124
126
|
}),
|
|
125
127
|
...(columns[key].type === MultipleAnalysis_1.COLUMNS_TYPES.FORMULA
|
|
126
128
|
? { formula: Yup.string().required() }
|
|
127
129
|
: {}),
|
|
128
130
|
index: Yup.string().required(),
|
|
129
|
-
})
|
|
130
|
-
|
|
131
|
-
}, {});
|
|
131
|
+
}),
|
|
132
|
+
]));
|
|
132
133
|
}
|
|
133
134
|
return Yup.object().shape({
|
|
134
135
|
columns: Yup.object().shape(columnSchema()),
|
|
@@ -136,10 +137,10 @@ function MultipleSpectraAnalysisPreferences({ data, onAfterSave }, ref) {
|
|
|
136
137
|
}, [columns, columnsKeys, refForm]);
|
|
137
138
|
const submitHandler = (0, react_2.useCallback)((values) => {
|
|
138
139
|
onAfterSave?.(true);
|
|
139
|
-
const result =
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
140
|
+
const result = {};
|
|
141
|
+
for (const [key, value] of Object.entries(values.columns)) {
|
|
142
|
+
result[key] = { ...columns[key], ...value };
|
|
143
|
+
}
|
|
143
144
|
dispatch({
|
|
144
145
|
type: Types_1.SET_ANALYZE_SPECTRA_COLUMNS,
|
|
145
146
|
payload: { code: values.code, columns: result },
|
package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js
CHANGED
|
@@ -49,7 +49,7 @@ function MultipleSpectraAnalysisTable({ data, activeTab, }) {
|
|
|
49
49
|
: '' }));
|
|
50
50
|
}
|
|
51
51
|
if (data.columns) {
|
|
52
|
-
|
|
52
|
+
for (const columnKey in data.columns) {
|
|
53
53
|
const { valueKey, index: columnIndex } = data.columns[columnKey];
|
|
54
54
|
(0, addCustomColumn_1.default)(columns, {
|
|
55
55
|
index: columnIndex + 1,
|
|
@@ -57,7 +57,7 @@ function MultipleSpectraAnalysisTable({ data, activeTab, }) {
|
|
|
57
57
|
Header: () => headerHandler(data.columns[columnKey], columnKey),
|
|
58
58
|
id: columnKey,
|
|
59
59
|
});
|
|
60
|
-
}
|
|
60
|
+
}
|
|
61
61
|
}
|
|
62
62
|
return columns.sort((object1, object2) => object1.index - object2.index);
|
|
63
63
|
}, [columnFilterHandler, data.columns, format]);
|
|
@@ -70,7 +70,7 @@ function PeaksPanelInner({ peaks, info, xDomain, activeTab, peaksOptions, }) {
|
|
|
70
70
|
x,
|
|
71
71
|
xHz: info?.originFrequency ? value * info.originFrequency : '',
|
|
72
72
|
y,
|
|
73
|
-
width: width
|
|
73
|
+
width: width || '',
|
|
74
74
|
isConstantlyHighlighted: (0, isInRange_1.default)(value, { from, to }),
|
|
75
75
|
};
|
|
76
76
|
})
|
|
@@ -41,7 +41,7 @@ function PeaksTable({ activeTab, data }) {
|
|
|
41
41
|
});
|
|
42
42
|
}, [modal, peaksPreferences]);
|
|
43
43
|
const saveDeltaPPMRefsHandler = (0, react_1.useCallback)((event, row) => {
|
|
44
|
-
const shiftValue = parseFloat(event.target.value) - parseFloat(row.x);
|
|
44
|
+
const shiftValue = Number.parseFloat(event.target.value) - Number.parseFloat(row.x);
|
|
45
45
|
dispatch({ type: Types_1.SHIFT_SPECTRUM, shiftValue });
|
|
46
46
|
}, [dispatch]);
|
|
47
47
|
const COLUMNS = (0, react_1.useMemo)(() => [
|
|
@@ -120,6 +120,6 @@ function PeaksTable({ activeTab, data }) {
|
|
|
120
120
|
}
|
|
121
121
|
return columns.sort((object1, object2) => object1.index - object2.index);
|
|
122
122
|
}, [COLUMNS, initialColumns, peaksPreferences]);
|
|
123
|
-
return data && data.length > 0 ? ((0, jsx_runtime_1.jsx)(ReactTable_1.default, { data: data, columns: tableColumns, approxItemHeight:
|
|
123
|
+
return data && data.length > 0 ? ((0, jsx_runtime_1.jsx)(ReactTable_1.default, { data: data, columns: tableColumns, approxItemHeight: 24, enableVirtualScroll: true })) : ((0, jsx_runtime_1.jsx)(NoTableData_1.default, {}));
|
|
124
124
|
}
|
|
125
125
|
exports.default = (0, react_1.memo)(PeaksTable);
|
|
@@ -23,7 +23,7 @@ const usePanelPreferences_1 = require("../../hooks/usePanelPreferences");
|
|
|
23
23
|
const CopyClipboardModal_1 = __importDefault(require("../../modal/CopyClipboardModal"));
|
|
24
24
|
const ChangeSumModal_1 = __importDefault(require("../../modal/changeSum/ChangeSumModal"));
|
|
25
25
|
const Types_1 = require("../../reducer/types/Types");
|
|
26
|
-
const
|
|
26
|
+
const export_1 = require("../../utility/export");
|
|
27
27
|
const formatNumber_1 = require("../../utility/formatNumber");
|
|
28
28
|
const DefaultPanelHeader_1 = __importDefault(require("../header/DefaultPanelHeader"));
|
|
29
29
|
const useEditRangeModal_1 = __importDefault(require("./hooks/useEditRangeModal"));
|
|
@@ -98,7 +98,7 @@ function RangesHeader({ id, ranges, info, onUnlink, onFilterActivated, onSetting
|
|
|
98
98
|
}, [dispatch, id]);
|
|
99
99
|
const saveToClipboardHandler = (0, react_2.useCallback)((value) => {
|
|
100
100
|
void (async () => {
|
|
101
|
-
const success = await (0,
|
|
101
|
+
const success = await (0, export_1.copyHTMLToClipboard)(value);
|
|
102
102
|
if (success) {
|
|
103
103
|
alert.success('Data copied to clipboard');
|
|
104
104
|
}
|
|
@@ -16,7 +16,7 @@ const usePanelPreferences_1 = require("../../hooks/usePanelPreferences");
|
|
|
16
16
|
const useSpectrum_1 = __importDefault(require("../../hooks/useSpectrum"));
|
|
17
17
|
const Reducer_1 = require("../../reducer/Reducer");
|
|
18
18
|
const Types_1 = require("../../reducer/types/Types");
|
|
19
|
-
const
|
|
19
|
+
const export_1 = require("../../utility/export");
|
|
20
20
|
const BasicPanelStyle_1 = require("../extra/BasicPanelStyle");
|
|
21
21
|
const NoTableData_1 = __importDefault(require("../extra/placeholder/NoTableData"));
|
|
22
22
|
const PreferencesHeader_1 = __importDefault(require("../header/PreferencesHeader"));
|
|
@@ -79,7 +79,7 @@ function RangesTablePanelInner({ id, ranges, data, info, xDomain, preferences, a
|
|
|
79
79
|
y: Array.from(re.slice(fromIndex, toIndex)),
|
|
80
80
|
...value,
|
|
81
81
|
};
|
|
82
|
-
const success = await (0,
|
|
82
|
+
const success = await (0, export_1.copyTextToClipboard)(JSON.stringify(dataToClipboard, undefined, 2));
|
|
83
83
|
if (success) {
|
|
84
84
|
alert.show('Data copied to clipboard');
|
|
85
85
|
}
|
|
@@ -53,7 +53,7 @@ const tableStyle = (0, react_1.css) `
|
|
|
53
53
|
}
|
|
54
54
|
`;
|
|
55
55
|
function RangesTable({ tableData, onUnlink, context, activeTab, preferences, info, }) {
|
|
56
|
-
const element = activeTab?.replace(/
|
|
56
|
+
const element = activeTab?.replace(/\d/g, '');
|
|
57
57
|
const contextRef = (0, react_2.useRef)();
|
|
58
58
|
const { items: sortedData, isSortedDesc, onSort } = (0, useTableSortBy_1.default)(tableData);
|
|
59
59
|
const data = (0, useMapRanges_1.default)(sortedData);
|
|
@@ -20,7 +20,6 @@ const RelativeColumn_1 = __importDefault(require("./TableColumns/RelativeColumn"
|
|
|
20
20
|
const SignalAssignmentsColumn_1 = __importDefault(require("./TableColumns/SignalAssignmentsColumn"));
|
|
21
21
|
const SignalDeltaColumn_1 = __importDefault(require("./TableColumns/SignalDeltaColumn"));
|
|
22
22
|
const SignalDeltaHzColumn_1 = __importDefault(require("./TableColumns/SignalDeltaHzColumn"));
|
|
23
|
-
const format_1 = __importDefault(require("./TableColumns/format"));
|
|
24
23
|
const HighlightedRowStyle = (0, react_1.css) `
|
|
25
24
|
background-color: #ff6f0057;
|
|
26
25
|
`;
|
|
@@ -37,7 +36,6 @@ function RangesTableRow({ rowData, onUnlink, onContextMenu, preferences, info, }
|
|
|
37
36
|
const highlightData = (0, highlight_1.useHighlightData)();
|
|
38
37
|
const [unlinkRangeButtonVisibility, showUnlinkRangeButton] = (0, react_2.useState)(false);
|
|
39
38
|
const [unlinkSignalButtonVisibility, showUnlinkSignalButton] = (0, react_2.useState)(false);
|
|
40
|
-
const getFormat = (0, format_1.default)(preferences);
|
|
41
39
|
const rowSpanTags = (0, react_2.useMemo)(() => {
|
|
42
40
|
return {
|
|
43
41
|
rowSpan: rowData.tableMetaInfo.rowSpan,
|
|
@@ -115,6 +113,6 @@ function RangesTableRow({ rowData, onUnlink, onContextMenu, preferences, info, }
|
|
|
115
113
|
? ConstantlyHighlightedRowStyle
|
|
116
114
|
: null;
|
|
117
115
|
}, [assignmentRange.isActive, highlightRange.isActive, rowData]);
|
|
118
|
-
return ((0, jsx_runtime_1.jsxs)("tr", { onContextMenu: (e) => onContextMenu(e, rowData), css: trCss, children: [(0, jsx_runtime_1.jsx)("td", { ...rowSpanTags, ...onHoverRange, children: rowData.tableMetaInfo.rowIndex + 1 }), preferences.from.show && ((0, jsx_runtime_1.jsx)(RangeColumn_1.default, { value: rowData.from, rowSpanTags: rowSpanTags, onHoverRange: onHoverRange, format: preferences.from.format })), preferences.to.show && ((0, jsx_runtime_1.jsx)(RangeColumn_1.default, { value: rowData.to, rowSpanTags: rowSpanTags, onHoverRange: onHoverRange, format: preferences.to.format })), preferences.deltaPPM.show && ((0, jsx_runtime_1.jsx)(SignalDeltaColumn_1.default, { rowData: rowData, onHoverSignal: onHoverSignal, deltaPPMFormat: preferences.deltaPPM.format })), preferences.deltaHz.show && ((0, jsx_runtime_1.jsx)(SignalDeltaHzColumn_1.default, { rowData: rowData, onHoverSignal: onHoverSignal, deltaHzFormat: preferences.deltaHz.format, info: info })), preferences.relative.show && ((0, jsx_runtime_1.jsx)(RelativeColumn_1.default, { rowData: rowData, rowSpanTags: rowSpanTags, onHoverRange: onHoverRange, format: preferences.relative.format })), preferences.absolute.show && ((0, jsx_runtime_1.jsx)(AbsoluteColumn_1.default, { value: rowData.absolute, rowSpanTags: rowSpanTags, onHoverRange: onHoverRange, format:
|
|
116
|
+
return ((0, jsx_runtime_1.jsxs)("tr", { onContextMenu: (e) => onContextMenu(e, rowData), css: trCss, children: [(0, jsx_runtime_1.jsx)("td", { ...rowSpanTags, ...onHoverRange, children: rowData.tableMetaInfo.rowIndex + 1 }), preferences.from.show && ((0, jsx_runtime_1.jsx)(RangeColumn_1.default, { value: rowData.from, rowSpanTags: rowSpanTags, onHoverRange: onHoverRange, format: preferences.from.format })), preferences.to.show && ((0, jsx_runtime_1.jsx)(RangeColumn_1.default, { value: rowData.to, rowSpanTags: rowSpanTags, onHoverRange: onHoverRange, format: preferences.to.format })), preferences.deltaPPM.show && ((0, jsx_runtime_1.jsx)(SignalDeltaColumn_1.default, { rowData: rowData, onHoverSignal: onHoverSignal, deltaPPMFormat: preferences.deltaPPM.format })), preferences.deltaHz.show && ((0, jsx_runtime_1.jsx)(SignalDeltaHzColumn_1.default, { rowData: rowData, onHoverSignal: onHoverSignal, deltaHzFormat: preferences.deltaHz.format, info: info })), preferences.relative.show && ((0, jsx_runtime_1.jsx)(RelativeColumn_1.default, { rowData: rowData, rowSpanTags: rowSpanTags, onHoverRange: onHoverRange, format: preferences.relative.format })), preferences.absolute.show && ((0, jsx_runtime_1.jsx)(AbsoluteColumn_1.default, { value: rowData.absolute, rowSpanTags: rowSpanTags, onHoverRange: onHoverRange, format: preferences.absolute.format })), (0, jsx_runtime_1.jsx)("td", { ...onHoverSignal, children: (0, get_1.default)(rowData, 'tableMetaInfo.signal.multiplicity', '') }), preferences.coupling.show && ((0, jsx_runtime_1.jsx)(CouplingColumn_1.default, { rowData: rowData, onHoverSignal: onHoverSignal, format: preferences.coupling.format })), (0, jsx_runtime_1.jsx)(SignalAssignmentsColumn_1.default, { rowData: rowData, assignment: assignmentSignal, highlight: highlightSignal, onHover: onHoverSignal, unlinkVisibility: unlinkSignalButtonVisibility, onUnlinkVisibilityChange: (flag) => showUnlinkSignalButton(flag), onLink: linkHandler, onUnlink: unlinkHandler }), (0, jsx_runtime_1.jsx)(RangeAssignmentsColumn_1.default, { rowData: rowData, assignment: assignmentRange, highlight: highlightRangeAssignmentsColumn, onHover: onHoverRangeAssignmentsColumn, unlinkVisibility: unlinkRangeButtonVisibility, onUnlinkVisibilityChange: (flag) => showUnlinkRangeButton(flag), onLink: linkHandler, onUnlink: unlinkHandler, rowSpanTags: rowSpanTags, highlightData: highlightData }), (0, jsx_runtime_1.jsx)(ActionsColumn_1.default, { rowData: rowData, onHoverSignal: onHoverSignal, onHoverRange: onHoverRange, rowSpanTags: rowSpanTags, showKind: preferences.showKind })] }));
|
|
119
117
|
}
|
|
120
118
|
exports.default = RangesTableRow;
|
|
@@ -9,7 +9,7 @@ const formatNumber_1 = require("../../../utility/formatNumber");
|
|
|
9
9
|
function CouplingColumn({ rowData, onHoverSignal, format, }) {
|
|
10
10
|
const result = (0, get_1.default)(rowData, 'tableMetaInfo.signal.js');
|
|
11
11
|
return ((0, jsx_runtime_1.jsx)("td", { ...onHoverSignal, children: result
|
|
12
|
-
?.map((coupling) => !isNaN(coupling.coupling)
|
|
12
|
+
?.map((coupling) => !Number.isNaN(Number(coupling.coupling))
|
|
13
13
|
? (0, formatNumber_1.formatNumber)(coupling.coupling, format)
|
|
14
14
|
: '')
|
|
15
15
|
.join(',') }));
|
|
@@ -17,7 +17,7 @@ function useEditRangeModal(range) {
|
|
|
17
17
|
const modal = (0, Modal_1.useModal)();
|
|
18
18
|
const assignmentData = (0, AssignmentsContext_1.useAssignmentData)();
|
|
19
19
|
const zoomRange = (0, react_1.useCallback)((modalRange) => {
|
|
20
|
-
const _range = modalRange
|
|
20
|
+
const _range = modalRange || range;
|
|
21
21
|
if (_range) {
|
|
22
22
|
const { from, to } = _range;
|
|
23
23
|
const margin = Math.abs(from - to);
|
|
@@ -32,7 +32,7 @@ function useEditRangeModal(range) {
|
|
|
32
32
|
dispatch({
|
|
33
33
|
type: Types_1.DELETE_RANGE,
|
|
34
34
|
payload: {
|
|
35
|
-
data: { id: id
|
|
35
|
+
data: { id: id || range?.id, assignmentData },
|
|
36
36
|
resetSelectTool,
|
|
37
37
|
},
|
|
38
38
|
});
|
|
@@ -4,10 +4,10 @@ const uuid_1 = require("@lukeed/uuid");
|
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
function useMapRanges(data) {
|
|
6
6
|
return (0, react_1.useMemo)(() => {
|
|
7
|
-
const
|
|
8
|
-
data.
|
|
7
|
+
const rangesData = [];
|
|
8
|
+
for (const [i, range] of data.entries()) {
|
|
9
9
|
if (range.signals.length === 1) {
|
|
10
|
-
|
|
10
|
+
rangesData.push({
|
|
11
11
|
rowKey: (0, uuid_1.v4)(),
|
|
12
12
|
...range,
|
|
13
13
|
tableMetaInfo: {
|
|
@@ -20,7 +20,7 @@ function useMapRanges(data) {
|
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
else if (range.signals.length > 1) {
|
|
23
|
-
range.signals.
|
|
23
|
+
for (const [j, signal] of range.signals.entries()) {
|
|
24
24
|
let hide = false;
|
|
25
25
|
let rowSpan = null;
|
|
26
26
|
if (j < range.signals.length - 1) {
|
|
@@ -34,7 +34,7 @@ function useMapRanges(data) {
|
|
|
34
34
|
else {
|
|
35
35
|
hide = true;
|
|
36
36
|
}
|
|
37
|
-
|
|
37
|
+
rangesData.push({
|
|
38
38
|
rowKey: (0, uuid_1.v4)(),
|
|
39
39
|
...range,
|
|
40
40
|
tableMetaInfo: {
|
|
@@ -47,10 +47,10 @@ function useMapRanges(data) {
|
|
|
47
47
|
id: signal.id,
|
|
48
48
|
},
|
|
49
49
|
});
|
|
50
|
-
}
|
|
50
|
+
}
|
|
51
51
|
}
|
|
52
|
-
}
|
|
53
|
-
return
|
|
52
|
+
}
|
|
53
|
+
return rangesData;
|
|
54
54
|
}, [data]);
|
|
55
55
|
}
|
|
56
56
|
exports.default = useMapRanges;
|
|
@@ -43,13 +43,13 @@ const styles = {
|
|
|
43
43
|
justifyContent: 'center',
|
|
44
44
|
},
|
|
45
45
|
};
|
|
46
|
+
function formatValueAsHTML(value) {
|
|
47
|
+
if (value) {
|
|
48
|
+
value = value.replace(/(?<value>\d+)/g, '<sub>$<value></sub>');
|
|
49
|
+
}
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
46
52
|
function SpectrumListItem({ activeSpectrum, markersVisible, data, onChangeVisibility, onChangeMarkersVisibility, onChangeActiveSpectrum, onOpenSettingModal, onContextMenu, }) {
|
|
47
|
-
const formatValueAsHTML = (value) => {
|
|
48
|
-
if (value) {
|
|
49
|
-
value = value.replace(/(?<value>[0-9]+)/g, '<sub>$<value></sub>');
|
|
50
|
-
}
|
|
51
|
-
return value;
|
|
52
|
-
};
|
|
53
53
|
const activated = !activeSpectrum || activeSpectrum?.id === data.id;
|
|
54
54
|
const { color, name, positiveColor, negativeColor } = data.display;
|
|
55
55
|
return ((0, jsx_runtime_1.jsxs)("div", { style: {
|
|
@@ -15,10 +15,10 @@ const styles = {
|
|
|
15
15
|
width: '100%',
|
|
16
16
|
};
|
|
17
17
|
function SpectrumListPanel() {
|
|
18
|
-
const [
|
|
18
|
+
const [spectra, setSpectra] = (0, react_1.useState)([]);
|
|
19
19
|
const tabChangeHandler = (0, react_1.useCallback)((e) => {
|
|
20
|
-
|
|
20
|
+
setSpectra(e.data || []);
|
|
21
21
|
}, []);
|
|
22
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: styles, children: [(0, jsx_runtime_1.jsx)(SpectraPanelHeader_1.default, { spectrums:
|
|
22
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: styles, children: [(0, jsx_runtime_1.jsx)(SpectraPanelHeader_1.default, { spectrums: spectra }), (0, jsx_runtime_1.jsx)(SpectrumsTabs_1.default, { onTabChange: tabChangeHandler })] }));
|
|
23
23
|
}
|
|
24
24
|
exports.default = (0, react_1.memo)(SpectrumListPanel);
|
|
@@ -14,8 +14,8 @@ const Tabs_1 = __importDefault(require("../../elements/Tab/Tabs"));
|
|
|
14
14
|
const Alert_1 = require("../../elements/popup/Alert");
|
|
15
15
|
const Reducer_1 = require("../../reducer/Reducer");
|
|
16
16
|
const Types_1 = require("../../reducer/types/Types");
|
|
17
|
-
const Export_1 = require("../../utility/Export");
|
|
18
17
|
const GroupByInfoKey_1 = __importDefault(require("../../utility/GroupByInfoKey"));
|
|
18
|
+
const export_1 = require("../../utility/export");
|
|
19
19
|
const SpectrumListItem_1 = __importDefault(require("./SpectrumListItem"));
|
|
20
20
|
const SpectrumSetting_1 = __importDefault(require("./base/setting/SpectrumSetting"));
|
|
21
21
|
function SpectrumsTabsInner({ data, activeSpectrum, activeTab, onTabChange, }) {
|
|
@@ -28,13 +28,13 @@ function SpectrumsTabsInner({ data, activeSpectrum, activeTab, onTabChange, }) {
|
|
|
28
28
|
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
29
29
|
(0, react_1.useEffect)(() => {
|
|
30
30
|
if (data) {
|
|
31
|
-
const visibleMarkers =
|
|
31
|
+
const visibleMarkers = [];
|
|
32
|
+
for (const datum of data) {
|
|
32
33
|
if (datum.info.dimension === 1 &&
|
|
33
34
|
datum.display.isPeaksMarkersVisible) {
|
|
34
|
-
|
|
35
|
+
visibleMarkers.push({ id: datum.id });
|
|
35
36
|
}
|
|
36
|
-
|
|
37
|
-
}, []);
|
|
37
|
+
}
|
|
38
38
|
setMarkersVisible(visibleMarkers);
|
|
39
39
|
}
|
|
40
40
|
}, [data, dispatch]);
|
|
@@ -75,7 +75,7 @@ function SpectrumsTabsInner({ data, activeSpectrum, activeTab, onTabChange, }) {
|
|
|
75
75
|
onClick: (spectrumData) => {
|
|
76
76
|
void (async () => {
|
|
77
77
|
const { x, y, info } = spectrumData;
|
|
78
|
-
const success = await (0,
|
|
78
|
+
const success = await (0, export_1.copyTextToClipboard)(JSON.stringify({ x, y, info }, undefined, 2));
|
|
79
79
|
if (success) {
|
|
80
80
|
alert.success('Data copied to clipboard');
|
|
81
81
|
}
|
|
@@ -15,7 +15,7 @@ function ColorIndicator2D({ positiveColor, negativeColor, activated, }) {
|
|
|
15
15
|
return ((0, jsx_runtime_1.jsx)("svg", { width: "12", height: "12", viewBox: "0 0 12 12", opacity: activated ? 1 : 0.2, children: (0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)("path", { d: "M0,0H12L0,12Z", fill: positiveColor, strokeWidth: "0" }), (0, jsx_runtime_1.jsx)("path", { d: "M12,12H0L12,0Z", fill: negativeColor, strokeWidth: "0" })] }) }));
|
|
16
16
|
}
|
|
17
17
|
function ColorIndicator(props) {
|
|
18
|
-
const { style, onClick = () => null, activated } = props;
|
|
19
|
-
return ((0, jsx_runtime_1.jsx)("button", { style: style, type: "button", onClick: onClick, children:
|
|
18
|
+
const { style, onClick = () => null, activated, dimension, color } = props;
|
|
19
|
+
return ((0, jsx_runtime_1.jsx)("button", { style: style, type: "button", onClick: onClick, children: dimension === 2 ? ((0, jsx_runtime_1.jsx)(ColorIndicator2D, { ...color, activated: activated })) : ((0, jsx_runtime_1.jsx)(ColorIndicator1D, { activated: activated, ...color })) }));
|
|
20
20
|
}
|
|
21
21
|
exports.default = (0, react_1.memo)(ColorIndicator);
|
|
@@ -6,8 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
7
|
const FormikColorPicker_1 = __importDefault(require("../../../../elements/formik/FormikColorPicker"));
|
|
8
8
|
const FormikForm_1 = __importDefault(require("../../../../elements/formik/FormikForm"));
|
|
9
|
+
const FormikOnChange_1 = __importDefault(require("../../../../elements/formik/FormikOnChange"));
|
|
9
10
|
const Spectrum1DHistogram_1 = __importDefault(require("./Spectrum1DHistogram"));
|
|
10
11
|
function Spectrum1DSetting({ data: SpectrumData, onSubmit, }) {
|
|
11
|
-
return ((0, jsx_runtime_1.
|
|
12
|
+
return ((0, jsx_runtime_1.jsxs)(FormikForm_1.default, { initialValues: SpectrumData.display, onSubmit: onSubmit, children: [(0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', flexDirection: 'column', gap: '1.25rem' }, children: [(0, jsx_runtime_1.jsx)("div", { style: { display: 'block', position: 'relative' }, children: (0, jsx_runtime_1.jsx)(FormikColorPicker_1.default, { name: "color" }) }), (0, jsx_runtime_1.jsx)(Spectrum1DHistogram_1.default, { color: "red", data: SpectrumData.data })] }), (0, jsx_runtime_1.jsx)(FormikOnChange_1.default, { onChange: onSubmit })] }));
|
|
12
13
|
}
|
|
13
14
|
exports.default = Spectrum1DSetting;
|
|
@@ -9,6 +9,7 @@ const react_1 = require("@emotion/react");
|
|
|
9
9
|
const FormikColorPicker_1 = __importDefault(require("../../../../elements/formik/FormikColorPicker"));
|
|
10
10
|
const FormikForm_1 = __importDefault(require("../../../../elements/formik/FormikForm"));
|
|
11
11
|
const FormikInput_1 = __importDefault(require("../../../../elements/formik/FormikInput"));
|
|
12
|
+
const FormikOnChange_1 = __importDefault(require("../../../../elements/formik/FormikOnChange"));
|
|
12
13
|
const FormikSlider_1 = __importDefault(require("../../../../elements/formik/FormikSlider"));
|
|
13
14
|
const Spectrum2DHistogram_1 = __importDefault(require("./Spectrum2DHistogram"));
|
|
14
15
|
const style = (color) => (0, react_1.css) `
|
|
@@ -19,6 +20,6 @@ const style = (color) => (0, react_1.css) `
|
|
|
19
20
|
`;
|
|
20
21
|
function Spectrum2DSetting({ data: SpectrumData, onSubmit, }) {
|
|
21
22
|
const { positiveColor, negativeColor } = SpectrumData.display;
|
|
22
|
-
return ((0, jsx_runtime_1.
|
|
23
|
+
return ((0, jsx_runtime_1.jsxs)(FormikForm_1.default, { initialValues: SpectrumData.display, children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { css: style(positiveColor), children: [(0, jsx_runtime_1.jsx)("span", { style: { padding: '0 10px' }, children: "Positive" }), (0, jsx_runtime_1.jsx)(FormikColorPicker_1.default, { name: "positiveColor" }), (0, jsx_runtime_1.jsxs)("div", { style: { padding: '5px' }, children: [(0, jsx_runtime_1.jsx)("span", { className: "label", children: "contour Levels [ min - max ]" }), (0, jsx_runtime_1.jsx)(FormikSlider_1.default, { name: "contourOptions.positive.contourLevels", debounceTime: 100 }), (0, jsx_runtime_1.jsx)("span", { className: "label", children: "number of Layers " }), (0, jsx_runtime_1.jsx)(FormikInput_1.default, { name: "contourOptions.positive.numberOfLayers", type: "number", debounceTime: 250 })] })] }), (0, jsx_runtime_1.jsxs)("div", { css: style(negativeColor), children: [(0, jsx_runtime_1.jsx)("span", { style: { padding: '0 10px' }, children: "Negative" }), (0, jsx_runtime_1.jsx)(FormikColorPicker_1.default, { name: "negativeColor" }), (0, jsx_runtime_1.jsxs)("div", { style: { padding: '5px' }, children: [(0, jsx_runtime_1.jsx)("span", { className: "label", children: "contour Levels [ min - max ]" }), (0, jsx_runtime_1.jsx)(FormikSlider_1.default, { name: "contourOptions.negative.contourLevels", debounceTime: 100 }), (0, jsx_runtime_1.jsx)("span", { className: "label", children: "number of Layers " }), (0, jsx_runtime_1.jsx)(FormikInput_1.default, { name: "contourOptions.negative.numberOfLayers", type: "number", debounceTime: 250 })] })] }), (0, jsx_runtime_1.jsx)(Spectrum2DHistogram_1.default, { data: SpectrumData.data })] }), (0, jsx_runtime_1.jsx)(FormikOnChange_1.default, { onChange: onSubmit })] }));
|
|
23
24
|
}
|
|
24
25
|
exports.default = Spectrum2DSetting;
|
|
@@ -19,18 +19,17 @@ function AdditionalColumnField({ rowCorrelation, columnCorrelation, commonLinks,
|
|
|
19
19
|
const contextRef = (0, react_1.useRef)();
|
|
20
20
|
const modal = (0, Modal_1.useModal)();
|
|
21
21
|
const highlightIDsCommonLinks = (0, react_1.useMemo)(() => {
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
return commonLinks.flatMap((link) => {
|
|
23
|
+
const ids = [];
|
|
24
24
|
if (link.pseudo === false) {
|
|
25
|
-
ids.push(link.signal.id);
|
|
26
|
-
ids.push((0, Concatenation_1.buildID)(link.signal.id, 'Crosshair'));
|
|
25
|
+
ids.push(link.signal.id, (0, Concatenation_1.buildID)(link.signal.id, 'Crosshair'));
|
|
27
26
|
const _id = (0, FindUtilities_1.findRangeOrZoneID)(spectraData, link.experimentID, link.signal.id, true);
|
|
28
27
|
if (_id) {
|
|
29
28
|
ids.push(_id);
|
|
30
29
|
}
|
|
31
30
|
}
|
|
31
|
+
return ids;
|
|
32
32
|
});
|
|
33
|
-
return ids;
|
|
34
33
|
}, [commonLinks, spectraData]);
|
|
35
34
|
const highlightCommonLinks = (0, highlight_1.useHighlight)(highlightIDsCommonLinks);
|
|
36
35
|
const mouseEnterHandler = (0, react_1.useCallback)((event) => {
|
|
@@ -82,8 +81,7 @@ function AdditionalColumnField({ rowCorrelation, columnCorrelation, commonLinks,
|
|
|
82
81
|
}, [columnCorrelation, onEdit, rowCorrelation]);
|
|
83
82
|
const contextMenu = (0, react_1.useMemo)(() => {
|
|
84
83
|
// allow the edition of correlations
|
|
85
|
-
const commonLinksMenu = commonLinks
|
|
86
|
-
.map((commonLink) => {
|
|
84
|
+
const commonLinksMenu = commonLinks.flatMap((commonLink) => {
|
|
87
85
|
const commonLinkContextMenuLabel = `${(0, Utilities_1.getAbbreviation)(commonLink)} (${commonLink.signal.x ? commonLink.signal.x.delta.toFixed(2) : '?'}, ${commonLink.signal.y ? commonLink.signal.y.delta.toFixed(2) : '?'})${commonLink.edited?.moved === true ? '[MOVED]' : ''}`;
|
|
88
86
|
return commonLink.pseudo === false
|
|
89
87
|
? [
|
|
@@ -99,8 +97,7 @@ function AdditionalColumnField({ rowCorrelation, columnCorrelation, commonLinks,
|
|
|
99
97
|
},
|
|
100
98
|
]
|
|
101
99
|
: [];
|
|
102
|
-
})
|
|
103
|
-
.flat();
|
|
100
|
+
});
|
|
104
101
|
// allow addition or removal of a pseudo HSQC link between pseudo heavy atom and proton
|
|
105
102
|
const commonPseudoLinkHSQC = commonLinks.find((commonLink) => commonLink.pseudo === true && commonLink.experimentType === 'hsqc');
|
|
106
103
|
if (rowCorrelation.pseudo === true) {
|
|
@@ -133,14 +130,13 @@ function AdditionalColumnField({ rowCorrelation, columnCorrelation, commonLinks,
|
|
|
133
130
|
? 'blue'
|
|
134
131
|
: 'black',
|
|
135
132
|
}, children: (0, Utilities_1.getAbbreviation)(commonLink) }), i < commonLinks.length - 1 && (0, jsx_runtime_1.jsx)("label", { children: "/" })] }, commonLink.id))), [commonLinks]);
|
|
136
|
-
const title = (0, react_1.useMemo)(() =>
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}, [])
|
|
143
|
-
.join('/'), [commonLinks]);
|
|
133
|
+
const title = (0, react_1.useMemo)(() => {
|
|
134
|
+
return [
|
|
135
|
+
...new Set(commonLinks.link.map((link) => {
|
|
136
|
+
return link.experimentType.toUpperCase();
|
|
137
|
+
})),
|
|
138
|
+
].join('/');
|
|
139
|
+
}, [commonLinks]);
|
|
144
140
|
const isInViewRow = (0, useInView_1.default)({ correlation: rowCorrelation });
|
|
145
141
|
const isInViewColumn = (0, useInView_1.default)({ correlation: columnCorrelation });
|
|
146
142
|
return ((0, jsx_runtime_1.jsxs)("td", { onContextMenu: (e) => {
|