@ledvance/ui-biz-bundle 1.0.10 → 1.0.11

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.
Files changed (33) hide show
  1. package/package.json +1 -1
  2. package/src/hooks/DeviceDpStateHooks.d.ts +14 -0
  3. package/src/modules/config/ldvConfig.d.ts +2 -0
  4. package/src/modules/history/HistoryPage.d.ts +1 -1
  5. package/src/modules/history/SwitchHistoryPageActions.d.ts +2 -1
  6. package/src/modules/mood/AddMoodPage.d.ts +10 -0
  7. package/src/modules/mood/DynamicMoodEditorPage.d.ts +6 -0
  8. package/src/modules/mood/MoodItem.d.ts +11 -0
  9. package/src/modules/mood/MoodPage.d.ts +2 -0
  10. package/src/modules/mood/RecommendMoodItem.d.ts +13 -0
  11. package/src/modules/mood/StaticMoodEditorPage.d.ts +16 -0
  12. package/src/modules/mood/tools.d.ts +3 -0
  13. package/src/modules/scene/SceneAction.d.ts +13 -0
  14. package/src/modules/scene/SceneDetailPage.d.ts +1 -0
  15. package/src/modules/scene/SceneInfo.d.ts +72 -0
  16. package/src/modules/scene/ScenePage.d.ts +7 -0
  17. package/src/modules/select/SelectPage.d.ts +13 -0
  18. package/src/modules/timeSchedule/DeviceState.d.ts +12 -0
  19. package/src/modules/timeSchedule/LdvScheduleItem.d.ts +15 -0
  20. package/src/modules/timeSchedule/ManualSetting.d.ts +10 -0
  21. package/src/modules/timeSchedule/MoodSetting.d.ts +10 -0
  22. package/src/modules/timeSchedule/ScheduleScene.d.ts +6 -0
  23. package/src/modules/timeSchedule/SingleLightView.d.ts +10 -0
  24. package/src/modules/timeSchedule/TimeScheduleEditpage.d.ts +6 -0
  25. package/src/modules/timeSchedule/TimeSchedulePage.d.ts +7 -0
  26. package/src/modules/timeSchedule/mix/MixLightBean.d.ts +10 -0
  27. package/src/modules/timeSchedule/mix/MixLightView.d.ts +7 -0
  28. package/src/modules/timeSchedule/utils.d.ts +1 -0
  29. package/src/modules/timer/TimerPage.d.ts +11 -0
  30. package/src/modules/timer/TimerPageAction.d.ts +22 -0
  31. package/src/navigation/Routers.d.ts +2 -0
  32. package/src/navigation/Routers.ts +22 -0
  33. package/src/navigation/tools.d.ts +9 -0
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "@ledvance/ui-biz-bundle",
5
5
  "pid": [],
6
6
  "uiid": "",
7
- "version": "1.0.10",
7
+ "version": "1.0.11",
8
8
  "scripts": {},
