@iobroker/dm-gui-components 8.0.1 → 8.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -23,6 +23,12 @@ render() {
23
23
  -->
24
24
 
25
25
  ## Changelog
26
+ ### 8.0.3 (2025-10-25)
27
+ - (@GermanBluefox) Updated packages
28
+
29
+ ### 8.0.2 (2025-10-23)
30
+ - (@GermanBluefox) Renamed gui-components to adapter-react-v5
31
+
26
32
  ### 8.0.1 (2025-10-23)
27
33
 
28
34
  - (@GermanBluefox) Make package independent
@@ -1,5 +1,5 @@
1
1
  import React, { Component } from 'react';
2
- import { type Connection, type ThemeName, type ThemeType, type IobTheme } from '@iobroker/gui-components';
2
+ import { type Connection, type ThemeName, type ThemeType, type IobTheme } from '@iobroker/adapter-react-v5';
3
3
  import type { ActionBase, ControlBase, ControlState, DeviceInfo, InstanceDetails, JsonFormSchema, ActionButton } from '@iobroker/dm-utils';
4
4
  declare module '@mui/material/Button' {
5
5
  interface ButtonPropsColorOverrides {
@@ -1,7 +1,7 @@
1
1
  import React, { Component } from 'react';
2
2
  import { Backdrop, Box, Button, Checkbox, CircularProgress, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, FormControl, FormControlLabel, Grid2, IconButton, Input, InputAdornment, InputLabel, LinearProgress, MenuItem, Select, Slider, Snackbar, TextField, Typography, } from '@mui/material';
3
3
  import { Close, Check, ContentCopy } from '@mui/icons-material';
4
- import { I18n, Icon, Utils, } from '@iobroker/gui-components';
4
+ import { I18n, Icon, Utils, } from '@iobroker/adapter-react-v5';
5
5
  import { getTranslation } from './Utils';
6
6
  import JsonConfig from './JsonConfig';
7
7
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Communication.js","sourceRoot":"./src/","sources":["Communication.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EACH,QAAQ,EAC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AAS,CAAC,WAAW,CAAC,GAAG,KAAK,SAAS;wCAC9C,CAAC,CAAC,GAAG;wCACL,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,GAAG;oCAC9C,IAAI,EAAE,QAAQ;iCACjB,GACH,CACE,CACJ,CACN,CACT,CAAC,CAAC,CAAC,IAAI,CACI;YAChB,oBAAC,aAAa;gBACV,oBAAC,MAAM,IACH,OAAO,EAAC,WAAW,EACnB,QAAQ,EAAE,UAAU,EACpB,KAAK,EAAC,SAAS,EACf,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE,EACnC,SAAS,EAAE,oBAAC,KAAK,OAAG,IAEnB,cAAc,CAAC,eAAe,CAAC,CAC3B;gBACT,oBAAC,MAAM,IACH,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,MAAM,EACZ,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EACjD,SAAS,EAAE,oBAAC,KAAK,OAAG,IAEnB,cAAc,CAAC,kBAAkB,CAAC,CAC9B,CACG,CACX,CACZ,CAAC;IACN,CAAC;IAED,MAAM;QACF,OAAO,CACH;YACK,IAAI,CAAC,cAAc,EAAE;YACrB,IAAI,CAAC,aAAa,EAAE;YACpB,IAAI,CAAC,mBAAmB,EAAE;YAC1B,IAAI,CAAC,mBAAmB,EAAE;YAC1B,IAAI,CAAC,gBAAgB,EAAE;YACvB,IAAI,CAAC,oBAAoB,EAAE;YAC3B,IAAI,CAAC,wBAAwB,EAAE;YAC/B,IAAI,CAAC,iBAAiB,EAAE;YACxB,IAAI,CAAC,aAAa,EAAE,CACtB,CACN,CAAC;IACN,CAAC;CACJ;AAED,eAAe,aAAa,CAAC","sourcesContent":["import React, { Component } from 'react';\n\nimport {\n Backdrop,\n Box,\n Button,\n Checkbox,\n CircularProgress,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n FormControl,\n FormControlLabel,\n Grid2,\n IconButton,\n Input,\n InputAdornment,\n InputLabel,\n LinearProgress,\n MenuItem,\n Select,\n Slider,\n Snackbar,\n TextField,\n Typography,\n} from '@mui/material';\n\nimport { Close, Check, ContentCopy } from '@mui/icons-material';\n\nimport {\n type Connection,\n type AdminConnection,\n type ThemeName,\n type ThemeType,\n type IobTheme,\n I18n,\n Icon,\n Utils,\n} from '@iobroker/gui-components';\nimport type {\n ActionBase,\n ControlBase,\n ControlState,\n DeviceInfo,\n DeviceRefresh,\n InstanceDetails,\n JsonFormSchema,\n ActionButton,\n} from '@iobroker/dm-utils';\nimport type { ConfigItemPanel, ConfigItemTabs } from '@iobroker/json-config';\n\nimport { getTranslation } from './Utils';\nimport JsonConfig from './JsonConfig';\n\ndeclare module '@mui/material/Button' {\n interface ButtonPropsColorOverrides {\n grey: true;\n }\n}\n\nexport type CommunicationProps = {\n /** Socket connection */\n socket: Connection;\n /** Instance to communicate with device-manager backend, like `adapterName.X` */\n selectedInstance: string; // adapterName.X\n registerHandler?: (handler: null | ((command: string) => void)) => void;\n themeName: ThemeName;\n themeType: ThemeType;\n theme: IobTheme;\n isFloatComma: boolean;\n dateFormat: string;\n};\n\ninterface CommunicationForm {\n title?: ioBroker.StringOrTranslated | null | undefined;\n label?: ioBroker.StringOrTranslated | null | undefined; // same as title\n noTranslation?: boolean; // Do not translate title/label\n schema: JsonFormSchema;\n data?: Record<string, any>;\n buttons?: (ActionButton | 'apply' | 'cancel' | 'close')[];\n maxWidth?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n /** Minimal width of the dialog */\n minWidth?: number;\n}\n\ninterface CommunicationFormInState extends CommunicationForm {\n handleClose?: (data?: Record<string, any>) => void;\n originalData: string;\n changed: boolean;\n}\n\ninterface InputAction extends ActionBase {\n /** If it is a device action */\n deviceId?: string;\n /** Optional refresh function to execute */\n refresh?: () => void;\n}\n\nexport type CommunicationState = {\n showSpinner: boolean;\n showToast: string | null;\n message: {\n message: string;\n handleClose: () => void;\n } | null;\n confirm: {\n message: string;\n handleClose: (confirmation?: boolean) => void;\n } | null;\n form: CommunicationFormInState | null;\n progress: {\n open: boolean;\n progress: number;\n } | null;\n showConfirmation: InputAction | null;\n showInput: InputAction | null;\n inputValue: string | boolean | number | null;\n};\n\ninterface DmResponse {\n /* Type of message */\n type: 'message' | 'confirm' | 'progress' | 'result' | 'form';\n /* Origin */\n origin: string;\n}\n\ninterface DmControlResponse extends DmResponse {\n result: {\n error?: {\n code: number;\n message: string;\n };\n state?: ioBroker.State;\n deviceId: string;\n controlId: string;\n };\n}\n\ninterface Message {\n actionId?: string;\n deviceId?: string;\n value?: unknown;\n origin?: string;\n confirm?: boolean;\n data?: any;\n /** Inform backend, how long the frontend will wait for an answer */\n timeout?: number;\n}\n\ninterface DmActionResponse extends DmResponse {\n result: {\n refresh?: DeviceRefresh;\n error?: {\n code: number;\n message: string;\n };\n };\n message?: string;\n confirm?: string;\n form?: CommunicationForm;\n progress?: {\n open: boolean;\n progress: number;\n };\n}\n\n/**\n * Device List Component\n */\nclass Communication<P extends CommunicationProps, S extends CommunicationState> extends Component<P, S> {\n private responseTimeout: ReturnType<typeof setTimeout> | null = null;\n\n // eslint-disable-next-line react/no-unused-class-component-methods\n instanceHandler: (action: ActionBase) => () => void;\n\n // eslint-disable-next-line react/no-unused-class-component-methods\n deviceHandler: (deviceId: string, action: ActionBase, refresh: () => void) => () => void;\n\n // eslint-disable-next-line react/no-unused-class-component-methods\n controlHandler: (\n deviceId: string,\n control: ControlBase,\n state: ControlState,\n ) => () => Promise<ioBroker.State | null>;\n\n // eslint-disable-next-line react/no-unused-class-component-methods\n controlStateHandler: (deviceId: string, control: ControlBase) => () => Promise<ioBroker.State | null>;\n\n constructor(props: P) {\n super(props);\n\n this.state = {\n showSpinner: false,\n showToast: null,\n message: null,\n confirm: null,\n form: null,\n progress: null,\n showConfirmation: null,\n showInput: null,\n inputValue: null,\n } as S;\n\n // eslint-disable-next-line react/no-unused-class-component-methods\n this.instanceHandler = action => () => {\n if (action.confirmation) {\n this.setState({ showConfirmation: action });\n return;\n }\n if (action.inputBefore) {\n this.setState({ showInput: action });\n return;\n }\n\n this.sendActionToInstance('dm:instanceAction', { actionId: action.id, timeout: action.timeout });\n };\n\n // eslint-disable-next-line react/no-unused-class-component-methods\n this.deviceHandler = (deviceId, action, refresh) => () => {\n if (action.confirmation) {\n this.setState({ showConfirmation: { ...action, deviceId, refresh } });\n return;\n }\n if (action.inputBefore) {\n this.setState({\n showInput: { ...action, deviceId, refresh },\n inputValue: action.inputBefore.defaultValue || '',\n });\n return;\n }\n\n this.sendActionToInstance(\n 'dm:deviceAction',\n { deviceId, actionId: action.id, timeout: action.timeout },\n refresh,\n );\n };\n\n // eslint-disable-next-line react/no-unused-class-component-methods\n this.controlHandler = (deviceId, control, state) => () =>\n this.sendControlToInstance('dm:deviceControl', { deviceId, controlId: control.id, state });\n\n // eslint-disable-next-line react/no-unused-class-component-methods\n this.controlStateHandler = (deviceId, control) => () =>\n this.sendControlToInstance('dm:deviceControlState', { deviceId, controlId: control.id });\n\n if (this.props.registerHandler) {\n this.props.registerHandler(() => this.loadData());\n }\n }\n\n componentWillUnmount(): void {\n if (this.responseTimeout) {\n clearTimeout(this.responseTimeout);\n this.responseTimeout = null;\n }\n }\n\n // eslint-disable-next-line class-methods-use-this\n loadData(): void {\n console.error('loadData not implemented');\n }\n\n sendActionToInstance = (command: `dm:${string}`, messageToSend: Message, refresh?: () => void): void => {\n const send = async (): Promise<void> => {\n this.setState({ showSpinner: true });\n this.responseTimeout = setTimeout(() => {\n this.setState({ showSpinner: false });\n window.alert(I18n.t('ra_No response from the backend'));\n }, messageToSend.timeout || 5000);\n\n const response: DmActionResponse = await this.props.socket.sendTo(\n this.props.selectedInstance,\n command,\n messageToSend,\n );\n\n if (this.responseTimeout) {\n clearTimeout(this.responseTimeout);\n this.responseTimeout = null;\n }\n\n const type: string = response.type;\n console.log(`Response: ${response.type}`);\n switch (type) {\n case 'message':\n console.log(`Message received: ${response.message}`);\n if (response.message) {\n this.setState({\n message: {\n message: response.message,\n handleClose: () =>\n this.setState({ message: null }, () =>\n this.sendActionToInstance(\n 'dm:actionProgress',\n { origin: response.origin },\n refresh,\n ),\n ),\n },\n showSpinner: false,\n });\n }\n break;\n\n case 'confirm':\n console.log(`Confirm received: ${response.confirm}`);\n if (response.confirm) {\n this.setState({\n confirm: {\n message: response.confirm,\n handleClose: (confirm?: boolean) =>\n this.setState({ confirm: null }, () =>\n this.sendActionToInstance(\n 'dm:actionProgress',\n {\n origin: response.origin,\n confirm,\n },\n refresh,\n ),\n ),\n },\n showSpinner: false,\n });\n }\n break;\n\n case 'form':\n console.log('Form received');\n if (response.form) {\n const data: Record<string, any> | undefined = response.form.data;\n const originalData: Record<string, any> = {};\n if (data) {\n Object.keys(data).forEach(key => {\n if (data[key] !== undefined) {\n originalData[key] = data[key];\n }\n });\n }\n response.form.data = JSON.parse(JSON.stringify(originalData)) as Record<string, any>;\n\n this.setState({\n form: {\n ...response.form,\n changed: false,\n originalData: JSON.stringify(originalData),\n handleClose: (data: any) =>\n this.setState({ form: null }, () => {\n console.log(`Form ${JSON.stringify(data)}`);\n this.sendActionToInstance(\n 'dm:actionProgress',\n {\n origin: response.origin,\n data,\n },\n refresh,\n );\n }),\n },\n showSpinner: false,\n });\n }\n break;\n\n case 'progress':\n if (response.progress) {\n if (this.state.progress) {\n const progress = { ...this.state.progress, ...response.progress };\n this.setState({ progress, showSpinner: false });\n } else {\n this.setState({ progress: response.progress, showSpinner: false });\n }\n }\n this.sendActionToInstance('dm:actionProgress', { origin: response.origin }, refresh);\n break;\n\n case 'result':\n console.log('Response content', response.result);\n if (response.result.refresh) {\n if (response.result.refresh === true) {\n console.log('Refreshing all');\n this.loadData();\n } else if (response.result.refresh === 'instance') {\n console.log(`Refreshing instance infos: ${this.props.selectedInstance}`);\n } else if (response.result.refresh === 'device') {\n if (!refresh) {\n console.log('No refresh function provided to refresh \"device\"');\n } else {\n console.log(`Refreshing device infos: ${this.props.selectedInstance}`);\n refresh();\n }\n } else {\n console.log('Not refreshing anything');\n }\n }\n if (response.result.error) {\n console.error(`Error: ${response.result.error.message}`);\n this.setState({ showToast: response.result.error.message, showSpinner: false });\n } else {\n this.setState({ showSpinner: false });\n }\n break;\n\n default:\n console.log(`Unknown response type: ${type}`);\n this.setState({ showSpinner: false });\n break;\n }\n };\n\n void send().catch(console.error);\n };\n\n sendControlToInstance = async (\n command: string,\n messageToSend: { deviceId: string; controlId: string; state?: ControlState },\n ): Promise<null | ioBroker.State> => {\n const response: DmControlResponse = await this.props.socket.sendTo(\n this.props.selectedInstance,\n command,\n messageToSend,\n );\n const type = response.type;\n console.log(`Response: ${response.type}`);\n if (response.type === 'result') {\n console.log('Response content', response.result);\n if (response.result.error) {\n console.error(`Error: ${response.result.error.message}`);\n this.setState({ showToast: response.result.error.message });\n } else if (response.result.state !== undefined) {\n return response.result.state;\n }\n } else {\n console.warn('Unexpected response type', type);\n }\n\n return null;\n };\n\n // eslint-disable-next-line react/no-unused-class-component-methods\n loadDevices(): Promise<DeviceInfo[]> {\n return this.props.socket.sendTo(this.props.selectedInstance, 'dm:listDevices');\n }\n\n // eslint-disable-next-line react/no-unused-class-component-methods\n loadInstanceInfos(): Promise<InstanceDetails> {\n return this.props.socket.sendTo(this.props.selectedInstance, 'dm:instanceInfo');\n }\n\n renderMessageDialog(): React.JSX.Element | null {\n if (!this.state.message) {\n return null;\n }\n\n return (\n <Dialog\n open={!0}\n onClose={() => this.state.message?.handleClose()}\n hideBackdrop\n aria-describedby=\"message-dialog-description\"\n >\n <DialogContent>\n <DialogContentText id=\"message-dialog-description\">{this.state.message?.message}</DialogContentText>\n </DialogContent>\n <DialogActions>\n <Button\n color=\"primary\"\n onClick={() => this.state.message?.handleClose()}\n variant=\"contained\"\n autoFocus\n >\n {getTranslation('okButtonText')}\n </Button>\n </DialogActions>\n </Dialog>\n );\n }\n\n renderConfirmDialog(): React.JSX.Element | null {\n if (!this.state.confirm) {\n return null;\n }\n\n return (\n <Dialog\n open={!0}\n onClose={() => this.state.confirm?.handleClose()}\n hideBackdrop\n aria-describedby=\"confirm-dialog-description\"\n >\n <DialogContent>\n <DialogContentText id=\"confirm-dialog-description\">\n {getTranslation(this.state.confirm?.message)}\n </DialogContentText>\n </DialogContent>\n <DialogActions>\n <Button\n variant=\"contained\"\n color=\"primary\"\n onClick={() => this.state.confirm?.handleClose(true)}\n autoFocus\n >\n {getTranslation('yesButtonText')}\n </Button>\n <Button\n variant=\"contained\"\n color=\"grey\"\n onClick={() => this.state.confirm?.handleClose(false)}\n autoFocus\n >\n {getTranslation('noButtonText')}\n </Button>\n </DialogActions>\n </Dialog>\n );\n }\n\n renderSnackbar(): React.JSX.Element {\n return (\n <Snackbar\n open={!!this.state.showToast}\n autoHideDuration={6_000}\n onClose={() => this.setState({ showToast: null })}\n message={this.state.showToast}\n />\n );\n }\n\n getOkButton(button?: ActionButton | 'apply' | 'cancel' | 'close'): React.JSX.Element {\n if (typeof button === 'string') {\n button = undefined;\n }\n return (\n <Button\n key=\"apply\"\n disabled={!this.state.form?.changed}\n variant={button?.variant || 'contained'}\n color={\n button?.color === 'primary' ? 'primary' : button?.color === 'secondary' ? 'secondary' : 'primary'\n }\n style={{\n backgroundColor:\n button?.color && button?.color !== 'primary' && button?.color !== 'secondary'\n ? button?.color\n : undefined,\n ...(button?.style || undefined),\n }}\n onClick={() => this.state.form?.handleClose && this.state.form.handleClose(this.state.form?.data)}\n startIcon={button?.icon ? <Icon src={button?.icon} /> : undefined}\n >\n {getTranslation(button?.label || 'okButtonText', button?.noTranslation)}\n </Button>\n );\n }\n\n getCancelButton(button?: ActionButton | 'apply' | 'cancel' | 'close'): React.JSX.Element {\n let isClose = false;\n if (typeof button === 'string') {\n isClose = button === 'close';\n button = undefined;\n }\n return (\n <Button\n key=\"cancel\"\n variant={button?.variant || 'contained'}\n color={button?.color === 'primary' ? 'primary' : button?.color === 'secondary' ? 'secondary' : 'grey'}\n style={{\n backgroundColor:\n button?.color && button?.color !== 'primary' && button?.color !== 'secondary'\n ? button?.color\n : undefined,\n ...(button?.style || undefined),\n }}\n onClick={() => this.state.form?.handleClose && this.state.form.handleClose()}\n startIcon={isClose ? <Close /> : button?.icon ? <Icon src={button?.icon} /> : undefined}\n >\n {getTranslation(button?.label || 'cancelButtonText', button?.noTranslation)}\n </Button>\n );\n }\n\n renderFormDialog(): React.JSX.Element | null {\n if (!this.state.form || !this.state.form.schema) {\n return null;\n }\n let buttons: React.JSX.Element[];\n if (this.state.form.buttons) {\n buttons = [];\n this.state.form.buttons.forEach((button: ActionButton | 'apply' | 'cancel' | 'close'): void => {\n if (typeof button === 'object' && button.type === 'copyToClipboard') {\n buttons.push(\n <Button\n key=\"copyToClipboard\"\n variant={button.variant || 'outlined'}\n color={\n button.color === 'primary'\n ? 'primary'\n : button.color === 'secondary'\n ? 'secondary'\n : undefined\n }\n style={{\n backgroundColor:\n button.color && button.color !== 'primary' && button.color !== 'secondary'\n ? button.color\n : undefined,\n ...(button.style || undefined),\n }}\n onClick={() => {\n if (button.copyToClipboardAttr && this.state.form!.data) {\n const val = this.state.form!.data[button.copyToClipboardAttr];\n if (typeof val === 'string') {\n Utils.copyToClipboard(val);\n } else {\n Utils.copyToClipboard(JSON.stringify(val, null, 2));\n }\n window.alert(I18n.t('copied'));\n } else if (this.state.form?.data) {\n Utils.copyToClipboard(JSON.stringify(this.state.form.data, null, 2));\n window.alert(I18n.t('copied'));\n } else {\n window.alert(I18n.t('nothingToCopy'));\n }\n }}\n startIcon={button?.icon ? <Icon src={button?.icon} /> : <ContentCopy />}\n >\n {getTranslation(button?.label || 'ctcButtonText', button?.noTranslation)}\n </Button>,\n );\n } else if (button === 'apply' || (button as ActionButton).type === 'apply') {\n buttons.push(this.getOkButton(button));\n } else {\n buttons.push(this.getCancelButton(button));\n }\n });\n } else {\n buttons = [this.getOkButton(), this.getCancelButton()];\n }\n\n return (\n <Dialog\n open={!0}\n onClose={() => this.state.form!.handleClose && this.state.form!.handleClose()}\n hideBackdrop\n fullWidth\n sx={{\n '& .MuiDialog-paper': {\n minWidth: this.state.form.minWidth || undefined,\n },\n }}\n maxWidth={this.state.form.maxWidth || 'md'}\n >\n {this.state.form?.title ? (\n <DialogTitle>\n {getTranslation(\n this.state.form?.label || this.state.form?.title,\n this.state.form.noTranslation,\n )}\n </DialogTitle>\n ) : null}\n <DialogContent>\n <JsonConfig\n instanceId={this.props.selectedInstance}\n schema={this.state.form.schema as ConfigItemPanel | ConfigItemTabs}\n data={this.state.form.data || {}}\n socket={this.props.socket as AdminConnection}\n onChange={(data: Record<string, any>) => {\n console.log('handleFormChange', { data });\n const form: CommunicationFormInState = {\n ...(this.state.form as CommunicationFormInState),\n };\n if (form) {\n form.data = data;\n form.changed = JSON.stringify(data) !== form.originalData;\n this.setState({ form });\n }\n }}\n themeName={this.props.themeName}\n themeType={this.props.themeType}\n theme={this.props.theme}\n isFloatComma={this.props.isFloatComma}\n dateFormat={this.props.dateFormat}\n />\n </DialogContent>\n <DialogActions>{buttons}</DialogActions>\n </Dialog>\n );\n }\n\n renderProgressDialog(): React.JSX.Element | null {\n if (!this.state.progress?.open) {\n return null;\n }\n\n return (\n <Dialog\n open={!0}\n onClose={() => {}}\n hideBackdrop\n >\n <LinearProgress\n variant=\"determinate\"\n value={this.state.progress?.progress || 0}\n />\n </Dialog>\n );\n }\n\n // eslint-disable-next-line class-methods-use-this\n renderContent(): React.JSX.Element | React.JSX.Element[] | null {\n return null;\n }\n\n renderSpinner(): React.JSX.Element | null {\n if (!this.state.showSpinner) {\n return null;\n }\n return (\n <Backdrop\n style={{ zIndex: 1000 }}\n open={!0}\n >\n <CircularProgress />\n </Backdrop>\n );\n }\n\n renderConfirmationDialog(): React.JSX.Element | null {\n if (!this.state.showConfirmation) {\n return null;\n }\n return (\n <Dialog\n open={!0}\n onClose={() => this.setState({ showConfirmation: null })}\n >\n <DialogTitle>\n {getTranslation(\n this.state.showConfirmation.confirmation === true\n ? getTranslation('areYouSureText')\n : getTranslation(this.state.showConfirmation.confirmation as ioBroker.StringOrTranslated),\n )}\n </DialogTitle>\n <DialogActions>\n <Button\n variant=\"contained\"\n color=\"primary\"\n onClick={() => {\n if (!this.state.showConfirmation) {\n return;\n }\n\n const showConfirmation = this.state.showConfirmation;\n this.setState({ showConfirmation: null }, () => {\n if (showConfirmation.deviceId) {\n this.sendActionToInstance(\n 'dm:deviceAction',\n {\n actionId: showConfirmation.id,\n deviceId: showConfirmation.deviceId,\n timeout: showConfirmation.timeout,\n },\n showConfirmation.refresh,\n );\n } else {\n this.sendActionToInstance('dm:instanceAction', {\n actionId: showConfirmation.id,\n timeout: showConfirmation.timeout,\n });\n }\n });\n }}\n autoFocus\n startIcon={<Check />}\n >\n {getTranslation('yesButtonText')}\n </Button>\n <Button\n variant=\"contained\"\n color=\"grey\"\n onClick={() => this.setState({ showConfirmation: null })}\n startIcon={<Close />}\n >\n {getTranslation('cancelButtonText')}\n </Button>\n </DialogActions>\n </Dialog>\n );\n }\n\n onShowInputOk(): void {\n if (!this.state.showInput) {\n return;\n }\n\n const showInput = this.state.showInput;\n this.setState({ showInput: null }, () => {\n if (showInput.deviceId) {\n this.sendActionToInstance(\n 'dm:deviceAction',\n {\n actionId: showInput.id,\n deviceId: showInput.deviceId,\n timeout: showInput.timeout,\n value:\n showInput.inputBefore?.type === 'checkbox'\n ? !!this.state.inputValue\n : showInput.inputBefore?.type === 'number'\n ? parseFloat(this.state.inputValue as string) || 0\n : this.state.inputValue,\n },\n showInput.refresh,\n );\n } else {\n this.sendActionToInstance('dm:instanceAction', {\n actionId: showInput.id,\n timeout: showInput.timeout,\n value:\n showInput.inputBefore?.type === 'checkbox'\n ? !!this.state.inputValue\n : showInput.inputBefore?.type === 'number'\n ? parseFloat(this.state.inputValue as string) || 0\n : this.state.inputValue,\n });\n }\n });\n }\n\n renderInputDialog(): React.JSX.Element | null {\n if (!this.state.showInput || !this.state.showInput.inputBefore) {\n return null;\n }\n let okDisabled = false;\n if (!this.state.showInput.inputBefore.allowEmptyValue && this.state.showInput.inputBefore.type !== 'checkbox') {\n if (\n this.state.showInput.inputBefore.type === 'number' ||\n this.state.showInput.inputBefore.type === 'slider'\n ) {\n okDisabled =\n this.state.inputValue === '' ||\n this.state.inputValue === null ||\n !window.isFinite(this.state.inputValue as number);\n } else {\n okDisabled = !this.state.inputValue;\n }\n }\n\n return (\n <Dialog\n open={!0}\n onClose={() => this.setState({ showInput: null })}\n >\n <DialogTitle>{getTranslation('pleaseEnterValueText')}</DialogTitle>\n <DialogContent>\n {this.state.showInput.inputBefore.type === 'text' ||\n this.state.showInput.inputBefore.type === 'number' ||\n !this.state.showInput.inputBefore.type ? (\n <TextField\n autoFocus\n margin=\"dense\"\n label={getTranslation(this.state.showInput.inputBefore.label)}\n slotProps={{\n htmlInput:\n this.state.showInput.inputBefore.type === 'number'\n ? {\n min: this.state.showInput.inputBefore.min,\n max: this.state.showInput.inputBefore.max,\n step: this.state.showInput.inputBefore.step,\n }\n : undefined,\n input: {\n endAdornment: this.state.inputValue ? (\n <InputAdornment position=\"end\">\n <IconButton\n tabIndex={-1}\n size=\"small\"\n onClick={() => this.setState({ inputValue: '' })}\n >\n <Close />\n </IconButton>\n </InputAdornment>\n ) : null,\n },\n }}\n type={this.state.showInput.inputBefore.type === 'number' ? 'number' : 'text'}\n fullWidth\n value={this.state.inputValue}\n onChange={e => this.setState({ inputValue: e.target.value })}\n onKeyUp={(e: React.KeyboardEvent) => {\n if (e.key === 'Enter') {\n this.onShowInputOk();\n }\n }}\n />\n ) : null}\n {this.state.showInput.inputBefore.type === 'checkbox' ? (\n <FormControlLabel\n control={\n <Checkbox\n checked={!!this.state.inputValue}\n autoFocus\n onChange={e => this.setState({ inputValue: e.target.checked })}\n />\n }\n label={getTranslation(this.state.showInput.inputBefore.label)}\n />\n ) : null}\n {this.state.showInput.inputBefore.type === 'select' ? (\n <FormControl fullWidth>\n <InputLabel>{getTranslation(this.state.showInput.inputBefore.label)}</InputLabel>\n <Select\n variant=\"standard\"\n value={this.state.inputValue}\n onChange={e => this.setState({ inputValue: e.target.value })}\n >\n {this.state.showInput.inputBefore.options?.map(item => (\n <MenuItem\n key={item.value}\n value={item.value}\n >\n {getTranslation(item.label)}\n </MenuItem>\n ))}\n </Select>\n </FormControl>\n ) : null}\n {this.state.showInput.inputBefore.type === 'slider' ? (\n <Box sx={{ width: '100%' }}>\n <Typography gutterBottom>\n {getTranslation(this.state.showInput.inputBefore.label)}\n </Typography>\n <Grid2\n container\n spacing={2}\n alignItems=\"center\"\n >\n <Grid2>\n <Slider\n value={typeof this.state.inputValue === 'number' ? this.state.inputValue : 0}\n onChange={(_event: Event, newValue: number) =>\n this.setState({ inputValue: newValue })\n }\n />\n </Grid2>\n <Grid2>\n <Input\n value={this.state.inputValue}\n size=\"small\"\n onChange={e =>\n this.setState({\n inputValue: e.target.value === '' ? 0 : Number(e.target.value),\n })\n }\n onBlur={() => {\n if (!this.state.showInput) {\n return;\n }\n\n const min =\n this.state.showInput.inputBefore?.min === undefined\n ? 0\n : this.state.showInput.inputBefore.min;\n const max =\n this.state.showInput.inputBefore?.max === undefined\n ? 100\n : this.state.showInput.inputBefore.max;\n\n if ((this.state.inputValue as number) < min) {\n this.setState({ inputValue: min });\n } else if ((this.state.inputValue as number) > max) {\n this.setState({ inputValue: max });\n }\n }}\n inputProps={{\n step: this.state.showInput.inputBefore.step,\n min:\n this.state.showInput.inputBefore.min === undefined\n ? 0\n : this.state.showInput.inputBefore.min,\n max:\n this.state.showInput.inputBefore.max === undefined\n ? 100\n : this.state.showInput.inputBefore.max,\n type: 'number',\n }}\n />\n </Grid2>\n </Grid2>\n </Box>\n ) : null}\n </DialogContent>\n <DialogActions>\n <Button\n variant=\"contained\"\n disabled={okDisabled}\n color=\"primary\"\n onClick={() => this.onShowInputOk()}\n startIcon={<Check />}\n >\n {getTranslation('yesButtonText')}\n </Button>\n <Button\n variant=\"contained\"\n color=\"grey\"\n onClick={() => this.setState({ showInput: null })}\n startIcon={<Close />}\n >\n {getTranslation('cancelButtonText')}\n </Button>\n </DialogActions>\n </Dialog>\n );\n }\n\n render(): React.JSX.Element {\n return (\n <>\n {this.renderSnackbar()}\n {this.renderContent()}\n {this.renderConfirmDialog()}\n {this.renderMessageDialog()}\n {this.renderFormDialog()}\n {this.renderProgressDialog()}\n {this.renderConfirmationDialog()}\n {this.renderInputDialog()}\n {this.renderSpinner()}\n </>\n );\n }\n}\n\nexport default Communication;\n"]}
1
+ {"version":3,"file":"Communication.js","sourceRoot":"./src/","sources":["Communication.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EACH,QAAQ,EACR,GAAG,EACH,MAAM,EACN,QAAQ,EACR,gBAAgB,EAChB,MAAM,EACN,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,KAAK,EACL,UAAU,EACV,KAAK,EACL,cAAc,EACd,UAAU,EACV,cAAc,EACd,QAAQ,EACR,MAAM,EACN,MAAM,EACN,QAAQ,EACR,SAAS,EACT,UAAU,GACb,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEhE,OAAO,EAMH,IAAI,EACJ,IAAI,EACJ,KAAK,GACR,MAAM,4BAA4B,CAAC;AAapC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,UAAU,MAAM,cAAc,CAAC;AAkHtC;;GAEG;AACH,MAAM,aAA0E,SAAQ,SAAe;IAC3F,eAAe,GAAyC,IAAI,CAAC;IAErE,mEAAmE;IACnE,eAAe,CAAqC;IAEpD,mEAAmE;IACnE,aAAa,CAA4E;IAEzF,mEAAmE;IACnE,cAAc,CAI4B;IAE1C,mEAAmE;IACnE,mBAAmB,CAAmF;IAEtG,YAAY,KAAQ;QAChB,KAAK,CAAC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ACK,IAAI,CAAC,cAAc,EAAE;YACrB,IAAI,CAAC,aAAa,EAAE;YACpB,IAAI,CAAC,mBAAmB,EAAE;YAC1B,IAAI,CAAC,mBAAmB,EAAE;YAC1B,IAAI,CAAC,gBAAgB,EAAE;YACvB,IAAI,CAAC,oBAAoB,EAAE;YAC3B,IAAI,CAAC,wBAAwB,EAAE;YAC/B,IAAI,CAAC,iBAAiB,EAAE;YACxB,IAAI,CAAC,aAAa,EAAE,CACtB,CACN,CAAC;IACN,CAAC;CACJ;AAED,eAAe,aAAa,CAAC","sourcesContent":["import React, { Component } from 'react';\n\nimport {\n Backdrop,\n Box,\n Button,\n Checkbox,\n CircularProgress,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n FormControl,\n FormControlLabel,\n Grid2,\n IconButton,\n Input,\n InputAdornment,\n InputLabel,\n LinearProgress,\n MenuItem,\n Select,\n Slider,\n Snackbar,\n TextField,\n Typography,\n} from '@mui/material';\n\nimport { Close, Check, ContentCopy } from '@mui/icons-material';\n\nimport {\n type Connection,\n type AdminConnection,\n type ThemeName,\n type ThemeType,\n type IobTheme,\n I18n,\n Icon,\n Utils,\n} from '@iobroker/adapter-react-v5';\nimport type {\n ActionBase,\n ControlBase,\n ControlState,\n DeviceInfo,\n DeviceRefresh,\n InstanceDetails,\n JsonFormSchema,\n ActionButton,\n} from '@iobroker/dm-utils';\nimport type { ConfigItemPanel, ConfigItemTabs } from '@iobroker/json-config';\n\nimport { getTranslation } from './Utils';\nimport JsonConfig from './JsonConfig';\n\ndeclare module '@mui/material/Button' {\n interface ButtonPropsColorOverrides {\n grey: true;\n }\n}\n\nexport type CommunicationProps = {\n /** Socket connection */\n socket: Connection;\n /** Instance to communicate with device-manager backend, like `adapterName.X` */\n selectedInstance: string; // adapterName.X\n registerHandler?: (handler: null | ((command: string) => void)) => void;\n themeName: ThemeName;\n themeType: ThemeType;\n theme: IobTheme;\n isFloatComma: boolean;\n dateFormat: string;\n};\n\ninterface CommunicationForm {\n title?: ioBroker.StringOrTranslated | null | undefined;\n label?: ioBroker.StringOrTranslated | null | undefined; // same as title\n noTranslation?: boolean; // Do not translate title/label\n schema: JsonFormSchema;\n data?: Record<string, any>;\n buttons?: (ActionButton | 'apply' | 'cancel' | 'close')[];\n maxWidth?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n /** Minimal width of the dialog */\n minWidth?: number;\n}\n\ninterface CommunicationFormInState extends CommunicationForm {\n handleClose?: (data?: Record<string, any>) => void;\n originalData: string;\n changed: boolean;\n}\n\ninterface InputAction extends ActionBase {\n /** If it is a device action */\n deviceId?: string;\n /** Optional refresh function to execute */\n refresh?: () => void;\n}\n\nexport type CommunicationState = {\n showSpinner: boolean;\n showToast: string | null;\n message: {\n message: string;\n handleClose: () => void;\n } | null;\n confirm: {\n message: string;\n handleClose: (confirmation?: boolean) => void;\n } | null;\n form: CommunicationFormInState | null;\n progress: {\n open: boolean;\n progress: number;\n } | null;\n showConfirmation: InputAction | null;\n showInput: InputAction | null;\n inputValue: string | boolean | number | null;\n};\n\ninterface DmResponse {\n /* Type of message */\n type: 'message' | 'confirm' | 'progress' | 'result' | 'form';\n /* Origin */\n origin: string;\n}\n\ninterface DmControlResponse extends DmResponse {\n result: {\n error?: {\n code: number;\n message: string;\n };\n state?: ioBroker.State;\n deviceId: string;\n controlId: string;\n };\n}\n\ninterface Message {\n actionId?: string;\n deviceId?: string;\n value?: unknown;\n origin?: string;\n confirm?: boolean;\n data?: any;\n /** Inform backend, how long the frontend will wait for an answer */\n timeout?: number;\n}\n\ninterface DmActionResponse extends DmResponse {\n result: {\n refresh?: DeviceRefresh;\n error?: {\n code: number;\n message: string;\n };\n };\n message?: string;\n confirm?: string;\n form?: CommunicationForm;\n progress?: {\n open: boolean;\n progress: number;\n };\n}\n\n/**\n * Device List Component\n */\nclass Communication<P extends CommunicationProps, S extends CommunicationState> extends Component<P, S> {\n private responseTimeout: ReturnType<typeof setTimeout> | null = null;\n\n // eslint-disable-next-line react/no-unused-class-component-methods\n instanceHandler: (action: ActionBase) => () => void;\n\n // eslint-disable-next-line react/no-unused-class-component-methods\n deviceHandler: (deviceId: string, action: ActionBase, refresh: () => void) => () => void;\n\n // eslint-disable-next-line react/no-unused-class-component-methods\n controlHandler: (\n deviceId: string,\n control: ControlBase,\n state: ControlState,\n ) => () => Promise<ioBroker.State | null>;\n\n // eslint-disable-next-line react/no-unused-class-component-methods\n controlStateHandler: (deviceId: string, control: ControlBase) => () => Promise<ioBroker.State | null>;\n\n constructor(props: P) {\n super(props);\n\n this.state = {\n showSpinner: false,\n showToast: null,\n message: null,\n confirm: null,\n form: null,\n progress: null,\n showConfirmation: null,\n showInput: null,\n inputValue: null,\n } as S;\n\n // eslint-disable-next-line react/no-unused-class-component-methods\n this.instanceHandler = action => () => {\n if (action.confirmation) {\n this.setState({ showConfirmation: action });\n return;\n }\n if (action.inputBefore) {\n this.setState({ showInput: action });\n return;\n }\n\n this.sendActionToInstance('dm:instanceAction', { actionId: action.id, timeout: action.timeout });\n };\n\n // eslint-disable-next-line react/no-unused-class-component-methods\n this.deviceHandler = (deviceId, action, refresh) => () => {\n if (action.confirmation) {\n this.setState({ showConfirmation: { ...action, deviceId, refresh } });\n return;\n }\n if (action.inputBefore) {\n this.setState({\n showInput: { ...action, deviceId, refresh },\n inputValue: action.inputBefore.defaultValue || '',\n });\n return;\n }\n\n this.sendActionToInstance(\n 'dm:deviceAction',\n { deviceId, actionId: action.id, timeout: action.timeout },\n refresh,\n );\n };\n\n // eslint-disable-next-line react/no-unused-class-component-methods\n this.controlHandler = (deviceId, control, state) => () =>\n this.sendControlToInstance('dm:deviceControl', { deviceId, controlId: control.id, state });\n\n // eslint-disable-next-line react/no-unused-class-component-methods\n this.controlStateHandler = (deviceId, control) => () =>\n this.sendControlToInstance('dm:deviceControlState', { deviceId, controlId: control.id });\n\n if (this.props.registerHandler) {\n this.props.registerHandler(() => this.loadData());\n }\n }\n\n componentWillUnmount(): void {\n if (this.responseTimeout) {\n clearTimeout(this.responseTimeout);\n this.responseTimeout = null;\n }\n }\n\n // eslint-disable-next-line class-methods-use-this\n loadData(): void {\n console.error('loadData not implemented');\n }\n\n sendActionToInstance = (command: `dm:${string}`, messageToSend: Message, refresh?: () => void): void => {\n const send = async (): Promise<void> => {\n this.setState({ showSpinner: true });\n this.responseTimeout = setTimeout(() => {\n this.setState({ showSpinner: false });\n window.alert(I18n.t('ra_No response from the backend'));\n }, messageToSend.timeout || 5000);\n\n const response: DmActionResponse = await this.props.socket.sendTo(\n this.props.selectedInstance,\n command,\n messageToSend,\n );\n\n if (this.responseTimeout) {\n clearTimeout(this.responseTimeout);\n this.responseTimeout = null;\n }\n\n const type: string = response.type;\n console.log(`Response: ${response.type}`);\n switch (type) {\n case 'message':\n console.log(`Message received: ${response.message}`);\n if (response.message) {\n this.setState({\n message: {\n message: response.message,\n handleClose: () =>\n this.setState({ message: null }, () =>\n this.sendActionToInstance(\n 'dm:actionProgress',\n { origin: response.origin },\n refresh,\n ),\n ),\n },\n showSpinner: false,\n });\n }\n break;\n\n case 'confirm':\n console.log(`Confirm received: ${response.confirm}`);\n if (response.confirm) {\n this.setState({\n confirm: {\n message: response.confirm,\n handleClose: (confirm?: boolean) =>\n this.setState({ confirm: null }, () =>\n this.sendActionToInstance(\n 'dm:actionProgress',\n {\n origin: response.origin,\n confirm,\n },\n refresh,\n ),\n ),\n },\n showSpinner: false,\n });\n }\n break;\n\n case 'form':\n console.log('Form received');\n if (response.form) {\n const data: Record<string, any> | undefined = response.form.data;\n const originalData: Record<string, any> = {};\n if (data) {\n Object.keys(data).forEach(key => {\n if (data[key] !== undefined) {\n originalData[key] = data[key];\n }\n });\n }\n response.form.data = JSON.parse(JSON.stringify(originalData)) as Record<string, any>;\n\n this.setState({\n form: {\n ...response.form,\n changed: false,\n originalData: JSON.stringify(originalData),\n handleClose: (data: any) =>\n this.setState({ form: null }, () => {\n console.log(`Form ${JSON.stringify(data)}`);\n this.sendActionToInstance(\n 'dm:actionProgress',\n {\n origin: response.origin,\n data,\n },\n refresh,\n );\n }),\n },\n showSpinner: false,\n });\n }\n break;\n\n case 'progress':\n if (response.progress) {\n if (this.state.progress) {\n const progress = { ...this.state.progress, ...response.progress };\n this.setState({ progress, showSpinner: false });\n } else {\n this.setState({ progress: response.progress, showSpinner: false });\n }\n }\n this.sendActionToInstance('dm:actionProgress', { origin: response.origin }, refresh);\n break;\n\n case 'result':\n console.log('Response content', response.result);\n if (response.result.refresh) {\n if (response.result.refresh === true) {\n console.log('Refreshing all');\n this.loadData();\n } else if (response.result.refresh === 'instance') {\n console.log(`Refreshing instance infos: ${this.props.selectedInstance}`);\n } else if (response.result.refresh === 'device') {\n if (!refresh) {\n console.log('No refresh function provided to refresh \"device\"');\n } else {\n console.log(`Refreshing device infos: ${this.props.selectedInstance}`);\n refresh();\n }\n } else {\n console.log('Not refreshing anything');\n }\n }\n if (response.result.error) {\n console.error(`Error: ${response.result.error.message}`);\n this.setState({ showToast: response.result.error.message, showSpinner: false });\n } else {\n this.setState({ showSpinner: false });\n }\n break;\n\n default:\n console.log(`Unknown response type: ${type}`);\n this.setState({ showSpinner: false });\n break;\n }\n };\n\n void send().catch(console.error);\n };\n\n sendControlToInstance = async (\n command: string,\n messageToSend: { deviceId: string; controlId: string; state?: ControlState },\n ): Promise<null | ioBroker.State> => {\n const response: DmControlResponse = await this.props.socket.sendTo(\n this.props.selectedInstance,\n command,\n messageToSend,\n );\n const type = response.type;\n console.log(`Response: ${response.type}`);\n if (response.type === 'result') {\n console.log('Response content', response.result);\n if (response.result.error) {\n console.error(`Error: ${response.result.error.message}`);\n this.setState({ showToast: response.result.error.message });\n } else if (response.result.state !== undefined) {\n return response.result.state;\n }\n } else {\n console.warn('Unexpected response type', type);\n }\n\n return null;\n };\n\n // eslint-disable-next-line react/no-unused-class-component-methods\n loadDevices(): Promise<DeviceInfo[]> {\n return this.props.socket.sendTo(this.props.selectedInstance, 'dm:listDevices');\n }\n\n // eslint-disable-next-line react/no-unused-class-component-methods\n loadInstanceInfos(): Promise<InstanceDetails> {\n return this.props.socket.sendTo(this.props.selectedInstance, 'dm:instanceInfo');\n }\n\n renderMessageDialog(): React.JSX.Element | null {\n if (!this.state.message) {\n return null;\n }\n\n return (\n <Dialog\n open={!0}\n onClose={() => this.state.message?.handleClose()}\n hideBackdrop\n aria-describedby=\"message-dialog-description\"\n >\n <DialogContent>\n <DialogContentText id=\"message-dialog-description\">{this.state.message?.message}</DialogContentText>\n </DialogContent>\n <DialogActions>\n <Button\n color=\"primary\"\n onClick={() => this.state.message?.handleClose()}\n variant=\"contained\"\n autoFocus\n >\n {getTranslation('okButtonText')}\n </Button>\n </DialogActions>\n </Dialog>\n );\n }\n\n renderConfirmDialog(): React.JSX.Element | null {\n if (!this.state.confirm) {\n return null;\n }\n\n return (\n <Dialog\n open={!0}\n onClose={() => this.state.confirm?.handleClose()}\n hideBackdrop\n aria-describedby=\"confirm-dialog-description\"\n >\n <DialogContent>\n <DialogContentText id=\"confirm-dialog-description\">\n {getTranslation(this.state.confirm?.message)}\n </DialogContentText>\n </DialogContent>\n <DialogActions>\n <Button\n variant=\"contained\"\n color=\"primary\"\n onClick={() => this.state.confirm?.handleClose(true)}\n autoFocus\n >\n {getTranslation('yesButtonText')}\n </Button>\n <Button\n variant=\"contained\"\n color=\"grey\"\n onClick={() => this.state.confirm?.handleClose(false)}\n autoFocus\n >\n {getTranslation('noButtonText')}\n </Button>\n </DialogActions>\n </Dialog>\n );\n }\n\n renderSnackbar(): React.JSX.Element {\n return (\n <Snackbar\n open={!!this.state.showToast}\n autoHideDuration={6_000}\n onClose={() => this.setState({ showToast: null })}\n message={this.state.showToast}\n />\n );\n }\n\n getOkButton(button?: ActionButton | 'apply' | 'cancel' | 'close'): React.JSX.Element {\n if (typeof button === 'string') {\n button = undefined;\n }\n return (\n <Button\n key=\"apply\"\n disabled={!this.state.form?.changed}\n variant={button?.variant || 'contained'}\n color={\n button?.color === 'primary' ? 'primary' : button?.color === 'secondary' ? 'secondary' : 'primary'\n }\n style={{\n backgroundColor:\n button?.color && button?.color !== 'primary' && button?.color !== 'secondary'\n ? button?.color\n : undefined,\n ...(button?.style || undefined),\n }}\n onClick={() => this.state.form?.handleClose && this.state.form.handleClose(this.state.form?.data)}\n startIcon={button?.icon ? <Icon src={button?.icon} /> : undefined}\n >\n {getTranslation(button?.label || 'okButtonText', button?.noTranslation)}\n </Button>\n );\n }\n\n getCancelButton(button?: ActionButton | 'apply' | 'cancel' | 'close'): React.JSX.Element {\n let isClose = false;\n if (typeof button === 'string') {\n isClose = button === 'close';\n button = undefined;\n }\n return (\n <Button\n key=\"cancel\"\n variant={button?.variant || 'contained'}\n color={button?.color === 'primary' ? 'primary' : button?.color === 'secondary' ? 'secondary' : 'grey'}\n style={{\n backgroundColor:\n button?.color && button?.color !== 'primary' && button?.color !== 'secondary'\n ? button?.color\n : undefined,\n ...(button?.style || undefined),\n }}\n onClick={() => this.state.form?.handleClose && this.state.form.handleClose()}\n startIcon={isClose ? <Close /> : button?.icon ? <Icon src={button?.icon} /> : undefined}\n >\n {getTranslation(button?.label || 'cancelButtonText', button?.noTranslation)}\n </Button>\n );\n }\n\n renderFormDialog(): React.JSX.Element | null {\n if (!this.state.form || !this.state.form.schema) {\n return null;\n }\n let buttons: React.JSX.Element[];\n if (this.state.form.buttons) {\n buttons = [];\n this.state.form.buttons.forEach((button: ActionButton | 'apply' | 'cancel' | 'close'): void => {\n if (typeof button === 'object' && button.type === 'copyToClipboard') {\n buttons.push(\n <Button\n key=\"copyToClipboard\"\n variant={button.variant || 'outlined'}\n color={\n button.color === 'primary'\n ? 'primary'\n : button.color === 'secondary'\n ? 'secondary'\n : undefined\n }\n style={{\n backgroundColor:\n button.color && button.color !== 'primary' && button.color !== 'secondary'\n ? button.color\n : undefined,\n ...(button.style || undefined),\n }}\n onClick={() => {\n if (button.copyToClipboardAttr && this.state.form!.data) {\n const val = this.state.form!.data[button.copyToClipboardAttr];\n if (typeof val === 'string') {\n Utils.copyToClipboard(val);\n } else {\n Utils.copyToClipboard(JSON.stringify(val, null, 2));\n }\n window.alert(I18n.t('copied'));\n } else if (this.state.form?.data) {\n Utils.copyToClipboard(JSON.stringify(this.state.form.data, null, 2));\n window.alert(I18n.t('copied'));\n } else {\n window.alert(I18n.t('nothingToCopy'));\n }\n }}\n startIcon={button?.icon ? <Icon src={button?.icon} /> : <ContentCopy />}\n >\n {getTranslation(button?.label || 'ctcButtonText', button?.noTranslation)}\n </Button>,\n );\n } else if (button === 'apply' || (button as ActionButton).type === 'apply') {\n buttons.push(this.getOkButton(button));\n } else {\n buttons.push(this.getCancelButton(button));\n }\n });\n } else {\n buttons = [this.getOkButton(), this.getCancelButton()];\n }\n\n return (\n <Dialog\n open={!0}\n onClose={() => this.state.form!.handleClose && this.state.form!.handleClose()}\n hideBackdrop\n fullWidth\n sx={{\n '& .MuiDialog-paper': {\n minWidth: this.state.form.minWidth || undefined,\n },\n }}\n maxWidth={this.state.form.maxWidth || 'md'}\n >\n {this.state.form?.title ? (\n <DialogTitle>\n {getTranslation(\n this.state.form?.label || this.state.form?.title,\n this.state.form.noTranslation,\n )}\n </DialogTitle>\n ) : null}\n <DialogContent>\n <JsonConfig\n instanceId={this.props.selectedInstance}\n schema={this.state.form.schema as ConfigItemPanel | ConfigItemTabs}\n data={this.state.form.data || {}}\n socket={this.props.socket as AdminConnection}\n onChange={(data: Record<string, any>) => {\n console.log('handleFormChange', { data });\n const form: CommunicationFormInState = {\n ...(this.state.form as CommunicationFormInState),\n };\n if (form) {\n form.data = data;\n form.changed = JSON.stringify(data) !== form.originalData;\n this.setState({ form });\n }\n }}\n themeName={this.props.themeName}\n themeType={this.props.themeType}\n theme={this.props.theme}\n isFloatComma={this.props.isFloatComma}\n dateFormat={this.props.dateFormat}\n />\n </DialogContent>\n <DialogActions>{buttons}</DialogActions>\n </Dialog>\n );\n }\n\n renderProgressDialog(): React.JSX.Element | null {\n if (!this.state.progress?.open) {\n return null;\n }\n\n return (\n <Dialog\n open={!0}\n onClose={() => {}}\n hideBackdrop\n >\n <LinearProgress\n variant=\"determinate\"\n value={this.state.progress?.progress || 0}\n />\n </Dialog>\n );\n }\n\n // eslint-disable-next-line class-methods-use-this\n renderContent(): React.JSX.Element | React.JSX.Element[] | null {\n return null;\n }\n\n renderSpinner(): React.JSX.Element | null {\n if (!this.state.showSpinner) {\n return null;\n }\n return (\n <Backdrop\n style={{ zIndex: 1000 }}\n open={!0}\n >\n <CircularProgress />\n </Backdrop>\n );\n }\n\n renderConfirmationDialog(): React.JSX.Element | null {\n if (!this.state.showConfirmation) {\n return null;\n }\n return (\n <Dialog\n open={!0}\n onClose={() => this.setState({ showConfirmation: null })}\n >\n <DialogTitle>\n {getTranslation(\n this.state.showConfirmation.confirmation === true\n ? getTranslation('areYouSureText')\n : getTranslation(this.state.showConfirmation.confirmation as ioBroker.StringOrTranslated),\n )}\n </DialogTitle>\n <DialogActions>\n <Button\n variant=\"contained\"\n color=\"primary\"\n onClick={() => {\n if (!this.state.showConfirmation) {\n return;\n }\n\n const showConfirmation = this.state.showConfirmation;\n this.setState({ showConfirmation: null }, () => {\n if (showConfirmation.deviceId) {\n this.sendActionToInstance(\n 'dm:deviceAction',\n {\n actionId: showConfirmation.id,\n deviceId: showConfirmation.deviceId,\n timeout: showConfirmation.timeout,\n },\n showConfirmation.refresh,\n );\n } else {\n this.sendActionToInstance('dm:instanceAction', {\n actionId: showConfirmation.id,\n timeout: showConfirmation.timeout,\n });\n }\n });\n }}\n autoFocus\n startIcon={<Check />}\n >\n {getTranslation('yesButtonText')}\n </Button>\n <Button\n variant=\"contained\"\n color=\"grey\"\n onClick={() => this.setState({ showConfirmation: null })}\n startIcon={<Close />}\n >\n {getTranslation('cancelButtonText')}\n </Button>\n </DialogActions>\n </Dialog>\n );\n }\n\n onShowInputOk(): void {\n if (!this.state.showInput) {\n return;\n }\n\n const showInput = this.state.showInput;\n this.setState({ showInput: null }, () => {\n if (showInput.deviceId) {\n this.sendActionToInstance(\n 'dm:deviceAction',\n {\n actionId: showInput.id,\n deviceId: showInput.deviceId,\n timeout: showInput.timeout,\n value:\n showInput.inputBefore?.type === 'checkbox'\n ? !!this.state.inputValue\n : showInput.inputBefore?.type === 'number'\n ? parseFloat(this.state.inputValue as string) || 0\n : this.state.inputValue,\n },\n showInput.refresh,\n );\n } else {\n this.sendActionToInstance('dm:instanceAction', {\n actionId: showInput.id,\n timeout: showInput.timeout,\n value:\n showInput.inputBefore?.type === 'checkbox'\n ? !!this.state.inputValue\n : showInput.inputBefore?.type === 'number'\n ? parseFloat(this.state.inputValue as string) || 0\n : this.state.inputValue,\n });\n }\n });\n }\n\n renderInputDialog(): React.JSX.Element | null {\n if (!this.state.showInput || !this.state.showInput.inputBefore) {\n return null;\n }\n let okDisabled = false;\n if (!this.state.showInput.inputBefore.allowEmptyValue && this.state.showInput.inputBefore.type !== 'checkbox') {\n if (\n this.state.showInput.inputBefore.type === 'number' ||\n this.state.showInput.inputBefore.type === 'slider'\n ) {\n okDisabled =\n this.state.inputValue === '' ||\n this.state.inputValue === null ||\n !window.isFinite(this.state.inputValue as number);\n } else {\n okDisabled = !this.state.inputValue;\n }\n }\n\n return (\n <Dialog\n open={!0}\n onClose={() => this.setState({ showInput: null })}\n >\n <DialogTitle>{getTranslation('pleaseEnterValueText')}</DialogTitle>\n <DialogContent>\n {this.state.showInput.inputBefore.type === 'text' ||\n this.state.showInput.inputBefore.type === 'number' ||\n !this.state.showInput.inputBefore.type ? (\n <TextField\n autoFocus\n margin=\"dense\"\n label={getTranslation(this.state.showInput.inputBefore.label)}\n slotProps={{\n htmlInput:\n this.state.showInput.inputBefore.type === 'number'\n ? {\n min: this.state.showInput.inputBefore.min,\n max: this.state.showInput.inputBefore.max,\n step: this.state.showInput.inputBefore.step,\n }\n : undefined,\n input: {\n endAdornment: this.state.inputValue ? (\n <InputAdornment position=\"end\">\n <IconButton\n tabIndex={-1}\n size=\"small\"\n onClick={() => this.setState({ inputValue: '' })}\n >\n <Close />\n </IconButton>\n </InputAdornment>\n ) : null,\n },\n }}\n type={this.state.showInput.inputBefore.type === 'number' ? 'number' : 'text'}\n fullWidth\n value={this.state.inputValue}\n onChange={e => this.setState({ inputValue: e.target.value })}\n onKeyUp={(e: React.KeyboardEvent) => {\n if (e.key === 'Enter') {\n this.onShowInputOk();\n }\n }}\n />\n ) : null}\n {this.state.showInput.inputBefore.type === 'checkbox' ? (\n <FormControlLabel\n control={\n <Checkbox\n checked={!!this.state.inputValue}\n autoFocus\n onChange={e => this.setState({ inputValue: e.target.checked })}\n />\n }\n label={getTranslation(this.state.showInput.inputBefore.label)}\n />\n ) : null}\n {this.state.showInput.inputBefore.type === 'select' ? (\n <FormControl fullWidth>\n <InputLabel>{getTranslation(this.state.showInput.inputBefore.label)}</InputLabel>\n <Select\n variant=\"standard\"\n value={this.state.inputValue}\n onChange={e => this.setState({ inputValue: e.target.value })}\n >\n {this.state.showInput.inputBefore.options?.map(item => (\n <MenuItem\n key={item.value}\n value={item.value}\n >\n {getTranslation(item.label)}\n </MenuItem>\n ))}\n </Select>\n </FormControl>\n ) : null}\n {this.state.showInput.inputBefore.type === 'slider' ? (\n <Box sx={{ width: '100%' }}>\n <Typography gutterBottom>\n {getTranslation(this.state.showInput.inputBefore.label)}\n </Typography>\n <Grid2\n container\n spacing={2}\n alignItems=\"center\"\n >\n <Grid2>\n <Slider\n value={typeof this.state.inputValue === 'number' ? this.state.inputValue : 0}\n onChange={(_event: Event, newValue: number) =>\n this.setState({ inputValue: newValue })\n }\n />\n </Grid2>\n <Grid2>\n <Input\n value={this.state.inputValue}\n size=\"small\"\n onChange={e =>\n this.setState({\n inputValue: e.target.value === '' ? 0 : Number(e.target.value),\n })\n }\n onBlur={() => {\n if (!this.state.showInput) {\n return;\n }\n\n const min =\n this.state.showInput.inputBefore?.min === undefined\n ? 0\n : this.state.showInput.inputBefore.min;\n const max =\n this.state.showInput.inputBefore?.max === undefined\n ? 100\n : this.state.showInput.inputBefore.max;\n\n if ((this.state.inputValue as number) < min) {\n this.setState({ inputValue: min });\n } else if ((this.state.inputValue as number) > max) {\n this.setState({ inputValue: max });\n }\n }}\n inputProps={{\n step: this.state.showInput.inputBefore.step,\n min:\n this.state.showInput.inputBefore.min === undefined\n ? 0\n : this.state.showInput.inputBefore.min,\n max:\n this.state.showInput.inputBefore.max === undefined\n ? 100\n : this.state.showInput.inputBefore.max,\n type: 'number',\n }}\n />\n </Grid2>\n </Grid2>\n </Box>\n ) : null}\n </DialogContent>\n <DialogActions>\n <Button\n variant=\"contained\"\n disabled={okDisabled}\n color=\"primary\"\n onClick={() => this.onShowInputOk()}\n startIcon={<Check />}\n >\n {getTranslation('yesButtonText')}\n </Button>\n <Button\n variant=\"contained\"\n color=\"grey\"\n onClick={() => this.setState({ showInput: null })}\n startIcon={<Close />}\n >\n {getTranslation('cancelButtonText')}\n </Button>\n </DialogActions>\n </Dialog>\n );\n }\n\n render(): React.JSX.Element {\n return (\n <>\n {this.renderSnackbar()}\n {this.renderContent()}\n {this.renderConfirmDialog()}\n {this.renderMessageDialog()}\n {this.renderFormDialog()}\n {this.renderProgressDialog()}\n {this.renderConfirmationDialog()}\n {this.renderInputDialog()}\n {this.renderSpinner()}\n </>\n );\n }\n}\n\nexport default Communication;\n"]}
@@ -1,5 +1,5 @@
1
1
  import React, { Component, type JSX } from 'react';
2
- import { type Connection, type ThemeName, type ThemeType, type IobTheme } from '@iobroker/gui-components';
2
+ import { type Connection, type ThemeName, type ThemeType, type IobTheme } from '@iobroker/adapter-react-v5';
3
3
  import { type DeviceDetails, type DeviceInfo, type ActionBase, type ControlBase, type ControlState } from '@iobroker/dm-utils';
4
4
  interface DeviceCardProps {
5
5
  title?: string;
@@ -1,7 +1,7 @@
1
1
  import React, { Component } from 'react';
2
2
  import { Button, Typography, Dialog, DialogActions, DialogContent, IconButton, Fab, DialogTitle, Card, CardActions, CardHeader, CardContent, Paper, Box, } from '@mui/material';
3
3
  import { MoreVert as MoreVertIcon, VideogameAsset as ControlIcon, Close as CloseIcon } from '@mui/icons-material';
4
- import { Utils, I18n, DeviceTypeIcon, } from '@iobroker/gui-components';
4
+ import { Utils, I18n, DeviceTypeIcon, } from '@iobroker/adapter-react-v5';
5
5
  import { ACTIONS, } from '@iobroker/dm-utils';
6
6
  import DeviceActionButton from './DeviceActionButton';
7
7
  import DeviceControlComponent from './DeviceControl';