nmrium 0.32.0 → 0.33.0-pre.1667632695

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (453) hide show
  1. package/lib/component/1d/Chart1D.js +1 -1
  2. package/lib/component/1d/LinesSeries.js +1 -1
  3. package/lib/component/1d/SpectraTracker.js +1 -1
  4. package/lib/component/1d/Viewer1D.js +1 -1
  5. package/lib/component/1d/XAxis.js +1 -1
  6. package/lib/component/1d/database/DatabaseSpectrum.js +2 -1
  7. package/lib/component/1d/database/ResurrectedDatabaseRanges.js +2 -2
  8. package/lib/component/1d/{Integral.d.ts → integral/Integral.d.ts} +0 -0
  9. package/lib/component/1d/{Integral.js → integral/Integral.js} +2 -2
  10. package/lib/component/1d/integral/IntegralIndicator.d.ts +9 -0
  11. package/lib/component/1d/integral/IntegralIndicator.js +27 -0
  12. package/lib/component/1d/{IntegralResizable.d.ts → integral/IntegralResizable.d.ts} +0 -0
  13. package/lib/component/1d/integral/IntegralResizable.js +69 -0
  14. package/lib/component/1d/{IntegralsSeries.d.ts → integral/IntegralsSeries.d.ts} +0 -0
  15. package/lib/component/1d/{IntegralsSeries.js → integral/IntegralsSeries.js} +4 -4
  16. package/lib/component/1d/multiAnalysis/MultiAnalysisRanges.js +1 -1
  17. package/lib/component/1d/multiplicityTree/MultiplicityTree.js +4 -4
  18. package/lib/component/1d/multiplicityTree/buildTreeNode.js +3 -3
  19. package/lib/component/1d/peaks/PeakAnnotation.js +1 -1
  20. package/lib/component/1d/peaks/usePeakShapesPath.js +10 -6
  21. package/lib/component/1d/ranges/Range.js +27 -50
  22. package/lib/component/1d/tool/PeakPointer.js +1 -1
  23. package/lib/component/1d/utilities/scale.js +2 -2
  24. package/lib/component/2d/Contours.js +61 -42
  25. package/lib/component/2d/FooterBanner.js +2 -2
  26. package/lib/component/2d/Viewer2D.js +11 -14
  27. package/lib/component/2d/tools/XYLabelPointer.js +2 -2
  28. package/lib/component/2d/tools/slicing/VerticalSliceChart.js +1 -1
  29. package/lib/component/2d/zones/IndicationLines.js +5 -8
  30. package/lib/component/EventsTrackers/KeysListenerTracker.js +14 -15
  31. package/lib/component/NMRium.d.ts +1 -1
  32. package/lib/component/NMRium.js +6 -6
  33. package/lib/component/assignment/actions/initAssignment.js +17 -17
  34. package/lib/component/assignment/index.js +2 -2
  35. package/lib/component/context/PreferencesContext.js +3 -6
  36. package/lib/component/elements/Button.js +1 -1
  37. package/lib/component/elements/CheckBoxCell.js +1 -1
  38. package/lib/component/elements/ContextMenu.js +2 -2
  39. package/lib/component/elements/EditableColumn.js +3 -5
  40. package/lib/component/elements/GroupPane.d.ts +12 -0
  41. package/lib/component/elements/GroupPane.js +14 -0
  42. package/lib/component/elements/Input.js +7 -4
  43. package/lib/component/elements/IsotopesViewer.js +1 -1
  44. package/lib/component/elements/Label.js +1 -2
  45. package/lib/component/elements/MolecularFormulaInput.js +2 -0
  46. package/lib/component/elements/NumberInput.js +2 -2
  47. package/lib/component/elements/ReactTable/Elements/ReactTableRow.js +1 -1
  48. package/lib/component/elements/ReactTable/ReactTable.d.ts +2 -1
  49. package/lib/component/elements/ReactTable/ReactTable.js +72 -38
  50. package/lib/component/elements/ReactTable/ReactTableFlexLayout.d.ts +3 -2
  51. package/lib/component/elements/ReactTable/ReactTableFlexLayout.js +2 -2
  52. package/lib/component/elements/ReactTable/utility/addCustomColumn.js +3 -3
  53. package/lib/component/elements/ReactTable/utility/useRowSpan.js +3 -7
  54. package/lib/component/elements/accordion/Accordion.js +2 -2
  55. package/lib/component/elements/draggble/useDraggable.js +1 -3
  56. package/lib/component/elements/dropDownButton/DropDownList.js +1 -2
  57. package/lib/component/elements/formik/FormikCheckBox.js +1 -1
  58. package/lib/component/elements/formik/FormikColorPicker.d.ts +0 -1
  59. package/lib/component/elements/formik/FormikColorPicker.js +5 -8
  60. package/lib/component/elements/formik/FormikErrorsSummary.js +2 -2
  61. package/lib/component/elements/formik/FormikForm.js +2 -2
  62. package/lib/component/elements/formik/FormikInput.d.ts +0 -1
  63. package/lib/component/elements/formik/FormikInput.js +12 -20
  64. package/lib/component/elements/formik/FormikOnChange.d.ts +1 -1
  65. package/lib/component/elements/formik/FormikOnChange.js +13 -10
  66. package/lib/component/elements/formik/FormikSelect.js +1 -1
  67. package/lib/component/elements/formik/FormikSlider.d.ts +2 -4
  68. package/lib/component/elements/formik/FormikSlider.js +8 -11
  69. package/lib/component/elements/formik/FormikTextarea.js +1 -1
  70. package/lib/component/elements/linearAxis/LinearVerticalAxis.js +2 -2
  71. package/lib/component/elements/popup/Alert/Provider.js +7 -7
  72. package/lib/component/elements/popup/Alert/index.d.ts +3 -4
  73. package/lib/component/elements/popup/Alert/index.js +3 -4
  74. package/lib/component/elements/popup/Modal/ModalContent.js +3 -1
  75. package/lib/component/elements/popup/Modal/Provider.js +16 -31
  76. package/lib/component/elements/popup/Modal/index.d.ts +4 -5
  77. package/lib/component/elements/popup/Modal/index.js +4 -5
  78. package/lib/component/header/Header.js +1 -1
  79. package/lib/component/hooks/useCombinedRefs.js +2 -2
  80. package/lib/component/hooks/useExport.d.ts +1 -1
  81. package/lib/component/hooks/useExport.js +9 -6
  82. package/lib/component/hooks/useFormatNumberByNucleus.js +1 -1
  83. package/lib/component/hooks/usePanelPreferences.js +9 -7
  84. package/lib/component/loader/DropZone.js +4 -4
  85. package/lib/component/modal/AlignSpectraModal.js +1 -1
  86. package/lib/component/modal/ExportAsMatrixModal.js +1 -1
  87. package/lib/component/modal/LoadJCAMPModal.js +2 -2
  88. package/lib/component/modal/MultipleSpectraFiltersModal/index.js +1 -1
  89. package/lib/component/modal/MultipletAnalysisModal.js +3 -3
  90. package/lib/component/modal/PredictSpectraModal.js +5 -5
  91. package/lib/component/modal/editRange/EditRangeModal.js +4 -4
  92. package/lib/component/modal/editRange/forms/components/SignalFormInfo.js +1 -1
  93. package/lib/component/modal/editRange/forms/validation/EditRangeValidation.js +2 -2
  94. package/lib/component/modal/setting/DatabasesTabContent.js +25 -20
  95. package/lib/component/modal/setting/DisplayTabContent.js +21 -27
  96. package/lib/component/modal/setting/FormattingTabContent.js +10 -10
  97. package/lib/component/modal/setting/GeneralSettings.js +11 -14
  98. package/lib/component/modal/setting/GeneralTabContent.js +3 -1
  99. package/lib/component/modal/setting/ToolsTabContent.js +18 -19
  100. package/lib/component/modal/setting/WorkspaceItem.d.ts +2 -1
  101. package/lib/component/modal/setting/WorkspaceItem.js +36 -48
  102. package/lib/component/modal/setting/settingsValidation.d.ts +58 -57
  103. package/lib/component/modal/setting/settingsValidation.js +14 -12
  104. package/lib/component/panels/AutomaticAssignment/useAutoAssignments.js +8 -7
  105. package/lib/component/panels/InformationPanel.js +52 -56
  106. package/lib/component/panels/IntegralsPanel/IntegralTable.js +1 -1
  107. package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +1 -1
  108. package/lib/component/panels/MoleculesPanel/Utilities.js +6 -6
  109. package/lib/component/panels/MoleculesPanel/useAtomAssignment.js +16 -17
  110. package/lib/component/panels/MultipleSpectraAnalysisPanel/ColumnHeader.js +1 -1
  111. package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleAnalysisCodeEditor.js +1 -1
  112. package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +1 -1
  113. package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPreferences.js +18 -17
  114. package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +2 -2
  115. package/lib/component/panels/PeaksPanel/PeaksPanel.js +1 -1
  116. package/lib/component/panels/PeaksPanel/PeaksTable.js +2 -2
  117. package/lib/component/panels/RangesPanel/RangesHeader.js +1 -1
  118. package/lib/component/panels/RangesPanel/RangesPanel.js +1 -1
  119. package/lib/component/panels/RangesPanel/RangesTable.js +1 -1
  120. package/lib/component/panels/RangesPanel/RangesTableRow.js +1 -3
  121. package/lib/component/panels/RangesPanel/TableColumns/CouplingColumn.js +1 -1
  122. package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.js +2 -2
  123. package/lib/component/panels/RangesPanel/hooks/useMapRanges.js +8 -8
  124. package/lib/component/panels/SpectrumsPanel/SpectrumListItem.js +6 -6
  125. package/lib/component/panels/SpectrumsPanel/SpectrumListPanel.js +3 -3
  126. package/lib/component/panels/SpectrumsPanel/SpectrumsTabs.js +5 -5
  127. package/lib/component/panels/SpectrumsPanel/base/ColorIndicator.js +2 -2
  128. package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DSetting.d.ts +1 -1
  129. package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DSetting.js +2 -1
  130. package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DSetting.d.ts +1 -1
  131. package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DSetting.js +2 -1
  132. package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +13 -17
  133. package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +16 -17
  134. package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +20 -21
  135. package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +12 -12
  136. package/lib/component/panels/SummaryPanel/SetShiftTolerancesModal.js +1 -5
  137. package/lib/component/panels/SummaryPanel/utilities/Utilities.js +105 -94
  138. package/lib/component/panels/ZonesPanel/ZonesTable.js +8 -8
  139. package/lib/component/panels/databasePanel/DatabasePanel.js +5 -4
  140. package/lib/component/panels/databasePanel/DatabaseTable.d.ts +2 -1
  141. package/lib/component/panels/databasePanel/DatabaseTable.js +20 -5
  142. package/lib/component/panels/extra/preferences/ColumnsHelper.js +5 -2
  143. package/lib/component/panels/extra/utilities/MultiplicityUtilities.d.ts +2 -2
  144. package/lib/component/panels/extra/utilities/MultiplicityUtilities.js +2 -2
  145. package/lib/component/panels/filtersPanel/FiltersTable.js +1 -1
  146. package/lib/component/reducer/IgnoreActions.js +3 -3
  147. package/lib/component/reducer/Reducer.d.ts +40 -14
  148. package/lib/component/reducer/Reducer.js +12 -11
  149. package/lib/component/reducer/actions/CorrelationsActions.js +4 -4
  150. package/lib/component/reducer/actions/DomainActions.d.ts +2 -2
  151. package/lib/component/reducer/actions/DomainActions.js +49 -67
  152. package/lib/component/reducer/actions/FiltersActions.js +3 -3
  153. package/lib/component/reducer/actions/HistoryActions.js +5 -5
  154. package/lib/component/reducer/actions/LoadActions.js +12 -0
  155. package/lib/component/reducer/actions/PreferencesActions.js +18 -37
  156. package/lib/component/reducer/actions/RangesActions.js +14 -12
  157. package/lib/component/reducer/actions/SpectrumsActions.js +10 -4
  158. package/lib/component/reducer/actions/ToolsActions.js +20 -35
  159. package/lib/component/reducer/actions/ZonesActions.js +2 -2
  160. package/lib/component/reducer/core/Constants.js +1 -1
  161. package/lib/component/reducer/helper/GetClosestNumber.js +2 -1
  162. package/lib/component/reducer/helper/Zoom1DManager.js +11 -10
  163. package/lib/component/reducer/helper/getSpectrum.js +3 -5
  164. package/lib/component/reducer/helper/getStrongestPeak.d.ts +1 -1
  165. package/lib/component/reducer/helper/getStrongestPeak.js +2 -3
  166. package/lib/component/reducer/preferences/actions/removeWorkspace.js +3 -10
  167. package/lib/component/reducer/preferences/actions/setPreferences.js +5 -6
  168. package/lib/component/reducer/preferences/utilities/mapNucleiFormatting.d.ts +1 -4
  169. package/lib/component/reducer/preferences/utilities/mapNucleiFormatting.js +7 -5
  170. package/lib/component/tool/BrushX.js +3 -3
  171. package/lib/component/tool/BrushXY.js +5 -5
  172. package/lib/component/tool/CrossLinePointer.js +3 -3
  173. package/lib/component/toolbar/BasicToolBar.js +1 -1
  174. package/lib/component/utility/Evaluate.js +2 -2
  175. package/lib/component/utility/FileUtility.d.ts +2 -9
  176. package/lib/component/utility/FileUtility.js +11 -28
  177. package/lib/component/utility/GroupByInfoKey.d.ts +1 -1
  178. package/lib/component/utility/GroupByInfoKey.js +11 -13
  179. package/lib/component/utility/PathBuilder.js +1 -1
  180. package/lib/component/utility/PreferencesHelper.js +2 -3
  181. package/lib/component/utility/{Export.d.ts → export.d.ts} +0 -0
  182. package/lib/component/utility/{Export.js → export.js} +53 -78
  183. package/lib/component/utility/formatNumber.d.ts +6 -1
  184. package/lib/component/utility/formatNumber.js +5 -4
  185. package/lib/data/Filters.d.ts +16 -17
  186. package/lib/data/Filters.js +16 -17
  187. package/lib/data/FiltersManager.js +4 -3
  188. package/lib/data/PredictionManager.js +8 -10
  189. package/lib/data/SpectraManager.d.ts +1 -2
  190. package/lib/data/SpectraManager.js +25 -60
  191. package/lib/data/data1d/MultipleAnalysis.js +74 -70
  192. package/lib/data/data1d/Spectrum1D/SumManager.js +1 -1
  193. package/lib/data/data1d/Spectrum1D/generateJGraphData.js +1 -1
  194. package/lib/data/data1d/Spectrum1D/index.d.ts +24 -25
  195. package/lib/data/data1d/Spectrum1D/index.js +24 -25
  196. package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +1 -1
  197. package/lib/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.js +6 -5
  198. package/lib/data/data1d/Spectrum1D/integrals/updateRelatives.js +8 -10
  199. package/lib/data/data1d/Spectrum1D/peaks/lookupPeak.js +1 -1
  200. package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js +2 -2
  201. package/lib/data/data1d/Spectrum1D/ranges/addRange.js +3 -2
  202. package/lib/data/data1d/Spectrum1D/ranges/changeRange.js +2 -2
  203. package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +35 -1
  204. package/lib/data/data1d/Spectrum1D/ranges/mapRanges.d.ts +35 -1
  205. package/lib/data/data1d/Spectrum1D/ranges/mapRanges.js +6 -7
  206. package/lib/data/data1d/database.js +45 -28
  207. package/lib/data/data1d/filter1d/apodization.js +2 -1
  208. package/lib/data/data1d/filter1d/fft.js +24 -7
  209. package/lib/data/data1d/filter1d/phaseCorrection.js +2 -2
  210. package/lib/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +1 -1
  211. package/lib/data/data1d/filter1d/zeroFilling.js +1 -1
  212. package/lib/data/data2d/Processing2D.d.ts +3 -3
  213. package/lib/data/data2d/Processing2D.js +7 -18
  214. package/lib/data/data2d/Spectrum2D/contours.d.ts +40 -0
  215. package/lib/data/data2d/Spectrum2D/contours.js +132 -0
  216. package/lib/data/data2d/Spectrum2D/index.d.ts +10 -11
  217. package/lib/data/data2d/Spectrum2D/index.js +10 -11
  218. package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +3 -4
  219. package/lib/data/data2d/Spectrum2D/shift/getShift.js +4 -5
  220. package/lib/data/data2d/Spectrum2D/zones/detectZones.js +11 -8
  221. package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.js +1 -1
  222. package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.js +1 -2
  223. package/lib/data/molecules/MoleculeManager.js +1 -1
  224. package/lib/data/types/common/Source.d.ts +1 -0
  225. package/lib/data/types/data1d/index.d.ts +12 -13
  226. package/lib/data/types/data2d/Data2D.d.ts +2 -0
  227. package/lib/data/types/data2d/Datum2D.d.ts +0 -1
  228. package/lib/data/types/data2d/index.d.ts +8 -9
  229. package/lib/data/utilities/RangeUtilities.js +13 -9
  230. package/lib/data/utilities/ZoneUtilities.js +17 -13
  231. package/lib/data/utilities/checkModifierKeyActivated.js +1 -2
  232. package/lib/data/utilities/generateChar.js +8 -6
  233. package/lib/data/utilities/getAtom.js +1 -1
  234. package/lib/data/utilities/getAtomsFromMF.js +2 -2
  235. package/lib/data/utilities/getColor.js +3 -3
  236. package/lib/data/utilities/getSum.js +6 -3
  237. package/lib/versionInfo.js +1 -1
  238. package/lib-cjs/component/1d/Chart1D.js +1 -1
  239. package/lib-cjs/component/1d/LinesSeries.js +1 -1
  240. package/lib-cjs/component/1d/SpectraTracker.js +1 -1
  241. package/lib-cjs/component/1d/Viewer1D.js +1 -1
  242. package/lib-cjs/component/1d/XAxis.js +1 -1
  243. package/lib-cjs/component/1d/database/DatabaseSpectrum.js +2 -1
  244. package/lib-cjs/component/1d/database/ResurrectedDatabaseRanges.js +2 -2
  245. package/lib-cjs/component/1d/{Integral.js → integral/Integral.js} +2 -2
  246. package/lib-cjs/component/1d/integral/IntegralIndicator.js +31 -0
  247. package/lib-cjs/component/1d/integral/IntegralResizable.js +74 -0
  248. package/lib-cjs/component/1d/{IntegralsSeries.js → integral/IntegralsSeries.js} +4 -4
  249. package/lib-cjs/component/1d/multiAnalysis/MultiAnalysisRanges.js +1 -1
  250. package/lib-cjs/component/1d/multiplicityTree/MultiplicityTree.js +4 -4
  251. package/lib-cjs/component/1d/multiplicityTree/buildTreeNode.js +3 -3
  252. package/lib-cjs/component/1d/peaks/PeakAnnotation.js +1 -1
  253. package/lib-cjs/component/1d/peaks/usePeakShapesPath.js +10 -6
  254. package/lib-cjs/component/1d/ranges/Range.js +27 -50
  255. package/lib-cjs/component/1d/tool/PeakPointer.js +1 -1
  256. package/lib-cjs/component/1d/utilities/scale.js +2 -2
  257. package/lib-cjs/component/2d/Contours.js +60 -41
  258. package/lib-cjs/component/2d/FooterBanner.js +2 -2
  259. package/lib-cjs/component/2d/Viewer2D.js +11 -14
  260. package/lib-cjs/component/2d/tools/XYLabelPointer.js +2 -2
  261. package/lib-cjs/component/2d/tools/slicing/VerticalSliceChart.js +1 -1
  262. package/lib-cjs/component/2d/zones/IndicationLines.js +5 -8
  263. package/lib-cjs/component/EventsTrackers/KeysListenerTracker.js +14 -15
  264. package/lib-cjs/component/NMRium.js +7 -7
  265. package/lib-cjs/component/assignment/actions/initAssignment.js +17 -17
  266. package/lib-cjs/component/assignment/index.js +2 -2
  267. package/lib-cjs/component/context/PreferencesContext.js +3 -6
  268. package/lib-cjs/component/elements/Button.js +1 -1
  269. package/lib-cjs/component/elements/CheckBoxCell.js +1 -1
  270. package/lib-cjs/component/elements/ContextMenu.js +2 -2
  271. package/lib-cjs/component/elements/EditableColumn.js +3 -5
  272. package/lib-cjs/component/elements/GroupPane.js +18 -0
  273. package/lib-cjs/component/elements/Input.js +7 -4
  274. package/lib-cjs/component/elements/IsotopesViewer.js +1 -1
  275. package/lib-cjs/component/elements/Label.js +1 -2
  276. package/lib-cjs/component/elements/MolecularFormulaInput.js +2 -0
  277. package/lib-cjs/component/elements/NumberInput.js +2 -2
  278. package/lib-cjs/component/elements/ReactTable/Elements/ReactTableRow.js +1 -1
  279. package/lib-cjs/component/elements/ReactTable/ReactTable.js +71 -37
  280. package/lib-cjs/component/elements/ReactTable/ReactTableFlexLayout.js +2 -2
  281. package/lib-cjs/component/elements/ReactTable/utility/addCustomColumn.js +3 -3
  282. package/lib-cjs/component/elements/ReactTable/utility/useRowSpan.js +3 -7
  283. package/lib-cjs/component/elements/accordion/Accordion.js +2 -2
  284. package/lib-cjs/component/elements/draggble/useDraggable.js +1 -3
  285. package/lib-cjs/component/elements/dropDownButton/DropDownList.js +1 -2
  286. package/lib-cjs/component/elements/formik/FormikCheckBox.js +1 -1
  287. package/lib-cjs/component/elements/formik/FormikColorPicker.js +4 -7
  288. package/lib-cjs/component/elements/formik/FormikErrorsSummary.js +2 -2
  289. package/lib-cjs/component/elements/formik/FormikForm.js +2 -2
  290. package/lib-cjs/component/elements/formik/FormikInput.js +12 -20
  291. package/lib-cjs/component/elements/formik/FormikOnChange.js +13 -10
  292. package/lib-cjs/component/elements/formik/FormikSelect.js +1 -1
  293. package/lib-cjs/component/elements/formik/FormikSlider.js +7 -10
  294. package/lib-cjs/component/elements/formik/FormikTextarea.js +1 -1
  295. package/lib-cjs/component/elements/linearAxis/LinearVerticalAxis.js +2 -2
  296. package/lib-cjs/component/elements/popup/Alert/Provider.js +8 -8
  297. package/lib-cjs/component/elements/popup/Alert/index.js +5 -5
  298. package/lib-cjs/component/elements/popup/Modal/ModalContent.js +3 -1
  299. package/lib-cjs/component/elements/popup/Modal/Provider.js +16 -31
  300. package/lib-cjs/component/elements/popup/Modal/index.js +7 -7
  301. package/lib-cjs/component/header/Header.js +1 -1
  302. package/lib-cjs/component/hooks/useCombinedRefs.js +2 -2
  303. package/lib-cjs/component/hooks/useExport.js +14 -11
  304. package/lib-cjs/component/hooks/useFormatNumberByNucleus.js +1 -1
  305. package/lib-cjs/component/hooks/usePanelPreferences.js +9 -7
  306. package/lib-cjs/component/loader/DropZone.js +4 -4
  307. package/lib-cjs/component/modal/AlignSpectraModal.js +1 -1
  308. package/lib-cjs/component/modal/ExportAsMatrixModal.js +2 -2
  309. package/lib-cjs/component/modal/LoadJCAMPModal.js +2 -2
  310. package/lib-cjs/component/modal/MultipleSpectraFiltersModal/index.js +1 -1
  311. package/lib-cjs/component/modal/MultipletAnalysisModal.js +3 -3
  312. package/lib-cjs/component/modal/PredictSpectraModal.js +5 -5
  313. package/lib-cjs/component/modal/editRange/EditRangeModal.js +4 -4
  314. package/lib-cjs/component/modal/editRange/forms/components/SignalFormInfo.js +1 -1
  315. package/lib-cjs/component/modal/editRange/forms/validation/EditRangeValidation.js +2 -2
  316. package/lib-cjs/component/modal/setting/DatabasesTabContent.js +25 -20
  317. package/lib-cjs/component/modal/setting/DisplayTabContent.js +21 -27
  318. package/lib-cjs/component/modal/setting/FormattingTabContent.js +10 -10
  319. package/lib-cjs/component/modal/setting/GeneralSettings.js +11 -14
  320. package/lib-cjs/component/modal/setting/GeneralTabContent.js +3 -1
  321. package/lib-cjs/component/modal/setting/ToolsTabContent.js +18 -19
  322. package/lib-cjs/component/modal/setting/WorkspaceItem.js +37 -49
  323. package/lib-cjs/component/modal/setting/settingsValidation.js +14 -12
  324. package/lib-cjs/component/panels/AutomaticAssignment/useAutoAssignments.js +8 -7
  325. package/lib-cjs/component/panels/InformationPanel.js +51 -55
  326. package/lib-cjs/component/panels/IntegralsPanel/IntegralTable.js +1 -1
  327. package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +4 -4
  328. package/lib-cjs/component/panels/MoleculesPanel/Utilities.js +6 -6
  329. package/lib-cjs/component/panels/MoleculesPanel/useAtomAssignment.js +16 -17
  330. package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/ColumnHeader.js +1 -1
  331. package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleAnalysisCodeEditor.js +1 -1
  332. package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +2 -2
  333. package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPreferences.js +18 -17
  334. package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +2 -2
  335. package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +1 -1
  336. package/lib-cjs/component/panels/PeaksPanel/PeaksTable.js +2 -2
  337. package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +2 -2
  338. package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +2 -2
  339. package/lib-cjs/component/panels/RangesPanel/RangesTable.js +1 -1
  340. package/lib-cjs/component/panels/RangesPanel/RangesTableRow.js +1 -3
  341. package/lib-cjs/component/panels/RangesPanel/TableColumns/CouplingColumn.js +1 -1
  342. package/lib-cjs/component/panels/RangesPanel/hooks/useEditRangeModal.js +2 -2
  343. package/lib-cjs/component/panels/RangesPanel/hooks/useMapRanges.js +8 -8
  344. package/lib-cjs/component/panels/SpectrumsPanel/SpectrumListItem.js +6 -6
  345. package/lib-cjs/component/panels/SpectrumsPanel/SpectrumListPanel.js +3 -3
  346. package/lib-cjs/component/panels/SpectrumsPanel/SpectrumsTabs.js +6 -6
  347. package/lib-cjs/component/panels/SpectrumsPanel/base/ColorIndicator.js +2 -2
  348. package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum1DSetting.js +2 -1
  349. package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum2DSetting.js +2 -1
  350. package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +13 -17
  351. package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +16 -17
  352. package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +20 -21
  353. package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +12 -12
  354. package/lib-cjs/component/panels/SummaryPanel/SetShiftTolerancesModal.js +1 -5
  355. package/lib-cjs/component/panels/SummaryPanel/utilities/Utilities.js +105 -94
  356. package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +8 -8
  357. package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +5 -4
  358. package/lib-cjs/component/panels/databasePanel/DatabaseTable.js +20 -5
  359. package/lib-cjs/component/panels/extra/preferences/ColumnsHelper.js +5 -2
  360. package/lib-cjs/component/panels/extra/utilities/MultiplicityUtilities.js +2 -2
  361. package/lib-cjs/component/panels/filtersPanel/FiltersTable.js +1 -1
  362. package/lib-cjs/component/reducer/IgnoreActions.js +3 -3
  363. package/lib-cjs/component/reducer/Reducer.js +11 -10
  364. package/lib-cjs/component/reducer/actions/CorrelationsActions.js +4 -4
  365. package/lib-cjs/component/reducer/actions/DomainActions.js +49 -67
  366. package/lib-cjs/component/reducer/actions/FiltersActions.js +3 -3
  367. package/lib-cjs/component/reducer/actions/HistoryActions.js +5 -5
  368. package/lib-cjs/component/reducer/actions/LoadActions.js +12 -0
  369. package/lib-cjs/component/reducer/actions/PreferencesActions.js +18 -37
  370. package/lib-cjs/component/reducer/actions/RangesActions.js +14 -12
  371. package/lib-cjs/component/reducer/actions/SpectrumsActions.js +9 -3
  372. package/lib-cjs/component/reducer/actions/ToolsActions.js +20 -35
  373. package/lib-cjs/component/reducer/actions/ZonesActions.js +2 -2
  374. package/lib-cjs/component/reducer/core/Constants.js +1 -1
  375. package/lib-cjs/component/reducer/helper/GetClosestNumber.js +2 -1
  376. package/lib-cjs/component/reducer/helper/Zoom1DManager.js +11 -10
  377. package/lib-cjs/component/reducer/helper/getSpectrum.js +3 -5
  378. package/lib-cjs/component/reducer/helper/getStrongestPeak.js +2 -3
  379. package/lib-cjs/component/reducer/preferences/actions/removeWorkspace.js +3 -10
  380. package/lib-cjs/component/reducer/preferences/actions/setPreferences.js +5 -9
  381. package/lib-cjs/component/reducer/preferences/utilities/mapNucleiFormatting.js +7 -5
  382. package/lib-cjs/component/tool/BrushX.js +3 -3
  383. package/lib-cjs/component/tool/BrushXY.js +5 -5
  384. package/lib-cjs/component/tool/CrossLinePointer.js +3 -3
  385. package/lib-cjs/component/toolbar/BasicToolBar.js +1 -1
  386. package/lib-cjs/component/utility/Evaluate.js +2 -2
  387. package/lib-cjs/component/utility/FileUtility.js +11 -29
  388. package/lib-cjs/component/utility/GroupByInfoKey.js +11 -13
  389. package/lib-cjs/component/utility/PathBuilder.js +1 -1
  390. package/lib-cjs/component/utility/PreferencesHelper.js +2 -3
  391. package/lib-cjs/component/utility/{Export.js → export.js} +77 -79
  392. package/lib-cjs/component/utility/formatNumber.js +5 -4
  393. package/lib-cjs/data/Filters.js +17 -33
  394. package/lib-cjs/data/FiltersManager.js +4 -3
  395. package/lib-cjs/data/PredictionManager.js +8 -10
  396. package/lib-cjs/data/SpectraManager.js +26 -62
  397. package/lib-cjs/data/data1d/MultipleAnalysis.js +74 -70
  398. package/lib-cjs/data/data1d/Spectrum1D/SumManager.js +1 -1
  399. package/lib-cjs/data/data1d/Spectrum1D/generateJGraphData.js +1 -1
  400. package/lib-cjs/data/data1d/Spectrum1D/index.js +25 -25
  401. package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +1 -1
  402. package/lib-cjs/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.js +6 -5
  403. package/lib-cjs/data/data1d/Spectrum1D/integrals/updateRelatives.js +8 -10
  404. package/lib-cjs/data/data1d/Spectrum1D/peaks/lookupPeak.js +1 -1
  405. package/lib-cjs/data/data1d/Spectrum1D/peaks/optimizePeaks.js +2 -2
  406. package/lib-cjs/data/data1d/Spectrum1D/ranges/addRange.js +3 -2
  407. package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRange.js +2 -2
  408. package/lib-cjs/data/data1d/Spectrum1D/ranges/mapRanges.js +6 -7
  409. package/lib-cjs/data/data1d/database.js +45 -28
  410. package/lib-cjs/data/data1d/filter1d/apodization.js +2 -1
  411. package/lib-cjs/data/data1d/filter1d/fft.js +23 -6
  412. package/lib-cjs/data/data1d/filter1d/phaseCorrection.js +2 -2
  413. package/lib-cjs/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +1 -1
  414. package/lib-cjs/data/data1d/filter1d/zeroFilling.js +1 -1
  415. package/lib-cjs/data/data2d/Processing2D.js +7 -18
  416. package/lib-cjs/data/data2d/Spectrum2D/contours.js +138 -0
  417. package/lib-cjs/data/data2d/Spectrum2D/index.js +11 -11
  418. package/lib-cjs/data/data2d/Spectrum2D/initiateDatum2D.js +3 -4
  419. package/lib-cjs/data/data2d/Spectrum2D/shift/getShift.js +4 -5
  420. package/lib-cjs/data/data2d/Spectrum2D/zones/detectZones.js +11 -8
  421. package/lib-cjs/data/data2d/Spectrum2D/zones/detectZonesManual.js +1 -1
  422. package/lib-cjs/data/data2d/Spectrum2D/zones/getDetectionZones.js +1 -2
  423. package/lib-cjs/data/molecules/MoleculeManager.js +1 -1
  424. package/lib-cjs/data/utilities/RangeUtilities.js +13 -9
  425. package/lib-cjs/data/utilities/ZoneUtilities.js +17 -13
  426. package/lib-cjs/data/utilities/checkModifierKeyActivated.js +1 -2
  427. package/lib-cjs/data/utilities/generateChar.js +8 -6
  428. package/lib-cjs/data/utilities/getAtom.js +1 -1
  429. package/lib-cjs/data/utilities/getAtomsFromMF.js +2 -2
  430. package/lib-cjs/data/utilities/getColor.js +3 -3
  431. package/lib-cjs/data/utilities/getSum.js +6 -3
  432. package/lib-cjs/versionInfo.js +1 -1
  433. package/package.json +30 -26
  434. package/lib/component/1d/IntegralResizable.js +0 -72
  435. package/lib/component/elements/popup/helpers.d.ts +0 -1
  436. package/lib/component/elements/popup/helpers.js +0 -9
  437. package/lib/component/panels/RangesPanel/TableColumns/format.d.ts +0 -1
  438. package/lib/component/panels/RangesPanel/TableColumns/format.js +0 -8
  439. package/lib/data/data1d/Data1DManager.d.ts +0 -3
  440. package/lib/data/data1d/Data1DManager.js +0 -98
  441. package/lib/data/data2d/Data2DManager.d.ts +0 -3
  442. package/lib/data/data2d/Data2DManager.js +0 -34
  443. package/lib/data/types/data2d/Contour.d.ts +0 -4
  444. package/lib/data/types/data2d/Contour.js +0 -1
  445. package/lib/data/types/data2d/Contours.d.ts +0 -2
  446. package/lib/data/types/data2d/Contours.js +0 -1
  447. package/lib-cjs/component/1d/IntegralResizable.js +0 -77
  448. package/lib-cjs/component/elements/popup/helpers.js +0 -13
  449. package/lib-cjs/component/panels/RangesPanel/TableColumns/format.js +0 -14
  450. package/lib-cjs/data/data1d/Data1DManager.js +0 -104
  451. package/lib-cjs/data/data2d/Data2DManager.js +0 -40
  452. package/lib-cjs/data/types/data2d/Contour.js +0 -2
  453. package/lib-cjs/data/types/data2d/Contours.js +0 -2
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useState, useCallback, useEffect, memo, useMemo, useRef, } from 'react';
2
+ import { useState, memo } from 'react';
3
+ import Input from '../elements/Input';
3
4
  import ReactTableFlexLayout from '../elements/ReactTable/ReactTableFlexLayout';
