Skip to content

Commit 23ed72f

Browse files
committed
formating removed-76
1 parent 698c72f commit 23ed72f

File tree

1 file changed

+40
-63
lines changed

1 file changed

+40
-63
lines changed

client/packages/lowcoder/src/comps/comps/textInputComp/textAreaComp.tsx

Lines changed: 40 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import {
33
NameConfigPlaceHolder,
44
NameConfigRequired,
55
withExposingConfigs,
6-
} from 'comps/generators/withExposing';
7-
import {Section, sectionNames} from 'lowcoder-design';
8-
import {BoolControl} from '../../controls/boolControl';
9-
import {AutoHeightControl} from '../../controls/autoHeightControl';
10-
import {UICompBuilder, withDefault} from '../../generators';
11-
import {FormDataPropertyView} from '../formComp/formDataConstants';
6+
} from "comps/generators/withExposing";
7+
import { Section, sectionNames } from "lowcoder-design";
8+
import { BoolControl } from "../../controls/boolControl";
9+
import { AutoHeightControl } from "../../controls/autoHeightControl";
10+
import { UICompBuilder, withDefault } from "../../generators";
11+
import { FormDataPropertyView } from "../formComp/formDataConstants";
1212
import {
1313
fixOldInputCompData,
1414
getStyle,
@@ -18,36 +18,27 @@ import {
1818
TextInputInteractionSection,
1919
TextInputValidationSection,
2020
useTextInputProps,
21-
} from './textInputConstants';
22-
import {
23-
withMethodExposing,
24-
refMethods,
25-
} from '../../generators/withMethodExposing';
26-
import {styleControl} from 'comps/controls/styleControl';
27-
import styled from 'styled-components';
28-
import {
29-
AnimationStyle,
30-
InputFieldStyle,
31-
InputLikeStyle,
32-
InputLikeStyleType,
33-
LabelStyle,
34-
} from 'comps/controls/styleControlConstants';
35-
import {TextArea} from 'components/TextArea';
21+
} from "./textInputConstants";
22+
import { withMethodExposing, refMethods } from "../../generators/withMethodExposing";
23+
import { styleControl } from "comps/controls/styleControl";
24+
import styled from "styled-components";
25+
import { AnimationStyle, InputFieldStyle, InputLikeStyle, InputLikeStyleType, LabelStyle } from "comps/controls/styleControlConstants";
26+
import { TextArea } from "components/TextArea";
3627
import {
3728
allowClearPropertyView,
3829
hiddenPropertyView,
3930
readOnlyPropertyView,
40-
} from 'comps/utils/propertyUtils';
41-
import {trans} from 'i18n';
42-
import {RefControl} from 'comps/controls/refControl';
43-
import {TextAreaRef} from 'antd/es/input/TextArea';
44-
import {blurMethod, focusWithOptions} from 'comps/utils/methodUtils';
31+
} from "comps/utils/propertyUtils";
32+
import { trans } from "i18n";
33+
import { RefControl } from "comps/controls/refControl";
34+
import { TextAreaRef } from "antd/es/input/TextArea";
35+
import { blurMethod, focusWithOptions } from "comps/utils/methodUtils";
4536

46-
import React, {useContext} from 'react';
47-
import {EditorContext} from 'comps/editorState';
48-
import {migrateOldData} from 'comps/generators/simpleGenerators';
37+
import React, { useContext } from "react";
38+
import { EditorContext } from "comps/editorState";
39+
import { migrateOldData } from "comps/generators/simpleGenerators";
4940

