@eohjsc/react-native-smart-city 0.6.2 → 0.7.3

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 (324) hide show
  1. package/README.md +3 -3
  2. package/android/build.gradle +7 -10
  3. package/package.json +53 -70
  4. package/src/commons/Action/__test__/ItemQuickAction.test.js +2 -2
  5. package/src/commons/ActionGroup/NumberUpDownActionTemplate.js +3 -3
  6. package/src/commons/ActionGroup/OnOffSmartLock/AutoLock/ButtonWrapper.js +3 -3
  7. package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/__test__/ItemPasscode.test.js +2 -2
  8. package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/__test__/index.test.js +3 -3
  9. package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/index.js +3 -3
  10. package/src/commons/ActionGroup/OnOffSmartLock/SetupGeneratePasscode/ButtonWrapper.js +2 -2
  11. package/src/commons/ActionGroup/OnOffSmartLock/SetupGeneratePasscode/__test__/index.test.js +0 -15
  12. package/src/commons/ActionGroup/OnOffTemplate/OnOffSimpleTemplate.js +2 -2
  13. package/src/commons/ActionGroup/OptionsDropdownActionTemplate.js +2 -2
  14. package/src/commons/ActionGroup/SmartTiviActionTemplate/SmartTiviActionTemplate.js +2 -2
  15. package/src/commons/ActionGroup/SmartTiviActionTemplate/component/CircleButton.js +5 -5
  16. package/src/commons/ActionGroup/SmartTiviActionTemplate/component/ControlPlay.js +5 -5
  17. package/src/commons/ActionGroup/TerminalBoxTemplate.js +2 -2
  18. package/src/commons/ActionGroup/TextBoxTemplate.js +2 -2
  19. package/src/commons/ActionGroup/ThreeButtonTemplate/__test__/ThreeButtonTemplate.test.js +4 -4
  20. package/src/commons/ActionGroup/TimerActionTemplate.js +4 -5
  21. package/src/commons/ActionGroup/TwoButtonTemplate/index.js +2 -2
  22. package/src/commons/ActionGroup/__test__/ColorPickerTemplate.test.js +4 -9
  23. package/src/commons/ActionGroup/__test__/NumberUpDownTemplate.test.js +2 -9
  24. package/src/commons/ActionGroup/__test__/OnOffButtonTemplate.test.js +4 -11
  25. package/src/commons/ActionGroup/__test__/OnOffSmartLock.test.js +2 -9
  26. package/src/commons/ActionGroup/__test__/OnOffTemplate.test.js +4 -18
  27. package/src/commons/ActionGroup/__test__/OneBigButtonTemplate.test.js +2 -2
  28. package/src/commons/ActionGroup/__test__/OptionsDropdownTemplate.test.js +1 -8
  29. package/src/commons/ActionGroup/__test__/StatesGridActionTemplate.test.js +0 -7
  30. package/src/commons/ActionGroup/__test__/SwitchButtonTemplate.test.js +4 -15
  31. package/src/commons/ActionGroup/__test__/TerminalBoxTemplate.test.js +0 -7
  32. package/src/commons/ActionGroup/__test__/TextBoxTemplate.test.js +1 -8
  33. package/src/commons/ActionGroup/__test__/TimerActionTemplate.test.js +8 -15
  34. package/src/commons/ActionGroup/__test__/TimerActionTemplateWithutConfigValue.test.js +2 -10
  35. package/src/commons/ActionGroup/__test__/TwoButtonTemplate.test.js +3 -20
  36. package/src/commons/ActionGroup/__test__/index.test.js +15 -23
  37. package/src/commons/ActionTemplate/__test__/index.test.js +2 -0
  38. package/src/commons/ActionTemplate/__test__/utils.js +21 -0
  39. package/src/commons/ActionTemplate/index.js +1 -2
  40. package/src/commons/BackDefault/index.js +2 -2
  41. package/src/commons/ButtonPopup/index.js +2 -2
  42. package/src/commons/Calendar/__test__/Calendar.test.js +0 -7
  43. package/src/commons/CircleButton/__test__/CircleButton.test.js +2 -2
  44. package/src/commons/Dashboard/MyPinnedSharedUnit/__test__/MyPinnedSharedUnit.test.js +11 -25
  45. package/src/commons/Dashboard/MyUnit/__test__/MyUnit.test.js +27 -20
  46. package/src/commons/Dashboard/MyUnit/index.js +0 -1
  47. package/src/commons/DateTimeRangeChange/DateTimeButton.js +2 -2
  48. package/src/commons/DateTimeRangeChange/__test__/DateTimeButton.test.js +4 -4
  49. package/src/commons/DateTimeRangeChange/index.js +2 -2
  50. package/src/commons/Device/ConnectedViewHeader.js +2 -2
  51. package/src/commons/Device/DisconnectedView.js +2 -2
  52. package/src/commons/Device/Emergency/EmergencyDetail.js +3 -3
  53. package/src/commons/Device/Emergency/__test__/EmergencyDetail.test.js +2 -2
  54. package/src/commons/Device/FlatListItems.js +3 -3
  55. package/src/commons/Device/Hanet/ItemHanetDevice.js +3 -3
  56. package/src/commons/Device/Hanet/ItemHanetDevice.test.js +3 -11
  57. package/src/commons/Device/ItemAddNew/index.js +2 -2
  58. package/src/commons/Device/ItemDevice.js +2 -2
  59. package/src/commons/Device/SonosSpeaker/index.js +3 -3
  60. package/src/commons/Device/WaterPurifierStatus/AlertStatusMachine.js +2 -2
  61. package/src/commons/Device/WaterQualitySensor/QualityIndicatorsItem.js +2 -6
  62. package/src/commons/DisplayChecking/index.js +2 -2
  63. package/src/commons/EmergencyButton/AlertSendConfirm.js +2 -2
  64. package/src/commons/EmergencyButton/AlertSent.js +6 -2
  65. package/src/commons/FieldTemplate/ChooseUserField/index.js +2 -2
  66. package/src/commons/FieldTemplate/PasscodeField/__test__/index.test.js +5 -5
  67. package/src/commons/FieldTemplate/ScheduleField/__test__/index.test.js +9 -9
  68. package/src/commons/Form/CurrencyInput.js +1 -15
  69. package/src/commons/GroupCheckBox/__test__/GroupCheckBox.test.js +1 -22
  70. package/src/commons/Header/HeaderCustom.js +8 -3
  71. package/src/commons/HeaderAni/index.js +2 -2
  72. package/src/commons/IconComponent/index.js +3 -3
  73. package/src/commons/MediaPlayerDetail/MediaPlayerFull.js +1 -1
  74. package/src/commons/MediaPlayerDetail/__test__/MediaPlayerFull.test.js +12 -48
  75. package/src/commons/MenuActionAddnew/__test__/MenuActionAddNew.test.js +1 -1
  76. package/src/commons/MenuActionList/__test__/MenuActionList.test.js +1 -0
  77. package/src/commons/NavBar/index.js +2 -2
  78. package/src/commons/OneTapTemplate/NumberUpDownActionTemplate.js +3 -3
  79. package/src/commons/PreventAccess/__test__/PreventAccess.test.js +1 -13
  80. package/src/commons/Processing/__test__/Connecting.test.js +3 -14
  81. package/src/commons/SearchLocation/index.js +3 -3
  82. package/src/commons/SelectActionCard/index.js +2 -2
  83. package/src/commons/SelectSubUnit/__test__/SelectSubUnit.test.js +1 -18
  84. package/src/commons/SelectSubUnit/index.js +2 -2
  85. package/src/commons/SelectUnit/__test__/SelectUnit.test.js +1 -13
  86. package/src/commons/Sharing/BtnRemoveMember.js +2 -2
  87. package/src/commons/Sharing/StationDevicePermissions.js +2 -2
  88. package/src/commons/Sharing/WrapHeaderScrollable.js +1 -1
  89. package/src/commons/Sharing/__test__/ButtonRemoveMember.test.js +2 -2
  90. package/src/commons/Sharing/__test__/DevicePermissionsCheckbox.test.js +1 -1
  91. package/src/commons/SubUnit/DeviceTemplate/ConfigAndEvaluation/ConfigAndEvaluation.js +2 -2
  92. package/src/commons/SubUnit/DeviceTemplate/ConfigValue/ConfigValue.js +2 -2
  93. package/src/commons/SubUnit/DeviceTemplate/EvaluationOverConfig/EvaluationOverConfig.js +2 -2
  94. package/src/commons/SubUnit/Item/index.js +3 -3
  95. package/src/commons/SubUnit/OneTap/ItemOneTap.js +2 -2
  96. package/src/commons/SubUnit/OneTap/__test__/SubUnitAutomate.test.js +11 -8
  97. package/src/commons/SubUnit/__test__/Favorites.test.js +1 -13
  98. package/src/commons/SubUnit/__test__/ShortDetail.test.js +5 -16
  99. package/src/commons/SummaryItem/index.js +22 -23
  100. package/src/commons/Tabbar/__test__/index.test.js +0 -11
  101. package/src/commons/Unit/HeaderUnit/index.js +84 -84
  102. package/src/commons/Unit/SharedUnit.js +7 -7
  103. package/src/commons/Unit/__test__/HeaderUnit.test.js +29 -52
  104. package/src/commons/Unit/__test__/SharedUnit.test.js +94 -105
  105. package/src/commons/UnitSummary/AirQuality/SegmentedRoundDisplay/index.js +11 -30
  106. package/src/commons/WrapParallaxScrollView/index.js +21 -50
  107. package/src/configs/API.js +1 -2
  108. package/src/hooks/Common/__test__/useAndroidTranslucentStatusBar.test.js +4 -15
  109. package/src/hooks/Common/useIsOwnerOfUnit.js +1 -1
  110. package/src/hooks/IoT/__test__/useRemoteControl.test.js +1 -1
  111. package/src/hooks/IoT/__test__/useWatchConfigs.test.js +6 -21
  112. package/src/iot/RemoteControl/HomeAssistant.js +1 -1
  113. package/src/iot/RemoteControl/__test__/Bluetooth.test.js +234 -232
  114. package/src/navigations/AddDeviceStack.js +2 -2
  115. package/src/navigations/AddGatewayStack.js +2 -2
  116. package/src/navigations/AddLGDeviceStack.js +2 -2
  117. package/src/navigations/AddMemberStack.js +2 -2
  118. package/src/navigations/AddSubUnitStack.js +2 -2
  119. package/src/navigations/AddUnitStack.js +2 -2
  120. package/src/navigations/AllGatewayStack.js +2 -2
  121. package/src/navigations/AutomateStack.js +4 -4
  122. package/src/navigations/EmergencyContactsStack.js +4 -4
  123. package/src/navigations/GatewayStack.js +2 -2
  124. package/src/navigations/HanetCameraStack.js +2 -2
  125. package/src/navigations/Main.js +2 -2
  126. package/src/navigations/NotificationStack.js +2 -2
  127. package/src/navigations/SharedStack.js +8 -6
  128. package/src/navigations/SmartAccountStack.js +2 -2
  129. package/src/navigations/SmartIrStack.js +2 -2
  130. package/src/navigations/SmartLockStack.js +2 -2
  131. package/src/navigations/SmartStack.js +2 -2
  132. package/src/navigations/TemplateStack.js +2 -2
  133. package/src/navigations/UnitStack.js +4 -12
  134. package/src/navigations/utils.js +1 -4
  135. package/src/screens/ActivityLog/hooks/index.js +7 -4
  136. package/src/screens/ActivityLog/index.js +2 -2
  137. package/src/screens/AddCommon/__test__/SelectSubUnit.test.js +4 -21
  138. package/src/screens/AddCommon/__test__/SelectUnit.test.js +7 -19
  139. package/src/screens/AddLocationMaps/__test__/index.test.js +3 -13
  140. package/src/screens/AddLocationMaps/index.js +11 -6
  141. package/src/screens/AddNewDevice/__test__/AddNewDevice.test.js +3 -20
  142. package/src/screens/AddNewGateway/PlugAndPlay/__test__/FirstWarning.test.js +11 -18
  143. package/src/screens/AddNewGateway/PlugAndPlay/__test__/ZigbeeDeviceConnectGuide.test.js +4 -21
  144. package/src/screens/AddNewGateway/RenameNewDevices.js +2 -2
  145. package/src/screens/AddNewGateway/__test__/AddNewGateway.test.js +3 -3
  146. package/src/screens/AddNewGateway/__test__/ConnectingModbusDevice.test.js +0 -17
  147. package/src/screens/AddNewGateway/__test__/ConnectingWifiDevice.test.js +4 -19
  148. package/src/screens/AddNewGateway/__test__/ConnectingWifiGuide.test.js +3 -15
  149. package/src/screens/AddNewGateway/__test__/ConnectingZigbeeDevice.test.js +31 -51
  150. package/src/screens/AddNewGateway/__test__/RenameNewDevices.test.js +9 -22
  151. package/src/screens/AddNewGateway/__test__/ScanGatewayQR.test.js +12 -19
  152. package/src/screens/AddNewGateway/__test__/ScanModbusQR.test.js +6 -16
  153. package/src/screens/AddNewGateway/__test__/ScanWifiDeviceQR.test.js +4 -15
  154. package/src/screens/AddNewGateway/__test__/SelectDeviceSubUnit.test.js +3 -3
  155. package/src/screens/AddNewGateway/__test__/SelectDeviceType.test.js +18 -10
  156. package/src/screens/AddNewGateway/__test__/SelectDeviceUnit.test.js +1 -1
  157. package/src/screens/AddNewGateway/__test__/SelectModbusGateway.test.js +12 -9
  158. package/src/screens/AddNewGateway/__test__/SelectZigbeeGateway.test.js +12 -9
  159. package/src/screens/AddNewGateway/__test__/ShareWifiPassword.test.js +7 -21
  160. package/src/screens/AllGateway/DetailConfigActionInternal/__test__/index.test.js +0 -20
  161. package/src/screens/AllGateway/DetailConfigActionModbus/__test__/index.test.js +7 -24
  162. package/src/screens/AllGateway/DeviceGatewayInfo/__test__/index.test.js +0 -17
  163. package/src/screens/AllGateway/DeviceInternalDetail/__test__/index.test.js +84 -100
  164. package/src/screens/AllGateway/DeviceModbusDetail/__test__/index.test.js +64 -82
  165. package/src/screens/AllGateway/DeviceZigbeeDetail/__test__/index.test.js +36 -55
  166. package/src/screens/AllGateway/GatewayConnectionMethods/__test__/index.test.js +9 -18
  167. package/src/screens/AllGateway/GatewayDetail/__test__/index.test.js +10 -37
  168. package/src/screens/AllGateway/GatewayInfo/__test__/index.test.js +7 -32
  169. package/src/screens/AllGateway/__test__/index.test.js +1 -14
  170. package/src/screens/AllGateway/components/GatewayItem/__test__/index.test.js +0 -12
  171. package/src/screens/AllGateway/components/TabPaneCT/__test__/index.test.js +1 -13
  172. package/src/screens/AllGateway/components/TabPaneCT/index.js +1 -1
  173. package/src/screens/AllGateway/hooks/__test__/index.test.js +1 -8
  174. package/src/screens/AllGateway/test-utils.js +1 -1
  175. package/src/screens/Automate/AddNewAction/NewActionWrapper.js +2 -2
  176. package/src/screens/Automate/AddNewAction/SetupConfigCondition.js +27 -28
  177. package/src/screens/Automate/AddNewAction/__test__/ChooseAction.test.js +3 -3
  178. package/src/screens/Automate/AddNewAction/__test__/ChooseConfig.test.js +8 -5
  179. package/src/screens/Automate/AddNewAction/__test__/SelectControlDevices.test.js +2 -2
  180. package/src/screens/Automate/AddNewAction/__test__/SelectMonitorDevices.test.js +1 -18
  181. package/src/screens/Automate/AddNewAction/__test__/SetupConfigCondition.test.js +17 -15
  182. package/src/screens/Automate/AddNewAutoSmart/__test__/AddNewAutoSmart.test.js +4 -4
  183. package/src/screens/Automate/EditActionsList/__tests__/UpdateActionScript.test.js +38 -55
  184. package/src/screens/Automate/EditActionsList/__tests__/UpdateDelayScript.test.js +0 -18
  185. package/src/screens/Automate/EditActionsList/__tests__/UpdateNotifyScript.test.js +1 -19
  186. package/src/screens/Automate/EditActionsList/__tests__/index.test.js +14 -11
  187. package/src/screens/Automate/OneTap/__test__/AddNewOneTap.test.js +3 -3
  188. package/src/screens/Automate/Scenario/__test__/AddNewOneTap.test.js +2 -2
  189. package/src/screens/Automate/ScriptDetail/Components/AddActionScript.js +2 -2
  190. package/src/screens/Automate/ScriptDetail/__test__/index.test.js +33 -25
  191. package/src/screens/Automate/ScriptDetail/index.js +6 -6
  192. package/src/screens/Automate/SetSchedule/__test__/index.test.js +4 -4
  193. package/src/screens/Automate/SetSchedule/components/RowItem.js +3 -3
  194. package/src/screens/Automate/Styles/indexStyles.js +6 -0
  195. package/src/screens/Automate/__test__/MultiUnits.test.js +7 -7
  196. package/src/screens/Automate/__test__/index.test.js +9 -34
  197. package/src/screens/Automate/index.js +50 -33
  198. package/src/screens/ChangePosition/__test__/index.test.js +1 -14
  199. package/src/screens/ConfirmUnitDeletion/__test__/ConfirmUnitDeletion.test.js +1 -23
  200. package/src/screens/Device/EditDevice/__test__/EditDevice.test.js +1 -11
  201. package/src/screens/Device/EditDevice/index.js +2 -2
  202. package/src/screens/Device/__test__/detail.test.js +11 -11
  203. package/src/screens/Device/__test__/sensorDisplayItem.test.js +0 -12
  204. package/src/screens/Device/detail.js +14 -12
  205. package/src/screens/Drawer/Drawer.test.js +3 -11
  206. package/src/screens/Drawer/index.js +3 -4
  207. package/src/screens/EmergencyContacts/EmergencyContactsList.js +4 -8
  208. package/src/screens/EmergencyContacts/EmergencyContactsSelectContacts.js +3 -3
  209. package/src/screens/EmergencyContacts/__test__/EmergencyContactAddNew.test.js +4 -17
  210. package/src/screens/EmergencyContacts/__test__/EmergencyContactList.test.js +3 -14
  211. package/src/screens/EmergencyContacts/__test__/EmergencyContactsSelectContacts.test.js +0 -10
  212. package/src/screens/EmergencySetting/components/DropDownItem.js +2 -2
  213. package/src/screens/EnterPassword/__test__/EnterPassword.test.js +4 -17
  214. package/src/screens/GuestInfo/__test__/index.test.js +0 -11
  215. package/src/screens/GuestInfo/components/RowGuestInfo.js +2 -2
  216. package/src/screens/GuestInfo/index.js +2 -2
  217. package/src/screens/HanetCamera/Detail.js +6 -2
  218. package/src/screens/HanetCamera/ManageAccess.js +3 -4
  219. package/src/screens/HanetCamera/MemberInfo.js +4 -4
  220. package/src/screens/HanetCamera/__test__/CaptureFaceID.test.js +2 -16
  221. package/src/screens/HanetCamera/__test__/Detail.test.js +1 -12
  222. package/src/screens/HanetCamera/__test__/ManageAccess.test.js +5 -16
  223. package/src/screens/HanetCamera/__test__/MemberInfo.test.js +5 -18
  224. package/src/screens/HanetCamera/components/RequestFaceIDPopup.js +2 -2
  225. package/src/screens/ManageAccess/__test__/ManageAccess.test.js +3 -19
  226. package/src/screens/ManageAccess/index.js +3 -3
  227. package/src/screens/MoveToAnotherSubUnit/__test__/index.test.js +7 -7
  228. package/src/screens/Notification/__test__/Notification.test.js +5 -15
  229. package/src/screens/Notification/__test__/NotificationItem.test.js +9 -19
  230. package/src/screens/Notification/index.js +5 -5
  231. package/src/screens/PlayBackCamera/__test__/index.test.js +13 -22
  232. package/src/screens/PlayBackCamera/index.js +2 -2
  233. package/src/screens/ScanChipQR/components/QRScan/__test__/QRScan.test.js +0 -11
  234. package/src/screens/ScanChipQR/components/QRScan/index.js +3 -3
  235. package/src/screens/SelectUnit/__test__/index.test.js +9 -29
  236. package/src/screens/SelectUnit/index.js +2 -2
  237. package/src/screens/SharedUnit/TabHeader.js +2 -2
  238. package/src/screens/SharedUnit/index.js +5 -0
  239. package/src/screens/Sharing/Components/EndDevice.js +3 -3
  240. package/src/screens/Sharing/SelectUser.js +5 -4
  241. package/src/screens/Sharing/UnitMemberList.js +7 -6
  242. package/src/screens/Sharing/__test__/InfoMemberUnit.test.js +9 -4
  243. package/src/screens/Sharing/__test__/SelectShareDevice.test.js +2 -15
  244. package/src/screens/Sharing/__test__/SelectUser.test.js +2 -22
  245. package/src/screens/Sharing/__test__/UnitMemberList.test.js +2 -2
  246. package/src/screens/Sharing/__test__/UpdateShareDevice.test.js +4 -17
  247. package/src/screens/Sharing/hooks/__test__/index.test.js +2 -13
  248. package/src/screens/SmartAccount/Connecting/index.js +0 -2
  249. package/src/screens/SmartAccount/ListDevice/__test__/ListDevice.test.js +3 -18
  250. package/src/screens/SmartAccount/SuccessfullyConnected/__test__/SuccessfullyConnected.test.js +11 -21
  251. package/src/screens/SmartAccount/SuccessfullyConnected/index.js +3 -4
  252. package/src/screens/SmartAccount/__test__/Connecting.test.js +30 -36
  253. package/src/screens/SmartAccount/__test__/SmartAccount.test.js +12 -21
  254. package/src/screens/SmartIr/__test__/GroupButtonByType.test.js +8 -17
  255. package/src/screens/SmartIr/__test__/SelectBrand.test.js +1 -11
  256. package/src/screens/SmartIr/__test__/SelectDeviceType.test.js +1 -12
  257. package/src/screens/SmartIr/__test__/SmartIr.test.js +3 -11
  258. package/src/screens/SmartIr/components/GroupButtonByType/GroupButtonByType.js +6 -5
  259. package/src/screens/SmartIr/components/SelectBrand.js +2 -2
  260. package/src/screens/SubUnit/AddSubUnit.js +1 -0
  261. package/src/screens/SubUnit/EditSubUnit.js +3 -2
  262. package/src/screens/SubUnit/ManageSubUnit.js +5 -5
  263. package/src/screens/SubUnit/__test__/AddSubUnit.test.js +9 -31
  264. package/src/screens/SubUnit/__test__/EditSubUnit.test.js +12 -30
  265. package/src/screens/SubUnit/__test__/ManageSubUnit.test.js +2 -2
  266. package/src/screens/SubUnit/hooks/__test__/useManageSubUnit.test.js +0 -12
  267. package/src/screens/SyncLGDevice/__test__/AddLGDevice.test.js +7 -20
  268. package/src/screens/Template/__test__/EditTemplate.test.js +4 -15
  269. package/src/screens/Template/__test__/GatewayList.test.js +0 -9
  270. package/src/screens/Template/__test__/detail.test.js +8 -8
  271. package/src/screens/Template/__test__/index.test.js +3 -14
  272. package/src/screens/Template/detail.js +2 -2
  273. package/src/screens/Unit/Detail.js +12 -53
  274. package/src/screens/Unit/SelectAddToFavorites.js +2 -2
  275. package/src/screens/Unit/SelectAddress.js +9 -4
  276. package/src/screens/Unit/SmartAccountItem.js +2 -2
  277. package/src/screens/Unit/Station/__test__/index.test.js +2 -2
  278. package/src/screens/Unit/Summaries.js +24 -29
  279. package/src/screens/Unit/__test__/AddMenu.test.js +5 -2
  280. package/src/screens/Unit/__test__/CheckSendEmail.test.js +0 -12
  281. package/src/screens/Unit/__test__/ChooseLocation.test.js +1 -4
  282. package/src/screens/Unit/__test__/Detail.test.js +14 -12
  283. package/src/screens/Unit/__test__/ManageUnit.test.js +2 -17
  284. package/src/screens/Unit/__test__/MoreMenu.test.js +1 -11
  285. package/src/screens/Unit/__test__/SelectAddToFavorites.test.js +3 -14
  286. package/src/screens/Unit/__test__/SelectAddress.test.js +4 -17
  287. package/src/screens/Unit/__test__/SmartAccount.test.js +14 -11
  288. package/src/screens/Unit/__test__/SmartAccountItem.test.js +0 -11
  289. package/src/screens/Unit/__test__/Summaries.test.js +2 -14
  290. package/src/screens/Unit/components/AutomateScript/index.js +2 -2
  291. package/src/screens/Unit/components/ButtonWrapper/index.js +3 -4
  292. package/src/screens/Unit/components/Header/index.js +5 -4
  293. package/src/screens/Unit/components/SharedUnit/index.js +5 -5
  294. package/src/screens/Unit/components/__test__/Header.test.js +1 -14
  295. package/src/screens/Unit/components/__test__/MyUnitDevice.test.js +1 -11
  296. package/src/screens/Unit/components/__test__/SharedUnit.test.js +1 -11
  297. package/src/screens/UnitSummary/__test__/index.test.js +51 -17
  298. package/src/screens/UnitSummary/components/3PPowerConsumption/__test__/3PPowerConsumption.test.js +8 -25
  299. package/src/screens/UnitSummary/components/AirQuality/__test__/index.test.js +1 -7
  300. package/src/screens/UnitSummary/components/AirQuality/index.js +8 -3
  301. package/src/screens/UnitSummary/components/PowerConsumption/__test__/PowerConsumption.test.js +0 -11
  302. package/src/screens/UnitSummary/components/RunningDevices/__test__/index.test.js +1 -16
  303. package/src/screens/UnitSummary/components/Temperature/index.js +5 -1
  304. package/src/screens/UnitSummary/components/UvIndex/__test__/index.test.js +0 -8
  305. package/src/screens/UnitSummary/components/UvIndex/index.js +6 -2
  306. package/src/screens/UnitSummary/components/WaterQuality/Item/index.js +2 -2
  307. package/src/screens/UnitSummary/components/WaterQuality/__test__/index.test.js +14 -18
  308. package/src/screens/UnitSummary/components/__test__/UnitSummary.test.js +8 -8
  309. package/src/screens/UnitSummary/index.js +4 -8
  310. package/src/utils/Apis/axios.js +4 -2
  311. package/src/utils/Converter/__test__/timer.test.js +8 -0
  312. package/src/utils/Functions/preloadImages.js +13 -14
  313. package/src/utils/Monitor.js +2 -3
  314. package/src/utils/Route/index.js +0 -1
  315. package/src/utils/Storage.js +1 -1
  316. package/src/commons/Device/WindSpeed/LinearChart/__test__/LinearChart.test.js +0 -48
  317. package/src/commons/Device/WindSpeed/LinearChart/index.js +0 -155
  318. package/src/screens/AddNewGateway/hooks/__Tests__/index.test.js +0 -27
  319. package/src/screens/AddNewGateway/hooks/index.js +0 -31
  320. package/src/screens/SubUnit/Detail.js +0 -150
  321. package/src/screens/SubUnit/__test__/Detail.test.js +0 -125
  322. package/src/screens/UnitSummary/components/Temperature/ChartAverage/index.js +0 -62
  323. package/src/screens/UnitSummary/components/Temperature/__test__/ChartAverage.test.js +0 -17
  324. package/src/utils/dateHelper/getTickValues.js +0 -22
