@iobroker/adapter-react-v5 7.2.3 → 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 +3 -3
  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 +21 -21
  20. package/{Components → build/Components}/FileBrowser.js +253 -248
  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 +7 -4
  56. package/{Components → build/Components}/ObjectBrowser.js +1183 -1133
  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 +3 -3
  65. package/{Components → build/Components}/Schedule.js +246 -261
  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 -56
  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 -47
  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 -2550
  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 -8935
  322. package/src/Components/Router.tsx +0 -90
  323. package/src/Components/SaveCloseButtons.tsx +0 -117
  324. package/src/Components/Schedule.tsx +0 -1995
  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
package/README.md CHANGED
@@ -12,8 +12,8 @@ If you want to create the configuration page with ReactJS:
12
12
  4. Modify package.json file in src directory:
13
13
  - Change `name` from `src` to `ADAPTERNAME-admin` (Of course replace `ADAPTERNAME` with yours)
14
14
  - Add to devDependencies:
15
- ```
16
- "@iobroker/adapter-react-v5": "^7.2.3",
15
+ ```json
16
+ "@iobroker/adapter-react-v5": "^7.2.6",
17
17
  ```
18
18
  Versions can be higher.
19
19
  So your `src/package.json` should look like:
@@ -24,7 +24,7 @@ If you want to create the configuration page with ReactJS:
24
24
  "version": "0.1.0",
25
25
  "private": true,
26
26
  "dependencies": {
27
- "@iobroker/adapter-react-v5": "^7.2.3",
27
+ "@iobroker/adapter-react-v5": "^7.2.6",
28
28
  "@iobroker/build-tools": "^1.0.0",
29
29
  "@iobroker/eslint-config": "^0.1.2",
30
30
  "@mui/material": "^6.0.2",
@@ -0,0 +1 @@
1
+ export { AdminConnection } from '@iobroker/socket-client';
@@ -0,0 +1,2 @@
1
+ export { AdminConnection } from '@iobroker/socket-client';
2
+ //# sourceMappingURL=AdminConnection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AdminConnection.js","sourceRoot":"./src/","sources":["AdminConnection.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC","sourcesContent":["export { AdminConnection } from '@iobroker/socket-client';\n"]}
@@ -1,14 +1,11 @@
1
- import React, { type JSX } from 'react';
1
+ import React, {} from 'react';
2
2
  import { Box } from '@mui/material';
3
-
4
3
  /*
5
4
  Copyright 2019 Robin Selmer
6
5
  https://codepen.io/robinselmer/pen/vJjbOZ
7
6
  */
8
-
9
- import I18n from '../i18n';
10
-
11
- const styles: Record<string, any> = {
7
+ import { I18n } from '../i18n';
8
+ const styles = {
12
9
  content: {
13
10
  background: 'black',
14
11
  position: 'absolute',
@@ -62,7 +59,6 @@ const styles: Record<string, any> = {
62
59
  animation: 'scan 7.5s linear 0s infinite',
63
60
  },
64
61
  },
65
-
66
62
  terminal: {
67
63
  boxSizing: 'inherit',
68
64
  position: 'absolute',
@@ -85,38 +81,17 @@ const styles: Record<string, any> = {
85
81
  color: 'white',
86
82
  },
87
83
  };
88
-
89
84
  /** Generates the 404 error page */
90
- function Page404(): JSX.Element {
91
- return (
92
- <div style={styles.content}>
93
- <div style={styles.root}>
94
- <Box
95
- component="div"
96
- sx={styles.overlay}
97
- >
98
- <div style={styles.terminal}>
99
- <h1>
100
- {I18n.t('ra_Error')}
101
- <span style={styles.errorCode}>404</span>
102
- </h1>
103
- <Box
104
- component="p"
105
- sx={styles.output}
106
- >
107
- {I18n.t('ra_The page you are looking for was not found')}
108
- </Box>
109
- <Box
110
- component="p"
111
- sx={styles.output}
112
- >
113
- {I18n.t('ra_Good luck')}
114
- </Box>
115
- </div>
116
- </Box>
117
- </div>
118
- </div>
119
- );
85
+ function Page404() {
86
+ return (React.createElement("div", { style: styles.content },
87
+ React.createElement("div", { style: styles.root },
88
+ React.createElement(Box, { component: "div", sx: styles.overlay },
89
+ React.createElement("div", { style: styles.terminal },
90
+ React.createElement("h1", null,
91
+ I18n.t('ra_Error'),
92
+ React.createElement("span", { style: styles.errorCode }, "404")),
93
+ React.createElement(Box, { component: "p", sx: styles.output }, I18n.t('ra_The page you are looking for was not found')),
94
+ React.createElement(Box, { component: "p", sx: styles.output }, I18n.t('ra_Good luck')))))));
120
95
  }
121
-
122
96
  export default Page404;
97
+ //# sourceMappingURL=404.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"404.js","sourceRoot":"./src/","sources":["Components/404.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAY,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEpC;;;EAGE;AAEF,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,MAAM,MAAM,GAAwB;IAChC,OAAO,EAAE;QACL,UAAU,EAAE,OAAO;QACnB,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,CAAC;QACN,MAAM,EAAE,CAAC;QACT,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,CAAC;KACX;IACD,IAAI,EAAE;QACF,SAAS,EAAE,YAAY;QACvB,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,MAAM;QACb,eAAe,EAAE,SAAS;QAC1B,eAAe,EAAE,oCAAoC;QACrD,UAAU,EAAE,sCAAsC;QAClD,QAAQ,EAAE,QAAQ;QAClB,KAAK,EAAE,0BAA0B;QACjC,UAAU,EAAE;yCACqB;KACpC;IACD,OAAO,EAAE;QACL,aAAa,EAAE,MAAM;QACrB,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,MAAM;QACd,UAAU,EAAE;;;;mCAIe;QAC3B,cAAc,EAAE,UAAU;QAC1B,MAAM,EAAE,EAAE;QACV,WAAW,EAAE;YACT,OAAO,EAAE,IAAI;YACb,aAAa,EAAE,MAAM;YACrB,QAAQ,EAAE,UAAU;YACpB,OAAO,EAAE,OAAO;YAChB,GAAG,EAAE,CAAC;YACN,IAAI,EAAE,CAAC;YACP,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,MAAM;YAC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nCopyright 2019 Robin Selmer\nhttps://codepen.io/robinselmer/pen/vJjbOZ\n*/\n\nimport { I18n } from '../i18n';\n\nconst styles: Record<string, any> = {\n content: {\n background: 'black',\n position: 'absolute',\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n },\n root: {\n boxSizing: 'border-box',\n height: '100%',\n width: '100%',\n backgroundColor: '#000000',\n backgroundImage: 'radial-gradient(#104254 , #05181c)',\n fontFamily: \"'Inconsolata', Helvetica, sans-serif\",\n fontSize: '1.5rem',\n color: 'rgba(128, 175, 255, 0.8)',\n textShadow: `0 0 1ex rgba(51, 70, 255, 1),\n 0 0 2px rgba(255, 255, 255, 0.8)`,\n },\n overlay: {\n pointerEvents: 'none',\n width: '100%',\n height: '100%',\n background: `repeating-linear-gradient(\n 180deg,\n rgba(0, 0, 0, 0) 0,\n rgba(0, 0, 0, 0.3) 50%,\n rgba(0, 0, 0, 0) 100%)`,\n backgroundSize: 'auto 4px',\n zIndex: 99,\n '&::before': {\n content: '\"\"',\n pointerEvents: 'none',\n position: 'absolute',\n display: 'block',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n width: '100%',\n height: '100%',\n backgroundImage: `linear-gradient(\n 0deg,\n transparent 0%,\n rgba(32, 50, 128, 0.2) 2%,\n rgba(32, 50, 128, 0.8) 3%,\n rgba(32, 50, 128, 0.2) 3%,\n transparent 100%)`,\n backgroundRepeat: 'no-repeat',\n animation: 'scan 7.5s linear 0s infinite',\n },\n },\n\n terminal: {\n boxSizing: 'inherit',\n position: 'absolute',\n height: '100%',\n width: 'calc(100% - 8rem)',\n maxWidth: '100%',\n padding: '4rem',\n textTransform: 'uppercase',\n },\n output: {\n color: 'rgba(128, 175, 255, 0.8)',\n textShadow: `\n 0 0 1px rgba(51, 70, 255, 0.4),\n 0 0 2px rgba(255, 255, 255, 0.8)`,\n '&::before': {\n content: '\"> \"',\n },\n },\n errorCode: {\n color: 'white',\n },\n};\n\n/** Generates the 404 error page */\nfunction Page404(): JSX.Element {\n return (\n <div style={styles.content}>\n <div style={styles.root}>\n <Box\n component=\"div\"\n sx={styles.overlay}\n >\n <div style={styles.terminal}>\n <h1>\n {I18n.t('ra_Error')}\n <span style={styles.errorCode}>404</span>\n </h1>\n <Box\n component=\"p\"\n sx={styles.output}\n >\n {I18n.t('ra_The page you are looking for was not found')}\n </Box>\n <Box\n component=\"p\"\n sx={styles.output}\n >\n {I18n.t('ra_Good luck')}\n </Box>\n </div>\n </Box>\n </div>\n </div>\n );\n}\n\nexport default Page404;\n"]}
@@ -47,7 +47,7 @@ interface ColorPickerState {
47
47
  /**
48
48
  * A color picker component.
49
49
  */
50
- declare class ColorPicker extends Component<ColorPickerProps, ColorPickerState> {
50
+ export declare class ColorPicker extends Component<ColorPickerProps, ColorPickerState> {
51
51
  /**
52
52
  * Constructor for the color picker.
53
53
  *
@@ -83,4 +83,4 @@ declare class ColorPicker extends Component<ColorPickerProps, ColorPickerState>
83
83
  renderCustomPalette(): React.JSX.Element | null;
84
84
  render(): React.JSX.Element;
85
85
  }
86
- export default ColorPicker;
86
+ export {};
@@ -1,31 +1,3 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
1
  /**
30
2
  * Copyright 2018-2024 Denis Haev (bluefox) <dogafox@gmail.com>
31
3
  *
@@ -41,11 +13,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
41
13
  * See the License for the specific language governing permissions and
42
14
  * limitations under the License.
43
15
  */
44
- const react_1 = __importStar(require("react"));
45
- const react_color_1 = require("react-color");
46
- const material_1 = require("@mui/material");
47
- const icons_material_1 = require("@mui/icons-material");
48
- const i18n_1 = __importDefault(require("../i18n"));
16
+ import React, { Component } from 'react';
17
+ import { ChromePicker } from 'react-color';
18
+ import { TextField, Menu, IconButton, Button, Box } from '@mui/material';
19
+ import { Delete as IconDelete, Close as IconClose } from '@mui/icons-material';
20
+ import { I18n } from '../i18n';
49
21
  const styles = {
50
22
  color: {
51
23
  width: 36,
@@ -114,7 +86,7 @@ const styles = {
114
86
  /**
115
87
  * A color picker component.
116
88
  */
117
- class ColorPicker extends react_1.Component {
89
+ export class ColorPicker extends Component {
118
90
  /**
119
91
  * Constructor for the color picker.
120
92
  *
@@ -122,24 +94,21 @@ class ColorPicker extends react_1.Component {
122
94
  */
123
95
  constructor(props) {
124
96
  super(props);
125
- this.handleClick = (e) => {
126
- this.setState({
127
- displayColorPicker: !this.state.displayColorPicker,
128
- anchorEl: this.state.displayColorPicker ? null : e.currentTarget,
129
- });
130
- };
131
- this.handleClose = () => {
132
- this.setState({ displayColorPicker: false, anchorEl: null });
133
- };
134
- this.handleChange = (color) => {
135
- this.setState({ color }, () => this.props.onChange && this.props.onChange(ColorPicker.getColor(color)));
136
- };
137
97
  this.state = {
138
98
  displayColorPicker: false,
139
99
  color: this.props.value || this.props.color || '',
140
100
  anchorEl: null,
141
101
  };
142
102
  }
103
+ handleClick = (e) => {
104
+ this.setState({
105
+ displayColorPicker: !this.state.displayColorPicker,
106
+ anchorEl: this.state.displayColorPicker ? null : e.currentTarget,
107
+ });
108
+ };
109
+ handleClose = () => {
110
+ this.setState({ displayColorPicker: false, anchorEl: null });
111
+ };
143
112
  /**
144
113
  * Convert the given color to hex ('#rrggbb') or rgba ('rgba(r,g,b,a)') format.
145
114
  *
@@ -178,10 +147,13 @@ class ColorPicker extends react_1.Component {
178
147
  const r = parseInt(m[1], 10).toString(16).padStart(2, '0');
179
148
  const g = parseInt(m[2], 10).toString(16).padStart(2, '0');
180
149
  const b = parseInt(m[3], 10).toString(16).padStart(2, '0');
181
- return (m === null || m === void 0 ? void 0 : m.length) === 4 ? `#${r}${g}${b}` : rgb;
150
+ return m?.length === 4 ? `#${r}${g}${b}` : rgb;
182
151
  }
