@iobroker/dm-utils 0.6.0 → 0.6.1
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 +4 -0
- package/build/ActionContext.d.ts +2 -1
- package/build/types/common.d.ts +8 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -295,6 +295,10 @@ 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)
|
|
299
|
+
|
|
300
|
+
* (@GermanBluefox) Added configurable buttons for form
|
|
301
|
+
|
|
298
302
|
### 0.6.0 (2024-11-17)
|
|
299
303
|
|
|
300
304
|
* (@GermanBluefox) used new ioBroker/eslint-config lib and changed prettifier settings
|
package/build/ActionContext.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JsonFormData, JsonFormSchema } from '.';
|
|
1
|
+
import type { ActionButton, JsonFormData, JsonFormSchema } from '.';
|
|
2
2
|
import type { ProgressDialog } from './ProgressDialog';
|
|
3
3
|
export interface ActionContext {
|
|
4
4
|
showMessage(text: ioBroker.StringOrTranslated): Promise<void>;
|
|
@@ -6,6 +6,7 @@ export interface ActionContext {
|
|
|
6
6
|
showForm(schema: JsonFormSchema, options?: {
|
|
7
7
|
data?: JsonFormData;
|
|
8
8
|
title?: ioBroker.StringOrTranslated;
|
|
9
|
+
buttons?: ActionButton[];
|
|
9
10
|
}): Promise<JsonFormData | undefined>;
|
|
10
11
|
openProgress(title: string, options?: {
|
|
11
12
|
indeterminate?: boolean;
|
package/build/types/common.d.ts
CHANGED
|
@@ -9,6 +9,14 @@ export type DeviceStatus = 'connected' | 'disconnected' | {
|
|
|
9
9
|
rssi?: number;
|
|
10
10
|
warning?: ioBroker.StringOrTranslated | boolean;
|
|
11
11
|
};
|
|
12
|
+
export type ActionButton = {
|
|
13
|
+
label: ioBroker.StringOrTranslated;
|
|
14
|
+
type: 'apply' | 'cancel';
|
|
15
|
+
icon?: string;
|
|
16
|
+
variant?: 'contained' | 'outlined' | 'text';
|
|
17
|
+
style?: Record<string, number | string>;
|
|
18
|
+
color: 'primary' | 'secondary';
|
|
19
|
+
} | 'ok' | 'cancel';
|
|
12
20
|
export type DeviceRefresh = 'device' | 'instance' | false | true;
|
|
13
21
|
export type RefreshResponse = {
|
|
14
22
|
refresh: DeviceRefresh;
|