@ledvance/group-ui-biz-bundle 1.0.73 → 1.0.76

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/BiorhythmDetailPage.tsx +1 -1
  3. package/src/modules/biorhythm/circular/Progress.tsx +2 -2
  4. package/src/modules/energyConsumption/EnergyConsumptionChart.tsx +22 -30
  5. package/src/modules/energyConsumption/EnergyConsumptionDetail.tsx +2 -2
  6. package/src/modules/energyConsumption/EnergyConsumptionPage.tsx +1 -1
  7. package/src/modules/energyConsumption/component/Overview.tsx +1 -1
  8. package/src/modules/fixedTimeForPlug/FixedTimeForPlugDetailPage.tsx +68 -87
  9. package/src/modules/fixedTimeForPlug/FixedTimeForPlugPage.tsx +44 -58
  10. package/src/modules/fixedTimeForPlug/ItemCard.tsx +29 -26
  11. package/src/modules/fixedTimeForPlug/Summary.tsx +62 -58
  12. package/src/modules/fixedTimingForLight/FixedTimingForLightDetailPage.tsx +2 -2
  13. package/src/modules/lightMode/LightModePage.tsx +2 -2
  14. package/src/modules/mood_new/MoodInfo.ts +170 -18
  15. package/src/modules/mood_new/StaticMoodEditorPage.tsx +8 -0
  16. package/src/modules/overchargeSwitch/OverchargeSwitchPage.tsx +5 -2
  17. package/src/modules/randomTimeForPlug/ItemCard.tsx +29 -26
  18. package/src/modules/randomTimeForPlug/RandomTimeForPlugDetailPage.tsx +47 -82
  19. package/src/modules/randomTimeForPlug/RandomTimeForPlugPage.tsx +58 -67
  20. package/src/modules/randomTimeForPlug/Summary.tsx +62 -58
  21. package/src/modules/randomTimingForLight/RandomTimingForLightDetailPage.tsx +2 -2
  22. package/src/modules/sleepWakeUp/SleepWakeUpDetailPage.tsx +35 -28
  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 +22 -3
  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))
@@ -201,7 +201,7 @@ const FixedTimingForLightDetailPage = () => {
201
201
  state.item.weeks[rawIndex] = state.item.weeks[rawIndex] === 1 ? 0 : 1
202
202
  }}/>
203
203
  <Spacer/>
204
- <Text style={styles.cardContainer}>{loopText(state.item.weeks, parseTimer(state.item.startTime * 60))}</Text>
204
+ <Text style={styles.cardContainer}>{loopText(state.item.weeks, parseTimer(state.item.endTime * 60))}</Text>
205
205
  <Spacer/>
206
206
  {/*Apply for */}
207
207
  <View style={styles.cardContainer}>
