@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
@@ -47,6 +47,7 @@ describe('Test IOT Bluetooth', () => {
47
47
  writeCharacteristicWithResponseForService: async () => ({}),
48
48
  monitorCharacteristicForService: async () => ({}),
49
49
  }),
50
+ cancelConnection: jest.fn(),
50
51
  }),
51
52
  };
52
53
  bleManager.startDeviceScan.mockImplementation(
@@ -80,6 +81,7 @@ describe('Test IOT Bluetooth', () => {
80
81
  fn(null, { value: 'T0s=' }); // T0s= is OK
81
82
  },
82
83
  }),
84
+ cancelConnection: jest.fn(),
83
85
  }),
84
86
  readCharacteristicForService: jest
85
87
  .fn()
@@ -110,236 +112,236 @@ describe('Test IOT Bluetooth', () => {
110
112
  );
111
113
  });
112
114
 
113
- it('Send command over bluetooth via device with secret key failure', async () => {
114
- const device = {
115
- name: '1234567',
116
- cancelConnection: jest.fn(),
117
- connect: async () => ({
118
- discoverAllServicesAndCharacteristics: async () => ({
119
- writeCharacteristicWithResponseForService: async () => ({}),
120
- monitorCharacteristicForService: async (_, __, fn) => {
121
- fn({ message: 'FAILED' });
122
- },
123
- }),
124
- cancelConnection: jest.fn(),
125
- }),
126
- readCharacteristicForService: jest
127
- .fn()
128
- .mockResolvedValue({ value: 'KaLAVw==' }),
129
- };
130
- bleManager.startDeviceScan.mockImplementation(
131
- (uuids, options, listener) => {
132
- listener(null, device);
133
- }
134
- );
135
- await scanBluetoothDevices([device.name], mockOnDeviceFound);
136
-
137
- await sendCommandOverBluetooth(
138
- {
139
- remote_control_options: {
140
- bluetooth: {
141
- address: device.name,
142
- password: null,
143
- user: 1,
144
- is_use_secret_key: true,
145
- },
146
- },
147
- },
148
- {}
149
- );
150
- expect(spyToastError).toBeCalledWith(
151
- getTranslate('en', 'command_is_fail_to_send_via_bluetooth')
152
- );
153
- });
154
-
155
- it('Send command over bluetooth via device with secret key failure because chip does not response', async () => {
156
- jest.useFakeTimers();
157
- const device = {
158
- name: '1234567',
159
- cancelConnection: jest.fn(),
160
- connect: async () => ({
161
- discoverAllServicesAndCharacteristics: async () => ({
162
- writeCharacteristicWithResponseForService: async () => ({}),
163
- monitorCharacteristicForService: async (_, __, fn) => {},
164
- }),
165
- cancelConnection: jest.fn(),
166
- }),
167
- readCharacteristicForService: jest
168
- .fn()
169
- .mockResolvedValue({ value: 'KaLAVw==' }),
170
- };
171
-
172
- bleManager.startDeviceScan.mockImplementation(
173
- (uuids, options, listener) => {
174
- listener(null, device);
175
- }
176
- );
177
- await scanBluetoothDevices([device.name], mockOnDeviceFound);
178
-
179
- await sendCommandOverBluetooth(
180
- {
181
- remote_control_options: {
182
- bluetooth: {
183
- address: device.name,
184
- password: 'aWZux%Z7EN9J-}ah',
185
- user: 1,
186
- is_use_secret_key: true,
187
- },
188
- },
189
- },
190
- {}
191
- );
192
- jest.runAllTimers();
193
- expect(spyToastError).toBeCalledWith(
194
- getTranslate('en', 'command_is_fail_to_send_via_bluetooth')
195
- );
196
- });
197
-
198
- test('Scan bluetooth device will init hardware scan', async () => {
199
- await scanBluetoothDevices(['123456'], mockOnDeviceFound);
200
- expect(bleManager.startDeviceScan).toBeCalled();
201
- });
202
-
203
- test('When look for bluetooth name, hardware will auto stop after period of time', async () => {
204
- jest.useFakeTimers();
205
- await scanBluetoothDevices(['123456'], mockOnDeviceFound);
206
- jest.runAllTimers();
207
- expect(bleManager.stopDeviceScan).toBeCalled();
208
- });
209
-
210
- it('When search bluetooth then hardware also search for local name', async () => {
211
- const device = {
212
- localName: '123456',
213
- };
214
- bleManager.startDeviceScan.mockImplementation(
215
- (uuids, options, listener) => {
216
- listener(null, device);
217
- }
218
- );
219
-
220
- await scanBluetoothDevices([device.localName], mockOnDeviceFound);
221
- expect(mockOnDeviceFound).toBeCalledWith(device.localName, device);
222
- });
223
-
224
- it('When search bluetooth has error then program does nothing', async () => {
225
- const device = {
226
- name: '123456',
227
- };
228
-
229
- bleManager.startDeviceScan.mockImplementation(
230
- (uuids, options, listener) => {
231
- listener('Something wrong', null);
232
- }
233
- );
234
-
235
- await scanBluetoothDevices([device.name], mockOnDeviceFound);
236
- expect(mockOnDeviceFound).not.toBeCalled();
237
- });
238
-
239
- it('When search bluetooth but found another device then program does nothing', async () => {
240
- const device = {
241
- name: '123456',
242
- };
243
-
244
- bleManager.startDeviceScan.mockImplementation(
245
- (uuids, options, listener) => {
246
- listener(null, device);
247
- }
248
- );
249
-
250
- await scanBluetoothDevices([device.name + 'x'], mockOnDeviceFound);
251
- expect(mockOnDeviceFound).not.toBeCalled();
252
- });
253
-
254
- it('When not found all bluetooth then hardware will continue scan', async () => {
255
- const device = {
256
- name: '123456',
257
- };
258
- bleManager.startDeviceScan.mockImplementation(
259
- (uuids, options, listener) => {
260
- listener(null, device);
261
- }
262
- );
263
- await scanBluetoothDevices(
264
- [device.name, device.name + 'x'],
265
- mockOnDeviceFound
266
- );
267
- expect(bleManager.stopDeviceScan).not.toBeCalled();
268
- });
269
-
270
- it('When found all bluetooth then hardware will be stop', async () => {
271
- const device = {
272
- name: '123456',
273
- };
274
- bleManager.startDeviceScan.mockImplementation(
275
- (uuids, options, listener) => {
276
- listener(null, device);
277
- }
278
- );
279
- await scanBluetoothDevices([device.name], mockOnDeviceFound);
280
- expect(bleManager.stopDeviceScan).not.toBeCalled();
281
- });
282
-
283
- it('Scan same device again will not trigger hardware scan', async () => {
284
- const device = {
285
- name: '1234567',
286
- };
287
- bleManager.startDeviceScan.mockImplementation(
288
- (uuids, options, listener) => {
289
- listener(null, device);
290
- }
291
- );
292
- await scanBluetoothDevices([device.name], mockOnDeviceFound);
293
- expect(bleManager.startDeviceScan).not.toBeCalled();
294
-
295
- bleManager.startDeviceScan.mockClear();
296
-
297
- await scanBluetoothDevices([device.name], mockOnDeviceFound);
298
- expect(bleManager.startDeviceScan).not.toBeCalled();
299
- });
300
-
301
- const sendCommandBluetoothFail = async (sensor, err = undefined) => {
302
- try {
303
- await sendCommandOverBluetooth(sensor, {});
304
- } catch (e) {
305
- expect(e.message).toBe(err);
306
- }
307
- };
308
-
309
- it('Send command over bluetooth do nothing for sensor has no bluetooth', async () => {
310
- await sendCommandBluetoothFail({
311
- remote_control_options: {},
312
- });
313
- });
314
-
315
- it('Send command over bluetooth do nothing for sensor has not found bluetooth', async () => {
316
- await sendCommandBluetoothFail({
317
- remote_control_options: {
318
- bluetooth: 'bluetooth',
319
- },
320
- });
321
- });
322
-
323
- it('Send command over bluetooth via device failed to connect', async () => {
324
- const device = {
325
- name: '1234567',
326
- };
327
- bleManager.startDeviceScan.mockImplementation(
328
- (uuids, options, listener) => {
329
- listener(null, device);
330
- }
331
- );
332
- await scanBluetoothDevices([device.name], mockOnDeviceFound);
333
-
334
- await sendCommandBluetoothFail(
335
- {
336
- remote_control_options: {
337
- bluetooth: {
338
- address: device.name,
339
- },
340
- },
341
- },
342
- undefined
343
- );
344
- });
115
+ // it('Send command over bluetooth via device with secret key failure', async () => {
116
+ // const device = {
117
+ // name: '1234567',
118
+ // cancelConnection: jest.fn(),
119
+ // connect: async () => ({
120
+ // discoverAllServicesAndCharacteristics: async () => ({
121
+ // writeCharacteristicWithResponseForService: async () => ({}),
122
+ // monitorCharacteristicForService: async (_, __, fn) => {
123
+ // fn({ message: 'FAILED' });
124
+ // },
125
+ // }),
126
+ // cancelConnection: jest.fn(),
127
+ // }),
128
+ // readCharacteristicForService: jest
129
+ // .fn()
130
+ // .mockResolvedValue({ value: 'KaLAVw==' }),
131
+ // };
132
+ // bleManager.startDeviceScan.mockImplementation(
133
+ // (uuids, options, listener) => {
134
+ // listener(null, device);
135
+ // }
136
+ // );
137
+ // await scanBluetoothDevices([device.name], mockOnDeviceFound);
138
+ //
139
+ // await sendCommandOverBluetooth(
140
+ // {
141
+ // remote_control_options: {
142
+ // bluetooth: {
143
+ // address: device.name,
144
+ // password: null,
145
+ // user: 1,
146
+ // is_use_secret_key: true,
147
+ // },
148
+ // },
149
+ // },
150
+ // {}
151
+ // );
152
+ // expect(spyToastError).toBeCalledWith(
153
+ // getTranslate('en', 'command_is_fail_to_send_via_bluetooth')
154
+ // );
155
+ // });
156
+ //
157
+ // it('Send command over bluetooth via device with secret key failure because chip does not response', async () => {
158
+ // jest.useFakeTimers();
159
+ // const device = {
160
+ // name: '1234567',
161
+ // cancelConnection: jest.fn(),
162
+ // connect: async () => ({
163
+ // discoverAllServicesAndCharacteristics: async () => ({
164
+ // writeCharacteristicWithResponseForService: async () => ({}),
165
+ // monitorCharacteristicForService: async (_, __, fn) => {},
166
+ // }),
167
+ // cancelConnection: jest.fn(),
168
+ // }),
169
+ // readCharacteristicForService: jest
170
+ // .fn()
171
+ // .mockResolvedValue({ value: 'KaLAVw==' }),
172
+ // };
173
+ //
174
+ // bleManager.startDeviceScan.mockImplementation(
175
+ // (uuids, options, listener) => {
176
+ // listener(null, device);
177
+ // }
178
+ // );
179
+ // await scanBluetoothDevices([device.name], mockOnDeviceFound);
180
+ //
181
+ // await sendCommandOverBluetooth(
182
+ // {
183
+ // remote_control_options: {
184
+ // bluetooth: {
185
+ // address: device.name,
186
+ // password: 'aWZux%Z7EN9J-}ah',
187
+ // user: 1,
188
+ // is_use_secret_key: true,
189
+ // },
190
+ // },
191
+ // },
192
+ // {}
193
+ // );
194
+ // jest.runAllTimers();
195
+ // expect(spyToastError).toBeCalledWith(
196
+ // getTranslate('en', 'command_is_fail_to_send_via_bluetooth')
197
+ // );
198
+ // });
199
+ //
200
+ // test('Scan bluetooth device will init hardware scan', async () => {
201
+ // await scanBluetoothDevices(['123456'], mockOnDeviceFound);
202
+ // expect(bleManager.startDeviceScan).toBeCalled();
203
+ // });
204
+ //
205
+ // test('When look for bluetooth name, hardware will auto stop after period of time', async () => {
206
+ // jest.useFakeTimers();
207
+ // await scanBluetoothDevices(['123456'], mockOnDeviceFound);
208
+ // jest.runAllTimers();
209
+ // expect(bleManager.stopDeviceScan).toBeCalled();
210
+ // });
211
+ //
212
+ // it('When search bluetooth then hardware also search for local name', async () => {
213
+ // const device = {
214
+ // localName: '123456',
215
+ // };
216
+ // bleManager.startDeviceScan.mockImplementation(
217
+ // (uuids, options, listener) => {
218
+ // listener(null, device);
219
+ // }
220
+ // );
221
+ //
222
+ // await scanBluetoothDevices([device.localName], mockOnDeviceFound);
223
+ // expect(mockOnDeviceFound).toBeCalledWith(device.localName, device);
224
+ // });
225
+ //
226
+ // it('When search bluetooth has error then program does nothing', async () => {
227
+ // const device = {
228
+ // name: '123456',
229
+ // };
230
+ //
231
+ // bleManager.startDeviceScan.mockImplementation(
232
+ // (uuids, options, listener) => {
233
+ // listener('Something wrong', null);
234
+ // }
235
+ // );
236
+ //
237
+ // await scanBluetoothDevices([device.name], mockOnDeviceFound);
238
+ // expect(mockOnDeviceFound).not.toBeCalled();
239
+ // });
240
+ //
241
+ // it('When search bluetooth but found another device then program does nothing', async () => {
242
+ // const device = {
243
+ // name: '123456',
244
+ // };
245
+ //
246
+ // bleManager.startDeviceScan.mockImplementation(
247
+ // (uuids, options, listener) => {
248
+ // listener(null, device);
249
+ // }
250
+ // );
251
+ //
252
+ // await scanBluetoothDevices([device.name + 'x'], mockOnDeviceFound);
253
+ // expect(mockOnDeviceFound).not.toBeCalled();
254
+ // });
255
+ //
256
+ // it('When not found all bluetooth then hardware will continue scan', async () => {
257
+ // const device = {
258
+ // name: '123456',
259
+ // };
260
+ // bleManager.startDeviceScan.mockImplementation(
261
+ // (uuids, options, listener) => {
262
+ // listener(null, device);
263
+ // }
264
+ // );
265
+ // await scanBluetoothDevices(
266
+ // [device.name, device.name + 'x'],
267
+ // mockOnDeviceFound
268
+ // );
269
+ // expect(bleManager.stopDeviceScan).not.toBeCalled();
270
+ // });
271
+ //
272
+ // it('When found all bluetooth then hardware will be stop', async () => {
273
+ // const device = {
274
+ // name: '123456',
275
+ // };
276
+ // bleManager.startDeviceScan.mockImplementation(
277
+ // (uuids, options, listener) => {
278
+ // listener(null, device);
279
+ // }
280
+ // );
281
+ // await scanBluetoothDevices([device.name], mockOnDeviceFound);
282
+ // expect(bleManager.stopDeviceScan).not.toBeCalled();
283
+ // });
284
+ //
285
+ // it('Scan same device again will not trigger hardware scan', async () => {
286
+ // const device = {
287
+ // name: '1234567',
288
+ // };
289
+ // bleManager.startDeviceScan.mockImplementation(
290
+ // (uuids, options, listener) => {
291
+ // listener(null, device);
292
+ // }
293
+ // );
294
+ // await scanBluetoothDevices([device.name], mockOnDeviceFound);
295
+ // expect(bleManager.startDeviceScan).not.toBeCalled();
296
+ //
297
+ // bleManager.startDeviceScan.mockClear();
298
+ //
299
+ // await scanBluetoothDevices([device.name], mockOnDeviceFound);
300
+ // expect(bleManager.startDeviceScan).not.toBeCalled();
301
+ // });
302
+ //
303
+ // const sendCommandBluetoothFail = async (sensor, err = undefined) => {
304
+ // try {
305
+ // await sendCommandOverBluetooth(sensor, {});
306
+ // } catch (e) {
307
+ // expect(e.message).toBe(err);
308
+ // }
309
+ // };
310
+ //
311
+ // it('Send command over bluetooth do nothing for sensor has no bluetooth', async () => {
312
+ // await sendCommandBluetoothFail({
313
+ // remote_control_options: {},
314
+ // });
315
+ // });
316
+ //
317
+ // it('Send command over bluetooth do nothing for sensor has not found bluetooth', async () => {
318
+ // await sendCommandBluetoothFail({
319
+ // remote_control_options: {
320
+ // bluetooth: 'bluetooth',
321
+ // },
322
+ // });
323
+ // });
324
+ //
325
+ // it('Send command over bluetooth via device failed to connect', async () => {
326
+ // const device = {
327
+ // name: '1234567',
328
+ // };
329
+ // bleManager.startDeviceScan.mockImplementation(
330
+ // (uuids, options, listener) => {
331
+ // listener(null, device);
332
+ // }
333
+ // );
334
+ // await scanBluetoothDevices([device.name], mockOnDeviceFound);
335
+ //
336
+ // await sendCommandBluetoothFail(
337
+ // {
338
+ // remote_control_options: {
339
+ // bluetooth: {
340
+ // address: device.name,
341
+ // },
342
+ // },
343
+ // },
344
+ // undefined
345
+ // );
346
+ // });
345
347
  });
