nmrium 0.20.1 → 0.22.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 (238) hide show
  1. package/lib/component/1d/ExclusionZonesAnnotations.js +1 -2
  2. package/lib/component/1d/Integral.js +1 -6
  3. package/lib/component/1d/Viewer1D.js +4 -4
  4. package/lib/component/1d/ranges/RangeIntegral.js +2 -6
  5. package/lib/component/1d/utilities/scale.d.ts +1 -1
  6. package/lib/component/1d/utilities/scale.js +7 -6
  7. package/lib/component/2d/Viewer2D.js +5 -5
  8. package/lib/component/EventsTrackers/KeysListenerTracker.js +98 -81
  9. package/lib/component/NMRium.d.ts +9 -2
  10. package/lib/component/NMRium.js +9 -9
  11. package/lib/component/elements/EditableColumn.d.ts +1 -1
  12. package/lib/component/elements/NumberInput.d.ts +1 -2
  13. package/lib/component/elements/Tab/Tab.js +1 -0
  14. package/lib/component/header/Header.js +13 -10
  15. package/lib/component/hooks/useCheckExperimentalFeature.js +2 -1
  16. package/lib/component/hooks/useCheckToolsVisibility.d.ts +1 -0
  17. package/lib/component/hooks/useCheckToolsVisibility.js +6 -0
  18. package/lib/component/{1d/utilities → hooks}/useIntegralPath.d.ts +0 -0
  19. package/lib/component/hooks/useIntegralPath.js +53 -0
  20. package/lib/component/hooks/useToolsFunctions.js +6 -6
  21. package/lib/component/hooks/useXScale.d.ts +2 -0
  22. package/lib/component/hooks/useXScale.js +7 -0
  23. package/lib/component/loader/DropZone.js +88 -88
  24. package/lib/component/modal/changeSum/ChangeSumModal.js +4 -2
  25. package/lib/component/modal/editRange/forms/validation/EditRangeValidation.js +1 -1
  26. package/lib/component/modal/editZone/EditPathLengthFormik.d.ts +5 -0
  27. package/lib/component/modal/editZone/EditPathLengthFormik.js +72 -0
  28. package/lib/component/modal/editZone/EditZoneModal.d.ts +8 -0
  29. package/lib/component/modal/editZone/EditZoneModal.js +96 -0
  30. package/lib/component/modal/editZone/SignalFormTab.d.ts +6 -0
  31. package/lib/component/modal/editZone/SignalFormTab.js +6 -0
  32. package/lib/component/modal/editZone/SignalsForm.d.ts +2 -0
  33. package/lib/component/modal/editZone/SignalsForm.js +62 -0
  34. package/lib/component/modal/editZone/validation/EditZoneValidation.d.ts +534 -0
  35. package/lib/component/modal/editZone/validation/EditZoneValidation.js +17 -0
  36. package/lib/component/modal/editZone/validation/isDefaultPathLength.d.ts +3 -0
  37. package/lib/component/modal/editZone/validation/isDefaultPathLength.js +7 -0
  38. package/lib/component/modal/setting/ControllersTabContent.js +1 -1
  39. package/lib/component/modal/setting/DisplayTabContent.js +1 -1
  40. package/lib/component/modal/setting/GeneralSettings.d.ts +1 -2
  41. package/lib/component/modal/setting/GeneralSettings.js +13 -9
  42. package/lib/component/panels/AutomaticAssignment/AutomaticAssignment.d.ts +2 -0
  43. package/lib/component/panels/AutomaticAssignment/AutomaticAssignment.js +13 -0
  44. package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.d.ts +7 -0
  45. package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +38 -0
  46. package/lib/component/panels/IntegralsPanel/IntegralPanel.js +0 -3
  47. package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +4 -17
  48. package/lib/component/panels/MoleculesPanel/MoleculePanel.js +1 -1
  49. package/lib/component/panels/Panels.d.ts +1 -1
  50. package/lib/component/panels/Panels.js +10 -14
  51. package/lib/component/panels/PeaksPanel/PeaksPanel.js +0 -3
  52. package/lib/component/panels/PeaksPanel/PeaksPreferences.js +5 -14
  53. package/lib/component/panels/RangesPanel/RangesPanel.js +2 -5
  54. package/lib/component/panels/RangesPanel/RangesPreferences.js +5 -18
  55. package/lib/component/panels/SpectrumsPanel/SpectraPanelHeader.js +13 -3
  56. package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +7 -2
  57. package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +7 -2
  58. package/lib/component/panels/SummaryPanel/CorrelationTable/Constants.d.ts +1 -6
  59. package/lib/component/panels/SummaryPanel/CorrelationTable/Constants.js +1 -7
  60. package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.d.ts +2 -3
  61. package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.js +4 -5
  62. package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.d.ts +2 -3
  63. package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +21 -25
  64. package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditLinkModal.js +24 -30
  65. package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.d.ts +8 -0
  66. package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.js +89 -0
  67. package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.d.ts +6 -6
  68. package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +1 -1
  69. package/lib/component/panels/SummaryPanel/SummaryPanel.js +40 -43
  70. package/lib/component/panels/SummaryPanel/utilities/IsInView.d.ts +6 -0
  71. package/lib/component/panels/SummaryPanel/utilities/IsInView.js +16 -0
  72. package/lib/component/panels/SummaryPanel/utilities/Utilities.d.ts +29 -0
  73. package/lib/component/panels/SummaryPanel/{Utilities.js → utilities/Utilities.js} +155 -19
  74. package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.d.ts +1 -0
  75. package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +26 -3
  76. package/lib/component/panels/ZonesPanel/ZonesPanel.js +12 -7
  77. package/lib/component/panels/ZonesPanel/ZonesPreferences.js +5 -18
  78. package/lib/component/panels/ZonesPanel/ZonesTable.d.ts +3 -2
  79. package/lib/component/panels/ZonesPanel/ZonesTable.js +5 -2
  80. package/lib/component/panels/databasePanel/DatabasePanel.js +0 -3
  81. package/lib/component/panels/databasePanel/DatabasePreferences.js +4 -17
  82. package/lib/component/reducer/IgnoreActions.js +2 -1
  83. package/lib/component/reducer/Reducer.d.ts +20 -34
  84. package/lib/component/reducer/Reducer.js +7 -8
  85. package/lib/component/reducer/actions/CorrelationsActions.d.ts +7 -7
  86. package/lib/component/reducer/actions/CorrelationsActions.js +1 -1
  87. package/lib/component/reducer/actions/DatabaseActions.js +1 -1
  88. package/lib/component/reducer/actions/DomainActions.d.ts +3 -1
  89. package/lib/component/reducer/actions/DomainActions.js +20 -1
  90. package/lib/component/reducer/actions/IntegralsActions.js +2 -0
  91. package/lib/component/reducer/actions/LoadActions.js +22 -1
  92. package/lib/component/reducer/actions/PreferencesActions.js +0 -2
  93. package/lib/component/reducer/actions/RangesActions.js +3 -1
  94. package/lib/component/reducer/actions/SpectrumsActions.js +1 -1
  95. package/lib/component/reducer/actions/ToolsActions.js +43 -56
  96. package/lib/component/reducer/actions/ZonesActions.d.ts +3 -1
  97. package/lib/component/reducer/actions/ZonesActions.js +33 -2
  98. package/lib/component/reducer/helper/Zoom1DManager.d.ts +17 -21
  99. package/lib/component/reducer/helper/Zoom1DManager.js +53 -69
  100. package/lib/component/reducer/helper/ZoomHistoryManager.d.ts +1 -0
  101. package/lib/component/reducer/helper/ZoomHistoryManager.js +2 -1
  102. package/lib/component/reducer/preferencesReducer.d.ts +3 -8
  103. package/lib/component/reducer/preferencesReducer.js +87 -37
  104. package/lib/component/reducer/types/Types.d.ts +3 -1
  105. package/lib/component/reducer/types/Types.js +3 -1
  106. package/lib/component/toolbar/FunctionToolBar.js +7 -10
  107. package/lib/component/toolbar/ToolTypes.js +3 -3
  108. package/lib/component/workspaces/Workspace.d.ts +6 -0
  109. package/lib/component/workspaces/Workspace.js +1 -0
  110. package/lib/component/workspaces/basic.d.ts +2 -0
  111. package/lib/component/workspaces/basic.js +45 -0
  112. package/lib/component/workspaces/exercise1D.d.ts +2 -0
  113. package/lib/component/workspaces/exercise1D.js +45 -0
  114. package/lib/component/workspaces/index.d.ts +6 -0
  115. package/lib/component/workspaces/index.js +4 -0
  116. package/lib/component/workspaces/process1D.d.ts +2 -0
  117. package/lib/component/workspaces/process1D.js +43 -0
  118. package/lib/data/constants/DefaultPathLengths.d.ts +6 -0
  119. package/lib/data/constants/DefaultPathLengths.js +8 -0
  120. package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.d.ts +2 -0
  121. package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.js +4 -0
  122. package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +7 -19
  123. package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.d.ts +11 -0
  124. package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +11 -0
  125. package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +2 -21
  126. package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.d.ts +9 -0
  127. package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.js +7 -0
  128. package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.d.ts +2 -0
  129. package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.js +29 -0
  130. package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +13 -0
  131. package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.js +14 -0
  132. package/lib/data/data1d/Spectrum1D/ranges/mapRanges.js +13 -8
  133. package/lib/data/migration/MigrationManager.js +3 -0
  134. package/lib/versionInfo.js +1 -1
  135. package/lib-cjs/component/1d/ExclusionZonesAnnotations.js +1 -2
  136. package/lib-cjs/component/1d/Integral.js +1 -6
  137. package/lib-cjs/component/1d/Viewer1D.js +4 -4
  138. package/lib-cjs/component/1d/ranges/RangeIntegral.js +2 -6
  139. package/lib-cjs/component/1d/utilities/scale.js +7 -6
  140. package/lib-cjs/component/2d/Viewer2D.js +4 -4
  141. package/lib-cjs/component/EventsTrackers/KeysListenerTracker.js +98 -81
  142. package/lib-cjs/component/NMRium.js +10 -10
  143. package/lib-cjs/component/elements/Tab/Tab.js +1 -0
  144. package/lib-cjs/component/header/Header.js +13 -10
  145. package/lib-cjs/component/hooks/useCheckExperimentalFeature.js +5 -1
  146. package/lib-cjs/component/hooks/useCheckToolsVisibility.js +13 -0
  147. package/lib-cjs/component/hooks/useIntegralPath.js +56 -0
  148. package/lib-cjs/component/hooks/useToolsFunctions.js +6 -6
  149. package/lib-cjs/component/hooks/useXScale.js +11 -0
  150. package/lib-cjs/component/loader/DropZone.js +88 -88
  151. package/lib-cjs/component/modal/changeSum/ChangeSumModal.js +4 -2
  152. package/lib-cjs/component/modal/editRange/forms/validation/EditRangeValidation.js +1 -1
  153. package/lib-cjs/component/modal/editZone/EditPathLengthFormik.js +77 -0
  154. package/lib-cjs/component/modal/editZone/EditZoneModal.js +101 -0
  155. package/lib-cjs/component/modal/editZone/SignalFormTab.js +11 -0
  156. package/lib-cjs/component/modal/editZone/SignalsForm.js +67 -0
  157. package/lib-cjs/component/modal/editZone/validation/EditZoneValidation.js +38 -0
  158. package/lib-cjs/component/modal/editZone/validation/isDefaultPathLength.js +12 -0
  159. package/lib-cjs/component/modal/setting/ControllersTabContent.js +1 -1
  160. package/lib-cjs/component/modal/setting/DisplayTabContent.js +1 -1
  161. package/lib-cjs/component/modal/setting/GeneralSettings.js +12 -8
  162. package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignment.js +18 -0
  163. package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +43 -0
  164. package/lib-cjs/component/panels/IntegralsPanel/IntegralPanel.js +0 -3
  165. package/lib-cjs/component/panels/IntegralsPanel/IntegralsPreferences.js +3 -16
  166. package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +1 -1
  167. package/lib-cjs/component/panels/Panels.js +11 -15
  168. package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +0 -3
  169. package/lib-cjs/component/panels/PeaksPanel/PeaksPreferences.js +4 -13
  170. package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +2 -5
  171. package/lib-cjs/component/panels/RangesPanel/RangesPreferences.js +4 -17
  172. package/lib-cjs/component/panels/SpectrumsPanel/SpectraPanelHeader.js +13 -3
  173. package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +7 -2
  174. package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +7 -2
  175. package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/Constants.js +1 -8
  176. package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.js +4 -5
  177. package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +21 -25
  178. package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/EditLinkModal.js +43 -30
  179. package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.js +94 -0
  180. package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +1 -1
  181. package/lib-cjs/component/panels/SummaryPanel/SummaryPanel.js +38 -41
  182. package/lib-cjs/component/panels/SummaryPanel/utilities/IsInView.js +18 -0
  183. package/lib-cjs/component/panels/SummaryPanel/{Utilities.js → utilities/Utilities.js} +157 -19
  184. package/lib-cjs/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +24 -1
  185. package/lib-cjs/component/panels/ZonesPanel/ZonesPanel.js +12 -7
  186. package/lib-cjs/component/panels/ZonesPanel/ZonesPreferences.js +4 -17
  187. package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +5 -2
  188. package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +0 -3
  189. package/lib-cjs/component/panels/databasePanel/DatabasePreferences.js +3 -16
  190. package/lib-cjs/component/reducer/IgnoreActions.js +2 -1
  191. package/lib-cjs/component/reducer/Reducer.js +7 -8
  192. package/lib-cjs/component/reducer/actions/DatabaseActions.js +2 -2
  193. package/lib-cjs/component/reducer/actions/DomainActions.js +21 -1
  194. package/lib-cjs/component/reducer/actions/IntegralsActions.js +2 -0
  195. package/lib-cjs/component/reducer/actions/LoadActions.js +22 -1
  196. package/lib-cjs/component/reducer/actions/PreferencesActions.js +0 -2
  197. package/lib-cjs/component/reducer/actions/RangesActions.js +2 -0
  198. package/lib-cjs/component/reducer/actions/SpectrumsActions.js +2 -2
  199. package/lib-cjs/component/reducer/actions/ToolsActions.js +50 -63
  200. package/lib-cjs/component/reducer/actions/ZonesActions.js +35 -2
  201. package/lib-cjs/component/reducer/helper/Zoom1DManager.js +55 -73
  202. package/lib-cjs/component/reducer/helper/ZoomHistoryManager.js +2 -1
  203. package/lib-cjs/component/reducer/preferencesReducer.js +87 -37
  204. package/lib-cjs/component/reducer/types/Types.js +6 -4
  205. package/lib-cjs/component/toolbar/FunctionToolBar.js +7 -10
  206. package/lib-cjs/component/toolbar/ToolTypes.js +3 -3
  207. package/lib-cjs/component/workspaces/Workspace.js +2 -0
  208. package/lib-cjs/component/workspaces/basic.js +48 -0
  209. package/lib-cjs/component/workspaces/exercise1D.js +48 -0
  210. package/lib-cjs/component/workspaces/index.js +6 -0
  211. package/lib-cjs/component/workspaces/process1D.js +46 -0
  212. package/lib-cjs/data/constants/DefaultPathLengths.js +10 -0
  213. package/lib-cjs/data/data1d/Spectrum1D/getSpectrumErrorValue.js +8 -0
  214. package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +7 -19
  215. package/lib-cjs/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +18 -0
  216. package/lib-cjs/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +2 -21
  217. package/lib-cjs/data/data1d/Spectrum1D/peaks/initiatePeaks.js +14 -0
  218. package/lib-cjs/data/data1d/Spectrum1D/peaks/mapPeaks.js +36 -0
  219. package/lib-cjs/data/data1d/Spectrum1D/ranges/initiateRanges.js +21 -0
  220. package/lib-cjs/data/data1d/Spectrum1D/ranges/mapRanges.js +13 -8
  221. package/lib-cjs/data/migration/MigrationManager.js +3 -0
  222. package/lib-cjs/versionInfo.js +1 -1
  223. package/package.json +15 -16
  224. package/lib/component/1d/utilities/useIntegralPath.js +0 -63
  225. package/lib/component/nmriumMode/basic.d.ts +0 -38
  226. package/lib/component/nmriumMode/basic.js +0 -37
  227. package/lib/component/nmriumMode/exercise1D.d.ts +0 -38
  228. package/lib/component/nmriumMode/exercise1D.js +0 -37
  229. package/lib/component/nmriumMode/process1D.d.ts +0 -38
  230. package/lib/component/nmriumMode/process1D.js +0 -37
  231. package/lib/component/panels/SummaryPanel/Utilities.d.ts +0 -25
  232. package/lib/component/reducer/actions/Zoom.d.ts +0 -16
  233. package/lib/component/reducer/actions/Zoom.js +0 -92
  234. package/lib-cjs/component/1d/utilities/useIntegralPath.js +0 -66
  235. package/lib-cjs/component/nmriumMode/basic.js +0 -39
  236. package/lib-cjs/component/nmriumMode/exercise1D.js +0 -39
  237. package/lib-cjs/component/nmriumMode/process1D.js +0 -39
  238. package/lib-cjs/component/reducer/actions/Zoom.js +0 -116
