@iobroker/adapter-react-v5 5.0.7 → 6.0.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 (54) hide show
  1. package/Components/404.d.ts +2 -5
  2. package/Components/404.js +10 -10
  3. package/Components/ColorPicker.d.ts +41 -4
  4. package/Components/ColorPicker.js +35 -32
  5. package/Components/ComplexCron.d.ts +35 -4
  6. package/Components/ComplexCron.js +14 -15
  7. package/Components/CustomModal.d.ts +2 -3
  8. package/Components/CustomModal.js +15 -16
  9. package/Components/FileBrowser.d.ts +116 -4
  10. package/Components/FileBrowser.js +160 -164
  11. package/Components/FileViewer.js +10 -8
  12. package/Components/Icon.d.ts +1 -0
  13. package/Components/Icon.js +11 -4
  14. package/Components/IconPicker.d.ts +5 -1
  15. package/Components/IconPicker.js +47 -49
  16. package/Components/ObjectBrowser.d.ts +12 -15
  17. package/Components/ObjectBrowser.js +362 -326
  18. package/Components/SaveCloseButtons.d.ts +6 -3
  19. package/Components/SaveCloseButtons.js +4 -5
  20. package/Components/Schedule.d.ts +60 -3
  21. package/Components/Schedule.js +112 -117
  22. package/Components/SelectWithIcon.d.ts +17 -4
  23. package/Components/SelectWithIcon.js +11 -7
  24. package/Components/SimpleCron/index.d.ts +19 -3
  25. package/Components/SimpleCron/index.js +8 -9
  26. package/Components/TabContainer.d.ts +3 -4
  27. package/Components/TabContainer.js +3 -7
  28. package/Components/TabContent.d.ts +2 -3
  29. package/Components/TabContent.js +2 -4
  30. package/Components/TableResize.d.ts +26 -3
  31. package/Components/TableResize.js +1 -39
  32. package/Components/TextWithIcon.d.ts +4 -4
  33. package/Components/TextWithIcon.js +6 -7
  34. package/Components/TreeTable.d.ts +40 -5
  35. package/Components/TreeTable.js +39 -37
  36. package/Components/UploadImage.d.ts +13 -4
  37. package/Components/UploadImage.js +11 -13
  38. package/Components/Utils.d.ts +2 -1
  39. package/Components/Utils.js +31 -0
  40. package/Dialogs/ComplexCron.d.ts +11 -3
  41. package/Dialogs/ComplexCron.js +2 -3
  42. package/Dialogs/Confirm.d.ts +20 -7
  43. package/Dialogs/Confirm.js +4 -15
  44. package/Dialogs/Cron.d.ts +12 -3
  45. package/Dialogs/Cron.js +3 -11
  46. package/Dialogs/SelectFile.d.ts +12 -3
  47. package/Dialogs/SelectFile.js +8 -9
  48. package/Dialogs/SelectID.d.ts +1 -1
  49. package/Dialogs/SelectID.js +1 -1
  50. package/Dialogs/SimpleCron.d.ts +10 -3
  51. package/Dialogs/SimpleCron.js +2 -10
  52. package/README.md +74 -1
  53. package/modulefederation.admin.config.js +2 -0
  54. package/package.json +6 -7
@@ -27,7 +27,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  const react_1 = __importStar(require("react"));
30
- const styles_1 = require("@mui/styles");
31
30
  const react_colorful_1 = require("react-colorful");
32
31
  const material_1 = require("@mui/material");
33
32
  const icons_material_1 = require("@mui/icons-material");
@@ -62,7 +61,7 @@ function setAttr(obj, attr, value) {
62
61
  }
63
62
  return setAttr(obj[name], attr, value);
64
63
  }
