Skip to content

Commit 79a7d59

Browse files
committed
formating removed-64
1 parent c2ad3aa commit 79a7d59

File tree

1 file changed

+44
-68
lines changed

1 file changed

+44
-68
lines changed

client/packages/lowcoder/src/comps/comps/selectInputComp/radioCompConstants.tsx

Lines changed: 44 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,32 @@
1-
import {RecordConstructorToComp} from 'lowcoder-core';
2-
import {BoolCodeControl} from '../../controls/codeControl';
3-
import {LabelControl} from '../../controls/labelControl';
1+
import { RecordConstructorToComp } from "lowcoder-core";
2+
import { BoolCodeControl } from "../../controls/codeControl";
3+
import { LabelControl } from "../../controls/labelControl";
44
import {
55
arrayStringExposingStateControl,
66
stringExposingStateControl,
7-
} from '../../controls/codeStateControl';
8-
import {Section, sectionNames} from 'lowcoder-design';
9-
import {SelectInputOptionControl} from '../../controls/optionsControl';
10-
import {ChangeEventHandlerControl} from '../../controls/eventHandlerControl';
7+
} from "../../controls/codeStateControl";
8+
import { Section, sectionNames } from "lowcoder-design";
9+
import { SelectInputOptionControl } from "../../controls/optionsControl";
10+
import { ChangeEventHandlerControl } from "../../controls/eventHandlerControl";
1111
import {
1212
SelectInputValidationChildren,
1313
SelectInputValidationSection,
14-
} from './selectInputConstants';
15-
import {
16-
formDataChildren,
17-
FormDataPropertyView,
18-
} from '../formComp/formDataConstants';
19-
import {styleControl} from 'comps/controls/styleControl';
20-
import {
21-
AnimationStyle,
22-
InputFieldStyle,
23-
LabelStyle,
24-
RadioStyle,
25-
} from 'comps/controls/styleControlConstants';
26-
import {dropdownControl} from '../../controls/dropdownControl';
27-
import {
28-
hiddenPropertyView,
29-
disabledPropertyView,
30-
} from 'comps/utils/propertyUtils';
31-
import {trans} from 'i18n';
32-
import {RefControl} from 'comps/controls/refControl';
14+
} from "./selectInputConstants";
15+
import { formDataChildren, FormDataPropertyView } from "../formComp/formDataConstants";
16+
import { styleControl } from "comps/controls/styleControl";
17+
import { AnimationStyle, InputFieldStyle, LabelStyle, RadioStyle } from "comps/controls/styleControlConstants";
18+
import { dropdownControl } from "../../controls/dropdownControl";
19+
import { hiddenPropertyView, disabledPropertyView } from "comps/utils/propertyUtils";
20+
import { trans } from "i18n";
21+
import { RefControl } from "comps/controls/refControl";
3322

34-
import {useContext} from 'react';
35-
import {EditorContext} from 'comps/editorState';
23+
import { useContext } from "react";
24+
import { EditorContext } from "comps/editorState";
3625

3726
export const RadioLayoutOptions = [
38-
{label: trans('radio.horizontal'), value: 'horizontal'},
39-
{label: trans('radio.vertical'), value: 'vertical'},
40-
{label: trans('radio.autoColumns'), value: 'auto_columns'},
27+
{ label: trans("radio.horizontal"), value: "horizontal" },
28+
{ label: trans("radio.vertical"), value: "vertical" },
29+
{ label: trans("radio.autoColumns"), value: "auto_columns" },
4130
] as const;
4231

