@iobroker/adapter-react-v5 4.8.1 → 4.9.1
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/Logo.d.ts +9 -50
- package/Components/Logo.js +106 -173
- package/Components/ObjectBrowser.d.ts +9 -0
- package/Components/ObjectBrowser.js +370 -165
- package/Components/ObjectBrowser.js.map +1 -1
- package/Components/SaveCloseButtons.d.ts +17 -61
- package/Components/SaveCloseButtons.js +64 -124
- package/Components/Schedule.d.ts +31 -6
- package/Components/Schedule.js +1144 -1562
- package/Components/TabContainer.d.ts +9 -37
- package/Components/TabContainer.js +49 -74
- package/Components/TabContent.d.ts +6 -27
- package/Components/TabContent.js +24 -67
- package/Components/TabHeader.d.ts +6 -11
- package/Components/TabHeader.js +11 -40
- package/Components/ToggleThemeMenu.d.ts +10 -8
- package/Components/ToggleThemeMenu.js +16 -36
- package/Components/types.d.ts +10 -2
- package/Dialogs/SelectID.d.ts +39 -139
- package/Dialogs/SelectID.js +141 -271
- package/LegacyConnection.d.ts +1 -1
- package/README.md +9 -2
- package/i18n.d.ts +2 -2
- package/index.d.ts +127 -126
- package/index.js +213 -192
- package/package.json +7 -7
- package/Components/JsonConfigComponent/ChipInput.d.ts +0 -12
- package/Components/JsonConfigComponent/ChipInput.js +0 -763
- package/Components/JsonConfigComponent/ChipInput.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigAccordion.d.ts +0 -15
- package/Components/JsonConfigComponent/ConfigAccordion.js +0 -348
- package/Components/JsonConfigComponent/ConfigAccordion.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigAlive.d.ts +0 -10
- package/Components/JsonConfigComponent/ConfigAlive.js +0 -105
- package/Components/JsonConfigComponent/ConfigAlive.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigAutocomplete.d.ts +0 -37
- package/Components/JsonConfigComponent/ConfigAutocomplete.js +0 -73
- package/Components/JsonConfigComponent/ConfigAutocompleteSendTo.d.ts +0 -17
- package/Components/JsonConfigComponent/ConfigAutocompleteSendTo.js +0 -131
- package/Components/JsonConfigComponent/ConfigCRON.d.ts +0 -15
- package/Components/JsonConfigComponent/ConfigCRON.js +0 -157
- package/Components/JsonConfigComponent/ConfigCRON.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigCertCollection.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigCertCollection.js +0 -128
- package/Components/JsonConfigComponent/ConfigCertCollection.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigCertificateSelect.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigCertificateSelect.js +0 -149
- package/Components/JsonConfigComponent/ConfigCertificateSelect.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigCertificates.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigCertificates.js +0 -284
- package/Components/JsonConfigComponent/ConfigCertificates.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigCheckLicense.d.ts +0 -3
- package/Components/JsonConfigComponent/ConfigCheckLicense.js +0 -821
- package/Components/JsonConfigComponent/ConfigCheckLicense.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigCheckbox.d.ts +0 -15
- package/Components/JsonConfigComponent/ConfigCheckbox.js +0 -40
- package/Components/JsonConfigComponent/ConfigChip.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigChip.js +0 -120
- package/Components/JsonConfigComponent/ConfigChip.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigColor.d.ts +0 -22
- package/Components/JsonConfigComponent/ConfigColor.js +0 -120
- package/Components/JsonConfigComponent/ConfigColor.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigCoordinates.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigCoordinates.js +0 -265
- package/Components/JsonConfigComponent/ConfigCoordinates.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigCustom.d.ts +0 -26
- package/Components/JsonConfigComponent/ConfigCustom.js +0 -316
- package/Components/JsonConfigComponent/ConfigCustom.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigDatePicker.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigDatePicker.js +0 -91
- package/Components/JsonConfigComponent/ConfigDatePicker.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigDeviceManager.d.ts +0 -6
- package/Components/JsonConfigComponent/ConfigDeviceManager.js +0 -18
- package/Components/JsonConfigComponent/ConfigFile.d.ts +0 -15
- package/Components/JsonConfigComponent/ConfigFile.js +0 -228
- package/Components/JsonConfigComponent/ConfigFile.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigFileSelector.d.ts +0 -3
- package/Components/JsonConfigComponent/ConfigFileSelector.js +0 -625
- package/Components/JsonConfigComponent/ConfigFileSelector.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigFunc.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigFunc.js +0 -124
- package/Components/JsonConfigComponent/ConfigFunc.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigGeneric.d.ts +0 -95
- package/Components/JsonConfigComponent/ConfigGeneric.js +0 -646
- package/Components/JsonConfigComponent/ConfigIP.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigIP.js +0 -130
- package/Components/JsonConfigComponent/ConfigIP.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigImageSendTo.d.ts +0 -10
- package/Components/JsonConfigComponent/ConfigImageSendTo.js +0 -114
- package/Components/JsonConfigComponent/ConfigImageSendTo.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigImageUpload.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigImageUpload.js +0 -166
- package/Components/JsonConfigComponent/ConfigImageUpload.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigInstanceSelect.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigInstanceSelect.js +0 -264
- package/Components/JsonConfigComponent/ConfigInstanceSelect.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigInterface.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigInterface.js +0 -146
- package/Components/JsonConfigComponent/ConfigInterface.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigJsonEditor.d.ts +0 -13
- package/Components/JsonConfigComponent/ConfigJsonEditor.js +0 -145
- package/Components/JsonConfigComponent/ConfigJsonEditor.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigLanguage.d.ts +0 -7
- package/Components/JsonConfigComponent/ConfigLanguage.js +0 -110
- package/Components/JsonConfigComponent/ConfigLicense.d.ts +0 -24
- package/Components/JsonConfigComponent/ConfigLicense.js +0 -183
- package/Components/JsonConfigComponent/ConfigLicense.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigNumber.d.ts +0 -17
- package/Components/JsonConfigComponent/ConfigNumber.js +0 -117
- package/Components/JsonConfigComponent/ConfigObjectId.d.ts +0 -17
- package/Components/JsonConfigComponent/ConfigObjectId.js +0 -167
- package/Components/JsonConfigComponent/ConfigObjectId.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigPanel.d.ts +0 -3
- package/Components/JsonConfigComponent/ConfigPanel.js +0 -396
- package/Components/JsonConfigComponent/ConfigPanel.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigPassword.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigPassword.js +0 -193
- package/Components/JsonConfigComponent/ConfigPassword.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigPattern.d.ts +0 -21
- package/Components/JsonConfigComponent/ConfigPattern.js +0 -65
- package/Components/JsonConfigComponent/ConfigPattern.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigPort.d.ts +0 -3
- package/Components/JsonConfigComponent/ConfigPort.js +0 -176
- package/Components/JsonConfigComponent/ConfigRoom.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigRoom.js +0 -124
- package/Components/JsonConfigComponent/ConfigRoom.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigSelect.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigSelect.js +0 -159
- package/Components/JsonConfigComponent/ConfigSelect.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigSelectSendTo.d.ts +0 -17
- package/Components/JsonConfigComponent/ConfigSelectSendTo.js +0 -272
- package/Components/JsonConfigComponent/ConfigSelectSendTo.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigSendto.d.ts +0 -24
- package/Components/JsonConfigComponent/ConfigSendto.js +0 -294
- package/Components/JsonConfigComponent/ConfigSetState.d.ts +0 -18
- package/Components/JsonConfigComponent/ConfigSetState.js +0 -185
- package/Components/JsonConfigComponent/ConfigSetState.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigSlider.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigSlider.js +0 -119
- package/Components/JsonConfigComponent/ConfigSlider.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigStaticDivider.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigStaticDivider.js +0 -68
- package/Components/JsonConfigComponent/ConfigStaticDivider.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigStaticHeader.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigStaticHeader.js +0 -81
- package/Components/JsonConfigComponent/ConfigStaticHeader.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigStaticImage.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigStaticImage.js +0 -71
- package/Components/JsonConfigComponent/ConfigStaticImage.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigStaticText.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigStaticText.js +0 -88
- package/Components/JsonConfigComponent/ConfigStaticText.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigTable.d.ts +0 -3
- package/Components/JsonConfigComponent/ConfigTable.js +0 -1064
- package/Components/JsonConfigComponent/ConfigTable.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigTabs.d.ts +0 -34
- package/Components/JsonConfigComponent/ConfigTabs.js +0 -162
- package/Components/JsonConfigComponent/ConfigTabs.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigText.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigText.js +0 -226
- package/Components/JsonConfigComponent/ConfigText.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigTextSendTo.d.ts +0 -10
- package/Components/JsonConfigComponent/ConfigTextSendTo.js +0 -129
- package/Components/JsonConfigComponent/ConfigTextSendTo.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigTimePicker.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigTimePicker.js +0 -85
- package/Components/JsonConfigComponent/ConfigTimePicker.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigTopic.d.ts +0 -17
- package/Components/JsonConfigComponent/ConfigTopic.js +0 -110
- package/Components/JsonConfigComponent/ConfigTopic.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigUUID.d.ts +0 -15
- package/Components/JsonConfigComponent/ConfigUUID.js +0 -95
- package/Components/JsonConfigComponent/ConfigUUID.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigUser.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigUser.js +0 -142
- package/Components/JsonConfigComponent/ConfigUser.js.map +0 -1
- package/Components/JsonConfigComponent/DeviceManager/Communication.d.ts +0 -63
- package/Components/JsonConfigComponent/DeviceManager/Communication.js +0 -268
- package/Components/JsonConfigComponent/DeviceManager/DeviceActionButton.d.ts +0 -11
- package/Components/JsonConfigComponent/DeviceManager/DeviceActionButton.js +0 -15
- package/Components/JsonConfigComponent/DeviceManager/DeviceCard.d.ts +0 -53
- package/Components/JsonConfigComponent/DeviceManager/DeviceCard.js +0 -340
- package/Components/JsonConfigComponent/DeviceManager/DeviceControl.d.ts +0 -45
- package/Components/JsonConfigComponent/DeviceManager/DeviceControl.js +0 -146
- package/Components/JsonConfigComponent/DeviceManager/DeviceImageUpload.d.ts +0 -12
- package/Components/JsonConfigComponent/DeviceManager/DeviceImageUpload.js +0 -69
- package/Components/JsonConfigComponent/DeviceManager/DeviceList.d.ts +0 -51
- package/Components/JsonConfigComponent/DeviceManager/DeviceList.js +0 -226
- package/Components/JsonConfigComponent/DeviceManager/DeviceStatus.d.ts +0 -13
- package/Components/JsonConfigComponent/DeviceManager/DeviceStatus.js +0 -111
- package/Components/JsonConfigComponent/DeviceManager/InstanceActionButton.d.ts +0 -7
- package/Components/JsonConfigComponent/DeviceManager/InstanceActionButton.js +0 -16
- package/Components/JsonConfigComponent/DeviceManager/JsonConfig.d.ts +0 -11
- package/Components/JsonConfigComponent/DeviceManager/JsonConfig.js +0 -94
- package/Components/JsonConfigComponent/DeviceManager/TooltipButton.d.ts +0 -10
- package/Components/JsonConfigComponent/DeviceManager/TooltipButton.js +0 -22
- package/Components/JsonConfigComponent/DeviceManager/Utils.d.ts +0 -12
- package/Components/JsonConfigComponent/DeviceManager/Utils.js +0 -158
- package/Components/JsonConfigComponent/DeviceManager/i18n/de.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/i18n/en.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/i18n/es.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/i18n/fr.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/i18n/i18n.d.ts +0 -26
- package/Components/JsonConfigComponent/DeviceManager/i18n/it.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/i18n/nl.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/i18n/pl.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/i18n/pt.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/i18n/ru.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/i18n/uk.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/i18n/zh-cn.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/index.d.ts +0 -2
- package/Components/JsonConfigComponent/DeviceManager/index.js +0 -10
- package/Components/JsonConfigComponent/DeviceManager/index.js.map +0 -1
- package/Components/JsonConfigComponent/index.d.ts +0 -26
- package/Components/JsonConfigComponent/index.js +0 -520
- package/Components/JsonConfigComponent/index.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/AdminConnection.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/AdminConnection.js +0 -7
- package/Components/JsonConfigComponent/wrapper/Components/ColorPicker.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Components/ColorPicker.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Components/ColorPicker.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/Components/Icon.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Components/Icon.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Components/Icon.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/Components/TextWithIcon.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Components/TextWithIcon.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Components/TextWithIcon.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/Components/UploadImage.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Components/UploadImage.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Components/UploadImage.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/Components/Utils.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Components/Utils.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Components/Utils.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/Dialogs/Confirm.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Dialogs/Confirm.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Dialogs/Confirm.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/Dialogs/Cron.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Dialogs/Cron.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Dialogs/Cron.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/Dialogs/Error.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Dialogs/Error.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Dialogs/Error.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/Dialogs/Message.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Dialogs/Message.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Dialogs/Message.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/Dialogs/SelectFile.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Dialogs/SelectFile.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Dialogs/SelectFile.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/Dialogs/SelectID.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Dialogs/SelectID.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Dialogs/SelectID.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/i18n.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/i18n.js +0 -10
- package/Components/JsonConfigComponent/wrapper/i18n.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/icons/IconCopy.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/icons/IconCopy.js +0 -10
- package/Components/JsonConfigComponent/wrapper/icons/IconCopy.js.map +0 -1
- package/Components/Logo.js.map +0 -1
- package/Components/SaveCloseButtons.js.map +0 -1
- package/Components/Schedule.js.map +0 -1
- package/Components/TabContainer.js.map +0 -1
- package/Components/TabContent.js.map +0 -1
- package/Components/TabHeader.js.map +0 -1
- package/Components/ToggleThemeMenu.js.map +0 -1
- package/Dialogs/SelectID.js.map +0 -1
package/Components/Logo.d.ts
CHANGED
|
@@ -1,59 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Adapter common configuration from io-package.json
|
|
5
|
-
*/
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface LogoProps {
|
|
6
3
|
common: any;
|
|
7
|
-
/**
|
|
8
|
-
* Adapter native data from io-package.json
|
|
9
|
-
*/
|
|
10
4
|
native: any;
|
|
11
|
-
/**
|
|
12
|
-
* Adapter instance number.
|
|
13
|
-
*/
|
|
14
5
|
instance: number;
|
|
15
6
|
onLoad?: (contents: any) => void;
|
|
16
7
|
onError?: (error: string) => void;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
/** @type {typeof Logo} */
|
|
26
|
-
declare const _export: typeof Logo;
|
|
27
|
-
/**
|
|
28
|
-
* @typedef {object} LogoProps
|
|
29
|
-
* @property {any} common Adapter common configuration from io-package.json
|
|
30
|
-
* @property {any} native Adapter native data from io-package.json
|
|
31
|
-
* @property {number} instance Adapter instance number.
|
|
32
|
-
* @property {(contents: any) => void} [onLoad]
|
|
33
|
-
* @property {(error: string) => void} [onError]
|
|
34
|
-
* @property {{ buttons: string, logo: string }} classes The styling class names.
|
|
35
|
-
*
|
|
36
|
-
* @extends {React.Component<LogoProps>}
|
|
37
|
-
*/
|
|
38
|
-
declare class Logo extends React.Component<LogoProps, any, any> {
|
|
39
|
-
static generateFile(filename: any, obj: any): void;
|
|
40
|
-
constructor(props: LogoProps | Readonly<LogoProps>);
|
|
41
|
-
constructor(props: LogoProps, context: any);
|
|
42
|
-
handleFileSelect(evt: any): void;
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: Record<string, any>;
|
|
10
|
+
}
|
|
11
|
+
declare class Logo extends React.Component<LogoProps> {
|
|
12
|
+
static generateFile(fileName: string, obj: any): void;
|
|
13
|
+
handleFileSelect: (evt: Event) => void;
|
|
43
14
|
download(): void;
|
|
44
15
|
upload(): void;
|
|
45
16
|
render(): React.JSX.Element;
|
|
46
17
|
}
|
|
47
|
-
|
|
48
|
-
namespace propTypes {
|
|
49
|
-
let common: PropTypes.Validator<object>;
|
|
50
|
-
let className: PropTypes.Requireable<string>;
|
|
51
|
-
let style: PropTypes.Requireable<object>;
|
|
52
|
-
let native: PropTypes.Validator<object>;
|
|
53
|
-
let instance: PropTypes.Validator<number>;
|
|
54
|
-
let onError: PropTypes.Validator<(...args: any[]) => any>;
|
|
55
|
-
let onLoad: PropTypes.Validator<(...args: any[]) => any>;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
import React from 'react';
|
|
59
|
-
import PropTypes from 'prop-types';
|
|
18
|
+
export default Logo;
|
package/Components/Logo.js
CHANGED
|
@@ -1,184 +1,117 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports["default"] = void 0;
|
|
8
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
11
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
12
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
13
|
-
var _react = _interopRequireDefault(require("react"));
|
|
14
|
-
var _styles = require("@mui/styles");
|
|
15
|
-
var _material = require("@mui/material");
|
|
16
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
17
|
-
var _iconsMaterial = require("@mui/icons-material");
|
|
18
|
-
var _i18n = _interopRequireDefault(require("../i18n"));
|
|
19
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
20
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } // please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined
|
|
21
|
-
var styles = function styles() {
|
|
22
|
-
return {
|
|
23
|
-
buttons: {
|
|
24
|
-
marginRight: 5,
|
|
25
|
-
marginTop: 5,
|
|
26
|
-
"float": 'right'
|
|
27
|
-
},
|
|
28
|
-
logo: {
|
|
29
|
-
padding: 8,
|
|
30
|
-
width: 64
|
|
31
|
-
}
|
|
32
|
-
};
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
33
4
|
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const material_1 = require("@mui/material");
|
|
8
|
+
const icons_material_1 = require("@mui/icons-material");
|
|
9
|
+
const i18n_1 = __importDefault(require("../i18n"));
|
|
10
|
+
class Logo extends react_1.default.Component {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.handleFileSelect = (evt) => {
|
|
14
|
+
const target = evt.target;
|
|
15
|
+
const files = target.files;
|
|
16
|
+
if (!files || !files.length) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
let f = files[0];
|
|
20
|
+
if (f) {
|
|
21
|
+
const r = new window.FileReader();
|
|
22
|
+
r.onload = () => {
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
const contents = target.result;
|
|
25
|
+
try {
|
|
26
|
+
const json = JSON.parse(contents);
|
|
27
|
+
if (json.native && json.common) {
|
|
28
|
+
if (json.common.name !== this.props.common.name) {
|
|
29
|
+
this.props.onError && this.props.onError(i18n_1.default.t('ra_otherConfig', json.common.name));
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
this.props.onLoad && this.props.onLoad(json.native);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
this.props.onError && this.props.onError(i18n_1.default.t('ra_invalidConfig'));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
catch (err) {
|
|
40
|
+
this.props.onError && this.props.onError(err === null || err === void 0 ? void 0 : err.toString());
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
r.readAsText(f);
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
alert('Failed to open JSON File');
|
|
72
47
|
}
|
|
73
|
-
} catch (err) {
|
|
74
|
-
_this.props.onError && _this.props.onError(err.toString());
|
|
75
|
-
}
|
|
76
48
|
};
|
|
77
|
-
r.readAsText(f);
|
|
78
|
-
} else {
|
|
79
|
-
alert('Failed to open JSON File');
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}, {
|
|
83
|
-
key: "download",
|
|
84
|
-
value: function download() {
|
|
85
|
-
var result = {
|
|
86
|
-
_id: "system.adapter.".concat(this.props.common.name, ".").concat(this.props.instance),
|
|
87
|
-
common: JSON.parse(JSON.stringify(this.props.common)),
|
|
88
|
-
"native": this.props["native"]
|
|
89
|
-
};
|
|
90
|
-
// remove unimportant information
|
|
91
|
-
if (result.common.news) {
|
|
92
|
-
delete result.common.news;
|
|
93
|
-
}
|
|
94
|
-
if (result.common.titleLang) {
|
|
95
|
-
delete result.common.titleLang;
|
|
96
|
-
}
|
|
97
|
-
if (result.common.desc) {
|
|
98
|
-
delete result.common.desc;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
// window.open('data:application/iobroker; content-disposition=attachment; filename=' + result._id + '.json,' + JSON.stringify(result, null, 2));
|
|
102
|
-
Logo.generateFile("".concat(result._id, ".json"), result);
|
|
103
49
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
input.addEventListener('change', function (e) {
|
|
113
|
-
return _this2.handleFileSelect(e, function () {});
|
|
114
|
-
}, false);
|
|
115
|
-
input.click();
|
|
50
|
+
static generateFile(fileName, obj) {
|
|
51
|
+
const el = window.document.createElement('a');
|
|
52
|
+
el.setAttribute('href', `data:application/json;charset=utf-8,${encodeURIComponent(JSON.stringify(obj, null, 2))}`);
|
|
53
|
+
el.setAttribute('download', fileName);
|
|
54
|
+
el.style.display = 'none';
|
|
55
|
+
window.document.body.appendChild(el);
|
|
56
|
+
el.click();
|
|
57
|
+
window.document.body.removeChild(el);
|
|
116
58
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
className: this.props.classes.logo,
|
|
127
|
-
alt: "logo"
|
|
128
|
-
}) : null, this.props.common.readme ? /*#__PURE__*/_react["default"].createElement(_material.Fab, {
|
|
129
|
-
size: "small",
|
|
130
|
-
color: "primary",
|
|
131
|
-
"aria-label": "Help",
|
|
132
|
-
className: this.props.classes.buttons,
|
|
133
|
-
onClick: function onClick() {
|
|
134
|
-
var win = window.open(_this3.props.common.readme, '_blank');
|
|
135
|
-
win === null || win === void 0 || win.focus();
|
|
59
|
+
download() {
|
|
60
|
+
const result = {
|
|
61
|
+
_id: `system.adapter.${this.props.common.name}.${this.props.instance}`,
|
|
62
|
+
common: JSON.parse(JSON.stringify(this.props.common)),
|
|
63
|
+
native: this.props.native,
|
|
64
|
+
};
|
|
65
|
+
// remove unimportant information
|
|
66
|
+
if (result.common.news) {
|
|
67
|
+
delete result.common.news;
|
|
136
68
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
color: "primary",
|
|
140
|
-
"aria-label": "Load config",
|
|
141
|
-
className: this.props.classes.buttons,
|
|
142
|
-
title: _i18n["default"].t('ra_Load configuration from file'),
|
|
143
|
-
onClick: function onClick() {
|
|
144
|
-
return _this3.upload();
|
|
69
|
+
if (result.common.titleLang) {
|
|
70
|
+
delete result.common.titleLang;
|
|
145
71
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
color: "primary",
|
|
149
|
-
"aria-label": "Save config",
|
|
150
|
-
className: this.props.classes.buttons,
|
|
151
|
-
title: _i18n["default"].t('ra_Save configuration to file'),
|
|
152
|
-
onClick: function onClick() {
|
|
153
|
-
return _this3.download();
|
|
72
|
+
if (result.common.desc) {
|
|
73
|
+
delete result.common.desc;
|
|
154
74
|
}
|
|
155
|
-
|
|
75
|
+
// window.open('data:application/iobroker; content-disposition=attachment; filename=' + result._id + '.json,' + JSON.stringify(result, null, 2));
|
|
76
|
+
Logo.generateFile(`${result._id}.json`, result);
|
|
156
77
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
window.document.body.appendChild(el);
|
|
165
|
-
el.click();
|
|
166
|
-
window.document.body.removeChild(el);
|
|
78
|
+
upload() {
|
|
79
|
+
const input = window.document.createElement('input');
|
|
80
|
+
input.setAttribute('type', 'file');
|
|
81
|
+
input.setAttribute('id', 'files');
|
|
82
|
+
input.setAttribute('opacity', '0');
|
|
83
|
+
input.addEventListener('change', this.handleFileSelect, false);
|
|
84
|
+
(input.click)();
|
|
167
85
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
86
|
+
render() {
|
|
87
|
+
return react_1.default.createElement("div", { className: this.props.className, style: this.props.style },
|
|
88
|
+
this.props.common.icon ?
|
|
89
|
+
react_1.default.createElement("img", { src: this.props.common.icon, style: {
|
|
90
|
+
padding: 8,
|
|
91
|
+
width: 64,
|
|
92
|
+
}, alt: "logo" }) : null,
|
|
93
|
+
this.props.common.readme ?
|
|
94
|
+
react_1.default.createElement(material_1.Fab, { size: "small", color: "primary", "aria-label": "Help", style: {
|
|
95
|
+
marginRight: 5,
|
|
96
|
+
marginTop: 5,
|
|
97
|
+
float: 'right',
|
|
98
|
+
}, onClick: () => {
|
|
99
|
+
const win = window.open(this.props.common.readme, '_blank');
|
|
100
|
+
win === null || win === void 0 ? void 0 : win.focus();
|
|
101
|
+
} },
|
|
102
|
+
react_1.default.createElement(icons_material_1.Help, null)) : null,
|
|
103
|
+
react_1.default.createElement(material_1.Fab, { size: "small", color: "primary", "aria-label": "Load config", style: {
|
|
104
|
+
marginRight: 5,
|
|
105
|
+
marginTop: 5,
|
|
106
|
+
float: 'right',
|
|
107
|
+
}, title: i18n_1.default.t('ra_Load configuration from file'), onClick: () => this.upload() },
|
|
108
|
+
react_1.default.createElement(icons_material_1.VerticalAlignTop, null)),
|
|
109
|
+
react_1.default.createElement(material_1.Fab, { size: "small", color: "primary", "aria-label": "Save config", style: {
|
|
110
|
+
marginRight: 5,
|
|
111
|
+
marginTop: 5,
|
|
112
|
+
float: 'right',
|
|
113
|
+
}, title: i18n_1.default.t('ra_Save configuration to file'), onClick: () => this.download() },
|
|
114
|
+
react_1.default.createElement(icons_material_1.VerticalAlignBottom, null)));
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
exports.default = Logo;
|
|
@@ -149,6 +149,14 @@ declare class ObjectBrowser extends React.Component<import("./types").ObjectBrow
|
|
|
149
149
|
aclEveryone_read_state: string;
|
|
150
150
|
aclEveryone_write_object: string;
|
|
151
151
|
aclEveryone_write_state: string;
|
|
152
|
+
create: string;
|
|
153
|
+
createBooleanState: string;
|
|
154
|
+
createNumberState: string;
|
|
155
|
+
createStringState: string;
|
|
156
|
+
createState: string;
|
|
157
|
+
createChannel: string;
|
|
158
|
+
createDevice: string;
|
|
159
|
+
createFolder: string;
|
|
152
160
|
};
|
|
153
161
|
levelPadding: any;
|
|
154
162
|
storedWidths: any;
|
|
@@ -640,6 +648,7 @@ declare class ObjectBrowser extends React.Component<import("./types").ObjectBrow
|
|
|
640
648
|
* @returns {JSX.Element | null}
|
|
641
649
|
*/
|
|
642
650
|
private renderAliasEditorDialog;
|
|
651
|
+
showAddDataPointDialog(id: any, initialType: any, initialStateType: any): void;
|
|
643
652
|
/**
|
|
644
653
|
* Renders the right mouse button context menu
|
|
645
654
|
*
|