@ledvance/base 1.3.88 → 1.3.90
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/localazy.json +8 -1
- package/package.json +1 -1
- package/src/components/LdvPickerView.tsx +151 -0
- package/src/i18n/strings.ts +201 -5
- package/src/models/TuyaApi.ts +65 -3
- package/translateKey.txt +8 -1
- package/tsconfig.json +72 -46
- package/src/api/native.d.ts +0 -71
- package/src/api/nativeEventEmitter.d.ts +0 -3
- package/src/components/AdvanceCard.d.ts +0 -25
- package/src/components/AdvanceList.d.ts +0 -9
- package/src/components/ApplyForDeviceItem.d.ts +0 -6
- package/src/components/ApplyForDeviceList.d.ts +0 -7
- package/src/components/ApplyForText.d.ts +0 -6
- package/src/components/Card.d.ts +0 -10
- package/src/components/Cell.d.ts +0 -21
- package/src/components/CircularProgress.d.ts +0 -8
- package/src/components/ColorAdjustView.d.ts +0 -12
- package/src/components/ColorExtractor.d.ts +0 -73
- package/src/components/ColorTempAdjustView.d.ts +0 -13
- package/src/components/ColorsLine.d.ts +0 -7
- package/src/components/CustomListDialog.d.ts +0 -15
- package/src/components/DeleteButton.d.ts +0 -10
- package/src/components/Dialog.d.ts +0 -10
- package/src/components/DrawToolView.d.ts +0 -46
- package/src/components/FanAdjustView.d.ts +0 -23
- package/src/components/InfoText.d.ts +0 -11
- package/src/components/LampAdjustView.d.ts +0 -10
- package/src/components/LampAdjustView2.d.ts +0 -24
- package/src/components/LinearGradientLine.d.ts +0 -9
- package/src/components/MoodColorsLine.d.ts +0 -9
- package/src/components/Page.d.ts +0 -21
- package/src/components/Popup.d.ts +0 -7
- package/src/components/Segmented.d.ts +0 -14
- package/src/components/SocketItem.d.ts +0 -13
- package/src/components/Spacer.d.ts +0 -7
- package/src/components/Stepper.d.ts +0 -19
- package/src/components/StripAdjustView.d.ts +0 -16
- package/src/components/StripLightView.d.ts +0 -14
- package/src/components/Tag.d.ts +0 -8
- package/src/components/TextButton.d.ts +0 -9
- package/src/components/TextField.d.ts +0 -9
- package/src/components/TextFieldStyleButton.d.ts +0 -8
- package/src/components/UATabTitle.d.ts +0 -6
- package/src/components/UATabs.d.ts +0 -12
- package/src/components/connect.d.ts +0 -10
- package/src/components/ldvColorBrightness.d.ts +0 -1
- package/src/components/ldvColorSlider.d.ts +0 -14
- package/src/components/ldvItemView.d.ts +0 -12
- package/src/components/ldvPickerView.d.ts +0 -13
- package/src/components/ldvPickerView.tsx +0 -105
- package/src/components/ldvPresetView.d.ts +0 -2
- package/src/components/ldvSaturation.d.ts +0 -2
- package/src/components/ldvSlider.d.ts +0 -15
- package/src/components/ldvSwitch.d.ts +0 -10
- package/src/components/ldvTemperatureSlider.d.ts +0 -13
- package/src/components/ldvTopBar.d.ts +0 -10
- package/src/components/ldvTopName.d.ts +0 -9
- package/src/components/segmentControl.d.ts +0 -1
- package/src/components/weekSelect.d.ts +0 -7
- package/src/composeLayout.d.ts +0 -30
- package/src/hooks/Hooks.d.ts +0 -2
- package/src/i18n/index.d.ts +0 -16
- package/src/i18n/strings.d.ts +0 -15953
- package/src/models/GlobalParams.d.ts +0 -14
- package/src/models/TuyaApi.d.ts +0 -29
- package/src/models/combine.d.ts +0 -26
- package/src/models/configureStore.d.ts +0 -9
- package/src/models/index.d.ts +0 -31
- package/src/models/modules/NativePropsSlice.d.ts +0 -61
- package/src/models/modules/Result.d.ts +0 -14
- package/src/models/modules/common.d.ts +0 -44
- package/src/res/index.d.ts +0 -70
- package/src/utils/ColorParser.d.ts +0 -66
- package/src/utils/ColorUtils.d.ts +0 -71
- package/src/utils/Support.d.ts +0 -13
- package/src/utils/TypeUtils.d.ts +0 -3
- package/src/utils/cctUtils.d.ts +0 -1
- package/src/utils/common.d.ts +0 -35
- package/src/utils/index.d.ts +0 -26
- package/src/utils/interface.d.ts +0 -6
- package/src/utils/loopsCompare.d.ts +0 -1
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
interface DpSchemaProperty extends Record<string, any> {
|
|
2
|
-
type: string;
|
|
3
|
-
}
|
|
4
|
-
export interface DpSchema {
|
|
5
|
-
name: string;
|
|
6
|
-
dp: number;
|
|
7
|
-
type: string;
|
|
8
|
-
mode: string;
|
|
9
|
-
property: DpSchemaProperty;
|
|
10
|
-
}
|
|
11
|
-
export declare class GlobalParams {
|
|
12
|
-
static dpSchemaMap: Record<string, DpSchema>;
|
|
13
|
-
}
|
|
14
|
-
export {};
|
package/src/models/TuyaApi.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export interface PagingResult<T> {
|
|
2
|
-
data: T;
|
|
3
|
-
hasNext: boolean;
|
|
4
|
-
currentOffset: number;
|
|
5
|
-
}
|
|
6
|
-
export interface DpReportSataResData {
|
|
7
|
-
dps: DpReportSataData[];
|
|
8
|
-
hasNext: boolean;
|
|
9
|
-
total: number;
|
|
10
|
-
}
|
|
11
|
-
export interface DpReportSataData {
|
|
12
|
-
timeStamp: number;
|
|
13
|
-
dpId: number;
|
|
14
|
-
timeStr: string;
|
|
15
|
-
value: string;
|
|
16
|
-
}
|
|
17
|
-
export declare function getDpReportSataData(deviceId: string, dpIds: string[], offset: number, limit: number, sortType?: 'ASC' | 'DESC'): Promise<DpReportSataResData>;
|
|
18
|
-
export interface DpResultByMonthResData {
|
|
19
|
-
years: object;
|
|
20
|
-
thisDay: string;
|
|
21
|
-
sum: string;
|
|
22
|
-
}
|
|
23
|
-
export declare function getDpResultByMonth(devId: string, dpId: string, type: 'sum' | 'minux' | 'mac'): Promise<DpResultByMonthResData>;
|
|
24
|
-
export interface DpResultByDataWithSpecifiedResData {
|
|
25
|
-
result: object;
|
|
26
|
-
min: string;
|
|
27
|
-
}
|
|
28
|
-
export declare function getDataWithSpecified(devId: string, dpId: string, startDay: string, endDay: string, type: 'sum' | 'minux' | 'avg'): Promise<DpResultByDataWithSpecifiedResData>;
|
|
29
|
-
export declare function getDpResultByHour(devId: string, dpId: string, date: string, type: 'sum' | 'minux' | 'avg'): Promise<DpResultByDataWithSpecifiedResData>;
|
package/src/models/combine.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export declare const reducers: {
|
|
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>;
|
|
10
|
-
};
|
|
11
|
-
declare type Reducers = typeof reducers;
|
|
12
|
-
export declare type ReduxState = {
|
|
13
|
-
[K in keyof Reducers]: ReturnType<Reducers[K]>;
|
|
14
|
-
};
|
|
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>;
|
|
26
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ReduxState } from './combine';
|
|
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
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { ReduxState } from './combine';
|
|
2
|
-
export * from './combine';
|
|
3
|
-
export * from './configureStore';
|
|
4
|
-
declare const actions: {
|
|
5
|
-
common: {
|
|
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>>;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
export { actions };
|
|
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;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { Dispatch } from 'react';
|
|
2
|
-
import { DpsResult, Result } from './Result';
|
|
3
|
-
import { DevInfo, DpValue } from 'tuya-panel-kit';
|
|
4
|
-
import { PropertyValueTypes } from '../../utils/TypeUtils';
|
|
5
|
-
export interface NativeProps {
|
|
6
|
-
familyName: string;
|
|
7
|
-
role: 0 | 1 | 2 | 3;
|
|
8
|
-
deviceInfo: DeviceInfo;
|
|
9
|
-
uaGroupInfo: UAGroupInfo;
|
|
10
|
-
timeSchedule?: boolean;
|
|
11
|
-
energieverbrauch?: object;
|
|
12
|
-
moods: any[];
|
|
13
|
-
groupDevices: any[];
|
|
14
|
-
}
|
|
15
|
-
export interface DeviceInfo {
|
|
16
|
-
devId: string;
|
|
17
|
-
pId: string;
|
|
18
|
-
dps: any;
|
|
19
|
-
}
|
|
20
|
-
export interface UAGroupInfo {
|
|
21
|
-
tyGroupId: number;
|
|
22
|
-
pId: string;
|
|
23
|
-
dps: any;
|
|
24
|
-
config: any;
|
|
25
|
-
}
|
|
26
|
-
declare type AsyncBlockType<T> = () => Promise<DpsResult<T>>;
|
|
27
|
-
declare type SyncBlockType<T> = () => DpsResult<T>;
|
|
28
|
-
declare function asyncSetDps<T>(dispatch: Dispatch<any>, block: AsyncBlockType<T> | SyncBlockType<T>): Promise<Result<T>>;
|
|
29
|
-
declare function simpleSetDps<T>(dispatch: Dispatch<any>): (deviceId: string, dps: any) => Promise<Result<T>>;
|
|
30
|
-
declare function simpleSetDp<T>(dispatch: Dispatch<any>): (deviceId: string, dp: string, value: any) => Promise<Result<T>>;
|
|
31
|
-
declare const useDeviceId: () => string;
|
|
32
|
-
declare const useFamilyName: () => string;
|
|
33
|
-
declare const useRole: () => 0 | 1 | 2 | 3;
|
|
34
|
-
declare function useDp<T, R extends any>(dp: string): [T, (value: T) => Promise<Result<R>>];
|
|
35
|
-
declare function useScaledDp<R extends any>(dp: string, scaled?: number): [number, (value: number) => Promise<Result<R>>];
|
|
36
|
-
declare function useDps<R>(): [any, (dps: any) => Promise<Result<R>>];
|
|
37
|
-
interface DpState {
|
|
38
|
-
switch: boolean;
|
|
39
|
-
[dpCode: string]: DpValue;
|
|
40
|
-
}
|
|
41
|
-
declare const useDeviceInfo: () => DevInfo<DpState>;
|
|
42
|
-
declare const useTimeSchedule: () => [v: boolean | undefined, f: any];
|
|
43
|
-
declare const useMoods: () => [any[], (v: any[]) => void];
|
|
44
|
-
declare const useGroupDevices: () => [any[], (v: any[]) => void];
|
|
45
|
-
declare const useEnergieverbrauch: () => (object | undefined)[];
|
|
46
|
-
export declare const useEngergyGeneration: () => boolean;
|
|
47
|
-
export declare function useUAGroupInfo(): UAGroupInfo;
|
|
48
|
-
export declare function useGroupConfig<T>(): [T, (dps: any, newConfig: T) => Promise<Result<any>>];
|
|
49
|
-
/**
|
|
50
|
-
* @template GC GroupConfig
|
|
51
|
-
* @template GCPT GroupConfigPropertyType
|
|
52
|
-
* @param key
|
|
53
|
-
* @param dpKey
|
|
54
|
-
*/
|
|
55
|
-
export declare function useGroupConfigFeature<GC, GCPT extends PropertyValueTypes<GC>>(key: keyof GC, dpKey?: string): [GCPT | undefined, (value: GCPT, dpValue: any, extraDps?: any, extraConfig?: any) => Promise<Result<any>>];
|
|
56
|
-
export declare function useFeatureHook<GC, T extends PropertyValueTypes<GC>>(featureKey: keyof GC, defValue: T, valueMapToDpValue?: (v: T) => any, getExtraDps?: (v: T) => any, getExtraConfig?: (v: T) => any): [T, (value: T) => Promise<Result<any>>];
|
|
57
|
-
export declare const useFanMaxSpeed: () => 3 | 20;
|
|
58
|
-
export declare const isUVCFanDevice: () => boolean;
|
|
59
|
-
export declare const ldvModules: import("@reduxjs/toolkit").Reducer<NativeProps, import("@reduxjs/toolkit").AnyAction>;
|
|
60
|
-
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>, setMoods: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, string>, setGroupDevices: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, string>, setEnergieverbrauch: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, string>;
|
|
61
|
-
export { asyncSetDps, simpleSetDps, simpleSetDp, useDeviceId, useDeviceInfo, useDp, useScaledDp, useDps, useFamilyName, useRole, useTimeSchedule, useMoods, useGroupDevices, useEnergieverbrauch, };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export interface Result<T> {
|
|
2
|
-
success: boolean;
|
|
3
|
-
data?: T | undefined;
|
|
4
|
-
msg?: string | undefined;
|
|
5
|
-
}
|
|
6
|
-
export interface DpsResult<T> {
|
|
7
|
-
result: Result<T>;
|
|
8
|
-
dps?: any | undefined;
|
|
9
|
-
}
|
|
10
|
-
export interface NativeResult<T> {
|
|
11
|
-
result: boolean;
|
|
12
|
-
data?: T;
|
|
13
|
-
msg?: string;
|
|
14
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { DevInfo, DpValue } from 'tuya-panel-kit';
|
|
2
|
-
import { Observable } from 'rxjs/Observable';
|
|
3
|
-
import { ActionsObservable } from 'redux-observable';
|
|
4
|
-
import 'rxjs/add/observable/fromPromise';
|
|
5
|
-
import 'rxjs/add/observable/of';
|
|
6
|
-
import 'rxjs/add/observable/merge';
|
|
7
|
-
import 'rxjs/add/operator/catch';
|
|
8
|
-
import 'rxjs/add/operator/map';
|
|
9
|
-
import 'rxjs/add/operator/mergeMap';
|
|
10
|
-
import 'rxjs/add/operator/partition';
|
|
11
|
-
export interface DpState {
|
|
12
|
-
switch: boolean;
|
|
13
|
-
[dpCode: string]: DpValue;
|
|
14
|
-
}
|
|
15
|
-
export interface Log {
|
|
16
|
-
strCodes: string;
|
|
17
|
-
strIds: string;
|
|
18
|
-
time: string;
|
|
19
|
-
isSend: boolean;
|
|
20
|
-
}
|
|
21
|
-
declare type Logs = Array<Log>;
|
|
22
|
-
declare type UpdateDevInfoPayload = DevInfo;
|
|
23
|
-
declare type UpdateDpStatePayload = Partial<DpState> & {
|
|
24
|
-
[key: string]: DpValue;
|
|
25
|
-
};
|
|
26
|
-
export declare const actions: {
|
|
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>>;
|
|
33
|
-
};
|
|
34
|
-
export declare type Actions = {
|
|
35
|
-
[K in keyof typeof actions]: ReturnType<typeof actions[K]>;
|
|
36
|
-
};
|
|
37
|
-
export declare const reducers: {
|
|
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>;
|
|
42
|
-
};
|
|
43
|
-
export declare const epics: ((action$: ActionsObservable<Actions['updateDp']>) => Observable<import("redux-actions").Action<UpdateDpStatePayload>>)[];
|
|
44
|
-
export {};
|
package/src/res/index.d.ts
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
button: string;
|
|
3
|
-
tuya_decrease: string;
|
|
4
|
-
tuya_goto_icon: string;
|
|
5
|
-
tuya_increase: string;
|
|
6
|
-
tuya_select_icon: string;
|
|
7
|
-
ldv_timer_empty: string;
|
|
8
|
-
ldv_right_arrow: string;
|
|
9
|
-
ldv_list_select: string;
|
|
10
|
-
switch_1: string;
|
|
11
|
-
switch_2: string;
|
|
12
|
-
switch_3: string;
|
|
13
|
-
switch_4: string;
|
|
14
|
-
ic_cancel: string;
|
|
15
|
-
ic_more: string;
|
|
16
|
-
device_panel_timer_add: any;
|
|
17
|
-
device_panel_schedule_alert: string;
|
|
18
|
-
device_panel_schedule_add: string;
|
|
19
|
-
ic_arrows_nav_clear: any;
|
|
20
|
-
ic_info: any;
|
|
21
|
-
ic_warning_amber: any;
|
|
22
|
-
ic_check: string;
|
|
23
|
-
ic_uncheck: any;
|
|
24
|
-
rn_ic_download: string;
|
|
25
|
-
scheduleEmpty: any;
|
|
26
|
-
summary_icon1: any;
|
|
27
|
-
summary_icon2: any;
|
|
28
|
-
summary_icon3: any;
|
|
29
|
-
energy_consumption_right: any;
|
|
30
|
-
energy_consumption_chart: any;
|
|
31
|
-
energy_consumption_cash: any;
|
|
32
|
-
energy_consumption_greenery: any;
|
|
33
|
-
app_music_check: any;
|
|
34
|
-
co2Icon: any;
|
|
35
|
-
download_icon: any;
|
|
36
|
-
energy_consumption_empty: any;
|
|
37
|
-
rhythm_icon1: string;
|
|
38
|
-
rhythm_icon2: string;
|
|
39
|
-
rhythm_icon3: string;
|
|
40
|
-
rhythm_icon4: string;
|
|
41
|
-
color_temperature_wheel: string;
|
|
42
|
-
color_wheel: string;
|
|
43
|
-
scene_goodnight: string;
|
|
44
|
-
scene_reading: string;
|
|
45
|
-
scene_work: string;
|
|
46
|
-
scene_leisure: string;
|
|
47
|
-
scene_custom1: string;
|
|
48
|
-
scene_custom2: string;
|
|
49
|
-
biorhythm_plan_timer: string;
|
|
50
|
-
add: string;
|
|
51
|
-
delete: string;
|
|
52
|
-
icon_edit_scene: string;
|
|
53
|
-
light_on: any;
|
|
54
|
-
light_off: any;
|
|
55
|
-
rn_image_contact_sensor_open: string;
|
|
56
|
-
rn_image_contact_sensor_close: string;
|
|
57
|
-
rn_image_motion_detected: string;
|
|
58
|
-
rn_image_no_motion_detected: string;
|
|
59
|
-
sensor_status: any;
|
|
60
|
-
automation_status: any;
|
|
61
|
-
ic_colorize: any;
|
|
62
|
-
ic_mood_del: any;
|
|
63
|
-
ic_paint_bucket: any;
|
|
64
|
-
ic_text_field_input_error: any;
|
|
65
|
-
ic_minus: any;
|
|
66
|
-
ic_plus: any;
|
|
67
|
-
ic_disabled_light: any;
|
|
68
|
-
ic_top_arrow: any;
|
|
69
|
-
};
|
|
70
|
-
export default _default;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
interface SceneValueData {
|
|
2
|
-
t: number;
|
|
3
|
-
f: number;
|
|
4
|
-
m: number;
|
|
5
|
-
h: number;
|
|
6
|
-
s: number;
|
|
7
|
-
v: number;
|
|
8
|
-
b: number;
|
|
9
|
-
k: number;
|
|
10
|
-
}
|
|
11
|
-
export declare const musicEnabled: () => void;
|
|
12
|
-
export declare const musicDisabled: () => void;
|
|
13
|
-
export declare const isSendMusicEnabled: () => boolean;
|
|
14
|
-
declare class Parser {
|
|
15
|
-
format(value: string, len?: number): string;
|
|
16
|
-
/**
|
|
17
|
-
* @desc 将10进制的hsv转换成16进制的hhsssvvvv
|
|
18
|
-
* 范围为h(0-360) s(0-1000) v(0-1000)
|
|
19
|
-
* @param {Array} hsvArr - [h, s, v]
|
|
20
|
-
*
|
|
21
|
-
* @return {String} 'hhhhssssvvvv'
|
|
22
|
-
*
|
|
23
|
-
*/
|
|
24
|
-
encodeColorData(h: number, s: number, v: number): string;
|
|
25
|
-
encodeSceneData(scenes: SceneValueData[], sceneNum: number): string;
|
|
26
|
-
encodeControlData(m: number, h: number, s: number, v: number, b: number, k: number): string;
|
|
27
|
-
/**
|
|
28
|
-
* @desc 将16进制的hhsssvvv转换成10进制的hsv
|
|
29
|
-
* 范围为h(0-360) s(0-1000) v(0-1000)
|
|
30
|
-
* @param {String} hsvStr - encoded hsvStr (hhhhssssvvvv)
|
|
31
|
-
*
|
|
32
|
-
* @return {Array} [h, s, v]
|
|
33
|
-
*
|
|
34
|
-
*/
|
|
35
|
-
decodeColorData(byte: string): number[];
|
|
36
|
-
decodeSceneData(byte: string): {
|
|
37
|
-
sceneNum: number;
|
|
38
|
-
scenes: {
|
|
39
|
-
t: number;
|
|
40
|
-
f: number;
|
|
41
|
-
m: number;
|
|
42
|
-
h: number;
|
|
43
|
-
s: number;
|
|
44
|
-
v: number;
|
|
45
|
-
b: number;
|
|
46
|
-
k: number;
|
|
47
|
-
}[];
|
|
48
|
-
};
|
|
49
|
-
bright2Opacity(brightness: number, option?: {
|
|
50
|
-
min: number;
|
|
51
|
-
max: number;
|
|
52
|
-
}): number;
|
|
53
|
-
/**
|
|
54
|
-
* 格式化hsv
|
|
55
|
-
* 亮度将转化为透明度变化
|
|
56
|
-
*/
|
|
57
|
-
hsv2rgba(hue: number, saturation: number, bright: number): string;
|
|
58
|
-
brightKelvin2rgba(bright: number, kelvin: number): string;
|
|
59
|
-
}
|
|
60
|
-
export declare const ColorParser: Parser;
|
|
61
|
-
export declare const calcPercent: (start: number, end: number, pos: number, min?: number) => number;
|
|
62
|
-
export declare const calcPosition: (start: number, end: number, percent: number) => number;
|
|
63
|
-
export declare const randomHsb: () => number[];
|
|
64
|
-
export declare const arrayToObject: (arr: any[]) => any;
|
|
65
|
-
export declare const isCapability: (id: number) => boolean;
|
|
66
|
-
export {};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
export default class ColorUtils {
|
|
2
|
-
static rgb2Hsl: (r: any, g?: any, b?: any) => {
|
|
3
|
-
h: number;
|
|
4
|
-
s: number;
|
|
5
|
-
l: number;
|
|
6
|
-
};
|
|
7
|
-
static rgb2Hsv: (r: any, g: any, b: any) => {
|
|
8
|
-
h: number;
|
|
9
|
-
s: number;
|
|
10
|
-
v: number;
|
|
11
|
-
};
|
|
12
|
-
static hsl2Rgb: (h: any, s: any, l: any) => {
|
|
13
|
-
r: number;
|
|
14
|
-
g: number;
|
|
15
|
-
b: number;
|
|
16
|
-
};
|
|
17
|
-
static hsv2Rgb: (h: any, s: any, v: any) => {
|
|
18
|
-
r: number;
|
|
19
|
-
g: number;
|
|
20
|
-
b: number;
|
|
21
|
-
};
|
|
22
|
-
static rgb2Hex: (r: any, g: any, b: any) => string;
|
|
23
|
-
static hex2Rgb: (hex: any) => {
|
|
24
|
-
r: number;
|
|
25
|
-
g: number;
|
|
26
|
-
b: number;
|
|
27
|
-
} | null;
|
|
28
|
-
static hsv2Hex: (h: any, s?: any, v?: any) => string;
|
|
29
|
-
static hex2Hsv: (hex: any) => {
|
|
30
|
-
h: number;
|
|
31
|
-
s: number;
|
|
32
|
-
v: number;
|
|
33
|
-
};
|
|
34
|
-
static hsl2Hex: (h: any, s: any, l: any) => string;
|
|
35
|
-
static hex2Hsl: (hex: any) => {
|
|
36
|
-
h: number;
|
|
37
|
-
s: number;
|
|
38
|
-
l: number;
|
|
39
|
-
};
|
|
40
|
-
static rgb2Cmyk: (r: any, g: any, b: any) => {
|
|
41
|
-
c: string;
|
|
42
|
-
m: string;
|
|
43
|
-
y: string;
|
|
44
|
-
k: string;
|
|
45
|
-
};
|
|
46
|
-
static cmyk2Rgb: (c?: any, m?: any, y?: any, k?: any) => {
|
|
47
|
-
r: number;
|
|
48
|
-
g: number;
|
|
49
|
-
b: number;
|
|
50
|
-
};
|
|
51
|
-
static hsv2Hsl: (h: any, s?: any, v?: any) => {
|
|
52
|
-
h: any;
|
|
53
|
-
s: any;
|
|
54
|
-
l: number;
|
|
55
|
-
};
|
|
56
|
-
static hsl2Hsv: (h: any, s: any, l: any) => {
|
|
57
|
-
h: any;
|
|
58
|
-
s: number;
|
|
59
|
-
v: number;
|
|
60
|
-
};
|
|
61
|
-
static parseCss: (cssString: any) => any;
|
|
62
|
-
static stringify: (obj: any) => string;
|
|
63
|
-
static hex2Decimal: (hexColor: any) => number | undefined;
|
|
64
|
-
static decimal2Hex: (decimalColor: any) => string;
|
|
65
|
-
static random: () => string;
|
|
66
|
-
static rotateHue: (hue: any, amount: any) => any;
|
|
67
|
-
static getColorEncoding: (color: any) => "unknown" | "hex" | "rgb" | "hsv" | "hsl" | "cmyk";
|
|
68
|
-
static any2Hsl: (color: any) => any;
|
|
69
|
-
static getTransformEncodingFunction: (color: any, desiredEncoding: any) => any;
|
|
70
|
-
static darken: (color: any, percentage: any) => any;
|
|
71
|
-
}
|
package/src/utils/Support.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare const isPlug: (dpCodes: Record<string, string>) => boolean;
|
|
2
|
-
export declare const isGlassRGBWLamp: (dpCodes: Record<string, string>) => boolean;
|
|
3
|
-
export declare const isMixRGBWLamp: (dpCodes: Record<string, string>) => boolean;
|
|
4
|
-
export declare const isRGBWLamp: (dpCodes: Record<string, string>) => boolean;
|
|
5
|
-
export declare const isRGBLamp: (dpCodes: Record<string, string>) => boolean;
|
|
6
|
-
export declare const isOnlyRGBLamp: (dpCodes: Record<string, string>) => boolean;
|
|
7
|
-
export declare const isTWLamp: (dpCodes: Record<string, string>) => boolean;
|
|
8
|
-
export declare const isFanLamp: (dpCodes: Record<string, string>) => boolean;
|
|
9
|
-
export declare const isDIMLamp: (dpCodes: Record<string, string>) => boolean;
|
|
10
|
-
export declare const isGARDOT: (dpCodes: Record<string, string>) => boolean;
|
|
11
|
-
export declare const isSupportColor: (dpCodes: Record<string, string>) => boolean;
|
|
12
|
-
export declare const isSupportTemperature: (dpCodes: Record<string, string>) => boolean;
|
|
13
|
-
export declare const isSupportBrightness: (dpCodes: Record<string, string>) => boolean;
|
package/src/utils/TypeUtils.d.ts
DELETED
package/src/utils/cctUtils.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const cctToColor: (key: string | number, brightness?: string | number | undefined) => any;
|
package/src/utils/common.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export declare const loopText: (loop: any, time?: string) => string;
|
|
2
|
-
export declare const loopTommorrowText: (loop: any, isTommorrow: any) => string;
|
|
3
|
-
export declare const toFixed: (str: any, count: any) => string;
|
|
4
|
-
export declare function getArray(arr: any, size: any): string[];
|
|
5
|
-
export declare function getWeek(weekString: any): number[];
|
|
6
|
-
/**
|
|
7
|
-
* 按位分割字符串
|
|
8
|
-
* @param {*} str 要分割的字符串
|
|
9
|
-
* @param {*} step 按多少位分割
|
|
10
|
-
* @returns ['','',...]
|
|
11
|
-
*/
|
|
12
|
-
export declare function spliceByStep(str: string, step: number): string[];
|
|
13
|
-
export declare function hex2Int(hex: string): number;
|
|
14
|
-
export declare const localeNumber: (v: number | string, fixed?: number | undefined, showGroup?: boolean | undefined) => string | number;
|
|
15
|
-
export declare const exchangeNumber: (v: number | string) => string;
|
|
16
|
-
export declare const exportFile: (list: any) => void;
|
|
17
|
-
export declare const exportHistoryFile: (list: any) => void;
|
|
18
|
-
export declare const monthFormat: (v: number | string) => string;
|
|
19
|
-
export declare const tagTitle: string[];
|
|
20
|
-
export declare function isTimeSpanValid(timeData: any): number;
|
|
21
|
-
export declare function modifyPopup(beforeValue: object, editValue: object): boolean;
|
|
22
|
-
interface DialogProps {
|
|
23
|
-
method: 'alert' | 'confirm';
|
|
24
|
-
title: string;
|
|
25
|
-
showCancelText?: boolean;
|
|
26
|
-
showConfirmText?: boolean;
|
|
27
|
-
cancelText?: string;
|
|
28
|
-
confirmText?: string;
|
|
29
|
-
subTitle?: string;
|
|
30
|
-
onConfirm: (data: any, args: {
|
|
31
|
-
close: () => void;
|
|
32
|
-
}) => void;
|
|
33
|
-
}
|
|
34
|
-
export declare function showDialog(props: DialogProps): void;
|
|
35
|
-
export {};
|
package/src/utils/index.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export declare const getFaultStrings: (faultCode: string, faultValue: number, onlyPrior?: boolean) => string;
|
|
2
|
-
export declare const hsv2Rgb: (h: any, s: any, v: any) => {
|
|
3
|
-
r: number;
|
|
4
|
-
g: number;
|
|
5
|
-
b: number;
|
|
6
|
-
};
|
|
7
|
-
export declare const hex2Hsv: (hex: any) => {
|
|
8
|
-
h: number;
|
|
9
|
-
s: number;
|
|
10
|
-
v: number;
|
|
11
|
-
} | null;
|
|
12
|
-
export declare const rgb2Hsv: (r: any, g: any, b: any) => {
|
|
13
|
-
h: number;
|
|
14
|
-
s: number;
|
|
15
|
-
v: number;
|
|
16
|
-
};
|
|
17
|
-
export declare const rgb2Hex: (r: any, g: any, b: any) => string;
|
|
18
|
-
export declare const hsv2Hex: (h: any, s: any, v: any) => string;
|
|
19
|
-
export declare const getHexByHSV: (hsv: any) => any;
|
|
20
|
-
export declare const getHSVByHex: (string: any) => {
|
|
21
|
-
h: number;
|
|
22
|
-
s: number;
|
|
23
|
-
v: number;
|
|
24
|
-
};
|
|
25
|
-
export declare function mapFloatToRange(value: number, min: number, max: number): number;
|
|
26
|
-
export declare function mapValueToRatio(value: number, min: number, max: number): number;
|
package/src/utils/interface.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function findConflicts(schedule: any, object: any): any;
|