@ledvance/group-ui-biz-bundle 1.0.66 → 1.0.67

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
@@ -4,7 +4,7 @@
4
4
  "name": "@ledvance/group-ui-biz-bundle",
5
5
  "pid": [],
6
6
  "uiid": "",
7
- "version": "1.0.66",
7
+ "version": "1.0.67",
8
8
  "scripts": {},
9
9
  "dependencies": {
10
10
  "@ledvance/base": "^1.x",
@@ -56,11 +56,15 @@ const FlagEditPage = () => {
56
56
  }, [state.currentNode, state.currentWhiteNode])
57
57
 
58
58
  useUpdateEffect(() =>{
59
- state.currentNode = state.mood.colors[state.colorPaintBucketIdx]
59
+ if (state.colorPaintBucketIdx < state.mood.colors.length){
60
+ state.currentNode = state.mood.colors[state.colorPaintBucketIdx]
61
+ }
60
62
  }, [JSON.stringify(state.mood.colors), state.colorPaintBucketIdx])
61
63
 
62
64
  useUpdateEffect(() =>{
63
- state.currentWhiteNode = state.mood.whiteColors[state.whitePaintBucketIdx]
65
+ if (state.whitePaintBucketIdx < state.mood.whiteColors.length ){
66
+ state.currentWhiteNode = state.mood.whiteColors[state.whitePaintBucketIdx]
67
+ }
64
68
  }, [JSON.stringify(state.mood.whiteColors), state.whitePaintBucketIdx])
65
69
 
66
70
  const checkMoodDataChanged = useMemo(() =>{
@@ -14,11 +14,12 @@ import Spacer from '@ledvance/base/src/components/Spacer';
14
14
  import InfoText from '@ledvance/base/src/components/InfoText';
15
15
  import DeleteButton from '@ledvance/base/src/components/DeleteButton';
16
16
  import { useReactive, useUpdateEffect } from 'ahooks';
17
- import { addTimeSchedule, modDelTimeSchedule, getTimeSchedule, modifyTimeSchedule } from "@ledvance/group-ui-biz-bundle/src/modules/timeSchedule/TimeScheduleActions";
18
- import { ApplyForItem, DeviceStateType, Timer } from '@ledvance/group-ui-biz-bundle/src/modules/timeSchedule/Interface';
17
+ import { addTimeSchedule, modDelTimeSchedule, getTimeSchedule, modifyTimeSchedule } from "./TimeScheduleActions";
18
+ import { DeviceStateType, Timer } from './Interface';
19
19
  import { useParams } from '@ledvance/base/src/hooks/Hooks';
20
- import ScheduleCard from '@ledvance/group-ui-biz-bundle/src/modules/timeSchedule/components/ScheduleCard';
21
- import { ui_biz_routerKey } from "@ledvance/group-ui-biz-bundle/src/navigation/Routers";
20
+ import ScheduleCard from './components/ScheduleCard';
21
+ import { ui_biz_routerKey } from "../../navigation/Routers";
22
+ import { ApplyForItem } from '@ledvance/base/src/utils/interface';
22
23
 
23
24
  const { convertX: cx } = Utils.RatioUtils;
24
25
  const MAX_NUM = 30;
@@ -141,6 +142,7 @@ const TimeSchedulePage = () => {
141
142
  iconStyle={{ tintColor: '#ff9500' }}
142
143
  />
143
144
  )}
145
+ { state.timeScheduleList.length > 0 ?
144
146
  <FlatList
145
147
  data={state.timeScheduleList}
146
148
  renderItem={({ item }) => (
@@ -161,36 +163,36 @@ const TimeSchedulePage = () => {
161
163
  />
162
164
  )}
163
165
  keyExtractor={item => item.id.toString()}
164
- ListEmptyComponent={() => (
165
- <View style={styles.emptyContainer}>
166
- <Spacer height={cx(60)} />
167
- <Image
168
- style={styles.emptyImage}
169
- source={{ uri: res.ldv_timer_empty }}
170
- resizeMode="contain"
171
- />
172
- <InfoText
173
- icon={res.device_panel_schedule_alert}
174
- text={I18n.getLang('timeschedule_overview_empty_information_text')}
175
- style={{ width: 'auto', alignItems: 'center' }}
176
- textStyle={{ color: '#000', fontSize: cx(12), flex: undefined }}
177
- iconStyle={{ tintColor: '#000' }}
178
- />
179
- <Spacer height={cx(16)} />
180
- <DeleteButton
181
- style={styles.addBtn}
182
- text={`${I18n.getLang('timeschedule_overview_empty_button_add_text')}`}
183
- textStyle={{ fontSize: cx(12) }}
184
- onPress={() => {
185
- navigateToEdit('add');
186
- }}
187
- />
188
- </View>
189
- )}
166
+ ListEmptyComponent={<Spacer />}
190
167
  ListHeaderComponent={() => <Spacer height={cx(10)} />}
191
168
  ItemSeparatorComponent={() => <Spacer />}
192
169
  ListFooterComponent={() => <Spacer height={cx(30)} />}
193
- />
170
+ /> :
171
+ <View style={styles.emptyContainer}>
172
+ <Spacer height={cx(60)}/>
173
+ <Image
174
+ style={styles.emptyImage}
175
+ source={{uri: res.ldv_timer_empty}}
176
+ resizeMode="contain"
177
+ />
178
+ <InfoText
179
+ icon={res.device_panel_schedule_alert}
180
+ text={I18n.getLang('timeschedule_overview_empty_information_text')}
181
+ style={{width: 'auto', alignItems: 'center'}}
182
+ textStyle={{color: '#000', fontSize: cx(12), flex: undefined}}
183
+ iconStyle={{tintColor: '#000'}}
184
+ />
185
+ <Spacer height={cx(16)}/>
186
+ <DeleteButton
187
+ style={styles.addBtn}
188
+ text={`${I18n.getLang('timeschedule_overview_empty_button_add_text')}`}
189
+ textStyle={{fontSize: cx(12)}}
190
+ onPress={() => {
191
+ navigateToEdit('add');
192
+ }}
193
+ />
194
+ </View>
195
+ }
194
196
  </ScrollView>
195
197
  </Page>
196
198
  );
@@ -71,7 +71,7 @@ function ManualSettings(props: ManualSettingProps) {
71
71
  <View key={item.dp}>
72
72
  <Card style={{ marginHorizontal: cx(24) }}>
73
73
  <LdvSwitch
74
- title={item.key}
74
+ title={item.name || item.key}
75
75
  color={'#fff'}
76
76
  colorAlpha={1}
77
77
  enable={item.enable}
@@ -170,7 +170,7 @@ function ManualSettings(props: ManualSettingProps) {
170
170
  // @ts-ignore
171
171
  fanSpeed={deviceData.fanSpeed}
172
172
  onFanSwitch={() => {}}
173
- onFanSpeedChangeComplete={(fanSpeed) => {
173
+ onFanSpeedChangeComplete={(fanSpeed) => {
174
174
  state.deviceData = {
175
175
  ...state.deviceData,
176
176
  fanSpeed