50-
const TextAreaStyled = styled(TextArea)<{
41+
const TextAreaStyled = styled(TextArea) <{
5142
$style: InputLikeStyleType;
5243
}>`
5344
${(props) => props.$style && getStyle(props.$style)}
@@ -57,9 +48,9 @@ const Wrapper = styled.div<{
5748
$style: InputLikeStyleType;
5849
}>`
5950
height: 100% !important;
60-
61-
.ant-input {
62-
height: 100% !important;
51+
52+
.ant-input {
53+
height:100% !important;
6354
}
6455
6556
.ant-input-clear-icon {
@@ -79,24 +70,24 @@ let TextAreaTmpComp = (function () {
7970
...textInputChildren,
8071
viewRef: RefControl<TextAreaRef>,
8172
allowClear: BoolControl,
82-
autoHeight: withDefault(AutoHeightControl, 'fixed'),
73+
autoHeight: withDefault(AutoHeightControl, "fixed"),
8374
style: withDefault(styleControl(InputFieldStyle), {borderWidth: '1px'}),
8475
labelStyle: styleControl(LabelStyle),
8576
inputFieldStyle: styleControl(InputLikeStyle),
86-
animationStyle: styleControl(AnimationStyle),
77+
animationStyle: styleControl(AnimationStyle)
8778
};
8879
return new UICompBuilder(childrenMap, (props) => {
8980
const [inputProps, validateState] = useTextInputProps(props);
9081
return props.label({
9182
required: props.required,
92-
inputFieldStyle: props.inputFieldStyle,
83+
inputFieldStyle:props.inputFieldStyle,
9384
children: (
9485
<Wrapper $style={props.inputFieldStyle}>
9586
<TextAreaStyled
9687
{...inputProps}
9788
ref={props.viewRef}
9889
allowClear={props.allowClear}
99-
style={{height: '100% !important', resize: 'vertical'}}
90+
style={{ height: "100% !important", resize: "vertical" }}
10091
$style={props.inputFieldStyle}
10192
/>
10293
</Wrapper>
@@ -112,15 +103,12 @@ let TextAreaTmpComp = (function () {
112103
<TextInputBasicSection {...children} />
113104
<FormDataPropertyView {...children} />
114105

115-
{['layout', 'both'].includes(
116-
useContext(EditorContext).editorModeStatus
117-
) && children.label.getPropertyView()}
106+
{["layout", "both"].includes(useContext(EditorContext).editorModeStatus) && (
107+
children.label.getPropertyView()
108+
)}
118109

119-
{['logic', 'both'].includes(
120-
useContext(EditorContext).editorModeStatus
121-
) && (
122-
<>
123-
<TextInputInteractionSection {...children} />
110+
{["logic", "both"].includes(useContext(EditorContext).editorModeStatus) && (
111+
<><TextInputInteractionSection {...children} />
124112
<Section name={sectionNames.layout}>
125113
{children.autoHeight.getPropertyView()}
126114
{hiddenPropertyView(children)}
@@ -129,26 +117,15 @@ let TextAreaTmpComp = (function () {
129117
{allowClearPropertyView(children)}
130118
{readOnlyPropertyView(children)}
131119
</Section>
132-
<TextInputValidationSection {...children} />
133-
</>
120+
<TextInputValidationSection {...children} /></>
134121
)}
135122

136-
{['layout', 'both'].includes(
137-
useContext(EditorContext).editorModeStatus
138-
) && (
123+
{["layout", "both"].includes(useContext(EditorContext).editorModeStatus) && (
139124
<>
140-
<Section name={sectionNames.style}>
141-
{children.style.getPropertyView()}
142-
</Section>
143-
<Section name={sectionNames.labelStyle}>
144-
{children.labelStyle.getPropertyView()}
145-
</Section>
146-
<Section name={sectionNames.inputFieldStyle}>
147-
{children.inputFieldStyle.getPropertyView()}
148-
</Section>
149-
<Section name={sectionNames.animationStyle}>
150-
{children.animationStyle.getPropertyView()}
151-
</Section>
125+
<Section name={sectionNames.style}>{children.style.getPropertyView()}</Section>
126+
<Section name={sectionNames.labelStyle}>{children.labelStyle.getPropertyView()}</Section>
127+
<Section name={sectionNames.inputFieldStyle}>{children.inputFieldStyle.getPropertyView()}</Section>
128+
<Section name={sectionNames.animationStyle}>{children.animationStyle.getPropertyView()}</Section>
152129
</>
153130
)}
154131
</>
@@ -170,7 +147,7 @@ const TextareaTmp2Comp = withMethodExposing(
170147
);
171148

172149
export const TextAreaComp = withExposingConfigs(TextareaTmp2Comp, [
173-
new NameConfig('value', trans('export.inputValueDesc')),
150+
new NameConfig("value", trans("export.inputValueDesc")),
174151
NameConfigPlaceHolder,
175152
NameConfigRequired,
176153
...TextInputConfigs,

0 commit comments

Comments
 (0)