@ledvance/ui-biz-bundle 1.1.100 → 1.1.102
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 +1 -1
- package/src/modules/flags/FlagActions.ts +2 -1
- package/src/modules/flags/FlagPage.tsx +2 -1
- package/src/newModules/energyConsumption/EnergyConsumptionActions.ts +0 -4
- package/src/newModules/energyConsumption/EnergyConsumptionChart.tsx +1 -1
- package/src/newModules/mood/Interface.ts +1 -0
- package/src/newModules/mood/MoodActions.ts +3 -11
- package/src/newModules/mood/MoodInfo.ts +7 -0
package/package.json
CHANGED
|
@@ -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
|
-
|
|
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?: {
|
|
@@ -203,7 +204,7 @@ const FlagPage = (props: { theme?: ThemeType }) => {
|
|
|
203
204
|
}else{
|
|
204
205
|
return flagMode?.flagMode && dps[params.workModeCode] === (params.isCeilingLight ? WORK_MODE.WHITE : params.isStripLight ? WORK_MODE.COLOUR : WORK_MODE.SCENE) && flagId === flagItem.id && dps[params.switchLedCode]
|
|
205
206
|
}
|
|
206
|
-
}, [params.isSupportSceneStatus, sceneStatusId, dps[params.workModeCode], dps[params.switchLedCode], flagId])
|
|
207
|
+
}, [params.isSupportSceneStatus, sceneStatusId, dps[params.workModeCode], dps[params.switchLedCode], flagId, flagMode?.flagMode])
|
|
207
208
|
|
|
208
209
|
return (
|
|
209
210
|
<Page
|
|
@@ -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
|
}
|
|
@@ -128,17 +128,9 @@ export const getRemoteMoodList = async (
|
|
|
128
128
|
data: result.data.map((item, index) => remoteMoodInfo2MoodUIState(item, index, option)),
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
|
-
const moodUIData = res.data.map((item, index) => remoteMoodInfo2MoodUIState(item, index, option)).filter(item => {
|
|
132
|
-
if (!option.isSupportTemperature) {
|
|
133
|
-
const isContainTemperature = item.mainLamp?.nodes?.some(node => !node.isColorNode && node.colorTemp > 0) || false
|
|
134
|
-
return !isContainTemperature;
|
|
135
|
-
} else {
|
|
136
|
-
return true
|
|
137
|
-
}
|
|
138
|
-
});
|
|
139
131
|
return {
|
|
140
132
|
success: true,
|
|
141
|
-
data:
|
|
133
|
+
data: res.data.map((item, index) => remoteMoodInfo2MoodUIState(item, index, option)),
|
|
142
134
|
};
|
|
143
135
|
} else {
|
|
144
136
|
const res = await NativeApi.getJson(devId, moodFeatureId);
|
|
@@ -187,7 +179,7 @@ export const useMoodScene = (params: MoodPageParams): [MoodInfo, (moodInfo: Mood
|
|
|
187
179
|
const { mainLamp, secondaryLamp } = moodInfo
|
|
188
180
|
if (params.isMixLight || mainLamp?.nodes?.length) {
|
|
189
181
|
const mainHex = getMoodDp(params.isCeilingLight ? {...moodInfo, id: mainLamp.id!} : moodInfo, params);
|
|
190
|
-
mainDps[params.mainDp] = mainHex
|
|
182
|
+
mainDps[params.mainDp] = params.isSolarLight ? ('01' + mainHex.substring(2)) : mainHex
|
|
191
183
|
mainDps[params.mainWorkMode] = WorkMode.Scene;
|
|
192
184
|
mainDps[params.mainSwitch] = true;
|
|
193
185
|
}
|
|
@@ -207,7 +199,7 @@ export const useMoodScene = (params: MoodPageParams): [MoodInfo, (moodInfo: Mood
|
|
|
207
199
|
}
|
|
208
200
|
setDps(secondaryDps).then()
|
|
209
201
|
}
|
|
210
|
-
mainLamp[params.switchLedDp] = true
|
|
202
|
+
mainLamp[params.switchLedDp] = true
|
|
211
203
|
}
|
|
212
204
|
return setDps(mainDps)
|
|
213
205
|
};
|
|
@@ -206,6 +206,13 @@ 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
|
+
},
|
|
209
216
|
...defColorSceneList,
|
|
210
217
|
];
|
|
211
218
|
}
|