@ledvance/base 1.2.82 → 1.2.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/.babelrc +31 -31
  2. package/.eslintignore +5 -5
  3. package/.eslintrc.js +27 -27
  4. package/.prettierrc.js +1 -1
  5. package/.versionrc +5 -5
  6. package/localazy.json +848 -848
  7. package/localazy.keys.json +4 -4
  8. package/package.json +74 -74
  9. package/rn-cli.config.js +8 -8
  10. package/src/api/native.d.ts +71 -71
  11. package/src/api/native.ts +423 -423
  12. package/src/api/nativeEventEmitter.d.ts +3 -3
  13. package/src/api/nativeEventEmitter.ts +125 -125
  14. package/src/components/AdvanceCard.d.ts +25 -25
  15. package/src/components/AdvanceCard.tsx +117 -117
  16. package/src/components/AdvanceList.d.ts +9 -9
  17. package/src/components/AdvanceList.tsx +69 -69
  18. package/src/components/ApplyForDeviceItem.d.ts +6 -6
  19. package/src/components/ApplyForDeviceItem.tsx +83 -83
  20. package/src/components/ApplyForDeviceList.d.ts +7 -7
  21. package/src/components/ApplyForDeviceList.tsx +61 -61
  22. package/src/components/ApplyForText.d.ts +6 -6
  23. package/src/components/ApplyForText.tsx +52 -52
  24. package/src/components/Card.d.ts +10 -10
  25. package/src/components/Card.tsx +40 -40
  26. package/src/components/Cell.d.ts +21 -21
  27. package/src/components/Cell.tsx +69 -69
  28. package/src/components/CircularProgress.d.ts +8 -8
  29. package/src/components/CircularProgress.tsx +42 -42
  30. package/src/components/ColorAdjustView.d.ts +12 -12
  31. package/src/components/ColorAdjustView.tsx +64 -64
  32. package/src/components/ColorExtractor.d.ts +73 -73
  33. package/src/components/ColorExtractor.tsx +374 -374
  34. package/src/components/ColorTempAdjustView.d.ts +13 -13
  35. package/src/components/ColorTempAdjustView.tsx +57 -57
  36. package/src/components/ColorsLine.d.ts +7 -7
  37. package/src/components/ColorsLine.tsx +47 -47
  38. package/src/components/CustomListDialog.d.ts +15 -15
  39. package/src/components/CustomListDialog.tsx +66 -65
  40. package/src/components/DeleteButton.d.ts +10 -10
  41. package/src/components/DeleteButton.tsx +40 -40
  42. package/src/components/Dialog.d.ts +10 -10
  43. package/src/components/Dialog.tsx +38 -38
  44. package/src/components/DrawToolView.d.ts +46 -46
  45. package/src/components/DrawToolView.tsx +262 -262
  46. package/src/components/FanAdjustView.d.ts +23 -23
  47. package/src/components/FanAdjustView.tsx +141 -141
  48. package/src/components/InfoText.d.ts +11 -11
  49. package/src/components/InfoText.tsx +45 -45
  50. package/src/components/LampAdjustView.d.ts +10 -10
  51. package/src/components/LampAdjustView.tsx +75 -75
  52. package/src/components/LampAdjustView2.d.ts +24 -24
  53. package/src/components/LampAdjustView2.tsx +104 -104
  54. package/src/components/LinearGradientLine.d.ts +9 -9
  55. package/src/components/LinearGradientLine.tsx +63 -63
  56. package/src/components/LoadingView.tsx +39 -39
  57. package/src/components/MoodColorsLine.d.ts +9 -9
  58. package/src/components/MoodColorsLine.tsx +38 -38
  59. package/src/components/Page.d.ts +21 -21
  60. package/src/components/Page.tsx +104 -104
  61. package/src/components/Popup.d.ts +7 -7
  62. package/src/components/Popup.tsx +71 -71
  63. package/src/components/Segmented.d.ts +14 -14
  64. package/src/components/Segmented.tsx +76 -76
  65. package/src/components/ShowSelect.d.ts +1 -1
  66. package/src/components/ShowSelect.tsx +158 -158
  67. package/src/components/SocketItem.d.ts +13 -13
  68. package/src/components/SocketItem.tsx +87 -87
  69. package/src/components/Spacer.d.ts +7 -7
  70. package/src/components/Spacer.tsx +13 -13
  71. package/src/components/Stepper.d.ts +19 -19
  72. package/src/components/Stepper.tsx +130 -130
  73. package/src/components/StripAdjustView.d.ts +16 -16
  74. package/src/components/StripAdjustView.tsx +129 -129
  75. package/src/components/StripLightView.d.ts +14 -14
  76. package/src/components/StripLightView.tsx +24 -24
  77. package/src/components/Summary.tsx +116 -116
  78. package/src/components/Tag.d.ts +8 -8
  79. package/src/components/Tag.tsx +56 -56
  80. package/src/components/TextButton.d.ts +9 -9
  81. package/src/components/TextButton.tsx +31 -31
  82. package/src/components/TextField.d.ts +9 -9
  83. package/src/components/TextField.tsx +92 -92
  84. package/src/components/TextFieldStyleButton.d.ts +8 -8
  85. package/src/components/TextFieldStyleButton.tsx +85 -85
  86. package/src/components/UATabTitle.d.ts +6 -6
  87. package/src/components/UATabTitle.tsx +31 -31
  88. package/src/components/UATabs.d.ts +12 -12
  89. package/src/components/UATabs.tsx +77 -77
  90. package/src/components/connect.d.ts +10 -10
  91. package/src/components/connect.tsx +20 -20
  92. package/src/components/ldvColorBrightness.d.ts +1 -1
  93. package/src/components/ldvColorBrightness.tsx +18 -18
  94. package/src/components/ldvColorSlider.d.ts +14 -14
  95. package/src/components/ldvColorSlider.tsx +131 -131
  96. package/src/components/ldvItemView.d.ts +12 -12
  97. package/src/components/ldvItemView.tsx +43 -43
  98. package/src/components/ldvPickerView.d.ts +13 -13
  99. package/src/components/ldvPickerView.tsx +97 -97
  100. package/src/components/ldvPresetView.d.ts +2 -2
  101. package/src/components/ldvPresetView.tsx +86 -86
  102. package/src/components/ldvSaturation.d.ts +2 -2
  103. package/src/components/ldvSaturation.tsx +22 -22
  104. package/src/components/ldvSlider.d.ts +15 -15
  105. package/src/components/ldvSlider.tsx +103 -103
  106. package/src/components/ldvSwitch.d.ts +10 -10
  107. package/src/components/ldvSwitch.tsx +52 -52
  108. package/src/components/ldvTemperatureSlider.d.ts +13 -13
  109. package/src/components/ldvTemperatureSlider.tsx +139 -139
  110. package/src/components/ldvTopBar.d.ts +10 -10
  111. package/src/components/ldvTopBar.tsx +76 -76
  112. package/src/components/ldvTopName.d.ts +9 -9
  113. package/src/components/ldvTopName.tsx +63 -63
  114. package/src/components/segmentControl.d.ts +1 -1
  115. package/src/components/segmentControl.tsx +65 -65
  116. package/src/components/weekSelect.d.ts +7 -7
  117. package/src/components/weekSelect.tsx +98 -98
  118. package/src/composeLayout.d.ts +30 -30
  119. package/src/composeLayout.tsx +261 -261
  120. package/src/config/dark-theme.ts +61 -61
  121. package/src/config/light-theme.ts +61 -61
  122. package/src/hooks/Hooks.d.ts +2 -2
  123. package/src/hooks/Hooks.ts +8 -8
  124. package/src/i18n/index.d.ts +16 -16
  125. package/src/i18n/index.ts +37 -37
  126. package/src/i18n/strings.d.ts +15953 -15953
  127. package/src/i18n/strings.ts +23723 -23723
  128. package/src/main.tsx +9 -9
  129. package/src/models/GlobalParams.d.ts +14 -14
  130. package/src/models/GlobalParams.ts +14 -14
  131. package/src/models/TuyaApi.d.ts +29 -29
  132. package/src/models/TuyaApi.ts +92 -92
  133. package/src/models/combine.d.ts +26 -26
  134. package/src/models/combine.ts +17 -17
  135. package/src/models/configureStore.d.ts +9 -9
  136. package/src/models/configureStore.ts +33 -33
  137. package/src/models/index.d.ts +31 -31
  138. package/src/models/index.ts +22 -22
  139. package/src/models/modules/NativePropsSlice.d.ts +61 -61
  140. package/src/models/modules/NativePropsSlice.tsx +467 -467
  141. package/src/models/modules/Result.d.ts +14 -14
  142. package/src/models/modules/Result.ts +15 -15
  143. package/src/models/modules/common.d.ts +44 -44
  144. package/src/models/modules/common.ts +161 -161
  145. package/src/res/index.d.ts +70 -70
  146. package/src/res/index.ts +73 -73
  147. package/src/utils/ColorParser.d.ts +66 -66
  148. package/src/utils/ColorParser.ts +189 -189
  149. package/src/utils/ColorUtils.d.ts +71 -71
  150. package/src/utils/ColorUtils.tsx +448 -448
  151. package/src/utils/Support.d.ts +13 -13
  152. package/src/utils/Support.ts +108 -108
  153. package/src/utils/TypeUtils.d.ts +3 -3
  154. package/src/utils/cctUtils.d.ts +1 -1
  155. package/src/utils/cctUtils.ts +110 -110
  156. package/src/utils/common.d.ts +35 -35
  157. package/src/utils/common.ts +379 -379
  158. package/src/utils/index.d.ts +26 -26
  159. package/src/utils/index.ts +191 -191
  160. package/src/utils/interface.d.ts +6 -6
  161. package/src/utils/interface.ts +50 -11
  162. package/src/utils/loopsCompare.d.ts +1 -1
  163. package/src/utils/loopsCompare.ts +62 -62
  164. package/tsconfig.json +50 -50
  165. package/update-localazy.py +52 -52
