@iobroker/dm-utils 0.3.0 → 0.5.0
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 +9 -0
- package/build/types/common.d.ts +136 -6
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -295,6 +295,15 @@ This method returns a promise that resolves to a `ProgressDialog` object.
|
|
|
295
295
|
### **WORK IN PROGRESS**
|
|
296
296
|
-->
|
|
297
297
|
## Changelog
|
|
298
|
+
### 0.5.0 (2024-08-30)
|
|
299
|
+
* (bluefox) Migrated to eslint 9
|
|
300
|
+
|
|
301
|
+
### 0.4.0 (2024-08-30)
|
|
302
|
+
* (bluefox) Added `state` type for JSON config
|
|
303
|
+
|
|
304
|
+
### 0.3.1 (2024-07-18)
|
|
305
|
+
* (bluefox) Added qrCode type for JSON config
|
|
306
|
+
|
|
298
307
|
### 0.3.0 (2024-07-17)
|
|
299
308
|
* (bluefox) packages updated
|
|
300
309
|
* (bluefox) Updated JSON config types
|
package/build/types/common.d.ts
CHANGED
|
@@ -30,8 +30,8 @@ interface ObjectBrowserCustomFilter {
|
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
export type ObjectBrowserType = 'state' | 'instance' | 'channel' | 'device' | 'chart';
|
|
33
|
-
export type ConfigItemType = 'tabs' | 'panel' | 'text' | 'number' | 'color' | 'checkbox' | 'slider' | 'ip' | 'user' | 'room' | 'func' | 'select' | 'autocomplete' | 'image' | 'objectId' | 'password' | 'instance' | 'chips' | 'alive' | 'pattern' | 'sendto' | 'setState' | 'staticText' | 'staticLink' | 'staticImage' | 'table' | 'accordion' | 'jsonEditor' | 'language' | 'certificate' | 'certificates' | 'certCollection' | 'custom' | 'datePicker' | 'timePicker' | 'divider' | 'header' | 'cron' | 'fileSelector' | 'file' | 'imageSendTo' | 'selectSendTo' | 'autocompleteSendTo' | 'textSendTo' | 'coordinates' | 'interface' | 'license' | 'checkLicense' | 'uuid' | 'port' | 'deviceManager' | 'topic';
|
|
34
|
-
type ConfigIconType = 'auth' | 'send' | 'web' | 'warning' | 'error' | 'info' | 'search' | 'book' | 'help' | 'upload' | 'user' | 'group' | string;
|
|
33
|
+
export type ConfigItemType = 'tabs' | 'panel' | 'text' | 'number' | 'color' | 'checkbox' | 'slider' | 'ip' | 'user' | 'room' | 'func' | 'select' | 'autocomplete' | 'image' | 'objectId' | 'password' | 'instance' | 'chips' | 'alive' | 'pattern' | 'sendto' | 'setState' | 'staticText' | 'staticLink' | 'staticImage' | 'table' | 'accordion' | 'jsonEditor' | 'language' | 'certificate' | 'certificates' | 'certCollection' | 'custom' | 'datePicker' | 'timePicker' | 'divider' | 'header' | 'cron' | 'fileSelector' | 'file' | 'imageSendTo' | 'selectSendTo' | 'autocompleteSendTo' | 'textSendTo' | 'coordinates' | 'interface' | 'license' | 'checkLicense' | 'uuid' | 'port' | 'deviceManager' | 'topic' | 'qrCode' | 'state';
|
|
34
|
+
type ConfigIconType = 'edit' | 'auth' | 'send' | 'web' | 'warning' | 'error' | 'info' | 'search' | 'book' | 'help' | 'upload' | 'user' | 'group' | 'delete' | 'refresh' | 'add' | 'unpair' | 'pair' | string;
|
|
35
35
|
export interface ConfigItemConfirmData {
|
|
36
36
|
condition: string;
|
|
37
37
|
text?: ioBroker.StringOrTranslated;
|
|
@@ -102,54 +102,84 @@ interface ConfigItemTableIndexed extends ConfigItem {
|
|
|
102
102
|
}
|
|
103
103
|
export interface ConfigItemAlive extends ConfigItem {
|
|
104
104
|
type: 'alive';
|
|
105
|
+
/** check if the instance is alive. If not defined, it will be used current instance. You can use `${data.number}` pattern in the text. */
|
|
105
106
|
instance?: string;
|
|
107
|
+
/** default text is `Instance %s is alive`, where %s will be replaced by `ADAPTER.0`. The translation must exist in i18n files. */
|
|
106
108
|
textAlive?: string;
|
|
109
|
+
/** default text is `Instance %s is not alive`, where %s will be replaced by `ADAPTER.0`. The translation must exist in i18n files. */
|
|
107
110
|
textNotAlive?: string;
|
|
108
111
|
}
|
|
109
112
|
export interface ConfigItemSelectOption {
|
|
113
|
+
/** Label of option */
|
|
110
114
|
label: ioBroker.StringOrTranslated;
|
|
115
|
+
/** Value of option */
|
|
111
116
|
value: number | string;
|
|
117
|
+
/** Formula or boolean value to show or hide the option */
|
|
112
118
|
hidden?: string | boolean;
|
|
113
119
|
}
|
|
114
120
|
export interface ConfigItemPanel extends ConfigItem {
|
|
115
121
|
type: 'panel' | never;
|
|
122
|
+
/** Label of tab */
|
|
116
123
|
label?: ioBroker.StringOrTranslated;
|
|
117
124
|
items: Record<string, ConfigItemAny>;
|
|
125
|
+
/** only possible as not part of tabs */
|
|
118
126
|
collapsable?: boolean;
|
|
127
|
+
/** color of collapsable header `primary` or `secondary` or nothing */
|
|
119
128
|
color?: 'primary' | 'secondary';
|
|
129
|
+
/** CSS Styles in React format (`marginLeft` and not `margin-left`) for the Panel component */
|
|
120
130
|
innerStyle?: CustomCSSProperties;
|
|
131
|
+
/** i18n definitions: true - load from a file, string - name of subdirectory, object - translations */
|
|
121
132
|
i18n?: boolean | string | Record<string, Record<ioBroker.Languages, string>>;
|
|
122
133
|
}
|
|
123
134
|
export interface ConfigItemPattern extends ConfigItem {
|
|
124
135
|
type: 'pattern';
|
|
136
|
+
/** if true - show copy button */
|
|
125
137
|
copyToClipboard?: boolean;
|
|
138
|
+
/** pattern like 'https://${data.ip}:${data.port}' */
|
|
126
139
|
pattern: string;
|
|
127
140
|
}
|
|
128
141
|
export interface ConfigItemChip extends ConfigItem {
|
|
129
142
|
type: 'chips';
|
|
143
|
+
/** if it is defined, so the option will be stored as string with delimiter instead of an array. E.g., by `delimiter=;` you will get `a;b;c` instead of `['a', 'b', 'c']` */
|
|
130
144
|
delimiter?: string;
|
|
131
|
-
pattern: string;
|
|
132
145
|
}
|
|
133
146
|
export interface ConfigItemTabs extends ConfigItem {
|
|
134
147
|
type: 'tabs';
|
|
148
|
+
/** Object with panels `{"tab1": {}, "tab2": {}...}` */
|
|
135
149
|
items: Record<string, ConfigItemPanel>;
|
|
150
|
+
/** `bottom`, `end`, `start` or `top`. Only for panels that has `icon` attribute. Default: `start` */
|
|
136
151
|
iconPosition?: 'bottom' | 'end' | 'start' | 'top';
|
|
152
|
+
/** CSS Styles in React format (`marginLeft` and not `margin-left`) for the Mui-Tabs component */
|
|
137
153
|
tabsStyle?: CustomCSSProperties;
|
|
154
|
+
/** i18n definitions: true - load from a file, string - name of subdirectory, object - translations */
|
|
138
155
|
i18n?: boolean | string | Record<string, Record<ioBroker.Languages, string>>;
|
|
139
156
|
}
|
|
140
157
|
export interface ConfigItemText extends ConfigItem {
|
|
141
158
|
type: 'text';
|
|
159
|
+
/** max length of the text in field */
|
|
142
160
|
maxLength?: number;
|
|
143
161
|
/** @deprecated use maxLength */
|
|
144
162
|
max?: number;
|
|
163
|
+
/** read-only field */
|
|
145
164
|
readOnly?: boolean;
|
|
165
|
+
/** default is true. Set this attribute to `false` if trim is not desired. */
|
|
146
166
|
trim?: boolean;
|
|
167
|
+
/** default is 1. Set this attribute to `2` or more if you want to have a textarea with more than one row. */
|
|
147
168
|
minRows?: number;
|
|
169
|
+
/** max rows of textarea. Used only if `minRows` > 1. */
|
|
148
170
|
maxRows?: number;
|
|
171
|
+
/** if true, the clear button will not be shown */
|
|
149
172
|
noClearButton?: boolean;
|
|
173
|
+
/** if true, the text will be validated as JSON */
|
|
174
|
+
validateJson?: boolean;
|
|
175
|
+
/** if true, the JSON will be validated only if the value is not empty */
|
|
176
|
+
allowEmpty?: boolean;
|
|
177
|
+
/** the value is time in ms or a string. Used only with readOnly flag */
|
|
178
|
+
time?: boolean;
|
|
150
179
|
}
|
|
151
180
|
export interface ConfigItemColor extends ConfigItem {
|
|
152
181
|
type: 'color';
|
|
182
|
+
/** if true, the clear button will not be shown */
|
|
153
183
|
noClearButton?: boolean;
|
|
154
184
|
}
|
|
155
185
|
export interface ConfigItemCheckbox extends ConfigItem {
|
|
@@ -162,12 +192,27 @@ export interface ConfigItemNumber extends ConfigItem {
|
|
|
162
192
|
step?: number;
|
|
163
193
|
readOnly?: boolean;
|
|
164
194
|
}
|
|
195
|
+
export interface ConfigItemQrCode extends ConfigItem {
|
|
196
|
+
type: 'qrCode';
|
|
197
|
+
/** Data to show in the QR code */
|
|
198
|
+
data: string;
|
|
199
|
+
/** Size of the QR code */
|
|
200
|
+
size?: number;
|
|
201
|
+
/** Foreground color */
|
|
202
|
+
fgColor?: string;
|
|
203
|
+
/** Background color */
|
|
204
|
+
bgColor?: string;
|
|
205
|
+
/** QR code level */
|
|
206
|
+
level?: 'L' | 'M' | 'Q' | 'H';
|
|
207
|
+
}
|
|
165
208
|
export interface ConfigItemPassword extends ConfigItem {
|
|
166
209
|
type: 'password';
|
|
167
210
|
/** repeat password must be compared with password */
|
|
168
211
|
repeat?: boolean;
|
|
169
212
|
/** true if allow viewing the password by toggling the view button (only for a new password while entering) */
|
|
170
213
|
visible?: boolean;
|
|
214
|
+
/** The read-only flag. Visible is automatically true if readOnly is true */
|
|
215
|
+
readOnly?: boolean;
|
|
171
216
|
/** max length of the text in field */
|
|
172
217
|
maxLength?: number;
|
|
173
218
|
/** @deprecated use maxLength */
|
|
@@ -215,6 +260,7 @@ export interface ConfigItemSlider extends ConfigItem {
|
|
|
215
260
|
}
|
|
216
261
|
export interface ConfigItemTopic extends ConfigItem {
|
|
217
262
|
type: 'topic';
|
|
263
|
+
/** max length of the text in field */
|
|
218
264
|
maxLength?: number;
|
|
219
265
|
/** @deprecated use maxLength */
|
|
220
266
|
max?: number;
|
|
@@ -257,6 +303,10 @@ export interface ConfigItemStaticText extends Omit<ConfigItem, 'button'> {
|
|
|
257
303
|
label?: ioBroker.StringOrTranslated;
|
|
258
304
|
/** link. Link could be dynamic like `#tab-objects/customs/${data.parentId} */
|
|
259
305
|
href?: string;
|
|
306
|
+
/** target of the link: _self, _blank or window name. For relative links default is _self and for absolute - _blank */
|
|
307
|
+
target?: string;
|
|
308
|
+
/** If the GUI should be closed after a link was opened (only if the target is equal to '_self') */
|
|
309
|
+
close?: boolean;
|
|
260
310
|
/** show a link as button */
|
|
261
311
|
button?: boolean;
|
|
262
312
|
/** type of button (`outlined`, `contained`, `text`) */
|
|
@@ -265,6 +315,8 @@ export interface ConfigItemStaticText extends Omit<ConfigItem, 'button'> {
|
|
|
265
315
|
color?: 'primary' | 'secondary' | 'grey';
|
|
266
316
|
/** if icon should be shown: `auth`, `send`, `web`, `warning`, `error`, `info`, `search`, `book`, `help`, `upload`. You can use `base64` icons (it starts with `data:image/svg+xml;base64,...`) or `jpg/png` images (ends with `.png`) . (Request via issue if you need more icons) */
|
|
267
317
|
icon?: ConfigIconType;
|
|
318
|
+
/** styles for the button */
|
|
319
|
+
controlStyle: CustomCSSProperties;
|
|
268
320
|
}
|
|
269
321
|
export interface ConfigItemRoom extends ConfigItem {
|
|
270
322
|
type: 'room';
|
|
@@ -280,7 +332,7 @@ export interface ConfigItemSelect extends ConfigItem {
|
|
|
280
332
|
type: 'select';
|
|
281
333
|
/** `[{label: {en: "option 1"}, value: 1}, ...]` or
|
|
282
334
|
`[{"items": [{"label": "Val1", "value": 1}, {"label": "Val2", value: "2}], "name": "group1"}, {"items": [{"label": "Val3", "value": 3}, {"label": "Val4", value: "4}], "name": "group2"}, {"label": "Val5", "value": 5}]`
|
|
283
|
-
|
|
335
|
+
*/
|
|
284
336
|
options: (ConfigItemSelectOption | {
|
|
285
337
|
items: ConfigItemSelectOption[];
|
|
286
338
|
label: ioBroker.StringOrTranslated;
|
|
@@ -318,6 +370,7 @@ export interface ConfigItemAutocompleteSendTo extends Omit<ConfigItem, 'data'> {
|
|
|
318
370
|
options?: (string | ConfigItemSelectOption)[];
|
|
319
371
|
data?: Record<string, any>;
|
|
320
372
|
freeSolo?: boolean;
|
|
373
|
+
/** max length of the text in field */
|
|
321
374
|
maxLength?: number;
|
|
322
375
|
/** @deprecated use maxLength */
|
|
323
376
|
max?: string;
|
|
@@ -325,9 +378,13 @@ export interface ConfigItemAutocompleteSendTo extends Omit<ConfigItem, 'data'> {
|
|
|
325
378
|
}
|
|
326
379
|
export interface ConfigItemAccordion extends ConfigItem {
|
|
327
380
|
type: 'accordion';
|
|
381
|
+
/** Title shown on the accordion */
|
|
328
382
|
titleAttr?: string;
|
|
383
|
+
/** If delete or add disabled, If noDelete is false, add, delete and move up/down should work */
|
|
329
384
|
noDelete?: boolean;
|
|
385
|
+
/** If clone button should be shown. If true, the clone button will be shown. If attribute name, this name will be unique. */
|
|
330
386
|
clone?: boolean | string;
|
|
387
|
+
/** Items of accordion */
|
|
331
388
|
items: ConfigItemIndexed[];
|
|
332
389
|
}
|
|
333
390
|
export interface ConfigItemDivider extends ConfigItem {
|
|
@@ -342,12 +399,19 @@ export interface ConfigItemHeader extends ConfigItem {
|
|
|
342
399
|
}
|
|
343
400
|
export interface ConfigItemCoordinates extends ConfigItem {
|
|
344
401
|
type: 'coordinates';
|
|
402
|
+
/** divider between latitude and longitude. Default "," (Used if longitudeName and latitudeName are not defined) */
|
|
345
403
|
divider?: string;
|
|
404
|
+
/** init field with current coordinates if empty */
|
|
346
405
|
autoInit?: boolean;
|
|
406
|
+
/** if defined, the longitude will be stored in this attribute, divider will be ignored */
|
|
347
407
|
longitudeName?: string;
|
|
408
|
+
/** if defined, the latitude will be stored in this attribute, divider will be ignored */
|
|
348
409
|
latitudeName?: string;
|
|
410
|
+
/** if defined, the checkbox with "Use system settings" will be shown and latitude, longitude will be read from system.config, a boolean will be saved to the given name */
|
|
349
411
|
useSystemName?: string;
|
|
412
|
+
/** max length of the text in field */
|
|
350
413
|
maxLength?: number;
|
|
414
|
+
/** @deprecated use maxLength */
|
|
351
415
|
max?: number;
|
|
352
416
|
}
|
|
353
417
|
export interface ConfigItemCustom extends ConfigItem {
|
|
@@ -363,6 +427,7 @@ export interface ConfigItemCustom extends ConfigItem {
|
|
|
363
427
|
}
|
|
364
428
|
export interface ConfigItemDatePicker extends ConfigItem {
|
|
365
429
|
type: 'datePicker';
|
|
430
|
+
/** max length of the text in field */
|
|
366
431
|
maxLength?: number;
|
|
367
432
|
/** @deprecated use maxLength */
|
|
368
433
|
max?: number;
|
|
@@ -408,44 +473,105 @@ export interface ConfigItemSendTo extends Omit<ConfigItem, 'data'> {
|
|
|
408
473
|
/** button tooltip */
|
|
409
474
|
title?: ioBroker.StringOrTranslated;
|
|
410
475
|
alsoDependsOn?: string[];
|
|
411
|
-
container?: 'text' | 'div';
|
|
476
|
+
container?: 'text' | 'div' | 'html';
|
|
412
477
|
copyToClipboard?: boolean;
|
|
478
|
+
/** Styles for button itself */
|
|
479
|
+
controlStyle?: CustomCSSProperties;
|
|
480
|
+
}
|
|
481
|
+
export interface ConfigItemState extends ConfigItem {
|
|
482
|
+
type: 'state';
|
|
483
|
+
/** Which object ID should be taken for the controlling. The ID is without "adapter.X." prefix */
|
|
484
|
+
oid: string;
|
|
485
|
+
/** If true, the state will be taken from system.adapter.XX.I. and not from XX.I */
|
|
486
|
+
system?: boolean;
|
|
487
|
+
/** How the value of the state should be shown */
|
|
488
|
+
control?: 'text' | 'html' | 'input' | 'slider' | 'select' | 'button' | 'switch' | 'number';
|
|
489
|
+
/** If true, the state will be shown as switch, select, button, slider or text input. Used only if no control property is defined */
|
|
490
|
+
controlled?: boolean;
|
|
491
|
+
/** Add unit to the value */
|
|
492
|
+
unit?: string;
|
|
493
|
+
/** this text will be shown if the value is true */
|
|
494
|
+
trueText?: string;
|
|
495
|
+
/** Style of the text if the value is true */
|
|
496
|
+
trueTextStyle?: CustomCSSProperties;
|
|
497
|
+
/** this text will be shown if the value is false or if the control is a "button" */
|
|
498
|
+
falseText?: string;
|
|
499
|
+
/** Style of the text if the value is false or if the control is a "button" */
|
|
500
|
+
falseTextStyle?: CustomCSSProperties;
|
|
501
|
+
/** This image will be shown if the value is true */
|
|
502
|
+
trueImage?: string;
|
|
503
|
+
/** This image will be shown if the value is false or if the control is a "button" */
|
|
504
|
+
falseImage?: string;
|
|
505
|
+
/** Minimum value for control type slider or number */
|
|
506
|
+
min?: number;
|
|
507
|
+
/** Maximum value for control type slider or number */
|
|
508
|
+
max?: number;
|
|
509
|
+
/** Step value for control type slider or number */
|
|
510
|
+
step?: number;
|
|
511
|
+
/** delay in ms for slider or number */
|
|
512
|
+
controlDelay?: number;
|
|
513
|
+
/** Variant of button */
|
|
514
|
+
variant?: 'contained' | 'outlined' | 'text';
|
|
413
515
|
}
|
|
414
516
|
export interface ConfigItemTextSendTo extends Omit<ConfigItem, 'data'> {
|
|
415
517
|
type: 'textSendTo';
|
|
416
518
|
container?: 'text' | 'div';
|
|
519
|
+
/** if true - show copy to clipboard button */
|
|
417
520
|
copyToClipboard?: boolean;
|
|
521
|
+
/** by change of which attributes, the command must be resent */
|
|
418
522
|
alsoDependsOn?: string[];
|
|
523
|
+
/** sendTo command */
|
|
419
524
|
command?: string;
|
|
525
|
+
/** string - `{"subject1": "${data.subject}", "options1": {"host": "${data.host}"}}`. This data will be sent to the backend */
|
|
420
526
|
jsonData?: string;
|
|
527
|
+
/** object - `{"subject1": 1, "data": "static"}`. You can specify jsonData or data, but not both. This data will be sent to the backend if jsonData is not defined. */
|
|
421
528
|
data?: Record<string, any>;
|
|
422
529
|
}
|
|
423
530
|
export interface ConfigItemSelectSendTo extends Omit<ConfigItem, 'data'> {
|
|
424
531
|
type: 'selectSendTo';
|
|
532
|
+
/** allow manual editing. Without drop-down menu (if instance is offline). Default `true`. */
|
|
425
533
|
manual?: boolean;
|
|
534
|
+
/** Multiple choice select */
|
|
426
535
|
multiple?: boolean;
|
|
536
|
+
/** show item even if no label was found for it (by multiple), default=`true` */
|
|
427
537
|
showAllValues?: boolean;
|
|
538
|
+
/** if true, the clear button will not be shown */
|
|
428
539
|
noClearButton?: boolean;
|
|
540
|
+
/** sendTo command */
|
|
429
541
|
command?: string;
|
|
542
|
+
/** string - `{"subject1": "${data.subject}", "options1": {"host": "${data.host}"}}`. This data will be sent to the backend */
|
|
430
543
|
jsonData?: string;
|
|
544
|
+
/** object - `{"subject1": 1, "data": "static"}`. You can specify jsonData or data, but not both. This data will be sent to the backend if jsonData is not defined. */
|
|
431
545
|
data?: Record<string, any>;
|
|
546
|
+
/** by change of which attributes, the command must be resent */
|
|
432
547
|
alsoDependsOn?: string[];
|
|
433
548
|
}
|
|
434
549
|
export interface ConfigItemTable extends ConfigItem {
|
|
435
550
|
type: 'table';
|
|
436
551
|
items?: ConfigItemTableIndexed[];
|
|
552
|
+
/** If delete or add disabled, If noDelete is false, add, delete and move up/down should work */
|
|
437
553
|
noDelete?: boolean;
|
|
438
554
|
/** @deprecated don't use */
|
|
439
555
|
objKeyName?: string;
|
|
440
556
|
/** @deprecated don't use */
|
|
441
557
|
objValueName?: string;
|
|
558
|
+
/** If add allowed even if filter is set */
|
|
442
559
|
allowAddByFilter?: boolean;
|
|
560
|
+
/** The number of lines from which the second add button at the bottom of the table will be shown. Default 5 */
|
|
443
561
|
showSecondAddAt?: number;
|
|
562
|
+
/** Show first plus button on top of the first column and not on the left. */
|
|
444
563
|
showFirstAddOnTop?: boolean;
|
|
564
|
+
/** If clone button should be shown. If true, the clone button will be shown. If attribute name, this name will be unique. */
|
|
445
565
|
clone?: boolean | string;
|
|
566
|
+
/** If export button should be shown. Export as csv file. */
|
|
446
567
|
export?: boolean;
|
|
568
|
+
/** If import button should be shown. Import from csv file. */
|
|
447
569
|
import?: boolean;
|
|
570
|
+
/** Show table in compact mode */
|
|
571
|
+
compact?: boolean;
|
|
572
|
+
/** Specify the 'attr' name of columns which need to be unique */
|
|
448
573
|
uniqueColumns?: string[];
|
|
574
|
+
/** These items will be encrypted before saving with simple (not SHA) encryption method */
|
|
449
575
|
encryptedAttributes?: string[];
|
|
450
576
|
}
|
|
451
577
|
export interface ConfigItemTimePicker extends ConfigItem {
|
|
@@ -516,6 +642,10 @@ export interface ConfigItemUUID extends ConfigItem {
|
|
|
516
642
|
}
|
|
517
643
|
export interface ConfigItemJsonEditor extends ConfigItem {
|
|
518
644
|
type: 'jsonEditor';
|
|
645
|
+
/** if false, the text will be not validated as JSON */
|
|
646
|
+
validateJson?: boolean;
|
|
647
|
+
/** if true, the JSON will be validated only if the value is not empty */
|
|
648
|
+
allowEmpty?: boolean;
|
|
519
649
|
}
|
|
520
650
|
export interface ConfigItemInterface extends ConfigItem {
|
|
521
651
|
type: 'interface';
|
|
@@ -604,7 +734,7 @@ export interface ConfigItemFileSelector extends ConfigItem {
|
|
|
604
734
|
/** Do not show the size of files */
|
|
605
735
|
noSize?: boolean;
|
|
606
736
|
}
|
|
607
|
-
export type ConfigItemAny = ConfigItemAlive | ConfigItemAutocomplete | ConfigItemAutocompleteSendTo | ConfigItemPanel | ConfigItemTabs | ConfigItemText | ConfigItemNumber | ConfigItemColor | ConfigItemCheckbox | ConfigItemSlider | ConfigItemIP | ConfigItemUser | ConfigItemRoom | ConfigItemFunc | ConfigItemSelect | ConfigItemAccordion | ConfigItemCoordinates | ConfigItemDivider | ConfigItemHeader | ConfigItemCustom | ConfigItemDatePicker | ConfigItemDeviceManager | ConfigItemLanguage | ConfigItemPort | ConfigItemSendTo | ConfigItemTable | ConfigItemTimePicker | ConfigItemTextSendTo | ConfigItemSelectSendTo | ConfigItemCertCollection | ConfigItemCertificateSelect | ConfigItemCertificates | ConfigItemUUID | ConfigItemCheckLicense | ConfigItemPattern | ConfigItemChip | ConfigItemCRON | ConfigItemFile | ConfigItemFileSelector | ConfigItemImageSendTo | ConfigItemInstanceSelect | ConfigItemImageUpload | ConfigItemInterface | ConfigItemJsonEditor | ConfigItemLicense | ConfigItemPassword | ConfigItemSetState | ConfigItemStaticDivider | ConfigItemStaticHeader | ConfigItemStaticImage | ConfigItemStaticText | ConfigItemTopic | ConfigItemObjectId;
|
|
737
|
+
export type ConfigItemAny = ConfigItemAlive | ConfigItemAutocomplete | ConfigItemAutocompleteSendTo | ConfigItemPanel | ConfigItemTabs | ConfigItemText | ConfigItemNumber | ConfigItemColor | ConfigItemCheckbox | ConfigItemSlider | ConfigItemIP | ConfigItemUser | ConfigItemRoom | ConfigItemFunc | ConfigItemSelect | ConfigItemAccordion | ConfigItemCoordinates | ConfigItemDivider | ConfigItemHeader | ConfigItemCustom | ConfigItemDatePicker | ConfigItemDeviceManager | ConfigItemLanguage | ConfigItemPort | ConfigItemSendTo | ConfigItemState | ConfigItemTable | ConfigItemTimePicker | ConfigItemTextSendTo | ConfigItemSelectSendTo | ConfigItemCertCollection | ConfigItemCertificateSelect | ConfigItemCertificates | ConfigItemUUID | ConfigItemCheckLicense | ConfigItemPattern | ConfigItemChip | ConfigItemCRON | ConfigItemFile | ConfigItemFileSelector | ConfigItemImageSendTo | ConfigItemInstanceSelect | ConfigItemImageUpload | ConfigItemInterface | ConfigItemJsonEditor | ConfigItemLicense | ConfigItemPassword | ConfigItemSetState | ConfigItemStaticDivider | ConfigItemStaticHeader | ConfigItemStaticImage | ConfigItemStaticText | ConfigItemTopic | ConfigItemObjectId | ConfigItemQrCode;
|
|
608
738
|
export type JsonFormSchema = ConfigItemPanel;
|
|
609
739
|
export type JsonFormData = Record<string, any>;
|
|
610
740
|
export interface DeviceDetails {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iobroker/dm-utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "ioBroker Device Manager utilities for backend",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -24,15 +24,15 @@
|
|
|
24
24
|
"@iobroker/adapter-core": "^3.1.6"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@alcalzone/release-script": "^3.
|
|
27
|
+
"@alcalzone/release-script": "^3.8.0",
|
|
28
28
|
"@alcalzone/release-script-plugin-license": "^3.7.0",
|
|
29
|
-
"@types/node": "^
|
|
30
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
31
|
-
"@typescript-eslint/parser": "^
|
|
32
|
-
"eslint": "^
|
|
29
|
+
"@types/node": "^22.5.1",
|
|
30
|
+
"@typescript-eslint/eslint-plugin": "^8.3.0",
|
|
31
|
+
"@typescript-eslint/parser": "^8.3.0",
|
|
32
|
+
"eslint": "^9.9.1",
|
|
33
33
|
"eslint-config-prettier": "^9.1.0",
|
|
34
34
|
"prettier": "^3.3.3",
|
|
35
|
-
"typescript": "^5.5.
|
|
35
|
+
"typescript": "^5.5.4"
|
|
36
36
|
},
|
|
37
37
|
"files": [
|
|
38
38
|
"LICENSE",
|