@iobroker/adapter-react-v5 4.13.3 → 4.13.4

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 (469) hide show
  1. package/AdminConnection.js.map +1 -1
  2. package/Components/404.js +13 -13
  3. package/Components/ColorPicker.js +54 -54
  4. package/Components/ColorPicker.js.map +1 -1
  5. package/Components/ComplexCron.js.map +1 -1
  6. package/Components/FileBrowser.js +3 -3
  7. package/Components/FileViewer.js +9 -16
  8. package/Components/Loader.js +223 -223
  9. package/Components/Loaders/PT.css +108 -108
  10. package/Components/Loaders/PT.js +103 -103
  11. package/Components/Loaders/Vendor.css +13 -13
  12. package/Components/Loaders/Vendor.js +7 -7
  13. package/Components/ObjectBrowser.d.ts +2 -2
  14. package/Components/ObjectBrowser.js +359 -351
  15. package/Components/ObjectBrowser.js.map +1 -1
  16. package/Components/TabContent.d.ts +3 -7
  17. package/Components/TabContent.js +1 -3
  18. package/Components/TableResize.d.ts +20 -13
  19. package/Components/TableResize.js +244 -262
  20. package/Components/TreeTable.js +70 -70
  21. package/Components/TreeTable.js.map +1 -1
  22. package/Components/UploadImage.js +305 -305
  23. package/Components/loader.css +221 -221
  24. package/Components/types.d.ts +82 -82
  25. package/Components/withWidth.js +2 -2
  26. package/Components/withWidth.js.map +1 -1
  27. package/Connection.js.map +1 -1
  28. package/GenericApp.js +49 -49
  29. package/LICENSE +22 -22
  30. package/LegacyConnection.d.ts +4 -0
  31. package/LegacyConnection.js +14 -0
  32. package/Prompt.js +7 -7
  33. package/README.md +845 -841
  34. package/assets/devices/Alarm Systems.svg +18 -18
  35. package/assets/devices/Amplifier.svg +21 -21
  36. package/assets/devices/Awnings.svg +4 -4
  37. package/assets/devices/Battery Status.svg +4 -4
  38. package/assets/devices/Ceiling Spotlights.svg +15 -15
  39. package/assets/devices/Chandelier.svg +6 -6
  40. package/assets/devices/Climate.svg +11 -11
  41. package/assets/devices/Coffee Makers.svg +5 -5
  42. package/assets/devices/Cold Water.svg +31 -31
  43. package/assets/devices/Computer.svg +21 -21
  44. package/assets/devices/Consumption.svg +7 -7
  45. package/assets/devices/Curtains.svg +43 -43
  46. package/assets/devices/Dishwashers.svg +11 -11
  47. package/assets/devices/Doors.svg +5 -5
  48. package/assets/devices/Doorstep.svg +35 -35
  49. package/assets/devices/Dryer.svg +13 -13
  50. package/assets/devices/Fan.svg +20 -20
  51. package/assets/devices/Floor Lamps.svg +4 -4
  52. package/assets/devices/Garage Doors.svg +9 -9
  53. package/assets/devices/Gates.svg +32 -32
  54. package/assets/devices/Hairdryer.svg +23 -23
  55. package/assets/devices/Handle.svg +6 -6
  56. package/assets/devices/Hanging Lamps.svg +8 -8
  57. package/assets/devices/Heater.svg +44 -44
  58. package/assets/devices/Hoods.svg +11 -11
  59. package/assets/devices/Hot Water.svg +9 -9
  60. package/assets/devices/Humidity.svg +41 -41
  61. package/assets/devices/Iron.svg +4 -4
  62. package/assets/devices/Irrigation.svg +22 -22
  63. package/assets/devices/Led Strip.svg +30 -30
  64. package/assets/devices/Light.svg +29 -29
  65. package/assets/devices/Lightings.svg +46 -46
  66. package/assets/devices/Lock.svg +19 -19
  67. package/assets/devices/Louvre.svg +6 -6
  68. package/assets/devices/Mowing Machine.svg +8 -8
  69. package/assets/devices/Music.svg +12 -12
  70. package/assets/devices/Outdoor Blinds.svg +6 -6
  71. package/assets/devices/People.svg +19 -19
  72. package/assets/devices/Pool.svg +7 -7
  73. package/assets/devices/Power Consumption.svg +12 -12
  74. package/assets/devices/Printer.svg +9 -9
  75. package/assets/devices/Pump.svg +9 -9
  76. package/assets/devices/Receiver.svg +18 -18
  77. package/assets/devices/Sconces.svg +9 -9
  78. package/assets/devices/Security.svg +34 -34
  79. package/assets/devices/Shading.svg +4 -4
  80. package/assets/devices/Shutters.svg +10 -10
  81. package/assets/devices/SmokeDetector.svg +12 -12
  82. package/assets/devices/Sockets.svg +13 -13
  83. package/assets/devices/Speaker.svg +35 -35
  84. package/assets/devices/Stove.svg +11 -11
  85. package/assets/devices/Table Lamps.svg +11 -11
  86. package/assets/devices/Temperature Sensors.svg +28 -28
  87. package/assets/devices/Tv.svg +7 -7
  88. package/assets/devices/Vacuum Cleaner.svg +15 -15
  89. package/assets/devices/Ventilation.svg +12 -12
  90. package/assets/devices/Washing Machines.svg +15 -15
  91. package/assets/devices/Water Consumption.svg +5 -5
  92. package/assets/devices/Water Heater.svg +8 -8
  93. package/assets/devices/Water.svg +40 -40
  94. package/assets/devices/Weather.svg +28 -28
  95. package/assets/devices/Window.svg +7 -7
  96. package/assets/devices/list.json +993 -993
  97. package/assets/devices/names.txt +62 -62
  98. package/assets/devices/parseNames.js +34 -34
  99. package/assets/lamp_ceiling.svg +8 -8
  100. package/assets/lamp_table.svg +7 -7
  101. package/assets/no_icon.svg +9 -9
  102. package/assets/rooms/Anteroom.svg +52 -52
  103. package/assets/rooms/Attic.svg +21 -21
  104. package/assets/rooms/Balcony.svg +12 -12
  105. package/assets/rooms/Barn.svg +5 -5
  106. package/assets/rooms/Basement.svg +4 -4
  107. package/assets/rooms/Bathroom.svg +38 -38
  108. package/assets/rooms/Bedroom.svg +5 -5
  109. package/assets/rooms/Boiler Room.svg +12 -12
  110. package/assets/rooms/Carport.svg +17 -17
  111. package/assets/rooms/Cellar.svg +89 -89
  112. package/assets/rooms/Chamber.svg +9 -9
  113. package/assets/rooms/Corridor.svg +52 -52
  114. package/assets/rooms/Dining Area.svg +37 -37
  115. package/assets/rooms/Dining Room.svg +37 -37
  116. package/assets/rooms/Dining.svg +37 -37
  117. package/assets/rooms/Dressing Room.svg +4 -4
  118. package/assets/rooms/Driveway.svg +14 -14
  119. package/assets/rooms/Entrance.svg +44 -44
  120. package/assets/rooms/Equipment Room.svg +14 -14
  121. package/assets/rooms/Front Yard.svg +64 -64
  122. package/assets/rooms/Gallery.svg +13 -13
  123. package/assets/rooms/Garage.svg +20 -20
  124. package/assets/rooms/Garden.svg +12 -12
  125. package/assets/rooms/Ground Floor.svg +95 -95
  126. package/assets/rooms/Guest Bathroom.svg +32 -32
  127. package/assets/rooms/Guest Room.svg +5 -5
  128. package/assets/rooms/Gym.svg +4 -4
  129. package/assets/rooms/Hall.svg +19 -19
  130. package/assets/rooms/Home Theater.svg +7 -7
  131. package/assets/rooms/Kitchen.svg +17 -17
  132. package/assets/rooms/Laundry Room.svg +11 -11
  133. package/assets/rooms/Living Area.svg +10 -10
  134. package/assets/rooms/Living Room.svg +10 -10
  135. package/assets/rooms/Locker Room.svg +16 -16
  136. package/assets/rooms/Nursery.svg +4 -4
  137. package/assets/rooms/Office.svg +8 -8
  138. package/assets/rooms/Outdoors.svg +7 -7
  139. package/assets/rooms/Playroom.svg +5 -5
  140. package/assets/rooms/Pool.svg +7 -7
  141. package/assets/rooms/Rear Wall.svg +30 -30
  142. package/assets/rooms/Second Floor.svg +95 -95
  143. package/assets/rooms/Shed.svg +16 -16
  144. package/assets/rooms/Sleeping Area.svg +22 -22
  145. package/assets/rooms/Stairway.svg +4 -4
  146. package/assets/rooms/Stairwell.svg +15 -15
  147. package/assets/rooms/Storeroom.svg +4 -4
  148. package/assets/rooms/Summer House.svg +27 -27
  149. package/assets/rooms/Swimming Pool.svg +21 -21
  150. package/assets/rooms/Terrace.svg +6 -6
  151. package/assets/rooms/Toilet.svg +10 -10
  152. package/assets/rooms/Upstairs.svg +5 -5
  153. package/assets/rooms/Wardrobe.svg +60 -60
  154. package/assets/rooms/Washroom.svg +19 -19
  155. package/assets/rooms/Wc.svg +10 -10
  156. package/assets/rooms/Windscreen.svg +60 -60
  157. package/assets/rooms/Workshop.svg +22 -22
  158. package/assets/rooms/Workspace.svg +8 -8
  159. package/assets/rooms/list.json +945 -945
  160. package/assets/rooms/names.txt +59 -59
  161. package/assets/rooms/parseNames.js +34 -34
  162. package/craco-module-federation.js +69 -69
  163. package/icons/IconAdapter.js.map +1 -1
  164. package/icons/IconAlias.js.map +1 -1
  165. package/icons/IconChannel.js.map +1 -1
  166. package/icons/IconClearFilter.js.map +1 -1
  167. package/icons/IconClosed.js.map +1 -1
  168. package/icons/IconCopy.js +8 -8
  169. package/icons/IconCopy.js.map +1 -1
  170. package/icons/IconDevice.js.map +1 -1
  171. package/icons/IconDocument.js.map +1 -1
  172. package/icons/IconDocumentReadOnly.js.map +1 -1
  173. package/icons/IconFx.js +1 -1
  174. package/icons/IconFx.js.map +1 -1
  175. package/icons/IconInstance.js.map +1 -1
  176. package/icons/IconLogout.js +9 -9
  177. package/icons/IconLogout.js.map +1 -1
  178. package/icons/IconNoIcon.js +8 -8
  179. package/icons/IconNoIcon.js.map +1 -1
  180. package/icons/IconOpen.js.map +1 -1
  181. package/icons/IconState.js.map +1 -1
  182. package/index.css +54 -54
  183. package/package.json +1 -1
  184. package/types.d.ts +94 -94
  185. package/Components/404.js.map +0 -1
  186. package/Components/CustomModal.js.map +0 -1
  187. package/Components/FileBrowser.js.map +0 -1
  188. package/Components/FileViewer.js.map +0 -1
  189. package/Components/Icon.js.map +0 -1
  190. package/Components/IconPicker.js.map +0 -1
  191. package/Components/IconSelector.js.map +0 -1
  192. package/Components/Image.js.map +0 -1
  193. package/Components/JsonConfigComponent/ChipInput.d.ts +0 -12
  194. package/Components/JsonConfigComponent/ChipInput.js +0 -763
  195. package/Components/JsonConfigComponent/ChipInput.js.map +0 -1
  196. package/Components/JsonConfigComponent/ConfigAccordion.d.ts +0 -15
  197. package/Components/JsonConfigComponent/ConfigAccordion.js +0 -348
  198. package/Components/JsonConfigComponent/ConfigAccordion.js.map +0 -1
  199. package/Components/JsonConfigComponent/ConfigAlive.d.ts +0 -10
  200. package/Components/JsonConfigComponent/ConfigAlive.js +0 -105
  201. package/Components/JsonConfigComponent/ConfigAlive.js.map +0 -1
  202. package/Components/JsonConfigComponent/ConfigAutocomplete.d.ts +0 -37
  203. package/Components/JsonConfigComponent/ConfigAutocomplete.js +0 -73
  204. package/Components/JsonConfigComponent/ConfigAutocomplete.js.map +0 -1
  205. package/Components/JsonConfigComponent/ConfigAutocompleteSendTo.d.ts +0 -17
  206. package/Components/JsonConfigComponent/ConfigAutocompleteSendTo.js +0 -131
  207. package/Components/JsonConfigComponent/ConfigAutocompleteSendTo.js.map +0 -1
  208. package/Components/JsonConfigComponent/ConfigCRON.d.ts +0 -15
  209. package/Components/JsonConfigComponent/ConfigCRON.js +0 -157
  210. package/Components/JsonConfigComponent/ConfigCRON.js.map +0 -1
  211. package/Components/JsonConfigComponent/ConfigCertCollection.d.ts +0 -14
  212. package/Components/JsonConfigComponent/ConfigCertCollection.js +0 -128
  213. package/Components/JsonConfigComponent/ConfigCertCollection.js.map +0 -1
  214. package/Components/JsonConfigComponent/ConfigCertificateSelect.d.ts +0 -14
  215. package/Components/JsonConfigComponent/ConfigCertificateSelect.js +0 -149
  216. package/Components/JsonConfigComponent/ConfigCertificateSelect.js.map +0 -1
  217. package/Components/JsonConfigComponent/ConfigCertificates.d.ts +0 -14
  218. package/Components/JsonConfigComponent/ConfigCertificates.js +0 -284
  219. package/Components/JsonConfigComponent/ConfigCertificates.js.map +0 -1
  220. package/Components/JsonConfigComponent/ConfigCheckLicense.d.ts +0 -3
  221. package/Components/JsonConfigComponent/ConfigCheckLicense.js +0 -821
  222. package/Components/JsonConfigComponent/ConfigCheckLicense.js.map +0 -1
  223. package/Components/JsonConfigComponent/ConfigCheckbox.d.ts +0 -15
  224. package/Components/JsonConfigComponent/ConfigCheckbox.js +0 -40
  225. package/Components/JsonConfigComponent/ConfigCheckbox.js.map +0 -1
  226. package/Components/JsonConfigComponent/ConfigChip.d.ts +0 -14
  227. package/Components/JsonConfigComponent/ConfigChip.js +0 -120
  228. package/Components/JsonConfigComponent/ConfigChip.js.map +0 -1
  229. package/Components/JsonConfigComponent/ConfigColor.d.ts +0 -22
  230. package/Components/JsonConfigComponent/ConfigColor.js +0 -120
  231. package/Components/JsonConfigComponent/ConfigColor.js.map +0 -1
  232. package/Components/JsonConfigComponent/ConfigCoordinates.d.ts +0 -14
  233. package/Components/JsonConfigComponent/ConfigCoordinates.js +0 -265
  234. package/Components/JsonConfigComponent/ConfigCoordinates.js.map +0 -1
  235. package/Components/JsonConfigComponent/ConfigCustom.d.ts +0 -26
  236. package/Components/JsonConfigComponent/ConfigCustom.js +0 -316
  237. package/Components/JsonConfigComponent/ConfigCustom.js.map +0 -1
  238. package/Components/JsonConfigComponent/ConfigDatePicker.d.ts +0 -14
  239. package/Components/JsonConfigComponent/ConfigDatePicker.js +0 -91
  240. package/Components/JsonConfigComponent/ConfigDatePicker.js.map +0 -1
  241. package/Components/JsonConfigComponent/ConfigDeviceManager.d.ts +0 -6
  242. package/Components/JsonConfigComponent/ConfigDeviceManager.js +0 -18
  243. package/Components/JsonConfigComponent/ConfigFile.d.ts +0 -15
  244. package/Components/JsonConfigComponent/ConfigFile.js +0 -228
  245. package/Components/JsonConfigComponent/ConfigFile.js.map +0 -1
  246. package/Components/JsonConfigComponent/ConfigFileSelector.d.ts +0 -3
  247. package/Components/JsonConfigComponent/ConfigFileSelector.js +0 -625
  248. package/Components/JsonConfigComponent/ConfigFileSelector.js.map +0 -1
  249. package/Components/JsonConfigComponent/ConfigFunc.d.ts +0 -14
  250. package/Components/JsonConfigComponent/ConfigFunc.js +0 -124
  251. package/Components/JsonConfigComponent/ConfigFunc.js.map +0 -1
  252. package/Components/JsonConfigComponent/ConfigGeneric.d.ts +0 -95
  253. package/Components/JsonConfigComponent/ConfigGeneric.js +0 -646
  254. package/Components/JsonConfigComponent/ConfigIP.d.ts +0 -14
  255. package/Components/JsonConfigComponent/ConfigIP.js +0 -130
  256. package/Components/JsonConfigComponent/ConfigIP.js.map +0 -1
  257. package/Components/JsonConfigComponent/ConfigImageSendTo.d.ts +0 -10
  258. package/Components/JsonConfigComponent/ConfigImageSendTo.js +0 -114
  259. package/Components/JsonConfigComponent/ConfigImageSendTo.js.map +0 -1
  260. package/Components/JsonConfigComponent/ConfigImageUpload.d.ts +0 -14
  261. package/Components/JsonConfigComponent/ConfigImageUpload.js +0 -166
  262. package/Components/JsonConfigComponent/ConfigImageUpload.js.map +0 -1
  263. package/Components/JsonConfigComponent/ConfigInstanceSelect.d.ts +0 -14
  264. package/Components/JsonConfigComponent/ConfigInstanceSelect.js +0 -264
  265. package/Components/JsonConfigComponent/ConfigInstanceSelect.js.map +0 -1
  266. package/Components/JsonConfigComponent/ConfigInterface.d.ts +0 -14
  267. package/Components/JsonConfigComponent/ConfigInterface.js +0 -146
  268. package/Components/JsonConfigComponent/ConfigInterface.js.map +0 -1
  269. package/Components/JsonConfigComponent/ConfigJsonEditor.d.ts +0 -13
  270. package/Components/JsonConfigComponent/ConfigJsonEditor.js +0 -145
  271. package/Components/JsonConfigComponent/ConfigJsonEditor.js.map +0 -1
  272. package/Components/JsonConfigComponent/ConfigLanguage.d.ts +0 -7
  273. package/Components/JsonConfigComponent/ConfigLanguage.js +0 -110
  274. package/Components/JsonConfigComponent/ConfigLanguage.js.map +0 -1
  275. package/Components/JsonConfigComponent/ConfigLicense.d.ts +0 -24
  276. package/Components/JsonConfigComponent/ConfigLicense.js +0 -183
  277. package/Components/JsonConfigComponent/ConfigLicense.js.map +0 -1
  278. package/Components/JsonConfigComponent/ConfigNumber.d.ts +0 -17
  279. package/Components/JsonConfigComponent/ConfigNumber.js +0 -117
  280. package/Components/JsonConfigComponent/ConfigObjectId.d.ts +0 -17
  281. package/Components/JsonConfigComponent/ConfigObjectId.js +0 -167
  282. package/Components/JsonConfigComponent/ConfigObjectId.js.map +0 -1
  283. package/Components/JsonConfigComponent/ConfigPanel.d.ts +0 -3
  284. package/Components/JsonConfigComponent/ConfigPanel.js +0 -396
  285. package/Components/JsonConfigComponent/ConfigPanel.js.map +0 -1
  286. package/Components/JsonConfigComponent/ConfigPassword.d.ts +0 -14
  287. package/Components/JsonConfigComponent/ConfigPassword.js +0 -193
  288. package/Components/JsonConfigComponent/ConfigPassword.js.map +0 -1
  289. package/Components/JsonConfigComponent/ConfigPattern.d.ts +0 -21
  290. package/Components/JsonConfigComponent/ConfigPattern.js +0 -65
  291. package/Components/JsonConfigComponent/ConfigPattern.js.map +0 -1
  292. package/Components/JsonConfigComponent/ConfigPort.d.ts +0 -3
  293. package/Components/JsonConfigComponent/ConfigPort.js +0 -176
  294. package/Components/JsonConfigComponent/ConfigRoom.d.ts +0 -14
  295. package/Components/JsonConfigComponent/ConfigRoom.js +0 -124
  296. package/Components/JsonConfigComponent/ConfigRoom.js.map +0 -1
  297. package/Components/JsonConfigComponent/ConfigSelect.d.ts +0 -14
  298. package/Components/JsonConfigComponent/ConfigSelect.js +0 -159
  299. package/Components/JsonConfigComponent/ConfigSelect.js.map +0 -1
  300. package/Components/JsonConfigComponent/ConfigSelectSendTo.d.ts +0 -17
  301. package/Components/JsonConfigComponent/ConfigSelectSendTo.js +0 -272
  302. package/Components/JsonConfigComponent/ConfigSelectSendTo.js.map +0 -1
  303. package/Components/JsonConfigComponent/ConfigSendto.d.ts +0 -24
  304. package/Components/JsonConfigComponent/ConfigSendto.js +0 -294
  305. package/Components/JsonConfigComponent/ConfigSendto.js.map +0 -1
  306. package/Components/JsonConfigComponent/ConfigSetState.d.ts +0 -18
  307. package/Components/JsonConfigComponent/ConfigSetState.js +0 -185
  308. package/Components/JsonConfigComponent/ConfigSetState.js.map +0 -1
  309. package/Components/JsonConfigComponent/ConfigSlider.d.ts +0 -14
  310. package/Components/JsonConfigComponent/ConfigSlider.js +0 -119
  311. package/Components/JsonConfigComponent/ConfigSlider.js.map +0 -1
  312. package/Components/JsonConfigComponent/ConfigStaticDivider.d.ts +0 -14
  313. package/Components/JsonConfigComponent/ConfigStaticDivider.js +0 -68
  314. package/Components/JsonConfigComponent/ConfigStaticDivider.js.map +0 -1
  315. package/Components/JsonConfigComponent/ConfigStaticHeader.d.ts +0 -14
  316. package/Components/JsonConfigComponent/ConfigStaticHeader.js +0 -81
  317. package/Components/JsonConfigComponent/ConfigStaticHeader.js.map +0 -1
  318. package/Components/JsonConfigComponent/ConfigStaticImage.d.ts +0 -14
  319. package/Components/JsonConfigComponent/ConfigStaticImage.js +0 -71
  320. package/Components/JsonConfigComponent/ConfigStaticImage.js.map +0 -1
  321. package/Components/JsonConfigComponent/ConfigStaticText.d.ts +0 -14
  322. package/Components/JsonConfigComponent/ConfigStaticText.js +0 -88
  323. package/Components/JsonConfigComponent/ConfigStaticText.js.map +0 -1
  324. package/Components/JsonConfigComponent/ConfigTable.d.ts +0 -3
  325. package/Components/JsonConfigComponent/ConfigTable.js +0 -1064
  326. package/Components/JsonConfigComponent/ConfigTable.js.map +0 -1
  327. package/Components/JsonConfigComponent/ConfigTabs.d.ts +0 -34
  328. package/Components/JsonConfigComponent/ConfigTabs.js +0 -162
  329. package/Components/JsonConfigComponent/ConfigTabs.js.map +0 -1
  330. package/Components/JsonConfigComponent/ConfigText.d.ts +0 -14
  331. package/Components/JsonConfigComponent/ConfigText.js +0 -226
  332. package/Components/JsonConfigComponent/ConfigText.js.map +0 -1
  333. package/Components/JsonConfigComponent/ConfigTextSendTo.d.ts +0 -10
  334. package/Components/JsonConfigComponent/ConfigTextSendTo.js +0 -129
  335. package/Components/JsonConfigComponent/ConfigTextSendTo.js.map +0 -1
  336. package/Components/JsonConfigComponent/ConfigTimePicker.d.ts +0 -14
  337. package/Components/JsonConfigComponent/ConfigTimePicker.js +0 -85
  338. package/Components/JsonConfigComponent/ConfigTimePicker.js.map +0 -1
  339. package/Components/JsonConfigComponent/ConfigTopic.d.ts +0 -17
  340. package/Components/JsonConfigComponent/ConfigTopic.js +0 -110
  341. package/Components/JsonConfigComponent/ConfigTopic.js.map +0 -1
  342. package/Components/JsonConfigComponent/ConfigUUID.d.ts +0 -15
  343. package/Components/JsonConfigComponent/ConfigUUID.js +0 -95
  344. package/Components/JsonConfigComponent/ConfigUUID.js.map +0 -1
  345. package/Components/JsonConfigComponent/ConfigUser.d.ts +0 -14
  346. package/Components/JsonConfigComponent/ConfigUser.js +0 -142
  347. package/Components/JsonConfigComponent/ConfigUser.js.map +0 -1
  348. package/Components/JsonConfigComponent/DeviceManager/Communication.d.ts +0 -63
  349. package/Components/JsonConfigComponent/DeviceManager/Communication.js +0 -268
  350. package/Components/JsonConfigComponent/DeviceManager/DeviceActionButton.d.ts +0 -11
  351. package/Components/JsonConfigComponent/DeviceManager/DeviceActionButton.js +0 -15
  352. package/Components/JsonConfigComponent/DeviceManager/DeviceCard.d.ts +0 -53
  353. package/Components/JsonConfigComponent/DeviceManager/DeviceCard.js +0 -340
  354. package/Components/JsonConfigComponent/DeviceManager/DeviceControl.d.ts +0 -45
  355. package/Components/JsonConfigComponent/DeviceManager/DeviceControl.js +0 -146
  356. package/Components/JsonConfigComponent/DeviceManager/DeviceImageUpload.d.ts +0 -12
  357. package/Components/JsonConfigComponent/DeviceManager/DeviceImageUpload.js +0 -69
  358. package/Components/JsonConfigComponent/DeviceManager/DeviceList.d.ts +0 -51
  359. package/Components/JsonConfigComponent/DeviceManager/DeviceList.js +0 -226
  360. package/Components/JsonConfigComponent/DeviceManager/DeviceStatus.d.ts +0 -13
  361. package/Components/JsonConfigComponent/DeviceManager/DeviceStatus.js +0 -111
  362. package/Components/JsonConfigComponent/DeviceManager/InstanceActionButton.d.ts +0 -7
  363. package/Components/JsonConfigComponent/DeviceManager/InstanceActionButton.js +0 -16
  364. package/Components/JsonConfigComponent/DeviceManager/JsonConfig.d.ts +0 -11
  365. package/Components/JsonConfigComponent/DeviceManager/JsonConfig.js +0 -94
  366. package/Components/JsonConfigComponent/DeviceManager/TooltipButton.d.ts +0 -10
  367. package/Components/JsonConfigComponent/DeviceManager/TooltipButton.js +0 -22
  368. package/Components/JsonConfigComponent/DeviceManager/Utils.d.ts +0 -12
  369. package/Components/JsonConfigComponent/DeviceManager/Utils.js +0 -158
  370. package/Components/JsonConfigComponent/DeviceManager/i18n/de.json +0 -21
  371. package/Components/JsonConfigComponent/DeviceManager/i18n/en.json +0 -21
  372. package/Components/JsonConfigComponent/DeviceManager/i18n/es.json +0 -21
  373. package/Components/JsonConfigComponent/DeviceManager/i18n/fr.json +0 -21
  374. package/Components/JsonConfigComponent/DeviceManager/i18n/i18n.d.ts +0 -26
  375. package/Components/JsonConfigComponent/DeviceManager/i18n/it.json +0 -21
  376. package/Components/JsonConfigComponent/DeviceManager/i18n/nl.json +0 -21
  377. package/Components/JsonConfigComponent/DeviceManager/i18n/pl.json +0 -21
  378. package/Components/JsonConfigComponent/DeviceManager/i18n/pt.json +0 -21
  379. package/Components/JsonConfigComponent/DeviceManager/i18n/ru.json +0 -21
  380. package/Components/JsonConfigComponent/DeviceManager/i18n/uk.json +0 -21
  381. package/Components/JsonConfigComponent/DeviceManager/i18n/zh-cn.json +0 -21
  382. package/Components/JsonConfigComponent/DeviceManager/index.d.ts +0 -2
  383. package/Components/JsonConfigComponent/DeviceManager/index.js +0 -10
  384. package/Components/JsonConfigComponent/DeviceManager/index.js.map +0 -1
  385. package/Components/JsonConfigComponent/Utils.d.ts +0 -9
  386. package/Components/JsonConfigComponent/Utils.js +0 -13
  387. package/Components/JsonConfigComponent/index.d.ts +0 -26
  388. package/Components/JsonConfigComponent/index.js +0 -520
  389. package/Components/JsonConfigComponent/index.js.map +0 -1
  390. package/Components/JsonConfigComponent/wrapper/AdminConnection.d.ts +0 -2
  391. package/Components/JsonConfigComponent/wrapper/AdminConnection.js +0 -7
  392. package/Components/JsonConfigComponent/wrapper/Components/ColorPicker.d.ts +0 -2
  393. package/Components/JsonConfigComponent/wrapper/Components/ColorPicker.js +0 -10
  394. package/Components/JsonConfigComponent/wrapper/Components/ColorPicker.js.map +0 -1
  395. package/Components/JsonConfigComponent/wrapper/Components/Icon.d.ts +0 -2
  396. package/Components/JsonConfigComponent/wrapper/Components/Icon.js +0 -10
  397. package/Components/JsonConfigComponent/wrapper/Components/Icon.js.map +0 -1
  398. package/Components/JsonConfigComponent/wrapper/Components/TextWithIcon.d.ts +0 -2
  399. package/Components/JsonConfigComponent/wrapper/Components/TextWithIcon.js +0 -10
  400. package/Components/JsonConfigComponent/wrapper/Components/TextWithIcon.js.map +0 -1
  401. package/Components/JsonConfigComponent/wrapper/Components/UploadImage.d.ts +0 -2
  402. package/Components/JsonConfigComponent/wrapper/Components/UploadImage.js +0 -10
  403. package/Components/JsonConfigComponent/wrapper/Components/UploadImage.js.map +0 -1
  404. package/Components/JsonConfigComponent/wrapper/Components/Utils.d.ts +0 -2
  405. package/Components/JsonConfigComponent/wrapper/Components/Utils.js +0 -10
  406. package/Components/JsonConfigComponent/wrapper/Components/Utils.js.map +0 -1
  407. package/Components/JsonConfigComponent/wrapper/Dialogs/Confirm.d.ts +0 -2
  408. package/Components/JsonConfigComponent/wrapper/Dialogs/Confirm.js +0 -10
  409. package/Components/JsonConfigComponent/wrapper/Dialogs/Confirm.js.map +0 -1
  410. package/Components/JsonConfigComponent/wrapper/Dialogs/Cron.d.ts +0 -2
  411. package/Components/JsonConfigComponent/wrapper/Dialogs/Cron.js +0 -10
  412. package/Components/JsonConfigComponent/wrapper/Dialogs/Cron.js.map +0 -1
  413. package/Components/JsonConfigComponent/wrapper/Dialogs/Error.d.ts +0 -2
  414. package/Components/JsonConfigComponent/wrapper/Dialogs/Error.js +0 -10
  415. package/Components/JsonConfigComponent/wrapper/Dialogs/Error.js.map +0 -1
  416. package/Components/JsonConfigComponent/wrapper/Dialogs/Message.d.ts +0 -2
  417. package/Components/JsonConfigComponent/wrapper/Dialogs/Message.js +0 -10
  418. package/Components/JsonConfigComponent/wrapper/Dialogs/Message.js.map +0 -1
  419. package/Components/JsonConfigComponent/wrapper/Dialogs/SelectFile.d.ts +0 -2
  420. package/Components/JsonConfigComponent/wrapper/Dialogs/SelectFile.js +0 -10
  421. package/Components/JsonConfigComponent/wrapper/Dialogs/SelectFile.js.map +0 -1
  422. package/Components/JsonConfigComponent/wrapper/Dialogs/SelectID.d.ts +0 -2
  423. package/Components/JsonConfigComponent/wrapper/Dialogs/SelectID.js +0 -10
  424. package/Components/JsonConfigComponent/wrapper/Dialogs/SelectID.js.map +0 -1
  425. package/Components/JsonConfigComponent/wrapper/i18n.d.ts +0 -2
  426. package/Components/JsonConfigComponent/wrapper/i18n.js +0 -10
  427. package/Components/JsonConfigComponent/wrapper/i18n.js.map +0 -1
  428. package/Components/JsonConfigComponent/wrapper/icons/IconCopy.d.ts +0 -2
  429. package/Components/JsonConfigComponent/wrapper/icons/IconCopy.js +0 -10
  430. package/Components/JsonConfigComponent/wrapper/icons/IconCopy.js.map +0 -1
  431. package/Components/Loader.js.map +0 -1
  432. package/Components/Loaders/PT.js.map +0 -1
  433. package/Components/Loaders/Vendor.js.map +0 -1
  434. package/Components/Logo.js.map +0 -1
  435. package/Components/MDUtils.js.map +0 -1
  436. package/Components/Router.js.map +0 -1
  437. package/Components/SaveCloseButtons.js.map +0 -1
  438. package/Components/Schedule.js.map +0 -1
  439. package/Components/SelectWithIcon.js.map +0 -1
  440. package/Components/SimpleCron/cron2text.js.map +0 -1
  441. package/Components/SimpleCron/cronText.js.map +0 -1
  442. package/Components/SimpleCron/index.js.map +0 -1
  443. package/Components/SimpleCron/jquery.cron.locale.js.map +0 -1
  444. package/Components/TabContainer.js.map +0 -1
  445. package/Components/TabContent.js.map +0 -1
  446. package/Components/TabHeader.js.map +0 -1
  447. package/Components/TableResize.js.map +0 -1
  448. package/Components/TextWithIcon.js.map +0 -1
  449. package/Components/ToggleThemeMenu.js.map +0 -1
  450. package/Components/UploadImage.js.map +0 -1
  451. package/Components/Utils.js.map +0 -1
  452. package/Components/copy-to-clipboard.d.ts +0 -13
  453. package/Components/copy-to-clipboard.js +0 -156
  454. package/Components/copy-to-clipboard.js.map +0 -1
  455. package/Dialogs/ComplexCron.js.map +0 -1
  456. package/Dialogs/Confirm.js.map +0 -1
  457. package/Dialogs/Cron.js.map +0 -1
  458. package/Dialogs/Error.js.map +0 -1
  459. package/Dialogs/Message.js.map +0 -1
  460. package/Dialogs/SelectFile.js.map +0 -1
  461. package/Dialogs/SelectID.js.map +0 -1
  462. package/Dialogs/SimpleCron.js.map +0 -1
  463. package/Dialogs/TextInput.js.map +0 -1
  464. package/GenericApp.js.map +0 -1
  465. package/LegacyConnection.js.map +0 -1
  466. package/Prompt.js.map +0 -1
  467. package/Theme.js.map +0 -1
  468. package/i18n.js.map +0 -1
  469. package/icons/IconExpert.js.map +0 -1