@@ -10,19 +10,13 @@ const Concatenation_1 = require("../../../../data/utilities/Concatenation");
10
10
  const FindUtilities_1 = require("../../../../data/utilities/FindUtilities");
11
11
  const ContextMenu_1 = __importDefault(require("../../../elements/ContextMenu"));
12
12
  const EditableColumn_1 = __importDefault(require("../../../elements/EditableColumn"));
13
- const Select_1 = __importDefault(require("../../../elements/Select"));
14
13
  const Modal_1 = require("../../../elements/popup/Modal");
15
14
  const highlight_1 = require("../../../highlight");
15
+ const IsInView_1 = __importDefault(require("../utilities/IsInView"));
16
+ const Utilities_1 = require("../utilities/Utilities");
16
17
  const AdditionalColumnField_1 = __importDefault(require("./AdditionalColumnField"));
17
- const Constants_1 = require("./Constants");
18
18
  const EditLinkModal_1 = __importDefault(require("./editLink/EditLinkModal"));
19
- const selectBoxStyle = {
20
- marginLeft: 2,
21
- marginRight: 2,
22
- border: 'none',
23
- height: '20px',
24
- };
25
- function CorrelationTableRow({ additionalColumnData, correlations, correlation, styleRow, styleLabel, onSaveEditEquivalences, onChangeHybridization, onSaveEditProtonsCount, onEditCorrelationTableCellHandler, spectraData, }) {
19
+ function CorrelationTableRow({ additionalColumnData, correlations, correlation, styleRow, styleLabel, onSaveEditEquivalences, onSaveEditNumericValues, onEditCorrelationTableCellHandler, spectraData, }) {
26
20
  const contextRef = (0, react_1.useRef)();
27
21
  const modal = (0, Modal_1.useModal)();
28
22
  const highlightIDsRow = (0, react_1.useMemo)(() => {
@@ -46,9 +40,13 @@ function CorrelationTableRow({ additionalColumnData, correlations, correlation,
46
40
  const onSaveEquivalencesHandler = (0, react_1.useCallback)((e) => {
47
41
  onSaveEditEquivalences(correlation, e.target.value);
48
42
  }, [correlation, onSaveEditEquivalences]);
49
- const onSaveProtonsCountHandler = (0, react_1.useCallback)((e) => {
50
- onSaveEditProtonsCount(correlation, e.target.value);
51
- }, [correlation, onSaveEditProtonsCount]);
43
+ const onSaveEditNumericValuesHandler = (0, react_1.useCallback)((e, key) => {
44
+ onSaveEditNumericValues({
45
+ correlation,
46
+ values: (0, Utilities_1.convertValuesString)(e.target.value, key),
47
+ key,
48
+ });
49
+ }, [correlation, onSaveEditNumericValues]);
52
50
  const additionalColumnFields = (0, react_1.useMemo)(() => {
53
51
  return additionalColumnData.map((_correlation) => {
54
52
  const commonLinks = [];
@@ -80,9 +78,6 @@ function CorrelationTableRow({ additionalColumnData, correlations, correlation,
80
78
  onEditCorrelationTableCellHandler,
81
79
  spectraData,
82
80
  ]);
83
- const onChangeHybridizationHandler = (0, react_1.useCallback)((value) => {
84
- onChangeHybridization(correlation, value);
85
- }, [correlation, onChangeHybridization]);
86
81
  const equivalenceCellStyle = (0, react_1.useMemo)(() => {
87
82
  return correlation.edited.equivalence
88
83
  ? { color: 'blue' }
@@ -98,11 +93,16 @@ function CorrelationTableRow({ additionalColumnData, correlations, correlation,
98
93
  event.currentTarget.blur();
99
94
  highlightRow.hide();
100
95
  }, [highlightRow]);
96
+ const isInView = (0, IsInView_1.default)({ correlation });
101
97
  const tableDataProps = (0, react_1.useMemo)(() => {
102
98
  return {
103
99
  style: {
104
100
  ...styleRow,
105
- backgroundColor: highlightRow.isActive ? '#ff6f0057' : 'inherit',
101
+ backgroundColor: highlightRow.isActive
102
+ ? '#ff6f0057'
103
+ : isInView
104
+ ? '#f5f5dc'
105
+ : 'inherit',
106
106
  },
107
107
  title: correlation.pseudo === false &&
108
108
  correlation.link
@@ -122,6 +122,7 @@ function CorrelationTableRow({ additionalColumnData, correlations, correlation,
122
122
  correlation.link,
123
123
  correlation.pseudo,
124
124
  highlightRow.isActive,
125
+ isInView,
125
126
  mouseEnterHandler,
126
127
  mouseLeaveHandler,
127
128
  styleRow,
@@ -185,16 +186,11 @@ function CorrelationTableRow({ additionalColumnData, correlations, correlation,
185
186
  }
186
187
  }, children: [(0, nmr_correlation_1.getLabel)(correlations, correlation), (0, jsx_runtime_1.jsx)(ContextMenu_1.default, { ref: contextRef, context: contextMenu }, void 0)] }, void 0), (0, jsx_runtime_1.jsx)("td", { title: t, ...otherTableDataProps, children: (0, nmr_correlation_1.getCorrelationDelta)(correlation)
187
188
  ? (0, nmr_correlation_1.getCorrelationDelta)(correlation)?.toFixed(2)
188
- : '' }, void 0), (0, jsx_runtime_1.jsx)("td", { title: t, ...otherTableDataProps, children: correlation.pseudo === false ? (correlation.atomType !== 'H' ? ((0, jsx_runtime_1.jsx)(EditableColumn_1.default, { type: "number", value: correlation.equivalence, style: equivalenceCellStyle, onSave: onSaveEquivalencesHandler }, void 0)) : ((0, jsx_runtime_1.jsx)("text", { style: equivalenceCellStyle, children: correlation.equivalence }, void 0))) : ('') }, void 0), (0, jsx_runtime_1.jsx)("td", { title: t, ...otherTableDataProps, children: correlation.atomType !== 'H' ? ((0, jsx_runtime_1.jsx)(EditableColumn_1.default, { type: "text", value: correlation.protonsCount.join(','), style: correlation.edited.protonsCount ? { color: 'blue' } : {}, onSave: onSaveProtonsCountHandler }, void 0)) : ('') }, void 0), (0, jsx_runtime_1.jsx)("td", { title: t, ...{
189
+ : '' }, void 0), (0, jsx_runtime_1.jsx)("td", { title: t, ...otherTableDataProps, children: correlation.pseudo === false ? (correlation.atomType !== 'H' ? ((0, jsx_runtime_1.jsx)(EditableColumn_1.default, { type: "number", value: correlation.equivalence, style: equivalenceCellStyle, onSave: onSaveEquivalencesHandler }, void 0)) : ((0, jsx_runtime_1.jsx)("text", { style: equivalenceCellStyle, children: correlation.equivalence }, void 0))) : ('') }, void 0), (0, jsx_runtime_1.jsx)("td", { title: t, ...otherTableDataProps, children: correlation.atomType !== 'H' ? ((0, jsx_runtime_1.jsx)(EditableColumn_1.default, { type: "text", value: correlation.protonsCount.join(','), style: correlation.edited.protonsCount ? { color: 'blue' } : {}, onSave: (e) => onSaveEditNumericValuesHandler(e, 'protonsCount') }, void 0)) : ('') }, void 0), (0, jsx_runtime_1.jsx)("td", { title: t, ...{
189
190
  ...otherTableDataProps,
190
191
  style: { ...tableDataProps.style, borderRight: '1px solid' },
191
- }, children: correlation.atomType !== 'H' ? ((0, jsx_runtime_1.jsx)(Select_1.default, { onChange: onChangeHybridizationHandler, data: Constants_1.Hybridizations, defaultValue: correlation.hybridization, style: {
192
- ...selectBoxStyle,
193
- color: correlation.edited.hybridization ? 'blue' : 'black',
194
- backgroundColor: correlation.edited.hybridization
195
- ? 'inherit'
196
- : styleRow.backgroundColor,
197
- width: '50px',
198
- } }, void 0)) : ('') }, void 0), additionalColumnFields] }, void 0));
192
+ }, children: correlation.atomType !== 'H' ? ((0, jsx_runtime_1.jsx)(EditableColumn_1.default, { type: "text", value: correlation.hybridization
193
+ .map((hybrid) => `sp${hybrid}`)
194
+ .join(','), style: correlation.edited.hybridization ? { color: 'blue' } : {}, onSave: (e) => onSaveEditNumericValuesHandler(e, 'hybridization') }, void 0)) : ('') }, void 0), additionalColumnFields] }, void 0));
199
195
  }
200
196
  exports.default = CorrelationTableRow;
@@ -1,4 +1,23 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
2
21
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
22
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
23
  };
@@ -9,20 +28,21 @@ const react_1 = require("@emotion/react");
9
28
  const nmr_correlation_1 = require("nmr-correlation");
10
29
  const react_2 = require("react");
11
30
  const CloseButton_1 = __importDefault(require("../../../../elements/CloseButton"));
12
- const Select_1 = __importDefault(require("../../../../elements/Select"));
13
- const Utilities_1 = require("../../Utilities");
14
- const Constants_1 = require("../Constants");
31
+ const Tab_1 = __importDefault(require("../../../../elements/Tab/Tab"));
32
+ const Tabs_1 = __importStar(require("../../../../elements/Tab/Tabs"));
33
+ const Utilities_1 = require("../../utilities/Utilities");
15
34
  const Confirmation_1 = __importDefault(require("./Confirmation"));
35
+ const EditPathLength_1 = __importDefault(require("./EditPathLength"));
16
36
  const MoveLink_1 = __importDefault(require("./MoveLink"));
17
37
  const modalContainer = (0, react_1.css) `
18
- overflow: auto;
19
- width: 380px;
20
- height: 230px;
38
+ width: 490px;
39
+ height: 220px;
21
40
  padding: 5px;
22
41
 
23
42
  button:focus {
24
43
  outline: none;
25
44
  }
45
+
26
46
  .header {
27
47
  height: 24px;
28
48
  border-bottom: 1px solid #f0f0f0;
@@ -66,14 +86,15 @@ const modalContainer = (0, react_1.css) `
66
86
  background-color: gray;
67
87
  }
68
88
 
69
- .select-action-container {
70
- margin-top: 10px;
89
+ .tabs-container {
71
90
  width: 100%;
72
- text-align: center;
91
+ flex: 1;
92
+ overflow: auto;
93
+ border: none;
73
94
  }
74
95
  `;
75
96
  function EditLinkModal({ correlationDim1, correlationDim2, link, correlations, onClose, onEdit, }) {
76
- const [selectedAction, setSelectedActions] = (0, react_2.useState)('-');
97
+ const [activeTab, setActiveTab] = (0, react_2.useState)('move');
77
98
  const getLinkLabel = (0, react_2.useCallback)(() => {
78
99
  const linkDim = (0, nmr_correlation_1.getLinkDim)(link);
79
100
  if (linkDim === 1) {
@@ -84,38 +105,30 @@ function EditLinkModal({ correlationDim1, correlationDim2, link, correlations, o
84
105
  }
85
106
  return '';
86
107
  }, [correlationDim1.label.origin, link, correlationDim2]);
87
- const handleOnEdit = (0, react_2.useCallback)((action, selectedCorrelationValueDim1, selectedCorrelationValueDim2) => {
108
+ const handleOnEdit = (0, react_2.useCallback)((action, selectedCorrelationIdDim1, selectedCorrelationIdDim2, editedLink) => {
88
109
  const { editedCorrelations, buildCorrelationDataOptions } = (0, Utilities_1.getEditedCorrelations)({
89
110
  correlationDim1,
90
111
  correlationDim2,
91
- selectedCorrelationValueDim1,
92
- selectedCorrelationValueDim2,
112
+ selectedCorrelationIdDim1,
113
+ selectedCorrelationIdDim2,
93
114
  action,
94
- link,
115
+ link: editedLink || link,
95
116
  correlations,
96
117
  });
97
- onEdit(editedCorrelations, action, link, buildCorrelationDataOptions);
118
+ onEdit(editedCorrelations, action, editedLink || link, buildCorrelationDataOptions);
98
119
  onClose?.();
99
120
  }, [correlationDim1, correlationDim2, correlations, link, onClose, onEdit]);
100
- const component = (0, react_2.useMemo)(() => {
101
- switch (selectedAction) {
102
- case 'delete':
103
- return ((0, jsx_runtime_1.jsx)(Confirmation_1.default, { description: "Deletion of signal.", onConfirm: () => handleOnEdit('remove', undefined, undefined) }, void 0));
104
- case 'move':
105
- return ((0, jsx_runtime_1.jsx)(MoveLink_1.default, { correlationDim1: correlationDim1, correlationDim2: correlationDim2, link: link, correlations: correlations, onEdit: handleOnEdit }, void 0));
106
- case 'unmove':
107
- return ((0, jsx_runtime_1.jsx)(Confirmation_1.default, { description: "Movement of signal to its original place.", onConfirm: () => handleOnEdit('unmove', correlationDim1.id, correlationDim2.id) }, void 0));
108
- default:
109
- return null;
110
- }
111
- }, [
121
+ const tabsContainer = (0, react_2.useMemo)(() => ((0, jsx_runtime_1.jsx)("div", { className: "tabs-container", children: (0, jsx_runtime_1.jsxs)(Tabs_1.default, { position: Tabs_1.PositionsEnum.TOP, activeTab: activeTab, onClick: (tab) => setActiveTab(tab.tabid), children: [(0, jsx_runtime_1.jsx)(Tab_1.default, { tablabel: "Move", tabid: 'move', children: (0, jsx_runtime_1.jsx)(MoveLink_1.default, { correlationDim1: correlationDim1, correlationDim2: correlationDim2, link: link, correlations: correlations, onEdit: (correlationIdDim1, correlationIdDim2) => handleOnEdit('move', correlationIdDim1, correlationIdDim2) }, void 0) }, void 0), (0, jsx_runtime_1.jsx)(Tab_1.default, { tablabel: "Unmove", tabid: "unmove", children: (0, jsx_runtime_1.jsx)(Confirmation_1.default, { description: "Movement of signal to its original place.", onConfirm: () => handleOnEdit('unmove', correlationDim1.id, correlationDim2.id) }, void 0) }, void 0), (0, jsx_runtime_1.jsx)(Tab_1.default, { tablabel: "Remove", tabid: 'remove', children: (0, jsx_runtime_1.jsx)(Confirmation_1.default, { description: "Deletion of signal.", onConfirm: () => handleOnEdit('remove', undefined, undefined) }, void 0) }, void 0), (0, jsx_runtime_1.jsx)(Tab_1.default, { tablabel: "J Coupling", tabid: 'setPathLength', children: (0, jsx_runtime_1.jsx)(EditPathLength_1.default, { signal: link.signal, experimentType: link.experimentType, onEdit: (editedSignal) => {
122
+ const editedLink = { ...link, signal: editedSignal };
123
+ handleOnEdit('setPathLength', correlationDim1, correlationDim2, editedLink);
124
+ } }, void 0) }, void 0)] }, void 0) }, void 0)), [
125
+ activeTab,
112
126
  correlationDim1,
113
127
  correlationDim2,
114
128
  correlations,
115
- link,
116
129
  handleOnEdit,
117
- selectedAction,
130
+ link,
118
131
  ]);
119
- return ((0, jsx_runtime_1.jsxs)("div", { css: modalContainer, children: [(0, jsx_runtime_1.jsxs)("div", { className: "header handle", children: [(0, jsx_runtime_1.jsx)(CloseButton_1.default, { onClick: onClose }, void 0), (0, jsx_runtime_1.jsx)("p", { className: "header-info", children: `${link.experimentType.toUpperCase()} signal at ${getLinkLabel()}` }, void 0)] }, void 0), (0, jsx_runtime_1.jsx)("div", { className: "select-action-container", children: (0, jsx_runtime_1.jsx)(Select_1.default, { data: Constants_1.EditLinkActions, onChange: (action) => setSelectedActions(action), defaultValue: selectedAction, style: { width: 120, height: 25, margin: 0 } }, void 0) }, void 0), component, (0, jsx_runtime_1.jsx)("div", {}, void 0)] }, void 0));
132
+ return ((0, jsx_runtime_1.jsxs)("div", { css: modalContainer, children: [(0, jsx_runtime_1.jsxs)("div", { className: "header handle", children: [(0, jsx_runtime_1.jsx)(CloseButton_1.default, { onClick: onClose }, void 0), (0, jsx_runtime_1.jsx)("p", { className: "header-info", children: `${link.experimentType.toUpperCase()} signal at ${getLinkLabel()}` }, void 0)] }, void 0), tabsContainer] }, void 0));
120
133
  }
121
134
  exports.default = EditLinkModal;
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
7
+ /** @jsxImportSource @emotion/react */
8
+ const react_1 = require("@emotion/react");
9
+ const react_2 = require("react");
10
+ const DefaultPathLengths_1 = __importDefault(require("../../../../../data/constants/DefaultPathLengths"));
11
+ const Button_1 = __importDefault(require("../../../../elements/Button"));
12
+ const Input_1 = __importDefault(require("../../../../elements/Input"));
13
+ const Label_1 = __importDefault(require("../../../../elements/Label"));
14
+ const editPathLengthsStyles = (0, react_1.css) `
15
+ width: 100%;
16
+ height: 100%;
17
+ margin-top: 10px;
18
+ text-align: center;
19
+
20
+ .input-container {
21
+ width: 100%;
22
+ margin-top: 5px;
23
+ text-align: center;
24
+
25
+ display: flex;
26
+ flex-direction: column;
27
+ align-items: center;
28
+ justify-content: center;
29
+ }
30
+
31
+ button {
32
+ flex: 2;
33
+ padding: 5px;
34
+ border: 1px solid gray;
35
+ border-radius: 5px;
36
+ height: 30px;
37
+ margin: 0 auto;
38
+ margin-top: 15px;
39
+ display: block;
40
+ width: 60px;
41
+
42
+ color: white;
43
+ background-color: gray;
44
+ }
45
+
46
+ .warning {
47
+ margin-top: 5px;
48
+ color: red;
49
+ }
50
+ `;
51
+ function EditPathLength({ signal, experimentType, onEdit }) {
52
+ const [from, setFrom] = (0, react_2.useState)(signal.j?.pathLength !== undefined
53
+ ? signal.j.pathLength.from
54
+ : DefaultPathLengths_1.default[experimentType]?.from || 0);
55
+ const [to, setTo] = (0, react_2.useState)(signal.j?.pathLength !== undefined
56
+ ? signal.j.pathLength.to
57
+ : DefaultPathLengths_1.default[experimentType]?.to || 0);
58
+ const [isError, setIsError] = (0, react_2.useState)(false);
59
+ const handleOnEdit = (0, react_2.useCallback)(() => {
60
+ const pathLength = {
61
+ from,
62
+ to,
63
+ };
64
+ const editedSignal = {
65
+ ...signal,
66
+ j: {
67
+ ...signal.j,
68
+ pathLength,
69
+ },
70
+ };
71
+ onEdit(editedSignal);
72
+ }, [to, from, onEdit, signal]);
73
+ (0, react_2.useEffect)(() => {
74
+ setIsError(from <= 0 || from > to);
75
+ }, [to, from]);
76
+ return ((0, jsx_runtime_1.jsxs)("div", { css: editPathLengthsStyles, children: [(0, jsx_runtime_1.jsx)("p", { children: "Setting of the minimum and maximum path length (J coupling)." }, void 0), (0, jsx_runtime_1.jsxs)("div", { className: "input-container", children: [(0, jsx_runtime_1.jsx)(Label_1.default, { title: "Min:", style: {
77
+ label: {
78
+ marginRight: '5px',
79
+ fontSize: '14px',
80
+ fontWeight: 'normal',
81
+ },
82
+ }, children: (0, jsx_runtime_1.jsx)(Input_1.default, { type: "number", value: from, onChange: (e) => {
83
+ setFrom(Number(e.target.value));
84
+ }, style: { input: { color: isError ? 'red' : 'black' } } }, void 0) }, void 0), (0, jsx_runtime_1.jsx)(Label_1.default, { title: "Max:", style: {
85
+ label: {
86
+ marginRight: '5px',
87
+ fontSize: '14px',
88
+ fontWeight: 'normal',
89
+ },
90
+ }, children: (0, jsx_runtime_1.jsx)(Input_1.default, { type: "number", value: to, onChange: (e) => {
91
+ setTo(Number(e.target.value));
92
+ } }, void 0) }, void 0)] }, void 0), isError ? ((0, jsx_runtime_1.jsxs)("p", { className: "warning", children: ["Minimum must not be 0 or higher than the maximum value.", ' '] }, void 0)) : ((0, jsx_runtime_1.jsx)(Button_1.default, { type: "button", onClick: handleOnEdit, disabled: isError, children: "Set" }, void 0))] }, void 0));
93
+ }
94
+ exports.default = EditPathLength;
@@ -80,6 +80,6 @@ function MoveLink({ correlationDim1, correlationDim2, link, correlations, onEdit
80
80
  border: '1px solid grey',
81
81
  } }, void 0));
82
82
  }, [correlationDim1, correlationDim2, correlations, link.atomType]);
83
- return ((0, jsx_runtime_1.jsxs)("div", { css: moveLinkStyles, children: [(0, jsx_runtime_1.jsx)("p", { children: "Move of signals on either one or both axes." }, void 0), (0, jsx_runtime_1.jsx)("p", { children: "\"New\" means to separate into a new row or column." }, void 0), (0, jsx_runtime_1.jsxs)("div", { className: "selection-container", children: [getSelection(correlationDim1, 0), correlationDim2 && getSelection(correlationDim2, 1)] }, void 0), (0, jsx_runtime_1.jsx)("button", { type: "button", onClick: () => onEdit('move', selectedCorrelationIdDim1, selectedCorrelationIdDim2), children: "Move" }, void 0)] }, void 0));
83
+ return ((0, jsx_runtime_1.jsxs)("div", { css: moveLinkStyles, children: [(0, jsx_runtime_1.jsx)("p", { children: "Move of signals on either one or both axes." }, void 0), (0, jsx_runtime_1.jsx)("p", { children: "\"New\" means to separate into a new row or column." }, void 0), (0, jsx_runtime_1.jsxs)("div", { className: "selection-container", children: [getSelection(correlationDim1, 0), correlationDim2 && getSelection(correlationDim2, 1)] }, void 0), (0, jsx_runtime_1.jsx)("button", { type: "button", onClick: () => onEdit(selectedCorrelationIdDim1, selectedCorrelationIdDim2), children: "Move" }, void 0)] }, void 0));
84
84
  }
85
85
  exports.default = MoveLink;
@@ -23,7 +23,7 @@ const CorrelationTable_1 = __importDefault(require("./CorrelationTable/Correlati
23
23
  const Overview_1 = __importDefault(require("./Overview"));
24
24
  const SetMolecularFormulaModal_1 = __importDefault(require("./SetMolecularFormulaModal"));
25
25
  const SetShiftTolerancesModal_1 = __importDefault(require("./SetShiftTolerancesModal"));
26
- const Utilities_1 = require("./Utilities");
26
+ const Utilities_1 = require("./utilities/Utilities");
27
27
  const panelStyle = (0, react_1.css) `
28
28
  display: flex;
29
29
  flex-direction: column;
@@ -197,51 +197,20 @@ function SummaryPanel() {
197
197
  correlation: {
198
198
  ...correlation,
199
199
  equivalence: value,
200
- edited: { ...correlation.edited, equivalence: true },
200
+ edited: { ...correlation.edited, equivalence: value !== 1 },
201
201
  },
202
202
  },
203
203
  });
204
204
  }, [dispatch]);
