@iobroker/adapter-react-v5 7.6.7 → 7.6.9
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/build/Components/InfoBox.d.ts +1 -1
- package/build/Components/InfoBox.js +1 -1
- package/build/Components/InfoBox.js.map +1 -1
- package/build/Components/ObjectBrowser.d.ts +10 -0
- package/build/Components/ObjectBrowser.js +65 -8
- package/build/Components/ObjectBrowser.js.map +1 -1
- package/build/Components/SelectWithIcon.d.ts +0 -1
- package/build/Components/SelectWithIcon.js +3 -3
- package/build/Components/SelectWithIcon.js.map +1 -1
- package/build/Components/TextWithIcon.d.ts +0 -1
- package/build/Components/TextWithIcon.js +3 -3
- package/build/Components/TextWithIcon.js.map +1 -1
- package/build/Components/TypeSelector/TypeIcon.d.ts +29 -0
- package/build/Components/TypeSelector/TypeIcon.js +111 -0
- package/build/Components/TypeSelector/TypeIcon.js.map +1 -0
- package/build/Components/TypeSelector/TypeOptions.d.ts +8 -0
- package/build/Components/TypeSelector/TypeOptions.js +125 -0
- package/build/Components/TypeSelector/TypeOptions.js.map +1 -0
- package/build/Components/TypeSelector/TypeSelector.d.ts +22 -0
- package/build/Components/TypeSelector/TypeSelector.js +92 -0
- package/build/Components/TypeSelector/TypeSelector.js.map +1 -0
- package/build/Components/TypeSelector/icons/Cleaner.d.ts +3 -0
- package/build/Components/TypeSelector/icons/Cleaner.js +14 -0
- package/build/Components/TypeSelector/icons/Cleaner.js.map +1 -0
- package/build/Components/TypeSelector/icons/DoorClosed.d.ts +3 -0
- package/build/Components/TypeSelector/icons/DoorClosed.js +7 -0
- package/build/Components/TypeSelector/icons/DoorClosed.js.map +1 -0
- package/build/Components/TypeSelector/icons/DoorOpened.d.ts +3 -0
- package/build/Components/TypeSelector/icons/DoorOpened.js +7 -0
- package/build/Components/TypeSelector/icons/DoorOpened.js.map +1 -0
- package/build/Components/TypeSelector/icons/FireOff.d.ts +3 -0
- package/build/Components/TypeSelector/icons/FireOff.js +8 -0
- package/build/Components/TypeSelector/icons/FireOff.js.map +1 -0
- package/build/Components/TypeSelector/icons/FireOn.d.ts +3 -0
- package/build/Components/TypeSelector/icons/FireOn.js +14 -0
- package/build/Components/TypeSelector/icons/FireOn.js.map +1 -0
- package/build/Components/TypeSelector/icons/FloodOff.d.ts +3 -0
- package/build/Components/TypeSelector/icons/FloodOff.js +11 -0
- package/build/Components/TypeSelector/icons/FloodOff.js.map +1 -0
- package/build/Components/TypeSelector/icons/FloodOn.d.ts +3 -0
- package/build/Components/TypeSelector/icons/FloodOn.js +18 -0
- package/build/Components/TypeSelector/icons/FloodOn.js.map +1 -0
- package/build/Components/TypeSelector/icons/Gate.d.ts +3 -0
- package/build/Components/TypeSelector/icons/Gate.js +8 -0
- package/build/Components/TypeSelector/icons/Gate.js.map +1 -0
- package/build/Components/TypeSelector/icons/HeatValve.d.ts +3 -0
- package/build/Components/TypeSelector/icons/HeatValve.js +6 -0
- package/build/Components/TypeSelector/icons/HeatValve.js.map +1 -0
- package/build/Components/TypeSelector/icons/Home.d.ts +3 -0
- package/build/Components/TypeSelector/icons/Home.js +6 -0
- package/build/Components/TypeSelector/icons/Home.js.map +1 -0
- package/build/Components/TypeSelector/icons/Humidity.d.ts +3 -0
- package/build/Components/TypeSelector/icons/Humidity.js +8 -0
- package/build/Components/TypeSelector/icons/Humidity.js.map +1 -0
- package/build/Components/TypeSelector/icons/IconHome.d.ts +5 -0
- package/build/Components/TypeSelector/icons/IconHome.js +21 -0
- package/build/Components/TypeSelector/icons/IconHome.js.map +1 -0
- package/build/Components/TypeSelector/icons/Jalousie.d.ts +3 -0
- package/build/Components/TypeSelector/icons/Jalousie.js +7 -0
- package/build/Components/TypeSelector/icons/Jalousie.js.map +1 -0
- package/build/Components/TypeSelector/icons/Material.d.ts +3 -0
- package/build/Components/TypeSelector/icons/Material.js +8 -0
- package/build/Components/TypeSelector/icons/Material.js.map +1 -0
- package/build/Components/TypeSelector/icons/MotionOff.d.ts +3 -0
- package/build/Components/TypeSelector/icons/MotionOff.js +11 -0
- package/build/Components/TypeSelector/icons/MotionOff.js.map +1 -0
- package/build/Components/TypeSelector/icons/MotionOn.d.ts +3 -0
- package/build/Components/TypeSelector/icons/MotionOn.js +7 -0
- package/build/Components/TypeSelector/icons/MotionOn.js.map +1 -0
- package/build/Components/TypeSelector/icons/PushButton.d.ts +3 -0
- package/build/Components/TypeSelector/icons/PushButton.js +9 -0
- package/build/Components/TypeSelector/icons/PushButton.js.map +1 -0
- package/build/Components/TypeSelector/icons/RGB.d.ts +3 -0
- package/build/Components/TypeSelector/icons/RGB.js +43 -0
- package/build/Components/TypeSelector/icons/RGB.js.map +1 -0
- package/build/Components/TypeSelector/icons/RepairExpert.d.ts +3 -0
- package/build/Components/TypeSelector/icons/RepairExpert.js +6 -0
- package/build/Components/TypeSelector/icons/RepairExpert.js.map +1 -0
- package/build/Components/TypeSelector/icons/Socket.d.ts +3 -0
- package/build/Components/TypeSelector/icons/Socket.js +8 -0
- package/build/Components/TypeSelector/icons/Socket.js.map +1 -0
- package/build/Components/TypeSelector/icons/Thermometer.d.ts +3 -0
- package/build/Components/TypeSelector/icons/Thermometer.js +7 -0
- package/build/Components/TypeSelector/icons/Thermometer.js.map +1 -0
- package/build/Components/TypeSelector/icons/ThermometerSimple.d.ts +3 -0
- package/build/Components/TypeSelector/icons/ThermometerSimple.js +8 -0
- package/build/Components/TypeSelector/icons/ThermometerSimple.js.map +1 -0
- package/build/Components/TypeSelector/icons/Thermostat.d.ts +3 -0
- package/build/Components/TypeSelector/icons/Thermostat.js +9 -0
- package/build/Components/TypeSelector/icons/Thermostat.js.map +1 -0
- package/build/Components/TypeSelector/icons/Valve.d.ts +3 -0
- package/build/Components/TypeSelector/icons/Valve.js +7 -0
- package/build/Components/TypeSelector/icons/Valve.js.map +1 -0
- package/build/Components/TypeSelector/icons/WindowClosed.d.ts +3 -0
- package/build/Components/TypeSelector/icons/WindowClosed.js +8 -0
- package/build/Components/TypeSelector/icons/WindowClosed.js.map +1 -0
- package/build/Components/TypeSelector/icons/WindowOpened.d.ts +3 -0
- package/build/Components/TypeSelector/icons/WindowOpened.js +9 -0
- package/build/Components/TypeSelector/icons/WindowOpened.js.map +1 -0
- package/build/Components/TypeSelector/icons/WindowTilted.d.ts +3 -0
- package/build/Components/TypeSelector/icons/WindowTilted.js +8 -0
- package/build/Components/TypeSelector/icons/WindowTilted.js.map +1 -0
- package/build/Components/TypeSelector/icons/index.d.ts +28 -0
- package/build/Components/TypeSelector/icons/index.js +28 -0
- package/build/Components/TypeSelector/icons/index.js.map +1 -0
- package/build/Components/Utils.d.ts +1 -1
- package/build/Components/Utils.js +2 -2
- package/build/Components/Utils.js.map +1 -1
- package/build/Dialogs/TextInput.d.ts +1 -1
- package/build/i18n/de.json +1 -0
- package/build/i18n/en.json +1 -0
- package/build/i18n/es.json +1 -0
- package/build/i18n/fr.json +1 -0
- package/build/i18n/it.json +1 -0
- package/build/i18n/nl.json +1 -0
- package/build/i18n/pl.json +1 -0
- package/build/i18n/pt.json +1 -0
- package/build/i18n/ru.json +1 -0
- package/build/i18n/uk.json +1 -0
- package/build/i18n/zh-cn.json +1 -0
- package/build/icons/IconAdapter.d.ts +2 -2
- package/build/icons/IconAdapter.js +4 -2
- package/build/icons/IconAdapter.js.map +1 -1
- package/build/icons/IconAlias.d.ts +2 -2
- package/build/icons/IconAlias.js +4 -2
- package/build/icons/IconAlias.js.map +1 -1
- package/build/icons/IconButtonImage.d.ts +2 -2
- package/build/icons/IconButtonImage.js +6 -4
- package/build/icons/IconButtonImage.js.map +1 -1
- package/build/icons/IconChannel.d.ts +2 -2
- package/build/icons/IconChannel.js +8 -6
- package/build/icons/IconChannel.js.map +1 -1
- package/build/icons/IconClearFilter.d.ts +2 -2
- package/build/icons/IconClearFilter.js +4 -2
- package/build/icons/IconClearFilter.js.map +1 -1
- package/build/icons/IconClosed.d.ts +2 -2
- package/build/icons/IconClosed.js +4 -2
- package/build/icons/IconClosed.js.map +1 -1
- package/build/icons/IconCopy.d.ts +2 -2
- package/build/icons/IconCopy.js +4 -2
- package/build/icons/IconCopy.js.map +1 -1
- package/build/icons/IconDevice.d.ts +2 -2
- package/build/icons/IconDevice.js +14 -12
- package/build/icons/IconDevice.js.map +1 -1
- package/build/icons/IconDocument.d.ts +2 -2
- package/build/icons/IconDocument.js +4 -2
- package/build/icons/IconDocument.js.map +1 -1
- package/build/icons/IconDocumentReadOnly.d.ts +2 -2
- package/build/icons/IconDocumentReadOnly.js +5 -3
- package/build/icons/IconDocumentReadOnly.js.map +1 -1
- package/build/icons/IconExpert.d.ts +2 -2
- package/build/icons/IconExpert.js +5 -3
- package/build/icons/IconExpert.js.map +1 -1
- package/build/icons/IconFx.d.ts +2 -2
- package/build/icons/IconFx.js +4 -2
- package/build/icons/IconFx.js.map +1 -1
- package/build/icons/IconInstance.d.ts +2 -2
- package/build/icons/IconInstance.js +4 -2
- package/build/icons/IconInstance.js.map +1 -1
- package/build/icons/IconLogout.d.ts +2 -2
- package/build/icons/IconLogout.js +5 -3
- package/build/icons/IconLogout.js.map +1 -1
- package/build/icons/IconNoIcon.d.ts +2 -2
- package/build/icons/IconNoIcon.js +4 -2
- package/build/icons/IconNoIcon.js.map +1 -1
- package/build/icons/IconOpen.d.ts +2 -2
- package/build/icons/IconOpen.js +4 -2
- package/build/icons/IconOpen.js.map +1 -1
- package/build/icons/IconState.d.ts +2 -2
- package/build/icons/IconState.js +5 -3
- package/build/icons/IconState.js.map +1 -1
- package/build/icons/IconVacuum.d.ts +2 -2
- package/build/icons/IconVacuum.js +10 -8
- package/build/icons/IconVacuum.js.map +1 -1
- package/build/index.d.ts +5 -2
- package/build/index.js +3 -1
- package/build/index.js.map +1 -1
- package/i18n/de.json +1 -0
- package/i18n/en.json +1 -0
- package/i18n/es.json +1 -0
- package/i18n/fr.json +1 -0
- package/i18n/it.json +1 -0
- package/i18n/nl.json +1 -0
- package/i18n/pl.json +1 -0
- package/i18n/pt.json +1 -0
- package/i18n/ru.json +1 -0
- package/i18n/uk.json +1 -0
- package/i18n/zh-cn.json +1 -0
- package/package.json +11 -9
- package/build/Components/IconDeviceType.d.ts +0 -8
- package/build/Components/IconDeviceType.js +0 -212
- package/build/Components/IconDeviceType.js.map +0 -1
- package/build/icons/IconProps.d.ts +0 -15
- package/build/icons/IconProps.js +0 -2
- package/build/icons/IconProps.js.map +0 -1
|
@@ -23,7 +23,7 @@ interface InfoBoxState {
|
|
|
23
23
|
/**
|
|
24
24
|
* This component can be used to show important information or warnings to the user
|
|
25
25
|
*/
|
|
26
|
-
export
|
|
26
|
+
export declare class InfoBox extends React.Component<InfoBoxProps, InfoBoxState> {
|
|
27
27
|
private readonly refTypo;
|
|
28
28
|
private height;
|
|
29
29
|
private width;
|
|
@@ -4,7 +4,7 @@ import { Info, Warning, Close, Visibility, Check } from '@mui/icons-material';
|
|
|
4
4
|
/**
|
|
5
5
|
* This component can be used to show important information or warnings to the user
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export class InfoBox extends React.Component {
|
|
8
8
|
refTypo;
|
|
9
9
|
height;
|
|
10
10
|
width;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InfoBox.js","sourceRoot":"./src/","sources":["Components/InfoBox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAyB,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAwBrG;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,KAAK,CAAC,SAAqC;IAC3D,OAAO,CAAkC;IAClD,MAAM,CAAS;IACf,KAAK,CAAS;IAEtB,YAAY,KAAmB;QAC3B,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACT,MAAM,EAAE,IAAI,CAAC,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KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;oBACtF,OAAO;wBACH,UAAU,EAAE,mBAAmB,KAAK,UAAU,KAAK,WAAW,KAAK,UAAU;qBAChF,CAAC;gBACN,CAAC,EACD,KAAK,EAAE;oBACH,MAAM,EAAE,CAAC;oBACT,QAAQ,EAAE,UAAU;oBACpB,IAAI,EAAE,CAAC;oBACP,KAAK,EAAE,CAAC;oBACR,MAAM,EAAE,EAAE;iBACb,GACH,CACL,CAAC,CAAC,CAAC,IAAI,CACN,CACT,CAAC;IACN,CAAC;CACJ","sourcesContent":["import React from 'react';\nimport { Box, Typography } from '@mui/material';\nimport { Info, Warning, Close, Visibility, type SvgIconComponent, Check } from '@mui/icons-material';\n\ninterface InfoBoxProps {\n /** Text to display in the info box */\n children: string | (string | React.JSX.Element | null)[] | React.JSX.Element;\n /** The type determines the color and symbol */\n type: 'warning' | 'info' | 'error' | 'ok';\n /** If the Box is closeable */\n closeable?: boolean;\n /** Use together with `closeable: true`. You can specify in which variable in local storage the state of this info box could be stored */\n storeId?: string;\n /** Use together with `closeable: true`, listener called if close button clicked */\n onClose?: (desiredState: boolean) => void;\n /** Custom style */\n style?: React.CSSProperties;\n /** Icon position */\n iconPosition?: 'top' | 'middle';\n /** Use together with `closeable: true`. If the box is closed or not. In this case, it will be controlled from outside */\n closed?: boolean;\n}\n\ninterface InfoBoxState {\n closed: boolean;\n}\n/**\n * This component can be used to show important information or warnings to the user\n */\nexport default class InfoBox extends React.Component<InfoBoxProps, InfoBoxState> {\n private readonly refTypo: React.RefObject<HTMLDivElement>;\n private height: number;\n private width: number;\n\n constructor(props: InfoBoxProps) {\n super(props);\n this.state = {\n closed: this.props.storeId ? window.localStorage.getItem(this.props.storeId) === 'true' : false,\n };\n this.height = 0;\n this.width = 0;\n\n this.refTypo = React.createRef();\n }\n\n componentDidMount(): void {\n this.detectHeight();\n }\n\n onClick(): void {\n if (this.props.storeId && this.props.closed === undefined) {\n if (this.state.closed) {\n window.localStorage.removeItem(this.props.storeId);\n } else {\n window.localStorage.setItem(this.props.storeId, 'true');\n }\n }\n if (this.props.closed === undefined) {\n this.setState({ closed: !this.state.closed }, () => {\n // Inform about state change\n if (this.props.onClose) {\n this.props.onClose(this.state.closed);\n }\n });\n } else if (this.props.onClose) {\n this.props.onClose(!this.props.closed);\n }\n }\n\n detectHeight(): void {\n const closed = this.props.closed !== undefined ? this.props.closed : this.state.closed;\n // We must get the height of the element when it is open to make transition\n if (this.props.closeable && !closed && this.refTypo.current) {\n window.requestAnimationFrame(() => {\n const closed = this.props.closed !== undefined ? this.props.closed : this.state.closed;\n if (closed) {\n return;\n }\n if (this.refTypo.current && (!this.height || this.width !== this.refTypo.current.clientWidth)) {\n this.height = this.refTypo.current.clientHeight;\n this.width = this.refTypo.current.clientWidth;\n this.forceUpdate();\n }\n });\n }\n }\n\n componentDidUpdate(): void {\n this.detectHeight();\n }\n\n render(): React.ReactNode {\n const closed = this.props.closed !== undefined ? this.props.closed : this.state.closed;\n\n const Icon: SvgIconComponent = closed ? Visibility : Close;\n\n return (\n <Box\n className=\"iom-info-box\"\n style={{\n whiteSpace: 'preserve',\n display: 'flex',\n gap: 8,\n alignItems: closed || this.props.iconPosition === 'top' ? 'flex-start' : 'center',\n borderWidth: 1,\n borderStyle: 'solid',\n padding: 4,\n borderRadius: 5,\n marginBottom: 8,\n maxWidth: '100%',\n transition: 'height 0.5s',\n height: this.props.closeable ? (closed ? 30 : this.height || undefined) : undefined,\n overflow: this.props.closeable ? 'hidden' : undefined,\n position: 'relative',\n ...this.props.style,\n }}\n sx={{\n borderColor: theme =>\n this.props.type === 'ok' ? theme.palette.info.main : theme.palette[this.props.type].main,\n }}\n >\n {this.props.type === 'ok' ? (\n <Check style={{ color: '#0F0' }} />\n ) : this.props.type === 'info' ? (\n <Info color=\"primary\" />\n ) : (\n <Warning color={this.props.type} />\n )}\n <Typography ref={this.refTypo}>{this.props.children}</Typography>\n {this.props.closeable ? (\n <Icon\n sx={{\n color: theme => (theme.palette.mode === 'dark' ? 'lightgray' : 'gray'),\n // alignSelf: 'flex-start',\n cursor: 'pointer',\n position: 'absolute',\n top: 4,\n right: 4,\n }}\n onClick={() => this.onClick()}\n />\n ) : null}\n {/* Reserve place for button so it will not overlap the text */}\n {this.props.closeable ? <div style={{ width: 22 }} /> : null}\n {closed ? (\n <Box\n // This is a shadow box at the bottom of the InfoBox when it closed\n component=\"div\"\n sx={theme => {\n const color = theme.palette[this.props.type === 'ok' ? 'info' : this.props.type].main;\n return {\n background: `linear-gradient(${color}00 0%, ${color}10 60%, ${color}90 100%)`,\n };\n }}\n style={{\n bottom: 0,\n position: 'absolute',\n left: 0,\n right: 0,\n height: 10,\n }}\n />\n ) : null}\n </Box>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"InfoBox.js","sourceRoot":"./src/","sources":["Components/InfoBox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAyB,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAwBrG;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,KAAK,CAAC,SAAqC;IACnD,OAAO,CAAkC;IAClD,MAAM,CAAS;IACf,KAAK,CAAS;IAEtB,YAAY,KAAmB;QAC3B,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACT,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,MAAM,CAAC,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CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;oBACtF,OAAO;wBACH,UAAU,EAAE,mBAAmB,KAAK,UAAU,KAAK,WAAW,KAAK,UAAU;qBAChF,CAAC;gBACN,CAAC,EACD,KAAK,EAAE;oBACH,MAAM,EAAE,CAAC;oBACT,QAAQ,EAAE,UAAU;oBACpB,IAAI,EAAE,CAAC;oBACP,KAAK,EAAE,CAAC;oBACR,MAAM,EAAE,EAAE;iBACb,GACH,CACL,CAAC,CAAC,CAAC,IAAI,CACN,CACT,CAAC;IACN,CAAC;CACJ","sourcesContent":["import React from 'react';\nimport { Box, Typography } from '@mui/material';\nimport { Info, Warning, Close, Visibility, type SvgIconComponent, Check } from '@mui/icons-material';\n\ninterface InfoBoxProps {\n /** Text to display in the info box */\n children: string | (string | React.JSX.Element | null)[] | React.JSX.Element;\n /** The type determines the color and symbol */\n type: 'warning' | 'info' | 'error' | 'ok';\n /** If the Box is closeable */\n closeable?: boolean;\n /** Use together with `closeable: true`. You can specify in which variable in local storage the state of this info box could be stored */\n storeId?: string;\n /** Use together with `closeable: true`, listener called if close button clicked */\n onClose?: (desiredState: boolean) => void;\n /** Custom style */\n style?: React.CSSProperties;\n /** Icon position */\n iconPosition?: 'top' | 'middle';\n /** Use together with `closeable: true`. If the box is closed or not. In this case, it will be controlled from outside */\n closed?: boolean;\n}\n\ninterface InfoBoxState {\n closed: boolean;\n}\n/**\n * This component can be used to show important information or warnings to the user\n */\nexport class InfoBox extends React.Component<InfoBoxProps, InfoBoxState> {\n private readonly refTypo: React.RefObject<HTMLDivElement>;\n private height: number;\n private width: number;\n\n constructor(props: InfoBoxProps) {\n super(props);\n this.state = {\n closed: this.props.storeId ? window.localStorage.getItem(this.props.storeId) === 'true' : false,\n };\n this.height = 0;\n this.width = 0;\n\n this.refTypo = React.createRef();\n }\n\n componentDidMount(): void {\n this.detectHeight();\n }\n\n onClick(): void {\n if (this.props.storeId && this.props.closed === undefined) {\n if (this.state.closed) {\n window.localStorage.removeItem(this.props.storeId);\n } else {\n window.localStorage.setItem(this.props.storeId, 'true');\n }\n }\n if (this.props.closed === undefined) {\n this.setState({ closed: !this.state.closed }, () => {\n // Inform about state change\n if (this.props.onClose) {\n this.props.onClose(this.state.closed);\n }\n });\n } else if (this.props.onClose) {\n this.props.onClose(!this.props.closed);\n }\n }\n\n detectHeight(): void {\n const closed = this.props.closed !== undefined ? this.props.closed : this.state.closed;\n // We must get the height of the element when it is open to make transition\n if (this.props.closeable && !closed && this.refTypo.current) {\n window.requestAnimationFrame(() => {\n const closed = this.props.closed !== undefined ? this.props.closed : this.state.closed;\n if (closed) {\n return;\n }\n if (this.refTypo.current && (!this.height || this.width !== this.refTypo.current.clientWidth)) {\n this.height = this.refTypo.current.clientHeight;\n this.width = this.refTypo.current.clientWidth;\n this.forceUpdate();\n }\n });\n }\n }\n\n componentDidUpdate(): void {\n this.detectHeight();\n }\n\n render(): React.ReactNode {\n const closed = this.props.closed !== undefined ? this.props.closed : this.state.closed;\n\n const Icon: SvgIconComponent = closed ? Visibility : Close;\n\n return (\n <Box\n className=\"iom-info-box\"\n style={{\n whiteSpace: 'preserve',\n display: 'flex',\n gap: 8,\n alignItems: closed || this.props.iconPosition === 'top' ? 'flex-start' : 'center',\n borderWidth: 1,\n borderStyle: 'solid',\n padding: 4,\n borderRadius: 5,\n marginBottom: 8,\n maxWidth: '100%',\n transition: 'height 0.5s',\n height: this.props.closeable ? (closed ? 30 : this.height || undefined) : undefined,\n overflow: this.props.closeable ? 'hidden' : undefined,\n position: 'relative',\n ...this.props.style,\n }}\n sx={{\n borderColor: theme =>\n this.props.type === 'ok' ? theme.palette.info.main : theme.palette[this.props.type].main,\n }}\n >\n {this.props.type === 'ok' ? (\n <Check style={{ color: '#0F0' }} />\n ) : this.props.type === 'info' ? (\n <Info color=\"primary\" />\n ) : (\n <Warning color={this.props.type} />\n )}\n <Typography ref={this.refTypo}>{this.props.children}</Typography>\n {this.props.closeable ? (\n <Icon\n sx={{\n color: theme => (theme.palette.mode === 'dark' ? 'lightgray' : 'gray'),\n // alignSelf: 'flex-start',\n cursor: 'pointer',\n position: 'absolute',\n top: 4,\n right: 4,\n }}\n onClick={() => this.onClick()}\n />\n ) : null}\n {/* Reserve place for button so it will not overlap the text */}\n {this.props.closeable ? <div style={{ width: 22 }} /> : null}\n {closed ? (\n <Box\n // This is a shadow box at the bottom of the InfoBox when it closed\n component=\"div\"\n sx={theme => {\n const color = theme.palette[this.props.type === 'ok' ? 'info' : this.props.type].main;\n return {\n background: `linear-gradient(${color}00 0%, ${color}10 60%, ${color}90 100%)`,\n };\n }}\n style={{\n bottom: 0,\n position: 'absolute',\n left: 0,\n right: 0,\n height: 10,\n }}\n />\n ) : null}\n </Box>\n );\n }\n}\n"]}
|
|
@@ -59,6 +59,8 @@ export interface TreeItemData {
|
|
|
59
59
|
button?: boolean;
|
|
60
60
|
/** If the item has read and write and is boolean */
|
|
61
61
|
switch?: boolean;
|
|
62
|
+
/** If the item is url linke */
|
|
63
|
+
url?: boolean;
|
|
62
64
|
/** if the item has custom settings in `common.custom` */
|
|
63
65
|
hasCustoms?: boolean;
|
|
64
66
|
/** If this item is visible */
|
|
@@ -440,6 +442,7 @@ export declare class ObjectBrowserClass extends Component<ObjectBrowserProps, Ob
|
|
|
440
442
|
private systemConfig;
|
|
441
443
|
objects: Record<string, ioBroker.Object>;
|
|
442
444
|
private defaultHistory;
|
|
445
|
+
private cltrPressed;
|
|
443
446
|
private columnsVisibility;
|
|
444
447
|
private changedIds;
|
|
445
448
|
private contextMenu;
|
|
@@ -464,6 +467,7 @@ export declare class ObjectBrowserClass extends Component<ObjectBrowserProps, Ob
|
|
|
464
467
|
* Called when component is mounted.
|
|
465
468
|
*/
|
|
466
469
|
componentDidMount(): Promise<void>;
|
|
470
|
+
onKeyPress: (event: KeyboardEvent) => void;
|
|
467
471
|
/**
|
|
468
472
|
* Called when component is unmounted.
|
|
469
473
|
*/
|
|
@@ -571,6 +575,12 @@ export declare class ObjectBrowserClass extends Component<ObjectBrowserProps, Ob
|
|
|
571
575
|
renderColumnButtons(id: string, item: TreeItem): (JSX.Element | null)[] | JSX.Element | null;
|
|
572
576
|
private readHistory;
|
|
573
577
|
private getTooltipInfo;
|
|
578
|
+
/**
|
|
579
|
+
* This function renders the value in different forms in the table
|
|
580
|
+
* @param id state ID
|
|
581
|
+
* @param item Item
|
|
582
|
+
* @param narrowStyleWithDetails if use mobile view
|
|
583
|
+
*/
|
|
574
584
|
private renderColumnValue;
|
|
575
585
|
private _syncEnum;
|
|
576
586
|
private syncEnum;
|
|
@@ -1355,6 +1355,9 @@ function buildTree(objects, options) {
|
|
|
1355
1355
|
obj.common?.type === 'boolean' &&
|
|
1356
1356
|
obj.common?.write !== false &&
|
|
1357
1357
|
obj.common?.read !== false,
|
|
1358
|
+
url: !!obj.common?.role &&
|
|
1359
|
+
typeof obj.common.role === 'string' &&
|
|
1360
|
+
obj.common.role.startsWith('url'),
|
|
1358
1361
|
},
|
|
1359
1362
|
};
|
|
1360
1363
|
cRoot.children = cRoot.children || [];
|
|
@@ -1870,6 +1873,7 @@ export class ObjectBrowserClass extends Component {
|
|
|
1870
1873
|
systemConfig;
|
|
1871
1874
|
objects;
|
|
1872
1875
|
defaultHistory = '';
|
|
1876
|
+
cltrPressed = false;
|
|
1873
1877
|
columnsVisibility = {};
|
|
1874
1878
|
changedIds = null;
|
|
1875
1879
|
contextMenu = null;
|
|
@@ -2048,6 +2052,7 @@ export class ObjectBrowserClass extends Component {
|
|
|
2048
2052
|
customConfig: props.t('ra_tooltip_customConfig'),
|
|
2049
2053
|
copyState: props.t('ra_tooltip_copyState'),
|
|
2050
2054
|
editState: props.t('ra_tooltip_editState'),
|
|
2055
|
+
ctrlForLink: props.t('ra_tooltip_ctrlForLink'),
|
|
2051
2056
|
close: props.t('ra_Close'),
|
|
2052
2057
|
filter_id: props.t('ra_filter_id'),
|
|
2053
2058
|
filter_name: props.t('ra_filter_name'),
|
|
@@ -2363,7 +2368,23 @@ export class ObjectBrowserClass extends Component {
|
|
|
2363
2368
|
}
|
|
2364
2369
|
objectsAlreadyLoaded = true;
|
|
2365
2370
|
window.addEventListener('contextmenu', this.onContextMenu, true);
|
|
2371
|
+
window.addEventListener('keydown', this.onKeyPress, true);
|
|
2372
|
+
window.addEventListener('keyup', this.onKeyPress, true);
|
|
2366
2373
|
}
|
|
2374
|
+
onKeyPress = (event) => {
|
|
2375
|
+
if (event.type === 'keydown' && event.ctrlKey && !this.cltrPressed) {
|
|
2376
|
+
this.cltrPressed = true;
|
|
2377
|
+
if (this.tableRef.current) {
|
|
2378
|
+
this.tableRef.current.className = 'highlight-link';
|
|
2379
|
+
}
|
|
2380
|
+
}
|
|
2381
|
+
else if (event.type === 'keyup' && !event.ctrlKey && this.cltrPressed) {
|
|
2382
|
+
this.cltrPressed = false;
|
|
2383
|
+
if (this.tableRef.current) {
|
|
2384
|
+
this.tableRef.current.className = '';
|
|
2385
|
+
}
|
|
2386
|
+
}
|
|
2387
|
+
};
|
|
2367
2388
|
/**
|
|
2368
2389
|
* Called when component is unmounted.
|
|
2369
2390
|
*/
|
|
@@ -2373,6 +2394,8 @@ export class ObjectBrowserClass extends Component {
|
|
|
2373
2394
|
this.filterTimer = null;
|
|
2374
2395
|
}
|
|
2375
2396
|
window.removeEventListener('contextmenu', this.onContextMenu, true);
|
|
2397
|
+
window.removeEventListener('keydown', this.onKeyPress, true);
|
|
2398
|
+
window.removeEventListener('keyup', this.onKeyPress, true);
|
|
2376
2399
|
if (this.props.objectsWorker) {
|
|
2377
2400
|
this.props.objectsWorker.unregisterHandler(this.onObjectChangeFromWorker, true);
|
|
2378
2401
|
}
|
|
@@ -3909,16 +3932,25 @@ export class ObjectBrowserClass extends Component {
|
|
|
3909
3932
|
}
|
|
3910
3933
|
}
|
|
3911
3934
|
});
|
|
3935
|
+
const role = obj?.common?.role || '';
|
|
3912
3936
|
if (fileViewer === 'image') {
|
|
3913
3937
|
valFullRx.push(React.createElement("img", { style: styles.cellValueTooltipImage, src: state.val, alt: id }));
|
|
3914
3938
|
}
|
|
3915
|
-
else if (
|
|
3916
|
-
|
|
3917
|
-
|
|
3939
|
+
else if (role === 'url' || obj.common.role === 'url.self' || obj.common.role === 'url.blank') {
|
|
3940
|
+
// Show comment about "Hold Ctrl/⌘ key to open the link"
|
|
3941
|
+
valFullRx.unshift(React.createElement("div", { key: "ctrl", style: { textDecoration: 'underline', fontWeight: 'bold' } }, this.texts.ctrlForLink));
|
|
3942
|
+
}
|
|
3943
|
+
else if (this.defaultHistory && obj?.common?.custom?.[this.defaultHistory]) {
|
|
3918
3944
|
valFullRx.push(React.createElement("svg", { key: "sparkline", className: "sparkline", "data-id": id, style: { fill: '#3d85de' }, width: "200", height: "30", strokeWidth: "3" }));
|
|
3919
3945
|
}
|
|
3920
3946
|
this.setState({ tooltipInfo: { el: valFullRx, id } }, () => cb && cb());
|
|
3921
3947
|
}
|
|
3948
|
+
/**
|
|
3949
|
+
* This function renders the value in different forms in the table
|
|
3950
|
+
* @param id state ID
|
|
3951
|
+
* @param item Item
|
|
3952
|
+
* @param narrowStyleWithDetails if use mobile view
|
|
3953
|
+
*/
|
|
3922
3954
|
renderColumnValue(id, item, narrowStyleWithDetails) {
|
|
3923
3955
|
const obj = item.data.obj;
|
|
3924
3956
|
if (!obj || !this.states) {
|
|
@@ -4004,7 +4036,7 @@ export class ObjectBrowserClass extends Component {
|
|
|
4004
4036
|
popper: { sx: styles.cellValueTooltipBox },
|
|
4005
4037
|
tooltip: { sx: styles.cellValueTooltip },
|
|
4006
4038
|
}, onOpen: () => this.getTooltipInfo(id, () => this.readHistory(id)), onClose: () => this.state.tooltipInfo?.id === id && this.setState({ tooltipInfo: null }) },
|
|
4007
|
-
React.createElement(Box, { component: "div", style: info.style, sx: {
|
|
4039
|
+
React.createElement(Box, { component: "div", style: info.style, className: item.data.url ? 'iob-link' : undefined, sx: {
|
|
4008
4040
|
...styles.cellValueText,
|
|
4009
4041
|
height: narrowStyleWithDetails ? undefined : ROW_HEIGHT,
|
|
4010
4042
|
'& .admin-button:active': {
|
|
@@ -4838,14 +4870,25 @@ export class ObjectBrowserClass extends Component {
|
|
|
4838
4870
|
? 'grab'
|
|
4839
4871
|
: 'text'
|
|
4840
4872
|
: 'default',
|
|
4841
|
-
}, onClick:
|
|
4842
|
-
|
|
4873
|
+
}, onClick: e => {
|
|
4874
|
+
if (valueEditable) {
|
|
4843
4875
|
if (!obj || !this.states) {
|
|
4844
4876
|
// return;
|
|
4845
4877
|
}
|
|
4846
4878
|
else if (common?.type === 'file') {
|
|
4847
4879
|
this.setState({ viewFileDialog: id });
|
|
4848
4880
|
}
|
|
4881
|
+
else if (item.data.url && e.ctrlKey) {
|
|
4882
|
+
if (this.states[id]?.val && typeof this.states[id].val === 'string') {
|
|
4883
|
+
if (common?.role === 'url.self') {
|
|
4884
|
+
window.location.href = this.states[id].val;
|
|
4885
|
+
}
|
|
4886
|
+
else {
|
|
4887
|
+
const opened = window.open(this.states[id].val, '_blank');
|
|
4888
|
+
opened?.focus();
|
|
4889
|
+
}
|
|
4890
|
+
}
|
|
4891
|
+
}
|
|
4849
4892
|
else if (!this.state.filter.expertMode && item.data.button) {
|
|
4850
4893
|
// in non-expert mode control button directly
|
|
4851
4894
|
this.props.socket
|
|
@@ -4868,7 +4911,17 @@ export class ObjectBrowserClass extends Component {
|
|
|
4868
4911
|
this.setState({ updateOpened: true });
|
|
4869
4912
|
}
|
|
4870
4913
|
}
|
|
4871
|
-
|
|
4914
|
+
else if (common?.role === 'url' || (common?.role === 'url.blank' && e.ctrlKey)) {
|
|
4915
|
+
if (this.states[id]?.val && typeof this.states[id].val === 'string') {
|
|
4916
|
+
window.open(this.states[id].val, '_blank');
|
|
4917
|
+
}
|
|
4918
|
+
}
|
|
4919
|
+
else if (common?.role === 'url.self' && e.ctrlKey) {
|
|
4920
|
+
if (this.states[id]?.val && typeof this.states[id].val === 'string') {
|
|
4921
|
+
window.location.href = this.states[id].val;
|
|
4922
|
+
}
|
|
4923
|
+
}
|
|
4924
|
+
} }, columnValue)) : null;
|
|
4872
4925
|
let colButtons = narrowStyleWithDetails || this.columnsVisibility.buttons ? (React.createElement("div", { style: {
|
|
4873
4926
|
...styles.cellButtons,
|
|
4874
4927
|
width: this.props.width !== 'xs' ? this.columnsVisibility.buttons : undefined,
|
|
@@ -6060,11 +6113,15 @@ export class ObjectBrowserClass extends Component {
|
|
|
6060
6113
|
.newValueBrowser-light {
|
|
6061
6114
|
animation: newValueAnimation-light 2s ease-in-out;
|
|
6062
6115
|
}
|
|
6116
|
+
.highlight-link .iob-link {
|
|
6117
|
+
text-decoration: underline;
|
|
6118
|
+
cursor: pointer;
|
|
6119
|
+
}
|
|
6063
6120
|
`),
|
|
6064
6121
|
React.createElement(TabHeader, null, this.getToolbar()),
|
|
6065
6122
|
React.createElement(TabContent, null,
|
|
6066
6123
|
this.renderHeader(),
|
|
6067
|
-
React.createElement(
|
|
6124
|
+
React.createElement(Box, { style: styles.tableDiv, ref: this.tableRef, onKeyDown: event => this.navigateKeyPress(event) }, items)),
|
|
6068
6125
|
this.renderContextMenu(),
|
|
6069
6126
|
this.renderAliasMenu(),
|
|
6070
6127
|
this.renderToast(),
|