65
- const styles = (theme) => ({
64
+ const styles = {
66
65
  tableContainer: {
67
66
  width: '100%',
68
67
  height: '100%',
@@ -92,8 +91,8 @@ const styles = (theme) => ({
92
91
  },
93
92
  cellHeader: {
94
93
  fontWeight: 'bold',
95
- background: theme.palette.mode === 'dark' ? '#888' : '#888',
96
- color: theme.palette.mode === 'dark' ? '#EEE' : '#111',
94
+ background: (theme) => theme.palette.mode === 'dark' ? '#888' : '#888',
95
+ color: (theme) => theme.palette.mode === 'dark' ? '#EEE' : '#111',
97
96
  height: 48,
98
97
  wordBreak: 'break-word',
99
98
  whiteSpace: 'pre',
@@ -155,7 +154,7 @@ const styles = (theme) => ({
155
154
  glow: {
156
155
  animation: 'glow 0.2s 2 alternate',
157
156
  },
158
- });
157
+ };
159
158
  function descendingComparator(a, b, orderBy, lookup) {
160
159
  const _a = getAttr(a, orderBy, lookup) || '';
161
160
  const _b = getAttr(b, orderBy, lookup) || '';
@@ -275,10 +274,10 @@ class TreeTable extends react_1.Component {
275
274
  .map((v, i) => { var _c; return react_1.default.createElement(material_1.MenuItem, { key: i, value: v }, (_c = col.lookup) === null || _c === void 0 ? void 0 : _c[v]); }));
276
275
  }
277
276
  renderCellEditString(col, val) {
278
- return react_1.default.createElement(material_1.TextField, { variant: "standard", className: this.props.classes.fieldEdit, fullWidth: true, value: this.state.editData && this.state.editData[col.field] !== undefined ? this.state.editData[col.field] : val, onChange: e => this.onChange(col, val, e.target.value) });
277
+ return react_1.default.createElement(material_1.TextField, { variant: "standard", style: styles.fieldEdit, fullWidth: true, value: this.state.editData && this.state.editData[col.field] !== undefined ? this.state.editData[col.field] : val, onChange: e => this.onChange(col, val, e.target.value) });
279
278
  }
280
279
  renderCellEditNumber(col, val) {
281
- return react_1.default.createElement(material_1.TextField, { variant: "standard", className: this.props.classes.fieldEdit, type: "number", fullWidth: true, value: this.state.editData && this.state.editData[col.field] !== undefined ? this.state.editData[col.field] : val, onChange: e => this.onChange(col, val, e.target.value) });
280
+ return react_1.default.createElement(material_1.TextField, { variant: "standard", style: styles.fieldEdit, type: "number", fullWidth: true, value: this.state.editData && this.state.editData[col.field] !== undefined ? this.state.editData[col.field] : val, onChange: e => this.onChange(col, val, e.target.value) });
282
281
  }
283
282
  renderCellEditCustom(col, val, item) {
284
283
  const EditComponent = col.editComponent;
@@ -288,13 +287,16 @@ class TreeTable extends react_1.Component {
288
287
  item = JSON.parse(JSON.stringify(item));
289
288
  item[col.field] = val;
290
289
  }
291
- return react_1.default.createElement(EditComponent, { value: val, rowData: item, onChange: (newVal) => this.onChange(col, val, newVal) });
290
+ return EditComponent ? react_1.default.createElement(EditComponent, { value: val, rowData: item, onChange: (newVal) => this.onChange(col, val, newVal) }) : null;
292
291
  }
293
292
  renderCellEditBoolean(col, val) {
294
293
  return react_1.default.createElement(material_1.Checkbox, { checked: this.state.editData && this.state.editData[col.field] !== undefined ? !!this.state.editData[col.field] : !!val, onChange: e => this.onChange(col, !!val, e.target.checked), inputProps: { 'aria-label': 'checkbox' } });
295
294
  }
296
295
  renderSelectColorDialog() {
297
- return react_1.default.createElement(material_1.Dialog, { classes: { root: this.props.classes.colorDialog, paper: this.props.classes.colorDialog }, onClose: () => {
296
+ return react_1.default.createElement(material_1.Dialog, { sx: {
297
+ '& .MuiPaper-root': styles.root,
298
+ '& .MuiPaper-paper': styles.paper,
299
+ }, onClose: () => {
298
300
  this.selectCallback = null;
299
301
  this.setState({ showSelectColor: false });
300
302
  }, open: this.state.showSelectColor },
@@ -302,9 +304,9 @@ class TreeTable extends react_1.Component {
302
304
  }
303
305
  renderCellEditColor(col, val) {
304
306
  const _val = this.state.editData && this.state.editData[col.field] !== undefined ? this.state.editData[col.field] : val;
305
- return react_1.default.createElement("div", { className: this.props.classes.fieldEdit },
306
- react_1.default.createElement(material_1.TextField, { variant: "standard", fullWidth: true, className: this.props.classes.fieldEditWithButton, value: _val, inputProps: { style: { backgroundColor: _val, color: Utils_1.default.isUseBright(_val) ? '#FFF' : '#000' } }, onChange: e => this.onChange(col, !!val, e.target.value) }),
307
- react_1.default.createElement(material_1.IconButton, { className: this.props.classes.fieldButton, onClick: () => {
307
+ return react_1.default.createElement("div", { style: styles.fieldEdit },
308
+ react_1.default.createElement(material_1.TextField, { variant: "standard", fullWidth: true, style: styles.fieldEditWithButton, value: _val, inputProps: { style: { backgroundColor: _val, color: Utils_1.default.isUseBright(_val) ? '#FFF' : '#000' } }, onChange: e => this.onChange(col, !!val, e.target.value) }),
309
+ react_1.default.createElement(material_1.IconButton, { style: styles.fieldButton, onClick: () => {
308
310
  this.selectCallback = newColor => this.onChange(col, val, newColor);
309
311
  this.setState({ showSelectColor: true, selectIdValue: val });
310
312
  }, size: "large" },
@@ -321,9 +323,9 @@ class TreeTable extends react_1.Component {
321
323
  return null;
322
324
  }
323
325
  renderCellEditObjectID(col, val) {
324
- return react_1.default.createElement("div", { className: this.props.classes.fieldEdit },
325
- react_1.default.createElement(material_1.TextField, { variant: "standard", fullWidth: true, className: this.props.classes.fieldEditWithButton, value: this.state.editData && this.state.editData[col.field] !== undefined ? this.state.editData[col.field] : val, onChange: e => this.onChange(col, val, e.target.value) }),
326
- react_1.default.createElement(material_1.IconButton, { className: this.props.classes.fieldButton, onClick: () => {
326
+ return react_1.default.createElement("div", { style: styles.fieldEdit },
327
+ react_1.default.createElement(material_1.TextField, { variant: "standard", fullWidth: true, style: styles.fieldEditWithButton, value: this.state.editData && this.state.editData[col.field] !== undefined ? this.state.editData[col.field] : val, onChange: e => this.onChange(col, val, e.target.value) }),
328
+ react_1.default.createElement(material_1.IconButton, { style: styles.fieldButton, onClick: () => {
327
329
  this.selectCallback = selected => this.onChange(col, val, selected);
328
330
  this.setState({ showSelectId: true, selectIdValue: val });
329
331
  }, size: "large" },
@@ -341,20 +343,20 @@ class TreeTable extends react_1.Component {
341
343
  }
342
344
  renderCell(item, col, level, i) {
343
345
  if (this.state.editMode === i && col.editable !== 'never' && col.editable !== false) {
344
- return react_1.default.createElement(material_1.TableCell, { key: col.field, className: Utils_1.default.clsx(this.props.classes.cell, level && this.props.classes.cellSecondary), style: col.cellStyle, component: "th" }, this.renderCellEdit(item, col));
346
+ return react_1.default.createElement(material_1.TableCell, { key: col.field, style: Object.assign(Object.assign(Object.assign({}, styles.cell), (level ? styles.cellSecondary : undefined)), col.cellStyle), component: "th" }, this.renderCellEdit(item, col));
345
347
  }
346
- return react_1.default.createElement(material_1.TableCell, { key: col.field, className: Utils_1.default.clsx(this.props.classes.cell, level && this.props.classes.cellSecondary), style: col.cellStyle, component: "th" }, TreeTable.renderCellNonEdit(item, col));
348
+ return react_1.default.createElement(material_1.TableCell, { key: col.field, style: Object.assign(Object.assign(Object.assign({}, styles.cell), (level ? styles.cellSecondary : undefined)), col.cellStyle), component: "th" }, TreeTable.renderCellNonEdit(item, col));
347
349
  }
348
350
  renderCellWithSubField(item, col) {
349
351
  const main = getAttr(item, col.field, col.lookup);
350
352
  if (col.subField) {
351
353
  const sub = getAttr(item, col.subField, col.subLookup);
352
354
  return react_1.default.createElement("div", null,
353
- react_1.default.createElement("div", { className: this.props.classes.mainText }, main),
354
- react_1.default.createElement("div", { className: this.props.classes.subText, style: col.subStyle || {} }, sub));
355
+ react_1.default.createElement("div", { style: styles.mainText }, main),
356
+ react_1.default.createElement("div", { style: Object.assign({}, styles.subText, col.subStyle || {}) }, sub));
355
357
  }
356
358
  return react_1.default.createElement("div", null,
357
- react_1.default.createElement("div", { className: this.props.classes.mainText }, main));
359
+ react_1.default.createElement("div", { style: styles.mainText }, main));
358
360
  }
359
361
  renderLine(item, level) {
360
362
  const levelShift = this.props.levelShift === undefined ? 24 : this.props.levelShift;
@@ -372,8 +374,8 @@ class TreeTable extends react_1.Component {
372
374
  // try to find children
373
375
  const opened = this.state.opened.includes(item.id);
374
376
  const children = this.props.data.filter(it => it.parentId === item.id);
375
- const row = react_1.default.createElement(material_1.TableRow, { key: item.id, className: Utils_1.default.clsx(`table-row-${(item.id || '').toString().replace(/[.$]/g, '_')}`, this.state.update && this.state.update.includes(item.id) && this.props.classes.glow, this.props.classes.row, level && this.props.classes.rowSecondary, !level && children.length && this.props.classes.rowMainWithChildren, !level && !children.length && this.props.classes.rowMainWithoutChildren, this.state.editMode !== false && this.state.editMode !== i && this.props.classes.rowNoEdit, this.state.deleteMode !== false && this.state.deleteMode !== i && this.props.classes.rowNoEdit) },
376
- react_1.default.createElement(material_1.TableCell, { className: Utils_1.default.clsx(this.props.classes.cell, this.props.classes.cellExpand, level && this.props.classes.cellSecondary) }, children.length ? react_1.default.createElement(material_1.IconButton, { onClick: () => {
377
+ const row = react_1.default.createElement(material_1.TableRow, { key: item.id, className: `table-row-${(item.id || '').toString().replace(/[.$]/g, '_')}`, style: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, ((this.state.update && this.state.update.includes(item.id) && styles.glow) || undefined)), styles.row), (level ? styles.rowSecondary : undefined)), (!level && children.length ? styles.rowMainWithChildren : undefined)), (!level && !children.length ? styles.rowMainWithoutChildren : undefined)), (this.state.editMode !== false && this.state.editMode !== i ? styles.rowNoEdit : undefined)), (this.state.deleteMode !== false && this.state.deleteMode !== i ? styles.rowNoEdit : undefined)) },
378
+ react_1.default.createElement(material_1.TableCell, { style: Object.assign(Object.assign(Object.assign({}, styles.cell), styles.cellExpand), (level ? styles.cellSecondary : undefined)) }, children.length ? react_1.default.createElement(material_1.IconButton, { onClick: () => {
377
379
  const _opened = [...this.state.opened];
378
380
  const pos = _opened.indexOf(item.id);
379
381
  if (pos === -1) {
@@ -386,12 +388,12 @@ class TreeTable extends react_1.Component {
386
388
  (window._localStorage || window.localStorage).setItem(this.props.name || 'iob-table', JSON.stringify(_opened));
387
389
  this.setState({ opened: _opened });
388
390
  }, size: "small" }, opened ? react_1.default.createElement(icons_material_1.ExpandMore, null) : react_1.default.createElement(icons_material_1.NavigateNext, null)) : null),
389
- react_1.default.createElement(material_1.TableCell, { scope: "row", className: Utils_1.default.clsx(this.props.classes.cell, level && this.props.classes.cellSecondary), style: Object.assign(Object.assign({}, this.props.columns[0].cellStyle), { paddingLeft: levelShift * level }) }, this.props.columns[0].subField ?
391
+ react_1.default.createElement(material_1.TableCell, { scope: "row", style: Object.assign(Object.assign(Object.assign(Object.assign({}, styles.cell), (level ? styles.cellSecondary : undefined)), this.props.columns[0].cellStyle), { paddingLeft: levelShift * level }) }, this.props.columns[0].subField ?
390
392
  this.renderCellWithSubField(item, this.props.columns[0])
391
393
  :
392
394
  getAttr(item, this.props.columns[0].field, this.props.columns[0].lookup)),
393
395
  this.props.columns.map((col, ii) => (!ii && !col.hidden ? null : this.renderCell(item, col, level, i))),
394
- this.props.onUpdate ? react_1.default.createElement(material_1.TableCell, { className: Utils_1.default.clsx(this.props.classes.cell, this.props.classes.cellButton) }, this.state.editMode === i || this.state.deleteMode === i ?
396
+ this.props.onUpdate ? react_1.default.createElement(material_1.TableCell, { style: Object.assign(Object.assign({}, styles.cell), styles.cellButton) }, this.state.editMode === i || this.state.deleteMode === i ?
395
397
  react_1.default.createElement(material_1.IconButton, { disabled: this.state.editMode !== false && (!this.state.editData || !Object.keys(this.state.editData).length), onClick: () => {
396
398
  if (this.state.editMode !== false) {
397
399
  const newData = JSON.parse(JSON.stringify(item));
@@ -407,12 +409,12 @@ class TreeTable extends react_1.Component {
407
409
  react_1.default.createElement(material_1.IconButton, { disabled: this.state.editMode !== false, onClick: () => this.setState({ editMode: i, editData: null }), size: "large" },
408
410
  react_1.default.createElement(icons_material_1.Edit, null))) : null,
409
411
  this.props.onDelete && !this.props.onUpdate ?
410
- react_1.default.createElement(material_1.TableCell, { className: Utils_1.default.clsx(this.props.classes.cell, this.props.classes.cellButton) }, this.state.deleteMode === i ?
412
+ react_1.default.createElement(material_1.TableCell, { style: Object.assign(Object.assign({}, styles.cell), styles.cellButton) }, this.state.deleteMode === i ?
411
413
  react_1.default.createElement(material_1.IconButton, { disabled: this.state.editMode !== false && (!this.state.editData || !Object.keys(this.state.editData).length), onClick: () => this.setState({ deleteMode: false }, () => this.props.onDelete && this.props.onDelete(item)), size: "large" },
412
414
  react_1.default.createElement(icons_material_1.Check, null))
413
415
  :
414
416
  null) : null,
415
- this.props.onUpdate || this.props.onDelete ? react_1.default.createElement(material_1.TableCell, { className: Utils_1.default.clsx(this.props.classes.cell, this.props.classes.cellButton) }, this.state.editMode === i || this.state.deleteMode === i ?
417
+ this.props.onUpdate || this.props.onDelete ? react_1.default.createElement(material_1.TableCell, { style: Object.assign(Object.assign({}, styles.cell), styles.cellButton) }, this.state.editMode === i || this.state.deleteMode === i ?
416
418
  react_1.default.createElement(material_1.IconButton, { onClick: () => this.setState({ editMode: false, deleteMode: false }), size: "large" },
417
419
  react_1.default.createElement(icons_material_1.Close, null))
418
420
  :
@@ -432,19 +434,19 @@ class TreeTable extends react_1.Component {
432
434
  renderHead() {
433
435
  return react_1.default.createElement(material_1.TableHead, null,
434
436
  react_1.default.createElement(material_1.TableRow, { key: "headerRow" },
435
- react_1.default.createElement(material_1.TableCell, { component: "th", className: Utils_1.default.clsx(this.props.classes.cell, this.props.classes.cellHeader, this.props.classes.cellExpand) }),
436
- react_1.default.createElement(material_1.TableCell, { component: "th", className: Utils_1.default.clsx(this.props.classes.cell, this.props.classes.cellHeader, this.props.classes[`width_${this.props.columns[0].field.replace(/\./g, '_')}`]), style: this.props.columns[0].headerStyle || this.props.columns[0].cellStyle, sortDirection: this.props.noSort ? false : (this.state.orderBy === this.props.columns[0].field ? this.state.order : false) }, this.props.noSort ? null : react_1.default.createElement(material_1.TableSortLabel, { active: this.state.orderBy === this.props.columns[0].field, direction: this.state.orderBy === this.props.columns[0].field ? this.state.order : 'asc', onClick: () => this.handleRequestSort(this.props.columns[0].field) },
437
+ react_1.default.createElement(material_1.TableCell, { component: "th", sx: Utils_1.default.getStyle(styles.cell, styles.cellHeader, styles.cellExpand) }),
438
+ react_1.default.createElement(material_1.TableCell, { component: "th", sx: Utils_1.default.getStyle(styles.cell, styles.cellHeader, styles[`width_${this.props.columns[0].field.replace(/\./g, '_')}`]), style: this.props.columns[0].headerStyle || this.props.columns[0].cellStyle, sortDirection: this.props.noSort ? false : (this.state.orderBy === this.props.columns[0].field ? this.state.order : false) }, this.props.noSort ? null : react_1.default.createElement(material_1.TableSortLabel, { active: this.state.orderBy === this.props.columns[0].field, direction: this.state.orderBy === this.props.columns[0].field ? this.state.order : 'asc', onClick: () => this.handleRequestSort(this.props.columns[0].field) },
437
439
  this.props.columns[0].title || this.props.columns[0].field,
438
440
  this.state.orderBy === this.props.columns[0].field ?
439
- react_1.default.createElement("span", { className: this.props.classes.visuallyHidden }, this.state.order === 'desc' ? 'sorted descending' : 'sorted ascending') : null)),
440
- this.props.columns.map((col, i) => (!i && !col.hidden ? null : react_1.default.createElement(material_1.TableCell, { key: col.field, className: Utils_1.default.clsx(this.props.classes.cell, this.props.classes.cellHeader, this.props.classes[`width_${col.field.replace(/\./g, '_')}`]), style: col.headerStyle || col.cellStyle, component: "th" }, this.props.noSort ? null : react_1.default.createElement(material_1.TableSortLabel, { active: this.state.orderBy === col.field, direction: this.state.orderBy === col.field ? this.state.order : 'asc', onClick: () => this.handleRequestSort(col.field) },
441
+ react_1.default.createElement("span", { style: styles.visuallyHidden }, this.state.order === 'desc' ? 'sorted descending' : 'sorted ascending') : null)),
442
+ this.props.columns.map((col, i) => (!i && !col.hidden ? null : react_1.default.createElement(material_1.TableCell, { key: col.field, sx: Utils_1.default.getStyle(styles.cell, styles.cellHeader, styles[`width_${col.field.replace(/\./g, '_')}`]), style: col.headerStyle || col.cellStyle, component: "th" }, this.props.noSort ? null : react_1.default.createElement(material_1.TableSortLabel, { active: this.state.orderBy === col.field, direction: this.state.orderBy === col.field ? this.state.order : 'asc', onClick: () => this.handleRequestSort(col.field) },
441
443
  col.title || col.field,
442
444
  this.state.orderBy === col.field ?
443
- react_1.default.createElement("span", { className: this.props.classes.visuallyHidden }, this.state.order === 'desc' ? 'sorted descending' : 'sorted ascending') : null)))),
444
- this.props.onUpdate ? react_1.default.createElement(material_1.TableCell, { component: "th", className: Utils_1.default.clsx(this.props.classes.cell, this.props.classes.cellHeader, this.props.classes.cellButton) }, !this.props.noAdd ? react_1.default.createElement(material_1.Fab, { color: "primary", size: "small", disabled: this.state.editMode !== false, onClick: () => this.props.onUpdate && this.props.onUpdate(true) },
445
+ react_1.default.createElement("span", { style: styles.visuallyHidden }, this.state.order === 'desc' ? 'sorted descending' : 'sorted ascending') : null)))),
446
+ this.props.onUpdate ? react_1.default.createElement(material_1.TableCell, { component: "th", sx: Utils_1.default.getStyle(styles.cell, styles.cellHeader, styles.cellButton) }, !this.props.noAdd ? react_1.default.createElement(material_1.Fab, { color: "primary", size: "small", disabled: this.state.editMode !== false, onClick: () => this.props.onUpdate && this.props.onUpdate(true) },
445
447
  react_1.default.createElement(icons_material_1.Add, null)) : null) : null,
446
448
  this.props.onDelete || this.props.onUpdate ?
447
- react_1.default.createElement(material_1.TableCell, { component: "th", className: Utils_1.default.clsx(this.props.classes.cell, this.props.classes.cellHeader, this.props.classes.cellButton) }) : null));
449
+ react_1.default.createElement(material_1.TableCell, { component: "th", sx: Utils_1.default.getStyle(styles.cell, styles.cellHeader, styles.cellButton) }) : null));
448
450
  }
449
451
  render() {
450
452
  const col = this.props.columns.find(_col => _col.field === this.state.orderBy);
@@ -458,8 +460,8 @@ class TreeTable extends react_1.Component {
458
460
  this.setState({ update: null });
459
461
  }, 500);
460
462
  }
461
- return react_1.default.createElement("div", { className: Utils_1.default.clsx(this.props.classes.tableContainer, this.props.className) },
462
- react_1.default.createElement(material_1.Table, { className: this.props.classes.table, "aria-label": "simple table", size: "small", stickyHeader: true },
463
+ return react_1.default.createElement("div", { style: styles.tableContainer, className: this.props.className },
464
+ react_1.default.createElement(material_1.Table, { style: styles.table, "aria-label": "simple table", size: "small", stickyHeader: true },
463
465
  this.renderHead(),
464
466
  react_1.default.createElement(material_1.TableBody, null, table.map(it => this.renderLine(it)))),
465
467
  this.renderSelectIdDialog(),
@@ -531,7 +533,7 @@ const styles = theme => ({
531
533
  });
532
534
  // renderTable
533
535
  renderTable() {
534
- return <div className={this.props.classes.tableDiv}>
536
+ return <div style={styles.tableDiv}>
535
537
  <TreeTable
536
538
  columns={this.columns}
537
539
  data={lines}
@@ -541,4 +543,4 @@ renderTable() {
541
543
  </div>;
542
544
  }
543
545
  */
544
- exports.default = (0, styles_1.withStyles)(styles)(TreeTable);
546
+ exports.default = TreeTable;
@@ -1,6 +1,5 @@
1
- import React from 'react';
1
+ import React, { Component } from 'react';
2
2
  interface UploadImageProps {
3
- classes: Record<string, string>;
4
3
  maxSize?: number;
5
4
  disabled?: boolean;
6
5
  crop?: boolean;
@@ -10,5 +9,15 @@ interface UploadImageProps {
10
9
  removeIconFunc: () => void | null;
11
10
  accept?: Record<string, string[]>;
12
11
  }
13
- declare const _default: React.JSXElementConstructor<Omit<UploadImageProps, "classes"> & import("@mui/styles").StyledComponentProps<string> & object>;
14
- export default _default;
12
+ interface UploadImageState {
13
+ uploadFile: boolean | 'dragging';
14
+ anchorEl: HTMLElement | null;
15
+ cropHandler: boolean;
16
+ }
17
+ declare class UploadImage extends Component<UploadImageProps, UploadImageState> {
18
+ private readonly cropperRef;
19
+ constructor(props: UploadImageProps);
20
+ onDrop(acceptedFiles: File[]): void;
21
+ render(): React.JSX.Element;
22
+ }
23
+ export default UploadImage;
@@ -29,11 +29,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  const react_1 = __importStar(require("react"));
30
30
  const react_dropzone_1 = __importDefault(require("react-dropzone"));
31
31
  const react_cropper_1 = require("react-cropper");
32
- const styles_1 = require("@mui/styles");
33
32
  const material_1 = require("@mui/material");
34
33
  const icons_material_1 = require("@mui/icons-material");
35
34
  const fa_1 = require("react-icons/fa");
36
- const Utils_1 = __importDefault(require("./Utils"));
37
35
  const i18n_1 = __importDefault(require("../i18n"));
38
36
  const Icon_1 = __importDefault(require("./Icon"));
39
37
  // import 'cropperjs/dist/cropper.css';
@@ -472,7 +470,7 @@ class UploadImage extends react_1.Component {
472
470
  reader.readAsArrayBuffer(file);
473
471
  }
474
472
  render() {
475
- const { disabled, classes, icon, removeIconFunc, error, crop, onChange, } = this.props;
473
+ const { disabled, icon, removeIconFunc, error, crop, onChange, } = this.props;
476
474
  const maxSize = this.props.maxSize || 10 * 1024;
477
475
  const accept = this.props.accept || { 'image/*': [] };
478
476
  const { uploadFile, anchorEl, cropHandler } = this.state;
@@ -484,22 +482,22 @@ class UploadImage extends react_1.Component {
484
482
  else {
485
483
  this.onDrop(acceptedFiles);
486
484
  }
487
- } }, ({ getRootProps, getInputProps }) => react_1.default.createElement("div", Object.assign({ className: Utils_1.default.clsx(classes.uploadDiv, uploadFile === 'dragging' && classes.uploadDivDragging, classes.dropZone, disabled && classes.disabledOpacity, !icon && classes.dropZoneEmpty) }, getRootProps()),
485
+ } }, ({ getRootProps, getInputProps }) => react_1.default.createElement("div", Object.assign({ style: Object.assign({}, styles.uploadDiv, uploadFile === 'dragging' ? styles.uploadDivDragging : {}, styles.dropZone, disabled ? styles.disabledOpacity : {}, !icon ? styles.dropZoneEmpty : {}) }, getRootProps()),
488
486
  react_1.default.createElement("input", Object.assign({}, getInputProps())),
489
- react_1.default.createElement("div", { className: Utils_1.default.clsx(classes.uploadCenterDiv, error && classes.error) },
490
- !icon ? react_1.default.createElement("div", { className: classes.uploadCenterTextAndIcon },
491
- react_1.default.createElement(fa_1.FaFileUpload, { className: classes.uploadCenterIcon }),
492
- react_1.default.createElement("div", { className: classes.uploadCenterText }, uploadFile === 'dragging' ? i18n_1.default.t('ra_Drop file here') :
487
+ react_1.default.createElement("div", { style: Object.assign({}, styles.uploadCenterDiv, error ? styles.error : {}) },
488
+ !icon ? react_1.default.createElement("div", { style: styles.uploadCenterTextAndIcon },
489
+ react_1.default.createElement(fa_1.FaFileUpload, { style: styles.uploadCenterIcon }),
490
+ react_1.default.createElement("div", { style: styles.uploadCenterText }, uploadFile === 'dragging' ? i18n_1.default.t('ra_Drop file here') :
493
491
  i18n_1.default.t('ra_Place your files here or click here to open the browse dialog')))
494
492
  :
495
- removeIconFunc && !cropHandler && react_1.default.createElement("div", { className: classes.buttonRemoveWrapper },
493
+ removeIconFunc && !cropHandler && react_1.default.createElement("div", { style: styles.buttonRemoveWrapper },
496
494
  react_1.default.createElement(material_1.Tooltip, { title: i18n_1.default.t('ra_Clear') },
497
495
  react_1.default.createElement(material_1.IconButton, { size: "large", onClick: e => {
498
496
  removeIconFunc && removeIconFunc();
499
497
  e.stopPropagation();
500
498
  } },
501
499
  react_1.default.createElement(icons_material_1.Close, null)))),
502
- icon && crop && react_1.default.createElement("div", { className: classes.buttonCropWrapper },
500
+ icon && crop && react_1.default.createElement("div", { style: styles.buttonCropWrapper },
503
501
  react_1.default.createElement(material_1.Tooltip, { title: i18n_1.default.t('ra_Crop') },
504
502
  react_1.default.createElement(material_1.IconButton, { size: "large", onClick: e => {
505
503
  if (!cropHandler) {
@@ -525,8 +523,8 @@ class UploadImage extends react_1.Component {
525
523
  }
526
524
  }) }, i18n_1.default.t('ra_Save')),
527
525
  react_1.default.createElement(material_1.MenuItem, { onClick: () => this.setState({ anchorEl: null, cropHandler: false }) }, i18n_1.default.t('ra_Close')))),
528
- icon && !cropHandler ? react_1.default.createElement(Icon_1.default, { src: icon, className: classes.image, alt: "icon" }) : null,
529
- icon && crop && cropHandler ? react_1.default.createElement(react_cropper_1.Cropper, { ref: this.cropperRef, className: classes.image, src: icon, initialAspectRatio: 1, viewMode: 1, guides: false, minCropBoxHeight: 10, minCropBoxWidth: 10, background: false, checkOrientation: false }) : null)));
526
+ icon && !cropHandler ? react_1.default.createElement(Icon_1.default, { src: icon, style: styles.image, alt: "icon" }) : null,
527
+ icon && crop && cropHandler ? react_1.default.createElement(react_cropper_1.Cropper, { ref: this.cropperRef, style: styles.image, src: icon, initialAspectRatio: 1, viewMode: 1, guides: false, minCropBoxHeight: 10, minCropBoxWidth: 10, background: false, checkOrientation: false }) : null)));
530
528
  }
531
529
  }
532
- exports.default = (0, styles_1.withStyles)(styles)(UploadImage);
530
+ exports.default = UploadImage;
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * */
7
7
  import React from 'react';
8
- import { ThemeName, ThemeType } from '../types';
8
+ import { IobTheme, ThemeName, ThemeType } from '../types';
9
9
  type SmartName = null | false | string | ({
10
10
  [lang in ioBroker.Languages]?: string;
11
11
  } & {
@@ -305,5 +305,6 @@ declare class Utils {
305
305
  * Check if the date is valid
306
306
  */
307
307
  static isValidDate(date: any): boolean;
308
+ static getStyle(theme: IobTheme, ...args: (((_theme: IobTheme) => Record<string, any>) | undefined | Record<string, any>)[]): Record<string, any>;
308
309
  }
309
310
  export default Utils;
@@ -1580,6 +1580,37 @@ class Utils {
1580
1580
  // eslint-disable-next-line no-restricted-globals
1581
1581
  return date instanceof Date && !isNaN(date);
1582
1582
  }
1583
+ static getStyle(theme, ...args) {
1584
+ const result = {};
1585
+ for (let a = 0; a < args.length; a++) {
1586
+ if (typeof args[a] === 'function') {
1587
+ Object.assign(result, args[a](theme));
1588
+ }
1589
+ else if (args[a] && typeof args[a] === 'object') {
1590
+ Object.keys(args[a]).forEach((attr) => {
1591
+ if (typeof args[a][attr] === 'function') {
1592
+ result[attr] = args[a][attr](theme);
1593
+ }
1594
+ else if (typeof args[a][attr] === 'object') {
1595
+ const obj = args[a][attr];
1596
+ result[attr] = {};
1597
+ Object.keys(obj).forEach((attr1) => {
1598
+ if (typeof obj[attr1] === 'function') {
1599
+ result[attr][attr1] = obj(theme);
1600
+ }
1601
+ else if (obj[attr1] || obj[attr1] === 0) {
1602
+ result[attr][attr1] = obj[attr1];
1603
+ }
1604
+ });
1605
+ }
1606
+ else if (args[a][attr] || args[a][attr] === 0) {
1607
+ result[attr] = args[a][attr];
1608
+ }
1609
+ });
1610
+ }
1611
+ }
1612
+ return result;
1613
+ }
1583
1614
  }
1584
1615
  Utils.namespace = NAMESPACE;
1585
1616
  Utils.INSTANCES = 'instances';
@@ -7,8 +7,16 @@ interface DialogCronProps {
7
7
  cancel?: string;
8
8
  ok?: string;
9
9
  clear?: string;
10
- classes: Record<string, string>;
11
10
  clearButton?: boolean;
12
11
  }
13
- declare const _default: React.JSXElementConstructor<Omit<DialogCronProps, "classes"> & import("@mui/styles").StyledComponentProps<string> & object>;
14
- export default _default;
12
+ interface DialogCronState {
13
+ cron: string;
14
+ }
15
+ declare class DialogComplexCron extends React.Component<DialogCronProps, DialogCronState> {
16
+ constructor(props: DialogCronProps);
17
+ handleCancel(): void;
18
+ handleOk(): void;
19
+ handleClear(): void;
20
+ render(): React.JSX.Element;
21
+ }
22
+ export default DialogComplexCron;
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const react_1 = __importDefault(require("react"));
7
- const styles_1 = require("@mui/styles");
8
7
  const material_1 = require("@mui/material");
9
8
  const icons_material_1 = require("@mui/icons-material");
10
9
  const ComplexCron_1 = __importDefault(require("../Components/ComplexCron"));
@@ -51,7 +50,7 @@ class DialogComplexCron extends react_1.default.Component {
51
50
  this.props.onClose();
52
51
  }
53
52
  render() {
54
- return react_1.default.createElement(material_1.Dialog, { onClose: () => { }, maxWidth: "md", fullWidth: true, classes: { paper: this.props.classes.dialogPaper }, open: !0, "aria-labelledby": "cron-dialog-title" },
53
+ return react_1.default.createElement(material_1.Dialog, { onClose: () => { }, maxWidth: "md", fullWidth: true, sx: { '& .MuiDialog-paper': styles.dialogPaper }, open: !0, "aria-labelledby": "cron-dialog-title" },
55
54
  react_1.default.createElement(material_1.DialogTitle, { id: "cron-dialog-title" }, this.props.title || i18n_1.default.t('ra_Define schedule...')),
56
55
  react_1.default.createElement(material_1.DialogContent, { style: { height: '100%', overflow: 'hidden' } },
57
56
  react_1.default.createElement(ComplexCron_1.default, { cronExpression: this.state.cron, onChange: cron => this.setState({ cron }), language: i18n_1.default.getLanguage() })),
@@ -61,4 +60,4 @@ class DialogComplexCron extends react_1.default.Component {
61
60
  react_1.default.createElement(material_1.Button, { color: "grey", variant: "contained", onClick: () => this.handleCancel(), startIcon: react_1.default.createElement(icons_material_1.Cancel, null) }, this.props.cancel || i18n_1.default.t('ra_Cancel'))));
62
61
  }
63
62
  }
64
- exports.default = (0, styles_1.withStyles)(styles)(DialogComplexCron);
63
+ exports.default = DialogComplexCron;
@@ -4,22 +4,35 @@
4
4
  * MIT License
5
5
  *
6
6
  * */
7
- import React from 'react';
7
+ import React, { Component } from 'react';
8
8
  interface DialogConfirmProps {
9
9
  title?: string;
10
+ /** The dialog text */
10
11
  text: string | React.JSX.Element;
12
+ /** Close handler. */
11
13
  onClose?: (ok: boolean) => void;
12
- classes: {
13
- suppress: string;
14
- suppressRoot: string;
15
- };
14
+ /** if the dialog must be fill sized */
16
15
  fullWidth?: boolean;
16
+ /** optional icon */
17
17
  icon?: React.JSX.Element;
18
+ /** optional ok button text */
18
19
  ok?: string;
20
+ /** optional cancel button text */
19
21
  cancel?: string;
22
+ /** optional interval in minutes for which the confirmation dialog will be suppressed if activated. */
20
23
  suppressQuestionMinutes?: number;
24
+ /** optional text for the suppression checkbox */
21
25
  suppressText?: string;
26
+ /** optional name of the dialog. Used only with suppressQuestionMinutes to store the user choice */
22
27
  dialogName?: string;
23
28
  }
24
- declare const _export: React.JSXElementConstructor<Omit<DialogConfirmProps, "classes"> & import("@mui/styles").StyledComponentProps<"suppress" | "suppressRoot"> & object>;
25
- export default _export;
29
+ interface DialogConfirmState {
30
+ suppress: number | boolean;
31
+ }
32
+ declare class DialogConfirm extends Component<DialogConfirmProps, DialogConfirmState> {
33
+ constructor(props: DialogConfirmProps);
34
+ handleOk(): void;
35
+ handleCancel(): void;
36
+ render(): React.JSX.Element;
37
+ }
38
+ export default DialogConfirm;
@@ -34,7 +34,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
35
  // please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined
36
36
  const react_1 = __importStar(require("react"));
37
- const styles_1 = require("@mui/styles");
38
37
  const material_1 = require("@mui/material");
39
38
  const icons_material_1 = require("@mui/icons-material");
40
39
  const i18n_1 = __importDefault(require("../i18n"));
@@ -43,19 +42,10 @@ const styles = {
43
42
  fontSize: 12,
44
43
  },
45
44
  suppressRoot: {
46
- marginTop: 16,
45
+ // it is sx
46
+ marginTop: '16px',
47
47
  },
48
48
  };
49
- /**
50
- * @property title The dialog title; default: Are you sure? (translated)
51
- * @property text The dialog text.
52
- * @property ok The ok button text; default: OK (translated)
53
- * @property cancel The cancel button text; default: Cancel (translated)
54
- * @property suppressQuestionMinutes interval in minutes for which the confirmation dialog will be suppressed if activated.
55
- * @property suppressText The suppress checkbox text; default: Suppress question for next %s minutes (translated)
56
- * @property dialogName Name of the dialog. Used only with suppressQuestionMinutes to store the user choice
57
- * @property onClose Close handler.
58
- */
59
49
  class DialogConfirm extends react_1.Component {
60
50
  constructor(props) {
61
51
  super(props);
@@ -102,11 +92,10 @@ class DialogConfirm extends react_1.Component {
102
92
  this.props.icon || null,
103
93
  this.props.text,
104
94
  this.props.suppressQuestionMinutes ? react_1.default.createElement("br", null) : null,
105
- this.props.suppressQuestionMinutes ? react_1.default.createElement(material_1.FormControlLabel, { classes: { label: this.props.classes.suppress, root: this.props.classes.suppressRoot }, control: react_1.default.createElement(material_1.Checkbox, { id: `ar_dialog_confirm_suppress_${this.props.dialogName || ''}`, checked: !!this.state.suppress, onChange: () => this.setState({ suppress: !this.state.suppress }) }), label: this.props.suppressText || i18n_1.default.t('ra_Suppress question for next %s minutes', (this.props.suppressQuestionMinutes || 2).toString()) }) : null)),
95
+ this.props.suppressQuestionMinutes ? react_1.default.createElement(material_1.FormControlLabel, { sx: { '& .FormControlLabel-label': styles.suppress, '&.FormControlLabel-root': styles.suppressRoot }, control: react_1.default.createElement(material_1.Checkbox, { id: `ar_dialog_confirm_suppress_${this.props.dialogName || ''}`, checked: !!this.state.suppress, onChange: () => this.setState({ suppress: !this.state.suppress }) }), label: this.props.suppressText || i18n_1.default.t('ra_Suppress question for next %s minutes', (this.props.suppressQuestionMinutes || 2).toString()) }) : null)),
106
96
  react_1.default.createElement(material_1.DialogActions, null,
107
97
  react_1.default.createElement(material_1.Button, { id: `ar_dialog_confirm_ok_${this.props.dialogName || ''}`, variant: "contained", onClick: () => this.handleOk(), color: "primary", autoFocus: true, startIcon: react_1.default.createElement(icons_material_1.Check, null) }, this.props.ok || i18n_1.default.t('ra_Ok')),
108
98
  react_1.default.createElement(material_1.Button, { id: `ar_dialog_confirm_cancel_${this.props.dialogName || ''}`, variant: "contained", onClick: () => this.handleCancel(), color: "grey", startIcon: react_1.default.createElement(icons_material_1.Close, null) }, this.props.cancel || i18n_1.default.t('ra_Cancel'))));
109
99
  }
110
100
  }
111
- const _export = (0, styles_1.withStyles)(styles)(DialogConfirm);
112
- exports.default = _export;
101
+ exports.default = DialogConfirm;
package/Dialogs/Cron.d.ts CHANGED
@@ -12,7 +12,16 @@ interface DialogCronProps {
12
12
  complex?: boolean;
13
13
  /** do not show wizard */
14
14
  noWizard?: boolean;
15
- classes: Record<string, string>;
16
15
  }
17
- declare const _default: React.JSXElementConstructor<Omit<DialogCronProps, "classes"> & import("@mui/styles").StyledComponentProps<string> & object>;
18
- export default _default;
16
+ interface DialogCronState {
17
+ cron: string;
18
+ mode: 'simple' | 'complex' | 'wizard';
19
+ }
20
+ declare class DialogCron extends React.Component<DialogCronProps, DialogCronState> {
21
+ constructor(props: DialogCronProps);
22
+ handleCancel(): void;
23
+ handleOk(): void;
24
+ setMode(mode: 'simple' | 'complex' | 'wizard'): void;
25
+ render(): React.JSX.Element;
26
+ }
27
+ export default DialogCron;
package/Dialogs/Cron.js CHANGED
@@ -27,7 +27,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  const react_1 = __importDefault(require("react"));
30
- const styles_1 = require("@mui/styles");
31
30
  const material_1 = require("@mui/material");
32
31
  const icons_material_1 = require("@mui/icons-material");
33
32
  const ComplexCron_1 = __importDefault(require("../Components/ComplexCron"));
@@ -36,13 +35,6 @@ const Schedule_1 = __importDefault(require("../Components/Schedule"));
36
35
  const i18n_1 = __importDefault(require("../i18n"));
37
36
  // Generate cron expression
38
37
  const styles = {
39
- headerID: {
40
- fontWeight: 'bold',
41
- fontStyle: 'italic',
42
- },
43
- radio: {
44
- display: 'inline-block',
45
- },
46
38
  dialogPaper: {
47
39
  height: 'calc(100% - 96px)',
48
40
  },
@@ -80,7 +72,7 @@ class DialogCron extends react_1.default.Component {
80
72
  this.setState({ mode });
81
73
  }
82
74
  render() {
83
- return react_1.default.createElement(material_1.Dialog, { onClose: () => { }, maxWidth: "md", fullWidth: true, classes: { paper: this.props.classes.dialogPaper }, open: !0, "aria-labelledby": "cron-dialog-title" },
75
+ return react_1.default.createElement(material_1.Dialog, { onClose: () => { }, maxWidth: "md", fullWidth: true, sx: { '& .MuiDialog-paper': styles.dialogPaper }, open: !0, "aria-labelledby": "cron-dialog-title" },
84
76
  react_1.default.createElement(material_1.DialogTitle, { id: "cron-dialog-title" }, this.props.title || i18n_1.default.t('ra_Define schedule...')),
85
77
  react_1.default.createElement(material_1.DialogContent, { style: { height: '100%', overflow: 'hidden' } },
86
78
  (this.props.simple && this.props.complex) || (!this.props.simple && !this.props.complex) ? react_1.default.createElement("div", null,
@@ -94,11 +86,11 @@ class DialogCron extends react_1.default.Component {
94
86
  react_1.default.createElement(material_1.Radio, { key: "complex", checked: this.state.mode === 'complex', onChange: () => this.setMode('complex') }),
95
87
  react_1.default.createElement("label", { onClick: () => this.setMode('complex'), style: this.state.mode !== 'complex' ? { color: 'lightgrey' } : {} }, i18n_1.default.t('sc_cron')))) : null,
96
88
  this.state.mode === 'simple' && react_1.default.createElement(SimpleCron_1.default, { cronExpression: this.state.cron, onChange: cron => this.setState({ cron }), language: i18n_1.default.getLanguage() }),
97
- this.state.mode === 'wizard' && react_1.default.createElement(Schedule_1.default, { schedule: this.state.cron, onChange: cron => this.setState({ cron }) }),
89
+ this.state.mode === 'wizard' && react_1.default.createElement(Schedule_1.default, { schedule: this.state.cron, onChange: (cron) => this.setState({ cron }) }),
98
90
  this.state.mode === 'complex' && react_1.default.createElement(ComplexCron_1.default, { cronExpression: this.state.cron, onChange: cron => this.setState({ cron }), language: i18n_1.default.getLanguage() })),
99
91
  react_1.default.createElement(material_1.DialogActions, null,
100
92
  react_1.default.createElement(material_1.Button, { variant: "contained", onClick: () => this.handleOk(), color: "primary", startIcon: react_1.default.createElement(icons_material_1.Check, null) }, this.props.ok || i18n_1.default.t('ra_Ok')),
101
93
  react_1.default.createElement(material_1.Button, { variant: "contained", onClick: () => this.handleCancel(), color: "grey", startIcon: react_1.default.createElement(icons_material_1.Cancel, null) }, this.props.cancel || i18n_1.default.t('ra_Cancel'))));
102
94
  }
103
95
  }
104
- exports.default = (0, styles_1.withStyles)(styles)(DialogCron);
96
+ exports.default = DialogCron;
@@ -52,7 +52,6 @@ interface DialogSelectFileProps {
52
52
  /** Handler that is called when the user presses OK or by double click. */
53
53
  onOk: (selected: string | string[] | undefined) => void;
54
54
  /** The styling class names. */
55
- classes: Record<string, string>;
56
55
  filters?: Record<string, string>;
57
56
  /** Allow switch views Table<=>Rows */
58
57
  showViewTypeButton?: boolean;
@@ -67,5 +66,15 @@ interface DialogSelectFileProps {
67
66
  /** Translate function - optional */
68
67
  t?: (text: string, ...args: any[]) => string;
69
68
  }
70
- declare const _default: React.JSXElementConstructor<Omit<DialogSelectFileProps, "classes"> & import("@mui/styles").StyledComponentProps<string> & object>;
71
- export default _default;
69
+ interface DialogSelectFileState {
70
+ selected: string[];
71
+ }
72
+ declare class DialogSelectFile extends React.Component<DialogSelectFileProps, DialogSelectFileState> {
73
+ private readonly dialogName;
74
+ private readonly filters;
75
+ constructor(props: DialogSelectFileProps);
76
+ handleCancel(): void;
77
+ handleOk(): void;
78
+ render(): React.JSX.Element;
79
+ }
80
+ export default DialogSelectFile;