@iobroker/adapter-react-v5 7.6.7 → 7.6.9

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 (195) hide show
  1. package/build/Components/InfoBox.d.ts +1 -1
  2. package/build/Components/InfoBox.js +1 -1
  3. package/build/Components/InfoBox.js.map +1 -1
  4. package/build/Components/ObjectBrowser.d.ts +10 -0
  5. package/build/Components/ObjectBrowser.js +65 -8
  6. package/build/Components/ObjectBrowser.js.map +1 -1
  7. package/build/Components/SelectWithIcon.d.ts +0 -1
  8. package/build/Components/SelectWithIcon.js +3 -3
  9. package/build/Components/SelectWithIcon.js.map +1 -1
  10. package/build/Components/TextWithIcon.d.ts +0 -1
  11. package/build/Components/TextWithIcon.js +3 -3
  12. package/build/Components/TextWithIcon.js.map +1 -1
  13. package/build/Components/TypeSelector/TypeIcon.d.ts +29 -0
  14. package/build/Components/TypeSelector/TypeIcon.js +111 -0
  15. package/build/Components/TypeSelector/TypeIcon.js.map +1 -0
  16. package/build/Components/TypeSelector/TypeOptions.d.ts +8 -0
  17. package/build/Components/TypeSelector/TypeOptions.js +125 -0
  18. package/build/Components/TypeSelector/TypeOptions.js.map +1 -0
  19. package/build/Components/TypeSelector/TypeSelector.d.ts +22 -0
  20. package/build/Components/TypeSelector/TypeSelector.js +92 -0
  21. package/build/Components/TypeSelector/TypeSelector.js.map +1 -0
  22. package/build/Components/TypeSelector/icons/Cleaner.d.ts +3 -0
  23. package/build/Components/TypeSelector/icons/Cleaner.js +14 -0
  24. package/build/Components/TypeSelector/icons/Cleaner.js.map +1 -0
  25. package/build/Components/TypeSelector/icons/DoorClosed.d.ts +3 -0
  26. package/build/Components/TypeSelector/icons/DoorClosed.js +7 -0
  27. package/build/Components/TypeSelector/icons/DoorClosed.js.map +1 -0
  28. package/build/Components/TypeSelector/icons/DoorOpened.d.ts +3 -0
  29. package/build/Components/TypeSelector/icons/DoorOpened.js +7 -0
  30. package/build/Components/TypeSelector/icons/DoorOpened.js.map +1 -0
  31. package/build/Components/TypeSelector/icons/FireOff.d.ts +3 -0
  32. package/build/Components/TypeSelector/icons/FireOff.js +8 -0
  33. package/build/Components/TypeSelector/icons/FireOff.js.map +1 -0
  34. package/build/Components/TypeSelector/icons/FireOn.d.ts +3 -0
  35. package/build/Components/TypeSelector/icons/FireOn.js +14 -0
  36. package/build/Components/TypeSelector/icons/FireOn.js.map +1 -0
  37. package/build/Components/TypeSelector/icons/FloodOff.d.ts +3 -0
  38. package/build/Components/TypeSelector/icons/FloodOff.js +11 -0
  39. package/build/Components/TypeSelector/icons/FloodOff.js.map +1 -0
  40. package/build/Components/TypeSelector/icons/FloodOn.d.ts +3 -0
  41. package/build/Components/TypeSelector/icons/FloodOn.js +18 -0
  42. package/build/Components/TypeSelector/icons/FloodOn.js.map +1 -0
  43. package/build/Components/TypeSelector/icons/Gate.d.ts +3 -0
  44. package/build/Components/TypeSelector/icons/Gate.js +8 -0
  45. package/build/Components/TypeSelector/icons/Gate.js.map +1 -0
  46. package/build/Components/TypeSelector/icons/HeatValve.d.ts +3 -0
  47. package/build/Components/TypeSelector/icons/HeatValve.js +6 -0
  48. package/build/Components/TypeSelector/icons/HeatValve.js.map +1 -0
  49. package/build/Components/TypeSelector/icons/Home.d.ts +3 -0
  50. package/build/Components/TypeSelector/icons/Home.js +6 -0
  51. package/build/Components/TypeSelector/icons/Home.js.map +1 -0
  52. package/build/Components/TypeSelector/icons/Humidity.d.ts +3 -0
  53. package/build/Components/TypeSelector/icons/Humidity.js +8 -0
  54. package/build/Components/TypeSelector/icons/Humidity.js.map +1 -0
  55. package/build/Components/TypeSelector/icons/IconHome.d.ts +5 -0
  56. package/build/Components/TypeSelector/icons/IconHome.js +21 -0
  57. package/build/Components/TypeSelector/icons/IconHome.js.map +1 -0
  58. package/build/Components/TypeSelector/icons/Jalousie.d.ts +3 -0
  59. package/build/Components/TypeSelector/icons/Jalousie.js +7 -0
  60. package/build/Components/TypeSelector/icons/Jalousie.js.map +1 -0
  61. package/build/Components/TypeSelector/icons/Material.d.ts +3 -0
  62. package/build/Components/TypeSelector/icons/Material.js +8 -0
  63. package/build/Components/TypeSelector/icons/Material.js.map +1 -0
  64. package/build/Components/TypeSelector/icons/MotionOff.d.ts +3 -0
  65. package/build/Components/TypeSelector/icons/MotionOff.js +11 -0
  66. package/build/Components/TypeSelector/icons/MotionOff.js.map +1 -0
  67. package/build/Components/TypeSelector/icons/MotionOn.d.ts +3 -0
  68. package/build/Components/TypeSelector/icons/MotionOn.js +7 -0
  69. package/build/Components/TypeSelector/icons/MotionOn.js.map +1 -0
  70. package/build/Components/TypeSelector/icons/PushButton.d.ts +3 -0
  71. package/build/Components/TypeSelector/icons/PushButton.js +9 -0
  72. package/build/Components/TypeSelector/icons/PushButton.js.map +1 -0
  73. package/build/Components/TypeSelector/icons/RGB.d.ts +3 -0
  74. package/build/Components/TypeSelector/icons/RGB.js +43 -0
  75. package/build/Components/TypeSelector/icons/RGB.js.map +1 -0
  76. package/build/Components/TypeSelector/icons/RepairExpert.d.ts +3 -0
  77. package/build/Components/TypeSelector/icons/RepairExpert.js +6 -0
  78. package/build/Components/TypeSelector/icons/RepairExpert.js.map +1 -0
  79. package/build/Components/TypeSelector/icons/Socket.d.ts +3 -0
  80. package/build/Components/TypeSelector/icons/Socket.js +8 -0
  81. package/build/Components/TypeSelector/icons/Socket.js.map +1 -0
  82. package/build/Components/TypeSelector/icons/Thermometer.d.ts +3 -0
  83. package/build/Components/TypeSelector/icons/Thermometer.js +7 -0
  84. package/build/Components/TypeSelector/icons/Thermometer.js.map +1 -0
  85. package/build/Components/TypeSelector/icons/ThermometerSimple.d.ts +3 -0
  86. package/build/Components/TypeSelector/icons/ThermometerSimple.js +8 -0
  87. package/build/Components/TypeSelector/icons/ThermometerSimple.js.map +1 -0
  88. package/build/Components/TypeSelector/icons/Thermostat.d.ts +3 -0
  89. package/build/Components/TypeSelector/icons/Thermostat.js +9 -0
  90. package/build/Components/TypeSelector/icons/Thermostat.js.map +1 -0
  91. package/build/Components/TypeSelector/icons/Valve.d.ts +3 -0
  92. package/build/Components/TypeSelector/icons/Valve.js +7 -0
  93. package/build/Components/TypeSelector/icons/Valve.js.map +1 -0
  94. package/build/Components/TypeSelector/icons/WindowClosed.d.ts +3 -0
  95. package/build/Components/TypeSelector/icons/WindowClosed.js +8 -0
  96. package/build/Components/TypeSelector/icons/WindowClosed.js.map +1 -0
  97. package/build/Components/TypeSelector/icons/WindowOpened.d.ts +3 -0
  98. package/build/Components/TypeSelector/icons/WindowOpened.js +9 -0
  99. package/build/Components/TypeSelector/icons/WindowOpened.js.map +1 -0
  100. package/build/Components/TypeSelector/icons/WindowTilted.d.ts +3 -0
  101. package/build/Components/TypeSelector/icons/WindowTilted.js +8 -0
  102. package/build/Components/TypeSelector/icons/WindowTilted.js.map +1 -0
  103. package/build/Components/TypeSelector/icons/index.d.ts +28 -0
  104. package/build/Components/TypeSelector/icons/index.js +28 -0
  105. package/build/Components/TypeSelector/icons/index.js.map +1 -0
  106. package/build/Components/Utils.d.ts +1 -1
  107. package/build/Components/Utils.js +2 -2
  108. package/build/Components/Utils.js.map +1 -1
  109. package/build/Dialogs/TextInput.d.ts +1 -1
  110. package/build/i18n/de.json +1 -0
  111. package/build/i18n/en.json +1 -0
  112. package/build/i18n/es.json +1 -0
  113. package/build/i18n/fr.json +1 -0
  114. package/build/i18n/it.json +1 -0
  115. package/build/i18n/nl.json +1 -0
  116. package/build/i18n/pl.json +1 -0
  117. package/build/i18n/pt.json +1 -0
  118. package/build/i18n/ru.json +1 -0
  119. package/build/i18n/uk.json +1 -0
  120. package/build/i18n/zh-cn.json +1 -0
  121. package/build/icons/IconAdapter.d.ts +2 -2
  122. package/build/icons/IconAdapter.js +4 -2
  123. package/build/icons/IconAdapter.js.map +1 -1
  124. package/build/icons/IconAlias.d.ts +2 -2
  125. package/build/icons/IconAlias.js +4 -2
  126. package/build/icons/IconAlias.js.map +1 -1
  127. package/build/icons/IconButtonImage.d.ts +2 -2
  128. package/build/icons/IconButtonImage.js +6 -4
  129. package/build/icons/IconButtonImage.js.map +1 -1
  130. package/build/icons/IconChannel.d.ts +2 -2
  131. package/build/icons/IconChannel.js +8 -6
  132. package/build/icons/IconChannel.js.map +1 -1
  133. package/build/icons/IconClearFilter.d.ts +2 -2
  134. package/build/icons/IconClearFilter.js +4 -2
  135. package/build/icons/IconClearFilter.js.map +1 -1
  136. package/build/icons/IconClosed.d.ts +2 -2
  137. package/build/icons/IconClosed.js +4 -2
  138. package/build/icons/IconClosed.js.map +1 -1
  139. package/build/icons/IconCopy.d.ts +2 -2
  140. package/build/icons/IconCopy.js +4 -2
  141. package/build/icons/IconCopy.js.map +1 -1
  142. package/build/icons/IconDevice.d.ts +2 -2
  143. package/build/icons/IconDevice.js +14 -12
  144. package/build/icons/IconDevice.js.map +1 -1
  145. package/build/icons/IconDocument.d.ts +2 -2
  146. package/build/icons/IconDocument.js +4 -2
  147. package/build/icons/IconDocument.js.map +1 -1
  148. package/build/icons/IconDocumentReadOnly.d.ts +2 -2
  149. package/build/icons/IconDocumentReadOnly.js +5 -3
  150. package/build/icons/IconDocumentReadOnly.js.map +1 -1
  151. package/build/icons/IconExpert.d.ts +2 -2
  152. package/build/icons/IconExpert.js +5 -3
  153. package/build/icons/IconExpert.js.map +1 -1
  154. package/build/icons/IconFx.d.ts +2 -2
  155. package/build/icons/IconFx.js +4 -2
  156. package/build/icons/IconFx.js.map +1 -1
  157. package/build/icons/IconInstance.d.ts +2 -2
  158. package/build/icons/IconInstance.js +4 -2
  159. package/build/icons/IconInstance.js.map +1 -1
  160. package/build/icons/IconLogout.d.ts +2 -2
  161. package/build/icons/IconLogout.js +5 -3
  162. package/build/icons/IconLogout.js.map +1 -1
  163. package/build/icons/IconNoIcon.d.ts +2 -2
  164. package/build/icons/IconNoIcon.js +4 -2
  165. package/build/icons/IconNoIcon.js.map +1 -1
  166. package/build/icons/IconOpen.d.ts +2 -2
  167. package/build/icons/IconOpen.js +4 -2
  168. package/build/icons/IconOpen.js.map +1 -1
  169. package/build/icons/IconState.d.ts +2 -2
  170. package/build/icons/IconState.js +5 -3
  171. package/build/icons/IconState.js.map +1 -1
  172. package/build/icons/IconVacuum.d.ts +2 -2
  173. package/build/icons/IconVacuum.js +10 -8
  174. package/build/icons/IconVacuum.js.map +1 -1
  175. package/build/index.d.ts +5 -2
  176. package/build/index.js +3 -1
  177. package/build/index.js.map +1 -1
  178. package/i18n/de.json +1 -0
  179. package/i18n/en.json +1 -0
  180. package/i18n/es.json +1 -0
  181. package/i18n/fr.json +1 -0
  182. package/i18n/it.json +1 -0
  183. package/i18n/nl.json +1 -0
  184. package/i18n/pl.json +1 -0
  185. package/i18n/pt.json +1 -0
  186. package/i18n/ru.json +1 -0
  187. package/i18n/uk.json +1 -0
  188. package/i18n/zh-cn.json +1 -0
  189. package/package.json +11 -9
  190. package/build/Components/IconDeviceType.d.ts +0 -8
  191. package/build/Components/IconDeviceType.js +0 -212
  192. package/build/Components/IconDeviceType.js.map +0 -1
  193. package/build/icons/IconProps.d.ts +0 -15
  194. package/build/icons/IconProps.js +0 -2
  195. package/build/icons/IconProps.js.map +0 -1
