@iobroker/dm-utils 3.0.6 → 3.0.7
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 +2 -1
- package/build/types/base.d.ts +10 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -454,8 +454,9 @@ These names are supported for backward compatibility. Prefer the names from the
|
|
|
454
454
|
Placeholder for the next version (at the beginning of the line):
|
|
455
455
|
### **WORK IN PROGRESS**
|
|
456
456
|
-->
|
|
457
|
-
### 3.0.
|
|
457
|
+
### 3.0.7 (2026-03-28)
|
|
458
458
|
- (@GermanBluefox) Added description of icons and the possibility to show an information directly on the card
|
|
459
|
+
- (@GermanBluefox) Added style property for action and control buttons
|
|
459
460
|
|
|
460
461
|
### 3.0.3 (2026-03-26)
|
|
461
462
|
|
package/build/types/base.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export interface ActionBase<T extends ActionType> {
|
|
|
16
16
|
/**
|
|
17
17
|
* This can either be base64 or the URL to an icon.
|
|
18
18
|
*/
|
|
19
|
-
icon?: 'edit' | 'rename' | 'delete' | 'refresh' | 'newDevice' | 'new' | 'add' | 'discover' | 'search' | 'unpairDevice' | 'pairDevice' | 'identify' | 'play' | 'stop' | 'pause' | 'forward' | 'next' | 'rewind' | 'previous' | 'lamp' | 'light' | 'backlight' | 'dimmer' | 'socket' | 'settings' | 'users' | 'group' | 'user' | 'info' | (string & {});
|
|
19
|
+
icon?: 'edit' | 'rename' | 'delete' | 'refresh' | 'newDevice' | 'new' | 'add' | 'discover' | 'search' | 'unpairDevice' | 'pairDevice' | 'identify' | 'play' | 'stop' | 'pause' | 'forward' | 'next' | 'rewind' | 'previous' | 'lamp' | 'light' | 'backlight' | 'dimmer' | 'socket' | 'settings' | 'users' | 'group' | 'user' | 'update' | 'qrcode' | 'info' | 'lines' | 'web' | (string & {});
|
|
20
20
|
description?: ioBroker.StringOrTranslated;
|
|
21
21
|
disabled?: T extends 'api' ? boolean : never;
|
|
22
22
|
color?: Color;
|
|
@@ -47,14 +47,20 @@ export interface ActionBase<T extends ActionType> {
|
|
|
47
47
|
};
|
|
48
48
|
/** Timeout in ms for waiting an answer from backend */
|
|
49
49
|
timeout?: number;
|
|
50
|
+
/** Sx Style for button */
|
|
51
|
+
style?: Record<string, unknown>;
|
|
50
52
|
}
|
|
51
53
|
export interface ChannelInfo {
|
|
52
54
|
name: ioBroker.StringOrTranslated;
|
|
53
55
|
description?: ioBroker.StringOrTranslated;
|
|
56
|
+
/** base64 or url or name */
|
|
54
57
|
icon?: string;
|
|
58
|
+
/** color of name */
|
|
55
59
|
color?: Color;
|
|
56
|
-
|
|
60
|
+
/** Background color of card (you can use primary, secondary or color rgb value or hex) */
|
|
57
61
|
order?: number;
|
|
62
|
+
/** Sx Style for header */
|
|
63
|
+
style?: Record<string, unknown>;
|
|
58
64
|
}
|
|
59
65
|
export interface ControlBase {
|
|
60
66
|
id: string;
|
|
@@ -80,6 +86,8 @@ export interface ControlBase {
|
|
|
80
86
|
color?: Color;
|
|
81
87
|
}[];
|
|
82
88
|
channel?: ChannelInfo;
|
|
89
|
+
/** Sx Style for button */
|
|
90
|
+
style?: Record<string, unknown>;
|
|
83
91
|
}
|
|
84
92
|
export interface DeviceControl<TType extends ActionType = 'api', TId extends DeviceId = DeviceId> extends ControlBase {
|
|
85
93
|
handler?: TType extends 'api' ? never : (deviceId: TId, actionId: string, state: ControlState, context: MessageContext<TId>) => RetVal<ErrorResponse | ioBroker.State>;
|