nmrium 0.58.0 → 0.60.0

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.
Files changed (194) hide show
  1. package/lib/component/1d/LinesSeries.js +17 -5
  2. package/lib/component/1d/Viewer1D.js +10 -4
  3. package/lib/component/1d/integral/IntegralResizable.js +2 -2
  4. package/lib/component/1d/matrix/useMatrix.d.ts +1 -1
  5. package/lib/component/1d/multiAnalysis/AnalysisRange.js +1 -1
  6. package/lib/component/1d/ranges/Atoms.js +6 -4
  7. package/lib/component/1d/ranges/Range.js +4 -2
  8. package/lib/component/1d/tool/PivotIndicator.d.ts +1 -0
  9. package/lib/component/1d/tool/{VerticalIndicator.js → PivotIndicator.js} +8 -4
  10. package/lib/component/1d-2d/tools/BrushXY.js +0 -1
  11. package/lib/component/1d-2d/tools/CrossLinePointer.js +0 -1
  12. package/lib/component/2d/Viewer2D.js +7 -3
  13. package/lib/component/2d/tools/PivotIndicator.d.ts +1 -2
  14. package/lib/component/2d/tools/PivotIndicator.js +2 -3
  15. package/lib/component/2d/zones/Zone.js +2 -2
  16. package/lib/component/EventsTrackers/KeysListenerTracker.js +8 -8
  17. package/lib/component/context/ChartContext.js +12 -1
  18. package/lib/component/context/ShareDataContext.d.ts +1 -1
  19. package/lib/component/context/ShareDataContext.js +2 -4
  20. package/lib/component/context/ToasterContext.d.ts +1 -0
  21. package/lib/component/context/ToasterContext.js +12 -3
  22. package/lib/component/elements/ActionsButtonsPopover.js +1 -3
  23. package/lib/component/elements/Alert.d.ts +20 -0
  24. package/lib/component/elements/Alert.js +80 -0
  25. package/lib/component/elements/ContextMenuBluePrint.d.ts +7 -2
  26. package/lib/component/elements/ContextMenuBluePrint.js +9 -3
  27. package/lib/component/elements/DialogManager.d.ts +34 -0
  28. package/lib/component/elements/DialogManager.js +96 -0
  29. package/lib/component/elements/DraggableDialog.d.ts +13 -0
  30. package/lib/component/elements/DraggableDialog.js +156 -0
  31. package/lib/component/elements/ReactTable/Elements/ReactTableRow.js +1 -1
  32. package/lib/component/elements/ReactTable/ReactTableFlexLayout.d.ts +0 -3
  33. package/lib/component/elements/ReactTable/ReactTableFlexLayout.js +1 -1
  34. package/lib/component/elements/Select2.d.ts +12 -7
  35. package/lib/component/elements/Select2.js +5 -4
  36. package/lib/component/elements/Select2Controller.d.ts +2 -2
  37. package/lib/component/elements/Select2Controller.js +5 -5
  38. package/lib/component/elements/TabTitle.d.ts +9 -0
  39. package/lib/component/elements/TabTitle.js +18 -0
  40. package/lib/component/elements/ToolbarPopoverItem.d.ts +7 -6
  41. package/lib/component/elements/ToolbarPopoverItem.js +13 -5
  42. package/lib/component/elements/print/PrintContent.d.ts +17 -0
  43. package/lib/component/elements/print/PrintContent.js +281 -0
  44. package/lib/component/elements/print/PrintProvider.d.ts +12 -0
  45. package/lib/component/elements/print/PrintProvider.js +28 -0
  46. package/lib/component/elements/print/index.d.ts +2 -0
  47. package/lib/component/elements/print/index.js +2 -0
  48. package/lib/component/header/ApodizationOptionsPanel.js +2 -2
  49. package/lib/component/header/BaseLineCorrectionPanel.js +3 -0
  50. package/lib/component/hooks/useSaveSettings.d.ts +1 -1
  51. package/lib/component/hooks/useSaveSettings.js +18 -22
  52. package/lib/component/hooks/useToggleSpectraVisibility.d.ts +14 -9
  53. package/lib/component/hooks/useToggleSpectraVisibility.js +45 -16
  54. package/lib/component/loader/DropZone.js +3 -67
  55. package/lib/component/loader/useLoadFiles.d.ts +1 -0
  56. package/lib/component/loader/useLoadFiles.js +78 -0
  57. package/lib/component/main/InnerNMRium.d.ts +4 -3
  58. package/lib/component/main/InnerNMRium.js +5 -10
  59. package/lib/component/main/InnerNMRiumContents.d.ts +3 -2
  60. package/lib/component/main/InnerNMRiumContents.js +38 -29
  61. package/lib/component/main/NMRium.d.ts +2 -5
  62. package/lib/component/main/NMRium.js +1 -1
  63. package/lib/component/main/NMRiumRefAPI.d.ts +7 -0
  64. package/lib/component/main/NMRiumRefAPI.js +12 -0
  65. package/lib/component/main/NMRiumViewer.d.ts +10 -0
  66. package/lib/component/main/NMRiumViewer.js +35 -0
  67. package/lib/component/main/index.d.ts +1 -0
  68. package/lib/component/modal/CopyClipboardModal.d.ts +3 -2
  69. package/lib/component/modal/CopyClipboardModal.js +18 -32
  70. package/lib/component/modal/EditPeakShapeModal.d.ts +4 -6
  71. package/lib/component/modal/EditPeakShapeModal.js +45 -33
  72. package/lib/component/modal/ExportAsJcampModal.d.ts +6 -3
  73. package/lib/component/modal/ExportAsJcampModal.js +69 -35
  74. package/lib/component/modal/ImportPublicationStringModal.js +1 -1
  75. package/lib/component/modal/editRange/EditRangeModal.d.ts +2 -10
  76. package/lib/component/modal/editRange/EditRangeModal.js +26 -54
  77. package/lib/component/modal/editZone/EditZoneModal.d.ts +3 -8
  78. package/lib/component/modal/editZone/EditZoneModal.js +74 -91
  79. package/lib/component/modal/editZone/SignalsForm.d.ts +1 -2
  80. package/lib/component/modal/editZone/SignalsForm.js +33 -50
  81. package/lib/component/modal/editZone/validation/isDefaultPathLength.d.ts +1 -2
  82. package/lib/component/modal/editZone/validation/isDefaultPathLength.js +3 -5
  83. package/lib/component/modal/setting/GeneralSettings.js +4 -2
  84. package/lib/component/modal/setting/settings-tabs/ExternalAPIsTabContent.d.ts +1 -0
  85. package/lib/component/modal/setting/settings-tabs/ExternalAPIsTabContent.js +89 -0
  86. package/lib/component/modal/setting/settingsValidation.js +15 -1
  87. package/lib/component/panels/IntegralsPanel/IntegralPanel.js +8 -5
  88. package/lib/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +5 -1
  89. package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +13 -3
  90. package/lib/component/panels/Panels.js +2 -2
  91. package/lib/component/panels/PeaksPanel/PeaksPanel.js +8 -5
  92. package/lib/component/panels/PeaksPanel/PeaksTable.js +7 -13
  93. package/lib/component/panels/RangesPanel/RangesHeader.js +52 -15
  94. package/lib/component/panels/RangesPanel/RangesTable.js +6 -3
  95. package/lib/component/panels/RangesPanel/TableColumns/ActionsColumn.js +21 -3
  96. package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.d.ts +6 -5
  97. package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.js +41 -64
  98. package/lib/component/panels/SpectraPanel/SpectraPanelHeader.js +13 -6
  99. package/lib/component/panels/SpectraPanel/SpectraTable.js +63 -21
  100. package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.d.ts +1 -2
  101. package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +33 -41
  102. package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +68 -53
  103. package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +70 -58
  104. package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditLinkModal.d.ts +13 -8
  105. package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditLinkModal.js +17 -81
  106. package/lib/component/panels/SummaryPanel/SummaryPanel.d.ts +3 -0
  107. package/lib/component/panels/SummaryPanel/SummaryPanel.js +8 -1
  108. package/lib/component/panels/SummaryPanel/utilities/Utilities.js +1 -1
  109. package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +62 -43
  110. package/lib/component/panels/ZonesPanel/ZonesPanel.js +16 -8
  111. package/lib/component/panels/ZonesPanel/ZonesTable.js +4 -1
  112. package/lib/component/panels/ZonesPanel/hooks/useZoneActions.d.ts +5 -0
  113. package/lib/component/panels/ZonesPanel/hooks/useZoneActions.js +40 -0
  114. package/lib/component/panels/databasePanel/DatabasePanel.js +7 -8
  115. package/lib/component/panels/filtersPanel/FilterPanel.js +9 -6
  116. package/lib/component/panels/filtersPanel/FiltersTable.js +12 -10
  117. package/lib/component/panels/header/DefaultPanelHeader.d.ts +1 -0
  118. package/lib/component/panels/header/DefaultPanelHeader.js +2 -2
  119. package/lib/component/panels/multipleAnalysisPanel/AlignSpectra.js +10 -12
  120. package/lib/component/reducer/IgnoreActions.js +1 -0
  121. package/lib/component/reducer/Reducer.js +2 -4
  122. package/lib/component/reducer/actions/DatabaseActions.d.ts +15 -13
  123. package/lib/component/reducer/actions/DatabaseActions.js +52 -34
  124. package/lib/component/reducer/actions/DomainActions.d.ts +2 -2
  125. package/lib/component/reducer/actions/FiltersActions.js +9 -4
  126. package/lib/component/reducer/actions/RangesActions.d.ts +1 -0
  127. package/lib/component/reducer/actions/RangesActions.js +9 -4
  128. package/lib/component/reducer/actions/SpectraActions.d.ts +2 -1
  129. package/lib/component/reducer/actions/SpectraActions.js +53 -43
  130. package/lib/component/reducer/actions/ToolsActions.js +0 -17
  131. package/lib/component/reducer/helper/removeSpectrumRelatedObjectsById.d.ts +3 -0
  132. package/lib/component/reducer/helper/removeSpectrumRelatedObjectsById.js +16 -0
  133. package/lib/component/reducer/preferences/actions/changePrintPageSettings.d.ts +3 -0
  134. package/lib/component/reducer/preferences/actions/changePrintPageSettings.js +6 -0
  135. package/lib/component/reducer/preferences/actions/matrixGeneration.d.ts +0 -4
  136. package/lib/component/reducer/preferences/actions/matrixGeneration.js +1 -2
  137. package/lib/component/reducer/preferences/preferencesReducer.d.ts +3 -2
  138. package/lib/component/reducer/preferences/preferencesReducer.js +4 -1
  139. package/lib/component/toolbar/ToolBar.js +33 -14
  140. package/lib/component/toolbar/ToolTypes.d.ts +1 -1
  141. package/lib/component/toolbar/ToolTypes.js +0 -14
  142. package/lib/component/workspaces/workspaceDefaultProperties.js +2 -0
  143. package/lib/data/SpectraManager.d.ts +7 -10
  144. package/lib/data/SpectraManager.js +51 -30
  145. package/lib/data/data1d/Spectrum1D/SumManager.d.ts +0 -1
  146. package/lib/data/data1d/Spectrum1D/SumManager.js +2 -10
  147. package/lib/data/data1d/Spectrum1D/get1DColor.d.ts +1 -1
  148. package/lib/data/data1d/Spectrum1D/index.d.ts +1 -1
  149. package/lib/data/data1d/Spectrum1D/index.js +1 -1
  150. package/lib/data/data1d/Spectrum1D/ranges/createRange.d.ts +10 -16
  151. package/lib/data/data1d/Spectrum1D/ranges/detectSignals.d.ts +1 -7
  152. package/lib/data/data1d/Spectrum1D/ranges/detectSignals.js +2 -1
  153. package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +10 -16
  154. package/lib/data/data1d/Spectrum1D/ranges/resizeRange.d.ts +10 -16
  155. package/lib/data/data1d/Spectrum1D/ranges/resurrectSpectrum.d.ts +13 -0
  156. package/lib/data/data1d/Spectrum1D/ranges/resurrectSpectrum.js +65 -0
  157. package/lib/data/molecules/MoleculeManager.d.ts +1 -1
  158. package/lib/data/molecules/MoleculeManager.js +21 -49
  159. package/lib/data/utilities/getCustomColor.d.ts +1 -1
  160. package/lib/data/utilities/removeByPaths.d.ts +3 -0
  161. package/lib/data/utilities/removeByPaths.js +33 -0
  162. package/lib/versionInfo.js +1 -1
  163. package/package.json +34 -34
  164. package/lib/component/1d/tool/VerticalIndicator.d.ts +0 -2
  165. package/lib/component/elements/ContextMenu.d.ts +0 -9
  166. package/lib/component/elements/ContextMenu.js +0 -116
  167. package/lib/component/elements/popup/Modal/ConfirmDialog.d.ts +0 -21
  168. package/lib/component/elements/popup/Modal/ConfirmDialog.js +0 -68
  169. package/lib/component/elements/popup/Modal/Context.d.ts +0 -2
  170. package/lib/component/elements/popup/Modal/Context.js +0 -6
  171. package/lib/component/elements/popup/Modal/Modal.d.ts +0 -9
  172. package/lib/component/elements/popup/Modal/Modal.js +0 -42
  173. package/lib/component/elements/popup/Modal/ModalContent.d.ts +0 -6
  174. package/lib/component/elements/popup/Modal/ModalContent.js +0 -27
  175. package/lib/component/elements/popup/Modal/Provider.d.ts +0 -11
  176. package/lib/component/elements/popup/Modal/Provider.js +0 -172
  177. package/lib/component/elements/popup/Modal/index.d.ts +0 -4
  178. package/lib/component/elements/popup/Modal/index.js +0 -4
  179. package/lib/component/elements/popup/Transition.d.ts +0 -14
  180. package/lib/component/elements/popup/Transition.js +0 -35
  181. package/lib/component/elements/popup/Wrapper.d.ts +0 -8
  182. package/lib/component/elements/popup/Wrapper.js +0 -83
  183. package/lib/component/elements/popup/options.d.ts +0 -28
  184. package/lib/component/elements/popup/options.js +0 -25
  185. package/lib/component/elements/popup/utility.d.ts +0 -2
  186. package/lib/component/elements/popup/utility.js +0 -13
  187. package/lib/component/modal/editZone/EditPathLengthFormik.d.ts +0 -5
  188. package/lib/component/modal/editZone/EditPathLengthFormik.js +0 -67
  189. package/lib/component/modal/editZone/SignalFormTab.d.ts +0 -5
  190. package/lib/component/modal/editZone/SignalFormTab.js +0 -6
  191. package/lib/component/modal/editZone/validation/EditZoneValidation.d.ts +0 -14
  192. package/lib/component/modal/editZone/validation/EditZoneValidation.js +0 -14
  193. package/lib/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.d.ts +0 -11
  194. package/lib/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.js +0 -29
