@ledvance/base 1.1.52 → 1.1.54

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.1.52",
7
+ "version": "1.1.54",
8
8
  "scripts": {},
9
9
  "dependencies": {
10
10
  "@reduxjs/toolkit": "^1.8.6",
package/src/api/native.ts CHANGED
@@ -9,7 +9,7 @@ interface LDVDevicePanelManager {
9
9
  deleteDevice: (deviceId: string, isReset: boolean, callback: (result: any) => void) => void
10
10
  rename: (deviceId: string, name: string, callback: (result: any) => void) => void
11
11
  toDeviceSettingsPage: (deviceId: string, isGroup: boolean) => void
12
- toRoutinesPage: (backTitle: string) => void
12
+ toRoutinesPage: (params: {backTitle:string}) => void
13
13
  putJson: (deviceId: string, featureType: string, json: string, callback: (res: NativeResult<any>) => void) => void
14
14
  getJson: (deviceId: string, featureType: string, callback: (res: NativeResult<string>) => void) => void
15
15
  getInitiativeQueryDpsInfoWithDpsArray: (dpIds: string, deviceId: string, callback: (res: NativeResult<string>) => void) => void
@@ -197,8 +197,8 @@ function toDeviceSettingsPage(tuyaDeviceId: string, isGroup: boolean = false) {
197
197
  devicePanel.toDeviceSettingsPage(tuyaDeviceId, isGroup)
198
198
  }
199
199
 
200
- function toRoutinesPage(backTitle: string) {
201
- devicePanel.toRoutinesPage(backTitle)
200
+ function toRoutinesPage(params: {backTitle:string}) {
201
+ devicePanel.toRoutinesPage(params)
202
202
  }
203
203
 
204
204
  export class NativeApi {
@@ -266,8 +266,8 @@ export class NativeApi {
266
266
  toDeviceSettingsPage(deviceId, isGroup)
267
267
  }
268
268
 
269
- static toRoutinesPage(backTitle: string): void{
270
- toRoutinesPage(backTitle)
269
+ static toRoutinesPage(params: {backTitle:string}): void{
270
+ toRoutinesPage(params)
271
271
  }
272
272
 
273
273
  static putJson(deviceId: string, featureType: string, json: string): Promise<Result<any>> {
@@ -6,7 +6,7 @@ import Spacer from './Spacer'
6
6
  const cx = Utils.RatioUtils.convertX
7
7
 
8
8
  interface InfoTextProps extends ViewProps {
9
- icon: string
9
+ icon: string | number
10
10
  text: string
11
11
  contentColor?: string
12
12
  iconStyle?: StyleProp<ImageStyle>
@@ -15,10 +15,11 @@ interface InfoTextProps extends ViewProps {
15
15
 
16
16
  const InfoText = (props: InfoTextProps) => {
17
17
  const contentColor = props.contentColor || '#666666'
18
+ const source = typeof props.icon === 'string' ? {uri: props.icon} : props.icon
18
19
  return (
19
20
  <View style={styles.root}>
20
21
  <Image style={[styles.icon, props.iconStyle, {tintColor: contentColor}]}
21
- source={{uri: props.icon}}/>
22
+ source={source}/>
22
23
  <Spacer width={cx(4)} height={0}/>
23
24
  <Text style={[styles.text, props.textStyle, {color: contentColor}]}>{props.text}</Text>
24
25
  </View>