1
- import { default as Progress } from 'antd/es/progress' ;
2
- import { styleControl } from 'comps/controls/styleControl' ;
3
- import {
4
- AnimationStyle ,
5
- AnimationStyleType ,
6
- CircleProgressStyle ,
7
- CircleProgressType ,
8
- heightCalculator ,
9
- widthCalculator ,
10
- } from 'comps/controls/styleControlConstants' ;
11
- import styled , { css } from 'styled-components' ;
12
- import { Section , sectionNames } from 'lowcoder-design' ;
13
- import { numberExposingStateControl } from '../controls/codeStateControl' ;
14
- import { UICompBuilder } from '../generators' ;
15
- import {
16
- NameConfig ,
17
- NameConfigHidden ,
18
- withExposingConfigs ,
19
- } from '../generators/withExposing' ;
20
- import { hiddenPropertyView } from 'comps/utils/propertyUtils' ;
21
- import { trans } from 'i18n' ;
1
+ import { default as Progress } from "antd/es/progress" ;
2
+ import { styleControl } from "comps/controls/styleControl" ;
3
+ import { AnimationStyle , AnimationStyleType , CircleProgressStyle , CircleProgressType , heightCalculator , widthCalculator } from "comps/controls/styleControlConstants" ;
4
+ import styled , { css } from "styled-components" ;
5
+ import { Section , sectionNames } from "lowcoder-design" ;
6
+ import { numberExposingStateControl } from "../controls/codeStateControl" ;
7
+ import { UICompBuilder } from "../generators" ;
8
+ import { NameConfig , NameConfigHidden , withExposingConfigs } from "../generators/withExposing" ;
9
+ import { hiddenPropertyView } from "comps/utils/propertyUtils" ;
10
+ import { trans } from "i18n" ;
22
11
23
- import { useContext } from ' react' ;
24
- import { EditorContext } from ' comps/editorState' ;
12
+ import { useContext } from " react" ;
13
+ import { EditorContext } from " comps/editorState" ;
25
14
26
15
// TODO: after Update of ANTd, introduce Size attribute to ProgressCircle
27
16
28
17
const getStyle = ( style : CircleProgressType ) => {
29
18
return css `
30
- width : ${ widthCalculator ( style . margin ) } ;
31
- height : ${ heightCalculator ( style . margin ) } ;
32
- margin : ${ style . margin } ;
19
+ width : ${ widthCalculator ( style . margin ) } ;
20
+ height : ${ heightCalculator ( style . margin ) } ;
21
+ margin : ${ style . margin } ;
33
22
padding : ${ style . padding } ;
34
- border-radius : ${ style . radius } ;
23
+ border-radius : ${ style . radius } ;
35
24
.ant-progress-text {
36
25
color : ${ style . text } !important ;
37
- font-family : ${ style . fontFamily } ;
38
- font-style : ${ style . fontStyle } ;
39
- font-size : ${ style . textSize } !important ;
40
- font-weight : ${ style . textWeight } ;
26
+ font-family : ${ style . fontFamily } ;
27
+ font-style : ${ style . fontStyle } ;
28
+ font-size : ${ style . textSize } !important ;
29
+ font-weight : ${ style . textWeight } ;
41
30
}
42
31
.ant-progress-circle-trail {
43
32
stroke : ${ style . track } ;
@@ -98,30 +87,26 @@ let ProgressCircleTmpComp = (function () {
98
87
< >
99
88
< Section name = { sectionNames . basic } >
100
89
{ children . value . propertyView ( {
101
- label : trans ( ' progress.value' ) ,
102
- tooltip : trans ( ' progress.valueTooltip' ) ,
90
+ label : trans ( " progress.value" ) ,
91
+ tooltip : trans ( " progress.valueTooltip" ) ,
103
92
} ) }
104
93
</ Section >
105
94
106
- { [ 'logic' , 'both' ] . includes (
107
- useContext ( EditorContext ) . editorModeStatus
108
- ) && (
95
+ { [ "logic" , "both" ] . includes ( useContext ( EditorContext ) . editorModeStatus ) && (
109
96
< Section name = { sectionNames . interaction } >
110
97
{ hiddenPropertyView ( children ) }
111
98
</ Section >
112
99
) }
113
100
114
- { [ 'layout' , 'both' ] . includes (
115
- useContext ( EditorContext ) . editorModeStatus
116
- ) && (
101
+ { [ "layout" , "both" ] . includes ( useContext ( EditorContext ) . editorModeStatus ) && (
117
102
< >
118
103
< Section name = { sectionNames . style } >
119
- { children . style . getPropertyView ( ) }
104
+ { children . style . getPropertyView ( ) }
120
105
</ Section >
121
106
< Section name = { sectionNames . animationStyle } >
122
- { children . animationStyle . getPropertyView ( ) }
107
+ { children . animationStyle . getPropertyView ( ) }
123
108
</ Section >
124
- </ >
109
+ </ >
125
110
) }
126
111
</ >
127
112
) ;
@@ -136,6 +121,6 @@ ProgressCircleTmpComp = class extends ProgressCircleTmpComp {
136
121
} ;
137
122
138
123
export const ProgressCircleComp = withExposingConfigs ( ProgressCircleTmpComp , [
139
- new NameConfig ( ' value' , trans ( ' progress.valueDesc' ) ) ,
124
+ new NameConfig ( " value" , trans ( " progress.valueDesc" ) ) ,
140
125
NameConfigHidden ,
141
126
] ) ;
0 commit comments