@iobroker/adapter-react-v5 2.1.6 → 2.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Components/404.js +17 -25
- package/Components/404.js.map +1 -1
- package/Components/ColorPicker.js +25 -35
- package/Components/ColorPicker.js.map +1 -1
- package/Components/ComplexCron.js +29 -37
- package/Components/ComplexCron.js.map +1 -1
- package/Components/FileBrowser.js +41 -62
- package/Components/FileBrowser.js.map +1 -1
- package/Components/FileViewer.js +18 -28
- package/Components/FileViewer.js.map +1 -1
- package/Components/Icon.js +15 -25
- package/Components/Icon.js.map +1 -1
- package/Components/IconPicker.js +6 -6
- package/Components/IconPicker.js.map +1 -1
- package/Components/IconSelector.js +25 -31
- package/Components/IconSelector.js.map +1 -1
- package/Components/Image.js +15 -25
- package/Components/Image.js.map +1 -1
- package/Components/Loader.js +14 -24
- package/Components/Loader.js.map +1 -1
- package/Components/Loaders/PT.js +13 -23
- package/Components/Loaders/PT.js.map +1 -1
- package/Components/Loaders/Vendor.js +14 -24
- package/Components/Loaders/Vendor.js.map +1 -1
- package/Components/Logo.js +18 -28
- package/Components/Logo.js.map +1 -1
- package/Components/MDUtils.js +14 -11
- package/Components/MDUtils.js.map +1 -1
- package/Components/ObjectBrowser.js +150 -238
- package/Components/ObjectBrowser.js.map +1 -1
- package/Components/Router.js +13 -21
- package/Components/Router.js.map +1 -1
- package/Components/SaveCloseButtons.js +15 -25
- package/Components/SaveCloseButtons.js.map +1 -1
- package/Components/Schedule.js +23 -37
- package/Components/Schedule.js.map +1 -1
- package/Components/SelectWithIcon.js +18 -26
- package/Components/SelectWithIcon.js.map +1 -1
- package/Components/SimpleCron/cron2text.js.map +1 -1
- package/Components/SimpleCron/cronText.js +2 -2
- package/Components/SimpleCron/cronText.js.map +1 -1
- package/Components/SimpleCron/index.js +24 -34
- package/Components/SimpleCron/index.js.map +1 -1
- package/Components/SimpleCron/jquery.cron.locale.js.map +1 -1
- package/Components/TabContainer.js +18 -28
- package/Components/TabContainer.js.map +1 -1
- package/Components/TabContent.js +17 -27
- package/Components/TabContent.js.map +1 -1
- package/Components/TabHeader.js +13 -23
- package/Components/TabHeader.js.map +1 -1
- package/Components/TextWithIcon.js +5 -5
- package/Components/TextWithIcon.js.map +1 -1
- package/Components/ToggleThemeMenu.js +2 -2
- package/Components/ToggleThemeMenu.js.map +1 -1
- package/Components/TreeTable.js +21 -42
- package/Components/TreeTable.js.map +1 -1
- package/Components/Utils.js +34 -42
- package/Components/Utils.js.map +1 -1
- package/Components/copy-to-clipboard.js.map +1 -1
- package/Components/withWidth.js +42 -0
- package/Components/withWidth.js.map +1 -0
- package/Connection.js +20 -23
- package/Connection.js.map +1 -1
- package/Dialogs/ComplexCron.js +15 -25
- package/Dialogs/ComplexCron.js.map +1 -1
- package/Dialogs/Confirm.js +15 -25
- package/Dialogs/Confirm.js.map +1 -1
- package/Dialogs/Cron.js +19 -27
- package/Dialogs/Cron.js.map +1 -1
- package/Dialogs/Error.js +15 -25
- package/Dialogs/Error.js.map +1 -1
- package/Dialogs/Message.js +15 -25
- package/Dialogs/Message.js.map +1 -1
- package/Dialogs/SelectID.js +19 -27
- package/Dialogs/SelectID.js.map +1 -1
- package/Dialogs/SimpleCron.js +15 -25
- package/Dialogs/SimpleCron.js.map +1 -1
- package/Dialogs/TextInput.js +18 -28
- package/Dialogs/TextInput.js.map +1 -1
- package/GenericApp.js +41 -50
- package/GenericApp.js.map +1 -1
- package/Prompt.js.map +1 -1
- package/README.md +12 -0
- package/Theme.js +2 -2
- package/Theme.js.map +1 -1
- package/i18n/de.json +3 -3
- package/i18n/en.json +3 -3
- package/i18n/es.json +3 -3
- package/i18n/fr.json +3 -3
- package/i18n/it.json +3 -3
- package/i18n/nl.json +3 -3
- package/i18n/pl.json +3 -3
- package/i18n/pt.json +3 -3
- package/i18n/ru.json +3 -3
- package/i18n/zh-cn.json +3 -3
- package/i18n.js +22 -13
- package/i18n.js.map +1 -1
- package/icons/IconAdapter.js +2 -2
- package/icons/IconAdapter.js.map +1 -1
- package/icons/IconAlias.js +2 -2
- package/icons/IconAlias.js.map +1 -1
- package/icons/IconChannel.js +2 -2
- package/icons/IconChannel.js.map +1 -1
- package/icons/IconClearFilter.js +2 -2
- package/icons/IconClearFilter.js.map +1 -1
- package/icons/IconClosed.js +2 -2
- package/icons/IconClosed.js.map +1 -1
- package/icons/IconCopy.js +2 -2
- package/icons/IconCopy.js.map +1 -1
- package/icons/IconDevice.js +2 -2
- package/icons/IconDevice.js.map +1 -1
- package/icons/IconDocument.js +2 -2
- package/icons/IconDocument.js.map +1 -1
- package/icons/IconExpert.js +2 -2
- package/icons/IconExpert.js.map +1 -1
- package/icons/IconFx.js +2 -2
- package/icons/IconFx.js.map +1 -1
- package/icons/IconInstance.js +2 -2
- package/icons/IconInstance.js.map +1 -1
- package/icons/IconLogout.js +2 -2
- package/icons/IconLogout.js.map +1 -1
- package/icons/IconOpen.js +2 -2
- package/icons/IconOpen.js.map +1 -1
- package/icons/IconState.js +6 -6
- package/icons/IconState.js.map +1 -1
- package/package.json +10 -10
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
12
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
13
|
+
|
|
14
|
+
var _styles = require("@mui/material/styles");
|
|
15
|
+
|
|
16
|
+
var _useMediaQuery = _interopRequireDefault(require("@mui/material/useMediaQuery"));
|
|
17
|
+
|
|
18
|
+
function useWidth() {
|
|
19
|
+
var theme = (0, _styles.useTheme)();
|
|
20
|
+
var keys = (0, _toConsumableArray2["default"])(theme.breakpoints.keys).reverse();
|
|
21
|
+
return keys.reduce(function (output, key) {
|
|
22
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
23
|
+
var matches = (0, _useMediaQuery["default"])(theme.breakpoints.up(key));
|
|
24
|
+
return !output && matches ? key : output;
|
|
25
|
+
}, null) || 'xs';
|
|
26
|
+
} // FIXME checkout https://mui.com/components/use-media-query/#migrating-from-withwidth
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
var withWidth = function withWidth() {
|
|
30
|
+
return function (WrappedComponent) {
|
|
31
|
+
return function (props) {
|
|
32
|
+
var width = useWidth();
|
|
33
|
+
return /*#__PURE__*/React.createElement(WrappedComponent, (0, _extends2["default"])({}, props, {
|
|
34
|
+
width: width
|
|
35
|
+
}));
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
var _default = withWidth;
|
|
41
|
+
exports["default"] = _default;
|
|
42
|
+
//# sourceMappingURL=withWidth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withWidth.js","names":["useWidth","theme","useTheme","keys","breakpoints","reverse","reduce","output","key","matches","useMediaQuery","up","withWidth","WrappedComponent","props","width"],"sources":["withWidth.js"],"sourcesContent":["import { useTheme } from '@mui/material/styles';\nimport useMediaQuery from '@mui/material/useMediaQuery';\n\nfunction useWidth() {\n const theme = useTheme();\n const keys = [...theme.breakpoints.keys].reverse();\n return keys.reduce((output, key) => {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const matches = useMediaQuery(theme.breakpoints.up(key));\n return !output && matches ? key : output;\n }, null) || 'xs';\n}\n\n// FIXME checkout https://mui.com/components/use-media-query/#migrating-from-withwidth\nconst withWidth = () => WrappedComponent => props => {\n const width = useWidth();\n return <WrappedComponent {...props} width={width} />;\n};\n\nexport default withWidth;"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AAEA,SAASA,QAAT,GAAoB;EAChB,IAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EACA,IAAMC,IAAI,GAAG,oCAAIF,KAAK,CAACG,WAAN,CAAkBD,IAAtB,EAA4BE,OAA5B,EAAb;EACA,OAAOF,IAAI,CAACG,MAAL,CAAY,UAACC,MAAD,EAASC,GAAT,EAAiB;IAChC;IACA,IAAMC,OAAO,GAAG,IAAAC,yBAAA,EAAcT,KAAK,CAACG,WAAN,CAAkBO,EAAlB,CAAqBH,GAArB,CAAd,CAAhB;IACA,OAAO,CAACD,MAAD,IAAWE,OAAX,GAAqBD,GAArB,GAA2BD,MAAlC;EACH,CAJM,EAIJ,IAJI,KAIK,IAJZ;AAKH,C,CAED;;;AACA,IAAMK,SAAS,GAAG,SAAZA,SAAY;EAAA,OAAM,UAAAC,gBAAgB;IAAA,OAAI,UAAAC,KAAK,EAAI;MACjD,IAAMC,KAAK,GAAGf,QAAQ,EAAtB;MACA,oBAAO,oBAAC,gBAAD,gCAAsBc,KAAtB;QAA6B,KAAK,EAAEC;MAApC,GAAP;IACH,CAHuC;EAAA,CAAtB;AAAA,CAAlB;;eAKeH,S"}
|
package/Connection.js
CHANGED
|
@@ -1,31 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports["default"] = exports.PROGRESS = exports.ERRORS = void 0;
|
|
7
9
|
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
-
|
|
12
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
13
|
-
|
|
14
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
15
|
-
|
|
16
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
17
|
-
|
|
18
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
19
11
|
|
|
20
|
-
|
|
12
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
21
13
|
|
|
22
|
-
|
|
14
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
23
15
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
16
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
27
17
|
|
|
28
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Copyright 2020-2022, bluefox <dogafox@gmail.com>
|
|
20
|
+
*
|
|
21
|
+
* MIT License
|
|
22
|
+
*
|
|
23
|
+
**/
|
|
29
24
|
|
|
30
25
|
/** Possible progress states. */
|
|
31
26
|
var PROGRESS = {
|
|
@@ -96,8 +91,7 @@ var Connection = /*#__PURE__*/function () {
|
|
|
96
91
|
function Connection(props) {
|
|
97
92
|
var _this = this;
|
|
98
93
|
|
|
99
|
-
|
|
100
|
-
|
|
94
|
+
(0, _classCallCheck2["default"])(this, Connection);
|
|
101
95
|
props = props || {
|
|
102
96
|
protocol: window.location.protocol,
|
|
103
97
|
host: window.location.hostname
|
|
@@ -183,7 +177,7 @@ var Connection = /*#__PURE__*/function () {
|
|
|
183
177
|
*/
|
|
184
178
|
|
|
185
179
|
|
|
186
|
-
|
|
180
|
+
(0, _createClass2["default"])(Connection, [{
|
|
187
181
|
key: "startSocket",
|
|
188
182
|
value:
|
|
189
183
|
/**
|
|
@@ -254,7 +248,7 @@ var Connection = /*#__PURE__*/function () {
|
|
|
254
248
|
setTimeout(function () {
|
|
255
249
|
return _this2.getVersion().then(function (info) {
|
|
256
250
|
var _info$version$split = info.version.split('.'),
|
|
257
|
-
_info$version$split2 =
|
|
251
|
+
_info$version$split2 = (0, _slicedToArray2["default"])(_info$version$split, 3),
|
|
258
252
|
major = _info$version$split2[0],
|
|
259
253
|
minor = _info$version$split2[1],
|
|
260
254
|
patch = _info$version$split2[2];
|
|
@@ -2757,9 +2751,13 @@ var Connection = /*#__PURE__*/function () {
|
|
|
2757
2751
|
|
|
2758
2752
|
}, {
|
|
2759
2753
|
key: "getVersion",
|
|
2760
|
-
value: function getVersion() {
|
|
2754
|
+
value: function getVersion(update) {
|
|
2761
2755
|
var _this58 = this;
|
|
2762
2756
|
|
|
2757
|
+
if (update && this._promises.version) {
|
|
2758
|
+
this._promises.version = null;
|
|
2759
|
+
}
|
|
2760
|
+
|
|
2763
2761
|
this._promises.version = this._promises.version || new Promise(function (resolve, reject) {
|
|
2764
2762
|
return _this58._socket.emit('getVersion', function (err, version, serverName) {
|
|
2765
2763
|
// support of old socket.io
|
|
@@ -3356,7 +3354,6 @@ var Connection = /*#__PURE__*/function () {
|
|
|
3356
3354
|
return window.adapterName === 'material' || window.adapterName === 'vis' || window.socketUrl !== undefined;
|
|
3357
3355
|
}
|
|
3358
3356
|
}]);
|
|
3359
|
-
|
|
3360
3357
|
return Connection;
|
|
3361
3358
|
}();
|
|
3362
3359
|
|