@iobroker/adapter-react-v5 7.0.1 → 7.1.0

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 (314) hide show
  1. package/Components/404.d.ts +3 -2
  2. package/Components/404.js +16 -15
  3. package/Components/ColorPicker.d.ts +22 -8
  4. package/Components/ColorPicker.js +34 -17
  5. package/Components/ComplexCron.js +24 -24
  6. package/Components/CopyToClipboard.d.ts +10 -1
  7. package/Components/CopyToClipboard.js +17 -8
  8. package/Components/CustomModal.d.ts +1 -1
  9. package/Components/CustomModal.js +8 -8
  10. package/Components/FileBrowser.d.ts +11 -11
  11. package/Components/FileBrowser.js +173 -164
  12. package/Components/FileViewer.js +34 -23
  13. package/Components/Icon.d.ts +16 -2
  14. package/Components/Icon.js +19 -8
  15. package/Components/IconPicker.js +10 -14
  16. package/Components/IconSelector.d.ts +1 -1
  17. package/Components/IconSelector.js +64 -74
  18. package/Components/Image.d.ts +8 -4
  19. package/Components/Image.js +13 -32
  20. package/Components/Loader.d.ts +2 -2
  21. package/Components/Loader.js +244 -241
  22. package/Components/Loaders/MV.d.ts +6 -1
  23. package/Components/Loaders/MV.js +23 -7
  24. package/Components/Loaders/PT.d.ts +7 -2
  25. package/Components/Loaders/PT.js +123 -110
  26. package/Components/Loaders/Vendor.d.ts +2 -2
  27. package/Components/Loaders/Vendor.js +22 -14
  28. package/Components/Logo.js +16 -18
  29. package/Components/MDUtils.d.ts +1 -1
  30. package/Components/MDUtils.js +8 -4
  31. package/Components/ObjectBrowser.d.ts +49 -38
  32. package/Components/ObjectBrowser.js +757 -494
  33. package/Components/Router.d.ts +1 -3
  34. package/Components/Router.js +3 -1
  35. package/Components/SaveCloseButtons.d.ts +3 -3
  36. package/Components/SaveCloseButtons.js +3 -3
  37. package/Components/Schedule.d.ts +15 -15
  38. package/Components/Schedule.js +177 -154
  39. package/Components/SelectWithIcon.d.ts +2 -2
  40. package/Components/SelectWithIcon.js +45 -34
  41. package/Components/SimpleCron/index.js +83 -43
  42. package/Components/TabContainer.js +2 -2
  43. package/Components/TabContent.js +1 -1
  44. package/Components/TabHeader.js +1 -1
  45. package/Components/TableResize.d.ts +2 -2
  46. package/Components/TableResize.js +5 -5
  47. package/Components/TextWithIcon.d.ts +1 -1
  48. package/Components/TextWithIcon.js +10 -8
  49. package/Components/ToggleThemeMenu.d.ts +2 -2
  50. package/Components/ToggleThemeMenu.js +3 -3
  51. package/Components/TreeTable.d.ts +18 -18
  52. package/Components/TreeTable.js +76 -72
  53. package/Components/UploadImage.d.ts +2 -2
  54. package/Components/UploadImage.js +330 -326
  55. package/Components/Utils.d.ts +42 -22
  56. package/Components/Utils.js +66 -65
  57. package/Components/withWidth.d.ts +2 -2
  58. package/Components/withWidth.js +10 -6
  59. package/Dialogs/ComplexCron.d.ts +2 -2
  60. package/Dialogs/ComplexCron.js +3 -3
  61. package/Dialogs/Confirm.d.ts +4 -4
  62. package/Dialogs/Confirm.js +18 -8
  63. package/Dialogs/Cron.d.ts +3 -3
  64. package/Dialogs/Cron.js +21 -17
  65. package/Dialogs/Error.d.ts +3 -3
  66. package/Dialogs/Error.js +6 -4
  67. package/Dialogs/Message.d.ts +3 -3
  68. package/Dialogs/Message.js +6 -4
  69. package/Dialogs/SelectFile.d.ts +4 -4
  70. package/Dialogs/SelectFile.js +6 -4
  71. package/Dialogs/SelectID.d.ts +12 -10
  72. package/Dialogs/SelectID.js +12 -8
  73. package/Dialogs/SimpleCron.d.ts +2 -2
  74. package/Dialogs/SimpleCron.js +2 -2
  75. package/Dialogs/TextInput.d.ts +2 -2
  76. package/Dialogs/TextInput.js +3 -3
  77. package/GenericApp.d.ts +19 -13
  78. package/GenericApp.js +177 -134
  79. package/LICENSE +22 -22
  80. package/LegacyConnection.d.ts +240 -248
  81. package/LegacyConnection.js +500 -525
  82. package/Prompt.js +7 -7
  83. package/README.md +1239 -1166
  84. package/Theme.d.ts +1 -1
  85. package/Theme.js +9 -12
  86. package/assets/devices.json +1 -0
  87. package/assets/lamp_ceiling.svg +8 -8
  88. package/assets/lamp_table.svg +7 -7
  89. package/assets/no_icon.svg +9 -9
  90. package/assets/rooms.json +1 -0
  91. package/craco-module-federation.js +62 -71
  92. package/i18n/de.json +434 -431
  93. package/i18n/en.json +434 -431
  94. package/i18n/es.json +434 -431
  95. package/i18n/fr.json +434 -431
  96. package/i18n/it.json +434 -431
  97. package/i18n/nl.json +434 -431
  98. package/i18n/pl.json +434 -431
  99. package/i18n/pt.json +434 -431
  100. package/i18n/ru.json +434 -431
  101. package/i18n/uk.json +434 -431
  102. package/i18n/zh-cn.json +434 -431
  103. package/i18n.d.ts +26 -19
  104. package/i18n.js +28 -22
  105. package/icons/IconAdapter.js +2 -2
  106. package/icons/IconAlias.js +2 -2
  107. package/icons/IconChannel.js +2 -2
  108. package/icons/IconClearFilter.js +2 -2
  109. package/icons/IconClosed.js +2 -2
  110. package/icons/IconCopy.js +2 -2
  111. package/icons/IconDevice.js +2 -2
  112. package/icons/IconDocument.js +2 -2
  113. package/icons/IconDocumentReadOnly.js +2 -2
  114. package/icons/IconExpert.js +2 -2
  115. package/icons/IconFx.js +2 -2
  116. package/icons/IconInstance.js +2 -2
  117. package/icons/IconLogout.js +2 -2
  118. package/icons/IconNoIcon.js +2 -2
  119. package/icons/IconOpen.d.ts +2 -2
  120. package/icons/IconOpen.js +2 -2
  121. package/icons/IconProps.d.ts +4 -3
  122. package/icons/IconState.d.ts +2 -2
  123. package/icons/IconState.js +2 -2
  124. package/index.css +56 -55
  125. package/modulefederation.admin.config.js +31 -31
  126. package/package.json +5 -5
  127. package/src/AdminConnection.tsx +3 -3
  128. package/src/Components/404.tsx +122 -121
  129. package/src/Components/ColorPicker.tsx +343 -315
  130. package/src/Components/ComplexCron.tsx +544 -507
  131. package/src/Components/CopyToClipboard.tsx +178 -165
  132. package/src/Components/CustomModal.tsx +170 -163
  133. package/src/Components/FileBrowser.tsx +2550 -2414
  134. package/src/Components/FileViewer.tsx +412 -393
  135. package/src/Components/Icon.tsx +238 -210
  136. package/src/Components/IconPicker.tsx +165 -149
  137. package/src/Components/IconSelector.tsx +2220 -2202
  138. package/src/Components/Image.tsx +193 -176
  139. package/src/Components/Loader.tsx +328 -304
  140. package/src/Components/Logo.tsx +176 -166
  141. package/src/Components/MDUtils.tsx +104 -100
  142. package/src/Components/ObjectBrowser.tsx +8935 -8032
  143. package/src/Components/Router.tsx +90 -90
  144. package/src/Components/SaveCloseButtons.tsx +117 -113
  145. package/src/Components/Schedule.tsx +1962 -1724
  146. package/src/Components/SelectWithIcon.tsx +239 -197
  147. package/src/Components/TabContainer.tsx +57 -55
  148. package/src/Components/TabContent.tsx +38 -37
  149. package/src/Components/TabHeader.tsx +20 -19
  150. package/src/Components/TableResize.tsx +274 -259
  151. package/src/Components/TextWithIcon.tsx +159 -148
  152. package/src/Components/ToggleThemeMenu.tsx +52 -34
  153. package/src/Components/TreeTable.tsx +1002 -919
  154. package/src/Components/UploadImage.tsx +631 -599
  155. package/src/Components/Utils.tsx +1802 -1794
  156. package/src/Components/loader.css +231 -222
  157. package/src/Components/withWidth.tsx +32 -21
  158. package/src/Connection.tsx +5 -7
  159. package/src/Dialogs/ComplexCron.tsx +123 -129
  160. package/src/Dialogs/Confirm.tsx +185 -162
  161. package/src/Dialogs/Cron.tsx +192 -182
  162. package/src/Dialogs/Error.tsx +67 -72
  163. package/src/Dialogs/Message.tsx +73 -71
  164. package/src/Dialogs/SelectFile.tsx +280 -270
  165. package/src/Dialogs/SelectID.tsx +310 -298
  166. package/src/Dialogs/SimpleCron.tsx +100 -100
  167. package/src/Dialogs/TextInput.tsx +99 -107
  168. package/src/GenericApp.tsx +1076 -976
  169. package/src/LegacyConnection.tsx +3719 -3589
  170. package/src/Prompt.tsx +22 -20
  171. package/src/Theme.tsx +472 -479
  172. package/src/icons/IconAdapter.tsx +22 -20
  173. package/src/icons/IconAlias.tsx +22 -20
  174. package/src/icons/IconChannel.tsx +60 -21
  175. package/src/icons/IconClearFilter.tsx +24 -22
  176. package/src/icons/IconClosed.tsx +22 -17
  177. package/src/icons/IconCopy.tsx +21 -16
  178. package/src/icons/IconDevice.tsx +126 -27
  179. package/src/icons/IconDocument.tsx +22 -17
  180. package/src/icons/IconDocumentReadOnly.tsx +27 -18
  181. package/src/icons/IconExpert.tsx +26 -18
  182. package/src/icons/IconFx.tsx +38 -36
  183. package/src/icons/IconInstance.tsx +22 -20
  184. package/src/icons/IconLogout.tsx +32 -30
  185. package/src/icons/IconNoIcon.tsx +21 -19
  186. package/src/icons/IconOpen.tsx +22 -17
  187. package/src/icons/IconProps.tsx +16 -15
  188. package/src/icons/IconState.tsx +38 -17
  189. package/src/index.css +56 -55
  190. package/tasks.js +91 -0
  191. package/types.d.ts +141 -134
  192. package/Components/Loaders/PT.css +0 -109
  193. package/Components/Loaders/Vendor.css +0 -13
  194. package/Components/loader.css +0 -222
  195. package/Components/types.d.ts +0 -82
  196. package/assets/devices/Alarm Systems.svg +0 -19
  197. package/assets/devices/Amplifier.svg +0 -22
  198. package/assets/devices/Awnings.svg +0 -5
  199. package/assets/devices/Battery Status.svg +0 -5
  200. package/assets/devices/Ceiling Spotlights.svg +0 -16
  201. package/assets/devices/Chandelier.svg +0 -7
  202. package/assets/devices/Climate.svg +0 -12
  203. package/assets/devices/Coffee Makers.svg +0 -6
  204. package/assets/devices/Cold Water.svg +0 -31
  205. package/assets/devices/Computer.svg +0 -21
  206. package/assets/devices/Consumption.svg +0 -8
  207. package/assets/devices/Curtains.svg +0 -43
  208. package/assets/devices/Dishwashers.svg +0 -12
  209. package/assets/devices/Doors.svg +0 -6
  210. package/assets/devices/Doorstep.svg +0 -35
  211. package/assets/devices/Dryer.svg +0 -14
  212. package/assets/devices/Fan.svg +0 -20
  213. package/assets/devices/Floor Lamps.svg +0 -5
  214. package/assets/devices/Garage Doors.svg +0 -9
  215. package/assets/devices/Gates.svg +0 -32
  216. package/assets/devices/Hairdryer.svg +0 -23
  217. package/assets/devices/Handle.svg +0 -6
  218. package/assets/devices/Hanging Lamps.svg +0 -9
  219. package/assets/devices/Heater.svg +0 -44
  220. package/assets/devices/Hoods.svg +0 -12
  221. package/assets/devices/Hot Water.svg +0 -10
  222. package/assets/devices/Humidity.svg +0 -41
  223. package/assets/devices/Iron.svg +0 -5
  224. package/assets/devices/Irrigation.svg +0 -23
  225. package/assets/devices/Led Strip.svg +0 -31
  226. package/assets/devices/Light.svg +0 -30
  227. package/assets/devices/Lightings.svg +0 -46
  228. package/assets/devices/Lock.svg +0 -19
  229. package/assets/devices/Louvre.svg +0 -7
  230. package/assets/devices/Mowing Machine.svg +0 -9
  231. package/assets/devices/Music.svg +0 -13
  232. package/assets/devices/Outdoor Blinds.svg +0 -7
  233. package/assets/devices/People.svg +0 -19
  234. package/assets/devices/Pool.svg +0 -8
  235. package/assets/devices/Power Consumption.svg +0 -13
  236. package/assets/devices/Printer.svg +0 -10
  237. package/assets/devices/Pump.svg +0 -10
  238. package/assets/devices/Receiver.svg +0 -19
  239. package/assets/devices/Sconces.svg +0 -10
  240. package/assets/devices/Security.svg +0 -34
  241. package/assets/devices/Shading.svg +0 -5
  242. package/assets/devices/Shutters.svg +0 -11
  243. package/assets/devices/SmokeDetector.svg +0 -13
  244. package/assets/devices/Sockets.svg +0 -13
  245. package/assets/devices/Speaker.svg +0 -35
  246. package/assets/devices/Stove.svg +0 -12
  247. package/assets/devices/Table Lamps.svg +0 -12
  248. package/assets/devices/Temperature Sensors.svg +0 -28
  249. package/assets/devices/Tv.svg +0 -8
  250. package/assets/devices/Vacuum Cleaner.svg +0 -16
  251. package/assets/devices/Ventilation.svg +0 -12
  252. package/assets/devices/Washing Machines.svg +0 -16
  253. package/assets/devices/Water Consumption.svg +0 -6
  254. package/assets/devices/Water Heater.svg +0 -8
  255. package/assets/devices/Water.svg +0 -40
  256. package/assets/devices/Weather.svg +0 -28
  257. package/assets/devices/Window.svg +0 -8
  258. package/assets/rooms/Anteroom.svg +0 -53
  259. package/assets/rooms/Attic.svg +0 -21
  260. package/assets/rooms/Balcony.svg +0 -13
  261. package/assets/rooms/Barn.svg +0 -6
  262. package/assets/rooms/Basement.svg +0 -5
  263. package/assets/rooms/Bathroom.svg +0 -38
  264. package/assets/rooms/Bedroom.svg +0 -5
  265. package/assets/rooms/Boiler Room.svg +0 -13
  266. package/assets/rooms/Carport.svg +0 -17
  267. package/assets/rooms/Cellar.svg +0 -89
  268. package/assets/rooms/Chamber.svg +0 -9
  269. package/assets/rooms/Corridor.svg +0 -53
  270. package/assets/rooms/Dining Area.svg +0 -37
  271. package/assets/rooms/Dining Room.svg +0 -37
  272. package/assets/rooms/Dining.svg +0 -37
  273. package/assets/rooms/Dressing Room.svg +0 -5
  274. package/assets/rooms/Driveway.svg +0 -15
  275. package/assets/rooms/Entrance.svg +0 -44
  276. package/assets/rooms/Equipment Room.svg +0 -15
  277. package/assets/rooms/Front Yard.svg +0 -64
  278. package/assets/rooms/Gallery.svg +0 -14
  279. package/assets/rooms/Garage.svg +0 -20
  280. package/assets/rooms/Garden.svg +0 -13
  281. package/assets/rooms/Ground Floor.svg +0 -95
  282. package/assets/rooms/Guest Bathroom.svg +0 -33
  283. package/assets/rooms/Guest Room.svg +0 -5
  284. package/assets/rooms/Gym.svg +0 -5
  285. package/assets/rooms/Hall.svg +0 -19
  286. package/assets/rooms/Home Theater.svg +0 -8
  287. package/assets/rooms/Kitchen.svg +0 -18
  288. package/assets/rooms/Laundry Room.svg +0 -12
  289. package/assets/rooms/Living Area.svg +0 -11
  290. package/assets/rooms/Living Room.svg +0 -10
  291. package/assets/rooms/Locker Room.svg +0 -17
  292. package/assets/rooms/Nursery.svg +0 -5
  293. package/assets/rooms/Office.svg +0 -8
  294. package/assets/rooms/Outdoors.svg +0 -7
  295. package/assets/rooms/Playroom.svg +0 -6
  296. package/assets/rooms/Pool.svg +0 -8
  297. package/assets/rooms/Rear Wall.svg +0 -30
  298. package/assets/rooms/Second Floor.svg +0 -95
  299. package/assets/rooms/Shed.svg +0 -16
  300. package/assets/rooms/Sleeping Area.svg +0 -22
  301. package/assets/rooms/Stairway.svg +0 -5
  302. package/assets/rooms/Stairwell.svg +0 -15
  303. package/assets/rooms/Storeroom.svg +0 -5
  304. package/assets/rooms/Summer House.svg +0 -27
  305. package/assets/rooms/Swimming Pool.svg +0 -21
  306. package/assets/rooms/Terrace.svg +0 -7
  307. package/assets/rooms/Toilet.svg +0 -10
  308. package/assets/rooms/Upstairs.svg +0 -6
  309. package/assets/rooms/Wardrobe.svg +0 -60
  310. package/assets/rooms/Washroom.svg +0 -20
  311. package/assets/rooms/Wc.svg +0 -10
  312. package/assets/rooms/Windscreen.svg +0 -60
  313. package/assets/rooms/Workshop.svg +0 -23
  314. package/assets/rooms/Workspace.svg +0 -8
