@ledvance/group-ui-biz-bundle 1.0.160 → 1.0.163
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/EditPriceSegmentContract.tsx +108 -0
- package/src/modules/energyConsumption/EditPriceSegmentScreen.tsx +89 -0
- package/src/modules/energyConsumption/EnergyConsumptionActions.ts +8 -2
- package/src/modules/energyConsumption/EnergyConsumptionChart/ChartSection.tsx +35 -6
- package/src/modules/energyConsumption/EnergyConsumptionPage.tsx +462 -293
- package/src/modules/energyConsumption/Router.ts +9 -0
- package/src/modules/energyConsumption/SetSegmentPricesContract.tsx +461 -0
- package/src/modules/energyConsumption/SetSegmentedPricesScreen.tsx +201 -0
- package/src/modules/energyConsumption/component/EnergyModal.tsx +73 -13
- package/src/modules/energyConsumption/component/NewBarChart.tsx +71 -3
- package/src/modules/energyConsumption/component/VerticalDailyPricesIndicator.tsx +175 -0
- package/src/modules/fixedTimeForPlug/FixedTimeForPlugPage.tsx +40 -38
- package/src/modules/fixedTimingForLight/FixedTimingForLightPage.tsx +40 -38
- package/src/modules/randomTimeForPlug/RandomTimeForPlugPage.tsx +41 -38
- package/src/modules/randomTimingForLight/RandomTimingForLightPage.tsx +40 -38
- package/src/modules/timeSchedule/TimeSchedulePage.tsx +13 -13
- package/src/navigation/Routers.ts +1 -0
|
@@ -136,50 +136,53 @@ const RandomTimeForPlugPage = (props: { theme?: ThemeType}) => {
|
|
|
136
136
|
|
|
137
137
|
const renderList = () => {
|
|
138
138
|
return (
|
|
139
|
-
|
|
139
|
+
<>
|
|
140
140
|
<Text style={styles.execTip}>{I18n.getLang('timeschedule_overview_description_text')}</Text>
|
|
141
141
|
<Spacer height={cx(10)}/>
|
|
142
142
|
{isMaxNum && <View style={{marginHorizontal: cx(24), flexDirection: 'row'}}>
|
|
143
143
|
<Image style={styles.maxImg} source={{uri: res.ic_warning_amber}}/>
|
|
144
144
|
<Text style={styles.maxTip}>{I18n.getLang('fixedtimecycle_warning_max_number_text')}</Text>
|
|
145
145
|
</View>}
|
|
146
|
-
<
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
close
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
146
|
+
<ScrollView nestedScrollEnabled={true}>
|
|
147
|
+
<FlatList
|
|
148
|
+
data={randomTimeList}
|
|
149
|
+
renderItem={({item}) => (
|
|
150
|
+
<ItemCard
|
|
151
|
+
item={item}
|
|
152
|
+
is24Hour={params.is24Hour}
|
|
153
|
+
onSwitch={async (v) => {
|
|
154
|
+
await onPost('set', {
|
|
155
|
+
...item,
|
|
156
|
+
enable: v,
|
|
157
|
+
settingTime: new Date().getTime()
|
|
158
|
+
})
|
|
159
|
+
}}
|
|
160
|
+
onPress={() => {
|
|
161
|
+
onAddOrEditItem('edit', item)
|
|
162
|
+
}}
|
|
163
|
+
onLongPress={async () => {
|
|
164
|
+
showDialog({
|
|
165
|
+
method: 'confirm',
|
|
166
|
+
title: I18n.getLang('cancel_dialog_delete_item_randomtimecycle_titel'),
|
|
167
|
+
subTitle: I18n.getLang('cancel_dialog_delete_item_randomtimecycle_description'),
|
|
168
|
+
onConfirm: async (_, {close}) => {
|
|
169
|
+
close()
|
|
170
|
+
state.loading = true
|
|
171
|
+
await onPost('del', item)
|
|
172
|
+
state.loading = false
|
|
173
|
+
}
|
|
174
|
+
})
|
|
175
|
+
}}
|
|
176
|
+
/>
|
|
177
|
+
)}
|
|
178
|
+
keyExtractor={(item: any) => `${item?.index}`}
|
|
179
|
+
ItemSeparatorComponent={() => <Spacer/>}
|
|
180
|
+
ListHeaderComponent={<Spacer height={cx(10)}/>}
|
|
181
|
+
ListFooterComponent={<Spacer/>}
|
|
182
|
+
/>
|
|
183
|
+
</ScrollView>
|
|
184
|
+
</>
|
|
185
|
+
|
|
183
186
|
)
|
|
184
187
|
}
|
|
185
188
|
const renderEmpty = () => {
|
|
@@ -135,7 +135,7 @@ const RandomTimeForLightPage = (props: { theme?: ThemeType}) => {
|
|
|
135
135
|
|
|
136
136
|
const renderList = () => {
|
|
137
137
|
return (
|
|
138
|
-
|
|
138
|
+
<>
|
|
139
139
|
<Text style={{
|
|
140
140
|
color: props.theme?.global.fontColor,
|
|
141
141
|
marginLeft: cx(24),
|
|
@@ -145,43 +145,45 @@ const RandomTimeForLightPage = (props: { theme?: ThemeType}) => {
|
|
|
145
145
|
<Image style={styles.maxImg} source={{uri: res.ic_warning_amber}}/>
|
|
146
146
|
<Text style={styles.maxTip}>{I18n.getLang('fixedtimecycle_warning_max_number_text')}</Text>
|
|
147
147
|
</View>}
|
|
148
|
-
<
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
close
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
148
|
+
<ScrollView nestedScrollEnabled={true}>
|
|
149
|
+
<FlatList
|
|
150
|
+
data={randomTimingList}
|
|
151
|
+
renderItem={({item}) => (
|
|
152
|
+
<ItemCard
|
|
153
|
+
item={item}
|
|
154
|
+
is24Hour={params.is24Hour}
|
|
155
|
+
onSwitch={async (v) => {
|
|
156
|
+
await onPost('set', {
|
|
157
|
+
...item,
|
|
158
|
+
power: v,
|
|
159
|
+
settingTime: new Date().getTime()
|
|
160
|
+
})
|
|
161
|
+
}}
|
|
162
|
+
onPress={() => {
|
|
163
|
+
onAddOrEditItem('edit', item)
|
|
164
|
+
}}
|
|
165
|
+
onLongPress={async () => {
|
|
166
|
+
showDialog({
|
|
167
|
+
method: 'confirm',
|
|
168
|
+
title: I18n.getLang('cancel_dialog_delete_item_randomtimecycle_titel'),
|
|
169
|
+
subTitle: I18n.getLang('cancel_dialog_delete_item_randomtimecycle_description'),
|
|
170
|
+
onConfirm: async (_, {close}) => {
|
|
171
|
+
close()
|
|
172
|
+
state.loading = true
|
|
173
|
+
await onPost('del', item)
|
|
174
|
+
state.loading = false
|
|
175
|
+
}
|
|
176
|
+
})
|
|
177
|
+
}}
|
|
178
|
+
/>
|
|
179
|
+
)}
|
|
180
|
+
keyExtractor={(item: any) => `${item?.index}`}
|
|
181
|
+
ItemSeparatorComponent={() => <Spacer/>}
|
|
182
|
+
ListHeaderComponent={<Spacer height={cx(10)}/>}
|
|
183
|
+
ListFooterComponent={<Spacer/>}
|
|
184
|
+
/>
|
|
185
|
+
</ScrollView>
|
|
186
|
+
</>
|
|
185
187
|
)
|
|
186
188
|
}
|
|
187
189
|
const renderEmpty = () => {
|
|
@@ -192,20 +192,20 @@ const TimeSchedulePage = (props: { theme?: ThemeType }) => {
|
|
|
192
192
|
info={<FeatureInfo title={I18n.getLang('timeschedule_overview_headline_text')} content={I18n.getLang('infobutton_timeschedule')} />}
|
|
193
193
|
loading={state.loading}
|
|
194
194
|
>
|
|
195
|
+
<Text style={styles.overviewDescription}>
|
|
196
|
+
{I18n.getLang('timeschedule_overview_description_text')}
|
|
197
|
+
</Text>
|
|
198
|
+
<Spacer height={cx(10)} />
|
|
199
|
+
{isMaxSchedule && (
|
|
200
|
+
<InfoText
|
|
201
|
+
text={I18n.getLang('motion_detection_time_schedule_notifications_warning_text')}
|
|
202
|
+
icon={res.ic_warning_amber}
|
|
203
|
+
style={{ marginHorizontal: cx(24) }}
|
|
204
|
+
textStyle={{ color: '#FF9500', fontSize: cx(12) }}
|
|
205
|
+
iconStyle={{ tintColor: props.theme?.global.warning }}
|
|
206
|
+
/>
|
|
207
|
+
)}
|
|
195
208
|
<ScrollView nestedScrollEnabled={true}>
|
|
196
|
-
<Text style={styles.overviewDescription}>
|
|
197
|
-
{I18n.getLang('timeschedule_overview_description_text')}
|
|
198
|
-
</Text>
|
|
199
|
-
<Spacer height={cx(10)} />
|
|
200
|
-
{isMaxSchedule && (
|
|
201
|
-
<InfoText
|
|
202
|
-
text={I18n.getLang('motion_detection_time_schedule_notifications_warning_text')}
|
|
203
|
-
icon={res.ic_warning_amber}
|
|
204
|
-
style={{ marginHorizontal: cx(24) }}
|
|
205
|
-
textStyle={{ color: '#FF9500', fontSize: cx(12) }}
|
|
206
|
-
iconStyle={{ tintColor: props.theme?.global.warning }}
|
|
207
|
-
/>
|
|
208
|
-
)}
|
|
209
209
|
{ state.timeScheduleList.length > 0 ?
|
|
210
210
|
<FlatList
|
|
211
211
|
data={state.timeScheduleList}
|
|
@@ -38,4 +38,5 @@ export const ui_biz_routerKey = {
|
|
|
38
38
|
'group_ui_biz_diy_scene_edit_page': 'group_ui_biz_diy_scene_edit_page',
|
|
39
39
|
'group_ui_biz_power_behavior_plug': 'group_ui_biz_power_behavior_plug',
|
|
40
40
|
'group_ui_biz_power_behavior_light': 'group_ui_biz_power_behavior_light',
|
|
41
|
+
'group_ui_biz_set_segmented_prices': 'group_ui_biz_set_segmented_prices',
|
|
41
42
|
}
|