nmrium 0.57.0 → 0.58.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 (35) hide show
  1. package/lib/component/1d-2d/components/SpectrumInfoBlock.d.ts +1 -1
  2. package/lib/component/1d-2d/components/SpectrumInfoBlock.js +114 -7
  3. package/lib/component/elements/ActionsButtonsPopover.d.ts +7 -1
  4. package/lib/component/elements/ActionsButtonsPopover.js +9 -6
  5. package/lib/component/elements/Input2.js +2 -2
  6. package/lib/component/elements/Input2Controller.d.ts +4 -2
  7. package/lib/component/elements/Input2Controller.js +22 -6
  8. package/lib/component/elements/MoleculeSelection.js +2 -2
  9. package/lib/component/elements/NextPrev.d.ts +4 -5
  10. package/lib/component/elements/NextPrev.js +76 -79
  11. package/lib/component/header/ApodizationOptionsPanel.js +14 -7
  12. package/lib/component/header/BaseLineCorrectionPanel.js +17 -10
  13. package/lib/component/header/ZeroFillingOptionsPanel.js +17 -10
  14. package/lib/component/hooks/useSaveSettings.js +43 -26
  15. package/lib/component/hooks/useWorkspaceAction.js +12 -14
  16. package/lib/component/modal/LoadJCAMPModal.d.ts +3 -1
  17. package/lib/component/modal/LoadJCAMPModal.js +17 -18
  18. package/lib/component/modal/SaveAsModal.d.ts +3 -1
  19. package/lib/component/modal/SaveAsModal.js +20 -30
  20. package/lib/component/modal/changeSum/ChangeSumModal.js +1 -1
  21. package/lib/component/modal/changeSum/ChangeSumModalContents.js +35 -47
  22. package/lib/component/modal/changeSum/SelectMolecule.d.ts +2 -5
  23. package/lib/component/modal/changeSum/SelectMolecule.js +9 -8
  24. package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.js +2 -2
  25. package/lib/component/panels/MoleculesPanel/MoleculePanel.js +5 -3
  26. package/lib/component/panels/Panels.js +13 -13
  27. package/lib/component/panels/predictionPanel/PredictionPanel.js +2 -2
  28. package/lib/component/reducer/preferences/actions/changeInformationBlockPosition.d.ts +3 -0
  29. package/lib/component/reducer/preferences/actions/changeInformationBlockPosition.js +5 -0
  30. package/lib/component/reducer/preferences/actions/toggleInformationBlock.d.ts +3 -0
  31. package/lib/component/reducer/preferences/actions/toggleInformationBlock.js +7 -0
  32. package/lib/component/reducer/preferences/preferencesReducer.d.ts +10 -1
  33. package/lib/component/reducer/preferences/preferencesReducer.js +6 -0
  34. package/lib/versionInfo.js +1 -1
  35. package/package.json +16 -16
@@ -0,0 +1,7 @@
1
+ import { getActiveWorkspace } from '../utilities/getActiveWorkspace';
2
+ export function toggleInformationBlock(draft, action) {
3
+ const currentWorkspacePreferences = getActiveWorkspace(draft);
4
+ const { visible } = action.payload || {};
5
+ currentWorkspacePreferences.infoBlock.visible =
6
+ visible ?? !currentWorkspacePreferences.infoBlock.visible;
7
+ }
@@ -63,7 +63,16 @@ export type SetSpectraAnalysisPanelPreferencesAction = ActionType<'SET_SPECTRA_A
63
63
  export type SetVerticalSplitterPositionAction = ActionType<'SET_VERTICAL_SPLITTER_POSITION', {
64
64
  value: SplitPaneSize;
65
65
  }>;
