@iobroker/json-config 7.1.1 → 7.1.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.
Files changed (187) hide show
  1. package/build/JsonConfig.d.ts +6 -10
  2. package/build/JsonConfig.js +30 -26
  3. package/build/JsonConfig.js.map +1 -1
  4. package/build/JsonConfigComponent/ChipInput.d.ts +13 -14
  5. package/build/JsonConfigComponent/ChipInput.js +26 -21
  6. package/build/JsonConfigComponent/ChipInput.js.map +1 -1
  7. package/build/JsonConfigComponent/ConfigAccordion.d.ts +4 -4
  8. package/build/JsonConfigComponent/ConfigAccordion.js +44 -38
  9. package/build/JsonConfigComponent/ConfigAccordion.js.map +1 -1
  10. package/build/JsonConfigComponent/ConfigAlive.d.ts +2 -2
  11. package/build/JsonConfigComponent/ConfigAlive.js +17 -8
  12. package/build/JsonConfigComponent/ConfigAlive.js.map +1 -1
  13. package/build/JsonConfigComponent/ConfigAutocomplete.d.ts +2 -2
  14. package/build/JsonConfigComponent/ConfigAutocomplete.js +13 -10
  15. package/build/JsonConfigComponent/ConfigAutocomplete.js.map +1 -1
  16. package/build/JsonConfigComponent/ConfigAutocompleteSendTo.d.ts +2 -2
  17. package/build/JsonConfigComponent/ConfigAutocompleteSendTo.js +31 -22
  18. package/build/JsonConfigComponent/ConfigAutocompleteSendTo.js.map +1 -1
  19. package/build/JsonConfigComponent/ConfigCRON.d.ts +3 -3
  20. package/build/JsonConfigComponent/ConfigCRON.js +5 -5
  21. package/build/JsonConfigComponent/ConfigCRON.js.map +1 -1
  22. package/build/JsonConfigComponent/ConfigCertCollection.d.ts +2 -2
  23. package/build/JsonConfigComponent/ConfigCertCollection.js +9 -9
  24. package/build/JsonConfigComponent/ConfigCertCollection.js.map +1 -1
  25. package/build/JsonConfigComponent/ConfigCertificateSelect.d.ts +2 -2
  26. package/build/JsonConfigComponent/ConfigCertificateSelect.js +6 -6
  27. package/build/JsonConfigComponent/ConfigCertificateSelect.js.map +1 -1
  28. package/build/JsonConfigComponent/ConfigCertificates.d.ts +2 -2
  29. package/build/JsonConfigComponent/ConfigCertificates.js +17 -14
  30. package/build/JsonConfigComponent/ConfigCertificates.js.map +1 -1
  31. package/build/JsonConfigComponent/ConfigCheckLicense.d.ts +19 -7
  32. package/build/JsonConfigComponent/ConfigCheckLicense.js +34 -24
  33. package/build/JsonConfigComponent/ConfigCheckLicense.js.map +1 -1
  34. package/build/JsonConfigComponent/ConfigCheckbox.d.ts +2 -2
  35. package/build/JsonConfigComponent/ConfigCheckbox.js +19 -9
  36. package/build/JsonConfigComponent/ConfigCheckbox.js.map +1 -1
  37. package/build/JsonConfigComponent/ConfigChip.d.ts +2 -2
  38. package/build/JsonConfigComponent/ConfigChip.js +20 -10
  39. package/build/JsonConfigComponent/ConfigChip.js.map +1 -1
  40. package/build/JsonConfigComponent/ConfigColor.d.ts +3 -3
  41. package/build/JsonConfigComponent/ConfigColor.js +18 -11
  42. package/build/JsonConfigComponent/ConfigColor.js.map +1 -1
  43. package/build/JsonConfigComponent/ConfigCoordinates.d.ts +2 -2
  44. package/build/JsonConfigComponent/ConfigCoordinates.js +49 -41
  45. package/build/JsonConfigComponent/ConfigCoordinates.js.map +1 -1
  46. package/build/JsonConfigComponent/ConfigCustom.d.ts +2 -2
  47. package/build/JsonConfigComponent/ConfigCustom.js +13 -13
  48. package/build/JsonConfigComponent/ConfigCustom.js.map +1 -1
  49. package/build/JsonConfigComponent/ConfigDatePicker.d.ts +2 -2
  50. package/build/JsonConfigComponent/ConfigDatePicker.js +3 -3
  51. package/build/JsonConfigComponent/ConfigDatePicker.js.map +1 -1
  52. package/build/JsonConfigComponent/ConfigDeviceManager.d.ts +2 -2
  53. package/build/JsonConfigComponent/ConfigDeviceManager.js +2 -2
  54. package/build/JsonConfigComponent/ConfigDeviceManager.js.map +1 -1
  55. package/build/JsonConfigComponent/ConfigFile.d.ts +8 -5
  56. package/build/JsonConfigComponent/ConfigFile.js +16 -15
  57. package/build/JsonConfigComponent/ConfigFile.js.map +1 -1
  58. package/build/JsonConfigComponent/ConfigFileSelector.d.ts +4 -4
  59. package/build/JsonConfigComponent/ConfigFileSelector.js +66 -47
  60. package/build/JsonConfigComponent/ConfigFileSelector.js.map +1 -1
  61. package/build/JsonConfigComponent/ConfigFunc.d.ts +2 -2
  62. package/build/JsonConfigComponent/ConfigFunc.js +8 -10
  63. package/build/JsonConfigComponent/ConfigFunc.js.map +1 -1
  64. package/build/JsonConfigComponent/ConfigGeneric.d.ts +7 -7
  65. package/build/JsonConfigComponent/ConfigGeneric.js +35 -38
  66. package/build/JsonConfigComponent/ConfigGeneric.js.map +1 -1
  67. package/build/JsonConfigComponent/ConfigIP.d.ts +2 -2
  68. package/build/JsonConfigComponent/ConfigIP.js +10 -11
  69. package/build/JsonConfigComponent/ConfigIP.js.map +1 -1
  70. package/build/JsonConfigComponent/ConfigImageSendTo.d.ts +2 -2
  71. package/build/JsonConfigComponent/ConfigImageSendTo.js +6 -5
  72. package/build/JsonConfigComponent/ConfigImageSendTo.js.map +1 -1
  73. package/build/JsonConfigComponent/ConfigImageUpload.d.ts +3 -3
  74. package/build/JsonConfigComponent/ConfigImageUpload.js +23 -12
  75. package/build/JsonConfigComponent/ConfigImageUpload.js.map +1 -1
  76. package/build/JsonConfigComponent/ConfigInstanceSelect.d.ts +3 -3
  77. package/build/JsonConfigComponent/ConfigInstanceSelect.js +37 -23
  78. package/build/JsonConfigComponent/ConfigInstanceSelect.js.map +1 -1
  79. package/build/JsonConfigComponent/ConfigInterface.d.ts +2 -2
  80. package/build/JsonConfigComponent/ConfigInterface.js +20 -20
  81. package/build/JsonConfigComponent/ConfigInterface.js.map +1 -1
  82. package/build/JsonConfigComponent/ConfigJsonEditor.d.ts +3 -3
  83. package/build/JsonConfigComponent/ConfigJsonEditor.js +10 -8
  84. package/build/JsonConfigComponent/ConfigJsonEditor.js.map +1 -1
  85. package/build/JsonConfigComponent/ConfigLanguage.d.ts +2 -2
  86. package/build/JsonConfigComponent/ConfigLanguage.js +17 -9
  87. package/build/JsonConfigComponent/ConfigLanguage.js.map +1 -1
  88. package/build/JsonConfigComponent/ConfigLicense.d.ts +2 -2
  89. package/build/JsonConfigComponent/ConfigLicense.js +29 -14
  90. package/build/JsonConfigComponent/ConfigLicense.js.map +1 -1
  91. package/build/JsonConfigComponent/ConfigNumber.d.ts +3 -5
  92. package/build/JsonConfigComponent/ConfigNumber.js +12 -9
  93. package/build/JsonConfigComponent/ConfigNumber.js.map +1 -1
  94. package/build/JsonConfigComponent/ConfigObjectId.d.ts +3 -3
  95. package/build/JsonConfigComponent/ConfigObjectId.js +6 -6
  96. package/build/JsonConfigComponent/ConfigObjectId.js.map +1 -1
  97. package/build/JsonConfigComponent/ConfigPanel.d.ts +3 -3
  98. package/build/JsonConfigComponent/ConfigPanel.js +48 -44
  99. package/build/JsonConfigComponent/ConfigPanel.js.map +1 -1
  100. package/build/JsonConfigComponent/ConfigPassword.d.ts +2 -2
  101. package/build/JsonConfigComponent/ConfigPassword.js +24 -13
  102. package/build/JsonConfigComponent/ConfigPassword.js.map +1 -1
  103. package/build/JsonConfigComponent/ConfigPattern.d.ts +2 -2
  104. package/build/JsonConfigComponent/ConfigPattern.js +8 -8
  105. package/build/JsonConfigComponent/ConfigPattern.js.map +1 -1
  106. package/build/JsonConfigComponent/ConfigPort.d.ts +3 -5
  107. package/build/JsonConfigComponent/ConfigPort.js +20 -16
  108. package/build/JsonConfigComponent/ConfigPort.js.map +1 -1
  109. package/build/JsonConfigComponent/ConfigQrCode.d.ts +2 -2
  110. package/build/JsonConfigComponent/ConfigQrCode.js +2 -2
  111. package/build/JsonConfigComponent/ConfigQrCode.js.map +1 -1
  112. package/build/JsonConfigComponent/ConfigRoom.d.ts +2 -2
  113. package/build/JsonConfigComponent/ConfigRoom.js +11 -10
  114. package/build/JsonConfigComponent/ConfigRoom.js.map +1 -1
  115. package/build/JsonConfigComponent/ConfigSelect.d.ts +2 -2
  116. package/build/JsonConfigComponent/ConfigSelect.js +16 -10
  117. package/build/JsonConfigComponent/ConfigSelect.js.map +1 -1
  118. package/build/JsonConfigComponent/ConfigSelectSendTo.d.ts +3 -3
  119. package/build/JsonConfigComponent/ConfigSelectSendTo.js +34 -28
  120. package/build/JsonConfigComponent/ConfigSelectSendTo.js.map +1 -1
  121. package/build/JsonConfigComponent/ConfigSendto.d.ts +5 -5
  122. package/build/JsonConfigComponent/ConfigSendto.js +34 -22
  123. package/build/JsonConfigComponent/ConfigSendto.js.map +1 -1
  124. package/build/JsonConfigComponent/ConfigSetState.d.ts +3 -3
  125. package/build/JsonConfigComponent/ConfigSetState.js +7 -6
  126. package/build/JsonConfigComponent/ConfigSetState.js.map +1 -1
  127. package/build/JsonConfigComponent/ConfigSlider.d.ts +2 -2
  128. package/build/JsonConfigComponent/ConfigSlider.js +7 -5
  129. package/build/JsonConfigComponent/ConfigSlider.js.map +1 -1
  130. package/build/JsonConfigComponent/ConfigState.d.ts +3 -3
  131. package/build/JsonConfigComponent/ConfigState.js +64 -55
  132. package/build/JsonConfigComponent/ConfigState.js.map +1 -1
  133. package/build/JsonConfigComponent/ConfigStaticDivider.d.ts +2 -2
  134. package/build/JsonConfigComponent/ConfigStaticDivider.js +10 -8
  135. package/build/JsonConfigComponent/ConfigStaticDivider.js.map +1 -1
  136. package/build/JsonConfigComponent/ConfigStaticHeader.d.ts +2 -2
  137. package/build/JsonConfigComponent/ConfigStaticHeader.js +6 -6
  138. package/build/JsonConfigComponent/ConfigStaticHeader.js.map +1 -1
  139. package/build/JsonConfigComponent/ConfigStaticImage.d.ts +2 -2
  140. package/build/JsonConfigComponent/ConfigStaticImage.js +6 -4
  141. package/build/JsonConfigComponent/ConfigStaticImage.js.map +1 -1
  142. package/build/JsonConfigComponent/ConfigStaticText.d.ts +2 -2
  143. package/build/JsonConfigComponent/ConfigStaticText.js +33 -26
  144. package/build/JsonConfigComponent/ConfigStaticText.js.map +1 -1
  145. package/build/JsonConfigComponent/ConfigTable.d.ts +6 -6
  146. package/build/JsonConfigComponent/ConfigTable.js +122 -100
  147. package/build/JsonConfigComponent/ConfigTable.js.map +1 -1
  148. package/build/JsonConfigComponent/ConfigTabs.d.ts +2 -2
  149. package/build/JsonConfigComponent/ConfigTabs.js +6 -5
  150. package/build/JsonConfigComponent/ConfigTabs.js.map +1 -1
  151. package/build/JsonConfigComponent/ConfigText.d.ts +3 -5
  152. package/build/JsonConfigComponent/ConfigText.js +24 -19
  153. package/build/JsonConfigComponent/ConfigText.js.map +1 -1
  154. package/build/JsonConfigComponent/ConfigTextSendTo.d.ts +2 -2
  155. package/build/JsonConfigComponent/ConfigTextSendTo.js +18 -15
  156. package/build/JsonConfigComponent/ConfigTextSendTo.js.map +1 -1
  157. package/build/JsonConfigComponent/ConfigTimePicker.d.ts +2 -2
  158. package/build/JsonConfigComponent/ConfigTimePicker.js +7 -4
  159. package/build/JsonConfigComponent/ConfigTimePicker.js.map +1 -1
  160. package/build/JsonConfigComponent/ConfigTopic.d.ts +2 -2
  161. package/build/JsonConfigComponent/ConfigTopic.js +3 -3
  162. package/build/JsonConfigComponent/ConfigTopic.js.map +1 -1
  163. package/build/JsonConfigComponent/ConfigUUID.d.ts +2 -2
  164. package/build/JsonConfigComponent/ConfigUUID.js +6 -6
  165. package/build/JsonConfigComponent/ConfigUUID.js.map +1 -1
  166. package/build/JsonConfigComponent/ConfigUser.d.ts +2 -2
  167. package/build/JsonConfigComponent/ConfigUser.js +25 -19
  168. package/build/JsonConfigComponent/ConfigUser.js.map +1 -1
  169. package/build/JsonConfigComponent/Icons.d.ts +2 -2
  170. package/build/JsonConfigComponent/Icons.js +1 -1
  171. package/build/JsonConfigComponent/Icons.js.map +1 -1
  172. package/build/JsonConfigComponent/index.d.ts +7 -10
  173. package/build/JsonConfigComponent/index.js +14 -11
  174. package/build/JsonConfigComponent/index.js.map +1 -1
  175. package/build/JsonConfigComponent/wrapper/Components/CustomModal.d.ts +3 -3
  176. package/build/JsonConfigComponent/wrapper/Components/CustomModal.js +10 -10
  177. package/build/JsonConfigComponent/wrapper/Components/CustomModal.js.map +1 -1
  178. package/build/JsonConfigComponent/wrapper/Components/Editor.d.ts +2 -2
  179. package/build/JsonConfigComponent/wrapper/Components/Editor.js +3 -3
  180. package/build/JsonConfigComponent/wrapper/Components/Editor.js.map +1 -1
  181. package/build/Utils.js +74 -60
  182. package/build/Utils.js.map +1 -1
  183. package/build/index.d.ts +1 -1
  184. package/build/index.js +1 -1
  185. package/build/index.js.map +1 -1
  186. package/build/types.d.ts +173 -43
  187. package/package.json +26 -25
