@iobroker/adapter-react-v5 2.1.11 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Components/JsonConfigComponent/ChipInput.js +925 -0
- package/Components/JsonConfigComponent/ChipInput.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigAlive.js +135 -0
- package/Components/JsonConfigComponent/ConfigAlive.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigAutocomplete.js +204 -0
- package/Components/JsonConfigComponent/ConfigAutocomplete.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigAutocompleteSendTo.js +311 -0
- package/Components/JsonConfigComponent/ConfigAutocompleteSendTo.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigCRON.js +195 -0
- package/Components/JsonConfigComponent/ConfigCRON.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigCertificateSelect.js +178 -0
- package/Components/JsonConfigComponent/ConfigCertificateSelect.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigCheckbox.js +112 -0
- package/Components/JsonConfigComponent/ConfigCheckbox.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigChip.js +149 -0
- package/Components/JsonConfigComponent/ConfigChip.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigColor.js +156 -0
- package/Components/JsonConfigComponent/ConfigColor.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigCoordinates.js +165 -0
- package/Components/JsonConfigComponent/ConfigCoordinates.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigCustomEasyAccess.js +180 -0
- package/Components/JsonConfigComponent/ConfigCustomEasyAccess.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigDatePicker.js +117 -0
- package/Components/JsonConfigComponent/ConfigDatePicker.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigGeneric.js +660 -0
- package/Components/JsonConfigComponent/ConfigGeneric.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigIP.js +151 -0
- package/Components/JsonConfigComponent/ConfigIP.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigImageUpload.js +215 -0
- package/Components/JsonConfigComponent/ConfigImageUpload.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigInstanceSelect.js +197 -0
- package/Components/JsonConfigComponent/ConfigInstanceSelect.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigJsonEditor.js +211 -0
- package/Components/JsonConfigComponent/ConfigJsonEditor.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigLanguage.js +175 -0
- package/Components/JsonConfigComponent/ConfigLanguage.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigNumber.js +194 -0
- package/Components/JsonConfigComponent/ConfigNumber.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigObjectId.js +201 -0
- package/Components/JsonConfigComponent/ConfigObjectId.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigPanel.js +421 -0
- package/Components/JsonConfigComponent/ConfigPanel.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigPassword.js +236 -0
- package/Components/JsonConfigComponent/ConfigPassword.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigPattern.js +94 -0
- package/Components/JsonConfigComponent/ConfigPattern.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigSelect.js +163 -0
- package/Components/JsonConfigComponent/ConfigSelect.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigSelectSendTo.js +258 -0
- package/Components/JsonConfigComponent/ConfigSelectSendTo.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigSendto.js +282 -0
- package/Components/JsonConfigComponent/ConfigSendto.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigSetState.js +266 -0
- package/Components/JsonConfigComponent/ConfigSetState.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigStaticDivider.js +88 -0
- package/Components/JsonConfigComponent/ConfigStaticDivider.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigStaticHeader.js +81 -0
- package/Components/JsonConfigComponent/ConfigStaticHeader.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigStaticImage.js +88 -0
- package/Components/JsonConfigComponent/ConfigStaticImage.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigStaticText.js +104 -0
- package/Components/JsonConfigComponent/ConfigStaticText.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigTable.js +651 -0
- package/Components/JsonConfigComponent/ConfigTable.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigTabs.js +166 -0
- package/Components/JsonConfigComponent/ConfigTabs.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigText.js +170 -0
- package/Components/JsonConfigComponent/ConfigText.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigTextSendTo.js +168 -0
- package/Components/JsonConfigComponent/ConfigTextSendTo.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigTimePicker.js +111 -0
- package/Components/JsonConfigComponent/ConfigTimePicker.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigTopic.js +140 -0
- package/Components/JsonConfigComponent/ConfigTopic.js.map +1 -0
- package/Components/JsonConfigComponent/ConfigUser.js +176 -0
- package/Components/JsonConfigComponent/ConfigUser.js.map +1 -0
- package/Components/JsonConfigComponent/index.js +511 -0
- package/Components/JsonConfigComponent/index.js.map +1 -0
- package/README.md +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,104 @@
|
|
|
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 _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
+
|
|
12
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
+
|
|
14
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
|
+
|
|
16
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
17
|
+
|
|
18
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
19
|
+
|
|
20
|
+
var _react = _interopRequireDefault(require("react"));
|
|
21
|
+
|
|
22
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
23
|
+
|
|
24
|
+
var _styles = require("@mui/styles");
|
|
25
|
+
|
|
26
|
+
var _Button = _interopRequireDefault(require("@mui/material/Button"));
|
|
27
|
+
|
|
28
|
+
var _Icon = _interopRequireDefault(require("@iobroker/adapter-react-v5/Components/Icon"));
|
|
29
|
+
|
|
30
|
+
var _ConfigGeneric2 = _interopRequireDefault(require("./ConfigGeneric"));
|
|
31
|
+
|
|
32
|
+
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); }; }
|
|
33
|
+
|
|
34
|
+
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; } }
|
|
35
|
+
|
|
36
|
+
var styles = function styles(theme) {
|
|
37
|
+
return {
|
|
38
|
+
fullWidth: {
|
|
39
|
+
height: '100%',
|
|
40
|
+
width: '100%'
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
var ConfigStaticText = /*#__PURE__*/function (_ConfigGeneric) {
|
|
46
|
+
(0, _inherits2["default"])(ConfigStaticText, _ConfigGeneric);
|
|
47
|
+
|
|
48
|
+
var _super = _createSuper(ConfigStaticText);
|
|
49
|
+
|
|
50
|
+
function ConfigStaticText() {
|
|
51
|
+
(0, _classCallCheck2["default"])(this, ConfigStaticText);
|
|
52
|
+
return _super.apply(this, arguments);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
(0, _createClass2["default"])(ConfigStaticText, [{
|
|
56
|
+
key: "renderItem",
|
|
57
|
+
value: function renderItem(error, disabled) {
|
|
58
|
+
var _this = this;
|
|
59
|
+
|
|
60
|
+
if (this.props.schema.button) {
|
|
61
|
+
return /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
62
|
+
variant: this.props.schema.variant || undefined,
|
|
63
|
+
color: this.props.schema.color || 'grey',
|
|
64
|
+
className: this.props.classes.fullWidth,
|
|
65
|
+
disabled: disabled,
|
|
66
|
+
onClick: this.props.schema.href ? function () {
|
|
67
|
+
// calculate one more time just before call
|
|
68
|
+
var href = _this.props.schema.href ? _this.getText(_this.props.schema.href, true) : null;
|
|
69
|
+
href && window.open(href, '_blank');
|
|
70
|
+
} : null
|
|
71
|
+
}, this.props.schema.icon ? /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
72
|
+
src: this.props.schema.icon,
|
|
73
|
+
className: this.props.classes.icon
|
|
74
|
+
}) : null, this.getText(this.props.schema.text || this.props.schema.label, this.props.schema.noTranslation));
|
|
75
|
+
} else {
|
|
76
|
+
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
77
|
+
onClick: this.props.schema.href ? function () {
|
|
78
|
+
// calculate one more time just before call
|
|
79
|
+
var href = _this.props.schema.href ? _this.getText(_this.props.schema.href, true) : null;
|
|
80
|
+
href && window.open(href, '_blank');
|
|
81
|
+
} : null
|
|
82
|
+
}, this.getText(this.props.schema.text || this.props.schema.label));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}]);
|
|
86
|
+
return ConfigStaticText;
|
|
87
|
+
}(_ConfigGeneric2["default"]);
|
|
88
|
+
|
|
89
|
+
ConfigStaticText.propTypes = {
|
|
90
|
+
socket: _propTypes["default"].object.isRequired,
|
|
91
|
+
themeType: _propTypes["default"].string,
|
|
92
|
+
themeName: _propTypes["default"].string,
|
|
93
|
+
style: _propTypes["default"].object,
|
|
94
|
+
className: _propTypes["default"].string,
|
|
95
|
+
data: _propTypes["default"].object.isRequired,
|
|
96
|
+
schema: _propTypes["default"].object,
|
|
97
|
+
onError: _propTypes["default"].func,
|
|
98
|
+
onChange: _propTypes["default"].func
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
var _default = (0, _styles.withStyles)(styles)(ConfigStaticText);
|
|
102
|
+
|
|
103
|
+
exports["default"] = _default;
|
|
104
|
+
//# sourceMappingURL=ConfigStaticText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigStaticText.js","names":["styles","theme","fullWidth","height","width","ConfigStaticText","error","disabled","props","schema","button","variant","undefined","color","classes","href","getText","window","open","icon","text","label","noTranslation","ConfigGeneric","propTypes","socket","PropTypes","object","isRequired","themeType","string","themeName","style","className","data","onError","func","onChange","withStyles"],"sources":["JsonConfigComponent/ConfigStaticText.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport Button from '@mui/material/Button';\n\nimport Icon from '@iobroker/adapter-react-v5/Components/Icon';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n fullWidth: {\n height: '100%',\n width: '100%',\n }\n});\n\nclass ConfigStaticText extends ConfigGeneric {\n renderItem(error, disabled) {\n if (this.props.schema.button) {\n return <Button\n variant={this.props.schema.variant || undefined}\n color={this.props.schema.color || 'grey'}\n className={this.props.classes.fullWidth}\n disabled={disabled}\n onClick={this.props.schema.href ? () => {\n // calculate one more time just before call\n const href = this.props.schema.href ? this.getText(this.props.schema.href, true) : null;\n href && window.open(href, '_blank');\n } : null}\n >\n {this.props.schema.icon ? <Icon src={this.props.schema.icon} className={this.props.classes.icon}/> : null}\n {this.getText(this.props.schema.text || this.props.schema.label, this.props.schema.noTranslation)}\n </Button>\n } else {\n\n return <span onClick={this.props.schema.href ? () => {\n // calculate one more time just before call\n const href = this.props.schema.href ? this.getText(this.props.schema.href, true) : null;\n href && window.open(href, '_blank');\n } : null}>\n {this.getText(this.props.schema.text || this.props.schema.label)}\n </span>;\n }\n }\n}\n\nConfigStaticText.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigStaticText);\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAEA;;AAEA;;;;;;AAEA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAAAC,KAAK;EAAA,OAAK;IACrBC,SAAS,EAAE;MACPC,MAAM,EAAE,MADD;MAEPC,KAAK,EAAE;IAFA;EADU,CAAL;AAAA,CAApB;;IAOMC,gB;;;;;;;;;;;;WACF,oBAAWC,KAAX,EAAkBC,QAAlB,EAA4B;MAAA;;MACxB,IAAI,KAAKC,KAAL,CAAWC,MAAX,CAAkBC,MAAtB,EAA8B;QAC1B,oBAAO,gCAAC,kBAAD;UACH,OAAO,EAAE,KAAKF,KAAL,CAAWC,MAAX,CAAkBE,OAAlB,IAA6BC,SADnC;UAEH,KAAK,EAAE,KAAKJ,KAAL,CAAWC,MAAX,CAAkBI,KAAlB,IAA2B,MAF/B;UAGH,SAAS,EAAE,KAAKL,KAAL,CAAWM,OAAX,CAAmBZ,SAH3B;UAIH,QAAQ,EAAEK,QAJP;UAKH,OAAO,EAAE,KAAKC,KAAL,CAAWC,MAAX,CAAkBM,IAAlB,GAAyB,YAAM;YACpC;YACA,IAAMA,IAAI,GAAG,KAAI,CAACP,KAAL,CAAWC,MAAX,CAAkBM,IAAlB,GAAyB,KAAI,C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