@iobroker/gui-components 8.0.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.
- package/LICENSE +22 -0
- package/README.md +1450 -0
- package/build/AdminConnection.d.ts +1 -0
- package/build/AdminConnection.js +2 -0
- package/build/AdminConnection.js.map +1 -0
- package/build/Components/404.d.ts +4 -0
- package/build/Components/404.js +97 -0
- package/build/Components/404.js.map +1 -0
- package/build/Components/ColorPicker.d.ts +86 -0
- package/build/Components/ColorPicker.js +222 -0
- package/build/Components/ColorPicker.js.map +1 -0
- package/build/Components/ComplexCron.d.ts +40 -0
- package/build/Components/ComplexCron.js +401 -0
- package/build/Components/ComplexCron.js.map +1 -0
- package/build/Components/CopyToClipboard.d.ts +14 -0
- package/build/Components/CopyToClipboard.js +160 -0
- package/build/Components/CopyToClipboard.js.map +1 -0
- package/build/Components/CustomModal.d.ts +26 -0
- package/build/Components/CustomModal.js +62 -0
- package/build/Components/CustomModal.js.map +1 -0
- package/build/Components/DeviceType/DeviceTypeIcon.d.ts +29 -0
- package/build/Components/DeviceType/DeviceTypeIcon.js +108 -0
- package/build/Components/DeviceType/DeviceTypeIcon.js.map +1 -0
- package/build/Components/DeviceType/DeviceTypeOptions.d.ts +2 -0
- package/build/Components/DeviceType/DeviceTypeOptions.js +69 -0
- package/build/Components/DeviceType/DeviceTypeOptions.js.map +1 -0
- package/build/Components/DeviceType/DeviceTypeSelector.d.ts +20 -0
- package/build/Components/DeviceType/DeviceTypeSelector.js +83 -0
- package/build/Components/DeviceType/DeviceTypeSelector.js.map +1 -0
- package/build/Components/DeviceType/deviceTypeTranslations.d.ts +1 -0
- package/build/Components/DeviceType/deviceTypeTranslations.js +30 -0
- package/build/Components/DeviceType/deviceTypeTranslations.js.map +1 -0
- package/build/Components/DeviceType/i18n/de.json +46 -0
- package/build/Components/DeviceType/i18n/en.json +46 -0
- package/build/Components/DeviceType/i18n/fr.json +46 -0
- package/build/Components/DeviceType/i18n/it.json +46 -0
- package/build/Components/DeviceType/i18n/nl.json +46 -0
- package/build/Components/DeviceType/i18n/pl.json +46 -0
- package/build/Components/DeviceType/i18n/pt.json +46 -0
- package/build/Components/DeviceType/i18n/ru.json +46 -0
- package/build/Components/DeviceType/i18n/uk.json +46 -0
- package/build/Components/DeviceType/i18n/zh-cn.json +46 -0
- package/build/Components/DeviceType/icons/Cleaner.d.ts +3 -0
- package/build/Components/DeviceType/icons/Cleaner.js +14 -0
- package/build/Components/DeviceType/icons/Cleaner.js.map +1 -0
- package/build/Components/DeviceType/icons/DoorClosed.d.ts +3 -0
- package/build/Components/DeviceType/icons/DoorClosed.js +7 -0
- package/build/Components/DeviceType/icons/DoorClosed.js.map +1 -0
- package/build/Components/DeviceType/icons/DoorOpened.d.ts +3 -0
- package/build/Components/DeviceType/icons/DoorOpened.js +7 -0
- package/build/Components/DeviceType/icons/DoorOpened.js.map +1 -0
- package/build/Components/DeviceType/icons/FireOff.d.ts +3 -0
- package/build/Components/DeviceType/icons/FireOff.js +8 -0
- package/build/Components/DeviceType/icons/FireOff.js.map +1 -0
- package/build/Components/DeviceType/icons/FireOn.d.ts +3 -0
- package/build/Components/DeviceType/icons/FireOn.js +14 -0
- package/build/Components/DeviceType/icons/FireOn.js.map +1 -0
- package/build/Components/DeviceType/icons/FloodOff.d.ts +3 -0
- package/build/Components/DeviceType/icons/FloodOff.js +11 -0
- package/build/Components/DeviceType/icons/FloodOff.js.map +1 -0
- package/build/Components/DeviceType/icons/FloodOn.d.ts +3 -0
- package/build/Components/DeviceType/icons/FloodOn.js +18 -0
- package/build/Components/DeviceType/icons/FloodOn.js.map +1 -0
- package/build/Components/DeviceType/icons/Gate.d.ts +3 -0
- package/build/Components/DeviceType/icons/Gate.js +8 -0
- package/build/Components/DeviceType/icons/Gate.js.map +1 -0
- package/build/Components/DeviceType/icons/HeatValve.d.ts +3 -0
- package/build/Components/DeviceType/icons/HeatValve.js +6 -0
- package/build/Components/DeviceType/icons/HeatValve.js.map +1 -0
- package/build/Components/DeviceType/icons/Home.d.ts +3 -0
- package/build/Components/DeviceType/icons/Home.js +6 -0
- package/build/Components/DeviceType/icons/Home.js.map +1 -0
- package/build/Components/DeviceType/icons/Humidity.d.ts +3 -0
- package/build/Components/DeviceType/icons/Humidity.js +8 -0
- package/build/Components/DeviceType/icons/Humidity.js.map +1 -0
- package/build/Components/DeviceType/icons/IconHome.d.ts +5 -0
- package/build/Components/DeviceType/icons/IconHome.js +21 -0
- package/build/Components/DeviceType/icons/IconHome.js.map +1 -0
- package/build/Components/DeviceType/icons/Jalousie.d.ts +3 -0
- package/build/Components/DeviceType/icons/Jalousie.js +7 -0
- package/build/Components/DeviceType/icons/Jalousie.js.map +1 -0
- package/build/Components/DeviceType/icons/Material.d.ts +3 -0
- package/build/Components/DeviceType/icons/Material.js +8 -0
- package/build/Components/DeviceType/icons/Material.js.map +1 -0
- package/build/Components/DeviceType/icons/MotionOff.d.ts +3 -0
- package/build/Components/DeviceType/icons/MotionOff.js +11 -0
- package/build/Components/DeviceType/icons/MotionOff.js.map +1 -0
- package/build/Components/DeviceType/icons/MotionOn.d.ts +3 -0
- package/build/Components/DeviceType/icons/MotionOn.js +7 -0
- package/build/Components/DeviceType/icons/MotionOn.js.map +1 -0
- package/build/Components/DeviceType/icons/PushButton.d.ts +3 -0
- package/build/Components/DeviceType/icons/PushButton.js +9 -0
- package/build/Components/DeviceType/icons/PushButton.js.map +1 -0
- package/build/Components/DeviceType/icons/RGB.d.ts +3 -0
- package/build/Components/DeviceType/icons/RGB.js +43 -0
- package/build/Components/DeviceType/icons/RGB.js.map +1 -0
- package/build/Components/DeviceType/icons/RepairExpert.d.ts +3 -0
- package/build/Components/DeviceType/icons/RepairExpert.js +6 -0
- package/build/Components/DeviceType/icons/RepairExpert.js.map +1 -0
- package/build/Components/DeviceType/icons/Socket.d.ts +3 -0
- package/build/Components/DeviceType/icons/Socket.js +8 -0
- package/build/Components/DeviceType/icons/Socket.js.map +1 -0
- package/build/Components/DeviceType/icons/Thermometer.d.ts +3 -0
- package/build/Components/DeviceType/icons/Thermometer.js +7 -0
- package/build/Components/DeviceType/icons/Thermometer.js.map +1 -0
- package/build/Components/DeviceType/icons/ThermometerSimple.d.ts +3 -0
- package/build/Components/DeviceType/icons/ThermometerSimple.js +8 -0
- package/build/Components/DeviceType/icons/ThermometerSimple.js.map +1 -0
- package/build/Components/DeviceType/icons/Thermostat.d.ts +3 -0
- package/build/Components/DeviceType/icons/Thermostat.js +9 -0
- package/build/Components/DeviceType/icons/Thermostat.js.map +1 -0
- package/build/Components/DeviceType/icons/Valve.d.ts +3 -0
- package/build/Components/DeviceType/icons/Valve.js +7 -0
- package/build/Components/DeviceType/icons/Valve.js.map +1 -0
- package/build/Components/DeviceType/icons/WindowClosed.d.ts +3 -0
- package/build/Components/DeviceType/icons/WindowClosed.js +8 -0
- package/build/Components/DeviceType/icons/WindowClosed.js.map +1 -0
- package/build/Components/DeviceType/icons/WindowOpened.d.ts +3 -0
- package/build/Components/DeviceType/icons/WindowOpened.js +9 -0
- package/build/Components/DeviceType/icons/WindowOpened.js.map +1 -0
- package/build/Components/DeviceType/icons/WindowTilted.d.ts +3 -0
- package/build/Components/DeviceType/icons/WindowTilted.js +8 -0
- package/build/Components/DeviceType/icons/WindowTilted.js.map +1 -0
- package/build/Components/DeviceType/icons/index.d.ts +28 -0
- package/build/Components/DeviceType/icons/index.js +28 -0
- package/build/Components/DeviceType/icons/index.js.map +1 -0
- package/build/Components/FileBrowser.d.ts +187 -0
- package/build/Components/FileBrowser.js +1711 -0
- package/build/Components/FileBrowser.js.map +1 -0
- package/build/Components/FileViewer.d.ts +49 -0
- package/build/Components/FileViewer.js +247 -0
- package/build/Components/FileViewer.js.map +1 -0
- package/build/Components/Icon.d.ts +35 -0
- package/build/Components/Icon.js +140 -0
- package/build/Components/Icon.js.map +1 -0
- package/build/Components/IconPicker.d.ts +25 -0
- package/build/Components/IconPicker.js +72 -0
- package/build/Components/IconPicker.js.map +1 -0
- package/build/Components/IconSelector.d.ts +33 -0
- package/build/Components/IconSelector.js +2086 -0
- package/build/Components/IconSelector.js.map +1 -0
- package/build/Components/Image.d.ts +31 -0
- package/build/Components/Image.js +126 -0
- package/build/Components/Image.js.map +1 -0
- package/build/Components/InfoBox.d.ts +37 -0
- package/build/Components/InfoBox.js +115 -0
- package/build/Components/InfoBox.js.map +1 -0
- package/build/Components/IobUri.d.ts +14 -0
- package/build/Components/IobUri.js +168 -0
- package/build/Components/IobUri.js.map +1 -0
- package/build/Components/Loader.d.ts +31 -0
- package/build/Components/Loader.js +265 -0
- package/build/Components/Loader.js.map +1 -0
- package/build/Components/Loaders/MV.d.ts +17 -0
- package/build/Components/Loaders/MV.js +61 -0
- package/build/Components/Loaders/MV.js.map +1 -0
- package/build/Components/Loaders/PT.d.ts +27 -0
- package/build/Components/Loaders/PT.js +150 -0
- package/build/Components/Loaders/PT.js.map +1 -0
- package/build/Components/Loaders/Vendor.d.ts +22 -0
- package/build/Components/Loaders/Vendor.js +52 -0
- package/build/Components/Loaders/Vendor.js.map +1 -0
- package/build/Components/Logo.d.ts +18 -0
- package/build/Components/Logo.js +109 -0
- package/build/Components/Logo.js.map +1 -0
- package/build/Components/MDUtils.d.ts +11 -0
- package/build/Components/MDUtils.js +99 -0
- package/build/Components/MDUtils.js.map +1 -0
- package/build/Components/ObjectBrowser.d.ts +665 -0
- package/build/Components/ObjectBrowser.js +6245 -0
- package/build/Components/ObjectBrowser.js.map +1 -0
- package/build/Components/Router.d.ts +21 -0
- package/build/Components/Router.js +77 -0
- package/build/Components/Router.js.map +1 -0
- package/build/Components/SaveCloseButtons.d.ts +20 -0
- package/build/Components/SaveCloseButtons.js +65 -0
- package/build/Components/SaveCloseButtons.js.map +1 -0
- package/build/Components/Schedule.d.ts +62 -0
- package/build/Components/Schedule.js +1266 -0
- package/build/Components/Schedule.js.map +1 -0
- package/build/Components/SelectWithIcon.d.ts +37 -0
- package/build/Components/SelectWithIcon.js +139 -0
- package/build/Components/SelectWithIcon.js.map +1 -0
- package/build/Components/SimpleCron/cronText.d.ts +10 -0
- package/build/Components/SimpleCron/cronText.js +14 -0
- package/build/Components/SimpleCron/cronText.js.map +1 -0
- package/build/Components/SimpleCron/index.d.ts +55 -0
- package/build/Components/SimpleCron/index.js +698 -0
- package/build/Components/SimpleCron/index.js.map +1 -0
- package/build/Components/TabContainer.d.ts +15 -0
- package/build/Components/TabContainer.js +23 -0
- package/build/Components/TabContainer.js.map +1 -0
- package/build/Components/TabContent.d.ts +11 -0
- package/build/Components/TabContent.js +20 -0
- package/build/Components/TabContent.js.map +1 -0
- package/build/Components/TabHeader.d.ts +6 -0
- package/build/Components/TabHeader.js +6 -0
- package/build/Components/TabHeader.js.map +1 -0
- package/build/Components/TableResize.d.ts +45 -0
- package/build/Components/TableResize.js +204 -0
- package/build/Components/TableResize.js.map +1 -0
- package/build/Components/TextWithIcon.d.ts +21 -0
- package/build/Components/TextWithIcon.js +113 -0
- package/build/Components/TextWithIcon.js.map +1 -0
- package/build/Components/ToggleThemeMenu.d.ts +12 -0
- package/build/Components/ToggleThemeMenu.js +13 -0
- package/build/Components/ToggleThemeMenu.js.map +1 -0
- package/build/Components/TreeTable.d.ts +79 -0
- package/build/Components/TreeTable.js +538 -0
- package/build/Components/TreeTable.js.map +1 -0
- package/build/Components/UploadImage.d.ts +23 -0
- package/build/Components/UploadImage.js +516 -0
- package/build/Components/UploadImage.js.map +1 -0
- package/build/Components/Utils.d.ts +331 -0
- package/build/Components/Utils.js +1605 -0
- package/build/Components/Utils.js.map +1 -0
- package/build/Components/withWidth.d.ts +2 -0
- package/build/Components/withWidth.js +22 -0
- package/build/Components/withWidth.js.map +1 -0
- package/build/Connection.d.ts +1 -0
- package/build/Connection.js +2 -0
- package/build/Connection.js.map +1 -0
- package/build/Dialogs/ComplexCron.d.ts +24 -0
- package/build/Dialogs/ComplexCron.js +85 -0
- package/build/Dialogs/ComplexCron.js.map +1 -0
- package/build/Dialogs/Confirm.d.ts +39 -0
- package/build/Dialogs/Confirm.js +83 -0
- package/build/Dialogs/Confirm.js.map +1 -0
- package/build/Dialogs/Cron.d.ts +29 -0
- package/build/Dialogs/Cron.js +72 -0
- package/build/Dialogs/Cron.js.map +1 -0
- package/build/Dialogs/Error.d.ts +18 -0
- package/build/Dialogs/Error.js +27 -0
- package/build/Dialogs/Error.js.map +1 -0
- package/build/Dialogs/Message.d.ts +20 -0
- package/build/Dialogs/Message.js +29 -0
- package/build/Dialogs/Message.js.map +1 -0
- package/build/Dialogs/SelectFile.d.ts +85 -0
- package/build/Dialogs/SelectFile.js +115 -0
- package/build/Dialogs/SelectFile.js.map +1 -0
- package/build/Dialogs/SelectID.d.ts +102 -0
- package/build/Dialogs/SelectID.js +151 -0
- package/build/Dialogs/SelectID.js.map +1 -0
- package/build/Dialogs/SimpleCron.d.ts +19 -0
- package/build/Dialogs/SimpleCron.js +46 -0
- package/build/Dialogs/SimpleCron.js.map +1 -0
- package/build/Dialogs/TextInput.d.ts +2 -0
- package/build/Dialogs/TextInput.js +31 -0
- package/build/Dialogs/TextInput.js.map +1 -0
- package/build/GenericApp.d.ts +209 -0
- package/build/GenericApp.js +842 -0
- package/build/GenericApp.js.map +1 -0
- package/build/LegacyConnection.d.ts +938 -0
- package/build/LegacyConnection.js +2849 -0
- package/build/LegacyConnection.js.map +1 -0
- package/build/Prompt.d.ts +5 -0
- package/build/Prompt.js +19 -0
- package/build/Prompt.js.map +1 -0
- package/build/Theme.d.ts +5 -0
- package/build/Theme.js +344 -0
- package/build/Theme.js.map +1 -0
- package/build/assets/devices/parseNames.d.ts +0 -0
- package/build/assets/devices/parseNames.js +35 -0
- package/build/assets/devices/parseNames.js.map +1 -0
- package/build/assets/devices.json +1 -0
- package/build/assets/lamp_ceiling.svg +9 -0
- package/build/assets/lamp_table.svg +8 -0
- package/build/assets/no_icon.svg +9 -0
- package/build/assets/rooms/parseNames.d.ts +0 -0
- package/build/assets/rooms/parseNames.js +35 -0
- package/build/assets/rooms/parseNames.js.map +1 -0
- package/build/assets/rooms.json +1 -0
- package/build/dictionary.d.ts +1 -0
- package/build/dictionary.js +25 -0
- package/build/dictionary.js.map +1 -0
- package/build/globals.d.ts +19 -0
- package/build/i18n/de.json +480 -0
- package/build/i18n/en.json +480 -0
- package/build/i18n/es.json +480 -0
- package/build/i18n/fr.json +480 -0
- package/build/i18n/it.json +475 -0
- package/build/i18n/nl.json +475 -0
- package/build/i18n/pl.json +475 -0
- package/build/i18n/pt.json +475 -0
- package/build/i18n/ru.json +475 -0
- package/build/i18n/uk.json +475 -0
- package/build/i18n/zh-cn.json +475 -0
- package/build/i18n.d.ts +84 -0
- package/build/i18n.js +224 -0
- package/build/i18n.js.map +1 -0
- package/build/icons/IconAdapter.d.ts +3 -0
- package/build/icons/IconAdapter.js +7 -0
- package/build/icons/IconAdapter.js.map +1 -0
- package/build/icons/IconAlias.d.ts +3 -0
- package/build/icons/IconAlias.js +7 -0
- package/build/icons/IconAlias.js.map +1 -0
- package/build/icons/IconButtonImage.d.ts +3 -0
- package/build/icons/IconButtonImage.js +9 -0
- package/build/icons/IconButtonImage.js.map +1 -0
- package/build/icons/IconChannel.d.ts +3 -0
- package/build/icons/IconChannel.js +10 -0
- package/build/icons/IconChannel.js.map +1 -0
- package/build/icons/IconClearFilter.d.ts +3 -0
- package/build/icons/IconClearFilter.js +8 -0
- package/build/icons/IconClearFilter.js.map +1 -0
- package/build/icons/IconClosed.d.ts +3 -0
- package/build/icons/IconClosed.js +7 -0
- package/build/icons/IconClosed.js.map +1 -0
- package/build/icons/IconCopy.d.ts +3 -0
- package/build/icons/IconCopy.js +6 -0
- package/build/icons/IconCopy.js.map +1 -0
- package/build/icons/IconDevice.d.ts +3 -0
- package/build/icons/IconDevice.js +16 -0
- package/build/icons/IconDevice.js.map +1 -0
- package/build/icons/IconDocument.d.ts +3 -0
- package/build/icons/IconDocument.js +7 -0
- package/build/icons/IconDocument.js.map +1 -0
- package/build/icons/IconDocumentReadOnly.d.ts +3 -0
- package/build/icons/IconDocumentReadOnly.js +8 -0
- package/build/icons/IconDocumentReadOnly.js.map +1 -0
- package/build/icons/IconExpert.d.ts +3 -0
- package/build/icons/IconExpert.js +7 -0
- package/build/icons/IconExpert.js.map +1 -0
- package/build/icons/IconFx.d.ts +3 -0
- package/build/icons/IconFx.js +6 -0
- package/build/icons/IconFx.js.map +1 -0
- package/build/icons/IconInstance.d.ts +3 -0
- package/build/icons/IconInstance.js +7 -0
- package/build/icons/IconInstance.js.map +1 -0
- package/build/icons/IconLogout.d.ts +3 -0
- package/build/icons/IconLogout.js +7 -0
- package/build/icons/IconLogout.js.map +1 -0
- package/build/icons/IconNoIcon.d.ts +3 -0
- package/build/icons/IconNoIcon.js +6 -0
- package/build/icons/IconNoIcon.js.map +1 -0
- package/build/icons/IconOpen.d.ts +3 -0
- package/build/icons/IconOpen.js +7 -0
- package/build/icons/IconOpen.js.map +1 -0
- package/build/icons/IconState.d.ts +3 -0
- package/build/icons/IconState.js +7 -0
- package/build/icons/IconState.js.map +1 -0
- package/build/icons/IconVacuum.d.ts +3 -0
- package/build/icons/IconVacuum.js +12 -0
- package/build/icons/IconVacuum.js.map +1 -0
- package/build/index.css +56 -0
- package/build/index.d.ts +87 -0
- package/build/index.js +85 -0
- package/build/index.js.map +1 -0
- package/build/modulefederation.admin.config.d.ts +13 -0
- package/build/modulefederation.admin.config.js +45 -0
- package/build/modulefederation.admin.config.js.map +1 -0
- package/build/types.d.ts +236 -0
- package/i18n/de.json +480 -0
- package/i18n/en.json +480 -0
- package/i18n/es.json +480 -0
- package/i18n/fr.json +480 -0
- package/i18n/it.json +475 -0
- package/i18n/nl.json +475 -0
- package/i18n/pl.json +475 -0
- package/i18n/pt.json +475 -0
- package/i18n/ru.json +475 -0
- package/i18n/uk.json +475 -0
- package/i18n/zh-cn.json +475 -0
- package/index.css +56 -0
- package/modulefederation.admin.config.d.ts +20 -0
- package/modulefederation.admin.config.js +54 -0
- package/package.json +86 -0
- package/tasksExample.js +91 -0
|
@@ -0,0 +1,665 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2020-2025, Denis Haev <dogafox@gmail.com>
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
import React, { Component, type JSX } from 'react';
|
|
8
|
+
import type { ThemeType, ThemeName, IobTheme, Translate } from '../types';
|
|
9
|
+
import type { Router } from './Router';
|
|
10
|
+
import { Connection } from '../Connection';
|
|
11
|
+
declare global {
|
|
12
|
+
interface Window {
|
|
13
|
+
sparkline: {
|
|
14
|
+
sparkline: (el: HTMLDivElement, data: number[]) => JSX.Element;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
declare module '@mui/material/Button' {
|
|
19
|
+
interface ButtonPropsColorOverrides {
|
|
20
|
+
grey: true;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
type ObjectEventType = 'new' | 'changed' | 'deleted';
|
|
24
|
+
interface ObjectEvent {
|
|
25
|
+
id: string;
|
|
26
|
+
obj?: ioBroker.Object;
|
|
27
|
+
type: ObjectEventType;
|
|
28
|
+
oldObj?: ioBroker.Object;
|
|
29
|
+
}
|
|
30
|
+
interface ObjectsWorker {
|
|
31
|
+
getObjects(update?: boolean): Promise<void | Record<string, ioBroker.Object>>;
|
|
32
|
+
registerHandler(cb: (events: ObjectEvent[]) => void): void;
|
|
33
|
+
unregisterHandler(cb: (events: ObjectEvent[]) => void, doNotUnsubscribe?: boolean): void;
|
|
34
|
+
}
|
|
35
|
+
interface CustomAdminColumnStored {
|
|
36
|
+
path: string;
|
|
37
|
+
name: string;
|
|
38
|
+
objTypes?: ioBroker.ObjectType[];
|
|
39
|
+
width?: number;
|
|
40
|
+
edit?: boolean;
|
|
41
|
+
type?: ioBroker.CommonType;
|
|
42
|
+
}
|
|
43
|
+
export interface TreeItemData {
|
|
44
|
+
id: string;
|
|
45
|
+
name: string;
|
|
46
|
+
obj?: ioBroker.Object;
|
|
47
|
+
/** Object ID in lower case for filtering */
|
|
48
|
+
fID?: string;
|
|
49
|
+
/** translated common.name in lower case for filtering */
|
|
50
|
+
fName?: string;
|
|
51
|
+
/** Link to parent item */
|
|
52
|
+
parent?: TreeItem;
|
|
53
|
+
level?: number;
|
|
54
|
+
icon?: string | JSX.Element | null;
|
|
55
|
+
/** If the item existing object or generated folder */
|
|
56
|
+
generated?: boolean;
|
|
57
|
+
title?: string;
|
|
58
|
+
/** if the item has "write" button (value=true, ack=false) */
|
|
59
|
+
button?: boolean;
|
|
60
|
+
/** If the item has read and write and is boolean */
|
|
61
|
+
switch?: boolean;
|
|
62
|
+
/** If the item is url linke */
|
|
63
|
+
url?: boolean;
|
|
64
|
+
/** if the item has custom settings in `common.custom` */
|
|
65
|
+
hasCustoms?: boolean;
|
|
66
|
+
/** If this item is visible */
|
|
67
|
+
visible?: boolean;
|
|
68
|
+
/** Is any of the children visible (not only directly children) */
|
|
69
|
+
hasVisibleChildren?: boolean;
|
|
70
|
+
/** Is any of the parents visible (not only directly parent) */
|
|
71
|
+
hasVisibleParent?: boolean;
|
|
72
|
+
/** Combination of `visible || hasVisibleChildren` */
|
|
73
|
+
sumVisibility?: boolean;
|
|
74
|
+
/** translated names of enumerations (functions) where this object is the member (or the parent), divided by comma */
|
|
75
|
+
funcs?: string;
|
|
76
|
+
/** is if the enums are from parent */
|
|
77
|
+
pef?: boolean;
|
|
78
|
+
/** translated names of enumerations (rooms) where this object is the member (or the parent), divided by comma */
|
|
79
|
+
rooms?: string;
|
|
80
|
+
/** is if the enums are from parent */
|
|
81
|
+
per?: boolean;
|
|
82
|
+
lang?: ioBroker.Languages;
|
|
83
|
+
state?: {
|
|
84
|
+
valTextRx?: JSX.Element[] | null;
|
|
85
|
+
style?: React.CSSProperties;
|
|
86
|
+
};
|
|
87
|
+
aclTooltip?: null | JSX.Element;
|
|
88
|
+
}
|
|
89
|
+
export interface ObjectBrowserCustomFilter {
|
|
90
|
+
type?: ioBroker.ObjectType | ioBroker.ObjectType[];
|
|
91
|
+
common?: {
|
|
92
|
+
type?: ioBroker.CommonType | ioBroker.CommonType[];
|
|
93
|
+
role?: string | string[];
|
|
94
|
+
custom?: '_' | '_dataSources' | true | string | string[];
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
export interface TreeItem {
|
|
98
|
+
id?: string;
|
|
99
|
+
data: TreeItemData;
|
|
100
|
+
children?: TreeItem[];
|
|
101
|
+
}
|
|
102
|
+
/** Converts ioB pattern into regex */
|
|
103
|
+
export declare function pattern2RegEx(pattern: string): string;
|
|
104
|
+
export declare function filterRoles(roleArray: {
|
|
105
|
+
role: string;
|
|
106
|
+
type: ioBroker.CommonType;
|
|
107
|
+
}[], type: ioBroker.CommonType, defaultRoles?: {
|
|
108
|
+
role: string;
|
|
109
|
+
type: ioBroker.CommonType;
|
|
110
|
+
}[]): string[];
|
|
111
|
+
export declare function getSelectIdIconFromObjects(objects: Record<string, ioBroker.Object>, id: string, lang: ioBroker.Languages, imagePrefix?: string): string | JSX.Element | null;
|
|
112
|
+
export declare const ITEM_IMAGES: Record<string, JSX.Element>;
|
|
113
|
+
export interface ObjectBrowserFilter {
|
|
114
|
+
id?: string;
|
|
115
|
+
name?: string;
|
|
116
|
+
room?: string[];
|
|
117
|
+
func?: string[];
|
|
118
|
+
role?: string[];
|
|
119
|
+
type?: string[];
|
|
120
|
+
custom?: string[];
|
|
121
|
+
expertMode?: boolean;
|
|
122
|
+
}
|
|
123
|
+
interface AdapterColumn {
|
|
124
|
+
adapter: string;
|
|
125
|
+
id: string;
|
|
126
|
+
name: string;
|
|
127
|
+
path: string[];
|
|
128
|
+
pathText: string;
|
|
129
|
+
edit?: boolean;
|
|
130
|
+
type?: 'boolean' | 'string' | 'number';
|
|
131
|
+
objTypes?: ioBroker.ObjectType[];
|
|
132
|
+
align?: 'center' | 'left' | 'right';
|
|
133
|
+
}
|
|
134
|
+
interface ObjectBrowserEditRoleProps {
|
|
135
|
+
roleArray: {
|
|
136
|
+
role: string;
|
|
137
|
+
type: ioBroker.CommonType;
|
|
138
|
+
}[];
|
|
139
|
+
id: string;
|
|
140
|
+
socket: Connection;
|
|
141
|
+
onClose: (obj?: ioBroker.Object | null) => void;
|
|
142
|
+
t: Translate;
|
|
143
|
+
commonType: ioBroker.CommonType;
|
|
144
|
+
}
|
|
145
|
+
interface ObjectViewFileDialogProps {
|
|
146
|
+
t: Translate;
|
|
147
|
+
socket: Connection;
|
|
148
|
+
obj: ioBroker.AnyObject;
|
|
149
|
+
onClose: () => void;
|
|
150
|
+
}
|
|
151
|
+
interface DragWrapperProps {
|
|
152
|
+
item: TreeItem;
|
|
153
|
+
className?: string;
|
|
154
|
+
style?: React.CSSProperties;
|
|
155
|
+
children: JSX.Element | null;
|
|
156
|
+
}
|
|
157
|
+
interface ObjectCustomDialogProps {
|
|
158
|
+
allVisibleObjects: boolean;
|
|
159
|
+
customsInstances: string[];
|
|
160
|
+
expertMode?: boolean;
|
|
161
|
+
isFloatComma: boolean;
|
|
162
|
+
lang: ioBroker.Languages;
|
|
163
|
+
objectIDs: string[];
|
|
164
|
+
objects: Record<string, ioBroker.Object>;
|
|
165
|
+
onClose: () => void;
|
|
166
|
+
reportChangedIds: (ids: string[]) => void;
|
|
167
|
+
socket: Connection;
|
|
168
|
+
systemConfig: ioBroker.SystemConfigObject;
|
|
169
|
+
t: Translate;
|
|
170
|
+
theme: IobTheme;
|
|
171
|
+
themeName: ThemeName;
|
|
172
|
+
themeType: ThemeType;
|
|
173
|
+
}
|
|
174
|
+
interface ObjectMoveRenameDialogProps {
|
|
175
|
+
childrenIds: string[];
|
|
176
|
+
expertMode: boolean;
|
|
177
|
+
id: string;
|
|
178
|
+
objectType: ioBroker.ObjectType | undefined;
|
|
179
|
+
onClose: () => void;
|
|
180
|
+
socket: Connection;
|
|
181
|
+
t: Translate;
|
|
182
|
+
theme: IobTheme;
|
|
183
|
+
}
|
|
184
|
+
interface ObjectBrowserValueProps {
|
|
185
|
+
/** State type */
|
|
186
|
+
type: 'states' | 'string' | 'number' | 'boolean' | 'json';
|
|
187
|
+
/** State role */
|
|
188
|
+
role: string;
|
|
189
|
+
/** common.states */
|
|
190
|
+
states: Record<string, string> | null;
|
|
191
|
+
/** The state value */
|
|
192
|
+
value: string | number | boolean | null;
|
|
193
|
+
/** If expert mode is enabled */
|
|
194
|
+
expertMode: boolean;
|
|
195
|
+
onClose: (newValue?: {
|
|
196
|
+
val: ioBroker.StateValue;
|
|
197
|
+
ack: boolean;
|
|
198
|
+
q: ioBroker.STATE_QUALITY[keyof ioBroker.STATE_QUALITY];
|
|
199
|
+
expire: number | undefined;
|
|
200
|
+
}) => void;
|
|
201
|
+
/** Configured theme */
|
|
202
|
+
themeType: ThemeType;
|
|
203
|
+
theme: IobTheme;
|
|
204
|
+
socket: Connection;
|
|
205
|
+
defaultHistory: string;
|
|
206
|
+
dateFormat: string;
|
|
207
|
+
object: ioBroker.StateObject;
|
|
208
|
+
isFloatComma: boolean;
|
|
209
|
+
t: Translate;
|
|
210
|
+
lang: ioBroker.Languages;
|
|
211
|
+
width?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
212
|
+
}
|
|
213
|
+
interface ObjectBrowserEditObjectProps {
|
|
214
|
+
socket: Connection;
|
|
215
|
+
obj: ioBroker.AnyObject;
|
|
216
|
+
roleArray: {
|
|
217
|
+
role: string;
|
|
218
|
+
type: ioBroker.CommonType;
|
|
219
|
+
}[];
|
|
220
|
+
expertMode: boolean;
|
|
221
|
+
themeType: ThemeType;
|
|
222
|
+
theme: IobTheme;
|
|
223
|
+
aliasTab: boolean;
|
|
224
|
+
onClose: (obj?: ioBroker.AnyObject) => void;
|
|
225
|
+
dialogName?: string;
|
|
226
|
+
objects: Record<string, ioBroker.AnyObject>;
|
|
227
|
+
dateFormat: string;
|
|
228
|
+
isFloatComma: boolean;
|
|
229
|
+
onNewObject: (obj: ioBroker.AnyObject) => void;
|
|
230
|
+
t: Translate;
|
|
231
|
+
width?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
232
|
+
}
|
|
233
|
+
export interface ObjectAliasEditorProps {
|
|
234
|
+
t: Translate;
|
|
235
|
+
roleArray: {
|
|
236
|
+
role: string;
|
|
237
|
+
type: ioBroker.CommonType;
|
|
238
|
+
}[];
|
|
239
|
+
socket: Connection;
|
|
240
|
+
objects: Record<string, ioBroker.AnyObject>;
|
|
241
|
+
onRedirect: (id: string, delay?: number) => void;
|
|
242
|
+
obj: ioBroker.AnyObject;
|
|
243
|
+
onClose: () => void;
|
|
244
|
+
}
|
|
245
|
+
export type ObjectBrowserColumn = 'name' | 'type' | 'role' | 'room' | 'func' | 'val' | 'buttons';
|
|
246
|
+
type ObjectBrowserPossibleColumns = 'name' | 'type' | 'role' | 'room' | 'func' | 'val' | 'buttons' | 'changedFrom' | 'qualityCode' | 'timestamp' | 'lastChange' | 'id';
|
|
247
|
+
export interface ObjectBrowserProps {
|
|
248
|
+
/** where to store settings in localStorage */
|
|
249
|
+
dialogName?: string;
|
|
250
|
+
defaultFilters?: ObjectBrowserFilter;
|
|
251
|
+
selected?: string | string[];
|
|
252
|
+
onSelect?: (selected: string | string[], name: string | null, isDouble?: boolean) => void;
|
|
253
|
+
onFilterChanged?: (newFilter: ObjectBrowserFilter) => void;
|
|
254
|
+
socket: Connection;
|
|
255
|
+
showExpertButton?: boolean;
|
|
256
|
+
expertMode?: boolean;
|
|
257
|
+
imagePrefix?: string;
|
|
258
|
+
themeName: ThemeName;
|
|
259
|
+
themeType: ThemeType;
|
|
260
|
+
/** will be filled by withWidth */
|
|
261
|
+
width?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
262
|
+
theme: IobTheme;
|
|
263
|
+
t: Translate;
|
|
264
|
+
lang: ioBroker.Languages;
|
|
265
|
+
multiSelect?: boolean;
|
|
266
|
+
notEditable?: boolean;
|
|
267
|
+
foldersFirst?: boolean;
|
|
268
|
+
disableColumnSelector?: boolean;
|
|
269
|
+
isFloatComma?: boolean;
|
|
270
|
+
dateFormat?: string;
|
|
271
|
+
levelPadding?: number;
|
|
272
|
+
/** Allow selection of non-objects (virtual branches) */
|
|
273
|
+
allowNonObjects?: boolean;
|
|
274
|
+
/** Called when all objects are loaded */
|
|
275
|
+
onAllLoaded?: () => void;
|
|
276
|
+
objectCustomDialog?: React.FC<ObjectCustomDialogProps>;
|
|
277
|
+
objectMoveRenameDialog?: React.FC<ObjectMoveRenameDialogProps>;
|
|
278
|
+
objectAddBoolean?: boolean;
|
|
279
|
+
objectEditBoolean?: boolean;
|
|
280
|
+
objectStatesView?: boolean;
|
|
281
|
+
objectImportExport?: boolean;
|
|
282
|
+
objectEditOfAccessControl?: boolean;
|
|
283
|
+
/** modal add object */
|
|
284
|
+
modalNewObject?: (oBrowser: ObjectBrowserClass) => JSX.Element;
|
|
285
|
+
/** modal Edit Of Access Control */
|
|
286
|
+
modalEditOfAccessControl: (oBrowser: ObjectBrowserClass, data: TreeItemData) => JSX.Element;
|
|
287
|
+
onObjectDelete?: (id: string, hasChildren: boolean, objectExists: boolean, childrenCount: number) => void;
|
|
288
|
+
/**
|
|
289
|
+
* Optional filter
|
|
290
|
+
* `{common: {custom: true}}` - show only objects with some custom settings
|
|
291
|
+
* `{common: {custom: 'sql.0'}}` - show only objects with sql.0 custom settings (only of the specific instance)
|
|
292
|
+
* `{common: {custom: '_dataSources'}}` - show only objects of adapters `influxdb' or 'sql' or 'history'
|
|
293
|
+
* `{common: {custom: 'adapterName.'}}` - show only objects of custom settings of specific adapter (all instances)
|
|
294
|
+
* `{type: 'channel'}` - show only channels
|
|
295
|
+
* `{type: ['channel', 'device']}` - show only channels and devices
|
|
296
|
+
* `{common: {type: 'number'}` - show only states of type 'number
|
|
297
|
+
* `{common: {type: ['number', 'string']}` - show only states of type 'number and string
|
|
298
|
+
* `{common: {role: ['switch']}` - show only states with roles starting from switch
|
|
299
|
+
* `{common: {role: ['switch', 'button']}` - show only states with roles starting from `switch` and `button`
|
|
300
|
+
*/
|
|
301
|
+
customFilter: ObjectBrowserCustomFilter;
|
|
302
|
+
objectBrowserValue?: React.FC<ObjectBrowserValueProps>;
|
|
303
|
+
objectBrowserEditObject?: React.FC<ObjectBrowserEditObjectProps>;
|
|
304
|
+
/** on edit alias */
|
|
305
|
+
objectBrowserAliasEditor?: React.FC<ObjectAliasEditorProps>;
|
|
306
|
+
/** on Edit role */
|
|
307
|
+
objectBrowserEditRole?: React.FC<ObjectBrowserEditRoleProps>;
|
|
308
|
+
/** on view file state */
|
|
309
|
+
objectBrowserViewFile?: React.FC<ObjectViewFileDialogProps>;
|
|
310
|
+
router?: typeof Router;
|
|
311
|
+
types?: ioBroker.ObjectType[];
|
|
312
|
+
/** Possible columns: ['name', 'type', 'role', 'room', 'func', 'val', 'buttons'] */
|
|
313
|
+
columns?: ObjectBrowserColumn[];
|
|
314
|
+
/** Shows only elements of this root */
|
|
315
|
+
root?: string;
|
|
316
|
+
/** cache of objects */
|
|
317
|
+
objectsWorker?: ObjectsWorker;
|
|
318
|
+
/**
|
|
319
|
+
* function to filter out all unnecessary objects. It cannot be used together with "types"
|
|
320
|
+
* Example for function: `obj => obj.common?.type === 'boolean'` to show only boolean states
|
|
321
|
+
*/
|
|
322
|
+
filterFunc?: (obj: ioBroker.Object) => boolean;
|
|
323
|
+
/** Used for enums dragging */
|
|
324
|
+
DragWrapper?: React.FC<DragWrapperProps>;
|
|
325
|
+
/** let DragWrapper know about objects to get the icons */
|
|
326
|
+
setObjectsReference?: (objects: Record<string, ioBroker.Object>) => void;
|
|
327
|
+
dragEnabled?: boolean;
|
|
328
|
+
}
|
|
329
|
+
interface ObjectBrowserState {
|
|
330
|
+
loaded: boolean;
|
|
331
|
+
foldersFirst: boolean;
|
|
332
|
+
selected: string[];
|
|
333
|
+
focused: string;
|
|
334
|
+
selectedNonObject: string;
|
|
335
|
+
filter: ObjectBrowserFilter;
|
|
336
|
+
filterKey: number;
|
|
337
|
+
depth: number;
|
|
338
|
+
expandAllVisible: boolean;
|
|
339
|
+
expanded: string[];
|
|
340
|
+
toast: string;
|
|
341
|
+
scrollBarWidth: number;
|
|
342
|
+
customDialog: null | string[];
|
|
343
|
+
customDialogAll?: boolean;
|
|
344
|
+
editObjectDialog: string;
|
|
345
|
+
editObjectAlias: boolean;
|
|
346
|
+
viewFileDialog: string;
|
|
347
|
+
showAliasEditor: string;
|
|
348
|
+
enumDialog: null | {
|
|
349
|
+
item: TreeItem;
|
|
350
|
+
type: 'room' | 'func';
|
|
351
|
+
enumsOriginal: string;
|
|
352
|
+
};
|
|
353
|
+
enumDialogEnums?: null | string[];
|
|
354
|
+
roleDialog: null | string;
|
|
355
|
+
statesView: boolean;
|
|
356
|
+
/** ['name', 'type', 'role', 'room', 'func', 'val', 'buttons'] */
|
|
357
|
+
columns: ObjectBrowserPossibleColumns[] | null;
|
|
358
|
+
columnsForAdmin: Record<string, CustomAdminColumnStored[]> | null;
|
|
359
|
+
columnsSelectorShow: boolean;
|
|
360
|
+
columnsAuto: boolean;
|
|
361
|
+
columnsWidths: Record<string, number>;
|
|
362
|
+
columnsDialogTransparent: number;
|
|
363
|
+
columnsEditCustomDialog: null | {
|
|
364
|
+
obj: ioBroker.Object;
|
|
365
|
+
item: TreeItem;
|
|
366
|
+
it: AdapterColumn;
|
|
367
|
+
};
|
|
368
|
+
customColumnDialogValueChanged: boolean;
|
|
369
|
+
showExportDialog: false | number;
|
|
370
|
+
showAllExportOptions: boolean;
|
|
371
|
+
linesEnabled: boolean;
|
|
372
|
+
showDescription: boolean;
|
|
373
|
+
showContextMenu: {
|
|
374
|
+
item: TreeItem;
|
|
375
|
+
position: {
|
|
376
|
+
left: number;
|
|
377
|
+
top: number;
|
|
378
|
+
};
|
|
379
|
+
subItem?: string;
|
|
380
|
+
subAnchor?: HTMLLIElement;
|
|
381
|
+
} | null;
|
|
382
|
+
noStatesByExportImport: boolean;
|
|
383
|
+
beautifyJsonExport: boolean;
|
|
384
|
+
excludeSystemRepositoriesFromExport: boolean;
|
|
385
|
+
excludeTranslations: boolean;
|
|
386
|
+
updating?: boolean;
|
|
387
|
+
modalNewObj?: null | {
|
|
388
|
+
id: string;
|
|
389
|
+
initialType?: ioBroker.ObjectType;
|
|
390
|
+
initialStateType?: ioBroker.CommonType;
|
|
391
|
+
};
|
|
392
|
+
error?: any;
|
|
393
|
+
modalEditOfAccess?: boolean;
|
|
394
|
+
modalEditOfAccessObjData?: TreeItemData;
|
|
395
|
+
updateOpened?: boolean;
|
|
396
|
+
tooltipInfo: null | {
|
|
397
|
+
el: JSX.Element[];
|
|
398
|
+
id: string;
|
|
399
|
+
};
|
|
400
|
+
/** Show the menu with aliases for state */
|
|
401
|
+
aliasMenu: string;
|
|
402
|
+
/** Show rename dialog */
|
|
403
|
+
showRenameDialog: {
|
|
404
|
+
id: string;
|
|
405
|
+
childrenIds: string[];
|
|
406
|
+
} | null;
|
|
407
|
+
}
|
|
408
|
+
export declare class ObjectBrowserClass extends Component<ObjectBrowserProps, ObjectBrowserState> {
|
|
409
|
+
private info;
|
|
410
|
+
private localStorage;
|
|
411
|
+
private lastAppliedFilter;
|
|
412
|
+
private readonly tableRef;
|
|
413
|
+
private readonly filterRefs;
|
|
414
|
+
private pausedSubscribes;
|
|
415
|
+
private selectFirst;
|
|
416
|
+
private root;
|
|
417
|
+
private readonly states;
|
|
418
|
+
private subscribes;
|
|
419
|
+
private unsubscribeTimer;
|
|
420
|
+
private statesUpdateTimer;
|
|
421
|
+
private objectsUpdateTimer;
|
|
422
|
+
private filterTimer;
|
|
423
|
+
private readonly visibleCols;
|
|
424
|
+
private readonly texts;
|
|
425
|
+
private readonly possibleCols;
|
|
426
|
+
private readonly imagePrefix;
|
|
427
|
+
private adapterColumns;
|
|
428
|
+
private styleTheme;
|
|
429
|
+
private edit;
|
|
430
|
+
private readonly levelPadding;
|
|
431
|
+
private customWidth;
|
|
432
|
+
private resizeTimeout;
|
|
433
|
+
private resizerNextName;
|
|
434
|
+
private resizerActiveName;
|
|
435
|
+
private resizerCurrentWidths;
|
|
436
|
+
private resizeLeft;
|
|
437
|
+
private resizerOldWidth;
|
|
438
|
+
private resizerMin;
|
|
439
|
+
private resizerNextMin;
|
|
440
|
+
private resizerOldWidthNext;
|
|
441
|
+
private resizerPosition;
|
|
442
|
+
private resizerActiveDiv;
|
|
443
|
+
private resizerNextDiv;
|
|
444
|
+
private storedWidths;
|
|
445
|
+
private systemConfig;
|
|
446
|
+
objects: Record<string, ioBroker.Object>;
|
|
447
|
+
private defaultHistory;
|
|
448
|
+
private cltrPressed;
|
|
449
|
+
private columnsVisibility;
|
|
450
|
+
private changedIds;
|
|
451
|
+
private contextMenu;
|
|
452
|
+
private recordStates;
|
|
453
|
+
private styles;
|
|
454
|
+
private customColumnDialog;
|
|
455
|
+
/** Namespaces which are allowed to be edited by non-expert users */
|
|
456
|
+
static NON_EXPERT_NAMESPACES: string[];
|
|
457
|
+
constructor(props: ObjectBrowserProps);
|
|
458
|
+
loadAllObjects(update?: boolean): Promise<void>;
|
|
459
|
+
/**
|
|
460
|
+
* Check if it is a non-expert id
|
|
461
|
+
*/
|
|
462
|
+
static isNonExpertId(
|
|
463
|
+
/** id to test */
|
|
464
|
+
id: string): boolean;
|
|
465
|
+
private expandAllSelected;
|
|
466
|
+
/**
|
|
467
|
+
* @param isDouble is double click
|
|
468
|
+
*/
|
|
469
|
+
private onAfterSelect;
|
|
470
|
+
private static getDerivedStateFromProps;
|
|
471
|
+
/**
|
|
472
|
+
* Called when component is mounted.
|
|
473
|
+
*/
|
|
474
|
+
componentDidMount(): Promise<void>;
|
|
475
|
+
onKeyPress: (event: KeyboardEvent) => void;
|
|
476
|
+
/**
|
|
477
|
+
* Called when component is unmounted.
|
|
478
|
+
*/
|
|
479
|
+
componentWillUnmount(): void;
|
|
480
|
+
/**
|
|
481
|
+
* Show the deletion dialog for a given object
|
|
482
|
+
*/
|
|
483
|
+
showDeleteDialog(options: {
|
|
484
|
+
id: string;
|
|
485
|
+
obj: ioBroker.Object;
|
|
486
|
+
item: TreeItem;
|
|
487
|
+
}): void;
|
|
488
|
+
/**
|
|
489
|
+
* Context menu handler.
|
|
490
|
+
*/
|
|
491
|
+
onContextMenu: (e: MouseEvent) => void;
|
|
492
|
+
/**
|
|
493
|
+
* Called when component is mounted.
|
|
494
|
+
*/
|
|
495
|
+
refreshComponent(): void;
|
|
496
|
+
/**
|
|
497
|
+
* Renders the error dialog.
|
|
498
|
+
*/
|
|
499
|
+
renderErrorDialog(): JSX.Element | null;
|
|
500
|
+
/**
|
|
501
|
+
* Show the error dialog.
|
|
502
|
+
*/
|
|
503
|
+
showError(error: any): void;
|
|
504
|
+
/**
|
|
505
|
+
* Called when an item is selected/deselected.
|
|
506
|
+
*/
|
|
507
|
+
onSelect(toggleItem: string, isDouble?: boolean, cb?: () => void): void;
|
|
508
|
+
private _renderDefinedList;
|
|
509
|
+
/**
|
|
510
|
+
* Renders the columns' selector.
|
|
511
|
+
*/
|
|
512
|
+
renderColumnsSelectorDialog(): JSX.Element | null;
|
|
513
|
+
private getAdditionalColumns;
|
|
514
|
+
private checkUnsubscribes;
|
|
515
|
+
/**
|
|
516
|
+
* Find an item.
|
|
517
|
+
*/
|
|
518
|
+
findItem(id: string, _parts?: string[], _root?: TreeItem | null, _partyId?: string): TreeItem | null;
|
|
519
|
+
/**
|
|
520
|
+
* Called when a state changes.
|
|
521
|
+
*/
|
|
522
|
+
onStateChange: (id: string, state?: ioBroker.State | null) => void;
|
|
523
|
+
private parseObjectForAdmins;
|
|
524
|
+
onObjectChangeFromWorker: (events: ObjectEvent[]) => void;
|
|
525
|
+
onObjectChange: (id: string, obj?: ioBroker.Object | null) => void;
|
|
526
|
+
afterObjectUpdated(): void;
|
|
527
|
+
updateAliases(aliasId: string): void;
|
|
528
|
+
/**
|
|
529
|
+
* Processes a single element in regard to certain filters, columns for admin and updates object dict
|
|
530
|
+
*
|
|
531
|
+
* @param id The id of the object
|
|
532
|
+
* @param obj The object itself
|
|
533
|
+
* @returns Returns an object containing the new state (if any) and whether the object was filtered.
|
|
534
|
+
*/
|
|
535
|
+
processOnObjectChangeElement(id: string, obj?: ioBroker.Object | null): {
|
|
536
|
+
filtered: boolean;
|
|
537
|
+
newInnerState: null | {
|
|
538
|
+
columnsForAdmin: Record<string, CustomAdminColumnStored[]> | null;
|
|
539
|
+
};
|
|
540
|
+
};
|
|
541
|
+
private subscribe;
|
|
542
|
+
private unsubscribe;
|
|
543
|
+
private pauseSubscribe;
|
|
544
|
+
private onFilter;
|
|
545
|
+
clearFilter(): void;
|
|
546
|
+
isFilterEmpty(): boolean;
|
|
547
|
+
private getFilterInput;
|
|
548
|
+
private getFilterSelect;
|
|
549
|
+
private getFilterSelectRole;
|
|
550
|
+
private getFilterSelectRoom;
|
|
551
|
+
private getFilterSelectFunction;
|
|
552
|
+
private getFilterSelectType;
|
|
553
|
+
private getFilterSelectCustoms;
|
|
554
|
+
private onExpandAll;
|
|
555
|
+
private onCollapseAll;
|
|
556
|
+
private expandDepth;
|
|
557
|
+
private static collapseDepth;
|
|
558
|
+
private onExpandVisible;
|
|
559
|
+
private onStatesViewVisible;
|
|
560
|
+
private onCollapseVisible;
|
|
561
|
+
private getEnumsForId;
|
|
562
|
+
private _createAllEnums;
|
|
563
|
+
private loadObjects;
|
|
564
|
+
_getSelectedIdsForExport(): string[];
|
|
565
|
+
/**
|
|
566
|
+
* Exports the selected objects based on the given options and triggers file generation
|
|
567
|
+
*/
|
|
568
|
+
private _exportObjects;
|
|
569
|
+
renderExportDialog(): JSX.Element | null;
|
|
570
|
+
renderRenameDialog(): JSX.Element | null;
|
|
571
|
+
private handleJsonUpload;
|
|
572
|
+
toolTipObjectCreating: () => JSX.Element[] | string;
|
|
573
|
+
/**
|
|
574
|
+
* Renders the toolbar.
|
|
575
|
+
*/
|
|
576
|
+
getToolbar(): JSX.Element;
|
|
577
|
+
private toggleExpanded;
|
|
578
|
+
private onCopy;
|
|
579
|
+
renderTooltipAccessControl: (acl: ioBroker.StateACL) => null | JSX.Element;
|
|
580
|
+
renderColumnButtons(id: string, item: TreeItem): (JSX.Element | null)[] | JSX.Element | null;
|
|
581
|
+
private readHistory;
|
|
582
|
+
private getTooltipInfo;
|
|
583
|
+
/**
|
|
584
|
+
* This function renders the value in different forms in the table
|
|
585
|
+
*
|
|
586
|
+
* @param id state ID
|
|
587
|
+
* @param item Item
|
|
588
|
+
* @param narrowStyleWithDetails if use mobile view
|
|
589
|
+
*/
|
|
590
|
+
private renderColumnValue;
|
|
591
|
+
private _syncEnum;
|
|
592
|
+
private syncEnum;
|
|
593
|
+
private renderEnumDialog;
|
|
594
|
+
private renderEditRoleDialog;
|
|
595
|
+
private onColumnsEditCustomDialogClose;
|
|
596
|
+
private renderColumnsEditCustomDialog;
|
|
597
|
+
private static getCustomValue;
|
|
598
|
+
private static setCustomValue;
|
|
599
|
+
/**
|
|
600
|
+
* Renders a custom value.
|
|
601
|
+
*/
|
|
602
|
+
renderCustomValue(obj: ioBroker.Object, it: AdapterColumn, item: TreeItem): JSX.Element | null;
|
|
603
|
+
renderAliasLink(id: string, index?: number, customStyle?: Record<string, any>): JSX.Element | null;
|
|
604
|
+
/**
|
|
605
|
+
* Renders a leaf.
|
|
606
|
+
*/
|
|
607
|
+
renderLeaf(item: TreeItem, isExpanded: boolean | undefined, counter: {
|
|
608
|
+
count: number;
|
|
609
|
+
}): {
|
|
610
|
+
row: JSX.Element;
|
|
611
|
+
details: JSX.Element | null;
|
|
612
|
+
};
|
|
613
|
+
/**
|
|
614
|
+
* Renders an item.
|
|
615
|
+
*/
|
|
616
|
+
renderItem(root: TreeItem, isExpanded: boolean | undefined, counter?: {
|
|
617
|
+
count: number;
|
|
618
|
+
}): JSX.Element[];
|
|
619
|
+
private calculateColumnsVisibility;
|
|
620
|
+
resizerMouseMove: (e: MouseEvent) => void;
|
|
621
|
+
resizerMouseUp: () => void;
|
|
622
|
+
resizerMouseDown: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
623
|
+
/**
|
|
624
|
+
* Handle keyboard events for navigation
|
|
625
|
+
*/
|
|
626
|
+
navigateKeyPress(event: React.KeyboardEvent): void;
|
|
627
|
+
/**
|
|
628
|
+
* Find the id from the root
|
|
629
|
+
*
|
|
630
|
+
* @param root The current root
|
|
631
|
+
* @param id The object id to find
|
|
632
|
+
*/
|
|
633
|
+
private static getItemFromRoot;
|
|
634
|
+
resizerReset: () => void;
|
|
635
|
+
/**
|
|
636
|
+
* Render the right handle for resizing
|
|
637
|
+
*/
|
|
638
|
+
renderHandleRight(): JSX.Element;
|
|
639
|
+
private renderHeader;
|
|
640
|
+
private renderToast;
|
|
641
|
+
/**
|
|
642
|
+
* Called when component is updated.
|
|
643
|
+
*/
|
|
644
|
+
componentDidUpdate(): void;
|
|
645
|
+
scrollToItem(id: string): void;
|
|
646
|
+
private renderCustomDialog;
|
|
647
|
+
private onUpdate;
|
|
648
|
+
private renderEditObjectDialog;
|
|
649
|
+
private renderViewObjectFileDialog;
|
|
650
|
+
private renderAliasEditorDialog;
|
|
651
|
+
showAddDataPointDialog(id: string, initialType: ioBroker.ObjectType, initialStateType?: ioBroker.CommonType): void;
|
|
652
|
+
/** Renders the aliases list for one state (if more than 2) */
|
|
653
|
+
private renderAliasMenu;
|
|
654
|
+
/**
|
|
655
|
+
* Renders the right mouse button context menu
|
|
656
|
+
*/
|
|
657
|
+
private renderContextMenu;
|
|
658
|
+
private renderEditValueDialog;
|
|
659
|
+
/**
|
|
660
|
+
* The rendering method of this component.
|
|
661
|
+
*/
|
|
662
|
+
render(): JSX.Element;
|
|
663
|
+
}
|
|
664
|
+
export declare const ObjectBrowser: (props: Record<string, any>) => JSX.Element;
|
|
665
|
+
export {};
|