1- import { Section , sectionNames } from "lowcoder-design" ;
21import { ChildrenTypeToDepsKeys , depsConfig } from "../../generators/withExposing" ;
3- import { BoolControl } from "../../controls/boolControl" ;
4- import { CustomRuleControl } from "../../controls/codeControl" ;
52import { isEmpty } from "lodash" ;
6- import { ConstructorToComp , RecordConstructorToComp } from "lowcoder-core" ;
7- import {
8- arrayStringExposingStateControl ,
9- jsonExposingStateControl ,
10- stringExposingStateControl ,
11- } from "../../controls/codeStateControl" ;
12- import { requiredPropertyView } from "comps/utils/propertyUtils" ;
3+ import { RecordConstructorToComp } from "lowcoder-core" ;
4+ import { stringExposingStateControl } from "../../controls/codeStateControl" ;
135import { trans } from "i18n" ;
146import { useEffect , useRef , useState } from "react" ;
15- import { SelectInputOptionControl } from "../../controls/optionsControl" ;
167import { refMethods } from "comps/generators/withMethodExposing" ;
178import { blurMethod , focusWithOptions } from "comps/utils/methodUtils" ;
189import { TourStepControl } from "@lowcoder-ee/comps/controls/tourStepControl" ;
@@ -55,7 +46,7 @@ export const selectInputValidate = (
5546
5647export const useSelectInputValidate = ( props : ValidationParams ) => {
5748 const [ validateState , setValidateState ] = useState ( { } ) ;
58- const changeRef = useRef ( false )
49+ const changeRef = useRef ( false ) ;
5950 const propsRef = useRef < ValidationParams > ( props ) ;
6051 propsRef . current = props ;
6152
@@ -67,16 +58,16 @@ export const useSelectInputValidate = (props: ValidationParams) => {
6758 selectInputValidate ( {
6859 ...propsRef . current ,
6960 value : {
70- value,
71- } ,
61+ value
62+ }
7263 } )
7364 ) ;
7465 } ;
7566
7667 useEffect ( ( ) => {
77- props . value . onChange ?.( defaultValue )
68+ props . value . onChange ?.( defaultValue ) ;
7869 } , [ defaultValue ] ) ;
79-
70+
8071 useEffect ( ( ) => {
8172 if ( ! changeRef . current ) return ;
8273
@@ -93,7 +84,7 @@ export const useSelectInputValidate = (props: ValidationParams) => {
9384 return [
9485 validateState ,
9586 // handleValidate,
96- handleChange ,
87+ handleChange
9788 ] as const ;
9889} ;
9990
@@ -136,14 +127,33 @@ export const TourInputCommonConfig = [
136127 name : "selectedIndex" ,
137128 desc : trans ( "selectInput.selectedIndexDesc" ) ,
138129 depKeys : [ "value" , "options" ] ,
139- func : ( input ) => input . options . findIndex ?.( ( o : any ) => o . value === input . value ) ,
130+ func : ( input ) => input . options . findIndex ?.( ( o : any ) => o . value === input . value )
140131 } ) ,
141132 depsConfig < ChildrenType , ChildrenTypeToDepsKeys < ChildrenType > > ( {
142133 name : "selectedLabel" ,
143134 desc : trans ( "selectInput.selectedLabelDesc" ) ,
144135 depKeys : [ "value" , "options" ] ,
145- func : ( input ) => input . options . find ?.( ( o : any ) => o . value === input . value ) ?. title ,
146- } ) ,
136+ func : ( input ) => input . options . find ?.( ( o : any ) => o . value === input . value ) ?. title
137+ } )
147138] ;
148139
149140export const selectDivRefMethods = refMethods < HTMLDivElement > ( [ focusWithOptions , blurMethod ] ) ;
141+ let styleExample = {
142+ "style" : { "boxShadow" : "inset 0 0 15px #fff" } ,
143+ "color" : "rgba(40, 0, 255, .4)"
144+ } ;
145+
146+ export const TourStepMaskTooltip = (
147+ < div >
148+ { trans ( "tour.options.mask.tooltip" ) } :
149+ < br />
150+ < br />
151+ { trans ( "tour.options.mask.tooltipValidTypes" ) }
152+ < br />
153+ < br />
154+ < h3 > Example:</ h3 >
155+ < code >
156+ { JSON . stringify ( styleExample , null , 1 ) }
157+ </ code >
158+ </ div >
159+ ) ;
0 commit comments