@ledvance/base 1.2.83 → 1.2.85

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.
Files changed (165) hide show
  1. package/.babelrc +31 -31
  2. package/.eslintignore +5 -5
  3. package/.eslintrc.js +27 -27
  4. package/.prettierrc.js +1 -1
  5. package/.versionrc +5 -5
  6. package/localazy.json +851 -848
  7. package/localazy.keys.json +4 -4
  8. package/package.json +74 -74
  9. package/rn-cli.config.js +8 -8
  10. package/src/api/native.d.ts +71 -71
  11. package/src/api/native.ts +423 -423
  12. package/src/api/nativeEventEmitter.d.ts +3 -3
  13. package/src/api/nativeEventEmitter.ts +125 -125
  14. package/src/components/AdvanceCard.d.ts +25 -25
  15. package/src/components/AdvanceCard.tsx +117 -117
  16. package/src/components/AdvanceList.d.ts +9 -9
  17. package/src/components/AdvanceList.tsx +69 -69
  18. package/src/components/ApplyForDeviceItem.d.ts +6 -6
  19. package/src/components/ApplyForDeviceItem.tsx +83 -83
  20. package/src/components/ApplyForDeviceList.d.ts +7 -7
  21. package/src/components/ApplyForDeviceList.tsx +61 -61
  22. package/src/components/ApplyForText.d.ts +6 -6
  23. package/src/components/ApplyForText.tsx +52 -52
  24. package/src/components/Card.d.ts +10 -10
  25. package/src/components/Card.tsx +40 -40
  26. package/src/components/Cell.d.ts +21 -21
  27. package/src/components/Cell.tsx +69 -69
  28. package/src/components/CircularProgress.d.ts +8 -8
  29. package/src/components/CircularProgress.tsx +42 -42
  30. package/src/components/ColorAdjustView.d.ts +12 -12
  31. package/src/components/ColorAdjustView.tsx +64 -64
  32. package/src/components/ColorExtractor.d.ts +73 -73
  33. package/src/components/ColorExtractor.tsx +374 -374
  34. package/src/components/ColorTempAdjustView.d.ts +13 -13
  35. package/src/components/ColorTempAdjustView.tsx +57 -57
  36. package/src/components/ColorsLine.d.ts +7 -7
  37. package/src/components/ColorsLine.tsx +47 -47
  38. package/src/components/CustomListDialog.d.ts +15 -15
  39. package/src/components/CustomListDialog.tsx +66 -66
  40. package/src/components/DeleteButton.d.ts +10 -10
  41. package/src/components/DeleteButton.tsx +40 -40
  42. package/src/components/Dialog.d.ts +10 -10
  43. package/src/components/Dialog.tsx +38 -38
  44. package/src/components/DrawToolView.d.ts +46 -46
  45. package/src/components/DrawToolView.tsx +262 -262
  46. package/src/components/FanAdjustView.d.ts +23 -23
  47. package/src/components/FanAdjustView.tsx +141 -141
  48. package/src/components/InfoText.d.ts +11 -11
  49. package/src/components/InfoText.tsx +45 -45
  50. package/src/components/LampAdjustView.d.ts +10 -10
  51. package/src/components/LampAdjustView.tsx +75 -75
  52. package/src/components/LampAdjustView2.d.ts +24 -24
  53. package/src/components/LampAdjustView2.tsx +104 -104
  54. package/src/components/LinearGradientLine.d.ts +9 -9
  55. package/src/components/LinearGradientLine.tsx +63 -63
  56. package/src/components/LoadingView.tsx +39 -39
  57. package/src/components/MoodColorsLine.d.ts +9 -9
  58. package/src/components/MoodColorsLine.tsx +38 -38
  59. package/src/components/Page.d.ts +21 -21
  60. package/src/components/Page.tsx +104 -104
  61. package/src/components/Popup.d.ts +7 -7
  62. package/src/components/Popup.tsx +71 -71
  63. package/src/components/Segmented.d.ts +14 -14
  64. package/src/components/Segmented.tsx +76 -76
  65. package/src/components/ShowSelect.d.ts +1 -1
  66. package/src/components/ShowSelect.tsx +158 -158
  67. package/src/components/SocketItem.d.ts +13 -13
  68. package/src/components/SocketItem.tsx +87 -87
  69. package/src/components/Spacer.d.ts +7 -7
  70. package/src/components/Spacer.tsx +13 -13
  71. package/src/components/Stepper.d.ts +19 -19
  72. package/src/components/Stepper.tsx +130 -130
  73. package/src/components/StripAdjustView.d.ts +16 -16
  74. package/src/components/StripAdjustView.tsx +129 -129
  75. package/src/components/StripLightView.d.ts +14 -14
  76. package/src/components/StripLightView.tsx +24 -24
  77. package/src/components/Summary.tsx +116 -116
  78. package/src/components/Tag.d.ts +8 -8
  79. package/src/components/Tag.tsx +56 -56
  80. package/src/components/TextButton.d.ts +9 -9
  81. package/src/components/TextButton.tsx +31 -31
  82. package/src/components/TextField.d.ts +9 -9
  83. package/src/components/TextField.tsx +92 -92
  84. package/src/components/TextFieldStyleButton.d.ts +8 -8
  85. package/src/components/TextFieldStyleButton.tsx +85 -85
  86. package/src/components/UATabTitle.d.ts +6 -6
  87. package/src/components/UATabTitle.tsx +31 -31
  88. package/src/components/UATabs.d.ts +12 -12
  89. package/src/components/UATabs.tsx +77 -77
  90. package/src/components/connect.d.ts +10 -10
  91. package/src/components/connect.tsx +20 -20
  92. package/src/components/ldvColorBrightness.d.ts +1 -1
  93. package/src/components/ldvColorBrightness.tsx +18 -18
  94. package/src/components/ldvColorSlider.d.ts +14 -14
  95. package/src/components/ldvColorSlider.tsx +131 -131
  96. package/src/components/ldvItemView.d.ts +12 -12
  97. package/src/components/ldvItemView.tsx +43 -43
  98. package/src/components/ldvPickerView.d.ts +13 -13
  99. package/src/components/ldvPickerView.tsx +97 -97
  100. package/src/components/ldvPresetView.d.ts +2 -2
  101. package/src/components/ldvPresetView.tsx +86 -86
  102. package/src/components/ldvSaturation.d.ts +2 -2
  103. package/src/components/ldvSaturation.tsx +22 -22
  104. package/src/components/ldvSlider.d.ts +15 -15
  105. package/src/components/ldvSlider.tsx +103 -103
  106. package/src/components/ldvSwitch.d.ts +10 -10
  107. package/src/components/ldvSwitch.tsx +52 -52
  108. package/src/components/ldvTemperatureSlider.d.ts +13 -13
  109. package/src/components/ldvTemperatureSlider.tsx +139 -139
  110. package/src/components/ldvTopBar.d.ts +10 -10
  111. package/src/components/ldvTopBar.tsx +76 -76
  112. package/src/components/ldvTopName.d.ts +9 -9
  113. package/src/components/ldvTopName.tsx +63 -63
  114. package/src/components/segmentControl.d.ts +1 -1
  115. package/src/components/segmentControl.tsx +65 -65
  116. package/src/components/weekSelect.d.ts +7 -7
  117. package/src/components/weekSelect.tsx +98 -98
  118. package/src/composeLayout.d.ts +30 -30
  119. package/src/composeLayout.tsx +261 -261
  120. package/src/config/dark-theme.ts +61 -61
  121. package/src/config/light-theme.ts +61 -61
  122. package/src/hooks/Hooks.d.ts +2 -2
  123. package/src/hooks/Hooks.ts +8 -8
  124. package/src/i18n/index.d.ts +16 -16
  125. package/src/i18n/index.ts +37 -37
  126. package/src/i18n/strings.d.ts +15953 -15953
  127. package/src/i18n/strings.ts +23781 -23723
  128. package/src/main.tsx +9 -9
  129. package/src/models/GlobalParams.d.ts +14 -14
  130. package/src/models/GlobalParams.ts +14 -14
  131. package/src/models/TuyaApi.d.ts +29 -29
  132. package/src/models/TuyaApi.ts +92 -92
  133. package/src/models/combine.d.ts +26 -26
  134. package/src/models/combine.ts +17 -17
  135. package/src/models/configureStore.d.ts +9 -9
  136. package/src/models/configureStore.ts +33 -33
  137. package/src/models/index.d.ts +31 -31
  138. package/src/models/index.ts +22 -22
  139. package/src/models/modules/NativePropsSlice.d.ts +61 -61
  140. package/src/models/modules/NativePropsSlice.tsx +467 -467
  141. package/src/models/modules/Result.d.ts +14 -14
  142. package/src/models/modules/Result.ts +15 -15
  143. package/src/models/modules/common.d.ts +44 -44
  144. package/src/models/modules/common.ts +161 -161
  145. package/src/res/index.d.ts +70 -70
  146. package/src/res/index.ts +73 -73
  147. package/src/utils/ColorParser.d.ts +66 -66
  148. package/src/utils/ColorParser.ts +189 -189
  149. package/src/utils/ColorUtils.d.ts +71 -71
  150. package/src/utils/ColorUtils.tsx +448 -448
  151. package/src/utils/Support.d.ts +13 -13
  152. package/src/utils/Support.ts +108 -108
  153. package/src/utils/TypeUtils.d.ts +3 -3
  154. package/src/utils/cctUtils.d.ts +1 -1
  155. package/src/utils/cctUtils.ts +110 -110
  156. package/src/utils/common.d.ts +35 -35
  157. package/src/utils/common.ts +379 -379
  158. package/src/utils/index.d.ts +26 -26
  159. package/src/utils/index.ts +191 -191
  160. package/src/utils/interface.d.ts +6 -6
  161. package/src/utils/interface.ts +50 -50
  162. package/src/utils/loopsCompare.d.ts +1 -1
  163. package/src/utils/loopsCompare.ts +62 -62
  164. package/tsconfig.json +50 -50
  165. package/update-localazy.py +52 -52
