@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,213 @@
1
+ export default GenericApp;
2
+ /**
3
+ * @extends {Router<import('./types').GenericAppProps, import('./types').GenericAppState>}
4
+ */
5
+ declare class GenericApp extends Router<import("./types").GenericAppProps, import("./types").GenericAppState> {
6
+ /**
7
+ * Gets the width depending on the window inner width.
8
+ * @returns {import('./types').Width}
9
+ */
10
+ static getWidth(): import('./types').Width;
11
+ /**
12
+ * Closes the dialog.
13
+ * @private
14
+ */
15
+ private static onClose;
16
+ /**
17
+ * @param {import('./types').GenericAppProps} props
18
+ * @param {import('./types').GenericAppSettings | undefined} settings
19
+ */
20
+ constructor(props: import('./types').GenericAppProps, settings: import('./types').GenericAppSettings | undefined);
21
+ instance: number;
22
+ adapterName: any;
23
+ instanceId: string;
24
+ newReact: boolean;
25
+ state: {
26
+ selectedTab: any;
27
+ selectedTabNum: number;
28
+ native: {};
29
+ errorText: string;
30
+ changed: boolean;
31
+ connected: boolean;
32
+ loaded: boolean;
33
+ isConfigurationError: string;
34
+ expertMode: boolean;
35
+ toast: string;
36
+ theme: import("./types").Theme;
37
+ themeName: string;
38
+ themeType: string;
39
+ bottomButtons: boolean;
40
+ width: import("./types").Width;
41
+ };
42
+ savedNative: {};
43
+ encryptedFields: string[];
44
+ sentryDSN: any;
45
+ socket: any;
46
+ _secret: any;
47
+ _systemConfig: any;
48
+ sentryStarted: boolean;
49
+ sentryInited: boolean;
50
+ common: any;
51
+ onSystemConfigChanged: (id: any, obj: any) => void;
52
+ onReceiveMessage: (message: any) => void;
53
+ /**
54
+ * @private
55
+ */
56
+ private onResize;
57
+ resizeTimer: any;
58
+ /**
59
+ * Get a theme
60
+ * @param {string} name Theme name
61
+ * @returns {import('./types').Theme}
62
+ */
63
+ createTheme(name?: string): import('./types').Theme;
64
+ /**
65
+ * Get the theme name
66
+ * @param {import('./types').Theme} theme Theme
67
+ * @returns {string} Theme name
68
+ */
69
+ getThemeName(theme: import('./types').Theme): string;
70
+ /**
71
+ * Get the theme type
72
+ * @param {import('./types').Theme} theme Theme
73
+ * @returns {string} Theme type
74
+ */
75
+ getThemeType(theme: import('./types').Theme): string;
76
+ /**
77
+ * Changes the current theme
78
+ */
79
+ toggleTheme(): void;
80
+ /**
81
+ * Gets the system configuration.
82
+ * @returns {Promise<ioBroker.OtherObject>}
83
+ */
84
+ getSystemConfig(): Promise<ioBroker.OtherObject>;
85
+ /**
86
+ * Get current expert mode
87
+ * @returns {boolean}
88
+ */
89
+ getExpertMode(): boolean;
90
+ /**
91
+ * Gets called when the socket.io connection is ready.
92
+ * You can overload this function to execute own commands.
93
+ */
94
+ onConnectionReady(): void;
95
+ /**
96
+ * Encrypts a string.
97
+ * @param {string} value
98
+ * @returns {string}
99
+ */
100
+ encrypt(value: string): string;
101
+ /**
102
+ * Decrypts a string.
103
+ * @param {string} value
104
+ * @returns {string}
105
+ */
106
+ decrypt(value: string): string;
107
+ /**
108
+ * Selects the given tab.
109
+ * @param {string} tab
110
+ * @param {number} [index]
111
+ */
112
+ selectTab(tab: string, index?: number): void;
113
+ /**
114
+ * Gets called before the settings are saved.
115
+ * You may override this if needed.
116
+ * @param {Record<string, any>} settings
117
+ */
118
+ onPrepareSave(settings: Record<string, any>): boolean;
119
+ /**
120
+ * Gets called after the settings are loaded.
121
+ * You may override this if needed.
122
+ * @param {Record<string, any>} settings
123
+ * @param {string[]} encryptedNative optional list of fields to be decrypted
124
+ */
125
+ onPrepareLoad(settings: Record<string, any>, encryptedNative: string[]): void;
126
+ /**
127
+ * Gets the extendable instances.
128
+ * @returns {Promise<any[]>}
129
+ */
130
+ getExtendableInstances(): Promise<any[]>;
131
+ /**
132
+ * Gets the IP addresses of the given host.
133
+ * @param {string} host
134
+ */
135
+ getIpAddresses(host: string): Promise<any>;
136
+ /**
137
+ * Saves the settings to the server.
138
+ * @param {boolean} isClose True if the user is closing the dialog.
139
+ */
140
+ onSave(isClose: boolean): void;
141
+ /**
142
+ * Renders the toast.
143
+ * @returns {JSX.Element | null} The JSX element.
144
+ */
145
+ renderToast(): JSX.Element | null;
146
+ /**
147
+ * Renders the error dialog.
148
+ * @returns {JSX.Element | null} The JSX element.
149
+ */
150
+ renderError(): JSX.Element | null;
151
+ /**
152
+ * Checks if the configuration has changed.
153
+ * @param {Record<string, any>} [native] the new state
154
+ */
155
+ getIsChanged(native?: Record<string, any>): boolean;
156
+ /**
157
+ * Gets called when loading the configuration.
158
+ * @param {Record<string, any>} newNative The new configuration object.
159
+ */
160
+ onLoadConfig(newNative: Record<string, any>): void;
161
+ /**
162
+ * Sets the configuration error.
163
+ * @param {string} errorText
164
+ */
165
+ setConfigurationError(errorText: string): void;
166
+ /**
167
+ * Renders the save and close buttons.
168
+ * @returns {JSX.Element | undefined} The JSX element.
169
+ */
170
+ renderSaveCloseButtons(): JSX.Element | undefined;
171
+ /**
172
+ * @private
173
+ * @param {Record<string, any>} obj
174
+ * @param {any} attrs
175
+ * @param {any} value
176
+ * @returns {boolean | undefined}
177
+ */
178
+ private _updateNativeValue;
179
+ /**
180
+ * Update the native value
181
+ * @param {string} attr The attribute name with dots as delimiter.
182
+ * @param {any} value The new value.
183
+ * @param {(() => void)} [cb] Callback which will be called upon completion.
184
+ */
185
+ updateNativeValue(attr: string, value: any, cb?: () => void): void;
186
+ /**
187
+ * Set the error text to be shown.
188
+ * @param {string | JSX.Element} text
189
+ */
190
+ showError(text: string | JSX.Element): void;
191
+ /**
192
+ * Sets the toast to be shown.
193
+ * @param {string} toast
194
+ */
195
+ showToast(toast: string): void;
196
+ /**
197
+ * Renders this component.
198
+ * @returns {JSX.Element} The JSX element.
199
+ */
200
+ render(): JSX.Element;
201
+ }
202
+ declare namespace GenericApp {
203
+ namespace propTypes {
204
+ const adapterName: PropTypes.Requireable<string>;
205
+ const onThemeChange: PropTypes.Requireable<(...args: any[]) => any>;
206
+ const socket: PropTypes.Requireable<object>;
207
+ const encryptedFields: PropTypes.Requireable<any[]>;
208
+ const bottomButtons: PropTypes.Requireable<boolean>;
209
+ const Connection: PropTypes.Requireable<object>;
210
+ }
211
+ }
212
+ import Router from "./Components/Router";
213
+ import PropTypes from "prop-types";
package/Prompt.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ export default printPrompt;
2
+ /**
3
+ * Print the ioBroker welcome screen to the developer console.
4
+ */
5
+ declare function printPrompt(): void;
package/README.md CHANGED
@@ -642,6 +642,13 @@ If you still have questions, try to find an answer [here](https://mui.com/guides
642
642
  -->
643
643
 
644
644
  ## Changelog
645
+ ### 3.1.27 (2022-08-01)
646
+ * (bluefox) Disable file editing in FileViewer
647
+
648
+ ### 3.1.26 (2022-08-01)
649
+ * (bluefox) Added translations
650
+ * (bluefox) JSON schema was extended with missing definitions
651
+
645
652
  ### 3.1.24 (2022-07-28)
646
653
  * (bluefox) Updated file browser and object browser
647
654
 
package/Theme.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ export default Theme;
2
+ /**
3
+ * The theme creation factory function.
4
+ * @param {string} type
5
+ * @returns {import('./types').Theme}
6
+ */
7
+ declare function Theme(type: string): import('./types').Theme;
@@ -0,0 +1 @@
1
+
@@ -0,0 +1 @@
1
+
package/i18n/de.json CHANGED
@@ -316,5 +316,8 @@
316
316
  "ra_File is too big. Max %sk allowed. Try use SVG.": "Datei ist zu groß. Max %sk erlaubt. Versuchen Sie, SVG zu verwenden.",
317
317
  "ra_Cannot upload": "Kann nicht hochladen",
318
318
  "ra_Crop": "Ernte",
319
- "ra_tooltip_comment": "Kommentar"
319
+ "ra_tooltip_comment": "Kommentar",
320
+ "ra_Disconnected": "Getrennt",
321
+ "ra_Connected": "Verbunden",
322
+ "ra_Configure": "Konfigurieren"
320
323
  }
