@@ -15,10 +15,11 @@ declare module 'global-input-react' {
15
15
}
16
16
17
17
export function useGlobalInputApp ( configData ?:ConfigData | ConfigDataCreator , dependencies ?:ReadonlyArray < any > ) :GlobalInputData ;
18
-
18
+ type OnFieldChangedFunction = ( evt :FieldChanged ) => void ;
19
+
19
20
interface ConfigData {
20
21
initData ?:InitData | InitDataCreator ;
21
- onFieldChanged ?:( evt : FieldChanged ) => void ;
22
+ onFieldChanged ?:OnFieldChangedFunction ;
22
23
options ?:ConnectOptions ;
23
24
}
24
25
interface ConnectOptions {
@@ -28,7 +29,10 @@ declare module 'global-input-react' {
28
29
url ?:string ;
29
30
}
30
31
interface FieldChanged {
31
- field :FormField
32
+ field :FormField ,
33
+ values :FieldValue [ ] ,
34
+ setFieldValueById :SetFieldValueByIdFunction ,
35
+ setInitData :SetInitDataFunction
32
36
}
33
37
type InitDataCreator = ( ) => InitData ;
34
38
@@ -39,14 +43,16 @@ declare module 'global-input-react' {
39
43
interface FormOperation {
40
44
onInput :( value :any ) => void
41
45
}
42
-
46
+
47
+ type SetFieldValueByIdFunction = ( fieldId :string , valueToSet :FieldValue ) => void ;
48
+ type SetInitDataFunction = ( initData :InitData , options ?:ConnectOptions ) => void ;
43
49
interface GlobalInputData {
44
50
mobileState :1 | 2 | 3 | 4 | 5 ;
45
51
connectionCode :string ;
46
52
errorMessage :string ;
47
53
mobile :object ;
48
54
disconnect :( ) => void ;
49
- setInitData :( initData : InitData , options ?: ConnectOptions ) => void ;
55
+ setInitData :SetInitDataFunction ;
50
56
connectionMessage :React . FC < void > ;
51
57
values :FieldValue [ ] ;
52
58
field :FormField ;
@@ -56,7 +62,10 @@ declare module 'global-input-react' {
56
62
WhenConnected :WhenFunction ;
57
63
WhenDisconnected :WhenFunction ;
58
64
WhenError :WhenFunction ;
59
- setFieldValueById :( fieldId :string , valueToSet :FieldValue ) => void ;
65
+ DisplayMobileConnect :WhenFunction ;
66
+ setFieldValueById :SetFieldValueByIdFunction ;
67
+ setOnFieldChanged :( onFieldChanged :OnFieldChangedFunction ) => void ;
68
+ initData :InitData ;
60
69
}
61
70
62
71
type WhenFunction = ( props :any ) => any ;
0 commit comments