@ledvance/base 1.1.41 → 1.1.43
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 +30 -3
- package/src/api/native.ts +31 -3
- package/src/components/Card.d.ts +1 -1
- package/src/components/Cell.d.ts +2 -2
- package/src/components/ColorAdjustView.d.ts +1 -1
- package/src/components/ColorExtractor.d.ts +1 -1
- package/src/components/ColorTempAdjustView.d.ts +1 -1
- package/src/components/ColorsLine.d.ts +1 -1
- package/src/components/CustomListDialog.d.ts +1 -1
- package/src/components/DeleteButton.d.ts +1 -1
- package/src/components/Dialog.d.ts +1 -1
- package/src/components/FanAdjustView.d.ts +1 -1
- package/src/components/InfoText.d.ts +1 -1
- package/src/components/LampAdjustView.d.ts +1 -1
- package/src/components/LinearGradientLine.d.ts +1 -1
- package/src/components/MoodColorsLine.d.ts +2 -2
- package/src/components/Page.d.ts +1 -1
- package/src/components/Segmented.d.ts +1 -1
- package/src/components/Spacer.d.ts +1 -1
- package/src/components/Tag.d.ts +1 -1
- package/src/components/TextButton.d.ts +1 -1
- package/src/components/TextField.d.ts +1 -1
- package/src/components/TextFieldStyleButton.d.ts +1 -1
- package/src/components/connect.d.ts +9 -1
- package/src/components/ldvColorBrightness.d.ts +1 -1
- package/src/components/ldvColorSlider.d.ts +1 -1
- package/src/components/ldvPickerView.d.ts +1 -1
- package/src/components/ldvPresetView.d.ts +1 -1
- package/src/components/ldvSaturation.d.ts +1 -1
- package/src/components/ldvSlider.d.ts +1 -1
- package/src/components/ldvSwitch.d.ts +1 -1
- package/src/components/ldvTemperatureSlider.d.ts +1 -1
- package/src/components/ldvTopBar.d.ts +1 -1
- package/src/components/ldvTopName.d.ts +1 -1
- package/src/components/segmentControl.d.ts +1 -1
- package/src/components/weekSelect.d.ts +1 -1
- package/src/i18n/index.d.ts +1 -1
- package/src/i18n/strings.d.ts +280 -0
- package/src/i18n/strings.ts +330 -50
- package/src/models/combine.d.ts +21 -8
- package/src/models/configureStore.d.ts +8 -1
- package/src/models/index.d.ts +23 -8
- package/src/models/modules/NativePropsSlice.d.ts +6 -6
- package/src/models/modules/common.d.ts +21 -13
- package/src/utils/ColorParser.d.ts +3 -3
- package/src/utils/ColorUtils.d.ts +1 -1
- package/src/utils/cctUtils.d.ts +1 -1
- package/src/utils/common.d.ts +2 -2
package/src/models/combine.d.ts
CHANGED
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
export declare const reducers: {
|
|
2
|
-
dpState:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
dpState: import("redux-actions").ReduxCompatibleReducer<import("./modules/common").DpState, import("tuya-panel-kit").DevInfo<Record<string, import("tuya-panel-kit").DpType>> | (Partial<import("./modules/common").DpState> & {
|
|
3
|
+
[key: string]: string | number | boolean;
|
|
4
|
+
})>;
|
|
5
|
+
devInfo: import("redux-actions").ReduxCompatibleReducer<import("tuya-panel-kit").DevInfo<import("./modules/common").DpState>, import("tuya-panel-kit").DevInfo<import("./modules/common").DpState>>;
|
|
6
|
+
logs: import("redux-actions").ReduxCompatibleReducer<import("./modules/common").Log[], import("tuya-panel-kit").DevInfo<Record<string, import("tuya-panel-kit").DpType>> | (Partial<import("./modules/common").DpState> & {
|
|
7
|
+
[key: string]: string | number | boolean;
|
|
8
|
+
}) | undefined>;
|
|
9
|
+
ldvModules: import("@reduxjs/toolkit").Reducer<import("./modules/NativePropsSlice").NativeProps, import("@reduxjs/toolkit").AnyAction>;
|
|
6
10
|
};
|
|
7
|
-
type Reducers = typeof reducers;
|
|
8
|
-
export type ReduxState = {
|
|
11
|
+
declare type Reducers = typeof reducers;
|
|
12
|
+
export declare type ReduxState = {
|
|
9
13
|
[K in keyof Reducers]: ReturnType<Reducers[K]>;
|
|
10
14
|
};
|
|
11
|
-
export declare const rootReducers:
|
|
12
|
-
|
|
15
|
+
export declare const rootReducers: import("redux").Reducer<import("redux").CombinedState<{
|
|
16
|
+
dpState: import("./modules/common").DpState;
|
|
17
|
+
devInfo: import("tuya-panel-kit").DevInfo<import("./modules/common").DpState>;
|
|
18
|
+
logs: import("./modules/common").Log[];
|
|
19
|
+
ldvModules: import("./modules/NativePropsSlice").NativeProps;
|
|
20
|
+
}>, import("redux").AnyAction>;
|
|
21
|
+
export declare const rootEpics: import("redux-observable").Epic<import("redux-actions").Action<Partial<import("./modules/common").DpState> & {
|
|
22
|
+
[key: string]: string | number | boolean;
|
|
23
|
+
}>, import("redux-actions").Action<Partial<import("./modules/common").DpState> & {
|
|
24
|
+
[key: string]: string | number | boolean;
|
|
25
|
+
}>, void, any>;
|
|
13
26
|
export {};
|
|
@@ -1,2 +1,9 @@
|
|
|
1
1
|
import { ReduxState } from './combine';
|
|
2
|
-
export default function configureStore(initialState?: Partial<ReduxState>):
|
|
2
|
+
export default function configureStore(initialState?: Partial<ReduxState>): import("redux").Store<import("redux").CombinedState<{
|
|
3
|
+
dpState: import("./modules/common").DpState;
|
|
4
|
+
devInfo: import("tuya-panel-kit").DevInfo<import("./modules/common").DpState>;
|
|
5
|
+
logs: import("./modules/common").Log[];
|
|
6
|
+
ldvModules: import("./modules/NativePropsSlice").NativeProps;
|
|
7
|
+
}>, import("redux").AnyAction> & {
|
|
8
|
+
dispatch: unknown;
|
|
9
|
+
};
|
package/src/models/index.d.ts
CHANGED
|
@@ -3,14 +3,29 @@ export * from './combine';
|
|
|
3
3
|
export * from './configureStore';
|
|
4
4
|
declare const actions: {
|
|
5
5
|
common: {
|
|
6
|
-
devInfoChange:
|
|
7
|
-
deviceChange:
|
|
8
|
-
responseUpdateDp:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
devInfoChange: import("redux-actions").ActionFunction1<import("tuya-panel-kit").DevInfo<Record<string, import("tuya-panel-kit").DpType>>, import("redux-actions").Action<import("tuya-panel-kit").DevInfo<Record<string, import("tuya-panel-kit").DpType>>>>;
|
|
7
|
+
deviceChange: import("redux-actions").ActionFunction1<import("tuya-panel-kit").DevInfo<Record<string, import("tuya-panel-kit").DpType>>, import("redux-actions").Action<import("tuya-panel-kit").DevInfo<Record<string, import("tuya-panel-kit").DpType>>>>;
|
|
8
|
+
responseUpdateDp: import("redux-actions").ActionFunction1<Partial<import("./modules/common").DpState> & {
|
|
9
|
+
[key: string]: string | number | boolean;
|
|
10
|
+
}, import("redux-actions").Action<Partial<import("./modules/common").DpState> & {
|
|
11
|
+
[key: string]: string | number | boolean;
|
|
12
|
+
}>>;
|
|
13
|
+
updateDp: import("redux-actions").ActionFunction1<Partial<import("./modules/common").DpState> & {
|
|
14
|
+
[key: string]: string | number | boolean;
|
|
15
|
+
}, import("redux-actions").Action<Partial<import("./modules/common").DpState> & {
|
|
16
|
+
[key: string]: string | number | boolean;
|
|
17
|
+
}>>;
|
|
18
|
+
consoleChange: import("redux-actions").ActionFunctionAny<import("redux-actions").Action<any>>;
|
|
19
|
+
clearConsole: import("redux-actions").ActionFunctionAny<import("redux-actions").Action<any>>;
|
|
12
20
|
};
|
|
13
21
|
};
|
|
14
22
|
export { actions };
|
|
15
|
-
export declare const store:
|
|
16
|
-
|
|
23
|
+
export declare const store: import("redux").Store<import("redux").CombinedState<{
|
|
24
|
+
dpState: import("./modules/common").DpState;
|
|
25
|
+
devInfo: import("tuya-panel-kit").DevInfo<import("./modules/common").DpState>;
|
|
26
|
+
logs: import("./modules/common").Log[];
|
|
27
|
+
ldvModules: import("./modules/NativePropsSlice").NativeProps;
|
|
28
|
+
}>, import("redux").AnyAction> & {
|
|
29
|
+
dispatch: unknown;
|
|
30
|
+
};
|
|
31
|
+
export declare function useSelector<TSelected>(selector: (state: ReduxState) => TSelected, equalityFn?: (left: TSelected, right: TSelected) => boolean): TSelected;
|
|
@@ -19,12 +19,12 @@ export interface UAGroupInfo {
|
|
|
19
19
|
dps: any;
|
|
20
20
|
config: any;
|
|
21
21
|
}
|
|
22
|
-
type AsyncBlockType<T> = () => Promise<DpsResult<T>>;
|
|
23
|
-
type SyncBlockType<T> = () => DpsResult<T>;
|
|
22
|
+
declare type AsyncBlockType<T> = () => Promise<DpsResult<T>>;
|
|
23
|
+
declare type SyncBlockType<T> = () => DpsResult<T>;
|
|
24
24
|
declare function asyncSetDps<T>(dispatch: Dispatch<any>, block: AsyncBlockType<T> | SyncBlockType<T>): Promise<Result<T>>;
|
|
25
25
|
declare function simpleSetDps<T>(dispatch: Dispatch<any>): (deviceId: string, dps: any) => Promise<Result<T>>;
|
|
26
26
|
declare function simpleSetDp<T>(dispatch: Dispatch<any>): (deviceId: string, dp: string, value: any) => Promise<Result<T>>;
|
|
27
|
-
declare const useDeviceId: () =>
|
|
27
|
+
declare const useDeviceId: () => string;
|
|
28
28
|
declare const useFamilyName: () => string;
|
|
29
29
|
declare function useDp<T, R extends any>(dp: string): [T, (value: T) => Promise<Result<R>>];
|
|
30
30
|
declare function useScaledDp<R extends any>(dp: string, scaled?: number): [number, (value: number) => Promise<Result<R>>];
|
|
@@ -35,7 +35,7 @@ interface DpState {
|
|
|
35
35
|
}
|
|
36
36
|
declare const useDeviceInfo: () => DevInfo<DpState>;
|
|
37
37
|
declare const useTimeSchedule: () => [v: boolean | undefined, f: any];
|
|
38
|
-
declare const useEnergieverbrauch: () =>
|
|
38
|
+
declare const useEnergieverbrauch: () => (object | undefined)[];
|
|
39
39
|
export declare const useEngergyGeneration: () => boolean;
|
|
40
40
|
export declare function useUAGroupInfo(): UAGroupInfo;
|
|
41
41
|
export declare function useGroupConfig<T>(): [T, (dps: any, newConfig: T) => Promise<Result<any>>];
|
|
@@ -49,6 +49,6 @@ export declare function useGroupConfigFeature<GC, GCPT extends {
|
|
|
49
49
|
[K in keyof GC]: GC[K];
|
|
50
50
|
}[keyof GC]>(key: keyof GC, extraDps?: any): [GCPT, (value: GCPT, dpValue: any) => Promise<Result<any>>];
|
|
51
51
|
export declare const useFanMaxSpeed: () => 3 | 20;
|
|
52
|
-
export declare const ldvModules:
|
|
53
|
-
export declare const setNativeProps:
|
|
52
|
+
export declare const ldvModules: import("@reduxjs/toolkit").Reducer<NativeProps, import("@reduxjs/toolkit").AnyAction>;
|
|
53
|
+
export declare const setNativeProps: import("@reduxjs/toolkit").ActionCreatorWithPayload<NativeProps, string>, setGroupNativeProps: import("@reduxjs/toolkit").ActionCreatorWithPayload<NativeProps, string>, setDps: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, string>, setTimeSchedule: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, string>, setEnergieverbrauch: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, string>;
|
|
54
54
|
export { asyncSetDps, simpleSetDps, simpleSetDp, useDeviceId, useDeviceInfo, useDp, useScaledDp, useDps, useFamilyName, useTimeSchedule, useEnergieverbrauch, };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { DpValue } from 'tuya-panel-kit';
|
|
1
|
+
import { DevInfo, DpValue } from 'tuya-panel-kit';
|
|
2
|
+
import { Observable } from 'rxjs/Observable';
|
|
3
|
+
import { ActionsObservable } from 'redux-observable';
|
|
2
4
|
import 'rxjs/add/observable/fromPromise';
|
|
3
5
|
import 'rxjs/add/observable/of';
|
|
4
6
|
import 'rxjs/add/observable/merge';
|
|
@@ -16,21 +18,27 @@ export interface Log {
|
|
|
16
18
|
time: string;
|
|
17
19
|
isSend: boolean;
|
|
18
20
|
}
|
|
21
|
+
declare type Logs = Array<Log>;
|
|
22
|
+
declare type UpdateDevInfoPayload = DevInfo;
|
|
23
|
+
declare type UpdateDpStatePayload = Partial<DpState> & {
|
|
24
|
+
[key: string]: DpValue;
|
|
25
|
+
};
|
|
19
26
|
export declare const actions: {
|
|
20
|
-
devInfoChange:
|
|
21
|
-
deviceChange:
|
|
22
|
-
responseUpdateDp:
|
|
23
|
-
updateDp:
|
|
24
|
-
consoleChange: any
|
|
25
|
-
clearConsole: any
|
|
27
|
+
devInfoChange: import("redux-actions").ActionFunction1<UpdateDevInfoPayload, import("redux-actions").Action<UpdateDevInfoPayload>>;
|
|
28
|
+
deviceChange: import("redux-actions").ActionFunction1<UpdateDevInfoPayload, import("redux-actions").Action<UpdateDevInfoPayload>>;
|
|
29
|
+
responseUpdateDp: import("redux-actions").ActionFunction1<UpdateDpStatePayload, import("redux-actions").Action<UpdateDpStatePayload>>;
|
|
30
|
+
updateDp: import("redux-actions").ActionFunction1<UpdateDpStatePayload, import("redux-actions").Action<UpdateDpStatePayload>>;
|
|
31
|
+
consoleChange: import("redux-actions").ActionFunctionAny<import("redux-actions").Action<any>>;
|
|
32
|
+
clearConsole: import("redux-actions").ActionFunctionAny<import("redux-actions").Action<any>>;
|
|
26
33
|
};
|
|
27
|
-
export type Actions = {
|
|
34
|
+
export declare type Actions = {
|
|
28
35
|
[K in keyof typeof actions]: ReturnType<typeof actions[K]>;
|
|
29
36
|
};
|
|
30
37
|
export declare const reducers: {
|
|
31
|
-
dpState:
|
|
32
|
-
devInfo:
|
|
33
|
-
logs:
|
|
34
|
-
ldvModules:
|
|
38
|
+
dpState: import("redux-actions").ReduxCompatibleReducer<DpState, UpdateDevInfoPayload | UpdateDpStatePayload>;
|
|
39
|
+
devInfo: import("redux-actions").ReduxCompatibleReducer<DevInfo<DpState>, DevInfo<DpState>>;
|
|
40
|
+
logs: import("redux-actions").ReduxCompatibleReducer<Logs, DevInfo<Record<string, import("tuya-panel-kit").DpType>> | UpdateDpStatePayload | undefined>;
|
|
41
|
+
ldvModules: import("@reduxjs/toolkit").Reducer<import("./NativePropsSlice").NativeProps, import("@reduxjs/toolkit").AnyAction>;
|
|
35
42
|
};
|
|
36
|
-
export declare const epics: ((action$: ActionsObservable<
|
|
43
|
+
export declare const epics: ((action$: ActionsObservable<Actions['updateDp']>) => Observable<import("redux-actions").Action<UpdateDpStatePayload>>)[];
|
|
44
|
+
export {};
|
|
@@ -32,7 +32,7 @@ declare class Parser {
|
|
|
32
32
|
* @return {Array} [h, s, v]
|
|
33
33
|
*
|
|
34
34
|
*/
|
|
35
|
-
decodeColorData(byte: string):
|
|
35
|
+
decodeColorData(byte: string): number[];
|
|
36
36
|
decodeSceneData(byte: string): {
|
|
37
37
|
sceneNum: number;
|
|
38
38
|
scenes: {
|
|
@@ -54,8 +54,8 @@ declare class Parser {
|
|
|
54
54
|
* 格式化hsv
|
|
55
55
|
* 亮度将转化为透明度变化
|
|
56
56
|
*/
|
|
57
|
-
hsv2rgba(hue: number, saturation: number, bright: number):
|
|
58
|
-
brightKelvin2rgba(bright: number, kelvin: number):
|
|
57
|
+
hsv2rgba(hue: number, saturation: number, bright: number): string;
|
|
58
|
+
brightKelvin2rgba(bright: number, kelvin: number): string;
|
|
59
59
|
}
|
|
60
60
|
export declare const ColorParser: Parser;
|
|
61
61
|
export declare const calcPercent: (start: number, end: number, pos: number, min?: number) => number;
|
|
@@ -64,7 +64,7 @@ export default class ColorUtils {
|
|
|
64
64
|
static decimal2Hex: (decimalColor: any) => string;
|
|
65
65
|
static random: () => string;
|
|
66
66
|
static rotateHue: (hue: any, amount: any) => any;
|
|
67
|
-
static getColorEncoding: (color: any) => "
|
|
67
|
+
static getColorEncoding: (color: any) => "unknown" | "hex" | "rgb" | "hsv" | "hsl" | "cmyk";
|
|
68
68
|
static any2Hsl: (color: any) => any;
|
|
69
69
|
static getTransformEncodingFunction: (color: any, desiredEncoding: any) => any;
|
|
70
70
|
static darken: (color: any, percentage: any) => any;
|
package/src/utils/cctUtils.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const cctToColor: (key: string | number, brightness?: string | number) => any;
|
|
1
|
+
export declare const cctToColor: (key: string | number, brightness?: string | number | undefined) => any;
|
package/src/utils/common.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export declare function getWeek(weekString: any): number[];
|
|
|
11
11
|
*/
|
|
12
12
|
export declare function spliceByStep(str: string, step: number): string[];
|
|
13
13
|
export declare function hex2Int(hex: string): number;
|
|
14
|
-
export declare const localeNumber: (v: number | string, fixed?: number) => string | number;
|
|
14
|
+
export declare const localeNumber: (v: number | string, fixed?: number | undefined) => string | number;
|
|
15
15
|
export declare const exportFile: (list: any) => void;
|
|
16
16
|
export declare const exportHistoryFile: (list: any) => void;
|
|
17
17
|
export declare const monthFormat: (v: number | string) => string;
|
|
@@ -30,5 +30,5 @@ interface DialogProps {
|
|
|
30
30
|
close: () => void;
|
|
31
31
|
}) => void;
|
|
32
32
|
}
|
|
33
|
-
export declare function showDialog(props: DialogProps):
|
|
33
|
+
export declare function showDialog(props: DialogProps): void;
|
|
34
34
|
export {};
|