@ledvance/ui-biz-bundle 1.1.65 → 1.1.66

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.65",
7
+ "version": "1.1.66",
8
8
  "scripts": {},
9
9
  "dependencies": {
10
10
  "@ledvance/base": "^1.x",
@@ -7,6 +7,7 @@ export const ui_biz_routerKey = {
7
7
  'ui_biz_mood_add': 'ui-biz_mood_add',
8
8
  'ui_biz_static_mood_edit': 'ui_biz_static_mood_edit',
9
9
  'ui_biz_dynamic_mood_edit': 'ui_biz_dynamic_mood_edit',
10
+ 'ui_biz_dynamic_mix_mood_edit': 'ui_biz_dynamic_mix_mood_edit',
10
11
  'ui_biz_mix_mood': 'ui_biz_mix_mood',
11
12
  'ui_biz_mix_mood_edit': 'ui_biz_mix_mood_edit',
12
13
  'ui_biz_mix_mood_add': 'ui_biz_mix_mood_add',
@@ -35,7 +35,7 @@ import {
35
35
  } from './Interface';
36
36
  import TextFieldStyleButton from '@ledvance/base/src/components/TextFieldStyleButton';
37
37
  import FanAdjustView from '@ledvance/base/src/components/FanAdjustView';
38
- import { RouterKey } from 'navigation/Router';
38
+ import { ui_biz_routerKey } from '../../navigation/Routers'
39
39
  import { SelectPageParams } from '@ledvance/ui-biz-bundle/src/modules/select/SelectPage';
40
40
  import I18n from '@ledvance/base/src/i18n';
41
41
  import Segmented from '@ledvance/base/src/components/Segmented';
@@ -94,15 +94,6 @@ const DynamicMoodEditorPage = () => {
94
94
  return cctToColor(node.colorTemp.toFixed());
95
95
  }, []);
96
96
 
97
- const getButtonStatus = () => {
98
- return (
99
- (params.mode === 'edit' && isEqual(state.mood, routeParams.currentMood)) ||
100
- !!!state.mood.name ||
101
- nameRepeat ||
102
- state.mood.name.length > 32
103
- );
104
- };
105
-
106
97
  const createSelectModeData = useCallback(
107
98
  (mode: number, moodMode?: StripLightMoodMode) => {
108
99
  return Object.values(moodMode ? moodMode : state.sceneMode).map(scene => {
@@ -132,17 +123,21 @@ const DynamicMoodEditorPage = () => {
132
123
  }, []);
133
124
 
134
125
  const nameRepeat = useMemo(() => {
135
- return !!find(params.moods, m => m.id !== state.mood.id && m.name === state.mood.name);
126
+ return params.nameRepeat(state.mood)
136
127
  }, [state.mood.name]);
137
128
 
138
- const showBackDialog = (): boolean => {
139
- return !isEqual(state.mood, routeParams.currentMood);
140
- }
129
+ const checkMoodChanged = useMemo(() =>{
130
+ return isEqual(state.mood, params.currentMood)
131
+ }, [JSON.stringify(state.mood), params.currentMood])
132
+
133
+ const canSaveMoodData = useMemo(() =>{
134
+ return state.mood.name.length > 0 && state.mood.name.length < 33 && !nameRepeat && (params.mode === 'add' || !checkMoodChanged)
135
+ }, [nameRepeat, state.mood.name, checkMoodChanged, params.mode])
141
136
 
142
137
  return (
143
138
  <Page
144
139
  backText={Strings.getLang('mesh_device_detail_mode')}
145
- showBackDialog={showBackDialog()}
140
+ showBackDialog={!checkMoodChanged}
146
141
  backDialogTitle={Strings.getLang(
147
142
  params.mode === 'add'
148
143
  ? 'string_light_pp_dialog_sm_add_headline_c'
@@ -154,16 +149,13 @@ const DynamicMoodEditorPage = () => {
154
149
  : 'strip_light_static_mood_editor_step_2_dialog_text'
155
150
  )}
156
151
  headlineText={state.headline}
157
- rightButtonIcon={getButtonStatus() ? res.ic_uncheck : res.ic_check}
152
+ rightButtonIcon={canSaveMoodData ? res.ic_check : res.ic_uncheck}
158
153
  rightButtonIconClick={async () => {
159
- if (getButtonStatus()) {
160
- return
161
- }
162
- if (state.loading) return;
154
+ if (state.loading || !canSaveMoodData) return;
163
155
  state.loading = true;
164
156
  const res = await params.modDeleteMood(params.mode, cloneDeep(state.mood));
165
157
  if (res.success) {
166
- navigation.navigate(RouterKey.ui_biz_mood);
158
+ navigation.navigate(ui_biz_routerKey.ui_biz_mood);
167
159
  }
168
160
  state.loading = false;
169
161
  }}
@@ -206,7 +198,7 @@ const DynamicMoodEditorPage = () => {
206
198
  state.mood.mainLamp.mode = selectPageData.value;
207
199
  },
208
200
  };
209
- navigation.navigate(RouterKey.ui_biz_select_page, paramsSelect);
201
+ navigation.navigate(ui_biz_routerKey.ui_biz_select_page, paramsSelect);
210
202
  }}
211
203
  />
212
204
  <Spacer height={cx(10)} />
@@ -281,7 +273,7 @@ const DynamicMoodEditorPage = () => {
281
273
  state.mood.mainLamp.expand = selectPageData.value;
282
274
  },
283
275
  };
284
- navigation.navigate(RouterKey.ui_biz_select_page, paramsSelect);
276
+ navigation.navigate(ui_biz_routerKey.ui_biz_select_page, paramsSelect);
285
277
  }}