package/i18n/pl.json CHANGED
@@ -316,6 +316,7 @@
316
316
  "ra_tooltip_ack": "Potwierdzon",
317
317
  "ra_tooltip_comment": "Komentarz",
318
318
  "ra_tooltip_copyState": "Skopiuj wartość stanu",
319
+ "ra_tooltip_ctrlForLink": "Przytrzymaj klawisz CTRL/⌘, aby otworzyć link",
319
320
  "ra_tooltip_customConfig": "Własne ustawienia",
320
321
  "ra_tooltip_deleteObject": "Usuń obiekt",
321
322
  "ra_tooltip_editObject": "Edytuj obiekt",
package/i18n/pt.json CHANGED
@@ -316,6 +316,7 @@
316
316
  "ra_tooltip_ack": "Confirmado",
317
317
  "ra_tooltip_comment": "Comente",
318
318
  "ra_tooltip_copyState": "Copie o valor do estado",
319
+ "ra_tooltip_ctrlForLink": "Segure a tecla Ctrl/⌘ para abrir o link",
319
320
  "ra_tooltip_customConfig": "Opções customizadas",
320
321
  "ra_tooltip_deleteObject": "Excluir objeto",
321
322
  "ra_tooltip_editObject": "Editar objeto",
package/i18n/ru.json CHANGED
@@ -316,6 +316,7 @@
316
316
  "ra_tooltip_ack": "Подтверждено",
