@zakodium/nmrium-core-plugins-ui 0.1.32 → 0.1.33
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/plugins/spectrum_1d_processings_ui/operators/apodization_topbar.d.ts.map +1 -1
- package/lib/plugins/spectrum_1d_processings_ui/operators/apodization_topbar.js +1 -24
- package/lib/plugins/spectrum_1d_processings_ui/operators/apodization_topbar.js.map +1 -1
- package/lib/plugins/spectrum_1d_processings_ui/operators/zero_filling.d.ts.map +1 -1
- package/lib/plugins/spectrum_1d_processings_ui/operators/zero_filling.js +2 -0
- package/lib/plugins/spectrum_1d_processings_ui/operators/zero_filling.js.map +1 -1
- package/lib/plugins/spectrum_1d_processings_ui/operators/zero_filling_topbar.d.ts +3 -0
- package/lib/plugins/spectrum_1d_processings_ui/operators/zero_filling_topbar.d.ts.map +1 -0
- package/lib/plugins/spectrum_1d_processings_ui/operators/zero_filling_topbar.js +10 -0
- package/lib/plugins/spectrum_1d_processings_ui/operators/zero_filling_topbar.js.map +1 -0
- package/lib/plugins/spectrum_1d_processings_ui/utils/horizontal_app_form.d.ts +34 -0
- package/lib/plugins/spectrum_1d_processings_ui/utils/horizontal_app_form.d.ts.map +1 -0
- package/lib/plugins/spectrum_1d_processings_ui/utils/horizontal_app_form.js +25 -0
- package/lib/plugins/spectrum_1d_processings_ui/utils/horizontal_app_form.js.map +1 -0
- package/package.json +2 -2
- package/src/plugins/spectrum_1d_processings_ui/operators/apodization_topbar.tsx +3 -26
- package/src/plugins/spectrum_1d_processings_ui/operators/zero_filling.tsx +2 -0
- package/src/plugins/spectrum_1d_processings_ui/operators/zero_filling_topbar.tsx +28 -0
- package/src/plugins/spectrum_1d_processings_ui/utils/horizontal_app_form.tsx +25 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apodization_topbar.d.ts","sourceRoot":"","sources":["../../../../src/plugins/spectrum_1d_processings_ui/operators/apodization_topbar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"apodization_topbar.d.ts","sourceRoot":"","sources":["../../../../src/plugins/spectrum_1d_processings_ui/operators/apodization_topbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,uBAAuB,CAAC;AAMnF,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,qCAAqC,CAAC,6CAA6C,CAAC,+BAiC5F"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import styled from '@emotion/styled';
|
|
4
|
-
import { AppForm } from 'react-science/ui';
|
|
2
|
+
import { HorizontalAppForm } from "../utils/horizontal_app_form.js";
|
|
5
3
|
import { useApodizationForm } from "./apodization.hook.js";
|
|
6
4
|
export function ApodizationTopBar(props) {
|
|
7
5
|
const { children } = props;
|
|
@@ -9,25 +7,4 @@ export function ApodizationTopBar(props) {
|
|
|
9
7
|
const { AppField, SubmitButton, Subscribe } = form;
|
|
10
8
|
return (_jsxs(HorizontalAppForm, { form: form, layout: "inline", children: [_jsx(Subscribe, { selector: (state) => state.values.exponential?.apply ?? false, children: (apply) => (_jsx(AppField, { name: "exponential.options.lineBroadening", children: ({ NumericInput }) => (_jsx(NumericInput, { readOnly: !apply, disabled: !apply, label: "Line broadening", minorStepSize: 0.01, step: 0.1, majorStepSize: 1 })) })) }), children(_jsx(SubmitButton, { variant: "outlined", size: "small", intent: "success", children: "Apply" }))] }));
|
|
11
9
|
}
|
|
12
|
-
const HorizontalAppForm = styled(AppForm) `
|
|
13
|
-
display: contents;
|
|
14
|
-
|
|
15
|
-
.${Classes.FORM_GROUP} {
|
|
16
|
-
min-height: unset;
|
|
17
|
-
width: unset;
|
|
18
|
-
display: flex;
|
|
19
|
-
flex-direction: row;
|
|
20
|
-
align-items: center;
|
|
21
|
-
gap: 5px;
|
|
22
|
-
|
|
23
|
-
> :not(.${Classes.LABEL}) {
|
|
24
|
-
min-width: unset;
|
|
25
|
-
width: unset;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.${Classes.INPUT} {
|
|
29
|
-
width: 5em;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
`;
|
|
33
10
|
//# sourceMappingURL=apodization_topbar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apodization_topbar.js","sourceRoot":"","sources":["../../../../src/plugins/spectrum_1d_processings_ui/operators/apodization_topbar.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"apodization_topbar.js","sourceRoot":"","sources":["../../../../src/plugins/spectrum_1d_processings_ui/operators/apodization_topbar.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAkC,CAAC;AAErE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,MAAM,UAAU,iBAAiB,CAC/B,KAA2F;IAE3F,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAE3B,MAAM,IAAI,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACvC,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;IAEnD,OAAO,CACL,MAAC,iBAAiB,IAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAC,QAAQ,aAC5C,KAAC,SAAS,IAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,IAAI,KAAK,YACrE,CAAC,KAAK,EAAE,EAAE,CAAC,CACV,KAAC,QAAQ,IAAC,IAAI,EAAC,oCAAoC,YAChD,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC,CACrB,KAAC,YAAY,IACX,QAAQ,EAAE,CAAC,KAAK,EAChB,QAAQ,EAAE,CAAC,KAAK,EAChB,KAAK,EAAC,iBAAiB,EACvB,aAAa,EAAE,IAAI,EACnB,IAAI,EAAE,GAAG,EACT,aAAa,EAAE,CAAC,GAChB,CACH,GACQ,CACZ,GACS,EAEX,QAAQ,CACP,KAAC,YAAY,IAAC,OAAO,EAAC,UAAU,EAAC,IAAI,EAAC,OAAO,EAAC,MAAM,EAAC,SAAS,sBAE/C,CAChB,IACiB,CACrB,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zero_filling.d.ts","sourceRoot":"","sources":["../../../../src/plugins/spectrum_1d_processings_ui/operators/zero_filling.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"zero_filling.d.ts","sourceRoot":"","sources":["../../../../src/plugins/spectrum_1d_processings_ui/operators/zero_filling.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa,qGASxB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineProcessingOperatorUI } from '@zakodium/nmrium-core';
|
|
2
2
|
import { ZeroFillingExpand } from "./zero_filling_expand.js";
|
|
3
3
|
import { ZeroFillingTool } from "./zero_filling_tool.js";
|
|
4
|
+
import { ZeroFillingTopBar } from "./zero_filling_topbar.js";
|
|
4
5
|
export const zeroFilling1D = defineProcessingOperatorUI({
|
|
5
6
|
id: '@zakodium/nmrium-core-plugins#zeroFilling1D',
|
|
6
7
|
name: 'Zero filling',
|
|
@@ -9,5 +10,6 @@ export const zeroFilling1D = defineProcessingOperatorUI({
|
|
|
9
10
|
defaultShouldProcessAll: false,
|
|
10
11
|
Expanded: ZeroFillingExpand,
|
|
11
12
|
Tool: ZeroFillingTool,
|
|
13
|
+
TopBar: ZeroFillingTopBar,
|
|
12
14
|
});
|
|
13
15
|
//# sourceMappingURL=zero_filling.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zero_filling.js","sourceRoot":"","sources":["../../../../src/plugins/spectrum_1d_processings_ui/operators/zero_filling.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAEnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA2B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"zero_filling.js","sourceRoot":"","sources":["../../../../src/plugins/spectrum_1d_processings_ui/operators/zero_filling.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAEnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA2B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAyB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA2B,CAAC;AAE9D,MAAM,CAAC,MAAM,aAAa,GAAG,0BAA0B,CAAC;IACtD,EAAE,EAAE,6CAA6C;IACjD,IAAI,EAAE,cAAc;IACpB,UAAU,EAAE,IAAI;IAChB,cAAc,EAAE,IAAI;IACpB,uBAAuB,EAAE,KAAK;IAC9B,QAAQ,EAAE,iBAAiB;IAC3B,IAAI,EAAE,eAAe;IACrB,MAAM,EAAE,iBAAiB;CAC1B,CAAC,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ProcessingOperatorUISettingsFormProps } from '@zakodium/nmrium-core';
|
|
2
|
+
export declare function ZeroFillingTopBar(props: ProcessingOperatorUISettingsFormProps<'@zakodium/nmrium-core-plugins#zeroFilling1D'>): import("react").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=zero_filling_topbar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zero_filling_topbar.d.ts","sourceRoot":"","sources":["../../../../src/plugins/spectrum_1d_processings_ui/operators/zero_filling_topbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,uBAAuB,CAAC;AAMnF,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,qCAAqC,CAAC,6CAA6C,CAAC,+BAoB5F"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { HorizontalAppForm } from "../utils/horizontal_app_form.js";
|
|
3
|
+
import { useZeroFillingForm } from "./zero_filling.hook.js";
|
|
4
|
+
export function ZeroFillingTopBar(props) {
|
|
5
|
+
const { children } = props;
|
|
6
|
+
const { form, options } = useZeroFillingForm(props);
|
|
7
|
+
const { AppField, SubmitButton } = form;
|
|
8
|
+
return (_jsxs(HorizontalAppForm, { form: form, layout: "inline", children: [_jsx(AppField, { name: "size", children: ({ Select }) => _jsx(Select, { label: "Size", items: options }) }), children(_jsx(SubmitButton, { variant: "outlined", size: "small", intent: "success", children: "Apply" }))] }));
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=zero_filling_topbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zero_filling_topbar.js","sourceRoot":"","sources":["../../../../src/plugins/spectrum_1d_processings_ui/operators/zero_filling_topbar.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAkC,CAAC;AAErE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,MAAM,UAAU,iBAAiB,CAC/B,KAA2F;IAE3F,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAE3B,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACpD,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC;IAExC,OAAO,CACL,MAAC,iBAAiB,IAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAC,QAAQ,aAC5C,KAAC,QAAQ,IAAC,IAAI,EAAC,MAAM,YAClB,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,KAAC,MAAM,IAAC,KAAK,EAAC,MAAM,EAAC,KAAK,EAAE,OAAO,GAAI,GAC/C,EAEV,QAAQ,CACP,KAAC,YAAY,IAAC,OAAO,EAAC,UAAU,EAAC,IAAI,EAAC,OAAO,EAAC,MAAM,EAAC,SAAS,sBAE/C,CAChB,IACiB,CACrB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare const HorizontalAppForm: import("@emotion/styled").StyledComponent<Omit<import("react").PropsWithChildren<NoInfer<import("react-science/ui").AppFormProps> & {
|
|
2
|
+
form: import("@tanstack/react-form").AppFieldExtendedReactFormApi<any, any, any, import("@tanstack/form-core").FormAsyncValidateOrFn<any> | undefined, any, import("@tanstack/form-core").FormAsyncValidateOrFn<any> | undefined, any, import("@tanstack/form-core").FormAsyncValidateOrFn<any> | undefined, any, import("@tanstack/form-core").FormAsyncValidateOrFn<any> | undefined, import("@tanstack/form-core").FormAsyncValidateOrFn<any> | undefined, any, {
|
|
3
|
+
readonly Input: typeof import("react-science/ui").Input;
|
|
4
|
+
readonly NumericInput: typeof import("react-science/ui").NumericInput;
|
|
5
|
+
readonly Checkbox: typeof import("react-science/ui").Checkbox;
|
|
6
|
+
readonly Select: typeof import("react-science/ui").Select;
|
|
7
|
+
readonly Switch: typeof import("react-science/ui").Switch;
|
|
8
|
+
readonly ColorPicker: typeof import("react-science/ui").ColorPicker;
|
|
9
|
+
readonly RadioGroup: typeof import("react-science/ui").RadioGroup;
|
|
10
|
+
readonly DraggableNumericInput: typeof import("react-science/ui").DraggableNumericInput;
|
|
11
|
+
}, {
|
|
12
|
+
readonly SubmitButton: typeof import("react-science/ui").SubmitButton;
|
|
13
|
+
readonly ResetButton: typeof import("react-science/ui").ResetButton;
|
|
14
|
+
readonly Section: typeof import("react-science/ui").Section;
|
|
15
|
+
}>;
|
|
16
|
+
}>, "form"> & {
|
|
17
|
+
form: Omit<import("@tanstack/react-form").AppFieldExtendedReactFormApi<any, any, any, import("@tanstack/form-core").FormAsyncValidateOrFn<any> | undefined, any, import("@tanstack/form-core").FormAsyncValidateOrFn<any> | undefined, any, import("@tanstack/form-core").FormAsyncValidateOrFn<any> | undefined, any, import("@tanstack/form-core").FormAsyncValidateOrFn<any> | undefined, import("@tanstack/form-core").FormAsyncValidateOrFn<any> | undefined, any, {
|
|
18
|
+
readonly Input: typeof import("react-science/ui").Input;
|
|
19
|
+
readonly NumericInput: typeof import("react-science/ui").NumericInput;
|
|
20
|
+
readonly Checkbox: typeof import("react-science/ui").Checkbox;
|
|
21
|
+
readonly Select: typeof import("react-science/ui").Select;
|
|
22
|
+
readonly Switch: typeof import("react-science/ui").Switch;
|
|
23
|
+
readonly ColorPicker: typeof import("react-science/ui").ColorPicker;
|
|
24
|
+
readonly RadioGroup: typeof import("react-science/ui").RadioGroup;
|
|
25
|
+
readonly DraggableNumericInput: typeof import("react-science/ui").DraggableNumericInput;
|
|
26
|
+
}, {
|
|
27
|
+
readonly SubmitButton: typeof import("react-science/ui").SubmitButton;
|
|
28
|
+
readonly ResetButton: typeof import("react-science/ui").ResetButton;
|
|
29
|
+
readonly Section: typeof import("react-science/ui").Section;
|
|
30
|
+
}>, "pushFieldValue" | "insertFieldValue" | "replaceFieldValue">;
|
|
31
|
+
} & {
|
|
32
|
+
theme?: import("@emotion/react").Theme;
|
|
33
|
+
}, {}, {}>;
|
|
34
|
+
//# sourceMappingURL=horizontal_app_form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"horizontal_app_form.d.ts","sourceRoot":"","sources":["../../../../src/plugins/spectrum_1d_processings_ui/utils/horizontal_app_form.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAoB7B,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Classes } from '@blueprintjs/core';
|
|
2
|
+
import styled from '@emotion/styled';
|
|
3
|
+
import { AppForm } from 'react-science/ui';
|
|
4
|
+
export const HorizontalAppForm = styled(AppForm) `
|
|
5
|
+
display: contents;
|
|
6
|
+
|
|
7
|
+
.${Classes.FORM_GROUP} {
|
|
8
|
+
min-height: unset;
|
|
9
|
+
width: unset;
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: row;
|
|
12
|
+
align-items: center;
|
|
13
|
+
gap: 5px;
|
|
14
|
+
|
|
15
|
+
> :not(.${Classes.LABEL}) {
|
|
16
|
+
min-width: unset;
|
|
17
|
+
width: unset;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.${Classes.INPUT} {
|
|
21
|
+
width: 5em;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
25
|
+
//# sourceMappingURL=horizontal_app_form.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"horizontal_app_form.js","sourceRoot":"","sources":["../../../../src/plugins/spectrum_1d_processings_ui/utils/horizontal_app_form.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA;;;KAG3C,OAAO,CAAC,UAAU;;;;;;;;cAQT,OAAO,CAAC,KAAK;;;;;OAKpB,OAAO,CAAC,KAAK;;;;CAInB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zakodium/nmrium-core-plugins-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.33",
|
|
4
4
|
"license": "CC-BY-NC-SA-4.0",
|
|
5
5
|
"description": "UI related plugins needed for cheminfo/nmrium",
|
|
6
6
|
"keywords": [],
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"typescript": "~6.0.3",
|
|
45
45
|
"vitest": "^4.1.10"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "9923521b72b11cd934452efc4a84cffeaf1c5e2c"
|
|
48
48
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Classes } from '@blueprintjs/core';
|
|
2
|
-
import styled from '@emotion/styled';
|
|
3
1
|
import type { ProcessingOperatorUISettingsFormProps } from '@zakodium/nmrium-core';
|
|
4
|
-
|
|
2
|
+
|
|
3
|
+
import { HorizontalAppForm } from '../utils/horizontal_app_form.tsx';
|
|
5
4
|
|
|
6
5
|
import { useApodizationForm } from './apodization.hook.ts';
|
|
7
6
|
|
|
@@ -9,8 +8,8 @@ export function ApodizationTopBar(
|
|
|
9
8
|
props: ProcessingOperatorUISettingsFormProps<'@zakodium/nmrium-core-plugins#apodization1D'>,
|
|
10
9
|
) {
|
|
11
10
|
const { children } = props;
|
|
12
|
-
const form = useApodizationForm(props);
|
|
13
11
|
|
|
12
|
+
const form = useApodizationForm(props);
|
|
14
13
|
const { AppField, SubmitButton, Subscribe } = form;
|
|
15
14
|
|
|
16
15
|
return (
|
|
@@ -40,25 +39,3 @@ export function ApodizationTopBar(
|
|
|
40
39
|
</HorizontalAppForm>
|
|
41
40
|
);
|
|
42
41
|
}
|
|
43
|
-
|
|
44
|
-
const HorizontalAppForm = styled(AppForm)`
|
|
45
|
-
display: contents;
|
|
46
|
-
|
|
47
|
-
.${Classes.FORM_GROUP} {
|
|
48
|
-
min-height: unset;
|
|
49
|
-
width: unset;
|
|
50
|
-
display: flex;
|
|
51
|
-
flex-direction: row;
|
|
52
|
-
align-items: center;
|
|
53
|
-
gap: 5px;
|
|
54
|
-
|
|
55
|
-
> :not(.${Classes.LABEL}) {
|
|
56
|
-
min-width: unset;
|
|
57
|
-
width: unset;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.${Classes.INPUT} {
|
|
61
|
-
width: 5em;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
`;
|
|
@@ -2,6 +2,7 @@ import { defineProcessingOperatorUI } from '@zakodium/nmrium-core';
|
|
|
2
2
|
|
|
3
3
|
import { ZeroFillingExpand } from './zero_filling_expand.tsx';
|
|
4
4
|
import { ZeroFillingTool } from './zero_filling_tool.tsx';
|
|
5
|
+
import { ZeroFillingTopBar } from './zero_filling_topbar.tsx';
|
|
5
6
|
|
|
6
7
|
export const zeroFilling1D = defineProcessingOperatorUI({
|
|
7
8
|
id: '@zakodium/nmrium-core-plugins#zeroFilling1D',
|
|
@@ -11,4 +12,5 @@ export const zeroFilling1D = defineProcessingOperatorUI({
|
|
|
11
12
|
defaultShouldProcessAll: false,
|
|
12
13
|
Expanded: ZeroFillingExpand,
|
|
13
14
|
Tool: ZeroFillingTool,
|
|
15
|
+
TopBar: ZeroFillingTopBar,
|
|
14
16
|
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ProcessingOperatorUISettingsFormProps } from '@zakodium/nmrium-core';
|
|
2
|
+
|
|
3
|
+
import { HorizontalAppForm } from '../utils/horizontal_app_form.tsx';
|
|
4
|
+
|
|
5
|
+
import { useZeroFillingForm } from './zero_filling.hook.ts';
|
|
6
|
+
|
|
7
|
+
export function ZeroFillingTopBar(
|
|
8
|
+
props: ProcessingOperatorUISettingsFormProps<'@zakodium/nmrium-core-plugins#zeroFilling1D'>,
|
|
9
|
+
) {
|
|
10
|
+
const { children } = props;
|
|
11
|
+
|
|
12
|
+
const { form, options } = useZeroFillingForm(props);
|
|
13
|
+
const { AppField, SubmitButton } = form;
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<HorizontalAppForm form={form} layout="inline">
|
|
17
|
+
<AppField name="size">
|
|
18
|
+
{({ Select }) => <Select label="Size" items={options} />}
|
|
19
|
+
</AppField>
|
|
20
|
+
|
|
21
|
+
{children(
|
|
22
|
+
<SubmitButton variant="outlined" size="small" intent="success">
|
|
23
|
+
Apply
|
|
24
|
+
</SubmitButton>,
|
|
25
|
+
)}
|
|
26
|
+
</HorizontalAppForm>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Classes } from '@blueprintjs/core';
|
|
2
|
+
import styled from '@emotion/styled';
|
|
3
|
+
import { AppForm } from 'react-science/ui';
|
|
4
|
+
|
|
5
|
+
export const HorizontalAppForm = styled(AppForm)`
|
|
6
|
+
display: contents;
|
|
7
|
+
|
|
8
|
+
.${Classes.FORM_GROUP} {
|
|
9
|
+
min-height: unset;
|
|
10
|
+
width: unset;
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: row;
|
|
13
|
+
align-items: center;
|
|
14
|
+
gap: 5px;
|
|
15
|
+
|
|
16
|
+
> :not(.${Classes.LABEL}) {
|
|
17
|
+
min-width: unset;
|
|
18
|
+
width: unset;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.${Classes.INPUT} {
|
|
22
|
+
width: 5em;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
`;
|