@ledvance/group-ui-biz-bundle 1.0.67 → 1.0.69

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/group-ui-biz-bundle",
5
5
  "pid": [],
6
6
  "uiid": "",
7
- "version": "1.0.67",
7
+ "version": "1.0.69",
8
8
  "scripts": {},
9
9
  "dependencies": {
10
10
  "@ledvance/base": "^1.x",
@@ -66,7 +66,7 @@ const AddMoodPage = () => {
66
66
  ? ui_biz_routerKey.group_ui_biz_dynamic_mix_mood_edit
67
67
  : ui_biz_routerKey.group_ui_biz_dynamic_mood_edit;
68
68
  const currentMood = moodItem.mainLamp
69
- ? { ...moodItem, id: mainId, mainLamp: { ...moodItem.mainLamp, id: mainId }, secondaryLamp: { ...moodItem.secondaryLamp, id: secondaryId } }
69
+ ? { ...moodItem, id: mainId, mainLamp: { ...moodItem.mainLamp, id: mainId }, secondaryLamp: { ...moodItem.secondaryLamp, id: moodItem.secondaryLamp?.nodes?.length ? secondaryId : -1} }
70
70
  : newMood(mainId, secondaryId, moduleParams.isSupportColor, routeParams.isStatic, moduleParams);
71
71
  navigation.navigate(url, {
72
72
  ...routeParams,
@@ -182,7 +182,7 @@ function newMood(
182
182
  nodes: isStatic ? [node] : [node, { ...node }],
183
183
  },
184
184
  secondaryLamp: {
185
- id: secondaryId,
185
+ id: isStatic ? -1 : secondaryId,
186
186
  enable: true,
187
187
  mode: MoodJumpGradientMode.StripJump,
188
188
  speed: 75,
@@ -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;
@@ -66,6 +66,7 @@ export function useMoodScene(params: MoodPageParams): [SceneDataType, (value: Sc
66
66
  const dps = {}
67
67
  if (moodInfo?.scene) {
68
68
  const { mainLamp, secondaryLamp } = moodInfo.scene
69
+ dps[params.switchLedDp] = true
69
70
  if (mainLamp?.nodes?.length) {
70
71
  const mainDp = getMoodDp(params.isCeilingLight ? ({...moodInfo.scene, id: mainLamp.id!}) : moodInfo.scene, params)
71
72
  if (mainDp && params.mainDp) {
@@ -109,6 +110,7 @@ export function useMoodScene(params: MoodPageParams): [SceneDataType, (value: Sc
109
110
  const config = {} as SceneDataConfigType
110
111
  if (moodInfo?.scene) {
111
112
  const { mainLamp, secondaryLamp } = moodInfo.scene
113
+ config.switch_led = true
112
114
  if (mainLamp?.nodes?.length) {
113
115
  config.work_mode = WorkMode.Scene
114
116
  config.workMode = WorkMode.Scene
@@ -53,7 +53,8 @@ const MoodPage = () => {
53
53
  });
54
54
 
55
55
  const moodIds = useMemo(() => {
56
- const mainIds = map(state.originMoods, 'id').filter(v => v !== undefined)
56
+ // @ts-ignore
57
+ const mainIds = map(params.isCeilingLight ? (state.originMoods.map(m => m.mainLamp) || []) : state.originMoods, 'id').filter(v => v !== undefined)
57
58
  const secondaryIds = map(state.originMoods.map(m => m.secondaryLamp) || [], 'id')
58
59
  return filter([...mainIds, ...secondaryIds], v => v !== undefined) as number[]
59
60
  }, [JSON.stringify(state.originMoods)])
@@ -381,6 +381,7 @@ const TimeScheduleDetailPage = () => {
381
381
  isSupportBrightness={props.isSupportBrightness}
382
382
  isSupportTemperature={props.isSupportTemperature}
383
383
  isCeilingLight={props.isCeilingLight}
384
+ isUVCFan={props.isUVCFan}
384
385
  manualData={state.manualData}
385
386
  onManualChange={manual => {
386
387
  // @ts-ignore
@@ -552,14 +553,14 @@ const getDefaultManual = (props: TimeScheduleDetailPageParams): ComponentConfig
552
553
  ? DeviceType.CeilingLight
553
554
  : props.isFanLight ?
554
555
  DeviceType.FanLight
556
+ : props.isCeilingLight
557
+ ? DeviceType.CeilingLight
555
558
  : DeviceType.LightSource;
556
559
  const deviceData =
557
- deviceType === DeviceType.StripLight
560
+ (deviceType === DeviceType.StripLight || deviceType === DeviceType.CeilingLight)
558
561
  ? defStripDeviceData
559
562
  : deviceType === DeviceType.MixLight
560
563
  ? defMixDeviceData
561
- : deviceType === DeviceType.CeilingLight
562
- ? defCeilingLihtDeviceData
563
564
  : deviceType === DeviceType.FanLight
564
565
  ? defFanLightDeviceData
565
566
  : defDeviceData;
@@ -37,7 +37,7 @@ export interface TimeSchedulePageParams {
37
37
  isFanLight?: boolean
38
38
  isUVCFan?: boolean;
39
39
  applyForList: ApplyForItem[];
40
- applyForDisabled: boolean; // 是否可以选择apply for
40
+ applyForDisabled?: boolean; // 是否可以选择apply for
41
41
  manualDataDp2Obj: (dps: Record<string, any>) => DeviceStateType;
42
42
  manualDataObj2Dp: (deviceState: DeviceStateType, applyForList: ApplyForItem[]) => Record<string, any>;
43
43
  }
@@ -1,5 +1,5 @@
1
1
  import React, { memo, useMemo } from 'react';
2
- import { CeilingLightData, DeviceType, ManualSettingProps, StripLightData, directOptions, modeOptions } from '../Interface';
2
+ import { CeilingLightData, DeviceType, FanLightData, ManualSettingProps, StripLightData, directOptions, modeOptions } from '../Interface';
3
3
  import { View } from 'react-native';
4
4
  import Card from '@ledvance/base/src/components/Card';
5
5
  import LampAdjustView from '@ledvance/base/src/components/LampAdjustView';
@@ -141,9 +141,9 @@ function ManualSettings(props: ManualSettingProps) {
141
141
  isSupportDirection={props.isUVCFan}
142
142
  isSupportDisinfect={props.isUVCFan}
143
143
  isSupportMode={props.isUVCFan}
144
- directValue={''}
145
- disinfect={true}
146
- modeValue={''}
144
+ directValue={(state.deviceData as FanLightData).direction}
145
+ disinfect={(state.deviceData as FanLightData).disinfect}
146
+ modeValue={(state.deviceData as FanLightData).mode}
147
147
  directOptions={directOptions}
148
148
  modeOptions={modeOptions}
149
149
  directChange={(direction: any) => {