317
317
  "ra_tooltip_comment": "Комментарий",
318
318
  "ra_tooltip_copyState": "Скопируйте значение состояния",
319
+ "ra_tooltip_ctrlForLink": "Удерживайте клавишу Cltr/⌘, чтобы открыть ссылку",
319
320
  "ra_tooltip_customConfig": "Пользовательские настройки",
320
321
  "ra_tooltip_deleteObject": "Удалить объект",
321
322
  "ra_tooltip_editObject": "Редактировать объект",
package/i18n/uk.json CHANGED
@@ -316,6 +316,7 @@
316
316
  "ra_tooltip_ack": "Визнано",
317
317
  "ra_tooltip_comment": "коментар",
318
318
  "ra_tooltip_copyState": "Скопіюйте значення стану",
319
+ "ra_tooltip_ctrlForLink": "Утримуйте клавішу Cltr/⌘, щоб відкрити посилання",
319
320
  "ra_tooltip_customConfig": "Спеціальні налаштування",
320
321
  "ra_tooltip_deleteObject": "Видалити об'єкт",
321
322
  "ra_tooltip_editObject": "Редагувати об'єкт",
package/i18n/zh-cn.json CHANGED
@@ -316,6 +316,7 @@
316
316
  "ra_tooltip_ack": "致谢国旗",
