@iobroker/adapter-react-v5 3.5.2 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ export default AdminConnection;
2
+ import { AdminConnection } from "@iobroker/socket-client/AdminConnection";
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _socketClient = require("@iobroker/socket-client");
8
+ var _default = _socketClient.AdminConnection;
9
+ exports["default"] = _default;
10
+ //# sourceMappingURL=AdminConnection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AdminConnection.js","names":["AdminConnection"],"sources":["AdminConnection.js"],"sourcesContent":["import { AdminConnection } from '@iobroker/socket-client';\n\nexport default AdminConnection;"],"mappings":";;;;;;AAAA;AAA0D,eAE3CA,6BAAe;AAAA"}
@@ -412,7 +412,7 @@ var ConfigGeneric = /*#__PURE__*/function (_Component) {
412
412
  value: function renderHelp(text, link, noTranslation) {
413
413
  if (!link) {
414
414
  text = this.getText(text, noTranslation) || '';
415
- if (text && text.includes('<a ')) {
415
+ if (text && (text.includes('<a ') || text.includes('<br') || text.includes('<b>') || text.includes('<i>'))) {
416
416
  return _Utils["default"].renderTextWithA(text);
417
417
  } else {
418
418
  return text;
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigGeneric.js","names":["ConfigGeneric","props","data","value","getValue","attr","state","setState","forceUpdate","confirmDialog","confirmNewValue","confirmAttr","confirmData","isError","schema","custom","defaultValue","defaultFunc","executeCustom","instanceObj","arrayIndex","globalData","execute","lang","I18n","getLanguage","registerOnForceUpdate","onUpdate","LIKE_SELECT","undefined","includes","type","setTimeout","onChange","setValue","defaultSendTo","sendTo","alive","defaultSendToDone","jsonData","getPattern","JSON","parse","e","console","error","socket","adapterName","instance","then","onError","t","sendToTimeout","clearTimeout","text","noTranslation","func","en","confirm","icon","getText","title","ok","cancel","isOk","stringify","confirmDepAttr","confirmDepNewValue","confirmOldValue","newValue","cb","condition","confirmDependsOn","z","length","dep","val","changed","onChangeDependsOn","_newValue","calculateFunc","customObj","push","hiddenDependsOn","hidden","labelDependsOn","helpDependsOn","ignoreOwnChanges","forEach","_attr","i","f","Function","result","originalData","systemConfig","common","log","disabled","validator","label","link","Utils","renderTextWithA","color","themeType","textDecoration","pattern","replace","calculate","Object","keys","hideOnlyControl","item","xs","lg","md","sm","assign","marginBottom","textAlign","style","darkStyle","newLine","flexBasis","height","validatorNoSaveOnError","validatorErrorText","renderedItem","renderItem","commandRunning","tooltip","width","button","buttonTooltip","buttonTooltipNoTranslation","renderConfirmDialog","split","part","shift","Component","getPrototypeOf","constructor","propTypes","PropTypes","object","isRequired","string","any","themeName","customs","bool","number","dateFormat","isFloatComma"],"sources":["JsonConfigComponent/ConfigGeneric.jsx"],"sourcesContent":["import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport Grid from '@mui/material/Grid';\nimport Button from '@mui/material/Button';\n\nimport IconInfo from '@mui/icons-material/Info';\nimport IconWarning from '@mui/icons-material/Warning';\nimport IconError from '@mui/icons-material/Error';\n\nimport I18n from './wrapper/i18n';\nimport Utils from './wrapper/Components/Utils';\nimport ConfirmDialog from './wrapper/Dialogs/Confirm';\n\nclass ConfigGeneric extends Component {\n static DIFFERENT_VALUE = '__different__';\n static DIFFERENT_LABEL = 'ra___different__';\n static NONE_VALUE = '';\n static NONE_LABEL = 'ra_none';\n static AsyncFunction = Object.getPrototypeOf(async function(){}).constructor;\n\n constructor(props) {\n super(props);\n\n this.state = {\n confirmDialog: false,\n confirmNewValue: null,\n confirmAttr: null,\n confirmData: null,\n };\n\n this.isError = {};\n\n if (props.schema) {\n if (props.custom) {\n this.defaultValue = props.schema.defaultFunc ? this.executeCustom(props.schema.defaultFunc, props.schema.default, props.data, props.instanceObj, props.arrayIndex, props.globalData) : props.schema.default;\n } else {\n this.defaultValue = props.schema.defaultFunc ? this.execute(props.schema.defaultFunc, props.schema.default, props.data, props.arrayIndex, props.globalData) : props.schema.default;\n }\n }\n\n this.lang = I18n.getLanguage();\n }\n\n componentDidMount() {\n this.props.registerOnForceUpdate && this.props.registerOnForceUpdate(this.props.attr, this.onUpdate);\n const LIKE_SELECT = ['select', 'autocomplete', 'autocompleteSendTo'];\n // init default value\n if (this.defaultValue !== undefined) {\n const value = ConfigGeneric.getValue(this.props.data, this.props.attr);\n if (value === undefined || (LIKE_SELECT.includes(this.props.schema.type) && (value === '' || value === null))) {\n setTimeout(() => {\n if (this.props.custom) {\n this.props.onChange(this.props.attr, this.defaultValue, () =>\n setTimeout(() => this.props.forceUpdate([this.props.attr], this.props.data), 100));\n //this.onChange(this.props.attr, this.defaultValue);\n } else {\n ConfigGeneric.setValue(this.props.data, this.props.attr, this.defaultValue);\n this.props.onChange(this.props.data, undefined, () =>\n this.props.forceUpdate([this.props.attr], this.props.data));\n }\n }, 100);\n }\n } else if (this.props.schema.defaultSendTo) {\n this.sendTo();\n }\n }\n\n sendTo() {\n if (this.props.alive) {\n this.defaultSendToDone = true;\n let data = this.props.schema.data;\n if (data === undefined && this.props.schema.jsonData) {\n data = this.getPattern(this.props.schema.jsonData);\n try {\n data = JSON.parse(data);\n } catch (e) {\n console.error('Cannot parse json data: ' + data);\n }\n } else {\n data = {\n attr: this.props.attr,\n value: ConfigGeneric.getValue(this.props.data, this.props.attr),\n };\n }\n\n if (data === undefined) {\n data = null;\n }\n\n this.props.socket.sendTo(`${this.props.adapterName}.${this.props.instance}`, this.props.schema.defaultSendTo, data)\n .then(value => {\n if (value !== null && value !== undefined) {\n if (this.props.custom) {\n this.props.onChange(this.props.attr, value, () =>\n this.props.forceUpdate([this.props.attr], this.props.data));\n //this.onChange(this.props.attr, this.defaultValue);\n } else {\n ConfigGeneric.setValue(this.props.data, this.props.attr, value);\n this.props.onChange(this.props.data, undefined, () =>\n this.props.forceUpdate([this.props.attr], this.props.data));\n }\n }\n });\n } else {\n this.defaultSendToDone = false;\n // show error, that instance does not started\n this.onError(this.props.attr, I18n.t('ra_Instance %s is not alive', this.props.instance));\n }\n }\n\n componentWillUnmount() {\n this.props.registerOnForceUpdate && this.props.registerOnForceUpdate(this.props.attr)\n if (this.sendToTimeout) {\n clearTimeout(this.sendToTimeout);\n this.sendToTimeout = null;\n }\n }\n\n onUpdate = data => {\n const value = ConfigGeneric.getValue(data || this.props.data, this.props.attr) || '';\n if (this.state.value !== value) {\n this.setState({ value });\n } else {\n this.forceUpdate();\n }\n }\n\n static getValue(data, attr) {\n if (typeof attr === 'string') {\n return ConfigGeneric.getValue(data, attr.split('.'));\n } else {\n if (attr.length === 1) {\n return data[attr[0]];\n } else {\n const part = attr.shift();\n if (typeof data[part] === 'object') {\n return ConfigGeneric.getValue(data[part], attr);\n } else {\n return null;\n }\n }\n }\n }\n\n static setValue(data, attr, value) {\n if (typeof attr === 'string') {\n return ConfigGeneric.setValue(data, attr.split('.'), value);\n } else {\n if (attr.length === 1) {\n if (value === null) {\n delete data[attr[0]];\n } else {\n data[attr[0]] = value;\n }\n } else {\n const part = attr.shift();\n if (!data[part] || typeof data[part] === 'object') {\n data[part] = data[part] || {};\n }\n return ConfigGeneric.setValue(data[part], attr, value);\n }\n }\n }\n\n getText(text, noTranslation) {\n if (!text) {\n return '';\n }\n\n if (typeof text === 'string') {\n text = noTranslation ? text : I18n.t(text);\n if (text.includes('${')) {\n return this.getPattern(text);\n } else {\n return text;\n }\n } else if (text && typeof text === 'object') {\n if (text.func) {\n // calculate pattern\n if (typeof text.func === 'object') {\n return this.getPattern(text.func[this.lang] || text.func.en || '');\n } else {\n this.getPattern(text.func);\n }\n } else {\n return text[this.lang] || text.en || '';\n }\n }\n }\n\n renderConfirmDialog() {\n if (!this.state.confirmDialog) {\n return null;\n }\n const confirm = this.state.confirmData || this.props.schema.confirm;\n let icon = null;\n if (confirm.type === 'warning') {\n icon = <IconWarning />;\n } else if (confirm.type === 'error') {\n icon = <IconError />;\n } else if (confirm.type === 'info') {\n icon = <IconInfo />;\n }\n\n return <ConfirmDialog\n title={ this.getText(confirm.title) || I18n.t('ra_Please confirm') }\n text={ this.getText(confirm.text) }\n ok={ this.getText(confirm.ok) || I18n.t('ra_Ok') }\n cancel={ this.getText(confirm.cancel) || I18n.t('ra_Cancel') }\n icon={icon}\n onClose={isOk =>\n this.setState({ confirmDialog: false}, () => {\n if (isOk) {\n const data = JSON.parse(JSON.stringify(this.props.data));\n if (this.state.confirmDepAttr) {\n ConfigGeneric.setValue(data, this.state.confirmDepAttr, this.state.confirmDepNewValue);\n }\n\n ConfigGeneric.setValue(data, this.state.confirmAttr, this.state.confirmNewValue);\n this.setState({\n confirmDialog: false,\n confirmDepAttr: null,\n confirmDepNewValue: null,\n confirmNewValue: null,\n confirmAttr: null,\n confirmOldValue: null,\n confirmData: null,\n }, () =>\n this.props.onChange(data));\n } else {\n this.setState({\n confirmDialog: false,\n confirmDepAttr: null,\n confirmDepNewValue: null,\n confirmNewValue: null,\n confirmAttr: null,\n confirmOldValue: null,\n confirmData: null,\n });\n }\n })\n }\n />;\n }\n\n onChange(attr, newValue, cb) {\n const data = JSON.parse(JSON.stringify(this.props.data));\n ConfigGeneric.setValue(data, attr, newValue);\n\n if (this.props.schema.confirm && this.execute(this.props.schema.confirm.condition, false, data, this.props.arrayIndex, this.props.globalData)) {\n return this.setState({\n confirmDialog: true,\n confirmNewValue: newValue,\n confirmAttr: attr,\n confirmData: null,\n });\n } else {\n // find any inputs with confirmation\n if (this.props.schema.confirmDependsOn) {\n for (let z = 0; z < this.props.schema.confirmDependsOn.length; z++) {\n const dep = this.props.schema.confirmDependsOn[z];\n if (dep.confirm) {\n const val = ConfigGeneric.getValue(data, dep.attr);\n\n if (this.execute(dep.confirm.condition, false, data, this.props.arrayIndex, this.props.globalData)) {\n return this.setState({\n confirmDialog: true,\n confirmNewValue: newValue,\n confirmAttr: attr,\n confirmDepNewValue: val,\n confirmDepAttr: dep.attr,\n confirmData: dep.confirm,\n });\n }\n }\n }\n }\n\n const changed = [];\n if (this.props.schema.onChangeDependsOn) {\n for (let z = 0; z < this.props.schema.onChangeDependsOn.length; z++) {\n const dep = this.props.schema.onChangeDependsOn[z];\n if (dep.onChange) {\n const val = ConfigGeneric.getValue(data, dep.attr);\n\n let _newValue;\n if (this.props.custom) {\n _newValue = this.executeCustom(dep.onChange.calculateFunc, data, this.props.customObj, this.props.instanceObj, this.props.arrayIndex, this.props.globalData);\n } else {\n _newValue = this.execute(dep.onChange.calculateFunc, val, data, this.props.arrayIndex, this.props.globalData);\n }\n\n if (_newValue !== val) {\n ConfigGeneric.setValue(data, dep.attr, _newValue);\n changed.push(dep.attr);\n }\n }\n }\n }\n\n if (this.props.schema.hiddenDependsOn) {\n for (let z = 0; z < this.props.schema.hiddenDependsOn.length; z++) {\n const dep = this.props.schema.hiddenDependsOn[z];\n dep.hidden && changed.push(dep.attr);\n }\n }\n\n if (this.props.schema.labelDependsOn) {\n for (let z = 0; z < this.props.schema.labelDependsOn.length; z++) {\n const dep = this.props.schema.labelDependsOn[z];\n dep.hidden && changed.push(dep.attr);\n }\n }\n\n if (this.props.schema.helpDependsOn) {\n for (let z = 0; z < this.props.schema.helpDependsOn.length; z++) {\n const dep = this.props.schema.helpDependsOn[z];\n dep.hidden && changed.push(dep.attr);\n }\n }\n\n if (this.props.schema.onChange && !this.props.schema.onChange.ignoreOwnChanges) {\n const val = ConfigGeneric.getValue(data, this.props.attr);\n\n const newValue = this.props.custom ?\n this.executeCustom(this.props.schema.onChange.calculateFunc, data, this.props.customObj, this.props.instanceObj, this.props.arrayIndex, this.props.globalData)\n :\n this.execute(this.props.schema.onChange.calculateFunc, val, data, this.props.arrayIndex, this.props.globalData);\n if (newValue !== val) {\n ConfigGeneric.setValue(data, this.props.attr, newValue);\n }\n }\n\n if (this.props.custom) {\n this.props.onChange(attr, newValue, () => cb && cb());\n\n changed && changed.length && changed.forEach((_attr, i) =>\n setTimeout(() => this.props.onChange(_attr, ConfigGeneric.getValue(data, _attr)), i * 50));\n } else {\n this.props.onChange(data, undefined, () => {\n changed.length && this.props.forceUpdate(changed, data);\n cb && cb();\n });\n }\n }\n }\n\n execute(func, defaultValue, data, arrayIndex, globalData) {\n if (func && typeof func === 'object') {\n func = func.func;\n }\n\n if (!func) {\n return defaultValue;\n } else {\n try {\n // eslint-disable-next-line no-new-func\n const f = new Function('data', 'originalData', '_system', '_alive', '_common', '_socket', '_instance', 'arrayIndex', 'globalData', func.includes('return') ? func : 'return ' + func);\n const result = f(data || this.props.data, this.props.originalData, this.props.systemConfig, this.props.alive, this.props.common, this.props.socket, this.props.instance, arrayIndex, globalData);\n // console.log(result);\n return result;\n } catch (e) {\n console.error(`Cannot execute ${func}: ${e}`);\n return defaultValue;\n }\n }\n }\n\n executeCustom(func, data, customObj, instanceObj, arrayIndex, globalData) {\n if (func && typeof func === 'object') {\n func = func.func;\n }\n\n if (!func) {\n return null;\n } else {\n try {\n // eslint-disable-next-line no-new-func\n const f = new Function('data', 'originalData', '_system', 'instanceObj', 'customObj', '_socket', 'arrayIndex', 'globalData', func.includes('return') ? func : 'return ' + func);\n const result = f(data || this.props.data, this.props.originalData, this.props.systemConfig, instanceObj, customObj, this.props.socket, arrayIndex, globalData);\n console.log(result);\n return result;\n } catch (e) {\n console.error(`Cannot execute ${func}: ${e}`);\n return null;\n }\n }\n }\n\n calculate(schema) {\n let error;\n let disabled;\n let hidden;\n let defaultValue;\n\n if (this.props.custom) {\n error = schema.validator ? !this.executeCustom(schema.validator, this.props.data, this.props.customObj, this.props.instanceObj, this.props.arrayIndex, this.props.globalData) : false;\n disabled = schema.disabled ? this.executeCustom(schema.disabled, this.props.data, this.props.customObj, this.props.instanceObj, this.props.arrayIndex, this.props.globalData) : false;\n hidden = schema.hidden ? this.executeCustom(schema.hidden, this.props.data, this.props.customObj, this.props.instanceObj, this.props.arrayIndex, this.props.globalData) : false;\n defaultValue = schema.defaultFunc ? this.executeCustom(schema.defaultFunc, this.props.data, this.props.customObj, this.props.instanceObj, this.props.arrayIndex, this.props.globalData) : schema.default;\n } else {\n error = schema.validator ? !this.execute(schema.validator, false, this.props.data, this.props.arrayIndex, this.props.globalData) : false;\n disabled = schema.disabled ? this.execute(schema.disabled, false, this.props.data, this.props.arrayIndex, this.props.globalData) : false;\n hidden = schema.hidden ? this.execute(schema.hidden, false, this.props.data, this.props.arrayIndex, this.props.globalData) : false;\n defaultValue = schema.defaultFunc ? this.execute(schema.defaultFunc, schema.default, this.props.data, this.props.arrayIndex, this.props.globalData) : schema.default;\n }\n\n return { error, disabled, hidden, defaultValue };\n }\n\n onError(attr, error) {\n if (!error) {\n delete this.isError[attr];\n } else {\n this.isError[attr] = error;\n }\n\n this.props.onError && this.props.onError(attr, error);\n }\n\n renderItem(error, disabled, defaultValue) {\n return this.getText(this.props.schema.label) || this.getText(this.props.schema.text)\n }\n\n renderHelp(text, link, noTranslation) {\n if (!link) {\n text = this.getText(text, noTranslation) || '';\n if (text && text.includes('<a ')) {\n return Utils.renderTextWithA(text);\n } else {\n return text;\n }\n } else {\n return <a\n href={link}\n target=\"_blank\"\n rel=\"noreferrer\"\n style={{ color: this.props.themeType === 'dark' ? '#a147ff' : '#5b238f', textDecoration: 'underline' }}\n >{this.getText(text, noTranslation)}</a>;\n }\n }\n\n getPattern(pattern, data) {\n data = data || this.props.data;\n if (!pattern) {\n return '';\n } else {\n if (typeof pattern === 'object') {\n pattern = pattern.func;\n }\n\n try {\n if (this.props.custom) {\n // eslint-disable-next-line no-new-func\n const f = new Function('data', 'originalData', 'arrayIndex', 'globalData', '_system', 'instanceObj', 'customObj', '_socket', 'return `' + pattern.replace(/`/g, '\\\\`') + '`');\n return f(data, this.props.originalData, this.props.arrayIndex, this.props.globalData, this.props.systemConfig, this.props.instanceObj, this.props.customObj, this.props.socket, this.props.arrayIndex, this.props.globalData);\n } else {\n // eslint-disable-next-line no-new-func\n const f = new Function('data', 'originalData', 'arrayIndex', 'globalData', '_system', '_alive', '_common', '_socket', 'return `' + pattern.replace(/`/g, '\\\\`') + '`');\n return f(data, this.props.originalData, this.props.arrayIndex, this.props.globalData, this.props.systemConfig, this.props.alive, this.props.common, this.props.socket);\n }\n } catch (e) {\n console.error(`Cannot execute ${pattern}: ${e}`);\n return pattern;\n }\n }\n }\n\n render() {\n const schema = this.props.schema;\n\n if (!schema) {\n return null;\n }\n\n if (this.props.alive && this.defaultSendToDone === false) {\n this.sendToTimeout = setTimeout(() => {this.sendToTimeout = null; this.sendTo();}, 200);\n }\n\n const { error, disabled, hidden, defaultValue } = this.calculate(schema);\n\n if (hidden) {\n // Remove all errors if element is hidden\n if (Object.keys(this.isError).length) {\n setTimeout(isError =>\n Object.keys(isError).forEach(attr => this.props.onError(attr)),\n 100, JSON.parse(JSON.stringify(this.isError)));\n this.isError = {};\n }\n\n if (schema.hideOnlyControl) {\n const item = <Grid\n item\n xs={schema.xs || undefined}\n lg={schema.lg || undefined}\n md={schema.md || undefined}\n sm={schema.sm || undefined}\n style={Object.assign(\n {},\n {marginBottom: 0, /*marginRight: 8, */textAlign: 'left'},\n schema.style,\n this.props.themeType === 'dark' ? schema.darkStyle : {}\n )}\n />;\n\n if (schema.newLine) {\n return <>\n <div style={{flexBasis: '100%', height: 0}} />\n {item}\n </>;\n } else {\n return item;\n }\n } else {\n return null;\n }\n } else {\n // Add error\n if (schema.validatorNoSaveOnError) {\n if (error && !Object.keys(this.isError).length) {\n this.isError = {[this.props.attr]: schema.validatorErrorText ? I18n.t(schema.validatorErrorText) : true};\n setTimeout(isError =>\n Object.keys(isError).forEach(attr => this.props.onError(attr, isError[attr])),\n 100, JSON.parse(JSON.stringify(this.isError)));\n } else if (!error && Object.keys(this.isError).length) {\n setTimeout(isError =>\n Object.keys(isError).forEach(attr => this.props.onError(attr)),\n 100, JSON.parse(JSON.stringify(this.isError)));\n this.isError = {};\n }\n }\n\n const renderedItem = this.renderItem(error, disabled || this.props.commandRunning || this.props.disabled, defaultValue);\n\n const item = <Grid\n item\n title={this.getText(schema.tooltip)}\n xs={schema.xs || undefined}\n lg={schema.lg || undefined}\n md={schema.md || undefined}\n sm={schema.sm || undefined}\n style={Object.assign({}, {\n marginBottom: 0,\n // marginRight: 8,\n textAlign: 'left',\n width: schema.type === 'divider' || schema.type === 'header' ? schema.width || '100%' : undefined\n }, schema.style, this.props.themeType === 'dark' ? schema.darkStyle : {})}>\n { this.props.schema.defaultSendTo && this.props.schema.button ? <Grid container style={{ width: '100%' }}>\n <Grid item flex={1}>{renderedItem}</Grid>\n <Grid item><Button\n variant=\"outlined\"\n onClick={() => this.sendTo()}\n title={this.props.schema.buttonTooltip ? this.getText(this.props.schema.buttonTooltip, this.props.schema.buttonTooltipNoTranslation) : I18n.t('ra_Request data by instance')}\n >{this.getText(this.props.schema.button)}</Button></Grid>\n </Grid>\n :\n renderedItem\n }\n </Grid>;\n\n if (schema.newLine) {\n return <>\n <div style={{flexBasis: '100%', height: 0}} />\n {this.renderConfirmDialog()}\n {item}\n </>;\n } else {\n if (this.state.confirmDialog) {\n return <>\n {this.renderConfirmDialog()}\n {item}\n </>;\n } else {\n return item;\n }\n }\n }\n }\n}\n\nConfigGeneric.propTypes = {\n socket: PropTypes.object.isRequired,\n data: PropTypes.object,\n originalData: PropTypes.object,\n schema: PropTypes.object,\n attr: PropTypes.string,\n value: PropTypes.any,\n themeName: PropTypes.string,\n style: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n customs: PropTypes.object,\n forceUpdate: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n\n systemConfig: PropTypes.object,\n alive: PropTypes.bool,\n common: PropTypes.object,\n adapterName: PropTypes.string,\n instance: PropTypes.number,\n dateFormat: PropTypes.string,\n isFloatComma: PropTypes.bool,\n\n customObj: PropTypes.object,\n instanceObj: PropTypes.object,\n custom: PropTypes.bool,\n};\n\nexport default ConfigGeneric;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAAsD;AAAA;AAAA;AAAA;AA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A;IAAA;MAAA;QAAA;QAAA;UAAA;MAAA;IAAA;EAAA;AAAA,CAAkB,GAAC,CAACC,WAAW;AAkjBhF9I,aAAa,CAAC+I,SAAS,GAAG;EACtBjG,MAAM,EAAEkG,qBAAS,CAACC,MAAM,CAACC,UAAU;EACnChJ,IAAI,EAAE8I,qBAAS,CAACC,MAAM;EACtBnD,YAAY,EAAEkD,qBAAS,CAACC,MAAM;EAC9BnI,MAAM,EAAEkI,qBAAS,CAACC,MAAM;EACxB5I,IAAI,EAAE2I,qBAAS,CAACG,MAAM;EACtBhJ,KAAK,EAAE6I,qBAAS,CAACI,GAAG;EACpBC,SAAS,EAAEL,qBAAS,CAACG,MAAM;EAC3B1B,KAAK,EAAEuB,qBAAS,CAACC,MAAM;EACvB/F,OAAO,EAAE8F,qBAAS,CAACxF,IAAI;EACvBvB,QAAQ,EAAE+G,qBAAS,CAACxF,IAAI;EACxB8F,OAAO,EAAEN,qBAAS,CAACC,MAAM;EACzBzI,WAAW,EAAEwI,qBAAS,CAACxF,IAAI,CAAC0F,UAAU;EACtChD,QAAQ,EAAE8C,qBAAS,CAACO,IAAI;EAExBxD,YAAY,EAAEiD,qBAAS,CAACC,MAAM;EAC9B5G,KAAK,EAAE2G,qBAAS,CAACO,IAAI;EACrBvD,MAAM,EAAEgD,qBAAS,CAACC,MAAM;EACxBlG,WAAW,EAAEiG,qBAAS,CAACG,MAAM;EAC7BnG,QAAQ,EAAEgG,qBAAS,CAACQ,MAAM;EAC1BC,UAAU,EAAET,qBAAS,CAACG,MAAM;EAC5BO,YAAY,EAAEV,qBAAS,CAACO,IAAI;EAE5BtE,SAAS,EAAE+D,qBAAS,CAACC,MAAM;EAC3B9H,WAAW,EAAE6H,qBAAS,CAACC,MAAM;EAC7BlI,MAAM,EAAEiI,qBAAS,CAACO;AACtB,CAAC;AAAC,eAEavJ,aAAa;AAAA"}
1
+ {"version":3,"file":"ConfigGeneric.js","names":["ConfigGeneric","props","data","value","getValue","attr","state","setState","forceUpdate","confirmDialog","confirmNewValue","confirmAttr","confirmData","isError","schema","custom","defaultValue","defaultFunc","executeCustom","instanceObj","arrayIndex","globalData","execute","lang","I18n","getLanguage","registerOnForceUpdate","onUpdate","LIKE_SELECT","undefined","includes","type","setTimeout","onChange","setValue","defaultSendTo","sendTo","alive","defaultSendToDone","jsonData","getPattern","JSON","parse","e","console","error","socket","adapterName","instance","then","onError","t","sendToTimeout","clearTimeout","text","noTranslation","func","en","confirm","icon","getText","title","ok","cancel","isOk","stringify","confirmDepAttr","confirmDepNewValue","confirmOldValue","newValue","cb","condition","confirmDependsOn","z","length","dep","val","changed","onChangeDependsOn","_newValue","calculateFunc","customObj","push","hiddenDependsOn","hidden","labelDependsOn","helpDependsOn","ignoreOwnChanges","forEach","_attr","i","f","Function","result","originalData","systemConfig","common","log","disabled","validator","label","link","Utils","renderTextWithA","color","themeType","textDecoration","pattern","replace","calculate","Object","keys","hideOnlyControl","item","xs","lg","md","sm","assign","marginBottom","textAlign","style","darkStyle","newLine","flexBasis","height","validatorNoSaveOnError","validatorErrorText","renderedItem","renderItem","commandRunning","tooltip","width","button","buttonTooltip","buttonTooltipNoTranslation","renderConfirmDialog","split","part","shift","Component","getPrototypeOf","constructor","propTypes","PropTypes","object","isRequired","string","any","themeName","customs","bool","number","dateFormat","isFloatComma"],"sources":["JsonConfigComponent/ConfigGeneric.jsx"],"sourcesContent":["import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport Grid from '@mui/material/Grid';\nimport Button from '@mui/material/Button';\n\nimport IconInfo from '@mui/icons-material/Info';\nimport IconWarning from '@mui/icons-material/Warning';\nimport IconError from '@mui/icons-material/Error';\n\nimport I18n from './wrapper/i18n';\nimport Utils from './wrapper/Components/Utils';\nimport ConfirmDialog from './wrapper/Dialogs/Confirm';\n\nclass ConfigGeneric extends Component {\n static DIFFERENT_VALUE = '__different__';\n static DIFFERENT_LABEL = 'ra___different__';\n static NONE_VALUE = '';\n static NONE_LABEL = 'ra_none';\n static AsyncFunction = Object.getPrototypeOf(async function(){}).constructor;\n\n constructor(props) {\n super(props);\n\n this.state = {\n confirmDialog: false,\n confirmNewValue: null,\n confirmAttr: null,\n confirmData: null,\n };\n\n this.isError = {};\n\n if (props.schema) {\n if (props.custom) {\n this.defaultValue = props.schema.defaultFunc ? this.executeCustom(props.schema.defaultFunc, props.schema.default, props.data, props.instanceObj, props.arrayIndex, props.globalData) : props.schema.default;\n } else {\n this.defaultValue = props.schema.defaultFunc ? this.execute(props.schema.defaultFunc, props.schema.default, props.data, props.arrayIndex, props.globalData) : props.schema.default;\n }\n }\n\n this.lang = I18n.getLanguage();\n }\n\n componentDidMount() {\n this.props.registerOnForceUpdate && this.props.registerOnForceUpdate(this.props.attr, this.onUpdate);\n const LIKE_SELECT = ['select', 'autocomplete', 'autocompleteSendTo'];\n // init default value\n if (this.defaultValue !== undefined) {\n const value = ConfigGeneric.getValue(this.props.data, this.props.attr);\n if (value === undefined || (LIKE_SELECT.includes(this.props.schema.type) && (value === '' || value === null))) {\n setTimeout(() => {\n if (this.props.custom) {\n this.props.onChange(this.props.attr, this.defaultValue, () =>\n setTimeout(() => this.props.forceUpdate([this.props.attr], this.props.data), 100));\n //this.onChange(this.props.attr, this.defaultValue);\n } else {\n ConfigGeneric.setValue(this.props.data, this.props.attr, this.defaultValue);\n this.props.onChange(this.props.data, undefined, () =>\n this.props.forceUpdate([this.props.attr], this.props.data));\n }\n }, 100);\n }\n } else if (this.props.schema.defaultSendTo) {\n this.sendTo();\n }\n }\n\n sendTo() {\n if (this.props.alive) {\n this.defaultSendToDone = true;\n let data = this.props.schema.data;\n if (data === undefined && this.props.schema.jsonData) {\n data = this.getPattern(this.props.schema.jsonData);\n try {\n data = JSON.parse(data);\n } catch (e) {\n console.error('Cannot parse json data: ' + data);\n }\n } else {\n data = {\n attr: this.props.attr,\n value: ConfigGeneric.getValue(this.props.data, this.props.attr),\n };\n }\n\n if (data === undefined) {\n data = null;\n }\n\n this.props.socket.sendTo(`${this.props.adapterName}.${this.props.instance}`, this.props.schema.defaultSendTo, data)\n .then(value => {\n if (value !== null && value !== undefined) {\n if (this.props.custom) {\n this.props.onChange(this.props.attr, value, () =>\n this.props.forceUpdate([this.props.attr], this.props.data));\n //this.onChange(this.props.attr, this.defaultValue);\n } else {\n ConfigGeneric.setValue(this.props.data, this.props.attr, value);\n this.props.onChange(this.props.data, undefined, () =>\n this.props.forceUpdate([this.props.attr], this.props.data));\n }\n }\n });\n } else {\n this.defaultSendToDone = false;\n // show error, that instance does not started\n this.onError(this.props.attr, I18n.t('ra_Instance %s is not alive', this.props.instance));\n }\n }\n\n componentWillUnmount() {\n this.props.registerOnForceUpdate && this.props.registerOnForceUpdate(this.props.attr)\n if (this.sendToTimeout) {\n clearTimeout(this.sendToTimeout);\n this.sendToTimeout = null;\n }\n }\n\n onUpdate = data => {\n const value = ConfigGeneric.getValue(data || this.props.data, this.props.attr) || '';\n if (this.state.value !== value) {\n this.setState({ value });\n } else {\n this.forceUpdate();\n }\n }\n\n static getValue(data, attr) {\n if (typeof attr === 'string') {\n return ConfigGeneric.getValue(data, attr.split('.'));\n } else {\n if (attr.length === 1) {\n return data[attr[0]];\n } else {\n const part = attr.shift();\n if (typeof data[part] === 'object') {\n return ConfigGeneric.getValue(data[part], attr);\n } else {\n return null;\n }\n }\n }\n }\n\n static setValue(data, attr, value) {\n if (typeof attr === 'string') {\n return ConfigGeneric.setValue(data, attr.split('.'), value);\n } else {\n if (attr.length === 1) {\n if (value === null) {\n delete data[attr[0]];\n } else {\n data[attr[0]] = value;\n }\n } else {\n const part = attr.shift();\n if (!data[part] || typeof data[part] === 'object') {\n data[part] = data[part] || {};\n }\n return ConfigGeneric.setValue(data[part], attr, value);\n }\n }\n }\n\n getText(text, noTranslation) {\n if (!text) {\n return '';\n }\n\n if (typeof text === 'string') {\n text = noTranslation ? text : I18n.t(text);\n if (text.includes('${')) {\n return this.getPattern(text);\n } else {\n return text;\n }\n } else if (text && typeof text === 'object') {\n if (text.func) {\n // calculate pattern\n if (typeof text.func === 'object') {\n return this.getPattern(text.func[this.lang] || text.func.en || '');\n } else {\n this.getPattern(text.func);\n }\n } else {\n return text[this.lang] || text.en || '';\n }\n }\n }\n\n renderConfirmDialog() {\n if (!this.state.confirmDialog) {\n return null;\n }\n const confirm = this.state.confirmData || this.props.schema.confirm;\n let icon = null;\n if (confirm.type === 'warning') {\n icon = <IconWarning />;\n } else if (confirm.type === 'error') {\n icon = <IconError />;\n } else if (confirm.type === 'info') {\n icon = <IconInfo />;\n }\n\n return <ConfirmDialog\n title={ this.getText(confirm.title) || I18n.t('ra_Please confirm') }\n text={ this.getText(confirm.text) }\n ok={ this.getText(confirm.ok) || I18n.t('ra_Ok') }\n cancel={ this.getText(confirm.cancel) || I18n.t('ra_Cancel') }\n icon={icon}\n onClose={isOk =>\n this.setState({ confirmDialog: false}, () => {\n if (isOk) {\n const data = JSON.parse(JSON.stringify(this.props.data));\n if (this.state.confirmDepAttr) {\n ConfigGeneric.setValue(data, this.state.confirmDepAttr, this.state.confirmDepNewValue);\n }\n\n ConfigGeneric.setValue(data, this.state.confirmAttr, this.state.confirmNewValue);\n this.setState({\n confirmDialog: false,\n confirmDepAttr: null,\n confirmDepNewValue: null,\n confirmNewValue: null,\n confirmAttr: null,\n confirmOldValue: null,\n confirmData: null,\n }, () =>\n this.props.onChange(data));\n } else {\n this.setState({\n confirmDialog: false,\n confirmDepAttr: null,\n confirmDepNewValue: null,\n confirmNewValue: null,\n confirmAttr: null,\n confirmOldValue: null,\n confirmData: null,\n });\n }\n })\n }\n />;\n }\n\n onChange(attr, newValue, cb) {\n const data = JSON.parse(JSON.stringify(this.props.data));\n ConfigGeneric.setValue(data, attr, newValue);\n\n if (this.props.schema.confirm && this.execute(this.props.schema.confirm.condition, false, data, this.props.arrayIndex, this.props.globalData)) {\n return this.setState({\n confirmDialog: true,\n confirmNewValue: newValue,\n confirmAttr: attr,\n confirmData: null,\n });\n } else {\n // find any inputs with confirmation\n if (this.props.schema.confirmDependsOn) {\n for (let z = 0; z < this.props.schema.confirmDependsOn.length; z++) {\n const dep = this.props.schema.confirmDependsOn[z];\n if (dep.confirm) {\n const val = ConfigGeneric.getValue(data, dep.attr);\n\n if (this.execute(dep.confirm.condition, false, data, this.props.arrayIndex, this.props.globalData)) {\n return this.setState({\n confirmDialog: true,\n confirmNewValue: newValue,\n confirmAttr: attr,\n confirmDepNewValue: val,\n confirmDepAttr: dep.attr,\n confirmData: dep.confirm,\n });\n }\n }\n }\n }\n\n const changed = [];\n if (this.props.schema.onChangeDependsOn) {\n for (let z = 0; z < this.props.schema.onChangeDependsOn.length; z++) {\n const dep = this.props.schema.onChangeDependsOn[z];\n if (dep.onChange) {\n const val = ConfigGeneric.getValue(data, dep.attr);\n\n let _newValue;\n if (this.props.custom) {\n _newValue = this.executeCustom(dep.onChange.calculateFunc, data, this.props.customObj, this.props.instanceObj, this.props.arrayIndex, this.props.globalData);\n } else {\n _newValue = this.execute(dep.onChange.calculateFunc, val, data, this.props.arrayIndex, this.props.globalData);\n }\n\n if (_newValue !== val) {\n ConfigGeneric.setValue(data, dep.attr, _newValue);\n changed.push(dep.attr);\n }\n }\n }\n }\n\n if (this.props.schema.hiddenDependsOn) {\n for (let z = 0; z < this.props.schema.hiddenDependsOn.length; z++) {\n const dep = this.props.schema.hiddenDependsOn[z];\n dep.hidden && changed.push(dep.attr);\n }\n }\n\n if (this.props.schema.labelDependsOn) {\n for (let z = 0; z < this.props.schema.labelDependsOn.length; z++) {\n const dep = this.props.schema.labelDependsOn[z];\n dep.hidden && changed.push(dep.attr);\n }\n }\n\n if (this.props.schema.helpDependsOn) {\n for (let z = 0; z < this.props.schema.helpDependsOn.length; z++) {\n const dep = this.props.schema.helpDependsOn[z];\n dep.hidden && changed.push(dep.attr);\n }\n }\n\n if (this.props.schema.onChange && !this.props.schema.onChange.ignoreOwnChanges) {\n const val = ConfigGeneric.getValue(data, this.props.attr);\n\n const newValue = this.props.custom ?\n this.executeCustom(this.props.schema.onChange.calculateFunc, data, this.props.customObj, this.props.instanceObj, this.props.arrayIndex, this.props.globalData)\n :\n this.execute(this.props.schema.onChange.calculateFunc, val, data, this.props.arrayIndex, this.props.globalData);\n if (newValue !== val) {\n ConfigGeneric.setValue(data, this.props.attr, newValue);\n }\n }\n\n if (this.props.custom) {\n this.props.onChange(attr, newValue, () => cb && cb());\n\n changed && changed.length && changed.forEach((_attr, i) =>\n setTimeout(() => this.props.onChange(_attr, ConfigGeneric.getValue(data, _attr)), i * 50));\n } else {\n this.props.onChange(data, undefined, () => {\n changed.length && this.props.forceUpdate(changed, data);\n cb && cb();\n });\n }\n }\n }\n\n execute(func, defaultValue, data, arrayIndex, globalData) {\n if (func && typeof func === 'object') {\n func = func.func;\n }\n\n if (!func) {\n return defaultValue;\n } else {\n try {\n // eslint-disable-next-line no-new-func\n const f = new Function('data', 'originalData', '_system', '_alive', '_common', '_socket', '_instance', 'arrayIndex', 'globalData', func.includes('return') ? func : 'return ' + func);\n const result = f(data || this.props.data, this.props.originalData, this.props.systemConfig, this.props.alive, this.props.common, this.props.socket, this.props.instance, arrayIndex, globalData);\n // console.log(result);\n return result;\n } catch (e) {\n console.error(`Cannot execute ${func}: ${e}`);\n return defaultValue;\n }\n }\n }\n\n executeCustom(func, data, customObj, instanceObj, arrayIndex, globalData) {\n if (func && typeof func === 'object') {\n func = func.func;\n }\n\n if (!func) {\n return null;\n } else {\n try {\n // eslint-disable-next-line no-new-func\n const f = new Function('data', 'originalData', '_system', 'instanceObj', 'customObj', '_socket', 'arrayIndex', 'globalData', func.includes('return') ? func : 'return ' + func);\n const result = f(data || this.props.data, this.props.originalData, this.props.systemConfig, instanceObj, customObj, this.props.socket, arrayIndex, globalData);\n console.log(result);\n return result;\n } catch (e) {\n console.error(`Cannot execute ${func}: ${e}`);\n return null;\n }\n }\n }\n\n calculate(schema) {\n let error;\n let disabled;\n let hidden;\n let defaultValue;\n\n if (this.props.custom) {\n error = schema.validator ? !this.executeCustom(schema.validator, this.props.data, this.props.customObj, this.props.instanceObj, this.props.arrayIndex, this.props.globalData) : false;\n disabled = schema.disabled ? this.executeCustom(schema.disabled, this.props.data, this.props.customObj, this.props.instanceObj, this.props.arrayIndex, this.props.globalData) : false;\n hidden = schema.hidden ? this.executeCustom(schema.hidden, this.props.data, this.props.customObj, this.props.instanceObj, this.props.arrayIndex, this.props.globalData) : false;\n defaultValue = schema.defaultFunc ? this.executeCustom(schema.defaultFunc, this.props.data, this.props.customObj, this.props.instanceObj, this.props.arrayIndex, this.props.globalData) : schema.default;\n } else {\n error = schema.validator ? !this.execute(schema.validator, false, this.props.data, this.props.arrayIndex, this.props.globalData) : false;\n disabled = schema.disabled ? this.execute(schema.disabled, false, this.props.data, this.props.arrayIndex, this.props.globalData) : false;\n hidden = schema.hidden ? this.execute(schema.hidden, false, this.props.data, this.props.arrayIndex, this.props.globalData) : false;\n defaultValue = schema.defaultFunc ? this.execute(schema.defaultFunc, schema.default, this.props.data, this.props.arrayIndex, this.props.globalData) : schema.default;\n }\n\n return { error, disabled, hidden, defaultValue };\n }\n\n onError(attr, error) {\n if (!error) {\n delete this.isError[attr];\n } else {\n this.isError[attr] = error;\n }\n\n this.props.onError && this.props.onError(attr, error);\n }\n\n renderItem(error, disabled, defaultValue) {\n return this.getText(this.props.schema.label) || this.getText(this.props.schema.text)\n }\n\n renderHelp(text, link, noTranslation) {\n if (!link) {\n text = this.getText(text, noTranslation) || '';\n if (text && (text.includes('<a ') || text.includes('<br') || text.includes('<b>') || text.includes('<i>'))) {\n return Utils.renderTextWithA(text);\n } else {\n return text;\n }\n } else {\n return <a\n href={link}\n target=\"_blank\"\n rel=\"noreferrer\"\n style={{ color: this.props.themeType === 'dark' ? '#a147ff' : '#5b238f', textDecoration: 'underline' }}\n >{this.getText(text, noTranslation)}</a>;\n }\n }\n\n getPattern(pattern, data) {\n data = data || this.props.data;\n if (!pattern) {\n return '';\n } else {\n if (typeof pattern === 'object') {\n pattern = pattern.func;\n }\n\n try {\n if (this.props.custom) {\n // eslint-disable-next-line no-new-func\n const f = new Function('data', 'originalData', 'arrayIndex', 'globalData', '_system', 'instanceObj', 'customObj', '_socket', 'return `' + pattern.replace(/`/g, '\\\\`') + '`');\n return f(data, this.props.originalData, this.props.arrayIndex, this.props.globalData, this.props.systemConfig, this.props.instanceObj, this.props.customObj, this.props.socket, this.props.arrayIndex, this.props.globalData);\n } else {\n // eslint-disable-next-line no-new-func\n const f = new Function('data', 'originalData', 'arrayIndex', 'globalData', '_system', '_alive', '_common', '_socket', 'return `' + pattern.replace(/`/g, '\\\\`') + '`');\n return f(data, this.props.originalData, this.props.arrayIndex, this.props.globalData, this.props.systemConfig, this.props.alive, this.props.common, this.props.socket);\n }\n } catch (e) {\n console.error(`Cannot execute ${pattern}: ${e}`);\n return pattern;\n }\n }\n }\n\n render() {\n const schema = this.props.schema;\n\n if (!schema) {\n return null;\n }\n\n if (this.props.alive && this.defaultSendToDone === false) {\n this.sendToTimeout = setTimeout(() => {this.sendToTimeout = null; this.sendTo();}, 200);\n }\n\n const { error, disabled, hidden, defaultValue } = this.calculate(schema);\n\n if (hidden) {\n // Remove all errors if element is hidden\n if (Object.keys(this.isError).length) {\n setTimeout(isError =>\n Object.keys(isError).forEach(attr => this.props.onError(attr)),\n 100, JSON.parse(JSON.stringify(this.isError)));\n this.isError = {};\n }\n\n if (schema.hideOnlyControl) {\n const item = <Grid\n item\n xs={schema.xs || undefined}\n lg={schema.lg || undefined}\n md={schema.md || undefined}\n sm={schema.sm || undefined}\n style={Object.assign(\n {},\n {marginBottom: 0, /*marginRight: 8, */textAlign: 'left'},\n schema.style,\n this.props.themeType === 'dark' ? schema.darkStyle : {}\n )}\n />;\n\n if (schema.newLine) {\n return <>\n <div style={{flexBasis: '100%', height: 0}} />\n {item}\n </>;\n } else {\n return item;\n }\n } else {\n return null;\n }\n } else {\n // Add error\n if (schema.validatorNoSaveOnError) {\n if (error && !Object.keys(this.isError).length) {\n this.isError = {[this.props.attr]: schema.validatorErrorText ? I18n.t(schema.validatorErrorText) : true};\n setTimeout(isError =>\n Object.keys(isError).forEach(attr => this.props.onError(attr, isError[attr])),\n 100, JSON.parse(JSON.stringify(this.isError)));\n } else if (!error && Object.keys(this.isError).length) {\n setTimeout(isError =>\n Object.keys(isError).forEach(attr => this.props.onError(attr)),\n 100, JSON.parse(JSON.stringify(this.isError)));\n this.isError = {};\n }\n }\n\n const renderedItem = this.renderItem(error, disabled || this.props.commandRunning || this.props.disabled, defaultValue);\n\n const item = <Grid\n item\n title={this.getText(schema.tooltip)}\n xs={schema.xs || undefined}\n lg={schema.lg || undefined}\n md={schema.md || undefined}\n sm={schema.sm || undefined}\n style={Object.assign({}, {\n marginBottom: 0,\n // marginRight: 8,\n textAlign: 'left',\n width: schema.type === 'divider' || schema.type === 'header' ? schema.width || '100%' : undefined\n }, schema.style, this.props.themeType === 'dark' ? schema.darkStyle : {})}>\n { this.props.schema.defaultSendTo && this.props.schema.button ? <Grid container style={{ width: '100%' }}>\n <Grid item flex={1}>{renderedItem}</Grid>\n <Grid item><Button\n variant=\"outlined\"\n onClick={() => this.sendTo()}\n title={this.props.schema.buttonTooltip ? this.getText(this.props.schema.buttonTooltip, this.props.schema.buttonTooltipNoTranslation) : I18n.t('ra_Request data by instance')}\n >{this.getText(this.props.schema.button)}</Button></Grid>\n </Grid>\n :\n renderedItem\n }\n </Grid>;\n\n if (schema.newLine) {\n return <>\n <div style={{flexBasis: '100%', height: 0}} />\n {this.renderConfirmDialog()}\n {item}\n </>;\n } else {\n if (this.state.confirmDialog) {\n return <>\n {this.renderConfirmDialog()}\n {item}\n </>;\n } else {\n return item;\n }\n }\n }\n }\n}\n\nConfigGeneric.propTypes = {\n socket: PropTypes.object.isRequired,\n data: PropTypes.object,\n originalData: PropTypes.object,\n schema: PropTypes.object,\n attr: PropTypes.string,\n value: PropTypes.any,\n themeName: PropTypes.string,\n style: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n customs: PropTypes.object,\n forceUpdate: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n\n systemConfig: PropTypes.object,\n alive: PropTypes.bool,\n common: PropTypes.object,\n adapterName: PropTypes.string,\n instance: PropTypes.number,\n dateFormat: PropTypes.string,\n isFloatComma: PropTypes.bool,\n\n customObj: PropTypes.object,\n instanceObj: PropTypes.object,\n custom: PropTypes.bool,\n};\n\nexport default ConfigGeneric;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAAsD;AAAA;AAAA;AAAA;AAAA,IAEhDA,aAAa;EAAA;EAAA;EAOf,uBAAYC,KAAK,EAAE;IAAA;IAAA;IACf,0BAAMA,KAAK;IAAE,6FAiGN,UAAAC,IAAI,EAAI;MACf,IAAMC,KAAK,GAAGH,aAAa,CAACI,QAAQ,CAACF,IAAI,IAAI,MAAKD,KAAK,CAACC,IAAI,EAAE,MAAKD,KAAK,CAACI,IAAI,CAAC,IAAI,EAAE;MACpF,IAAI,MAAKC,KAAK,CAACH,KAAK,KAAKA,KAAK,EAAE;QAC5B,MAAKI,QAAQ,CAAC;UAAEJ,KAAK,EAALA;QAAM,CAAC,CAAC;MAC5B,CAAC,MAAM;QACH,MAAKK,WAAW,EAAE;MACtB;IACJ,CAAC;IAtGG,MAAKF,KAAK,GAAG;MACTG,aAAa,EAAE,KAAK;MACpBC,eAAe,EAAE,IAAI;MACrBC,WAAW,EAAE,IAAI;MACjBC,WAAW,EAAE;IACjB,CAAC;IAED,MAAKC,OAAO,GAAG,CAAC,CAAC;IAEjB,IAAIZ,KAAK,CAACa,MAAM,EAAE;MACd,IAAIb,KAAK,CAACc,MAAM,EAAE;QACd,MAAKC,YAAY,GAAGf,KAAK,CAACa,MAAM,CAACG,WAAW,GAAG,MAAKC,aAAa,CAACjB,KAAK,CAACa,MAAM,CAACG,WAAW,EAAEhB,KAAK,CAACa,MAAM,WAAQ,EAAEb,KAAK,CAACC,IAAI,EAAED,KAAK,CAACkB,WAAW,EAAElB,KAAK,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KAAK,EAAE2G,qBAAS,CAACO,IAAI;EACrBvD,MAAM,EAAEgD,qBAAS,CAACC,MAAM;EACxBlG,WAAW,EAAEiG,qBAAS,CAACG,MAAM;EAC7BnG,QAAQ,EAAEgG,qBAAS,CAACQ,MAAM;EAC1BC,UAAU,EAAET,qBAAS,CAACG,MAAM;EAC5BO,YAAY,EAAEV,qBAAS,CAACO,IAAI;EAE5BtE,SAAS,EAAE+D,qBAAS,CAACC,MAAM;EAC3B9H,WAAW,EAAE6H,qBAAS,CAACC,MAAM;EAC7BlI,MAAM,EAAEiI,qBAAS,CAACO;AACtB,CAAC;AAAC,eAEavJ,aAAa;AAAA"}
@@ -22,6 +22,7 @@ var _Error = _interopRequireDefault(require("@mui/icons-material/Error"));
22
22
  var _Info = _interopRequireDefault(require("@mui/icons-material/Info"));
23
23
  var _Search = _interopRequireDefault(require("@mui/icons-material/Search"));
24
24
  var _Icon = _interopRequireDefault(require("./wrapper/Components/Icon"));
25
+ var _Utils = _interopRequireDefault(require("./wrapper/Components/Utils"));
25
26
  var _ConfigGeneric2 = _interopRequireDefault(require("./ConfigGeneric"));
26
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); }; }
27
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; } }
@@ -89,6 +90,10 @@ var ConfigStaticText = /*#__PURE__*/function (_ConfigGeneric) {
89
90
  } : null
90
91
  }, this.getText(this.props.schema.text || this.props.schema.label, this.props.schema.noTranslation));
91
92
  } else {
93
+ var text = this.getText(this.props.schema.text || this.props.schema.label);
94
+ if (text && (text.includes('<a ') || text.includes('<br') || text.includes('<b>') || text.includes('<i>'))) {
95
+ text = _Utils["default"].renderTextWithA(text);
96
+ }
92
97
  return /*#__PURE__*/_react["default"].createElement("span", {
93
98
  className: this.props.schema.href ? this.props.classes.link : '',
94
99
  onClick: this.props.schema.href ? function () {
@@ -96,7 +101,7 @@ var ConfigStaticText = /*#__PURE__*/function (_ConfigGeneric) {
96
101
  var href = _this.props.schema.href ? _this.getText(_this.props.schema.href, true) : null;
97
102
  href && window.open(href, '_blank');
98
103
  } : null
99
- }, this.getText(this.props.schema.text || this.props.schema.label));
104
+ }, text);
100
105
  }
