nmrium 0.44.1-pre.1696502379 → 0.44.1-pre.1697548860

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 (603) hide show
  1. package/lib/component/1d/ApodizationLine.js +25 -53
  2. package/lib/component/1d/Chart1D.js +20 -25
  3. package/lib/component/1d/ExclusionZoneAnnotation.js +17 -22
  4. package/lib/component/1d/ExclusionZonesAnnotations.js +19 -24
  5. package/lib/component/1d/FooterBanner.js +32 -38
  6. package/lib/component/1d/Line.js +15 -43
  7. package/lib/component/1d/LinesSeries.js +11 -16
  8. package/lib/component/1d/SpectraLegends.js +24 -29
  9. package/lib/component/1d/Viewer1D.js +74 -102
  10. package/lib/component/1d/XAxis.js +15 -40
  11. package/lib/component/1d/YAxis.js +13 -38
  12. package/lib/component/1d/database/DatabaseElements.js +11 -16
  13. package/lib/component/1d/database/DatabaseSpectrum.js +30 -35
  14. package/lib/component/1d/database/ResurrectedDatabaseRanges.js +25 -30
  15. package/lib/component/1d/integral/Integral.js +8 -13
  16. package/lib/component/1d/integral/IntegralIndicator.js +6 -10
  17. package/lib/component/1d/integral/IntegralResizable.js +23 -28
  18. package/lib/component/1d/integral/IntegralsSeries.js +8 -13
  19. package/lib/component/1d/jCouplingGraph/JGraph.js +24 -30
  20. package/lib/component/1d/jCouplingGraph/JGraphContext.js +5 -9
  21. package/lib/component/1d/jCouplingGraph/JGraphVerticalAxis.js +8 -12
  22. package/lib/component/1d/jCouplingGraph/JsCoupling.js +7 -10
  23. package/lib/component/1d/jCouplingGraph/JsCouplingLinks.js +10 -13
  24. package/lib/component/1d/jCouplingGraph/JsCouplings.js +10 -16
  25. package/lib/component/1d/multiAnalysis/AnalysisRange.js +21 -26
  26. package/lib/component/1d/multiAnalysis/MultiAnalysisRanges.js +13 -19
  27. package/lib/component/1d/multiplicityTree/LevelNode.js +6 -8
  28. package/lib/component/1d/multiplicityTree/MultiplicityTree.js +33 -40
  29. package/lib/component/1d/multiplicityTree/StringNode.js +5 -7
  30. package/lib/component/1d/multiplicityTree/TreeColors.js +1 -4
  31. package/lib/component/1d/multiplicityTree/TreeNodes.js +8 -10
  32. package/lib/component/1d/multiplicityTree/buildTreeNode.js +7 -12
  33. package/lib/component/1d/peaks/PeakAnnotations.js +19 -23
  34. package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.js +18 -20
  35. package/lib/component/1d/peaks/PeakEditionManager.js +24 -55
  36. package/lib/component/1d/peaks/Peaks.js +24 -33
  37. package/lib/component/1d/peaks/PeaksShapes.js +21 -26
  38. package/lib/component/1d/peaks/usePeakShapesPath.js +10 -14
  39. package/lib/component/1d/ranges/AssignmentActionsButtons.js +5 -12
  40. package/lib/component/1d/ranges/Range.js +31 -36
  41. package/lib/component/1d/ranges/RangeIntegral.js +5 -10
  42. package/lib/component/1d/ranges/Ranges.js +16 -22
  43. package/lib/component/1d/tool/BaseLineZones.js +10 -12
  44. package/lib/component/1d/tool/PeakPointer.js +24 -29
  45. package/lib/component/1d/tool/VerticalIndicator.js +9 -11
  46. package/lib/component/1d/tool/XLabelPointer.js +19 -21
  47. package/lib/component/1d/utilities/getDecimalsCount.js +1 -5
  48. package/lib/component/1d/utilities/intersectionResolver.js +3 -7
  49. package/lib/component/1d/utilities/scale.js +15 -23
  50. package/lib/component/1d-2d/components/FloatMoleculeStructures/ActionsButton.js +6 -12
  51. package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +20 -27
  52. package/lib/component/1d-2d/components/FloatMoleculeStructures/index.js +15 -23
  53. package/lib/component/1d-2d/components/SpectrumInfoBlock.js +15 -20
  54. package/lib/component/1d-2d/tools/BrushX.js +17 -20
  55. package/lib/component/1d-2d/tools/BrushXY.js +29 -33
  56. package/lib/component/1d-2d/tools/CrossLinePointer.js +24 -26
  57. package/lib/component/2d/1d-tracer/HorizontalSliceChart.js +11 -13
  58. package/lib/component/2d/1d-tracer/Left1DChart.js +13 -38
  59. package/lib/component/2d/1d-tracer/Top1DChart.js +13 -38
  60. package/lib/component/2d/1d-tracer/VerticalSliceChart.js +11 -13
  61. package/lib/component/2d/Chart2D.js +17 -23
  62. package/lib/component/2d/FooterBanner.js +57 -59
  63. package/lib/component/2d/SignalDeltaLine.js +11 -13
  64. package/lib/component/2d/SlicingView.js +17 -22
  65. package/lib/component/2d/Viewer2D.js +38 -68
  66. package/lib/component/2d/XAxis.js +15 -43
  67. package/lib/component/2d/YAxis.js +15 -43
  68. package/lib/component/2d/fid/FidCanvas.js +19 -26
  69. package/lib/component/2d/fid/FidContainer.js +17 -24
  70. package/lib/component/2d/ft/Contours.js +34 -40
  71. package/lib/component/2d/ft/FTContainer.js +8 -15
  72. package/lib/component/2d/tools/XYLabelPointer.js +36 -38
  73. package/lib/component/2d/utilities/DimensionLayout.js +1 -6
  74. package/lib/component/2d/utilities/scale.js +18 -28
  75. package/lib/component/2d/zones/IndicationLines.js +19 -21
  76. package/lib/component/2d/zones/Signal.js +22 -27
  77. package/lib/component/2d/zones/SignalCrosshair.js +14 -19
  78. package/lib/component/2d/zones/Zone.js +23 -28
  79. package/lib/component/2d/zones/Zones.js +12 -18
  80. package/lib/component/EventsTrackers/BrushTracker.js +20 -28
  81. package/lib/component/EventsTrackers/KeysListenerTracker.js +54 -59
  82. package/lib/component/EventsTrackers/MouseTracker.js +12 -17
  83. package/lib/component/assignment/AssignmentsContext.js +16 -21
  84. package/lib/component/assignment/AssignmentsReducer.js +9 -15
  85. package/lib/component/assignment/actions/initAssignment.js +5 -8
  86. package/lib/component/assignment/actions/removeAssignment.js +2 -7
  87. package/lib/component/assignment/actions/setActiveAssignment.js +1 -4
  88. package/lib/component/assignment/actions/toggleAssignment.js +3 -6
  89. package/lib/component/assignment/index.js +11 -18
  90. package/lib/component/assignment/utilities/filterForIDsWithAssignment.js +1 -5
  91. package/lib/component/context/ChartContext.js +6 -10
  92. package/lib/component/context/DispatchContext.js +5 -9
  93. package/lib/component/context/GlobalContext.js +5 -9
  94. package/lib/component/context/KeyModifierContext.js +10 -16
  95. package/lib/component/context/LoaderContext.js +5 -9
  96. package/lib/component/context/LoggerContext.js +18 -23
  97. package/lib/component/context/PreferencesContext.js +11 -16
  98. package/lib/component/context/ScaleContext.js +7 -12
  99. package/lib/component/elements/ActionButtons.js +5 -11
  100. package/lib/component/elements/ActiveButton.js +8 -13
  101. package/lib/component/elements/Button.js +21 -23
  102. package/lib/component/elements/ButtonToolTip.js +4 -9
  103. package/lib/component/elements/CheckBox.js +6 -8
  104. package/lib/component/elements/CheckBoxCell.js +4 -11
  105. package/lib/component/elements/CloseButton.js +6 -11
  106. package/lib/component/elements/ColorInput.js +13 -15
  107. package/lib/component/elements/ColumnWrapper.js +3 -7
  108. package/lib/component/elements/ContextMenu.js +18 -20
  109. package/lib/component/elements/CounterLabel.js +3 -7
  110. package/lib/component/elements/DeleteButton.js +3 -5
  111. package/lib/component/elements/EditableColumn.js +14 -19
  112. package/lib/component/elements/GroupPane.js +3 -7
  113. package/lib/component/elements/Header.js +5 -9
  114. package/lib/component/elements/Input.js +15 -20
  115. package/lib/component/elements/InputRange.js +8 -10
  116. package/lib/component/elements/IsotopesViewer.js +3 -5
  117. package/lib/component/elements/Label.js +6 -12
  118. package/lib/component/elements/Logo.js +3 -6
  119. package/lib/component/elements/MenuButton.js +15 -21
  120. package/lib/component/elements/Message.js +6 -9
  121. package/lib/component/elements/MolecularFormulaInput.js +13 -19
  122. package/lib/component/elements/MoleculeSelection.js +14 -20
  123. package/lib/component/elements/NextPrev.js +20 -22
  124. package/lib/component/elements/NumberInput.js +8 -13
  125. package/lib/component/elements/PreferencesButton.js +5 -12
  126. package/lib/component/elements/ReactTable/Elements/EmptyDataRow.js +5 -9
  127. package/lib/component/elements/ReactTable/Elements/ReactTableHeader.js +6 -8
  128. package/lib/component/elements/ReactTable/Elements/ReactTableRow.js +14 -16
  129. package/lib/component/elements/ReactTable/ReactTable.js +37 -65
  130. package/lib/component/elements/ReactTable/ReactTableFlexLayout.js +12 -14
  131. package/lib/component/elements/ReactTable/Style.js +3 -6
  132. package/lib/component/elements/ReactTable/utility/ReactTableContext.js +5 -9
  133. package/lib/component/elements/ReactTable/utility/addCustomColumn.js +6 -11
  134. package/lib/component/elements/ReactTable/utility/useRowSpan.js +2 -7
  135. package/lib/component/elements/RemoveAssignmentsButton.js +7 -11
  136. package/lib/component/elements/SVGGroup.js +8 -12
  137. package/lib/component/elements/SaveButton.js +8 -13
  138. package/lib/component/elements/Scroller.js +11 -15
  139. package/lib/component/elements/Select.js +8 -10
  140. package/lib/component/elements/Tab/DeleteButton.js +6 -8
  141. package/lib/component/elements/Tab/Tab.js +6 -12
  142. package/lib/component/elements/Tab/Tabs.js +14 -20
  143. package/lib/component/elements/Table/Table.js +4 -6
  144. package/lib/component/elements/Table/TableBody.js +6 -8
  145. package/lib/component/elements/Table/TableCell.js +4 -6
  146. package/lib/component/elements/Table/TableHead.js +4 -6
  147. package/lib/component/elements/Table/TableRow.js +4 -6
  148. package/lib/component/elements/ToggleButton.js +9 -14
  149. package/lib/component/elements/ToolTip/ToolTip.js +16 -18
  150. package/lib/component/elements/ToolbarMenu.js +19 -22
  151. package/lib/component/elements/accordion/Accordion.js +15 -17
  152. package/lib/component/elements/accordion/AccordionItem.js +17 -20
  153. package/lib/component/elements/draggable/SVGDraggable.js +7 -13
  154. package/lib/component/elements/draggable/useDraggable.js +7 -10
  155. package/lib/component/elements/dropDownButton/DropDownButton.js +16 -21
  156. package/lib/component/elements/dropDownButton/DropDownList.js +12 -14
  157. package/lib/component/elements/formik/ErrorMessage.js +6 -8
  158. package/lib/component/elements/formik/FormikCheckBox.js +11 -16
  159. package/lib/component/elements/formik/FormikColorInput.js +9 -14
  160. package/lib/component/elements/formik/FormikColorPicker.js +9 -14
  161. package/lib/component/elements/formik/FormikColumnFormatField.js +14 -20
  162. package/lib/component/elements/formik/FormikError.js +8 -13
  163. package/lib/component/elements/formik/FormikErrorsSummary.js +9 -11
  164. package/lib/component/elements/formik/FormikInput.js +10 -15
  165. package/lib/component/elements/formik/FormikNumberInput.js +11 -16
  166. package/lib/component/elements/formik/FormikOnChange.js +8 -13
  167. package/lib/component/elements/formik/FormikSelect.js +12 -17
  168. package/lib/component/elements/formik/FormikSlider.js +10 -15
  169. package/lib/component/elements/formik/FormikTextarea.js +11 -16
  170. package/lib/component/elements/formik/Input.js +6 -11
  171. package/lib/component/elements/formik/SelectBox.js +8 -13
  172. package/lib/component/elements/linearAxis/LinearVerticalAxis.js +10 -14
  173. package/lib/component/elements/popup/Alert/AlertBlock.js +9 -15
  174. package/lib/component/elements/popup/Alert/Context.js +5 -9
  175. package/lib/component/elements/popup/Alert/ProgressIndicator.js +5 -8
  176. package/lib/component/elements/popup/Alert/Provider.js +34 -39
  177. package/lib/component/elements/popup/Alert/index.js +3 -14
  178. package/lib/component/elements/popup/Modal/ConfirmDialog.js +7 -9
  179. package/lib/component/elements/popup/Modal/Context.js +5 -9
  180. package/lib/component/elements/popup/Modal/Modal.js +6 -8
  181. package/lib/component/elements/popup/Modal/ModalContent.js +9 -11
  182. package/lib/component/elements/popup/Modal/Provider.js +39 -44
  183. package/lib/component/elements/popup/Modal/index.js +4 -15
  184. package/lib/component/elements/popup/Transition.js +11 -14
  185. package/lib/component/elements/popup/Wrapper.js +15 -18
  186. package/lib/component/elements/popup/options.js +3 -6
  187. package/lib/component/elements/popup/utility.js +1 -4
  188. package/lib/component/elements/resizer/DivResizer.js +12 -18
  189. package/lib/component/elements/resizer/Resizer.js +6 -12
  190. package/lib/component/elements/resizer/SVGResizer.js +9 -15
  191. package/lib/component/elements/resizer/useResizer.js +12 -18
  192. package/lib/component/elements/toggle/ToggleButton.js +8 -11
  193. package/lib/component/elements/toggle/ToggleButtonGroup.js +15 -21
  194. package/lib/component/header/ApodizationOptionsPanel.js +23 -52
  195. package/lib/component/header/AutoPeakPickingOptionPanel.js +20 -48
  196. package/lib/component/header/BaseLineCorrectionPanel.js +24 -53
  197. package/lib/component/header/Header.js +57 -64
  198. package/lib/component/header/HeaderContainer.js +3 -7
  199. package/lib/component/header/PhaseCorrectionPanel.js +33 -39
  200. package/lib/component/header/RangesPickingOptionPanel.js +20 -48
  201. package/lib/component/header/ZeroFillingOptionsPanel.js +24 -30
  202. package/lib/component/header/Zones2DOptionPanel.js +17 -45
  203. package/lib/component/highlight/index.js +22 -28
  204. package/lib/component/hooks/useActiveSpectra.js +5 -9
  205. package/lib/component/hooks/useActiveSpectrum.js +5 -9
  206. package/lib/component/hooks/useActiveSpectrumPeaksViewState.js +7 -11
  207. package/lib/component/hooks/useActiveSpectrumRangesViewState.js +7 -11
  208. package/lib/component/hooks/useActiveSpectrumStyleOptions.js +9 -15
  209. package/lib/component/hooks/useActiveSpectrumZonesViewState.js +7 -11
  210. package/lib/component/hooks/useCheckExperimentalFeature.js +3 -6
  211. package/lib/component/hooks/useCheckPointsNumberInWindowArea.js +8 -15
  212. package/lib/component/hooks/useCheckToolsVisibility.js +15 -22
  213. package/lib/component/hooks/useCombinedRefs.js +4 -7
  214. package/lib/component/hooks/useDatumWithSpectraStatistics.js +9 -15
  215. package/lib/component/hooks/useExport.js +31 -37
  216. package/lib/component/hooks/useFilter.js +5 -12
  217. package/lib/component/hooks/useFormatNumberByNucleus.js +9 -16
  218. package/lib/component/hooks/useIntegralPath.js +21 -24
  219. package/lib/component/hooks/useNucleus.js +5 -8
  220. package/lib/component/hooks/usePanelPreferences.js +22 -30
  221. package/lib/component/hooks/useResizerStatus.js +5 -9
  222. package/lib/component/hooks/useSaveSettings.js +19 -49
  223. package/lib/component/hooks/useSpectraPerNucleus.js +7 -13
  224. package/lib/component/hooks/useSpectrum.js +7 -10
  225. package/lib/component/hooks/useTableSortBy.js +11 -18
  226. package/lib/component/hooks/useToolsFunctions.js +29 -35
  227. package/lib/component/hooks/useVerticalAlign.js +5 -9
  228. package/lib/component/hooks/useXScale.js +6 -10
  229. package/lib/component/hooks/useXYReduce.js +9 -13
  230. package/lib/component/loader/DefaultSpinnerComponent.js +5 -8
  231. package/lib/component/loader/DropZone.js +36 -38
  232. package/lib/component/loader/NoData.js +7 -9
  233. package/lib/component/loader/Spinner.js +11 -16
  234. package/lib/component/loader/SpinnerContext.js +7 -14
  235. package/lib/component/main/ErrorOverlay.js +6 -12
  236. package/lib/component/main/InnerNMRium.js +31 -61
  237. package/lib/component/main/InnerNMRiumContents.js +25 -32
  238. package/lib/component/main/NMRium.d.ts +0 -2
  239. package/lib/component/main/NMRium.js +11 -19
  240. package/lib/component/main/NMRiumStateProvider.js +27 -33
  241. package/lib/component/main/SplitPaneWrapper.js +6 -10
  242. package/lib/component/main/StateError.js +7 -11
  243. package/lib/component/main/index.js +3 -21
  244. package/lib/component/main/types.js +1 -2
  245. package/lib/component/modal/AboutPredictionModal.js +9 -14
  246. package/lib/component/modal/AboutSpectrumSimulationModal.js +9 -14
  247. package/lib/component/modal/AlignSpectraModal.js +29 -57
  248. package/lib/component/modal/CopyClipboardModal.js +7 -12
  249. package/lib/component/modal/EditPeakShapeModal.js +21 -49
  250. package/lib/component/modal/ExportAsJcampModal.js +16 -21
  251. package/lib/component/modal/ImportPublicationStringModal.js +19 -47
  252. package/lib/component/modal/LoadJCAMPModal.js +19 -49
  253. package/lib/component/modal/LogsHistoryModal.js +20 -27
  254. package/lib/component/modal/ModalStyle.js +2 -5
  255. package/lib/component/modal/MoleculeStructureEditorModal.js +18 -22
  256. package/lib/component/modal/MultipletAnalysisModal.js +23 -29
  257. package/lib/component/modal/PredictSpectraModal.js +32 -39
  258. package/lib/component/modal/SaveAsModal.js +23 -29
  259. package/lib/component/modal/aboutUs/AboutUsModal.js +16 -21
  260. package/lib/component/modal/aboutUs/AboutUsZakodium.js +11 -17
  261. package/lib/component/modal/changeSum/ChangeSumModal.js +6 -9
  262. package/lib/component/modal/changeSum/ChangeSumModalContents.js +20 -50
  263. package/lib/component/modal/changeSum/SelectMolecule.js +18 -24
  264. package/lib/component/modal/editRange/EditRangeModal.js +43 -48
  265. package/lib/component/modal/editRange/forms/components/AddSignalFormTab.js +25 -53
  266. package/lib/component/modal/editRange/forms/components/CouplingsTable.js +24 -29
  267. package/lib/component/modal/editRange/forms/components/DeltaInput.js +6 -11
  268. package/lib/component/modal/editRange/forms/components/SignalFormInfo.js +7 -11
  269. package/lib/component/modal/editRange/forms/components/SignalFormTab.js +7 -12
  270. package/lib/component/modal/editRange/forms/components/SignalsForm.js +40 -45
  271. package/lib/component/modal/editRange/forms/validation/EditRangeValidation.js +4 -29
  272. package/lib/component/modal/editZone/EditPathLengthFormik.js +14 -19
  273. package/lib/component/modal/editZone/EditZoneModal.js +24 -29
  274. package/lib/component/modal/editZone/SignalFormTab.js +4 -9
  275. package/lib/component/modal/editZone/SignalsForm.js +20 -25
  276. package/lib/component/modal/editZone/validation/EditZoneValidation.js +2 -27
  277. package/lib/component/modal/editZone/validation/isDefaultPathLength.js +5 -10
  278. package/lib/component/modal/metaImportation/MetaImportationModal.js +40 -68
  279. package/lib/component/modal/metaImportation/index.js +11 -19
  280. package/lib/component/modal/metaImportation/utils/mapColumnToSelectItems.js +1 -5
  281. package/lib/component/modal/setting/GeneralSettings.js +56 -84
  282. package/lib/component/modal/setting/WorkspaceItem.js +8 -13
  283. package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.js +22 -27
  284. package/lib/component/modal/setting/settings-tabs/DisplayTabContent.js +7 -12
  285. package/lib/component/modal/setting/settings-tabs/FormattingTabContent.js +16 -21
  286. package/lib/component/modal/setting/settings-tabs/GeneralTabContent.js +8 -13
  287. package/lib/component/modal/setting/settings-tabs/ImportationFiltersTabContent.js +12 -17
  288. package/lib/component/modal/setting/settings-tabs/InfoBlockTabContent.js +30 -35
  289. package/lib/component/modal/setting/settings-tabs/OnLoadProcessingTabContent.js +15 -20
  290. package/lib/component/modal/setting/settings-tabs/ToolsTabContent.js +6 -11
  291. package/lib/component/modal/setting/settingsValidation.js +20 -23
  292. package/lib/component/panels/AutomaticAssignment/AutomaticAssignment.js +16 -21
  293. package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +11 -16
  294. package/lib/component/panels/AutomaticAssignment/useAutoAssignments.js +16 -23
  295. package/lib/component/panels/InformationPanel.js +8 -14
  296. package/lib/component/panels/IntegralsPanel/IntegralPanel.js +44 -73
  297. package/lib/component/panels/IntegralsPanel/IntegralTable.js +38 -66
  298. package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +22 -27
  299. package/lib/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.js +12 -19
  300. package/lib/component/panels/MatrixGenerationPanel/FiltersOptions.js +30 -37
  301. package/lib/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +42 -71
  302. package/lib/component/panels/MoleculesPanel/MoleculeHeader.js +14 -20
  303. package/lib/component/panels/MoleculesPanel/MoleculePanel.js +34 -40
  304. package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +44 -50
  305. package/lib/component/panels/MoleculesPanel/Utilities.js +5 -13
  306. package/lib/component/panels/MoleculesPanel/useAtomAssignment.js +39 -45
  307. package/lib/component/panels/MultipleSpectraAnalysisPanel/AnalysisChart.js +31 -37
  308. package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +54 -60
  309. package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +25 -30
  310. package/lib/component/panels/MultipleSpectraAnalysisPanel/base/AnalysisCell.js +7 -9
  311. package/lib/component/panels/MultipleSpectraAnalysisPanel/base/AnalysisColumnHeader.js +12 -17
  312. package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.js +18 -25
  313. package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/LegendsPreferences.js +23 -28
  314. package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/MultipleAnalysisCodeEditor.js +12 -17
  315. package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/index.js +26 -54
  316. package/lib/component/panels/PanelNoData.js +3 -7
  317. package/lib/component/panels/Panels.js +50 -57
  318. package/lib/component/panels/PeaksPanel/PeaksPanel.js +54 -83
  319. package/lib/component/panels/PeaksPanel/PeaksPreferences.js +18 -23
  320. package/lib/component/panels/PeaksPanel/PeaksTable.js +42 -70
  321. package/lib/component/panels/PeaksPanel/PeaksToggleActions.js +5 -12
  322. package/lib/component/panels/RangesPanel/RangesHeader.js +36 -64
  323. package/lib/component/panels/RangesPanel/RangesPanel.js +45 -51
  324. package/lib/component/panels/RangesPanel/RangesPreferences.js +20 -25
  325. package/lib/component/panels/RangesPanel/RangesTable.js +16 -21
  326. package/lib/component/panels/RangesPanel/RangesTableRow.js +38 -43
  327. package/lib/component/panels/RangesPanel/TableColumns/AbsoluteColumn.js +4 -6
  328. package/lib/component/panels/RangesPanel/TableColumns/ActionsColumn.js +11 -16
  329. package/lib/component/panels/RangesPanel/TableColumns/CouplingColumn.js +7 -12
  330. package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +8 -10
  331. package/lib/component/panels/RangesPanel/TableColumns/RangeColumn.js +4 -6
  332. package/lib/component/panels/RangesPanel/TableColumns/RelativeColumn.js +10 -15
  333. package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +7 -12
  334. package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +9 -14
  335. package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.js +8 -10
  336. package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.js +21 -27
  337. package/lib/component/panels/RangesPanel/hooks/useMapRanges.js +17 -11
  338. package/lib/component/panels/SpectrumsPanel/SpectraPanelHeader.js +28 -34
  339. package/lib/component/panels/SpectrumsPanel/SpectraPreferences.js +26 -31
  340. package/lib/component/panels/SpectrumsPanel/SpectraTable.js +43 -50
  341. package/lib/component/panels/SpectrumsPanel/SpectrumListPanel.js +10 -15
  342. package/lib/component/panels/SpectrumsPanel/SpectrumsTabs.js +28 -34
  343. package/lib/component/panels/SpectrumsPanel/base/ColorIndicator.js +6 -8
  344. package/lib/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.js +11 -14
  345. package/lib/component/panels/SpectrumsPanel/base/SpectraColumnsManager.js +17 -24
  346. package/lib/component/panels/SpectrumsPanel/base/SpectrumName.js +8 -12
  347. package/lib/component/panels/SpectrumsPanel/base/setting/PlotChart.js +6 -9
  348. package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DHistogram.js +9 -14
  349. package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DSetting.js +7 -12
  350. package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DHistogram.js +9 -14
  351. package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DSetting.js +11 -16
  352. package/lib/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +13 -18
  353. package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +5 -9
  354. package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +41 -46
  355. package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +34 -39
  356. package/lib/component/panels/SummaryPanel/CorrelationTable/Constants.js +1 -7
  357. package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.js +13 -18
  358. package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +42 -47
  359. package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/Confirmation.js +7 -9
  360. package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditLinkModal.js +20 -49
  361. package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.js +21 -26
  362. package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +15 -20
  363. package/lib/component/panels/SummaryPanel/Overview.js +13 -15
  364. package/lib/component/panels/SummaryPanel/SetMolecularFormulaModal.js +14 -20
  365. package/lib/component/panels/SummaryPanel/SetShiftTolerancesModal.js +14 -20
  366. package/lib/component/panels/SummaryPanel/SummaryPanel.js +70 -98
  367. package/lib/component/panels/SummaryPanel/utilities/Utilities.js +41 -57
  368. package/lib/component/panels/SummaryPanel/utilities/useInView.js +8 -10
  369. package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +23 -28
  370. package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +4 -6
  371. package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +5 -10
  372. package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +14 -19
  373. package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +4 -6
  374. package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.js +5 -10
  375. package/lib/component/panels/ZonesPanel/ZonesPanel.js +42 -71
  376. package/lib/component/panels/ZonesPanel/ZonesPreferences.js +21 -26
  377. package/lib/component/panels/ZonesPanel/ZonesTable.js +21 -26
  378. package/lib/component/panels/ZonesPanel/ZonesTableRow.js +32 -37
  379. package/lib/component/panels/ZonesPanel/hooks/useMapZones.js +3 -7
  380. package/lib/component/panels/databasePanel/DatabasePanel.js +81 -87
  381. package/lib/component/panels/databasePanel/DatabasePreferences.js +19 -47
  382. package/lib/component/panels/databasePanel/DatabaseSearchOptions.js +22 -29
  383. package/lib/component/panels/databasePanel/DatabaseStructureSearchModal.js +6 -13
  384. package/lib/component/panels/databasePanel/DatabaseTable.js +27 -32
  385. package/lib/component/panels/extra/BasicPanelStyle.js +2 -5
  386. package/lib/component/panels/extra/placeholder/NoDataForFid.js +4 -10
  387. package/lib/component/panels/extra/placeholder/NoTableData.js +3 -5
  388. package/lib/component/panels/extra/preferences/ColumnsHelper.js +7 -15
  389. package/lib/component/panels/extra/preferences/NucleusGroup.js +4 -11
  390. package/lib/component/panels/extra/preferences/NucleusPreferences.js +5 -12
  391. package/lib/component/panels/extra/preferences/PreferencesContainer.js +3 -7
  392. package/lib/component/panels/extra/preferences/PreferencesGroup.js +4 -8
  393. package/lib/component/panels/extra/utilities/MultiplicityUtilities.js +5 -10
  394. package/lib/component/panels/extra/utilities/UseToggleStatus.js +6 -8
  395. package/lib/component/panels/filtersPanel/FilterPanel.js +12 -18
  396. package/lib/component/panels/filtersPanel/FiltersTable.js +33 -39
  397. package/lib/component/panels/header/DefaultPanelHeader.js +10 -17
  398. package/lib/component/panels/header/PanelHeader.js +3 -6
  399. package/lib/component/panels/header/PreferencesHeader.js +8 -13
  400. package/lib/component/panels/header/SpectraAutomaticPickingButton.js +15 -22
  401. package/lib/component/panels/predictionPanel/PredictionOptionsPanel.js +22 -50
  402. package/lib/component/panels/predictionPanel/PredictionPanel.js +40 -46
  403. package/lib/component/panels/predictionPanel/PredictionPreferences.js +13 -18
  404. package/lib/component/panels/predictionPanel/PredictionSimpleOptions.js +20 -48
  405. package/lib/component/panels/spectrumSimulation/SpectrumSimulation.js +31 -37
  406. package/lib/component/panels/spectrumSimulation/SpectrumSimulationPreferences.js +14 -19
  407. package/lib/component/panels/spectrumSimulation/SpectrumSimulationSimpleOptions.js +12 -18
  408. package/lib/component/panels/spectrumSimulation/SpinSystemTable.js +15 -22
  409. package/lib/component/reducer/IgnoreActions.js +1 -3
  410. package/lib/component/reducer/Reducer.js +29 -58
  411. package/lib/component/reducer/actions/AssignmentsActions.js +1 -4
  412. package/lib/component/reducer/actions/CorrelationsActions.js +27 -38
  413. package/lib/component/reducer/actions/DatabaseActions.js +14 -18
  414. package/lib/component/reducer/actions/DimensionsActions.js +1 -4
  415. package/lib/component/reducer/actions/DomainActions.js +25 -37
  416. package/lib/component/reducer/actions/FiltersActions.js +99 -128
  417. package/lib/component/reducer/actions/HistoryActions.js +4 -9
  418. package/lib/component/reducer/actions/IntegralsActions.js +34 -46
  419. package/lib/component/reducer/actions/LoadActions.js +32 -64
  420. package/lib/component/reducer/actions/MoleculeActions.js +26 -63
  421. package/lib/component/reducer/actions/PeaksActions.js +35 -49
  422. package/lib/component/reducer/actions/PreferencesActions.js +9 -17
  423. package/lib/component/reducer/actions/RangesActions.js +91 -117
  424. package/lib/component/reducer/actions/SpectraAnalysisAction.js +1 -4
  425. package/lib/component/reducer/actions/SpectrumsActions.js +63 -82
  426. package/lib/component/reducer/actions/ToolsActions.js +81 -129
  427. package/lib/component/reducer/actions/ZonesActions.js +63 -83
  428. package/lib/component/reducer/core/Constants.js +1 -4
  429. package/lib/component/reducer/helper/GetClosestNumber.js +1 -3
  430. package/lib/component/reducer/helper/Zoom1DManager.js +9 -13
  431. package/lib/component/reducer/helper/ZoomHistoryManager.js +2 -7
  432. package/lib/component/reducer/helper/get2DRange.js +4 -7
  433. package/lib/component/reducer/helper/getActiveSpectra.js +1 -5
  434. package/lib/component/reducer/helper/getActiveSpectraAsObject.js +4 -9
  435. package/lib/component/reducer/helper/getActiveSpectrum.js +1 -5
  436. package/lib/component/reducer/helper/getRange.js +4 -9
  437. package/lib/component/reducer/helper/getSpectrum.js +3 -7
  438. package/lib/component/reducer/helper/getStrongestPeak.js +5 -9
  439. package/lib/component/reducer/helper/getVerticalAlign.js +1 -5
  440. package/lib/component/reducer/preferences/actions/addWorkspace.js +9 -16
  441. package/lib/component/reducer/preferences/actions/analyzeSpectra.js +15 -45
  442. package/lib/component/reducer/preferences/actions/applyGeneralPreferences.js +1 -5
  443. package/lib/component/reducer/preferences/actions/initPreferences.js +11 -15
  444. package/lib/component/reducer/preferences/actions/matrixGeneration.js +7 -12
  445. package/lib/component/reducer/preferences/actions/removeWorkspace.js +4 -8
  446. package/lib/component/reducer/preferences/actions/setActiveWorkspace.js +4 -8
  447. package/lib/component/reducer/preferences/actions/setPanelsPreferences.js +3 -7
  448. package/lib/component/reducer/preferences/actions/setPreferences.js +10 -17
  449. package/lib/component/reducer/preferences/actions/setVerticalSplitterPosition.js +3 -7
  450. package/lib/component/reducer/preferences/actions/setWorkspace.js +8 -12
  451. package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +3 -12
  452. package/lib/component/reducer/preferences/preferencesReducer.js +51 -58
  453. package/lib/component/reducer/preferences/utilities/checkKeysExists.js +4 -8
  454. package/lib/component/reducer/preferences/utilities/filterObject.js +1 -5
  455. package/lib/component/reducer/preferences/utilities/flatObject.js +1 -5
  456. package/lib/component/reducer/preferences/utilities/getActiveWorkspace.js +1 -5
  457. package/lib/component/reducer/preferences/utilities/getPreferencesByWorkspace.js +4 -11
  458. package/lib/component/reducer/preferences/utilities/initWorkspace.js +4 -11
  459. package/lib/component/reducer/preferences/utilities/isReadOnlyWorkspace.js +1 -5
  460. package/lib/component/reducer/preferences/utilities/mapNucleiFormatting.js +1 -5
  461. package/lib/component/reducer/preferences/utilities/mapWorkspaces.js +4 -11
  462. package/lib/component/reducer/scaleReducer.js +15 -18
  463. package/lib/component/reducer/types/ActionType.js +1 -2
  464. package/lib/component/toolbar/BasicToolBar.js +52 -58
  465. package/lib/component/toolbar/FunctionToolBar.js +30 -36
  466. package/lib/component/toolbar/ToolBar.js +11 -17
  467. package/lib/component/toolbar/ToolTypes.js +10 -13
  468. package/lib/component/utility/Evaluate.js +1 -4
  469. package/lib/component/utility/Events.js +3 -8
  470. package/lib/component/utility/FileUtility.js +1 -5
  471. package/lib/component/utility/GroupByInfoKey.js +1 -4
  472. package/lib/component/utility/LocalStorage.js +15 -26
  473. package/lib/component/utility/PathBuilder.js +1 -5
  474. package/lib/component/utility/PreferencesHelper.js +5 -8
  475. package/lib/component/utility/assert.js +1 -5
  476. package/lib/component/utility/convertPathArrayToString.js +1 -5
  477. package/lib/component/utility/export.js +14 -27
  478. package/lib/component/utility/filterType.js +1 -2
  479. package/lib/component/utility/formatNumber.js +3 -10
  480. package/lib/component/utility/getSpectraByNucleus.js +3 -10
  481. package/lib/component/utility/getSpectraObjectPaths.js +1 -5
  482. package/lib/component/utility/getUniqueNuclei.js +1 -5
  483. package/lib/component/utility/isGoogleDocument.js +1 -5
  484. package/lib/component/utility/jpathToArray.js +1 -5
  485. package/lib/component/utility/nucleusToString.js +2 -7
  486. package/lib/component/utility/parseColor.js +1 -5
  487. package/lib/component/workspaces/assignment.js +1 -4
  488. package/lib/component/workspaces/basic.js +1 -4
  489. package/lib/component/workspaces/embedded.js +1 -4
  490. package/lib/component/workspaces/exercise.js +1 -4
  491. package/lib/component/workspaces/index.js +15 -17
  492. package/lib/component/workspaces/prediction.js +1 -4
  493. package/lib/component/workspaces/process1D.js +1 -4
  494. package/lib/component/workspaces/simulation.js +1 -4
  495. package/lib/component/workspaces/workspaceDefaultProperties.js +22 -25
  496. package/lib/constants.js +7 -10
  497. package/lib/data/PredictionManager.js +28 -37
  498. package/lib/data/SpectraManager.js +20 -49
  499. package/lib/data/constants/DefaultApodizationOptions.js +1 -4
  500. package/lib/data/constants/DefaultPathLengths.js +1 -3
  501. package/lib/data/constants/Multiplets.js +2 -5
  502. package/lib/data/constants/References.js +4 -8
  503. package/lib/data/constants/signalsKinds.js +5 -8
  504. package/lib/data/data1d/Spectrum1D/SumManager.js +11 -22
  505. package/lib/data/data1d/Spectrum1D/cloneDatum1D.js +1 -5
  506. package/lib/data/data1d/Spectrum1D/convertDataToFloat64Array.js +1 -5
  507. package/lib/data/data1d/Spectrum1D/generateJGraphData.js +3 -6
  508. package/lib/data/data1d/Spectrum1D/generateSpectrumFromPublicationString.js +5 -9
  509. package/lib/data/data1d/Spectrum1D/get1DColor.js +3 -7
  510. package/lib/data/data1d/Spectrum1D/get1DDataXY.js +1 -5
  511. package/lib/data/data1d/Spectrum1D/getReferenceShift.js +10 -17
  512. package/lib/data/data1d/Spectrum1D/index.js +19 -45
  513. package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +23 -27
  514. package/lib/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.js +1 -5
  515. package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +5 -12
  516. package/lib/data/data1d/Spectrum1D/isRangeAssigned.js +1 -5
  517. package/lib/data/data1d/Spectrum1D/isSpectrum1D.js +1 -5
  518. package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +6 -13
  519. package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.js +5 -12
  520. package/lib/data/data1d/Spectrum1D/peaks/lookupPeak.js +3 -10
  521. package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js +7 -11
  522. package/lib/data/data1d/Spectrum1D/ranges/addRange.js +13 -21
  523. package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.js +3 -6
  524. package/lib/data/data1d/Spectrum1D/ranges/changeRange.js +9 -16
  525. package/lib/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +1 -5
  526. package/lib/data/data1d/Spectrum1D/ranges/changeRangeSignal.js +1 -5
  527. package/lib/data/data1d/Spectrum1D/ranges/checkRangeKind.js +4 -8
  528. package/lib/data/data1d/Spectrum1D/ranges/detectRange.js +9 -13
  529. package/lib/data/data1d/Spectrum1D/ranges/detectRanges.js +8 -15
  530. package/lib/data/data1d/Spectrum1D/ranges/detectSignal.js +11 -15
  531. package/lib/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.js +5 -9
  532. package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.js +5 -12
  533. package/lib/data/data1d/database.js +16 -24
  534. package/lib/data/data1d/multipleSpectraAnalysis.js +22 -37
  535. package/lib/data/data1d/spectrumSimulation.js +5 -10
  536. package/lib/data/data2d/Processing2D.js +7 -11
  537. package/lib/data/data2d/Spectrum2D/cloneDatum2D.js +1 -5
  538. package/lib/data/data2d/Spectrum2D/contours.js +5 -11
  539. package/lib/data/data2d/Spectrum2D/get2DColor.js +3 -7
  540. package/lib/data/data2d/Spectrum2D/get2DSpectrumErrorValue.js +1 -5
  541. package/lib/data/data2d/Spectrum2D/getMissingProjection.js +5 -9
  542. package/lib/data/data2d/Spectrum2D/getShift.js +4 -8
  543. package/lib/data/data2d/Spectrum2D/getSlice.js +7 -11
  544. package/lib/data/data2d/Spectrum2D/index.js +9 -21
  545. package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +11 -15
  546. package/lib/data/data2d/Spectrum2D/isSpectrum2D.js +1 -5
  547. package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.js +4 -8
  548. package/lib/data/data2d/Spectrum2D/zones/detectZones.js +5 -9
  549. package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.js +5 -9
  550. package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.js +3 -7
  551. package/lib/data/data2d/Spectrum2D/zones/initiateZones.js +5 -12
  552. package/lib/data/data2d/Spectrum2D/zones/isZoneExists.js +1 -5
  553. package/lib/data/data2d/Spectrum2D/zones/updateZones.js +3 -7
  554. package/lib/data/defaults/13c.js +1 -3
  555. package/lib/data/defaults/1h.js +1 -3
  556. package/lib/data/defaults/default.js +5 -12
  557. package/lib/data/getDefaultMatrixFilters.js +3 -10
  558. package/lib/data/matrixGeneration.js +10 -18
  559. package/lib/data/molecules/Molecule.js +9 -17
  560. package/lib/data/molecules/MoleculeManager.js +20 -30
  561. package/lib/data/parseMeta/index.js +4 -14
  562. package/lib/data/parseMeta/isMetaFile.js +1 -5
  563. package/lib/data/parseMeta/linkMetaWithSpectra.js +8 -17
  564. package/lib/data/parseMeta/mapErrors.js +1 -5
  565. package/lib/data/parseMeta/parseMetaFile.js +3 -7
  566. package/lib/data/parseMeta/prepareKey.js +1 -5
  567. package/lib/data/types/common/File.js +1 -2
  568. package/lib/data/types/common/Info.js +1 -2
  569. package/lib/data/types/common/MapOptions.js +1 -2
  570. package/lib/data/types/common/Nucleus.js +1 -2
  571. package/lib/data/types/common/SignalKind.js +1 -2
  572. package/lib/data/types/data1d/ComplexData1D.js +1 -2
  573. package/lib/data/types/data1d/ExclusionZone.js +1 -2
  574. package/lib/data/types/data1d/MatrixOptions.js +1 -2
  575. package/lib/data/types/data1d/RangeDetectionResult.js +1 -2
  576. package/lib/data/types/data1d/index.js +1 -2
  577. package/lib/data/types/data2d/ContourOptions.js +1 -2
  578. package/lib/data/types/data2d/index.js +1 -2
  579. package/lib/data/utilities/Concatenation.js +3 -7
  580. package/lib/data/utilities/FindUtilities.js +1 -9
  581. package/lib/data/utilities/RangeUtilities.js +16 -31
  582. package/lib/data/utilities/ZoneUtilities.js +10 -21
  583. package/lib/data/utilities/calculateSanPlot.js +3 -7
  584. package/lib/data/utilities/checkModifierKeyActivated.js +1 -4
  585. package/lib/data/utilities/convertSpectraListToObject.js +1 -5
  586. package/lib/data/utilities/generateChar.js +1 -4
  587. package/lib/data/utilities/generateColor.js +5 -11
  588. package/lib/data/utilities/generateNumbersPowerOfX.js +1 -4
  589. package/lib/data/utilities/getAtom.js +1 -4
  590. package/lib/data/utilities/getAtomsFromMF.js +1 -4
  591. package/lib/data/utilities/getSum.js +1 -5
  592. package/lib/data/utilities/isInRange.js +1 -4
  593. package/lib/data/utilities/isNumber.js +1 -5
  594. package/lib/types/NMRiumDataReturn.js +1 -2
  595. package/lib/types/UsedColors.js +1 -2
  596. package/lib/utils/clipboard/clipboard.d.ts +1 -1
  597. package/lib/utils/clipboard/clipboard.js +5 -13
  598. package/lib/utils/clipboard/clipboardComponents.js +28 -36
  599. package/lib/utils/clipboard/clipboardHooks.js +18 -25
  600. package/lib/utils/clipboard/types.js +1 -2
  601. package/lib/utils/stringCapitalize.js +1 -5
  602. package/lib/versionInfo.js +1 -3
  603. package/package.json +2 -2
