@ledvance/ui-biz-bundle 1.1.33 → 1.1.34

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.33",
7
+ "version": "1.1.34",
8
8
  "scripts": {},
9
9
  "dependencies": {
10
10
  "@ledvance/base": "^1.x",
@@ -57,19 +57,7 @@ export const useFlag: UseFlagType = (flagCode, extra) => {
57
57
  setDps({ [flagCode]: hex})
58
58
  }, idx * 50)
59
59
  })
60
- const extraDps = {}
61
- if(extra.isCeilingLight){
62
- const whiteHex = obj2Dp(flagItem, extra)
63
- extraDps[extra.switchLedCode] = true,
64
- extraDps[extra.rgbcSwitchLedCode!] = true
65
- extraDps[extra.rgbcWorkModeCode!] = WORK_MODE.COLOUR
66
- extraDps[extra.workModeCode] = WORK_MODE.SCENE
67
- extraDps[extra.sceneDataCode!!] = whiteHex
68
- }else{
69
- extraDps[extra.switchLedCode] = true
70
- extraDps[extra.workModeCode] = WORK_MODE.COLOUR
71
- }
72
- return setDps(extraDps)
60
+ return setDps({ [extra.switchLedCode]: true, [extra.workModeCode]: WORK_MODE.COLOUR})
73
61
  } else {
74
62
  const hex = obj2Dp(flagItem, extra)
75
63
  return setDps({ [flagCode]: hex, [extra.workModeCode]: WORK_MODE.SCENE, [extra.switchLedCode]: true })
@@ -81,7 +69,6 @@ export const useFlag: UseFlagType = (flagCode, extra) => {
81
69
  export interface FlagOption {
82
70
  isMixLight?: boolean
83
71
  isStringLight?: boolean
84
- isCeilingLight?: boolean
85
72
  workModeCode: string
86
73
  }
87
74
 
@@ -142,8 +129,8 @@ export function obj2Dp(flagItem: FlagItemInfo, option?: FlagOption): string {
142
129
  } else {
143
130
  const switchingIntervalHex = nToHS(flagItem.speed)
144
131
  const transitionTimeHex = nToHS(flagItem.speed)
145
- const transitionModeHex = nToHS(option?.isCeilingLight ? SceneNodeTransitionMode.Static : flagItem.mode)
146
- const colorHex = flagItem.colors.map(color => {
132
+ const transitionModeHex = nToHS(flagItem.mode)
133
+ const hex = idHex + flagItem.colors.map(color => {
147
134
  const hHex = nToHS(Math.round(color.h), 4)
148
135
  const sHex = nToHS(Math.round(color.s * 10), 4)
149
136
  const vHex = nToHS(Math.round(color.v * 10), 4)
@@ -151,9 +138,6 @@ export function obj2Dp(flagItem: FlagItemInfo, option?: FlagOption): string {
151
138
  const colorTempHex = '0000'
152
139
  return switchingIntervalHex + transitionTimeHex + transitionModeHex + hHex + sHex + vHex + brightnessHex + colorTempHex
153
140
  }).join('')
154
- const whiteColor = flagItem.whiteColors[0]
155
- const whiteHex = switchingIntervalHex + transitionTimeHex + transitionModeHex + '0000' + '0000' + '0000' + nToHS(whiteColor?.brightness * 10, 4) + nToHS(whiteColor?.colorTemp * 10, 4)
156
- const hex = idHex + (option?.isCeilingLight ? whiteHex : colorHex)
157
141
  return hex
158
142
  }
159
143
  }
@@ -27,7 +27,6 @@ export interface FlagPageProps {
27
27
  isSupportTemperature?: boolean
28
28
  isStringLight?: boolean
29
29
  isStripLight?: boolean
30
- isCeilingLight?: boolean
31
30
  isSupportMixScene?: boolean
32
31
  drawToolLight?: {
33
32
  drawToolCode: string
@@ -38,8 +37,6 @@ export interface FlagPageProps {
38
37
  sceneDataCode?: string
39
38
  workModeCode: string
40
39
  switchLedCode: string
41
- rgbcWorkModeCode?: string
42
- rgbcSwitchLedCode?: string
43
40
  }
44
41
 
45
42
  const FlagPage = () => {
@@ -51,10 +48,9 @@ const FlagPage = () => {
51
48
  const [moods, setMoods] = useMoods()
52
49
  const [flags, setFlags] = useFlags()
53
50
  const [flagMode, setFlagMode] = useFlagMode()
54
- const [flagState, setFlag] = useFlag(((params.isStripLight || params.isCeilingLight) ? params?.drawToolLight?.drawToolCode : params.sceneDataCode)!!, {
51
+ const [flagState, setFlag] = useFlag((params.isStripLight ? params?.drawToolLight?.drawToolCode : params.sceneDataCode)!!, {
55
52
  isMixLight: params.isSupportMixScene,
56
53
  isStringLight: params.isStringLight,
57
- isCeilingLight: params.isCeilingLight,
58
54
  ...params
59
55
  })
60
56
  const state = useReactive({