@iobroker/json-config 7.2.3 → 7.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/build/JsonConfig.d.ts +2 -2
  2. package/build/JsonConfig.js +5 -5
  3. package/build/JsonConfig.js.map +1 -1
  4. package/build/JsonConfigComponent/ChipInput.d.ts +1 -1
  5. package/build/JsonConfigComponent/ChipInput.js +1 -1
  6. package/build/JsonConfigComponent/ChipInput.js.map +1 -1
  7. package/build/JsonConfigComponent/ConfigAccordion.js +1 -1
  8. package/build/JsonConfigComponent/ConfigAccordion.js.map +1 -1
  9. package/build/JsonConfigComponent/ConfigAlive.js +1 -1
  10. package/build/JsonConfigComponent/ConfigAlive.js.map +1 -1
  11. package/build/JsonConfigComponent/ConfigAutocomplete.js +1 -1
  12. package/build/JsonConfigComponent/ConfigAutocomplete.js.map +1 -1
  13. package/build/JsonConfigComponent/ConfigAutocompleteSendTo.js +1 -1
  14. package/build/JsonConfigComponent/ConfigAutocompleteSendTo.js.map +1 -1
  15. package/build/JsonConfigComponent/ConfigCRON.js +1 -1
  16. package/build/JsonConfigComponent/ConfigCRON.js.map +1 -1
  17. package/build/JsonConfigComponent/ConfigCertCollection.js +1 -1
  18. package/build/JsonConfigComponent/ConfigCertCollection.js.map +1 -1
  19. package/build/JsonConfigComponent/ConfigCertificateSelect.js +1 -1
  20. package/build/JsonConfigComponent/ConfigCertificateSelect.js.map +1 -1
  21. package/build/JsonConfigComponent/ConfigCertificates.js +1 -1
  22. package/build/JsonConfigComponent/ConfigCertificates.js.map +1 -1
  23. package/build/JsonConfigComponent/ConfigCheckLicense.js +2 -2
  24. package/build/JsonConfigComponent/ConfigCheckLicense.js.map +1 -1
  25. package/build/JsonConfigComponent/ConfigCheckbox.js +1 -1
  26. package/build/JsonConfigComponent/ConfigCheckbox.js.map +1 -1
  27. package/build/JsonConfigComponent/ConfigColor.js +1 -1
  28. package/build/JsonConfigComponent/ConfigColor.js.map +1 -1
  29. package/build/JsonConfigComponent/ConfigCoordinates.js +1 -1
  30. package/build/JsonConfigComponent/ConfigCoordinates.js.map +1 -1
  31. package/build/JsonConfigComponent/ConfigCustom.js +1 -1
  32. package/build/JsonConfigComponent/ConfigCustom.js.map +1 -1
  33. package/build/JsonConfigComponent/ConfigFile.js +2 -2
  34. package/build/JsonConfigComponent/ConfigFile.js.map +1 -1
  35. package/build/JsonConfigComponent/ConfigFileSelector.js +2 -2
  36. package/build/JsonConfigComponent/ConfigFileSelector.js.map +1 -1
  37. package/build/JsonConfigComponent/ConfigFunc.js +1 -1
  38. package/build/JsonConfigComponent/ConfigFunc.js.map +1 -1
  39. package/build/JsonConfigComponent/ConfigGeneric.d.ts +2 -2
  40. package/build/JsonConfigComponent/ConfigGeneric.js +6 -6
  41. package/build/JsonConfigComponent/ConfigGeneric.js.map +1 -1
  42. package/build/JsonConfigComponent/ConfigIP.js +1 -1
  43. package/build/JsonConfigComponent/ConfigIP.js.map +1 -1
  44. package/build/JsonConfigComponent/ConfigImageUpload.js +1 -1
  45. package/build/JsonConfigComponent/ConfigImageUpload.js.map +1 -1
  46. package/build/JsonConfigComponent/ConfigInstanceSelect.js +1 -1
  47. package/build/JsonConfigComponent/ConfigInstanceSelect.js.map +1 -1
  48. package/build/JsonConfigComponent/ConfigJsonEditor.js +1 -1
  49. package/build/JsonConfigComponent/ConfigJsonEditor.js.map +1 -1
  50. package/build/JsonConfigComponent/ConfigLanguage.js +1 -1
  51. package/build/JsonConfigComponent/ConfigLanguage.js.map +1 -1
  52. package/build/JsonConfigComponent/ConfigLicense.js +1 -1
  53. package/build/JsonConfigComponent/ConfigLicense.js.map +1 -1
  54. package/build/JsonConfigComponent/ConfigNumber.js +1 -1
  55. package/build/JsonConfigComponent/ConfigNumber.js.map +1 -1
  56. package/build/JsonConfigComponent/ConfigObjectId.js +1 -1
  57. package/build/JsonConfigComponent/ConfigObjectId.js.map +1 -1
  58. package/build/JsonConfigComponent/ConfigPanel.js +1 -1
  59. package/build/JsonConfigComponent/ConfigPanel.js.map +1 -1
  60. package/build/JsonConfigComponent/ConfigPassword.js +1 -1
  61. package/build/JsonConfigComponent/ConfigPassword.js.map +1 -1
  62. package/build/JsonConfigComponent/ConfigPattern.js +1 -1
  63. package/build/JsonConfigComponent/ConfigPattern.js.map +1 -1
  64. package/build/JsonConfigComponent/ConfigPort.js +1 -1
  65. package/build/JsonConfigComponent/ConfigPort.js.map +1 -1
  66. package/build/JsonConfigComponent/ConfigRoom.js +1 -1
  67. package/build/JsonConfigComponent/ConfigRoom.js.map +1 -1
  68. package/build/JsonConfigComponent/ConfigSelect.js +1 -1
  69. package/build/JsonConfigComponent/ConfigSelect.js.map +1 -1
  70. package/build/JsonConfigComponent/ConfigSelectSendTo.js +1 -1
  71. package/build/JsonConfigComponent/ConfigSelectSendTo.js.map +1 -1
  72. package/build/JsonConfigComponent/ConfigSendto.d.ts +1 -1
  73. package/build/JsonConfigComponent/ConfigSendto.js +2 -2
  74. package/build/JsonConfigComponent/ConfigSendto.js.map +1 -1
  75. package/build/JsonConfigComponent/ConfigSetState.d.ts +1 -1
  76. package/build/JsonConfigComponent/ConfigSetState.js +3 -3
  77. package/build/JsonConfigComponent/ConfigSetState.js.map +1 -1
  78. package/build/JsonConfigComponent/ConfigState.js +1 -1
  79. package/build/JsonConfigComponent/ConfigState.js.map +1 -1
  80. package/build/JsonConfigComponent/ConfigStaticDivider.js +1 -1
  81. package/build/JsonConfigComponent/ConfigStaticDivider.js.map +1 -1
  82. package/build/JsonConfigComponent/ConfigStaticHeader.js.map +1 -1
  83. package/build/JsonConfigComponent/ConfigStaticText.js +1 -1
  84. package/build/JsonConfigComponent/ConfigStaticText.js.map +1 -1
  85. package/build/JsonConfigComponent/ConfigTable.js +1 -1
  86. package/build/JsonConfigComponent/ConfigTable.js.map +1 -1
  87. package/build/JsonConfigComponent/ConfigText.js +1 -1
  88. package/build/JsonConfigComponent/ConfigText.js.map +1 -1
  89. package/build/JsonConfigComponent/ConfigTextSendTo.js +1 -1
  90. package/build/JsonConfigComponent/ConfigTextSendTo.js.map +1 -1
  91. package/build/JsonConfigComponent/ConfigUUID.js +1 -1
  92. package/build/JsonConfigComponent/ConfigUUID.js.map +1 -1
  93. package/build/JsonConfigComponent/ConfigUser.js +1 -1
  94. package/build/JsonConfigComponent/ConfigUser.js.map +1 -1
  95. package/build/JsonConfigComponent/index.d.ts +1 -1
  96. package/build/JsonConfigComponent/index.js +1 -1
  97. package/build/JsonConfigComponent/index.js.map +1 -1
  98. package/build/JsonConfigComponent/wrapper/Components/CustomModal.js +1 -1
  99. package/build/JsonConfigComponent/wrapper/Components/CustomModal.js.map +1 -1
  100. package/build/Utils.js +1 -1
  101. package/build/Utils.js.map +1 -1
  102. package/build/types.d.ts +1 -1
  103. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigState.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAY,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE9E,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAGlD,OAAO,aAAa,MAAM,SAAS,CAAC;AACpC,OAAO,aAAa,EAAE,EAAoD,MAAM,iBAAiB,CAAC;AAYlG,MAAM,WAAY,SAAQ,aAAiD;IACvE,cAAc,GAAyC,IAAI,CAAC;IAE5D,aAAa,GAA6F;QACtG,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;KACd,CAAC;IAEF,WAAW;QACP,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,IAA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MAAM,IAAI,GACN,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC;YACxG,IAAI,KAAK,CAAC;YACV,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW,KAAK,MAAM,EAAE,CAAC;gBACpC,KAAK,GAAG,8BAAM,uBAAuB,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,UAAoB,EAAE,GAAI,CAAC;YAC3F,CAAC;iBAAM,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,KAAK,IAAI,EAAE,CAAC;gBACxC,KAAK,GAAG,MAAM,CAAC;YACnB,CAAC;iBAAM,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;gBAC7C,KAAK,GAAG,WAAW,CAAC;YACxB,CAAC;iBAAM,CAAC;gBACJ,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC;YAClC,CAAC;YAED,OAAO,GAAG,CACN,6BAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE;gBAC3B,KAAK;gBACL,KAAK,CAAC,CAAC,CAAC,8BAAM,KAAK,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,QAAU,CAAC,CAAC,CAAC,IAAI;gBACxD,KAAK;gBACL,IAAI,CAAC,CAAC,CAAC,8BAAM,KAAK,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,IAAG,IAAI,CAAQ,CAAC,CAAC,CAAC,IAAI,CACzD,CACT,CAAC;QACN,CAAC;QAED,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ;AAED,eAAe,WAAW,CAAC","sourcesContent":["import React, { type JSX } from 'react';\n\nimport { TextField, IconButton, Button, Switch, Slider } from '@mui/material';\n\nimport { I18n } from '@iobroker/adapter-react-v5';\n\nimport type { ConfigItemState } from '#JC/types';\nimport getIconByName from './Icons';\nimport ConfigGeneric, { type ConfigGenericProps, type ConfigGenericState } from './ConfigGeneric';\n\ninterface ConfigStateProps extends ConfigGenericProps {\n schema: ConfigItemState;\n}\n\ninterface ConfigStateState extends ConfigGenericState {\n stateValue?: string | number | boolean | null;\n controlType?: string;\n obj?: ioBroker.Object | null;\n}\n\nclass ConfigState extends ConfigGeneric<ConfigStateProps, ConfigStateState> {\n controlTimeout: ReturnType<typeof setTimeout> | null = null;\n\n delayedUpdate: { timer: ReturnType<typeof setTimeout> | null; value: string | boolean | number | null } = {\n timer: null,\n value: null,\n };\n\n getObjectID(): string {\n return `${this.props.schema.system ? 'system.adapter.' : ''}${this.props.adapterName}.${this.props.instance}.${this.props.schema.oid}`;\n }\n\n async componentDidMount(): Promise<void> {\n super.componentDidMount();\n const obj: ioBroker.StateObject = (await this.props.socket.getObject(\n this.getObjectID(),\n )) as ioBroker.StateObject;\n const controlType = this.props.schema.control || this.detectType(obj);\n\n const state = await this.props.socket.getState(this.getObjectID());\n\n this.setState({ stateValue: state ? state.val : null, controlType, obj }, async () => {\n await this.props.socket.subscribeState(this.getObjectID(), this.onStateChanged);\n });\n }\n\n componentWillUnmount(): void {\n super.componentWillUnmount();\n this.props.socket.unsubscribeState(this.getObjectID(), this.onStateChanged);\n if (this.delayedUpdate.timer) {\n clearTimeout(this.delayedUpdate.timer);\n this.delayedUpdate.timer = null;\n }\n\n if (this.controlTimeout) {\n clearTimeout(this.controlTimeout);\n this.controlTimeout = null;\n this.props.socket\n .setState(this.getObjectID(), this.state.stateValue, false)\n .catch(e => console.error(`Cannot control value: ${e}`));\n }\n }\n\n onStateChanged = (_id: string, state: ioBroker.State | null | undefined): void => {\n let val = state ? state.val : null;\n if (this.state.controlType === 'button' || this.state.controlType === 'switch') {\n val = !!val;\n if (this.state.stateValue !== val) {\n this.setState({ stateValue: val });\n }\n } else if (val !== null && (this.state.controlType === 'slider' || this.state.controlType === 'number')) {\n val = parseFloat(val as unknown as string);\n console.log(`${Date.now()} Received new value: ${val}`);\n if (val !== this.state.stateValue) {\n if (this.delayedUpdate.timer) {\n clearTimeout(this.delayedUpdate.timer);\n this.delayedUpdate.timer = null;\n }\n this.delayedUpdate.value = val;\n this.delayedUpdate.timer = setTimeout(() => {\n this.setState({ stateValue: this.delayedUpdate.value });\n }, 500);\n } else if (this.delayedUpdate.timer) {\n clearTimeout(this.delayedUpdate.timer);\n this.delayedUpdate.timer = null;\n }\n } else if (this.state.stateValue.toString() !== val.toString()) {\n this.setState({ stateValue: val });\n }\n };\n\n detectType(obj: ioBroker.StateObject): 'button' | 'switch' | 'slider' | 'input' | 'text' {\n obj = obj || ({} as ioBroker.StateObject);\n obj.common = obj.common || ({} as ioBroker.StateCommon);\n\n // read object\n if (obj.common.type === 'boolean') {\n if (this.props.schema.controlled !== false) {\n if (obj.common.read === false || this.props.schema.controlled === true) {\n return 'button';\n }\n if (obj.common.write || this.props.schema.controlled === true) {\n return 'switch';\n }\n }\n\n return 'text';\n }\n\n if (obj.common.type === 'number' && this.props.schema.controlled !== false) {\n if (obj.common.write || this.props.schema.controlled === true) {\n if (obj.common.max !== undefined) {\n return 'slider';\n }\n return 'input';\n }\n return 'text';\n }\n\n if (obj.common.write && this.props.schema.controlled !== false) {\n return 'input';\n }\n\n return 'text';\n }\n\n renderItem(/* error, disabled, defaultValue */): JSX.Element {\n if (!this.state.obj) {\n return null;\n }\n\n let content: JSX.Element;\n\n if (this.state.controlType === 'button') {\n let icon: JSX.Element | null = null;\n if (this.props.schema.falseImage) {\n icon = getIconByName(this.props.schema.falseImage);\n }\n\n const text =\n this.getText(this.props.schema.falseText, this.props.schema.noTranslation) ||\n this.getText(this.props.schema.label, this.props.schema.noTranslation);\n if (!text && icon) {\n content = (\n <IconButton\n style={this.props.schema.falseTextStyle}\n disabled={!!this.props.schema.readOnly}\n onClick={async () => {\n if (this.props.schema.confirm) {\n this.setState({\n confirmDialog: true,\n confirmCallback: async (result: boolean) => {\n if (result) {\n await this.props.socket.setState(this.getObjectID(), true, false);\n }\n },\n });\n } else {\n await this.props.socket.setState(this.getObjectID(), true, false);\n }\n }}\n >\n {icon}\n </IconButton>\n );\n } else {\n content = (\n <Button\n variant={this.props.schema.variant || 'contained'}\n startIcon={icon}\n style={this.props.schema.falseTextStyle}\n disabled={!!this.props.schema.readOnly}\n onClick={async () => {\n if (this.props.schema.confirm) {\n this.setState({\n confirmDialog: true,\n confirmCallback: async (result: boolean) => {\n if (result) {\n await this.props.socket.setState(this.getObjectID(), true, false);\n }\n },\n });\n } else {\n await this.props.socket.setState(this.getObjectID(), true, false);\n }\n }}\n >\n {text || this.getObjectID().split('.').pop()}\n </Button>\n );\n }\n } else if (this.state.controlType === 'switch') {\n let iconFalse: JSX.Element | null = null;\n const textFalse = this.getText(this.props.schema.falseText, this.props.schema.noTranslation);\n if (this.props.schema.falseImage) {\n iconFalse = getIconByName(this.props.schema.falseImage, textFalse ? { marginLeft: 8 } : undefined);\n }\n let iconTrue: JSX.Element | null = null;\n const textTrue = this.getText(this.props.schema.trueText, this.props.schema.noTranslation);\n if (this.props.schema.trueImage) {\n iconTrue = getIconByName(this.props.schema.trueImage, textTrue ? { marginRight: 8 } : undefined);\n }\n\n content = (\n <Switch\n checked={!!this.state.stateValue}\n disabled={!!this.props.schema.readOnly}\n onChange={async () => {\n if (this.props.schema.confirm) {\n this.setState({\n confirmDialog: true,\n confirmCallback: async (result: boolean) => {\n if (result) {\n await this.props.socket.setState(\n this.getObjectID(),\n !this.state.stateValue,\n false,\n );\n }\n },\n });\n } else {\n await this.props.socket.setState(this.getObjectID(), !this.state.stateValue, false);\n }\n }}\n />\n );\n\n if (textFalse || iconFalse || textTrue || iconTrue) {\n content = (\n <div style={{ display: 'flex', alignItems: 'center', fontSize: 14 }}>\n <span style={this.props.schema.falseTextStyle}>\n {textFalse}\n {iconFalse}\n </span>\n {content}\n <span style={this.props.schema.trueTextStyle}>\n {iconTrue}\n {textTrue}\n </span>\n </div>\n );\n }\n\n const label = this.getText(this.props.schema.label, this.props.schema.noTranslation);\n if (label) {\n content = (\n <div style={{ display: 'flex', alignItems: 'center', fontSize: '1rem' }}>\n <span style={{ marginRight: 8 }}>{label}</span>\n {content}\n </div>\n );\n }\n } else if (this.state.controlType === 'slider') {\n let iconFalse: JSX.Element | null = null;\n const textFalse = this.getText(this.props.schema.falseText, this.props.schema.noTranslation);\n if (this.props.schema.falseImage) {\n iconFalse = getIconByName(this.props.schema.falseImage, textFalse ? { marginLeft: 8 } : undefined);\n }\n let iconTrue: JSX.Element | null = null;\n const textTrue = this.getText(this.props.schema.trueText, this.props.schema.noTranslation);\n if (this.props.schema.trueImage) {\n iconTrue = getIconByName(this.props.schema.trueImage, textTrue ? { marginRight: 8 } : undefined);\n }\n\n const min = this.props.schema.min === undefined ? this.state.obj.common.min || 0 : this.props.schema.min;\n const max =\n this.props.schema.max === undefined\n ? this.state.obj.common.max === undefined\n ? 100\n : this.state.obj.common.max\n : this.props.schema.max;\n const step =\n this.props.schema.step === undefined ? this.state.obj.common.step || 1 : this.props.schema.step;\n\n content = (\n <Slider\n style={{ width: '100%', flexGrow: 1 }}\n min={min}\n max={max}\n disabled={!!this.props.schema.readOnly}\n step={step}\n value={this.state.stateValue as number}\n valueLabelDisplay=\"auto\"\n valueLabelFormat={(value: number) =>\n `${value}${this.getText(this.props.schema.unit, this.props.schema.noTranslation) || this.state.obj.common.unit || ''}`\n }\n onChange={(_e: Event, value: number) => {\n this.setState({ stateValue: value }, (): void => {\n if (this.controlTimeout) {\n clearTimeout(this.controlTimeout);\n }\n this.controlTimeout = setTimeout(async () => {\n console.log(`${Date.now()} Send new value: ${this.state.stateValue}`);\n this.controlTimeout = null;\n await this.props.socket.setState(this.getObjectID(), this.state.stateValue, false);\n }, this.props.schema.controlDelay || 0);\n });\n }}\n />\n );\n\n if (textFalse || iconFalse || textTrue || iconTrue) {\n content = (\n <div\n style={{\n display: 'flex',\n width: '100%',\n flexGrow: 1,\n alignItems: 'center',\n }}\n >\n <span style={{ marginRight: 16, ...this.props.schema.falseTextStyle }}>\n {textFalse}\n {iconFalse}\n </span>\n {content}\n <span style={{ marginLeft: 16, ...this.props.schema.trueTextStyle }}>\n {iconTrue}\n {textTrue}\n </span>\n </div>\n );\n }\n const label = this.getText(this.props.schema.label, this.props.schema.noTranslation);\n if (label) {\n content = (\n <div style={{ display: 'flex', width: '100%', alignItems: 'center' }}>\n <span style={{ whiteSpace: 'nowrap', marginRight: 8, fontSize: '1rem' }}>{label}</span>\n {content}\n </div>\n );\n }\n } else if (this.state.controlType === 'input') {\n content = (\n <TextField\n style={{ width: '100%' }}\n value={this.state.stateValue}\n variant=\"standard\"\n slotProps={{\n input: {\n endAdornment:\n this.getText(this.props.schema.unit, this.props.schema.noTranslation) ||\n this.state.obj.common.unit ||\n undefined,\n },\n htmlInput: {\n readOnly: !!this.props.schema.readOnly,\n },\n }}\n onChange={e => {\n this.setState({ stateValue: e.target.value }, (): void => {\n if (this.controlTimeout) {\n clearTimeout(this.controlTimeout);\n }\n this.controlTimeout = setTimeout(async () => {\n this.controlTimeout = null;\n await this.props.socket.setState(this.getObjectID(), this.state.stateValue, false);\n }, this.props.schema.controlDelay || 0);\n });\n }}\n label={this.getText(this.props.schema.label)}\n helperText={this.renderHelp(\n this.props.schema.help,\n this.props.schema.helpLink,\n this.props.schema.noTranslation,\n )}\n />\n );\n } else if (this.state.obj.common.type === 'number') {\n const min = this.props.schema.min === undefined ? this.state.obj.common.min || 0 : this.props.schema.min;\n const max =\n this.props.schema.max === undefined\n ? this.state.obj.common.max === undefined\n ? 100\n : this.state.obj.common.max\n : this.props.schema.max;\n const step =\n this.props.schema.step === undefined ? this.state.obj.common.step || 1 : this.props.schema.step;\n\n content = (\n <TextField\n variant=\"standard\"\n style={{ width: '100%' }}\n value={this.state.stateValue}\n type=\"number\"\n slotProps={{\n htmlInput: { min, max, step, readOnly: !!this.props.schema.readOnly },\n input: {\n endAdornment:\n this.getText(this.props.schema.unit, this.props.schema.noTranslation) ||\n this.state.obj.common.unit ||\n undefined,\n },\n }}\n onChange={e => {\n this.setState({ stateValue: e.target.value }, (): void => {\n if (this.controlTimeout) {\n clearTimeout(this.controlTimeout);\n }\n this.controlTimeout = setTimeout(async () => {\n this.controlTimeout = null;\n const val = parseFloat(this.state.stateValue as unknown as string);\n await this.props.socket.setState(this.getObjectID(), val, false);\n }, this.props.schema.controlDelay || 0);\n });\n }}\n label={this.getText(this.props.schema.label)}\n helperText={this.renderHelp(\n this.props.schema.help,\n this.props.schema.helpLink,\n this.props.schema.noTranslation,\n )}\n />\n );\n } else if (this.state.obj.common.type === 'boolean') {\n let icon: JSX.Element | null = null;\n let text: string;\n let style: React.CSSProperties | undefined;\n if (!this.state.stateValue) {\n text = this.getText(this.props.schema.falseText, this.props.schema.noTranslation);\n if (this.props.schema.falseImage) {\n icon = getIconByName(this.props.schema.falseImage, text ? { marginLeft: 8 } : undefined);\n }\n style = this.props.schema.falseTextStyle;\n } else {\n text = this.getText(this.props.schema.trueText, this.props.schema.noTranslation);\n if (this.props.schema.trueImage) {\n icon = getIconByName(this.props.schema.falseImage, text ? { marginRight: 8 } : undefined);\n }\n style = this.props.schema.trueTextStyle;\n }\n const label = this.getText(this.props.schema.label, this.props.schema.noTranslation);\n content = (\n <div style={{ fontSize: '1rem', ...style }}>\n {label}\n {label ? <span style={{ marginRight: 8 }}>:</span> : null}\n {icon}\n {text || (this.state.stateValue ? I18n.t('ra_true') : I18n.t('ra_false'))}\n </div>\n );\n } else {\n // text or HTML\n const label = this.getText(this.props.schema.label, this.props.schema.noTranslation);\n const unit =\n this.getText(this.props.schema.unit, this.props.schema.noTranslation) || this.state.obj.common.unit;\n let value;\n if (this.state.controlType === 'html') {\n value = <span dangerouslySetInnerHTML={{ __html: this.state.stateValue as string }} />;\n } else if (this.state.stateValue === null) {\n value = 'null';\n } else if (this.state.stateValue === undefined) {\n value = 'undefined';\n } else {\n value = this.state.stateValue;\n }\n\n content = (\n <div style={{ fontSize: '1rem' }}>\n {label}\n {label ? <span style={{ marginRight: 8 }}>:</span> : null}\n {value}\n {unit ? <span style={{ opacity: 0.7 }}>{unit}</span> : null}\n </div>\n );\n }\n\n return content;\n }\n}\n\nexport default ConfigState;\n"]}
1
+ {"version":3,"file":"ConfigState.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAY,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE9E,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAGlD,OAAO,aAAa,MAAM,SAAS,CAAC;AACpC,OAAO,aAAa,EAAE,EAAoD,MAAM,iBAAiB,CAAC;AAYlG,MAAM,WAAY,SAAQ,aAAiD;IACvE,cAAc,GAAyC,IAAI,CAAC;IAE5D,aAAa,GAA6F;QACtG,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;KACd,CAAC;IAEF,WAAW;QACP,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;IAC3I,CAAC;IAED,KAAK,CAAC,iBAAiB;QACnB,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,MAAM,GAAG,GAAyB,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAChE,IAAI,CAAC,WAAW,EAAE,CACrB,CAAyB,CAAC;QAC3B,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,IAAI,IAAI,CAAC,UAA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AAI,CAAC,KAAK,CAAC,UAAoB,EAAE,GAAI,CAAC;YAC3F,CAAC;iBAAM,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,KAAK,IAAI,EAAE,CAAC;gBACxC,KAAK,GAAG,MAAM,CAAC;YACnB,CAAC;iBAAM,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;gBAC7C,KAAK,GAAG,WAAW,CAAC;YACxB,CAAC;iBAAM,CAAC;gBACJ,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC;YAClC,CAAC;YAED,OAAO,GAAG,CACN,6BAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE;gBAC3B,KAAK;gBACL,KAAK,CAAC,CAAC,CAAC,8BAAM,KAAK,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,QAAU,CAAC,CAAC,CAAC,IAAI;gBACxD,KAAK;gBACL,IAAI,CAAC,CAAC,CAAC,8BAAM,KAAK,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,IAAG,IAAI,CAAQ,CAAC,CAAC,CAAC,IAAI,CACzD,CACT,CAAC;QACN,CAAC;QAED,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ;AAED,eAAe,WAAW,CAAC","sourcesContent":["import React, { type JSX } from 'react';\n\nimport { TextField, IconButton, Button, Switch, Slider } from '@mui/material';\n\nimport { I18n } from '@iobroker/react-components';\n\nimport type { ConfigItemState } from '#JC/types';\nimport getIconByName from './Icons';\nimport ConfigGeneric, { type ConfigGenericProps, type ConfigGenericState } from './ConfigGeneric';\n\ninterface ConfigStateProps extends ConfigGenericProps {\n schema: ConfigItemState;\n}\n\ninterface ConfigStateState extends ConfigGenericState {\n stateValue?: string | number | boolean | null;\n controlType?: string;\n obj?: ioBroker.Object | null;\n}\n\nclass ConfigState extends ConfigGeneric<ConfigStateProps, ConfigStateState> {\n controlTimeout: ReturnType<typeof setTimeout> | null = null;\n\n delayedUpdate: { timer: ReturnType<typeof setTimeout> | null; value: string | boolean | number | null } = {\n timer: null,\n value: null,\n };\n\n getObjectID(): string {\n return `${this.props.schema.system ? 'system.adapter.' : ''}${this.props.adapterName}.${this.props.instance}.${this.props.schema.oid}`;\n }\n\n async componentDidMount(): Promise<void> {\n super.componentDidMount();\n const obj: ioBroker.StateObject = (await this.props.socket.getObject(\n this.getObjectID(),\n )) as ioBroker.StateObject;\n const controlType = this.props.schema.control || this.detectType(obj);\n\n const state = await this.props.socket.getState(this.getObjectID());\n\n this.setState({ stateValue: state ? state.val : null, controlType, obj }, async () => {\n await this.props.socket.subscribeState(this.getObjectID(), this.onStateChanged);\n });\n }\n\n componentWillUnmount(): void {\n super.componentWillUnmount();\n this.props.socket.unsubscribeState(this.getObjectID(), this.onStateChanged);\n if (this.delayedUpdate.timer) {\n clearTimeout(this.delayedUpdate.timer);\n this.delayedUpdate.timer = null;\n }\n\n if (this.controlTimeout) {\n clearTimeout(this.controlTimeout);\n this.controlTimeout = null;\n this.props.socket\n .setState(this.getObjectID(), this.state.stateValue, false)\n .catch(e => console.error(`Cannot control value: ${e}`));\n }\n }\n\n onStateChanged = (_id: string, state: ioBroker.State | null | undefined): void => {\n let val = state ? state.val : null;\n if (this.state.controlType === 'button' || this.state.controlType === 'switch') {\n val = !!val;\n if (this.state.stateValue !== val) {\n this.setState({ stateValue: val });\n }\n } else if (val !== null && (this.state.controlType === 'slider' || this.state.controlType === 'number')) {\n val = parseFloat(val as unknown as string);\n console.log(`${Date.now()} Received new value: ${val}`);\n if (val !== this.state.stateValue) {\n if (this.delayedUpdate.timer) {\n clearTimeout(this.delayedUpdate.timer);\n this.delayedUpdate.timer = null;\n }\n this.delayedUpdate.value = val;\n this.delayedUpdate.timer = setTimeout(() => {\n this.setState({ stateValue: this.delayedUpdate.value });\n }, 500);\n } else if (this.delayedUpdate.timer) {\n clearTimeout(this.delayedUpdate.timer);\n this.delayedUpdate.timer = null;\n }\n } else if (this.state.stateValue.toString() !== val.toString()) {\n this.setState({ stateValue: val });\n }\n };\n\n detectType(obj: ioBroker.StateObject): 'button' | 'switch' | 'slider' | 'input' | 'text' {\n obj = obj || ({} as ioBroker.StateObject);\n obj.common = obj.common || ({} as ioBroker.StateCommon);\n\n // read object\n if (obj.common.type === 'boolean') {\n if (this.props.schema.controlled !== false) {\n if (obj.common.read === false || this.props.schema.controlled === true) {\n return 'button';\n }\n if (obj.common.write || this.props.schema.controlled === true) {\n return 'switch';\n }\n }\n\n return 'text';\n }\n\n if (obj.common.type === 'number' && this.props.schema.controlled !== false) {\n if (obj.common.write || this.props.schema.controlled === true) {\n if (obj.common.max !== undefined) {\n return 'slider';\n }\n return 'input';\n }\n return 'text';\n }\n\n if (obj.common.write && this.props.schema.controlled !== false) {\n return 'input';\n }\n\n return 'text';\n }\n\n renderItem(/* error, disabled, defaultValue */): JSX.Element {\n if (!this.state.obj) {\n return null;\n }\n\n let content: JSX.Element;\n\n if (this.state.controlType === 'button') {\n let icon: JSX.Element | null = null;\n if (this.props.schema.falseImage) {\n icon = getIconByName(this.props.schema.falseImage);\n }\n\n const text =\n this.getText(this.props.schema.falseText, this.props.schema.noTranslation) ||\n this.getText(this.props.schema.label, this.props.schema.noTranslation);\n if (!text && icon) {\n content = (\n <IconButton\n style={this.props.schema.falseTextStyle}\n disabled={!!this.props.schema.readOnly}\n onClick={async () => {\n if (this.props.schema.confirm) {\n this.setState({\n confirmDialog: true,\n confirmCallback: async (result: boolean) => {\n if (result) {\n await this.props.socket.setState(this.getObjectID(), true, false);\n }\n },\n });\n } else {\n await this.props.socket.setState(this.getObjectID(), true, false);\n }\n }}\n >\n {icon}\n </IconButton>\n );\n } else {\n content = (\n <Button\n variant={this.props.schema.variant || 'contained'}\n startIcon={icon}\n style={this.props.schema.falseTextStyle}\n disabled={!!this.props.schema.readOnly}\n onClick={async () => {\n if (this.props.schema.confirm) {\n this.setState({\n confirmDialog: true,\n confirmCallback: async (result: boolean) => {\n if (result) {\n await this.props.socket.setState(this.getObjectID(), true, false);\n }\n },\n });\n } else {\n await this.props.socket.setState(this.getObjectID(), true, false);\n }\n }}\n >\n {text || this.getObjectID().split('.').pop()}\n </Button>\n );\n }\n } else if (this.state.controlType === 'switch') {\n let iconFalse: JSX.Element | null = null;\n const textFalse = this.getText(this.props.schema.falseText, this.props.schema.noTranslation);\n if (this.props.schema.falseImage) {\n iconFalse = getIconByName(this.props.schema.falseImage, textFalse ? { marginLeft: 8 } : undefined);\n }\n let iconTrue: JSX.Element | null = null;\n const textTrue = this.getText(this.props.schema.trueText, this.props.schema.noTranslation);\n if (this.props.schema.trueImage) {\n iconTrue = getIconByName(this.props.schema.trueImage, textTrue ? { marginRight: 8 } : undefined);\n }\n\n content = (\n <Switch\n checked={!!this.state.stateValue}\n disabled={!!this.props.schema.readOnly}\n onChange={async () => {\n if (this.props.schema.confirm) {\n this.setState({\n confirmDialog: true,\n confirmCallback: async (result: boolean) => {\n if (result) {\n await this.props.socket.setState(\n this.getObjectID(),\n !this.state.stateValue,\n false,\n );\n }\n },\n });\n } else {\n await this.props.socket.setState(this.getObjectID(), !this.state.stateValue, false);\n }\n }}\n />\n );\n\n if (textFalse || iconFalse || textTrue || iconTrue) {\n content = (\n <div style={{ display: 'flex', alignItems: 'center', fontSize: 14 }}>\n <span style={this.props.schema.falseTextStyle}>\n {textFalse}\n {iconFalse}\n </span>\n {content}\n <span style={this.props.schema.trueTextStyle}>\n {iconTrue}\n {textTrue}\n </span>\n </div>\n );\n }\n\n const label = this.getText(this.props.schema.label, this.props.schema.noTranslation);\n if (label) {\n content = (\n <div style={{ display: 'flex', alignItems: 'center', fontSize: '1rem' }}>\n <span style={{ marginRight: 8 }}>{label}</span>\n {content}\n </div>\n );\n }\n } else if (this.state.controlType === 'slider') {\n let iconFalse: JSX.Element | null = null;\n const textFalse = this.getText(this.props.schema.falseText, this.props.schema.noTranslation);\n if (this.props.schema.falseImage) {\n iconFalse = getIconByName(this.props.schema.falseImage, textFalse ? { marginLeft: 8 } : undefined);\n }\n let iconTrue: JSX.Element | null = null;\n const textTrue = this.getText(this.props.schema.trueText, this.props.schema.noTranslation);\n if (this.props.schema.trueImage) {\n iconTrue = getIconByName(this.props.schema.trueImage, textTrue ? { marginRight: 8 } : undefined);\n }\n\n const min = this.props.schema.min === undefined ? this.state.obj.common.min || 0 : this.props.schema.min;\n const max =\n this.props.schema.max === undefined\n ? this.state.obj.common.max === undefined\n ? 100\n : this.state.obj.common.max\n : this.props.schema.max;\n const step =\n this.props.schema.step === undefined ? this.state.obj.common.step || 1 : this.props.schema.step;\n\n content = (\n <Slider\n style={{ width: '100%', flexGrow: 1 }}\n min={min}\n max={max}\n disabled={!!this.props.schema.readOnly}\n step={step}\n value={this.state.stateValue as number}\n valueLabelDisplay=\"auto\"\n valueLabelFormat={(value: number) =>\n `${value}${this.getText(this.props.schema.unit, this.props.schema.noTranslation) || this.state.obj.common.unit || ''}`\n }\n onChange={(_e: Event, value: number) => {\n this.setState({ stateValue: value }, (): void => {\n if (this.controlTimeout) {\n clearTimeout(this.controlTimeout);\n }\n this.controlTimeout = setTimeout(async () => {\n console.log(`${Date.now()} Send new value: ${this.state.stateValue}`);\n this.controlTimeout = null;\n await this.props.socket.setState(this.getObjectID(), this.state.stateValue, false);\n }, this.props.schema.controlDelay || 0);\n });\n }}\n />\n );\n\n if (textFalse || iconFalse || textTrue || iconTrue) {\n content = (\n <div\n style={{\n display: 'flex',\n width: '100%',\n flexGrow: 1,\n alignItems: 'center',\n }}\n >\n <span style={{ marginRight: 16, ...this.props.schema.falseTextStyle }}>\n {textFalse}\n {iconFalse}\n </span>\n {content}\n <span style={{ marginLeft: 16, ...this.props.schema.trueTextStyle }}>\n {iconTrue}\n {textTrue}\n </span>\n </div>\n );\n }\n const label = this.getText(this.props.schema.label, this.props.schema.noTranslation);\n if (label) {\n content = (\n <div style={{ display: 'flex', width: '100%', alignItems: 'center' }}>\n <span style={{ whiteSpace: 'nowrap', marginRight: 8, fontSize: '1rem' }}>{label}</span>\n {content}\n </div>\n );\n }\n } else if (this.state.controlType === 'input') {\n content = (\n <TextField\n style={{ width: '100%' }}\n value={this.state.stateValue}\n variant=\"standard\"\n slotProps={{\n input: {\n endAdornment:\n this.getText(this.props.schema.unit, this.props.schema.noTranslation) ||\n this.state.obj.common.unit ||\n undefined,\n },\n htmlInput: {\n readOnly: !!this.props.schema.readOnly,\n },\n }}\n onChange={e => {\n this.setState({ stateValue: e.target.value }, (): void => {\n if (this.controlTimeout) {\n clearTimeout(this.controlTimeout);\n }\n this.controlTimeout = setTimeout(async () => {\n this.controlTimeout = null;\n await this.props.socket.setState(this.getObjectID(), this.state.stateValue, false);\n }, this.props.schema.controlDelay || 0);\n });\n }}\n label={this.getText(this.props.schema.label)}\n helperText={this.renderHelp(\n this.props.schema.help,\n this.props.schema.helpLink,\n this.props.schema.noTranslation,\n )}\n />\n );\n } else if (this.state.obj.common.type === 'number') {\n const min = this.props.schema.min === undefined ? this.state.obj.common.min || 0 : this.props.schema.min;\n const max =\n this.props.schema.max === undefined\n ? this.state.obj.common.max === undefined\n ? 100\n : this.state.obj.common.max\n : this.props.schema.max;\n const step =\n this.props.schema.step === undefined ? this.state.obj.common.step || 1 : this.props.schema.step;\n\n content = (\n <TextField\n variant=\"standard\"\n style={{ width: '100%' }}\n value={this.state.stateValue}\n type=\"number\"\n slotProps={{\n htmlInput: { min, max, step, readOnly: !!this.props.schema.readOnly },\n input: {\n endAdornment:\n this.getText(this.props.schema.unit, this.props.schema.noTranslation) ||\n this.state.obj.common.unit ||\n undefined,\n },\n }}\n onChange={e => {\n this.setState({ stateValue: e.target.value }, (): void => {\n if (this.controlTimeout) {\n clearTimeout(this.controlTimeout);\n }\n this.controlTimeout = setTimeout(async () => {\n this.controlTimeout = null;\n const val = parseFloat(this.state.stateValue as unknown as string);\n await this.props.socket.setState(this.getObjectID(), val, false);\n }, this.props.schema.controlDelay || 0);\n });\n }}\n label={this.getText(this.props.schema.label)}\n helperText={this.renderHelp(\n this.props.schema.help,\n this.props.schema.helpLink,\n this.props.schema.noTranslation,\n )}\n />\n );\n } else if (this.state.obj.common.type === 'boolean') {\n let icon: JSX.Element | null = null;\n let text: string;\n let style: React.CSSProperties | undefined;\n if (!this.state.stateValue) {\n text = this.getText(this.props.schema.falseText, this.props.schema.noTranslation);\n if (this.props.schema.falseImage) {\n icon = getIconByName(this.props.schema.falseImage, text ? { marginLeft: 8 } : undefined);\n }\n style = this.props.schema.falseTextStyle;\n } else {\n text = this.getText(this.props.schema.trueText, this.props.schema.noTranslation);\n if (this.props.schema.trueImage) {\n icon = getIconByName(this.props.schema.falseImage, text ? { marginRight: 8 } : undefined);\n }\n style = this.props.schema.trueTextStyle;\n }\n const label = this.getText(this.props.schema.label, this.props.schema.noTranslation);\n content = (\n <div style={{ fontSize: '1rem', ...style }}>\n {label}\n {label ? <span style={{ marginRight: 8 }}>:</span> : null}\n {icon}\n {text || (this.state.stateValue ? I18n.t('ra_true') : I18n.t('ra_false'))}\n </div>\n );\n } else {\n // text or HTML\n const label = this.getText(this.props.schema.label, this.props.schema.noTranslation);\n const unit =\n this.getText(this.props.schema.unit, this.props.schema.noTranslation) || this.state.obj.common.unit;\n let value;\n if (this.state.controlType === 'html') {\n value = <span dangerouslySetInnerHTML={{ __html: this.state.stateValue as string }} />;\n } else if (this.state.stateValue === null) {\n value = 'null';\n } else if (this.state.stateValue === undefined) {\n value = 'undefined';\n } else {\n value = this.state.stateValue;\n }\n\n content = (\n <div style={{ fontSize: '1rem' }}>\n {label}\n {label ? <span style={{ marginRight: 8 }}>:</span> : null}\n {value}\n {unit ? <span style={{ opacity: 0.7 }}>{unit}</span> : null}\n </div>\n );\n }\n\n return content;\n }\n}\n\nexport default ConfigState;\n"]}
@@ -1,6 +1,6 @@
1
1
  import React, {} from 'react';
2
2
  import { Box } from '@mui/material';
3
- import {} from '@iobroker/adapter-react-v5';
3
+ import {} from '@iobroker/react-components';
4
4
  import Utils from '../Utils';
5
5
  import ConfigGeneric, {} from './ConfigGeneric';
6
6
  const styles = {
@@ -1 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CAAC,SAAS;oBAClB,CAAC,CAAC;wBACI,eAAe,EACX,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;qBACrF,EACT;gBACI,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC;aAClG,CACJ,GACH,CACL,CAAC;IACN,CAAC;CACJ;AAED,eAAe,mBAAmB,CAAC","sourcesContent":["import React, { type JSX } from 'react';\n\nimport { Box } from '@mui/material';\n\nimport { type IobTheme } from '@iobroker/adapter-react-v5';\n\nimport type { ConfigItemStaticDivider } from '#JC/types';\nimport Utils from '#JC/Utils';\nimport ConfigGeneric, { type ConfigGenericProps, type ConfigGenericState } from './ConfigGeneric';\n\nconst styles: {\n fullWidth: (theme: IobTheme) => React.CSSProperties;\n primary: (theme: IobTheme) => React.CSSProperties;\n secondary: (theme: IobTheme) => React.CSSProperties;\n} = {\n fullWidth: (theme: IobTheme) => ({\n width: '100%',\n backgroundColor: theme.palette.mode === 'dark' ? '#FFF' : '#000',\n borderStyle: 'hidden',\n }),\n primary: (theme: IobTheme) => ({\n backgroundColor: theme.palette.primary.main,\n }),\n secondary: (theme: IobTheme) => ({\n backgroundColor: theme.palette.secondary.main,\n }),\n};\n\ninterface ConfigInstanceSelectProps extends ConfigGenericProps {\n schema: ConfigItemStaticDivider;\n}\n\nclass ConfigStaticDivider extends ConfigGeneric<ConfigInstanceSelectProps, ConfigGenericState> {\n renderItem(): JSX.Element {\n return (\n <Box\n component=\"hr\"\n sx={Utils.getStyle(\n this.props.theme,\n styles.fullWidth,\n this.props.schema.color === 'primary'\n ? styles.primary\n : this.props.schema.color === 'secondary'\n ? styles.secondary\n : {\n backgroundColor:\n this.props.schema.color || (this.props.themeType === 'dark' ? '#333' : '#ddd'),\n },\n {\n height: this.props.schema.color ? this.props.schema.height || 2 : this.props.schema.height || 1,\n },\n )}\n />\n );\n }\n}\n\nexport default ConfigStaticDivider;\n"]}
1
+ {"version":3,"file":"ConfigStaticDivider.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigStaticDivider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAY,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEpC,OAAO,EAAiB,MAAM,4BAA4B,CAAC;AAG3D,OAAO,KAAK,MAAM,WAAW,CAAC;AAC9B,OAAO,aAAa,EAAE,EAAoD,MAAM,iBAAiB,CAAC;AAElG,MAAM,MAAM,GAIR;IACA,SAAS,EAAE,CAAC,KAAe,EAAE,EAAE,CAAC,CAAC;QAC7B,KAAK,EAAE,MAAM;QACb,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;QAChE,WAAW,EAAE,QAAQ;KACxB,CAAC;IACF,OAAO,EAAE,CAAC,KAAe,EAAE,EAAE,CAAC,CAAC;QAC3B,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI;KAC9C,CAAC;IACF,SAAS,EAAE,CAAC,KAAe,EAAE,EAAE,CAAC,CAAC;QAC7B,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI;KAChD,CAAC;CACL,CAAC;AAMF,MAAM,mBAAoB,SAAQ,aAA4D;IAC1F,UAAU;QACN,OAAO,CACH,oBAAC,GAAG,IACA,SAAS,EAAC,IAAI,EACd,EAAE,EAAE,KAAK,CAAC,QAAQ,CACd,IAAI,CAAC,KAAK,CAAC,KAAK,EAChB,MAAM,CAAC,SAAS,EAChB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,KAAK,SAAS;gBACjC,CAAC,CAAC,MAAM,CAAC,OAAO;gBAChB,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,KAAK,WAAW;oBACvC,CAAC,CAAC,MAAM,CAAC,SAAS;oBAClB,CAAC,CAAC;wBACI,eAAe,EACX,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;qBACrF,EACT;gBACI,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC;aAClG,CACJ,GACH,CACL,CAAC;IACN,CAAC;CACJ;AAED,eAAe,mBAAmB,CAAC","sourcesContent":["import React, { type JSX } from 'react';\n\nimport { Box } from '@mui/material';\n\nimport { type IobTheme } from '@iobroker/react-components';\n\nimport type { ConfigItemStaticDivider } from '#JC/types';\nimport Utils from '#JC/Utils';\nimport ConfigGeneric, { type ConfigGenericProps, type ConfigGenericState } from './ConfigGeneric';\n\nconst styles: {\n fullWidth: (theme: IobTheme) => React.CSSProperties;\n primary: (theme: IobTheme) => React.CSSProperties;\n secondary: (theme: IobTheme) => React.CSSProperties;\n} = {\n fullWidth: (theme: IobTheme) => ({\n width: '100%',\n backgroundColor: theme.palette.mode === 'dark' ? '#FFF' : '#000',\n borderStyle: 'hidden',\n }),\n primary: (theme: IobTheme) => ({\n backgroundColor: theme.palette.primary.main,\n }),\n secondary: (theme: IobTheme) => ({\n backgroundColor: theme.palette.secondary.main,\n }),\n};\n\ninterface ConfigInstanceSelectProps extends ConfigGenericProps {\n schema: ConfigItemStaticDivider;\n}\n\nclass ConfigStaticDivider extends ConfigGeneric<ConfigInstanceSelectProps, ConfigGenericState> {\n renderItem(): JSX.Element {\n return (\n <Box\n component=\"hr\"\n sx={Utils.getStyle(\n this.props.theme,\n styles.fullWidth,\n this.props.schema.color === 'primary'\n ? styles.primary\n : this.props.schema.color === 'secondary'\n ? styles.secondary\n : {\n backgroundColor:\n this.props.schema.color || (this.props.themeType === 'dark' ? '#333' : '#ddd'),\n },\n {\n height: this.props.schema.color ? this.props.schema.height || 2 : this.props.schema.height || 1,\n },\n )}\n />\n );\n }\n}\n\nexport default ConfigStaticDivider;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigStaticHeader.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigStaticHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAY,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAKpC,OAAO,aAAa,EAAE,EAAoD,MAAM,iBAAiB,CAAC;AAElG,MAAM,MAAM,GAAwB;IAChC,MAAM,EAAE,CAAC,KAAe,EAAE,EAAE,CAAC,CAAC;QAC1B,KAAK,EAAE,MAAM;QACb,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI;QACtC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY;QACzC,OAAO,EAAE,gBAAgB;QACzB,YAAY,EAAE,KAAK;QACnB,cAAc,EAAE,CAAC;QACjB,gBAAgB,EAAE,CAAC;KACtB,CAAC;CACL,CAAC;AAMF,MAAM,kBAAmB,SAAQ,aAA4D;IACzF,UAAU,EAAC,oDAAoD;QAC3D,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC;YAC/C,KAAK,GAAG;gBACJ,OAAO,CACH,oBAAC,GAA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ACL,CAAC;CACJ;AAED,eAAe,kBAAkB,CAAC","sourcesContent":["import React, { type JSX } from 'react';\n\nimport { Box } from '@mui/material';\n\nimport type { IobTheme } from '@iobroker/adapter-react-v5';\n\nimport type { ConfigItemStaticHeader } from '#JC/types';\nimport ConfigGeneric, { type ConfigGenericProps, type ConfigGenericState } from './ConfigGeneric';\n\nconst styles: Record<string, any> = {\n header: (theme: IobTheme) => ({\n width: '100%',\n background: theme.palette.primary.main,\n color: theme.palette.primary.contrastText,\n padding: '4px !important',\n borderRadius: '3px',\n marginBlockEnd: 0,\n marginBlockStart: 0,\n }),\n};\n\ninterface ConfigInstanceSelectProps extends ConfigGenericProps {\n schema: ConfigItemStaticHeader;\n}\n\nclass ConfigStaticHeader extends ConfigGeneric<ConfigInstanceSelectProps, ConfigGenericState> {\n renderItem(/* error: string, disabled: boolean, defaultValue */): JSX.Element {\n switch ((this.props.schema.size || 5).toString()) {\n case '1':\n return (\n <Box\n component=\"h1\"\n sx={styles.header}\n >\n {this.getText(this.props.schema.text, this.props.schema.noTranslation)}\n </Box>\n );\n\n case '2':\n return (\n <Box\n component=\"h2\"\n sx={styles.header}\n >\n {this.getText(this.props.schema.text, this.props.schema.noTranslation)}\n </Box>\n );\n\n case '3':\n return (\n <Box\n component=\"h3\"\n sx={styles.header}\n >\n {this.getText(this.props.schema.text, this.props.schema.noTranslation)}\n </Box>\n );\n\n case '4':\n return (\n <Box\n component=\"h4\"\n sx={styles.header}\n >\n {this.getText(this.props.schema.text, this.props.schema.noTranslation)}\n </Box>\n );\n\n case '5':\n default:\n return (\n <Box\n component=\"h5\"\n sx={styles.header}\n >\n {this.getText(this.props.schema.text, this.props.schema.noTranslation)}\n </Box>\n );\n }\n }\n}\n\nexport default ConfigStaticHeader;\n"]}
1
+ {"version":3,"file":"ConfigStaticHeader.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigStaticHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAY,MAAM,OAAO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C,MAAM,IAEhB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,CACpE,CACT,CAAC;YAEN,KAAK,GAAG;gBACJ,OAAO,CACH,oBAAC,GAAG,IACA,SAAS,EAAC,IAAI,EACd,EAAE,EAAE,MAAM,CAAC,MAAM,IAEhB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,CACpE,CACT,CAAC;YAEN,KAAK,GAAG,CAAC;YACT;gBACI,OAAO,CACH,oBAAC,GAAG,IACA,SAAS,EAAC,IAAI,EACd,EAAE,EAAE,MAAM,CAAC,MAAM,IAEhB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,CACpE,CACT,CAAC;QACV,CAAC;IACL,CAAC;CACJ;AAED,eAAe,kBAAkB,CAAC","sourcesContent":["import React, { type JSX } from 'react';\n\nimport { Box } from '@mui/material';\n\nimport type { IobTheme } from '@iobroker/react-components';\n\nimport type { ConfigItemStaticHeader } from '#JC/types';\nimport ConfigGeneric, { type ConfigGenericProps, type ConfigGenericState } from './ConfigGeneric';\n\nconst styles: Record<string, any> = {\n header: (theme: IobTheme) => ({\n width: '100%',\n background: theme.palette.primary.main,\n color: theme.palette.primary.contrastText,\n padding: '4px !important',\n borderRadius: '3px',\n marginBlockEnd: 0,\n marginBlockStart: 0,\n }),\n};\n\ninterface ConfigInstanceSelectProps extends ConfigGenericProps {\n schema: ConfigItemStaticHeader;\n}\n\nclass ConfigStaticHeader extends ConfigGeneric<ConfigInstanceSelectProps, ConfigGenericState> {\n renderItem(/* error: string, disabled: boolean, defaultValue */): JSX.Element {\n switch ((this.props.schema.size || 5).toString()) {\n case '1':\n return (\n <Box\n component=\"h1\"\n sx={styles.header}\n >\n {this.getText(this.props.schema.text, this.props.schema.noTranslation)}\n </Box>\n );\n\n case '2':\n return (\n <Box\n component=\"h2\"\n sx={styles.header}\n >\n {this.getText(this.props.schema.text, this.props.schema.noTranslation)}\n </Box>\n );\n\n case '3':\n return (\n <Box\n component=\"h3\"\n sx={styles.header}\n >\n {this.getText(this.props.schema.text, this.props.schema.noTranslation)}\n </Box>\n );\n\n case '4':\n return (\n <Box\n component=\"h4\"\n sx={styles.header}\n >\n {this.getText(this.props.schema.text, this.props.schema.noTranslation)}\n </Box>\n );\n\n case '5':\n default:\n return (\n <Box\n component=\"h5\"\n sx={styles.header}\n >\n {this.getText(this.props.schema.text, this.props.schema.noTranslation)}\n </Box>\n );\n }\n }\n}\n\nexport default ConfigStaticHeader;\n"]}
@@ -1,6 +1,6 @@
1
1
  import React, {} from 'react';
2
2
  import { Box, Button } from '@mui/material';
3
- import { Utils } from '@iobroker/adapter-react-v5';
3
+ import { Utils } from '@iobroker/react-components';
4
4
  import ConfigGeneric, {} from './ConfigGeneric';
5
5
  const styles = {
6
6
  fullWidth: {
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigStaticText.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigStaticText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAY,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAiB,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAGlE,OAAO,aAAa,EAAE,EAAoD,MAAM,iBAAiB,CAAC;AAElG,MAAM,MAAM,GAAwB;IAChC,SAAS,EAAE;QACP,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,MAAM;KAChB;IACD,IAAI,EAAE,CAAC,KAAe,EAAE,EAAE,CAAC,CAAC;QACxB,cAAc,EAAE,WAAW;QAC3B,KAAK,EAAE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xF,IAAI,IAAI,EAAE,CAAC;wBACP,IAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC;4BAC9B,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC;gCACxB,OAAO,EAAE,MAAM;gCACf,GAAG,EAAE,IAAI;gCACT,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,IAAI,QAAQ;gCAC5C,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK;6BACjC,CAAC,CAAC;wBACP,CAAC;6BAAM,CAAC;4BACJ,MAAM,CACF,IAAI,EACJ,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,IAAI,QAAQ,EACpC,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CACrD,CAAC;wBACN,CAAC;oBACL,CAAC;gBACL,CAAC;gBACH,CAAC,CAAC,IAAI,IAGb,IAAI,CACH,CACT,CAAC;IACN,CAAC;CACJ;AAED,eAAe,gBAAgB,CAAC","sourcesContent":["import React, { type JSX } from 'react';\n\nimport { Box, Button } from '@mui/material';\n\nimport { type IobTheme, Utils } from '@iobroker/adapter-react-v5';\n\nimport type { ConfigItemStaticText } from '#JC/types';\nimport ConfigGeneric, { type ConfigGenericProps, type ConfigGenericState } from './ConfigGeneric';\n\nconst styles: Record<string, any> = {\n fullWidth: {\n height: '100%',\n width: '100%',\n },\n link: (theme: IobTheme) => ({\n textDecoration: 'underline',\n color: theme.palette.mode === 'dark' ? '#4dabf5' : '#254e72',\n cursor: 'pointer',\n }),\n};\n\n// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\nfunction onLink(href: string, target: '_blank' | '_self' | string, instanceId: string): void {\n let _target;\n let url = '';\n if (!href) {\n url = `#tab-instances/config/${instanceId}`;\n _target = target || '_self';\n } else if (href.toString().startsWith('#')) {\n _target = target || '_self';\n url = href;\n } else if (href.toString().startsWith('/')) {\n _target = target || '_self';\n url = href;\n } else if (href.startsWith('http://') || href.startsWith('https://')) {\n _target = target || '_blank';\n url = href;\n } else {\n url = `#tab-instances/config/${instanceId}/${href}`;\n _target = target || '_self';\n }\n if (_target === '_self') {\n // close dialog\n setTimeout(\n (_url: string) => {\n if (_url.startsWith('#')) {\n window.location.hash = _url;\n } else if (_url.startsWith('/')) {\n url = `${window.location.protocol}:${window.location.host}${url}`;\n } else if (_url.startsWith('http://') || _url.startsWith('https://')) {\n window.location.href = _url;\n }\n },\n 100,\n url,\n );\n } else {\n if (url.startsWith('#')) {\n url = `${window.location.protocol}:${window.location.host}${window.location.pathname}${url}`;\n } else if (url.startsWith('/')) {\n url = `${window.location.protocol}:${window.location.host}${url}`;\n }\n\n window.open(url, _target);\n }\n}\n\ninterface ConfigInstanceSelectProps extends ConfigGenericProps {\n schema: ConfigItemStaticText;\n}\n\nclass ConfigStaticText extends ConfigGeneric<ConfigInstanceSelectProps, ConfigGenericState> {\n renderItem(_error: string, disabled: boolean /* , defaultValue */): JSX.Element {\n if (this.props.schema.button) {\n const icon = this.getIcon();\n return (\n <Button\n variant={this.props.schema.variant || undefined}\n color={this.props.schema.color || 'grey'}\n style={{ ...styles.fullWidth, ...(this.props.schema.controlStyle || undefined) }}\n disabled={disabled}\n startIcon={icon}\n onClick={\n this.props.schema.href\n ? () => {\n // calculate one more time just before call\n const href = this.props.schema.href\n ? this.getText(this.props.schema.href, true)\n : null;\n if (href) {\n if (this.props.onBackEndCommand) {\n this.props.onBackEndCommand({\n command: 'link',\n url: href,\n target: this.props.schema.target,\n close: this.props.schema.close,\n });\n } else {\n onLink(\n href,\n this.props.schema.target,\n `${this.props.adapterName}.${this.props.instance}`,\n );\n }\n }\n }\n : null\n }\n >\n {this.getText(this.props.schema.text || this.props.schema.label, this.props.schema.noTranslation)}\n </Button>\n );\n }\n let text: string | JSX.Element | JSX.Element[] = this.getText(\n this.props.schema.text || this.props.schema.label,\n this.props.schema.noTranslation,\n );\n if (text && (text.includes('<a ') || text.includes('<br') || text.includes('<b>') || text.includes('<i>'))) {\n text = Utils.renderTextWithA(text);\n }\n\n return (\n <Box\n component=\"span\"\n style={{ ...(this.props.schema.controlStyle || undefined) }}\n sx={this.props.schema.href ? styles.link : undefined}\n onClick={\n this.props.schema.href\n ? () => {\n // calculate one more time just before call\n const href = this.props.schema.href ? this.getText(this.props.schema.href, true) : null;\n if (href) {\n if (this.props.onBackEndCommand) {\n this.props.onBackEndCommand({\n command: 'link',\n url: href,\n target: this.props.schema.target || '_blank',\n close: this.props.schema.close,\n });\n } else {\n onLink(\n href,\n this.props.schema.target || '_blank',\n `${this.props.adapterName}.${this.props.instance}`,\n );\n }\n }\n }\n : null\n }\n >\n {text}\n </Box>\n );\n }\n}\n\nexport default ConfigStaticText;\n"]}
1
+ {"version":3,"file":"ConfigStaticText.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigStaticText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAY,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAiB,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAGlE,OAAO,aAAa,EAAE,EAAoD,MAAM,iBAAiB,CAAC;AAElG,MAAM,MAAM,GAAwB;IAChC,SAAS,EAAE;QACP,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,MAAM;KAChB;IACD,IAAI,EAAE,CAAC,KAAe,EAAE,EAAE,CAAC,CAAC;QACxB,cAAc,EAAE,WAAW;QAC3B,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;QAC5D,MAAM,EAAE,SAAS;KACpB,CAAC;CACL,CAAC;AAEF,6EAA6E;AAC7E,SAAS,MAAM,CAAC,IAAY,EAAE,MAAmC,EAAE,UAAkB;IACjF,IAAI,OAAO,CAAC;IACZ,IA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I,QAAQ;gCAC5C,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK;6BACjC,CAAC,CAAC;wBACP,CAAC;6BAAM,CAAC;4BACJ,MAAM,CACF,IAAI,EACJ,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,IAAI,QAAQ,EACpC,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CACrD,CAAC;wBACN,CAAC;oBACL,CAAC;gBACL,CAAC;gBACH,CAAC,CAAC,IAAI,IAGb,IAAI,CACH,CACT,CAAC;IACN,CAAC;CACJ;AAED,eAAe,gBAAgB,CAAC","sourcesContent":["import React, { type JSX } from 'react';\n\nimport { Box, Button } from '@mui/material';\n\nimport { type IobTheme, Utils } from '@iobroker/react-components';\n\nimport type { ConfigItemStaticText } from '#JC/types';\nimport ConfigGeneric, { type ConfigGenericProps, type ConfigGenericState } from './ConfigGeneric';\n\nconst styles: Record<string, any> = {\n fullWidth: {\n height: '100%',\n width: '100%',\n },\n link: (theme: IobTheme) => ({\n textDecoration: 'underline',\n color: theme.palette.mode === 'dark' ? '#4dabf5' : '#254e72',\n cursor: 'pointer',\n }),\n};\n\n// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\nfunction onLink(href: string, target: '_blank' | '_self' | string, instanceId: string): void {\n let _target;\n let url = '';\n if (!href) {\n url = `#tab-instances/config/${instanceId}`;\n _target = target || '_self';\n } else if (href.toString().startsWith('#')) {\n _target = target || '_self';\n url = href;\n } else if (href.toString().startsWith('/')) {\n _target = target || '_self';\n url = href;\n } else if (href.startsWith('http://') || href.startsWith('https://')) {\n _target = target || '_blank';\n url = href;\n } else {\n url = `#tab-instances/config/${instanceId}/${href}`;\n _target = target || '_self';\n }\n if (_target === '_self') {\n // close dialog\n setTimeout(\n (_url: string) => {\n if (_url.startsWith('#')) {\n window.location.hash = _url;\n } else if (_url.startsWith('/')) {\n url = `${window.location.protocol}:${window.location.host}${url}`;\n } else if (_url.startsWith('http://') || _url.startsWith('https://')) {\n window.location.href = _url;\n }\n },\n 100,\n url,\n );\n } else {\n if (url.startsWith('#')) {\n url = `${window.location.protocol}:${window.location.host}${window.location.pathname}${url}`;\n } else if (url.startsWith('/')) {\n url = `${window.location.protocol}:${window.location.host}${url}`;\n }\n\n window.open(url, _target);\n }\n}\n\ninterface ConfigInstanceSelectProps extends ConfigGenericProps {\n schema: ConfigItemStaticText;\n}\n\nclass ConfigStaticText extends ConfigGeneric<ConfigInstanceSelectProps, ConfigGenericState> {\n renderItem(_error: string, disabled: boolean /* , defaultValue */): JSX.Element {\n if (this.props.schema.button) {\n const icon = this.getIcon();\n return (\n <Button\n variant={this.props.schema.variant || undefined}\n color={this.props.schema.color || 'grey'}\n style={{ ...styles.fullWidth, ...(this.props.schema.controlStyle || undefined) }}\n disabled={disabled}\n startIcon={icon}\n onClick={\n this.props.schema.href\n ? () => {\n // calculate one more time just before call\n const href = this.props.schema.href\n ? this.getText(this.props.schema.href, true)\n : null;\n if (href) {\n if (this.props.onBackEndCommand) {\n this.props.onBackEndCommand({\n command: 'link',\n url: href,\n target: this.props.schema.target,\n close: this.props.schema.close,\n });\n } else {\n onLink(\n href,\n this.props.schema.target,\n `${this.props.adapterName}.${this.props.instance}`,\n );\n }\n }\n }\n : null\n }\n >\n {this.getText(this.props.schema.text || this.props.schema.label, this.props.schema.noTranslation)}\n </Button>\n );\n }\n let text: string | JSX.Element | JSX.Element[] = this.getText(\n this.props.schema.text || this.props.schema.label,\n this.props.schema.noTranslation,\n );\n if (text && (text.includes('<a ') || text.includes('<br') || text.includes('<b>') || text.includes('<i>'))) {\n text = Utils.renderTextWithA(text);\n }\n\n return (\n <Box\n component=\"span\"\n style={{ ...(this.props.schema.controlStyle || undefined) }}\n sx={this.props.schema.href ? styles.link : undefined}\n onClick={\n this.props.schema.href\n ? () => {\n // calculate one more time just before call\n const href = this.props.schema.href ? this.getText(this.props.schema.href, true) : null;\n if (href) {\n if (this.props.onBackEndCommand) {\n this.props.onBackEndCommand({\n command: 'link',\n url: href,\n target: this.props.schema.target || '_blank',\n close: this.props.schema.close,\n });\n } else {\n onLink(\n href,\n this.props.schema.target || '_blank',\n `${this.props.adapterName}.${this.props.instance}`,\n );\n }\n }\n }\n : null\n }\n >\n {text}\n </Box>\n );\n }\n}\n\nexport default ConfigStaticText;\n"]}
@@ -2,7 +2,7 @@ import React, { createRef } from 'react';
2
2
  import Dropzone from 'react-dropzone';
3
3
  import { Button, Dialog, DialogActions, DialogContent, DialogTitle, IconButton, InputAdornment, Paper, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, TableSortLabel, TextField, Toolbar, Tooltip, Typography, FormHelperText, } from '@mui/material';
4
4
  import { Add as AddIcon, Delete as DeleteIcon, Close as CloseIcon, ArrowUpward as UpIcon, ArrowDownward as DownIcon, FilterAlt as IconFilterOn, FilterAltOff as IconFilterOff, ContentCopy as CopyContentIcon, Download as ExportIcon, Warning as ErrorIcon, UploadFile as ImportIcon, Close as IconClose, } from '@mui/icons-material';
5
- import { I18n } from '@iobroker/adapter-react-v5';
5
+ import { I18n } from '@iobroker/react-components';
6
6
  import ConfigGeneric, {} from './ConfigGeneric';
7
7
  import ConfigPanel from './ConfigPanel';
8
8
  const MAX_SIZE = 1024 * 1024; // 1MB