@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
package/build/types.d.ts
ADDED
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import type { JSX, CSSProperties } from 'react';
|
|
2
|
+
import type { Theme as MuiTheme, Palette as MuiPalette } from '@mui/material/styles';
|
|
3
|
+
import type { AdminConnection, Connection } from '@iobroker/socket-client';
|
|
4
|
+
|
|
5
|
+
import type { LegacyConnection } from './LegacyConnection';
|
|
6
|
+
import type Router from './Components/Router';
|
|
7
|
+
|
|
8
|
+
export type Translate = (key: string, ...args: (string | number | boolean)[]) => string;
|
|
9
|
+
|
|
10
|
+
export type LogMessage = {
|
|
11
|
+
/** Log message */
|
|
12
|
+
message: string;
|
|
13
|
+
/** origin */
|
|
14
|
+
from: string;
|
|
15
|
+
/** timestamp in ms */
|
|
16
|
+
ts: number;
|
|
17
|
+
/** Log message */
|
|
18
|
+
severity: ioBroker.LogLevel;
|
|
19
|
+
/** unique ID of the message */
|
|
20
|
+
_id: number;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Properties for the connection to the admin or web instance.
|
|
25
|
+
*/
|
|
26
|
+
export interface ConnectionProps {
|
|
27
|
+
/** The socket name. */
|
|
28
|
+
name?: string;
|
|
29
|
+
/** State IDs to always automatically subscribe to. */
|
|
30
|
+
autoSubscribes?: string[];
|
|
31
|
+
/** Automatically subscribe to logging. */
|
|
32
|
+
autoSubscribeLog?: boolean;
|
|
33
|
+
/** The protocol to use for the socket.io connection. */
|
|
34
|
+
protocol?: 'http:' | 'https:';
|
|
35
|
+
/** The host name to use for the socket.io connection. */
|
|
36
|
+
host?: string;
|
|
37
|
+
/** The port to use for the socket.io connection. */
|
|
38
|
+
port?: string | number;
|
|
39
|
+
/** The socket.io connection timeout. */
|
|
40
|
+
ioTimeout?: number;
|
|
41
|
+
/** Flag to indicate if all objects should be loaded or not. Default true (not loaded) */
|
|
42
|
+
doNotLoadAllObjects?: boolean;
|
|
43
|
+
/** Flag to indicate if AccessControlList for current user will be loaded or not. Default true (not loaded) */
|
|
44
|
+
doNotLoadACL?: boolean;
|
|
45
|
+
/** Progress callback. */
|
|
46
|
+
onProgress?: (progress: number) => void;
|
|
47
|
+
/** Ready callback. */
|
|
48
|
+
onReady?: (objects: Record<string, ioBroker.Object>) => void;
|
|
49
|
+
/** Log callback. */
|
|
50
|
+
onLog?: (text: LogMessage) => void;
|
|
51
|
+
/** Error callback. */
|
|
52
|
+
onError?: (error: any) => void;
|
|
53
|
+
/** Object change callback. */
|
|
54
|
+
onObjectChange?: ioBroker.ObjectChangeHandler;
|
|
55
|
+
/** Language callback */
|
|
56
|
+
onLanguage?: (lang: ioBroker.Languages) => void;
|
|
57
|
+
/** Special access token */
|
|
58
|
+
token?: string;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface OldObject {
|
|
62
|
+
_id: string;
|
|
63
|
+
type: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export type ObjectChangeHandler = (
|
|
67
|
+
id: string,
|
|
68
|
+
obj: ioBroker.Object | null | undefined,
|
|
69
|
+
oldObj: OldObject,
|
|
70
|
+
) => void | Promise<void>;
|
|
71
|
+
|
|
72
|
+
export type ThemeName = 'dark' | 'light' | 'colored' | 'blue' | 'PT' | 'DX';
|
|
73
|
+
export type ThemeType = 'dark' | 'light';
|
|
74
|
+
|
|
75
|
+
export interface GenericAppProps {
|
|
76
|
+
/** Adapter instance number if known, else will be determined from url */
|
|
77
|
+
instance?: number;
|
|
78
|
+
/** The name of the adapter. */
|
|
79
|
+
adapterName?: string;
|
|
80
|
+
/** Should the bottom buttons be shown (default: true). */
|
|
81
|
+
bottomButtons?: boolean;
|
|
82
|
+
/** Additional translations. */
|
|
83
|
+
translations?: { [lang in ioBroker.Languages]?: Record<string, string> };
|
|
84
|
+
/** Fields that should be encrypted/decrypted. */
|
|
85
|
+
encryptedFields?: string[];
|
|
86
|
+
/** Socket.io configuration. */
|
|
87
|
+
socket?: ConnectionProps;
|
|
88
|
+
/** Desired connection object */
|
|
89
|
+
Connection?: LegacyConnection | Connection | AdminConnection;
|
|
90
|
+
/** sentry DNS */
|
|
91
|
+
sentryDSN?: string;
|
|
92
|
+
/** Callback if user changes the theme. Call it to trigger change */
|
|
93
|
+
onThemeChange?: (newThemeName: ThemeName) => void;
|
|
94
|
+
classes?: Record<string, string>;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface GenericAppSettings extends GenericAppProps {
|
|
98
|
+
/** Don't load all objects on start-up. */
|
|
99
|
+
doNotLoadAllObjects?: boolean;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
interface Palette extends MuiPalette {
|
|
103
|
+
mode: ThemeType;
|
|
104
|
+
expert: string;
|
|
105
|
+
grey: {
|
|
106
|
+
main: string;
|
|
107
|
+
dark: string;
|
|
108
|
+
50: string;
|
|
109
|
+
100: string;
|
|
110
|
+
200: string;
|
|
111
|
+
300: string;
|
|
112
|
+
400: string;
|
|
113
|
+
500: string;
|
|
114
|
+
600: string;
|
|
115
|
+
700: string;
|
|
116
|
+
800: string;
|
|
117
|
+
900: string;
|
|
118
|
+
A100: string;
|
|
119
|
+
A200: string;
|
|
120
|
+
A400: string;
|
|
121
|
+
A700: string;
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export interface IobTheme extends MuiTheme {
|
|
126
|
+
name: ThemeName;
|
|
127
|
+
palette: Palette;
|
|
128
|
+
toolbar: CSSProperties;
|
|
129
|
+
saveToolbar: {
|
|
130
|
+
background: string;
|
|
131
|
+
button: CSSProperties;
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export type Width = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
136
|
+
|
|
137
|
+
export interface GenericAppState {
|
|
138
|
+
loaded: boolean;
|
|
139
|
+
themeType: ThemeType;
|
|
140
|
+
themeName: ThemeName;
|
|
141
|
+
theme: IobTheme;
|
|
142
|
+
expertMode: boolean;
|
|
143
|
+
selectedTab: string;
|
|
144
|
+
selectedTabNum: number | undefined;
|
|
145
|
+
native: Record<string, any>;
|
|
146
|
+
errorText: string | JSX.Element;
|
|
147
|
+
changed: boolean;
|
|
148
|
+
connected: boolean;
|
|
149
|
+
isConfigurationError: string;
|
|
150
|
+
toast: string | JSX.Element;
|
|
151
|
+
bottomButtons: boolean;
|
|
152
|
+
width: Width;
|
|
153
|
+
confirmClose: boolean;
|
|
154
|
+
_alert: boolean;
|
|
155
|
+
_alertType: 'info' | 'warning' | 'error' | 'success';
|
|
156
|
+
_alertMessage: string | JSX.Element;
|
|
157
|
+
common?: Record<string, any>;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface ObjectBrowserTableFilter {
|
|
161
|
+
id?: string;
|
|
162
|
+
name?: string;
|
|
163
|
+
room?: string;
|
|
164
|
+
func?: string;
|
|
165
|
+
role?: string;
|
|
166
|
+
expertMode?: boolean;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export interface ObjectBrowserCustomFilter {
|
|
170
|
+
readonly type?: string | string[];
|
|
171
|
+
readonly common?: {
|
|
172
|
+
readonly type?: string | string[];
|
|
173
|
+
readonly role?: string | string[];
|
|
174
|
+
// If "_" - no custom set
|
|
175
|
+
// If "_dataSources" - only data sources (history, sql, influxdb, ...)
|
|
176
|
+
// Else "telegram." or something like this
|
|
177
|
+
// `true` - If common.custom not empty
|
|
178
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
179
|
+
readonly custom?: '_' | '_dataSources' | true | string;
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export type ObjectBrowserType = 'state' | 'instance' | 'channel' | 'device' | 'chart';
|
|
184
|
+
|
|
185
|
+
export interface ObjectBrowserProps {
|
|
186
|
+
/** The title of the dialog. */
|
|
187
|
+
title: string;
|
|
188
|
+
/** The key to store state in the browser (default: 'App') */
|
|
189
|
+
key?: string;
|
|
190
|
+
/** The CSS classes. */
|
|
191
|
+
classes: Record<string, any>;
|
|
192
|
+
/** Default filters to be applied to the object table. */
|
|
193
|
+
defaultFilters?: ObjectBrowserTableFilter;
|
|
194
|
+
/** The selected ID or IDs. */
|
|
195
|
+
selected?: string | string[];
|
|
196
|
+
/** Callback when object is selected. */
|
|
197
|
+
onSelect?: (selectedItems: string[], name: string, isDouble?: boolean) => void;
|
|
198
|
+
/** The socket connection. */
|
|
199
|
+
socket: Connection;
|
|
200
|
+
/** Show the expert button? */
|
|
201
|
+
showExpertButton?: boolean;
|
|
202
|
+
/** Is expert mode enabled? (default: false) */
|
|
203
|
+
expertMode?: boolean;
|
|
204
|
+
/** Prefix (default: '.') */
|
|
205
|
+
imagePrefix?: string;
|
|
206
|
+
/** Theme name. */
|
|
207
|
+
themeName?: string;
|
|
208
|
+
/** Translation function. */
|
|
209
|
+
t: Translate;
|
|
210
|
+
/** The selected language. */
|
|
211
|
+
lang: ioBroker.Languages;
|
|
212
|
+
/** Allow to select multiple objects? (default: false) */
|
|
213
|
+
multiSelect?: boolean;
|
|
214
|
+
/** Can't objects be edited? (default: false) */
|
|
215
|
+
notEditable?: boolean;
|
|
216
|
+
/** Show folders first? (default: false) */
|
|
217
|
+
foldersFirst?: boolean;
|
|
218
|
+
/** Disable the column selector? (default: false) */
|
|
219
|
+
disableColumnSelector?: boolean;
|
|
220
|
+
/** The custom dialog React component to use */
|
|
221
|
+
objectCustomDialog?: any;
|
|
222
|
+
/** Custom filter. Optional {common: {custom: true}} or {common: {custom: 'sql.0'}} */
|
|
223
|
+
customFilter?: ObjectBrowserCustomFilter;
|
|
224
|
+
/** Custom value React component to use */
|
|
225
|
+
objectBrowserValue?: any;
|
|
226
|
+
/** Custom object editor React component to use */
|
|
227
|
+
objectBrowserEditObject?: any;
|
|
228
|
+
/** Router */
|
|
229
|
+
router?: Router;
|
|
230
|
+
/** Object types to show */
|
|
231
|
+
types?: ObjectBrowserType[];
|
|
232
|
+
/** Columns to display */
|
|
233
|
+
columns?: ObjectBrowserColumn[];
|
|
234
|
+
/** The width of the dialog. */
|
|
235
|
+
width?: Width;
|
|
236
|
+
}
|