@@ -0,0 +1,78 @@
1
+ import { fileCollectionFromFileList } from 'filelist-utils';
2
+ import { read as readDropFiles } from 'nmr-load-save';
3
+ import { useCallback } from 'react';
4
+ import { isMetaFile, parseMetaFile } from '../../data/parseMeta';
5
+ import { useDispatch } from '../context/DispatchContext';
6
+ import { useLogger } from '../context/LoggerContext';
7
+ import { usePreferences } from '../context/PreferencesContext';
8
+ import { useToaster } from '../context/ToasterContext';
9
+ import useCheckExperimentalFeature from '../hooks/useCheckExperimentalFeature';
10
+ export function useLoadFiles(onOpenMetaInformation) {
11
+ const dispatch = useDispatch();
12
+ const { dispatch: dispatchPreferences, current: workspacePreferences } = usePreferences();
13
+ const preferences = usePreferences();
14
+ const toaster = useToaster();
15
+ const { logger } = useLogger();
16
+ const experimentalFeatures = useCheckExperimentalFeature();
17
+ return useCallback((files) => {
18
+ dispatch({ type: 'SET_LOADING_FLAG', payload: { isLoading: true } });
19
+ async function loadFiles(files) {
20
+ if (onOpenMetaInformation &&
21
+ files.length === 1 &&
22
+ isMetaFile(files[0])) {
23
+ onOpenMetaInformation(files[0]);
24
+ }
25
+ else {
26
+ const fileCollection = await fileCollectionFromFileList(files);
27
+ const metaFile = Object.values(fileCollection.files).find((file) => isMetaFile(file));
28
+ let parseMetaFileResult = null;
29
+ if (metaFile) {
30
+ parseMetaFileResult = await parseMetaFile(metaFile);
31
+ }
32
+ const { nmrLoaders: sourceSelector } = preferences.current;
33
+ const { onLoadProcessing, spectraColors } = workspacePreferences;
34
+ const { nmriumState, containsNmrium } = await readDropFiles(fileCollection, {
35
+ sourceSelector,
36
+ logger: logger.child({ context: 'nmr-processing' }),
37
+ onLoadProcessing,
38
+ experimentalFeatures,
39
+ });
40
+ if (nmriumState?.settings) {
41
+ dispatchPreferences({
42
+ type: 'SET_WORKSPACE',
43
+ payload: {
44
+ data: nmriumState.settings,
45
+ workspaceSource: 'nmriumFile',
46
+ },
47
+ });
48
+ }
49
+ dispatch({
50
+ type: 'LOAD_DROP_FILES',
51
+ payload: {
52
+ nmriumState,
53
+ containsNmrium,
54
+ parseMetaFileResult,
55
+ spectraColors,
56
+ },
57
+ });
58
+ }
59
+ }
60
+ loadFiles(files)
61
+ .catch((error) => {
62
+ toaster.show({ message: error.message, intent: 'danger' });
63
+ logger.error(error);
64
+ })
65
+ .finally(() => {
66
+ dispatch({ type: 'SET_LOADING_FLAG', payload: { isLoading: false } });
67
+ });
68
+ }, [
69
+ dispatch,
70
+ dispatchPreferences,
71
+ experimentalFeatures,
72
+ logger,
73
+ onOpenMetaInformation,
74
+ preferences,
75
+ toaster,
76
+ workspacePreferences,
77
+ ]);
78
+ }
@@ -1,7 +1,8 @@
1
1
  import { ForwardedRef } from 'react';
