@ledvance/group-ui-biz-bundle 1.0.86 → 1.0.88

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.86",
7
+ "version": "1.0.88",
8
8
  "scripts": {},
9
9
  "dependencies": {
10
10
  "@ledvance/base": "^1.x",
@@ -17,7 +17,7 @@ interface ChildLockConfig {
17
17
  childLock: boolean
18
18
  }
19
19
 
20
- export function useChildLock(): [boolean, (v: boolean) => Promise<Result<any>>] {
20
+ export function useChildLock(): [boolean, (v: boolean, extraDps?: any, extraConfig?: any) => Promise<Result<any>>] {
21
21
  return useFeatureHook<ChildLockConfig, boolean>('childLock', false)
22
22
  }
23
23
 
@@ -88,7 +88,9 @@ const ChildLockPage = (props: { theme?: ThemeType }) => {
88
88
  <Spacer style={{ flex: 1 }} height={0} width={0} />
89
89
  <SwitchButton value={childLock} onValueChange={async v => {
90
90
  state.loading = true
91
- await setChildLock(v)
91
+ await setChildLock(v, undefined, {
92
+ 'controlLock': v
93
+ })
92
94
  state.loading = false
93
95
  } } />
94
96
  </View>
@@ -78,10 +78,6 @@ const getDpResultByYearMonth = async (deviceIdGroup: string[], addEleDpCode: str
78
78
  const date = dayjs(dateStr)
79
79
  const startDay = date.startOf('month').format('YYYYMMDD')
80
80
  const endDay = date.endOf('month').format('YYYYMMDD')
81
- if (overDays(startDay, 365)) {
82
- console.log("getDpResultByYearMonth overDays true")
83
- return []
84
- }
85
81
  const promiseGroup = deviceIdGroup.map(devId => getDataWithSpecified(devId, addEleDpCode, startDay, endDay, 'sum').catch(error => ({error})))
86
82
  const res = await Promise.all(promiseGroup);
87
83
  // @ts-ignore
@@ -140,7 +136,7 @@ const getDpResultByDate = async (deviceIdGroup: string[], addEleDpCode: string,
140
136
  mergedData[day] += Number(isNumber(dayNum) ? dayNum : 0)
141
137
  })
142
138
  }
143
- })
139
+ });
144
140
 
145
141
 
146
142
  const list: Array<OverviewItem> = []
@@ -183,7 +183,7 @@ const EnergyConsumptionChart = (props: { theme?: ThemeType }) => {
183
183
  </View>
184
184
  ) : (
185
185
  state.chartData.length > 0 && !state.loading &&
186
- <NewBarChart height={400} data={state.chartData} price={state.price}
186
+ <NewBarChart height={cx(400)} data={state.chartData} price={state.price}
187
187
  unit={unit}/>
188
188
  )
189
189
  }
@@ -75,7 +75,8 @@ export const useFlag: UseFlagType = (params) => {
75
75
  if (params.isStringLight){
76
76
  dps[getGlobalParamsDp('rgbic_linerlight_scene')] = moodDp
77
77
  }else{
78
- dps[getGlobalParamsDp('scene_data')] = moodDp
78
+ const newMoodDp = params.isSolarLight ? ('01'+moodDp.substring(2)) : moodDp
79
+ dps[getGlobalParamsDp('scene_data')] = newMoodDp
79
80
  }
80
81
  dps[getGlobalParamsDp('work_mode')] = WorkMode.Scene
81
82
  }else{
@@ -30,6 +30,7 @@ export interface FlagPageProps {
30
30
  isStringLight?: boolean
31
31
  isCeilingLight?: boolean
32
32
  isMatterLight?: boolean
33
+ isSolarLight?: boolean
33
34
  isSupportTemperature?: boolean
34
35
  isSupportBrightness?: boolean
35
36
  switchLedCode: string
@@ -87,6 +87,7 @@ export interface LightCategory {
87
87
  isMatterLight?: boolean;
88
88
  isCeilingFan?: boolean;
89
89
  isUVCFan?: boolean;
90
+ isSolarLight?: boolean;
90
91
  }
91
92
  export interface DefMoodOption extends LightCategory{
92
93
  isSupportColor: boolean;
@@ -70,8 +70,8 @@ export function useMoodScene(params: MoodPageParams): [SceneDataType, (value: Sc
70
70
  if (mainLamp?.nodes?.length) {
71
71
  const mainDp = getMoodDp(params.isCeilingLight ? ({...moodInfo.scene, id: mainLamp.id!}) : moodInfo.scene, params)
72
72
  if (mainDp && params.mainDp) {
73
- dps[params.mainDp] = mainDp
74
- dps[params.mainSwitch] = true
73
+ dps[params.mainDp] = params.isSolarLight ? ('01' + mainDp.substring(2)) : mainDp;
74
+ dps[params.mainSwitch] = true
75
75
  dps[params.mainWorkMode] = WorkMode.Scene
76
76
  if (params.isUVCFan){
77
77
  dps[getGlobalParamsDp('fan_switch')] = mainLamp.fanEnable
@@ -206,13 +206,6 @@ function getOnlyRGBDefSceneList(): RemoteMoodInfo[] {
206
206
  t: 0,
207
207
  e: false,
208
208
  },
209
- {
210
- n: I18n.getLang('mesh_device_detail_lighting_white_mode'),
211
- i: '0646460100000000000003e8000046460100000000000003e8019046460100000000000003e803e8',
212
- s: '',
213
- t: 0,
214
- e: false,
215
- },
216
209
  ...defColorSceneList,
217
210
  ];
218
211
  }