@iobroker/json-config 7.4.21 → 7.5.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.
Files changed (123) hide show
  1. package/README.md +19 -17
  2. package/build/JsonConfig.d.ts +1 -1
  3. package/build/JsonConfig.js +1 -1
  4. package/build/JsonConfig.js.map +1 -1
  5. package/build/JsonConfigComponent/ChipInput.js +2 -2
  6. package/build/JsonConfigComponent/ChipInput.js.map +1 -1
  7. package/build/JsonConfigComponent/ConfigAccordion.d.ts +1 -1
  8. package/build/JsonConfigComponent/ConfigAccordion.js.map +1 -1
  9. package/build/JsonConfigComponent/ConfigAlive.d.ts +1 -1
  10. package/build/JsonConfigComponent/ConfigAlive.js.map +1 -1
  11. package/build/JsonConfigComponent/ConfigAutocomplete.d.ts +1 -1
  12. package/build/JsonConfigComponent/ConfigAutocomplete.js.map +1 -1
  13. package/build/JsonConfigComponent/ConfigAutocompleteSendTo.d.ts +1 -1
  14. package/build/JsonConfigComponent/ConfigAutocompleteSendTo.js.map +1 -1
  15. package/build/JsonConfigComponent/ConfigCRON.d.ts +1 -1
  16. package/build/JsonConfigComponent/ConfigCertCollection.d.ts +1 -1
  17. package/build/JsonConfigComponent/ConfigCertCollection.js.map +1 -1
  18. package/build/JsonConfigComponent/ConfigCertificateSelect.d.ts +1 -1
  19. package/build/JsonConfigComponent/ConfigCertificateSelect.js.map +1 -1
  20. package/build/JsonConfigComponent/ConfigCertificates.d.ts +1 -1
  21. package/build/JsonConfigComponent/ConfigCertificates.js.map +1 -1
  22. package/build/JsonConfigComponent/ConfigCheckLicense.d.ts +1 -1
  23. package/build/JsonConfigComponent/ConfigCheckLicense.js.map +1 -1
  24. package/build/JsonConfigComponent/ConfigCheckbox.d.ts +1 -1
  25. package/build/JsonConfigComponent/ConfigCheckbox.js.map +1 -1
  26. package/build/JsonConfigComponent/ConfigChip.d.ts +1 -1
  27. package/build/JsonConfigComponent/ConfigChip.js.map +1 -1
  28. package/build/JsonConfigComponent/ConfigColor.d.ts +1 -1
  29. package/build/JsonConfigComponent/ConfigColor.js.map +1 -1
  30. package/build/JsonConfigComponent/ConfigCoordinates.d.ts +1 -1
  31. package/build/JsonConfigComponent/ConfigCoordinates.js.map +1 -1
  32. package/build/JsonConfigComponent/ConfigCustom.d.ts +1 -1
  33. package/build/JsonConfigComponent/ConfigCustom.js +3 -1
  34. package/build/JsonConfigComponent/ConfigCustom.js.map +1 -1
  35. package/build/JsonConfigComponent/ConfigDatePicker.d.ts +1 -1
  36. package/build/JsonConfigComponent/ConfigDeviceManager.d.ts +1 -1
  37. package/build/JsonConfigComponent/ConfigDeviceManager.js.map +1 -1
  38. package/build/JsonConfigComponent/ConfigFile.d.ts +1 -1
  39. package/build/JsonConfigComponent/ConfigFile.js.map +1 -1
  40. package/build/JsonConfigComponent/ConfigFileSelector.d.ts +1 -1
  41. package/build/JsonConfigComponent/ConfigFileSelector.js.map +1 -1
  42. package/build/JsonConfigComponent/ConfigFunc.d.ts +1 -1
  43. package/build/JsonConfigComponent/ConfigFunc.js.map +1 -1
  44. package/build/JsonConfigComponent/ConfigGeneric.d.ts +1 -1
  45. package/build/JsonConfigComponent/ConfigGeneric.js +2 -2
  46. package/build/JsonConfigComponent/ConfigGeneric.js.map +1 -1
  47. package/build/JsonConfigComponent/ConfigIP.d.ts +1 -1
  48. package/build/JsonConfigComponent/ConfigIP.js.map +1 -1
  49. package/build/JsonConfigComponent/ConfigImageSendTo.d.ts +1 -1
  50. package/build/JsonConfigComponent/ConfigImageSendTo.js.map +1 -1
  51. package/build/JsonConfigComponent/ConfigImageUpload.d.ts +1 -1
  52. package/build/JsonConfigComponent/ConfigImageUpload.js.map +1 -1
  53. package/build/JsonConfigComponent/ConfigInstanceSelect.d.ts +1 -1
  54. package/build/JsonConfigComponent/ConfigInstanceSelect.js.map +1 -1
  55. package/build/JsonConfigComponent/ConfigInterface.d.ts +1 -1
  56. package/build/JsonConfigComponent/ConfigInterface.js.map +1 -1
  57. package/build/JsonConfigComponent/ConfigJsonEditor.d.ts +1 -1
  58. package/build/JsonConfigComponent/ConfigJsonEditor.js.map +1 -1
  59. package/build/JsonConfigComponent/ConfigLanguage.d.ts +1 -1
  60. package/build/JsonConfigComponent/ConfigLanguage.js.map +1 -1
  61. package/build/JsonConfigComponent/ConfigLicense.d.ts +1 -1
  62. package/build/JsonConfigComponent/ConfigLicense.js.map +1 -1
  63. package/build/JsonConfigComponent/ConfigNumber.d.ts +1 -1
  64. package/build/JsonConfigComponent/ConfigNumber.js.map +1 -1
  65. package/build/JsonConfigComponent/ConfigObjectId.d.ts +1 -1
  66. package/build/JsonConfigComponent/ConfigObjectId.js.map +1 -1
  67. package/build/JsonConfigComponent/ConfigPanel.d.ts +1 -1
  68. package/build/JsonConfigComponent/ConfigPanel.js +2 -2
  69. package/build/JsonConfigComponent/ConfigPanel.js.map +1 -1
  70. package/build/JsonConfigComponent/ConfigPassword.d.ts +1 -1
  71. package/build/JsonConfigComponent/ConfigPassword.js.map +1 -1
  72. package/build/JsonConfigComponent/ConfigPattern.d.ts +1 -1
  73. package/build/JsonConfigComponent/ConfigPort.d.ts +1 -1
  74. package/build/JsonConfigComponent/ConfigPort.js.map +1 -1
  75. package/build/JsonConfigComponent/ConfigQrCode.d.ts +1 -1
  76. package/build/JsonConfigComponent/ConfigQrCode.js.map +1 -1
  77. package/build/JsonConfigComponent/ConfigRoom.d.ts +1 -1
  78. package/build/JsonConfigComponent/ConfigRoom.js.map +1 -1
  79. package/build/JsonConfigComponent/ConfigSelect.d.ts +1 -1
  80. package/build/JsonConfigComponent/ConfigSelect.js.map +1 -1
  81. package/build/JsonConfigComponent/ConfigSelectSendTo.d.ts +1 -1
  82. package/build/JsonConfigComponent/ConfigSelectSendTo.js.map +1 -1
  83. package/build/JsonConfigComponent/ConfigSendto.d.ts +1 -1
  84. package/build/JsonConfigComponent/ConfigSendto.js.map +1 -1
  85. package/build/JsonConfigComponent/ConfigSetState.d.ts +1 -1
  86. package/build/JsonConfigComponent/ConfigSetState.js.map +1 -1
  87. package/build/JsonConfigComponent/ConfigSlider.d.ts +1 -1
  88. package/build/JsonConfigComponent/ConfigSlider.js.map +1 -1
  89. package/build/JsonConfigComponent/ConfigState.d.ts +2 -2
  90. package/build/JsonConfigComponent/ConfigState.js +67 -38
  91. package/build/JsonConfigComponent/ConfigState.js.map +1 -1
  92. package/build/JsonConfigComponent/ConfigStaticDivider.d.ts +1 -1
  93. package/build/JsonConfigComponent/ConfigStaticHeader.d.ts +1 -1
  94. package/build/JsonConfigComponent/ConfigStaticHeader.js.map +1 -1
  95. package/build/JsonConfigComponent/ConfigStaticImage.d.ts +1 -1
  96. package/build/JsonConfigComponent/ConfigStaticImage.js.map +1 -1
  97. package/build/JsonConfigComponent/ConfigStaticInfo.d.ts +1 -1
  98. package/build/JsonConfigComponent/ConfigStaticInfo.js.map +1 -1
  99. package/build/JsonConfigComponent/ConfigStaticText.d.ts +1 -1
  100. package/build/JsonConfigComponent/ConfigStaticText.js.map +1 -1
  101. package/build/JsonConfigComponent/ConfigTable.d.ts +2 -2
  102. package/build/JsonConfigComponent/ConfigTable.js +9 -6
  103. package/build/JsonConfigComponent/ConfigTable.js.map +1 -1
  104. package/build/JsonConfigComponent/ConfigTabs.d.ts +2 -1
  105. package/build/JsonConfigComponent/ConfigTabs.js +26 -13
  106. package/build/JsonConfigComponent/ConfigTabs.js.map +1 -1
  107. package/build/JsonConfigComponent/ConfigText.d.ts +1 -1
  108. package/build/JsonConfigComponent/ConfigText.js.map +1 -1
  109. package/build/JsonConfigComponent/ConfigTextSendTo.d.ts +1 -1
  110. package/build/JsonConfigComponent/ConfigTextSendTo.js.map +1 -1
  111. package/build/JsonConfigComponent/ConfigTimePicker.d.ts +1 -1
  112. package/build/JsonConfigComponent/ConfigTimePicker.js.map +1 -1
  113. package/build/JsonConfigComponent/ConfigTopic.d.ts +1 -1
  114. package/build/JsonConfigComponent/ConfigTopic.js.map +1 -1
  115. package/build/JsonConfigComponent/ConfigUUID.d.ts +1 -1
  116. package/build/JsonConfigComponent/ConfigUser.d.ts +1 -1
  117. package/build/JsonConfigComponent/ConfigUser.js.map +1 -1
  118. package/build/JsonConfigComponent/Icons.js.map +1 -1
  119. package/build/JsonConfigComponent/index.d.ts +2 -2
  120. package/build/JsonConfigComponent/index.js.map +1 -1
  121. package/build/JsonConfigComponent/wrapper/Components/CustomModal.js.map +1 -1
  122. package/build/types.d.ts +5 -1
  123. package/package.json +5 -6
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigState.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEnF,OAAO,EAAE,IAAI,EAAE,IAAI,EAAiB,MAAM,4BAA4B,CAAC;AAGvE,OAAO,aAAa,MAAM,SAAS,CAAC;AACpC,OAAO,aAAmE,MAAM,iBAAiB,CAAC;AAElG,SAAS,cAAc,CAAC,KAAe,EAAE,KAAwB;IAC7D,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC3B,OAAO;YACH,uCAAuC,EAAE;gBACrC,IAAI,EAAE;oBACF,KAAK;iBACR;gBACD,MAAM,EAAE;oBACJ,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;iBACzD;aACJ;YACD,SAAS,EAAE,2CAA2C;SACzD,CAAC;KACL;IACD,OAAO;QACH,kCAAkC,EAAE;YAChC,IAAI,EAAE;gBACF,KAAK,EAAE,SAAS;aACnB;YACD,KAAK,EAAE;gBACH,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;aAC/D;YACD,MAAM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AQ;oBACf,YAAY;oBACb,6BAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,EAAE;wBAC3D,oBAAC,GAAG,IACA,EAAE,EAAE,UAAU,EACd,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,IAErD,KAAK,CACJ;wBACL,IAAI,CAAC,CAAC,CAAC,8BAAM,KAAK,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAG,IAAI,CAAQ,CAAC,CAAC,CAAC,IAAI,CAC9E,CACJ,CACT,CAAC;aACL;SACJ;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, Box } from '@mui/material';\n\nimport { I18n, Icon, type IobTheme } 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\nfunction valueBlinkOnce(theme: IobTheme, color?: string | boolean): any {\n if (typeof color === 'string') {\n return {\n '@keyframes newStateAnimationOnceColor': {\n '0%': {\n color,\n },\n '100%': {\n color: theme.palette.mode === 'dark' ? '#fff' : '#000',\n },\n },\n animation: 'newStateAnimationOnceColor 2s ease-in-out',\n };\n }\n return {\n '@keyframes newStateAnimationOnce': {\n '0%': {\n color: '#00f900',\n },\n '80%': {\n color: theme.palette.mode === 'dark' ? '#518851' : '#008000',\n },\n '100%': {\n color: theme.palette.mode === 'dark' ? '#fff' : '#000',\n },\n },\n animation: 'newStateAnimationOnce 2s ease-in-out',\n };\n}\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 if (this.props.schema.foreign) {\n return this.props.schema.oid;\n }\n return `${this.props.schema.system ? 'system.adapter.' : ''}${this.props.oContext.adapterName}.${this.props.oContext.instance}.${this.props.schema.oid}`;\n }\n\n async componentDidMount(): Promise<void> {\n super.componentDidMount();\n const obj: ioBroker.StateObject = (await this.props.oContext.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.oContext.socket.getState(this.getObjectID());\n\n this.setState({ stateValue: state ? state.val : null, controlType, obj }, async () => {\n await this.props.oContext.socket.subscribeState(this.getObjectID(), this.onStateChanged);\n });\n }\n\n componentWillUnmount(): void {\n super.componentWillUnmount();\n this.props.oContext.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.oContext.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: string, disabled: boolean /*, 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 = this.getText(\n this.props.schema.falseText || this.props.schema.label,\n this.props.schema.noTranslation,\n );\n\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.oContext.socket.setState(this.getObjectID(), true, false);\n }\n },\n });\n } else {\n await this.props.oContext.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={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.oContext.socket.setState(this.getObjectID(), true, false);\n }\n },\n });\n } else {\n await this.props.oContext.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 === '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.oContext.socket.setState(\n this.getObjectID(),\n this.state.stateValue,\n false,\n );\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.oContext.socket.setState(this.getObjectID(), val, false);\n }, this.props.schema.controlDelay || 0);\n });\n }}\n label={this.getText(this.props.schema.label, this.props.schema.noTranslation)}\n helperText={this.renderHelp(\n this.props.schema.help,\n this.props.schema.helpLink,\n this.props.schema.noTranslation,\n )}\n />\n );\n } else {\n let fontSize: number | undefined;\n if (this.props.schema.size === 'normal') {\n fontSize = 16;\n } else if (this.props.schema.size === 'large') {\n fontSize = 20;\n } else if (typeof this.props.schema.size === 'number') {\n fontSize = this.props.schema.size;\n }\n let label = this.getText(this.props.schema.label, this.props.schema.noTranslation);\n\n const divStyle: React.CSSProperties = {\n display: 'flex',\n alignItems: 'center',\n fontSize: fontSize || '1rem',\n gap: 8,\n };\n\n if (!this.props.schema.narrow) {\n divStyle.width = '100%';\n divStyle.justifyContent = 'space-between';\n }\n\n if (label.trim()) {\n if (!label.trim().endsWith(':') && this.props.schema.addColon) {\n label = `${label.trim()}:`;\n }\n }\n\n let blinkStyle: React.CSSProperties | undefined;\n if (this.props.schema.blinkOnUpdate) {\n blinkStyle = valueBlinkOnce(this.props.oContext.theme, this.props.schema.blinkOnUpdate);\n }\n\n let labelIcon: React.JSX.Element | undefined;\n if (this.props.schema.labelIcon) {\n labelIcon = (\n <Icon\n src={this.props.schema.labelIcon}\n style={{ marginRight: 4 }}\n />\n );\n }\n\n let labelControl: React.JSX.Element | undefined;\n if (label && labelIcon) {\n labelControl = (\n <div style={{ whiteSpace: 'nowrap' }}>\n {labelIcon}\n {label}\n </div>\n );\n } else if (label) {\n labelControl = <div style={{ whiteSpace: 'nowrap' }}>{label}</div>;\n } else if (labelIcon) {\n labelControl = labelIcon;\n }\n\n 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.oContext.socket.setState(\n this.getObjectID(),\n !this.state.stateValue,\n false,\n );\n }\n },\n });\n } else {\n await this.props.oContext.socket.setState(\n this.getObjectID(),\n !this.state.stateValue,\n false,\n );\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 if (labelControl) {\n content = (\n <div style={divStyle}>\n {labelControl}\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 =\n 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.oContext.socket.setState(\n this.getObjectID(),\n this.state.stateValue,\n false,\n );\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 if (labelControl) {\n content = (\n <div style={divStyle}>\n {labelControl}\n {content}\n </div>\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 style = Object.assign(divStyle, style);\n\n content = (\n <div style={style}>\n {labelControl}\n <Box\n style={{ display: 'flex', alignItems: 'center', gap: 8 }}\n sx={blinkStyle}\n key={this.props.schema.blinkOnUpdate ? text : undefined}\n >\n {icon}\n {text || (this.state.stateValue ? I18n.t('ra_true') : I18n.t('ra_false'))}\n </Box>\n </div>\n );\n } else {\n // text or HTML\n const unit =\n this.getText(this.props.schema.unit, this.props.schema.noTranslation) || this.state.obj.common.unit;\n\n let value;\n let key: string;\n if (this.state.controlType === 'html') {\n key = (this.state.stateValue || '').toString();\n value = <span dangerouslySetInnerHTML={{ __html: this.state.stateValue as string }} />;\n } else if (this.state.stateValue === null) {\n value = 'null';\n key = value;\n } else if (this.state.stateValue === undefined) {\n value = 'undefined';\n key = value;\n } else {\n value = this.state.stateValue.toString();\n key = value;\n }\n\n content = (\n <div style={divStyle}>\n {labelControl}\n <div style={{ display: 'flex', alignItems: 'baseline', gap: 4 }}>\n <Box\n sx={blinkStyle}\n key={this.props.schema.blinkOnUpdate ? key : undefined}\n >\n {value}\n </Box>\n {unit ? <span style={{ opacity: 0.7, fontSize: 'smaller' }}>{unit}</span> : null}\n </div>\n </div>\n );\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,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEnF,OAAO,EAAE,IAAI,EAAE,IAAI,EAAiB,MAAM,4BAA4B,CAAC;AAGvE,O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AAC;gBAChB,CAAC;qBAAM,CAAC;oBACJ,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;oBACzC,GAAG,GAAG,KAAK,CAAC;gBAChB,CAAC;gBAED,OAAO,GAAG,CACN,6BAAK,KAAK,EAAE,QAAQ;oBACf,YAAY;oBACb,6BAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,EAAE;wBAC3D,oBAAC,GAAG,IACA,EAAE,EAAE,UAAU,EACd,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,IAErD,KAAK,CACJ;wBACL,IAAI,CAAC,CAAC,CAAC,8BAAM,KAAK,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAG,IAAI,CAAQ,CAAC,CAAC,CAAC,IAAI,CAC9E,CACJ,CACT,CAAC;YACN,CAAC;QACL,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, Box } from '@mui/material';\n\nimport { I18n, Icon, type IobTheme } 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\nfunction valueBlinkOnce(theme: IobTheme, color?: string | boolean): any {\n if (typeof color === 'string') {\n return {\n '@keyframes newStateAnimationOnceColor': {\n '0%': {\n color,\n },\n '100%': {\n color: theme.palette.mode === 'dark' ? '#fff' : '#000',\n },\n },\n animation: 'newStateAnimationOnceColor 2s ease-in-out',\n };\n }\n return {\n '@keyframes newStateAnimationOnce': {\n '0%': {\n color: '#00f900',\n },\n '80%': {\n color: theme.palette.mode === 'dark' ? '#518851' : '#008000',\n },\n '100%': {\n color: theme.palette.mode === 'dark' ? '#fff' : '#000',\n },\n },\n animation: 'newStateAnimationOnce 2s ease-in-out',\n };\n}\n\ninterface ConfigStateProps extends ConfigGenericProps {\n schema: ConfigItemState;\n}\n\ninterface ConfigStateState extends ConfigGenericState {\n stateValue?: string | number | boolean | null;\n controlType?: 'text' | 'html' | 'input' | 'slider' | 'select' | 'button' | 'switch' | 'number';\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 if (this.props.schema.foreign) {\n return this.props.schema.oid;\n }\n return `${this.props.schema.system ? 'system.adapter.' : ''}${this.props.oContext.adapterName}.${this.props.oContext.instance}.${this.props.schema.oid}`;\n }\n\n async componentDidMount(): Promise<void> {\n super.componentDidMount();\n const obj: ioBroker.StateObject = (await this.props.oContext.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.oContext.socket.getState(this.getObjectID());\n\n this.setState({ stateValue: state ? state.val : null, controlType, obj }, async () => {\n await this.props.oContext.socket.subscribeState(this.getObjectID(), this.onStateChanged);\n });\n }\n\n componentWillUnmount(): void {\n super.componentWillUnmount();\n this.props.oContext.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.oContext.socket\n .setState(this.getObjectID(), this.state.stateValue, false)\n .catch((e: Error) => console.error(`Cannot control value: ${e.toString()}`));\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 an 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: string, disabled: boolean /*, defaultValue */): JSX.Element {\n if (!this.state.obj) {\n return null;\n }\n\n let content: JSX.Element;\n\n if (\n this.state.controlType === 'button' ||\n (!this.state.controlType &&\n this.state.obj.common.type === 'boolean' &&\n ((this.state.obj.common.write && this.state.obj.common.read === false) ||\n this.state.obj.common.role?.includes('button')))\n ) {\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 = this.getText(\n this.props.schema.falseText || this.props.schema.label,\n this.props.schema.noTranslation,\n );\n\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.oContext.socket.setState(\n this.getObjectID(),\n this.props.schema.buttonValue !== undefined\n ? this.props.schema.buttonValue\n : true,\n false,\n );\n }\n },\n });\n } else {\n await this.props.oContext.socket.setState(\n this.getObjectID(),\n this.props.schema.buttonValue !== undefined ? this.props.schema.buttonValue : true,\n false,\n );\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={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.oContext.socket.setState(\n this.getObjectID(),\n this.props.schema.buttonValue !== undefined\n ? this.props.schema.buttonValue\n : true,\n false,\n );\n }\n },\n });\n } else {\n await this.props.oContext.socket.setState(\n this.getObjectID(),\n this.props.schema.buttonValue !== undefined ? this.props.schema.buttonValue : true,\n false,\n );\n }\n }}\n >\n {text || this.getObjectID().split('.').pop()}\n </Button>\n );\n }\n } else if (\n this.state.controlType === 'input' ||\n (!this.state.controlType && this.state.obj.common.write && this.state.obj.common.type === 'string')\n ) {\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.oContext.socket.setState(\n this.getObjectID(),\n this.state.stateValue,\n false,\n );\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 {\n let fontSize: number | undefined;\n if (this.props.schema.size === 'normal') {\n fontSize = 16;\n } else if (this.props.schema.size === 'large') {\n fontSize = 20;\n } else if (typeof this.props.schema.size === 'number') {\n fontSize = this.props.schema.size;\n }\n let label = this.getText(this.props.schema.label, this.props.schema.noTranslation);\n\n const divStyle: React.CSSProperties = {\n display: 'flex',\n alignItems: 'center',\n fontSize: fontSize || '1rem',\n gap: 8,\n };\n\n if (!this.props.schema.narrow) {\n divStyle.width = '100%';\n divStyle.justifyContent = 'space-between';\n }\n\n if (label.trim()) {\n if (!label.trim().endsWith(':') && this.props.schema.addColon) {\n label = `${label.trim()}:`;\n }\n }\n\n let blinkStyle: React.CSSProperties | undefined;\n if (this.props.schema.blinkOnUpdate) {\n blinkStyle = valueBlinkOnce(this.props.oContext.theme, this.props.schema.blinkOnUpdate);\n }\n\n let labelIcon: React.JSX.Element | undefined;\n if (this.props.schema.labelIcon) {\n labelIcon = (\n <Icon\n src={this.props.schema.labelIcon}\n style={{ marginRight: 4 }}\n />\n );\n }\n\n let labelControl: React.JSX.Element | undefined;\n if (label && labelIcon) {\n labelControl = (\n <div style={{ whiteSpace: 'nowrap' }}>\n {labelIcon}\n {label}\n </div>\n );\n } else if (label) {\n labelControl = <div style={{ whiteSpace: 'nowrap' }}>{label}</div>;\n } else if (labelIcon) {\n labelControl = labelIcon;\n }\n\n if (\n this.state.controlType === 'switch' ||\n (!this.state.controlType &&\n this.state.obj.common.type === 'boolean' &&\n ((this.state.obj.common.write && this.state.obj.common.read !== false) ||\n this.state.obj.common.role?.includes('switch')))\n ) {\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.oContext.socket.setState(\n this.getObjectID(),\n !this.state.stateValue,\n false,\n );\n }\n },\n });\n } else {\n await this.props.oContext.socket.setState(\n this.getObjectID(),\n !this.state.stateValue,\n false,\n );\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 if (labelControl) {\n content = (\n <div style={divStyle}>\n {labelControl}\n {content}\n </div>\n );\n }\n } else if (\n this.state.controlType === 'slider' ||\n (!this.state.controlType &&\n this.state.obj.common.type === 'number' &&\n ((this.state.obj.common.write &&\n (this.state.obj.common.max !== undefined || this.state.obj.common.unit === '%')) ||\n this.state.obj.common.role?.includes('slider') ||\n this.state.obj.common.role?.includes('dimmer') ||\n this.state.obj.common.role?.includes('blind')))\n ) {\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 =\n 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.oContext.socket.setState(\n this.getObjectID(),\n this.state.stateValue,\n false,\n );\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 if (labelControl) {\n content = (\n <div style={divStyle}>\n {labelControl}\n {content}\n </div>\n );\n }\n } else if (this.state.obj.common.type === 'number' && this.state.obj.common.write) {\n // Auto-detection of the type\n const min =\n this.props.schema.min === undefined\n ? this.state.obj.common.min === undefined\n ? undefined\n : this.state.obj.common.min\n : this.props.schema.min;\n const max =\n this.props.schema.max === undefined\n ? this.state.obj.common.max === undefined\n ? undefined\n : this.state.obj.common.max\n : this.props.schema.max;\n const step =\n this.props.schema.step === undefined\n ? this.state.obj.common.step === undefined\n ? undefined\n : this.state.obj.common.step\n : 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.oContext.socket.setState(this.getObjectID(), val, false);\n }, this.props.schema.controlDelay || 0);\n });\n }}\n label={this.getText(this.props.schema.label, this.props.schema.noTranslation)}\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 style = Object.assign(divStyle, style);\n\n content = (\n <div style={style}>\n {labelControl}\n <Box\n style={{ display: 'flex', alignItems: 'center', gap: 8 }}\n sx={blinkStyle}\n key={this.props.schema.blinkOnUpdate ? text : undefined}\n >\n {icon}\n {text || (this.state.stateValue ? I18n.t('ra_true') : I18n.t('ra_false'))}\n </Box>\n </div>\n );\n } else {\n // text or HTML\n const unit =\n this.getText(this.props.schema.unit, this.props.schema.noTranslation) || this.state.obj.common.unit;\n\n let value;\n let key: string;\n if (this.state.controlType === 'html') {\n key = (this.state.stateValue || '').toString();\n value = <span dangerouslySetInnerHTML={{ __html: this.state.stateValue as string }} />;\n } else if (this.state.stateValue === null) {\n value = 'null';\n key = value;\n } else if (this.state.stateValue === undefined) {\n value = 'undefined';\n key = value;\n } else {\n value = this.state.stateValue.toString();\n key = value;\n }\n\n content = (\n <div style={divStyle}>\n {labelControl}\n <div style={{ display: 'flex', alignItems: 'baseline', gap: 4 }}>\n <Box\n sx={blinkStyle}\n key={this.props.schema.blinkOnUpdate ? key : undefined}\n >\n {value}\n </Box>\n {unit ? <span style={{ opacity: 0.7, fontSize: 'smaller' }}>{unit}</span> : null}\n </div>\n </div>\n );\n }\n }\n\n return content;\n }\n}\n\nexport default ConfigState;\n"]}
@@ -1,5 +1,5 @@
1
1
  import { type JSX } from 'react';
2
- import type { ConfigItemStaticDivider } from '#JC/types';
2
+ import type { ConfigItemStaticDivider } from '../types';
3
3
  import ConfigGeneric, { type ConfigGenericProps, type ConfigGenericState } from './ConfigGeneric';
4
4
  interface ConfigInstanceSelectProps extends ConfigGenericProps {
5
5
  schema: ConfigItemStaticDivider;
@@ -1,5 +1,5 @@
1
1
  import { type JSX } from 'react';
2
- import type { ConfigItemStaticHeader } from '#JC/types';
2
+ import type { ConfigItemStaticHeader } from '../types';
3
3
  import ConfigGeneric, { type ConfigGenericProps, type ConfigGenericState } from './ConfigGeneric';
4
4
  interface ConfigInstanceSelectProps extends ConfigGenericProps {
5
5
  schema: ConfigItemStaticHeader;
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigStaticHe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KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,CAC/F,CACT,CAAC;IACN,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): React.CSSProperties => ({\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 let component: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' = 'h5';\n switch ((this.props.schema.size || 5).toString()) {\n case '1':\n component = 'h1';\n break;\n\n case '2':\n component = 'h2';\n break;\n\n case '3':\n component = 'h3';\n break;\n\n case '4':\n component = 'h4';\n break;\n\n case '5':\n default:\n component = 'h5';\n break;\n }\n return (\n <Box\n component={component}\n sx={styles.header}\n >\n {this.getText(this.props.schema.label || this.props.schema.text, this.props.schema.noTranslation)}\n </Box>\n );\n }\n}\n\nexport default ConfigStaticHeader;\n"]}
1
+ {"version":3,"file":"ConfigStaticHeader.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigStaticHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAKpC,OAAO,aAAmE,MAAM,iBAAi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ent":["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): React.CSSProperties => ({\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 let component: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' = 'h5';\n switch ((this.props.schema.size || 5).toString()) {\n case '1':\n component = 'h1';\n break;\n\n case '2':\n component = 'h2';\n break;\n\n case '3':\n component = 'h3';\n break;\n\n case '4':\n component = 'h4';\n break;\n\n case '5':\n default:\n component = 'h5';\n break;\n }\n return (\n <Box\n component={component}\n sx={styles.header}\n >\n {this.getText(this.props.schema.label || this.props.schema.text, this.props.schema.noTranslation)}\n </Box>\n );\n }\n}\n\nexport default ConfigStaticHeader;\n"]}
@@ -1,5 +1,5 @@
1
1
  import { type JSX } from 'react';
2
- import type { ConfigItemStaticImage } from '#JC/types';
2
+ import type { ConfigItemStaticImage } from '../types';
3
3
  import ConfigGeneric, { type ConfigGenericProps, type ConfigGenericState } from './ConfigGeneric';
4
4
  interface ConfigInstanceSelectProps extends ConfigGenericProps {
5
5
  schema: ConfigItemStaticImage;
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigStaticImage.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigStaticImage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,aAAmE,MAAM,iBAAiB,CAAC;AAMlG,MAAM,iBAAkB,SAAQ,aAA4D;IACxF,UAAU,EAAC,oDAAoD;QAC3D,IAAI,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC;QAChC,IACI,GAAG;YACH,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC;YACpB,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC;YACvB,CAAC,GAAG,CAAC,UAAU,CAAC,WAAW,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,WAAW,GAAG,CAAC;YAC9D,CAAC,GAAG,CAAC,UAAU,CAAC,aAAa,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,WAAW,GAAG,CAAC,EAClE;YACE,GAAG,GAAG,WAAW,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,WAAW,IAAI,GAAG,EAAE,CAAC;SAC7D;QAED,OAAO,CACH,6BACI,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,EAChG,OAAO,EACH,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI;gBAClB,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC;gBAC/E,CAAC,CAAC,IAAI,EAEd,GAAG,EAAC,EAAE,GACR,CACL,CAAC;IACN,CAAC;CACJ;AAED,eAAe,iBAAiB,CAAC","sourcesContent":["import React, { type JSX } from 'react';\n\nimport type { ConfigItemStaticImage } from '#JC/types';\nimport ConfigGeneric, { type ConfigGenericProps, type ConfigGenericState } from './ConfigGeneric';\n\ninterface ConfigInstanceSelectProps extends ConfigGenericProps {\n schema: ConfigItemStaticImage;\n}\n\nclass ConfigStaticImage extends ConfigGeneric<ConfigInstanceSelectProps, ConfigGenericState> {\n renderItem(/* error: string, disabled: boolean, defaultValue */): JSX.Element {\n let src = this.props.schema.src;\n if (\n src &&\n !src.startsWith('.') &&\n !src.startsWith('http') &&\n !src.startsWith(`adapter/${this.props.oContext.adapterName}/`) &&\n !src.startsWith(`./adapter/${this.props.oContext.adapterName}/`)\n ) {\n src = `adapter/${this.props.oContext.adapterName}/${src}`;\n }\n\n return (\n <img\n src={src}\n style={{ cursor: this.props.schema.href ? 'pointer' : undefined, width: '100%', height: '100%' }}\n onClick={\n this.props.schema.href\n ? () => this.props.schema.href && window.open(this.props.schema.href, '_blank')\n : null\n }\n alt=\"\"\n />\n );\n }\n}\n\nexport default ConfigStaticImage;\n"]}
1
+ {"version":3,"file":"ConfigStaticImage.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigStaticImage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,aAAmE,MAAM,iBAAiB,CAAC;AAMlG,MAAM,iBAAkB,SAAQ,aAA4D;IACxF,UAAU,EAAC,oDAAoD;QAC3D,IAAI,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC;QAChC,IACI,GAAG;YACH,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC;YACpB,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC;YACvB,CAAC,GAAG,CAAC,UAAU,CAAC,WAAW,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,WAAW,GAAG,CAAC;YAC9D,CAAC,GAAG,CAAC,UAAU,CAAC,aAAa,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,WAAW,GAAG,CAAC,EAClE,CAAC;YACC,GAAG,GAAG,WAAW,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,WAAW,IAAI,GAAG,EAAE,CAAC;QAC9D,CAAC;QAED,OAAO,CACH,6BACI,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,EAChG,OAAO,EACH,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI;gBAClB,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC;gBAC/E,CAAC,CAAC,IAAI,EAEd,GAAG,EAAC,EAAE,GACR,CACL,CAAC;IACN,CAAC;CACJ;AAED,eAAe,iBAAiB,CAAC","sourcesContent":["import React, { type JSX } from 'react';\n\nimport type { ConfigItemStaticImage } from '#JC/types';\nimport ConfigGeneric, { type ConfigGenericProps, type ConfigGenericState } from './ConfigGeneric';\n\ninterface ConfigInstanceSelectProps extends ConfigGenericProps {\n schema: ConfigItemStaticImage;\n}\n\nclass ConfigStaticImage extends ConfigGeneric<ConfigInstanceSelectProps, ConfigGenericState> {\n renderItem(/* error: string, disabled: boolean, defaultValue */): JSX.Element {\n let src = this.props.schema.src;\n if (\n src &&\n !src.startsWith('.') &&\n !src.startsWith('http') &&\n !src.startsWith(`adapter/${this.props.oContext.adapterName}/`) &&\n !src.startsWith(`./adapter/${this.props.oContext.adapterName}/`)\n ) {\n src = `adapter/${this.props.oContext.adapterName}/${src}`;\n }\n\n return (\n <img\n src={src}\n style={{ cursor: this.props.schema.href ? 'pointer' : undefined, width: '100%', height: '100%' }}\n onClick={\n this.props.schema.href\n ? () => this.props.schema.href && window.open(this.props.schema.href, '_blank')\n : null\n }\n alt=\"\"\n />\n );\n }\n}\n\nexport default ConfigStaticImage;\n"]}
@@ -1,5 +1,5 @@
1
1
  import { type JSX } from 'react';
2
- import type { ConfigItemStaticInfo } from '#JC/types';
2
+ import type { ConfigItemStaticInfo } from '../types';
3
3
  import ConfigGeneric, { type ConfigGenericProps, type ConfigGenericState } from './ConfigGeneric';
4
4
  interface ConfigStaticInfoProps extends ConfigGenericProps {
5
5
  schema: ConfigItemStaticInfo;
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigStaticInfo.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigStaticInfo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAiB,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAG9E,OAAO,aAAmE,MAAM,iBAAiB,CAAC;AAElG,SAAS,cAAc,CAAC,KAAe,EAAE,KAAc,EAAE,KAAwB;IAC7E,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC3B,OAAO;YACH,uCAAuC,EAAE;gBACrC,IAAI,EAAE;oBACF,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,aAAa,CAAC,CAAC,CAAC,KAAK;iBAC/C;gBACD,MAAM,EAAE;oBACJ,KAAK,EACD,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,MAAM;wBACzB,CAAC,CAAC,KAAK;4BACH,CAAC,CAAC,iBAAiB;4BACnB,CAAC,CAAC,MAAM;wBACZ,CAAC,CAAC,KAAK;4BACL,CAAC,CAAC,iBAAiB;4BACnB,CAAC,CAAC,MAAM;iBACrB;aACJ;YACD,SAAS,EAAE,2CAA2C;SACzD,CAAC;KACL;IACD,OAAO;QACH,kCAAkC,EAAE;YAChC,IAAI,EAAE;gBAC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ACH,CACL,CAAC;SACL;QAED,MAAM,QAAQ,GAAwB;YAClC,qBAAqB,EAAE;gBACnB,OAAO,EAAE,MAAM;aAClB;YACD,4BAA4B,EAAE;gBAC1B,SAAS,EAAE,YAAY;aAC1B;YACD,2BAA2B,EAAE;gBACzB,OAAO,EAAE,OAAO;aACnB;SACJ,CAAC;QACF,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,EAAE;YAC7B,QAAQ,CAAC,SAAS,CAAC,GAAG;gBAClB,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW;aACxF,CAAC;SACL;QACD,IAAI,SAAS,EAAE;YACX,QAAQ,CAAC,UAAU,GAAG,KAAK,CAAC;SAC/B;QAED,OAAO,CACH,oBAAC,GAAG,IACA,SAAS,EAAC,KAAK,EACf,KAAK,EAAE,QAAQ,EACf,EAAE,EAAE,QAAQ;YAEZ,6BAAK,KAAK,EAAE,EAAE,GAAG,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,IAAI,SAAS,CAAC,EAAE;gBAC1E,SAAS;gBACT,KAAK,CACJ;YACL,KAAK;YACL,UAAU,CACT,CACT,CAAC;IACN,CAAC;CACJ;AAED,eAAe,gBAAgB,CAAC","sourcesContent":["import React, { type JSX } from 'react';\n\nimport { Box, Checkbox } from '@mui/material';\nimport { ContentCopy } from '@mui/icons-material';\nimport { I18n, Icon, type IobTheme, Utils } from '@iobroker/adapter-react-v5';\n\nimport type { ConfigItemStaticInfo } from '#JC/types';\nimport ConfigGeneric, { type ConfigGenericProps, type ConfigGenericState } from './ConfigGeneric';\n\nfunction valueBlinkOnce(theme: IobTheme, force: boolean, color?: string | boolean): any {\n if (typeof color === 'string') {\n return {\n '@keyframes newValueAnimationOnceColor': {\n '0%': {\n color: force ? `${color} !important` : color,\n },\n '100%': {\n color:\n theme.palette.mode === 'dark'\n ? force\n ? '#fff !important'\n : '#fff'\n : force\n ? '#000 !important'\n : '#000',\n },\n },\n animation: 'newValueAnimationOnceColor 2s ease-in-out',\n };\n }\n return {\n '@keyframes newValueAnimationOnce': {\n '0%': {\n color: force ? `#00f900 !important` : '#00f900',\n },\n '80%': {\n color:\n theme.palette.mode === 'dark'\n ? force\n ? `#518851 !important`\n : '#518851'\n : force\n ? `#008000 !important`\n : '#008000',\n },\n '100%': {\n color:\n theme.palette.mode === 'dark'\n ? force\n ? '#fff !important'\n : '#fff'\n : force\n ? '#000 !important'\n : '#000',\n },\n },\n animation: 'newValueAnimationOnce 2s ease-in-out',\n };\n}\n\nfunction valueBlink(theme: IobTheme, color?: string | boolean): any {\n if (typeof color === 'string') {\n return {\n '@keyframes blinkAnimationColor': {\n '0%': {\n color,\n },\n '100%': {\n color: theme.palette.mode === 'dark' ? '#fff' : '#000',\n },\n },\n animation: 'blinkAnimationColor 2s ease-in-out infinite',\n };\n }\n return {\n '@keyframes blinkAnimation': {\n '0%': {\n color: '#00f900',\n },\n '80%': {\n color: theme.palette.mode === 'dark' ? '#518851' : '#008000',\n },\n '100%': {\n color: theme.palette.mode === 'dark' ? '#fff' : '#000',\n },\n },\n animation: 'blinkAnimation 2s ease-in-out infinite',\n };\n}\n\nconst styles: Record<string, any> = {\n label: {\n fontWeight: 'bold',\n whiteSpace: 'nowrap',\n },\n valueImage: {\n maxHeight: '100%',\n },\n valueAndUnit: {\n display: 'flex',\n gap: 4,\n alignItems: 'baseline',\n },\n value: {},\n unit: {\n fontSize: 'smaller',\n opacity: 0.7,\n },\n};\n\ninterface ConfigStaticInfoProps extends ConfigGenericProps {\n schema: ConfigItemStaticInfo;\n}\n\nclass ConfigStaticInfo extends ConfigGeneric<ConfigStaticInfoProps, ConfigGenericState> {\n renderItem(_error: string): JSX.Element {\n let label: string | JSX.Element | JSX.Element[] = this.getText(\n this.props.schema.text || this.props.schema.label,\n this.props.schema.noTranslation,\n );\n if (this.props.schema.addColon && typeof label === 'string' && !label.trim().endsWith(':')) {\n label = `${label.trim()}:`;\n }\n\n if (\n label &&\n (label.includes('<a ') || label.includes('<br') || label.includes('<b>') || label.includes('<i>'))\n ) {\n label = Utils.renderTextWithA(label);\n }\n let fontSize: number | undefined;\n if (this.props.schema.size === 'normal') {\n fontSize = 16;\n } else if (this.props.schema.size === 'large') {\n fontSize = 20;\n } else if (typeof this.props.schema.size === 'number') {\n fontSize = this.props.schema.size;\n }\n\n const divStyle: React.CSSProperties = {\n width: '100%',\n height: '100%',\n display: 'flex',\n alignItems: 'center',\n position: 'relative',\n fontSize,\n };\n\n if (this.props.schema.narrow) {\n divStyle.gap = 8;\n } else {\n divStyle.justifyContent = 'space-between';\n }\n\n let value: React.JSX.Element;\n let valueTxt: string;\n if (this.props.schema.data && typeof this.props.schema.data === 'object' && this.props.schema.data.en) {\n valueTxt = this.getText(this.props.schema.data);\n } else if (\n typeof this.props.schema.data === 'object' ||\n this.props.schema.data === undefined ||\n this.props.schema.data === null\n ) {\n valueTxt = JSON.stringify(this.props.schema.data);\n } else if (typeof this.props.schema.data === 'number') {\n valueTxt = this.props.schema.data.toString();\n if (this.props.oContext.isFloatComma) {\n valueTxt = valueTxt.replace('.', ',');\n }\n } else if (!this.props.schema.booleanAsCheckbox || typeof this.props.schema.data !== 'boolean') {\n valueTxt = this.props.schema.data.toString();\n }\n let multiLine = false;\n\n if (this.props.schema.booleanAsCheckbox && typeof this.props.schema.data === 'boolean') {\n value = (\n <Checkbox\n checked={!!value}\n disabled\n size={\n this.props.schema.size === 'small'\n ? 'small'\n : this.props.schema.size === 'large'\n ? 'large'\n : undefined\n }\n />\n );\n } else if (valueTxt.startsWith('data:image/')) {\n value = (\n <div style={{ ...styles.value, ...styles.valueImage, ...(this.props.schema.styleValue || undefined) }}>\n <Icon src={valueTxt} />\n </div>\n );\n } else {\n const valStyle: React.CSSProperties = { ...styles.value, ...(this.props.schema.styleValue || undefined) };\n if (this.props.schema.html) {\n value = (\n <div\n style={valStyle}\n dangerouslySetInnerHTML={{ __html: valueTxt }}\n />\n );\n } else {\n if (Array.isArray(this.props.schema.data)) {\n multiLine = true;\n value = (\n <div style={valStyle}>\n {this.props.schema.data.map((it, i) => (\n <div key={i}>\n {typeof it === 'object' || it === null || it === undefined\n ? JSON.stringify(it)\n : it}\n </div>\n ))}\n </div>\n );\n } else {\n if (valueTxt.includes('\\n')) {\n multiLine = true;\n value = <div style={valStyle}>{Utils.renderTextWithA(valueTxt)}</div>;\n } else {\n value = <div style={valStyle}>{valueTxt}</div>;\n }\n }\n }\n }\n\n if (this.props.schema.blinkOnUpdate && this.props.schema.blink) {\n const style1 = valueBlinkOnce(this.props.oContext.theme, true, this.props.schema.blinkOnUpdate);\n const style2 = valueBlink(this.props.oContext.theme, this.props.schema.blink);\n value = (\n <Box\n key={valueTxt}\n sx={{ ...style1, ...style2 }}\n >\n {value}\n </Box>\n );\n } else if (this.props.schema.blinkOnUpdate) {\n const style = valueBlinkOnce(this.props.oContext.theme, false, this.props.schema.blinkOnUpdate);\n value = (\n <Box\n key={valueTxt}\n sx={style}\n >\n {value}\n </Box>\n );\n } else if (this.props.schema.blink) {\n const style = valueBlink(this.props.oContext.theme, this.props.schema.blink);\n value = <Box sx={style}>{value}</Box>;\n }\n\n if (this.props.schema.unit) {\n value = (\n <div style={styles.valueAndUnit}>\n {value}\n <div style={{ ...styles.unit, ...(this.props.schema.styleUnit || undefined) }}>\n {this.getText(this.props.schema.unit, this.props.schema.noTranslation)}\n </div>\n </div>\n );\n }\n\n let labelIcon: React.JSX.Element | undefined;\n if (this.props.schema.labelIcon) {\n labelIcon = (\n <Icon\n src={this.props.schema.labelIcon}\n style={{ marginRight: 4 }}\n />\n );\n }\n let copyButton: React.JSX.Element | undefined;\n if (this.props.schema.copyToClipboard) {\n copyButton = (\n <ContentCopy\n className=\"staticCopyButton\"\n style={{\n position: 'absolute',\n top: 'calc(50% - 12px)',\n right: 0,\n cursor: 'pointer',\n }}\n onClick={() => {\n Utils.copyToClipboard(valueTxt);\n window.alert(I18n.t('ra_Copied'));\n }}\n />\n );\n }\n\n const boxStyle: Record<string, any> = {\n '& .staticCopyButton': {\n display: 'none',\n },\n '& .staticCopyButton:action': {\n transform: 'scale(0.9)',\n },\n '&:hover .staticCopyButton': {\n display: 'block',\n },\n };\n if (this.props.schema.highlight) {\n boxStyle['&:hover'] = {\n backgroundColor: this.props.oContext.themeType === 'dark' ? '#51515180' : '#b8b8b880',\n };\n }\n if (multiLine) {\n divStyle.alignItems = 'top';\n }\n\n return (\n <Box\n component=\"div\"\n style={divStyle}\n sx={boxStyle}\n >\n <div style={{ ...styles.label, ...(this.props.schema.styleLabel || undefined) }}>\n {labelIcon}\n {label}\n </div>\n {value}\n {copyButton}\n </Box>\n );\n }\n}\n\nexport default ConfigStaticInfo;\n"]}
1
+ {"version":3,"file":"ConfigStaticInfo.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigStaticInfo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAiB,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAG9E,OAAO,aAAmE,MAAM,iBAAiB,CAAC;AAElG,SAAS,cAAc,CAAC,KAAe,EAAE,KAAc,EAAE,KAAwB;IAC7E,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC5B,OAAO;YACH,uCAAuC,EAAE;gBACrC,IAAI,EAAE;oBACF,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,aAAa,CAAC,CAAC,CAAC,KAAK;iBAC/C;gBACD,MAAM,EAAE;oBACJ,KAAK,EACD,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,MAAM;wBACzB,CA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EAAE,QAAQ;YAEZ,6BAAK,KAAK,EAAE,EAAE,GAAG,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,IAAI,SAAS,CAAC,EAAE;gBAC1E,SAAS;gBACT,KAAK,CACJ;YACL,KAAK;YACL,UAAU,CACT,CACT,CAAC;IACN,CAAC;CACJ;AAED,eAAe,gBAAgB,CAAC","sourcesContent":["import React, { type JSX } from 'react';\n\nimport { Box, Checkbox } from '@mui/material';\nimport { ContentCopy } from '@mui/icons-material';\nimport { I18n, Icon, type IobTheme, Utils } from '@iobroker/adapter-react-v5';\n\nimport type { ConfigItemStaticInfo } from '#JC/types';\nimport ConfigGeneric, { type ConfigGenericProps, type ConfigGenericState } from './ConfigGeneric';\n\nfunction valueBlinkOnce(theme: IobTheme, force: boolean, color?: string | boolean): any {\n if (typeof color === 'string') {\n return {\n '@keyframes newValueAnimationOnceColor': {\n '0%': {\n color: force ? `${color} !important` : color,\n },\n '100%': {\n color:\n theme.palette.mode === 'dark'\n ? force\n ? '#fff !important'\n : '#fff'\n : force\n ? '#000 !important'\n : '#000',\n },\n },\n animation: 'newValueAnimationOnceColor 2s ease-in-out',\n };\n }\n return {\n '@keyframes newValueAnimationOnce': {\n '0%': {\n color: force ? `#00f900 !important` : '#00f900',\n },\n '80%': {\n color:\n theme.palette.mode === 'dark'\n ? force\n ? `#518851 !important`\n : '#518851'\n : force\n ? `#008000 !important`\n : '#008000',\n },\n '100%': {\n color:\n theme.palette.mode === 'dark'\n ? force\n ? '#fff !important'\n : '#fff'\n : force\n ? '#000 !important'\n : '#000',\n },\n },\n animation: 'newValueAnimationOnce 2s ease-in-out',\n };\n}\n\nfunction valueBlink(theme: IobTheme, color?: string | boolean): any {\n if (typeof color === 'string') {\n return {\n '@keyframes blinkAnimationColor': {\n '0%': {\n color,\n },\n '100%': {\n color: theme.palette.mode === 'dark' ? '#fff' : '#000',\n },\n },\n animation: 'blinkAnimationColor 2s ease-in-out infinite',\n };\n }\n return {\n '@keyframes blinkAnimation': {\n '0%': {\n color: '#00f900',\n },\n '80%': {\n color: theme.palette.mode === 'dark' ? '#518851' : '#008000',\n },\n '100%': {\n color: theme.palette.mode === 'dark' ? '#fff' : '#000',\n },\n },\n animation: 'blinkAnimation 2s ease-in-out infinite',\n };\n}\n\nconst styles: Record<string, any> = {\n label: {\n fontWeight: 'bold',\n whiteSpace: 'nowrap',\n },\n valueImage: {\n maxHeight: '100%',\n },\n valueAndUnit: {\n display: 'flex',\n gap: 4,\n alignItems: 'baseline',\n },\n value: {},\n unit: {\n fontSize: 'smaller',\n opacity: 0.7,\n },\n};\n\ninterface ConfigStaticInfoProps extends ConfigGenericProps {\n schema: ConfigItemStaticInfo;\n}\n\nclass ConfigStaticInfo extends ConfigGeneric<ConfigStaticInfoProps, ConfigGenericState> {\n renderItem(_error: string): JSX.Element {\n let label: string | JSX.Element | JSX.Element[] = this.getText(\n this.props.schema.text || this.props.schema.label,\n this.props.schema.noTranslation,\n );\n if (this.props.schema.addColon && typeof label === 'string' && !label.trim().endsWith(':')) {\n label = `${label.trim()}:`;\n }\n\n if (\n label &&\n (label.includes('<a ') || label.includes('<br') || label.includes('<b>') || label.includes('<i>'))\n ) {\n label = Utils.renderTextWithA(label);\n }\n let fontSize: number | undefined;\n if (this.props.schema.size === 'normal') {\n fontSize = 16;\n } else if (this.props.schema.size === 'large') {\n fontSize = 20;\n } else if (typeof this.props.schema.size === 'number') {\n fontSize = this.props.schema.size;\n }\n\n const divStyle: React.CSSProperties = {\n width: '100%',\n height: '100%',\n display: 'flex',\n alignItems: 'center',\n position: 'relative',\n fontSize,\n };\n\n if (this.props.schema.narrow) {\n divStyle.gap = 8;\n } else {\n divStyle.justifyContent = 'space-between';\n }\n\n let value: React.JSX.Element;\n let valueTxt: string;\n if (this.props.schema.data && typeof this.props.schema.data === 'object' && this.props.schema.data.en) {\n valueTxt = this.getText(this.props.schema.data);\n } else if (\n typeof this.props.schema.data === 'object' ||\n this.props.schema.data === undefined ||\n this.props.schema.data === null\n ) {\n valueTxt = JSON.stringify(this.props.schema.data);\n } else if (typeof this.props.schema.data === 'number') {\n valueTxt = this.props.schema.data.toString();\n if (this.props.oContext.isFloatComma) {\n valueTxt = valueTxt.replace('.', ',');\n }\n } else if (!this.props.schema.booleanAsCheckbox || typeof this.props.schema.data !== 'boolean') {\n valueTxt = this.props.schema.data.toString();\n }\n let multiLine = false;\n\n if (this.props.schema.booleanAsCheckbox && typeof this.props.schema.data === 'boolean') {\n value = (\n <Checkbox\n checked={!!value}\n disabled\n size={\n this.props.schema.size === 'small'\n ? 'small'\n : this.props.schema.size === 'large'\n ? 'large'\n : undefined\n }\n />\n );\n } else if (valueTxt.startsWith('data:image/')) {\n value = (\n <div style={{ ...styles.value, ...styles.valueImage, ...(this.props.schema.styleValue || undefined) }}>\n <Icon src={valueTxt} />\n </div>\n );\n } else {\n const valStyle: React.CSSProperties = { ...styles.value, ...(this.props.schema.styleValue || undefined) };\n if (this.props.schema.html) {\n value = (\n <div\n style={valStyle}\n dangerouslySetInnerHTML={{ __html: valueTxt }}\n />\n );\n } else {\n if (Array.isArray(this.props.schema.data)) {\n multiLine = true;\n value = (\n <div style={valStyle}>\n {this.props.schema.data.map((it, i) => (\n <div key={i}>\n {typeof it === 'object' || it === null || it === undefined\n ? JSON.stringify(it)\n : it}\n </div>\n ))}\n </div>\n );\n } else {\n if (valueTxt.includes('\\n')) {\n multiLine = true;\n value = <div style={valStyle}>{Utils.renderTextWithA(valueTxt)}</div>;\n } else {\n value = <div style={valStyle}>{valueTxt}</div>;\n }\n }\n }\n }\n\n if (this.props.schema.blinkOnUpdate && this.props.schema.blink) {\n const style1 = valueBlinkOnce(this.props.oContext.theme, true, this.props.schema.blinkOnUpdate);\n const style2 = valueBlink(this.props.oContext.theme, this.props.schema.blink);\n value = (\n <Box\n key={valueTxt}\n sx={{ ...style1, ...style2 }}\n >\n {value}\n </Box>\n );\n } else if (this.props.schema.blinkOnUpdate) {\n const style = valueBlinkOnce(this.props.oContext.theme, false, this.props.schema.blinkOnUpdate);\n value = (\n <Box\n key={valueTxt}\n sx={style}\n >\n {value}\n </Box>\n );\n } else if (this.props.schema.blink) {\n const style = valueBlink(this.props.oContext.theme, this.props.schema.blink);\n value = <Box sx={style}>{value}</Box>;\n }\n\n if (this.props.schema.unit) {\n value = (\n <div style={styles.valueAndUnit}>\n {value}\n <div style={{ ...styles.unit, ...(this.props.schema.styleUnit || undefined) }}>\n {this.getText(this.props.schema.unit, this.props.schema.noTranslation)}\n </div>\n </div>\n );\n }\n\n let labelIcon: React.JSX.Element | undefined;\n if (this.props.schema.labelIcon) {\n labelIcon = (\n <Icon\n src={this.props.schema.labelIcon}\n style={{ marginRight: 4 }}\n />\n );\n }\n let copyButton: React.JSX.Element | undefined;\n if (this.props.schema.copyToClipboard) {\n copyButton = (\n <ContentCopy\n className=\"staticCopyButton\"\n style={{\n position: 'absolute',\n top: 'calc(50% - 12px)',\n right: 0,\n cursor: 'pointer',\n }}\n onClick={() => {\n Utils.copyToClipboard(valueTxt);\n window.alert(I18n.t('ra_Copied'));\n }}\n />\n );\n }\n\n const boxStyle: Record<string, any> = {\n '& .staticCopyButton': {\n display: 'none',\n },\n '& .staticCopyButton:action': {\n transform: 'scale(0.9)',\n },\n '&:hover .staticCopyButton': {\n display: 'block',\n },\n };\n if (this.props.schema.highlight) {\n boxStyle['&:hover'] = {\n backgroundColor: this.props.oContext.themeType === 'dark' ? '#51515180' : '#b8b8b880',\n };\n }\n if (multiLine) {\n divStyle.alignItems = 'top';\n }\n\n return (\n <Box\n component=\"div\"\n style={divStyle}\n sx={boxStyle}\n >\n <div style={{ ...styles.label, ...(this.props.schema.styleLabel || undefined) }}>\n {labelIcon}\n {label}\n </div>\n {value}\n {copyButton}\n </Box>\n );\n }\n}\n\nexport default ConfigStaticInfo;\n"]}
@@ -1,5 +1,5 @@
1
1
  import { type JSX } from 'react';
2
- import type { ConfigItemStaticText } from '#JC/types';
2
+ import type { ConfigItemStaticText } from '../types';
3
3
  import ConfigGeneric, { type ConfigGenericProps, type ConfigGenericState } from './ConfigGeneric';
4
4
  interface ConfigStaticTextProps extends ConfigGenericProps {
5
5
  schema: ConfigItemStaticText;
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigStaticText.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigStaticText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAiB,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAGlE,OAAO,aAAmE,MAAM,iBAAiB,CAAC;AAElG,MAAM,MAAM,GAAwB;IAChC,SAAS,EAAE;QACP,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,MAAM;KAChB;IACD,IAAI,EAAE,CAAC,KAAe,EAAuB,EAAE,CAAC,CAAC;QAC7C,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,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,IAAI,CAAC,IAAI,EAAE;QACP,GAAG,GAAG,yBAAyB,UAAU,EAAE,CAAC;QAC5C,OAAO,GAAG,MAAM,IAAI,OAAO,CAAC;KAC/B;SAAM,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;QACxC,OAAO,GAAG,MAAM,IAAI,OAAO,CAAC;QAC5B,GAAG,GAAG,IAAI,CAAC;KACd;SAAM,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC,UAAU,CAA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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): React.CSSProperties => ({\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 ConfigStaticTextProps extends ConfigGenericProps {\n schema: ConfigItemStaticText;\n}\n\nclass ConfigStaticText extends ConfigGeneric<ConfigStaticTextProps, 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.oContext.onBackEndCommand) {\n this.props.oContext.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.oContext.adapterName}.${this.props.oContext.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.oContext.onBackEndCommand) {\n this.props.oContext.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.oContext.adapterName}.${this.props.oContext.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,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C,OA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,CAAC,CAAC,SAAS,EACpD,OAAO,EACH,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI;gBAClB,CAAC,CAAC,GAAG,EAAE;oBACD,2CAA2C;oBAC3C,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;oBACxF,IAAI,IAAI,EAAE,CAAC;wBACP,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,gBAAgB,EAAE,CAAC;4BACvC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,gBAAgB,CAAC;gCACjC,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,QAAQ,CAAC,WAAW,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,EAAE,CACvE,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): React.CSSProperties => ({\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 ConfigStaticTextProps extends ConfigGenericProps {\n schema: ConfigItemStaticText;\n}\n\nclass ConfigStaticText extends ConfigGeneric<ConfigStaticTextProps, 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.oContext.onBackEndCommand) {\n this.props.oContext.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.oContext.adapterName}.${this.props.oContext.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.oContext.onBackEndCommand) {\n this.props.oContext.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.oContext.adapterName}.${this.props.oContext.instance}`,\n );\n }\n }\n }\n : null\n }\n >\n {text}\n </Box>\n );\n }\n}\n\nexport default ConfigStaticText;\n"]}
@@ -1,5 +1,5 @@
1
1
  import React, { type JSX } from 'react';
2
- import type { ConfigItemTableIndexed, ConfigItemTable } from '#JC/types';
2
+ import type { ConfigItemTableIndexed, ConfigItemTable } from '../types';
3
3
  import ConfigGeneric, { type ConfigGenericProps, type ConfigGenericState } from './ConfigGeneric';
4
4
  interface ConfigTableProps extends ConfigGenericProps {
5
5
  schema: ConfigItemTable;
@@ -42,7 +42,7 @@ declare class ConfigTable extends ConfigGeneric<ConfigTableProps, ConfigTableSta
42
42
  static getFilterValue(el: React.RefObject<HTMLInputElement>): string;
43
43
  static setFilterValue(el: React.RefObject<HTMLInputElement>, filterValue: string): string;
44
44
  handleRequestSort: (property: string, orderCheck?: boolean) => void;
45
- stableSort: (order: 'desc' | 'asc', orderBy: string) => Record<string, any>[];
45
+ stableSort: (order: "desc" | "asc", orderBy: string) => Record<string, any>[];
46
46
  renderShowHideFilter(headCell: ConfigItemTableIndexed): React.JSX.Element | null;
47
47
  renderImportExportButtons(schema: ConfigItemTable): React.JSX.Element;
48
48
  renderAddButton(doAnyFilterSet: boolean): React.JSX.Element;
@@ -259,7 +259,7 @@ class ConfigTable extends ConfigGeneric {
259
259
  }
260
260
  itemTable(attrItem, data, idx) {
261
261
  const { schema } = this.props;
262
- const schemaForAttribute = schema.items && schema.items.find((el) => el.attr === attrItem);
262
+ const schemaForAttribute = schema.items?.find((el) => el.attr === attrItem);
263
263
  if (!schemaForAttribute) {
264
264
  return null;
265
265
  }
@@ -330,7 +330,10 @@ class ConfigTable extends ConfigGeneric {
330
330
  const isAsc = orderBy === property && order === 'asc';
331
331
  const newOrder = orderCheck ? order : isAsc ? 'desc' : 'asc';
332
332
  const newValue = this.stableSort(newOrder, property);
333
- this.setState({ value: newValue, order: newOrder, orderBy: property, iteration: this.state.iteration + 10000 }, () => this.applyFilter(false, newValue));
333
+ // update only if value is really changed
334
+ if (JSON.stringify(newValue) !== JSON.stringify(this.state.value)) {
335
+ this.setState({ value: newValue, order: newOrder, orderBy: property, iteration: this.state.iteration + 10000 }, () => this.applyFilter(false, newValue));
336
+ }
334
337
  //}
335
338
  };
336
339
  stableSort = (order, orderBy) => {
@@ -409,7 +412,7 @@ class ConfigTable extends ConfigGeneric {
409
412
  onDelete = (index) => () => {
410
413
  const newValue = JSON.parse(JSON.stringify(this.state.value));
411
414
  newValue.splice(index, 1);
412
- this.setState({ value: newValue, iteration: this.state.iteration + 10000 }, () => this.applyFilter(false, null, () => this.onChangeWrapper(newValue)));
415
+ this.setState({ value: newValue, iteration: this.state.iteration + 10_000 }, () => this.applyFilter(false, null, () => this.onChangeWrapper(newValue)));
413
416
  };
414
417
  onExport() {
415
418
  const { schema } = this.props;
@@ -737,7 +740,7 @@ class ConfigTable extends ConfigGeneric {
737
740
  tdStyle = { paddingTop: 1, paddingBottom: 1 };
738
741
  }
739
742
  return (React.createElement(Grid2, { size: {
740
- xs: schema.xs || 12,
743
+ xs: schema.xs || 12, // if xs is not defined, take the full width
741
744
  sm: schema.sm || undefined,
742
745
  md: schema.md || undefined,
743
746
  lg: schema.lg || undefined,
@@ -774,7 +777,7 @@ class ConfigTable extends ConfigGeneric {
774
777
  }
775
778
  const doAnyFilterSet = this.isAnyFilterSet();
776
779
  return (React.createElement(Grid2, { size: {
777
- xs: schema.xs || 12,
780
+ xs: schema.xs || 12, // if xs is not defined, take the full width
778
781
  sm: schema.sm || undefined,
779
782
  md: schema.md || undefined,
780
783
  lg: schema.lg || undefined,
@@ -801,7 +804,7 @@ class ConfigTable extends ConfigGeneric {
801
804
  this.showTypeOfImportDialog(),
802
805
  this.enhancedFilterCard(),
803
806
  visibleValue.map((idx, i) => (React.createElement(Grid2, { key: `${idx}_${i}`, size: {
804
- xs: schema.xs || 12,
807
+ xs: schema.xs || 12, // if xs is not defined, take the full width
805
808
  sm: schema.sm || undefined,
806
809
  md: schema.md || undefined,
807
810
  lg: schema.lg || undefined,