@iobroker/adapter-react-v5 7.2.4 → 7.2.6

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 (375) hide show
  1. package/README.md +6 -6
  2. package/build/AdminConnection.d.ts +1 -0
  3. package/build/AdminConnection.js +2 -0
  4. package/build/AdminConnection.js.map +1 -0
  5. package/{src/Components/404.tsx → build/Components/404.js} +14 -39
  6. package/build/Components/404.js.map +1 -0
  7. package/{Components → build/Components}/ColorPicker.d.ts +2 -2
  8. package/{Components → build/Components}/ColorPicker.js +50 -65
  9. package/build/Components/ColorPicker.js.map +1 -0
  10. package/{Components → build/Components}/ComplexCron.d.ts +2 -2
  11. package/{Components → build/Components}/ComplexCron.js +43 -71
  12. package/build/Components/ComplexCron.js.map +1 -0
  13. package/{Components → build/Components}/CopyToClipboard.d.ts +1 -2
  14. package/{src/Components/CopyToClipboard.tsx → build/Components/CopyToClipboard.js} +20 -38
  15. package/build/Components/CopyToClipboard.js.map +1 -0
  16. package/{Components → build/Components}/CustomModal.d.ts +3 -3
  17. package/build/Components/CustomModal.js +60 -0
  18. package/build/Components/CustomModal.js.map +1 -0
  19. package/{Components → build/Components}/FileBrowser.d.ts +2 -2
  20. package/{Components → build/Components}/FileBrowser.js +229 -236
  21. package/build/Components/FileBrowser.js.map +1 -0
  22. package/build/Components/FileViewer.d.ts +48 -0
  23. package/build/Components/FileViewer.js +277 -0
  24. package/build/Components/FileViewer.js.map +1 -0
  25. package/{Components → build/Components}/Icon.d.ts +1 -1
  26. package/build/Components/Icon.js +140 -0
  27. package/build/Components/Icon.js.map +1 -0
  28. package/{Components → build/Components}/IconPicker.d.ts +2 -2
  29. package/build/Components/IconPicker.js +73 -0
  30. package/build/Components/IconPicker.js.map +1 -0
  31. package/{Components → build/Components}/IconSelector.d.ts +3 -3
  32. package/{Components → build/Components}/IconSelector.js +29 -57
  33. package/build/Components/IconSelector.js.map +1 -0
  34. package/{Components → build/Components}/Image.d.ts +2 -2
  35. package/{Components → build/Components}/Image.js +16 -22
  36. package/build/Components/Image.js.map +1 -0
  37. package/{Components → build/Components}/Loader.d.ts +2 -2
  38. package/{Components → build/Components}/Loader.js +15 -40
  39. package/build/Components/Loader.js.map +1 -0
  40. package/{Components → build/Components}/Loaders/MV.d.ts +2 -2
  41. package/build/Components/Loaders/MV.js +61 -0
  42. package/build/Components/Loaders/MV.js.map +1 -0
  43. package/{Components → build/Components}/Loaders/PT.d.ts +2 -2
  44. package/{Components → build/Components}/Loaders/PT.js +10 -35
  45. package/build/Components/Loaders/PT.js.map +1 -0
  46. package/{Components → build/Components}/Loaders/Vendor.d.ts +2 -2
  47. package/build/Components/Loaders/Vendor.js +52 -0
  48. package/build/Components/Loaders/Vendor.js.map +1 -0
  49. package/{Components → build/Components}/Logo.d.ts +2 -2
  50. package/build/Components/Logo.js +108 -0
  51. package/build/Components/Logo.js.map +1 -0
  52. package/{Components → build/Components}/MDUtils.d.ts +1 -2
  53. package/{Components → build/Components}/MDUtils.js +4 -9
  54. package/build/Components/MDUtils.js.map +1 -0
  55. package/{Components → build/Components}/ObjectBrowser.d.ts +4 -4
  56. package/{Components → build/Components}/ObjectBrowser.js +1152 -1116
  57. package/build/Components/ObjectBrowser.js.map +1 -0
  58. package/{Components → build/Components}/Router.d.ts +1 -2
  59. package/{Components → build/Components}/Router.js +6 -7
  60. package/build/Components/Router.js.map +1 -0
  61. package/{Components → build/Components}/SaveCloseButtons.d.ts +2 -2
  62. package/build/Components/SaveCloseButtons.js +65 -0
  63. package/build/Components/SaveCloseButtons.js.map +1 -0
  64. package/{Components → build/Components}/Schedule.d.ts +2 -2
  65. package/{Components → build/Components}/Schedule.js +242 -257
  66. package/build/Components/Schedule.js.map +1 -0
  67. package/{Components → build/Components}/SelectWithIcon.d.ts +2 -2
  68. package/build/Components/SelectWithIcon.js +135 -0
  69. package/build/Components/SelectWithIcon.js.map +1 -0
  70. package/build/Components/SimpleCron/cronText.js +15 -0
  71. package/build/Components/SimpleCron/cronText.js.map +1 -0
  72. package/{Components → build/Components}/SimpleCron/index.d.ts +2 -2
  73. package/{Components → build/Components}/SimpleCron/index.js +55 -58
  74. package/build/Components/SimpleCron/index.js.map +1 -0
  75. package/{Components → build/Components}/TabContainer.d.ts +2 -2
  76. package/build/Components/TabContainer.js +23 -0
  77. package/build/Components/TabContainer.js.map +1 -0
  78. package/{Components → build/Components}/TabContent.d.ts +3 -2
  79. package/build/Components/TabContent.js +20 -0
  80. package/build/Components/TabContent.js.map +1 -0
  81. package/build/Components/TabHeader.d.ts +6 -0
  82. package/build/Components/TabHeader.js +6 -0
  83. package/build/Components/TabHeader.js.map +1 -0
  84. package/{Components → build/Components}/TableResize.d.ts +2 -2
  85. package/{src/Components/TableResize.tsx → build/Components/TableResize.js} +64 -134
  86. package/build/Components/TableResize.js.map +1 -0
  87. package/{Components → build/Components}/TextWithIcon.d.ts +2 -2
  88. package/{src/Components/TextWithIcon.tsx → build/Components/TextWithIcon.js} +30 -75
  89. package/build/Components/TextWithIcon.js.map +1 -0
  90. package/{Components → build/Components}/ToggleThemeMenu.d.ts +1 -1
  91. package/build/Components/ToggleThemeMenu.js +13 -0
  92. package/build/Components/ToggleThemeMenu.js.map +1 -0
  93. package/{Components → build/Components}/TreeTable.d.ts +3 -3
  94. package/{Components → build/Components}/TreeTable.js +87 -99
  95. package/build/Components/TreeTable.js.map +1 -0
  96. package/{Components → build/Components}/UploadImage.d.ts +2 -2
  97. package/{Components → build/Components}/UploadImage.js +46 -69
  98. package/build/Components/UploadImage.js.map +1 -0
  99. package/{Components → build/Components}/Utils.d.ts +2 -2
  100. package/{Components → build/Components}/Utils.js +47 -60
  101. package/build/Components/Utils.js.map +1 -0
  102. package/build/Components/withWidth.d.ts +2 -0
  103. package/build/Components/withWidth.js +22 -0
  104. package/build/Components/withWidth.js.map +1 -0
  105. package/build/Connection.d.ts +1 -0
  106. package/build/Connection.js +2 -0
  107. package/build/Connection.js.map +1 -0
  108. package/{Dialogs → build/Dialogs}/ComplexCron.d.ts +2 -2
  109. package/build/Dialogs/ComplexCron.js +85 -0
  110. package/build/Dialogs/ComplexCron.js.map +1 -0
  111. package/{Dialogs → build/Dialogs}/Confirm.d.ts +2 -2
  112. package/build/Dialogs/Confirm.js +83 -0
  113. package/build/Dialogs/Confirm.js.map +1 -0
  114. package/{Dialogs → build/Dialogs}/Cron.d.ts +2 -2
  115. package/build/Dialogs/Cron.js +72 -0
  116. package/build/Dialogs/Cron.js.map +1 -0
  117. package/{Dialogs → build/Dialogs}/Error.d.ts +2 -2
  118. package/build/Dialogs/Error.js +27 -0
  119. package/build/Dialogs/Error.js.map +1 -0
  120. package/{Dialogs → build/Dialogs}/Message.d.ts +2 -2
  121. package/build/Dialogs/Message.js +29 -0
  122. package/build/Dialogs/Message.js.map +1 -0
  123. package/{Dialogs → build/Dialogs}/SelectFile.d.ts +2 -2
  124. package/build/Dialogs/SelectFile.js +116 -0
  125. package/build/Dialogs/SelectFile.js.map +1 -0
  126. package/{Dialogs → build/Dialogs}/SelectID.d.ts +3 -3
  127. package/{Dialogs → build/Dialogs}/SelectID.js +28 -53
  128. package/build/Dialogs/SelectID.js.map +1 -0
  129. package/{Dialogs → build/Dialogs}/SimpleCron.d.ts +2 -2
  130. package/build/Dialogs/SimpleCron.js +46 -0
  131. package/build/Dialogs/SimpleCron.js.map +1 -0
  132. package/build/Dialogs/TextInput.d.ts +2 -0
  133. package/build/Dialogs/TextInput.js +31 -0
  134. package/build/Dialogs/TextInput.js.map +1 -0
  135. package/{GenericApp.d.ts → build/GenericApp.d.ts} +2 -3
  136. package/{GenericApp.js → build/GenericApp.js} +162 -176
  137. package/build/GenericApp.js.map +1 -0
  138. package/{LegacyConnection.d.ts → build/LegacyConnection.d.ts} +69 -4
  139. package/{LegacyConnection.js → build/LegacyConnection.js} +106 -99
  140. package/build/LegacyConnection.js.map +1 -0
  141. package/{Prompt.d.ts → build/Prompt.d.ts} +1 -1
  142. package/{Prompt.js → build/Prompt.js} +3 -4
  143. package/build/Prompt.js.map +1 -0
  144. package/build/Theme.d.ts +5 -0
  145. package/{Theme.js → build/Theme.js} +37 -32
  146. package/build/Theme.js.map +1 -0
  147. package/build/assets/devices/parseNames.d.ts +0 -0
  148. package/build/assets/devices/parseNames.js +35 -0
  149. package/build/assets/devices/parseNames.js.map +1 -0
  150. package/build/assets/rooms/parseNames.d.ts +0 -0
  151. package/build/assets/rooms/parseNames.js +35 -0
  152. package/build/assets/rooms/parseNames.js.map +1 -0
  153. package/build/dictionary.d.ts +1 -0
  154. package/build/dictionary.js +25 -0
  155. package/build/dictionary.js.map +1 -0
  156. package/build/i18n/de.json +449 -0
  157. package/build/i18n/en.json +449 -0
  158. package/build/i18n/es.json +449 -0
  159. package/build/i18n/fr.json +449 -0
  160. package/build/i18n/it.json +449 -0
  161. package/build/i18n/nl.json +449 -0
  162. package/build/i18n/pl.json +449 -0
  163. package/build/i18n/pt.json +449 -0
  164. package/build/i18n/ru.json +449 -0
  165. package/build/i18n/uk.json +449 -0
  166. package/build/i18n/zh-cn.json +449 -0
  167. package/{i18n.d.ts → build/i18n.d.ts} +2 -2
  168. package/{i18n.js → build/i18n.js} +9 -11
  169. package/build/i18n.js.map +1 -0
  170. package/build/icons/IconAdapter.d.ts +3 -0
  171. package/build/icons/IconAdapter.js +6 -0
  172. package/build/icons/IconAdapter.js.map +1 -0
  173. package/build/icons/IconAlias.d.ts +3 -0
  174. package/build/icons/IconAlias.js +6 -0
  175. package/build/icons/IconAlias.js.map +1 -0
  176. package/build/icons/IconChannel.d.ts +3 -0
  177. package/build/icons/IconChannel.js +9 -0
  178. package/build/icons/IconChannel.js.map +1 -0
  179. package/build/icons/IconClearFilter.d.ts +3 -0
  180. package/build/icons/IconClearFilter.js +7 -0
  181. package/build/icons/IconClearFilter.js.map +1 -0
  182. package/build/icons/IconClosed.d.ts +3 -0
  183. package/build/icons/IconClosed.js +6 -0
  184. package/build/icons/IconClosed.js.map +1 -0
  185. package/build/icons/IconCopy.d.ts +3 -0
  186. package/build/icons/IconCopy.js +5 -0
  187. package/build/icons/IconCopy.js.map +1 -0
  188. package/build/icons/IconDevice.d.ts +3 -0
  189. package/build/icons/IconDevice.js +15 -0
  190. package/build/icons/IconDevice.js.map +1 -0
  191. package/build/icons/IconDocument.d.ts +3 -0
  192. package/build/icons/IconDocument.js +6 -0
  193. package/build/icons/IconDocument.js.map +1 -0
  194. package/build/icons/IconDocumentReadOnly.d.ts +3 -0
  195. package/build/icons/IconDocumentReadOnly.js +7 -0
  196. package/build/icons/IconDocumentReadOnly.js.map +1 -0
  197. package/build/icons/IconExpert.d.ts +3 -0
  198. package/build/icons/IconExpert.js +6 -0
  199. package/build/icons/IconExpert.js.map +1 -0
  200. package/build/icons/IconFx.d.ts +3 -0
  201. package/build/icons/IconFx.js +5 -0
  202. package/build/icons/IconFx.js.map +1 -0
  203. package/build/icons/IconInstance.d.ts +3 -0
  204. package/build/icons/IconInstance.js +6 -0
  205. package/build/icons/IconInstance.js.map +1 -0
  206. package/build/icons/IconLogout.d.ts +3 -0
  207. package/build/icons/IconLogout.js +6 -0
  208. package/build/icons/IconLogout.js.map +1 -0
  209. package/build/icons/IconNoIcon.d.ts +3 -0
  210. package/build/icons/IconNoIcon.js +5 -0
  211. package/build/icons/IconNoIcon.js.map +1 -0
  212. package/build/icons/IconOpen.d.ts +3 -0
  213. package/build/icons/IconOpen.js +6 -0
  214. package/build/icons/IconOpen.js.map +1 -0
  215. package/{icons → build/icons}/IconProps.d.ts +1 -1
  216. package/build/icons/IconProps.js +2 -0
  217. package/build/icons/IconProps.js.map +1 -0
  218. package/build/icons/IconState.d.ts +3 -0
  219. package/build/icons/IconState.js +6 -0
  220. package/build/icons/IconState.js.map +1 -0
  221. package/build/index.d.ts +67 -0
  222. package/build/index.js +67 -0
  223. package/build/index.js.map +1 -0
  224. package/{types.d.ts → build/types.d.ts} +1 -1
  225. package/package.json +84 -48
  226. package/AdminConnection.d.ts +0 -2
  227. package/AdminConnection.js +0 -4
  228. package/Components/404.js +0 -101
  229. package/Components/CopyToClipboard.js +0 -163
  230. package/Components/CustomModal.js +0 -88
  231. package/Components/FileViewer.d.ts +0 -10
  232. package/Components/FileViewer.js +0 -305
  233. package/Components/Icon.js +0 -148
  234. package/Components/IconPicker.js +0 -98
  235. package/Components/Loaders/MV.js +0 -66
  236. package/Components/Loaders/Vendor.js +0 -77
  237. package/Components/Logo.js +0 -117
  238. package/Components/SaveCloseButtons.js +0 -69
  239. package/Components/SelectWithIcon.js +0 -168
  240. package/Components/SimpleCron/cronText.js +0 -19
  241. package/Components/TabContainer.js +0 -25
  242. package/Components/TabContent.js +0 -21
  243. package/Components/TabHeader.d.ts +0 -6
  244. package/Components/TabHeader.js +0 -11
  245. package/Components/TableResize.js +0 -226
  246. package/Components/TextWithIcon.js +0 -119
  247. package/Components/ToggleThemeMenu.js +0 -18
  248. package/Components/withWidth.d.ts +0 -3
  249. package/Components/withWidth.js +0 -27
  250. package/Connection.d.ts +0 -3
  251. package/Connection.js +0 -8
  252. package/Dialogs/ComplexCron.js +0 -90
  253. package/Dialogs/Confirm.js +0 -111
  254. package/Dialogs/Cron.js +0 -100
  255. package/Dialogs/Error.js +0 -55
  256. package/Dialogs/Message.js +0 -57
  257. package/Dialogs/SelectFile.js +0 -119
  258. package/Dialogs/SimpleCron.js +0 -51
  259. package/Dialogs/TextInput.d.ts +0 -3
  260. package/Dialogs/TextInput.js +0 -35
  261. package/Theme.d.ts +0 -6
  262. package/i18n/de.json +0 -449
  263. package/i18n/en.json +0 -449
  264. package/i18n/es.json +0 -449
  265. package/i18n/fr.json +0 -449
  266. package/i18n/it.json +0 -449
  267. package/i18n/nl.json +0 -449
  268. package/i18n/pl.json +0 -449
  269. package/i18n/pt.json +0 -449
  270. package/i18n/ru.json +0 -449
  271. package/i18n/uk.json +0 -449
  272. package/i18n/zh-cn.json +0 -449
  273. package/icons/IconAdapter.d.ts +0 -4
  274. package/icons/IconAdapter.js +0 -10
  275. package/icons/IconAlias.d.ts +0 -4
  276. package/icons/IconAlias.js +0 -10
  277. package/icons/IconChannel.d.ts +0 -4
  278. package/icons/IconChannel.js +0 -13
  279. package/icons/IconClearFilter.d.ts +0 -4
  280. package/icons/IconClearFilter.js +0 -11
  281. package/icons/IconClosed.d.ts +0 -4
  282. package/icons/IconClosed.js +0 -10
  283. package/icons/IconCopy.d.ts +0 -4
  284. package/icons/IconCopy.js +0 -9
  285. package/icons/IconDevice.d.ts +0 -4
  286. package/icons/IconDevice.js +0 -19
  287. package/icons/IconDocument.d.ts +0 -4
  288. package/icons/IconDocument.js +0 -10
  289. package/icons/IconDocumentReadOnly.d.ts +0 -4
  290. package/icons/IconDocumentReadOnly.js +0 -11
  291. package/icons/IconExpert.d.ts +0 -4
  292. package/icons/IconExpert.js +0 -10
  293. package/icons/IconFx.d.ts +0 -4
  294. package/icons/IconFx.js +0 -9
  295. package/icons/IconInstance.d.ts +0 -4
  296. package/icons/IconInstance.js +0 -10
  297. package/icons/IconLogout.d.ts +0 -4
  298. package/icons/IconLogout.js +0 -10
  299. package/icons/IconNoIcon.d.ts +0 -4
  300. package/icons/IconNoIcon.js +0 -9
  301. package/icons/IconOpen.d.ts +0 -4
  302. package/icons/IconOpen.js +0 -10
  303. package/icons/IconProps.js +0 -2
  304. package/icons/IconState.d.ts +0 -4
  305. package/icons/IconState.js +0 -10
  306. package/index.d.ts +0 -128
  307. package/index.js +0 -215
  308. package/src/AdminConnection.tsx +0 -3
  309. package/src/Components/ColorPicker.tsx +0 -343
  310. package/src/Components/ComplexCron.tsx +0 -561
  311. package/src/Components/CustomModal.tsx +0 -170
  312. package/src/Components/FileBrowser.tsx +0 -2560
  313. package/src/Components/FileViewer.tsx +0 -412
  314. package/src/Components/Icon.tsx +0 -238
  315. package/src/Components/IconPicker.tsx +0 -165
  316. package/src/Components/IconSelector.tsx +0 -2220
  317. package/src/Components/Image.tsx +0 -193
  318. package/src/Components/Loader.tsx +0 -328
  319. package/src/Components/Logo.tsx +0 -176
  320. package/src/Components/MDUtils.tsx +0 -104
  321. package/src/Components/ObjectBrowser.tsx +0 -8947
  322. package/src/Components/Router.tsx +0 -90
  323. package/src/Components/SaveCloseButtons.tsx +0 -117
  324. package/src/Components/Schedule.tsx +0 -1998
  325. package/src/Components/SelectWithIcon.tsx +0 -239
  326. package/src/Components/TabContainer.tsx +0 -57
  327. package/src/Components/TabContent.tsx +0 -38
  328. package/src/Components/TabHeader.tsx +0 -20
  329. package/src/Components/ToggleThemeMenu.tsx +0 -52
  330. package/src/Components/TreeTable.tsx +0 -1002
  331. package/src/Components/UploadImage.tsx +0 -643
  332. package/src/Components/Utils.tsx +0 -1802
  333. package/src/Components/loader.css +0 -231
  334. package/src/Components/withWidth.tsx +0 -32
  335. package/src/Connection.tsx +0 -5
  336. package/src/Dialogs/ComplexCron.tsx +0 -163
  337. package/src/Dialogs/Confirm.tsx +0 -185
  338. package/src/Dialogs/Cron.tsx +0 -192
  339. package/src/Dialogs/Error.tsx +0 -67
  340. package/src/Dialogs/Message.tsx +0 -73
  341. package/src/Dialogs/SelectFile.tsx +0 -280
  342. package/src/Dialogs/SelectID.tsx +0 -310
  343. package/src/Dialogs/SimpleCron.tsx +0 -101
  344. package/src/Dialogs/TextInput.tsx +0 -99
  345. package/src/GenericApp.tsx +0 -1076
  346. package/src/LegacyConnection.tsx +0 -3720
  347. package/src/Prompt.tsx +0 -22
  348. package/src/Theme.tsx +0 -472
  349. package/src/icons/IconAdapter.tsx +0 -22
  350. package/src/icons/IconAlias.tsx +0 -22
  351. package/src/icons/IconChannel.tsx +0 -60
  352. package/src/icons/IconClearFilter.tsx +0 -24
  353. package/src/icons/IconClosed.tsx +0 -22
  354. package/src/icons/IconCopy.tsx +0 -21
  355. package/src/icons/IconDevice.tsx +0 -126
  356. package/src/icons/IconDocument.tsx +0 -22
  357. package/src/icons/IconDocumentReadOnly.tsx +0 -27
  358. package/src/icons/IconExpert.tsx +0 -26
  359. package/src/icons/IconFx.tsx +0 -38
  360. package/src/icons/IconInstance.tsx +0 -22
  361. package/src/icons/IconLogout.tsx +0 -32
  362. package/src/icons/IconNoIcon.tsx +0 -21
  363. package/src/icons/IconOpen.tsx +0 -22
  364. package/src/icons/IconProps.tsx +0 -16
  365. package/src/icons/IconState.tsx +0 -38
  366. package/src/index.css +0 -56
  367. /package/{Components → build/Components}/404.d.ts +0 -0
  368. /package/{Components → build/Components}/SimpleCron/cronText.d.ts +0 -0
  369. /package/{assets → build/assets}/devices.json +0 -0
  370. /package/{assets → build/assets}/lamp_ceiling.svg +0 -0
  371. /package/{assets → build/assets}/lamp_table.svg +0 -0
  372. /package/{assets → build/assets}/no_icon.svg +0 -0
  373. /package/{assets → build/assets}/rooms.json +0 -0
  374. /package/{index.css → build/index.css} +0 -0
  375. /package/{tasks.js → tasksExample.js} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectID.js","sourceRoot":"./src/","sources":["Dialogs/SelectID.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,uHAAuH;AACvH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE1F,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAI5E,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,aAAa,EAA4B,MAAM,6BAA6B,CAAC;AAiFtF,MAAM,OAAO,cAAe,SAAQ,SAAmD;IAClE,UAAU,CAAS;IAE5B,OAAO,CAAsB;IAEpB,UAAU,CAAqC;IAEhE,YAAY,KAA0B;QAClC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,IAAI,SAAS,CAAC;QACrD,IAAI,CAAC,UAAU,GAAG,YAAY,IAAI,CAA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,EAC3B,KAAK,EAAC,EAAE,EACR,OAAO,EAAE,EAAE,GACb,CACU;YAChB,oBAAC,aAAa;gBACV,oBAAC,MAAM,IACH,EAAE,EAAE,yBAAyB,IAAI,CAAC,KAAK,CAAC,UAAU,IAAI,EAAE,EAAE,EAC1D,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,EAC9B,SAAS,EAAE,oBAAC,MAAM,OAAG,EACrB,QAAQ,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,EACrC,KAAK,EAAC,SAAS,IAEd,IAAI,CAAC,KAAK,CAAC,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAC5B;gBACT,oBAAC,MAAM,IACH,EAAE,EAAE,6BAA6B,IAAI,CAAC,KAAK,CAAC,UAAU,IAAI,EAAE,EAAE,EAC9D,KAAK,EAAC,MAAM,EACZ,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,EAClC,SAAS,EAAE,oBAAC,UAAU,OAAG,IAExB,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CACpC,CACG,CACX,CACZ,CAAC;IACN,CAAC;CACJ","sourcesContent":["/**\n * Copyright 2018-2023 Denis Haev (bluefox) <dogafox@gmail.com>\n *\n * MIT License\n *\n */\n// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined\nimport React, { Component, type JSX } from 'react';\n\nimport { Button, DialogTitle, DialogContent, DialogActions, Dialog } from '@mui/material';\n\nimport { Cancel as IconCancel, Check as IconOk } from '@mui/icons-material';\n\nimport type { Connection } from '../Connection';\n\nimport { I18n } from '../i18n';\nimport { ObjectBrowser, type ObjectBrowserFilter } from '../Components/ObjectBrowser';\nimport type { ObjectBrowserColumn, ObjectBrowserCustomFilter, ObjectBrowserType } from '../Components/types';\nimport type { IobTheme } from '../types';\n\nexport interface SelectIDFilters {\n id?: string;\n name?: string;\n room?: string;\n func?: string;\n role?: string;\n type?: string;\n custom?: string;\n}\n\ninterface DialogSelectIDProps {\n /** The internal name of the dialog; default: \"default\". Used to store settings in local storage */\n dialogName?: string;\n /** The dialog title; default: Please select object ID... (translated) */\n title?: string;\n /** Set to true to allow the selection of multiple IDs. */\n multiSelect?: boolean;\n /** Show folders before any leaves. */\n foldersFirst?: boolean;\n /** Path prefix for images (default: '.') */\n imagePrefix?: string;\n /** @deprecated same as imagePrefix */\n prefix?: string;\n /** Show the expert button */\n showExpertButton?: boolean;\n /** Force expert mode */\n expertMode?: boolean;\n /** optional ['name', 'type', 'role', 'room', 'func', 'val', 'buttons'] */\n columns?: ObjectBrowserColumn[];\n /** Object types to show; default: 'state' only */\n types?: ObjectBrowserType | ObjectBrowserType[];\n /** The language. */\n lang?: ioBroker.Languages;\n /** The socket connection. */\n socket: Connection;\n /** Can't objects be edited? (default: true) */\n notEditable?: boolean;\n /** Theme name. */\n themeName?: string;\n /** Theme type: dark or light */\n themeType?: string;\n /** The theme object */\n theme: IobTheme;\n /** The date format for the date columns */\n dateFormat?: string;\n /** Is use comma or point for displaying of float numbers */\n isFloatComma?: boolean;\n /** Custom filter. */\n customFilter?: ObjectBrowserCustomFilter;\n /** The selected IDs. */\n selected?: string | string[];\n /** The ok button text; default: OK (translated) */\n ok?: string;\n /** The cancel button text; default: Cancel (translated) */\n cancel?: string;\n /** Close handler that is always called when the dialog is closed. */\n onClose: () => void;\n /** Handler that is called when the user presses OK. */\n onOk: (selected: string | string[] | undefined, name: string) => void;\n /**\n * Function to filter out all unnecessary objects. Can be string or function.\n * It cannot be used together with \"types\".\n * Example for function: `obj => obj.common?.type === 'boolean'` to show only boolean states\n * In case of string, it must look like `obj.common && obj.common.type === 'boolean'`\n */\n filterFunc?: string | ((obj: ioBroker.Object) => boolean);\n /** predefined filter fields, like {\"id\":\"\",\"name\":\"\",\"room\":\"\",\"func\":\"\",\"role\":\"level\",\"type\":\"\",\"custom\":\"\"} */\n filters?: SelectIDFilters;\n /** Show elements only of this root ID */\n root?: string;\n}\n\ninterface DialogSelectIDState {\n selected: string[];\n name: string;\n}\n\nexport class DialogSelectID extends Component<DialogSelectIDProps, DialogSelectIDState> {\n private readonly dialogName: string;\n\n private filters: ObjectBrowserFilter;\n\n private readonly filterFunc?: (obj: ioBroker.Object) => boolean;\n\n constructor(props: DialogSelectIDProps) {\n super(props);\n this.dialogName = this.props.dialogName || 'default';\n this.dialogName = `SelectID.${this.dialogName}`;\n\n const filters: string = ((window as any)._localStorage || window.localStorage).getItem(this.dialogName) || '{}';\n\n try {\n this.filters = JSON.parse(filters);\n } catch {\n this.filters = {};\n }\n\n if (props.filters) {\n this.filters = { ...this.filters, ...(props.filters || {}) };\n }\n\n let selected = this.props.selected || [];\n if (!Array.isArray(selected)) {\n selected = [selected];\n }\n selected = selected.filter(id => id);\n\n if (props.filterFunc) {\n if (typeof props.filterFunc === 'string') {\n try {\n this.filterFunc = new Function('obj', props.filterFunc) as (obj: ioBroker.Object) => boolean;\n } catch {\n console.error(`Cannot parse filter function: \"obj => ${props.filterFunc}\"`);\n this.filterFunc = undefined;\n }\n } else {\n this.filterFunc = props.filterFunc;\n }\n }\n\n this.state = {\n selected,\n name: '',\n };\n }\n\n handleCancel(): void {\n this.props.onClose();\n }\n\n handleOk(): void {\n this.props.onOk(this.props.multiSelect ? this.state.selected : this.state.selected[0] || '', this.state.name);\n this.props.onClose();\n }\n\n render(): JSX.Element {\n let title;\n if (this.state.name || this.state.selected.length) {\n if (this.state.selected.length === 1) {\n title = [\n <span key=\"selected\">\n {I18n.t('ra_Selected')}\n &nbsp;\n </span>,\n <span\n key=\"id\"\n style={{ fontWeight: 'bold', fontStyle: 'italic' }}\n >\n {(this.state.name || this.state.selected[0]) +\n (this.state.name ? ` [${this.state.selected[0]}]` : '')}\n </span>,\n ];\n } else {\n title = [\n <span key=\"selected\">\n {I18n.t('ra_Selected')}\n &nbsp;\n </span>,\n <span\n key=\"id\"\n style={{ fontWeight: 'bold', fontStyle: 'italic' }}\n >\n {I18n.t('%s items', this.state.selected.length.toString())}\n </span>,\n ];\n }\n } else {\n title = this.props.title || I18n.t('ra_Please select object ID...');\n }\n\n return (\n <Dialog\n onClose={() => {}}\n maxWidth={false}\n sx={{\n '& .MuiDialog-paper': {\n height: '95%',\n p: '4px',\n width: '100%',\n maxWidth: '100%',\n maxHeight: 'calc(100% - 16px)',\n },\n }}\n fullWidth\n open={!0}\n aria-labelledby=\"ar_dialog_selectid_title\"\n >\n <DialogTitle\n id=\"ar_dialog_selectid_title\"\n style={{\n whiteSpace: 'nowrap',\n width: 'calc(100% - 72px)',\n overflow: 'hidden',\n display: 'inline-block',\n textOverflow: 'ellipsis',\n }}\n >\n {title}\n </DialogTitle>\n <DialogContent\n style={{\n height: '100%',\n overflow: 'hidden',\n padding: '8px 4px',\n }}\n >\n <ObjectBrowser\n foldersFirst={this.props.foldersFirst}\n imagePrefix={this.props.imagePrefix || this.props.prefix} // prefix is for back compatibility\n dateFormat={this.props.dateFormat}\n defaultFilters={this.filters}\n dialogName={this.dialogName}\n isFloatComma={this.props.isFloatComma}\n showExpertButton={\n this.props.showExpertButton !== undefined ? this.props.showExpertButton : true\n }\n expertMode={this.props.expertMode}\n // style={{ width: '100%', height: '100%' }}\n columns={this.props.columns || ['name', 'type', 'role', 'room', 'func', 'val']}\n types={\n this.props.types\n ? Array.isArray(this.props.types)\n ? this.props.types\n : [this.props.types]\n : ['state']\n }\n root={this.props.root}\n t={I18n.t}\n lang={this.props.lang || I18n.getLanguage()}\n socket={this.props.socket}\n selected={this.state.selected}\n multiSelect={this.props.multiSelect}\n notEditable={this.props.notEditable === undefined ? true : this.props.notEditable}\n // name={this.state.name}\n themeName={this.props.themeName}\n themeType={this.props.themeType}\n theme={this.props.theme}\n customFilter={this.props.customFilter}\n onFilterChanged={(filterConfig: ObjectBrowserFilter) => {\n this.filters = filterConfig;\n ((window as any)._localStorage || window.localStorage).setItem(\n this.dialogName,\n JSON.stringify(filterConfig),\n );\n }}\n onSelect={(_selected: string | string[], name: string, isDouble?: boolean) => {\n let selected: string[];\n if (!Array.isArray(_selected)) {\n selected = [_selected];\n } else {\n selected = _selected;\n }\n if (JSON.stringify(selected) !== JSON.stringify(this.state.selected)) {\n this.setState({ selected, name }, () => isDouble && this.handleOk());\n } else if (isDouble) {\n this.handleOk();\n }\n }}\n filterFunc={this.filterFunc}\n title=\"\"\n classes={{}}\n />\n </DialogContent>\n <DialogActions>\n <Button\n id={`ar_dialog_selectid_ok_${this.props.dialogName || ''}`}\n variant=\"contained\"\n onClick={() => this.handleOk()}\n startIcon={<IconOk />}\n disabled={!this.state.selected.length}\n color=\"primary\"\n >\n {this.props.ok || I18n.t('ra_Ok')}\n </Button>\n <Button\n id={`ar_dialog_selectid_cancel_${this.props.dialogName || ''}`}\n color=\"grey\"\n variant=\"contained\"\n onClick={() => this.handleCancel()}\n startIcon={<IconCancel />}\n >\n {this.props.cancel || I18n.t('ra_Cancel')}\n </Button>\n </DialogActions>\n </Dialog>\n );\n }\n}\n"]}
