@iobroker/dm-utils 0.6.4 → 0.6.6

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
@@ -295,7 +295,7 @@ This method returns a promise that resolves to a `ProgressDialog` object.
295
295
  ### **WORK IN PROGRESS**
296
296
  -->
297
297
  ## Changelog
298
- ### 0.6.4 (2024-11-18)
298
+ ### 0.6.6 (2024-11-18)
299
299
 
300
300
  * (@GermanBluefox) Added configurable buttons for form
301
301
 
@@ -6,7 +6,7 @@ export interface ActionContext {
6
6
  showForm(schema: JsonFormSchema, options?: {
7
7
  data?: JsonFormData;
8
8
  title?: ioBroker.StringOrTranslated;
9
- buttons?: ActionButton[];
9
+ buttons?: (ActionButton | 'apply' | 'cancel')[];
10
10
  }): Promise<JsonFormData | undefined>;
11
11
  openProgress(title: string, options?: {
12
12
  indeterminate?: boolean;
@@ -42,7 +42,7 @@ export declare class MessageContext implements ActionContext {
42
42
  showForm(schema: JsonFormSchema, options?: {
43
43
  data?: JsonFormData;
44
44
  title?: ioBroker.StringOrTranslated;
45
- buttons?: ActionButton[];
45
+ buttons?: (ActionButton | 'apply' | 'cancel')[];
46
46
  }): Promise<JsonFormData | undefined>;
47
47
  openProgress(title: string, options?: {
48
48
  indeterminate?: boolean;
@@ -4,7 +4,7 @@ export type DeviceStatus = 'connected' | 'disconnected' | {
4
4
  * This can either be the name of a font awesome icon (e.g. "fa-signal") or the URL to an icon.
5
5
  */
6
6
  icon?: string;
7
- battery?: number | boolean | 'charging';
7
+ battery?: number | boolean | 'charging' | string;
8
8
  connection?: 'connected' | 'disconnected';
9
9
  rssi?: number;
10
10
  warning?: ioBroker.StringOrTranslated | boolean;
@@ -17,7 +17,7 @@ export type ActionButton = {
17
17
  variant?: 'contained' | 'outlined' | 'text';
18
18
  style?: Record<string, number | string>;
19
19
  color?: 'primary' | 'secondary';
20
- } | 'apply' | 'cancel';
20
+ };
21
21
  export type DeviceRefresh = 'device' | 'instance' | false | true;
22
22
  export type RefreshResponse = {
23
23
  refresh: DeviceRefresh;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iobroker/dm-utils",
3
- "version": "0.6.4",
3
+ "version": "0.6.6",
4
4
  "description": "ioBroker Device Manager utilities for backend",
5
5
  "main": "build/index.js",
6
6
  "publishConfig": {