@iobroker/adapter-react-v5 4.0.22 → 4.0.24
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.js +4 -1
- package/Components/404.js.map +1 -1
- package/Components/ColorPicker.js +15 -1
- package/Components/ColorPicker.js.map +1 -1
- package/Components/FileBrowser.d.ts +1 -1
- package/Components/FileBrowser.js +151 -135
- package/Components/FileBrowser.js.map +1 -1
- package/Components/FileViewer.js +3 -1
- package/Components/FileViewer.js.map +1 -1
- package/Components/JsonConfigComponent/ChipInput.js +4 -1
- package/Components/JsonConfigComponent/ChipInput.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigCertCollection.js +14 -28
- package/Components/JsonConfigComponent/ConfigCertCollection.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigCertificates.js +15 -24
- package/Components/JsonConfigComponent/ConfigCertificates.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigCheckLicense.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigFileSelector.js +20 -7
- package/Components/JsonConfigComponent/ConfigFileSelector.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigGeneric.js +7 -8
- package/Components/JsonConfigComponent/ConfigGeneric.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigIP.js +16 -11
- package/Components/JsonConfigComponent/ConfigIP.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigJsonEditor.js +0 -1
- package/Components/JsonConfigComponent/ConfigJsonEditor.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigLanguage.js +2 -2
- package/Components/JsonConfigComponent/ConfigLanguage.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigPanel.js +12 -8
- package/Components/JsonConfigComponent/ConfigPanel.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigPort.js +1 -1
- package/Components/JsonConfigComponent/ConfigPort.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigStaticImage.js +3 -0
- package/Components/JsonConfigComponent/ConfigStaticImage.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigStaticText.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigTable.js +43 -4
- package/Components/JsonConfigComponent/ConfigTable.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigUser.js +13 -9
- package/Components/JsonConfigComponent/ConfigUser.js.map +1 -1
- package/Components/Loader.js +6 -1
- package/Components/Loader.js.map +1 -1
- package/Components/Loaders/PT.js +6 -1
- package/Components/Loaders/PT.js.map +1 -1
- package/Components/Loaders/Vendor.js +6 -1
- package/Components/Loaders/Vendor.js.map +1 -1
- package/Components/Logo.js +1 -1
- package/Components/Logo.js.map +1 -1
- package/Components/ObjectBrowser.js +10 -1
- package/Components/ObjectBrowser.js.map +1 -1
- package/Components/Router.js +1 -1
- package/Components/Router.js.map +1 -1
- package/Components/SaveCloseButtons.js +1 -1
- package/Components/SaveCloseButtons.js.map +1 -1
- package/Components/TabContainer.js +1 -1
- package/Components/TabContainer.js.map +1 -1
- package/Components/TabContent.js +1 -1
- package/Components/TabContent.js.map +1 -1
- package/Components/TabHeader.js +1 -1
- package/Components/TabHeader.js.map +1 -1
- package/Components/TableResize.js +6 -1
- package/Components/TableResize.js.map +1 -1
- package/Dialogs/Confirm.js +6 -1
- package/Dialogs/Confirm.js.map +1 -1
- package/Dialogs/Error.js +6 -1
- package/Dialogs/Error.js.map +1 -1
- package/Dialogs/Message.js +6 -1
- package/Dialogs/Message.js.map +1 -1
- package/Dialogs/SelectFile.d.ts +0 -1
- package/Dialogs/SelectFile.js +9 -5
- package/Dialogs/SelectFile.js.map +1 -1
- package/Dialogs/SelectID.js +6 -1
- package/Dialogs/SelectID.js.map +1 -1
- package/GenericApp.js +6 -1
- package/GenericApp.js.map +1 -1
- package/LegacyConnection.js +6 -1
- package/LegacyConnection.js.map +1 -1
- package/README.md +6 -0
- package/i18n/de.json +9 -5
- package/i18n/en.json +5 -1
- package/i18n/es.json +5 -1
- package/i18n/fr.json +5 -1
- package/i18n/it.json +5 -1
- package/i18n/nl.json +5 -1
- package/i18n/pl.json +5 -1
- package/i18n/pt.json +5 -1
- package/i18n/ru.json +8 -4
- package/i18n/uk.json +5 -1
- package/i18n/zh-cn.json +5 -1
- package/i18n.js +12 -15
- package/i18n.js.map +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -661,6 +661,12 @@ socket.getObjectViewCustom('custom', 'state', 'startKey', 'endKey')
|
|
|
661
661
|
-->
|
|
662
662
|
|
|
663
663
|
## Changelog
|
|
664
|
+
### 4.0.24 (2023-04-03)
|
|
665
|
+
* (bluefox) Updated the file selector in tile mode
|
|
666
|
+
|
|
667
|
+
### 4.0.23 (2023-03-27)
|
|
668
|
+
* (bluefox) Added translations
|
|
669
|
+
|
|
664
670
|
### 4.0.22 (2023-03-22)
|
|
665
671
|
* (bluefox) Re-Activate legacy connection
|
|
666
672
|
|
package/i18n/de.json
CHANGED
|
@@ -364,17 +364,21 @@
|
|
|
364
364
|
"ra_Port is already used by %s": "Port wird bereits von %s verwendet",
|
|
365
365
|
"ra_Port could be used by %s": "Port könnte von %s verwendet werden",
|
|
366
366
|
"ra_filter_customs_without": "ohne",
|
|
367
|
-
"ra_Use iobroker.acme adapter for letsencrypt certificates": "
|
|
368
|
-
"ra_Do not use let's encrypt": "
|
|
369
|
-
"ra_Use all available let's encrypt certificates": "
|
|
367
|
+
"ra_Use iobroker.acme adapter for letsencrypt certificates": "ioBroker.acme-Adapter für letsencrypt-Zertifikate verwenden",
|
|
368
|
+
"ra_Do not use let's encrypt": "Let's encrypt nicht verwenden",
|
|
369
|
+
"ra_Use all available let's encrypt certificates": "Alle verfügbaren Zertifikate von Let's encrypt benutzen",
|
|
370
370
|
"ra_Public certificate": "Öffentliches Zertifikat",
|
|
371
371
|
"ra_Private certificate": "Privates Zertifikat",
|
|
372
372
|
"ra_Chained certificate": "Chained Zertifikat",
|
|
373
373
|
"ra_Suitable license not found in license manager": "Passende Lizenz im Lizenzmanager nicht gefunden",
|
|
374
|
-
"ra_Please enter the license": "Bitte
|
|
374
|
+
"ra_Please enter the license": "Bitte die Lizenz eingeben",
|
|
375
375
|
"ra_Checked": "Geprüft",
|
|
376
376
|
"ra_locally": "örtlich",
|
|
377
377
|
"ra_via internet": "übers Internet",
|
|
378
378
|
"ra_Yes": "Ja",
|
|
379
|
-
"ra_License not found in license manager. Do you want to read licenses from iobroker.net?": "Lizenz im Lizenzmanager nicht gefunden. Möchten Sie Lizenzen von iobroker.net aktualisieren?"
|
|
379
|
+
"ra_License not found in license manager. Do you want to read licenses from iobroker.net?": "Lizenz im Lizenzmanager nicht gefunden. Möchten Sie Lizenzen von iobroker.net aktualisieren?",
|
|
380
|
+
"ra_Fallback custom certificates": "Benutzerdefinierte Fallback-Zertifikate",
|
|
381
|
+
"ra_Clone current row": "Aktuelle Zeile klonen",
|
|
382
|
+
"ra_fileType_video": "Video",
|
|
383
|
+
"ra_select_folder_hint": "Um einen Ordner auszuwählen, halten Sie einfach die Taste \"Shift\" gedrückt, indem Sie auf den Ordner klicken."
|
|
380
384
|
}
|
package/i18n/en.json
CHANGED
|
@@ -376,5 +376,9 @@
|
|
|
376
376
|
"ra_locally": "locally",
|
|
377
377
|
"ra_via internet": "via internet",
|
|
378
378
|
"ra_Yes": "Yes",
|
|
379
|
-
"ra_License not found in license manager. Do you want to read licenses from iobroker.net?": "License not found in the license manager. Do you want to update licenses from iobroker.net?"
|
|
379
|
+
"ra_License not found in license manager. Do you want to read licenses from iobroker.net?": "License not found in the license manager. Do you want to update licenses from iobroker.net?",
|
|
380
|
+
"ra_Fallback custom certificates": "Fallback custom certificates",
|
|
381
|
+
"ra_Clone current row": "Clone current row",
|
|
382
|
+
"ra_fileType_video": "Video",
|
|
383
|
+
"ra_select_folder_hint": "To select folder, just hold the key \"shift\" by clicking the folder."
|
|
380
384
|
}
|
package/i18n/es.json
CHANGED
|
@@ -376,5 +376,9 @@
|
|
|
376
376
|
"ra_locally": "en la zona",
|
|
377
377
|
"ra_via internet": "vía Internet",
|
|
378
378
|
"ra_Yes": "Sí",
|
|
379
|
-
"ra_License not found in license manager. Do you want to read licenses from iobroker.net?": "Licencia no encontrada en el administrador de licencias. ¿Quieres actualizar las licencias de iobroker.net?"
|
|
379
|
+
"ra_License not found in license manager. Do you want to read licenses from iobroker.net?": "Licencia no encontrada en el administrador de licencias. ¿Quieres actualizar las licencias de iobroker.net?",
|
|
380
|
+
"ra_Fallback custom certificates": "Certificados personalizados alternativos",
|
|
381
|
+
"ra_Clone current row": "Clonar fila actual",
|
|
382
|
+
"ra_fileType_video": "Video",
|
|
383
|
+
"ra_select_folder_hint": "Para seleccionar la carpeta, simplemente mantenga presionada la tecla \"shift\" haciendo clic en la carpeta."
|
|
380
384
|
}
|
package/i18n/fr.json
CHANGED
|
@@ -376,5 +376,9 @@
|
|
|
376
376
|
"ra_locally": "localement",
|
|
377
377
|
"ra_via internet": "par Internet",
|
|
378
378
|
"ra_Yes": "Oui",
|
|
379
|
-
"ra_License not found in license manager. Do you want to read licenses from iobroker.net?": "Licence introuvable dans le gestionnaire de licences. Voulez-vous mettre à jour les licences depuis iobroker.net ?"
|
|
379
|
+
"ra_License not found in license manager. Do you want to read licenses from iobroker.net?": "Licence introuvable dans le gestionnaire de licences. Voulez-vous mettre à jour les licences depuis iobroker.net ?",
|
|
380
|
+
"ra_Fallback custom certificates": "Certificats personnalisés de secours",
|
|
381
|
+
"ra_Clone current row": "Cloner la ligne actuelle",
|
|
382
|
+
"ra_fileType_video": "Vidéo",
|
|
383
|
+
"ra_select_folder_hint": "Pour sélectionner un dossier, maintenez simplement la touche \"shift\" enfoncée en cliquant sur le dossier."
|
|
380
384
|
}
|
package/i18n/it.json
CHANGED
|
@@ -376,5 +376,9 @@
|
|
|
376
376
|
"ra_locally": "localmente",
|
|
377
377
|
"ra_via internet": "attraverso internet",
|
|
378
378
|
"ra_Yes": "SÌ",
|
|
379
|
-
"ra_License not found in license manager. Do you want to read licenses from iobroker.net?": "Licenza non trovata nel gestore delle licenze. Vuoi aggiornare le licenze da iobroker.net?"
|
|
379
|
+
"ra_License not found in license manager. Do you want to read licenses from iobroker.net?": "Licenza non trovata nel gestore delle licenze. Vuoi aggiornare le licenze da iobroker.net?",
|
|
380
|
+
"ra_Fallback custom certificates": "Certificati personalizzati di fallback",
|
|
381
|
+
"ra_Clone current row": "Clona riga corrente",
|
|
382
|
+
"ra_fileType_video": "video",
|
|
383
|
+
"ra_select_folder_hint": "Per selezionare la cartella, basta tenere premuto il tasto \"shift\" facendo clic sulla cartella."
|
|
380
384
|
}
|
package/i18n/nl.json
CHANGED
|
@@ -376,5 +376,9 @@
|
|
|
376
376
|
"ra_locally": "plaatselijk",
|
|
377
377
|
"ra_via internet": "via internet",
|
|
378
378
|
"ra_Yes": "Ja",
|
|
379
|
-
"ra_License not found in license manager. Do you want to read licenses from iobroker.net?": "Licentie niet gevonden in licentiebeheer. Wilt u licenties van iobroker.net bijwerken?"
|
|
379
|
+
"ra_License not found in license manager. Do you want to read licenses from iobroker.net?": "Licentie niet gevonden in licentiebeheer. Wilt u licenties van iobroker.net bijwerken?",
|
|
380
|
+
"ra_Fallback custom certificates": "Fallback aangepaste certificaten",
|
|
381
|
+
"ra_Clone current row": "Kloon de huidige rij",
|
|
382
|
+
"ra_fileType_video": "Video",
|
|
383
|
+
"ra_select_folder_hint": "Om een map te selecteren, houdt u gewoon de toets \"shift\" ingedrukt door op de map te klikken."
|
|
380
384
|
}
|
package/i18n/pl.json
CHANGED
|
@@ -376,5 +376,9 @@
|
|
|
376
376
|
"ra_locally": "lokalnie",
|
|
377
377
|
"ra_via internet": "przez internet",
|
|
378
378
|
"ra_Yes": "Tak",
|
|
379
|
-
"ra_License not found in license manager. Do you want to read licenses from iobroker.net?": "Nie znaleziono licencji w menedżerze licencji. Chcesz zaktualizować licencje z iobroker.net?"
|
|
379
|
+
"ra_License not found in license manager. Do you want to read licenses from iobroker.net?": "Nie znaleziono licencji w menedżerze licencji. Chcesz zaktualizować licencje z iobroker.net?",
|
|
380
|
+
"ra_Fallback custom certificates": "Niestandardowe certyfikaty zastępcze",
|
|
381
|
+
"ra_Clone current row": "Sklonuj bieżący wiersz",
|
|
382
|
+
"ra_fileType_video": "Wideo",
|
|
383
|
+
"ra_select_folder_hint": "Aby wybrać folder, wystarczy przytrzymać klawisz „shift”, klikając folder."
|
|
380
384
|
}
|
package/i18n/pt.json
CHANGED
|
@@ -376,5 +376,9 @@
|
|
|
376
376
|
"ra_locally": "localmente",
|
|
377
377
|
"ra_via internet": "via internet",
|
|
378
378
|
"ra_Yes": "Sim",
|
|
379
|
-
"ra_License not found in license manager. Do you want to read licenses from iobroker.net?": "Licença não encontrada no gerenciador de licenças. Deseja atualizar as licenças do iobroker.net?"
|
|
379
|
+
"ra_License not found in license manager. Do you want to read licenses from iobroker.net?": "Licença não encontrada no gerenciador de licenças. Deseja atualizar as licenças do iobroker.net?",
|
|
380
|
+
"ra_Fallback custom certificates": "Certificados personalizados alternativos",
|
|
381
|
+
"ra_Clone current row": "Clonar linha atual",
|
|
382
|
+
"ra_fileType_video": "Vídeo",
|
|
383
|
+
"ra_select_folder_hint": "Para selecionar a pasta, basta segurar a tecla \"shift\" clicando na pasta."
|
|
380
384
|
}
|
package/i18n/ru.json
CHANGED
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"ra_dow_Th": "Чт",
|
|
41
41
|
"ra_dow_Tu": "Вт",
|
|
42
42
|
"ra_dow_We": "Ср",
|
|
43
|
-
"ra_Listen on all IPs": "
|
|
43
|
+
"ra_Listen on all IPs": "Слушать на всех IP",
|
|
44
44
|
"ra_Save": "Сохранить",
|
|
45
45
|
"ra_Save and close": "Сохранить и закрыть",
|
|
46
46
|
"ra_Close": "Закрыть",
|
|
@@ -365,8 +365,8 @@
|
|
|
365
365
|
"ra_Port could be used by %s": "Порт может использоваться %s",
|
|
366
366
|
"ra_filter_customs_without": "без",
|
|
367
367
|
"ra_Use iobroker.acme adapter for letsencrypt certificates": "Используйте адаптер iobroker.acme для сертификатов letsencrypt",
|
|
368
|
-
"ra_Do not use let's encrypt": "Не
|
|
369
|
-
"ra_Use all available let's encrypt certificates": "
|
|
368
|
+
"ra_Do not use let's encrypt": "Не использовать Let’s Encrypt",
|
|
369
|
+
"ra_Use all available let's encrypt certificates": "Использовать все доступные сертификаты Let’s encrypt",
|
|
370
370
|
"ra_Public certificate": "Публичный сертификат",
|
|
371
371
|
"ra_Private certificate": "Частный сертификат",
|
|
372
372
|
"ra_Chained certificate": "Chained сертификат",
|
|
@@ -376,5 +376,9 @@
|
|
|
376
376
|
"ra_locally": "локально",
|
|
377
377
|
"ra_via internet": "через интернет",
|
|
378
378
|
"ra_Yes": "Да",
|
|
379
|
-
"ra_License not found in license manager. Do you want to read licenses from iobroker.net?": "Лицензия не найдена в диспетчере лицензий. Вы хотите обновить лицензии от iobroker.net?"
|
|
379
|
+
"ra_License not found in license manager. Do you want to read licenses from iobroker.net?": "Лицензия не найдена в диспетчере лицензий. Вы хотите обновить лицензии от iobroker.net?",
|
|
380
|
+
"ra_Fallback custom certificates": "Резервные пользовательские сертификаты",
|
|
381
|
+
"ra_Clone current row": "Клонировать текущую строку",
|
|
382
|
+
"ra_fileType_video": "видео",
|
|
383
|
+
"ra_select_folder_hint": "Чтобы выбрать папку, просто удерживайте клавишу «Shift», щелкнув папку."
|
|
380
384
|
}
|
package/i18n/uk.json
CHANGED
|
@@ -376,5 +376,9 @@
|
|
|
376
376
|
"ra_locally": "локально",
|
|
377
377
|
"ra_via internet": "через інтернет",
|
|
378
378
|
"ra_Yes": "Так",
|
|
379
|
-
"ra_License not found in license manager. Do you want to read licenses from iobroker.net?": "Ліцензія не знайдена в менеджері ліцензій. Хочете оновити ліцензії з iobroker.net?"
|
|
379
|
+
"ra_License not found in license manager. Do you want to read licenses from iobroker.net?": "Ліцензія не знайдена в менеджері ліцензій. Хочете оновити ліцензії з iobroker.net?",
|
|
380
|
+
"ra_Fallback custom certificates": "Запасні спеціальні сертифікати",
|
|
381
|
+
"ra_Clone current row": "Клонувати поточний рядок",
|
|
382
|
+
"ra_fileType_video": "відео",
|
|
383
|
+
"ra_select_folder_hint": "Щоб вибрати папку, просто клацніть папку, утримуючи клавішу «Shift»."
|
|
380
384
|
}
|
package/i18n/zh-cn.json
CHANGED
|
@@ -376,5 +376,9 @@
|
|
|
376
376
|
"ra_locally": "本地",
|
|
377
377
|
"ra_via internet": "通过互联网",
|
|
378
378
|
"ra_Yes": "是的",
|
|
379
|
-
"ra_License not found in license manager. Do you want to read licenses from iobroker.net?": "在许可证管理器中找不到许可证。您要从 iobroker.net 更新许可证吗?"
|
|
379
|
+
"ra_License not found in license manager. Do you want to read licenses from iobroker.net?": "在许可证管理器中找不到许可证。您要从 iobroker.net 更新许可证吗?",
|
|
380
|
+
"ra_Fallback custom certificates": "后备自定义证书",
|
|
381
|
+
"ra_Clone current row": "克隆当前行",
|
|
382
|
+
"ra_fileType_video": "视频",
|
|
383
|
+
"ra_select_folder_hint": "要选择文件夹,只需按住“shift”键单击文件夹即可。"
|
|
380
384
|
}
|
package/i18n.js
CHANGED
|
@@ -25,21 +25,6 @@ var I18n = /*#__PURE__*/function () {
|
|
|
25
25
|
(0, _createClass2["default"])(I18n, null, [{
|
|
26
26
|
key: "setLanguage",
|
|
27
27
|
value:
|
|
28
|
-
/**
|
|
29
|
-
* List of all languages with their translations.
|
|
30
|
-
* @type {{ [lang in ioBroker.Languages]?: Record<string, string>; }}
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* List of unknown translations during development.
|
|
35
|
-
* @type {string[]}
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* The currently displayed language.
|
|
40
|
-
* @type {ioBroker.Languages}
|
|
41
|
-
*/
|
|
42
|
-
|
|
43
28
|
/**
|
|
44
29
|
* Set the language to display.
|
|
45
30
|
* @param {ioBroker.Languages} lang
|
|
@@ -230,8 +215,20 @@ var I18n = /*#__PURE__*/function () {
|
|
|
230
215
|
}]);
|
|
231
216
|
return I18n;
|
|
232
217
|
}(); // install global handlers
|
|
218
|
+
/**
|
|
219
|
+
* List of all languages with their translations.
|
|
220
|
+
* @type {{ [lang in ioBroker.Languages]?: Record<string, string>; }}
|
|
221
|
+
*/
|
|
233
222
|
(0, _defineProperty2["default"])(I18n, "translations", {});
|
|
223
|
+
/**
|
|
224
|
+
* List of unknown translations during development.
|
|
225
|
+
* @type {string[]}
|
|
226
|
+
*/
|
|
234
227
|
(0, _defineProperty2["default"])(I18n, "unknownTranslations", []);
|
|
228
|
+
/**
|
|
229
|
+
* The currently displayed language.
|
|
230
|
+
* @type {ioBroker.Languages}
|
|
231
|
+
*/
|
|
235
232
|
(0, _defineProperty2["default"])(I18n, "lang", window.sysLang || 'en');
|
|
236
233
|
(0, _defineProperty2["default"])(I18n, "_disableWarning", false);
|
|
237
234
|
window.i18nShow = I18n.i18nShow;
|
package/i18n.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.js","names":["I18n","_classCallCheck2","_createClass2","key","value","setLanguage","lang","extendTranslations","words","prefix","Object","keys","forEach","_words","word","startsWith","concat","console","warn","en","de","ru","translations","assign","e","error","setTranslations","getLanguage","t","translation","w","unknownTranslations","includes","push","_disableWarning","log","wordEn","_len","arguments","length","args","Array","_key","_i","_args","arg","replace","i18nShow","filter","result","JSON","stringify","_typeof2","test","disableWarning","disable","_defineProperty2","window","sysLang","i18nDisableWarning","_default","exports"],"sources":["i18n.js"],"sourcesContent":["/***\n * Copyright 2018-2022 bluefox <dogafox@gmail.com>\n *\n * MIT License\n *\n ***/\n\n /**\n * Translation string management.\n */\nclass I18n {\n /**\n * List of all languages with their translations.\n * @type {{ [lang in ioBroker.Languages]?: Record<string, string>; }}\n */\n static translations = {};\n\n /**\n * List of unknown translations during development.\n * @type {string[]}\n */\n static unknownTranslations = [];\n\n /**\n * The currently displayed language.\n * @type {ioBroker.Languages}\n */\n static lang = window.sysLang || 'en';\n\n static _disableWarning = false;\n\n /**\n * Set the language to display.\n * @param {ioBroker.Languages} lang\n */\n static setLanguage(lang) {\n if (lang) {\n I18n.lang = lang;\n }\n }\n\n /**\n * Add translations\n * User can provide two types of structures:\n * - {\"word1\": \"translated word1\", \"word2\": \"translated word2\"}, but in this case the lang must be provided\n * - {\"word1\": {\"en\": \"translated en word1\", \"de\": \"translated de word1\"}, \"word2\": {\"en\": \"translated en word2\", \"de\": \"translated de word2\"}}, but no lang must be provided\n * @param {object} words additional words for specific language\n * @param {ioBroker.Languages} lang\n */\n static extendTranslations(words, lang) {\n // extend automatically all languages with prefix\n if (words.prefix) {\n if (typeof words.prefix === 'string') {\n const prefix = words.prefix;\n delete words.prefix;\n Object.keys(words).forEach(lang => {\n const _words = {};\n Object.keys(words[lang]).forEach(word => {\n if (!word) {\n return;\n }\n if (!word.startsWith(prefix)) {\n _words[`${prefix}${word}`] = words[lang][word];\n } else {\n _words[word] = words[lang][word];\n }\n });\n words[lang] = _words;\n });\n } else {\n console.warn('Found prefix in translations, but it is not a string');\n }\n }\n\n try {\n if (!lang) {\n if (words.en && words.de && words.ru) {\n Object.keys(words).forEach(lang => {\n I18n.translations[lang] = I18n.translations[lang] || {};\n Object.assign(I18n.translations[lang], words[lang]);\n });\n } else {\n Object.keys(words).forEach(word => {\n Object.keys(words[word]).forEach(lang => {\n if (!I18n.translations[lang]) {\n console.warn(`Used unknown language: ${lang}`);\n }\n if (!I18n.translations[lang][word]) {\n I18n.translations[lang][word] = words[word][lang];\n } else if (I18n.translations[lang][word] !== words[word][lang]) {\n console.warn(`Translation for word \"${word}\" in \"${lang}\" was ignored: existing = \"${I18n.translations[lang][word]}\", new = ${words[word][lang]}`);\n }\n });\n });\n }\n } else {\n if (!I18n.translations[lang]) {\n console.warn(`Used unknown language: ${lang}`);\n }\n I18n.translations[lang] = I18n.translations[lang] || {};\n Object.keys(words)\n .forEach(word => {\n if (!I18n.translations[lang][word]) {\n I18n.translations[lang][word] = words[word];\n } else if (I18n.translations[lang][word] !== words[word]) {\n console.warn(`Translation for word \"${word}\" in \"${lang}\" was ignored: existing = \"${I18n.translations[lang][word]}\", new = ${words[word]}`);\n }\n });\n }\n } catch (e) {\n console.error(`Cannot apply translations: ${e}`);\n }\n }\n\n /**\n * Sets all translations (in all languages).\n * @param {{ [lang in ioBroker.Languages]?: Record<string, string>; }} translations\n */\n static setTranslations(translations) {\n if (translations) {\n I18n.translations = translations;\n }\n }\n\n /**\n * Get the currently chosen language.\n * @returns {ioBroker.Languages} The current language.\n */\n static getLanguage() {\n return I18n.lang;\n }\n\n /**\n * Translate the given string to the selected language.\n * @param {string} word The (key) word to look up the string.\n * @param {string[]} args Optional arguments which will replace the first (second, third, ...) occurrences of %s\n */\n static t(word, ...args) {\n let translation = I18n.translations[I18n.lang];\n if (translation) {\n const w = translation[word];\n if (w) {\n word = w;\n } else {\n if (!I18n.unknownTranslations.includes(word)) {\n I18n.unknownTranslations.push(word);\n !I18n._disableWarning && console.log(`Translate: ${word}`);\n }\n // fallback to english\n if (I18n.lang !== 'en' && I18n.translations.en) {\n const wordEn = I18n.translations.en[word];\n if (wordEn) {\n word = wordEn;\n }\n }\n }\n }\n for (const arg of args) {\n word = word.replace('%s', arg);\n }\n return word;\n }\n\n /**\n * Show non-translated words\n * Required during development\n * @param {string | RegExp} filter filter words\n */\n static i18nShow(filter) {\n /**\n * List words with their translations.\n * @type {Record<string, string>}\n */\n const result = {};\n if (!filter) {\n I18n.unknownTranslations.forEach(word => {\n result[word] = word;\n });\n console.log(JSON.stringify(result, null, 2));\n } else if (typeof filter === 'string') {\n I18n.unknownTranslations.forEach(word => {\n if (word.startsWith(filter)) {\n result[word] = word.replace(filter, '');\n }\n });\n console.log(JSON.stringify(result, null, 2));\n } else if (typeof filter === 'object') {\n I18n.unknownTranslations.forEach(word => {\n if (filter.test(word)) {\n result[word] = word;\n }\n });\n console.log(JSON.stringify(result, null, 2));\n }\n }\n\n /**\n * Disable warning about non-translated words\n * Required during development\n * @param {boolean} disable Do the warning should be disabled\n */\n static disableWarning(disable) {\n I18n._disableWarning = !!disable;\n }\n}\n\n// install global handlers\nwindow.i18nShow = I18n.i18nShow;\nwindow.i18nDisableWarning = I18n.disableWarning;\n\n\n/*I18n.translations = {\n 'en': require('./i18n/en'),\n 'ru': require('./i18n/ru'),\n 'de': require('./i18n/de'),\n};\nI18n.fallbacks = true;\nI18n.t = function () {};*/\n\nexport default I18n;"],"mappings":";;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AAEC;AACD;AACA;AAFC,IAGKA,IAAI;EAAA,SAAAA,KAAA;IAAA,IAAAC,gBAAA,mBAAAD,IAAA;EAAA;EAAA,IAAAE,aAAA,aAAAF,IAAA;IAAAG,GAAA;IAAAC,KAAA;IACN;AACJ;AACA;AACA;;IAGK;AACL;AACA;AACA;;IAGI;AACJ;AACA;AACA;;IAKI;AACJ;AACA;AACA;IACI,SAAAC,YAAmBC,IAAI,EAAE;MACrB,IAAIA,IAAI,EAAE;QACNN,IAAI,CAACM,IAAI,GAAGA,IAAI;MACpB;IACJ;;IAEC;AACL;AACA;AACA;AACA;AACA;AACA;AACA;EAPK;IAAAH,GAAA;IAAAC,KAAA,EAQA,SAAAG,mBAA0BC,KAAK,EAAEF,IAAI,EAAE;MACnC;MACA,IAAIE,KAAK,CAACC,MAAM,EAAE;QACd,IAAI,OAAOD,KAAK,CAACC,MAAM,KAAK,QAAQ,EAAE;UAClC,IAAMA,MAAM,GAAGD,KAAK,CAACC,MAAM;UAC3B,OAAOD,KAAK,CAACC,MAAM;UACnBC,MAAM,CAACC,IAAI,CAACH,KAAK,CAAC,CAACI,OAAO,CAAC,UAAAN,IAAI,EAAI;YAC/B,IAAMO,MAAM,GAAG,CAAC,CAAC;YACjBH,MAAM,CAACC,IAAI,CAACH,KAAK,CAACF,IAAI,CAAC,CAAC,CAACM,OAAO,CAAC,UAAAE,IAAI,EAAI;cACrC,IAAI,CAACA,IAAI,EAAE;gBACP;cACJ;cACA,IAAI,CAACA,IAAI,CAACC,UAAU,CAACN,MAAM,CAAC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A,cAAAD,QAAA"}
|
|
1
|
+
{"version":3,"file":"i18n.js","names":["I18n","_classCallCheck2","_createClass2","key","value","setLanguage","lang","extendTranslations","words","prefix","Object","keys","forEach","_words","word","startsWith","concat","console","warn","en","de","ru","translations","assign","e","error","setTranslations","getLanguage","t","translation","w","unknownTranslations","includes","push","_disableWarning","log","wordEn","_len","arguments","length","args","Array","_key","_i","_args","arg","replace","i18nShow","filter","result","JSON","stringify","_typeof2","test","disableWarning","disable","_defineProperty2","window","sysLang","i18nDisableWarning","_default","exports"],"sources":["i18n.js"],"sourcesContent":["/***\n * Copyright 2018-2022 bluefox <dogafox@gmail.com>\n *\n * MIT License\n *\n ***/\n\n /**\n * Translation string management.\n */\nclass I18n {\n /**\n * List of all languages with their translations.\n * @type {{ [lang in ioBroker.Languages]?: Record<string, string>; }}\n */\n static translations = {};\n\n /**\n * List of unknown translations during development.\n * @type {string[]}\n */\n static unknownTranslations = [];\n\n /**\n * The currently displayed language.\n * @type {ioBroker.Languages}\n */\n static lang = window.sysLang || 'en';\n\n static _disableWarning = false;\n\n /**\n * Set the language to display.\n * @param {ioBroker.Languages} lang\n */\n static setLanguage(lang) {\n if (lang) {\n I18n.lang = lang;\n }\n }\n\n /**\n * Add translations\n * User can provide two types of structures:\n * - {\"word1\": \"translated word1\", \"word2\": \"translated word2\"}, but in this case the lang must be provided\n * - {\"word1\": {\"en\": \"translated en word1\", \"de\": \"translated de word1\"}, \"word2\": {\"en\": \"translated en word2\", \"de\": \"translated de word2\"}}, but no lang must be provided\n * @param {object} words additional words for specific language\n * @param {ioBroker.Languages} lang\n */\n static extendTranslations(words, lang) {\n // extend automatically all languages with prefix\n if (words.prefix) {\n if (typeof words.prefix === 'string') {\n const prefix = words.prefix;\n delete words.prefix;\n Object.keys(words).forEach(lang => {\n const _words = {};\n Object.keys(words[lang]).forEach(word => {\n if (!word) {\n return;\n }\n if (!word.startsWith(prefix)) {\n _words[`${prefix}${word}`] = words[lang][word];\n } else {\n _words[word] = words[lang][word];\n }\n });\n words[lang] = _words;\n });\n } else {\n console.warn('Found prefix in translations, but it is not a string');\n }\n }\n\n try {\n if (!lang) {\n if (words.en && words.de && words.ru) {\n Object.keys(words).forEach(lang => {\n I18n.translations[lang] = I18n.translations[lang] || {};\n Object.assign(I18n.translations[lang], words[lang]);\n });\n } else {\n Object.keys(words).forEach(word => {\n Object.keys(words[word]).forEach(lang => {\n if (!I18n.translations[lang]) {\n console.warn(`Used unknown language: ${lang}`);\n }\n if (!I18n.translations[lang][word]) {\n I18n.translations[lang][word] = words[word][lang];\n } else if (I18n.translations[lang][word] !== words[word][lang]) {\n console.warn(`Translation for word \"${word}\" in \"${lang}\" was ignored: existing = \"${I18n.translations[lang][word]}\", new = ${words[word][lang]}`);\n }\n });\n });\n }\n } else {\n if (!I18n.translations[lang]) {\n console.warn(`Used unknown language: ${lang}`);\n }\n I18n.translations[lang] = I18n.translations[lang] || {};\n Object.keys(words)\n .forEach(word => {\n if (!I18n.translations[lang][word]) {\n I18n.translations[lang][word] = words[word];\n } else if (I18n.translations[lang][word] !== words[word]) {\n console.warn(`Translation for word \"${word}\" in \"${lang}\" was ignored: existing = \"${I18n.translations[lang][word]}\", new = ${words[word]}`);\n }\n });\n }\n } catch (e) {\n console.error(`Cannot apply translations: ${e}`);\n }\n }\n\n /**\n * Sets all translations (in all languages).\n * @param {{ [lang in ioBroker.Languages]?: Record<string, string>; }} translations\n */\n static setTranslations(translations) {\n if (translations) {\n I18n.translations = translations;\n }\n }\n\n /**\n * Get the currently chosen language.\n * @returns {ioBroker.Languages} The current language.\n */\n static getLanguage() {\n return I18n.lang;\n }\n\n /**\n * Translate the given string to the selected language.\n * @param {string} word The (key) word to look up the string.\n * @param {string[]} args Optional arguments which will replace the first (second, third, ...) occurrences of %s\n */\n static t(word, ...args) {\n let translation = I18n.translations[I18n.lang];\n if (translation) {\n const w = translation[word];\n if (w) {\n word = w;\n } else {\n if (!I18n.unknownTranslations.includes(word)) {\n I18n.unknownTranslations.push(word);\n !I18n._disableWarning && console.log(`Translate: ${word}`);\n }\n // fallback to english\n if (I18n.lang !== 'en' && I18n.translations.en) {\n const wordEn = I18n.translations.en[word];\n if (wordEn) {\n word = wordEn;\n }\n }\n }\n }\n for (const arg of args) {\n word = word.replace('%s', arg);\n }\n return word;\n }\n\n /**\n * Show non-translated words\n * Required during development\n * @param {string | RegExp} filter filter words\n */\n static i18nShow(filter) {\n /**\n * List words with their translations.\n * @type {Record<string, string>}\n */\n const result = {};\n if (!filter) {\n I18n.unknownTranslations.forEach(word => {\n result[word] = word;\n });\n console.log(JSON.stringify(result, null, 2));\n } else if (typeof filter === 'string') {\n I18n.unknownTranslations.forEach(word => {\n if (word.startsWith(filter)) {\n result[word] = word.replace(filter, '');\n }\n });\n console.log(JSON.stringify(result, null, 2));\n } else if (typeof filter === 'object') {\n I18n.unknownTranslations.forEach(word => {\n if (filter.test(word)) {\n result[word] = word;\n }\n });\n console.log(JSON.stringify(result, null, 2));\n }\n }\n\n /**\n * Disable warning about non-translated words\n * Required during development\n * @param {boolean} disable Do the warning should be disabled\n */\n static disableWarning(disable) {\n I18n._disableWarning = !!disable;\n }\n}\n\n// install global handlers\nwindow.i18nShow = I18n.i18nShow;\nwindow.i18nDisableWarning = I18n.disableWarning;\n\n\n/*I18n.translations = {\n 'en': require('./i18n/en'),\n 'ru': require('./i18n/ru'),\n 'de': require('./i18n/de'),\n};\nI18n.fallbacks = true;\nI18n.t = function () {};*/\n\nexport default I18n;"],"mappings":";;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AAEC;AACD;AACA;AAFC,IAGKA,IAAI;EAAA,SAAAA,KAAA;IAAA,IAAAC,gBAAA,mBAAAD,IAAA;EAAA;EAAA,IAAAE,aAAA,aAAAF,IAAA;IAAAG,GAAA;IAAAC,KAAA;IAqBN;AACJ;AACA;AACA;IACI,SAAAC,YAAmBC,IAAI,EAAE;MACrB,IAAIA,IAAI,EAAE;QACNN,IAAI,CAACM,IAAI,GAAGA,IAAI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ACL;AACA;AACA;AACA;EAJK;IAAA9C,GAAA;IAAAC,KAAA,EAKD,SAAAkD,eAAsBC,OAAO,EAAE;MAC3BvD,IAAI,CAACkC,eAAe,GAAG,CAAC,CAACqB,OAAO;IACpC;EAAC;EAAA,OAAAvD,IAAA;AAAA,KAGL;AAnMI;AACJ;AACA;AACA;AAHI,IAAAwD,gBAAA,aADExD,IAAI,kBAKgB,CAAC,CAAC;AAEvB;AACL;AACA;AACA;AAHK,IAAAwD,gBAAA,aAPCxD,IAAI,yBAWwB,EAAE;AAEhC;AACJ;AACA;AACA;AAHI,IAAAwD,gBAAA,aAbExD,IAAI,UAiBQyD,MAAM,CAACC,OAAO,IAAI,IAAI;AAAA,IAAAF,gBAAA,aAjBlCxD,IAAI,qBAmBmB,KAAK;AAkLlCyD,MAAM,CAACV,QAAQ,GAAG/C,IAAI,CAAC+C,QAAQ;AAC/BU,MAAM,CAACE,kBAAkB,GAAG3D,IAAI,CAACsD,cAAc;;AAG/C;AACA;AACA;AACA;AACA;AACA;AACA;AANA,IAAAM,QAAA,GAQe5D,IAAI;AAAA6D,OAAA,cAAAD,QAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iobroker/adapter-react-v5",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.24",
|
|
4
4
|
"description": "React classes to develop admin interfaces for ioBroker with react.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "bluefox",
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"@emotion/react": "^11.10.6",
|
|
31
31
|
"@emotion/styled": "^11.10.6",
|
|
32
32
|
"@mui/icons-material": "^5.11.11",
|
|
33
|
-
"@mui/material": "^5.11.
|
|
33
|
+
"@mui/material": "^5.11.15",
|
|
34
34
|
"@mui/styles": "^5.11.13",
|
|
35
|
-
"@mui/x-date-pickers": "6.0.
|
|
36
|
-
"@iobroker/socket-client": "^2.0.
|
|
35
|
+
"@mui/x-date-pickers": "6.0.4",
|
|
36
|
+
"@iobroker/socket-client": "^2.0.7",
|
|
37
37
|
"react-cropper": "^2.3.2",
|
|
38
|
-
"@sentry/browser": "^7.
|
|
39
|
-
"@sentry/integrations": "^7.
|
|
38
|
+
"@sentry/browser": "^7.46.0",
|
|
39
|
+
"@sentry/integrations": "^7.46.0",
|
|
40
40
|
"@types/iobroker": "^4.0.5",
|
|
41
41
|
"react-color": "^2.19.3",
|
|
42
42
|
"react-colorful": "^5.6.1",
|