@iobroker/json-config 7.4.0 → 7.4.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigPanel.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEtG,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAEnE,OAAO,EAAiB,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAGlE,OAAO,aAAmE,MAAM,iBAAiB,CAAC;AAClG,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAC1D,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;A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AI,MAAM,CAAC,OAAO,EACxC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAC/B,IAEA,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,QAAQ,CAAC,CAC9B,CACN,CACT,CAAC;SACL;QAED,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE;YACzB,MAAM,IAAI,GAAG,CACT,oBAAC,KAAK,IACF,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,EACnC,IAAI,EAAE;oBACF,EAAE,EAAE,MAAM,CAAC,EAAE,IAAI,SAAS;oBAC1B,EAAE,EAAE,MAAM,CAAC,EAAE,IAAI,SAAS;oBAC1B,EAAE,EAAE,MAAM,CAAC,EAAE,IAAI,SAAS;oBAC1B,EAAE,EAAE,MAAM,CAAC,EAAE,IAAI,SAAS;oBAC1B,EAAE,EAAE,MAAM,CAAC,EAAE,IAAI,SAAS;iBAC7B,EACD,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,EAAE,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,WAAW,EAAE,IAE/E,OAAO,CACJ,CACX,CAAC;YAEF,IAAI,MAAM,CAAC,OAAO,EAAE;gBAChB,OAAO,CACH;oBACI,6BAAK,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,GAAI;oBAC/C,IAAI,CACN,CACN,CAAC;aACL;YACD,OAAO,IAAI,CAAC;SACf;QACD,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ;AAED,eAAe,WAAW,CAAC","sourcesContent":["import React, { type JSX } from 'react';\n\nimport { Grid2, Accordion, AccordionSummary, AccordionDetails, Typography, Box } from '@mui/material';\n\nimport { ExpandMore as ExpandMoreIcon } from '@mui/icons-material';\n\nimport { type IobTheme, Utils } from '@iobroker/adapter-react-v5';\nimport type { ConfigItemPanel } from '#JC/types';\n\nimport ConfigGeneric, { type ConfigGenericState, type ConfigGenericProps } from './ConfigGeneric';\nimport ConfigAccordion from './ConfigAccordion';\nimport ConfigAlive from './ConfigAlive';\nimport ConfigAutocomplete from './ConfigAutocomplete';\nimport ConfigAutocompleteSendTo from './ConfigAutocompleteSendTo';\nimport ConfigCRON from './ConfigCRON';\nimport ConfigCertificateSelect from './ConfigCertificateSelect';\nimport ConfigCertificates from './ConfigCertificates';\nimport ConfigCertCollection from './ConfigCertCollection';\nimport ConfigCheckLicense from './ConfigCheckLicense';\nimport ConfigCheckbox from './ConfigCheckbox';\nimport ConfigChip from './ConfigChip';\nimport ConfigColor from './ConfigColor';\nimport ConfigCoordinates from './ConfigCoordinates';\nimport ConfigCustom from './ConfigCustom';\nimport ConfigDatePicker from './ConfigDatePicker';\nimport ConfigDeviceManager from './ConfigDeviceManager';\nimport ConfigFile from './ConfigFile';\nimport ConfigFileSelector from './ConfigFileSelector';\nimport ConfigFunc from './ConfigFunc';\nimport ConfigIP from './ConfigIP';\nimport ConfigImageSendTo from './ConfigImageSendTo';\nimport ConfigImageUpload from './ConfigImageUpload';\nimport ConfigInstanceSelect from './ConfigInstanceSelect';\nimport ConfigInterface from './ConfigInterface';\nimport ConfigJsonEditor from './ConfigJsonEditor';\nimport ConfigLanguage from './ConfigLanguage';\nimport ConfigLicense from './ConfigLicense';\nimport ConfigNumber from './ConfigNumber';\nimport ConfigObjectId from './ConfigObjectId';\nimport ConfigPassword from './ConfigPassword';\nimport ConfigPattern from './ConfigPattern';\nimport ConfigPort from './ConfigPort';\nimport ConfigRoom from './ConfigRoom';\nimport ConfigSelect from './ConfigSelect';\nimport ConfigSelectSendTo from './ConfigSelectSendTo';\nimport ConfigSendTo from './ConfigSendto';\nimport ConfigSetState from './ConfigSetState';\nimport ConfigSlider from './ConfigSlider';\nimport ConfigState from './ConfigState';\nimport ConfigStaticDivider from './ConfigStaticDivider';\nimport ConfigStaticHeader from './ConfigStaticHeader';\nimport ConfigStaticImage from './ConfigStaticImage';\nimport ConfigStaticInfo from './ConfigStaticInfo';\nimport ConfigStaticText from './ConfigStaticText';\nimport ConfigTable from './ConfigTable';\nimport ConfigText from './ConfigText';\nimport ConfigTextSendTo from './ConfigTextSendTo';\nimport ConfigTimePicker from './ConfigTimePicker';\nimport ConfigTopic from './ConfigTopic';\nimport ConfigUUID from './ConfigUUID';\nimport ConfigUser from './ConfigUser';\nimport ConfigQrCode from './ConfigQrCode';\n\nconst components: Record<string, typeof ConfigGeneric<any, any>> = {\n accordion: ConfigAccordion,\n alive: ConfigAlive,\n autocomplete: ConfigAutocomplete,\n autocompleteSendTo: ConfigAutocompleteSendTo,\n certCollection: ConfigCertCollection,\n certificate: ConfigCertificateSelect,\n certificates: ConfigCertificates,\n checkbox: ConfigCheckbox,\n checkLicense: ConfigCheckLicense,\n chip: ConfigChip, // deprecated. Use \"chips\"\n chips: ConfigChip,\n color: ConfigColor,\n coordinates: ConfigCoordinates,\n cron: ConfigCRON,\n custom: ConfigCustom,\n datePicker: ConfigDatePicker,\n deviceManager: ConfigDeviceManager,\n divider: ConfigStaticDivider,\n file: ConfigFile,\n fileSelector: ConfigFileSelector,\n func: ConfigFunc,\n header: ConfigStaticHeader,\n image: ConfigImageUpload,\n imageSendTo: ConfigImageSendTo,\n instance: ConfigInstanceSelect,\n interface: ConfigInterface,\n ip: ConfigIP,\n jsonEditor: ConfigJsonEditor,\n language: ConfigLanguage,\n license: ConfigLicense,\n number: ConfigNumber,\n objectId: ConfigObjectId,\n password: ConfigPassword,\n pattern: ConfigPattern,\n port: ConfigPort,\n qrCode: ConfigQrCode,\n room: ConfigRoom,\n select: ConfigSelect,\n selectSendTo: ConfigSelectSendTo,\n // @deprecated Use \"sendTo\"\n sendto: ConfigSendTo,\n sendTo: ConfigSendTo,\n setState: ConfigSetState,\n slider: ConfigSlider,\n state: ConfigState,\n staticImage: ConfigStaticImage,\n staticInfo: ConfigStaticInfo,\n staticLink: ConfigStaticText,\n staticText: ConfigStaticText,\n table: ConfigTable,\n text: ConfigText,\n textSendTo: ConfigTextSendTo,\n timePicker: ConfigTimePicker,\n topic: ConfigTopic,\n uuid: ConfigUUID,\n user: ConfigUser,\n};\n\nconst styles: Record<string, any> = {\n fullWidth: {\n width: '100%',\n // height: '100%',\n },\n paper: {\n margin: 1,\n width: 'auto !important',\n overflowY: 'auto',\n paddingBottom: 1,\n },\n paperWithIcons: {\n height: 'calc(100vh - 259px) !important',\n },\n paperWithoutIcons: {\n height: 'calc(100vh - 235px) !important',\n },\n padding: {\n padding: '10px',\n },\n heading: {},\n primary: (theme: IobTheme) => ({\n backgroundColor: theme.palette.primary.main,\n color: theme.palette.mode === 'dark' ? 'inherit' : '#FFF',\n }),\n secondary: (theme: IobTheme) => ({\n backgroundColor: theme.palette.secondary.main,\n }),\n};\n\ninterface ConfigPanelProps extends ConfigGenericProps {\n schema: ConfigItemPanel;\n withIcons?: boolean;\n}\ninterface ConfigPanelState extends ConfigGenericState {\n expanded?: boolean;\n}\n\nclass ConfigPanel extends ConfigGeneric<ConfigPanelProps, ConfigPanelState> {\n componentDidMount(): void {\n super.componentDidMount();\n if (this.props.schema && this.props.schema.collapsable) {\n this.setState({\n expanded:\n (((window as any)._localStorage as Storage) || window.localStorage).getItem(\n `${this.props.adapterName}.${this.props.attr}`,\n ) === 'true',\n });\n }\n }\n\n renderItems(items: Record<string, any>, disabled: boolean): JSX.Element[] | null {\n return items\n ? Object.keys(items).map(attr => {\n if (this.props.multiEdit && items[attr].noMultiEdit) {\n return null;\n }\n\n const type = items[attr].type || 'panel';\n let ItemComponent: typeof ConfigGeneric<any, any>;\n if (type === 'custom') {\n // name\n // url\n if (items[attr].url) {\n ItemComponent = ConfigCustom;\n } else if (this.props.customs && this.props.customs[items[attr].component]) {\n ItemComponent = this.props.customs[items[attr].component];\n } else {\n console.error(`Cannot find custom component: ${items[attr].component}`);\n ItemComponent = ConfigGeneric;\n }\n } else if (type === 'panel') {\n ItemComponent = ConfigPanel;\n } else {\n ItemComponent = components[type] || ConfigGeneric;\n }\n\n return (\n <ItemComponent\n key={`${attr}_${this.props.index === undefined ? '' : this.props.index}`}\n index={this.props.index}\n changed={this.props.changed}\n arrayIndex={this.props.arrayIndex}\n globalData={this.props.globalData}\n onCommandRunning={this.props.onCommandRunning}\n commandRunning={this.props.commandRunning}\n style={styles.panel}\n socket={this.props.socket}\n adapterName={this.props.adapterName}\n instance={this.props.instance}\n common={this.props.common}\n customs={this.props.customs}\n alive={this.props.alive}\n themeType={this.props.themeType}\n themeName={this.props.themeName}\n theme={this.props.theme}\n data={this.props.data}\n originalData={this.props.originalData}\n systemConfig={this.props.systemConfig}\n onError={this.props.onError}\n onChange={this.props.onChange}\n onBackEndCommand={this.props.onBackEndCommand}\n multiEdit={this.props.multiEdit}\n dateFormat={this.props.dateFormat}\n isFloatComma={this.props.isFloatComma}\n disabled={disabled}\n imagePrefix={this.props.imagePrefix}\n changeLanguage={this.props.changeLanguage}\n forceUpdate={this.props.forceUpdate}\n registerOnForceUpdate={this.props.registerOnForceUpdate}\n customObj={this.props.customObj}\n instanceObj={this.props.instanceObj}\n custom={this.props.custom}\n schema={items[attr]}\n DeviceManager={this.props.DeviceManager}\n attr={attr}\n table={this.props.table}\n />\n );\n })\n : null;\n }\n\n render(): JSX.Element | null {\n const schema = this.props.schema;\n\n if (!schema) {\n return null;\n }\n\n const { disabled, hidden } = this.calculate(schema);\n\n const items = this.props.schema.items;\n const schemaStyle = this.props.schema.style || {};\n\n if (hidden) {\n if (schema.hideOnlyControl) {\n const item = (\n <Grid2\n size={{\n xs: schema.xs || undefined,\n sm: schema.sm || undefined,\n md: schema.md || undefined,\n lg: schema.lg || undefined,\n xl: schema.xl || undefined,\n }}\n sx={Utils.getStyle(\n this.props.theme,\n { marginBottom: 0, textAlign: 'left' /* marginRight: 8, */ },\n schemaStyle,\n this.props.themeType === 'dark' && schema.darkStyle,\n )}\n />\n );\n\n if (schema.newLine) {\n return (\n <>\n <div style={{ flexBasis: '100%', height: 0 }} />\n {item}\n </>\n );\n }\n return item;\n }\n return null;\n }\n\n if (this.props.table) {\n return this.renderItems(items, disabled) as any as JSX.Element;\n }\n\n if (this.props.custom) {\n return (\n <Grid2\n key={`${this.props.attr}_${this.props.index}`}\n container\n style={styles.fullWidth}\n columnSpacing={2}\n rowSpacing={1}\n sx={schemaStyle}\n >\n {this.renderItems(items, disabled)}\n </Grid2>\n );\n }\n\n let content;\n if (schema.collapsable) {\n content = (\n <Accordion\n key={`${this.props.attr}_${this.props.index}`}\n style={styles.fullWidth}\n expanded={!!this.state.expanded}\n onChange={() => {\n (((window as any)._localStorage as Storage) || window.localStorage).setItem(\n `${this.props.adapterName}.${this.props.attr}`,\n this.state.expanded ? 'false' : 'true',\n );\n this.setState({ expanded: !this.state.expanded });\n }}\n >\n <AccordionSummary\n expandIcon={<ExpandMoreIcon />}\n sx={Utils.getStyle(\n this.props.theme,\n schemaStyle,\n this.props.themeType && schema.darkStyle,\n schema.color === 'primary'\n ? styles.primary\n : schema.color === 'secondary' && styles.secondary,\n { width: '100%' },\n )}\n >\n <Typography style={styles.heading}>{this.getText(schema.label)}</Typography>\n </AccordionSummary>\n <AccordionDetails>\n <Grid2\n container\n columnSpacing={2}\n rowSpacing={1}\n sx={{ ...schemaStyle, width: '100%', padding: '10px' }}\n >\n {this.renderItems(items, disabled)}\n </Grid2>\n </AccordionDetails>\n </Accordion>\n );\n } else {\n content = (\n <Box\n component=\"div\"\n key={`${this.props.attr}_${this.props.index}`}\n className={this.props.className}\n sx={Utils.getStyle(\n this.props.theme,\n this.props.style,\n schemaStyle,\n { width: '100%' },\n this.props.isParentTab && styles.paper,\n this.props.isParentTab &&\n (this.props.withIcons ? styles.paperWithIcons : styles.paperWithoutIcons),\n )}\n >\n <Grid2\n container\n columnSpacing={2}\n rowSpacing={1}\n sx={Utils.getStyle(\n this.props.theme,\n { width: '100%' },\n this.props.isParentTab && styles.padding,\n this.props.schema.innerStyle,\n )}\n >\n {this.renderItems(items, disabled)}\n </Grid2>\n </Box>\n );\n }\n\n if (!this.props.isParentTab) {\n const item = (\n <Grid2\n title={this.getText(schema.tooltip)}\n size={{\n xs: schema.xs || undefined,\n sm: schema.sm || undefined,\n md: schema.md || undefined,\n lg: schema.lg || undefined,\n xl: schema.xl || undefined,\n }}\n sx={{ marginBottom: 0, /* marginRight: 8, */ textAlign: 'left', ...schemaStyle }}\n >\n {content}\n </Grid2>\n );\n\n if (schema.newLine) {\n return (\n <>\n <div style={{ flexBasis: '100%', height: 0 }} />\n {item}\n </>\n );\n }\n return item;\n }\n return content;\n }\n}\n\nexport default ConfigPanel;\n"]}
1
+ {"version":3,"file":"ConfigPanel.js","sourceRoot":"./src/","sources":["JsonConfigComponent/ConfigPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEtG,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAEnE,OAAO,EAAiB,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAGlE,OAAO,aAAmE,MAAM,iBAAiB,CAAC;AAClG,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAC1D,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,iBAAiB,MAAM,qBA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';\n\nimport { Grid2, Accordion, AccordionSummary, AccordionDetails, Typography, Box } from '@mui/material';\n\nimport { ExpandMore as ExpandMoreIcon } from '@mui/icons-material';\n\nimport { type IobTheme, Utils } from '@iobroker/adapter-react-v5';\nimport type { ConfigItemPanel } from '#JC/types';\n\nimport ConfigGeneric, { type ConfigGenericState, type ConfigGenericProps } from './ConfigGeneric';\nimport ConfigAccordion from './ConfigAccordion';\nimport ConfigAlive from './ConfigAlive';\nimport ConfigAutocomplete from './ConfigAutocomplete';\nimport ConfigAutocompleteSendTo from './ConfigAutocompleteSendTo';\nimport ConfigCRON from './ConfigCRON';\nimport ConfigCertificateSelect from './ConfigCertificateSelect';\nimport ConfigCertificates from './ConfigCertificates';\nimport ConfigCertCollection from './ConfigCertCollection';\nimport ConfigCheckLicense from './ConfigCheckLicense';\nimport ConfigCheckbox from './ConfigCheckbox';\nimport ConfigChip from './ConfigChip';\nimport ConfigColor from './ConfigColor';\nimport ConfigCoordinates from './ConfigCoordinates';\nimport ConfigCustom from './ConfigCustom';\nimport ConfigDatePicker from './ConfigDatePicker';\nimport ConfigDeviceManager from './ConfigDeviceManager';\nimport ConfigFile from './ConfigFile';\nimport ConfigFileSelector from './ConfigFileSelector';\nimport ConfigFunc from './ConfigFunc';\nimport ConfigIP from './ConfigIP';\nimport ConfigImageSendTo from './ConfigImageSendTo';\nimport ConfigImageUpload from './ConfigImageUpload';\nimport ConfigInstanceSelect from './ConfigInstanceSelect';\nimport ConfigInterface from './ConfigInterface';\nimport ConfigJsonEditor from './ConfigJsonEditor';\nimport ConfigLanguage from './ConfigLanguage';\nimport ConfigLicense from './ConfigLicense';\nimport ConfigNumber from './ConfigNumber';\nimport ConfigObjectId from './ConfigObjectId';\nimport ConfigPassword from './ConfigPassword';\nimport ConfigPattern from './ConfigPattern';\nimport ConfigPort from './ConfigPort';\nimport ConfigRoom from './ConfigRoom';\nimport ConfigSelect from './ConfigSelect';\nimport ConfigSelectSendTo from './ConfigSelectSendTo';\nimport ConfigSendTo from './ConfigSendto';\nimport ConfigSetState from './ConfigSetState';\nimport ConfigSlider from './ConfigSlider';\nimport ConfigState from './ConfigState';\nimport ConfigStaticDivider from './ConfigStaticDivider';\nimport ConfigStaticHeader from './ConfigStaticHeader';\nimport ConfigStaticImage from './ConfigStaticImage';\nimport ConfigStaticInfo from './ConfigStaticInfo';\nimport ConfigStaticText from './ConfigStaticText';\nimport ConfigTable from './ConfigTable';\nimport ConfigText from './ConfigText';\nimport ConfigTextSendTo from './ConfigTextSendTo';\nimport ConfigTimePicker from './ConfigTimePicker';\nimport ConfigTopic from './ConfigTopic';\nimport ConfigUUID from './ConfigUUID';\nimport ConfigUser from './ConfigUser';\nimport ConfigQrCode from './ConfigQrCode';\n\nconst components: Record<string, typeof ConfigGeneric<any, any>> = {\n accordion: ConfigAccordion,\n alive: ConfigAlive,\n autocomplete: ConfigAutocomplete,\n autocompleteSendTo: ConfigAutocompleteSendTo,\n certCollection: ConfigCertCollection,\n certificate: ConfigCertificateSelect,\n certificates: ConfigCertificates,\n checkbox: ConfigCheckbox,\n checkLicense: ConfigCheckLicense,\n chip: ConfigChip, // deprecated. Use \"chips\"\n chips: ConfigChip,\n color: ConfigColor,\n coordinates: ConfigCoordinates,\n cron: ConfigCRON,\n custom: ConfigCustom,\n datePicker: ConfigDatePicker,\n deviceManager: ConfigDeviceManager,\n divider: ConfigStaticDivider,\n file: ConfigFile,\n fileSelector: ConfigFileSelector,\n func: ConfigFunc,\n header: ConfigStaticHeader,\n image: ConfigImageUpload,\n imageSendTo: ConfigImageSendTo,\n instance: ConfigInstanceSelect,\n interface: ConfigInterface,\n ip: ConfigIP,\n jsonEditor: ConfigJsonEditor,\n language: ConfigLanguage,\n license: ConfigLicense,\n number: ConfigNumber,\n objectId: ConfigObjectId,\n password: ConfigPassword,\n pattern: ConfigPattern,\n port: ConfigPort,\n qrCode: ConfigQrCode,\n room: ConfigRoom,\n select: ConfigSelect,\n selectSendTo: ConfigSelectSendTo,\n // @deprecated Use \"sendTo\"\n sendto: ConfigSendTo,\n sendTo: ConfigSendTo,\n setState: ConfigSetState,\n slider: ConfigSlider,\n state: ConfigState,\n staticImage: ConfigStaticImage,\n staticInfo: ConfigStaticInfo,\n staticLink: ConfigStaticText,\n staticText: ConfigStaticText,\n table: ConfigTable,\n text: ConfigText,\n textSendTo: ConfigTextSendTo,\n timePicker: ConfigTimePicker,\n topic: ConfigTopic,\n uuid: ConfigUUID,\n user: ConfigUser,\n};\n\nconst styles: Record<string, any> = {\n fullWidth: {\n width: '100%',\n // height: '100%',\n },\n paper: {\n margin: 1,\n width: 'auto !important',\n overflowY: 'auto',\n paddingBottom: 1,\n },\n paperWithIcons: {\n height: 'calc(100vh - 259px) !important',\n },\n paperWithoutIcons: {\n height: 'calc(100vh - 235px) !important',\n },\n padding: {\n padding: '10px',\n },\n heading: {},\n primary: (theme: IobTheme): React.CSSProperties => ({\n backgroundColor: theme.palette.primary.main,\n color: theme.palette.mode === 'dark' ? 'inherit' : '#FFF',\n }),\n secondary: (theme: IobTheme): React.CSSProperties => ({\n backgroundColor: theme.palette.secondary.main,\n }),\n};\n\ninterface ConfigPanelProps extends ConfigGenericProps {\n schema: ConfigItemPanel;\n withIcons?: boolean;\n}\ninterface ConfigPanelState extends ConfigGenericState {\n expanded?: boolean;\n}\n\nclass ConfigPanel extends ConfigGeneric<ConfigPanelProps, ConfigPanelState> {\n componentDidMount(): void {\n super.componentDidMount();\n if (this.props.schema && this.props.schema.collapsable) {\n this.setState({\n expanded:\n (((window as any)._localStorage as Storage) || window.localStorage).getItem(\n `${this.props.adapterName}.${this.props.attr}`,\n ) === 'true',\n });\n }\n }\n\n renderItems(items: Record<string, any>, disabled: boolean): JSX.Element[] | null {\n return items\n ? Object.keys(items).map(attr => {\n if (this.props.multiEdit && items[attr].noMultiEdit) {\n return null;\n }\n\n const type = items[attr].type || 'panel';\n let ItemComponent: typeof ConfigGeneric<any, any>;\n if (type === 'custom') {\n // name\n // url\n if (items[attr].url) {\n ItemComponent = ConfigCustom;\n } else if (this.props.customs && this.props.customs[items[attr].component]) {\n ItemComponent = this.props.customs[items[attr].component];\n } else {\n console.error(`Cannot find custom component: ${items[attr].component}`);\n ItemComponent = ConfigGeneric;\n }\n } else if (type === 'panel') {\n ItemComponent = ConfigPanel;\n } else {\n ItemComponent = components[type] || ConfigGeneric;\n }\n\n return (\n <ItemComponent\n key={`${attr}_${this.props.index === undefined ? '' : this.props.index}`}\n index={this.props.index}\n changed={this.props.changed}\n arrayIndex={this.props.arrayIndex}\n globalData={this.props.globalData}\n onCommandRunning={this.props.onCommandRunning}\n commandRunning={this.props.commandRunning}\n style={styles.panel}\n socket={this.props.socket}\n adapterName={this.props.adapterName}\n instance={this.props.instance}\n common={this.props.common}\n customs={this.props.customs}\n alive={this.props.alive}\n themeType={this.props.themeType}\n themeName={this.props.themeName}\n theme={this.props.theme}\n data={this.props.data}\n originalData={this.props.originalData}\n systemConfig={this.props.systemConfig}\n onError={this.props.onError}\n onChange={this.props.onChange}\n onBackEndCommand={this.props.onBackEndCommand}\n multiEdit={this.props.multiEdit}\n dateFormat={this.props.dateFormat}\n isFloatComma={this.props.isFloatComma}\n disabled={disabled}\n imagePrefix={this.props.imagePrefix}\n changeLanguage={this.props.changeLanguage}\n forceUpdate={this.props.forceUpdate}\n registerOnForceUpdate={this.props.registerOnForceUpdate}\n customObj={this.props.customObj}\n instanceObj={this.props.instanceObj}\n custom={this.props.custom}\n schema={items[attr]}\n DeviceManager={this.props.DeviceManager}\n attr={attr}\n table={this.props.table}\n />\n );\n })\n : null;\n }\n\n render(): JSX.Element | null {\n const schema = this.props.schema;\n\n if (!schema) {\n return null;\n }\n\n const { disabled, hidden } = this.calculate(schema);\n\n const items = this.props.schema.items;\n const schemaStyle = this.props.schema.style || {};\n\n if (hidden) {\n if (schema.hideOnlyControl) {\n const item = (\n <Grid2\n size={{\n xs: schema.xs || undefined,\n sm: schema.sm || undefined,\n md: schema.md || undefined,\n lg: schema.lg || undefined,\n xl: schema.xl || undefined,\n }}\n sx={Utils.getStyle(\n this.props.theme,\n { marginBottom: 0, textAlign: 'left' /* marginRight: 8, */ },\n schemaStyle,\n this.props.themeType === 'dark' && schema.darkStyle,\n )}\n />\n );\n\n if (schema.newLine) {\n return (\n <>\n <div style={{ flexBasis: '100%', height: 0 }} />\n {item}\n </>\n );\n }\n return item;\n }\n return null;\n }\n\n if (this.props.table) {\n return this.renderItems(items, disabled) as any as JSX.Element;\n }\n\n if (this.props.custom) {\n return (\n <Grid2\n key={`${this.props.attr}_${this.props.index}`}\n container\n style={styles.fullWidth}\n columnSpacing={2}\n rowSpacing={1}\n sx={schemaStyle}\n >\n {this.renderItems(items, disabled)}\n </Grid2>\n );\n }\n\n let content;\n if (schema.collapsable) {\n content = (\n <Accordion\n key={`${this.props.attr}_${this.props.index}`}\n style={styles.fullWidth}\n expanded={!!this.state.expanded}\n onChange={() => {\n (((window as any)._localStorage as Storage) || window.localStorage).setItem(\n `${this.props.adapterName}.${this.props.attr}`,\n this.state.expanded ? 'false' : 'true',\n );\n this.setState({ expanded: !this.state.expanded });\n }}\n >\n <AccordionSummary\n expandIcon={<ExpandMoreIcon />}\n sx={Utils.getStyle(\n this.props.theme,\n schemaStyle,\n this.props.themeType && schema.darkStyle,\n schema.color === 'primary'\n ? styles.primary\n : schema.color === 'secondary' && styles.secondary,\n { width: '100%' },\n )}\n >\n <Typography style={styles.heading}>{this.getText(schema.label)}</Typography>\n </AccordionSummary>\n <AccordionDetails>\n <Grid2\n container\n columnSpacing={2}\n rowSpacing={1}\n sx={{ ...schemaStyle, width: '100%', padding: '10px' }}\n >\n {this.renderItems(items, disabled)}\n </Grid2>\n </AccordionDetails>\n </Accordion>\n );\n } else {\n content = (\n <Box\n component=\"div\"\n key={`${this.props.attr}_${this.props.index}`}\n className={this.props.className}\n sx={Utils.getStyle(\n this.props.theme,\n this.props.style,\n schemaStyle,\n { width: '100%' },\n this.props.isParentTab && styles.paper,\n this.props.isParentTab &&\n (this.props.withIcons ? styles.paperWithIcons : styles.paperWithoutIcons),\n )}\n >\n <Grid2\n container\n columnSpacing={2}\n rowSpacing={1}\n sx={Utils.getStyle(\n this.props.theme,\n { width: '100%' },\n this.props.isParentTab && styles.padding,\n this.props.schema.innerStyle,\n )}\n >\n {this.renderItems(items, disabled)}\n </Grid2>\n </Box>\n );\n }\n\n if (!this.props.isParentTab) {\n const item = (\n <Grid2\n title={this.getText(schema.tooltip)}\n size={{\n xs: schema.xs || undefined,\n sm: schema.sm || undefined,\n md: schema.md || undefined,\n lg: schema.lg || undefined,\n xl: schema.xl || undefined,\n }}\n sx={{ marginBottom: 0, /* marginRight: 8, */ textAlign: 'left', ...schemaStyle }}\n >\n {content}\n </Grid2>\n );\n\n if (schema.newLine) {\n return (\n <>\n <div style={{ flexBasis: '100%', height: 0 }} />\n {item}\n </>\n );\n }\n return item;\n }\n return content;\n }\n}\n\nexport default ConfigPanel;\n"]}
@@ -1,8 +1,37 @@
1
1
  import React from 'react';
2
- import { TextField, IconButton, Button, Switch, Slider } from '@mui/material';
3
- import { I18n } from '@iobroker/adapter-react-v5';
2
+ import { TextField, IconButton, Button, Switch, Slider, Box } from '@mui/material';
3
+ import { I18n, Icon } from '@iobroker/adapter-react-v5';
4
4
  import getIconByName from './Icons';
5
5
  import ConfigGeneric from './ConfigGeneric';
6
+ function valueBlinkOnce(theme, color) {
7
+ if (typeof color === 'string') {
8
+ return {
9
+ '@keyframes newStateAnimationOnceColor': {
10
+ '0%': {
11
+ color,
12
+ },
13
+ '100%': {
14
+ color: theme.palette.mode === 'dark' ? '#fff' : '#000',
15
+ },
16
+ },
17
+ animation: 'newStateAnimationOnceColor 2s ease-in-out',
18
+ };
19
+ }
20
+ return {
21
+ '@keyframes newStateAnimationOnce': {
22
+ '0%': {
23
+ color: '#00f900',
24
+ },
25
+ '80%': {
26
+ color: theme.palette.mode === 'dark' ? '#518851' : '#008000',
27
+ },
28
+ '100%': {
29
+ color: theme.palette.mode === 'dark' ? '#fff' : '#000',
30
+ },
31
+ },
32
+ animation: 'newStateAnimationOnce 2s ease-in-out',
33
+ };
34
+ }
6
35
  class ConfigState extends ConfigGeneric {
7
36
  controlTimeout = null;
8
37
  delayedUpdate = {
@@ -10,6 +39,9 @@ class ConfigState extends ConfigGeneric {
10
39
  value: null,
11
40
  };
12
41
  getObjectID() {
42
+ if (this.props.schema.foreign) {
43
+ return this.props.schema.oid;
44
+ }
13
45
  return `${this.props.schema.system ? 'system.adapter.' : ''}${this.props.adapterName}.${this.props.instance}.${this.props.schema.oid}`;
14
46
  }
15
47
  async componentDidMount() {
@@ -105,8 +137,7 @@ class ConfigState extends ConfigGeneric {
105
137
  if (this.props.schema.falseImage) {
106
138
  icon = getIconByName(this.props.schema.falseImage);
107
139
  }
108
- const text = this.getText(this.props.schema.falseText, this.props.schema.noTranslation) ||
109
- this.getText(this.props.schema.label, this.props.schema.noTranslation);
140
+ const text = this.getText(this.props.schema.falseText || this.props.schema.label, this.props.schema.noTranslation);
110
141
  if (!text && icon) {
111
142
  content = (React.createElement(IconButton, { style: this.props.schema.falseTextStyle, disabled: !!this.props.schema.readOnly, onClick: async () => {
112
143
  if (this.props.schema.confirm) {
@@ -142,101 +173,6 @@ class ConfigState extends ConfigGeneric {
142
173
  } }, text || this.getObjectID().split('.').pop()));
143
174
  }
144
175
  }
145
- else if (this.state.controlType === 'switch') {
146
- let iconFalse = null;
147
- const textFalse = this.getText(this.props.schema.falseText, this.props.schema.noTranslation);
148
- if (this.props.schema.falseImage) {
149
- iconFalse = getIconByName(this.props.schema.falseImage, textFalse ? { marginLeft: 8 } : undefined);
150
- }
151
- let iconTrue = null;
152
- const textTrue = this.getText(this.props.schema.trueText, this.props.schema.noTranslation);
153
- if (this.props.schema.trueImage) {
154
- iconTrue = getIconByName(this.props.schema.trueImage, textTrue ? { marginRight: 8 } : undefined);
155
- }
156
- content = (React.createElement(Switch, { checked: !!this.state.stateValue, disabled: !!this.props.schema.readOnly, onChange: async () => {
157
- if (this.props.schema.confirm) {
158
- this.setState({
159
- confirmDialog: true,
160
- confirmCallback: async (result) => {
161
- if (result) {
162
- await this.props.socket.setState(this.getObjectID(), !this.state.stateValue, false);
163
- }
164
- },
165
- });
166
- }
167
- else {
168
- await this.props.socket.setState(this.getObjectID(), !this.state.stateValue, false);
169
- }
170
- } }));
171
- if (textFalse || iconFalse || textTrue || iconTrue) {
172
- content = (React.createElement("div", { style: { display: 'flex', alignItems: 'center', fontSize: 14 } },
173
- React.createElement("span", { style: this.props.schema.falseTextStyle },
174
- textFalse,
175
- iconFalse),
176
- content,
177
- React.createElement("span", { style: this.props.schema.trueTextStyle },
178
- iconTrue,
179
- textTrue)));
180
- }
181
- const label = this.getText(this.props.schema.label, this.props.schema.noTranslation);
182
- if (label) {
183
- content = (React.createElement("div", { style: { display: 'flex', alignItems: 'center', fontSize: '1rem' } },
184
- React.createElement("span", { style: { marginRight: 8 } }, label),
185
- content));
186
- }
187
- }
188
- else if (this.state.controlType === 'slider') {
189
- let iconFalse = null;
190
- const textFalse = this.getText(this.props.schema.falseText, this.props.schema.noTranslation);
191
- if (this.props.schema.falseImage) {
192
- iconFalse = getIconByName(this.props.schema.falseImage, textFalse ? { marginLeft: 8 } : undefined);
193
- }
194
- let iconTrue = null;
195
- const textTrue = this.getText(this.props.schema.trueText, this.props.schema.noTranslation);
196
- if (this.props.schema.trueImage) {
197
- iconTrue = getIconByName(this.props.schema.trueImage, textTrue ? { marginRight: 8 } : undefined);
198
- }
199
- const min = this.props.schema.min === undefined ? this.state.obj.common.min || 0 : this.props.schema.min;
200
- const max = this.props.schema.max === undefined
201
- ? this.state.obj.common.max === undefined
202
- ? 100
203
- : this.state.obj.common.max
204
- : this.props.schema.max;
205
- const step = this.props.schema.step === undefined ? this.state.obj.common.step || 1 : this.props.schema.step;
206
- content = (React.createElement(Slider, { style: { width: '100%', flexGrow: 1 }, min: min, max: max, disabled: !!this.props.schema.readOnly, step: step, value: this.state.stateValue, valueLabelDisplay: "auto", valueLabelFormat: (value) => `${value}${this.getText(this.props.schema.unit, this.props.schema.noTranslation) || this.state.obj.common.unit || ''}`, onChange: (_e, value) => {
207
- this.setState({ stateValue: value }, () => {
208
- if (this.controlTimeout) {
209
- clearTimeout(this.controlTimeout);
210
- }
211
- this.controlTimeout = setTimeout(async () => {
212
- console.log(`${Date.now()} Send new value: ${this.state.stateValue}`);
213
- this.controlTimeout = null;
214
- await this.props.socket.setState(this.getObjectID(), this.state.stateValue, false);
215
- }, this.props.schema.controlDelay || 0);
216
- });
217
- } }));
218
- if (textFalse || iconFalse || textTrue || iconTrue) {
219
- content = (React.createElement("div", { style: {
220
- display: 'flex',
221
- width: '100%',
222
- flexGrow: 1,
223
- alignItems: 'center',
224
- } },
225
- React.createElement("span", { style: { marginRight: 16, ...this.props.schema.falseTextStyle } },
226
- textFalse,
227
- iconFalse),
228
- content,
229
- React.createElement("span", { style: { marginLeft: 16, ...this.props.schema.trueTextStyle } },
230
- iconTrue,
231
- textTrue)));
232
- }
233
- const label = this.getText(this.props.schema.label, this.props.schema.noTranslation);
234
- if (label) {
235
- content = (React.createElement("div", { style: { display: 'flex', width: '100%', alignItems: 'center' } },
236
- React.createElement("span", { style: { whiteSpace: 'nowrap', marginRight: 8, fontSize: '1rem' } }, label),
237
- content));
238
- }
239
- }
240
176
  else if (this.state.controlType === 'input') {
241
177
  content = (React.createElement(TextField, { style: { width: '100%' }, value: this.state.stateValue, variant: "standard", slotProps: {
242
178
  input: {
@@ -285,55 +221,200 @@ class ConfigState extends ConfigGeneric {
285
221
  await this.props.socket.setState(this.getObjectID(), val, false);
286
222
  }, this.props.schema.controlDelay || 0);
287
223
  });
288
- }, label: this.getText(this.props.schema.label), helperText: this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation) }));
224
+ }, label: this.getText(this.props.schema.label, this.props.schema.noTranslation), helperText: this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation) }));
289
225
  }
