@iobroker/gui-components 10.3.7 → 10.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/README.md +7 -1
  2. package/build/Components/ObjectBrowser/ObjectBrowserClass.d.ts +9 -0
  3. package/build/Components/ObjectBrowser/ObjectBrowserClass.js +30 -0
  4. package/build/Components/ObjectBrowser/ObjectBrowserClass.js.map +1 -1
  5. package/build/Components/ObjectBrowser/contextMenu.js +18 -2
  6. package/build/Components/ObjectBrowser/contextMenu.js.map +1 -1
  7. package/build/Components/ObjectBrowser/dialogs.d.ts +10 -0
  8. package/build/Components/ObjectBrowser/dialogs.js +80 -21
  9. package/build/Components/ObjectBrowser/dialogs.js.map +1 -1
  10. package/build/Components/ObjectBrowser/styles.js +3 -0
  11. package/build/Components/ObjectBrowser/styles.js.map +1 -1
  12. package/build/Components/ObjectBrowser/types.d.ts +8 -0
  13. package/build/Components/ObjectBrowser/utils.d.ts +11 -0
  14. package/build/Components/ObjectBrowser/utils.js +17 -0
  15. package/build/Components/ObjectBrowser/utils.js.map +1 -1
  16. package/build/i18n/de.json +3 -0
  17. package/build/i18n/en.json +3 -0
  18. package/build/i18n/es.json +3 -0
  19. package/build/i18n/fr.json +3 -0
  20. package/build/i18n/it.json +3 -0
  21. package/build/i18n/nl.json +3 -0
  22. package/build/i18n/pl.json +3 -0
  23. package/build/i18n/pt.json +3 -0
  24. package/build/i18n/ru.json +3 -0
  25. package/build/i18n/uk.json +3 -0
  26. package/build/i18n/zh-cn.json +3 -0
  27. package/i18n/de.json +3 -0
  28. package/i18n/en.json +3 -0
  29. package/i18n/es.json +3 -0
  30. package/i18n/fr.json +3 -0
  31. package/i18n/it.json +3 -0
  32. package/i18n/nl.json +3 -0
  33. package/i18n/pl.json +3 -0
  34. package/i18n/pt.json +3 -0
  35. package/i18n/ru.json +3 -0
  36. package/i18n/uk.json +3 -0
  37. package/i18n/zh-cn.json +3 -0
  38. package/package.json +1 -1
@@ -3,6 +3,23 @@ import { Box, FormControl, IconButton, Input, MenuItem, Select } from '@mui/mate
3
3
  import SVG from 'react-inlinesvg';
4
4
  import { Description as IconMeta, PersonOutlined as IconUser, Router as IconHost, SupervisedUserCircle as IconGroup, SettingsApplications as IconSystem, DataObject as IconData, Info as IconInfo, Link as IconLink, Close as IconClose, Wifi as IconConnection, } from '@mui/icons-material';
5
5
  import { Utils } from '../Utils';
6
+ /**
7
+ * Calls `onConfirm` if CTRL+ENTER (CMD+ENTER on mac) was pressed.
8
+ *
9
+ * Every dialog that writes something confirms with CTRL+ENTER, so the handler belongs to the dialog
10
+ * itself and not to one of its inputs: the key then works wherever the focus is. An input that
11
+ * handles the combination on its own stops the event, so nothing is written twice.
12
+ *
13
+ * @param e the keyboard event of the dialog
14
+ * @param onConfirm the action of the confirming button of the dialog
15
+ */
16
+ export function onCtrlEnter(e, onConfirm) {
17
+ if ((e.ctrlKey || e.metaKey) && e.key === 'Enter') {
18
+ e.preventDefault();
19
+ e.stopPropagation();
20
+ onConfirm();
21
+ }
22
+ }
6
23
  export const ICON_SIZE = 24;
7
24
  export const ROW_HEIGHT = 32;
8
25
  export const COLOR_NAME_USERDATA = (themeType) => (themeType === 'dark' ? '#62ff25' : '#37c400');