@iobroker/adapter-react-v5 7.1.3 → 7.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AdminConnection.js +2 -0
- package/README.md +1441 -1437
- package/assets/lamp_ceiling.svg +8 -8
- package/assets/lamp_table.svg +7 -7
- package/assets/no_icon.svg +9 -9
- package/i18n/de.json +438 -438
- package/i18n/en.json +438 -438
- package/i18n/es.json +438 -438
- package/i18n/fr.json +438 -438
- package/i18n/it.json +438 -438
- package/i18n/nl.json +438 -438
- package/i18n/pl.json +438 -438
- package/i18n/pt.json +438 -438
- package/i18n/ru.json +438 -438
- package/i18n/uk.json +438 -438
- package/i18n/zh-cn.json +438 -438
- package/index.js +3 -1
- package/package.json +2 -2
- package/src/Components/ComplexCron.tsx +561 -561
- package/src/Components/TabContainer.tsx +57 -57
- package/src/Dialogs/ComplexCron.tsx +163 -163
- package/tasks.js +91 -91
package/README.md
CHANGED
|
@@ -1,1437 +1,1441 @@
|
|
|
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.
|
|
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.
|
|
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": [">0.2%", "not dead", "not ie <= 11", "not op_mini all"]
|
|
51
|
-
}
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
5. Call in `src`: `npm install`
|
|
55
|
-
6. Copy `tasks.js` into `src`: `cp node_modules/@iobroker/adapter-react-v5/tasks.js tasks.js`
|
|
56
|
-
7. Add scripts to your `package.json` `scripts` section:
|
|
57
|
-
|
|
58
|
-
```json
|
|
59
|
-
"scripts": {
|
|
60
|
-
"0-clean": "node tasks --0-clean",
|
|
61
|
-
"1-npm": "node tasks --1-npm",
|
|
62
|
-
"2-build": "node tasks --2-build",
|
|
63
|
-
"3-copy": "node tasks --3-copy",
|
|
64
|
-
"4-patch": "node tasks --4-patch",
|
|
65
|
-
"build": "node tasks"
|
|
66
|
-
}
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
7. Start your dummy application `npm run start` for developing or build with `npm run build` and
|
|
70
|
-
copy files in `build` directory to `www` or to `admin`. In the admin you must rename `index.html` to `index_m.html`.
|
|
71
|
-
8. You can do that with `npm` tasks: `npm run build`
|
|
72
|
-
|
|
73
|
-
## Development
|
|
74
|
-
|
|
75
|
-
1. Add `socket.io` to `public/index.html`.
|
|
76
|
-
After
|
|
77
|
-
|
|
78
|
-
```html
|
|
79
|
-
<link
|
|
80
|
-
rel="manifest"
|
|
81
|
-
href="%PUBLIC_URL%/manifest.json"
|
|
82
|
-
/>
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
insert
|
|
86
|
-
|
|
87
|
-
```html
|
|
88
|
-
<script>
|
|
89
|
-
const script = document.createElement('script');
|
|
90
|
-
window.registerSocketOnLoad = function (cb) {
|
|
91
|
-
window.socketLoadedHandler = cb;
|
|
92
|
-
};
|
|
93
|
-
const parts = (window.location.search || '').replace(/^\?/, '').split('&');
|
|
94
|
-
const query = {};
|
|
95
|
-
parts.forEach(item => {
|
|
96
|
-
const [name, val] = item.split('=');
|
|
97
|
-
query[decodeURIComponent(name)] = val !== undefined ? decodeURIComponent(val) : true;
|
|
98
|
-
});
|
|
99
|
-
script.onload = function () {
|
|
100
|
-
typeof window.socketLoadedHandler === 'function' && window.socketLoadedHandler();
|
|
101
|
-
};
|
|
102
|
-
script.src =
|
|
103
|
-
window.location.port === '3000'
|
|
104
|
-
? window.location.protocol +
|
|
105
|
-
'//' +
|
|
106
|
-
(query.host || window.location.hostname) +
|
|
107
|
-
':' +
|
|
108
|
-
(query.port || 8081) +
|
|
109
|
-
'/lib/js/socket.io.js'
|
|
110
|
-
: '%PUBLIC_URL%/../../lib/js/socket.io.js';
|
|
111
|
-
|
|
112
|
-
document.head.appendChild(script);
|
|
113
|
-
</script>
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
3. Add to App.js constructor initialization for I18n:
|
|
117
|
-
|
|
118
|
-
```jsx
|
|
119
|
-
class App extends GenericApp {
|
|
120
|
-
constructor(props) {
|
|
121
|
-
const extendedProps = { ...props };
|
|
122
|
-
extendedProps.encryptedFields = ['pass']; // this parameter will be encrypted and decrypted automatically
|
|
123
|
-
extendedProps.translations = {
|
|
124
|
-
en: require('./i18n/en'),
|
|
125
|
-
de: require('./i18n/de'),
|
|
126
|
-
ru: require('./i18n/ru'),
|
|
127
|
-
pt: require('./i18n/pt'),
|
|
128
|
-
nl: require('./i18n/nl'),
|
|
129
|
-
fr: require('./i18n/fr'),
|
|
130
|
-
it: require('./i18n/it'),
|
|
131
|
-
es: require('./i18n/es'),
|
|
132
|
-
pl: require('./i18n/pl'),
|
|
133
|
-
uk: require('./i18n/uk'),
|
|
134
|
-
'zh-cn': require('./i18n/zh-cn'),
|
|
135
|
-
};
|
|
136
|
-
// get actual admin port
|
|
137
|
-
extendedProps.socket = { port: parseInt(window.location.port, 10) };
|
|
138
|
-
|
|
139
|
-
// Only if close, save buttons are not required at the bottom (e.g. if admin tab)
|
|
140
|
-
// extendedProps.bottomButtons = false;
|
|
141
|
-
|
|
142
|
-
// only for debug purposes
|
|
143
|
-
if (extendedProps.socket.port === 3000) {
|
|
144
|
-
extendedProps.socket.port = 8081;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// allow to manage GenericApp the sentry initialisation or do not set the sentryDSN if no sentry available
|
|
148
|
-
extendedProps.sentryDSN = 'https://yyy@sentry.iobroker.net/xx';
|
|
149
|
-
|
|
150
|
-
super(extendedProps);
|
|
151
|
-
}
|
|
152
|
-
// ...
|
|
153
|
-
}
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
4. Replace `index.js` with the following code to support themes:
|
|
157
|
-
|
|
158
|
-
```jsx
|
|
159
|
-
import React from 'react';
|
|
160
|
-
import { createRoot } from 'react-dom/client';
|
|
161
|
-
import * as serviceWorker from './serviceWorker';
|
|
162
|
-
|
|
163
|
-
import './index.css';
|
|
164
|
-
import App from './App';
|
|
165
|
-
import { version } from '../package.json';
|
|
166
|
-
|
|
167
|
-
console.log(`iobroker.scenes@${version}`);
|
|
168
|
-
|
|
169
|
-
const container = document.getElementById('root');
|
|
170
|
-
const root = createRoot(container);
|
|
171
|
-
root.render(<App />);
|
|
172
|
-
|
|
173
|
-
// If you want your app to work offline and load faster, you can change
|
|
174
|
-
// unregister() to register() below. Note this comes with some pitfalls.
|
|
175
|
-
// Learn more about service workers: http://bit.ly/CRA-PWA
|
|
176
|
-
serviceWorker.unregister();
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
5. Add to App.js encoding and decoding of values:
|
|
180
|
-
|
|
181
|
-
```jsx
|
|
182
|
-
class App extends GenericApp {
|
|
183
|
-
// ...
|
|
184
|
-
onPrepareLoad(settings) {
|
|
185
|
-
settings.pass = this.decode(settings.pass);
|
|
186
|
-
}
|
|
187
|
-
onPrepareSave(settings) {
|
|
188
|
-
settings.pass = this.encode(settings.pass);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
6. The optional step is to validate the data to be saved:
|
|
194
|
-
|
|
195
|
-
```jsx
|
|
196
|
-
onPrepareSave(settings) {
|
|
197
|
-
super.onPrepareSave(settings);
|
|
198
|
-
if (DATA_INVALID) {
|
|
199
|
-
return false; // configuration will not be saved
|
|
200
|
-
} else {
|
|
201
|
-
return true;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
## Components
|
|
207
|
-
|
|
208
|
-
### Connection.tsx
|
|
209
|
-
|
|
210
|
-
This is a non-React class to provide the communication for socket connection with the server.
|
|
211
|
-
|
|
212
|
-
### GenericApp.tsx
|
|
213
|
-
|
|
214
|
-
### i18n.ts
|
|
215
|
-
|
|
216
|
-
### Theme.tsx
|
|
217
|
-
|
|
218
|
-
### Dialogs
|
|
219
|
-
|
|
220
|
-
Some dialogs are predefined and could be used out of the box.
|
|
221
|
-
|
|
222
|
-
#### Confirm.tsx
|
|
223
|
-
|
|
224
|
-
<!-- TODO: Provide screenshot here -->
|
|
225
|
-
|
|
226
|
-
Usage:
|
|
227
|
-
|
|
228
|
-
```jsx
|
|
229
|
-
import React from 'react';
|
|
230
|
-
import { I18n, Confirm as ConfirmDialog } from '@iobroker/adapter-react-v5';
|
|
231
|
-
|
|
232
|
-
class ExportImportDialog extends React.Component {
|
|
233
|
-
constructor(props) {
|
|
234
|
-
super(props);
|
|
235
|
-
|
|
236
|
-
this.state = {
|
|
237
|
-
confirmDialog: false,
|
|
238
|
-
};
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
renderConfirmDialog() {
|
|
242
|
-
if (!this.state.confirmDialog) {
|
|
243
|
-
return null;
|
|
244
|
-
}
|
|
245
|
-
return (
|
|
246
|
-
<ConfirmDialog
|
|
247
|
-
title={I18n.t('Scene will be overwritten.')}
|
|
248
|
-
text={I18n.t('All data will be lost. Confirm?')}
|
|
249
|
-
ok={I18n.t('Yes')}
|
|
250
|
-
cancel={I18n.t('Cancel')}
|
|
251
|
-
suppressQuestionMinutes={5}
|
|
252
|
-
dialogName="myConfirmDialogThatCouldBeSuppressed"
|
|
253
|
-
suppressText={I18n.t('Suppress question for next %s minutes', 5)}
|
|
254
|
-
onClose={isYes => {
|
|
255
|
-
this.setState({ confirmDialog: false });
|
|
256
|
-
}}
|
|
257
|
-
/>
|
|
258
|
-
);
|
|
259
|
-
}
|
|
260
|
-
render() {
|
|
261
|
-
return (
|
|
262
|
-
<div>
|
|
263
|
-
<Button onClick={() => this.setState({ confirmDialog: true })}>Click</Button>
|
|
264
|
-
{this.renderConfirmDialog()}
|
|
265
|
-
</div>
|
|
266
|
-
);
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
export default ExportImportDialog;
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
#### Error.tsx
|
|
274
|
-
|
|
275
|
-
<!-- TODO: Provide screenshot here -->
|
|
276
|
-
|
|
277
|
-
#### Message.tsx
|
|
278
|
-
|
|
279
|
-
<!-- TODO: Provide screenshot here -->
|
|
280
|
-
|
|
281
|
-
```jsx
|
|
282
|
-
renderMessage() {
|
|
283
|
-
if (this.state.showMessage) {
|
|
284
|
-
return <Message
|
|
285
|
-
text={this.state.showMessage}
|
|
286
|
-
onClose={() => this.setState({showMessage: false})}
|
|
287
|
-
/>;
|
|
288
|
-
} else {
|
|
289
|
-
return null;
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
#### SelectID.tsx
|
|
295
|
-
|
|
296
|
-

|
|
297
|
-
|
|
298
|
-
```jsx
|
|
299
|
-
import { SelectID as DialogSelectID } from '@iobroker/adapter-react-v5';
|
|
300
|
-
|
|
301
|
-
class MyComponent extends Component {
|
|
302
|
-
constructor(props) {
|
|
303
|
-
super(props);
|
|
304
|
-
this.state = {
|
|
305
|
-
showSelectId: false,
|
|
306
|
-
};
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
renderSelectIdDialog() {
|
|
310
|
-
if (this.state.showSelectId) {
|
|
311
|
-
return (
|
|
312
|
-
<DialogSelectID
|
|
313
|
-
key="tableSelect"
|
|
314
|
-
imagePrefix="../.."
|
|
315
|
-
dialogName={this.props.adapterName}
|
|
316
|
-
themeType={this.props.themeType}
|
|
317
|
-
socket={this.props.socket}
|
|
318
|
-
statesOnly={true}
|
|
319
|
-
selected={this.state.selectIdValue}
|
|
320
|
-
onClose={() => this.setState({ showSelectId: false })}
|
|
321
|
-
onOk={(selected, name) => {
|
|
322
|
-
this.setState({ showSelectId: false, selectIdValue: selected });
|
|
323
|
-
}}
|
|
324
|
-
/>
|
|
325
|
-
);
|
|
326
|
-
} else {
|
|
327
|
-
return null;
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
render() {
|
|
331
|
-
return renderSelectIdDialog();
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
```
|
|
335
|
-
|
|
336
|
-
#### Cron
|
|
337
|
-
|
|
338
|
-
Include `"react-text-mask": "^5.4.3",` in package.json.
|
|
339
|
-
|
|
340
|
-
<!-- TODO: Provide screenshot here -->
|
|
341
|
-
|
|
342
|
-
```jsx
|
|
343
|
-
function renderCron() {
|
|
344
|
-
if (!showCron) {
|
|
345
|
-
return null;
|
|
346
|
-
} else {
|
|
347
|
-
return (
|
|
348
|
-
<DialogCron
|
|
349
|
-
key="dialogCron1"
|
|
350
|
-
cron={this.state.cronValue || '* * * * *'}
|
|
351
|
-
onClose={() => this.setState({ showCron: false })}
|
|
352
|
-
onOk={cronValue => {
|
|
353
|
-
this.setState({ cronValue });
|
|
354
|
-
}}
|
|
355
|
-
/>
|
|
356
|
-
);
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
```
|
|
360
|
-
|
|
361
|
-
### Components
|
|
362
|
-
|
|
363
|
-
#### Utils.tsx
|
|
364
|
-
|
|
365
|
-
##### getObjectNameFromObj
|
|
366
|
-
|
|
367
|
-
`getObjectNameFromObj(obj, settings, options, isDesc)`
|
|
368
|
-
|
|
369
|
-
Get object name from a single object.
|
|
370
|
-
|
|
371
|
-
Usage: `Utils.getObjectNameFromObj(this.objects[id], null, {language: I18n.getLanguage()})`
|
|
372
|
-
|
|
373
|
-
##### getObjectIcon
|
|
374
|
-
|
|
375
|
-
`getObjectIcon(id, obj)`
|
|
376
|
-
|
|
377
|
-
Get icon from the object.
|
|
378
|
-
|
|
379
|
-
Usage:
|
|
380
|
-
|
|
381
|
-
```jsx
|
|
382
|
-
const icon = Utils.getObjectIcon(id, this.objects[id]);
|
|
383
|
-
return <img src={icon} />;
|
|
384
|
-
```
|
|
385
|
-
|
|
386
|
-
##### isUseBright
|
|
387
|
-
|
|
388
|
-
`isUseBright(color, defaultValue)`
|
|
389
|
-
|
|
390
|
-
Usage: `
|
|
391
|
-
|
|
392
|
-
#### Loader.tsx
|
|
393
|
-
|
|
394
|
-

|
|
395
|
-
|
|
396
|
-
```jsx
|
|
397
|
-
render() {
|
|
398
|
-
if (!this.state.loaded) {
|
|
399
|
-
return <MuiThemeProvider theme={this.state.theme}>
|
|
400
|
-
<Loader theme={this.state.themeType}/>
|
|
401
|
-
</MuiThemeProvider>;
|
|
402
|
-
}
|
|
403
|
-
// render loaded data
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
```
|
|
407
|
-
|
|
408
|
-
#### Logo.tsx
|
|
409
|
-
|
|
410
|
-

|
|
411
|
-
|
|
412
|
-
```jsx
|
|
413
|
-
render() {
|
|
414
|
-
return <form className={this.props.classes.tab}>
|
|
415
|
-
<Logo
|
|
416
|
-
instance={this.props.instance}
|
|
417
|
-
common={this.props.common}
|
|
418
|
-
native={this.props.native}
|
|
419
|
-
onError={text => this.setState({errorText: text})}
|
|
420
|
-
onLoad={this.props.onLoad}
|
|
421
|
-
/>
|
|
422
|
-
...
|
|
423
|
-
</form>;
|
|
424
|
-
}
|
|
425
|
-
```
|
|
426
|
-
|
|
427
|
-
#### Router.tsx
|
|
428
|
-
|
|
429
|
-
#### ObjectBrowser.js
|
|
430
|
-
|
|
431
|
-
It is better to use `Dialog/SelectID`, but if you want:
|
|
432
|
-
|
|
433
|
-

|
|
434
|
-
|
|
435
|
-
```jsx
|
|
436
|
-
<ObjectBrowser
|
|
437
|
-
foldersFirst={this.props.foldersFirst}
|
|
438
|
-
imagePrefix={this.props.imagePrefix || this.props.prefix} // prefix is for back compatibility
|
|
439
|
-
defaultFilters={this.filters}
|
|
440
|
-
dialogName={this.dialogName}
|
|
441
|
-
showExpertButton={this.props.showExpertButton !== undefined ? this.props.showExpertButton : true}
|
|
442
|
-
style={{ width: '100%', height: '100%' }}
|
|
443
|
-
columns={this.props.columns || ['name', 'type', 'role', 'room', 'func', 'val']}
|
|
444
|
-
types={this.props.types || ['state']}
|
|
445
|
-
t={I18n.t}
|
|
446
|
-
lang={this.props.lang || I18n.getLanguage()}
|
|
447
|
-
socket={this.props.socket}
|
|
448
|
-
selected={this.state.selected}
|
|
449
|
-
multiSelect={this.props.multiSelect}
|
|
450
|
-
notEditable={this.props.notEditable === undefined ? true : this.props.notEditable}
|
|
451
|
-
name={this.state.name}
|
|
452
|
-
theme={this.props.theme}
|
|
453
|
-
themeName={this.props.themeName}
|
|
454
|
-
themeType={this.props.themeType}
|
|
455
|
-
customFilter={this.props.customFilter}
|
|
456
|
-
onFilterChanged={filterConfig => {
|
|
457
|
-
this.filters = filterConfig;
|
|
458
|
-
window.localStorage.setItem(this.dialogName, JSON.stringify(filterConfig));
|
|
459
|
-
}}
|
|
460
|
-
onSelect={(selected, name, isDouble) => {
|
|
461
|
-
if (JSON.stringify(selected) !== JSON.stringify(this.state.selected)) {
|
|
462
|
-
this.setState({ selected, name }, () => isDouble && this.handleOk());
|
|
463
|
-
} else if (isDouble) {
|
|
464
|
-
this.handleOk();
|
|
465
|
-
}
|
|
466
|
-
}}
|
|
467
|
-
/>
|
|
468
|
-
```
|
|
469
|
-
|
|
470
|
-
#### TreeTable.ts
|
|
471
|
-
|
|
472
|
-

|
|
473
|
-
|
|
474
|
-
```jsx
|
|
475
|
-
// STYLES
|
|
476
|
-
const styles = {
|
|
477
|
-
tableDiv: {
|
|
478
|
-
width: '100%',
|
|
479
|
-
overflow: 'hidden',
|
|
480
|
-
height: 'calc(100% - 48px)',
|
|
481
|
-
},
|
|
482
|
-
};
|
|
483
|
-
class MyComponent extends Component {
|
|
484
|
-
constructor(props) {
|
|
485
|
-
super(props);
|
|
486
|
-
|
|
487
|
-
this.state = {
|
|
488
|
-
data: [
|
|
489
|
-
{
|
|
490
|
-
id: 'UniqueID1', // required
|
|
491
|
-
fieldIdInData: 'Name1',
|
|
492
|
-
myType: 'number',
|
|
493
|
-
},
|
|
494
|
-
{
|
|
495
|
-
id: 'UniqueID2', // required
|
|
496
|
-
fieldIdInData: 'Name12',
|
|
497
|
-
myType: 'string',
|
|
498
|
-
},
|
|
499
|
-
],
|
|
500
|
-
};
|
|
501
|
-
|
|
502
|
-
this.columns = [
|
|
503
|
-
{
|
|
504
|
-
title: 'Name of field', // required, else it will be "field"
|
|
505
|
-
field: 'fieldIdInData', // required
|
|
506
|
-
editable: false, // or true [default - true]
|
|
507
|
-
cellStyle: {
|
|
508
|
-
// CSS style - // optional
|
|
509
|
-
maxWidth: '12rem',
|
|
510
|
-
overflow: 'hidden',
|
|
511
|
-
wordBreak: 'break-word',
|
|
512
|
-
},
|
|
513
|
-
lookup: {
|
|
514
|
-
// optional => edit will be automatically "SELECT"
|
|
515
|
-
value1: 'text1',
|
|
516
|
-
value2: 'text2',
|
|
517
|
-
},
|
|
518
|
-
},
|
|
519
|
-
{
|
|
520
|
-
title: 'Type', // required, else it will be "field"
|
|
521
|
-
field: 'myType', // required
|
|
522
|
-
editable: true, // or true [default - true]
|
|
523
|
-
lookup: {
|
|
524
|
-
// optional => edit will be automatically "SELECT"
|
|
525
|
-
number: 'Number',
|
|
526
|
-
string: 'String',
|
|
527
|
-
boolean: 'Boolean',
|
|
528
|
-
},
|
|
529
|
-
type: 'number/string/color/oid/icon/boolean', // oid=ObjectID,icon=base64-icon
|
|
530
|
-
editComponent: props => (
|
|
531
|
-
<div>
|
|
532
|
-
Prefix{ <br />
|
|
533
|
-
<textarea
|
|
534
|
-
rows={4}
|
|
535
|
-
style={{ width: '100%', resize: 'vertical' }}
|
|
536
|
-
value={props.value}
|
|
537
|
-
onChange={e => props.onChange(e.target.value)}
|
|
538
|
-
/>
|
|
539
|
-
Suffix
|
|
540
|
-
</div>
|
|
541
|
-
),
|
|
542
|
-
},
|
|
543
|
-
];
|
|
544
|
-
}
|
|
545
|
-
// renderTable
|
|
546
|
-
render() {
|
|
547
|
-
return (
|
|
548
|
-
<div className={this.props.classes.tableDiv}>
|
|
549
|
-
<TreeTable
|
|
550
|
-
columns={this.columns}
|
|
551
|
-
data={this.state.data}
|
|
552
|
-
onUpdate={(newData, oldData) => {
|
|
553
|
-
const data = JSON.parse(JSON.stringify(this.state.data));
|
|
554
|
-
|
|
555
|
-
// Added new line
|
|
556
|
-
if (newData === true) {
|
|
557
|
-
// find unique ID
|
|
558
|
-
let i = 1;
|
|
559
|
-
let id = 'line_' + i;
|
|
560
|
-
|
|
561
|
-
// eslint-disable-next-line
|
|
562
|
-
while (this.state.data.find(item => item.id === id)) {
|
|
563
|
-
i++;
|
|
564
|
-
id = 'line_' + i;
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
data.push({
|
|
568
|
-
id,
|
|
569
|
-
name: I18n.t('New resource') + '_' + i,
|
|
570
|
-
color: '',
|
|
571
|
-
icon: '',
|
|
572
|
-
unit: '',
|
|
573
|
-
price: 0,
|
|
574
|
-
});
|
|
575
|
-
} else {
|
|
576
|
-
// existing line was modifed
|
|
577
|
-
const pos = this.state.data.indexOf(oldData);
|
|
578
|
-
if (pos !== -1) {
|
|
579
|
-
Object.keys(newData).forEach(attr => (data[pos][attr] = newData[attr]));
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
this.setState({ data });
|
|
584
|
-
}}
|
|
585
|
-
onDelete={oldData => {
|
|
586
|
-
console.log('Delete: ' + JSON.stringify(oldData));
|
|
587
|
-
const pos = this.state.data.indexOf(oldData);
|
|
588
|
-
if (pos !== -1) {
|
|
589
|
-
const data = JSON.parse(JSON.stringify(this.state.data));
|
|
590
|
-
data.splice(pos, 1);
|
|
591
|
-
this.setState({ data });
|
|
592
|
-
}
|
|
593
|
-
}}
|
|
594
|
-
/>
|
|
595
|
-
</div>
|
|
596
|
-
);
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
```
|
|
600
|
-
|
|
601
|
-
#### Toast
|
|
602
|
-
|
|
603
|
-
<!-- TODO: Provide screenshot here -->
|
|
604
|
-
|
|
605
|
-
Toast is not a part of `adapter-react` but it is an example how to use toast in application:
|
|
606
|
-
|
|
607
|
-
```jsx
|
|
608
|
-
import { Component } from 'react';
|
|
609
|
-
import { Snackbar } from '@mui/material';
|
|
610
|
-
|
|
611
|
-
class MyComponent extends Component {
|
|
612
|
-
constructor(props) {
|
|
613
|
-
super(props);
|
|
614
|
-
this.state = {
|
|
615
|
-
// ....
|
|
616
|
-
toast: '',
|
|
617
|
-
};
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
// ...
|
|
621
|
-
renderToast() {
|
|
622
|
-
if (!this.state.toast) {
|
|
623
|
-
return null;
|
|
624
|
-
}
|
|
625
|
-
return (
|
|
626
|
-
<Snackbar
|
|
627
|
-
anchorOrigin={{
|
|
628
|
-
vertical: 'bottom',
|
|
629
|
-
horizontal: 'left',
|
|
630
|
-
}}
|
|
631
|
-
open={true}
|
|
632
|
-
autoHideDuration={6000}
|
|
633
|
-
onClose={() => this.setState({ toast: '' })}
|
|
634
|
-
ContentProps={{ 'aria-describedby': 'message-id' }}
|
|
635
|
-
message={<span id="message-id">{this.state.toast}</span>}
|
|
636
|
-
action={[
|
|
637
|
-
<IconButton
|
|
638
|
-
key="close"
|
|
639
|
-
aria-label="Close"
|
|
640
|
-
color="inherit"
|
|
641
|
-
className={this.props.classes.close}
|
|
642
|
-
onClick={() => this.setState({ toast: '' })}
|
|
643
|
-
>
|
|
644
|
-
<IconClose />
|
|
645
|
-
</IconButton>,
|
|
646
|
-
]}
|
|
647
|
-
/>
|
|
648
|
-
);
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
render() {
|
|
652
|
-
return <div>{this.renderToast()}</div>;
|
|
653
|
-
}
|
|
654
|
-
}
|
|
655
|
-
```
|
|
656
|
-
|
|
657
|
-
## List of adapters that use adapter-react
|
|
658
|
-
|
|
659
|
-
- Admin
|
|
660
|
-
- Backitup
|
|
661
|
-
- iot
|
|
662
|
-
- echarts
|
|
663
|
-
- text2command
|
|
664
|
-
- scenes
|
|
665
|
-
- javascript
|
|
666
|
-
- devices
|
|
667
|
-
- eventlist
|
|
668
|
-
- cameras
|
|
669
|
-
- web
|
|
670
|
-
- vis-2
|
|
671
|
-
- vis-2-widgets-xxx
|
|
672
|
-
- fullcalendar
|
|
673
|
-
- openweathermap
|
|
674
|
-
|
|
675
|
-
## Usability
|
|
676
|
-
|
|
677
|
-
In dialogs, the OK button is first (on the left) and the cancel button is last (on the right)
|
|
678
|
-
|
|
679
|
-
## Used icons
|
|
680
|
-
|
|
681
|
-
This project uses icons from [Flaticon](https://www.flaticon.com/).
|
|
682
|
-
|
|
683
|
-
ioBroker GmbH has a valid license for all the used icons.
|
|
684
|
-
The icons may not be reused in other projects without the proper flaticon license or flaticon subscription.
|
|
685
|
-
|
|
686
|
-
## Migration instructions
|
|
687
|
-
|
|
688
|
-
You can find the migration instructions:
|
|
689
|
-
|
|
690
|
-
- [from adapter-react-v5@6.x to adapter-react-v5@7.x](MIGRATION_6_7.md)
|
|
691
|
-
- [from adapter-react-v5@5.x to adapter-react-v5@6.x](MIGRATION_5_6.md)
|
|
692
|
-
- [from adapter-react to adapter-react-v5@5.x](MIGRATION_4_5.md)
|
|
693
|
-
|
|
694
|
-
<!--
|
|
695
|
-
Placeholder for the next version (at the beginning of the line):
|
|
696
|
-
### **WORK IN PROGRESS**
|
|
697
|
-
-->
|
|
698
|
-
|
|
699
|
-
## Changelog
|
|
700
|
-
### 7.1.
|
|
701
|
-
|
|
702
|
-
- (bluefox) Updated socket classes
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
- (bluefox)
|
|
708
|
-
|
|
709
|
-
### 7.1.
|
|
710
|
-
|
|
711
|
-
- (bluefox)
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
- (bluefox)
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
- (bluefox)
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
- (bluefox)
|
|
727
|
-
|
|
728
|
-
### 6.1.
|
|
729
|
-
|
|
730
|
-
- (bluefox) Updated
|
|
731
|
-
|
|
732
|
-
### 6.1.
|
|
733
|
-
|
|
734
|
-
- (bluefox)
|
|
735
|
-
|
|
736
|
-
### 6.1.
|
|
737
|
-
|
|
738
|
-
- (bluefox)
|
|
739
|
-
|
|
740
|
-
### 6.1.
|
|
741
|
-
|
|
742
|
-
- (bluefox)
|
|
743
|
-
|
|
744
|
-
### 6.1.
|
|
745
|
-
|
|
746
|
-
- (bluefox)
|
|
747
|
-
|
|
748
|
-
### 6.1.
|
|
749
|
-
|
|
750
|
-
- (bluefox)
|
|
751
|
-
|
|
752
|
-
### 6.1.
|
|
753
|
-
|
|
754
|
-
- (bluefox)
|
|
755
|
-
|
|
756
|
-
### 6.0
|
|
757
|
-
|
|
758
|
-
- (bluefox)
|
|
759
|
-
|
|
760
|
-
### 6.0.
|
|
761
|
-
|
|
762
|
-
- (bluefox)
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
- (bluefox) Corrected
|
|
768
|
-
|
|
769
|
-
### 6.0.
|
|
770
|
-
|
|
771
|
-
- (bluefox) Corrected
|
|
772
|
-
|
|
773
|
-
### 6.0.
|
|
774
|
-
|
|
775
|
-
- (bluefox)
|
|
776
|
-
|
|
777
|
-
### 6.0.
|
|
778
|
-
|
|
779
|
-
- (bluefox) Added
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
- (bluefox)
|
|
785
|
-
|
|
786
|
-
### 6.0.
|
|
787
|
-
|
|
788
|
-
- (bluefox) Corrected
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
- (bluefox)
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
- (bluefox)
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
- (bluefox)
|
|
804
|
-
|
|
805
|
-
### 5.0.
|
|
806
|
-
|
|
807
|
-
- (bluefox)
|
|
808
|
-
|
|
809
|
-
### 5.0.
|
|
810
|
-
|
|
811
|
-
- (bluefox)
|
|
812
|
-
|
|
813
|
-
### 5.0.
|
|
814
|
-
|
|
815
|
-
- (bluefox) Added better typing
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
- (bluefox)
|
|
821
|
-
|
|
822
|
-
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
- (bluefox)
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
- (bluefox)
|
|
834
|
-
|
|
835
|
-
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
- (bluefox)
|
|
840
|
-
|
|
841
|
-
### 4.13.
|
|
842
|
-
|
|
843
|
-
- (bluefox) Updated
|
|
844
|
-
|
|
845
|
-
### 4.13.
|
|
846
|
-
|
|
847
|
-
- (bluefox)
|
|
848
|
-
|
|
849
|
-
### 4.13.
|
|
850
|
-
|
|
851
|
-
- (bluefox)
|
|
852
|
-
|
|
853
|
-
### 4.13.
|
|
854
|
-
|
|
855
|
-
- (bluefox)
|
|
856
|
-
|
|
857
|
-
### 4.13.
|
|
858
|
-
|
|
859
|
-
- (bluefox)
|
|
860
|
-
|
|
861
|
-
### 4.13.
|
|
862
|
-
|
|
863
|
-
- (bluefox)
|
|
864
|
-
|
|
865
|
-
### 4.13.
|
|
866
|
-
|
|
867
|
-
- (bluefox)
|
|
868
|
-
|
|
869
|
-
### 4.13.
|
|
870
|
-
|
|
871
|
-
- (bluefox) Migrated
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
- (bluefox)
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
- (bluefox)
|
|
882
|
-
|
|
883
|
-
### 4.
|
|
884
|
-
|
|
885
|
-
- (bluefox)
|
|
886
|
-
|
|
887
|
-
### 4.12.
|
|
888
|
-
|
|
889
|
-
- (bluefox)
|
|
890
|
-
|
|
891
|
-
### 4.
|
|
892
|
-
|
|
893
|
-
- (bluefox)
|
|
894
|
-
|
|
895
|
-
### 4.11.
|
|
896
|
-
|
|
897
|
-
- (bluefox) Corrected
|
|
898
|
-
|
|
899
|
-
### 4.11.
|
|
900
|
-
|
|
901
|
-
- (bluefox)
|
|
902
|
-
|
|
903
|
-
### 4.11.
|
|
904
|
-
|
|
905
|
-
- (bluefox)
|
|
906
|
-
|
|
907
|
-
### 4.
|
|
908
|
-
|
|
909
|
-
- (bluefox) Migrated
|
|
910
|
-
|
|
911
|
-
### 4.10.
|
|
912
|
-
|
|
913
|
-
- (bluefox) Migrated some components to typescript
|
|
914
|
-
|
|
915
|
-
### 4.
|
|
916
|
-
|
|
917
|
-
- (
|
|
918
|
-
|
|
919
|
-
### 4.9.
|
|
920
|
-
|
|
921
|
-
- (
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
- (
|
|
927
|
-
|
|
928
|
-
### 4.9.
|
|
929
|
-
|
|
930
|
-
- (
|
|
931
|
-
|
|
932
|
-
### 4.9.
|
|
933
|
-
|
|
934
|
-
- (
|
|
935
|
-
|
|
936
|
-
### 4.9.
|
|
937
|
-
|
|
938
|
-
- (foxriver76)
|
|
939
|
-
|
|
940
|
-
### 4.9.
|
|
941
|
-
|
|
942
|
-
- (foxriver76)
|
|
943
|
-
|
|
944
|
-
### 4.9.
|
|
945
|
-
|
|
946
|
-
- (foxriver76)
|
|
947
|
-
|
|
948
|
-
### 4.9.
|
|
949
|
-
|
|
950
|
-
- (foxriver76) `@iobroker/json-config`
|
|
951
|
-
|
|
952
|
-
### 4.9.
|
|
953
|
-
|
|
954
|
-
- (foxriver76)
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
- (bluefox)
|
|
960
|
-
|
|
961
|
-
### 4.
|
|
962
|
-
|
|
963
|
-
- (bluefox)
|
|
964
|
-
|
|
965
|
-
### 4.7.
|
|
966
|
-
|
|
967
|
-
- (bluefox)
|
|
968
|
-
|
|
969
|
-
### 4.7.
|
|
970
|
-
|
|
971
|
-
- (bluefox)
|
|
972
|
-
|
|
973
|
-
### 4.7.
|
|
974
|
-
|
|
975
|
-
- (bluefox)
|
|
976
|
-
|
|
977
|
-
### 4.7.
|
|
978
|
-
|
|
979
|
-
- (
|
|
980
|
-
|
|
981
|
-
### 4.7.
|
|
982
|
-
|
|
983
|
-
- (
|
|
984
|
-
|
|
985
|
-
### 4.7.
|
|
986
|
-
|
|
987
|
-
- (bluefox)
|
|
988
|
-
|
|
989
|
-
### 4.7.
|
|
990
|
-
|
|
991
|
-
- (bluefox)
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
- (bluefox)
|
|
997
|
-
|
|
998
|
-
### 4.7.
|
|
999
|
-
|
|
1000
|
-
- (
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
- (
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
- (bluefox) Added
|
|
1011
|
-
|
|
1012
|
-
### 4.6.
|
|
1013
|
-
|
|
1014
|
-
- (bluefox)
|
|
1015
|
-
|
|
1016
|
-
### 4.6.
|
|
1017
|
-
|
|
1018
|
-
- (
|
|
1019
|
-
|
|
1020
|
-
### 4.6.
|
|
1021
|
-
|
|
1022
|
-
- (
|
|
1023
|
-
|
|
1024
|
-
### 4.6.
|
|
1025
|
-
|
|
1026
|
-
- (bluefox)
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
- (bluefox)
|
|
1032
|
-
|
|
1033
|
-
### 4.
|
|
1034
|
-
|
|
1035
|
-
- (bluefox)
|
|
1036
|
-
|
|
1037
|
-
### 4.5.
|
|
1038
|
-
|
|
1039
|
-
- (bluefox) Added
|
|
1040
|
-
|
|
1041
|
-
### 4.5.
|
|
1042
|
-
|
|
1043
|
-
- (
|
|
1044
|
-
|
|
1045
|
-
### 4.5.
|
|
1046
|
-
|
|
1047
|
-
- (foxriver76)
|
|
1048
|
-
|
|
1049
|
-
### 4.5.
|
|
1050
|
-
|
|
1051
|
-
- (foxriver76)
|
|
1052
|
-
|
|
1053
|
-
### 4.5.
|
|
1054
|
-
|
|
1055
|
-
- (
|
|
1056
|
-
|
|
1057
|
-
### 4.
|
|
1058
|
-
|
|
1059
|
-
- (bluefox)
|
|
1060
|
-
|
|
1061
|
-
### 4.4.
|
|
1062
|
-
|
|
1063
|
-
- (bluefox) Added
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
- (bluefox)
|
|
1069
|
-
|
|
1070
|
-
### 4.
|
|
1071
|
-
|
|
1072
|
-
- (bluefox)
|
|
1073
|
-
|
|
1074
|
-
### 4.3.
|
|
1075
|
-
|
|
1076
|
-
- (bluefox)
|
|
1077
|
-
|
|
1078
|
-
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
- (bluefox)
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
- (bluefox)
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
- (bluefox)
|
|
1094
|
-
|
|
1095
|
-
### 4.1.
|
|
1096
|
-
|
|
1097
|
-
- (bluefox)
|
|
1098
|
-
|
|
1099
|
-
### 4.0
|
|
1100
|
-
|
|
1101
|
-
- (bluefox)
|
|
1102
|
-
|
|
1103
|
-
### 4.0.
|
|
1104
|
-
|
|
1105
|
-
- (bluefox)
|
|
1106
|
-
|
|
1107
|
-
### 4.0.
|
|
1108
|
-
|
|
1109
|
-
- (bluefox)
|
|
1110
|
-
|
|
1111
|
-
### 4.0.
|
|
1112
|
-
|
|
1113
|
-
- (bluefox)
|
|
1114
|
-
|
|
1115
|
-
### 4.0.
|
|
1116
|
-
|
|
1117
|
-
- (bluefox)
|
|
1118
|
-
|
|
1119
|
-
### 4.0.
|
|
1120
|
-
|
|
1121
|
-
- (bluefox)
|
|
1122
|
-
|
|
1123
|
-
### 4.0.
|
|
1124
|
-
|
|
1125
|
-
- (bluefox)
|
|
1126
|
-
|
|
1127
|
-
### 4.0.
|
|
1128
|
-
|
|
1129
|
-
- (bluefox)
|
|
1130
|
-
|
|
1131
|
-
### 4.0.
|
|
1132
|
-
|
|
1133
|
-
- (bluefox)
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
- (bluefox)
|
|
1139
|
-
|
|
1140
|
-
### 4.0.
|
|
1141
|
-
|
|
1142
|
-
- (bluefox)
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
- (bluefox)
|
|
1148
|
-
|
|
1149
|
-
### 4.0.
|
|
1150
|
-
|
|
1151
|
-
- (bluefox)
|
|
1152
|
-
|
|
1153
|
-
### 4.0.
|
|
1154
|
-
|
|
1155
|
-
- (bluefox)
|
|
1156
|
-
|
|
1157
|
-
### 4.0.
|
|
1158
|
-
|
|
1159
|
-
- (bluefox)
|
|
1160
|
-
|
|
1161
|
-
### 4.0.
|
|
1162
|
-
|
|
1163
|
-
- (bluefox)
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
- (bluefox)
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
- (bluefox)
|
|
1174
|
-
|
|
1175
|
-
### 4.0.
|
|
1176
|
-
|
|
1177
|
-
- (bluefox)
|
|
1178
|
-
|
|
1179
|
-
### 4.0.
|
|
1180
|
-
|
|
1181
|
-
- (bluefox)
|
|
1182
|
-
|
|
1183
|
-
### 4.0.
|
|
1184
|
-
|
|
1185
|
-
- (bluefox)
|
|
1186
|
-
|
|
1187
|
-
### 4.0.
|
|
1188
|
-
|
|
1189
|
-
- (bluefox)
|
|
1190
|
-
|
|
1191
|
-
###
|
|
1192
|
-
|
|
1193
|
-
- (bluefox)
|
|
1194
|
-
|
|
1195
|
-
### 3.5.
|
|
1196
|
-
|
|
1197
|
-
- (bluefox)
|
|
1198
|
-
|
|
1199
|
-
### 3.
|
|
1200
|
-
|
|
1201
|
-
- (bluefox)
|
|
1202
|
-
|
|
1203
|
-
### 3.4.
|
|
1204
|
-
|
|
1205
|
-
- (bluefox) Added
|
|
1206
|
-
|
|
1207
|
-
### 3.
|
|
1208
|
-
|
|
1209
|
-
- (bluefox) Added
|
|
1210
|
-
|
|
1211
|
-
### 3.
|
|
1212
|
-
|
|
1213
|
-
- (bluefox) Added
|
|
1214
|
-
|
|
1215
|
-
### 3.2.
|
|
1216
|
-
|
|
1217
|
-
- (
|
|
1218
|
-
|
|
1219
|
-
### 3.2.
|
|
1220
|
-
|
|
1221
|
-
- (
|
|
1222
|
-
|
|
1223
|
-
### 3.2.
|
|
1224
|
-
|
|
1225
|
-
- (bluefox) Added
|
|
1226
|
-
|
|
1227
|
-
### 3.2.
|
|
1228
|
-
|
|
1229
|
-
- (bluefox)
|
|
1230
|
-
|
|
1231
|
-
### 3.2.
|
|
1232
|
-
|
|
1233
|
-
- (bluefox)
|
|
1234
|
-
|
|
1235
|
-
### 3.2.
|
|
1236
|
-
|
|
1237
|
-
- (bluefox)
|
|
1238
|
-
|
|
1239
|
-
### 3.2.
|
|
1240
|
-
|
|
1241
|
-
- (bluefox)
|
|
1242
|
-
|
|
1243
|
-
### 3.
|
|
1244
|
-
|
|
1245
|
-
- (bluefox)
|
|
1246
|
-
|
|
1247
|
-
### 3.1.
|
|
1248
|
-
|
|
1249
|
-
- (bluefox)
|
|
1250
|
-
|
|
1251
|
-
### 3.1.
|
|
1252
|
-
|
|
1253
|
-
- (bluefox)
|
|
1254
|
-
|
|
1255
|
-
### 3.1.
|
|
1256
|
-
|
|
1257
|
-
- (bluefox) Added
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
- (bluefox)
|
|
1263
|
-
|
|
1264
|
-
### 3.1.
|
|
1265
|
-
|
|
1266
|
-
- (bluefox)
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
- (bluefox)
|
|
1272
|
-
|
|
1273
|
-
### 3.1.
|
|
1274
|
-
|
|
1275
|
-
- (bluefox)
|
|
1276
|
-
|
|
1277
|
-
### 3.1.
|
|
1278
|
-
|
|
1279
|
-
- (bluefox)
|
|
1280
|
-
|
|
1281
|
-
### 3.1.
|
|
1282
|
-
|
|
1283
|
-
- (bluefox)
|
|
1284
|
-
|
|
1285
|
-
### 3.1.
|
|
1286
|
-
|
|
1287
|
-
- (bluefox) Allowed
|
|
1288
|
-
|
|
1289
|
-
### 3.1.
|
|
1290
|
-
|
|
1291
|
-
- (bluefox)
|
|
1292
|
-
|
|
1293
|
-
### 3.1.
|
|
1294
|
-
|
|
1295
|
-
- (bluefox)
|
|
1296
|
-
|
|
1297
|
-
### 3.1.
|
|
1298
|
-
|
|
1299
|
-
- (bluefox)
|
|
1300
|
-
|
|
1301
|
-
### 3.1.
|
|
1302
|
-
|
|
1303
|
-
- (bluefox)
|
|
1304
|
-
|
|
1305
|
-
### 3.1.
|
|
1306
|
-
|
|
1307
|
-
- (bluefox)
|
|
1308
|
-
|
|
1309
|
-
### 3.1.
|
|
1310
|
-
|
|
1311
|
-
- (bluefox) Added
|
|
1312
|
-
|
|
1313
|
-
### 3.1.
|
|
1314
|
-
|
|
1315
|
-
- (bluefox) Added
|
|
1316
|
-
|
|
1317
|
-
### 3.1.
|
|
1318
|
-
|
|
1319
|
-
- (bluefox)
|
|
1320
|
-
|
|
1321
|
-
### 3.1.
|
|
1322
|
-
|
|
1323
|
-
- (bluefox)
|
|
1324
|
-
|
|
1325
|
-
### 3.1.
|
|
1326
|
-
|
|
1327
|
-
- (bluefox) Added
|
|
1328
|
-
|
|
1329
|
-
### 3.1.
|
|
1330
|
-
|
|
1331
|
-
- (bluefox) Added
|
|
1332
|
-
|
|
1333
|
-
### 3.1.
|
|
1334
|
-
|
|
1335
|
-
- (bluefox)
|
|
1336
|
-
|
|
1337
|
-
### 3.1.
|
|
1338
|
-
|
|
1339
|
-
- (bluefox)
|
|
1340
|
-
|
|
1341
|
-
### 3.0
|
|
1342
|
-
|
|
1343
|
-
- (bluefox)
|
|
1344
|
-
|
|
1345
|
-
### 3.0.
|
|
1346
|
-
|
|
1347
|
-
- (bluefox)
|
|
1348
|
-
|
|
1349
|
-
### 3.0.
|
|
1350
|
-
|
|
1351
|
-
- (bluefox)
|
|
1352
|
-
|
|
1353
|
-
### 3.0.
|
|
1354
|
-
|
|
1355
|
-
- (bluefox)
|
|
1356
|
-
|
|
1357
|
-
### 3.0.
|
|
1358
|
-
|
|
1359
|
-
- (bluefox)
|
|
1360
|
-
|
|
1361
|
-
###
|
|
1362
|
-
|
|
1363
|
-
- (bluefox)
|
|
1364
|
-
|
|
1365
|
-
### 2.1.
|
|
1366
|
-
|
|
1367
|
-
- (bluefox)
|
|
1368
|
-
|
|
1369
|
-
### 2.1.
|
|
1370
|
-
|
|
1371
|
-
- (bluefox) Corrected
|
|
1372
|
-
|
|
1373
|
-
### 2.1.
|
|
1374
|
-
|
|
1375
|
-
- (bluefox)
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
- (bluefox) Added `
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
- (bluefox) Corrected
|
|
1386
|
-
|
|
1387
|
-
### 2.1.
|
|
1388
|
-
|
|
1389
|
-
- (bluefox)
|
|
1390
|
-
|
|
1391
|
-
### 2.
|
|
1392
|
-
|
|
1393
|
-
- (bluefox)
|
|
1394
|
-
|
|
1395
|
-
### 0.
|
|
1396
|
-
|
|
1397
|
-
- (bluefox)
|
|
1398
|
-
|
|
1399
|
-
### 0.0
|
|
1400
|
-
|
|
1401
|
-
- (bluefox) Fixed
|
|
1402
|
-
|
|
1403
|
-
### 0.0.
|
|
1404
|
-
|
|
1405
|
-
- (bluefox)
|
|
1406
|
-
|
|
1407
|
-
### 0.0.
|
|
1408
|
-
|
|
1409
|
-
- (bluefox)
|
|
1410
|
-
|
|
1411
|
-
### 0.0.
|
|
1412
|
-
|
|
1413
|
-
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
copies
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
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.4",
|
|
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.4",
|
|
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": [">0.2%", "not dead", "not ie <= 11", "not op_mini all"]
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
5. Call in `src`: `npm install`
|
|
55
|
+
6. Copy `tasks.js` into `src`: `cp node_modules/@iobroker/adapter-react-v5/tasks.js tasks.js`
|
|
56
|
+
7. Add scripts to your `package.json` `scripts` section:
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
"scripts": {
|
|
60
|
+
"0-clean": "node tasks --0-clean",
|
|
61
|
+
"1-npm": "node tasks --1-npm",
|
|
62
|
+
"2-build": "node tasks --2-build",
|
|
63
|
+
"3-copy": "node tasks --3-copy",
|
|
64
|
+
"4-patch": "node tasks --4-patch",
|
|
65
|
+
"build": "node tasks"
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
7. Start your dummy application `npm run start` for developing or build with `npm run build` and
|
|
70
|
+
copy files in `build` directory to `www` or to `admin`. In the admin you must rename `index.html` to `index_m.html`.
|
|
71
|
+
8. You can do that with `npm` tasks: `npm run build`
|
|
72
|
+
|
|
73
|
+
## Development
|
|
74
|
+
|
|
75
|
+
1. Add `socket.io` to `public/index.html`.
|
|
76
|
+
After
|
|
77
|
+
|
|
78
|
+
```html
|
|
79
|
+
<link
|
|
80
|
+
rel="manifest"
|
|
81
|
+
href="%PUBLIC_URL%/manifest.json"
|
|
82
|
+
/>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
insert
|
|
86
|
+
|
|
87
|
+
```html
|
|
88
|
+
<script>
|
|
89
|
+
const script = document.createElement('script');
|
|
90
|
+
window.registerSocketOnLoad = function (cb) {
|
|
91
|
+
window.socketLoadedHandler = cb;
|
|
92
|
+
};
|
|
93
|
+
const parts = (window.location.search || '').replace(/^\?/, '').split('&');
|
|
94
|
+
const query = {};
|
|
95
|
+
parts.forEach(item => {
|
|
96
|
+
const [name, val] = item.split('=');
|
|
97
|
+
query[decodeURIComponent(name)] = val !== undefined ? decodeURIComponent(val) : true;
|
|
98
|
+
});
|
|
99
|
+
script.onload = function () {
|
|
100
|
+
typeof window.socketLoadedHandler === 'function' && window.socketLoadedHandler();
|
|
101
|
+
};
|
|
102
|
+
script.src =
|
|
103
|
+
window.location.port === '3000'
|
|
104
|
+
? window.location.protocol +
|
|
105
|
+
'//' +
|
|
106
|
+
(query.host || window.location.hostname) +
|
|
107
|
+
':' +
|
|
108
|
+
(query.port || 8081) +
|
|
109
|
+
'/lib/js/socket.io.js'
|
|
110
|
+
: '%PUBLIC_URL%/../../lib/js/socket.io.js';
|
|
111
|
+
|
|
112
|
+
document.head.appendChild(script);
|
|
113
|
+
</script>
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
3. Add to App.js constructor initialization for I18n:
|
|
117
|
+
|
|
118
|
+
```jsx
|
|
119
|
+
class App extends GenericApp {
|
|
120
|
+
constructor(props) {
|
|
121
|
+
const extendedProps = { ...props };
|
|
122
|
+
extendedProps.encryptedFields = ['pass']; // this parameter will be encrypted and decrypted automatically
|
|
123
|
+
extendedProps.translations = {
|
|
124
|
+
en: require('./i18n/en'),
|
|
125
|
+
de: require('./i18n/de'),
|
|
126
|
+
ru: require('./i18n/ru'),
|
|
127
|
+
pt: require('./i18n/pt'),
|
|
128
|
+
nl: require('./i18n/nl'),
|
|
129
|
+
fr: require('./i18n/fr'),
|
|
130
|
+
it: require('./i18n/it'),
|
|
131
|
+
es: require('./i18n/es'),
|
|
132
|
+
pl: require('./i18n/pl'),
|
|
133
|
+
uk: require('./i18n/uk'),
|
|
134
|
+
'zh-cn': require('./i18n/zh-cn'),
|
|
135
|
+
};
|
|
136
|
+
// get actual admin port
|
|
137
|
+
extendedProps.socket = { port: parseInt(window.location.port, 10) };
|
|
138
|
+
|
|
139
|
+
// Only if close, save buttons are not required at the bottom (e.g. if admin tab)
|
|
140
|
+
// extendedProps.bottomButtons = false;
|
|
141
|
+
|
|
142
|
+
// only for debug purposes
|
|
143
|
+
if (extendedProps.socket.port === 3000) {
|
|
144
|
+
extendedProps.socket.port = 8081;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// allow to manage GenericApp the sentry initialisation or do not set the sentryDSN if no sentry available
|
|
148
|
+
extendedProps.sentryDSN = 'https://yyy@sentry.iobroker.net/xx';
|
|
149
|
+
|
|
150
|
+
super(extendedProps);
|
|
151
|
+
}
|
|
152
|
+
// ...
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
4. Replace `index.js` with the following code to support themes:
|
|
157
|
+
|
|
158
|
+
```jsx
|
|
159
|
+
import React from 'react';
|
|
160
|
+
import { createRoot } from 'react-dom/client';
|
|
161
|
+
import * as serviceWorker from './serviceWorker';
|
|
162
|
+
|
|
163
|
+
import './index.css';
|
|
164
|
+
import App from './App';
|
|
165
|
+
import { version } from '../package.json';
|
|
166
|
+
|
|
167
|
+
console.log(`iobroker.scenes@${version}`);
|
|
168
|
+
|
|
169
|
+
const container = document.getElementById('root');
|
|
170
|
+
const root = createRoot(container);
|
|
171
|
+
root.render(<App />);
|
|
172
|
+
|
|
173
|
+
// If you want your app to work offline and load faster, you can change
|
|
174
|
+
// unregister() to register() below. Note this comes with some pitfalls.
|
|
175
|
+
// Learn more about service workers: http://bit.ly/CRA-PWA
|
|
176
|
+
serviceWorker.unregister();
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
5. Add to App.js encoding and decoding of values:
|
|
180
|
+
|
|
181
|
+
```jsx
|
|
182
|
+
class App extends GenericApp {
|
|
183
|
+
// ...
|
|
184
|
+
onPrepareLoad(settings) {
|
|
185
|
+
settings.pass = this.decode(settings.pass);
|
|
186
|
+
}
|
|
187
|
+
onPrepareSave(settings) {
|
|
188
|
+
settings.pass = this.encode(settings.pass);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
6. The optional step is to validate the data to be saved:
|
|
194
|
+
|
|
195
|
+
```jsx
|
|
196
|
+
onPrepareSave(settings) {
|
|
197
|
+
super.onPrepareSave(settings);
|
|
198
|
+
if (DATA_INVALID) {
|
|
199
|
+
return false; // configuration will not be saved
|
|
200
|
+
} else {
|
|
201
|
+
return true;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
## Components
|
|
207
|
+
|
|
208
|
+
### Connection.tsx
|
|
209
|
+
|
|
210
|
+
This is a non-React class to provide the communication for socket connection with the server.
|
|
211
|
+
|
|
212
|
+
### GenericApp.tsx
|
|
213
|
+
|
|
214
|
+
### i18n.ts
|
|
215
|
+
|
|
216
|
+
### Theme.tsx
|
|
217
|
+
|
|
218
|
+
### Dialogs
|
|
219
|
+
|
|
220
|
+
Some dialogs are predefined and could be used out of the box.
|
|
221
|
+
|
|
222
|
+
#### Confirm.tsx
|
|
223
|
+
|
|
224
|
+
<!-- TODO: Provide screenshot here -->
|
|
225
|
+
|
|
226
|
+
Usage:
|
|
227
|
+
|
|
228
|
+
```jsx
|
|
229
|
+
import React from 'react';
|
|
230
|
+
import { I18n, Confirm as ConfirmDialog } from '@iobroker/adapter-react-v5';
|
|
231
|
+
|
|
232
|
+
class ExportImportDialog extends React.Component {
|
|
233
|
+
constructor(props) {
|
|
234
|
+
super(props);
|
|
235
|
+
|
|
236
|
+
this.state = {
|
|
237
|
+
confirmDialog: false,
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
renderConfirmDialog() {
|
|
242
|
+
if (!this.state.confirmDialog) {
|
|
243
|
+
return null;
|
|
244
|
+
}
|
|
245
|
+
return (
|
|
246
|
+
<ConfirmDialog
|
|
247
|
+
title={I18n.t('Scene will be overwritten.')}
|
|
248
|
+
text={I18n.t('All data will be lost. Confirm?')}
|
|
249
|
+
ok={I18n.t('Yes')}
|
|
250
|
+
cancel={I18n.t('Cancel')}
|
|
251
|
+
suppressQuestionMinutes={5}
|
|
252
|
+
dialogName="myConfirmDialogThatCouldBeSuppressed"
|
|
253
|
+
suppressText={I18n.t('Suppress question for next %s minutes', 5)}
|
|
254
|
+
onClose={isYes => {
|
|
255
|
+
this.setState({ confirmDialog: false });
|
|
256
|
+
}}
|
|
257
|
+
/>
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
render() {
|
|
261
|
+
return (
|
|
262
|
+
<div>
|
|
263
|
+
<Button onClick={() => this.setState({ confirmDialog: true })}>Click</Button>
|
|
264
|
+
{this.renderConfirmDialog()}
|
|
265
|
+
</div>
|
|
266
|
+
);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export default ExportImportDialog;
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
#### Error.tsx
|
|
274
|
+
|
|
275
|
+
<!-- TODO: Provide screenshot here -->
|
|
276
|
+
|
|
277
|
+
#### Message.tsx
|
|
278
|
+
|
|
279
|
+
<!-- TODO: Provide screenshot here -->
|
|
280
|
+
|
|
281
|
+
```jsx
|
|
282
|
+
renderMessage() {
|
|
283
|
+
if (this.state.showMessage) {
|
|
284
|
+
return <Message
|
|
285
|
+
text={this.state.showMessage}
|
|
286
|
+
onClose={() => this.setState({showMessage: false})}
|
|
287
|
+
/>;
|
|
288
|
+
} else {
|
|
289
|
+
return null;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
#### SelectID.tsx
|
|
295
|
+
|
|
296
|
+

|
|
297
|
+
|
|
298
|
+
```jsx
|
|
299
|
+
import { SelectID as DialogSelectID } from '@iobroker/adapter-react-v5';
|
|
300
|
+
|
|
301
|
+
class MyComponent extends Component {
|
|
302
|
+
constructor(props) {
|
|
303
|
+
super(props);
|
|
304
|
+
this.state = {
|
|
305
|
+
showSelectId: false,
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
renderSelectIdDialog() {
|
|
310
|
+
if (this.state.showSelectId) {
|
|
311
|
+
return (
|
|
312
|
+
<DialogSelectID
|
|
313
|
+
key="tableSelect"
|
|
314
|
+
imagePrefix="../.."
|
|
315
|
+
dialogName={this.props.adapterName}
|
|
316
|
+
themeType={this.props.themeType}
|
|
317
|
+
socket={this.props.socket}
|
|
318
|
+
statesOnly={true}
|
|
319
|
+
selected={this.state.selectIdValue}
|
|
320
|
+
onClose={() => this.setState({ showSelectId: false })}
|
|
321
|
+
onOk={(selected, name) => {
|
|
322
|
+
this.setState({ showSelectId: false, selectIdValue: selected });
|
|
323
|
+
}}
|
|
324
|
+
/>
|
|
325
|
+
);
|
|
326
|
+
} else {
|
|
327
|
+
return null;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
render() {
|
|
331
|
+
return renderSelectIdDialog();
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
#### Cron
|
|
337
|
+
|
|
338
|
+
Include `"react-text-mask": "^5.4.3",` in package.json.
|
|
339
|
+
|
|
340
|
+
<!-- TODO: Provide screenshot here -->
|
|
341
|
+
|
|
342
|
+
```jsx
|
|
343
|
+
function renderCron() {
|
|
344
|
+
if (!showCron) {
|
|
345
|
+
return null;
|
|
346
|
+
} else {
|
|
347
|
+
return (
|
|
348
|
+
<DialogCron
|
|
349
|
+
key="dialogCron1"
|
|
350
|
+
cron={this.state.cronValue || '* * * * *'}
|
|
351
|
+
onClose={() => this.setState({ showCron: false })}
|
|
352
|
+
onOk={cronValue => {
|
|
353
|
+
this.setState({ cronValue });
|
|
354
|
+
}}
|
|
355
|
+
/>
|
|
356
|
+
);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
### Components
|
|
362
|
+
|
|
363
|
+
#### Utils.tsx
|
|
364
|
+
|
|
365
|
+
##### getObjectNameFromObj
|
|
366
|
+
|
|
367
|
+
`getObjectNameFromObj(obj, settings, options, isDesc)`
|
|
368
|
+
|
|
369
|
+
Get object name from a single object.
|
|
370
|
+
|
|
371
|
+
Usage: `Utils.getObjectNameFromObj(this.objects[id], null, {language: I18n.getLanguage()})`
|
|
372
|
+
|
|
373
|
+
##### getObjectIcon
|
|
374
|
+
|
|
375
|
+
`getObjectIcon(id, obj)`
|
|
376
|
+
|
|
377
|
+
Get icon from the object.
|
|
378
|
+
|
|
379
|
+
Usage:
|
|
380
|
+
|
|
381
|
+
```jsx
|
|
382
|
+
const icon = Utils.getObjectIcon(id, this.objects[id]);
|
|
383
|
+
return <img src={icon} />;
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
##### isUseBright
|
|
387
|
+
|
|
388
|
+
`isUseBright(color, defaultValue)`
|
|
389
|
+
|
|
390
|
+
Usage: `
|
|
391
|
+
|
|
392
|
+
#### Loader.tsx
|
|
393
|
+
|
|
394
|
+

|
|
395
|
+
|
|
396
|
+
```jsx
|
|
397
|
+
render() {
|
|
398
|
+
if (!this.state.loaded) {
|
|
399
|
+
return <MuiThemeProvider theme={this.state.theme}>
|
|
400
|
+
<Loader theme={this.state.themeType}/>
|
|
401
|
+
</MuiThemeProvider>;
|
|
402
|
+
}
|
|
403
|
+
// render loaded data
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
#### Logo.tsx
|
|
409
|
+
|
|
410
|
+

|
|
411
|
+
|
|
412
|
+
```jsx
|
|
413
|
+
render() {
|
|
414
|
+
return <form className={this.props.classes.tab}>
|
|
415
|
+
<Logo
|
|
416
|
+
instance={this.props.instance}
|
|
417
|
+
common={this.props.common}
|
|
418
|
+
native={this.props.native}
|
|
419
|
+
onError={text => this.setState({errorText: text})}
|
|
420
|
+
onLoad={this.props.onLoad}
|
|
421
|
+
/>
|
|
422
|
+
...
|
|
423
|
+
</form>;
|
|
424
|
+
}
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
#### Router.tsx
|
|
428
|
+
|
|
429
|
+
#### ObjectBrowser.js
|
|
430
|
+
|
|
431
|
+
It is better to use `Dialog/SelectID`, but if you want:
|
|
432
|
+
|
|
433
|
+

|
|
434
|
+
|
|
435
|
+
```jsx
|
|
436
|
+
<ObjectBrowser
|
|
437
|
+
foldersFirst={this.props.foldersFirst}
|
|
438
|
+
imagePrefix={this.props.imagePrefix || this.props.prefix} // prefix is for back compatibility
|
|
439
|
+
defaultFilters={this.filters}
|
|
440
|
+
dialogName={this.dialogName}
|
|
441
|
+
showExpertButton={this.props.showExpertButton !== undefined ? this.props.showExpertButton : true}
|
|
442
|
+
style={{ width: '100%', height: '100%' }}
|
|
443
|
+
columns={this.props.columns || ['name', 'type', 'role', 'room', 'func', 'val']}
|
|
444
|
+
types={this.props.types || ['state']}
|
|
445
|
+
t={I18n.t}
|
|
446
|
+
lang={this.props.lang || I18n.getLanguage()}
|
|
447
|
+
socket={this.props.socket}
|
|
448
|
+
selected={this.state.selected}
|
|
449
|
+
multiSelect={this.props.multiSelect}
|
|
450
|
+
notEditable={this.props.notEditable === undefined ? true : this.props.notEditable}
|
|
451
|
+
name={this.state.name}
|
|
452
|
+
theme={this.props.theme}
|
|
453
|
+
themeName={this.props.themeName}
|
|
454
|
+
themeType={this.props.themeType}
|
|
455
|
+
customFilter={this.props.customFilter}
|
|
456
|
+
onFilterChanged={filterConfig => {
|
|
457
|
+
this.filters = filterConfig;
|
|
458
|
+
window.localStorage.setItem(this.dialogName, JSON.stringify(filterConfig));
|
|
459
|
+
}}
|
|
460
|
+
onSelect={(selected, name, isDouble) => {
|
|
461
|
+
if (JSON.stringify(selected) !== JSON.stringify(this.state.selected)) {
|
|
462
|
+
this.setState({ selected, name }, () => isDouble && this.handleOk());
|
|
463
|
+
} else if (isDouble) {
|
|
464
|
+
this.handleOk();
|
|
465
|
+
}
|
|
466
|
+
}}
|
|
467
|
+
/>
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
#### TreeTable.ts
|
|
471
|
+
|
|
472
|
+

|
|
473
|
+
|
|
474
|
+
```jsx
|
|
475
|
+
// STYLES
|
|
476
|
+
const styles = {
|
|
477
|
+
tableDiv: {
|
|
478
|
+
width: '100%',
|
|
479
|
+
overflow: 'hidden',
|
|
480
|
+
height: 'calc(100% - 48px)',
|
|
481
|
+
},
|
|
482
|
+
};
|
|
483
|
+
class MyComponent extends Component {
|
|
484
|
+
constructor(props) {
|
|
485
|
+
super(props);
|
|
486
|
+
|
|
487
|
+
this.state = {
|
|
488
|
+
data: [
|
|
489
|
+
{
|
|
490
|
+
id: 'UniqueID1', // required
|
|
491
|
+
fieldIdInData: 'Name1',
|
|
492
|
+
myType: 'number',
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
id: 'UniqueID2', // required
|
|
496
|
+
fieldIdInData: 'Name12',
|
|
497
|
+
myType: 'string',
|
|
498
|
+
},
|
|
499
|
+
],
|
|
500
|
+
};
|
|
501
|
+
|
|
502
|
+
this.columns = [
|
|
503
|
+
{
|
|
504
|
+
title: 'Name of field', // required, else it will be "field"
|
|
505
|
+
field: 'fieldIdInData', // required
|
|
506
|
+
editable: false, // or true [default - true]
|
|
507
|
+
cellStyle: {
|
|
508
|
+
// CSS style - // optional
|
|
509
|
+
maxWidth: '12rem',
|
|
510
|
+
overflow: 'hidden',
|
|
511
|
+
wordBreak: 'break-word',
|
|
512
|
+
},
|
|
513
|
+
lookup: {
|
|
514
|
+
// optional => edit will be automatically "SELECT"
|
|
515
|
+
value1: 'text1',
|
|
516
|
+
value2: 'text2',
|
|
517
|
+
},
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
title: 'Type', // required, else it will be "field"
|
|
521
|
+
field: 'myType', // required
|
|
522
|
+
editable: true, // or true [default - true]
|
|
523
|
+
lookup: {
|
|
524
|
+
// optional => edit will be automatically "SELECT"
|
|
525
|
+
number: 'Number',
|
|
526
|
+
string: 'String',
|
|
527
|
+
boolean: 'Boolean',
|
|
528
|
+
},
|
|
529
|
+
type: 'number/string/color/oid/icon/boolean', // oid=ObjectID,icon=base64-icon
|
|
530
|
+
editComponent: props => (
|
|
531
|
+
<div>
|
|
532
|
+
Prefix{ <br />
|
|
533
|
+
<textarea
|
|
534
|
+
rows={4}
|
|
535
|
+
style={{ width: '100%', resize: 'vertical' }}
|
|
536
|
+
value={props.value}
|
|
537
|
+
onChange={e => props.onChange(e.target.value)}
|
|
538
|
+
/>
|
|
539
|
+
Suffix
|
|
540
|
+
</div>
|
|
541
|
+
),
|
|
542
|
+
},
|
|
543
|
+
];
|
|
544
|
+
}
|
|
545
|
+
// renderTable
|
|
546
|
+
render() {
|
|
547
|
+
return (
|
|
548
|
+
<div className={this.props.classes.tableDiv}>
|
|
549
|
+
<TreeTable
|
|
550
|
+
columns={this.columns}
|
|
551
|
+
data={this.state.data}
|
|
552
|
+
onUpdate={(newData, oldData) => {
|
|
553
|
+
const data = JSON.parse(JSON.stringify(this.state.data));
|
|
554
|
+
|
|
555
|
+
// Added new line
|
|
556
|
+
if (newData === true) {
|
|
557
|
+
// find unique ID
|
|
558
|
+
let i = 1;
|
|
559
|
+
let id = 'line_' + i;
|
|
560
|
+
|
|
561
|
+
// eslint-disable-next-line
|
|
562
|
+
while (this.state.data.find(item => item.id === id)) {
|
|
563
|
+
i++;
|
|
564
|
+
id = 'line_' + i;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
data.push({
|
|
568
|
+
id,
|
|
569
|
+
name: I18n.t('New resource') + '_' + i,
|
|
570
|
+
color: '',
|
|
571
|
+
icon: '',
|
|
572
|
+
unit: '',
|
|
573
|
+
price: 0,
|
|
574
|
+
});
|
|
575
|
+
} else {
|
|
576
|
+
// existing line was modifed
|
|
577
|
+
const pos = this.state.data.indexOf(oldData);
|
|
578
|
+
if (pos !== -1) {
|
|
579
|
+
Object.keys(newData).forEach(attr => (data[pos][attr] = newData[attr]));
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
this.setState({ data });
|
|
584
|
+
}}
|
|
585
|
+
onDelete={oldData => {
|
|
586
|
+
console.log('Delete: ' + JSON.stringify(oldData));
|
|
587
|
+
const pos = this.state.data.indexOf(oldData);
|
|
588
|
+
if (pos !== -1) {
|
|
589
|
+
const data = JSON.parse(JSON.stringify(this.state.data));
|
|
590
|
+
data.splice(pos, 1);
|
|
591
|
+
this.setState({ data });
|
|
592
|
+
}
|
|
593
|
+
}}
|
|
594
|
+
/>
|
|
595
|
+
</div>
|
|
596
|
+
);
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
```
|
|
600
|
+
|
|
601
|
+
#### Toast
|
|
602
|
+
|
|
603
|
+
<!-- TODO: Provide screenshot here -->
|
|
604
|
+
|
|
605
|
+
Toast is not a part of `adapter-react` but it is an example how to use toast in application:
|
|
606
|
+
|
|
607
|
+
```jsx
|
|
608
|
+
import { Component } from 'react';
|
|
609
|
+
import { Snackbar } from '@mui/material';
|
|
610
|
+
|
|
611
|
+
class MyComponent extends Component {
|
|
612
|
+
constructor(props) {
|
|
613
|
+
super(props);
|
|
614
|
+
this.state = {
|
|
615
|
+
// ....
|
|
616
|
+
toast: '',
|
|
617
|
+
};
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
// ...
|
|
621
|
+
renderToast() {
|
|
622
|
+
if (!this.state.toast) {
|
|
623
|
+
return null;
|
|
624
|
+
}
|
|
625
|
+
return (
|
|
626
|
+
<Snackbar
|
|
627
|
+
anchorOrigin={{
|
|
628
|
+
vertical: 'bottom',
|
|
629
|
+
horizontal: 'left',
|
|
630
|
+
}}
|
|
631
|
+
open={true}
|
|
632
|
+
autoHideDuration={6000}
|
|
633
|
+
onClose={() => this.setState({ toast: '' })}
|
|
634
|
+
ContentProps={{ 'aria-describedby': 'message-id' }}
|
|
635
|
+
message={<span id="message-id">{this.state.toast}</span>}
|
|
636
|
+
action={[
|
|
637
|
+
<IconButton
|
|
638
|
+
key="close"
|
|
639
|
+
aria-label="Close"
|
|
640
|
+
color="inherit"
|
|
641
|
+
className={this.props.classes.close}
|
|
642
|
+
onClick={() => this.setState({ toast: '' })}
|
|
643
|
+
>
|
|
644
|
+
<IconClose />
|
|
645
|
+
</IconButton>,
|
|
646
|
+
]}
|
|
647
|
+
/>
|
|
648
|
+
);
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
render() {
|
|
652
|
+
return <div>{this.renderToast()}</div>;
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
```
|
|
656
|
+
|
|
657
|
+
## List of adapters that use adapter-react
|
|
658
|
+
|
|
659
|
+
- Admin
|
|
660
|
+
- Backitup
|
|
661
|
+
- iot
|
|
662
|
+
- echarts
|
|
663
|
+
- text2command
|
|
664
|
+
- scenes
|
|
665
|
+
- javascript
|
|
666
|
+
- devices
|
|
667
|
+
- eventlist
|
|
668
|
+
- cameras
|
|
669
|
+
- web
|
|
670
|
+
- vis-2
|
|
671
|
+
- vis-2-widgets-xxx
|
|
672
|
+
- fullcalendar
|
|
673
|
+
- openweathermap
|
|
674
|
+
|
|
675
|
+
## Usability
|
|
676
|
+
|
|
677
|
+
In dialogs, the OK button is first (on the left) and the cancel button is last (on the right)
|
|
678
|
+
|
|
679
|
+
## Used icons
|
|
680
|
+
|
|
681
|
+
This project uses icons from [Flaticon](https://www.flaticon.com/).
|
|
682
|
+
|
|
683
|
+
ioBroker GmbH has a valid license for all the used icons.
|
|
684
|
+
The icons may not be reused in other projects without the proper flaticon license or flaticon subscription.
|
|
685
|
+
|
|
686
|
+
## Migration instructions
|
|
687
|
+
|
|
688
|
+
You can find the migration instructions:
|
|
689
|
+
|
|
690
|
+
- [from adapter-react-v5@6.x to adapter-react-v5@7.x](MIGRATION_6_7.md)
|
|
691
|
+
- [from adapter-react-v5@5.x to adapter-react-v5@6.x](MIGRATION_5_6.md)
|
|
692
|
+
- [from adapter-react to adapter-react-v5@5.x](MIGRATION_4_5.md)
|
|
693
|
+
|
|
694
|
+
<!--
|
|
695
|
+
Placeholder for the next version (at the beginning of the line):
|
|
696
|
+
### **WORK IN PROGRESS**
|
|
697
|
+
-->
|
|
698
|
+
|
|
699
|
+
## Changelog
|
|
700
|
+
### 7.1.4 (2024-09-15)
|
|
701
|
+
|
|
702
|
+
- (bluefox) Updated socket classes
|
|
703
|
+
|
|
704
|
+
### 7.1.3 (2024-09-15)
|
|
705
|
+
|
|
706
|
+
- (bluefox) Updated socket classes
|
|
707
|
+
- (bluefox) Added additional confirmation dialog for CRONs for every minute execution
|
|
708
|
+
|
|
709
|
+
### 7.1.1 (2024-09-13)
|
|
710
|
+
|
|
711
|
+
- (bluefox) Corrected TabContainer
|
|
712
|
+
|
|
713
|
+
### 7.1.0 (2024-09-12)
|
|
714
|
+
|
|
715
|
+
- (bluefox) Optimized the icon picker
|
|
716
|
+
- (bluefox) Used common eslint-config
|
|
717
|
+
|
|
718
|
+
### 7.0.2 (2024-09-10)
|
|
719
|
+
|
|
720
|
+
- (bluefox) Showed the context menu under cursor position in the object browser
|
|
721
|
+
- (bluefox) Added links to aliases in the object browser
|
|
722
|
+
|
|
723
|
+
### 7.0.1 (2024-08-29)
|
|
724
|
+
|
|
725
|
+
- (bluefox) Updated the object browser
|
|
726
|
+
- (bluefox) Used MUI Library 6.0
|
|
727
|
+
|
|
728
|
+
### 6.1.10 (2024-08-30)
|
|
729
|
+
|
|
730
|
+
- (bluefox) Updated the object browser
|
|
731
|
+
|
|
732
|
+
### 6.1.9 (2024-08-14)
|
|
733
|
+
|
|
734
|
+
- (bluefox) Updated JSON schema
|
|
735
|
+
|
|
736
|
+
### 6.1.8 (2024-08-03)
|
|
737
|
+
|
|
738
|
+
- (bluefox) Added translations
|
|
739
|
+
|
|
740
|
+
### 6.1.6 (2024-07-23)
|
|
741
|
+
|
|
742
|
+
- (bluefox) Optimize package
|
|
743
|
+
|
|
744
|
+
### 6.1.5 (2024-07-20)
|
|
745
|
+
|
|
746
|
+
- (bluefox) Added sources to package
|
|
747
|
+
|
|
748
|
+
### 6.1.3 (2024-07-20)
|
|
749
|
+
|
|
750
|
+
- (bluefox) Better typing of legacy connection
|
|
751
|
+
|
|
752
|
+
### 6.1.1 (2024-07-16)
|
|
753
|
+
|
|
754
|
+
- (bluefox) Added translations
|
|
755
|
+
|
|
756
|
+
### 6.1.0 (2024-07-15)
|
|
757
|
+
|
|
758
|
+
- (bluefox) Replace by CRON to text the package to `cronstrue`
|
|
759
|
+
|
|
760
|
+
### 6.0.19 (2024-07-14)
|
|
761
|
+
|
|
762
|
+
- (bluefox) added some packages for federation
|
|
763
|
+
|
|
764
|
+
### 6.0.17 (2024-07-14)
|
|
765
|
+
|
|
766
|
+
- (bluefox) Allowed playing mp3 files in the file browser
|
|
767
|
+
- (bluefox) Corrected jump by object selection
|
|
768
|
+
|
|
769
|
+
### 6.0.14 (2024-07-07)
|
|
770
|
+
|
|
771
|
+
- (bluefox) Corrected theme type selection
|
|
772
|
+
|
|
773
|
+
### 6.0.13 (2024-06-30)
|
|
774
|
+
|
|
775
|
+
- (bluefox) Corrected color picker
|
|
776
|
+
|
|
777
|
+
### 6.0.12 (2024-06-29)
|
|
778
|
+
|
|
779
|
+
- (bluefox) Added support for the overrides in the theme
|
|
780
|
+
|
|
781
|
+
### 6.0.10 (2024-06-27)
|
|
782
|
+
|
|
783
|
+
- (bluefox) Added translation
|
|
784
|
+
- (bluefox) Mobile object browser improved
|
|
785
|
+
|
|
786
|
+
### 6.0.9 (2024-06-26)
|
|
787
|
+
|
|
788
|
+
- (bluefox) Corrected Icons
|
|
789
|
+
|
|
790
|
+
### 6.0.8 (2024-06-26)
|
|
791
|
+
|
|
792
|
+
- (bluefox) Corrected types of the select ID dialog
|
|
793
|
+
- (bluefox) Made the tooltips neutral to the pointer events
|
|
794
|
+
|
|
795
|
+
### 6.0.6 (2024-06-24)
|
|
796
|
+
|
|
797
|
+
- (bluefox) Synchronised with admin
|
|
798
|
+
- (bluefox) Added translations for time scheduler
|
|
799
|
+
|
|
800
|
+
### 6.0.4 (2024-06-21)
|
|
801
|
+
|
|
802
|
+
- (bluefox) Removed the usage of `withStyles` in favor of `sx` and `style` properties (see [Migration from v5 to v6](#migration-from-v5-to-v6)
|
|
803
|
+
- (bluefox) (BREAKING) Higher version of `@mui/material` (5.15.20) is used
|
|
804
|
+
|
|
805
|
+
### 5.0.8 (2024-06-15)
|
|
806
|
+
|
|
807
|
+
- (bluefox) Added `modulefederation.admin.config.js` for module federation
|
|
808
|
+
|
|
809
|
+
### 5.0.5 (2024-06-10)
|
|
810
|
+
|
|
811
|
+
- (bluefox) Sources were synchronized with admin
|
|
812
|
+
|
|
813
|
+
### 5.0.4 (2024-06-07)
|
|
814
|
+
|
|
815
|
+
- (bluefox) Added better typing
|
|
816
|
+
|
|
817
|
+
### 5.0.2 (2024-05-30)
|
|
818
|
+
|
|
819
|
+
- (bluefox) Added better typing
|
|
820
|
+
- (bluefox) Json-Config is now a separate package and must be installed additionally
|
|
821
|
+
|
|
822
|
+
### 5.0.0 (2024-05-29)
|
|
823
|
+
|
|
824
|
+
- (bluefox) Types are now exported
|
|
825
|
+
- (bluefox) Translator renamed to Translate
|
|
826
|
+
- (bluefox) Breaking: Theme renamed to IobTheme because of the naming conflict
|
|
827
|
+
|
|
828
|
+
### 4.13.24 (2024-05-25)
|
|
829
|
+
|
|
830
|
+
- (bluefox) Updated packages
|
|
831
|
+
|
|
832
|
+
- ### 4.13.22 (2024-05-23)
|
|
833
|
+
- (bluefox) Updated packages
|
|
834
|
+
|
|
835
|
+
### 4.13.20 (2024-05-22)
|
|
836
|
+
|
|
837
|
+
- (bluefox) Better types added
|
|
838
|
+
- (bluefox) updated theme definitions
|
|
839
|
+
- (bluefox) corrected dates in cron dialog
|
|
840
|
+
|
|
841
|
+
### 4.13.14 (2024-05-19)
|
|
842
|
+
|
|
843
|
+
- (bluefox) Updated packages
|
|
844
|
+
|
|
845
|
+
### 4.13.13 (2024-05-09)
|
|
846
|
+
|
|
847
|
+
- (bluefox) Updated ioBroker types
|
|
848
|
+
|
|
849
|
+
### 4.13.12 (2024-05-06)
|
|
850
|
+
|
|
851
|
+
- (bluefox) All files are migrated to Typescript
|
|
852
|
+
|
|
853
|
+
### 4.13.11 (2024-04-23)
|
|
854
|
+
|
|
855
|
+
- (bluefox) Corrected the size of icons
|
|
856
|
+
|
|
857
|
+
### 4.13.10 (2024-04-22)
|
|
858
|
+
|
|
859
|
+
- (bluefox) Migrated all icons to Typescript
|
|
860
|
+
|
|
861
|
+
### 4.13.9 (2024-04-20)
|
|
862
|
+
|
|
863
|
+
- (bluefox) Updated socket-client package
|
|
864
|
+
|
|
865
|
+
### 4.13.8 (2024-04-19)
|
|
866
|
+
|
|
867
|
+
- (bluefox) Corrected CRON selector
|
|
868
|
+
|
|
869
|
+
### 4.13.7 (2024-04-19)
|
|
870
|
+
|
|
871
|
+
- (bluefox) Migrated ColorPicker to typescript
|
|
872
|
+
|
|
873
|
+
### 4.13.6 (2024-04-11)
|
|
874
|
+
|
|
875
|
+
- (bluefox) Migrated TreeTable to typescript
|
|
876
|
+
- (bluefox) corrected the object subscription
|
|
877
|
+
|
|
878
|
+
### 4.13.5 (2024-04-02)
|
|
879
|
+
|
|
880
|
+
- (bluefox) used new connection classes
|
|
881
|
+
- (bluefox) Improved the `SelectID` dialog
|
|
882
|
+
|
|
883
|
+
### 4.13.3 (2024-04-01)
|
|
884
|
+
|
|
885
|
+
- (bluefox) used new connection classes
|
|
886
|
+
|
|
887
|
+
### 4.12.3 (2024-03-30)
|
|
888
|
+
|
|
889
|
+
- (bluefox) Migrated legacy connection to typescript
|
|
890
|
+
|
|
891
|
+
### 4.12.2 (2024-03-25)
|
|
892
|
+
|
|
893
|
+
- (bluefox) Added support for remote cloud
|
|
894
|
+
|
|
895
|
+
### 4.11.6 (2024-03-19)
|
|
896
|
+
|
|
897
|
+
- (bluefox) Corrected rendering of LoaderMV
|
|
898
|
+
|
|
899
|
+
### 4.11.4 (2024-03-18)
|
|
900
|
+
|
|
901
|
+
- (bluefox) Corrected types of IconPicker
|
|
902
|
+
|
|
903
|
+
### 4.11.3 (2024-03-17)
|
|
904
|
+
|
|
905
|
+
- (bluefox) Made filters for the file selector dialog optional
|
|
906
|
+
|
|
907
|
+
### 4.11.2 (2024-03-16)
|
|
908
|
+
|
|
909
|
+
- (bluefox) Migrated GenericApp to typescript
|
|
910
|
+
|
|
911
|
+
### 4.10.4 (2024-03-16)
|
|
912
|
+
|
|
913
|
+
- (bluefox) Migrated some components to typescript
|
|
914
|
+
|
|
915
|
+
### 4.10.1 (2024-03-11)
|
|
916
|
+
|
|
917
|
+
- (bluefox) Migrated some components to typescript
|
|
918
|
+
|
|
919
|
+
### 4.9.11 (2024-03-08)
|
|
920
|
+
|
|
921
|
+
- (foxriver76) type GenericApp socket correctly
|
|
922
|
+
|
|
923
|
+
### 4.9.10 (2024-02-21)
|
|
924
|
+
|
|
925
|
+
- (bluefox) translations
|
|
926
|
+
- (bluefox) updated JSON config
|
|
927
|
+
|
|
928
|
+
### 4.9.9 (2024-02-16)
|
|
929
|
+
|
|
930
|
+
- (foxriver76) also check plugin state of instance to see if Sentry is explicitly disabled
|
|
931
|
+
|
|
932
|
+
### 4.9.8 (2024-02-13)
|
|
933
|
+
|
|
934
|
+
- (bluefox) allowed hiding wizard in cron dialog
|
|
935
|
+
|
|
936
|
+
### 4.9.7 (2024-02-03)
|
|
937
|
+
|
|
938
|
+
- (foxriver76) allow passing down the instance number do avoid determining from url
|
|
939
|
+
|
|
940
|
+
### 4.9.5 (2024-01-01)
|
|
941
|
+
|
|
942
|
+
- (foxriver76) make `copyToClipboard` event parameter optional
|
|
943
|
+
|
|
944
|
+
### 4.9.4 (2024-01-01)
|
|
945
|
+
|
|
946
|
+
- (foxriver76) try to fix `SelectID` scrolling
|
|
947
|
+
|
|
948
|
+
### 4.9.2 (2023-12-30)
|
|
949
|
+
|
|
950
|
+
- (foxriver76) bump version of `@iobroker/json-config`
|
|
951
|
+
|
|
952
|
+
### 4.9.1 (2023-12-22)
|
|
953
|
+
|
|
954
|
+
- (foxriver76) `@iobroker/json-config` moved to real dependencies
|
|
955
|
+
|
|
956
|
+
### 4.9.0 (2023-12-22)
|
|
957
|
+
|
|
958
|
+
- (foxriver76) migrate to `@iobroker/json-config` module to have a single point of truth
|
|
959
|
+
- (bluefox) Allowed using of `filterFunc` as string
|
|
960
|
+
|
|
961
|
+
### 4.8.1 (2023-12-14)
|
|
962
|
+
|
|
963
|
+
- (bluefox) Added Device manager to JSON Config
|
|
964
|
+
|
|
965
|
+
### 4.7.15 (2023-12-12)
|
|
966
|
+
|
|
967
|
+
- (bluefox) Corrected parsing of a text
|
|
968
|
+
|
|
969
|
+
### 4.7.13 (2023-12-10)
|
|
970
|
+
|
|
971
|
+
- (bluefox) Added possibility to define the root style and embedded property
|
|
972
|
+
|
|
973
|
+
### 4.7.11 (2023-12-06)
|
|
974
|
+
|
|
975
|
+
- (bluefox) Extended color picker with "noInputField" option
|
|
976
|
+
|
|
977
|
+
### 4.7.9 (2023-12-04)
|
|
978
|
+
|
|
979
|
+
- (bluefox) Corrected the icon picker
|
|
980
|
+
|
|
981
|
+
### 4.7.8 (2023-12-04)
|
|
982
|
+
|
|
983
|
+
- (foxriver76) port to `@iobroker/types`
|
|
984
|
+
|
|
985
|
+
### 4.7.6 (2023-11-29)
|
|
986
|
+
|
|
987
|
+
- (bluefox) Added translations
|
|
988
|
+
|
|
989
|
+
### 4.7.5 (2023-11-28)
|
|
990
|
+
|
|
991
|
+
- (bluefox) Corrected subscribe on objects in the legacy connection
|
|
992
|
+
|
|
993
|
+
### 4.7.4 (2023-11-23)
|
|
994
|
+
|
|
995
|
+
- (bluefox) Updated packages
|
|
996
|
+
- (bluefox) Made getStates method in legacy connection compatible with new one
|
|
997
|
+
|
|
998
|
+
### 4.7.3 (2023-11-08)
|
|
999
|
+
|
|
1000
|
+
- (bluefox) Updated packages
|
|
1001
|
+
|
|
1002
|
+
### 4.7.2 (2023-11-03)
|
|
1003
|
+
|
|
1004
|
+
- (foxriver76) fixed problem with color picker, where editing TextField was buggy
|
|
1005
|
+
- (foxriver76) fixed light mode color of a path in FileBrowser
|
|
1006
|
+
|
|
1007
|
+
### 4.7.0 (2023-10-31)
|
|
1008
|
+
|
|
1009
|
+
- (bluefox) Synced with admin
|
|
1010
|
+
- (bluefox) Added GIF to image files
|
|
1011
|
+
|
|
1012
|
+
### 4.6.7 (2023-10-19)
|
|
1013
|
+
|
|
1014
|
+
- (bluefox) Added return value for `subscribeOnInstance` for Connection class
|
|
1015
|
+
|
|
1016
|
+
### 4.6.6 (2023-10-13)
|
|
1017
|
+
|
|
1018
|
+
- (bluefox) Fixed the legacy connection
|
|
1019
|
+
|
|
1020
|
+
### 4.6.5 (2023-10-12)
|
|
1021
|
+
|
|
1022
|
+
- (foxriver76) fixed object browser with date
|
|
1023
|
+
|
|
1024
|
+
### 4.6.4 (2023-10-11)
|
|
1025
|
+
|
|
1026
|
+
- (bluefox) Updated the packages
|
|
1027
|
+
|
|
1028
|
+
### 4.6.3 (2023-10-09)
|
|
1029
|
+
|
|
1030
|
+
- (bluefox) Just updated the packages
|
|
1031
|
+
- (bluefox) Synced with admin
|
|
1032
|
+
|
|
1033
|
+
### 4.6.2 (2023-09-29)
|
|
1034
|
+
|
|
1035
|
+
- (bluefox) Experimental feature added: update states on re-subscribe
|
|
1036
|
+
|
|
1037
|
+
### 4.5.5 (2023-09-27)
|
|
1038
|
+
|
|
1039
|
+
- (bluefox) Added export for IconNoIcon
|
|
1040
|
+
|
|
1041
|
+
### 4.5.4 (2023-09-17)
|
|
1042
|
+
|
|
1043
|
+
- (bluefox) Added the restricting to folder property for select file dialog
|
|
1044
|
+
|
|
1045
|
+
### 4.5.3 (2023-08-20)
|
|
1046
|
+
|
|
1047
|
+
- (foxriver76) fixed css classes of TableResize, see https://github.com/ioBroker/ioBroker.admin/issues/1860
|
|
1048
|
+
|
|
1049
|
+
### 4.5.2 (2023-08-20)
|
|
1050
|
+
|
|
1051
|
+
- (foxriver76) added missing export of TableResize
|
|
1052
|
+
|
|
1053
|
+
### 4.5.1 (2023-08-19)
|
|
1054
|
+
|
|
1055
|
+
- (foxriver76) fix dialog TextInput
|
|
1056
|
+
|
|
1057
|
+
### 4.5.0 (2023-08-18)
|
|
1058
|
+
|
|
1059
|
+
- (bluefox) Synchronize components with admin
|
|
1060
|
+
|
|
1061
|
+
### 4.4.8 (2023-08-17)
|
|
1062
|
+
|
|
1063
|
+
- (bluefox) Added translations
|
|
1064
|
+
|
|
1065
|
+
### 4.4.7 (2023-08-10)
|
|
1066
|
+
|
|
1067
|
+
- (bluefox) Added `subscribeStateAsync` method to wait for answer
|
|
1068
|
+
- (bluefox) Added support for arrays for un/subscriptions
|
|
1069
|
+
|
|
1070
|
+
### 4.4.5 (2023-08-01)
|
|
1071
|
+
|
|
1072
|
+
- (bluefox) Updated packages
|
|
1073
|
+
|
|
1074
|
+
### 4.3.3 (2023-07-28)
|
|
1075
|
+
|
|
1076
|
+
- (bluefox) Added translations
|
|
1077
|
+
|
|
1078
|
+
### 4.3.0 (2023-07-19)
|
|
1079
|
+
|
|
1080
|
+
- (bluefox) Updated packages
|
|
1081
|
+
- (bluefox) Added translations
|
|
1082
|
+
- (bluefox) Synced object browser
|
|
1083
|
+
- (bluefox) formatting
|
|
1084
|
+
|
|
1085
|
+
### 4.2.1 (2023-07-17)
|
|
1086
|
+
|
|
1087
|
+
- (bluefox) Updated packages
|
|
1088
|
+
- (bluefox) Added translations
|
|
1089
|
+
|
|
1090
|
+
### 4.2.0 (2023-07-07)
|
|
1091
|
+
|
|
1092
|
+
- (bluefox) Updated packages
|
|
1093
|
+
- (bluefox) Added new method `getObjectsById` to the socket communication
|
|
1094
|
+
|
|
1095
|
+
### 4.1.2 (2023-06-20)
|
|
1096
|
+
|
|
1097
|
+
- (bluefox) Allowed setting theme name directly by theme toggle
|
|
1098
|
+
|
|
1099
|
+
### 4.1.0 (2023-05-10)
|
|
1100
|
+
|
|
1101
|
+
- (bluefox) `craco-module-federation.js` was added. For node 16
|
|
1102
|
+
|
|
1103
|
+
### 4.0.27 (2023-05-09)
|
|
1104
|
+
|
|
1105
|
+
- (bluefox) Allowed showing only specific root in SelectIDDialog
|
|
1106
|
+
|
|
1107
|
+
### 4.0.26 (2023-05-08)
|
|
1108
|
+
|
|
1109
|
+
- (bluefox) Added IDs to the buttons in the dialog for GUI tests
|
|
1110
|
+
|
|
1111
|
+
### 4.0.25 (2023-04-23)
|
|
1112
|
+
|
|
1113
|
+
- (bluefox) Extended `TextWithIcon` with defined color and icon
|
|
1114
|
+
|
|
1115
|
+
### 4.0.24 (2023-04-03)
|
|
1116
|
+
|
|
1117
|
+
- (bluefox) Updated the file selector in tile mode
|
|
1118
|
+
|
|
1119
|
+
### 4.0.23 (2023-03-27)
|
|
1120
|
+
|
|
1121
|
+
- (bluefox) Added translations
|
|
1122
|
+
|
|
1123
|
+
### 4.0.22 (2023-03-22)
|
|
1124
|
+
|
|
1125
|
+
- (bluefox) Re-Activate legacy connection
|
|
1126
|
+
|
|
1127
|
+
### 4.0.21 (2023-03-22)
|
|
1128
|
+
|
|
1129
|
+
- (bluefox) Added translations
|
|
1130
|
+
|
|
1131
|
+
### 4.0.20 (2023-03-21)
|
|
1132
|
+
|
|
1133
|
+
- (bluefox) Color picker was improved
|
|
1134
|
+
|
|
1135
|
+
### 4.0.19 (2023-03-20)
|
|
1136
|
+
|
|
1137
|
+
- (bluefox) Packages were updated
|
|
1138
|
+
- (bluefox) Added new translations
|
|
1139
|
+
|
|
1140
|
+
### 4.0.18 (2023-03-16)
|
|
1141
|
+
|
|
1142
|
+
- (bluefox) Packages were updated
|
|
1143
|
+
|
|
1144
|
+
### 4.0.17 (2023-03-15)
|
|
1145
|
+
|
|
1146
|
+
- (bluefox) Added translations
|
|
1147
|
+
- (bluefox) Added port controller to JSON config
|
|
1148
|
+
|
|
1149
|
+
### 4.0.15 (2023-03-12)
|
|
1150
|
+
|
|
1151
|
+
- (bluefox) Updated the object browser and file browser
|
|
1152
|
+
|
|
1153
|
+
### 4.0.14 (2023-03-03)
|
|
1154
|
+
|
|
1155
|
+
- (bluefox) added handler of alert messages
|
|
1156
|
+
|
|
1157
|
+
### 4.0.13 (2023-02-15)
|
|
1158
|
+
|
|
1159
|
+
- (bluefox) Corrected the theme button
|
|
1160
|
+
|
|
1161
|
+
### 4.0.12 (2023-02-15)
|
|
1162
|
+
|
|
1163
|
+
- (bluefox) made the fix for `echarts`
|
|
1164
|
+
|
|
1165
|
+
### 4.0.11 (2023-02-14)
|
|
1166
|
+
|
|
1167
|
+
- (bluefox) Updated packages
|
|
1168
|
+
- (bluefox) The `chartReady` event was omitted
|
|
1169
|
+
|
|
1170
|
+
### 4.0.10 (2023-02-10)
|
|
1171
|
+
|
|
1172
|
+
- (bluefox) Updated packages
|
|
1173
|
+
- (bluefox) made the fix for `material`
|
|
1174
|
+
|
|
1175
|
+
### 4.0.9 (2023-02-02)
|
|
1176
|
+
|
|
1177
|
+
- (bluefox) Updated packages
|
|
1178
|
+
|
|
1179
|
+
### 4.0.8 (2022-12-19)
|
|
1180
|
+
|
|
1181
|
+
- (bluefox) Extended socket with `log` command
|
|
1182
|
+
|
|
1183
|
+
### 4.0.6 (2022-12-19)
|
|
1184
|
+
|
|
1185
|
+
- (bluefox) Corrected URL for the connection
|
|
1186
|
+
|
|
1187
|
+
### 4.0.5 (2022-12-14)
|
|
1188
|
+
|
|
1189
|
+
- (bluefox) Added support of custom palette for color picker
|
|
1190
|
+
|
|
1191
|
+
### 4.0.2 (2022-12-01)
|
|
1192
|
+
|
|
1193
|
+
- (bluefox) use `@iobroker/socket-client` instead of `Connection.tsx`
|
|
1194
|
+
|
|
1195
|
+
### 3.5.3 (2022-11-30)
|
|
1196
|
+
|
|
1197
|
+
- (bluefox) Improved `renderTextWithA` function to support `<b>` and `<i>` tags
|
|
1198
|
+
|
|
1199
|
+
### 3.5.2 (2022-11-30)
|
|
1200
|
+
|
|
1201
|
+
- (bluefox) updated json config component
|
|
1202
|
+
|
|
1203
|
+
### 3.4.1 (2022-11-29)
|
|
1204
|
+
|
|
1205
|
+
- (bluefox) Added button text for message dialog
|
|
1206
|
+
|
|
1207
|
+
### 3.4.0 (2022-11-29)
|
|
1208
|
+
|
|
1209
|
+
- (bluefox) Added file selector
|
|
1210
|
+
|
|
1211
|
+
### 3.3.0 (2022-11-26)
|
|
1212
|
+
|
|
1213
|
+
- (bluefox) Added subscribe on files
|
|
1214
|
+
|
|
1215
|
+
### 3.2.7 (2022-11-13)
|
|
1216
|
+
|
|
1217
|
+
- (bluefox) Added `fullWidth` property to `Dialog`
|
|
1218
|
+
|
|
1219
|
+
### 3.2.6 (2022-11-08)
|
|
1220
|
+
|
|
1221
|
+
- (xXBJXx) Improved TreeTable component
|
|
1222
|
+
|
|
1223
|
+
### 3.2.5 (2022-11-08)
|
|
1224
|
+
|
|
1225
|
+
- (bluefox) Added the role filter for the object browser
|
|
1226
|
+
|
|
1227
|
+
### 3.2.4 (2022-11-03)
|
|
1228
|
+
|
|
1229
|
+
- (bluefox) Added support for alfa channel for `invertColor`
|
|
1230
|
+
|
|
1231
|
+
### 3.2.3 (2022-10-26)
|
|
1232
|
+
|
|
1233
|
+
- (bluefox) Corrected expert mode for object browser
|
|
1234
|
+
|
|
1235
|
+
### 3.2.2 (2022-10-25)
|
|
1236
|
+
|
|
1237
|
+
- (bluefox) Added support for prefixes for translations
|
|
1238
|
+
|
|
1239
|
+
### 3.2.1 (2022-10-24)
|
|
1240
|
+
|
|
1241
|
+
- (bluefox) Corrected color inversion
|
|
1242
|
+
|
|
1243
|
+
### 3.2.0 (2022-10-19)
|
|
1244
|
+
|
|
1245
|
+
- (bluefox) Added ukrainian translation
|
|
1246
|
+
|
|
1247
|
+
### 3.1.35 (2022-10-17)
|
|
1248
|
+
|
|
1249
|
+
- (bluefox) small changes for material
|
|
1250
|
+
|
|
1251
|
+
### 3.1.34 (2022-08-24)
|
|
1252
|
+
|
|
1253
|
+
- (bluefox) Implemented fallback to english by translations
|
|
1254
|
+
|
|
1255
|
+
### 3.1.33 (2022-08-24)
|
|
1256
|
+
|
|
1257
|
+
- (bluefox) Added support for onchange flag
|
|
1258
|
+
|
|
1259
|
+
### 3.1.30 (2022-08-23)
|
|
1260
|
+
|
|
1261
|
+
- (bluefox) Added method `getCompactSystemRepositories`
|
|
1262
|
+
- (bluefox) corrected error in `ObjectBrowser`
|
|
1263
|
+
|
|
1264
|
+
### 3.1.27 (2022-08-01)
|
|
1265
|
+
|
|
1266
|
+
- (bluefox) Disable file editing in FileViewer
|
|
1267
|
+
|
|
1268
|
+
### 3.1.26 (2022-08-01)
|
|
1269
|
+
|
|
1270
|
+
- (bluefox) Added translations
|
|
1271
|
+
- (bluefox) JSON schema was extended with missing definitions
|
|
1272
|
+
|
|
1273
|
+
### 3.1.24 (2022-07-28)
|
|
1274
|
+
|
|
1275
|
+
- (bluefox) Updated file browser and object browser
|
|
1276
|
+
|
|
1277
|
+
### 3.1.23 (2022-07-25)
|
|
1278
|
+
|
|
1279
|
+
- (bluefox) Extend custom filter for object selector
|
|
1280
|
+
|
|
1281
|
+
### 3.1.22 (2022-07-22)
|
|
1282
|
+
|
|
1283
|
+
- (bluefox) Added i18n tools for development
|
|
1284
|
+
|
|
1285
|
+
### 3.1.20 (2022-07-14)
|
|
1286
|
+
|
|
1287
|
+
- (bluefox) Allowed to show select dialog with the expert mode enabled
|
|
1288
|
+
|
|
1289
|
+
### 3.1.19 (2022-07-08)
|
|
1290
|
+
|
|
1291
|
+
- (bluefox) Allowed extending translations for all languages together
|
|
1292
|
+
|
|
1293
|
+
### 3.1.18 (2022-07-06)
|
|
1294
|
+
|
|
1295
|
+
- (bluefox) Added translation
|
|
1296
|
+
|
|
1297
|
+
### 3.1.17 (2022-07-05)
|
|
1298
|
+
|
|
1299
|
+
- (bluefox) Deactivate JSON editor for JSONConfig because of space
|
|
1300
|
+
|
|
1301
|
+
### 3.1.16 (2022-06-27)
|
|
1302
|
+
|
|
1303
|
+
- (bluefox) Update object browser
|
|
1304
|
+
|
|
1305
|
+
### 3.1.15 (2022-06-27)
|
|
1306
|
+
|
|
1307
|
+
- (bluefox) Allowed using of spaces in name
|
|
1308
|
+
|
|
1309
|
+
### 3.1.14 (2022-06-23)
|
|
1310
|
+
|
|
1311
|
+
- (bluefox) Added translations
|
|
1312
|
+
|
|
1313
|
+
### 3.1.11 (2022-06-22)
|
|
1314
|
+
|
|
1315
|
+
- (bluefox) Added preparations for iobroker cloud
|
|
1316
|
+
|
|
1317
|
+
### 3.1.10 (2022-06-22)
|
|
1318
|
+
|
|
1319
|
+
- (bluefox) Added translations
|
|
1320
|
+
|
|
1321
|
+
### 3.1.9 (2022-06-20)
|
|
1322
|
+
|
|
1323
|
+
- (bluefox) Allowed working behind reverse proxy
|
|
1324
|
+
|
|
1325
|
+
### 3.1.7 (2022-06-19)
|
|
1326
|
+
|
|
1327
|
+
- (bluefox) Added file select dialog
|
|
1328
|
+
|
|
1329
|
+
### 3.1.3 (2022-06-13)
|
|
1330
|
+
|
|
1331
|
+
- (bluefox) Added table with resized headers
|
|
1332
|
+
|
|
1333
|
+
### 3.1.2 (2022-06-09)
|
|
1334
|
+
|
|
1335
|
+
- (bluefox) Added new document icon (read only)
|
|
1336
|
+
|
|
1337
|
+
### 3.1.1 (2022-06-09)
|
|
1338
|
+
|
|
1339
|
+
- (bluefox) Allowed working behind reverse proxy
|
|
1340
|
+
|
|
1341
|
+
### 3.1.0 (2022-06-07)
|
|
1342
|
+
|
|
1343
|
+
- (bluefox) Some german texts were corrected
|
|
1344
|
+
|
|
1345
|
+
### 3.0.17 (2022-06-03)
|
|
1346
|
+
|
|
1347
|
+
- (bluefox) Allowed calling getAdapterInstances not for admin too
|
|
1348
|
+
|
|
1349
|
+
### 3.0.15 (2022-06-01)
|
|
1350
|
+
|
|
1351
|
+
- (bluefox) Updated JsonConfigComponent: password, table
|
|
1352
|
+
|
|
1353
|
+
### 3.0.14 (2022-05-25)
|
|
1354
|
+
|
|
1355
|
+
- (bluefox) Added ConfigGeneric to import
|
|
1356
|
+
|
|
1357
|
+
### 3.0.7 (2022-05-25)
|
|
1358
|
+
|
|
1359
|
+
- (bluefox) Made the module definitions
|
|
1360
|
+
|
|
1361
|
+
### 3.0.6 (2022-05-25)
|
|
1362
|
+
|
|
1363
|
+
- (bluefox) Added JsonConfigComponent
|
|
1364
|
+
|
|
1365
|
+
### 2.1.11 (2022-05-24)
|
|
1366
|
+
|
|
1367
|
+
- (bluefox) Update file browser. It supports now the file changed events.
|
|
1368
|
+
|
|
1369
|
+
### 2.1.10 (2022-05-24)
|
|
1370
|
+
|
|
1371
|
+
- (bluefox) Corrected object browser
|
|
1372
|
+
|
|
1373
|
+
### 2.1.9 (2022-05-16)
|
|
1374
|
+
|
|
1375
|
+
- (bluefox) Corrected expert mode in object browser
|
|
1376
|
+
|
|
1377
|
+
### 2.1.7 (2022-05-09)
|
|
1378
|
+
|
|
1379
|
+
- (bluefox) Changes were synchronized with adapter-react-v5
|
|
1380
|
+
- (bluefox) Added `I18n.disableWarning` method
|
|
1381
|
+
|
|
1382
|
+
### 2.1.6 (2022-03-28)
|
|
1383
|
+
|
|
1384
|
+
- (bluefox) Added `log` method to connection
|
|
1385
|
+
- (bluefox) Corrected translations
|
|
1386
|
+
|
|
1387
|
+
### 2.1.1 (2022-03-27)
|
|
1388
|
+
|
|
1389
|
+
- (bluefox) Corrected error in TreeTable
|
|
1390
|
+
|
|
1391
|
+
### 2.1.0 (2022-03-26)
|
|
1392
|
+
|
|
1393
|
+
- (bluefox) BREAKING_CHANGE: Corrected error with readFile(base64=false)
|
|
1394
|
+
|
|
1395
|
+
### 2.0.0 (2022-03-26)
|
|
1396
|
+
|
|
1397
|
+
- (bluefox) Initial version
|
|
1398
|
+
|
|
1399
|
+
### 0.1.0 (2022-03-23)
|
|
1400
|
+
|
|
1401
|
+
- (bluefox) Fixed theme errors
|
|
1402
|
+
|
|
1403
|
+
### 0.0.4 (2022-03-22)
|
|
1404
|
+
|
|
1405
|
+
- (bluefox) Fixed eslint warnings
|
|
1406
|
+
|
|
1407
|
+
### 0.0.3 (2022-03-19)
|
|
1408
|
+
|
|
1409
|
+
- (bluefox) beta version
|
|
1410
|
+
|
|
1411
|
+
### 0.0.2 (2022-02-24)
|
|
1412
|
+
|
|
1413
|
+
- (bluefox) try to publish a first version
|
|
1414
|
+
|
|
1415
|
+
### 0.0.1 (2022-02-24)
|
|
1416
|
+
|
|
1417
|
+
- initial commit
|
|
1418
|
+
|
|
1419
|
+
## License
|
|
1420
|
+
|
|
1421
|
+
The MIT License (MIT)
|
|
1422
|
+
|
|
1423
|
+
Copyright (c) 2019-2024 bluefox <dogafox@gmail.com>
|
|
1424
|
+
|
|
1425
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1426
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
1427
|
+
in the Software without restriction, including without limitation the rights
|
|
1428
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1429
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
1430
|
+
furnished to do so, subject to the following conditions:
|
|
1431
|
+
|
|
1432
|
+
The above copyright notice and this permission notice shall be included in all
|
|
1433
|
+
copies or substantial portions of the Software.
|
|
1434
|
+
|
|
1435
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1436
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1437
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1438
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1439
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1440
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1441
|
+
SOFTWARE.
|