@ledvance/ui-biz-bundle 1.0.57 → 1.0.58

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/ui-biz-bundle",
5
5
  "pid": [],
6
6
  "uiid": "",
7
- "version": "1.0.57",
7
+ "version": "1.0.58",
8
8
  "scripts": {},
9
9
  "dependencies": {
10
10
  "@ledvance/base": "^1.x",
@@ -29,7 +29,7 @@ import {useRoute} from '@react-navigation/core'
29
29
  import {BiorhythmEditPageParams} from './BiorhythmEditPage'
30
30
  import {useBiorhythm, userOperation} from './BiorhythmActions'
31
31
  import {useSleepPlan, useWakeUpPlan} from '../sleepWakeup/SleepWakeUpActions'
32
-
32
+ import { showDialog as showCommonDialog } from '@ledvance/base/src/utils/common'
33
33
  const cx = Utils.RatioUtils.convertX
34
34
  const width = Utils.RatioUtils.width
35
35
 
@@ -506,7 +506,7 @@ const BiorhythmPage = () => {
506
506
  }}
507
507
  replaceStatus={devicesJudge}
508
508
  gradient={state.gradient === BiorhythmGradientType.DirectGradient}
509
- isSupportTemperature={params.isSupportTemperature}/>
509
+ isSupportTemperature={!params.isSupportTemperature}/>
510
510
  <View
511
511
  style={{
512
512
  flexDirection: 'row',
@@ -710,12 +710,19 @@ const BiorhythmPage = () => {
710
710
  <TouchableOpacity
711
711
  style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}
712
712
  onPress={() => {
713
- const defBiorhythmUIState = getDefBiorhythmUIState()
714
- state.enable = defBiorhythmUIState.enable
715
- state.gradient = defBiorhythmUIState.gradient
716
- state.repeatPeriod = defBiorhythmUIState.repeatPeriod
717
- state.planList = defBiorhythmUIState.planList
718
- state.flag = Symbol()
713
+ showCommonDialog({
714
+ method: 'confirm',
715
+ title: I18n.getLang('bio_ryhthm_reset_description_text'),
716
+ onConfirm: (_, {close}) =>{
717
+ const defBiorhythmUIState = getDefBiorhythmUIState()
718
+ state.enable = defBiorhythmUIState.enable
719
+ state.gradient = defBiorhythmUIState.gradient
720
+ state.repeatPeriod = defBiorhythmUIState.repeatPeriod
721
+ state.planList = defBiorhythmUIState.planList
722
+ state.flag = Symbol()
723
+ close()
724
+ }
725
+ })
719
726
  }}>
720
727
  <Text
721
728
  style={{
@@ -140,6 +140,7 @@ export default function SingleLightView(props: SingleLightViewProps) {
140
140
  h={state.actions.h}
141
141
  s={state.actions.s}
142
142
  v={state.actions.v}
143
+ reserveSV={true}
143
144
  onHSVChange={setHSVState}
144
145
  onHSVChangeComplete={setColourStateAction}
145
146
  colorTemp={state.actions.temperature}
@@ -40,6 +40,8 @@ export interface LightData {
40
40
  isManual: boolean
41
41
  }
42
42
 
43
+ const MAXNUM = 30
44
+
43
45
  export interface TimeSchedulePageRouteParams extends JudgeTimeScheduleProps {
44
46
  dps: dpItem[],
45
47
  lightData2dps?: (data: LightData) => any
@@ -185,6 +187,10 @@ const TimeSchedulePage = () => {
185
187
  return Object.values(state.filterTags).length > 1 && state.timeScheduleList.length > 0
186
188
  }, [state.filterTags, state.timeScheduleList])
187
189
 
190
+ const showMaxNumTip = useCallback(() =>{
191
+ return state.timeScheduleList.length >= MAXNUM
192
+ }, [state.timeScheduleList.length])
193
+
188
194
  const showScheduleList = useCallback(() => {
189
195
  return !!state.filterScheduleList.length
190
196
  }, [state.filterScheduleList])
@@ -203,7 +209,7 @@ const TimeSchedulePage = () => {
203
209
  backText={deviceInfo.name}
204
210
  onBackClick={navigation.goBack}
205
211
  headlineText={I18n.getLang('timeschedule_overview_headline_text')}
206
- headlineIcon={res.device_panel_schedule_add}
212
+ headlineIcon={!showMaxNumTip() ? res.device_panel_schedule_add : undefined}
207
213
  onHeadlineIconClick={() => {
208
214
  navigateToEdit('add')
209
215
  }}
@@ -214,7 +220,11 @@ const TimeSchedulePage = () => {
214
220
  color: '#000',
215
221
  marginLeft: cx(24),
216
222
  }}>{I18n.getLang('timeschedule_overview_description_text')}</Text>
217
- <Spacer/>
223
+ <Spacer height={cx(10)}/>
224
+ {showMaxNumTip() && <View style={{marginHorizontal: cx(24), flexDirection: 'row', alignItems: 'center'}}>
225
+ <Image style={{ width: cx(16), height: cx(16), tintColor: '#ff9500' }} source={res.ic_warning_amber} />
226
+ <Text>{I18n.getLang('motion_detection_time_schedule_notifications_warning_text')}</Text>
227
+ </View>}
218
228
  {showTags() && <View style={styles.categoryList}>
219
229
  {Object.keys(state.filterTags).map(tag => {
220
230
  return <Tag