nmrium 0.56.0 → 0.57.1
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/ExclusionZoneAnnotation.d.ts +0 -1
- package/lib/component/1d/database/DatabaseSpectrum.js +14 -19
- package/lib/component/1d/jCouplingGraph/JGraphContext.d.ts +0 -1
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.d.ts +0 -1
- package/lib/component/1d/peaks/PeakEditionManager.js +16 -10
- package/lib/component/1d/utilities/getDecimalsCount.js +1 -1
- package/lib/component/1d/utilities/intersectionResolver.js +1 -1
- package/lib/component/1d-2d/FieldEdition.d.ts +3 -1
- package/lib/component/1d-2d/FieldEdition.js +26 -10
- package/lib/component/2d/1d-tracer/Left1DChart.d.ts +0 -1
- package/lib/component/2d/1d-tracer/Top1DChart.d.ts +0 -1
- package/lib/component/2d/XAxis.d.ts +0 -1
- package/lib/component/2d/YAxis.d.ts +0 -1
- package/lib/component/2d/ft/Contours.js +7 -7
- package/lib/component/assignment/AssignmentsContext.d.ts +0 -1
- package/lib/component/context/ChartContext.d.ts +0 -1
- package/lib/component/context/DispatchContext.d.ts +0 -1
- package/lib/component/context/GlobalContext.d.ts +0 -1
- package/lib/component/context/KeyModifierContext.js +1 -1
- package/lib/component/context/LoaderContext.d.ts +0 -1
- package/lib/component/context/PreferencesContext.d.ts +0 -1
- package/lib/component/context/ScaleContext.d.ts +0 -1
- package/lib/component/elements/ActionButtons.d.ts +1 -0
- package/lib/component/elements/ActionButtons.js +4 -4
- package/lib/component/elements/ColorInput.d.ts +0 -1
- package/lib/component/elements/ColorPickerDropdownController.d.ts +2 -0
- package/lib/component/elements/ColorPickerDropdownController.js +8 -0
- package/lib/component/elements/ColumnWrapper.d.ts +0 -1
- package/lib/component/elements/ContextMenu.d.ts +0 -1
- package/lib/component/elements/Input.d.ts +1 -0
- package/lib/component/elements/Input.js +2 -1
- package/lib/component/elements/Input2.d.ts +13 -0
- package/lib/component/elements/Input2.js +118 -0
- package/lib/component/elements/Input2Controller.d.ts +12 -0
- package/lib/component/elements/Input2Controller.js +22 -0
- package/lib/component/elements/MoleculeSelection.js +1 -1
- package/lib/component/elements/NumberInput.js +1 -1
- package/lib/component/elements/NumberInput2.d.ts +12 -0
- package/lib/component/elements/NumberInput2.js +65 -0
- package/lib/component/elements/NumberInput2Controller.d.ts +8 -0
- package/lib/component/elements/NumberInput2Controller.js +15 -0
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.js +3 -3
- package/lib/component/elements/ReactTable/Style.d.ts +3 -1
- package/lib/component/elements/ReactTable/Style.js +11 -1
- package/lib/component/elements/ReactTable/utility/ReactTableContext.d.ts +0 -1
- package/lib/component/elements/Select2.d.ts +26 -0
- package/lib/component/elements/Select2.js +25 -0
- package/lib/component/elements/Select2Controller.d.ts +7 -0
- package/lib/component/elements/Select2Controller.js +12 -0
- package/lib/component/elements/draggable/useDraggable.d.ts +0 -1
- package/lib/component/elements/dropDownButton/DropDownButton.d.ts +2 -4
- package/lib/component/elements/dropDownButton/DropDownButton.js +11 -37
- package/lib/component/elements/dropDownButton/DropDownList.js +3 -32
- package/lib/component/elements/formik/FormikColorPicker.d.ts +0 -1
- package/lib/component/elements/formik/FormikColumnFormatField.d.ts +0 -1
- package/lib/component/elements/formik/FormikInput.d.ts +0 -1
- package/lib/component/elements/formik/FormikInput2.d.ts +11 -0
- package/lib/component/elements/formik/FormikInput2.js +26 -0
- package/lib/component/elements/formik/FormikOnChange.d.ts +0 -1
- package/lib/component/elements/popup/Modal/Context.d.ts +0 -1
- package/lib/component/elements/popup/Modal/ModalContent.d.ts +0 -1
- package/lib/component/elements/resizer/SVGResizer.d.ts +0 -1
- package/lib/component/elements/useFormValidateField.d.ts +1 -0
- package/lib/component/elements/useFormValidateField.js +9 -0
- package/lib/component/header/ApodizationOptionsPanel.js +26 -11
- package/lib/component/header/AutoPeakPickingOptionPanel.d.ts +1 -4
- package/lib/component/header/AutoPeakPickingOptionPanel.js +16 -16
- package/lib/component/header/BaseLineCorrectionPanel.js +49 -27
- package/lib/component/header/Header.js +1 -1
- package/lib/component/header/PhaseCorrectionPanel.js +12 -24
- package/lib/component/header/RangesPickingOptionPanel.js +12 -12
- package/lib/component/header/ZeroFillingOptionsPanel.js +18 -7
- package/lib/component/header/Zones2DOptionPanel.js +19 -18
- package/lib/component/hooks/useWorkspaceAction.d.ts +1 -1
- package/lib/component/modal/editRange/forms/components/SignalTab.d.ts +0 -1
- package/lib/component/modal/editRange/forms/components/SignalsContent.d.ts +0 -1
- package/lib/component/modal/setting/GeneralSettings.d.ts +5 -1
- package/lib/component/modal/setting/GeneralSettings.js +107 -111
- package/lib/component/modal/setting/WorkspaceItem.js +4 -9
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.d.ts +1 -1
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.js +95 -59
- package/lib/component/modal/setting/settings-tabs/DisplayTabContent.js +33 -25
- package/lib/component/modal/setting/settings-tabs/GeneralTabContent.js +15 -4
- package/lib/component/modal/setting/settings-tabs/ImportationFiltersTabContent.js +56 -39
- package/lib/component/modal/setting/settings-tabs/InfoBlockTabContent.js +36 -36
- package/lib/component/modal/setting/settings-tabs/NucleiTabContent.js +44 -36
- package/lib/component/modal/setting/settings-tabs/OnLoadProcessingTabContent.js +16 -11
- package/lib/component/modal/setting/settings-tabs/SpectraColorsTabContent.js +47 -40
- package/lib/component/modal/setting/settings-tabs/ToolsTabContent.js +50 -40
- package/lib/component/modal/setting/settingsValidation.js +8 -34
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.d.ts +0 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts +0 -1
- package/lib/component/panels/IntegralsPanel/IntegralsPreferences.d.ts +0 -1
- package/lib/component/panels/Panels.js +31 -8
- package/lib/component/panels/PeaksPanel/PeaksPreferences.d.ts +0 -1
- package/lib/component/panels/PeaksPanel/PeaksTable.d.ts +0 -1
- package/lib/component/panels/RangesPanel/RangesPreferences.d.ts +0 -1
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.d.ts +0 -1
- package/lib/component/panels/SpectraPanel/SpectraPreferences.d.ts +0 -1
- package/lib/component/panels/SpectraPanel/SpectraPreferences.js +32 -24
- package/lib/component/panels/SpectraPanel/SpectraTable.js +17 -2
- package/lib/component/panels/SpectraPanel/SpectrumListPanel.d.ts +0 -1
- package/lib/component/panels/SpectraPanel/base/ColorIndicator.d.ts +0 -1
- package/lib/component/panels/SpectraPanel/base/SpectraColumnsManager.d.ts +3 -3
- package/lib/component/panels/SpectraPanel/base/SpectraColumnsManager.js +25 -16
- package/lib/component/panels/SpectraPanel/base/setting/Spectrum1DHistogram.d.ts +0 -1
- package/lib/component/panels/SpectraPanel/base/setting/Spectrum1DSetting.js +15 -5
- package/lib/component/panels/SpectraPanel/base/setting/Spectrum2DHistogram.d.ts +0 -1
- package/lib/component/panels/SpectraPanel/base/setting/Spectrum2DSetting.js +44 -6
- package/lib/component/panels/SpectraPanel/base/setting/SpectrumSetting.d.ts +0 -1
- package/lib/component/panels/SummaryPanel/Overview.d.ts +0 -1
- package/lib/component/panels/SummaryPanel/SummaryPanel.d.ts +0 -1
- package/lib/component/panels/SummaryPanel/utilities/Utilities.d.ts +1 -1
- package/lib/component/panels/ZonesPanel/ZonesPreferences.d.ts +0 -1
- package/lib/component/panels/databasePanel/DatabasePanel.js +17 -3
- package/lib/component/panels/databasePanel/DatabasePreferences.d.ts +0 -1
- package/lib/component/panels/databasePanel/DatabaseTable.d.ts +11 -4
- package/lib/component/panels/databasePanel/DatabaseTable.js +20 -5
- package/lib/component/panels/informationPanel/InformationEditionModal.d.ts +6 -0
- package/lib/component/panels/informationPanel/InformationEditionModal.js +105 -0
- package/lib/component/panels/informationPanel/InformationPanel.d.ts +1 -0
- package/lib/component/panels/{InformationPanel.js → informationPanel/InformationPanel.js} +2 -2
- package/lib/component/panels/multipleAnalysisPanel/preferences/MultipleAnalysisCodeEditor.d.ts +0 -1
- package/lib/component/panels/multipleAnalysisPanel/preferences/index.d.ts +0 -1
- package/lib/component/panels/predictionPanel/PredictionOptionsPanel.d.ts +0 -1
- package/lib/component/panels/predictionPanel/PredictionOptionsPanel.js +1 -1
- package/lib/component/panels/predictionPanel/PredictionPreferences.d.ts +0 -1
- package/lib/component/panels/spectrumSimulation/SpectrumSimulationPreferences.d.ts +0 -1
- package/lib/component/reducer/Reducer.d.ts +1 -1
- package/lib/component/reducer/Reducer.js +2 -0
- package/lib/component/reducer/actions/DatabaseActions.js +22 -5
- package/lib/component/reducer/actions/SpectraActions.d.ts +8 -2
- package/lib/component/reducer/actions/SpectraActions.js +58 -21
- package/lib/component/reducer/actions/ToolsActions.js +3 -4
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts +7 -7
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +2 -0
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +1 -1
- package/lib/component/utility/checkUniqueByKey.d.ts +2 -0
- package/lib/component/utility/checkUniqueByKey.js +40 -0
- package/lib/component/utility/colorToHexWithAlpha.d.ts +9 -0
- package/lib/component/utility/colorToHexWithAlpha.js +4 -0
- package/lib/component/workspaces/exercise.js +2 -0
- package/lib/component/workspaces/process1D.js +0 -1
- package/lib/component/workspaces/workspaceDefaultProperties.js +1 -0
- package/lib/data/PredictionManager.js +3 -5
- package/lib/data/data1d/Spectrum1D/ranges/createRange.d.ts +13 -13
- package/lib/data/data1d/Spectrum1D/ranges/detectSignals.d.ts +9 -9
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +13 -13
- package/lib/data/data1d/Spectrum1D/ranges/resizeRange.d.ts +13 -13
- package/lib/data/data1d/database.d.ts +1 -0
- package/lib/data/data1d/database.js +4 -2
- package/lib/data/data2d/Spectrum2D/contours.d.ts +8 -22
- package/lib/data/data2d/Spectrum2D/contours.js +88 -67
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +4 -2
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts +20 -20
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts +20 -20
- package/lib/data/getDefaultMatrixFilters.d.ts +1 -1
- package/lib/data/initiateFilters.d.ts +1 -1
- package/lib/data/matrixGeneration.js +1 -2
- package/lib/data/types/common/Keys.d.ts +3 -0
- package/lib/data/types/common/Keys.js +1 -0
- package/lib/data/utilities/generateNumbersPowerOfX.d.ts +2 -2
- package/lib/versionInfo.js +1 -1
- package/package.json +32 -31
- package/lib/component/elements/formik/FormikSlider.d.ts +0 -6
- package/lib/component/elements/formik/FormikSlider.js +0 -15
- package/lib/component/panels/InformationPanel.d.ts +0 -1
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
+
/** @jsxImportSource @emotion/react */
|
|
3
|
+
import { Classes, NumericInput, } from '@blueprintjs/core';
|
|
4
|
+
import debounce from 'lodash/debounce';
|
|
5
|
+
import { useEffect, useMemo, useState, isValidElement, forwardRef, } from 'react';
|
|
6
|
+
function useNumberInput(props) {
|
|
7
|
+
const { value: externalValue, debounceTime, onValueChange, checkValue, } = props;
|
|
8
|
+
const [internalValue, setValue] = useState();
|
|
9
|
+
const value = debounceTime ? internalValue : externalValue;
|
|
10
|
+
const [isDebounced, setDebouncedStatus] = useState(false);
|
|
11
|
+
const debounceOnValueChange = useMemo(() => debounce((valueAsNumber, valueAsString, inputElement) => {
|
|
12
|
+
onValueChange?.(valueAsNumber, valueAsString, inputElement);
|
|
13
|
+
setDebouncedStatus(true);
|
|
14
|
+
}, debounceTime), [debounceTime, onValueChange]);
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
if (debounceTime) {
|
|
17
|
+
setValue(externalValue);
|
|
18
|
+
}
|
|
19
|
+
}, [debounceTime, externalValue]);
|
|
20
|
+
function handleValueChange(valueAsNumber, valueAsString, inputElement) {
|
|
21
|
+
setDebouncedStatus(false);
|
|
22
|
+
if (!checkValue || checkValue?.(valueAsNumber)) {
|
|
23
|
+
if (debounceTime) {
|
|
24
|
+
setValue(valueAsString);
|
|
25
|
+
debounceOnValueChange(valueAsNumber, valueAsString, inputElement);
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
onValueChange?.(valueAsNumber, valueAsString, inputElement);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
handleValueChange,
|
|
34
|
+
debounceOnValueChange,
|
|
35
|
+
isDebounced,
|
|
36
|
+
value,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function getIcon(leftIcon) {
|
|
40
|
+
if (isValidElement(leftIcon)) {
|
|
41
|
+
return _jsx("span", { className: Classes.ICON, children: leftIcon });
|
|
42
|
+
}
|
|
43
|
+
return leftIcon;
|
|
44
|
+
}
|
|
45
|
+
function getClasses(isDebounced) {
|
|
46
|
+
const classes = ['numeric-input'];
|
|
47
|
+
if (isDebounced) {
|
|
48
|
+
classes.push('debounce-end');
|
|
49
|
+
}
|
|
50
|
+
return classes.join(' ');
|
|
51
|
+
}
|
|
52
|
+
function InnerNumberInput(props, ref) {
|
|
53
|
+
const { debounceTime = 0, onValueChange, checkValue, value: externalValue, leftIcon, autoSelect = false, ...otherInputProps } = props;
|
|
54
|
+
const { handleValueChange, isDebounced, value } = useNumberInput({
|
|
55
|
+
value: externalValue,
|
|
56
|
+
debounceTime,
|
|
57
|
+
onValueChange,
|
|
58
|
+
checkValue,
|
|
59
|
+
});
|
|
60
|
+
const icon = getIcon(leftIcon);
|
|
61
|
+
const classes = getClasses(isDebounced);
|
|
62
|
+
return (_jsx(NumericInput, { leftIcon: icon, inputClassName: classes, inputRef: ref, onValueChange: handleValueChange, value: value, selectAllOnFocus: autoSelect, ...otherInputProps }));
|
|
63
|
+
}
|
|
64
|
+
const NumberInput2 = forwardRef(InnerNumberInput);
|
|
65
|
+
export { NumberInput2 };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ControllerProps, FieldValues } from 'react-hook-form';
|
|
2
|
+
import { NumberInput2Props } from './NumberInput2';
|
|
3
|
+
interface NumberInput2ControllerProps<TFieldValues extends FieldValues = FieldValues> extends Omit<NumberInput2Props, 'name'>, Pick<ControllerProps<TFieldValues>, 'control' | 'name'> {
|
|
4
|
+
controllerProps?: Omit<ControllerProps<TFieldValues>, 'render'>;
|
|
5
|
+
noShadowBox?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function NumberInput2Controller<TFieldValues extends FieldValues = FieldValues>(props: NumberInput2ControllerProps<TFieldValues>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Controller } from 'react-hook-form';
|
|
3
|
+
import { NumberInput2 } from './NumberInput2';
|
|
4
|
+
export function NumberInput2Controller(props) {
|
|
5
|
+
const { controllerProps, onValueChange, name, control, intent = 'none', noShadowBox = false, style, ...otherInputProps } = props;
|
|
6
|
+
return (_jsx(Controller, { name: name, control: control, ...controllerProps, render: ({ field, fieldState: { invalid } }) => {
|
|
7
|
+
return (_jsx(NumberInput2, { ...field, onValueChange: (valueAsNumber, valueAsString, event) => {
|
|
8
|
+
field.onChange(valueAsString);
|
|
9
|
+
onValueChange?.(valueAsNumber, valueAsString, event);
|
|
10
|
+
}, ...otherInputProps, style: {
|
|
11
|
+
...style,
|
|
12
|
+
...(noShadowBox && !invalid && { boxShadow: 'none' }),
|
|
13
|
+
}, intent: invalid ? 'danger' : intent }));
|
|
14
|
+
} }));
|
|
15
|
+
}
|
|
@@ -53,8 +53,8 @@ function ReactTableRow(props) {
|
|
|
53
53
|
}, [onClick, row]);
|
|
54
54
|
const { key: rowKey, ...otherKeyProps } = row.getRowProps();
|
|
55
55
|
return (_jsx(ContextMenu, { options: contextMenu, onSelect: (selected) => onContextMenuSelect?.(selected, row.original), as: "tr", style: { position: 'static' }, css: getRowStyle(highlight.isActive || isRowActive, rowStyle, disableDefaultRowStyle), ...otherKeyProps, ...highlight.onHover, children: row.cells.map((cell) => {
|
|
56
|
-
const { style,
|
|
57
|
-
if (
|
|
56
|
+
const { column: { style }, isRowSpanned, } = cell;
|
|
57
|
+
if (isRowSpanned) {
|
|
58
58
|
return null;
|
|
59
59
|
}
|
|
60
60
|
else {
|
|
@@ -62,7 +62,7 @@ function ReactTableRow(props) {
|
|
|
62
62
|
return (_jsx("td", { rowSpan: cell.rowSpan, ...otherColumnProps, onContextMenu: (e) => {
|
|
63
63
|
e.preventDefault();
|
|
64
64
|
return false;
|
|
65
|
-
}, style:
|
|
65
|
+
}, style: style, onClick: clickHandler, children: cell.render('Cell') }, columnKey));
|
|
66
66
|
}
|
|
67
67
|
}) }, rowKey));
|
|
68
68
|
}
|
|
@@ -32,4 +32,14 @@ const ReactTableStyle = css `
|
|
|
32
32
|
border-right: 1px solid #dedede;
|
|
33
33
|
}
|
|
34
34
|
`;
|
|
35
|
-
|
|
35
|
+
const tableInputStyle = {
|
|
36
|
+
input: {
|
|
37
|
+
width: '100%',
|
|
38
|
+
backgroundColor: 'transparent',
|
|
39
|
+
},
|
|
40
|
+
inputWrapper: {
|
|
41
|
+
borderRadius: 0,
|
|
42
|
+
borderWidth: 0,
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
export { ReactTableStyle, tableInputStyle };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ButtonProps } from '@blueprintjs/core';
|
|
2
|
+
import { SelectProps } from '@blueprintjs/select';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
import { useSelect } from 'react-science/ui';
|
|
5
|
+
import { FilterType } from '../utility/filterType';
|
|
6
|
+
interface ItemOptions<T> {
|
|
7
|
+
renderItem?: (item: T) => ReactNode;
|
|
8
|
+
defaultSelectedItem?: T;
|
|
9
|
+
}
|
|
10
|
+
interface ItemSelectOptions<T extends SelectDefaultItem = SelectDefaultItem> {
|
|
11
|
+
itemTextKey?: keyof FilterType<T, string>;
|
|
12
|
+
itemValueKey?: keyof T;
|
|
13
|
+
selectedItemValue?: T[keyof T];
|
|
14
|
+
}
|
|
15
|
+
type SelectOptions<T extends SelectDefaultItem = SelectDefaultItem> = ItemOptions<T> & ItemSelectOptions;
|
|
16
|
+
type ReturnedUseSelectOptions = ReturnType<typeof useSelect>;
|
|
17
|
+
export type Select2Props<T extends SelectDefaultItem = SelectDefaultItem> = Omit<SelectProps<T>, keyof Omit<ReturnedUseSelectOptions, 'onItemSelect' | 'value'>> & SelectOptions<T> & {
|
|
18
|
+
selectedButtonProps?: Omit<ButtonProps, 'text'>;
|
|
19
|
+
};
|
|
20
|
+
export declare function getDefaultSelectedItem<T extends SelectDefaultItem = SelectDefaultItem>(items: T[], itemValueKey?: keyof T, value?: any): T | undefined;
|
|
21
|
+
export interface SelectDefaultItem {
|
|
22
|
+
label: string;
|
|
23
|
+
value: any;
|
|
24
|
+
}
|
|
25
|
+
export declare function Select2<T extends SelectDefaultItem = SelectDefaultItem>(props: Select2Props<T>): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from '@blueprintjs/core';
|
|
3
|
+
import { Select } from '@blueprintjs/select';
|
|
4
|
+
import { useEffect } from 'react';
|
|
5
|
+
import { useSelect } from 'react-science/ui';
|
|
6
|
+
export function getDefaultSelectedItem(items, itemValueKey, value) {
|
|
7
|
+
return items.find((item) => itemValueKey && item[itemValueKey] === value);
|
|
8
|
+
}
|
|
9
|
+
export function Select2(props) {
|
|
10
|
+
const { items, defaultSelectedItem, itemTextKey = 'label', itemValueKey = 'value', selectedItemValue, onItemSelect, selectedButtonProps, fill, ...otherProps } = props;
|
|
11
|
+
const { value: item, onItemSelect: innerOnItemSelect, setValue, ...defaultSelectProps } = useSelect({
|
|
12
|
+
defaultSelectedItem: defaultSelectedItem ??
|
|
13
|
+
getDefaultSelectedItem(items, itemValueKey, selectedItemValue),
|
|
14
|
+
itemTextKey: itemTextKey,
|
|
15
|
+
});
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
const value = defaultSelectedItem ??
|
|
18
|
+
getDefaultSelectedItem(items, itemValueKey, selectedItemValue);
|
|
19
|
+
setValue(value || null);
|
|
20
|
+
}, [defaultSelectedItem, itemValueKey, items, selectedItemValue, setValue]);
|
|
21
|
+
return (_jsx(Select, { items: items, filterable: false, onItemSelect: (item, event) => {
|
|
22
|
+
innerOnItemSelect(item);
|
|
23
|
+
onItemSelect(item, event);
|
|
24
|
+
}, ...defaultSelectProps, ...otherProps, fill: fill, children: _jsx(Button, { fill: fill, text: item?.[itemTextKey] ? String(item[itemTextKey]) : '', ...selectedButtonProps, rightIcon: "double-caret-vertical" }) }));
|
|
25
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ControllerProps, FieldValues } from 'react-hook-form';
|
|
2
|
+
import { Select2Props, SelectDefaultItem } from './Select2';
|
|
3
|
+
type Select2ControllerProps<T extends SelectDefaultItem = SelectDefaultItem, TFieldValues extends FieldValues = FieldValues> = {
|
|
4
|
+
controllerProps?: Omit<ControllerProps<TFieldValues>, 'render'>;
|
|
5
|
+
} & Pick<ControllerProps<TFieldValues>, 'control' | 'name'> & Omit<Select2Props<T>, 'onItemSelect' | 'selectedItemValue'> & Partial<Pick<Select2Props<T>, 'onItemSelect'>>;
|
|
6
|
+
export declare function Select2Controller<T extends SelectDefaultItem = SelectDefaultItem, TFieldValues extends FieldValues = FieldValues>(props: Select2ControllerProps<T, TFieldValues>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Controller } from 'react-hook-form';
|
|
3
|
+
import { Select2 } from './Select2';
|
|
4
|
+
export function Select2Controller(props) {
|
|
5
|
+
const { name, control, controllerProps = {}, onItemSelect, ...otherSelectProps } = props;
|
|
6
|
+
return (_jsx(Controller, { name: name, control: control, ...controllerProps, render: ({ field }) => {
|
|
7
|
+
return (_jsx(Select2, { selectedItemValue: field.value, onItemSelect: (item, event) => {
|
|
8
|
+
field.onChange(item.value);
|
|
9
|
+
onItemSelect?.(item, event);
|
|
10
|
+
}, ...otherSelectProps }));
|
|
11
|
+
} }));
|
|
12
|
+
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { CSSObject } from '@emotion/react';
|
|
3
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
4
2
|
export interface DropDownListItem {
|
|
5
3
|
key: string;
|
|
6
4
|
label: string;
|
|
@@ -18,7 +16,7 @@ interface DropDownButtonProps<T> extends DropDownListProps<T>, ItemProps {
|
|
|
18
16
|
selectedKey?: string;
|
|
19
17
|
onSelect?: (item: DropDownListItem) => void;
|
|
20
18
|
formatSelectedValue?: (Item: DropDownListItem) => string;
|
|
21
|
-
style?:
|
|
19
|
+
style?: CSSProperties;
|
|
22
20
|
className?: string;
|
|
23
21
|
}
|
|
24
22
|
declare function DropDownButton<T extends DropDownListItem>(props: DropDownButtonProps<T>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,54 +1,28 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
1
|
+
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
2
2
|
/** @jsxImportSource @emotion/react */
|
|
3
|
+
import { Popover, Button } from '@blueprintjs/core';
|
|
3
4
|
import { css } from '@emotion/react';
|
|
4
|
-
import {
|
|
5
|
+
import { useEffect, useState } from 'react';
|
|
5
6
|
import { FaEllipsisH } from 'react-icons/fa';
|
|
6
7
|
import DropDownList from './DropDownList';
|
|
7
|
-
const arrowDownIcon = `url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="960px" height="560px" viewBox="0 0 960 560" enable-background="new 0 0 960 560" xml:space="preserve"><g id="Rounded_Rectangle_33_copy_4_1_"><path d="M480,344.181L268.869,131.889c-15.756-15.859-41.3-15.859-57.054,0c-15.754,15.857-15.754,41.57,0,57.431l237.632,238.937c8.395,8.451,19.562,12.254,30.553,11.698c10.993,0.556,22.159-3.247,30.555-11.698l237.631-238.937c15.756-15.86,15.756-41.571,0-57.431s-41.299-15.859-57.051,0L480,344.181z"/></g></svg>')`;
|
|
8
|
-
const styles = {
|
|
9
|
-
container: css `
|
|
10
|
-
position: relative;
|
|
11
|
-
border-radius: 10px;
|
|
12
|
-
width: max-content;
|
|
13
|
-
display: inline-block;
|
|
14
|
-
border: 0.55px solid lightgray;
|
|
15
|
-
font-size: 0.9em;
|
|
16
|
-
background: ${arrowDownIcon} no-repeat right white;
|
|
17
|
-
appearance: none;
|
|
18
|
-
background-position-x: calc(100% - 0.5em);
|
|
19
|
-
background-size: 1em 1em;
|
|
20
|
-
`,
|
|
21
|
-
button: css `
|
|
22
|
-
width: 100%;
|
|
23
|
-
padding: 0.3em 2em 0.3em 1em;
|
|
24
|
-
`,
|
|
25
|
-
};
|
|
26
8
|
function DropDownButton(props) {
|
|
27
|
-
const { data, selectedKey, onSelect, formatSelectedValue = (item) => item.label, renderItem = null, style, itemKey = 'key', labelKey = 'label', visibleKey = 'visible', className = '', } = props;
|
|
9
|
+
const { data, selectedKey, onSelect, formatSelectedValue = (item) => item.label, renderItem = null, style = {}, itemKey = 'key', labelKey = 'label', visibleKey = 'visible', className = '', } = props;
|
|
28
10
|
const [open, setOpen] = useState(false);
|
|
29
11
|
const [item, setItem] = useState();
|
|
30
|
-
const drop = useRef(null);
|
|
31
12
|
useEffect(() => {
|
|
32
13
|
if (selectedKey) {
|
|
33
14
|
const item = data.find((i) => i[itemKey] === selectedKey) || null;
|
|
34
15
|
setItem(item);
|
|
35
16
|
}
|
|
36
17
|
}, [selectedKey, data, itemKey]);
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
setOpen(false);
|
|
40
|
-
}
|
|
41
|
-
window.addEventListener('click', handleClick);
|
|
42
|
-
return () => window.removeEventListener('click', handleClick);
|
|
43
|
-
}, []);
|
|
44
|
-
const selectHandler = useCallback((index) => {
|
|
18
|
+
function selectHandler(index) {
|
|
19
|
+
setOpen(false);
|
|
45
20
|
setItem(data[index]);
|
|
46
21
|
onSelect?.(data[index]);
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}, children: !item ? _jsx(FaEllipsisH, {}) : formatSelectedValue(item) }), open && (_jsx(DropDownList, { data: data, onSelect: selectHandler, renderItem: renderItem, itemKey: itemKey, labelKey: labelKey, visibleKey: visibleKey }))] }));
|
|
22
|
+
}
|
|
23
|
+
return (_jsx(Popover, { isOpen: open, onClose: () => setOpen(false), className: className, minimal: true, position: "bottom", content: _jsx(DropDownList, { data: data, onSelect: selectHandler, renderItem: renderItem, itemKey: itemKey, labelKey: labelKey, visibleKey: visibleKey }), children: _jsx(Button, { style: { boxShadow: 'none', ...style }, css: css `
|
|
24
|
+
border: 0.55px solid lightgray;
|
|
25
|
+
border-radius: 5px;
|
|
26
|
+
`, rightIcon: "chevron-down", onClick: () => setOpen((flag) => !flag), children: !item ? _jsx(FaEllipsisH, {}) : formatSelectedValue(item) }) }));
|
|
53
27
|
}
|
|
54
28
|
export default DropDownButton;
|
|
@@ -1,20 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
2
2
|
/** @jsxImportSource @emotion/react */
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
|
-
import { useLayoutEffect, useRef } from 'react';
|
|
5
4
|
const styles = {
|
|
6
|
-
container: css `
|
|
7
|
-
background-color: white;
|
|
8
|
-
position: absolute;
|
|
9
|
-
height: auto;
|
|
10
|
-
z-index: 99999999999999;
|
|
11
|
-
box-shadow:
|
|
12
|
-
0 19px 38px rgb(0 0 0 / 30%),
|
|
13
|
-
0 15px 12px rgb(0 0 0 / 22%);
|
|
14
|
-
border-radius: 10px;
|
|
15
|
-
margin-bottom: 20px;
|
|
16
|
-
overflow: hidden;
|
|
17
|
-
`,
|
|
18
5
|
ul: css `
|
|
19
6
|
list-style-type: none;
|
|
20
7
|
padding: 0;
|
|
@@ -31,8 +18,7 @@ const styles = {
|
|
|
31
18
|
}
|
|
32
19
|
|
|
33
20
|
&:hover {
|
|
34
|
-
background-color:
|
|
35
|
-
color: white;
|
|
21
|
+
background-color: #f6f6f6;
|
|
36
22
|
}
|
|
37
23
|
`,
|
|
38
24
|
label: css `
|
|
@@ -41,27 +27,12 @@ const styles = {
|
|
|
41
27
|
`,
|
|
42
28
|
};
|
|
43
29
|
function DropDownList({ data = [], onSelect, renderItem = null, itemKey, labelKey, visibleKey, }) {
|
|
44
|
-
|
|
45
|
-
useLayoutEffect(() => {
|
|
46
|
-
const container = ref.current;
|
|
47
|
-
if (container) {
|
|
48
|
-
const { right } = container.getBoundingClientRect();
|
|
49
|
-
const innerWidth = window.innerWidth - 30;
|
|
50
|
-
if (right > innerWidth) {
|
|
51
|
-
container.style.left = `-${right - innerWidth}px`;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return () => {
|
|
55
|
-
if (container) {
|
|
56
|
-
container.style.left = '0px';
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
}, []);
|
|
60
|
-
return (_jsx("div", { css: styles.container, ref: ref, children: _jsx("ul", { css: styles.ul, children: data.map((item, index) => (_jsx("li", { css: styles.li, onClick: (e) => {
|
|
30
|
+
return (_jsx("div", { children: _jsx("ul", { css: styles.ul, children: data.map((item, index) => (_jsx("li", { css: styles.li, onClick: (e) => {
|
|
61
31
|
e.stopPropagation();
|
|
62
32
|
onSelect(index);
|
|
63
33
|
}, style: {
|
|
64
34
|
display: !(visibleKey in item) || item[visibleKey] ? 'block' : 'none',
|
|
35
|
+
cursor: 'pointer',
|
|
65
36
|
}, children: renderItem?.(item) || (_jsx("span", { css: styles.label, children: item[labelKey] })) }, item[itemKey]))) }) }));
|
|
66
37
|
}
|
|
67
38
|
export default DropDownList;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Input2Props } from '../Input2';
|
|
2
|
+
export interface InputMapValueFunctions {
|
|
3
|
+
mapOnChangeValue?: (value: string | number) => any;
|
|
4
|
+
mapValue?: (value: any) => string | number;
|
|
5
|
+
}
|
|
6
|
+
interface FormikInputProps extends Input2Props, InputMapValueFunctions {
|
|
7
|
+
name: string;
|
|
8
|
+
checkErrorAfterInputTouched?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const FormikInput2: import("react").ForwardRefExoticComponent<FormikInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
11
|
+
export default FormikInput2;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useFormikContext } from 'formik';
|
|
3
|
+
import lodashGet from 'lodash/get';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
import { Input2 } from '../Input2';
|
|
6
|
+
const FormikInput2 = forwardRef(function FormikInput2(props, ref) {
|
|
7
|
+
const { name, onChange, type = 'text', value = null, checkErrorAfterInputTouched = true, mapOnChangeValue, mapValue, ...resProps } = props;
|
|
8
|
+
const { values, handleChange, errors, touched, setFieldValue, handleBlur } = useFormikContext();
|
|
9
|
+
function changeHandler(value, e) {
|
|
10
|
+
onChange?.(value, e);
|
|
11
|
+
if (mapOnChangeValue) {
|
|
12
|
+
void setFieldValue(name, mapOnChangeValue(value));
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
handleChange(e);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
let isInvalid = lodashGet(errors, name);
|
|
19
|
+
if (checkErrorAfterInputTouched) {
|
|
20
|
+
isInvalid = lodashGet(errors, name) && lodashGet(touched, name);
|
|
21
|
+
}
|
|
22
|
+
let val = value || lodashGet(values, name);
|
|
23
|
+
val = mapValue ? mapValue(val) : val;
|
|
24
|
+
return (_jsx(Input2, { ref: ref, name: name, value: val, onChange: changeHandler, onBlur: handleBlur, type: type, intent: isInvalid ? 'danger' : 'none', ...resProps }));
|
|
25
|
+
});
|
|
26
|
+
export default FormikInput2;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useFormValidateField(): (name: string) => boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import has from 'lodash/has';
|
|
2
|
+
import { useCallback } from 'react';
|
|
3
|
+
import { useFormContext } from 'react-hook-form';
|
|
4
|
+
export function useFormValidateField() {
|
|
5
|
+
const { formState: { errors }, } = useFormContext();
|
|
6
|
+
return useCallback((name) => {
|
|
7
|
+
return !has(errors, name);
|
|
8
|
+
}, [errors]);
|
|
9
|
+
}
|
|
@@ -1,26 +1,23 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Checkbox } from '@blueprintjs/core';
|
|
3
|
+
import { yupResolver } from '@hookform/resolvers/yup';
|
|
4
|
+
import { Filters, } from 'nmr-processing';
|
|
4
5
|
import { useRef, memo } from 'react';
|
|
6
|
+
import { useForm } from 'react-hook-form';
|
|
5
7
|
import * as Yup from 'yup';
|
|
6
8
|
import { defaultApodizationOptions } from '../../data/constants/DefaultApodizationOptions';
|
|
7
9
|
import { useDispatch } from '../context/DispatchContext';
|
|
8
10
|
import ActionButtons from '../elements/ActionButtons';
|
|
9
11
|
import Label from '../elements/Label';
|
|
10
|
-
import
|
|
11
|
-
import FormikInput from '../elements/formik/FormikInput';
|
|
12
|
-
import FormikOnChange from '../elements/formik/FormikOnChange';
|
|
12
|
+
import { NumberInput2Controller } from '../elements/NumberInput2Controller';
|
|
13
13
|
import { useFilter } from '../hooks/useFilter';
|
|
14
14
|
import { headerLabelStyle } from './Header';
|
|
15
15
|
import { HeaderContainer } from './HeaderContainer';
|
|
16
|
-
const inputStyle = {
|
|
17
|
-
input: { width: '60px', textAlign: 'center' },
|
|
18
|
-
inputWrapper: { height: '100%' },
|
|
19
|
-
};
|
|
20
16
|
const validationSchema = Yup.object().shape({
|
|
21
17
|
lineBroadening: Yup.number().required(),
|
|
22
18
|
gaussBroadening: Yup.number().required(),
|
|
23
19
|
lineBroadeningCenter: Yup.number().required().min(0).max(1),
|
|
20
|
+
livePreview: Yup.boolean().required(),
|
|
24
21
|
});
|
|
25
22
|
const initialValues = {
|
|
26
23
|
...defaultApodizationOptions,
|
|
@@ -62,7 +59,25 @@ function ApodizationOptionsInnerPanel(props) {
|
|
|
62
59
|
if (props.filter) {
|
|
63
60
|
formData = { ...initialValues, ...props.filter.value, livePreview: true };
|
|
64
61
|
}
|
|
65
|
-
|
|
62
|
+
const { handleSubmit, register, control, formState: { isValid }, } = useForm({
|
|
63
|
+
defaultValues: formData,
|
|
64
|
+
resolver: yupResolver(validationSchema),
|
|
65
|
+
mode: 'onChange',
|
|
66
|
+
});
|
|
67
|
+
function submitHandler() {
|
|
68
|
+
void handleSubmit((values) => handleApplyFilter(values, 'onChange'))();
|
|
69
|
+
}
|
|
70
|
+
const { onChange: onLivePreviewChange, ...otherLivePreviewOptions } = register('livePreview');
|
|
71
|
+
return (_jsxs(HeaderContainer, { children: [_jsx(Label, { title: "Line broadening:", shortTitle: "LB:", style: headerLabelStyle, children: _jsx(NumberInput2Controller, { control: control, name: "lineBroadening", debounceTime: 250, min: 0, max: 1, stepSize: 0.1, style: { width: '60px' }, onValueChange: () => {
|
|
72
|
+
submitHandler();
|
|
73
|
+
} }) }), _jsx(Label, { title: "Gauss broadening:", shortTitle: "GB:", style: headerLabelStyle, children: _jsx(NumberInput2Controller, { control: control, name: "gaussBroadening", debounceTime: 250, min: 0, max: 1, stepSize: 0.1, style: { width: '60px' }, onValueChange: () => {
|
|
74
|
+
submitHandler();
|
|
75
|
+
} }) }), _jsx(Label, { title: "Line broadening center [0 - 1]:", shortTitle: "LB center:", style: headerLabelStyle, children: _jsx(NumberInput2Controller, { control: control, name: "lineBroadeningCenter", debounceTime: 250, min: 0, max: 1, stepSize: 0.1, style: { width: '60px' }, onValueChange: () => {
|
|
76
|
+
submitHandler();
|
|
77
|
+
} }) }), _jsx(Label, { title: "Live preview", style: { label: { padding: '0 5px' } }, children: _jsx(Checkbox, { ...otherLivePreviewOptions, onChange: (event) => {
|
|
78
|
+
void onLivePreviewChange(event);
|
|
79
|
+
submitHandler();
|
|
80
|
+
}, style: { margin: 0 } }) }), _jsx(ActionButtons, { disabledDone: !isValid, onDone: () => handleSubmit((values) => handleApplyFilter(values))(), onCancel: handleCancelFilter })] }));
|
|
66
81
|
}
|
|
67
82
|
const MemoizedApodizationPanel = memo(ApodizationOptionsInnerPanel);
|
|
68
83
|
export default function ApodizationOptionsPanel() {
|
|
@@ -1,4 +1 @@
|
|
|
1
|
-
|
|
2
|
-
declare function AutoPeakPickingOptionPanel(): import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
declare const _default: import("react").MemoExoticComponent<typeof AutoPeakPickingOptionPanel>;
|
|
4
|
-
export default _default;
|
|
1
|
+
export declare function AutoPeakPickingOptionPanel(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,23 +1,16 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from '@blueprintjs/core';
|
|
3
|
+
import { yupResolver } from '@hookform/resolvers/yup';
|
|
4
|
+
import { useForm } from 'react-hook-form';
|
|
4
5
|
import * as Yup from 'yup';
|
|
5
6
|
import { useDispatch } from '../context/DispatchContext';
|
|
6
7
|
import { useToaster } from '../context/ToasterContext';
|
|
7
|
-
import Button from '../elements/Button';
|
|
8
8
|
import Label from '../elements/Label';
|
|
9
|
-
import
|
|
10
|
-
import
|
|
9
|
+
import { NumberInput2Controller } from '../elements/NumberInput2Controller';
|
|
10
|
+
import { Select2Controller } from '../elements/Select2Controller';
|
|
11
11
|
import { MIN_AREA_POINTS, useCheckPointsNumberInWindowArea, } from '../hooks/useCheckPointsNumberInWindowArea';
|
|
12
12
|
import { headerLabelStyle } from './Header';
|
|
13
13
|
import { HeaderContainer } from './HeaderContainer';
|
|
14
|
-
const inputStyle = {
|
|
15
|
-
input: {
|
|
16
|
-
width: '60px',
|
|
17
|
-
textAlign: 'center',
|
|
18
|
-
},
|
|
19
|
-
inputWrapper: { height: '100%' },
|
|
20
|
-
};
|
|
21
14
|
const LookFor = [
|
|
22
15
|
{
|
|
23
16
|
label: 'Positive',
|
|
@@ -36,6 +29,9 @@ const validationSchema = Yup.object().shape({
|
|
|
36
29
|
maxNumberOfPeaks: Yup.number().min(0).required(),
|
|
37
30
|
minMaxRatio: Yup.number().min(0).required(),
|
|
38
31
|
noiseFactor: Yup.number().min(0).required(),
|
|
32
|
+
direction: Yup.mixed()
|
|
33
|
+
.oneOf(['both', 'negative', 'positive'])
|
|
34
|
+
.required(),
|
|
39
35
|
});
|
|
40
36
|
const INIT_VALUES = {
|
|
41
37
|
maxNumberOfPeaks: 50,
|
|
@@ -43,10 +39,15 @@ const INIT_VALUES = {
|
|
|
43
39
|
noiseFactor: 3,
|
|
44
40
|
direction: 'positive',
|
|
45
41
|
};
|
|
46
|
-
function AutoPeakPickingOptionPanel() {
|
|
42
|
+
export function AutoPeakPickingOptionPanel() {
|
|
47
43
|
const dispatch = useDispatch();
|
|
48
44
|
const pointsNumber = useCheckPointsNumberInWindowArea();
|
|
49
45
|
const toaster = useToaster();
|
|
46
|
+
const { handleSubmit, formState: { isValid }, control, } = useForm({
|
|
47
|
+
defaultValues: INIT_VALUES,
|
|
48
|
+
resolver: yupResolver(validationSchema),
|
|
49
|
+
mode: 'onChange',
|
|
50
|
+
});
|
|
50
51
|
function handlePeakPicking(values) {
|
|
51
52
|
if (pointsNumber > MIN_AREA_POINTS) {
|
|
52
53
|
dispatch({
|
|
@@ -61,6 +62,5 @@ function AutoPeakPickingOptionPanel() {
|
|
|
61
62
|
});
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
|
-
return (
|
|
65
|
+
return (_jsxs(HeaderContainer, { children: [_jsx(Label, { title: "Direction:", shortTitle: "", style: headerLabelStyle, children: _jsx(Select2Controller, { control: control, name: "direction", items: LookFor }) }), _jsx(Label, { title: "Max number of peaks:", shortTitle: "Max peaks:", style: headerLabelStyle, children: _jsx(NumberInput2Controller, { control: control, name: "maxNumberOfPeaks", min: 0, stepSize: 1, style: { width: '60px' } }) }), _jsx(Label, { title: "Noise factor:", shortTitle: "Noise:", style: headerLabelStyle, children: _jsx(NumberInput2Controller, { control: control, name: "noiseFactor", min: 0, stepSize: 1, style: { width: '60px' } }) }), _jsx(Label, { title: "Min/max Ratio:", shortTitle: "Ratio:", style: headerLabelStyle, children: _jsx(NumberInput2Controller, { control: control, name: "minMaxRatio", min: 0, stepSize: 0.01, majorStepSize: 0.01, minorStepSize: 0.01, style: { width: '60px' } }) }), _jsx(Button, { intent: "success", onClick: () => handleSubmit(handlePeakPicking)(), style: { margin: '0 10px' }, disabled: !isValid, children: "Apply" })] }));
|
|
65
66
|
}
|
|
66
|
-
export default memo(AutoPeakPickingOptionPanel);
|