@iobroker/dm-utils 0.6.9 → 0.6.10

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,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.10 (2024-12-10)
299
+
300
+ * (@GermanBluefox) Export `BackEndCommandJsonFormOptions` type
301
+
298
302
  ### 0.6.9 (2024-11-22)
299
303
 
300
304
  * (@GermanBluefox) Added max-width option for form
@@ -1,14 +1,9 @@
1
- import type { ActionButton, JsonFormData, JsonFormSchema } from '.';
1
+ import type { BackEndCommandJsonFormOptions, JsonFormData, JsonFormSchema } from '.';
2
2
  import type { ProgressDialog } from './ProgressDialog';
3
3
  export interface ActionContext {
4
4
  showMessage(text: ioBroker.StringOrTranslated): Promise<void>;
5
5
  showConfirmation(text: ioBroker.StringOrTranslated): Promise<boolean>;
6
- showForm(schema: JsonFormSchema, options?: {
7
- data?: JsonFormData;
8
- title?: ioBroker.StringOrTranslated;
9
- buttons?: (ActionButton | 'apply' | 'cancel')[];
10
- maxWidth?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
11
- }): Promise<JsonFormData | undefined>;
6
+ showForm(schema: JsonFormSchema, options?: BackEndCommandJsonFormOptions): Promise<JsonFormData | undefined>;
12
7
  openProgress(title: string, options?: {
13
8
  indeterminate?: boolean;
14
9
  value?: number;
@@ -103,6 +103,8 @@ export interface ConfigItem {
103
103
  ignoreOwnChanges?: boolean;
104
104
  };
105
105
  doNotSave?: boolean;
106
+ /** If the control should be shown ONLY in the expert mode */
107
+ expertMode?: boolean;
106
108
  noMultiEdit?: boolean;
107
109
  confirm?: ConfigItemConfirmData;
108
110
  icon?: ConfigIconType;
@@ -817,7 +819,7 @@ export type BackEndCommandType = 'nop' | 'refresh' | 'link' | 'message';
817
819
  export interface BackEndCommandGeneric {
818
820
  command: BackEndCommandType;
819
821
  /** New GUI schema */
820
- schema?: ConfigItemPanel;
822
+ schema?: ConfigItemPanel | ConfigItemTabs;
821
823
  /** New GUI data */
822
824
  data?: Record<string, any>;
823
825
  refresh?: boolean;
@@ -849,6 +851,13 @@ export interface BackEndCommandMessage extends BackEndCommandGeneric {
849
851
  variant: 'popup' | 'dialog';
850
852
  }
851
853
  export type BackEndCommand = BackEndCommandMessage | BackEndCommandOpenLink | BackEndCommandRefresh;
854
+ export type BackEndCommandJsonFormOptions = {
855
+ data?: JsonFormData;
856
+ title?: ioBroker.StringOrTranslated;
857
+ buttons?: (ActionButton | 'apply' | 'cancel')[];
858
+ maxWidth?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
859
+ noTranslation?: boolean;
860
+ };
852
861
  export type JsonFormSchema = ConfigItemPanel | ConfigItemTabs;
853
862
  export type JsonFormData = Record<string, any>;
854
863
  export interface DeviceDetails {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iobroker/dm-utils",
3
- "version": "0.6.9",
3
+ "version": "0.6.10",
4
4
  "description": "ioBroker Device Manager utilities for backend",
5
5
  "main": "build/index.js",
6
6
  "publishConfig": {
@@ -22,15 +22,15 @@
22
22
  "author": "UncleSamSwiss",
23
23
  "license": "MIT",
24
24
  "dependencies": {
25
- "@iobroker/adapter-core": "^3.2.2"
25
+ "@iobroker/adapter-core": "^3.2.3"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@alcalzone/release-script": "^3.8.0",
29
29
  "@alcalzone/release-script-plugin-license": "^3.7.0",
30
30
  "@iobroker/eslint-config": "^1.0.0",
31
- "@types/node": "^22.9.1",
32
- "axios": "^1.7.7",
33
- "typescript": "^5.6.3"
31
+ "@types/node": "^22.10.1",
32
+ "axios": "^1.7.9",
33
+ "typescript": "^5.7.2"
34
34
  },
35
35
  "files": [
36
36
  "LICENSE",