@@ -8,8 +8,8 @@ import React, {
8
8
  } from 'react';
9
9
  import { View, TouchableOpacity, Platform } from 'react-native';
10
10
  import { useNavigation, useFocusEffect } from '@react-navigation/native';
11
- import { IconFill, IconOutline } from '@ant-design/icons-react-native';
12
- import { Icon } from '@ant-design/react-native';
11
+ import AntDesign from 'react-native-vector-icons/AntDesign';
12
+ import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
13
13
  import moment from 'moment';
14
14
 
15
15
  import { SCContext } from '../../context';
@@ -215,7 +215,7 @@ const DeviceDetail = ({ route }) => {
215
215
 
216
216
  useEffect(() => {
217
217
  if (
218
- unit.remote_control_options &&
218
+ unit?.remote_control_options &&
219
219
  unit.remote_control_options.googlehome?.length &&
220
220
  isNetworkConnected
221
221
  ) {
@@ -685,9 +685,9 @@ const DeviceDetail = ({ route }) => {
685
685
  >
686
686
  <View style={styles.buttonStar}>
687
687
  {isFavorite ? (
688
- <IconFill name="star" size={25} color={Colors.Yellow6} />
688
+ <AntDesign name="star" size={25} color={Colors.Yellow6} />
689
689
  ) : (
690
- <IconOutline name="star" size={25} />
690
+ <AntDesign name="staro" size={25} />
691
691
  )}
692
692
  </View>
693
693
  </TouchableOpacity>
@@ -695,7 +695,7 @@ const DeviceDetail = ({ route }) => {
695
695
  {isShowSetupEmergencyContact && (
696
696
  <TouchableOpacity onPress={onPressSetting}>
697
697
  <View style={styles.button}>
698
- <Icon name="setting" size={25} color={Colors.Black} />
698
+ <AntDesign name="setting" size={25} color={Colors.Black} />
699
699
  </View>
700
700
  </TouchableOpacity>
701
701
  )}
@@ -706,7 +706,7 @@ const DeviceDetail = ({ route }) => {
706
706
  ref={refMenuAction}
707
707
  accessibilityLabel={AccessibilityLabel.HEADER_DEVICE_BUTTON_MORE}
708
708
  >
709
- <Icon name={'more'} size={27} color={Colors.Black} />
709
+ <MaterialIcons name={'more-vert'} size={27} color={Colors.Black} />
710
710
  </TouchableOpacity>
711
711
  </View>
712
712
  ),
@@ -755,7 +755,7 @@ const DeviceDetail = ({ route }) => {
755
755
  >
756
756
  {display.items.map((item, index) => {
757
757
  return (
758
- <>
758
+ <View key={item?.id?.toString()}>
759
759
  {!item.is_configuration_ready && (
760
760
  <Text center>{t('bellow_widget_is_not_configured')}</Text>
761
761
  )}
@@ -779,7 +779,7 @@ const DeviceDetail = ({ route }) => {
779
779
  setShowWindDirection={setShowWindDirection}
780
780
  background={station?.background}
781
781
  />
782
- </>
782
+ </View>
783
783
  );
784
784
  })}
785
785
  </SensorConnectStatusViewHeader>
@@ -791,7 +791,9 @@ const DeviceDetail = ({ route }) => {
791
791
  canManageSubUnit && (
792
792
  <BottomButtonView
793
793
  style={styles.bottomButtonEmergencyContact}
794
- mainIcon={<Icon name="plus" size={16} color={Colors.Primary} />}
794
+ mainIcon={
795
+ <AntDesign name="plus" size={16} color={Colors.Primary} />
796
+ }
795
797
  mainTitle={t('setup_my_emergency_contact')}
796
798
  onPressMain={onSetupContacts}
797
799
  typeMain="primaryBorder"
@@ -825,7 +827,7 @@ const DeviceDetail = ({ route }) => {
825
827
  {isShowEmergencyResolve && !isEmergencyPopupScreen && (
826
828
  <BottomButtonView
827
829
  style={styles.bottomButtonEmergencyResolve}
828
- mainIcon={<IconFill name="tool" size={15} color={Colors.Gray6} />}
830
+ mainIcon={<AntDesign name="tool" size={15} color={Colors.Gray6} />}
829
831
  mainTitle={t('resolve_situation')}
830
832
  onPressMain={onPressResolveSituationConfirm}
831
833
  topComponent={
@@ -865,7 +867,7 @@ const DeviceDetail = ({ route }) => {
865
867
  >
866
868
  {unit?.name} - {sensor?.station?.name}
867
869
  </Text>
868
- <IconFill
870
+ <AntDesign
869
871
  accessibilityLabel={AccessibilityLabel.BUTTON_POPUP_RESOLVED_ICON}
870
872
  name="check-circle"
871
873
  size={42}
@@ -4,16 +4,7 @@ import AccessibilityLabel from '../../configs/AccessibilityLabel';
4
4
  import { SCProvider } from '../../context';
5
5
  import { mockSCStore } from '../../context/mockStore';
6
6
  import Drawer, { Row } from './index';
7
-
8
- const mockDispatch = jest.fn();
9
- jest.mock('@react-navigation/native', () => {
10
- return {
11
- ...jest.requireActual('@react-navigation/native'),
12
- useNavigation: () => ({
13
- dispatch: mockDispatch,
14
- }),
15
- };
16
- });
7
+ import { useNavigation } from '@react-navigation/native';
17
8
 
18
9
  const wrapComponent = (initState = mockSCStore({})) => (
19
10
  <SCProvider initState={initState}>
@@ -24,6 +15,7 @@ const wrapComponent = (initState = mockSCStore({})) => (
24
15
  describe('Drawer', () => {
25
16
  let tree;
26
17
  it('test render with user', async () => {
18
+ const { dispatch } = useNavigation();
27
19
  await act(async () => {
28
20
  tree = await renderer.create(wrapComponent());
29
21
  });
@@ -43,7 +35,7 @@ describe('Drawer', () => {
43
35
  await act(async () => {
44
36
  await rows[2].props.onPress();
45
37
  });
46
- expect(mockDispatch).toBeCalledWith({
38
+ expect(dispatch).toBeCalledWith({
47
39
  payload: { index: 0, routes: [{ name: 'Main' }] },
48
40
  type: 'RESET',
49
41
  });
@@ -1,5 +1,4 @@
1
- import { IconOutline } from '@ant-design/icons-react-native';
2
- import { Icon } from '@ant-design/react-native';
1
+ import AntDesign from 'react-native-vector-icons/AntDesign';
3
2
  import React, { useCallback, useContext } from 'react';
4
3
  import {
5
4
  Image,
@@ -60,7 +59,7 @@ const DrawerContainer = () => {
60
59
  style={styles.avatar}
61
60
  accessibilityLabel={AccessibilityLabel.SIDE_MENU_AVATAR_USER}
62
61
  >
63
- <Icon name={'user'} size={27} />
62
+ <AntDesign name={'user'} size={27} />
64
63
  </View>
65
64
  )}
66
65
  <View style={styles.textContainer}>
@@ -117,7 +116,7 @@ export const Row = ({
117
116
  ]}
118
117
  accessibilityLabel={accessibilityLabel}
119
118
  >
120
- <IconOutline name={image} size={24} />
119
+ <AntDesign name={image} size={24} />
121
120
 
122
121
  <View style={styles.wrapText}>
123
122
  <Text style={[styles.text]}>{name}</Text>
@@ -1,6 +1,6 @@
1
1
  import React, { useCallback, useEffect } from 'react';
2
2
  import { StyleSheet, TouchableOpacity, View } from 'react-native';
3
- import { IconOutline } from '@ant-design/icons-react-native';
3
+ import AntDesign from 'react-native-vector-icons/AntDesign';
4
4
  import { useIsFocused, useNavigation } from '@react-navigation/native';
5
5
  import { useTranslations } from '../../hooks/Common/useTranslations';
6
6
  import { AlertAction, MenuActionList, Section } from '../../commons';
@@ -99,7 +99,7 @@ export const EmergencyContactsList = ({ route }) => {
99
99
  : 'disable'
100
100
  }
101
101
  leftIcon={
102
- <IconOutline name={'plus'} size={20} color={Colors.White} />
102
+ <AntDesign name={'plus'} size={20} color={Colors.White} />
103
103
  }
104
104
  text={t('add_new')}
105
105
  subtext={t('emergency_max_contacts', {
@@ -113,7 +113,7 @@ export const EmergencyContactsList = ({ route }) => {
113
113
  key={contact.id}
114
114
  index={index}
115
115
  leftIcon={
116
- <IconOutline name={'user'} size={20} color={Colors.White} />
116
+ <AntDesign name={'user'} size={20} color={Colors.White} />
117
117
  }
118
118
  text={contact.name}
119
119
  subtext={contact.phone_number}
@@ -122,11 +122,7 @@ export const EmergencyContactsList = ({ route }) => {
122
122
  style={styles.buttonRemove}
123
123
  onPress={onPressRemoveContact(contact)}
124
124
  >
125
- <IconOutline
126
- name={'minus'}
127
- size={20}
128
- color={Colors.Gray8}
129
- />
125
+ <AntDesign name={'minus'} size={20} color={Colors.Gray8} />
130
126
  </TouchableOpacity>
131
127
  }
132
128
  />
@@ -1,6 +1,6 @@
1
1
  import React, { useCallback, useEffect, useState } from 'react';
2
2
  import { StyleSheet, View } from 'react-native';
3
- import { IconOutline } from '@ant-design/icons-react-native';
3
+ import AntDesign from 'react-native-vector-icons/AntDesign';
4
4
  import { useNavigation } from '@react-navigation/native';
5
5
  import { useTranslations } from '../../hooks/Common/useTranslations';
6
6
  import { Section, ViewButtonBottom } from '../../commons';
@@ -81,7 +81,7 @@ export const EmergencyContactsSelectContacts = ({ route }) => {
81
81
  }
82
82
  index={index}
83
83
  leftIcon={
84
- <IconOutline name={'user'} size={20} color={Colors.White} />
84
+ <AntDesign name={'user'} size={20} color={Colors.White} />
85
85
  }
86
86
  text={contact.name}
87
87
  subtext={contact.phone_number}
@@ -91,7 +91,7 @@ export const EmergencyContactsSelectContacts = ({ route }) => {
91
91
  {currentContacts.some(
92
92
  (item) => item?.name === contact?.name
93
93
  ) && (
94
- <IconOutline
94
+ <AntDesign
95
95
  name={'check-circle'}
96
96
  size={20}
97
97
  color={Colors.Primary}
@@ -20,19 +20,8 @@ const wrapComponent = (route) => (
20
20
 
21
21
  jest.mock('react-native-toast-message');
22
22
 
23
- const mockedGoBack = jest.fn();
24
-
25
23
  const mock = new MockAdapter(api.axiosInstance);
26
24
 
27
- jest.mock('@react-navigation/native', () => {
28
- return {
29
- ...jest.requireActual('@react-navigation/native'),
30
- useNavigation: () => ({
31
- goBack: mockedGoBack,
32
- }),
33
- };
34
- });
35
-
36
25
  describe('test EmergencyContactAddNew', () => {
37
26
  let route;
38
27
  beforeEach(() => {
@@ -44,9 +33,7 @@ describe('test EmergencyContactAddNew', () => {
44
33
  },
45
34
  },
46
35
  };
47
- mockedGoBack.mockClear();
48
- });
49
- afterEach(() => {
36
+ global.mockedGoBack.mockClear();
50
37
  Toast.show.mockClear();
51
38
  });
52
39
 
@@ -105,7 +92,7 @@ describe('test EmergencyContactAddNew', () => {
105
92
  viewButtonBottom.props.onLeftClick();
106
93
  });
107
94
 
108
- expect(mockedGoBack).toHaveBeenCalledTimes(1);
95
+ expect(global.mockedGoBack).toHaveBeenCalledTimes(1);
109
96
  });
110
97
 
111
98
  it('onSave success', async () => {
@@ -129,7 +116,7 @@ describe('test EmergencyContactAddNew', () => {
129
116
  await viewButtonBottom.props.onRightClick();
130
117
  });
131
118
 
132
- expect(mockedGoBack).toHaveBeenCalledTimes(1);
119
+ expect(global.mockedGoBack).toHaveBeenCalledTimes(1);
133
120
  });
134
121
 
135
122
  it('onSave failed', async () => {
@@ -159,7 +146,7 @@ describe('test EmergencyContactAddNew', () => {
159
146
  text1: getTranslate('en', 'create_contact_failed'),
160
147
  visibilityTime: 1000,
161
148
  });
162
- expect(mockedGoBack).not.toHaveBeenCalled();
149
+ expect(global.mockedGoBack).not.toHaveBeenCalled();
163
150
  });
164
151
 
165
152
  it('invalid phone number', async () => {
@@ -13,6 +13,7 @@ import { SCProvider } from '../../../context';
13
13
  import { mockSCStore } from '../../../context/mockStore';
14
14
  import api from '../../../utils/Apis/axios';
15
15
  import { RowUser } from '../../../commons/RowUser';
16
+ import { useNavigation } from '@react-navigation/native';
16
17
 
17
18
  const mock = new MockAdapter(api.axiosInstance);
18
19
 
@@ -22,18 +23,6 @@ const wrapComponent = (route) => (
22
23
  </SCProvider>
23
24
  );
24
25
 
25
- const mockedNavigate = jest.fn();
26
-
27
- jest.mock('@react-navigation/native', () => {
28
- return {
29
- ...jest.requireActual('@react-navigation/native'),
30
- useNavigation: () => ({
31
- navigate: mockedNavigate,
32
- }),
33
- useIsFocused: () => true,
34
- };
35
- });
36
-
37
26
  describe('test EmergencyContactList', () => {
38
27
  let route;
39
28
 
@@ -44,7 +33,6 @@ describe('test EmergencyContactList', () => {
44
33
  group: 1,
45
34
  },
46
35
  };
47
- mockedNavigate.mockClear();
48
36
  mock.reset();
49
37
  });
50
38
  let tree;
@@ -137,6 +125,7 @@ describe('test EmergencyContactList', () => {
137
125
  });
138
126
 
139
127
  it('onItemAddClick select unit members', async () => {
128
+ const { navigate } = useNavigation();
140
129
  await act(async () => {
141
130
  tree = await create(wrapComponent(route));
142
131
  });
@@ -159,7 +148,7 @@ describe('test EmergencyContactList', () => {
159
148
  buttonsMenuActionList[1].props.onPress();
160
149
  });
161
150
 
162
- expect(mockedNavigate).toHaveBeenCalledWith(
151
+ expect(navigate).toHaveBeenCalledWith(
163
152
  Routes.EmergencyContactsSelectContacts,
164
153
  {
165
154
  unitId: route.params.unitId,
@@ -14,16 +14,6 @@ import { getTranslate } from '../../../utils/I18n';
14
14
 
15
15
  const mock = new MockAdapter(api.axiosInstance);
16
16
 
17
- const mockedNavigate = jest.fn();
18
- jest.mock('@react-navigation/native', () => {
19
- return {
20
- ...jest.requireActual('@react-navigation/native'),
21
- useNavigation: () => ({
22
- navigate: mockedNavigate,
23
- }),
24
- };
25
- });
26
-
27
17
  const wrapComponent = (route) => (
28
18
  <SCProvider initState={mockSCStore({})}>
29
19
  <EmergencyContactsSelectContacts route={route} />
@@ -1,6 +1,6 @@
1
1
  import React, { useCallback, useState } from 'react';
2
2
  import { View, TouchableOpacity } from 'react-native';
3
- import { IconFill } from '@ant-design/icons-react-native';
3
+ import AntDesign from 'react-native-vector-icons/AntDesign';
4
4
 
5
5
  import Text from '../../../commons/Text';
6
6
  import styles from '../styles/DropDownItem';
@@ -29,7 +29,7 @@ const DropDownItem = ({ label, data, onSelectItem, isOpen, onOpen, index }) => {
29
29
  <View style={styles.dropDownContainer}>
30
30
  <TouchableOpacity style={styles.dropDownStyle} onPress={handleOnOpen}>
31
31
  <Text>{selecteValue?.label}</Text>
32
- <IconFill name="caret-down" size={18} color={Colors.Gray8} />
32
+ <AntDesign name="caretdown" size={18} color={Colors.Gray8} />
33
33
  </TouchableOpacity>
34
34
 
35
35
  {isOpen && (
@@ -9,6 +9,7 @@ import EnterPassword from '../index';
9
9
  import { AccessibilityLabel } from '../../../configs/Constants';
10
10
  import { API } from '../../../configs';
11
11
  import api from '../../../utils/Apis/axios';
12
+ import { useNavigation } from '@react-navigation/native';
12
13
 
13
14
  const mock = new MockAdapter(api.axiosInstance);
14
15
 
@@ -18,19 +19,9 @@ const wrapComponent = (route) => (
18
19
  </SCProvider>
19
20
  );
20
21
 
21
- const mockNavigate = jest.fn();
22
- jest.mock('@react-navigation/native', () => {
23
- return {
24
- ...jest.requireActual('@react-navigation/native'),
25
- useNavigation: () => ({
26
- navigate: mockNavigate,
27
- }),
28
- useIsFocused: jest.fn(),
29
- };
30
- });
31
-
32
22
  describe('Test EnterPassword', () => {
33
23
  let tree;
24
+ const { navigate } = useNavigation();
34
25
  const buttonDone = (instance) => {
35
26
  return instance.findAll(
36
27
  (el) =>
@@ -40,10 +31,6 @@ describe('Test EnterPassword', () => {
40
31
  );
41
32
  };
42
33
 
43
- beforeEach(() => {
44
- mockNavigate.mockClear();
45
- });
46
-
47
34
  it('test render EnterPassword button done', async () => {
48
35
  const route = {
49
36
  params: { dataParams: {}, type: '' },
@@ -116,7 +103,7 @@ describe('Test EnterPassword', () => {
116
103
  await act(async () => {
117
104
  await button[0].props.onPress();
118
105
  });
119
- expect(mockNavigate).toBeCalled();
106
+ expect(navigate).toBeCalled();
120
107
  });
121
108
 
122
109
  it('test EnterPassword button failure', async () => {
@@ -138,6 +125,6 @@ describe('Test EnterPassword', () => {
138
125
  await act(async () => {
139
126
  await button[0].props.onPress();
140
127
  });
141
- expect(mockNavigate).not.toBeCalled();
128
+ expect(navigate).not.toBeCalled();
142
129
  });
143
130
  });
@@ -20,16 +20,6 @@ const wrapComponent = (route) => (
20
20
  </SCProvider>
21
21
  );
22
22
 
23
- const mockGoBack = jest.fn();
24
- jest.mock('@react-navigation/native', () => {
25
- return {
26
- ...jest.requireActual('@react-navigation/native'),
27
- useNavigation: () => ({
28
- goBack: mockGoBack,
29
- }),
30
- };
31
- });
32
-
33
23
  const mock = new MockAdapter(api.axiosInstance);
34
24
 
35
25
  const getButton = (instance, accessibilityLabel, many = false) => {
@@ -53,7 +43,6 @@ describe('Test GuestInfo', () => {
53
43
  let data;
54
44
 
55
45
  beforeEach(() => {
56
- mockGoBack.mockClear();
57
46
  route = {
58
47
  params: { id: 1 },
59
48
  };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { View, TouchableOpacity } from 'react-native';
3
- import { IconOutline } from '@ant-design/icons-react-native';
3
+ import AntDesign from 'react-native-vector-icons/AntDesign';
4
4
  import Text from '../../../commons/Text';
5
5
  import styles from '../styles/indexStyles';
6
6
 
@@ -19,7 +19,7 @@ const RowGuestInfo = ({
19
19
  <View style={styles.rowRight}>
20
20
  <Text type="Body">{textRight}</Text>
21
21
  {rightArrow && (
22
- <IconOutline name="right" size={20} style={styles.icon} />
22
+ <AntDesign name="right" size={20} style={styles.icon} />
23
23
  )}
24
24
  </View>
25
25
  </View>
@@ -7,7 +7,7 @@ import RowGuestInfo from './components/RowGuestInfo';
7
7
  import HeaderGuestInfo from './components/HeaderGuestInfo';
8
8
  import AccessScheduleSheet from './components/AccessScheduleSheet';
9
9
  import { CircleView } from '../../commons/CircleView';
10
- import { IconOutline } from '@ant-design/icons-react-native';
10
+ import AntDesign from 'react-native-vector-icons/AntDesign';
11
11
  import Text from '../../commons/Text';
12
12
  import { useBoolean } from '../../hooks/Common';
13
13
  import { axiosGet, axiosPut } from '../../utils/Apis/axios';
@@ -113,7 +113,7 @@ const GuestInfo = ({ route }) => {
113
113
  />
114
114
  ) : (
115
115
  <CircleView size={88} center style={styles.avatar}>
116
- <IconOutline name="user" size={44} color={Colors.Pink1} />
116
+ <AntDesign name="user" size={44} color={Colors.Pink1} />
117
117
  </CircleView>
118
118
  )}
119
119
  <Text type="H3" bold>
@@ -7,7 +7,7 @@ import React, {
7
7
  } from 'react';
8
8
  import { View, TouchableOpacity, FlatList, Image } from 'react-native';
9
9
  import { useNavigation } from '@react-navigation/native';
10
- import { Icon } from '@ant-design/react-native';
10
+ import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
11
11
  import moment from 'moment';
12
12
  import styles from './styles/detailStyles';
13
13
  import { HeaderCustom } from '../../commons/Header';
@@ -184,7 +184,11 @@ const HanetCameraDetail = ({ route }) => {
184
184
  onPress={handleShowMenuAction}
185
185
  ref={refMenuAction}
186
186
  >
187
- <Icon name={'more'} size={27} color={Colors.Black} />
187
+ <MaterialIcons
188
+ name={'more-vert'}
189
+ size={27}
190
+ color={Colors.Black}
191
+ />
188
192
  </TouchableOpacity>
189
193
  </View>
190
194
  );
@@ -1,8 +1,7 @@
1
1
  import React, { useCallback, useMemo } from 'react';
2
2
  import { View, TouchableOpacity, Image, FlatList } from 'react-native';
3
3
  import { useNavigation } from '@react-navigation/native';
4
- import { Icon } from '@ant-design/react-native';
5
- import { IconOutline } from '@ant-design/icons-react-native';
4
+ import AntDesign from 'react-native-vector-icons/AntDesign';
6
5
  import { HeaderCustom } from '../../commons/Header';
7
6
  import Text from '../../commons/Text';
8
7
  import RequestFaceIDPopup from './components/RequestFaceIDPopup';
@@ -75,7 +74,7 @@ const HanetManageAccess = ({ route }) => {
75
74
  {' '}
76
75
  {item.name}
77
76
  </Text>
78
- <IconOutline name="right" size={20} color={Colors.Gray6} />
77
+ <AntDesign name="right" size={20} color={Colors.Gray6} />
79
78
  </TouchableOpacity>
80
79
  );
81
80
  },
@@ -90,7 +89,7 @@ const HanetManageAccess = ({ route }) => {
90
89
  onPress={setShowAddMemberModal}
91
90
  accessibilityLabel={AccessibilityLabel.HANET_MANAGE_ACCESS_ADD_BUTTON}
92
91
  >
93
- <Icon name={'plus'} size={27} color={Colors.Black} />
92
+ <AntDesign name={'plus'} size={27} color={Colors.Black} />
94
93
  </TouchableOpacity>
95
94
  </View>
96
95
  ),
@@ -1,7 +1,7 @@
1
1
  import React, { useEffect, useState } from 'react';
2
2
  import { View, TouchableOpacity, Image } from 'react-native';
3
3
  import { useNavigation } from '@react-navigation/native';
4
- import { IconFill } from '@ant-design/icons-react-native';
4
+ import AntDesign from 'react-native-vector-icons/AntDesign';
5
5
 
6
6
  import { HeaderCustom } from '../../commons/Header';
7
7
  import { AlertAction, FullLoading } from '../../commons';
@@ -78,9 +78,9 @@ const HanetMemberInfo = ({ route }) => {
78
78
  }
79
79
  );
80
80
  if (success) {
81
- setMemberAvatar(data.avatar_uri);
81
+ setMemberAvatar(data?.avatar_uri);
82
82
  } else {
83
- setError(data.detail);
83
+ setError(data?.detail);
84
84
  }
85
85
  setLoading(false);
86
86
  };
@@ -173,7 +173,7 @@ const HanetMemberInfo = ({ route }) => {
173
173
  onPress={setShowSetFaceIDModal}
174
174
  style={[styles.row, !!error && { borderBottomColor: Colors.Red6 }]}
175
175
  >
176
- <IconFill name="camera" size={27} color={Colors.Primary} />
176
+ <AntDesign name="camera" size={27} color={Colors.Primary} />
177
177
  <Text
178
178
  type="Body"
179
179
  bold
@@ -17,25 +17,11 @@ const wrapComponent = (route) => (
17
17
  </SCProvider>
18
18
  );
19
19
 
20
- const mockedNavigate = jest.fn();
21
- const mockedGoBack = jest.fn();
22
- jest.mock('@react-navigation/native', () => {
23
- return {
24
- ...jest.requireActual('@react-navigation/native'),
25
- useNavigation: () => ({
26
- navigate: mockedNavigate,
27
- goBack: mockedGoBack,
28
- }),
29
- };
30
- });
31
-
32
20
  const mockSetAvatar = jest.fn();
33
21
  describe('Test HanetCaptureFaceID', () => {
34
22
  let tree, route;
35
23
 
36
24
  beforeEach(() => {
37
- mockedNavigate.mockClear();
38
- mockedGoBack.mockClear();
39
25
  mockSetAvatar.mockClear();
40
26
  route = {
41
27
  params: {
@@ -100,7 +86,7 @@ describe('Test HanetCaptureFaceID', () => {
100
86
  await touches[1].props.onPress();
101
87
  });
102
88
  expect(mockSetAvatar).toHaveBeenCalled();
103
- expect(mockedGoBack).toHaveBeenCalled();
89
+ expect(global.mockedGoBack).toHaveBeenCalled();
104
90
  });
105
91
 
106
92
  it('Test set face id for new member', async () => {
@@ -117,6 +103,6 @@ describe('Test HanetCaptureFaceID', () => {
117
103
  await act(async () => {
118
104
  await touches[1].props.onPress();
119
105
  });
120
- expect(mockedNavigate).toHaveBeenCalled();
106
+ expect(global.mockedNavigate).toHaveBeenCalled();
121
107
  });
122
108
  });
@@ -22,17 +22,6 @@ const wrapComponent = (route) => (
22
22
 
23
23
  const mock = new MockAdapter(api.axiosInstance);
24
24
 
25
- const mockNavigate = jest.fn();
26
- jest.mock('@react-navigation/native', () => {
27
- return {
28
- ...jest.requireActual('@react-navigation/native'),
29
- useRoute: jest.fn(),
30
- useNavigation: () => ({
31
- navigate: mockNavigate,
32
- }),
33
- };
34
- });
35
-
36
25
  describe('Test HanetCameraDetail', () => {
37
26
  Date.now = jest.fn(() => new Date('2021-09-09T10:00:00.000Z'));
38
27
  let tree, route, responseDisplay, responseCheckin;
@@ -114,7 +103,7 @@ describe('Test HanetCameraDetail', () => {
114
103
  expect(textCountStranger.props.children).toBe(1);
115
104
  const MenuActionMores = instance.findByType(MenuActionMore);
116
105
  await MenuActionMores.props.onItemClick({ data: 'test' });
117
- expect(mockNavigate).toBeCalled();
106
+ expect(global.mockedNavigate).toBeCalled();
118
107
  });
119
108
 
120
109
  it('Test change date', async () => {