nmrium 0.65.1 → 0.65.3-pre.1753283376
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/README.md +1 -19
- package/lib/component/1d/FloatPublicationString.d.ts.map +1 -1
- package/lib/component/1d/FloatPublicationString.js +1 -1
- package/lib/component/1d/FloatPublicationString.js.map +1 -1
- package/lib/component/1d/inset/DraggableInset.js.map +1 -1
- package/lib/component/1d/peaks/usePeakShapesPath.js +1 -1
- package/lib/component/1d/peaks/usePeakShapesPath.js.map +1 -1
- package/lib/component/1d/utilities/scale.d.ts +1 -1
- package/lib/component/1d/utilities/scale.d.ts.map +1 -1
- package/lib/component/1d/utilities/scale.js +1 -1
- package/lib/component/1d/utilities/scale.js.map +1 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js.map +1 -1
- package/lib/component/1d-2d/components/ViewerResponsiveWrapper.d.ts.map +1 -1
- package/lib/component/1d-2d/components/ViewerResponsiveWrapper.js.map +1 -1
- package/lib/component/1d-2d/tools/BrushXY.d.ts.map +1 -1
- package/lib/component/1d-2d/tools/BrushXY.js.map +1 -1
- package/lib/component/2d/BrushTracker2D.js.map +1 -1
- package/lib/component/2d/FooterBanner.js +1 -1
- package/lib/component/2d/FooterBanner.js.map +1 -1
- package/lib/component/2d/tools/XYLabelPointer.js +1 -1
- package/lib/component/2d/tools/XYLabelPointer.js.map +1 -1
- package/lib/component/2d/useTracesSpectra.d.ts +1 -1
- package/lib/component/2d/useTracesSpectra.d.ts.map +1 -1
- package/lib/component/2d/utilities/scale.d.ts +1 -1
- package/lib/component/2d/utilities/scale.d.ts.map +1 -1
- package/lib/component/2d/utilities/scale.js +1 -1
- package/lib/component/2d/utilities/scale.js.map +1 -1
- package/lib/component/EventsTrackers/MouseTracker.js +1 -1
- package/lib/component/EventsTrackers/MouseTracker.js.map +1 -1
- package/lib/component/elements/ContextMenuBluePrint.js +1 -1
- package/lib/component/elements/ContextMenuBluePrint.js.map +1 -1
- package/lib/component/elements/D3Axis.d.ts.map +1 -1
- package/lib/component/elements/D3Axis.js.map +1 -1
- package/lib/component/elements/DraggableDialog.js +1 -1
- package/lib/component/elements/DraggableDialog.js.map +1 -1
- package/lib/component/elements/Footer.d.ts +1 -1
- package/lib/component/elements/Footer.d.ts.map +1 -1
- package/lib/component/elements/Footer.js +1 -1
- package/lib/component/elements/Footer.js.map +1 -1
- package/lib/component/elements/Input.d.ts.map +1 -1
- package/lib/component/elements/NextPrev.js +1 -1
- package/lib/component/elements/SVGGroup.d.ts +1 -1
- package/lib/component/elements/SVGGroup.d.ts.map +1 -1
- package/lib/component/elements/Sections.d.ts +3 -1
- package/lib/component/elements/Sections.d.ts.map +1 -1
- package/lib/component/elements/Sections.js +135 -25
- package/lib/component/elements/Sections.js.map +1 -1
- package/lib/component/elements/StyledDialogBody.d.ts +1 -1
- package/lib/component/elements/TabsProvider.js +1 -1
- package/lib/component/elements/TabsProvider.js.map +1 -1
- package/lib/component/elements/ToolbarPopoverItem.d.ts +1 -1
- package/lib/component/elements/ToolbarPopoverItem.d.ts.map +1 -1
- package/lib/component/elements/export/units.d.ts.map +1 -1
- package/lib/component/elements/export/units.js.map +1 -1
- package/lib/component/elements/pdnd.cjs +12 -1
- package/lib/component/elements/pdnd.cjs.map +1 -1
- package/lib/component/elements/pdnd.d.cts +5 -0
- package/lib/component/elements/pdnd.d.cts.map +1 -1
- package/lib/component/elements/resizer/useResizer.d.ts.map +1 -1
- package/lib/component/header/base/BaseSimpleApodizationOptionsPanel.d.ts.map +1 -1
- package/lib/component/header/base/BaseSimpleApodizationOptionsPanel.js.map +1 -1
- package/lib/component/header/base/BaseSimpleZeroFillingOptionsPanel.d.ts.map +1 -1
- package/lib/component/header/base/BaseSimpleZeroFillingOptionsPanel.js.map +1 -1
- package/lib/component/hooks/usePanelPreferences.d.ts.map +1 -1
- package/lib/component/hooks/usePanelPreferences.js +1 -1
- package/lib/component/hooks/usePanelPreferences.js.map +1 -1
- package/lib/component/hooks/useVerticalAlign.d.ts +1 -1
- package/lib/component/loader/useLoadFiles.d.ts.map +1 -1
- package/lib/component/loader/useLoadFiles.js +3 -3
- package/lib/component/loader/useLoadFiles.js.map +1 -1
- package/lib/component/main/InnerNMRium.js +2 -2
- package/lib/component/main/InnerNMRium.js.map +1 -1
- package/lib/component/main/NMRium.d.ts +1 -1
- package/lib/component/main/NMRium.d.ts.map +1 -1
- package/lib/component/main/NMRiumStateProvider.js +1 -1
- package/lib/component/main/NMRiumStateProvider.js.map +1 -1
- package/lib/component/main/types.d.ts +2 -2
- package/lib/component/main/types.d.ts.map +1 -1
- package/lib/component/modal/PublicationStringModal.js.map +1 -1
- package/lib/component/modal/changeSum/SelectMolecule.js.map +1 -1
- package/lib/component/modal/metaImportation/MetaImportationModal.js +1 -1
- package/lib/component/modal/metaImportation/MetaImportationModal.js.map +1 -1
- package/lib/component/modal/setting/GeneralSettings.d.ts.map +1 -1
- package/lib/component/modal/setting/GeneralSettings.js.map +1 -1
- package/lib/component/modal/setting/settingsValidation.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.js.map +1 -1
- package/lib/component/panels/SpectraPanel/base/setting/Spectrum2DSetting.js.map +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/Constants.d.ts +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/Constants.d.ts.map +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/Constants.js +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/Constants.js.map +1 -1
- package/lib/component/panels/SummaryPanel/utilities/Utilities.d.ts +1 -1
- package/lib/component/panels/SummaryPanel/utilities/Utilities.d.ts.map +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.d.ts.map +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js.map +1 -1
- package/lib/component/panels/databasePanel/DatabasePreferences.js +1 -1
- package/lib/component/panels/databasePanel/DatabasePreferences.js.map +1 -1
- package/lib/component/panels/databasePanel/DatabaseSearchOptions.d.ts +1 -1
- package/lib/component/panels/databasePanel/DatabaseSearchOptions.d.ts.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/FiltersSectionsPanel.d.ts.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/FiltersSectionsPanel.js +6 -6
- package/lib/component/panels/filtersPanel/Filters/FiltersSectionsPanel.js.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/base/BaseZeroFillingOptions.d.ts.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/base/BaseZeroFillingOptions.js.map +1 -1
- package/lib/component/panels/multipleAnalysisPanel/preferences/index.js.map +1 -1
- package/lib/component/panels/predictionPanel/PredictionPanel.d.ts.map +1 -1
- package/lib/component/panels/predictionPanel/PredictionPanel.js +17 -13
- package/lib/component/panels/predictionPanel/PredictionPanel.js.map +1 -1
- package/lib/component/reducer/Reducer.d.ts +1 -1
- package/lib/component/reducer/Reducer.d.ts.map +1 -1
- package/lib/component/reducer/actions/CorrelationsActions.d.ts +1 -1
- package/lib/component/reducer/actions/CorrelationsActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/DatabaseActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/DomainActions.d.ts +1 -1
- package/lib/component/reducer/actions/DomainActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/DomainActions.js +1 -1
- package/lib/component/reducer/actions/DomainActions.js.map +1 -1
- package/lib/component/reducer/actions/FiltersActions.d.ts +3 -3
- package/lib/component/reducer/actions/FiltersActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/FiltersActions.js +2 -4
- package/lib/component/reducer/actions/FiltersActions.js.map +1 -1
- package/lib/component/reducer/actions/InsetActions.d.ts +1 -1
- package/lib/component/reducer/actions/InsetActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/InsetActions.js +2 -2
- package/lib/component/reducer/actions/InsetActions.js.map +1 -1
- package/lib/component/reducer/actions/IntegralsActions.d.ts +1 -1
- package/lib/component/reducer/actions/IntegralsActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/IntegralsActions.js +1 -1
- package/lib/component/reducer/actions/IntegralsActions.js.map +1 -1
- package/lib/component/reducer/actions/LoadActions.d.ts +1 -1
- package/lib/component/reducer/actions/LoadActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/LoadActions.js +1 -1
- package/lib/component/reducer/actions/LoadActions.js.map +1 -1
- package/lib/component/reducer/actions/MoleculeActions.d.ts +1 -1
- package/lib/component/reducer/actions/MoleculeActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/MoleculeActions.js +2 -2
- package/lib/component/reducer/actions/MoleculeActions.js.map +1 -1
- package/lib/component/reducer/actions/PeaksActions.d.ts +1 -1
- package/lib/component/reducer/actions/PeaksActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/PeaksActions.js +1 -1
- package/lib/component/reducer/actions/PeaksActions.js.map +1 -1
- package/lib/component/reducer/actions/PreferencesActions.d.ts +1 -1
- package/lib/component/reducer/actions/PreferencesActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/PreferencesActions.js +1 -1
- package/lib/component/reducer/actions/PreferencesActions.js.map +1 -1
- package/lib/component/reducer/actions/RangesActions.d.ts +1 -1
- package/lib/component/reducer/actions/RangesActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/RangesActions.js +1 -1
- package/lib/component/reducer/actions/RangesActions.js.map +1 -1
- package/lib/component/reducer/actions/SpectraActions.d.ts +1 -1
- package/lib/component/reducer/actions/SpectraActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/SpectraActions.js +1 -1
- package/lib/component/reducer/actions/SpectraActions.js.map +1 -1
- package/lib/component/reducer/actions/ToolsActions.d.ts +1 -1
- package/lib/component/reducer/actions/ToolsActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/ToolsActions.js +2 -2
- package/lib/component/reducer/actions/ToolsActions.js.map +1 -1
- package/lib/component/reducer/actions/ZonesActions.d.ts +2 -2
- package/lib/component/reducer/actions/ZonesActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/ZonesActions.js +1 -1
- package/lib/component/reducer/actions/ZonesActions.js.map +1 -1
- package/lib/component/reducer/helper/Zoom1DManager.d.ts +1 -1
- package/lib/component/reducer/helper/Zoom1DManager.d.ts.map +1 -1
- package/lib/component/reducer/helper/Zoom1DManager.js +1 -1
- package/lib/component/reducer/helper/Zoom1DManager.js.map +1 -1
- package/lib/component/reducer/preferences/actions/changeExportSettings.d.ts +1 -1
- package/lib/component/reducer/preferences/actions/changeExportSettings.d.ts.map +1 -1
- package/lib/component/reducer/preferences/actions/changePrintPageSettings.d.ts +1 -1
- package/lib/component/reducer/preferences/actions/changePrintPageSettings.d.ts.map +1 -1
- package/lib/component/reducer/preferences/actions/matrixGeneration.d.ts +1 -1
- package/lib/component/reducer/preferences/actions/matrixGeneration.d.ts.map +1 -1
- package/lib/component/reducer/preferences/actions/matrixGeneration.js +1 -1
- package/lib/component/reducer/preferences/actions/matrixGeneration.js.map +1 -1
- package/lib/component/reducer/preferences/actions/toggleInformationBlock.d.ts +1 -1
- package/lib/component/reducer/preferences/actions/toggleInformationBlock.d.ts.map +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts.map +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js.map +1 -1
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +1 -1
- package/lib/component/reducer/preferences/preferencesReducer.d.ts.map +1 -1
- package/lib/component/reducer/preferences/utilities/mapWorkspaces.d.ts +1 -1
- package/lib/component/reducer/preferences/utilities/mapWorkspaces.d.ts.map +1 -1
- package/lib/component/toolbar/ToolBar.js.map +1 -1
- package/lib/component/utility/export.d.ts +1 -1
- package/lib/component/utility/export.d.ts.map +1 -1
- package/lib/component/utility/export.js +5 -11
- package/lib/component/utility/export.js.map +1 -1
- package/lib/data/SpectraManager.d.ts.map +1 -1
- package/lib/data/SpectraManager.js +5 -11
- package/lib/data/SpectraManager.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/index.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/index.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/index.js +1 -1
- package/lib/data/data1d/Spectrum1D/index.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/isSpectrum1D.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/isSpectrum1D.d.ts.map +1 -1
- package/lib/data/data1d/multipleSpectraAnalysis.d.ts.map +1 -1
- package/lib/data/data1d/multipleSpectraAnalysis.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/contours.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/contours.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/contours.js +1 -1
- package/lib/data/data2d/Spectrum2D/contours.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/isSpectrum2D.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/isSpectrum2D.d.ts.map +1 -1
- package/lib/data/parseMeta/index.d.ts +1 -1
- package/lib/data/parseMeta/index.d.ts.map +1 -1
- package/lib/data/parseMeta/index.js +1 -1
- package/lib/data/parseMeta/index.js.map +1 -1
- package/lib/data/parseMeta/isMetaFile.d.ts +2 -2
- package/lib/data/parseMeta/isMetaFile.d.ts.map +1 -1
- package/lib/data/parseMeta/isMetaFile.js.map +1 -1
- package/lib/data/parseMeta/linkMetaWithSpectra.d.ts +1 -1
- package/lib/data/parseMeta/linkMetaWithSpectra.d.ts.map +1 -1
- package/lib/data/parseMeta/linkMetaWithSpectra.js +1 -1
- package/lib/data/parseMeta/linkMetaWithSpectra.js.map +1 -1
- package/lib/data/parseMeta/parseMetaFile.d.ts +2 -2
- package/lib/data/parseMeta/parseMetaFile.d.ts.map +1 -1
- package/lib/data/parseMeta/parseMetaFile.js.map +1 -1
- package/lib/data/utilities/FindUtilities.d.ts +1 -1
- package/lib/data/utilities/FindUtilities.d.ts.map +1 -1
- package/lib/versionInfo.d.ts.map +1 -1
- package/lib/versionInfo.js +1 -1
- package/lib/versionInfo.js.map +1 -1
- package/package.json +29 -27
- package/src/component/1d/FloatPublicationString.tsx +3 -1
- package/src/component/1d/SpectraLegends.tsx +1 -1
- package/src/component/1d/inset/DraggableInset.tsx +1 -1
- package/src/component/1d/peaks/usePeakShapesPath.ts +1 -1
- package/src/component/1d/utilities/scale.ts +4 -4
- package/src/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.tsx +1 -1
- package/src/component/1d-2d/components/FloatMoleculeStructures/FloatMolecules.tsx +1 -1
- package/src/component/1d-2d/components/ViewerResponsiveWrapper.tsx +1 -1
- package/src/component/1d-2d/tools/BrushXY.tsx +1 -1
- package/src/component/2d/BrushTracker2D.tsx +1 -1
- package/src/component/2d/FooterBanner.tsx +1 -1
- package/src/component/2d/tools/XYLabelPointer.tsx +1 -1
- package/src/component/2d/useTracesSpectra.ts +1 -1
- package/src/component/2d/utilities/scale.ts +3 -3
- package/src/component/EventsTrackers/MouseTracker.tsx +1 -1
- package/src/component/assignment/AssignmentProvider.tsx +1 -1
- package/src/component/elements/ContextMenuBluePrint.tsx +1 -1
- package/src/component/elements/D3Axis.tsx +1 -1
- package/src/component/elements/DraggableDialog.tsx +1 -1
- package/src/component/elements/Footer.tsx +1 -1
- package/src/component/elements/Input.tsx +1 -1
- package/src/component/elements/NextPrev.tsx +1 -1
- package/src/component/elements/SVGGroup.tsx +1 -1
- package/src/component/elements/Sections.tsx +199 -36
- package/src/component/elements/TabsProvider.tsx +1 -1
- package/src/component/elements/ToolbarPopoverItem.tsx +1 -1
- package/src/component/elements/export/units.ts +1 -1
- package/src/component/elements/pdnd.cts +8 -0
- package/src/component/elements/resizer/useResizer.tsx +1 -1
- package/src/component/header/base/BaseSimpleApodizationOptionsPanel.tsx +1 -1
- package/src/component/header/base/BaseSimpleZeroFillingOptionsPanel.tsx +1 -1
- package/src/component/hooks/usePanelPreferences.ts +5 -5
- package/src/component/loader/useLoadFiles.ts +7 -5
- package/src/component/main/InnerNMRium.tsx +2 -2
- package/src/component/main/NMRium.tsx +1 -1
- package/src/component/main/NMRiumStateProvider.tsx +1 -1
- package/src/component/main/types.ts +2 -2
- package/src/component/modal/PublicationStringModal.tsx +1 -1
- package/src/component/modal/changeSum/SelectMolecule.tsx +1 -1
- package/src/component/modal/metaImportation/MetaImportationModal.tsx +1 -1
- package/src/component/modal/setting/GeneralSettings.tsx +1 -1
- package/src/component/modal/setting/settingsValidation.ts +1 -1
- package/src/component/panels/AutomaticAssignment/useAutoAssignments.ts +1 -1
- package/src/component/panels/MoleculesPanel/useAtomAssignment.tsx +3 -3
- package/src/component/panels/SpectraPanel/SpectraPanelHeader.tsx +1 -1
- package/src/component/panels/SpectraPanel/base/setting/Spectrum2DSetting.tsx +1 -1
- package/src/component/panels/SummaryPanel/CorrelationTable/Constants.ts +1 -1
- package/src/component/panels/SummaryPanel/utilities/Utilities.ts +1 -1
- package/src/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.tsx +1 -1
- package/src/component/panels/databasePanel/DatabasePreferences.tsx +1 -1
- package/src/component/panels/databasePanel/DatabaseSearchOptions.tsx +2 -2
- package/src/component/panels/filtersPanel/Filters/FiltersSectionsPanel.tsx +7 -6
- package/src/component/panels/filtersPanel/Filters/base/BaseZeroFillingOptions.tsx +1 -1
- package/src/component/panels/multipleAnalysisPanel/preferences/index.tsx +1 -1
- package/src/component/panels/predictionPanel/PredictionPanel.tsx +34 -27
- package/src/component/reducer/Reducer.ts +1 -1
- package/src/component/reducer/actions/CorrelationsActions.ts +2 -2
- package/src/component/reducer/actions/DatabaseActions.ts +1 -1
- package/src/component/reducer/actions/DomainActions.ts +5 -5
- package/src/component/reducer/actions/FiltersActions.ts +29 -32
- package/src/component/reducer/actions/InsetActions.ts +7 -7
- package/src/component/reducer/actions/IntegralsActions.ts +3 -3
- package/src/component/reducer/actions/LoadActions.ts +1 -1
- package/src/component/reducer/actions/MoleculeActions.ts +5 -5
- package/src/component/reducer/actions/PeaksActions.ts +3 -3
- package/src/component/reducer/actions/PreferencesActions.ts +1 -1
- package/src/component/reducer/actions/RangesActions.ts +17 -17
- package/src/component/reducer/actions/SpectraActions.ts +7 -7
- package/src/component/reducer/actions/ToolsActions.ts +13 -13
- package/src/component/reducer/actions/ZonesActions.ts +11 -11
- package/src/component/reducer/helper/Zoom1DManager.ts +1 -1
- package/src/component/reducer/preferences/actions/changeExportSettings.ts +1 -1
- package/src/component/reducer/preferences/actions/changePrintPageSettings.ts +1 -1
- package/src/component/reducer/preferences/actions/matrixGeneration.ts +2 -2
- package/src/component/reducer/preferences/actions/toggleInformationBlock.ts +1 -1
- package/src/component/reducer/preferences/panelsPreferencesDefaultValues.ts +6 -6
- package/src/component/reducer/preferences/preferencesReducer.ts +1 -1
- package/src/component/reducer/preferences/utilities/mapWorkspaces.ts +1 -1
- package/src/component/toolbar/ToolBar.tsx +1 -1
- package/src/component/utility/export.ts +7 -13
- package/src/data/SpectraManager.ts +5 -12
- package/src/data/data1d/Spectrum1D/index.ts +2 -2
- package/src/data/data1d/Spectrum1D/isSpectrum1D.ts +1 -1
- package/src/data/data1d/multipleSpectraAnalysis.ts +5 -5
- package/src/data/data2d/Spectrum2D/contours.ts +2 -2
- package/src/data/data2d/Spectrum2D/isSpectrum2D.ts +1 -1
- package/src/data/parseMeta/index.ts +1 -1
- package/src/data/parseMeta/isMetaFile.ts +2 -2
- package/src/data/parseMeta/linkMetaWithSpectra.ts +1 -1
- package/src/data/parseMeta/parseMetaFile.ts +2 -2
- package/src/data/utilities/FindUtilities.ts +1 -1
- package/src/index.tsx +1 -1
- package/src/versionInfo.ts +1 -1
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ElementDropTargetEventBasePayload } from '@atlaskit/pragmatic-drag-and-drop/dist/types/adapter/element-adapter.js';
|
|
2
|
+
import type { ElementDragPayload } from '@atlaskit/pragmatic-drag-and-drop/dist/types/internal-types.js';
|
|
3
|
+
import type { Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
|
|
4
|
+
import { Colors, Icon, Tag } from '@blueprintjs/core';
|
|
2
5
|
import styled from '@emotion/styled';
|
|
3
6
|
import type {
|
|
4
7
|
CSSProperties,
|
|
@@ -10,13 +13,60 @@ import type {
|
|
|
10
13
|
import {
|
|
11
14
|
createContext,
|
|
12
15
|
useContext,
|
|
13
|
-
useMemo,
|
|
14
16
|
useEffect,
|
|
17
|
+
useMemo,
|
|
15
18
|
useRef,
|
|
16
19
|
useState,
|
|
17
20
|
} from 'react';
|
|
21
|
+
import { createPortal } from 'react-dom';
|
|
22
|
+
|
|
23
|
+
import { assert } from '../utility/assert.js';
|
|
24
|
+
|
|
25
|
+
import {
|
|
26
|
+
attachClosestEdge,
|
|
27
|
+
combine,
|
|
28
|
+
draggable,
|
|
29
|
+
dropTargetForElements,
|
|
30
|
+
extractClosestEdge,
|
|
31
|
+
getReorderDestinationIndex,
|
|
32
|
+
pointerOutsideOfPreview,
|
|
33
|
+
setCustomNativeDragPreview,
|
|
34
|
+
} from './pdnd.cjs';
|
|
35
|
+
|
|
36
|
+
interface DropIndicatorProps {
|
|
37
|
+
edge: Edge;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const DropIndicator = styled.div<DropIndicatorProps>`
|
|
41
|
+
position: absolute;
|
|
42
|
+
z-index: 3;
|
|
43
|
+
background-color: ${Colors.BLUE3};
|
|
44
|
+
height: 2px;
|
|
45
|
+
left: 0;
|
|
46
|
+
right: 0;
|
|
47
|
+
pointer-events: none;
|
|
48
|
+
${(props) => props.edge === 'top' && 'top: -1px;'}
|
|
49
|
+
${(props) => props.edge === 'bottom' && 'bottom: -1px;'}
|
|
50
|
+
`;
|
|
51
|
+
|
|
52
|
+
const Preview = styled.div`
|
|
53
|
+
padding-block: 4px;
|
|
54
|
+
padding-inline: 8px;
|
|
55
|
+
border-radius: 4px;
|
|
56
|
+
background-color: #f4f5f7;
|
|
57
|
+
max-width: 360px;
|
|
58
|
+
white-space: nowrap;
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
text-overflow: ellipsis;
|
|
61
|
+
`;
|
|
62
|
+
|
|
63
|
+
type DraggableState =
|
|
64
|
+
| { type: 'idle' }
|
|
65
|
+
| { type: 'preview'; container: HTMLElement }
|
|
66
|
+
| { type: 'dragging' };
|
|
18
67
|
|
|
19
|
-
|
|
68
|
+
const idleState: DraggableState = { type: 'idle' };
|
|
69
|
+
const draggingState: DraggableState = { type: 'dragging' };
|
|
20
70
|
|
|
21
71
|
interface SelectionsContextState {
|
|
22
72
|
isOverflow: boolean;
|
|
@@ -167,14 +217,13 @@ interface BaseSectionProps {
|
|
|
167
217
|
|
|
168
218
|
interface SectionItemProps extends BaseSectionProps {
|
|
169
219
|
id?: string;
|
|
220
|
+
index?: number;
|
|
170
221
|
onClick?: (id, event?: MouseEvent<HTMLDivElement>) => void;
|
|
171
222
|
children?: ReactNode | ((options: { isOpen?: boolean }) => ReactNode);
|
|
172
223
|
isOpen: boolean;
|
|
173
224
|
sticky?: boolean;
|
|
174
|
-
onReorder?: (
|
|
175
|
-
|
|
176
|
-
targetId: string | undefined,
|
|
177
|
-
) => void;
|
|
225
|
+
onReorder?: (sourceId: number, targetId: number) => void;
|
|
226
|
+
dragLabel?: string;
|
|
178
227
|
}
|
|
179
228
|
|
|
180
229
|
interface SectionProps {
|
|
@@ -220,6 +269,7 @@ function SectionBody(props: HTMLAttributes<HTMLDivElement>) {
|
|
|
220
269
|
|
|
221
270
|
function SectionItem(props: SectionItemProps) {
|
|
222
271
|
const {
|
|
272
|
+
dragLabel = props.title,
|
|
223
273
|
id = props.title,
|
|
224
274
|
title,
|
|
225
275
|
onClick,
|
|
@@ -232,30 +282,116 @@ function SectionItem(props: SectionItemProps) {
|
|
|
232
282
|
sticky = false,
|
|
233
283
|
arrowProps = { hide: false, style: {} },
|
|
234
284
|
onReorder,
|
|
285
|
+
index,
|
|
235
286
|
} = props;
|
|
236
287
|
|
|
237
288
|
const { isOverflow, matchContentHeight } = useSections();
|
|
238
289
|
|
|
239
290
|
const wrapperRef = useRef<HTMLDivElement>(null);
|
|
240
291
|
const handleRef = useRef<HTMLDivElement>(null);
|
|
292
|
+
const [state, setState] = useState<DraggableState>(idleState);
|
|
293
|
+
const [closestEdge, setClosestEdge] = useState<Edge | null>(null);
|
|
294
|
+
const isReorderActive = typeof onReorder === 'function';
|
|
241
295
|
|
|
242
296
|
useEffect(() => {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
})
|
|
297
|
+
const dragHandle = handleRef.current;
|
|
298
|
+
const element = wrapperRef.current;
|
|
299
|
+
if (!element || !dragHandle || !isReorderActive) return;
|
|
300
|
+
|
|
301
|
+
const data = { id, index };
|
|
302
|
+
|
|
303
|
+
function canDrop({ source }: { source: ElementDragPayload }): boolean {
|
|
304
|
+
return source.data.id !== id;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
function dragHandler({ source, self }: ElementDropTargetEventBasePayload) {
|
|
308
|
+
const isSource = source.element === dragHandle;
|
|
309
|
+
if (isSource) {
|
|
310
|
+
// eslint-disable-next-line react-you-might-not-need-an-effect/no-chain-state-updates
|
|
311
|
+
setClosestEdge(null);
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
const closestEdge = extractClosestEdge(self.data);
|
|
316
|
+
|
|
317
|
+
const sourceIndex = source.data.index as number;
|
|
318
|
+
assert(typeof sourceIndex === 'number', 'index is not defined');
|
|
319
|
+
const isItemBeforeSource = index === sourceIndex - 1;
|
|
320
|
+
const isItemAfterSource = index === sourceIndex + 1;
|
|
321
|
+
|
|
322
|
+
const isDropIndicatorHidden =
|
|
323
|
+
(isItemBeforeSource && closestEdge === 'bottom') ||
|
|
324
|
+
(isItemAfterSource && closestEdge === 'top');
|
|
325
|
+
|
|
326
|
+
setClosestEdge(isDropIndicatorHidden ? null : closestEdge);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
const cleanDrag = combine(
|
|
330
|
+
draggable({
|
|
331
|
+
element,
|
|
332
|
+
dragHandle,
|
|
333
|
+
getInitialData: () => data,
|
|
334
|
+
onGenerateDragPreview({ nativeSetDragImage }) {
|
|
335
|
+
setCustomNativeDragPreview({
|
|
336
|
+
nativeSetDragImage,
|
|
337
|
+
getOffset: pointerOutsideOfPreview({
|
|
338
|
+
x: '8px',
|
|
339
|
+
y: '8px',
|
|
340
|
+
}),
|
|
341
|
+
render({ container }) {
|
|
342
|
+
setState({ type: 'preview', container });
|
|
343
|
+
|
|
344
|
+
return () => setState(draggingState);
|
|
345
|
+
},
|
|
346
|
+
});
|
|
347
|
+
},
|
|
348
|
+
onDragStart() {
|
|
349
|
+
setState(draggingState);
|
|
350
|
+
},
|
|
351
|
+
onDrop() {
|
|
352
|
+
setState(idleState);
|
|
353
|
+
},
|
|
354
|
+
}),
|
|
355
|
+
dropTargetForElements({
|
|
356
|
+
element,
|
|
357
|
+
canDrop,
|
|
358
|
+
getIsSticky: () => false,
|
|
359
|
+
getData({ input }) {
|
|
360
|
+
return attachClosestEdge(data, {
|
|
361
|
+
element,
|
|
362
|
+
input,
|
|
363
|
+
allowedEdges: ['top', 'bottom'],
|
|
364
|
+
});
|
|
365
|
+
},
|
|
366
|
+
onDrag: dragHandler,
|
|
367
|
+
|
|
368
|
+
onDragLeave() {
|
|
369
|
+
setClosestEdge(null);
|
|
370
|
+
},
|
|
371
|
+
onDrop() {
|
|
372
|
+
setClosestEdge(null);
|
|
373
|
+
},
|
|
374
|
+
}),
|
|
375
|
+
);
|
|
250
376
|
|
|
251
377
|
return () => {
|
|
252
378
|
cleanDrag();
|
|
253
379
|
};
|
|
254
|
-
}, [id]);
|
|
255
|
-
|
|
380
|
+
}, [id, index, isReorderActive]);
|
|
256
381
|
return (
|
|
257
|
-
<DroppableSectionWrapper
|
|
258
|
-
|
|
382
|
+
<DroppableSectionWrapper
|
|
383
|
+
key={id}
|
|
384
|
+
id={id}
|
|
385
|
+
onReorder={onReorder}
|
|
386
|
+
index={index}
|
|
387
|
+
>
|
|
388
|
+
<div
|
|
389
|
+
style={{
|
|
390
|
+
position: 'relative',
|
|
391
|
+
opacity: state && state.type === 'dragging' ? 0.3 : 1,
|
|
392
|
+
}}
|
|
393
|
+
ref={wrapperRef}
|
|
394
|
+
>
|
|
259
395
|
<SectionWrapper
|
|
260
396
|
isOpen={isOpen}
|
|
261
397
|
isOverflow={isOverflow}
|
|
@@ -284,7 +420,10 @@ function SectionItem(props: SectionItemProps) {
|
|
|
284
420
|
arrowProps={arrowProps}
|
|
285
421
|
/>
|
|
286
422
|
<Wrapper isOpen={isOpen}>{children}</Wrapper>
|
|
423
|
+
{closestEdge && <DropIndicator edge={closestEdge} />}
|
|
287
424
|
</SectionWrapper>
|
|
425
|
+
{state.type === 'preview' &&
|
|
426
|
+
createPortal(<Preview>{dragLabel}</Preview>, state.container)}
|
|
288
427
|
</div>
|
|
289
428
|
</DroppableSectionWrapper>
|
|
290
429
|
);
|
|
@@ -376,36 +515,60 @@ function MainSectionHeader(props: MainSectionHeaderProps) {
|
|
|
376
515
|
);
|
|
377
516
|
}
|
|
378
517
|
|
|
379
|
-
interface DroppableProps
|
|
518
|
+
interface DroppableProps
|
|
519
|
+
extends Pick<SectionItemProps, 'id' | 'onReorder' | 'index'> {
|
|
380
520
|
children: ReactNode;
|
|
381
521
|
}
|
|
382
522
|
|
|
383
|
-
function DroppableSectionWrapper(
|
|
523
|
+
function DroppableSectionWrapper(props: DroppableProps) {
|
|
524
|
+
const { id, onReorder, index: indexOfTarget, children } = props;
|
|
384
525
|
const ref = useRef<HTMLDivElement>(null);
|
|
385
|
-
const [isOver, setIsOver] = useState(false);
|
|
386
526
|
|
|
387
527
|
useEffect(() => {
|
|
388
|
-
if (
|
|
528
|
+
if (typeof onReorder !== 'function') return;
|
|
529
|
+
|
|
530
|
+
const element = ref.current;
|
|
531
|
+
|
|
532
|
+
if (!element) return;
|
|
389
533
|
|
|
390
534
|
return dropTargetForElements({
|
|
391
|
-
element
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
const
|
|
395
|
-
|
|
396
|
-
|
|
535
|
+
element,
|
|
536
|
+
onDrop: ({ location, source }) => {
|
|
537
|
+
const { index: startIndex } = source.data;
|
|
538
|
+
const target = location.current.dropTargets[0];
|
|
539
|
+
if (!target) {
|
|
540
|
+
return;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
if (
|
|
544
|
+
typeof startIndex !== 'number' ||
|
|
545
|
+
typeof indexOfTarget !== 'number'
|
|
546
|
+
) {
|
|
547
|
+
return;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
const targetData = target.data;
|
|
551
|
+
const closestEdgeOfTarget = extractClosestEdge(targetData);
|
|
552
|
+
|
|
553
|
+
const finishIndex = getReorderDestinationIndex({
|
|
554
|
+
startIndex,
|
|
555
|
+
closestEdgeOfTarget,
|
|
556
|
+
indexOfTarget,
|
|
557
|
+
axis: 'vertical',
|
|
558
|
+
});
|
|
559
|
+
|
|
560
|
+
if (finishIndex === startIndex) {
|
|
561
|
+
// If there would be no change, we skip the update
|
|
562
|
+
return;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
onReorder?.(startIndex, finishIndex);
|
|
397
566
|
},
|
|
398
|
-
onDragEnter: () => setIsOver(true),
|
|
399
|
-
onDragLeave: () => setIsOver(false),
|
|
400
567
|
});
|
|
401
|
-
}, [id, onReorder]);
|
|
568
|
+
}, [id, indexOfTarget, onReorder]);
|
|
402
569
|
|
|
403
570
|
return (
|
|
404
|
-
<div
|
|
405
|
-
ref={ref}
|
|
406
|
-
data-drop-id={id}
|
|
407
|
-
style={{ ...(isOver && { opacity: 0.1 }) }}
|
|
408
|
-
>
|
|
571
|
+
<div ref={ref} data-drop-id={id}>
|
|
409
572
|
{children}
|
|
410
573
|
</div>
|
|
411
574
|
);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { MenuItemProps } from '@blueprintjs/core';
|
|
2
2
|
import { Menu, MenuItem } from '@blueprintjs/core';
|
|
3
3
|
import type {
|
|
4
|
-
ToolbarPopoverItemProps,
|
|
5
4
|
ToolbarItemProps,
|
|
5
|
+
ToolbarPopoverItemProps,
|
|
6
6
|
} from 'react-science/ui';
|
|
7
7
|
import { Toolbar } from 'react-science/ui';
|
|
8
8
|
|
|
@@ -7,3 +7,11 @@ export {
|
|
|
7
7
|
draggable,
|
|
8
8
|
dropTargetForElements,
|
|
9
9
|
} from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
10
|
+
export {
|
|
11
|
+
attachClosestEdge,
|
|
12
|
+
extractClosestEdge,
|
|
13
|
+
} from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
|
|
14
|
+
export { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
15
|
+
export { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview';
|
|
16
|
+
export { pointerOutsideOfPreview } from '@atlaskit/pragmatic-drag-and-drop/element/pointer-outside-of-preview';
|
|
17
|
+
export { getReorderDestinationIndex } from '@atlaskit/pragmatic-drag-and-drop-hitbox/util/get-reorder-destination-index';
|
|
@@ -3,7 +3,7 @@ import { useRef } from 'react';
|
|
|
3
3
|
import type { Draggable } from '../draggable/useDraggable.js';
|
|
4
4
|
import useDraggable from '../draggable/useDraggable.js';
|
|
5
5
|
|
|
6
|
-
import type {
|
|
6
|
+
import type { Position, ResizerProps } from './SVGResizer.js';
|
|
7
7
|
|
|
8
8
|
interface UseResizer {
|
|
9
9
|
right: Draggable;
|
|
@@ -4,8 +4,8 @@ import { useToaster } from '../../context/ToasterContext.js';
|
|
|
4
4
|
import ActionButtons from '../../elements/ActionButtons.js';
|
|
5
5
|
import Label from '../../elements/Label.js';
|
|
6
6
|
import { NumberInput2Controller } from '../../elements/NumberInput2Controller.js';
|
|
7
|
-
import { useApodization } from '../../panels/filtersPanel/Filters/hooks/useApodization.js';
|
|
8
7
|
import type { ApodizationFilterEntry } from '../../panels/filtersPanel/Filters/hooks/useApodization.js';
|
|
8
|
+
import { useApodization } from '../../panels/filtersPanel/Filters/hooks/useApodization.js';
|
|
9
9
|
import { headerLabelStyle } from '../Header.js';
|
|
10
10
|
import { HeaderWrapper } from '../HeaderWrapper.js';
|
|
11
11
|
|
|
@@ -3,11 +3,11 @@ import { Checkbox } from '@blueprintjs/core';
|
|
|
3
3
|
import ActionButtons from '../../elements/ActionButtons.js';
|
|
4
4
|
import Label from '../../elements/Label.js';
|
|
5
5
|
import { Select2Controller } from '../../elements/Select2Controller.js';
|
|
6
|
+
import type { ZeroFillingEntry } from '../../panels/filtersPanel/Filters/hooks/useZeroFilling.js';
|
|
6
7
|
import {
|
|
7
8
|
getZeroFillingNbPoints,
|
|
8
9
|
useZeroFilling,
|
|
9
10
|
} from '../../panels/filtersPanel/Filters/hooks/useZeroFilling.js';
|
|
10
|
-
import type { ZeroFillingEntry } from '../../panels/filtersPanel/Filters/hooks/useZeroFilling.js';
|
|
11
11
|
import { headerLabelStyle } from '../Header.js';
|
|
12
12
|
import { HeaderWrapper } from '../HeaderWrapper.js';
|
|
13
13
|
|
|
@@ -2,8 +2,8 @@ import type {
|
|
|
2
2
|
MatrixGenerationOptions,
|
|
3
3
|
MultipleSpectraAnalysisPreferences,
|
|
4
4
|
PanelsPreferences,
|
|
5
|
-
Workspace,
|
|
6
5
|
WorkSpacePanelPreferences,
|
|
6
|
+
Workspace,
|
|
7
7
|
} from '@zakodium/nmrium-core';
|
|
8
8
|
import has from 'lodash/has.js';
|
|
9
9
|
import { useMemo } from 'react';
|
|
@@ -11,14 +11,14 @@ import { useMemo } from 'react';
|
|
|
11
11
|
import { getDefaultPredictionOptions } from '../../data/PredictionManager.js';
|
|
12
12
|
import { usePreferences } from '../context/PreferencesContext.js';
|
|
13
13
|
import {
|
|
14
|
+
databaseDefaultValues,
|
|
14
15
|
getIntegralDefaultValues,
|
|
16
|
+
getMatrixGenerationDefaultValues,
|
|
17
|
+
getMultipleSpectraAnalysisDefaultValues,
|
|
15
18
|
getPeaksDefaultValues,
|
|
16
|
-
getZoneDefaultValues,
|
|
17
19
|
getRangeDefaultValues,
|
|
18
|
-
databaseDefaultValues,
|
|
19
|
-
getMultipleSpectraAnalysisDefaultValues,
|
|
20
20
|
getSpectraDefaultValues,
|
|
21
|
-
|
|
21
|
+
getZoneDefaultValues,
|
|
22
22
|
} from '../reducer/preferences/panelsPreferencesDefaultValues.js';
|
|
23
23
|
import { getValue } from '../utility/LocalStorage.js';
|
|
24
24
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FileCollection } from 'file-collection';
|
|
2
2
|
import type { ParseResult } from 'papaparse';
|
|
3
3
|
import { useCallback } from 'react';
|
|
4
4
|
|
|
@@ -24,7 +24,7 @@ export function useLoadFiles(onOpenMetaInformation?: (file: File) => void) {
|
|
|
24
24
|
(files: File[]) => {
|
|
25
25
|
dispatch({ type: 'SET_LOADING_FLAG', payload: { isLoading: true } });
|
|
26
26
|
|
|
27
|
-
async function loadFiles(files) {
|
|
27
|
+
async function loadFiles(files: File[]) {
|
|
28
28
|
if (
|
|
29
29
|
onOpenMetaInformation &&
|
|
30
30
|
files.length === 1 &&
|
|
@@ -32,7 +32,9 @@ export function useLoadFiles(onOpenMetaInformation?: (file: File) => void) {
|
|
|
32
32
|
) {
|
|
33
33
|
onOpenMetaInformation(files[0]);
|
|
34
34
|
} else {
|
|
35
|
-
const fileCollection = await
|
|
35
|
+
const fileCollection = await new FileCollection().appendFileList(
|
|
36
|
+
files,
|
|
37
|
+
);
|
|
36
38
|
const metaFile = Object.values(fileCollection.files).find((file) =>
|
|
37
39
|
isMetaFile(file),
|
|
38
40
|
);
|
|
@@ -52,11 +54,11 @@ export function useLoadFiles(onOpenMetaInformation?: (file: File) => void) {
|
|
|
52
54
|
},
|
|
53
55
|
);
|
|
54
56
|
|
|
55
|
-
if (
|
|
57
|
+
if (nmriumState.settings) {
|
|
56
58
|
dispatchPreferences({
|
|
57
59
|
type: 'SET_WORKSPACE',
|
|
58
60
|
payload: {
|
|
59
|
-
data:
|
|
61
|
+
data: nmriumState.settings,
|
|
60
62
|
workspaceSource: 'nmriumFile',
|
|
61
63
|
},
|
|
62
64
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import init from '@zakodium/nmrium-core-plugins';
|
|
2
2
|
import type { ForwardedRef } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { useEffect, useMemo, useReducer, useRef } from 'react';
|
|
4
4
|
import { useFullscreen } from 'react-science/ui';
|
|
5
5
|
|
|
6
6
|
import { AssignmentProvider } from '../assignment/AssignmentProvider.js';
|
|
@@ -17,8 +17,8 @@ import { DialogProvider } from '../elements/DialogManager.js';
|
|
|
17
17
|
import { ExportManagerProvider } from '../elements/export/ExportManager.js';
|
|
18
18
|
import { HighlightProvider } from '../highlight/index.js';
|
|
19
19
|
import {
|
|
20
|
-
defaultGetSpinner,
|
|
21
20
|
SpinnerProvider,
|
|
21
|
+
defaultGetSpinner,
|
|
22
22
|
} from '../loader/SpinnerContext.js';
|
|
23
23
|
import preferencesReducer, {
|
|
24
24
|
initPreferencesState,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
CustomWorkspaces,
|
|
3
|
-
WorkspacePreferences as NMRiumPreferences,
|
|
4
3
|
NMRiumCore,
|
|
4
|
+
WorkspacePreferences as NMRiumPreferences,
|
|
5
5
|
} from '@zakodium/nmrium-core';
|
|
6
6
|
import type { ReactElement, ReactNode } from 'react';
|
|
7
7
|
import { forwardRef, memo } from 'react';
|
|
@@ -12,8 +12,8 @@ import { usePreferences } from '../context/PreferencesContext.js';
|
|
|
12
12
|
import { sortSpectra, useSortSpectra } from '../context/SortSpectraContext.js';
|
|
13
13
|
import checkActionType from '../reducer/IgnoreActions.js';
|
|
14
14
|
import {
|
|
15
|
-
initialState,
|
|
16
15
|
initState,
|
|
16
|
+
initialState,
|
|
17
17
|
spectrumReducer,
|
|
18
18
|
} from '../reducer/Reducer.js';
|
|
19
19
|
|
|
@@ -3,7 +3,7 @@ import type {
|
|
|
3
3
|
Spectrum,
|
|
4
4
|
WorkspacePreferences as NMRiumPreferences,
|
|
5
5
|
} from '@zakodium/nmrium-core';
|
|
6
|
-
import type {
|
|
6
|
+
import type { Source } from 'file-collection';
|
|
7
7
|
import type { CorrelationData } from 'nmr-correlation';
|
|
8
8
|
|
|
9
9
|
type DeepPartial<T> = {
|
|
@@ -11,7 +11,7 @@ type DeepPartial<T> = {
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
interface NMRiumData {
|
|
14
|
-
source?:
|
|
14
|
+
source?: Source;
|
|
15
15
|
molecules?: NMRiumMolecules;
|
|
16
16
|
spectra: Array<DeepPartial<Spectrum>>;
|
|
17
17
|
correlations?: CorrelationData;
|
|
@@ -8,8 +8,8 @@ import { FaCopy } from 'react-icons/fa';
|
|
|
8
8
|
import { isSpectrum1D } from '../../data/data1d/Spectrum1D/isSpectrum1D.js';
|
|
9
9
|
import { useChartData } from '../context/ChartContext.js';
|
|
10
10
|
import { EmptyText } from '../elements/EmptyText.js';
|
|
11
|
-
import Label from '../elements/Label.js';
|
|
12
11
|
import type { LabelStyle } from '../elements/Label.js';
|
|
12
|
+
import Label from '../elements/Label.js';
|
|
13
13
|
import { Select2 } from '../elements/Select2.js';
|
|
14
14
|
import { StyledDialogBody } from '../elements/StyledDialogBody.js';
|
|
15
15
|
import { usePanelPreferences } from '../hooks/usePanelPreferences.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
|
-
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
3
2
|
import type { CSSProperties } from 'react';
|
|
3
|
+
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
4
4
|
import type { ControllerProps, FieldValues } from 'react-hook-form';
|
|
5
5
|
import { useController } from 'react-hook-form';
|
|
6
6
|
|
|
@@ -9,11 +9,11 @@ import { DropZone } from 'react-science/ui';
|
|
|
9
9
|
import * as Yup from 'yup';
|
|
10
10
|
|
|
11
11
|
import {
|
|
12
|
+
TargetPathError,
|
|
12
13
|
isMetaFile,
|
|
13
14
|
linkMetaWithSpectra,
|
|
14
15
|
mapErrors,
|
|
15
16
|
parseMetaFile,
|
|
16
|
-
TargetPathError,
|
|
17
17
|
} from '../../../data/parseMeta/index.js';
|
|
18
18
|
import { useChartData } from '../../context/ChartContext.js';
|
|
19
19
|
import { useDispatch } from '../../context/DispatchContext.js';
|
|
@@ -20,8 +20,8 @@ import {
|
|
|
20
20
|
} from '../../context/PreferencesContext.js';
|
|
21
21
|
import { useToaster } from '../../context/ToasterContext.js';
|
|
22
22
|
import ActionButtons from '../../elements/ActionButtons.js';
|
|
23
|
-
import Label from '../../elements/Label.js';
|
|
24
23
|
import type { LabelStyle } from '../../elements/Label.js';
|
|
24
|
+
import Label from '../../elements/Label.js';
|
|
25
25
|
import { StyledDialogBody } from '../../elements/StyledDialogBody.js';
|
|
26
26
|
import type { DropDownListItem } from '../../elements/dropDownButton/DropDownButton.js';
|
|
27
27
|
import DropDownButton from '../../elements/dropDownButton/DropDownButton.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EXTERNAL_API_KEYS } from '@zakodium/nmrium-core';
|
|
2
1
|
import type { ExternalAPIKeyType } from '@zakodium/nmrium-core';
|
|
2
|
+
import { EXTERNAL_API_KEYS } from '@zakodium/nmrium-core';
|
|
3
3
|
import { array, mixed, number, object, string } from 'yup';
|
|
4
4
|
|
|
5
5
|
import { exportOptionValidationSchema } from '../../elements/export/utilities/exportOptionValidationSchema.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Spectrum1D, Spectrum2D, Spectrum } from '@zakodium/nmrium-core';
|
|
2
2
|
import type { SpectraData } from 'nmr-processing';
|
|
3
3
|
import { getAssignments as getAssignmentsData } from 'nmr-processing';
|
|
4
4
|
import { Molecule } from 'openchemlib';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Spectrum1D, Spectrum2D, Spectrum } from '@zakodium/nmrium-core';
|
|
2
2
|
import type { DiaIDAndInfo } from 'openchemlib-utils';
|
|
3
3
|
import type { MouseEvent } from 'react';
|
|
4
4
|
import { useMemo, useRef } from 'react';
|
|
@@ -6,16 +6,16 @@ import { useMemo, useRef } from 'react';
|
|
|
6
6
|
import { isSpectrum1D } from '../../../data/data1d/Spectrum1D/isSpectrum1D.js';
|
|
7
7
|
import { ConcatenationString } from '../../../data/utilities/Concatenation.js';
|
|
8
8
|
import checkModifierKeyActivated from '../../../data/utilities/checkModifierKeyActivated.js';
|
|
9
|
-
import { useAssignmentContext } from '../../assignment/AssignmentsContext.js';
|
|
10
9
|
import type { Assignments, Axis } from '../../assignment/AssignmentsContext.js';
|
|
10
|
+
import { useAssignmentContext } from '../../assignment/AssignmentsContext.js';
|
|
11
11
|
import { useChartData } from '../../context/ChartContext.js';
|
|
12
12
|
import { useDispatch } from '../../context/DispatchContext.js';
|
|
13
13
|
import { useToaster } from '../../context/ToasterContext.js';
|
|
14
|
+
import type { HighlightEventSourceType } from '../../highlight/index.js';
|
|
14
15
|
import {
|
|
15
16
|
HighlightEventSource,
|
|
16
17
|
useHighlightData,
|
|
17
18
|
} from '../../highlight/index.js';
|
|
18
|
-
import type { HighlightEventSourceType } from '../../highlight/index.js';
|
|
19
19
|
import useSpectrum from '../../hooks/useSpectrum.js';
|
|
20
20
|
|
|
21
21
|
import type { AtomData } from './Utilities.js';
|
|
@@ -2,8 +2,8 @@ import type { RangeSliderProps } from '@blueprintjs/core';
|
|
|
2
2
|
import { RangeSlider } from '@blueprintjs/core';
|
|
3
3
|
import styled from '@emotion/styled';
|
|
4
4
|
import debounce from 'lodash/debounce.js';
|
|
5
|
-
import { useMemo } from 'react';
|
|
6
5
|
import type { CSSProperties } from 'react';
|
|
6
|
+
import { useMemo } from 'react';
|
|
7
7
|
import {
|
|
8
8
|
Controller,
|
|
9
9
|
FormProvider,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { buildID } from '../../../../data/utilities/Concatenation.js';
|
|
2
|
-
import { useAssignment } from '../../../assignment/AssignmentsContext.js';
|
|
3
2
|
import type { Axis } from '../../../assignment/AssignmentsContext.js';
|
|
3
|
+
import { useAssignment } from '../../../assignment/AssignmentsContext.js';
|
|
4
4
|
import { useHighlight } from '../../../highlight/index.js';
|
|
5
5
|
import type { AssignmentsColumnProps } from '../ZonesTableRow.js';
|
|
6
6
|
import type { ZoneData } from '../hooks/useMapZones.js';
|
|
@@ -4,7 +4,7 @@ import { useForm } from 'react-hook-form';
|
|
|
4
4
|
|
|
5
5
|
import { usePreferences } from '../../context/PreferencesContext.js';
|
|
6
6
|
import { ColorPickerDropdownController } from '../../elements/ColorPickerDropdownController.js';
|
|
7
|
-
import {
|
|
7
|
+
import { FormatField, fieldLabelStyle } from '../../elements/FormatField.js';
|
|
8
8
|
import Label from '../../elements/Label.js';
|
|
9
9
|
import { NumberInput2Controller } from '../../elements/NumberInput2Controller.js';
|
|
10
10
|
import { usePanelPreferences } from '../../hooks/usePanelPreferences.js';
|