@@ -1,85 +1,85 @@
1
- import {StyleSheet, Text, TouchableOpacity, View, ViewProps, Image} from 'react-native'
2
- import {Utils} from 'tuya-panel-kit'
3
- import React from 'react'
4
- import res from "../res/index";
5
-
6
- const cx = Utils.RatioUtils.convertX
7
- const { withTheme } = Utils.ThemeUtils
8
-
9
- interface TextFieldStyleButtonProps extends ViewProps {
10
- theme?: any
11
- placeholder: string
12
- text: string
13
- onPress: () => void,
14
- showTipIcon?: boolean,
15
- onTipIconPress?: () => void,
16
- }
17
-
18
- const TextFieldStyleButton = (props: TextFieldStyleButtonProps) => {
19
- const styles = StyleSheet.create({
20
- topTip: {
21
- marginTop: cx(5),
22
- fontSize: cx(12),
23
- marginStart: cx(13),
24
- color: props.theme.global.secondFontColor,
25
- fontFamily: 'helvetica_neue_lt_std_bd',
26
- },
27
- textGroup: {
28
- flexDirection: 'row',
29
- borderRadius: cx(4),
30
- backgroundColor: props.theme.textInput.background,
31
- alignItems: 'center',
32
- },
33
- textParent: {
34
- flex: 1,
35
- height: cx(44),
36
- justifyContent: 'center',
37
- },
38
- text: {
39
- marginStart: cx(16),
40
- marginEnd: cx(6),
41
- fontSize: cx(16),
42
- color: props.theme.textInput.fontColor,
43
- fontFamily: 'helvetica_neue_lt_std_roman',
44
- },
45
- line: {
46
- height: 1,
47
- position: 'absolute',
48
- start: cx(4),
49
- end: cx(4),
50
- bottom: 0,
51
- backgroundColor: props.theme.textInput.line,
52
- },
53
- tipParent: {
54
- flexDirection: 'row',
55
- alignItems: 'center',
56
- },
57
- tipIcon: {
58
- width: cx(16),
59
- height: cx(16),
60
- marginStart: cx(4),
61
- }
62
- })
63
-
64
- return (
65
- <View style={props.style}>
66
- <View style={styles.tipParent}>
67
- <Text style={styles.topTip}>{props.placeholder}</Text>
68
- {props.showTipIcon && <TouchableOpacity onPress={props.onTipIconPress}>
69
- <Image source={res.ic_info} style={styles.tipIcon}/>
70
- </TouchableOpacity>}
71
- </View>
72
- <TouchableOpacity onPress={props.onPress}>
73
- <View style={styles.textGroup}>
74
- <View style={styles.textParent}>
75
- <Text style={styles.text}>{props.text}</Text>
76
- </View>
77
- <View style={styles.line} />
78
- </View>
79
- </TouchableOpacity>
80
- </View>
81
- )
82
- }
83
-
84
-
85
- export default withTheme(TextFieldStyleButton)
1
+ import {StyleSheet, Text, TouchableOpacity, View, ViewProps, Image} from 'react-native'
2
+ import {Utils} from 'tuya-panel-kit'
3
+ import React from 'react'
4
+ import res from "../res/index";
5
+
6
+ const cx = Utils.RatioUtils.convertX
7
+ const { withTheme } = Utils.ThemeUtils
8
+
9
+ interface TextFieldStyleButtonProps extends ViewProps {
10
+ theme?: any
11
+ placeholder: string
12
+ text: string
13
+ onPress: () => void,
14
+ showTipIcon?: boolean,
15
+ onTipIconPress?: () => void,
16
+ }
17
+
18
+ const TextFieldStyleButton = (props: TextFieldStyleButtonProps) => {
19
+ const styles = StyleSheet.create({
20
+ topTip: {
21
+ marginTop: cx(5),
22
+ fontSize: cx(12),
23
+ marginStart: cx(13),
24
+ color: props.theme.global.secondFontColor,
25
+ fontFamily: 'helvetica_neue_lt_std_bd',
26
+ },
27
+ textGroup: {
28
+ flexDirection: 'row',
29
+ borderRadius: cx(4),
30
+ backgroundColor: props.theme.textInput.background,
31
+ alignItems: 'center',
32
+ },
33
+ textParent: {
34
+ flex: 1,
35
+ height: cx(44),
36
+ justifyContent: 'center',
37
+ },
38
+ text: {
39
+ marginStart: cx(16),
40
+ marginEnd: cx(6),
41
+ fontSize: cx(16),
42
+ color: props.theme.textInput.fontColor,
43
+ fontFamily: 'helvetica_neue_lt_std_roman',
44
+ },
45
+ line: {
46
+ height: 1,
47
+ position: 'absolute',
48
+ start: cx(4),
49
+ end: cx(4),
50
+ bottom: 0,
51
+ backgroundColor: props.theme.textInput.line,
52
+ },
53
+ tipParent: {
54
+ flexDirection: 'row',
55
+ alignItems: 'center',
56
+ },
57
+ tipIcon: {
58
+ width: cx(16),
59
+ height: cx(16),
60
+ marginStart: cx(4),
61
+ }
62
+ })
63
+
64
+ return (
65
+ <View style={props.style}>
66
+ <View style={styles.tipParent}>
67
+ <Text style={styles.topTip}>{props.placeholder}</Text>
68
+ {props.showTipIcon && <TouchableOpacity onPress={props.onTipIconPress}>
69
+ <Image source={res.ic_info} style={styles.tipIcon}/>
70
+ </TouchableOpacity>}
71
+ </View>
72
+ <TouchableOpacity onPress={props.onPress}>
73
+ <View style={styles.textGroup}>
74
+ <View style={styles.textParent}>
75
+ <Text style={styles.text}>{props.text}</Text>
76
+ </View>
77
+ <View style={styles.line} />
78
+ </View>
79
+ </TouchableOpacity>
80
+ </View>
81
+ )
82
+ }
83
+
84
+
85
+ export default withTheme(TextFieldStyleButton)
@@ -1,6 +1,6 @@
1
- import { ViewProps } from 'react-native';
2
- export interface UATabTitleProps extends ViewProps {
3
- text: string;
4
- onIconClick: () => void;
5
- }
6
- export default function UATabTitle(props: UATabTitleProps): JSX.Element;
1
+ import { ViewProps } from 'react-native';
2
+ export interface UATabTitleProps extends ViewProps {
3
+ text: string;
4
+ onIconClick: () => void;
5
+ }
6
+ export default function UATabTitle(props: UATabTitleProps): JSX.Element;
@@ -1,32 +1,32 @@
1
- import { Image, StyleSheet, Text, TouchableOpacity, View, ViewProps } from 'react-native'
2
- import Spacer from './Spacer'
3
- import React from 'react'
4
- import { Utils } from 'tuya-panel-kit'
5
- import res from '../res/index'
6
-
7
- const cx = Utils.RatioUtils.convertX
8
-
9
- export interface UATabTitleProps extends ViewProps {
10
- text: string
11
- onIconClick: () => void
12
- }
13
-
14
- export default function UATabTitle(props: UATabTitleProps) {
15
- return (
16
- <View style={[{ flex: 1, flexDirection: 'row', alignItems: 'center' }, props.style]}>
17
- <Text style={styles.tabsTitle}>{props.text}</Text>
18
- <Spacer height={cx(0)} width={cx(4)}/>
19
- <TouchableOpacity onPress={props.onIconClick}>
20
- <Image style={{ width: cx(16), height: cx(16), tintColor: '#f60' }} source={res.ic_info}/>
21
- </TouchableOpacity>
22
- </View>
23
- )
24
- }
25
-
26
- const styles = StyleSheet.create({
27
- tabsTitle: {
28
- color: '#000',
29
- fontSize: cx(14),
30
- fontFamily: 'helvetica_neue_lt_std_roman',
31
- },
1
+ import { Image, StyleSheet, Text, TouchableOpacity, View, ViewProps } from 'react-native'
2
+ import Spacer from './Spacer'
3
+ import React from 'react'
4
+ import { Utils } from 'tuya-panel-kit'
5
+ import res from '../res/index'
6
+
7
+ const cx = Utils.RatioUtils.convertX
8
+
9
+ export interface UATabTitleProps extends ViewProps {
10
+ text: string
11
+ onIconClick: () => void
12
+ }
13
+
14
+ export default function UATabTitle(props: UATabTitleProps) {
15
+ return (
16
+ <View style={[{ flex: 1, flexDirection: 'row', alignItems: 'center' }, props.style]}>
17
+ <Text style={styles.tabsTitle}>{props.text}</Text>
18
+ <Spacer height={cx(0)} width={cx(4)}/>
19
+ <TouchableOpacity onPress={props.onIconClick}>
20
+ <Image style={{ width: cx(16), height: cx(16), tintColor: '#f60' }} source={res.ic_info}/>
21
+ </TouchableOpacity>
22
+ </View>
23
+ )
24
+ }
25
+
26
+ const styles = StyleSheet.create({
27
+ tabsTitle: {
28
+ color: '#000',
29
+ fontSize: cx(14),
30
+ fontFamily: 'helvetica_neue_lt_std_roman',
31
+ },
32
32
  })
@@ -1,12 +1,12 @@
1
- import { ViewProps } from 'react-native';
2
- export interface UATabsProps extends ViewProps {
3
- active: any;
4
- data: UATabData[];
5
- onSelectChange: (value: UATabData, index: number) => void;
6
- }
7
- export interface UATabData {
8
- title: string;
9
- value?: any;
10
- }
11
- declare const UATabs: (props: UATabsProps) => JSX.Element;
12
- export default UATabs;
1
+ import { ViewProps } from 'react-native';
2
+ export interface UATabsProps extends ViewProps {
3
+ active: any;
4
+ data: UATabData[];
5
+ onSelectChange: (value: UATabData, index: number) => void;
6
+ }
7
+ export interface UATabData {
8
+ title: string;
9
+ value?: any;
10
+ }
11
+ declare const UATabs: (props: UATabsProps) => JSX.Element;
12
+ export default UATabs;
@@ -1,78 +1,78 @@
1
- import React from 'react'
2
- import { StyleSheet, Text, TouchableOpacity, View, ViewProps } from 'react-native'
3
- import { Utils } from 'tuya-panel-kit'
4
-
5
- const cx = Utils.RatioUtils.convertX
6
-
7
- export interface UATabsProps extends ViewProps {
8
- active: any
9
- data: UATabData[]
10
- onSelectChange: (value: UATabData, index: number) => void
11
- }
12
-
13
- export interface UATabData {
14
- title: string
15
- value?: any
16
- }
17
-
18
- const UATabs = (props: UATabsProps) => {
19
- return (
20
- <View style={[styles.root, props.style]}>
21
- <View style={styles.tabs}>
22
- {props.data.map((item, index) => {
23
-
24
- const active = props.active === item.value
25
-
26
- return <TouchableOpacity
27
- key={index}
28
- style={{ flex: 1 }}
29
- onPress={() => {
30
- props.onSelectChange(item, index)
31
- }}>
32
- <View style={[
33
- styles.tab,
34
- {
35
- backgroundColor: active ? '#f60' : '#f6f6f6',
36
- },
37
- ]}>
38
- <Text style={[
39
- styles.tabText,
40
- {
41
- color: active ? '#fff' : '#999',
42
- },
43
- ]}>{item.title}</Text>
44
- </View>
45
- </TouchableOpacity>
46
- })}
47
- </View>
48
- </View>
49
- )
50
- }
51
-
52
- const styles = StyleSheet.create({
53
- root: {
54
- flex: 1,
55
- height: cx(32),
56
- paddingVertical: cx(2),
57
- paddingHorizontal: cx(3),
58
- backgroundColor: '#f6f6f6',
59
- borderRadius: cx(9),
60
- },
61
- tabs: {
62
- flex: 1,
63
- flexDirection: 'row',
64
- overflow: 'hidden',
65
- borderRadius: cx(7),
66
- },
67
- tab: {
68
- flex: 1,
69
- justifyContent: 'center',
70
- alignItems: 'center',
71
- },
72
- tabText: {
73
- fontSize: cx(14),
74
- fontFamily: 'helvetica_neue_lt_std_roman',
75
- },
76
- })
77
-
1
+ import React from 'react'
2
+ import { StyleSheet, Text, TouchableOpacity, View, ViewProps } from 'react-native'
3
+ import { Utils } from 'tuya-panel-kit'
4
+
5
+ const cx = Utils.RatioUtils.convertX
6
+
7
+ export interface UATabsProps extends ViewProps {
8
+ active: any
9
+ data: UATabData[]
10
+ onSelectChange: (value: UATabData, index: number) => void
11
+ }
12
+
13
+ export interface UATabData {
14
+ title: string
15
+ value?: any
16
+ }
17
+
18
+ const UATabs = (props: UATabsProps) => {
19
+ return (
20
+ <View style={[styles.root, props.style]}>
21
+ <View style={styles.tabs}>
22
+ {props.data.map((item, index) => {
23
+
24
+ const active = props.active === item.value
25
+
26
+ return <TouchableOpacity
27
+ key={index}
28
+ style={{ flex: 1 }}
29
+ onPress={() => {
30
+ props.onSelectChange(item, index)
31
+ }}>
32
+ <View style={[
33
+ styles.tab,
34
+ {
35
+ backgroundColor: active ? '#f60' : '#f6f6f6',
36
+ },
37
+ ]}>
38
+ <Text style={[
39
+ styles.tabText,
40
+ {
41
+ color: active ? '#fff' : '#999',
42
+ },
43
+ ]}>{item.title}</Text>
44
+ </View>
45
+ </TouchableOpacity>
46
+ })}
47
+ </View>
48
+ </View>
49
+ )
50
+ }
51
+
52
+ const styles = StyleSheet.create({
53
+ root: {
54
+ flex: 1,
55
+ height: cx(32),
56
+ paddingVertical: cx(2),
57
+ paddingHorizontal: cx(3),
58
+ backgroundColor: '#f6f6f6',
59
+ borderRadius: cx(9),
60
+ },
61
+ tabs: {
62
+ flex: 1,
63
+ flexDirection: 'row',
64
+ overflow: 'hidden',
65
+ borderRadius: cx(7),
66
+ },
67
+ tab: {
68
+ flex: 1,
69
+ justifyContent: 'center',
70
+ alignItems: 'center',
71
+ },
72
+ tabText: {
73
+ fontSize: cx(14),
74
+ fontFamily: 'helvetica_neue_lt_std_roman',
75
+ },
76
+ })
77
+
78
78
  export default UATabs
@@ -1,10 +1,10 @@
1
- import React from 'react';
2
- declare type ChildrenType = (props: any) => React.ReactElement | null;
3
- declare const _default: import("react-redux").ConnectedComponent<({ children, ...props }: {
4
- children: ChildrenType;
5
- }) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | null, Pick<{
6
- children: ChildrenType;
7
- }, "children"> & {
8
- mapStateToProps: any;
9
- }>;
10
- export default _default;
1
+ import React from 'react';
2
+ declare type ChildrenType = (props: any) => React.ReactElement | null;
3
+ declare const _default: import("react-redux").ConnectedComponent<({ children, ...props }: {
4
+ children: ChildrenType;
5
+ }) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | null, Pick<{
6
+ children: ChildrenType;
7
+ }, "children"> & {
8
+ mapStateToProps: any;
9
+ }>;
10
+ export default _default;
@@ -1,20 +1,20 @@
1
- import {bindActionCreators} from 'redux'
2
- import {connect} from 'react-redux'
3
- import React from 'react'
4
-
5
- type ChildrenType = (props: any) => React.ReactElement | null;
6
-
7
- const Connect = ({children, ...props}: { children: ChildrenType }) => children(props)
8
-
9
- export default connect(
10
- (state: any, {mapStateToProps}: { mapStateToProps: any }) => mapStateToProps(state),
11
- (dispatch: any, {mapDispatchToProps}: { mapDispatchToProps: any }) => {
12
- if (typeof mapDispatchToProps === 'object') {
13
- return bindActionCreators(mapDispatchToProps, dispatch)
14
- }
15
- if (typeof mapDispatchToProps === 'function') {
16
- return mapDispatchToProps(dispatch)
17
- }
18
- return {}
19
- },
20
- )(Connect)
1
+ import {bindActionCreators} from 'redux'
2
+ import {connect} from 'react-redux'
3
+ import React from 'react'
4
+
5
+ type ChildrenType = (props: any) => React.ReactElement | null;
6
+
7
+ const Connect = ({children, ...props}: { children: ChildrenType }) => children(props)
8
+
9
+ export default connect(
10
+ (state: any, {mapStateToProps}: { mapStateToProps: any }) => mapStateToProps(state),
11
+ (dispatch: any, {mapDispatchToProps}: { mapDispatchToProps: any }) => {
12
+ if (typeof mapDispatchToProps === 'object') {
13
+ return bindActionCreators(mapDispatchToProps, dispatch)
14
+ }
15
+ if (typeof mapDispatchToProps === 'function') {
16
+ return mapDispatchToProps(dispatch)
17
+ }
18
+ return {}
19
+ },
20
+ )(Connect)
@@ -1 +1 @@
1
- export default function LdvColorBrightness(props: any): JSX.Element;
1
+ export default function LdvColorBrightness(props: any): JSX.Element;
@@ -1,19 +1,19 @@
1
- import React from 'react'
2
- import LdvSlider from 'components/ldvSlider'
3
- import I18n from '../i18n/index'
4
-
5
- export default function LdvColorBrightness(props) {
6
- const {value, onSlidingComplete, minBrightness} = props
7
- const renderBrightness = () => {
8
- return (
9
- <LdvSlider
10
- min={minBrightness}
11
- style={props.style}
12
- title={I18n.getLang('light_sources_tile_dim_lighting_brightness')}
13
- value={value}
14
- onSlidingComplete={onSlidingComplete}
15
- onValueChange={props.onValueChange}/>
16
- )
17
- }
18
- return renderBrightness()
1
+ import React from 'react'
2
+ import LdvSlider from 'components/ldvSlider'
3
+ import I18n from '../i18n/index'
4
+
5
+ export default function LdvColorBrightness(props) {
6
+ const {value, onSlidingComplete, minBrightness} = props
7
+ const renderBrightness = () => {
8
+ return (
9
+ <LdvSlider
10
+ min={minBrightness}
11
+ style={props.style}
12
+ title={I18n.getLang('light_sources_tile_dim_lighting_brightness')}
13
+ value={value}
14
+ onSlidingComplete={onSlidingComplete}
15
+ onValueChange={props.onValueChange}/>
16
+ )
17
+ }
18
+ return renderBrightness()
19
19
  }
@@ -1,14 +1,14 @@
1
- import { StyleProp, ViewStyle } from 'react-native';
2
- export declare const TEMP_KEY = "temperature";
3
- interface LdvColorSliderProps {
4
- title: string;
5
- type: string;
6
- onValueChange?: (number: any) => void | undefined;
7
- onSlidingComplete: (number: any) => void;
8
- thumbColor: string;
9
- value: number;
10
- width?: number | undefined;
11
- style?: StyleProp<ViewStyle> | undefined;
12
- }
13
- declare const LdvColorSlider: (props: LdvColorSliderProps) => JSX.Element;
14
- export default LdvColorSlider;
1
+ import { StyleProp, ViewStyle } from 'react-native';
2
+ export declare const TEMP_KEY = "temperature";
3
+ interface LdvColorSliderProps {
4
+ title: string;
5
+ type: string;
6
+ onValueChange?: (number: any) => void | undefined;
7
+ onSlidingComplete: (number: any) => void;
8
+ thumbColor: string;
9
+ value: number;
10
+ width?: number | undefined;
11
+ style?: StyleProp<ViewStyle> | undefined;
12
+ }
13
+ declare const LdvColorSlider: (props: LdvColorSliderProps) => JSX.Element;
14
+ export default LdvColorSlider;