286
278
  />
287
279
  <Spacer />
@@ -544,7 +536,7 @@ const DynamicMoodEditorPage = () => {
544
536
  const res = await params.modDeleteMood('del', state.mood);
545
537
  state.loading = false
546
538
  if (res.success) {
547
- navigation.navigate(RouterKey.ui_biz_mood);
539
+ navigation.navigate(ui_biz_routerKey.ui_biz_mood);
548
540
  }
549
541
  }
550
542
  })
@@ -95,6 +95,7 @@ export interface DefMoodOption extends LightCategory{
95
95
  }
96
96
 
97
97
  export interface MoodDps {
98
+ switchLedDp: string
98
99
  mainDp: string;
99
100
  mainWorkMode: string;
100
101
  mainSwitch: string;
@@ -30,8 +30,7 @@ import {
30
30
  StripLightMoodMode,
31
31
  } from './Interface';
32
32
  import TextFieldStyleButton from '@ledvance/base/src/components/TextFieldStyleButton';
33
- import { showDeleteMoodDialog } from './tools';
34
- import { RouterKey } from 'navigation/Router';
33
+ import {ui_biz_routerKey} from '../../navigation/Routers'
35
34
  import { SelectPageParams } from '@ledvance/ui-biz-bundle/src/modules/select/SelectPage';
36
35
  import I18n from '@ledvance/base/src/i18n';
37
36
  import Segmented from '@ledvance/base/src/components/Segmented';
@@ -39,6 +38,7 @@ import { MoodNodeInfo } from './Interface';
39
38
  import ColorAdjustView from '@ledvance/base/src/components/ColorAdjustView';
40
39
  import LdvSwitch from '@ledvance/base/src/components/ldvSwitch';
41
40
  import ColorTempAdjustView from '@ledvance/base/src/components/ColorTempAdjustView';
41
+ import { showDialog } from '@ledvance/base/src/utils/common';
42
42
 
43
43
  const cx = Utils.RatioUtils.convertX;
44
44
  interface MixDynamicMoodEditorPageState extends StaticMoodEditorPageState {
@@ -91,15 +91,6 @@ const MixDynamicMoodEditorPage = () => {
91
91
  return cctToColor(node.colorTemp.toFixed());
92
92
  }, []);
93
93
 
94
- const getButtonStatus = () => {
95
- return (
96
- (params.mode === 'edit' && isEqual(state.mood, routeParams.currentMood)) ||
97
- !!!state.mood.name ||
98
- nameRepeat ||
99
- state.mood.name.length > 32
100
- );
101
- };
102
-
103
94
  const createSelectModeData = useCallback(
104
95
  (mode: number, moodMode: StripLightMoodMode) => {
105
96
  return Object.values(moodMode).map(scene => {
@@ -129,17 +120,21 @@ const MixDynamicMoodEditorPage = () => {
129
120
  }, []);
130
121
 
131
122
  const nameRepeat = useMemo(() => {
132
- return !!find(params.moods, m => m.id !== state.mood.id && m.name === state.mood.name);
123
+ return params.nameRepeat(state.mood)
133
124
  }, [state.mood.name]);
134
125
 
135
- const showBackDialog = (): boolean => {
136
- return !isEqual(state.mood, routeParams.currentMood);
137
- }
126
+ const checkMoodChanged = useMemo(() =>{
127
+ return isEqual(state.mood, params.currentMood)
128
+ }, [JSON.stringify(state.mood), params.currentMood])
129
+
130
+ const canSaveMoodData = useMemo(() =>{
131
+ return state.mood.name.length > 0 && state.mood.name.length < 33 && !nameRepeat && (params.mode === 'add' || !checkMoodChanged)
132
+ }, [nameRepeat, state.mood.name, checkMoodChanged, params.mode])
138
133
 
139
134
  return (
140
135
  <Page
141
136
  backText={Strings.getLang('mesh_device_detail_mode')}
142
- showBackDialog={showBackDialog()}
137
+ showBackDialog={!checkMoodChanged}
143
138
  backDialogTitle={Strings.getLang(
144
139
  params.mode === 'add'
145
140
  ? 'string_light_pp_dialog_sm_add_headline_c'
@@ -151,26 +146,25 @@ const MixDynamicMoodEditorPage = () => {
151
146
  : 'strip_light_static_mood_editor_step_2_dialog_text'
152
147
  )}
153
148
  headlineText={state.headline}
154
- rightButtonIcon={getButtonStatus() ? res.ic_uncheck : res.ic_check}
149
+ rightButtonIcon={canSaveMoodData ? res.ic_check : res.ic_uncheck}
155
150
  rightButtonIconClick={async () => {
156
- if (getButtonStatus()) {
157
- return
158
- }
159
- if (state.loading) return;
151
+ if (state.loading || !canSaveMoodData) return;
160
152
  state.loading = true;
161
153
  const newMood = cloneDeep(state.mood)
162
- if(moduleParams.isSupportBrightness){
163
- newMood.mainLamp.type = 1
164
- }
165
- if(moduleParams.isSupportBrightness && moduleParams.isSupportTemperature){
166
- newMood.mainLamp.type = 2
167
- }
168
- if(moduleParams.isSupportColor){
169
- newMood.secondaryLamp.type = 3
154
+ if(moduleParams.isMixLight){
155
+ if(moduleParams.isSupportBrightness){
156
+ newMood.mainLamp.type = 1
157
+ }
158
+ if(moduleParams.isSupportBrightness && moduleParams.isSupportTemperature){
159
+ newMood.mainLamp.type = 2
160
+ }
161
+ if(moduleParams.isSupportColor){
162
+ newMood.secondaryLamp.type = 3
163
+ }
170
164
  }
171
165
  const res = await params.modDeleteMood(params.mode, newMood);
172
166
  if (res.success) {
173
- navigation.navigate(RouterKey.ui_biz_mood);
167
+ navigation.navigate(ui_biz_routerKey.ui_biz_mood);
174
168
  }
175
169
  state.loading = false;
176
170
  }}
@@ -243,7 +237,7 @@ const MixDynamicMoodEditorPage = () => {
243
237
  state.mood.mainLamp.mode = selectPageData.value;
244
238
  },
245
239
  };
246
- navigation.navigate(RouterKey.ui_biz_select_page, paramsSelect);
240
+ navigation.navigate(ui_biz_routerKey.ui_biz_select_page, paramsSelect);
247
241
  }}
248
242
  />
249
243
  <Spacer height={cx(10)} />
@@ -440,7 +434,7 @@ const MixDynamicMoodEditorPage = () => {
440
434
  state.mood.secondaryLamp.mode = selectPageData.value;
441
435
  },
442
436
  };
443
- navigation.navigate(RouterKey.ui_biz_select_page, paramsSelect);
437
+ navigation.navigate(ui_biz_routerKey.ui_biz_select_page, paramsSelect);
444
438
  }}
445
439
  />
446
440
  <Spacer height={cx(10)} />
@@ -515,7 +509,7 @@ const MixDynamicMoodEditorPage = () => {
515
509
  state.mood.secondaryLamp.expand = selectPageData.value;
516
510
  },
517
511
  };
