@eohjsc/react-native-smart-city 0.3.36 → 0.3.37

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 (301) hide show
  1. package/package.json +1 -1
  2. package/src/commons/Action/__test__/ItemQuickAction.test.js +36 -32
  3. package/src/commons/ActionGroup/ColorPickerTemplate.js +61 -23
  4. package/src/commons/ActionGroup/OnOffSmartLock/AutoLock/__test__/index.test.js +2 -2
  5. package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/__test__/ItemPasscode.test.js +1 -1
  6. package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/__test__/index.test.js +1 -1
  7. package/src/commons/ActionGroup/OnOffSmartLock/SetupGeneratePasscode/__test__/index.test.js +2 -2
  8. package/src/commons/ActionGroup/SliderRangeTemplate.js +35 -20
  9. package/src/commons/ActionGroup/SmartTiviActionTemplate/__test__/CircleButton.test.js +12 -12
  10. package/src/commons/ActionGroup/SmartTiviActionTemplate/__test__/ControlPlay.test.js +10 -10
  11. package/src/commons/ActionGroup/SmartTiviActionTemplate/__test__/RectangleButton.test.js +7 -7
  12. package/src/commons/ActionGroup/SmartTiviActionTemplate/__test__/SmartTiviActionTemplate.test.js +23 -23
  13. package/src/commons/ActionGroup/StatesGridActionTemplate.js +1 -3
  14. package/src/commons/ActionGroup/__test__/ColorPickerTemplate.test.js +1 -1
  15. package/src/commons/ActionGroup/__test__/CurtainButtonTemplate.test.js +4 -4
  16. package/src/commons/ActionGroup/__test__/NumberUpDownTemplate.test.js +14 -14
  17. package/src/commons/ActionGroup/__test__/OnOffButtonTemplate.test.js +12 -12
  18. package/src/commons/ActionGroup/__test__/OnOffSmartLock.test.js +2 -2
  19. package/src/commons/ActionGroup/__test__/OnOffTemplate.test.js +10 -10
  20. package/src/commons/ActionGroup/__test__/OneBigButtonTemplate.test.js +2 -2
  21. package/src/commons/ActionGroup/__test__/OptionsDropdownTemplate.test.js +7 -7
  22. package/src/commons/ActionGroup/__test__/SliderRangeTemplate.test.js +1 -1
  23. package/src/commons/ActionGroup/__test__/StatesGridActionTemplate.test.js +2 -2
  24. package/src/commons/ActionGroup/__test__/ThreeButtonTemplate.test.js +2 -2
  25. package/src/commons/ActionGroup/__test__/TimerActionTemplate.test.js +3 -3
  26. package/src/commons/ActionGroup/__test__/TimerActionTemplateWithutConfigValue.test.js +2 -2
  27. package/src/commons/ActionGroup/__test__/TwoButtonTemplate.test.js +14 -14
  28. package/src/commons/ActionGroup/__test__/index.test.js +41 -41
  29. package/src/commons/ActionTemplate/OnOffButtonAction.js +6 -4
  30. package/src/commons/ActionTemplate/OnOffSimpleAction.js +9 -3
  31. package/src/commons/ActionTemplate/OnOffSmartLockAction.js +12 -10
  32. package/src/commons/ActionTemplate/__test__/OnOffButtonAction.test.js +3 -3
  33. package/src/commons/ActionTemplate/__test__/OnOffSimpleAction.test.js +3 -3
  34. package/src/commons/ActionTemplate/__test__/OneButtonAction.test.js +3 -3
  35. package/src/commons/ActionTemplate/__test__/ThreeButtonAction.test.js +3 -3
  36. package/src/commons/ActionTemplate/__test__/index.test.js +6 -6
  37. package/src/commons/ActionTemplate/index.js +15 -3
  38. package/src/commons/Alert/__test__/Alert.test.js +2 -2
  39. package/src/commons/AlertAction/__test__/AlertAction.test.js +2 -2
  40. package/src/commons/Auth/__test__/AccountItem.test.js +4 -4
  41. package/src/commons/Auth/__test__/AccountList.test.js +4 -4
  42. package/src/commons/Auth/__test__/OtpInputList.test.js +20 -16
  43. package/src/commons/Auth/__test__/SocialButton.test.js +6 -6
  44. package/src/commons/Automate/__test__/ItemAutomate.test.js +2 -2
  45. package/src/commons/Automate/__test__/ItemScriptAction.test.js +2 -2
  46. package/src/commons/BackDefault/__test__/BackDefault.test.js +2 -2
  47. package/src/commons/Button/__test__/Button.test.js +3 -3
  48. package/src/commons/ButtonPopup/__test__/ButtonPopup.test.js +2 -2
  49. package/src/commons/Calendar/__test__/Calendar.test.js +2 -2
  50. package/src/commons/ChartLoading/__test__/ChartLoading.test.js +2 -2
  51. package/src/commons/CircleButton/__test__/CircleButton.test.js +2 -2
  52. package/src/commons/CircleView/__test__/CircleView.test.js +2 -2
  53. package/src/commons/Dashboard/MyPinnedSharedUnit/__test__/MyPinnedSharedUnit.test.js +3 -3
  54. package/src/commons/Dashboard/MyUnit/__test__/MyUnit.test.js +2 -2
  55. package/src/commons/DateTimeRangeChange/__test__/DateTimeButton.test.js +4 -4
  56. package/src/commons/Device/Emergency/__test__/EmergencyButton.test.js +5 -5
  57. package/src/commons/Device/Emergency/__test__/EmergencyDetail.test.js +2 -2
  58. package/src/commons/Device/Hanet/ItemHanetDevice.test.js +5 -5
  59. package/src/commons/Device/LinearChart/LinearChart.test.js +2 -2
  60. package/src/commons/Device/RainningSensor/__test__/CurrentRainSensor.test.js +6 -6
  61. package/src/commons/Device/SonosSpeaker/__test__/SonosSpeaker.test.js +8 -8
  62. package/src/commons/Device/WindDirection/Compass/Compass.test.js +4 -4
  63. package/src/commons/Device/WindSpeed/LinearChart/__test__/LinearChart.test.js +2 -2
  64. package/src/commons/Device/WindSpeed/LinearChart/__test__/ValueBalloon.test.js +2 -2
  65. package/src/commons/Device/WindSpeed/__test__/Anemometer.test.js +4 -4
  66. package/src/commons/Device/WindSpeed/__test__/ChartInfo.test.js +5 -5
  67. package/src/commons/Device/__test__/ConnectedViewHeader.test.js +6 -6
  68. package/src/commons/Device/__test__/DeviceAlertStatus.test.js +6 -6
  69. package/src/commons/Device/__test__/DisconnectedView.test.js +12 -12
  70. package/src/commons/Device/__test__/FlatListItems.test.js +2 -2
  71. package/src/commons/Device/__test__/FooterInfo.test.js +2 -2
  72. package/src/commons/Device/__test__/SensorConnectedStatus.test.js +2 -2
  73. package/src/commons/DisplayChecking/__test__/DisplayChecking.test.js +2 -2
  74. package/src/commons/Explore/SearchBox/__test__/SearchBox.test.js +6 -6
  75. package/src/commons/Explore/__test__/CityItem.test.js +6 -6
  76. package/src/commons/Explore/__test__/HeaderExplore.test.js +2 -2
  77. package/src/commons/Explore/__test__/HeaderLabel.test.js +3 -3
  78. package/src/commons/Explore/__test__/LocationItem.test.js +3 -3
  79. package/src/commons/FieldTemplate/ChooseUserField/__test__/index.test.js +4 -4
  80. package/src/commons/FieldTemplate/PasscodeField/__test__/index.test.js +2 -2
  81. package/src/commons/FieldTemplate/ScheduleField/__test__/index.test.js +1 -1
  82. package/src/commons/Form/__test__/CurrencyInput.test.js +12 -12
  83. package/src/commons/Form/__test__/TextInput.test.js +4 -4
  84. package/src/commons/Form/__test__/TextInputPassword.test.js +5 -5
  85. package/src/commons/FourButtonFilterHistory/__test__/FourButtonFilterHistory.test.js +1 -1
  86. package/src/commons/GroupCheckBox/__test__/GroupCheckBox.test.js +12 -10
  87. package/src/commons/Header/__test__/HeaderCT.test.js +11 -11
  88. package/src/commons/ImageButton/__test__/ImageButton.test.js +2 -2
  89. package/src/commons/ImagePicker/__test__/ImagePicker.test.js +8 -8
  90. package/src/commons/MediaPlayerDetail/__test__/MediaPlayerDetail.test.js +1 -1
  91. package/src/commons/MediaPlayerDetail/__test__/MediaPlayerFull.test.js +8 -8
  92. package/src/commons/MenuActionAddnew/__test__/MenuActionAddNew.test.js +3 -3
  93. package/src/commons/MenuActionList/__test__/MenuActionList.test.js +3 -3
  94. package/src/commons/MenuActionMore/__test__/MenuActionMore.test.js +2 -2
  95. package/src/commons/Modal/__test__/ModalBottom.test.js +4 -4
  96. package/src/commons/OneTapTemplate/NumberUpDownActionTemplate.js +39 -13
  97. package/src/commons/OneTapTemplate/OptionsDropdownActionTemplate.js +33 -14
  98. package/src/commons/OneTapTemplate/StatesGridActionTemplate.js +9 -4
  99. package/src/commons/OneTapTemplate/__test__/NumberUpDownActionTemplate.test.js +25 -12
  100. package/src/commons/OneTapTemplate/__test__/OptionsDropdownActionTemplate.test.js +13 -13
  101. package/src/commons/OneTapTemplate/__test__/StatesGridActionTemplate.test.js +7 -7
  102. package/src/commons/PreventAccess/__test__/PreventAccess.test.js +7 -5
  103. package/src/commons/Processing/__test__/Connecting.test.js +61 -25
  104. package/src/commons/Processing/index.js +21 -7
  105. package/src/commons/RowItem/__test__/RowItem.test.js +2 -2
  106. package/src/commons/RowUser/__test__/RowUser.test.js +2 -2
  107. package/src/commons/SearchLocation/__test__/RowLocation.test.js +4 -4
  108. package/src/commons/Section/Section.test.js +4 -4
  109. package/src/commons/SelectSubUnit/__test__/SelectSubUnit.test.js +3 -3
  110. package/src/commons/SelectSubUnit/index.js +1 -1
  111. package/src/commons/SelectUnit/__test__/SelectUnit.test.js +3 -3
  112. package/src/commons/SelectUnit/index.js +3 -4
  113. package/src/commons/Sharing/__test__/BtnRemoveMember.test.js +3 -3
  114. package/src/commons/Sharing/__test__/ButtonRemoveMember.test.js +2 -2
  115. package/src/commons/Sharing/__test__/DevicePermissionsCheckbox.test.js +3 -3
  116. package/src/commons/Sharing/__test__/MemberList.test.js +8 -8
  117. package/src/commons/Sharing/__test__/RowMember.test.js +4 -4
  118. package/src/commons/Sharing/__test__/StationDevicePermission.test.js +7 -7
  119. package/src/commons/Sharing/__test__/WrapHeaderScrollable.test.js +6 -6
  120. package/src/commons/SubUnit/OneTap/__test__/SubUnitAutomate.test.js +6 -6
  121. package/src/commons/SubUnit/__test__/Favorites.test.js +3 -3
  122. package/src/commons/SubUnit/__test__/Item.test.js +4 -4
  123. package/src/commons/SubUnit/__test__/ShortDetail.test.js +16 -16
  124. package/src/commons/SummaryItem/__test__/SummaryItem.test.js +7 -7
  125. package/src/commons/Tabbar/__test__/index.test.js +1 -1
  126. package/src/commons/TextButton/__test__/TextButton.test.js +6 -6
  127. package/src/commons/Today/__test__/Today.test.js +2 -2
  128. package/src/commons/TouchableScale/__test__/TouchableScale.test.js +5 -5
  129. package/src/commons/Unit/__test__/HeaderUnit.test.js +3 -3
  130. package/src/commons/Unit/__test__/SharedUnit.test.js +13 -13
  131. package/src/commons/UnitSummary/AirQuality/__test__/index.test.js +25 -25
  132. package/src/commons/UnitSummary/ConfigHistoryChart/__test__/ConfigHistoryChart.test.js +258 -25
  133. package/src/commons/UnitSummary/ConfigHistoryChart/index.js +90 -1
  134. package/src/commons/UnitSummary/__test__/TotalPowerBox.test.js +2 -2
  135. package/src/commons/UnitSummary/__test__/TotalPowerConsumption.test.js +2 -2
  136. package/src/commons/ViewButtonBottom/__test__/ViewButtonBottom.test.js +3 -3
  137. package/src/commons/WheelDateTimePicker/__test__/index.test.js +2 -2
  138. package/src/commons/WrapParallaxScrollView/index.js +2 -1
  139. package/src/configs/API.js +6 -2
  140. package/src/configs/AccessibilityLabel.js +5 -0
  141. package/src/hooks/Common/__test__/useAndroidTranslucentStatusBar.test.js +2 -2
  142. package/src/hooks/Common/__test__/useStatusbar.test.js +4 -4
  143. package/src/hooks/Common/__test__/useTranslations.test.js +1 -1
  144. package/src/hooks/IoT/__test__/useRemoteControl.test.js +7 -7
  145. package/src/hooks/IoT/useRemoteControl.js +0 -1
  146. package/src/iot/RemoteControl/__test__/Bluetooth.test.js +17 -17
  147. package/src/iot/RemoteControl/__test__/Internet.test.js +4 -4
  148. package/src/screens/AQIGuide/__test__/AQIGuide.test.js +3 -3
  149. package/src/screens/ActivityLog/__test__/FilterPopup.test.js +2 -2
  150. package/src/screens/ActivityLog/__test__/ItemLog.test.js +21 -21
  151. package/src/screens/ActivityLog/hooks/__test__/index.test.js +1 -1
  152. package/src/screens/AddCommon/SelectUnit.js +1 -1
  153. package/src/screens/AddCommon/__test__/SelectSubUnit.test.js +4 -4
  154. package/src/screens/AddCommon/__test__/SelectUnit.test.js +11 -6
  155. package/src/screens/AddLocationMaps/__test__/index.test.js +6 -6
  156. package/src/screens/AddNewAction/Device/__test__/index.test.js +3 -3
  157. package/src/screens/AddNewAction/SelectAction.js +6 -1
  158. package/src/screens/AddNewAction/__test__/SelectAction.test.js +128 -20
  159. package/src/screens/AddNewAction/__test__/SelectSensorDevices.test.js +10 -10
  160. package/src/screens/AddNewAction/__test__/SetupSensor.test.js +8 -8
  161. package/src/screens/AddNewAutoSmart/__test__/AddNewAutoSmart.test.js +2 -2
  162. package/src/screens/AddNewDevice/__test__/AddNewDevice.test.js +8 -8
  163. package/src/screens/AddNewDevice/__test__/ConnectingDevices.test.js +8 -8
  164. package/src/screens/AddNewGateway/ConnectingDevice.js +29 -7
  165. package/src/screens/AddNewGateway/ConnectingWifiGuide.js +2 -2
  166. package/src/screens/AddNewGateway/ConnectingZigbeeDevice.js +3 -2
  167. package/src/screens/AddNewGateway/PlugAndPlay/__test__/FirstWarning.test.js +5 -5
  168. package/src/screens/AddNewGateway/__test__/AddNewGateway.test.js +6 -6
  169. package/src/screens/AddNewGateway/__test__/ConnectingModbusDevice.test.js +1 -1
  170. package/src/screens/AddNewGateway/__test__/ConnectingWifiDevice.test.js +1 -1
  171. package/src/screens/AddNewGateway/__test__/ConnectingWifiGuide.test.js +9 -9
  172. package/src/screens/AddNewGateway/__test__/ConnectingZigbeeDevice.test.js +1 -1
  173. package/src/screens/AddNewGateway/__test__/RenameNewDevices.test.js +4 -4
  174. package/src/screens/AddNewGateway/__test__/ScanGatewayQR.test.js +4 -4
  175. package/src/screens/AddNewGateway/__test__/ScanModbusQR.test.js +4 -4
  176. package/src/screens/AddNewGateway/__test__/ScanWifiDeviceQR.test.js +4 -4
  177. package/src/screens/AddNewGateway/__test__/SelectDeviceSubUnit.test.js +2 -2
  178. package/src/screens/AddNewGateway/__test__/SelectDeviceType.test.js +6 -6
  179. package/src/screens/AddNewGateway/__test__/SelectDeviceUnit.test.js +1 -1
  180. package/src/screens/AddNewGateway/__test__/SelectModbusGateway.test.js +2 -2
  181. package/src/screens/AddNewGateway/__test__/SelectZigbeeGateway.test.js +2 -2
  182. package/src/screens/AddNewGateway/__test__/ShareWifiPassword.test.js +6 -6
  183. package/src/screens/AddNewOneTap/__test__/AddNewOneTap.test.js +4 -4
  184. package/src/screens/AllCamera/__test__/index.test.js +2 -2
  185. package/src/screens/Automate/__test__/Loading.test.js +2 -2
  186. package/src/screens/Automate/__test__/MultiUnits.test.js +10 -10
  187. package/src/screens/Automate/__test__/index.test.js +3 -3
  188. package/src/screens/ConfirmUnitDeletion/__test__/ConfirmUnitDeletion.test.js +2 -2
  189. package/src/screens/Device/EditDevice/__test__/EditDevice.test.js +4 -4
  190. package/src/screens/Device/__test__/DetailHistoryChart.test.js +2 -2
  191. package/src/screens/Device/__test__/detail.test.js +14 -14
  192. package/src/screens/Device/detail.js +10 -3
  193. package/src/screens/Device/utils/index.test.js +4 -4
  194. package/src/screens/Drawer/Drawer.test.js +1 -1
  195. package/src/screens/EditActionsList/__tests__/index.test.js +5 -5
  196. package/src/screens/EmergencyContacts/__test__/EmergencyContactAddNew.test.js +15 -15
  197. package/src/screens/EmergencyContacts/__test__/EmergencyContactList.test.js +19 -19
  198. package/src/screens/EmergencyContacts/__test__/EmergencyContactsSelectContacts.test.js +12 -12
  199. package/src/screens/EmergencySetting/__test__/DropDownItem.test.js +7 -7
  200. package/src/screens/EmergencySetting/__test__/index.test.js +3 -3
  201. package/src/screens/EnterPassword/__test__/EnterPassword.test.js +12 -12
  202. package/src/screens/Explore/__test__/Explore.test.js +3 -3
  203. package/src/screens/GuestInfo/__test__/index.test.js +3 -3
  204. package/src/screens/HanetCamera/__test__/CaptureFaceID.test.js +2 -2
  205. package/src/screens/HanetCamera/__test__/Detail.test.js +2 -2
  206. package/src/screens/HanetCamera/__test__/ManageAccess.test.js +5 -5
  207. package/src/screens/HanetCamera/__test__/MemberInfo.test.js +5 -5
  208. package/src/screens/HanetCamera/hooks/__test__/useHanetCheckinData.test.js +6 -6
  209. package/src/screens/HanetCamera/hooks/__test__/useHanetPlaceMembers.test.js +3 -3
  210. package/src/screens/ManageAccess/hooks/__test__/useManageAccess.test.js +11 -7
  211. package/src/screens/MoveToAnotherSubUnit/__test__/index.test.js +1 -1
  212. package/src/screens/Notification/__test__/Notification.test.js +5 -5
  213. package/src/screens/Notification/__test__/NotificationItem.test.js +41 -41
  214. package/src/screens/PlayBackCamera/__test__/Timer.test.js +3 -3
  215. package/src/screens/ScanChipQR/components/QRScan/__test__/QRScan.test.js +7 -7
  216. package/src/screens/ScriptDetail/__test__/index.test.js +31 -31
  217. package/src/screens/SetSchedule/__test__/SelectWeekday.test.js +1 -1
  218. package/src/screens/SetSchedule/__test__/index.test.js +4 -4
  219. package/src/screens/SharedUnit/__test__/ShareUnit.test.js +2 -2
  220. package/src/screens/SharedUnit/__test__/TabHeader.test.js +3 -3
  221. package/src/screens/Sharing/Components/__test__/DeviceItem.test.js +4 -4
  222. package/src/screens/Sharing/Components/__test__/ItemChangeRole.test.js +4 -4
  223. package/src/screens/Sharing/Components/__test__/TitleCheckBox.test.js +4 -4
  224. package/src/screens/Sharing/__test__/MemberList.test.js +1 -1
  225. package/src/screens/Sharing/__test__/MemberList2.test.js +1 -1
  226. package/src/screens/Sharing/__test__/SelectPermission.test.js +41 -41
  227. package/src/screens/Sharing/__test__/SelectUser.test.js +14 -14
  228. package/src/screens/SideMenuDetail/__test__/index.test.js +25 -4
  229. package/src/screens/SideMenuDetail/index.js +32 -19
  230. package/src/screens/SmartAccount/ListDevice/__test__/DeviceItem.test.js +3 -3
  231. package/src/screens/SmartAccount/ListDevice/__test__/ListDevice.test.js +13 -21
  232. package/src/screens/SmartAccount/ListDevice/index.js +1 -0
  233. package/src/screens/SmartAccount/SuccessfullyConnected/__test__/DeviceItem.test.js +6 -6
  234. package/src/screens/SmartAccount/SuccessfullyConnected/__test__/SuccessfullyConnected.test.js +6 -5
  235. package/src/screens/SmartAccount/SuccessfullyConnected/index.js +1 -0
  236. package/src/screens/SmartAccount/__test__/Connecting.test.js +4 -4
  237. package/src/screens/SmartAccount/__test__/SmartAccount.test.js +17 -17
  238. package/src/screens/SmartIr/__test__/ButtonsBottom.test.js +2 -2
  239. package/src/screens/SmartIr/__test__/GroupButtonByType.test.js +12 -12
  240. package/src/screens/SmartIr/__test__/SelectBrand.test.js +5 -5
  241. package/src/screens/SmartIr/__test__/SelectDeviceType.test.js +5 -5
  242. package/src/screens/SmartIr/__test__/SmartIr.test.js +5 -5
  243. package/src/screens/SubUnit/__test__/AddSubUnit.test.js +12 -12
  244. package/src/screens/SubUnit/__test__/Detail.test.js +6 -6
  245. package/src/screens/SubUnit/__test__/EditSubUnit.test.js +44 -44
  246. package/src/screens/SubUnit/__test__/ManageSubUnit.test.js +6 -6
  247. package/src/screens/SubUnit/hooks/__test__/useManageSubUnit.test.js +5 -5
  248. package/src/screens/SyncLGDevice/__test__/AddLGDevice.test.js +10 -10
  249. package/src/screens/TDSGuide/__test__/TDSGuide.test.js +3 -3
  250. package/src/screens/UVIndexGuide/__test__/UVIndexGuide.test.js +3 -3
  251. package/src/screens/Unit/ManageUnit.js +4 -45
  252. package/src/screens/Unit/ManageUnitStyles.js +5 -35
  253. package/src/screens/Unit/Station/__test__/index.test.js +1 -1
  254. package/src/screens/Unit/Summaries.js +11 -20
  255. package/src/screens/Unit/__test__/AddMenu.test.js +8 -8
  256. package/src/screens/Unit/__test__/CheckSendEmail.test.js +3 -3
  257. package/src/screens/Unit/__test__/ChooseLocation.test.js +2 -2
  258. package/src/screens/Unit/__test__/Detail.test.js +17 -17
  259. package/src/screens/Unit/__test__/ManageUnit.test.js +17 -17
  260. package/src/screens/Unit/__test__/MyAllUnit.test.js +5 -5
  261. package/src/screens/Unit/__test__/SelectAddToFavorites.test.js +4 -4
  262. package/src/screens/Unit/__test__/SelectAddress.test.js +10 -10
  263. package/src/screens/Unit/__test__/SmartAccount.test.js +4 -4
  264. package/src/screens/Unit/__test__/SmartAccountItem.test.js +1 -1
  265. package/src/screens/Unit/__test__/Summaries.test.js +2 -2
  266. package/src/screens/Unit/components/ButtonWrapper/index.js +60 -0
  267. package/src/screens/Unit/components/ButtonWrapper/styles.js +37 -0
  268. package/src/screens/Unit/components/MyAllUnit/__test__/Header.test.js +19 -19
  269. package/src/screens/Unit/components/MyAllUnit/__test__/MyAllUnit.test.js +3 -3
  270. package/src/screens/Unit/components/MyAllUnit/__test__/index.test.js +4 -4
  271. package/src/screens/Unit/components/__test__/Header.test.js +12 -12
  272. package/src/screens/Unit/components/__test__/MyUnitDevice.test.js +2 -2
  273. package/src/screens/Unit/components/__test__/SharedUnit.test.js +6 -6
  274. package/src/screens/UnitSummary/__test__/index.test.js +24 -24
  275. package/src/screens/UnitSummary/components/3PPowerConsumption/__test__/3PPowerConsumption.test.js +3 -3
  276. package/src/screens/UnitSummary/components/PowerConsumption/__test__/ItemPower.test.js +3 -3
  277. package/src/screens/UnitSummary/components/PowerConsumption/__test__/PowerConsumption.test.js +5 -5
  278. package/src/screens/UnitSummary/components/RunningDevices/__test__/index.test.js +3 -3
  279. package/src/screens/UnitSummary/components/Temperature/__test__/ChartAverage.test.js +3 -3
  280. package/src/screens/UnitSummary/components/Temperature/__test__/ItemAverage.test.js +3 -3
  281. package/src/screens/UnitSummary/components/UvIndex/__test__/index.test.js +18 -18
  282. package/src/screens/UnitSummary/components/WaterQuality/__test__/index.test.js +12 -12
  283. package/src/screens/UnitSummary/components/__test__/TotalPowerBox.test.js +2 -2
  284. package/src/screens/UnitSummary/components/__test__/TotalPowerConsumption.test.js +2 -2
  285. package/src/screens/UnitSummary/components/__test__/UnitSummary.test.js +8 -8
  286. package/src/screens/UnitSummary/components/__test__/index.test.js +5 -5
  287. package/src/screens/WaterQualityGuide/__test__/index.test.js +12 -12
  288. package/src/utils/Apis/axios.js +22 -0
  289. package/src/utils/Converter/__test__/array.test.js +1 -1
  290. package/src/utils/Converter/__test__/url.test.js +1 -1
  291. package/src/utils/Functions/__test__/Search.test.js +1 -1
  292. package/src/utils/Functions/__test__/ShortEmail.test.js +1 -1
  293. package/src/utils/I18n/translations/en.json +3 -1
  294. package/src/utils/I18n/translations/vi.json +3 -1
  295. package/src/utils/__test__/InitData.test.js +2 -2
  296. package/src/utils/__test__/Utils.test.js +2 -2
  297. package/src/commons/UnitSummary/ConfigHistoryChart.js +0 -105
  298. package/src/screens/AddNewDevice/hooks/ConnectDevices.js +0 -67
  299. package/src/screens/AddNewDevice/hooks/useStateAlertRename.js +0 -32
  300. package/src/screens/UnitSummary/components/PowerConsumeHistoryChart/__test__/index.test.js +0 -63
  301. package/src/screens/UnitSummary/components/PowerConsumeHistoryChart/index.js +0 -53
