@iobroker/dm-utils 0.6.1 → 0.6.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 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.1 (2024-11-18)
298
+ ### 0.6.2 (2024-11-18)
299
299
 
300
300
  * (@GermanBluefox) Added configurable buttons for form
301
301
 
@@ -1,7 +1,7 @@
1
1
  import type { AdapterInstance } from '@iobroker/adapter-core';
2
2
  import type { ActionContext } from './ActionContext';
3
3
  import type { ProgressDialog } from './ProgressDialog';
4
- import { type DeviceDetails, type DeviceInfo, type ErrorResponse, type InstanceDetails, type JsonFormData, type JsonFormSchema, type RefreshResponse, type RetVal } from './types';
4
+ import { type DeviceDetails, type DeviceInfo, type ErrorResponse, type InstanceDetails, type JsonFormData, type JsonFormSchema, type RefreshResponse, type RetVal, type ActionButton } from './types';
5
5
  import type { ControlState } from './types/base';
6
6
  export declare abstract class DeviceManagement<T extends AdapterInstance = AdapterInstance> {
7
7
  protected readonly adapter: T;
@@ -41,7 +41,8 @@ export declare class MessageContext implements ActionContext {
41
41
  showConfirmation(text: ioBroker.StringOrTranslated): Promise<boolean>;
42
42
  showForm(schema: JsonFormSchema, options?: {
43
43
  data?: JsonFormData;
44
- title?: string;
44
+ title?: ioBroker.StringOrTranslated;
45
+ buttons?: ActionButton[];
45
46
  }): Promise<JsonFormData | undefined>;
46
47
  openProgress(title: string, options?: {
47
48
  indeterminate?: boolean;
@@ -16,7 +16,7 @@ export type ActionButton = {
16
16
  variant?: 'contained' | 'outlined' | 'text';
17
17
  style?: Record<string, number | string>;
18
18
  color: 'primary' | 'secondary';
19
- } | 'ok' | 'cancel';
19
+ } | 'apply' | 'cancel';
20
20
  export type DeviceRefresh = 'device' | 'instance' | false | true;
21
21
  export type RefreshResponse = {
22
22
  refresh: DeviceRefresh;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iobroker/dm-utils",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "ioBroker Device Manager utilities for backend",
5
5
  "main": "build/index.js",
6
6
  "publishConfig": {