@iobroker/adapter-react-v5 4.13.0 → 4.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (464) hide show
  1. package/AdminConnection.js.map +1 -1
  2. package/Components/404.js +13 -13
  3. package/Components/404.js.map +1 -0
  4. package/Components/ColorPicker.js +54 -54
  5. package/Components/ColorPicker.js.map +1 -1
  6. package/Components/ComplexCron.js.map +1 -1
  7. package/Components/CustomModal.js.map +1 -0
  8. package/Components/FileBrowser.js +5 -1
  9. package/Components/FileBrowser.js.map +1 -0
  10. package/Components/FileViewer.js.map +1 -0
  11. package/Components/Icon.js.map +1 -0
  12. package/Components/IconPicker.js.map +1 -0
  13. package/Components/IconSelector.js.map +1 -0
  14. package/Components/Image.js.map +1 -0
  15. package/Components/JsonConfigComponent/ChipInput.d.ts +12 -0
  16. package/Components/JsonConfigComponent/ChipInput.js +763 -0
  17. package/Components/JsonConfigComponent/ChipInput.js.map +1 -0
  18. package/Components/JsonConfigComponent/ConfigAccordion.d.ts +15 -0
  19. package/Components/JsonConfigComponent/ConfigAccordion.js +348 -0
  20. package/Components/JsonConfigComponent/ConfigAccordion.js.map +1 -0
  21. package/Components/JsonConfigComponent/ConfigAlive.d.ts +10 -0
  22. package/Components/JsonConfigComponent/ConfigAlive.js +105 -0
  23. package/Components/JsonConfigComponent/ConfigAlive.js.map +1 -0
  24. package/Components/JsonConfigComponent/ConfigAutocomplete.d.ts +37 -0
  25. package/Components/JsonConfigComponent/ConfigAutocomplete.js +73 -0
  26. package/Components/JsonConfigComponent/ConfigAutocomplete.js.map +1 -0
  27. package/Components/JsonConfigComponent/ConfigAutocompleteSendTo.d.ts +17 -0
  28. package/Components/JsonConfigComponent/ConfigAutocompleteSendTo.js +131 -0
  29. package/Components/JsonConfigComponent/ConfigAutocompleteSendTo.js.map +1 -0
  30. package/Components/JsonConfigComponent/ConfigCRON.d.ts +15 -0
  31. package/Components/JsonConfigComponent/ConfigCRON.js +157 -0
  32. package/Components/JsonConfigComponent/ConfigCRON.js.map +1 -0
  33. package/Components/JsonConfigComponent/ConfigCertCollection.d.ts +14 -0
  34. package/Components/JsonConfigComponent/ConfigCertCollection.js +128 -0
  35. package/Components/JsonConfigComponent/ConfigCertCollection.js.map +1 -0
  36. package/Components/JsonConfigComponent/ConfigCertificateSelect.d.ts +14 -0
  37. package/Components/JsonConfigComponent/ConfigCertificateSelect.js +149 -0
  38. package/Components/JsonConfigComponent/ConfigCertificateSelect.js.map +1 -0
  39. package/Components/JsonConfigComponent/ConfigCertificates.d.ts +14 -0
  40. package/Components/JsonConfigComponent/ConfigCertificates.js +284 -0
  41. package/Components/JsonConfigComponent/ConfigCertificates.js.map +1 -0
  42. package/Components/JsonConfigComponent/ConfigCheckLicense.d.ts +3 -0
  43. package/Components/JsonConfigComponent/ConfigCheckLicense.js +821 -0
  44. package/Components/JsonConfigComponent/ConfigCheckLicense.js.map +1 -0
  45. package/Components/JsonConfigComponent/ConfigCheckbox.d.ts +15 -0
  46. package/Components/JsonConfigComponent/ConfigCheckbox.js +40 -0
  47. package/Components/JsonConfigComponent/ConfigCheckbox.js.map +1 -0
  48. package/Components/JsonConfigComponent/ConfigChip.d.ts +14 -0
  49. package/Components/JsonConfigComponent/ConfigChip.js +120 -0
  50. package/Components/JsonConfigComponent/ConfigChip.js.map +1 -0
  51. package/Components/JsonConfigComponent/ConfigColor.d.ts +22 -0
  52. package/Components/JsonConfigComponent/ConfigColor.js +120 -0
  53. package/Components/JsonConfigComponent/ConfigColor.js.map +1 -0
  54. package/Components/JsonConfigComponent/ConfigCoordinates.d.ts +14 -0
  55. package/Components/JsonConfigComponent/ConfigCoordinates.js +265 -0
  56. package/Components/JsonConfigComponent/ConfigCoordinates.js.map +1 -0
  57. package/Components/JsonConfigComponent/ConfigCustom.d.ts +26 -0
  58. package/Components/JsonConfigComponent/ConfigCustom.js +316 -0
  59. package/Components/JsonConfigComponent/ConfigCustom.js.map +1 -0
  60. package/Components/JsonConfigComponent/ConfigDatePicker.d.ts +14 -0
  61. package/Components/JsonConfigComponent/ConfigDatePicker.js +91 -0
  62. package/Components/JsonConfigComponent/ConfigDatePicker.js.map +1 -0
  63. package/Components/JsonConfigComponent/ConfigDeviceManager.d.ts +6 -0
  64. package/Components/JsonConfigComponent/ConfigDeviceManager.js +18 -0
  65. package/Components/JsonConfigComponent/ConfigFile.d.ts +15 -0
  66. package/Components/JsonConfigComponent/ConfigFile.js +228 -0
  67. package/Components/JsonConfigComponent/ConfigFile.js.map +1 -0
  68. package/Components/JsonConfigComponent/ConfigFileSelector.d.ts +3 -0
  69. package/Components/JsonConfigComponent/ConfigFileSelector.js +625 -0
  70. package/Components/JsonConfigComponent/ConfigFileSelector.js.map +1 -0
  71. package/Components/JsonConfigComponent/ConfigFunc.d.ts +14 -0
  72. package/Components/JsonConfigComponent/ConfigFunc.js +124 -0
  73. package/Components/JsonConfigComponent/ConfigFunc.js.map +1 -0
  74. package/Components/JsonConfigComponent/ConfigGeneric.d.ts +95 -0
  75. package/Components/JsonConfigComponent/ConfigGeneric.js +646 -0
  76. package/Components/JsonConfigComponent/ConfigIP.d.ts +14 -0
  77. package/Components/JsonConfigComponent/ConfigIP.js +130 -0
  78. package/Components/JsonConfigComponent/ConfigIP.js.map +1 -0
  79. package/Components/JsonConfigComponent/ConfigImageSendTo.d.ts +10 -0
  80. package/Components/JsonConfigComponent/ConfigImageSendTo.js +114 -0
  81. package/Components/JsonConfigComponent/ConfigImageSendTo.js.map +1 -0
  82. package/Components/JsonConfigComponent/ConfigImageUpload.d.ts +14 -0
  83. package/Components/JsonConfigComponent/ConfigImageUpload.js +166 -0
  84. package/Components/JsonConfigComponent/ConfigImageUpload.js.map +1 -0
  85. package/Components/JsonConfigComponent/ConfigInstanceSelect.d.ts +14 -0
  86. package/Components/JsonConfigComponent/ConfigInstanceSelect.js +264 -0
  87. package/Components/JsonConfigComponent/ConfigInstanceSelect.js.map +1 -0
  88. package/Components/JsonConfigComponent/ConfigInterface.d.ts +14 -0
  89. package/Components/JsonConfigComponent/ConfigInterface.js +146 -0
  90. package/Components/JsonConfigComponent/ConfigInterface.js.map +1 -0
  91. package/Components/JsonConfigComponent/ConfigJsonEditor.d.ts +13 -0
  92. package/Components/JsonConfigComponent/ConfigJsonEditor.js +145 -0
  93. package/Components/JsonConfigComponent/ConfigJsonEditor.js.map +1 -0
  94. package/Components/JsonConfigComponent/ConfigLanguage.d.ts +7 -0
  95. package/Components/JsonConfigComponent/ConfigLanguage.js +110 -0
  96. package/Components/JsonConfigComponent/ConfigLanguage.js.map +1 -0
  97. package/Components/JsonConfigComponent/ConfigLicense.d.ts +24 -0
  98. package/Components/JsonConfigComponent/ConfigLicense.js +183 -0
  99. package/Components/JsonConfigComponent/ConfigLicense.js.map +1 -0
  100. package/Components/JsonConfigComponent/ConfigNumber.d.ts +17 -0
  101. package/Components/JsonConfigComponent/ConfigNumber.js +117 -0
  102. package/Components/JsonConfigComponent/ConfigObjectId.d.ts +17 -0
  103. package/Components/JsonConfigComponent/ConfigObjectId.js +167 -0
  104. package/Components/JsonConfigComponent/ConfigObjectId.js.map +1 -0
  105. package/Components/JsonConfigComponent/ConfigPanel.d.ts +3 -0
  106. package/Components/JsonConfigComponent/ConfigPanel.js +396 -0
  107. package/Components/JsonConfigComponent/ConfigPanel.js.map +1 -0
  108. package/Components/JsonConfigComponent/ConfigPassword.d.ts +14 -0
  109. package/Components/JsonConfigComponent/ConfigPassword.js +193 -0
  110. package/Components/JsonConfigComponent/ConfigPassword.js.map +1 -0
  111. package/Components/JsonConfigComponent/ConfigPattern.d.ts +21 -0
  112. package/Components/JsonConfigComponent/ConfigPattern.js +65 -0
  113. package/Components/JsonConfigComponent/ConfigPattern.js.map +1 -0
  114. package/Components/JsonConfigComponent/ConfigPort.d.ts +3 -0
  115. package/Components/JsonConfigComponent/ConfigPort.js +176 -0
  116. package/Components/JsonConfigComponent/ConfigRoom.d.ts +14 -0
  117. package/Components/JsonConfigComponent/ConfigRoom.js +124 -0
  118. package/Components/JsonConfigComponent/ConfigRoom.js.map +1 -0
  119. package/Components/JsonConfigComponent/ConfigSelect.d.ts +14 -0
  120. package/Components/JsonConfigComponent/ConfigSelect.js +159 -0
  121. package/Components/JsonConfigComponent/ConfigSelect.js.map +1 -0
  122. package/Components/JsonConfigComponent/ConfigSelectSendTo.d.ts +17 -0
  123. package/Components/JsonConfigComponent/ConfigSelectSendTo.js +272 -0
  124. package/Components/JsonConfigComponent/ConfigSelectSendTo.js.map +1 -0
  125. package/Components/JsonConfigComponent/ConfigSendto.d.ts +24 -0
  126. package/Components/JsonConfigComponent/ConfigSendto.js +294 -0
  127. package/Components/JsonConfigComponent/ConfigSendto.js.map +1 -0
  128. package/Components/JsonConfigComponent/ConfigSetState.d.ts +18 -0
  129. package/Components/JsonConfigComponent/ConfigSetState.js +185 -0
  130. package/Components/JsonConfigComponent/ConfigSetState.js.map +1 -0
  131. package/Components/JsonConfigComponent/ConfigSlider.d.ts +14 -0
  132. package/Components/JsonConfigComponent/ConfigSlider.js +119 -0
  133. package/Components/JsonConfigComponent/ConfigSlider.js.map +1 -0
  134. package/Components/JsonConfigComponent/ConfigStaticDivider.d.ts +14 -0
  135. package/Components/JsonConfigComponent/ConfigStaticDivider.js +68 -0
  136. package/Components/JsonConfigComponent/ConfigStaticDivider.js.map +1 -0
  137. package/Components/JsonConfigComponent/ConfigStaticHeader.d.ts +14 -0
  138. package/Components/JsonConfigComponent/ConfigStaticHeader.js +81 -0
  139. package/Components/JsonConfigComponent/ConfigStaticHeader.js.map +1 -0
  140. package/Components/JsonConfigComponent/ConfigStaticImage.d.ts +14 -0
  141. package/Components/JsonConfigComponent/ConfigStaticImage.js +71 -0
  142. package/Components/JsonConfigComponent/ConfigStaticImage.js.map +1 -0
  143. package/Components/JsonConfigComponent/ConfigStaticText.d.ts +14 -0
  144. package/Components/JsonConfigComponent/ConfigStaticText.js +88 -0
  145. package/Components/JsonConfigComponent/ConfigStaticText.js.map +1 -0
  146. package/Components/JsonConfigComponent/ConfigTable.d.ts +3 -0
  147. package/Components/JsonConfigComponent/ConfigTable.js +1064 -0
  148. package/Components/JsonConfigComponent/ConfigTable.js.map +1 -0
  149. package/Components/JsonConfigComponent/ConfigTabs.d.ts +34 -0
  150. package/Components/JsonConfigComponent/ConfigTabs.js +162 -0
  151. package/Components/JsonConfigComponent/ConfigTabs.js.map +1 -0
  152. package/Components/JsonConfigComponent/ConfigText.d.ts +14 -0
  153. package/Components/JsonConfigComponent/ConfigText.js +226 -0
  154. package/Components/JsonConfigComponent/ConfigText.js.map +1 -0
  155. package/Components/JsonConfigComponent/ConfigTextSendTo.d.ts +10 -0
  156. package/Components/JsonConfigComponent/ConfigTextSendTo.js +129 -0
  157. package/Components/JsonConfigComponent/ConfigTextSendTo.js.map +1 -0
  158. package/Components/JsonConfigComponent/ConfigTimePicker.d.ts +14 -0
  159. package/Components/JsonConfigComponent/ConfigTimePicker.js +85 -0
  160. package/Components/JsonConfigComponent/ConfigTimePicker.js.map +1 -0
  161. package/Components/JsonConfigComponent/ConfigTopic.d.ts +17 -0
  162. package/Components/JsonConfigComponent/ConfigTopic.js +110 -0
  163. package/Components/JsonConfigComponent/ConfigTopic.js.map +1 -0
  164. package/Components/JsonConfigComponent/ConfigUUID.d.ts +15 -0
  165. package/Components/JsonConfigComponent/ConfigUUID.js +95 -0
  166. package/Components/JsonConfigComponent/ConfigUUID.js.map +1 -0
  167. package/Components/JsonConfigComponent/ConfigUser.d.ts +14 -0
  168. package/Components/JsonConfigComponent/ConfigUser.js +142 -0
  169. package/Components/JsonConfigComponent/ConfigUser.js.map +1 -0
  170. package/Components/JsonConfigComponent/DeviceManager/Communication.d.ts +63 -0
  171. package/Components/JsonConfigComponent/DeviceManager/Communication.js +268 -0
  172. package/Components/JsonConfigComponent/DeviceManager/DeviceActionButton.d.ts +11 -0
  173. package/Components/JsonConfigComponent/DeviceManager/DeviceActionButton.js +15 -0
  174. package/Components/JsonConfigComponent/DeviceManager/DeviceCard.d.ts +53 -0
  175. package/Components/JsonConfigComponent/DeviceManager/DeviceCard.js +340 -0
  176. package/Components/JsonConfigComponent/DeviceManager/DeviceControl.d.ts +45 -0
  177. package/Components/JsonConfigComponent/DeviceManager/DeviceControl.js +146 -0
  178. package/Components/JsonConfigComponent/DeviceManager/DeviceImageUpload.d.ts +12 -0
  179. package/Components/JsonConfigComponent/DeviceManager/DeviceImageUpload.js +69 -0
  180. package/Components/JsonConfigComponent/DeviceManager/DeviceList.d.ts +51 -0
  181. package/Components/JsonConfigComponent/DeviceManager/DeviceList.js +226 -0
  182. package/Components/JsonConfigComponent/DeviceManager/DeviceStatus.d.ts +13 -0
  183. package/Components/JsonConfigComponent/DeviceManager/DeviceStatus.js +111 -0
  184. package/Components/JsonConfigComponent/DeviceManager/InstanceActionButton.d.ts +7 -0
  185. package/Components/JsonConfigComponent/DeviceManager/InstanceActionButton.js +16 -0
  186. package/Components/JsonConfigComponent/DeviceManager/JsonConfig.d.ts +11 -0
  187. package/Components/JsonConfigComponent/DeviceManager/JsonConfig.js +94 -0
  188. package/Components/JsonConfigComponent/DeviceManager/TooltipButton.d.ts +10 -0
  189. package/Components/JsonConfigComponent/DeviceManager/TooltipButton.js +22 -0
  190. package/Components/JsonConfigComponent/DeviceManager/Utils.d.ts +12 -0
  191. package/Components/JsonConfigComponent/DeviceManager/Utils.js +158 -0
  192. package/Components/JsonConfigComponent/DeviceManager/i18n/de.json +21 -0
  193. package/Components/JsonConfigComponent/DeviceManager/i18n/en.json +21 -0
  194. package/Components/JsonConfigComponent/DeviceManager/i18n/es.json +21 -0
  195. package/Components/JsonConfigComponent/DeviceManager/i18n/fr.json +21 -0
  196. package/Components/JsonConfigComponent/DeviceManager/i18n/i18n.d.ts +26 -0
  197. package/Components/JsonConfigComponent/DeviceManager/i18n/it.json +21 -0
  198. package/Components/JsonConfigComponent/DeviceManager/i18n/nl.json +21 -0
  199. package/Components/JsonConfigComponent/DeviceManager/i18n/pl.json +21 -0
  200. package/Components/JsonConfigComponent/DeviceManager/i18n/pt.json +21 -0
  201. package/Components/JsonConfigComponent/DeviceManager/i18n/ru.json +21 -0
  202. package/Components/JsonConfigComponent/DeviceManager/i18n/uk.json +21 -0
  203. package/Components/JsonConfigComponent/DeviceManager/i18n/zh-cn.json +21 -0
  204. package/Components/JsonConfigComponent/DeviceManager/index.d.ts +2 -0
  205. package/Components/JsonConfigComponent/DeviceManager/index.js +10 -0
  206. package/Components/JsonConfigComponent/DeviceManager/index.js.map +1 -0
  207. package/Components/JsonConfigComponent/Utils.d.ts +9 -0
  208. package/Components/JsonConfigComponent/Utils.js +13 -0
  209. package/Components/JsonConfigComponent/index.d.ts +26 -0
  210. package/Components/JsonConfigComponent/index.js +520 -0
  211. package/Components/JsonConfigComponent/index.js.map +1 -0
  212. package/Components/JsonConfigComponent/wrapper/AdminConnection.d.ts +2 -0
  213. package/Components/JsonConfigComponent/wrapper/AdminConnection.js +7 -0
  214. package/Components/JsonConfigComponent/wrapper/Components/ColorPicker.d.ts +2 -0
  215. package/Components/JsonConfigComponent/wrapper/Components/ColorPicker.js +10 -0
  216. package/Components/JsonConfigComponent/wrapper/Components/ColorPicker.js.map +1 -0
  217. package/Components/JsonConfigComponent/wrapper/Components/Icon.d.ts +2 -0
  218. package/Components/JsonConfigComponent/wrapper/Components/Icon.js +10 -0
  219. package/Components/JsonConfigComponent/wrapper/Components/Icon.js.map +1 -0
  220. package/Components/JsonConfigComponent/wrapper/Components/TextWithIcon.d.ts +2 -0
  221. package/Components/JsonConfigComponent/wrapper/Components/TextWithIcon.js +10 -0
  222. package/Components/JsonConfigComponent/wrapper/Components/TextWithIcon.js.map +1 -0
  223. package/Components/JsonConfigComponent/wrapper/Components/UploadImage.d.ts +2 -0
  224. package/Components/JsonConfigComponent/wrapper/Components/UploadImage.js +10 -0
  225. package/Components/JsonConfigComponent/wrapper/Components/UploadImage.js.map +1 -0
  226. package/Components/JsonConfigComponent/wrapper/Components/Utils.d.ts +2 -0
  227. package/Components/JsonConfigComponent/wrapper/Components/Utils.js +10 -0
  228. package/Components/JsonConfigComponent/wrapper/Components/Utils.js.map +1 -0
  229. package/Components/JsonConfigComponent/wrapper/Dialogs/Confirm.d.ts +2 -0
  230. package/Components/JsonConfigComponent/wrapper/Dialogs/Confirm.js +10 -0
  231. package/Components/JsonConfigComponent/wrapper/Dialogs/Confirm.js.map +1 -0
  232. package/Components/JsonConfigComponent/wrapper/Dialogs/Cron.d.ts +2 -0
  233. package/Components/JsonConfigComponent/wrapper/Dialogs/Cron.js +10 -0
  234. package/Components/JsonConfigComponent/wrapper/Dialogs/Cron.js.map +1 -0
  235. package/Components/JsonConfigComponent/wrapper/Dialogs/Error.d.ts +2 -0
  236. package/Components/JsonConfigComponent/wrapper/Dialogs/Error.js +10 -0
  237. package/Components/JsonConfigComponent/wrapper/Dialogs/Error.js.map +1 -0
  238. package/Components/JsonConfigComponent/wrapper/Dialogs/Message.d.ts +2 -0
  239. package/Components/JsonConfigComponent/wrapper/Dialogs/Message.js +10 -0
  240. package/Components/JsonConfigComponent/wrapper/Dialogs/Message.js.map +1 -0
  241. package/Components/JsonConfigComponent/wrapper/Dialogs/SelectFile.d.ts +2 -0
  242. package/Components/JsonConfigComponent/wrapper/Dialogs/SelectFile.js +10 -0
  243. package/Components/JsonConfigComponent/wrapper/Dialogs/SelectFile.js.map +1 -0
  244. package/Components/JsonConfigComponent/wrapper/Dialogs/SelectID.d.ts +2 -0
  245. package/Components/JsonConfigComponent/wrapper/Dialogs/SelectID.js +10 -0
  246. package/Components/JsonConfigComponent/wrapper/Dialogs/SelectID.js.map +1 -0
  247. package/Components/JsonConfigComponent/wrapper/i18n.d.ts +2 -0
  248. package/Components/JsonConfigComponent/wrapper/i18n.js +10 -0
  249. package/Components/JsonConfigComponent/wrapper/i18n.js.map +1 -0
  250. package/Components/JsonConfigComponent/wrapper/icons/IconCopy.d.ts +2 -0
  251. package/Components/JsonConfigComponent/wrapper/icons/IconCopy.js +10 -0
  252. package/Components/JsonConfigComponent/wrapper/icons/IconCopy.js.map +1 -0
  253. package/Components/Loader.js +223 -223
  254. package/Components/Loader.js.map +1 -0
  255. package/Components/Loaders/PT.css +108 -108
  256. package/Components/Loaders/PT.js +103 -103
  257. package/Components/Loaders/PT.js.map +1 -0
  258. package/Components/Loaders/Vendor.css +13 -13
  259. package/Components/Loaders/Vendor.js +7 -7
  260. package/Components/Loaders/Vendor.js.map +1 -0
  261. package/Components/Logo.js.map +1 -0
  262. package/Components/MDUtils.js.map +1 -0
  263. package/Components/ObjectBrowser.js +344 -344
  264. package/Components/ObjectBrowser.js.map +1 -1
  265. package/Components/Router.js.map +1 -0
  266. package/Components/SaveCloseButtons.js.map +1 -0
  267. package/Components/Schedule.js.map +1 -0
  268. package/Components/SelectWithIcon.js.map +1 -0
  269. package/Components/SimpleCron/cron2text.js.map +1 -0
  270. package/Components/SimpleCron/cronText.js.map +1 -0
  271. package/Components/SimpleCron/index.js.map +1 -0
  272. package/Components/SimpleCron/jquery.cron.locale.js.map +1 -0
  273. package/Components/TabContainer.js.map +1 -0
  274. package/Components/TabContent.js.map +1 -0
  275. package/Components/TabHeader.js.map +1 -0
  276. package/Components/TableResize.js +5 -5
  277. package/Components/TableResize.js.map +1 -1
  278. package/Components/TextWithIcon.js.map +1 -0
  279. package/Components/ToggleThemeMenu.js.map +1 -0
  280. package/Components/TreeTable.js +70 -70
  281. package/Components/TreeTable.js.map +1 -1
  282. package/Components/UploadImage.js +305 -305
  283. package/Components/UploadImage.js.map +1 -0
  284. package/Components/Utils.js.map +1 -0
  285. package/Components/copy-to-clipboard.d.ts +13 -0
  286. package/Components/copy-to-clipboard.js +156 -0
  287. package/Components/copy-to-clipboard.js.map +1 -0
  288. package/Components/loader.css +221 -221
  289. package/Components/types.d.ts +82 -82
  290. package/Components/withWidth.js.map +1 -1
  291. package/Connection.js.map +1 -1
  292. package/Dialogs/ComplexCron.js.map +1 -0
  293. package/Dialogs/Confirm.js.map +1 -0
  294. package/Dialogs/Cron.js.map +1 -0
  295. package/Dialogs/Error.js.map +1 -0
  296. package/Dialogs/Message.js.map +1 -0
  297. package/Dialogs/SelectFile.js.map +1 -0
  298. package/Dialogs/SelectID.js.map +1 -0
  299. package/Dialogs/SimpleCron.js.map +1 -0
  300. package/Dialogs/TextInput.js.map +1 -0
  301. package/GenericApp.d.ts +2 -2
  302. package/GenericApp.js +49 -49
  303. package/GenericApp.js.map +1 -0
  304. package/LICENSE +22 -22
  305. package/LegacyConnection.d.ts +1 -1
  306. package/LegacyConnection.js +1 -0
  307. package/LegacyConnection.js.map +1 -0
  308. package/Prompt.js +7 -7
  309. package/Prompt.js.map +1 -0
  310. package/README.md +1101 -1101
  311. package/Theme.js.map +1 -0
  312. package/assets/devices/Alarm Systems.svg +18 -18
  313. package/assets/devices/Amplifier.svg +21 -21
  314. package/assets/devices/Awnings.svg +4 -4
  315. package/assets/devices/Battery Status.svg +4 -4
  316. package/assets/devices/Ceiling Spotlights.svg +15 -15
  317. package/assets/devices/Chandelier.svg +6 -6
  318. package/assets/devices/Climate.svg +11 -11
  319. package/assets/devices/Coffee Makers.svg +5 -5
  320. package/assets/devices/Cold Water.svg +31 -31
  321. package/assets/devices/Computer.svg +21 -21
  322. package/assets/devices/Consumption.svg +7 -7
  323. package/assets/devices/Curtains.svg +43 -43
  324. package/assets/devices/Dishwashers.svg +11 -11
  325. package/assets/devices/Doors.svg +5 -5
  326. package/assets/devices/Doorstep.svg +35 -35
  327. package/assets/devices/Dryer.svg +13 -13
  328. package/assets/devices/Fan.svg +20 -20
  329. package/assets/devices/Floor Lamps.svg +4 -4
  330. package/assets/devices/Garage Doors.svg +9 -9
  331. package/assets/devices/Gates.svg +32 -32
  332. package/assets/devices/Hairdryer.svg +23 -23
  333. package/assets/devices/Handle.svg +6 -6
  334. package/assets/devices/Hanging Lamps.svg +8 -8
  335. package/assets/devices/Heater.svg +44 -44
  336. package/assets/devices/Hoods.svg +11 -11
  337. package/assets/devices/Hot Water.svg +9 -9
  338. package/assets/devices/Humidity.svg +41 -41
  339. package/assets/devices/Iron.svg +4 -4
  340. package/assets/devices/Irrigation.svg +22 -22
  341. package/assets/devices/Led Strip.svg +30 -30
  342. package/assets/devices/Light.svg +29 -29
  343. package/assets/devices/Lightings.svg +46 -46
  344. package/assets/devices/Lock.svg +19 -19
  345. package/assets/devices/Louvre.svg +6 -6
  346. package/assets/devices/Mowing Machine.svg +8 -8
  347. package/assets/devices/Music.svg +12 -12
  348. package/assets/devices/Outdoor Blinds.svg +6 -6
  349. package/assets/devices/People.svg +19 -19
  350. package/assets/devices/Pool.svg +7 -7
  351. package/assets/devices/Power Consumption.svg +12 -12
  352. package/assets/devices/Printer.svg +9 -9
  353. package/assets/devices/Pump.svg +9 -9
  354. package/assets/devices/Receiver.svg +18 -18
  355. package/assets/devices/Sconces.svg +9 -9
  356. package/assets/devices/Security.svg +34 -34
  357. package/assets/devices/Shading.svg +4 -4
  358. package/assets/devices/Shutters.svg +10 -10
  359. package/assets/devices/SmokeDetector.svg +12 -12
  360. package/assets/devices/Sockets.svg +13 -13
  361. package/assets/devices/Speaker.svg +35 -35
  362. package/assets/devices/Stove.svg +11 -11
  363. package/assets/devices/Table Lamps.svg +11 -11
  364. package/assets/devices/Temperature Sensors.svg +28 -28
  365. package/assets/devices/Tv.svg +7 -7
  366. package/assets/devices/Vacuum Cleaner.svg +15 -15
  367. package/assets/devices/Ventilation.svg +12 -12
  368. package/assets/devices/Washing Machines.svg +15 -15
  369. package/assets/devices/Water Consumption.svg +5 -5
  370. package/assets/devices/Water Heater.svg +8 -8
  371. package/assets/devices/Water.svg +40 -40
  372. package/assets/devices/Weather.svg +28 -28
  373. package/assets/devices/Window.svg +7 -7
  374. package/assets/devices/list.json +993 -993
  375. package/assets/devices/names.txt +62 -62
  376. package/assets/devices/parseNames.js +34 -34
  377. package/assets/lamp_ceiling.svg +8 -8
  378. package/assets/lamp_table.svg +7 -7
  379. package/assets/no_icon.svg +9 -9
  380. package/assets/rooms/Anteroom.svg +52 -52
  381. package/assets/rooms/Attic.svg +21 -21
  382. package/assets/rooms/Balcony.svg +12 -12
  383. package/assets/rooms/Barn.svg +5 -5
  384. package/assets/rooms/Basement.svg +4 -4
  385. package/assets/rooms/Bathroom.svg +38 -38
  386. package/assets/rooms/Bedroom.svg +5 -5
  387. package/assets/rooms/Boiler Room.svg +12 -12
  388. package/assets/rooms/Carport.svg +17 -17
  389. package/assets/rooms/Cellar.svg +89 -89
  390. package/assets/rooms/Chamber.svg +9 -9
  391. package/assets/rooms/Corridor.svg +52 -52
  392. package/assets/rooms/Dining Area.svg +37 -37
  393. package/assets/rooms/Dining Room.svg +37 -37
  394. package/assets/rooms/Dining.svg +37 -37
  395. package/assets/rooms/Dressing Room.svg +4 -4
  396. package/assets/rooms/Driveway.svg +14 -14
  397. package/assets/rooms/Entrance.svg +44 -44
  398. package/assets/rooms/Equipment Room.svg +14 -14
  399. package/assets/rooms/Front Yard.svg +64 -64
  400. package/assets/rooms/Gallery.svg +13 -13
  401. package/assets/rooms/Garage.svg +20 -20
  402. package/assets/rooms/Garden.svg +12 -12
  403. package/assets/rooms/Ground Floor.svg +95 -95
  404. package/assets/rooms/Guest Bathroom.svg +32 -32
  405. package/assets/rooms/Guest Room.svg +5 -5
  406. package/assets/rooms/Gym.svg +4 -4
  407. package/assets/rooms/Hall.svg +19 -19
  408. package/assets/rooms/Home Theater.svg +7 -7
  409. package/assets/rooms/Kitchen.svg +17 -17
  410. package/assets/rooms/Laundry Room.svg +11 -11
  411. package/assets/rooms/Living Area.svg +10 -10
  412. package/assets/rooms/Living Room.svg +10 -10
  413. package/assets/rooms/Locker Room.svg +16 -16
  414. package/assets/rooms/Nursery.svg +4 -4
  415. package/assets/rooms/Office.svg +8 -8
  416. package/assets/rooms/Outdoors.svg +7 -7
  417. package/assets/rooms/Playroom.svg +5 -5
  418. package/assets/rooms/Pool.svg +7 -7
  419. package/assets/rooms/Rear Wall.svg +30 -30
  420. package/assets/rooms/Second Floor.svg +95 -95
  421. package/assets/rooms/Shed.svg +16 -16
  422. package/assets/rooms/Sleeping Area.svg +22 -22
  423. package/assets/rooms/Stairway.svg +4 -4
  424. package/assets/rooms/Stairwell.svg +15 -15
  425. package/assets/rooms/Storeroom.svg +4 -4
  426. package/assets/rooms/Summer House.svg +27 -27
  427. package/assets/rooms/Swimming Pool.svg +21 -21
  428. package/assets/rooms/Terrace.svg +6 -6
  429. package/assets/rooms/Toilet.svg +10 -10
  430. package/assets/rooms/Upstairs.svg +5 -5
  431. package/assets/rooms/Wardrobe.svg +60 -60
  432. package/assets/rooms/Washroom.svg +19 -19
  433. package/assets/rooms/Wc.svg +10 -10
  434. package/assets/rooms/Windscreen.svg +60 -60
  435. package/assets/rooms/Workshop.svg +22 -22
  436. package/assets/rooms/Workspace.svg +8 -8
  437. package/assets/rooms/list.json +945 -945
  438. package/assets/rooms/names.txt +59 -59
  439. package/assets/rooms/parseNames.js +34 -34
  440. package/craco-module-federation.js +69 -69
  441. package/i18n.js.map +1 -0
  442. package/icons/IconAdapter.js.map +1 -1
  443. package/icons/IconAlias.js.map +1 -1
  444. package/icons/IconChannel.js.map +1 -1
  445. package/icons/IconClearFilter.js.map +1 -1
  446. package/icons/IconClosed.js.map +1 -1
  447. package/icons/IconCopy.js +8 -8
  448. package/icons/IconCopy.js.map +1 -1
  449. package/icons/IconDevice.js.map +1 -1
  450. package/icons/IconDocument.js.map +1 -1
  451. package/icons/IconDocumentReadOnly.js.map +1 -1
  452. package/icons/IconExpert.js.map +1 -0
  453. package/icons/IconFx.js +1 -1
  454. package/icons/IconFx.js.map +1 -1
  455. package/icons/IconInstance.js.map +1 -1
  456. package/icons/IconLogout.js +9 -9
  457. package/icons/IconLogout.js.map +1 -1
  458. package/icons/IconNoIcon.js +8 -8
  459. package/icons/IconNoIcon.js.map +1 -1
  460. package/icons/IconOpen.js.map +1 -1
  461. package/icons/IconState.js.map +1 -1
  462. package/index.css +54 -54
  463. package/package.json +2 -2
  464. package/types.d.ts +94 -94
