@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.
Files changed (33) hide show
  1. package/package.json +1 -1
  2. package/src/modules/biorhythm/BiorhythmPage.tsx +1 -1
  3. package/src/modules/energyConsumption/EnergyConsumptionChart.tsx +22 -30
  4. package/src/modules/energyConsumption/EnergyConsumptionDetail.tsx +2 -2
  5. package/src/modules/energyConsumption/EnergyConsumptionPage.tsx +1 -1
  6. package/src/modules/energyConsumption/component/Overview.tsx +1 -1
  7. package/src/modules/fixedTimeForPlug/FixedTimeForPlugDetailPage.tsx +67 -86
  8. package/src/modules/fixedTimeForPlug/FixedTimeForPlugPage.tsx +44 -58
  9. package/src/modules/fixedTimeForPlug/ItemCard.tsx +29 -26
  10. package/src/modules/fixedTimeForPlug/Summary.tsx +62 -58
  11. package/src/modules/lightMode/LightModePage.tsx +2 -2
  12. package/src/modules/mood_new/AddMoodPage.tsx +16 -15
  13. package/src/modules/mood_new/MixDynamicMoodEditor.tsx +108 -104
  14. package/src/modules/mood_new/MoodItem.tsx +59 -54
  15. package/src/modules/mood_new/MoodPage.tsx +42 -40
  16. package/src/modules/mood_new/StaticMoodEditorPage.tsx +39 -46
  17. package/src/modules/overchargeSwitch/OverchargeSwitchPage.tsx +5 -2
  18. package/src/modules/randomTimeForPlug/ItemCard.tsx +29 -26
  19. package/src/modules/randomTimeForPlug/RandomTimeForPlugDetailPage.tsx +46 -81
  20. package/src/modules/randomTimeForPlug/RandomTimeForPlugPage.tsx +58 -67
  21. package/src/modules/randomTimeForPlug/Summary.tsx +62 -58
  22. package/src/modules/sleepWakeUp/SleepWakeUpDetailPage.tsx +1 -1
  23. package/src/modules/sleepWakeUp/SleepWakeUpPage.tsx +1 -1
  24. package/src/modules/swithInching/SwithInching.tsx +3 -2
  25. package/src/modules/timeSchedule/Interface.ts +3 -1
  26. package/src/modules/timeSchedule/TimeScheduleDetailPage.tsx +175 -190
  27. package/src/modules/timeSchedule/TimeSchedulePage.tsx +55 -54
  28. package/src/modules/timeSchedule/components/ManuaSettings.tsx +11 -10
  29. package/src/modules/timeSchedule/components/ScheduleCard.tsx +47 -63
  30. package/src/modules/timeSchedule/components/Summary.tsx +63 -59
  31. package/src/modules/timer/TimerAction.ts +15 -2
  32. package/src/modules/timer/TimerPage.tsx +120 -117
  33. 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
- <View style={styles.summaryLeft}>
60
- <Image
61
- source={res.summary_icon3}
62
- resizeMode="contain"
63
- style={styles.summaryImg}
64
- />
65
- <View>
66
- <Text style={styles.leftTitle}>{I18n.getLang('motion_detection_add_time_schedule_actions_text1')}</Text>
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
- const styles = StyleSheet.create({
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))
@@ -362,7 +362,7 @@ const SleepWakeUpDetailPage = (props: {theme?: any}) => {
362
362
  </Text>
363
363
  <View
364
364
  style={{
365
- backgroundColor: props.theme.card.board,
365
+ backgroundColor: props.theme.card.border,
366
366
  borderRadius: 4,
367
367
  minHeight: cx(50),
368
368
  flex: 1,
@@ -191,7 +191,7 @@ const SleepWakeUpPage = (props: {theme?: any}) => {
191
191
  alignItems: 'center'
192
192
  },
193
193
  emptyBtn: {
194
- backgroundColor: props.theme.button.active,
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 "./pickerView";
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.card.board,
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