@ledvance/group-ui-biz-bundle 1.0.58 → 1.0.61

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.58",
7
+ "version": "1.0.61",
8
8
  "scripts": {},
9
9
  "dependencies": {
10
10
  "@ledvance/base": "^1.x",
@@ -40,7 +40,7 @@ const FlagEditPage = () => {
40
40
  mood: params.currentMood,
41
41
  currentWhiteNode: params.currentMood.whiteColors[params.currentMood.whiteColors.length - 1]!,
42
42
  currentNode: params.currentMood.colors[params.currentMood.colors.length - 1],
43
- whitePaintBucketIdx: params.currentMood.colors.length - 1,
43
+ whitePaintBucketIdx: params.currentMood.whiteColors.length - 1,
44
44
  colorPaintBucketIdx: params.currentMood.colors.length - 1,
45
45
  whitePaintBucketSelected: true,
46
46
  colorPaintBucketSelected: false,
@@ -50,6 +50,7 @@ interface DynamicMoodEditorPageState {
50
50
  mainBucketSelected: boolean;
51
51
  sceneMode: StripLightMoodMode;
52
52
  loading: boolean;
53
+
53
54
  }
54
55
  const DynamicMoodEditorPage = () => {
55
56
  const navigation = useNavigation();
@@ -154,7 +155,6 @@ const DynamicMoodEditorPage = () => {
154
155
  if (state.loading || !canSaveMoodData) return;
155
156
  state.loading = true;
156
157
  const res = await params.modDeleteMood(params.mode, cloneDeep(state.mood));
157
- console.log(res, '< --- res ---- >')
158
158
  if (res.success) {
159
159
  navigation.navigate(ui_biz_routerKey.group_ui_biz_mood);
160
160
  }
@@ -62,8 +62,8 @@ export function useMoodScene(params: MoodPageParams): [SceneDataType, (value: Sc
62
62
  }
63
63
  const [config, setConfig] = useFeatureHook<SceneDataConfigType, SceneDataType>('sceneConfig', defConfig, undefined,
64
64
  (moodInfo) => {
65
+ const dps = {}
65
66
  if (moodInfo?.scene) {
66
- const dps = {}
67
67
  const { mainLamp, secondaryLamp } = moodInfo.scene
68
68
  if (mainLamp?.nodes?.length) {
69
69
  const mainDp = getMoodDp(params.isCeilingLight ? ({...moodInfo.scene, id: mainLamp.id!}) : moodInfo.scene, params)
@@ -97,12 +97,23 @@ export function useMoodScene(params: MoodPageParams): [SceneDataType, (value: Sc
97
97
  dps[params.secondarySwitch!] = true
98
98
  }
99
99
  }
100
- return dps
100
+ }else{
101
+ if(params.isCeilingLight){
102
+ dps[params.mainWorkMode] = WorkMode.White
103
+ dps[params.secondaryWorkMode!] = WorkMode.Colour
104
+ }else{
105
+ if (params.isFanLight || params.isUVCFan){
106
+ dps[params.mainWorkMode] = WorkMode.Control
107
+ }else{
108
+ dps[params.mainWorkMode] = params.isSupportColor ? WorkMode.Colour : WorkMode.White
109
+ }
110
+ }
101
111
  }
112
+ return dps
102
113
  }, (moodInfo) => {
114
+ const config = {} as SceneDataConfigType
103
115
  if (moodInfo?.scene) {
104
116
  const { mainLamp, secondaryLamp } = moodInfo.scene
105
- const config = {} as SceneDataConfigType
106
117
  if (mainLamp?.nodes?.length) {
107
118
  config.work_mode = WorkMode.Scene
108
119
  if (params.isCeilingLight) {
@@ -129,8 +140,19 @@ export function useMoodScene(params: MoodPageParams): [SceneDataType, (value: Sc
129
140
  config.colour_switch = true
130
141
  }
131
142
  }
132
- return config
143
+ }else{
144
+ if(params.isCeilingLight){
145
+ config.work_mode = WorkMode.White
146
+ config.rgbic_work_mode = WorkMode.Colour
147
+ }else{
148
+ if (params.isFanLight || params.isUVCFan){
149
+ config.work_mode = WorkMode.Control
150
+ }else{
151
+ config.work_mode = params.isSupportColor ? WorkMode.Colour : WorkMode.White
152
+ }
153
+ }
133
154
  }
155
+ return config
134
156
  })
135
157
  return [config, setConfig]
136
158
  }
@@ -71,7 +71,7 @@ const MoodPage = () => {
71
71
  console.log(state.originMoods, '< --- originMoods')
72
72
  }
73
73
  });
74
- }, 200);
74
+ }, 250);
75
75
 
76
76
  return () => {
77
77
  clearTimeout(state.timerId);
@@ -146,6 +146,9 @@ const MoodPage = () => {
146
146
  node.h = 0;
147
147
  node.s = 0;
148
148
  node.v = 0;
149
+ if (!params.isSupportTemperature) {
150
+ node.colorTemp = 100; // 适配dim灯
151
+ }
149
152
  }
150
153
  return node;
151
154
  }
@@ -5,7 +5,7 @@ import {ui_biz_routerKey} from "../../navigation/Routers";
5
5
 
6
6
  const RandomTimingForLightRouters: NavigationRoute[] = [
7
7
  {
8
- name: ui_biz_routerKey.group_ui_biz_fixed_timing_light,
8
+ name: ui_biz_routerKey.group_ui_biz_random_timing_light,
9
9
  component: RandomTimingForLightPage,
10
10
  options:{
11
11
  hideTopbar: true,
@@ -13,7 +13,7 @@ const RandomTimingForLightRouters: NavigationRoute[] = [
13
13
  }
14
14
  },
15
15
  {
16
- name: ui_biz_routerKey.group_ui_biz_fixed_timing_light_detail,
16
+ name: ui_biz_routerKey.group_ui_biz_random_timing_light_detail,
17
17
  component: RandomTimingForLightDetailPage,
18
18
  options:{
19
19
  hideTopbar: true,
@@ -1,4 +1,4 @@
1
- import {NavigationRoute} from "tuya-panel-kit";
1
+ import {NavigationRoute, TransitionPresets} from "tuya-panel-kit";
2
2
  import SelectPage from "./SelectPage";
3
3
  import {ui_biz_routerKey} from "../../navigation/Routers";
4
4
 
@@ -6,10 +6,11 @@ const SelectPagePageRouters: NavigationRoute[] = [
6
6
  {
7
7
  name: ui_biz_routerKey.group_ui_biz_select_page,
8
8
  component: SelectPage,
9
- options:{
9
+ options: {
10
10
  hideTopbar: true,
11
11
  showOfflineView: false,
12
- }
12
+ ...TransitionPresets.ModalPresentationIOS,
13
+ },
13
14
  }
14
15
  ]
15
16
 
@@ -1,29 +1,3 @@
1
- import {NavigationRoute, TransitionPresets} from 'tuya-panel-kit'
2
- import TimerPage from '../modules/timer/TimerPage'
3
- import TimeSchedulePage from '../modules/time_schedule/TimeSchedulePage'
4
- import TimeScheduleDetailPage from '../modules/time_schedule/TimeScheduleDetailPage'
5
- import MoodPage from '../modules/mood/MoodPage'
6
- import AddMoodPage from '../modules/mood/AddMoodPage'
7
- import DynamicMoodEditorPage from '../modules/mood/DynamicMoodEditorPage'
8
- import StaticMoodEditorPage from '../modules/mood/StaticMoodEditorPage'
9
- import SelectPage from '../modules/select/SelectPage'
10
- import FlagPage from '../modules/flags/FlagPage'
11
- import FlagEditPage from '../modules/flags/FlagEditPage'
12
- import RemoteSwitchPage from "../modules/remoteSwitch/RemoteSwitchPage";
13
- import SwitchGradientPage from "../modules/switchGradient/SwitchGradientPage";
14
- import RandomTimeForPlugPage from "../modules/randomTimeForPlug/RandomTimeForPlugPage";
15
- import RandomTimeForPlugDetailPage from "../modules/randomTimeForPlug/RandomTimeForPlugDetailPage";
16
- import RandomTimeForLightPage from "../modules/randomTimingForLight/RandomTimingForLightPage";
17
- import RandomTimingForLightDetailPage from "../modules/randomTimingForLight/RandomTimingForLightDetailPage";
18
- import BiorhythmPage from '../modules/biorhythm/BiorhythmPage'
19
- import BiorhythmEditPage from '../modules/biorhythm/BiorhythmDetailPage'
20
- import IconSelectPage from '../modules/biorhythm/IconSelect'
21
- import MusicPage from '../modules/music/MusicPage'
22
- import FixedTimeForPlugPage from "../modules/fixedTimeForPlug/FixedTimeForPlugPage";
23
- import FixedTimeForPlugDetailPage from "../modules/fixedTimeForPlug/FixedTimeForPlugDetailPage";
24
- import FixedTimingForLightPage from "../modules/fixedTimingForLight/FixedTimingForLightPage";
25
- import FixedTimingForLightDetailPage from "../modules/fixedTimingForLight/FixedTimingForLightDetailPage";
26
-
27
1
  export const ui_biz_routerKey = {
28
2
  'group_ui_biz_timer': 'group_ui_biz_timer',
29
3
  'group_ui_biz_time_schedule': 'group_ui_biz_time_schedule',
@@ -51,235 +25,3 @@ export const ui_biz_routerKey = {
51
25
  'group_ui_biz_fixed_timing_light': 'group_ui_biz_fixed_timing_light',
52
26
  'group_ui_biz_fixed_timing_light_detail': 'group_ui_biz_fixed_timing_light_detail',
53
27
  }
54
-
55
- export const TimerRouters: NavigationRoute[] = [
56
- {
57
- name: ui_biz_routerKey.group_ui_biz_timer,
58
- component: TimerPage,
59
- options: {
60
- hideTopbar: true,
61
- showOfflineView: false,
62
- },
63
- }
64
- ]
65
-
66
- export const TimeScheduleRouters: NavigationRoute[] = [
67
- {
68
- name: ui_biz_routerKey.group_ui_biz_time_schedule,
69
- component: TimeSchedulePage,
70
- options: {
71
- hideTopbar: true,
72
- showOfflineView: false,
73
- },
74
- },
75
- {
76
- name: ui_biz_routerKey.group_ui_biz_time_schedule_edit,
77
- component: TimeScheduleDetailPage,
78
- options: {
79
- hideTopbar: true,
80
- showOfflineView: false,
81
- },
82
- },
83
- ]
84
-
85
- export const MoodRouters: NavigationRoute[] = [
86
- {
87
- name: ui_biz_routerKey.group_ui_biz_mood,
88
- component: MoodPage,
89
- options: {
90
- hideTopbar: true,
91
- showOfflineView: false,
92
- },
93
- },
94
- {
95
- name: ui_biz_routerKey.group_ui_biz_mood_add,
96
- component: AddMoodPage,
97
- options: {
98
- hideTopbar: true,
99
- showOfflineView: false,
100
- },
101
- },
102
- {
103
- name: ui_biz_routerKey.group_ui_biz_static_mood_edit,
104
- component: StaticMoodEditorPage,
105
- options: {
106
- hideTopbar: true,
107
- showOfflineView: false,
108
- },
109
- },
110
- {
111
- name: ui_biz_routerKey.group_ui_biz_dynamic_mood_edit,
112
- component: DynamicMoodEditorPage,
113
- options: {
114
- hideTopbar: true,
115
- showOfflineView: false,
116
- },
117
- },
118
- ]
119
-
120
- export const SelectPageRouters: NavigationRoute[] = [
121
- {
122
- name: ui_biz_routerKey.group_ui_biz_select_page,
123
- component: SelectPage,
124
- options: {
125
- hideTopbar: true,
126
- showOfflineView: false,
127
- ...TransitionPresets.ModalPresentationIOS,
128
- },
129
- },
130
- ]
131
-
132
- export const FlagPageRouters: NavigationRoute[] = [
133
- {
134
- name: ui_biz_routerKey.group_ui_biz_flag_page,
135
- component: FlagPage,
136
- options: {
137
- hideTopbar: true,
138
- showOfflineView: false,
139
- }
140
- },
141
- {
142
- name: ui_biz_routerKey.group_ui_biz_flag_page_edit,
143
- component: FlagEditPage,
144
- options: {
145
- hideTopbar: true,
146
- showOfflineView: false,
147
- }
148
- },
149
- ]
150
-
151
- export const RemoteSwitchRouters: NavigationRoute[] = [
152
- {
153
- name: ui_biz_routerKey.group_ui_biz_remote_switch,
154
- component: RemoteSwitchPage,
155
- options: {
156
- hideTopbar: true,
157
- showOfflineView: false,
158
- },
159
- }
160
- ]
161
-
162
- export const SwitchGradientRouters: NavigationRoute[] = [
163
- {
164
- name: ui_biz_routerKey.group_ui_biz_switch_gradient,
165
- component: SwitchGradientPage,
166
- options: {
167
- hideTopbar: true,
168
- showOfflineView: false,
169
- },
170
- }
171
- ]
172
-
173
- export const RandomTimeForPlugRouters: NavigationRoute[] = [
174
- {
175
- name: ui_biz_routerKey.group_ui_biz_random_time_plug,
176
- component: RandomTimeForPlugPage,
177
- options: {
178
- hideTopbar: true,
179
- showOfflineView: false,
180
- },
181
- },
182
- {
183
- name: ui_biz_routerKey.group_ui_biz_random_time_plug_detail,
184
- component: RandomTimeForPlugDetailPage,
185
- options: {
186
- hideTopbar: true,
187
- showOfflineView: false,
188
- },
189
- },
190
- ]
191
-
192
- export const RandomTimingForLightRouters: NavigationRoute[] = [
193
- {
194
- name: ui_biz_routerKey.group_ui_biz_random_timing_light,
195
- component: RandomTimeForLightPage,
196
- options: {
197
- hideTopbar: true,
198
- showOfflineView: false,
199
- },
200
- },
201
- {
202
- name: ui_biz_routerKey.group_ui_biz_random_timing_light_detail,
203
- component: RandomTimingForLightDetailPage,
204
- options: {
205
- hideTopbar: true,
206
- showOfflineView: false,
207
- },
208
- },
209
- ]
210
-
211
- export const BiologicalRouters: NavigationRoute[] = [
212
- {
213
- name: ui_biz_routerKey.group_ui_biz_biological,
214
- component: BiorhythmPage,
215
- options: {
216
- hideTopbar: true,
217
- showOfflineView: false,
218
- },
219
- },
220
- {
221
- name: ui_biz_routerKey.group_ui_biz_biological_detail,
222
- component: BiorhythmEditPage,
223
- options: {
224
- hideTopbar: true,
225
- showOfflineView: false,
226
- },
227
- },
228
- {
229
- name: ui_biz_routerKey.group_ui_biz_biological_icon_select,
230
- component: IconSelectPage,
231
- options: {
232
- hideTopbar: true,
233
- showOfflineView: false,
234
- },
235
- },
236
- ]
237
-
238
- export const MusicPageRouters: NavigationRoute[] = [
239
- {
240
- name: ui_biz_routerKey.group_ui_biz_music,
241
- component: MusicPage,
242
- options: {
243
- hideTopbar: true,
244
- showOfflineView: false,
245
- },
246
- },
247
- ]
248
-
249
- export const FixedTimeForPlugRouters: NavigationRoute[] = [
250
- {
251
- name: ui_biz_routerKey.group_ui_biz_fixed_time_plug,
252
- component: FixedTimeForPlugPage,
253
- options: {
254
- hideTopbar: true,
255
- showOfflineView: false,
256
- },
257
- },
258
- {
259
- name: ui_biz_routerKey.group_ui_biz_fixed_time_plug_detail,
260
- component: FixedTimeForPlugDetailPage,
261
- options: {
262
- hideTopbar: true,
263
- showOfflineView: false,
264
- },
265
- },
266
- ]
267
-
268
- export const FixedTimingForLightRouters: NavigationRoute[] = [
269
- {
270
- name: ui_biz_routerKey.group_ui_biz_fixed_timing_light,
271
- component: FixedTimingForLightPage,
272
- options: {
273
- hideTopbar: true,
274
- showOfflineView: false,
275
- },
276
- },
277
- {
278
- name: ui_biz_routerKey.group_ui_biz_fixed_timing_light_detail,
279
- component: FixedTimingForLightDetailPage,
280
- options: {
281
- hideTopbar: true,
282
- showOfflineView: false,
283
- },
284
- },
285
- ]