2
- import type { NMRiumProps, NMRiumRef } from './NMRium';
2
+ import type { NMRiumProps } from './NMRium';
3
+ import { NMRiumRefAPI } from './NMRiumRefAPI';
3
4
  type InnerNMRiumProps = Omit<NMRiumProps, 'onError'> & {
4
- innerRef: ForwardedRef<NMRiumRef>;
5
+ apiRef: ForwardedRef<NMRiumRefAPI>;
5
6
  };
6
- export declare function InnerNMRium({ data: nmriumData, workspace, customWorkspaces, preferences, getSpinner, onChange, emptyText, innerRef, }: InnerNMRiumProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function InnerNMRium({ data: nmriumData, workspace, customWorkspaces, preferences, getSpinner, onChange, emptyText, apiRef, }: InnerNMRiumProps): import("react/jsx-runtime").JSX.Element;
7
8
  export {};
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useEffect, useReducer, useRef, useImperativeHandle, } from 'react';
2
+ import { useEffect, useReducer, useRef } from 'react';
3
3
  import { useFullscreen } from 'react-science/ui';
4
4
  import { AssignmentProvider } from '../assignment';
5
5
  import { GlobalProvider } from '../context/GlobalContext';
@@ -8,14 +8,14 @@ import { LoggerProvider } from '../context/LoggerContext';
8
8
  import { PreferencesProvider } from '../context/PreferencesContext';