518
- navigation.navigate(RouterKey.ui_biz_select_page, paramsSelect);
512
+ navigation.navigate(ui_biz_routerKey.ui_biz_select_page, paramsSelect);
519
513
  }}
520
514
  />
521
515
  <Spacer />
@@ -668,15 +662,20 @@ const MixDynamicMoodEditorPage = () => {
668
662
  textStyle={styles.deleteBtnText}
669
663
  text={Strings.getLang('edit_static_mood_button_delete_text')}
670
664
  onPress={() => {
671
- showDeleteMoodDialog(async (_, { close }) => {
672
- state.loading = true;
673
- close();
674
- const res = await params.modDeleteMood('del', state.mood);
675
- if (res.success) {
676
- navigation.navigate(RouterKey.ui_biz_mood);
665
+ showDialog({
666
+ method: 'confirm',
667
+ title: I18n.getLang('string_light_pp_dialog_sm_ed_headline_d'),
668
+ subTitle: I18n.getLang(`strip_light_static_mood_edit_dialog_text`),
669
+ onConfirm: async (_, {close})=>{
670
+ close();
671
+ state.loading = true;
672
+ const res = await params.modDeleteMood('del', state.mood);
673
+ state.loading = false;
674
+ if (res.success) {
675
+ navigation.navigate(ui_biz_routerKey.ui_biz_mood);
676
+ }
677
677
  }
678
- state.loading = false;
679
- });
678
+ })
680
679
  }}
681
680
  />
682
681
  </View>
@@ -3,8 +3,8 @@ import {
3
3
  DefMoodOption,
4
4
  LightCategory,
5
5
  MixRemoteMoodInfo,
6
- MoodDps,
7
6
  MoodInfo,
7
+ MoodPageParams,
8
8
  MoodUIInfo,
9
9
  RemoteMoodInfo,
10
10
  } from './Interface';
@@ -55,10 +55,10 @@ const getMoodInfo = (mainDp: string, option: LightCategory, secondaryDp: string)
55
55
  const moodInfo = !!(option.isStringLight || option.isStripLight)
56
56
  ? stripDp2Obj(mainDp, option.isStringLight)
57
57
  : option.isMixLight
58
- ? MixDp2Obj(mainDp)
59
- : option.isCeilingLight
60
- ? MixCeilingDpObj(mainDp, secondaryDp)
61
- : dp2Obj(mainDp, option.isFanLight, option.isUVCFan);
58
+ ? MixDp2Obj(mainDp)
59
+ : option.isCeilingLight
60
+ ? MixCeilingDpObj(mainDp, secondaryDp)
61
+ : dp2Obj(mainDp, option.isFanLight, option.isUVCFan);
62
62
  return moodInfo;
63
63
  };
64
64
 
@@ -66,8 +66,8 @@ const getMoodDp = (moodInfo: MoodUIInfo, option: LightCategory) => {
66
66
  const moodDp = !!(option.isStringLight || option.isStripLight)
67
67
  ? stripObj2Dp(moodInfo, option.isStringLight)
68
68
  : option.isMixLight
69
- ? MixObj2Dp(moodInfo)
70
- : obj2Dp(moodInfo, option.isFanLight, option.isUVCFan);
69
+ ? MixObj2Dp(moodInfo)
70
+ : obj2Dp(moodInfo, option.isFanLight, option.isUVCFan);
71
71
  return moodDp;
72
72
  };
73
73
 
@@ -96,6 +96,7 @@ export const getRemoteMoodList = async (
96
96
  const moodFeatureId = option.isMixLight ? MixLightSceneListFeatureId : SceneFeatureId;
97
97
  // await setRemoteMoodList(devId, isFeature, getDefMoodList(option), moodFeatureId);
98
98
  const res = await getFeature(devId, moodFeatureId);
99
+ console.log(res, '< --- res=====')
99
100
  if (!res.result) {
100
101
  return { success: false };
101
102
  }
@@ -148,46 +149,41 @@ export const getRemoteMoodList = async (
148
149
  }
149
150
  };
150
151
 
151
- export const useMoodScene = (
152
- mainDp: string,
153
- option: LightCategory,
154
- secondaryDp?: string
155
- ): [MoodInfo, (moodInfo: MoodUIInfo, moodDps: MoodDps) => Promise<Result<any>>] => {
152
+ export const useMoodScene = (params: MoodPageParams): [MoodInfo, (moodInfo: MoodUIInfo) => Promise<Result<any>>] => {
156
153
  const [dps, setDps] = useDps();
157
- const main = dps[mainDp];
158
- const secondary = secondaryDp ? dps[secondaryDp] : '';
159
- const [moodState, setMoodState] = useState(getMoodInfo(main, option, secondary));
154
+ const main = dps[params.mainDp];
155
+ const secondary = params.secondaryDp ? dps[params.secondaryDp] : '';
156
+ const [moodState, setMoodState] = useState(getMoodInfo(main, params, secondary));
160
157
 
161
158
  useUpdateEffect(() => {
162
- setMoodState(getMoodInfo(main, option, secondary));
159
+ setMoodState(getMoodInfo(main, params, secondary));
163
160
  }, [main, secondary]);
164
161
 
165
- const setMoodFn = (moodInfo: MoodUIInfo, moodDps: MoodDps) => {
166
- const dps = {};
167
- if (
168
- (option.isCeilingLight && moodInfo.mainLamp && moodInfo.mainLamp.nodes.length) ||
169
- !option.isCeilingLight
170
- ) {
171
- const mainHex = getMoodDp(moodInfo, option);
172
- dps[moodDps.mainDp] = mainHex;
173
- dps[moodDps.mainWorkMode] = WorkMode.Scene;
174
- dps[moodDps.mainSwitch] = true;
175
- }
176
- if (
177
- option.isCeilingLight &&
178
- moodInfo.secondaryLamp &&
179
- moodInfo.secondaryLamp.nodes.length &&
180
- moodDps.secondaryDp
181
- ) {
182
- const secondaryHex = stripObj2Dp({
183
- ...moodInfo,
184
- mainLamp: moodInfo.secondaryLamp,
185
- });
186
- dps[moodDps.secondaryDp] = secondaryHex;
187
- if (moodDps.secondaryWorkMode) dps[moodDps.secondaryWorkMode] = WorkMode.Scene;
188
- if (moodDps.secondarySwitch) dps[moodDps.secondarySwitch] = true;
162
+ const setMoodFn = (moodInfo: MoodUIInfo) => {
163
+ const beforeDps = {}
164
+ const afterDps = {}
165
+ if (moodInfo) {
166
+ const { mainLamp, secondaryLamp } = moodInfo
167
+ if (mainLamp?.nodes?.length) {
168
+ const mainHex = getMoodDp(params.isCeilingLight ? {...moodInfo, id: mainLamp.id!} : moodInfo, params);
169
+ beforeDps[params.mainDp] = mainHex
170
+ afterDps[params.mainWorkMode] = WorkMode.Scene;
171
+ afterDps[params.mainSwitch] = true;
172
+ }
173
+ if (params.isCeilingLight && secondaryLamp.nodes?.length && params.secondaryDp) {
174
+ const secondaryHex = stripObj2Dp({
175
+ ...moodInfo,
176
+ mainLamp: moodInfo.secondaryLamp,
177
+ id: secondaryLamp.id!
178
+ });
179
+ beforeDps[params.secondaryDp] = secondaryHex
180
+ afterDps[params.secondaryWorkMode!] = WorkMode.Scene
181
+ afterDps[params.secondarySwitch!] = true
182
+ }
183
+ afterDps[params.switchLedDp] = true
189
184
  }
190
- return setDps(dps);
185
+ setDps(afterDps).then()
186
+ return setDps(beforeDps)
191
187
  };
192
188
  return [moodState, setMoodFn];
193
189
  };
@@ -208,12 +204,13 @@ export const saveMoodList = (
208
204
  }
209
205
  return {
210
206
  n: s.name,
211
- i: getMoodDp(s, option),
212
- s: option.isCeilingLight
207
+ i: getMoodDp(option.isCeilingLight ? { ...s, id: s.mainLamp.id! } : s, option),
208
+ s: s.secondaryLamp?.nodes?.length && option.isCeilingLight
213
209
  ? stripObj2Dp({
214
- ...s,
215
- mainLamp: s.secondaryLamp,
216
- })
210
+ ...s,
211
+ mainLamp: s.secondaryLamp,
212
+ id: s.secondaryLamp.id!
213
+ })
217
214
  : '',
218
215
  t: 0,
219
216
  e: false,
@@ -229,7 +226,7 @@ export const saveMoodList = (
229
226
  const moodFeatureId = !!(option.isStringLight || option.isStripLight)
230
227
  ? featureId
231
228
  : option.isMixLight
232
- ? MixLightSceneListFeatureId
233
- : SceneFeatureId;
229
+ ? MixLightSceneListFeatureId
230
+ : SceneFeatureId;
234
231
  return setRemoteMoodList(devId, isFeature, remoteMoods, moodFeatureId);
235
232
  };
@@ -14,7 +14,7 @@ export const getDefaultMood = (): MoodInfo => {
14
14
  return {
15
15
  version: 0,
16
16
  // 场景号
17
- id: 0,
17
+ id: -1,
18
18
  // 主灯
19
19
  mainLamp: {
20
20
  // 变化方式
@@ -135,43 +135,35 @@ function getRGBDefSceneList(): RemoteMoodInfo[] {
135
135
  s: '',
136
136
  t: 0,
137
137
  e: false,
138
- },
139
- {
138
+ },
139
+ {
140
140
  n: I18n.getLang('mesh_device_detail_lighting_read'),
141
141
  i: '010e0d0000000000000003e803e8',
142
142
  s: '',
143
143
  t: 0,
144
144
  e: false,
145
- },
146
- {
145
+ },
146
+ {
147
147
  n: I18n.getLang('mesh_device_detail_lighting_work'),
148
148
  i: '020e0d0000000000000003e803e8',
149
149
  s: '',
150
150
  t: 0,
151
151
  e: false,
152
- },
153
- {
152
+ },
153
+ {
154
154
  n: I18n.getLang('mesh_device_detail_lighting_leisure'),
155
155
  i: '030e0d0000000000000001f403e8',
156
156
  s: '',
157
157
  t: 0,
158
158
  e: false,
159
- },
160
- {
159
+ },
160
+ {
161
161
  n: I18n.getLang('mesh_device_detail_lighting_color_mode'),
162
- i:
163
- '05464601000003e803e800000000464601007803e803e80000000046460100f003e803e800000000464601003d03e803e80000000046460100ae03e803e800000000464601011303e803e800000000',
162
+ i: '05464601000003e803e800000000464601007803e803e80000000046460100f003e803e800000000464601003d03e803e80000000046460100ae03e803e800000000464601011303e803e800000000',
164
163
  s: '',
165
164
  t: 0,
166
165
  e: false,
167
- },
168
- {
169
- n: I18n.getLang('mesh_device_detail_lighting_white_mode'),
170
- i: '0646460100000000000003e8000046460100000000000003e8019046460100000000000003e803e8',
171
- s: '',
172
- t: 0,
173
- e: false,
174
- },
166
+ },
175
167
  ...defColorSceneList,
176
168
  ];
177
169
  }
@@ -1454,6 +1446,16 @@ export type RecommendMood = {
1454
1446
  secondaryLamp?: MoodLampInfo;
1455
1447
  };
1456
1448
 
1449
+ const defStripConfig = {
1450
+ expand: 0,
1451
+ reserved1: 0,
1452
+ reserved2: 0,
1453
+ segmented: 0,
1454
+ loop: 0,
1455
+ excessive: 0,
1456
+ direction: 0,
1457
+ };
1458
+
1457
1459
  export function getRecommendMoods(
1458
1460
  isStatic: boolean,
1459
1461
  moduleParams: MoodPageParams
@@ -1697,6 +1699,7 @@ export function getRecommendMoods(
1697
1699
  fanEnable: true,
1698
1700
  fanSpeed: 1,
1699
1701
  enable: true,
1702
+ ...defStripConfig,
1700
1703
  nodes: [
1701
1704
  {
1702
1705
  h: 75,
@@ -1734,6 +1737,7 @@ export function getRecommendMoods(
1734
1737
  fanEnable: true,
1735
1738
  enable: true,
1736
1739
  fanSpeed: 1,
1740
+ ...defStripConfig,
1737
1741
  nodes: [
1738
1742
  {
1739
1743
  h: 40,
@@ -1771,6 +1775,7 @@ export function getRecommendMoods(
1771
1775
  fanEnable: true,
1772
1776
  fanSpeed: 1,
1773
1777
  enable: true,
1778
+ ...defStripConfig,
1774
1779
  nodes: [
1775
1780
  {
1776
1781
  h: 300,
@@ -1815,6 +1820,7 @@ export function getRecommendMoods(
1815
1820
  fanEnable: true,
1816
1821
  fanSpeed: 1,
1817
1822
  enable: true,
1823
+ ...defStripConfig,
1818
1824
  nodes: [
1819
1825
  {
1820
1826
  h: 0,
@@ -1852,6 +1858,7 @@ export function getRecommendMoods(
1852
1858
  fanEnable: true,
1853
1859
  fanSpeed: 1,
1854
1860
  enable: true,
1861
+ ...defStripConfig,
1855
1862
  nodes: [
1856
1863
  {
1857
1864
  h: 0,
@@ -1889,6 +1896,7 @@ export function getRecommendMoods(
1889
1896
  fanEnable: true,
1890
1897
  fanSpeed: 1,
1891
1898
  enable: true,
1899
+ ...defStripConfig,
1892
1900
  nodes: [
1893
1901
  {
1894
1902
  h: 0,
@@ -1933,6 +1941,7 @@ export function getRecommendMoods(
1933
1941
  fanEnable: true,
1934
1942
  fanSpeed: 1,
1935
1943
  enable: true,
1944
+ ...defStripConfig,
1936
1945
  nodes: [
1937
1946
  {
1938
1947
  h: 0,
@@ -1970,6 +1979,7 @@ export function getRecommendMoods(
1970
1979
  fanEnable: true,
1971
1980
  fanSpeed: 1,
1972
1981
  enable: true,
1982
+ ...defStripConfig,
1973
1983
  nodes: [
1974
1984
  {
1975
1985
  h: 0,
@@ -2007,6 +2017,7 @@ export function getRecommendMoods(
2007
2017
  fanEnable: true,
2008
2018
  fanSpeed: 1,
2009
2019
  enable: true,
2020
+ ...defStripConfig,
2010
2021
  nodes: [
2011
2022
  {
2012
2023
  h: 0,
@@ -2039,17 +2050,6 @@ export function getRecommendMoods(
2039
2050
  }
2040
2051
  }
2041
2052
 
2042
- const defSecondly = {
2043
- version: 0,
2044
- expand: 0,
2045
- reserved1: 0,
2046
- reserved2: 0,
2047
- segmented: 0,
2048
- loop: 0,
2049
- excessive: 0,
2050
- direction: 0,
2051
- };
2052
-
2053
2053
  export function getRecommendMixMoods(
2054
2054
  isStatic: boolean,
2055
2055
  moduleParams: MoodPageParams
@@ -2069,7 +2069,7 @@ export function getRecommendMixMoods(
2069
2069
  nodes: [{ h: 0, s: 0, v: 0, brightness: 100, colorTemp: 20, isColorNode: false }],
2070
2070
  },
2071
2071
  secondaryLamp: {
2072
- ...defSecondly,
2072
+ ...defStripConfig,
2073
2073
  enable: false,
2074
2074
  id: -1,
2075
2075
  speed: 100,
@@ -2087,7 +2087,7 @@ export function getRecommendMixMoods(
2087
2087
  nodes: [{ h: 0, s: 0, v: 0, brightness: 100, colorTemp: 40, isColorNode: false }],
2088
2088
  },
2089
2089
  secondaryLamp: {
2090
- ...defSecondly,
2090
+ ...defStripConfig,
2091
2091
  enable: false,
2092
2092
  id: -1,
2093
2093
  speed: 100,
@@ -2105,7 +2105,7 @@ export function getRecommendMixMoods(
2105
2105
  nodes: [{ h: 0, s: 0, v: 0, brightness: 100, colorTemp: 50, isColorNode: false }],
2106
2106
  },
2107
2107
  secondaryLamp: {
2108
- ...defSecondly,
2108
+ ...defStripConfig,
2109
2109
  enable: false,
2110
2110
  id: -1,
2111
2111
  speed: 100,
@@ -2133,7 +2133,7 @@ export function getRecommendMixMoods(
2133
2133
  ],
2134
2134
  },
2135
2135
  secondaryLamp: {
2136
- ...defSecondly,
2136
+ ...defStripConfig,
2137
2137
  id: 0,
2138
2138
  speed: 14,
2139
2139
  mode: moduleParams.isCeilingLight