101
106
  }
102
107
  }]);
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigStaticText.js","names":["styles","theme","fullWidth","height","width","link","textDecoration","color","palette","mode","cursor","ConfigStaticText","icon","props","schema","error","disabled","button","getIcon","variant","undefined","classes","href","getText","window","open","text","label","noTranslation","ConfigGeneric","propTypes","socket","PropTypes","object","isRequired","themeType","string","themeName","style","className","data","onError","func","onChange","withStyles"],"sources":["JsonConfigComponent/ConfigStaticText.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport Button from '@mui/material/Button';\n\nimport IconAuth from '@mui/icons-material/Key';\nimport IconSend from '@mui/icons-material/Send';\nimport IconWeb from '@mui/icons-material/Public';\nimport IconWarning from '@mui/icons-material/Warning';\nimport IconError from '@mui/icons-material/Error';\nimport IconInfo from '@mui/icons-material/Info';\nimport IconSearch from '@mui/icons-material/Search';\n\nimport Icon from './wrapper/Components/Icon';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n fullWidth: {\n height: '100%',\n width: '100%',\n },\n link: {\n textDecoration: 'underline',\n color: theme.palette.mode === 'dark' ? '#4dabf5' : '#254e72',\n cursor: 'pointer',\n\n },\n});\n\nclass ConfigStaticText extends ConfigGeneric {\n getIcon() {\n let icon = null;\n if (this.props.schema.icon === 'auth') {\n icon = <IconAuth />;\n } else if (this.props.schema.icon === 'send') {\n icon = <IconSend />;\n } else if (this.props.schema.icon === 'web') {\n icon = <IconWeb />;\n } else if (this.props.schema.icon === 'warning') {\n icon = <IconWarning />;\n } else if (this.props.schema.icon === 'error') {\n icon = <IconError />;\n } else if (this.props.schema.icon === 'info') {\n icon = <IconInfo />;\n } else if (this.props.schema.icon === 'search') {\n icon = <IconSearch />;\n } else if (this.props.schema.icon) {\n icon = <Icon src={this.props.schema.icon} />;\n }\n\n return icon;\n }\n\n renderItem(error, disabled) {\n if (this.props.schema.button) {\n let icon = this.getIcon();\n return <Button\n variant={this.props.schema.variant || undefined}\n color={this.props.schema.color || 'grey'}\n className={this.props.classes.fullWidth}\n disabled={disabled}\n startIcon={icon}\n onClick={this.props.schema.href ? () => {\n // calculate one more time just before call\n const href = this.props.schema.href ? this.getText(this.props.schema.href, true) : null;\n href && window.open(href, '_blank');\n } : null}\n >\n {this.getText(this.props.schema.text || this.props.schema.label, this.props.schema.noTranslation)}\n </Button>\n } else {\n return <span\n className={this.props.schema.href ? this.props.classes.link : ''}\n onClick={this.props.schema.href ? () => {\n // calculate one more time just before call\n const href = this.props.schema.href ? this.getText(this.props.schema.href, true) : null;\n href && window.open(href, '_blank');\n } : null}>\n {this.getText(this.props.schema.text || this.props.schema.label)}\n </span>;\n }\n }\n}\n\nConfigStaticText.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigStaticText);\n"],"mappings":";;;;;;;;;;;;AAAA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAA4C;AAAA;AAE5C,IAAMA,MAAM,GAAG,SAATA,MAAM,CAAGC,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C,MAAM;QACH,oBAAO;UACH,SAAS,EAAE,IAAI,CAACf,KAAK,CAACC,MAAM,CAACQ,IAAI,GAAG,IAAI,CAACT,KAAK,CAACQ,OAAO,CAAChB,IAAI,GAAG,EAAG;UACjE,OAAO,EAAE,IAAI,CAACQ,KAAK,CAACC,MAAM,CAACQ,IAAI,GAAG,YAAM;YACpC;YACA,IAAMA,IAAI,GAAG,KAAI,CAACT,KAAK,CAACC,MAAM,CAACQ,IAAI,GAAG,KAAI,CAACC,OAAO,CAAC,KAAI,CAACV,KAAK,CAACC,MAAM,CAACQ,IAAI,EAAE,IAAI,CAAC,GAAG,IAAI;YACvFA,IAAI,IAAIE,MAAM,CAACC,IAAI,CAACH,IAAI,EAAE,QAAQ,CAAC;UACvC,CAAC,GAAG;QAAK,GACR,IAAI,CAACC,OAAO,CAAC,IAAI,CAACV,KAAK,CAACC,MAAM,CAACY,IAAI,IAAI,IAAI,CAACb,KAAK,CAACC,MAAM,CAACa,KAAK,CAAC,CAC7D;MACX;IACJ;EAAC;EAAA;AAAA,EApD0BE,0BAAa;AAuD5ClB,gBAAgB,CAACmB,SAAS,GAAG;EACzBC,MAAM,EAAEC,qBAAS,CAACC,MAAM,CAACC,UAAU;EACnCC,SAAS,EAAEH,qBAAS,CAACI,MAAM;EAC3BC,SAAS,EAAEL,qBAAS,CAACI,MAAM;EAC3BE,KAAK,EAAEN,qBAAS,CAACC,MAAM;EACvBM,SAAS,EAAEP,qBAAS,CAACI,MAAM;EAC3BI,IAAI,EAAER,qBAAS,CAACC,MAAM,CAACC,UAAU;EACjCpB,MAAM,EAAEkB,qBAAS,CAACC,MAAM;EACxBQ,OAAO,EAAET,qBAAS,CAACU,IAAI;EACvBC,QAAQ,EAAEX,qBAAS,CAACU;AACxB,CAAC;AAAC,eAEa,IAAAE,kBAAU,EAAC5C,MAAM,CAAC,CAACW,gBAAgB,CAAC;AAAA"}
1
+ {"version":3,"file":"ConfigStaticText.js","names":["styles","theme","fullWidth","height","width","link","textDecoration","color","palette","mode","cursor","ConfigStaticText","icon","props","schema","error","disabled","button","getIcon","variant","undefined","classes","href","getText","window","open","text","label","noTranslation","includes","Utils","renderTextWithA","ConfigGeneric","propTypes","socket","PropTypes","object","isRequired","themeType","string","themeName","style","className","data","onError","func","onChange","withStyles"],"sources":["JsonConfigComponent/ConfigStaticText.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport Button from '@mui/material/Button';\n\nimport IconAuth from '@mui/icons-material/Key';\nimport IconSend from '@mui/icons-material/Send';\nimport IconWeb from '@mui/icons-material/Public';\nimport IconWarning from '@mui/icons-material/Warning';\nimport IconError from '@mui/icons-material/Error';\nimport IconInfo from '@mui/icons-material/Info';\nimport IconSearch from '@mui/icons-material/Search';\n\nimport Icon from './wrapper/Components/Icon';\nimport Utils from './wrapper/Components/Utils';\n\nimport ConfigGeneric from './ConfigGeneric';\n\nconst styles = theme => ({\n fullWidth: {\n height: '100%',\n width: '100%',\n },\n link: {\n textDecoration: 'underline',\n color: theme.palette.mode === 'dark' ? '#4dabf5' : '#254e72',\n cursor: 'pointer',\n\n },\n});\n\nclass ConfigStaticText extends ConfigGeneric {\n getIcon() {\n let icon = null;\n if (this.props.schema.icon === 'auth') {\n icon = <IconAuth />;\n } else if (this.props.schema.icon === 'send') {\n icon = <IconSend />;\n } else if (this.props.schema.icon === 'web') {\n icon = <IconWeb />;\n } else if (this.props.schema.icon === 'warning') {\n icon = <IconWarning />;\n } else if (this.props.schema.icon === 'error') {\n icon = <IconError />;\n } else if (this.props.schema.icon === 'info') {\n icon = <IconInfo />;\n } else if (this.props.schema.icon === 'search') {\n icon = <IconSearch />;\n } else if (this.props.schema.icon) {\n icon = <Icon src={this.props.schema.icon} />;\n }\n\n return icon;\n }\n\n renderItem(error, disabled) {\n if (this.props.schema.button) {\n let icon = this.getIcon();\n return <Button\n variant={this.props.schema.variant || undefined}\n color={this.props.schema.color || 'grey'}\n className={this.props.classes.fullWidth}\n disabled={disabled}\n startIcon={icon}\n onClick={this.props.schema.href ? () => {\n // calculate one more time just before call\n const href = this.props.schema.href ? this.getText(this.props.schema.href, true) : null;\n href && window.open(href, '_blank');\n } : null}\n >\n {this.getText(this.props.schema.text || this.props.schema.label, this.props.schema.noTranslation)}\n </Button>\n } else {\n let text = this.getText(this.props.schema.text || this.props.schema.label);\n if (text && (text.includes('<a ') || text.includes('<br') || text.includes('<b>') || text.includes('<i>'))) {\n text = Utils.renderTextWithA(text);\n }\n\n return <span\n className={this.props.schema.href ? this.props.classes.link : ''}\n onClick={this.props.schema.href ? () => {\n // calculate one more time just before call\n const href = this.props.schema.href ? this.getText(this.props.schema.href, true) : null;\n href && window.open(href, '_blank');\n } : null}>\n {text}\n </span>;\n }\n }\n}\n\nConfigStaticText.propTypes = {\n socket: PropTypes.object.isRequired,\n themeType: PropTypes.string,\n themeName: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n data: PropTypes.object.isRequired,\n schema: PropTypes.object,\n onError: PropTypes.func,\n onChange: PropTypes.func,\n};\n\nexport default withStyles(styles)(ConfigStaticText);\n"],"mappings":";;;;;;;;;;;;AAAA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAA4C;AAAA;AAE5C,IAAMA,MAAM,GAAG,SAATA,MAAM,CAAGC,KAAK;EAAA,OAAK;IACrBC,SAAS,EAAE;MACPC,MAAM,EAAE,MAAM;MACdC,KAAK,EAAE;IACX,CAAC;IACDC,IAAI,EAAE;MACFC,cAAc,EAAE,WAAW;MAC3BC,KAAK,EAAEN,KAAK,CAACO,OAAO,CAACC,IAAI,KAAK,MAAM,GAAG,SAAS,GAAG,SAAS;MAC5DC,MAAM,EAAE;IAEZ;EACJ,CAAC;AAAA,CAAC;AAAC,IAEGC,gBAAgB;EAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA,OAClB,mBAAU;MACN,IAAIC,IAAI,GAA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iBAAK,CAACC,eAAe,CAACL,IAAI,CAAC;QACtC;QAEA,oBAAO;UACH,SAAS,EAAE,IAAI,CAACb,KAAK,CAACC,MAAM,CAACQ,IAAI,GAAG,IAAI,CAACT,KAAK,CAACQ,OAAO,CAAChB,IAAI,GAAG,EAAG;UACjE,OAAO,EAAE,IAAI,CAACQ,KAAK,CAACC,MAAM,CAACQ,IAAI,GAAG,YAAM;YACpC;YACA,IAAMA,IAAI,GAAG,KAAI,CAACT,KAAK,CAACC,MAAM,CAACQ,IAAI,GAAG,KAAI,CAACC,OAAO,CAAC,KAAI,CAACV,KAAK,CAACC,MAAM,CAACQ,IAAI,EAAE,IAAI,CAAC,GAAG,IAAI;YACvFA,IAAI,IAAIE,MAAM,CAACC,IAAI,CAACH,IAAI,EAAE,QAAQ,CAAC;UACvC,CAAC,GAAG;QAAK,GACRI,IAAI,CACF;MACX;IACJ;EAAC;EAAA;AAAA,EAzD0BM,0BAAa;AA4D5CrB,gBAAgB,CAACsB,SAAS,GAAG;EACzBC,MAAM,EAAEC,qBAAS,CAACC,MAAM,CAACC,UAAU;EACnCC,SAAS,EAAEH,qBAAS,CAACI,MAAM;EAC3BC,SAAS,EAAEL,qBAAS,CAACI,MAAM;EAC3BE,KAAK,EAAEN,qBAAS,CAACC,MAAM;EACvBM,SAAS,EAAEP,qBAAS,CAACI,MAAM;EAC3BI,IAAI,EAAER,qBAAS,CAACC,MAAM,CAACC,UAAU;EACjCvB,MAAM,EAAEqB,qBAAS,CAACC,MAAM;EACxBQ,OAAO,EAAET,qBAAS,CAACU,IAAI;EACvBC,QAAQ,EAAEX,qBAAS,CAACU;AACxB,CAAC;AAAC,eAEa,IAAAE,kBAAU,EAAC/C,MAAM,CAAC,CAACW,gBAAgB,CAAC;AAAA"}
@@ -551,7 +551,7 @@ declare class ObjectBrowser extends React.Component<import("./types").ObjectBrow
551
551
  * @returns {JSX.Element | null}
552
552
  */
553
553
  private renderEditValueDialog;
554
- extendObject: (id: any, data: any) => Promise<any>;
554
+ extendObject: (id: any, data: any) => Promise<void>;
555
555
  setObject: (id: any, data: any) => Promise<void>;
556
556
  /**
557
557
  * The rendering method of this component.
@@ -697,18 +697,27 @@ var Utils = /*#__PURE__*/function () {
697
697
  }, {
698
698
  key: "renderTextWithA",
699
699
  value: function renderTextWithA(text) {
700
- var m = text.match(/<a [^<]+<\/a>|<br\/?>/);
700
+ var m = text.match(/<a [^<]+<\/a>|<br\/?>|<b>[^<]+<\/b>|<i>[^<]+<\/i>/);
701
701
  if (m) {
702
702
  var result = [];
703
703
  var key = 1;
704
704
  do {
705
- var p = text.split(m[0]);
706
- p[0] && result.push( /*#__PURE__*/_react["default"].createElement("span", {
707
- key: 'a' + key++
708
- }, p[0]));
709
- if (m[0].startsWith('<br')) {
705
+ var start = text.substring(0, m.index);
706
+ text = text.substring(m.index + m[0].length);
707
+ start && result.push( /*#__PURE__*/_react["default"].createElement("span", {
708
+ key: "a".concat(key++)
709
+ }, start));
710
+ if (m[0].startsWith('<b>')) {
711
+ result.push( /*#__PURE__*/_react["default"].createElement("b", {
712
+ key: "a".concat(key++)
713
+ }, m[0].substring(3, m[0].length - 4)));
714
+ } else if (m[0].startsWith('<i>')) {
715
+ result.push( /*#__PURE__*/_react["default"].createElement("i", {
716
+ key: "a".concat(key++)
717
+ }, m[0].substring(3, m[0].length - 4)));
718
+ } else if (m[0].startsWith('<br')) {
710
719
  result.push( /*#__PURE__*/_react["default"].createElement("br", {
711
- key: 'a' + key++
720
+ key: "a".concat(key++)
712
721
  }));
713
722
  } else {
714
723
  var href = m[0].match(/href="([^"]+)"/) || m[0].match(/href='([^']+)'/);
@@ -718,18 +727,20 @@ var Utils = /*#__PURE__*/function () {
718
727
 
719
728
  // eslint-disable-next-line
720
729
  result.push( /*#__PURE__*/_react["default"].createElement("a", {
721
- key: 'a' + key++,
730
+ key: "a".concat(key++),
722
731
  href: href ? href[1] : '',
723
732
  target: target ? target[1] : '_blank',
724
- rel: rel ? rel[1] : ''
733
+ rel: rel ? rel[1] : '',
734
+ style: {
735
+ color: 'inherit'
736
+ }
725
737
  }, title ? title[1] : ''));
726
738
  }
727
- text = p[1];
728
- m = text && text.match(/<a [^<]+<\/a>|<br\/?>/);
739
+ m = text && text.match(/<a [^<]+<\/a>|<br\/?>|<b>[^<]+<\/b>|<i>[^<]+<\/i>/);
729
740
  if (!m) {
730
- p[1] && result.push( /*#__PURE__*/_react["default"].createElement("span", {
741
+ text && result.push( /*#__PURE__*/_react["default"].createElement("span", {
731
742
  key: 'a' + key++
732
- }, p[1]));
743
+ }, text));
733
744
  }
734
745
  } while (m);
735
746
  return result;