@iobroker/dm-gui-components 9.0.8 → 9.0.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.
package/README.md CHANGED
@@ -86,7 +86,7 @@ Font Awesome names can be prefixed with `fa-solid` (it is stripped automatically
86
86
  -->
87
87
 
88
88
  ## Changelog
89
- ### 9.0.8 (2026-03-27)
89
+ ### 9.0.9 (2026-03-27)
90
90
  - (@GermanBluefox) Layout improved
91
91
 
92
92
  ### 9.0.7 (2026-03-27)
@@ -4,7 +4,7 @@ import { getTranslation, renderActionIcon } from './Utils';
4
4
  export default function InstanceActionButton(params) {
5
5
  const { action, instanceHandler } = params;
6
6
  const tooltip = getTranslation(action?.description ? action.description : '');
7
- const title = getTranslation(action?.title ? action.title : '');
7
+ const title = getTranslation(action?.title || '');
8
8
  const icon = renderActionIcon(action);
9
9
  return (React.createElement(TooltipButton, { tooltip: tooltip, label: title, disabled: action.disabled, Icon: icon, onClick: instanceHandler(action) }));
10
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"InstanceActionButton.js","sourceRoot":"./src/","sources":["InstanceActionButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAO3D,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,MAAiC;IAC1E,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,CAAC;IAE3C,MAAM,OAAO,GAAG,cAAc,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC9E,MAAM,KAAK,GAAG,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAEhE,MAAM,IAAI,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAEtC,OAAO,CACH,oBAAC,aAAa,IACV,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,MAAM,CAAC,QAAQ,EACzB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,eAAe,CAAC,MAAM,CAAC,GAClC,CACL,CAAC;AACN,CAAC","sourcesContent":["import React from 'react';\n\nimport type { ActionBase, InstanceAction } from './protocol/api';\n\nimport TooltipButton from './TooltipButton';\nimport { getTranslation, renderActionIcon } from './Utils';\n\ninterface InstanceActionButtonProps {\n action: InstanceAction;\n instanceHandler: (action: ActionBase) => () => void;\n}\n\nexport default function InstanceActionButton(params: InstanceActionButtonProps): React.JSX.Element | null {\n const { action, instanceHandler } = params;\n\n const tooltip = getTranslation(action?.description ? action.description : '');\n const title = getTranslation(action?.title ? action.title : '');\n\n const icon = renderActionIcon(action);\n\n return (\n <TooltipButton\n tooltip={tooltip}\n label={title}\n disabled={action.disabled}\n Icon={icon}\n onClick={instanceHandler(action)}\n />\n );\n}\n"]}
1
+ {"version":3,"file":"InstanceActionButton.js","sourceRoot":"./src/","sources":["InstanceActionButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAO3D,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,MAAiC;IAC1E,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,CAAC;IAE3C,MAAM,OAAO,GAAG,cAAc,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC9E,MAAM,KAAK,GAAG,cAAc,CAAC,MAAM,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;IAElD,MAAM,IAAI,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAEtC,OAAO,CACH,oBAAC,aAAa,IACV,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,MAAM,CAAC,QAAQ,EACzB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,eAAe,CAAC,MAAM,CAAC,GAClC,CACL,CAAC;AACN,CAAC","sourcesContent":["import React from 'react';\n\nimport type { ActionBase, InstanceAction } from './protocol/api';\n\nimport TooltipButton from './TooltipButton';\nimport { getTranslation, renderActionIcon } from './Utils';\n\ninterface InstanceActionButtonProps {\n action: InstanceAction;\n instanceHandler: (action: ActionBase) => () => void;\n}\n\nexport default function InstanceActionButton(params: InstanceActionButtonProps): React.JSX.Element | null {\n const { action, instanceHandler } = params;\n\n const tooltip = getTranslation(action?.description ? action.description : '');\n const title = getTranslation(action?.title || '');\n\n const icon = renderActionIcon(action);\n\n return (\n <TooltipButton\n tooltip={tooltip}\n label={title}\n disabled={action.disabled}\n Icon={icon}\n onClick={instanceHandler(action)}\n />\n );\n}\n"]}
@@ -1,18 +1,13 @@
1
1
  import React from 'react';
2
- import { IconButton, Tooltip, Typography } from '@mui/material';
2
+ import { Button, IconButton, Tooltip, Typography } from '@mui/material';
3
3
  export default function TooltipButton(props) {
4
4
  const { tooltip, label, disabled, Icon, onClick, url } = props;
5
- const text = !!label && (React.createElement(Typography, { variant: "button", style: { marginLeft: 4 } }, label));
5
+ const text = label ? (React.createElement(Typography, { variant: "button", style: { marginLeft: 4 } }, label)) : null;
6
6
  const btnProps = url ? { href: url, disabled, target: '_blank' } : { onClick, disabled };
7
7
  if (tooltip) {
8
8
  return (React.createElement(Tooltip, { title: tooltip, slotProps: { popper: { sx: { pointerEvents: 'none' } } } },
9
- React.createElement("span", null,
10
- React.createElement(IconButton, { ...btnProps, size: "small" },
11
- Icon,
12
- text))));
9
+ React.createElement("span", null, text ? (React.createElement(Button, { ...btnProps, startIcon: Icon }, text)) : (React.createElement(IconButton, { ...btnProps, size: "small" }, Icon)))));
13
10
  }
14
- return (React.createElement(IconButton, { ...btnProps, size: "small" },
15
- Icon,
16
- text));
11
+ return text ? (React.createElement(Button, { ...btnProps, startIcon: Icon }, text)) : (React.createElement(IconButton, { ...btnProps, size: "small" }, Icon));
17
12
  }
18
13
  //# sourceMappingURL=TooltipButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TooltipButton.js","sourceRoot":"./src/","sources":["TooltipButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAWhE,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAyB;IAC3D,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC;IAE/D,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,IAAI,CACpB,oBAAC,UAAU,IACP,OAAO,EAAC,QAAQ,EAChB,KAAK,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,IAEvB,KAAK,CACG,CAChB,CAAC;IAEF,MAAM,QAAQ,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;IAEzF,IAAI,OAAO,EAAE,CAAC;QACV,OAAO,CACH,oBAAC,OAAO,IACJ,KAAK,EAAE,OAAO,EACd,SAAS,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,EAAE;YAExD;gBACI,oBAAC,UAAU,OACH,QAAQ,EACZ,IAAI,EAAC,OAAO;oBAEX,IAAI;oBACJ,IAAI,CACI,CACV,CACD,CACb,CAAC;IACN,CAAC;IAED,OAAO,CACH,oBAAC,UAAU,OACH,QAAQ,EACZ,IAAI,EAAC,OAAO;QAEX,IAAI;QACJ,IAAI,CACI,CAChB,CAAC;AACN,CAAC","sourcesContent":["import React from 'react';\nimport { IconButton, Tooltip, Typography } from '@mui/material';\n\ninterface TooltipButtonProps {\n tooltip?: string;\n label?: string;\n disabled?: boolean;\n Icon: React.JSX.Element | null;\n onClick?: () => void;\n url?: string;\n}\n\nexport default function TooltipButton(props: TooltipButtonProps): React.JSX.Element {\n const { tooltip, label, disabled, Icon, onClick, url } = props;\n\n const text = !!label && (\n <Typography\n variant=\"button\"\n style={{ marginLeft: 4 }}\n >\n {label}\n </Typography>\n );\n\n const btnProps = url ? { href: url, disabled, target: '_blank' } : { onClick, disabled };\n\n if (tooltip) {\n return (\n <Tooltip\n title={tooltip}\n slotProps={{ popper: { sx: { pointerEvents: 'none' } } }}\n >\n <span>\n <IconButton\n {...btnProps}\n size=\"small\"\n >\n {Icon}\n {text}\n </IconButton>\n </span>\n </Tooltip>\n );\n }\n\n return (\n <IconButton\n {...btnProps}\n size=\"small\"\n >\n {Icon}\n {text}\n </IconButton>\n );\n}\n"]}
1
+ {"version":3,"file":"TooltipButton.js","sourceRoot":"./src/","sources":["TooltipButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAWxE,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAyB;IAC3D,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC;IAE/D,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CACjB,oBAAC,UAAU,IACP,OAAO,EAAC,QAAQ,EAChB,KAAK,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,IAEvB,KAAK,CACG,CAChB,CAAC,CAAC,CAAC,IAAI,CAAC;IAET,MAAM,QAAQ,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;IAEzF,IAAI,OAAO,EAAE,CAAC;QACV,OAAO,CACH,oBAAC,OAAO,IACJ,KAAK,EAAE,OAAO,EACd,SAAS,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,EAAE;YAExD,kCACK,IAAI,CAAC,CAAC,CAAC,CACJ,oBAAC,MAAM,OACC,QAAQ,EACZ,SAAS,EAAE,IAAI,IAEd,IAAI,CACA,CACZ,CAAC,CAAC,CAAC,CACA,oBAAC,UAAU,OACH,QAAQ,EACZ,IAAI,EAAC,OAAO,IAEX,IAAI,CACI,CAChB,CACE,CACD,CACb,CAAC;IACN,CAAC;IAED,OAAO,IAAI,CAAC,CAAC,CAAC,CACV,oBAAC,MAAM,OACC,QAAQ,EACZ,SAAS,EAAE,IAAI,IAEd,IAAI,CACA,CACZ,CAAC,CAAC,CAAC,CACA,oBAAC,UAAU,OACH,QAAQ,EACZ,IAAI,EAAC,OAAO,IAEX,IAAI,CACI,CAChB,CAAC;AACN,CAAC","sourcesContent":["import React from 'react';\nimport { Button, IconButton, Tooltip, Typography } from '@mui/material';\n\ninterface TooltipButtonProps {\n tooltip?: string;\n label?: string;\n disabled?: boolean;\n Icon: React.JSX.Element | null;\n onClick?: () => void;\n url?: string;\n}\n\nexport default function TooltipButton(props: TooltipButtonProps): React.JSX.Element {\n const { tooltip, label, disabled, Icon, onClick, url } = props;\n\n const text = label ? (\n <Typography\n variant=\"button\"\n style={{ marginLeft: 4 }}\n >\n {label}\n </Typography>\n ) : null;\n\n const btnProps = url ? { href: url, disabled, target: '_blank' } : { onClick, disabled };\n\n if (tooltip) {\n return (\n <Tooltip\n title={tooltip}\n slotProps={{ popper: { sx: { pointerEvents: 'none' } } }}\n >\n <span>\n {text ? (\n <Button\n {...btnProps}\n startIcon={Icon}\n >\n {text}\n </Button>\n ) : (\n <IconButton\n {...btnProps}\n size=\"small\"\n >\n {Icon}\n </IconButton>\n )}\n </span>\n </Tooltip>\n );\n }\n\n return text ? (\n <Button\n {...btnProps}\n startIcon={Icon}\n >\n {text}\n </Button>\n ) : (\n <IconButton\n {...btnProps}\n size=\"small\"\n >\n {Icon}\n </IconButton>\n );\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iobroker/dm-gui-components",
3
- "version": "9.0.8",
3
+ "version": "9.0.9",
4
4
  "description": "ReactJS components to develop admin interface for ioBroker device manager.",
5
5
  "author": {
6
6
  "name": "Jey Cee",
@@ -59,7 +59,7 @@
59
59
  "@alcalzone/release-script": "^5.1.1",
60
60
  "@alcalzone/release-script-plugin-license": "^5.1.1",
61
61
  "@iobroker/build-tools": "^3.0.1",
62
- "@iobroker/dm-utils": "^3.0.5",
62
+ "@iobroker/dm-utils": "^3.0.6",
63
63
  "@iobroker/dm-utils-v1": "npm:@iobroker/dm-utils@^1.0.16",
64
64
  "@iobroker/eslint-config": "^2.2.0",
65
65
  "tsc-alias": "^1.8.16",