9
9
  "dependencies": {
10
10
  "@ledvance/base": "^1.x",
@@ -0,0 +1,14 @@
1
+ import { Result } from "@ledvance/base/src/models/modules/Result";
2
+ export declare const WHITE = "white";
3
+ export declare const COLOUR = "colour";
4
+ export declare const SCENE = "scene";
5
+ export declare const MUSIC = "music";
6
+ export declare const modeOptions: {
7
+ label: string;
8
+ value: string;
9
+ }[];
10
+ export declare const setBiorhythmDp: (deviceId: string, value: string, dpCodes: Record<string, string>) => any;
11
+ export declare const setMixRgbcwDp: (deviceId: string, value: string, enable: boolean | undefined, dpCodes: Record<string, string>) => any;
12
+ export declare const setSceneDp: (deviceId: string, value: string, dpCodes: Record<string, string>) => any;
13
+ export declare const setMixSceneDp: (deviceId: string, value: string, dpCodes: Record<string, string>) => any;
14
+ export declare const useWorkMode: (dpCodes: Record<string, string>) => [string, (mode: string) => Promise<Result<any>>];
@@ -0,0 +1,2 @@
1
+ declare const ldvStyles: any;
2
+ export default ldvStyles;
@@ -1,2 +1,2 @@
1
- declare const SwitchHistoryPage: () => JSX.Element;
1
+ declare const SwitchHistoryPage: () => any;
2
2
  export default SwitchHistoryPage;
@@ -7,7 +7,8 @@ export interface SwitchHistoryUIItemActionData {
7
7
  date: string;
8
8
  time: string;
9
9
  action: string;
10
+ dpId: string;
10
11
  }
11
- declare type getSwitchHistoryDataFunType = (deviceId: string, dpIds: string[], offset: number, limit?: number) => Promise<PagingResult<SwitchHistoryUIItemData[]>>;
12
+ declare type getSwitchHistoryDataFunType = (deviceId: string, dpIds: string[], offset: number, limit?: number, stringOn?: string, stringOff?: string, actionKey?: string, showLimit?: boolean) => Promise<PagingResult<SwitchHistoryUIItemData[]>>;
12
13
  export declare const getSwitchHistoryData: getSwitchHistoryDataFunType;
13
14
  export {};
@@ -0,0 +1,10 @@
1
+ import { SceneUIState } from '../scene/SceneInfo';
2
+ export interface AddMoodPageParams {
3
+ isStatic: boolean;
4
+ moods: SceneUIState[];
5
+ onSave: () => void;
6
+ dpCodes: Record<string, string>;
7
+ routeKey: Record<string, string>;
8
+ }
9
+ declare const AddMoodPage: () => any;
10
+ export default AddMoodPage;
@@ -0,0 +1,6 @@
1
+ import { SceneNodeTransitionMode } from '../scene/SceneInfo';
2
+ import { SelectPageData } from '../select/SelectPage';
3
+ declare const DynamicMoodEditorPage: () => any;
4
+ export default DynamicMoodEditorPage;
5
+ export declare function getTransitionModeString(transitionMode: SceneNodeTransitionMode): string;
6
+ export declare function createSelectPageData(transitionMode: SceneNodeTransitionMode, mode: SceneNodeTransitionMode): SelectPageData<SceneNodeTransitionMode>;
@@ -0,0 +1,11 @@
1
+ import { ViewProps, ViewStyle } from 'react-native';
2
+ import { SceneUIState } from '../scene/SceneInfo';
3
+ interface MoodItemProps extends ViewProps {
4
+ enable: boolean;
5
+ mood: SceneUIState;
6
+ style?: ViewStyle;
7
+ onPress?: () => void;
8
+ onSwitch: (enable: boolean) => void;
9
+ }
10
+ declare const MoodItem: (props: MoodItemProps) => any;
11
+ export default MoodItem;
@@ -0,0 +1,2 @@
1
+ declare const MoodPage: () => any;
2
+ export default MoodPage;
@@ -0,0 +1,13 @@
1
+ import { MoodColorsLineType } from '@ledvance/base/src/components/MoodColorsLine';
2
+ import { SceneNodeInfo } from '../scene/SceneInfo';
3
+ export interface ColorsLineProps {
4
+ type: MoodColorsLineType;
5
+ nodes?: SceneNodeInfo[];
6
+ }
7
+ interface RecommendMoodItemProps {
8
+ title: string;
9
+ moodColorsLineProps?: ColorsLineProps;
10
+ onPress: () => void;
11
+ }
12
+ export default function RecommendMoodItem(props: RecommendMoodItemProps): any;
13
+ export {};
@@ -0,0 +1,16 @@
1
+ import { SceneNodeInfo, SceneUIState } from '../scene/SceneInfo';
2
+ export interface StaticMoodEditorPageParams {
3
+ mode: 'add' | 'edit';
4
+ currentMood: SceneUIState;
5
+ moods: SceneUIState[];
6
+ onSave: () => void;
7
+ dpCodes: Record<string, string>;
8
+ routeKey: Record<string, string>;
9
+ }
10
+ export interface StaticMoodEditorPageState {
11
+ headline: string;
12
+ mood: SceneUIState;
13
+ currentNode: SceneNodeInfo;
14
+ }
15
+ declare const StaticMoodEditorPage: () => any;
16
+ export default StaticMoodEditorPage;
@@ -0,0 +1,3 @@
1
+ export declare const showDeleteMoodDialog: (onConfirm: (data: any, args: {
2
+ close: () => void;
3
+ }) => void) => void;
@@ -0,0 +1,13 @@
1
+ import { Result } from '@ledvance/base/src/models/modules/Result';
2
+ import { RemoteSceneInfo, SceneInfo, SceneNodeTransitionMode, SceneUIState } from './SceneInfo';
3
+ declare type GetRemoteSceneListType = (deviceId: string, dpCodes: Record<string, string>) => Promise<Result<SceneUIState[]>>;
4
+ declare type SetRemoteSceneListType = (deviceId: string, remoteSceneList: RemoteSceneInfo[]) => Promise<Result<any>>;
5
+ export declare const setRemoteSceneList: SetRemoteSceneListType;
6
+ export declare const getRemoteSceneList: GetRemoteSceneListType;
7
+ export declare function dp2Obj(dp: string): SceneInfo;
8
+ declare type UseSceneType = (dpCodes: Record<string, string>) => [number, SetSceneType];
9
+ declare type SetSceneType = (deviceId: string, scene: SceneInfo, dpCodes: Record<string, string>) => Promise<Result<any>>;
10
+ export declare const useScene: UseSceneType;
11
+ export declare function obj2Dp(scene: SceneInfo): string;
12
+ export declare function saveScene(deviceId: string, scene: SceneUIState, transitionMode: SceneNodeTransitionMode, transitionTime: number, scenes: SceneUIState[]): Promise<Result<any>>;
13
+ export {};
@@ -0,0 +1 @@
1
+ export default function SceneDetailPage(): any;
@@ -0,0 +1,72 @@
1
+ export interface SceneInfo {
2
+ id: number;
3
+ fanEnable: boolean;
4
+ fanSpeed: number;
5
+ nodes: SceneNodeInfo[];
6
+ }
7
+ export interface SceneNodeInfo {
8
+ switchingInterval: number;
9
+ transitionTime: number;
10
+ transitionMode: SceneNodeTransitionMode;
11
+ h: number;
12
+ s: number;
13
+ v: number;
14
+ brightness: number;
15
+ colorTemp: number;
16
+ isColorNode: boolean;
17
+ }
18
+ export declare enum SceneNodeTransitionMode {
19
+ Static = 0,
20
+ Jump = 1,
21
+ Gradient = 2
22
+ }
23
+ /**
24
+ * 萤石云端 Scene 物模型
25
+ */
26
+ export interface RemoteSceneInfo {
27
+ n: string;
28
+ i: string;
29
+ s: string;
30
+ t: number;
31
+ e: boolean;
32
+ }
33
+ export interface RemoteSceneNodeInfo {
34
+ ct: number;
35
+ b: number;
36
+ c: string;
37
+ }
38
+ /**
39
+ * UI 展示用物模型
40
+ */
41
+ export interface ScenePageUIState {
42
+ currentScene: SceneUIState | undefined;
43
+ scenes: SceneUIState[];
44
+ flag: symbol;
45
+ }
46
+ export interface SceneUIState extends SceneInfo {
47
+ name: string;
48
+ image: string;
49
+ }
50
+ export declare function getDefSceneList(dpCodes: Record<string, string>): RemoteSceneInfo[];
51
+ export declare const MAXSCENE = 8;
52
+ export declare const AddScene: {
53
+ name: string;
54
+ image: string;
55
+ id: number;
56
+ nodes: never[];
57
+ };
58
+ export declare const NEWSCENE: {
59
+ image: string;
60
+ name: string;
61
+ nodes: {
62
+ brightness: number;
63
+ colorTemp: number;
64
+ h: number;
65
+ isColorNode: boolean;
66
+ s: number;
67
+ switchingInterval: number;
68
+ transitionMode: number;
69
+ transitionTime: number;
70
+ v: number;
71
+ }[];
72
+ };
@@ -0,0 +1,7 @@
1
+ import { SceneUIState } from './SceneInfo';
2
+ export interface SceneListItemType {
3
+ item: SceneUIState;
4
+ index: number;
5
+ }
6
+ declare const ScenePage: () => any;
7
+ export default ScenePage;
@@ -0,0 +1,13 @@
1
+ export interface SelectPageData<T> {
2
+ text: string;
3
+ selected: boolean;
4
+ value: T;
5
+ }
6
+ export interface SelectPageParams<T> {
7
+ title: string;
8
+ data: SelectPageData<T>[];
9
+ dpCodes: Record<string, string>;
10
+ onSelect: (selectPageData: SelectPageData<T>) => void;
11
+ }
12
+ declare const SelectPage: () => any;
13
+ export default SelectPage;
@@ -0,0 +1,12 @@
1
+ import { ScheduleItemDp } from "./TimeScheduleEditpage";
2
+ interface DeviceStateProps {
3
+ scheduleItem: any;
4
+ dps: ScheduleItemDp[];
5
+ dpCodes: Record<string, string>;
6
+ isManual: boolean;
7
+ setIsManual?: (isManual: boolean) => void;
8
+ setSendDps: (dpId: string, dp: Record<string, any>) => void;
9
+ changeSkillEnable: (dpId: string, enable: boolean) => void;
10
+ }
11
+ declare const DeviceState: (props: DeviceStateProps) => any;
12
+ export default DeviceState;
@@ -0,0 +1,15 @@
1
+ import { ViewStyle } from 'react-native';
2
+ interface LdvScheduleItemProps {
3
+ item: any;
4
+ tags?: {
5
+ label: string;
6
+ value: string;
7
+ dpId: string;
8
+ }[];
9
+ style?: ViewStyle;
10
+ onEnableChange: (enable: boolean) => void;
11
+ onPress: (item: any) => void;
12
+ onLongPress: (item: any) => void;
13
+ }
14
+ declare const LdvScheduleItem: (props: LdvScheduleItemProps) => any;
15
+ export default LdvScheduleItem;
@@ -0,0 +1,10 @@
1
+ import { ScheduleItemDp } from "./TimeScheduleEditpage";
2
+ interface ManualSettingProps {
3
+ scheduleItem: any;
4
+ dps: ScheduleItemDp[];
5
+ dpCodes: Record<string, string>;
6
+ setSendDps: (dpId: string, dp: Record<string, any>) => void;
7
+ changeSkillEnable: (dpId: string, enable: boolean) => void;
8
+ }
9
+ declare const ManualSetting: (props: ManualSettingProps) => any;
10
+ export default ManualSetting;
@@ -0,0 +1,10 @@
1
+ import { ScheduleItemDp } from "./TimeScheduleEditpage";
2
+ interface MoodSettingProps {
3
+ scheduleItem: any;
4
+ dps: ScheduleItemDp[];
5
+ dpCodes: Record<string, string>;
6
+ setSendDps: (dpId: string, dp: Record<string, any>) => void;
7
+ changeSkillEnable: (dpId: string, enable: boolean) => void;
8
+ }
9
+ declare const MoodSetting: (props: MoodSettingProps) => any;
10
+ export default MoodSetting;
@@ -0,0 +1,6 @@
1
+ declare const ScheduleScene: ({ scene, setScene, dpCodes }: {
2
+ scene: any;
3
+ setScene: any;
4
+ dpCodes: any;
5
+ }) => any;
6
+ export default ScheduleScene;
@@ -0,0 +1,10 @@
1
+ import { ScheduleItemDp } from './TimeScheduleEditpage';
2
+ interface SingleLightViewProps {
3
+ scheduleItem: any;
4
+ dpCodes: Record<string, string>;
5
+ dp: ScheduleItemDp;
6
+ setSendDps: (dpId: string, dp: Record<string, any>) => void;
7
+ setEnable: (dpId: string, enable: boolean) => void;
8
+ }
9
+ export default function SingleLightView(props: SingleLightViewProps): any;
10
+ export {};
@@ -0,0 +1,6 @@
1
+ import { dpItem } from "./TimeSchedulePage";
2
+ export interface ScheduleItemDp extends dpItem {
3
+ enable: boolean;
4
+ }
5
+ declare const TimeScheduleEditPage: () => any;
6
+ export default TimeScheduleEditPage;
@@ -0,0 +1,7 @@
1
+ export declare type dpItem = {
2
+ label: string;
3
+ value: string;
4
+ dpId: string;
5
+ };
6
+ declare const TimeSchedulePage: () => any;
7
+ export default TimeSchedulePage;
@@ -0,0 +1,10 @@
1
+ export interface MixLightBean {
2
+ whiteLightSwitch: boolean;
3
+ colorLightSwitch: boolean;
4
+ mixRgbcwEnabled: boolean;
5
+ hue: number;
6
+ sat: number;
7
+ lightness: number;
8
+ brightness: number;
9
+ colorTempPercent: number;
10
+ }
@@ -0,0 +1,7 @@
1
+ interface MixLightViewProps {
2
+ scheduleItem: any;
3
+ dpCodes: Record<string, string>;
4
+ setSendDps: (dpId: string, dp: Record<string, any>) => void;
5
+ }
6
+ export default function MixLightView(props: MixLightViewProps): any;
7
+ export {};
@@ -0,0 +1 @@
1
+ export declare function mapFloatToRange(value: number, min: number, max: number): number;
@@ -0,0 +1,11 @@
1
+ export declare type dpItem = {
2
+ label: string;
3
+ value: string;
4
+ dpId: string;
5
+ enableDp: string;
6
+ cloudKey: any;
7
+ stringOn: any;
8
+ stringOff: any;
9
+ };
10
+ declare const TimerPage: () => any;
11
+ export default TimerPage;
@@ -0,0 +1,22 @@
1
+ import { dpItem } from "./TimerPage";
2
+ export declare const useCountdowns: (dps: dpItem[]) => {
3
+ label: string;
4
+ value: string;
5
+ dpId: string;
6
+ enableDp: string;
7
+ cloudKey: any;
8
+ stringOn: any;
9
+ stringOff: any;
10
+ countdown: any;
11
+ enable: any;
12
+ }[];
13
+ export declare const useProgress: (dps: dpItem[], cancelTimer: any) => {
14
+ label: string;
15
+ value: string;
16
+ dpId: string;
17
+ enableDp: string;
18
+ cloudKey: any;
19
+ stringOn: any;
20
+ stringOff: any;
21
+ progressHook: [number, (time: number, t: any) => void];
22
+ }[];
@@ -0,0 +1,2 @@
1
+ import { NavigationRoute } from 'tuya-panel-kit';
2
+ export declare const TimeSchedulePageRouters: NavigationRoute[];
@@ -0,0 +1,22 @@
1
+ import {NavigationRoute} from 'tuya-panel-kit'
2
+ import TimeSchedulePage from '../modules/timeSchedule/TimeSchedulePage'
3
+ import TimeScheduleEditPage from '../modules/timeSchedule/TimeScheduleEditpage'
4
+
5
+ export const TimeSchedulePageRouters: NavigationRoute[] = [
6
+ {
7
+ name: 'ui_biz_time_schedule',
8
+ component: TimeSchedulePage,
9
+ options: {
10
+ hideTopbar: true,
11
+ showOfflineView: false,
12
+ },
13
+ },
14
+ {
15
+ name: 'ui_biz_time_schedule_edit',
16
+ component: TimeScheduleEditPage,
17
+ options: {
18
+ hideTopbar: true,
19
+ showOfflineView: false,
20
+ },
21
+ },
22
+ ]
@@ -0,0 +1,9 @@
1
+ import { NavigationProp, ParamListBase } from '@react-navigation/native';
2
+ import { AddMoodPageParams } from 'modules/mood/AddMoodPage';
3
+ import { StaticMoodEditorPageParams } from 'modules/mood/StaticMoodEditorPage';
4
+ import { StackNavigationProp } from '@react-navigation/stack';
5
+ import { SelectPageParams } from 'modules/select/SelectPage';
6
+ export declare function toStaticMoodEditorPage(navigation: NavigationProp<ParamListBase>, routerKey: Record<string, string>, params: StaticMoodEditorPageParams): void;
7
+ export declare function toDynamicMoodEditorPage(navigation: NavigationProp<ParamListBase>, routerKey: Record<string, string>, params: StaticMoodEditorPageParams): void;
8
+ export declare function toAddMoodPage(navigation: NavigationProp<ParamListBase>, routerKey: Record<string, string>, params: AddMoodPageParams): void;
9
+ export declare function toSelectPage<T>(navigation: StackNavigationProp<any>, routerKey: Record<string, string>, params: SelectPageParams<T>): void;