@ledvance/base 1.1.87 → 1.1.88
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/.temp/uaDevInfo.txt +51 -0
- package/package.json +1 -1
- package/src/api/native.d.ts +3 -0
- package/src/api/nativeEventEmitter.d.ts +1 -0
- package/src/components/ColorAdjustView.d.ts +2 -0
- package/src/components/ColorTempAdjustView.d.ts +1 -0
- package/src/components/DrawToolView.d.ts +38 -0
- package/src/components/InfoText.d.ts +1 -1
- package/src/components/LampAdjustView.d.ts +4 -7
- package/src/components/Segmented.d.ts +2 -2
- package/src/components/Stepper.d.ts +17 -0
- package/src/components/StripLightView.d.ts +2 -0
- package/src/components/ldvPickerView.d.ts +1 -0
- package/src/composeLayout.tsx +16 -14
- package/src/i18n/strings.d.ts +1316 -0
- package/src/models/modules/NativePropsSlice.d.ts +4 -1
- package/src/res/index.d.ts +4 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
@ColumnInfo(name = "device_id")
|
|
2
|
+
val deviceId: String,
|
|
3
|
+
@ColumnInfo(name = "device_name")
|
|
4
|
+
val deviceName: String,
|
|
5
|
+
@ColumnInfo(name = "cat_id")
|
|
6
|
+
val catId: String,
|
|
7
|
+
@ColumnInfo(name = "channel_no")
|
|
8
|
+
val channelNo: Int,
|
|
9
|
+
@ColumnInfo(name = "device_category")
|
|
10
|
+
val deviceCategory: String,
|
|
11
|
+
@ColumnInfo(name = "device_image")
|
|
12
|
+
val deviceImage: String,
|
|
13
|
+
@ColumnInfo(name = "tuya_device_id")
|
|
14
|
+
val tuyaDeviceId: String,
|
|
15
|
+
// deviceType 对应 ProductInfo 的 productId
|
|
16
|
+
@ColumnInfo(name = "device_type")
|
|
17
|
+
val deviceType: String,
|
|
18
|
+
@ColumnInfo(name = "offline_time")
|
|
19
|
+
val offlineTime: String,
|
|
20
|
+
@ColumnInfo(name = "rn_package")
|
|
21
|
+
val rnPackage: String?,
|
|
22
|
+
@ColumnInfo(name = "status")
|
|
23
|
+
val status: Int,
|
|
24
|
+
@ColumnInfo(name = "create_time")
|
|
25
|
+
val createTime: String,
|
|
26
|
+
@ColumnInfo(name = "version")
|
|
27
|
+
val version: String,
|
|
28
|
+
@ColumnInfo(name = "user_id")
|
|
29
|
+
val userId: String,
|
|
30
|
+
@ColumnInfo(name = "family_id")
|
|
31
|
+
val familyId: Long,
|
|
32
|
+
@ColumnInfo(name = "room_id")
|
|
33
|
+
val roomId: Long,
|
|
34
|
+
@ColumnInfo(name = "room_name")
|
|
35
|
+
val roomName: String,
|
|
36
|
+
@ColumnInfo(name = "is_shared")
|
|
37
|
+
val isShared: Int,
|
|
38
|
+
@ColumnInfo(name = "local_index")
|
|
39
|
+
val localIndex: String,
|
|
40
|
+
@ColumnInfo(name = "resource_category")
|
|
41
|
+
val resourceCategory: String,
|
|
42
|
+
@ColumnInfo(name = "resource_id")
|
|
43
|
+
val resourceId: String,
|
|
44
|
+
@ColumnInfo(name = "resource_identifier")
|
|
45
|
+
val resourceIdentifier: String,
|
|
46
|
+
@ColumnInfo(name = "resource_type")
|
|
47
|
+
val resourceType: Int,
|
|
48
|
+
@ColumnInfo(name = "index")
|
|
49
|
+
val index: Int = 0,
|
|
50
|
+
@ColumnInfo(name = "switch_state")
|
|
51
|
+
val switchState: Boolean = true
|
package/package.json
CHANGED
package/src/api/native.d.ts
CHANGED
|
@@ -52,6 +52,9 @@ export declare class NativeApi {
|
|
|
52
52
|
static deleteDevice(deviceId: string, isReset: boolean): Promise<NativeResult<any>>;
|
|
53
53
|
static renameDevice(deviceId: string, name: string): Promise<NativeResult<any>>;
|
|
54
54
|
static toDeviceSettingsPage(deviceId: string, isGroup?: boolean): void;
|
|
55
|
+
static toRoutinesPage(params: {
|
|
56
|
+
backTitle: string;
|
|
57
|
+
}): void;
|
|
55
58
|
static putJson(deviceId: string, featureType: string, json: string): Promise<Result<any>>;
|
|
56
59
|
static getJson(deviceId: string, featureType: string): Promise<Result<any>>;
|
|
57
60
|
static groupControl(tyGroupId: number, dps: string, config: string): Promise<Result<any>>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare type Node = {
|
|
2
|
+
color: string;
|
|
3
|
+
backgroundColor?: string;
|
|
4
|
+
};
|
|
5
|
+
interface DrawToolViewProps {
|
|
6
|
+
switchLed?: boolean;
|
|
7
|
+
showEnable?: boolean;
|
|
8
|
+
setEnable: (enable: boolean) => void;
|
|
9
|
+
adjustType?: number;
|
|
10
|
+
setAdjustType: (type: number) => void;
|
|
11
|
+
stripStyle?: 'ONLY_LINE' | 'WITH_BEAD';
|
|
12
|
+
nodes: Node[];
|
|
13
|
+
fixCount?: number;
|
|
14
|
+
nodeTouch: (idx: number) => void;
|
|
15
|
+
fingerUp: (idxList: string) => void;
|
|
16
|
+
hideLightView?: boolean;
|
|
17
|
+
isSupportColor?: boolean;
|
|
18
|
+
isSupportTemperature?: boolean;
|
|
19
|
+
isSupportBrightness?: boolean;
|
|
20
|
+
isColorMode?: boolean;
|
|
21
|
+
setIsColorMode: (isColorMode: boolean) => void;
|
|
22
|
+
h: number;
|
|
23
|
+
s: number;
|
|
24
|
+
v: number;
|
|
25
|
+
onHSVChange: (h: number, s: number, v: number) => void;
|
|
26
|
+
onHSVChangeComplete: (h: number, s: number, v: number) => void;
|
|
27
|
+
temperature: number;
|
|
28
|
+
brightness: number;
|
|
29
|
+
onCCTChange: (cct: number) => void;
|
|
30
|
+
onCCTChangeComplete: (cct: number) => void;
|
|
31
|
+
onBrightnessChange: (brightness: number) => void;
|
|
32
|
+
onBrightnessChangeComplete: (brightness: number) => void;
|
|
33
|
+
hideLedNum?: boolean;
|
|
34
|
+
ledNum?: number;
|
|
35
|
+
setLedNum: (num: number) => void;
|
|
36
|
+
}
|
|
37
|
+
declare const DrawToolView: (props: DrawToolViewProps) => JSX.Element;
|
|
38
|
+
export default DrawToolView;
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { ColorAdjustViewProps } from './ColorAdjustView';
|
|
2
3
|
import { ColorTempAdjustViewProps } from './ColorTempAdjustView';
|
|
3
4
|
interface LampConfigViewProps extends ColorAdjustViewProps, ColorTempAdjustViewProps {
|
|
4
|
-
isRGBWLamp: boolean;
|
|
5
|
-
isRGBLamp: boolean;
|
|
6
|
-
isOnlyRGBLamp: boolean;
|
|
7
|
-
isTWLamp: boolean;
|
|
8
|
-
isDIMLamp: boolean;
|
|
9
5
|
isColorMode: boolean;
|
|
6
|
+
isSupportColor: boolean;
|
|
10
7
|
setIsColorMode: (isColorMode: boolean) => void;
|
|
11
8
|
}
|
|
12
|
-
declare const
|
|
13
|
-
export default
|
|
9
|
+
declare const _default: React.MemoExoticComponent<(props: LampConfigViewProps) => JSX.Element>;
|
|
10
|
+
export default _default;
|
|
@@ -2,12 +2,12 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { ViewStyle } from 'react-native';
|
|
3
3
|
interface SegmentedItem {
|
|
4
4
|
label: ReactNode;
|
|
5
|
-
value: string;
|
|
5
|
+
value: string | number;
|
|
6
6
|
}
|
|
7
7
|
interface SegmentedProps {
|
|
8
8
|
value?: string | number;
|
|
9
9
|
options?: SegmentedItem[];
|
|
10
|
-
onChange?: (v: string) => void;
|
|
10
|
+
onChange?: (v: string | number) => void;
|
|
11
11
|
style?: ViewStyle;
|
|
12
12
|
}
|
|
13
13
|
declare const Segmented: (props: SegmentedProps) => JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StyleProp, ViewStyle } from "react-native";
|
|
3
|
+
export interface StepperProps {
|
|
4
|
+
value: number | string;
|
|
5
|
+
stepValue?: number;
|
|
6
|
+
min?: number;
|
|
7
|
+
max?: number;
|
|
8
|
+
editable?: boolean;
|
|
9
|
+
selectionColor?: string;
|
|
10
|
+
onValueChange?: ((value: number) => void);
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
style?: StyleProp<ViewStyle>;
|
|
13
|
+
buttonStyle?: StyleProp<ViewStyle>;
|
|
14
|
+
inputStyle?: StyleProp<ViewStyle>;
|
|
15
|
+
}
|
|
16
|
+
declare const _default: React.MemoExoticComponent<(props: StepperProps) => JSX.Element>;
|
|
17
|
+
export default _default;
|
package/src/composeLayout.tsx
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _ from 'lodash'
|
|
2
|
-
import React, {Component} from 'react'
|
|
3
|
-
import {Provider} from 'react-redux'
|
|
4
|
-
import {DevInfo, DpValue, Theme, TYSdk} from 'tuya-panel-kit'
|
|
5
|
-
import {actions, store} from './models'
|
|
6
|
-
import {addListener, removeListener} from 'api/nativeEventEmitter'
|
|
7
|
-
import {NativeApi} from 'api/native'
|
|
2
|
+
import React, { Component } from 'react'
|
|
3
|
+
import { Provider } from 'react-redux'
|
|
4
|
+
import { DevInfo, DpValue, Theme, TYSdk } from 'tuya-panel-kit'
|
|
5
|
+
import { actions, store } from './models'
|
|
6
|
+
import { addListener, removeListener } from 'api/nativeEventEmitter'
|
|
7
|
+
import { NativeApi } from 'api/native'
|
|
8
8
|
import {
|
|
9
9
|
DeviceInfo,
|
|
10
10
|
NativeProps,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
setNativeProps,
|
|
13
13
|
UAGroupInfo,
|
|
14
14
|
} from './models/modules/NativePropsSlice'
|
|
15
|
-
import {DpSchema, GlobalParams} from './models/GlobalParams'
|
|
15
|
+
import { DpSchema, GlobalParams } from './models/GlobalParams'
|
|
16
16
|
import Connect from './components/connect'
|
|
17
17
|
|
|
18
18
|
interface Props {
|
|
@@ -51,7 +51,7 @@ const theme = {
|
|
|
51
51
|
*/
|
|
52
52
|
const composeLayout = (component: React.ComponentType) => {
|
|
53
53
|
const NavigatorLayout = component
|
|
54
|
-
const {dispatch} = store
|
|
54
|
+
const { dispatch } = store
|
|
55
55
|
|
|
56
56
|
addListener(store)
|
|
57
57
|
|
|
@@ -124,7 +124,7 @@ const composeLayout = (component: React.ComponentType) => {
|
|
|
124
124
|
const nativeProps: NativeProps = {
|
|
125
125
|
deviceInfo: {
|
|
126
126
|
devId: ldvDevInfo.devId,
|
|
127
|
-
dps: {...dps, ...JSON.parse(ldvDevInfo.dps)},
|
|
127
|
+
dps: { ...dps, ...JSON.parse(ldvDevInfo.dps) },
|
|
128
128
|
pId: ldvDevInfo.pId,
|
|
129
129
|
},
|
|
130
130
|
uaGroupInfo: {
|
|
@@ -134,7 +134,7 @@ const composeLayout = (component: React.ComponentType) => {
|
|
|
134
134
|
config: {},
|
|
135
135
|
},
|
|
136
136
|
familyName: ldvDevInfo.familyName,
|
|
137
|
-
role: ldvDevInfo.role
|
|
137
|
+
role: ldvDevInfo.role,
|
|
138
138
|
}
|
|
139
139
|
NativeApi.showObj(nativeProps)
|
|
140
140
|
console.log('Redux 初始数据:', JSON.stringify(nativeProps))
|
|
@@ -154,12 +154,14 @@ const composeLayout = (component: React.ComponentType) => {
|
|
|
154
154
|
},
|
|
155
155
|
uaGroupInfo: {
|
|
156
156
|
tyGroupId: uaGroupInfo.tyGroupId,
|
|
157
|
-
dps: {...dps, ...JSON.parse(uaGroupInfo.dps)},
|
|
157
|
+
dps: { ...dps, ...JSON.parse(uaGroupInfo.dps) },
|
|
158
158
|
pId: uaGroupInfo.pId,
|
|
159
|
-
config:
|
|
159
|
+
config: {
|
|
160
|
+
...JSON.parse(uaGroupInfo.config || '{}'),
|
|
161
|
+
},
|
|
160
162
|
},
|
|
161
163
|
familyName: uaGroupInfo.familyName,
|
|
162
|
-
role: uaGroupInfo.role
|
|
164
|
+
role: uaGroupInfo.role,
|
|
163
165
|
}
|
|
164
166
|
NativeApi.showObj(nativeProps)
|
|
165
167
|
console.log('Redux 初始数据:', JSON.stringify(nativeProps))
|
|
@@ -191,7 +193,7 @@ const composeLayout = (component: React.ComponentType) => {
|
|
|
191
193
|
<Provider store={store}>
|
|
192
194
|
<Theme theme={theme}>
|
|
193
195
|
<Connect mapStateToProps={_.identity}>
|
|
194
|
-
{({mapStateToProps, ...props}: { mapStateToProps: any; [_: string]: any }) => {
|
|
196
|
+
{({ mapStateToProps, ...props }: { mapStateToProps: any; [_: string]: any }) => {
|
|
195
197
|
return <NavigatorLayout {...props} />
|
|
196
198
|
}}
|
|
197
199
|
</Connect>
|