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

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 (312) 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 +96 -4
  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 +13 -1
  141. package/src/configs/Constants.js +9 -12
  142. package/src/hooks/Common/__test__/useAndroidTranslucentStatusBar.test.js +2 -2
  143. package/src/hooks/Common/__test__/useStatusbar.test.js +4 -4
  144. package/src/hooks/Common/__test__/useTranslations.test.js +1 -1
  145. package/src/hooks/IoT/__test__/useRemoteControl.test.js +7 -7
  146. package/src/hooks/IoT/useRemoteControl.js +0 -1
  147. package/src/iot/RemoteControl/__test__/Bluetooth.test.js +17 -17
  148. package/src/iot/RemoteControl/__test__/Internet.test.js +4 -4
  149. package/src/screens/AQIGuide/__test__/AQIGuide.test.js +3 -3
  150. package/src/screens/ActivityLog/__test__/FilterPopup.test.js +2 -2
  151. package/src/screens/ActivityLog/__test__/ItemLog.test.js +21 -21
  152. package/src/screens/ActivityLog/hooks/__test__/index.test.js +1 -1
  153. package/src/screens/AddCommon/SelectSubUnit.js +3 -0
  154. package/src/screens/AddCommon/SelectUnit.js +1 -1
  155. package/src/screens/AddCommon/__test__/SelectSubUnit.test.js +4 -4
  156. package/src/screens/AddCommon/__test__/SelectUnit.test.js +11 -6
  157. package/src/screens/AddLocationMaps/__test__/index.test.js +6 -6
  158. package/src/screens/AddNewAction/Device/__test__/index.test.js +3 -3
  159. package/src/screens/AddNewAction/SelectAction.js +6 -1
  160. package/src/screens/AddNewAction/__test__/SelectAction.test.js +128 -20
  161. package/src/screens/AddNewAction/__test__/SelectSensorDevices.test.js +10 -10
  162. package/src/screens/AddNewAction/__test__/SetupSensor.test.js +8 -8
  163. package/src/screens/AddNewAutoSmart/__test__/AddNewAutoSmart.test.js +2 -2
  164. package/src/screens/AddNewDevice/__test__/AddNewDevice.test.js +8 -8
  165. package/src/screens/AddNewDevice/__test__/ConnectingDevices.test.js +8 -8
  166. package/src/screens/AddNewGateway/ConnectingDevice.js +29 -7
  167. package/src/screens/AddNewGateway/ConnectingWifiDevice.js +4 -2
  168. package/src/screens/AddNewGateway/ConnectingWifiGuide.js +7 -6
  169. package/src/screens/AddNewGateway/ConnectingZigbeeDevice.js +3 -2
  170. package/src/screens/AddNewGateway/PlugAndPlay/__test__/FirstWarning.test.js +5 -5
  171. package/src/screens/AddNewGateway/ScanWifiDeviceQR.js +1 -4
  172. package/src/screens/AddNewGateway/ShareWifiPassword.js +4 -2
  173. package/src/screens/AddNewGateway/__test__/AddNewGateway.test.js +6 -6
  174. package/src/screens/AddNewGateway/__test__/ConnectingModbusDevice.test.js +1 -1
  175. package/src/screens/AddNewGateway/__test__/ConnectingWifiDevice.test.js +2 -1
  176. package/src/screens/AddNewGateway/__test__/ConnectingWifiGuide.test.js +23 -18
  177. package/src/screens/AddNewGateway/__test__/ConnectingZigbeeDevice.test.js +30 -2
  178. package/src/screens/AddNewGateway/__test__/RenameNewDevices.test.js +4 -4
  179. package/src/screens/AddNewGateway/__test__/ScanGatewayQR.test.js +4 -4
  180. package/src/screens/AddNewGateway/__test__/ScanModbusQR.test.js +4 -4
  181. package/src/screens/AddNewGateway/__test__/ScanWifiDeviceQR.test.js +5 -5
  182. package/src/screens/AddNewGateway/__test__/SelectDeviceSubUnit.test.js +2 -2
  183. package/src/screens/AddNewGateway/__test__/SelectDeviceType.test.js +6 -6
  184. package/src/screens/AddNewGateway/__test__/SelectDeviceUnit.test.js +1 -1
  185. package/src/screens/AddNewGateway/__test__/SelectModbusGateway.test.js +2 -2
  186. package/src/screens/AddNewGateway/__test__/SelectZigbeeGateway.test.js +2 -2
  187. package/src/screens/AddNewGateway/__test__/ShareWifiPassword.test.js +6 -6
  188. package/src/screens/AddNewOneTap/__test__/AddNewOneTap.test.js +4 -4
  189. package/src/screens/AllCamera/__test__/index.test.js +2 -2
  190. package/src/screens/Automate/__test__/Loading.test.js +2 -2
  191. package/src/screens/Automate/__test__/MultiUnits.test.js +10 -10
  192. package/src/screens/Automate/__test__/index.test.js +3 -3
  193. package/src/screens/ConfirmUnitDeletion/__test__/ConfirmUnitDeletion.test.js +2 -2
  194. package/src/screens/Device/EditDevice/__test__/EditDevice.test.js +4 -4
  195. package/src/screens/Device/__test__/DetailHistoryChart.test.js +2 -2
  196. package/src/screens/Device/__test__/detail.test.js +14 -14
  197. package/src/screens/Device/detail.js +10 -3
  198. package/src/screens/Device/utils/index.test.js +4 -4
  199. package/src/screens/Drawer/Drawer.test.js +1 -1
  200. package/src/screens/EditActionsList/__tests__/index.test.js +5 -5
  201. package/src/screens/EmergencyContacts/__test__/EmergencyContactAddNew.test.js +15 -15
  202. package/src/screens/EmergencyContacts/__test__/EmergencyContactList.test.js +19 -19
  203. package/src/screens/EmergencyContacts/__test__/EmergencyContactsSelectContacts.test.js +12 -12
  204. package/src/screens/EmergencySetting/__test__/DropDownItem.test.js +7 -7
  205. package/src/screens/EmergencySetting/__test__/index.test.js +3 -3
  206. package/src/screens/EnterPassword/__test__/EnterPassword.test.js +12 -12
  207. package/src/screens/Explore/__test__/Explore.test.js +3 -3
  208. package/src/screens/GuestInfo/__test__/index.test.js +3 -3
  209. package/src/screens/HanetCamera/__test__/CaptureFaceID.test.js +2 -2
  210. package/src/screens/HanetCamera/__test__/Detail.test.js +2 -2
  211. package/src/screens/HanetCamera/__test__/ManageAccess.test.js +5 -5
  212. package/src/screens/HanetCamera/__test__/MemberInfo.test.js +5 -5
  213. package/src/screens/HanetCamera/hooks/__test__/useHanetCheckinData.test.js +6 -6
  214. package/src/screens/HanetCamera/hooks/__test__/useHanetPlaceMembers.test.js +3 -3
  215. package/src/screens/ManageAccess/hooks/__test__/useManageAccess.test.js +11 -7
  216. package/src/screens/MoveToAnotherSubUnit/__test__/index.test.js +1 -1
  217. package/src/screens/Notification/__test__/Notification.test.js +5 -5
  218. package/src/screens/Notification/__test__/NotificationItem.test.js +79 -75
  219. package/src/screens/Notification/components/NotificationItem.js +134 -141
  220. package/src/screens/PlayBackCamera/__test__/Timer.test.js +3 -3
  221. package/src/screens/ScanChipQR/components/QRScan/__test__/QRScan.test.js +7 -7
  222. package/src/screens/ScriptDetail/__test__/index.test.js +31 -31
  223. package/src/screens/SetSchedule/__test__/SelectWeekday.test.js +1 -1
  224. package/src/screens/SetSchedule/__test__/index.test.js +4 -4
  225. package/src/screens/SharedUnit/__test__/ShareUnit.test.js +2 -2
  226. package/src/screens/SharedUnit/__test__/TabHeader.test.js +3 -3
  227. package/src/screens/Sharing/Components/__test__/DeviceItem.test.js +4 -4
  228. package/src/screens/Sharing/Components/__test__/ItemChangeRole.test.js +4 -4
  229. package/src/screens/Sharing/Components/__test__/TitleCheckBox.test.js +4 -4
  230. package/src/screens/Sharing/__test__/MemberList.test.js +1 -1
  231. package/src/screens/Sharing/__test__/MemberList2.test.js +1 -1
  232. package/src/screens/Sharing/__test__/SelectPermission.test.js +41 -41
  233. package/src/screens/Sharing/__test__/SelectUser.test.js +14 -14
  234. package/src/screens/SideMenuDetail/__test__/index.test.js +25 -4
  235. package/src/screens/SideMenuDetail/index.js +32 -19
  236. package/src/screens/SmartAccount/Connecting/index.js +3 -0
  237. package/src/screens/SmartAccount/ListDevice/__test__/DeviceItem.test.js +3 -3
  238. package/src/screens/SmartAccount/ListDevice/__test__/ListDevice.test.js +17 -21
  239. package/src/screens/SmartAccount/ListDevice/index.js +17 -11
  240. package/src/screens/SmartAccount/SuccessfullyConnected/__test__/SuccessfullyConnected.test.js +66 -11
  241. package/src/screens/SmartAccount/SuccessfullyConnected/index.js +102 -26
  242. package/src/screens/SmartAccount/SuccessfullyConnected/styles.js +58 -1
  243. package/src/screens/SmartAccount/__test__/Connecting.test.js +7 -4
  244. package/src/screens/SmartAccount/__test__/SmartAccount.test.js +17 -17
  245. package/src/screens/SmartIr/__test__/ButtonsBottom.test.js +2 -2
  246. package/src/screens/SmartIr/__test__/GroupButtonByType.test.js +12 -12
  247. package/src/screens/SmartIr/__test__/SelectBrand.test.js +5 -5
  248. package/src/screens/SmartIr/__test__/SelectDeviceType.test.js +5 -5
  249. package/src/screens/SmartIr/__test__/SmartIr.test.js +5 -5
  250. package/src/screens/SubUnit/__test__/AddSubUnit.test.js +12 -12
  251. package/src/screens/SubUnit/__test__/Detail.test.js +6 -6
  252. package/src/screens/SubUnit/__test__/EditSubUnit.test.js +44 -44
  253. package/src/screens/SubUnit/__test__/ManageSubUnit.test.js +6 -6
  254. package/src/screens/SubUnit/hooks/__test__/useManageSubUnit.test.js +5 -5
  255. package/src/screens/SyncLGDevice/__test__/AddLGDevice.test.js +10 -10
  256. package/src/screens/TDSGuide/__test__/TDSGuide.test.js +3 -3
  257. package/src/screens/UVIndexGuide/__test__/UVIndexGuide.test.js +3 -3
  258. package/src/screens/Unit/ManageUnit.js +4 -45
  259. package/src/screens/Unit/ManageUnitStyles.js +5 -35
  260. package/src/screens/Unit/Station/__test__/index.test.js +1 -1
  261. package/src/screens/Unit/Summaries.js +11 -20
  262. package/src/screens/Unit/__test__/AddMenu.test.js +8 -8
  263. package/src/screens/Unit/__test__/CheckSendEmail.test.js +3 -3
  264. package/src/screens/Unit/__test__/ChooseLocation.test.js +2 -2
  265. package/src/screens/Unit/__test__/Detail.test.js +17 -17
  266. package/src/screens/Unit/__test__/ManageUnit.test.js +17 -17
  267. package/src/screens/Unit/__test__/MyAllUnit.test.js +5 -5
  268. package/src/screens/Unit/__test__/SelectAddToFavorites.test.js +4 -4
  269. package/src/screens/Unit/__test__/SelectAddress.test.js +10 -10
  270. package/src/screens/Unit/__test__/SmartAccount.test.js +4 -4
  271. package/src/screens/Unit/__test__/SmartAccountItem.test.js +1 -1
  272. package/src/screens/Unit/__test__/Summaries.test.js +2 -2
  273. package/src/screens/Unit/components/ButtonWrapper/index.js +60 -0
  274. package/src/screens/Unit/components/ButtonWrapper/styles.js +37 -0
  275. package/src/screens/Unit/components/MyAllUnit/__test__/Header.test.js +19 -19
  276. package/src/screens/Unit/components/MyAllUnit/__test__/MyAllUnit.test.js +3 -3
  277. package/src/screens/Unit/components/MyAllUnit/__test__/index.test.js +4 -4
  278. package/src/screens/Unit/components/__test__/Header.test.js +12 -12
  279. package/src/screens/Unit/components/__test__/MyUnitDevice.test.js +2 -2
  280. package/src/screens/Unit/components/__test__/SharedUnit.test.js +6 -6
  281. package/src/screens/UnitSummary/__test__/index.test.js +61 -25
  282. package/src/screens/UnitSummary/components/3PPowerConsumption/__test__/3PPowerConsumption.test.js +3 -3
  283. package/src/screens/UnitSummary/components/PowerConsumption/__test__/ItemPower.test.js +3 -3
  284. package/src/screens/UnitSummary/components/PowerConsumption/__test__/PowerConsumption.test.js +5 -5
  285. package/src/screens/UnitSummary/components/RunningDevices/__test__/index.test.js +3 -3
  286. package/src/screens/UnitSummary/components/Temperature/__test__/ChartAverage.test.js +3 -3
  287. package/src/screens/UnitSummary/components/Temperature/__test__/ItemAverage.test.js +3 -3
  288. package/src/screens/UnitSummary/components/UvIndex/__test__/index.test.js +18 -18
  289. package/src/screens/UnitSummary/components/WaterQuality/__test__/index.test.js +12 -12
  290. package/src/screens/UnitSummary/components/__test__/TotalPowerBox.test.js +2 -2
  291. package/src/screens/UnitSummary/components/__test__/TotalPowerConsumption.test.js +2 -2
  292. package/src/screens/UnitSummary/components/__test__/UnitSummary.test.js +8 -8
  293. package/src/screens/UnitSummary/components/__test__/index.test.js +5 -5
  294. package/src/screens/UnitSummary/index.js +6 -1
  295. package/src/screens/WaterQualityGuide/__test__/index.test.js +12 -12
  296. package/src/utils/Apis/axios.js +23 -0
  297. package/src/utils/Converter/__test__/array.test.js +1 -1
  298. package/src/utils/Converter/__test__/url.test.js +1 -1
  299. package/src/utils/Functions/__test__/Search.test.js +1 -1
  300. package/src/utils/Functions/__test__/ShortEmail.test.js +1 -1
  301. package/src/utils/I18n/translations/en.json +3 -1
  302. package/src/utils/I18n/translations/vi.json +3 -1
  303. package/src/utils/__test__/InitData.test.js +2 -2
  304. package/src/utils/__test__/Utils.test.js +21 -3
  305. package/src/commons/UnitSummary/ConfigHistoryChart.js +0 -105
  306. package/src/screens/AddNewDevice/hooks/ConnectDevices.js +0 -67
  307. package/src/screens/AddNewDevice/hooks/useStateAlertRename.js +0 -32
  308. package/src/screens/SmartAccount/SuccessfullyConnected/DeviceItem.js +0 -37
  309. package/src/screens/SmartAccount/SuccessfullyConnected/DeviceItemStyles.js +0 -49
  310. package/src/screens/SmartAccount/SuccessfullyConnected/__test__/DeviceItem.test.js +0 -65
  311. package/src/screens/UnitSummary/components/PowerConsumeHistoryChart/__test__/index.test.js +0 -63
  312. package/src/screens/UnitSummary/components/PowerConsumeHistoryChart/index.js +0 -53
