@iobroker/adapter-react-v5 3.1.13 → 3.1.14

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.
@@ -37,6 +37,8 @@ var _FormControl = _interopRequireDefault(require("@mui/material/FormControl"));
37
37
 
38
38
  var _UploadImage = _interopRequireDefault(require("../UploadImage"));
39
39
 
40
+ var _i18n = _interopRequireDefault(require("../../i18n"));
41
+
40
42
  var _ConfigGeneric2 = _interopRequireDefault(require("./ConfigGeneric"));
41
43
 
42
44
  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); }; }
@@ -54,22 +56,22 @@ var styles = function styles(theme) {
54
56
  };
55
57
  };
56
58
 
57
- var ConfigCertificateSelect = /*#__PURE__*/function (_ConfigGeneric) {
58
- (0, _inherits2["default"])(ConfigCertificateSelect, _ConfigGeneric);
59
+ var ConfigImageUpload = /*#__PURE__*/function (_ConfigGeneric) {
60
+ (0, _inherits2["default"])(ConfigImageUpload, _ConfigGeneric);
59
61
 
60
- var _super = _createSuper(ConfigCertificateSelect);
62
+ var _super = _createSuper(ConfigImageUpload);
61
63
 
62
- function ConfigCertificateSelect(props) {
64
+ function ConfigImageUpload(props) {
63
65
  var _this;
64
66
 
65
- (0, _classCallCheck2["default"])(this, ConfigCertificateSelect);
67
+ (0, _classCallCheck2["default"])(this, ConfigImageUpload);
66
68
  _this = _super.call(this, props);
67
69
  _this.imageRef = /*#__PURE__*/_react["default"].createRef();
68
70
  _this.index = Date.now();
69
71
  return _this;
70
72
  }
71
73
 
72
- (0, _createClass2["default"])(ConfigCertificateSelect, [{
74
+ (0, _createClass2["default"])(ConfigImageUpload, [{
73
75
  key: "componentDidMount",
74
76
  value: function () {
75
77
  var _componentDidMount = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
@@ -80,7 +82,7 @@ var ConfigCertificateSelect = /*#__PURE__*/function (_ConfigGeneric) {
80
82
  while (1) {
81
83
  switch (_context.prev = _context.next) {
82
84
  case 0:
83
- (0, _get2["default"])((0, _getPrototypeOf2["default"])(ConfigCertificateSelect.prototype), "componentDidMount", this).call(this);
85
+ (0, _get2["default"])((0, _getPrototypeOf2["default"])(ConfigImageUpload.prototype), "componentDidMount", this).call(this);
84
86
 
85
87
  if (this.props.schema.base64) {
86
88
  value = _ConfigGeneric2["default"].getValue(this.props.data, this.props.attr);
@@ -182,7 +184,7 @@ var ConfigCertificateSelect = /*#__PURE__*/function (_ConfigGeneric) {
182
184
  });
183
185
  }
184
186
  },
185
- t: this.props.t
187
+ t: _i18n["default"].t
186
188
  }), this.props.schema.help ? /*#__PURE__*/_react["default"].createElement(_FormHelperText["default"], null, this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)) : null, this.props.schema.base64 ? null : /*#__PURE__*/_react["default"].createElement("img", {
187
189
  src: this._getUrl(),
188
190
  ref: this.imageRef,
@@ -194,10 +196,10 @@ var ConfigCertificateSelect = /*#__PURE__*/function (_ConfigGeneric) {
194
196
  }));
195
197
  }
196
198
  }]);
197
- return ConfigCertificateSelect;
199
+ return ConfigImageUpload;
198
200
  }(_ConfigGeneric2["default"]);
199
201
 
200
- ConfigCertificateSelect.propTypes = {
202
+ ConfigImageUpload.propTypes = {
201
203
  socket: _propTypes["default"].object.isRequired,
202
204
  themeType: _propTypes["default"].string,
203
205
  themeName: _propTypes["default"].string,
@@ -209,7 +211,7 @@ ConfigCertificateSelect.propTypes = {
209
211
  onChange: _propTypes["default"].func
210
212
  };
211
213
 
212
- var _default = (0, _styles.withStyles)(styles)(ConfigCertificateSelect);
214
+ var _default = (0, _styles.withStyles)(styles)(ConfigImageUpload);
213
215
 
214
216
  exports["default"] = _default;
215
217
  //# sourceMappingURL=ConfigImageUpload.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigImageUpload.js","names":["styles","theme","fullWidth","width","image","ConfigCertificateSelect","props","imageRef","React","createRef","index","Date","now","schema","base64","value","ConfigGeneric","getValue","data","attr","setState","socket","fileExists","adapterName","instance","then","exist","current","src","_getUrl","style","display","update","url","window","location","port","protocol","hostname","error","disabled","defaultValue","classes","getText","label","accept","crop","maxSize","state","undefined","onChange","deleteFile","startsWith","split","writeFile64","t","help","renderHelp","helpLink","noTranslation","propTypes","PropTypes","object","isRequired","themeType","string","themeName","className","onError","func","withStyles"],"sources":["JsonConfigComponent/ConfigImageUpload.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport InputLabel from '@mui/material/InputLabel';\nimport FormHelperText from '@mui/material/FormHelperText';\nimport FormControl from '@mui/material/FormControl';\n\nimport UploadImage from '../UploadImage';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n fullWidth: {\n width: '100%'\n },\n image: {\n width: 100\n }\n});\n\nclass ConfigCertificateSelect extends ConfigGeneric {\n constructor(props) {\n super(props);\n this.imageRef = React.createRef();\n this.index = Date.now();\n }\n async componentDidMount() {\n super.componentDidMount();\n\n if (this.props.schema.base64) {\n const value = ConfigGeneric.getValue(this.props.data, this.props.attr);\n this.setState({ value });\n } else {\n this.props.socket.fileExists(this.props.adapterName + '.' + this.props.instance, this.props.attr)\n .then(exist => {\n if (exist && this.imageRef.current) {\n this.imageRef.current.src = this._getUrl();\n this.imageRef.current.style.display = 'block';\n }\n });\n }\n }\n\n _getUrl(update) {\n if (update) {\n this.index = Date.now();\n }\n let url = `files/${this.props.adapterName}.${this.props.instance}/${this.props.attr}?t=${this.index}`;\n if (window.location.port === '3000') {\n url = `${window.location.protocol}//${window.location.hostname}:8081/${url}`;\n }\n\n return url;\n }\n\n renderItem(error, disabled, defaultValue) {\n // eslint-disable-next-line\n return <FormControl className={this.props.classes.fullWidth} variant=\"standard\">\n <InputLabel shrink>{this.getText(this.props.schema.label)}</InputLabel>\n <UploadImage\n error={!!error}\n disabled={disabled}\n accept={this.props.schema.accept}\n crop={this.props.schema.crop}\n maxSize={this.props.schema.maxSize || 256 * 1024}\n icon={this.state.value || undefined}\n removeIconFunc={() => {\n if (this.props.schema.base64) {\n this.setState({ value: null }, () =>\n this.onChange(this.props.attr, this.state.value));\n } else {\n // delete file to /instance/attr\n this.props.socket.deleteFile(this.props.adapterName + '.' + this.props.instance, this.props.attr);\n // update image\n if (this.imageRef.current) {\n this.imageRef.current.style.display = 'none';\n this.imageRef.current.src = '';\n }\n }\n }}\n onChange={base64 => {\n if (this.props.schema.base64) {\n this.setState({ value: base64 }, () =>\n this.onChange(this.props.attr, this.state.value));\n } else {\n if (base64.startsWith('data')) {\n base64 = base64.split(',')[1];\n }\n // upload file to /instance/attr\n this.props.socket.writeFile64(this.props.adapterName + '.' + this.props.instance, this.props.attr, base64)\n .then(() => {\n if (this.imageRef.current) {\n this.imageRef.current.style.display = 'block';\n this.imageRef.current.src = this._getUrl(true);\n }\n });\n }\n }}\n t={this.props.t}\n />\n {this.props.schema.help ? <FormHelperText>{this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}</FormHelperText> : null}\n {this.props.schema.base64 ? null : <img\n src={this._getUrl()}\n ref={this.imageRef}\n className={this.props.classes.image}\n style={{display: 'none'}}\n alt=\"Background\"\n />}\n </FormControl>;\n }\n}\n\nConfigCertificateSelect.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)(ConfigCertificateSelect);"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;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,EAAEH,qBAAA,CAAUI,MAFW;EAGhCC,SAAS,EAAEL,qBAAA,CAAUI,MAHW;EAIhCnC,KAAK,EAAE+B,qBAAA,CAAUC,MAJe;EAKhCK,SAAS,EAAEN,qBAAA,CAAUI,MALW;EAMhC/C,IAAI,EAAE2C,qBAAA,CAAUC,MAAV,CAAiBC,UANS;EAOhClD,MAAM,EAAEgD,qBAAA,CAAUC,MAPc;EAQhCM,OAAO,EAAEP,qBAAA,CAAUQ,IARa;EAShCnB,QAAQ,EAAEW,qBAAA,CAAUQ;AATY,CAApC;;eAYe,IAAAC,kBAAA,EAAWtE,MAAX,EAAmBK,uBAAnB,C"}
1
+ {"version":3,"file":"ConfigImageUpload.js","names":["styles","theme","fullWidth","width","image","ConfigImageUpload","props","imageRef","React","createRef","index","Date","now","schema","base64","value","ConfigGeneric","getValue","data","attr","setState","socket","fileExists","adapterName","instance","then","exist","current","src","_getUrl","style","display","update","url","window","location","port","protocol","hostname","error","disabled","defaultValue","classes","getText","label","accept","crop","maxSize","state","undefined","onChange","deleteFile","startsWith","split","writeFile64","I18n","t","help","renderHelp","helpLink","noTranslation","propTypes","PropTypes","object","isRequired","themeType","string","themeName","className","onError","func","withStyles"],"sources":["JsonConfigComponent/ConfigImageUpload.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport InputLabel from '@mui/material/InputLabel';\nimport FormHelperText from '@mui/material/FormHelperText';\nimport FormControl from '@mui/material/FormControl';\n\nimport UploadImage from '../UploadImage';\nimport I18n from '../../i18n';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n fullWidth: {\n width: '100%'\n },\n image: {\n width: 100\n }\n});\n\nclass ConfigImageUpload extends ConfigGeneric {\n constructor(props) {\n super(props);\n this.imageRef = React.createRef();\n this.index = Date.now();\n }\n async componentDidMount() {\n super.componentDidMount();\n\n if (this.props.schema.base64) {\n const value = ConfigGeneric.getValue(this.props.data, this.props.attr);\n this.setState({ value });\n } else {\n this.props.socket.fileExists(this.props.adapterName + '.' + this.props.instance, this.props.attr)\n .then(exist => {\n if (exist && this.imageRef.current) {\n this.imageRef.current.src = this._getUrl();\n this.imageRef.current.style.display = 'block';\n }\n });\n }\n }\n\n _getUrl(update) {\n if (update) {\n this.index = Date.now();\n }\n let url = `files/${this.props.adapterName}.${this.props.instance}/${this.props.attr}?t=${this.index}`;\n if (window.location.port === '3000') {\n url = `${window.location.protocol}//${window.location.hostname}:8081/${url}`;\n }\n\n return url;\n }\n\n renderItem(error, disabled, defaultValue) {\n // eslint-disable-next-line\n return <FormControl className={this.props.classes.fullWidth} variant=\"standard\">\n <InputLabel shrink>{this.getText(this.props.schema.label)}</InputLabel>\n <UploadImage\n error={!!error}\n disabled={disabled}\n accept={this.props.schema.accept}\n crop={this.props.schema.crop}\n maxSize={this.props.schema.maxSize || 256 * 1024}\n icon={this.state.value || undefined}\n removeIconFunc={() => {\n if (this.props.schema.base64) {\n this.setState({ value: null }, () =>\n this.onChange(this.props.attr, this.state.value));\n } else {\n // delete file to /instance/attr\n this.props.socket.deleteFile(this.props.adapterName + '.' + this.props.instance, this.props.attr);\n // update image\n if (this.imageRef.current) {\n this.imageRef.current.style.display = 'none';\n this.imageRef.current.src = '';\n }\n }\n }}\n onChange={base64 => {\n if (this.props.schema.base64) {\n this.setState({ value: base64 }, () =>\n this.onChange(this.props.attr, this.state.value));\n } else {\n if (base64.startsWith('data')) {\n base64 = base64.split(',')[1];\n }\n // upload file to /instance/attr\n this.props.socket.writeFile64(this.props.adapterName + '.' + this.props.instance, this.props.attr, base64)\n .then(() => {\n if (this.imageRef.current) {\n this.imageRef.current.style.display = 'block';\n this.imageRef.current.src = this._getUrl(true);\n }\n });\n }\n }}\n t={I18n.t}\n />\n {this.props.schema.help ? <FormHelperText>{this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)}</FormHelperText> : null}\n {this.props.schema.base64 ? null : <img\n src={this._getUrl()}\n ref={this.imageRef}\n className={this.props.classes.image}\n style={{display: 'none'}}\n alt=\"Background\"\n />}\n </FormControl>;\n }\n}\n\nConfigImageUpload.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)(ConfigImageUpload);"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AAEA;;AACA;;AAEA;;;;;;AAEA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAAAC,KAAK;EAAA,OAAK;IACrBC,SAAS,EAAE;MACPC,KAAK,EAAE;IADA,CADU;IAIrBC,KAAK,EAAE;MACHD,KAAK,EAAE;IADJ;EAJc,CAAL;AAAA,CAApB;;IASME,iB;;;;;EACF,2BAAYC,KAAZ,EAAmB;IAAA;;IAAA;IACf,0BAAMA,KAAN;IACA,MAAKC,QAAL,gBAAgBC,iBAAA,CAAMC,SAAN,EAAhB;IACA,MAAKC,KAAL,GAAaC,IAAI,CAACC,GAAL,EAAb;IAHe;EAIlB;;;;;6GACD;QAAA;;QAAA;QAAA;UAAA;YAAA;cAAA;gBACI;;gBAEA,IAAI,KAAKN,KAAL,CAAWO,MAAX,CAAkBC,MAAtB,EAA8B;kBACpBC,KADoB,GACZC,0BAAA,CAAcC,QAAd,CAAuB,KAAKX,KAAL,CAAWY,IAAlC,EAAwC,KAAKZ,KAAL,CAAWa,IAAnD,CADY;kBAE1B,KAAKC,QAAL,CAAc;oBAAEL,KAAK,EAALA;kBAAF,CAAd;gBACH,CAHD,MAGO;kBACH,KAAKT,KAAL,CAAWe,MAAX,CAAkBC,UAAlB,CAA6B,KAAKhB,KAAL,CAAWiB,WAAX,GAAyB,GAAzB,GAA+B,KAAKjB,KAAL,CAAWkB,QAAvE,EAAiF,KAAKlB,KAA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AE,KAAKe,OAAL,EAD2B;QAEhC,GAAG,EAAE,KAAKtB,QAFsB;QAGhC,SAAS,EAAE,KAAKD,KAAL,CAAWoC,OAAX,CAAmBtC,KAHE;QAIhC,KAAK,EAAE;UAAC2B,OAAO,EAAE;QAAV,CAJyB;QAKhC,GAAG,EAAC;MAL4B,EA5CjC,CAAP;IAoDH;;;EAzF2Bf,0B;;AA4FhCX,iBAAiB,CAACwD,SAAlB,GAA8B;EAC1BxC,MAAM,EAAEyC,qBAAA,CAAUC,MAAV,CAAiBC,UADC;EAE1BC,SAAS,EAAEH,qBAAA,CAAUI,MAFK;EAG1BC,SAAS,EAAEL,qBAAA,CAAUI,MAHK;EAI1BpC,KAAK,EAAEgC,qBAAA,CAAUC,MAJS;EAK1BK,SAAS,EAAEN,qBAAA,CAAUI,MALK;EAM1BhD,IAAI,EAAE4C,qBAAA,CAAUC,MAAV,CAAiBC,UANG;EAO1BnD,MAAM,EAAEiD,qBAAA,CAAUC,MAPQ;EAQ1BM,OAAO,EAAEP,qBAAA,CAAUQ,IARO;EAS1BpB,QAAQ,EAAEY,qBAAA,CAAUQ;AATM,CAA9B;;eAYe,IAAAC,kBAAA,EAAWvE,MAAX,EAAmBK,iBAAnB,C"}
@@ -66,7 +66,7 @@ var Loader = /*#__PURE__*/function (_React$Component) {
66
66
  return /*#__PURE__*/_react["default"].createElement("div", {
67
67
  className: 'logo-back logo-background-' + theme,
68
68
  style: {
69
- backgroundImage: window.loadingBackgroundImage && window.loadingBackgroundImage !== '@@loginBackgroundImage@@' ? window.loadingBackgroundImage : undefined,
69
+ backgroundImage: window.loadingBackgroundImage && window.loadingBackgroundImage !== '@@loginBackgroundImage@@' ? 'url(' + window.loadingBackgroundImage + ')' : undefined,
70
70
  backgroundColor: window.loadingBackgroundColor && window.loadingBackgroundColor !== '@@loginBackgroundColor@@' ? window.loadingBackgroundColor : undefined,
71
71
  backgroundSize: 'cover'
72
72
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Loader.js","names":["loaderStyles","Loader","props","window","document","getElementById","style","createElement","setAttribute","innerHTML","head","appendChild","size","theme","themeType","backgroundImage","loadingBackgroundImage","undefined","backgroundColor","loadingBackgroundColor","backgroundSize","loadingHideLogo","width","height","left","borderWidth","top","bottom","React","Component","propTypes","PropTypes","number","string","_export"],"sources":["Loader.js"],"sourcesContent":["/**\n * Copyright 2018-2022 bluefox <dogafox@gmail.com>\n *\n * MIT License\n *\n **/\nimport React from 'react';\nimport PropTypes from 'prop-types';\n// import './loader.css'\nconst loaderStyles = `\n/**\n * Copyright 2018-2022 bluefox <dogafox@gmail.com>\n *\n * MIT License\n *\n **/\n\n.logo-background-light, .logo-background-colored {\n background: white;\n}\n.logo-background-dark, .logo-background-blue {\n background: black;\n}\n.logo-div {\n position: absolute;\n top: 50%;\n left: 50%;\n -ms-transform: translateX(-50%) translateY(-50%);\n -webkit-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n overflow: hidden;\n border-radius: 50%;\n z-index: 2;\n}\n.logo-border {\n /*border-color: #164477;*/\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n border-radius: 50%;\n border-style: solid;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n position: absolute;\n}\n.logo-top {\n position: absolute;\n width: 4.5%;\n height: 16%;\n top: 0;\n z-index: 2;\n}\n.logo-i {\n position: absolute;\n width: 14.5%;\n height: 60%;\n top: 20%;\n left: 42%;\n background: #3399CC;\n}\n.logo-i-top {\n position: absolute;\n width: 14.5%;\n height: 4%;\n left: 42%;\n background: #3399CC;\n border-radius: 100%;\n}\n.logo-back {\n width: 100%;\n height: 100%;\n z-index: 0;\n overflow: hidden;\n}\n@keyframes logo-grow {\n 0% {\n width: 230px;\n height: 230px;\n transform: translate(-50%,-50%) scale(1);\n opacity: 1\n }\n 99% {\n width: 230px;\n height: 230px;\n transform: translate(-50%,-50%) scale(10);\n opacity: 0;\n }\n 100% {\n width: 0;\n height: 0;\n opacity: 0;\n }\n}\n@keyframes logo-spin { 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } }\n@keyframes logo-color-inside-light {\n 0% {\n background: #FEFEFE;\n }\n 100% {\n background: #3399CC;\n }\n}\n@keyframes logo-color-inside-dark {\n 0% {\n background: #030303;\n }\n 100% {\n background: #3399CC;\n }\n}\n@keyframes logo-color-inside-colored {\n 0% {\n background: #FEFEFE;\n }\n 100% {\n background: #3399CC;\n }\n}\n@keyframes logo-color-inside-blue {\n 0% {\n background: #030303;\n }\n 100% {\n background: #3399CC;\n }\n}\n\n@keyframes logo-color-outside-light {\n 0% {\n border-color: #FEFEFE;\n }\n 100% {\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n }\n}\n@keyframes logo-color-outside-dark {\n 0% {\n border-color: #040404;\n }\n 100% {\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n }\n}\n@keyframes logo-color-outside-colored {\n 0% {\n border-color: #FEFEFE;\n }\n 100% {\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n }\n}\n@keyframes logo-color-outside-blue {\n 0% {\n border-color: #040404;\n }\n 100% {\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n }\n}\n\n.logo-animate-wait {\n animation: logo-color-outside 1.5s, logo-spin 1.5s linear infinite;\n}\n\n.logo-animate-grow-light {\n background: #DDD;\n}\n.logo-animate-grow-dark {\n background: #1d1d1d;\n}\n.logo-animate-grow-colored {\n background: #DDD;\n}\n.logo-animate-grow-blue {\n background: #1d1d1d;\n}\n\n.logo-animate-grow {\n display: inline-block;\n text-align: center;\n z-index: 1;\n top: 50%;\n left: 50%;\n -ms-transform: translateX(-50%) translateY(-50%);\n -webkit-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n width: 245px;\n height: 245px;\n border-radius: 50%;\n position: absolute;\n animation: logo-grow 1s 1 ease forwards;\n}\n\n.logo-animate-color-inside-light {\n animation: logo-color-inside-light 2.5s;\n}\n.logo-animate-color-inside-dark {\n animation: logo-color-inside-dark 2.5s;\n}\n.logo-animate-color-inside-colored {\n animation: logo-color-inside-colored 2.5s;\n}\n.logo-animate-color-inside-blue {\n animation: logo-color-inside-blue 2.5s;\n}\n\n.logo-animate-color-outside-light {\n animation: logo-color-outside-light 1.5s;\n}\n.logo-animate-color-outside-dark {\n animation: logo-color-outside-dark 1.5s;\n}\n.logo-animate-color-outside-colored {\n animation: logo-color-outside-colored 1.5s;\n}\n.logo-animate-color-outside-blue {\n animation: logo-color-outside-blue 1.5s;\n}\n`;\n\n/**\n * @typedef {object} LoaderProps\n * @property {string} [key] The key to identify this component.\n * @property {number} [size] The size in pixels of this loader.\n * @property {string} [themeType] The chosen theme type.\n * @property {string} [theme] The chosen theme.\n *\n * @extends {React.Component<LoaderProps>}\n */\nclass Loader extends React.Component {\n constructor(props) {\n super(props);\n\n if (!window.document.getElementById('loader-iobroker-component')) {\n const style = window.document.createElement('style');\n style.setAttribute('id', 'loader-iobroker-component');\n style.innerHTML = loaderStyles;\n window.document.head.appendChild(style);\n }\n }\n\n render() {\n const size = this.props.size || 234;\n const theme = this.props.themeType || this.props.theme || 'light';\n return <div className={'logo-back logo-background-' + theme}\n style={{\n backgroundImage: window.loadingBackgroundImage && window.loadingBackgroundImage !== '@@loginBackgroundImage@@' ? window.loadingBackgroundImage : undefined,\n backgroundColor: window.loadingBackgroundColor && window.loadingBackgroundColor !== '@@loginBackgroundColor@@' ? window.loadingBackgroundColor : undefined,\n backgroundSize: 'cover',\n }}\n >\n {window.loadingHideLogo === 'true' ?\n null\n :\n <>\n <div className=\"logo-div\" style={{ width: size, height: size }}>\n <div className={'logo-top logo-background-' + theme} style={{ left: '37%' }}/>\n <div className={'logo-top logo-background-' + theme} style={{ left: '57%' }}/>\n <div\n className={`logo-border logo-background-${theme} logo-animate-wait`}\n style={{ borderWidth: size * 0.132 }}\n />\n <div className={'logo-i logo-animate-color-inside-' + theme}/>\n <div className={'logo-i-top logo-animate-color-inside-' + theme} style={{ top: '18%' }}/>\n <div className={'logo-i-top logo-animate-color-inside-' + theme} style={{ bottom: '18%' }}/>\n </div>\n <div className={'logo-animate-grow logo-animate-grow-' + theme}\n style={{ width: size + 11, height: size + 11 }}\n />\n </>\n }\n </div>;\n }\n}\n\nLoader.propTypes = {\n size: PropTypes.number,\n themeType: PropTypes.string\n};\n\n/** @type {typeof Loader} */\nconst _export = Loader;\nexport default _export;"],"mappings":";;;;;;;;;;;;;;;;;;;AAMA;;AACA;;;;;;AACA;AACA,IAAMA,YAAY,otJAAlB;AAiOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;IACMC,M;;;;;EACF,gBAAYC,KAAZ,EAAmB;IAAA;;IAAA;IACf,0BAAMA,KAAN;;IAEA,IAAI,CAACC,MAAM,CAACC,QAAP,CAAgBC,cAAhB,CAA+B,2BAA/B,CAAL,EAAkE;MAC9D,IAAMC,KAAK,GAAGH,MAAM,CAACC,QAAP,CAAgBG,aAAhB,CAA8B,OAA9B,CAAd;MACAD,KAAK,CAACE,YAAN,CAAmB,IAAnB,EAAyB,2BAAzB;MACAF,KAAK,CAACG,SAAN,GAAkBT,YAAlB;MACAG,MAAM,CAACC,QAAP,CAAgBM,IAAhB,CAAqBC,WAArB,CAAiCL,KAAjC;IACH;;IARc;EASlB;;;;WAED,kBAAS;MACL,IAAMM,IAAI,GAAG,KAAKV,KAAL,CAAWU,IAAX,IAAmB,GAAhC;MACA,IAAMC,KAAK,GAAG,KAAKX,KAAL,CAAWY,SAAX,IAAwB,KAAKZ,KAAL,CAAWW,KAAnC,IAA4C,OAA1D;MACA,oBAAO;QAAK,SAAS,EAAE,+BAA+BA,KAA/C;QACH,KAAK,EAAE;UACHE,eAAe,EAAEZ,MAAM,CAACa,sBAAP,IAAiCb,MAAM,CAACa,sBAAP,KAAkC,0BAAnE,GAAgGb,MAAM,C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AUE;AAFN,CAAnB;AAKA;;AACA,IAAMC,OAAO,GAAGjC,MAAhB;eACeiC,O"}
1
+ {"version":3,"file":"Loader.js","names":["loaderStyles","Loader","props","window","document","getElementById","style","createElement","setAttribute","innerHTML","head","appendChild","size","theme","themeType","backgroundImage","loadingBackgroundImage","undefined","backgroundColor","loadingBackgroundColor","backgroundSize","loadingHideLogo","width","height","left","borderWidth","top","bottom","React","Component","propTypes","PropTypes","number","string","_export"],"sources":["Loader.js"],"sourcesContent":["/**\n * Copyright 2018-2022 bluefox <dogafox@gmail.com>\n *\n * MIT License\n *\n **/\nimport React from 'react';\nimport PropTypes from 'prop-types';\n// import './loader.css'\nconst loaderStyles = `\n/**\n * Copyright 2018-2022 bluefox <dogafox@gmail.com>\n *\n * MIT License\n *\n **/\n\n.logo-background-light, .logo-background-colored {\n background: white;\n}\n.logo-background-dark, .logo-background-blue {\n background: black;\n}\n.logo-div {\n position: absolute;\n top: 50%;\n left: 50%;\n -ms-transform: translateX(-50%) translateY(-50%);\n -webkit-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n overflow: hidden;\n border-radius: 50%;\n z-index: 2;\n}\n.logo-border {\n /*border-color: #164477;*/\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n border-radius: 50%;\n border-style: solid;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n position: absolute;\n}\n.logo-top {\n position: absolute;\n width: 4.5%;\n height: 16%;\n top: 0;\n z-index: 2;\n}\n.logo-i {\n position: absolute;\n width: 14.5%;\n height: 60%;\n top: 20%;\n left: 42%;\n background: #3399CC;\n}\n.logo-i-top {\n position: absolute;\n width: 14.5%;\n height: 4%;\n left: 42%;\n background: #3399CC;\n border-radius: 100%;\n}\n.logo-back {\n width: 100%;\n height: 100%;\n z-index: 0;\n overflow: hidden;\n}\n@keyframes logo-grow {\n 0% {\n width: 230px;\n height: 230px;\n transform: translate(-50%,-50%) scale(1);\n opacity: 1\n }\n 99% {\n width: 230px;\n height: 230px;\n transform: translate(-50%,-50%) scale(10);\n opacity: 0;\n }\n 100% {\n width: 0;\n height: 0;\n opacity: 0;\n }\n}\n@keyframes logo-spin { 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } }\n@keyframes logo-color-inside-light {\n 0% {\n background: #FEFEFE;\n }\n 100% {\n background: #3399CC;\n }\n}\n@keyframes logo-color-inside-dark {\n 0% {\n background: #030303;\n }\n 100% {\n background: #3399CC;\n }\n}\n@keyframes logo-color-inside-colored {\n 0% {\n background: #FEFEFE;\n }\n 100% {\n background: #3399CC;\n }\n}\n@keyframes logo-color-inside-blue {\n 0% {\n background: #030303;\n }\n 100% {\n background: #3399CC;\n }\n}\n\n@keyframes logo-color-outside-light {\n 0% {\n border-color: #FEFEFE;\n }\n 100% {\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n }\n}\n@keyframes logo-color-outside-dark {\n 0% {\n border-color: #040404;\n }\n 100% {\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n }\n}\n@keyframes logo-color-outside-colored {\n 0% {\n border-color: #FEFEFE;\n }\n 100% {\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n }\n}\n@keyframes logo-color-outside-blue {\n 0% {\n border-color: #040404;\n }\n 100% {\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n }\n}\n\n.logo-animate-wait {\n animation: logo-color-outside 1.5s, logo-spin 1.5s linear infinite;\n}\n\n.logo-animate-grow-light {\n background: #DDD;\n}\n.logo-animate-grow-dark {\n background: #1d1d1d;\n}\n.logo-animate-grow-colored {\n background: #DDD;\n}\n.logo-animate-grow-blue {\n background: #1d1d1d;\n}\n\n.logo-animate-grow {\n display: inline-block;\n text-align: center;\n z-index: 1;\n top: 50%;\n left: 50%;\n -ms-transform: translateX(-50%) translateY(-50%);\n -webkit-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n width: 245px;\n height: 245px;\n border-radius: 50%;\n position: absolute;\n animation: logo-grow 1s 1 ease forwards;\n}\n\n.logo-animate-color-inside-light {\n animation: logo-color-inside-light 2.5s;\n}\n.logo-animate-color-inside-dark {\n animation: logo-color-inside-dark 2.5s;\n}\n.logo-animate-color-inside-colored {\n animation: logo-color-inside-colored 2.5s;\n}\n.logo-animate-color-inside-blue {\n animation: logo-color-inside-blue 2.5s;\n}\n\n.logo-animate-color-outside-light {\n animation: logo-color-outside-light 1.5s;\n}\n.logo-animate-color-outside-dark {\n animation: logo-color-outside-dark 1.5s;\n}\n.logo-animate-color-outside-colored {\n animation: logo-color-outside-colored 1.5s;\n}\n.logo-animate-color-outside-blue {\n animation: logo-color-outside-blue 1.5s;\n}\n`;\n\n/**\n * @typedef {object} LoaderProps\n * @property {string} [key] The key to identify this component.\n * @property {number} [size] The size in pixels of this loader.\n * @property {string} [themeType] The chosen theme type.\n * @property {string} [theme] The chosen theme.\n *\n * @extends {React.Component<LoaderProps>}\n */\nclass Loader extends React.Component {\n constructor(props) {\n super(props);\n\n if (!window.document.getElementById('loader-iobroker-component')) {\n const style = window.document.createElement('style');\n style.setAttribute('id', 'loader-iobroker-component');\n style.innerHTML = loaderStyles;\n window.document.head.appendChild(style);\n }\n }\n\n render() {\n const size = this.props.size || 234;\n const theme = this.props.themeType || this.props.theme || 'light';\n return <div className={'logo-back logo-background-' + theme}\n style={{\n backgroundImage: window.loadingBackgroundImage && window.loadingBackgroundImage !== '@@loginBackgroundImage@@' ? 'url(' + window.loadingBackgroundImage + ')' : undefined,\n backgroundColor: window.loadingBackgroundColor && window.loadingBackgroundColor !== '@@loginBackgroundColor@@' ? window.loadingBackgroundColor : undefined,\n backgroundSize: 'cover',\n }}\n >\n {window.loadingHideLogo === 'true' ?\n null\n :\n <>\n <div className=\"logo-div\" style={{ width: size, height: size }}>\n <div className={'logo-top logo-background-' + theme} style={{ left: '37%' }}/>\n <div className={'logo-top logo-background-' + theme} style={{ left: '57%' }}/>\n <div\n className={`logo-border logo-background-${theme} logo-animate-wait`}\n style={{ borderWidth: size * 0.132 }}\n />\n <div className={'logo-i logo-animate-color-inside-' + theme}/>\n <div className={'logo-i-top logo-animate-color-inside-' + theme} style={{ top: '18%' }}/>\n <div className={'logo-i-top logo-animate-color-inside-' + theme} style={{ bottom: '18%' }}/>\n </div>\n <div className={'logo-animate-grow logo-animate-grow-' + theme}\n style={{ width: size + 11, height: size + 11 }}\n />\n </>\n }\n </div>;\n }\n}\n\nLoader.propTypes = {\n size: PropTypes.number,\n themeType: PropTypes.string\n};\n\n/** @type {typeof Loader} */\nconst _export = Loader;\nexport default _export;"],"mappings":";;;;;;;;;;;;;;;;;;;AAMA;;AACA;;;;;;AACA;AACA,IAAMA,YAAY,otJAAlB;AAiOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;IACMC,M;;;;;EACF,gBAAYC,KAAZ,EAAmB;IAAA;;IAAA;IACf,0BAAMA,KAAN;;IAEA,IAAI,CAACC,MAAM,CAACC,QAAP,CAAgBC,cAAhB,CAA+B,2BAA/B,CAAL,EAAkE;MAC9D,IAAMC,KAAK,GAAGH,MAAM,CAACC,QAAP,CAAgBG,aAAhB,CAA8B,OAA9B,CAAd;MACAD,KAAK,CAACE,YAAN,CAAmB,IAAnB,EAAyB,2BAAzB;MACAF,KAAK,CAACG,SAAN,GAAkBT,YAAlB;MACAG,MAAM,CAACC,QAAP,CAAgBM,IAAhB,CAAqBC,WAArB,CAAiCL,KAAjC;IACH;;IARc;EASlB;;;;WAED,kBAAS;MACL,IAAMM,IAAI,GAAG,KAAKV,KAAL,CAAWU,IAAX,IAAmB,GAAhC;MACA,IAAMC,KAAK,GAAG,KAAKX,KAAL,CAAWY,SAAX,IAAwB,KAAKZ,KAAL,CAAWW,KAAnC,IAA4C,OAA1D;MACA,oBAAO;QAAK,SAAS,EAAE,+BAA+BA,KAA/C;QACH,KAA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BAAA,CAAMC,S;;AA8C3B5B,MAAM,CAAC6B,SAAP,GAAmB;EACflB,IAAI,EAAEmB,qBAAA,CAAUC,MADD;EAEflB,SAAS,EAAEiB,qBAAA,CAAUE;AAFN,CAAnB;AAKA;;AACA,IAAMC,OAAO,GAAGjC,MAAhB;eACeiC,O"}
package/README.md CHANGED
@@ -641,7 +641,7 @@ If you still have questions, try to find an answer [here](https://mui.com/guides
641
641
  -->
642
642
 
643
643
  ## Changelog
644
- ### 3.1.13 (2022-06-23)
644
+ ### 3.1.14 (2022-06-23)
645
645
  * (bluefox) Added translations
646
646
 
647
647
  ### 3.1.11 (2022-06-22)
package/i18n/de.json CHANGED
@@ -65,7 +65,7 @@
65
65
  "ra_Toggle view mode": "Ansichtsmodus umschalten",
66
66
  "ra_Root": "Anfang",
67
67
  "ra_Back to %s": "Zurück zu %s",
68
- "ra_Place your files here or click here to open the browse dialog": "Platzieren Sie Ihre Dateien hier oder klicken Sie hier, um den Suchdialog zu öffnen",
68
+ "ra_Place your files here or click here to open the browse dialog": "Die Dateien hier platzieren oder hier klicken, um den Suchdialog zu öffnen",
69
69
  "ra_If no file will be created in the folder, it will disappear after the browser closed": "Wenn im Ordner keine Datei erstellt wird, verschwindet dieser nach dem Schließen des Browsers",
70
70
  "ra_Folder name": "Ordnernamen",
71
71
  "ra_Create new folder in %s": "Neuen Ordner in \"%s\" erstellen",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iobroker/adapter-react-v5",
3
- "version": "3.1.13",
3
+ "version": "3.1.14",
4
4
  "description": "React classes to develop admin interfaces for ioBroker with react.",
5
5
  "author": {
6
6
  "name": "bluefox",