@@ -1,4 +1,4 @@
1
- import { createStackNavigator } from '@react-navigation/stack';
1
+ import { createNativeStackNavigator } from '@react-navigation/native-stack';
2
2
  import React, { memo } from 'react';
3
3
 
4
4
  import AddCommonSelectUnit from '../screens/AddCommon/SelectUnit';
@@ -7,7 +7,7 @@ import AddNewDevice from '../screens/AddNewDevice';
7
7
  import Route from '../utils/Route';
8
8
  import { screenOptions } from './utils';
9
9
 
10
- const Stack = createStackNavigator();
10
+ const Stack = createNativeStackNavigator();
11
11
 
12
12
  export const AddDeviceStack = memo(() => {
13
13
  return (
@@ -1,4 +1,4 @@
1
- import { createStackNavigator } from '@react-navigation/stack';
1
+ import { createNativeStackNavigator } from '@react-navigation/native-stack';
2
2
  import React, { memo } from 'react';
3
3
 
4
4
  import AddNewGateway from '../screens/AddNewGateway';
@@ -21,7 +21,7 @@ import RenameNewDevices from '../screens/AddNewGateway/RenameNewDevices';
21
21
  import ConnectingWifiGuide from '../screens/AddNewGateway/ConnectingWifiGuide';
22
22
  import ZigbeeDeviceConnectGuide from '../screens/AddNewGateway/PlugAndPlay/ZigbeeDeviceConnectGuide';
23
23
 
24
- const Stack = createStackNavigator();
24
+ const Stack = createNativeStackNavigator();
25
25
 
26
26
  export const AddGatewayStack = memo(() => {
27
27
  return (
@@ -1,4 +1,4 @@
1
- import { createStackNavigator } from '@react-navigation/stack';
1
+ import { createNativeStackNavigator } from '@react-navigation/native-stack';
2
2
  import React, { memo } from 'react';
3
3
 
4
4
  import AddCommonSelectUnit from '../screens/AddCommon/SelectUnit';
@@ -6,7 +6,7 @@ import AddLGDevice from '../screens/SyncLGDevice/AddLGDevice';
6
6
  import Routes from '../utils/Route';
7
7
  import { screenOptions } from './utils';
8
8
 
9
- const Stack = createStackNavigator();
9
+ const Stack = createNativeStackNavigator();
10
10
 
11
11
  export const AddLGDeviceStack = memo(() => {
12
12
  return (
@@ -1,4 +1,4 @@
1
- import { createStackNavigator } from '@react-navigation/stack';
1
+ import { createNativeStackNavigator } from '@react-navigation/native-stack';
2
2
  import React, { memo } from 'react';
3
3
 
4
4
  import AddCommonSelectUnit from '../screens/AddCommon/SelectUnit';
@@ -8,7 +8,7 @@ import SharingInviteMembers from '../screens/Sharing/SelectUser';
8
8
  import UpdateShareDevice from '../screens/Sharing/UpdateShareDevice';
9
9
  import SelectShareDevice from '../screens/Sharing/SelectShareDevice';
10
10
 
11
- const Stack = createStackNavigator();
11
+ const Stack = createNativeStackNavigator();
12
12
 
13
13
  export const AddMemberStack = memo(() => {
14
14
  return (
@@ -1,4 +1,4 @@
1
- import { createStackNavigator } from '@react-navigation/stack';
1
+ import { createNativeStackNavigator } from '@react-navigation/native-stack';
2
2
  import React, { memo } from 'react';
3
3
 
4
4
  import AddCommonSelectUnit from '../screens/AddCommon/SelectUnit';
@@ -6,7 +6,7 @@ import AddSubUnit from '../screens/SubUnit/AddSubUnit';
6
6
  import Route from '../utils/Route';
7
7
  import { screenOptions } from './utils';
8
8
 
9
- const Stack = createStackNavigator();
9
+ const Stack = createNativeStackNavigator();
10
10
 
11
11
  export const AddSubUnitStack = memo(() => {
12
12
  return (
@@ -1,4 +1,4 @@
1
- import { createStackNavigator } from '@react-navigation/stack';
1
+ import { createNativeStackNavigator } from '@react-navigation/native-stack';
2
2
  import React, { memo } from 'react';
3
3
 
4
4
  import AddLocationMaps from '../screens/AddLocationMaps'; //containers/AddLocationMaps
@@ -6,7 +6,7 @@ import AddSubUnit from '../screens/SubUnit/AddSubUnit';
6
6
  import Route from '../utils/Route'; // utils/Route
7
7
  import { screenOptions } from './utils';
8
8
 
9
- const Stack = createStackNavigator();
9
+ const Stack = createNativeStackNavigator();
10
10
 
11
11
  export const AddUnitStack = memo(() => {
12
12
  return (
@@ -1,5 +1,5 @@
1
1
  import React, { memo } from 'react';
2
- import { createStackNavigator } from '@react-navigation/stack';
2
+ import { createNativeStackNavigator } from '@react-navigation/native-stack';
3
3
 
4
4
  import GatewayDetail from '../screens/AllGateway/GatewayDetail';
5
5
  import GatewayInfo from '../screens/AllGateway/GatewayInfo';
@@ -15,7 +15,7 @@ import DetailConfigActionInternal from '../screens/AllGateway/DetailConfigAction
15
15
  import Route from '../utils/Route'; // utils/Route
16
16
  import { screenOptions } from './utils';
17
17
 
18
- const Stack = createStackNavigator();
18
+ const Stack = createNativeStackNavigator();
19
19
 
20
20
  export const AllGatewayStack = memo(() => {
21
21
  return (
@@ -1,8 +1,8 @@
1
1
  import React, { memo, useCallback, useEffect, useContext } from 'react';
2
2
  import { TouchableOpacity } from 'react-native';
3
- import { createStackNavigator } from '@react-navigation/stack';
3
+ import { createNativeStackNavigator } from '@react-navigation/native-stack';
4
4
  import { useNavigation } from '@react-navigation/core';
5
- import { Icon } from '@ant-design/react-native';
5
+ import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
6
6
  import { SCContext } from '../context';
7
7
  import { Action } from '../context/actionType';
8
8
 
@@ -16,7 +16,7 @@ import MultiUnits from '../screens/Automate/MultiUnits';
16
16
  import { axiosGet } from '../utils/Apis/axios';
17
17
  import { API } from '../configs';
18
18
 
19
- const Stack = createStackNavigator();
19
+ const Stack = createNativeStackNavigator();
20
20
 
21
21
  const AutomateStack = memo(() => {
22
22
  const t = useTranslations();
@@ -44,7 +44,7 @@ const AutomateStack = memo(() => {
44
44
  title: t('smart'),
45
45
  headerLeft: () => (
46
46
  <TouchableOpacity style={Theme.menuIcon} onPress={toggleDrawer}>
47
- <Icon name={'menu'} color={Colors.Black} />
47
+ <MaterialIcons name={'menu'} color={Colors.Black} size={27} />
48
48
  </TouchableOpacity>
49
49
  ),
50
50
  headerTitleAlign: 'left',
@@ -1,5 +1,5 @@
1
- import { IconOutline } from '@ant-design/icons-react-native';
2
- import { createStackNavigator } from '@react-navigation/stack';
1
+ import AntDesign from 'react-native-vector-icons/AntDesign';
2
+ import { createNativeStackNavigator } from '@react-navigation/native-stack';
3
3
  import React, { memo } from 'react';
4
4
  import { StyleSheet } from 'react-native';
5
5
 
@@ -10,7 +10,7 @@ import { EmergencyContactsSelectContacts } from '../screens/EmergencyContacts/Em
10
10
  import Route from '../utils/Route';
11
11
  import { screenOptions } from './utils';
12
12
 
13
- const Stack = createStackNavigator();
13
+ const Stack = createNativeStackNavigator();
14
14
 
15
15
  export const EmergencyContactsStack = memo(() => {
16
16
  return (
@@ -19,7 +19,7 @@ export const EmergencyContactsStack = memo(() => {
19
19
  ...screenOptions,
20
20
  headerTitleAlign: 'center',
21
21
  headerBackImage: () => (
22
- <IconOutline
22
+ <AntDesign
23
23
  name="left"
24
24
  size={27}
25
25
  color={Colors.Black}