@ledvance/base 1.2.81 → 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.
- package/.babelrc +31 -31
- package/.eslintignore +5 -5
- package/.eslintrc.js +27 -27
- package/.prettierrc.js +1 -1
- package/.versionrc +5 -5
- package/localazy.json +848 -848
- package/localazy.keys.json +4 -4
- package/package.json +74 -74
- package/rn-cli.config.js +8 -8
- package/src/api/native.d.ts +71 -71
- package/src/api/native.ts +423 -423
- package/src/api/nativeEventEmitter.d.ts +3 -3
- package/src/api/nativeEventEmitter.ts +125 -125
- package/src/components/AdvanceCard.d.ts +25 -25
- package/src/components/AdvanceCard.tsx +117 -117
- package/src/components/AdvanceList.d.ts +9 -9
- package/src/components/AdvanceList.tsx +69 -69
- package/src/components/ApplyForDeviceItem.d.ts +6 -6
- package/src/components/ApplyForDeviceItem.tsx +83 -83
- package/src/components/ApplyForDeviceList.d.ts +7 -7
- package/src/components/ApplyForDeviceList.tsx +61 -61
- package/src/components/ApplyForText.d.ts +6 -6
- package/src/components/ApplyForText.tsx +52 -52
- package/src/components/Card.d.ts +10 -10
- package/src/components/Card.tsx +40 -40
- package/src/components/Cell.d.ts +21 -21
- package/src/components/Cell.tsx +69 -69
- package/src/components/CircularProgress.d.ts +8 -8
- package/src/components/CircularProgress.tsx +42 -42
- package/src/components/ColorAdjustView.d.ts +12 -12
- package/src/components/ColorAdjustView.tsx +64 -64
- package/src/components/ColorExtractor.d.ts +73 -73
- package/src/components/ColorExtractor.tsx +374 -374
- package/src/components/ColorTempAdjustView.d.ts +13 -13
- package/src/components/ColorTempAdjustView.tsx +57 -57
- package/src/components/ColorsLine.d.ts +7 -7
- package/src/components/ColorsLine.tsx +47 -47
- package/src/components/CustomListDialog.d.ts +15 -15
- package/src/components/CustomListDialog.tsx +66 -65
- package/src/components/DeleteButton.d.ts +10 -10
- package/src/components/DeleteButton.tsx +40 -40
- package/src/components/Dialog.d.ts +10 -10
- package/src/components/Dialog.tsx +38 -38
- package/src/components/DrawToolView.d.ts +46 -46
- package/src/components/DrawToolView.tsx +262 -262
- package/src/components/FanAdjustView.d.ts +23 -23
- package/src/components/FanAdjustView.tsx +141 -141
- package/src/components/InfoText.d.ts +11 -11
- package/src/components/InfoText.tsx +45 -45
- package/src/components/LampAdjustView.d.ts +10 -10
- package/src/components/LampAdjustView.tsx +75 -75
- package/src/components/LampAdjustView2.d.ts +24 -24
- package/src/components/LampAdjustView2.tsx +104 -104
- package/src/components/LinearGradientLine.d.ts +9 -9
- package/src/components/LinearGradientLine.tsx +63 -63
- package/src/components/LoadingView.tsx +39 -39
- package/src/components/MoodColorsLine.d.ts +9 -9
- package/src/components/MoodColorsLine.tsx +38 -38
- package/src/components/Page.d.ts +21 -21
- package/src/components/Page.tsx +104 -104
- package/src/components/Popup.d.ts +7 -7
- package/src/components/Popup.tsx +71 -71
- package/src/components/Segmented.d.ts +14 -14
- package/src/components/Segmented.tsx +76 -76
- package/src/components/ShowSelect.d.ts +1 -1
- package/src/components/ShowSelect.tsx +158 -158
- package/src/components/SocketItem.d.ts +13 -13
- package/src/components/SocketItem.tsx +87 -87
- package/src/components/Spacer.d.ts +7 -7
- package/src/components/Spacer.tsx +13 -13
- package/src/components/Stepper.d.ts +19 -19
- package/src/components/Stepper.tsx +130 -130
- package/src/components/StripAdjustView.d.ts +16 -16
- package/src/components/StripAdjustView.tsx +129 -129
- package/src/components/StripLightView.d.ts +14 -14
- package/src/components/StripLightView.tsx +24 -24
- package/src/components/Summary.tsx +116 -124
- package/src/components/Tag.d.ts +8 -8
- package/src/components/Tag.tsx +56 -56
- package/src/components/TextButton.d.ts +9 -9
- package/src/components/TextButton.tsx +31 -31
- package/src/components/TextField.d.ts +9 -9
- package/src/components/TextField.tsx +92 -92
- package/src/components/TextFieldStyleButton.d.ts +8 -8
- package/src/components/TextFieldStyleButton.tsx +85 -85
- package/src/components/UATabTitle.d.ts +6 -6
- package/src/components/UATabTitle.tsx +31 -31
- package/src/components/UATabs.d.ts +12 -12
- package/src/components/UATabs.tsx +77 -77
- package/src/components/connect.d.ts +10 -10
- package/src/components/connect.tsx +20 -20
- package/src/components/ldvColorBrightness.d.ts +1 -1
- package/src/components/ldvColorBrightness.tsx +18 -18
- package/src/components/ldvColorSlider.d.ts +14 -14
- package/src/components/ldvColorSlider.tsx +131 -131
- package/src/components/ldvItemView.d.ts +12 -12
- package/src/components/ldvItemView.tsx +43 -43
- package/src/components/ldvPickerView.d.ts +13 -13
- package/src/components/ldvPickerView.tsx +97 -97
- package/src/components/ldvPresetView.d.ts +2 -2
- package/src/components/ldvPresetView.tsx +86 -86
- package/src/components/ldvSaturation.d.ts +2 -2
- package/src/components/ldvSaturation.tsx +22 -22
- package/src/components/ldvSlider.d.ts +15 -15
- package/src/components/ldvSlider.tsx +103 -103
- package/src/components/ldvSwitch.d.ts +10 -10
- package/src/components/ldvSwitch.tsx +52 -52
- package/src/components/ldvTemperatureSlider.d.ts +13 -13
- package/src/components/ldvTemperatureSlider.tsx +139 -139
- package/src/components/ldvTopBar.d.ts +10 -10
- package/src/components/ldvTopBar.tsx +76 -76
- package/src/components/ldvTopName.d.ts +9 -9
- package/src/components/ldvTopName.tsx +63 -63
- package/src/components/segmentControl.d.ts +1 -1
- package/src/components/segmentControl.tsx +65 -65
- package/src/components/weekSelect.d.ts +7 -7
- package/src/components/weekSelect.tsx +98 -98
- package/src/composeLayout.d.ts +30 -30
- package/src/composeLayout.tsx +261 -261
- package/src/config/dark-theme.ts +61 -61
- package/src/config/light-theme.ts +61 -61
- package/src/hooks/Hooks.d.ts +2 -2
- package/src/hooks/Hooks.ts +8 -8
- package/src/i18n/index.d.ts +16 -16
- package/src/i18n/index.ts +37 -37
- package/src/i18n/strings.d.ts +15953 -15953
- package/src/i18n/strings.ts +23723 -23723
- package/src/main.tsx +9 -9
- package/src/models/GlobalParams.d.ts +14 -14
- package/src/models/GlobalParams.ts +14 -14
- package/src/models/TuyaApi.d.ts +29 -29
- package/src/models/TuyaApi.ts +92 -92
- package/src/models/combine.d.ts +26 -26
- package/src/models/combine.ts +17 -17
- package/src/models/configureStore.d.ts +9 -9
- package/src/models/configureStore.ts +33 -33
- package/src/models/index.d.ts +31 -31
- package/src/models/index.ts +22 -22
- package/src/models/modules/NativePropsSlice.d.ts +61 -61
- package/src/models/modules/NativePropsSlice.tsx +467 -467
- package/src/models/modules/Result.d.ts +14 -14
- package/src/models/modules/Result.ts +15 -15
- package/src/models/modules/common.d.ts +44 -44
- package/src/models/modules/common.ts +161 -161
- package/src/res/index.d.ts +70 -70
- package/src/res/index.ts +73 -73
- package/src/utils/ColorParser.d.ts +66 -66
- package/src/utils/ColorParser.ts +189 -189
- package/src/utils/ColorUtils.d.ts +71 -71
- package/src/utils/ColorUtils.tsx +448 -448
- package/src/utils/Support.d.ts +13 -13
- package/src/utils/Support.ts +108 -108
- package/src/utils/TypeUtils.d.ts +3 -3
- package/src/utils/cctUtils.d.ts +1 -1
- package/src/utils/cctUtils.ts +110 -110
- package/src/utils/common.d.ts +35 -35
- package/src/utils/common.ts +379 -379
- package/src/utils/index.d.ts +26 -26
- package/src/utils/index.ts +191 -191
- package/src/utils/interface.d.ts +6 -6
- package/src/utils/interface.ts +50 -11
- package/src/utils/loopsCompare.d.ts +1 -1
- package/src/utils/loopsCompare.ts +62 -62
- package/tsconfig.json +50 -50
- package/update-localazy.py +52 -52
|
@@ -1,142 +1,142 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import {Utils} from 'tuya-panel-kit'
|
|
3
|
-
import Card from './Card'
|
|
4
|
-
import {Image, Text, TouchableOpacity, View, ViewProps} from 'react-native'
|
|
5
|
-
import LdvSwitch from './ldvSwitch'
|
|
6
|
-
import I18n from '@i18n'
|
|
7
|
-
import LdvSlider from './ldvSlider'
|
|
8
|
-
import Spacer from './Spacer'
|
|
9
|
-
import res from '../res'
|
|
10
|
-
import Segmented from './Segmented'
|
|
11
|
-
import Popup from './Popup'
|
|
12
|
-
|
|
13
|
-
const {convertX: cx} = Utils.RatioUtils
|
|
14
|
-
|
|
15
|
-
interface FanAdjustViewProps extends ViewProps {
|
|
16
|
-
hideEnable?: boolean
|
|
17
|
-
fanEnable: boolean
|
|
18
|
-
fanSpeed: number
|
|
19
|
-
maxFanSpeed?: number
|
|
20
|
-
isSupportDirection?: boolean
|
|
21
|
-
isSupportDisinfect?: boolean
|
|
22
|
-
isSupportMode?: boolean
|
|
23
|
-
directValue?: string
|
|
24
|
-
modeValue?: string
|
|
25
|
-
disinfect?: boolean
|
|
26
|
-
directOptions?: any[]
|
|
27
|
-
modeOptions?: any[]
|
|
28
|
-
directChange?: (direct: string) => void
|
|
29
|
-
modeChange?: (mode: string) => void
|
|
30
|
-
disinfectChange?: (disinfect: boolean) => void
|
|
31
|
-
onFanSwitch: (fanEnable: boolean) => void
|
|
32
|
-
onFanSpeedChange?: (fanSpeed: number) => void
|
|
33
|
-
onFanSpeedChangeComplete: (fanSpeed: number) => void
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const FanAdjustView = (props: FanAdjustViewProps) => {
|
|
37
|
-
return (
|
|
38
|
-
<Card style={props.style}>
|
|
39
|
-
<FanAdjustViewContent {...props}/>
|
|
40
|
-
</Card>
|
|
41
|
-
)
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export function FanAdjustViewContent(props: FanAdjustViewProps) {
|
|
45
|
-
return (
|
|
46
|
-
<View>
|
|
47
|
-
{!props.hideEnable && <LdvSwitch
|
|
48
|
-
title={I18n.getLang('add_new_dynamic_mood_ceiling_fan_field_headline')}
|
|
49
|
-
enable={props.fanEnable}
|
|
50
|
-
setEnable={props.onFanSwitch}
|
|
51
|
-
color={''}
|
|
52
|
-
colorAlpha={1}/>}
|
|
53
|
-
{props.fanEnable && (
|
|
54
|
-
<View>
|
|
55
|
-
<LdvSlider
|
|
56
|
-
title={I18n.getLang('add_new_dynamic_mood_ceiling_fan_field_text')}
|
|
57
|
-
value={props.fanSpeed}
|
|
58
|
-
min={1}
|
|
59
|
-
max={props.maxFanSpeed}
|
|
60
|
-
onValueChange={props.onFanSpeedChange}
|
|
61
|
-
onSlidingComplete={props.onFanSpeedChangeComplete}
|
|
62
|
-
subTitleStr={props.fanSpeed + `/${props.maxFanSpeed}`}/>
|
|
63
|
-
<Spacer/>
|
|
64
|
-
</View>
|
|
65
|
-
)}
|
|
66
|
-
{props.fanEnable && props.isSupportDirection && <View style={{marginHorizontal: cx(16)}}>
|
|
67
|
-
<View style={{flexDirection: 'row', marginBottom: cx(2), alignItems: 'center'}}>
|
|
68
|
-
<Text style={{
|
|
69
|
-
marginRight: cx(5),
|
|
70
|
-
color: '#000',
|
|
71
|
-
}}>{I18n.getLang('ceiling_fan_tile_uvc_fan_direction')}</Text>
|
|
72
|
-
<TouchableOpacity onPress={() => Popup({
|
|
73
|
-
title: I18n.getLang('ceiling_fan_direction_info_headline'),
|
|
74
|
-
confirmText: I18n.getLang('ceiling_fan_direction_info_button_label'),
|
|
75
|
-
content: <View>
|
|
76
|
-
<Text style={{
|
|
77
|
-
fontWeight: 'bold',
|
|
78
|
-
color: '#000',
|
|
79
|
-
}}>{I18n.getLang('ceiling_fan_direction_info_description_text')}</Text>
|
|
80
|
-
<Spacer/>
|
|
81
|
-
<Text style={{color: '#000'}}>{I18n.getLang('ceiling_fan_direction_info_option_1_headline')}</Text>
|
|
82
|
-
<Text style={{color: '#000'}}>{I18n.getLang('ceiling_fan_direction_info_option_1_text')}</Text>
|
|
83
|
-
<Spacer/>
|
|
84
|
-
<Text style={{color: '#000'}}>{I18n.getLang('ceiling_fan_direction_info_option_2_headline')}</Text>
|
|
85
|
-
<Text style={{color: '#000'}}>{I18n.getLang('ceiling_fan_direction_info_option_2_text')}</Text>
|
|
86
|
-
</View>,
|
|
87
|
-
})}>
|
|
88
|
-
<Image style={{width: cx(16), height: cx(16), tintColor: '#ff6600'}} source={res.ic_info}/>
|
|
89
|
-
</TouchableOpacity>
|
|
90
|
-
</View>
|
|
91
|
-
<Segmented
|
|
92
|
-
options={props.directOptions}
|
|
93
|
-
value={props.directValue}
|
|
94
|
-
onChange={props.directChange}
|
|
95
|
-
/>
|
|
96
|
-
<Spacer/>
|
|
97
|
-
</View>}
|
|
98
|
-
|
|
99
|
-
{props.fanEnable && props.isSupportMode && <View style={{marginHorizontal: cx(16)}}>
|
|
100
|
-
<View style={{flexDirection: 'row', marginBottom: cx(2), alignItems: 'center'}}>
|
|
101
|
-
<Text style={{marginRight: cx(5), color: '#000'}}>{I18n.getLang('ceiling_fan_tile_uvc_fan_mode')}</Text>
|
|
102
|
-
<TouchableOpacity onPress={() => Popup({
|
|
103
|
-
title: I18n.getLang('ceiling_fan_mode_info_headline'),
|
|
104
|
-
confirmText: I18n.getLang('ceiling_fan_direction_info_button_label'),
|
|
105
|
-
content: <View>
|
|
106
|
-
<Text style={{
|
|
107
|
-
fontWeight: 'bold',
|
|
108
|
-
color: '#000',
|
|
109
|
-
}}>{I18n.getLang('ceiling_fan_mode_info_description_text')}</Text>
|
|
110
|
-
<Spacer/>
|
|
111
|
-
<Text style={{color: '#000'}}>{I18n.getLang('ceiling_fan_mode_info_option_1_headline')}</Text>
|
|
112
|
-
<Text style={{color: '#000'}}>{I18n.getLang('ceiling_fan_mode_info_option_1_text')}</Text>
|
|
113
|
-
<Spacer/>
|
|
114
|
-
<Text style={{color: '#000'}}>{I18n.getLang('ceiling_fan_mode_info_option_2_headline')}</Text>
|
|
115
|
-
<Text style={{color: '#000'}}>{I18n.getLang('ceiling_fan_mode_info_option_2_text')}</Text>
|
|
116
|
-
</View>,
|
|
117
|
-
})}>
|
|
118
|
-
<Image style={{width: cx(16), height: cx(16), tintColor: '#ff6600'}} source={res.ic_info}/>
|
|
119
|
-
</TouchableOpacity>
|
|
120
|
-
</View>
|
|
121
|
-
<Segmented
|
|
122
|
-
options={props.modeOptions}
|
|
123
|
-
value={props.modeValue}
|
|
124
|
-
onChange={props.modeChange}
|
|
125
|
-
/>
|
|
126
|
-
<Spacer/>
|
|
127
|
-
</View>}
|
|
128
|
-
|
|
129
|
-
{props.fanEnable && props.isSupportDisinfect && <>
|
|
130
|
-
<LdvSwitch
|
|
131
|
-
enable={props.disinfect || false}
|
|
132
|
-
setEnable={props.disinfectChange}
|
|
133
|
-
color={''}
|
|
134
|
-
colorAlpha={1}
|
|
135
|
-
title={I18n.getLang('ceiling_fan_tile_uvc_fan_disinfect')}/>
|
|
136
|
-
<Spacer height={cx(16)}/>
|
|
137
|
-
</>}
|
|
138
|
-
</View>
|
|
139
|
-
)
|
|
140
|
-
}
|
|
141
|
-
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import {Utils} from 'tuya-panel-kit'
|
|
3
|
+
import Card from './Card'
|
|
4
|
+
import {Image, Text, TouchableOpacity, View, ViewProps} from 'react-native'
|
|
5
|
+
import LdvSwitch from './ldvSwitch'
|
|
6
|
+
import I18n from '@i18n'
|
|
7
|
+
import LdvSlider from './ldvSlider'
|
|
8
|
+
import Spacer from './Spacer'
|
|
9
|
+
import res from '../res'
|
|
10
|
+
import Segmented from './Segmented'
|
|
11
|
+
import Popup from './Popup'
|
|
12
|
+
|
|
13
|
+
const {convertX: cx} = Utils.RatioUtils
|
|
14
|
+
|
|
15
|
+
interface FanAdjustViewProps extends ViewProps {
|
|
16
|
+
hideEnable?: boolean
|
|
17
|
+
fanEnable: boolean
|
|
18
|
+
fanSpeed: number
|
|
19
|
+
maxFanSpeed?: number
|
|
20
|
+
isSupportDirection?: boolean
|
|
21
|
+
isSupportDisinfect?: boolean
|
|
22
|
+
isSupportMode?: boolean
|
|
23
|
+
directValue?: string
|
|
24
|
+
modeValue?: string
|
|
25
|
+
disinfect?: boolean
|
|
26
|
+
directOptions?: any[]
|
|
27
|
+
modeOptions?: any[]
|
|
28
|
+
directChange?: (direct: string) => void
|
|
29
|
+
modeChange?: (mode: string) => void
|
|
30
|
+
disinfectChange?: (disinfect: boolean) => void
|
|
31
|
+
onFanSwitch: (fanEnable: boolean) => void
|
|
32
|
+
onFanSpeedChange?: (fanSpeed: number) => void
|
|
33
|
+
onFanSpeedChangeComplete: (fanSpeed: number) => void
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const FanAdjustView = (props: FanAdjustViewProps) => {
|
|
37
|
+
return (
|
|
38
|
+
<Card style={props.style}>
|
|
39
|
+
<FanAdjustViewContent {...props}/>
|
|
40
|
+
</Card>
|
|
41
|
+
)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function FanAdjustViewContent(props: FanAdjustViewProps) {
|
|
45
|
+
return (
|
|
46
|
+
<View>
|
|
47
|
+
{!props.hideEnable && <LdvSwitch
|
|
48
|
+
title={I18n.getLang('add_new_dynamic_mood_ceiling_fan_field_headline')}
|
|
49
|
+
enable={props.fanEnable}
|
|
50
|
+
setEnable={props.onFanSwitch}
|
|
51
|
+
color={''}
|
|
52
|
+
colorAlpha={1}/>}
|
|
53
|
+
{props.fanEnable && (
|
|
54
|
+
<View>
|
|
55
|
+
<LdvSlider
|
|
56
|
+
title={I18n.getLang('add_new_dynamic_mood_ceiling_fan_field_text')}
|
|
57
|
+
value={props.fanSpeed}
|
|
58
|
+
min={1}
|
|
59
|
+
max={props.maxFanSpeed}
|
|
60
|
+
onValueChange={props.onFanSpeedChange}
|
|
61
|
+
onSlidingComplete={props.onFanSpeedChangeComplete}
|
|
62
|
+
subTitleStr={props.fanSpeed + `/${props.maxFanSpeed}`}/>
|
|
63
|
+
<Spacer/>
|
|
64
|
+
</View>
|
|
65
|
+
)}
|
|
66
|
+
{props.fanEnable && props.isSupportDirection && <View style={{marginHorizontal: cx(16)}}>
|
|
67
|
+
<View style={{flexDirection: 'row', marginBottom: cx(2), alignItems: 'center'}}>
|
|
68
|
+
<Text style={{
|
|
69
|
+
marginRight: cx(5),
|
|
70
|
+
color: '#000',
|
|
71
|
+
}}>{I18n.getLang('ceiling_fan_tile_uvc_fan_direction')}</Text>
|
|
72
|
+
<TouchableOpacity onPress={() => Popup({
|
|
73
|
+
title: I18n.getLang('ceiling_fan_direction_info_headline'),
|
|
74
|
+
confirmText: I18n.getLang('ceiling_fan_direction_info_button_label'),
|
|
75
|
+
content: <View>
|
|
76
|
+
<Text style={{
|
|
77
|
+
fontWeight: 'bold',
|
|
78
|
+
color: '#000',
|
|
79
|
+
}}>{I18n.getLang('ceiling_fan_direction_info_description_text')}</Text>
|
|
80
|
+
<Spacer/>
|
|
81
|
+
<Text style={{color: '#000'}}>{I18n.getLang('ceiling_fan_direction_info_option_1_headline')}</Text>
|
|
82
|
+
<Text style={{color: '#000'}}>{I18n.getLang('ceiling_fan_direction_info_option_1_text')}</Text>
|
|
83
|
+
<Spacer/>
|
|
84
|
+
<Text style={{color: '#000'}}>{I18n.getLang('ceiling_fan_direction_info_option_2_headline')}</Text>
|
|
85
|
+
<Text style={{color: '#000'}}>{I18n.getLang('ceiling_fan_direction_info_option_2_text')}</Text>
|
|
86
|
+
</View>,
|
|
87
|
+
})}>
|
|
88
|
+
<Image style={{width: cx(16), height: cx(16), tintColor: '#ff6600'}} source={res.ic_info}/>
|
|
89
|
+
</TouchableOpacity>
|
|
90
|
+
</View>
|
|
91
|
+
<Segmented
|
|
92
|
+
options={props.directOptions}
|
|
93
|
+
value={props.directValue}
|
|
94
|
+
onChange={props.directChange}
|
|
95
|
+
/>
|
|
96
|
+
<Spacer/>
|
|
97
|
+
</View>}
|
|
98
|
+
|
|
99
|
+
{props.fanEnable && props.isSupportMode && <View style={{marginHorizontal: cx(16)}}>
|
|
100
|
+
<View style={{flexDirection: 'row', marginBottom: cx(2), alignItems: 'center'}}>
|
|
101
|
+
<Text style={{marginRight: cx(5), color: '#000'}}>{I18n.getLang('ceiling_fan_tile_uvc_fan_mode')}</Text>
|
|
102
|
+
<TouchableOpacity onPress={() => Popup({
|
|
103
|
+
title: I18n.getLang('ceiling_fan_mode_info_headline'),
|
|
104
|
+
confirmText: I18n.getLang('ceiling_fan_direction_info_button_label'),
|
|
105
|
+
content: <View>
|
|
106
|
+
<Text style={{
|
|
107
|
+
fontWeight: 'bold',
|
|
108
|
+
color: '#000',
|
|
109
|
+
}}>{I18n.getLang('ceiling_fan_mode_info_description_text')}</Text>
|
|
110
|
+
<Spacer/>
|
|
111
|
+
<Text style={{color: '#000'}}>{I18n.getLang('ceiling_fan_mode_info_option_1_headline')}</Text>
|
|
112
|
+
<Text style={{color: '#000'}}>{I18n.getLang('ceiling_fan_mode_info_option_1_text')}</Text>
|
|
113
|
+
<Spacer/>
|
|
114
|
+
<Text style={{color: '#000'}}>{I18n.getLang('ceiling_fan_mode_info_option_2_headline')}</Text>
|
|
115
|
+
<Text style={{color: '#000'}}>{I18n.getLang('ceiling_fan_mode_info_option_2_text')}</Text>
|
|
116
|
+
</View>,
|
|
117
|
+
})}>
|
|
118
|
+
<Image style={{width: cx(16), height: cx(16), tintColor: '#ff6600'}} source={res.ic_info}/>
|
|
119
|
+
</TouchableOpacity>
|
|
120
|
+
</View>
|
|
121
|
+
<Segmented
|
|
122
|
+
options={props.modeOptions}
|
|
123
|
+
value={props.modeValue}
|
|
124
|
+
onChange={props.modeChange}
|
|
125
|
+
/>
|
|
126
|
+
<Spacer/>
|
|
127
|
+
</View>}
|
|
128
|
+
|
|
129
|
+
{props.fanEnable && props.isSupportDisinfect && <>
|
|
130
|
+
<LdvSwitch
|
|
131
|
+
enable={props.disinfect || false}
|
|
132
|
+
setEnable={props.disinfectChange}
|
|
133
|
+
color={''}
|
|
134
|
+
colorAlpha={1}
|
|
135
|
+
title={I18n.getLang('ceiling_fan_tile_uvc_fan_disinfect')}/>
|
|
136
|
+
<Spacer height={cx(16)}/>
|
|
137
|
+
</>}
|
|
138
|
+
</View>
|
|
139
|
+
)
|
|
140
|
+
}
|
|
141
|
+
|
|
142
142
|
export default FanAdjustView
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ImageStyle, StyleProp, TextStyle, ViewProps, ViewStyle } from 'react-native';
|
|
2
|
-
interface InfoTextProps extends ViewProps {
|
|
3
|
-
icon: string | number;
|
|
4
|
-
text: string;
|
|
5
|
-
contentColor?: string;
|
|
6
|
-
style?: ViewStyle;
|
|
7
|
-
iconStyle?: StyleProp<ImageStyle>;
|
|
8
|
-
textStyle?: StyleProp<TextStyle>;
|
|
9
|
-
}
|
|
10
|
-
declare const InfoText: (props: InfoTextProps) => JSX.Element;
|
|
11
|
-
export default InfoText;
|
|
1
|
+
import { ImageStyle, StyleProp, TextStyle, ViewProps, ViewStyle } from 'react-native';
|
|
2
|
+
interface InfoTextProps extends ViewProps {
|
|
3
|
+
icon: string | number;
|
|
4
|
+
text: string;
|
|
5
|
+
contentColor?: string;
|
|
6
|
+
style?: ViewStyle;
|
|
7
|
+
iconStyle?: StyleProp<ImageStyle>;
|
|
8
|
+
textStyle?: StyleProp<TextStyle>;
|
|
9
|
+
}
|
|
10
|
+
declare const InfoText: (props: InfoTextProps) => JSX.Element;
|
|
11
|
+
export default InfoText;
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import {Image, ImageStyle, StyleProp, StyleSheet, Text, TextStyle, View, ViewProps, ViewStyle} from 'react-native'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import {Utils} from 'tuya-panel-kit'
|
|
4
|
-
import Spacer from './Spacer'
|
|
5
|
-
|
|
6
|
-
const cx = Utils.RatioUtils.convertX
|
|
7
|
-
|
|
8
|
-
interface InfoTextProps extends ViewProps {
|
|
9
|
-
icon: string | number
|
|
10
|
-
text: string
|
|
11
|
-
contentColor?: string
|
|
12
|
-
style?: ViewStyle
|
|
13
|
-
iconStyle?: StyleProp<ImageStyle>
|
|
14
|
-
textStyle?: StyleProp<TextStyle>
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const InfoText = (props: InfoTextProps) => {
|
|
18
|
-
const contentColor = props.contentColor || '#666666'
|
|
19
|
-
const source = typeof props.icon === 'string' ? {uri: props.icon} : props.icon
|
|
20
|
-
return (
|
|
21
|
-
<View style={[styles.root, props.style]}>
|
|
22
|
-
<Image style={[styles.icon, {tintColor: contentColor}, props.iconStyle]}
|
|
23
|
-
source={source}/>
|
|
24
|
-
<Spacer width={cx(4)} height={0}/>
|
|
25
|
-
<Text style={[styles.text, {color: contentColor}, props.textStyle ]}>{props.text}</Text>
|
|
26
|
-
</View>
|
|
27
|
-
)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const styles = StyleSheet.create({
|
|
31
|
-
root: {
|
|
32
|
-
flexDirection: 'row',
|
|
33
|
-
},
|
|
34
|
-
icon: {
|
|
35
|
-
width: cx(16),
|
|
36
|
-
height: cx(16),
|
|
37
|
-
},
|
|
38
|
-
text: {
|
|
39
|
-
flex: 1,
|
|
40
|
-
marginTop: cx(2.5),
|
|
41
|
-
fontSize: cx(12),
|
|
42
|
-
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
43
|
-
},
|
|
44
|
-
})
|
|
45
|
-
|
|
1
|
+
import {Image, ImageStyle, StyleProp, StyleSheet, Text, TextStyle, View, ViewProps, ViewStyle} from 'react-native'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
import {Utils} from 'tuya-panel-kit'
|
|
4
|
+
import Spacer from './Spacer'
|
|
5
|
+
|
|
6
|
+
const cx = Utils.RatioUtils.convertX
|
|
7
|
+
|
|
8
|
+
interface InfoTextProps extends ViewProps {
|
|
9
|
+
icon: string | number
|
|
10
|
+
text: string
|
|
11
|
+
contentColor?: string
|
|
12
|
+
style?: ViewStyle
|
|
13
|
+
iconStyle?: StyleProp<ImageStyle>
|
|
14
|
+
textStyle?: StyleProp<TextStyle>
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const InfoText = (props: InfoTextProps) => {
|
|
18
|
+
const contentColor = props.contentColor || '#666666'
|
|
19
|
+
const source = typeof props.icon === 'string' ? {uri: props.icon} : props.icon
|
|
20
|
+
return (
|
|
21
|
+
<View style={[styles.root, props.style]}>
|
|
22
|
+
<Image style={[styles.icon, {tintColor: contentColor}, props.iconStyle]}
|
|
23
|
+
source={source}/>
|
|
24
|
+
<Spacer width={cx(4)} height={0}/>
|
|
25
|
+
<Text style={[styles.text, {color: contentColor}, props.textStyle ]}>{props.text}</Text>
|
|
26
|
+
</View>
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const styles = StyleSheet.create({
|
|
31
|
+
root: {
|
|
32
|
+
flexDirection: 'row',
|
|
33
|
+
},
|
|
34
|
+
icon: {
|
|
35
|
+
width: cx(16),
|
|
36
|
+
height: cx(16),
|
|
37
|
+
},
|
|
38
|
+
text: {
|
|
39
|
+
flex: 1,
|
|
40
|
+
marginTop: cx(2.5),
|
|
41
|
+
fontSize: cx(12),
|
|
42
|
+
fontFamily: 'helvetica_neue_lt_std_roman',
|
|
43
|
+
},
|
|
44
|
+
})
|
|
45
|
+
|
|
46
46
|
export default InfoText
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ColorAdjustViewProps } from './ColorAdjustView';
|
|
3
|
-
import { ColorTempAdjustViewProps } from './ColorTempAdjustView';
|
|
4
|
-
interface LampConfigViewProps extends ColorAdjustViewProps, ColorTempAdjustViewProps {
|
|
5
|
-
isColorMode: boolean;
|
|
6
|
-
isSupportColor: boolean;
|
|
7
|
-
setIsColorMode: (isColorMode: boolean) => void;
|
|
8
|
-
}
|
|
9
|
-
declare const _default: React.MemoExoticComponent<(props: LampConfigViewProps) => JSX.Element>;
|
|
10
|
-
export default _default;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ColorAdjustViewProps } from './ColorAdjustView';
|
|
3
|
+
import { ColorTempAdjustViewProps } from './ColorTempAdjustView';
|
|
4
|
+
interface LampConfigViewProps extends ColorAdjustViewProps, ColorTempAdjustViewProps {
|
|
5
|
+
isColorMode: boolean;
|
|
6
|
+
isSupportColor: boolean;
|
|
7
|
+
setIsColorMode: (isColorMode: boolean) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: React.MemoExoticComponent<(props: LampConfigViewProps) => JSX.Element>;
|
|
10
|
+
export default _default;
|
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
import {StyleSheet, View} from 'react-native'
|
|
2
|
-
import React, { memo } from 'react'
|
|
3
|
-
import {Utils} from 'tuya-panel-kit'
|
|
4
|
-
import {useReactive} from 'ahooks'
|
|
5
|
-
import Spacer from './Spacer'
|
|
6
|
-
import ColorAdjustView, {ColorAdjustViewProps} from './ColorAdjustView'
|
|
7
|
-
import ColorTempAdjustView, {ColorTempAdjustViewProps} from './ColorTempAdjustView'
|
|
8
|
-
import SegmentControl from './segmentControl'
|
|
9
|
-
import I18n from '../i18n/index'
|
|
10
|
-
|
|
11
|
-
const {convertX: cx} = Utils.RatioUtils
|
|
12
|
-
|
|
13
|
-
interface LampConfigViewProps extends ColorAdjustViewProps, ColorTempAdjustViewProps {
|
|
14
|
-
isColorMode: boolean
|
|
15
|
-
isSupportColor: boolean
|
|
16
|
-
setIsColorMode: (isColorMode: boolean) => void
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const LampAdjustView = (props: LampConfigViewProps) => {
|
|
20
|
-
|
|
21
|
-
const state = useReactive({
|
|
22
|
-
hasSegmentControl: props.isSupportColor && (props.isSupportBrightness || props.isSupportTemperature),
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
return (
|
|
26
|
-
<View>
|
|
27
|
-
{state.hasSegmentControl &&
|
|
28
|
-
<SegmentControl
|
|
29
|
-
style={styles.segmentControl}
|
|
30
|
-
title1={I18n.getLang('light_sources_tile_rgb_lighting_tab_color')}
|
|
31
|
-
title2={I18n.getLang('light_sources_tile_rgb_lighting_tab_white')}
|
|
32
|
-
isFirst={props.isColorMode}
|
|
33
|
-
setIsFirst={props.setIsColorMode}/>
|
|
34
|
-
}
|
|
35
|
-
{((state.hasSegmentControl && props.isColorMode) || (!state.hasSegmentControl && props.isSupportColor)) &&
|
|
36
|
-
<>
|
|
37
|
-
{state.hasSegmentControl && <Spacer height={cx(10)}/>}
|
|
38
|
-
<ColorAdjustView
|
|
39
|
-
h={props.h}
|
|
40
|
-
s={props.s}
|
|
41
|
-
v={props.v}
|
|
42
|
-
minBrightness={props.minBrightness}
|
|
43
|
-
minSaturation={props.minSaturation}
|
|
44
|
-
reserveSV={props.reserveSV}
|
|
45
|
-
onHSVChange={props.onHSVChange}
|
|
46
|
-
onHSVChangeComplete={props.onHSVChangeComplete}/>
|
|
47
|
-
<Spacer/>
|
|
48
|
-
</>
|
|
49
|
-
}
|
|
50
|
-
{((state.hasSegmentControl && !props.isColorMode) || (!state.hasSegmentControl && (props.isSupportBrightness || props.isSupportTemperature))) &&
|
|
51
|
-
<>
|
|
52
|
-
{state.hasSegmentControl && <Spacer height={cx(10)}/>}
|
|
53
|
-
<ColorTempAdjustView
|
|
54
|
-
minBrightness={props.minBrightness}
|
|
55
|
-
isSupportTemperature={props.isSupportTemperature}
|
|
56
|
-
isSupportBrightness={props.isSupportBrightness}
|
|
57
|
-
colorTemp={props.colorTemp}
|
|
58
|
-
brightness={props.brightness}
|
|
59
|
-
onCCTChange={props.onCCTChange}
|
|
60
|
-
onCCTChangeComplete={props.onCCTChangeComplete}
|
|
61
|
-
onBrightnessChange={props.onBrightnessChange}
|
|
62
|
-
onBrightnessChangeComplete={props.onBrightnessChangeComplete}/>
|
|
63
|
-
<Spacer/>
|
|
64
|
-
</>
|
|
65
|
-
}
|
|
66
|
-
</View>
|
|
67
|
-
)
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
const styles = StyleSheet.create({
|
|
71
|
-
segmentControl: {
|
|
72
|
-
marginHorizontal: cx(16),
|
|
73
|
-
},
|
|
74
|
-
})
|
|
75
|
-
|
|
1
|
+
import {StyleSheet, View} from 'react-native'
|
|
2
|
+
import React, { memo } from 'react'
|
|
3
|
+
import {Utils} from 'tuya-panel-kit'
|
|
4
|
+
import {useReactive} from 'ahooks'
|
|
5
|
+
import Spacer from './Spacer'
|
|
6
|
+
import ColorAdjustView, {ColorAdjustViewProps} from './ColorAdjustView'
|
|
7
|
+
import ColorTempAdjustView, {ColorTempAdjustViewProps} from './ColorTempAdjustView'
|
|
8
|
+
import SegmentControl from './segmentControl'
|
|
9
|
+
import I18n from '../i18n/index'
|
|
10
|
+
|
|
11
|
+
const {convertX: cx} = Utils.RatioUtils
|
|
12
|
+
|
|
13
|
+
interface LampConfigViewProps extends ColorAdjustViewProps, ColorTempAdjustViewProps {
|
|
14
|
+
isColorMode: boolean
|
|
15
|
+
isSupportColor: boolean
|
|
16
|
+
setIsColorMode: (isColorMode: boolean) => void
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const LampAdjustView = (props: LampConfigViewProps) => {
|
|
20
|
+
|
|
21
|
+
const state = useReactive({
|
|
22
|
+
hasSegmentControl: props.isSupportColor && (props.isSupportBrightness || props.isSupportTemperature),
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<View>
|
|
27
|
+
{state.hasSegmentControl &&
|
|
28
|
+
<SegmentControl
|
|
29
|
+
style={styles.segmentControl}
|
|
30
|
+
title1={I18n.getLang('light_sources_tile_rgb_lighting_tab_color')}
|
|
31
|
+
title2={I18n.getLang('light_sources_tile_rgb_lighting_tab_white')}
|
|
32
|
+
isFirst={props.isColorMode}
|
|
33
|
+
setIsFirst={props.setIsColorMode}/>
|
|
34
|
+
}
|
|
35
|
+
{((state.hasSegmentControl && props.isColorMode) || (!state.hasSegmentControl && props.isSupportColor)) &&
|
|
36
|
+
<>
|
|
37
|
+
{state.hasSegmentControl && <Spacer height={cx(10)}/>}
|
|
38
|
+
<ColorAdjustView
|
|
39
|
+
h={props.h}
|
|
40
|
+
s={props.s}
|
|
41
|
+
v={props.v}
|
|
42
|
+
minBrightness={props.minBrightness}
|
|
43
|
+
minSaturation={props.minSaturation}
|
|
44
|
+
reserveSV={props.reserveSV}
|
|
45
|
+
onHSVChange={props.onHSVChange}
|
|
46
|
+
onHSVChangeComplete={props.onHSVChangeComplete}/>
|
|
47
|
+
<Spacer/>
|
|
48
|
+
</>
|
|
49
|
+
}
|
|
50
|
+
{((state.hasSegmentControl && !props.isColorMode) || (!state.hasSegmentControl && (props.isSupportBrightness || props.isSupportTemperature))) &&
|
|
51
|
+
<>
|
|
52
|
+
{state.hasSegmentControl && <Spacer height={cx(10)}/>}
|
|
53
|
+
<ColorTempAdjustView
|
|
54
|
+
minBrightness={props.minBrightness}
|
|
55
|
+
isSupportTemperature={props.isSupportTemperature}
|
|
56
|
+
isSupportBrightness={props.isSupportBrightness}
|
|
57
|
+
colorTemp={props.colorTemp}
|
|
58
|
+
brightness={props.brightness}
|
|
59
|
+
onCCTChange={props.onCCTChange}
|
|
60
|
+
onCCTChangeComplete={props.onCCTChangeComplete}
|
|
61
|
+
onBrightnessChange={props.onBrightnessChange}
|
|
62
|
+
onBrightnessChangeComplete={props.onBrightnessChangeComplete}/>
|
|
63
|
+
<Spacer/>
|
|
64
|
+
</>
|
|
65
|
+
}
|
|
66
|
+
</View>
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const styles = StyleSheet.create({
|
|
71
|
+
segmentControl: {
|
|
72
|
+
marginHorizontal: cx(16),
|
|
73
|
+
},
|
|
74
|
+
})
|
|
75
|
+
|
|
76
76
|
export default memo(LampAdjustView)
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface HSV {
|
|
3
|
-
h: number;
|
|
4
|
-
s: number;
|
|
5
|
-
v: number;
|
|
6
|
-
}
|
|
7
|
-
interface LampConfigViewProps {
|
|
8
|
-
isSupportColor: boolean;
|
|
9
|
-
isSupportCCT: boolean;
|
|
10
|
-
isSupportBrightness: boolean;
|
|
11
|
-
isColorMode: boolean;
|
|
12
|
-
setIsColorMode: (isColorMode: boolean) => void;
|
|
13
|
-
minBrightness?: number;
|
|
14
|
-
minSaturation?: number;
|
|
15
|
-
reserveSV?: boolean;
|
|
16
|
-
hsv: HSV;
|
|
17
|
-
onHSVChange: (hsv: HSV, isComplete: boolean) => void;
|
|
18
|
-
cct: number;
|
|
19
|
-
onCCTChange: (cct: number, isComplete: boolean) => void;
|
|
20
|
-
brightness: number;
|
|
21
|
-
onBrightnessChange: (brightness: number, isComplete: boolean) => void;
|
|
22
|
-
}
|
|
23
|
-
declare const _default: React.MemoExoticComponent<(props: LampConfigViewProps) => JSX.Element>;
|
|
24
|
-
export default _default;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface HSV {
|
|
3
|
+
h: number;
|
|
4
|
+
s: number;
|
|
5
|
+
v: number;
|
|
6
|
+
}
|
|
7
|
+
interface LampConfigViewProps {
|
|
8
|
+
isSupportColor: boolean;
|
|
9
|
+
isSupportCCT: boolean;
|
|
10
|
+
isSupportBrightness: boolean;
|
|
11
|
+
isColorMode: boolean;
|
|
12
|
+
setIsColorMode: (isColorMode: boolean) => void;
|
|
13
|
+
minBrightness?: number;
|
|
14
|
+
minSaturation?: number;
|
|
15
|
+
reserveSV?: boolean;
|
|
16
|
+
hsv: HSV;
|
|
17
|
+
onHSVChange: (hsv: HSV, isComplete: boolean) => void;
|
|
18
|
+
cct: number;
|
|
19
|
+
onCCTChange: (cct: number, isComplete: boolean) => void;
|
|
20
|
+
brightness: number;
|
|
21
|
+
onBrightnessChange: (brightness: number, isComplete: boolean) => void;
|
|
22
|
+
}
|
|
23
|
+
declare const _default: React.MemoExoticComponent<(props: LampConfigViewProps) => JSX.Element>;
|
|
24
|
+
export default _default;
|