nmrium 2.2.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (414) hide show
  1. package/lib/component/1d/PredictionErrorsNotations.js +3 -3
  2. package/lib/component/1d/PredictionErrorsNotations.js.map +1 -1
  3. package/lib/component/1d/peaks/PeakEditionManager.d.ts +1 -1
  4. package/lib/component/1d/peaks/Peaks.d.ts.map +1 -1
  5. package/lib/component/1d/peaks/Peaks.js +2 -1
  6. package/lib/component/1d/peaks/Peaks.js.map +1 -1
  7. package/lib/component/1d/peaks/usePeakShapesPath.d.ts.map +1 -1
  8. package/lib/component/1d/peaks/usePeakShapesPath.js.map +1 -1
  9. package/lib/component/1d/ranges/AssignmentLabel.js +1 -1
  10. package/lib/component/1d/ranges/AssignmentLabel.js.map +1 -1
  11. package/lib/component/1d/ranges/FloatingRangeTablePreferencesModal.d.ts +9 -0
  12. package/lib/component/1d/ranges/FloatingRangeTablePreferencesModal.d.ts.map +1 -0
  13. package/lib/component/1d/ranges/FloatingRangeTablePreferencesModal.js +138 -0
  14. package/lib/component/1d/ranges/FloatingRangeTablePreferencesModal.js.map +1 -0
  15. package/lib/component/1d/ranges/FloatingRanges.d.ts.map +1 -0
  16. package/lib/component/1d/ranges/FloatingRanges.js +362 -0
  17. package/lib/component/1d/ranges/FloatingRanges.js.map +1 -0
  18. package/lib/component/1d/ranges/Ranges.js +2 -2
  19. package/lib/component/1d/ranges/Ranges.js.map +1 -1
  20. package/lib/component/1d-2d/FieldEdition.d.ts +2 -2
  21. package/lib/component/1d-2d/FieldEdition.d.ts.map +1 -1
  22. package/lib/component/1d-2d/FieldEdition.js +2 -2
  23. package/lib/component/1d-2d/FieldEdition.js.map +1 -1
  24. package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +7 -7
  25. package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js.map +1 -1
  26. package/lib/component/1d-2d/tools/BrushXY.js +6 -6
  27. package/lib/component/1d-2d/tools/BrushXY.js.map +1 -1
  28. package/lib/component/2d/1d-tracer/Left1DChart.d.ts.map +1 -1
  29. package/lib/component/2d/1d-tracer/Left1DChart.js +6 -2
  30. package/lib/component/2d/1d-tracer/Left1DChart.js.map +1 -1
  31. package/lib/component/2d/1d-tracer/Ranges1D.d.ts +9 -0
  32. package/lib/component/2d/1d-tracer/Ranges1D.d.ts.map +1 -0
  33. package/lib/component/2d/1d-tracer/Ranges1D.js +76 -0
  34. package/lib/component/2d/1d-tracer/Ranges1D.js.map +1 -0
  35. package/lib/component/2d/1d-tracer/Signals1D.d.ts +11 -0
  36. package/lib/component/2d/1d-tracer/Signals1D.d.ts.map +1 -0
  37. package/lib/component/2d/1d-tracer/Signals1D.js +90 -0
  38. package/lib/component/2d/1d-tracer/Signals1D.js.map +1 -0
  39. package/lib/component/2d/1d-tracer/Top1DChart.d.ts.map +1 -1
  40. package/lib/component/2d/1d-tracer/Top1DChart.js +6 -2
  41. package/lib/component/2d/1d-tracer/Top1DChart.js.map +1 -1
  42. package/lib/component/2d/ft/FTContainer.d.ts.map +1 -1
  43. package/lib/component/2d/ft/FTContainer.js.map +1 -1
  44. package/lib/component/2d/zones/SignalsGuideLines.js +1 -1
  45. package/lib/component/2d/zones/SignalsGuideLines.js.map +1 -1
  46. package/lib/component/2d/zones/ZonesAssignmentsLabels.js +1 -1
  47. package/lib/component/2d/zones/ZonesAssignmentsLabels.js.map +1 -1
  48. package/lib/component/AnchorSVG.d.ts +37 -0
  49. package/lib/component/AnchorSVG.d.ts.map +1 -0
  50. package/lib/component/AnchorSVG.js +137 -0
  51. package/lib/component/AnchorSVG.js.map +1 -0
  52. package/lib/component/EventsTrackers/BrushTracker.d.ts.map +1 -1
  53. package/lib/component/EventsTrackers/BrushTracker.js +4 -0
  54. package/lib/component/EventsTrackers/BrushTracker.js.map +1 -1
  55. package/lib/component/SVGTable.d.ts +5 -3
  56. package/lib/component/SVGTable.d.ts.map +1 -1
  57. package/lib/component/SVGTable.js +16 -16
  58. package/lib/component/SVGTable.js.map +1 -1
  59. package/lib/component/context/KeyModifierContext.d.ts +1 -0
  60. package/lib/component/context/KeyModifierContext.d.ts.map +1 -1
  61. package/lib/component/context/KeyModifierContext.js +4 -0
  62. package/lib/component/context/KeyModifierContext.js.map +1 -1
  63. package/lib/component/context/LoggerContext.d.ts.map +1 -1
  64. package/lib/component/context/LoggerContext.js.map +1 -1
  65. package/lib/component/context/SortSpectraContext.d.ts.map +1 -1
  66. package/lib/component/context/SortSpectraContext.js.map +1 -1
  67. package/lib/component/elements/ActionsButtonsPopover.d.ts +2 -2
  68. package/lib/component/elements/ActionsButtonsPopover.d.ts.map +1 -1
  69. package/lib/component/elements/ActionsButtonsPopover.js +6 -9
  70. package/lib/component/elements/ActionsButtonsPopover.js.map +1 -1
  71. package/lib/component/elements/Button.d.ts.map +1 -1
  72. package/lib/component/elements/Button.js.map +1 -1
  73. package/lib/component/elements/DraggableDialog.d.ts.map +1 -1
  74. package/lib/component/elements/DraggableDialog.js +1 -2
  75. package/lib/component/elements/DraggableDialog.js.map +1 -1
  76. package/lib/component/elements/Sections.d.ts +3 -3
  77. package/lib/component/elements/Sections.d.ts.map +1 -1
  78. package/lib/component/elements/Sections.js +1 -1
  79. package/lib/component/elements/Sections.js.map +1 -1
  80. package/lib/component/elements/TabTitle.d.ts.map +1 -1
  81. package/lib/component/elements/TabTitle.js +2 -2
  82. package/lib/component/elements/TabTitle.js.map +1 -1
  83. package/lib/component/elements/ToolbarPopoverItem.d.ts +1 -0
  84. package/lib/component/elements/ToolbarPopoverItem.d.ts.map +1 -1
  85. package/lib/component/elements/ToolbarPopoverItem.js +10 -3
  86. package/lib/component/elements/ToolbarPopoverItem.js.map +1 -1
  87. package/lib/component/elements/dropDownButton/DropDownButton.d.ts.map +1 -1
  88. package/lib/component/elements/dropDownButton/DropDownButton.js +2 -2
  89. package/lib/component/elements/dropDownButton/DropDownButton.js.map +1 -1
  90. package/lib/component/elements/export/ExportOptionsModal.d.ts +1 -1
  91. package/lib/component/elements/export/ExportOptionsModal.d.ts.map +1 -1
  92. package/lib/component/elements/export/ExportOptionsModal.js +28 -110
  93. package/lib/component/elements/export/ExportOptionsModal.js.map +1 -1
  94. package/lib/component/elements/export/units.d.ts +0 -28
  95. package/lib/component/elements/export/units.d.ts.map +1 -1
  96. package/lib/component/elements/export/units.js +0 -5
  97. package/lib/component/elements/export/units.js.map +1 -1
  98. package/lib/component/elements/export/utilities/getExportOptions.d.ts.map +1 -1
  99. package/lib/component/elements/export/utilities/getExportOptions.js.map +1 -1
  100. package/lib/component/elements/print/pageSize.d.ts +1 -1
  101. package/lib/component/elements/print/pageSize.d.ts.map +1 -1
  102. package/lib/component/header/Header.d.ts.map +1 -1
  103. package/lib/component/header/Header.js +2 -4
  104. package/lib/component/header/Header.js.map +1 -1
  105. package/lib/component/hooks/useExport.d.ts.map +1 -1
  106. package/lib/component/hooks/useExport.js.map +1 -1
  107. package/lib/component/hooks/usePanelPreferences.d.ts +3 -3
  108. package/lib/component/hooks/usePanelPreferences.d.ts.map +1 -1
  109. package/lib/component/hooks/useSaveSettings.d.ts.map +1 -1
  110. package/lib/component/hooks/useSaveSettings.js +3 -6
  111. package/lib/component/hooks/useSaveSettings.js.map +1 -1
  112. package/lib/component/hooks/useTextMetrics.d.ts.map +1 -1
  113. package/lib/component/hooks/useTextMetrics.js +1 -0
  114. package/lib/component/hooks/useTextMetrics.js.map +1 -1
  115. package/lib/component/main/NMRiumViewer.js +1 -1
  116. package/lib/component/main/NMRiumViewer.js.map +1 -1
  117. package/lib/component/modal/EditPeakShapeModal.js +2 -2
  118. package/lib/component/modal/EditPeakShapeModal.js.map +1 -1
  119. package/lib/component/modal/PublicationStringModal.d.ts.map +1 -1
  120. package/lib/component/modal/PublicationStringModal.js +2 -6
  121. package/lib/component/modal/PublicationStringModal.js.map +1 -1
  122. package/lib/component/modal/SaveAsModal.d.ts +2 -2
  123. package/lib/component/modal/SaveAsModal.d.ts.map +1 -1
  124. package/lib/component/modal/SaveAsModal.js +40 -35
  125. package/lib/component/modal/SaveAsModal.js.map +1 -1
  126. package/lib/component/modal/aboutUs/AboutUsModal.d.ts.map +1 -1
  127. package/lib/component/modal/aboutUs/AboutUsModal.js +2 -4
  128. package/lib/component/modal/aboutUs/AboutUsModal.js.map +1 -1
  129. package/lib/component/modal/editRange/EditRangeModal.js +4 -3
  130. package/lib/component/modal/editRange/EditRangeModal.js.map +1 -1
  131. package/lib/component/modal/editRange/forms/components/NewSignalTab.d.ts.map +1 -1
  132. package/lib/component/modal/editRange/forms/components/NewSignalTab.js +39 -37
  133. package/lib/component/modal/editRange/forms/components/NewSignalTab.js.map +1 -1
  134. package/lib/component/modal/setting/tanstack_general_settings/errors/context.d.ts +29 -29
  135. package/lib/component/modal/setting/tanstack_general_settings/errors/context.js +3 -3
  136. package/lib/component/modal/setting/tanstack_general_settings/errors/context.js.map +1 -1
  137. package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.d.ts +29 -29
  138. package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.js +2 -2
  139. package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.js.map +1 -1
  140. package/lib/component/modal/setting/tanstack_general_settings/general_settings.d.ts.map +1 -1
  141. package/lib/component/modal/setting/tanstack_general_settings/general_settings.js +9 -12
  142. package/lib/component/modal/setting/tanstack_general_settings/general_settings.js.map +1 -1
  143. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts +29 -29
  144. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.js +2 -2
  145. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.js.map +1 -1
  146. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.d.ts +24 -24
  147. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts +29 -29
  148. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.js +2 -2
  149. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.js.map +1 -1
  150. package/lib/component/modal/setting/tanstack_general_settings/hooks/use_safe_workspace.d.ts +4 -4
  151. package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts +29 -29
  152. package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.js +2 -2
  153. package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.js.map +1 -1
  154. package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.d.ts +24 -24
  155. package/lib/component/modal/setting/tanstack_general_settings/tabs/database_tab.d.ts +24 -24
  156. package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts +24 -24
  157. package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.d.ts +14 -14
  158. package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.js +2 -2
  159. package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.js.map +1 -1
  160. package/lib/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.d.ts +24 -24
  161. package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts +24 -24
  162. package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.d.ts +24 -24
  163. package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.d.ts +24 -24
  164. package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.d.ts +24 -24
  165. package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_colors_tab.d.ts +24 -24
  166. package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts +24 -24
  167. package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts.map +1 -1
  168. package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.js +3 -2
  169. package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.js.map +1 -1
  170. package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts +24 -24
  171. package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts.map +1 -1
  172. package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.js +3 -2
  173. package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.js.map +1 -1
  174. package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.d.ts +24 -24
  175. package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts.map +1 -1
  176. package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +30 -3
  177. package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js.map +1 -1
  178. package/lib/component/panels/PeaksPanel/PeaksPanel.d.ts.map +1 -1
  179. package/lib/component/panels/PeaksPanel/PeaksPanel.js +1 -9
  180. package/lib/component/panels/PeaksPanel/PeaksPanel.js.map +1 -1
  181. package/lib/component/panels/PeaksPanel/PeaksPreferences.js +18 -18
  182. package/lib/component/panels/PeaksPanel/PeaksPreferences.js.map +1 -1
  183. package/lib/component/panels/PeaksPanel/PeaksTable.d.ts.map +1 -1
  184. package/lib/component/panels/PeaksPanel/PeaksTable.js +17 -17
  185. package/lib/component/panels/PeaksPanel/PeaksTable.js.map +1 -1
  186. package/lib/component/panels/RangesPanel/RangesHeader.d.ts.map +1 -1
  187. package/lib/component/panels/RangesPanel/RangesHeader.js.map +1 -1
  188. package/lib/component/panels/RangesPanel/RangesPreferences.js +22 -22
  189. package/lib/component/panels/RangesPanel/RangesPreferences.js.map +1 -1
  190. package/lib/component/panels/RangesPanel/RangesTable.d.ts +2 -2
  191. package/lib/component/panels/RangesPanel/RangesTable.d.ts.map +1 -1
  192. package/lib/component/panels/RangesPanel/RangesTable.js +5 -4
  193. package/lib/component/panels/RangesPanel/RangesTable.js.map +1 -1
  194. package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +2 -2
  195. package/lib/component/panels/RangesPanel/RangesTableRow.js +2 -2
  196. package/lib/component/panels/RangesPanel/RangesTableRow.js.map +1 -1
  197. package/lib/component/panels/SpectraPanel/SpectraTable.d.ts.map +1 -1
  198. package/lib/component/panels/SpectraPanel/SpectraTable.js +5 -1
  199. package/lib/component/panels/SpectraPanel/SpectraTable.js.map +1 -1
  200. package/lib/component/panels/SpectraPanel/base/RenderAsHTML.d.ts.map +1 -1
  201. package/lib/component/panels/SpectraPanel/base/RenderAsHTML.js +7 -4
  202. package/lib/component/panels/SpectraPanel/base/RenderAsHTML.js.map +1 -1
  203. package/lib/component/panels/SpectraPanel/base/SpectrumName.d.ts.map +1 -1
  204. package/lib/component/panels/SpectraPanel/base/SpectrumName.js +5 -1
  205. package/lib/component/panels/SpectraPanel/base/SpectrumName.js.map +1 -1
  206. package/lib/component/panels/SpectraPanel/base/setting/SpectrumSetting.d.ts.map +1 -1
  207. package/lib/component/panels/SpectraPanel/base/setting/SpectrumSetting.js +2 -2
  208. package/lib/component/panels/SpectraPanel/base/setting/SpectrumSetting.js.map +1 -1
  209. package/lib/component/panels/SummaryPanel/SummaryPanel.d.ts.map +1 -1
  210. package/lib/component/panels/SummaryPanel/SummaryPanel.js +7 -0
  211. package/lib/component/panels/SummaryPanel/SummaryPanel.js.map +1 -1
  212. package/lib/component/panels/filtersPanel/FilterPanel.d.ts.map +1 -1
  213. package/lib/component/panels/filtersPanel/FilterPanel.js +5 -2
  214. package/lib/component/panels/filtersPanel/FilterPanel.js.map +1 -1
  215. package/lib/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.js +1 -1
  216. package/lib/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.js.map +1 -1
  217. package/lib/component/panels/filtersPanel/processings_sections_panel.d.ts +2 -0
  218. package/lib/component/panels/filtersPanel/processings_sections_panel.d.ts.map +1 -0
  219. package/lib/component/panels/filtersPanel/processings_sections_panel.js +144 -0
  220. package/lib/component/panels/filtersPanel/processings_sections_panel.js.map +1 -0
  221. package/lib/component/panels/hooks/useMoleculeAnnotationCore.d.ts +3 -2
  222. package/lib/component/panels/hooks/useMoleculeAnnotationCore.d.ts.map +1 -1
  223. package/lib/component/panels/hooks/useMoleculeAnnotationCore.js +14 -8
  224. package/lib/component/panels/hooks/useMoleculeAnnotationCore.js.map +1 -1
  225. package/lib/component/panels/informationPanel/MixedValuesBadge.d.ts.map +1 -1
  226. package/lib/component/panels/informationPanel/MixedValuesBadge.js +2 -2
  227. package/lib/component/panels/informationPanel/MixedValuesBadge.js.map +1 -1
  228. package/lib/component/panels/informationPanel/SpectraPicker.d.ts.map +1 -1
  229. package/lib/component/panels/informationPanel/SpectraPicker.js +2 -2
  230. package/lib/component/panels/informationPanel/SpectraPicker.js.map +1 -1
  231. package/lib/component/reducer/Reducer.d.ts.map +1 -1
  232. package/lib/component/reducer/Reducer.js +2 -0
  233. package/lib/component/reducer/Reducer.js.map +1 -1
  234. package/lib/component/reducer/actions/CorrelationsActions.js +1 -1
  235. package/lib/component/reducer/actions/CorrelationsActions.js.map +1 -1
  236. package/lib/component/reducer/actions/DomainActions.d.ts.map +1 -1
  237. package/lib/component/reducer/actions/DomainActions.js.map +1 -1
  238. package/lib/component/reducer/actions/FiltersActions.d.ts.map +1 -1
  239. package/lib/component/reducer/actions/FiltersActions.js.map +1 -1
  240. package/lib/component/reducer/actions/LoadAction.d.ts.map +1 -1
  241. package/lib/component/reducer/actions/LoadAction.js.map +1 -1
  242. package/lib/component/reducer/actions/MoleculeActions.d.ts +9 -0
  243. package/lib/component/reducer/actions/MoleculeActions.d.ts.map +1 -1
  244. package/lib/component/reducer/actions/RangesActions.d.ts +11 -2
  245. package/lib/component/reducer/actions/RangesActions.d.ts.map +1 -1
  246. package/lib/component/reducer/actions/RangesActions.js +23 -5
  247. package/lib/component/reducer/actions/RangesActions.js.map +1 -1
  248. package/lib/component/reducer/actions/ToolsActions.d.ts.map +1 -1
  249. package/lib/component/reducer/actions/ToolsActions.js +5 -17
  250. package/lib/component/reducer/actions/ToolsActions.js.map +1 -1
  251. package/lib/component/reducer/helper/getTraceSpectrumID.d.ts +5 -0
  252. package/lib/component/reducer/helper/getTraceSpectrumID.d.ts.map +1 -0
  253. package/lib/component/reducer/helper/getTraceSpectrumID.js +14 -0
  254. package/lib/component/reducer/helper/getTraceSpectrumID.js.map +1 -0
  255. package/lib/component/reducer/helper/setRangesViewProperty.d.ts.map +1 -1
  256. package/lib/component/reducer/helper/setRangesViewProperty.js.map +1 -1
  257. package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts.map +1 -1
  258. package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +35 -26
  259. package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js.map +1 -1
  260. package/lib/component/reducer/preferences/preferencesReducer.d.ts +2 -2
  261. package/lib/component/reducer/preferences/preferencesReducer.d.ts.map +1 -1
  262. package/lib/component/reducer/preferences/utilities/initWorkspace.d.ts +2 -2
  263. package/lib/component/reducer/preferences/utilities/mapWorkspaces.d.ts +2 -2
  264. package/lib/component/reducer/preferences/utilities/mapWorkspaces.d.ts.map +1 -1
  265. package/lib/component/toolbar/ToolTypes.d.ts +2 -2
  266. package/lib/component/toolbar/nmr_toolbar.d.ts.map +1 -1
  267. package/lib/component/toolbar/nmr_toolbar.js +3 -1
  268. package/lib/component/toolbar/nmr_toolbar.js.map +1 -1
  269. package/lib/component/utility/CoreSlot.d.ts +27 -0
  270. package/lib/component/utility/CoreSlot.d.ts.map +1 -0
  271. package/lib/component/utility/CoreSlot.js +56 -0
  272. package/lib/component/utility/CoreSlot.js.map +1 -0
  273. package/lib/component/utility/export.d.ts.map +1 -1
  274. package/lib/component/utility/export.js +1 -0
  275. package/lib/component/utility/export.js.map +1 -1
  276. package/lib/data/PredictionManager.js.map +1 -1
  277. package/lib/data/constants/signalsKinds.d.ts +1 -2
  278. package/lib/data/constants/signalsKinds.d.ts.map +1 -1
  279. package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.d.ts.map +1 -1
  280. package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +1 -0
  281. package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js.map +1 -1
  282. package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.d.ts.map +1 -1
  283. package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js +35 -30
  284. package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js.map +1 -1
  285. package/lib/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.d.ts.map +1 -1
  286. package/lib/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.js +1 -0
  287. package/lib/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.js.map +1 -1
  288. package/lib/data/data1d/multipleSpectraAnalysis.d.ts +2 -2
  289. package/lib/data/matrixGeneration.d.ts.map +1 -1
  290. package/lib/data/matrixGeneration.js.map +1 -1
  291. package/lib/versionInfo.js +1 -1
  292. package/package.json +37 -37
  293. package/src/component/1d/PredictionErrorsNotations.tsx +5 -4
  294. package/src/component/1d/peaks/Peaks.tsx +5 -2
  295. package/src/component/1d/peaks/usePeakShapesPath.ts +0 -1
  296. package/src/component/1d/ranges/AssignmentLabel.tsx +1 -1
  297. package/src/component/1d/ranges/FloatingRangeTablePreferencesModal.tsx +238 -0
  298. package/src/component/1d/ranges/FloatingRanges.tsx +529 -0
  299. package/src/component/1d/ranges/Ranges.tsx +2 -2
  300. package/src/component/1d-2d/FieldEdition.tsx +4 -4
  301. package/src/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.tsx +8 -8
  302. package/src/component/1d-2d/tools/BrushXY.tsx +8 -8
  303. package/src/component/2d/1d-tracer/Left1DChart.tsx +24 -1
  304. package/src/component/2d/1d-tracer/Ranges1D.tsx +134 -0
  305. package/src/component/2d/1d-tracer/Signals1D.tsx +145 -0
  306. package/src/component/2d/1d-tracer/Top1DChart.tsx +29 -2
  307. package/src/component/2d/ft/FTContainer.tsx +1 -0
  308. package/src/component/2d/zones/SignalsGuideLines.tsx +1 -1
  309. package/src/component/2d/zones/ZonesAssignmentsLabels.tsx +1 -1
  310. package/src/component/AnchorSVG.tsx +370 -0
  311. package/src/component/EventsTrackers/BrushTracker.tsx +7 -2
  312. package/src/component/SVGTable.tsx +35 -33
  313. package/src/component/context/KeyModifierContext.tsx +6 -2
  314. package/src/component/context/LoggerContext.tsx +1 -7
  315. package/src/component/context/SortSpectraContext.tsx +1 -3
  316. package/src/component/elements/ActionsButtonsPopover.tsx +12 -14
  317. package/src/component/elements/Button.tsx +1 -6
  318. package/src/component/elements/DraggableDialog.tsx +1 -2
  319. package/src/component/elements/Sections.tsx +9 -7
  320. package/src/component/elements/TabTitle.tsx +7 -5
  321. package/src/component/elements/ToolbarPopoverItem.tsx +13 -2
  322. package/src/component/elements/dropDownButton/DropDownButton.tsx +7 -5
  323. package/src/component/elements/export/ExportOptionsModal.tsx +51 -280
  324. package/src/component/elements/export/units.ts +0 -6
  325. package/src/component/elements/export/utilities/getExportOptions.ts +1 -0
  326. package/src/component/elements/print/pageSize.ts +1 -1
  327. package/src/component/header/Header.tsx +2 -4
  328. package/src/component/hooks/useExport.tsx +1 -3
  329. package/src/component/hooks/usePanelPreferences.ts +4 -4
  330. package/src/component/hooks/useSaveSettings.tsx +4 -15
  331. package/src/component/hooks/useTextMetrics.ts +1 -0
  332. package/src/component/main/NMRiumViewer.tsx +1 -1
  333. package/src/component/modal/EditPeakShapeModal.tsx +2 -2
  334. package/src/component/modal/PublicationStringModal.tsx +5 -11
  335. package/src/component/modal/SaveAsModal.tsx +80 -82
  336. package/src/component/modal/aboutUs/AboutUsModal.tsx +5 -4
  337. package/src/component/modal/editRange/EditRangeModal.tsx +6 -4
  338. package/src/component/modal/editRange/forms/components/NewSignalTab.tsx +58 -58
  339. package/src/component/modal/setting/WorkspaceItem.tsx +2 -2
  340. package/src/component/modal/setting/tanstack_general_settings/errors/context.tsx +3 -3
  341. package/src/component/modal/setting/tanstack_general_settings/errors/renderer.tsx +2 -2
  342. package/src/component/modal/setting/tanstack_general_settings/general_settings.tsx +23 -29
  343. package/src/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.tsx +2 -2
  344. package/src/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.tsx +2 -2
  345. package/src/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.tsx +2 -2
  346. package/src/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.tsx +2 -2
  347. package/src/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.tsx +3 -2
  348. package/src/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.tsx +3 -2
  349. package/src/component/panels/MoleculesPanel/MoleculePanelHeader.tsx +41 -8
  350. package/src/component/panels/PeaksPanel/PeaksPanel.tsx +1 -8
  351. package/src/component/panels/PeaksPanel/PeaksPreferences.tsx +18 -18
  352. package/src/component/panels/PeaksPanel/PeaksTable.tsx +19 -17
  353. package/src/component/panels/RangesPanel/RangesHeader.tsx +1 -2
  354. package/src/component/panels/RangesPanel/RangesPanel.tsx +2 -2
  355. package/src/component/panels/RangesPanel/RangesPreferences.tsx +22 -22
  356. package/src/component/panels/RangesPanel/RangesTable.tsx +19 -17
  357. package/src/component/panels/RangesPanel/RangesTableRow.tsx +25 -25
  358. package/src/component/panels/SpectraPanel/SpectraTable.tsx +12 -1
  359. package/src/component/panels/SpectraPanel/base/RenderAsHTML.tsx +22 -4
  360. package/src/component/panels/SpectraPanel/base/SpectrumName.tsx +15 -6
  361. package/src/component/panels/SpectraPanel/base/setting/SpectrumSetting.tsx +3 -2
  362. package/src/component/panels/SummaryPanel/SummaryPanel.tsx +14 -16
  363. package/src/component/panels/filtersPanel/FilterPanel.tsx +10 -0
  364. package/src/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.tsx +1 -0
  365. package/src/component/panels/filtersPanel/processings_sections_panel.tsx +324 -0
  366. package/src/component/panels/hooks/useMoleculeAnnotationCore.ts +17 -9
  367. package/src/component/panels/informationPanel/MixedValuesBadge.tsx +3 -2
  368. package/src/component/panels/informationPanel/SpectraPicker.tsx +12 -4
  369. package/src/component/panels/multipleAnalysisPanel/AnalysisChart.tsx +2 -2
  370. package/src/component/reducer/Reducer.ts +2 -0
  371. package/src/component/reducer/actions/CorrelationsActions.ts +1 -1
  372. package/src/component/reducer/actions/DomainActions.ts +1 -4
  373. package/src/component/reducer/actions/FiltersActions.ts +1 -2
  374. package/src/component/reducer/actions/LoadAction.ts +1 -3
  375. package/src/component/reducer/actions/RangesActions.ts +39 -5
  376. package/src/component/reducer/actions/ToolsActions.ts +5 -21
  377. package/src/component/reducer/helper/getTraceSpectrumID.tsx +25 -0
  378. package/src/component/reducer/helper/setRangesViewProperty.ts +1 -2
  379. package/src/component/reducer/preferences/panelsPreferencesDefaultValues.ts +32 -19
  380. package/src/component/reducer/preferences/preferencesReducer.ts +2 -2
  381. package/src/component/reducer/preferences/utilities/initWorkspace.ts +2 -2
  382. package/src/component/reducer/preferences/utilities/mapWorkspaces.ts +2 -2
  383. package/src/component/toolbar/ToolTypes.ts +2 -2
  384. package/src/component/toolbar/nmr_toolbar.tsx +3 -2
  385. package/src/component/utility/CoreSlot.tsx +126 -0
  386. package/src/component/utility/export.ts +1 -0
  387. package/src/data/PredictionManager.ts +4 -6
  388. package/src/data/constants/signalsKinds.ts +1 -1
  389. package/src/data/data1d/Spectrum1D/peaks/autoPeakPicking.ts +1 -0
  390. package/src/data/data1d/Spectrum1D/peaks/optimizePeaks.ts +35 -30
  391. package/src/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.ts +1 -0
  392. package/src/data/data1d/multipleSpectraAnalysis.ts +2 -2
  393. package/src/data/matrixGeneration.ts +1 -5
  394. package/src/versionInfo.ts +1 -1
  395. package/lib/component/1d/FloatingRanges.d.ts.map +0 -1
  396. package/lib/component/1d/FloatingRanges.js +0 -263
  397. package/lib/component/1d/FloatingRanges.js.map +0 -1
  398. package/lib/component/elements/export/utilities/exportOptionValidationSchema.d.ts +0 -17
  399. package/lib/component/elements/export/utilities/exportOptionValidationSchema.d.ts.map +0 -1
  400. package/lib/component/elements/export/utilities/exportOptionValidationSchema.js +0 -79
  401. package/lib/component/elements/export/utilities/exportOptionValidationSchema.js.map +0 -1
  402. package/lib/component/elements/export/utilities/getModes.d.ts +0 -4
  403. package/lib/component/elements/export/utilities/getModes.d.ts.map +0 -1
  404. package/lib/component/elements/export/utilities/getModes.js +0 -11
  405. package/lib/component/elements/export/utilities/getModes.js.map +0 -1
  406. package/lib/component/utility/renderCoreSlot.d.ts +0 -11
  407. package/lib/component/utility/renderCoreSlot.d.ts.map +0 -1
  408. package/lib/component/utility/renderCoreSlot.js +0 -13
  409. package/lib/component/utility/renderCoreSlot.js.map +0 -1
  410. package/src/component/1d/FloatingRanges.tsx +0 -378
  411. package/src/component/elements/export/utilities/exportOptionValidationSchema.ts +0 -106
  412. package/src/component/elements/export/utilities/getModes.ts +0 -14
  413. package/src/component/utility/renderCoreSlot.tsx +0 -21
  414. /package/lib/component/1d/{FloatingRanges.d.ts → ranges/FloatingRanges.d.ts} +0 -0