@@ -1,47 +1,19 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- const jsx_runtime_1 = require("react/jsx-runtime");
30
- const nmr_processing_1 = require("nmr-processing");
31
- const DefaultApodizationOptions_1 = require("../../data/constants/DefaultApodizationOptions");
32
- const ChartContext_1 = require("../context/ChartContext");
33
- const ScaleContext_1 = require("../context/ScaleContext");
34
- const useActiveSpectrum_1 = require("../hooks/useActiveSpectrum");
35
- const useSpectrum_1 = __importDefault(require("../hooks/useSpectrum"));
36
- const useVerticalAlign_1 = require("../hooks/useVerticalAlign");
37
- const useXYReduce_1 = __importStar(require("../hooks/useXYReduce"));
38
- const PathBuilder_1 = require("../utility/PathBuilder");
39
- const scale_1 = require("./utilities/scale");
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Filters, apodization } from 'nmr-processing';
3
+ import { defaultApodizationOptions } from '../../data/constants/DefaultApodizationOptions';
4
+ import { useChartData } from '../context/ChartContext';
5
+ import { useScaleChecked } from '../context/ScaleContext';
6
+ import { useActiveSpectrum } from '../hooks/useActiveSpectrum';
7
+ import useSpectrum from '../hooks/useSpectrum';
8
+ import { useVerticalAlign } from '../hooks/useVerticalAlign';
9
+ import useXYReduce, { XYReducerDomainAxis } from '../hooks/useXYReduce';
10
+ import { PathBuilder } from '../utility/PathBuilder';
11
+ import { getYScale } from './utilities/scale';
40
12
  const emptyData = { data: {}, info: {} };
