nmrium 0.53.0 → 0.55.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 (178) hide show
  1. package/lib/component/1d/Viewer1D.js +48 -17
  2. package/lib/component/1d/XAxis.js +1 -1
  3. package/lib/component/1d/integral/IntegralsSeries.js +2 -2
  4. package/lib/component/1d/integral/Integration.d.ts +3 -1
  5. package/lib/component/1d/integral/Integration.js +3 -2
  6. package/lib/component/1d/peaks/PeakEditionManager.js +5 -3
  7. package/lib/component/1d/ranges/AssignmentActionsButtons.d.ts +1 -0
  8. package/lib/component/1d/ranges/AssignmentActionsButtons.js +3 -3
  9. package/lib/component/1d/ranges/AssignmentLabel.d.ts +1 -1
  10. package/lib/component/1d/ranges/AssignmentLabel.js +31 -4
  11. package/lib/component/1d/ranges/Atoms.js +4 -5
  12. package/lib/component/1d/ranges/Range.js +62 -12
  13. package/lib/component/1d/ranges/Ranges.js +2 -1
  14. package/lib/component/1d/ranges/RangesIntegrals.js +11 -4
  15. package/lib/component/1d/tool/XLabelPointer.js +4 -12
  16. package/lib/component/1d-2d/FieldEdition.d.ts +13 -0
  17. package/lib/component/1d-2d/FieldEdition.js +42 -0
  18. package/lib/component/2d/Chart2D.js +5 -3
  19. package/lib/component/2d/tools/XYLabelPointer.js +3 -9
  20. package/lib/component/2d/zones/Zone.js +18 -2
  21. package/lib/component/2d/zones/ZonesAssignmentsLabels.d.ts +7 -0
  22. package/lib/component/2d/zones/ZonesAssignmentsLabels.js +286 -0
  23. package/lib/component/EventsTrackers/KeysListenerTracker.js +14 -1
  24. package/lib/component/context/LoggerContext.js +11 -4
  25. package/lib/component/context/ShareDataContext.d.ts +10 -0
  26. package/lib/component/context/ShareDataContext.js +22 -0
  27. package/lib/component/elements/ActionsButtonsPopover.d.ts +10 -0
  28. package/lib/component/elements/ActionsButtonsPopover.js +22 -0
  29. package/lib/component/elements/CloseButton.d.ts +1 -1
  30. package/lib/component/elements/CustomToolTip.d.ts +8 -0
  31. package/lib/component/elements/CustomToolTip.js +107 -0
  32. package/lib/component/elements/EditableColumn.js +3 -2
  33. package/lib/component/elements/ReactTable/Elements/ReactTableRow.js +7 -5
  34. package/lib/component/elements/ReactTable/ReactTable.d.ts +2 -2
  35. package/lib/component/elements/SVGButton.d.ts +14 -0
  36. package/lib/component/elements/SVGButton.js +6 -0
  37. package/lib/component/elements/SVGGroup.js +15 -13
  38. package/lib/component/elements/SVGText.d.ts +8 -0
  39. package/lib/component/elements/SVGText.js +24 -0
  40. package/lib/component/elements/SaveButton.d.ts +1 -1
  41. package/lib/component/elements/draggable/SVGDraggable.d.ts +2 -2
  42. package/lib/component/elements/formik/FormikError.js +2 -4
  43. package/lib/component/elements/formik/FormikInput.d.ts +2 -1
  44. package/lib/component/elements/formik/FormikInput.js +5 -4
  45. package/lib/component/header/Header.js +8 -11
  46. package/lib/component/header/PhaseCorrectionTwoDimensionsPanel.js +41 -10
  47. package/lib/component/hooks/useActiveSpectrumZonesViewState.js +1 -0
  48. package/lib/component/hooks/useCheckPointsNumberInWindowArea.d.ts +1 -1
  49. package/lib/component/hooks/useFormatNumberByNucleus.d.ts +1 -1
  50. package/lib/component/hooks/useFormatNumberByNucleus.js +8 -7
  51. package/lib/component/hooks/useIntegralPath.d.ts +2 -0
  52. package/lib/component/hooks/useIntegralPath.js +3 -1
  53. package/lib/component/hooks/usePanelPreferences.js +1 -2
  54. package/lib/component/hooks/useSaveSettings.js +7 -14
  55. package/lib/component/hooks/useTriggerNewAssignmentLabel.d.ts +4 -0
  56. package/lib/component/hooks/useTriggerNewAssignmentLabel.js +8 -0
  57. package/lib/component/hooks/useWorkspaceAction.d.ts +7 -0
  58. package/lib/component/hooks/useWorkspaceAction.js +89 -0
  59. package/lib/component/loader/DropZone.js +0 -3
  60. package/lib/component/main/InnerNMRium.js +3 -1
  61. package/lib/component/main/InnerNMRiumContents.js +14 -2
  62. package/lib/component/main/NMRiumStateProvider.js +15 -3
  63. package/lib/component/modal/AboutPredictionModal.js +1 -1
  64. package/lib/component/modal/AboutSpectrumSimulationModal.js +1 -1
  65. package/lib/component/modal/CopyClipboardModal.js +1 -1
  66. package/lib/component/modal/EditPeakShapeModal.js +1 -1
  67. package/lib/component/modal/ImportPublicationStringModal.js +11 -5
  68. package/lib/component/modal/PredictSpectraModal.js +1 -1
  69. package/lib/component/modal/aboutUs/AboutUsModal.js +1 -1
  70. package/lib/component/modal/changeSum/ChangeSumModal.js +1 -1
  71. package/lib/component/modal/editRange/EditRangeModal.js +1 -1
  72. package/lib/component/modal/editRange/forms/components/DeltaInput.js +3 -3
  73. package/lib/component/modal/editRange/forms/components/NewSignalTab.js +17 -12
  74. package/lib/component/modal/editRange/forms/components/signal-tabs/SignalJCouplingsTable.js +30 -13
  75. package/lib/component/modal/editRange/forms/components/signal-tabs/SignalPeaksTable.js +26 -16
  76. package/lib/component/modal/editZone/EditZoneModal.js +1 -1
  77. package/lib/component/modal/setting/GeneralSettings.js +18 -39
  78. package/lib/component/modal/setting/WorkspaceItem.js +1 -1
  79. package/lib/component/modal/setting/settings-tabs/NucleiTabContent.d.ts +2 -0
  80. package/lib/component/modal/setting/settings-tabs/NucleiTabContent.js +99 -0
  81. package/lib/component/modal/setting/settingsValidation.js +36 -40
  82. package/lib/component/panels/AutomaticAssignment/AutomaticAssignment.js +2 -2
  83. package/lib/component/panels/IntegralsPanel/IntegralPanel.js +2 -2
  84. package/lib/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +2 -2
  85. package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +1 -1
  86. package/lib/component/panels/PeaksPanel/PeaksPanel.js +5 -5
  87. package/lib/component/panels/RangesPanel/RangesHeader.js +11 -11
  88. package/lib/component/panels/RangesPanel/RangesPreferences.js +16 -16
  89. package/lib/component/panels/RangesPanel/RangesTable.js +1 -1
  90. package/lib/component/panels/RangesPanel/RangesTableRow.js +2 -2
  91. package/lib/component/panels/SpectraPanel/SpectraPanelHeader.js +22 -8
  92. package/lib/component/panels/SpectraPanel/SpectraPreferences.js +13 -1
  93. package/lib/component/panels/SpectraPanel/base/setting/PlotChart.js +1 -1
  94. package/lib/component/panels/SpectraPanel/base/setting/Spectrum2DHistogram.js +1 -1
  95. package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditLinkModal.js +1 -1
  96. package/lib/component/panels/SummaryPanel/SetMolecularFormulaModal.d.ts +5 -5
  97. package/lib/component/panels/SummaryPanel/SetMolecularFormulaModal.js +79 -89
  98. package/lib/component/panels/SummaryPanel/SetShiftTolerancesModal.d.ts +5 -4
  99. package/lib/component/panels/SummaryPanel/SetShiftTolerancesModal.js +66 -98
  100. package/lib/component/panels/SummaryPanel/SummaryPanel.js +13 -32
  101. package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentLabelColumn.d.ts +6 -0
  102. package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentLabelColumn.js +16 -0
  103. package/lib/component/panels/ZonesPanel/ZonesPanel.js +22 -6
  104. package/lib/component/panels/ZonesPanel/ZonesPreferences.js +15 -9
  105. package/lib/component/panels/ZonesPanel/ZonesTable.js +2 -2
  106. package/lib/component/panels/ZonesPanel/ZonesTableRow.js +3 -2
  107. package/lib/component/panels/databasePanel/DatabaseSearchOptions.js +2 -2
  108. package/lib/component/panels/header/DefaultPanelHeader.js +2 -2
  109. package/lib/component/panels/header/PreferencesHeader.js +1 -1
  110. package/lib/component/panels/header/SpectraAutomaticPickingButton.js +1 -1
  111. package/lib/component/panels/multipleAnalysisPanel/MultipleSpectraAnalysisPanel.js +4 -4
  112. package/lib/component/panels/multipleAnalysisPanel/preferences/index.js +1 -1
  113. package/lib/component/reducer/IgnoreActions.js +1 -0
  114. package/lib/component/reducer/Reducer.js +8 -0
  115. package/lib/component/reducer/actions/DomainActions.d.ts +7 -2
  116. package/lib/component/reducer/actions/DomainActions.js +29 -1
  117. package/lib/component/reducer/actions/FiltersActions.d.ts +3 -2
  118. package/lib/component/reducer/actions/FiltersActions.js +27 -1
  119. package/lib/component/reducer/actions/MoleculeActions.js +1 -1
  120. package/lib/component/reducer/actions/RangesActions.d.ts +2 -3
  121. package/lib/component/reducer/actions/RangesActions.js +28 -26
  122. package/lib/component/reducer/actions/SpectraActions.d.ts +5 -4
  123. package/lib/component/reducer/actions/SpectraActions.js +5 -1
  124. package/lib/component/reducer/actions/ZonesActions.d.ts +15 -2
  125. package/lib/component/reducer/actions/ZonesActions.js +47 -13
  126. package/lib/component/reducer/helper/setRangesViewProperty.d.ts +1 -0
  127. package/lib/component/reducer/helper/setRangesViewProperty.js +11 -11
  128. package/lib/component/reducer/preferences/actions/addWorkspace.js +4 -23
  129. package/lib/component/reducer/preferences/actions/analyzeSpectra.js +4 -4
  130. package/lib/component/reducer/preferences/actions/initPreferences.js +2 -4
  131. package/lib/component/reducer/preferences/actions/matrixGeneration.js +3 -3
  132. package/lib/component/reducer/preferences/actions/removeWorkspace.js +0 -5
  133. package/lib/component/reducer/preferences/actions/setActiveWorkspace.js +0 -4
  134. package/lib/component/reducer/preferences/actions/setPanelsPreferences.js +1 -1
  135. package/lib/component/reducer/preferences/actions/setPreferences.js +2 -16
  136. package/lib/component/reducer/preferences/actions/setWorkspace.js +4 -3
  137. package/lib/component/reducer/preferences/preferencesReducer.d.ts +7 -0
  138. package/lib/component/reducer/preferences/preferencesReducer.js +21 -18
  139. package/lib/component/toolbar/ToolBar.js +115 -25
  140. package/lib/component/utility/PreferencesHelper.js +5 -4
  141. package/lib/component/utility/export.js +4 -0
  142. package/lib/component/workspaces/assignment.js +0 -1
  143. package/lib/component/workspaces/basic.js +0 -1
  144. package/lib/component/workspaces/embedded.js +0 -1
  145. package/lib/component/workspaces/exercise.js +26 -29
  146. package/lib/component/workspaces/prediction.js +171 -174
  147. package/lib/component/workspaces/process1D.js +0 -1
  148. package/lib/component/workspaces/simulation.js +35 -38
  149. package/lib/component/workspaces/workspaceDefaultProperties.js +16 -23
  150. package/lib/data/data1d/Spectrum1D/get1DColor.d.ts +10 -3
  151. package/lib/data/data1d/Spectrum1D/get1DColor.js +28 -2
  152. package/lib/data/data1d/Spectrum1D/index.d.ts +2 -2
  153. package/lib/data/data1d/Spectrum1D/index.js +2 -2
  154. package/lib/data/data1d/Spectrum1D/ranges/createRange.d.ts +50 -0
  155. package/lib/data/data1d/Spectrum1D/ranges/createRange.js +51 -0
  156. package/lib/data/data1d/Spectrum1D/ranges/detectSignals.d.ts +2 -1
  157. package/lib/data/data1d/Spectrum1D/ranges/detectSignals.js +4 -2
  158. package/lib/data/data1d/Spectrum1D/ranges/resizeRange.d.ts +52 -0
  159. package/lib/data/data1d/Spectrum1D/ranges/resizeRange.js +28 -0
  160. package/lib/data/data2d/Spectrum2D/get2DColor.d.ts +11 -3
  161. package/lib/data/data2d/Spectrum2D/get2DColor.js +20 -4
  162. package/lib/data/data2d/Spectrum2D/getSlice.js +1 -1
  163. package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts +1 -0
  164. package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts +1 -0
  165. package/lib/data/utilities/generateColor.d.ts +7 -3
  166. package/lib/data/utilities/generateColor.js +5 -17
  167. package/lib/versionInfo.js +1 -1
  168. package/package.json +35 -35
  169. package/lib/component/elements/MolecularFormulaInput.d.ts +0 -6
  170. package/lib/component/elements/MolecularFormulaInput.js +0 -63
  171. package/lib/component/modal/setting/settings-tabs/FormattingTabContent.d.ts +0 -2
  172. package/lib/component/modal/setting/settings-tabs/FormattingTabContent.js +0 -80
  173. package/lib/component/reducer/preferences/utilities/mapNucleiFormatting.d.ts +0 -2
  174. package/lib/component/reducer/preferences/utilities/mapNucleiFormatting.js +0 -10
  175. package/lib/data/data1d/Spectrum1D/ranges/addRange.d.ts +0 -7
  176. package/lib/data/data1d/Spectrum1D/ranges/addRange.js +0 -31
  177. package/lib/data/data1d/Spectrum1D/ranges/changeRange.d.ts +0 -3
  178. package/lib/data/data1d/Spectrum1D/ranges/changeRange.js +0 -32
