@iobroker/adapter-react-v5 2.1.9 → 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.
Files changed (138) hide show
  1. package/Components/404.js.map +1 -1
  2. package/Components/ColorPicker.js.map +1 -1
  3. package/Components/ComplexCron.js.map +1 -1
  4. package/Components/FileBrowser.js +248 -222
  5. package/Components/FileBrowser.js.map +1 -1
  6. package/Components/FileViewer.js +219 -75
  7. package/Components/FileViewer.js.map +1 -1
  8. package/Components/Icon.js.map +1 -1
  9. package/Components/IconPicker.js.map +1 -1
  10. package/Components/IconSelector.js.map +1 -1
  11. package/Components/Image.js.map +1 -1
  12. package/Components/JsonConfigComponent/ChipInput.js +925 -0
  13. package/Components/JsonConfigComponent/ChipInput.js.map +1 -0
  14. package/Components/JsonConfigComponent/ConfigAlive.js +135 -0
  15. package/Components/JsonConfigComponent/ConfigAlive.js.map +1 -0
  16. package/Components/JsonConfigComponent/ConfigAutocomplete.js +204 -0
  17. package/Components/JsonConfigComponent/ConfigAutocomplete.js.map +1 -0
  18. package/Components/JsonConfigComponent/ConfigAutocompleteSendTo.js +311 -0
  19. package/Components/JsonConfigComponent/ConfigAutocompleteSendTo.js.map +1 -0
  20. package/Components/JsonConfigComponent/ConfigCRON.js +195 -0
  21. package/Components/JsonConfigComponent/ConfigCRON.js.map +1 -0
  22. package/Components/JsonConfigComponent/ConfigCertificateSelect.js +178 -0
  23. package/Components/JsonConfigComponent/ConfigCertificateSelect.js.map +1 -0
  24. package/Components/JsonConfigComponent/ConfigCheckbox.js +112 -0
  25. package/Components/JsonConfigComponent/ConfigCheckbox.js.map +1 -0
  26. package/Components/JsonConfigComponent/ConfigChip.js +149 -0
  27. package/Components/JsonConfigComponent/ConfigChip.js.map +1 -0
  28. package/Components/JsonConfigComponent/ConfigColor.js +156 -0
  29. package/Components/JsonConfigComponent/ConfigColor.js.map +1 -0
  30. package/Components/JsonConfigComponent/ConfigCoordinates.js +165 -0
  31. package/Components/JsonConfigComponent/ConfigCoordinates.js.map +1 -0
  32. package/Components/JsonConfigComponent/ConfigCustomEasyAccess.js +180 -0
  33. package/Components/JsonConfigComponent/ConfigCustomEasyAccess.js.map +1 -0
  34. package/Components/JsonConfigComponent/ConfigDatePicker.js +117 -0
  35. package/Components/JsonConfigComponent/ConfigDatePicker.js.map +1 -0
  36. package/Components/JsonConfigComponent/ConfigGeneric.js +660 -0
  37. package/Components/JsonConfigComponent/ConfigGeneric.js.map +1 -0
  38. package/Components/JsonConfigComponent/ConfigIP.js +151 -0
  39. package/Components/JsonConfigComponent/ConfigIP.js.map +1 -0
  40. package/Components/JsonConfigComponent/ConfigImageUpload.js +215 -0
  41. package/Components/JsonConfigComponent/ConfigImageUpload.js.map +1 -0
  42. package/Components/JsonConfigComponent/ConfigInstanceSelect.js +197 -0
  43. package/Components/JsonConfigComponent/ConfigInstanceSelect.js.map +1 -0
  44. package/Components/JsonConfigComponent/ConfigJsonEditor.js +211 -0
  45. package/Components/JsonConfigComponent/ConfigJsonEditor.js.map +1 -0
  46. package/Components/JsonConfigComponent/ConfigLanguage.js +175 -0
  47. package/Components/JsonConfigComponent/ConfigLanguage.js.map +1 -0
  48. package/Components/JsonConfigComponent/ConfigNumber.js +194 -0
  49. package/Components/JsonConfigComponent/ConfigNumber.js.map +1 -0
  50. package/Components/JsonConfigComponent/ConfigObjectId.js +201 -0
  51. package/Components/JsonConfigComponent/ConfigObjectId.js.map +1 -0
  52. package/Components/JsonConfigComponent/ConfigPanel.js +421 -0
  53. package/Components/JsonConfigComponent/ConfigPanel.js.map +1 -0
  54. package/Components/JsonConfigComponent/ConfigPassword.js +236 -0
  55. package/Components/JsonConfigComponent/ConfigPassword.js.map +1 -0
  56. package/Components/JsonConfigComponent/ConfigPattern.js +94 -0
  57. package/Components/JsonConfigComponent/ConfigPattern.js.map +1 -0
  58. package/Components/JsonConfigComponent/ConfigSelect.js +163 -0
  59. package/Components/JsonConfigComponent/ConfigSelect.js.map +1 -0
  60. package/Components/JsonConfigComponent/ConfigSelectSendTo.js +258 -0
  61. package/Components/JsonConfigComponent/ConfigSelectSendTo.js.map +1 -0
  62. package/Components/JsonConfigComponent/ConfigSendto.js +282 -0
  63. package/Components/JsonConfigComponent/ConfigSendto.js.map +1 -0
  64. package/Components/JsonConfigComponent/ConfigSetState.js +266 -0
  65. package/Components/JsonConfigComponent/ConfigSetState.js.map +1 -0
  66. package/Components/JsonConfigComponent/ConfigStaticDivider.js +88 -0
  67. package/Components/JsonConfigComponent/ConfigStaticDivider.js.map +1 -0
  68. package/Components/JsonConfigComponent/ConfigStaticHeader.js +81 -0
  69. package/Components/JsonConfigComponent/ConfigStaticHeader.js.map +1 -0
  70. package/Components/JsonConfigComponent/ConfigStaticImage.js +88 -0
  71. package/Components/JsonConfigComponent/ConfigStaticImage.js.map +1 -0
  72. package/Components/JsonConfigComponent/ConfigStaticText.js +104 -0
  73. package/Components/JsonConfigComponent/ConfigStaticText.js.map +1 -0
  74. package/Components/JsonConfigComponent/ConfigTable.js +651 -0
  75. package/Components/JsonConfigComponent/ConfigTable.js.map +1 -0
  76. package/Components/JsonConfigComponent/ConfigTabs.js +166 -0
  77. package/Components/JsonConfigComponent/ConfigTabs.js.map +1 -0
  78. package/Components/JsonConfigComponent/ConfigText.js +170 -0
  79. package/Components/JsonConfigComponent/ConfigText.js.map +1 -0
  80. package/Components/JsonConfigComponent/ConfigTextSendTo.js +168 -0
  81. package/Components/JsonConfigComponent/ConfigTextSendTo.js.map +1 -0
  82. package/Components/JsonConfigComponent/ConfigTimePicker.js +111 -0
  83. package/Components/JsonConfigComponent/ConfigTimePicker.js.map +1 -0
  84. package/Components/JsonConfigComponent/ConfigTopic.js +140 -0
  85. package/Components/JsonConfigComponent/ConfigTopic.js.map +1 -0
  86. package/Components/JsonConfigComponent/ConfigUser.js +176 -0
  87. package/Components/JsonConfigComponent/ConfigUser.js.map +1 -0
  88. package/Components/JsonConfigComponent/index.js +511 -0
  89. package/Components/JsonConfigComponent/index.js.map +1 -0
  90. package/Components/Loader.js.map +1 -1
  91. package/Components/Loaders/PT.js.map +1 -1
  92. package/Components/Loaders/Vendor.js.map +1 -1
  93. package/Components/Logo.js.map +1 -1
  94. package/Components/MDUtils.js.map +1 -1
  95. package/Components/ObjectBrowser.js +24 -42
  96. package/Components/ObjectBrowser.js.map +1 -1
  97. package/Components/Router.js.map +1 -1
  98. package/Components/SaveCloseButtons.js.map +1 -1
  99. package/Components/Schedule.js.map +1 -1
  100. package/Components/SelectWithIcon.js.map +1 -1
  101. package/Components/SimpleCron/cronText.js.map +1 -1
  102. package/Components/SimpleCron/index.js.map +1 -1
  103. package/Components/TabContainer.js.map +1 -1
  104. package/Components/TabContent.js.map +1 -1
  105. package/Components/TabHeader.js.map +1 -1
  106. package/Components/TextWithIcon.js.map +1 -1
  107. package/Components/TreeTable.js.map +1 -1
  108. package/Components/Utils.js +25 -0
  109. package/Components/Utils.js.map +1 -1
  110. package/Components/withWidth.js +42 -0
  111. package/Components/withWidth.js.map +1 -0
  112. package/Connection.js.map +1 -1
  113. package/Dialogs/ComplexCron.js.map +1 -1
  114. package/Dialogs/Confirm.js.map +1 -1
  115. package/Dialogs/Cron.js.map +1 -1
  116. package/Dialogs/Error.js.map +1 -1
  117. package/Dialogs/Message.js.map +1 -1
  118. package/Dialogs/SelectID.js.map +1 -1
  119. package/Dialogs/SimpleCron.js.map +1 -1
  120. package/Dialogs/TextInput.js.map +1 -1
  121. package/GenericApp.js.map +1 -1
  122. package/README.md +11 -1
  123. package/Theme.js.map +1 -1
  124. package/icons/IconAdapter.js.map +1 -1
  125. package/icons/IconAlias.js.map +1 -1
  126. package/icons/IconChannel.js.map +1 -1
  127. package/icons/IconClearFilter.js.map +1 -1
  128. package/icons/IconClosed.js.map +1 -1
  129. package/icons/IconCopy.js.map +1 -1
  130. package/icons/IconDevice.js.map +1 -1
  131. package/icons/IconDocument.js.map +1 -1
  132. package/icons/IconExpert.js.map +1 -1
  133. package/icons/IconFx.js.map +1 -1
  134. package/icons/IconInstance.js.map +1 -1
  135. package/icons/IconLogout.js.map +1 -1
  136. package/icons/IconOpen.js.map +1 -1
  137. package/icons/IconState.js.map +1 -1
  138. package/package.json +5 -5
@@ -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,CAACC,OAAL,CAAa,KAAI,CAACR,KAAL,CAAWC,MAAX,CAAkBM,IAA/B,EAAqC,IAArC,CAAzB,GAAsE,IAAnF;YACAA,IAAI,IAAIE,MAAM,CAACC,IAAP,CAAYH,IAAZ,EAAkB,QAAlB,CAAR;UACH,CAJQ,GAIL;Q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