@iobroker/adapter-react-v5 4.0.13 → 4.0.15
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.map +1 -1
- package/Components/404.js.map +1 -1
- package/Components/ColorPicker.d.ts +1 -0
- package/Components/ColorPicker.js +12 -9
- package/Components/ColorPicker.js.map +1 -1
- package/Components/ComplexCron.js +24 -22
- package/Components/ComplexCron.js.map +1 -1
- package/Components/CustomModal.js.map +1 -1
- package/Components/FileBrowser.js +2 -1
- package/Components/FileBrowser.js.map +1 -1
- package/Components/FileViewer.js +31 -19
- package/Components/FileViewer.js.map +1 -1
- package/Components/Icon.js +5 -5
- package/Components/Icon.js.map +1 -1
- package/Components/IconPicker.js.map +1 -1
- package/Components/IconSelector.js.map +1 -1
- package/Components/Image.js.map +1 -1
- package/Components/JsonConfigComponent/ChipInput.js +8 -10
- package/Components/JsonConfigComponent/ChipInput.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigAlive.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigAutocomplete.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigAutocompleteSendTo.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigCRON.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigCertificateSelect.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigCheckLicense.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigCheckbox.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigChip.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigColor.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigCoordinates.d.ts +1 -1
- package/Components/JsonConfigComponent/ConfigCoordinates.js +112 -16
- package/Components/JsonConfigComponent/ConfigCoordinates.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigCustom.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigDatePicker.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigFile.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigFileSelector.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigFunc.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigGeneric.js +6 -1
- package/Components/JsonConfigComponent/ConfigGeneric.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigIP.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigImageUpload.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigInstanceSelect.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigJsonEditor.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigLanguage.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigNumber.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigObjectId.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigPanel.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigPassword.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigPattern.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigRoom.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigSelect.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigSelectSendTo.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigSendto.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigSetState.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigSlider.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigStaticDivider.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigStaticHeader.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigStaticImage.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigStaticText.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigTable.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigTabs.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigText.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigTextSendTo.js +3 -3
- package/Components/JsonConfigComponent/ConfigTextSendTo.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigTimePicker.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigTopic.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigUUID.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigUser.js.map +1 -1
- package/Components/JsonConfigComponent/index.js.map +1 -1
- package/Components/JsonConfigComponent/wrapper/Components/ColorPicker.js.map +1 -1
- package/Components/JsonConfigComponent/wrapper/Components/Icon.js.map +1 -1
- package/Components/JsonConfigComponent/wrapper/Components/TextWithIcon.js.map +1 -1
- package/Components/JsonConfigComponent/wrapper/Components/UploadImage.js.map +1 -1
- package/Components/JsonConfigComponent/wrapper/Components/Utils.js.map +1 -1
- package/Components/JsonConfigComponent/wrapper/Dialogs/Confirm.js.map +1 -1
- package/Components/JsonConfigComponent/wrapper/Dialogs/Cron.js.map +1 -1
- package/Components/JsonConfigComponent/wrapper/Dialogs/Error.js.map +1 -1
- package/Components/JsonConfigComponent/wrapper/Dialogs/Message.js.map +1 -1
- package/Components/JsonConfigComponent/wrapper/Dialogs/SelectFile.js.map +1 -1
- package/Components/JsonConfigComponent/wrapper/Dialogs/SelectID.js.map +1 -1
- package/Components/JsonConfigComponent/wrapper/i18n.js.map +1 -1
- package/Components/JsonConfigComponent/wrapper/icons/IconCopy.js.map +1 -1
- package/Components/Loader.js.map +1 -1
- package/Components/Loaders/PT.js.map +1 -1
- package/Components/Loaders/Vendor.js.map +1 -1
- package/Components/Logo.js.map +1 -1
- package/Components/MDUtils.js.map +1 -1
- package/Components/ObjectBrowser.d.ts +4 -2
- package/Components/ObjectBrowser.js +528 -392
- package/Components/ObjectBrowser.js.map +1 -1
- package/Components/Router.js.map +1 -1
- package/Components/SaveCloseButtons.js.map +1 -1
- package/Components/Schedule.js.map +1 -1
- package/Components/SelectWithIcon.js.map +1 -1
- package/Components/SimpleCron/cron2text.js.map +1 -1
- package/Components/SimpleCron/cronText.js.map +1 -1
- package/Components/SimpleCron/index.js +38 -32
- package/Components/SimpleCron/index.js.map +1 -1
- package/Components/SimpleCron/jquery.cron.locale.js.map +1 -1
- package/Components/TabContainer.js.map +1 -1
- package/Components/TabContent.js.map +1 -1
- package/Components/TabHeader.js.map +1 -1
- package/Components/TableResize.js.map +1 -1
- package/Components/TextWithIcon.js.map +1 -1
- package/Components/ToggleThemeMenu.js.map +1 -1
- package/Components/TreeTable.js.map +1 -1
- package/Components/UploadImage.js.map +1 -1
- package/Components/Utils.js +1 -1
- package/Components/Utils.js.map +1 -1
- package/Components/copy-to-clipboard.js.map +1 -1
- package/Components/withWidth.js.map +1 -1
- package/Connection.js.map +1 -1
- package/Dialogs/ComplexCron.js +1 -1
- package/Dialogs/ComplexCron.js.map +1 -1
- package/Dialogs/Confirm.js.map +1 -1
- package/Dialogs/Cron.js +6 -6
- package/Dialogs/Cron.js.map +1 -1
- package/Dialogs/Error.js.map +1 -1
- package/Dialogs/Message.js.map +1 -1
- package/Dialogs/SelectFile.js.map +1 -1
- package/Dialogs/SelectID.js.map +1 -1
- package/Dialogs/SimpleCron.js +2 -2
- package/Dialogs/SimpleCron.js.map +1 -1
- package/Dialogs/TextInput.js.map +1 -1
- package/GenericApp.d.ts +11 -0
- package/GenericApp.js +109 -42
- package/GenericApp.js.map +1 -1
- package/Prompt.js.map +1 -1
- package/README.md +6 -0
- package/Theme.js.map +1 -1
- package/_Connection.js.map +1 -1
- package/i18n/de.json +7 -1
- package/i18n/en.json +7 -1
- package/i18n/es.json +7 -1
- package/i18n/fr.json +7 -1
- package/i18n/it.json +7 -1
- package/i18n/nl.json +7 -1
- package/i18n/pl.json +7 -1
- package/i18n/pt.json +7 -1
- package/i18n/ru.json +7 -1
- package/i18n/uk.json +7 -1
- package/i18n/zh-cn.json +7 -1
- package/i18n.js.map +1 -1
- package/icons/IconAdapter.js.map +1 -1
- package/icons/IconAlias.js.map +1 -1
- package/icons/IconChannel.js.map +1 -1
- package/icons/IconClearFilter.js.map +1 -1
- package/icons/IconClosed.js.map +1 -1
- package/icons/IconCopy.js.map +1 -1
- package/icons/IconDevice.js.map +1 -1
- package/icons/IconDocument.js.map +1 -1
- package/icons/IconDocumentReadOnly.js.map +1 -1
- package/icons/IconExpert.js.map +1 -1
- package/icons/IconFx.js.map +1 -1
- package/icons/IconInstance.js.map +1 -1
- package/icons/IconLogout.js.map +1 -1
- package/icons/IconNoIcon.js.map +1 -1
- package/icons/IconOpen.js.map +1 -1
- package/icons/IconState.js.map +1 -1
- package/package.json +11 -11
|
@@ -34,6 +34,7 @@ var _Snackbar = _interopRequireDefault(require("@mui/material/Snackbar"));
|
|
|
34
34
|
var _Checkbox = _interopRequireDefault(require("@mui/material/Checkbox"));
|
|
35
35
|
var _List = _interopRequireDefault(require("@mui/material/List"));
|
|
36
36
|
var _ListItem = _interopRequireDefault(require("@mui/material/ListItem"));
|
|
37
|
+
var _ListItemButton = _interopRequireDefault(require("@mui/material/ListItemButton"));
|
|
37
38
|
var _ListItemIcon = _interopRequireDefault(require("@mui/material/ListItemIcon"));
|
|
38
39
|
var _ListItemSecondaryAction = _interopRequireDefault(require("@mui/material/ListItemSecondaryAction"));
|
|
39
40
|
var _ListItemText = _interopRequireDefault(require("@mui/material/ListItemText"));
|
|
@@ -73,6 +74,7 @@ var _LooksOne = _interopRequireDefault(require("@mui/icons-material/LooksOne"));
|
|
|
73
74
|
var _RoomService = _interopRequireDefault(require("@mui/icons-material/RoomService"));
|
|
74
75
|
var _Error = _interopRequireDefault(require("@mui/icons-material/Error"));
|
|
75
76
|
var _WifiOff = _interopRequireDefault(require("@mui/icons-material/WifiOff"));
|
|
77
|
+
var _TextFields = _interopRequireDefault(require("@mui/icons-material/TextFields"));
|
|
76
78
|
var _IconExpert = _interopRequireDefault(require("../icons/IconExpert"));
|
|
77
79
|
var _IconAdapter = _interopRequireDefault(require("../icons/IconAdapter"));
|
|
78
80
|
var _IconAlias = _interopRequireDefault(require("../icons/IconAlias"));
|
|
@@ -343,6 +345,15 @@ var styles = function styles(theme) {
|
|
|
343
345
|
display: 'block'
|
|
344
346
|
}
|
|
345
347
|
},
|
|
348
|
+
cellNameWithDesc: {
|
|
349
|
+
lineHeight: 'normal'
|
|
350
|
+
},
|
|
351
|
+
cellNameDivDiv: {},
|
|
352
|
+
cellDescription: {
|
|
353
|
+
fontSize: 10,
|
|
354
|
+
opacity: 0.5,
|
|
355
|
+
fontStyle: 'italic'
|
|
356
|
+
},
|
|
346
357
|
cellIdAlias: {
|
|
347
358
|
fontStyle: 'italic',
|
|
348
359
|
fontSize: 12,
|
|
@@ -455,7 +466,11 @@ var styles = function styles(theme) {
|
|
|
455
466
|
},
|
|
456
467
|
cellValueTooltipBox: {
|
|
457
468
|
width: 250,
|
|
458
|
-
overflow: 'hidden'
|
|
469
|
+
overflow: 'hidden',
|
|
470
|
+
pointerEvents: 'none'
|
|
471
|
+
},
|
|
472
|
+
tooltip: {
|
|
473
|
+
pointerEvents: 'none'
|
|
459
474
|
},
|
|
460
475
|
cellValueTextUnit: {
|
|
461
476
|
marginLeft: theme.spacing(0.5),
|
|
@@ -1090,33 +1105,39 @@ function getSystemIcon(objects, id, k, imagePrefix) {
|
|
|
1090
1105
|
}
|
|
1091
1106
|
return icon || null;
|
|
1092
1107
|
}
|
|
1093
|
-
function
|
|
1108
|
+
function getObjectTooltip(data, lang) {
|
|
1094
1109
|
var _data$obj2, _data$obj2$common;
|
|
1095
|
-
if (data
|
|
1096
|
-
|
|
1110
|
+
if (!data) {
|
|
1111
|
+
return null;
|
|
1112
|
+
}
|
|
1113
|
+
if ((_data$obj2 = data.obj) !== null && _data$obj2 !== void 0 && (_data$obj2$common = _data$obj2.common) !== null && _data$obj2$common !== void 0 && _data$obj2$common.desc) {
|
|
1097
1114
|
var tooltip = '';
|
|
1098
|
-
if ((0, _typeof2["default"])(data
|
|
1099
|
-
tooltip = data.obj.common.desc[lang];
|
|
1100
|
-
} else if ((0, _typeof2["default"])(data === null || data === void 0 ? void 0 : (_data$obj4 = data.obj) === null || _data$obj4 === void 0 ? void 0 : (_data$obj4$common = _data$obj4.common) === null || _data$obj4$common === void 0 ? void 0 : _data$obj4$common.desc) === 'object' && data.obj.common.desc['en'] !== undefined) {
|
|
1101
|
-
tooltip = data.obj.common.desc['en'];
|
|
1102
|
-
} else if ((0, _typeof2["default"])(data === null || data === void 0 ? void 0 : (_data$obj5 = data.obj) === null || _data$obj5 === void 0 ? void 0 : (_data$obj5$common = _data$obj5.common) === null || _data$obj5$common === void 0 ? void 0 : _data$obj5$common.desc) === 'object' && data.obj.common.desc[lang] === undefined) {
|
|
1103
|
-
return data.id;
|
|
1115
|
+
if ((0, _typeof2["default"])(data.obj.common.desc) === 'object') {
|
|
1116
|
+
tooltip = data.obj.common.desc[lang] || data.obj.common.desc.en;
|
|
1104
1117
|
} else {
|
|
1105
1118
|
tooltip = data.obj.common.desc;
|
|
1106
1119
|
}
|
|
1107
|
-
if (
|
|
1108
|
-
return
|
|
1109
|
-
className: _Utils["default"].clsx(classes.cellIdTooltipLink),
|
|
1110
|
-
href: tooltip,
|
|
1111
|
-
target: "_blank",
|
|
1112
|
-
rel: "noreferrer"
|
|
1113
|
-
}, tooltip);
|
|
1120
|
+
if (!tooltip) {
|
|
1121
|
+
return null;
|
|
1114
1122
|
}
|
|
1123
|
+
return tooltip.toString();
|
|
1124
|
+
}
|
|
1125
|
+
return null;
|
|
1126
|
+
}
|
|
1127
|
+
function getIdFieldTooltip(data, classes, lang) {
|
|
1128
|
+
var tooltip = getObjectTooltip(data, lang);
|
|
1129
|
+
if (tooltip !== null && tooltip !== void 0 && tooltip.startsWith('http')) {
|
|
1130
|
+
return /*#__PURE__*/_react["default"].createElement("a", {
|
|
1131
|
+
className: _Utils["default"].clsx(classes.cellIdTooltipLink),
|
|
1132
|
+
href: tooltip,
|
|
1133
|
+
target: "_blank",
|
|
1134
|
+
rel: "noreferrer"
|
|
1135
|
+
}, tooltip);
|
|
1136
|
+
} else {
|
|
1115
1137
|
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
1116
1138
|
className: _Utils["default"].clsx(classes.cellIdTooltip)
|
|
1117
|
-
}, tooltip);
|
|
1139
|
+
}, tooltip || data.id || '');
|
|
1118
1140
|
}
|
|
1119
|
-
return data.id;
|
|
1120
1141
|
}
|
|
1121
1142
|
function buildTree(objects, options) {
|
|
1122
1143
|
options = options || {};
|
|
@@ -1737,6 +1758,11 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
1737
1758
|
var _this;
|
|
1738
1759
|
(0, _classCallCheck2["default"])(this, ObjectBrowser);
|
|
1739
1760
|
_this = _super.call(this, props);
|
|
1761
|
+
/**
|
|
1762
|
+
* Called when a state changes.
|
|
1763
|
+
* @param {string} id
|
|
1764
|
+
* @param {ioBroker.State} state
|
|
1765
|
+
*/
|
|
1740
1766
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onStateChange", function (id, state) {
|
|
1741
1767
|
console.log("> stateChange ".concat(id));
|
|
1742
1768
|
if (_this.states[id]) {
|
|
@@ -1758,6 +1784,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
1758
1784
|
_this.statesUpdateTimer = null;
|
|
1759
1785
|
}
|
|
1760
1786
|
});
|
|
1787
|
+
/**
|
|
1788
|
+
* @param {string} id
|
|
1789
|
+
* @param {ioBroker.Object} obj
|
|
1790
|
+
*/
|
|
1761
1791
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onObjectChange", function (id, obj /* , oldObj */) {
|
|
1762
1792
|
var newState;
|
|
1763
1793
|
if (Array.isArray(id)) {
|
|
@@ -1825,6 +1855,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
1825
1855
|
}, 500);
|
|
1826
1856
|
}
|
|
1827
1857
|
});
|
|
1858
|
+
/**
|
|
1859
|
+
* @private
|
|
1860
|
+
* @param {string} id
|
|
1861
|
+
*/
|
|
1828
1862
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getEnumsForId", function (id) {
|
|
1829
1863
|
var result = [];
|
|
1830
1864
|
_this.info.enums.forEach(function (_id) {
|
|
@@ -1846,6 +1880,11 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
1846
1880
|
});
|
|
1847
1881
|
return result.length ? result : undefined;
|
|
1848
1882
|
});
|
|
1883
|
+
/**
|
|
1884
|
+
* @private
|
|
1885
|
+
* @param {array} enums
|
|
1886
|
+
* @param {string} objId
|
|
1887
|
+
*/
|
|
1849
1888
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "_createAllEnums", /*#__PURE__*/function () {
|
|
1850
1889
|
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(enums, objId) {
|
|
1851
1890
|
var e, _enObj$common, _enObj$common$members, id, _enObj, enObj;
|
|
@@ -1910,6 +1949,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
1910
1949
|
return _ref.apply(this, arguments);
|
|
1911
1950
|
};
|
|
1912
1951
|
}());
|
|
1952
|
+
/**
|
|
1953
|
+
* @private
|
|
1954
|
+
* @param {any} objs
|
|
1955
|
+
*/
|
|
1913
1956
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "loadObjects", /*#__PURE__*/function () {
|
|
1914
1957
|
var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(objs) {
|
|
1915
1958
|
var id, obj, enums, state;
|
|
@@ -2003,6 +2046,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
2003
2046
|
return _ref2.apply(this, arguments);
|
|
2004
2047
|
};
|
|
2005
2048
|
}());
|
|
2049
|
+
/**
|
|
2050
|
+
* @private
|
|
2051
|
+
* @param {object} evt
|
|
2052
|
+
*/
|
|
2006
2053
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleJsonUpload", function (evt) {
|
|
2007
2054
|
var f = evt.target.files[0];
|
|
2008
2055
|
if (f) {
|
|
@@ -2425,9 +2472,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
2425
2472
|
var pos = _this.visibleCols.indexOf('type');
|
|
2426
2473
|
pos !== -1 && _this.visibleCols.splice(pos, 1);
|
|
2427
2474
|
}
|
|
2428
|
-
|
|
2429
|
-
// this.possibleCols = SCREEN_WIDTHS.xl.fields;
|
|
2430
|
-
|
|
2475
|
+
_this.possibleCols = SCREEN_WIDTHS.xl.fields;
|
|
2431
2476
|
var customDialog = null;
|
|
2432
2477
|
if (props.router) {
|
|
2433
2478
|
var location = props.router.getLocation();
|
|
@@ -2445,7 +2490,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
2445
2490
|
}).filter(function (id) {
|
|
2446
2491
|
return id;
|
|
2447
2492
|
});
|
|
2448
|
-
var columns =
|
|
2493
|
+
var columns = (window._localStorage || window.localStorage).getItem("".concat(props.dialogName || 'App', ".columns"));
|
|
2449
2494
|
try {
|
|
2450
2495
|
columns = columns ? JSON.parse(columns) : null;
|
|
2451
2496
|
} catch (e) {
|
|
@@ -2483,7 +2528,6 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
2483
2528
|
expandAllVisible: false,
|
|
2484
2529
|
expanded: expanded,
|
|
2485
2530
|
toast: '',
|
|
2486
|
-
lang: props.lang,
|
|
2487
2531
|
scrollBarWidth: 16,
|
|
2488
2532
|
customDialog: customDialog,
|
|
2489
2533
|
editObjectDialog: '',
|
|
@@ -2494,14 +2538,14 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
2494
2538
|
columns: columns,
|
|
2495
2539
|
columnsForAdmin: null,
|
|
2496
2540
|
columnsSelectorShow: false,
|
|
2497
|
-
columnsAuto:
|
|
2498
|
-
// (window._localStorage || window.localStorage).getItem(`${props.dialogName || 'App'}.columnsAuto`) !== 'false',
|
|
2541
|
+
columnsAuto: (window._localStorage || window.localStorage).getItem("".concat(props.dialogName || 'App', ".columnsAuto")) !== 'false',
|
|
2499
2542
|
columnsWidths: columnsWidths,
|
|
2500
2543
|
columnsDialogTransparent: 100,
|
|
2501
2544
|
columnsEditCustomDialog: null,
|
|
2502
2545
|
customColumnDialogValueChanged: false,
|
|
2503
2546
|
showExportDialog: false,
|
|
2504
|
-
linesEnabled: (window._localStorage || window.localStorage).getItem("".concat(props.dialogName || 'App', ".lines")) === 'true'
|
|
2547
|
+
linesEnabled: (window._localStorage || window.localStorage).getItem("".concat(props.dialogName || 'App', ".lines")) === 'true',
|
|
2548
|
+
showDescription: (window._localStorage || window.localStorage).getItem("".concat(props.dialogName || 'App', ".desc")) !== 'false'
|
|
2505
2549
|
};
|
|
2506
2550
|
_this.edit = {};
|
|
2507
2551
|
_this.texts = {
|
|
@@ -2674,7 +2718,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
2674
2718
|
_this2.lastAppliedFilter = null;
|
|
2675
2719
|
|
|
2676
2720
|
// If selected ID is not visible, reset filter
|
|
2677
|
-
if (node && !applyFilter(node, _this2.state.filter, _this2.
|
|
2721
|
+
if (node && !applyFilter(node, _this2.state.filter, _this2.props.lang, _this2.objects, null, null, props.customFilter, props.types)) {
|
|
2678
2722
|
// reset filter
|
|
2679
2723
|
_this2.setState({
|
|
2680
2724
|
filter: _objectSpread({}, DEFAULT_FILTER),
|
|
@@ -2748,7 +2792,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
2748
2792
|
if (this.state.selected && this.state.selected.length) {
|
|
2749
2793
|
(window._localStorage || window.localStorage).setItem("".concat(this.props.dialogName || 'App', ".objectSelected"), JSON.stringify(this.lastSelectedItems));
|
|
2750
2794
|
var name = this.lastSelectedItems.length === 1 ? _Utils["default"].getObjectName(this.objects, this.lastSelectedItems[0], null, {
|
|
2751
|
-
language: this.
|
|
2795
|
+
language: this.props.lang
|
|
2752
2796
|
}) : '';
|
|
2753
2797
|
this.props.onSelect && this.props.onSelect(this.lastSelectedItems, name, isDouble);
|
|
2754
2798
|
} else {
|
|
@@ -2932,82 +2976,65 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
2932
2976
|
* @private
|
|
2933
2977
|
* @param {boolean} isLast
|
|
2934
2978
|
*/
|
|
2935
|
-
|
|
2936
|
-
_renderDefinedList
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2979
|
+
}, {
|
|
2980
|
+
key: "_renderDefinedList",
|
|
2981
|
+
value: function _renderDefinedList(isLast) {
|
|
2982
|
+
var _this9 = this;
|
|
2983
|
+
var cols = (0, _toConsumableArray2["default"])(this.possibleCols);
|
|
2984
|
+
cols.unshift('id');
|
|
2985
|
+
if (this.props.columns && !this.props.columns.includes('buttons')) {
|
|
2986
|
+
var pos = cols.indexOf('buttons');
|
|
2987
|
+
if (pos !== -1) {
|
|
2988
|
+
cols.splice(pos, 1);
|
|
2944
2989
|
}
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
classes={{ underline: 'no-underline' }}
|
|
2979
|
-
placeholder={this.props.t('ra_Width')}
|
|
2980
|
-
value={this.state.columnsWidths[id] || ''}
|
|
2981
|
-
onChange={e => {
|
|
2982
|
-
const columnsWidths = JSON.parse(JSON.stringify(this.state.columnsWidths));
|
|
2983
|
-
columnsWidths[id] = e.target.value;
|
|
2984
|
-
(window._localStorage || window.localStorage).setItem((this.props.dialogName || 'App') + '.columnsWidths', JSON.stringify(columnsWidths));
|
|
2985
|
-
this.calculateColumnsVisibility(null, null, null, columnsWidths);
|
|
2986
|
-
this.setState({ columnsWidths });
|
|
2987
|
-
}}
|
|
2988
|
-
autoComplete="off"
|
|
2989
|
-
/>
|
|
2990
|
-
</FormControl>
|
|
2991
|
-
</ListItemSecondaryAction>
|
|
2992
|
-
</ListItemButton>
|
|
2993
|
-
);
|
|
2994
|
-
}
|
|
2995
|
-
*/
|
|
2990
|
+
}
|
|
2991
|
+
return cols.filter(function (id) {
|
|
2992
|
+
return isLast && (id === 'val' || id === 'buttons') || !isLast && id !== 'val' && id !== 'buttons';
|
|
2993
|
+
}).map(function (id) {
|
|
2994
|
+
return /*#__PURE__*/_react["default"].createElement(_ListItemButton["default"], {
|
|
2995
|
+
onClick: function onClick() {
|
|
2996
|
+
if (!_this9.state.columnsAuto && id !== 'id') {
|
|
2997
|
+
var columns = (0, _toConsumableArray2["default"])(_this9.state.columns || []);
|
|
2998
|
+
var _pos = columns.indexOf(id);
|
|
2999
|
+
if (_pos === -1) {
|
|
3000
|
+
columns.push(id);
|
|
3001
|
+
columns.sort();
|
|
3002
|
+
} else {
|
|
3003
|
+
columns.splice(_pos, 1);
|
|
3004
|
+
}
|
|
3005
|
+
(window._localStorage || window.localStorage).setItem((_this9.props.dialogName || 'App') + '.columns', JSON.stringify(columns));
|
|
3006
|
+
_this9.calculateColumnsVisibility(null, columns);
|
|
3007
|
+
_this9.setState({
|
|
3008
|
+
columns: columns
|
|
3009
|
+
});
|
|
3010
|
+
}
|
|
3011
|
+
},
|
|
3012
|
+
key: id
|
|
3013
|
+
}, /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], {
|
|
3014
|
+
edge: "start",
|
|
3015
|
+
disabled: id === 'id' || _this9.state.columnsAuto,
|
|
3016
|
+
checked: id === 'id' || (_this9.state.columnsAuto ? _this9.visibleCols.includes(id) : _this9.state.columns && _this9.state.columns.includes(id)),
|
|
3017
|
+
disableRipple: true
|
|
3018
|
+
}), /*#__PURE__*/_react["default"].createElement(_ListItemText["default"], {
|
|
3019
|
+
primary: _this9.texts['filter_' + id] || _this9.props.t('ra_' + id)
|
|
3020
|
+
}));
|
|
3021
|
+
});
|
|
3022
|
+
}
|
|
2996
3023
|
|
|
2997
3024
|
/**
|
|
2998
|
-
* Renders the columns selector.
|
|
3025
|
+
* Renders the columns' selector.
|
|
2999
3026
|
* @returns {JSX.Element | null}
|
|
3000
3027
|
*/
|
|
3001
3028
|
}, {
|
|
3002
3029
|
key: "renderColumnsSelectorDialog",
|
|
3003
3030
|
value: function renderColumnsSelectorDialog() {
|
|
3004
|
-
var
|
|
3031
|
+
var _this10 = this;
|
|
3005
3032
|
if (!this.state.columnsSelectorShow) {
|
|
3006
3033
|
return null;
|
|
3007
3034
|
}
|
|
3008
3035
|
return /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
|
|
3009
3036
|
onClose: function onClose() {
|
|
3010
|
-
return
|
|
3037
|
+
return _this10.setState({
|
|
3011
3038
|
columnsSelectorShow: false
|
|
3012
3039
|
});
|
|
3013
3040
|
},
|
|
@@ -3024,9 +3051,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3024
3051
|
control: /*#__PURE__*/_react["default"].createElement(_Switch["default"], {
|
|
3025
3052
|
checked: this.state.foldersFirst,
|
|
3026
3053
|
onChange: function onChange() {
|
|
3027
|
-
(window._localStorage || window.localStorage).setItem("".concat(
|
|
3028
|
-
|
|
3029
|
-
foldersFirst: !
|
|
3054
|
+
(window._localStorage || window.localStorage).setItem("".concat(_this10.props.dialogName || 'App', ".foldersFirst"), _this10.state.foldersFirst ? 'false' : 'true');
|
|
3055
|
+
_this10.setState({
|
|
3056
|
+
foldersFirst: !_this10.state.foldersFirst
|
|
3030
3057
|
});
|
|
3031
3058
|
}
|
|
3032
3059
|
}),
|
|
@@ -3036,17 +3063,76 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3036
3063
|
control: /*#__PURE__*/_react["default"].createElement(_Switch["default"], {
|
|
3037
3064
|
checked: this.state.linesEnabled,
|
|
3038
3065
|
onChange: function onChange() {
|
|
3039
|
-
(window._localStorage || window.localStorage).setItem("".concat(
|
|
3040
|
-
|
|
3041
|
-
linesEnabled: !
|
|
3066
|
+
(window._localStorage || window.localStorage).setItem("".concat(_this10.props.dialogName || 'App', ".lines"), _this10.state.linesEnabled ? 'false' : 'true');
|
|
3067
|
+
_this10.setState({
|
|
3068
|
+
linesEnabled: !_this10.state.linesEnabled
|
|
3042
3069
|
});
|
|
3043
3070
|
}
|
|
3044
3071
|
}),
|
|
3045
3072
|
label: this.props.t('ra_Show lines between rows')
|
|
3046
|
-
})
|
|
3073
|
+
}), /*#__PURE__*/_react["default"].createElement(_FormControlLabel["default"], {
|
|
3074
|
+
className: this.props.classes.switchColumnAuto,
|
|
3075
|
+
control: /*#__PURE__*/_react["default"].createElement(_Switch["default"], {
|
|
3076
|
+
checked: this.state.columnsAuto,
|
|
3077
|
+
onChange: function onChange() {
|
|
3078
|
+
(window._localStorage || window.localStorage).setItem((_this10.props.dialogName || 'App') + '.columnsAuto', _this10.state.columnsAuto ? 'false' : 'true');
|
|
3079
|
+
if (!_this10.state.columnsAuto) {
|
|
3080
|
+
_this10.calculateColumnsVisibility(true);
|
|
3081
|
+
_this10.setState({
|
|
3082
|
+
columnsAuto: true
|
|
3083
|
+
});
|
|
3084
|
+
} else {
|
|
3085
|
+
if (!_this10.state.columns) {
|
|
3086
|
+
_this10.calculateColumnsVisibility(false, (0, _toConsumableArray2["default"])(_this10.visibleCols));
|
|
3087
|
+
_this10.setState({
|
|
3088
|
+
columnsAuto: false,
|
|
3089
|
+
columns: (0, _toConsumableArray2["default"])(_this10.visibleCols)
|
|
3090
|
+
});
|
|
3091
|
+
} else {
|
|
3092
|
+
_this10.calculateColumnsVisibility(false);
|
|
3093
|
+
_this10.setState({
|
|
3094
|
+
columnsAuto: false
|
|
3095
|
+
});
|
|
3096
|
+
}
|
|
3097
|
+
}
|
|
3098
|
+
}
|
|
3099
|
+
}),
|
|
3100
|
+
label: this.props.t('ra_Auto (no custom columns)')
|
|
3101
|
+
}), /*#__PURE__*/_react["default"].createElement(_List["default"], null, this._renderDefinedList(false), this.state.columnsForAdmin && Object.keys(this.state.columnsForAdmin).sort().map(function (adapter) {
|
|
3102
|
+
return _this10.state.columnsForAdmin[adapter].map(function (column) {
|
|
3103
|
+
return /*#__PURE__*/_react["default"].createElement(_ListItemButton["default"], {
|
|
3104
|
+
onClick: function onClick() {
|
|
3105
|
+
if (!_this10.state.columnsAuto) {
|
|
3106
|
+
var columns = (0, _toConsumableArray2["default"])(_this10.state.columns || []);
|
|
3107
|
+
var id = '_' + adapter + '_' + column.path;
|
|
3108
|
+
var pos = columns.indexOf(id);
|
|
3109
|
+
if (pos === -1) {
|
|
3110
|
+
columns.push(id);
|
|
3111
|
+
columns.sort();
|
|
3112
|
+
} else {
|
|
3113
|
+
columns.splice(pos, 1);
|
|
3114
|
+
}
|
|
3115
|
+
_this10.calculateColumnsVisibility(null, columns);
|
|
3116
|
+
(window._localStorage || window.localStorage).setItem((_this10.props.dialogName || 'App') + '.columns', JSON.stringify(columns));
|
|
3117
|
+
_this10.setState({
|
|
3118
|
+
columns: columns
|
|
3119
|
+
});
|
|
3120
|
+
}
|
|
3121
|
+
},
|
|
3122
|
+
key: adapter + '_' + column.name
|
|
3123
|
+
}, /*#__PURE__*/_react["default"].createElement(_ListItemIcon["default"], null, /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], {
|
|
3124
|
+
disabled: _this10.state.columnsAuto,
|
|
3125
|
+
edge: "start",
|
|
3126
|
+
checked: !_this10.state.columnsAuto && _this10.state.columns && _this10.state.columns.includes('_' + adapter + '_' + column.path),
|
|
3127
|
+
disableRipple: true
|
|
3128
|
+
})), /*#__PURE__*/_react["default"].createElement(_ListItemText["default"], {
|
|
3129
|
+
primary: column.name + ' (' + adapter + ')'
|
|
3130
|
+
}));
|
|
3131
|
+
});
|
|
3132
|
+
}), this._renderDefinedList(true))), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
3047
3133
|
variant: "contained",
|
|
3048
3134
|
onClick: function onClick() {
|
|
3049
|
-
return
|
|
3135
|
+
return _this10.setState({
|
|
3050
3136
|
columnsSelectorShow: false
|
|
3051
3137
|
});
|
|
3052
3138
|
},
|
|
@@ -3061,12 +3147,12 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3061
3147
|
}, {
|
|
3062
3148
|
key: "getAdditionalColumns",
|
|
3063
3149
|
value: function getAdditionalColumns() {
|
|
3064
|
-
var
|
|
3150
|
+
var _this11 = this;
|
|
3065
3151
|
return this.props.socket.getAdapters().then(function (instances) {
|
|
3066
3152
|
var columnsForAdmin = null;
|
|
3067
3153
|
// find all additional columns
|
|
3068
3154
|
instances.forEach(function (obj) {
|
|
3069
|
-
return columnsForAdmin =
|
|
3155
|
+
return columnsForAdmin = _this11.parseObjectForAdmins(columnsForAdmin, obj);
|
|
3070
3156
|
});
|
|
3071
3157
|
return columnsForAdmin;
|
|
3072
3158
|
})["catch"](function () {
|
|
@@ -3122,12 +3208,6 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3122
3208
|
}
|
|
3123
3209
|
return null;
|
|
3124
3210
|
}
|
|
3125
|
-
|
|
3126
|
-
/**
|
|
3127
|
-
* Called when a state changes.
|
|
3128
|
-
* @param {string} id
|
|
3129
|
-
* @param {ioBroker.State} state
|
|
3130
|
-
*/
|
|
3131
3211
|
}, {
|
|
3132
3212
|
key: "parseObjectForAdmins",
|
|
3133
3213
|
value:
|
|
@@ -3137,7 +3217,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3137
3217
|
* @param {any} obj
|
|
3138
3218
|
*/
|
|
3139
3219
|
function parseObjectForAdmins(columnsForAdmin, obj) {
|
|
3140
|
-
var
|
|
3220
|
+
var _this12 = this;
|
|
3141
3221
|
if (obj.common && obj.common.adminColumns && obj.common.name) {
|
|
3142
3222
|
var columns = obj.common.adminColumns;
|
|
3143
3223
|
if ((0, _typeof2["default"])(columns) !== 'object') {
|
|
@@ -3183,7 +3263,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3183
3263
|
}
|
|
3184
3264
|
return {
|
|
3185
3265
|
path: item.path,
|
|
3186
|
-
name: item.name[
|
|
3266
|
+
name: item.name[_this12.props.lang] || item.name.en,
|
|
3187
3267
|
width: item.width,
|
|
3188
3268
|
edit: !!item.edit,
|
|
3189
3269
|
type: item.type,
|
|
@@ -3203,11 +3283,6 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3203
3283
|
}
|
|
3204
3284
|
return columnsForAdmin;
|
|
3205
3285
|
}
|
|
3206
|
-
|
|
3207
|
-
/**
|
|
3208
|
-
* @param {string} id
|
|
3209
|
-
* @param {ioBroker.Object} obj
|
|
3210
|
-
*/
|
|
3211
3286
|
}, {
|
|
3212
3287
|
key: "subscribe",
|
|
3213
3288
|
value:
|
|
@@ -3251,16 +3326,16 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3251
3326
|
}, {
|
|
3252
3327
|
key: "pauseSubscribe",
|
|
3253
3328
|
value: function pauseSubscribe(isPause) {
|
|
3254
|
-
var
|
|
3329
|
+
var _this13 = this;
|
|
3255
3330
|
if (!this.pausedSubscribes && isPause) {
|
|
3256
3331
|
this.pausedSubscribes = true;
|
|
3257
3332
|
this.subscribes.forEach(function (id) {
|
|
3258
|
-
return
|
|
3333
|
+
return _this13.props.socket.unsubscribeState(id, _this13.onStateChange);
|
|
3259
3334
|
});
|
|
3260
3335
|
} else if (this.pausedSubscribes && !isPause) {
|
|
3261
3336
|
this.pausedSubscribes = false;
|
|
3262
3337
|
this.subscribes.forEach(function (id) {
|
|
3263
|
-
return
|
|
3338
|
+
return _this13.props.socket.subscribeState(id, _this13.onStateChange);
|
|
3264
3339
|
});
|
|
3265
3340
|
}
|
|
3266
3341
|
}
|
|
@@ -3273,14 +3348,14 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3273
3348
|
}, {
|
|
3274
3349
|
key: "onFilter",
|
|
3275
3350
|
value: function onFilter(name, value) {
|
|
3276
|
-
var
|
|
3351
|
+
var _this14 = this;
|
|
3277
3352
|
this.filterTimer = null;
|
|
3278
3353
|
var filter = _objectSpread({}, this.state.filter);
|
|
3279
3354
|
Object.keys(this.filterRefs).forEach(function (_name) {
|
|
3280
|
-
if (
|
|
3281
|
-
for (var i = 0; i <
|
|
3282
|
-
if (
|
|
3283
|
-
filter[_name] =
|
|
3355
|
+
if (_this14.filterRefs[_name] && _this14.filterRefs[_name].current) {
|
|
3356
|
+
for (var i = 0; i < _this14.filterRefs[_name].current.children.length; i++) {
|
|
3357
|
+
if (_this14.filterRefs[_name].current.children[i].tagName === 'INPUT') {
|
|
3358
|
+
filter[_name] = _this14.filterRefs[_name].current.children[i].value;
|
|
3284
3359
|
break;
|
|
3285
3360
|
}
|
|
3286
3361
|
}
|
|
@@ -3297,19 +3372,19 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3297
3372
|
this.setState({
|
|
3298
3373
|
filter: filter
|
|
3299
3374
|
}, function () {
|
|
3300
|
-
return
|
|
3375
|
+
return _this14.props.onFilterChanged && _this14.props.onFilterChanged(filter);
|
|
3301
3376
|
});
|
|
3302
3377
|
}
|
|
3303
3378
|
}
|
|
3304
3379
|
}, {
|
|
3305
3380
|
key: "clearFilter",
|
|
3306
3381
|
value: function clearFilter() {
|
|
3307
|
-
var
|
|
3382
|
+
var _this15 = this;
|
|
3308
3383
|
var filter = _objectSpread({}, this.state.filter);
|
|
3309
3384
|
Object.keys(this.filterRefs).forEach(function (name) {
|
|
3310
|
-
if (
|
|
3311
|
-
for (var i = 0; i <
|
|
3312
|
-
var item =
|
|
3385
|
+
if (_this15.filterRefs[name] && _this15.filterRefs[name].current) {
|
|
3386
|
+
for (var i = 0; i < _this15.filterRefs[name].current.childNodes.length; i++) {
|
|
3387
|
+
var item = _this15.filterRefs[name].current.childNodes[i];
|
|
3313
3388
|
if (item.tagName === 'INPUT') {
|
|
3314
3389
|
filter[name] = '';
|
|
3315
3390
|
item.value = '';
|
|
@@ -3324,16 +3399,16 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3324
3399
|
filter: filter,
|
|
3325
3400
|
filterKey: this.state.filterKey + 1
|
|
3326
3401
|
}, function () {
|
|
3327
|
-
return
|
|
3402
|
+
return _this15.props.onFilterChanged && _this15.props.onFilterChanged(filter);
|
|
3328
3403
|
});
|
|
3329
3404
|
}
|
|
3330
3405
|
}
|
|
3331
3406
|
}, {
|
|
3332
3407
|
key: "isFilterEmpty",
|
|
3333
3408
|
value: function isFilterEmpty() {
|
|
3334
|
-
var
|
|
3409
|
+
var _this16 = this;
|
|
3335
3410
|
var someNotEmpty = Object.keys(this.state.filter).find(function (attr) {
|
|
3336
|
-
return attr !== 'expertMode' &&
|
|
3411
|
+
return attr !== 'expertMode' && _this16.state.filter[attr];
|
|
3337
3412
|
});
|
|
3338
3413
|
return !someNotEmpty;
|
|
3339
3414
|
}
|
|
@@ -3345,7 +3420,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3345
3420
|
}, {
|
|
3346
3421
|
key: "getFilterInput",
|
|
3347
3422
|
value: function getFilterInput(name) {
|
|
3348
|
-
var
|
|
3423
|
+
var _this17 = this,
|
|
3349
3424
|
_this$filterRefs$name,
|
|
3350
3425
|
_this$filterRefs$name2;
|
|
3351
3426
|
return /*#__PURE__*/_react["default"].createElement(_FormControl["default"], {
|
|
@@ -3363,9 +3438,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3363
3438
|
placeholder: this.texts["filter_".concat(name)],
|
|
3364
3439
|
defaultValue: this.state.filter[name],
|
|
3365
3440
|
onChange: function onChange() {
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
return
|
|
3441
|
+
_this17.filterTimer && clearTimeout(_this17.filterTimer);
|
|
3442
|
+
_this17.filterTimer = setTimeout(function () {
|
|
3443
|
+
return _this17.onFilter();
|
|
3369
3444
|
}, 400);
|
|
3370
3445
|
},
|
|
3371
3446
|
autoComplete: "off"
|
|
@@ -3377,8 +3452,8 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3377
3452
|
}, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
3378
3453
|
size: "small",
|
|
3379
3454
|
onClick: function onClick() {
|
|
3380
|
-
|
|
3381
|
-
|
|
3455
|
+
_this17.filterRefs[name].current.firstChild.value = '';
|
|
3456
|
+
_this17.onFilter(name, '');
|
|
3382
3457
|
}
|
|
3383
3458
|
}, /*#__PURE__*/_react["default"].createElement(_Close["default"], null))) : null);
|
|
3384
3459
|
}
|
|
@@ -3391,7 +3466,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3391
3466
|
}, {
|
|
3392
3467
|
key: "getFilterSelect",
|
|
3393
3468
|
value: function getFilterSelect(name, values) {
|
|
3394
|
-
var
|
|
3469
|
+
var _this18 = this,
|
|
3395
3470
|
_this$filterRefs$name3,
|
|
3396
3471
|
_this$filterRefs$name4,
|
|
3397
3472
|
_this$filterRefs$name5;
|
|
@@ -3408,9 +3483,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3408
3483
|
ref: this.filterRefs[name],
|
|
3409
3484
|
className: "".concat(this.props.classes.headerCellInput, " no-underline"),
|
|
3410
3485
|
onChange: function onChange() {
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
return
|
|
3486
|
+
_this18.filterTimer && clearTimeout(_this18.filterTimer);
|
|
3487
|
+
_this18.filterTimer = setTimeout(function () {
|
|
3488
|
+
return _this18.onFilter();
|
|
3414
3489
|
}, 400);
|
|
3415
3490
|
},
|
|
3416
3491
|
defaultValue: this.state.filter[name] || '',
|
|
@@ -3437,7 +3512,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3437
3512
|
_name = item;
|
|
3438
3513
|
}
|
|
3439
3514
|
return /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
|
|
3440
|
-
className:
|
|
3515
|
+
className: _this18.props.classes.headerCellSelectItem,
|
|
3441
3516
|
key: id,
|
|
3442
3517
|
value: id
|
|
3443
3518
|
}, icon || (hasIcons ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -3448,15 +3523,15 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3448
3523
|
}, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
3449
3524
|
size: "small",
|
|
3450
3525
|
onClick: function onClick() {
|
|
3451
|
-
var newFilter = _objectSpread({},
|
|
3526
|
+
var newFilter = _objectSpread({}, _this18.state.filter);
|
|
3452
3527
|
newFilter[name] = '';
|
|
3453
|
-
|
|
3454
|
-
(window._localStorage || window.localStorage).setItem("".concat(
|
|
3455
|
-
|
|
3528
|
+
_this18.filterRefs[name].current.childNodes[1].value = '';
|
|
3529
|
+
(window._localStorage || window.localStorage).setItem("".concat(_this18.props.dialogName || 'App', ".objectFilter"), JSON.stringify(newFilter));
|
|
3530
|
+
_this18.setState({
|
|
3456
3531
|
filter: newFilter,
|
|
3457
|
-
filterKey:
|
|
3532
|
+
filterKey: _this18.state.filterKey + 1
|
|
3458
3533
|
}, function () {
|
|
3459
|
-
return
|
|
3534
|
+
return _this18.props.onFilterChanged && _this18.props.onFilterChanged(newFilter);
|
|
3460
3535
|
});
|
|
3461
3536
|
}
|
|
3462
3537
|
}, /*#__PURE__*/_react["default"].createElement(_Close["default"], null))) : null);
|
|
@@ -3477,15 +3552,15 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3477
3552
|
}, {
|
|
3478
3553
|
key: "getFilterSelectRoom",
|
|
3479
3554
|
value: function getFilterSelectRoom() {
|
|
3480
|
-
var
|
|
3555
|
+
var _this19 = this;
|
|
3481
3556
|
var rooms = this.info.roomEnums.map(function (id) {
|
|
3482
|
-
var
|
|
3557
|
+
var _this19$objects$id, _this19$objects$id$co, _this19$objects$id2, _this19$objects$id2$c;
|
|
3483
3558
|
return {
|
|
3484
|
-
name: getName(((
|
|
3559
|
+
name: getName(((_this19$objects$id = _this19.objects[id]) === null || _this19$objects$id === void 0 ? void 0 : (_this19$objects$id$co = _this19$objects$id.common) === null || _this19$objects$id$co === void 0 ? void 0 : _this19$objects$id$co.name) || id.split('.').pop()),
|
|
3485
3560
|
value: id,
|
|
3486
3561
|
icon: /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
3487
|
-
src: ((
|
|
3488
|
-
className:
|
|
3562
|
+
src: ((_this19$objects$id2 = _this19.objects[id]) === null || _this19$objects$id2 === void 0 ? void 0 : (_this19$objects$id2$c = _this19$objects$id2.common) === null || _this19$objects$id2$c === void 0 ? void 0 : _this19$objects$id2$c.icon) || '',
|
|
3563
|
+
className: _this19.props.classes.selectIcon
|
|
3489
3564
|
})
|
|
3490
3565
|
};
|
|
3491
3566
|
});
|
|
@@ -3498,15 +3573,15 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3498
3573
|
}, {
|
|
3499
3574
|
key: "getFilterSelectFunction",
|
|
3500
3575
|
value: function getFilterSelectFunction() {
|
|
3501
|
-
var
|
|
3576
|
+
var _this20 = this;
|
|
3502
3577
|
var func = this.info.funcEnums.map(function (id) {
|
|
3503
|
-
var
|
|
3578
|
+
var _this20$objects$id, _this20$objects$id$co;
|
|
3504
3579
|
return {
|
|
3505
|
-
name: getName(
|
|
3580
|
+
name: getName(_this20.objects[id] && _this20.objects[id].common && _this20.objects[id].common.name || id.split('.').pop()),
|
|
3506
3581
|
value: id,
|
|
3507
3582
|
icon: /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
3508
|
-
src: ((
|
|
3509
|
-
className:
|
|
3583
|
+
src: ((_this20$objects$id = _this20.objects[id]) === null || _this20$objects$id === void 0 ? void 0 : (_this20$objects$id$co = _this20$objects$id.common) === null || _this20$objects$id$co === void 0 ? void 0 : _this20$objects$id$co.icon) || '',
|
|
3584
|
+
className: _this20.props.classes.selectIcon
|
|
3510
3585
|
})
|
|
3511
3586
|
};
|
|
3512
3587
|
});
|
|
@@ -3535,15 +3610,15 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3535
3610
|
}, {
|
|
3536
3611
|
key: "getFilterSelectCustoms",
|
|
3537
3612
|
value: function getFilterSelectCustoms() {
|
|
3538
|
-
var
|
|
3613
|
+
var _this21 = this;
|
|
3539
3614
|
if (this.info.customs.length) {
|
|
3540
3615
|
var customs = this.info.customs.map(function (id) {
|
|
3541
3616
|
return {
|
|
3542
3617
|
name: id,
|
|
3543
3618
|
value: id,
|
|
3544
3619
|
icon: /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
3545
|
-
src: getSelectIdIcon(
|
|
3546
|
-
className:
|
|
3620
|
+
src: getSelectIdIcon(_this21.objects, id, _this21.imagePrefix) || '',
|
|
3621
|
+
className: _this21.props.classes.selectIcon
|
|
3547
3622
|
})
|
|
3548
3623
|
};
|
|
3549
3624
|
});
|
|
@@ -3560,13 +3635,13 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3560
3635
|
}, {
|
|
3561
3636
|
key: "onExpandAll",
|
|
3562
3637
|
value: function onExpandAll(root, expanded) {
|
|
3563
|
-
var
|
|
3638
|
+
var _this22 = this;
|
|
3564
3639
|
root = root || this.root;
|
|
3565
3640
|
expanded = expanded || [];
|
|
3566
3641
|
root.children && root.children.forEach(function (item) {
|
|
3567
3642
|
if (item.data.sumVisibility) {
|
|
3568
3643
|
expanded.push(item.data.id);
|
|
3569
|
-
|
|
3644
|
+
_this22.onExpandAll(item, expanded);
|
|
3570
3645
|
}
|
|
3571
3646
|
});
|
|
3572
3647
|
if (root === this.root) {
|
|
@@ -3584,7 +3659,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3584
3659
|
}, {
|
|
3585
3660
|
key: "onCollapseAll",
|
|
3586
3661
|
value: function onCollapseAll() {
|
|
3587
|
-
var
|
|
3662
|
+
var _this23 = this;
|
|
3588
3663
|
(window._localStorage || window.localStorage).setItem("".concat(this.props.dialogName || 'App', ".objectExpanded"), JSON.stringify([]));
|
|
3589
3664
|
(window._localStorage || window.localStorage).setItem("".concat(this.props.dialogName || 'App', ".objectSelected"), '[]');
|
|
3590
3665
|
this.setState({
|
|
@@ -3592,7 +3667,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3592
3667
|
depth: 0,
|
|
3593
3668
|
selected: []
|
|
3594
3669
|
}, function () {
|
|
3595
|
-
return
|
|
3670
|
+
return _this23.onAfterSelect();
|
|
3596
3671
|
});
|
|
3597
3672
|
}
|
|
3598
3673
|
|
|
@@ -3605,7 +3680,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3605
3680
|
}, {
|
|
3606
3681
|
key: "expandDepth",
|
|
3607
3682
|
value: function expandDepth(root, depth, expanded) {
|
|
3608
|
-
var
|
|
3683
|
+
var _this24 = this;
|
|
3609
3684
|
root = root || this.root;
|
|
3610
3685
|
if (depth > 0) {
|
|
3611
3686
|
if (root.children) {
|
|
@@ -3616,7 +3691,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3616
3691
|
expanded.sort();
|
|
3617
3692
|
}
|
|
3618
3693
|
if (depth - 1 > 0) {
|
|
3619
|
-
|
|
3694
|
+
_this24.expandDepth(item, depth - 1, expanded);
|
|
3620
3695
|
}
|
|
3621
3696
|
}
|
|
3622
3697
|
});
|
|
@@ -3677,11 +3752,6 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3677
3752
|
});
|
|
3678
3753
|
}
|
|
3679
3754
|
}
|
|
3680
|
-
|
|
3681
|
-
/**
|
|
3682
|
-
* @private
|
|
3683
|
-
* @param {string} id
|
|
3684
|
-
*/
|
|
3685
3755
|
}, {
|
|
3686
3756
|
key: "_getSelectedIdsForExport",
|
|
3687
3757
|
value: function _getSelectedIdsForExport() {
|
|
@@ -3708,17 +3778,17 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3708
3778
|
}, {
|
|
3709
3779
|
key: "_exportObjects",
|
|
3710
3780
|
value: function _exportObjects(isAll) {
|
|
3711
|
-
var
|
|
3781
|
+
var _this25 = this;
|
|
3712
3782
|
if (isAll) {
|
|
3713
3783
|
generateFile('allObjects.json', this.objects);
|
|
3714
3784
|
} else if (this.state.selected.length || this.state.selectedNonObject) {
|
|
3715
3785
|
var result = {};
|
|
3716
3786
|
var id = this.state.selected[0] || this.state.selectedNonObject;
|
|
3717
3787
|
this._getSelectedIdsForExport().forEach(function (key) {
|
|
3718
|
-
result[key] = JSON.parse(JSON.stringify(
|
|
3788
|
+
result[key] = JSON.parse(JSON.stringify(_this25.objects[key]));
|
|
3719
3789
|
// add enum information
|
|
3720
3790
|
if (result[key].common) {
|
|
3721
|
-
var enums =
|
|
3791
|
+
var enums = _this25.getEnumsForId(key);
|
|
3722
3792
|
if (enums) {
|
|
3723
3793
|
result[key].common.enums = enums;
|
|
3724
3794
|
}
|
|
@@ -3732,7 +3802,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3732
3802
|
}, {
|
|
3733
3803
|
key: "renderExportDialog",
|
|
3734
3804
|
value: function renderExportDialog() {
|
|
3735
|
-
var
|
|
3805
|
+
var _this26 = this;
|
|
3736
3806
|
if (this.state.showExportDialog === false) {
|
|
3737
3807
|
return null;
|
|
3738
3808
|
}
|
|
@@ -3742,10 +3812,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3742
3812
|
color: "grey",
|
|
3743
3813
|
variant: "outlined",
|
|
3744
3814
|
onClick: function onClick() {
|
|
3745
|
-
return
|
|
3815
|
+
return _this26.setState({
|
|
3746
3816
|
showExportDialog: false
|
|
3747
3817
|
}, function () {
|
|
3748
|
-
return
|
|
3818
|
+
return _this26._exportObjects(true);
|
|
3749
3819
|
});
|
|
3750
3820
|
}
|
|
3751
3821
|
}, this.props.t('ra_All objects'), " (", Object.keys(this.objects).length, ")"), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
@@ -3753,28 +3823,23 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3753
3823
|
variant: "contained",
|
|
3754
3824
|
autoFocus: true,
|
|
3755
3825
|
onClick: function onClick() {
|
|
3756
|
-
return
|
|
3826
|
+
return _this26.setState({
|
|
3757
3827
|
showExportDialog: false
|
|
3758
3828
|
}, function () {
|
|
3759
|
-
return
|
|
3829
|
+
return _this26._exportObjects(false);
|
|
3760
3830
|
});
|
|
3761
3831
|
}
|
|
3762
3832
|
}, this.props.t('ra_Only selected'), " (", this.state.showExportDialog, ")"), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
3763
3833
|
color: "grey",
|
|
3764
3834
|
variant: "contained",
|
|
3765
3835
|
onClick: function onClick() {
|
|
3766
|
-
return
|
|
3836
|
+
return _this26.setState({
|
|
3767
3837
|
showExportDialog: false
|
|
3768
3838
|
});
|
|
3769
3839
|
},
|
|
3770
3840
|
startIcon: /*#__PURE__*/_react["default"].createElement(_Close["default"], null)
|
|
3771
3841
|
}, this.props.t('ra_Cancel'))));
|
|
3772
3842
|
}
|
|
3773
|
-
|
|
3774
|
-
/**
|
|
3775
|
-
* @private
|
|
3776
|
-
* @param {object} evt
|
|
3777
|
-
*/
|
|
3778
3843
|
}, {
|
|
3779
3844
|
key: "getToolbar",
|
|
3780
3845
|
value:
|
|
@@ -3783,7 +3848,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3783
3848
|
* @returns {JSX.Element}
|
|
3784
3849
|
*/
|
|
3785
3850
|
function getToolbar() {
|
|
3786
|
-
var
|
|
3851
|
+
var _this27 = this;
|
|
3787
3852
|
var allowObjectCreation = false;
|
|
3788
3853
|
if (this.state.selected.length || this.state.selectedNonObject) {
|
|
3789
3854
|
var id = this.state.selected[0] || this.state.selectedNonObject;
|
|
@@ -3808,95 +3873,139 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3808
3873
|
alignItems: 'center'
|
|
3809
3874
|
}
|
|
3810
3875
|
}, /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
|
|
3811
|
-
title: this.props.t('ra_Refresh tree')
|
|
3876
|
+
title: this.props.t('ra_Refresh tree'),
|
|
3877
|
+
classes: {
|
|
3878
|
+
popper: this.props.classes.tooltip
|
|
3879
|
+
}
|
|
3812
3880
|
}, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
3813
3881
|
onClick: function onClick() {
|
|
3814
|
-
return
|
|
3882
|
+
return _this27.refreshComponent();
|
|
3815
3883
|
},
|
|
3816
3884
|
disabled: this.state.updating,
|
|
3817
3885
|
size: "large"
|
|
3818
3886
|
}, /*#__PURE__*/_react["default"].createElement(_Refresh["default"], null)))), this.props.showExpertButton && !this.props.expertMode && /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
|
|
3819
|
-
title: this.props.t('ra_expertMode')
|
|
3887
|
+
title: this.props.t('ra_expertMode'),
|
|
3888
|
+
classes: {
|
|
3889
|
+
popper: this.props.classes.tooltip
|
|
3890
|
+
}
|
|
3820
3891
|
}, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
3821
3892
|
key: "expertMode",
|
|
3822
3893
|
color: this.state.filter.expertMode ? 'secondary' : 'default',
|
|
3823
3894
|
onClick: function onClick() {
|
|
3824
|
-
return
|
|
3895
|
+
return _this27.onFilter('expertMode', !_this27.state.filter.expertMode);
|
|
3825
3896
|
},
|
|
3826
3897
|
size: "large"
|
|
3827
3898
|
}, /*#__PURE__*/_react["default"].createElement(_IconExpert["default"], null))), !this.props.disableColumnSelector && /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
|
|
3828
|
-
title: this.props.t('ra_Configure')
|
|
3899
|
+
title: this.props.t('ra_Configure'),
|
|
3900
|
+
classes: {
|
|
3901
|
+
popper: this.props.classes.tooltip
|
|
3902
|
+
}
|
|
3829
3903
|
}, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
3830
|
-
key: "columnSelector"
|
|
3831
|
-
|
|
3832
|
-
,
|
|
3904
|
+
key: "columnSelector",
|
|
3905
|
+
color: this.state.columnsAuto ? 'primary' : 'default',
|
|
3833
3906
|
onClick: function onClick() {
|
|
3834
|
-
return
|
|
3907
|
+
return _this27.setState({
|
|
3835
3908
|
columnsSelectorShow: true
|
|
3836
3909
|
});
|
|
3837
3910
|
},
|
|
3838
3911
|
size: "large"
|
|
3839
3912
|
}, /*#__PURE__*/_react["default"].createElement(_ViewColumn["default"], null))), this.state.expandAllVisible && /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
|
|
3840
|
-
title: this.props.t('ra_Expand all nodes')
|
|
3913
|
+
title: this.props.t('ra_Expand all nodes'),
|
|
3914
|
+
classes: {
|
|
3915
|
+
popper: this.props.classes.tooltip
|
|
3916
|
+
}
|
|
3841
3917
|
}, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
3842
3918
|
key: "expandAll",
|
|
3843
3919
|
onClick: function onClick() {
|
|
3844
|
-
return
|
|
3920
|
+
return _this27.onExpandAll();
|
|
3845
3921
|
},
|
|
3846
3922
|
size: "large"
|
|
3847
3923
|
}, /*#__PURE__*/_react["default"].createElement(_IconOpen["default"], null))), /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
|
|
3848
|
-
title: this.props.t('ra_Collapse all nodes')
|
|
3924
|
+
title: this.props.t('ra_Collapse all nodes'),
|
|
3925
|
+
classes: {
|
|
3926
|
+
popper: this.props.classes.tooltip
|
|
3927
|
+
}
|
|
3849
3928
|
}, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
3850
3929
|
key: "collapseAll",
|
|
3851
3930
|
onClick: function onClick() {
|
|
3852
|
-
return
|
|
3931
|
+
return _this27.onCollapseAll();
|
|
3853
3932
|
},
|
|
3854
3933
|
size: "large"
|
|
3855
3934
|
}, /*#__PURE__*/_react["default"].createElement(_IconClosed["default"], null))), /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
|
|
3856
|
-
title: this.props.t('ra_Expand one step node')
|
|
3935
|
+
title: this.props.t('ra_Expand one step node'),
|
|
3936
|
+
classes: {
|
|
3937
|
+
popper: this.props.classes.tooltip
|
|
3938
|
+
}
|
|
3857
3939
|
}, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
3858
3940
|
key: "expandVisible",
|
|
3859
3941
|
color: "primary",
|
|
3860
3942
|
onClick: function onClick() {
|
|
3861
|
-
return
|
|
3943
|
+
return _this27.onExpandVisible();
|
|
3862
3944
|
},
|
|
3863
3945
|
size: "large"
|
|
3864
3946
|
}, /*#__PURE__*/_react["default"].createElement(StyledBadge, {
|
|
3865
3947
|
badgeContent: this.state.depth,
|
|
3866
3948
|
color: "secondary"
|
|
3867
3949
|
}, /*#__PURE__*/_react["default"].createElement(_IconOpen["default"], null)))), /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
|
|
3868
|
-
title: this.props.t('ra_Collapse one step node')
|
|
3950
|
+
title: this.props.t('ra_Collapse one step node'),
|
|
3951
|
+
classes: {
|
|
3952
|
+
popper: this.props.classes.tooltip
|
|
3953
|
+
}
|
|
3869
3954
|
}, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
3870
3955
|
key: "collapseVisible",
|
|
3871
3956
|
color: "primary",
|
|
3872
3957
|
onClick: function onClick() {
|
|
3873
|
-
return
|
|
3958
|
+
return _this27.onCollapseVisible();
|
|
3874
3959
|
},
|
|
3875
3960
|
size: "large"
|
|
3876
3961
|
}, /*#__PURE__*/_react["default"].createElement(StyledBadge, {
|
|
3877
3962
|
badgeContent: this.state.depth,
|
|
3878
3963
|
color: "secondary"
|
|
3879
3964
|
}, /*#__PURE__*/_react["default"].createElement(_IconClosed["default"], null)))), this.props.objectStatesView && /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
|
|
3880
|
-
title: this.props.t('ra_Toggle the states view')
|
|
3965
|
+
title: this.props.t('ra_Toggle the states view'),
|
|
3966
|
+
classes: {
|
|
3967
|
+
popper: this.props.classes.tooltip
|
|
3968
|
+
}
|
|
3881
3969
|
}, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
3882
3970
|
onClick: function onClick() {
|
|
3883
|
-
return
|
|
3971
|
+
return _this27.onStatesViewVisible();
|
|
3884
3972
|
},
|
|
3885
3973
|
size: "large"
|
|
3886
3974
|
}, /*#__PURE__*/_react["default"].createElement(_LooksOne["default"], {
|
|
3887
3975
|
color: this.state.statesView ? 'primary' : 'inherit'
|
|
3976
|
+
}))), /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
|
|
3977
|
+
title: this.props.t('ra_Show/Hide object descriptions'),
|
|
3978
|
+
classes: {
|
|
3979
|
+
popper: this.props.classes.tooltip
|
|
3980
|
+
}
|
|
3981
|
+
}, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
3982
|
+
onClick: function onClick() {
|
|
3983
|
+
(window._localStorage || window.localStorage).setItem("".concat(_this27.props.dialogName || 'App', ".desc"), _this27.state.showDescription ? 'false' : 'true');
|
|
3984
|
+
_this27.setState({
|
|
3985
|
+
showDescription: !_this27.state.showDescription
|
|
3986
|
+
});
|
|
3987
|
+
},
|
|
3988
|
+
size: "large"
|
|
3989
|
+
}, /*#__PURE__*/_react["default"].createElement(_TextFields["default"], {
|
|
3990
|
+
color: this.state.showDescription ? 'primary' : 'inherit'
|
|
3888
3991
|
}))), this.props.objectAddBoolean ? /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
|
|
3889
|
-
title: this.toolTipObjectCreating()
|
|
3992
|
+
title: this.toolTipObjectCreating(),
|
|
3993
|
+
classes: {
|
|
3994
|
+
popper: this.props.classes.tooltip
|
|
3995
|
+
}
|
|
3890
3996
|
}, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
3891
3997
|
disabled: !allowObjectCreation,
|
|
3892
3998
|
onClick: function onClick() {
|
|
3893
|
-
return
|
|
3999
|
+
return _this27.setState({
|
|
3894
4000
|
modalNewObj: true
|
|
3895
4001
|
});
|
|
3896
4002
|
},
|
|
3897
4003
|
size: "large"
|
|
3898
4004
|
}, /*#__PURE__*/_react["default"].createElement(_Add["default"], null)))) : null, this.props.objectImportExport && /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
|
|
3899
|
-
title: this.props.t('ra_Add objects tree from JSON file')
|
|
4005
|
+
title: this.props.t('ra_Add objects tree from JSON file'),
|
|
4006
|
+
classes: {
|
|
4007
|
+
popper: this.props.classes.tooltip
|
|
4008
|
+
}
|
|
3900
4009
|
}, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
3901
4010
|
onClick: function onClick() {
|
|
3902
4011
|
var input = document.createElement('input');
|
|
@@ -3904,17 +4013,20 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3904
4013
|
input.setAttribute('id', 'files');
|
|
3905
4014
|
input.setAttribute('opacity', 0);
|
|
3906
4015
|
input.addEventListener('change', function (e) {
|
|
3907
|
-
return
|
|
4016
|
+
return _this27.handleJsonUpload(e);
|
|
3908
4017
|
}, false);
|
|
3909
4018
|
input.click();
|
|
3910
4019
|
},
|
|
3911
4020
|
size: "large"
|
|
3912
4021
|
}, /*#__PURE__*/_react["default"].createElement(_Publish["default"], null))), this.props.objectImportExport && (!!this.state.selected.length || this.state.selectedNonObject) && /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
|
|
3913
|
-
title: this.props.t('ra_Save objects tree as JSON file')
|
|
4022
|
+
title: this.props.t('ra_Save objects tree as JSON file'),
|
|
4023
|
+
classes: {
|
|
4024
|
+
popper: this.props.classes.tooltip
|
|
4025
|
+
}
|
|
3914
4026
|
}, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
3915
4027
|
onClick: function onClick() {
|
|
3916
|
-
return
|
|
3917
|
-
showExportDialog:
|
|
4028
|
+
return _this27.setState({
|
|
4029
|
+
showExportDialog: _this27._getSelectedIdsForExport().length
|
|
3918
4030
|
});
|
|
3919
4031
|
},
|
|
3920
4032
|
size: "large"
|
|
@@ -3928,25 +4040,28 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
3928
4040
|
whiteSpace: 'nowrap'
|
|
3929
4041
|
}
|
|
3930
4042
|
}, "".concat(this.props.t('ra_Objects'), ": ").concat(Object.keys(this.info.objects).length, ", ").concat(this.props.t('ra_States'), ": ").concat(Object.keys(this.info.objects).filter(function (el) {
|
|
3931
|
-
return
|
|
4043
|
+
return _this27.info.objects[el].type === 'state';
|
|
3932
4044
|
}).length)), this.props.objectEditBoolean && /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
|
|
3933
|
-
title: this.props.t('ra_Edit custom config')
|
|
4045
|
+
title: this.props.t('ra_Edit custom config'),
|
|
4046
|
+
classes: {
|
|
4047
|
+
popper: this.props.classes.tooltip
|
|
4048
|
+
}
|
|
3934
4049
|
}, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
3935
4050
|
onClick: function onClick() {
|
|
3936
4051
|
// get all visible states
|
|
3937
|
-
var ids = getVisibleItems(
|
|
4052
|
+
var ids = getVisibleItems(_this27.root, 'state', _this27.objects);
|
|
3938
4053
|
if (ids.length) {
|
|
3939
|
-
|
|
4054
|
+
_this27.pauseSubscribe(true);
|
|
3940
4055
|
if (ids.length === 1) {
|
|
3941
|
-
(window._localStorage || window.localStorage).setItem("".concat(
|
|
3942
|
-
|
|
4056
|
+
(window._localStorage || window.localStorage).setItem("".concat(_this27.props.dialogName || 'App', ".objectSelected"), _this27.state.selected[0]);
|
|
4057
|
+
_this27.props.router && _this27.props.router.doNavigate(null, 'custom', _this27.state.selected[0]);
|
|
3943
4058
|
}
|
|
3944
|
-
|
|
4059
|
+
_this27.setState({
|
|
3945
4060
|
customDialog: ids
|
|
3946
4061
|
});
|
|
3947
4062
|
} else {
|
|
3948
|
-
|
|
3949
|
-
toast:
|
|
4063
|
+
_this27.setState({
|
|
4064
|
+
toast: _this27.props.t('ra_please select object')
|
|
3950
4065
|
});
|
|
3951
4066
|
}
|
|
3952
4067
|
},
|
|
@@ -4005,7 +4120,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4005
4120
|
* @param {{ cellButtonsButton: string | undefined; cellButtonsButtonAlone: any; cellButtonsButtonIcon: string | undefined; cellButtonsButtonWithCustoms: any; }} classes
|
|
4006
4121
|
*/
|
|
4007
4122
|
function renderColumnButtons(id, item, classes) {
|
|
4008
|
-
var
|
|
4123
|
+
var _this28 = this,
|
|
4009
4124
|
_item$children2,
|
|
4010
4125
|
_item$data$obj$common,
|
|
4011
4126
|
_item$data$obj$common3;
|
|
@@ -4015,7 +4130,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4015
4130
|
}, this.state.filter.expertMode && this.props.objectEditOfAccessControl ? /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
4016
4131
|
className: _Utils["default"].clsx(classes.cellButtonsButton, classes.cellButtonsEmptyButton, classes.cellButtonMinWidth),
|
|
4017
4132
|
onClick: function onClick() {
|
|
4018
|
-
return
|
|
4133
|
+
return _this28.setState({
|
|
4019
4134
|
modalEditOfAccess: true,
|
|
4020
4135
|
modalEditOfAccessObjData: item.data
|
|
4021
4136
|
});
|
|
@@ -4028,7 +4143,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4028
4143
|
title: this.texts.deleteObject,
|
|
4029
4144
|
onClick: function onClick() {
|
|
4030
4145
|
// calculate number of children
|
|
4031
|
-
var keys = Object.keys(
|
|
4146
|
+
var keys = Object.keys(_this28.objects);
|
|
4032
4147
|
keys.sort();
|
|
4033
4148
|
var count = 0;
|
|
4034
4149
|
var start = "".concat(id, ".");
|
|
@@ -4039,7 +4154,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4039
4154
|
break;
|
|
4040
4155
|
}
|
|
4041
4156
|
}
|
|
4042
|
-
|
|
4157
|
+
_this28.props.onObjectDelete(id, !!(item.children && item.children.length), false, count + 1);
|
|
4043
4158
|
}
|
|
4044
4159
|
}, /*#__PURE__*/_react["default"].createElement(_Delete["default"], {
|
|
4045
4160
|
className: classes.cellButtonsButtonIcon
|
|
@@ -4050,11 +4165,14 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4050
4165
|
var aclSystemConfig = item.data.obj.acl && (item.data.obj.type === 'state' ? this.systemConfig.common.defaultNewAcl.state : this.systemConfig.common.defaultNewAcl.object);
|
|
4051
4166
|
return [this.state.filter.expertMode && this.props.objectEditOfAccessControl ? /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
|
|
4052
4167
|
key: "acl",
|
|
4053
|
-
title: item.data.aclTooltip
|
|
4168
|
+
title: item.data.aclTooltip,
|
|
4169
|
+
classes: {
|
|
4170
|
+
popper: this.props.classes.tooltip
|
|
4171
|
+
}
|
|
4054
4172
|
}, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
4055
4173
|
className: classes.cellButtonMinWidth,
|
|
4056
4174
|
onClick: function onClick() {
|
|
4057
|
-
return
|
|
4175
|
+
return _this28.setState({
|
|
4058
4176
|
modalEditOfAccess: true,
|
|
4059
4177
|
modalEditOfAccessObjData: item.data
|
|
4060
4178
|
});
|
|
@@ -4072,8 +4190,8 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4072
4190
|
"aria-label": "edit",
|
|
4073
4191
|
title: this.texts.editObject,
|
|
4074
4192
|
onClick: function onClick() {
|
|
4075
|
-
(window._localStorage || window.localStorage).setItem("".concat(
|
|
4076
|
-
|
|
4193
|
+
(window._localStorage || window.localStorage).setItem("".concat(_this28.props.dialogName || 'App', ".objectSelected"), id);
|
|
4194
|
+
_this28.setState({
|
|
4077
4195
|
editObjectDialog: id
|
|
4078
4196
|
});
|
|
4079
4197
|
}
|
|
@@ -4086,7 +4204,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4086
4204
|
"aria-label": "delete",
|
|
4087
4205
|
onClick: function onClick() {
|
|
4088
4206
|
var _item$children3, _item$data$obj$common2;
|
|
4089
|
-
var keys = Object.keys(
|
|
4207
|
+
var keys = Object.keys(_this28.objects);
|
|
4090
4208
|
keys.sort();
|
|
4091
4209
|
var count = 0;
|
|
4092
4210
|
var start = "".concat(id, ".");
|
|
@@ -4097,7 +4215,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4097
4215
|
break;
|
|
4098
4216
|
}
|
|
4099
4217
|
}
|
|
4100
|
-
|
|
4218
|
+
_this28.props.onObjectDelete(id, !!((_item$children3 = item.children) !== null && _item$children3 !== void 0 && _item$children3.length), !((_item$data$obj$common2 = item.data.obj.common) !== null && _item$data$obj$common2 !== void 0 && _item$data$obj$common2.dontDelete), count);
|
|
4101
4219
|
},
|
|
4102
4220
|
title: this.texts.deleteObject
|
|
4103
4221
|
}, /*#__PURE__*/_react["default"].createElement(_Delete["default"], {
|
|
@@ -4109,10 +4227,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4109
4227
|
"aria-label": "config",
|
|
4110
4228
|
title: this.texts.customConfig,
|
|
4111
4229
|
onClick: function onClick() {
|
|
4112
|
-
(window._localStorage || window.localStorage).setItem("".concat(
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4230
|
+
(window._localStorage || window.localStorage).setItem("".concat(_this28.props.dialogName || 'App', ".objectSelected"), id);
|
|
4231
|
+
_this28.pauseSubscribe(true);
|
|
4232
|
+
_this28.props.router && _this28.props.router.doNavigate(null, 'customs', id);
|
|
4233
|
+
_this28.setState({
|
|
4116
4234
|
customDialog: [id]
|
|
4117
4235
|
});
|
|
4118
4236
|
}
|
|
@@ -4186,7 +4304,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4186
4304
|
key: "renderColumnValue",
|
|
4187
4305
|
value: function renderColumnValue(id, item, classes) {
|
|
4188
4306
|
var _obj$common4,
|
|
4189
|
-
|
|
4307
|
+
_this29 = this;
|
|
4190
4308
|
var obj = item.data.obj;
|
|
4191
4309
|
if (!obj || !this.states) {
|
|
4192
4310
|
return null;
|
|
@@ -4213,7 +4331,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4213
4331
|
item.data.state = item.data.state || formatValue(id, state, obj, this.texts, this.props.dateFormat, this.props.isFloatComma);
|
|
4214
4332
|
info = item.data.state;
|
|
4215
4333
|
info.valFull = info.valFull.map(function (_item) {
|
|
4216
|
-
if (_item.t ===
|
|
4334
|
+
if (_item.t === _this29.texts.quality && state.q) {
|
|
4217
4335
|
return [/*#__PURE__*/_react["default"].createElement("div", {
|
|
4218
4336
|
className: classes.cellValueTooltipBoth,
|
|
4219
4337
|
key: _item.t
|
|
@@ -4260,7 +4378,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4260
4378
|
}, "(", info.valText.s, ")") : null, /*#__PURE__*/_react["default"].createElement(_IconCopy["default"], {
|
|
4261
4379
|
className: _Utils["default"].clsx(classes.cellButtonsValueButton, 'copyButton', classes.cellButtonsValueButtonCopy),
|
|
4262
4380
|
onClick: function onClick(e) {
|
|
4263
|
-
return
|
|
4381
|
+
return _this29.onCopy(e, copyText);
|
|
4264
4382
|
},
|
|
4265
4383
|
key: "cc"
|
|
4266
4384
|
})
|
|
@@ -4282,7 +4400,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4282
4400
|
popper: this.props.classes.cellValueTooltipBox
|
|
4283
4401
|
},
|
|
4284
4402
|
onOpen: function onOpen() {
|
|
4285
|
-
return
|
|
4403
|
+
return _this29.readHistory(id);
|
|
4286
4404
|
}
|
|
4287
4405
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
4288
4406
|
style: info.style,
|
|
@@ -4298,7 +4416,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4298
4416
|
key: "_syncEnum",
|
|
4299
4417
|
value: function _syncEnum(id, enumIds, newArray, cb) {
|
|
4300
4418
|
var _this$info$objects$en,
|
|
4301
|
-
|
|
4419
|
+
_this30 = this;
|
|
4302
4420
|
if (!enumIds || !enumIds.length) {
|
|
4303
4421
|
cb && cb();
|
|
4304
4422
|
return;
|
|
@@ -4314,9 +4432,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4314
4432
|
var obj = JSON.parse(JSON.stringify(this.info.objects[enumId]));
|
|
4315
4433
|
obj.common.members.splice(pos, 1);
|
|
4316
4434
|
promises.push(this.props.socket.setObject(enumId, obj).then(function () {
|
|
4317
|
-
return
|
|
4435
|
+
return _this30.info.objects[enumId] = obj;
|
|
4318
4436
|
})["catch"](function (e) {
|
|
4319
|
-
return
|
|
4437
|
+
return _this30.showError(e);
|
|
4320
4438
|
}));
|
|
4321
4439
|
}
|
|
4322
4440
|
}
|
|
@@ -4329,15 +4447,15 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4329
4447
|
_obj.common.members.push(id);
|
|
4330
4448
|
_obj.common.members.sort();
|
|
4331
4449
|
promises.push(this.props.socket.setObject(enumId, _obj).then(function () {
|
|
4332
|
-
return
|
|
4450
|
+
return _this30.info.objects[enumId] = _obj;
|
|
4333
4451
|
})["catch"](function (e) {
|
|
4334
|
-
return
|
|
4452
|
+
return _this30.showError(e);
|
|
4335
4453
|
}));
|
|
4336
4454
|
}
|
|
4337
4455
|
}
|
|
4338
4456
|
Promise.all(promises).then(function () {
|
|
4339
4457
|
return setTimeout(function () {
|
|
4340
|
-
return
|
|
4458
|
+
return _this30._syncEnum(id, enumIds, newArray, cb);
|
|
4341
4459
|
}, 0);
|
|
4342
4460
|
});
|
|
4343
4461
|
}
|
|
@@ -4349,11 +4467,11 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4349
4467
|
}, {
|
|
4350
4468
|
key: "syncEnum",
|
|
4351
4469
|
value: function syncEnum(id, enumName, newArray) {
|
|
4352
|
-
var
|
|
4470
|
+
var _this31 = this;
|
|
4353
4471
|
var toCheck = (0, _toConsumableArray2["default"])(this.info[enumName === 'func' ? 'funcEnums' : 'roomEnums']);
|
|
4354
4472
|
return new Promise(function (resolve) {
|
|
4355
|
-
|
|
4356
|
-
error &&
|
|
4473
|
+
_this31._syncEnum(id, toCheck, newArray, function (error) {
|
|
4474
|
+
error && _this31.showError(error);
|
|
4357
4475
|
// force update of object
|
|
4358
4476
|
resolve();
|
|
4359
4477
|
});
|
|
@@ -4367,7 +4485,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4367
4485
|
}, {
|
|
4368
4486
|
key: "renderEnumDialog",
|
|
4369
4487
|
value: function renderEnumDialog() {
|
|
4370
|
-
var
|
|
4488
|
+
var _this32 = this;
|
|
4371
4489
|
if (this.state.enumDialog) {
|
|
4372
4490
|
var type = this.state.enumDialog.type;
|
|
4373
4491
|
var item = this.state.enumDialog.item;
|
|
@@ -4375,9 +4493,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4375
4493
|
var enumsOriginal = this.state.enumDialog.enumsOriginal;
|
|
4376
4494
|
var enums = (type === 'room' ? this.info.roomEnums : this.info.funcEnums).map(function (id) {
|
|
4377
4495
|
return {
|
|
4378
|
-
name: getName(
|
|
4496
|
+
name: getName(_this32.objects[id] && _this32.objects[id].common && _this32.objects[id].common.name || id.split('.').pop(), _this32.props.lang),
|
|
4379
4497
|
value: id,
|
|
4380
|
-
icon: getSelectIdIcon(
|
|
4498
|
+
icon: getSelectIdIcon(_this32.objects, id, _this32.imagePrefix)
|
|
4381
4499
|
};
|
|
4382
4500
|
}).sort(function (a, b) {
|
|
4383
4501
|
return a.name > b.name ? 1 : -1;
|
|
@@ -4385,10 +4503,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4385
4503
|
enums.forEach(function (_item) {
|
|
4386
4504
|
if (_item.icon && typeof _item.icon === 'string') {
|
|
4387
4505
|
_item.icon = /*#__PURE__*/_react["default"].createElement("div", {
|
|
4388
|
-
className:
|
|
4506
|
+
className: _this32.props.classes.enumIconDiv
|
|
4389
4507
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
4390
4508
|
src: _item.icon,
|
|
4391
|
-
className:
|
|
4509
|
+
className: _this32.props.classes.enumIcon,
|
|
4392
4510
|
alt: _item.name
|
|
4393
4511
|
}));
|
|
4394
4512
|
}
|
|
@@ -4399,7 +4517,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4399
4517
|
return /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
|
|
4400
4518
|
className: this.props.classes.enumDialog,
|
|
4401
4519
|
onClose: function onClose() {
|
|
4402
|
-
return
|
|
4520
|
+
return _this32.setState({
|
|
4403
4521
|
enumDialog: null
|
|
4404
4522
|
});
|
|
4405
4523
|
},
|
|
@@ -4413,8 +4531,8 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4413
4531
|
disabled: JSON.stringify(enumsOriginal) === JSON.stringify(itemEnums),
|
|
4414
4532
|
size: "small",
|
|
4415
4533
|
onClick: function onClick() {
|
|
4416
|
-
return
|
|
4417
|
-
return
|
|
4534
|
+
return _this32.syncEnum(item.data.id, type, itemEnums).then(function () {
|
|
4535
|
+
return _this32.setState({
|
|
4418
4536
|
enumDialog: null,
|
|
4419
4537
|
enumDialogEnums: null
|
|
4420
4538
|
});
|
|
@@ -4438,24 +4556,24 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4438
4556
|
}
|
|
4439
4557
|
var labelId = "checkbox-list-label-".concat(id);
|
|
4440
4558
|
return /*#__PURE__*/_react["default"].createElement(_ListItem["default"], {
|
|
4441
|
-
className:
|
|
4559
|
+
className: _this32.props.classes.headerCellSelectItem,
|
|
4442
4560
|
key: id,
|
|
4443
4561
|
onClick: function onClick() {
|
|
4444
4562
|
var pos = itemEnums.indexOf(id);
|
|
4445
|
-
var enumDialogEnums = JSON.parse(JSON.stringify(
|
|
4563
|
+
var enumDialogEnums = JSON.parse(JSON.stringify(_this32.state.enumDialogEnums));
|
|
4446
4564
|
if (pos === -1) {
|
|
4447
4565
|
enumDialogEnums.push(id);
|
|
4448
4566
|
enumDialogEnums.sort();
|
|
4449
4567
|
} else {
|
|
4450
4568
|
enumDialogEnums.splice(pos, 1);
|
|
4451
4569
|
}
|
|
4452
|
-
|
|
4570
|
+
_this32.setState({
|
|
4453
4571
|
enumDialogEnums: enumDialogEnums
|
|
4454
4572
|
});
|
|
4455
4573
|
}
|
|
4456
4574
|
}, /*#__PURE__*/_react["default"].createElement(_ListItemIcon["default"], {
|
|
4457
4575
|
classes: {
|
|
4458
|
-
root:
|
|
4576
|
+
root: _this32.props.classes.enumCheckbox
|
|
4459
4577
|
}
|
|
4460
4578
|
}, /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], {
|
|
4461
4579
|
edge: "start",
|
|
@@ -4480,7 +4598,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4480
4598
|
}, {
|
|
4481
4599
|
key: "renderEditRoleDialog",
|
|
4482
4600
|
value: function renderEditRoleDialog() {
|
|
4483
|
-
var
|
|
4601
|
+
var _this33 = this;
|
|
4484
4602
|
if (this.state.roleDialog && this.props.objectBrowserEditRole) {
|
|
4485
4603
|
var ObjectBrowserEditRole = this.props.objectBrowserEditRole;
|
|
4486
4604
|
return /*#__PURE__*/_react["default"].createElement(ObjectBrowserEditRole, {
|
|
@@ -4491,9 +4609,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4491
4609
|
roles: this.info.roles,
|
|
4492
4610
|
onClose: function onClose(obj) {
|
|
4493
4611
|
if (obj) {
|
|
4494
|
-
|
|
4612
|
+
_this33.info.objects[_this33.state.roleDialog] = obj;
|
|
4495
4613
|
}
|
|
4496
|
-
|
|
4614
|
+
_this33.setState({
|
|
4497
4615
|
roleDialog: false
|
|
4498
4616
|
});
|
|
4499
4617
|
}
|
|
@@ -4509,7 +4627,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4509
4627
|
}, {
|
|
4510
4628
|
key: "onColumnsEditCustomDialogClose",
|
|
4511
4629
|
value: function onColumnsEditCustomDialogClose(isSave) {
|
|
4512
|
-
var
|
|
4630
|
+
var _this34 = this;
|
|
4513
4631
|
if (isSave) {
|
|
4514
4632
|
var value = this.customColumnDialog.value;
|
|
4515
4633
|
if (this.customColumnDialog.type === 'boolean') {
|
|
@@ -4519,16 +4637,16 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4519
4637
|
}
|
|
4520
4638
|
this.customColumnDialog = null;
|
|
4521
4639
|
this.props.socket.getObject(this.state.columnsEditCustomDialog.obj._id).then(function (obj) {
|
|
4522
|
-
if (ObjectBrowser.setCustomValue(obj,
|
|
4523
|
-
return
|
|
4640
|
+
if (ObjectBrowser.setCustomValue(obj, _this34.state.columnsEditCustomDialog.it, value)) {
|
|
4641
|
+
return _this34.props.socket.setObject(obj._id, obj);
|
|
4524
4642
|
}
|
|
4525
|
-
throw new Error(
|
|
4643
|
+
throw new Error(_this34.props.t('ra_Cannot update attribute, because not found in the object'));
|
|
4526
4644
|
}).then(function () {
|
|
4527
|
-
return
|
|
4645
|
+
return _this34.setState({
|
|
4528
4646
|
columnsEditCustomDialog: null
|
|
4529
4647
|
});
|
|
4530
4648
|
})["catch"](function (e) {
|
|
4531
|
-
return
|
|
4649
|
+
return _this34.showError(e);
|
|
4532
4650
|
});
|
|
4533
4651
|
} else {
|
|
4534
4652
|
this.customColumnDialog = null;
|
|
@@ -4544,7 +4662,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4544
4662
|
}, {
|
|
4545
4663
|
key: "renderColumnsEditCustomDialog",
|
|
4546
4664
|
value: function renderColumnsEditCustomDialog() {
|
|
4547
|
-
var
|
|
4665
|
+
var _this35 = this;
|
|
4548
4666
|
if (this.state.columnsEditCustomDialog) {
|
|
4549
4667
|
if (!this.customColumnDialog) {
|
|
4550
4668
|
var value = ObjectBrowser.getCustomValue(this.state.columnsEditCustomDialog.obj, this.state.columnsEditCustomDialog.it);
|
|
@@ -4556,7 +4674,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4556
4674
|
}
|
|
4557
4675
|
return /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
|
|
4558
4676
|
onClose: function onClose() {
|
|
4559
|
-
return
|
|
4677
|
+
return _this35.setState({
|
|
4560
4678
|
columnsEditCustomDialog: null
|
|
4561
4679
|
});
|
|
4562
4680
|
},
|
|
@@ -4570,14 +4688,14 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4570
4688
|
}, this.customColumnDialog.type === 'boolean' ? /*#__PURE__*/_react["default"].createElement(_FormControlLabel["default"], {
|
|
4571
4689
|
control: /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], {
|
|
4572
4690
|
onKeyUp: function onKeyUp(e) {
|
|
4573
|
-
return e.keyCode === 13 &&
|
|
4691
|
+
return e.keyCode === 13 && _this35.onColumnsEditCustomDialogClose(true);
|
|
4574
4692
|
},
|
|
4575
4693
|
defaultChecked: this.customColumnDialog.value === 'true',
|
|
4576
4694
|
onChange: function onChange(e) {
|
|
4577
|
-
|
|
4578
|
-
var changed =
|
|
4579
|
-
if (changed === !
|
|
4580
|
-
|
|
4695
|
+
_this35.customColumnDialog.value = e.target.checked.toString();
|
|
4696
|
+
var changed = _this35.customColumnDialog.value !== _this35.customColumnDialog.initValue;
|
|
4697
|
+
if (changed === !_this35.state.customColumnDialogValueChanged) {
|
|
4698
|
+
_this35.setState({
|
|
4581
4699
|
customColumnDialogValueChanged: changed
|
|
4582
4700
|
});
|
|
4583
4701
|
}
|
|
@@ -4589,14 +4707,14 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4589
4707
|
defaultValue: this.customColumnDialog.value,
|
|
4590
4708
|
fullWidth: true,
|
|
4591
4709
|
onKeyUp: function onKeyUp(e) {
|
|
4592
|
-
return e.keyCode === 13 &&
|
|
4710
|
+
return e.keyCode === 13 && _this35.onColumnsEditCustomDialogClose(true);
|
|
4593
4711
|
},
|
|
4594
4712
|
label: "".concat(this.state.columnsEditCustomDialog.it.name, " (").concat(this.state.columnsEditCustomDialog.it.pathText, ")"),
|
|
4595
4713
|
onChange: function onChange(e) {
|
|
4596
|
-
|
|
4597
|
-
var changed =
|
|
4598
|
-
if (changed === !
|
|
4599
|
-
|
|
4714
|
+
_this35.customColumnDialog.value = e.target.value;
|
|
4715
|
+
var changed = _this35.customColumnDialog.value !== _this35.customColumnDialog.initValue;
|
|
4716
|
+
if (changed === !_this35.state.customColumnDialogValueChanged) {
|
|
4717
|
+
_this35.setState({
|
|
4600
4718
|
customColumnDialogValueChanged: changed
|
|
4601
4719
|
});
|
|
4602
4720
|
}
|
|
@@ -4605,7 +4723,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4605
4723
|
}))), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
4606
4724
|
variant: "contained",
|
|
4607
4725
|
onClick: function onClick() {
|
|
4608
|
-
return
|
|
4726
|
+
return _this35.onColumnsEditCustomDialogClose(true);
|
|
4609
4727
|
},
|
|
4610
4728
|
disabled: !this.state.customColumnDialogValueChanged,
|
|
4611
4729
|
color: "primary",
|
|
@@ -4614,7 +4732,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4614
4732
|
color: "grey",
|
|
4615
4733
|
variant: "contained",
|
|
4616
4734
|
onClick: function onClick() {
|
|
4617
|
-
return
|
|
4735
|
+
return _this35.onColumnsEditCustomDialogClose();
|
|
4618
4736
|
},
|
|
4619
4737
|
startIcon: /*#__PURE__*/_react["default"].createElement(_Close["default"], null)
|
|
4620
4738
|
}, this.props.t('ra_Cancel'))));
|
|
@@ -4638,14 +4756,14 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4638
4756
|
* @returns {JSX.Element | null}
|
|
4639
4757
|
*/
|
|
4640
4758
|
function renderCustomValue(obj, it, item) {
|
|
4641
|
-
var
|
|
4759
|
+
var _this36 = this;
|
|
4642
4760
|
var text = ObjectBrowser.getCustomValue(obj, it);
|
|
4643
4761
|
if (text !== null && text !== undefined) {
|
|
4644
4762
|
if (it.edit && !this.props.notEditable && (!it.objTypes || it.objTypes.includes(obj.type))) {
|
|
4645
4763
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
4646
4764
|
className: _Utils["default"].clsx(this.props.classes.columnCustom, this.props.classes.columnCustomEditable, this.props.classes["columnCustom_".concat(it.align)]),
|
|
4647
4765
|
onClick: function onClick() {
|
|
4648
|
-
return
|
|
4766
|
+
return _this36.setState({
|
|
4649
4767
|
columnsEditCustomDialog: {
|
|
4650
4768
|
item: item,
|
|
4651
4769
|
it: it,
|
|
@@ -4674,7 +4792,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4674
4792
|
}, {
|
|
4675
4793
|
key: "renderLeaf",
|
|
4676
4794
|
value: function renderLeaf(item, isExpanded, classes, counter) {
|
|
4677
|
-
var
|
|
4795
|
+
var _this37 = this,
|
|
4678
4796
|
_common$alias,
|
|
4679
4797
|
_common$alias2,
|
|
4680
4798
|
_this$states$id2,
|
|
@@ -4695,12 +4813,12 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4695
4813
|
iconFolder = isExpanded ? /*#__PURE__*/_react["default"].createElement(_IconOpen["default"], {
|
|
4696
4814
|
className: classes.cellIdIconFolder,
|
|
4697
4815
|
onClick: function onClick() {
|
|
4698
|
-
return
|
|
4816
|
+
return _this37.toggleExpanded(id);
|
|
4699
4817
|
}
|
|
4700
4818
|
}) : /*#__PURE__*/_react["default"].createElement(_IconClosed["default"], {
|
|
4701
4819
|
className: classes.cellIdIconFolder,
|
|
4702
4820
|
onClick: function onClick() {
|
|
4703
|
-
return
|
|
4821
|
+
return _this37.toggleExpanded(id);
|
|
4704
4822
|
}
|
|
4705
4823
|
});
|
|
4706
4824
|
} else if (obj.common && obj.common.write === false && obj.type === 'state') {
|
|
@@ -4735,18 +4853,18 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4735
4853
|
className: "itemIcon"
|
|
4736
4854
|
});
|
|
4737
4855
|
var paddingLeft = this.levelPadding * item.data.level;
|
|
4738
|
-
if (item.data.lang !== this.
|
|
4739
|
-
var _findRoomsForObject = findRoomsForObject(this.info, id, this.
|
|
4856
|
+
if (item.data.lang !== this.props.lang) {
|
|
4857
|
+
var _findRoomsForObject = findRoomsForObject(this.info, id, this.props.lang),
|
|
4740
4858
|
rooms = _findRoomsForObject.rooms,
|
|
4741
4859
|
per = _findRoomsForObject.per;
|
|
4742
4860
|
item.data.rooms = rooms.join(', ');
|
|
4743
4861
|
item.data.per = per;
|
|
4744
|
-
var _findFunctionsForObje = findFunctionsForObject(this.info, id, this.
|
|
4862
|
+
var _findFunctionsForObje = findFunctionsForObject(this.info, id, this.props.lang),
|
|
4745
4863
|
funcs = _findFunctionsForObje.funcs,
|
|
4746
4864
|
pef = _findFunctionsForObje.pef;
|
|
4747
4865
|
item.data.funcs = funcs.join(', ');
|
|
4748
4866
|
item.data.pef = pef;
|
|
4749
|
-
item.data.lang = this.
|
|
4867
|
+
item.data.lang = this.props.lang;
|
|
4750
4868
|
}
|
|
4751
4869
|
var checkbox = this.props.multiSelect && this.objects[id] && (!this.props.types || this.props.types.includes(this.objects[id].type)) ? /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], {
|
|
4752
4870
|
className: classes.checkBox,
|
|
@@ -4787,10 +4905,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4787
4905
|
onClick: function onClick(e) {
|
|
4788
4906
|
e.stopPropagation();
|
|
4789
4907
|
e.preventDefault();
|
|
4790
|
-
|
|
4908
|
+
_this37.onSelect(common.alias.id.read);
|
|
4791
4909
|
setTimeout(function () {
|
|
4792
|
-
|
|
4793
|
-
return
|
|
4910
|
+
_this37.expandAllSelected(function () {
|
|
4911
|
+
return _this37.scrollToItem(common.alias.id.read);
|
|
4794
4912
|
});
|
|
4795
4913
|
}, 100);
|
|
4796
4914
|
},
|
|
@@ -4799,10 +4917,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4799
4917
|
onClick: function onClick(e) {
|
|
4800
4918
|
e.stopPropagation();
|
|
4801
4919
|
e.preventDefault();
|
|
4802
|
-
|
|
4920
|
+
_this37.onSelect(common.alias.id.write);
|
|
4803
4921
|
setTimeout(function () {
|
|
4804
|
-
|
|
4805
|
-
return
|
|
4922
|
+
_this37.expandAllSelected(function () {
|
|
4923
|
+
return _this37.scrollToItem(common.alias.id.write);
|
|
4806
4924
|
});
|
|
4807
4925
|
}, 100);
|
|
4808
4926
|
},
|
|
@@ -4811,10 +4929,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4811
4929
|
onClick: function onClick(e) {
|
|
4812
4930
|
e.stopPropagation();
|
|
4813
4931
|
e.preventDefault();
|
|
4814
|
-
|
|
4932
|
+
_this37.onSelect(common.alias.id);
|
|
4815
4933
|
setTimeout(function () {
|
|
4816
|
-
|
|
4817
|
-
return
|
|
4934
|
+
_this37.expandAllSelected(function () {
|
|
4935
|
+
return _this37.scrollToItem(common.alias.id);
|
|
4818
4936
|
});
|
|
4819
4937
|
}, 100);
|
|
4820
4938
|
},
|
|
@@ -4846,17 +4964,17 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4846
4964
|
_id = "".concat(id, ".").concat(_id);
|
|
4847
4965
|
}
|
|
4848
4966
|
ids[name] = _id;
|
|
4849
|
-
if (!
|
|
4850
|
-
var
|
|
4851
|
-
if (((
|
|
4852
|
-
!
|
|
4853
|
-
|
|
4967
|
+
if (!_this37.states[_id]) {
|
|
4968
|
+
var _this37$objects$_id;
|
|
4969
|
+
if (((_this37$objects$_id = _this37.objects[_id]) === null || _this37$objects$_id === void 0 ? void 0 : _this37$objects$_id.type) === 'state') {
|
|
4970
|
+
!_this37.recordStates.includes(_id) && _this37.recordStates.push(_id);
|
|
4971
|
+
_this37.states[_id] = {
|
|
4854
4972
|
val: null
|
|
4855
4973
|
};
|
|
4856
|
-
|
|
4974
|
+
_this37.subscribe(_id);
|
|
4857
4975
|
}
|
|
4858
4976
|
} else {
|
|
4859
|
-
!
|
|
4977
|
+
!_this37.recordStates.includes(_id) && _this37.recordStates.push(_id);
|
|
4860
4978
|
}
|
|
4861
4979
|
});
|
|
4862
4980
|
// calculate color
|
|
@@ -4934,6 +5052,21 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4934
5052
|
}
|
|
4935
5053
|
}
|
|
4936
5054
|
var q = checkVisibleObjectType ? _Utils["default"].quality2text(((_this$states$id2 = this.states[id]) === null || _this$states$id2 === void 0 ? void 0 : _this$states$id2.q) || 0).join(', ') : null;
|
|
5055
|
+
var name = ((_item$data = item.data) === null || _item$data === void 0 ? void 0 : _item$data.title) || '';
|
|
5056
|
+
var useDesc;
|
|
5057
|
+
if (this.state.showDescription) {
|
|
5058
|
+
useDesc = getObjectTooltip(item.data, this.props.lang);
|
|
5059
|
+
if (useDesc) {
|
|
5060
|
+
name = [/*#__PURE__*/_react["default"].createElement("div", {
|
|
5061
|
+
key: "name",
|
|
5062
|
+
className: classes.cellNameDivDiv
|
|
5063
|
+
}, name), /*#__PURE__*/_react["default"].createElement("div", {
|
|
5064
|
+
key: "desc",
|
|
5065
|
+
className: classes.cellDescription
|
|
5066
|
+
}, useDesc)];
|
|
5067
|
+
useDesc = !!useDesc;
|
|
5068
|
+
}
|
|
5069
|
+
}
|
|
4937
5070
|
return /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
4938
5071
|
container: true,
|
|
4939
5072
|
direction: "row",
|
|
@@ -4942,13 +5075,13 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4942
5075
|
key: id,
|
|
4943
5076
|
id: id,
|
|
4944
5077
|
onClick: function onClick() {
|
|
4945
|
-
return
|
|
5078
|
+
return _this37.onSelect(id);
|
|
4946
5079
|
},
|
|
4947
5080
|
onDoubleClick: function onDoubleClick() {
|
|
4948
5081
|
if (!item.children) {
|
|
4949
|
-
|
|
5082
|
+
_this37.onSelect(id, true);
|
|
4950
5083
|
} else {
|
|
4951
|
-
|
|
5084
|
+
_this37.toggleExpanded(id);
|
|
4952
5085
|
}
|
|
4953
5086
|
}
|
|
4954
5087
|
}, /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
@@ -4975,7 +5108,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4975
5108
|
},
|
|
4976
5109
|
className: _Utils["default"].clsx(classes.cellIdSpan, invertBackground && classes.invertedBackground)
|
|
4977
5110
|
}, /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
|
|
4978
|
-
title: getIdFieldTooltip(item.data, this.props.classes, this.props.lang)
|
|
5111
|
+
title: getIdFieldTooltip(item.data, this.props.classes, this.props.lang),
|
|
5112
|
+
classes: {
|
|
5113
|
+
popper: this.props.classes.tooltip
|
|
5114
|
+
}
|
|
4979
5115
|
}, /*#__PURE__*/_react["default"].createElement("div", null, item.data.name)), alias, icons), /*#__PURE__*/_react["default"].createElement("div", {
|
|
4980
5116
|
className: _Utils["default"].clsx(classes.grow, invertBackground && classes.invertedBackgroundFlex)
|
|
4981
5117
|
}), /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
@@ -4985,21 +5121,21 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
4985
5121
|
}, iconItem), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_IconCopy["default"], {
|
|
4986
5122
|
className: _Utils["default"].clsx(classes.cellCopyButton, 'copyButton'),
|
|
4987
5123
|
onClick: function onClick(e) {
|
|
4988
|
-
return
|
|
5124
|
+
return _this37.onCopy(e, id);
|
|
4989
5125
|
}
|
|
4990
5126
|
}))), this.columnsVisibility.name ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
4991
|
-
className: classes.cellName,
|
|
5127
|
+
className: _Utils["default"].clsx(classes.cellName, useDesc && classes.cellNameWithDesc),
|
|
4992
5128
|
style: {
|
|
4993
5129
|
width: this.columnsVisibility.name
|
|
4994
5130
|
}
|
|
4995
|
-
},
|
|
5131
|
+
}, name, (_item$data2 = item.data) !== null && _item$data2 !== void 0 && _item$data2.title ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
4996
5132
|
style: {
|
|
4997
5133
|
color: checkColor
|
|
4998
5134
|
}
|
|
4999
5135
|
}, /*#__PURE__*/_react["default"].createElement(_IconCopy["default"], {
|
|
5000
5136
|
className: _Utils["default"].clsx(classes.cellCopyButton, 'copyButton'),
|
|
5001
5137
|
onClick: function onClick(e) {
|
|
5002
|
-
return
|
|
5138
|
+
return _this37.onCopy(e, item.data.title);
|
|
5003
5139
|
}
|
|
5004
5140
|
})) : null) : null, !this.state.statesView ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, this.columnsVisibility.type ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
5005
5141
|
className: classes.cellType,
|
|
@@ -5013,7 +5149,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
5013
5149
|
cursor: this.state.filter.expertMode && enumEditable && this.props.objectBrowserEditRole ? 'text' : 'default'
|
|
5014
5150
|
},
|
|
5015
5151
|
onClick: this.state.filter.expertMode && enumEditable && this.props.objectBrowserEditRole ? function () {
|
|
5016
|
-
return
|
|
5152
|
+
return _this37.setState({
|
|
5017
5153
|
roleDialog: item.data.id
|
|
5018
5154
|
});
|
|
5019
5155
|
} : undefined
|
|
@@ -5024,8 +5160,8 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
5024
5160
|
cursor: enumEditable ? 'text' : 'default'
|
|
5025
5161
|
},
|
|
5026
5162
|
onClick: enumEditable ? function () {
|
|
5027
|
-
var enums = findEnumsForObjectAsIds(
|
|
5028
|
-
|
|
5163
|
+
var enums = findEnumsForObjectAsIds(_this37.info, item.data.id, 'roomEnums');
|
|
5164
|
+
_this37.setState({
|
|
5029
5165
|
enumDialogEnums: enums,
|
|
5030
5166
|
enumDialog: {
|
|
5031
5167
|
item: item,
|
|
@@ -5041,8 +5177,8 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
5041
5177
|
cursor: enumEditable ? 'text' : 'default'
|
|
5042
5178
|
},
|
|
5043
5179
|
onClick: enumEditable ? function () {
|
|
5044
|
-
var enums = findEnumsForObjectAsIds(
|
|
5045
|
-
|
|
5180
|
+
var enums = findEnumsForObjectAsIds(_this37.info, item.data.id, 'funcEnums');
|
|
5181
|
+
_this37.setState({
|
|
5046
5182
|
enumDialogEnums: enums,
|
|
5047
5183
|
enumDialog: {
|
|
5048
5184
|
item: item,
|
|
@@ -5077,11 +5213,11 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
5077
5213
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
5078
5214
|
className: classes.cellAdapter,
|
|
5079
5215
|
style: {
|
|
5080
|
-
width:
|
|
5216
|
+
width: _this37.columnsVisibility[it.id]
|
|
5081
5217
|
},
|
|
5082
5218
|
key: it.id,
|
|
5083
5219
|
title: "".concat(it.adapter, " => ").concat(it.pathText)
|
|
5084
|
-
},
|
|
5220
|
+
}, _this37.renderCustomValue(obj, it, item));
|
|
5085
5221
|
}), this.columnsVisibility.val ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
5086
5222
|
className: classes.cellValue,
|
|
5087
5223
|
style: {
|
|
@@ -5089,26 +5225,26 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
5089
5225
|
cursor: valueEditable ? (common === null || common === void 0 ? void 0 : common.type) === 'file' ? 'zoom-in' : item.data.button ? 'grab' : 'text' : 'default'
|
|
5090
5226
|
},
|
|
5091
5227
|
onClick: valueEditable ? function () {
|
|
5092
|
-
if (!obj || !
|
|
5228
|
+
if (!obj || !_this37.states) {
|
|
5093
5229
|
// return;
|
|
5094
5230
|
} else if ((common === null || common === void 0 ? void 0 : common.type) === 'file') {
|
|
5095
|
-
|
|
5231
|
+
_this37.setState({
|
|
5096
5232
|
viewFileDialog: id
|
|
5097
5233
|
});
|
|
5098
5234
|
} else
|
|
5099
5235
|
// in non-expert mode control button directly
|
|
5100
|
-
if (!
|
|
5101
|
-
|
|
5236
|
+
if (!_this37.state.filter.expertMode && item.data.button) {
|
|
5237
|
+
_this37.props.socket.setState(id, true)["catch"](function (e) {
|
|
5102
5238
|
return window.alert("Cannot write state \"".concat(id, "\": ").concat(e));
|
|
5103
5239
|
});
|
|
5104
5240
|
} else {
|
|
5105
|
-
|
|
5106
|
-
val:
|
|
5107
|
-
q:
|
|
5241
|
+
_this37.edit = {
|
|
5242
|
+
val: _this37.states[id] ? _this37.states[id].val : '',
|
|
5243
|
+
q: _this37.states[id] ? _this37.states[id].q || 0 : 0,
|
|
5108
5244
|
ack: false,
|
|
5109
5245
|
id: id
|
|
5110
5246
|
};
|
|
5111
|
-
|
|
5247
|
+
_this37.setState({
|
|
5112
5248
|
updateOpened: true
|
|
5113
5249
|
});
|
|
5114
5250
|
}
|
|
@@ -5132,7 +5268,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
5132
5268
|
}, {
|
|
5133
5269
|
key: "renderItem",
|
|
5134
5270
|
value: function renderItem(root, isExpanded, classes, counter) {
|
|
5135
|
-
var
|
|
5271
|
+
var _this38 = this;
|
|
5136
5272
|
var items = [];
|
|
5137
5273
|
counter = counter || {
|
|
5138
5274
|
count: 0
|
|
@@ -5160,9 +5296,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
5160
5296
|
if (!this.state.foldersFirst) {
|
|
5161
5297
|
root.children && items.push(root.children.map(function (item) {
|
|
5162
5298
|
// do not render too many items in column editor mode
|
|
5163
|
-
if (!
|
|
5299
|
+
if (!_this38.state.columnsSelectorShow || counter.count < 15) {
|
|
5164
5300
|
if (item.data.sumVisibility) {
|
|
5165
|
-
return
|
|
5301
|
+
return _this38.renderItem(item, undefined, classes, counter);
|
|
5166
5302
|
}
|
|
5167
5303
|
}
|
|
5168
5304
|
return null;
|
|
@@ -5172,9 +5308,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
5172
5308
|
root.children && items.push(root.children.map(function (item) {
|
|
5173
5309
|
if (item.children) {
|
|
5174
5310
|
// do not render too many items in column editor mode
|
|
5175
|
-
if (!
|
|
5311
|
+
if (!_this38.state.columnsSelectorShow || counter.count < 15) {
|
|
5176
5312
|
if (item.data.sumVisibility) {
|
|
5177
|
-
return
|
|
5313
|
+
return _this38.renderItem(item, undefined, classes, counter);
|
|
5178
5314
|
}
|
|
5179
5315
|
}
|
|
5180
5316
|
}
|
|
@@ -5184,9 +5320,9 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
5184
5320
|
root.children && items.push(root.children.map(function (item) {
|
|
5185
5321
|
if (!item.children) {
|
|
5186
5322
|
// do not render too many items in column editor mode
|
|
5187
|
-
if (!
|
|
5323
|
+
if (!_this38.state.columnsSelectorShow || counter.count < 15) {
|
|
5188
5324
|
if (item.data.sumVisibility) {
|
|
5189
|
-
return
|
|
5325
|
+
return _this38.renderItem(item, undefined, classes, counter);
|
|
5190
5326
|
}
|
|
5191
5327
|
}
|
|
5192
5328
|
}
|
|
@@ -5207,7 +5343,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
5207
5343
|
}, {
|
|
5208
5344
|
key: "calculateColumnsVisibility",
|
|
5209
5345
|
value: function calculateColumnsVisibility(columnsAuto, columns, columnsForAdmin, columnsWidths) {
|
|
5210
|
-
var
|
|
5346
|
+
var _this39 = this;
|
|
5211
5347
|
columnsWidths = columnsWidths || this.state.columnsWidths;
|
|
5212
5348
|
columnsForAdmin = columnsForAdmin || this.state.columnsForAdmin;
|
|
5213
5349
|
columns = columns || this.state.columns || [];
|
|
@@ -5291,7 +5427,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
5291
5427
|
Object.keys(columnsForAdmin).sort().forEach(function (adapter) {
|
|
5292
5428
|
return columnsForAdmin[adapter].forEach(function (column) {
|
|
5293
5429
|
var id = "_".concat(adapter, "_").concat(column.path);
|
|
5294
|
-
|
|
5430
|
+
_this39.columnsVisibility[id] = columns.includes(id);
|
|
5295
5431
|
if (columns.includes(id)) {
|
|
5296
5432
|
var item = {
|
|
5297
5433
|
adapter: adapter,
|
|
@@ -5309,11 +5445,11 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
5309
5445
|
item.objTypes = column.objTypes;
|
|
5310
5446
|
}
|
|
5311
5447
|
}
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
_widthSum2 +=
|
|
5448
|
+
_this39.adapterColumns.push(item);
|
|
5449
|
+
_this39.columnsVisibility[id] = columnsWidths[item.id] || column.width || SCREEN_WIDTHS[_this39.props.width].widths.func || SCREEN_WIDTHS.xl.widths.func;
|
|
5450
|
+
_widthSum2 += _this39.columnsVisibility[id];
|
|
5315
5451
|
} else {
|
|
5316
|
-
|
|
5452
|
+
_this39.columnsVisibility[id] = 0;
|
|
5317
5453
|
}
|
|
5318
5454
|
});
|
|
5319
5455
|
});
|
|
@@ -5334,10 +5470,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
5334
5470
|
this.columnsVisibility.nameHeader = "calc(100% - ".concat(_widthSum2 + 5 + this.state.scrollBarWidth, "px)");
|
|
5335
5471
|
} else {
|
|
5336
5472
|
var newWidth = Object.keys(this.columnsVisibility).reduce(function (accumulator, name) {
|
|
5337
|
-
if (name === 'id' || typeof
|
|
5473
|
+
if (name === 'id' || typeof _this39.columnsVisibility[name] === 'string' || !_this39.columnsVisibility[name]) {
|
|
5338
5474
|
return accumulator;
|
|
5339
5475
|
}
|
|
5340
|
-
return accumulator +
|
|
5476
|
+
return accumulator + _this39.columnsVisibility[name];
|
|
5341
5477
|
}, 0);
|
|
5342
5478
|
this.columnsVisibility.id = "calc(100% - ".concat(newWidth, "px)");
|
|
5343
5479
|
}
|
|
@@ -5351,13 +5487,13 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
5351
5487
|
* @returns {JSX.Element}
|
|
5352
5488
|
*/
|
|
5353
5489
|
function renderHeader() {
|
|
5354
|
-
var
|
|
5490
|
+
var _this40 = this;
|
|
5355
5491
|
var classes = this.props.classes;
|
|
5356
5492
|
var filterClearInValue = null;
|
|
5357
5493
|
if (!this.columnsVisibility.buttons && !this.isFilterEmpty()) {
|
|
5358
5494
|
filterClearInValue = /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
5359
5495
|
onClick: function onClick() {
|
|
5360
|
-
return
|
|
5496
|
+
return _this40.clearFilter();
|
|
5361
5497
|
},
|
|
5362
5498
|
className: classes.buttonClearFilter,
|
|
5363
5499
|
title: this.props.t('ra_Clear filter'),
|
|
@@ -5448,7 +5584,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
5448
5584
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
5449
5585
|
className: _Utils["default"].clsx(classes.headerCell, classes.headerCellValue),
|
|
5450
5586
|
style: {
|
|
5451
|
-
width:
|
|
5587
|
+
width: _this40.columnsVisibility[item.id]
|
|
5452
5588
|
},
|
|
5453
5589
|
title: item.adapter,
|
|
5454
5590
|
key: item.id,
|
|
@@ -5484,17 +5620,17 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
5484
5620
|
}, {
|
|
5485
5621
|
key: "renderToast",
|
|
5486
5622
|
value: function renderToast() {
|
|
5487
|
-
var
|
|
5623
|
+
var _this41 = this;
|
|
5488
5624
|
return /*#__PURE__*/_react["default"].createElement(_Snackbar["default"], {
|
|
5489
5625
|
open: !!this.state.toast,
|
|
5490
5626
|
autoHideDuration: 3000,
|
|
5491
5627
|
onClick: function onClick() {
|
|
5492
|
-
return
|
|
5628
|
+
return _this41.setState({
|
|
5493
5629
|
toast: ''
|
|
5494
5630
|
});
|
|
5495
5631
|
},
|
|
5496
5632
|
onClose: function onClose() {
|
|
5497
|
-
return
|
|
5633
|
+
return _this41.setState({
|
|
5498
5634
|
toast: ''
|
|
5499
5635
|
});
|
|
5500
5636
|
},
|
|
@@ -5504,7 +5640,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
5504
5640
|
"aria-label": "close",
|
|
5505
5641
|
color: "inherit",
|
|
5506
5642
|
onClick: function onClick() {
|
|
5507
|
-
return
|
|
5643
|
+
return _this41.setState({
|
|
5508
5644
|
toast: ''
|
|
5509
5645
|
});
|
|
5510
5646
|
}
|
|
@@ -5520,12 +5656,12 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
5520
5656
|
}, {
|
|
5521
5657
|
key: "componentDidUpdate",
|
|
5522
5658
|
value: function componentDidUpdate() {
|
|
5523
|
-
var
|
|
5659
|
+
var _this42 = this;
|
|
5524
5660
|
if (this.tableRef.current) {
|
|
5525
5661
|
var scrollBarWidth = this.tableRef.current.offsetWidth - this.tableRef.current.clientWidth;
|
|
5526
5662
|
if (this.state.scrollBarWidth !== scrollBarWidth) {
|
|
5527
5663
|
setTimeout(function () {
|
|
5528
|
-
return
|
|
5664
|
+
return _this42.setState({
|
|
5529
5665
|
scrollBarWidth: scrollBarWidth
|
|
5530
5666
|
});
|
|
5531
5667
|
}, 100);
|
|
@@ -5553,12 +5689,12 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
5553
5689
|
}, {
|
|
5554
5690
|
key: "renderCustomDialog",
|
|
5555
5691
|
value: function renderCustomDialog() {
|
|
5556
|
-
var
|
|
5692
|
+
var _this43 = this;
|
|
5557
5693
|
if (this.state.customDialog && this.props.objectCustomDialog) {
|
|
5558
5694
|
var ObjectCustomDialog = this.props.objectCustomDialog;
|
|
5559
5695
|
return /*#__PURE__*/_react["default"].createElement(ObjectCustomDialog, {
|
|
5560
5696
|
reportChangedIds: function reportChangedIds(changedIds) {
|
|
5561
|
-
return
|
|
5697
|
+
return _this43.changedIds = (0, _toConsumableArray2["default"])(changedIds);
|
|
5562
5698
|
},
|
|
5563
5699
|
objectIDs: this.state.customDialog,
|
|
5564
5700
|
expertMode: this.state.filter.expertMode,
|
|
@@ -5572,16 +5708,16 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
5572
5708
|
objects: this.objects,
|
|
5573
5709
|
customsInstances: this.info.customs,
|
|
5574
5710
|
onClose: function onClose() {
|
|
5575
|
-
|
|
5576
|
-
|
|
5711
|
+
_this43.pauseSubscribe(false);
|
|
5712
|
+
_this43.setState({
|
|
5577
5713
|
customDialog: null
|
|
5578
5714
|
});
|
|
5579
|
-
if (
|
|
5580
|
-
|
|
5715
|
+
if (_this43.changedIds) {
|
|
5716
|
+
_this43.changedIds = null;
|
|
5581
5717
|
// update all changed IDs
|
|
5582
|
-
|
|
5718
|
+
_this43.forceUpdate();
|
|
5583
5719
|
}
|
|
5584
|
-
|
|
5720
|
+
_this43.props.router && _this43.props.router.doNavigate('tab-objects');
|
|
5585
5721
|
}
|
|
5586
5722
|
});
|
|
5587
5723
|
}
|
|
@@ -5595,14 +5731,14 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
5595
5731
|
}, {
|
|
5596
5732
|
key: "onUpdate",
|
|
5597
5733
|
value: function onUpdate(valAck) {
|
|
5598
|
-
var
|
|
5734
|
+
var _this44 = this;
|
|
5599
5735
|
this.props.socket.setState(this.edit.id, {
|
|
5600
5736
|
val: valAck.val,
|
|
5601
5737
|
ack: valAck.ack,
|
|
5602
5738
|
q: valAck.q || 0,
|
|
5603
5739
|
expire: valAck.expire || undefined
|
|
5604
5740
|
})["catch"](function (e) {
|
|
5605
|
-
return
|
|
5741
|
+
return _this44.showError("Cannot write value: ".concat(e));
|
|
5606
5742
|
});
|
|
5607
5743
|
}
|
|
5608
5744
|
|
|
@@ -5613,7 +5749,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
5613
5749
|
}, {
|
|
5614
5750
|
key: "renderEditObjectDialog",
|
|
5615
5751
|
value: function renderEditObjectDialog() {
|
|
5616
|
-
var
|
|
5752
|
+
var _this45 = this;
|
|
5617
5753
|
if (!this.state.editObjectDialog || !this.props.objectBrowserEditObject) {
|
|
5618
5754
|
return null;
|
|
5619
5755
|
}
|
|
@@ -5631,37 +5767,37 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
5631
5767
|
t: this.props.t,
|
|
5632
5768
|
expertMode: this.state.filter.expertMode,
|
|
5633
5769
|
onNewObject: function onNewObject(obj) {
|
|
5634
|
-
return
|
|
5635
|
-
return
|
|
5770
|
+
return _this45.props.socket.setObject(obj._id, obj).then(function () {
|
|
5771
|
+
return _this45.setState({
|
|
5636
5772
|
editObjectDialog: obj._id
|
|
5637
5773
|
}, function () {
|
|
5638
|
-
return
|
|
5774
|
+
return _this45.onSelect(obj._id);
|
|
5639
5775
|
});
|
|
5640
5776
|
})["catch"](function (e) {
|
|
5641
|
-
return
|
|
5777
|
+
return _this45.showError("Cannot write object: ".concat(e));
|
|
5642
5778
|
});
|
|
5643
5779
|
},
|
|
5644
5780
|
onClose: function onClose(obj) {
|
|
5645
5781
|
if (obj) {
|
|
5646
5782
|
var updateAlias;
|
|
5647
|
-
if (
|
|
5648
|
-
var
|
|
5649
|
-
if (JSON.stringify((
|
|
5650
|
-
updateAlias =
|
|
5783
|
+
if (_this45.state.editObjectDialog.startsWith('alias.')) {
|
|
5784
|
+
var _this45$objects$_this, _obj$common5;
|
|
5785
|
+
if (JSON.stringify((_this45$objects$_this = _this45.objects[_this45.state.editObjectDialog].common) === null || _this45$objects$_this === void 0 ? void 0 : _this45$objects$_this.alias) !== JSON.stringify((_obj$common5 = obj.common) === null || _obj$common5 === void 0 ? void 0 : _obj$common5.alias)) {
|
|
5786
|
+
updateAlias = _this45.state.editObjectDialog;
|
|
5651
5787
|
}
|
|
5652
5788
|
}
|
|
5653
|
-
|
|
5654
|
-
if (updateAlias &&
|
|
5655
|
-
|
|
5789
|
+
_this45.props.socket.setObject(obj._id, obj).then(function () {
|
|
5790
|
+
if (updateAlias && _this45.subscribes.includes(updateAlias)) {
|
|
5791
|
+
_this45.unsubscribe(updateAlias);
|
|
5656
5792
|
setTimeout(function () {
|
|
5657
|
-
return
|
|
5793
|
+
return _this45.subscribe(updateAlias);
|
|
5658
5794
|
}, 100);
|
|
5659
5795
|
}
|
|
5660
5796
|
})["catch"](function (e) {
|
|
5661
|
-
return
|
|
5797
|
+
return _this45.showError("Cannot write object: ".concat(e));
|
|
5662
5798
|
});
|
|
5663
5799
|
}
|
|
5664
|
-
|
|
5800
|
+
_this45.setState({
|
|
5665
5801
|
editObjectDialog: ''
|
|
5666
5802
|
});
|
|
5667
5803
|
}
|
|
@@ -5675,7 +5811,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
5675
5811
|
}, {
|
|
5676
5812
|
key: "renderViewObjectFileDialog",
|
|
5677
5813
|
value: function renderViewObjectFileDialog() {
|
|
5678
|
-
var
|
|
5814
|
+
var _this46 = this;
|
|
5679
5815
|
if (!this.state.viewFileDialog || !this.props.objectBrowserViewFile) {
|
|
5680
5816
|
return null;
|
|
5681
5817
|
}
|
|
@@ -5689,7 +5825,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
5689
5825
|
t: this.props.t,
|
|
5690
5826
|
expertMode: this.state.filter.expertMode,
|
|
5691
5827
|
onClose: function onClose() {
|
|
5692
|
-
return
|
|
5828
|
+
return _this46.setState({
|
|
5693
5829
|
viewFileDialog: ''
|
|
5694
5830
|
});
|
|
5695
5831
|
}
|
|
@@ -5704,7 +5840,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
5704
5840
|
key: "renderEditValueDialog",
|
|
5705
5841
|
value: function renderEditValueDialog() {
|
|
5706
5842
|
var _this$objects$this$ed,
|
|
5707
|
-
|
|
5843
|
+
_this47 = this;
|
|
5708
5844
|
if (!this.state.updateOpened || !this.props.objectBrowserValue) {
|
|
5709
5845
|
return null;
|
|
5710
5846
|
}
|
|
@@ -5731,10 +5867,10 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
5731
5867
|
defaultHistory: this.defaultHistory,
|
|
5732
5868
|
dateFormat: this.props.dateFormat,
|
|
5733
5869
|
onClose: function onClose(res) {
|
|
5734
|
-
|
|
5870
|
+
_this47.setState({
|
|
5735
5871
|
updateOpened: false
|
|
5736
5872
|
});
|
|
5737
|
-
res &&
|
|
5873
|
+
res && _this47.onUpdate(res);
|
|
5738
5874
|
}
|
|
5739
5875
|
});
|
|
5740
5876
|
}
|
|
@@ -5746,7 +5882,7 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
5746
5882
|
* @returns {JSX.Element}
|
|
5747
5883
|
*/
|
|
5748
5884
|
function render() {
|
|
5749
|
-
var
|
|
5885
|
+
var _this48 = this;
|
|
5750
5886
|
this.recordStates = [];
|
|
5751
5887
|
this.unsubscribeTimer && clearTimeout(this.unsubscribeTimer);
|
|
5752
5888
|
|
|
@@ -5756,16 +5892,16 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
5756
5892
|
var counter = {
|
|
5757
5893
|
count: 0
|
|
5758
5894
|
};
|
|
5759
|
-
applyFilter(this.root, this.state.filter, this.
|
|
5895
|
+
applyFilter(this.root, this.state.filter, this.props.lang, this.objects, null, counter, this.props.customFilter, this.props.types);
|
|
5760
5896
|
if (counter.count < 500 && !this.state.expandAllVisible) {
|
|
5761
5897
|
setTimeout(function () {
|
|
5762
|
-
return
|
|
5898
|
+
return _this48.setState({
|
|
5763
5899
|
expandAllVisible: true
|
|
5764
5900
|
});
|
|
5765
5901
|
});
|
|
5766
5902
|
} else if (counter.count >= 500 && this.state.expandAllVisible) {
|
|
5767
5903
|
setTimeout(function () {
|
|
5768
|
-
return
|
|
5904
|
+
return _this48.setState({
|
|
5769
5905
|
expandAllVisible: false
|
|
5770
5906
|
});
|
|
5771
5907
|
});
|
|
@@ -5773,8 +5909,8 @@ var ObjectBrowser = /*#__PURE__*/function (_Component) {
|
|
|
5773
5909
|
this.lastAppliedFilter = jsonFilter;
|
|
5774
5910
|
}
|
|
5775
5911
|
this.unsubscribeTimer = setTimeout(function () {
|
|
5776
|
-
|
|
5777
|
-
|
|
5912
|
+
_this48.unsubscribeTimer = null;
|
|
5913
|
+
_this48.checkUnsubscribes();
|
|
5778
5914
|
}, 200);
|
|
5779
5915
|
if (!this.state.loaded) {
|
|
5780
5916
|
return /*#__PURE__*/_react["default"].createElement(_CircularProgress["default"], {
|