@iobroker/gui-components 10.2.0 → 10.2.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 +16 -1
- package/build/Components/ColorPicker.d.ts +94 -12
- package/build/Components/ColorPicker.js +567 -111
- package/build/Components/ColorPicker.js.map +1 -1
- package/build/Components/ObjectBrowser/ObjectBrowserClass.d.ts +17 -1
- package/build/Components/ObjectBrowser/ObjectBrowserClass.js +99 -36
- package/build/Components/ObjectBrowser/ObjectBrowserClass.js.map +1 -1
- package/build/Components/ObjectBrowser/dialogs.js +14 -5
- package/build/Components/ObjectBrowser/dialogs.js.map +1 -1
- package/build/Components/ObjectBrowser/renderLeaf.js +29 -10
- package/build/Components/ObjectBrowser/renderLeaf.js.map +1 -1
- package/build/Components/ObjectBrowser/toolbar.js +11 -10
- package/build/Components/ObjectBrowser/toolbar.js.map +1 -1
- package/build/Components/Schedule.js +176 -78
- package/build/Components/Schedule.js.map +1 -1
- package/build/Components/TreeTable.d.ts +6 -2
- package/build/Components/TreeTable.js +183 -103
- package/build/Components/TreeTable.js.map +1 -1
- package/build/Dialogs/Error.js +26 -5
- package/build/Dialogs/Error.js.map +1 -1
- package/build/i18n/de.json +20 -0
- package/build/i18n/en.json +20 -0
- package/build/i18n/es.json +20 -0
- package/build/i18n/fr.json +20 -0
- package/build/i18n/it.json +20 -0
- package/build/i18n/nl.json +20 -0
- package/build/i18n/pl.json +20 -0
- package/build/i18n/pt.json +20 -0
- package/build/i18n/ru.json +20 -0
- package/build/i18n/uk.json +20 -0
- package/build/i18n/zh-cn.json +20 -0
- package/build/index.d.ts +2 -1
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/i18n/de.json +20 -0
- package/i18n/en.json +20 -0
- package/i18n/es.json +20 -0
- package/i18n/fr.json +20 -0
- package/i18n/it.json +20 -0
- package/i18n/nl.json +20 -0
- package/i18n/pl.json +20 -0
- package/i18n/pt.json +20 -0
- package/i18n/ru.json +20 -0
- package/i18n/uk.json +20 -0
- package/i18n/zh-cn.json +20 -0
- package/package.json +10 -12
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.2.
|
|
39
|
+
"@iobroker/gui-components": "^10.2.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,21 @@ You can find the migration instructions:
|
|
|
877
877
|
-->
|
|
878
878
|
|
|
879
879
|
## Changelog
|
|
880
|
+
### 10.2.2 (2026-09-03)
|
|
881
|
+
|
|
882
|
+
- (@GermanBluefox) Fixed: the object browser lost the column widths as soon as the page was left and opened again. Every width class has its own widths, and the stored ones were written into the class that was guessed before the container was measured, so the table fell back to the defaults of the class it really had: https://github.com/ioBroker/ioBroker.admin/issues/3616
|
|
883
|
+
- (@GermanBluefox) Fixed: after reopening the object browser, the next resize stored only the two columns it touched and dropped every other width the user had set
|
|
884
|
+
- (@GermanBluefox) Fixed: with "Auto" switched off, the checkboxes for "Changed from", "Quality code", "Timestamp" and "Last change" had no effect, and the header of the states view showed those columns although the rows had no cells for them
|
|
885
|
+
- (@GermanBluefox) Fixed: the buttons column could not be resized, as neither it nor the value column in front of it had a resize handle
|
|
886
|
+
- (@GermanBluefox) Fixed: switching "Auto" off did not store the column selection, so after a reload the table showed nothing but the ID column
|
|
887
|
+
- (@GermanBluefox) A double click on a resize handle resets the widths of all width classes now, not only of the current one
|
|
888
|
+
|
|
889
|
+
### 10.2.1 (2026-08-31)
|
|
890
|
+
|
|
891
|
+
- (@GermanBluefox) Changed layouts for some components
|
|
892
|
+
- (@GermanBluefox) Color picker was updated
|
|
893
|
+
- (@GermanBluefox) Schedule wizard was updated
|
|
894
|
+
|
|
880
895
|
### 10.2.0 (2026-08-26)
|
|
881
896
|
|
|
882
897
|
- (@krobipd) Corrected: the object browser stayed empty after closing the object customization dialog if any object was changed while the dialog was open (ioBroker/ioBroker.admin#3391)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2018-
|
|
2
|
+
* Copyright 2018-2026 Denis Haev (bluefox) <dogafox@gmail.com>
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Creative Commons Attribution-NonCommercial License, Version 4.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -14,8 +14,36 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import React, { Component, type CSSProperties } from 'react';
|
|
17
|
-
import { type
|
|
17
|
+
import { type RgbaColor } from 'react-colorful';
|
|
18
18
|
import type { IobTheme } from '../types';
|
|
19
|
+
/** Color in the `{ r, g, b, a }` notation. Kept for backwards compatibility with `react-color`. */
|
|
20
|
+
export interface RGBColor {
|
|
21
|
+
r: number;
|
|
22
|
+
g: number;
|
|
23
|
+
b: number;
|
|
24
|
+
a?: number;
|
|
25
|
+
}
|
|
26
|
+
/** Notation used for the value that is reported via `onChange`. */
|
|
27
|
+
export type ColorPickerFormat = 'hex' | 'rgb' | 'hsl';
|
|
28
|
+
/**
|
|
29
|
+
* Parse any CSS color notation into `{ r, g, b, a }`.
|
|
30
|
+
*
|
|
31
|
+
* Supported are `#rgb`, `#rgba`, `#rrggbb`, `#rrggbbaa`, `rgb()`, `rgba()`, `hsl()`, `hsla()` (comma or space
|
|
32
|
+
* separated, with or without the `/ alpha` part) and every color name the browser knows.
|
|
33
|
+
*
|
|
34
|
+
* @param color The color string to parse.
|
|
35
|
+
* @returns the parsed color or null if the string could not be interpreted.
|
|
36
|
+
*/
|
|
37
|
+
export declare function parseColor(color: string): RgbaColor | null;
|
|
38
|
+
/**
|
|
39
|
+
* Render `{ r, g, b, a }` in the requested notation.
|
|
40
|
+
*
|
|
41
|
+
* @param color The color to render.
|
|
42
|
+
* @param format The desired notation.
|
|
43
|
+
* @param noAlpha If true, the alpha channel is dropped.
|
|
44
|
+
* @returns the color as CSS string.
|
|
45
|
+
*/
|
|
46
|
+
export declare function formatColor(color: RgbaColor, format: ColorPickerFormat, noAlpha?: boolean): string;
|
|
19
47
|
interface ColorPickerProps {
|
|
20
48
|
/** Set to true to disable the color picker. */
|
|
21
49
|
disabled?: boolean;
|
|
@@ -33,19 +61,38 @@ interface ColorPickerProps {
|
|
|
33
61
|
style?: CSSProperties;
|
|
34
62
|
/** The CSS class name. */
|
|
35
63
|
className?: string;
|
|
64
|
+
/** Predefined colors that are offered below the picker. */
|
|
36
65
|
customPalette?: string[];
|
|
66
|
+
/** Do not show the text field with the color value, only the color bar. */
|
|
37
67
|
noInputField?: boolean;
|
|
68
|
+
/** Width of the color bar. */
|
|
38
69
|
barWidth?: number;
|
|
39
70
|
sx?: Record<string, any>;
|
|
71
|
+
/** @deprecated the theme is taken from the MUI context */
|
|
40
72
|
theme?: IobTheme;
|
|
73
|
+
/** Hide the alpha slider and always report a fully opaque color. */
|
|
74
|
+
noAlpha?: boolean;
|
|
75
|
+
/** Notation of the reported value. If not set, it is taken from the incoming value and defaults to `rgb`. */
|
|
76
|
+
format?: ColorPickerFormat;
|
|
77
|
+
/** Do not offer the recently used colors. */
|
|
78
|
+
noRecentColors?: boolean;
|
|
79
|
+
/** Width of the picker popup in pixels. Default 280. */
|
|
80
|
+
pickerWidth?: number;
|
|
81
|
+
/** ID of the text field. Must be set if more than one color picker is rendered at the same time. */
|
|
82
|
+
id?: string;
|
|
41
83
|
}
|
|
42
84
|
interface ColorPickerState {
|
|
43
85
|
displayColorPicker: boolean;
|
|
44
|
-
color
|
|
86
|
+
/** The working color of the picker. Always valid, even if no color is selected. */
|
|
87
|
+
rgba: RgbaColor;
|
|
88
|
+
/** The text shown in the input field. An empty string means "no color selected". */
|
|
89
|
+
textValue: string;
|
|
90
|
+
format: ColorPickerFormat;
|
|
45
91
|
anchorEl: HTMLDivElement | null;
|
|
92
|
+
recentColors: string[];
|
|
46
93
|
}
|
|
47
94
|
/**
|
|
48
|
-
* A color picker component.
|
|
95
|
+
* A color picker component with alpha channel, eye dropper and HEX/RGB/HSL notations.
|
|
49
96
|
*/
|
|
50
97
|
export declare class ColorPicker extends Component<ColorPickerProps, ColorPickerState> {
|
|
51
98
|
/**
|
|
@@ -54,8 +101,12 @@ export declare class ColorPicker extends Component<ColorPickerProps, ColorPicker
|
|
|
54
101
|
* @param props The properties.
|
|
55
102
|
*/
|
|
56
103
|
constructor(props: ColorPickerProps);
|
|
57
|
-
|
|
58
|
-
|
|
104
|
+
/**
|
|
105
|
+
* If the props are updated from outside, they should override the state
|
|
106
|
+
*
|
|
107
|
+
* @param prevProps The previous properties.
|
|
108
|
+
*/
|
|
109
|
+
componentDidUpdate(prevProps: ColorPickerProps): void;
|
|
59
110
|
/**
|
|
60
111
|
* Convert the given color to hex ('#rrggbb') or rgba ('rgba(r,g,b,a)') format.
|
|
61
112
|
*
|
|
@@ -72,15 +123,46 @@ export declare class ColorPicker extends Component<ColorPickerProps, ColorPicker
|
|
|
72
123
|
* @param rgb The color in rgb() or rgba() format. if not in this format, the color will be returned as is.
|
|
73
124
|
*/
|
|
74
125
|
static rgb2hex(rgb: string): string;
|
|
75
|
-
private handleChange;
|
|
76
126
|
/**
|
|
77
|
-
*
|
|
127
|
+
* Read the recently used colors from the local storage.
|
|
128
|
+
*/
|
|
129
|
+
static readRecentColors(): string[];
|
|
130
|
+
/**
|
|
131
|
+
* Remember the given color as recently used.
|
|
132
|
+
*
|
|
133
|
+
* @param color The color to remember.
|
|
134
|
+
*/
|
|
135
|
+
storeRecentColor(color: string): void;
|
|
136
|
+
private handleClick;
|
|
137
|
+
private handleClose;
|
|
138
|
+
/**
|
|
139
|
+
* The user moved a slider, clicked a swatch or used the eye dropper.
|
|
140
|
+
*
|
|
141
|
+
* @param rgba The new color.
|
|
142
|
+
*/
|
|
143
|
+
private handleColorChange;
|
|
144
|
+
/**
|
|
145
|
+
* The user typed into the input field. The text is taken as it is and only parsed for the preview.
|
|
146
|
+
*
|
|
147
|
+
* @param textValue The entered text.
|
|
148
|
+
*/
|
|
149
|
+
private handleTextChange;
|
|
150
|
+
/**
|
|
151
|
+
* Switch between the #rrggbb, rgba() and hsla() notations.
|
|
152
|
+
*
|
|
153
|
+
* @param format The new notation.
|
|
154
|
+
*/
|
|
155
|
+
private handleFormatChange;
|
|
156
|
+
private handleClear;
|
|
157
|
+
private handleEyeDropper;
|
|
158
|
+
/**
|
|
159
|
+
* Render a row of predefined colors.
|
|
78
160
|
*
|
|
79
|
-
* @param
|
|
80
|
-
* @param
|
|
161
|
+
* @param colors The colors to show.
|
|
162
|
+
* @param title The title above the row.
|
|
81
163
|
*/
|
|
82
|
-
|
|
83
|
-
|
|
164
|
+
renderSwatches(colors: string[], title: string): React.JSX.Element | null;
|
|
165
|
+
renderPicker(): React.JSX.Element;
|
|
84
166
|
render(): React.JSX.Element;
|
|
85
167
|
}
|
|
86
168
|
export {};
|