@@ -1,13 +1,13 @@
1
- export declare const isPlug: (dpCodes: Record<string, string>) => boolean;
2
- export declare const isGlassRGBWLamp: (dpCodes: Record<string, string>) => boolean;
3
- export declare const isMixRGBWLamp: (dpCodes: Record<string, string>) => boolean;
4
- export declare const isRGBWLamp: (dpCodes: Record<string, string>) => boolean;
5
- export declare const isRGBLamp: (dpCodes: Record<string, string>) => boolean;
6
- export declare const isOnlyRGBLamp: (dpCodes: Record<string, string>) => boolean;
7
- export declare const isTWLamp: (dpCodes: Record<string, string>) => boolean;
8
- export declare const isFanLamp: (dpCodes: Record<string, string>) => boolean;
9
- export declare const isDIMLamp: (dpCodes: Record<string, string>) => boolean;
10
- export declare const isGARDOT: (dpCodes: Record<string, string>) => boolean;
11
- export declare const isSupportColor: (dpCodes: Record<string, string>) => boolean;
12
- export declare const isSupportTemperature: (dpCodes: Record<string, string>) => boolean;
13
- export declare const isSupportBrightness: (dpCodes: Record<string, string>) => boolean;
1
+ export declare const isPlug: (dpCodes: Record<string, string>) => boolean;
2
+ export declare const isGlassRGBWLamp: (dpCodes: Record<string, string>) => boolean;
3
+ export declare const isMixRGBWLamp: (dpCodes: Record<string, string>) => boolean;
4
+ export declare const isRGBWLamp: (dpCodes: Record<string, string>) => boolean;
5
+ export declare const isRGBLamp: (dpCodes: Record<string, string>) => boolean;
6
+ export declare const isOnlyRGBLamp: (dpCodes: Record<string, string>) => boolean;
7
+ export declare const isTWLamp: (dpCodes: Record<string, string>) => boolean;
8
+ export declare const isFanLamp: (dpCodes: Record<string, string>) => boolean;
9
+ export declare const isDIMLamp: (dpCodes: Record<string, string>) => boolean;
10
+ export declare const isGARDOT: (dpCodes: Record<string, string>) => boolean;
11
+ export declare const isSupportColor: (dpCodes: Record<string, string>) => boolean;
12
+ export declare const isSupportTemperature: (dpCodes: Record<string, string>) => boolean;
13
+ export declare const isSupportBrightness: (dpCodes: Record<string, string>) => boolean;
@@ -1,109 +1,109 @@
1
-
2
- // 判断是否是plug
3
- export const isPlug = (dpCodes: Record<string, string>) => {
4
- return !!dpCodes.switch_1
5
- }
6
-
7
- // 玻璃灯:支持颜色和色温灯同时调节
8
- export const isGlassRGBWLamp = (dpCodes: Record<string, string>) => {
9
- return !!(
10
- !dpCodes.mix_rgbcw &&
11
- !dpCodes.temp_value &&
12
- dpCodes.colour_data &&
13
- dpCodes.bright_value
14
- )
15
- }
16
- // 双灯泡吸顶灯:支持颜色和色温灯同时调节
17
- export const isMixRGBWLamp = (dpCodes: Record<string, string>) => {
18
- return !!(
19
- dpCodes.mix_rgbcw &&
20
- dpCodes.colour_data &&
21
- dpCodes.temp_value &&
22
- dpCodes.bright_value
23
- )
24
- }
25
-
26
- // 支持调节:颜色/色温+亮度
27
- export const isRGBWLamp = (dpCodes: Record<string, string>) => {
28
- return !!(
29
- !dpCodes.mix_rgbcw &&
30
- dpCodes.colour_data &&
31
- dpCodes.temp_value &&
32
- dpCodes.bright_value
33
- )
34
- }
35
-
36
- // 支持调节:颜色/单一色温亮度
37
- export const isRGBLamp = (dpCodes: Record<string, string>) => {
38
- return !!(
39
- !dpCodes.mix_rgbcw &&
40
- !dpCodes.temp_value &&
41
- dpCodes.colour_data &&
42
- dpCodes.bright_value
43
- )
44
- }
45
-
46
- // 支持调节:颜色
47
- export const isOnlyRGBLamp = (dpCodes: Record<string, string>) => {
48
- return !!(
49
- !dpCodes.mix_rgbcw &&
50
- !dpCodes.temp_value &&
51
- !dpCodes.bright_value &&
52
- dpCodes.colour_data
53
- )
54
- }
55
-
56
- // 支持调节:色温+亮度
57
- export const isTWLamp = (dpCodes: Record<string, string>) => {
58
- return !!(
59
- !dpCodes.mix_rgbcw &&
60
- !dpCodes.colour_data &&
61
- dpCodes.temp_value &&
62
- dpCodes.bright_value
63
- )
64
- }
65
-
66
- // 支持调节: 色温+ 温度
67
- export const isFanLamp = (dpCodes: Record<string, string>) => {
68
- return !!(
69
- !dpCodes.mix_rgbcw &&
70
- !dpCodes.colour_data &&
71
- dpCodes.temp_value &&
72
- dpCodes.bright_value &&
73
- dpCodes.fan_speed
74
- )
75
- }
76
-
77
- // 支持调节:单一色温亮度
78
- export const isDIMLamp = (dpCodes: Record<string, string>) => {
79
- return !!(
80
- !dpCodes.mix_rgbcw &&
81
- !dpCodes.colour_data &&
82
- !dpCodes.temp_value &&
83
- dpCodes.bright_value
84
- )
85
- }
86
-
87
- // GARDOT灯具
88
- export const isGARDOT = (dpCodes: Record<string, string>) => {
89
- return !!(
90
- dpCodes.switch_led &&
91
- dpCodes.work_mode &&
92
- dpCodes.colour_data &&
93
- dpCodes.scene_data &&
94
- dpCodes.countdown &&
95
- dpCodes.control_data
96
- )
97
- }
98
-
99
- export const isSupportColor = (dpCodes: Record<string, string>) => {
100
- return !!(dpCodes.colour_data)
101
- }
102
-
103
- export const isSupportTemperature = (dpCodes: Record<string, string>) => {
104
- return !!(dpCodes.temp_value)
105
- }
106
-
107
- export const isSupportBrightness = (dpCodes: Record<string, string>) => {
108
- return !!(dpCodes.bright_value)
1
+
2
+ // 判断是否是plug
3
+ export const isPlug = (dpCodes: Record<string, string>) => {
4
+ return !!dpCodes.switch_1
5
+ }
6
+
7
+ // 玻璃灯:支持颜色和色温灯同时调节
8
+ export const isGlassRGBWLamp = (dpCodes: Record<string, string>) => {
9
+ return !!(
10
+ !dpCodes.mix_rgbcw &&
11
+ !dpCodes.temp_value &&
12
+ dpCodes.colour_data &&
13
+ dpCodes.bright_value
14
+ )
15
+ }
16
+ // 双灯泡吸顶灯:支持颜色和色温灯同时调节
17
+ export const isMixRGBWLamp = (dpCodes: Record<string, string>) => {
18
+ return !!(
19
+ dpCodes.mix_rgbcw &&
20
+ dpCodes.colour_data &&
21
+ dpCodes.temp_value &&
22
+ dpCodes.bright_value
23
+ )
24
+ }
25
+
26
+ // 支持调节:颜色/色温+亮度
27
+ export const isRGBWLamp = (dpCodes: Record<string, string>) => {
28
+ return !!(
29
+ !dpCodes.mix_rgbcw &&
30
+ dpCodes.colour_data &&
31
+ dpCodes.temp_value &&
32
+ dpCodes.bright_value
33
+ )
34
+ }
35
+
36
+ // 支持调节:颜色/单一色温亮度
37
+ export const isRGBLamp = (dpCodes: Record<string, string>) => {
38
+ return !!(
39
+ !dpCodes.mix_rgbcw &&
40
+ !dpCodes.temp_value &&
41
+ dpCodes.colour_data &&
42
+ dpCodes.bright_value
43
+ )
44
+ }
45
+
46
+ // 支持调节:颜色
47
+ export const isOnlyRGBLamp = (dpCodes: Record<string, string>) => {
48
+ return !!(
49
+ !dpCodes.mix_rgbcw &&
50
+ !dpCodes.temp_value &&
51
+ !dpCodes.bright_value &&
52
+ dpCodes.colour_data
53
+ )
54
+ }
55
+
56
+ // 支持调节:色温+亮度
57
+ export const isTWLamp = (dpCodes: Record<string, string>) => {
58
+ return !!(
59
+ !dpCodes.mix_rgbcw &&
60
+ !dpCodes.colour_data &&
61
+ dpCodes.temp_value &&
62
+ dpCodes.bright_value
63
+ )
64
+ }
65
+
66
+ // 支持调节: 色温+ 温度
67
+ export const isFanLamp = (dpCodes: Record<string, string>) => {
68
+ return !!(
69
+ !dpCodes.mix_rgbcw &&
70
+ !dpCodes.colour_data &&
71
+ dpCodes.temp_value &&
72
+ dpCodes.bright_value &&
73
+ dpCodes.fan_speed
74
+ )
75
+ }
76
+
77
+ // 支持调节:单一色温亮度
78
+ export const isDIMLamp = (dpCodes: Record<string, string>) => {
79
+ return !!(
80
+ !dpCodes.mix_rgbcw &&
81
+ !dpCodes.colour_data &&
82
+ !dpCodes.temp_value &&
83
+ dpCodes.bright_value
84
+ )
85
+ }
86
+
87
+ // GARDOT灯具
88
+ export const isGARDOT = (dpCodes: Record<string, string>) => {
89
+ return !!(
90
+ dpCodes.switch_led &&
91
+ dpCodes.work_mode &&
92
+ dpCodes.colour_data &&
93
+ dpCodes.scene_data &&
94
+ dpCodes.countdown &&
95
+ dpCodes.control_data
96
+ )
97
+ }
98
+
99
+ export const isSupportColor = (dpCodes: Record<string, string>) => {
100
+ return !!(dpCodes.colour_data)
101
+ }
102
+
103
+ export const isSupportTemperature = (dpCodes: Record<string, string>) => {
104
+ return !!(dpCodes.temp_value)
105
+ }
106
+
107
+ export const isSupportBrightness = (dpCodes: Record<string, string>) => {
108
+ return !!(dpCodes.bright_value)
109
109
  }
@@ -1,3 +1,3 @@
1
- export declare type PropertyValueTypes<T> = {
2
- [K in keyof T]: T[K];
3
- }[keyof T];
1
+ export declare type PropertyValueTypes<T> = {
2
+ [K in keyof T]: T[K];
3
+ }[keyof T];
@@ -1 +1 @@
1
- export declare const cctToColor: (key: string | number, brightness?: string | number | undefined) => any;
1
+ export declare const cctToColor: (key: string | number, brightness?: string | number | undefined) => any;
@@ -1,111 +1,111 @@
1
- const ccts = {
2
- '0': 'rgb(254, 172, 91)',
3
- '1': 'rgb(254, 174, 94)',
4
- '2': 'rgb(253, 176, 97)',
5
- '3': 'rgb(253, 178, 101)',
6
- '4': 'rgb(253, 180, 105)',
7
- '5': 'rgb(253, 181, 109)',
8
- '6': 'rgb(252, 183, 112)',
9
- '7': 'rgb(252, 185, 116)',
10
- '8': 'rgb(252, 187, 120)',
11
- '9': 'rgb(252, 189, 123)',
12
- '10': 'rgb(251, 191, 127)',
13
- '11': 'rgb(251, 193, 131)',
14
- '12': 'rgb(251, 194, 134)',
15
- '13': 'rgb(251, 196, 138)',
16
- '14': 'rgb(250, 198, 142)',
17
- '15': 'rgb(250, 200, 146)',
18
- '16': 'rgb(250, 202, 149)',
19
- '17': 'rgb(250, 204, 153)',
20
- '18': 'rgb(249, 206, 157)',
21
- '19': 'rgb(249, 207, 160)',
22
- '20': 'rgb(249, 209, 164)',
23
- '21': 'rgb(249, 211, 167)',
24
- '22': 'rgb(250, 213, 170)',
25
- '23': 'rgb(250, 214, 173)',
26
- '24': 'rgb(250, 216, 176)',
27
- '25': 'rgb(250, 218, 179)',
28
- '26': 'rgb(251, 220, 182)',
29
- '27': 'rgb(251, 221, 185)',
30
- '28': 'rgb(251, 223, 188)',
31
- '29': 'rgb(251, 225, 191)',
32
- '30': 'rgb(252, 227, 194)',
33
- '31': 'rgb(252, 228, 197)',
34
- '32': 'rgb(252, 230, 199)',
35
- '33': 'rgb(252, 232, 203)',
36
- '34': 'rgb(253, 234, 206)',
37
- '35': 'rgb(253, 235, 209)',
38
- '36': 'rgb(253, 237, 211)',
39
- '37': 'rgb(253, 239, 214)',
40
- '38': 'rgb(254, 241, 217)',
41
- '39': 'rgb(254, 242, 220)',
42
- '40': 'rgb(254, 244, 223)',
43
- '41': 'rgb(254, 244, 224)',
44
- '42': 'rgb(254, 245, 225)',
45
- '43': 'rgb(254, 245, 226)',
46
- '44': 'rgb(254, 245, 227)',
47
- '45': 'rgb(253, 246, 228)',
48
- '46': 'rgb(253, 246, 229)',
49
- '47': 'rgb(253, 246, 230)',
50
- '48': 'rgb(253, 246, 231)',
51
- '49': 'rgb(253, 247, 232)',
52
- '50': 'rgb(253, 247, 233)',
53
- '51': 'rgb(253, 247, 234)',
54
- '52': 'rgb(253, 248, 234)',
55
- '53': 'rgb(253, 248, 235)',
56
- '54': 'rgb(253, 248, 236)',
57
- '55': 'rgb(252, 249, 237)',
58
- '56': 'rgb(252, 249, 238)',
59
- '57': 'rgb(252, 249, 239)',
60
- '58': 'rgb(252, 249, 240)',
61
- '59': 'rgb(252, 250, 241)',
62
- '60': 'rgb(252, 250, 242)',
63
- '61': 'rgb(251, 249, 242)',
64
- '62': 'rgb(249, 248, 243)',
65
- '63': 'rgb(248, 248, 243)',
66
- '64': 'rgb(247, 247, 243)',
67
- '65': 'rgb(246, 246, 243)',
68
- '66': 'rgb(244, 245, 244)',
69
- '67': 'rgb(243, 245, 244)',
70
- '68': 'rgb(241, 244, 244)',
71
- '69': 'rgb(240, 243, 245)',
72
- '70': 'rgb(239, 242, 245)',
73
- '71': 'rgb(238, 242, 245)',
74
- '72': 'rgb(236, 241, 246)',
75
- '73': 'rgb(235, 240, 246)',
76
- '74': 'rgb(234, 239, 246)',
77
- '75': 'rgb(232, 239, 247)',
78
- '76': 'rgb(231, 238, 247)',
79
- '77': 'rgb(230, 237, 247)',
80
- '78': 'rgb(228, 236, 247)',
81
- '79': 'rgb(227, 236, 248)',
82
- '80': 'rgb(226, 235, 248)',
83
- '81': 'rgb(224, 234, 248)',
84
- '82': 'rgb(223, 233, 249)',
85
- '83': 'rgb(221, 232, 249)',
86
- '84': 'rgb(219, 231, 249)',
87
- '85': 'rgb(218, 230, 250)',
88
- '86': 'rgb(216, 230, 250)',
89
- '87': 'rgb(215, 229, 250)',
90
- '88': 'rgb(213, 228, 250)',
91
- '89': 'rgb(212, 227, 251)',
92
- '90': 'rgb(210, 226, 251)',
93
- '91': 'rgb(208, 225, 251)',
94
- '92': 'rgb(207, 224, 252)',
95
- '93': 'rgb(205, 223, 252)',
96
- '94': 'rgb(203, 222, 252)',
97
- '95': 'rgb(202, 221, 253)',
98
- '96': 'rgb(200, 221, 253)',
99
- '97': 'rgb(199, 220, 253)',
100
- '98': 'rgb(197, 219, 253)',
101
- '99': 'rgb(196, 218, 254)',
102
- '100': 'rgb(194, 217, 254)',
103
- }
104
-
105
- export const cctToColor = (key: string | number, brightness?: string | number) => {
106
- let color = ccts[String(key)]
107
- if (color && (brightness || brightness === 0)) {
108
- color = Number(brightness) === 0 ? 'rgb(0,0,0)' : `rgba(${color.slice(4, -1)}, ${Number(brightness) / 100 < 0.1 ? 0.1 : Number(brightness) / 100})`
109
- }
110
- return color
1
+ const ccts = {
2
+ '0': 'rgb(254, 172, 91)',
3
+ '1': 'rgb(254, 174, 94)',
4
+ '2': 'rgb(253, 176, 97)',
5
+ '3': 'rgb(253, 178, 101)',
6
+ '4': 'rgb(253, 180, 105)',
7
+ '5': 'rgb(253, 181, 109)',
8
+ '6': 'rgb(252, 183, 112)',
9
+ '7': 'rgb(252, 185, 116)',
10
+ '8': 'rgb(252, 187, 120)',
11
+ '9': 'rgb(252, 189, 123)',
12
+ '10': 'rgb(251, 191, 127)',
13
+ '11': 'rgb(251, 193, 131)',
14
+ '12': 'rgb(251, 194, 134)',
15
+ '13': 'rgb(251, 196, 138)',
16
+ '14': 'rgb(250, 198, 142)',
17
+ '15': 'rgb(250, 200, 146)',
18
+ '16': 'rgb(250, 202, 149)',
19
+ '17': 'rgb(250, 204, 153)',
20
+ '18': 'rgb(249, 206, 157)',
21
+ '19': 'rgb(249, 207, 160)',
22
+ '20': 'rgb(249, 209, 164)',
23
+ '21': 'rgb(249, 211, 167)',
24
+ '22': 'rgb(250, 213, 170)',
25
+ '23': 'rgb(250, 214, 173)',
26
+ '24': 'rgb(250, 216, 176)',
27
+ '25': 'rgb(250, 218, 179)',
28
+ '26': 'rgb(251, 220, 182)',
29
+ '27': 'rgb(251, 221, 185)',
30
+ '28': 'rgb(251, 223, 188)',
31
+ '29': 'rgb(251, 225, 191)',
32
+ '30': 'rgb(252, 227, 194)',
33
+ '31': 'rgb(252, 228, 197)',
34
+ '32': 'rgb(252, 230, 199)',
35
+ '33': 'rgb(252, 232, 203)',
36
+ '34': 'rgb(253, 234, 206)',
37
+ '35': 'rgb(253, 235, 209)',
38
+ '36': 'rgb(253, 237, 211)',
39
+ '37': 'rgb(253, 239, 214)',
40
+ '38': 'rgb(254, 241, 217)',
41
+ '39': 'rgb(254, 242, 220)',
42
+ '40': 'rgb(254, 244, 223)',
43
+ '41': 'rgb(254, 244, 224)',
44
+ '42': 'rgb(254, 245, 225)',
45
+ '43': 'rgb(254, 245, 226)',
46
+ '44': 'rgb(254, 245, 227)',
47
+ '45': 'rgb(253, 246, 228)',
48
+ '46': 'rgb(253, 246, 229)',
49
+ '47': 'rgb(253, 246, 230)',
50
+ '48': 'rgb(253, 246, 231)',
51
+ '49': 'rgb(253, 247, 232)',
52
+ '50': 'rgb(253, 247, 233)',
53
+ '51': 'rgb(253, 247, 234)',
54
+ '52': 'rgb(253, 248, 234)',
55
+ '53': 'rgb(253, 248, 235)',
56
+ '54': 'rgb(253, 248, 236)',
57
+ '55': 'rgb(252, 249, 237)',
58
+ '56': 'rgb(252, 249, 238)',
59
+ '57': 'rgb(252, 249, 239)',
60
+ '58': 'rgb(252, 249, 240)',
61
+ '59': 'rgb(252, 250, 241)',
62
+ '60': 'rgb(252, 250, 242)',
63
+ '61': 'rgb(251, 249, 242)',
64
+ '62': 'rgb(249, 248, 243)',
65
+ '63': 'rgb(248, 248, 243)',
66
+ '64': 'rgb(247, 247, 243)',
67
+ '65': 'rgb(246, 246, 243)',
68
+ '66': 'rgb(244, 245, 244)',
69
+ '67': 'rgb(243, 245, 244)',
70
+ '68': 'rgb(241, 244, 244)',
71
+ '69': 'rgb(240, 243, 245)',
72
+ '70': 'rgb(239, 242, 245)',
73
+ '71': 'rgb(238, 242, 245)',
74
+ '72': 'rgb(236, 241, 246)',
75
+ '73': 'rgb(235, 240, 246)',
76
+ '74': 'rgb(234, 239, 246)',
77
+ '75': 'rgb(232, 239, 247)',
78
+ '76': 'rgb(231, 238, 247)',
79
+ '77': 'rgb(230, 237, 247)',
80
+ '78': 'rgb(228, 236, 247)',
81
+ '79': 'rgb(227, 236, 248)',
82
+ '80': 'rgb(226, 235, 248)',
83
+ '81': 'rgb(224, 234, 248)',
84
+ '82': 'rgb(223, 233, 249)',
85
+ '83': 'rgb(221, 232, 249)',
86
+ '84': 'rgb(219, 231, 249)',
87
+ '85': 'rgb(218, 230, 250)',
88
+ '86': 'rgb(216, 230, 250)',
89
+ '87': 'rgb(215, 229, 250)',
90
+ '88': 'rgb(213, 228, 250)',
91
+ '89': 'rgb(212, 227, 251)',
92
+ '90': 'rgb(210, 226, 251)',
93
+ '91': 'rgb(208, 225, 251)',
94
+ '92': 'rgb(207, 224, 252)',
95
+ '93': 'rgb(205, 223, 252)',
96
+ '94': 'rgb(203, 222, 252)',
97
+ '95': 'rgb(202, 221, 253)',
98
+ '96': 'rgb(200, 221, 253)',
99
+ '97': 'rgb(199, 220, 253)',
100
+ '98': 'rgb(197, 219, 253)',
101
+ '99': 'rgb(196, 218, 254)',
102
+ '100': 'rgb(194, 217, 254)',
103
+ }
104
+
105
+ export const cctToColor = (key: string | number, brightness?: string | number) => {
106
+ let color = ccts[String(key)]
107
+ if (color && (brightness || brightness === 0)) {
108
+ color = Number(brightness) === 0 ? 'rgb(0,0,0)' : `rgba(${color.slice(4, -1)}, ${Number(brightness) / 100 < 0.1 ? 0.1 : Number(brightness) / 100})`
109
+ }
110
+ return color
111
111
  }
@@ -1,35 +1,35 @@
1
- export declare const loopText: (loop: any, time?: string) => string;
2
- export declare const loopTommorrowText: (loop: any, isTommorrow: any) => string;
3
- export declare const toFixed: (str: any, count: any) => string;
4
- export declare function getArray(arr: any, size: any): string[];
5
- export declare function getWeek(weekString: any): number[];
6
- /**
7
- * 按位分割字符串
8
- * @param {*} str 要分割的字符串
9
- * @param {*} step 按多少位分割
10
- * @returns ['','',...]
11
- */
12
- export declare function spliceByStep(str: string, step: number): string[];
13
- export declare function hex2Int(hex: string): number;
14
- export declare const localeNumber: (v: number | string, fixed?: number | undefined, showGroup?: boolean | undefined) => string | number;
15
- export declare const exchangeNumber: (v: number | string) => string;
16
- export declare const exportFile: (list: any) => void;
17
- export declare const exportHistoryFile: (list: any) => void;
18
- export declare const monthFormat: (v: number | string) => string;
19
- export declare const tagTitle: string[];
20
- export declare function isTimeSpanValid(timeData: any): number;
21
- export declare function modifyPopup(beforeValue: object, editValue: object): boolean;
22
- interface DialogProps {
23
- method: 'alert' | 'confirm';
24
- title: string;
25
- showCancelText?: boolean;
26
- showConfirmText?: boolean;
27
- cancelText?: string;
28
- confirmText?: string;
29
- subTitle?: string;
30
- onConfirm: (data: any, args: {
31
- close: () => void;
32
- }) => void;
33
- }
34
- export declare function showDialog(props: DialogProps): void;
35
- export {};
1
+ export declare const loopText: (loop: any, time?: string) => string;
2
+ export declare const loopTommorrowText: (loop: any, isTommorrow: any) => string;
3
+ export declare const toFixed: (str: any, count: any) => string;
4
+ export declare function getArray(arr: any, size: any): string[];
5
+ export declare function getWeek(weekString: any): number[];
6
+ /**
7
+ * 按位分割字符串
8
+ * @param {*} str 要分割的字符串
9
+ * @param {*} step 按多少位分割
10
+ * @returns ['','',...]
11
+ */
12
+ export declare function spliceByStep(str: string, step: number): string[];
13
+ export declare function hex2Int(hex: string): number;
14
+ export declare const localeNumber: (v: number | string, fixed?: number | undefined, showGroup?: boolean | undefined) => string | number;
15
+ export declare const exchangeNumber: (v: number | string) => string;
16
+ export declare const exportFile: (list: any) => void;
17
+ export declare const exportHistoryFile: (list: any) => void;
18
+ export declare const monthFormat: (v: number | string) => string;
19
+ export declare const tagTitle: string[];
20
+ export declare function isTimeSpanValid(timeData: any): number;
21
+ export declare function modifyPopup(beforeValue: object, editValue: object): boolean;
22
+ interface DialogProps {
23
+ method: 'alert' | 'confirm';
24
+ title: string;
25
+ showCancelText?: boolean;
26
+ showConfirmText?: boolean;
27
+ cancelText?: string;
28
+ confirmText?: string;
29
+ subTitle?: string;
30
+ onConfirm: (data: any, args: {
31
+ close: () => void;
32
+ }) => void;
33
+ }
34
+ export declare function showDialog(props: DialogProps): void;
35
+ export {};