@ledvance/ui-biz-bundle 1.1.28 → 1.1.30
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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useDps } from "@ledvance/base/src/models/modules/NativePropsSlice";
|
|
2
2
|
import { FlagPageProps } from "./FlagPage";
|
|
3
3
|
import { SceneNodeTransitionMode } from "@ledvance/ui-biz-bundle/src/modules/scene/SceneInfo";
|
|
4
|
-
import {
|
|
4
|
+
import { WORK_MODE, nToHS, parseJSON, toFixed } from "@tuya/tuya-panel-lamp-sdk/lib/utils";
|
|
5
5
|
import { cloneDeep } from "lodash";
|
|
6
6
|
import { FlagItemInfo, FlagUiInfo, defFlagList, def2FlagList, def3FlagList } from "./FlagInfo";
|
|
7
7
|
import { hex2Int } from "@ledvance/base/src/utils/common";
|
|
@@ -51,8 +51,13 @@ export const useFlag: UseFlagType = (flagCode, extra) => {
|
|
|
51
51
|
|
|
52
52
|
const setFlagFn = (flagItem: FlagItemInfo) => {
|
|
53
53
|
if (extra.drawToolLight) {
|
|
54
|
-
const
|
|
55
|
-
|
|
54
|
+
const hexArray = extra.drawToolLight.drawToolObj2dp(flagItem.colors)
|
|
55
|
+
hexArray.forEach((hex, idx) =>{
|
|
56
|
+
setTimeout(() =>{
|
|
57
|
+
setDps({ [flagCode]: hex})
|
|
58
|
+
}, idx * 50)
|
|
59
|
+
})
|
|
60
|
+
return setDps({ [extra.switchLedCode]: true, [extra.workModeCode]: WORK_MODE.COLOUR})
|
|
56
61
|
} else {
|
|
57
62
|
const hex = obj2Dp(flagItem, extra)
|
|
58
63
|
return setDps({ [flagCode]: hex, [extra.workModeCode]: WORK_MODE.SCENE, [extra.switchLedCode]: true })
|
|
@@ -83,7 +83,7 @@ export const defFlagList: FlagUiInfo[] = [
|
|
|
83
83
|
whiteColors: [
|
|
84
84
|
{ brightness: 100, colorTemp: 0},
|
|
85
85
|
],
|
|
86
|
-
colors: [{h: 360, s: 100, v: 100}, {h: 360, s: 100, v: 100}, {h:
|
|
86
|
+
colors: [{h: 360, s: 100, v: 100}, {h: 360, s: 100, v: 100}, {h: 120, s: 100, v: 100}]
|
|
87
87
|
},
|
|
88
88
|
{
|
|
89
89
|
id: 251,
|
|
@@ -105,7 +105,7 @@ export const defFlagList: FlagUiInfo[] = [
|
|
|
105
105
|
whiteColors: [
|
|
106
106
|
{ brightness: 100, colorTemp: 0},
|
|
107
107
|
],
|
|
108
|
-
colors: [{h: 360, s: 100, v: 100}, {h: 47, s: 100, v: 100}, {h:
|
|
108
|
+
colors: [{h: 360, s: 100, v: 100}, {h: 47, s: 100, v: 100}, {h: 360, s: 100, v: 100}]
|
|
109
109
|
},
|
|
110
110
|
{
|
|
111
111
|
id: 249,
|
|
@@ -149,7 +149,7 @@ export const defFlagList: FlagUiInfo[] = [
|
|
|
149
149
|
whiteColors: [
|
|
150
150
|
{ brightness: 100, colorTemp: 0},
|
|
151
151
|
],
|
|
152
|
-
colors: [{h:
|
|
152
|
+
colors: [{h: 120, s: 100, v: 100}, {h: 0, s: 0, v: 100}, {h: 360, s: 100, v: 100}]
|
|
153
153
|
},
|
|
154
154
|
{
|
|
155
155
|
id: 245,
|
|
@@ -182,7 +182,7 @@ export const defFlagList: FlagUiInfo[] = [
|
|
|
182
182
|
whiteColors: [
|
|
183
183
|
{ brightness: 100, colorTemp: 0},
|
|
184
184
|
],
|
|
185
|
-
colors: [{h: 360, s: 100, v: 100}, {h: 0, s: 0, v:
|
|
185
|
+
colors: [{h: 360, s: 100, v: 100}, {h: 0, s: 0, v:100}, {h: 360, s: 100, v: 100}]
|
|
186
186
|
},
|
|
187
187
|
{
|
|
188
188
|
id: 242,
|
|
@@ -193,7 +193,7 @@ export const defFlagList: FlagUiInfo[] = [
|
|
|
193
193
|
whiteColors: [
|
|
194
194
|
{ brightness: 100, colorTemp: 0},
|
|
195
195
|
],
|
|
196
|
-
colors: [{h: 217, s: 100, v: 100}, {h: 0, s: 0, v:
|
|
196
|
+
colors: [{h: 217, s: 100, v: 100}, {h: 0, s: 0, v:100}, {h: 360, s: 100, v: 100}]
|
|
197
197
|
},
|
|
198
198
|
{
|
|
199
199
|
id: 241,
|
|
@@ -237,7 +237,7 @@ export const defFlagList: FlagUiInfo[] = [
|
|
|
237
237
|
whiteColors: [
|
|
238
238
|
{ brightness: 100, colorTemp: 0},
|
|
239
239
|
],
|
|
240
|
-
colors: [{h: 360, s: 100, v: 100}, {h: 212, s: 4, v: 100}, {h:
|
|
240
|
+
colors: [{h: 360, s: 100, v: 100}, {h: 212, s: 4, v: 100}, {h: 120, s: 100, v: 100}]
|
|
241
241
|
},
|
|
242
242
|
{
|
|
243
243
|
id: 237,
|
|
@@ -305,6 +305,17 @@ export const defFlagList: FlagUiInfo[] = [
|
|
|
305
305
|
],
|
|
306
306
|
colors: [{h: 360, s: 100, v: 100}, {h: 0, s: 0, v: 100}]
|
|
307
307
|
},
|
|
308
|
+
{
|
|
309
|
+
id: 230,
|
|
310
|
+
version: 0,
|
|
311
|
+
mode: SceneNodeTransitionMode.Jump,
|
|
312
|
+
speed: 75,
|
|
313
|
+
name: I18n.getLang('country_UA'),
|
|
314
|
+
whiteColors: [
|
|
315
|
+
{ brightness: 100, colorTemp: 0},
|
|
316
|
+
],
|
|
317
|
+
colors: [{h: 211, s: 100, v: 100}, {h: 50, s: 100, v: 100}]
|
|
318
|
+
},
|
|
308
319
|
]
|
|
309
320
|
|
|
310
321
|
export const def2Pids = ['k588eygmfkdzmpzm']
|
|
@@ -367,7 +378,7 @@ export const def2FlagList: FlagUiInfo[] = [
|
|
|
367
378
|
whiteColors: [
|
|
368
379
|
{ brightness: 100, colorTemp: 0},
|
|
369
380
|
],
|
|
370
|
-
colors: [{h: 360, s: 100, v: 100}, {h: 360, s: 100, v: 100}, {h: 360, s: 100, v: 100}, {h:
|
|
381
|
+
colors: [{h: 360, s: 100, v: 100}, {h: 360, s: 100, v: 100}, {h: 360, s: 100, v: 100}, {h: 120, s: 100, v: 100}]
|
|
371
382
|
},
|
|
372
383
|
{
|
|
373
384
|
id: 251,
|
|
@@ -389,7 +400,7 @@ export const def2FlagList: FlagUiInfo[] = [
|
|
|
389
400
|
whiteColors: [
|
|
390
401
|
{ brightness: 100, colorTemp: 0},
|
|
391
402
|
],
|
|
392
|
-
colors: [{h: 360, s: 100, v: 100}, {h: 47, s: 100, v: 100}, {h: 47, s: 100, v: 100}, {h:
|
|
403
|
+
colors: [{h: 360, s: 100, v: 100}, {h: 47, s: 100, v: 100}, {h: 47, s: 100, v: 100}, {h: 360, s: 100, v: 100}]
|
|
393
404
|
},
|
|
394
405
|
{
|
|
395
406
|
id: 249,
|
|
@@ -433,7 +444,7 @@ export const def2FlagList: FlagUiInfo[] = [
|
|
|
433
444
|
whiteColors: [
|
|
434
445
|
{ brightness: 100, colorTemp: 0},
|
|
435
446
|
],
|
|
436
|
-
colors: [{h:
|
|
447
|
+
colors: [{h: 120, s: 100, v: 100}, {h: 0, s: 0, v: 100}, {h: 0, s: 0, v: 100},{h: 360, s: 100, v: 100}]
|
|
437
448
|
},
|
|
438
449
|
{
|
|
439
450
|
id: 245,
|
|
@@ -521,7 +532,7 @@ export const def2FlagList: FlagUiInfo[] = [
|
|
|
521
532
|
whiteColors: [
|
|
522
533
|
{ brightness: 100, colorTemp: 0},
|
|
523
534
|
],
|
|
524
|
-
colors: [{h: 360, s: 100, v: 100}, {h: 0, s: 0, v: 100},{h: 0, s: 0, v: 100}, {h:
|
|
535
|
+
colors: [{h: 360, s: 100, v: 100}, {h: 0, s: 0, v: 100},{h: 0, s: 0, v: 100}, {h: 120, s: 100, v: 100}]
|
|
525
536
|
},
|
|
526
537
|
{
|
|
527
538
|
id: 237,
|
|
@@ -588,7 +599,18 @@ export const def2FlagList: FlagUiInfo[] = [
|
|
|
588
599
|
{ brightness: 100, colorTemp: 0},
|
|
589
600
|
],
|
|
590
601
|
colors: [{h: 360, s: 100, v: 100}, {h: 0, s: 0, v: 100}]
|
|
591
|
-
}
|
|
602
|
+
},
|
|
603
|
+
{
|
|
604
|
+
id: 230,
|
|
605
|
+
version: 0,
|
|
606
|
+
mode: SceneNodeTransitionMode.Jump,
|
|
607
|
+
speed: 75,
|
|
608
|
+
name: I18n.getLang('country_UA'),
|
|
609
|
+
whiteColors: [
|
|
610
|
+
{ brightness: 100, colorTemp: 0},
|
|
611
|
+
],
|
|
612
|
+
colors: [{h: 211, s: 100, v: 100}, {h: 50, s: 100, v: 100}]
|
|
613
|
+
},
|
|
592
614
|
]
|
|
593
615
|
|
|
594
616
|
export const def3Pids = ['uzoammz8zm0onv1i', '85bmfxhxpmwj7exf']
|
|
@@ -650,7 +672,7 @@ export const def3FlagList: FlagUiInfo[] = [
|
|
|
650
672
|
whiteColors: [
|
|
651
673
|
{ brightness: 100, colorTemp: 0},
|
|
652
674
|
],
|
|
653
|
-
colors: [{h: 360, s: 100, v: 100}, {h: 360, s: 100, v: 100}, {h: 120, s:
|
|
675
|
+
colors: [{h: 360, s: 100, v: 100}, {h: 360, s: 100, v: 100}, {h: 120, s: 100, v: 100}]
|
|
654
676
|
},
|
|
655
677
|
{
|
|
656
678
|
id: 251,
|
|
@@ -716,7 +738,7 @@ export const def3FlagList: FlagUiInfo[] = [
|
|
|
716
738
|
whiteColors: [
|
|
717
739
|
{ brightness: 100, colorTemp: 0},
|
|
718
740
|
],
|
|
719
|
-
colors: [{h: 120, s: 100, v:
|
|
741
|
+
colors: [{h: 120, s: 100, v: 100}, {h: 0, s: 0, v: 100}, {h: 360, s: 100, v: 100}]
|
|
720
742
|
},
|
|
721
743
|
{
|
|
722
744
|
id: 245,
|
|
@@ -760,7 +782,7 @@ export const def3FlagList: FlagUiInfo[] = [
|
|
|
760
782
|
whiteColors: [
|
|
761
783
|
{ brightness: 100, colorTemp: 0},
|
|
762
784
|
],
|
|
763
|
-
colors: [{h: 217, s: 100, v: 77}, {h: 0, s: 0, v:
|
|
785
|
+
colors: [{h: 217, s: 100, v: 77}, {h: 0, s: 0, v:100}, {h: 360, s: 100, v: 100}]
|
|
764
786
|
},
|
|
765
787
|
{
|
|
766
788
|
id: 241,
|
|
@@ -872,4 +894,15 @@ export const def3FlagList: FlagUiInfo[] = [
|
|
|
872
894
|
],
|
|
873
895
|
colors: [{h: 360, s: 100, v: 100}, {h: 0, s: 0, v: 100}]
|
|
874
896
|
},
|
|
897
|
+
{
|
|
898
|
+
id: 230,
|
|
899
|
+
version: 0,
|
|
900
|
+
mode: SceneNodeTransitionMode.Jump,
|
|
901
|
+
speed: 75,
|
|
902
|
+
name: I18n.getLang('country_UA'),
|
|
903
|
+
whiteColors: [
|
|
904
|
+
{ brightness: 100, colorTemp: 0},
|
|
905
|
+
],
|
|
906
|
+
colors: [{h: 211, s: 100, v: 100}, {h: 50, s: 100, v: 100}]
|
|
907
|
+
},
|
|
875
908
|
]
|
|
@@ -30,7 +30,7 @@ export interface FlagPageProps {
|
|
|
30
30
|
isSupportMixScene?: boolean
|
|
31
31
|
drawToolLight?: {
|
|
32
32
|
drawToolCode: string
|
|
33
|
-
drawToolObj2dp: (colors:
|
|
33
|
+
drawToolObj2dp: (colors: any[]) => string[]
|
|
34
34
|
drawToolDp2Obj: (dp: string) => string[]
|
|
35
35
|
}
|
|
36
36
|
getRemoteMoodList?: (devId: string) => Promise<Result<any>>
|