@ledvance/ui-biz-bundle 1.1.70 → 1.1.71
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 +1 -1
- package/src/newModules/mood/AddMoodPage.tsx +194 -194
- package/src/newModules/mood/DynamicMoodEditorPage.tsx +650 -650
- package/src/newModules/mood/Interface.ts +225 -220
- package/src/newModules/mood/MixDynamicMoodEditor.tsx +789 -786
- package/src/newModules/mood/MoodActions.ts +244 -232
- package/src/newModules/mood/MoodInfo.ts +2151 -2151
- package/src/newModules/mood/MoodItem.tsx +160 -160
- package/src/newModules/mood/MoodPage.tsx +402 -386
- package/src/newModules/mood/MoodParse.ts +442 -443
- package/src/newModules/mood/RecommendMoodItem.tsx +81 -81
- package/src/newModules/mood/Router.ts +52 -43
- package/src/newModules/mood/StaticMoodEditorPage.tsx +290 -290
|
@@ -1,220 +1,225 @@
|
|
|
1
|
-
import I18n from '@ledvance/base/src/i18n';
|
|
2
|
-
|
|
3
|
-
export interface MoodInfo {
|
|
4
|
-
version: number;
|
|
5
|
-
id: number;
|
|
6
|
-
// 主灯
|
|
7
|
-
mainLamp: MoodLampInfo;
|
|
8
|
-
// 副灯
|
|
9
|
-
secondaryLamp: MoodLampInfo;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface MoodUIInfo extends MoodInfo {
|
|
13
|
-
name: string;
|
|
14
|
-
image: string;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface MoodLampInfo {
|
|
18
|
-
mode: number;
|
|
19
|
-
speed: number;
|
|
20
|
-
nodes: MoodNodeInfo[];
|
|
21
|
-
|
|
22
|
-
// 此id version为了兼容ceiling light
|
|
23
|
-
id?: number;
|
|
24
|
-
version?: number;
|
|
25
|
-
|
|
26
|
-
// 兼容mix light
|
|
27
|
-
enable?: boolean;
|
|
28
|
-
// 1:W 只有亮度,2:CW 亮度+色温,3:RGB HSV,4:RGBC HSV+色温,5:RGBCW HSV+色温+亮度
|
|
29
|
-
type?: number;
|
|
30
|
-
|
|
31
|
-
// 兼容ceiling light和 strip light
|
|
32
|
-
// 段落 0 全段, 1 分段
|
|
33
|
-
segmented?: number;
|
|
34
|
-
// 循环 0 不循环, 1 循环
|
|
35
|
-
loop?: number;
|
|
36
|
-
// 过渡 0 不过渡, 1 过渡
|
|
37
|
-
excessive?: number;
|
|
38
|
-
// 拓展 other
|
|
39
|
-
expand?: number;
|
|
40
|
-
// 方向 0 顺时针方向, 1 逆时针方向
|
|
41
|
-
direction?: number;
|
|
42
|
-
// 设置 目前灯用不上
|
|
43
|
-
reserved1?: number;
|
|
44
|
-
reserved2?: number;
|
|
45
|
-
|
|
46
|
-
// 兼容ceiling fan
|
|
47
|
-
fanEnable?: boolean;
|
|
48
|
-
// 2hex
|
|
49
|
-
fanSpeed?: number;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export interface MoodNodeInfo {
|
|
53
|
-
h: number;
|
|
54
|
-
// 饱和度 0~1000 4hex
|
|
55
|
-
s: number;
|
|
56
|
-
// 明度 0~1000 4hex
|
|
57
|
-
v: number;
|
|
58
|
-
// 灯泡亮度 0~1000 4hex
|
|
59
|
-
brightness: number;
|
|
60
|
-
// 色温值 0~1000 4hex
|
|
61
|
-
colorTemp: number;
|
|
62
|
-
// 节点类型
|
|
63
|
-
isColorNode: boolean;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export interface RemoteMoodInfo {
|
|
67
|
-
n: string; // 名字
|
|
68
|
-
i: string; // 涂鸦的场景值(dp value)
|
|
69
|
-
s: string; // 不再使用
|
|
70
|
-
t: number; // 不再使用
|
|
71
|
-
e: boolean; // 不再使用
|
|
72
|
-
// cb: RemoteSceneNodeInfo[] // 不再使用
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export interface MixRemoteMoodInfo {
|
|
76
|
-
name: string
|
|
77
|
-
image: string
|
|
78
|
-
value: string
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export interface LightCategory {
|
|
82
|
-
isCeilingLight?: boolean;
|
|
83
|
-
isStripLight?: boolean;
|
|
84
|
-
isStringLight?: boolean;
|
|
85
|
-
isFanLight?: boolean;
|
|
86
|
-
isMixLight?: boolean;
|
|
87
|
-
isMatterLight?: boolean;
|
|
88
|
-
isCeilingFan?: boolean;
|
|
89
|
-
isUVCFan?: boolean;
|
|
90
|
-
}
|
|
91
|
-
export interface DefMoodOption extends LightCategory{
|
|
92
|
-
isSupportColor: boolean;
|
|
93
|
-
isSupportTemperature: boolean;
|
|
94
|
-
isSupportBrightness: boolean;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export interface MoodDps {
|
|
98
|
-
switchLedDp: string
|
|
99
|
-
mainDp: string;
|
|
100
|
-
mainWorkMode: string;
|
|
101
|
-
mainSwitch: string;
|
|
102
|
-
secondaryDp?: string;
|
|
103
|
-
secondaryWorkMode?: string;
|
|
104
|
-
secondarySwitch?: string;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
export interface MoodPageParams extends DefMoodOption, MoodDps {
|
|
108
|
-
featureId?: string
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export interface MoodPageState {
|
|
112
|
-
currentMood?: MoodUIInfo
|
|
113
|
-
staticTagChecked: boolean
|
|
114
|
-
dynamicTagChecked: boolean
|
|
115
|
-
showAddMoodPopover: boolean
|
|
116
|
-
loading: boolean
|
|
117
|
-
originMoods: MoodUIInfo[]
|
|
118
|
-
filterMoods: MoodUIInfo[]
|
|
119
|
-
timerId: any
|
|
120
|
-
flag: Symbol
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
export enum MoodNodeTransitionMode {
|
|
124
|
-
Static,
|
|
125
|
-
Jump,
|
|
126
|
-
Gradient,
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export enum MoodJumpGradientMode {
|
|
130
|
-
SourceJump = 1,
|
|
131
|
-
StripJump = 2,
|
|
132
|
-
StringJump = 10,
|
|
133
|
-
SourceGradient = 2,
|
|
134
|
-
StripGradient = 1,
|
|
135
|
-
StringGradient = 16,
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
export interface StripLightMoodMode {
|
|
139
|
-
[key: string]: {
|
|
140
|
-
title: string;
|
|
141
|
-
mode: number;
|
|
142
|
-
turnOn?: boolean;
|
|
143
|
-
paragraph?: boolean;
|
|
144
|
-
other?: {
|
|
145
|
-
label: string;
|
|
146
|
-
value: number;
|
|
147
|
-
}[];
|
|
148
|
-
};
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
export const
|
|
152
|
-
'1': { title: I18n.getLang('
|
|
153
|
-
'2': { title: I18n.getLang('
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
export const
|
|
157
|
-
'
|
|
158
|
-
'2': { title: I18n.getLang('
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
'
|
|
163
|
-
'
|
|
164
|
-
'
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
'
|
|
169
|
-
'
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
'
|
|
174
|
-
'
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
{ label: I18n.getLang('
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
1
|
+
import I18n from '@ledvance/base/src/i18n';
|
|
2
|
+
|
|
3
|
+
export interface MoodInfo {
|
|
4
|
+
version: number;
|
|
5
|
+
id: number;
|
|
6
|
+
// 主灯
|
|
7
|
+
mainLamp: MoodLampInfo;
|
|
8
|
+
// 副灯
|
|
9
|
+
secondaryLamp: MoodLampInfo;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface MoodUIInfo extends MoodInfo {
|
|
13
|
+
name: string;
|
|
14
|
+
image: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface MoodLampInfo {
|
|
18
|
+
mode: number;
|
|
19
|
+
speed: number;
|
|
20
|
+
nodes: MoodNodeInfo[];
|
|
21
|
+
|
|
22
|
+
// 此id version为了兼容ceiling light
|
|
23
|
+
id?: number;
|
|
24
|
+
version?: number;
|
|
25
|
+
|
|
26
|
+
// 兼容mix light
|
|
27
|
+
enable?: boolean;
|
|
28
|
+
// 1:W 只有亮度,2:CW 亮度+色温,3:RGB HSV,4:RGBC HSV+色温,5:RGBCW HSV+色温+亮度
|
|
29
|
+
type?: number;
|
|
30
|
+
|
|
31
|
+
// 兼容ceiling light和 strip light
|
|
32
|
+
// 段落 0 全段, 1 分段
|
|
33
|
+
segmented?: number;
|
|
34
|
+
// 循环 0 不循环, 1 循环
|
|
35
|
+
loop?: number;
|
|
36
|
+
// 过渡 0 不过渡, 1 过渡
|
|
37
|
+
excessive?: number;
|
|
38
|
+
// 拓展 other
|
|
39
|
+
expand?: number;
|
|
40
|
+
// 方向 0 顺时针方向, 1 逆时针方向
|
|
41
|
+
direction?: number;
|
|
42
|
+
// 设置 目前灯用不上
|
|
43
|
+
reserved1?: number;
|
|
44
|
+
reserved2?: number;
|
|
45
|
+
|
|
46
|
+
// 兼容ceiling fan
|
|
47
|
+
fanEnable?: boolean;
|
|
48
|
+
// 2hex
|
|
49
|
+
fanSpeed?: number;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface MoodNodeInfo {
|
|
53
|
+
h: number;
|
|
54
|
+
// 饱和度 0~1000 4hex
|
|
55
|
+
s: number;
|
|
56
|
+
// 明度 0~1000 4hex
|
|
57
|
+
v: number;
|
|
58
|
+
// 灯泡亮度 0~1000 4hex
|
|
59
|
+
brightness: number;
|
|
60
|
+
// 色温值 0~1000 4hex
|
|
61
|
+
colorTemp: number;
|
|
62
|
+
// 节点类型
|
|
63
|
+
isColorNode: boolean;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface RemoteMoodInfo {
|
|
67
|
+
n: string; // 名字
|
|
68
|
+
i: string; // 涂鸦的场景值(dp value)
|
|
69
|
+
s: string; // 不再使用
|
|
70
|
+
t: number; // 不再使用
|
|
71
|
+
e: boolean; // 不再使用
|
|
72
|
+
// cb: RemoteSceneNodeInfo[] // 不再使用
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface MixRemoteMoodInfo {
|
|
76
|
+
name: string
|
|
77
|
+
image: string
|
|
78
|
+
value: string
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface LightCategory {
|
|
82
|
+
isCeilingLight?: boolean;
|
|
83
|
+
isStripLight?: boolean;
|
|
84
|
+
isStringLight?: boolean;
|
|
85
|
+
isFanLight?: boolean;
|
|
86
|
+
isMixLight?: boolean;
|
|
87
|
+
isMatterLight?: boolean;
|
|
88
|
+
isCeilingFan?: boolean;
|
|
89
|
+
isUVCFan?: boolean;
|
|
90
|
+
}
|
|
91
|
+
export interface DefMoodOption extends LightCategory{
|
|
92
|
+
isSupportColor: boolean;
|
|
93
|
+
isSupportTemperature: boolean;
|
|
94
|
+
isSupportBrightness: boolean;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface MoodDps {
|
|
98
|
+
switchLedDp: string
|
|
99
|
+
mainDp: string;
|
|
100
|
+
mainWorkMode: string;
|
|
101
|
+
mainSwitch: string;
|
|
102
|
+
secondaryDp?: string;
|
|
103
|
+
secondaryWorkMode?: string;
|
|
104
|
+
secondarySwitch?: string;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export interface MoodPageParams extends DefMoodOption, MoodDps {
|
|
108
|
+
featureId?: string
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export interface MoodPageState {
|
|
112
|
+
currentMood?: MoodUIInfo
|
|
113
|
+
staticTagChecked: boolean
|
|
114
|
+
dynamicTagChecked: boolean
|
|
115
|
+
showAddMoodPopover: boolean
|
|
116
|
+
loading: boolean
|
|
117
|
+
originMoods: MoodUIInfo[]
|
|
118
|
+
filterMoods: MoodUIInfo[]
|
|
119
|
+
timerId: any
|
|
120
|
+
flag: Symbol
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export enum MoodNodeTransitionMode {
|
|
124
|
+
Static,
|
|
125
|
+
Jump,
|
|
126
|
+
Gradient,
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export enum MoodJumpGradientMode {
|
|
130
|
+
SourceJump = 1,
|
|
131
|
+
StripJump = 2,
|
|
132
|
+
StringJump = 10,
|
|
133
|
+
SourceGradient = 2,
|
|
134
|
+
StripGradient = 1,
|
|
135
|
+
StringGradient = 16,
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export interface StripLightMoodMode {
|
|
139
|
+
[key: string]: {
|
|
140
|
+
title: string;
|
|
141
|
+
mode: number;
|
|
142
|
+
turnOn?: boolean;
|
|
143
|
+
paragraph?: boolean;
|
|
144
|
+
other?: {
|
|
145
|
+
label: string;
|
|
146
|
+
value: number;
|
|
147
|
+
}[];
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export const CeilingLightSceneMode: StripLightMoodMode = {
|
|
152
|
+
'1': { title: I18n.getLang('strip_lights_modes_flash_text'), mode: 1 },
|
|
153
|
+
'2': { title: I18n.getLang('strip_lights_modes_breath_text'), mode: 2 },
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export const lightMoodMode = {
|
|
157
|
+
'1': { title: I18n.getLang('other_lights_modes_jump_text'), mode: 1 },
|
|
158
|
+
'2': { title: I18n.getLang('other_lights_modes_gradient_text'), mode: 2 },
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
export const stringLightMoodMode: StripLightMoodMode = {
|
|
162
|
+
'13': { title: I18n.getLang('strip_lights_modes_flow_text'), mode: 13, turnOn: true }, // 流水
|
|
163
|
+
'2': { title: I18n.getLang('strip_lights_modes_rainbow_text'), mode: 2, turnOn: true }, // 彩虹
|
|
164
|
+
'14': { title: I18n.getLang('string_lights_modes_chase_text'), mode: 14, turnOn: true }, // 追光
|
|
165
|
+
'15': { title: I18n.getLang('string_lights_modes_dazzle_text'), mode: 15 }, // 炫彩
|
|
166
|
+
'16': { title: I18n.getLang('other_lights_modes_gradient_text'), mode: 16 }, // 渐变
|
|
167
|
+
'10': { title: I18n.getLang('other_lights_modes_jump_text'), mode: 10 }, // 跳变
|
|
168
|
+
'11': { title: I18n.getLang('strip_lights_modes_breath_text'), mode: 11 }, // 呼吸
|
|
169
|
+
'12': { title: I18n.getLang('string_lights_modes_blink_text'), mode: 12 }, // 闪烁
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
export const stripLightMoodMode: StripLightMoodMode = {
|
|
173
|
+
'1': { title: I18n.getLang('other_lights_modes_gradient_text'), mode: 1, paragraph: true }, // 渐变
|
|
174
|
+
'2': { title: I18n.getLang('other_lights_modes_jump_text'), mode: 2, paragraph: true }, // 跳变
|
|
175
|
+
'3': { title: I18n.getLang('strip_lights_modes_breath_text'), mode: 3, paragraph: true }, // 呼吸
|
|
176
|
+
'4': { title: I18n.getLang('string_lights_modes_blink_text'), mode: 4, paragraph: true }, // 闪烁
|
|
177
|
+
'10': { title: I18n.getLang('strip_lights_modes_flow_text'), mode: 10, turnOn: true }, // 流水
|
|
178
|
+
'11': { title: I18n.getLang('strip_lights_modes_rainbow_text'), mode: 11, turnOn: true }, // 彩虹
|
|
179
|
+
'5': {
|
|
180
|
+
title: I18n.getLang('strip_lights_modes_meteor_text'),
|
|
181
|
+
mode: 5,
|
|
182
|
+
turnOn: true,
|
|
183
|
+
other: [
|
|
184
|
+
{ label: I18n.getLang('strip_lights_modes_meteor_text'), value: 0 },
|
|
185
|
+
{
|
|
186
|
+
label: I18n.getLang('add_new_dynamic_mood_strip_lights_selectionfield2_value_text'),
|
|
187
|
+
value: 1,
|
|
188
|
+
},
|
|
189
|
+
{ label: I18n.getLang('strip_lights_modes_magic_meteor'), value: 2 },
|
|
190
|
+
],
|
|
191
|
+
}, // 流星
|
|
192
|
+
'6': {
|
|
193
|
+
title: I18n.getLang('strip_lights_modes_pileup_text'),
|
|
194
|
+
mode: 6,
|
|
195
|
+
turnOn: true,
|
|
196
|
+
paragraph: true,
|
|
197
|
+
}, // 堆积
|
|
198
|
+
'7': {
|
|
199
|
+
title: I18n.getLang('strip_lights_modes_fall_text'),
|
|
200
|
+
mode: 7,
|
|
201
|
+
turnOn: true,
|
|
202
|
+
paragraph: true,
|
|
203
|
+
}, // 飘落
|
|
204
|
+
'8': { title: I18n.getLang('strip_lights_modes_follow_text'), mode: 8, turnOn: true }, // 追光
|
|
205
|
+
'9': { title: I18n.getLang('strip_lights_modes_flutter_text'), mode: 9, turnOn: true }, // 飘动
|
|
206
|
+
'12': { title: I18n.getLang('strip_lights_modes_flash_text'), mode: 12, paragraph: true }, // 闪现
|
|
207
|
+
'13': {
|
|
208
|
+
title: I18n.getLang('strip_lights_modes_rebound_text'),
|
|
209
|
+
mode: 13,
|
|
210
|
+
other: [
|
|
211
|
+
{ label: I18n.getLang('strip_lights_modes_rebound_text'), value: 0 },
|
|
212
|
+
{ label: I18n.getLang('strip_lights_modes_magic_rebound_text'), value: 1 },
|
|
213
|
+
],
|
|
214
|
+
}, // 反弹
|
|
215
|
+
'14': { title: I18n.getLang('strip_lights_modes_shuttle_text'), mode: 14 }, // 穿梭
|
|
216
|
+
'15': { title: I18n.getLang('strip_lights_modes_random_text'), mode: 15 }, // 乱闪
|
|
217
|
+
'16': {
|
|
218
|
+
title: I18n.getLang('strip_lights_modes_switch_text'),
|
|
219
|
+
mode: 16,
|
|
220
|
+
other: [
|
|
221
|
+
{ label: I18n.getLang('add_new_dynamic_mood_strip_lights_switch_tab_text5'), value: 0 },
|
|
222
|
+
{ label: I18n.getLang('add_new_dynamic_mood_strip_lights_switch_tab_text6'), value: 1 },
|
|
223
|
+
],
|
|
224
|
+
}, // 开合
|
|
225
|
+
};
|