@ledvance/base 1.1.21 → 1.1.23
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/components/ColorTempAdjustView.tsx +2 -1
- package/src/components/FanAdjustView.tsx +1 -1
- package/src/components/LinearGradientLine.tsx +5 -6
- package/src/components/Page.tsx +20 -7
- package/src/i18n/strings.ts +11369 -10977
- package/src/models/modules/NativePropsSlice.tsx +13 -3
- package/src/res/cash.png +0 -0
- package/src/res/cash@2x.png +0 -0
- package/src/res/cash@3x.png +0 -0
- package/src/res/componentsIOsButtonsButtonAdd.png +0 -0
- package/src/res/componentsIOsButtonsButtonAdd@2x.png +0 -0
- package/src/res/componentsIOsButtonsButtonAdd@3x.png +0 -0
- package/src/res/iconsMaterialOutlinedArrowsNavArrowForwardIos.png +0 -0
- package/src/res/iconsMaterialOutlinedArrowsNavArrowForwardIos@2x.png +0 -0
- package/src/res/iconsMaterialOutlinedArrowsNavArrowForwardIos@3x.png +0 -0
- package/src/res/iconsMaterialOutlinedArrowsNavCheck.png +0 -0
- package/src/res/iconsMaterialOutlinedArrowsNavCheck@2x.png +0 -0
- package/src/res/iconsMaterialOutlinedArrowsNavCheck@3x.png +0 -0
- package/src/res/iconsMaterialOutlinedCalendarCalendarToday.png +0 -0
- package/src/res/iconsMaterialOutlinedCalendarCalendarToday@2x.png +0 -0
- package/src/res/iconsMaterialOutlinedCalendarCalendarToday@3x.png +0 -0
- package/src/res/iconsMaterialOutlinedCommunicationInfo.png +0 -0
- package/src/res/iconsMaterialOutlinedCommunicationInfo@2x.png +0 -0
- package/src/res/iconsMaterialOutlinedCommunicationInfo@3x.png +0 -0
- package/src/res/iconsMaterialOutlinedEditorFileDownload.png +0 -0
- package/src/res/iconsMaterialOutlinedEditorFileDownload@2x.png +0 -0
- package/src/res/iconsMaterialOutlinedEditorFileDownload@3x.png +0 -0
- package/src/res/iconsMaterialOutlinedEditorInventory.png +0 -0
- package/src/res/iconsMaterialOutlinedEditorInventory@2x.png +0 -0
- package/src/res/iconsMaterialOutlinedEditorInventory@3x.png +0 -0
- package/src/res/iconsMaterialOutlinedOtherBarChart.png +0 -0
- package/src/res/iconsMaterialOutlinedOtherBarChart@2x.png +0 -0
- package/src/res/iconsMaterialOutlinedOtherBarChart@3x.png +0 -0
- package/src/res/iconsMaterialOutlinedOtherEnergySavingsLeaf.png +0 -0
- package/src/res/iconsMaterialOutlinedOtherEnergySavingsLeaf@2x.png +0 -0
- package/src/res/iconsMaterialOutlinedOtherEnergySavingsLeaf@3x.png +0 -0
- package/src/res/iconsMaterialOutlinedTimeAccessTime.png +0 -0
- package/src/res/iconsMaterialOutlinedTimeAccessTime@2x.png +0 -0
- package/src/res/iconsMaterialOutlinedTimeAccessTime@3x.png +0 -0
- package/src/res/illustrationsFeaturesLogs.png +0 -0
- package/src/res/illustrationsFeaturesLogs@2x.png +0 -0
- package/src/res/illustrationsFeaturesLogs@3x.png +0 -0
- package/src/res/illustrationsHomeRoutines.png +0 -0
- package/src/res/illustrationsHomeRoutines@2x.png +0 -0
- package/src/res/illustrationsHomeRoutines@3x.png +0 -0
- package/src/res/index.ts +26 -10
- package/src/res/materialiconsOutlinedArrowsNavWarningAmber.png +0 -0
- package/src/res/materialiconsOutlinedArrowsNavWarningAmber@2x.png +0 -0
- package/src/res/materialiconsOutlinedArrowsNavWarningAmber@3x.png +0 -0
- package/src/utils/Support.ts +24 -0
package/package.json
CHANGED
|
@@ -6,6 +6,7 @@ import LdvPresetView from './ldvPresetView'
|
|
|
6
6
|
import LdvSlider from './ldvSlider'
|
|
7
7
|
import {Utils} from 'tuya-panel-kit'
|
|
8
8
|
import I18n from '../i18n/index'
|
|
9
|
+
import {cctToColor} from '../utils/cctUtils'
|
|
9
10
|
|
|
10
11
|
const {convertX: cx} = Utils.RatioUtils
|
|
11
12
|
|
|
@@ -28,7 +29,7 @@ const ColorTempAdjustView = (props: ColorTempAdjustViewProps) => {
|
|
|
28
29
|
<LdvColorSlider
|
|
29
30
|
type={'temperature'}
|
|
30
31
|
title={I18n.getLang('light_sources_tile_main_lighting_shade')}
|
|
31
|
-
thumbColor={
|
|
32
|
+
thumbColor={cctToColor(props.colorTemp)}
|
|
32
33
|
value={props.colorTemp}
|
|
33
34
|
onValueChange={props.onCCTChange}
|
|
34
35
|
onSlidingComplete={props.onCCTChangeComplete}/>
|
|
@@ -124,7 +124,7 @@ const FanAdjustView = (props: FanAdjustViewProps) => {
|
|
|
124
124
|
setEnable={props.disinfectChange}
|
|
125
125
|
color={''}
|
|
126
126
|
colorAlpha={1}
|
|
127
|
-
title={'
|
|
127
|
+
title={I18n.getLang('ceiling_fan_tile_uvc_fan_disinfect')}/>
|
|
128
128
|
<Spacer height={cx(16)}/>
|
|
129
129
|
</>}
|
|
130
130
|
</Card>
|
|
@@ -43,21 +43,20 @@ const LinearGradientLine = (props: LinearGradientLineProps) => {
|
|
|
43
43
|
state.stops[`${pc}%`] = color
|
|
44
44
|
pc += p
|
|
45
45
|
})
|
|
46
|
-
console.log('LinearGradientLine colors', JSON.stringify(state.stops))
|
|
47
46
|
}, [props.colors])
|
|
48
47
|
|
|
49
48
|
return (
|
|
50
|
-
<View style={[{width, height, overflow: 'hidden'}, props.style]}>
|
|
51
|
-
<LinearGradient
|
|
49
|
+
<View style={[{ width, height, overflow: 'hidden' }, props.style]}>
|
|
50
|
+
{JSON.stringify(state.stops) !== '{}' && <LinearGradient
|
|
52
51
|
gradientId="Gradient"
|
|
53
|
-
style={{width, height}}
|
|
52
|
+
style={{ width, height }}
|
|
54
53
|
x1={state.x1}
|
|
55
54
|
y1={state.y1}
|
|
56
55
|
x2={state.x2}
|
|
57
56
|
y2={state.y2}
|
|
58
57
|
stops={state.stops}>
|
|
59
|
-
<Rect width={width} height={height}/>
|
|
60
|
-
</LinearGradient>
|
|
58
|
+
<Rect width={width} height={height} />
|
|
59
|
+
</LinearGradient>}
|
|
61
60
|
</View>
|
|
62
61
|
)
|
|
63
62
|
}
|
package/src/components/Page.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { PropsWithChildren, useCallback } from 'react'
|
|
2
|
-
import { View, ViewProps } from 'react-native'
|
|
1
|
+
import React, { PropsWithChildren, useCallback, useEffect } from 'react'
|
|
2
|
+
import { BackHandler, View, ViewProps } from 'react-native'
|
|
3
3
|
import LDVTopBar from './ldvTopBar'
|
|
4
4
|
import { useNavigation } from '@react-navigation/native'
|
|
5
5
|
import LdvTopName from './ldvTopName'
|
|
@@ -46,18 +46,31 @@ const Page = (props: PageProps) => {
|
|
|
46
46
|
},
|
|
47
47
|
[props.backDialogTitle, props.backDialogContent, disabled],
|
|
48
48
|
)
|
|
49
|
+
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
if (!!props.showBackDialog) {
|
|
52
|
+
BackHandler.addEventListener('hardwareBackPress', onBack)
|
|
53
|
+
return () => {
|
|
54
|
+
BackHandler.removeEventListener('hardwareBackPress', onBack)
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}, [props.showBackDialog, disabled])
|
|
58
|
+
|
|
49
59
|
return (
|
|
50
60
|
<>
|
|
51
|
-
<View style={[{ flex: 1 }, props.style]}>
|
|
61
|
+
<View style={[{ flex: 1, position: 'relative' }, props.style]}>
|
|
52
62
|
<LDVTopBar
|
|
53
63
|
title={props.backText}
|
|
54
|
-
onBackPress={
|
|
55
|
-
|
|
56
|
-
|
|
64
|
+
onBackPress={
|
|
65
|
+
!!props.onBackClick ? props.onBackClick :
|
|
66
|
+
!!props.showBackDialog ? onBack : (() => {
|
|
67
|
+
navigation.goBack()
|
|
68
|
+
})
|
|
69
|
+
}
|
|
57
70
|
rightButtonIcon={props.rightButtonIcon}
|
|
58
71
|
onRightButtonPress={props.rightButtonIconClick}
|
|
59
72
|
/>
|
|
60
|
-
{props.headlineText &&
|
|
73
|
+
{(!!props.headlineText) &&
|
|
61
74
|
<LdvTopName
|
|
62
75
|
title={props.headlineText}
|
|
63
76
|
rightIcon={props.headlineIcon}
|