@ledvance/group-ui-biz-bundle 1.0.106 → 1.0.108
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 +6 -36
- package/src/modules/childLock/ChildLockPage.tsx +17 -44
- package/src/modules/diyScene/DiySceneEditorPage.tsx +2 -2
- package/src/modules/energyConsumption/EnergyConsumptionActions.ts +29 -3
- package/src/modules/energyConsumption/EnergyConsumptionPage.tsx +28 -18
- package/src/modules/music/MusicActions.ts +4 -4
- package/src/modules/overchargeSwitch/OverchargeSwitchPage.tsx +23 -42
- package/src/modules/time_schedule/Interface.ts +0 -90
- package/src/modules/time_schedule/ScheduleCard.tsx +0 -128
- package/src/modules/time_schedule/TimeScheduleActions.ts +0 -102
- package/src/modules/time_schedule/TimeScheduleDetailPage.tsx +0 -910
- package/src/modules/time_schedule/TimeSchedulePage.tsx +0 -256
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { commonApi } from "@tuya/tuya-panel-api"
|
|
2
|
-
import { IAddSingleTime, IQueryTimerTasks, IModifySingleTimer, IModDeleteTaskByIds, UVCFanMode } from "./Interface"
|
|
3
|
-
import { flatMapDeep } from "lodash";
|
|
4
|
-
import I18n from "@ledvance/base/src/i18n";
|
|
5
|
-
|
|
6
|
-
export const addTimeSchedule = async (props: IAddSingleTime) => {
|
|
7
|
-
try {
|
|
8
|
-
const res = await commonApi.timerApi.addSingleTimer({
|
|
9
|
-
...props,
|
|
10
|
-
bizType: '1'
|
|
11
|
-
})
|
|
12
|
-
if (typeof res === 'number') {
|
|
13
|
-
return {
|
|
14
|
-
success: true
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
return {
|
|
18
|
-
success: false
|
|
19
|
-
}
|
|
20
|
-
} catch (err) {
|
|
21
|
-
return {
|
|
22
|
-
success: false
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export const getTimeSchedule = async (props: IQueryTimerTasks) => {
|
|
28
|
-
try {
|
|
29
|
-
const res = await commonApi.timerApi.queryTimerTasks({
|
|
30
|
-
...props,
|
|
31
|
-
bizType: '1',
|
|
32
|
-
category: 'category'
|
|
33
|
-
})
|
|
34
|
-
if (res.timers && res.timers.length) {
|
|
35
|
-
return {
|
|
36
|
-
success: true,
|
|
37
|
-
data: flatMapDeep(res.timers)
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return {
|
|
41
|
-
success: false
|
|
42
|
-
}
|
|
43
|
-
} catch (err) {
|
|
44
|
-
return {
|
|
45
|
-
success: false
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export const modifyTimeSchedule = async (props: IModifySingleTimer) => {
|
|
51
|
-
try {
|
|
52
|
-
const status = await commonApi.timerApi.modifySingleTimer({
|
|
53
|
-
...props,
|
|
54
|
-
bizType: '1',
|
|
55
|
-
})
|
|
56
|
-
return {
|
|
57
|
-
success: status
|
|
58
|
-
}
|
|
59
|
-
} catch (err) {
|
|
60
|
-
return {
|
|
61
|
-
success: false
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export const modDelTimeSchedule = async (props: IModDeleteTaskByIds) => {
|
|
67
|
-
try {
|
|
68
|
-
const status = await commonApi.timerApi.modDeleteTaskByIds({
|
|
69
|
-
...props,
|
|
70
|
-
bizType: '1',
|
|
71
|
-
status: props.status ?? 2
|
|
72
|
-
})
|
|
73
|
-
return {
|
|
74
|
-
success: status
|
|
75
|
-
}
|
|
76
|
-
} catch (err) {
|
|
77
|
-
return {
|
|
78
|
-
success: false
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export const fanModeOption = [
|
|
84
|
-
{
|
|
85
|
-
label: I18n.getLang('ceiling_fan_mode_info_option_1_headline'),
|
|
86
|
-
value: UVCFanMode.Normal,
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
label: I18n.getLang('ceiling_fan_mode_info_option_2_headline'),
|
|
90
|
-
value: UVCFanMode.Nature,
|
|
91
|
-
},
|
|
92
|
-
]
|
|
93
|
-
|
|
94
|
-
export const actionOption = {
|
|
95
|
-
switchLed: I18n.getLang('light_sources_tile_tw_lighting_headline'),
|
|
96
|
-
switchSocket: I18n.getLang('feature_summary_action_component_5'),
|
|
97
|
-
switchSocket1: I18n.getLang('feature_summary_action_component_6'),
|
|
98
|
-
switchSocket2: I18n.getLang('feature_summary_action_component_7'),
|
|
99
|
-
switchSocket3: I18n.getLang('feature_summary_action_component_8'),
|
|
100
|
-
switchSocket4: I18n.getLang('feature_summary_action_component_9'),
|
|
101
|
-
switchFan: I18n.getLang('add_new_dynamic_mood_ceiling_fan_field_headline'),
|
|
102
|
-
}
|