4332
export const RadioChildrenMap = {
@@ -59,7 +48,7 @@ export const RadioChildrenMap = {
5948

6049
export const RadioPropertyView = (
6150
children: RecordConstructorToComp<
62-
typeof RadioChildrenMap & {hidden: typeof BoolCodeControl} & {
51+
typeof RadioChildrenMap & { hidden: typeof BoolCodeControl } & {
6352
defaultValue:
6453
| ReturnType<typeof stringExposingStateControl>
6554
| ReturnType<typeof arrayStringExposingStateControl>;
@@ -72,57 +61,44 @@ export const RadioPropertyView = (
7261
<>
7362
<Section name={sectionNames.basic}>
7463
{children.options.propertyView({})}
75-
{children.defaultValue.propertyView({label: trans('prop.defaultValue')})}
64+
{children.defaultValue.propertyView({ label: trans("prop.defaultValue") })}
7665
</Section>
7766

78-
{['logic', 'both'].includes(useContext(EditorContext).editorModeStatus) && (
79-
<>
80-
<SelectInputValidationSection {...children} />
81-
<FormDataPropertyView {...children} />
82-
<Section name={sectionNames.interaction}>
83-
{children.onEvent.getPropertyView()}
84-
{disabledPropertyView(children)}
85-
{hiddenPropertyView(children)}
86-
</Section>
87-
</>
67+
{["logic", "both"].includes(useContext(EditorContext).editorModeStatus) && (
68+
<><SelectInputValidationSection {...children} />
69+
<FormDataPropertyView {...children} />
70+
<Section name={sectionNames.interaction}>
71+
{children.onEvent.getPropertyView()}
72+
{disabledPropertyView(children)}
73+
{hiddenPropertyView(children)}
74+
</Section></>
8875
)}
8976

90-
{['layout', 'both'].includes(
91-
useContext(EditorContext).editorModeStatus
92-
) && (
77+
{["layout", "both"].includes(useContext(EditorContext).editorModeStatus) && (
9378
<Section name={sectionNames.layout}>
9479
{children.layout.propertyView({
95-
label: trans('radio.options'),
80+
label: trans("radio.options"),
9681
tooltip: (
97-
<div style={{display: 'flex', flexDirection: 'column', gap: '8px'}}>
98-
<div>{trans('radio.horizontalTooltip')}</div>
99-
<div>{trans('radio.verticalTooltip')}</div>
100-
<div>{trans('radio.autoColumnsTooltip')}</div>
82+
<div style={{ display: "flex", flexDirection: "column", gap: "8px" }}>
83+
<div>{trans("radio.horizontalTooltip")}</div>
84+
<div>{trans("radio.verticalTooltip")}</div>
85+
<div>{trans("radio.autoColumnsTooltip")}</div>
10186
</div>
10287
),
10388
})}
10489
</Section>
10590
)}
10691

107-
{['layout', 'both'].includes(useContext(EditorContext).editorModeStatus) &&
108-
children.label.getPropertyView()}
92+
{["layout", "both"].includes(useContext(EditorContext).editorModeStatus) && (
93+
children.label.getPropertyView()
94+
)}
10995

110-
{['layout', 'both'].includes(
111-
useContext(EditorContext).editorModeStatus
112-
) && (
96+
{["layout", "both"].includes(useContext(EditorContext).editorModeStatus) && (
11397
<>
114-
<Section name={sectionNames.style}>
115-
{children.style.getPropertyView()}
116-
</Section>
117-
<Section name={sectionNames.labelStyle}>
118-
{children.labelStyle.getPropertyView()}
119-
</Section>
120-
<Section name={sectionNames.inputFieldStyle}>
121-
{children.inputFieldStyle.getPropertyView()}
122-
</Section>
123-
<Section name={sectionNames.animationStyle}>
124-
{children.animationStyle.getPropertyView()}
125-
</Section>
98+
<Section name={sectionNames.style}>{children.style.getPropertyView()}</Section>
99+
<Section name={sectionNames.labelStyle}>{children.labelStyle.getPropertyView()}</Section>
100+
<Section name={sectionNames.inputFieldStyle}>{children.inputFieldStyle.getPropertyView()}</Section>
101+
<Section name={sectionNames.animationStyle}>{children.animationStyle.getPropertyView()}</Section>
126102
</>
127103
)}
128104
</>

0 commit comments

Comments
 (0)