package/build/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import type React from 'react';
2
2
  import type { ObjectBrowserCustomFilter, ObjectBrowserType } from '@iobroker/adapter-react-v5';
3
3
 
4
4
  declare module '@mui/material/Button' {
@@ -9,14 +9,100 @@ declare module '@mui/material/Button' {
9
9
 
10
10
  type CustomCSSProperties = React.CSSProperties;
11
11
 
12
- export type ConfigItemType = 'tabs' | 'panel' | 'text' | 'number' | 'color' | 'checkbox' | 'slider' | 'ip' | 'user' | 'room' | 'func' | 'select' |
13
- 'autocomplete' | 'image' | 'objectId' | 'password' | 'instance' | 'chips' | 'alive' | 'pattern' | 'sendto' | 'setState' |
14
- 'staticText' | 'staticLink' | 'staticImage' | 'table' | 'accordion' | 'jsonEditor' | 'language' | 'certificate' |
15
- 'certificates' | 'certCollection' | 'custom' | 'datePicker' | 'timePicker' | 'divider' | 'header' | 'cron' |
16
- 'fileSelector' | 'file' | 'imageSendTo' | 'selectSendTo' | 'autocompleteSendTo' | 'textSendTo' | 'coordinates' | 'interface' | 'license' |
17
- 'checkLicense' | 'uuid' | 'port' | 'deviceManager' | 'topic' | 'qrCode' | 'state';
18
-
19
- type ConfigIconType = 'edit' | 'auth' | 'send' | 'web' | 'warning' | 'error' | 'info' | 'search' | 'book' | 'help' | 'upload' | 'user' | 'group' | 'delete' | 'refresh' | 'add' | 'unpair' | 'pair' | string;
12
+ export type ConfigItemType =
13
+ | 'tabs'
14
+ | 'panel'
15
+ | 'text'
16
+ | 'number'
17
+ | 'color'
18
+ | 'checkbox'
19
+ | 'slider'
20
+ | 'ip'
21
+ | 'user'
22
+ | 'room'
23
+ | 'func'
24
+ | 'select'
25
+ | 'autocomplete'
26
+ | 'image'
27
+ | 'objectId'
28
+ | 'password'
29
+ | 'instance'
30
+ | 'chips'
31
+ | 'alive'
32
+ | 'pattern'
33
+ | 'sendto'
34
+ | 'setState'
35
+ | 'staticText'
36
+ | 'staticLink'
37
+ | 'staticImage'
38
+ | 'table'
39
+ | 'accordion'
40
+ | 'jsonEditor'
41
+ | 'language'
42
+ | 'certificate'
43
+ | 'certificates'
44
+ | 'certCollection'
45
+ | 'custom'
46
+ | 'datePicker'
47
+ | 'timePicker'
48
+ | 'divider'
49
+ | 'header'
50
+ | 'cron'
51
+ | 'fileSelector'
52
+ | 'file'
53
+ | 'imageSendTo'
54
+ | 'selectSendTo'
55
+ | 'autocompleteSendTo'
56
+ | 'textSendTo'
57
+ | 'coordinates'
58
+ | 'interface'
59
+ | 'license'
60
+ | 'checkLicense'
61
+ | 'uuid'
62
+ | 'port'
63
+ | 'deviceManager'
64
+ | 'topic'
65
+ | 'qrCode'
66
+ | 'state';
67
+
68
+ type ConfigIconType =
69
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
70
+ | 'edit'
71
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
72
+ | 'auth'
73
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
74
+ | 'send'
75
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
76
+ | 'web'
77
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
78
+ | 'warning'
79
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
80
+ | 'error'
81
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
82
+ | 'info'
83
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
84
+ | 'search'
85
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
86
+ | 'book'
87
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
88
+ | 'help'
89
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
90
+ | 'upload'
91
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
92
+ | 'user'
93
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
94
+ | 'group'
95
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
96
+ | 'delete'
97
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
98
+ | 'refresh'
99
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
100
+ | 'add'
101
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
102
+ | 'unpair'
103
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
104
+ | 'pair'
105
+ | string;
20
106
 
21
107
  export interface ConfigItemConfirmData {
22
108
  condition: string;
@@ -74,15 +160,10 @@ export interface ConfigItem {
74
160
  width?: string | number;
75
161
 
76
162
  // generated from alsoDependsOn
77
- // eslint-disable-next-line no-use-before-define
78
163
  confirmDependsOn?: ConfigItemIndexed[];
79
- // eslint-disable-next-line no-use-before-define
80
164
  onChangeDependsOn?: ConfigItemIndexed[];
81
- // eslint-disable-next-line no-use-before-define
82
165
  hiddenDependsOn?: ConfigItemIndexed[];
83
- // eslint-disable-next-line no-use-before-define
84
166
  labelDependsOn?: ConfigItemIndexed[];
85
- // eslint-disable-next-line no-use-before-define
86
167
  helpDependsOn?: ConfigItemIndexed[];
87
168
  }
88
169
 
@@ -120,10 +201,10 @@ export interface ConfigItemSelectOption {
120
201
  }
121
202
 
122
203
  export interface ConfigItemPanel extends ConfigItem {
204
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
123
205
  type: 'panel' | never;
124
206
  /** Label of tab */
125
207
  label?: ioBroker.StringOrTranslated;
126
- // eslint-disable-next-line no-use-before-define
127
208
  items: Record<string, ConfigItemAny>;
128
209
  /** only possible as not part of tabs */
129
210
  collapsable?: boolean;
@@ -234,10 +315,12 @@ export interface ConfigItemPassword extends ConfigItem {
234
315
  export interface ConfigItemObjectId extends ConfigItem {
235
316
  type: 'objectId';
236
317
  /** Desired type: `channel`, `device`, ... (has only `state` by default). It is plural, because `type` is already occupied. */
318
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
237
319
  types?: ObjectBrowserType | ObjectBrowserType[];
238
320
  /** Show only this root object and its children */
239
321
  root?: string;
240
- /** Cannot be used together with `type` settings. It is an object and not a JSON string. Examples
322
+ /**
323
+ * Cannot be used together with `type` settings. It is an object and not a JSON string. Examples
241
324
  * - `{common: {custom: true}}` - show only objects with some custom settings
242
325
  * - `{common: {custom: 'sql.0'}}` - show only objects with sql.0 custom settings (only of the specific instance)
243
326
  * - `{common: {custom: '_dataSources'}}` - show only objects of adapters `influxdb` or `sql` or `history`
@@ -297,6 +380,7 @@ export interface ConfigItemUser extends ConfigItem {
297
380
 
298
381
  export interface ConfigItemStaticDivider extends ConfigItem {
299
382
  type: 'divider';
383
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
300
384
  color?: 'primary' | 'secondary' | string;
301
385
  height?: string | number;
302
386
  }
@@ -354,15 +438,19 @@ export interface ConfigItemFunc extends ConfigItem {
354
438
 
355
439
  export interface ConfigItemSelect extends ConfigItem {
356
440
  type: 'select';
357
- /** `[{label: {en: "option 1"}, value: 1}, ...]` or
358
- `[{"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}]`
359
- */
360
- options: (ConfigItemSelectOption | {
361
- items: ConfigItemSelectOption[];
362
- label: ioBroker.StringOrTranslated;
363
- value?: number | string;
364
- hidden?: string | boolean;
365
- })[];
441
+ /**
442
+ * `[{label: {en: "option 1"}, value: 1}, ...]` or
443
+ * `[{"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}]`
444
+ */
445
+ options: (
446
+ | ConfigItemSelectOption
447
+ | {
448
+ items: ConfigItemSelectOption[];
449
+ label: ioBroker.StringOrTranslated;
450
+ value?: number | string;
451
+ hidden?: string | boolean;
452
+ }
453
+ )[];
366
454
  attr?: string;
367
455
  }
368
456
 
@@ -416,6 +504,7 @@ export interface ConfigItemAccordion extends ConfigItem {
416
504
 
417
505
  export interface ConfigItemDivider extends ConfigItem {
418
506
  type: 'divider';
507
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
419
508
  color?: 'primary' | 'secondary' | string;
420
509
  height?: string | number;
421
510
  }
@@ -543,13 +632,13 @@ export interface ConfigItemState extends ConfigItem {
543
632
  min?: number;
544
633
  /** Maximum value for control type slider or number */
545
634
  max?: number;
546
- /** Step value for control type slider or number */
635
+ /** Step value for control type slider or number */
547
636
  step?: number;
548
637
  /** delay in ms for slider or number */
549
638
  controlDelay?: number;
550
639
  /** Variant of button */
551
640
  variant?: 'contained' | 'outlined' | 'text';
552
- }
641
+ }
553
642
 
554
643
  export interface ConfigItemTextSendTo extends Omit<ConfigItem, 'data'> {
555
644
  type: 'textSendTo';
@@ -781,22 +870,62 @@ export interface ConfigItemFileSelector extends ConfigItem {
781
870
  noSize?: boolean;
782
871
  }
783
872
 
784
- export type ConfigItemAny = ConfigItemAlive | ConfigItemAutocomplete |
785
- ConfigItemAutocompleteSendTo | ConfigItemPanel |
786
- ConfigItemTabs | ConfigItemText |
787
- ConfigItemNumber | ConfigItemColor | ConfigItemCheckbox |
788
- ConfigItemSlider | ConfigItemIP | ConfigItemUser | ConfigItemRoom | ConfigItemFunc |
789
- ConfigItemSelect | ConfigItemAccordion | ConfigItemCoordinates |
790
- ConfigItemDivider | ConfigItemHeader | ConfigItemCustom | ConfigItemDatePicker |
791
- ConfigItemDeviceManager | ConfigItemLanguage | ConfigItemPort | ConfigItemSendTo | ConfigItemState |
792
- ConfigItemTable | ConfigItemTimePicker | ConfigItemTextSendTo | ConfigItemSelectSendTo |
793
- ConfigItemCertCollection | ConfigItemCertificateSelect | ConfigItemCertificates | ConfigItemUUID |
794
- ConfigItemCheckLicense | ConfigItemPattern | ConfigItemChip | ConfigItemCRON | ConfigItemFile |
795
- ConfigItemFileSelector | ConfigItemImageSendTo | ConfigItemInstanceSelect | ConfigItemImageUpload |
796
- ConfigItemInterface | ConfigItemJsonEditor | ConfigItemLicense | ConfigItemPassword |
797
- ConfigItemSetState | ConfigItemStaticDivider | ConfigItemStaticHeader |
798
- ConfigItemStaticImage | ConfigItemStaticText | ConfigItemTopic |
799
- ConfigItemObjectId | ConfigItemQrCode;
873
+ export type ConfigItemAny =
874
+ | ConfigItemAlive
875
+ | ConfigItemAutocomplete
876
+ | ConfigItemAutocompleteSendTo
877
+ | ConfigItemPanel
878
+ | ConfigItemTabs
879
+ | ConfigItemText
880
+ | ConfigItemNumber
881
+ | ConfigItemColor
882
+ | ConfigItemCheckbox
883
+ | ConfigItemSlider
884
+ | ConfigItemIP
885
+ | ConfigItemUser
886
+ | ConfigItemRoom
887
+ | ConfigItemFunc
888
+ | ConfigItemSelect
889
+ | ConfigItemAccordion
890
+ | ConfigItemCoordinates
891
+ | ConfigItemDivider
892
+ | ConfigItemHeader
893
+ | ConfigItemCustom
894
+ | ConfigItemDatePicker
895
+ | ConfigItemDeviceManager
896
+ | ConfigItemLanguage
897
+ | ConfigItemPort
898
+ | ConfigItemSendTo
899
+ | ConfigItemState
900
+ | ConfigItemTable
901
+ | ConfigItemTimePicker
902
+ | ConfigItemTextSendTo
903
+ | ConfigItemSelectSendTo
904
+ | ConfigItemCertCollection
905
+ | ConfigItemCertificateSelect
906
+ | ConfigItemCertificates
907
+ | ConfigItemUUID
908
+ | ConfigItemCheckLicense
909
+ | ConfigItemPattern
910
+ | ConfigItemChip
911
+ | ConfigItemCRON
912
+ | ConfigItemFile
913
+ | ConfigItemFileSelector
914
+ | ConfigItemImageSendTo
915
+ | ConfigItemInstanceSelect
916
+ | ConfigItemImageUpload
917
+ | ConfigItemInterface
918
+ | ConfigItemJsonEditor
919
+ | ConfigItemLicense
920
+ | ConfigItemPassword
921
+ | ConfigItemSetState
922
+ | ConfigItemStaticDivider
923
+ | ConfigItemStaticHeader
924
+ | ConfigItemStaticImage
925
+ | ConfigItemStaticText
926
+ | ConfigItemTopic
927
+ | ConfigItemObjectId
928
+ | ConfigItemQrCode;
800
929
 
801
930
  // Notification GUI
802
931
 
@@ -826,6 +955,7 @@ export interface BackEndCommandOpenLink extends BackEndCommandGeneric {
826
955
  /** Link url. Could be relative ('#blabla') or absolute ('https://blabla') */
827
956
  url: string;
828
957
  /** Target of the link. Default is `_self` for relative and '_blank' for absolute links */
958
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
829
959
  target?: '_self' | '_blank' | string;
830
960
  /** If GUI should be closed after the link was opened (Only for target='_self') */
831
961
  close?: boolean;
package/package.json CHANGED
@@ -1,27 +1,28 @@
1
1
  {
2
- "name": "@iobroker/json-config",
3
- "description": "This package contains the ioBroker JSON config UI components",
4
- "version": "7.1.1",
5
- "main": "./build/index.js",
6
- "types": "./build/index.d.ts",
7
- "scripts": {
8
- "build": "tsc && tsc-alias && node after_build",
9
- "clean": "rimraf build",
10
- "prepublishOnly": "npm run build",
11
- "build:ts": "tsc -p tsconfig.json",
12
- "lint": "eslint src --ext .js,.jsx,.ts,.tsx"
13
- },
14
- "publishConfig": {
15
- "access": "public"
16
- },
17
- "dependencies": {
18
- "@iobroker/adapter-react-v5": "^7.1.4",
19
- "crypto-js": "^4.2.0",
20
- "react-ace": "^12.0.0"
21
- },
22
- "files": [
23
- "build/",
24
- "LICENSE"
25
- ],
26
- "gitHead": "3c62b96591c3bf70b7c7f3396eb98fb9f8270d89"
2
+ "name": "@iobroker/json-config",
3
+ "description": "This package contains the ioBroker JSON config UI components",
4
+ "version": "7.1.2",
5
+ "main": "./build/index.js",
6
+ "types": "./build/index.d.ts",
7
+ "scripts": {
8
+ "build": "tsc && tsc-alias && node after_build",
9
+ "clean": "rimraf build",
10
+ "prepublishOnly": "npm run build",
11
+ "build:ts": "tsc -p tsconfig.json",
12
+ "lint": "eslint -c eslint.config.mjs src",
13
+ "prettier": "prettier --write src/**/*.{ts,tsx,js,jsx,json,css,scss,md,html}"
14
+ },
15
+ "publishConfig": {
16
+ "access": "public"
17
+ },
18
+ "dependencies": {
19
+ "@iobroker/adapter-react-v5": "^7.1.4",
20
+ "crypto-js": "^4.2.0",
21
+ "react-ace": "^12.0.0"
22
+ },
23
+ "files": [
24
+ "build/",
25
+ "LICENSE"
26
+ ],
27
+ "gitHead": "c67e8958a005e961b0a971e8066df0d39f3471a4"
27
28
  }