@ledvance/group-ui-biz-bundle 1.0.75 → 1.0.77
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/biorhythm/BiorhythmPage.tsx +1 -1
- package/src/modules/energyConsumption/EnergyConsumptionChart.tsx +22 -30
- package/src/modules/energyConsumption/EnergyConsumptionDetail.tsx +2 -2
- package/src/modules/energyConsumption/EnergyConsumptionPage.tsx +1 -1
- package/src/modules/energyConsumption/component/Overview.tsx +1 -1
- package/src/modules/fixedTimeForPlug/FixedTimeForPlugDetailPage.tsx +67 -86
- package/src/modules/fixedTimeForPlug/FixedTimeForPlugPage.tsx +44 -58
- package/src/modules/fixedTimeForPlug/ItemCard.tsx +29 -26
- package/src/modules/fixedTimeForPlug/Summary.tsx +62 -58
- package/src/modules/lightMode/LightModePage.tsx +2 -2
- package/src/modules/mood_new/AddMoodPage.tsx +16 -15
- package/src/modules/mood_new/MixDynamicMoodEditor.tsx +108 -104
- package/src/modules/mood_new/MoodItem.tsx +59 -54
- package/src/modules/mood_new/MoodPage.tsx +42 -40
- package/src/modules/mood_new/StaticMoodEditorPage.tsx +39 -46
- package/src/modules/overchargeSwitch/OverchargeSwitchPage.tsx +5 -2
- package/src/modules/randomTimeForPlug/ItemCard.tsx +29 -26
- package/src/modules/randomTimeForPlug/RandomTimeForPlugDetailPage.tsx +46 -81
- package/src/modules/randomTimeForPlug/RandomTimeForPlugPage.tsx +58 -67
- package/src/modules/randomTimeForPlug/Summary.tsx +62 -58
- package/src/modules/sleepWakeUp/SleepWakeUpDetailPage.tsx +1 -1
- package/src/modules/sleepWakeUp/SleepWakeUpPage.tsx +1 -1
- package/src/modules/swithInching/SwithInching.tsx +3 -2
- package/src/modules/timeSchedule/Interface.ts +3 -1
- package/src/modules/timeSchedule/TimeScheduleDetailPage.tsx +175 -190
- package/src/modules/timeSchedule/TimeSchedulePage.tsx +55 -54
- package/src/modules/timeSchedule/components/ManuaSettings.tsx +11 -10
- package/src/modules/timeSchedule/components/ScheduleCard.tsx +47 -63
- package/src/modules/timeSchedule/components/Summary.tsx +63 -59
- package/src/modules/timer/TimerAction.ts +15 -2
- package/src/modules/timer/TimerPage.tsx +120 -117
- package/src/modules/swithInching/pickerView.tsx +0 -91
|
@@ -6,8 +6,10 @@ import { Utils } from "tuya-panel-kit";
|
|
|
6
6
|
import Spacer from "@ledvance/base/src/components/Spacer";
|
|
7
7
|
|
|
8
8
|
const { convertX: cx } = Utils.RatioUtils;
|
|
9
|
+
const { withTheme } = Utils.ThemeUtils
|
|
9
10
|
|
|
10
11
|
interface SummaryProps {
|
|
12
|
+
theme?: any
|
|
11
13
|
style?: ViewStyle
|
|
12
14
|
frequency?: string | ReactElement
|
|
13
15
|
time?: string | ReactElement
|
|
@@ -16,6 +18,53 @@ interface SummaryProps {
|
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
const Summary = (props: SummaryProps) => {
|
|
21
|
+
|
|
22
|
+
const styles = StyleSheet.create({
|
|
23
|
+
cardContainer: {
|
|
24
|
+
marginHorizontal: cx(24),
|
|
25
|
+
},
|
|
26
|
+
itemTitle: {
|
|
27
|
+
color: props.theme.global.fontColor,
|
|
28
|
+
fontSize: cx(16),
|
|
29
|
+
fontWeight: 'bold',
|
|
30
|
+
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
31
|
+
},
|
|
32
|
+
summaryContainer: {
|
|
33
|
+
flex: 1,
|
|
34
|
+
flexDirection: 'row',
|
|
35
|
+
marginBottom: cx(10),
|
|
36
|
+
},
|
|
37
|
+
summaryLeft: {
|
|
38
|
+
flexDirection: 'row',
|
|
39
|
+
alignItems: 'center',
|
|
40
|
+
minWidth: cx(100)
|
|
41
|
+
},
|
|
42
|
+
summaryImg: {
|
|
43
|
+
tintColor: props.theme.global.fontColor,
|
|
44
|
+
width: cx(12),
|
|
45
|
+
height: cx(12),
|
|
46
|
+
marginRight: cx(6)
|
|
47
|
+
},
|
|
48
|
+
leftTitle: {
|
|
49
|
+
fontSize: cx(14),
|
|
50
|
+
color: props.theme.global.fontColor,
|
|
51
|
+
},
|
|
52
|
+
summaryRight: {
|
|
53
|
+
flex: 1,
|
|
54
|
+
flexDirection: 'column',
|
|
55
|
+
marginLeft: cx(15),
|
|
56
|
+
},
|
|
57
|
+
rightWrap: {
|
|
58
|
+
borderRadius: cx(16),
|
|
59
|
+
paddingHorizontal: cx(12),
|
|
60
|
+
alignSelf: 'flex-start',
|
|
61
|
+
backgroundColor: props.theme.tag.background,
|
|
62
|
+
},
|
|
63
|
+
rightItem: {
|
|
64
|
+
color: props.theme.tag.fontColor,
|
|
65
|
+
},
|
|
66
|
+
})
|
|
67
|
+
|
|
19
68
|
return (
|
|
20
69
|
<View style={styles.cardContainer}>
|
|
21
70
|
<Text style={styles.itemTitle}>{I18n.getLang('add_randomtimecycle_subheadline_text')}</Text>
|
|
@@ -56,68 +105,23 @@ const Summary = (props: SummaryProps) => {
|
|
|
56
105
|
</View>
|
|
57
106
|
</View>
|
|
58
107
|
{!props.hideActions && <View style={[styles.summaryContainer, { alignItems: 'flex-start' }]}>
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
108
|
+
<View style={styles.summaryLeft}>
|
|
109
|
+
<Image
|
|
110
|
+
source={res.summary_icon3}
|
|
111
|
+
resizeMode="contain"
|
|
112
|
+
style={styles.summaryImg}
|
|
113
|
+
/>
|
|
114
|
+
<View>
|
|
115
|
+
<Text style={styles.leftTitle}>{I18n.getLang('motion_detection_add_time_schedule_actions_text1')}</Text>
|
|
116
|
+
</View>
|
|
117
|
+
</View>
|
|
118
|
+
<View style={styles.summaryRight}>
|
|
119
|
+
{props.actions}
|
|
67
120
|
</View>
|
|
68
|
-
</View>
|
|
69
|
-
<View style={styles.summaryRight}>
|
|
70
|
-
{props.actions}
|
|
71
|
-
</View>
|
|
72
121
|
</View>}
|
|
73
122
|
</View>
|
|
74
123
|
</View>
|
|
75
124
|
)
|
|
76
125
|
}
|
|
77
126
|
|
|
78
|
-
|
|
79
|
-
cardContainer: {
|
|
80
|
-
marginHorizontal: cx(24),
|
|
81
|
-
},
|
|
82
|
-
itemTitle: {
|
|
83
|
-
color: '#000',
|
|
84
|
-
fontSize: cx(16),
|
|
85
|
-
fontWeight: 'bold',
|
|
86
|
-
fontFamily: 'helvetica_neue_lt_std_bd',
|
|
87
|
-
},
|
|
88
|
-
summaryContainer: {
|
|
89
|
-
flex: 1,
|
|
90
|
-
flexDirection: 'row',
|
|
91
|
-
marginBottom: cx(10),
|
|
92
|
-
},
|
|
93
|
-
summaryLeft: {
|
|
94
|
-
flexDirection: 'row',
|
|
95
|
-
alignItems: 'center',
|
|
96
|
-
minWidth: cx(100)
|
|
97
|
-
},
|
|
98
|
-
summaryImg: {
|
|
99
|
-
width: cx(12),
|
|
100
|
-
height: cx(12),
|
|
101
|
-
marginRight: cx(6)
|
|
102
|
-
},
|
|
103
|
-
leftTitle: {
|
|
104
|
-
fontSize: cx(14),
|
|
105
|
-
color: '#000'
|
|
106
|
-
},
|
|
107
|
-
summaryRight: {
|
|
108
|
-
flex: 1,
|
|
109
|
-
flexDirection: 'column',
|
|
110
|
-
marginLeft: cx(15),
|
|
111
|
-
},
|
|
112
|
-
rightWrap: {
|
|
113
|
-
borderRadius: cx(16),
|
|
114
|
-
paddingHorizontal: cx(12),
|
|
115
|
-
alignSelf: 'flex-start',
|
|
116
|
-
backgroundColor: '#cbcbcb',
|
|
117
|
-
},
|
|
118
|
-
rightItem: {
|
|
119
|
-
color: '#000',
|
|
120
|
-
},
|
|
121
|
-
})
|
|
122
|
-
|
|
123
|
-
export default memo(Summary)
|
|
127
|
+
export default memo(withTheme(Summary))
|
|
@@ -191,7 +191,7 @@ const SleepWakeUpPage = (props: {theme?: any}) => {
|
|
|
191
191
|
alignItems: 'center'
|
|
192
192
|
},
|
|
193
193
|
emptyBtn: {
|
|
194
|
-
backgroundColor: props.theme.button.
|
|
194
|
+
backgroundColor: props.theme.button.primary,
|
|
195
195
|
borderRadius: cx(5),
|
|
196
196
|
paddingHorizontal: cx(15),
|
|
197
197
|
paddingVertical: cx(10)
|
|
@@ -4,7 +4,7 @@ import Page from "@ledvance/base/src/components/Page";
|
|
|
4
4
|
import {useDeviceInfo} from "@ledvance/base/src/models/modules/NativePropsSlice";
|
|
5
5
|
import {useNavigation} from '@react-navigation/native'
|
|
6
6
|
import {SwitchButton, Utils} from "tuya-panel-kit";
|
|
7
|
-
import LdvPickerView from "
|
|
7
|
+
import LdvPickerView from "@ledvance/base/src/components/ldvPickerView";
|
|
8
8
|
import I18n from '@ledvance/base/src/i18n'
|
|
9
9
|
import {useReactive, useUpdateEffect} from "ahooks";
|
|
10
10
|
import {useSwitchInching} from "./SwithInchingAction";
|
|
@@ -71,7 +71,7 @@ const SwitchInching = (props: { theme?: any }) => {
|
|
|
71
71
|
|
|
72
72
|
const styles = StyleSheet.create({
|
|
73
73
|
switchContainer: {
|
|
74
|
-
backgroundColor: props.theme.
|
|
74
|
+
backgroundColor: props.theme.container.background,
|
|
75
75
|
marginHorizontal: cx(24),
|
|
76
76
|
padding: cx(10),
|
|
77
77
|
borderRadius: cx(6),
|
|
@@ -149,6 +149,7 @@ const SwitchInching = (props: { theme?: any }) => {
|
|
|
149
149
|
<View style={styles.pickContainer}>
|
|
150
150
|
{switchInching.enable && <View style={styles.disabledCover}/>}
|
|
151
151
|
<LdvPickerView
|
|
152
|
+
maxHour={61}
|
|
152
153
|
hour={state.minute}
|
|
153
154
|
minute={state.second}
|
|
154
155
|
unit={[
|
|
@@ -67,6 +67,7 @@ export interface HSV {
|
|
|
67
67
|
export type Category = 'light' | 'socket' | 'fan' | 'mainLight' | 'secondaryLight'
|
|
68
68
|
|
|
69
69
|
export interface ApplyForItem {
|
|
70
|
+
name?: string
|
|
70
71
|
key: string;
|
|
71
72
|
dp: string;
|
|
72
73
|
type: Category;
|
|
@@ -86,6 +87,7 @@ interface judgmentSupport {
|
|
|
86
87
|
}
|
|
87
88
|
|
|
88
89
|
export interface ManualSettingProps extends judgmentSupport {
|
|
90
|
+
theme?: any
|
|
89
91
|
applyForList: ApplyForItem[];
|
|
90
92
|
dps: Record<string, any>;
|
|
91
93
|
manualData: ComponentConfig;
|
|
@@ -127,7 +129,7 @@ export interface CeilingLightData extends DeviceData, StripLightData, MixLightDa
|
|
|
127
129
|
}
|
|
128
130
|
|
|
129
131
|
export interface FanLightData extends DeviceData {
|
|
130
|
-
fanSpeed: number
|
|
132
|
+
fanSpeed: number
|
|
131
133
|
direction: 'forward' | 'reverse'
|
|
132
134
|
mode: 'nature' | 'normal'
|
|
133
135
|
disinfect: boolean
|