@ledvance/ui-biz-bundle 1.1.130 → 1.1.132
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
CHANGED
|
@@ -6,7 +6,7 @@ import { convertTo12HourFormat, loopText } from '@ledvance/base/src/utils/common
|
|
|
6
6
|
import { ApplyForItem, Timer } from "../Interface";
|
|
7
7
|
import { useSystemTimeFormate } from "@ledvance/base/src/models/modules/NativePropsSlice";
|
|
8
8
|
import ThemeType from '@ledvance/base/src/config/themeType'
|
|
9
|
-
|
|
9
|
+
import Spacer from "@ledvance/base/src/components/Spacer";
|
|
10
10
|
const { convertX: cx } = Utils.RatioUtils;
|
|
11
11
|
const { withTheme } = Utils.ThemeUtils
|
|
12
12
|
|
|
@@ -40,7 +40,6 @@ const ScheduleCard = (props: ScheduleCardProps) => {
|
|
|
40
40
|
infoContainer: {
|
|
41
41
|
flex: 1,
|
|
42
42
|
marginTop: cx(16),
|
|
43
|
-
marginBottom: cx(16),
|
|
44
43
|
flexDirection: 'column',
|
|
45
44
|
marginLeft: cx(16),
|
|
46
45
|
},
|
|
@@ -65,20 +64,22 @@ const ScheduleCard = (props: ScheduleCardProps) => {
|
|
|
65
64
|
},
|
|
66
65
|
switchContainer: {
|
|
67
66
|
marginRight: cx(16),
|
|
68
|
-
// backgroundColor: 'red',
|
|
69
67
|
marginTop: cx(16),
|
|
70
68
|
},
|
|
71
69
|
switch: {},
|
|
72
70
|
typeContainer: {
|
|
73
71
|
flexDirection: 'row',
|
|
74
|
-
|
|
72
|
+
flexWrap: 'wrap',
|
|
73
|
+
marginVertical: cx(8),
|
|
74
|
+
marginHorizontal: cx(16),
|
|
75
75
|
},
|
|
76
76
|
tag: {
|
|
77
77
|
borderRadius: cx(16),
|
|
78
78
|
height: cx(16),
|
|
79
79
|
backgroundColor: '#E6E7E8',
|
|
80
80
|
marginRight: cx(10),
|
|
81
|
-
|
|
81
|
+
marginBottom: cx(6),
|
|
82
|
+
paddingHorizontal: cx(10)
|
|
82
83
|
},
|
|
83
84
|
tagTitle: {
|
|
84
85
|
fontSize: cx(10),
|
|
@@ -90,7 +91,7 @@ const ScheduleCard = (props: ScheduleCardProps) => {
|
|
|
90
91
|
return (
|
|
91
92
|
<Card
|
|
92
93
|
style={styles.card}
|
|
93
|
-
containerStyle={[
|
|
94
|
+
containerStyle={[style]}
|
|
94
95
|
onPress={() => {
|
|
95
96
|
onPress(item);
|
|
96
97
|
}}
|
|
@@ -98,34 +99,36 @@ const ScheduleCard = (props: ScheduleCardProps) => {
|
|
|
98
99
|
onLongPress && onLongPress(item)
|
|
99
100
|
}}
|
|
100
101
|
>
|
|
101
|
-
<View style={styles.
|
|
102
|
-
<
|
|
103
|
-
|
|
104
|
-
{
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
<SwitchButton
|
|
119
|
-
value={item.enable}
|
|
120
|
-
thumbStyle={{ elevation: 0 }}
|
|
121
|
-
onValueChange={() => {
|
|
122
|
-
onEnableChange(!item.enable);
|
|
123
|
-
}}
|
|
124
|
-
/>
|
|
102
|
+
<View style={styles.container}>
|
|
103
|
+
<View style={styles.infoContainer}>
|
|
104
|
+
<Text style={styles.time}>{is24HourClock ? item.time : convertTo12HourFormat(item.time)}</Text>
|
|
105
|
+
<Text style={styles.loop}>
|
|
106
|
+
{loopText(item.loops.split('').map(loop => parseInt(loop)), item.time)}
|
|
107
|
+
</Text>
|
|
108
|
+
<Text style={styles.name}>{item.name}</Text>
|
|
109
|
+
</View>
|
|
110
|
+
<View style={styles.switchContainer}>
|
|
111
|
+
<SwitchButton
|
|
112
|
+
value={item.enable}
|
|
113
|
+
thumbStyle={{ elevation: 0 }}
|
|
114
|
+
onValueChange={() => {
|
|
115
|
+
onEnableChange(!item.enable);
|
|
116
|
+
}}
|
|
117
|
+
/>
|
|
118
|
+
</View>
|
|
125
119
|
</View>
|
|
120
|
+
{showTag ? <View style={styles.typeContainer}>
|
|
121
|
+
{showTags.map(tag => (
|
|
122
|
+
<View style={styles.tag} key={tag.dp}>
|
|
123
|
+
<Text style={styles.tagTitle}>
|
|
124
|
+
{tag.key}
|
|
125
|
+
</Text>
|
|
126
|
+
</View>
|
|
127
|
+
))}
|
|
128
|
+
</View> : <Spacer height={cx(16)} />}
|
|
126
129
|
</Card>
|
|
127
130
|
)
|
|
128
131
|
|
|
129
132
|
}
|
|
130
133
|
|
|
131
|
-
export default withTheme(ScheduleCard)
|
|
134
|
+
export default withTheme(ScheduleCard) as React.ComponentType<ScheduleCardProps>
|