@@ -3,12 +3,12 @@ import {
3
3
NameConfigPlaceHolder ,
4
4
NameConfigRequired ,
5
5
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" ;
12
12
import {
13
13
fixOldInputCompData ,
14
14
getStyle ,
@@ -18,36 +18,27 @@ import {
18
18
TextInputInteractionSection ,
19
19
TextInputValidationSection ,
20
20
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" ;
36
27
import {
37
28
allowClearPropertyView ,
38
29
hiddenPropertyView ,
39
30
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" ;
45
36
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" ;
49
40
50
- const TextAreaStyled = styled ( TextArea ) < {
41
+ const TextAreaStyled = styled ( TextArea ) < {
51
42
$style : InputLikeStyleType ;
52
43
} > `
53
44
${ ( props ) => props . $style && getStyle ( props . $style ) }
@@ -57,9 +48,9 @@ const Wrapper = styled.div<{
57
48
$style : InputLikeStyleType ;
58
49
} > `
59
50
height: 100% !important;
60
-
61
- .ant-input {
62
- height: 100% !important;
51
+
52
+ .ant-input {
53
+ height:100% !important;
63
54
}
64
55
65
56
.ant-input-clear-icon {
@@ -79,24 +70,24 @@ let TextAreaTmpComp = (function () {
79
70
...textInputChildren ,
80
71
viewRef : RefControl < TextAreaRef > ,
81
72
allowClear : BoolControl ,
82
- autoHeight : withDefault ( AutoHeightControl , ' fixed' ) ,
73
+ autoHeight : withDefault ( AutoHeightControl , " fixed" ) ,
83
74
style : withDefault ( styleControl ( InputFieldStyle ) , { borderWidth : '1px' } ) ,
84
75
labelStyle : styleControl ( LabelStyle ) ,
85
76
inputFieldStyle : styleControl ( InputLikeStyle ) ,
86
- animationStyle : styleControl ( AnimationStyle ) ,
77
+ animationStyle : styleControl ( AnimationStyle )
87
78
} ;
88
79
return new UICompBuilder ( childrenMap , ( props ) => {
89
80
const [ inputProps , validateState ] = useTextInputProps ( props ) ;
90
81
return props . label ( {
91
82
required : props . required ,
92
- inputFieldStyle : props . inputFieldStyle ,
83
+ inputFieldStyle :props . inputFieldStyle ,
93
84
children : (
94
85
< Wrapper $style = { props . inputFieldStyle } >
95
86
< TextAreaStyled
96
87
{ ...inputProps }
97
88
ref = { props . viewRef }
98
89
allowClear = { props . allowClear }
99
- style = { { height : ' 100% !important' , resize : ' vertical' } }
90
+ style = { { height : " 100% !important" , resize : " vertical" } }
100
91
$style = { props . inputFieldStyle }
101
92
/>
102
93
</ Wrapper >
@@ -112,15 +103,12 @@ let TextAreaTmpComp = (function () {
112
103
< TextInputBasicSection { ...children } />
113
104
< FormDataPropertyView { ...children } />
114
105
115
- { [ ' layout' , ' both' ] . includes (
116
- useContext ( EditorContext ) . editorModeStatus
117
- ) && children . label . getPropertyView ( ) }
106
+ { [ " layout" , " both" ] . includes ( useContext ( EditorContext ) . editorModeStatus ) && (
107
+ children . label . getPropertyView ( )
108
+ ) }
118
109
119
- { [ 'logic' , 'both' ] . includes (
120
- useContext ( EditorContext ) . editorModeStatus
121
- ) && (
122
- < >
123
- < TextInputInteractionSection { ...children } />
110
+ { [ "logic" , "both" ] . includes ( useContext ( EditorContext ) . editorModeStatus ) && (
111
+ < > < TextInputInteractionSection { ...children } />
124
112
< Section name = { sectionNames . layout } >
125
113
{ children . autoHeight . getPropertyView ( ) }
126
114
{ hiddenPropertyView ( children ) }
@@ -129,26 +117,15 @@ let TextAreaTmpComp = (function () {
129
117
{ allowClearPropertyView ( children ) }
130
118
{ readOnlyPropertyView ( children ) }
131
119
</ Section >
132
- < TextInputValidationSection { ...children } />
133
- </ >
120
+ < TextInputValidationSection { ...children } /> </ >
134
121
) }
135
122
136
- { [ 'layout' , 'both' ] . includes (
137
- useContext ( EditorContext ) . editorModeStatus
138
- ) && (
123
+ { [ "layout" , "both" ] . includes ( useContext ( EditorContext ) . editorModeStatus ) && (
139
124
< >
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 >
152
129
</ >
153
130
) }
154
131
</ >
@@ -170,7 +147,7 @@ const TextareaTmp2Comp = withMethodExposing(
170
147
) ;
171
148
172
149
export const TextAreaComp = withExposingConfigs ( TextareaTmp2Comp , [
173
- new NameConfig ( ' value' , trans ( ' export.inputValueDesc' ) ) ,
150
+ new NameConfig ( " value" , trans ( " export.inputValueDesc" ) ) ,
174
151
NameConfigPlaceHolder ,
175
152
NameConfigRequired ,
176
153
...TextInputConfigs ,
0 commit comments