@ledvance/group-ui-biz-bundle 1.0.70 → 1.0.72
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,10 +4,11 @@
|
|
|
4
4
|
"name": "@ledvance/group-ui-biz-bundle",
|
|
5
5
|
"pid": [],
|
|
6
6
|
"uiid": "",
|
|
7
|
-
"version": "1.0.
|
|
7
|
+
"version": "1.0.72",
|
|
8
8
|
"scripts": {},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@ledvance/base": "^1.x",
|
|
11
|
+
"@ledvance/react-native-echarts-pro": "^1.x",
|
|
11
12
|
"@reduxjs/toolkit": "^1.8.6",
|
|
12
13
|
"@tuya/tuya-panel-api": "^1.12.0",
|
|
13
14
|
"@tuya/tuya-panel-lamp-sdk": "^1.14.1",
|
|
@@ -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 { StaticMoodEditorPageParams, StaticMoodEditorPageState } from './StaticMoodEditorPage';
|
|
@@ -119,6 +119,18 @@ const MixDynamicMoodEditorPage = () => {
|
|
|
119
119
|
return currentOther.label;
|
|
120
120
|
}, []);
|
|
121
121
|
|
|
122
|
+
useUpdateEffect(() =>{
|
|
123
|
+
if (state.mainNodeIdx < state.mood.mainLamp.nodes?.length){
|
|
124
|
+
state.mainNode = state.mood.mainLamp.nodes[state.mainNodeIdx]
|
|
125
|
+
}
|
|
126
|
+
}, [JSON.stringify(state.mood.mainLamp.nodes), state.mainNodeIdx])
|
|
127
|
+
|
|
128
|
+
useUpdateEffect(() =>{
|
|
129
|
+
if (state.secondaryIdx < state.mood.secondaryLamp.nodes?.length ){
|
|
130
|
+
state.secondaryNode = state.mood.secondaryLamp.nodes[state.secondaryIdx]
|
|
131
|
+
}
|
|
132
|
+
}, [JSON.stringify(state.mood.secondaryLamp.nodes), state.secondaryIdx])
|
|
133
|
+
|
|
122
134
|
const nameRepeat = useMemo(() => {
|
|
123
135
|
return params.nameRepeat(state.mood)
|
|
124
136
|
}, [state.mood.name]);
|
|
@@ -37,7 +37,7 @@ const MoodItem = (props: MoodItemProps) => {
|
|
|
37
37
|
}, [mood.mainLamp.nodes, mood.secondaryLamp.nodes]);
|
|
38
38
|
|
|
39
39
|
const gradientMode = useMemo(() => (
|
|
40
|
-
deviceTypeOption?.isStringLight ? MoodJumpGradientMode.StringGradient :
|
|
40
|
+
deviceTypeOption?.isStringLight ? MoodJumpGradientMode.StringGradient : deviceTypeOption?.isStripLight ? MoodJumpGradientMode.StripGradient : MoodJumpGradientMode.SourceGradient
|
|
41
41
|
), [MoodJumpGradientMode, deviceTypeOption])
|
|
42
42
|
return (
|
|
43
43
|
<Card style={[styles.card, props.style]} onPress={props.onPress}>
|
|
@@ -56,7 +56,7 @@ const MoodItem = (props: MoodItemProps) => {
|
|
|
56
56
|
{(isMix && !!mood.secondaryLamp.nodes.length) && (
|
|
57
57
|
<>
|
|
58
58
|
<Spacer height={cx(7)} />
|
|
59
|
-
<MixMoodColorsLine mixSubLight={mood.secondaryLamp} isMix={isMix} type={mood.secondaryLamp.mode ===
|
|
59
|
+
<MixMoodColorsLine mixSubLight={mood.secondaryLamp} isMix={isMix} type={mood.secondaryLamp.mode === (deviceTypeOption?.isCeilingLight ? MoodJumpGradientMode.StripGradient : MoodJumpGradientMode.SourceGradient) ? 'gradient' : 'separate'}/>
|
|
60
60
|
</>
|
|
61
61
|
)}
|
|
62
62
|
<Spacer height={cx(12)} />
|
|
@@ -28,7 +28,7 @@ const RecommendMixMoodItem = (props: RecommendMixMoodItemProps) => {
|
|
|
28
28
|
const { mood, isMix, deviceTypeOption } = props;
|
|
29
29
|
|
|
30
30
|
const gradientMode = useMemo(() => (
|
|
31
|
-
deviceTypeOption?.isStringLight ? MoodJumpGradientMode.StringGradient :
|
|
31
|
+
deviceTypeOption?.isStringLight ? MoodJumpGradientMode.StringGradient : deviceTypeOption?.isStripLight ? MoodJumpGradientMode.StripGradient : MoodJumpGradientMode.SourceGradient
|
|
32
32
|
), [MoodJumpGradientMode, deviceTypeOption])
|
|
33
33
|
|
|
34
34
|
return (
|
|
@@ -48,7 +48,7 @@ const RecommendMixMoodItem = (props: RecommendMixMoodItemProps) => {
|
|
|
48
48
|
<View style={styles.lineStyle}>
|
|
49
49
|
<MixMoodColorsLine mixSubLight={mood?.mainLamp} isMix={isMix} type={mood.mainLamp.mode === gradientMode ? 'gradient' : 'separate'}/>
|
|
50
50
|
<Spacer height={cx(7)} />
|
|
51
|
-
{(isMix && !!mood.secondaryLamp.nodes.length) && <MixMoodColorsLine mixSubLight={mood.secondaryLamp} isMix={isMix} type={mood.secondaryLamp.mode ===
|
|
51
|
+
{(isMix && !!mood.secondaryLamp.nodes.length) && <MixMoodColorsLine mixSubLight={mood.secondaryLamp} isMix={isMix} type={mood.secondaryLamp.mode === (deviceTypeOption?.isCeilingLight ? MoodJumpGradientMode.StripGradient : MoodJumpGradientMode.SourceGradient) ? 'gradient' : 'separate'}/>}
|
|
52
52
|
</View>
|
|
53
53
|
<Spacer height={cx(24)} />
|
|
54
54
|
</>
|