@ledvance/base 1.0.15 → 1.0.17
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.d.ts +2 -0
- package/src/api/native.ts +26 -0
- package/src/components/Tag.tsx +1 -1
- package/src/i18n/strings.d.ts +788 -3
- package/src/i18n/strings.ts +6931 -7021
- package/src/res/index.d.ts +1 -1
- package/src/res/index.ts +1 -1
- package/src/res/materialiconsFilledCancel.png +0 -0
- package/src/res/materialiconsFilledCancel@2x.png +0 -0
- package/src/res/materialiconsFilledCancel@3x.png +0 -0
package/package.json
CHANGED
package/src/api/native.d.ts
CHANGED
|
@@ -14,4 +14,6 @@ export declare class NativeApi {
|
|
|
14
14
|
static deleteDevice(deviceId: string, isReset: boolean): Promise<NativeResult<any>>;
|
|
15
15
|
static renameDevice(deviceId: string, name: string): Promise<NativeResult<any>>;
|
|
16
16
|
static toDeviceSettingsPage(deviceId: string): void;
|
|
17
|
+
static putJson(deviceId: string, featureType: string, json: string): Promise<Result<any>>;
|
|
18
|
+
static getJson(deviceId: string, featureType: string): Promise<Result<string>>;
|
|
17
19
|
}
|
package/src/api/native.ts
CHANGED
|
@@ -9,6 +9,8 @@ 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) => void
|
|
12
|
+
putJson: (deviceId: string, featureType: string, json: string, callback: (res: NativeResult<any>) => void) => void
|
|
13
|
+
getJson: (deviceId: string, featureType: string, callback: (res: NativeResult<string>) => void) => void
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
const devicePanel: LDVDevicePanelManager = NativeModules.LDVDevicePanelManager
|
|
@@ -181,4 +183,28 @@ export class NativeApi {
|
|
|
181
183
|
static toDeviceSettingsPage(deviceId: string): void {
|
|
182
184
|
toDeviceSettingsPage(deviceId)
|
|
183
185
|
}
|
|
186
|
+
|
|
187
|
+
static putJson(deviceId: string, featureType: string, json: string): Promise<Result<any>> {
|
|
188
|
+
return new Promise<Result<any>>(resolve => {
|
|
189
|
+
devicePanel.putJson(deviceId, featureType, json, nativeRes => {
|
|
190
|
+
resolve({
|
|
191
|
+
success: nativeRes.result,
|
|
192
|
+
data: nativeRes.data,
|
|
193
|
+
msg: nativeRes.msg,
|
|
194
|
+
})
|
|
195
|
+
})
|
|
196
|
+
})
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
static getJson(deviceId: string, featureType: string): Promise<Result<string>> {
|
|
200
|
+
return new Promise<Result<string>>(resolve => {
|
|
201
|
+
devicePanel.getJson(deviceId, featureType, nativeRes => {
|
|
202
|
+
resolve({
|
|
203
|
+
success: nativeRes.result,
|
|
204
|
+
data: nativeRes.data,
|
|
205
|
+
msg: nativeRes.msg,
|
|
206
|
+
})
|
|
207
|
+
})
|
|
208
|
+
})
|
|
209
|
+
}
|
|
184
210
|
}
|