package/i18n/en.json CHANGED
@@ -316,5 +316,8 @@
316
316
  "ra_File is too big. Max %sk allowed. Try use SVG.": "File is too big. Max %sk allowed. Try use SVG.",
317
317
  "ra_Cannot upload": "Cannot upload",
318
318
  "ra_Crop": "Crop",
319
- "ra_tooltip_comment": "Comment"
319
+ "ra_tooltip_comment": "Comment",
320
+ "ra_Disconnected": "Disconnected",
321
+ "ra_Connected": "Connected",
322
+ "ra_Configure": "Configure"
320
323
  }
package/i18n/es.json CHANGED
@@ -303,5 +303,8 @@
303
303
  "ra_File is too big. Max %sk allowed. Try use SVG.": "El archivo es demasiado grande. Máximo de %sk permitido. Intenta usar SVG.",
304
304
  "ra_Cannot upload": "no se puede cargar",
305
305
  "ra_Crop": "Cultivo",
306
- "ra_tooltip_comment": "Comentario"
306
+ "ra_tooltip_comment": "Comentario",
307
+ "ra_Disconnected": "Desconectado",
308
+ "ra_Connected": "Conectado",
309
+ "ra_Configure": "Configurar"
307
310
  }
package/i18n/fr.json CHANGED
@@ -303,5 +303,8 @@
303
303
  "ra_File is too big. Max %sk allowed. Try use SVG.": "Le fichier est trop volumineux. Max %sk autorisé. Essayez d'utiliser SVG.",