@@ -1,12 +1,8 @@
1
1
  import React from 'react';
2
2
  interface TabContentProps {
3
3
  overflow?: string;
4
- classes: {
5
- root: string;
6
- overflowAuto: string;
7
- };
4
+ classes: Record<string, string>;
8
5
  children: React.ReactNode;
9
6
  }
10
- /** @type {typeof TabContent} */
11
- declare const _export: React.JSXElementConstructor<Omit<TabContentProps, "classes"> & import("@mui/styles").StyledComponentProps<"root" | "overflowAuto"> & object>;
12
- export default _export;
7
+ declare const _default: React.JSXElementConstructor<Omit<TabContentProps, "classes"> & import("@mui/styles").StyledComponentProps<string> & object>;
8
+ export default _default;
@@ -23,6 +23,4 @@ class TabContent extends react_1.default.Component {
23
23
  return react_1.default.createElement(material_1.Grid, { item: true, className: Utils_1.default.clsx(classes.root, this.props.overflow === 'auto' ? classes.overflowAuto : '') }, this.props.children);
24
24
  }
25
25
  }
26
- /** @type {typeof TabContent} */
27
- const _export = (0, styles_1.withStyles)(styles)(TabContent);
28
- exports.default = _export;
26
+ exports.default = (0, styles_1.withStyles)(styles)(TabContent);
@@ -1,14 +1,21 @@
1
- declare const _default: React.JSXElementConstructor<Omit<PropTypes.InferProps<{
2
- name: PropTypes.Requireable<string>;
3
- ready: PropTypes.Requireable<boolean>;
4
- stickyHeader: PropTypes.Requireable<boolean>;
5
- size: PropTypes.Requireable<string>;
6
- className: PropTypes.Requireable<string>;
7
- style: PropTypes.Requireable<object>;
8
- initialWidths: PropTypes.Requireable<any[]>;
9
- minWidths: PropTypes.Requireable<any[]>;
10
- dblTitle: PropTypes.Requireable<string>;
11
- }>, "classes"> & import("@mui/styles").StyledComponentProps<"table"> & object>;
12
- export default _default;
13
- import PropTypes from 'prop-types';
1
+ /**
2
+ * Copyright 2022-2024, Denis Haev <dogafox@gmail.com>
3
+ *
4
+ * MIT License
5
+ *
6
+ **/
14
7
  import React from 'react';
