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
|
@@ -131,10 +131,10 @@ function FooterBanner({ layout, data1D }) {
|
|
|
131
131
|
switch (trackID) {
|
|
132
132
|
case LAYOUT.CENTER_2D:
|
|
133
133
|
case LAYOUT.TOP_1D: {
|
|
134
|
-
return scaleX.invert(x
|
|
134
|
+
return scaleX.invert(x || position.x);
|
|
135
135
|
}
|
|
136
136
|
case LAYOUT.LEFT_1D: {
|
|
137
|
-
return scaleX.invert(x
|
|
137
|
+
return scaleX.invert(x || position.y);
|
|
138
138
|
}
|
|
139
139
|
default:
|
|
140
140
|
return 0;
|
|
@@ -12,6 +12,7 @@ import { BRUSH_END, FULL_ZOOM_OUT, SET_DIMENSIONS, SET_2D_LEVEL, SET_ZOOM, ADD_2
|
|
|
12
12
|
import BrushXY, { BRUSH_TYPE } from '../tool/BrushXY';
|
|
13
13
|
import CrossLinePointer from '../tool/CrossLinePointer';
|
|
14
14
|
import { options } from '../toolbar/ToolTypes';
|
|
15
|
+
import { assert } from '../utility/assert';
|
|
15
16
|
import Chart2D from './Chart2D';
|
|
16
17
|
import FooterBanner from './FooterBanner';
|
|
17
18
|
import XYLabelPointer from './tools/XYLabelPointer';
|
|
@@ -25,19 +26,15 @@ function Viewer2D({ emptyText = undefined }) {
|
|
|
25
26
|
const isVisible = info.isFt || !('isFt' in info);
|
|
26
27
|
const spectrumData = useMemo(() => {
|
|
27
28
|
const nucleuses = activeTab.split(',');
|
|
28
|
-
return nucleuses
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
acc.push(null);
|
|
38
|
-
}
|
|
39
|
-
return acc;
|
|
40
|
-
}, []);
|
|
29
|
+
return nucleuses
|
|
30
|
+
.filter((n) => activeSpectra[n]?.id)
|
|
31
|
+
.map((nucleus) => {
|
|
32
|
+
const id = activeSpectra[nucleus]?.id;
|
|
33
|
+
assert(id, `Error in Viewer2D: id is not defined`);
|
|
34
|
+
const spectrum = data.find((datum) => datum.id === id && !datum.info.isFid);
|
|
35
|
+
assert(spectrum, `Spectrum with id ${id} not found`);
|
|
36
|
+
return spectrum;
|
|
37
|
+
});
|
|
41
38
|
}, [activeTab, data, activeSpectra]);
|
|
42
39
|
const DIMENSION = get2DDimensionLayout(state);
|
|
43
40
|
const handelBrushEnd = useCallback((brushData) => {
|
|
@@ -114,7 +111,7 @@ export function ViewerResponsiveWrapper(props) {
|
|
|
114
111
|
const dispatch = useDispatch();
|
|
115
112
|
const { width, height, children } = props;
|
|
116
113
|
useEffect(() => {
|
|
117
|
-
dispatch({ type: SET_DIMENSIONS,
|
|
114
|
+
dispatch({ type: SET_DIMENSIONS, width, height });
|
|
118
115
|
}, [width, height, dispatch]);
|
|
119
116
|
return children;
|
|
120
117
|
}
|
|
@@ -91,10 +91,10 @@ function XYLabelPointer({ layout, data1D }) {
|
|
|
91
91
|
switch (trackID) {
|
|
92
92
|
case LAYOUT.CENTER_2D:
|
|
93
93
|
case LAYOUT.TOP_1D: {
|
|
94
|
-
return scaleX?.invert(x
|
|
94
|
+
return scaleX?.invert(x || position.x);
|
|
95
95
|
}
|
|
96
96
|
case LAYOUT.LEFT_1D: {
|
|
97
|
-
return scaleX?.invert(x
|
|
97
|
+
return scaleX?.invert(x || position.y);
|
|
98
98
|
}
|
|
99
99
|
default:
|
|
100
100
|
return 0;
|
|
@@ -12,7 +12,7 @@ function VerticalSliceChart({ margin: marignValue = 10, data, }) {
|
|
|
12
12
|
const paths = useMemo(() => {
|
|
13
13
|
if (data) {
|
|
14
14
|
const { x, re: y } = data;
|
|
15
|
-
const scaleX = get2DYScale({ height: originHeight, margin, yDomain });
|
|
15
|
+
const scaleX = get2DYScale({ height: originHeight, margin, yDomain }, true);
|
|
16
16
|
const scaleY = getYScale(height, y, marignValue);
|
|
17
17
|
const pathPoints = xyReduce({ x, y });
|
|
18
18
|
const pathBuilder = new PathBuilder();
|
|
@@ -21,14 +21,11 @@ function IndicationLines({ axis, show }) {
|
|
|
21
21
|
if (nucleus !== null) {
|
|
22
22
|
const ranges = data
|
|
23
23
|
.filter((_datum) => _datum.display.isVisible && _datum.info.nucleus === nucleus)
|
|
24
|
-
.filter(isSpectrum1D)
|
|
25
|
-
.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
.map((
|
|
29
|
-
.filter((_signal) => SignalKindsToInclude.some((_kind) => _signal.kind === _kind))
|
|
30
|
-
.map((_signal) => _signal.delta))
|
|
31
|
-
.flat();
|
|
24
|
+
.filter((element) => isSpectrum1D(element))
|
|
25
|
+
.flatMap((_datum) => _datum.ranges.values);
|
|
26
|
+
const deltas = ranges.flatMap((_range) => _range.signals
|
|
27
|
+
.filter((_signal) => SignalKindsToInclude.includes(_signal.kind))
|
|
28
|
+
.map((_signal) => _signal.delta));
|
|
32
29
|
setDeltas1D(deltas);
|
|
33
30
|
}
|
|
34
31
|
else {
|
|
@@ -28,7 +28,7 @@ function KeysListenerTracker() {
|
|
|
28
28
|
return displayerMode === DISPLAYER_MODE.DM_1D && data && data.length > 0;
|
|
29
29
|
}, [data, displayerMode]);
|
|
30
30
|
const deleteHandler = useCallback(async (sourceData) => {
|
|
31
|
-
const { type, extra: { id }, } = sourceData;
|
|
31
|
+
const { type, extra: { id, zone, spectrumID, colKey }, } = sourceData;
|
|
32
32
|
switch (type) {
|
|
33
33
|
case HighlightEventSource.INTEGRAL: {
|
|
34
34
|
dispatch({
|
|
@@ -80,7 +80,6 @@ function KeysListenerTracker() {
|
|
|
80
80
|
text: 'Yes, for all spectra',
|
|
81
81
|
handler: async () => {
|
|
82
82
|
const hideLoading = await alert.showLoading('Delete all spectra exclusive zones in progress');
|
|
83
|
-
const { zone } = sourceData.extra;
|
|
84
83
|
dispatch({
|
|
85
84
|
type: DELETE_EXCLUSION_ZONE,
|
|
86
85
|
payload: {
|
|
@@ -94,7 +93,6 @@ function KeysListenerTracker() {
|
|
|
94
93
|
text: 'Yes',
|
|
95
94
|
handler: async () => {
|
|
96
95
|
const hideLoading = await alert.showLoading('Delete exclusive zone in progress');
|
|
97
|
-
const { spectrumID, zone } = sourceData.extra;
|
|
98
96
|
dispatch({
|
|
99
97
|
type: DELETE_EXCLUSION_ZONE,
|
|
100
98
|
payload: {
|
|
@@ -116,7 +114,7 @@ function KeysListenerTracker() {
|
|
|
116
114
|
case HighlightEventSource.MULTIPLE_ANALYSIS_ZONE: {
|
|
117
115
|
dispatch({
|
|
118
116
|
type: DELETE_ANALYZE_SPECTRA_RANGE,
|
|
119
|
-
colKey
|
|
117
|
+
colKey,
|
|
120
118
|
});
|
|
121
119
|
// remove keys from the highlighted list after delete
|
|
122
120
|
remove();
|
|
@@ -263,7 +261,7 @@ function KeysListenerTracker() {
|
|
|
263
261
|
break;
|
|
264
262
|
case 's':
|
|
265
263
|
if (isToolVisible('exportAs')) {
|
|
266
|
-
|
|
264
|
+
saveAsJSONHandler();
|
|
267
265
|
e.preventDefault();
|
|
268
266
|
}
|
|
269
267
|
break;
|
|
@@ -285,8 +283,9 @@ function KeysListenerTracker() {
|
|
|
285
283
|
}
|
|
286
284
|
}
|
|
287
285
|
}
|
|
288
|
-
catch (
|
|
289
|
-
|
|
286
|
+
catch (error) {
|
|
287
|
+
reportError(error);
|
|
288
|
+
alert.error(error.message);
|
|
290
289
|
}
|
|
291
290
|
}, [
|
|
292
291
|
alert,
|
|
@@ -302,16 +301,9 @@ function KeysListenerTracker() {
|
|
|
302
301
|
saveAsJSONHandler,
|
|
303
302
|
saveToClipboardHandler,
|
|
304
303
|
]);
|
|
305
|
-
function checkNotInputField(e) {
|
|
306
|
-
const tags = ['input', 'textarea'];
|
|
307
|
-
const tagName = e.composedPath()[0].tagName.toLowerCase();
|
|
308
|
-
if (!tags.includes(tagName))
|
|
309
|
-
return true;
|
|
310
|
-
return false;
|
|
311
|
-
}
|
|
312
304
|
const handleOnKeyDown = useCallback((e) => {
|
|
313
305
|
if (checkNotInputField(e) && overDisplayer) {
|
|
314
|
-
const num = Number(e.code.
|
|
306
|
+
const num = Number(e.code.slice(-1)) || 0;
|
|
315
307
|
if (num > 0) {
|
|
316
308
|
keysPreferencesListenerHandler(e, num);
|
|
317
309
|
}
|
|
@@ -337,4 +329,11 @@ function KeysListenerTracker() {
|
|
|
337
329
|
}, [handleOnKeyDown]);
|
|
338
330
|
return null;
|
|
339
331
|
}
|
|
332
|
+
function checkNotInputField(e) {
|
|
333
|
+
const tags = ['input', 'textarea'];
|
|
334
|
+
const tagName = e.composedPath()[0].tagName.toLowerCase();
|
|
335
|
+
if (!tags.includes(tagName))
|
|
336
|
+
return true;
|
|
337
|
+
return false;
|
|
338
|
+
}
|
|
340
339
|
export default KeysListenerTracker;
|
|
@@ -8,7 +8,7 @@ import { NMRiumGeneralPreferences } from '../types/NMRiumGeneralPreferences';
|
|
|
8
8
|
import { NMRiumPanelPreferences } from '../types/NMRiumPanelPreferences';
|
|
9
9
|
import { NMRiumToolBarPreferences } from '../types/NMRiumToolBarPreferences';
|
|
10
10
|
import { ViewState } from './reducer/Reducer';
|
|
11
|
-
import { BlobObject } from './utility/
|
|
11
|
+
import { BlobObject } from './utility/export';
|
|
12
12
|
export type { NMRiumDataReturn } from '../types/NMRiumDataReturn';
|
|
13
13
|
export declare type NMRiumWorkspace = 'exercise' | 'process1D' | 'default' | 'prediction' | 'embedded';
|
|
14
14
|
export interface NMRiumProps {
|
package/lib/component/NMRium.js
CHANGED
|
@@ -30,7 +30,7 @@ import { DISPLAYER_MODE } from './reducer/core/Constants';
|
|
|
30
30
|
import preferencesReducer, { preferencesInitialState, initPreferencesState, } from './reducer/preferences/preferencesReducer';
|
|
31
31
|
import { INITIATE, SET_LOADING_FLAG, SET_MOUSE_OVER_DISPLAYER, } from './reducer/types/Types';
|
|
32
32
|
import ToolBar from './toolbar/ToolBar';
|
|
33
|
-
import { getBlob } from './utility/
|
|
33
|
+
import { getBlob } from './utility/export';
|
|
34
34
|
const viewerContainerStyle = css `
|
|
35
35
|
border: 0.55px #e6e6e6 solid;
|
|
36
36
|
display: flex;
|
|
@@ -107,15 +107,15 @@ function InnerNMRium({ data: dataProp = defaultData, workspace, preferences = de
|
|
|
107
107
|
});
|
|
108
108
|
const [state, dispatch] = useReducer(spectrumReducer, initialState, initState);
|
|
109
109
|
const [preferencesState, dispatchPreferences] = useReducer(preferencesReducer, preferencesInitialState, initPreferencesState);
|
|
110
|
-
const { displayerMode, data: spectraData } = state;
|
|
110
|
+
const { displayerMode, data: spectraData, actionType, view } = state;
|
|
111
111
|
useEffect(() => {
|
|
112
|
-
if (checkActionType(
|
|
112
|
+
if (checkActionType(actionType)) {
|
|
113
113
|
handleDataChange.current?.(toJSON(state, 'onDataChange'));
|
|
114
114
|
}
|
|
115
|
-
}, [state]);
|
|
115
|
+
}, [actionType, state]);
|
|
116
116
|
useEffect(() => {
|
|
117
|
-
handleViewChange.current?.(
|
|
118
|
-
}, [
|
|
117
|
+
handleViewChange.current?.(view);
|
|
118
|
+
}, [view]);
|
|
119
119
|
const dispatchMiddleWare = useMemo(() => {
|
|
120
120
|
return dispatchMiddleware(dispatch);
|
|
121
121
|
}, []);
|
|
@@ -16,13 +16,13 @@ export default function initAssignment(action) {
|
|
|
16
16
|
return newState;
|
|
17
17
|
}
|
|
18
18
|
function setRangesAssignments(state, ranges) {
|
|
19
|
-
const diaIDRecords =
|
|
20
|
-
|
|
19
|
+
const diaIDRecords = [];
|
|
20
|
+
for (const { id, diaIDs, signals } of ranges.values) {
|
|
21
|
+
diaIDRecords.push({ id, diaIDs: diaIDs || [] });
|
|
21
22
|
for (const signal of signals) {
|
|
22
|
-
|
|
23
|
+
diaIDRecords.push({ id: signal.id, diaIDs: signal.diaIDs || [] });
|
|
23
24
|
}
|
|
24
|
-
|
|
25
|
-
}, []);
|
|
25
|
+
}
|
|
26
26
|
for (const { id, diaIDs } of diaIDRecords) {
|
|
27
27
|
for (const diaID of diaIDs) {
|
|
28
28
|
setAssignment(state, id, 'x', diaID);
|
|
@@ -30,22 +30,22 @@ function setRangesAssignments(state, ranges) {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
function setZonesAssignments(state, zones) {
|
|
33
|
-
const diaIDRecords = zones.values.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
33
|
+
const diaIDRecords = zones.values.flatMap(({ id, x, y, signals }) => {
|
|
34
|
+
const diaIDRecords = signals.map((signal) => ({
|
|
35
|
+
id: signal.id,
|
|
36
|
+
diaIDs: { x: signal.x.diaIDs || [], y: signal.y.diaIDs || [] },
|
|
37
|
+
}));
|
|
38
|
+
return [
|
|
39
|
+
{ id, diaIDs: { x: x.diaIDs || [], y: y.diaIDs || [] } },
|
|
40
|
+
...diaIDRecords,
|
|
41
|
+
];
|
|
42
|
+
});
|
|
43
43
|
for (const { id, diaIDs } of diaIDRecords) {
|
|
44
|
-
['x', 'y']
|
|
44
|
+
for (const axis of ['x', 'y']) {
|
|
45
45
|
for (const diaID of diaIDs[axis]) {
|
|
46
46
|
setAssignment(state, id, axis, diaID);
|
|
47
47
|
}
|
|
48
|
-
}
|
|
48
|
+
}
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
function setAssignment(state, id, axis, diaID) {
|
|
@@ -3,7 +3,7 @@ import { useReducer, useMemo, useEffect } from 'react';
|
|
|
3
3
|
import { assignmentState, assignmentContext, } from './AssignmentsContext';
|
|
4
4
|
import assignmentReducer from './AssignmentsReducer';
|
|
5
5
|
export function AssignmentProvider(props) {
|
|
6
|
-
const { spectraData: spectra } = props;
|
|
6
|
+
const { spectraData: spectra, children } = props;
|
|
7
7
|
const [data, dispatch] = useReducer(assignmentReducer, assignmentState);
|
|
8
8
|
const state = useMemo(() => ({ data, dispatch }), [data]);
|
|
9
9
|
useEffect(() => {
|
|
@@ -14,5 +14,5 @@ export function AssignmentProvider(props) {
|
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
16
|
}, [spectra]);
|
|
17
|
-
return (_jsx(assignmentContext.Provider, { value: state, children:
|
|
17
|
+
return (_jsx(assignmentContext.Provider, { value: state, children: children }));
|
|
18
18
|
}
|
|
@@ -21,12 +21,9 @@ export function usePreferences() {
|
|
|
21
21
|
export function useWorkspacesList() {
|
|
22
22
|
const { workspaces } = usePreferences();
|
|
23
23
|
return useMemo(() => {
|
|
24
|
-
const currentWorkspaces = Object.keys(workspaces)
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
return acc;
|
|
29
|
-
}, []);
|
|
24
|
+
const currentWorkspaces = Object.keys(workspaces)
|
|
25
|
+
.filter((k) => !Workspaces[k])
|
|
26
|
+
.map((key) => ({ key, label: workspaces[key].label }));
|
|
30
27
|
return [...WORKSPACES, ...currentWorkspaces];
|
|
31
28
|
}, [workspaces]);
|
|
32
29
|
}
|
|
@@ -132,7 +132,7 @@ function Button(props) {
|
|
|
132
132
|
}
|
|
133
133
|
function ThemeButton(props) {
|
|
134
134
|
const { colorTheme, ...buttonProps } = props;
|
|
135
|
-
const { base, shade, tint } = colorPalettes[
|
|
135
|
+
const { base, shade, tint } = colorPalettes[colorTheme];
|
|
136
136
|
const { color = { base: shade, hover: 'white' }, backgroundColor = {
|
|
137
137
|
base,
|
|
138
138
|
hover: shade,
|
|
@@ -4,5 +4,5 @@ export function CheckBoxCell(props) {
|
|
|
4
4
|
const { name, ...otherProps } = props;
|
|
5
5
|
return (_jsx(FormikCheckBox, { style: {
|
|
6
6
|
container: { display: 'block', margin: '0 auto', width: 'fit-content' },
|
|
7
|
-
}, name:
|
|
7
|
+
}, name: name, ...otherProps }, name));
|
|
8
8
|
}
|
|
@@ -55,11 +55,11 @@ function ContextMenu({ context }, ref) {
|
|
|
55
55
|
useEffect(() => {
|
|
56
56
|
root.current = document.createElement('div');
|
|
57
57
|
if (elementsWrapperRef) {
|
|
58
|
-
elementsWrapperRef.
|
|
58
|
+
elementsWrapperRef.append(root.current);
|
|
59
59
|
}
|
|
60
60
|
return () => {
|
|
61
61
|
if (root.current && elementsWrapperRef) {
|
|
62
|
-
|
|
62
|
+
root.current.remove();
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
65
|
}, [elementsWrapperRef]);
|
|
@@ -31,11 +31,9 @@ const EditableColumn = forwardRef(function EditableColumn(props, ref) {
|
|
|
31
31
|
const valid = validate(event?.target.value);
|
|
32
32
|
setValid(valid);
|
|
33
33
|
// when press Enter or Tab
|
|
34
|
-
if (valid) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
enableEdit(false);
|
|
38
|
-
}
|
|
34
|
+
if (valid && ['Enter', 'Tab'].includes(event.key)) {
|
|
35
|
+
onSave(event);
|
|
36
|
+
enableEdit(false);
|
|
39
37
|
}
|
|
40
38
|
// close edit mode if press Enter, Tab or Escape
|
|
41
39
|
if (['Escape'].includes(event.key)) {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
interface GroupPaneProps {
|
|
3
|
+
text: string;
|
|
4
|
+
style?: {
|
|
5
|
+
header?: CSSProperties;
|
|
6
|
+
container?: CSSProperties;
|
|
7
|
+
};
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
renderHeader?: (text: string) => ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare function GroupPane(props: GroupPaneProps): JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
const styles = {
|
|
3
|
+
header: {
|
|
4
|
+
fontSize: '13px',
|
|
5
|
+
color: '#2ca8ff',
|
|
6
|
+
marginBottom: '10px',
|
|
7
|
+
borderBottom: '0.55px solid #f9f9f9',
|
|
8
|
+
padding: '6px 2px',
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
export function GroupPane(props) {
|
|
12
|
+
const { text, style, children, renderHeader } = props;
|
|
13
|
+
return (_jsxs("div", { style: style?.container, children: [!renderHeader ? (_jsx("p", { style: { ...styles.header, ...style?.header }, children: text })) : (renderHeader(text)), children] }));
|
|
14
|
+
}
|
|
@@ -36,10 +36,13 @@ const styles = {
|
|
|
36
36
|
padding: 0,
|
|
37
37
|
},
|
|
38
38
|
};
|
|
39
|
+
function identity(value) {
|
|
40
|
+
return value;
|
|
41
|
+
}
|
|
39
42
|
const Input = forwardRef(({ value = '', name, style = {
|
|
40
43
|
input: {},
|
|
41
44
|
inputWrapper: {},
|
|
42
|
-
}, onChange = () => null, debounceTime = 0, onKeyDown = () => null, onKeyUp = () => null, checkValue = () => true, type = 'text', enableAutoSelect = false, className, format = () =>
|
|
45
|
+
}, onChange = () => null, debounceTime = 0, onKeyDown = () => null, onKeyUp = () => null, checkValue = () => true, type = 'text', enableAutoSelect = false, className, format = () => identity, onBlur = () => null, onFocus = () => null, renderIcon = null, canClear = false, onClear, ...props }, ref) => {
|
|
43
46
|
const [val, setVal] = useState(value);
|
|
44
47
|
const valueRef = useRef(value);
|
|
45
48
|
const localRef = useRef();
|
|
@@ -69,7 +72,7 @@ const Input = forwardRef(({ value = '', name, style = {
|
|
|
69
72
|
e.preventDefault();
|
|
70
73
|
function check(value) {
|
|
71
74
|
if (type === 'number') {
|
|
72
|
-
const pattern = /^(
|
|
75
|
+
const pattern = /^(?:-?\d*|\d+)(?:\.\d{0,20})?$/;
|
|
73
76
|
if (value.trim() === '' || pattern.test(value)) {
|
|
74
77
|
return true;
|
|
75
78
|
}
|
|
@@ -129,10 +132,10 @@ const Input = forwardRef(({ value = '', name, style = {
|
|
|
129
132
|
}, [onClear]);
|
|
130
133
|
return (_jsxs("div", { style: {
|
|
131
134
|
...styles.inputWrapper,
|
|
132
|
-
...
|
|
135
|
+
...style?.inputWrapper,
|
|
133
136
|
}, className: `input ${className || ''}`, children: [renderIcon?.(), _jsx("input", { ...props, ref: combinedRef, name: name, style: {
|
|
134
137
|
...styles.input,
|
|
135
|
-
...
|
|
138
|
+
...style?.input,
|
|
136
139
|
}, type: "text", value: val, onChange: onChangeHandler, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, onKeyPress: preventPropagate, onDoubleClick: (e) => e.stopPropagation(), onFocus: onFocus, onBlur: onBlur }), canClear && val && (_jsx("button", { type: "button", style: styles.clearButton, onClick: clearHandler, children: _jsx("span", { style: { display: 'block', margin: '0 auto' }, children: "\u2715" }) }))] }));
|
|
137
140
|
});
|
|
138
141
|
export default Input;
|
|
@@ -3,7 +3,7 @@ function IsotopesViewer({ value = '', ...othersProps }) {
|
|
|
3
3
|
return (_jsx("div", { ...othersProps,
|
|
4
4
|
// eslint-disable-next-line react/no-danger
|
|
5
5
|
dangerouslySetInnerHTML: {
|
|
6
|
-
__html: value.replace(/(?<isotope
|
|
6
|
+
__html: value.replace(/(?<isotope>\d+)/g, '<sup>$<isotope></sup>'),
|
|
7
7
|
} }));
|
|
8
8
|
}
|
|
9
9
|
export default IsotopesViewer;
|
|
@@ -2,8 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
export default function Label(props) {
|
|
3
3
|
const { title, className = '', children, style, ...otherProps } = props;
|
|
4
4
|
return (_jsxs("div", { style: { display: 'flex', alignItems: 'center', ...style?.container }, children: [_jsx("label", { className: className, style: {
|
|
5
|
-
fontSize: '
|
|
6
|
-
fontWeight: 'bold',
|
|
5
|
+
fontSize: '12px',
|
|
7
6
|
color: '#232323',
|
|
8
7
|
paddingRight: '10px',
|
|
9
8
|
width: 'max-content',
|
|
@@ -34,10 +34,10 @@ const NumberInput = forwardRef(({ label, name, defaultValue = 0, style = { label
|
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
else {
|
|
37
|
-
const _ref = ref
|
|
37
|
+
const _ref = ref || localRef;
|
|
38
38
|
_ref.current.value = Number(defaultValue);
|
|
39
39
|
}
|
|
40
40
|
}, [defaultValue, onChange, ref]);
|
|
41
|
-
return (_jsxs("div", { style: { ...styles.container, ...style.container }, children: [_jsx("span", { style: { ...styles.label, ...style.label }, children: label }), _jsx("div", { style: { ...styles.inputContainer, ...style.inputContainer }, children: _jsx("input", { ref: ref
|
|
41
|
+
return (_jsxs("div", { style: { ...styles.container, ...style.container }, children: [_jsx("span", { style: { ...styles.label, ...style.label }, children: label }), _jsx("div", { style: { ...styles.inputContainer, ...style.inputContainer }, children: _jsx("input", { ref: ref || localRef, name: name, style: { ...styles.input, ...style.input }, type: "number", pattern: pattern, defaultValue: defaultValue, step: step, onChange: changeHander, onInput: onInput, min: min, max: max }, defaultValue) })] }));
|
|
42
42
|
});
|
|
43
43
|
export default NumberInput;
|
|
@@ -11,11 +11,12 @@ interface ReactTableProps extends ClickEvent {
|
|
|
11
11
|
}> | null;
|
|
12
12
|
approxItemHeight?: number;
|
|
13
13
|
groupKey?: string;
|
|
14
|
+
indexKey?: string;
|
|
14
15
|
enableVirtualScroll?: boolean;
|
|
15
16
|
highlightActiveRow?: boolean;
|
|
17
|
+
totalCount?: number;
|
|
16
18
|
}
|
|
17
19
|
export interface TableVirtualConfig {
|
|
18
|
-
offsetHeight: number;
|
|
19
20
|
scrollHeight: number;
|
|
20
21
|
numberOfVisibleRows: number;
|
|
21
22
|
index: {
|