41
13
  function useWindowYScale() {
42
- const { height, margin, yDomains } = (0, ChartContext_1.useChartData)();
43
- const verticalAlign = (0, useVerticalAlign_1.useVerticalAlign)();
44
- return (0, scale_1.getYScale)({
14
+ const { height, margin, yDomains } = useChartData();
15
+ const verticalAlign = useVerticalAlign();
16
+ return getYScale({
45
17
  height,
46
18
  margin,
47
19
  verticalAlign,
@@ -50,22 +22,22 @@ function useWindowYScale() {
50
22
  });
51
23
  }
52
24
  function ApodizationLine() {
53
- const { toolOptions: { selectedTool, data: { apodizationOptions }, }, } = (0, ChartContext_1.useChartData)();
54
- const activeSpectrum = (0, useActiveSpectrum_1.useActiveSpectrum)();
55
- const { scaleX } = (0, ScaleContext_1.useScaleChecked)();
56
- const spectrum = (0, useSpectrum_1.default)({ emptyData });
57
- const xyReduce = (0, useXYReduce_1.default)(useXYReduce_1.XYReducerDomainAxis.XAxis);
25
+ const { toolOptions: { selectedTool, data: { apodizationOptions }, }, } = useChartData();
26
+ const activeSpectrum = useActiveSpectrum();
27
+ const { scaleX } = useScaleChecked();
28
+ const spectrum = useSpectrum({ emptyData });
29
+ const xyReduce = useXYReduce(XYReducerDomainAxis.XAxis);
58
30
  const scaleY = useWindowYScale();
59
- if (!activeSpectrum?.id || selectedTool !== nmr_processing_1.Filters.apodization.id) {
31
+ if (!activeSpectrum?.id || selectedTool !== Filters.apodization.id) {
60
32
  return null;
61
33
  }
62
34
  const paths = () => {
63
- const pathBuilder = new PathBuilder_1.PathBuilder();
35
+ const pathBuilder = new PathBuilder();
64
36
  const { re, im = [], x } = spectrum.data;
65
- const { lineBroadening, gaussBroadening, lineBroadeningCenter } = apodizationOptions || DefaultApodizationOptions_1.defaultApodizationOptions;
37
+ const { lineBroadening, gaussBroadening, lineBroadeningCenter } = apodizationOptions || defaultApodizationOptions;
66
38
  const length = re.length;
67
39
  const dw = (x[length - 1] - x[0]) / (length - 1);
68
- const { windowData: y } = (0, nmr_processing_1.apodization)({ re, im }, {
40
+ const { windowData: y } = apodization({ re, im }, {
69
41
  apply: false,
70
42
  compose: {
71
43
  length,
@@ -98,6 +70,6 @@ function ApodizationLine() {
98
70
  return '';
99
71
  }
100
72
  };
101
- return ((0, jsx_runtime_1.jsx)("path", { "data-testid": "apodization-line", stroke: "green", fill: "none", strokeWidth: "2", d: paths() }));
73
+ return (_jsx("path", { "data-testid": "apodization-line", stroke: "green", fill: "none", strokeWidth: "2", d: paths() }));
102
74
  }
103
- exports.default = ApodizationLine;
75
+ export default ApodizationLine;
@@ -1,27 +1,22 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const jsx_runtime_1 = require("react/jsx-runtime");
7
- const SpectrumInfoBlock_1 = __importDefault(require("../1d-2d/components/SpectrumInfoBlock"));
8
- const PreferencesContext_1 = require("../context/PreferencesContext");
9
- const ApodizationLine_1 = __importDefault(require("./ApodizationLine"));
10
- const ExclusionZonesAnnotations_1 = __importDefault(require("./ExclusionZonesAnnotations"));
11
- const LinesSeries_1 = __importDefault(require("./LinesSeries"));
12
- const SpectraLegends_1 = __importDefault(require("./SpectraLegends"));
13
- const XAxis_1 = __importDefault(require("./XAxis"));
14
- const DatabaseElements_1 = __importDefault(require("./database/DatabaseElements"));
15
- const IntegralsSeries_1 = __importDefault(require("./integral/IntegralsSeries"));
16
- const JGraph_1 = __importDefault(require("./jCouplingGraph/JGraph"));
17
- const MultiAnalysisRanges_1 = __importDefault(require("./multiAnalysis/MultiAnalysisRanges"));
18
- const PeakEditionManager_1 = require("./peaks/PeakEditionManager");
19
- const Peaks_1 = __importDefault(require("./peaks/Peaks"));
20
- const PeaksShapes_1 = __importDefault(require("./peaks/PeaksShapes"));
21
- const Ranges_1 = __importDefault(require("./ranges/Ranges"));
22
- const BaseLineZones_1 = __importDefault(require("./tool/BaseLineZones"));
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import SpectrumInfoBlock from '../1d-2d/components/SpectrumInfoBlock';
3
+ import { usePreferences } from '../context/PreferencesContext';
4
+ import ApodizationLine from './ApodizationLine';
5
+ import ExclusionZonesAnnotations from './ExclusionZonesAnnotations';
6
+ import LinesSeries from './LinesSeries';
7
+ import SpectraTracker from './SpectraLegends';
8
+ import XAxis from './XAxis';
9
+ import DatabaseElements from './database/DatabaseElements';
10
+ import IntegralsSeries from './integral/IntegralsSeries';
11
+ import JGraph from './jCouplingGraph/JGraph';
12
+ import MultiAnalysisRanges from './multiAnalysis/MultiAnalysisRanges';
13
+ import { PeakEditionProvider } from './peaks/PeakEditionManager';
14
+ import Peaks from './peaks/Peaks';
15
+ import PeaksShapes from './peaks/PeaksShapes';
16
+ import Ranges from './ranges/Ranges';
17
+ import BaseLineZones from './tool/BaseLineZones';
23
18
  function Chart1D({ mode, width, height, margin, displayerKey }) {
24
- const { current: { general: { spectraRendering }, }, } = (0, PreferencesContext_1.usePreferences)();
25
- return ((0, jsx_runtime_1.jsx)(PeakEditionManager_1.PeakEditionProvider, { children: (0, jsx_runtime_1.jsxs)("svg", { viewBox: `0 0 ${width} ${height}`, width: width, height: height, id: "nmrSVG", shapeRendering: spectraRendering, children: [(0, jsx_runtime_1.jsx)("defs", { children: (0, jsx_runtime_1.jsx)("clipPath", { id: `${displayerKey}clip-chart-1d`, children: (0, jsx_runtime_1.jsx)("rect", { width: `${width - margin.left - margin.right}`, height: `${height}`, x: `${margin.left}`, y: `${0}` }) }) }), (0, jsx_runtime_1.jsx)(LinesSeries_1.default, {}), (0, jsx_runtime_1.jsx)(ApodizationLine_1.default, {}), (0, jsx_runtime_1.jsx)(IntegralsSeries_1.default, {}), (0, jsx_runtime_1.jsx)(Peaks_1.default, { peaksSource: "peaks" }), (0, jsx_runtime_1.jsx)(Ranges_1.default, {}), (0, jsx_runtime_1.jsx)(Peaks_1.default, { peaksSource: "ranges" }), (0, jsx_runtime_1.jsx)(JGraph_1.default, {}), (0, jsx_runtime_1.jsx)(MultiAnalysisRanges_1.default, {}), (0, jsx_runtime_1.jsx)(BaseLineZones_1.default, {}), (0, jsx_runtime_1.jsx)(ExclusionZonesAnnotations_1.default, {}), (0, jsx_runtime_1.jsx)(DatabaseElements_1.default, {}), (0, jsx_runtime_1.jsx)(PeaksShapes_1.default, {}), (0, jsx_runtime_1.jsx)(SpectraLegends_1.default, {}), (0, jsx_runtime_1.jsx)(SpectrumInfoBlock_1.default, {}), (0, jsx_runtime_1.jsx)("g", { className: "container", style: { pointerEvents: 'none' }, children: (0, jsx_runtime_1.jsx)(XAxis_1.default, { showGrid: true, mode: mode }) })] }) }));
19
+ const { current: { general: { spectraRendering }, }, } = usePreferences();
20
+ return (_jsx(PeakEditionProvider, { children: _jsxs("svg", { viewBox: `0 0 ${width} ${height}`, width: width, height: height, id: "nmrSVG", shapeRendering: spectraRendering, children: [_jsx("defs", { children: _jsx("clipPath", { id: `${displayerKey}clip-chart-1d`, children: _jsx("rect", { width: `${width - margin.left - margin.right}`, height: `${height}`, x: `${margin.left}`, y: `${0}` }) }) }), _jsx(LinesSeries, {}), _jsx(ApodizationLine, {}), _jsx(IntegralsSeries, {}), _jsx(Peaks, { peaksSource: "peaks" }), _jsx(Ranges, {}), _jsx(Peaks, { peaksSource: "ranges" }), _jsx(JGraph, {}), _jsx(MultiAnalysisRanges, {}), _jsx(BaseLineZones, {}), _jsx(ExclusionZonesAnnotations, {}), _jsx(DatabaseElements, {}), _jsx(PeaksShapes, {}), _jsx(SpectraTracker, {}), _jsx(SpectrumInfoBlock, {}), _jsx("g", { className: "container", style: { pointerEvents: 'none' }, children: _jsx(XAxis, { showGrid: true, mode: mode }) })] }) }));
26
21
  }
27
- exports.default = Chart1D;
22
+ export default Chart1D;
@@ -1,34 +1,29 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
1
+ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
7
2
  /** @jsxImportSource @emotion/react */
8
- const react_1 = require("@emotion/react");
9
- const nmr_processing_1 = require("nmr-processing");
10
- const react_2 = require("react");
11
- const ScaleContext_1 = require("../context/ScaleContext");
12
- const highlight_1 = require("../highlight");
13
- const useActiveSpectrumStyleOptions_1 = __importDefault(require("../hooks/useActiveSpectrumStyleOptions"));
14
- const style = (0, react_1.css) `
3
+ import { css } from '@emotion/react';
4
+ import { Filters } from 'nmr-processing';
5
+ import { memo } from 'react';
6
+ import { useScaleChecked } from '../context/ScaleContext';
7
+ import { HighlightEventSource, useHighlight } from '../highlight';
8
+ import useActiveSpectrumStyleOptions from '../hooks/useActiveSpectrumStyleOptions';
9
+ const style = css `
15
10
  &:hover {
16
11
  fill: #ff6f0057 !important;
17
12
  }
18
13
  `;
19
14
  function ExclusionZoneAnnotation({ zone, color, vAlign, spectrumID, filterId, }) {
20
- const { scaleX, scaleY } = (0, ScaleContext_1.useScaleChecked)();
21
- const type = filterId === nmr_processing_1.Filters.signalProcessing.id
22
- ? highlight_1.HighlightEventSource.MATRIX_GENERATION_EXCLUSION_ZONE
23
- : highlight_1.HighlightEventSource.EXCLUSION_ZONE;
24
- const highlight = (0, highlight_1.useHighlight)([], {
15
+ const { scaleX, scaleY } = useScaleChecked();
16
+ const type = filterId === Filters.signalProcessing.id
17
+ ? HighlightEventSource.MATRIX_GENERATION_EXCLUSION_ZONE
18
+ : HighlightEventSource.EXCLUSION_ZONE;
19
+ const highlight = useHighlight([], {
25
20
  type,
26
21
  extra: { zone, spectrumID },
27
22
  });
28
- const { opacity } = (0, useActiveSpectrumStyleOptions_1.default)(spectrumID);
29
- return ((0, jsx_runtime_1.jsx)("g", { transform: `translate(${scaleX()(zone.to)},0)`, children: (0, jsx_runtime_1.jsx)("rect", { x: "0", css: style, transform: `translate(0,${scaleY()(0) - (vAlign + 5)})`, width: `${scaleX()(zone.from) - scaleX()(zone.to)}`, height: "10px", style: {
30
- fill: filterId === nmr_processing_1.Filters.signalProcessing.id ? 'gray' : color,
23
+ const { opacity } = useActiveSpectrumStyleOptions(spectrumID);
24
+ return (_jsx("g", { transform: `translate(${scaleX()(zone.to)},0)`, children: _jsx("rect", { x: "0", css: style, transform: `translate(0,${scaleY()(0) - (vAlign + 5)})`, width: `${scaleX()(zone.from) - scaleX()(zone.to)}`, height: "10px", style: {
25
+ fill: filterId === Filters.signalProcessing.id ? 'gray' : color,
31
26
  opacity,
32
27
  }, ...highlight.onHover }) }, zone.id));
33
28
  }
34
- exports.default = (0, react_2.memo)(ExclusionZoneAnnotation);
29
+ export default memo(ExclusionZoneAnnotation);
@@ -1,43 +1,38 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const jsx_runtime_1 = require("react/jsx-runtime");
7
- const nmr_processing_1 = require("nmr-processing");
8
- const react_1 = require("react");
9
- const ChartContext_1 = require("../context/ChartContext");
10
- const ScaleContext_1 = require("../context/ScaleContext");
11
- const useSpectraPerNucleus_1 = __importDefault(require("../hooks/useSpectraPerNucleus"));
12
- const ExclusionZoneAnnotation_1 = __importDefault(require("./ExclusionZoneAnnotation"));
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Filters } from 'nmr-processing';
3
+ import { memo } from 'react';
4
+ import { useChartData } from '../context/ChartContext';
5
+ import { useScale } from '../context/ScaleContext';
6
+ import useSpectraByActiveNucleus from '../hooks/useSpectraPerNucleus';
7
+ import ExclusionZoneAnnotation from './ExclusionZoneAnnotation';
13
8
  function ExclusionZonesAnnotationsInner({ displayerKey, xDomains, spectra, shiftY, }) {
14
- return ((0, jsx_runtime_1.jsx)("g", { className: "spectrum-exclusion-zones-group", clipPath: `url(#${displayerKey}clip-chart-1d)`, children: spectra
9
+ return (_jsx("g", { className: "spectrum-exclusion-zones-group", clipPath: `url(#${displayerKey}clip-chart-1d)`, children: spectra
15
10
  .filter((d) => d.display.isVisible && xDomains[d.id])
16
11
  .map((d, index) => getExclusionZones(d).map((record) => {
17
12
  return record.zones.map((zone) => {
18
- return ((0, jsx_runtime_1.jsx)(ExclusionZoneAnnotation_1.default, { spectrumID: d.id, vAlign: shiftY * index, zone: zone, filterId: record.id, color: d.display.color }, zone.id));
13
+ return (_jsx(ExclusionZoneAnnotation, { spectrumID: d.id, vAlign: shiftY * index, zone: zone, filterId: record.id, color: d.display.color }, zone.id));
19
14
  });
20
15
  })) }));
21
16
  }
22
- const MemoizedPeakAnnotations = (0, react_1.memo)(ExclusionZonesAnnotationsInner);
17
+ const MemoizedPeakAnnotations = memo(ExclusionZonesAnnotationsInner);
23
18
  function ExclusionZonesAnnotations() {
24
- const { displayerKey, xDomains, displayerMode } = (0, ChartContext_1.useChartData)();
25
- const { shiftY } = (0, ScaleContext_1.useScale)();
26
- const spectra = (0, useSpectraPerNucleus_1.default)();
19
+ const { displayerKey, xDomains, displayerMode } = useChartData();
20
+ const { shiftY } = useScale();
21
+ const spectra = useSpectraByActiveNucleus();
27
22
  if (displayerMode !== '1D')
28
23
  return null;
29
- return ((0, jsx_runtime_1.jsx)(MemoizedPeakAnnotations, { spectra: spectra, displayerKey: displayerKey, xDomains: xDomains, shiftY: shiftY }));
24
+ return (_jsx(MemoizedPeakAnnotations, { spectra: spectra, displayerKey: displayerKey, xDomains: xDomains, shiftY: shiftY }));
30
25
  }
31
- exports.default = ExclusionZonesAnnotations;
26
+ export default ExclusionZonesAnnotations;
32
27
  function getExclusionZones(data) {
33
28
  const zones = [];
34
29
  for (const filter of data.filters) {
35
- if (filter.name === nmr_processing_1.Filters.exclusionZones.id && filter.flag) {
36
- zones.push({ id: nmr_processing_1.Filters.exclusionZones.id, zones: filter.value });
30
+ if (filter.name === Filters.exclusionZones.id && filter.flag) {
31
+ zones.push({ id: Filters.exclusionZones.id, zones: filter.value });
37
32
  }
38
- else if (filter.name === nmr_processing_1.Filters.signalProcessing.id && filter.flag) {
33
+ else if (filter.name === Filters.signalProcessing.id && filter.flag) {
39
34
  zones.push({
40
- id: nmr_processing_1.Filters.signalProcessing.id,
35
+ id: Filters.signalProcessing.id,
41
36
  zones: filter.value.exclusionsZones,
42
37
  });
43
38
  }
@@ -1,24 +1,19 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@emotion/react/jsx-runtime";
7
2
  /** @jsxImportSource @emotion/react */
8
- const react_1 = require("@emotion/react");
9
- const ml_spectra_processing_1 = require("ml-spectra-processing");
10
- const react_2 = require("react");
11
- const bs_1 = require("react-icons/bs");
12
- const io5_1 = require("react-icons/io5");
13
- const get1DDataXY_1 = require("../../data/data1d/Spectrum1D/get1DDataXY");
14
- const BrushTracker_1 = require("../EventsTrackers/BrushTracker");
15
- const MouseTracker_1 = require("../EventsTrackers/MouseTracker");
16
- const ChartContext_1 = require("../context/ChartContext");
17
- const ScaleContext_1 = require("../context/ScaleContext");
18
- const useActiveSpectrum_1 = require("../hooks/useActiveSpectrum");
19
- const useFormatNumberByNucleus_1 = require("../hooks/useFormatNumberByNucleus");
20
- const useSpectrum_1 = __importDefault(require("../hooks/useSpectrum"));
21
- const styles = (0, react_1.css) `
3
+ import { css } from '@emotion/react';
4
+ import { xFindClosestIndex } from 'ml-spectra-processing';
5
+ import { memo } from 'react';
6
+ import { BsCursor } from 'react-icons/bs';
7
+ import { IoPulseSharp } from 'react-icons/io5';
8
+ import { get1DDataXY } from '../../data/data1d/Spectrum1D/get1DDataXY';
9
+ import { useBrushTracker } from '../EventsTrackers/BrushTracker';
10
+ import { useMouseTracker } from '../EventsTrackers/MouseTracker';
11
+ import { useChartData } from '../context/ChartContext';
12
+ import { useScaleChecked } from '../context/ScaleContext';
13
+ import { useActiveSpectrum } from '../hooks/useActiveSpectrum';
14
+ import { useFormatNumberByNucleus } from '../hooks/useFormatNumberByNucleus';
15
+ import useSpectrum from '../hooks/useSpectrum';
16
+ const styles = css `
22
17
  display: flex;
23
18
  align-items: center;
24
19
  pointer-events: bounding-box;
@@ -81,42 +76,41 @@ const styles = (0, react_1.css) `
81
76
  }
82
77
  `;
83
78
  function FooterBannerInner({ margin, width, height, activeSpectrum, spectrum, activeTab, }) {
84
- const position = (0, MouseTracker_1.useMouseTracker)();
85
- const { startX, endX, step, mouseButton } = (0, BrushTracker_1.useBrushTracker)();
86
- const { scaleX } = (0, ScaleContext_1.useScaleChecked)();
87
- const format = (0, useFormatNumberByNucleus_1.useFormatNumberByNucleus)(activeTab);
79
+ const position = useMouseTracker();
80
+ const { startX, endX, step, mouseButton } = useBrushTracker();
81
+ const { scaleX } = useScaleChecked();
82
+ const format = useFormatNumberByNucleus(activeTab);
88
83
  if (!position ||
89
84
  position.y < margin.top ||
90
85
  position.x < margin.left ||
91
86
  position.x > width - margin.right ||
92
87
  position.y > height - margin.bottom) {
93
- return (0, jsx_runtime_1.jsx)("div", { css: styles });
88
+ return _jsx("div", { css: styles });
94
89
  }
95
90
  function getXIndex(xPosition) {
96
91
  if (spectrum) {
97
- const data = (0, get1DDataXY_1.get1DDataXY)(spectrum);
98
- return (0, ml_spectra_processing_1.xFindClosestIndex)(data.x, scaleX().invert(xPosition));
92
+ const data = get1DDataXY(spectrum);
93
+ return xFindClosestIndex(data.x, scaleX().invert(xPosition));
99
94
  }
100
95
  return 0;
101
96
  }
102
97
  function getYValue(xPosition) {
103
98
  if (spectrum) {
104
- const data = (0, get1DDataXY_1.get1DDataXY)(spectrum);
99
+ const data = get1DDataXY(spectrum);
105
100
  const xIndex = getXIndex(xPosition);
106
101
  return data.y[xIndex];
107
102
  }
108
103
  return 1;
109
104
  }
110
105
  const isBrushing = step === 'brushing' && mouseButton === 'main';
111
- return ((0, jsx_runtime_1.jsxs)("div", { css: styles, children: [(0, jsx_runtime_1.jsx)(bs_1.BsCursor, {}), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("span", { className: "label", children: " \uD835\uDEC5: " }), (0, jsx_runtime_1.jsx)("span", { className: "value", children: format(scaleX().invert(position.x)) }), (0, jsx_runtime_1.jsx)("span", { className: "unit", children: "ppm" }), activeSpectrum && spectrum?.info?.originFrequency && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("span", { className: "value", children: ["\u00A0(", format(scaleX().invert(position.x) * spectrum?.info?.originFrequency, 'hz')] }), (0, jsx_runtime_1.jsx)("span", { className: "unit", children: "Hz" }), (0, jsx_runtime_1.jsx)("span", { className: "value", children: ") " }), (0, jsx_runtime_1.jsxs)("span", { className: "small-width-none", children: [(0, jsx_runtime_1.jsx)("span", { children: "," }), (0, jsx_runtime_1.jsx)("span", { className: "label", children: " Index: " }), (0, jsx_runtime_1.jsx)("span", { className: "value", children: getXIndex(position.x) })] })] }))] }), isBrushing && ((0, jsx_runtime_1.jsxs)("div", { className: "flex-row small-width-none", children: [(0, jsx_runtime_1.jsx)("span", { className: "label", children: " \u0394ppm: " }), (0, jsx_runtime_1.jsx)("span", { className: "value", children: (scaleX().invert(startX) - scaleX().invert(endX)).toPrecision(6) })] })), activeSpectrum && ((0, jsx_runtime_1.jsxs)("div", { className: " flex-row small-width-none", children: [spectrum?.info?.originFrequency && isBrushing && ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("span", { className: "label", children: " \u0394Hz: " }), (0, jsx_runtime_1.jsx)("span", { className: "value", children: ((scaleX().invert(startX) - scaleX().invert(endX)) *
112
- spectrum?.info?.originFrequency).toPrecision(5) })] })), isBrushing && ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("span", { className: "label", children: " ratio :" }), (0, jsx_runtime_1.jsxs)("span", { className: "value", children: [((getYValue(startX) / (getYValue(endX) || Number.MIN_VALUE)) *
113
- 100).toFixed(2), "%"] })] }))] })), activeSpectrum && ((0, jsx_runtime_1.jsxs)("div", { className: "flex-row small-width-none", children: [(0, jsx_runtime_1.jsx)("div", { className: "separator" }), (0, jsx_runtime_1.jsx)(io5_1.IoPulseSharp, {}), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("span", { className: "label", children: "Intensity: " }), (0, jsx_runtime_1.jsx)("span", { className: "value y-value", children: format(getYValue(position.x)) })] })] }))] }));
106
+ return (_jsxs("div", { css: styles, children: [_jsx(BsCursor, {}), _jsxs("div", { children: [_jsx("span", { className: "label", children: " \uD835\uDEC5: " }), _jsx("span", { className: "value", children: format(scaleX().invert(position.x)) }), _jsx("span", { className: "unit", children: "ppm" }), activeSpectrum && spectrum?.info?.originFrequency && (_jsxs(_Fragment, { children: [_jsxs("span", { className: "value", children: ["\u00A0(", format(scaleX().invert(position.x) * spectrum?.info?.originFrequency, 'hz')] }), _jsx("span", { className: "unit", children: "Hz" }), _jsx("span", { className: "value", children: ") " }), _jsxs("span", { className: "small-width-none", children: [_jsx("span", { children: "," }), _jsx("span", { className: "label", children: " Index: " }), _jsx("span", { className: "value", children: getXIndex(position.x) })] })] }))] }), isBrushing && (_jsxs("div", { className: "flex-row small-width-none", children: [_jsx("span", { className: "label", children: " \u0394ppm: " }), _jsx("span", { className: "value", children: (scaleX().invert(startX) - scaleX().invert(endX)).toPrecision(6) })] })), activeSpectrum && (_jsxs("div", { className: " flex-row small-width-none", children: [spectrum?.info?.originFrequency && isBrushing && (_jsxs("div", { children: [_jsx("span", { className: "label", children: " \u0394Hz: " }), _jsx("span", { className: "value", children: ((scaleX().invert(startX) - scaleX().invert(endX)) *
107
+ spectrum?.info?.originFrequency).toPrecision(5) })] })), isBrushing && (_jsxs("div", { children: [_jsx("span", { className: "label", children: " ratio :" }), _jsxs("span", { className: "value", children: [((getYValue(startX) / (getYValue(endX) || Number.MIN_VALUE)) *
108
+ 100).toFixed(2), "%"] })] }))] })), activeSpectrum && (_jsxs("div", { className: "flex-row small-width-none", children: [_jsx("div", { className: "separator" }), _jsx(IoPulseSharp, {}), _jsxs("div", { children: [_jsx("span", { className: "label", children: "Intensity: " }), _jsx("span", { className: "value y-value", children: format(getYValue(position.x)) })] })] }))] }));
114
109
  }
