nmrium 0.20.2 → 0.23.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 (253) hide show
  1. package/lib/component/1d/ExclusionZonesAnnotations.js +1 -2
  2. package/lib/component/1d/FooterBanner.js +1 -1
  3. package/lib/component/1d/Integral.js +1 -6
  4. package/lib/component/1d/Viewer1D.js +4 -4
  5. package/lib/component/1d/ranges/RangeIntegral.js +2 -6
  6. package/lib/component/1d/utilities/scale.d.ts +1 -1
  7. package/lib/component/1d/utilities/scale.js +7 -6
  8. package/lib/component/2d/Viewer2D.js +5 -5
  9. package/lib/component/EventsTrackers/KeysListenerTracker.js +98 -81
  10. package/lib/component/NMRium.d.ts +10 -6
  11. package/lib/component/NMRium.js +3 -9
  12. package/lib/component/elements/EditableColumn.d.ts +1 -1
  13. package/lib/component/header/Header.js +13 -10
  14. package/lib/component/hooks/useCheckExperimentalFeature.js +2 -1
  15. package/lib/component/hooks/useCheckToolsVisibility.d.ts +1 -0
  16. package/lib/component/hooks/useCheckToolsVisibility.js +6 -0
  17. package/lib/component/{1d/utilities → hooks}/useIntegralPath.d.ts +0 -0
  18. package/lib/component/hooks/useIntegralPath.js +53 -0
  19. package/lib/component/hooks/useToolsFunctions.js +6 -6
  20. package/lib/component/hooks/useXScale.d.ts +2 -0
  21. package/lib/component/hooks/useXScale.js +7 -0
  22. package/lib/component/loader/DropZone.js +87 -87
  23. package/lib/component/modal/PredictSpectraModal.d.ts +0 -28
  24. package/lib/component/modal/PredictSpectraModal.js +2 -32
  25. package/lib/component/modal/changeSum/ChangeSumModal.js +4 -2
  26. package/lib/component/modal/editRange/forms/validation/EditRangeValidation.js +1 -1
  27. package/lib/component/modal/editZone/EditPathLengthFormik.d.ts +5 -0
  28. package/lib/component/modal/editZone/EditPathLengthFormik.js +72 -0
  29. package/lib/component/modal/editZone/EditZoneModal.d.ts +8 -0
  30. package/lib/component/modal/editZone/EditZoneModal.js +96 -0
  31. package/lib/component/modal/editZone/SignalFormTab.d.ts +6 -0
  32. package/lib/component/modal/editZone/SignalFormTab.js +6 -0
  33. package/lib/component/modal/editZone/SignalsForm.d.ts +2 -0
  34. package/lib/component/modal/editZone/SignalsForm.js +62 -0
  35. package/lib/component/modal/editZone/validation/EditZoneValidation.d.ts +534 -0
  36. package/lib/component/modal/editZone/validation/EditZoneValidation.js +17 -0
  37. package/lib/component/modal/editZone/validation/isDefaultPathLength.d.ts +3 -0
  38. package/lib/component/modal/editZone/validation/isDefaultPathLength.js +7 -0
  39. package/lib/component/modal/setting/ControllersTabContent.js +1 -1
  40. package/lib/component/modal/setting/DisplayTabContent.js +5 -1
  41. package/lib/component/modal/setting/GeneralSettings.d.ts +1 -2
  42. package/lib/component/modal/setting/GeneralSettings.js +13 -9
  43. package/lib/component/panels/AutomaticAssignment/AutomaticAssignment.d.ts +2 -0
  44. package/lib/component/panels/AutomaticAssignment/AutomaticAssignment.js +13 -0
  45. package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.d.ts +7 -0
  46. package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +38 -0
  47. package/lib/component/panels/IntegralsPanel/IntegralPanel.js +0 -3
  48. package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +4 -17
  49. package/lib/component/panels/MoleculesPanel/MoleculePanel.d.ts +10 -1
  50. package/lib/component/panels/MoleculesPanel/MoleculePanel.js +27 -17
  51. package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts +9 -1
  52. package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +2 -2
  53. package/lib/component/panels/Panels.d.ts +1 -1
  54. package/lib/component/panels/Panels.js +17 -14
  55. package/lib/component/panels/PeaksPanel/PeaksPanel.js +0 -3
  56. package/lib/component/panels/PeaksPanel/PeaksPreferences.js +5 -14
  57. package/lib/component/panels/RangesPanel/RangesPanel.js +2 -5
  58. package/lib/component/panels/RangesPanel/RangesPreferences.js +5 -18
  59. package/lib/component/panels/SpectrumsPanel/SpectraPanelHeader.js +13 -3
  60. package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +7 -2
  61. package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +7 -2
  62. package/lib/component/panels/SummaryPanel/CorrelationTable/Constants.d.ts +1 -6
  63. package/lib/component/panels/SummaryPanel/CorrelationTable/Constants.js +1 -7
  64. package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.d.ts +2 -3
  65. package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.js +4 -5
  66. package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.d.ts +2 -3
  67. package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +21 -25
  68. package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditLinkModal.js +24 -30
  69. package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.d.ts +8 -0
  70. package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.js +89 -0
  71. package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.d.ts +1 -1
  72. package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +1 -1
  73. package/lib/component/panels/SummaryPanel/SummaryPanel.js +39 -42
  74. package/lib/component/panels/SummaryPanel/utilities/IsInView.d.ts +6 -0
  75. package/lib/component/panels/SummaryPanel/utilities/IsInView.js +16 -0
  76. package/lib/component/panels/SummaryPanel/utilities/Utilities.d.ts +29 -0
  77. package/lib/component/panels/SummaryPanel/{Utilities.js → utilities/Utilities.js} +155 -19
  78. package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.d.ts +1 -0
  79. package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +26 -3
  80. package/lib/component/panels/ZonesPanel/ZonesPanel.js +12 -7
  81. package/lib/component/panels/ZonesPanel/ZonesPreferences.js +5 -18
  82. package/lib/component/panels/ZonesPanel/ZonesTable.d.ts +3 -2
  83. package/lib/component/panels/ZonesPanel/ZonesTable.js +5 -2
  84. package/lib/component/panels/databasePanel/DatabasePanel.js +0 -3
  85. package/lib/component/panels/databasePanel/DatabasePreferences.js +4 -17
  86. package/lib/component/panels/predictionPanel/PredictionOptions.d.ts +6 -0
  87. package/lib/component/panels/predictionPanel/PredictionOptions.js +88 -0
  88. package/lib/component/panels/predictionPanel/PredictionPanel.d.ts +2 -0
  89. package/lib/component/panels/predictionPanel/PredictionPanel.js +33 -0
  90. package/lib/component/reducer/IgnoreActions.js +2 -1
  91. package/lib/component/reducer/Reducer.d.ts +9 -23
  92. package/lib/component/reducer/Reducer.js +7 -8
  93. package/lib/component/reducer/actions/DatabaseActions.js +1 -1
  94. package/lib/component/reducer/actions/DomainActions.d.ts +3 -1
  95. package/lib/component/reducer/actions/DomainActions.js +20 -1
  96. package/lib/component/reducer/actions/IntegralsActions.js +2 -0
  97. package/lib/component/reducer/actions/LoadActions.js +29 -1
  98. package/lib/component/reducer/actions/MoleculeActions.js +1 -1
  99. package/lib/component/reducer/actions/PreferencesActions.js +0 -2
  100. package/lib/component/reducer/actions/RangesActions.js +3 -1
  101. package/lib/component/reducer/actions/SpectrumsActions.js +1 -1
  102. package/lib/component/reducer/actions/ToolsActions.js +43 -56
  103. package/lib/component/reducer/actions/ZonesActions.d.ts +3 -1
  104. package/lib/component/reducer/actions/ZonesActions.js +33 -2
  105. package/lib/component/reducer/helper/Zoom1DManager.d.ts +17 -21
  106. package/lib/component/reducer/helper/Zoom1DManager.js +53 -69
  107. package/lib/component/reducer/helper/ZoomHistoryManager.d.ts +1 -0
  108. package/lib/component/reducer/helper/ZoomHistoryManager.js +2 -1
  109. package/lib/component/reducer/preferencesReducer.d.ts +3 -8
  110. package/lib/component/reducer/preferencesReducer.js +86 -37
  111. package/lib/component/reducer/types/Types.d.ts +3 -1
  112. package/lib/component/reducer/types/Types.js +3 -1
  113. package/lib/component/toolbar/FunctionToolBar.js +7 -10
  114. package/lib/component/toolbar/ToolTypes.js +3 -3
  115. package/lib/component/workspaces/Workspace.d.ts +6 -0
  116. package/lib/component/workspaces/Workspace.js +1 -0
  117. package/lib/component/workspaces/basic.d.ts +2 -0
  118. package/lib/component/workspaces/basic.js +46 -0
  119. package/lib/component/workspaces/exercise1D.d.ts +2 -0
  120. package/lib/component/workspaces/exercise1D.js +46 -0
  121. package/lib/component/workspaces/index.d.ts +6 -0
  122. package/lib/component/workspaces/index.js +4 -0
  123. package/lib/component/workspaces/process1D.d.ts +2 -0
  124. package/lib/component/workspaces/process1D.js +44 -0
  125. package/lib/data/PredictionManager.d.ts +35 -3
  126. package/lib/data/PredictionManager.js +45 -7
  127. package/lib/data/constants/DefaultPathLengths.d.ts +6 -0
  128. package/lib/data/constants/DefaultPathLengths.js +8 -0
  129. package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.d.ts +2 -0
  130. package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.js +4 -0
  131. package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +7 -19
  132. package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.d.ts +11 -0
  133. package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +11 -0
  134. package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +2 -21
  135. package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.d.ts +9 -0
  136. package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.js +7 -0
  137. package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.d.ts +2 -0
  138. package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.js +29 -0
  139. package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +13 -0
  140. package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.js +14 -0
  141. package/lib/data/data1d/Spectrum1D/ranges/mapRanges.js +13 -8
  142. package/lib/data/migration/MigrationManager.js +3 -0
  143. package/lib/versionInfo.js +1 -1
  144. package/lib-cjs/component/1d/ExclusionZonesAnnotations.js +1 -2
  145. package/lib-cjs/component/1d/FooterBanner.js +1 -1
  146. package/lib-cjs/component/1d/Integral.js +1 -6
  147. package/lib-cjs/component/1d/Viewer1D.js +4 -4
  148. package/lib-cjs/component/1d/ranges/RangeIntegral.js +2 -6
  149. package/lib-cjs/component/1d/utilities/scale.js +7 -6
  150. package/lib-cjs/component/2d/Viewer2D.js +4 -4
  151. package/lib-cjs/component/EventsTrackers/KeysListenerTracker.js +98 -81
  152. package/lib-cjs/component/NMRium.js +3 -10
  153. package/lib-cjs/component/header/Header.js +13 -10
  154. package/lib-cjs/component/hooks/useCheckExperimentalFeature.js +5 -1
  155. package/lib-cjs/component/hooks/useCheckToolsVisibility.js +13 -0
  156. package/lib-cjs/component/hooks/useIntegralPath.js +56 -0
  157. package/lib-cjs/component/hooks/useToolsFunctions.js +6 -6
  158. package/lib-cjs/component/hooks/useXScale.js +11 -0
  159. package/lib-cjs/component/loader/DropZone.js +87 -87
  160. package/lib-cjs/component/modal/PredictSpectraModal.js +3 -33
  161. package/lib-cjs/component/modal/changeSum/ChangeSumModal.js +4 -2
  162. package/lib-cjs/component/modal/editRange/forms/validation/EditRangeValidation.js +1 -1
  163. package/lib-cjs/component/modal/editZone/EditPathLengthFormik.js +77 -0
  164. package/lib-cjs/component/modal/editZone/EditZoneModal.js +101 -0
  165. package/lib-cjs/component/modal/editZone/SignalFormTab.js +11 -0
  166. package/lib-cjs/component/modal/editZone/SignalsForm.js +67 -0
  167. package/lib-cjs/component/modal/editZone/validation/EditZoneValidation.js +38 -0
  168. package/lib-cjs/component/modal/editZone/validation/isDefaultPathLength.js +12 -0
  169. package/lib-cjs/component/modal/setting/ControllersTabContent.js +1 -1
  170. package/lib-cjs/component/modal/setting/DisplayTabContent.js +5 -1
  171. package/lib-cjs/component/modal/setting/GeneralSettings.js +12 -8
  172. package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignment.js +18 -0
  173. package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +43 -0
  174. package/lib-cjs/component/panels/IntegralsPanel/IntegralPanel.js +0 -3
  175. package/lib-cjs/component/panels/IntegralsPanel/IntegralsPreferences.js +3 -16
  176. package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +27 -17
  177. package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +2 -2
  178. package/lib-cjs/component/panels/Panels.js +18 -15
  179. package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +0 -3
  180. package/lib-cjs/component/panels/PeaksPanel/PeaksPreferences.js +4 -13
  181. package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +2 -5
  182. package/lib-cjs/component/panels/RangesPanel/RangesPreferences.js +4 -17
  183. package/lib-cjs/component/panels/SpectrumsPanel/SpectraPanelHeader.js +13 -3
  184. package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +7 -2
  185. package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +7 -2
  186. package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/Constants.js +1 -8
  187. package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.js +4 -5
  188. package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +21 -25
  189. package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/EditLinkModal.js +43 -30
  190. package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.js +94 -0
  191. package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +1 -1
  192. package/lib-cjs/component/panels/SummaryPanel/SummaryPanel.js +38 -41
  193. package/lib-cjs/component/panels/SummaryPanel/utilities/IsInView.js +18 -0
  194. package/lib-cjs/component/panels/SummaryPanel/{Utilities.js → utilities/Utilities.js} +157 -19
  195. package/lib-cjs/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +24 -1
  196. package/lib-cjs/component/panels/ZonesPanel/ZonesPanel.js +12 -7
  197. package/lib-cjs/component/panels/ZonesPanel/ZonesPreferences.js +4 -17
  198. package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +5 -2
  199. package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +0 -3
  200. package/lib-cjs/component/panels/databasePanel/DatabasePreferences.js +3 -16
  201. package/lib-cjs/component/panels/predictionPanel/PredictionOptions.js +112 -0
  202. package/lib-cjs/component/panels/predictionPanel/PredictionPanel.js +39 -0
  203. package/lib-cjs/component/reducer/IgnoreActions.js +2 -1
  204. package/lib-cjs/component/reducer/Reducer.js +7 -8
  205. package/lib-cjs/component/reducer/actions/DatabaseActions.js +2 -2
  206. package/lib-cjs/component/reducer/actions/DomainActions.js +21 -1
  207. package/lib-cjs/component/reducer/actions/IntegralsActions.js +2 -0
  208. package/lib-cjs/component/reducer/actions/LoadActions.js +29 -1
  209. package/lib-cjs/component/reducer/actions/MoleculeActions.js +1 -1
  210. package/lib-cjs/component/reducer/actions/PreferencesActions.js +0 -2
  211. package/lib-cjs/component/reducer/actions/RangesActions.js +2 -0
  212. package/lib-cjs/component/reducer/actions/SpectrumsActions.js +2 -2
  213. package/lib-cjs/component/reducer/actions/ToolsActions.js +50 -63
  214. package/lib-cjs/component/reducer/actions/ZonesActions.js +35 -2
  215. package/lib-cjs/component/reducer/helper/Zoom1DManager.js +55 -73
  216. package/lib-cjs/component/reducer/helper/ZoomHistoryManager.js +2 -1
  217. package/lib-cjs/component/reducer/preferencesReducer.js +87 -38
  218. package/lib-cjs/component/reducer/types/Types.js +6 -4
  219. package/lib-cjs/component/toolbar/FunctionToolBar.js +7 -10
  220. package/lib-cjs/component/toolbar/ToolTypes.js +3 -3
  221. package/lib-cjs/component/workspaces/Workspace.js +2 -0
  222. package/lib-cjs/component/workspaces/basic.js +49 -0
  223. package/lib-cjs/component/workspaces/exercise1D.js +49 -0
  224. package/lib-cjs/component/workspaces/index.js +6 -0
  225. package/lib-cjs/component/workspaces/process1D.js +47 -0
  226. package/lib-cjs/data/PredictionManager.js +46 -8
  227. package/lib-cjs/data/constants/DefaultPathLengths.js +10 -0
  228. package/lib-cjs/data/data1d/Spectrum1D/getSpectrumErrorValue.js +8 -0
  229. package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +7 -19
  230. package/lib-cjs/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +18 -0
  231. package/lib-cjs/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +2 -21
  232. package/lib-cjs/data/data1d/Spectrum1D/peaks/initiatePeaks.js +14 -0
  233. package/lib-cjs/data/data1d/Spectrum1D/peaks/mapPeaks.js +36 -0
  234. package/lib-cjs/data/data1d/Spectrum1D/ranges/initiateRanges.js +21 -0
  235. package/lib-cjs/data/data1d/Spectrum1D/ranges/mapRanges.js +13 -8
  236. package/lib-cjs/data/migration/MigrationManager.js +3 -0
  237. package/lib-cjs/versionInfo.js +1 -1
  238. package/package.json +1 -1
  239. package/lib/component/1d/utilities/useIntegralPath.js +0 -63
  240. package/lib/component/nmriumMode/basic.d.ts +0 -38
  241. package/lib/component/nmriumMode/basic.js +0 -37
  242. package/lib/component/nmriumMode/exercise1D.d.ts +0 -38
  243. package/lib/component/nmriumMode/exercise1D.js +0 -37
  244. package/lib/component/nmriumMode/process1D.d.ts +0 -38
  245. package/lib/component/nmriumMode/process1D.js +0 -37
  246. package/lib/component/panels/SummaryPanel/Utilities.d.ts +0 -25
  247. package/lib/component/reducer/actions/Zoom.d.ts +0 -16
  248. package/lib/component/reducer/actions/Zoom.js +0 -92
  249. package/lib-cjs/component/1d/utilities/useIntegralPath.js +0 -66
  250. package/lib-cjs/component/nmriumMode/basic.js +0 -39
  251. package/lib-cjs/component/nmriumMode/exercise1D.js +0 -39
  252. package/lib-cjs/component/nmriumMode/process1D.js +0 -39
  253. package/lib-cjs/component/reducer/actions/Zoom.js +0 -116