290
- else if (this.state.obj.common.type === 'boolean') {
291
- let icon = null;
292
- let text;
293
- let style;
294
- if (!this.state.stateValue) {
295
- text = this.getText(this.props.schema.falseText, this.props.schema.noTranslation);
296
- if (this.props.schema.falseImage) {
297
- icon = getIconByName(this.props.schema.falseImage, text ? { marginLeft: 8 } : undefined);
226
+ else {
227
+ let fontSize;
228
+ if (this.props.schema.size === 'normal') {
229
+ fontSize = 16;
230
+ }
231
+ else if (this.props.schema.size === 'large') {
232
+ fontSize = 20;
233
+ }
234
+ else if (typeof this.props.schema.size === 'number') {
235
+ fontSize = this.props.schema.size;
236
+ }
237
+ let label = this.getText(this.props.schema.label, this.props.schema.noTranslation);
238
+ const divStyle = {
239
+ display: 'flex',
240
+ alignItems: 'center',
241
+ fontSize: fontSize || '1rem',
242
+ gap: 8,
243
+ };
244
+ if (!this.props.schema.narrow) {
245
+ divStyle.width = '100%';
246
+ divStyle.justifyContent = 'space-between';
247
+ }
248
+ if (label.trim()) {
249
+ if (!label.trim().endsWith(':') && this.props.schema.addColon) {
250
+ label = `${label.trim()}:`;
298
251
  }
299
- style = this.props.schema.falseTextStyle;
300
252
  }
301
- else {
302
- text = this.getText(this.props.schema.trueText, this.props.schema.noTranslation);
253
+ let blinkStyle;
254
+ if (this.props.schema.blinkOnUpdate) {
255
+ blinkStyle = valueBlinkOnce(this.props.theme, this.props.schema.blinkOnUpdate);
256
+ }
257
+ let labelIcon;
258
+ if (this.props.schema.labelIcon) {
259
+ labelIcon = (React.createElement(Icon, { src: this.props.schema.labelIcon, style: { marginRight: 4 } }));
260
+ }
261
+ let labelControl;
262
+ if (label && labelIcon) {
263
+ labelControl = (React.createElement("div", { style: { whiteSpace: 'nowrap' } },
264
+ labelIcon,
265
+ label));
266
+ }
267
+ else if (label) {
268
+ labelControl = React.createElement("div", { style: { whiteSpace: 'nowrap' } }, label);
269
+ }
270
+ else if (labelIcon) {
271
+ labelControl = labelIcon;
272
+ }
273
+ if (this.state.controlType === 'switch') {
274
+ let iconFalse = null;
275
+ const textFalse = this.getText(this.props.schema.falseText, this.props.schema.noTranslation);
276
+ if (this.props.schema.falseImage) {
277
+ iconFalse = getIconByName(this.props.schema.falseImage, textFalse ? { marginLeft: 8 } : undefined);
278
+ }
279
+ let iconTrue = null;
280
+ const textTrue = this.getText(this.props.schema.trueText, this.props.schema.noTranslation);
303
281
  if (this.props.schema.trueImage) {
304
- icon = getIconByName(this.props.schema.falseImage, text ? { marginRight: 8 } : undefined);
282
+ iconTrue = getIconByName(this.props.schema.trueImage, textTrue ? { marginRight: 8 } : undefined);
283
+ }
284
+ content = (React.createElement(Switch, { checked: !!this.state.stateValue, disabled: !!this.props.schema.readOnly, onChange: async () => {
285
+ if (this.props.schema.confirm) {
286
+ this.setState({
287
+ confirmDialog: true,
288
+ confirmCallback: async (result) => {
289
+ if (result) {
290
+ await this.props.socket.setState(this.getObjectID(), !this.state.stateValue, false);
291
+ }
292
+ },
293
+ });
294
+ }
295
+ else {
296
+ await this.props.socket.setState(this.getObjectID(), !this.state.stateValue, false);
297
+ }
298
+ } }));
299
+ if (textFalse || iconFalse || textTrue || iconTrue) {
300
+ content = (React.createElement("div", { style: { display: 'flex', alignItems: 'center', fontSize: 14 } },
301
+ React.createElement("span", { style: this.props.schema.falseTextStyle },
302
+ textFalse,
303
+ iconFalse),
304
+ content,
305
+ React.createElement("span", { style: this.props.schema.trueTextStyle },
306
+ iconTrue,
307
+ textTrue)));
308
+ }
309
+ if (labelControl) {
310
+ content = (React.createElement("div", { style: divStyle },
311
+ labelControl,
312
+ content));
305
313
  }
306
- style = this.props.schema.trueTextStyle;
307
- }
308
- const label = this.getText(this.props.schema.label, this.props.schema.noTranslation);
309
- content = (React.createElement("div", { style: { fontSize: '1rem', ...style } },
310
- label,
311
- label ? React.createElement("span", { style: { marginRight: 8 } }, ":") : null,
312
- icon,
313
- text || (this.state.stateValue ? I18n.t('ra_true') : I18n.t('ra_false'))));
314
- }
315
- else {
316
- // text or HTML
317
- const label = this.getText(this.props.schema.label, this.props.schema.noTranslation);
318
- const unit = this.getText(this.props.schema.unit, this.props.schema.noTranslation) || this.state.obj.common.unit;
319
- let value;
320
- if (this.state.controlType === 'html') {
321
- value = React.createElement("span", { dangerouslySetInnerHTML: { __html: this.state.stateValue } });
322
314
  }
323
- else if (this.state.stateValue === null) {
324
- value = 'null';
315
+ else if (this.state.controlType === 'slider') {
316
+ let iconFalse = null;
317
+ const textFalse = this.getText(this.props.schema.falseText, this.props.schema.noTranslation);
318
+ if (this.props.schema.falseImage) {
319
+ iconFalse = getIconByName(this.props.schema.falseImage, textFalse ? { marginLeft: 8 } : undefined);
320
+ }
321
+ let iconTrue = null;
322
+ const textTrue = this.getText(this.props.schema.trueText, this.props.schema.noTranslation);
323
+ if (this.props.schema.trueImage) {
324
+ iconTrue = getIconByName(this.props.schema.trueImage, textTrue ? { marginRight: 8 } : undefined);
325
+ }
326
+ const min = this.props.schema.min === undefined ? this.state.obj.common.min || 0 : this.props.schema.min;
327
+ const max = this.props.schema.max === undefined
328
+ ? this.state.obj.common.max === undefined
329
+ ? 100
330
+ : this.state.obj.common.max
331
+ : this.props.schema.max;
332
+ const step = this.props.schema.step === undefined ? this.state.obj.common.step || 1 : this.props.schema.step;
333
+ content = (React.createElement(Slider, { style: { width: '100%', flexGrow: 1 }, min: min, max: max, disabled: !!this.props.schema.readOnly, step: step, value: this.state.stateValue, valueLabelDisplay: "auto", valueLabelFormat: (value) => `${value}${this.getText(this.props.schema.unit, this.props.schema.noTranslation) || this.state.obj.common.unit || ''}`, onChange: (_e, value) => {
334
+ this.setState({ stateValue: value }, () => {
335
+ if (this.controlTimeout) {
336
+ clearTimeout(this.controlTimeout);
337
+ }
338
+ this.controlTimeout = setTimeout(async () => {
339
+ console.log(`${Date.now()} Send new value: ${this.state.stateValue}`);
340
+ this.controlTimeout = null;
341
+ await this.props.socket.setState(this.getObjectID(), this.state.stateValue, false);
342
+ }, this.props.schema.controlDelay || 0);
343
+ });
344
+ } }));
345
+ if (textFalse || iconFalse || textTrue || iconTrue) {
346
+ content = (React.createElement("div", { style: {
347
+ display: 'flex',
348
+ width: '100%',
349
+ flexGrow: 1,
350
+ alignItems: 'center',
351
+ } },
352
+ React.createElement("span", { style: { marginRight: 16, ...this.props.schema.falseTextStyle } },
353
+ textFalse,
354
+ iconFalse),
355
+ content,
356
+ React.createElement("span", { style: { marginLeft: 16, ...this.props.schema.trueTextStyle } },
357
+ iconTrue,
358
+ textTrue)));
359
+ }
360
+ if (labelControl) {
361
+ content = (React.createElement("div", { style: divStyle },
362
+ labelControl,
363
+ content));
364
+ }
325
365
  }
326
- else if (this.state.stateValue === undefined) {
327
- value = 'undefined';
366
+ else if (this.state.obj.common.type === 'boolean') {
367
+ let icon = null;
368
+ let text;
369
+ let style;
370
+ if (!this.state.stateValue) {
371
+ text = this.getText(this.props.schema.falseText, this.props.schema.noTranslation);
372
+ if (this.props.schema.falseImage) {
373
+ icon = getIconByName(this.props.schema.falseImage, text ? { marginLeft: 8 } : undefined);
374
+ }
375
+ style = this.props.schema.falseTextStyle;
376
+ }
377
+ else {
378
+ text = this.getText(this.props.schema.trueText, this.props.schema.noTranslation);
379
+ if (this.props.schema.trueImage) {
380
+ icon = getIconByName(this.props.schema.falseImage, text ? { marginRight: 8 } : undefined);
381
+ }
382
+ style = this.props.schema.trueTextStyle;
383
+ }
384
+ style = Object.assign(divStyle, style);
385
+ content = (React.createElement("div", { style: style },
386
+ labelControl,
387
+ React.createElement(Box, { style: { display: 'flex', alignItems: 'center', gap: 8 }, sx: blinkStyle, key: this.props.schema.blinkOnUpdate ? text : undefined },
388
+ icon,
389
+ text || (this.state.stateValue ? I18n.t('ra_true') : I18n.t('ra_false')))));
328
390
  }
329
391
  else {
330
- value = this.state.stateValue;
392
+ // text or HTML
393
+ const unit = this.getText(this.props.schema.unit, this.props.schema.noTranslation) || this.state.obj.common.unit;
394
+ let value;
395
+ let key;
396
+ if (this.state.controlType === 'html') {
397
+ key = (this.state.stateValue || '').toString();
398
+ value = React.createElement("span", { dangerouslySetInnerHTML: { __html: this.state.stateValue } });
399
+ }
400
+ else if (this.state.stateValue === null) {
401
+ value = 'null';
402
+ key = value;
403
+ }
404
+ else if (this.state.stateValue === undefined) {
405
+ value = 'undefined';
406
+ key = value;
407
+ }
408
+ else {
409
+ value = this.state.stateValue.toString();
410
+ key = value;
411
+ }
412
+ content = (React.createElement("div", { style: divStyle },
413
+ labelControl,
414
+ React.createElement("div", { style: { display: 'flex', alignItems: 'baseline', gap: 4 } },
415
+ React.createElement(Box, { sx: blinkStyle, key: this.props.schema.blinkOnUpdate ? key : undefined }, value),
416
+ unit ? React.createElement("span", { style: { opacity: 0.7, fontSize: 'smaller' } }, unit) : null)));
331
417
  }
332
- content = (React.createElement("div", { style: { fontSize: '1rem' } },
333
- label,
334
- label ? React.createElement("span", { style: { marginRight: 8 } }, ":") : null,
335
- value,
336
- unit ? React.createElement("span", { style: { opacity: 0.7 } }, unit) : null));
337
418
  }
338
419
  return content;
339
420
  }