4
5
  import useSpectrum from '../hooks/useSpectrum';
5
6
  const styles = {
@@ -10,67 +11,62 @@ const styles = {
10
11
  width: '100%',
11
12
  },
12
13
  tableContainer: {
13
- height: 'calc(100% - 30px)',
14
14
  overflow: 'auto',
15
15
  display: 'block',
16
16
  },
17
- searchInput: {
18
- width: '100%',
19
- borderRadius: '5px',
20
- border: '0.55px solid gray',
21
- padding: '5px',
22
- marginBottom: '2px',
17
+ tableHeader: {
18
+ padding: ' 5px 10px',
19
+ backgroundColor: ' #f8f8f8',
20
+ borderBottom: '1px solid gray',
21
+ fontSize: '1em',
23
22
  },
24
23
  };
25
- function InformationPanelInner({ info, meta }) {
26
- const [information, setInformation] = useState({});
27
- const [matches, setMatchesData] = useState([]);
28
- const searchRef = useRef(null);
29
- const handleSearch = useCallback((e) => {
30
- const values = Object.keys(information).filter((key) => key
31
- .toLowerCase()
32
- .includes(e.target ? e.target.value.toLowerCase() : e.toLowerCase()));
33
- setMatchesData(values);
34
- }, [information]);
35
- useEffect(() => {
36
- if (searchRef.current) {
37
- handleSearch(searchRef.current.value);
24
+ function filter(searchKey, data) {
25
+ const result = [];
26
+ for (const key in data) {
27
+ if (!searchKey || key.toLowerCase().includes(searchKey)) {
28
+ result.push({ key, value: data[key] });
38
29
  }
39
- }, [handleSearch, searchRef]);
40
- useEffect(() => {
41
- if (info && meta) {
42
- const keys = Object.keys(info).concat(Object.keys(meta));
43
- setMatchesData(keys);
44
- setInformation({
45
- ...info,
46
- ...meta,
47
- });
48
- }
49
- }, [info, meta]);
50
- const columns = useMemo(() => [
51
- {
52
- Header: 'Parameter',
53
- sortType: 'basic',
54
- minWidth: 100,
55
- width: 20,
56
- maxWidth: 20,
57
- Cell: ({ row }) => (_jsx("p", { style: { padding: '5px', backgroundColor: 'white' }, children: row.original })),
58
- },
59
- {
60
- Header: 'Value',
61
- sortType: 'basic',
62
- resizable: true,
63
- Cell: ({ row }) => (_jsx("p", { style: {
64
- backgroundColor: '#efefef',
65
- height: '100%',
66
- padding: '5px',
67
- fontFamily: 'monospace',
68
- whiteSpace: 'pre',
69
- overflow: 'hidden',
70
- }, children: `${information[row.original]}` })),
71
- },
72
- ], [information]);
73
- return (_jsxs("div", { style: styles.container, children: [_jsx("div", { children: _jsx("input", { type: "text", style: styles.searchInput, placeholder: "Search for parameter...", onChange: handleSearch, ref: searchRef }) }), _jsx("div", { style: styles.tableContainer, children: _jsx(ReactTableFlexLayout, { data: matches, columns: columns }) })] }));
30
+ }
31
+ return result;
32
+ }
33
+ const columns = [
34
+ {
35
+ Header: 'Parameter',
36
+ sortType: 'basic',
37
+ minWidth: 100,
38
+ width: 20,
39
+ maxWidth: 20,
40
+ accessor: 'key',
41
+ Cell: ({ row }) => (_jsx("p", { style: { padding: '5px', backgroundColor: 'white' }, children: row.original.key })),
42
+ },
43
+ {
44
+ Header: 'Value',
45
+ sortType: 'basic',
46
+ resizable: true,
47
+ accessor: 'value',
48
+ Cell: ({ row }) => (_jsx("p", { style: {
49
+ backgroundColor: '#efefef',
50
+ height: '100%',
51
+ padding: '5px',
52
+ fontFamily: 'monospace',
53
+ whiteSpace: 'pre',
54
+ overflow: 'hidden',
55
+ }, children: `${row.original.value}` })),
56
+ },
57
+ ];
58
+ function InformationPanelInner({ info, meta }) {
59
+ const [searchKey, setSearchKey] = useState();
60
+ function handleSearch(e) {
61
+ const searchKey = e.target.value.toLowerCase();
62
+ setSearchKey(searchKey);
63
+ }
64
+ const matchesInfo = filter(searchKey, info);
65
+ const matchesMeta = filter(searchKey, meta);
66
+ return (_jsxs("div", { style: styles.container, children: [_jsx("div", { children: _jsx(Input, { placeholder: "Search for parameter...", onChange: handleSearch, debounceTime: 250, style: {
67
+ inputWrapper: { width: '100%' },
68
+ input: { textAlign: 'left', padding: '5px' },
69
+ } }) }), _jsxs("div", { style: styles.tableContainer, children: [_jsx("p", { style: styles.tableHeader, children: "Spectrum information" }), _jsx(ReactTableFlexLayout, { data: matchesInfo, columns: columns, style: { height: 'auto' } }), _jsx("p", { style: styles.tableHeader, children: "Other parameters" }), _jsx(ReactTableFlexLayout, { data: matchesMeta, columns: columns, style: { height: 'auto' } })] })] }));
74
70
  }
75
71
  const MemoizedInformationPanel = memo(InformationPanelInner);
76
72
  const emptyData = { info: {}, meta: {} };
@@ -88,7 +88,7 @@ function IntegralTable({ activeTab, data }) {
88
88
  index: 5,
89
89
  id: 'relative',
90
90
  Header: () => {
91
- const n = activeTab?.replace(/[0-9]/g, '');
91
+ const n = activeTab?.replace(/\d/g, '');
92
92
  return _jsx("span", { children: `Relative ${n}` });
93
93
  },
94
94
  accessor: (row) => {
@@ -16,7 +16,7 @@ import { useAlert } from '../../elements/popup/Alert';
16
16
  import { positions, useModal } from '../../elements/popup/Modal';
17
17
  import PredictSpectraModal from '../../modal/PredictSpectraModal';
18
18
  import { ADD_MOLECULE, DELETE_MOLECULE, FLOAT_MOLECULE_OVER_SPECTRUM, } from '../../reducer/types/Types';
19
- import { copyPNGToClipboard, copyTextToClipboard, exportAsSVG, } from '../../utility/Export';
19
+ import { copyPNGToClipboard, copyTextToClipboard, exportAsSVG, } from '../../utility/export';
20
20
  const toolbarStyle = css `
21
21
  display: flex;
22
22
  flex-direction: row;
@@ -1,6 +1,6 @@
1
1
  function getElements(activeTab) {
2
2
  const nuclei = activeTab.split(',');
3
- return nuclei.map((nucleus) => nucleus.replace(/[0-9]/g, ''));
3
+ return nuclei.map((nucleus) => nucleus.replace(/\d/g, ''));
4
4
  }
5
5
  /**
6
6
  * Returns the OCL id(s) and number of atoms of an atom when hovering over
@@ -90,14 +90,14 @@ export function toggleDiaIDs(diaIDs, atomInformation) {
90
90
  let _diaIDs = diaIDs ? diaIDs.slice() : [];
91
91
  const { nbAtoms, oclIDs } = atomInformation;
92
92
  let tempNbAtoms = nbAtoms;
93
- oclIDs.forEach((_oclID) => {
94
- if (_diaIDs.includes(_oclID)) {
93
+ for (const oclID of oclIDs) {
94
+ if (_diaIDs.includes(oclID)) {
95
95
  tempNbAtoms *= -1;
96
- _diaIDs = _diaIDs.filter((_id) => _id !== _oclID);
96
+ _diaIDs = _diaIDs.filter((_id) => _id !== oclID);
97
97
  }
98
98
  else {
99
- _diaIDs.push(_oclID);
99
+ _diaIDs.push(oclID);
100
100
  }
101
- });
101
+ }
102
102
  return [_diaIDs, tempNbAtoms];
103
103
  }
@@ -73,24 +73,23 @@ export default function useAtomAssignment({ displayerMode, activeTab: nucleus, z
73
73
  // used for atom highlighting for now, until we would like to highlight atoms per axis separately
74
74
  const assignedDiaIDsMerged = useMemo(() => assignedDiaIDs.x.concat(assignedDiaIDs.y), [assignedDiaIDs.x, assignedDiaIDs.y]);
75
75
  const currentDiaIDsToHighlight = useMemo(() => {
76
- let highlights = [];
77
- highlightData.highlight.highlighted.forEach((highlightID) => {
78
- const temp = assignments.data.assignments[highlightID];
79
- if (temp) {
80
- const { datum } = findDatumAndSignalIndex(data, highlightID);
81
- const type = highlightData.highlight.sourceData?.type;
82
- if (datum &&
83
- (type === HighlightEventSource.ZONE ||
84
- type === HighlightEventSource.RANGE ||
85
- type === HighlightEventSource.ATOM)) {
86
- // we are on range/zone level only, so add the belonging signal IDs to highlight too
87
- highlights = highlights.concat(datum.signals
88
- .map((signal) => filterForIDsWithAssignment(assignments, [signal.id]).length > 0
89
- ? signal.diaIDs
90
- : [])
91
- .flat());
92
- }
76
+ const highlights = highlightData.highlight.highlighted
77
+ .filter((highlightID) => {
78
+ return assignments.data.assignments[highlightID];
79
+ })
80
+ .flatMap((highlightID) => {
81
+ const { datum } = findDatumAndSignalIndex(data, highlightID);
82
+ const type = highlightData.highlight.sourceData?.type;
83
+ if (datum &&
84
+ (type === HighlightEventSource.ZONE ||
85
+ type === HighlightEventSource.RANGE ||
86
+ type === HighlightEventSource.ATOM)) {
87
+ // we are on range/zone level only, so add the belonging signal IDs to highlight too
88
+ return datum.signals.flatMap((signal) => filterForIDsWithAssignment(assignments, [signal.id]).length > 0
89
+ ? signal.diaIDs
90
+ : []);
93
91
  }
92
+ return [];
94
93
  });
95
94
  return getCurrentDiaIDsToHighlight(assignments).concat(highlights);
96
95
  }, [
@@ -54,6 +54,6 @@ function ColumnHeader({ charLabel, rangeLabel, data, onColumnFilter, }) {
54
54
  const deleteHandler = useCallback(() => {
55
55
  dispatch({ type: DELETE_ANALYZE_SPECTRA_RANGE, colKey: charLabel });
56
56
  }, [charLabel, dispatch]);
57
- return (_jsxs("div", { css: styles, children: [_jsxs("div", { className: "container", children: [data.type === COLUMNS_TYPES.NORMAL && (_jsx("div", { className: "dropDown-container", children: _jsx(DropDownButton, { data: columnsFilters, formatSelectedValue: (item) => item.label.substring(0, 3), selectedKey: data.valueKey, onSelect: onColumnFilter }) })), _jsxs("div", { className: "label-container", children: [_jsxs("span", { className: "label", children: [" ", charLabel] }), _jsx("span", { className: "label", children: rangeLabel })] })] }), _jsx(DeleteButton, { onDelete: deleteHandler })] }));
57
+ return (_jsxs("div", { css: styles, children: [_jsxs("div", { className: "container", children: [data.type === COLUMNS_TYPES.NORMAL && (_jsx("div", { className: "dropDown-container", children: _jsx(DropDownButton, { data: columnsFilters, formatSelectedValue: (item) => item.label.slice(0, 3), selectedKey: data.valueKey, onSelect: onColumnFilter }) })), _jsxs("div", { className: "label-container", children: [_jsxs("span", { className: "label", children: [" ", charLabel] }), _jsx("span", { className: "label", children: rangeLabel })] })] }), _jsx(DeleteButton, { onDelete: deleteHandler })] }));
58
58
  }
59
59
  export default ColumnHeader;
@@ -11,7 +11,7 @@ const initCode = `function run(data) {
11
11
  `;
12
12
  function MultipleAnalysisCodeEditor({ data }) {
13
13
  const { values, setFieldValue } = useFormikContext();
14
- const [code, setCode] = useState(values.code ? values.code : initCode);
14
+ const [code, setCode] = useState(values.code || initCode);
15
15
  const [result, setResult] = useState('');
16
16
  useEffect(() => {
17
17
  const evalResult = evaluate(code, data);
@@ -15,7 +15,7 @@ import { useModal } from '../../elements/popup/Modal';
15
15
  import AlignSpectraModal from '../../modal/AlignSpectraModal';
16
16
  import { RESET_SELECTED_TOOL } from '../../reducer/types/Types';
17
17
  import Events from '../../utility/Events';
18
- import { copyTextToClipboard } from '../../utility/Export';
18
+ import { copyTextToClipboard } from '../../utility/export';
19
19
  import { tablePanelStyle } from '../extra/BasicPanelStyle';
20
20
  import DefaultPanelHeader from '../header/DefaultPanelHeader';
21
21
  import PreferencesHeader from '../header/PreferencesHeader';
@@ -69,10 +69,10 @@ function MultipleSpectraAnalysisPreferences({ data, onAfterSave }, ref) {
69
69
  },
70
70
  }));
71
71
  useEffect(() => {
72
- const result = Object.keys(data.columns).reduce((acc, key) => {
73
- acc[key] = { ...data.columns[key], tempKey: key };
74
- return acc;
75
- }, {});
72
+ const result = Object.fromEntries(Object.keys(data.columns).map((key) => [
73
+ key,
74
+ { ...data.columns[key], tempKey: key },
75
+ ]));
76
76
  setColumns(result);
77
77
  refForm.current.setValues({ columns: result, code: data.code });
78
78
  }, [data]);
@@ -81,26 +81,27 @@ function MultipleSpectraAnalysisPreferences({ data, onAfterSave }, ref) {
81
81
  }, [columns]);
82
82
  const preferncesSchema = useMemo(() => {
83
83
  function columnSchema() {
84
- return columnsKeys.reduce((acc, key) => {
85
- acc[key] = Yup.object().shape({
84
+ return Object.fromEntries(columnsKeys.map((key) => [
85
+ key,
86
+ Yup.object().shape({
86
87
  tempKey: Yup.string()
87
88
  .required()
88
89
  .test('unique', 'must be unique column name', (colmnName) => {
89
90
  const formData = refForm.current.values.columns;
90
- return (Object.keys(formData).reduce((acc, colKey) => {
91
+ const cols = [];
92
+ for (const colKey of Object.keys(formData)) {
91
93
  if (formData[colKey].tempKey === colmnName) {
92
- acc.push(colmnName);
94
+ cols.push(colmnName);
93
95
  }
94
- return acc;
95
- }, []).length === 1);
96
+ }
97
+ return cols.length === 1;
96
98
  }),
97
99
  ...(columns[key].type === COLUMNS_TYPES.FORMULA
98
100
  ? { formula: Yup.string().required() }
99
101
  : {}),
100
102
  index: Yup.string().required(),
101
- });
102
- return acc;
103
- }, {});
103
+ }),
104
+ ]));
104
105
  }
105
106
  return Yup.object().shape({
106
107
  columns: Yup.object().shape(columnSchema()),
@@ -108,10 +109,10 @@ function MultipleSpectraAnalysisPreferences({ data, onAfterSave }, ref) {
108
109
  }, [columns, columnsKeys, refForm]);
109
110
  const submitHandler = useCallback((values) => {
110
111
  onAfterSave?.(true);
111
- const result = Object.entries(values.columns).reduce((acc, [key, value]) => {
112
- acc[key] = { ...columns[key], ...value };
113
- return acc;
114
- }, {});
112
+ const result = {};
113
+ for (const [key, value] of Object.entries(values.columns)) {
114
+ result[key] = { ...columns[key], ...value };
115
+ }
115
116
  dispatch({
116
117
  type: SET_ANALYZE_SPECTRA_COLUMNS,
117
118
  payload: { code: values.code, columns: result },
@@ -44,7 +44,7 @@ function MultipleSpectraAnalysisTable({ data, activeTab, }) {
44
44
  : '' }));
45
45
  }
46
46
  if (data.columns) {
47
- Object.keys(data.columns).forEach((columnKey) => {
47
+ for (const columnKey in data.columns) {
48
48
  const { valueKey, index: columnIndex } = data.columns[columnKey];
49
49
  addCustomColumn(columns, {
50
50
  index: columnIndex + 1,
@@ -52,7 +52,7 @@ function MultipleSpectraAnalysisTable({ data, activeTab, }) {
52
52
  Header: () => headerHandler(data.columns[columnKey], columnKey),
53
53
  id: columnKey,
54
54
  });
55
- });
55
+ }
56
56
  }
57
57
  return columns.sort((object1, object2) => object1.index - object2.index);
58
58
  }, [columnFilterHandler, data.columns, format]);
@@ -65,7 +65,7 @@ function PeaksPanelInner({ peaks, info, xDomain, activeTab, peaksOptions, }) {
65
65
  x,
66
66
  xHz: info?.originFrequency ? value * info.originFrequency : '',
67
67
  y,
68
- width: width ? width : '',
68
+ width: width || '',
69
69
  isConstantlyHighlighted: isInRange(value, { from, to }),
70
70
  };
71
71
  })
@@ -36,7 +36,7 @@ function PeaksTable({ activeTab, data }) {
36
36
  });
37
37
  }, [modal, peaksPreferences]);
38
38
  const saveDeltaPPMRefsHandler = useCallback((event, row) => {
39
- const shiftValue = parseFloat(event.target.value) - parseFloat(row.x);
39
+ const shiftValue = Number.parseFloat(event.target.value) - Number.parseFloat(row.x);
40
40
  dispatch({ type: SHIFT_SPECTRUM, shiftValue });
41
41
  }, [dispatch]);
42
42
  const COLUMNS = useMemo(() => [
@@ -115,6 +115,6 @@ function PeaksTable({ activeTab, data }) {
115
115
  }
116
116
  return columns.sort((object1, object2) => object1.index - object2.index);
117
117
  }, [COLUMNS, initialColumns, peaksPreferences]);
118
- return data && data.length > 0 ? (_jsx(ReactTable, { data: data, columns: tableColumns, approxItemHeight: 20, enableVirtualScroll: true })) : (_jsx(NoTableData, {}));
118
+ return data && data.length > 0 ? (_jsx(ReactTable, { data: data, columns: tableColumns, approxItemHeight: 24, enableVirtualScroll: true })) : (_jsx(NoTableData, {}));
119
119
  }
120
120
  export default memo(PeaksTable);
@@ -18,7 +18,7 @@ import { usePanelPreferences } from '../../hooks/usePanelPreferences';
18
18
  import CopyClipboardModal from '../../modal/CopyClipboardModal';
19
19
  import ChangeSumModal from '../../modal/changeSum/ChangeSumModal';
20
20
  import { ADD_RANGE, CHANGE_RANGES_SUM_FLAG, CHANGE_RANGE_SUM, DELETE_RANGE, SHOW_J_GRAPH, SHOW_MULTIPLICTY_TREES, SHOW_RANGES_INTEGRALS, } from '../../reducer/types/Types';
21
- import { copyHTMLToClipboard } from '../../utility/Export';
21
+ import { copyHTMLToClipboard } from '../../utility/export';
22
22
  import { getNumberOfDecimals } from '../../utility/formatNumber';
23
23
  import DefaultPanelHeader from '../header/DefaultPanelHeader';
24
24
  import useEditRangeModal from './hooks/useEditRangeModal';
@@ -11,7 +11,7 @@ import { usePanelPreferences } from '../../hooks/usePanelPreferences';
11
11
  import useSpectrum from '../../hooks/useSpectrum';
12
12
  import { rangeStateInit } from '../../reducer/Reducer';
13
13
  import { UNLINK_RANGE } from '../../reducer/types/Types';
14
- import { copyTextToClipboard } from '../../utility/Export';
14
+ import { copyTextToClipboard } from '../../utility/export';
15
15
  import { tablePanelStyle } from '../extra/BasicPanelStyle';
16
16
  import NoTableData from '../extra/placeholder/NoTableData';
17
17
  import PreferencesHeader from '../header/PreferencesHeader';
@@ -48,7 +48,7 @@ const tableStyle = css `
48
48
  }
49
49
  `;
50
50
  function RangesTable({ tableData, onUnlink, context, activeTab, preferences, info, }) {
51
- const element = activeTab?.replace(/[0-9]/g, '');
51
+ const element = activeTab?.replace(/\d/g, '');
52
52
  const contextRef = useRef();
53
53
  const { items: sortedData, isSortedDesc, onSort } = useTableSortBy(tableData);
54
54
  const data = useMapRanges(sortedData);
@@ -15,7 +15,6 @@ import RelativeColumn from './TableColumns/RelativeColumn';
15
15
  import SignalAssignmentsColumn from './TableColumns/SignalAssignmentsColumn';
16
16
  import SignalDeltaColumn from './TableColumns/SignalDeltaColumn';
17
17
  import SignalDeltaHzColumn from './TableColumns/SignalDeltaHzColumn';
18
- import useFormat from './TableColumns/format';
19
18
  const HighlightedRowStyle = css `
20
19
  background-color: #ff6f0057;
21
20
  `;
@@ -32,7 +31,6 @@ function RangesTableRow({ rowData, onUnlink, onContextMenu, preferences, info, }
32
31
  const highlightData = useHighlightData();
33
32
  const [unlinkRangeButtonVisibility, showUnlinkRangeButton] = useState(false);
34
33
  const [unlinkSignalButtonVisibility, showUnlinkSignalButton] = useState(false);
35
- const getFormat = useFormat(preferences);
36
34
  const rowSpanTags = useMemo(() => {
37
35
  return {
38
36
  rowSpan: rowData.tableMetaInfo.rowSpan,
@@ -110,6 +108,6 @@ function RangesTableRow({ rowData, onUnlink, onContextMenu, preferences, info, }
110
108
  ? ConstantlyHighlightedRowStyle
111
109
  : null;
112
110
  }, [assignmentRange.isActive, highlightRange.isActive, rowData]);
113
- return (_jsxs("tr", { onContextMenu: (e) => onContextMenu(e, rowData), css: trCss, children: [_jsx("td", { ...rowSpanTags, ...onHoverRange, children: rowData.tableMetaInfo.rowIndex + 1 }), preferences.from.show && (_jsx(RangeColumn, { value: rowData.from, rowSpanTags: rowSpanTags, onHoverRange: onHoverRange, format: preferences.from.format })), preferences.to.show && (_jsx(RangeColumn, { value: rowData.to, rowSpanTags: rowSpanTags, onHoverRange: onHoverRange, format: preferences.to.format })), preferences.deltaPPM.show && (_jsx(SignalDeltaColumn, { rowData: rowData, onHoverSignal: onHoverSignal, deltaPPMFormat: preferences.deltaPPM.format })), preferences.deltaHz.show && (_jsx(SignalDeltaHzColumn, { rowData: rowData, onHoverSignal: onHoverSignal, deltaHzFormat: preferences.deltaHz.format, info: info })), preferences.relative.show && (_jsx(RelativeColumn, { rowData: rowData, rowSpanTags: rowSpanTags, onHoverRange: onHoverRange, format: preferences.relative.format })), preferences.absolute.show && (_jsx(AbsoluteColumn, { value: rowData.absolute, rowSpanTags: rowSpanTags, onHoverRange: onHoverRange, format: getFormat('absoluteFormat', undefined) })), _jsx("td", { ...onHoverSignal, children: lodashGet(rowData, 'tableMetaInfo.signal.multiplicity', '') }), preferences.coupling.show && (_jsx(CouplingColumn, { rowData: rowData, onHoverSignal: onHoverSignal, format: preferences.coupling.format })), _jsx(SignalAssignmentsColumn, { rowData: rowData, assignment: assignmentSignal, highlight: highlightSignal, onHover: onHoverSignal, unlinkVisibility: unlinkSignalButtonVisibility, onUnlinkVisibilityChange: (flag) => showUnlinkSignalButton(flag), onLink: linkHandler, onUnlink: unlinkHandler }), _jsx(RangeAssignmentsColumn, { rowData: rowData, assignment: assignmentRange, highlight: highlightRangeAssignmentsColumn, onHover: onHoverRangeAssignmentsColumn, unlinkVisibility: unlinkRangeButtonVisibility, onUnlinkVisibilityChange: (flag) => showUnlinkRangeButton(flag), onLink: linkHandler, onUnlink: unlinkHandler, rowSpanTags: rowSpanTags, highlightData: highlightData }), _jsx(ActionsColumn, { rowData: rowData, onHoverSignal: onHoverSignal, onHoverRange: onHoverRange, rowSpanTags: rowSpanTags, showKind: preferences.showKind })] }));
111
+ return (_jsxs("tr", { onContextMenu: (e) => onContextMenu(e, rowData), css: trCss, children: [_jsx("td", { ...rowSpanTags, ...onHoverRange, children: rowData.tableMetaInfo.rowIndex + 1 }), preferences.from.show && (_jsx(RangeColumn, { value: rowData.from, rowSpanTags: rowSpanTags, onHoverRange: onHoverRange, format: preferences.from.format })), preferences.to.show && (_jsx(RangeColumn, { value: rowData.to, rowSpanTags: rowSpanTags, onHoverRange: onHoverRange, format: preferences.to.format })), preferences.deltaPPM.show && (_jsx(SignalDeltaColumn, { rowData: rowData, onHoverSignal: onHoverSignal, deltaPPMFormat: preferences.deltaPPM.format })), preferences.deltaHz.show && (_jsx(SignalDeltaHzColumn, { rowData: rowData, onHoverSignal: onHoverSignal, deltaHzFormat: preferences.deltaHz.format, info: info })), preferences.relative.show && (_jsx(RelativeColumn, { rowData: rowData, rowSpanTags: rowSpanTags, onHoverRange: onHoverRange, format: preferences.relative.format })), preferences.absolute.show && (_jsx(AbsoluteColumn, { value: rowData.absolute, rowSpanTags: rowSpanTags, onHoverRange: onHoverRange, format: preferences.absolute.format })), _jsx("td", { ...onHoverSignal, children: lodashGet(rowData, 'tableMetaInfo.signal.multiplicity', '') }), preferences.coupling.show && (_jsx(CouplingColumn, { rowData: rowData, onHoverSignal: onHoverSignal, format: preferences.coupling.format })), _jsx(SignalAssignmentsColumn, { rowData: rowData, assignment: assignmentSignal, highlight: highlightSignal, onHover: onHoverSignal, unlinkVisibility: unlinkSignalButtonVisibility, onUnlinkVisibilityChange: (flag) => showUnlinkSignalButton(flag), onLink: linkHandler, onUnlink: unlinkHandler }), _jsx(RangeAssignmentsColumn, { rowData: rowData, assignment: assignmentRange, highlight: highlightRangeAssignmentsColumn, onHover: onHoverRangeAssignmentsColumn, unlinkVisibility: unlinkRangeButtonVisibility, onUnlinkVisibilityChange: (flag) => showUnlinkRangeButton(flag), onLink: linkHandler, onUnlink: unlinkHandler, rowSpanTags: rowSpanTags, highlightData: highlightData }), _jsx(ActionsColumn, { rowData: rowData, onHoverSignal: onHoverSignal, onHoverRange: onHoverRange, rowSpanTags: rowSpanTags, showKind: preferences.showKind })] }));
114
112
  }
115
113
  export default RangesTableRow;
@@ -4,7 +4,7 @@ import { formatNumber } from '../../../utility/formatNumber';
4
4
  function CouplingColumn({ rowData, onHoverSignal, format, }) {
5
5
  const result = lodashGet(rowData, 'tableMetaInfo.signal.js');
6
6
  return (_jsx("td", { ...onHoverSignal, children: result
7
- ?.map((coupling) => !isNaN(coupling.coupling)
7
+ ?.map((coupling) => !Number.isNaN(Number(coupling.coupling))
8
8
  ? formatNumber(coupling.coupling, format)
9
9
  : '')
10
10
  .join(',') }));
@@ -12,7 +12,7 @@ export default function useEditRangeModal(range) {
12
12
  const modal = useModal();
13
13
  const assignmentData = useAssignmentData();
14
14
  const zoomRange = useCallback((modalRange) => {
15
- const _range = modalRange ? modalRange : range;
15
+ const _range = modalRange || range;
16
16
  if (_range) {
17
17
  const { from, to } = _range;
18
18
  const margin = Math.abs(from - to);
@@ -27,7 +27,7 @@ export default function useEditRangeModal(range) {
27
27
  dispatch({
28
28
  type: DELETE_RANGE,
29
29
  payload: {
30
- data: { id: id ? id : range?.id, assignmentData },
30
+ data: { id: id || range?.id, assignmentData },
31
31
  resetSelectTool,
32
32
  },
33
33
  });
@@ -2,10 +2,10 @@ import { v4 } from '@lukeed/uuid';
2
2
  import { useMemo } from 'react';
3
3
  function useMapRanges(data) {
4
4
  return useMemo(() => {
5
- const _rangesData = [];
6
- data.forEach((range, i) => {
5
+ const rangesData = [];
6
+ for (const [i, range] of data.entries()) {
7
7
  if (range.signals.length === 1) {
8
- _rangesData.push({
8
+ rangesData.push({
9
9
  rowKey: v4(),
10
10
  ...range,
11
11
  tableMetaInfo: {
@@ -18,7 +18,7 @@ function useMapRanges(data) {
18
18
  });
19
19
  }
20
20
  else if (range.signals.length > 1) {
21
- range.signals.forEach((signal, j) => {
21
+ for (const [j, signal] of range.signals.entries()) {
22
22
  let hide = false;
23
23
  let rowSpan = null;
24
24
  if (j < range.signals.length - 1) {
@@ -32,7 +32,7 @@ function useMapRanges(data) {
32
32
  else {
33
33
  hide = true;
34
34
  }
35
- _rangesData.push({
35
+ rangesData.push({
36
36
  rowKey: v4(),
37
37
  ...range,
38
38
  tableMetaInfo: {
@@ -45,10 +45,10 @@ function useMapRanges(data) {
45
45
  id: signal.id,
46
46
  },
47
47
  });
48
- });
48
+ }
49
49
  }
50
- });
51
- return _rangesData;
50
+ }
51
+ return rangesData;
52
52
  }, [data]);
53
53
  }
54
54
  export default useMapRanges;
@@ -38,13 +38,13 @@ const styles = {
38
38
  justifyContent: 'center',
39
39
  },
40
40
  };
41
+ function formatValueAsHTML(value) {
42
+ if (value) {
43
+ value = value.replace(/(?<value>\d+)/g, '<sub>$<value></sub>');
44
+ }
45
+ return value;
46
+ }
41
47
  function SpectrumListItem({ activeSpectrum, markersVisible, data, onChangeVisibility, onChangeMarkersVisibility, onChangeActiveSpectrum, onOpenSettingModal, onContextMenu, }) {
42
- const formatValueAsHTML = (value) => {
43
- if (value) {
44
- value = value.replace(/(?<value>[0-9]+)/g, '<sub>$<value></sub>');
45
- }
46
- return value;
47
- };
48
48
  const activated = !activeSpectrum || activeSpectrum?.id === data.id;
49
49
  const { color, name, positiveColor, negativeColor } = data.display;
50
50
  return (_jsxs("div", { style: {
@@ -10,10 +10,10 @@ const styles = {
10
10
  width: '100%',
11
11
  };
12
12
  function SpectrumListPanel() {
13
- const [spectrums, setSpectrums] = useState([]);
13
+ const [spectra, setSpectra] = useState([]);
14
14
  const tabChangeHandler = useCallback((e) => {
15
- setSpectrums(e.data ? e.data : []);
15
+ setSpectra(e.data || []);
16
16
  }, []);
17
- return (_jsxs("div", { style: styles, children: [_jsx(SpectraPanelHeader, { spectrums: spectrums }), _jsx(SpectrumsTabs, { onTabChange: tabChangeHandler })] }));
17
+ return (_jsxs("div", { style: styles, children: [_jsx(SpectraPanelHeader, { spectrums: spectra }), _jsx(SpectrumsTabs, { onTabChange: tabChangeHandler })] }));
18
18
  }
19
19
  export default memo(SpectrumListPanel);
@@ -9,8 +9,8 @@ import Tabs from '../../elements/Tab/Tabs';
9
9
  import { useAlert } from '../../elements/popup/Alert';
10
10
  import { useActiveSpectrum } from '../../reducer/Reducer';
11
11
  import { CHANGE_PEAKS_MARKERS_VISIBILITY, SET_ACTIVE_TAB, CHANGE_VISIBILITY, CHANGE_ACTIVE_SPECTRUM, DELETE_SPECTRA, } from '../../reducer/types/Types';
12
- import { copyTextToClipboard } from '../../utility/Export';
13
12
  import groupByInfoKey from '../../utility/GroupByInfoKey';
13
+ import { copyTextToClipboard } from '../../utility/export';
14
14
  import SpectrumListItem from './SpectrumListItem';
15
15
  import SpectrumSetting from './base/setting/SpectrumSetting';
16
16
  function SpectrumsTabsInner({ data, activeSpectrum, activeTab, onTabChange, }) {
@@ -23,13 +23,13 @@ function SpectrumsTabsInner({ data, activeSpectrum, activeTab, onTabChange, }) {
23
23
  const dispatch = useDispatch();
24
24
  useEffect(() => {
25
25
  if (data) {
26
- const visibleMarkers = data.reduce((acc, datum) => {
26
+ const visibleMarkers = [];
27
+ for (const datum of data) {
27
28
  if (datum.info.dimension === 1 &&
28
29
  datum.display.isPeaksMarkersVisible) {
29
- acc.push({ id: datum.id });
30
+ visibleMarkers.push({ id: datum.id });
30
31
  }
31
- return acc;
32
- }, []);
32
+ }
33
33
  setMarkersVisible(visibleMarkers);
34
34
  }
35
35
  }, [data, dispatch]);
@@ -13,7 +13,7 @@ function ColorIndicator2D({ positiveColor, negativeColor, activated, }) {
13
13
  return (_jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", opacity: activated ? 1 : 0.2, children: _jsxs("g", { children: [_jsx("path", { d: "M0,0H12L0,12Z", fill: positiveColor, strokeWidth: "0" }), _jsx("path", { d: "M12,12H0L12,0Z", fill: negativeColor, strokeWidth: "0" })] }) }));
14
14
  }
15
15
  function ColorIndicator(props) {
16
- const { style, onClick = () => null, activated } = props;
17
- return (_jsx("button", { style: style, type: "button", onClick: onClick, children: props.dimension === 2 ? (_jsx(ColorIndicator2D, { ...props.color, activated: activated })) : (_jsx(ColorIndicator1D, { activated: activated, ...props.color })) }));
16
+ const { style, onClick = () => null, activated, dimension, color } = props;
17
+ return (_jsx("button", { style: style, type: "button", onClick: onClick, children: dimension === 2 ? (_jsx(ColorIndicator2D, { ...color, activated: activated })) : (_jsx(ColorIndicator1D, { activated: activated, ...color })) }));
18
18
  }
19
19
  export default memo(ColorIndicator);
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  interface Spectrum1DSettingProps {
3
3
  data: any;
4
- onSubmit: (values: any, helpers: any) => void;
4
+ onSubmit: (values: any) => void;
5
5
  }
6
6
  declare function Spectrum1DSetting({ data: SpectrumData, onSubmit, }: Spectrum1DSettingProps): JSX.Element;
7
7
  export default Spectrum1DSetting;
@@ -1,8 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import FormikColorPicker from '../../../../elements/formik/FormikColorPicker';
3
3
  import FormikForm from '../../../../elements/formik/FormikForm';
4
+ import FormikOnChange from '../../../../elements/formik/FormikOnChange';
4
5
  import Spectrum1DHistogram from './Spectrum1DHistogram';
5
6
  function Spectrum1DSetting({ data: SpectrumData, onSubmit, }) {
6
- return (_jsx(FormikForm, { initialValues: SpectrumData.display, onSubmit: onSubmit, children: _jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '1.25rem' }, children: [_jsx("div", { style: { display: 'block', position: 'relative' }, children: _jsx(FormikColorPicker, { name: "color", triggerSubmit: true }) }), _jsx(Spectrum1DHistogram, { color: "red", data: SpectrumData.data })] }) }));
7
+ return (_jsxs(FormikForm, { initialValues: SpectrumData.display, onSubmit: onSubmit, children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '1.25rem' }, children: [_jsx("div", { style: { display: 'block', position: 'relative' }, children: _jsx(FormikColorPicker, { name: "color" }) }), _jsx(Spectrum1DHistogram, { color: "red", data: SpectrumData.data })] }), _jsx(FormikOnChange, { onChange: onSubmit })] }));
7
8
  }
8
9
  export default Spectrum1DSetting;
@@ -1,6 +1,6 @@
1
1
  interface Spectrum2DSettingProps {
2
2
  data: any;
3
- onSubmit: (values: any, helpers: any) => void;
3
+ onSubmit: (values: any) => void;
4
4
  }
5
5
  declare function Spectrum2DSetting({ data: SpectrumData, onSubmit, }: Spectrum2DSettingProps): import("@emotion/react/jsx-runtime").JSX.Element;
6
6
  export default Spectrum2DSetting;