nmrium 0.32.0 → 0.33.0-pre.1667632695
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
|
@@ -5,10 +5,10 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const react_d3_utils_1 = require("react-d3-utils");
|
|
7
7
|
const VerticalAxis = (0, react_1.forwardRef)((props, ref) => {
|
|
8
|
-
const { x, y, height, showGrid, ticks } = props;
|
|
8
|
+
const { x, y, height, width, showGrid, ticks } = props;
|
|
9
9
|
return ((0, jsx_runtime_1.jsxs)("g", { ref: ref, transform: `translate(${x}, ${y})`, children: [(0, jsx_runtime_1.jsx)("line", { y2: height, x1: 15, x2: 15, stroke: "black" }), ticks.map(({ label, position }, index) => (
|
|
10
10
|
// eslint-disable-next-line react/no-array-index-key
|
|
11
|
-
(0, jsx_runtime_1.jsxs)("g", { children: [showGrid &&
|
|
11
|
+
(0, jsx_runtime_1.jsxs)("g", { children: [showGrid && width && ((0, jsx_runtime_1.jsx)("line", { y1: position, y2: position, x1: 15, x2: width - x, stroke: "lightgray" })), (0, jsx_runtime_1.jsx)("line", { y1: position, y2: position, x1: 15, x2: 10, stroke: "black" }), (0, jsx_runtime_1.jsx)("text", { y: position, dominantBaseline: "middle", textAnchor: "end", children: label })] }, index + label + position)))] }));
|
|
12
12
|
});
|
|
13
13
|
function LinearVerticalAxis(props) {
|
|
14
14
|
const { scale, ...other } = props;
|
|
@@ -4,13 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const groupBy_1 = __importDefault(require("lodash/groupBy"));
|
|
7
8
|
const react_1 = require("react");
|
|
8
9
|
const react_dom_1 = require("react-dom");
|
|
9
10
|
const fa_1 = require("react-icons/fa");
|
|
10
11
|
const react_transition_group_1 = require("react-transition-group");
|
|
11
12
|
const Transition_1 = __importDefault(require("../Transition"));
|
|
12
13
|
const Wrapper_1 = __importDefault(require("../Wrapper"));
|
|
13
|
-
const helpers_1 = require("../helpers");
|
|
14
14
|
const options_1 = require("../options");
|
|
15
15
|
const Context_1 = require("./Context");
|
|
16
16
|
const ProgressIndicator_1 = __importDefault(require("./ProgressIndicator"));
|
|
@@ -23,14 +23,14 @@ function Provider({ children, wrapperRef = null, offset = '5px', position = opti
|
|
|
23
23
|
const ref = root.current;
|
|
24
24
|
const timersIdRef = timersId.current;
|
|
25
25
|
if (wrapperRef) {
|
|
26
|
-
wrapperRef.
|
|
26
|
+
wrapperRef.append(ref);
|
|
27
27
|
}
|
|
28
28
|
return () => {
|
|
29
|
-
if (ref) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
wrapperRef.removeChild(ref);
|
|
29
|
+
if (ref && wrapperRef) {
|
|
30
|
+
for (const id of timersIdRef) {
|
|
31
|
+
clearTimeout(id);
|
|
33
32
|
}
|
|
33
|
+
ref.remove();
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
}, [wrapperRef]);
|
|
@@ -45,7 +45,7 @@ function Provider({ children, wrapperRef = null, offset = '5px', position = opti
|
|
|
45
45
|
});
|
|
46
46
|
}, []);
|
|
47
47
|
const show = (0, react_1.useCallback)((message = '', options = {}) => {
|
|
48
|
-
const id = Math.random().toString(36).
|
|
48
|
+
const id = Math.random().toString(36).slice(2, 9);
|
|
49
49
|
const alertOptions = {
|
|
50
50
|
position: options.position || position,
|
|
51
51
|
timeout,
|
|
@@ -101,7 +101,7 @@ function Provider({ children, wrapperRef = null, offset = '5px', position = opti
|
|
|
101
101
|
const closeHandler = (0, react_1.useCallback)((alert) => {
|
|
102
102
|
remove(alert);
|
|
103
103
|
}, [remove]);
|
|
104
|
-
const alertsByPosition = (0,
|
|
104
|
+
const alertsByPosition = (0, groupBy_1.default)(alerts, (alert) => alert.options.position);
|
|
105
105
|
const parentStyle = (0, react_1.useMemo)(() => {
|
|
106
106
|
return wrapperRef
|
|
107
107
|
? wrapperRef.getBoundingClientRect()
|
|
@@ -3,12 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
|
|
6
|
+
exports.AlertProvider = exports.useAlert = exports.transitions = exports.types = exports.positions = void 0;
|
|
7
|
+
var options_1 = require("../options");
|
|
8
8
|
Object.defineProperty(exports, "positions", { enumerable: true, get: function () { return options_1.positions; } });
|
|
9
9
|
Object.defineProperty(exports, "types", { enumerable: true, get: function () { return options_1.types; } });
|
|
10
10
|
Object.defineProperty(exports, "transitions", { enumerable: true, get: function () { return options_1.transitions; } });
|
|
11
|
-
|
|
11
|
+
var Context_1 = require("./Context");
|
|
12
12
|
Object.defineProperty(exports, "useAlert", { enumerable: true, get: function () { return Context_1.useAlert; } });
|
|
13
|
-
|
|
14
|
-
exports
|
|
13
|
+
var Provider_1 = require("./Provider");
|
|
14
|
+
Object.defineProperty(exports, "AlertProvider", { enumerable: true, get: function () { return __importDefault(Provider_1).default; } });
|
|
@@ -17,7 +17,9 @@ const ModalContent = ({ modal, onClose, onLayout }) => {
|
|
|
17
17
|
}) }));
|
|
18
18
|
});
|
|
19
19
|
(0, react_1.useEffect)(() => {
|
|
20
|
-
if (isFinite(height) &&
|
|
20
|
+
if (Number.isFinite(height) &&
|
|
21
|
+
Number.isFinite(width) &&
|
|
22
|
+
!contentSize.current) {
|
|
21
23
|
contentSize.current = { width, height };
|
|
22
24
|
onLayout({ modal, layout: { width, height } });
|
|
23
25
|
}
|
|
@@ -36,13 +36,11 @@ function Provider({ children, style, offset = '0px', position = options_1.positi
|
|
|
36
36
|
root.current = document.createElement('div');
|
|
37
37
|
const ref = root.current;
|
|
38
38
|
if (wrapperRef) {
|
|
39
|
-
wrapperRef.
|
|
39
|
+
wrapperRef.append(ref);
|
|
40
40
|
}
|
|
41
41
|
return () => {
|
|
42
|
-
if (ref) {
|
|
43
|
-
|
|
44
|
-
wrapperRef.removeChild(ref);
|
|
45
|
-
}
|
|
42
|
+
if (ref && wrapperRef) {
|
|
43
|
+
ref.remove();
|
|
46
44
|
}
|
|
47
45
|
};
|
|
48
46
|
}, [wrapperRef]);
|
|
@@ -82,10 +80,11 @@ function Provider({ children, style, offset = '0px', position = options_1.positi
|
|
|
82
80
|
* @param {Array<{ handler: Function,text: string,style: object}>} dialogOptions.buttons
|
|
83
81
|
* @param {object} dialogOptions.tyle
|
|
84
82
|
*/
|
|
85
|
-
const showConfirmDialog = (0, react_2.useCallback)((dialogOptions, options = {
|
|
83
|
+
const showConfirmDialog = (0, react_2.useCallback)((dialogOptions, options = {}) => {
|
|
84
|
+
const { enableResizing = false, ...otherOptions } = options;
|
|
86
85
|
const _modal = {
|
|
87
86
|
component: (0, jsx_runtime_1.jsx)(ConfirmDialog_1.default, { ...dialogOptions }),
|
|
88
|
-
options: { isBackgroundBlur: true, ...
|
|
87
|
+
options: { isBackgroundBlur: true, enableResizing, ...otherOptions },
|
|
89
88
|
};
|
|
90
89
|
_modal.close = close;
|
|
91
90
|
setModal(_modal);
|
|
@@ -126,28 +125,20 @@ function Provider({ children, style, offset = '0px', position = options_1.positi
|
|
|
126
125
|
: { pointerEvents: 'none' };
|
|
127
126
|
const modalContextValue = (0, react_2.useMemo)(() => ({ show, close, showConfirmDialog }), [show, close, showConfirmDialog]);
|
|
128
127
|
const contentLayoutHandler = (0, react_2.useCallback)(({ modal, layout }) => {
|
|
129
|
-
const width = modal.options.width
|
|
130
|
-
?
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
: layout.width;
|
|
134
|
-
const height = modal.options.height
|
|
135
|
-
? modal.options.height
|
|
136
|
-
: layout.height > parentStyle.height
|
|
128
|
+
const width = modal.options.width ||
|
|
129
|
+
(layout.width > parentStyle.width ? parentStyle.width : layout.width);
|
|
130
|
+
const height = modal.options.height ||
|
|
131
|
+
(layout.height > parentStyle.height
|
|
137
132
|
? parentStyle.height
|
|
138
|
-
: layout.height;
|
|
133
|
+
: layout.height);
|
|
139
134
|
modalRef.current.updateSize({ width, height });
|
|
140
135
|
}, [parentStyle.height, parentStyle.width]);
|
|
141
136
|
return ((0, jsx_runtime_1.jsxs)(Context_1.ModalProvider, { value: modalContextValue, children: [children, root.current &&
|
|
142
137
|
(0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(react_2.Fragment, { children: modal ? ((0, jsx_runtime_1.jsx)("div", { css: styles, style: {
|
|
143
138
|
...outerStyle,
|
|
144
139
|
}, children: (0, jsx_runtime_1.jsx)(react_transition_group_1.TransitionGroup, { appear: true, options: {
|
|
145
|
-
position: modal.options.position
|
|
146
|
-
|
|
147
|
-
: position,
|
|
148
|
-
}, containerStyle: parentStyle, component: Wrapper_1.default, children: (0, jsx_runtime_1.jsx)(Transition_1.default, { type: modal.options.transition
|
|
149
|
-
? modal.options.transition
|
|
150
|
-
: transition, transitionStyles: {
|
|
140
|
+
position: modal.options.position || position,
|
|
141
|
+
}, containerStyle: parentStyle, component: Wrapper_1.default, children: (0, jsx_runtime_1.jsx)(Transition_1.default, { type: modal.options.transition || transition, transitionStyles: {
|
|
151
142
|
...transitionStyles,
|
|
152
143
|
default: {
|
|
153
144
|
width: modal.options.width
|
|
@@ -158,12 +149,8 @@ function Provider({ children, style, offset = '0px', position = options_1.positi
|
|
|
158
149
|
? `${modal.options.height}px`
|
|
159
150
|
: 'auto',
|
|
160
151
|
}, children: (0, jsx_runtime_1.jsx)(react_rnd_1.Rnd, { maxWidth: parentStyle.width, maxHeight: parentStyle.height, ref: modalRef, default: {
|
|
161
|
-
width: modal.options.width
|
|
162
|
-
|
|
163
|
-
: 'auto',
|
|
164
|
-
height: modal.options.height
|
|
165
|
-
? modal.options.height
|
|
166
|
-
: 'auto',
|
|
152
|
+
width: modal.options.width || 'auto',
|
|
153
|
+
height: modal.options.height || 'auto',
|
|
167
154
|
x: 0,
|
|
168
155
|
y: 0,
|
|
169
156
|
}, className: "rnd-container", style: {
|
|
@@ -172,8 +159,6 @@ function Provider({ children, style, offset = '0px', position = options_1.positi
|
|
|
172
159
|
position: 'static',
|
|
173
160
|
pointerEvents: 'all',
|
|
174
161
|
userSelect: 'none',
|
|
175
|
-
}, enableResizing: modal.options.enableResizing, dragHandleClassName: "handle", enableUserSelectHack: false, children: (0, jsx_runtime_1.jsx)(ModalContent_1.default, { modal: modal, onClose: close, onLayout: contentLayoutHandler }) }) }, modal.id) }, options_1.positions[modal.options.transition
|
|
176
|
-
? modal.options.transition
|
|
177
|
-
: transition]) })) : null }), root.current)] }));
|
|
162
|
+
}, enableResizing: modal.options.enableResizing, dragHandleClassName: "handle", enableUserSelectHack: false, children: (0, jsx_runtime_1.jsx)(ModalContent_1.default, { modal: modal, onClose: close, onLayout: contentLayoutHandler }) }) }, modal.id) }, options_1.positions[modal.options.transition || transition]) })) : null }), root.current)] }));
|
|
178
163
|
}
|
|
179
164
|
exports.default = Provider;
|
|
@@ -3,13 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
|
|
6
|
+
exports.ModalProvider = exports.Modal = exports.useModal = exports.transitions = exports.positions = void 0;
|
|
7
|
+
var options_1 = require("../options");
|
|
8
8
|
Object.defineProperty(exports, "positions", { enumerable: true, get: function () { return options_1.positions; } });
|
|
9
9
|
Object.defineProperty(exports, "transitions", { enumerable: true, get: function () { return options_1.transitions; } });
|
|
10
|
-
|
|
10
|
+
var Context_1 = require("./Context");
|
|
11
11
|
Object.defineProperty(exports, "useModal", { enumerable: true, get: function () { return Context_1.useModal; } });
|
|
12
|
-
|
|
13
|
-
exports
|
|
14
|
-
|
|
15
|
-
exports
|
|
12
|
+
var Modal_1 = require("./Modal");
|
|
13
|
+
Object.defineProperty(exports, "Modal", { enumerable: true, get: function () { return __importDefault(Modal_1).default; } });
|
|
14
|
+
var Provider_1 = require("./Provider");
|
|
15
|
+
Object.defineProperty(exports, "ModalProvider", { enumerable: true, get: function () { return __importDefault(Provider_1).default; } });
|
|
@@ -51,7 +51,7 @@ function HeaderInner(props) {
|
|
|
51
51
|
}, [selectedOptionPanel]);
|
|
52
52
|
const openGeneralSettingsHandler = (0, react_1.useCallback)(() => {
|
|
53
53
|
modal.show((0, jsx_runtime_1.jsx)(GeneralSettings_1.default, {}), {
|
|
54
|
-
position: Modal_1.positions.
|
|
54
|
+
position: Modal_1.positions.MIDDLE,
|
|
55
55
|
enableResizing: true,
|
|
56
56
|
width: 600,
|
|
57
57
|
height: 400,
|
|
@@ -4,7 +4,7 @@ const react_1 = require("react");
|
|
|
4
4
|
function useCombinedRefs(refs) {
|
|
5
5
|
const targetRef = (0, react_1.useRef)();
|
|
6
6
|
(0, react_1.useEffect)(() => {
|
|
7
|
-
|
|
7
|
+
for (const ref of refs) {
|
|
8
8
|
if (!ref)
|
|
9
9
|
return;
|
|
10
10
|
if (typeof ref === 'function') {
|
|
@@ -13,7 +13,7 @@ function useCombinedRefs(refs) {
|
|
|
13
13
|
else {
|
|
14
14
|
ref.current = targetRef.current;
|
|
15
15
|
}
|
|
16
|
-
}
|
|
16
|
+
}
|
|
17
17
|
}, [refs]);
|
|
18
18
|
return targetRef;
|
|
19
19
|
}
|
|
@@ -11,7 +11,7 @@ const GlobalContext_1 = require("../context/GlobalContext");
|
|
|
11
11
|
const Alert_1 = require("../elements/popup/Alert");
|
|
12
12
|
const Modal_1 = require("../elements/popup/Modal");
|
|
13
13
|
const SaveAsModal_1 = __importDefault(require("../modal/SaveAsModal"));
|
|
14
|
-
const
|
|
14
|
+
const export_1 = require("../utility/export");
|
|
15
15
|
function useExport() {
|
|
16
16
|
const { rootRef } = (0, GlobalContext_1.useGlobal)();
|
|
17
17
|
const modal = (0, Modal_1.useModal)();
|
|
@@ -21,25 +21,28 @@ function useExport() {
|
|
|
21
21
|
if (state.data.length > 0 && rootRef) {
|
|
22
22
|
const hideLoading = await alert.showLoading('Exporting as NMRium process in progress');
|
|
23
23
|
setTimeout(() => {
|
|
24
|
-
(0,
|
|
24
|
+
(0, export_1.copyPNGToClipboard)(rootRef, 'nmrSVG');
|
|
25
25
|
hideLoading();
|
|
26
26
|
alert.success('Image copied to clipboard');
|
|
27
27
|
}, 0);
|
|
28
28
|
}
|
|
29
29
|
}, [rootRef, alert, state]);
|
|
30
|
-
const saveAsJSONHandler = (0, react_1.useCallback)(
|
|
30
|
+
const saveAsJSONHandler = (0, react_1.useCallback)((spaceIndent = 0, isCompressed = true) => {
|
|
31
31
|
if (state.data.length > 0) {
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
alert
|
|
33
|
+
.showLoading('Exporting as NMRium process in progress')
|
|
34
|
+
.then((hideLoading) => {
|
|
34
35
|
async function handle() {
|
|
35
36
|
//exported file name by default will be the first spectrum name
|
|
36
37
|
const fileName = state.data[0]?.display?.name;
|
|
37
38
|
const exportedData = (0, SpectraManager_1.toJSON)(state, 'nmrium');
|
|
38
|
-
await (0,
|
|
39
|
+
await (0, export_1.exportAsJSON)(exportedData, fileName, spaceIndent, isCompressed);
|
|
39
40
|
hideLoading();
|
|
40
41
|
}
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
setTimeout(() => {
|
|
43
|
+
void handle();
|
|
44
|
+
}, 0);
|
|
45
|
+
});
|
|
43
46
|
}
|
|
44
47
|
}, [alert, state]);
|
|
45
48
|
const saveAsSVGHandler = (0, react_1.useCallback)(async () => {
|
|
@@ -47,7 +50,7 @@ function useExport() {
|
|
|
47
50
|
const hideLoading = await alert.showLoading('Exporting as SVG process in progress');
|
|
48
51
|
setTimeout(() => {
|
|
49
52
|
const fileName = state.data[0]?.display?.name;
|
|
50
|
-
(0,
|
|
53
|
+
(0, export_1.exportAsSVG)(rootRef, 'nmrSVG', fileName);
|
|
51
54
|
hideLoading();
|
|
52
55
|
}, 0);
|
|
53
56
|
}
|
|
@@ -57,7 +60,7 @@ function useExport() {
|
|
|
57
60
|
const hideLoading = await alert.showLoading('Exporting as PNG process in progress');
|
|
58
61
|
setTimeout(() => {
|
|
59
62
|
const fileName = state.data[0]?.display?.name;
|
|
60
|
-
(0,
|
|
63
|
+
(0, export_1.exportAsPng)(rootRef, 'nmrSVG', fileName);
|
|
61
64
|
hideLoading();
|
|
62
65
|
}, 0);
|
|
63
66
|
}
|
|
@@ -70,7 +73,7 @@ function useExport() {
|
|
|
70
73
|
void (async () => {
|
|
71
74
|
const exportedData = (0, SpectraManager_1.toJSON)(state, 'nmrium', dataExportOption);
|
|
72
75
|
const spaceIndent = pretty ? 2 : 0;
|
|
73
|
-
await (0,
|
|
76
|
+
await (0, export_1.exportAsJSON)(exportedData, name, spaceIndent, compressed);
|
|
74
77
|
hideLoading();
|
|
75
78
|
})();
|
|
76
79
|
}, 0);
|
|
@@ -31,7 +31,7 @@ function useFormatNumberByNucleus(nucleus) {
|
|
|
31
31
|
return nucleus.map((n) => formatFun(n));
|
|
32
32
|
}
|
|
33
33
|
else {
|
|
34
|
-
throw Error('nuclus must be string or array of string');
|
|
34
|
+
throw new Error('nuclus must be string or array of string');
|
|
35
35
|
}
|
|
36
36
|
}, [nucleus, nucleusByKey]);
|
|
37
37
|
}
|
|
@@ -51,12 +51,14 @@ function usePanelPreferencesByNuclei(panelKey, nuclei) {
|
|
|
51
51
|
const { current } = (0, PreferencesContext_1.usePreferences)();
|
|
52
52
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
53
53
|
const { nuclei: omitNuclei = null, ...restPreferences } = getPanelPreferences(current, panelKey);
|
|
54
|
-
return (0, react_1.useMemo)(() =>
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
return (0, react_1.useMemo)(() => {
|
|
55
|
+
return {
|
|
56
|
+
nuclei: Object.fromEntries(nuclei.map((nucleusLabel) => [
|
|
57
|
+
nucleusLabel,
|
|
58
|
+
getPanelPreferences(current, panelKey, nucleusLabel, true),
|
|
59
|
+
])),
|
|
60
|
+
...restPreferences,
|
|
61
|
+
};
|
|
62
|
+
}, [current, nuclei, panelKey, restPreferences]);
|
|
61
63
|
}
|
|
62
64
|
exports.usePanelPreferencesByNuclei = usePanelPreferencesByNuclei;
|
|
@@ -48,16 +48,16 @@ function DropZone(props) {
|
|
|
48
48
|
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
49
49
|
const isToolEnabled = (0, useCheckToolsVisibility_1.useCheckToolsVisibility)();
|
|
50
50
|
const loadFilesHandler = (0, react_2.useCallback)((files) => {
|
|
51
|
-
|
|
51
|
+
for (const file of files) {
|
|
52
52
|
Object.defineProperty(file, 'webkitRelativePath', { value: file.path });
|
|
53
|
-
}
|
|
53
|
+
}
|
|
54
54
|
(0, filelist_utils_1.fileCollectionFromFileList)(files)
|
|
55
55
|
.then((fileCollection) => {
|
|
56
56
|
dispatch({ type: Types_1.LOAD_DROP_FILES, fileCollection });
|
|
57
57
|
})
|
|
58
|
-
.catch((
|
|
58
|
+
.catch((error) => {
|
|
59
59
|
dispatch({ type: Types_1.SET_LOADING_FLAG, isLoading: false });
|
|
60
|
-
reportError(
|
|
60
|
+
reportError(error);
|
|
61
61
|
});
|
|
62
62
|
}, [dispatch]);
|
|
63
63
|
const onDrop = (0, react_2.useCallback)((droppedFiles) => {
|
|
@@ -13,7 +13,7 @@ const Label_1 = __importDefault(require("../elements/Label"));
|
|
|
13
13
|
const FormikForm_1 = __importDefault(require("../elements/formik/FormikForm"));
|
|
14
14
|
const FormikInput_1 = __importDefault(require("../elements/formik/FormikInput"));
|
|
15
15
|
const Events_1 = __importDefault(require("../utility/Events"));
|
|
16
|
-
const
|
|
16
|
+
const export_1 = require("../utility/export");
|
|
17
17
|
const ModalStyle_1 = require("./ModalStyle");
|
|
18
18
|
const INITIAL_VALUE = { from: -1, to: 1, nbPoints: 1024 };
|
|
19
19
|
function ExportAsMatrixModal({ onClose = () => null, }) {
|
|
@@ -23,7 +23,7 @@ function ExportAsMatrixModal({ onClose = () => null, }) {
|
|
|
23
23
|
refForm.current.submitForm();
|
|
24
24
|
}, []);
|
|
25
25
|
const submitHandler = (0, react_1.useCallback)((options) => {
|
|
26
|
-
(0,
|
|
26
|
+
(0, export_1.exportAsMatrix)(data, options, 'fileName');
|
|
27
27
|
onClose();
|
|
28
28
|
}, [data, onClose]);
|
|
29
29
|
(0, react_1.useEffect)(() => {
|
|
@@ -57,13 +57,13 @@ const styles = (0, react_1.css) `
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
`;
|
|
60
|
-
const allowedExtensions = ['dx', 'jdx'];
|
|
60
|
+
const allowedExtensions = new Set(['dx', 'jdx']);
|
|
61
61
|
function LoadJCAMPModal({ onLoadClick, onClose, startLoading, }) {
|
|
62
62
|
const pathReft = (0, react_2.useRef)();
|
|
63
63
|
const loadJCAMPHandler = (0, react_2.useCallback)(() => {
|
|
64
64
|
const path = pathReft.current.value;
|
|
65
65
|
const { name, extension } = (0, FileUtility_1.extractFileMetaFromPath)(path);
|
|
66
|
-
if (allowedExtensions.
|
|
66
|
+
if (allowedExtensions.has(extension)) {
|
|
67
67
|
startLoading?.();
|
|
68
68
|
void (0, FileUtility_1.loadFile)(path, { asBuffer: true }).then((data) => {
|
|
69
69
|
const file = {
|
|
@@ -97,7 +97,7 @@ function MultipleSpectraFiltersModal({ onClose = () => null, nucleus = '', }) {
|
|
|
97
97
|
? Object.entries(References_1.REFERENCES[nucleus]).map((item) => ({
|
|
98
98
|
value: item[0],
|
|
99
99
|
label: item[0],
|
|
100
|
-
})
|
|
100
|
+
}))
|
|
101
101
|
: [];
|
|
102
102
|
return baseList.concat(list);
|
|
103
103
|
}, [nucleus]);
|
|
@@ -132,9 +132,9 @@ function MultipletAnalysisModal({ data, activeSpectrum, scaleX, startX, endX, on
|
|
|
132
132
|
setCalcFinished(true);
|
|
133
133
|
setAnalysisData(result);
|
|
134
134
|
}
|
|
135
|
-
catch (
|
|
136
|
-
//
|
|
137
|
-
|
|
135
|
+
catch (error) {
|
|
136
|
+
// TODO: handle error
|
|
137
|
+
reportError(error);
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
}, [startX, endX, data, scaleX, activeSpectrum, calcStart]);
|
|
@@ -165,13 +165,13 @@ function PredictSpectraModal({ onClose = () => null, molfile, }) {
|
|
|
165
165
|
isLoading: true,
|
|
166
166
|
});
|
|
167
167
|
const predictedSpectra = Object.entries(values.spectra)
|
|
168
|
-
.
|
|
168
|
+
.map(([key, value]) => {
|
|
169
169
|
if (value) {
|
|
170
|
-
|
|
170
|
+
return key;
|
|
171
171
|
}
|
|
172
|
-
return
|
|
173
|
-
}
|
|
174
|
-
.join('
|
|
172
|
+
return undefined;
|
|
173
|
+
})
|
|
174
|
+
.join(',');
|
|
175
175
|
const hideLoading = await alert.showLoading(`Predict ${predictedSpectra} in progress`);
|
|
176
176
|
dispatch({
|
|
177
177
|
type: Types_1.PREDICT_SPECTRA,
|
|
@@ -100,19 +100,19 @@ function EditRangeModal({ onSaveEditRangeModal = () => null, onCloseEditRangeMod
|
|
|
100
100
|
let counterJ = 0;
|
|
101
101
|
const couplings = [];
|
|
102
102
|
if (signal.multiplicity) {
|
|
103
|
-
signal.multiplicity.split('')
|
|
103
|
+
for (const multiplicity of signal.multiplicity.split('')) {
|
|
104
104
|
let js = {
|
|
105
|
-
multiplicity
|
|
105
|
+
multiplicity,
|
|
106
106
|
coupling: '',
|
|
107
107
|
};
|
|
108
|
-
if ((0, MultiplicityUtilities_1.hasCouplingConstant)(
|
|
108
|
+
if ((0, MultiplicityUtilities_1.hasCouplingConstant)(multiplicity) && signal?.js) {
|
|
109
109
|
js = { ...signal.js[counterJ] };
|
|
110
110
|
js.coupling = Number((0, formatNumber_1.formatNumber)(js.coupling, rangesPreferences.coupling.format));
|
|
111
111
|
counterJ++;
|
|
112
112
|
}
|
|
113
113
|
js.multiplicity = (0, MultiplicityUtilities_1.translateMultiplet)(js.multiplicity || '');
|
|
114
114
|
couplings.push(js);
|
|
115
|
-
}
|
|
115
|
+
}
|
|
116
116
|
}
|
|
117
117
|
return { ...signal, js: couplings };
|
|
118
118
|
});
|
|
@@ -21,7 +21,7 @@ const styles = {
|
|
|
21
21
|
color: 'red',
|
|
22
22
|
},
|
|
23
23
|
};
|
|
24
|
-
const EDIT_SIGNAL_INFO_TEXT = `Focus on an input field and press Shift + Drag
|
|
24
|
+
const EDIT_SIGNAL_INFO_TEXT = `Focus on an input field and press Shift + Drag and Drop to draw a coupling constant in spectrum view.`;
|
|
25
25
|
const ADD_SIGNAL_INFO_TEXT = `Focus on the input field and press Shift + Left mouse click to select new signal delta value in spectrum view.`;
|
|
26
26
|
const InfoText = (props) => {
|
|
27
27
|
const { value, type = 'info' } = props;
|
|
@@ -36,8 +36,8 @@ const useValidation = () => (0, react_1.useMemo)(() => {
|
|
|
36
36
|
coupling: Yup.mixed().test('checkValue', '', function testCoupling(value) {
|
|
37
37
|
const { path, createError } = this;
|
|
38
38
|
const hasCoupling = (0, MultiplicityUtilities_1.hasCouplingConstant)(this.parent.multiplicity);
|
|
39
|
-
if ((!hasCoupling && isNaN(value)) ||
|
|
40
|
-
(hasCoupling && !isNaN(value))) {
|
|
39
|
+
if ((!hasCoupling && Number.isNaN(Number(value))) ||
|
|
40
|
+
(hasCoupling && !Number.isNaN(Number(value)))) {
|
|
41
41
|
return true;
|
|
42
42
|
}
|
|
43
43
|
return createError({
|
|
@@ -7,9 +7,9 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
7
7
|
const uuid_1 = require("@lukeed/uuid");
|
|
8
8
|
const formik_1 = require("formik");
|
|
9
9
|
const get_1 = __importDefault(require("lodash/get"));
|
|
10
|
-
const react_1 = require("react");
|
|
11
10
|
const fa_1 = require("react-icons/fa");
|
|
12
11
|
const Button_1 = __importDefault(require("../../elements/Button"));
|
|
12
|
+
const GroupPane_1 = require("../../elements/GroupPane");
|
|
13
13
|
const FormikCheckBox_1 = __importDefault(require("../../elements/formik/FormikCheckBox"));
|
|
14
14
|
const FormikInput_1 = __importDefault(require("../../elements/formik/FormikInput"));
|
|
15
15
|
const getPreferencesByWorkspace_1 = require("../../reducer/preferences/utilities/getPreferencesByWorkspace");
|
|
@@ -38,13 +38,13 @@ const style = {
|
|
|
38
38
|
};
|
|
39
39
|
function DatabasesTabContent({ currentWorkspace }) {
|
|
40
40
|
const { values, setFieldValue } = (0, formik_1.useFormikContext)();
|
|
41
|
-
const databases = (0,
|
|
42
|
-
|
|
41
|
+
const databases = (0, get_1.default)(values, 'databases', []);
|
|
42
|
+
function deleteHandler(index) {
|
|
43
43
|
const _database = databases.data.slice();
|
|
44
44
|
_database.splice(index, 1);
|
|
45
45
|
setFieldValue('databases.data', _database);
|
|
46
|
-
}
|
|
47
|
-
|
|
46
|
+
}
|
|
47
|
+
function addHandler() {
|
|
48
48
|
const newDatabase = {
|
|
49
49
|
key: (0, uuid_1.v4)(),
|
|
50
50
|
label: '',
|
|
@@ -52,27 +52,32 @@ function DatabasesTabContent({ currentWorkspace }) {
|
|
|
52
52
|
enabled: true,
|
|
53
53
|
};
|
|
54
54
|
setFieldValue('databases.data', [...databases.data, newDatabase]);
|
|
55
|
-
}
|
|
56
|
-
|
|
55
|
+
}
|
|
56
|
+
function resetHandler() {
|
|
57
57
|
const workSpaceDisplayPreferences = (0, getPreferencesByWorkspace_1.getPreferencesByWorkspace)(currentWorkspace);
|
|
58
58
|
const database = workSpaceDisplayPreferences.databases.data;
|
|
59
59
|
setFieldValue('databases.data', database);
|
|
60
|
-
}
|
|
61
|
-
return ((0, jsx_runtime_1.
|
|
60
|
+
}
|
|
61
|
+
return ((0, jsx_runtime_1.jsx)("fieldset", { onClick: (e) => {
|
|
62
62
|
if (e.target.checked) {
|
|
63
63
|
e.target.checked = false;
|
|
64
64
|
setFieldValue('databases.defaultDatabase', '');
|
|
65
65
|
}
|
|
66
|
-
}, children:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
66
|
+
}, children: (0, jsx_runtime_1.jsx)(GroupPane_1.GroupPane, { text: "Databases", renderHeader: (text) => {
|
|
67
|
+
return ((0, jsx_runtime_1.jsx)(DataBaseHeader, { text: text, onReset: resetHandler, onAdd: addHandler }));
|
|
68
|
+
}, children: (0, jsx_runtime_1.jsxs)("table", { style: style.table, children: [(0, jsx_runtime_1.jsx)("thead", { children: (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("th", { style: style.th, children: "#" }), (0, jsx_runtime_1.jsx)("th", { style: style.th, children: "Label " }), (0, jsx_runtime_1.jsx)("th", { style: style.th, children: "URL" }), (0, jsx_runtime_1.jsx)("th", { style: style.th, children: "Enabled" }), (0, jsx_runtime_1.jsx)("th", { style: style.th, children: "Auto Load" }), (0, jsx_runtime_1.jsx)("th", {})] }) }), (0, jsx_runtime_1.jsx)("tbody", { children: databases?.data.map((item, index) => {
|
|
69
|
+
const num = index + 1;
|
|
70
|
+
return (
|
|
71
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
72
|
+
(0, jsx_runtime_1.jsxs)("tr", { style: { height: '33px' }, children: [(0, jsx_runtime_1.jsxs)("td", { style: style.serialCol, children: [(0, jsx_runtime_1.jsx)("span", { children: num }), ' '] }), (0, jsx_runtime_1.jsx)("td", { style: style.labelCol, children: (0, jsx_runtime_1.jsx)(FormikInput_1.default, { style: { input: style.input }, name: `databases.data.${index}.label`, checkErrorAfterInputTouched: false }) }), (0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsx)(FormikInput_1.default, { style: { input: style.input }, name: `databases.data.${index}.url`, checkErrorAfterInputTouched: false }) }), (0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsx)(FormikCheckBox_1.default, { style: {
|
|
73
|
+
container: style.checkbox,
|
|
74
|
+
}, className: "checkbox-element", name: `databases.data.${index}.enabled` }) }), (0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsx)(formik_1.Field, { style: style.checkbox, type: "radio", name: "databases.defaultDatabase", value: item.key }) }), (0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
75
|
+
display: 'flex',
|
|
76
|
+
height: '100%',
|
|
77
|
+
}, children: [(0, jsx_runtime_1.jsx)(Button_1.default.Danger, { style: { fontSize: '14px' }, fill: "clear", onClick: () => deleteHandler(index), children: (0, jsx_runtime_1.jsx)(fa_1.FaTimes, {}) }), databases.length === index + 1 && ((0, jsx_runtime_1.jsx)(Button_1.default.Done, { fill: "clear", style: { fontSize: '14px' }, onClick: addHandler, children: (0, jsx_runtime_1.jsx)(fa_1.FaPlus, {}) })), (0, isGoogleDocument_1.isGoogleDocument)(item.url) && ((0, jsx_runtime_1.jsx)(Button_1.default.Action, { style: { fontSize: '13px' }, fill: "clear", onClick: () => window.open(item.url, '_blank'), children: (0, jsx_runtime_1.jsx)(fa_1.FaLink, {}) }))] }) })] }, `${index}`));
|
|
78
|
+
}) })] }) }) }));
|
|
79
|
+
}
|
|
80
|
+
function DataBaseHeader({ onReset, onAdd, text }) {
|
|
81
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "section-header", style: { display: 'flex' }, children: [(0, jsx_runtime_1.jsx)("p", { style: { flex: 1 }, children: text }), (0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', justifyContent: 'space-between' }, children: [(0, jsx_runtime_1.jsx)(Button_1.default.Danger, { fill: "clear", size: "xSmall", onClick: onReset, style: { margin: '0 5px' }, children: "Reset Databases" }), (0, jsx_runtime_1.jsx)(Button_1.default.Done, { fill: "outline", size: "xSmall", onClick: onAdd, children: "Add Database" })] })] }));
|
|
77
82
|
}
|
|
78
83
|
exports.default = DatabasesTabContent;
|