115
- const MemoizedFooterBanner = (0, react_2.memo)(FooterBannerInner);
116
- function FooterBanner() {
117
- const { margin, width, height, view: { spectra: { activeTab }, }, } = (0, ChartContext_1.useChartData)();
118
- const activeSpectrum = (0, useActiveSpectrum_1.useActiveSpectrum)();
119
- const spectrum = (0, useSpectrum_1.default)(null);
120
- return ((0, jsx_runtime_1.jsx)(MemoizedFooterBanner, { margin, width, height, activeSpectrum, spectrum, activeTab }));
110
+ const MemoizedFooterBanner = memo(FooterBannerInner);
111
+ export default function FooterBanner() {
112
+ const { margin, width, height, view: { spectra: { activeTab }, }, } = useChartData();
113
+ const activeSpectrum = useActiveSpectrum();
114
+ const spectrum = useSpectrum(null);
115
+ return (_jsx(MemoizedFooterBanner, { margin, width, height, activeSpectrum, spectrum, activeTab }));
121
116
  }
122
- exports.default = FooterBanner;
@@ -1,46 +1,18 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- const jsx_runtime_1 = require("react/jsx-runtime");
30
- const react_1 = require("react");
31
- const ScaleContext_1 = require("../context/ScaleContext");
32
- const useActiveSpectrumStyleOptions_1 = __importDefault(require("../hooks/useActiveSpectrumStyleOptions"));
33
- const useXYReduce_1 = __importStar(require("../hooks/useXYReduce"));
34
- const PathBuilder_1 = require("../utility/PathBuilder");
35
- const parseColor_1 = require("../utility/parseColor");
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useMemo } from 'react';
3
+ import { useScaleChecked } from '../context/ScaleContext';
4
+ import useActiveSpectrumStyleOptions from '../hooks/useActiveSpectrumStyleOptions';
5
+ import useXYReduce, { XYReducerDomainAxis } from '../hooks/useXYReduce';
6
+ import { PathBuilder } from '../utility/PathBuilder';
7
+ import { parseColor } from '../utility/parseColor';
36
8
  function Line({ data, id, display, index }) {
37
- const { scaleX, scaleY, shiftY } = (0, ScaleContext_1.useScaleChecked)();
38
- const xyReduce = (0, useXYReduce_1.default)(useXYReduce_1.XYReducerDomainAxis.XAxis);
39
- const { opacity } = (0, useActiveSpectrumStyleOptions_1.default)(id);
40
- const paths = (0, react_1.useMemo)(() => {
9
+ const { scaleX, scaleY, shiftY } = useScaleChecked();
10
+ const xyReduce = useXYReduce(XYReducerDomainAxis.XAxis);
11
+ const { opacity } = useActiveSpectrumStyleOptions(id);
12
+ const paths = useMemo(() => {
41
13
  const _scaleX = scaleX();
42
14
  const _scaleY = scaleY(id);
43
- const pathBuilder = new PathBuilder_1.PathBuilder();
15
+ const pathBuilder = new PathBuilder();
44
16
  if (data?.x && data?.y && _scaleX(0)) {
45
17
  const pathPoints = xyReduce(data);
46
18
  pathBuilder.moveTo(_scaleX(pathPoints.x[0]), _scaleY(pathPoints.y[0]));
@@ -53,7 +25,7 @@ function Line({ data, id, display, index }) {
53
25
  return '';
54
26
  }
55
27
  }, [scaleX, scaleY, id, data, xyReduce]);
56
- const { color: stroke, opacity: strokeOpacity } = (0, parseColor_1.parseColor)(display?.color || 'black');
57
- return ((0, jsx_runtime_1.jsx)("path", { className: "line", "data-testid": "spectrum-line", stroke: stroke, fill: "none", strokeOpacity: opacity === 1 ? strokeOpacity : opacity, d: paths, transform: `translate(0,-${shiftY * index})` }, id));
28
+ const { color: stroke, opacity: strokeOpacity } = parseColor(display?.color || 'black');
29
+ return (_jsx("path", { className: "line", "data-testid": "spectrum-line", stroke: stroke, fill: "none", strokeOpacity: opacity === 1 ? strokeOpacity : opacity, d: paths, transform: `translate(0,-${shiftY * index})` }, id));
58
30
  }
59
- exports.default = Line;
31
+ export default Line;
@@ -1,18 +1,13 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const jsx_runtime_1 = require("react/jsx-runtime");
7
- const get1DDataXY_1 = require("../../data/data1d/Spectrum1D/get1DDataXY");
8
- const isSpectrum1D_1 = require("../../data/data1d/Spectrum1D/isSpectrum1D");
9
- const ChartContext_1 = require("../context/ChartContext");
10
- const useActiveSpectra_1 = require("../hooks/useActiveSpectra");
11
- const Line_1 = __importDefault(require("./Line"));
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { get1DDataXY } from '../../data/data1d/Spectrum1D/get1DDataXY';
3
+ import { isSpectrum1D } from '../../data/data1d/Spectrum1D/isSpectrum1D';
4
+ import { useChartData } from '../context/ChartContext';
5
+ import { useActiveSpectra } from '../hooks/useActiveSpectra';
6
+ import Line from './Line';
12
7
  function LinesSeries() {
13
- const { data, displayerKey, xDomains } = (0, ChartContext_1.useChartData)();
14
- const activeSpectra = (0, useActiveSpectra_1.useActiveSpectra)();
15
- const spectra = (data?.filter((d) => (0, isSpectrum1D_1.isSpectrum1D)(d) && d.display.isVisible && xDomains[d.id]) || []);
16
- return ((0, jsx_runtime_1.jsxs)("g", { clipPath: `url(#${displayerKey}clip-chart-1d)`, className: "spectrums", children: [spectra.map((d, i) => ((0, jsx_runtime_1.jsx)("g", { id: d.id, children: (0, jsx_runtime_1.jsx)(Line_1.default, { display: d.display, id: d.id, data: (0, get1DDataXY_1.get1DDataXY)(d), index: i }) }, d.id))), activeSpectra?.map((activeSpectrum) => ((0, jsx_runtime_1.jsx)("use", { href: `#${activeSpectrum.id}` }, activeSpectrum.id)))] }));
8
+ const { data, displayerKey, xDomains } = useChartData();
9
+ const activeSpectra = useActiveSpectra();
10
+ const spectra = (data?.filter((d) => isSpectrum1D(d) && d.display.isVisible && xDomains[d.id]) || []);
11
+ return (_jsxs("g", { clipPath: `url(#${displayerKey}clip-chart-1d)`, className: "spectrums", children: [spectra.map((d, i) => (_jsx("g", { id: d.id, children: _jsx(Line, { display: d.display, id: d.id, data: get1DDataXY(d), index: i }) }, d.id))), activeSpectra?.map((activeSpectrum) => (_jsx("use", { href: `#${activeSpectrum.id}` }, activeSpectrum.id)))] }));
17
12
  }
18
- exports.default = LinesSeries;
13
+ export default LinesSeries;
@@ -1,18 +1,13 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const jsx_runtime_1 = require("react/jsx-runtime");
7
- const get_1 = __importDefault(require("lodash/get"));
8
- const ml_spectra_processing_1 = require("ml-spectra-processing");
9
- const get1DDataXY_1 = require("../../data/data1d/Spectrum1D/get1DDataXY");
10
- const MouseTracker_1 = require("../EventsTrackers/MouseTracker");
11
- const ChartContext_1 = require("../context/ChartContext");
12
- const ScaleContext_1 = require("../context/ScaleContext");
13
- const SVGGroup_1 = require("../elements/SVGGroup");
14
- const usePanelPreferences_1 = require("../hooks/usePanelPreferences");
15
- const convertPathArrayToString_1 = require("../utility/convertPathArrayToString");
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import lodashGet from 'lodash/get';
3
+ import { xFindClosestIndex } from 'ml-spectra-processing';
4
+ import { get1DDataXY } from '../../data/data1d/Spectrum1D/get1DDataXY';
5
+ import { useMouseTracker } from '../EventsTrackers/MouseTracker';
6
+ import { useChartData } from '../context/ChartContext';
7
+ import { useScale } from '../context/ScaleContext';
8
+ import { SVGGroup } from '../elements/SVGGroup';
9
+ import { usePanelPreferences } from '../hooks/usePanelPreferences';
10
+ import { convertPathArrayToString } from '../utility/convertPathArrayToString';
16
11
  const styles = {
17
12
  text: {
18
13
  fontSize: '12px',
@@ -24,41 +19,41 @@ const styles = {
24
19
  },
25
20
  };
26
21
  function YTracker({ datum }) {
27
- const { scaleX } = (0, ScaleContext_1.useScale)();
28
- const position = (0, MouseTracker_1.useMouseTracker)();
22
+ const { scaleX } = useScale();
23
+ const position = useMouseTracker();
29
24
  if (!scaleX || !position) {
30
25
  return null;
31
26
  }
32
- const xIndex = (0, ml_spectra_processing_1.xFindClosestIndex)(datum.x, scaleX().invert(position.x));
33
- return ((0, jsx_runtime_1.jsx)("text", { style: styles.text, alignmentBaseline: "middle", children: datum.y[xIndex] }));
27
+ const xIndex = xFindClosestIndex(datum.x, scaleX().invert(position.x));
28
+ return (_jsx("text", { style: styles.text, alignmentBaseline: "middle", children: datum.y[xIndex] }));
34
29
  }
35
30
  function InnerSpectraLegends({ spectra, legendsFields, }) {
36
- return ((0, jsx_runtime_1.jsx)("g", { className: "spectra-intensity-legend", children: spectra.map((spectrum, index) => ((0, jsx_runtime_1.jsxs)("g", { transform: `translate(5,${20 * (index + 1)})`, children: [(0, jsx_runtime_1.jsx)("rect", { style: {
31
+ return (_jsx("g", { className: "spectra-intensity-legend", children: spectra.map((spectrum, index) => (_jsxs("g", { transform: `translate(5,${20 * (index + 1)})`, children: [_jsx("rect", { style: {
37
32
  ...styles.colorIndicator,
38
33
  fill: spectrum.display.color,
39
- } }), (0, jsx_runtime_1.jsx)(SVGGroup_1.SVGGroup, { space: 5, style: { transform: 'translate(12px,0)' }, children: legendsFields.map((field) => {
34
+ } }), _jsx(SVGGroup, { space: 5, style: { transform: 'translate(12px,0)' }, children: legendsFields.map((field) => {
40
35
  const predefinedField = field;
41
36
  switch (predefinedField?.name) {
42
37
  case 'intensity':
43
- return ((0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)(YTracker, { datum: (0, get1DDataXY_1.get1DDataXY)(spectrum) }), (0, jsx_runtime_1.jsx)("rect", { width: "55", height: "1", fill: "transparent" })] }, "intensity"));
38
+ return (_jsxs("g", { children: [_jsx(YTracker, { datum: get1DDataXY(spectrum) }), _jsx("rect", { width: "55", height: "1", fill: "transparent" })] }, "intensity"));
44
39
  case 'name':
45
- return ((0, jsx_runtime_1.jsx)("text", { alignmentBaseline: "middle", style: styles.text, children: spectrum.info.name }, "name"));
40
+ return (_jsx("text", { alignmentBaseline: "middle", style: styles.text, children: spectrum.info.name }, "name"));
46
41
  default: {
47
42
  const jpath = field.jpath;
48
- const value = (0, get_1.default)(spectrum, jpath, '');
49
- return ((0, jsx_runtime_1.jsx)("text", { alignmentBaseline: "middle", style: styles.text, children: value }, (0, convertPathArrayToString_1.convertPathArrayToString)(jpath)));
43
+ const value = lodashGet(spectrum, jpath, '');
44
+ return (_jsx("text", { alignmentBaseline: "middle", style: styles.text, children: value }, convertPathArrayToString(jpath)));
50
45
  }
51
46
  }
52
47
  }) })] }, spectrum.id))) }));
53
48
  }
54
49
  function SpectraLegends() {
55
- const { data, view: { spectra: { activeTab, showLegend }, }, xDomains, } = (0, ChartContext_1.useChartData)();
56
- const { legendsFields } = (0, usePanelPreferences_1.usePanelPreferences)('multipleSpectraAnalysis', activeTab);
50
+ const { data, view: { spectra: { activeTab, showLegend }, }, xDomains, } = useChartData();
51
+ const { legendsFields } = usePanelPreferences('multipleSpectraAnalysis', activeTab);
57
52
  if (!showLegend)
58
53
  return null;
59
54
  const spectra = data.filter((spectrum) => spectrum.display.isVisible &&
60
55
  xDomains[spectrum.id] &&
61
56
  spectrum.info.nucleus === activeTab);
62
- return ((0, jsx_runtime_1.jsx)(InnerSpectraLegends, { spectra: spectra, legendsFields: legendsFields }));
57
+ return (_jsx(InnerSpectraLegends, { spectra: spectra, legendsFields: legendsFields }));
63
58
  }
64
- exports.default = SpectraLegends;
59
+ export default SpectraLegends;