@iobroker/gui-components 10.3.0 → 10.3.2
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 +9 -1
- package/build/Components/ObjectBrowser/renderLeaf.js +80 -69
- package/build/Components/ObjectBrowser/renderLeaf.js.map +1 -1
- package/build/Components/ObjectBrowser/styles.js +78 -11
- package/build/Components/ObjectBrowser/styles.js.map +1 -1
- package/build/i18n/de.json +1 -0
- package/build/i18n/en.json +1 -0
- package/build/i18n/es.json +1 -0
- package/build/i18n/fr.json +1 -0
- package/build/i18n/it.json +1 -0
- package/build/i18n/nl.json +1 -0
- package/build/i18n/pl.json +1 -0
- package/build/i18n/pt.json +1 -0
- package/build/i18n/ru.json +1 -0
- package/build/i18n/uk.json +1 -0
- package/build/i18n/zh-cn.json +1 -0
- package/i18n/de.json +1 -0
- package/i18n/en.json +1 -0
- package/i18n/es.json +1 -0
- package/i18n/fr.json +1 -0
- package/i18n/it.json +1 -0
- package/i18n/nl.json +1 -0
- package/i18n/pl.json +1 -0
- package/i18n/pt.json +1 -0
- package/i18n/ru.json +1 -0
- package/i18n/uk.json +1 -0
- package/i18n/zh-cn.json +1 -0
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ npm create vite@latest src -- --template react-ts
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@emotion/react": "^11.14.0",
|
|
38
38
|
"@emotion/styled": "^11.14.1",
|
|
39
|
-
"@iobroker/gui-components": "^10.3.
|
|
39
|
+
"@iobroker/gui-components": "^10.3.2",
|
|
40
40
|
"@mui/icons-material": "^9.0.1",
|
|
41
41
|
"@mui/material": "^9.0.1",
|
|
42
42
|
"react": "^19.2.5",
|
|
@@ -877,6 +877,14 @@ You can find the migration instructions:
|
|
|
877
877
|
-->
|
|
878
878
|
|
|
879
879
|
## Changelog
|
|
880
|
+
### 10.3.2 (2026-09-22)
|
|
881
|
+
|
|
882
|
+
- (@GermanBluefox) Updated packages
|
|
883
|
+
|
|
884
|
+
### 10.3.1 (2026-09-15)
|
|
885
|
+
|
|
886
|
+
- (@GermanBluefox) Changed: the details of the selected object in the narrow view of the object browser were reworked - theme colors, the full ID with a copy button, a dash for empty values and buttons with tooltips
|
|
887
|
+
|
|
880
888
|
### 10.3.0 (2026-09-14)
|
|
881
889
|
|
|
882
890
|
- (@GermanBluefox) Added: the icon selector offers a library of 448 icons for rooms, buildings, furniture, lighting, climate, windows and shading, security, energy, water, household appliances, multimedia, garden, weather, people and more. Every icon has a name in all 11 languages, and the search looks through all categories. The icons are taken from Material Design Icons (Apache License 2.0), painted with `currentColor` and loaded only when the dialog is opened. The classic room and device icons stay available as their own categories
|
|
@@ -842,7 +842,7 @@ export function renderLeaf(that, item, isExpanded, counter) {
|
|
|
842
842
|
};
|
|
843
843
|
let colValue = showValueCell ? (React.createElement("div", { style: {
|
|
844
844
|
...styles.cellValue,
|
|
845
|
-
width: that.width !== 'xs' ? colWidth('val') : '
|
|
845
|
+
width: that.width !== 'xs' ? colWidth('val') : '100%',
|
|
846
846
|
// An empty inline-block has no height, so a state without a value would offer nothing
|
|
847
847
|
// to tap on in the narrow details view.
|
|
848
848
|
minHeight: narrowStyleWithDetails ? 20 : undefined,
|
|
@@ -904,80 +904,91 @@ export function renderLeaf(that, item, isExpanded, counter) {
|
|
|
904
904
|
width: that.width !== 'xs' ? colWidth('buttons') : undefined,
|
|
905
905
|
} }, renderColumnButtons(that, id, item))) : null;
|
|
906
906
|
let colDetails = null;
|
|
907
|
-
if (
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
}
|
|
931
|
-
if (!colCustom.length) {
|
|
907
|
+
if (narrowStyleWithDetails) {
|
|
908
|
+
/** Texts of the middle columns: the cells are always rendered, so an empty one must be detected here */
|
|
909
|
+
const middleTexts = {
|
|
910
|
+
filter_type: obj?.type,
|
|
911
|
+
filter_role: common?.role,
|
|
912
|
+
filter_room: item.data.rooms,
|
|
913
|
+
filter_func: item.data.funcs,
|
|
914
|
+
};
|
|
915
|
+
const editTitles = {
|
|
916
|
+
filter_role: 'ra_Edit role',
|
|
917
|
+
filter_room: 'ra_Edit room',
|
|
918
|
+
filter_func: 'ra_Edit function',
|
|
919
|
+
};
|
|
920
|
+
/** One line of the details: the label, the value (or a dash) and the buttons for it */
|
|
921
|
+
const detailsLine = (key, label, value, actions = []) => (React.createElement("div", { key: key, style: styles.cellDetailsLine },
|
|
922
|
+
React.createElement("span", { style: styles.cellDetailsName }, label),
|
|
923
|
+
React.createElement(Box, { sx: styles.cellDetailsValue }, value || React.createElement("span", { style: styles.cellDetailsEmpty }, "\u2013")),
|
|
924
|
+
actions.map(action => (React.createElement(Tooltip, { key: action.title, title: action.title, slotProps: { popper: { sx: styles.tooltip } } },
|
|
925
|
+
React.createElement(IconButton, { size: "small", sx: styles.cellDetailsButton, onClick: action.onClick }, action.icon))))));
|
|
926
|
+
const copyTitle = that.props.t('ra_Copy to clipboard');
|
|
927
|
+
const copyIcon = React.createElement(IconCopy, { style: styles.cellDetailsIcon });
|
|
928
|
+
const editIcon = React.createElement(IconEdit, { style: styles.cellDetailsIcon });
|
|
929
|
+
if (!colCustom?.length) {
|
|
932
930
|
colCustom = null;
|
|
933
931
|
}
|
|
932
|
+
// a folder without an object has nothing but its ID, so the header does not need a separator then
|
|
933
|
+
const hasLines = !!colName || !!colMiddle?.some(it => it) || !!colCustom || that.objects[id]?.type === 'state';
|
|
934
934
|
colDetails = (React.createElement(Paper
|
|
935
935
|
// `renderItem` pushes this panel into the array of rows, so it needs its own key
|
|
936
936
|
, {
|
|
937
937
|
// `renderItem` pushes this panel into the array of rows, so it needs its own key
|
|
938
|
-
key: `details_${id}`,
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
938
|
+
key: `details_${id}`, elevation: 0, sx: styles.cellDetails },
|
|
939
|
+
React.createElement("div", { style: {
|
|
940
|
+
...styles.cellDetailsHeader,
|
|
941
|
+
...(hasLines ? styles.cellDetailsHeaderWithLines : undefined),
|
|
942
|
+
} },
|
|
943
|
+
React.createElement(Box, { sx: styles.cellDetailsId }, id),
|
|
944
|
+
React.createElement(Tooltip, { title: copyTitle, slotProps: { popper: { sx: styles.tooltip } } },
|
|
945
|
+
React.createElement(IconButton, { size: "small", sx: styles.cellDetailsButton, onClick: e => that.onCopy(e, id) }, copyIcon))),
|
|
946
|
+
colName
|
|
947
|
+
? detailsLine('name', that.texts.name, colName, item.data?.title
|
|
948
|
+
? [{ title: copyTitle, icon: copyIcon, onClick: e => that.onCopy(e, item.data?.title) }]
|
|
949
|
+
: [])
|
|
950
|
+
: null,
|
|
951
|
+
colMiddle?.map(it => it
|
|
952
|
+
? detailsLine(it.type, that.texts[it.type], it.type in middleTexts && !middleTexts[it.type] ? null : it.el, it.onClick
|
|
953
|
+
? [
|
|
954
|
+
{
|
|
955
|
+
title: that.props.t(editTitles[it.type] || 'ra_Edit'),
|
|
956
|
+
icon: editIcon,
|
|
957
|
+
onClick: () => it.onClick?.(),
|
|
958
|
+
},
|
|
959
|
+
]
|
|
960
|
+
: [])
|
|
961
|
+
: null),
|
|
962
|
+
colCustom ? React.createElement("div", { style: styles.cellDetailsLine }, colCustom) : null,
|
|
963
|
+
that.objects[id]?.type === 'state'
|
|
964
|
+
? // an editable state without value has its own edit button here, so show a dash instead of the empty cell
|
|
965
|
+
detailsLine('value', that.texts.value, columnValue ? colValue : null, [
|
|
966
|
+
{
|
|
967
|
+
title: that.texts.copyState,
|
|
968
|
+
icon: copyIcon,
|
|
969
|
+
onClick: e => {
|
|
970
|
+
const { valText } = formatValue({
|
|
971
|
+
state: that.states[id],
|
|
972
|
+
obj: that.objects[id],
|
|
973
|
+
texts: that.texts,
|
|
974
|
+
dateFormat: that.props.dateFormat ||
|
|
975
|
+
that.systemConfig?.common.dateFormat ||
|
|
976
|
+
DEFAULT_DATE_FORMAT,
|
|
977
|
+
isFloatComma: that.props.isFloatComma === undefined
|
|
978
|
+
? (that.systemConfig?.common.isFloatComma ?? true)
|
|
979
|
+
: that.props.isFloatComma,
|
|
980
|
+
});
|
|
981
|
+
that.onCopy(e, valText.c !== undefined ? valText.c : valText.v.toString());
|
|
982
|
+
},
|
|
983
|
+
},
|
|
984
|
+
// Tapping the value itself only works when there is something to tap on -
|
|
985
|
+
// a state that was never written renders nothing
|
|
986
|
+
...(valueEditable
|
|
987
|
+
? [{ title: that.props.t('ra_Edit value'), icon: editIcon, onClick: editValue }]
|
|
988
|
+
: []),
|
|
989
|
+
])
|
|
990
|
+
: null,
|
|
991
|
+
colButtons ? React.createElement(Box, { sx: styles.cellDetailsButtons }, colButtons) : null));
|
|
981
992
|
colName = null;
|
|
982
993
|
colMiddle = null;
|
|
983
994
|
colCustom = null;
|