@@ -0,0 +1,763 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.defaultChipRenderer = exports["default"] = void 0;
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
11
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
12
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
13
+ var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
14
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
15
+ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
16
+ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
17
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
18
+ var _react = _interopRequireDefault(require("react"));
19
+ var _reactDom = _interopRequireDefault(require("react-dom"));
20
+ var _propTypes = _interopRequireDefault(require("prop-types"));
21
+ var _styles = require("@mui/styles");
22
+ var _material = require("@mui/material");
23
+ var _FilledInput = _interopRequireDefault(require("@mui/material/FilledInput/FilledInput"));
24
+ var _blue = _interopRequireDefault(require("@mui/material/colors/blue"));
25
+ var _Utils = _interopRequireDefault(require("../Utils"));
26
+ var _excluded = ["alwaysShowPlaceholder", "chipRenderer", "classes", "className", "dataSourceConfig", "disabled", "disableUnderline", "error", "FormHelperTextProps", "fullWidth", "fullWidthInput", "helperText", "id", "InputProps", "InputLabelProps", "inputValue", "label", "placeholder", "readOnly", "required", "rootRef", "value", "variant"];
27
+ 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; }
28
+ 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; }
29
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
30
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /**
31
+ * Notice: Some code was adapted from Material-UI's text field.
32
+ * Copyright (c) 2014 Call-Em-All (https://github.com/callemall/material-ui)
33
+ */
34
+ var variantComponent = {
35
+ standard: _material.Input,
36
+ filled: _FilledInput["default"],
37
+ outlined: _material.OutlinedInput
38
+ };
39
+ var styles = function styles(theme) {
40
+ var light = theme.palette.type === 'light';
41
+ var bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';
42
+ return {
43
+ root: {},
44
+ inputRoot: {
45
+ display: 'inline-flex',
46
+ flexWrap: 'wrap',
47
+ flex: 1,
48
+ marginTop: 0,
49
+ minWidth: 70,
50
+ '&$outlined,&$filled': {
51
+ boxSizing: 'border-box'
52
+ },
53
+ '&$outlined': {
54
+ paddingTop: 14
55
+ },
56
+ '&$filled': {
57
+ paddingTop: 28
58
+ }
59
+ },
60
+ input: {
61
+ display: 'inline-block',
62
+ textOverflow: 'ellipsis',
63
+ overflow: 'hidden',
64
+ whiteSpace: 'nowrap',
65
+ appearance: 'none',
66
+ // Remove border in Safari, doesn't seem to break anything in other browsers
67
+ WebkitTapHighlightColor: 'rgba(0,0,0,0)',
68
+ // Remove mobile color flashing (deprecated style).
69
+ "float": 'left',
70
+ flex: 1
71
+ },
72
+ chipContainer: {
73
+ display: 'flex',
74
+ flexFlow: 'row wrap',
75
+ cursor: 'text',
76
+ marginBottom: -2,
77
+ minHeight: 40,
78
+ '&$labeled&$standard': {
79
+ marginTop: 18
80
+ }
81
+ },
82
+ outlined: {
83
+ '& input': {
84
+ height: 16,
85
+ paddingTop: 4,
86
+ paddingBottom: 12,
87
+ marginTop: 4,
88
+ marginBottom: 4
89
+ }
90
+ },
91
+ standard: {},
92
+ filled: {
93
+ '& input': {
94
+ height: 22,
95
+ marginBottom: 4,
96
+ marginTop: 4,
97
+ paddingTop: 0
98
+ },
99
+ '$marginDense & input': {
100
+ height: 26
101
+ }
102
+ },
103
+ labeled: {},
104
+ label: {
105
+ top: 4,
106
+ '&$outlined&:not($labelShrink)': {
107
+ top: 2,
108
+ '$marginDense &': {
109
+ top: 5
110
+ }
111
+ },
112
+ '&$filled&:not($labelShrink)': {
113
+ top: 15,
114
+ '$marginDense &': {
115
+ top: 20
116
+ }
117
+ }
118
+ },
119
+ labelShrink: {
120
+ top: 0
121
+ },
122
+ helperText: {
123
+ marginBottom: -20
124
+ },
125
+ focused: {},
126
+ disabled: {},
127
+ underline: {
128
+ '&:after': {
129
+ borderBottom: "2px solid ".concat(theme.palette.primary[light ? 'dark' : 'light']),
130
+ left: 0,
131
+ bottom: 0,
132
+ // Doing the other way around a crash on IE 11 "''" https://github.com/cssinjs/jss/issues/242
133
+ content: '""',
134
+ position: 'absolute',
135
+ right: 0,
136
+ transform: 'scaleX(0)',
137
+ transition: theme.transitions.create('transform', {
138
+ duration: theme.transitions.duration.shorter,
139
+ easing: theme.transitions.easing.easeOut
140
+ }),
141
+ pointerEvents: 'none' // Transparent to the hover style.
142
+ },
143
+ '&$focused:after': {
144
+ transform: 'scaleX(1)'
145
+ },
146
+ '&$error:after': {
147
+ borderBottomColor: theme.palette.error.main,
148
+ transform: 'scaleX(1)' // error is always underlined in red
149
+ },
150
+ '&:before': {
151
+ borderBottom: "1px solid ".concat(bottomLineColor),
152
+ left: 0,
153
+ bottom: 0,
154
+ // Doing the other way around a crash on IE 11 "''" https://github.com/cssinjs/jss/issues/242
155
+ content: '"\\00a0"',
156
+ position: 'absolute',
157
+ right: 0,
158
+ transition: theme.transitions.create('border-bottom-color', {
159
+ duration: theme.transitions.duration.shorter
160
+ }),
161
+ pointerEvents: 'none' // Transparent to the hover style.
162
+ },
163
+ '&:hover:not($disabled):not($focused):not($error):before': {
164
+ borderBottom: "2px solid ".concat(theme.palette.text.primary),
165
+ // Reset on touch devices, it doesn't add specificity
166
+ '@media (hover: none)': {
167
+ borderBottom: "1px solid ".concat(bottomLineColor)
168
+ }
169
+ },
170
+ '&$disabled:before': {
171
+ borderBottomStyle: 'dotted'
172
+ }
173
+ },
174
+ error: {
175
+ '&:after': {
176
+ backgroundColor: theme.palette.error.main,
177
+ transform: 'scaleX(1)' // error is always underlined in red
178
+ }
179
+ },
180
+ chip: {
181
+ margin: '0 8px 8px 0',
182
+ "float": 'left'
183
+ },
184
+ marginDense: {}
185
+ };
186
+ };
187
+ var keyCodes = {
188
+ BACKSPACE: 8,
189
+ DELETE: 46,
190
+ LEFT_ARROW: 37,
191
+ RIGHT_ARROW: 39
192
+ };
193
+ var defaultChipRenderer = exports.defaultChipRenderer = function defaultChipRenderer(_ref, key) {
194
+ var text = _ref.text,
195
+ isFocused = _ref.isFocused,
196
+ isDisabled = _ref.isDisabled,
197
+ isReadOnly = _ref.isReadOnly,
198
+ handleClick = _ref.handleClick,
199
+ handleDelete = _ref.handleDelete,
200
+ className = _ref.className;
201
+ return /*#__PURE__*/_react["default"].createElement(_material.Chip, {
202
+ key: key,
203
+ className: className,
204
+ style: {
205
+ pointerEvents: isDisabled || isReadOnly ? 'none' : undefined,
206
+ backgroundColor: isFocused ? _blue["default"][300] : undefined
207
+ },
208
+ onClick: handleClick,
209
+ onDelete: handleDelete,
210
+ label: text
211
+ });
212
+ };
213
+ var ChipInput = /*#__PURE__*/function (_React$Component) {
214
+ (0, _inherits2["default"])(ChipInput, _React$Component);
215
+ var _super = _createSuper(ChipInput);
216
+ function ChipInput(props) {
217
+ var _this;
218
+ (0, _classCallCheck2["default"])(this, ChipInput);
219
+ _this = _super.call(this, props);
220
+ /**
221
+ * Blurs this component.
222
+ * @public
223
+ */
224
+ // blur() {
225
+ // if (this.input) {
226
+ // this.actualInput.blur();
227
+ // }
228
+ // }
229
+ /**
230
+ * Focuses this component.
231
+ * @public
232
+ */
233
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "focus", function () {
234
+ _this.actualInput.focus();
235
+ if (_this.state.focusedChip) {
236
+ _this.setState({
237
+ focusedChip: null
238
+ });
239
+ }
240
+ });
241
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleInputBlur", function (event) {
242
+ if (_this.props.onBlur) {
243
+ _this.props.onBlur(event);
244
+ }
245
+ _this.setState({
246
+ isFocused: false
247
+ });
248
+ if (_this.state.focusedChip) {
249
+ _this.setState({
250
+ focusedChip: null
251
+ });
252
+ }
253
+ var value = event.target.value;
254
+ var addChipOptions;
255
+ switch (_this.props.blurBehavior) {
256
+ case 'add-or-clear':
257
+ addChipOptions = {
258
+ clearInputOnFail: true
259
+ };
260
+ // falls through
261
+ case 'add':
262
+ if (_this.props.delayBeforeAdd) {
263
+ // Let's assume that we only want to add the existing content as chip, when
264
+ // another event has not added a chip within 200ms.
265
+ // e.g., onSelection Callback in Autocomplete case
266
+ var numChipsBefore = (_this.props.value || _this.state.chips).length;
267
+ _this.inputBlurTimeout = setTimeout(function () {
268
+ var numChipsAfter = (_this.props.value || _this.state.chips).length;
269
+ if (numChipsBefore === numChipsAfter) {
270
+ _this.handleAddChip(value, addChipOptions);
271
+ } else {
272
+ _this.clearInput();
273
+ }
274
+ }, 150);
275
+ } else {
276
+ _this.handleAddChip(value, addChipOptions);
277
+ }
278
+ break;
279
+ case 'clear':
280
+ _this.clearInput();
281
+ break;
282
+ default:
283
+ break;
284
+ }
285
+ });
286
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleInputFocus", function (event) {
287
+ _this.setState({
288
+ isFocused: true
289
+ });
290
+ if (_this.props.onFocus) {
291
+ _this.props.onFocus(event);
292
+ }
293
+ });
294
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleKeyDown", function (event) {
295
+ var focusedChip = _this.state.focusedChip;
296
+ _this._keyPressed = false;
297
+ _this._preventChipCreation = false;
298
+ if (_this.props.onKeyDown) {
299
+ // Needed for arrow controls on a menu in autocomplete scenario
300
+ _this.props.onKeyDown(event);
301
+ // Check if the callback marked the event as isDefaultPrevented() and skip further actions
302
+ // enter key, for example, should not always add the current value of the inputField
303
+ if (event.isDefaultPrevented()) {
304
+ return;
305
+ }
306
+ }
307
+ var chips = _this.props.value || _this.state.chips;
308
+ if (_this.props.newChipKeyCodes.includes(event.keyCode) || _this.props.newChipKeys.includes(event.key)) {
309
+ var result = _this.handleAddChip(event.target.value);
310
+ if (result !== false) {
311
+ event.preventDefault();
312
+ }
313
+ return;
314
+ }
315
+ switch (event.keyCode) {
316
+ case keyCodes.BACKSPACE:
317
+ if (event.target.value === '') {
318
+ if (focusedChip) {
319
+ _this.handleDeleteChip(chips[focusedChip], focusedChip);
320
+ if (focusedChip) {
321
+ _this.setState({
322
+ focusedChip: focusedChip - 1
323
+ });
324
+ }
325
+ } else {
326
+ _this.setState({
327
+ focusedChip: chips.length - 1
328
+ });
329
+ }
330
+ }
331
+ break;
332
+ case keyCodes.DELETE:
333
+ if (event.target.value === '' && focusedChip) {
334
+ _this.handleDeleteChip(chips[focusedChip], focusedChip);
335
+ if (focusedChip <= chips.length - 1) {
336
+ _this.setState({
337
+ focusedChip: focusedChip
338
+ });
339
+ }
340
+ }
341
+ break;
342
+ case keyCodes.LEFT_ARROW:
343
+ if (focusedChip === null && event.target.value === '' && chips.length) {
344
+ _this.setState({
345
+ focusedChip: chips.length - 1
346
+ });
347
+ } else if (focusedChip !== null && focusedChip > 0) {
348
+ _this.setState({
349
+ focusedChip: focusedChip - 1
350
+ });
351
+ }
352
+ break;
353
+ case keyCodes.RIGHT_ARROW:
354
+ if (focusedChip !== null && focusedChip < chips.length - 1) {
355
+ _this.setState({
356
+ focusedChip: focusedChip + 1
357
+ });
358
+ } else {
359
+ _this.setState({
360
+ focusedChip: null
361
+ });
362
+ }
363
+ break;
364
+ default:
365
+ _this.setState({
366
+ focusedChip: null
367
+ });
368
+ break;
369
+ }
370
+ });
371
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleKeyUp", function (event) {
372
+ if (!_this._preventChipCreation && (_this.props.newChipKeyCodes.indexOf(event.keyCode) >= 0 || _this.props.newChipKeys.indexOf(event.key) >= 0) && _this._keyPressed) {
373
+ _this.clearInput();
374
+ } else {
375
+ _this.updateInput(event.target.value);
376
+ }
377
+ if (_this.props.onKeyUp) {
378
+ _this.props.onKeyUp(event);
379
+ }
380
+ });
381
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleKeyPress", function (event) {
382
+ _this._keyPressed = true;
383
+ if (_this.props.onKeyPress) {
384
+ _this.props.onKeyPress(event);
385
+ }
386
+ });
387
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleUpdateInput", function (e) {
388
+ if (_this.props.inputValue === null || _this.props.inputValue === undefined) {
389
+ _this.updateInput(e.target.value);
390
+ }
391
+ if (_this.props.onUpdateInput) {
392
+ _this.props.onUpdateInput(e);
393
+ }
394
+ });
395
+ /**
396
+ * Set the reference to the actual input, that is the input of the Input.
397
+ * @param {object} ref - The reference
398
+ */
399
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "setActualInputRef", function (ref) {
400
+ _this.actualInput = ref;
401
+ _this.props.inputRef && _this.props.inputRef(ref);
402
+ });
403
+ _this.state = {
404
+ chips: [],
405
+ focusedChip: null,
406
+ inputValue: '',
407
+ isFocused: false,
408
+ chipsUpdated: false,
409
+ prevPropsValue: []
410
+ };
411
+ if (props.defaultValue) {
412
+ _this.state.chips = props.defaultValue;
413
+ }
414
+ _this.labelRef = /*#__PURE__*/_react["default"].createRef();
415
+ _this.input = /*#__PURE__*/_react["default"].createRef();
416
+ return _this;
417
+ }
418
+ (0, _createClass2["default"])(ChipInput, [{
419
+ key: "componentDidMount",
420
+ value: function componentDidMount() {
421
+ if (this.props.variant === 'outlined') {
422
+ // eslint-disable-next-line react/no-find-dom-node
423
+ this.labelNode = _reactDom["default"].findDOMNode(this.labelRef.current);
424
+ this.forceUpdate();
425
+ }
426
+ }
427
+ }, {
428
+ key: "componentWillUnmount",
429
+ value: function componentWillUnmount() {
430
+ clearTimeout(this.inputBlurTimeout);
431
+ }
432
+ }, {
433
+ key: "handleAddChip",
434
+ value:
435
+ /**
436
+ * Handles adding a chip.
437
+ * @param {string|object} chip Value of the chip, either a string or an object (if dataSourceConfig is set)
438
+ * @param {object=} options Additional options
439
+ * @param {boolean=} options.clearInputOnFail If `true`, and `onBeforeAdd` returns `false`, clear the input
440
+ * @returns True if the chip was added (or at least `onAdd` was called), false if adding the chip was prevented
441
+ */
442
+ function handleAddChip(chip, options) {
443
+ var _this2 = this;
444
+ if (this.props.onBeforeAdd && !this.props.onBeforeAdd(chip)) {
445
+ this._preventChipCreation = true;
446
+ if (options && options.clearInputOnFail) {
447
+ this.clearInput();
448
+ }
449
+ return false;
450
+ }
451
+ this.clearInput();
452
+ var chips = this.props.value || this.state.chips;
453
+ if (this.props.dataSourceConfig) {
454
+ if (typeof chip === 'string') {
455
+ chip = (0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, this.props.dataSourceConfig.text, chip), this.props.dataSourceConfig.value, chip);
456
+ }
457
+ if (this.props.allowDuplicates || !chips.some(function (c) {
458
+ return c[_this2.props.dataSourceConfig.value] === chip[_this2.props.dataSourceConfig.value];
459
+ })) {
460
+ if (this.props.value && this.props.onAdd) {
461
+ this.props.onAdd(chip);
462
+ } else {
463
+ this.updateChips([].concat((0, _toConsumableArray2["default"])(this.state.chips), [chip]));
464
+ }
465
+ }
466
+ return true;
467
+ }
468
+ if (chip.trim().length > 0) {
469
+ if (this.props.allowDuplicates || !chips.includes(chip)) {
470
+ if (this.props.value && this.props.onAdd) {
471
+ this.props.onAdd(chip);
472
+ } else {
473
+ this.updateChips([].concat((0, _toConsumableArray2["default"])(this.state.chips), [chip]));
474
+ }
475
+ }
476
+ return true;
477
+ }
478
+ return false;
479
+ }
480
+ }, {
481
+ key: "handleDeleteChip",
482
+ value: function handleDeleteChip(chip, i) {
483
+ if (!this.props.value) {
484
+ var chips = this.state.chips.slice();
485
+ var changed = chips.splice(i, 1); // remove the chip at index i
486
+ if (changed) {
487
+ var focusedChip = this.state.focusedChip;
488
+ if (this.state.focusedChip === i) {
489
+ focusedChip = null;
490
+ } else if (this.state.focusedChip > i) {
491
+ focusedChip = this.state.focusedChip - 1;
492
+ }
493
+ this.updateChips(chips, {
494
+ focusedChip: focusedChip
495
+ });
496
+ }
497
+ } else if (this.props.onDelete) {
498
+ this.props.onDelete(chip, i);
499
+ }
500
+ }
501
+ }, {
502
+ key: "updateChips",
503
+ value: function updateChips(chips) {
504
+ var additionalUpdates = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
505
+ this.setState(_objectSpread({
506
+ chips: chips,
507
+ chipsUpdated: true
508
+ }, additionalUpdates));
509
+ if (this.props.onChange) {
510
+ this.props.onChange(chips);
511
+ }
512
+ }
513
+
514
+ /**
515
+ * Clears the text field for adding new chips.
516
+ * This only works in uncontrolled input mode, i.e. if the inputValue prop is not used.
517
+ * @public
518
+ */
519
+ }, {
520
+ key: "clearInput",
521
+ value: function clearInput() {
522
+ this.updateInput('');
523
+ }
524
+ }, {
525
+ key: "updateInput",
526
+ value: function updateInput(value) {
527
+ this.setState({
528
+ inputValue: value
529
+ });
530
+ }
531
+ }, {
532
+ key: "render",
533
+ value: function render() {
534
+ var _this3 = this;
535
+ var _this$props = this.props,
536
+ alwaysShowPlaceholder = _this$props.alwaysShowPlaceholder,
537
+ _this$props$chipRende = _this$props.chipRenderer,
538
+ chipRenderer = _this$props$chipRende === void 0 ? defaultChipRenderer : _this$props$chipRende,
539
+ classes = _this$props.classes,
540
+ className = _this$props.className,
541
+ dataSourceConfig = _this$props.dataSourceConfig,
542
+ disabled = _this$props.disabled,
543
+ disableUnderline = _this$props.disableUnderline,
544
+ error = _this$props.error,
545
+ FormHelperTextProps = _this$props.FormHelperTextProps,
546
+ fullWidth = _this$props.fullWidth,
547
+ fullWidthInput = _this$props.fullWidthInput,
548
+ helperText = _this$props.helperText,
549
+ id = _this$props.id,
550
+ _this$props$InputProp = _this$props.InputProps,
551
+ InputProps = _this$props$InputProp === void 0 ? {} : _this$props$InputProp,
552
+ _this$props$InputLabe = _this$props.InputLabelProps,
553
+ InputLabelProps = _this$props$InputLabe === void 0 ? {} : _this$props$InputLabe,
554
+ inputValue = _this$props.inputValue,
555
+ label = _this$props.label,
556
+ placeholder = _this$props.placeholder,
557
+ readOnly = _this$props.readOnly,
558
+ required = _this$props.required,
559
+ rootRef = _this$props.rootRef,
560
+ value = _this$props.value,
561
+ variant = _this$props.variant,
562
+ other = (0, _objectWithoutProperties2["default"])(_this$props, _excluded);
563
+ var chips = value || this.state.chips || [];
564
+ if (!Array.isArray(chips)) {
565
+ chips = (chips || '').toString().split(/[,\s]+/).map(function (c) {
566
+ return c.trim();
567
+ });
568
+ }
569
+ var actualInputValue = inputValue !== null && inputValue !== void 0 ? inputValue : this.state.inputValue;
570
+ var hasInput = (this.props.value || actualInputValue).length || actualInputValue.length;
571
+ var shrinkFloatingLabel = typeof InputLabelProps.shrink === 'boolean' ? InputLabelProps.shrink : label !== null && (hasInput || this.state.isFocused || chips.length);
572
+ var chipComponents = chips.map(function (chip, i) {
573
+ var value_ = dataSourceConfig ? chip[dataSourceConfig.value] : chip;
574
+ return chipRenderer({
575
+ value: value_,
576
+ text: dataSourceConfig ? chip[dataSourceConfig.text] : chip,
577
+ chip: chip,
578
+ isDisabled: !!disabled,
579
+ isReadOnly: readOnly,
580
+ isFocused: _this3.state.focusedChip === i,
581
+ handleClick: function handleClick() {
582
+ return _this3.setState({
583
+ focusedChip: i
584
+ });
585
+ },
586
+ handleDelete: function handleDelete() {
587
+ return _this3.handleDeleteChip(chip, i);
588
+ },
589
+ className: classes.chip
590
+ }, i);
591
+ });
592
+ var InputMore = {};
593
+ if (variant === 'outlined') {
594
+ InputMore.notched = shrinkFloatingLabel;
595
+ InputMore.labelWidth = shrinkFloatingLabel && this.labelNode && this.labelNode.offsetWidth || 0;
596
+ }
597
+ if (variant !== 'standard') {
598
+ InputMore.startAdornment = chipComponents;
599
+ } else {
600
+ InputProps.disableUnderline = true;
601
+ }
602
+ var InputComponent = variantComponent[variant];
603
+ return /*#__PURE__*/_react["default"].createElement(_material.FormControl, (0, _extends2["default"])({
604
+ ref: rootRef,
605
+ fullWidth: fullWidth,
606
+ className: _Utils["default"].clsx(className, classes.root, other.margin === 'dense' && classes.marginDense),
607
+ error: error,
608
+ required: chips.length > 0 ? undefined : required,
609
+ onClick: this.focus,
610
+ disabled: disabled,
611
+ variant: variant
612
+ }, other), label && /*#__PURE__*/_react["default"].createElement(_material.InputLabel, (0, _extends2["default"])({
613
+ htmlFor: id,
614
+ classes: {
615
+ root: _Utils["default"].clsx(classes[variant], classes.label),
616
+ shrink: classes.labelShrink
617
+ },
618
+ shrink: shrinkFloatingLabel,
619
+ focused: this.state.isFocused,
620
+ variant: variant,
621
+ ref: this.labelRef,
622
+ required: required
623
+ }, InputLabelProps), label), /*#__PURE__*/_react["default"].createElement("div", {
624
+ className: _Utils["default"].clsx(classes[variant], classes.chipContainer, this.state.isFocused && classes.focused, !disableUnderline && variant === 'standard' && classes.underline, disabled && classes.disabled, label && classes.labeled, error && classes.error)
625
+ }, variant === 'standard' && chipComponents, /*#__PURE__*/_react["default"].createElement(InputComponent, (0, _extends2["default"])({
626
+ ref: this.input,
627
+ classes: {
628
+ input: _Utils["default"].clsx(classes.input, classes[variant]),
629
+ root: _Utils["default"].clsx(classes.inputRoot, classes[variant])
630
+ },
631
+ id: id,
632
+ value: actualInputValue,
633
+ onChange: this.handleUpdateInput,
634
+ onKeyDown: this.handleKeyDown,
635
+ onKeyPress: this.handleKeyPress,
636
+ onKeyUp: this.handleKeyUp,
637
+ onFocus: this.handleInputFocus,
638
+ onBlur: this.handleInputBlur,
639
+ inputRef: this.setActualInputRef,
640
+ disabled: disabled,
641
+ fullWidth: fullWidthInput,
642
+ placeholder: !hasInput && (shrinkFloatingLabel || label === null || label === undefined) || alwaysShowPlaceholder ? placeholder : null,
643
+ readOnly: readOnly
644
+ }, InputProps, InputMore))), helperText && /*#__PURE__*/_react["default"].createElement(_material.FormHelperText, (0, _extends2["default"])({}, FormHelperTextProps, {
645
+ className: FormHelperTextProps ? _Utils["default"].clsx(FormHelperTextProps.className, classes.helperText) : classes.helperText
646
+ }), helperText));
647
+ }
648
+ }], [{
649
+ key: "getDerivedStateFromProps",
650
+ value: function getDerivedStateFromProps(props, state) {
651
+ var newState = null;
652
+ if (props.value && props.value.length !== state.prevPropsValue.length) {
653
+ newState = {
654
+ prevPropsValue: props.value
655
+ };
656
+ if (props.clearInputValueOnChange) {
657
+ newState.inputValue = '';
658
+ }
659
+ }
660
+
661
+ // if change detection is only needed for clearInputValueOnChange
662
+ if (props.clearInputValueOnChange && props.value && props.value.length !== state.prevPropsValue.length) {
663
+ newState = {
664
+ prevPropsValue: props.value,
665
+ inputValue: ''
666
+ };
667
+ }
668
+ if (props.disabled) {
669
+ newState = _objectSpread(_objectSpread({}, newState), {}, {
670
+ focusedChip: null
671
+ });
672
+ }
673
+ if (!state.chipsUpdated && props.defaultValue) {
674
+ newState = _objectSpread(_objectSpread({}, newState), {}, {
675
+ chips: props.defaultValue
676
+ });
677
+ }
678
+ return newState;
679
+ }
680
+ }]);
681
+ return ChipInput;
682
+ }(_react["default"].Component);
683
+ ChipInput.propTypes = {
684
+ /** Allows duplicate chips if set to true. */
685
+ allowDuplicates: _propTypes["default"].bool,
686
+ /** If true, the placeholder will always be visible. */
687
+ alwaysShowPlaceholder: _propTypes["default"].bool,
688
+ /** Behavior when the chip input is blurred: `'clear'` clears the input, `'add'` creates a chip and `'ignore'` keeps the input. */
689
+ blurBehavior: _propTypes["default"].oneOf(['clear', 'add', 'add-or-clear', 'ignore']),
690
+ /** A function of the type `({ value, text, chip, isFocused, isDisabled, isReadOnly, handleClick, handleDelete, className }, key) => node` that returns a chip based on the given properties. This can be used to customize chip styles. Each item in the `dataSource` array will be passed to `chipRenderer` as arguments `chip`, `value` and `text`. If `dataSource` is an array of objects and `dataSourceConfig` is present, then `value` and `text` will instead correspond to the object values defined in `dataSourceConfig`. If `dataSourceConfig` is not set and `dataSource` is an array of objects, then a custom `chipRenderer` must be set. `chip` is always the raw value from `dataSource`, either an object or a string. */
691
+ chipRenderer: _propTypes["default"].func,
692
+ /** Whether the input value should be cleared if the `value` prop is changed. */
693
+ clearInputValueOnChange: _propTypes["default"].bool,
694
+ /** Data source for auto complete. This should be an array of strings or objects. */
695
+ dataSource: _propTypes["default"].array,
696
+ /** Config for objects list dataSource, e.g. `{ text: 'text', value: 'value' }`. If not specified, the `dataSource` must be a flat array of strings or a custom `chipRenderer` must be set to handle the objects. */
697
+ dataSourceConfig: _propTypes["default"].shape({
698
+ text: _propTypes["default"].string.isRequired,
699
+ value: _propTypes["default"].string.isRequired
700
+ }),
701
+ /** The chips to display by default (for uncontrolled mode). */
702
+ defaultValue: _propTypes["default"].array,
703
+ /** Whether to use `setTimeout` to delay adding chips in case other input events like `onSelection` need to fire first */
704
+ delayBeforeAdd: _propTypes["default"].bool,
705
+ /** Disables the chip input if set to true. */
706
+ disabled: _propTypes["default"].bool,
707
+ /** Disable the input underline. Only valid for 'standard' variant */
708
+ disableUnderline: _propTypes["default"].bool,
709
+ /** Props to pass through to the `FormHelperText` component. */
710
+ FormHelperTextProps: _propTypes["default"].object,
711
+ /** If true, the chip input will fill the available width. */
712
+ fullWidth: _propTypes["default"].bool,
713
+ /** If true, the input field will always be below the chips and fill the available space. By default, it will try to be beside the chips. */
714
+ fullWidthInput: _propTypes["default"].bool,
715
+ /** Helper text that is displayed below the input. */
716
+ helperText: _propTypes["default"].node,
717
+ /** Props to pass through to the `InputLabel`. */
718
+ InputLabelProps: _propTypes["default"].object,
719
+ /** Props to pass through to the `Input`. */
720
+ InputProps: _propTypes["default"].object,
721
+ /** Use this property to pass a ref callback to the native input component. */
722
+ inputRef: _propTypes["default"].func,
723
+ /** The input value (enables controlled mode for the text input if set). */
724
+ inputValue: _propTypes["default"].string,
725
+ /* The content of the floating label. */
726
+ label: _propTypes["default"].node,
727
+ /** The key codes (`KeyboardEvent.keyCode`) used to determine when to create a new chip. */
728
+ newChipKeyCodes: _propTypes["default"].arrayOf(_propTypes["default"].number),
729
+ /** The keys (`KeyboardEvent.key`) used to determine when to create a new chip. */
730
+ newChipKeys: _propTypes["default"].arrayOf(_propTypes["default"].string),
731
+ /** Callback function that is called when a new chip was added (in controlled mode). */
732
+ onAdd: _propTypes["default"].func,
733
+ /** Callback function that is called with the chip to be added and should return true to add the chip or false to prevent the chip from being added without clearing the text input. */
734
+ onBeforeAdd: _propTypes["default"].func,
735
+ /** Callback function that is called when the chips change (in uncontrolled mode). */
736
+ onChange: _propTypes["default"].func,
737
+ /** Callback function that is called when a new chip was removed (in controlled mode). */
738
+ onDelete: _propTypes["default"].func,
739
+ /** Callback function that is called when the input changes. */
740
+ onUpdateInput: _propTypes["default"].func,
741
+ /** A placeholder that is displayed if the input has no values. */
742
+ placeholder: _propTypes["default"].string,
743
+ /** Makes the chip input read-only if set to true. */
744
+ readOnly: _propTypes["default"].bool,
745
+ /** The chips to display (enables controlled mode if set). */
746
+ value: _propTypes["default"].array,
747
+ /** The variant of the Input component */
748
+ variant: _propTypes["default"].oneOf(['outlined', 'standard', 'filled'])
749
+ };
750
+ ChipInput.defaultProps = {
751
+ allowDuplicates: false,
752
+ blurBehavior: 'clear',
753
+ clearInputValueOnChange: false,
754
+ delayBeforeAdd: false,
755
+ disableUnderline: false,
756
+ newChipKeyCodes: [13],
757
+ newChipKeys: ['Enter'],
758
+ variant: 'standard'
759
+ };
760
+ var _default = exports["default"] = (0, _styles.withStyles)(styles, {
761
+ name: 'WAMuiChipInput'
762
+ })(ChipInput);
763
+ //# sourceMappingURL=ChipInput.js.map