@@ -77,9 +77,9 @@ describe('test ShortDetail Subunit', () => {
77
77
  };
78
78
  });
79
79
 
80
- test('render ShortDetail', () => {
81
- act(() => {
82
- tree = create(wrapComponent(props));
80
+ it('render ShortDetail', async () => {
81
+ await act(async () => {
82
+ tree = await create(wrapComponent(props));
83
83
  });
84
84
  const instance = tree.root;
85
85
  const image = instance.findAllByType(Image);
@@ -90,10 +90,10 @@ describe('test ShortDetail Subunit', () => {
90
90
  expect(imageBackground).not.toBeDefined();
91
91
  });
92
92
 
93
- test('render ShortDetail without background', () => {
93
+ it('render ShortDetail without background', async () => {
94
94
  props.station.background = '';
95
- act(() => {
96
- tree = create(wrapComponent(props));
95
+ await act(async () => {
96
+ tree = await create(wrapComponent(props));
97
97
  });
98
98
  const instance = tree.root;
99
99
  const image = instance.findAllByType(Image);
@@ -104,7 +104,7 @@ describe('test ShortDetail Subunit', () => {
104
104
  expect(imageBackground).not.toBeDefined();
105
105
  });
106
106
 
107
- test('render ShortDetail with camera', () => {
107
+ it('render ShortDetail with camera', async () => {
108
108
  props.station.camera = {
109
109
  id: 2,
110
110
  name: 'EoH Gate',
@@ -112,8 +112,8 @@ describe('test ShortDetail Subunit', () => {
112
112
  uri: '',
113
113
  };
114
114
 
115
- act(() => {
116
- tree = create(wrapComponent(props));
115
+ await act(async () => {
116
+ tree = await create(wrapComponent(props));
117
117
  });
118
118
  const instance = tree.root;
119
119
  const view = instance.findAllByType(View);
@@ -125,7 +125,7 @@ describe('test ShortDetail Subunit', () => {
125
125
  expect(viewCamera).toBeDefined();
126
126
  });
127
127
 
128
- test('render ShortDetail with device', () => {
128
+ it('render ShortDetail with device', async () => {
129
129
  props.station.sensors = [
130
130
  {
131
131
  action: {
@@ -148,8 +148,8 @@ describe('test ShortDetail Subunit', () => {
148
148
  },
149
149
  ];
150
150
 
151
- act(() => {
152
- tree = create(wrapComponent(props));
151
+ await act(async () => {
152
+ tree = await create(wrapComponent(props));
153
153
  });
154
154
  const instance = tree.root;
155
155
  const itemDevice = instance.findAll(
@@ -160,13 +160,13 @@ describe('test ShortDetail Subunit', () => {
160
160
  expect(itemDevice.length).toBe(0);
161
161
  });
162
162
 
163
- test('render ShortDetail add new device', async () => {
164
- act(() => {
165
- tree = create(wrapComponent(props));
163
+ it('render ShortDetail add new device', async () => {
164
+ await act(async () => {
165
+ tree = await create(wrapComponent(props));
166
166
  });
167
167
  const instance = tree.root;
168
168
  const buttonAddNew = instance.findByType(ItemAddNew);
169
- act(() => {
169
+ await act(async () => {
170
170
  buttonAddNew.props.onAddNew();
171
171
  });
172
172
  await mock.request(keyPermission.CAMERA);
@@ -7,34 +7,34 @@ import Text from '../../Text';
7
7
 
8
8
  describe('test SummaryItem', () => {
9
9
  let tree;
10
- test('test render SummaryItem', () => {
10
+ it('test render SummaryItem', async () => {
11
11
  const mockFunc = jest.fn();
12
12
  const item = {
13
13
  template: 'air_quality',
14
14
  left_text: 'left text',
15
15
  left_value: 'left_value',
16
16
  };
17
- act(() => {
18
- tree = create(<SummaryItem item={item} goToSummary={mockFunc} />);
17
+ await act(async () => {
18
+ tree = await create(<SummaryItem item={item} goToSummary={mockFunc} />);
19
19
  });
20
20
  const instance = tree.root;
21
21
  const text = instance.findAllByType(Text);
22
22
  expect(text[0].props.children).toEqual('left text');
23
23
  });
24
24
 
25
- test('test goToSummary', () => {
25
+ it('test goToSummary', async () => {
26
26
  const mockFunc = jest.fn();
27
27
  const item = {
28
28
  template: 'air_quality',
29
29
  left_text: 'left text',
30
30
  left_value: 'left_value',
31
31
  };
32
- act(() => {
33
- tree = create(<SummaryItem item={item} goToSummary={mockFunc} />);
32
+ await act(async () => {
33
+ tree = await create(<SummaryItem item={item} goToSummary={mockFunc} />);
34
34
  });
35
35
  const instance = tree.root;
36
36
  const touchableOpacity = instance.findByType(TouchableOpacity);
37
- act(() => {
37
+ await act(async () => {
38
38
  touchableOpacity.props.onPress(item);
39
39
  });
40
40
  expect(mockFunc).toHaveBeenCalledWith(item);
@@ -86,7 +86,7 @@ describe('Test HanetCameraDetail', () => {
86
86
  };
87
87
  });
88
88
 
89
- test('Test render HanetCameraDetail', async () => {
89
+ it('Test render HanetCameraDetail', async () => {
90
90
  await act(async () => {
91
91
  tree = await create(wrapComponent(props));
92
92
  });
@@ -5,9 +5,9 @@ import { TouchableOpacity, ActivityIndicator } from 'react-native';
5
5
 
6
6
  describe('create TextButton component', () => {
7
7
  let tree;
8
- test('create button auth', () => {
8
+ it('create button auth', async () => {
9
9
  const mockFunc = jest.fn();
10
- act(() => {
10
+ await act(async () => {
11
11
  tree = renderer.create(
12
12
  <TextButton
13
13
  key={'item_1'}
@@ -19,15 +19,15 @@ describe('create TextButton component', () => {
19
19
  });
20
20
  const instance = tree.root;
21
21
  const button = instance.findByType(TouchableOpacity);
22
- act(() => {
22
+ await act(async () => {
23
23
  button.props.onPress();
24
24
  });
25
25
  expect(mockFunc).toHaveBeenCalled();
26
26
  });
27
27
 
28
- test('create button ActivityIndicator', () => {
28
+ it('create button ActivityIndicator', async () => {
29
29
  const mockFunc = jest.fn();
30
- act(() => {
30
+ await act(async () => {
31
31
  tree = renderer.create(
32
32
  <TextButton
33
33
  loading={true}
@@ -43,7 +43,7 @@ describe('create TextButton component', () => {
43
43
  const activity = instance.findAllByType(ActivityIndicator);
44
44
  expect(activity.length).toEqual(1);
45
45
  const button = instance.findByType(TouchableOpacity);
46
- act(() => {
46
+ await act(async () => {
47
47
  button.props.onPress();
48
48
  });
49
49
  expect(mockFunc).toHaveBeenCalled();
@@ -13,9 +13,9 @@ const wrapComponent = () => (
13
13
 
14
14
  describe('Test Today', () => {
15
15
  let tree;
16
- test('create Today', () => {
16
+ it('create Today', async () => {
17
17
  Date.now = jest.fn(() => new Date('2021-01-24T12:00:00.000Z'));
18
- act(() => {
18
+ await act(async () => {
19
19
  tree = renderer.create(wrapComponent());
20
20
  });
21
21
  const instance = tree.root;
@@ -6,8 +6,8 @@ import TouchableScale from '../index';
6
6
  describe('Test TouchableScale', () => {
7
7
  let tree;
8
8
  const mockFunc = jest.fn();
9
- test('create TouchableScale onPress', () => {
10
- act(() => {
9
+ it('create TouchableScale onPress', async () => {
10
+ await act(async () => {
11
11
  tree = renderer.create(<TouchableScale onPress={mockFunc} />);
12
12
  });
13
13
  const instance = tree.root;
@@ -15,13 +15,13 @@ describe('Test TouchableScale', () => {
15
15
  expect(textInputs.length).toBe(1);
16
16
 
17
17
  const button = instance.findByType(TouchableOpacity);
18
- act(() => {
18
+ await act(async () => {
19
19
  button.props.onPress();
20
20
  });
21
- act(() => {
21
+ await act(async () => {
22
22
  button.props.onPressIn();
23
23
  });
24
- act(() => {
24
+ await act(async () => {
25
25
  button.props.onPressOut();
26
26
  });
27
27
  expect(mockFunc).toHaveBeenCalled();
@@ -26,7 +26,7 @@ describe('Test HeaderUnit', () => {
26
26
  let tree;
27
27
  const mockedFunc = jest.fn();
28
28
  const mockedOnBack = jest.fn();
29
- test('HeaderUnit onPress', async () => {
29
+ it('HeaderUnit onPress', async () => {
30
30
  let title = 'title';
31
31
  let style = {
32
32
  height: '100%',
@@ -57,7 +57,7 @@ describe('Test HeaderUnit', () => {
57
57
  expect(mockedOnBack).toHaveBeenCalled();
58
58
  });
59
59
 
60
- test('HeaderUnit onPress goBack', async () => {
60
+ it('HeaderUnit onPress goBack', async () => {
61
61
  await act(async () => {
62
62
  tree = await create(
63
63
  <HeaderUnit
@@ -80,7 +80,7 @@ describe('Test HeaderUnit', () => {
80
80
  expect(mockedGoBack).toHaveBeenCalled();
81
81
  });
82
82
 
83
- test('HeaderUnit onPressAdd onPressMore', async () => {
83
+ it('HeaderUnit onPressAdd onPressMore', async () => {
84
84
  await act(async () => {
85
85
  tree = await create(
86
86
  <HeaderUnit
@@ -58,7 +58,7 @@ describe('Test SharedUnit', () => {
58
58
  };
59
59
  });
60
60
 
61
- test('test create SharedUnit unit is not pin, not star', async () => {
61
+ it('test create SharedUnit unit is not pin, not star', async () => {
62
62
  const navigation = useNavigation();
63
63
  const mockedRenewItem = jest.fn();
64
64
  await act(async () => {
@@ -76,7 +76,7 @@ describe('Test SharedUnit', () => {
76
76
  el.props.accessibilityLabel ===
77
77
  AccessibilityLabel.TOUCH_SHARED_UNIT + '-69'
78
78
  );
79
- act(() => {
79
+ await act(async () => {
80
80
  touchSharedUnit.props.onPress();
81
81
  });
82
82
  const iconRemovePinSharedUnit = instance.findAll(
@@ -90,11 +90,11 @@ describe('Test SharedUnit', () => {
90
90
  AccessibilityLabel.ICON_ADD_PIN_SHARED_UNIT + '-69'
91
91
  );
92
92
  mock.onPost(API.UNIT.PIN_UNIT(3)).reply(200);
93
- act(() => {
93
+ await act(async () => {
94
94
  iconAddPinSharedUnit.props.onPress();
95
95
  });
96
96
  mock.onPost(API.UNIT.PIN_UNIT(3)).reply(400);
97
- act(() => {
97
+ await act(async () => {
98
98
  iconAddPinSharedUnit.props.onPress();
99
99
  });
100
100
  const iconAddStarSharedUnit = instance.find(
@@ -103,11 +103,11 @@ describe('Test SharedUnit', () => {
103
103
  AccessibilityLabel.ICON_ADD_STAR_SHARED_UNIT + '-69'
104
104
  );
105
105
  mock.onPost(API.UNIT.STAR_UNIT(3)).reply(200);
106
- act(() => {
106
+ await act(async () => {
107
107
  iconAddStarSharedUnit.props.onPress();
108
108
  });
109
109
  mock.onPost(API.UNIT.STAR_UNIT(3)).reply(400);
110
- act(() => {
110
+ await act(async () => {
111
111
  iconAddStarSharedUnit.props.onPress();
112
112
  });
113
113
  expect(iconRemovePinSharedUnit).toHaveLength(0);
@@ -120,7 +120,7 @@ describe('Test SharedUnit', () => {
120
120
  });
121
121
  });
122
122
 
123
- test('test create SharedUnit unit without unit owner', async () => {
123
+ it('test create SharedUnit unit without unit owner', async () => {
124
124
  const navigation = useNavigation();
125
125
  delete unit.owner_name;
126
126
 
@@ -136,7 +136,7 @@ describe('Test SharedUnit', () => {
136
136
  expect(ownerName).toHaveLength(0);
137
137
  });
138
138
 
139
- test('test create SharedUnit unit isOption false', async () => {
139
+ it('test create SharedUnit unit isOption false', async () => {
140
140
  const navigation = useNavigation();
141
141
 
142
142
  await act(async () => {
@@ -159,7 +159,7 @@ describe('Test SharedUnit', () => {
159
159
  expect(iconStarUnit).toHaveLength(0);
160
160
  });
161
161
 
162
- test('test create SharedUnit unit is pin, is star', async () => {
162
+ it('test create SharedUnit unit is pin, is star', async () => {
163
163
  const navigation = useNavigation();
164
164
  item.is_pin = true;
165
165
  item.is_star = true;
@@ -174,11 +174,11 @@ describe('Test SharedUnit', () => {
174
174
  AccessibilityLabel.ICON_REMOVE_PIN_SHARED_UNIT + '-69'
175
175
  );
176
176
  mock.onPost(API.UNIT.UNPIN_UNIT(3)).reply(200);
177
- act(() => {
177
+ await act(async () => {
178
178
  iconRemovePinSharedUnit.props.onPress();
179
179
  });
180
180
  mock.onPost(API.UNIT.UNPIN_UNIT(3)).reply(400);
181
- act(() => {
181
+ await act(async () => {
182
182
  iconRemovePinSharedUnit.props.onPress();
183
183
  });
184
184
  const iconRemoveStarSharedUnit = instance.find(
@@ -187,11 +187,11 @@ describe('Test SharedUnit', () => {
187
187
  AccessibilityLabel.ICON_REMOVE_STAR_SHARED_UNIT + '-69'
188
188
  );
189
189
  mock.onPost(API.UNIT.UNSTAR_UNIT(3)).reply(200);
190
- act(() => {
190
+ await act(async () => {
191
191
  iconRemoveStarSharedUnit.props.onPress();
192
192
  });
193
193
  mock.onPost(API.UNIT.UNSTAR_UNIT(3)).reply(400);
194
- act(() => {
194
+ await act(async () => {
195
195
  iconRemoveStarSharedUnit.props.onPress();
196
196
  });
197
197
  const iconRemoveStar = instance.findAll(
@@ -46,35 +46,35 @@ describe('Test AirQuality', () => {
46
46
  });
47
47
  let tree;
48
48
 
49
- test('render AirQuality', async () => {
50
- act(() => {
51
- tree = create(wrapComponent(data));
49
+ it('render AirQuality', async () => {
50
+ await act(async () => {
51
+ tree = await create(wrapComponent(data));
52
52
  });
53
53
  const instance = tree.root;
54
54
  const sections = instance.findAllByType(Section);
55
55
  expect(sections).toHaveLength(2);
56
56
  });
57
57
 
58
- test('without showBoxHistory', async () => {
58
+ it('without showBoxHistory', async () => {
59
59
  data.summaryDetail.outdoor_pm10_id = null;
60
60
  data.summaryDetail.outdoor_pm2_5_id = null;
61
61
  data.summaryDetail.outdoor_co_id = null;
62
62
 
63
- act(() => {
64
- tree = create(wrapComponent(data));
63
+ await act(async () => {
64
+ tree = await create(wrapComponent(data));
65
65
  });
66
66
  const instance = tree.root;
67
67
  const sections = instance.findAllByType(Section);
68
68
  expect(sections).toHaveLength(1);
69
69
  });
70
70
 
71
- test('value is undefined', async () => {
71
+ it('value is undefined', async () => {
72
72
  data.summaryDetail.outdoor_pm10_value = undefined;
73
73
  data.summaryDetail.outdoor_pm2_5_value = undefined;
74
74
  data.summaryDetail.outdoor_co_value = undefined;
75
75
 
76
- act(() => {
77
- tree = create(wrapComponent(data));
76
+ await act(async () => {
77
+ tree = await create(wrapComponent(data));
78
78
  });
79
79
  const instance = tree.root;
80
80
  const buttons = instance.findAll(
@@ -86,7 +86,7 @@ describe('Test AirQuality', () => {
86
86
  expect(buttons).toHaveLength(3);
87
87
  });
88
88
 
89
- test('onSelectOutdoor', async () => {
89
+ it('onSelectOutdoor', async () => {
90
90
  const styleTouch = {
91
91
  borderWidth: 1,
92
92
  borderColor: '#D9D9D9',
@@ -98,8 +98,8 @@ describe('Test AirQuality', () => {
98
98
  const styleActive = { backgroundColor: '#00979D', borderWidth: 0 };
99
99
  const styleInactive = { backgroundColor: '#FFFFFF', borderWidth: 1 };
100
100
 
101
- act(() => {
102
- tree = create(wrapComponent(data));
101
+ await act(async () => {
102
+ tree = await create(wrapComponent(data));
103
103
  });
104
104
  const instance = tree.root;
105
105
  const buttons = instance.findAll(
@@ -113,7 +113,7 @@ describe('Test AirQuality', () => {
113
113
  expect(buttons[0].props.style).toEqual([styleTouch, styleActive]);
114
114
  expect(buttons[1].props.style).toEqual([styleTouch, styleInactive]);
115
115
  expect(buttons[2].props.style).toEqual([styleTouch, styleInactive]);
116
- act(() => {
116
+ await act(async () => {
117
117
  buttons[1].props.onPress();
118
118
  });
119
119
  expect(buttons[0].props.style).toEqual([styleTouch, styleInactive]);
@@ -121,10 +121,10 @@ describe('Test AirQuality', () => {
121
121
  expect(buttons[2].props.style).toEqual([styleTouch, styleInactive]);
122
122
  });
123
123
 
124
- test('advices', async () => {
124
+ it('advices', async () => {
125
125
  data.summaryDetail.advices = ['Amazing Good Chop'];
126
- act(() => {
127
- tree = create(wrapComponent(data));
126
+ await act(async () => {
127
+ tree = await create(wrapComponent(data));
128
128
  });
129
129
  const instance = tree.root;
130
130
  const text = instance.find(
@@ -135,10 +135,10 @@ describe('Test AirQuality', () => {
135
135
  expect(text.props.children).toEqual('Amazing Good Chop');
136
136
  });
137
137
 
138
- test('without outdoor_pm2_5_value', async () => {
138
+ it('without outdoor_pm2_5_value', async () => {
139
139
  data.summaryDetail.outdoor_pm2_5_value = null;
140
- act(() => {
141
- tree = create(wrapComponent(data));
140
+ await act(async () => {
141
+ tree = await create(wrapComponent(data));
142
142
  });
143
143
  const instance = tree.root;
144
144
  const buttons = instance.findAll(
@@ -150,10 +150,10 @@ describe('Test AirQuality', () => {
150
150
  expect(buttons).toHaveLength(2);
151
151
  });
152
152
 
153
- test('without outdoor_pm10_value', async () => {
153
+ it('without outdoor_pm10_value', async () => {
154
154
  data.summaryDetail.outdoor_pm10_value = null;
155
- act(() => {
156
- tree = create(wrapComponent(data));
155
+ await act(async () => {
156
+ tree = await create(wrapComponent(data));
157
157
  });
158
158
  const instance = tree.root;
159
159
  const buttons = instance.findAll(
@@ -165,10 +165,10 @@ describe('Test AirQuality', () => {
165
165
  expect(buttons).toHaveLength(2);
166
166
  });
167
167
 
168
- test('without outdoor_co_value', async () => {
168
+ it('without outdoor_co_value', async () => {
169
169
  data.summaryDetail.outdoor_co_value = null;
170
- act(() => {
171
- tree = create(wrapComponent(data));
170
+ await act(async () => {
171
+ tree = await create(wrapComponent(data));
172
172
  });
173
173
  const instance = tree.root;
174
174
  const buttons = instance.findAll(