@@ -1,5 +1,4 @@
1
1
  export const prediction = {
2
- version: 1,
3
2
  label: 'Prediction',
4
3
  general: {
5
4
  dimmedSpectraOpacity: 0.5,
@@ -46,179 +45,177 @@ export const prediction = {
46
45
  fftDimension2: true,
47
46
  },
48
47
  },
49
- formatting: {
50
- nuclei: {},
51
- panels: {
52
- spectra: {
53
- nuclei: {
54
- '1H,1H': {
55
- columns: [
56
- {
57
- name: 'visible',
58
- label: '',
59
- description: 'Show/Hide Spectrum',
60
- visible: true,
61
- },
62
- {
63
- label: 'Spectrum Name',
64
- jpath: ['info', 'name'],
65
- visible: true,
66
- },
67
- {
68
- label: 'Frequency',
69
- description: 'frequency',
70
- jpath: ['info', 'baseFrequency'],
71
- visible: true,
72
- },
73
- {
74
- label: 'Solvent',
75
- jpath: ['info', 'solvent'],
76
- visible: false,
77
- },
78
- {
79
- jpath: ['info', 'pulseSequence'],
80
- label: 'Pulse',
81
- visible: true,
82
- },
83
- {
84
- jpath: ['info', 'experiment'],
85
- label: 'Experiment',
86
- visible: true,
87
- },
88
- {
89
- name: 'color',
90
- label: '',
91
- description: 'Spectrum Color',
92
- visible: true,
93
- },
94
- ],
95
- },
96
- '1H,13C': {
97
- columns: [
98
- {
99
- name: 'visible',
100
- label: '',
101
- description: 'Show/Hide Spectrum',
102
- visible: true,
103
- },
104
- {
105
- label: 'Spectrum Name',
106
- jpath: ['info', 'name'],
107
- visible: true,
108
- },
109
- {
110
- label: 'Frequency',
111
- description: 'frequency',
112
- jpath: ['info', 'baseFrequency'],
113
- visible: true,
114
- },
115
- {
116
- label: 'Solvent',
117
- jpath: ['info', 'solvent'],
118
- visible: false,
119
- },
120
- {
121
- jpath: ['info', 'pulseSequence'],
122
- label: 'Pulse',
123
- visible: true,
124
- },
125
- {
126
- jpath: ['info', 'experiment'],
127
- label: 'Experiment',
128
- visible: true,
129
- },
130
- {
131
- name: 'color',
132
- label: '',
133
- description: 'Spectrum Color',
134
- visible: true,
135
- },
136
- ],
137
- },
138
- '1H': {
139
- columns: [
140
- {
141
- name: 'visible',
142
- label: '',
143
- description: 'Show/Hide Spectrum',
144
- visible: true,
145
- },
146
- {
147
- label: 'Spectrum Name',
148
- jpath: ['info', 'name'],
149
- visible: true,
150
- },
151
- {
152
- label: 'Frequency',
153
- description: 'frequency',
154
- jpath: ['info', 'baseFrequency'],
155
- visible: true,
156
- },
157
- {
158
- label: 'Solvent',
159
- jpath: ['info', 'solvent'],
160
- visible: false,
161
- },
162
- {
163
- jpath: ['info', 'pulseSequence'],
164
- label: 'Pulse',
165
- visible: true,
166
- },
167
- {
168
- jpath: ['info', 'experiment'],
169
- label: 'Experiment',
170
- visible: true,
171
- },
172
- {
173
- name: 'color',
174
- label: '',
175
- description: 'Spectrum Color',
176
- visible: true,
177
- },
178
- ],
179
- },
180
- '13C': {
181
- columns: [
182
- {
183
- name: 'visible',
184
- label: '',
185
- description: 'Show/Hide Spectrum',
186
- visible: true,
187
- },
188
- {
189
- label: 'Spectrum Name',
190
- jpath: ['info', 'name'],
191
- visible: true,
192
- },
193
- {
194
- label: 'Frequency',
195
- description: 'frequency',
196
- jpath: ['info', 'baseFrequency'],
197
- visible: true,
198
- },
199
- {
200
- label: 'Solvent',
201
- jpath: ['info', 'solvent'],
202
- visible: false,
203
- },
204
- {
205
- jpath: ['info', 'pulseSequence'],
206
- label: 'Pulse',
207
- visible: true,
208
- },
209
- {
210
- jpath: ['info', 'experiment'],
211
- label: 'Experiment',
212
- visible: true,
213
- },
214
- {
215
- name: 'color',
216
- label: '',
217
- description: 'Spectrum Color',
218
- visible: true,
219
- },
220
- ],
221
- },
48
+ nuclei: [],
49
+ panels: {
50
+ spectra: {
51
+ nuclei: {
52
+ '1H,1H': {
53
+ columns: [
54
+ {
55
+ name: 'visible',
56
+ label: '',
57
+ description: 'Show/Hide Spectrum',
58
+ visible: true,
59
+ },
60
+ {
61
+ label: 'Spectrum Name',
62
+ jpath: ['info', 'name'],
63
+ visible: true,
64
+ },
65
+ {
66
+ label: 'Frequency',
67
+ description: 'frequency',
68
+ jpath: ['info', 'baseFrequency'],
69
+ visible: true,
70
+ },
71
+ {
72
+ label: 'Solvent',
73
+ jpath: ['info', 'solvent'],
74
+ visible: false,
75
+ },
76
+ {
77
+ jpath: ['info', 'pulseSequence'],
78
+ label: 'Pulse',
79
+ visible: true,
80
+ },
81
+ {
82
+ jpath: ['info', 'experiment'],
83
+ label: 'Experiment',
84
+ visible: true,
85
+ },
86
+ {
87
+ name: 'color',
88
+ label: '',
89
+ description: 'Spectrum Color',
90
+ visible: true,
91
+ },
92
+ ],
93
+ },
94
+ '1H,13C': {
95
+ columns: [
96
+ {
97
+ name: 'visible',
98
+ label: '',
99
+ description: 'Show/Hide Spectrum',
100
+ visible: true,
101
+ },
102
+ {
103
+ label: 'Spectrum Name',
104
+ jpath: ['info', 'name'],
105
+ visible: true,
106
+ },
107
+ {
108
+ label: 'Frequency',
109
+ description: 'frequency',
110
+ jpath: ['info', 'baseFrequency'],
111
+ visible: true,
112
+ },
113
+ {
114
+ label: 'Solvent',
115
+ jpath: ['info', 'solvent'],
116
+ visible: false,
117
+ },
118
+ {
119
+ jpath: ['info', 'pulseSequence'],
120
+ label: 'Pulse',
121
+ visible: true,
122
+ },
123
+ {
124
+ jpath: ['info', 'experiment'],
125
+ label: 'Experiment',
126
+ visible: true,
127
+ },
128
+ {
129
+ name: 'color',
130
+ label: '',
131
+ description: 'Spectrum Color',
132
+ visible: true,
133
+ },
134
+ ],
135
+ },
136
+ '1H': {
137
+ columns: [
138
+ {
139
+ name: 'visible',
140
+ label: '',
141
+ description: 'Show/Hide Spectrum',
142
+ visible: true,
143
+ },
144
+ {
145
+ label: 'Spectrum Name',
146
+ jpath: ['info', 'name'],
147
+ visible: true,
148
+ },
149
+ {
150
+ label: 'Frequency',
151
+ description: 'frequency',
152
+ jpath: ['info', 'baseFrequency'],
153
+ visible: true,
154
+ },
155
+ {
156
+ label: 'Solvent',
157
+ jpath: ['info', 'solvent'],
158
+ visible: false,
159
+ },
160
+ {
161
+ jpath: ['info', 'pulseSequence'],
162
+ label: 'Pulse',
163
+ visible: true,
164
+ },
165
+ {
166
+ jpath: ['info', 'experiment'],
167
+ label: 'Experiment',
168
+ visible: true,
169
+ },
170
+ {
171
+ name: 'color',
172
+ label: '',
173
+ description: 'Spectrum Color',
174
+ visible: true,
175
+ },
176
+ ],
177
+ },
178
+ '13C': {
179
+ columns: [
180
+ {
181
+ name: 'visible',
182
+ label: '',
183
+ description: 'Show/Hide Spectrum',
184
+ visible: true,
185
+ },
186
+ {
187
+ label: 'Spectrum Name',
188
+ jpath: ['info', 'name'],
189
+ visible: true,
190
+ },
191
+ {
192
+ label: 'Frequency',
193
+ description: 'frequency',
194
+ jpath: ['info', 'baseFrequency'],
195
+ visible: true,
196
+ },
197
+ {
198
+ label: 'Solvent',
199
+ jpath: ['info', 'solvent'],
200
+ visible: false,
201
+ },
202
+ {
203
+ jpath: ['info', 'pulseSequence'],
204
+ label: 'Pulse',
205
+ visible: true,
206
+ },
207
+ {
208
+ jpath: ['info', 'experiment'],
209
+ label: 'Experiment',
210
+ visible: true,
211
+ },
212
+ {
213
+ name: 'color',
214
+ label: '',
215
+ description: 'Spectrum Color',
216
+ visible: true,
217
+ },
218
+ ],
222
219
  },
223
220
  },
224
221
  },
@@ -1,5 +1,4 @@
1
1
  export const process1D = {
2
- version: 2,
3
2
  label: '1D multiple spectra analysis',
4
3
  visible: true,
5
4
  display: {
@@ -1,5 +1,4 @@
1
1
  export const simulation = {
2
- version: 1,
3
2
  label: 'Simulation',
4
3
  general: {
5
4
  dimmedSpectraOpacity: 0.5,
@@ -29,43 +28,41 @@ export const simulation = {
29
28
  zoom: true,
30
29
  },
31
30
  },
32
- formatting: {
33
- nuclei: {},
34
- panels: {
35
- spectra: {
36
- nuclei: {
37
- '1H': {
38
- columns: [
39
- {
40
- name: 'visible',
41
- label: '',
42
- description: 'Show/Hide Spectrum',
43
- visible: true,
44
- },
45
- {
46
- label: 'Spectrum Name',
47
- jpath: ['info', 'name'],
48
- visible: true,
49
- },
50
- {
51
- label: 'Frequency',
52
- description: 'frequency',
53
- jpath: ['info', 'originFrequency'],
54
- visible: true,
55
- },
56
- {
57
- jpath: ['info', 'nucleus'],
58
- label: 'Experiment',
59
- visible: true,
60
- },
61
- {
62
- name: 'color',
63
- label: '',
64
- description: 'Spectrum Color',
65
- visible: true,
66
- },
67
- ],
68
- },
31
+ nuclei: [],
32
+ panels: {
33
+ spectra: {
34
+ nuclei: {
35
+ '1H': {
36
+ columns: [
37
+ {
38
+ name: 'visible',
39
+ label: '',
40
+ description: 'Show/Hide Spectrum',
41
+ visible: true,
42
+ },
43
+ {
44
+ label: 'Spectrum Name',
45
+ jpath: ['info', 'name'],
46
+ visible: true,
47
+ },
48
+ {
49
+ label: 'Frequency',
50
+ description: 'frequency',
51
+ jpath: ['info', 'originFrequency'],
52
+ visible: true,
53
+ },
54
+ {
55
+ jpath: ['info', 'nucleus'],
56
+ label: 'Experiment',
57
+ visible: true,
58
+ },
59
+ {
60
+ name: 'color',
61
+ label: '',
62
+ description: 'Spectrum Color',
63
+ visible: true,
64
+ },
65
+ ],
69
66
  },
70
67
  },
71
68
  },
@@ -1,4 +1,5 @@
1
1
  import { Filters } from 'nmr-processing';
2
+ import { color2D } from '../../data/data2d/Spectrum2D/get2DColor';
2
3
  export const workspaceDefaultProperties = {
3
4
  display: {
4
5
  general: {
@@ -60,17 +61,15 @@ export const workspaceDefaultProperties = {
60
61
  popupLoggingLevel: 'error',
61
62
  invert: false,
62
63
  },
63
- formatting: {
64
- nuclei: {
65
- '1h': { name: '1H', ppm: '0.00', hz: '0.00' },
66
- '13c': { name: '13C', ppm: '0.00', hz: '0.00' },
67
- '15n': { name: '15N', ppm: '0.00', hz: '0.00' },
68
- '19f': { name: '19F', ppm: '0.00', hz: '0.00' },
69
- '29si': { name: '29Si', ppm: '0.00', hz: '0.00' },
70
- '31p': { name: '31P', ppm: '0.00', hz: '0.00' },
71
- },
72
- panels: {},
73
- },
64
+ nuclei: [
65
+ { nucleus: '1H', ppmFormat: '0.00', hzFormat: '0.00' },
66
+ { nucleus: '13C', ppmFormat: '0.00', hzFormat: '0.00' },
67
+ { nucleus: '15N', ppmFormat: '0.00', hzFormat: '0.00' },
68
+ { nucleus: '19F', ppmFormat: '0.00', hzFormat: '0.00' },
69
+ { nucleus: '29Si', ppmFormat: '0.00', hzFormat: '0.00' },
70
+ { nucleus: '31P', ppmFormat: '0.00', hzFormat: '0.00' },
71
+ ],
72
+ panels: {},
74
73
  databases: {
75
74
  defaultDatabase: '',
76
75
  data: [
@@ -192,38 +191,32 @@ export const workspaceDefaultProperties = {
192
191
  {
193
192
  jpath: ['info', 'experiment'],
194
193
  value: 'cosy',
195
- positiveColor: 'darkblue',
196
- negativeColor: 'blue',
194
+ ...color2D.cosy,
197
195
  },
198
196
  {
199
197
  jpath: ['info', 'experiment'],
200
198
  value: 'noesy',
201
- positiveColor: 'pink',
202
- negativeColor: 'yellow',
199
+ ...color2D.noesy,
203
200
  },
204
201
  {
205
202
  jpath: ['info', 'experiment'],
206
203
  value: 'roesy',
207
- positiveColor: 'pink',
208
- negativeColor: 'yellow',
204
+ ...color2D.roesy,
209
205
  },
210
206
  {
211
207
  jpath: ['info', 'experiment'],
212
208
  value: 'tocsy',
213
- positiveColor: 'green',
214
- negativeColor: 'yellow',
209
+ ...color2D.tocsy,
215
210
  },
216
211
  {
217
212
  jpath: ['info', 'experiment'],
218
213
  value: 'hsqc',
219
- positiveColor: 'black',
220
- negativeColor: 'yellow',
214
+ ...color2D.hsqc,
221
215
  },
222
216
  {
223
217
  jpath: ['info', 'experiment'],
224
218
  value: 'hmbc',
225
- positiveColor: 'darkviolet',
226
- negativeColor: 'yellow',
219
+ ...color2D.hmbc,
227
220
  },
228
221
  ],
229
222
  },
@@ -1,11 +1,18 @@
1
1
  import { SpectrumOneDimensionColor } from 'nmr-load-save';
2
2
  import { UsedColors } from '../../../types/UsedColors';
3
- interface GetOnDimensionColorOption {
3
+ interface BaseColorOptions {
4
4
  usedColors?: UsedColors;
5
5
  colors?: SpectrumOneDimensionColor[];
6
- regenerate?: boolean;
7
6
  }
8
- export declare function get1DColor(spectrum: any, options: GetOnDimensionColorOption): {
7
+ interface ColorOptions extends BaseColorOptions {
8
+ regenerate?: false;
9
+ }
10
+ interface RandomColorOptions extends BaseColorOptions {
11
+ regenerate: true;
12
+ random?: boolean;
13
+ }
14
+ export declare const COLORS: Readonly<string[]>;
15
+ export declare function get1DColor(spectrum: any, options: ColorOptions | RandomColorOptions): {
9
16
  color: string;
10
17
  };
11
18
  export {};
@@ -1,15 +1,41 @@
1
1
  import { generateColor } from '../../utilities/generateColor';
2
2
  import { getCustomColor } from '../../utilities/getCustomColor';
3
+ function isRandomColorGeneration(options) {
4
+ return 'random' in options;
5
+ }
6
+ export const COLORS = [
7
+ '#C10020',
8
+ '#007D34',
9
+ '#803E75',
10
+ '#FF6800',
11
+ '#B32851',
12
+ '#7F180D',
13
+ '#232C16',
14
+ '#A6BDD7',
15
+ '#CEA262',
16
+ '#817066',
17
+ '#FF8E00',
18
+ '#F6768E',
19
+ '#00538A',
20
+ '#FF7A5C',
21
+ '#53377A',
22
+ '#FFB300',
23
+ '#F4C800',
24
+ '#93AA00',
25
+ '#593315',
26
+ '#F13A13',
27
+ ];
3
28
  export function get1DColor(spectrum, options) {
4
29
  const { regenerate = false, usedColors = {}, colors } = options;
5
30
  let color = 'black';
6
31
  if (!spectrum?.display?.color || regenerate) {
7
32
  const customColor = getCustomColor(spectrum, colors);
8
- if (customColor) {
33
+ const isRandom = isRandomColorGeneration(options) && options.random;
34
+ if (customColor && !isRandom) {
9
35
  color = customColor;
10
36
  }
11
37
  else {
12
- color = generateColor(false, usedColors?.['1d'] || []);
38
+ color = generateColor({ usedColors: usedColors?.['1d'] || [] });
13
39
  }
14
40
  }
15
41
  else {
@@ -5,8 +5,8 @@ export { changeIntegralsRelative } from './integrals/changeIntegralsRelative';
5
5
  export { isSpectrum1D } from './isSpectrum1D';
6
6
  export { autoPeakPicking } from './peaks/autoPeakPicking';
7
7
  export { optimizePeaks } from './peaks/optimizePeaks';
8
- export { addRange } from './ranges/addRange';
9
- export { changeRange } from './ranges/changeRange';
8
+ export { createRange } from './ranges/createRange';
9
+ export { resizeRange } from './ranges/resizeRange';
10
10
  export { changeRangeRelativeValue } from './ranges/changeRangeRelativeValue';
11
11
  export { changeRangeSignal } from './ranges/changeRangeSignal';
12
12
  export { checkRangeKind } from './ranges/checkRangeKind';
@@ -5,8 +5,8 @@ export { changeIntegralsRelative } from './integrals/changeIntegralsRelative';
5
5
  export { isSpectrum1D } from './isSpectrum1D';
6
6
  export { autoPeakPicking } from './peaks/autoPeakPicking';
7
7
  export { optimizePeaks } from './peaks/optimizePeaks';
8
- export { addRange } from './ranges/addRange';
9
- export { changeRange } from './ranges/changeRange';
8
+ export { createRange } from './ranges/createRange';
9
+ export { resizeRange } from './ranges/resizeRange';
10
10
  export { changeRangeRelativeValue } from './ranges/changeRangeRelativeValue';
11
11
  export { changeRangeSignal } from './ranges/changeRangeSignal';
12
12
  export { checkRangeKind } from './ranges/checkRangeKind';