304
304
  "ra_Cannot upload": "Impossible de télécharger",
305
305
  "ra_Crop": "Recadrer",
306
- "ra_tooltip_comment": "Commentaire"
306
+ "ra_tooltip_comment": "Commentaire",
307
+ "ra_Disconnected": "Débranché",
308
+ "ra_Connected": "Lié",
309
+ "ra_Configure": "Configurer"
307
310
  }
package/i18n/it.json CHANGED
@@ -303,5 +303,8 @@
303
303
  "ra_File is too big. Max %sk allowed. Try use SVG.": "Il file è troppo grande. Max %sk consentito. Prova a usare SVG.",
304
304
  "ra_Cannot upload": "Impossibile caricare",
305
305
  "ra_Crop": "Raccolto",
306
- "ra_tooltip_comment": "Commento"
306
+ "ra_tooltip_comment": "Commento",
307
+ "ra_Disconnected": "Disconnesso",
308
+ "ra_Connected": "Collegato",
309
+ "ra_Configure": "Configura"
307
310
  }
package/i18n/nl.json CHANGED
@@ -303,5 +303,8 @@
303
303
  "ra_File is too big. Max %sk allowed. Try use SVG.": "Bestand is te groot. Max. %sk toegestaan. Probeer SVG te gebruiken.",
