@iobroker/adapter-react-v5 7.2.3 → 7.2.6
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/README.md +3 -3
- package/build/AdminConnection.d.ts +1 -0
- package/build/AdminConnection.js +2 -0
- package/build/AdminConnection.js.map +1 -0
- package/{src/Components/404.tsx → build/Components/404.js} +14 -39
- package/build/Components/404.js.map +1 -0
- package/{Components → build/Components}/ColorPicker.d.ts +2 -2
- package/{Components → build/Components}/ColorPicker.js +50 -65
- package/build/Components/ColorPicker.js.map +1 -0
- package/{Components → build/Components}/ComplexCron.d.ts +2 -2
- package/{Components → build/Components}/ComplexCron.js +43 -71
- package/build/Components/ComplexCron.js.map +1 -0
- package/{Components → build/Components}/CopyToClipboard.d.ts +1 -2
- package/{src/Components/CopyToClipboard.tsx → build/Components/CopyToClipboard.js} +20 -38
- package/build/Components/CopyToClipboard.js.map +1 -0
- package/{Components → build/Components}/CustomModal.d.ts +3 -3
- package/build/Components/CustomModal.js +60 -0
- package/build/Components/CustomModal.js.map +1 -0
- package/{Components → build/Components}/FileBrowser.d.ts +21 -21
- package/{Components → build/Components}/FileBrowser.js +253 -248
- package/build/Components/FileBrowser.js.map +1 -0
- package/build/Components/FileViewer.d.ts +48 -0
- package/build/Components/FileViewer.js +277 -0
- package/build/Components/FileViewer.js.map +1 -0
- package/{Components → build/Components}/Icon.d.ts +1 -1
- package/build/Components/Icon.js +140 -0
- package/build/Components/Icon.js.map +1 -0
- package/{Components → build/Components}/IconPicker.d.ts +2 -2
- package/build/Components/IconPicker.js +73 -0
- package/build/Components/IconPicker.js.map +1 -0
- package/{Components → build/Components}/IconSelector.d.ts +3 -3
- package/{Components → build/Components}/IconSelector.js +29 -57
- package/build/Components/IconSelector.js.map +1 -0
- package/{Components → build/Components}/Image.d.ts +2 -2
- package/{Components → build/Components}/Image.js +16 -22
- package/build/Components/Image.js.map +1 -0
- package/{Components → build/Components}/Loader.d.ts +2 -2
- package/{Components → build/Components}/Loader.js +15 -40
- package/build/Components/Loader.js.map +1 -0
- package/{Components → build/Components}/Loaders/MV.d.ts +2 -2
- package/build/Components/Loaders/MV.js +61 -0
- package/build/Components/Loaders/MV.js.map +1 -0
- package/{Components → build/Components}/Loaders/PT.d.ts +2 -2
- package/{Components → build/Components}/Loaders/PT.js +10 -35
- package/build/Components/Loaders/PT.js.map +1 -0
- package/{Components → build/Components}/Loaders/Vendor.d.ts +2 -2
- package/build/Components/Loaders/Vendor.js +52 -0
- package/build/Components/Loaders/Vendor.js.map +1 -0
- package/{Components → build/Components}/Logo.d.ts +2 -2
- package/build/Components/Logo.js +108 -0
- package/build/Components/Logo.js.map +1 -0
- package/{Components → build/Components}/MDUtils.d.ts +1 -2
- package/{Components → build/Components}/MDUtils.js +4 -9
- package/build/Components/MDUtils.js.map +1 -0
- package/{Components → build/Components}/ObjectBrowser.d.ts +7 -4
- package/{Components → build/Components}/ObjectBrowser.js +1183 -1133
- package/build/Components/ObjectBrowser.js.map +1 -0
- package/{Components → build/Components}/Router.d.ts +1 -2
- package/{Components → build/Components}/Router.js +6 -7
- package/build/Components/Router.js.map +1 -0
- package/{Components → build/Components}/SaveCloseButtons.d.ts +2 -2
- package/build/Components/SaveCloseButtons.js +65 -0
- package/build/Components/SaveCloseButtons.js.map +1 -0
- package/{Components → build/Components}/Schedule.d.ts +3 -3
- package/{Components → build/Components}/Schedule.js +246 -261
- package/build/Components/Schedule.js.map +1 -0
- package/{Components → build/Components}/SelectWithIcon.d.ts +2 -2
- package/build/Components/SelectWithIcon.js +135 -0
- package/build/Components/SelectWithIcon.js.map +1 -0
- package/build/Components/SimpleCron/cronText.js +15 -0
- package/build/Components/SimpleCron/cronText.js.map +1 -0
- package/{Components → build/Components}/SimpleCron/index.d.ts +2 -2
- package/{Components → build/Components}/SimpleCron/index.js +55 -56
- package/build/Components/SimpleCron/index.js.map +1 -0
- package/{Components → build/Components}/TabContainer.d.ts +2 -2
- package/build/Components/TabContainer.js +23 -0
- package/build/Components/TabContainer.js.map +1 -0
- package/{Components → build/Components}/TabContent.d.ts +3 -2
- package/build/Components/TabContent.js +20 -0
- package/build/Components/TabContent.js.map +1 -0
- package/build/Components/TabHeader.d.ts +6 -0
- package/build/Components/TabHeader.js +6 -0
- package/build/Components/TabHeader.js.map +1 -0
- package/{Components → build/Components}/TableResize.d.ts +2 -2
- package/{src/Components/TableResize.tsx → build/Components/TableResize.js} +64 -134
- package/build/Components/TableResize.js.map +1 -0
- package/{Components → build/Components}/TextWithIcon.d.ts +2 -2
- package/{src/Components/TextWithIcon.tsx → build/Components/TextWithIcon.js} +30 -75
- package/build/Components/TextWithIcon.js.map +1 -0
- package/{Components → build/Components}/ToggleThemeMenu.d.ts +1 -1
- package/build/Components/ToggleThemeMenu.js +13 -0
- package/build/Components/ToggleThemeMenu.js.map +1 -0
- package/{Components → build/Components}/TreeTable.d.ts +3 -3
- package/{Components → build/Components}/TreeTable.js +87 -99
- package/build/Components/TreeTable.js.map +1 -0
- package/{Components → build/Components}/UploadImage.d.ts +2 -2
- package/{Components → build/Components}/UploadImage.js +46 -69
- package/build/Components/UploadImage.js.map +1 -0
- package/{Components → build/Components}/Utils.d.ts +2 -2
- package/{Components → build/Components}/Utils.js +47 -60
- package/build/Components/Utils.js.map +1 -0
- package/build/Components/withWidth.d.ts +2 -0
- package/build/Components/withWidth.js +22 -0
- package/build/Components/withWidth.js.map +1 -0
- package/build/Connection.d.ts +1 -0
- package/build/Connection.js +2 -0
- package/build/Connection.js.map +1 -0
- package/{Dialogs → build/Dialogs}/ComplexCron.d.ts +2 -2
- package/build/Dialogs/ComplexCron.js +85 -0
- package/build/Dialogs/ComplexCron.js.map +1 -0
- package/{Dialogs → build/Dialogs}/Confirm.d.ts +2 -2
- package/build/Dialogs/Confirm.js +83 -0
- package/build/Dialogs/Confirm.js.map +1 -0
- package/{Dialogs → build/Dialogs}/Cron.d.ts +2 -2
- package/build/Dialogs/Cron.js +72 -0
- package/build/Dialogs/Cron.js.map +1 -0
- package/{Dialogs → build/Dialogs}/Error.d.ts +2 -2
- package/build/Dialogs/Error.js +27 -0
- package/build/Dialogs/Error.js.map +1 -0
- package/{Dialogs → build/Dialogs}/Message.d.ts +2 -2
- package/build/Dialogs/Message.js +29 -0
- package/build/Dialogs/Message.js.map +1 -0
- package/{Dialogs → build/Dialogs}/SelectFile.d.ts +2 -2
- package/build/Dialogs/SelectFile.js +116 -0
- package/build/Dialogs/SelectFile.js.map +1 -0
- package/{Dialogs → build/Dialogs}/SelectID.d.ts +3 -3
- package/{Dialogs → build/Dialogs}/SelectID.js +28 -53
- package/build/Dialogs/SelectID.js.map +1 -0
- package/{Dialogs → build/Dialogs}/SimpleCron.d.ts +2 -2
- package/build/Dialogs/SimpleCron.js +46 -0
- package/build/Dialogs/SimpleCron.js.map +1 -0
- package/build/Dialogs/TextInput.d.ts +2 -0
- package/build/Dialogs/TextInput.js +31 -0
- package/build/Dialogs/TextInput.js.map +1 -0
- package/{GenericApp.d.ts → build/GenericApp.d.ts} +2 -3
- package/{GenericApp.js → build/GenericApp.js} +162 -176
- package/build/GenericApp.js.map +1 -0
- package/{LegacyConnection.d.ts → build/LegacyConnection.d.ts} +69 -4
- package/{LegacyConnection.js → build/LegacyConnection.js} +106 -99
- package/build/LegacyConnection.js.map +1 -0
- package/{Prompt.d.ts → build/Prompt.d.ts} +1 -1
- package/{Prompt.js → build/Prompt.js} +3 -4
- package/build/Prompt.js.map +1 -0
- package/build/Theme.d.ts +5 -0
- package/{Theme.js → build/Theme.js} +37 -32
- package/build/Theme.js.map +1 -0
- package/build/assets/devices/parseNames.d.ts +0 -0
- package/build/assets/devices/parseNames.js +35 -0
- package/build/assets/devices/parseNames.js.map +1 -0
- package/build/assets/rooms/parseNames.d.ts +0 -0
- package/build/assets/rooms/parseNames.js +35 -0
- package/build/assets/rooms/parseNames.js.map +1 -0
- package/build/dictionary.d.ts +1 -0
- package/build/dictionary.js +25 -0
- package/build/dictionary.js.map +1 -0
- package/build/i18n/de.json +449 -0
- package/build/i18n/en.json +449 -0
- package/build/i18n/es.json +449 -0
- package/build/i18n/fr.json +449 -0
- package/build/i18n/it.json +449 -0
- package/build/i18n/nl.json +449 -0
- package/build/i18n/pl.json +449 -0
- package/build/i18n/pt.json +449 -0
- package/build/i18n/ru.json +449 -0
- package/build/i18n/uk.json +449 -0
- package/build/i18n/zh-cn.json +449 -0
- package/{i18n.d.ts → build/i18n.d.ts} +2 -2
- package/{i18n.js → build/i18n.js} +9 -11
- package/build/i18n.js.map +1 -0
- package/build/icons/IconAdapter.d.ts +3 -0
- package/build/icons/IconAdapter.js +6 -0
- package/build/icons/IconAdapter.js.map +1 -0
- package/build/icons/IconAlias.d.ts +3 -0
- package/build/icons/IconAlias.js +6 -0
- package/build/icons/IconAlias.js.map +1 -0
- package/build/icons/IconChannel.d.ts +3 -0
- package/build/icons/IconChannel.js +9 -0
- package/build/icons/IconChannel.js.map +1 -0
- package/build/icons/IconClearFilter.d.ts +3 -0
- package/build/icons/IconClearFilter.js +7 -0
- package/build/icons/IconClearFilter.js.map +1 -0
- package/build/icons/IconClosed.d.ts +3 -0
- package/build/icons/IconClosed.js +6 -0
- package/build/icons/IconClosed.js.map +1 -0
- package/build/icons/IconCopy.d.ts +3 -0
- package/build/icons/IconCopy.js +5 -0
- package/build/icons/IconCopy.js.map +1 -0
- package/build/icons/IconDevice.d.ts +3 -0
- package/build/icons/IconDevice.js +15 -0
- package/build/icons/IconDevice.js.map +1 -0
- package/build/icons/IconDocument.d.ts +3 -0
- package/build/icons/IconDocument.js +6 -0
- package/build/icons/IconDocument.js.map +1 -0
- package/build/icons/IconDocumentReadOnly.d.ts +3 -0
- package/build/icons/IconDocumentReadOnly.js +7 -0
- package/build/icons/IconDocumentReadOnly.js.map +1 -0
- package/build/icons/IconExpert.d.ts +3 -0
- package/build/icons/IconExpert.js +6 -0
- package/build/icons/IconExpert.js.map +1 -0
- package/build/icons/IconFx.d.ts +3 -0
- package/build/icons/IconFx.js +5 -0
- package/build/icons/IconFx.js.map +1 -0
- package/build/icons/IconInstance.d.ts +3 -0
- package/build/icons/IconInstance.js +6 -0
- package/build/icons/IconInstance.js.map +1 -0
- package/build/icons/IconLogout.d.ts +3 -0
- package/build/icons/IconLogout.js +6 -0
- package/build/icons/IconLogout.js.map +1 -0
- package/build/icons/IconNoIcon.d.ts +3 -0
- package/build/icons/IconNoIcon.js +5 -0
- package/build/icons/IconNoIcon.js.map +1 -0
- package/build/icons/IconOpen.d.ts +3 -0
- package/build/icons/IconOpen.js +6 -0
- package/build/icons/IconOpen.js.map +1 -0
- package/{icons → build/icons}/IconProps.d.ts +1 -1
- package/build/icons/IconProps.js +2 -0
- package/build/icons/IconProps.js.map +1 -0
- package/build/icons/IconState.d.ts +3 -0
- package/build/icons/IconState.js +6 -0
- package/build/icons/IconState.js.map +1 -0
- package/build/index.d.ts +67 -0
- package/build/index.js +67 -0
- package/build/index.js.map +1 -0
- package/{types.d.ts → build/types.d.ts} +1 -1
- package/package.json +84 -47
- package/AdminConnection.d.ts +0 -2
- package/AdminConnection.js +0 -4
- package/Components/404.js +0 -101
- package/Components/CopyToClipboard.js +0 -163
- package/Components/CustomModal.js +0 -88
- package/Components/FileViewer.d.ts +0 -10
- package/Components/FileViewer.js +0 -305
- package/Components/Icon.js +0 -148
- package/Components/IconPicker.js +0 -98
- package/Components/Loaders/MV.js +0 -66
- package/Components/Loaders/Vendor.js +0 -77
- package/Components/Logo.js +0 -117
- package/Components/SaveCloseButtons.js +0 -69
- package/Components/SelectWithIcon.js +0 -168
- package/Components/SimpleCron/cronText.js +0 -19
- package/Components/TabContainer.js +0 -25
- package/Components/TabContent.js +0 -21
- package/Components/TabHeader.d.ts +0 -6
- package/Components/TabHeader.js +0 -11
- package/Components/TableResize.js +0 -226
- package/Components/TextWithIcon.js +0 -119
- package/Components/ToggleThemeMenu.js +0 -18
- package/Components/withWidth.d.ts +0 -3
- package/Components/withWidth.js +0 -27
- package/Connection.d.ts +0 -3
- package/Connection.js +0 -8
- package/Dialogs/ComplexCron.js +0 -90
- package/Dialogs/Confirm.js +0 -111
- package/Dialogs/Cron.js +0 -100
- package/Dialogs/Error.js +0 -55
- package/Dialogs/Message.js +0 -57
- package/Dialogs/SelectFile.js +0 -119
- package/Dialogs/SimpleCron.js +0 -51
- package/Dialogs/TextInput.d.ts +0 -3
- package/Dialogs/TextInput.js +0 -35
- package/Theme.d.ts +0 -6
- package/i18n/de.json +0 -449
- package/i18n/en.json +0 -449
- package/i18n/es.json +0 -449
- package/i18n/fr.json +0 -449
- package/i18n/it.json +0 -449
- package/i18n/nl.json +0 -449
- package/i18n/pl.json +0 -449
- package/i18n/pt.json +0 -449
- package/i18n/ru.json +0 -449
- package/i18n/uk.json +0 -449
- package/i18n/zh-cn.json +0 -449
- package/icons/IconAdapter.d.ts +0 -4
- package/icons/IconAdapter.js +0 -10
- package/icons/IconAlias.d.ts +0 -4
- package/icons/IconAlias.js +0 -10
- package/icons/IconChannel.d.ts +0 -4
- package/icons/IconChannel.js +0 -13
- package/icons/IconClearFilter.d.ts +0 -4
- package/icons/IconClearFilter.js +0 -11
- package/icons/IconClosed.d.ts +0 -4
- package/icons/IconClosed.js +0 -10
- package/icons/IconCopy.d.ts +0 -4
- package/icons/IconCopy.js +0 -9
- package/icons/IconDevice.d.ts +0 -4
- package/icons/IconDevice.js +0 -19
- package/icons/IconDocument.d.ts +0 -4
- package/icons/IconDocument.js +0 -10
- package/icons/IconDocumentReadOnly.d.ts +0 -4
- package/icons/IconDocumentReadOnly.js +0 -11
- package/icons/IconExpert.d.ts +0 -4
- package/icons/IconExpert.js +0 -10
- package/icons/IconFx.d.ts +0 -4
- package/icons/IconFx.js +0 -9
- package/icons/IconInstance.d.ts +0 -4
- package/icons/IconInstance.js +0 -10
- package/icons/IconLogout.d.ts +0 -4
- package/icons/IconLogout.js +0 -10
- package/icons/IconNoIcon.d.ts +0 -4
- package/icons/IconNoIcon.js +0 -9
- package/icons/IconOpen.d.ts +0 -4
- package/icons/IconOpen.js +0 -10
- package/icons/IconProps.js +0 -2
- package/icons/IconState.d.ts +0 -4
- package/icons/IconState.js +0 -10
- package/index.d.ts +0 -128
- package/index.js +0 -215
- package/src/AdminConnection.tsx +0 -3
- package/src/Components/ColorPicker.tsx +0 -343
- package/src/Components/ComplexCron.tsx +0 -561
- package/src/Components/CustomModal.tsx +0 -170
- package/src/Components/FileBrowser.tsx +0 -2550
- package/src/Components/FileViewer.tsx +0 -412
- package/src/Components/Icon.tsx +0 -238
- package/src/Components/IconPicker.tsx +0 -165
- package/src/Components/IconSelector.tsx +0 -2220
- package/src/Components/Image.tsx +0 -193
- package/src/Components/Loader.tsx +0 -328
- package/src/Components/Logo.tsx +0 -176
- package/src/Components/MDUtils.tsx +0 -104
- package/src/Components/ObjectBrowser.tsx +0 -8935
- package/src/Components/Router.tsx +0 -90
- package/src/Components/SaveCloseButtons.tsx +0 -117
- package/src/Components/Schedule.tsx +0 -1995
- package/src/Components/SelectWithIcon.tsx +0 -239
- package/src/Components/TabContainer.tsx +0 -57
- package/src/Components/TabContent.tsx +0 -38
- package/src/Components/TabHeader.tsx +0 -20
- package/src/Components/ToggleThemeMenu.tsx +0 -52
- package/src/Components/TreeTable.tsx +0 -1002
- package/src/Components/UploadImage.tsx +0 -643
- package/src/Components/Utils.tsx +0 -1802
- package/src/Components/loader.css +0 -231
- package/src/Components/withWidth.tsx +0 -32
- package/src/Connection.tsx +0 -5
- package/src/Dialogs/ComplexCron.tsx +0 -163
- package/src/Dialogs/Confirm.tsx +0 -185
- package/src/Dialogs/Cron.tsx +0 -192
- package/src/Dialogs/Error.tsx +0 -67
- package/src/Dialogs/Message.tsx +0 -73
- package/src/Dialogs/SelectFile.tsx +0 -280
- package/src/Dialogs/SelectID.tsx +0 -310
- package/src/Dialogs/SimpleCron.tsx +0 -101
- package/src/Dialogs/TextInput.tsx +0 -99
- package/src/GenericApp.tsx +0 -1076
- package/src/LegacyConnection.tsx +0 -3720
- package/src/Prompt.tsx +0 -22
- package/src/Theme.tsx +0 -472
- package/src/icons/IconAdapter.tsx +0 -22
- package/src/icons/IconAlias.tsx +0 -22
- package/src/icons/IconChannel.tsx +0 -60
- package/src/icons/IconClearFilter.tsx +0 -24
- package/src/icons/IconClosed.tsx +0 -22
- package/src/icons/IconCopy.tsx +0 -21
- package/src/icons/IconDevice.tsx +0 -126
- package/src/icons/IconDocument.tsx +0 -22
- package/src/icons/IconDocumentReadOnly.tsx +0 -27
- package/src/icons/IconExpert.tsx +0 -26
- package/src/icons/IconFx.tsx +0 -38
- package/src/icons/IconInstance.tsx +0 -22
- package/src/icons/IconLogout.tsx +0 -32
- package/src/icons/IconNoIcon.tsx +0 -21
- package/src/icons/IconOpen.tsx +0 -22
- package/src/icons/IconProps.tsx +0 -16
- package/src/icons/IconState.tsx +0 -38
- package/src/index.css +0 -56
- /package/{Components → build/Components}/404.d.ts +0 -0
- /package/{Components → build/Components}/SimpleCron/cronText.d.ts +0 -0
- /package/{assets → build/assets}/devices.json +0 -0
- /package/{assets → build/assets}/lamp_ceiling.svg +0 -0
- /package/{assets → build/assets}/lamp_table.svg +0 -0
- /package/{assets → build/assets}/no_icon.svg +0 -0
- /package/{assets → build/assets}/rooms.json +0 -0
- /package/{index.css → build/index.css} +0 -0
- /package/{tasks.js → tasksExample.js} +0 -0
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
1
|
/**
|
|
4
2
|
* Print the ioBroker welcome screen to the developer console.
|
|
5
3
|
*/
|
|
6
|
-
function printPrompt() {
|
|
4
|
+
export function printPrompt() {
|
|
7
5
|
const prompt = `
|
|
8
6
|
██╗ ██████╗ ██████╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
|
|
9
7
|
██║██╔═══██╗██╔══██╗██╔══██╗██╔═══██╗██║ ██╔╝██╔════╝██╔══██╗
|
|
@@ -17,4 +15,5 @@ function printPrompt() {
|
|
|
17
15
|
console.log('Help us to create open source project with reactJS!');
|
|
18
16
|
console.log('See you :)');
|
|
19
17
|
}
|
|
20
|
-
|
|
18
|
+
export default printPrompt;
|
|
19
|
+
//# sourceMappingURL=Prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Prompt.js","sourceRoot":"./src/","sources":["Prompt.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,UAAU,WAAW;IACvB,MAAM,MAAM,GAAG;;;;;;;CAOlB,CAAC;IAEE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACpB,OAAO,CAAC,GAAG,CACP,kJAAkJ,CACrJ,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,qDAAqD,CAAC,CAAC;IACnE,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;AAC9B,CAAC;AAED,eAAe,WAAW,CAAC","sourcesContent":["/**\n * Print the ioBroker welcome screen to the developer console.\n */\nexport function printPrompt(): void {\n const prompt = `\n██╗ ██████╗ ██████╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗ \n██║██╔═══██╗██╔══██╗██╔══██╗██╔═══██╗██║ ██╔╝██╔════╝██╔══██╗\n██║██║ ██║██████╔╝██████╔╝██║ ██║█████╔╝ █████╗ ██████╔╝\n██║██║ ██║██╔══██╗██╔══██╗██║ ██║██╔═██╗ ██╔══╝ ██╔══██╗\n██║╚██████╔╝██████╔╝██║ ██║╚██████╔╝██║ ██╗███████╗██║ ██║\n╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝\n`;\n\n console.log(prompt);\n console.log(\n 'Nice to see you here! :) Join our dev community here https://github.com/ioBroker/ioBroker or here https://github.com/iobroker-community-adapters',\n );\n console.log('Help us to create open source project with reactJS!');\n console.log('See you :)');\n}\n\nexport default printPrompt;\n"]}
|
package/build/Theme.d.ts
ADDED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const colors_1 = require("@mui/material/colors");
|
|
1
|
+
import {} from 'react';
|
|
2
|
+
import { createTheme, alpha } from '@mui/material/styles';
|
|
3
|
+
import { orange, grey } from '@mui/material/colors';
|
|
5
4
|
const step = (16 - 5) / 23 / 100;
|
|
6
5
|
/**
|
|
7
6
|
* Convert hex color in the format '#rrggbb' or '#rgb' to an RGB object.
|
|
@@ -66,8 +65,7 @@ function getElevations(color, overlay) {
|
|
|
66
65
|
/**
|
|
67
66
|
* The theme creation factory function.
|
|
68
67
|
*/
|
|
69
|
-
function
|
|
70
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
68
|
+
export function Theme(type, overrides) {
|
|
71
69
|
let options;
|
|
72
70
|
let localOverrides;
|
|
73
71
|
if (type === 'dark') {
|
|
@@ -81,9 +79,9 @@ function customTheme(type, overrides) {
|
|
|
81
79
|
root: {
|
|
82
80
|
textTransform: 'uppercase',
|
|
83
81
|
transition: 'color .3s ease',
|
|
84
|
-
color:
|
|
82
|
+
color: orange[200],
|
|
85
83
|
'&:hover': {
|
|
86
|
-
color:
|
|
84
|
+
color: orange[100],
|
|
87
85
|
},
|
|
88
86
|
},
|
|
89
87
|
},
|
|
@@ -122,9 +120,9 @@ function customTheme(type, overrides) {
|
|
|
122
120
|
root: {
|
|
123
121
|
textTransform: 'uppercase',
|
|
124
122
|
transition: 'color .3s ease',
|
|
125
|
-
color:
|
|
123
|
+
color: orange[400],
|
|
126
124
|
'&:hover': {
|
|
127
|
-
color:
|
|
125
|
+
color: orange[300],
|
|
128
126
|
},
|
|
129
127
|
},
|
|
130
128
|
},
|
|
@@ -162,9 +160,9 @@ function customTheme(type, overrides) {
|
|
|
162
160
|
root: {
|
|
163
161
|
textTransform: 'uppercase',
|
|
164
162
|
transition: 'color .3s ease',
|
|
165
|
-
color:
|
|
163
|
+
color: orange[200],
|
|
166
164
|
'&:hover': {
|
|
167
|
-
color:
|
|
165
|
+
color: orange[100],
|
|
168
166
|
},
|
|
169
167
|
},
|
|
170
168
|
},
|
|
@@ -195,9 +193,9 @@ function customTheme(type, overrides) {
|
|
|
195
193
|
root: {
|
|
196
194
|
textTransform: 'uppercase',
|
|
197
195
|
transition: 'color .3s ease',
|
|
198
|
-
color:
|
|
196
|
+
color: orange[400],
|
|
199
197
|
'&:hover': {
|
|
200
|
-
color:
|
|
198
|
+
color: orange[300],
|
|
201
199
|
},
|
|
202
200
|
},
|
|
203
201
|
},
|
|
@@ -227,9 +225,9 @@ function customTheme(type, overrides) {
|
|
|
227
225
|
root: {
|
|
228
226
|
textTransform: 'uppercase',
|
|
229
227
|
transition: 'color .3s ease',
|
|
230
|
-
color:
|
|
228
|
+
color: orange[400],
|
|
231
229
|
'&:hover': {
|
|
232
|
-
color:
|
|
230
|
+
color: orange[300],
|
|
233
231
|
},
|
|
234
232
|
},
|
|
235
233
|
},
|
|
@@ -259,9 +257,9 @@ function customTheme(type, overrides) {
|
|
|
259
257
|
root: {
|
|
260
258
|
textTransform: 'uppercase',
|
|
261
259
|
transition: 'color .3s ease',
|
|
262
|
-
color:
|
|
260
|
+
color: orange[400],
|
|
263
261
|
'&:hover': {
|
|
264
|
-
color:
|
|
262
|
+
color: orange[300],
|
|
265
263
|
},
|
|
266
264
|
},
|
|
267
265
|
},
|
|
@@ -286,7 +284,7 @@ function customTheme(type, overrides) {
|
|
|
286
284
|
height: 48,
|
|
287
285
|
};
|
|
288
286
|
options.saveToolbar = {
|
|
289
|
-
background:
|
|
287
|
+
background: options.palette?.primary?.main,
|
|
290
288
|
button: {
|
|
291
289
|
borderRadius: 3,
|
|
292
290
|
height: 32,
|
|
@@ -294,19 +292,23 @@ function customTheme(type, overrides) {
|
|
|
294
292
|
};
|
|
295
293
|
if (options.palette) {
|
|
296
294
|
options.palette.grey = {
|
|
297
|
-
main:
|
|
298
|
-
dark:
|
|
295
|
+
main: grey[300],
|
|
296
|
+
dark: grey[400],
|
|
299
297
|
};
|
|
300
298
|
}
|
|
301
|
-
const theme =
|
|
299
|
+
const theme = createTheme(options);
|
|
302
300
|
const palette = theme.palette;
|
|
303
|
-
return
|
|
301
|
+
return createTheme(theme, {
|
|
302
|
+
...(overrides || undefined),
|
|
303
|
+
components: {
|
|
304
|
+
...localOverrides,
|
|
305
|
+
MuiButton: {
|
|
304
306
|
variants: [
|
|
305
307
|
{
|
|
306
308
|
props: { variant: 'contained', color: 'grey' },
|
|
307
309
|
style: {
|
|
308
|
-
backgroundColor:
|
|
309
|
-
color: palette.getContrastText &&
|
|
310
|
+
backgroundColor: palette.grey?.[300],
|
|
311
|
+
color: palette.getContrastText && palette.grey?.[300]
|
|
310
312
|
? palette.getContrastText(palette.grey[300])
|
|
311
313
|
: undefined,
|
|
312
314
|
},
|
|
@@ -314,27 +316,30 @@ function customTheme(type, overrides) {
|
|
|
314
316
|
{
|
|
315
317
|
props: { variant: 'outlined', color: 'grey' },
|
|
316
318
|
style: {
|
|
317
|
-
color:
|
|
319
|
+
color: palette.text?.primary,
|
|
318
320
|
borderColor: palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)',
|
|
319
321
|
'&.Mui-disabled': {
|
|
320
|
-
border: `1px solid ${
|
|
322
|
+
border: `1px solid ${palette.action?.disabledBackground}`,
|
|
321
323
|
},
|
|
322
324
|
'&:hover': {
|
|
323
325
|
borderColor: palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)',
|
|
324
|
-
backgroundColor:
|
|
326
|
+
backgroundColor: alpha(palette.text?.primary || '', palette.action?.hoverOpacity || 0.04),
|
|
325
327
|
},
|
|
326
328
|
},
|
|
327
329
|
},
|
|
328
330
|
{
|
|
329
331
|
props: { variant: 'text', color: 'grey' },
|
|
330
332
|
style: {
|
|
331
|
-
color:
|
|
333
|
+
color: palette.text?.primary,
|
|
332
334
|
'&:hover': {
|
|
333
|
-
backgroundColor:
|
|
335
|
+
backgroundColor: alpha(palette.text?.primary || '', palette.action?.hoverOpacity || 0.04),
|
|
334
336
|
},
|
|
335
337
|
},
|
|
336
338
|
},
|
|
337
339
|
],
|
|
338
|
-
}
|
|
340
|
+
},
|
|
341
|
+
...(overrides?.components || undefined),
|
|
342
|
+
},
|
|
343
|
+
});
|
|
339
344
|
}
|
|
340
|
-
|
|
345
|
+
//# sourceMappingURL=Theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Theme.js","sourceRoot":"./src/","sources":["Theme.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,KAAK,EAA4C,MAAM,sBAAsB,CAAC;AACpG,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAMpD,MAAM,IAAI,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC;AAEjC;;GAEG;AACH,SAAS,KAAK,CAAC,GAAW;IACtB,MAAM,GAAG,GAAwC;QAC7C,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;KACP,CAAC;IAEF,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACnB,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACvC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACvC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC3C,CAAC;SAAM,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1B,MAAM,CAAC,GAAG,GAAG,C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6BAC5D;4BACD,SAAS,EAAE;gCACP,WAAW,EACP,OAAO,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,2BAA2B;gCAClF,eAAe,EAAE,KAAK,CAClB,OAAO,CAAC,IAAI,EAAE,OAAO,IAAI,EAAE,EAC3B,OAAO,CAAC,MAAM,EAAE,YAAY,IAAI,IAAI,CACvC;6BACJ;yBACJ;qBACJ;oBACD;wBACI,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;wBACzC,KAAK,EAAE;4BACH,KAAK,EAAE,OAAO,CAAC,IAAI,EAAE,OAAO;4BAC5B,SAAS,EAAE;gCACP,eAAe,EAAE,KAAK,CAClB,OAAO,CAAC,IAAI,EAAE,OAAO,IAAI,EAAE,EAC3B,OAAO,CAAC,MAAM,EAAE,YAAY,IAAI,IAAI,CACvC;6BACJ;yBACJ;qBACJ;iBACJ;aACJ;YACD,GAAG,CAAC,SAAS,EAAE,UAAU,IAAI,SAAS,CAAC;SAC1C;KACJ,CAAa,CAAC;AACnB,CAAC","sourcesContent":["import { type CSSProperties } from 'react';\nimport { createTheme, alpha, type PaletteOptions as PaletteOptionsMui } from '@mui/material/styles';\nimport { orange, grey } from '@mui/material/colors';\n\nimport type { SimplePaletteColorOptions } from '@mui/material/styles/createPalette';\nimport type { ThemeOptions as ThemeOptionsMui } from '@mui/material/styles/createTheme';\nimport type { IobTheme, ThemeName, ThemeType } from './types';\n\nconst step = (16 - 5) / 23 / 100;\n\n/**\n * Convert hex color in the format '#rrggbb' or '#rgb' to an RGB object.\n */\nfunction toInt(hex: string): { r: number; g: number; b: number } {\n const rgb: { r: number; g: number; b: number } = {\n r: 0,\n g: 0,\n b: 0,\n };\n\n if (hex.length === 7) {\n rgb.r = parseInt(hex.substr(1, 2), 16);\n rgb.g = parseInt(hex.substr(3, 2), 16);\n rgb.b = parseInt(hex.substr(5, 2), 16);\n } else if (hex.length === 4) {\n const r = hex.substr(1, 1);\n const g = hex.substr(2, 1);\n const b = hex.substr(3, 1);\n\n rgb.r = parseInt(r + r, 16);\n rgb.g = parseInt(g + g, 16);\n rgb.b = parseInt(b + b, 16);\n }\n\n return rgb;\n}\n\n/**\n * Convert an RGB object to a hex color string in the format '#rrggbb'.\n */\nfunction toHex(int: { r: number; g: number; b: number }): string {\n return `#${Math.round(int.r).toString(16)}${Math.round(int.g).toString(16)}${Math.round(int.b).toString(16)}`;\n}\n\n/** Returns the hex color string in the format '#rrggbb' */\nfunction getElevation(\n /** color in the format '#rrggbb' or '#rgb' */\n color: string,\n /** overlay color in the format '#rrggbb' or '#rgb' */\n overlayColor: string,\n /** elevation as an integer starting with 1 */\n elevation: number,\n): string {\n const rgb: { r: number; g: number; b: number } = toInt(color);\n const overlay: { r: number; g: number; b: number } = toInt(overlayColor);\n\n rgb.r += overlay.r * (0.05 + step * (elevation - 1));\n rgb.g += overlay.g * (0.05 + step * (elevation - 1));\n rgb.b += overlay.b * (0.05 + step * (elevation - 1));\n\n return toHex(rgb);\n}\n\n/**\n * Get all 24 elevations of the given color and overlay.\n *\n * @param color color in the format '#rrggbb' or '#rgb'\n * @param overlay overlay color in the format '#rrggbb' or '#rgb'\n */\nfunction getElevations(color: string, overlay: string): Record<string, CSSProperties> {\n const elevations: Record<string, CSSProperties> = {};\n\n for (let i = 1; i <= 24; i++) {\n elevations[`elevation${i}`] = {\n backgroundColor: getElevation(color, overlay, i),\n };\n }\n\n return elevations;\n}\n\n// const buttonsPalette = () => ({\n// palette: {\n// // mode: \"dark\",\n// grey: {\n// main: grey[300],\n// dark: grey[400],\n// },\n// },\n// });\n\n// const buttonsTheme = theme => ({\n// components: {\n// MuiButton: {\n// variants: [\n// {\n// props: { variant: 'contained', color: 'grey' },\n// style: {\n// color: theme.palette.getContrastText(theme.palette.grey[300]),\n// },\n// },\n// {\n// props: { variant: 'outlined', color: 'grey' },\n// style: {\n// color: theme.palette.text.primary,\n// borderColor:\n// theme.palette.mode === 'light'\n// ? 'rgba(0, 0, 0, 0.23)'\n// : 'rgba(255, 255, 255, 0.23)',\n// '&.Mui-disabled': {\n// border: `1px solid ${theme.palette.action.disabledBackground}`,\n// },\n// '&:hover': {\n// borderColor:\n// theme.palette.mode === 'light'\n// ? 'rgba(0, 0, 0, 0.23)'\n// : 'rgba(255, 255, 255, 0.23)',\n// backgroundColor: alpha(\n// theme.palette.text.primary,\n// theme.palette.action.hoverOpacity,\n// ),\n// },\n// },\n// },\n// {\n// props: { color: 'grey', variant: 'text' },\n// style: {\n// color: 'black',\n// '&:hover': {\n// backgroundColor: alpha(\n// theme.palette.text.primary,\n// theme.palette.action.hoverOpacity,\n// ),\n// },\n// },\n// },\n// ],\n// },\n// },\n// });\n\ninterface PaletteOptions extends PaletteOptionsMui {\n mode: ThemeType;\n expert: string;\n grey?: {\n main?: string;\n dark?: string;\n 50?: string;\n 100?: string;\n 200?: string;\n 300?: string;\n 400?: string;\n 500?: string;\n 600?: string;\n 700?: string;\n 800?: string;\n 900?: string;\n A100?: string;\n A200?: string;\n A400?: string;\n A700?: string;\n };\n}\n\ninterface ThemeOptions extends ThemeOptionsMui {\n name: ThemeName;\n palette?: PaletteOptions;\n toolbar?: CSSProperties;\n saveToolbar?: {\n background: string;\n button: CSSProperties;\n };\n}\n\n/**\n * The theme creation factory function.\n */\nexport function Theme(type: ThemeName, overrides?: Record<string, any>): IobTheme {\n let options: ThemeOptions;\n let localOverrides: Record<string, any>;\n\n if (type === 'dark') {\n localOverrides = {\n MuiAppBar: {\n colorDefault: {\n backgroundColor: '#272727',\n },\n },\n MuiLink: {\n root: {\n textTransform: 'uppercase',\n transition: 'color .3s ease',\n color: orange[200],\n '&:hover': {\n color: orange[100],\n },\n },\n },\n MuiPaper: getElevations('#121212', '#fff'),\n };\n\n options = {\n name: type,\n palette: {\n mode: 'dark',\n background: {\n paper: '#121212',\n default: '#121212',\n },\n primary: {\n main: '#4dabf5',\n },\n secondary: {\n main: '#436a93',\n },\n expert: '#14bb00',\n text: {\n primary: '#ffffff',\n secondary: '#ffffff',\n },\n },\n };\n } else if (type === 'blue') {\n localOverrides = {\n MuiAppBar: {\n colorDefault: {\n backgroundColor: '#3399CC',\n },\n },\n MuiLink: {\n root: {\n textTransform: 'uppercase',\n transition: 'color .3s ease',\n color: orange[400],\n '&:hover': {\n color: orange[300],\n },\n },\n },\n };\n\n options = {\n name: type,\n palette: {\n mode: 'dark',\n background: {\n paper: '#151d21',\n default: '#151d21',\n },\n primary: {\n main: '#4dabf5',\n },\n secondary: {\n main: '#436a93',\n },\n expert: '#14bb00',\n text: {\n primary: '#ffffff',\n secondary: '#ffffff',\n },\n },\n };\n } else if (type === 'colored') {\n localOverrides = {\n MuiAppBar: {\n colorDefault: {\n backgroundColor: '#2a3135',\n },\n },\n MuiLink: {\n root: {\n textTransform: 'uppercase',\n transition: 'color .3s ease',\n color: orange[200],\n '&:hover': {\n color: orange[100],\n },\n },\n },\n MuiPaper: getElevations('#151d21', '#fff'),\n };\n\n options = {\n name: type,\n palette: {\n mode: 'light',\n primary: {\n main: '#3399CC',\n },\n secondary: {\n main: '#164477',\n },\n expert: '#96fc96',\n },\n };\n } else if (type === 'PT') {\n localOverrides = {\n MuiAppBar: {\n colorDefault: {\n backgroundColor: '#0F99DE',\n },\n },\n MuiLink: {\n root: {\n textTransform: 'uppercase',\n transition: 'color .3s ease',\n color: orange[400],\n '&:hover': {\n color: orange[300],\n },\n },\n },\n };\n\n options = {\n name: type,\n palette: {\n mode: 'light',\n primary: {\n main: '#0F99DE',\n },\n secondary: {\n main: '#88A536',\n },\n expert: '#BD1B24',\n },\n };\n } else if (type === 'DX') {\n localOverrides = {\n MuiAppBar: {\n colorDefault: {\n backgroundColor: '#a9a9a9',\n },\n },\n MuiLink: {\n root: {\n textTransform: 'uppercase',\n transition: 'color .3s ease',\n color: orange[400],\n '&:hover': {\n color: orange[300],\n },\n },\n },\n };\n\n options = {\n name: type,\n palette: {\n mode: 'light',\n primary: {\n main: '#F5F5F7',\n },\n secondary: {\n main: '#a9a9a9',\n },\n expert: '#BD1B24',\n text: {\n primary: '#007AFE',\n secondary: '#007AFE',\n disabled: '#007AFEAA',\n },\n },\n };\n } else {\n localOverrides = {\n MuiLink: {\n root: {\n textTransform: 'uppercase',\n transition: 'color .3s ease',\n color: orange[400],\n '&:hover': {\n color: orange[300],\n },\n },\n },\n };\n\n options = {\n name: type,\n palette: {\n mode: 'light',\n primary: {\n main: '#3399CC',\n dark: '#256c97',\n light: '#76d0fd',\n },\n secondary: {\n main: '#164477',\n },\n expert: '#14bb00',\n },\n };\n }\n\n options.toolbar = {\n height: 48,\n };\n\n options.saveToolbar = {\n background: (options.palette?.primary as SimplePaletteColorOptions)?.main,\n button: {\n borderRadius: 3,\n height: 32,\n },\n };\n\n if (options.palette) {\n options.palette.grey = {\n main: grey[300],\n dark: grey[400],\n };\n }\n\n const theme: IobTheme = createTheme(options) as IobTheme;\n\n const palette: PaletteOptions = theme.palette as PaletteOptions;\n\n return createTheme(theme, {\n ...(overrides || undefined),\n components: {\n ...localOverrides,\n MuiButton: {\n variants: [\n {\n props: { variant: 'contained', color: 'grey' },\n style: {\n backgroundColor: palette.grey?.[300],\n color:\n palette.getContrastText && palette.grey?.[300]\n ? palette.getContrastText(palette.grey[300])\n : undefined,\n },\n },\n {\n props: { variant: 'outlined', color: 'grey' },\n style: {\n color: palette.text?.primary,\n borderColor: palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)',\n '&.Mui-disabled': {\n border: `1px solid ${palette.action?.disabledBackground}`,\n },\n '&:hover': {\n borderColor:\n palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)',\n backgroundColor: alpha(\n palette.text?.primary || '',\n palette.action?.hoverOpacity || 0.04,\n ),\n },\n },\n },\n {\n props: { variant: 'text', color: 'grey' },\n style: {\n color: palette.text?.primary,\n '&:hover': {\n backgroundColor: alpha(\n palette.text?.primary || '',\n palette.action?.hoverOpacity || 0.04,\n ),\n },\n },\n },\n ],\n },\n ...(overrides?.components || undefined),\n },\n }) as IobTheme;\n}\n"]}
|
|
File without changes
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// this is a service script that extracts names from names.txt and places them into list.json
|
|
2
|
+
/*
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
|
|
5
|
+
function readTxt(fileName) {
|
|
6
|
+
const text = fs.readFileSync(fileName).toString('utf8');
|
|
7
|
+
const lines = text.split('\n');
|
|
8
|
+
const langs = lines.shift().split('\t').map(l => l.toLowerCase().trim());
|
|
9
|
+
|
|
10
|
+
const result = {};
|
|
11
|
+
lines.forEach(line => {
|
|
12
|
+
const words = line.split('\t').map(w => w.trim());
|
|
13
|
+
const word = {};
|
|
14
|
+
result[words[0]] = word;
|
|
15
|
+
langs.forEach((lang, i) => {
|
|
16
|
+
word[lang] = words[i];
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
return result;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function mergeTexts(jsonFileName, words) {
|
|
23
|
+
const file = require(jsonFileName);
|
|
24
|
+
file.forEach(item => {
|
|
25
|
+
if (typeof item.name === 'string' && words[item.name]) {
|
|
26
|
+
item.name = words[item.name];
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
fs.writeFileSync(jsonFileName, JSON.stringify(file, null, 2));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const words = readTxt(__dirname + '/names.txt');
|
|
33
|
+
mergeTexts(__dirname + '/list.json', words);
|
|
34
|
+
*/
|
|
35
|
+
//# sourceMappingURL=parseNames.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseNames.js","sourceRoot":"./src/","sources":["assets/devices/parseNames.js"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgCE","sourcesContent":["// this is a service script that extracts names from names.txt and places them into list.json\n/*\nconst fs = require('fs');\n\nfunction readTxt(fileName) {\n const text = fs.readFileSync(fileName).toString('utf8');\n const lines = text.split('\\n');\n const langs = lines.shift().split('\\t').map(l => l.toLowerCase().trim());\n\n const result = {};\n lines.forEach(line => {\n const words = line.split('\\t').map(w => w.trim());\n const word = {};\n result[words[0]] = word;\n langs.forEach((lang, i) => {\n word[lang] = words[i];\n });\n });\n return result;\n}\n\nfunction mergeTexts(jsonFileName, words) {\n const file = require(jsonFileName);\n file.forEach(item => {\n if (typeof item.name === 'string' && words[item.name]) {\n item.name = words[item.name];\n }\n });\n fs.writeFileSync(jsonFileName, JSON.stringify(file, null, 2));\n}\n\nconst words = readTxt(__dirname + '/names.txt');\nmergeTexts(__dirname + '/list.json', words);\n*/\n"]}
|
|
File without changes
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// this is a service script that extracts names from names.txt and places them into list.json
|
|
2
|
+
/*
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
|
|
5
|
+
function readTxt(fileName) {
|
|
6
|
+
const text = fs.readFileSync(fileName).toString('utf8');
|
|
7
|
+
const lines = text.split('\n');
|
|
8
|
+
const langs = lines.shift().split('\t').map(l => l.toLowerCase().trim());
|
|
9
|
+
|
|
10
|
+
const result = {};
|
|
11
|
+
lines.forEach(line => {
|
|
12
|
+
const words = line.split('\t').map(w => w.trim());
|
|
13
|
+
const word = {};
|
|
14
|
+
result[words[0]] = word;
|
|
15
|
+
langs.forEach((lang, i) => {
|
|
16
|
+
word[lang] = words[i];
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
return result;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function mergeTexts(jsonFileName, words) {
|
|
23
|
+
const file = require(jsonFileName);
|
|
24
|
+
file.forEach(item => {
|
|
25
|
+
if (typeof item.name === 'string' && words[item.name]) {
|
|
26
|
+
item.name = words[item.name];
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
fs.writeFileSync(jsonFileName, JSON.stringify(file, null, 2));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const words = readTxt(__dirname + '/names.txt');
|
|
33
|
+
mergeTexts(__dirname + '/list.json', words);
|
|
34
|
+
*/
|
|
35
|
+
//# sourceMappingURL=parseNames.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseNames.js","sourceRoot":"./src/","sources":["assets/rooms/parseNames.js"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgCE","sourcesContent":["// this is a service script that extracts names from names.txt and places them into list.json\n/*\nconst fs = require('fs');\n\nfunction readTxt(fileName) {\n const text = fs.readFileSync(fileName).toString('utf8');\n const lines = text.split('\\n');\n const langs = lines.shift().split('\\t').map(l => l.toLowerCase().trim());\n\n const result = {};\n lines.forEach(line => {\n const words = line.split('\\t').map(w => w.trim());\n const word = {};\n result[words[0]] = word;\n langs.forEach((lang, i) => {\n word[lang] = words[i];\n });\n });\n return result;\n}\n\nfunction mergeTexts(jsonFileName, words) {\n const file = require(jsonFileName);\n file.forEach(item => {\n if (typeof item.name === 'string' && words[item.name]) {\n item.name = words[item.name];\n }\n });\n fs.writeFileSync(jsonFileName, JSON.stringify(file, null, 2));\n}\n\nconst words = readTxt(__dirname + '/names.txt');\nmergeTexts(__dirname + '/list.json', words);\n*/\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const dictionary: Record<ioBroker.Languages, Record<string, string>>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import langEn from './i18n/en.json';
|
|
2
|
+
import langDe from './i18n/de.json';
|
|
3
|
+
import langRu from './i18n/ru.json';
|
|
4
|
+
import langPt from './i18n/pt.json';
|
|
5
|
+
import langNl from './i18n/nl.json';
|
|
6
|
+
import langFr from './i18n/fr.json';
|
|
7
|
+
import langIt from './i18n/it.json';
|
|
8
|
+
import langEs from './i18n/es.json';
|
|
9
|
+
import langPl from './i18n/pl.json';
|
|
10
|
+
import langUk from './i18n/uk.json';
|
|
11
|
+
import langZhCn from './i18n/zh-cn.json';
|
|
12
|
+
export const dictionary = {
|
|
13
|
+
en: langEn,
|
|
14
|
+
de: langDe,
|
|
15
|
+
ru: langRu,
|
|
16
|
+
pt: langPt,
|
|
17
|
+
nl: langNl,
|
|
18
|
+
fr: langFr,
|
|
19
|
+
it: langIt,
|
|
20
|
+
es: langEs,
|
|
21
|
+
pl: langPl,
|
|
22
|
+
uk: langUk,
|
|
23
|
+
'zh-cn': langZhCn,
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=dictionary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dictionary.js","sourceRoot":"./src/","sources":["dictionary.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AAEzC,MAAM,CAAC,MAAM,UAAU,GAAuD;IAC1E,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;IACV,OAAO,EAAE,QAAQ;CACpB,CAAC","sourcesContent":["import langEn from './i18n/en.json';\nimport langDe from './i18n/de.json';\nimport langRu from './i18n/ru.json';\nimport langPt from './i18n/pt.json';\nimport langNl from './i18n/nl.json';\nimport langFr from './i18n/fr.json';\nimport langIt from './i18n/it.json';\nimport langEs from './i18n/es.json';\nimport langPl from './i18n/pl.json';\nimport langUk from './i18n/uk.json';\nimport langZhCn from './i18n/zh-cn.json';\n\nexport const dictionary: Record<ioBroker.Languages, Record<string, string>> = {\n en: langEn,\n de: langDe,\n ru: langRu,\n pt: langPt,\n nl: langNl,\n fr: langFr,\n it: langIt,\n es: langEs,\n pl: langPl,\n uk: langUk,\n 'zh-cn': langZhCn,\n};\n"]}
|