@ledvance/ui-biz-bundle 1.0.90 → 1.1.2

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 CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "@ledvance/ui-biz-bundle",
5
5
  "pid": [],
6
6
  "uiid": "",
7
- "version": "1.0.90",
7
+ "version": "1.1.2",
8
8
  "scripts": {},
9
9
  "dependencies": {
10
10
  "@ledvance/base": "^1.x",
@@ -4,8 +4,8 @@ import { SwitchButton, Utils } from 'tuya-panel-kit';
4
4
  import { loopText } from '@ledvance/base/src/utils/common';
5
5
  import Card from '@ledvance/base/src/components/Card';
6
6
  import I18n from '@ledvance/base/src/i18n';
7
- import { cloneDeep } from 'lodash';
8
7
  const { convertX } = Utils.RatioUtils;
8
+ const { parseTimer } = Utils.TimeUtils
9
9
 
10
10
  interface LdvScheduleItemProps {
11
11
  item: any
@@ -88,7 +88,7 @@ const LdvScheduleItem = (props: LdvScheduleItemProps) => {
88
88
  {item.isSleep ? getSleepTimeString(item) : getWakeUpTimeString(item)}
89
89
  </Text>
90
90
  <Text style={styles.loop}>
91
- {loopText(item.loops)}
91
+ {loopText(item.loops, parseTimer((item.time[0] * 60 + item.time[1]) * 60))}
92
92
  </Text>
93
93
  <Text style={styles.name}>{item.name}</Text>
94
94
  <View style={styles.typeContainer}>
@@ -56,7 +56,7 @@ const SleepWakeUpPage = () => {
56
56
  })
57
57
 
58
58
  const isMaxNum = useMemo(() => {
59
- return state.sleepScheduleList.length >= MAX_SCHEDULE && state.wakeUpScheduleList >= MAX_SCHEDULE
59
+ return state.sleepScheduleList.length >= MAX_SCHEDULE && state.wakeUpScheduleList.length >= MAX_SCHEDULE
60
60
  }, [state.sleepScheduleList, state.wakeUpScheduleList])
61
61
 
62
62
  const onAddScheduleDialogItemClick = useCallback((isSleep: boolean, mode: 'add' | 'edit', scheduleItem?: any) => {
@@ -321,7 +321,7 @@ const SleepWakeUpPage = () => {
321
321
  <Spacer />
322
322
  <TextButton
323
323
  style={styles.emptyBtn}
324
- textStyle={isWakeUpMax ? styles.disableItemText : { color: '#fff' }}
324
+ textStyle={isSleepMax ? styles.disableItemText : { color: '#fff' }}
325
325
  text={I18n.getLang('sleepwakeschedule_add_button_text1')}
326
326
  onPress={() => onAddScheduleDialogItemClick(true, 'add')}
327
327
  />
@@ -347,10 +347,12 @@ const SleepWakeUpPage = () => {
347
347
  {
348
348
  text: I18n.getLang('sleepwakeschedule_add_button_text1'),
349
349
  value: true,
350
+ isMax: isSleepMax
350
351
  },
351
352
  {
352
353
  text: I18n.getLang('sleepwakeschedule_add_button_text2'),
353
354
  value: false,
355
+ isMax: isWakeUpMax
354
356
  },
355
357
  ]}
356
358
  onItemPress={(isSleep) => onAddScheduleDialogItemClick(isSleep, 'add')}
@@ -84,6 +84,7 @@ const ManualSetting = (props: ManualSettingProps) => {
84
84
  ...state.singleActions,
85
85
  enable
86
86
  }
87
+ props.changeSkillEnable(props.dps[0].dpId, enable)
87
88
  state.flag = Symbol()
88
89
  }} />
89
90
  {state.singleActions.enable && <LampSwitchCard
@@ -28,7 +28,7 @@ const MoodSetting = (props: MoodSettingProps) => {
28
28
  const devId = useDeviceId()
29
29
  const isUVCFan = isUVCFanDevice()
30
30
  const state = useReactive({
31
- scenes: moods,
31
+ scenes: cloneDeep(moods),
32
32
  staticTagChecked: true,
33
33
  dynamicTagChecked: true,
34
34
  filteredMoods: cloneDeep(moods),
@@ -36,7 +36,7 @@ const MoodSetting = (props: MoodSettingProps) => {
36
36
  })
37
37
 
38
38
  useUpdateEffect(() => {
39
- state.scenes = moods
39
+ state.scenes = cloneDeep(moods)
40
40
  }, [moods])
41
41
 
42
42
  useEffect(() => {