304
304
  "ra_Cannot upload": "Kan niet uploaden",
305
305
  "ra_Crop": "Bijsnijden",
306
- "ra_tooltip_comment": "Opmerking"
306
+ "ra_tooltip_comment": "Opmerking",
307
+ "ra_Disconnected": "Verbinding verbroken",
308
+ "ra_Connected": "Verbonden",
309
+ "ra_Configure": "Configureren"
307
310
  }
package/i18n/pl.json CHANGED
@@ -303,5 +303,8 @@
303
303
  "ra_File is too big. Max %sk allowed. Try use SVG.": "Plik jest za duży. Maksymalna dozwolona liczba %sk. Spróbuj użyć SVG.",
304
304
  "ra_Cannot upload": "Nie można przesłać",
305
305
  "ra_Crop": "Przyciąć",
306
- "ra_tooltip_comment": "Komentarz"
306
+ "ra_tooltip_comment": "Komentarz",
307
+ "ra_Disconnected": "Niepowiązany",
308
+ "ra_Connected": "Połączony",
309
+ "ra_Configure": "Konfiguruj"
307
310
  }
package/i18n/pt.json CHANGED
@@ -303,5 +303,8 @@
303
303
  "ra_File is too big. Max %sk allowed. Try use SVG.": "O arquivo é muito grande. Max %sk permitido. Tente usar SVG.",
304
304
  "ra_Cannot upload": "Não é possível fazer upload",
305
305
  "ra_Crop": "Colheita",
306
- "ra_tooltip_comment": "Comente"
306
+ "ra_tooltip_comment": "Comente",
307
+ "ra_Disconnected": "Desconectado",
308
+ "ra_Connected": "Conectado",
309
+ "ra_Configure": "Configurar"
307
310
  }
package/i18n/ru.json CHANGED
@@ -316,5 +316,8 @@
316
316
  "ra_File is too big. Max %sk allowed. Try use SVG.": "Файл слишком большой. Разрешено максимальное количество %sk. Попробуйте использовать SVG.",
317
317
  "ra_Cannot upload": "Невозможно загрузить",
318
318
  "ra_Crop": "Обрезать",
319
- "ra_tooltip_comment": "Комментарий"
319
+ "ra_tooltip_comment": "Комментарий",
320
+ "ra_Disconnected": "Отключено",
321
+ "ra_Connected": "Соединение установлено",
322
+ "ra_Configure": "Настроить"
320
323
  }
package/i18n/zh-cn.json CHANGED
@@ -303,5 +303,8 @@
303
303
  "ra_File is too big. Max %sk allowed. Try use SVG.": "文件太大。允许的最大字节%s数。尝试使用 SVG。",
304
304
  "ra_Cannot upload": "无法上传",
305
305
  "ra_Crop": "庄稼",
306
- "ra_tooltip_comment": "评论"
306
+ "ra_tooltip_comment": "评论",
307
+ "ra_Disconnected": "断开连接",
308
+ "ra_Connected": "连接的",
309
+ "ra_Configure": "配置"
307
310
  }