317
317
  "ra_tooltip_comment": "评论",
318
318
  "ra_tooltip_copyState": "复制状态值",
319
+ "ra_tooltip_ctrlForLink": "按住 Cltr/⌘ 键打开链接",
319
320
  "ra_tooltip_customConfig": "自定义设置",
320
321
  "ra_tooltip_deleteObject": "删除物件",
321
322
  "ra_tooltip_editObject": "编辑物件",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iobroker/adapter-react-v5",
3
- "version": "7.6.7",
3
+ "version": "7.6.9",
4
4
  "description": "React components to develop ioBroker interfaces with react.",
5
5
  "author": {
6
6
  "name": "bluefox",
@@ -55,29 +55,31 @@
55
55
  "dependencies": {
56
56
  "@emotion/react": "^11.14.0",
57
57
  "@emotion/styled": "^11.14.0",
58
- "@iobroker/js-controller-common": "^7.0.6",
59
- "@iobroker/js-controller-common-db": "^7.0.6",
58
+ "@iobroker/js-controller-common": "^7.0.7",
59
+ "@iobroker/js-controller-common-db": "^7.0.7",
60
60
  "@iobroker/socket-client": "4.1.2",
61
- "@iobroker/types": "^7.0.6",
61
+ "@iobroker/type-detector": "^4.3.0",
62
+ "@iobroker/types": "^7.0.7",
62
63
  "@mui/icons-material": "^6.4.10",
63
64
  "@mui/material": "^6.4.10",
64
- "@sentry/browser": "^9.11.0",
65
- "cronstrue": "^2.58.0",
65
+ "@sentry/browser": "^9.13.0",
66
+ "cronstrue": "^2.59.0",
66
67
  "file-selector": "^2.1.2",
67
68
  "react-color": "^2.19.3",
68
69
  "react-colorful": "^5.6.1",
69
70
  "react-cropper": "^2.3.3",
70
71
  "react-dropzone": "^14.3.8",
72
+ "react-icons": "^5.4.0",
71
73
  "react-inlinesvg": "^4.2.0"
72
74
  },
73
75
  "devDependencies": {
74
76
  "@iobroker/eslint-config": "^2.0.1",
75
- "@types/node": "^22.13.17",
77
+ "@types/node": "^22.14.1",
76
78
  "@types/react": "^18.3.20",
77
79
  "@types/react-color": "^3.0.13",
78
80
  "ajv": "^8.17.1",
79
81
  "ts-node": "^10.9.2",
80
- "typescript": "~5.8.2"
82
+ "typescript": "~5.8.3"
81
83
  },
82
- "gitHead": "8493d8cbea62f0b2628a9d5b5d5337c3cf966409"
84
+ "gitHead": "079c1138e1da29986ad7c74baa6944cbc87f6bfc"
83
85
  }
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { type IconProps } from './Icon';
3
- declare const deviceTypes: readonly ["unknown", "airCondition", "blind", "blindButtons", "button", "buttonSensor", "camera", "chart", "cie", "ct", "dimmer", "door", "fireAlarm", "floodAlarm", "gate", "hue", "humidity", "illuminance", "image", "info", "instance", "invalid", "light", "location", "lock", "media", "motion", "rgb", "rgbSingle", "rgbwSingle", "slider", "socket", "temperature", "thermostat", "vacuumCleaner", "volume", "volumeGroup", "warning", "weatherCurrent", "weatherForecast", "window", "windowTilt", "hub3", "node", "controller", "hub5"];
4
- export type DeviceType = (typeof deviceTypes)[number];
5
- export declare function isDeviceIcon(icon: string): DeviceType | null;
6
- export declare function getDeviceIcon(type: DeviceType, props?: IconProps): React.JSX.Element | null;
7
- export declare function IconDeviceType(props: IconProps): React.JSX.Element | null;
8
- export {};
@@ -1,212 +0,0 @@
1
- import React from 'react';
2
- import { AcUnit, Air, Blinds, BlindsClosed, ColorLens, ControlCamera, DeviceHub, DirectionsRun, DoorSliding, Gradient, Hub, Image, Info, Lightbulb, LocationOn, Lock, Palette, PlayArrowRounded, Polyline, Power, QuestionMark, SensorDoor, Thermostat, Timeline, TipsAndUpdates, Tune, Videocam, VolumeUp, Warning, Water, WaterDrop, WbIridescent, WbSunny, Whatshot, Window, } from '@mui/icons-material';
3
- import { Icon } from './Icon';
4
- import { Utils } from './Utils';
5
- import { IconButtonImage } from '../icons/IconButtonImage';
6
- import { IconVacuum } from '../icons/IconVacuum';
7
- import { IconInstance } from '../icons/IconInstance';
8
- // Taken from type detector: https://github.com/ioBroker/ioBroker.type-detector/blob/master/src/types.ts#L27
9
- const deviceTypes = [
10
- 'unknown',
11
- 'airCondition',
12
- 'blind',
13
- 'blindButtons',
14
- 'button',
15
- 'buttonSensor',
16
- 'camera',
17
- 'chart',
18
- 'cie',
19
- 'ct',
20
- 'dimmer',
21
- 'door',
22
- 'fireAlarm',
23
- 'floodAlarm',
24
- 'gate',
25
- 'hue',
26
- 'humidity',
27
- 'illuminance',
28
- 'image',
29
- 'info',
30
- 'instance',
31
- 'invalid',
32
- 'light',
33
- 'location',
34
- 'lock',
35
- 'media',
36
- 'motion',
37
- 'rgb',
38
- 'rgbSingle',
39
- 'rgbwSingle',
40
- 'slider',
41
- 'socket',
42
- 'temperature',
43
- 'thermostat',
44
- 'vacuumCleaner',
45
- 'volume',
46
- 'volumeGroup',
47
- 'warning',
48
- 'weatherCurrent',
49
- 'weatherForecast',
50
- 'window',
51
- 'windowTilt',
52
- 'hub3',
53
- 'node',
54
- 'controller',
55
- 'hub5',
56
- ];
57
- export function isDeviceIcon(icon) {
58
- if (deviceTypes.includes(icon)) {
59
- return icon;
60
- }
61
- return null;
62
- }
63
- export function getDeviceIcon(type, props) {
64
- let SvgComponent;
65
- if (type === 'hub3') {
66
- SvgComponent = DeviceHub;
67
- }
68
- if (type === 'node') {
69
- SvgComponent = Polyline;
70
- }
71
- if (type === 'hub5') {
72
- SvgComponent = Hub;
73
- }
74
- if (type === 'controller') {
75
- SvgComponent = ControlCamera;
76
- }
77
- if (type === 'airCondition') {
78
- SvgComponent = AcUnit;
79
- }
80
- if (type === 'blind') {
81
- SvgComponent = Blinds;
82
- }
83
- if (type === 'camera') {
84
- SvgComponent = Videocam;
85
- }
86
- if (type === 'chart') {
87
- SvgComponent = Timeline;
88
- }
89
- if (type === 'ct') {
90
- SvgComponent = Gradient;
91
- }
92
- if (type === 'dimmer') {
93
- SvgComponent = TipsAndUpdates;
94
- }
95
- if (type === 'door') {
96
- SvgComponent = SensorDoor;
97
- }
98
- if (type === 'fireAlarm') {
99
- SvgComponent = Whatshot;
100
- }
101
- if (type === 'floodAlarm') {
102
- SvgComponent = Water;
103
- }
104
- if (type === 'humidity') {
105
- SvgComponent = WaterDrop;
106
- }
107
- if (type === 'illuminance') {
108
- SvgComponent = WbIridescent;
109
- }
110
- if (type === 'image') {
111
- SvgComponent = Image;
112
- }
113
- if (type === 'light') {
114
- SvgComponent = Lightbulb;
115
- }
116
- if (type === 'lock') {
117
- SvgComponent = Lock;
118
- }
119
- if (type === 'location') {
120
- SvgComponent = LocationOn;
121
- }
122
- if (type === 'media') {
123
- SvgComponent = PlayArrowRounded;
124
- }
125
- if (type === 'motion') {
126
- SvgComponent = DirectionsRun;
127
- }
128
- if (type === 'rgb') {
129
- SvgComponent = Palette;
130
- }
131
- if (type === 'rgbSingle') {
132
- SvgComponent = Palette;
133
- }
134
- if (type === 'rgbwSingle') {
135
- SvgComponent = Palette;
136
- }
137
- if (type === 'slider') {
138
- SvgComponent = Tune;
139
- }
140
- if (type === 'socket') {
141
- SvgComponent = Power;
142
- }
143
- if (type === 'temperature') {
144
- SvgComponent = Thermostat;
145
- }
146
- if (type === 'thermostat') {
147
- SvgComponent = Thermostat;
148
- }
149
- if (type === 'volume') {
150
- SvgComponent = VolumeUp;
151
- }
152
- if (type === 'volumeGroup') {
153
- SvgComponent = VolumeUp;
154
- }
155
- if (type === 'weatherCurrent') {
156
- SvgComponent = Air;
157
- }
158
- if (type === 'weatherForecast') {
159
- SvgComponent = WbSunny;
160
- }
161
- if (type === 'window') {
162
- SvgComponent = Window;
163
- }
164
- if (type === 'windowTilt') {
165
- SvgComponent = Window;
166
- }
167
- if (type === 'blindButtons') {
168
- SvgComponent = BlindsClosed;
169
- }
170
- if (type === 'button') {
171
- SvgComponent = IconButtonImage;
172
- }
173
- if (type === 'buttonSensor') {
174
- SvgComponent = IconButtonImage;
175
- }
176
- if (type === 'cie') {
177
- SvgComponent = ColorLens;
178
- }
179
- if (type === 'gate') {
180
- SvgComponent = DoorSliding;
181
- }
182
- if (type === 'hue') {
183
- SvgComponent = ColorLens;
184
- }
185
- if (type === 'info') {
186
- SvgComponent = Info;
187
- }
188
- if (type === 'instance') {
189
- SvgComponent = IconInstance;
190
- }
191
- if (type === 'unknown') {
192
- SvgComponent = QuestionMark;
193
- }
194
- if (type === 'vacuumCleaner') {
195
- SvgComponent = IconVacuum;
196
- }
197
- if (type === 'warning' || type === 'invalid') {
198
- SvgComponent = Warning;
199
- }
200
- if (SvgComponent) {
201
- return (React.createElement(SvgComponent, { style: props?.style || undefined, className: Utils.clsx(props?.className, 'iconOwn') }));
202
- }
203
- return null;
204
- }
205
- export function IconDeviceType(props) {
206
- const icon = getDeviceIcon(props.src, props);
207
- if (icon) {
208
- return icon;
209
- }
210
- return React.createElement(Icon, { ...props });
211
- }
212
- //# sourceMappingURL=IconDeviceType.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IconDeviceType.js","sourceRoot":"./src/","sources":["Components/IconDeviceType.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACH,MAAM,EACN,GAAG,EACH,MAAM,EACN,YAAY,EACZ,SAAS,EACT,aAAa,EACb,SAAS,EACT,aAAa,EACb,WAAW,EACX,QAAQ,EACR,GAAG,EACH,KAAK,EACL,IAAI,EACJ,SAAS,EACT,UAAU,EACV,IAAI,EACJ,OAAO,EACP,gBAAgB,EAChB,QAAQ,EACR,KAAK,EACL,YAAY,EACZ,UAAU,EAEV,UAAU,EACV,QAAQ,EACR,cAAc,EACd,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,KAAK,EACL,SAAS,EACT,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,MAAM,GACT,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAkB,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,4GAA4G;AAC5G,MAAM,WAAW,GAAG;IAChB,SAAS;IACT,cAAc;IACd,OAAO;IACP,cAAc;IACd,QAAQ;IACR,cAAc;IACd,QAAQ;IACR,OAAO;IACP,KAAK;IACL,IAAI;IACJ,QAAQ;IACR,MAAM;IACN,WAAW;IACX,YAAY;IACZ,MAAM;IACN,KAAK;IACL,UAAU;IACV,aAAa;IACb,OAAO;IACP,MAAM;IACN,UAAU;IACV,SAAS;IACT,OAAO;IACP,UAAU;IACV,MAAM;IACN,OAAO;IACP,QAAQ;IACR,KAAK;IACL,WAAW;IACX,YAAY;IACZ,QAAQ;IACR,QAAQ;IACR,aAAa;IACb,YAAY;IACZ,eAAe;IACf,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AI,IAAI,KAAK,KAAK,EAAE,CAAC;QACjB,YAAY,GAAG,SAAS,CAAC;IAC7B,CAAC;IACD,IAAI,IAAI,KAAK,MAAM,EAAE,CAAC;QAClB,YAAY,GAAG,IAAI,CAAC;IACxB,CAAC;IACD,IAAI,IAAI,KAAK,UAAU,EAAE,CAAC;QACtB,YAAY,GAAG,YAAgC,CAAC;IACpD,CAAC;IACD,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACrB,YAAY,GAAG,YAAY,CAAC;IAChC,CAAC;IACD,IAAI,IAAI,KAAK,eAAe,EAAE,CAAC;QAC3B,YAAY,GAAG,UAA8B,CAAC;IAClD,CAAC;IACD,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QAC3C,YAAY,GAAG,OAAO,CAAC;IAC3B,CAAC;IAED,IAAI,YAAY,EAAE,CAAC;QACf,OAAO,CACH,oBAAC,YAAY,IACT,KAAK,EAAE,KAAK,EAAE,KAAK,IAAI,SAAS,EAChC,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,SAAS,EAAE,SAAS,CAAC,GACpD,CACL,CAAC;IACN,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,KAAgB;IAC3C,MAAM,IAAI,GAAG,aAAa,CAAC,KAAK,CAAC,GAAiB,EAAE,KAAK,CAAC,CAAC;IAC3D,IAAI,IAAI,EAAE,CAAC;QACP,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,oBAAC,IAAI,OAAK,KAAK,GAAI,CAAC;AAC/B,CAAC","sourcesContent":["import React from 'react';\nimport {\n AcUnit,\n Air,\n Blinds,\n BlindsClosed,\n ColorLens,\n ControlCamera,\n DeviceHub,\n DirectionsRun,\n DoorSliding,\n Gradient,\n Hub,\n Image,\n Info,\n Lightbulb,\n LocationOn,\n Lock,\n Palette,\n PlayArrowRounded,\n Polyline,\n Power,\n QuestionMark,\n SensorDoor,\n type SvgIconComponent,\n Thermostat,\n Timeline,\n TipsAndUpdates,\n Tune,\n Videocam,\n VolumeUp,\n Warning,\n Water,\n WaterDrop,\n WbIridescent,\n WbSunny,\n Whatshot,\n Window,\n} from '@mui/icons-material';\nimport { Icon, type IconProps } from './Icon';\nimport { Utils } from './Utils';\nimport { IconButtonImage } from '../icons/IconButtonImage';\nimport { IconVacuum } from '../icons/IconVacuum';\nimport { IconInstance } from '../icons/IconInstance';\n\n// Taken from type detector: https://github.com/ioBroker/ioBroker.type-detector/blob/master/src/types.ts#L27\nconst deviceTypes = [\n 'unknown',\n 'airCondition',\n 'blind',\n 'blindButtons',\n 'button',\n 'buttonSensor',\n 'camera',\n 'chart',\n 'cie',\n 'ct',\n 'dimmer',\n 'door',\n 'fireAlarm',\n 'floodAlarm',\n 'gate',\n 'hue',\n 'humidity',\n 'illuminance',\n 'image',\n 'info',\n 'instance',\n 'invalid',\n 'light',\n 'location',\n 'lock',\n 'media',\n 'motion',\n 'rgb',\n 'rgbSingle',\n 'rgbwSingle',\n 'slider',\n 'socket',\n 'temperature',\n 'thermostat',\n 'vacuumCleaner',\n 'volume',\n 'volumeGroup',\n 'warning',\n 'weatherCurrent',\n 'weatherForecast',\n 'window',\n 'windowTilt',\n 'hub3',\n 'node',\n 'controller',\n 'hub5',\n] as const;\n\nexport type DeviceType = (typeof deviceTypes)[number];\n\nexport function isDeviceIcon(icon: string): DeviceType | null {\n if (deviceTypes.includes(icon as DeviceType)) {\n return icon as DeviceType;\n }\n return null;\n}\n\nexport function getDeviceIcon(type: DeviceType, props?: IconProps): React.JSX.Element | null {\n let SvgComponent: SvgIconComponent | undefined;\n if (type === 'hub3') {\n SvgComponent = DeviceHub;\n }\n if (type === 'node') {\n SvgComponent = Polyline;\n }\n if (type === 'hub5') {\n SvgComponent = Hub;\n }\n if (type === 'controller') {\n SvgComponent = ControlCamera;\n }\n if (type === 'airCondition') {\n SvgComponent = AcUnit;\n }\n if (type === 'blind') {\n SvgComponent = Blinds;\n }\n if (type === 'camera') {\n SvgComponent = Videocam;\n }\n if (type === 'chart') {\n SvgComponent = Timeline;\n }\n if (type === 'ct') {\n SvgComponent = Gradient;\n }\n if (type === 'dimmer') {\n SvgComponent = TipsAndUpdates;\n }\n if (type === 'door') {\n SvgComponent = SensorDoor;\n }\n if (type === 'fireAlarm') {\n SvgComponent = Whatshot;\n }\n if (type === 'floodAlarm') {\n SvgComponent = Water;\n }\n if (type === 'humidity') {\n SvgComponent = WaterDrop;\n }\n if (type === 'illuminance') {\n SvgComponent = WbIridescent;\n }\n if (type === 'image') {\n SvgComponent = Image;\n }\n if (type === 'light') {\n SvgComponent = Lightbulb;\n }\n if (type === 'lock') {\n SvgComponent = Lock;\n }\n if (type === 'location') {\n SvgComponent = LocationOn;\n }\n if (type === 'media') {\n SvgComponent = PlayArrowRounded;\n }\n if (type === 'motion') {\n SvgComponent = DirectionsRun;\n }\n if (type === 'rgb') {\n SvgComponent = Palette;\n }\n if (type === 'rgbSingle') {\n SvgComponent = Palette;\n }\n if (type === 'rgbwSingle') {\n SvgComponent = Palette;\n }\n if (type === 'slider') {\n SvgComponent = Tune;\n }\n if (type === 'socket') {\n SvgComponent = Power;\n }\n if (type === 'temperature') {\n SvgComponent = Thermostat;\n }\n if (type === 'thermostat') {\n SvgComponent = Thermostat;\n }\n if (type === 'volume') {\n SvgComponent = VolumeUp;\n }\n if (type === 'volumeGroup') {\n SvgComponent = VolumeUp;\n }\n if (type === 'weatherCurrent') {\n SvgComponent = Air;\n }\n if (type === 'weatherForecast') {\n SvgComponent = WbSunny;\n }\n if (type === 'window') {\n SvgComponent = Window;\n }\n if (type === 'windowTilt') {\n SvgComponent = Window;\n }\n if (type === 'blindButtons') {\n SvgComponent = BlindsClosed;\n }\n if (type === 'button') {\n SvgComponent = IconButtonImage as SvgIconComponent;\n }\n if (type === 'buttonSensor') {\n SvgComponent = IconButtonImage as SvgIconComponent;\n }\n if (type === 'cie') {\n SvgComponent = ColorLens;\n }\n if (type === 'gate') {\n SvgComponent = DoorSliding;\n }\n if (type === 'hue') {\n SvgComponent = ColorLens;\n }\n if (type === 'info') {\n SvgComponent = Info;\n }\n if (type === 'instance') {\n SvgComponent = IconInstance as SvgIconComponent;\n }\n if (type === 'unknown') {\n SvgComponent = QuestionMark;\n }\n if (type === 'vacuumCleaner') {\n SvgComponent = IconVacuum as SvgIconComponent;\n }\n if (type === 'warning' || type === 'invalid') {\n SvgComponent = Warning;\n }\n\n if (SvgComponent) {\n return (\n <SvgComponent\n style={props?.style || undefined}\n className={Utils.clsx(props?.className, 'iconOwn')}\n />\n );\n }\n return null;\n}\n\nexport function IconDeviceType(props: IconProps): React.JSX.Element | null {\n const icon = getDeviceIcon(props.src as DeviceType, props);\n if (icon) {\n return icon;\n }\n\n return <Icon {...props} />;\n}\n"]}
@@ -1,15 +0,0 @@
1
- import type { CSSProperties, MouseEvent } from 'react';
2
- export interface IconProps {
3
- /** The width in pixels or percentage of the icon. */
4
- width?: number | string;
5
- /** The height in pixels or percentage of the icon. */
6
- height?: number | string;
7
- /** Click handler. */
8
- onClick?: (e: MouseEvent) => void;
9
- /** The class name for the SVG element. */
10
- className?: string;
11
- /** Styles for the SVG element. */
12
- style?: CSSProperties;
13
- /** The font size of the icon. */
14
- fontSize?: 'small';
15
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=IconProps.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IconProps.js","sourceRoot":"./src/","sources":["icons/IconProps.tsx"],"names":[],"mappings":"","sourcesContent":["import type { CSSProperties, MouseEvent } from 'react';\n\nexport interface IconProps {\n /** The width in pixels or percentage of the icon. */\n width?: number | string;\n /** The height in pixels or percentage of the icon. */\n height?: number | string;\n /** Click handler. */\n onClick?: (e: MouseEvent) => void;\n /** The class name for the SVG element. */\n className?: string;\n /** Styles for the SVG element. */\n style?: CSSProperties;\n /** The font size of the icon. */\n fontSize?: 'small';\n}\n"]}