@ledvance/ui-biz-bundle 1.1.90 → 1.1.91
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/package.json +1 -1
- package/src/modules/flags/FlagEditPage.tsx +180 -179
- package/src/modules/flags/FlagItem.tsx +26 -42
- package/src/modules/flags/FlagPage.tsx +27 -26
- package/src/modules/history/HistoryPage.tsx +111 -103
- package/src/modules/music/MusicPage.tsx +90 -88
- package/src/modules/timer/TimerPage.tsx +13 -9
- package/src/newModules/biorhythm/BiorhythmEditPage.tsx +54 -54
- package/src/newModules/biorhythm/BiorhythmPage.tsx +163 -162
- package/src/newModules/biorhythm/IconSelect.tsx +5 -4
- package/src/newModules/childLock/ChildLockPage.tsx +49 -47
- package/src/newModules/energyConsumption/component/EnergyModal.tsx +2 -2
- package/src/newModules/fixedTime/FixedTimeDetailPage.tsx +127 -124
- package/src/newModules/fixedTime/FixedTimePage.tsx +108 -104
- package/src/newModules/lightMode/LightModePage.tsx +74 -67
- package/src/newModules/mood/AddMoodPage.tsx +18 -15
- package/src/newModules/mood/DynamicMoodEditorPage.tsx +103 -100
- package/src/newModules/mood/MixDynamicMoodEditor.tsx +107 -104
- package/src/newModules/mood/MoodItem.tsx +59 -55
- package/src/newModules/mood/MoodPage.tsx +58 -57
- package/src/newModules/mood/RecommendMoodItem.tsx +27 -24
- package/src/newModules/mood/StaticMoodEditorPage.tsx +77 -85
- package/src/newModules/overchargeSwitch/OverchargeSwitchPage.tsx +36 -48
- package/src/newModules/powerOnBehavior/LightBehaviorPage.tsx +137 -135
- package/src/newModules/powerOnBehavior/PlugBehaviorPage.tsx +67 -61
- package/src/newModules/randomTime/RandomTimeDetailPage.tsx +114 -151
- package/src/newModules/randomTime/RandomTimePage.tsx +110 -105
- package/src/newModules/randomTime/Summary.tsx +61 -57
- package/src/newModules/remoteControl/RemoteControlPage.tsx +4 -3
- package/src/newModules/select/SelectPage.tsx +65 -62
- package/src/newModules/sleepWakeUp/SleepWakeUpActions.ts +16 -8
- package/src/newModules/sleepWakeUp/SleepWakeUpDetailPage.tsx +131 -123
- package/src/newModules/sleepWakeUp/SleepWakeUpPage.tsx +144 -140
- package/src/newModules/switchGradient/SwitchGradientPage.tsx +24 -25
- package/src/newModules/swithInching/SwithInching.tsx +154 -152
- package/src/newModules/timeSchedule/TimeScheduleDetailPage.tsx +83 -83
- package/src/newModules/timeSchedule/components/ManuaSettings.tsx +3 -2
- package/src/newModules/swithInching/pickerView.tsx +0 -91
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { StyleProp, StyleSheet, View, ViewStyle, Text } from 'react-native'
|
|
3
|
-
import { Picker, Utils } from 'tuya-panel-kit'
|
|
4
|
-
import _ from 'lodash'
|
|
5
|
-
|
|
6
|
-
const { convertX } = Utils.RatioUtils
|
|
7
|
-
|
|
8
|
-
const hours = _.times(61, (n) => _.padStart(n.toString(), 2, '0'))
|
|
9
|
-
const minutes = _.times(61, (n) => _.padStart(n.toString(), 2, '0'))
|
|
10
|
-
const pickerTheme = {
|
|
11
|
-
fontSize: 20,
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
interface LdvPickerViewProps {
|
|
15
|
-
hour: string,
|
|
16
|
-
minute: string,
|
|
17
|
-
setHour: (string) => void,
|
|
18
|
-
setMinute: (string) => void,
|
|
19
|
-
style?: StyleProp<ViewStyle> | undefined,
|
|
20
|
-
unit?:string[]
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const LdvPickerView = (props: LdvPickerViewProps) => {
|
|
24
|
-
|
|
25
|
-
const { hour, minute, unit, setHour, setMinute } = props
|
|
26
|
-
|
|
27
|
-
return (
|
|
28
|
-
<View style={[styles.pickerContainer, props.style]}>
|
|
29
|
-
<View style={styles.picContainer}>
|
|
30
|
-
<Picker
|
|
31
|
-
style={[styles.picker, styles.pickerLeft]}
|
|
32
|
-
theme={pickerTheme}
|
|
33
|
-
itemStyle={styles.pickerItem}
|
|
34
|
-
textSize={convertX(14)}
|
|
35
|
-
selectedValue={hour}
|
|
36
|
-
itemAlign={'center'}
|
|
37
|
-
onValueChange={value => setHour(value as string)}>
|
|
38
|
-
{hours.map((value) => (
|
|
39
|
-
<Picker.Item key={value} value={value} label={value} />
|
|
40
|
-
))}
|
|
41
|
-
</Picker>
|
|
42
|
-
{unit ? <View style={styles.pickerUnit}>
|
|
43
|
-
<Text style={{ color: '#000', fontSize: convertX(18) }}>
|
|
44
|
-
{unit[0]}
|
|
45
|
-
</Text>
|
|
46
|
-
</View> : null}
|
|
47
|
-
</View>
|
|
48
|
-
<View style={styles.picContainer}>
|
|
49
|
-
<Picker
|
|
50
|
-
style={[styles.picker, styles.pickerLeft]}
|
|
51
|
-
theme={pickerTheme}
|
|
52
|
-
itemStyle={styles.pickerItem}
|
|
53
|
-
textSize={convertX(14)}
|
|
54
|
-
selectedValue={minute}
|
|
55
|
-
onValueChange={value => setMinute(value as string)}>
|
|
56
|
-
{minutes.map((value) => (
|
|
57
|
-
<Picker.Item key={value} value={value} label={value} />
|
|
58
|
-
))}
|
|
59
|
-
</Picker>
|
|
60
|
-
{unit ? <View style={styles.pickerUnit}>
|
|
61
|
-
<Text style={{ color: '#000', fontSize: convertX(18) }}>
|
|
62
|
-
{unit[1]}
|
|
63
|
-
</Text>
|
|
64
|
-
</View> : null}
|
|
65
|
-
</View>
|
|
66
|
-
</View>
|
|
67
|
-
)
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
const styles = StyleSheet.create({
|
|
71
|
-
pickerContainer: {
|
|
72
|
-
flexDirection: 'row',
|
|
73
|
-
alignItems: 'center',
|
|
74
|
-
},
|
|
75
|
-
picker: {
|
|
76
|
-
flex: 1,
|
|
77
|
-
},
|
|
78
|
-
pickerLeft: {},
|
|
79
|
-
pickerItem: {},
|
|
80
|
-
picContainer: {
|
|
81
|
-
flex: 1,
|
|
82
|
-
alignItems: 'center',
|
|
83
|
-
flexDirection: 'row',
|
|
84
|
-
},
|
|
85
|
-
pickerUnit: {
|
|
86
|
-
position: 'absolute',
|
|
87
|
-
right: convertX(20),
|
|
88
|
-
},
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
export default LdvPickerView
|