@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,331 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2018-2024 Denis Haev <dogafox@gmail.com>
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import type { IobTheme, ThemeName, ThemeType } from '../types';
|
|
9
|
+
type SmartNameObject = {
|
|
10
|
+
[lang in ioBroker.Languages]?: string;
|
|
11
|
+
} & {
|
|
12
|
+
/** Which kind of device it is */
|
|
13
|
+
smartType?: string | null;
|
|
14
|
+
/** Which value to set when the ON command is issued */
|
|
15
|
+
byON?: string | null;
|
|
16
|
+
};
|
|
17
|
+
type SmartName = null | false | string | SmartNameObject;
|
|
18
|
+
type ClassDictionary = Record<string, any>;
|
|
19
|
+
type ClassValue = ClassArray | ClassDictionary | string | number | null | boolean | undefined;
|
|
20
|
+
type ClassArray = ClassValue[];
|
|
21
|
+
export declare class Utils {
|
|
22
|
+
static namespace: string;
|
|
23
|
+
static INSTANCES: string;
|
|
24
|
+
static dateFormat: string[];
|
|
25
|
+
static FORBIDDEN_CHARS: RegExp;
|
|
26
|
+
/**
|
|
27
|
+
* Capitalize words.
|
|
28
|
+
*/
|
|
29
|
+
static CapitalWords(name: string | null | undefined): string;
|
|
30
|
+
static formatSeconds(seconds: number): string;
|
|
31
|
+
/**
|
|
32
|
+
* Get the name of the object by id from the name or description.
|
|
33
|
+
*/
|
|
34
|
+
static getObjectName(objects: Record<string, ioBroker.Object>, id: string, settings?: {
|
|
35
|
+
name: ioBroker.StringOrTranslated;
|
|
36
|
+
} | ioBroker.Languages | null, options?: {
|
|
37
|
+
language?: ioBroker.Languages;
|
|
38
|
+
},
|
|
39
|
+
/** Set to true to get the description. */
|
|
40
|
+
isDesc?: boolean): string;
|
|
41
|
+
/**
|
|
42
|
+
* Get the name of the object from the name or description.
|
|
43
|
+
*/
|
|
44
|
+
static getObjectNameFromObj(obj: ioBroker.PartialObject,
|
|
45
|
+
/** settings or language */
|
|
46
|
+
settings: {
|
|
47
|
+
name: ioBroker.StringOrTranslated;
|
|
48
|
+
} | ioBroker.Languages | null, options?: {
|
|
49
|
+
language?: ioBroker.Languages;
|
|
50
|
+
},
|
|
51
|
+
/** Set to true to get the description. */
|
|
52
|
+
isDesc?: boolean,
|
|
53
|
+
/** Allow using spaces in name (by edit) */
|
|
54
|
+
noTrim?: boolean): string;
|
|
55
|
+
/**
|
|
56
|
+
* Extracts from the object material settings, depends on username
|
|
57
|
+
*/
|
|
58
|
+
static getSettingsOrder(obj: ioBroker.StateObject | ioBroker.StateCommon, forEnumId: string, options: {
|
|
59
|
+
user?: string;
|
|
60
|
+
}): string | null;
|
|
61
|
+
/**
|
|
62
|
+
Used in material
|
|
63
|
+
*/
|
|
64
|
+
static getSettingsCustomURLs(obj: ioBroker.StateObject | ioBroker.StateCommon, forEnumId: string, options: {
|
|
65
|
+
user?: string;
|
|
66
|
+
}): string | null;
|
|
67
|
+
/**
|
|
68
|
+
* Reorder the array items in list between source and dest.
|
|
69
|
+
*/
|
|
70
|
+
static reorder(list: Iterable<any> | ArrayLike<any>, source: number, dest: number): Iterable<any> | ArrayLike<any>;
|
|
71
|
+
/**
|
|
72
|
+
Get smart name settings for the given object.
|
|
73
|
+
*/
|
|
74
|
+
static getSettings(obj: ioBroker.StateObject | ioBroker.StateCommon, options: {
|
|
75
|
+
id?: string;
|
|
76
|
+
user?: string;
|
|
77
|
+
name?: ioBroker.StringOrTranslated;
|
|
78
|
+
icon?: string;
|
|
79
|
+
color?: string;
|
|
80
|
+
language?: ioBroker.Languages;
|
|
81
|
+
}, defaultEnabling?: boolean): {
|
|
82
|
+
name: string;
|
|
83
|
+
enabled?: boolean;
|
|
84
|
+
useCustom?: boolean;
|
|
85
|
+
icon?: string;
|
|
86
|
+
color?: string;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
Sets smartName settings for the given object.
|
|
90
|
+
*/
|
|
91
|
+
static setSettings(obj: Partial<ioBroker.Object>, settings: Record<string, any>, options: {
|
|
92
|
+
user?: string;
|
|
93
|
+
language?: ioBroker.Languages;
|
|
94
|
+
}): boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Get the icon for the given settings.
|
|
97
|
+
*/
|
|
98
|
+
static getIcon(settings: {
|
|
99
|
+
icon?: string;
|
|
100
|
+
name?: string;
|
|
101
|
+
prefix?: string;
|
|
102
|
+
}, style?: React.CSSProperties): React.JSX.Element | null;
|
|
103
|
+
/**
|
|
104
|
+
* Get the icon for the given object.
|
|
105
|
+
*/
|
|
106
|
+
static getObjectIcon(id: string | ioBroker.PartialObject, obj?: ioBroker.PartialObject): string | null;
|
|
107
|
+
/**
|
|
108
|
+
* Converts word1_word2 to word1Word2.
|
|
109
|
+
*/
|
|
110
|
+
static splitCamelCase(text: string | null | undefined): string;
|
|
111
|
+
/**
|
|
112
|
+
* Check if the given color is bright.
|
|
113
|
+
* https://stackoverflow.com/questions/35969656/how-can-i-generate-the-opposite-color-according-to-current-color
|
|
114
|
+
*/
|
|
115
|
+
static isUseBright(color: string | null | undefined, defaultValue?: boolean): boolean;
|
|
116
|
+
/**
|
|
117
|
+
* Get the time string in the format 00:00.
|
|
118
|
+
*/
|
|
119
|
+
static getTimeString(seconds: string | number): string;
|
|
120
|
+
/**
|
|
121
|
+
* Gets the wind direction with the given angle (degrees).
|
|
122
|
+
*/
|
|
123
|
+
static getWindDirection(
|
|
124
|
+
/** angle in degrees from 0° to 360° */
|
|
125
|
+
angle: number): string;
|
|
126
|
+
/**
|
|
127
|
+
* Pad the given number with a zero if it's not two digits long.
|
|
128
|
+
*/
|
|
129
|
+
static padding(num: string | number): string;
|
|
130
|
+
/**
|
|
131
|
+
* Sets the date format.
|
|
132
|
+
*/
|
|
133
|
+
static setDataFormat(format: string): void;
|
|
134
|
+
/**
|
|
135
|
+
* Converts the date to a string.
|
|
136
|
+
*/
|
|
137
|
+
static date2string(now: string | number | Date): string;
|
|
138
|
+
/**
|
|
139
|
+
* Render a text as a link.
|
|
140
|
+
*/
|
|
141
|
+
static renderTextWithA(text: string): React.JSX.Element[] | string;
|
|
142
|
+
/**
|
|
143
|
+
* Get the smart name of the given state.
|
|
144
|
+
*/
|
|
145
|
+
static getSmartName(states: Record<string, ioBroker.StateObject> | ioBroker.StateObject | ioBroker.StateCommon, id: string, instanceId: string, noCommon?: boolean): SmartName | undefined;
|
|
146
|
+
/**
|
|
147
|
+
* Get the smart name from a state.
|
|
148
|
+
*/
|
|
149
|
+
static getSmartNameFromObj(obj: ioBroker.StateObject | ioBroker.StateCommon, instanceId: string, noCommon?: boolean): SmartName | undefined;
|
|
150
|
+
/**
|
|
151
|
+
* Enable smart name for a state.
|
|
152
|
+
*/
|
|
153
|
+
static enableSmartName(obj: ioBroker.StateObject | ioBroker.EnumObject, instanceId: string, noCommon?: boolean): void;
|
|
154
|
+
/**
|
|
155
|
+
* Completely remove smart name from a state.
|
|
156
|
+
*/
|
|
157
|
+
static removeSmartName(obj: ioBroker.StateObject | ioBroker.EnumObject, instanceId: string, noCommon?: boolean): void;
|
|
158
|
+
/**
|
|
159
|
+
* Update the smart name of a state.
|
|
160
|
+
*/
|
|
161
|
+
static updateSmartName(obj: ioBroker.StateObject | ioBroker.EnumObject, newSmartName: ioBroker.StringOrTranslated | undefined, byON: string | null | undefined, smartType: string | null | undefined, instanceId: string, noCommon?: boolean): void;
|
|
162
|
+
/**
|
|
163
|
+
* Disable the smart name of a state.
|
|
164
|
+
*/
|
|
165
|
+
static disableSmartName(obj: ioBroker.StateObject | ioBroker.EnumObject, instanceId: string, noCommon?: boolean): void;
|
|
166
|
+
/**
|
|
167
|
+
* Copy text to the clipboard.
|
|
168
|
+
*/
|
|
169
|
+
static copyToClipboard(text: string, e?: Event): boolean;
|
|
170
|
+
/**
|
|
171
|
+
* Gets the extension of a file name.
|
|
172
|
+
*
|
|
173
|
+
* @param fileName the file name.
|
|
174
|
+
* @returns The extension in lower case.
|
|
175
|
+
*/
|
|
176
|
+
static getFileExtension(fileName: string): string | null;
|
|
177
|
+
/**
|
|
178
|
+
* Format number of bytes as a string with B, KB, MB or GB.
|
|
179
|
+
* The base for all calculations is 1024.
|
|
180
|
+
*
|
|
181
|
+
* @param bytes The number of bytes.
|
|
182
|
+
* @returns The formatted string (e.g. '723.5 KB')
|
|
183
|
+
*/
|
|
184
|
+
static formatBytes(bytes: number): string;
|
|
185
|
+
/**
|
|
186
|
+
* Invert the given color according to a theme type to get the inverted text color for background
|
|
187
|
+
*
|
|
188
|
+
* @param color Color in the format '#rrggbb' or '#rgb' (or without a hash)
|
|
189
|
+
* @param themeType 'light' or 'dark'
|
|
190
|
+
* @param invert If true, the dark theme has a light color in the control, or the dark theme has a light color in the control
|
|
191
|
+
*/
|
|
192
|
+
static getInvertedColor(color: string, themeType: ThemeType, invert?: boolean): string | undefined;
|
|
193
|
+
/**
|
|
194
|
+
* Invert the given color
|
|
195
|
+
*
|
|
196
|
+
* @param hex Color in the format '#rrggbb' or '#rgb' (or without a hash)
|
|
197
|
+
* @param bw Set to black or white.
|
|
198
|
+
*/
|
|
199
|
+
static invertColor(hex: string | null | undefined, bw?: boolean): string;
|
|
200
|
+
/**
|
|
201
|
+
* Convert RGB to array [r, g, b]
|
|
202
|
+
*
|
|
203
|
+
* @param hex Color in the format '#rrggbb' or '#rgb' (or without hash) or rgb(r,g,b) or rgba(r,g,b,a)
|
|
204
|
+
* @returns Array with 3 elements [r, g, b]
|
|
205
|
+
*/
|
|
206
|
+
static color2rgb(hex: string): false | [number, number, number] | '';
|
|
207
|
+
/**
|
|
208
|
+
* Convert RGB to LAB
|
|
209
|
+
*
|
|
210
|
+
* @param rgb color in format [r,g,b]
|
|
211
|
+
* @returns lab color in format [l,a,b]
|
|
212
|
+
*/
|
|
213
|
+
static rgb2lab(rgb: [number, number, number]): [number, number, number];
|
|
214
|
+
/**
|
|
215
|
+
* Calculate the distance between two colors in LAB color space in the range 0-100^2
|
|
216
|
+
* If the distance is less than 1000, the colors are similar
|
|
217
|
+
*
|
|
218
|
+
* @param color1 Color in the format '#rrggbb' or '#rgb' (or without hash) or rgb(r,g,b) or rgba(r,g,b,a)
|
|
219
|
+
* @param color2 Color in the format '#rrggbb' or '#rgb' (or without hash) or rgb(r,g,b) or rgba(r,g,b,a)
|
|
220
|
+
* @returns distance in the range 0-100^2
|
|
221
|
+
*/
|
|
222
|
+
static colorDistance(color1: string, color2: string): number;
|
|
223
|
+
private static _toVal;
|
|
224
|
+
/**
|
|
225
|
+
* Convert any object to a string with its values.
|
|
226
|
+
*/
|
|
227
|
+
static clsx(...inputs: ClassValue[]): string;
|
|
228
|
+
/**
|
|
229
|
+
* Get the current theme name (either from local storage or the browser settings).
|
|
230
|
+
*/
|
|
231
|
+
static getThemeName(themeName?: ThemeName | null): ThemeName;
|
|
232
|
+
/**
|
|
233
|
+
* Get the type of theme.
|
|
234
|
+
*/
|
|
235
|
+
static getThemeType(themeName?: ThemeName): ThemeType;
|
|
236
|
+
/**
|
|
237
|
+
* Set the theme name and theme type.
|
|
238
|
+
*/
|
|
239
|
+
static setThemeName(themeName: ThemeName): void;
|
|
240
|
+
/**
|
|
241
|
+
* Toggle the theme name between 'dark' and 'colored'.
|
|
242
|
+
*
|
|
243
|
+
* @returns the new theme name.
|
|
244
|
+
*/
|
|
245
|
+
static toggleTheme(themeName?: ThemeName | null): ThemeName;
|
|
246
|
+
/**
|
|
247
|
+
* Get the list of themes
|
|
248
|
+
*
|
|
249
|
+
* @returns list of possible themes
|
|
250
|
+
*/
|
|
251
|
+
static getThemeNames(): ThemeName[];
|
|
252
|
+
/**
|
|
253
|
+
* Parse a query string into its parts.
|
|
254
|
+
*/
|
|
255
|
+
static parseQuery(query: string): Record<string, string | number | boolean>;
|
|
256
|
+
/**
|
|
257
|
+
* Returns parent ID.
|
|
258
|
+
*
|
|
259
|
+
* @returns parent ID or null if no parent
|
|
260
|
+
*/
|
|
261
|
+
static getParentId(id: string): string | null;
|
|
262
|
+
static formatDate(dateObj: Date, dateFormat: string): string;
|
|
263
|
+
/**
|
|
264
|
+
* Format seconds to string like 'h:mm:ss' or 'd.hh:mm:ss'
|
|
265
|
+
*/
|
|
266
|
+
static formatTime(seconds: number): string;
|
|
267
|
+
static MDtext2link(text: string): string;
|
|
268
|
+
/**
|
|
269
|
+
* Open url link in the new target window
|
|
270
|
+
*/
|
|
271
|
+
static openLink(url: string, target?: string): void;
|
|
272
|
+
static MDgetTitle(text: string): string;
|
|
273
|
+
static MDextractHeader(text: string): {
|
|
274
|
+
header: Record<string, string | boolean | number>;
|
|
275
|
+
body: string;
|
|
276
|
+
};
|
|
277
|
+
static MDremoveDocsify(text: string): string;
|
|
278
|
+
/**
|
|
279
|
+
* Generate the file for download from JSON object.
|
|
280
|
+
*/
|
|
281
|
+
static generateFile(fileName: string,
|
|
282
|
+
/** json file data */
|
|
283
|
+
json: Record<string, any>): void;
|
|
284
|
+
/**
|
|
285
|
+
* Convert quality code into text
|
|
286
|
+
*
|
|
287
|
+
* @returns lines that decode quality
|
|
288
|
+
*/
|
|
289
|
+
static quality2text(quality: ioBroker.STATE_QUALITY[keyof ioBroker.STATE_QUALITY]): string[];
|
|
290
|
+
/**
|
|
291
|
+
* Deep copy object
|
|
292
|
+
*/
|
|
293
|
+
static clone(object: Record<string, any>): Record<string, any>;
|
|
294
|
+
/**
|
|
295
|
+
* Get states of object
|
|
296
|
+
*
|
|
297
|
+
* @returns states as an object in form {"value1": "label1", "value2": "label2"} or null
|
|
298
|
+
*/
|
|
299
|
+
static getStates(obj: ioBroker.StateObject | null | undefined): Record<string, string> | null;
|
|
300
|
+
/**
|
|
301
|
+
* Get svg file as text
|
|
302
|
+
*
|
|
303
|
+
* @param url URL of SVG file
|
|
304
|
+
* @returns Promise with "data:image..."
|
|
305
|
+
*/
|
|
306
|
+
static getSvg(url: string): Promise<string>;
|
|
307
|
+
/**
|
|
308
|
+
* Detect a file extension by its content
|
|
309
|
+
*
|
|
310
|
+
* @returns The detected extension, like 'jpg'
|
|
311
|
+
*/
|
|
312
|
+
static detectMimeType(
|
|
313
|
+
/** Base64 encoded binary file */
|
|
314
|
+
base64: string): string | null;
|
|
315
|
+
/**
|
|
316
|
+
* Check if configured repository is the stable repository
|
|
317
|
+
*/
|
|
318
|
+
static isStableRepository(
|
|
319
|
+
/** current configured repository or multi repository */
|
|
320
|
+
activeRepo: string | string[]): boolean;
|
|
321
|
+
/**
|
|
322
|
+
* Check if a given string is an integer
|
|
323
|
+
*/
|
|
324
|
+
static isStringInteger(str: string | number): boolean;
|
|
325
|
+
/**
|
|
326
|
+
* Check if the date is valid
|
|
327
|
+
*/
|
|
328
|
+
static isValidDate(date: any): boolean;
|
|
329
|
+
static getStyle(theme: IobTheme, ...args: (((_theme: IobTheme) => Record<string, any>) | undefined | Record<string, any>)[]): Record<string, any>;
|
|
330
|
+
}
|
|
331
|
+
export {};
|