1- import  { trans }  from  'i18n' ; 
2- import  { Section ,  sectionNames }  from  'lowcoder-design' ; 
3- import  { numberExposingStateControl }  from  '../../controls/codeStateControl' ; 
4- import  { UICompBuilder }  from  '../../generators' ; 
5- import  { 
6-   CommonNameConfig , 
7-   NameConfig , 
8-   withExposingConfigs , 
9- }  from  '../../generators/withExposing' ; 
10- import  { 
11-   formDataChildren , 
12-   FormDataPropertyView , 
13- }  from  '../formComp/formDataConstants' ; 
14- import  { 
15-   SliderChildren , 
16-   SliderPropertyView , 
17-   SliderStyled , 
18-   SliderWrapper , 
19- }  from  './sliderCompConstants' ; 
20- import  { hasIcon }  from  'comps/utils' ; 
21- import  { BoolControl }  from  'comps/controls/boolControl' ; 
1+ import  {  trans  }  from  "i18n" ; 
2+ import  {  Section ,  sectionNames  }  from  "lowcoder-design" ; 
3+ import  {  numberExposingStateControl  }  from  "../../controls/codeStateControl" ; 
4+ import  {  UICompBuilder  }  from  "../../generators" ; 
5+ import  {  CommonNameConfig ,  NameConfig ,  withExposingConfigs  }  from  "../../generators/withExposing" ; 
6+ import  {  formDataChildren ,  FormDataPropertyView  }  from  "../formComp/formDataConstants" ; 
7+ import  {  SliderChildren ,  SliderPropertyView ,  SliderStyled ,  SliderWrapper  }  from  "./sliderCompConstants" ; 
8+ import  {  hasIcon  }  from  "comps/utils" ; 
9+ import  {  BoolControl  }  from  "comps/controls/boolControl" ; 
2210
2311const  SliderBasicComp  =  ( function  ( )  { 
2412  /** 
2513   * FIXME: the range of setValue cannot exceed max 
2614   */ 
2715  const  childrenMap  =  { 
2816    ...SliderChildren , 
29-     value : numberExposingStateControl ( ' value' ,  60 ) , 
17+     value : numberExposingStateControl ( " value" ,  60 ) , 
3018    vertical : BoolControl , 
3119    ...formDataChildren , 
3220  } ; 
3321  return  new  UICompBuilder ( childrenMap ,  ( props )  =>  { 
3422    return  props . label ( { 
3523      style : props . style , 
3624      labelStyle : props . labelStyle , 
37-       inputFieldStyle :  props . inputFieldStyle , 
38-       animationStyle :  props . animationStyle , 
25+       inputFieldStyle :props . inputFieldStyle , 
26+       animationStyle :props . animationStyle , 
3927      children : ( 
4028        < SliderWrapper 
41-           $style = { props . inputFieldStyle } 
4229          vertical = { props . vertical } 
4330          onMouseDown = { ( e : any )  =>  { 
4431            e . stopPropagation ( ) ; 
@@ -54,7 +41,7 @@ const SliderBasicComp = (function () {
5441            vertical = { props . vertical  ||  false } 
5542            onChange = { ( e )  =>  { 
5643              props . value . onChange ( e ) ; 
57-               props . onEvent ( ' change' ) ; 
44+               props . onEvent ( " change" ) ; 
5845            } } 
5946          /> 
6047          { hasIcon ( props . suffixIcon )  &&  props . suffixIcon } 
@@ -66,14 +53,14 @@ const SliderBasicComp = (function () {
6653      return  ( 
6754        < > 
6855          < Section  name = { sectionNames . basic } > 
69-             { children . value . propertyView ( { label : trans ( ' prop.defaultValue' ) } ) } 
70-             { children . max . propertyView ( { label : trans ( ' prop.maximum' ) } ) } 
71-             { children . min . propertyView ( { label : trans ( ' prop.minimum' ) } ) } 
56+             { children . value . propertyView ( {   label : trans ( " prop.defaultValue" )   } ) } 
57+             { children . max . propertyView ( {   label : trans ( " prop.maximum" )   } ) } 
58+             { children . min . propertyView ( {   label : trans ( " prop.minimum" )   } ) } 
7259            { children . step . propertyView ( { 
73-               label : trans ( ' slider.step' ) , 
74-               tooltip : trans ( ' slider.stepTooltip' ) , 
60+               label : trans ( " slider.step" ) , 
61+               tooltip : trans ( " slider.stepTooltip" ) , 
7562            } ) } 
76-             { children . vertical . propertyView ( { label : trans ( ' slider.vertical' ) } ) } 
63+             { children . vertical . propertyView ( {   label : trans ( " slider.vertical" )   } ) } 
7764          </ Section > 
7865          < FormDataPropertyView  { ...children }  /> 
7966          < SliderPropertyView  { ...children }  /> 
@@ -84,8 +71,8 @@ const SliderBasicComp = (function () {
8471} ) ( ) ; 
8572
8673export  const  SliderComp  =  withExposingConfigs ( SliderBasicComp ,  [ 
87-   new  NameConfig ( ' value' ,  trans ( ' export.sliderValueDesc' ) ) , 
88-   new  NameConfig ( ' max' ,  trans ( ' export.sliderMaxValueDesc' ) ) , 
89-   new  NameConfig ( ' min' ,  trans ( ' export.sliderMinValueDesc' ) ) , 
74+   new  NameConfig ( " value" ,  trans ( " export.sliderValueDesc" ) ) , 
75+   new  NameConfig ( " max" ,  trans ( " export.sliderMaxValueDesc" ) ) , 
76+   new  NameConfig ( " min" ,  trans ( " export.sliderMinValueDesc" ) ) , 
9077  ...CommonNameConfig , 
9178] ) ; 
0 commit comments