package/README.md CHANGED
@@ -1,1330 +1,1403 @@
1
- # Help ReactJS classes for adapter config
2
- You can find demo on https://github.com/ioBroker/adapter-react-demo
3
-
4
- ## Getting started
5
- If you want to create the configuration page with ReactJS:
6
- 1. Create github repo for adapter.
7
- 2. execute `npx create-react-app src` . It will take a while.
8
- 3. `cd src`
9
- 4. Modify package.json file in src directory:
10
- - Change `name` from `src` to `ADAPTERNAME-admin` (Of course replace `ADAPTERNAME` with yours)
11
- - Add to devDependencies:
12
- ```
13
- "@iobroker/adapter-react": "^4.0.10",
14
- ```
15
- Versions can be higher.
16
- So your src/package.json should look like:
17
- ```
18
- {
19
- "name": "ADAPTERNAME-admin",
20
- "version": "0.1.0",
21
- "private": true,
22
- "dependencies": {
23
- "react": "^18.2.0",
24
- "react-dom": "^18.2.0",
25
- "react-icons": "^4.6.0",
26
- "react-scripts": "^5.0.1",
27
- "@iobroker/adapter-react-v5": "^3.2.7",
28
- "del": "^6.1.1",
29
- "gulp": "^4.0.2"
30
- },
31
- "scripts": {
32
- "start": "react-scripts start",
33
- "build": "react-scripts build",
34
- "test": "react-scripts test",
35
- "eject": "react-scripts eject"
36
- },
37
- "eslintConfig": {
38
- "extends": "react-app"
39
- },
40
- "homepage": ".",
41
- "browserslist": [
42
- ">0.2%",
43
- "not dead",
44
- "not ie <= 11",
45
- "not op_mini all"
46
- ]
47
- }
48
- ```
49
- 5. Call in `src`: `npm install`
50
- 6. Copy gulpfile.js into `src`: `cp node_modules/@iobroker/adapter-react/gulpfile.js gulpfile.js`
51
- 7. Start your dummy application `npm run start` for developing or build with `npm run build` and
52
- copy files in `build` directory to `www` or to `admin`. In the admin you must rename `index.html` to `index_m.html`.
53
- 8. You can do that with `gulp` tasks: `gulp build`, `gulp copy`, `gulp renameIndex` or `gulp renameTab`
54
-
55
- ## Development
56
- 1. Add `socket.io` to `public/index.html`.
57
- After
58
-
59
- ```
60
- <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
61
- ```
62
-
63
- insert
64
-
65
- ```
66
- <script>
67
- var script = document.createElement('script');
68
- window.registerSocketOnLoad = function (cb) {
69
- window.socketLoadedHandler = cb;
70
- };
71
- const parts = (window.location.search || '').replace(/^\?/, '').split('&');
72
- const query = {};
73
- parts.forEach(item => {
74
- const [name, val] = item.split('=');
75
- query[decodeURIComponent(name)] = val !== undefined ? decodeURIComponent(val) : true;
76
- });
77
- script.onload = function () { typeof window.socketLoadedHandler === 'function' && window.socketLoadedHandler(); };
78
- script.src = window.location.port === '3000' ? window.location.protocol + '//' + (query.host || window.location.hostname) + ':' + (query.port || 8081) + '/lib/js/socket.io.js' : '%PUBLIC_URL%/../../lib/js/socket.io.js';
79
-
80
- document.head.appendChild(script);
81
- </script>
82
- ```
83
-
84
- 3. Add to App.js constructor initialization for I18n:
85
- ```
86
- class App extends GenericApp {
87
- constructor(props) {
88
- const extendedProps = {...props};
89
- extendedProps.encryptedFields = ['pass']; // this parameter will be encrypted and decrypted automatically
90
- extendedProps.translations = {
91
- 'en': require('./i18n/en'),
92
- 'de': require('./i18n/de'),
93
- 'ru': require('./i18n/ru'),
94
- 'pt': require('./i18n/pt'),
95
- 'nl': require('./i18n/nl'),
96
- 'fr': require('./i18n/fr'),
97
- 'it': require('./i18n/it'),
98
- 'es': require('./i18n/es'),
99
- 'pl': require('./i18n/pl'),
100
- 'uk': require('./i18n/uk'),
101
- 'zh-cn': require('./i18n/zh-cn'),
102
- };
103
- // get actual admin port
104
- extendedProps.socket = {port: parseInt(window.location.port, 10)};
105
-
106
- // Only if close, save buttons are not required at the bottom (e.g. if admin tab)
107
- // extendedProps.bottomButtons = false;
108
-
109
- // only for debug purposes
110
- if (extendedProps.socket.port === 3000) {
111
- extendedProps.socket.port = 8081;
112
- }
113
-
114
- // allow to manage GenericApp the sentry initialisation or do not set the sentryDSN if no sentry available
115
- extendedProps.sentryDSN = 'https://yyy@sentry.iobroker.net/xx';
116
-
117
- super(extendedProps);
118
- }
119
- ...
120
- }
121
- ```
122
-
123
- 4. Replace `index.js` with the following code to support themes:
124
- ```
125
- import React from 'react';
126
- import ReactDOM from 'react-dom';
127
- import { MuiThemeProvider} from '@material-ui/core/styles';
128
- import * as serviceWorker from './serviceWorker';
129
-
130
- import './index.css';
131
- import App from './App';
132
- import { version } from '../package.json';
133
-
134
- import theme from '@iobroker/adapter-react/Theme';
135
-
136
- console.log('iobroker.scenes@' + version);
137
- let themeName = window.localStorage ? window.localStorage.getItem('App.theme') || 'light' : 'light';
138
-
139
- function build() {
140
- return ReactDOM.render(<MuiThemeProvider theme={ theme(themeName) }>
141
- <App onThemeChange={_theme => {
142
- themeName = _theme;
143
- build();
144
- }}/>
145
- </MuiThemeProvider>, document.getElementById('root'));
146
- }
147
-
148
- build();
149
-
150
- // If you want your app to work offline and load faster, you can change
151
- // unregister() to register() below. Note this comes with some pitfalls.
152
- // Learn more about service workers: http://bit.ly/CRA-PWA
153
- serviceWorker.unregister();
154
- ```
155
-
156
- 5. Add to App.js encoding and decoding of values:
157
- ```
158
- class App extend GenericApp {
159
- ...
160
- onPrepareLoad(settings) {
161
- settings.pass = this.decode(settings.pass);
162
- }
163
- onPrepareSave(settings) {
164
- settings.pass = this.encode(settings.pass);
165
- }
166
- }
167
- ```
168
-
169
- 6. The optional step is to validate the data to be saved:
170
- ```
171
- onPrepareSave(settings) {
172
- super.onPrepareSave(settings);
173
- if (DATA_INVALID) {
174
- return false; // configuration will not be saved
175
- } else {
176
- return true;
177
- }
178
- }
179
- ```
180
-
181
- ## Components
182
-
183
- ### Connection.tsx
184
- This is a non-react class to provide the communication for socket connection with the server.
185
-
186
- ### GenericApp.tsx
187
-
188
- ### i18n.ts
189
-
190
- ### Theme.tsx
191
-
192
- ### Dialogs
193
- Some dialogs are predefined and could be used out of the box.
194
-
195
- #### Confirm.tsx
196
- <!-- TODO: Provide screenshot here -->
197
-
198
- Usage:
199
- ```
200
- import React from 'react';
201
- import ConfirmDialog from '@iobroker/adapter-react/Dialogs/Confirm'
202
- import I18n from '@iobroker/adapter-react/i18n';
203
-
204
- class ExportImportDialog extends React.Component {
205
- constructor(props) {
206
- super(props);
207
-
208
- this.state = {
209
- confirmDialog: false,
210
- };
211
- }
212
-
213
- renderConfirmDialog() {
214
- if (!this.state.confirmDialog) {
215
- return null;
216
- }
217
- return <ConfirmDialog
218
- title={ I18n.t('Scene will be overwritten.') }
219
- text={ I18n.t('All data will be lost. Confirm?') }
220
- ok={ I18n.t('Yes') }
221
- cancel={ I18n.t('Cancel') }
222
- suppressQuestionMinutes={5}
223
- dialogName="myConfirmDialogThatCouldBeSuppressed"
224
- suppressText={I18n.t('Suppress question for next %s minutes', 5)}
225
- onClose={isYes => {
226
- this.setState({ confirmDialog: false} );
227
- }}
228
- />;
229
- }
230
- render() {
231
- return <div>
232
- <Button onClick={ () => this.setState({confirmDialog: true}) }>Click</Button>
233
- { this.renderConfirmDialog() }
234
- </div>
235
- }
236
- }
237
-
238
- export default ExportImportDialog;
239
- ```
240
-
241
- #### Error.tsx
242
- <!-- TODO: Provide screenshot here -->
243
-
244
- #### Message.tsx
245
- <!-- TODO: Provide screenshot here -->
246
- ```
247
- renderMessage() {
248
- if (this.state.showMessage) {
249
- return <Message
250
- text={this.state.showMessage}
251
- onClose={() => this.setState({showMessage: false})}
252
- />;
253
- } else {
254
- return null;
255
- }
256
- }
257
- ```
258
-
259
- #### SelectID.tsx
260
- ![Logo](img/selectID.png)
261
- ```
262
- import DialogSelectID from '@iobroker/adapter-react/Dialogs/SelectID';
263
-
264
- class MyComponent extends Component {
265
- constructor(props) {
266
- super(props);
267
- this.state = {
268
- showSelectId: false,
269
- };
270
- }
271
-
272
- renderSelectIdDialog() {
273
- if (this.state.showSelectId) {
274
- return <DialogSelectID
275
- key="tableSelect"
276
- imagePrefix="../.."
277
- dialogName={this.props.adapterName}
278
- themeType={this.props.themeType}
279
- socket={this.props.socket}
280
- statesOnly={true}
281
- selected={this.state.selectIdValue}
282
- onClose={() => this.setState({showSelectId: false})}
283
- onOk={(selected, name) => {
284
- this.setState({showSelectId: false, selectIdValue: selected});
285
- }}
286
- />;
287
- } else {
288
- return null;
289
- }
290
- }
291
- render() {
292
- return renderSelectIdDialog();
293
- }
294
- }
295
- ```
296
-
297
- #### Cron
298
- Include `"react-text-mask": "^5.4.3",` in package.json.
299
-
300
- <!-- TODO: Provide screenshot here -->
301
-
302
- ```
303
- function renderCron() {
304
- if (!showCron) {
305
- return null;
306
- } else {
307
- return <DialogCron
308
- key="dialogCron1"
309
- cron={this.state.cronValue || '* * * * *'}
310
- onClose={() => this.setState({ showCron: false })}
311
- onOk={cronValue => {
312
- this.setState({ cronValue })
313
- }}
314
- />;
315
- }
316
- }
317
- ```
318
-
319
- ### Components
320
-
321
- #### Utils.tsx
322
- ##### getObjectNameFromObj
323
- `getObjectNameFromObj(obj, settings, options, isDesc)`
324
-
325
- Get object name from a single object.
326
-
327
- Usage: `Utils.getObjectNameFromObj(this.objects[id], null, {language: I18n.getLanguage()})`
328
-
329
- ##### getObjectIcon
330
- `getObjectIcon(id, obj)`
331
-
332
- Get icon from the object.
333
-
334
- Usage:
335
- ```
336
- const icon = Utils.getObjectIcon(id, this.objects[id]);
337
- return (<img src={icon}/>);
338
- ```
339
-
340
- ##### isUseBright
341
- `isUseBright(color, defaultValue)`
342
-
343
- Usage: `
344
-
345
- #### Loader.tsx
346
- ![Logo](img/loader.png)
347
-
348
- ```
349
- render() {
350
- if (!this.state.loaded) {
351
- return <MuiThemeProvider theme={this.state.theme}>
352
- <Loader theme={this.state.themeType}/>
353
- </MuiThemeProvider>;
354
- }
355
- // render loaded data
356
- }
357
-
358
- ```
359
-
360
- #### Logo.tsx
361
- ![Logo](img/logo.png)
362
-
363
- ```
364
- render() {
365
- return <form className={this.props.classes.tab}>
366
- <Logo
367
- instance={this.props.instance}
368
- common={this.props.common}
369
- native={this.props.native}
370
- onError={text => this.setState({errorText: text})}
371
- onLoad={this.props.onLoad}
372
- />
373
- ...
374
- </form>;
375
- }
376
- ```
377
-
378
- #### Router.tsx
379
-
380
- #### ObjectBrowser.js
381
- It is better to use `Dialog/SelectID`, but if you want:
382
-
383
- ![Logo](img/objectBrowser.png)
384
-
385
- ```
386
- <ObjectBrowser
387
- foldersFirst={this.props.foldersFirst}
388
- imagePrefix={this.props.imagePrefix || this.props.prefix} // prefix is for back compatibility
389
- defaultFilters={this.filters}
390
- dialogName={this.dialogName}
391
- showExpertButton={this.props.showExpertButton !== undefined ? this.props.showExpertButton : true}
392
- style={{ width: '100%', height: '100%' }}
393
- columns={this.props.columns || ['name', 'type', 'role', 'room', 'func', 'val']}
394
- types={this.props.types || ['state']}
395
- t={I18n.t}
396
- lang={this.props.lang || I18n.getLanguage()}
397
- socket={this.props.socket}
398
- selected={this.state.selected}
399
- multiSelect={this.props.multiSelect}
400
- notEditable={this.props.notEditable === undefined ? true : this.props.notEditable}
401
- name={this.state.name}
402
- themeName={this.props.themeName}
403
- themeType={this.props.themeType}
404
- customFilter={this.props.customFilter}
405
- onFilterChanged={filterConfig => {
406
- this.filters = filterConfig;
407
- window.localStorage.setItem(this.dialogName, JSON.stringify(filterConfig));
408
- }}
409
- onSelect={(selected, name, isDouble) => {
410
- if (JSON.stringify(selected) !== JSON.stringify(this.state.selected)) {
411
- this.setState({selected, name}, () =>
412
- isDouble && this.handleOk());
413
- } else if (isDouble) {
414
- this.handleOk();
415
- }
416
- }}
417
- />
418
- ```
419
-
420
- #### TreeTable.ts
421
- ![Logo](img/tableTree.png)
422
-
423
- ```
424
- // STYLES
425
- const styles = theme => ({
426
- tableDiv: {
427
- width: '100%',
428
- overflow: 'hidden',
429
- height: 'calc(100% - 48px)',
430
- },
431
- });
432
- class MyComponent extends Component {
433
- constructor(props) {
434
- super(props);
435
-
436
- this.state = {
437
- data: [
438
- {
439
- id: 'UniqueID1' // required
440
- fieldIdInData: 'Name1',
441
- myType: 'number',
442
- },
443
- {
444
- id: 'UniqueID2' // required
445
- fieldIdInData: 'Name12',
446
- myType: 'string',
447
- },
448
- ],
449
- };
450
-
451
- this.columns = [
452
- {
453
- title: 'Name of field', // required, else it will be "field"
454
- field: 'fieldIdInData', // required
455
- editable: false, // or true [default - true]
456
- cellStyle: { // CSS style - // optional
457
- maxWidth: '12rem',
458
- overflow: 'hidden',
459
- wordBreak: 'break-word',
460
- },
461
- lookup: { // optional => edit will be automatically "SELECT"
462
- 'value1': 'text1',
463
- 'value2': 'text2',
464
- }
465
- },
466
- {
467
- title: 'Type', // required, else it will be "field"
468
- field: 'myType', // required
469
- editable: true, // or true [default - true]
470
- lookup: { // optional => edit will be automatically "SELECT"
471
- 'number': 'Number',
472
- 'string': 'String',
473
- 'boolean': 'Boolean',
474
- },
475
- type: 'number/string/color/oid/icon/boolean', // oid=ObjectID,icon=base64-icon
476
- editComponent: props =>
477
- <div>Prefix&#123; <br/>
478
- <textarea
479
- rows={4}
480
- style={{width: '100%', resize: 'vertical'}}
481
- value={props.value}
482
- onChange={e => props.onChange(e.target.value)}
483
- />
484
- Suffix
485
- </div>,
486
- },
487
- ];
488
- }
489
- // renderTable
490
- render() {
491
- return <div className={this.props.classes.tableDiv}>
492
- <TreeTable
493
- columns={this.columns}
494
- data={this.state.data}
495
- onUpdate={(newData, oldData) => {
496
- const data = JSON.parse(JSON.stringify(this.state.data));
497
-
498
- // Added new line
499
- if (newData === true) {
500
- // find unique ID
501
- let i = 1;
502
- let id = 'line_' + i;
503
-
504
- // eslint-disable-next-line
505
- while(this.state.data.find(item => item.id === id)) {
506
- i++;
507
- id = 'line_' + i;
508
- }
509
-
510
- data.push({
511
- id,
512
- name: I18n.t('New resource') + '_' + i,
513
- color: '',
514
- icon: '',
515
- unit: '',
516
- price: 0,
517
- });
518
- } else {
519
- // existing line was modifed
520
- const pos = this.state.data.indexOf(oldData);
521
- if (pos !== -1) {
522
- Object.keys(newData).forEach(attr => data[pos][attr] = newData[attr]);
523
- }
524
- }
525
-
526
- this.setState({data});
527
- }}
528
- onDelete={oldData => {
529
- console.log('Delete: ' + JSON.stringify(oldData));
530
- const pos = this.state.data.indexOf(oldData);
531
- if (pos !== -1) {
532
- const data = JSON.parse(JSON.stringify(this.state.data));
533
- data.splice(pos, 1);
534
- this.setState({data});
535
- }
536
- }}
537
- />
538
- </div>;
539
- }
540
- }
541
- ```
542
-
543
- #### Toast
544
- <!-- TODO: Provide screenshot here -->
545
-
546
- Toast is not a part of `adapter-react` but it is an example how to use toast in application:
547
-
548
- ```
549
- import Snackbar from '@material-ui/core/Snackbar';
550
-
551
- class MyComponent {
552
- constructor(props) {
553
- super(props);
554
- this.state = {
555
- // ....
556
- toast: '',
557
- };
558
- }
559
- // ...
560
- renderToast() {
561
- if (!this.state.toast) {
562
- return null;
563
- }
564
- return <Snackbar
565
- anchorOrigin={{
566
- vertical: 'bottom',
567
- horizontal: 'left',
568
- }}
569
- open={true}
570
- autoHideDuration={6000}
571
- onClose={() => this.setState({toast: ''})}
572
- ContentProps={{'aria-describedby': 'message-id'}}
573
- message={<span id="message-id">{this.state.toast}</span>}
574
- action={[
575
- <IconButton
576
- key="close"
577
- aria-label="Close"
578
- color="inherit"
579
- className={this.props.classes.close}
580
- onClick={() => this.setState({toast: ''})}
581
- >
582
- <IconClose />
583
- </IconButton>,
584
- ]}
585
- />;
586
- }
587
- render() {
588
- return <div>
589
- {this.renderToast()}
590
- </div>;
591
- }
592
- }
593
- ```
594
-
595
- ## List of adapters that use adapter-react
596
- - Admin
597
- - iot
598
- - echarts
599
- - text2command
600
- - scenes
601
- - javascript
602
- - devices
603
- - eventlist
604
- - cameras
605
- - web
606
- - vis-2
607
- - vis-2-widgets-xxx
608
- - fullcalendar
609
- - openweathermap
610
-
611
- ## Usability
612
- In dialogs, the OK button is first (on the left) and the cancel button is last (on the right)
613
-
614
- ## Used icons
615
- This project uses icons from [Flaticon](https://www.flaticon.com/).
616
-
617
- ioBroker GmbH has a valid license for all the used icons.
618
- The icons may not be reused in other projects without the proper flaticon license or flaticon subscription.
619
-
620
- ## Migration from adapter-react to adapter-react-v5
621
- ### In src/package.json => dependencies
622
- - `"@iobroker/adapter-react": "^2.0.22",` => `"@iobroker/adapter-react-v5": "^3.1.34",`
623
- - `"@material-ui/core": "^4.12.3",` => `"@mui/material": "^5.10.9",`
624
- - `"@material-ui/icons": "^4.11.2",` => `"@mui/icons-material": "^5.10.9",`
625
- - Add `"@mui/styles": "^5.10.9",`
626
- - Add `"babel-eslint": "^10.1.0",`
627
-
628
- ### In Source files
629
- - All `@iobroker/adapter-react/...` => `@iobroker/adapter-react-v5/...`
630
- - All `@material-ui/icons/...` => `@mui/icons-material/...`
631
- - Change `import { withStyles } from '@material-ui/core/styles';` => `import { withStyles } from '@mui/styles';`
632
- - Change `import { makeStyles } from '@mui/material/styles';` => `import { makeStyles } from '@mui/styles';`
633
- - Change `import withWidth from '@material-ui/core/withWidth';` => `import { withWidth } from '@iobroker/adapter-react-v5';`
634
- - All `@material-ui/core...` => `@mui/material...`
635
- - Change `import { MuiThemeProvider } from '@material-ui/core/styles';` => `import { ThemeProvider, StyledEngineProvider } from '@mui/material/styles';`
636
- - Change all `<MuiThemeProvider theme={this.state.theme}>` to `<StyledEngineProvider injectFirst><ThemeProvider theme={this.state.theme}>`
637
- - Rename in styles `theme.palette.type` => `theme.palette.mode`
638
- - Add to all `TextField`, `Select`, `FormControl` the property `variant="standard"`
639
- - Add to all `Button` that do not have `color` property: `color="grey"`
640
- - Replace by `TextField` the `readOnly` attribute (if exists) with `InputProps={{readOnly: true}}`
641
- - Remove px by all `theme.spacing`: `calc(100% - ${theme.spacing(4)}px)` => `calc(100% - ${theme.spacing(4)})`
642
- - Replace `this.selectTab(e.target.parentNode.dataset.name, index)` => `this.selectTab(e.target.dataset.name, index)`
643
-
644
- If you still have questions, try to find an answer [here](https://mui.com/guides/migration-v4/).
645
-
646
- ## Migration from adapter-react-v5@3.x to adapter-react-v5@4.x
647
- - Look for getObjectView socket requests and replace `socket.getObjectView('startKey', 'endKey', 'instance')` to `socket.getObjectViewSystem('instance', 'startKey', 'endKey')`
648
- - Look for calls of custom like
649
- ```
650
- this.props.socket._socket.emit('getObjectView', 'system', 'custom', {startKey: '', endKey:'\u9999'}, (err, objs) => {
651
- (objs?.rows || [])
652
- .forEach(item => console.log(item.id, item.value));
653
- });
654
- ```
655
- to
656
- ```
657
- socket.getObjectViewCustom('custom', 'state', 'startKey', 'endKey')
658
- .then(objects => {
659
- Object.keys(objects).forEach(obj => console.log(obj._id));
660
- });
661
- ```
662
- - Replace all `socket.log.error('text')` to `socket.log('text', 'error')`
663
- - Add to App.js `import { AdminConnection } from '@iobroker/adapter-react-v5';` and `super(props, { Connection: AdminConnection });` if run in admin
664
-
665
- ## Migration from adapter-react-v5@4.x to adapter-react-v5@5.x
666
- - `Theme` is renamed to IobTheme. It is an object with classes inside. `Theme` is still inside and it same as mui `createTheme`.
667
- - adapter-react-v5 has all types exported. So you can use `import { type IobTheme, Theme } from '@iobroker/adapter-react-v5';` and `const theme: IobTheme = Theme('light');`
668
- - Json-Config is now an external package and must be included as dependency separately.
669
- - Use type `Translate` for `t(word: string, ...args: any[]) => string`
670
- - All components for admin JsonConfig must be changed:
671
- Before `adapter-react-v5@5.x`:
672
-
673
- ```
674
- import { ConfigGeneric, I18n } from '@iobroker/adapter-react-v5';
675
- class JsonComponent extends ConfigGeneric {
676
- ...
677
- }
678
- ```
679
-
680
- With `adapter-react-v5@5.x`:
681
-
682
- ```
683
- import { I18n } from '@iobroker/adapter-react-v5';
684
- import { ConfigGeneric } from '@iobroker/json-config';
685
- class JsonComponent extends ConfigGeneric {
686
- ...
687
- }
688
- ```
689
- ## Migration from v5 to v6
690
- The main change is that the `withStyles` was removed. So you have to replace all `withStyles` with `sx` or `style` properties.
691
-
692
- You can read more about sx [here](https://mui.com/system/getting-started/the-sx-prop/).
693
- - Remove at start of the file `import { withStyles } from '@mui/styles';`
694
- - Replace at the very end of the file `export default withStyles(styles)(MyComponent);` with `export default MyComponent;`
695
- - Modify `const styles`:
696
- Before:
697
- ```
698
- const styles: Record<string, any> = (theme: IobTheme) => ({
699
- dialog: {
700
- height: `calc(100% - ${theme.mixins.toolbar.minHeight}px)`,
701
- padding: theme.spacing(1),
702
- margin: theme.spacing(2),
703
- gap: 5,
704
- borderRadius: 5,
705
- marginLeft: 10, // marginTop, marginRight, marginBottom
706
- paddingLeft: 10, // paddingTop, paddingRight, paddingBottom
707
- },
708
- ...
709
- });
710
- ```
711
-
712
- After:
713
- ```
714
- const styles: Record<string, any> = {
715
- dialog: (theme: IobTheme) => ({
716
- height: `calc(100% - ${theme => theme.mixins.toolbar.minHeight}px)`,
717
- p: 1, // or 8px, padding is OK too
718
- m: '16px', // or 2, margin is OK too
719
- gap: '5px',
720
- borderRadius: '5px',
721
- ml: '10px', // mt, mr, mb, but marginLeft, marginRight, marginBottom is OK too
722
- pl: '10px', // pt, pr, pb, but paddingTop, paddingRight, paddingBottom is OK too
723
- }),
724
- };
725
- ```
726
-
727
- - Modify `className`:
728
- Before: `<div className={this.props.classes.box}>`
729
-
730
- After: `<Box sx={styles.box}>`
731
-
732
- Before: `<span className={Utils.clsx(this.props.classes.box1, condition && this.props.classes.box2)}>`
733
-
734
- After: `<Box component="span" sx={Utils.getStyle(this.props.theme, this.props.classes.box1, condition && this.props.classes.box2)}>`
735
- Or if no one style is a function: `<Box component="div" sx={{ ...this.props.classes.box1, ...(condition ? this.props.classes.box2 : undefined) }}>`
736
-
737
- Do not use `sx` if the style is not dynamic (not a function). Use `style` instead.
738
-
739
- Be aware, that all paddings and margins are now in `theme.spacing(1)` format.
740
- So you have to replace all `padding: 8` with `padding: 1` or with `padding: '8px'`.
741
-
742
- The best practice is to replace `padding` with `p` and `margin` with `m`, so you will see immediately that it is a padding or margin for `sx` property.
743
-
744
- - Modify `classes`:
745
- Before: `<Dialog classes={{ scrollPaper: this.props.classes.dialog, paper: this.props.classes.paper }}>`
746
-
747
- After: `<Dialog sx={{ '&.MuiDialog-scrollPaper': styles.dialog, '& .MuiDialog-paper': styles.paper }}>`
748
-
749
- Before: `<Dialog classes={{ scrollPaper: this.props.classes.dialog, paper: this.props.classes.paper }}>`
750
-
751
- After: `<Dialog sx={{ '&.MuiDialog-scrollPaper': styles.dialog, '& .MuiDialog-paper': styles.paper }}>`
752
-
753
- Before: `<ListItem classes={{ root: styles.listItem }} >`
754
-
755
- After: `<ListItem sx={{ '&.MuiListItem-root': styles.listItem }} >`
756
-
757
- Before: `<Typography component="h2" variant="h6" classes={{ root: styles.typography }}>`
758
-
759
- After: `<Typography component="h2" variant="h6" sx={{ '&.MuiTypography-root': styles.typography }}>`
760
-
761
- Before: `<Badge classes={{ 'badge': styles.expertBadge }}>`
762
-
763
- After: `<Badge sx={{ '& .MuiBadge-badge': styles.expertBadge }}>`
764
-
765
- Before: `<Tab classes={{ selected: styles.selected }} />`
766
-
767
- After: `<Tab sx={{ '&.Mui-selected': styles.selected }} />`
768
-
769
- Before: `<Tooltip title={this.props.t('ra_Refresh tree')} classes={{ popper: styles.tooltip }}>`
770
-
771
- After: `<Tooltip title={this.props.t('ra_Refresh tree')} componentsProps={{ popper: { sx: { pointerEvents: 'none' } } }}>`
772
- Or: `<Tooltip title={this.props.t('ra_Refresh tree')} componentsProps={{ popper: { sx: styles.tooltip } }}>`
773
-
774
- Before. `<AccordionSummary classes={{ root: styles.rootStyle, content: styles.content }}>`
775
-
776
- After. `<AccordionSummary sx={{ '&.MuiAccordionSummary-root': styles.rootStyle, '& .MuiAccordionSummary-content': styles.content }}>`
777
-
778
- Before. `<Drawer classes={{ paper: styles.paperStyle }}>`
779
-
780
- After. `<Drawer sx={{ '& .MuiDrawer-paper': styles.paperStyle }}>`
781
-
782
- <!--
783
- Placeholder for the next version (at the beginning of the line):
784
- ### **WORK IN PROGRESS**
785
- -->
786
-
1
+ # Help ReactJS classes for adapter config
2
+
3
+ You can find demo on https://github.com/ioBroker/adapter-react-demo
4
+
5
+ ## Getting started
6
+
7
+ If you want to create the configuration page with ReactJS:
8
+
9
+ 1. Create github repo for adapter.
10
+ 2. execute `npx create-react-app src` . It will take a while.
11
+ 3. `cd src`
12
+ 4. Modify package.json file in src directory:
13
+ - Change `name` from `src` to `ADAPTERNAME-admin` (Of course replace `ADAPTERNAME` with yours)
14
+ - Add to devDependencies:
15
+ ```
16
+ "@iobroker/adapter-react-v5": "^7.1.0",
17
+ ```
18
+ Versions can be higher.
19
+ So your `src/package.json` should look like:
20
+
21
+ ```json
22
+ {
23
+ "name": "ADAPTERNAME-admin",
24
+ "version": "0.1.0",
25
+ "private": true,
26
+ "dependencies": {
27
+ "@iobroker/adapter-react-v5": "^7.1.0",
28
+ "@iobroker/build-tools": "^1.0.0",
29
+ "@iobroker/eslint-config": "^0.1.2",
30
+ "@mui/material": "^6.0.2",
31
+ "@mui/icons-material": "^6.0.2",
32
+ "@sentry/browser": "^8.28.0",
33
+ "babel-eslint": "^10.1.0",
34
+ "eslint": "^9.10.0",
35
+ "react": "^18.3.1",
36
+ "react-dom": "^18.3.1",
37
+ "react-scripts": "^5.0.1",
38
+ "react-icons": "^5.3.0"
39
+ },
40
+ "scripts": {
41
+ "start": "react-scripts start",
42
+ "build": "react-scripts build",
43
+ "test": "react-scripts test",
44
+ "eject": "react-scripts eject"
45
+ },
46
+ "eslintConfig": {
47
+ "extends": "react-app"
48
+ },
49
+ "homepage": ".",
50
+ "browserslist": [
51
+ ">0.2%",
52
+ "not dead",
53
+ "not ie <= 11",
54
+ "not op_mini all"
55
+ ]
56
+ }
57
+ ```
58
+
59
+ 5. Call in `src`: `npm install`
60
+ 6. Copy `tasks.js` into `src`: `cp node_modules/@iobroker/adapter-react-v5/tasks.js tasks.js`
61
+ 7. Add scripts to your `package.json` `scripts` section:
62
+
63
+ ```json
64
+ "scripts": {
65
+ "0-clean": "node tasks --0-clean",
66
+ "1-npm": "node tasks --1-npm",
67
+ "2-build": "node tasks --2-build",
68
+ "3-copy": "node tasks --3-copy",
69
+ "4-patch": "node tasks --4-patch",
70
+ "build": "node tasks"
71
+ }
72
+ ```
73
+ 7. Start your dummy application `npm run start` for developing or build with `npm run build` and
74
+ copy files in `build` directory to `www` or to `admin`. In the admin you must rename `index.html` to `index_m.html`.
75
+ 8. You can do that with `npm` tasks: `npm run build`
76
+
77
+ ## Development
78
+
79
+ 1. Add `socket.io` to `public/index.html`.
80
+ After
81
+
82
+ ```html
83
+ <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
84
+ ```
85
+
86
+ insert
87
+
88
+ ```html
89
+ <script>
90
+ const script = document.createElement('script');
91
+ window.registerSocketOnLoad = function (cb) {
92
+ window.socketLoadedHandler = cb;
93
+ };
94
+ const parts = (window.location.search || '').replace(/^\?/, '').split('&');
95
+ const query = {};
96
+ parts.forEach(item => {
97
+ const [name, val] = item.split('=');
98
+ query[decodeURIComponent(name)] = val !== undefined ? decodeURIComponent(val) : true;
99
+ });
100
+ script.onload = function () { typeof window.socketLoadedHandler === 'function' && window.socketLoadedHandler(); };
101
+ script.src = window.location.port === '3000' ? window.location.protocol + '//' + (query.host || window.location.hostname) + ':' + (query.port || 8081) + '/lib/js/socket.io.js' : '%PUBLIC_URL%/../../lib/js/socket.io.js';
102
+
103
+ document.head.appendChild(script);
104
+ </script>
105
+ ```
106
+
107
+ 3. Add to App.js constructor initialization for I18n:
108
+
109
+ ```jsx
110
+ class App extends GenericApp {
111
+ constructor(props) {
112
+ const extendedProps = {...props};
113
+ extendedProps.encryptedFields = ['pass']; // this parameter will be encrypted and decrypted automatically
114
+ extendedProps.translations = {
115
+ 'en': require('./i18n/en'),
116
+ 'de': require('./i18n/de'),
117
+ 'ru': require('./i18n/ru'),
118
+ 'pt': require('./i18n/pt'),
119
+ 'nl': require('./i18n/nl'),
120
+ 'fr': require('./i18n/fr'),
121
+ 'it': require('./i18n/it'),
122
+ 'es': require('./i18n/es'),
123
+ 'pl': require('./i18n/pl'),
124
+ 'uk': require('./i18n/uk'),
125
+ 'zh-cn': require('./i18n/zh-cn'),
126
+ };
127
+ // get actual admin port
128
+ extendedProps.socket = {port: parseInt(window.location.port, 10)};
129
+
130
+ // Only if close, save buttons are not required at the bottom (e.g. if admin tab)
131
+ // extendedProps.bottomButtons = false;
132
+
133
+ // only for debug purposes
134
+ if (extendedProps.socket.port === 3000) {
135
+ extendedProps.socket.port = 8081;
136
+ }
137
+
138
+ // allow to manage GenericApp the sentry initialisation or do not set the sentryDSN if no sentry available
139
+ extendedProps.sentryDSN = 'https://yyy@sentry.iobroker.net/xx';
140
+
141
+ super(extendedProps);
142
+ }
143
+ // ...
144
+ }
145
+ ```
146
+
147
+ 4. Replace `index.js` with the following code to support themes:
148
+
149
+ ```jsx
150
+ import React from 'react';
151
+ import { createRoot } from 'react-dom/client';
152
+ import * as serviceWorker from './serviceWorker';
153
+
154
+ import './index.css';
155
+ import App from './App';
156
+ import { version } from '../package.json';
157
+
158
+ console.log(`iobroker.scenes@${version}`);
159
+
160
+ const container = document.getElementById('root');
161
+ const root = createRoot(container);
162
+ root.render(<App/>);
163
+
164
+ // If you want your app to work offline and load faster, you can change
165
+ // unregister() to register() below. Note this comes with some pitfalls.
166
+ // Learn more about service workers: http://bit.ly/CRA-PWA
167
+ serviceWorker.unregister();
168
+ ```
169
+
170
+ 5. Add to App.js encoding and decoding of values:
171
+
172
+ ```jsx
173
+ class App extends GenericApp {
174
+ // ...
175
+ onPrepareLoad(settings) {
176
+ settings.pass = this.decode(settings.pass);
177
+ }
178
+ onPrepareSave(settings) {
179
+ settings.pass = this.encode(settings.pass);
180
+ }
181
+ }
182
+ ```
183
+
184
+ 6. The optional step is to validate the data to be saved:
185
+
186
+ ```jsx
187
+ onPrepareSave(settings) {
188
+ super.onPrepareSave(settings);
189
+ if (DATA_INVALID) {
190
+ return false; // configuration will not be saved
191
+ } else {
192
+ return true;
193
+ }
194
+ }
195
+ ```
196
+
197
+ ## Components
198
+
199
+ ### Connection.tsx
200
+
201
+ This is a non-React class to provide the communication for socket connection with the server.
202
+
203
+ ### GenericApp.tsx
204
+
205
+ ### i18n.ts
206
+
207
+ ### Theme.tsx
208
+
209
+ ### Dialogs
210
+
211
+ Some dialogs are predefined and could be used out of the box.
212
+
213
+ #### Confirm.tsx
214
+
215
+ <!-- TODO: Provide screenshot here -->
216
+
217
+ Usage:
218
+
219
+ ```jsx
220
+ import React from 'react';
221
+ import { I18n, Confirm as ConfirmDialog } from '@iobroker/adapter-react-v5';
222
+
223
+ class ExportImportDialog extends React.Component {
224
+ constructor(props) {
225
+ super(props);
226
+
227
+ this.state = {
228
+ confirmDialog: false,
229
+ };
230
+ }
231
+
232
+ renderConfirmDialog() {
233
+ if (!this.state.confirmDialog) {
234
+ return null;
235
+ }
236
+ return <ConfirmDialog
237
+ title={ I18n.t('Scene will be overwritten.') }
238
+ text={ I18n.t('All data will be lost. Confirm?') }
239
+ ok={ I18n.t('Yes') }
240
+ cancel={ I18n.t('Cancel') }
241
+ suppressQuestionMinutes={5}
242
+ dialogName="myConfirmDialogThatCouldBeSuppressed"
243
+ suppressText={I18n.t('Suppress question for next %s minutes', 5)}
244
+ onClose={isYes => {
245
+ this.setState({ confirmDialog: false} );
246
+ }}
247
+ />;
248
+ }
249
+ render() {
250
+ return <div>
251
+ <Button onClick={ () => this.setState({confirmDialog: true}) }>Click</Button>
252
+ { this.renderConfirmDialog() }
253
+ </div>
254
+ }
255
+ }
256
+
257
+ export default ExportImportDialog;
258
+ ```
259
+
260
+ #### Error.tsx
261
+
262
+ <!-- TODO: Provide screenshot here -->
263
+
264
+ #### Message.tsx
265
+
266
+ <!-- TODO: Provide screenshot here -->
267
+
268
+ ```jsx
269
+ renderMessage() {
270
+ if (this.state.showMessage) {
271
+ return <Message
272
+ text={this.state.showMessage}
273
+ onClose={() => this.setState({showMessage: false})}
274
+ />;
275
+ } else {
276
+ return null;
277
+ }
278
+ }
279
+ ```
280
+
281
+ #### SelectID.tsx
282
+
283
+ ![Logo](img/selectID.png)
284
+
285
+ ```jsx
286
+ import { SelectID as DialogSelectID } from '@iobroker/adapter-react-v5';
287
+
288
+ class MyComponent extends Component {
289
+ constructor(props) {
290
+ super(props);
291
+ this.state = {
292
+ showSelectId: false,
293
+ };
294
+ }
295
+
296
+ renderSelectIdDialog() {
297
+ if (this.state.showSelectId) {
298
+ return <DialogSelectID
299
+ key="tableSelect"
300
+ imagePrefix="../.."
301
+ dialogName={this.props.adapterName}
302
+ themeType={this.props.themeType}
303
+ socket={this.props.socket}
304
+ statesOnly={true}
305
+ selected={this.state.selectIdValue}
306
+ onClose={() => this.setState({showSelectId: false})}
307
+ onOk={(selected, name) => {
308
+ this.setState({showSelectId: false, selectIdValue: selected});
309
+ }}
310
+ />;
311
+ } else {
312
+ return null;
313
+ }
314
+ }
315
+ render() {
316
+ return renderSelectIdDialog();
317
+ }
318
+ }
319
+ ```
320
+
321
+ #### Cron
322
+
323
+ Include `"react-text-mask": "^5.4.3",` in package.json.
324
+
325
+ <!-- TODO: Provide screenshot here -->
326
+
327
+ ```jsx
328
+ function renderCron() {
329
+ if (!showCron) {
330
+ return null;
331
+ } else {
332
+ return <DialogCron
333
+ key="dialogCron1"
334
+ cron={this.state.cronValue || '* * * * *'}
335
+ onClose={() => this.setState({ showCron: false })}
336
+ onOk={cronValue => {
337
+ this.setState({ cronValue })
338
+ }}
339
+ />;
340
+ }
341
+ }
342
+ ```
343
+
344
+ ### Components
345
+
346
+ #### Utils.tsx
347
+
348
+ ##### getObjectNameFromObj
349
+
350
+ `getObjectNameFromObj(obj, settings, options, isDesc)`
351
+
352
+ Get object name from a single object.
353
+
354
+ Usage: `Utils.getObjectNameFromObj(this.objects[id], null, {language: I18n.getLanguage()})`
355
+
356
+ ##### getObjectIcon
357
+
358
+ `getObjectIcon(id, obj)`
359
+
360
+ Get icon from the object.
361
+
362
+ Usage:
363
+
364
+ ```jsx
365
+ const icon = Utils.getObjectIcon(id, this.objects[id]);
366
+ return <img src={icon} />;
367
+ ```
368
+
369
+ ##### isUseBright
370
+
371
+ `isUseBright(color, defaultValue)`
372
+
373
+ Usage: `
374
+
375
+ #### Loader.tsx
376
+
377
+ ![Logo](img/loader.png)
378
+
379
+ ```jsx
380
+ render() {
381
+ if (!this.state.loaded) {
382
+ return <MuiThemeProvider theme={this.state.theme}>
383
+ <Loader theme={this.state.themeType}/>
384
+ </MuiThemeProvider>;
385
+ }
386
+ // render loaded data
387
+ }
388
+
389
+ ```
390
+
391
+ #### Logo.tsx
392
+
393
+ ![Logo](img/logo.png)
394
+
395
+ ```jsx
396
+ render() {
397
+ return <form className={this.props.classes.tab}>
398
+ <Logo
399
+ instance={this.props.instance}
400
+ common={this.props.common}
401
+ native={this.props.native}
402
+ onError={text => this.setState({errorText: text})}
403
+ onLoad={this.props.onLoad}
404
+ />
405
+ ...
406
+ </form>;
407
+ }
408
+ ```
409
+
410
+ #### Router.tsx
411
+
412
+ #### ObjectBrowser.js
413
+
414
+ It is better to use `Dialog/SelectID`, but if you want:
415
+
416
+ ![Logo](img/objectBrowser.png)
417
+
418
+ ```jsx
419
+ <ObjectBrowser
420
+ foldersFirst={this.props.foldersFirst}
421
+ imagePrefix={this.props.imagePrefix || this.props.prefix} // prefix is for back compatibility
422
+ defaultFilters={this.filters}
423
+ dialogName={this.dialogName}
424
+ showExpertButton={this.props.showExpertButton !== undefined ? this.props.showExpertButton : true}
425
+ style={{ width: '100%', height: '100%' }}
426
+ columns={this.props.columns || ['name', 'type', 'role', 'room', 'func', 'val']}
427
+ types={this.props.types || ['state']}
428
+ t={I18n.t}
429
+ lang={this.props.lang || I18n.getLanguage()}
430
+ socket={this.props.socket}
431
+ selected={this.state.selected}
432
+ multiSelect={this.props.multiSelect}
433
+ notEditable={this.props.notEditable === undefined ? true : this.props.notEditable}
434
+ name={this.state.name}
435
+ theme={this.props.theme}
436
+ themeName={this.props.themeName}
437
+ themeType={this.props.themeType}
438
+ customFilter={this.props.customFilter}
439
+ onFilterChanged={filterConfig => {
440
+ this.filters = filterConfig;
441
+ window.localStorage.setItem(this.dialogName, JSON.stringify(filterConfig));
442
+ }}
443
+ onSelect={(selected, name, isDouble) => {
444
+ if (JSON.stringify(selected) !== JSON.stringify(this.state.selected)) {
445
+ this.setState({selected, name}, () =>
446
+ isDouble && this.handleOk());
447
+ } else if (isDouble) {
448
+ this.handleOk();
449
+ }
450
+ }}
451
+ />
452
+ ```
453
+
454
+ #### TreeTable.ts
455
+
456
+ ![Logo](img/tableTree.png)
457
+
458
+ ```jsx
459
+ // STYLES
460
+ const styles = {
461
+ tableDiv: {
462
+ width: '100%',
463
+ overflow: 'hidden',
464
+ height: 'calc(100% - 48px)',
465
+ },
466
+ };
467
+ class MyComponent extends Component {
468
+ constructor(props) {
469
+ super(props);
470
+
471
+ this.state = {
472
+ data: [
473
+ {
474
+ id: 'UniqueID1', // required
475
+ fieldIdInData: 'Name1',
476
+ myType: 'number',
477
+ },
478
+ {
479
+ id: 'UniqueID2', // required
480
+ fieldIdInData: 'Name12',
481
+ myType: 'string',
482
+ },
483
+ ],
484
+ };
485
+
486
+ this.columns = [
487
+ {
488
+ title: 'Name of field', // required, else it will be "field"
489
+ field: 'fieldIdInData', // required
490
+ editable: false, // or true [default - true]
491
+ cellStyle: { // CSS style - // optional
492
+ maxWidth: '12rem',
493
+ overflow: 'hidden',
494
+ wordBreak: 'break-word',
495
+ },
496
+ lookup: { // optional => edit will be automatically "SELECT"
497
+ 'value1': 'text1',
498
+ 'value2': 'text2',
499
+ }
500
+ },
501
+ {
502
+ title: 'Type', // required, else it will be "field"
503
+ field: 'myType', // required
504
+ editable: true, // or true [default - true]
505
+ lookup: { // optional => edit will be automatically "SELECT"
506
+ 'number': 'Number',
507
+ 'string': 'String',
508
+ 'boolean': 'Boolean',
509
+ },
510
+ type: 'number/string/color/oid/icon/boolean', // oid=ObjectID,icon=base64-icon
511
+ editComponent: props =>
512
+ <div>Prefix&#123; <br/>
513
+ <textarea
514
+ rows={4}
515
+ style={{width: '100%', resize: 'vertical'}}
516
+ value={props.value}
517
+ onChange={e => props.onChange(e.target.value)}
518
+ />
519
+ Suffix
520
+ </div>,
521
+ },
522
+ ];
523
+ }
524
+ // renderTable
525
+ render() {
526
+ return <div className={this.props.classes.tableDiv}>
527
+ <TreeTable
528
+ columns={this.columns}
529
+ data={this.state.data}
530
+ onUpdate={(newData, oldData) => {
531
+ const data = JSON.parse(JSON.stringify(this.state.data));
532
+
533
+ // Added new line
534
+ if (newData === true) {
535
+ // find unique ID
536
+ let i = 1;
537
+ let id = 'line_' + i;
538
+
539
+ // eslint-disable-next-line
540
+ while(this.state.data.find(item => item.id === id)) {
541
+ i++;
542
+ id = 'line_' + i;
543
+ }
544
+
545
+ data.push({
546
+ id,
547
+ name: I18n.t('New resource') + '_' + i,
548
+ color: '',
549
+ icon: '',
550
+ unit: '',
551
+ price: 0,
552
+ });
553
+ } else {
554
+ // existing line was modifed
555
+ const pos = this.state.data.indexOf(oldData);
556
+ if (pos !== -1) {
557
+ Object.keys(newData).forEach(attr => data[pos][attr] = newData[attr]);
558
+ }
559
+ }
560
+
561
+ this.setState({data});
562
+ }}
563
+ onDelete={oldData => {
564
+ console.log('Delete: ' + JSON.stringify(oldData));
565
+ const pos = this.state.data.indexOf(oldData);
566
+ if (pos !== -1) {
567
+ const data = JSON.parse(JSON.stringify(this.state.data));
568
+ data.splice(pos, 1);
569
+ this.setState({data});
570
+ }
571
+ }}
572
+ />
573
+ </div>;
574
+ }
575
+ }
576
+ ```
577
+
578
+ #### Toast
579
+
580
+ <!-- TODO: Provide screenshot here -->
581
+
582
+ Toast is not a part of `adapter-react` but it is an example how to use toast in application:
583
+
584
+ ```jsx
585
+ import { Component } from 'react';
586
+ import { Snackbar } from '@mui/material';
587
+
588
+ class MyComponent extends Component {
589
+ constructor(props) {
590
+ super(props);
591
+ this.state = {
592
+ // ....
593
+ toast: '',
594
+ };
595
+ }
596
+
597
+ // ...
598
+ renderToast() {
599
+ if (!this.state.toast) {
600
+ return null;
601
+ }
602
+ return <Snackbar
603
+ anchorOrigin={{
604
+ vertical: 'bottom',
605
+ horizontal: 'left',
606
+ }}
607
+ open={true}
608
+ autoHideDuration={6000}
609
+ onClose={() => this.setState({toast: ''})}
610
+ ContentProps={{'aria-describedby': 'message-id'}}
611
+ message={<span id="message-id">{this.state.toast}</span>}
612
+ action={[
613
+ <IconButton
614
+ key="close"
615
+ aria-label="Close"
616
+ color="inherit"
617
+ className={this.props.classes.close}
618
+ onClick={() => this.setState({toast: ''})}
619
+ >
620
+ <IconClose/>
621
+ </IconButton>,
622
+ ]}
623
+ />;
624
+ }
625
+
626
+ render() {
627
+ return <div>
628
+ {this.renderToast()}
629
+ </div>;
630
+ }
631
+ }
632
+ ```
633
+
634
+ ## List of adapters that use adapter-react
635
+
636
+ - Admin
637
+ - Backitup
638
+ - iot
639
+ - echarts
640
+ - text2command
641
+ - scenes
642
+ - javascript
643
+ - devices
644
+ - eventlist
645
+ - cameras
646
+ - web
647
+ - vis-2
648
+ - vis-2-widgets-xxx
649
+ - fullcalendar
650
+ - openweathermap
651
+
652
+ ## Usability
653
+
654
+ In dialogs, the OK button is first (on the left) and the cancel button is last (on the right)
655
+
656
+ ## Used icons
657
+
658
+ This project uses icons from [Flaticon](https://www.flaticon.com/).
659
+
660
+ ioBroker GmbH has a valid license for all the used icons.
661
+ The icons may not be reused in other projects without the proper flaticon license or flaticon subscription.
662
+
663
+ ## Migration instructions
664
+
665
+ You can find the migration instructions:
666
+ - [from adapter-react-v5@6.x to adapter-react-v5@7.x](MIGRATION_6_7.md)
667
+ - [from adapter-react-v5@5.x to adapter-react-v5@6.x](MIGRATION_5_6.md)
668
+ - [from adapter-react to adapter-react-v5@5.x](MIGRATION_4_5.md)
669
+
670
+ <!--
671
+ Placeholder for the next version (at the beginning of the line):
672
+ ### **WORK IN PROGRESS**
673
+ -->
674
+
787
675
  ## Changelog
788
- ### 6.1.7 (2024-08-03)
789
- * (bluefox) Added translations
676
+ ### 7.1.0 (2024-09-12)
677
+
678
+ - (bluefox) Optimized the icon picker
679
+ - (bluefox) Used common eslint-config
680
+
681
+ ### 7.0.2 (2024-09-10)
682
+ * (bluefox) Showed the context menu under cursor position in the object browser
683
+ * (bluefox) Added links to aliases in the object browser
684
+
685
+ ### 7.0.1 (2024-08-29)
686
+
687
+ - (bluefox) Updated the object browser
688
+ - (bluefox) Used MUI Library 6.0
689
+
690
+ ### 6.1.10 (2024-08-30)
691
+
692
+ - (bluefox) Updated the object browser
693
+
694
+ ### 6.1.9 (2024-08-14)
695
+
696
+ - (bluefox) Updated JSON schema
697
+
698
+ ### 6.1.8 (2024-08-03)
699
+
700
+ - (bluefox) Added translations
701
+
702
+ ### 6.1.6 (2024-07-23)
703
+
704
+ - (bluefox) Optimize package
705
+
706
+ ### 6.1.5 (2024-07-20)
707
+
708
+ - (bluefox) Added sources to package
709
+
710
+ ### 6.1.3 (2024-07-20)
711
+
712
+ - (bluefox) Better typing of legacy connection
713
+
714
+ ### 6.1.1 (2024-07-16)
715
+
716
+ - (bluefox) Added translations
717
+
718
+ ### 6.1.0 (2024-07-15)
719
+
720
+ - (bluefox) Replace by CRON to text the package to `cronstrue`
721
+
722
+ ### 6.0.19 (2024-07-14)
723
+
724
+ - (bluefox) added some packages for federation
725
+
726
+ ### 6.0.17 (2024-07-14)
727
+
728
+ - (bluefox) Allowed playing mp3 files in the file browser
729
+ - (bluefox) Corrected jump by object selection
730
+
731
+ ### 6.0.14 (2024-07-07)
732
+
733
+ - (bluefox) Corrected theme type selection
734
+
735
+ ### 6.0.13 (2024-06-30)
736
+
737
+ - (bluefox) Corrected color picker
738
+
739
+ ### 6.0.12 (2024-06-29)
740
+
741
+ - (bluefox) Added support for the overrides in the theme
742
+
743
+ ### 6.0.10 (2024-06-27)
744
+
745
+ - (bluefox) Added translation
746
+ - (bluefox) Mobile object browser improved
747
+
748
+ ### 6.0.9 (2024-06-26)
749
+
750
+ - (bluefox) Corrected Icons
751
+
752
+ ### 6.0.8 (2024-06-26)
753
+
754
+ - (bluefox) Corrected types of the select ID dialog
755
+ - (bluefox) Made the tooltips neutral to the pointer events
756
+
757
+ ### 6.0.6 (2024-06-24)
758
+
759
+ - (bluefox) Synchronised with admin
760
+ - (bluefox) Added translations for time scheduler
761
+
762
+ ### 6.0.4 (2024-06-21)
763
+
764
+ - (bluefox) Removed the usage of `withStyles` in favor of `sx` and `style` properties (see [Migration from v5 to v6](#migration-from-v5-to-v6)
765
+ - (bluefox) (BREAKING) Higher version of `@mui/material` (5.15.20) is used
766
+
767
+ ### 5.0.8 (2024-06-15)
768
+
769
+ - (bluefox) Added `modulefederation.admin.config.js` for module federation
770
+
771
+ ### 5.0.5 (2024-06-10)
772
+
773
+ - (bluefox) Sources were synchronized with admin
774
+
775
+ ### 5.0.4 (2024-06-07)
776
+
777
+ - (bluefox) Added better typing
778
+
779
+ ### 5.0.2 (2024-05-30)
780
+
781
+ - (bluefox) Added better typing
782
+ - (bluefox) Json-Config is now a separate package and must be installed additionally
783
+
784
+ ### 5.0.0 (2024-05-29)
785
+
786
+ - (bluefox) Types are now exported
787
+ - (bluefox) Translator renamed to Translate
788
+ - (bluefox) Breaking: Theme renamed to IobTheme because of the naming conflict
789
+
790
+ ### 4.13.24 (2024-05-25)
791
+
792
+ - (bluefox) Updated packages
793
+
794
+ - ### 4.13.22 (2024-05-23)
795
+ - (bluefox) Updated packages
796
+
797
+ ### 4.13.20 (2024-05-22)
798
+
799
+ - (bluefox) Better types added
800
+ - (bluefox) updated theme definitions
801
+ - (bluefox) corrected dates in cron dialog
802
+
803
+ ### 4.13.14 (2024-05-19)
804
+
805
+ - (bluefox) Updated packages
806
+
807
+ ### 4.13.13 (2024-05-09)
808
+
809
+ - (bluefox) Updated ioBroker types
810
+
811
+ ### 4.13.12 (2024-05-06)
812
+
813
+ - (bluefox) All files are migrated to Typescript
814
+
815
+ ### 4.13.11 (2024-04-23)
816
+
817
+ - (bluefox) Corrected the size of icons
818
+
819
+ ### 4.13.10 (2024-04-22)
820
+
821
+ - (bluefox) Migrated all icons to Typescript
822
+
823
+ ### 4.13.9 (2024-04-20)
824
+
825
+ - (bluefox) Updated socket-client package
826
+
827
+ ### 4.13.8 (2024-04-19)
828
+
829
+ - (bluefox) Corrected CRON selector
830
+
831
+ ### 4.13.7 (2024-04-19)
832
+
833
+ - (bluefox) Migrated ColorPicker to typescript
834
+
835
+ ### 4.13.6 (2024-04-11)
836
+
837
+ - (bluefox) Migrated TreeTable to typescript
838
+ - (bluefox) corrected the object subscription
839
+
840
+ ### 4.13.5 (2024-04-02)
841
+
842
+ - (bluefox) used new connection classes
843
+ - (bluefox) Improved the `SelectID` dialog
844
+
845
+ ### 4.13.3 (2024-04-01)
846
+
847
+ - (bluefox) used new connection classes
848
+
849
+ ### 4.12.3 (2024-03-30)
850
+
851
+ - (bluefox) Migrated legacy connection to typescript
852
+
853
+ ### 4.12.2 (2024-03-25)
854
+
855
+ - (bluefox) Added support for remote cloud
856
+
857
+ ### 4.11.6 (2024-03-19)
858
+
859
+ - (bluefox) Corrected rendering of LoaderMV
860
+
861
+ ### 4.11.4 (2024-03-18)
862
+
863
+ - (bluefox) Corrected types of IconPicker
864
+
865
+ ### 4.11.3 (2024-03-17)
866
+
867
+ - (bluefox) Made filters for the file selector dialog optional
868
+
869
+ ### 4.11.2 (2024-03-16)
870
+
871
+ - (bluefox) Migrated GenericApp to typescript
872
+
873
+ ### 4.10.4 (2024-03-16)
874
+
875
+ - (bluefox) Migrated some components to typescript
876
+
877
+ ### 4.10.1 (2024-03-11)
878
+
879
+ - (bluefox) Migrated some components to typescript
880
+
881
+ ### 4.9.11 (2024-03-08)
882
+
883
+ - (foxriver76) type GenericApp socket correctly
884
+
885
+ ### 4.9.10 (2024-02-21)
886
+
887
+ - (bluefox) translations
888
+ - (bluefox) updated JSON config
889
+
890
+ ### 4.9.9 (2024-02-16)
891
+
892
+ - (foxriver76) also check plugin state of instance to see if Sentry is explicitly disabled
893
+
894
+ ### 4.9.8 (2024-02-13)
895
+
896
+ - (bluefox) allowed hiding wizard in cron dialog
897
+
898
+ ### 4.9.7 (2024-02-03)
899
+
900
+ - (foxriver76) allow passing down the instance number do avoid determining from url
901
+
902
+ ### 4.9.5 (2024-01-01)
903
+
904
+ - (foxriver76) make `copyToClipboard` event parameter optional
905
+
906
+ ### 4.9.4 (2024-01-01)
907
+
908
+ - (foxriver76) try to fix `SelectID` scrolling
909
+
910
+ ### 4.9.2 (2023-12-30)
911
+
912
+ - (foxriver76) bump version of `@iobroker/json-config`
913
+
914
+ ### 4.9.1 (2023-12-22)
915
+
916
+ - (foxriver76) `@iobroker/json-config` moved to real dependencies
917
+
918
+ ### 4.9.0 (2023-12-22)
919
+
920
+ - (foxriver76) migrate to `@iobroker/json-config` module to have a single point of truth
921
+ - (bluefox) Allowed using of `filterFunc` as string
922
+
923
+ ### 4.8.1 (2023-12-14)
924
+
925
+ - (bluefox) Added Device manager to JSON Config
926
+
927
+ ### 4.7.15 (2023-12-12)
928
+
929
+ - (bluefox) Corrected parsing of a text
930
+
931
+ ### 4.7.13 (2023-12-10)
932
+
933
+ - (bluefox) Added possibility to define the root style and embedded property
934
+
935
+ ### 4.7.11 (2023-12-06)
936
+
937
+ - (bluefox) Extended color picker with "noInputField" option
938
+
939
+ ### 4.7.9 (2023-12-04)
940
+
941
+ - (bluefox) Corrected the icon picker
942
+
943
+ ### 4.7.8 (2023-12-04)
944
+
945
+ - (foxriver76) port to `@iobroker/types`
946
+
947
+ ### 4.7.6 (2023-11-29)
948
+
949
+ - (bluefox) Added translations
950
+
951
+ ### 4.7.5 (2023-11-28)
952
+
953
+ - (bluefox) Corrected subscribe on objects in the legacy connection
954
+
955
+ ### 4.7.4 (2023-11-23)
956
+
957
+ - (bluefox) Updated packages
958
+ - (bluefox) Made getStates method in legacy connection compatible with new one
959
+
960
+ ### 4.7.3 (2023-11-08)
961
+
962
+ - (bluefox) Updated packages
963
+
964
+ ### 4.7.2 (2023-11-03)
965
+
966
+ - (foxriver76) fixed problem with color picker, where editing TextField was buggy
967
+ - (foxriver76) fixed light mode color of a path in FileBrowser
968
+
969
+ ### 4.7.0 (2023-10-31)
970
+
971
+ - (bluefox) Synced with admin
972
+ - (bluefox) Added GIF to image files
973
+
974
+ ### 4.6.7 (2023-10-19)
975
+
976
+ - (bluefox) Added return value for `subscribeOnInstance` for Connection class
977
+
978
+ ### 4.6.6 (2023-10-13)
979
+
980
+ - (bluefox) Fixed the legacy connection
981
+
982
+ ### 4.6.5 (2023-10-12)
983
+
984
+ - (foxriver76) fixed object browser with date
985
+
986
+ ### 4.6.4 (2023-10-11)
987
+
988
+ - (bluefox) Updated the packages
989
+
990
+ ### 4.6.3 (2023-10-09)
991
+
992
+ - (bluefox) Just updated the packages
993
+ - (bluefox) Synced with admin
994
+
995
+ ### 4.6.2 (2023-09-29)
996
+
997
+ - (bluefox) Experimental feature added: update states on re-subscribe
998
+
999
+ ### 4.5.5 (2023-09-27)
1000
+
1001
+ - (bluefox) Added export for IconNoIcon
1002
+
1003
+ ### 4.5.4 (2023-09-17)
1004
+
1005
+ - (bluefox) Added the restricting to folder property for select file dialog
1006
+
1007
+ ### 4.5.3 (2023-08-20)
1008
+
1009
+ - (foxriver76) fixed css classes of TableResize, see https://github.com/ioBroker/ioBroker.admin/issues/1860
1010
+
1011
+ ### 4.5.2 (2023-08-20)
1012
+
1013
+ - (foxriver76) added missing export of TableResize
1014
+
1015
+ ### 4.5.1 (2023-08-19)
1016
+
1017
+ - (foxriver76) fix dialog TextInput
1018
+
1019
+ ### 4.5.0 (2023-08-18)
1020
+
1021
+ - (bluefox) Synchronize components with admin
1022
+
1023
+ ### 4.4.8 (2023-08-17)
1024
+
1025
+ - (bluefox) Added translations
1026
+
1027
+ ### 4.4.7 (2023-08-10)
1028
+
1029
+ - (bluefox) Added `subscribeStateAsync` method to wait for answer
1030
+ - (bluefox) Added support for arrays for un/subscriptions
1031
+
1032
+ ### 4.4.5 (2023-08-01)
1033
+
1034
+ - (bluefox) Updated packages
1035
+
1036
+ ### 4.3.3 (2023-07-28)
1037
+
1038
+ - (bluefox) Added translations
1039
+
1040
+ ### 4.3.0 (2023-07-19)
1041
+
1042
+ - (bluefox) Updated packages
1043
+ - (bluefox) Added translations
1044
+ - (bluefox) Synced object browser
1045
+ - (bluefox) formatting
1046
+
1047
+ ### 4.2.1 (2023-07-17)
1048
+
1049
+ - (bluefox) Updated packages
1050
+ - (bluefox) Added translations
1051
+
1052
+ ### 4.2.0 (2023-07-07)
1053
+
1054
+ - (bluefox) Updated packages
1055
+ - (bluefox) Added new method `getObjectsById` to the socket communication
1056
+
1057
+ ### 4.1.2 (2023-06-20)
1058
+
1059
+ - (bluefox) Allowed setting theme name directly by theme toggle
790
1060
 
791
- ### 6.1.6 (2024-07-23)
792
- * (bluefox) Optimize package
1061
+ ### 4.1.0 (2023-05-10)
793
1062
 
794
- ### 6.1.5 (2024-07-20)
795
- * (bluefox) Added sources to package
1063
+ - (bluefox) `craco-module-federation.js` was added. For node 16
796
1064
 
797
- ### 6.1.3 (2024-07-20)
798
- * (bluefox) Better typing of legacy connection
1065
+ ### 4.0.27 (2023-05-09)
799
1066
 
800
- ### 6.1.1 (2024-07-16)
801
- * (bluefox) Added translations
1067
+ - (bluefox) Allowed showing only specific root in SelectIDDialog
802
1068
 
803
- ### 6.1.0 (2024-07-15)
804
- * (bluefox) Replace by CRON to text the package to `cronstrue`
1069
+ ### 4.0.26 (2023-05-08)
805
1070
 
806
- ### 6.0.19 (2024-07-14)
807
- * (bluefox) added some packages for federation
1071
+ - (bluefox) Added IDs to the buttons in the dialog for GUI tests
808
1072
 
809
- ### 6.0.17 (2024-07-14)
810
- * (bluefox) Allowed playing mp3 files in the file browser
811
- * (bluefox) Corrected jump by object selection
1073
+ ### 4.0.25 (2023-04-23)
812
1074
 
813
- ### 6.0.14 (2024-07-07)
814
- * (bluefox) Corrected theme type selection
1075
+ - (bluefox) Extended `TextWithIcon` with defined color and icon
815
1076
 
816
- ### 6.0.13 (2024-06-30)
817
- * (bluefox) Corrected color picker
1077
+ ### 4.0.24 (2023-04-03)
818
1078
 
819
- ### 6.0.12 (2024-06-29)
820
- * (bluefox) Added support for the overrides in the theme
1079
+ - (bluefox) Updated the file selector in tile mode
821
1080
 
822
- ### 6.0.10 (2024-06-27)
823
- * (bluefox) Added translation
824
- * (bluefox) Mobile object browser improved
1081
+ ### 4.0.23 (2023-03-27)
825
1082
 
826
- ### 6.0.9 (2024-06-26)
827
- * (bluefox) Corrected Icons
1083
+ - (bluefox) Added translations
828
1084
 
829
- ### 6.0.8 (2024-06-26)
830
- * (bluefox) Corrected types of the select ID dialog
831
- * (bluefox) Made the tooltips neutral to the pointer events
1085
+ ### 4.0.22 (2023-03-22)
832
1086
 
833
- ### 6.0.6 (2024-06-24)
834
- * (bluefox) Synchronised with admin
835
- * (bluefox) Added translations for time scheduler
1087
+ - (bluefox) Re-Activate legacy connection
836
1088
 
837
- ### 6.0.4 (2024-06-21)
838
- * (bluefox) Removed the usage of `withStyles` in favor of `sx` and `style` properties (see [Migration from v5 to v6](#migration-from-v5-to-v6)
839
- * (bluefox) (BREAKING) Higher version of `@mui/material` (5.15.20) is used
1089
+ ### 4.0.21 (2023-03-22)
840
1090
 
841
- ### 5.0.8 (2024-06-15)
842
- * (bluefox) Added `modulefederation.admin.config.js` for module federation
1091
+ - (bluefox) Added translations
843
1092
 
844
- ### 5.0.5 (2024-06-10)
845
- * (bluefox) Sources were synchronized with admin
1093
+ ### 4.0.20 (2023-03-21)
846
1094
 
847
- ### 5.0.4 (2024-06-07)
848
- * (bluefox) Added better typing
1095
+ - (bluefox) Color picker was improved
849
1096
 
850
- ### 5.0.2 (2024-05-30)
851
- * (bluefox) Added better typing
852
- * (bluefox) Json-Config is now a separate package and must be installed additionally
1097
+ ### 4.0.19 (2023-03-20)
853
1098
 
854
- ### 5.0.0 (2024-05-29)
855
- * (bluefox) Types are now exported
856
- * (bluefox) Translator renamed to Translate
857
- * (bluefox) Breaking: Theme renamed to IobTheme because of the naming conflict
1099
+ - (bluefox) Packages were updated
1100
+ - (bluefox) Added new translations
858
1101
 
859
- ### 4.13.24 (2024-05-25)
860
- * (bluefox) Updated packages
861
-
862
- * ### 4.13.22 (2024-05-23)
863
- * (bluefox) Updated packages
1102
+ ### 4.0.18 (2023-03-16)
864
1103
 
865
- ### 4.13.20 (2024-05-22)
866
- * (bluefox) Better types added
867
- * (bluefox) updated theme definitions
868
- * (bluefox) corrected dates in cron dialog
1104
+ - (bluefox) Packages were updated
869
1105
 
870
- ### 4.13.14 (2024-05-19)
871
- * (bluefox) Updated packages
1106
+ ### 4.0.17 (2023-03-15)
872
1107
 
873
- ### 4.13.13 (2024-05-09)
874
- * (bluefox) Updated ioBroker types
1108
+ - (bluefox) Added translations
1109
+ - (bluefox) Added port controller to JSON config
875
1110
 
876
- ### 4.13.12 (2024-05-06)
877
- * (bluefox) All files are migrated to Typescript
1111
+ ### 4.0.15 (2023-03-12)
878
1112
 
879
- ### 4.13.11 (2024-04-23)
880
- * (bluefox) Corrected the size of icons
1113
+ - (bluefox) Updated the object browser and file browser
881
1114
 
882
- ### 4.13.10 (2024-04-22)
883
- * (bluefox) Migrated all icons to Typescript
1115
+ ### 4.0.14 (2023-03-03)
884
1116
 
885
- ### 4.13.9 (2024-04-20)
886
- * (bluefox) Updated socket-client package
1117
+ - (bluefox) added handler of alert messages
887
1118
 
888
- ### 4.13.8 (2024-04-19)
889
- * (bluefox) Corrected CRON selector
1119
+ ### 4.0.13 (2023-02-15)
890
1120
 
891
- ### 4.13.7 (2024-04-19)
892
- * (bluefox) Migrated ColorPicker to typescript
1121
+ - (bluefox) Corrected the theme button
893
1122
 
894
- ### 4.13.6 (2024-04-11)
895
- * (bluefox) Migrated TreeTable to typescript
896
- * (bluefox) corrected the object subscription
1123
+ ### 4.0.12 (2023-02-15)
897
1124
 
898
- ### 4.13.5 (2024-04-02)
899
- * (bluefox) used new connection classes
900
- * (bluefox) Improved the `SelectID` dialog
1125
+ - (bluefox) made the fix for `echarts`
901
1126
 
902
- ### 4.13.3 (2024-04-01)
903
- * (bluefox) used new connection classes
1127
+ ### 4.0.11 (2023-02-14)
904
1128
 
905
- ### 4.12.3 (2024-03-30)
906
- * (bluefox) Migrated legacy connection to typescript
1129
+ - (bluefox) Updated packages
1130
+ - (bluefox) The `chartReady` event was omitted
907
1131
 
908
- ### 4.12.2 (2024-03-25)
909
- * (bluefox) Added support for remote cloud
1132
+ ### 4.0.10 (2023-02-10)
910
1133
 
911
- ### 4.11.6 (2024-03-19)
912
- * (bluefox) Corrected rendering of LoaderMV
1134
+ - (bluefox) Updated packages
1135
+ - (bluefox) made the fix for `material`
913
1136
 
914
- ### 4.11.4 (2024-03-18)
915
- * (bluefox) Corrected types of IconPicker
1137
+ ### 4.0.9 (2023-02-02)
916
1138
 
917
- ### 4.11.3 (2024-03-17)
918
- * (bluefox) Made filters for the file selector dialog optional
1139
+ - (bluefox) Updated packages
919
1140
 
920
- ### 4.11.2 (2024-03-16)
921
- * (bluefox) Migrated GenericApp to typescript
1141
+ ### 4.0.8 (2022-12-19)
922
1142
 
923
- ### 4.10.4 (2024-03-16)
924
- * (bluefox) Migrated some components to typescript
1143
+ - (bluefox) Extended socket with `log` command
925
1144
 
926
- ### 4.10.1 (2024-03-11)
927
- * (bluefox) Migrated some components to typescript
1145
+ ### 4.0.6 (2022-12-19)
928
1146
 
929
- ### 4.9.11 (2024-03-08)
930
- * (foxriver76) type GenericApp socket correctly
1147
+ - (bluefox) Corrected URL for the connection
931
1148
 
932
- ### 4.9.10 (2024-02-21)
933
- * (bluefox) translations
934
- * (bluefox) updated json config
1149
+ ### 4.0.5 (2022-12-14)
935
1150
 
936
- ### 4.9.9 (2024-02-16)
937
- * (foxriver76) also check plugin state of instance to see if Sentry is explicitly disabled
1151
+ - (bluefox) Added support of custom palette for color picker
938
1152
 
939
- ### 4.9.8 (2024-02-13)
940
- * (bluefox) allowed hiding wizard in cron dialog
1153
+ ### 4.0.2 (2022-12-01)
941
1154
 
942
- ### 4.9.7 (2024-02-03)
943
- * (foxriver76) allow passing down the instance number do avoid determining from url
1155
+ - (bluefox) use `@iobroker/socket-client` instead of `Connection.tsx`
944
1156
 
945
- ### 4.9.5 (2024-01-01)
946
- * (foxriver76) make `copyToClipboard` event parameter optional
1157
+ ### 3.5.3 (2022-11-30)
947
1158
 
948
- ### 4.9.4 (2024-01-01)
949
- * (foxriver76) try to fix `SelectID` scrolling
1159
+ - (bluefox) Improved `renderTextWithA` function to support `<b>` and `<i>` tags
950
1160
 
951
- ### 4.9.2 (2023-12-30)
952
- * (foxriver76) bump version of `@iobroker/json-config`
1161
+ ### 3.5.2 (2022-11-30)
953
1162
 
954
- ### 4.9.1 (2023-12-22)
955
- * (foxriver76) `@iobroker/json-config` moved to real dependencies
1163
+ - (bluefox) updated json config component
956
1164
 
957
- ### 4.9.0 (2023-12-22)
958
- * (foxriver76) migrate to `@iobroker/json-config` module to have a single point of truth
959
- * (bluefox) Allowed using of `filterFunc` as string
1165
+ ### 3.4.1 (2022-11-29)
960
1166
 
961
- ### 4.8.1 (2023-12-14)
962
- * (bluefox) Added Device manager to JSON Config
1167
+ - (bluefox) Added button text for message dialog
963
1168
 
964
- ### 4.7.15 (2023-12-12)
965
- * (bluefox) Corrected parsing of a text
1169
+ ### 3.4.0 (2022-11-29)
966
1170
 
967
- ### 4.7.13 (2023-12-10)
968
- * (bluefox) Added possibility to define the root style and embedded property
1171
+ - (bluefox) Added file selector
969
1172
 
970
- ### 4.7.11 (2023-12-06)
971
- * (bluefox) Extended color picker with "noInputField" option
1173
+ ### 3.3.0 (2022-11-26)
972
1174
 
973
- ### 4.7.9 (2023-12-04)
974
- * (bluefox) Corrected the icon picker
1175
+ - (bluefox) Added subscribe on files
975
1176
 
976
- ### 4.7.8 (2023-12-04)
977
- * (foxriver76) port to `@iobroker/types`
1177
+ ### 3.2.7 (2022-11-13)
978
1178
 
979
- ### 4.7.6 (2023-11-29)
980
- * (bluefox) Added translations
1179
+ - (bluefox) Added `fullWidth` property to `Dialog`
981
1180
 
982
- ### 4.7.5 (2023-11-28)
983
- * (bluefox) Corrected subscribe on objects in the legacy connection
1181
+ ### 3.2.6 (2022-11-08)
984
1182
 
985
- ### 4.7.4 (2023-11-23)
986
- * (bluefox) Updated packages
987
- * (bluefox) Made getStates method in legacy connection compatible with new one
1183
+ - (xXBJXx) Improved TreeTable component
988
1184
 
989
- ### 4.7.3 (2023-11-08)
990
- * (bluefox) Updated packages
1185
+ ### 3.2.5 (2022-11-08)
991
1186
 
992
- ### 4.7.2 (2023-11-03)
993
- * (foxriver76) fixed problem with color picker, where editing TextField was buggy
994
- * (foxriver76) fixed light mode color of a path in FileBrowser
1187
+ - (bluefox) Added the role filter for the object browser
995
1188
 
996
- ### 4.7.0 (2023-10-31)
997
- * (bluefox) Synced with admin
998
- * (bluefox) Added GIF to image files
1189
+ ### 3.2.4 (2022-11-03)
999
1190
 
1000
- ### 4.6.7 (2023-10-19)
1001
- * (bluefox) Added return value for `subscribeOnInstance` for Connection class
1191
+ - (bluefox) Added support for alfa channel for `invertColor`
1002
1192
 
1003
- ### 4.6.6 (2023-10-13)
1004
- * (bluefox) Fixed the legacy connection
1193
+ ### 3.2.3 (2022-10-26)
1005
1194
 
1006
- ### 4.6.5 (2023-10-12)
1007
- * (foxriver76) fixed object browser with date
1195
+ - (bluefox) Corrected expert mode for object browser
1008
1196
 
1009
- ### 4.6.4 (2023-10-11)
1010
- * (bluefox) Updated the packages
1197
+ ### 3.2.2 (2022-10-25)
1011
1198
 
1012
- ### 4.6.3 (2023-10-09)
1013
- * (bluefox) Just updated the packages
1014
- * (bluefox) Synced with admin
1199
+ - (bluefox) Added support for prefixes for translations
1015
1200
 
1016
- ### 4.6.2 (2023-09-29)
1017
- * (bluefox) Experimental feature added: update states on re-subscribe
1201
+ ### 3.2.1 (2022-10-24)
1018
1202
 
1019
- ### 4.5.5 (2023-09-27)
1020
- * (bluefox) Added export for IconNoIcon
1203
+ - (bluefox) Corrected color inversion
1021
1204
 
1022
- ### 4.5.4 (2023-09-17)
1023
- * (bluefox) Added the restricting to folder property for select file dialog
1205
+ ### 3.2.0 (2022-10-19)
1024
1206
 
1025
- ### 4.5.3 (2023-08-20)
1026
- * (foxriver76) fixed css classes of TableResize, see https://github.com/ioBroker/ioBroker.admin/issues/1860
1207
+ - (bluefox) Added ukrainian translation
1027
1208
 
1028
- ### 4.5.2 (2023-08-20)
1029
- * (foxriver76) added missing export of TableResize
1209
+ ### 3.1.35 (2022-10-17)
1030
1210
 
1031
- ### 4.5.1 (2023-08-19)
1032
- * (foxriver76) fix dialog TextInput
1211
+ - (bluefox) small changes for material
1033
1212
 
1034
- ### 4.5.0 (2023-08-18)
1035
- * (bluefox) Synchronize components with admin
1213
+ ### 3.1.34 (2022-08-24)
1036
1214
 
1037
- ### 4.4.8 (2023-08-17)
1038
- * (bluefox) Added translations
1215
+ - (bluefox) Implemented fallback to english by translations
1039
1216
 
1040
- ### 4.4.7 (2023-08-10)
1041
- * (bluefox) Added `subscribeStateAsync` method to wait for answer
1042
- * (bluefox) Added support for arrays for un/subscriptions
1217
+ ### 3.1.33 (2022-08-24)
1043
1218
 
1044
- ### 4.4.5 (2023-08-01)
1045
- * (bluefox) Updated packages
1219
+ - (bluefox) Added support for onchange flag
1046
1220
 
1047
- ### 4.3.3 (2023-07-28)
1048
- * (bluefox) Added translations
1221
+ ### 3.1.30 (2022-08-23)
1049
1222
 
1050
- ### 4.3.0 (2023-07-19)
1051
- * (bluefox) Updated packages
1052
- * (bluefox) Added translations
1053
- * (bluefox) Synced object browser
1054
- * (bluefox) formatting
1223
+ - (bluefox) Added method `getCompactSystemRepositories`
1224
+ - (bluefox) corrected error in `ObjectBrowser`
1055
1225
 
1056
- ### 4.2.1 (2023-07-17)
1057
- * (bluefox) Updated packages
1058
- * (bluefox) Added translations
1226
+ ### 3.1.27 (2022-08-01)
1059
1227
 
1060
- ### 4.2.0 (2023-07-07)
1061
- * (bluefox) Updated packages
1062
- * (bluefox) Added new method `getObjectsById` to the socket communication
1228
+ - (bluefox) Disable file editing in FileViewer
1063
1229
 
1064
- ### 4.1.2 (2023-06-20)
1065
- * (bluefox) Allowed setting theme name directly by theme toggle
1230
+ ### 3.1.26 (2022-08-01)
1066
1231
 
1067
- ### 4.1.0 (2023-05-10)
1068
- * (bluefox) `craco-module-federation.js` was added. For node 16
1232
+ - (bluefox) Added translations
1233
+ - (bluefox) JSON schema was extended with missing definitions
1069
1234
 
1070
- ### 4.0.27 (2023-05-09)
1071
- * (bluefox) Allowed showing only specific root in SelectIDDialog
1235
+ ### 3.1.24 (2022-07-28)
1072
1236
 
1073
- ### 4.0.26 (2023-05-08)
1074
- * (bluefox) Added IDs to the buttons in the dialog for GUI tests
1237
+ - (bluefox) Updated file browser and object browser
1075
1238
 
1076
- ### 4.0.25 (2023-04-23)
1077
- * (bluefox) Extended `TextWithIcon` with defined color and icon
1239
+ ### 3.1.23 (2022-07-25)
1078
1240
 
1079
- ### 4.0.24 (2023-04-03)
1080
- * (bluefox) Updated the file selector in tile mode
1241
+ - (bluefox) Extend custom filter for object selector
1081
1242
 
1082
- ### 4.0.23 (2023-03-27)
1083
- * (bluefox) Added translations
1243
+ ### 3.1.22 (2022-07-22)
1084
1244
 
1085
- ### 4.0.22 (2023-03-22)
1086
- * (bluefox) Re-Activate legacy connection
1245
+ - (bluefox) Added i18n tools for development
1087
1246
 
1088
- ### 4.0.21 (2023-03-22)
1089
- * (bluefox) Added translations
1247
+ ### 3.1.20 (2022-07-14)
1090
1248
 
1091
- ### 4.0.20 (2023-03-21)
1092
- * (bluefox) Color picker was improved
1249
+ - (bluefox) Allowed to show select dialog with the expert mode enabled
1093
1250
 
1094
- ### 4.0.19 (2023-03-20)
1095
- * (bluefox) Packages were updated
1096
- * (bluefox) Added new translations
1251
+ ### 3.1.19 (2022-07-08)
1097
1252
 
1098
- ### 4.0.18 (2023-03-16)
1099
- * (bluefox) Packages were updated
1253
+ - (bluefox) Allowed extending translations for all languages together
1100
1254
 
1101
- ### 4.0.17 (2023-03-15)
1102
- * (bluefox) Added translations
1103
- * (bluefox) Added port controller to JSON config
1255
+ ### 3.1.18 (2022-07-06)
1104
1256
 
1105
- ### 4.0.15 (2023-03-12)
1106
- * (bluefox) Updated the object browser and file browser
1257
+ - (bluefox) Added translation
1107
1258
 
1108
- ### 4.0.14 (2023-03-03)
1109
- * (bluefox) added handler of alert messages
1259
+ ### 3.1.17 (2022-07-05)
1110
1260
 
1111
- ### 4.0.13 (2023-02-15)
1112
- * (bluefox) Corrected the theme button
1261
+ - (bluefox) Deactivate JSON editor for JSONConfig because of space
1113
1262
 
1114
- ### 4.0.12 (2023-02-15)
1115
- * (bluefox) made the fix for `echarts`
1263
+ ### 3.1.16 (2022-06-27)
1116
1264
 
1117
- ### 4.0.11 (2023-02-14)
1118
- * (bluefox) Updated packages
1119
- * (bluefox) The `chartReady` event was omitted
1265
+ - (bluefox) Update object browser
1120
1266
 
1121
- ### 4.0.10 (2023-02-10)
1122
- * (bluefox) Updated packages
1123
- * (bluefox) made the fix for `material`
1267
+ ### 3.1.15 (2022-06-27)
1124
1268
 
1125
- ### 4.0.9 (2023-02-02)
1126
- * (bluefox) Updated packages
1269
+ - (bluefox) Allowed using of spaces in name
1127
1270
 
1128
- ### 4.0.8 (2022-12-19)
1129
- * (bluefox) Extended socket with `log` command
1271
+ ### 3.1.14 (2022-06-23)
1130
1272
 
1131
- ### 4.0.6 (2022-12-19)
1132
- * (bluefox) Corrected URL for the connection
1273
+ - (bluefox) Added translations
1133
1274
 
1134
- ### 4.0.5 (2022-12-14)
1135
- * (bluefox) Added support of custom palette for color picker
1275
+ ### 3.1.11 (2022-06-22)
1136
1276
 
1137
- ### 4.0.2 (2022-12-01)
1138
- * (bluefox) use `@iobroker/socket-client` instead of `Connection.tsx`
1277
+ - (bluefox) Added preparations for iobroker cloud
1139
1278
 
1140
- ### 3.5.3 (2022-11-30)
1141
- * (bluefox) Improved `renderTextWithA` function to support `<b>` and `<i>` tags
1279
+ ### 3.1.10 (2022-06-22)
1142
1280
 
1143
- ### 3.5.2 (2022-11-30)
1144
- * (bluefox) updated json config component
1281
+ - (bluefox) Added translations
1145
1282
 
1146
- ### 3.4.1 (2022-11-29)
1147
- * (bluefox) Added button text for message dialog
1283
+ ### 3.1.9 (2022-06-20)
1148
1284
 
1149
- ### 3.4.0 (2022-11-29)
1150
- * (bluefox) Added file selector
1285
+ - (bluefox) Allowed working behind reverse proxy
1151
1286
 
1152
- ### 3.3.0 (2022-11-26)
1153
- * (bluefox) Added subscribe on files
1287
+ ### 3.1.7 (2022-06-19)
1154
1288
 
1155
- ### 3.2.7 (2022-11-13)
1156
- * (bluefox) Added `fullWidth` property to `Dialog`
1289
+ - (bluefox) Added file select dialog
1157
1290
 
1158
- ### 3.2.6 (2022-11-08)
1159
- * (xXBJXx) Improved TreeTable component
1291
+ ### 3.1.3 (2022-06-13)
1160
1292
 
1161
- ### 3.2.5 (2022-11-08)
1162
- * (bluefox) Added the role filter for the object browser
1293
+ - (bluefox) Added table with resized headers
1163
1294
 
1164
- ### 3.2.4 (2022-11-03)
1165
- * (bluefox) Added support for alfa channel for `invertColor`
1295
+ ### 3.1.2 (2022-06-09)
1166
1296
 
1167
- ### 3.2.3 (2022-10-26)
1168
- * (bluefox) Corrected expert mode for object browser
1297
+ - (bluefox) Added new document icon (read only)
1169
1298
 
1170
- ### 3.2.2 (2022-10-25)
1171
- * (bluefox) Added support for prefixes for translations
1299
+ ### 3.1.1 (2022-06-09)
1172
1300
 
1173
- ### 3.2.1 (2022-10-24)
1174
- * (bluefox) Corrected color inversion
1301
+ - (bluefox) Allowed working behind reverse proxy
1175
1302
 
1176
- ### 3.2.0 (2022-10-19)
1177
- * (bluefox) Added ukrainian translation
1303
+ ### 3.1.0 (2022-06-07)
1178
1304
 
1179
- ### 3.1.35 (2022-10-17)
1180
- * (bluefox) small changes for material
1305
+ - (bluefox) Some german texts were corrected
1181
1306
 
1182
- ### 3.1.34 (2022-08-24)
1183
- * (bluefox) Implemented fallback to english by translations
1307
+ ### 3.0.17 (2022-06-03)
1184
1308
 
1185
- ### 3.1.33 (2022-08-24)
1186
- * (bluefox) Added support for onchange flag
1309
+ - (bluefox) Allowed calling getAdapterInstances not for admin too
1187
1310
 
1188
- ### 3.1.30 (2022-08-23)
1189
- * (bluefox) Added method `getCompactSystemRepositories`
1190
- * (bluefox) corrected error in `ObjectBrowser`
1311
+ ### 3.0.15 (2022-06-01)
1191
1312
 
1192
- ### 3.1.27 (2022-08-01)
1193
- * (bluefox) Disable file editing in FileViewer
1313
+ - (bluefox) Updated JsonConfigComponent: password, table
1194
1314
 
1195
- ### 3.1.26 (2022-08-01)
1196
- * (bluefox) Added translations
1197
- * (bluefox) JSON schema was extended with missing definitions
1315
+ ### 3.0.14 (2022-05-25)
1198
1316
 
1199
- ### 3.1.24 (2022-07-28)
1200
- * (bluefox) Updated file browser and object browser
1317
+ - (bluefox) Added ConfigGeneric to import
1201
1318
 
1202
- ### 3.1.23 (2022-07-25)
1203
- * (bluefox) Extend custom filter for object selector
1319
+ ### 3.0.7 (2022-05-25)
1204
1320
 
1205
- ### 3.1.22 (2022-07-22)
1206
- * (bluefox) Added i18n tools for development
1321
+ - (bluefox) Made the module definitions
1207
1322
 
1208
- ### 3.1.20 (2022-07-14)
1209
- * (bluefox) Allowed to show select dialog with the expert mode enabled
1323
+ ### 3.0.6 (2022-05-25)
1210
1324
 
1211
- ### 3.1.19 (2022-07-08)
1212
- * (bluefox) Allowed extending translations for all languages together
1325
+ - (bluefox) Added JsonConfigComponent
1213
1326
 
1214
- ### 3.1.18 (2022-07-06)
1215
- * (bluefox) Added translation
1327
+ ### 2.1.11 (2022-05-24)
1216
1328
 
1217
- ### 3.1.17 (2022-07-05)
1218
- * (bluefox) Deactivate JSON editor for JSONConfig because of space
1329
+ - (bluefox) Update file browser. It supports now the file changed events.
1219
1330
 
1220
- ### 3.1.16 (2022-06-27)
1221
- * (bluefox) Update object browser
1331
+ ### 2.1.10 (2022-05-24)
1222
1332
 
1223
- ### 3.1.15 (2022-06-27)
1224
- * (bluefox) Allowed using of spaces in name
1333
+ - (bluefox) Corrected object browser
1225
1334
 
1226
- ### 3.1.14 (2022-06-23)
1227
- * (bluefox) Added translations
1335
+ ### 2.1.9 (2022-05-16)
1228
1336
 
1229
- ### 3.1.11 (2022-06-22)
1230
- * (bluefox) Added preparations for iobroker cloud
1337
+ - (bluefox) Corrected expert mode in object browser
1231
1338
 
1232
- ### 3.1.10 (2022-06-22)
1233
- * (bluefox) Added translations
1339
+ ### 2.1.7 (2022-05-09)
1234
1340
 
1235
- ### 3.1.9 (2022-06-20)
1236
- * (bluefox) Allowed working behind reverse proxy
1341
+ - (bluefox) Changes were synchronized with adapter-react-v5
1342
+ - (bluefox) Added `I18n.disableWarning` method
1237
1343
 
1238
- ### 3.1.7 (2022-06-19)
1239
- * (bluefox) Added file select dialog
1344
+ ### 2.1.6 (2022-03-28)
1240
1345
 
1241
- ### 3.1.3 (2022-06-13)
1242
- * (bluefox) Added table with resized headers
1346
+ - (bluefox) Added `log` method to connection
1347
+ - (bluefox) Corrected translations
1243
1348
 
1244
- ### 3.1.2 (2022-06-09)
1245
- * (bluefox) Added new document icon (read only)
1349
+ ### 2.1.1 (2022-03-27)
1246
1350
 
1247
- ### 3.1.1 (2022-06-09)
1248
- * (bluefox) Allowed working behind reverse proxy
1351
+ - (bluefox) Corrected error in TreeTable
1249
1352
 
1250
- ### 3.1.0 (2022-06-07)
1251
- * (bluefox) Some german texts were corrected
1353
+ ### 2.1.0 (2022-03-26)
1252
1354
 
1253
- ### 3.0.17 (2022-06-03)
1254
- * (bluefox) Allowed calling getAdapterInstances not for admin too
1355
+ - (bluefox) BREAKING_CHANGE: Corrected error with readFile(base64=false)
1255
1356
 
1256
- ### 3.0.15 (2022-06-01)
1257
- * (bluefox) Updated JsonConfigComponent: password, table
1357
+ ### 2.0.0 (2022-03-26)
1258
1358
 
1259
- ### 3.0.14 (2022-05-25)
1260
- * (bluefox) Added ConfigGeneric to import
1359
+ - (bluefox) Initial version
1261
1360
 
1262
- ### 3.0.7 (2022-05-25)
1263
- * (bluefox) Made the module definitions
1361
+ ### 0.1.0 (2022-03-23)
1264
1362
 
1265
- ### 3.0.6 (2022-05-25)
1266
- * (bluefox) Added JsonConfigComponent
1363
+ - (bluefox) Fixed theme errors
1267
1364
 
1268
- ### 2.1.11 (2022-05-24)
1269
- * (bluefox) Update file browser. It supports now the file changed events.
1365
+ ### 0.0.4 (2022-03-22)
1270
1366
 
1271
- ### 2.1.10 (2022-05-24)
1272
- * (bluefox) Corrected object browser
1367
+ - (bluefox) Fixed eslint warnings
1273
1368
 
1274
- ### 2.1.9 (2022-05-16)
1275
- * (bluefox) Corrected expert mode in object browser
1369
+ ### 0.0.3 (2022-03-19)
1276
1370
 
1277
- ### 2.1.7 (2022-05-09)
1278
- * (bluefox) Changes were synchronized with adapter-react-v5
1279
- * (bluefox) Added `I18n.disableWarning` method
1371
+ - (bluefox) beta version
1280
1372
 
1281
- ### 2.1.6 (2022-03-28)
1282
- * (bluefox) Added `log` method to connection
1283
- * (bluefox) Corrected translations
1373
+ ### 0.0.2 (2022-02-24)
1284
1374
 
1285
- ### 2.1.1 (2022-03-27)
1286
- * (bluefox) Corrected error in TreeTable
1375
+ - (bluefox) try to publish a first version
1287
1376
 
1288
- ### 2.1.0 (2022-03-26)
1289
- * (bluefox) BREAKING_CHANGE: Corrected error with readFile(base64=false)
1377
+ ### 0.0.1 (2022-02-24)
1290
1378
 
1291
- ### 2.0.0 (2022-03-26)
1292
- * (bluefox) Initial version
1379
+ - initial commit
1293
1380
 
1294
- ### 0.1.0 (2022-03-23)
1295
- * (bluefox) Fixed theme errors
1381
+ ## License
1296
1382
 
1297
- ### 0.0.4 (2022-03-22)
1298
- * (bluefox) Fixed eslint warnings
1383
+ The MIT License (MIT)
1299
1384
 
1300
- ### 0.0.3 (2022-03-19)
1301
- * (bluefox) beta version
1385
+ Copyright (c) 2019-2024 bluefox <dogafox@gmail.com>
1302
1386
 
1303
- ### 0.0.2 (2022-02-24)
1304
- * (bluefox) try to publish a first version
1387
+ Permission is hereby granted, free of charge, to any person obtaining a copy
1388
+ of this software and associated documentation files (the "Software"), to deal
1389
+ in the Software without restriction, including without limitation the rights
1390
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1391
+ copies of the Software, and to permit persons to whom the Software is
1392
+ furnished to do so, subject to the following conditions:
1305
1393
 
1306
- ### 0.0.1 (2022-02-24)
1307
- * initial commit
1394
+ The above copyright notice and this permission notice shall be included in all
1395
+ copies or substantial portions of the Software.
1308
1396
 
1309
- ## License
1310
- The MIT License (MIT)
1311
-
1312
- Copyright (c) 2019-2024 bluefox <dogafox@gmail.com>
1313
-
1314
- Permission is hereby granted, free of charge, to any person obtaining a copy
1315
- of this software and associated documentation files (the "Software"), to deal
1316
- in the Software without restriction, including without limitation the rights
1317
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1318
- copies of the Software, and to permit persons to whom the Software is
1319
- furnished to do so, subject to the following conditions:
1320
-
1321
- The above copyright notice and this permission notice shall be included in all
1322
- copies or substantial portions of the Software.
1323
-
1324
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1325
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1326
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1327
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1328
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1329
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1397
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1398
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1399
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1400
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1401
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1402
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1330
1403
  SOFTWARE.