8
+ interface TableResizeProps {
9
+ name?: string;
10
+ ready?: boolean;
11
+ stickyHeader?: boolean;
12
+ size?: 'small' | 'medium';
13
+ className: string;
14
+ style?: React.CSSProperties;
15
+ initialWidths?: (number | 'auto')[];
16
+ minWidths?: number[];
17
+ dblTitle?: string;
18
+ children?: React.ReactNode;
19
+ }
20
+ declare const _default: React.JSXElementConstructor<Omit<TableResizeProps, "classes"> & import("@mui/styles").StyledComponentProps<string> & object>;
21
+ export default _default;
@@ -1,282 +1,264 @@
1
1
  "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _typeof = require("@babel/runtime/helpers/typeof");
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
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;
7
17
  });
8
- exports["default"] = void 0;
9
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
10
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
11
- var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
12
- var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
13
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
14
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
- var _react = _interopRequireWildcard(require("react"));
16
- var _propTypes = _interopRequireDefault(require("prop-types"));
17
- var _styles = require("@mui/styles");
18
- var _Table = _interopRequireDefault(require("@mui/material/Table"));
19
- var _Skeleton = _interopRequireDefault(require("@mui/material/Skeleton"));
20
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
21
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
22
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
23
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
24
- function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
25
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
26
- * Copyright 2022-2023, Denis Haev <dogafox@gmail.com>
27
- *
28
- * MIT License
29
- *
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
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ /**
27
+ * Copyright 2022-2024, Denis Haev <dogafox@gmail.com>
28
+ *
29
+ * MIT License
30
+ *
30
31
  **/