@@ -1,38 +0,0 @@
1
- declare const _default: {
2
- general: {
3
- disableMultipletAnalysis: boolean;
4
- hideSetSumFromMolecule: boolean;
5
- };
6
- panels: {
7
- hideSpectraPanel: boolean;
8
- hideInformationPanel: boolean;
9
- hidePeaksPanel: boolean;
10
- hideIntegralsPanel: boolean;
11
- hideRangesPanel: boolean;
12
- hideStructuresPanel: boolean;
13
- hideFiltersPanel: boolean;
14
- hideZonesPanel: boolean;
15
- hideSummaryPanel: boolean;
16
- hideMultipleSpectraAnalysisPanel: boolean;
17
- hideDatabasePanel: boolean;
18
- };
19
- toolBarButtons: {
20
- hideZoomTool: boolean;
21
- hideZoomOutTool: boolean;
22
- hideImport: boolean;
23
- hideExportAs: boolean;
24
- hideSpectraStackAlignments: boolean;
25
- hideSpectraCenterAlignments: boolean;
26
- hideRealImaginary: boolean;
27
- hidePeakTool: boolean;
28
- hideIntegralTool: boolean;
29
- hideAutoRangesTool: boolean;
30
- hideZeroFillingTool: boolean;
31
- hidePhaseCorrectionTool: boolean;
32
- hideBaseLineCorrectionTool: boolean;
33
- hideFFTTool: boolean;
34
- hideMultipleSpectraAnalysisTool: boolean;
35
- hideExclusionZonesTool: boolean;
36
- };
37
- };
38
- export default _default;
@@ -1,37 +0,0 @@
1
- export default {
2
- general: {
3
- disableMultipletAnalysis: true,
4
- hideSetSumFromMolecule: false,
5
- },
6
- panels: {
7
- hideSpectraPanel: false,
8
- hideInformationPanel: false,
9
- hidePeaksPanel: false,
10
- hideIntegralsPanel: false,
11
- hideRangesPanel: true,
12
- hideStructuresPanel: false,
13
- hideFiltersPanel: false,
14
- hideZonesPanel: true,
15
- hideSummaryPanel: true,
16
- hideMultipleSpectraAnalysisPanel: true,
17
- hideDatabasePanel: false,
18
- },
19
- toolBarButtons: {
20
- hideZoomTool: false,
21
- hideZoomOutTool: false,
22
- hideImport: true,
23
- hideExportAs: true,
24
- hideSpectraStackAlignments: false,
25
- hideSpectraCenterAlignments: false,
26
- hideRealImaginary: false,
27
- hidePeakTool: false,
28
- hideIntegralTool: false,
29
- hideAutoRangesTool: true,
30
- hideZeroFillingTool: false,
31
- hidePhaseCorrectionTool: false,
32
- hideBaseLineCorrectionTool: false,
33
- hideFFTTool: false,
34
- hideMultipleSpectraAnalysisTool: true,
35
- hideExclusionZonesTool: true,
36
- },
37
- };
@@ -1,25 +0,0 @@
1
- import { Link, Correlation } from 'nmr-correlation';
2
- import { Datum2D } from '../../../data/types/data2d';
3
- declare function getAtomType(nucleus: string): string;
4
- declare function getLabelColor(correlationData: any, correlation: any): string | null;
5
- declare function findSignalMatch1D(spectrum: Datum2D, link: Link, factor: number, xDomain0: number, xDomain1: number): boolean;
6
- declare function findSignalMatch2D(spectrum: Datum2D, link: Link, factor: number, xDomain0: number, xDomain1: number, yDomain0: number, yDomain1: number): boolean;
7
- declare function getAbbreviation(link: Link): string;
8
- declare function buildNewLink1D(link: any): Link;
9
- declare function buildNewLink2D(link: Link, axis: 'x' | 'y'): Link;
10
- declare function cloneCorrelationAndEditLink(correlation: Correlation, link: Link, axis: 'x' | 'y', action: 'add' | 'remove' | 'unmove'): Correlation;
11
- declare function getEditedCorrelations({ correlationDim1, correlationDim2, selectedCorrelationValueDim1, selectedCorrelationValueDim2, action, link, correlations, }: {
12
- correlationDim1: any;
13
- correlationDim2: any;
14
- selectedCorrelationValueDim1: any;
15
- selectedCorrelationValueDim2: any;
16
- action: any;
17
- link: any;
18
- correlations: any;
19
- }): {
20
- editedCorrelations: Correlation[];
21
- buildCorrelationDataOptions: {
22
- skipDataUpdate?: boolean | undefined;
23
- };
24
- };
25
- export { buildNewLink1D, buildNewLink2D, cloneCorrelationAndEditLink, findSignalMatch1D, findSignalMatch2D, getAbbreviation, getAtomType, getEditedCorrelations, getLabelColor, };
@@ -1,16 +0,0 @@
1
- import { Draft } from 'immer';
2
- import { State } from '../Reducer';
3
- export declare const ZoomType: {
4
- HORIZONTAL: string;
5
- VERTICAL: string;
6
- STEP_HORIZONTAL: string;
7
- FULL: string;
8
- };
9
- export declare function wheel(deltaY: any, deltaMode: any, draft: Draft<State>, id?: string | null): void;
10
- declare function setZoom(draft: Draft<State>, options?: {
11
- scale?: number;
12
- spectrumID?: string;
13
- shareYDomain?: boolean;
14
- }): void;
15
- declare function setZoom1D(draft: any, height: any, margin: any, index: any, defaultScale?: number): void;
16
- export { setZoom, setZoom1D };
@@ -1,92 +0,0 @@
1
- import { zoomIdentity, scaleLinear } from 'd3';
2
- import Zoom1DManager, { setAllScales } from '../helper/Zoom1DManager';
3
- export const ZoomType = {
4
- HORIZONTAL: 'HORIZONTAL',
5
- VERTICAL: 'VERTICAL',
6
- STEP_HORIZONTAL: 'STEP_HORIZONTAL',
7
- FULL: 'FULL',
8
- };
9
- export function wheel(deltaY, deltaMode, draft, id = null) {
10
- if (draft.activeSpectrum?.id || id) {
11
- Zoom1DManager(draft.zoom.spectra).wheel(deltaY, id || draft.activeSpectrum?.id);
12
- }
13
- else {
14
- const zoomManager = Zoom1DManager(draft.zoom.spectra);
15
- draft.data.forEach((datum) => {
16
- if (datum.info.dimension === 1 &&
17
- draft.activeTab === datum.info.nucleus) {
18
- zoomManager.wheel(deltaY, datum.id);
19
- }
20
- });
21
- }
22
- }
23
- function setZoom(draft, options = {}) {
24
- const { height, margin, activeSpectrum } = draft;
25
- const { scale = null, spectrumID = null } = options;
26
- if (scale && !spectrumID) {
27
- setAllScales(draft.zoom.spectra, scale);
28
- }
29
- const zoomManager = Zoom1DManager(draft.zoom.spectra);
30
- if (activeSpectrum === null && spectrumID === null) {
31
- const { shareYDomain, yDomain, yDomains } = draft.originDomain;
32
- draft.yDomains = Object.keys(draft.yDomains).reduce((acc, id) => {
33
- const scale = zoomManager.getScale(id);
34
- const _scale = scaleLinear(shareYDomain ? yDomain : yDomains[id], [
35
- height - margin.bottom,
36
- margin.top,
37
- ]);
38
- const [min, max] = shareYDomain ? yDomain : yDomains[id];
39
- const maxPoint = Math.max(Math.abs(max), Math.abs(min));
40
- const scalePoint = maxPoint === max ? 0 : min;
41
- const t = zoomIdentity
42
- .translate(0, Math.sign(scalePoint) >= 0 ? _scale(scalePoint) : _scale(scalePoint))
43
- .scale(scale)
44
- .translate(0, -_scale(0));
45
- const newYDomain = t.rescaleY(_scale).domain();
46
- acc[id] = newYDomain;
47
- return acc;
48
- }, {});
49
- }
50
- else {
51
- const spectrumId = spectrumID || activeSpectrum?.id;
52
- if (spectrumId) {
53
- if (scale) {
54
- zoomManager.setScale(scale, spectrumId);
55
- }
56
- const scaleFactor = scale ? scale : zoomManager.getScale(spectrumId);
57
- const _scale = scaleLinear(draft.originDomain.yDomains[spectrumId], [
58
- height - margin.bottom,
59
- margin.top,
60
- ]);
61
- const t = zoomIdentity
62
- .translate(0, _scale(0))
63
- .scale(scaleFactor)
64
- .translate(0, -_scale(0));
65
- const yDomain = t.rescaleY(_scale).domain();
66
- draft.yDomains = {
67
- ...draft.yDomains,
68
- [spectrumId]: yDomain,
69
- };
70
- }
71
- }
72
- }
73
- function setZoom1D(draft, height, margin, index, defaultScale) {
74
- const { originDomain, tabActiveSpectrum, activeTab } = draft;
75
- const { id } = tabActiveSpectrum[activeTab.split(',')[index]];
76
- const { setScale, getScale } = Zoom1DManager(draft.zoom.spectra);
77
- if (defaultScale) {
78
- setScale(defaultScale, id);
79
- }
80
- const scale = getScale(id);
81
- const _scale = scaleLinear(originDomain.yDomains[id], [
82
- height - margin,
83
- margin,
84
- ]);
85
- const t = zoomIdentity
86
- .translate(0, _scale(0))
87
- .scale(scale)
88
- .translate(0, -_scale(0));
89
- let yDomain = t.rescaleY(_scale).domain();
90
- draft.yDomains[id] = yDomain;
91
- }
92
- export { setZoom, setZoom1D };
@@ -1,66 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const ml_spectra_processing_1 = require("ml-spectra-processing");
4
- const react_1 = require("react");
5
- const ChartContext_1 = require("../../context/ChartContext");
6
- const ScaleContext_1 = require("../../context/ScaleContext");
7
- const PathBuilder_1 = require("../../utility/PathBuilder");
8
- const scale_1 = require("./scale");
9
- function useIntegralPath(integralOptions) {
10
- const { xDomain, height, yDomain, margin, verticalAlign, data, activeSpectrum, zoom, } = (0, ChartContext_1.useChartData)();
11
- const { scaleX } = (0, ScaleContext_1.useScale)();
12
- const scaleY = (0, react_1.useMemo)(() => {
13
- const scale = zoom.integral.scales[activeSpectrum?.id || ''];
14
- const scaledYDomain = (0, scale_1.reScaleY)(scale === undefined ? 1 : scale < 0.1 ? 0.05 : scale, {
15
- domain: [yDomain[0], yDomain[1] / 20],
16
- height,
17
- margin,
18
- });
19
- return (0, scale_1.getYScale)({
20
- height,
21
- margin,
22
- verticalAlign,
23
- yDomain: scaledYDomain,
24
- });
25
- }, [
26
- activeSpectrum?.id,
27
- height,
28
- margin,
29
- verticalAlign,
30
- yDomain,
31
- zoom.integral.scales,
32
- ]);
33
- const integral = (0, react_1.useMemo)(() => {
34
- if (activeSpectrum) {
35
- const { x, re } = data[activeSpectrum?.index].data;
36
- const { from, to } = integralOptions;
37
- return (0, ml_spectra_processing_1.xyIntegral)({ x, y: re }, {
38
- from,
39
- to,
40
- reverse: true,
41
- });
42
- }
43
- return { x: [], y: [] };
44
- }, [activeSpectrum, data, integralOptions]);
45
- const paths = (0, react_1.useMemo)(() => {
46
- if (integral && scaleX) {
47
- const xySeries = (0, ml_spectra_processing_1.xyReduce)(integral, {
48
- from: xDomain[0],
49
- to: xDomain[1],
50
- nbPoints: 200,
51
- optimize: true,
52
- });
53
- const pathBuilder = new PathBuilder_1.PathBuilder();
54
- pathBuilder.moveTo(scaleX()(xySeries.x[0]), scaleY(xySeries.y[0]));
55
- for (let i = 1; i < xySeries.x.length; i++) {
56
- pathBuilder.lineTo(scaleX()(xySeries.x[i]), scaleY(xySeries.y[i]));
57
- }
58
- return pathBuilder.toString();
59
- }
60
- else {
61
- return '';
62
- }
63
- }, [integral, scaleX, scaleY, xDomain]);
64
- return paths;
65
- }
66
- exports.default = useIntegralPath;
@@ -1,39 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = {
4
- general: {
5
- disableMultipletAnalysis: false,
6
- hideSetSumFromMolecule: false,
7
- },
8
- panels: {
9
- hideSpectraPanel: false,
10
- hideInformationPanel: false,
11
- hidePeaksPanel: false,
12
- hideIntegralsPanel: false,
13
- hideRangesPanel: false,
14
- hideStructuresPanel: false,
15
- hideFiltersPanel: false,
16
- hideZonesPanel: false,
17
- hideSummaryPanel: true,
18
- hideMultipleSpectraAnalysisPanel: true,
19
- hideDatabasePanel: false,
20
- },
21
- toolBarButtons: {
22
- hideZoomTool: false,
23
- hideZoomOutTool: false,
24
- hideImport: false,
25
- hideExportAs: false,
26
- hideSpectraStackAlignments: false,
27
- hideSpectraCenterAlignments: false,
28
- hideRealImaginary: false,
29
- hidePeakTool: false,
30
- hideIntegralTool: false,
31
- hideAutoRangesTool: false,
32
- hideZeroFillingTool: false,
33
- hidePhaseCorrectionTool: false,
34
- hideBaseLineCorrectionTool: false,
35
- hideFFTTool: false,
36
- hideMultipleSpectraAnalysisTool: false,
37
- },
38
- hideExperimentalFeatures: true,
39
- };
@@ -1,39 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = {
4
- general: {
5
- disableMultipletAnalysis: true,
6
- hideSetSumFromMolecule: false,
7
- },
8
- panels: {
9
- hideSpectraPanel: false,
10
- hideInformationPanel: false,
11
- hidePeaksPanel: false,
12
- hideIntegralsPanel: false,
13
- hideRangesPanel: true,
14
- hideStructuresPanel: false,
15
- hideFiltersPanel: true,
16
- hideZonesPanel: true,
17
- hideSummaryPanel: true,
18
- hideMultipleSpectraAnalysisPanel: true,
19
- hideDatabasePanel: false,
20
- },
21
- toolBarButtons: {
22
- hideZoomTool: false,
23
- hideZoomOutTool: false,
24
- hideImport: true,
25
- hideExportAs: true,
26
- hideSpectraStackAlignments: false,
27
- hideSpectraCenterAlignments: false,
28
- hideRealImaginary: true,
29
- hidePeakTool: false,
30
- hideIntegralTool: false,
31
- hideAutoRangesTool: true,
32
- hideZeroFillingTool: true,
33
- hidePhaseCorrectionTool: true,
34
- hideBaseLineCorrectionTool: true,
35
- hideFFTTool: true,
36
- hideMultipleSpectraAnalysisTool: true,
37
- hideExclusionZonesTool: true,
38
- },
39
- };
@@ -1,39 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = {
4
- general: {
5
- disableMultipletAnalysis: true,
6
- hideSetSumFromMolecule: false,
7
- },
8
- panels: {
9
- hideSpectraPanel: false,
10
- hideInformationPanel: false,
11
- hidePeaksPanel: false,
12
- hideIntegralsPanel: false,
13
- hideRangesPanel: true,
14
- hideStructuresPanel: false,
15
- hideFiltersPanel: false,
16
- hideZonesPanel: true,
17
- hideSummaryPanel: true,
18
- hideMultipleSpectraAnalysisPanel: true,
19
- hideDatabasePanel: false,
20
- },
21
- toolBarButtons: {
22
- hideZoomTool: false,
23
- hideZoomOutTool: false,
24
- hideImport: true,
25
- hideExportAs: true,
26
- hideSpectraStackAlignments: false,
27
- hideSpectraCenterAlignments: false,
28
- hideRealImaginary: false,
29
- hidePeakTool: false,
30
- hideIntegralTool: false,
31
- hideAutoRangesTool: true,
32
- hideZeroFillingTool: false,
33
- hidePhaseCorrectionTool: false,
34
- hideBaseLineCorrectionTool: false,
35
- hideFFTTool: false,
36
- hideMultipleSpectraAnalysisTool: true,
37
- hideExclusionZonesTool: true,
38
- },
39
- };
@@ -1,116 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.setZoom1D = exports.setZoom = exports.wheel = exports.ZoomType = void 0;
23
- const d3_1 = require("d3");
24
- const Zoom1DManager_1 = __importStar(require("../helper/Zoom1DManager"));
25
- exports.ZoomType = {
26
- HORIZONTAL: 'HORIZONTAL',
27
- VERTICAL: 'VERTICAL',
28
- STEP_HORIZONTAL: 'STEP_HORIZONTAL',
29
- FULL: 'FULL',
30
- };
31
- function wheel(deltaY, deltaMode, draft, id = null) {
32
- if (draft.activeSpectrum?.id || id) {
33
- (0, Zoom1DManager_1.default)(draft.zoom.spectra).wheel(deltaY, id || draft.activeSpectrum?.id);
34
- }
35
- else {
36
- const zoomManager = (0, Zoom1DManager_1.default)(draft.zoom.spectra);
37
- draft.data.forEach((datum) => {
38
- if (datum.info.dimension === 1 &&
39
- draft.activeTab === datum.info.nucleus) {
40
- zoomManager.wheel(deltaY, datum.id);
41
- }
42
- });
43
- }
44
- }
45
- exports.wheel = wheel;
46
- function setZoom(draft, options = {}) {
47
- const { height, margin, activeSpectrum } = draft;
48
- const { scale = null, spectrumID = null } = options;
49
- if (scale && !spectrumID) {
50
- (0, Zoom1DManager_1.setAllScales)(draft.zoom.spectra, scale);
51
- }
52
- const zoomManager = (0, Zoom1DManager_1.default)(draft.zoom.spectra);
53
- if (activeSpectrum === null && spectrumID === null) {
54
- const { shareYDomain, yDomain, yDomains } = draft.originDomain;
55
- draft.yDomains = Object.keys(draft.yDomains).reduce((acc, id) => {
56
- const scale = zoomManager.getScale(id);
57
- const _scale = (0, d3_1.scaleLinear)(shareYDomain ? yDomain : yDomains[id], [
58
- height - margin.bottom,
59
- margin.top,
60
- ]);
61
- const [min, max] = shareYDomain ? yDomain : yDomains[id];
62
- const maxPoint = Math.max(Math.abs(max), Math.abs(min));
63
- const scalePoint = maxPoint === max ? 0 : min;
64
- const t = d3_1.zoomIdentity
65
- .translate(0, Math.sign(scalePoint) >= 0 ? _scale(scalePoint) : _scale(scalePoint))
66
- .scale(scale)
67
- .translate(0, -_scale(0));
68
- const newYDomain = t.rescaleY(_scale).domain();
69
- acc[id] = newYDomain;
70
- return acc;
71
- }, {});
72
- }
73
- else {
74
- const spectrumId = spectrumID || activeSpectrum?.id;
75
- if (spectrumId) {
76
- if (scale) {
77
- zoomManager.setScale(scale, spectrumId);
78
- }
79
- const scaleFactor = scale ? scale : zoomManager.getScale(spectrumId);
80
- const _scale = (0, d3_1.scaleLinear)(draft.originDomain.yDomains[spectrumId], [
81
- height - margin.bottom,
82
- margin.top,
83
- ]);
84
- const t = d3_1.zoomIdentity
85
- .translate(0, _scale(0))
86
- .scale(scaleFactor)
87
- .translate(0, -_scale(0));
88
- const yDomain = t.rescaleY(_scale).domain();
89
- draft.yDomains = {
90
- ...draft.yDomains,
91
- [spectrumId]: yDomain,
92
- };
93
- }
94
- }
95
- }
96
- exports.setZoom = setZoom;
97
- function setZoom1D(draft, height, margin, index, defaultScale) {
98
- const { originDomain, tabActiveSpectrum, activeTab } = draft;
99
- const { id } = tabActiveSpectrum[activeTab.split(',')[index]];
100
- const { setScale, getScale } = (0, Zoom1DManager_1.default)(draft.zoom.spectra);
101
- if (defaultScale) {
102
- setScale(defaultScale, id);
103
- }
104
- const scale = getScale(id);
105
- const _scale = (0, d3_1.scaleLinear)(originDomain.yDomains[id], [
106
- height - margin,
107
- margin,
108
- ]);
109
- const t = d3_1.zoomIdentity
110
- .translate(0, _scale(0))
111
- .scale(scale)
112
- .translate(0, -_scale(0));
113
- let yDomain = t.rescaleY(_scale).domain();
114
- draft.yDomains[id] = yDomain;
115
- }
116
- exports.setZoom1D = setZoom1D;