@iobroker/adapter-react-v5 4.8.1 → 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 +6 -2
- package/i18n.d.ts +2 -2
- package/index.d.ts +127 -126
- package/index.js +213 -192
- package/package.json +6 -7
- package/Components/JsonConfigComponent/ChipInput.d.ts +0 -12
- package/Components/JsonConfigComponent/ChipInput.js +0 -763
- package/Components/JsonConfigComponent/ChipInput.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigAccordion.d.ts +0 -15
- package/Components/JsonConfigComponent/ConfigAccordion.js +0 -348
- package/Components/JsonConfigComponent/ConfigAccordion.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigAlive.d.ts +0 -10
- package/Components/JsonConfigComponent/ConfigAlive.js +0 -105
- package/Components/JsonConfigComponent/ConfigAlive.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigAutocomplete.d.ts +0 -37
- package/Components/JsonConfigComponent/ConfigAutocomplete.js +0 -73
- package/Components/JsonConfigComponent/ConfigAutocompleteSendTo.d.ts +0 -17
- package/Components/JsonConfigComponent/ConfigAutocompleteSendTo.js +0 -131
- package/Components/JsonConfigComponent/ConfigCRON.d.ts +0 -15
- package/Components/JsonConfigComponent/ConfigCRON.js +0 -157
- package/Components/JsonConfigComponent/ConfigCRON.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigCertCollection.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigCertCollection.js +0 -128
- package/Components/JsonConfigComponent/ConfigCertCollection.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigCertificateSelect.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigCertificateSelect.js +0 -149
- package/Components/JsonConfigComponent/ConfigCertificateSelect.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigCertificates.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigCertificates.js +0 -284
- package/Components/JsonConfigComponent/ConfigCertificates.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigCheckLicense.d.ts +0 -3
- package/Components/JsonConfigComponent/ConfigCheckLicense.js +0 -821
- package/Components/JsonConfigComponent/ConfigCheckLicense.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigCheckbox.d.ts +0 -15
- package/Components/JsonConfigComponent/ConfigCheckbox.js +0 -40
- package/Components/JsonConfigComponent/ConfigChip.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigChip.js +0 -120
- package/Components/JsonConfigComponent/ConfigChip.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigColor.d.ts +0 -22
- package/Components/JsonConfigComponent/ConfigColor.js +0 -120
- package/Components/JsonConfigComponent/ConfigColor.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigCoordinates.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigCoordinates.js +0 -265
- package/Components/JsonConfigComponent/ConfigCoordinates.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigCustom.d.ts +0 -26
- package/Components/JsonConfigComponent/ConfigCustom.js +0 -316
- package/Components/JsonConfigComponent/ConfigCustom.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigDatePicker.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigDatePicker.js +0 -91
- package/Components/JsonConfigComponent/ConfigDatePicker.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigDeviceManager.d.ts +0 -6
- package/Components/JsonConfigComponent/ConfigDeviceManager.js +0 -18
- package/Components/JsonConfigComponent/ConfigFile.d.ts +0 -15
- package/Components/JsonConfigComponent/ConfigFile.js +0 -228
- package/Components/JsonConfigComponent/ConfigFile.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigFileSelector.d.ts +0 -3
- package/Components/JsonConfigComponent/ConfigFileSelector.js +0 -625
- package/Components/JsonConfigComponent/ConfigFileSelector.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigFunc.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigFunc.js +0 -124
- package/Components/JsonConfigComponent/ConfigFunc.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigGeneric.d.ts +0 -95
- package/Components/JsonConfigComponent/ConfigGeneric.js +0 -646
- package/Components/JsonConfigComponent/ConfigIP.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigIP.js +0 -130
- package/Components/JsonConfigComponent/ConfigIP.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigImageSendTo.d.ts +0 -10
- package/Components/JsonConfigComponent/ConfigImageSendTo.js +0 -114
- package/Components/JsonConfigComponent/ConfigImageSendTo.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigImageUpload.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigImageUpload.js +0 -166
- package/Components/JsonConfigComponent/ConfigImageUpload.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigInstanceSelect.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigInstanceSelect.js +0 -264
- package/Components/JsonConfigComponent/ConfigInstanceSelect.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigInterface.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigInterface.js +0 -146
- package/Components/JsonConfigComponent/ConfigInterface.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigJsonEditor.d.ts +0 -13
- package/Components/JsonConfigComponent/ConfigJsonEditor.js +0 -145
- package/Components/JsonConfigComponent/ConfigJsonEditor.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigLanguage.d.ts +0 -7
- package/Components/JsonConfigComponent/ConfigLanguage.js +0 -110
- package/Components/JsonConfigComponent/ConfigLicense.d.ts +0 -24
- package/Components/JsonConfigComponent/ConfigLicense.js +0 -183
- package/Components/JsonConfigComponent/ConfigLicense.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigNumber.d.ts +0 -17
- package/Components/JsonConfigComponent/ConfigNumber.js +0 -117
- package/Components/JsonConfigComponent/ConfigObjectId.d.ts +0 -17
- package/Components/JsonConfigComponent/ConfigObjectId.js +0 -167
- package/Components/JsonConfigComponent/ConfigObjectId.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigPanel.d.ts +0 -3
- package/Components/JsonConfigComponent/ConfigPanel.js +0 -396
- package/Components/JsonConfigComponent/ConfigPanel.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigPassword.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigPassword.js +0 -193
- package/Components/JsonConfigComponent/ConfigPassword.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigPattern.d.ts +0 -21
- package/Components/JsonConfigComponent/ConfigPattern.js +0 -65
- package/Components/JsonConfigComponent/ConfigPattern.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigPort.d.ts +0 -3
- package/Components/JsonConfigComponent/ConfigPort.js +0 -176
- package/Components/JsonConfigComponent/ConfigRoom.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigRoom.js +0 -124
- package/Components/JsonConfigComponent/ConfigRoom.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigSelect.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigSelect.js +0 -159
- package/Components/JsonConfigComponent/ConfigSelect.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigSelectSendTo.d.ts +0 -17
- package/Components/JsonConfigComponent/ConfigSelectSendTo.js +0 -272
- package/Components/JsonConfigComponent/ConfigSelectSendTo.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigSendto.d.ts +0 -24
- package/Components/JsonConfigComponent/ConfigSendto.js +0 -294
- package/Components/JsonConfigComponent/ConfigSetState.d.ts +0 -18
- package/Components/JsonConfigComponent/ConfigSetState.js +0 -185
- package/Components/JsonConfigComponent/ConfigSetState.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigSlider.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigSlider.js +0 -119
- package/Components/JsonConfigComponent/ConfigSlider.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigStaticDivider.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigStaticDivider.js +0 -68
- package/Components/JsonConfigComponent/ConfigStaticDivider.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigStaticHeader.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigStaticHeader.js +0 -81
- package/Components/JsonConfigComponent/ConfigStaticHeader.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigStaticImage.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigStaticImage.js +0 -71
- package/Components/JsonConfigComponent/ConfigStaticImage.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigStaticText.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigStaticText.js +0 -88
- package/Components/JsonConfigComponent/ConfigStaticText.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigTable.d.ts +0 -3
- package/Components/JsonConfigComponent/ConfigTable.js +0 -1064
- package/Components/JsonConfigComponent/ConfigTable.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigTabs.d.ts +0 -34
- package/Components/JsonConfigComponent/ConfigTabs.js +0 -162
- package/Components/JsonConfigComponent/ConfigTabs.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigText.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigText.js +0 -226
- package/Components/JsonConfigComponent/ConfigText.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigTextSendTo.d.ts +0 -10
- package/Components/JsonConfigComponent/ConfigTextSendTo.js +0 -129
- package/Components/JsonConfigComponent/ConfigTextSendTo.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigTimePicker.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigTimePicker.js +0 -85
- package/Components/JsonConfigComponent/ConfigTimePicker.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigTopic.d.ts +0 -17
- package/Components/JsonConfigComponent/ConfigTopic.js +0 -110
- package/Components/JsonConfigComponent/ConfigTopic.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigUUID.d.ts +0 -15
- package/Components/JsonConfigComponent/ConfigUUID.js +0 -95
- package/Components/JsonConfigComponent/ConfigUUID.js.map +0 -1
- package/Components/JsonConfigComponent/ConfigUser.d.ts +0 -14
- package/Components/JsonConfigComponent/ConfigUser.js +0 -142
- package/Components/JsonConfigComponent/ConfigUser.js.map +0 -1
- package/Components/JsonConfigComponent/DeviceManager/Communication.d.ts +0 -63
- package/Components/JsonConfigComponent/DeviceManager/Communication.js +0 -268
- package/Components/JsonConfigComponent/DeviceManager/DeviceActionButton.d.ts +0 -11
- package/Components/JsonConfigComponent/DeviceManager/DeviceActionButton.js +0 -15
- package/Components/JsonConfigComponent/DeviceManager/DeviceCard.d.ts +0 -53
- package/Components/JsonConfigComponent/DeviceManager/DeviceCard.js +0 -340
- package/Components/JsonConfigComponent/DeviceManager/DeviceControl.d.ts +0 -45
- package/Components/JsonConfigComponent/DeviceManager/DeviceControl.js +0 -146
- package/Components/JsonConfigComponent/DeviceManager/DeviceImageUpload.d.ts +0 -12
- package/Components/JsonConfigComponent/DeviceManager/DeviceImageUpload.js +0 -69
- package/Components/JsonConfigComponent/DeviceManager/DeviceList.d.ts +0 -51
- package/Components/JsonConfigComponent/DeviceManager/DeviceList.js +0 -226
- package/Components/JsonConfigComponent/DeviceManager/DeviceStatus.d.ts +0 -13
- package/Components/JsonConfigComponent/DeviceManager/DeviceStatus.js +0 -111
- package/Components/JsonConfigComponent/DeviceManager/InstanceActionButton.d.ts +0 -7
- package/Components/JsonConfigComponent/DeviceManager/InstanceActionButton.js +0 -16
- package/Components/JsonConfigComponent/DeviceManager/JsonConfig.d.ts +0 -11
- package/Components/JsonConfigComponent/DeviceManager/JsonConfig.js +0 -94
- package/Components/JsonConfigComponent/DeviceManager/TooltipButton.d.ts +0 -10
- package/Components/JsonConfigComponent/DeviceManager/TooltipButton.js +0 -22
- package/Components/JsonConfigComponent/DeviceManager/Utils.d.ts +0 -12
- package/Components/JsonConfigComponent/DeviceManager/Utils.js +0 -158
- package/Components/JsonConfigComponent/DeviceManager/i18n/de.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/i18n/en.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/i18n/es.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/i18n/fr.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/i18n/i18n.d.ts +0 -26
- package/Components/JsonConfigComponent/DeviceManager/i18n/it.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/i18n/nl.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/i18n/pl.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/i18n/pt.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/i18n/ru.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/i18n/uk.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/i18n/zh-cn.json +0 -21
- package/Components/JsonConfigComponent/DeviceManager/index.d.ts +0 -2
- package/Components/JsonConfigComponent/DeviceManager/index.js +0 -10
- package/Components/JsonConfigComponent/DeviceManager/index.js.map +0 -1
- package/Components/JsonConfigComponent/index.d.ts +0 -26
- package/Components/JsonConfigComponent/index.js +0 -520
- package/Components/JsonConfigComponent/index.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/AdminConnection.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/AdminConnection.js +0 -7
- package/Components/JsonConfigComponent/wrapper/Components/ColorPicker.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Components/ColorPicker.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Components/ColorPicker.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/Components/Icon.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Components/Icon.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Components/Icon.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/Components/TextWithIcon.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Components/TextWithIcon.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Components/TextWithIcon.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/Components/UploadImage.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Components/UploadImage.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Components/UploadImage.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/Components/Utils.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Components/Utils.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Components/Utils.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/Dialogs/Confirm.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Dialogs/Confirm.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Dialogs/Confirm.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/Dialogs/Cron.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Dialogs/Cron.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Dialogs/Cron.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/Dialogs/Error.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Dialogs/Error.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Dialogs/Error.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/Dialogs/Message.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Dialogs/Message.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Dialogs/Message.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/Dialogs/SelectFile.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Dialogs/SelectFile.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Dialogs/SelectFile.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/Dialogs/SelectID.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/Dialogs/SelectID.js +0 -10
- package/Components/JsonConfigComponent/wrapper/Dialogs/SelectID.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/i18n.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/i18n.js +0 -10
- package/Components/JsonConfigComponent/wrapper/i18n.js.map +0 -1
- package/Components/JsonConfigComponent/wrapper/icons/IconCopy.d.ts +0 -2
- package/Components/JsonConfigComponent/wrapper/icons/IconCopy.js +0 -10
- package/Components/JsonConfigComponent/wrapper/icons/IconCopy.js.map +0 -1
- package/Components/Logo.js.map +0 -1
- package/Components/SaveCloseButtons.js.map +0 -1
- package/Components/Schedule.js.map +0 -1
- package/Components/TabContainer.js.map +0 -1
- package/Components/TabContent.js.map +0 -1
- package/Components/TabHeader.js.map +0 -1
- package/Components/ToggleThemeMenu.js.map +0 -1
- package/Dialogs/SelectID.js.map +0 -1
|
@@ -1,265 +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 _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
12
|
-
var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
|
|
13
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
15
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
16
|
-
var _react = _interopRequireDefault(require("react"));
|
|
17
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
18
|
-
var _styles = require("@mui/styles");
|
|
19
|
-
var _material = require("@mui/material");
|
|
20
|
-
var _iconsMaterial = require("@mui/icons-material");
|
|
21
|
-
var _i18n = _interopRequireDefault(require("./wrapper/i18n"));
|
|
22
|
-
var _ConfigGeneric2 = _interopRequireDefault(require("./ConfigGeneric"));
|
|
23
|
-
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); }; }
|
|
24
|
-
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; } }
|
|
25
|
-
var styles = function styles() {
|
|
26
|
-
return {
|
|
27
|
-
width: {
|
|
28
|
-
width: 'calc(100% - 85px)'
|
|
29
|
-
},
|
|
30
|
-
width50: {
|
|
31
|
-
width: 120,
|
|
32
|
-
marginRight: 5
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
var ConfigCoordinates = /*#__PURE__*/function (_ConfigGeneric) {
|
|
37
|
-
(0, _inherits2["default"])(ConfigCoordinates, _ConfigGeneric);
|
|
38
|
-
var _super = _createSuper(ConfigCoordinates);
|
|
39
|
-
function ConfigCoordinates() {
|
|
40
|
-
(0, _classCallCheck2["default"])(this, ConfigCoordinates);
|
|
41
|
-
return _super.apply(this, arguments);
|
|
42
|
-
}
|
|
43
|
-
(0, _createClass2["default"])(ConfigCoordinates, [{
|
|
44
|
-
key: "componentDidMount",
|
|
45
|
-
value: function componentDidMount() {
|
|
46
|
-
var _this = this;
|
|
47
|
-
(0, _get2["default"])((0, _getPrototypeOf2["default"])(ConfigCoordinates.prototype), "componentDidMount", this).call(this);
|
|
48
|
-
var value = _ConfigGeneric2["default"].getValue(this.props.data, this.props.attr);
|
|
49
|
-
this.setState({
|
|
50
|
-
value: value
|
|
51
|
-
});
|
|
52
|
-
var newState = {};
|
|
53
|
-
if (this.props.schema.useSystemName) {
|
|
54
|
-
newState.useSystem = !!_ConfigGeneric2["default"].getValue(this.props.data, this.props.schema.useSystemName);
|
|
55
|
-
}
|
|
56
|
-
if (this.props.schema.longitudeName && this.props.schema.latitudeName) {
|
|
57
|
-
newState.longitude = _ConfigGeneric2["default"].getValue(this.props.data, this.props.schema.longitudeName);
|
|
58
|
-
newState.latitude = _ConfigGeneric2["default"].getValue(this.props.data, this.props.schema.latitudeName);
|
|
59
|
-
if (!newState.longitude && !newState.latitude && this.props.schema.autoInit) {
|
|
60
|
-
setTimeout(function () {
|
|
61
|
-
return _this.getCoordinates();
|
|
62
|
-
}, 300);
|
|
63
|
-
}
|
|
64
|
-
} else {
|
|
65
|
-
var value_ = _ConfigGeneric2["default"].getValue(this.props.data, this.props.attr);
|
|
66
|
-
if (!value_ && this.props.schema.autoInit) {
|
|
67
|
-
setTimeout(function () {
|
|
68
|
-
return _this.getCoordinates();
|
|
69
|
-
}, 300);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
Object.keys(newState).length && setTimeout(function () {
|
|
73
|
-
return _this.setState(newState);
|
|
74
|
-
}, 50);
|
|
75
|
-
}
|
|
76
|
-
}, {
|
|
77
|
-
key: "getSystemCoordinates",
|
|
78
|
-
value: function getSystemCoordinates() {
|
|
79
|
-
var _this2 = this;
|
|
80
|
-
return this.props.socket.getSystemConfig().then(function (obj) {
|
|
81
|
-
if (obj && obj.common && (obj.common.longitude || obj.common.latitude)) {
|
|
82
|
-
window.alert(_i18n["default"].t('ra_Used system settings'));
|
|
83
|
-
if (_this2.props.schema.longitudeName && _this2.props.schema.latitudeName) {
|
|
84
|
-
_this2.setState({
|
|
85
|
-
longitude: obj.common.longitude,
|
|
86
|
-
latitude: obj.common.latitude
|
|
87
|
-
}, /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
88
|
-
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
89
|
-
while (1) switch (_context.prev = _context.next) {
|
|
90
|
-
case 0:
|
|
91
|
-
_context.next = 2;
|
|
92
|
-
return _this2.onChange(_this2.props.schema.longitudeName, (obj.common.longitude || '').trim());
|
|
93
|
-
case 2:
|
|
94
|
-
_context.next = 4;
|
|
95
|
-
return _this2.onChange(_this2.props.schema.latitudeName, (obj.common.latitude || '').trim());
|
|
96
|
-
case 4:
|
|
97
|
-
case "end":
|
|
98
|
-
return _context.stop();
|
|
99
|
-
}
|
|
100
|
-
}, _callee);
|
|
101
|
-
})));
|
|
102
|
-
} else {
|
|
103
|
-
var value = obj.common.latitude + (_this2.props.schema.divider || ',') + obj.common.longitude;
|
|
104
|
-
_this2.setState({
|
|
105
|
-
value: value
|
|
106
|
-
}, function () {
|
|
107
|
-
_this2.onChange(_this2.props.attr, value);
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
} else {
|
|
111
|
-
window.alert(_i18n["default"].t('ra_Cannot determine position: System settings are empty and GPS detection is disabled in browser'));
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
}, {
|
|
116
|
-
key: "getCoordinates",
|
|
117
|
-
value: function getCoordinates() {
|
|
118
|
-
var _this3 = this;
|
|
119
|
-
if (navigator.geolocation) {
|
|
120
|
-
navigator.geolocation.getCurrentPosition(function (position) {
|
|
121
|
-
if (position !== null && position !== void 0 && position.coords) {
|
|
122
|
-
if (_this3.props.schema.longitudeName && _this3.props.schema.latitudeName) {
|
|
123
|
-
_this3.setState({
|
|
124
|
-
longitude: position.coords.longitude,
|
|
125
|
-
latitude: position.coords.latitude
|
|
126
|
-
}, /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
127
|
-
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
128
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
129
|
-
case 0:
|
|
130
|
-
_context2.next = 2;
|
|
131
|
-
return _this3.onChange(_this3.props.schema.longitudeName, position.coords.longitude || '');
|
|
132
|
-
case 2:
|
|
133
|
-
_context2.next = 4;
|
|
134
|
-
return _this3.onChange(_this3.props.schema.latitudeName, position.coords.latitude || '');
|
|
135
|
-
case 4:
|
|
136
|
-
case "end":
|
|
137
|
-
return _context2.stop();
|
|
138
|
-
}
|
|
139
|
-
}, _callee2);
|
|
140
|
-
})));
|
|
141
|
-
} else {
|
|
142
|
-
var value = position.coords.latitude + (_this3.props.schema.divider || ',') + position.coords.longitude;
|
|
143
|
-
_this3.setState({
|
|
144
|
-
value: value
|
|
145
|
-
}, function () {
|
|
146
|
-
_this3.onChange(_this3.props.attr, value);
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
} else {
|
|
150
|
-
_this3.getSystemCoordinates();
|
|
151
|
-
}
|
|
152
|
-
}, function (error) {
|
|
153
|
-
console.error("Cannot determine coordinates from browser: ".concat(error));
|
|
154
|
-
_this3.getSystemCoordinates();
|
|
155
|
-
});
|
|
156
|
-
} else {
|
|
157
|
-
this.getSystemCoordinates();
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}, {
|
|
161
|
-
key: "renderItem",
|
|
162
|
-
value: function renderItem(error, disabled /* , defaultValue */) {
|
|
163
|
-
var _this4 = this,
|
|
164
|
-
_this$state$longitude,
|
|
165
|
-
_this$state$latitude;
|
|
166
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, this.props.schema.useSystemName ? /*#__PURE__*/_react["default"].createElement(_material.FormControlLabel, {
|
|
167
|
-
control: /*#__PURE__*/_react["default"].createElement(_material.Checkbox, {
|
|
168
|
-
checked: !!this.state.useSystem,
|
|
169
|
-
onChange: function onChange(e) {
|
|
170
|
-
var useSystem = e.target.checked;
|
|
171
|
-
if (useSystem) {
|
|
172
|
-
_this4.getSystemCoordinates();
|
|
173
|
-
}
|
|
174
|
-
_this4.setState({
|
|
175
|
-
useSystem: useSystem
|
|
176
|
-
}, function () {
|
|
177
|
-
return _this4.onChange(_this4.props.schema.useSystemName, useSystem);
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
}),
|
|
181
|
-
label: _i18n["default"].t('ra_Use system settings for position')
|
|
182
|
-
}) : null, this.props.schema.longitudeName && this.props.schema.latitudeName ? /*#__PURE__*/_react["default"].createElement(_material.TextField, {
|
|
183
|
-
variant: "standard",
|
|
184
|
-
className: this.props.classes.width50,
|
|
185
|
-
value: (_this$state$longitude = this.state.longitude) !== null && _this$state$longitude !== void 0 ? _this$state$longitude : '',
|
|
186
|
-
error: !!error,
|
|
187
|
-
disabled: this.state.useSystem || !!disabled,
|
|
188
|
-
onChange: function onChange(e) {
|
|
189
|
-
var longitude = e.target.value;
|
|
190
|
-
_this4.setState({
|
|
191
|
-
longitude: longitude
|
|
192
|
-
}, function () {
|
|
193
|
-
_this4.onChange(_this4.props.schema.longitudeName, (longitude || '').trim());
|
|
194
|
-
});
|
|
195
|
-
},
|
|
196
|
-
label: _i18n["default"].t('ra_Longitude')
|
|
197
|
-
}) : null, this.props.schema.longitudeName && this.props.schema.latitudeName ? /*#__PURE__*/_react["default"].createElement(_material.TextField, {
|
|
198
|
-
variant: "standard",
|
|
199
|
-
className: this.props.classes.width50,
|
|
200
|
-
value: (_this$state$latitude = this.state.latitude) !== null && _this$state$latitude !== void 0 ? _this$state$latitude : '',
|
|
201
|
-
error: !!error,
|
|
202
|
-
disabled: this.state.useSystem || !!disabled,
|
|
203
|
-
onChange: function onChange(e) {
|
|
204
|
-
var latitude = e.target.value;
|
|
205
|
-
_this4.setState({
|
|
206
|
-
latitude: latitude
|
|
207
|
-
}, function () {
|
|
208
|
-
return _this4.onChange(_this4.props.schema.latitudeName, (latitude || '').trim());
|
|
209
|
-
});
|
|
210
|
-
},
|
|
211
|
-
label: _i18n["default"].t('ra_Latitude')
|
|
212
|
-
}) : null, !this.props.schema.longitudeName || !this.props.schema.latitudeName ? /*#__PURE__*/_react["default"].createElement(_material.TextField, {
|
|
213
|
-
variant: "standard",
|
|
214
|
-
className: this.props.classes.width,
|
|
215
|
-
value: this.state.value === null || this.state.value === undefined ? '' : this.state.value,
|
|
216
|
-
error: !!error,
|
|
217
|
-
readOnly: this.state.useSystem,
|
|
218
|
-
disabled: !!disabled,
|
|
219
|
-
inputProps: {
|
|
220
|
-
maxLength: this.props.schema.maxLength || this.props.schema.max || undefined
|
|
221
|
-
},
|
|
222
|
-
onChange: function onChange(e) {
|
|
223
|
-
var value = e.target.value;
|
|
224
|
-
_this4.setState({
|
|
225
|
-
value: value
|
|
226
|
-
}, function () {
|
|
227
|
-
return _this4.onChange(_this4.props.attr, (value || '').trim());
|
|
228
|
-
});
|
|
229
|
-
},
|
|
230
|
-
placeholder: this.getText(this.props.schema.placeholder),
|
|
231
|
-
label: this.getText(this.props.schema.label),
|
|
232
|
-
helperText: this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)
|
|
233
|
-
}) : null, !this.state.useSystem ? /*#__PURE__*/_react["default"].createElement(_material.Fab, {
|
|
234
|
-
size: "small",
|
|
235
|
-
onClick: function onClick() {
|
|
236
|
-
return _this4.getCoordinates();
|
|
237
|
-
},
|
|
238
|
-
title: _i18n["default"].t('ra_Take browser position'),
|
|
239
|
-
style: {
|
|
240
|
-
marginRight: 4
|
|
241
|
-
}
|
|
242
|
-
}, /*#__PURE__*/_react["default"].createElement(_iconsMaterial.LocationOn, null)) : null, !this.state.useSystem ? /*#__PURE__*/_react["default"].createElement(_material.Fab, {
|
|
243
|
-
size: "small",
|
|
244
|
-
onClick: function onClick() {
|
|
245
|
-
return _this4.getSystemCoordinates();
|
|
246
|
-
},
|
|
247
|
-
title: _i18n["default"].t('ra_Take position from system settings')
|
|
248
|
-
}, /*#__PURE__*/_react["default"].createElement(_iconsMaterial.GpsFixed, null)) : null);
|
|
249
|
-
}
|
|
250
|
-
}]);
|
|
251
|
-
return ConfigCoordinates;
|
|
252
|
-
}(_ConfigGeneric2["default"]);
|
|
253
|
-
ConfigCoordinates.propTypes = {
|
|
254
|
-
socket: _propTypes["default"].object.isRequired,
|
|
255
|
-
themeType: _propTypes["default"].string,
|
|
256
|
-
themeName: _propTypes["default"].string,
|
|
257
|
-
style: _propTypes["default"].object,
|
|
258
|
-
className: _propTypes["default"].string,
|
|
259
|
-
data: _propTypes["default"].object.isRequired,
|
|
260
|
-
schema: _propTypes["default"].object,
|
|
261
|
-
onError: _propTypes["default"].func,
|
|
262
|
-
onChange: _propTypes["default"].func
|
|
263
|
-
};
|
|
264
|
-
var _default = exports["default"] = (0, _styles.withStyles)(styles)(ConfigCoordinates);
|
|
265
|
-
//# sourceMappingURL=ConfigCoordinates.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigCoordinates.js","names":["_react","_interopRequireDefault","require","_propTypes","_styles","_material","_iconsMaterial","_i18n","_ConfigGeneric2","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","arguments","apply","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","e","styles","width","width50","marginRight","ConfigCoordinates","_ConfigGeneric","_inherits2","_super","_classCallCheck2","_createClass2","key","value","componentDidMount","_this","_get2","ConfigGeneric","getValue","props","data","attr","setState","newState","schema","useSystemName","useSystem","longitudeName","latitudeName","longitude","latitude","autoInit","setTimeout","getCoordinates","value_","Object","keys","length","getSystemCoordinates","_this2","socket","getSystemConfig","then","obj","common","window","alert","I18n","t","_asyncToGenerator2","_regenerator","mark","_callee","wrap","_callee$","_context","prev","next","onChange","trim","stop","divider","_this3","navigator","geolocation","getCurrentPosition","position","coords","_callee2","_callee2$","_context2","error","console","concat","renderItem","disabled","_this4","_this$state$longitude","_this$state$latitude","createElement","Fragment","FormControlLabel","control","Checkbox","checked","state","target","label","TextField","variant","className","classes","undefined","readOnly","inputProps","maxLength","max","placeholder","getText","helperText","renderHelp","help","helpLink","noTranslation","Fab","size","onClick","title","style","LocationOn","GpsFixed","propTypes","PropTypes","object","isRequired","themeType","string","themeName","onError","func","_default","exports","withStyles"],"sources":["JsonConfigComponent/ConfigCoordinates.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport {\n TextField,\n Fab,\n FormControlLabel,\n Checkbox,\n} from '@mui/material';\n\nimport {\n GpsFixed as IconGpsFixed,\n LocationOn as IconLocationOn,\n} from '@mui/icons-material';\n\nimport I18n from './wrapper/i18n';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = () => ({\n width: {\n width: 'calc(100% - 85px)',\n },\n width50: {\n width: 120,\n marginRight: 5,\n },\n});\n\nclass ConfigCoordinates extends ConfigGeneric {\n componentDidMount() {\n super.componentDidMount();\n\n const value = ConfigGeneric.getValue(this.props.data, this.props.attr);\n this.setState({ value });\n\n const newState = {};\n if (this.props.schema.useSystemName) {\n newState.useSystem = !!ConfigGeneric.getValue(this.props.data, this.props.schema.useSystemName);\n }\n if (this.props.schema.longitudeName && this.props.schema.latitudeName) {\n newState.longitude = ConfigGeneric.getValue(this.props.data, this.props.schema.longitudeName);\n newState.latitude = ConfigGeneric.getValue(this.props.data, this.props.schema.latitudeName);\n if (!newState.longitude && !newState.latitude && this.props.schema.autoInit) {\n setTimeout(() => this.getCoordinates(), 300);\n }\n } else {\n const value_ = ConfigGeneric.getValue(this.props.data, this.props.attr);\n if (!value_ && this.props.schema.autoInit) {\n setTimeout(() => this.getCoordinates(), 300);\n }\n }\n Object.keys(newState).length && setTimeout(() => this.setState(newState), 50);\n }\n\n getSystemCoordinates() {\n return this.props.socket.getSystemConfig().then(obj => {\n if (obj && obj.common && (obj.common.longitude || obj.common.latitude)) {\n window.alert(I18n.t('ra_Used system settings'));\n if (this.props.schema.longitudeName && this.props.schema.latitudeName) {\n this.setState(\n {\n longitude: obj.common.longitude,\n latitude: obj.common.latitude,\n },\n async () => {\n await this.onChange(this.props.schema.longitudeName, (obj.common.longitude || '').trim());\n await this.onChange(this.props.schema.latitudeName, (obj.common.latitude || '').trim());\n },\n );\n } else {\n const value = obj.common.latitude + (this.props.schema.divider || ',') + obj.common.longitude;\n this.setState(\n {\n value,\n },\n () => {\n this.onChange(this.props.attr, value);\n },\n );\n }\n } else {\n window.alert(\n I18n.t(\n 'ra_Cannot determine position: System settings are empty and GPS detection is disabled in browser',\n ),\n );\n }\n });\n }\n\n getCoordinates() {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(\n position => {\n if (position?.coords) {\n if (this.props.schema.longitudeName && this.props.schema.latitudeName) {\n this.setState(\n {\n longitude: position.coords.longitude,\n latitude: position.coords.latitude,\n },\n async () => {\n await this.onChange(\n this.props.schema.longitudeName,\n position.coords.longitude || '',\n );\n await this.onChange(this.props.schema.latitudeName, position.coords.latitude || '');\n },\n );\n } else {\n const value =\n position.coords.latitude +\n (this.props.schema.divider || ',') +\n position.coords.longitude;\n this.setState({ value }, () => {\n this.onChange(this.props.attr, value);\n });\n }\n } else {\n this.getSystemCoordinates();\n }\n },\n error => {\n console.error(`Cannot determine coordinates from browser: ${error}`);\n this.getSystemCoordinates();\n },\n );\n } else {\n this.getSystemCoordinates();\n }\n }\n\n renderItem(error, disabled /* , defaultValue */) {\n return <>\n {this.props.schema.useSystemName ? <FormControlLabel\n control={\n <Checkbox\n checked={!!this.state.useSystem}\n onChange={e => {\n const useSystem = e.target.checked;\n if (useSystem) {\n this.getSystemCoordinates();\n }\n this.setState({ useSystem }, () =>\n this.onChange(this.props.schema.useSystemName, useSystem));\n }}\n />\n }\n label={I18n.t('ra_Use system settings for position')}\n /> : null}\n {this.props.schema.longitudeName && this.props.schema.latitudeName ?\n <TextField\n variant=\"standard\"\n className={this.props.classes.width50}\n value={this.state.longitude ?? ''}\n error={!!error}\n disabled={this.state.useSystem || !!disabled}\n onChange={e => {\n const longitude = e.target.value;\n this.setState({ longitude }, () => {\n this.onChange(this.props.schema.longitudeName, (longitude || '').trim());\n });\n }}\n label={I18n.t('ra_Longitude')}\n /> : null}\n {this.props.schema.longitudeName && this.props.schema.latitudeName ?\n <TextField\n variant=\"standard\"\n className={this.props.classes.width50}\n value={this.state.latitude ?? ''}\n error={!!error}\n disabled={this.state.useSystem || !!disabled}\n onChange={e => {\n const latitude = e.target.value;\n this.setState({ latitude }, () =>\n this.onChange(this.props.schema.latitudeName, (latitude || '').trim()));\n }}\n label={I18n.t('ra_Latitude')}\n /> : null}\n {!this.props.schema.longitudeName || !this.props.schema.latitudeName ?\n <TextField\n variant=\"standard\"\n className={this.props.classes.width}\n value={this.state.value === null || this.state.value === undefined ? '' : this.state.value}\n error={!!error}\n readOnly={this.state.useSystem}\n disabled={!!disabled}\n inputProps={{ maxLength: this.props.schema.maxLength || this.props.schema.max || undefined }}\n onChange={e => {\n const value = e.target.value;\n this.setState({ value }, () => this.onChange(this.props.attr, (value || '').trim()));\n }}\n placeholder={this.getText(this.props.schema.placeholder)}\n label={this.getText(this.props.schema.label)}\n helperText={this.renderHelp(\n this.props.schema.help,\n this.props.schema.helpLink,\n this.props.schema.noTranslation,\n )}\n /> : null}\n {!this.state.useSystem ? <Fab\n size=\"small\"\n onClick={() => this.getCoordinates()}\n title={I18n.t('ra_Take browser position')}\n style={{ marginRight: 4 }}\n >\n <IconLocationOn />\n </Fab> : null}\n {!this.state.useSystem ? <Fab\n size=\"small\"\n onClick={() => this.getSystemCoordinates()}\n title={I18n.t('ra_Take position from system settings')}\n >\n <IconGpsFixed />\n </Fab> : null}\n </>;\n }\n}\n\nConfigCoordinates.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)(ConfigCoordinates);\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;AAOA,IAAAI,cAAA,GAAAJ,OAAA;AAKA,IAAAK,KAAA,GAAAN,sBAAA,CAAAC,OAAA;AAEA,IAAAM,eAAA,GAAAP,sBAAA,CAAAC,OAAA;AAA4C,SAAAO,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,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AACyG,SAAS,GAAG;EAC1BvE,MAAM,EAAEwE,qBAAS,CAACC,MAAM,CAACC,UAAU;EACnCC,SAAS,EAAEH,qBAAS,CAACI,MAAM;EAC3BC,SAAS,EAAEL,qBAAS,CAACI,MAAM;EAC3BR,KAAK,EAAEI,qBAAS,CAACC,MAAM;EACvBvB,SAAS,EAAEsB,qBAAS,CAACI,MAAM;EAC3BhG,IAAI,EAAE4F,qBAAS,CAACC,MAAM,CAACC,UAAU;EACjC1F,MAAM,EAAEwF,qBAAS,CAACC,MAAM;EACxBK,OAAO,EAAEN,qBAAS,CAACO,IAAI;EACvB7D,QAAQ,EAAEsD,qBAAS,CAACO;AACxB,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEa,IAAAC,kBAAU,EAACxH,MAAM,CAAC,CAACI,iBAAiB,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export default ConfigCustom;
|
|
2
|
-
declare class ConfigCustom extends React.Component<any, any, any> {
|
|
3
|
-
constructor(props: any);
|
|
4
|
-
state: {
|
|
5
|
-
Component: any;
|
|
6
|
-
error: string;
|
|
7
|
-
};
|
|
8
|
-
componentDidMount(): Promise<void>;
|
|
9
|
-
render(): React.JSX.Element;
|
|
10
|
-
}
|
|
11
|
-
declare namespace ConfigCustom {
|
|
12
|
-
namespace propTypes {
|
|
13
|
-
let socket: PropTypes.Requireable<object>;
|
|
14
|
-
let themeType: PropTypes.Requireable<string>;
|
|
15
|
-
let themeName: PropTypes.Requireable<string>;
|
|
16
|
-
let style: PropTypes.Requireable<object>;
|
|
17
|
-
let className: PropTypes.Requireable<string>;
|
|
18
|
-
let attr: PropTypes.Requireable<string>;
|
|
19
|
-
let data: PropTypes.Validator<object>;
|
|
20
|
-
let schema: PropTypes.Validator<object>;
|
|
21
|
-
let onError: PropTypes.Requireable<(...args: any[]) => any>;
|
|
22
|
-
let onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
import React from 'react';
|
|
26
|
-
import PropTypes from 'prop-types';
|
|
@@ -1,316 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof3 = require("@babel/runtime/helpers/typeof");
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = void 0;
|
|
9
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
var _toArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toArray"));
|
|
12
|
-
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
13
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
14
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
15
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
16
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
17
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
18
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
19
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
20
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
21
|
-
var _material = require("@mui/material");
|
|
22
|
-
var _i18n = _interopRequireDefault(require("./wrapper/i18n"));
|
|
23
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
24
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof3(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
25
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
26
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27
|
-
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); }; }
|
|
28
|
-
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; } }
|
|
29
|
-
var getOrLoadRemote = function getOrLoadRemote(remote, shareScope) {
|
|
30
|
-
var remoteFallbackUrl = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
31
|
-
return new Promise(function (resolve, reject) {
|
|
32
|
-
// check if remote exists on the global `window`object
|
|
33
|
-
if (!window[remote]) {
|
|
34
|
-
// search dom to see if remote tag exists, but might still be loading (async)
|
|
35
|
-
var existingRemote = document.querySelector("script[data-webpack=\"".concat(remote, "\"]"));
|
|
36
|
-
// when remote is loaded.
|
|
37
|
-
var onload = /*#__PURE__*/function () {
|
|
38
|
-
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
39
|
-
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
40
|
-
while (1) switch (_context.prev = _context.next) {
|
|
41
|
-
case 0:
|
|
42
|
-
if (!window[remote]) {
|
|
43
|
-
_context.next = 12;
|
|
44
|
-
break;
|
|
45
|
-
}
|
|
46
|
-
if (window[remote].__initialized) {
|
|
47
|
-
_context.next = 10;
|
|
48
|
-
break;
|
|
49
|
-
}
|
|
50
|
-
if (!(typeof __webpack_share_scopes__ === 'undefined')) {
|
|
51
|
-
_context.next = 7;
|
|
52
|
-
break;
|
|
53
|
-
}
|
|
54
|
-
_context.next = 5;
|
|
55
|
-
return window[remote].init(shareScope["default"]);
|
|
56
|
-
case 5:
|
|
57
|
-
_context.next = 9;
|
|
58
|
-
break;
|
|
59
|
-
case 7:
|
|
60
|
-
_context.next = 9;
|
|
61
|
-
return window[remote].init(__webpack_share_scopes__[shareScope]);
|
|
62
|
-
case 9:
|
|
63
|
-
// mark remote as initialized
|
|
64
|
-
window[remote].__initialized = true;
|
|
65
|
-
case 10:
|
|
66
|
-
_context.next = 15;
|
|
67
|
-
break;
|
|
68
|
-
case 12:
|
|
69
|
-
console.error("Cannot load ".concat(remote));
|
|
70
|
-
reject(new Error("Cannot load ".concat(remote)));
|
|
71
|
-
return _context.abrupt("return");
|
|
72
|
-
case 15:
|
|
73
|
-
// resolve promise so marking remote as loaded
|
|
74
|
-
resolve(window[remote]);
|
|
75
|
-
case 16:
|
|
76
|
-
case "end":
|
|
77
|
-
return _context.stop();
|
|
78
|
-
}
|
|
79
|
-
}, _callee);
|
|
80
|
-
}));
|
|
81
|
-
return function onload() {
|
|
82
|
-
return _ref.apply(this, arguments);
|
|
83
|
-
};
|
|
84
|
-
}();
|
|
85
|
-
if (existingRemote) {
|
|
86
|
-
// if existing remote but not loaded, hook into its onload and wait for it to be ready
|
|
87
|
-
existingRemote.onload = onload;
|
|
88
|
-
existingRemote.onerror = reject;
|
|
89
|
-
// check if remote fallback exists as param passed to function
|
|
90
|
-
// TODO: should scan public config for a matching key if no override exists
|
|
91
|
-
} else if (remoteFallbackUrl) {
|
|
92
|
-
// inject remote if a fallback exists and call the same onload function
|
|
93
|
-
var d = document;
|
|
94
|
-
var script = d.createElement('script');
|
|
95
|
-
script.type = 'text/javascript';
|
|
96
|
-
// mark as data-webpack so runtime can track it internally
|
|
97
|
-
script.setAttribute('data-webpack', "".concat(remote));
|
|
98
|
-
script.async = true;
|
|
99
|
-
script.onerror = reject;
|
|
100
|
-
script.onload = onload;
|
|
101
|
-
script.src = remoteFallbackUrl;
|
|
102
|
-
d.getElementsByTagName('head')[0].appendChild(script);
|
|
103
|
-
} else {
|
|
104
|
-
// no remote and no fallback exist, reject
|
|
105
|
-
reject(new Error("Cannot Find Remote ".concat(remote, " to inject")));
|
|
106
|
-
}
|
|
107
|
-
} else {
|
|
108
|
-
// remote already instantiated, resolve
|
|
109
|
-
resolve(window[remote]);
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
};
|
|
113
|
-
var loadComponent = function loadComponent(remote, sharedScope, module, url) {
|
|
114
|
-
return /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
115
|
-
var container, factory;
|
|
116
|
-
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
117
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
118
|
-
case 0:
|
|
119
|
-
_context2.next = 2;
|
|
120
|
-
return getOrLoadRemote(remote, sharedScope, url);
|
|
121
|
-
case 2:
|
|
122
|
-
container = _context2.sent;
|
|
123
|
-
_context2.next = 5;
|
|
124
|
-
return container.get(module);
|
|
125
|
-
case 5:
|
|
126
|
-
factory = _context2.sent;
|
|
127
|
-
return _context2.abrupt("return", factory());
|
|
128
|
-
case 7:
|
|
129
|
-
case "end":
|
|
130
|
-
return _context2.stop();
|
|
131
|
-
}
|
|
132
|
-
}, _callee2);
|
|
133
|
-
}));
|
|
134
|
-
};
|
|
135
|
-
var ConfigCustom = /*#__PURE__*/function (_Component) {
|
|
136
|
-
(0, _inherits2["default"])(ConfigCustom, _Component);
|
|
137
|
-
var _super = _createSuper(ConfigCustom);
|
|
138
|
-
function ConfigCustom(props) {
|
|
139
|
-
var _this;
|
|
140
|
-
(0, _classCallCheck2["default"])(this, ConfigCustom);
|
|
141
|
-
_this = _super.call(this, props);
|
|
142
|
-
// schema.url - location of Widget
|
|
143
|
-
// schema.name - Component name
|
|
144
|
-
// schema.i18n - i18n
|
|
145
|
-
|
|
146
|
-
_this.state = {
|
|
147
|
-
Component: null,
|
|
148
|
-
error: ''
|
|
149
|
-
};
|
|
150
|
-
return _this;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
// load component dynamically
|
|
154
|
-
(0, _createClass2["default"])(ConfigCustom, [{
|
|
155
|
-
key: "componentDidMount",
|
|
156
|
-
value: function () {
|
|
157
|
-
var _componentDidMount = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
|
|
158
|
-
var url, pos, i18nURL, lang, file, _this$props$schema$na, _this$props$schema$na2, uniqueName, fileToLoad, componentName, component, keys;
|
|
159
|
-
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
160
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
161
|
-
case 0:
|
|
162
|
-
if (this.props.schema.url) {
|
|
163
|
-
_context3.next = 4;
|
|
164
|
-
break;
|
|
165
|
-
}
|
|
166
|
-
console.error('URL is empty. Cannot load custom component!');
|
|
167
|
-
this.setState({
|
|
168
|
-
error: 'URL is empty. Cannot load custom component!'
|
|
169
|
-
});
|
|
170
|
-
return _context3.abrupt("return");
|
|
171
|
-
case 4:
|
|
172
|
-
/*
|
|
173
|
-
if (this.props.schema.url.startsWith('http:') || this.props.schema.url.startsWith('https:')) {
|
|
174
|
-
url = this.props.schema.url;
|
|
175
|
-
} else
|
|
176
|
-
*/
|
|
177
|
-
if (this.props.schema.url.startsWith('./')) {
|
|
178
|
-
url = "".concat(window.location.protocol, "//").concat(window.location.host).concat(this.props.schema.url.replace(/^\./, ''));
|
|
179
|
-
} else {
|
|
180
|
-
url = "".concat(window.location.protocol, "//").concat(window.location.host, "/adapter/").concat(this.props.adapterName, "/").concat(this.props.schema.url);
|
|
181
|
-
}
|
|
182
|
-
if (!(this.props.schema.i18n === true)) {
|
|
183
|
-
_context3.next = 14;
|
|
184
|
-
break;
|
|
185
|
-
}
|
|
186
|
-
// load i18n from files
|
|
187
|
-
pos = url.lastIndexOf('/');
|
|
188
|
-
if (pos !== -1) {
|
|
189
|
-
i18nURL = url.substring(0, pos);
|
|
190
|
-
} else {
|
|
191
|
-
i18nURL = url;
|
|
192
|
-
}
|
|
193
|
-
lang = _i18n["default"].getLanguage();
|
|
194
|
-
file = "".concat(i18nURL, "/i18n/").concat(lang, ".json");
|
|
195
|
-
_context3.next = 12;
|
|
196
|
-
return fetch(file).then(function (data) {
|
|
197
|
-
return data.json();
|
|
198
|
-
}).then(function (json) {
|
|
199
|
-
return _i18n["default"].extendTranslations(json, lang);
|
|
200
|
-
})["catch"](function (error) {
|
|
201
|
-
if (lang !== 'en') {
|
|
202
|
-
// try to load English
|
|
203
|
-
fetch("".concat(i18nURL, "/i18n/en.json")).then(function (data) {
|
|
204
|
-
return data.json();
|
|
205
|
-
}).then(function (json) {
|
|
206
|
-
return _i18n["default"].extendTranslations(json, lang);
|
|
207
|
-
})["catch"](function (err) {
|
|
208
|
-
return console.log("Cannot load i18n \"".concat(file, "\": ").concat(err));
|
|
209
|
-
});
|
|
210
|
-
return;
|
|
211
|
-
}
|
|
212
|
-
console.log("Cannot load i18n \"".concat(file, "\": ").concat(error));
|
|
213
|
-
});
|
|
214
|
-
case 12:
|
|
215
|
-
_context3.next = 15;
|
|
216
|
-
break;
|
|
217
|
-
case 14:
|
|
218
|
-
if (this.props.schema.i18n && (0, _typeof2["default"])(this.props.schema.i18n) === 'object') {
|
|
219
|
-
try {
|
|
220
|
-
_i18n["default"].extendTranslations(this.props.schema.i18n);
|
|
221
|
-
} catch (error) {
|
|
222
|
-
console.error("Cannot import i18n: ".concat(error));
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
case 15:
|
|
226
|
-
_context3.prev = 15;
|
|
227
|
-
_this$props$schema$na = this.props.schema.name.split('/'), _this$props$schema$na2 = (0, _toArray2["default"])(_this$props$schema$na), uniqueName = _this$props$schema$na2[0], fileToLoad = _this$props$schema$na2[1], componentName = _this$props$schema$na2.slice(2);
|
|
228
|
-
console.log(uniqueName, fileToLoad, componentName.join('/'));
|
|
229
|
-
// const component = await window.importFederation(uniqueName, {url, format: 'esm', from: 'vite'}, fileToLoad);
|
|
230
|
-
_context3.next = 20;
|
|
231
|
-
return loadComponent(uniqueName, 'default', "./".concat(fileToLoad), url)();
|
|
232
|
-
case 20:
|
|
233
|
-
component = _context3.sent["default"];
|
|
234
|
-
if (!component || !component || !component[componentName.join('/')]) {
|
|
235
|
-
keys = Object.keys(component || {});
|
|
236
|
-
console.error('URL is empty. Cannot load custom component!');
|
|
237
|
-
this.setState({
|
|
238
|
-
error: "Component ".concat(this.props.schema.name, " not found in ").concat(this.props.schema.url, ". Found: ").concat(keys.join(', '))
|
|
239
|
-
});
|
|
240
|
-
} else {
|
|
241
|
-
this.setState({
|
|
242
|
-
Component: component[componentName.join('/')]
|
|
243
|
-
});
|
|
244
|
-
}
|
|
245
|
-
_context3.next = 27;
|
|
246
|
-
break;
|
|
247
|
-
case 24:
|
|
248
|
-
_context3.prev = 24;
|
|
249
|
-
_context3.t0 = _context3["catch"](15);
|
|
250
|
-
this.setState({
|
|
251
|
-
error: "Cannot import from ".concat(this.props.schema.url, ": ").concat(_context3.t0)
|
|
252
|
-
});
|
|
253
|
-
case 27:
|
|
254
|
-
case "end":
|
|
255
|
-
return _context3.stop();
|
|
256
|
-
}
|
|
257
|
-
}, _callee3, this, [[15, 24]]);
|
|
258
|
-
}));
|
|
259
|
-
function componentDidMount() {
|
|
260
|
-
return _componentDidMount.apply(this, arguments);
|
|
261
|
-
}
|
|
262
|
-
return componentDidMount;
|
|
263
|
-
}()
|
|
264
|
-
}, {
|
|
265
|
-
key: "render",
|
|
266
|
-
value: function render() {
|
|
267
|
-
var CustomComponent = this.state.Component;
|
|
268
|
-
|
|
269
|
-
// render temporary placeholder
|
|
270
|
-
if (!CustomComponent) {
|
|
271
|
-
if (this.state.error) {
|
|
272
|
-
return null;
|
|
273
|
-
}
|
|
274
|
-
var schema = this.props.schema || {};
|
|
275
|
-
var item = /*#__PURE__*/_react["default"].createElement(_material.Grid, {
|
|
276
|
-
item: true,
|
|
277
|
-
xs: schema.xs || undefined,
|
|
278
|
-
lg: schema.lg || undefined,
|
|
279
|
-
md: schema.md || undefined,
|
|
280
|
-
sm: schema.sm || undefined,
|
|
281
|
-
style: _objectSpread(_objectSpread({
|
|
282
|
-
marginBottom: 0,
|
|
283
|
-
// marginRight: 8,
|
|
284
|
-
textAlign: 'left',
|
|
285
|
-
width: schema.type === 'divider' || schema.type === 'header' ? schema.width || '100%' : undefined
|
|
286
|
-
}, schema.style), this.props.themeType === 'dark' ? schema.darkStyle : {})
|
|
287
|
-
}, this.state.error ? /*#__PURE__*/_react["default"].createElement("div", null, this.state.error) : /*#__PURE__*/_react["default"].createElement(_material.LinearProgress, null));
|
|
288
|
-
if (schema.newLine) {
|
|
289
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
290
|
-
style: {
|
|
291
|
-
flexBasis: '100%',
|
|
292
|
-
height: 0
|
|
293
|
-
}
|
|
294
|
-
}), item);
|
|
295
|
-
}
|
|
296
|
-
return item;
|
|
297
|
-
}
|
|
298
|
-
return /*#__PURE__*/_react["default"].createElement(CustomComponent, this.props);
|
|
299
|
-
}
|
|
300
|
-
}]);
|
|
301
|
-
return ConfigCustom;
|
|
302
|
-
}(_react.Component);
|
|
303
|
-
ConfigCustom.propTypes = {
|
|
304
|
-
socket: _propTypes["default"].object,
|
|
305
|
-
themeType: _propTypes["default"].string,
|
|
306
|
-
themeName: _propTypes["default"].string,
|
|
307
|
-
style: _propTypes["default"].object,
|
|
308
|
-
className: _propTypes["default"].string,
|
|
309
|
-
attr: _propTypes["default"].string,
|
|
310
|
-
data: _propTypes["default"].object.isRequired,
|
|
311
|
-
schema: _propTypes["default"].object.isRequired,
|
|
312
|
-
onError: _propTypes["default"].func,
|
|
313
|
-
onChange: _propTypes["default"].func
|
|
314
|
-
};
|
|
315
|
-
var _default = exports["default"] = ConfigCustom;
|
|
316
|
-
//# sourceMappingURL=ConfigCustom.js.map
|