9
9
  import { ToasterProvider } from '../context/ToasterContext';
10
10
  import { TopicMoleculeProvider } from '../context/TopicMoleculeContext';
11
- import { ModalProvider } from '../elements/popup/Modal';
11
+ import { AlertProvider } from '../elements/Alert';
12
+ import { DialogProvider } from '../elements/DialogManager';
12
13
  import { HighlightProvider } from '../highlight';
13
14
  import { defaultGetSpinner, SpinnerProvider } from '../loader/SpinnerContext';
14
15
  import preferencesReducer, { preferencesInitialState, initPreferencesState, readSettings, } from '../reducer/preferences/preferencesReducer';
15
- import { getBlob } from '../utility/export';
16
16
  import { InnerNMRiumContents } from './InnerNMRiumContents';
17
17
  import NMRiumStateProvider from './NMRiumStateProvider';
18
- export function InnerNMRium({ data: nmriumData, workspace, customWorkspaces, preferences, getSpinner = defaultGetSpinner, onChange, emptyText, innerRef, }) {
18
+ export function InnerNMRium({ data: nmriumData, workspace, customWorkspaces, preferences, getSpinner = defaultGetSpinner, onChange, emptyText, apiRef, }) {
19
19
  const rootRef = useRef(null);
20
20
  const elementsWrapperRef = useRef(null);
21
21
  const viewerRef = useRef(null);
@@ -38,14 +38,9 @@ export function InnerNMRium({ data: nmriumData, workspace, customWorkspaces, pre
38
38
  },
39
39
  });
40
40
  }, [customWorkspaces, preferences, workspace]);
41
- useImperativeHandle(innerRef, () => ({
42
- getSpectraViewerAsBlob: () => {
43
- return rootRef?.current ? getBlob(rootRef.current, 'nmrSVG') : null;
44
- },
45
- }), []);
46
41
  return (_jsx("div", { ref: mainDivRef, style: { height: '100%', position: 'relative' }, translate: "no", children: _jsx(GlobalProvider, { value: {
47
42
  rootRef: rootRef.current,
48
43
  elementsWrapperRef: elementsWrapperRef.current,
49
44
  viewerRef: viewerRef.current,
50
- }, children: _jsx(PreferencesProvider, { value: preferencesState, children: _jsx(LoggerProvider, { children: _jsx(KeyModifiersProvider, { children: _jsx(ToasterProvider, { children: _jsx(NMRiumStateProvider, { onChange: onChange, nmriumData: nmriumData, children: _jsx(TopicMoleculeProvider, { children: _jsx(ModalProvider, { wrapperRef: elementsWrapperRef.current, children: _jsx(HighlightProvider, { children: _jsx(AssignmentProvider, { children: _jsx(SpinnerProvider, { value: getSpinner, children: _jsx(InnerNMRiumContents, { emptyText: emptyText, mainDivRef: mainDivRef, elementsWrapperRef: elementsWrapperRef, rootRef: rootRef, viewerRef: viewerRef }) }) }) }) }) }) }) }) }) }) }) }) }));
45
+ }, children: _jsx(PreferencesProvider, { value: preferencesState, children: _jsx(LoggerProvider, { children: _jsx(KeyModifiersProvider, { children: _jsx(ToasterProvider, { children: _jsx(NMRiumStateProvider, { onChange: onChange, nmriumData: nmriumData, children: _jsx(TopicMoleculeProvider, { children: _jsx(DialogProvider, { children: _jsx(AlertProvider, { children: _jsx(HighlightProvider, { children: _jsx(AssignmentProvider, { children: _jsx(SpinnerProvider, { value: getSpinner, children: _jsx(InnerNMRiumContents, { emptyText: emptyText, mainDivRef: mainDivRef, elementsWrapperRef: elementsWrapperRef, rootRef: rootRef, viewerRef: viewerRef, apiRef: apiRef }) }) }) }) }) }) }) }) }) }) }) }) }) }));
51
46
  }
@@ -1,12 +1,13 @@
1
1
  /** @jsxImportSource @emotion/react */
2
- import { RefObject } from 'react';
3
- import { NMRiumProps } from '.';
2
+ import { ForwardedRef, RefObject } from 'react';
3
+ import { NMRiumProps, NMRiumRefAPI } from '.';
4
4
  interface InnerNMRiumContentsProps {
5
5
  emptyText: NMRiumProps['emptyText'];
6
6
  mainDivRef: RefObject<HTMLDivElement>;
7
7
  elementsWrapperRef: RefObject<HTMLDivElement>;
8
8
  rootRef: RefObject<HTMLDivElement>;
9
9
  viewerRef: RefObject<HTMLDivElement>;
10
+ apiRef: ForwardedRef<NMRiumRefAPI>;
10
11
  }
