@ledvance/ui-biz-bundle 1.1.37 → 1.1.39

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.1.37",
7
+ "version": "1.1.39",
8
8
  "scripts": {},
9
9
  "dependencies": {
10
10
  "@ledvance/base": "^1.x",
@@ -151,13 +151,18 @@ const DynamicMoodEditorPage = () => {
151
151
  state.mood.name.length > 32 ||
152
152
  state.mood.nodes.length < 2
153
153
  }
154
+
155
+ const showBackDialog = (): boolean => {
156
+ return !isEqual(state.mood, routeParams.currentMood);
157
+ }
158
+
154
159
  const nameRepeat = useMemo(() => {
155
160
  return !!find(params.moods, m => (m.id !== state.mood.id && m.name === state.mood.name))
156
161
  }, [state.mood.name])
157
162
  return (
158
163
  <Page
159
164
  backText={Strings.getLang('mesh_device_detail_mode')}
160
- showBackDialog={true}
165
+ showBackDialog={showBackDialog()}
161
166
  backDialogTitle={
162
167
  Strings.getLang(params.mode === 'add' ?
163
168
  'string_light_pp_dialog_sm_add_headline_c' :
@@ -168,10 +168,15 @@ const FantasyMoodEditPage = () => {
168
168
  const nameRepeat = useMemo(() => {
169
169
  return !!find(params.moods, m => (m.id !== state.mood.id && m.name === state.mood.name))
170
170
  }, [state.mood.name])
171
+
172
+ const showBackDialog = (): boolean => {
173
+ return !isEqual(state.mood, routeParams.currentMood);
174
+ }
175
+
171
176
  return (
172
177
  <Page
173
178
  backText={I18n.getLang('mesh_device_detail_mode')}
174
- showBackDialog={true}
179
+ showBackDialog={showBackDialog()}
175
180
  backDialogTitle={
176
181
  I18n.getLang(params.mode === 'add' ?
177
182
  'string_light_pp_dialog_sm_add_headline_c' :
@@ -154,10 +154,14 @@ const StaticMoodEditorPage = () => {
154
154
  return !!find(params.moods, m => (m.id !== state.mood.id && m.name === state.mood.name))
155
155
  }, [state.mood.name])
156
156
 
157
+ const showBackDialog = (): boolean => {
158
+ return !isEqual(state.mood, routeParams.currentMood);
159
+ }
160
+
157
161
  return (
158
162
  <Page
159
163
  backText={Strings.getLang('mesh_device_detail_mode')}
160
- showBackDialog={true}
164
+ showBackDialog={showBackDialog()}
161
165
  backDialogTitle={
162
166
  Strings.getLang(params.mode === 'add' ?
163
167
  'string_light_pp_dialog_sm_add_headline_c' :
@@ -180,9 +180,9 @@ const MusicPage = () => {
180
180
 
181
181
  const getSelect = async () => {
182
182
  const res: any = await NativeApi.getJson(deviceId, 'musicSelect')
183
- const type = res?.data ? JSON.parse(res?.data)?.type : 0
183
+ const type = res?.data ? (JSON.parse(res?.data)?.type || 0) : 0
184
184
  state.musicType = res?.data ? JSON.parse(res?.data)?.musicType : props.dreamMusicDp ? 0 : 1
185
- state.phoneGenreMode = musicDefalutDatasource[type !== '' && type]?.id
185
+ state.phoneGenreMode = musicDefalutDatasource[type]?.id
186
186
  state.musicEnable = workMode === 'music' && !!switchLed
187
187
  if (type !== '' && state.musicType === 1 && state.musicEnable) {
188
188
  openMusic()
@@ -190,6 +190,7 @@ const MusicPage = () => {
190
190
  }
191
191
 
192
192
  const changeMusic = async (id: number) => {
193
+ console.log(id, '< --- id')
193
194
  if (workMode !== 'music') await setWorkMode('music')
194
195
  if (!switchLed) setSwitchLed(true)
195
196
  await saveSelect(id)
@@ -206,6 +207,7 @@ const MusicPage = () => {
206
207
  }
207
208
 
208
209
  const putMusicDataFn = (data: any, extraDp = {}) => {
210
+ console.log(data, '< --- data')
209
211
  setMusicData(data, extraDp).then()
210
212
  }
211
213
 
@@ -59,7 +59,7 @@ const TimeScheduleEditPage = () => {
59
59
  isManual: true,
60
60
  singleActions: {
61
61
  enable: true, // colorLightSwitch
62
- whiteLightSwitch: false,
62
+ whiteLightSwitch: true,
63
63
  isColor: true,
64
64
  h: 0,
65
65
  s: 100,
@@ -114,6 +114,7 @@ const TimeScheduleEditPage = () => {
114
114
  }
115
115
  state.isManual = lightData.isManual
116
116
  state.actionScene = lightData.actionScene
117
+
117
118
  return
118
119
  }
119
120
 
@@ -629,11 +630,11 @@ const TimeScheduleEditPage = () => {
629
630
  style={styles.leftTitle}>{I18n.getLang('motion_detection_add_time_schedule_actions_text1')}</Text>
630
631
  </View>
631
632
  </View>
632
- <View style={{marginLeft: cx(16)}}>
633
+ <View style={{marginLeft: cx(16), flex: 1}}>
633
634
  {!!state.selectedSkill.length && <>
634
635
  {(!!state.selectedSkill.filter(skill => skill.enable).length) && <>
635
636
  <Text style={{ marginLeft: cx(5) }}>{I18n.getLang('feature_summary_action_txt_1')}</Text>
636
- <View style={{ flexDirection: 'row' }}>{
637
+ <View style={{ flexDirection: 'row',flexWrap: 'wrap' }}>{
637
638
  state.selectedSkill.filter(skill => skill.enable).map(item => (
638
639
  <View style={[styles.summaryRight, { marginLeft: cx(5), marginBottom: cx(5) }]}
639
640
  key={item.dpId}>
@@ -646,7 +647,7 @@ const TimeScheduleEditPage = () => {
646
647
 
647
648
  {(!!state.selectedSkill.filter(skill => !skill.enable).length) && <>
648
649
  <Text style={{ marginLeft: cx(5) }}>{I18n.getLang('feature_summary_action_txt_2')}</Text>
649
- <View style={{ flexDirection: 'row' }}>{
650
+ <View style={{ flexDirection: 'row', flexWrap: 'wrap' }}>{
650
651
  state.selectedSkill.filter(skill => !skill.enable).map(item => (
651
652
  <View style={[styles.summaryRight, { marginLeft: cx(5), marginBottom: cx(5) }]}
652
653
  key={item.dpId}>
@@ -71,7 +71,7 @@ const TimeSchedulePage = () => {
71
71
 
72
72
  const [, setTimeSchedule] = useTimeSchedule()
73
73
 
74
- useEffect(() => {
74
+ useEffect(() => {
75
75
  getTimerScheduleList().then()
76
76
  }, [])
77
77
 
@@ -238,7 +238,7 @@ const TimeSchedulePage = () => {
238
238
  <Text>{I18n.getLang('motion_detection_time_schedule_notifications_warning_text')}</Text>
239
239
  </View>}
240
240
  {showTags() && <View style={styles.categoryList}>
241
- {Object.keys(state.filterTags).map(tag => {
241
+ {(props.isCeilingLight ? [...Object.keys(state.filterTags)].reverse() : Object.keys(state.filterTags)).map(tag => {
242
242
  return <Tag
243
243
  key={tag}
244
244
  text={getLabelByDp(tag)}