@iobroker/adapter-react-v5 7.2.4 → 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 +6 -6
- 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 +2 -2
- package/{Components → build/Components}/FileBrowser.js +229 -236
- 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 +4 -4
- package/{Components → build/Components}/ObjectBrowser.js +1152 -1116
- 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 +2 -2
- package/{Components → build/Components}/Schedule.js +242 -257
- 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 -58
- 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 -48
- 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 -2560
- 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 -8947
- package/src/Components/Router.tsx +0 -90
- package/src/Components/SaveCloseButtons.tsx +0 -117
- package/src/Components/Schedule.tsx +0 -1998
- 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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectID.js","sourceRoot":"./src/","sources":["Dialogs/SelectID.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,uHAAuH;AACvH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE1F,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAI5E,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC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T License\n *\n */\n// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined\nimport React, { Component, type JSX } from 'react';\n\nimport { Button, DialogTitle, DialogContent, DialogActions, Dialog } from '@mui/material';\n\nimport { Cancel as IconCancel, Check as IconOk } from '@mui/icons-material';\n\nimport type { Connection } from '../Connection';\n\nimport { I18n } from '../i18n';\nimport { ObjectBrowser, type ObjectBrowserFilter } from '../Components/ObjectBrowser';\nimport type { ObjectBrowserColumn, ObjectBrowserCustomFilter, ObjectBrowserType } from '../Components/types';\nimport type { IobTheme } from '../types';\n\nexport interface SelectIDFilters {\n id?: string;\n name?: string;\n room?: string;\n func?: string;\n role?: string;\n type?: string;\n custom?: string;\n}\n\ninterface DialogSelectIDProps {\n /** The internal name of the dialog; default: \"default\". Used to store settings in local storage */\n dialogName?: string;\n /** The dialog title; default: Please select object ID... (translated) */\n title?: string;\n /** Set to true to allow the selection of multiple IDs. */\n multiSelect?: boolean;\n /** Show folders before any leaves. */\n foldersFirst?: boolean;\n /** Path prefix for images (default: '.') */\n imagePrefix?: string;\n /** @deprecated same as imagePrefix */\n prefix?: string;\n /** Show the expert button */\n showExpertButton?: boolean;\n /** Force expert mode */\n expertMode?: boolean;\n /** optional ['name', 'type', 'role', 'room', 'func', 'val', 'buttons'] */\n columns?: ObjectBrowserColumn[];\n /** Object types to show; default: 'state' only */\n types?: ObjectBrowserType | ObjectBrowserType[];\n /** The language. */\n lang?: ioBroker.Languages;\n /** The socket connection. */\n socket: Connection;\n /** Can't objects be edited? (default: true) */\n notEditable?: boolean;\n /** Theme name. */\n themeName?: string;\n /** Theme type: dark or light */\n themeType?: string;\n /** The theme object */\n theme: IobTheme;\n /** The date format for the date columns */\n dateFormat?: string;\n /** Is use comma or point for displaying of float numbers */\n isFloatComma?: boolean;\n /** Custom filter. */\n customFilter?: ObjectBrowserCustomFilter;\n /** The selected IDs. */\n selected?: string | string[];\n /** The ok button text; default: OK (translated) */\n ok?: string;\n /** The cancel button text; default: Cancel (translated) */\n cancel?: string;\n /** Close handler that is always called when the dialog is closed. */\n onClose: () => void;\n /** Handler that is called when the user presses OK. */\n onOk: (selected: string | string[] | undefined, name: string) => void;\n /**\n * Function to filter out all unnecessary objects. Can be string or function.\n * It cannot be used together with \"types\".\n * Example for function: `obj => obj.common?.type === 'boolean'` to show only boolean states\n * In case of string, it must look like `obj.common && obj.common.type === 'boolean'`\n */\n filterFunc?: string | ((obj: ioBroker.Object) => boolean);\n /** predefined filter fields, like {\"id\":\"\",\"name\":\"\",\"room\":\"\",\"func\":\"\",\"role\":\"level\",\"type\":\"\",\"custom\":\"\"} */\n filters?: SelectIDFilters;\n /** Show elements only of this root ID */\n root?: string;\n}\n\ninterface DialogSelectIDState {\n selected: string[];\n name: string;\n}\n\nexport class DialogSelectID extends Component<DialogSelectIDProps, DialogSelectIDState> {\n private readonly dialogName: string;\n\n private filters: ObjectBrowserFilter;\n\n private readonly filterFunc?: (obj: ioBroker.Object) => boolean;\n\n constructor(props: DialogSelectIDProps) {\n super(props);\n this.dialogName = this.props.dialogName || 'default';\n this.dialogName = `SelectID.${this.dialogName}`;\n\n const filters: string = ((window as any)._localStorage || window.localStorage).getItem(this.dialogName) || '{}';\n\n try {\n this.filters = JSON.parse(filters);\n } catch {\n this.filters = {};\n }\n\n if (props.filters) {\n this.filters = { ...this.filters, ...(props.filters || {}) };\n }\n\n let selected = this.props.selected || [];\n if (!Array.isArray(selected)) {\n selected = [selected];\n }\n selected = selected.filter(id => id);\n\n if (props.filterFunc) {\n if (typeof props.filterFunc === 'string') {\n try {\n this.filterFunc = new Function('obj', props.filterFunc) as (obj: ioBroker.Object) => boolean;\n } catch {\n console.error(`Cannot parse filter function: \"obj => ${props.filterFunc}\"`);\n this.filterFunc = undefined;\n }\n } else {\n this.filterFunc = props.filterFunc;\n }\n }\n\n this.state = {\n selected,\n name: '',\n };\n }\n\n handleCancel(): void {\n this.props.onClose();\n }\n\n handleOk(): void {\n this.props.onOk(this.props.multiSelect ? this.state.selected : this.state.selected[0] || '', this.state.name);\n this.props.onClose();\n }\n\n render(): JSX.Element {\n let title;\n if (this.state.name || this.state.selected.length) {\n if (this.state.selected.length === 1) {\n title = [\n <span key=\"selected\">\n {I18n.t('ra_Selected')}\n \n </span>,\n <span\n key=\"id\"\n style={{ fontWeight: 'bold', fontStyle: 'italic' }}\n >\n {(this.state.name || this.state.selected[0]) +\n (this.state.name ? ` [${this.state.selected[0]}]` : '')}\n </span>,\n ];\n } else {\n title = [\n <span key=\"selected\">\n {I18n.t('ra_Selected')}\n \n </span>,\n <span\n key=\"id\"\n style={{ fontWeight: 'bold', fontStyle: 'italic' }}\n >\n {I18n.t('%s items', this.state.selected.length.toString())}\n </span>,\n ];\n }\n } else {\n title = this.props.title || I18n.t('ra_Please select object ID...');\n }\n\n return (\n <Dialog\n onClose={() => {}}\n maxWidth={false}\n sx={{\n '& .MuiDialog-paper': {\n height: '95%',\n p: '4px',\n width: '100%',\n maxWidth: '100%',\n maxHeight: 'calc(100% - 16px)',\n },\n }}\n fullWidth\n open={!0}\n aria-labelledby=\"ar_dialog_selectid_title\"\n >\n <DialogTitle\n id=\"ar_dialog_selectid_title\"\n style={{\n whiteSpace: 'nowrap',\n width: 'calc(100% - 72px)',\n overflow: 'hidden',\n display: 'inline-block',\n textOverflow: 'ellipsis',\n }}\n >\n {title}\n </DialogTitle>\n <DialogContent\n style={{\n height: '100%',\n overflow: 'hidden',\n padding: '8px 4px',\n }}\n >\n <ObjectBrowser\n foldersFirst={this.props.foldersFirst}\n imagePrefix={this.props.imagePrefix || this.props.prefix} // prefix is for back compatibility\n dateFormat={this.props.dateFormat}\n defaultFilters={this.filters}\n dialogName={this.dialogName}\n isFloatComma={this.props.isFloatComma}\n showExpertButton={\n this.props.showExpertButton !== undefined ? this.props.showExpertButton : true\n }\n expertMode={this.props.expertMode}\n // style={{ width: '100%', height: '100%' }}\n columns={this.props.columns || ['name', 'type', 'role', 'room', 'func', 'val']}\n types={\n this.props.types\n ? Array.isArray(this.props.types)\n ? this.props.types\n : [this.props.types]\n : ['state']\n }\n root={this.props.root}\n t={I18n.t}\n lang={this.props.lang || I18n.getLanguage()}\n socket={this.props.socket}\n selected={this.state.selected}\n multiSelect={this.props.multiSelect}\n notEditable={this.props.notEditable === undefined ? true : this.props.notEditable}\n // name={this.state.name}\n themeName={this.props.themeName}\n themeType={this.props.themeType}\n theme={this.props.theme}\n customFilter={this.props.customFilter}\n onFilterChanged={(filterConfig: ObjectBrowserFilter) => {\n this.filters = filterConfig;\n ((window as any)._localStorage || window.localStorage).setItem(\n this.dialogName,\n JSON.stringify(filterConfig),\n );\n }}\n onSelect={(_selected: string | string[], name: string, isDouble?: boolean) => {\n let selected: string[];\n if (!Array.isArray(_selected)) {\n selected = [_selected];\n } else {\n selected = _selected;\n }\n if (JSON.stringify(selected) !== JSON.stringify(this.state.selected)) {\n this.setState({ selected, name }, () => isDouble && this.handleOk());\n } else if (isDouble) {\n this.handleOk();\n }\n }}\n filterFunc={this.filterFunc}\n title=\"\"\n classes={{}}\n />\n </DialogContent>\n <DialogActions>\n <Button\n id={`ar_dialog_selectid_ok_${this.props.dialogName || ''}`}\n variant=\"contained\"\n onClick={() => this.handleOk()}\n startIcon={<IconOk />}\n disabled={!this.state.selected.length}\n color=\"primary\"\n >\n {this.props.ok || I18n.t('ra_Ok')}\n </Button>\n <Button\n id={`ar_dialog_selectid_cancel_${this.props.dialogName || ''}`}\n color=\"grey\"\n variant=\"contained\"\n onClick={() => this.handleCancel()}\n startIcon={<IconCancel />}\n >\n {this.props.cancel || I18n.t('ra_Cancel')}\n </Button>\n </DialogActions>\n </Dialog>\n );\n }\n}\n"]}
|
|
@@ -10,10 +10,10 @@ interface DialogCronProps {
|
|
|
10
10
|
interface DialogCronState {
|
|
11
11
|
cron: string;
|
|
12
12
|
}
|
|
13
|
-
declare class DialogSimpleCron extends React.Component<DialogCronProps, DialogCronState> {
|
|
13
|
+
export declare class DialogSimpleCron extends React.Component<DialogCronProps, DialogCronState> {
|
|
14
14
|
constructor(props: DialogCronProps);
|
|
15
15
|
handleCancel(): void;
|
|
16
16
|
handleOk(): void;
|
|
17
17
|
render(): JSX.Element;
|
|
18
18
|
}
|
|
19
|
-
export
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React, {} from 'react';
|
|
2
|
+
import { Button, DialogTitle, DialogContent, DialogActions, Dialog } from '@mui/material';
|
|
3
|
+
import { Check as IconOk, Cancel as IconCancel } from '@mui/icons-material';
|
|
4
|
+
import { SimpleCron } from '../Components/SimpleCron';
|
|
5
|
+
import { I18n } from '../i18n';
|
|
6
|
+
// Generates cron expression
|
|
7
|
+
const styles = {
|
|
8
|
+
dialogPaper: {
|
|
9
|
+
height: 'calc(100% - 96px)',
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
export class DialogSimpleCron extends React.Component {
|
|
13
|
+
constructor(props) {
|
|
14
|
+
super(props);
|
|
15
|
+
let cron;
|
|
16
|
+
if (this.props.cron && typeof this.props.cron === 'string' && this.props.cron.replace(/^["']/, '')[0] !== '{') {
|
|
17
|
+
cron = this.props.cron.replace(/['"]/g, '').trim();
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
cron = this.props.cron || '{}';
|
|
21
|
+
if (typeof cron === 'string') {
|
|
22
|
+
cron = cron.replace(/^["']/, '').replace(/["']\n?$/, '');
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
this.state = {
|
|
26
|
+
cron,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
handleCancel() {
|
|
30
|
+
this.props.onClose();
|
|
31
|
+
}
|
|
32
|
+
handleOk() {
|
|
33
|
+
this.props.onOk(this.state.cron);
|
|
34
|
+
this.props.onClose();
|
|
35
|
+
}
|
|
36
|
+
render() {
|
|
37
|
+
return (React.createElement(Dialog, { onClose: () => { }, maxWidth: "md", fullWidth: true, sx: { '& .MuiDialog-paper': styles.dialogPaper }, open: !0, "aria-labelledby": "cron-dialog-title" },
|
|
38
|
+
React.createElement(DialogTitle, { id: "cron-dialog-title" }, this.props.title || I18n.t('ra_Define CRON...')),
|
|
39
|
+
React.createElement(DialogContent, { style: { height: '100%', overflow: 'hidden' } },
|
|
40
|
+
React.createElement(SimpleCron, { cronExpression: this.state.cron, onChange: (cron) => this.setState({ cron }), language: I18n.getLanguage() })),
|
|
41
|
+
React.createElement(DialogActions, null,
|
|
42
|
+
React.createElement(Button, { variant: "contained", disabled: !this.state.cron || this.state.cron.includes('_'), onClick: () => this.handleOk(), color: "primary", startIcon: React.createElement(IconOk, null) }, this.props.ok || I18n.t('ra_Ok')),
|
|
43
|
+
React.createElement(Button, { variant: "contained", onClick: () => this.handleCancel(), color: "grey", startIcon: React.createElement(IconCancel, null) }, this.props.cancel || I18n.t('ra_Cancel')))));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=SimpleCron.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SimpleCron.js","sourceRoot":"./src/","sources":["Dialogs/SimpleCron.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAY,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE1F,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAE5E,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,4BAA4B;AAE5B,MAAM,MAAM,GAAwC;IAChD,WAAW,EAAE;QACT,MAAM,EAAE,mBAAmB;KAC9B;CACJ,CAAC;AAeF,MAAM,OAAO,gBAAiB,SAAQ,KAAK,CAAC,SAA2C;IACnF,YAAY,KAAsB;QAC9B,KAAK,CAAC,KAAK,CAAC,CAAC;QAEb,IAAI,IAA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C,CAAC,CAAC,mBAAmB,CAAC,CAAe;YACnG,oBAAC,aAAa,IAAC,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE;gBACxD,oBAAC,UAAU,IACP,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EAC/B,QAAQ,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,EACnD,QAAQ,EAAE,IAAI,CAAC,WAAW,EAAE,GAC9B,CACU;YAChB,oBAAC,aAAa;gBACV,oBAAC,MAAM,IACH,OAAO,EAAC,WAAW,EACnB,QAAQ,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAC3D,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,EAC9B,KAAK,EAAC,SAAS,EACf,SAAS,EAAE,oBAAC,MAAM,OAAG,IAEpB,IAAI,CAAC,KAAK,CAAC,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAC5B;gBACT,oBAAC,MAAM,IACH,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,EAClC,KAAK,EAAC,MAAM,EACZ,SAAS,EAAE,oBAAC,UAAU,OAAG,IAExB,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CACpC,CACG,CACX,CACZ,CAAC;IACN,CAAC;CACJ","sourcesContent":["import React, { type JSX } from 'react';\nimport { Button, DialogTitle, DialogContent, DialogActions, Dialog } from '@mui/material';\n\nimport { Check as IconOk, Cancel as IconCancel } from '@mui/icons-material';\n\nimport { SimpleCron } from '../Components/SimpleCron';\n\nimport { I18n } from '../i18n';\n\n// Generates cron expression\n\nconst styles: Record<string, React.CSSProperties> = {\n dialogPaper: {\n height: 'calc(100% - 96px)',\n },\n};\n\ninterface DialogCronProps {\n onClose: () => void;\n onOk: (cron: string) => void;\n title?: string;\n cron?: string;\n cancel?: string;\n ok?: string;\n}\n\ninterface DialogCronState {\n cron: string;\n}\n\nexport class DialogSimpleCron extends React.Component<DialogCronProps, DialogCronState> {\n constructor(props: DialogCronProps) {\n super(props);\n\n let cron;\n if (this.props.cron && typeof this.props.cron === 'string' && this.props.cron.replace(/^[\"']/, '')[0] !== '{') {\n cron = this.props.cron.replace(/['\"]/g, '').trim();\n } else {\n cron = this.props.cron || '{}';\n if (typeof cron === 'string') {\n cron = cron.replace(/^[\"']/, '').replace(/[\"']\\n?$/, '');\n }\n }\n\n this.state = {\n cron,\n };\n }\n\n handleCancel(): void {\n this.props.onClose();\n }\n\n handleOk(): void {\n this.props.onOk(this.state.cron);\n this.props.onClose();\n }\n\n render(): JSX.Element {\n return (\n <Dialog\n onClose={() => {}}\n maxWidth=\"md\"\n fullWidth\n sx={{ '& .MuiDialog-paper': styles.dialogPaper }}\n open={!0}\n aria-labelledby=\"cron-dialog-title\"\n >\n <DialogTitle id=\"cron-dialog-title\">{this.props.title || I18n.t('ra_Define CRON...')}</DialogTitle>\n <DialogContent style={{ height: '100%', overflow: 'hidden' }}>\n <SimpleCron\n cronExpression={this.state.cron}\n onChange={(cron: string) => this.setState({ cron })}\n language={I18n.getLanguage()}\n />\n </DialogContent>\n <DialogActions>\n <Button\n variant=\"contained\"\n disabled={!this.state.cron || this.state.cron.includes('_')}\n onClick={() => this.handleOk()}\n color=\"primary\"\n startIcon={<IconOk />}\n >\n {this.props.ok || I18n.t('ra_Ok')}\n </Button>\n <Button\n variant=\"contained\"\n onClick={() => this.handleCancel()}\n color=\"grey\"\n startIcon={<IconCancel />}\n >\n {this.props.cancel || I18n.t('ra_Cancel')}\n </Button>\n </DialogActions>\n </Dialog>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React, {} from 'react';
|
|
2
|
+
import { Button, TextField, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle } from '@mui/material';
|
|
3
|
+
import { Close as IconClose, Check as IconCheck } from '@mui/icons-material';
|
|
4
|
+
import { I18n } from '../i18n';
|
|
5
|
+
import { withWidth } from '../Components/withWidth';
|
|
6
|
+
function TextInputFunc(props) {
|
|
7
|
+
const [text, setText] = React.useState(props.input || props.value || '');
|
|
8
|
+
const [error, setError] = React.useState('');
|
|
9
|
+
return (React.createElement(Dialog, { open: !0, onClose: () => props.onClose(null), "aria-labelledby": "form-dialog-title", fullWidth: props.fullWidth !== undefined ? props.fullWidth : false },
|
|
10
|
+
React.createElement(DialogTitle, { id: "form-dialog-title" }, props.titleText),
|
|
11
|
+
React.createElement(DialogContent, null,
|
|
12
|
+
React.createElement(DialogContentText, null, props.promptText),
|
|
13
|
+
React.createElement(TextField, { variant: "standard", autoFocus: true, margin: "dense", error: !!error, helperText: error === true || !error ? '' : error, value: text, label: props.labelText || '', type: props.type || 'text', onKeyUp: e => e.code === 'Enter' && text && props.onClose(text), onChange: e => {
|
|
14
|
+
let _error = '';
|
|
15
|
+
if (props.verify) {
|
|
16
|
+
_error = !props.verify(e.target.value);
|
|
17
|
+
}
|
|
18
|
+
if (props.rule) {
|
|
19
|
+
setText(props.rule(e.target.value));
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
setText(e.target.value);
|
|
23
|
+
}
|
|
24
|
+
setError(_error);
|
|
25
|
+
}, fullWidth: true })),
|
|
26
|
+
React.createElement(DialogActions, null,
|
|
27
|
+
React.createElement(Button, { variant: "contained", disabled: !text || !!error, onClick: () => props.onClose(text), color: "primary", startIcon: React.createElement(IconCheck, null) }, props.applyText || I18n.t('ra_Ok')),
|
|
28
|
+
React.createElement(Button, { color: "grey", variant: "contained", onClick: () => props.onClose(null), startIcon: React.createElement(IconClose, null) }, props.cancelText || I18n.t('ra_Cancel')))));
|
|
29
|
+
}
|
|
30
|
+
export const DialogTextInput = withWidth()(TextInputFunc);
|
|
31
|
+
//# sourceMappingURL=TextInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextInput.js","sourceRoot":"./src/","sources":["Dialogs/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAY,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAExH,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAE7E,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AA6BpD,SAAS,aAAa,CAAC,KAAqB;IACxC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAS,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;IACjF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAmB,EAAE,CAAC,CAAC;IAC/D,OAAO,CACH,oBAAC,MAAM,IACH,IAAI,EAAE,CAAC,CAAC,EACR,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,qBAClB,mBAAmB,EACnC,SAAS,EAAE,KAAK,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK;QAElE,oBAAC,WAAW,IAAC,EAAE,EAAC,mBAAmB,IAAE,KAAK,CAAC,SAAS,CAAe;QACnE,oBAAC,aAAa;YACV,oBAAC,iBAAiB,QAAE,KAAK,CAAC,UAAU,CAAqB;YACzD,oBAAC,SAAS,IACN,OAAO,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S,IAAI,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAC9B;YACT,oBAAC,MAAM,IACH,KAAK,EAAC,MAAM,EACZ,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAClC,SAAS,EAAE,oBAAC,SAAS,OAAG,IAEvB,KAAK,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CACnC,CACG,CACX,CACZ,CAAC;AACN,CAAC;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,SAAS,EAAE,CAAC,aAAa,CAAC,CAAC","sourcesContent":["import React, { type JSX } from 'react';\n\nimport { Button, TextField, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle } from '@mui/material';\n\nimport { Close as IconClose, Check as IconCheck } from '@mui/icons-material';\n\nimport { I18n } from '../i18n';\nimport { withWidth } from '../Components/withWidth';\n\ninterface TextInputProps {\n /** The dialog close callback */\n onClose: (text: string | null) => void;\n /** The title text */\n titleText: string;\n /** Prompt text (default: empty) */\n promptText?: string;\n /** Label text (default: empty) */\n labelText?: string;\n /** The text of the cancel button */\n cancelText: string;\n /** The text of the \"apply\" button */\n applyText: string;\n /** The verification callback. Return a non-empty string if there was an error */\n verify?: (text: string) => string;\n /** The text replacement callback */\n rule?: (text: string) => string;\n /** The type of the textbox (default: text) */\n type?: 'text' | 'number' | 'password' | 'email';\n /** The initial input value when opening the dialog */\n value?: string;\n /** @deprecated Use value. The input when opening the dialog */\n input?: string;\n /** If true, the dialog will be full width */\n fullWidth?: boolean;\n}\n\nfunction TextInputFunc(props: TextInputProps): JSX.Element {\n const [text, setText] = React.useState<string>(props.input || props.value || '');\n const [error, setError] = React.useState<string | boolean>('');\n return (\n <Dialog\n open={!0}\n onClose={() => props.onClose(null)}\n aria-labelledby=\"form-dialog-title\"\n fullWidth={props.fullWidth !== undefined ? props.fullWidth : false}\n >\n <DialogTitle id=\"form-dialog-title\">{props.titleText}</DialogTitle>\n <DialogContent>\n <DialogContentText>{props.promptText}</DialogContentText>\n <TextField\n variant=\"standard\"\n autoFocus\n margin=\"dense\"\n error={!!error}\n helperText={error === true || !error ? '' : error}\n value={text}\n label={props.labelText || ''}\n type={props.type || 'text'}\n onKeyUp={e => e.code === 'Enter' && text && props.onClose(text)}\n onChange={e => {\n let _error: string | boolean = '';\n if (props.verify) {\n _error = !props.verify(e.target.value);\n }\n\n if (props.rule) {\n setText(props.rule(e.target.value));\n } else {\n setText(e.target.value);\n }\n setError(_error);\n }}\n fullWidth\n />\n </DialogContent>\n <DialogActions>\n <Button\n variant=\"contained\"\n disabled={!text || !!error}\n onClick={() => props.onClose(text)}\n color=\"primary\"\n startIcon={<IconCheck />}\n >\n {props.applyText || I18n.t('ra_Ok')}\n </Button>\n <Button\n color=\"grey\"\n variant=\"contained\"\n onClick={() => props.onClose(null)}\n startIcon={<IconClose />}\n >\n {props.cancelText || I18n.t('ra_Cancel')}\n </Button>\n </DialogActions>\n </Dialog>\n );\n}\n\nexport const DialogTextInput = withWidth()(TextInputFunc);\n"]}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React, { type JSX } from 'react';
|
|
8
8
|
import { type AdminConnection } from '@iobroker/socket-client';
|
|
9
|
-
import Router from './Components/Router';
|
|
9
|
+
import { Router } from './Components/Router';
|
|
10
10
|
import type { GenericAppProps, GenericAppState, GenericAppSettings, ThemeName, ThemeType, IobTheme, Width } from './types';
|
|
11
11
|
declare global {
|
|
12
12
|
/** If config has been changed */
|
|
@@ -23,7 +23,7 @@ declare global {
|
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
declare class GenericApp<TProps extends GenericAppProps = GenericAppProps, TState extends GenericAppState = GenericAppState> extends Router<TProps, TState> {
|
|
26
|
+
export declare class GenericApp<TProps extends GenericAppProps = GenericAppProps, TState extends GenericAppState = GenericAppState> extends Router<TProps, TState> {
|
|
27
27
|
protected socket: AdminConnection;
|
|
28
28
|
protected readonly instance: number;
|
|
29
29
|
protected readonly adapterName: string;
|
|
@@ -206,4 +206,3 @@ declare class GenericApp<TProps extends GenericAppProps = GenericAppProps, TStat
|
|
|
206
206
|
*/
|
|
207
207
|
render(): React.JSX.Element;
|
|
208
208
|
}
|
|
209
|
-
export default GenericApp;
|