11
12
  export declare function InnerNMRiumContents(props: InnerNMRiumContentsProps): import("@emotion/react/jsx-runtime").JSX.Element;
12
13
  export {};
@@ -1,18 +1,18 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@emotion/react/jsx-runtime";
2
2
  /** @jsxImportSource @emotion/react */
3
3
  import { Global, css } from '@emotion/react';
4
- import { useCallback } from 'react';
4
+ import { useCallback, } from 'react';
5
5
  import { useFullscreen } from 'react-science/ui';
6
6
  import checkModifierKeyActivated from '../../data/utilities/checkModifierKeyActivated';
7
- import Viewer1D from '../1d/Viewer1D';
8
- import FloatMoleculeStructures from '../1d-2d/components/FloatMoleculeStructures';
9
- import Viewer2D from '../2d/Viewer2D';
10
7
  import KeysListenerTracker from '../EventsTrackers/KeysListenerTracker';
11
- import { useChartData } from '../context/ChartContext';
8
+ import { usePreferences } from '../context/PreferencesContext';
9
+ import { PrintContent } from '../elements/print/PrintContent';
12
10
  import Header from '../header/Header';
13
11
  import DropZone from '../loader/DropZone';
14
12
  import Panels from '../panels/Panels';
15
13
  import ToolBar from '../toolbar/ToolBar';
14
+ import { useNMRiumRefAPI } from './NMRiumRefAPI';
15
+ import { NMRiumViewer } from './NMRiumViewer';
16
16
  import { SplitPaneWrapper } from './SplitPaneWrapper';
17
17
  import { StateError } from './StateError';
18
18
  const viewerContainerStyle = css `
@@ -63,40 +63,49 @@ const containerStyles = css `
63
63
  }
64
64
  `;
65
65
  export function InnerNMRiumContents(props) {
66
- const { emptyText, mainDivRef, elementsWrapperRef, rootRef, viewerRef } = props;
67
- const { displayerMode } = useChartData();
66
+ const { emptyText, mainDivRef, elementsWrapperRef, rootRef, viewerRef, apiRef, } = props;
68
67
  const { isFullScreen } = useFullscreen();
69
68
  const preventContextMenuHandler = useCallback((e) => {
70
69
  if (!checkModifierKeyActivated(e)) {
71
70
  e.preventDefault();
72
71
  }
73
72
  }, []);
73
+ useNMRiumRefAPI(apiRef, rootRef);
74
74
  return (_jsxs(_Fragment, { children: [_jsx(StateError, {}), _jsx(Global, { styles: css `
75
75
  .actions-buttons-popover {
76
76
  border-radius: 10px;
77
77
  padding: 5px;
78
78
  background-color: white;
79
79
  }
80
- ` }), _jsx("div", { className: "nmrium-container", ref: rootRef, css: containerStyles, onContextMenu: preventContextMenuHandler, style: { height: '100%', width: '100%' }, children: _jsx(DropZone, { children: _jsxs("div", { style: {
81
- display: 'flex',
82
- flexDirection: 'column',
83
- backgroundColor: 'white',
84
- width: '100%',
85
- }, children: [_jsx(Header, {}), _jsxs("div", { style: {
86
- display: 'flex',
87
- flexDirection: 'row',
88
- height: '100%',
89
- }, children: [_jsx(ToolBar, {}), _jsxs(SplitPaneWrapper, { children: [_jsxs("div", { css: viewerContainerStyle, children: [_jsx(KeysListenerTracker, { mainDivRef: mainDivRef }), _jsxs("div", { id: "nmrium-viewer", "data-testid": "viewer", ref: viewerRef, style: {
90
- width: '100%',
91
- height: '100%',
92
- position: 'relative',
93
- }, children: [_jsx(FloatMoleculeStructures, {}), displayerMode === '1D' ? (_jsx(Viewer1D, { emptyText: emptyText })) : (_jsx(Viewer2D, { emptyText: emptyText }))] })] }), _jsx(Panels, {})] }), _jsx("div", { ref: elementsWrapperRef, id: "main-wrapper", style: {
94
- position: 'absolute',
95
- pointerEvents: 'none',
96
- zIndex: 10,
97
- left: 0,
98
- right: 0,
99
- top: 0,
100
- bottom: 0,
101
- } }, String(isFullScreen))] })] }) }) })] }));
80
+
81
+ .popover-tab {
82
+ background-color: transparent;
83
+ box-shadow: none;
84
+ }
85
+ ` }), _jsxs("div", { className: "nmrium-container", ref: rootRef, css: containerStyles, onContextMenu: preventContextMenuHandler, style: { height: '100%', width: '100%' }, children: [_jsx(DropZone, { children: _jsxs("div", { style: {
86
+ display: 'flex',
87
+ flexDirection: 'column',
88
+ backgroundColor: 'white',
89
+ width: '100%',
90
+ }, children: [_jsx(Header, {}), _jsxs("div", { style: {
91
+ display: 'flex',
92
+ flexDirection: 'row',
93
+ height: '100%',
94
+ }, children: [_jsx(ToolBar, {}), _jsxs(SplitPaneWrapper, { children: [_jsxs("div", { css: viewerContainerStyle, children: [_jsx(KeysListenerTracker, { mainDivRef: mainDivRef }), _jsx(NMRiumViewer, { emptyText: emptyText, viewerRef: viewerRef })] }), _jsx(Panels, {})] }), _jsx("div", { ref: elementsWrapperRef, id: "main-wrapper", style: {
95
+ position: 'absolute',
96
+ pointerEvents: 'none',
97
+ zIndex: 10,
98
+ left: 0,
99
+ right: 0,
100
+ top: 0,
101
+ bottom: 0,
102
+ } }, String(isFullScreen))] })] }) }), _jsx("div", {}), _jsx(PrintWrapper, { children: _jsx(NMRiumViewer, { emptyText: emptyText, viewerRef: viewerRef }) })] })] }));
103
+ }
104
+ function PrintWrapper(props) {
105
+ const { children } = props;
106
+ const { current: { printPageOptions }, dispatch, } = usePreferences();
107
+ function handleSavePrintOptions(options) {
108
+ dispatch({ type: 'CHANGE_PRINT_PAGE_SETTINGS', payload: options });
109
+ }
110
+ return (_jsx(PrintContent, { defaultPrintPageOptions: printPageOptions, onPrint: handleSavePrintOptions, children: children }));
102
111
  }
