@ledvance/ui-biz-bundle 1.1.92 → 1.1.94

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 (50) hide show
  1. package/package.json +1 -1
  2. package/src/modules/flags/FlagEditPage.tsx +13 -12
  3. package/src/modules/flags/FlagItem.tsx +4 -3
  4. package/src/modules/flags/FlagPage.tsx +59 -41
  5. package/src/modules/history/HistoryPage.tsx +11 -10
  6. package/src/modules/mood/MixMood/AddMixMoodPage.tsx +2 -2
  7. package/src/modules/mood/MixMood/MixMoodEditPage.tsx +4 -4
  8. package/src/modules/mood/MixMood/MixMoodPage.tsx +4 -4
  9. package/src/modules/music/MusicPage.tsx +10 -8
  10. package/src/modules/sleepWakeup/DeviceState.tsx +4 -4
  11. package/src/modules/sleepWakeup/SleepWakeUpPage.tsx +2 -2
  12. package/src/modules/timer/TimerPage.tsx +18 -17
  13. package/src/newModules/biorhythm/BiorhythmEditPage.tsx +13 -12
  14. package/src/newModules/biorhythm/BiorhythmPage.tsx +23 -22
  15. package/src/newModules/biorhythm/IconSelect.tsx +7 -5
  16. package/src/newModules/childLock/ChildLockPage.tsx +7 -6
  17. package/src/newModules/energyConsumption/EnergyConsumptionChart.tsx +3 -2
  18. package/src/newModules/energyConsumption/EnergyConsumptionDetail.tsx +16 -15
  19. package/src/newModules/energyConsumption/EnergyConsumptionPage.tsx +16 -15
  20. package/src/newModules/energyConsumption/component/BarChart.tsx +18 -5
  21. package/src/newModules/energyConsumption/component/EnergyModal.tsx +26 -25
  22. package/src/newModules/energyConsumption/component/Overview.tsx +10 -9
  23. package/src/newModules/fixedTime/FixedTimeDetailPage.tsx +23 -22
  24. package/src/newModules/fixedTime/FixedTimePage.tsx +12 -11
  25. package/src/newModules/lightMode/LightModePage.tsx +9 -8
  26. package/src/newModules/mood/AddMoodPage.tsx +3 -2
  27. package/src/newModules/mood/DynamicMoodEditorPage.tsx +13 -12
  28. package/src/newModules/mood/MixDynamicMoodEditor.tsx +19 -18
  29. package/src/newModules/mood/MoodActions.ts +17 -4
  30. package/src/newModules/mood/MoodInfo.ts +0 -7
  31. package/src/newModules/mood/MoodItem.tsx +5 -4
  32. package/src/newModules/mood/MoodPage.tsx +9 -4
  33. package/src/newModules/mood/RecommendMoodItem.tsx +4 -3
  34. package/src/newModules/mood/StaticMoodEditorPage.tsx +5 -4
  35. package/src/newModules/overchargeSwitch/OverchargeSwitchPage.tsx +6 -5
  36. package/src/newModules/powerOnBehavior/LightBehaviorPage.tsx +10 -9
  37. package/src/newModules/powerOnBehavior/PlugBehaviorPage.tsx +8 -7
  38. package/src/newModules/randomTime/RandomTimeDetailPage.tsx +15 -14
  39. package/src/newModules/randomTime/RandomTimePage.tsx +12 -11
  40. package/src/newModules/randomTime/Summary.tsx +7 -6
  41. package/src/newModules/remoteControl/RemoteControlPage.tsx +3 -2
  42. package/src/newModules/select/SelectPage.tsx +10 -9
  43. package/src/newModules/sleepWakeUp/SleepWakeUpDetailPage.tsx +24 -23
  44. package/src/newModules/sleepWakeUp/SleepWakeUpPage.tsx +15 -14
  45. package/src/newModules/switchGradient/SwitchGradientPage.tsx +4 -3
  46. package/src/newModules/swithInching/SwithInching.tsx +7 -6
  47. package/src/newModules/timeSchedule/TimeScheduleDetailPage.tsx +20 -19
  48. package/src/newModules/timeSchedule/TimeSchedulePage.tsx +8 -7
  49. package/src/newModules/timeSchedule/components/ManuaSettings.tsx +9 -9
  50. package/src/newModules/timeSchedule/components/ScheduleCard.tsx +6 -4
@@ -73,7 +73,7 @@ function ManualSettings(props: ManualSettingProps) {
73
73
  <Card style={{ marginHorizontal: cx(24) }}>
74
74
  <LdvSwitch
75
75
  title={item.name || item.key}
76
- color={props.theme.card.background}
76
+ color={props.theme?.card.background}
77
77
  colorAlpha={1}
78
78
  enable={item.enable}
79
79
  setEnable={(enable: boolean) => {
@@ -187,7 +187,7 @@ function ManualSettings(props: ManualSettingProps) {
187
187
  ))}
188
188
  </View>
189
189
  );
190
- }, [state.deviceData, state.applyForList, props.theme.type]);
190
+ }, [state.deviceData, state.applyForList, props.theme?.type]);
191
191
 
