@iobroker/adapter-react-v5 3.1.25 → 3.1.26
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/Components/404.d.ts +3 -0
- package/Components/ColorPicker.d.ts +138 -0
- package/Components/ComplexCron.d.ts +8 -0
- package/Components/CustomModal.d.ts +3 -0
- package/Components/FileBrowser.d.ts +125 -0
- package/Components/FileViewer.d.ts +80 -0
- package/Components/Icon.d.ts +21 -0
- package/Components/IconPicker.d.ts +64 -0
- package/Components/IconSelector.d.ts +25 -0
- package/Components/Image.d.ts +64 -0
- package/Components/JsonConfigComponent/ChipInput.d.ts +13 -0
- package/Components/JsonConfigComponent/ConfigAlive.d.ts +10 -0
- package/Components/JsonConfigComponent/ConfigAutocomplete.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigAutocompleteSendTo.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigCRON.d.ts +15 -0
- package/Components/JsonConfigComponent/ConfigCertificateSelect.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigCheckbox.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigChip.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigColor.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigCoordinates.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigCustom.d.ts +26 -0
- package/Components/JsonConfigComponent/ConfigDatePicker.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigFile.d.ts +15 -0
- package/Components/JsonConfigComponent/ConfigFileSelector.d.ts +3 -0
- package/Components/JsonConfigComponent/ConfigFunc.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigGeneric.d.ts +71 -0
- package/Components/JsonConfigComponent/ConfigIP.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigImageUpload.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigInstanceSelect.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigJsonEditor.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigLanguage.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigNumber.d.ts +3 -0
- package/Components/JsonConfigComponent/ConfigObjectId.d.ts +17 -0
- package/Components/JsonConfigComponent/ConfigPanel.d.ts +3 -0
- package/Components/JsonConfigComponent/ConfigPassword.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigPattern.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigRoom.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigSelect.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigSelectSendTo.d.ts +17 -0
- package/Components/JsonConfigComponent/ConfigSendto.d.ts +18 -0
- package/Components/JsonConfigComponent/ConfigSetState.d.ts +18 -0
- package/Components/JsonConfigComponent/ConfigSlider.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigStaticDivider.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigStaticHeader.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigStaticImage.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigStaticText.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigTable.d.ts +3 -0
- package/Components/JsonConfigComponent/ConfigTabs.d.ts +33 -0
- package/Components/JsonConfigComponent/ConfigText.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigTextSendTo.d.ts +10 -0
- package/Components/JsonConfigComponent/ConfigTimePicker.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigTopic.d.ts +17 -0
- package/Components/JsonConfigComponent/ConfigUser.d.ts +14 -0
- package/Components/JsonConfigComponent/index.d.ts +27 -0
- package/Components/Loader.d.ts +37 -0
- package/Components/Loaders/PT.d.ts +41 -0
- package/Components/Loaders/Vendor.d.ts +41 -0
- package/Components/Logo.d.ts +59 -0
- package/Components/MDUtils.d.ts +12 -0
- package/Components/ObjectBrowser.d.ts +632 -0
- package/Components/Router.d.ts +35 -0
- package/Components/SaveCloseButtons.d.ts +64 -0
- package/Components/Schedule.d.ts +7 -0
- package/Components/SelectWithIcon.d.ts +21 -0
- package/Components/SimpleCron/cron2text.d.ts +8 -0
- package/Components/SimpleCron/cronText.d.ts +2 -0
- package/Components/SimpleCron/index.d.ts +8 -0
- package/Components/SimpleCron/jquery.cron.locale.d.ts +2 -0
- package/Components/TabContainer.d.ts +42 -0
- package/Components/TabContent.d.ts +32 -0
- package/Components/TabHeader.d.ts +13 -0
- package/Components/TableResize.d.ts +14 -0
- package/Components/TextWithIcon.d.ts +3 -0
- package/Components/ToggleThemeMenu.d.ts +8 -0
- package/Components/TreeTable.d.ts +3 -0
- package/Components/UploadImage.d.ts +2 -0
- package/Components/Utils.d.ts +334 -0
- package/Components/copy-to-clipboard.d.ts +2 -0
- package/Components/withWidth.d.ts +2 -0
- package/Connection.d.ts +761 -0
- package/Connection.js +9 -1
- package/Connection.js.map +1 -1
- package/Dialogs/ComplexCron.d.ts +15 -0
- package/Dialogs/Confirm.d.ts +48 -0
- package/Dialogs/Cron.d.ts +15 -0
- package/Dialogs/Error.d.ts +49 -0
- package/Dialogs/FileSelect.d.ts +148 -0
- package/Dialogs/Message.d.ts +39 -0
- package/Dialogs/SelectID.d.ts +161 -0
- package/Dialogs/SimpleCron.d.ts +14 -0
- package/Dialogs/TextInput.d.ts +87 -0
- package/GenericApp.d.ts +213 -0
- package/Prompt.d.ts +5 -0
- package/README.md +2 -1
- package/Theme.d.ts +7 -0
- package/assets/devices/parseNames.d.ts +1 -0
- package/assets/rooms/parseNames.d.ts +1 -0
- package/i18n.d.ts +92 -0
- package/icons/IconAdapter.d.ts +11 -0
- package/icons/IconAlias.d.ts +11 -0
- package/icons/IconChannel.d.ts +11 -0
- package/icons/IconClearFilter.d.ts +11 -0
- package/icons/IconClosed.d.ts +11 -0
- package/icons/IconCopy.d.ts +38 -0
- package/icons/IconDevice.d.ts +11 -0
- package/icons/IconDocument.d.ts +11 -0
- package/icons/IconDocumentReadOnly.d.ts +11 -0
- package/icons/IconExpert.d.ts +38 -0
- package/icons/IconFx.d.ts +11 -0
- package/icons/IconInstance.d.ts +11 -0
- package/icons/IconLogout.d.ts +38 -0
- package/icons/IconNoIcon.d.ts +38 -0
- package/icons/IconOpen.d.ts +11 -0
- package/icons/IconState.d.ts +11 -0
- package/index.d.ts +113 -0
- package/package.json +8 -8
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export default _export;
|
|
2
|
+
export type SaveCloseButtonsProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Are the buttons without text
|
|
5
|
+
*/
|
|
6
|
+
noTextOnButtons: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Theme object (from this.state.theme)
|
|
9
|
+
*/
|
|
10
|
+
theme: any;
|
|
11
|
+
/**
|
|
12
|
+
* bottom position 0 or 38 for iFrame
|
|
13
|
+
*/
|
|
14
|
+
isIFrame: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* is used in new react
|
|
17
|
+
*/
|
|
18
|
+
newReact: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* on Save handler
|
|
21
|
+
*/
|
|
22
|
+
onSave: Function;
|
|
23
|
+
/**
|
|
24
|
+
* on Close handler
|
|
25
|
+
*/
|
|
26
|
+
onClose: Function;
|
|
27
|
+
};
|
|
28
|
+
/** @type {typeof SaveCloseButtons} */
|
|
29
|
+
declare const _export: typeof SaveCloseButtons;
|
|
30
|
+
/**
|
|
31
|
+
* @typedef {object} SaveCloseButtonsProps
|
|
32
|
+
* @property {boolean} noTextOnButtons Are the buttons without text
|
|
33
|
+
* @property {any} theme Theme object (from this.state.theme)
|
|
34
|
+
* @property {boolean} isIFrame bottom position 0 or 38 for iFrame
|
|
35
|
+
* @property {boolean} newReact is used in new react
|
|
36
|
+
* @property {function} onSave on Save handler
|
|
37
|
+
* @property {function} onClose on Close handler
|
|
38
|
+
*
|
|
39
|
+
* @extends {React.Component<SaveCloseButtonsProps>}
|
|
40
|
+
*/
|
|
41
|
+
declare class SaveCloseButtons extends React.Component<SaveCloseButtonsProps, any, any> {
|
|
42
|
+
/**
|
|
43
|
+
* @param {SaveCloseButtonsProps} props
|
|
44
|
+
*/
|
|
45
|
+
constructor(props: SaveCloseButtonsProps);
|
|
46
|
+
isIFrame: boolean;
|
|
47
|
+
render(): JSX.Element;
|
|
48
|
+
}
|
|
49
|
+
declare namespace SaveCloseButtons {
|
|
50
|
+
namespace propTypes {
|
|
51
|
+
const dense: PropTypes.Requireable<boolean>;
|
|
52
|
+
const paddingLeft: PropTypes.Requireable<number>;
|
|
53
|
+
const noTextOnButtons: PropTypes.Requireable<boolean>;
|
|
54
|
+
const theme: PropTypes.Requireable<object>;
|
|
55
|
+
const isIFrame: PropTypes.Requireable<boolean>;
|
|
56
|
+
const changed: PropTypes.Validator<boolean>;
|
|
57
|
+
const error: PropTypes.Requireable<boolean>;
|
|
58
|
+
const onSave: PropTypes.Validator<(...args: any[]) => any>;
|
|
59
|
+
const onClose: PropTypes.Validator<(...args: any[]) => any>;
|
|
60
|
+
const newReact: PropTypes.Requireable<boolean>;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
import React from "react";
|
|
64
|
+
import PropTypes from "prop-types";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const _default: React.JSXElementConstructor<Omit<PropTypes.InferProps<{
|
|
2
|
+
schedule: PropTypes.Requireable<string>;
|
|
3
|
+
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
4
|
+
}>, "classes"> & import("@mui/styles/withStyles").StyledComponentProps<"hr" | "scrollWindow" | "rowDiv" | "modeDiv" | "settingsDiv" | "inputTime" | "inputDate" | "inputEvery" | "inputRadio" | "inputGroup" | "inputGroupElement" | "inputDateDay" | "inputDateDayCheck" | "inputSmallCheck" | "rowOnce" | "rowDays" | "rowDows" | "rowDates" | "rowWeeks" | "rowMonths" | "rowMonthsDates" | "rowYears" | "rowDaysDows" | "rowDowsDows"> & object>;
|
|
5
|
+
export default _default;
|
|
6
|
+
import PropTypes from "prop-types";
|
|
7
|
+
import React from "react";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const _default: React.JSXElementConstructor<Omit<PropTypes.InferProps<{
|
|
2
|
+
t: PropTypes.Validator<(...args: any[]) => any>;
|
|
3
|
+
lang: PropTypes.Validator<string>;
|
|
4
|
+
themeType: PropTypes.Requireable<string>;
|
|
5
|
+
value: PropTypes.Requireable<string>;
|
|
6
|
+
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
7
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
8
|
+
list: PropTypes.Requireable<object>;
|
|
9
|
+
options: PropTypes.Requireable<object>;
|
|
10
|
+
different: PropTypes.Requireable<string | boolean>;
|
|
11
|
+
label: PropTypes.Requireable<string>;
|
|
12
|
+
fullWidth: PropTypes.Requireable<boolean>;
|
|
13
|
+
className: PropTypes.Requireable<string>;
|
|
14
|
+
style: PropTypes.Requireable<object>;
|
|
15
|
+
removePrefix: PropTypes.Requireable<string>;
|
|
16
|
+
allowNone: PropTypes.Requireable<boolean>;
|
|
17
|
+
inputProps: PropTypes.Requireable<object>;
|
|
18
|
+
}>, "classes"> & import("@mui/styles/withStyles").StyledComponentProps<"icon" | "different"> & object>;
|
|
19
|
+
export default _default;
|
|
20
|
+
import PropTypes from "prop-types";
|
|
21
|
+
import React from "react";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export default cronToText;
|
|
2
|
+
/**
|
|
3
|
+
* Given a cronspec, return the human-readable string.
|
|
4
|
+
* @param {string} cronspec
|
|
5
|
+
* @param withSeconds
|
|
6
|
+
* @param {Object=} locale
|
|
7
|
+
*/
|
|
8
|
+
declare function cronToText(cronspec: string, withSeconds: any, locale?: any | undefined): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const _default: React.JSXElementConstructor<Omit<PropTypes.InferProps<{
|
|
2
|
+
cronExpression: PropTypes.Requireable<string>;
|
|
3
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
4
|
+
language: PropTypes.Requireable<string>;
|
|
5
|
+
}>, "classes"> & import("@mui/styles/withStyles").StyledComponentProps<"formControl" | "mainDiv" | "formControlMarginRight" | "formControlPaddingTop"> & object>;
|
|
6
|
+
export default _default;
|
|
7
|
+
import PropTypes from "prop-types";
|
|
8
|
+
import React from "react";
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export default _export;
|
|
2
|
+
export type TabContainerProps = {
|
|
3
|
+
/**
|
|
4
|
+
* The elevation of the tab container.
|
|
5
|
+
*/
|
|
6
|
+
elevation?: number;
|
|
7
|
+
/**
|
|
8
|
+
* Set to 'visible' show the overflow.
|
|
9
|
+
*/
|
|
10
|
+
overflow?: string;
|
|
11
|
+
/**
|
|
12
|
+
* The styling class names.
|
|
13
|
+
*/
|
|
14
|
+
classes: {
|
|
15
|
+
root: string;
|
|
16
|
+
overflowHidden: string;
|
|
17
|
+
container: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
/** @type {typeof TabContainer} */
|
|
21
|
+
declare const _export: typeof TabContainer;
|
|
22
|
+
/**
|
|
23
|
+
* @typedef {object} TabContainerProps
|
|
24
|
+
* @property {number} [elevation] The elevation of the tab container.
|
|
25
|
+
* @property {string} [overflow] Set to 'visible' show the overflow.
|
|
26
|
+
* @property {{ [key in keyof styles]: string}} classes The styling class names.
|
|
27
|
+
*
|
|
28
|
+
* @extends {React.Component<TabContainerProps>}
|
|
29
|
+
*/
|
|
30
|
+
declare class TabContainer extends React.Component<TabContainerProps, any, any> {
|
|
31
|
+
constructor(props: TabContainerProps | Readonly<TabContainerProps>);
|
|
32
|
+
constructor(props: TabContainerProps, context: any);
|
|
33
|
+
render(): JSX.Element;
|
|
34
|
+
}
|
|
35
|
+
declare namespace TabContainer {
|
|
36
|
+
namespace propTypes {
|
|
37
|
+
const elevation: PropTypes.Requireable<number>;
|
|
38
|
+
const overflow: PropTypes.Requireable<string>;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
import React from "react";
|
|
42
|
+
import PropTypes from "prop-types";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export default _export;
|
|
2
|
+
export type TabContentProps = {
|
|
3
|
+
overflow?: string;
|
|
4
|
+
/**
|
|
5
|
+
* The styling class names.
|
|
6
|
+
*/
|
|
7
|
+
classes: {
|
|
8
|
+
root: string;
|
|
9
|
+
overflowAuto: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
/** @type {typeof TabContent} */
|
|
13
|
+
declare const _export: typeof TabContent;
|
|
14
|
+
/**
|
|
15
|
+
* @typedef {object} TabContentProps
|
|
16
|
+
* @property {string} [overflow]
|
|
17
|
+
* @property {{ [key in keyof styles]: string}} classes The styling class names.
|
|
18
|
+
*
|
|
19
|
+
* @extends {React.Component<TabContentProps>}
|
|
20
|
+
*/
|
|
21
|
+
declare class TabContent extends React.Component<TabContentProps, any, any> {
|
|
22
|
+
constructor(props: TabContentProps | Readonly<TabContentProps>);
|
|
23
|
+
constructor(props: TabContentProps, context: any);
|
|
24
|
+
render(): JSX.Element;
|
|
25
|
+
}
|
|
26
|
+
declare namespace TabContent {
|
|
27
|
+
namespace propTypes {
|
|
28
|
+
const overflow: PropTypes.Requireable<string>;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
import React from "react";
|
|
32
|
+
import PropTypes from "prop-types";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export default TabHeader;
|
|
2
|
+
export type TabHeaderProps = object;
|
|
3
|
+
/**
|
|
4
|
+
* @typedef {object} TabHeaderProps
|
|
5
|
+
*
|
|
6
|
+
* @extends {React.Component<TabHeaderProps>}
|
|
7
|
+
*/
|
|
8
|
+
declare class TabHeader extends React.Component<any, any, any> {
|
|
9
|
+
constructor(props: any);
|
|
10
|
+
constructor(props: any, context: any);
|
|
11
|
+
render(): JSX.Element;
|
|
12
|
+
}
|
|
13
|
+
import React from "react";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const _default: React.JSXElementConstructor<Omit<PropTypes.InferProps<{
|
|
2
|
+
name: PropTypes.Requireable<string>;
|
|
3
|
+
ready: PropTypes.Requireable<boolean>;
|
|
4
|
+
stickyHeader: PropTypes.Requireable<boolean>;
|
|
5
|
+
size: PropTypes.Requireable<string>;
|
|
6
|
+
className: PropTypes.Requireable<string>;
|
|
7
|
+
style: PropTypes.Requireable<object>;
|
|
8
|
+
initialWidths: PropTypes.Requireable<any[]>;
|
|
9
|
+
minWidths: PropTypes.Requireable<any[]>;
|
|
10
|
+
dblTitle: PropTypes.Requireable<string>;
|
|
11
|
+
}>, "classes"> & import("@mui/styles").StyledComponentProps<"table"> & object>;
|
|
12
|
+
export default _default;
|
|
13
|
+
import PropTypes from "prop-types";
|
|
14
|
+
import React from "react";
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
export default Utils;
|
|
2
|
+
declare class Utils {
|
|
3
|
+
static namespace: string;
|
|
4
|
+
static INSTANCES: string;
|
|
5
|
+
static dateFormat: string[];
|
|
6
|
+
static FORBIDDEN_CHARS: RegExp;
|
|
7
|
+
/**
|
|
8
|
+
* Capitalize words.
|
|
9
|
+
* @param {string | undefined} name
|
|
10
|
+
* @returns {string}
|
|
11
|
+
*/
|
|
12
|
+
static CapitalWords(name: string | undefined): string;
|
|
13
|
+
static formatSeconds(seconds: any): string;
|
|
14
|
+
/**
|
|
15
|
+
* Get the name of the object by id from the name or description.
|
|
16
|
+
* @param {Record<string, ioBroker.Object>} objects
|
|
17
|
+
* @param {string} id
|
|
18
|
+
* @param {{ name: any; } | ioBroker.Languages | null} settings
|
|
19
|
+
* @param {{ language?: ioBroker.Languages; }} options
|
|
20
|
+
* @param {boolean} [isDesc] Set to true to get the description.
|
|
21
|
+
* @returns {string}
|
|
22
|
+
*/
|
|
23
|
+
static getObjectName(objects: Record<string, ioBroker.Object>, id: string, settings: {
|
|
24
|
+
name: any;
|
|
25
|
+
} | ioBroker.Languages | null, options: {
|
|
26
|
+
language?: ioBroker.Languages;
|
|
27
|
+
}, isDesc?: boolean): string;
|
|
28
|
+
/**
|
|
29
|
+
* Get the name of the object from the name or description.
|
|
30
|
+
* @param {ioBroker.PartialObject} obj
|
|
31
|
+
* @param {{ name: any; } | ioBroker.Languages | null } settings or language
|
|
32
|
+
* @param {{ language?: ioBroker.Languages; } } options
|
|
33
|
+
* @param {boolean} [isDesc] Set to true to get the description.
|
|
34
|
+
* @param {boolean} [noTrim] Allow to use spaces in name (by edit)
|
|
35
|
+
* @returns {string}
|
|
36
|
+
*/
|
|
37
|
+
static getObjectNameFromObj(obj: ioBroker.PartialObject, settings: {
|
|
38
|
+
name: any;
|
|
39
|
+
} | ioBroker.Languages | null, options: {
|
|
40
|
+
language?: ioBroker.Languages;
|
|
41
|
+
}, isDesc?: boolean, noTrim?: boolean): string;
|
|
42
|
+
/**
|
|
43
|
+
* @param {ioBroker.PartialObject | ioBroker.ObjectCommon} obj
|
|
44
|
+
* @param {string} forEnumId
|
|
45
|
+
* @param {{ user: string; }} options
|
|
46
|
+
* @returns {string | null}
|
|
47
|
+
*/
|
|
48
|
+
static getSettingsOrder(obj: ioBroker.PartialObject | ioBroker.ObjectCommon, forEnumId: string, options: {
|
|
49
|
+
user: string;
|
|
50
|
+
}): string | null;
|
|
51
|
+
/**
|
|
52
|
+
* @param {ioBroker.PartialObject | ioBroker.ObjectCommon} obj
|
|
53
|
+
* @param {string} forEnumId
|
|
54
|
+
* @param {{ user: string; }} options
|
|
55
|
+
*/
|
|
56
|
+
static getSettingsCustomURLs(obj: ioBroker.PartialObject | ioBroker.ObjectCommon, forEnumId: string, options: {
|
|
57
|
+
user: string;
|
|
58
|
+
}): any;
|
|
59
|
+
/**
|
|
60
|
+
* Reorder the array items in list between source and dest.
|
|
61
|
+
* @param {Iterable<any> | ArrayLike<any>} list
|
|
62
|
+
* @param {number} source
|
|
63
|
+
* @param {number} dest
|
|
64
|
+
*/
|
|
65
|
+
static reorder(list: Iterable<any> | ArrayLike<any>, source: number, dest: number): any[];
|
|
66
|
+
/**
|
|
67
|
+
* @param {any} obj
|
|
68
|
+
* @param {{ id: any; user: any; name: any; icon: any; color: any; language: ioBroker.Languages; }} options
|
|
69
|
+
* @param {boolean} [defaultEnabling]
|
|
70
|
+
*/
|
|
71
|
+
static getSettings(obj: any, options: {
|
|
72
|
+
id: any;
|
|
73
|
+
user: any;
|
|
74
|
+
name: any;
|
|
75
|
+
icon: any;
|
|
76
|
+
color: any;
|
|
77
|
+
language: ioBroker.Languages;
|
|
78
|
+
}, defaultEnabling?: boolean): any;
|
|
79
|
+
/**
|
|
80
|
+
* @param {any} obj
|
|
81
|
+
* @param {any} settings
|
|
82
|
+
* @param {{ user: any; language: ioBroker.Languages; }} options
|
|
83
|
+
*/
|
|
84
|
+
static setSettings(obj: any, settings: any, options: {
|
|
85
|
+
user: any;
|
|
86
|
+
language: ioBroker.Languages;
|
|
87
|
+
}): boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Get the icon for the given settings.
|
|
90
|
+
* @param {{ icon: string | undefined; name: string | undefined; prefix: string | undefined}} settings
|
|
91
|
+
* @param {any} style
|
|
92
|
+
* @returns {JSX.Element | null}
|
|
93
|
+
*/
|
|
94
|
+
static getIcon(settings: {
|
|
95
|
+
icon: string | undefined;
|
|
96
|
+
name: string | undefined;
|
|
97
|
+
prefix: string | undefined;
|
|
98
|
+
}, style: any): JSX.Element | null;
|
|
99
|
+
/**
|
|
100
|
+
* Get the icon for the given object.
|
|
101
|
+
* @param {string} id
|
|
102
|
+
* @param {{ common: { icon: any; }; }} obj
|
|
103
|
+
* @returns {string | null}
|
|
104
|
+
*/
|
|
105
|
+
static getObjectIcon(id: string, obj: {
|
|
106
|
+
common: {
|
|
107
|
+
icon: any;
|
|
108
|
+
};
|
|
109
|
+
}): string | null;
|
|
110
|
+
/**
|
|
111
|
+
* Splits CamelCase into words.
|
|
112
|
+
* @param {string | undefined} text
|
|
113
|
+
* @returns {string}
|
|
114
|
+
*/
|
|
115
|
+
static splitCamelCase(text: string | undefined): string;
|
|
116
|
+
/**
|
|
117
|
+
* Check if the given color is bright.
|
|
118
|
+
* https://stackoverflow.com/questions/35969656/how-can-i-generate-the-opposite-color-according-to-current-color
|
|
119
|
+
* @param {string | null | undefined} color
|
|
120
|
+
* @param {boolean} [defaultValue]
|
|
121
|
+
* @returns {boolean}
|
|
122
|
+
*/
|
|
123
|
+
static isUseBright(color: string | null | undefined, defaultValue?: boolean): boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Get the time string in the format 00:00.
|
|
126
|
+
* @param {string | number} seconds
|
|
127
|
+
*/
|
|
128
|
+
static getTimeString(seconds: string | number): string;
|
|
129
|
+
/**
|
|
130
|
+
* Gets the wind direction with the given angle (degrees).
|
|
131
|
+
* @param {number} angle in degrees.
|
|
132
|
+
* @returns {string | undefined}
|
|
133
|
+
*/
|
|
134
|
+
static getWindDirection(angle: number): string | undefined;
|
|
135
|
+
/**
|
|
136
|
+
* Pad the given number with a zero if its not 2 digits long.
|
|
137
|
+
* @param {string | number} num
|
|
138
|
+
*/
|
|
139
|
+
static padding(num: string | number): string | number;
|
|
140
|
+
/**
|
|
141
|
+
* Sets the date format.
|
|
142
|
+
* @param {string} format
|
|
143
|
+
*/
|
|
144
|
+
static setDataFormat(format: string): void;
|
|
145
|
+
/**
|
|
146
|
+
* Converts the date to a string.
|
|
147
|
+
* @param {string | number | Date} now
|
|
148
|
+
* @returns {string}
|
|
149
|
+
*/
|
|
150
|
+
static date2string(now: string | number | Date): string;
|
|
151
|
+
/**
|
|
152
|
+
* Render a text as a link.
|
|
153
|
+
* @param {string} text
|
|
154
|
+
* @returns {string | JSX.Element[]}
|
|
155
|
+
*/
|
|
156
|
+
static renderTextWithA(text: string): string | JSX.Element[];
|
|
157
|
+
/**
|
|
158
|
+
* Get the smart name of the given state.
|
|
159
|
+
* @param {Record<string, ioBroker.StateObject> | ioBroker.StateObject} states
|
|
160
|
+
* @param {string} id
|
|
161
|
+
* @param {string} instanceId
|
|
162
|
+
* @param {boolean} [noCommon]
|
|
163
|
+
*/
|
|
164
|
+
static getSmartName(states: Record<string, ioBroker.StateObject> | ioBroker.StateObject, id: string, instanceId: string, noCommon?: boolean): any;
|
|
165
|
+
/**
|
|
166
|
+
* Get the smart name from a state.
|
|
167
|
+
* @param {ioBroker.StateObject} obj
|
|
168
|
+
* @param {string} instanceId
|
|
169
|
+
* @param {boolean} [noCommon]
|
|
170
|
+
*/
|
|
171
|
+
static getSmartNameFromObj(obj: ioBroker.StateObject, instanceId: string, noCommon?: boolean): any;
|
|
172
|
+
/**
|
|
173
|
+
* Enable smart name for a state.
|
|
174
|
+
* @param {ioBroker.StateObject} obj
|
|
175
|
+
* @param {string} instanceId
|
|
176
|
+
* @param {boolean} [noCommon]
|
|
177
|
+
*/
|
|
178
|
+
static enableSmartName(obj: ioBroker.StateObject, instanceId: string, noCommon?: boolean): void;
|
|
179
|
+
/**
|
|
180
|
+
* Completely remove smart name from a state.
|
|
181
|
+
* @param {ioBroker.StateObject} obj
|
|
182
|
+
* @param {string | number} instanceId
|
|
183
|
+
* @param {boolean} [noCommon]
|
|
184
|
+
*/
|
|
185
|
+
static removeSmartName(obj: ioBroker.StateObject, instanceId: string | number, noCommon?: boolean): void;
|
|
186
|
+
/**
|
|
187
|
+
* Update the smartname of a state.
|
|
188
|
+
* @param {ioBroker.StateObject} obj
|
|
189
|
+
* @param {string} newSmartName
|
|
190
|
+
* @param {string | undefined} byON
|
|
191
|
+
* @param {string | undefined} smartType
|
|
192
|
+
* @param {string} instanceId
|
|
193
|
+
* @param {boolean} [noCommon]
|
|
194
|
+
*/
|
|
195
|
+
static updateSmartName(obj: ioBroker.StateObject, newSmartName: string, byON: string | undefined, smartType: string | undefined, instanceId: string, noCommon?: boolean): void;
|
|
196
|
+
/**
|
|
197
|
+
* Disable the smart name of a state.
|
|
198
|
+
* @param {ioBroker.StateObject} obj
|
|
199
|
+
* @param {string} instanceId
|
|
200
|
+
* @param {boolean} [noCommon]
|
|
201
|
+
*/
|
|
202
|
+
static disableSmartName(obj: ioBroker.StateObject, instanceId: string, noCommon?: boolean): void;
|
|
203
|
+
/**
|
|
204
|
+
* Copy text to the clipboard.
|
|
205
|
+
* @param {string} text
|
|
206
|
+
* @param {Event} [e]
|
|
207
|
+
*/
|
|
208
|
+
static copyToClipboard(text: string, e?: Event): void;
|
|
209
|
+
/**
|
|
210
|
+
* Gets the extension of a file name.
|
|
211
|
+
* @param {string | null} [fileName] the file name.
|
|
212
|
+
* @returns {string | null} The extension in lower case.
|
|
213
|
+
*/
|
|
214
|
+
static getFileExtension(fileName?: string | null): string | null;
|
|
215
|
+
/**
|
|
216
|
+
* Format number of bytes as a string with B, KB, MB or GB.
|
|
217
|
+
* The base for all calculations is 1024.
|
|
218
|
+
* @param {number} bytes The number of bytes.
|
|
219
|
+
* @returns {string} The formatted string (e.g. '723.5 KB')
|
|
220
|
+
*/
|
|
221
|
+
static formatBytes(bytes: number): string;
|
|
222
|
+
/**
|
|
223
|
+
* Invert the given color according to theme type to get the inverted text color for background
|
|
224
|
+
* @param {string} color Color in the format '#rrggbb' or '#rgb' (or without hash)
|
|
225
|
+
* @param {string} themeType theme type
|
|
226
|
+
* @param {string} invert dark theme has light color in control or light theme has light color in control
|
|
227
|
+
* @returns {string}
|
|
228
|
+
*/
|
|
229
|
+
static getInvertedColor(color: string, themeType: string, invert: string): string;
|
|
230
|
+
/**
|
|
231
|
+
* Invert the given color
|
|
232
|
+
* @param {string} hex Color in the format '#rrggbb' or '#rgb' (or without hash)
|
|
233
|
+
* @param {boolean} bw Set to black or white.
|
|
234
|
+
* @returns {string}
|
|
235
|
+
*/
|
|
236
|
+
static invertColor(hex: string, bw: boolean): string;
|
|
237
|
+
/**
|
|
238
|
+
* @private
|
|
239
|
+
* @param {any} mix
|
|
240
|
+
* @returns {string}
|
|
241
|
+
*/
|
|
242
|
+
private static _toVal;
|
|
243
|
+
/**
|
|
244
|
+
* Convert any object to a string with its values.
|
|
245
|
+
* @returns {string}
|
|
246
|
+
*/
|
|
247
|
+
static clsx(...args: any[]): string;
|
|
248
|
+
/**
|
|
249
|
+
* Get the current theme name (either from local storage or the browser settings).
|
|
250
|
+
* @param {string} [themeName]
|
|
251
|
+
* @returns {string}
|
|
252
|
+
*/
|
|
253
|
+
static getThemeName(themeName?: string): string;
|
|
254
|
+
/**
|
|
255
|
+
* Get the type of theme.
|
|
256
|
+
* @param {string} [themeName]
|
|
257
|
+
* @returns {'dark' | 'light'}
|
|
258
|
+
*/
|
|
259
|
+
static getThemeType(themeName?: string): 'dark' | 'light';
|
|
260
|
+
/**
|
|
261
|
+
* Set the theme name and theme type.
|
|
262
|
+
* @param {string} themeName
|
|
263
|
+
*/
|
|
264
|
+
static setThemeName(themeName: string): void;
|
|
265
|
+
/**
|
|
266
|
+
* Toggle the theme name between 'dark' and 'colored'.
|
|
267
|
+
* @param {string | null} themeName
|
|
268
|
+
* @returns {string} the new theme name.
|
|
269
|
+
*/
|
|
270
|
+
static toggleTheme(themeName: string | null): string;
|
|
271
|
+
/**
|
|
272
|
+
* Get the list of themes
|
|
273
|
+
* @returns {array<string>} list of possible themes
|
|
274
|
+
*/
|
|
275
|
+
static getThemeNames(): array<string>;
|
|
276
|
+
/**
|
|
277
|
+
* Parse a query string into its parts.
|
|
278
|
+
* @param {string} query
|
|
279
|
+
* @returns {Record<string, string | boolean | number>}
|
|
280
|
+
*/
|
|
281
|
+
static parseQuery(query: string): Record<string, string | boolean | number>;
|
|
282
|
+
/**
|
|
283
|
+
* Returns parent ID.
|
|
284
|
+
* @param {string} id
|
|
285
|
+
* @returns {string | null} parent ID or null if no parent
|
|
286
|
+
*/
|
|
287
|
+
static getParentId(id: string): string | null;
|
|
288
|
+
static formatDate(dateObj: any, dateFormat: any): string;
|
|
289
|
+
static formatTime(seconds: any): string;
|
|
290
|
+
static MDtext2link(text: any): any;
|
|
291
|
+
static openLink(url: any, target: any): void;
|
|
292
|
+
static MDgetTitle(text: any): any;
|
|
293
|
+
static MDextractHeader(text: any): {
|
|
294
|
+
header: {};
|
|
295
|
+
body: any;
|
|
296
|
+
};
|
|
297
|
+
static MDremoveDocsify(text: any): any;
|
|
298
|
+
/**
|
|
299
|
+
* Generate the json file on the file for download.
|
|
300
|
+
* @param {string} filename file name
|
|
301
|
+
* @returns {object} json structure (not stringified)
|
|
302
|
+
*/
|
|
303
|
+
static generateFile(filename: string, json: any): object;
|
|
304
|
+
/**
|
|
305
|
+
* Convert quality code into text
|
|
306
|
+
* @param {number} quality code
|
|
307
|
+
* @returns {array<string>} lines that decode qulity
|
|
308
|
+
*/
|
|
309
|
+
static quality2text(quality: number): array<string>;
|
|
310
|
+
/**
|
|
311
|
+
* Deep copy object
|
|
312
|
+
* @param {object} object
|
|
313
|
+
* @returns {object}
|
|
314
|
+
*/
|
|
315
|
+
static clone(object: object): object;
|
|
316
|
+
/**
|
|
317
|
+
* Get states of object
|
|
318
|
+
* @param {object} obj
|
|
319
|
+
* @returns {object} states as an object in form {"value1": "label1", "value2": "label2"} or null
|
|
320
|
+
*/
|
|
321
|
+
static getStates(obj: object): object;
|
|
322
|
+
/**
|
|
323
|
+
* Get svg file as text
|
|
324
|
+
* @param {string} url URL of SVG file
|
|
325
|
+
* @returns {object} Promise with "data:image..."
|
|
326
|
+
*/
|
|
327
|
+
static getSvg(url: string): object;
|
|
328
|
+
/**
|
|
329
|
+
* Detect file xtension by its content
|
|
330
|
+
* @param {string} base64 Base64 encoded binary file
|
|
331
|
+
* @returns {string} Detected extension, like 'jpg'
|
|
332
|
+
*/
|
|
333
|
+
static detectMimeType(base64: string): string;
|
|
334
|
+
}
|