@ledvance/base 1.3.60 → 1.3.62

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/base",
5
5
  "pid": [],
6
6
  "uiid": "",
7
- "version": "1.3.60",
7
+ "version": "1.3.62",
8
8
  "scripts": {
9
9
  "prepublishOnly": "python update-localazy.py"
10
10
  },
package/src/api/native.ts CHANGED
@@ -52,6 +52,7 @@ export enum UADeviceCategory {
52
52
  MatterLight = 'MatterLight',
53
53
  MeshLight = 'MeshLight',
54
54
  MeshSwitch = 'MeshSwitch',
55
+ VideoDoorbell = 'VideoDoorbell',
55
56
  }
56
57
 
57
58
  export interface DeviceInfo {
@@ -17,7 +17,7 @@ type BatteryProps = {
17
17
  }
18
18
 
19
19
  const BatteryPercentageView = (props: BatteryProps) => {
20
- const {value, middleValue = 30, highValue = 70} = props
20
+ const {value, middleValue = 10, highValue = 90} = props
21
21
  const calcColor = (_: any, normalColor: string, lowColor: string, emptyColor: string) => {
22
22
  if (value >= highValue) {
23
23
  return normalColor
@@ -34,12 +34,13 @@ const BatteryPercentageView = (props: BatteryProps) => {
34
34
  marginVertical: cx(18),
35
35
  color: props.theme?.global.fontColor,
36
36
  fontSize: cx(16),
37
+ fontWeight: 'bold',
37
38
  fontFamily: 'helvetica_neue_lt_std_bd',
38
39
  },
39
40
  batteryRotate: {
40
- transform: [{rotate: '90deg'}],
41
+ transform: [{ rotate: '90deg' }],
41
42
  position: 'relative',
42
- right: cx(30),
43
+ right: cx(30)
43
44
  },
44
45
  content: {
45
46
  marginEnd: cx(16),
@@ -54,17 +55,21 @@ const BatteryPercentageView = (props: BatteryProps) => {
54
55
 
55
56
  return (
56
57
  <Card
57
- style={{marginHorizontal: cx(24), marginTop: cx(10)}}
58
- containerStyle={{flexDirection: 'row', alignItems: 'center'}}
58
+ style={{ marginHorizontal: cx(24) }}
59
+ containerStyle={{ flexDirection: 'row', alignItems: 'center' }}
59
60
  >
60
- <Text style={styles.title}>{I18n.getLang('motion_detector_battery__state4')}</Text>
61
- <Spacer height={0} style={{flex: 1}}/>
61
+ <Text
62
+ style={styles.title}>
63
+ {I18n.getLang('motion_detector_battery__state4')}
64
+ </Text>
65
+ <Spacer height={0} style={{ flex: 1 }} />
62
66
  <View style={styles.batteryRotate}>
63
67
  <Battery
64
68
  value={props.value}
65
69
  onCalcColor={calcColor}
66
70
  size={cx(30)}
67
- theme={{batteryColor: props.theme?.global.secondFontColor || '#000'}}
71
+ theme={{ batteryColor: props.theme?.global.secondFontColor || '#000' }}
72
+ middleColor='#999999'
68
73
  />
69
74
  </View>
70
75
  <Text style={[styles.content, value <= middleValue ? styles.low : null]}>{value}%</Text>
@@ -141,6 +141,7 @@ const composeLayout = (component: React.ComponentType) => {
141
141
  devId: ldvDevInfo.devId,
142
142
  dps: { ...dps, ...JSON.parse(ldvDevInfo.dps) },
143
143
  pId: ldvDevInfo.pId,
144
+ category: ldvDevInfo.category
144
145
  },
145
146
  uaGroupInfo: {
146
147
  tyGroupId: -1,