@@ -10,10 +10,10 @@ interface DialogCronProps {
10
10
  interface DialogCronState {
11
11
  cron: string;
12
12
  }
13
- declare class DialogSimpleCron extends React.Component<DialogCronProps, DialogCronState> {
13
+ export declare class DialogSimpleCron extends React.Component<DialogCronProps, DialogCronState> {
14
14
  constructor(props: DialogCronProps);
15
15
  handleCancel(): void;
16
16
  handleOk(): void;
17
17
  render(): JSX.Element;
18
18
  }
19
- export default DialogSimpleCron;
19
+ export {};
@@ -0,0 +1,46 @@
1
+ import React, {} from 'react';
2
+ import { Button, DialogTitle, DialogContent, DialogActions, Dialog } from '@mui/material';
3
+ import { Check as IconOk, Cancel as IconCancel } from '@mui/icons-material';
4
+ import { SimpleCron } from '../Components/SimpleCron';
5
+ import { I18n } from '../i18n';
6
+ // Generates cron expression
7
+ const styles = {
8
+ dialogPaper: {
9
+ height: 'calc(100% - 96px)',
10
+ },
11
+ };
12
+ export class DialogSimpleCron extends React.Component {
13
+ constructor(props) {
14
+ super(props);
15
+ let cron;
16
+ if (this.props.cron && typeof this.props.cron === 'string' && this.props.cron.replace(/^["']/, '')[0] !== '{') {
17
+ cron = this.props.cron.replace(/['"]/g, '').trim();
18
+ }
19
+ else {
20
+ cron = this.props.cron || '{}';
21
+ if (typeof cron === 'string') {
22
+ cron = cron.replace(/^["']/, '').replace(/["']\n?$/, '');
23
+ }
24
+ }
25
+ this.state = {
26
+ cron,
27
+ };
28
+ }
29
+ handleCancel() {
30
+ this.props.onClose();
31
+ }
32
+ handleOk() {
33
+ this.props.onOk(this.state.cron);
34
+ this.props.onClose();
35
+ }
36
+ render() {
37
+ return (React.createElement(Dialog, { onClose: () => { }, maxWidth: "md", fullWidth: true, sx: { '& .MuiDialog-paper': styles.dialogPaper }, open: !0, "aria-labelledby": "cron-dialog-title" },
38
+ React.createElement(DialogTitle, { id: "cron-dialog-title" }, this.props.title || I18n.t('ra_Define CRON...')),
39
+ React.createElement(DialogContent, { style: { height: '100%', overflow: 'hidden' } },
40
+ React.createElement(SimpleCron, { cronExpression: this.state.cron, onChange: (cron) => this.setState({ cron }), language: I18n.getLanguage() })),
41
+ React.createElement(DialogActions, null,
42
+ React.createElement(Button, { variant: "contained", disabled: !this.state.cron || this.state.cron.includes('_'), onClick: () => this.handleOk(), color: "primary", startIcon: React.createElement(IconOk, null) }, this.props.ok || I18n.t('ra_Ok')),
43
+ React.createElement(Button, { variant: "contained", onClick: () => this.handleCancel(), color: "grey", startIcon: React.createElement(IconCancel, null) }, this.props.cancel || I18n.t('ra_Cancel')))));
44
+ }
45
+ }
46
+ //# sourceMappingURL=SimpleCron.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SimpleCron.js","sourceRoot":"./src/","sources":["Dialogs/SimpleCron.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAY,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,MAAM,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C5B;gBACT,oBAAC,MAAM,IACH,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,EAClC,KAAK,EAAC,MAAM,EACZ,SAAS,EAAE,oBAAC,UAAU,OAAG,IAExB,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CACpC,CACG,CACX,CACZ,CAAC;IACN,CAAC;CACJ","sourcesContent":["import React, { type JSX } from 'react';\nimport { Button, DialogTitle, DialogContent, DialogActions, Dialog } from '@mui/material';\n\nimport { Check as IconOk, Cancel as IconCancel } from '@mui/icons-material';\n\nimport { SimpleCron } from '../Components/SimpleCron';\n\nimport { I18n } from '../i18n';\n\n// Generates cron expression\n\nconst styles: Record<string, React.CSSProperties> = {\n dialogPaper: {\n height: 'calc(100% - 96px)',\n },\n};\n\ninterface DialogCronProps {\n onClose: () => void;\n onOk: (cron: string) => void;\n title?: string;\n cron?: string;\n cancel?: string;\n ok?: string;\n}\n\ninterface DialogCronState {\n cron: string;\n}\n\nexport class DialogSimpleCron extends React.Component<DialogCronProps, DialogCronState> {\n constructor(props: DialogCronProps) {\n super(props);\n\n let cron;\n if (this.props.cron && typeof this.props.cron === 'string' && this.props.cron.replace(/^[\"']/, '')[0] !== '{') {\n cron = this.props.cron.replace(/['\"]/g, '').trim();\n } else {\n cron = this.props.cron || '{}';\n if (typeof cron === 'string') {\n cron = cron.replace(/^[\"']/, '').replace(/[\"']\\n?$/, '');\n }\n }\n\n this.state = {\n cron,\n };\n }\n\n handleCancel(): void {\n this.props.onClose();\n }\n\n handleOk(): void {\n this.props.onOk(this.state.cron);\n this.props.onClose();\n }\n\n render(): JSX.Element {\n return (\n <Dialog\n onClose={() => {}}\n maxWidth=\"md\"\n fullWidth\n sx={{ '& .MuiDialog-paper': styles.dialogPaper }}\n open={!0}\n aria-labelledby=\"cron-dialog-title\"\n >\n <DialogTitle id=\"cron-dialog-title\">{this.props.title || I18n.t('ra_Define CRON...')}</DialogTitle>\n <DialogContent style={{ height: '100%', overflow: 'hidden' }}>\n <SimpleCron\n cronExpression={this.state.cron}\n onChange={(cron: string) => this.setState({ cron })}\n language={I18n.getLanguage()}\n />\n </DialogContent>\n <DialogActions>\n <Button\n variant=\"contained\"\n disabled={!this.state.cron || this.state.cron.includes('_')}\n onClick={() => this.handleOk()}\n color=\"primary\"\n startIcon={<IconOk />}\n >\n {this.props.ok || I18n.t('ra_Ok')}\n </Button>\n <Button\n variant=\"contained\"\n onClick={() => this.handleCancel()}\n color=\"grey\"\n startIcon={<IconCancel />}\n >\n {this.props.cancel || I18n.t('ra_Cancel')}\n </Button>\n </DialogActions>\n </Dialog>\n );\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import { type JSX } from 'react';
2
+ export declare const DialogTextInput: (props: Record<string, any>) => JSX.Element /** The text replacement callback */;
@@ -0,0 +1,31 @@
1
+ import React, {} from 'react';
2
+ import { Button, TextField, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle } from '@mui/material';
3
+ import { Close as IconClose, Check as IconCheck } from '@mui/icons-material';
4
+ import { I18n } from '../i18n';
5
+ import { withWidth } from '../Components/withWidth';
6
+ function TextInputFunc(props) {
7
+ const [text, setText] = React.useState(props.input || props.value || '');
8
+ const [error, setError] = React.useState('');
9
+ return (React.createElement(Dialog, { open: !0, onClose: () => props.onClose(null), "aria-labelledby": "form-dialog-title", fullWidth: props.fullWidth !== undefined ? props.fullWidth : false },
10
+ React.createElement(DialogTitle, { id: "form-dialog-title" }, props.titleText),
11
+ React.createElement(DialogContent, null,
12
+ React.createElement(DialogContentText, null, props.promptText),
13
+ React.createElement(TextField, { variant: "standard", autoFocus: true, margin: "dense", error: !!error, helperText: error === true || !error ? '' : error, value: text, label: props.labelText || '', type: props.type || 'text', onKeyUp: e => e.code === 'Enter' && text && props.onClose(text), onChange: e => {
14
+ let _error = '';
15
+ if (props.verify) {
16
+ _error = !props.verify(e.target.value);
17
+ }
18
+ if (props.rule) {
19
+ setText(props.rule(e.target.value));
20
+ }
21
+ else {
22
+ setText(e.target.value);
23
+ }
24
+ setError(_error);
25
+ }, fullWidth: true })),
26
+ React.createElement(DialogActions, null,
27
+ React.createElement(Button, { variant: "contained", disabled: !text || !!error, onClick: () => props.onClose(text), color: "primary", startIcon: React.createElement(IconCheck, null) }, props.applyText || I18n.t('ra_Ok')),
28
+ React.createElement(Button, { color: "grey", variant: "contained", onClick: () => props.onClose(null), startIcon: React.createElement(IconClose, null) }, props.cancelText || I18n.t('ra_Cancel')))));
29
+ }
30
+ export const DialogTextInput = withWidth()(TextInputFunc);
31
+ //# sourceMappingURL=TextInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextInput.js","sourceRoot":"./src/","sources":["Dialogs/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAY,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAExH,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAE7E,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AA6BpD,SAAS,aAAa,CAAC,KAAqB;IACxC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAS,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;IACjF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAmB,EAAE,CAAC,CAAC;IAC/D,OAAO,CACH,oBAAC,MAAM,IACH,IAAI,EAAE,CAAC,CAAC,EACR,OAAO,EAAE,GAAG,EAAE,CA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ACD,QAAQ,CAAC,MAAM,CAAC,CAAC;gBACrB,CAAC,EACD,SAAS,SACX,CACU;QAChB,oBAAC,aAAa;YACV,oBAAC,MAAM,IACH,OAAO,EAAC,WAAW,EACnB,QAAQ,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,KAAK,EAC1B,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAClC,KAAK,EAAC,SAAS,EACf,SAAS,EAAE,oBAAC,SAAS,OAAG,IAEvB,KAAK,CAAC,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAC9B;YACT,oBAAC,MAAM,IACH,KAAK,EAAC,MAAM,EACZ,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAClC,SAAS,EAAE,oBAAC,SAAS,OAAG,IAEvB,KAAK,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CACnC,CACG,CACX,CACZ,CAAC;AACN,CAAC;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,SAAS,EAAE,CAAC,aAAa,CAAC,CAAC","sourcesContent":["import React, { type JSX } from 'react';\n\nimport { Button, TextField, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle } from '@mui/material';\n\nimport { Close as IconClose, Check as IconCheck } from '@mui/icons-material';\n\nimport { I18n } from '../i18n';\nimport { withWidth } from '../Components/withWidth';\n\ninterface TextInputProps {\n /** The dialog close callback */\n onClose: (text: string | null) => void;\n /** The title text */\n titleText: string;\n /** Prompt text (default: empty) */\n promptText?: string;\n /** Label text (default: empty) */\n labelText?: string;\n /** The text of the cancel button */\n cancelText: string;\n /** The text of the \"apply\" button */\n applyText: string;\n /** The verification callback. Return a non-empty string if there was an error */\n verify?: (text: string) => string;\n /** The text replacement callback */\n rule?: (text: string) => string;\n /** The type of the textbox (default: text) */\n type?: 'text' | 'number' | 'password' | 'email';\n /** The initial input value when opening the dialog */\n value?: string;\n /** @deprecated Use value. The input when opening the dialog */\n input?: string;\n /** If true, the dialog will be full width */\n fullWidth?: boolean;\n}\n\nfunction TextInputFunc(props: TextInputProps): JSX.Element {\n const [text, setText] = React.useState<string>(props.input || props.value || '');\n const [error, setError] = React.useState<string | boolean>('');\n return (\n <Dialog\n open={!0}\n onClose={() => props.onClose(null)}\n aria-labelledby=\"form-dialog-title\"\n fullWidth={props.fullWidth !== undefined ? props.fullWidth : false}\n >\n <DialogTitle id=\"form-dialog-title\">{props.titleText}</DialogTitle>\n <DialogContent>\n <DialogContentText>{props.promptText}</DialogContentText>\n <TextField\n variant=\"standard\"\n autoFocus\n margin=\"dense\"\n error={!!error}\n helperText={error === true || !error ? '' : error}\n value={text}\n label={props.labelText || ''}\n type={props.type || 'text'}\n onKeyUp={e => e.code === 'Enter' && text && props.onClose(text)}\n onChange={e => {\n let _error: string | boolean = '';\n if (props.verify) {\n _error = !props.verify(e.target.value);\n }\n\n if (props.rule) {\n setText(props.rule(e.target.value));\n } else {\n setText(e.target.value);\n }\n setError(_error);\n }}\n fullWidth\n />\n </DialogContent>\n <DialogActions>\n <Button\n variant=\"contained\"\n disabled={!text || !!error}\n onClick={() => props.onClose(text)}\n color=\"primary\"\n startIcon={<IconCheck />}\n >\n {props.applyText || I18n.t('ra_Ok')}\n </Button>\n <Button\n color=\"grey\"\n variant=\"contained\"\n onClick={() => props.onClose(null)}\n startIcon={<IconClose />}\n >\n {props.cancelText || I18n.t('ra_Cancel')}\n </Button>\n </DialogActions>\n </Dialog>\n );\n}\n\nexport const DialogTextInput = withWidth()(TextInputFunc);\n"]}
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import React, { type JSX } from 'react';
8
8
  import { type AdminConnection } from '@iobroker/socket-client';
9
- import Router from './Components/Router';
9
+ import { Router } from './Components/Router';
10
10
  import type { GenericAppProps, GenericAppState, GenericAppSettings, ThemeName, ThemeType, IobTheme, Width } from './types';
11
11
  declare global {
12
12
  /** If config has been changed */
@@ -23,7 +23,7 @@ declare global {
23
23
  };
24
24
  }
25
25
  }
26
- declare class GenericApp<TProps extends GenericAppProps = GenericAppProps, TState extends GenericAppState = GenericAppState> extends Router<TProps, TState> {
26
+ export declare class GenericApp<TProps extends GenericAppProps = GenericAppProps, TState extends GenericAppState = GenericAppState> extends Router<TProps, TState> {
27
27
  protected socket: AdminConnection;
28
28
  protected readonly instance: number;
29
29
  protected readonly adapterName: string;
@@ -206,4 +206,3 @@ declare class GenericApp<TProps extends GenericAppProps = GenericAppProps, TStat
206
206
  */
207
207
  render(): React.JSX.Element;
208
208
  }
209
- export default GenericApp;