nmrium 0.19.0 → 0.20.2
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.
- package/lib/component/1d/Chart1D.js +3 -3
- package/lib/component/1d/ExclusionZoneAnnotation.d.ts +11 -0
- package/lib/component/1d/ExclusionZoneAnnotation.js +18 -0
- package/lib/component/1d/ExclusionZonesAnnotations.d.ts +3 -0
- package/lib/component/1d/ExclusionZonesAnnotations.js +28 -0
- package/lib/component/1d/Line.js +11 -23
- package/lib/component/1d/Viewer1D.js +36 -5
- package/lib/component/1d/ranges/Ranges.js +3 -3
- package/lib/component/1d/{BaseLineZones.d.ts → tool/BaseLineZones.d.ts} +0 -0
- package/lib/component/1d/{BaseLineZones.js → tool/BaseLineZones.js} +5 -5
- package/lib/component/1d/utilities/useIntegralPath.js +9 -10
- package/lib/component/2d/Contours.js +12 -11
- package/lib/component/2d/Left1DChart.js +7 -9
- package/lib/component/2d/Top1DChart.js +7 -7
- package/lib/component/2d/tools/slicing/HorizontalSliceChart.js +7 -7
- package/lib/component/2d/tools/slicing/VerticalSliceChart.js +7 -9
- package/lib/component/EventsTrackers/BrushTracker.js +2 -2
- package/lib/component/EventsTrackers/KeysListenerTracker.js +12 -3
- package/lib/component/NMRium.d.ts +1 -1
- package/lib/component/NMRium.js +28 -25
- package/lib/component/elements/NumberInput.d.ts +1 -2
- package/lib/component/elements/Tab/Tab.js +1 -0
- package/lib/component/hooks/useActiveSpectrumStyleOptions.d.ts +6 -0
- package/lib/component/hooks/useActiveSpectrumStyleOptions.js +15 -0
- package/lib/component/hooks/useXYReduce.d.ts +2 -1
- package/lib/component/loader/DropZone.js +1 -1
- package/lib/component/modal/ModalStyle.js +5 -2
- package/lib/component/modal/MoleculeStructureEditorModal.js +3 -2
- package/lib/component/modal/MultipleSpectraFiltersModal/index.js +10 -1
- package/lib/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.d.ts +2 -0
- package/lib/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +35 -0
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js +49 -51
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.js +3 -8
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +2 -23
- package/lib/component/panels/Panels.js +10 -0
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DHistogram.js +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.d.ts +5 -5
- package/lib/component/panels/SummaryPanel/SummaryPanel.js +1 -1
- package/lib/component/panels/SummaryPanel/Utilities.d.ts +7 -7
- package/lib/component/panels/ZonesPanel/ZonesTable.js +9 -2
- package/lib/component/reducer/Reducer.d.ts +11 -27
- package/lib/component/reducer/Reducer.js +4 -5
- package/lib/component/reducer/actions/CorrelationsActions.d.ts +7 -7
- package/lib/component/reducer/actions/CorrelationsActions.js +1 -1
- package/lib/component/reducer/actions/FiltersActions.d.ts +3 -1
- package/lib/component/reducer/actions/FiltersActions.js +60 -18
- package/lib/component/reducer/actions/LoadActions.js +2 -3
- package/lib/component/reducer/actions/MoleculeActions.js +2 -2
- package/lib/component/reducer/actions/PreferencesActions.js +4 -7
- package/lib/component/reducer/actions/RangesActions.js +1 -1
- package/lib/component/reducer/actions/ToolsActions.d.ts +1 -3
- package/lib/component/reducer/actions/ToolsActions.js +1 -30
- package/lib/component/reducer/helper/getRange.d.ts +6 -1
- package/lib/component/reducer/helper/getRange.js +1 -1
- package/lib/component/toolbar/FunctionToolBar.js +2 -5
- package/lib/component/utility/PathBuilder.d.ts +7 -0
- package/lib/component/utility/PathBuilder.js +17 -0
- package/lib/component/utility/getSpectraByNucleus.d.ts +3 -0
- package/lib/component/utility/getSpectraByNucleus.js +4 -0
- package/lib/data/Filters.d.ts +2 -1
- package/lib/data/Filters.js +2 -1
- package/lib/data/data1d/Spectrum1D/ranges/addRange.js +5 -2
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.js +6 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRange.js +0 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectSignal.d.ts +3 -2
- package/lib/data/data1d/Spectrum1D/ranges/detectSignal.js +23 -15
- package/lib/data/data1d/filter1d/exclusionZones.d.ts +16 -0
- package/lib/data/data1d/filter1d/exclusionZones.js +28 -0
- package/lib/data/types/data1d/ExclusionZone.d.ts +5 -0
- package/lib/data/types/data1d/ExclusionZone.js +1 -0
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/Chart1D.js +3 -3
- package/lib-cjs/component/1d/ExclusionZoneAnnotation.js +23 -0
- package/lib-cjs/component/1d/ExclusionZonesAnnotations.js +52 -0
- package/lib-cjs/component/1d/Line.js +11 -23
- package/lib-cjs/component/1d/Viewer1D.js +36 -5
- package/lib-cjs/component/1d/ranges/Ranges.js +1 -1
- package/lib-cjs/component/1d/{BaseLineZones.js → tool/BaseLineZones.js} +5 -5
- package/lib-cjs/component/1d/utilities/useIntegralPath.js +9 -10
- package/lib-cjs/component/2d/Contours.js +12 -11
- package/lib-cjs/component/2d/Left1DChart.js +7 -9
- package/lib-cjs/component/2d/Top1DChart.js +7 -7
- package/lib-cjs/component/2d/tools/slicing/HorizontalSliceChart.js +7 -7
- package/lib-cjs/component/2d/tools/slicing/VerticalSliceChart.js +7 -9
- package/lib-cjs/component/EventsTrackers/BrushTracker.js +2 -2
- package/lib-cjs/component/EventsTrackers/KeysListenerTracker.js +12 -3
- package/lib-cjs/component/NMRium.js +28 -25
- package/lib-cjs/component/elements/Tab/Tab.js +1 -0
- package/lib-cjs/component/hooks/useActiveSpectrumStyleOptions.js +21 -0
- package/lib-cjs/component/loader/DropZone.js +1 -1
- package/lib-cjs/component/modal/ModalStyle.js +5 -2
- package/lib-cjs/component/modal/MoleculeStructureEditorModal.js +3 -2
- package/lib-cjs/component/modal/MultipleSpectraFiltersModal/index.js +10 -1
- package/lib-cjs/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +40 -0
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +49 -51
- package/lib-cjs/component/panels/MoleculesPanel/useAtomAssignment.js +3 -8
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +1 -22
- package/lib-cjs/component/panels/Panels.js +10 -0
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum2DHistogram.js +1 -1
- package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +8 -1
- package/lib-cjs/component/reducer/Reducer.js +4 -5
- package/lib-cjs/component/reducer/actions/FiltersActions.js +62 -18
- package/lib-cjs/component/reducer/actions/LoadActions.js +2 -3
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +2 -2
- package/lib-cjs/component/reducer/actions/PreferencesActions.js +4 -7
- package/lib-cjs/component/reducer/actions/RangesActions.js +1 -1
- package/lib-cjs/component/reducer/actions/ToolsActions.js +1 -32
- package/lib-cjs/component/reducer/helper/getRange.js +1 -1
- package/lib-cjs/component/toolbar/FunctionToolBar.js +2 -5
- package/lib-cjs/component/utility/PathBuilder.js +21 -0
- package/lib-cjs/component/utility/getSpectraByNucleus.js +11 -0
- package/lib-cjs/data/Filters.js +3 -1
- package/lib-cjs/data/data1d/Spectrum1D/ranges/addRange.js +5 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/autoRangesDetection.js +6 -1
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectRange.js +0 -1
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectSignal.js +24 -15
- package/lib-cjs/data/data1d/filter1d/exclusionZones.js +34 -0
- package/lib-cjs/data/types/data1d/ExclusionZone.js +2 -0
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +28 -29
- package/lib/component/1d/ExclusionZone.d.ts +0 -8
- package/lib/component/1d/ExclusionZone.js +0 -30
- package/lib/component/1d/ExclusionZones.d.ts +0 -2
- package/lib/component/1d/ExclusionZones.js +0 -10
- package/lib-cjs/component/1d/ExclusionZone.js +0 -32
- package/lib-cjs/component/1d/ExclusionZones.js +0 -16
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
-
/** @jsxImportSource @emotion/react */
|
|
3
|
-
import { css } from '@emotion/react';
|
|
4
|
-
import { memo } from 'react';
|
|
5
|
-
import { useScaleChecked } from '../context/ScaleContext';
|
|
6
|
-
import { HighlightedSource, useHighlight } from '../highlight';
|
|
7
|
-
const styles = css `
|
|
8
|
-
pointer-events: bounding-box;
|
|
9
|
-
user-select: 'none';
|
|
10
|
-
-webkit-user-select: none; /* Chrome all / Safari all */
|
|
11
|
-
-moz-user-select: none; /* Firefox all */
|
|
12
|
-
|
|
13
|
-
.zone-area {
|
|
14
|
-
height: 100%;
|
|
15
|
-
fill: #dddddd;
|
|
16
|
-
cursor: pointer;
|
|
17
|
-
}
|
|
18
|
-
.zone-area.active {
|
|
19
|
-
fill: #ff6f0057;
|
|
20
|
-
}
|
|
21
|
-
`;
|
|
22
|
-
function ExclusionZone({ zone }) {
|
|
23
|
-
const { scaleX } = useScaleChecked();
|
|
24
|
-
const highlight = useHighlight([zone.id], {
|
|
25
|
-
type: HighlightedSource.EXCLUSION_ZONE,
|
|
26
|
-
extra: { id: zone.id },
|
|
27
|
-
});
|
|
28
|
-
return (_jsx("g", { transform: `translate(${scaleX()(zone.to)},0)`, css: styles, ...highlight.onHover, children: _jsx("rect", { x: "0", width: `${scaleX()(zone.from) - scaleX()(zone.to)}`, className: `zone-area ${highlight.isActive ? 'active' : ''}` }, void 0) }, zone.id));
|
|
29
|
-
}
|
|
30
|
-
export default memo(ExclusionZone);
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useChartData } from '../context/ChartContext';
|
|
3
|
-
import ExclusionZone from './ExclusionZone';
|
|
4
|
-
export default function ExclusionZones() {
|
|
5
|
-
const { toolOptions: { data: { exclusionZones }, }, activeTab, } = useChartData();
|
|
6
|
-
const exclusionZonesForNucleus = exclusionZones[activeTab];
|
|
7
|
-
if (!exclusionZonesForNucleus)
|
|
8
|
-
return null;
|
|
9
|
-
return (_jsx("g", { className: "exclusionZones", children: exclusionZonesForNucleus.map((zone) => (_jsx(ExclusionZone, { zone: zone }, zone.id))) }, void 0));
|
|
10
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
4
|
-
/** @jsxImportSource @emotion/react */
|
|
5
|
-
const react_1 = require("@emotion/react");
|
|
6
|
-
const react_2 = require("react");
|
|
7
|
-
const ScaleContext_1 = require("../context/ScaleContext");
|
|
8
|
-
const highlight_1 = require("../highlight");
|
|
9
|
-
const styles = (0, react_1.css) `
|
|
10
|
-
pointer-events: bounding-box;
|
|
11
|
-
user-select: 'none';
|
|
12
|
-
-webkit-user-select: none; /* Chrome all / Safari all */
|
|
13
|
-
-moz-user-select: none; /* Firefox all */
|
|
14
|
-
|
|
15
|
-
.zone-area {
|
|
16
|
-
height: 100%;
|
|
17
|
-
fill: #dddddd;
|
|
18
|
-
cursor: pointer;
|
|
19
|
-
}
|
|
20
|
-
.zone-area.active {
|
|
21
|
-
fill: #ff6f0057;
|
|
22
|
-
}
|
|
23
|
-
`;
|
|
24
|
-
function ExclusionZone({ zone }) {
|
|
25
|
-
const { scaleX } = (0, ScaleContext_1.useScaleChecked)();
|
|
26
|
-
const highlight = (0, highlight_1.useHighlight)([zone.id], {
|
|
27
|
-
type: highlight_1.HighlightedSource.EXCLUSION_ZONE,
|
|
28
|
-
extra: { id: zone.id },
|
|
29
|
-
});
|
|
30
|
-
return ((0, jsx_runtime_1.jsx)("g", { transform: `translate(${scaleX()(zone.to)},0)`, css: styles, ...highlight.onHover, children: (0, jsx_runtime_1.jsx)("rect", { x: "0", width: `${scaleX()(zone.from) - scaleX()(zone.to)}`, className: `zone-area ${highlight.isActive ? 'active' : ''}` }, void 0) }, zone.id));
|
|
31
|
-
}
|
|
32
|
-
exports.default = (0, react_2.memo)(ExclusionZone);
|
|
@@ -1,16 +0,0 @@
|
|
|
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("react/jsx-runtime");
|
|
7
|
-
const ChartContext_1 = require("../context/ChartContext");
|
|
8
|
-
const ExclusionZone_1 = __importDefault(require("./ExclusionZone"));
|
|
9
|
-
function ExclusionZones() {
|
|
10
|
-
const { toolOptions: { data: { exclusionZones }, }, activeTab, } = (0, ChartContext_1.useChartData)();
|
|
11
|
-
const exclusionZonesForNucleus = exclusionZones[activeTab];
|
|
12
|
-
if (!exclusionZonesForNucleus)
|
|
13
|
-
return null;
|
|
14
|
-
return ((0, jsx_runtime_1.jsx)("g", { className: "exclusionZones", children: exclusionZonesForNucleus.map((zone) => ((0, jsx_runtime_1.jsx)(ExclusionZone_1.default, { zone: zone }, zone.id))) }, void 0));
|
|
15
|
-
}
|
|
16
|
-
exports.default = ExclusionZones;
|