@ledvance/group-ui-biz-bundle 1.0.138 → 1.0.140
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 +1 -1
- package/src/modules/energyConsumption/EnergyConsumptionChart/LandscapeView.tsx +36 -24
- package/src/modules/energyConsumption/EnergyConsumptionChart/styles.ts +1 -1
- package/src/modules/fixedTimeForPlug/FixedTimeForPlugPage.tsx +2 -0
- package/src/modules/fixedTimingForLight/FixedTimingForLightPage.tsx +2 -0
- package/src/modules/powerOnBehavior/LightBehaviorPage.tsx +2 -0
- package/src/modules/powerOnBehavior/PlugBehaviorPage.tsx +2 -0
- package/src/modules/randomTimeForPlug/RandomTimeForPlugPage.tsx +2 -0
- package/src/modules/randomTimingForLight/RandomTimingForLightPage.tsx +2 -0
- package/src/modules/timeSchedule/TimeSchedulePage.tsx +2 -0
- package/src/modules/timer/TimerPage.tsx +2 -0
package/package.json
CHANGED
|
@@ -1,32 +1,44 @@
|
|
|
1
1
|
import I18n from '@ledvance/base/src/i18n'
|
|
2
2
|
import res from '@ledvance/base/src/res'
|
|
3
|
-
import React from 'react'
|
|
4
|
-
import { Image, Text, TouchableOpacity, View } from 'react-native'
|
|
3
|
+
import React, { useEffect } from 'react'
|
|
4
|
+
import { BackHandler, Image, Text, TouchableOpacity, View } from 'react-native'
|
|
5
5
|
import { Utils } from 'tuya-panel-kit'
|
|
6
6
|
import { ChartSection } from './ChartSection'
|
|
7
7
|
|
|
8
|
-
const { convertX: cx
|
|
8
|
+
const { convertX: cx } = Utils.RatioUtils
|
|
9
9
|
|
|
10
|
-
export const LandscapeView = ({ state, actions, params, styles, theme, screenWidth, screenHeight }) =>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
export const LandscapeView = ({ state, actions, params, styles, theme, screenWidth, screenHeight }) => {
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
const onBack = () => {
|
|
13
|
+
actions.toggleLandscape()
|
|
14
|
+
return true
|
|
15
|
+
}
|
|
16
|
+
BackHandler.addEventListener('hardwareBackPress', onBack)
|
|
17
|
+
return () => {
|
|
18
|
+
BackHandler.removeEventListener('hardwareBackPress', onBack)
|
|
19
|
+
}
|
|
20
|
+
}, [])
|
|
21
|
+
return (
|
|
22
|
+
<View style={[styles.landscapeContainer, { width: screenWidth, height: screenHeight }]}>
|
|
23
|
+
<View style={styles.landscapeHeader}>
|
|
24
|
+
<Text style={styles.landscapeTitle}>
|
|
25
|
+
{I18n.getLang('chartdisplay_energy')}
|
|
26
|
+
</Text>
|
|
27
|
+
<TouchableOpacity onPress={actions.toggleLandscape}>
|
|
28
|
+
<Image source={{ uri: res.screen_normal }} style={styles.normalScreenIcon}/>
|
|
29
|
+
</TouchableOpacity>
|
|
30
|
+
</View>
|
|
20
31
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
<View style={styles.landscapeContent}>
|
|
33
|
+
<ChartSection
|
|
34
|
+
state={state}
|
|
35
|
+
actions={actions}
|
|
36
|
+
params={params}
|
|
37
|
+
styles={styles}
|
|
38
|
+
theme={theme}
|
|
39
|
+
chartHeight={screenHeight - cx(110)}
|
|
40
|
+
/>
|
|
41
|
+
</View>
|
|
30
42
|
</View>
|
|
31
|
-
|
|
32
|
-
|
|
43
|
+
)
|
|
44
|
+
}
|
|
@@ -30,7 +30,7 @@ export const getStyles = (theme: ThemeType | undefined) => StyleSheet.create({
|
|
|
30
30
|
backgroundColor: theme?.global.background,
|
|
31
31
|
// width: cx(height + 20),
|
|
32
32
|
paddingVertical: cx(30),
|
|
33
|
-
paddingHorizontal: cx(
|
|
33
|
+
paddingHorizontal: cx(50),
|
|
34
34
|
},
|
|
35
35
|
landscapeHeader: {
|
|
36
36
|
flexDirection: 'row',
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import FeatureInfo from '@ledvance/base/src/components/FeatureInfo'
|
|
1
2
|
import React, {useCallback, useMemo} from "react";
|
|
2
3
|
import {FlatList, Image, ScrollView, StyleSheet, Text, TouchableOpacity, View} from 'react-native'
|
|
3
4
|
import {useNavigation, useRoute} from '@react-navigation/native'
|
|
@@ -215,6 +216,7 @@ const FixedTimeForPlugPage = (props: { theme?: ThemeType}) => {
|
|
|
215
216
|
headlineText={I18n.getLang('fixedTimeCycle_socket_headline')}
|
|
216
217
|
headlineIcon={!isMaxNum && res.device_panel_schedule_add || undefined}
|
|
217
218
|
onHeadlineIconClick={() => onAddOrEditItem('add')}
|
|
219
|
+
info={<FeatureInfo title={I18n.getLang('fixedTimeCycle_socket_headline')} content={I18n.getLang('infobutton_fixedtimecycle')} />}
|
|
218
220
|
loading={state.loading}
|
|
219
221
|
>
|
|
220
222
|
{fixedTimeList.length > 0 ? renderList() : renderEmpty()}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import FeatureInfo from '@ledvance/base/src/components/FeatureInfo'
|
|
1
2
|
import Page from "@ledvance/base/src/components/Page";
|
|
2
3
|
import {useUAGroupInfo} from "@ledvance/base/src/models/modules/NativePropsSlice";
|
|
3
4
|
import {useNavigation, useRoute} from '@react-navigation/native'
|
|
@@ -217,6 +218,7 @@ const FixedTimeForLightPage = (props: { theme?: ThemeType}) => {
|
|
|
217
218
|
headlineText={I18n.getLang('fixedTimeCycle_socket_headline')}
|
|
218
219
|
headlineIcon={!isMaxNum && res.device_panel_schedule_add || undefined}
|
|
219
220
|
onHeadlineIconClick={() => onAddOrEditItem('add')}
|
|
221
|
+
info={<FeatureInfo title={I18n.getLang('fixedTimeCycle_socket_headline')} content={I18n.getLang('infobutton_fixedtimecycle')} />}
|
|
220
222
|
loading={state.loading}
|
|
221
223
|
>
|
|
222
224
|
{fixedTimingList.length > 0 ? renderList() : renderEmpty()}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import FeatureInfo from '@ledvance/base/src/components/FeatureInfo'
|
|
1
2
|
import React from 'react'
|
|
2
3
|
import {ScrollView, StyleSheet, Text, View} from 'react-native'
|
|
3
4
|
import {useReactive, useUpdateEffect} from 'ahooks'
|
|
@@ -77,6 +78,7 @@ const LightBehaviorPage = (props: { theme?: ThemeType }) => {
|
|
|
77
78
|
<Page
|
|
78
79
|
backText={uaGroupInfo.name}
|
|
79
80
|
headlineText={I18n.getLang('light_sources_specific_settings_power_off')}
|
|
81
|
+
info={<FeatureInfo title={I18n.getLang('light_sources_specific_settings_power_off')} content={I18n.getLang('infobutton_poweronbehavior')} />}
|
|
80
82
|
loading={state.loading}>
|
|
81
83
|
<ScrollView style={styles.root} nestedScrollEnabled={true}>
|
|
82
84
|
<View>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import FeatureInfo from '@ledvance/base/src/components/FeatureInfo'
|
|
1
2
|
import React from 'react'
|
|
2
3
|
import {ScrollView, StyleSheet} from 'react-native'
|
|
3
4
|
import Page from '@ledvance/base/src/components/Page'
|
|
@@ -44,6 +45,7 @@ const PlugBehaviorPage = () => {
|
|
|
44
45
|
<Page
|
|
45
46
|
backText={uaGroupInfo.name}
|
|
46
47
|
headlineText={I18n.getLang('light_sources_specific_settings_power_off')}
|
|
48
|
+
info={<FeatureInfo title={I18n.getLang('light_sources_specific_settings_power_off')} content={I18n.getLang('infobutton_poweronbehavior')} />}
|
|
47
49
|
loading={state.loading}>
|
|
48
50
|
<ScrollView style={styles.root} nestedScrollEnabled={true}>
|
|
49
51
|
{params.powerBehaviorKeys.length > 1 && <>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import FeatureInfo from '@ledvance/base/src/components/FeatureInfo'
|
|
1
2
|
import Page from "@ledvance/base/src/components/Page";
|
|
2
3
|
import {useUAGroupInfo} from "@ledvance/base/src/models/modules/NativePropsSlice";
|
|
3
4
|
import {useNavigation, useRoute} from '@react-navigation/native'
|
|
@@ -218,6 +219,7 @@ const RandomTimeForPlugPage = (props: { theme?: ThemeType}) => {
|
|
|
218
219
|
headlineText={I18n.getLang('randomtimecycle_sockets_headline_text')}
|
|
219
220
|
headlineIcon={!isMaxNum && res.device_panel_schedule_add || undefined}
|
|
220
221
|
onHeadlineIconClick={() => onAddOrEditItem('add')}
|
|
222
|
+
info={<FeatureInfo title={I18n.getLang('randomtimecycle_sockets_headline_text')} content={I18n.getLang('infobutton_randomtimecycle')} />}
|
|
221
223
|
loading={state.loading}
|
|
222
224
|
>
|
|
223
225
|
{randomTimeList.length > 0 ? renderList() : renderEmpty()}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import FeatureInfo from '@ledvance/base/src/components/FeatureInfo'
|
|
1
2
|
import Page from "@ledvance/base/src/components/Page";
|
|
2
3
|
import {useUAGroupInfo} from "@ledvance/base/src/models/modules/NativePropsSlice";
|
|
3
4
|
import {useNavigation, useRoute} from '@react-navigation/native'
|
|
@@ -221,6 +222,7 @@ const RandomTimeForLightPage = (props: { theme?: ThemeType}) => {
|
|
|
221
222
|
headlineText={I18n.getLang('randomtimecycle_sockets_headline_text')}
|
|
222
223
|
headlineIcon={!isMaxNum && res.device_panel_schedule_add || undefined}
|
|
223
224
|
onHeadlineIconClick={() => onAddOrEditItem('add')}
|
|
225
|
+
info={<FeatureInfo title={I18n.getLang('randomtimecycle_sockets_headline_text')} content={I18n.getLang('infobutton_randomtimecycle')} />}
|
|
224
226
|
loading={state.loading}
|
|
225
227
|
>
|
|
226
228
|
{randomTimingList.length > 0 ? renderList() : renderEmpty()}
|
|
@@ -18,6 +18,7 @@ import {ui_biz_routerKey} from "../../navigation/Routers";
|
|
|
18
18
|
import {ApplyForItem} from '@ledvance/base/src/utils/interface';
|
|
19
19
|
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
20
20
|
import {showDialog} from '@ledvance/base/src/utils/common';
|
|
21
|
+
import FeatureInfo from "@ledvance/base/src/components/FeatureInfo"
|
|
21
22
|
|
|
22
23
|
const { convertX: cx } = Utils.RatioUtils;
|
|
23
24
|
const { withTheme } = Utils.ThemeUtils
|
|
@@ -149,6 +150,7 @@ const TimeSchedulePage = (props: { theme?: ThemeType }) => {
|
|
|
149
150
|
onHeadlineIconClick={() => {
|
|
150
151
|
navigateToEdit('add');
|
|
151
152
|
}}
|
|
153
|
+
info={<FeatureInfo title={I18n.getLang('timeschedule_overview_headline_text')} content={I18n.getLang('infobutton_timeschedule')} />}
|
|
152
154
|
loading={state.loading}
|
|
153
155
|
>
|
|
154
156
|
<ScrollView nestedScrollEnabled={true}>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import FeatureInfo from '@ledvance/base/src/components/FeatureInfo'
|
|
1
2
|
import React, {useEffect} from 'react'
|
|
2
3
|
import {FlatList, Image, ScrollView, StyleSheet, Text, TouchableOpacity, View} from 'react-native'
|
|
3
4
|
import I18n from '@ledvance/base/src/i18n'
|
|
@@ -166,6 +167,7 @@ const TimerPage = (props: { theme?: ThemeType }) => {
|
|
|
166
167
|
<Page
|
|
167
168
|
backText={uaGroupInfo.name}
|
|
168
169
|
headlineText={I18n.getLang('timer_nightplug_headline_text')}
|
|
170
|
+
info={<FeatureInfo title={I18n.getLang('timer_nightplug_headline_text')} content={I18n.getLang('infobutton_timer')} />}
|
|
169
171
|
loading={state.loading}>
|
|
170
172
|
<ScrollView
|
|
171
173
|
style={styles.root}
|