@ledvance/base 1.3.35 → 1.3.37

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.35",
7
+ "version": "1.3.37",
8
8
  "scripts": {
9
9
  "prepublishOnly": "python update-localazy.py"
10
10
  },
package/src/api/native.ts CHANGED
@@ -25,6 +25,7 @@ interface LDVDevicePanelManager {
25
25
  getSystemTimeFormat: () => Promise<number>
26
26
  getMicrophoneAccess: (res:any) => Promise<Result<any>>
27
27
  firebaseEvent: (dimensions:Record<any, any>) => Promise<NativeResult<any>>
28
+ appEvent: (action: string, payload: Record<string, any>) => void
28
29
  }
29
30
 
30
31
  export enum UADeviceCategory {
@@ -61,7 +62,7 @@ export interface DeviceInfo {
61
62
  deviceCategory: UADeviceCategory
62
63
  roomName: string
63
64
  status: number
64
- dps: string
65
+ dps: string
65
66
  tuyaDeviceId: string
66
67
  }
67
68
 
@@ -179,6 +180,15 @@ export const putFeature: SetFeatureResultType = (
179
180
  })
180
181
  }
181
182
 
183
+ export const sendAppEvent = (action: string, payload?: Record<string, any>) => {
184
+ try {
185
+ console.log(action, payload)
186
+ devicePanel.appEvent(action, payload ?? {})
187
+ } catch (e) {
188
+ console.log('sendAppEvent', e)
189
+ }
190
+ }
191
+
182
192
  type DeleteDeviceResultType = (deviceId: string, isReset: boolean) => Promise<NativeResult<any>>
183
193
 
184
194
  const deleteDevice: DeleteDeviceResultType = (deviceId: string, isReset: boolean) => {
@@ -44,7 +44,7 @@ const CustomListDialog = (props: CustomListDialogProps) => {
44
44
  show={props.show}
45
45
  hideMask={true}
46
46
  onRequestClose={props.onDismiss}>
47
- <Card style={props.style} shadowHeight={cx(7)}>
47
+ <Card style={props.style}>
48
48
  <FlatList
49
49
  data={props.data}
50
50
  renderItem={({ item, index }) => {