183
152
  return rgb;
184
153
  }
154
+ handleChange = (color) => {
155
+ this.setState({ color }, () => this.props.onChange && this.props.onChange(ColorPicker.getColor(color)));
156
+ };
185
157
  /**
186
158
  * If the props are updated from outside, they should override the state
187
159
  *
@@ -198,40 +170,53 @@ class ColorPicker extends react_1.Component {
198
170
  if (!this.props.customPalette) {
199
171
  return null;
200
172
  }
201
- return (react_1.default.createElement("div", { style: { width: '100%', display: 'flex', flexWrap: 'wrap' } }, this.props.customPalette.map(color => (react_1.default.createElement(material_1.Button, { style: styles.button, key: color, onClick: () => {
173
+ return (React.createElement("div", { style: { width: '100%', display: 'flex', flexWrap: 'wrap' } }, this.props.customPalette.map(color => (React.createElement(Button, { style: styles.button, key: color, onClick: () => {
202
174
  this.handleChange(color);
203
175
  setTimeout(() => this.handleClose(), 300);
204
176
  } },
205
- react_1.default.createElement("div", { style: Object.assign(Object.assign({}, styles.iconButton), { background: color }) }))))));
177
+ React.createElement("div", { style: { ...styles.iconButton, background: color } }))))));
206
178
  }
207
179
  render() {
208
- var _a;
209
- const style = Object.assign({}, (this.props.style || {}));
180
+ const style = { ...(this.props.style || {}) };
210
181
  style.position = 'relative';
211
182
  const { color } = this.state;
212
- return (react_1.default.createElement(material_1.Box, { component: "div", style: style, sx: this.props.sx || undefined, className: this.props.className || '' },
213
- this.props.noInputField ? null : (react_1.default.createElement(material_1.TextField, { disabled: this.props.disabled, variant: "standard", id: "ar_color_picker_name", label: this.props.label || this.props.name, value: color || '', margin: "dense", sx: {
183
+ return (React.createElement(Box, { component: "div", style: style, sx: this.props.sx || undefined, className: this.props.className || '' },
184
+ this.props.noInputField ? null : (React.createElement(TextField, { disabled: this.props.disabled, variant: "standard", id: "ar_color_picker_name", label: this.props.label || this.props.name, value: color || '', margin: "dense", sx: {
214
185
  '&.MuiFormControl-root': styles.textDense,
215
186
  width: color ? 'calc(100% - 80px)' : 'calc(100% - 56px)',
216
187
  mr: color ? undefined : 1,
217
188
  }, onChange: e => this.handleChange(e.target.value) })),
218
- !this.props.noInputField && color ? (react_1.default.createElement(material_1.IconButton, { disabled: this.props.disabled, onClick: () => this.handleChange(''), size: "small", style: Object.assign(Object.assign({}, (this.props.label || this.props.name ? styles.delButton : undefined)), (color ? undefined : { opacity: 0, cursor: 'default' })) },
219
- react_1.default.createElement(icons_material_1.Delete, null))) : null,
220
- react_1.default.createElement(material_1.Box, { component: "div", onClick: e => !this.props.disabled && this.handleClick(e), title: i18n_1.default.t('ra_Select color'), sx: Object.assign(Object.assign(Object.assign({}, styles.swatch), (this.props.disabled ? styles.swatchDisabled : undefined)), { background: color ? undefined : 'transparent', border: color ? undefined : '1px dashed #ccc', boxSizing: 'border-box', marginTop: this.props.noInputField || !(this.props.label || this.props.name) ? 0 : undefined }) },
221
- react_1.default.createElement("div", { style: Object.assign(Object.assign({}, styles.color), { background: ColorPicker.getColor(color), width: this.props.noInputField ? this.props.barWidth || 16 : this.props.barWidth || 36 }) })),
222
- this.state.displayColorPicker && !this.props.disabled ? (react_1.default.createElement(material_1.Menu, { sx: Object.assign(Object.assign({}, styles.popover), { '&. MuiMenu-list': styles.popoverList }), anchorEl: this.state.anchorEl, open: !0, onClose: () => this.handleClose() },
223
- react_1.default.createElement(react_color_1.ChromePicker, { color: this.state.color || undefined, onChangeComplete: (_color) => this.handleChange(_color.rgb), styles: {
189
+ !this.props.noInputField && color ? (React.createElement(IconButton, { disabled: this.props.disabled, onClick: () => this.handleChange(''), size: "small", style: this.props.label || this.props.name ? styles.delButton : undefined },
190
+ React.createElement(IconDelete, null))) : null,
191
+ React.createElement(Box, { component: "div", onClick: e => !this.props.disabled && this.handleClick(e), title: I18n.t('ra_Select color'), sx: {
192
+ ...styles.swatch,
193
+ ...(this.props.disabled ? styles.swatchDisabled : undefined),
194
+ background: color ? undefined : 'transparent',
195
+ border: color ? undefined : '1px dashed #ccc',
196
+ boxSizing: 'border-box',
197
+ marginTop: this.props.noInputField || !(this.props.label || this.props.name) ? 0 : undefined,
198
+ } },
199
+ React.createElement("div", { style: {
200
+ ...styles.color,
201
+ background: ColorPicker.getColor(color),
202
+ width: this.props.noInputField ? this.props.barWidth || 16 : this.props.barWidth || 36,
203
+ } })),
204
+ this.state.displayColorPicker && !this.props.disabled ? (React.createElement(Menu, { sx: {
205
+ ...styles.popover,
206
+ '&. MuiMenu-list': styles.popoverList,
207
+ }, anchorEl: this.state.anchorEl, open: !0, onClose: () => this.handleClose() },
208
+ React.createElement(ChromePicker, { color: this.state.color || undefined, onChangeComplete: (_color) => this.handleChange(_color.rgb), styles: {
224
209
  default: {
225
210
  picker: {
226
- backgroundColor: ((_a = this.props.theme) === null || _a === void 0 ? void 0 : _a.palette.background.paper) || '#888',
211
+ backgroundColor: this.props.theme?.palette.background.paper || '#888',
227
212
  },
228
213
  },
229
214
  } }),
230
- color && this.props.noInputField ? (react_1.default.createElement(material_1.IconButton, { sx: styles.closeButton, onClick: () => this.handleChange('') },
231
- react_1.default.createElement(icons_material_1.Delete, null))) : null,
232
- react_1.default.createElement(material_1.IconButton, { sx: styles.closeButton, onClick: () => this.handleClose() },
233
- react_1.default.createElement(icons_material_1.Close, null)),
215
+ color && this.props.noInputField ? (React.createElement(IconButton, { sx: styles.closeButton, onClick: () => this.handleChange('') },
216
+ React.createElement(IconDelete, null))) : null,
217
+ React.createElement(IconButton, { sx: styles.closeButton, onClick: () => this.handleClose() },
218
+ React.createElement(IconClose, null)),
234
219
  this.renderCustomPalette())) : null));
235
220
  }
236
221
  }
237
- exports.default = ColorPicker;
222
+ //# sourceMappingURL=ColorPicker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColorPicker.js","sourceRoot":"./src/","sources":["Components/ColorPicker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAsB,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAiB,MAAM,aAAa,CAAC;AAE1D,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEzE,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAE/E,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAI/B,MAAM,MAAM,GAAwB;IAChC,KAAK,EAAE;QACH,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,YAAY,EAAE,CAAC;KAClB;IACD,SAAS,EAAE;QACP,SAAS,EAAE,EAAE;KAChB;IACD,MAAM,EAAE;QACJ,EAAE,EAAE,MAAM;QACV,CAAC,EAAE,KAAK;QACR,eAAe,EAAE,kBAAkB;QACnC,YAAY,EAAE,KAAK;QACnB,SAAS,EAAE,0BAA0B;QACrC,OAAO,EAAE,cAAc;QACvB,MAAM,EAAE,SAAS;QACjB,aAAa,EAAE,QAAQ;KAC1B;IACD,cAAc,EAAE;QACZ,OAAO,EAAE,GAAG;QACZ,MAAM,EAAE,SAAS;KACpB;IACD,OAAO,EAAE;QACL,kBAAkB,EAAE;YAChB,SAAS,EAAE,OAAO;YAClB,eAAe,EAA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,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAChC,oBAAC,UAAU,IACP,EAAE,EAAE,MAAM,CAAC,WAAW,EACtB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC;oBAEpC,oBAAC,UAAU,OAAG,CACL,CAChB,CAAC,CAAC,CAAC,IAAI;gBACR,oBAAC,UAAU,IACP,EAAE,EAAE,MAAM,CAAC,WAAW,EACtB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE;oBAEjC,oBAAC,SAAS,OAAG,CACJ;gBACZ,IAAI,CAAC,mBAAmB,EAAE,CACxB,CACV,CAAC,CAAC,CAAC,IAAI,CACN,CACT,CAAC;IACN,CAAC;CACJ","sourcesContent":["/**\n * Copyright 2018-2024 Denis Haev (bluefox) <dogafox@gmail.com>\n *\n * Licensed under the Creative Commons Attribution-NonCommercial License, Version 4.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://creativecommons.org/licenses/by-nc/4.0/legalcode.txt\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport React, { Component, type CSSProperties } from 'react';\nimport { ChromePicker, type RGBColor } from 'react-color';\n\nimport { TextField, Menu, IconButton, Button, Box } from '@mui/material';\n\nimport { Delete as IconDelete, Close as IconClose } from '@mui/icons-material';\n\nimport { I18n } from '../i18n';\n\nimport type { IobTheme } from '../types';\n\nconst styles: Record<string, any> = {\n color: {\n width: 36,\n height: 14,\n borderRadius: 2,\n },\n delButton: {\n marginTop: 16,\n },\n swatch: {\n mt: '16px',\n p: '5px',\n backgroundColor: 'background.paper',\n borderRadius: '1px',\n boxShadow: '0 0 0 1px rgba(0,0,0,.1)',\n display: 'inline-block',\n cursor: 'pointer',\n verticalAlign: 'middle',\n },\n swatchDisabled: {\n opacity: 0.5,\n cursor: 'default',\n },\n popover: {\n '& .MuiPaper-root': {\n textAlign: 'right',\n backgroundColor: '#00000000',\n boxShadow: 'none',\n },\n },\n popoverList: {\n padding: 0,\n },\n closeButton: (theme: IobTheme) => ({\n backgroundColor: `${theme.palette.background.paper} !important`,\n borderRadius: '0 0 25% 25%',\n '&:hover': {\n backgroundColor: `${theme.palette.secondary.main} !important`,\n },\n }),\n cover: {\n position: 'fixed',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n },\n textDense: {\n mt: 0,\n mb: 0,\n },\n picker: (theme: IobTheme) => ({\n background: `${theme.palette.background.paper} !important`,\n }),\n iconButton: {\n width: 16,\n height: 16,\n },\n button: {\n width: 32,\n height: 32,\n minWidth: 32,\n minHeight: 32,\n },\n};\n\ninterface ColorPickerProps {\n /** Set to true to disable the color picker. */\n disabled?: boolean;\n /** The currently selected color. */\n value?: string;\n /** @deprecated The currently selected color use value */\n color?: string;\n /** The color change callback. */\n onChange: (rgba: string) => void;\n /** Label of the color picker. */\n label?: string;\n /** @deprecated TLabel of the color picker use label */\n name?: string;\n /** Additional styling for this component. */\n style?: CSSProperties;\n /** The CSS class name. */\n className?: string;\n customPalette?: string[];\n noInputField?: boolean;\n barWidth?: number;\n sx?: Record<string, any>;\n theme?: IobTheme;\n}\n\ninterface ColorPickerState {\n displayColorPicker: boolean;\n color: string | RGBColor;\n anchorEl: HTMLDivElement | null;\n}\n\n/**\n * A color picker component.\n */\nexport class ColorPicker extends Component<ColorPickerProps, ColorPickerState> {\n /**\n * Constructor for the color picker.\n *\n * @param props The properties.\n */\n constructor(props: ColorPickerProps) {\n super(props);\n this.state = {\n displayColorPicker: false,\n color: this.props.value || this.props.color || '',\n anchorEl: null,\n };\n }\n\n private handleClick = (e: React.MouseEvent<HTMLDivElement>): void => {\n this.setState({\n displayColorPicker: !this.state.displayColorPicker,\n anchorEl: this.state.displayColorPicker ? null : e.currentTarget,\n });\n };\n\n private handleClose = (): void => {\n this.setState({ displayColorPicker: false, anchorEl: null });\n };\n\n /**\n * Convert the given color to hex ('#rrggbb') or rgba ('rgba(r,g,b,a)') format.\n *\n * @param color The color to convert.\n * @param isHex If true, the color will be converted to hex format.\n * @returns the hex or rgba representation of the given color.\n */\n static getColor(color: string | { rgb: RGBColor } | RGBColor, isHex?: boolean): string {\n if (color && typeof color === 'object') {\n const oColor = color as { rgb: RGBColor };\n if (oColor.rgb) {\n if (isHex) {\n return `#${oColor.rgb.r.toString(16).padStart(2, '0')}${oColor.rgb.g.toString(16).padStart(2, '0')}${oColor.rgb.b.toString(16).padStart(2, '0')}`;\n }\n return `rgba(${oColor.rgb.r},${oColor.rgb.g},${oColor.rgb.b},${oColor.rgb.a})`;\n }\n const rColor = color as RGBColor;\n if (isHex) {\n return `#${rColor.r.toString(16).padStart(2, '0')}${rColor.g.toString(16).padStart(2, '0')}${rColor.b.toString(16).padStart(2, '0')}`;\n }\n return `rgba(${rColor.r},${rColor.g},${rColor.b},${rColor.a})`;\n }\n if (typeof color === 'string') {\n return isHex ? ColorPicker.rgb2hex(color || '') : color || '';\n }\n return '';\n }\n\n /**\n * Convert rgb() or rgba() format to hex format #rrggbb.\n *\n * @param rgb The color in rgb() or rgba() format. if not in this format, the color will be returned as is.\n */\n static rgb2hex(rgb: string): string {\n const m = rgb.match(/^rgba?[\\s+]?\\([\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?/i);\n\n if (m) {\n const r = parseInt(m[1], 10).toString(16).padStart(2, '0');\n const g = parseInt(m[2], 10).toString(16).padStart(2, '0');\n const b = parseInt(m[3], 10).toString(16).padStart(2, '0');\n\n return m?.length === 4 ? `#${r}${g}${b}` : rgb;\n }\n return rgb;\n }\n\n private handleChange = (color: string | RGBColor): void => {\n this.setState({ color }, () => this.props.onChange && this.props.onChange(ColorPicker.getColor(color)));\n };\n\n /**\n * If the props are updated from outside, they should override the state\n *\n * @param _prevProps The previous properties.\n * @param prevState The previous state.\n */\n componentDidUpdate(_prevProps: ColorPickerProps, prevState: ColorPickerState): void {\n const color = ColorPicker.getColor(this.props.color || this.props.value || '');\n\n if (color !== prevState.color) {\n this.setState({ color });\n }\n }\n\n renderCustomPalette(): React.JSX.Element | null {\n if (!this.props.customPalette) {\n return null;\n }\n return (\n <div style={{ width: '100%', display: 'flex', flexWrap: 'wrap' }}>\n {this.props.customPalette.map(color => (\n <Button\n style={styles.button}\n key={color}\n onClick={() => {\n this.handleChange(color);\n setTimeout(() => this.handleClose(), 300);\n }}\n >\n <div style={{ ...styles.iconButton, background: color }} />\n </Button>\n ))}\n </div>\n );\n }\n\n render(): React.JSX.Element {\n const style = { ...(this.props.style || {}) };\n style.position = 'relative';\n const { color } = this.state;\n\n return (\n <Box\n component=\"div\"\n style={style}\n sx={this.props.sx || undefined}\n className={this.props.className || ''}\n >\n {this.props.noInputField ? null : (\n <TextField\n disabled={this.props.disabled}\n variant=\"standard\"\n id=\"ar_color_picker_name\"\n label={this.props.label || this.props.name}\n value={color || ''}\n margin=\"dense\"\n sx={{\n '&.MuiFormControl-root': styles.textDense,\n width: color ? 'calc(100% - 80px)' : 'calc(100% - 56px)',\n mr: color ? undefined : 1,\n }}\n onChange={e => this.handleChange(e.target.value)}\n />\n )}\n {!this.props.noInputField && color ? (\n <IconButton\n disabled={this.props.disabled}\n onClick={() => this.handleChange('')}\n size=\"small\"\n style={this.props.label || this.props.name ? styles.delButton : undefined}\n >\n <IconDelete />\n </IconButton>\n ) : null}\n <Box\n component=\"div\"\n onClick={e => !this.props.disabled && this.handleClick(e)}\n title={I18n.t('ra_Select color')}\n sx={{\n ...styles.swatch,\n ...(this.props.disabled ? styles.swatchDisabled : undefined),\n background: color ? undefined : 'transparent',\n border: color ? undefined : '1px dashed #ccc',\n boxSizing: 'border-box',\n marginTop: this.props.noInputField || !(this.props.label || this.props.name) ? 0 : undefined,\n }}\n >\n <div\n style={{\n ...styles.color,\n background: ColorPicker.getColor(color),\n width: this.props.noInputField ? this.props.barWidth || 16 : this.props.barWidth || 36,\n }}\n />\n </Box>\n {this.state.displayColorPicker && !this.props.disabled ? (\n <Menu\n sx={{\n ...styles.popover,\n '&. MuiMenu-list': styles.popoverList,\n }}\n anchorEl={this.state.anchorEl}\n open={!0}\n onClose={() => this.handleClose()}\n >\n <ChromePicker\n color={this.state.color || undefined}\n onChangeComplete={(_color: { rgb: RGBColor }) => this.handleChange(_color.rgb)}\n styles={{\n default: {\n picker: {\n backgroundColor: this.props.theme?.palette.background.paper || '#888',\n },\n },\n }}\n />\n {color && this.props.noInputField ? (\n <IconButton\n sx={styles.closeButton}\n onClick={() => this.handleChange('')}\n >\n <IconDelete />\n </IconButton>\n ) : null}\n <IconButton\n sx={styles.closeButton}\n onClick={() => this.handleClose()}\n >\n <IconClose />\n </IconButton>\n {this.renderCustomPalette()}\n </Menu>\n ) : null}\n </Box>\n );\n }\n}\n"]}
@@ -25,7 +25,7 @@ interface ComplexCronState {
25
25
  dow?: string;
26
26
  modes: CronProps;
27
27
  }
28
- declare class ComplexCron extends Component<ComplexCronProps, ComplexCronState> {
28
+ export declare class ComplexCron extends Component<ComplexCronProps, ComplexCronState> {
29
29
  constructor(props: ComplexCronProps);
30
30
  static cron2state(cron: string): CronProps;
31
31
  static state2cron(state: ComplexCronState | CronProps): string;
@@ -37,4 +37,4 @@ declare class ComplexCron extends Component<ComplexCronProps, ComplexCronState>
37
37
  setCronAttr(attr: CronNames, value: string, modes?: CronProps): void;
38
38
  render(): React.JSX.Element;
39
39
  }
40
- export default ComplexCron;
40
+ export {};
@@ -1,35 +1,7 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- const react_1 = __importStar(require("react"));
30
- const material_1 = require("@mui/material");
31
- const i18n_1 = __importDefault(require("../i18n"));
32
- const cronText_1 = __importDefault(require("./SimpleCron/cronText"));
1
+ import React, { Component } from 'react';
2
+ import { Checkbox, Button, MenuItem, Select, FormControlLabel, AppBar, Tabs, Tab, TextField } from '@mui/material';
3
+ import { I18n } from '../i18n';
4
+ import convertCronToText from './SimpleCron/cronText';
33
5
  const styles = {
34
6
  mainDiv: {
35
7
  width: '100%',
@@ -165,7 +137,7 @@ function convertArrayIntoMinus(value, max) {
165
137
  }
166
138
  return newParts.join(',');
167
139
  }
168
- class ComplexCron extends react_1.Component {
140
+ export class ComplexCron extends Component {
169
141
  constructor(props) {
170
142
  super(props);
171
143
  let cron = typeof this.props.cronExpression === 'string'
@@ -274,19 +246,19 @@ class ComplexCron extends react_1.Component {
274
246
  }
275
247
  const parts = convertMinusIntoArray(this.state[type], max);
276
248
  return [
277
- react_1.default.createElement(material_1.Button, { key: "removeall", variant: "outlined", style: styles.numberButton,
249
+ React.createElement(Button, { key: "removeall", variant: "outlined", style: styles.numberButton,
278
250
  // style={{paddingBottom: 20}}
279
- color: "primary", onClick: () => this.onToggle(false, type, max) }, i18n_1.default.t('ra_Deselect all')),
280
- react_1.default.createElement(material_1.Button, { key: "addall", variant: "contained",
251
+ color: "primary", onClick: () => this.onToggle(false, type, max) }, I18n.t('ra_Deselect all')),
252
+ React.createElement(Button, { key: "addall", variant: "contained",
281
253
  // style={{paddingBottom: 20}}
282
- style: styles.numberButton, color: "secondary", onClick: () => this.onToggle(true, type, max) }, i18n_1.default.t('ra_Select all')),
283
- react_1.default.createElement("div", { key: "all" }, values.map(i => [
254
+ style: styles.numberButton, color: "secondary", onClick: () => this.onToggle(true, type, max) }, I18n.t('ra_Select all')),
255
+ React.createElement("div", { key: "all" }, values.map(i => [
284
256
  (max === 7 && i === 4) ||
285
257
  (max === 12 && i === 7) ||
286
258
  (max === 31 && !((i - 1) % 10)) ||
287
259
  (max === 60 && i && !(i % 10)) ||
288
- (max === 24 && i && !(i % 6)) ? (react_1.default.createElement("div", { key: `allInner${i}`, style: { width: '100%' } })) : null,
289
- react_1.default.createElement(material_1.Button, { key: `_${i}`, variant: parts.indexOf(i) !== -1 ? 'contained' : 'outlined', style: styles.numberButton, color: parts.indexOf(i) !== -1 ? 'secondary' : 'primary', onClick: () => this.onToggle(i, type, max) }, max === 7 ? i18n_1.default.t(WEEKDAYS[i]) : max === 12 ? MONTHS[i - 1] : i),
260
+ (max === 24 && i && !(i % 6)) ? (React.createElement("div", { key: `allInner${i}`, style: { width: '100%' } })) : null,
261
+ React.createElement(Button, { key: `_${i}`, variant: parts.indexOf(i) !== -1 ? 'contained' : 'outlined', style: styles.numberButton, color: parts.indexOf(i) !== -1 ? 'secondary' : 'primary', onClick: () => this.onToggle(i, type, max) }, max === 7 ? I18n.t(WEEKDAYS[i]) : max === 12 ? MONTHS[i - 1] : i),
290
262
  ])),
291
263
  ];
292
264
  }
@@ -309,8 +281,8 @@ class ComplexCron extends react_1.Component {
309
281
  if (everyN && value) {
310
282
  valueNumber = parseInt(value.replace('*/', ''), 10) || 1;
311
283
  }
312
- return (react_1.default.createElement("div", null,
313
- react_1.default.createElement(material_1.Select, { variant: "standard", style: Object.assign(Object.assign({}, styles.periodSelect), { verticalAlign: 'bottom' }), value: select, onChange: e => {
284
+ return (React.createElement("div", null,
285
+ React.createElement(Select, { variant: "standard", style: { ...styles.periodSelect, verticalAlign: 'bottom' }, value: select, onChange: e => {
314
286
  const modes = JSON.parse(JSON.stringify(this.state.modes));
315
287
  modes[type] = e.target.value;
316
288
  if (e.target.value === 'every') {
@@ -328,10 +300,10 @@ class ComplexCron extends react_1.Component {
328
300
  this.setCronAttr(type, convertArrayIntoMinus(num, max), modes);
329
301
  }
330
302
  } },
331
- react_1.default.createElement(material_1.MenuItem, { key: "every", value: "every" }, i18n_1.default.t(`sc_every_${type}`)),
332
- react_1.default.createElement(material_1.MenuItem, { key: "everyN", value: "everyN" }, i18n_1.default.t(`sc_everyN_${type}`)),
333
- react_1.default.createElement(material_1.MenuItem, { key: "specific", value: "specific" }, i18n_1.default.t(`sc_specific_${type}`))),
334
- everyN && (react_1.default.createElement(material_1.TextField, { variant: "standard", key: "interval", label: i18n_1.default.t(`sc_${type}`), value: valueNumber, slotProps: {
303
+ React.createElement(MenuItem, { key: "every", value: "every" }, I18n.t(`sc_every_${type}`)),
304
+ React.createElement(MenuItem, { key: "everyN", value: "everyN" }, I18n.t(`sc_everyN_${type}`)),
305
+ React.createElement(MenuItem, { key: "specific", value: "specific" }, I18n.t(`sc_specific_${type}`))),
306
+ everyN && (React.createElement(TextField, { variant: "standard", key: "interval", label: I18n.t(`sc_${type}`), value: valueNumber, slotProps: {
335
307
  htmlInput: {
336
308
  min: 1,
337
309
  max,
@@ -347,9 +319,9 @@ class ComplexCron extends react_1.Component {
347
319
  }
348
320
  static convertCronToText(cron, lang) {
349
321
  if (cron.split(' ').includes('-')) {
350
- return i18n_1.default.t('ra_Invalid CRON');
322
+ return I18n.t('ra_Invalid CRON');
351
323
  }
352
- return (0, cronText_1.default)(cron, lang);
324
+ return convertCronToText(cron, lang);
353
325
  }
354
326
  setCronAttr(attr, value, modes) {
355
327
  if (modes) {
@@ -399,31 +371,31 @@ class ComplexCron extends react_1.Component {
399
371
  // Detect if every minute or every second is activated
400
372
  const everyMinute = this.state.minutes === '*' || this.state.minutes === '*/1';
401
373
  const everySecond = this.state.seconds === '*' || this.state.seconds === '*/1';
402
- return (react_1.default.createElement("div", { style: styles.mainDiv },
403
- react_1.default.createElement("div", { style: { paddingLeft: 8, width: 'calc(100% - px)' } },
404
- react_1.default.createElement(material_1.TextField, { variant: "standard", style: { width: '100%' }, value: this.state.cron, disabled: true })),
405
- react_1.default.createElement("div", { style: { paddingLeft: 8, width: 'calc(100% - px)', height: 60 } },
374
+ return (React.createElement("div", { style: styles.mainDiv },
375
+ React.createElement("div", { style: { paddingLeft: 8, width: 'calc(100% - px)' } },
376
+ React.createElement(TextField, { variant: "standard", style: { width: '100%' }, value: this.state.cron, disabled: true })),
377
+ React.createElement("div", { style: { paddingLeft: 8, width: 'calc(100% - px)', height: 60 } },
406
378
  ComplexCron.convertCronToText(this.state.cron, this.props.language || 'en'),
407
- react_1.default.createElement("span", { style: styles.warning }, everySecond
408
- ? i18n_1.default.t('ra_warning_every_second')
379
+ React.createElement("span", { style: styles.warning }, everySecond
380
+ ? I18n.t('ra_warning_every_second')
409
381
  : everyMinute
410
- ? i18n_1.default.t('ra_warning_every_minute')
382
+ ? I18n.t('ra_warning_every_minute')
411
383
  : '')),
412
- react_1.default.createElement(material_1.FormControlLabel, { control: react_1.default.createElement(material_1.Checkbox, { checked: !!this.state.seconds, onChange: e => this.setState({ seconds: e.target.checked ? '*' : false }, () => this.recalcCron()) }), label: i18n_1.default.t('ra_use seconds') }),
413
- react_1.default.createElement(material_1.AppBar, { position: "static", sx: { '&.MuiAppBar-root': styles.appBar }, color: "secondary" },
414
- react_1.default.createElement(material_1.Tabs, { value: this.state.tab, style: styles.appBar, color: "secondary", onChange: (_active, _tab) => this.setState({ tab: _tab }) },
415
- this.state.seconds !== false && (react_1.default.createElement(material_1.Tab, { id: "sc_seconds", label: i18n_1.default.t('sc_seconds') })),
416
- react_1.default.createElement(material_1.Tab, { id: "minutes", label: i18n_1.default.t('sc_minutes') }),
417
- react_1.default.createElement(material_1.Tab, { id: "hours", label: i18n_1.default.t('sc_hours') }),
418
- react_1.default.createElement(material_1.Tab, { id: "dates", label: i18n_1.default.t('sc_dates') }),
419
- react_1.default.createElement(material_1.Tab, { id: "months", label: i18n_1.default.t('sc_months') }),
420
- react_1.default.createElement(material_1.Tab, { id: "dow", label: i18n_1.default.t('sc_dows') }))),
421
- tab === 0 && react_1.default.createElement("div", { style: styles.tabContent }, this.getPeriodsTab('seconds', 60)),
422
- tab === 1 && react_1.default.createElement("div", { style: styles.tabContent }, this.getPeriodsTab('minutes', 60)),
423
- tab === 2 && react_1.default.createElement("div", { style: styles.tabContent }, this.getPeriodsTab('hours', 24)),
424
- tab === 3 && react_1.default.createElement("div", { style: styles.tabContent }, this.getPeriodsTab('dates', 31)),
425
- tab === 4 && react_1.default.createElement("div", { style: styles.tabContent }, this.getPeriodsTab('months', 12)),
426
- tab === 5 && react_1.default.createElement("div", { style: styles.tabContent }, this.getPeriodsTab('dow', 7))));
384
+ React.createElement(FormControlLabel, { control: React.createElement(Checkbox, { checked: !!this.state.seconds, onChange: e => this.setState({ seconds: e.target.checked ? '*' : false }, () => this.recalcCron()) }), label: I18n.t('ra_use seconds') }),
385
+ React.createElement(AppBar, { position: "static", sx: { '&.MuiAppBar-root': styles.appBar }, color: "secondary" },
386
+ React.createElement(Tabs, { value: this.state.tab, style: styles.appBar, color: "secondary", onChange: (_active, _tab) => this.setState({ tab: _tab }) },
387
+ this.state.seconds !== false && (React.createElement(Tab, { id: "sc_seconds", label: I18n.t('sc_seconds') })),
388
+ React.createElement(Tab, { id: "minutes", label: I18n.t('sc_minutes') }),
389
+ React.createElement(Tab, { id: "hours", label: I18n.t('sc_hours') }),
390
+ React.createElement(Tab, { id: "dates", label: I18n.t('sc_dates') }),
391
+ React.createElement(Tab, { id: "months", label: I18n.t('sc_months') }),
392
+ React.createElement(Tab, { id: "dow", label: I18n.t('sc_dows') }))),
393
+ tab === 0 && React.createElement("div", { style: styles.tabContent }, this.getPeriodsTab('seconds', 60)),
394
+ tab === 1 && React.createElement("div", { style: styles.tabContent }, this.getPeriodsTab('minutes', 60)),
395
+ tab === 2 && React.createElement("div", { style: styles.tabContent }, this.getPeriodsTab('hours', 24)),
396
+ tab === 3 && React.createElement("div", { style: styles.tabContent }, this.getPeriodsTab('dates', 31)),
397
+ tab === 4 && React.createElement("div", { style: styles.tabContent }, this.getPeriodsTab('months', 12)),
398
+ tab === 5 && React.createElement("div", { style: styles.tabContent }, this.getPeriodsTab('dow', 7))));
427
399
  }
428
400
  }
429
- exports.default = ComplexCron;
401
+ //# sourceMappingURL=ComplexCron.js.map