@@ -0,0 +1,370 @@
1
+ import type {
2
+ CSSProperties,
3
+ KeyboardEvent,
4
+ MouseEvent,
5
+ RefObject,
6
+ } from 'react';
7
+ import { useRef, useState } from 'react';
8
+
9
+ type CursorOrientation = 'horizontal' | 'vertical';
10
+
11
+ const CUR_MOVE = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='12' viewBox='0 0 22 12'%3E%3Cpath d='M1 6h20M1 6l4-4M1 6l4 4M21 6l-4-4M21 6l-4 4' fill='none' stroke='black' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 11 6, ew-resize`;
12
+ const CUR_MOVE_VERTICAL = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='22' viewBox='0 0 12 22'%3E%3Cpath d='M6 1v20M6 1l-4 4M6 1l4 4M6 21l-4-4M6 21l4-4' fill='none' stroke='black' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 6 11, ns-resize`;
13
+ type AnchorShape = 'diamond' | 'circle' | 'square' | 'triangle';
14
+
15
+ interface AnchorStyle {
16
+ size?: number;
17
+ hoverSize?: number;
18
+ dragSize?: number;
19
+ fill?: string;
20
+ stroke?: string;
21
+ hoverFill?: string;
22
+ hoverStroke?: string;
23
+ dragFill?: string;
24
+ dragStroke?: string;
25
+ strokeWidth?: number;
26
+ guideColor?: string;
27
+ guideDragColor?: string;
28
+ guideStyle?: 'solid' | 'dashed' | 'dotted';
29
+ }
30
+
31
+ interface AnchorPosition {
32
+ x: number;
33
+ y: number;
34
+ }
35
+
36
+ interface AnchorProps {
37
+ position: AnchorPosition;
38
+ shape?: AnchorShape;
39
+ svgRef: RefObject<SVGSVGElement>;
40
+ svgHeight: number;
41
+ anchorStyle?: AnchorStyle;
42
+ restoreFocusOnLeave?: boolean;
43
+ onDragMove: (newPosition: AnchorPosition) => void;
44
+ onDragEnd: (lastPosition: AnchorPosition) => void;
45
+ onDelete: () => void;
46
+ cursorOrientation?: CursorOrientation;
47
+ }
48
+
49
+ interface DragState {
50
+ startX: number;
51
+ startY: number;
52
+ startAnchorX: number;
53
+ startAnchorY: number;
54
+ }
55
+
56
+ type InteractionState = 'idle' | 'hovered' | 'dragging';
57
+
58
+ interface VisualTokens {
59
+ fill: string;
60
+ stroke: string;
61
+ cursor: string;
62
+ }
63
+
64
+ function resolveVisuals(
65
+ state: InteractionState,
66
+ idleFill: string,
67
+ idleStroke: string,
68
+ hoverFill: string,
69
+ hoverStroke: string,
70
+ dragFill: string,
71
+ dragStroke: string,
72
+ cursorOrientation: CursorOrientation,
73
+ ): VisualTokens {
74
+ const cursor =
75
+ cursorOrientation === 'horizontal' ? CUR_MOVE : CUR_MOVE_VERTICAL;
76
+ if (state === 'dragging') {
77
+ return {
78
+ fill: dragFill,
79
+ stroke: dragStroke,
80
+ cursor,
81
+ };
82
+ }
83
+
84
+ if (state === 'hovered') {
85
+ return {
86
+ fill: hoverFill,
87
+ stroke: hoverStroke,
88
+ cursor,
89
+ };
90
+ }
91
+
92
+ return {
93
+ fill: idleFill,
94
+ stroke: idleStroke,
95
+ cursor: 'default',
96
+ };
97
+ }
98
+
99
+ function clientToSvg(
100
+ event: MouseEvent<SVGGElement>,
101
+ svg: SVGSVGElement | null,
102
+ ): { x: number; y: number } {
103
+ const { clientX, clientY } = event;
104
+ if (!svg) return { x: clientX, y: clientY };
105
+
106
+ const pt = svg.createSVGPoint();
107
+ pt.x = clientX;
108
+ pt.y = clientY;
109
+
110
+ const ctm = svg.getScreenCTM();
111
+
112
+ if (!ctm) return { x: clientX, y: clientY };
113
+
114
+ return pt.matrixTransform(ctm.inverse());
115
+ }
116
+
117
+ interface ShapeRendererProps {
118
+ shape?: AnchorShape;
119
+ fill: string;
120
+ stroke: string;
121
+ strokeWidth: number;
122
+ size: number;
123
+ }
124
+
125
+ function ShapeRenderer({
126
+ shape,
127
+ fill,
128
+ stroke,
129
+ strokeWidth,
130
+ size,
131
+ }: ShapeRendererProps) {
132
+ const half = size / 2;
133
+ const inset = strokeWidth / 2;
134
+
135
+ const common: CSSProperties = {
136
+ filter: 'drop-shadow(0 2px 4px rgba(0,0,0,.14))',
137
+ pointerEvents: 'all',
138
+ };
139
+
140
+ if (shape === 'circle') {
141
+ return (
142
+ <circle
143
+ cx={0}
144
+ cy={0}
145
+ r={half - inset}
146
+ fill={fill}
147
+ stroke={stroke}
148
+ strokeWidth={strokeWidth}
149
+ style={common}
150
+ />
151
+ );
152
+ }
153
+
154
+ if (shape === 'diamond') {
155
+ return (
156
+ <polygon
157
+ points={`
158
+ 0,-${half - inset}
159
+ ${half - inset},0
160
+ 0,${half - inset}
161
+ -${half - inset},0
162
+ `}
163
+ fill={fill}
164
+ stroke={stroke}
165
+ strokeWidth={strokeWidth}
166
+ strokeLinejoin="round"
167
+ style={common}
168
+ />
169
+ );
170
+ }
171
+
172
+ if (shape === 'triangle') {
173
+ return (
174
+ <polygon
175
+ points={`
176
+ 0,-${half - inset}
177
+ ${half - inset},${half - inset}
178
+ -${half - inset},${half - inset}
179
+ `}
180
+ fill={fill}
181
+ stroke={stroke}
182
+ strokeWidth={strokeWidth}
183
+ strokeLinejoin="round"
184
+ style={common}
185
+ />
186
+ );
187
+ }
188
+
189
+ return (
190
+ <rect
191
+ x={-half + inset}
192
+ y={-half + inset}
193
+ width={size - strokeWidth}
194
+ height={size - strokeWidth}
195
+ rx={1}
196
+ fill={fill}
197
+ stroke={stroke}
198
+ strokeWidth={strokeWidth}
199
+ style={common}
200
+ />
201
+ );
202
+ }
203
+
204
+ export function Anchor({
205
+ position,
206
+ shape,
207
+ svgRef,
208
+ svgHeight,
209
+ anchorStyle = {},
210
+ restoreFocusOnLeave = false,
211
+ onDragMove,
212
+ onDragEnd,
213
+ onDelete,
214
+ cursorOrientation = 'horizontal',
215
+ }: AnchorProps) {
216
+ const {
217
+ size = 16,
218
+ hoverSize = size,
219
+ dragSize = size,
220
+ fill: idleFill = '#ffffff',
221
+ stroke: idleStroke = '#d1d5db',
222
+ hoverFill = '#f3f4f6',
223
+ hoverStroke = '#9ca3af',
224
+ dragFill = '#f3f4f6',
225
+ dragStroke = '#6b7280',
226
+ strokeWidth = 1,
227
+ guideColor = 'rgba(156,163,175,0.6)',
228
+ guideDragColor = 'rgba(107,114,128,0.8)',
229
+ guideStyle = 'solid',
230
+ } = anchorStyle;
231
+
232
+ const [hovered, setHovered] = useState(false);
233
+ const [dragging, setDragging] = useState(false);
234
+
235
+ const dragState = useRef<DragState | null>(null);
236
+ const prevFocus = useRef<Element | null>(null);
237
+
238
+ const interactionState: InteractionState = dragging
239
+ ? 'dragging'
240
+ : hovered
241
+ ? 'hovered'
242
+ : 'idle';
243
+
244
+ const { fill, stroke, cursor } = resolveVisuals(
245
+ interactionState,
246
+ idleFill,
247
+ idleStroke,
248
+ hoverFill,
249
+ hoverStroke,
250
+ dragFill,
251
+ dragStroke,
252
+ cursorOrientation,
253
+ );
254
+
255
+ function handleMouseDown(e: MouseEvent<SVGGElement>) {
256
+ e.preventDefault();
257
+ setDragging(true);
258
+ const { x, y } = clientToSvg(e, svgRef.current);
259
+ dragState.current = {
260
+ startX: x,
261
+ startY: y,
262
+ startAnchorX: position.x,
263
+ startAnchorY: position.y,
264
+ };
265
+
266
+ const onMove = (e: globalThis.MouseEvent) => {
267
+ const current = dragState.current;
268
+ if (!current) return;
269
+ const { x, y } = clientToSvg(
270
+ e as unknown as MouseEvent<SVGGElement>,
271
+ svgRef.current,
272
+ );
273
+ const newX = current.startAnchorX + x - current.startX;
274
+ const newY = current.startAnchorY + y - current.startY;
275
+
276
+ onDragMove({ x: newX, y: newY });
277
+ };
278
+
279
+ const onUp = () => {
280
+ setDragging(false);
281
+ dragState.current = null;
282
+ onDragEnd({ x: position.x, y: position.y });
283
+
284
+ window.removeEventListener('mousemove', onMove);
285
+ window.removeEventListener('mouseup', onUp);
286
+ };
287
+
288
+ window.addEventListener('mousemove', onMove);
289
+ window.addEventListener('mouseup', onUp);
290
+ }
291
+
292
+ function handleKeyDown(e: KeyboardEvent<SVGGElement>) {
293
+ if (e.key === 'Delete' || e.key === 'Backspace') {
294
+ e.preventDefault();
295
+ onDelete();
296
+ }
297
+ }
298
+
299
+ function handleMouseEnter(e: MouseEvent<SVGGElement>) {
300
+ setHovered(true);
301
+ prevFocus.current = document.activeElement;
302
+ e.currentTarget.focus();
303
+ }
304
+
305
+ function handleMouseLeave(e: MouseEvent<SVGGElement>) {
306
+ setHovered(false);
307
+
308
+ if (restoreFocusOnLeave && prevFocus.current instanceof HTMLElement) {
309
+ prevFocus.current.focus();
310
+ } else {
311
+ e.currentTarget.blur();
312
+ }
313
+
314
+ prevFocus.current = null;
315
+ }
316
+
317
+ return (
318
+ <>
319
+ {(hovered || dragging) && (
320
+ <line
321
+ x1={position.x}
322
+ y1={0}
323
+ x2={position.x}
324
+ y2={svgHeight}
325
+ stroke={dragging ? guideDragColor : guideColor}
326
+ strokeWidth={1}
327
+ strokeDasharray={
328
+ guideStyle === 'dashed'
329
+ ? '6 4'
330
+ : guideStyle === 'dotted'
331
+ ? '1 3'
332
+ : undefined
333
+ }
334
+ pointerEvents="none"
335
+ />
336
+ )}
337
+
338
+ <g
339
+ transform={`translate(${position.x} ${position.y})`}
340
+ style={{
341
+ cursor,
342
+ outline: 'none',
343
+ }}
344
+ tabIndex={0}
345
+ data-self-control="true"
346
+ onMouseDown={handleMouseDown}
347
+ onMouseEnter={handleMouseEnter}
348
+ onMouseLeave={handleMouseLeave}
349
+ onKeyDown={handleKeyDown}
350
+ >
351
+ {(hovered || dragging) && (
352
+ <circle
353
+ r={(hovered ? hoverSize : dragSize) * 1.5}
354
+ fill={stroke}
355
+ opacity={dragging ? 0.2 : 0.15}
356
+ pointerEvents="none"
357
+ />
358
+ )}
359
+
360
+ <ShapeRenderer
361
+ shape={shape}
362
+ fill={fill}
363
+ stroke={stroke}
364
+ strokeWidth={strokeWidth}
365
+ size={hovered ? hoverSize : dragging ? dragSize : size}
366
+ />
367
+ </g>
368
+ </>
369
+ );
370
+ }
@@ -215,6 +215,12 @@ export function BrushTracker(options: BrushTrackerProps) {
215
215
  (event: PointerEvent) => {
216
216
  event.persist();
217
217
  const currentTarget = event.currentTarget;
218
+
219
+ const target = event.target as HTMLElement;
220
+ if (target.closest('[data-self-control="true"]')) {
221
+ return;
222
+ }
223
+
218
224
  isDraggingRef.current = false; // Reset dragging flag
219
225
 
220
226
  //check that the right or left mouse button pressed
@@ -533,8 +539,7 @@ interface DetectBrushingThresholdSize {
533
539
  type BrushDetectionThresholdAxis = 'both' | 'x' | 'y';
534
540
 
535
541
  type DetectBrushingOptions = { thresholdAxis?: BrushDetectionThresholdAxis } & (
536
- | DetectBrushingThreshold
537
- | DetectBrushingThresholdSize
542
+ DetectBrushingThreshold | DetectBrushingThresholdSize
538
543
  );
539
544
 
540
545
  export function detectBrushing(
@@ -1,5 +1,5 @@
1
- import type { SVGAttributes } from 'react';
2
- import { createContext, useContext, useMemo } from 'react';
1
+ import type { ReactElement, SVGAttributes } from 'react';
2
+ import { createContext, isValidElement, useContext, useMemo } from 'react';
3
3
 
4
4
  type CellTextProps = Omit<
5
5
  SVGAttributes<SVGTextElement>,
@@ -15,7 +15,7 @@ interface StyleCell {
15
15
  cellBoxProps?: CellBoxProps;
16
16
  }
17
17
  interface BaseSVGTableColumn<T> extends StyleCell {
18
- header: string;
18
+ header: string | ReactElement;
19
19
  width: number;
20
20
  minWidth?: number;
21
21
  rowSpanGroupKey?: keyof T;
@@ -27,7 +27,7 @@ interface AccessorKeyColumn<T> extends BaseSVGTableColumn<T> {
27
27
  }
28
28
 
29
29
  interface AccessorFuncColumn<T> extends BaseSVGTableColumn<T> {
30
- accessorFun: (row: T) => number | string;
30
+ accessorFun: (row: T & { index: number }) => number | string;
31
31
  }
32
32
 
33
33
  export type SVGTableColumn<T> = AccessorKeyColumn<T> | AccessorFuncColumn<T>;
@@ -69,14 +69,14 @@ function mapColumns<T>(columns: Array<SVGTableColumn<T>>) {
69
69
  }
70
70
 
71
71
  interface FormatKeyOptions {
72
- rowIndex: number;
72
+ index: number;
73
73
  columnKey: string;
74
74
  groupKey: string;
75
75
  }
76
76
 
77
77
  function formatKey(options: FormatKeyOptions) {
78
- const { rowIndex, columnKey, groupKey } = options;
79
- return `GroupKey[${groupKey || null}]-ColumnKey[${columnKey}]-RowIndex[${rowIndex}]`;
78
+ const { index, columnKey, groupKey } = options;
79
+ return `GroupKey[${groupKey || null}]-ColumnKey[${columnKey}]-RowIndex[${index}]`;
80
80
  }
81
81
 
82
82
  function mapRowsSpan<T>(data: T[], columns: Array<InternalColumns<T>>) {
@@ -89,14 +89,14 @@ function mapRowsSpan<T>(data: T[], columns: Array<InternalColumns<T>>) {
89
89
  let lastRowIndex = 0;
90
90
  let lastGroupKey: string | null = null;
91
91
 
92
- for (let rowIndex = 0; rowIndex < data.length; rowIndex++) {
93
- const row = data[rowIndex];
92
+ for (let index = 0; index < data.length; index++) {
93
+ const row = data[index];
94
94
  const groupKey = String(row?.[col.rowSpanGroupKey] || '');
95
95
  const key = col._columnOptions.key;
96
96
 
97
97
  const value = isAccessorKeyColumn(col)
98
98
  ? (row as any)[col.accessorKey]
99
- : col.accessorFun(row);
99
+ : col.accessorFun({ ...row, index });
100
100
 
101
101
  if (
102
102
  value === lastValue &&
@@ -107,16 +107,16 @@ function mapRowsSpan<T>(data: T[], columns: Array<InternalColumns<T>>) {
107
107
  const prevKey = formatKey({
108
108
  groupKey,
109
109
  columnKey: key,
110
- rowIndex: lastRowIndex,
110
+ index: lastRowIndex,
111
111
  });
112
112
  rowSpanMap.set(prevKey, (rowSpanMap.get(prevKey) || 1) + 1);
113
- skipColumns.add(formatKey({ groupKey, columnKey: key, rowIndex }));
113
+ skipColumns.add(formatKey({ groupKey, columnKey: key, index }));
114
114
  } else {
115
115
  // Start a new rowspan
116
116
  lastValue = value;
117
- lastRowIndex = rowIndex;
117
+ lastRowIndex = index;
118
118
  lastGroupKey = groupKey;
119
- rowSpanMap.set(formatKey({ groupKey, columnKey: key, rowIndex }), 1);
119
+ rowSpanMap.set(formatKey({ groupKey, columnKey: key, index }), 1);
120
120
  }
121
121
  }
122
122
  }
@@ -170,11 +170,11 @@ export function SVGTable<T>(props: SVGTableProps<T>) {
170
170
  );
171
171
  })}
172
172
 
173
- {data.map((row, rowIndex) => {
173
+ {data.map((row, index) => {
174
174
  return (
175
175
  <g
176
- key={rowIndex}
177
- transform={`translate(0, ${rowHeight * (rowIndex + 1)})`}
176
+ key={index}
177
+ transform={`translate(0, ${rowHeight * (index + 1)})`}
178
178
  >
179
179
  {columns.map((col) => {
180
180
  const {
@@ -187,7 +187,7 @@ export function SVGTable<T>(props: SVGTableProps<T>) {
187
187
  const cellKey = formatKey({
188
188
  groupKey: String(groupKey),
189
189
  columnKey,
190
- rowIndex,
190
+ index,
191
191
  });
192
192
  if (skipColumns.has(cellKey)) {
193
193
  return null; // Skip merged row
@@ -199,7 +199,7 @@ export function SVGTable<T>(props: SVGTableProps<T>) {
199
199
  <ValueColumn
200
200
  key={columnKey}
201
201
  column={col}
202
- row={row}
202
+ row={{ ...row, index }}
203
203
  rowSpan={rowSpan}
204
204
  cellBoxProps={cellBoxProps}
205
205
  cellTextProps={cellTextProps}
@@ -220,11 +220,11 @@ interface BaseColumnProps<T> extends StyleCell {
220
220
  }
221
221
 
222
222
  interface ColumnProps<T> extends BaseColumnProps<T> {
223
- value: string | number;
223
+ value: string | number | ReactElement;
224
224
  }
225
225
 
226
226
  interface ValueColumnProps<T> extends BaseColumnProps<T> {
227
- row: T;
227
+ row: T & { index: number };
228
228
  }
229
229
 
230
230
  function ValueColumn<T>(props: ValueColumnProps<T>) {
@@ -250,10 +250,8 @@ function Column<T>(props: ColumnProps<T>) {
250
250
  const { rowHeight } = tableOptions;
251
251
 
252
252
  return (
253
- <g>
253
+ <g transform={`translate(${x} 0)`}>
254
254
  <rect
255
- x={x}
256
- y="0"
257
255
  width={width}
258
256
  height={rowHeight * rowSpan}
259
257
  fill="white"
@@ -261,15 +259,19 @@ function Column<T>(props: ColumnProps<T>) {
261
259
  strokeWidth="1"
262
260
  {...cellBoxProps}
263
261
  />
264
- <text
265
- x={x + width / 2}
266
- y={(rowHeight * rowSpan) / 2}
267
- fontSize="11"
268
- dominantBaseline="middle"
269
- {...cellTextProps}
270
- >
271
- {value}
272
- </text>
262
+ {isValidElement(value) ? (
263
+ value
264
+ ) : (
265
+ <text
266
+ x={width / 2}
267
+ y={(rowHeight * rowSpan) / 2}
268
+ fontSize="11"
269
+ dominantBaseline="middle"
270
+ {...cellTextProps}
271
+ >
272
+ {value}
273
+ </text>
274
+ )}
273
275
  </g>
274
276
  );
275
277
  }
@@ -6,8 +6,7 @@ import { usePreferences } from './PreferencesContext.js';
6
6
  type ModifiersKey = `shift[${boolean}]_ctrl[${boolean}]_alt[${boolean}]`;
7
7
 
8
8
  type PrimaryKey =
9
- | 'shift[true]_ctrl[false]_alt[false]'
10
- | 'shift[false]_ctrl[false]_alt[false]';
9
+ 'shift[true]_ctrl[false]_alt[false]' | 'shift[false]_ctrl[false]_alt[false]';
11
10
 
12
11
  function getPrimaryKey(invert: boolean): PrimaryKey {
13
12
  if (invert) {
@@ -75,6 +74,11 @@ function getModifiersKey(event: EventModifierKeys) {
75
74
  return toModifiersKey(keyModifiers);
76
75
  }
77
76
 
77
+ export function useIsPrimaryKeyActivated() {
78
+ const { primaryKeyIdentifier } = useMapKeyModifiers();
79
+ return primaryKeyIdentifier === 'shift[false]_ctrl[false]_alt[false]';
80
+ }
81
+
78
82
  export function useMapKeyModifiers() {
79
83
  const {
80
84
  current: {
@@ -36,13 +36,7 @@ interface LoggerProviderProps {
36
36
  }
37
37
 
38
38
  export type LoggerType =
39
- | 'fatal'
40
- | 'error'
41
- | 'warn'
42
- | 'info'
43
- | 'debug'
44
- | 'trace'
45
- | 'silent';
39
+ 'fatal' | 'error' | 'warn' | 'info' | 'debug' | 'trace' | 'silent';
46
40
 
47
41
  export const LOGGER_LEVELS = {
48
42
  fatal: 60,
@@ -35,9 +35,7 @@ interface SortByPathOptions extends BaseSortOptions {
35
35
  }
36
36
 
37
37
  type SortOptions =
38
- | SortByPathOptions
39
- | SortByReferenceOptions
40
- | SortByReferenceIndexesOptions;
38
+ SortByPathOptions | SortByReferenceOptions | SortByReferenceIndexesOptions;
41
39
 
42
40
  type SortFuncOptions = SortOptions & { activeSort?: string };
43
41
 
@@ -1,5 +1,5 @@
1
- import type { PopoverProps } from '@blueprintjs/core';
2
- import { Popover } from '@blueprintjs/core';
1
+ import type { PopoverNextProps } from '@blueprintjs/core';
2
+ import { PopoverNext } from '@blueprintjs/core';
3
3
  import type { Interpolation, Theme } from '@emotion/react';
4
4
  import styled from '@emotion/styled';
5
5
  import type { CSSProperties, MouseEvent } from 'react';
@@ -62,7 +62,7 @@ interface Position {
62
62
  export interface ActionsButtonsPopoverProps
63
63
  extends
64
64
  Omit<
65
- PopoverProps,
65
+ PopoverNextProps,
66
66
  'interactionKind' | 'content' | 'modifiers' | 'renderTarget'
67
67
  >,
68
68
  Partial<Position> {
@@ -132,7 +132,7 @@ function getOffset(options: OffsetOptions): [number, number] {
132
132
  function getPlacement(
133
133
  anchorTo: AnchorTo,
134
134
  anchorPlacement: AnchorPlacement,
135
- ): PopoverProps['placement'] {
135
+ ): PopoverNextProps['placement'] {
136
136
  switch (anchorTo) {
137
137
  case 'cursor-x':
138
138
  return `${anchorPlacement === 'start' ? 'top' : 'bottom'}-start`;
@@ -187,8 +187,10 @@ export function ActionsButtonsPopover(props: ActionsButtonsPopoverProps) {
187
187
  const placement = getPlacement(anchorTo, anchorPlacement);
188
188
  const offset = getOffset({ anchorTo, offsetX, offsetY, cursorPosition });
189
189
  return (
190
- <Popover
191
- minimal
190
+ <PopoverNext
191
+ lazy
192
+ arrow={false}
193
+ animation="minimal"
192
194
  placement={placement}
193
195
  popoverClassName="actions-buttons-popover"
194
196
  interactionKind="hover"
@@ -206,16 +208,12 @@ export function ActionsButtonsPopover(props: ActionsButtonsPopoverProps) {
206
208
  {children}
207
209
  </Wrapper>
208
210
  )}
209
- modifiers={{
211
+ middleware={{
210
212
  offset: {
211
- enabled: true,
212
- data: { x, y },
213
- options: {
214
- offset,
215
- },
213
+ crossAxis: offset[0],
214
+ mainAxis: offset[1],
216
215
  },
217
-
218
- flip: { enabled: autoFlip },
216
+ flip: autoFlip ? undefined : { mainAxis: false, crossAxis: false },
219
217
  }}
220
218
  content={
221
219
  <Container style={contentStyle} flexDirection={direction} gap={space}>
@@ -24,12 +24,7 @@ interface BaseColor {
24
24
  type Fill = 'clear' | 'outline' | 'solid';
25
25
 
26
26
  type ColorTheme =
27
- | 'success'
28
- | 'danger'
29
- | 'warning'
30
- | 'medium'
31
- | 'light'
32
- | 'secondary';
27
+ 'success' | 'danger' | 'warning' | 'medium' | 'light' | 'secondary';
33
28
 
34
29
  type ColorPalettes = Record<
35
30
  ColorTheme,
@@ -12,7 +12,6 @@ import {
12
12
  Overlay2,
13
13
  mergeRefs,
14
14
  } from '@blueprintjs/core';
15
- import { SmallCross } from '@blueprintjs/icons';
16
15
  import { Global } from '@emotion/react';
17
16
  import styled from '@emotion/styled';
18
17
  import type { MouseEvent, ReactNode, RefObject } from 'react';
@@ -224,7 +223,7 @@ function CloseButton(
224
223
  <Button
225
224
  aria-label="Close"
226
225
  className={Classes.DIALOG_CLOSE_BUTTON}
227
- icon={<SmallCross size={IconSize.STANDARD} />}
226
+ icon="small-cross"
228
227
  variant="minimal"
229
228
  onClick={onClose}
230
229
  />