@ledvance/ui-biz-bundle 1.1.100 → 1.1.101

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.100",
7
+ "version": "1.1.101",
8
8
  "scripts": {},
9
9
  "dependencies": {
10
10
  "@ledvance/base": "^1.x",
@@ -72,7 +72,8 @@ export const useFlag: UseFlagType = (flagCode, extra) => {
72
72
  return setDps(extraDps)
73
73
  } else {
74
74
  const hex = obj2Dp(flagItem, extra)
75
- return setDps({ [flagCode]: hex, [extra.workModeCode]: WORK_MODE.SCENE, [extra.switchLedCode]: true })
75
+ const newHex = extra.isSolarLight ? ('01'+hex.substring(2)) : hex
76
+ return setDps({ [flagCode]: newHex, [extra.workModeCode]: WORK_MODE.SCENE, [extra.switchLedCode]: true })
76
77
  }
77
78
  }
78
79
  return [flagState, setFlagFn]
@@ -36,6 +36,7 @@ export interface FlagPageProps {
36
36
  isStringLight?: boolean
37
37
  isStripLight?: boolean
38
38
  isCeilingLight?: boolean
39
+ isSolarLight?: boolean
39
40
  isSupportMixScene?: boolean
40
41
  isSupportSceneStatus?: boolean
41
42
  drawToolLight?: {
@@ -72,10 +72,6 @@ const getDpResultByYearMonth = async (devId: string, addEleDpCode: string, dateS
72
72
  const date = dayjs(dateStr)
73
73
  const startDay = date.startOf('month').format('YYYYMMDD')
74
74
  const endDay = date.endOf('month').format('YYYYMMDD')
75
- if (overDays(startDay, 365)) {
76
- console.log("getDpResultByYearMonth overDays true")
77
- return []
78
- }
79
75
  const res = await getDataWithSpecified(devId, addEleDpCode, startDay, endDay, 'sum')
80
76
  if (!isEmpty(res) && res.result) {
81
77
  const dayList = res.result
@@ -184,7 +184,7 @@ const EnergyConsumptionChart = (props: { theme?: ThemeType }) => {
184
184
  </View>
185
185
  ) : (
186
186
  state.chartData.length > 0 && !state.loading &&
187
- <NewBarChart height={400} data={state.chartData} price={state.price}
187
+ <NewBarChart height={cx(400)} data={state.chartData} price={state.price}
188
188
  unit={unit}/>
189
189
  )
190
190
  }
@@ -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;
@@ -187,7 +187,7 @@ export const useMoodScene = (params: MoodPageParams): [MoodInfo, (moodInfo: Mood
187
187
  const { mainLamp, secondaryLamp } = moodInfo
188
188
  if (params.isMixLight || mainLamp?.nodes?.length) {
189
189
  const mainHex = getMoodDp(params.isCeilingLight ? {...moodInfo, id: mainLamp.id!} : moodInfo, params);
190
- mainDps[params.mainDp] = mainHex
190
+ mainDps[params.mainDp] = params.isSolarLight ? ('01' + mainHex.substring(2)) : mainHex
191
191
  mainDps[params.mainWorkMode] = WorkMode.Scene;
192
192
  mainDps[params.mainSwitch] = true;
193
193
  }
@@ -207,7 +207,7 @@ export const useMoodScene = (params: MoodPageParams): [MoodInfo, (moodInfo: Mood
207
207
  }
208
208
  setDps(secondaryDps).then()
209
209
  }
210
- mainLamp[params.switchLedDp] = true
210
+ mainLamp[params.switchLedDp] = true
211
211
  }
212
212
  return setDps(mainDps)
213
213
  };