66
- type PreferencesActions = InitPreferencesAction | SetPreferencesAction | SetPanelsPreferencesAction | SetWorkspaceAction | WorkspaceAction | AddWorkspaceAction | ApplyGeneralPreferences | AnalyzeSpectraAction | ChangeAnalysisColumnValueKeyAction | DeleteAnalysisColumn | SetSpectraAnalysisPanelPreferencesAction | MatrixGenerationActions | SetVerticalSplitterPositionAction;
66
+ export type ChangeInformationBlockPosition = ActionType<'CHANGE_INFORMATION_BLOCK_POSITION', {
67
+ coordination: {
68
+ x: number;
69
+ y: number;
70
+ };
71
+ }>;
72
+ export type ToggleInformationBlock = ActionType<'TOGGLE_INFORMATION_BLOCK', {
73
+ visible?: boolean;
74
+ }>;
75
+ type PreferencesActions = InitPreferencesAction | SetPreferencesAction | SetPanelsPreferencesAction | SetWorkspaceAction | WorkspaceAction | AddWorkspaceAction | ApplyGeneralPreferences | AnalyzeSpectraAction | ChangeAnalysisColumnValueKeyAction | DeleteAnalysisColumn | SetSpectraAnalysisPanelPreferencesAction | MatrixGenerationActions | SetVerticalSplitterPositionAction | ChangeInformationBlockPosition | ToggleInformationBlock;
67
76
  export declare const WORKSPACES: Array<{
68
77
  key: NMRiumWorkspace;
69
78
  label: string;
@@ -5,6 +5,7 @@ import Workspaces from '../../workspaces';
5
5
  import { addWorkspace } from './actions/addWorkspace';
6
6
  import { analyzeSpectra, changeAnalysisColumnValueKey, deleteAnalysisColumn, setSpectraAnalysisPanelsPreferences, } from './actions/analyzeSpectra';
7
7
  import { applyGeneralPreferences } from './actions/applyGeneralPreferences';
8
+ import { changeInformationBlockPosition } from './actions/changeInformationBlockPosition';
8
9
  import { initPreferences } from './actions/initPreferences';
9
10
  import { setMatrixGenerationOptions, addExclusionZone, deleteExclusionZone, toggleMatrixGenerationViewProperty, changeMatrixGenerationScale, changeMatrixGenerationStocsyChemicalShift, } from './actions/matrixGeneration';
10
11
  import { removeWorkspace } from './actions/removeWorkspace';
@@ -14,6 +15,7 @@ import { setPreferences } from './actions/setPreferences';
14
15
  import { setVerticalSplitterPosition } from './actions/setVerticalSplitterPosition';
15
16
  import { setWorkspace } from './actions/setWorkspace';
16
17
  import { mapWorkspaces } from './utilities/mapWorkspaces';
18
+ import { toggleInformationBlock } from './actions/toggleInformationBlock';
17
19
  const LOCAL_STORAGE_SETTINGS_KEY = 'nmr-general-settings';
18
20
  export const WORKSPACES_KEYS = {
19
21
  componentKey: `nmrium-component-workspace`,
@@ -133,6 +135,10 @@ function innerPreferencesReducer(draft, action) {
133
135
  return changeMatrixGenerationScale(draft, action);
134
136
  case 'CHANGE_MATRIX_GENERATION_STOCSY_CHEMICAL_SHIFT':
135
137
  return changeMatrixGenerationStocsyChemicalShift(draft, action);
138
+ case 'CHANGE_INFORMATION_BLOCK_POSITION':
139
+ return changeInformationBlockPosition(draft, action);
140
+ case 'TOGGLE_INFORMATION_BLOCK':
141
+ return toggleInformationBlock(draft, action);
136
142
  default:
137
143
  return draft;
138
144
  }
@@ -1 +1 @@
1
- export default { version: 'v0.57.0' };
1
+ export default { version: 'v0.58.0' };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nmrium",
3
3
  "description": "React component to display and process nuclear magnetic resonance (NMR) spectra.",
4
- "version": "0.57.0",
4
+ "version": "0.58.0",
5
5
  "license": "MIT",
6
6
  "module": "lib/component/main/index.js",
7
7
  "types": "lib/component/main/index.d.ts",
@@ -57,12 +57,12 @@
57
57
  "react-dom": ">=18.0.0"
58
58
  },
59
59
  "dependencies": {
60
- "@blueprintjs/core": "^5.10.4",
60
+ "@blueprintjs/core": "^5.10.5",
61
61
  "@blueprintjs/icons": "^5.10.0",
62
- "@blueprintjs/select": "^5.2.0",
62
+ "@blueprintjs/select": "^5.2.1",
63
63
  "@emotion/react": "^11.11.4",
64
64
  "@emotion/styled": "^11.11.5",
65
- "@hookform/resolvers": "^3.6.0",
65
+ "@hookform/resolvers": "^3.9.0",
66
66
  "@lukeed/uuid": "^2.0.1",
67
67
  "cheminfo-font": "^1.13.0",
68
68
  "cheminfo-types": "^1.7.3",
@@ -92,17 +92,17 @@
92
92
  "multiplet-analysis": "^2.1.2",
93
93
  "nmr-correlation": "^2.3.3",
94
94
  "nmr-load-save": "^0.34.2",
95
- "nmr-processing": "^12.5.0",
95
+ "nmr-processing": "^12.7.1",
96
96
  "nmredata": "^0.9.11",
97
97
  "numeral": "^2.0.6",
98
98
  "openchemlib": "^8.14.0",
99
- "openchemlib-utils": "^6.1.0",
99
+ "openchemlib-utils": "^6.3.0",
100
100
  "papaparse": "^5.4.1",
101
101
  "re-resizable": "6.9.17",
102
102
  "react-d3-utils": "^1.0.0",
103
103
  "react-dropzone": "^14.2.3",
104
104
  "react-error-boundary": "^4.0.13",
105
- "react-hook-form": "^7.52.0",
105
+ "react-hook-form": "^7.52.1",
106
106
  "react-icons": "^5.2.1",
107
107
  "react-inspector": "^6.0.2",
108
108
  "react-mf": "^2.0.3",
@@ -121,19 +121,19 @@
121
121
  "@babel/plugin-transform-modules-commonjs": "^7.24.7",
122
122
  "@babel/preset-react": "^7.24.7",
123
123
  "@babel/preset-typescript": "^7.24.7",
124
- "@playwright/test": "^1.45.0",
124
+ "@playwright/test": "^1.45.1",
125
125
  "@simbathesailor/use-what-changed": "^2.0.0",
126
126
  "@types/d3": "^7.4.3",
127
127
  "@types/lodash": "^4.17.6",
128
- "@types/node": "^20.14.9",
128
+ "@types/node": "^20.14.10",
129
129
  "@types/papaparse": "^5.3.14",
130
130
  "@types/react": "^18.3.3",
131
131
  "@types/react-dom": "^18.3.0",
132
132
  "@types/react-table": "^7.7.20",
133
133
  "@vitejs/plugin-react-swc": "^3.7.0",
134
- "@vitest/coverage-v8": "^1.6.0",
134
+ "@vitest/coverage-v8": "^2.0.2",
135
135
  "cross-env": "^7.0.3",
136
- "cspell": "^8.9.1",
136
+ "cspell": "^8.10.4",
137
137
  "eslint": "^8.57.0",
138
138
  "eslint-config-cheminfo-react": "^12.0.0",
139
139
  "eslint-config-cheminfo-typescript": "^13.0.0",
@@ -143,14 +143,14 @@
143
143
  "rc-menu": "^9.14.1",
144
144
  "react": "^18.3.1",
145
145
  "react-dom": "^18.3.1",
146
- "react-router-dom": "^6.24.0",
147
- "rimraf": "^5.0.7",
146
+ "react-router-dom": "^6.24.1",
147
+ "rimraf": "^6.0.1",
148
148
  "rollup-plugin-analyzer": "^4.0.0",
149
149
  "serve": "^14.2.3",
150
150
  "stylelint": "^16.6.1",
151
151
  "stylelint-config-standard": "^36.0.1",
152
- "typescript": "^5.5.2",
153
- "vite": "^5.3.2",
154
- "vitest": "^1.6.0"
152
+ "typescript": "^5.5.3",
153
+ "vite": "^5.3.3",
154
+ "vitest": "^2.0.2"
155
155
  }
156
156
  }