@@ -15,9 +15,9 @@ const wrapComponent = () => (
15
15
  describe('test EmergencySetting', () => {
16
16
  let tree;
17
17
 
18
- test('test render EmergencySetting', () => {
19
- act(() => {
20
- tree = create(wrapComponent());
18
+ it('test render EmergencySetting', async () => {
19
+ await act(async () => {
20
+ tree = await create(wrapComponent());
21
21
  });
22
22
  const instance = tree.root;
23
23
  const dropDownItem = instance.findAllByType(DropDownItem);
@@ -44,34 +44,34 @@ describe('Test EnterPassword', () => {
44
44
  mockNavigate.mockClear();
45
45
  });
46
46
 
47
- test('test render EnterPassword button done', () => {
47
+ it('test render EnterPassword button done', async () => {
48
48
  const route = {
49
49
  params: { dataParams: {}, type: '' },
50
50
  };
51
- act(() => {
52
- tree = create(wrapComponent(route));
51
+ await act(async () => {
52
+ tree = await create(wrapComponent(route));
53
53
  });
54
54
  const instance = tree.root;
55
55
  const button = buttonDone(instance);
56
56
  expect(button).toHaveLength(1);
57
57
  });
58
58
 
59
- test('test render EnterPassword has not params', () => {
59
+ it('test render EnterPassword has not params', async () => {
60
60
  const route = {};
61
- act(() => {
62
- tree = create(wrapComponent(route));
61
+ await act(async () => {
62
+ tree = await create(wrapComponent(route));
63
63
  });
64
64
  const instance = tree.root;
65
65
  const button = buttonDone(instance);
66
66
  expect(button).toHaveLength(1);
67
67
  });
68
68
 
69
- test('test render EnterPassword text input password', () => {
69
+ it('test render EnterPassword text input password', async () => {
70
70
  const route = {
71
71
  params: { dataParams: {}, type: '' },
72
72
  };
73
- act(() => {
74
- tree = create(wrapComponent(route));
73
+ await act(async () => {
74
+ tree = await create(wrapComponent(route));
75
75
  });
76
76
  const instance = tree.root;
77
77
  const textInput = instance.findAll(
@@ -82,7 +82,7 @@ describe('Test EnterPassword', () => {
82
82
  expect(textInput).toHaveLength(3);
83
83
  });
84
84
 
85
- test('test EnterPassword button done onPress none type ', async () => {
85
+ it('test EnterPassword button done onPress none type ', async () => {
86
86
  const route = {
87
87
  params: { dataParams: { unit_id: 1, member: { id: 1 } }, type: '' },
88
88
  };
@@ -97,7 +97,7 @@ describe('Test EnterPassword', () => {
97
97
  });
98
98
  });
99
99
 
100
- test('test EnterPassword button done onPress has type ', async () => {
100
+ it('test EnterPassword button done onPress has type ', async () => {
101
101
  const route = {
102
102
  params: {
103
103
  dataParams: {
@@ -119,7 +119,7 @@ describe('Test EnterPassword', () => {
119
119
  expect(mockNavigate).toBeCalled();
120
120
  });
121
121
 
122
- test('test EnterPassword button failure', async () => {
122
+ it('test EnterPassword button failure', async () => {
123
123
  const route = {
124
124
  params: {
125
125
  dataParams: {
@@ -32,9 +32,9 @@ jest.mock('@react-navigation/native', () => {
32
32
  describe('test Explore', () => {
33
33
  let tree;
34
34
 
35
- test('Explore', async () => {
36
- act(() => {
37
- tree = create(wrapComponent(mockedNavigate));
35
+ it('Explore', async () => {
36
+ await act(async () => {
37
+ tree = await create(wrapComponent(mockedNavigate));
38
38
  });
39
39
  const instance = tree.root;
40
40
  const safeAreaView = instance.findAllByType(SafeAreaView);
@@ -79,7 +79,7 @@ describe('Test GuestInfo', () => {
79
79
  };
80
80
  });
81
81
 
82
- test('test render GuestInfo', async () => {
82
+ it('test render GuestInfo', async () => {
83
83
  mock.onGet(API.SHARED_SENSOR.ACCESS(1)).reply(200, data);
84
84
  await act(async () => {
85
85
  tree = await create(wrapComponent(route));
@@ -116,7 +116,7 @@ describe('Test GuestInfo', () => {
116
116
  expect(temporary.props.isSelected).toBeTruthy();
117
117
  });
118
118
 
119
- test('test open and close 2 modal', async () => {
119
+ it('test open and close 2 modal', async () => {
120
120
  mock.onGet(API.SHARED_SENSOR.ACCESS(1)).reply(200, data);
121
121
  await act(async () => {
122
122
  tree = await create(wrapComponent(route));
@@ -182,7 +182,7 @@ describe('Test GuestInfo', () => {
182
182
  expect(accessScheduleSheet.props.isVisible).toBeFalsy();
183
183
  });
184
184
 
185
- test('test save', async () => {
185
+ it('test save', async () => {
186
186
  data.access_schedule = 'recurring';
187
187
  mock.onGet(API.SHARED_SENSOR.ACCESS(1)).reply(200, data);
188
188
  await act(async () => {
@@ -89,7 +89,7 @@ describe('Test HanetCaptureFaceID', () => {
89
89
  });
90
90
  };
91
91
 
92
- test('Test update face id', async () => {
92
+ it('Test update face id', async () => {
93
93
  await act(async () => {
94
94
  tree = await create(wrapComponent(route));
95
95
  });
@@ -110,7 +110,7 @@ describe('Test HanetCaptureFaceID', () => {
110
110
  expect(mockedGoBack).toHaveBeenCalled();
111
111
  });
112
112
 
113
- test('Test set face id for new member', async () => {
113
+ it('Test set face id for new member', async () => {
114
114
  route.params.isAddNewMember = true;
115
115
  await act(async () => {
116
116
  tree = await create(wrapComponent(route));
@@ -100,7 +100,7 @@ describe('Test HanetCameraDetail', () => {
100
100
  };
101
101
  });
102
102
 
103
- test('Test render HanetCameraDetail', async () => {
103
+ it('Test render HanetCameraDetail', async () => {
104
104
  mock.onGet(API.DEVICE.DISPLAY(1)).reply(200, responseDisplay.data);
105
105
  mock.onGet(API.CAMERA.HANET.CHECKIN(2)).reply(200, responseCheckin.data);
106
106
  await act(async () => {
@@ -124,7 +124,7 @@ describe('Test HanetCameraDetail', () => {
124
124
  expect(mockNavigate).toBeCalled();
125
125
  });
126
126
 
127
- test('Test change date', async () => {
127
+ it('Test change date', async () => {
128
128
  mock.onGet(API.DEVICE.DISPLAY(1)).reply(200, responseDisplay.data);
129
129
  mock.onGet(API.CAMERA.HANET.CHECKIN(1)).reply(200, responseCheckin.data);
130
130
  await act(async () => {
@@ -53,7 +53,7 @@ describe('Test HanetManageAccess', () => {
53
53
  };
54
54
  });
55
55
 
56
- test('Test render', async () => {
56
+ it('Test render', async () => {
57
57
  response = {
58
58
  status: 200,
59
59
  data: {
@@ -86,7 +86,7 @@ describe('Test HanetManageAccess', () => {
86
86
  el.props.accessibilityLabel ===
87
87
  AccessibilityLabel.ROW_HANET_MANAGE_ACCESS
88
88
  );
89
- act(() => {
89
+ await act(async () => {
90
90
  touches[0].props.onPress();
91
91
  });
92
92
  expect(mockedNavigate).toBeCalled();
@@ -111,7 +111,7 @@ describe('Test HanetManageAccess', () => {
111
111
  });
112
112
  };
113
113
 
114
- test('Test add new member capture face id', async () => {
114
+ it('Test add new member capture face id', async () => {
115
115
  await act(async () => {
116
116
  tree = await create(wrapComponent(route));
117
117
  });
@@ -135,7 +135,7 @@ describe('Test HanetManageAccess', () => {
135
135
  });
136
136
  });
137
137
 
138
- test('Test add new member choose file', async () => {
138
+ it('Test add new member choose file', async () => {
139
139
  await act(async () => {
140
140
  tree = await create(wrapComponent(route));
141
141
  });
@@ -160,7 +160,7 @@ describe('Test HanetManageAccess', () => {
160
160
  });
161
161
  });
162
162
 
163
- test('Test add new member choose file error', async () => {
163
+ it('Test add new member choose file error', async () => {
164
164
  await act(async () => {
165
165
  tree = await create(wrapComponent(route));
166
166
  });
@@ -64,7 +64,7 @@ describe('Test HanetMemberInfo', () => {
64
64
  };
65
65
  });
66
66
 
67
- test('Test rename member', async () => {
67
+ it('Test rename member', async () => {
68
68
  await act(async () => {
69
69
  tree = await create(wrapComponent(route));
70
70
  });
@@ -86,7 +86,7 @@ describe('Test HanetMemberInfo', () => {
86
86
  expect(alertAction.props.visible).toBe(false);
87
87
  });
88
88
 
89
- test('Test remove member', async () => {
89
+ it('Test remove member', async () => {
90
90
  await act(async () => {
91
91
  tree = await create(wrapComponent(route));
92
92
  });
@@ -119,7 +119,7 @@ describe('Test HanetMemberInfo', () => {
119
119
  });
120
120
  };
121
121
 
122
- test('Test set photo id capture face id', async () => {
122
+ it('Test set photo id capture face id', async () => {
123
123
  await act(async () => {
124
124
  tree = await create(wrapComponent(route));
125
125
  });
@@ -139,7 +139,7 @@ describe('Test HanetMemberInfo', () => {
139
139
  expect(mockedNavigate).toBeCalled(); // navigate to HanetCaptureFaceID
140
140
  });
141
141
 
142
- test('Test set photo id choose file', async () => {
142
+ it('Test set photo id choose file', async () => {
143
143
  await act(async () => {
144
144
  tree = await create(wrapComponent(route));
145
145
  });
@@ -156,7 +156,7 @@ describe('Test HanetMemberInfo', () => {
156
156
  expect(bottomSheet.props.isVisible).toBe(false);
157
157
  });
158
158
 
159
- test('Test register new member', async () => {
159
+ it('Test register new member', async () => {
160
160
  route.params.hanetMember = {
161
161
  alias_id: null,
162
162
  name: null,
@@ -50,7 +50,7 @@ describe('Test useHanetCheckinData', () => {
50
50
  };
51
51
  });
52
52
 
53
- test('Test onRefresh', async () => {
53
+ it('Test onRefresh', async () => {
54
54
  const { result } = renderHook(() => useHanetCheckinData(props));
55
55
  mock.onGet(API.CAMERA.HANET.CHECKIN(1)).reply(200, data);
56
56
  await act(async () => {
@@ -59,7 +59,7 @@ describe('Test useHanetCheckinData', () => {
59
59
  expect(result.current.countMember).toBe(data.count_member);
60
60
  });
61
61
 
62
- test('Test render without props', async () => {
62
+ it('Test render without props', async () => {
63
63
  const { result } = renderHook(() => useHanetCheckinData());
64
64
  mock.onGet(API.CAMERA.HANET.CHECKIN(1)).reply(200, data);
65
65
  await act(async () => {
@@ -68,7 +68,7 @@ describe('Test useHanetCheckinData', () => {
68
68
  expect(result.current.refreshing).toBeFalsy();
69
69
  });
70
70
 
71
- test('Test onReceiveNewCheckinData', async () => {
71
+ it('Test onReceiveNewCheckinData', async () => {
72
72
  const { result } = renderHook(() => useHanetCheckinData(props));
73
73
  expect(result.current.checkinData).toHaveLength(0);
74
74
  const newData = {
@@ -127,7 +127,7 @@ describe('Test useHanetCheckinData', () => {
127
127
  expect(result.current.countStranger).toBe(1);
128
128
  });
129
129
 
130
- test('Test onLoadMore', async () => {
130
+ it('Test onLoadMore', async () => {
131
131
  const { result } = renderHook(() => useHanetCheckinData(props));
132
132
  mock
133
133
  .onGet(API.CAMERA.HANET.CHECKIN(1))
@@ -138,14 +138,14 @@ describe('Test useHanetCheckinData', () => {
138
138
  expect(result.current.countMember).toBe(20);
139
139
  });
140
140
 
141
- test('Test onMomentumScrollBegin', async () => {
141
+ it('Test onMomentumScrollBegin', async () => {
142
142
  const { result } = renderHook(() => useHanetCheckinData(props));
143
143
  await act(async () => {
144
144
  await result.current.onMomentumScrollBegin();
145
145
  });
146
146
  });
147
147
 
148
- test('Test onChangeDate', async () => {
148
+ it('Test onChangeDate', async () => {
149
149
  const { result } = renderHook(() => useHanetCheckinData(props));
150
150
  mock.onGet(API.CAMERA.HANET.CHECKIN(1, moment())).reply(200, data);
151
151
  await act(async () => {
@@ -32,7 +32,7 @@ describe('Test useHanetPlaceMembers', () => {
32
32
  };
33
33
  });
34
34
 
35
- test('Test onRefresh', async () => {
35
+ it('Test onRefresh', async () => {
36
36
  const { result } = renderHook(() => useHanetPlaceMembers(props));
37
37
  mock.onGet(API.CAMERA.HANET.PLACE_MEMBERS(1)).reply(200, data);
38
38
  await act(async () => {
@@ -41,7 +41,7 @@ describe('Test useHanetPlaceMembers', () => {
41
41
  expect(result.current.loadingMore).toBe(false);
42
42
  });
43
43
 
44
- test('Test onLoadMore', async () => {
44
+ it('Test onLoadMore', async () => {
45
45
  const { result } = renderHook(() => useHanetPlaceMembers());
46
46
  mock.onGet(API.CAMERA.HANET.PLACE_MEMBERS(1)).reply(200, data);
47
47
  await act(async () => {
@@ -50,7 +50,7 @@ describe('Test useHanetPlaceMembers', () => {
50
50
  expect(result.current.loadingMore).toBe(false);
51
51
  });
52
52
 
53
- test('Test onMomentumScrollBegin', async () => {
53
+ it('Test onMomentumScrollBegin', async () => {
54
54
  const { result } = renderHook(() => useHanetPlaceMembers(props));
55
55
  await act(async () => {
56
56
  await result.current.onMomentumScrollBegin();
@@ -23,9 +23,9 @@ describe('Test Use Manage Access', () => {
23
23
  value: '',
24
24
  };
25
25
 
26
- it('Test fetch data', () => {
26
+ it('Test fetch data', async () => {
27
27
  const { result } = renderHook(() => useManageAccess(unit, sensor));
28
- mock.onGet(API.UNIT.MANAGE_ACCESS(unit.id)).reply(200, [
28
+ const data = [
29
29
  {
30
30
  id: 1,
31
31
  user: {
@@ -59,17 +59,21 @@ describe('Test Use Manage Access', () => {
59
59
  access_schedule: 'temporary',
60
60
  schedule: '02:40 09/08/2020 - 08:40 09/10/2020',
61
61
  },
62
- ]);
63
- act(() => {
62
+ ];
63
+ mock.onGet(API.UNIT.MANAGE_ACCESS(unit.id)).reply(200, data);
64
+ await act(async () => {
64
65
  result.current.onRefresh();
65
66
  });
66
- expect(result.current.isLoading).toBe(true);
67
+
68
+ expect(result.current.isLoading).toBe(false);
69
+
70
+ expect(result.current.data).toEqual(data);
67
71
  });
68
72
 
69
- it('Test get manage access failure', () => {
73
+ it('Test get manage access failure', async () => {
70
74
  const { result } = renderHook(() => useManageAccess(unit, sensor));
71
75
  mock.onGet(API.UNIT.MANAGE_ACCESS(unit.id)).reply(400, []);
72
- act(() => {
76
+ await act(async () => {
73
77
  result.current.onRefresh();
74
78
  });
75
79
  expect(result.current.data).toEqual([]);
@@ -127,7 +127,7 @@ describe('Test Render ListSubUnit', () => {
127
127
  const rowSubUnit = instance.findAll(
128
128
  (el) => el.props.accessibilityLabel === AccessibilityLabel.ROW_SUB_UNIT
129
129
  );
130
- act(() => {
130
+ await act(async () => {
131
131
  rowSubUnit[1].props.onSelect({
132
132
  id: 4,
133
133
  name: 'Room 2',
@@ -45,7 +45,7 @@ jest.mock('../../../hooks', () => {
45
45
  describe('test Notification', () => {
46
46
  let tree;
47
47
 
48
- test('test render', async () => {
48
+ it('test render', async () => {
49
49
  const response = {
50
50
  status: 200,
51
51
  data: {
@@ -83,7 +83,7 @@ describe('test Notification', () => {
83
83
  expect(notificationItem).toHaveLength(2);
84
84
  });
85
85
 
86
- test('test handleOnLoadMore', async () => {
86
+ it('test handleOnLoadMore', async () => {
87
87
  const response = {
88
88
  status: 200,
89
89
  data: {
@@ -117,13 +117,13 @@ describe('test Notification', () => {
117
117
  });
118
118
  const instance = tree.root;
119
119
  const scrollView = instance.findByType(Animated.ScrollView);
120
- act(() => {
120
+ await act(async () => {
121
121
  scrollView.props.onMomentumScrollEnd();
122
122
  });
123
123
  expect(scrollView).toBeDefined();
124
124
  });
125
125
 
126
- test('test onRefresh', async () => {
126
+ it('test onRefresh', async () => {
127
127
  const response = {
128
128
  status: 200,
129
129
  data: {
@@ -157,7 +157,7 @@ describe('test Notification', () => {
157
157
  });
158
158
  const instance = tree.root;
159
159
  const refreshControl = instance.findByType(RefreshControl);
160
- act(() => {
160
+ await act(async () => {
161
161
  refreshControl.props.onRefresh();
162
162
  });
163
163
  expect(refreshControl).toBeDefined();