@ledvance/base 1.3.101 → 1.3.103
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/api/native.ts +18 -0
- package/src/components/FeatureInfo.tsx +1 -0
- package/src/i18n/strings.ts +169 -169
package/package.json
CHANGED
package/src/api/native.ts
CHANGED
|
@@ -2,6 +2,7 @@ import {NativeModules, Platform} from 'react-native'
|
|
|
2
2
|
import {NativeResult, Result} from '../models/modules/Result'
|
|
3
3
|
import {DpSchema, TYSdk} from 'tuya-panel-kit'
|
|
4
4
|
import {RoutineParam} from "../utils/interface";
|
|
5
|
+
import {xLog} from '@utils'
|
|
5
6
|
interface LDVDevicePanelManager {
|
|
6
7
|
back: () => void
|
|
7
8
|
control: (params: any, callback: (result: any) => void) => void
|
|
@@ -27,6 +28,7 @@ interface LDVDevicePanelManager {
|
|
|
27
28
|
getMicrophoneAccess: (res:any) => Promise<Result<any>>
|
|
28
29
|
firebaseEvent: (dimensions:Record<any, any>) => Promise<NativeResult<any>>
|
|
29
30
|
appEvent: (action: string, payload: Record<string, any>) => void
|
|
31
|
+
getRoutinesFirstName: (params: Record<any, any>) => Promise<NativeResult<any>>
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
export enum UADeviceCategory {
|
|
@@ -376,6 +378,22 @@ export class NativeApi {
|
|
|
376
378
|
msg: nativeResult.msg,
|
|
377
379
|
}
|
|
378
380
|
}
|
|
381
|
+
|
|
382
|
+
static async getRoutinesFirstName(devId: string, routineParams: Record<any, any>[]): Promise<string[]>{
|
|
383
|
+
try {
|
|
384
|
+
const nativeResult = await devicePanel.getRoutinesFirstName({
|
|
385
|
+
devId,
|
|
386
|
+
params: JSON.stringify(routineParams)
|
|
387
|
+
})
|
|
388
|
+
if (!nativeResult.result) {
|
|
389
|
+
return routineParams.map(() => '')
|
|
390
|
+
}
|
|
391
|
+
return JSON.parse(nativeResult.data)
|
|
392
|
+
} catch (e) {
|
|
393
|
+
xLog('getRoutinesFirstName error', e)
|
|
394
|
+
return routineParams.map(() => '')
|
|
395
|
+
}
|
|
396
|
+
}
|
|
379
397
|
}
|
|
380
398
|
|
|
381
399
|
// 打开下载文件
|