package/i18n.d.ts ADDED
@@ -0,0 +1,92 @@
1
+ export default I18n;
2
+ /***
3
+ * Copyright 2018-2022 bluefox <dogafox@gmail.com>
4
+ *
5
+ * MIT License
6
+ *
7
+ ***/
8
+ /**
9
+ * Translation string management.
10
+ */
11
+ declare class I18n {
12
+ /**
13
+ * List of all languages with their translations.
14
+ * @type {{ [lang in ioBroker.Languages]?: Record<string, string>; }}
15
+ */
16
+ static translations: {
17
+ fr?: Record<string, string>;
18
+ pt?: Record<string, string>;
19
+ pl?: Record<string, string>;
20
+ en?: Record<string, string>;
21
+ de?: Record<string, string>;
22
+ ru?: Record<string, string>;
23
+ nl?: Record<string, string>;
24
+ it?: Record<string, string>;
25
+ es?: Record<string, string>;
26
+ "zh-cn"?: Record<string, string>;
27
+ };
28
+ /**
29
+ * List of unknown translations during development.
30
+ * @type {string[]}
31
+ */
32
+ static unknownTranslations: string[];
33
+ /**
34
+ * The currently displayed language.
35
+ * @type {ioBroker.Languages}
36
+ */
37
+ static lang: ioBroker.Languages;
38
+ static _disableWarning: boolean;
39
+ /**
40
+ * Set the language to display.
41
+ * @param {ioBroker.Languages} lang
42
+ */
43
+ static setLanguage(lang: ioBroker.Languages): void;
44
+ /**
45
+ * Add translations
46
+ * User can provide two types of structures:
47
+ * - {"word1": "translated word1", "word2": "translated word2"}, but in this case the lang must be provided
48
+ * - {"word1": {"en": "translated en word1", "de": "translated de word1"}, "word2": {"en": "translated en word2", "de": "translated de word2"}}, but no lang must be provided
49
+ * @param {object} words additional words for specific language
50
+ * @param {ioBroker.Languages} lang
51
+ */
52
+ static extendTranslations(words: object, lang: ioBroker.Languages): void;
53
+ /**
54
+ * Sets all translations (in all languages).
55
+ * @param {{ [lang in ioBroker.Languages]?: Record<string, string>; }} translations
56
+ */
57
+ static setTranslations(translations: {
58
+ fr?: Record<string, string>;
59
+ pt?: Record<string, string>;
60
+ pl?: Record<string, string>;
61
+ en?: Record<string, string>;
62
+ de?: Record<string, string>;
63
+ ru?: Record<string, string>;
64
+ nl?: Record<string, string>;
65
+ it?: Record<string, string>;
66
+ es?: Record<string, string>;
67
+ "zh-cn"?: Record<string, string>;
68
+ }): void;
69
+ /**
70
+ * Get the currently chosen language.
71
+ * @returns {ioBroker.Languages} The current language.
72
+ */
73
+ static getLanguage(): ioBroker.Languages;
74
+ /**
75
+ * Translate the given string to the selected language.
76
+ * @param {string} word The (key) word to look up the string.
77
+ * @param {string[]} args Optional arguments which will replace the first (second, third, ...) occurrences of %s
78
+ */
79
+ static t(word: string, ...args: string[]): string;
80
+ /**
81
+ * Show non-translated words
82
+ * Required during development
83
+ * @param {string | RegExp} filter filter words
84
+ */
85
+ static i18nShow(filter: string | RegExp): void;
86
+ /**
87
+ * Disable warning about non-translated words
88
+ * Required during development
89
+ * @param {boolean} disable Do the warning should be disabled
90
+ */
91
+ static disableWarning(disable: boolean): void;
92
+ }
@@ -0,0 +1,11 @@
1
+ export default IconAdapter;
2
+ declare function IconAdapter(props: any): JSX.Element;
3
+ declare namespace IconAdapter {
4
+ namespace propTypes {
5
+ const onClick: PropTypes.Requireable<(...args: any[]) => any>;
6
+ const width: PropTypes.Requireable<string | number>;
7
+ const height: PropTypes.Requireable<string | number>;
8
+ const className: PropTypes.Requireable<string>;
9
+ }
10
+ }
11
+ import PropTypes from "prop-types";
@@ -0,0 +1,11 @@
1
+ export default IconAlias;
2
+ declare function IconAlias(props: any): JSX.Element;
3
+ declare namespace IconAlias {
4
+ namespace propTypes {
5
+ const onClick: PropTypes.Requireable<(...args: any[]) => any>;
6
+ const width: PropTypes.Requireable<string | number>;
7
+ const height: PropTypes.Requireable<string | number>;
8
+ const className: PropTypes.Requireable<string>;
9
+ }
10
+ }
11
+ import PropTypes from "prop-types";
@@ -0,0 +1,11 @@
1
+ export default IconChannel;
2
+ declare function IconChannel(props: any): JSX.Element;
3
+ declare namespace IconChannel {
4
+ namespace propTypes {
5
+ const onClick: PropTypes.Requireable<(...args: any[]) => any>;
6
+ const width: PropTypes.Requireable<string | number>;
7
+ const height: PropTypes.Requireable<string | number>;
8
+ const className: PropTypes.Requireable<string>;
9
+ }
10
+ }
11
+ import PropTypes from "prop-types";
@@ -0,0 +1,11 @@
1
+ export default IconClearFilter;
2
+ declare function IconClearFilter(props: any): JSX.Element;
3
+ declare namespace IconClearFilter {
4
+ namespace propTypes {
5
+ const onClick: PropTypes.Requireable<(...args: any[]) => any>;
6
+ const width: PropTypes.Requireable<string | number>;
7
+ const height: PropTypes.Requireable<string | number>;
8
+ const className: PropTypes.Requireable<string>;
9
+ }
10
+ }
11
+ import PropTypes from "prop-types";
@@ -0,0 +1,11 @@
1
+ export default IconClosed;
2
+ declare function IconClosed(props: any): JSX.Element;
3
+ declare namespace IconClosed {
4
+ namespace propTypes {
5
+ const onClick: PropTypes.Requireable<(...args: any[]) => any>;
6
+ const width: PropTypes.Requireable<string | number>;
7
+ const height: PropTypes.Requireable<string | number>;
8
+ const className: PropTypes.Requireable<string>;
9
+ }
10
+ }
11
+ import PropTypes from "prop-types";
@@ -0,0 +1,38 @@
1
+ export default IconCopy;
2
+ export type IconCopyProps = {
3
+ /**
4
+ * The width in pixels of the icon.
5
+ */
6
+ width?: number;
7
+ /**
8
+ * The height in pixels of the icon.
9
+ */
10
+ height?: number;
11
+ /**
12
+ * Click handler.
13
+ */
14
+ onClick?: (e: React.MouseEvent) => void;
15
+ /**
16
+ * The class name for the SVG element.
17
+ */
18
+ className?: string;
19
+ };
20
+ /**
21
+ * @typedef {object} IconCopyProps
22
+ * @property {number} [width] The width in pixels of the icon.
23
+ * @property {number} [height] The height in pixels of the icon.
24
+ * @property {(e: React.MouseEvent) => void} [onClick] Click handler.
25
+ * @property {string} [className] The class name for the SVG element.
26
+ *
27
+ * @extends {React.Component<IconCopyProps>}
28
+ */
29
+ declare function IconCopy(props: any): JSX.Element;
30
+ declare namespace IconCopy {
31
+ namespace propTypes {
32
+ const onClick: PropTypes.Requireable<(...args: any[]) => any>;
33
+ const width: PropTypes.Requireable<string | number>;
34
+ const height: PropTypes.Requireable<string | number>;
35
+ const className: PropTypes.Requireable<string>;
36
+ }
37
+ }
38
+ import PropTypes from "prop-types";
@@ -0,0 +1,11 @@
1
+ export default IconDevice;
2
+ declare function IconDevice(props: any): JSX.Element;
3
+ declare namespace IconDevice {
4
+ namespace propTypes {
5
+ const onClick: PropTypes.Requireable<(...args: any[]) => any>;
6
+ const width: PropTypes.Requireable<string | number>;
7
+ const height: PropTypes.Requireable<string | number>;
8
+ const className: PropTypes.Requireable<string>;
9
+ }
10
+ }
11
+ import PropTypes from "prop-types";
@@ -0,0 +1,11 @@
1
+ export default IconDocument;
2
+ declare function IconDocument(props: any): JSX.Element;
3
+ declare namespace IconDocument {
4
+ namespace propTypes {
5
+ const onClick: PropTypes.Requireable<(...args: any[]) => any>;
6
+ const width: PropTypes.Requireable<string | number>;
7
+ const height: PropTypes.Requireable<string | number>;
8
+ const className: PropTypes.Requireable<string>;
9
+ }
10
+ }
11
+ import PropTypes from "prop-types";
@@ -0,0 +1,11 @@
1
+ export default IconDocumentReadOnly;
2
+ declare function IconDocumentReadOnly(props: any): JSX.Element;
3
+ declare namespace IconDocumentReadOnly {
4
+ namespace propTypes {
5
+ const onClick: PropTypes.Requireable<(...args: any[]) => any>;
6
+ const width: PropTypes.Requireable<string | number>;
7
+ const height: PropTypes.Requireable<string | number>;
8
+ const className: PropTypes.Requireable<string>;
9
+ }
10
+ }
11
+ import PropTypes from "prop-types";
@@ -0,0 +1,38 @@
1
+ export default ExpertIcon;
2
+ export type ExpertIconProps = {
3
+ /**
4
+ * The width in pixels of the icon.
5
+ */
6
+ width?: number;
7
+ /**
8
+ * The height in pixels of the icon.
9
+ */
10
+ height?: number;
11
+ /**
12
+ * Click handler.
13
+ */
14
+ onClick?: (e: React.MouseEvent) => void;
15
+ /**
16
+ * The class name for the SVG element.
17
+ */
18
+ className?: string;
19
+ };
20
+ /**
21
+ * @typedef {object} ExpertIconProps
22
+ * @property {number} [width] The width in pixels of the icon.
23
+ * @property {number} [height] The height in pixels of the icon.
24
+ * @property {(e: React.MouseEvent) => void} [onClick] Click handler.
25
+ * @property {string} [className] The class name for the SVG element.
26
+ *
27
+ * @extends {React.Component<ExpertIconProps>}
28
+ */
29
+ declare function ExpertIcon(props: any): JSX.Element;
30
+ declare namespace ExpertIcon {
31
+ namespace propTypes {
32
+ const onClick: PropTypes.Requireable<(...args: any[]) => any>;
33
+ const width: PropTypes.Requireable<string | number>;
34
+ const height: PropTypes.Requireable<string | number>;
35
+ const className: PropTypes.Requireable<string>;
36
+ }
37
+ }
38
+ import PropTypes from "prop-types";
@@ -0,0 +1,11 @@
1
+ export default IconFx;
2
+ declare function IconFx(props: any): JSX.Element;
3
+ declare namespace IconFx {
4
+ namespace propTypes {
5
+ const onClick: PropTypes.Requireable<(...args: any[]) => any>;
6
+ const width: PropTypes.Requireable<string | number>;
7
+ const height: PropTypes.Requireable<string | number>;
8
+ const className: PropTypes.Requireable<string>;
9
+ }
10
+ }
11
+ import PropTypes from "prop-types";
@@ -0,0 +1,11 @@
1
+ export default IconInstance;
2
+ declare function IconInstance(props: any): JSX.Element;
3
+ declare namespace IconInstance {
4
+ namespace propTypes {
5
+ const onClick: PropTypes.Requireable<(...args: any[]) => any>;
6
+ const width: PropTypes.Requireable<string | number>;
7
+ const height: PropTypes.Requireable<string | number>;
8
+ const className: PropTypes.Requireable<string>;
9
+ }
10
+ }
11
+ import PropTypes from "prop-types";