31
- var styles = function styles() {
32
- return {
32
+ const react_1 = __importStar(require("react"));
33
+ const styles_1 = require("@mui/styles");
34
+ const material_1 = require("@mui/material");
35
+ const styles = {
33
36
  table: {
34
- display: 'grid',
35
- '& tr': {
36
- display: 'contents'
37
- },
38
- '& thead': {
39
- display: 'contents'
40
- },
41
- '& tbody': {
42
- display: 'contents'
43
- },
44
- '& th': {
45
- // resizer
46
- position: 'sticky',
47
- userSelect: 'none'
48
- },
49
- '& .resize-handle': {
50
- // resizer
51
- display: 'block',
52
- position: 'absolute',
53
- cursor: 'col-resize',
54
- width: 7,
55
- right: 0,
56
- top: 2,
57
- bottom: 2,
58
- zIndex: 1,
59
- borderRight: '2px dotted #888',
60
- '&:hover': {
61
- borderColor: '#ccc',
62
- borderRightStyle: 'solid'
37
+ display: 'grid',
38
+ '& tr': {
39
+ display: 'contents',
63
40
  },
64
- '&.active': {
65
- borderColor: '#517ea5',
66
- borderRightStyle: 'solid'
67
- }
68
- }
69
- }
70
- };
41
+ '& thead': {
42
+ display: 'contents',
43
+ },
44
+ '& tbody': {
45
+ display: 'contents',
46
+ },
47
+ '& th': {
48
+ position: 'sticky',
49
+ userSelect: 'none',
50
+ },
51
+ '& .resize-handle': {
52
+ display: 'block',
53
+ position: 'absolute',
54
+ cursor: 'col-resize',
55
+ width: 7,
56
+ right: 0,
57
+ top: 2,
58
+ bottom: 2,
59
+ zIndex: 1,
60
+ borderRight: '2px dotted #888',
61
+ '&:hover': {
62
+ borderColor: '#ccc',
63
+ borderRightStyle: 'solid',
64
+ },
65
+ '&.active': {
66
+ borderColor: '#517ea5',
67
+ borderRightStyle: 'solid',
68
+ },
69
+ },
70
+ },
71
71
  };
72
- var TableResize = /*#__PURE__*/function (_Component) {
73
- function TableResize(props) {
74
- var _this;
75
- (0, _classCallCheck2["default"])(this, TableResize);
76
- _this = _callSuper(this, TableResize, [props]);
77
- (0, _defineProperty2["default"])(_this, "resizerReset", function () {
78
- for (var c = 0; c < _this.resizerCurrentWidths.length; c++) {
79
- _this.resizerCurrentWidths[c] = (_this.props.initialWidths || [])[c] || 'auto';
80
- }
81
- (window._localStorage || window.localStorage).setItem("App.".concat(_this.props.name || 'history', ".table"), JSON.stringify(_this.resizerCurrentWidths));
82
- _this.resizerApplyWidths();
83
- });
84
- (0, _defineProperty2["default"])(_this, "resizerMouseMove", function (e) {
85
- if (_this.resizerActiveDiv) {
86
- var width = _this.resizerOldWidth + e.clientX - _this.resizerPosition;
87
- var widthNext = _this.resizerOldWidthNext - e.clientX + _this.resizerPosition;
88
- if ((!_this.resizerMin || width > _this.resizerMin) && (!_this.resizerMinNext || widthNext > _this.resizerMinNext)) {
89
- _this.resizerCurrentWidths[_this.resizerActiveIndex] = width;
90
- _this.resizerCurrentWidths[_this.resizerActiveIndex + 1] = widthNext;
91
- _this.resizerApplyWidths();
92
- }
93
- }
94
- });
95
- (0, _defineProperty2["default"])(_this, "resizerMouseUp", function () {
96
- (window._localStorage || window.localStorage).setItem("App.".concat(_this.props.name || 'history', ".table"), JSON.stringify(_this.resizerCurrentWidths));
97
- _this.resizerActiveIndex = null;
98
- _this.resizerActiveDiv = null;
99
- window.removeEventListener('mousemove', _this.resizerMouseMove);
100
- window.removeEventListener('mouseup', _this.resizerMouseUp);
101
- });
102
- (0, _defineProperty2["default"])(_this, "resizerMouseDown", function (e) {
103
- if (_this.resizerActiveIndex === null || _this.resizerActiveIndex === undefined) {
104
- console.log("Mouse down ".concat(e.target.dataset.index));
105
- _this.resizerActiveIndex = parseInt(e.target.dataset.index, 10);
106
- _this.resizerActiveDiv = e.target;
107
- _this.resizerMin = _this.props.minWidths ? _this.props.minWidths[_this.resizerActiveIndex] : 0;
108
- _this.resizerMinNext = _this.props.minWidths ? _this.props.minWidths[_this.resizerActiveIndex + 1] : 0;
109
- _this.resizerPosition = e.clientX;
110
- var ths;
111
- if (_this.resizerCurrentWidths[_this.resizerActiveIndex] === 'auto') {
112
- ths = ths || _this.resizerRefTable.current.querySelectorAll('th');
113
- _this.resizerCurrentWidths[_this.resizerActiveIndex] = ths[_this.resizerActiveIndex].offsetWidth;
114
- }
115
- if (_this.resizerCurrentWidths[_this.resizerActiveIndex + 1] === 'auto') {
116
- ths = ths || _this.resizerRefTable.current.querySelectorAll('th');
117
- _this.resizerCurrentWidths[_this.resizerActiveIndex + 1] = ths[_this.resizerActiveIndex + 1].offsetWidth;
118
- }
119
- _this.resizerOldWidth = _this.resizerCurrentWidths[_this.resizerActiveIndex];
120
- _this.resizerOldWidthNext = _this.resizerCurrentWidths[_this.resizerActiveIndex + 1];
121
- window.addEventListener('mousemove', _this.resizerMouseMove);
122
- window.addEventListener('mouseup', _this.resizerMouseUp);
123
- }
124
- });
125
- _this.resizerRefTable = /*#__PURE__*/_react["default"].createRef();
126
- _this.resizerActiveIndex = null;
127
- _this.resizerActiveDiv = null;
128
- _this.resizerCurrentWidths = [];
129
- return _this;
130
- }
131
- (0, _inherits2["default"])(TableResize, _Component);
132
- return (0, _createClass2["default"])(TableResize, [{
133
- key: "componentDidMount",
134
- value: function componentDidMount() {
135
- this.resizerInstall();
72
+ class TableResize extends react_1.Component {
73
+ constructor(props) {
74
+ super(props);
75
+ this.widthFilled = false;
76
+ this.installTimeout = null;
77
+ this.resizerMin = 0;
78
+ this.resizerMinNext = 0;
79
+ this.resizerPosition = 0;
80
+ this.resizerOldWidth = 0;
81
+ this.resizerOldWidthNext = 0;
82
+ this.resizerReset = () => {
83
+ for (let c = 0; c < this.resizerCurrentWidths.length; c++) {
84
+ this.resizerCurrentWidths[c] = (this.props.initialWidths || [])[c] || 'auto';
85
+ }
86
+ (window._localStorage || window.localStorage).setItem(`App.${this.props.name || 'history'}.table`, JSON.stringify(this.resizerCurrentWidths));
87
+ this.resizerApplyWidths();
88
+ };
89
+ this.resizerMouseMove = (e) => {
90
+ if (this.resizerActiveDiv && this.resizerActiveIndex !== null) {
91
+ const width = this.resizerOldWidth + e.clientX - this.resizerPosition;
92
+ const widthNext = this.resizerOldWidthNext - e.clientX + this.resizerPosition;
93
+ if ((!this.resizerMin || width > this.resizerMin) &&
94
+ (!this.resizerMinNext || widthNext > this.resizerMinNext)) {
95
+ this.resizerCurrentWidths[this.resizerActiveIndex] = width;
96
+ this.resizerCurrentWidths[this.resizerActiveIndex + 1] = widthNext;
97
+ this.resizerApplyWidths();
98
+ }
99
+ }
100
+ };
101
+ this.resizerMouseUp = () => {
102
+ (window._localStorage || window.localStorage).setItem(`App.${this.props.name || 'history'}.table`, JSON.stringify(this.resizerCurrentWidths));
103
+ this.resizerActiveIndex = null;
104
+ this.resizerActiveDiv = null;
105
+ window.removeEventListener('mousemove', this.resizerMouseMove);
106
+ window.removeEventListener('mouseup', this.resizerMouseUp);
107
+ };
108
+ this.resizerMouseDown = (e) => {
109
+ var _a, _b, _c, _d;
110
+ if (this.resizerActiveIndex === null || this.resizerActiveIndex === undefined) {
111
+ console.log(`Mouse down ${(_a = e.target) === null || _a === void 0 ? void 0 : _a.dataset.index}`);
112
+ this.resizerActiveIndex = parseInt(((_b = e.target) === null || _b === void 0 ? void 0 : _b.dataset.index) || '0', 10);
113
+ this.resizerActiveDiv = e.target;
114
+ this.resizerMin = this.props.minWidths ? this.props.minWidths[this.resizerActiveIndex] : 0;
115
+ this.resizerMinNext = this.props.minWidths ? this.props.minWidths[this.resizerActiveIndex + 1] : 0;
116
+ this.resizerPosition = e.clientX;
117
+ let ths;
118
+ if (this.resizerCurrentWidths[this.resizerActiveIndex] === 'auto') {
119
+ ths = (_c = this.resizerRefTable.current) === null || _c === void 0 ? void 0 : _c.querySelectorAll('th');
120
+ if (ths) {
121
+ this.resizerCurrentWidths[this.resizerActiveIndex] = ths[this.resizerActiveIndex].offsetWidth;
122
+ }
123
+ }
124
+ if (this.resizerCurrentWidths[this.resizerActiveIndex + 1] === 'auto') {
125
+ ths = ths || ((_d = this.resizerRefTable.current) === null || _d === void 0 ? void 0 : _d.querySelectorAll('th'));
126
+ if (ths) {
127
+ this.resizerCurrentWidths[this.resizerActiveIndex + 1] = ths[this.resizerActiveIndex + 1].offsetWidth;
128
+ }
129
+ }
130
+ this.resizerOldWidth = this.resizerCurrentWidths[this.resizerActiveIndex];
131
+ this.resizerOldWidthNext = this.resizerCurrentWidths[this.resizerActiveIndex + 1];
132
+ window.addEventListener('mousemove', this.resizerMouseMove);
133
+ window.addEventListener('mouseup', this.resizerMouseUp);
134
+ }
135
+ };
136
+ this.resizerRefTable = react_1.default.createRef();
137
+ this.resizerActiveIndex = null;
138
+ this.resizerActiveDiv = null;
139
+ this.resizerCurrentWidths = [];
136
140
  }
137
- }, {
138
- key: "componentWillUnmount",
139
- value: function componentWillUnmount() {
140
- this.resizerUninstall();
141
+ componentDidMount() {
142
+ this.resizerInstall();
141
143
  }
142
- }, {
143
- key: "resizerInstall",
144
- value: function resizerInstall() {
145
- var _this2 = this;
146
- if (this.resizerRefTable.current && !this.resizerRefTable.current._installed) {
147
- this.resizerRefTable.current._installed = true;
148
- var ths = this.resizerRefTable.current.querySelectorAll('th');
149
- var widthsStored = (window._localStorage || window.localStorage).getItem("App.".concat(this.props.name || 'history', ".table"));
150
- this.widthFilled = false;
151
- if (widthsStored) {
152
- try {
153
- this.resizerCurrentWidths = JSON.parse(widthsStored);
154
- this.widthFilled = true;
155
- } catch (e) {
156
- // ignore
157
- }
158
- }
159
- if (this.widthFilled) {
160
- if (this.resizerCurrentWidths.length !== ths.length) {
161
- this.resizerCurrentWidths = [];
144
+ componentWillUnmount() {
145
+ this.resizerUninstall();
146
+ }
147
+ resizerInstall() {
148
+ if (this.resizerRefTable.current && !this.resizerRefTable.current._installed) {
149
+ this.resizerRefTable.current._installed = true;
150
+ const ths = this.resizerRefTable.current.querySelectorAll('th');
151
+ const widthsStored = (window._localStorage || window.localStorage).getItem(`App.${this.props.name || 'history'}.table`);
162
152
  this.widthFilled = false;
163
- } else {
164
- var tableWidth = this.resizerRefTable.current.offsetWidth;
165
- var storedWidth = 0;
166
- for (var w = 0; w < this.resizerCurrentWidths.length; w++) {
167
- // eslint-disable-next-line no-restricted-properties
168
- if (window.isFinite(this.resizerCurrentWidths[w])) {
169
- storedWidth += this.resizerCurrentWidths[w];
170
- } else {
171
- storedWidth = null;
172
- break;
173
- }
153
+ if (widthsStored) {
154
+ try {
155
+ this.resizerCurrentWidths = JSON.parse(widthsStored);
156
+ this.widthFilled = true;
157
+ }
158
+ catch (e) {
159
+ // ignore
160
+ }
174
161
  }
175
- if (storedWidth !== null && Math.abs(storedWidth - tableWidth) > 20) {
176
- this.resizerCurrentWidths = [];
177
- this.widthFilled = false;
162
+ if (this.widthFilled) {
163
+ if (this.resizerCurrentWidths.length !== ths.length) {
164
+ this.resizerCurrentWidths = [];
165
+ this.widthFilled = false;
166
+ }
167
+ else {
168
+ const tableWidth = this.resizerRefTable.current.offsetWidth;
169
+ let storedWidth = 0;
170
+ for (let w = 0; w < this.resizerCurrentWidths.length; w++) {
171
+ // eslint-disable-next-line no-restricted-properties
172
+ if (window.isFinite(this.resizerCurrentWidths[w])) {
173
+ storedWidth += this.resizerCurrentWidths[w];
174
+ }
175
+ else {
176
+ storedWidth = null;
177
+ break;
178
+ }
179
+ }
180
+ if (storedWidth !== null && Math.abs(storedWidth - tableWidth) > 20) {
181
+ this.resizerCurrentWidths = [];
182
+ this.widthFilled = false;
183
+ }
184
+ }
185
+ }
186
+ for (let i = 0; i < ths.length; i++) {
187
+ !this.widthFilled && this.resizerCurrentWidths.push(ths[i].offsetWidth);
188
+ // last column does need a handle
189
+ if (i < ths.length - 1) {
190
+ const div = window.document.createElement('div');
191
+ div.dataset.index = i.toString();
192
+ div.onmousedown = this.resizerMouseDown;
193
+ div.ondblclick = this.resizerReset;
194
+ div.title = this.props.dblTitle || 'Double click to reset table layout';
195
+ div.className = 'resize-handle';
196
+ ths[i].appendChild(div);
197
+ }
198
+ }
199
+ if (this.widthFilled) {
200
+ this.resizerApplyWidths();
178
201
  }
179
- }
180
- }
181
- for (var i = 0; i < ths.length; i++) {
182
- !this.widthFilled && this.resizerCurrentWidths.push(ths[i].offsetWidth);
183
-
184
- // last column does need handle
185
- if (i < ths.length - 1) {
186
- var div = window.document.createElement('div');
187
- div.dataset.index = i.toString();
188
- div.onmousedown = this.resizerMouseDown;
189
- div.ondblclick = this.resizerReset;
190
- div.title = this.props.dblTitle || 'Double click to reset table layout';
191
- div.className = 'resize-handle';
192
- ths[i].appendChild(div);
193
- }
194
202
  }
195
- if (this.widthFilled) {
196
- this.resizerApplyWidths();
203
+ else {
204
+ this.installTimeout = setTimeout(() => {
205
+ this.installTimeout = null;
206
+ this.resizerInstall();
207
+ }, 100);
197
208
  }
198
- } else {
199
- this.installTimeout = setTimeout(function () {
200
- _this2.installTimeout = null;
201
- _this2.resizerInstall();
202
- }, 100);
203
- }
204
209
  }
205
- }, {
206
- key: "resizerUninstall",
207
- value: function resizerUninstall() {
208
- this.installTimeout && clearTimeout(this.installTimeout);
209
-
210
- // resizer
211
- if (this.resizerRefTable.current && this.resizerRefTable.current._installed) {
212
- this.resizerRefTable.current._installed = true;
213
- var ths = this.resizerRefTable.current.querySelectorAll('th');
214
- for (var i = 0; i < ths.length; i++) {
215
- var div = ths[i].querySelector('.resize-handle');
216
- if (div) {
217
- div.onmousedown = null;
218
- div.remove();
219
- }
210
+ resizerUninstall() {
211
+ this.installTimeout && clearTimeout(this.installTimeout);
212
+ this.installTimeout = null;
213
+ // resizer
214
+ if (this.resizerRefTable.current && this.resizerRefTable.current._installed) {
215
+ this.resizerRefTable.current._installed = false;
216
+ const ths = this.resizerRefTable.current.querySelectorAll('th');
217
+ for (let i = 0; i < ths.length; i++) {
218
+ const div = ths[i].querySelector('.resize-handle');
219
+ if (div) {
220
+ div.onmousedown = null;
221
+ div.remove();
222
+ }
223
+ }
220
224
  }
221
- }
222
225
  }
223
- }, {
224
- key: "resizerApplyWidths",
225
- value: function resizerApplyWidths() {
226
- var gridTemplateColumns = [];
227
- if (this.resizerCurrentWidths.length) {
228
- for (var c = 0; c < this.resizerCurrentWidths.length; c++) {
229
- if (this.resizerCurrentWidths[c]) {
230
- gridTemplateColumns.push(this.resizerCurrentWidths[c] !== 'auto' ? "".concat(this.resizerCurrentWidths[c], "px") : 'auto');
231
- } else if (this.props.initialWidths && this.props.initialWidths[c]) {
232
- gridTemplateColumns.push(this.props.initialWidths[c] !== 'auto' ? "".concat(this.props.initialWidths[c], "px") : 'auto');
233
- } else {
234
- gridTemplateColumns.push('auto');
235
- }
226
+ resizerApplyWidths() {
227
+ const gridTemplateColumns = [];
228
+ if (this.resizerCurrentWidths.length) {
229
+ for (let c = 0; c < this.resizerCurrentWidths.length; c++) {
230
+ if (this.resizerCurrentWidths[c]) {
231
+ gridTemplateColumns.push(this.resizerCurrentWidths[c] !== 'auto' ? `${this.resizerCurrentWidths[c]}px` : 'auto');
232
+ }
233
+ else if (this.props.initialWidths && this.props.initialWidths[c]) {
234
+ gridTemplateColumns.push(this.props.initialWidths[c] !== 'auto' ? `${this.props.initialWidths[c]}px` : 'auto');
235
+ }
236
+ else {
237
+ gridTemplateColumns.push('auto');
238
+ }
239
+ }
236
240
  }
237
- } else if (this.props.initialWidths) {
238
- for (var _c = 0; _c < this.props.initialWidths.length; _c++) {
239
- if (this.props.initialWidths[_c]) {
240
- gridTemplateColumns.push(this.props.initialWidths[_c] !== 'auto' ? "".concat(this.props.initialWidths[_c], "px") : 'auto');
241
- } else {
242
- gridTemplateColumns.push('auto');
243
- }
241
+ else if (this.props.initialWidths) {
242
+ for (let c = 0; c < this.props.initialWidths.length; c++) {
243
+ if (this.props.initialWidths[c]) {
244
+ gridTemplateColumns.push(this.props.initialWidths[c] !== 'auto' ? `${this.props.initialWidths[c]}px` : 'auto');
245
+ }
246
+ else {
247
+ gridTemplateColumns.push('auto');
248
+ }
249
+ }
244
250
  }
245
- }
246
- if (this.resizerRefTable.current && gridTemplateColumns.length) {
247
- this.resizerRefTable.current.style.gridTemplateColumns = gridTemplateColumns.join(' ');
248
- }
249
- return gridTemplateColumns.length ? gridTemplateColumns.join(' ') : undefined;
251
+ if (this.resizerRefTable.current && gridTemplateColumns.length) {
252
+ this.resizerRefTable.current.style.gridTemplateColumns = gridTemplateColumns.join(' ');
253
+ }
254
+ return gridTemplateColumns.length ? gridTemplateColumns.join(' ') : undefined;
250
255
  }
251
- }, {
252
- key: "render",
253
- value: function render() {
254
- if (this.props.ready === false) {
255
- return /*#__PURE__*/_react["default"].createElement(_Skeleton["default"], null);
256
- }
257
- var style = {
258
- gridTemplateColumns: this.resizerApplyWidths()
259
- };
260
- return /*#__PURE__*/_react["default"].createElement(_Table["default"], {
261
- stickyHeader: this.props.stickyHeader,
262
- size: this.props.size || 'small',
263
- className: this.props.className.table + (this.props.className ? " ".concat(this.props.className) : ''),
264
- ref: this.resizerRefTable,
265
- style: _objectSpread(_objectSpread({}, this.props.style || {}), style)
266
- }, this.props.children);
256
+ render() {
257
+ if (this.props.ready === false) {
258
+ return react_1.default.createElement(material_1.Skeleton, null);
259
+ }
260
+ const style = { gridTemplateColumns: this.resizerApplyWidths() };
261
+ return react_1.default.createElement(material_1.Table, { stickyHeader: this.props.stickyHeader, size: this.props.size || 'small', className: this.props.className, ref: this.resizerRefTable, style: (Object.assign(Object.assign({}, this.props.style || {}), style)) }, this.props.children);
267
262
  }
268
- }]);
269
- }(_react.Component);
270
- TableResize.propTypes = {
271
- name: _propTypes["default"].string,
272
- ready: _propTypes["default"].bool,
273
- stickyHeader: _propTypes["default"].bool,
274
- size: _propTypes["default"].string,
275
- className: _propTypes["default"].string,
276
- style: _propTypes["default"].object,
277
- initialWidths: _propTypes["default"].array,
278
- minWidths: _propTypes["default"].array,
279
- dblTitle: _propTypes["default"].string
280
- };
281
- var _default = exports["default"] = (0, _styles.withStyles)(styles)(TableResize);
282
- //# sourceMappingURL=TableResize.js.map
263
+ }
264
+ exports.default = (0, styles_1.withStyles)(styles)(TableResize);