@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.
@@ -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 lightMoodMode = {
152
- '1': { title: I18n.getLang('other_lights_modes_jump_text'), mode: 1 },
153
- '2': { title: I18n.getLang('other_lights_modes_gradient_text'), mode: 2 },
154
- };
155
-
156
- export const stringLightMoodMode: StripLightMoodMode = {
157
- '13': { title: I18n.getLang('strip_lights_modes_flow_text'), mode: 13, turnOn: true }, // 流水
158
- '2': { title: I18n.getLang('strip_lights_modes_rainbow_text'), mode: 2, turnOn: true }, // 彩虹
159
- '14': { title: I18n.getLang('string_lights_modes_chase_text'), mode: 14, turnOn: true }, // 追光
160
- '15': { title: I18n.getLang('string_lights_modes_dazzle_text'), mode: 15 }, // 炫彩
161
- '16': { title: I18n.getLang('other_lights_modes_gradient_text'), mode: 16 }, // 渐变
162
- '10': { title: I18n.getLang('other_lights_modes_jump_text'), mode: 10 }, // 跳变
163
- '11': { title: I18n.getLang('strip_lights_modes_breath_text'), mode: 11 }, // 呼吸
164
- '12': { title: I18n.getLang('string_lights_modes_blink_text'), mode: 12 }, // 闪烁
165
- };
166
-
167
- export const stripLightMoodMode: StripLightMoodMode = {
168
- '1': { title: I18n.getLang('other_lights_modes_gradient_text'), mode: 1, paragraph: true }, // 渐变
169
- '2': { title: I18n.getLang('other_lights_modes_jump_text'), mode: 2, paragraph: true }, // 跳变
170
- '3': { title: I18n.getLang('strip_lights_modes_breath_text'), mode: 3, paragraph: true }, // 呼吸
171
- '4': { title: I18n.getLang('string_lights_modes_blink_text'), mode: 4, paragraph: true }, // 闪烁
172
- '10': { title: I18n.getLang('strip_lights_modes_flow_text'), mode: 10, turnOn: true }, // 流水
173
- '11': { title: I18n.getLang('strip_lights_modes_rainbow_text'), mode: 11, turnOn: true }, // 彩虹
174
- '5': {
175
- title: I18n.getLang('strip_lights_modes_meteor_text'),
176
- mode: 5,
177
- turnOn: true,
178
- other: [
179
- { label: I18n.getLang('strip_lights_modes_meteor_text'), value: 0 },
180
- {
181
- label: I18n.getLang('add_new_dynamic_mood_strip_lights_selectionfield2_value_text'),
182
- value: 1,
183
- },
184
- { label: I18n.getLang('strip_lights_modes_magic_meteor'), value: 2 },
185
- ],
186
- }, // 流星
187
- '6': {
188
- title: I18n.getLang('strip_lights_modes_pileup_text'),
189
- mode: 6,
190
- turnOn: true,
191
- paragraph: true,
192
- }, // 堆积
193
- '7': {
194
- title: I18n.getLang('strip_lights_modes_fall_text'),
195
- mode: 7,
196
- turnOn: true,
197
- paragraph: true,
198
- }, // 飘落
199
- '8': { title: I18n.getLang('strip_lights_modes_follow_text'), mode: 8, turnOn: true }, // 追光
200
- '9': { title: I18n.getLang('strip_lights_modes_flutter_text'), mode: 9, turnOn: true }, // 飘动
201
- '12': { title: I18n.getLang('strip_lights_modes_flash_text'), mode: 12, paragraph: true }, // 闪现
202
- '13': {
203
- title: I18n.getLang('strip_lights_modes_rebound_text'),
204
- mode: 13,
205
- other: [
206
- { label: I18n.getLang('strip_lights_modes_rebound_text'), value: 0 },
207
- { label: I18n.getLang('strip_lights_modes_magic_rebound_text'), value: 1 },
208
- ],
209
- }, // 反弹
210
- '14': { title: I18n.getLang('strip_lights_modes_shuttle_text'), mode: 14 }, // 穿梭
211
- '15': { title: I18n.getLang('strip_lights_modes_random_text'), mode: 15 }, // 乱闪
212
- '16': {
213
- title: I18n.getLang('strip_lights_modes_switch_text'),
214
- mode: 16,
215
- other: [
216
- { label: I18n.getLang('add_new_dynamic_mood_strip_lights_switch_tab_text5'), value: 0 },
217
- { label: I18n.getLang('add_new_dynamic_mood_strip_lights_switch_tab_text6'), value: 1 },
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
+ };