@ledvance/ui-biz-bundle 1.1.85 → 1.1.87

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.1.85",
7
+ "version": "1.1.87",
8
8
  "scripts": {},
9
9
  "dependencies": {
10
10
  "@ledvance/base": "^1.x",
@@ -183,7 +183,7 @@ function newMood(
183
183
  },
184
184
  secondaryLamp: {
185
185
  id: isStatic ? -1 : secondaryId,
186
- enable: true,
186
+ enable: !isStatic,
187
187
  mode: MoodJumpGradientMode.StripJump,
188
188
  speed: 75,
189
189
  ...defStripConfig,
@@ -9,7 +9,7 @@ import {
9
9
  View,
10
10
  } from 'react-native';
11
11
  import { Utils } from 'tuya-panel-kit';
12
- import { useReactive } from 'ahooks';
12
+ import { useReactive, useUpdateEffect } from 'ahooks';
13
13
  import { cloneDeep, isEqual } from 'lodash';
14
14
  import Page from '@ledvance/base/src/components/Page';
15
15
  import Strings from '@ledvance/base/src/i18n';
@@ -122,6 +122,18 @@ const MixDynamicMoodEditorPage = () => {
122
122
  return currentOther.label;
123
123
  }, []);
124
124
 
125
+ useUpdateEffect(() =>{
126
+ if (state.mainNodeIdx < state.mood.mainLamp.nodes?.length){
127
+ state.mainNode = state.mood.mainLamp.nodes[state.mainNodeIdx]
128
+ }
129
+ }, [JSON.stringify(state.mood.mainLamp.nodes), state.mainNodeIdx])
130
+
131
+ useUpdateEffect(() =>{
132
+ if (state.secondaryIdx < state.mood.secondaryLamp.nodes?.length ){
133
+ state.secondaryNode = state.mood.secondaryLamp.nodes[state.secondaryIdx]
134
+ }
135
+ }, [JSON.stringify(state.mood.secondaryLamp.nodes), state.secondaryIdx])
136
+
125
137
  const nameRepeat = useMemo(() => {
126
138
  return params.nameRepeat(state.mood)
127
139
  }, [state.mood.name]);
@@ -61,16 +61,16 @@ const MoodPage = () => {
61
61
  const secondaryIds = map(state.originMoods.map(m => m.secondaryLamp) || [], 'id')
62
62
  return filter([...mainIds, ...secondaryIds], v => v !== undefined) as number[]
63
63
  }, [JSON.stringify(state.originMoods)])
64
-
64
+
65
65
  useEffect(() => {
66
- state.loading = true
66
+ state.loading = true
67
67
  state.timerId = setTimeout(() => {
68
68
  getRemoteMoodList(
69
69
  devId,
70
70
  params,
71
71
  params.featureId
72
72
  ).then(res => {
73
- state.loading = false
73
+ state.loading = false
74
74
  if (res.success && Array.isArray(res.data)) {
75
75
  state.originMoods = cloneDeep(res.data);
76
76
  }
@@ -403,6 +403,7 @@ const styles = StyleSheet.create({
403
403
  popoverItem: {
404
404
  padding: cx(5),
405
405
  alignItems: 'flex-start',
406
+ alignSelf: 'flex-start'
406
407
  },
407
408
  });
408
409
 
@@ -398,7 +398,6 @@ function ManualSettings(props: ManualSettingProps) {
398
398
  <Spacer />
399
399
  </View>
400
400
  ))}
401
- <Spacer height={cx(16)} />
402
401
  </Card>
403
402
  <Spacer />
404
403
  </View>