@iobroker/adapter-react-v5 3.1.24 → 3.1.27

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.
Files changed (132) hide show
  1. package/Components/404.d.ts +3 -0
  2. package/Components/ColorPicker.d.ts +138 -0
  3. package/Components/ComplexCron.d.ts +8 -0
  4. package/Components/CustomModal.d.ts +3 -0
  5. package/Components/FileBrowser.d.ts +125 -0
  6. package/Components/FileViewer.d.ts +80 -0
  7. package/Components/FileViewer.js +10 -9
  8. package/Components/FileViewer.js.map +1 -1
  9. package/Components/Icon.d.ts +21 -0
  10. package/Components/IconPicker.d.ts +64 -0
  11. package/Components/IconSelector.d.ts +25 -0
  12. package/Components/Image.d.ts +64 -0
  13. package/Components/JsonConfigComponent/ChipInput.d.ts +13 -0
  14. package/Components/JsonConfigComponent/ConfigAlive.d.ts +10 -0
  15. package/Components/JsonConfigComponent/ConfigAutocomplete.d.ts +14 -0
  16. package/Components/JsonConfigComponent/ConfigAutocompleteSendTo.d.ts +14 -0
  17. package/Components/JsonConfigComponent/ConfigCRON.d.ts +15 -0
  18. package/Components/JsonConfigComponent/ConfigCertificateSelect.d.ts +14 -0
  19. package/Components/JsonConfigComponent/ConfigCheckbox.d.ts +14 -0
  20. package/Components/JsonConfigComponent/ConfigChip.d.ts +14 -0
  21. package/Components/JsonConfigComponent/ConfigColor.d.ts +14 -0
  22. package/Components/JsonConfigComponent/ConfigCoordinates.d.ts +14 -0
  23. package/Components/JsonConfigComponent/ConfigCustom.d.ts +26 -0
  24. package/Components/JsonConfigComponent/ConfigDatePicker.d.ts +14 -0
  25. package/Components/JsonConfigComponent/ConfigFile.d.ts +15 -0
  26. package/Components/JsonConfigComponent/ConfigFileSelector.d.ts +3 -0
  27. package/Components/JsonConfigComponent/ConfigFunc.d.ts +14 -0
  28. package/Components/JsonConfigComponent/ConfigGeneric.d.ts +71 -0
  29. package/Components/JsonConfigComponent/ConfigIP.d.ts +14 -0
  30. package/Components/JsonConfigComponent/ConfigImageUpload.d.ts +14 -0
  31. package/Components/JsonConfigComponent/ConfigInstanceSelect.d.ts +14 -0
  32. package/Components/JsonConfigComponent/ConfigJsonEditor.d.ts +14 -0
  33. package/Components/JsonConfigComponent/ConfigLanguage.d.ts +14 -0
  34. package/Components/JsonConfigComponent/ConfigNumber.d.ts +3 -0
  35. package/Components/JsonConfigComponent/ConfigObjectId.d.ts +17 -0
  36. package/Components/JsonConfigComponent/ConfigPanel.d.ts +3 -0
  37. package/Components/JsonConfigComponent/ConfigPassword.d.ts +14 -0
  38. package/Components/JsonConfigComponent/ConfigPattern.d.ts +14 -0
  39. package/Components/JsonConfigComponent/ConfigRoom.d.ts +14 -0
  40. package/Components/JsonConfigComponent/ConfigSelect.d.ts +14 -0
  41. package/Components/JsonConfigComponent/ConfigSelectSendTo.d.ts +17 -0
  42. package/Components/JsonConfigComponent/ConfigSendto.d.ts +18 -0
  43. package/Components/JsonConfigComponent/ConfigSendto.js +171 -9
  44. package/Components/JsonConfigComponent/ConfigSendto.js.map +1 -1
  45. package/Components/JsonConfigComponent/ConfigSetState.d.ts +18 -0
  46. package/Components/JsonConfigComponent/ConfigSlider.d.ts +14 -0
  47. package/Components/JsonConfigComponent/ConfigStaticDivider.d.ts +14 -0
  48. package/Components/JsonConfigComponent/ConfigStaticHeader.d.ts +14 -0
  49. package/Components/JsonConfigComponent/ConfigStaticImage.d.ts +14 -0
  50. package/Components/JsonConfigComponent/ConfigStaticText.d.ts +14 -0
  51. package/Components/JsonConfigComponent/ConfigTable.d.ts +3 -0
  52. package/Components/JsonConfigComponent/ConfigTabs.d.ts +33 -0
  53. package/Components/JsonConfigComponent/ConfigText.d.ts +14 -0
  54. package/Components/JsonConfigComponent/ConfigTextSendTo.d.ts +10 -0
  55. package/Components/JsonConfigComponent/ConfigTimePicker.d.ts +14 -0
  56. package/Components/JsonConfigComponent/ConfigTopic.d.ts +17 -0
  57. package/Components/JsonConfigComponent/ConfigUser.d.ts +14 -0
  58. package/Components/JsonConfigComponent/index.d.ts +27 -0
  59. package/Components/JsonConfigComponent/index.js +21 -17
  60. package/Components/JsonConfigComponent/index.js.map +1 -1
  61. package/Components/Loader.d.ts +37 -0
  62. package/Components/Loaders/PT.d.ts +41 -0
  63. package/Components/Loaders/Vendor.d.ts +41 -0
  64. package/Components/Logo.d.ts +59 -0
  65. package/Components/MDUtils.d.ts +12 -0
  66. package/Components/ObjectBrowser.d.ts +632 -0
  67. package/Components/Router.d.ts +35 -0
  68. package/Components/SaveCloseButtons.d.ts +64 -0
  69. package/Components/Schedule.d.ts +7 -0
  70. package/Components/SelectWithIcon.d.ts +21 -0
  71. package/Components/SimpleCron/cron2text.d.ts +8 -0
  72. package/Components/SimpleCron/cronText.d.ts +2 -0
  73. package/Components/SimpleCron/index.d.ts +8 -0
  74. package/Components/SimpleCron/jquery.cron.locale.d.ts +2 -0
  75. package/Components/TabContainer.d.ts +42 -0
  76. package/Components/TabContent.d.ts +32 -0
  77. package/Components/TabHeader.d.ts +13 -0
  78. package/Components/TableResize.d.ts +14 -0
  79. package/Components/TextWithIcon.d.ts +3 -0
  80. package/Components/ToggleThemeMenu.d.ts +8 -0
  81. package/Components/TreeTable.d.ts +3 -0
  82. package/Components/UploadImage.d.ts +2 -0
  83. package/Components/Utils.d.ts +334 -0
  84. package/Components/copy-to-clipboard.d.ts +2 -0
  85. package/Components/withWidth.d.ts +2 -0
  86. package/Connection.d.ts +761 -0
  87. package/Connection.js +9 -1
  88. package/Connection.js.map +1 -1
  89. package/Dialogs/ComplexCron.d.ts +15 -0
  90. package/Dialogs/Confirm.d.ts +48 -0
  91. package/Dialogs/Cron.d.ts +15 -0
  92. package/Dialogs/Error.d.ts +49 -0
  93. package/Dialogs/FileSelect.d.ts +148 -0
  94. package/Dialogs/Message.d.ts +39 -0
  95. package/Dialogs/SelectID.d.ts +161 -0
  96. package/Dialogs/SimpleCron.d.ts +14 -0
  97. package/Dialogs/TextInput.d.ts +87 -0
  98. package/GenericApp.d.ts +213 -0
  99. package/Prompt.d.ts +5 -0
  100. package/README.md +7 -0
  101. package/Theme.d.ts +7 -0
  102. package/assets/devices/parseNames.d.ts +1 -0
  103. package/assets/rooms/parseNames.d.ts +1 -0
  104. package/i18n/de.json +4 -1
  105. package/i18n/en.json +4 -1
  106. package/i18n/es.json +4 -1
  107. package/i18n/fr.json +4 -1
  108. package/i18n/it.json +4 -1
  109. package/i18n/nl.json +4 -1
  110. package/i18n/pl.json +4 -1
  111. package/i18n/pt.json +4 -1
  112. package/i18n/ru.json +4 -1
  113. package/i18n/zh-cn.json +4 -1
  114. package/i18n.d.ts +92 -0
  115. package/icons/IconAdapter.d.ts +11 -0
  116. package/icons/IconAlias.d.ts +11 -0
  117. package/icons/IconChannel.d.ts +11 -0
  118. package/icons/IconClearFilter.d.ts +11 -0
  119. package/icons/IconClosed.d.ts +11 -0
  120. package/icons/IconCopy.d.ts +38 -0
  121. package/icons/IconDevice.d.ts +11 -0
  122. package/icons/IconDocument.d.ts +11 -0
  123. package/icons/IconDocumentReadOnly.d.ts +11 -0
  124. package/icons/IconExpert.d.ts +38 -0
  125. package/icons/IconFx.d.ts +11 -0
  126. package/icons/IconInstance.d.ts +11 -0
  127. package/icons/IconLogout.d.ts +38 -0
  128. package/icons/IconNoIcon.d.ts +38 -0
  129. package/icons/IconOpen.d.ts +11 -0
  130. package/icons/IconState.d.ts +11 -0
  131. package/index.d.ts +113 -0
  132. 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,2 @@
