@iobroker/adapter-react-v5 4.8.0 → 4.9.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/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 -114
- package/Dialogs/SelectID.js +141 -246
- package/LegacyConnection.d.ts +1 -1
- package/README.md +7 -3
- package/i18n.d.ts +2 -2
- package/index.d.ts +127 -126
- package/index.js +213 -192
- package/package.json +7 -8
- 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 -216
- 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
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
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 _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
|
|
11
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
12
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
13
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
|
-
var _react = _interopRequireDefault(require("react"));
|
|
15
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
16
|
-
var _styles = require("@mui/styles");
|
|
17
|
-
var _material = require("@mui/material");
|
|
18
|
-
var _ConfigGeneric2 = _interopRequireDefault(require("./ConfigGeneric"));
|
|
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; } }
|
|
21
|
-
var styles = function styles() {
|
|
22
|
-
return {
|
|
23
|
-
fullWidth: {
|
|
24
|
-
width: '100%'
|
|
25
|
-
},
|
|
26
|
-
slider: {
|
|
27
|
-
marginLeft: 10,
|
|
28
|
-
marginRight: 10,
|
|
29
|
-
width: 'calc(100% - 20px)'
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
var ConfigSlider = /*#__PURE__*/function (_ConfigGeneric) {
|
|
34
|
-
(0, _inherits2["default"])(ConfigSlider, _ConfigGeneric);
|
|
35
|
-
var _super = _createSuper(ConfigSlider);
|
|
36
|
-
function ConfigSlider() {
|
|
37
|
-
(0, _classCallCheck2["default"])(this, ConfigSlider);
|
|
38
|
-
return _super.apply(this, arguments);
|
|
39
|
-
}
|
|
40
|
-
(0, _createClass2["default"])(ConfigSlider, [{
|
|
41
|
-
key: "componentDidMount",
|
|
42
|
-
value: function componentDidMount() {
|
|
43
|
-
(0, _get2["default"])((0, _getPrototypeOf2["default"])(ConfigSlider.prototype), "componentDidMount", this).call(this);
|
|
44
|
-
var _value = _ConfigGeneric2["default"].getValue(this.props.data, this.props.attr);
|
|
45
|
-
this.setState({
|
|
46
|
-
_value: _value
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
}, {
|
|
50
|
-
key: "renderItem",
|
|
51
|
-
value: function renderItem(error, disabled /* , defaultValue */) {
|
|
52
|
-
var _this = this;
|
|
53
|
-
var min = this.props.schema.min || 0;
|
|
54
|
-
var max = this.props.schema.max || 100;
|
|
55
|
-
var unit = this.props.schema.unit || '';
|
|
56
|
-
var marks = [{
|
|
57
|
-
value: min,
|
|
58
|
-
label: min + unit
|
|
59
|
-
}, {
|
|
60
|
-
value: max,
|
|
61
|
-
label: max + unit
|
|
62
|
-
}];
|
|
63
|
-
return /*#__PURE__*/_react["default"].createElement(_material.Box, {
|
|
64
|
-
className: this.props.classes.fullWidth
|
|
65
|
-
}, this.props.schema.label ? /*#__PURE__*/_react["default"].createElement(_material.Typography, {
|
|
66
|
-
gutterBottom: true
|
|
67
|
-
}, this.getText(this.props.schema.label)) : null, /*#__PURE__*/_react["default"].createElement(_material.Slider, {
|
|
68
|
-
className: this.props.classes.slider,
|
|
69
|
-
value: this.state._value,
|
|
70
|
-
getAriaValueText: function getAriaValueText(value) {
|
|
71
|
-
return value + unit;
|
|
72
|
-
},
|
|
73
|
-
step: this.props.schema.step || (max - min) / 100,
|
|
74
|
-
valueLabelDisplay: "auto",
|
|
75
|
-
marks: marks,
|
|
76
|
-
min: min,
|
|
77
|
-
max: max,
|
|
78
|
-
disabled: !!disabled,
|
|
79
|
-
error: error || '',
|
|
80
|
-
onChange: function onChange(e) {
|
|
81
|
-
var _value = e.target.value;
|
|
82
|
-
_this.setState({
|
|
83
|
-
_value: _value
|
|
84
|
-
}, function () {
|
|
85
|
-
return _this.onChange(_this.props.attr, _value);
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
}), this.props.schema.help ? /*#__PURE__*/_react["default"].createElement(_material.Typography, null, this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)) : null);
|
|
89
|
-
}
|
|
90
|
-
}], [{
|
|
91
|
-
key: "getDerivedStateFromProps",
|
|
92
|
-
value: function getDerivedStateFromProps(props, state) {
|
|
93
|
-
if (props.schema.min !== undefined && props.schema.min < 0 || props.schema.max !== undefined && props.schema.max < 0) {
|
|
94
|
-
return null;
|
|
95
|
-
}
|
|
96
|
-
var _value = _ConfigGeneric2["default"].getValue(props.data, props.attr);
|
|
97
|
-
if (_value === null || _value === undefined || _value.toString() !== parseFloat(state._value).toString()) {
|
|
98
|
-
return {
|
|
99
|
-
_value: _value
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
return null;
|
|
103
|
-
}
|
|
104
|
-
}]);
|
|
105
|
-
return ConfigSlider;
|
|
106
|
-
}(_ConfigGeneric2["default"]);
|
|
107
|
-
ConfigSlider.propTypes = {
|
|
108
|
-
socket: _propTypes["default"].object.isRequired,
|
|
109
|
-
themeType: _propTypes["default"].string,
|
|
110
|
-
themeName: _propTypes["default"].string,
|
|
111
|
-
style: _propTypes["default"].object,
|
|
112
|
-
className: _propTypes["default"].string,
|
|
113
|
-
data: _propTypes["default"].object.isRequired,
|
|
114
|
-
schema: _propTypes["default"].object,
|
|
115
|
-
onError: _propTypes["default"].func,
|
|
116
|
-
onChange: _propTypes["default"].func
|
|
117
|
-
};
|
|
118
|
-
var _default = exports["default"] = (0, _styles.withStyles)(styles)(ConfigSlider);
|
|
119
|
-
//# sourceMappingURL=ConfigSlider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigSlider.js","names":["_react","_interopRequireDefault","require","_propTypes","_styles","_material","_ConfigGeneric2","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","arguments","apply","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","e","styles","fullWidth","width","slider","marginLeft","marginRight","ConfigSlider","_ConfigGeneric","_inherits2","_super","_classCallCheck2","_createClass2","key","value","componentDidMount","_get2","_value","ConfigGeneric","getValue","props","data","attr","setState","renderItem","error","disabled","_this","min","schema","max","unit","marks","label","createElement","Box","className","classes","Typography","gutterBottom","getText","Slider","state","getAriaValueText","step","valueLabelDisplay","onChange","target","help","renderHelp","helpLink","noTranslation","getDerivedStateFromProps","undefined","toString","parseFloat","propTypes","socket","PropTypes","object","isRequired","themeType","string","themeName","style","onError","func","_default","exports","withStyles"],"sources":["JsonConfigComponent/ConfigSlider.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport { Box, Typography, Slider } from '@mui/material';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = () => ({\n fullWidth: {\n width: '100%',\n },\n slider: {\n marginLeft: 10,\n marginRight: 10,\n width: 'calc(100% - 20px)',\n },\n});\n\nclass ConfigSlider extends ConfigGeneric {\n componentDidMount() {\n super.componentDidMount();\n const _value = ConfigGeneric.getValue(this.props.data, this.props.attr);\n this.setState({ _value });\n }\n\n static getDerivedStateFromProps(props, state) {\n if (\n (props.schema.min !== undefined && props.schema.min < 0) ||\n (props.schema.max !== undefined && props.schema.max < 0)\n ) {\n return null;\n }\n const _value = ConfigGeneric.getValue(props.data, props.attr);\n if (_value === null || _value === undefined || _value.toString() !== parseFloat(state._value).toString()) {\n return { _value };\n }\n\n return null;\n }\n\n renderItem(error, disabled /* , defaultValue */) {\n const min = this.props.schema.min || 0;\n const max = this.props.schema.max || 100;\n const unit = this.props.schema.unit || '';\n\n const marks = [\n { value: min, label: min + unit },\n { value: max, label: max + unit },\n ];\n\n return (\n <Box className={this.props.classes.fullWidth}>\n {this.props.schema.label ? (\n <Typography gutterBottom>{this.getText(this.props.schema.label)}</Typography>\n ) : null}\n <Slider\n className={this.props.classes.slider}\n value={this.state._value}\n getAriaValueText={value => value + unit}\n step={this.props.schema.step || (max - min) / 100}\n valueLabelDisplay=\"auto\"\n marks={marks}\n min={min}\n max={max}\n disabled={!!disabled}\n error={error || ''}\n onChange={e => {\n const _value = e.target.value;\n this.setState({ _value }, () => this.onChange(this.props.attr, _value));\n }}\n />\n {this.props.schema.help ? <Typography>\n {this.renderHelp(\n this.props.schema.help,\n this.props.schema.helpLink,\n this.props.schema.noTranslation,\n )}\n </Typography> : null}\n </Box>\n );\n }\n}\n\nConfigSlider.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)(ConfigSlider);\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,SAAA,GAAAH,OAAA;AAEA,IAAAI,eAAA,GAAAL,sBAAA,CAAAC,OAAA;AAA4C,SAAAK,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,aAAAL,OAAA,GAAAM,MAAA,MAAAL,yBAAA,QAAAM,SAAA,OAAAF,gBAAA,mBAAAG,WAAA,EAAAF,MAAA,GAAAG,OAAA,CAAAC,SAAA,CAAAN,KAAA,EAAAO,SAAA,EAAAJ,SAAA,YAAAD,MAAA,GAAAF,KAAA,CAAAQ,KAAA,OAA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AU,CAACb,KAAK,CAACzB,MAAM,CAAC,CAACqC,QAAQ,CAAC,CAAC,EAAE;QACtG,OAAO;UAAErC,MAAM,EAANA;QAAO,CAAC;MACrB;MAEA,OAAO,IAAI;IACf;EAAC;EAAA,OAAAV,YAAA;AAAA,EApBsBW,0BAAa;AAiExCX,YAAY,CAACiD,SAAS,GAAG;EACrBC,MAAM,EAAEC,qBAAS,CAACC,MAAM,CAACC,UAAU;EACnCC,SAAS,EAAEH,qBAAS,CAACI,MAAM;EAC3BC,SAAS,EAAEL,qBAAS,CAACI,MAAM;EAC3BE,KAAK,EAAEN,qBAAS,CAACC,MAAM;EACvBvB,SAAS,EAAEsB,qBAAS,CAACI,MAAM;EAC3BzC,IAAI,EAAEqC,qBAAS,CAACC,MAAM,CAACC,UAAU;EACjC/B,MAAM,EAAE6B,qBAAS,CAACC,MAAM;EACxBM,OAAO,EAAEP,qBAAS,CAACQ,IAAI;EACvBpB,QAAQ,EAAEY,qBAAS,CAACQ;AACxB,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEa,IAAAC,kBAAU,EAACpE,MAAM,CAAC,CAACM,YAAY,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
declare const _default: React.JSXElementConstructor<Omit<Pick<import("./ConfigGeneric").ConfigGenericProps, "classes" | "disabled" | "data" | "onChange" | "onError" | "originalData" | "instanceObj" | "customObj" | "schema" | "attr" | "custom" | "forceUpdate" | "alive" | "systemConfig" | "socket" | "changed" | "adapterName" | "instance" | "common" | "themeType"> & Pick<PropTypes.InferProps<{
|
|
2
|
-
socket: PropTypes.Validator<object>;
|
|
3
|
-
themeType: PropTypes.Requireable<string>;
|
|
4
|
-
themeName: PropTypes.Requireable<string>;
|
|
5
|
-
style: PropTypes.Requireable<object>;
|
|
6
|
-
className: PropTypes.Requireable<string>;
|
|
7
|
-
data: PropTypes.Validator<object>;
|
|
8
|
-
schema: PropTypes.Requireable<object>;
|
|
9
|
-
onError: PropTypes.Requireable<(...args: any[]) => any>;
|
|
10
|
-
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
11
|
-
}>, "style" | "className" | "themeName"> & Pick<import("./ConfigGeneric").ConfigGenericProps, "classes" | "disabled" | "originalData" | "instanceObj" | "customObj" | "arrayIndex" | "globalData" | "registerOnForceUpdate" | "attr" | "custom" | "forceUpdate" | "alive" | "systemConfig" | "changed" | "adapterName" | "instance" | "common" | "commandRunning">, "classes"> & import("@mui/styles").StyledComponentProps<"fullWidth" | "primary" | "secondary"> & object>;
|
|
12
|
-
export default _default;
|
|
13
|
-
import PropTypes from 'prop-types';
|
|
14
|
-
import React from 'react';
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
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 _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
-
var _styles = require("@mui/styles");
|
|
16
|
-
var _Utils = _interopRequireDefault(require("./wrapper/Components/Utils"));
|
|
17
|
-
var _ConfigGeneric2 = _interopRequireDefault(require("./ConfigGeneric"));
|
|
18
|
-
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); }; }
|
|
19
|
-
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; } }
|
|
20
|
-
var styles = function styles(theme) {
|
|
21
|
-
return {
|
|
22
|
-
fullWidth: {
|
|
23
|
-
width: '100%',
|
|
24
|
-
backgroundColor: theme.palette.mode === 'dark' ? '#FFF' : '#000',
|
|
25
|
-
borderStyle: 'hidden'
|
|
26
|
-
},
|
|
27
|
-
primary: {
|
|
28
|
-
backgroundColor: theme.palette.primary.main
|
|
29
|
-
},
|
|
30
|
-
secondary: {
|
|
31
|
-
backgroundColor: theme.palette.secondary.main
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
var ConfigStaticDivider = /*#__PURE__*/function (_ConfigGeneric) {
|
|
36
|
-
(0, _inherits2["default"])(ConfigStaticDivider, _ConfigGeneric);
|
|
37
|
-
var _super = _createSuper(ConfigStaticDivider);
|
|
38
|
-
function ConfigStaticDivider() {
|
|
39
|
-
(0, _classCallCheck2["default"])(this, ConfigStaticDivider);
|
|
40
|
-
return _super.apply(this, arguments);
|
|
41
|
-
}
|
|
42
|
-
(0, _createClass2["default"])(ConfigStaticDivider, [{
|
|
43
|
-
key: "renderItem",
|
|
44
|
-
value: function renderItem() {
|
|
45
|
-
return /*#__PURE__*/_react["default"].createElement("hr", {
|
|
46
|
-
className: _Utils["default"].clsx(this.props.classes.fullWidth, this.props.schema.color === 'primary' && this.props.classes.primary, this.props.schema.color === 'secondary' && this.props.classes.secondary),
|
|
47
|
-
style: {
|
|
48
|
-
height: this.props.schema.color ? this.props.schema.height || 2 : this.props.schema.height || 1,
|
|
49
|
-
backgroundColor: this.props.schema.color !== 'primary' && this.props.schema.color !== 'secondary' && this.props.schema.color ? this.props.schema.color : undefined
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
}]);
|
|
54
|
-
return ConfigStaticDivider;
|
|
55
|
-
}(_ConfigGeneric2["default"]);
|
|
56
|
-
ConfigStaticDivider.propTypes = {
|
|
57
|
-
socket: _propTypes["default"].object.isRequired,
|
|
58
|
-
themeType: _propTypes["default"].string,
|
|
59
|
-
themeName: _propTypes["default"].string,
|
|
60
|
-
style: _propTypes["default"].object,
|
|
61
|
-
className: _propTypes["default"].string,
|
|
62
|
-
data: _propTypes["default"].object.isRequired,
|
|
63
|
-
schema: _propTypes["default"].object,
|
|
64
|
-
onError: _propTypes["default"].func,
|
|
65
|
-
onChange: _propTypes["default"].func
|
|
66
|
-
};
|
|
67
|
-
var _default = exports["default"] = (0, _styles.withStyles)(styles)(ConfigStaticDivider);
|
|
68
|
-
//# sourceMappingURL=ConfigStaticDivider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigStaticDivider.js","names":["_react","_interopRequireDefault","require","_propTypes","_styles","_Utils","_ConfigGeneric2","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","arguments","apply","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","e","styles","theme","fullWidth","width","backgroundColor","palette","mode","borderStyle","primary","main","secondary","ConfigStaticDivider","_ConfigGeneric","_inherits2","_super","_classCallCheck2","_createClass2","key","value","renderItem","createElement","className","Utils","clsx","props","classes","schema","color","style","height","undefined","ConfigGeneric","propTypes","socket","PropTypes","object","isRequired","themeType","string","themeName","data","onError","func","onChange","_default","exports","withStyles"],"sources":["JsonConfigComponent/ConfigStaticDivider.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport Utils from './wrapper/Components/Utils';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n fullWidth: {\n width: '100%',\n backgroundColor: theme.palette.mode === 'dark' ? '#FFF' : '#000',\n borderStyle: 'hidden',\n },\n primary: {\n backgroundColor: theme.palette.primary.main,\n },\n secondary: {\n backgroundColor: theme.palette.secondary.main,\n },\n});\n\nclass ConfigStaticDivider extends ConfigGeneric {\n renderItem() {\n return <hr\n className={Utils.clsx(\n this.props.classes.fullWidth,\n this.props.schema.color === 'primary' && this.props.classes.primary,\n this.props.schema.color === 'secondary' && this.props.classes.secondary,\n )}\n style={{\n height: this.props.schema.color ? this.props.schema.height || 2 : this.props.schema.height || 1,\n backgroundColor: this.props.schema.color !== 'primary' && this.props.schema.color !== 'secondary' && this.props.schema.color ? this.props.schema.color : undefined,\n }}\n />;\n }\n}\n\nConfigStaticDivider.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)(ConfigStaticDivider);\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,MAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAEA,IAAAI,eAAA,GAAAL,sBAAA,CAAAC,OAAA;AAA4C,SAAAK,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,aAAAL,OAAA,GAAAM,MAAA,MAAAL,yBAAA,QAAAM,SAAA,OAAAF,gBAAA,mBAAAG,WAAA,EAAAF,MAAA,GA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IAAAC,kBAAU,EAAC9C,MAAM,CAAC,CAACW,mBAAmB,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
declare const _default: React.JSXElementConstructor<Omit<Pick<import("./ConfigGeneric").ConfigGenericProps, "classes" | "disabled" | "data" | "onChange" | "onError" | "originalData" | "instanceObj" | "customObj" | "schema" | "attr" | "custom" | "forceUpdate" | "alive" | "systemConfig" | "socket" | "changed" | "adapterName" | "instance" | "common" | "themeType"> & Pick<PropTypes.InferProps<{
|
|
2
|
-
socket: PropTypes.Validator<object>;
|
|
3
|
-
themeType: PropTypes.Requireable<string>;
|
|
4
|
-
themeName: PropTypes.Requireable<string>;
|
|
5
|
-
style: PropTypes.Requireable<object>;
|
|
6
|
-
className: PropTypes.Requireable<string>;
|
|
7
|
-
data: PropTypes.Validator<object>;
|
|
8
|
-
schema: PropTypes.Requireable<object>;
|
|
9
|
-
onError: PropTypes.Requireable<(...args: any[]) => any>;
|
|
10
|
-
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
11
|
-
}>, "style" | "className" | "themeName"> & Pick<import("./ConfigGeneric").ConfigGenericProps, "classes" | "disabled" | "originalData" | "instanceObj" | "customObj" | "arrayIndex" | "globalData" | "registerOnForceUpdate" | "attr" | "custom" | "forceUpdate" | "alive" | "systemConfig" | "changed" | "adapterName" | "instance" | "common" | "commandRunning">, "classes"> & import("@mui/styles").StyledComponentProps<"header"> & object>;
|
|
12
|
-
export default _default;
|
|
13
|
-
import PropTypes from 'prop-types';
|
|
14
|
-
import React from 'react';
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
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 _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
-
var _styles = require("@mui/styles");
|
|
16
|
-
var _ConfigGeneric2 = _interopRequireDefault(require("./ConfigGeneric"));
|
|
17
|
-
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); }; }
|
|
18
|
-
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; } }
|
|
19
|
-
var styles = function styles(theme) {
|
|
20
|
-
return {
|
|
21
|
-
header: {
|
|
22
|
-
width: '100%',
|
|
23
|
-
background: theme.palette.primary.main,
|
|
24
|
-
color: theme.palette.primary.contrastText,
|
|
25
|
-
padding: '4px !important',
|
|
26
|
-
borderRadius: 3,
|
|
27
|
-
marginBlockEnd: 0,
|
|
28
|
-
marginBlockStart: 0
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
var ConfigStaticHeader = /*#__PURE__*/function (_ConfigGeneric) {
|
|
33
|
-
(0, _inherits2["default"])(ConfigStaticHeader, _ConfigGeneric);
|
|
34
|
-
var _super = _createSuper(ConfigStaticHeader);
|
|
35
|
-
function ConfigStaticHeader() {
|
|
36
|
-
(0, _classCallCheck2["default"])(this, ConfigStaticHeader);
|
|
37
|
-
return _super.apply(this, arguments);
|
|
38
|
-
}
|
|
39
|
-
(0, _createClass2["default"])(ConfigStaticHeader, [{
|
|
40
|
-
key: "renderItem",
|
|
41
|
-
value: function renderItem() {
|
|
42
|
-
switch ((this.props.schema.size || 5).toString()) {
|
|
43
|
-
case '1':
|
|
44
|
-
return /*#__PURE__*/_react["default"].createElement("h1", {
|
|
45
|
-
className: this.props.classes.header
|
|
46
|
-
}, this.getText(this.props.schema.text, this.props.schema.noTranslation));
|
|
47
|
-
case '2':
|
|
48
|
-
return /*#__PURE__*/_react["default"].createElement("h2", {
|
|
49
|
-
className: this.props.classes.header
|
|
50
|
-
}, this.getText(this.props.schema.text, this.props.schema.noTranslation));
|
|
51
|
-
case '3':
|
|
52
|
-
return /*#__PURE__*/_react["default"].createElement("h3", {
|
|
53
|
-
className: this.props.classes.header
|
|
54
|
-
}, this.getText(this.props.schema.text, this.props.schema.noTranslation));
|
|
55
|
-
case '4':
|
|
56
|
-
return /*#__PURE__*/_react["default"].createElement("h4", {
|
|
57
|
-
className: this.props.classes.header
|
|
58
|
-
}, this.getText(this.props.schema.text, this.props.schema.noTranslation));
|
|
59
|
-
case '5':
|
|
60
|
-
default:
|
|
61
|
-
return /*#__PURE__*/_react["default"].createElement("h5", {
|
|
62
|
-
className: this.props.classes.header
|
|
63
|
-
}, this.getText(this.props.schema.text, this.props.schema.noTranslation));
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}]);
|
|
67
|
-
return ConfigStaticHeader;
|
|
68
|
-
}(_ConfigGeneric2["default"]);
|
|
69
|
-
ConfigStaticHeader.propTypes = {
|
|
70
|
-
socket: _propTypes["default"].object.isRequired,
|
|
71
|
-
themeType: _propTypes["default"].string,
|
|
72
|
-
themeName: _propTypes["default"].string,
|
|
73
|
-
style: _propTypes["default"].object,
|
|
74
|
-
className: _propTypes["default"].string,
|
|
75
|
-
data: _propTypes["default"].object.isRequired,
|
|
76
|
-
schema: _propTypes["default"].object,
|
|
77
|
-
onError: _propTypes["default"].func,
|
|
78
|
-
onChange: _propTypes["default"].func
|
|
79
|
-
};
|
|
80
|
-
var _default = exports["default"] = (0, _styles.withStyles)(styles)(ConfigStaticHeader);
|
|
81
|
-
//# sourceMappingURL=ConfigStaticHeader.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigStaticHeader.js","names":["_react","_interopRequireDefault","require","_propTypes","_styles","_ConfigGeneric2","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","arguments","apply","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","e","styles","theme","header","width","background","palette","primary","main","color","contrastText","padding","borderRadius","marginBlockEnd","marginBlockStart","ConfigStaticHeader","_ConfigGeneric","_inherits2","_super","_classCallCheck2","_createClass2","key","value","renderItem","props","schema","size","toString","createElement","className","classes","getText","text","noTranslation","ConfigGeneric","propTypes","socket","PropTypes","object","isRequired","themeType","string","themeName","style","data","onError","func","onChange","_default","exports","withStyles"],"sources":["JsonConfigComponent/ConfigStaticHeader.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n header: {\n width: '100%',\n background: theme.palette.primary.main,\n color: theme.palette.primary.contrastText,\n padding: '4px !important',\n borderRadius: 3,\n marginBlockEnd: 0,\n marginBlockStart: 0,\n },\n});\n\nclass ConfigStaticHeader extends ConfigGeneric {\n renderItem() {\n switch ((this.props.schema.size || 5).toString()) {\n case '1':\n return <h1 className={this.props.classes.header}>\n {this.getText(this.props.schema.text, this.props.schema.noTranslation)}\n </h1>;\n\n case '2':\n return <h2 className={this.props.classes.header}>\n {this.getText(this.props.schema.text, this.props.schema.noTranslation)}\n </h2>;\n\n case '3':\n return <h3 className={this.props.classes.header}>\n {this.getText(this.props.schema.text, this.props.schema.noTranslation)}\n </h3>;\n\n case '4':\n return <h4 className={this.props.classes.header}>\n {this.getText(this.props.schema.text, this.props.schema.noTranslation)}\n </h4>;\n\n case '5':\n default:\n return <h5 className={this.props.classes.header}>\n {this.getText(this.props.schema.text, this.props.schema.noTranslation)}\n </h5>;\n }\n }\n}\n\nConfigStaticHeader.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)(ConfigStaticHeader);\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,eAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAA4C,SAAAI,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,aAAAL,OAAA,GAAAM,MAAA,MAAAL,yBAAA,QAAAM,SAAA,OAAAF,gBAAA,mBAAAG,WAAA,EAAAF,MAAA,GAAAG,OAAA,CAAAC,SAAA,CAAAN,KAAA,EAAAO,SAAA,EAAAJ,SAAA,YAAAD,MAAA,GAAAF,KAAA,CAAAQ,KAAA,OAAAD,SAAA,gBAAAE,2BAAA,mBAAAP,MAAA;AAAA,SAAAJ,0BAAA,eAAAO,OAAA,qBAAAA,OAAA,CAAAC,SAAA,oBAAAD,OAAA,CAAAC,SAAA,CAAAI,IAAA,2BAAAC,KAAA,oCAAAC,OAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC,IAAA,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CAACC,MAAM,CAACC,UAAU;EACjCd,MAAM,EAAEY,qBAAS,CAACC,MAAM;EACxBO,OAAO,EAAER,qBAAS,CAACS,IAAI;EACvBC,QAAQ,EAAEV,qBAAS,CAACS;AACxB,CAAC;AAAC,IAAAE,QAAA,GAAAC,OAAA,cAEa,IAAAC,kBAAU,EAACjD,MAAM,CAAC,CAACc,kBAAkB,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
declare const _default: React.JSXElementConstructor<Omit<Pick<import("./ConfigGeneric").ConfigGenericProps, "classes" | "disabled" | "data" | "onChange" | "onError" | "originalData" | "instanceObj" | "customObj" | "schema" | "attr" | "custom" | "forceUpdate" | "alive" | "systemConfig" | "socket" | "changed" | "adapterName" | "instance" | "common" | "themeType"> & Pick<PropTypes.InferProps<{
|
|
2
|
-
socket: PropTypes.Validator<object>;
|
|
3
|
-
themeType: PropTypes.Requireable<string>;
|
|
4
|
-
themeName: PropTypes.Requireable<string>;
|
|
5
|
-
style: PropTypes.Requireable<object>;
|
|
6
|
-
className: PropTypes.Requireable<string>;
|
|
7
|
-
data: PropTypes.Validator<object>;
|
|
8
|
-
schema: PropTypes.Requireable<object>;
|
|
9
|
-
onError: PropTypes.Requireable<(...args: any[]) => any>;
|
|
10
|
-
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
11
|
-
}>, "style" | "className" | "themeName"> & Pick<import("./ConfigGeneric").ConfigGenericProps, "classes" | "disabled" | "originalData" | "instanceObj" | "customObj" | "arrayIndex" | "globalData" | "registerOnForceUpdate" | "attr" | "custom" | "forceUpdate" | "alive" | "systemConfig" | "changed" | "adapterName" | "instance" | "common" | "commandRunning">, "classes"> & import("@mui/styles").StyledComponentProps<"fullWidth"> & object>;
|
|
12
|
-
export default _default;
|
|
13
|
-
import PropTypes from 'prop-types';
|
|
14
|
-
import React from 'react';
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
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 _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
-
var _styles = require("@mui/styles");
|
|
16
|
-
var _ConfigGeneric2 = _interopRequireDefault(require("./ConfigGeneric"));
|
|
17
|
-
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); }; }
|
|
18
|
-
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; } }
|
|
19
|
-
var styles = function styles() {
|
|
20
|
-
return {
|
|
21
|
-
fullWidth: {
|
|
22
|
-
height: '100%',
|
|
23
|
-
width: '100%'
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
var ConfigStaticImage = /*#__PURE__*/function (_ConfigGeneric) {
|
|
28
|
-
(0, _inherits2["default"])(ConfigStaticImage, _ConfigGeneric);
|
|
29
|
-
var _super = _createSuper(ConfigStaticImage);
|
|
30
|
-
function ConfigStaticImage() {
|
|
31
|
-
(0, _classCallCheck2["default"])(this, ConfigStaticImage);
|
|
32
|
-
return _super.apply(this, arguments);
|
|
33
|
-
}
|
|
34
|
-
(0, _createClass2["default"])(ConfigStaticImage, [{
|
|
35
|
-
key: "renderItem",
|
|
36
|
-
value: function renderItem() {
|
|
37
|
-
var _this = this;
|
|
38
|
-
var src = this.props.schema.src;
|
|
39
|
-
if (src && !src.startsWith('.') && !src.startsWith('http') && !src.startsWith("adapter/".concat(this.props.adapterName, "/")) && !src.startsWith("./adapter/".concat(this.props.adapterName, "/"))) {
|
|
40
|
-
src = "adapter/".concat(this.props.adapterName, "/").concat(src);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
44
|
-
return /*#__PURE__*/_react["default"].createElement("img", {
|
|
45
|
-
className: this.props.classes.fullWidth,
|
|
46
|
-
src: src,
|
|
47
|
-
style: this.props.schema.href ? {
|
|
48
|
-
cursor: 'pointer'
|
|
49
|
-
} : {},
|
|
50
|
-
onClick: this.props.schema.href ? function () {
|
|
51
|
-
return _this.props.schema.href && window.open(_this.props.schema.href, '_blank');
|
|
52
|
-
} : null,
|
|
53
|
-
alt: ""
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
}]);
|
|
57
|
-
return ConfigStaticImage;
|
|
58
|
-
}(_ConfigGeneric2["default"]);
|
|
59
|
-
ConfigStaticImage.propTypes = {
|
|
60
|
-
socket: _propTypes["default"].object.isRequired,
|
|
61
|
-
themeType: _propTypes["default"].string,
|
|
62
|
-
themeName: _propTypes["default"].string,
|
|
63
|
-
style: _propTypes["default"].object,
|
|
64
|
-
className: _propTypes["default"].string,
|
|
65
|
-
data: _propTypes["default"].object.isRequired,
|
|
66
|
-
schema: _propTypes["default"].object,
|
|
67
|
-
onError: _propTypes["default"].func,
|
|
68
|
-
onChange: _propTypes["default"].func
|
|
69
|
-
};
|
|
70
|
-
var _default = exports["default"] = (0, _styles.withStyles)(styles)(ConfigStaticImage);
|
|
71
|
-
//# sourceMappingURL=ConfigStaticImage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigStaticImage.js","names":["_react","_interopRequireDefault","require","_propTypes","_styles","_ConfigGeneric2","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","arguments","apply","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","e","styles","fullWidth","height","width","ConfigStaticImage","_ConfigGeneric","_inherits2","_super","_classCallCheck2","_createClass2","key","value","renderItem","_this","src","props","schema","startsWith","concat","adapterName","createElement","className","classes","style","href","cursor","onClick","window","open","alt","ConfigGeneric","propTypes","socket","PropTypes","object","isRequired","themeType","string","themeName","data","onError","func","onChange","_default","exports","withStyles"],"sources":["JsonConfigComponent/ConfigStaticImage.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = () => ({\n fullWidth: {\n height: '100%',\n width: '100%',\n },\n});\n\nclass ConfigStaticImage extends ConfigGeneric {\n renderItem() {\n let src = this.props.schema.src;\n if (src && !src.startsWith('.') &&\n !src.startsWith('http') &&\n !src.startsWith(`adapter/${this.props.adapterName}/`) &&\n !src.startsWith(`./adapter/${this.props.adapterName}/`)\n ) {\n src = `adapter/${this.props.adapterName}/${src}`;\n }\n\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions\n return <img\n className={this.props.classes.fullWidth}\n src={src}\n style={this.props.schema.href ? { cursor: 'pointer' } : {}}\n onClick={this.props.schema.href ? () => this.props.schema.href && window.open(this.props.schema.href, '_blank') : null}\n alt=\"\"\n />;\n }\n}\n\nConfigStaticImage.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)(ConfigStaticImage);\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,eAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAA4C,SAAAI,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,aAAAL,OAAA,GAAAM,MAAA,MAAAL,yBAAA,QAAAM,SAAA,OAAAF,gBAAA,mBAAAG,WAAA,EAAAF,MAAA,GAAAG,OAAA,CAAAC,SAAA,CAAAN,KAAA,EAAAO,SAAA,EAAAJ,SAAA,YAAAD,MAAA,GAAAF,KAAA,CAAAQ,KAAA,OAAAD,SAAA,gBAAAE,2BAAA,mBAAAP,MAAA;AAAA,SAAAJ,0BAAA,eAAAO,OAAA,qBAAAA,OAAA,CAAAC,SAAA,oBAAAD,OAAA,CAAAC,SAAA,CAAAI,IAAA,2BAAAC,KAAA,oCAAAC,OAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC,IAAA,CAAAV,OAAA,CAAAC,SAAA,CAAAM,OAAA,8CAAAI,CAAA;AAE5C,IAAMC,MAAM,GAAG,SAATA,MAAMA,CAAA;EAAA,OAAU;IAClBC,SAAS,EAAE;MACPC,MAAM,EAAE,MAAM;MACdC,KAAK,EAAE;IACX;EACJ,CAAC;AAAA,CAAC;AAAC,IAEGC,iBAAiB,0BAAAC,cAAA;EAAA,IAAAC,UAAA,aAAAF,iBAAA,EAAAC,cAAA;EAAA,IAAAE,MAAA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CACT,CAAC;IACN;EAAC;EAAA,OAAAzB,iBAAA;AAAA,EAnB2B0B,0BAAa;AAsB7C1B,iBAAiB,CAAC2B,SAAS,GAAG;EAC1BC,MAAM,EAAEC,qBAAS,CAACC,MAAM,CAACC,UAAU;EACnCC,SAAS,EAAEH,qBAAS,CAACI,MAAM;EAC3BC,SAAS,EAAEL,qBAAS,CAACI,MAAM;EAC3Bd,KAAK,EAAEU,qBAAS,CAACC,MAAM;EACvBb,SAAS,EAAEY,qBAAS,CAACI,MAAM;EAC3BE,IAAI,EAAEN,qBAAS,CAACC,MAAM,CAACC,UAAU;EACjCnB,MAAM,EAAEiB,qBAAS,CAACC,MAAM;EACxBM,OAAO,EAAEP,qBAAS,CAACQ,IAAI;EACvBC,QAAQ,EAAET,qBAAS,CAACQ;AACxB,CAAC;AAAC,IAAAE,QAAA,GAAAC,OAAA,cAEa,IAAAC,kBAAU,EAAC7C,MAAM,CAAC,CAACI,iBAAiB,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
declare const _default: React.JSXElementConstructor<Omit<Pick<import("./ConfigGeneric").ConfigGenericProps, "classes" | "disabled" | "data" | "onChange" | "onError" | "originalData" | "instanceObj" | "customObj" | "schema" | "attr" | "custom" | "forceUpdate" | "alive" | "systemConfig" | "socket" | "changed" | "adapterName" | "instance" | "common" | "themeType"> & Pick<PropTypes.InferProps<{
|
|
2
|
-
socket: PropTypes.Validator<object>;
|
|
3
|
-
themeType: PropTypes.Requireable<string>;
|
|
4
|
-
themeName: PropTypes.Requireable<string>;
|
|
5
|
-
style: PropTypes.Requireable<object>;
|
|
6
|
-
className: PropTypes.Requireable<string>;
|
|
7
|
-
data: PropTypes.Validator<object>;
|
|
8
|
-
schema: PropTypes.Requireable<object>;
|
|
9
|
-
onError: PropTypes.Requireable<(...args: any[]) => any>;
|
|
10
|
-
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
11
|
-
}>, "style" | "className" | "themeName"> & Pick<import("./ConfigGeneric").ConfigGenericProps, "classes" | "disabled" | "originalData" | "instanceObj" | "customObj" | "arrayIndex" | "globalData" | "registerOnForceUpdate" | "attr" | "custom" | "forceUpdate" | "alive" | "systemConfig" | "changed" | "adapterName" | "instance" | "common" | "commandRunning">, "classes"> & import("@mui/styles").StyledComponentProps<"fullWidth" | "link"> & object>;
|
|
12
|
-
export default _default;
|
|
13
|
-
import PropTypes from 'prop-types';
|
|
14
|
-
import React from 'react';
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
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 _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
-
var _styles = require("@mui/styles");
|
|
16
|
-
var _material = require("@mui/material");
|
|
17
|
-
var _Utils = _interopRequireDefault(require("./wrapper/Components/Utils"));
|
|
18
|
-
var _ConfigGeneric2 = _interopRequireDefault(require("./ConfigGeneric"));
|
|
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; } }
|
|
21
|
-
var styles = function styles(theme) {
|
|
22
|
-
return {
|
|
23
|
-
fullWidth: {
|
|
24
|
-
height: '100%',
|
|
25
|
-
width: '100%'
|
|
26
|
-
},
|
|
27
|
-
link: {
|
|
28
|
-
textDecoration: 'underline',
|
|
29
|
-
color: theme.palette.mode === 'dark' ? '#4dabf5' : '#254e72',
|
|
30
|
-
cursor: 'pointer'
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
var ConfigStaticText = /*#__PURE__*/function (_ConfigGeneric) {
|
|
35
|
-
(0, _inherits2["default"])(ConfigStaticText, _ConfigGeneric);
|
|
36
|
-
var _super = _createSuper(ConfigStaticText);
|
|
37
|
-
function ConfigStaticText() {
|
|
38
|
-
(0, _classCallCheck2["default"])(this, ConfigStaticText);
|
|
39
|
-
return _super.apply(this, arguments);
|
|
40
|
-
}
|
|
41
|
-
(0, _createClass2["default"])(ConfigStaticText, [{
|
|
42
|
-
key: "renderItem",
|
|
43
|
-
value: function renderItem(error, disabled) {
|
|
44
|
-
var _this = this;
|
|
45
|
-
if (this.props.schema.button) {
|
|
46
|
-
var icon = this.getIcon();
|
|
47
|
-
return /*#__PURE__*/_react["default"].createElement(_material.Button, {
|
|
48
|
-
variant: this.props.schema.variant || undefined,
|
|
49
|
-
color: this.props.schema.color || 'grey',
|
|
50
|
-
className: this.props.classes.fullWidth,
|
|
51
|
-
disabled: disabled,
|
|
52
|
-
startIcon: icon,
|
|
53
|
-
onClick: this.props.schema.href ? function () {
|
|
54
|
-
// calculate one more time just before call
|
|
55
|
-
var href = _this.props.schema.href ? _this.getText(_this.props.schema.href, true) : null;
|
|
56
|
-
href && window.open(href, '_blank');
|
|
57
|
-
} : null
|
|
58
|
-
}, this.getText(this.props.schema.text || this.props.schema.label, this.props.schema.noTranslation));
|
|
59
|
-
}
|
|
60
|
-
var text = this.getText(this.props.schema.text || this.props.schema.label, this.props.schema.noTranslation);
|
|
61
|
-
if (text && (text.includes('<a ') || text.includes('<br') || text.includes('<b>') || text.includes('<i>'))) {
|
|
62
|
-
text = _Utils["default"].renderTextWithA(text);
|
|
63
|
-
}
|
|
64
|
-
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
65
|
-
className: this.props.schema.href ? this.props.classes.link : '',
|
|
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
|
-
}, text);
|
|
72
|
-
}
|
|
73
|
-
}]);
|
|
74
|
-
return ConfigStaticText;
|
|
75
|
-
}(_ConfigGeneric2["default"]);
|
|
76
|
-
ConfigStaticText.propTypes = {
|
|
77
|
-
socket: _propTypes["default"].object.isRequired,
|
|
78
|
-
themeType: _propTypes["default"].string,
|
|
79
|
-
themeName: _propTypes["default"].string,
|
|
80
|
-
style: _propTypes["default"].object,
|
|
81
|
-
className: _propTypes["default"].string,
|
|
82
|
-
data: _propTypes["default"].object.isRequired,
|
|
83
|
-
schema: _propTypes["default"].object,
|
|
84
|
-
onError: _propTypes["default"].func,
|
|
85
|
-
onChange: _propTypes["default"].func
|
|
86
|
-
};
|
|
87
|
-
var _default = exports["default"] = (0, _styles.withStyles)(styles)(ConfigStaticText);
|
|
88
|
-
//# sourceMappingURL=ConfigStaticText.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigStaticText.js","names":["_react","_interopRequireDefault","require","_propTypes","_styles","_material","_Utils","_ConfigGeneric2","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","arguments","apply","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","e","styles","theme","fullWidth","height","width","link","textDecoration","color","palette","mode","cursor","ConfigStaticText","_ConfigGeneric","_inherits2","_super","_classCallCheck2","_createClass2","key","value","renderItem","error","disabled","_this","props","schema","button","icon","getIcon","createElement","Button","variant","undefined","className","classes","startIcon","onClick","href","getText","window","open","text","label","noTranslation","includes","Utils","renderTextWithA","ConfigGeneric","propTypes","socket","PropTypes","object","isRequired","themeType","string","themeName","style","data","onError","func","onChange","_default","exports","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';\n\nimport Utils from './wrapper/Components/Utils';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n fullWidth: {\n height: '100%',\n width: '100%',\n },\n link: {\n textDecoration: 'underline',\n color: theme.palette.mode === 'dark' ? '#4dabf5' : '#254e72',\n cursor: 'pointer',\n },\n});\n\nclass ConfigStaticText extends ConfigGeneric {\n renderItem(error, disabled) {\n if (this.props.schema.button) {\n const icon = this.getIcon();\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 startIcon={icon}\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.getText(this.props.schema.text || this.props.schema.label, this.props.schema.noTranslation)}\n </Button>;\n }\n let text = this.getText(this.props.schema.text || this.props.schema.label, this.props.schema.noTranslation);\n if (text && (text.includes('<a ') || text.includes('<br') || text.includes('<b>') || text.includes('<i>'))) {\n text = Utils.renderTextWithA(text);\n }\n\n return <span\n className={this.props.schema.href ? this.props.classes.link : ''}\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 {text}\n </span>;\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,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,SAAA,GAAAH,OAAA;AAEA,IAAAI,MAAA,GAAAL,sBAAA,CAAAC,OAAA;AAEA,IAAAK,eAAA,GAAAN,sBAAA,CAAAC,OAAA;AAA4C,SAAAM,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,aAAAL,OAAA,GAAAM,MAAA,MAAAL,yBAAA,QAAAM,SAAA,OAAAF,gBAAA,mBAAAG,WAAA,EAAAF,MAAA,GAAAG,OAAA,CAAAC,SAAA,CAAAN,KAAA,EAAAO,SAAA,EAAAJ,SAAA,YAAAD,MAAA,GAAAF,KAAA,CAAAQ,KAAA,OAAAD,SAAA,gBAAAE,2BAAA,mBAAAP,MAAA;AAAA,SAAAJ,0BAAA,eAAAO,OAAA,qBAAAA,OAAA,CAAAC,SAAA,oBAAAD,OAAA,CAAAC,SAAA,CAAAI,IAAA,2BAAAC,KAAA,oCAAAC,OAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC,IAAA,CAAAV,OAAA,CAAAC,SAAA,CAAAM,OAAA,8CAAAI,CAAA;AAE5C,IAAMC,MAAM,GAAG,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