205
- const editProtonsCountSaveHandler = (0, react_2.useCallback)((correlation, valuesString) => {
206
- let values;
207
- if (/^(?:[0-9],{0,1})+$/g.test(valuesString)) {
208
- // allow digits followed by optional comma only
209
- values = valuesString
210
- .split(',')
211
- .filter((char) => char.length > 0)
212
- .map((char) => Number(char));
213
- }
214
- else if (valuesString.trim().length === 0) {
215
- // set values to default
216
- values = [];
217
- }
218
- if (values) {
219
- // ignore not supported text input
220
- dispatch({
221
- type: Types_1.SET_CORRELATION,
222
- payload: {
223
- id: correlation.id,
224
- correlation: {
225
- ...correlation,
226
- protonsCount: values,
227
- edited: { ...correlation.edited, protonsCount: true },
228
- },
229
- options: {
230
- skipDataUpdate: true,
231
- },
232
- },
233
- });
234
- }
235
- }, [dispatch]);
236
- const changeHybridizationSaveHandler = (0, react_2.useCallback)((correlation, value) => {
205
+ const editNumericValuesSaveHandler = (0, react_2.useCallback)(({ correlation, values, key, }) => {
237
206
  dispatch({
238
207
  type: Types_1.SET_CORRELATION,
239
208
  payload: {
240
209
  id: correlation.id,
241
210
  correlation: {
242
211
  ...correlation,
243
- hybridization: value,
244
- edited: { ...correlation.edited, hybridization: true },
212
+ [key]: values,
213
+ edited: { ...correlation.edited, [key]: true },
245
214
  },
246
215
  options: {
247
216
  skipDataUpdate: true,
@@ -299,20 +268,48 @@ function SummaryPanel() {
299
268
  });
300
269
  }
301
270
  }, [assignmentData, dispatch, spectraData]);
271
+ const changeSignalPathLengthHandler = (0, react_2.useCallback)((link) => {
272
+ const linkDim = (0, nmr_correlation_1.getLinkDim)(link);
273
+ if (linkDim === 2) {
274
+ const spectrum = (0, FindUtilities_1.findSpectrum)(spectraData, link.experimentID, false);
275
+ const zone = (0, FindUtilities_1.findZone)(spectrum, link.signal.id);
276
+ const signal = (0, FindUtilities_1.findSignal2D)(spectrum, link.signal.id);
277
+ dispatch({
278
+ type: Types_1.SET_2D_SIGNAL_PATH_LENGTH,
279
+ payload: {
280
+ spectrum,
281
+ zone,
282
+ signal,
283
+ pathLength: link.signal.j?.pathLength,
284
+ },
285
+ });
286
+ }
287
+ }, [dispatch, spectraData]);
302
288
  const editCorrelationTableCellHandler = (0, react_2.useCallback)((editedCorrelations, action, link, options) => {
303
289
  if (action === 'add' ||
304
290
  action === 'move' ||
305
291
  action === 'remove' ||
306
- action === 'unmove') {
307
- if (action === 'remove' && link && link.pseudo === false) {
308
- deleteSignalHandler(link);
292
+ action === 'unmove' ||
293
+ action === 'setPathLength') {
294
+ if (link && link.pseudo === false) {
295
+ if (action === 'remove') {
296
+ deleteSignalHandler(link);
297
+ }
298
+ else if (action === 'setPathLength') {
299
+ changeSignalPathLengthHandler(link);
300
+ }
309
301
  }
310
302
  setCorrelationsHandler(editedCorrelations, options);
311
303
  }
312
304
  else if (action === 'removeAll') {
313
305
  deleteCorrelationHandler(editedCorrelations[0]);
314
306
  }
315
- }, [deleteCorrelationHandler, deleteSignalHandler, setCorrelationsHandler]);
307
+ }, [
308
+ changeSignalPathLengthHandler,
309
+ deleteCorrelationHandler,
310
+ deleteSignalHandler,
311
+ setCorrelationsHandler,
312
+ ]);
316
313
  const handleOnFilter = (0, react_2.useCallback)(() => {
317
314
  setFilterIsActive(!filterIsActive);
318
315
  }, [filterIsActive]);
@@ -331,6 +328,6 @@ function SummaryPanel() {
331
328
  width: '70px',
332
329
  height: '18px',
333
330
  border: '1px solid grey',
334
- } }, void 0)] }, void 0) }, void 0)] }, void 0)] }, void 0), (0, jsx_runtime_1.jsx)(CorrelationTable_1.default, { correlationsData: correlationsData, filteredCorrelationsData: filteredCorrelationsData, additionalColumnData: additionalColumnData, editEquivalencesSaveHandler: editEquivalencesSaveHandler, changeHybridizationSaveHandler: changeHybridizationSaveHandler, editProtonsCountSaveHandler: editProtonsCountSaveHandler, onEditCorrelationTableCellHandler: editCorrelationTableCellHandler, showProtonsAsRows: showProtonsAsRows, spectraData: spectraData }, void 0)] }, void 0));
331
+ } }, void 0)] }, void 0) }, void 0)] }, void 0)] }, void 0), (0, jsx_runtime_1.jsx)(CorrelationTable_1.default, { correlationsData: correlationsData, filteredCorrelationsData: filteredCorrelationsData, additionalColumnData: additionalColumnData, editEquivalencesSaveHandler: editEquivalencesSaveHandler, onSaveEditNumericValues: editNumericValuesSaveHandler, onEditCorrelationTableCellHandler: editCorrelationTableCellHandler, showProtonsAsRows: showProtonsAsRows, spectraData: spectraData }, void 0)] }, void 0));
335
332
  }
336
333
  exports.default = (0, react_2.memo)(SummaryPanel);
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const react_1 = require("react");
4
+ const ChartContext_1 = require("../../../context/ChartContext");
5
+ const Utilities_1 = require("./Utilities");
6
+ function IsInView({ correlation }) {
7
+ const { data: spectraData, xDomain, yDomain, displayerMode, activeTab, activeSpectrum, } = (0, ChartContext_1.useChartData)();
8
+ return (0, react_1.useMemo)(() => (0, Utilities_1.isInView)(spectraData, activeTab, activeSpectrum, xDomain, yDomain, displayerMode, correlation), [
9
+ activeSpectrum,
10
+ activeTab,
11
+ correlation,
12
+ displayerMode,
13
+ spectraData,
14
+ xDomain,
15
+ yDomain,
16
+ ]);
17
+ }
18
+ exports.default = IsInView;