192
192
  const mixLightCard = useMemo(() => {
193
193
  return (
@@ -197,7 +197,7 @@ function ManualSettings(props: ManualSettingProps) {
197
197
  <Card style={{ marginHorizontal: cx(24) }}>
198
198
  <LdvSwitch
199
199
  title={item.key}
200
- color={props.theme.card.background}
200
+ color={props.theme?.card.background}
201
201
  colorAlpha={1}
202
202
  enable={item.enable}
203
203
  setEnable={(enable: boolean) => {
@@ -248,7 +248,7 @@ function ManualSettings(props: ManualSettingProps) {
248
248
  ))}
249
249
  </View>
250
250
  );
251
- }, [state.deviceData, state.applyForList, props.theme.type]);
251
+ }, [state.deviceData, state.applyForList, props.theme?.type]);
252
252
 
253
253
  const stripLightCard = useMemo(() => {
254
254
  const deviceData = state.deviceData as StripLightData
@@ -257,7 +257,7 @@ function ManualSettings(props: ManualSettingProps) {
257
257
  <Card style={{ marginHorizontal: cx(24) }}>
258
258
  <LdvSwitch
259
259
  title={I18n.getLang('light_sources_tile_tw_lighting_headline')}
260
- color={props.theme.card.background}
260
+ color={props.theme?.card.background}
261
261
  colorAlpha={1}
262
262
  enable={state.applyForList[0]?.enable}
263
263
  setEnable={(enable: boolean) => {
@@ -314,7 +314,7 @@ function ManualSettings(props: ManualSettingProps) {
314
314
  <Spacer />
315
315
  </View>
316
316
  );
317
- }, [state.deviceData, state.applyForList, props.theme.type]);
317
+ }, [state.deviceData, state.applyForList, props.theme?.type]);
318
318
 
319
319
  const ceilingLightCard = useMemo(() => {
320
320
  const deviceData = state.deviceData as StripLightData
@@ -325,7 +325,7 @@ function ManualSettings(props: ManualSettingProps) {
325
325
  <Card style={{ marginHorizontal: cx(24) }}>
326
326
  <LdvSwitch
327
327
  title={item.key}
328
- color={props.theme.card.background}
328
+ color={props.theme?.card.background}
329
329
  colorAlpha={1}
330
330
  enable={item.enable}
331
331
  setEnable={(enable: boolean) => {
@@ -405,7 +405,7 @@ function ManualSettings(props: ManualSettingProps) {
405
405
  ))}
406
406
  </View>
407
407
  )
408
- }, [state.deviceData, state.applyForList, props.theme.type])
408
+ }, [state.deviceData, state.applyForList, props.theme?.type])
409
409
 
410
410
  const powerStripCard = useMemo(() => {
411
411
  return (
@@ -451,7 +451,7 @@ function ManualSettings(props: ManualSettingProps) {
451
451
  ? powerStripCard
452
452
  : lightSourceCard;
453
453
  return component;
454
- }, [props.manualData, state.applyForList, state.deviceData, props.theme.type]);
454
+ }, [props.manualData, state.applyForList, state.deviceData, props.theme?.type]);
455
455
 
456
456
 
457
457
  return <View>{componentRender}</View>;
@@ -5,11 +5,13 @@ import { SwitchButton, Utils } from 'tuya-panel-kit';
5
5
  import { convertTo12HourFormat, loopText } from '@ledvance/base/src/utils/common';
6
6
  import { ApplyForItem, Timer } from "../Interface";
7
7
  import { useSystemTimeFormate } from "@ledvance/base/src/models/modules/NativePropsSlice";
8
+ import ThemeType from '@ledvance/base/src/config/themeType'
9
+
8
10
  const { convertX: cx } = Utils.RatioUtils;
9
11
  const { withTheme } = Utils.ThemeUtils
10
12
 
11
13
  interface ScheduleCardProps {
12
- theme?: any
14
+ theme?: ThemeType
13
15
  item: Timer
14
16
  style?: ViewStyle
15
17
  showTag?: boolean
@@ -42,20 +44,20 @@ const ScheduleCard = (props: ScheduleCardProps) => {
42
44
  marginLeft: cx(16),
43
45
  },
44
46
  time: {
45
- color: props.theme.global.fontColor,
47
+ color: props.theme?.global.fontColor,
46
48
  marginBottom: cx(5),
47
49
  fontSize: 16,
48
50
  fontFamily: 'helvetica_neue_lt_std_bd',
49
51
  fontWeight: 'bold',
50
52
  },
51
53
  loop: {
52
- color: props.theme.global.fontColor,
54
+ color: props.theme?.global.fontColor,
53
55
  fontSize: cx(14),
54
56
  fontFamily: 'helvetica_neue_lt_std_bd',
55
57
  marginTop: cx(8),
56
58
  },
57
59
  name: {
58
- color: props.theme.global.fontColor,
60
+ color: props.theme?.global.fontColor,
59
61
  fontSize: cx(14),
60
62
  fontFamily: 'helvetica_neue_lt_std_bd',
61
63
  marginTop: cx(8),