@@ -320,7 +320,7 @@ const FixedTimingForLightDetailPage = () => {
320
320
  <Spacer />
321
321
  {/* summary */}
322
322
  <Summary
323
- frequency={loopText(state.item.weeks)}
323
+ frequency={loopText(state.item.weeks, parseTimer(state.item.endTime * 60))}
324
324
  time={params.is24Hour ?
325
325
  `${parseTimer(state.item.startTime * 60)} - ${parseTimer(state.item.endTime * 60)}`
326
326
  :
@@ -60,7 +60,7 @@ const LightModePage = (props: { theme?: any }) => {
60
60
  },
61
61
  modeSelectGroup: {
62
62
  marginHorizontal: cx(24),
63
- backgroundColor: props.theme.card.board,
63
+ backgroundColor: props.theme.container.background,
64
64
  borderRadius: cx(4),
65
65
  },
66
66
  modeTip: {
@@ -76,7 +76,7 @@ const LightModePage = (props: { theme?: any }) => {
76
76
  line: {
77
77
  height: cx(1),
78
78
  marginHorizontal: cx(12),
79
- backgroundColor: '#3C3C435B',
79
+ backgroundColor: props.theme.container.divider,
80
80
  },
81
81
  itemRoot: {
82
82
  flexDirection: 'row',
@@ -319,59 +319,211 @@ function getDIMDefSceneList(): RemoteMoodInfo[] {
319
319
  function getStringLightSceneList(): RemoteMoodInfo[] {
320
320
  return [
321
321
  {
322
- n: I18n.getLang('strip_lights_modes_flow_text'),
323
- i: '010d0d3232000000640000640000000064003c64000000006400f06400000000',
322
+ n: I18n.getLang('dynamicmoods_forest'),
323
+ i: "0107104b4b0000003700784c0000000064003364000000002700786400000000",
324
324
  s: '',
325
325
  t: 0,
326
326
  e: false,
327
327
  },
328
328
  {
329
- n: I18n.getLang('strip_lights_modes_rainbow_text'),
330
- i: '0102023232000000640000640000000064003c64000000006400f06400000000',
329
+ n: I18n.getLang('dynamicmoods_desert'),
330
+ i: "0108104b4b000000520022210000000064001045000000006400106400000000",
331
331
  s: '',
332
332
  t: 0,
333
333
  e: false,
334
334
  },
335
335
  {
336
- n: I18n.getLang('string_lights_modes_chase_text'),
337
- i:
338
- '010e0e3232000000640000640000000064003c640000000064007864000000006400b464000000006400f0640000000064012c6400000000',
336
+ n: I18n.getLang('dynamicmoods_dreams'),
337
+ i: "0109104b4b00000064014b14000000005d00b41a0000000064001c1b00000000",
339
338
  s: '',
340
339
  t: 0,
341
340
  e: false,
342
341
  },
343
342
  {
344
- n: I18n.getLang('string_lights_modes_dazzle_text'),
345
- i:
346
- '010f0f3232000000640000640000000064003c640000000064007864000000006400b464000000006400f0640000000064012c6400000000',
343
+ n: I18n.getLang('dynamicmoods_breeze'),
344
+ i: "010a104b4b00000055002b550000000046000051000000006400276400000000",
345
+ s: '',
346
+ t: 0,
347
+ e: false,
348
+ },
349
+ {
350
+ n: I18n.getLang('dynamicmoods_waters'),
351
+ i: "010b104b4b0000006400c364000000006400a032000000002c00f04e00000000",
352
+ s: '',
353
+ t: 0,
354
+ e: false,
355
+ },
356
+ {
357
+ n: I18n.getLang('dynamicmoods_splash'),
358
+ i: "010c104b4b00000064003c640000000064002764000000006400106400000000",
359
+ s: '',
360
+ t: 0,
361
+ e: false,
362
+ },
363
+ {
364
+ n: I18n.getLang('dynamicmoods_sunrise'),
365
+ i: "010d104b4b00000064000948000000006400261d000000006400336400000000",
366
+ s: '',
367
+ t: 0,
368
+ e: false,
369
+ },
370
+ {
371
+ n: I18n.getLang('dynamicmoods_wonderland'),
372
+ i: "010e104b4b0000005a00bb170000000064000002000000004b00000000000000",
373
+ s: '',
374
+ t: 0,
375
+ e: false,
376
+ },
377
+ {
378
+ n: I18n.getLang('dynamicmoods_Twilight'),
379
+ i: "010f104b4b00000064014a3b0000000064002764000000003200b46400000000",
380
+ s: '',
381
+ t: 0,
382
+ e: false,
383
+ },
384
+ {
385
+ n: I18n.getLang('dynamicmoods_symphony'),
386
+ i: "0110104b4b0000006400d2580000000064000000000000006400336400000000",
387
+ s: '',
388
+ t: 0,
389
+ e: false,
390
+ },
391
+ {
392
+ n: I18n.getLang('dynamicmoods_sorbet'),
393
+ i: "0110104b4b0000006400d2580000000064000000000000006400336400000000",
394
+ s: '',
395
+ t: 0,
396
+ e: false,
397
+ },
398
+ {
399
+ n: I18n.getLang('dynamicmoods_mansion'),
400
+ i: "0112104b4b00000032012c64000000006400b464000000006400276400000000",
401
+ s: '',
402
+ t: 0,
403
+ e: false,
404
+ },
405
+ {
406
+ n: I18n.getLang('dynamicmoods_hour'),
407
+ i: "0113104b4b000000640033640000000064002164000000006400261d00000000",
408
+ s: '',
409
+ t: 0,
410
+ e: false,
411
+ },
412
+ {
413
+ n: I18n.getLang('dynamicmoods_isle'),
414
+ i: "0114104b4b0000003200786400000000370092430000000063005a6400000000",
415
+ s: '',
416
+ t: 0,
417
+ e: false,
418
+ },
419
+ {
420
+ n: I18n.getLang('dynamicmoods_Beat'),
421
+ i: "0115104b4b0000006400b4640000000064012c640000000064003c6400000000",
422
+ s: '',
423
+ t: 0,
424
+ e: false,
425
+ },
426
+ {
427
+ n: I18n.getLang('dynamicmoods_glamour'),
428
+ i: "0116104b4b000000640033640000000032012c640000000064015e1900000000",
429
+ s: '',
430
+ t: 0,
431
+ e: false,
432
+ },
433
+ {
434
+ n: I18n.getLang('dynamicmoods_edreams'),
435
+ i: "0117104b4b00000064012c64000000006400b464000000006400276400000000",
436
+ s: '',
437
+ t: 0,
438
+ e: false,
439
+ },
440
+ {
441
+ n: I18n.getLang('dynamicmoods_sunset'),
442
+ i: "0118104b4b000000640010640000000064001d450000000055002b5500000000",
443
+ s: '',
444
+ t: 0,
445
+ e: false,
446
+ },
447
+ {
448
+ n: I18n.getLang('dynamicmoods_carnival'),
449
+ i: "0119104b4b00000064012c6400000000640027640000000064003c6400000000",
450
+ s: '',
451
+ t: 0,
452
+ e: false,
453
+ },
454
+ {
455
+ n: I18n.getLang('dynamicmoods_serenade'),
456
+ i: "011a104b4b0000002c00f04e000000001f00b429000000006200f00800000000",
457
+ s: '',
458
+ t: 0,
459
+ e: false,
460
+ },
461
+ {
462
+ n: I18n.getLang('dynamicmoods_glow'),
463
+ i: "011b104b4b00000064001e640000000064003064000000006400005000000000",
464
+ s: '',
465
+ t: 0,
466
+ e: false,
467
+ },
468
+ {
469
+ n: I18n.getLang('dynamicmoods_Canopy'),
470
+ i: "011c104b4b00000028007864000000003c007843000000003c001e4300000000",
471
+ s: '',
472
+ t: 0,
473
+ e: false,
474
+ },
475
+ {
476
+ n: I18n.getLang('dynamicmoods_Burst'),
477
+ i: "011d104b4b0000006400006400000000640027640000000064003c640000000064007864000000006400d264000000006401116400000000",
478
+ s: '',
479
+ t: 0,
480
+ e: false,
481
+ },
482
+ {
483
+ n: I18n.getLang('dynamicmoods_Lights'),
484
+ i: "011e104b4b00000064012c640000000064003c64000000006400b464000000006400186400000000",
485
+ s: '',
486
+ t: 0,
487
+ e: false,
488
+ },
489
+ {
490
+ n: I18n.getLang('dynamicmoods_Dreamscape'),
491
+ i: "011f104b4b00000064012c14000000006400f0140000000064003c14000000006400b41400000000",
492
+ s: '',
493
+ t: 0,
494
+ e: false,
495
+ },
496
+ {
497
+ n: I18n.getLang('dynamicmoods_NLights'),
498
+ i: "0120104b4b00000064009664000000006400d2640000000064010e6400000000",
347
499
  s: '',
348
500
  t: 0,
349
501
  e: false,
350
502
  },
351
503
  {
352
- n: I18n.getLang('other_lights_modes_gradient_text'),
353
- i: '01101032320000006400f0640000000064012c640000000064003c6400000000',
504
+ n: I18n.getLang('dynamicmoods_paradise'),
505
+ i: "0121104b4b0000006401403c0000000064001e500000000064003c3c00000000",
354
506
  s: '',
355
507
  t: 0,
356
508
  e: false,
357
509
  },
358
510
  {
359
- n: I18n.getLang('other_lights_modes_jump_text'),
360
- i: '010a0a32320000006400f0640000000064012c640000000064003c6400000000',
511
+ n: I18n.getLang('dynamicmoods_ice'),
512
+ i: "0122104b4b000000640018640000000064000000000000006400d86400000000",
361
513
  s: '',
362
514
  t: 0,
363
515
  e: false,
364
516
  },
365
517
  {
366
- n: I18n.getLang('strip_lights_modes_breath_text'),
367
- i: '010b0b32320000006400f0640000000064012c640000000064003c6400000000',
518
+ n: I18n.getLang('dynamicmoods_voyage'),
519
+ i: "0123104b4b0000002800f0640000000028010e64000000006400000000000000",
368
520
  s: '',
369
521
  t: 0,
370
522
  e: false,
371
523
  },
372
524
  {
373
- n: I18n.getLang('string_lights_modes_blink_text'),
374
- i: '010c0c32320000006400f0640000000064012c640000000064003c6400000000',
525
+ n: I18n.getLang('dynamicmoods_wave'),
526
+ i: "0124104b4b0000006400d264000000006400b464000000006400966400000000",
375
527
  s: '',
376
528
  t: 0,
377
529
  e: false,
@@ -177,6 +177,14 @@ const StaticMoodEditorPage = () => {
177
177
  reserveSV={true}
178
178
  setIsColorMode={isColorMode => {
179
179
  state.mainNode.isColorNode = isColorMode;
180
+ if (isColorMode && state.mainNode.h === 0 && state.mainNode.s === 0 && state.mainNode.v === 0) {
181
+ state.mainNode.s = 100;
182
+ state.mainNode.v = 100;
183
+ } else {
184
+ if (state.mainNode.brightness === 0 && state.mainNode.colorTemp === 0) {
185
+ state.mainNode.brightness = 100;
186
+ }
187
+ }
180
188
  }}
181
189
  hsv={state.mainNode}
182
190
  onHSVChange={(hsv) => {
@@ -57,6 +57,9 @@ const OverchargeSwitchPage = (props: { theme?: any }) => {
57
57
  fontFamily: 'helvetica_neue_lt_std_bd',
58
58
  paddingVertical: cx(16),
59
59
  },
60
+ desc: {
61
+ color: props.theme.global.fontColor,
62
+ },
60
63
  shadow: {
61
64
  shadowColor: props.theme.card.shadowColor,
62
65
  shadowOpacity: 0.2,
@@ -66,7 +69,7 @@ const OverchargeSwitchPage = (props: { theme?: any }) => {
66
69
  width: 0,
67
70
  height: 4,
68
71
  },
69
- backgroundColor: props.theme.global.background,
72
+ backgroundColor: props.theme.card.background,
70
73
  borderRadius: 8,
71
74
  },
72
75
  })
@@ -80,7 +83,7 @@ const OverchargeSwitchPage = (props: { theme?: any }) => {
80
83
  <Text style={styles.title}>{I18n.getLang('switch_overcharge_headline_text')}</Text>
81
84
  </View>
82
85
  <View style={{ paddingBottom: cx(16) }}>
83
- <Text>{I18n.getLang('switch_overcharge_headline_description')}</Text>
86
+ <Text style={styles.desc}>{I18n.getLang('switch_overcharge_headline_description')}</Text>
84
87
  </View>
85
88
  </View>
86
89
  <Spacer style={{ flex: 1 }} height={0} width={0} />
@@ -7,9 +7,11 @@ import {getIsClosed, loopText} from "@ledvance/base/src/utils/common";
7
7
  import {parseHour12} from "@tuya/tuya-panel-lamp-sdk/lib/utils";
8
8
 
9
9
  const {convertX: cx} = Utils.RatioUtils
10
+ const { withTheme } = Utils.ThemeUtils
10
11
  const {parseTimer} = Utils.TimeUtils
11
12
 
12
13
  export interface ItemCardProps<T> {
14
+ theme?: any
13
15
  item: T & {
14
16
  enable: boolean
15
17
  startTime: number
@@ -25,8 +27,33 @@ export interface ItemCardProps<T> {
25
27
 
26
28
  const ItemCard = <T, >(props: ItemCardProps<T>) => {
27
29
  const {item, is24Hour, onSwitch, onPress} = props
28
- // 判断是否关闭
30
+ // 判断是否关闭
29
31
  const closed = getIsClosed(item)
32
+
33
+
34
+ const styles = StyleSheet.create({
35
+ itemCard: {
36
+ marginHorizontal: cx(24),
37
+ paddingHorizontal: cx(16),
38
+ },
39
+ switchLine: {
40
+ flexDirection: 'row',
41
+ alignItems: 'center',
42
+ },
43
+ time: {
44
+ flex: 1,
45
+ color: props.theme.global.fontColor,
46
+ fontSize: cx(16),
47
+ fontWeight: 'bold',
48
+ fontFamily: 'helvetica_neue_lt_std_bd',
49
+ },
50
+ switchBtn: {},
51
+ loopText: {
52
+ color: props.theme.global.fontColor,
53
+ fontSize: cx(14),
54
+ fontFamily: 'helvetica_neue_lt_std_roman',
55
+ },
56
+ })
30
57
  return (
31
58
  <Card style={styles.itemCard} onPress={onPress}>
32
59
  <Spacer height={cx(16)}/>
@@ -52,28 +79,4 @@ const ItemCard = <T, >(props: ItemCardProps<T>) => {
52
79
  )
53
80
  }
54
81
 
55
- const styles = StyleSheet.create({
56
- itemCard: {
57
- marginHorizontal: cx(24),
58
- paddingHorizontal: cx(16),
59
- },
60
- switchLine: {
61
- flexDirection: 'row',
62
- alignItems: 'center',
63
- },
64
- time: {
65
- flex: 1,
66
- color: '#000',
67
- fontSize: cx(16),
68
- fontWeight: 'bold',
69
- fontFamily: 'helvetica_neue_lt_std_bd',
70
- },
71
- switchBtn: {},
72
- loopText: {
73
- color: '#000',
74
- fontSize: cx(14),
75
- fontFamily: 'helvetica_neue_lt_std_roman',
76
- },
77
- })
78
-
79
- export default ItemCard
82
+ export default withTheme(ItemCard)