@@ -1,7 +1,7 @@
1
1
  import type { CustomWorkspaces, WorkspacePreferences as NMRiumPreferences } from 'nmr-load-save';
2
2
  import { ReactElement, ReactNode } from 'react';
3
3
  import { ErrorBoundaryPropsWithComponent } from 'react-error-boundary';
4
- import { BlobObject } from '../utility/export';
4
+ import { NMRiumRefAPI } from './NMRiumRefAPI';
5
5
  import { NMRiumChangeCb, NMRiumData, NMRiumWorkspace } from './types';
6
6
  export interface NMRiumProps {
7
7
  data?: NMRiumData;
@@ -17,7 +17,4 @@ export interface NMRiumProps {
17
17
  */
18
18
  getSpinner?: () => ReactElement;
19
19
  }
20
- export interface NMRiumRef {
21
- getSpectraViewerAsBlob: () => BlobObject | null;
22
- }
23
- export declare const NMRium: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<NMRiumProps & import("react").RefAttributes<NMRiumRef>>>;
20
+ export declare const NMRium: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<NMRiumProps & import("react").RefAttributes<NMRiumRefAPI>>>;
@@ -6,7 +6,7 @@ import ErrorOverlay from './ErrorOverlay';
6
6
  import { InnerNMRium } from './InnerNMRium';
7
7
  const NMRiumBase = forwardRef(function NMRium(props, ref) {
8
8
  const { noErrorBoundary = false, onError, ...otherProps } = props;
9
- const innerNmrium = _jsx(InnerNMRium, { ...otherProps, innerRef: ref });
9
+ const innerNmrium = _jsx(InnerNMRium, { ...otherProps, apiRef: ref });
10
10
  const children = noErrorBoundary ? (innerNmrium) : (_jsx(ErrorBoundary, { FallbackComponent: ErrorOverlay, onError: onError, children: innerNmrium }));
11
11
  return (_jsx(FullScreenProvider, { children: _jsx(RootLayout, { style: { width: '100%' }, children: children }) }));
12
12
  });
@@ -0,0 +1,7 @@
1
+ import { ForwardedRef, RefObject } from 'react';
2
+ import { BlobObject } from '../utility/export';
3
+ export interface NMRiumRefAPI {
4
+ getSpectraViewerAsBlob: () => BlobObject | null;
5
+ loadFiles: (files: File[]) => void;
6
+ }
7
+ export declare function useNMRiumRefAPI(ref: ForwardedRef<NMRiumRefAPI>, rootRef: RefObject<HTMLDivElement>): void;
@@ -0,0 +1,12 @@
1
+ import { useImperativeHandle } from 'react';
2
+ import { useLoadFiles } from '../loader/useLoadFiles';
3
+ import { getBlob } from '../utility/export';
4
+ export function useNMRiumRefAPI(ref, rootRef) {
5
+ const loadFiles = useLoadFiles();
6
+ useImperativeHandle(ref, () => ({
7
+ getSpectraViewerAsBlob: () => {
8
+ return rootRef.current ? getBlob(rootRef.current, 'nmrSVG') : null;
9
+ },
10
+ loadFiles,
11
+ }), [rootRef, loadFiles]);
12
+ }
@@ -0,0 +1,10 @@
1
+ import { CSSProperties, RefObject } from 'react';
2
+ import { NMRiumProps } from './NMRium';
3
+ interface NMRiumViewerProps {
4
+ emptyText: NMRiumProps['emptyText'];
5
+ viewerRef: RefObject<HTMLDivElement>;
6
+ style?: CSSProperties;
7
+ onRender?: () => void;
8
+ }
9
+ export declare function NMRiumViewer(props: NMRiumViewerProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,35 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useDeferredValue, useEffect } from 'react';
3
+ import Viewer1D from '../1d/Viewer1D';
4
+ import FloatMoleculeStructures from '../1d-2d/components/FloatMoleculeStructures';
5
+ import Viewer2D from '../2d/Viewer2D';
6
+ import { useChartData } from '../context/ChartContext';
7
+ export function NMRiumViewer(props) {
8
+ const { emptyText, viewerRef, onRender, style = {} } = props;
9
+ const { displayerMode, width, height } = useChartData();
10
+ const renderDimension = useDeferredValue({ width, height });
11
+ useEffect(() => {
12
+ function handleRenderComplete() {
13
+ if (typeof onRender !== 'function') {
14
+ return;
15
+ }
16
+ setTimeout(() => {
17
+ if (renderDimension.width !== width ||
18
+ renderDimension.height !== height) {
19
+ onRender();
20
+ }
21
+ }, 0);
22
+ }
23
+ const animationFrameId = requestAnimationFrame(handleRenderComplete);
24
+ return () => {
25
+ cancelAnimationFrame(animationFrameId);
26
+ };
27
+ }, [onRender, width, height, renderDimension.width, renderDimension.height]);
28
+ return (_jsxs("div", { id: "nmrium-viewer", "data-testid": "viewer", ref: viewerRef, style: {
29
+ width: '100%',
30
+ height: '100%',
31
+ position: 'relative',
32
+ backgroundColor: 'white',
33
+ ...style,
34
+ }, children: [_jsx(FloatMoleculeStructures, {}), displayerMode === '1D' ? (_jsx(Viewer1D, { emptyText: emptyText })) : (_jsx(Viewer2D, { emptyText: emptyText }))] }));
35
+ }
@@ -1,3 +1,4 @@
1
1
  export * from './types';
2
2
  export { serializeNmriumState as serializeNMRiumState } from 'nmr-load-save';
3
3
  export * from './NMRium';
4
+ export type { NMRiumRefAPI } from './NMRiumRefAPI';
@@ -1,7 +1,8 @@
1
1
  interface CopyClipboardModalProps {
2
- text: string;
2
+ text?: string;
3
+ title: string;
3
4
  onClose: () => void;
4
5
  onCopyClick: (text: string) => void;
5
6
  }
6
- declare function CopyClipboardModal({ text, onClose, onCopyClick, }: CopyClipboardModalProps): import("@emotion/react/jsx-runtime").JSX.Element;
7
+ declare function CopyClipboardModal(props: CopyClipboardModalProps): import("@emotion/react/jsx-runtime").JSX.Element | undefined;
7
8
  export default CopyClipboardModal;
@@ -1,39 +1,25 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
2
2
  /** @jsxImportSource @emotion/react */
3
+ import { Button, Dialog, DialogBody, DialogFooter } from '@blueprintjs/core';
3
4
  import { css } from '@emotion/react';
5
+ import styled from '@emotion/styled';
4
6
  import { FaCopy } from 'react-icons/fa';
5
- import { CloseButton } from '../elements/CloseButton';
6
- const styles = css `
7
- overflow: auto;
8
- width: 400px;
9
-
10
- .inner-container {
11
- padding: 5px;
12
- width: 100%;
13
- height: 180px;
14
- border: none;
15
- }
16
-
17
- .main-buttons-container {
18
- padding: 5px 0;
19
- border-bottom: 0.55px solid #ebebeb;
20
- display: flex;
21
- justify-content: space-between;
22
- }
23
-
24
- button {
25
- background-color: transparent;
26
- border: none;
27
- padding: 0 5px;
28
- }
29
-
30
- button:disabled {
31
- opacity: 0.6;
32
- }
7
+ const Body = styled.div `
8
+ padding: 5px;
9
+ width: 100%;
10
+ height: 180px;
11
+ border: none;
33
12
  `;
34
- function CopyClipboardModal({ text, onClose, onCopyClick, }) {
35
- return (_jsxs("div", { css: styles, children: [_jsxs("div", { className: "main-buttons-container handle", children: [_jsx("button", { type: "button", onClick: () => onCopyClick(text), children: _jsx(FaCopy, {}) }), _jsx(CloseButton, { tooltip: "Close", onClick: onClose })] }), _jsx("div", { className: "inner-container",
36
- // eslint-disable-next-line react/no-danger
37
- dangerouslySetInnerHTML: { __html: text } })] }));
13
+ function CopyClipboardModal(props) {
14
+ const { text, ...otherProps } = props;
15
+ if (!text)
16
+ return;
17
+ return _jsx(InnerCopyClipboardModal, { text: text, ...otherProps });
18
+ }
19
+ function InnerCopyClipboardModal(props) {
20
+ const { text, title, onClose, onCopyClick } = props;
21
+ return (_jsxs(Dialog, { isOpen: true, title: title, onClose: onClose, children: [_jsx(DialogBody, { css: css `
22
+ background-color: white;
23
+ `, children: _jsx(Body, { dangerouslySetInnerHTML: { __html: text } }) }), _jsx(DialogFooter, { children: _jsx(Button, { onClick: () => onCopyClick(text), intent: "success", icon: _jsx(FaCopy, {}) }) })] }));
38
24
  }
39
25
  export default CopyClipboardModal;
@@ -1,9 +1,7 @@
1
- import { PeaksNucleusPreferences } from 'nmr-load-save';
2
1
  import { Peak1D } from 'nmr-processing';
3
2
  interface EditPeakShapeModalProps {
4
- onClose?: (element?: string) => void;
5
- peak: Peak1D;
6
- peaksPreferences: PeaksNucleusPreferences;
3
+ onCloseDialog: () => void;
4
+ peak?: Peak1D;
7
5
  }
8
- declare function EditPeakShapeModal({ onClose, peak, peaksPreferences, }: EditPeakShapeModalProps): import("@emotion/react/jsx-runtime").JSX.Element;
9
- export default EditPeakShapeModal;
6
+ export declare function EditPeakShapeModal(props: EditPeakShapeModalProps): import("@emotion/react/jsx-runtime").JSX.Element | undefined;
7
+ export {};
@@ -1,33 +1,27 @@
1
- import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "@emotion/react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
2
2
  /** @jsxImportSource @emotion/react */
3
+ import { Dialog, DialogBody, DialogFooter } from '@blueprintjs/core';
3
4
  import { css } from '@emotion/react';
4
- import { Formik } from 'formik';
5
- import { useCallback, useRef, useState } from 'react';
5
+ import { yupResolver } from '@hookform/resolvers/yup';
6
+ import { useState } from 'react';
7
+ import { useForm } from 'react-hook-form';
6
8
  import * as Yup from 'yup';
9
+ import { useChartData } from '../context/ChartContext';
7
10
  import { useDispatch } from '../context/DispatchContext';
8
11
  import ActionButtons from '../elements/ActionButtons';
9
- import { CloseButton } from '../elements/CloseButton';
10
12
  import Label from '../elements/Label';
11
- import Select from '../elements/Select';
12
- import FormikInput from '../elements/formik/FormikInput';
13
+ import { NumberInput2Controller } from '../elements/NumberInput2Controller';
14
+ import { Select2 } from '../elements/Select2';
15
+ import { usePanelPreferences } from '../hooks/usePanelPreferences';
13
16
  import { formatNumber } from '../utility/formatNumber';
14
- import { ModalStyles } from './ModalStyle';
15
- const styles = css `
16
- width: 400px;
17
- min-height: 250px;
18
-
19
- .inner-content {
20
- flex: 1;
21
- }
22
- `;
23
- const getKindDefaultValues = (kind) => {
17
+ function getKindDefaultValues(kind) {
24
18
  return {
25
19
  kind,
26
20
  fwhm: 500,
27
21
  ...(kind === 'pseudoVoigt' && { mu: 0.5 }),
28
22
  };
29
- };
30
- const getValues = (peak, kind) => {
23
+ }
24
+ function getValues(peak, kind) {
31
25
  const { shape } = peak;
32
26
  const shapeData = (shape?.kind || '').toLocaleLowerCase() !== kind
33
27
  ? {
@@ -36,11 +30,13 @@ const getValues = (peak, kind) => {
36
30
  }
37
31
  : shape;
38
32
  return shapeData;
39
- };
40
- const validation = (kind) => Yup.object().shape({
41
- fwhm: Yup.number().required(),
42
- ...(kind === 'pseudoVoigt' && { mu: Yup.number().required() }),
43
- });
33
+ }
34
+ function validation(kind) {
35
+ return Yup.object().shape({
36
+ fwhm: Yup.number().required(),
37
+ ...(kind === 'pseudoVoigt' && { mu: Yup.number().required() }),
38
+ });
39
+ }
44
40
  const KINDS = [
45
41
  {
46
42
  value: 'gaussian',
@@ -60,12 +56,23 @@ const labelStyle = {
60
56
  label: { flex: 3, fontSize: '14px', fontWeight: 'normal' },
61
57
  wrapper: { flex: 7, display: 'flex' },
62
58
  };
63
- const inputStyle = { input: { width: '200px', textAlign: 'left' } };
64
- function EditPeakShapeModal({ onClose = () => null, peak, peaksPreferences, }) {
59
+ export function EditPeakShapeModal(props) {
60
+ const { peak, ...otherProps } = props;
61
+ if (!peak)
62
+ return;
63
+ return _jsx(InnerEditPeakShapeModal, { peak: peak, ...otherProps });
64
+ }
65
+ function InnerEditPeakShapeModal(props) {
66
+ const { peak, onCloseDialog } = props;
65
67
  const dispatch = useDispatch();
66
- const refForm = useRef();
67
- const [kind, setKind] = useState(peak.shape?.kind);
68
- const changePeakShapeHandler = useCallback((values) => {
68
+ const { view: { spectra: { activeTab }, }, } = useChartData();
69
+ const peaksPreferences = usePanelPreferences('peaks', activeTab);
70
+ const [kind, setKind] = useState(peak.shape?.kind || 'gaussian');
71
+ const { handleSubmit, control, reset } = useForm({
72
+ defaultValues: getValues(peak, kind),
73
+ resolver: yupResolver(validation(kind)),
74
+ });
75
+ function changePeakShapeHandler(values) {
69
76
  dispatch({
70
77
  type: 'CHANGE_PEAK_SHAPE',
71
78
  payload: {
@@ -75,10 +82,15 @@ function EditPeakShapeModal({ onClose = () => null, peak, peaksPreferences, }) {
75
82
  },
76
83
  },
77
84
  });
78
- onClose();
79
- }, [dispatch, onClose, peak.id]);
80
- const values = getValues(peak, kind);
85
+ onCloseDialog();
86
+ }
87
+ function handleChangeKind({ value }) {
88
+ reset(getValues(peak, value));
89
+ setKind(value);
90
+ }
81
91
  const valuePPM = formatNumber(peak.x, peaksPreferences.deltaPPM.format);
82
- return (_jsxs("div", { css: [ModalStyles, styles], children: [_jsxs("div", { className: "header handle", children: [_jsxs("span", { children: [`Peak Shape Edition ( ${valuePPM} PPM)`, " "] }), _jsx(CloseButton, { tooltip: "Close", onClick: () => onClose?.(), className: "close-bt" })] }), _jsx("div", { className: "inner-content", children: _jsx(Formik, { enableReinitialize: true, innerRef: refForm, initialValues: values, validationSchema: validation(kind), onSubmit: changePeakShapeHandler, children: _jsxs(_Fragment, { children: [_jsx(Label, { title: "Kind:", style: labelStyle, children: _jsx(Select, { items: KINDS, style: { margin: 0, height: 30 }, value: kind, onChange: (kind) => setKind(kind) }) }), _jsx(Label, { title: "FWHM:", style: labelStyle, children: _jsx(FormikInput, { name: "fwhm", style: inputStyle }) }), kind === 'pseudoVoigt' && (_jsx(Label, { title: "Mu:", style: labelStyle, children: _jsx(FormikInput, { name: "mu", style: inputStyle }) }))] }) }) }), _jsx("div", { className: "footer-container", children: _jsx(ActionButtons, { style: { flexDirection: 'row-reverse', margin: 0 }, onDone: () => refForm.current.submitForm(), doneLabel: "Save", onCancel: () => onClose?.() }) })] }));
92
+ return (_jsxs(Dialog, { isOpen: true, style: { width: 400 }, onClose: onCloseDialog, title: `Peak Shape Edition ( ${valuePPM} PPM )`, children: [_jsx(DialogBody, { css: css `
93
+ background-color: white;
94
+ padding: 1.5em 3em;
95
+ `, children: _jsxs(_Fragment, { children: [_jsx(Label, { title: "Kind:", style: labelStyle, children: _jsx(Select2, { items: KINDS, selectedItemValue: kind, onItemSelect: handleChangeKind }) }), _jsx(Label, { title: "FWHM:", style: labelStyle, children: _jsx(NumberInput2Controller, { min: 0, control: control, name: "fwhm" }) }), kind === 'pseudoVoigt' && (_jsx(Label, { title: "Mu:", style: labelStyle, children: _jsx(NumberInput2Controller, { min: 0, control: control, name: "mu" }) }))] }) }), _jsx(DialogFooter, { children: _jsx(ActionButtons, { style: { flexDirection: 'row-reverse', margin: 0 }, onDone: () => handleSubmit(changePeakShapeHandler)(), doneLabel: "Save", onCancel: () => onCloseDialog?.() }) })] }));
83
96
  }
84
- export default EditPeakShapeModal;
@@ -1,7 +1,10 @@
1
1
  import { Spectrum } from 'nmr-load-save';
2
- interface ExportAsJCAMPProps {
2
+ interface InnerExportAsJCAMPProps {
3
3
  closeDialog: () => void;
4
- spectrum: Spectrum;
4
+ spectrum?: Spectrum;
5
5
  }
6
- declare function ExportAsJcampModal(props: ExportAsJCAMPProps): import("@emotion/react/jsx-runtime").JSX.Element;
6
+ interface ExportAsJCAMPProps extends InnerExportAsJCAMPProps {
7
+ exportActiveSpectrum?: boolean;
8
+ }
9
+ declare function ExportAsJcampModal(props: ExportAsJCAMPProps): import("@emotion/react/jsx-runtime").JSX.Element | null;
7
10
  export default ExportAsJcampModal;