1
+ export default convertCronToText;
2
+ declare function convertCronToText(cron: any, lang: any): any;
@@ -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,2 @@
1
+ export default JQUERY_CRON_LOCALE;
2
+ declare const JQUERY_CRON_LOCALE: typeof JQUERY_CRON_LOCALE;
@@ -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,3 @@
1
+ declare const _default: React.JSXElementConstructor<any>;
2
+ export default _default;
3
+ import React from "react";
@@ -0,0 +1,8 @@
1
+ export default function ToggleThemeMenu({ themeName, toggleTheme, t, className, style, size }: {
2
+ themeName: any;
3
+ toggleTheme: any;
4
+ t: any;
5
+ className: any;
6
+ style: any;
7
+ size: any;
8
+ }): JSX.Element;
@@ -0,0 +1,3 @@
1
+ declare const _default: React.JSXElementConstructor<any>;
2
+ export default _default;
3
+ import React from "react";
@@ -0,0 +1,2 @@
1
+ declare const _default: import("react").JSXElementConstructor<any>;
2
+ export default _default;
@@ -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
+ }
@@ -0,0 +1,2 @@
1
+ export = copy;
2
+ declare function copy(text: any, options: any): boolean;
@@ -0,0 +1,2 @@
1
+ export default withWidth;
2
+ declare function withWidth(): (WrappedComponent: any) => (props: any) => JSX.Element;