@ledvance/group-ui-biz-bundle 1.0.102 → 1.0.104

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.102",
7
+ "version": "1.0.104",
8
8
  "scripts": {},
9
9
  "dependencies": {
10
10
  "@ledvance/base": "^1.x",
@@ -17,7 +17,16 @@ export const UnitList = [
17
17
  I18n.getLang('consumption_data_price_per_kwh_currency_value1'),
18
18
  I18n.getLang('consumption_data_price_per_kwh_currency_value2'),
19
19
  I18n.getLang('consumption_data_price_per_kwh_currency_value3'),
20
- I18n.getLang('consumption_data_price_per_kwh_currency_value4')
20
+ I18n.getLang('consumption_data_price_per_kwh_currency_value4'),
21
+ I18n.getLang('consumption_data_price_per_kwh_currency_value5'),
22
+ I18n.getLang('consumption_data_price_per_kwh_currency_value6'),
23
+ I18n.getLang('consumption_data_price_per_kwh_currency_value7'),
24
+ I18n.getLang('consumption_data_price_per_kwh_currency_value8'),
25
+ I18n.getLang('consumption_data_price_per_kwh_currency_value9'),
26
+ I18n.getLang('consumption_data_price_per_kwh_currency_value10'),
27
+ I18n.getLang('consumption_data_price_per_kwh_currency_value11'),
28
+ I18n.getLang('consumption_data_price_per_kwh_currency_value12'),
29
+ I18n.getLang('consumption_data_price_per_kwh_currency_value13'),
21
30
  ]
22
31
 
23
32
  export interface EnergyData {
@@ -69,7 +78,7 @@ const EnergyModal = (props: EnergyModalProps) => {
69
78
 
70
79
  useUpdateEffect(() =>{
71
80
  state.energyData = cloneDeep(props.energyData)
72
- }, [props.energyData])
81
+ }, [JSON.stringify(props.energyData)])
73
82
 
74
83
  const styles = StyleSheet.create({
75
84
  popupTip: {
@@ -168,6 +177,7 @@ const EnergyModal = (props: EnergyModalProps) => {
168
177
  <Card>
169
178
  <FlatList
170
179
  data={UnitList}
180
+ initialNumToRender={15}
171
181
  renderItem={({ item }) => (
172
182
  <View style={styles.unitItem}>
173
183
  <Text style={{ fontSize: cx(16), color: props.theme?.global.fontColor }}>{item}</Text>
@@ -228,6 +238,7 @@ const EnergyModal = (props: EnergyModalProps) => {
228
238
  <Card>
229
239
  <FlatList
230
240
  data={UnitList}
241
+ initialNumToRender={15}
231
242
  renderItem={({ item }) => (
232
243
  <TouchableOpacity
233
244
  onPress={() => {
@@ -72,6 +72,12 @@ const FixedTimingForLightDetailPage = (props: { theme?: ThemeType }) => {
72
72
  useEffect(() => {
73
73
  const { brightness, temperature, hue, saturation, value } = state.item.color
74
74
  state.isColorMode = brightness === 0 && temperature === 0 && (hue !== 0 || saturation !== 0 || value !== 0)
75
+ if (state.isColorMode) {
76
+ state.item.color.brightness = 100
77
+ } else {
78
+ state.item.color.saturation = 100
79
+ state.item.color.value = 100
80
+ }
75
81
  }, [])
76
82
 
77
83
  useEffect(() => {
@@ -122,7 +122,7 @@ const DynamicMoodEditorPage = (props: { theme?: ThemeType }) => {
122
122
 
123
123
  const getSelectOther = useCallback((otherData, expand) => {
124
124
  const currentOther = otherData.find(other => other.value === expand);
125
- return currentOther.label;
125
+ return currentOther?.label || '';
126
126
  }, []);
127
127
 
128
128
  const nameRepeat = useMemo(() => {
@@ -118,7 +118,7 @@ const MixDynamicMoodEditorPage = (props: { theme?: ThemeType }) => {
118
118
 
119
119
  const getSelectOther = useCallback((otherData, expand) => {
120
120
  const currentOther = otherData.find(other => other.value === expand);
121
- return currentOther.label;
121
+ return currentOther?.label || '';
122
122
  }, []);
123
123
 
124
124
  useUpdateEffect(() =>{
@@ -65,6 +65,12 @@ const RandomTimingForLightDetailPage = (props: { theme?: ThemeType }) => {
65
65
  useEffect(() => {
66
66
  const { brightness, temperature, hue, saturation, value } = state.item.color
67
67
  state.isColorMode = brightness === 0 && temperature === 0 && (hue !== 0 || saturation !== 0 || value !== 0)
68
+ if (state.isColorMode) {
69
+ state.item.color.brightness = 100
70
+ } else {
71
+ state.item.color.saturation = 100
72
+ state.item.color.value = 100
73
+ }
68
74
  }, [])
69
75
 
70
76
  const showConfirm = useMemo(() => {