@iobroker/adapter-react-v5 3.1.23 → 3.1.24
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/Components/FileBrowser.js +26 -9
- package/Components/FileBrowser.js.map +1 -1
- package/Components/FileViewer.js +27 -22
- package/Components/FileViewer.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigText.js +24 -3
- package/Components/JsonConfigComponent/ConfigText.js.map +1 -1
- package/Components/ObjectBrowser.js +315 -449
- package/Components/ObjectBrowser.js.map +1 -1
- package/README.md +3 -0
- package/index.js +1 -0
- package/package.json +1 -1
|
@@ -294,17 +294,32 @@ var styles = function styles(theme) {
|
|
|
294
294
|
width: BUTTON_WIDTH,
|
|
295
295
|
height: ROW_HEIGHT,
|
|
296
296
|
minWidth: BUTTON_WIDTH,
|
|
297
|
-
verticalAlign: '
|
|
297
|
+
verticalAlign: 'middle',
|
|
298
|
+
textAlign: 'center',
|
|
298
299
|
padding: 0,
|
|
300
|
+
borderRadius: BUTTON_WIDTH / 2,
|
|
301
|
+
'&:hover': {
|
|
302
|
+
backgroundColor: theme.palette.mode === 'dark' ? 'rgba(255, 255, 255, 0.08)' : 'rgba(0, 0, 0, 0.08)'
|
|
303
|
+
},
|
|
299
304
|
'& span': {
|
|
300
305
|
paddingTop: 9
|
|
301
306
|
},
|
|
302
307
|
'& svg': {
|
|
303
308
|
width: 14,
|
|
304
309
|
height: 14,
|
|
305
|
-
fontSize: '1rem'
|
|
310
|
+
fontSize: '1rem',
|
|
311
|
+
marginTop: -3,
|
|
312
|
+
verticalAlign: 'middle',
|
|
313
|
+
color: theme.palette.mode === 'dark' ? '#EEE' : '#111'
|
|
306
314
|
}
|
|
307
315
|
},
|
|
316
|
+
itemDownloadEmptyTable: {
|
|
317
|
+
display: 'inline-block',
|
|
318
|
+
width: BUTTON_WIDTH,
|
|
319
|
+
height: ROW_HEIGHT,
|
|
320
|
+
minWidth: BUTTON_WIDTH,
|
|
321
|
+
padding: 0
|
|
322
|
+
},
|
|
308
323
|
itemAclButtonTable: {
|
|
309
324
|
width: BUTTON_WIDTH,
|
|
310
325
|
height: ROW_HEIGHT,
|
|
@@ -1160,7 +1175,7 @@ var FileBrowser = /*#__PURE__*/function (_Component) {
|
|
|
1160
1175
|
}, this.state.viewType === TABLE && this.props.expertMode ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
1161
1176
|
className: this.props.classes["itemDeleteButton".concat(this.state.viewType)]
|
|
1162
1177
|
}) : null), this.state.viewType === TABLE && this.props.allowDownload ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
1163
|
-
className: this.props.classes["
|
|
1178
|
+
className: this.props.classes["itemDownloadEmpty".concat(this.state.viewType)]
|
|
1164
1179
|
}) : null, this.state.viewType === TABLE && this.props.allowDelete && this.state.folders[item.id] && this.state.folders[item.id].length ? /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
1165
1180
|
"aria-label": "delete",
|
|
1166
1181
|
onClick: function onClick(e) {
|
|
@@ -1238,6 +1253,7 @@ var FileBrowser = /*#__PURE__*/function (_Component) {
|
|
|
1238
1253
|
value: function getFileIcon(ext) {
|
|
1239
1254
|
switch (ext) {
|
|
1240
1255
|
case 'json':
|
|
1256
|
+
case 'json5':
|
|
1241
1257
|
return /*#__PURE__*/_react["default"].createElement(_Bookmark["default"], {
|
|
1242
1258
|
className: this.props.classes["itemIcon".concat(this.state.viewType)]
|
|
1243
1259
|
});
|
|
@@ -1350,14 +1366,14 @@ var FileBrowser = /*#__PURE__*/function (_Component) {
|
|
|
1350
1366
|
fontSize: "small"
|
|
1351
1367
|
})) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
1352
1368
|
className: this.props.classes["itemDeleteButton".concat(this.state.viewType)]
|
|
1353
|
-
})), this.state.viewType === TABLE && this.props.allowDownload ? /*#__PURE__*/_react["default"].createElement(
|
|
1354
|
-
|
|
1369
|
+
})), this.state.viewType === TABLE && this.props.allowDownload ? /*#__PURE__*/_react["default"].createElement("a", {
|
|
1370
|
+
className: _Utils["default"].clsx('MuiButtonBase-root', 'MuiIconButton-root', 'MuiIconButton-sizeLarge', this.props.classes.itemDownloadButtonTable),
|
|
1371
|
+
tabIndex: "0",
|
|
1372
|
+
download: item.id,
|
|
1355
1373
|
href: this.imagePrefix + item.id,
|
|
1356
|
-
className: this.props.classes["itemDownloadButton".concat(this.state.viewType)],
|
|
1357
1374
|
onClick: function onClick(e) {
|
|
1358
|
-
|
|
1359
|
-
}
|
|
1360
|
-
size: "large"
|
|
1375
|
+
e.stopPropagation();
|
|
1376
|
+
}
|
|
1361
1377
|
}, /*#__PURE__*/_react["default"].createElement(_SaveAlt["default"], null)) : null, this.state.viewType === TABLE && this.props.allowDelete && item.id !== 'vis.0/' && item.id !== USER_DATA ? /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
1362
1378
|
"aria-label": "delete",
|
|
1363
1379
|
onClick: function onClick(e) {
|
|
@@ -2170,6 +2186,7 @@ var FileBrowser = /*#__PURE__*/function (_Component) {
|
|
|
2170
2186
|
value: function getEditFile(ext) {
|
|
2171
2187
|
switch (ext) {
|
|
2172
2188
|
case 'json':
|
|
2189
|
+
case 'json5':
|
|
2173
2190
|
case 'js':
|
|
2174
2191
|
case 'html':
|
|
2175
2192
|
case 'txt':
|