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

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 (338) hide show
  1. package/README.md +3 -3
  2. package/android/build.gradle +7 -10
  3. package/assets/images/Automation-fill.svg +85 -0
  4. package/assets/images/Scenario-filled.svg +22 -0
  5. package/assets/images/schedule-fill.svg +48 -0
  6. package/package.json +53 -70
  7. package/src/commons/Action/ItemQuickAction.js +1 -1
  8. package/src/commons/Action/__test__/ItemQuickAction.test.js +2 -2
  9. package/src/commons/ActionGroup/NumberUpDownActionTemplate.js +3 -3
  10. package/src/commons/ActionGroup/OnOffSmartLock/AutoLock/ButtonWrapper.js +3 -3
  11. package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/__test__/ItemPasscode.test.js +2 -2
  12. package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/__test__/index.test.js +3 -3
  13. package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/index.js +3 -3
  14. package/src/commons/ActionGroup/OnOffSmartLock/SetupGeneratePasscode/ButtonWrapper.js +2 -2
  15. package/src/commons/ActionGroup/OnOffSmartLock/SetupGeneratePasscode/__test__/index.test.js +0 -15
  16. package/src/commons/ActionGroup/OnOffTemplate/OnOffSimpleTemplate.js +2 -2
  17. package/src/commons/ActionGroup/OptionsDropdownActionTemplate.js +2 -2
  18. package/src/commons/ActionGroup/SmartTiviActionTemplate/SmartTiviActionTemplate.js +2 -2
  19. package/src/commons/ActionGroup/SmartTiviActionTemplate/component/CircleButton.js +5 -5
  20. package/src/commons/ActionGroup/SmartTiviActionTemplate/component/ControlPlay.js +5 -5
  21. package/src/commons/ActionGroup/TerminalBoxTemplate.js +2 -2
  22. package/src/commons/ActionGroup/TextBoxTemplate.js +2 -2
  23. package/src/commons/ActionGroup/ThreeButtonTemplate/__test__/ThreeButtonTemplate.test.js +4 -4
  24. package/src/commons/ActionGroup/TimerActionTemplate.js +4 -5
  25. package/src/commons/ActionGroup/TwoButtonTemplate/index.js +2 -2
  26. package/src/commons/ActionGroup/__test__/ColorPickerTemplate.test.js +4 -9
  27. package/src/commons/ActionGroup/__test__/NumberUpDownTemplate.test.js +2 -9
  28. package/src/commons/ActionGroup/__test__/OnOffButtonTemplate.test.js +4 -11
  29. package/src/commons/ActionGroup/__test__/OnOffSmartLock.test.js +2 -9
  30. package/src/commons/ActionGroup/__test__/OnOffTemplate.test.js +4 -18
  31. package/src/commons/ActionGroup/__test__/OneBigButtonTemplate.test.js +2 -2
  32. package/src/commons/ActionGroup/__test__/OptionsDropdownTemplate.test.js +1 -8
  33. package/src/commons/ActionGroup/__test__/StatesGridActionTemplate.test.js +0 -7
  34. package/src/commons/ActionGroup/__test__/SwitchButtonTemplate.test.js +4 -15
  35. package/src/commons/ActionGroup/__test__/TerminalBoxTemplate.test.js +0 -7
  36. package/src/commons/ActionGroup/__test__/TextBoxTemplate.test.js +1 -8
  37. package/src/commons/ActionGroup/__test__/TimerActionTemplate.test.js +8 -15
  38. package/src/commons/ActionGroup/__test__/TimerActionTemplateWithutConfigValue.test.js +2 -10
  39. package/src/commons/ActionGroup/__test__/TwoButtonTemplate.test.js +3 -20
  40. package/src/commons/ActionGroup/__test__/index.test.js +15 -23
  41. package/src/commons/ActionTemplate/__test__/index.test.js +2 -0
  42. package/src/commons/ActionTemplate/__test__/utils.js +21 -0
  43. package/src/commons/ActionTemplate/index.js +1 -2
  44. package/src/commons/BackDefault/index.js +2 -2
  45. package/src/commons/ButtonPopup/index.js +2 -2
  46. package/src/commons/Calendar/__test__/Calendar.test.js +0 -7
  47. package/src/commons/CircleButton/__test__/CircleButton.test.js +2 -2
  48. package/src/commons/Dashboard/MyPinnedSharedUnit/__test__/MyPinnedSharedUnit.test.js +11 -25
  49. package/src/commons/Dashboard/MyUnit/__test__/MyUnit.test.js +27 -20
  50. package/src/commons/Dashboard/MyUnit/index.js +0 -1
  51. package/src/commons/DateTimeRangeChange/DateTimeButton.js +2 -2
  52. package/src/commons/DateTimeRangeChange/__test__/DateTimeButton.test.js +4 -4
  53. package/src/commons/DateTimeRangeChange/index.js +3 -3
  54. package/src/commons/Device/ConnectedViewHeader.js +2 -2
  55. package/src/commons/Device/DisconnectedView.js +2 -2
  56. package/src/commons/Device/Emergency/EmergencyDetail.js +3 -3
  57. package/src/commons/Device/Emergency/__test__/EmergencyDetail.test.js +2 -2
  58. package/src/commons/Device/FlatListItems.js +3 -3
  59. package/src/commons/Device/Hanet/ItemHanetDevice.js +3 -3
  60. package/src/commons/Device/Hanet/ItemHanetDevice.test.js +3 -11
  61. package/src/commons/Device/ItemAddNew/index.js +2 -2
  62. package/src/commons/Device/ItemDevice.js +5 -21
  63. package/src/commons/Device/SonosSpeaker/index.js +3 -3
  64. package/src/commons/Device/WaterPurifierStatus/AlertStatusMachine.js +2 -2
  65. package/src/commons/Device/WaterQualitySensor/QualityIndicatorsItem.js +2 -6
  66. package/src/commons/DisplayChecking/index.js +2 -2
  67. package/src/commons/EmergencyButton/AlertSendConfirm.js +2 -2
  68. package/src/commons/EmergencyButton/AlertSent.js +6 -2
  69. package/src/commons/FieldTemplate/ChooseUserField/index.js +2 -2
  70. package/src/commons/FieldTemplate/PasscodeField/__test__/index.test.js +5 -5
  71. package/src/commons/FieldTemplate/ScheduleField/__test__/index.test.js +9 -9
  72. package/src/commons/Form/CurrencyInput.js +1 -15
  73. package/src/commons/GroupCheckBox/__test__/GroupCheckBox.test.js +1 -22
  74. package/src/commons/Header/HeaderCustom.js +8 -3
  75. package/src/commons/HeaderAni/index.js +2 -2
  76. package/src/commons/IconComponent/index.js +3 -3
  77. package/src/commons/MediaPlayerDetail/MediaPlayerFull.js +1 -1
  78. package/src/commons/MediaPlayerDetail/__test__/MediaPlayerFull.test.js +12 -48
  79. package/src/commons/MenuActionAddnew/__test__/MenuActionAddNew.test.js +1 -1
  80. package/src/commons/MenuActionList/__test__/MenuActionList.test.js +1 -0
  81. package/src/commons/MenuActionMore/MenuActionMoreStyles.js +2 -1
  82. package/src/commons/MenuActionMore/index.js +1 -1
  83. package/src/commons/NavBar/NavBarStyles.js +1 -1
  84. package/src/commons/NavBar/index.js +2 -2
  85. package/src/commons/OneTapTemplate/NumberUpDownActionTemplate.js +3 -3
  86. package/src/commons/PreventAccess/__test__/PreventAccess.test.js +1 -13
  87. package/src/commons/Processing/__test__/Connecting.test.js +3 -14
  88. package/src/commons/SearchLocation/index.js +3 -3
  89. package/src/commons/SelectActionCard/index.js +2 -2
  90. package/src/commons/SelectSubUnit/__test__/SelectSubUnit.test.js +1 -18
  91. package/src/commons/SelectSubUnit/index.js +2 -2
  92. package/src/commons/SelectUnit/__test__/SelectUnit.test.js +1 -13
  93. package/src/commons/Sharing/BtnRemoveMember.js +2 -2
  94. package/src/commons/Sharing/StationDevicePermissions.js +2 -2
  95. package/src/commons/Sharing/WrapHeaderScrollable.js +1 -1
  96. package/src/commons/Sharing/__test__/ButtonRemoveMember.test.js +2 -2
  97. package/src/commons/Sharing/__test__/DevicePermissionsCheckbox.test.js +1 -1
  98. package/src/commons/SubUnit/DeviceTemplate/ConfigAndEvaluation/ConfigAndEvaluation.js +2 -2
  99. package/src/commons/SubUnit/DeviceTemplate/ConfigValue/ConfigValue.js +2 -2
  100. package/src/commons/SubUnit/DeviceTemplate/EvaluationOverConfig/EvaluationOverConfig.js +2 -2
  101. package/src/commons/SubUnit/Item/index.js +3 -3
  102. package/src/commons/SubUnit/OneTap/ItemOneTap.js +5 -5
  103. package/src/commons/SubUnit/OneTap/__test__/SubUnitAutomate.test.js +11 -8
  104. package/src/commons/SubUnit/__test__/Favorites.test.js +1 -13
  105. package/src/commons/SubUnit/__test__/ShortDetail.test.js +5 -16
  106. package/src/commons/SummaryItem/index.js +22 -23
  107. package/src/commons/Tabbar/__test__/index.test.js +0 -11
  108. package/src/commons/Unit/HeaderUnit/index.js +93 -85
  109. package/src/commons/Unit/SharedUnit.js +7 -7
  110. package/src/commons/Unit/__test__/HeaderUnit.test.js +29 -52
  111. package/src/commons/Unit/__test__/SharedUnit.test.js +94 -105
  112. package/src/commons/UnitSummary/AirQuality/SegmentedRoundDisplay/index.js +11 -30
  113. package/src/commons/Widgets/IFrameWithConfig/IFrameWithConfig.js +44 -1
  114. package/src/commons/Widgets/IFrameWithConfig/__tests__/IFrameWithConfig.test.js +69 -0
  115. package/src/commons/WrapParallaxScrollView/index.js +20 -50
  116. package/src/configs/API.js +1 -2
  117. package/src/configs/Constants.js +3 -3
  118. package/src/hooks/Common/__test__/useAndroidTranslucentStatusBar.test.js +4 -15
  119. package/src/hooks/Common/useIsOwnerOfUnit.js +1 -1
  120. package/src/hooks/IoT/__test__/useRemoteControl.test.js +1 -1
  121. package/src/hooks/IoT/__test__/useWatchConfigs.test.js +6 -21
  122. package/src/iot/RemoteControl/HomeAssistant.js +1 -1
  123. package/src/iot/RemoteControl/__test__/Bluetooth.test.js +234 -232
  124. package/src/navigations/AddDeviceStack.js +2 -2
  125. package/src/navigations/AddGatewayStack.js +2 -2
  126. package/src/navigations/AddLGDeviceStack.js +2 -2
  127. package/src/navigations/AddMemberStack.js +2 -2
  128. package/src/navigations/AddSubUnitStack.js +2 -2
  129. package/src/navigations/AddUnitStack.js +2 -2
  130. package/src/navigations/AllGatewayStack.js +2 -2
  131. package/src/navigations/AutomateStack.js +4 -4
  132. package/src/navigations/EmergencyContactsStack.js +4 -4
  133. package/src/navigations/GatewayStack.js +2 -2
  134. package/src/navigations/HanetCameraStack.js +2 -2
  135. package/src/navigations/Main.js +2 -2
  136. package/src/navigations/NotificationStack.js +2 -2
  137. package/src/navigations/SharedStack.js +8 -6
  138. package/src/navigations/SmartAccountStack.js +2 -2
  139. package/src/navigations/SmartIrStack.js +2 -2
  140. package/src/navigations/SmartLockStack.js +2 -2
  141. package/src/navigations/SmartStack.js +2 -2
  142. package/src/navigations/TemplateStack.js +2 -2
  143. package/src/navigations/UnitStack.js +4 -12
  144. package/src/navigations/utils.js +1 -4
  145. package/src/screens/ActivityLog/hooks/index.js +7 -4
  146. package/src/screens/ActivityLog/index.js +2 -2
  147. package/src/screens/AddCommon/__test__/SelectSubUnit.test.js +4 -21
  148. package/src/screens/AddCommon/__test__/SelectUnit.test.js +7 -19
  149. package/src/screens/AddLocationMaps/__test__/index.test.js +3 -13
  150. package/src/screens/AddLocationMaps/index.js +11 -6
  151. package/src/screens/AddNewDevice/__test__/AddNewDevice.test.js +3 -20
  152. package/src/screens/AddNewGateway/PlugAndPlay/__test__/FirstWarning.test.js +11 -18
  153. package/src/screens/AddNewGateway/PlugAndPlay/__test__/ZigbeeDeviceConnectGuide.test.js +4 -21
  154. package/src/screens/AddNewGateway/RenameNewDevices.js +2 -2
  155. package/src/screens/AddNewGateway/__test__/AddNewGateway.test.js +3 -3
  156. package/src/screens/AddNewGateway/__test__/ConnectingModbusDevice.test.js +0 -17
  157. package/src/screens/AddNewGateway/__test__/ConnectingWifiDevice.test.js +4 -19
  158. package/src/screens/AddNewGateway/__test__/ConnectingWifiGuide.test.js +3 -15
  159. package/src/screens/AddNewGateway/__test__/ConnectingZigbeeDevice.test.js +31 -51
  160. package/src/screens/AddNewGateway/__test__/RenameNewDevices.test.js +9 -22
  161. package/src/screens/AddNewGateway/__test__/ScanGatewayQR.test.js +12 -19
  162. package/src/screens/AddNewGateway/__test__/ScanModbusQR.test.js +6 -16
  163. package/src/screens/AddNewGateway/__test__/ScanWifiDeviceQR.test.js +4 -15
  164. package/src/screens/AddNewGateway/__test__/SelectDeviceSubUnit.test.js +3 -3
  165. package/src/screens/AddNewGateway/__test__/SelectDeviceType.test.js +18 -10
  166. package/src/screens/AddNewGateway/__test__/SelectDeviceUnit.test.js +1 -1
  167. package/src/screens/AddNewGateway/__test__/SelectModbusGateway.test.js +12 -9
  168. package/src/screens/AddNewGateway/__test__/SelectZigbeeGateway.test.js +12 -9
  169. package/src/screens/AddNewGateway/__test__/ShareWifiPassword.test.js +7 -21
  170. package/src/screens/AllGateway/DetailConfigActionInternal/__test__/index.test.js +0 -20
  171. package/src/screens/AllGateway/DetailConfigActionModbus/__test__/index.test.js +7 -24
  172. package/src/screens/AllGateway/DeviceGatewayInfo/__test__/index.test.js +0 -17
  173. package/src/screens/AllGateway/DeviceInternalDetail/__test__/index.test.js +84 -100
  174. package/src/screens/AllGateway/DeviceModbusDetail/__test__/index.test.js +64 -82
  175. package/src/screens/AllGateway/DeviceZigbeeDetail/__test__/index.test.js +36 -55
  176. package/src/screens/AllGateway/GatewayConnectionMethods/__test__/index.test.js +9 -18
  177. package/src/screens/AllGateway/GatewayDetail/__test__/index.test.js +10 -37
  178. package/src/screens/AllGateway/GatewayInfo/__test__/index.test.js +7 -32
  179. package/src/screens/AllGateway/__test__/index.test.js +1 -14
  180. package/src/screens/AllGateway/components/GatewayItem/__test__/index.test.js +0 -12
  181. package/src/screens/AllGateway/components/TabPaneCT/__test__/index.test.js +1 -13
  182. package/src/screens/AllGateway/components/TabPaneCT/index.js +1 -1
  183. package/src/screens/AllGateway/hooks/__test__/index.test.js +1 -8
  184. package/src/screens/AllGateway/test-utils.js +1 -1
  185. package/src/screens/Automate/AddNewAction/NewActionWrapper.js +2 -2
  186. package/src/screens/Automate/AddNewAction/SetupConfigCondition.js +27 -28
  187. package/src/screens/Automate/AddNewAction/__test__/ChooseAction.test.js +3 -3
  188. package/src/screens/Automate/AddNewAction/__test__/ChooseConfig.test.js +8 -5
  189. package/src/screens/Automate/AddNewAction/__test__/SelectControlDevices.test.js +2 -2
  190. package/src/screens/Automate/AddNewAction/__test__/SelectMonitorDevices.test.js +1 -18
  191. package/src/screens/Automate/AddNewAction/__test__/SetupConfigCondition.test.js +17 -15
  192. package/src/screens/Automate/AddNewAutoSmart/__test__/AddNewAutoSmart.test.js +4 -4
  193. package/src/screens/Automate/EditActionsList/__tests__/UpdateActionScript.test.js +38 -55
  194. package/src/screens/Automate/EditActionsList/__tests__/UpdateDelayScript.test.js +0 -18
  195. package/src/screens/Automate/EditActionsList/__tests__/UpdateNotifyScript.test.js +1 -19
  196. package/src/screens/Automate/EditActionsList/__tests__/index.test.js +14 -11
  197. package/src/screens/Automate/OneTap/__test__/AddNewOneTap.test.js +3 -3
  198. package/src/screens/Automate/Scenario/__test__/AddNewOneTap.test.js +2 -2
  199. package/src/screens/Automate/ScriptDetail/Components/AddActionScript.js +2 -2
  200. package/src/screens/Automate/ScriptDetail/__test__/index.test.js +33 -25
  201. package/src/screens/Automate/ScriptDetail/index.js +6 -6
  202. package/src/screens/Automate/SetSchedule/__test__/index.test.js +4 -4
  203. package/src/screens/Automate/SetSchedule/components/RowItem.js +3 -3
  204. package/src/screens/Automate/Styles/indexStyles.js +6 -0
  205. package/src/screens/Automate/__test__/MultiUnits.test.js +7 -7
  206. package/src/screens/Automate/__test__/index.test.js +9 -34
  207. package/src/screens/Automate/index.js +50 -33
  208. package/src/screens/ChangePosition/__test__/index.test.js +1 -14
  209. package/src/screens/ConfirmUnitDeletion/__test__/ConfirmUnitDeletion.test.js +1 -23
  210. package/src/screens/Device/EditDevice/__test__/EditDevice.test.js +1 -11
  211. package/src/screens/Device/EditDevice/index.js +2 -2
  212. package/src/screens/Device/__test__/detail.test.js +11 -11
  213. package/src/screens/Device/__test__/sensorDisplayItem.test.js +0 -12
  214. package/src/screens/Device/detail.js +14 -12
  215. package/src/screens/Drawer/Drawer.test.js +3 -11
  216. package/src/screens/Drawer/index.js +3 -4
  217. package/src/screens/EmergencyContacts/EmergencyContactsList.js +4 -8
  218. package/src/screens/EmergencyContacts/EmergencyContactsSelectContacts.js +3 -3
  219. package/src/screens/EmergencyContacts/__test__/EmergencyContactAddNew.test.js +4 -17
  220. package/src/screens/EmergencyContacts/__test__/EmergencyContactList.test.js +3 -14
  221. package/src/screens/EmergencyContacts/__test__/EmergencyContactsSelectContacts.test.js +0 -10
  222. package/src/screens/EmergencySetting/components/DropDownItem.js +2 -2
  223. package/src/screens/EnterPassword/__test__/EnterPassword.test.js +4 -17
  224. package/src/screens/GuestInfo/__test__/index.test.js +0 -11
  225. package/src/screens/GuestInfo/components/RowGuestInfo.js +2 -2
  226. package/src/screens/GuestInfo/index.js +2 -2
  227. package/src/screens/HanetCamera/Detail.js +6 -2
  228. package/src/screens/HanetCamera/ManageAccess.js +3 -4
  229. package/src/screens/HanetCamera/MemberInfo.js +4 -4
  230. package/src/screens/HanetCamera/__test__/CaptureFaceID.test.js +2 -16
  231. package/src/screens/HanetCamera/__test__/Detail.test.js +1 -12
  232. package/src/screens/HanetCamera/__test__/ManageAccess.test.js +5 -16
  233. package/src/screens/HanetCamera/__test__/MemberInfo.test.js +5 -18
  234. package/src/screens/HanetCamera/components/RequestFaceIDPopup.js +2 -2
  235. package/src/screens/ManageAccess/__test__/ManageAccess.test.js +3 -19
  236. package/src/screens/ManageAccess/index.js +3 -3
  237. package/src/screens/MoveToAnotherSubUnit/__test__/index.test.js +7 -7
  238. package/src/screens/Notification/__test__/Notification.test.js +5 -15
  239. package/src/screens/Notification/__test__/NotificationItem.test.js +9 -19
  240. package/src/screens/Notification/index.js +5 -5
  241. package/src/screens/PlayBackCamera/__test__/index.test.js +13 -22
  242. package/src/screens/PlayBackCamera/index.js +2 -2
  243. package/src/screens/ScanChipQR/components/QRScan/__test__/QRScan.test.js +0 -11
  244. package/src/screens/ScanChipQR/components/QRScan/index.js +3 -3
  245. package/src/screens/SelectUnit/__test__/index.test.js +9 -29
  246. package/src/screens/SelectUnit/index.js +2 -2
  247. package/src/screens/SharedUnit/TabHeader.js +2 -2
  248. package/src/screens/SharedUnit/index.js +5 -0
  249. package/src/screens/Sharing/Components/EndDevice.js +3 -3
  250. package/src/screens/Sharing/SelectUser.js +5 -4
  251. package/src/screens/Sharing/UnitMemberList.js +7 -6
  252. package/src/screens/Sharing/__test__/InfoMemberUnit.test.js +9 -4
  253. package/src/screens/Sharing/__test__/SelectShareDevice.test.js +2 -15
  254. package/src/screens/Sharing/__test__/SelectUser.test.js +2 -22
  255. package/src/screens/Sharing/__test__/UnitMemberList.test.js +2 -2
  256. package/src/screens/Sharing/__test__/UpdateShareDevice.test.js +4 -17
  257. package/src/screens/Sharing/hooks/__test__/index.test.js +2 -13
  258. package/src/screens/SmartAccount/Connecting/index.js +0 -2
  259. package/src/screens/SmartAccount/ListDevice/__test__/ListDevice.test.js +3 -18
  260. package/src/screens/SmartAccount/SuccessfullyConnected/__test__/SuccessfullyConnected.test.js +11 -21
  261. package/src/screens/SmartAccount/SuccessfullyConnected/index.js +3 -4
  262. package/src/screens/SmartAccount/__test__/Connecting.test.js +30 -36
  263. package/src/screens/SmartAccount/__test__/SmartAccount.test.js +12 -21
  264. package/src/screens/SmartIr/__test__/GroupButtonByType.test.js +8 -17
  265. package/src/screens/SmartIr/__test__/SelectBrand.test.js +1 -11
  266. package/src/screens/SmartIr/__test__/SelectDeviceType.test.js +1 -12
  267. package/src/screens/SmartIr/__test__/SmartIr.test.js +3 -11
  268. package/src/screens/SmartIr/components/GroupButtonByType/GroupButtonByType.js +6 -5
  269. package/src/screens/SmartIr/components/SelectBrand.js +2 -2
  270. package/src/screens/SubUnit/AddSubUnit.js +1 -0
  271. package/src/screens/SubUnit/EditSubUnit.js +3 -2
  272. package/src/screens/SubUnit/ManageSubUnit.js +5 -5
  273. package/src/screens/SubUnit/__test__/AddSubUnit.test.js +9 -31
  274. package/src/screens/SubUnit/__test__/EditSubUnit.test.js +12 -30
  275. package/src/screens/SubUnit/__test__/ManageSubUnit.test.js +2 -2
  276. package/src/screens/SubUnit/hooks/__test__/useManageSubUnit.test.js +0 -12
  277. package/src/screens/SyncLGDevice/__test__/AddLGDevice.test.js +7 -20
  278. package/src/screens/Template/__test__/EditTemplate.test.js +4 -15
  279. package/src/screens/Template/__test__/GatewayList.test.js +0 -9
  280. package/src/screens/Template/__test__/detail.test.js +8 -8
  281. package/src/screens/Template/__test__/index.test.js +3 -14
  282. package/src/screens/Template/detail.js +2 -2
  283. package/src/screens/Unit/Detail.js +10 -55
  284. package/src/screens/Unit/MoreMenu.js +6 -5
  285. package/src/screens/Unit/SelectAddToFavorites.js +2 -2
  286. package/src/screens/Unit/SelectAddress.js +9 -4
  287. package/src/screens/Unit/SmartAccountItem.js +2 -2
  288. package/src/screens/Unit/Station/__test__/index.test.js +2 -2
  289. package/src/screens/Unit/Summaries.js +24 -29
  290. package/src/screens/Unit/__test__/AddMenu.test.js +5 -2
  291. package/src/screens/Unit/__test__/CheckSendEmail.test.js +0 -12
  292. package/src/screens/Unit/__test__/ChooseLocation.test.js +1 -4
  293. package/src/screens/Unit/__test__/Detail.test.js +14 -12
  294. package/src/screens/Unit/__test__/ManageUnit.test.js +2 -17
  295. package/src/screens/Unit/__test__/MoreMenu.test.js +6 -12
  296. package/src/screens/Unit/__test__/SelectAddToFavorites.test.js +3 -14
  297. package/src/screens/Unit/__test__/SelectAddress.test.js +4 -17
  298. package/src/screens/Unit/__test__/SmartAccount.test.js +14 -11
  299. package/src/screens/Unit/__test__/SmartAccountItem.test.js +0 -11
  300. package/src/screens/Unit/__test__/Summaries.test.js +2 -14
  301. package/src/screens/Unit/components/AutomateScript/index.js +5 -5
  302. package/src/screens/Unit/components/ButtonWrapper/index.js +3 -4
  303. package/src/screens/Unit/components/Header/index.js +5 -4
  304. package/src/screens/Unit/components/SharedUnit/index.js +5 -5
  305. package/src/screens/Unit/components/__test__/Header.test.js +1 -14
  306. package/src/screens/Unit/components/__test__/MyUnitDevice.test.js +1 -11
  307. package/src/screens/Unit/components/__test__/SharedUnit.test.js +1 -11
  308. package/src/screens/UnitSummary/__test__/index.test.js +51 -17
  309. package/src/screens/UnitSummary/components/3PPowerConsumption/__test__/3PPowerConsumption.test.js +8 -25
  310. package/src/screens/UnitSummary/components/AirQuality/__test__/index.test.js +1 -7
  311. package/src/screens/UnitSummary/components/AirQuality/index.js +8 -3
  312. package/src/screens/UnitSummary/components/PowerConsumption/__test__/PowerConsumption.test.js +0 -11
  313. package/src/screens/UnitSummary/components/RunningDevices/__test__/index.test.js +1 -16
  314. package/src/screens/UnitSummary/components/Temperature/index.js +5 -1
  315. package/src/screens/UnitSummary/components/UvIndex/__test__/index.test.js +0 -8
  316. package/src/screens/UnitSummary/components/UvIndex/index.js +6 -2
  317. package/src/screens/UnitSummary/components/WaterQuality/Item/index.js +3 -3
  318. package/src/screens/UnitSummary/components/WaterQuality/__test__/index.test.js +14 -18
  319. package/src/screens/UnitSummary/components/__test__/UnitSummary.test.js +8 -8
  320. package/src/screens/UnitSummary/index.js +6 -6
  321. package/src/utils/Apis/axios.js +4 -2
  322. package/src/utils/Converter/__test__/timer.test.js +8 -0
  323. package/src/utils/Functions/preloadImages.js +13 -14
  324. package/src/utils/Monitor.js +2 -3
  325. package/src/utils/Route/index.js +0 -1
  326. package/src/utils/Storage.js +1 -1
  327. package/assets/images/OneTap.svg +0 -14
  328. package/assets/images/Schedule.svg +0 -39
  329. package/assets/images/ValueChange.svg +0 -49
  330. package/src/commons/Device/WindSpeed/LinearChart/__test__/LinearChart.test.js +0 -48
  331. package/src/commons/Device/WindSpeed/LinearChart/index.js +0 -155
  332. package/src/screens/AddNewGateway/hooks/__Tests__/index.test.js +0 -27
  333. package/src/screens/AddNewGateway/hooks/index.js +0 -31
  334. package/src/screens/SubUnit/Detail.js +0 -150
  335. package/src/screens/SubUnit/__test__/Detail.test.js +0 -125
  336. package/src/screens/UnitSummary/components/Temperature/ChartAverage/index.js +0 -62
  337. package/src/screens/UnitSummary/components/Temperature/__test__/ChartAverage.test.js +0 -17
  338. package/src/utils/dateHelper/getTickValues.js +0 -22
@@ -1,4 +1,4 @@
1
- import { IconOutline, IconFill } from '@ant-design/icons-react-native';
1
+ import AntDesign from 'react-native-vector-icons/AntDesign';
2
2
  import React, { memo, useMemo } from 'react';
3
3
  import { StyleSheet } from 'react-native';
4
4
  import { Colors } from '../../configs';
@@ -62,7 +62,7 @@ const IconComponent = memo(
62
62
  );
63
63
  } else if (icon.includes('Filled')) {
64
64
  return (
65
- <IconFill
65
+ <AntDesign
66
66
  name={displayIcon}
67
67
  color={colorIcon}
68
68
  size={size}
@@ -76,7 +76,7 @@ const IconComponent = memo(
76
76
  ? 'poweroff'
77
77
  : displayIcon;
78
78
  return (
79
- <IconOutline
79
+ <AntDesign
80
80
  name={iconCT}
81
81
  color={colorIcon}
82
82
  size={size}
@@ -93,7 +93,7 @@ const MediaPlayerFull = ({
93
93
  <TouchableOpacity
94
94
  activeOpacity={1}
95
95
  onPress={onPause}
96
- style={[isFullScreen ? styles.wrapFull : styles.wrap]}
96
+ style={isFullScreen ? styles.wrapFull : styles.wrap}
97
97
  >
98
98
  <Animated.View
99
99
  style={[
@@ -1,17 +1,10 @@
1
- import React, { useState } from 'react';
1
+ import React from 'react';
2
2
  import { TouchableOpacity } from 'react-native';
3
3
  import { act, create } from 'react-test-renderer';
4
4
  import { SCProvider } from '../../../context';
5
5
  import { mockSCStore } from '../../../context/mockStore';
6
6
  import MediaPlayerFull from '../MediaPlayerFull';
7
-
8
- const mockSetState = jest.fn();
9
- jest.mock('react', () => {
10
- return {
11
- ...jest.requireActual('react'),
12
- useState: jest.fn((init) => [init, mockSetState]),
13
- };
14
- });
7
+ import FImage from '../../FImage';
15
8
 
16
9
  const wrapComponent = (props) => (
17
10
  <SCProvider initState={mockSCStore({})}>
@@ -22,14 +15,7 @@ const wrapComponent = (props) => (
22
15
  describe('Test MediaPlayerFull', () => {
23
16
  let tree;
24
17
 
25
- afterEach(() => {
26
- useState.mockClear();
27
- });
28
-
29
18
  it('Test render', async () => {
30
- useState.mockImplementationOnce((init) => [false, mockSetState]);
31
- useState.mockImplementationOnce((init) => [false, mockSetState]);
32
- useState.mockImplementationOnce((init) => [init, mockSetState]);
33
19
  await act(async () => {
34
20
  tree = await create(
35
21
  wrapComponent({
@@ -39,44 +25,22 @@ describe('Test MediaPlayerFull', () => {
39
25
  );
40
26
  });
41
27
  const instance = tree.root;
42
- const TouchableOpacities = instance.findAllByType(TouchableOpacity);
43
- expect(TouchableOpacities).toHaveLength(3);
28
+ const touchableOpacities = instance.findAllByType(TouchableOpacity);
29
+ expect(touchableOpacities).toHaveLength(3);
30
+ expect(instance.findAllByType(FImage)).toHaveLength(1);
44
31
  await act(async () => {
45
- TouchableOpacities[0].props.onPress();
32
+ touchableOpacities[0].props.onPress();
46
33
  });
47
- expect(mockSetState).toBeCalledWith(false);
34
+ expect(instance.findAllByType(FImage)).toHaveLength(2); // paused
48
35
  await act(async () => {
49
- TouchableOpacities[1].props.onPress();
50
- TouchableOpacities[2].props.onPress();
36
+ touchableOpacities[1].props.onPress();
51
37
  });
52
- expect(mockSetState).toBeCalledWith(true);
53
- });
38
+ expect(instance.findAllByType(FImage)).toHaveLength(1); // unpaused
54
39
 
55
- it('Test render 2', async () => {
56
- useState.mockImplementationOnce((init) => [true, mockSetState]);
57
- useState.mockImplementationOnce((init) => [true, mockSetState]);
58
- useState.mockImplementationOnce((init) => [init, mockSetState]);
59
- await act(async () => {
60
- tree = await create(
61
- wrapComponent({
62
- isShowFullScreenIcon: true,
63
- cameraName: 'test',
64
- isPaused: true,
65
- amount: 1,
66
- })
67
- );
68
- });
69
- const instance = tree.root;
70
- const TouchableOpacities = instance.findAllByType(TouchableOpacity);
71
- expect(TouchableOpacities).toHaveLength(3);
72
- await act(async () => {
73
- TouchableOpacities[0].props.onPress();
74
- });
75
- expect(mockSetState).toBeCalledWith(false);
40
+ // full screen
76
41
  await act(async () => {
77
- TouchableOpacities[1].props.onPress();
78
- TouchableOpacities[2].props.onPress();
42
+ touchableOpacities[2].props.onPress();
79
43
  });
80
- expect(mockSetState).toBeCalledWith(true);
44
+ expect(touchableOpacities[0].props.style?.position).toEqual('absolute');
81
45
  });
82
46
  });
@@ -6,7 +6,7 @@ import { ImageButton, MenuActionAddnew } from '../../index';
6
6
 
7
7
  const wrapComponent = (dataActions) => (
8
8
  <SCProvider initState={mockSCStore({})}>
9
- <MenuActionAddnew dataActions={dataActions} />
9
+ <MenuActionAddnew dataActions={dataActions} visible />
10
10
  </SCProvider>
11
11
  );
12
12
 
@@ -20,6 +20,7 @@ describe('Test MenuActionList', () => {
20
20
  listItem={listItem}
21
21
  hideModal={mockHideModal}
22
22
  onItemClick={mockOnItemClick}
23
+ visible
23
24
  />
24
25
  );
25
26
  });
@@ -3,7 +3,8 @@ import { Colors } from '../../configs';
3
3
 
4
4
  export default StyleSheet.create({
5
5
  wrap: {
6
- backgroundColor: Colors.TextTransparent,
6
+ width: 0,
7
+ height: 0,
7
8
  },
8
9
  menuStyle: {
9
10
  marginTop: -25,
@@ -50,7 +50,7 @@ const MenuActionMore = memo(
50
50
  from={childRef}
51
51
  onRequestClose={hideMore}
52
52
  isVisible={isVisible}
53
- arrowStyle={styles.wrap}
53
+ arrowSize={styles.wrap}
54
54
  accessibilityLabel={idLabelPopover}
55
55
  mode={mode}
56
56
  >
@@ -47,7 +47,7 @@ export default StyleSheet.create({
47
47
  wrapStyle: {
48
48
  marginTop: Platform.select({
49
49
  ios: 0,
50
- android: -30,
50
+ android: -15,
51
51
  }),
52
52
  },
53
53
  });
@@ -1,5 +1,5 @@
1
1
  import React, { useRef } from 'react';
2
- import { Icon } from '@ant-design/react-native';
2
+ import AntDesign from 'react-native-vector-icons/AntDesign';
3
3
  import { View, TouchableOpacity } from 'react-native';
4
4
 
5
5
  import styles from './NavBarStyles';
@@ -40,7 +40,7 @@ const NavBar = ({
40
40
  ref={refMenuAction}
41
41
  accessibilityLabel={idLabelIconBars}
42
42
  >
43
- <Icon name={'bars'} size={19} color={Colors.Black} />
43
+ <AntDesign name={'bars'} size={19} color={Colors.Black} />
44
44
  </TouchableOpacity>
45
45
  </View>
46
46
  <MenuActionMore
@@ -1,6 +1,6 @@
1
1
  import React, { memo, useState, useCallback, useEffect } 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
 
5
5
  import { useTranslations } from '../../hooks/Common/useTranslations';
6
6
  import styles from './NumberUpDownActionTemplateStyles';
@@ -118,7 +118,7 @@ const NumberUpDownActionTemplate = ({ device, item = {}, onSelectAction }) => {
118
118
  AccessibilityLabel.NUMBER_UP_DOWN_ACTION_DOWN
119
119
  }
120
120
  >
121
- <IconOutline name="down" size={32} color={Colors.Primary} />
121
+ <AntDesign name="down" size={32} color={Colors.Primary} />
122
122
  </TouchableOpacity>
123
123
  <Text
124
124
  type="H2"
@@ -134,7 +134,7 @@ const NumberUpDownActionTemplate = ({ device, item = {}, onSelectAction }) => {
134
134
  onPress={onPressUp}
135
135
  accessibilityLabel={AccessibilityLabel.NUMBER_UP_DOWN_ACTION_UP}
136
136
  >
137
- <IconOutline name="up" size={32} color={Colors.Primary} />
137
+ <AntDesign name="up" size={32} color={Colors.Primary} />
138
138
  </TouchableOpacity>
139
139
  </View>
140
140
  <View style={styles.wrapButton}>
@@ -8,8 +8,6 @@ import { mockSCStore } from '../../../context/mockStore';
8
8
  import Text from '../../Text';
9
9
  import t from '../../../hooks/Common/useTranslations';
10
10
 
11
- const mockGoBack = jest.fn();
12
-
13
11
  const wrapComponent = (headerBodyText, visible, hidePreventAccess) => (
14
12
  <SCProvider initState={mockSCStore({})}>
15
13
  <PreventAccess
@@ -20,16 +18,6 @@ const wrapComponent = (headerBodyText, visible, hidePreventAccess) => (
20
18
  </SCProvider>
21
19
  );
22
20
 
23
- jest.mock('@react-navigation/native', () => {
24
- return {
25
- ...jest.requireActual('@react-navigation/native'),
26
- useRoute: jest.fn(),
27
- useNavigation: () => ({
28
- goBack: mockGoBack,
29
- }),
30
- };
31
- });
32
-
33
21
  describe('Test PreventAccess.test', () => {
34
22
  let tree;
35
23
  let headerBodyText = 'some header test';
@@ -61,6 +49,6 @@ describe('Test PreventAccess.test', () => {
61
49
  });
62
50
  expect(button1).toBeDefined();
63
51
  expect(button2).toBeDefined();
64
- expect(mockGoBack).toHaveBeenCalled();
52
+ expect(global.mockedGoBack).toHaveBeenCalled();
65
53
  });
66
54
  });
@@ -8,21 +8,9 @@ import { mockSCStore } from '../../../context/mockStore';
8
8
  import { getPusher } from '../../../utils/Pusher';
9
9
  import ViewButtonBottom from '../../ViewButtonBottom';
10
10
 
11
- const wrapComponent = ({
12
- onReady,
13
- onMessage,
14
- setHidePopupTurnOnGuide,
15
- setIsRecallChipScan,
16
- isChangeAddressSuccess,
17
- }) => (
11
+ const wrapComponent = (props) => (
18
12
  <SCProvider initState={mockSCStore({})}>
19
- <Processing
20
- onReady={onReady}
21
- onMessage={onMessage}
22
- setHidePopupTurnOnGuide={setHidePopupTurnOnGuide}
23
- setIsRecallChipScan={setIsRecallChipScan}
24
- isChangeAddressSuccess={isChangeAddressSuccess}
25
- />
13
+ <Processing {...props} />
26
14
  </SCProvider>
27
15
  );
28
16
  describe('Test Processing', () => {
@@ -98,6 +86,7 @@ describe('Test Processing', () => {
98
86
  setHidePopupTurnOnGuide: mockSetHidePopupTurnOnGuide,
99
87
  setIsRecallChipScan: mockSetIsRecallChipScan,
100
88
  isChangeAddressSuccess: true,
89
+ showPopupTurnOnGuide: true,
101
90
  })
102
91
  );
103
92
  });
@@ -1,6 +1,6 @@
1
1
  import React, { memo } from 'react';
2
2
  import { View, TextInput } from 'react-native';
3
- import { IconOutline } from '@ant-design/icons-react-native';
3
+ import AntDesign from 'react-native-vector-icons/AntDesign';
4
4
  import { useTranslations } from '../../hooks/Common/useTranslations';
5
5
 
6
6
  import { Colors } from '../../configs';
@@ -10,8 +10,8 @@ const SearchBarLocation = memo(({ input, onTextInput }) => {
10
10
  const t = useTranslations();
11
11
  return (
12
12
  <View style={styles.container}>
13
- <IconOutline
14
- name="search"
13
+ <AntDesign
14
+ name="search1"
15
15
  size={24}
16
16
  color={Colors.Gray6}
17
17
  accessibilityLabel="icon-search"
@@ -1,6 +1,6 @@
1
1
  import React, { memo } 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
 
5
5
  import { Card } from '../CardShadow';
6
6
  import Text from '../Text';
@@ -20,7 +20,7 @@ const SelectActionCard = memo(({ title, action, onPress }) => {
20
20
  {action}
21
21
  </Text>
22
22
  </View>
23
- <IconOutline name="right" size={20} />
23
+ <AntDesign name="right" size={20} />
24
24
  </View>
25
25
  </TouchableOpacity>
26
26
  </Card>
@@ -14,19 +14,6 @@ import api from '../../../utils/Apis/axios';
14
14
 
15
15
  const mock = new MockAdapter(api.axiosInstance);
16
16
 
17
- const mockedGoBack = jest.fn();
18
- const mockedNavigate = jest.fn();
19
- jest.mock('@react-navigation/native', () => {
20
- return {
21
- ...jest.requireActual('@react-navigation/native'),
22
- useNavigation: () => ({
23
- navigate: mockedNavigate,
24
- goBack: mockedGoBack,
25
- }),
26
- useIsFocused: () => true,
27
- };
28
- });
29
-
30
17
  const wrapComponent = (unitId, title, subTitle, onPressNext) => (
31
18
  <SCProvider initState={mockSCStore({})}>
32
19
  <SelectSubUnit {...{ unitId, title, subTitle, onPressNext }} />
@@ -34,10 +21,6 @@ const wrapComponent = (unitId, title, subTitle, onPressNext) => (
34
21
  );
35
22
 
36
23
  describe('Test SelectSubUnit', () => {
37
- beforeEach(() => {
38
- mockedNavigate.mockClear();
39
- mockedGoBack.mockClear();
40
- });
41
24
  let tree;
42
25
 
43
26
  it('fetch sub-unit success', async () => {
@@ -101,6 +84,6 @@ describe('Test SelectSubUnit', () => {
101
84
  await act(async () => {
102
85
  viewButtonBottom.props.onLeftClick();
103
86
  });
104
- expect(mockedGoBack).toHaveBeenCalled();
87
+ expect(global.mockedGoBack).toHaveBeenCalled();
105
88
  });
106
89
  });
@@ -2,7 +2,7 @@ import React, { memo, useCallback, useEffect, useMemo, useState } from 'react';
2
2
  import { useIsFocused, useNavigation } from '@react-navigation/native';
3
3
  import { useTranslations } from '../../hooks/Common/useTranslations';
4
4
  import { ScrollView, TouchableOpacity, View } from 'react-native';
5
- import { IconFill } from '@ant-design/icons-react-native';
5
+ import AntDesign from 'react-native-vector-icons/AntDesign';
6
6
 
7
7
  import { API, Colors } from '../../configs';
8
8
  import { RadioCircle, Section, ViewButtonBottom } from '../../commons';
@@ -98,7 +98,7 @@ const SelectSubUnit = ({ unitId, title, subTitle, onPressNext, route }) => {
98
98
  />
99
99
  ))}
100
100
  <TouchableOpacity style={styles.rowContainer} onPress={addSubUnit}>
101
- <IconFill name="plus-circle" size={20} color={Colors.Primary} />
101
+ <AntDesign name="plus-circle" size={20} color={Colors.Primary} />
102
102
  <View style={styles.row}>
103
103
  <Text type="H4" color={Colors.Primary}>
104
104
  {t('add_new_sub_unit')}
@@ -13,18 +13,6 @@ import { API } from '../../../configs';
13
13
 
14
14
  const mock = new MockAdapter(api.axiosInstance);
15
15
 
16
- const mockedGoBack = jest.fn();
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
- goBack: mockedGoBack,
24
- }),
25
- };
26
- });
27
-
28
16
  const wrapComponent = (title, subTitle, onPressNext) => (
29
17
  <SCProvider initState={mockSCStore({})}>
30
18
  <SelectUnit {...{ title, subTitle, onPressNext }} />
@@ -115,6 +103,6 @@ describe('test single SelectUnit', () => {
115
103
  await act(async () => {
116
104
  goBack.props.onPress();
117
105
  });
118
- expect(mockedGoBack).toBeCalled();
106
+ expect(global.mockedGoBack).toBeCalled();
119
107
  });
120
108
  });
@@ -1,6 +1,6 @@
1
1
  import React, { memo, useCallback } from 'react';
2
2
  import { TouchableOpacity, StyleSheet } from 'react-native';
3
- import { IconOutline } from '@ant-design/icons-react-native';
3
+ import AntDesign from 'react-native-vector-icons/AntDesign';
4
4
  import { Colors } from '../../configs';
5
5
 
6
6
  const BtnRemoveMember = memo(({ member, onPressRemove }) => {
@@ -9,7 +9,7 @@ const BtnRemoveMember = memo(({ member, onPressRemove }) => {
9
9
  }, [member, onPressRemove]);
10
10
  return (
11
11
  <TouchableOpacity style={styles.buttonRemove} onPress={onPress}>
12
- <IconOutline name={'minus'} size={20} color={Colors.Gray8} />
12
+ <AntDesign name={'minus'} size={20} color={Colors.Gray8} />
13
13
  </TouchableOpacity>
14
14
  );
15
15
  });
@@ -1,6 +1,6 @@
1
1
  import React, { useState, useCallback } from 'react';
2
2
  import { View, StyleSheet, 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 { useTranslations } from '../../hooks/Common/useTranslations';
5
5
  import { Colors } from '../../configs';
6
6
  import Text from '../../commons/Text';
@@ -86,7 +86,7 @@ const StationDevicePermissions = ({ dataStation, onselectSensor }) => {
86
86
  <View style={styles.infoContainer}>
87
87
  <Text style={styles.text}>{sensor.name}</Text>
88
88
  <View style={styles.rightImage}>
89
- <IconOutline
89
+ <AntDesign
90
90
  name={expandedIndex === index ? 'up' : 'down'}
91
91
  size={20}
92
92
  color={Colors.Gray6}
@@ -1,12 +1,12 @@
1
1
  import React, { useCallback, useRef, useState } from 'react';
2
2
  import {
3
+ ActivityIndicator,
3
4
  Animated,
4
5
  Platform,
5
6
  RefreshControl,
6
7
  StyleSheet,
7
8
  View,
8
9
  } from 'react-native';
9
- import { ActivityIndicator } from '@ant-design/react-native';
10
10
  import { Colors, Theme } from '../../configs';
11
11
  import HeaderAni, { heightHeader } from '../../commons/HeaderAni';
12
12
  import Text from '../../commons/Text';
@@ -12,7 +12,7 @@ describe('BtnRemoveMember', () => {
12
12
  tree = await renderer.create(component);
13
13
  });
14
14
  const instance = tree.root;
15
- const TouchableOpacities = instance.findAllByType(TouchableOpacity);
16
- expect(TouchableOpacities).toHaveLength(1);
15
+ const touchableOpacities = instance.findAllByType(TouchableOpacity);
16
+ expect(touchableOpacities).toHaveLength(1);
17
17
  });
18
18
  });
@@ -18,7 +18,7 @@ const wrapComponent = (sensor, mockFunction) => (
18
18
  describe('Test DevicePermissionsCheckbox', () => {
19
19
  let tree;
20
20
  let sensor = {
21
- icon: 'caret-down',
21
+ icon: 'caretdown',
22
22
  id: 10,
23
23
  read_configs: [{ id: 1 }],
24
24
  actions: [{ id: 13 }],
@@ -5,7 +5,7 @@ import Text from '../../../Text';
5
5
  import LastUpdatedText from '../../../Device/LastUpdatedText';
6
6
  import { EvaluationConfigWrapper } from '../EvaluationOverConfig/EvaluationOverConfig';
7
7
  import IconComponent from '../../../IconComponent';
8
- import { IconOutline } from '@ant-design/icons-react-native';
8
+ import AntDesign from 'react-native-vector-icons/AntDesign';
9
9
 
10
10
  const ConfigAndEvaluationDisplay = memo(
11
11
  ({ device, valueEvaluation, stationItem, configValue }) => {
@@ -44,7 +44,7 @@ const ConfigAndEvaluationDisplay = memo(
44
44
  lastUpdated={configValue?.last_updated}
45
45
  format={'DDMMYYYY'}
46
46
  />
47
- <IconOutline style={styles.marginTop10} name="right" size={12} />
47
+ <AntDesign style={styles.marginTop10} name="right" size={12} />
48
48
  </View>
49
49
  )}
50
50
  </>
@@ -5,7 +5,7 @@ import Text from '../../../Text';
5
5
  import { useConfigGlobalState } from '../../../../iot/states';
6
6
  import LastUpdatedText from '../../../Device/LastUpdatedText';
7
7
  import IconComponent from '../../../IconComponent';
8
- import { IconOutline } from '@ant-design/icons-react-native';
8
+ import AntDesign from 'react-native-vector-icons/AntDesign';
9
9
 
10
10
  const ConfigValue = ({ device, stationItem }) => {
11
11
  const [configValues] = useConfigGlobalState('configValues');
@@ -40,7 +40,7 @@ const ConfigValue = ({ device, stationItem }) => {
40
40
  lastUpdated={configValue?.last_updated}
41
41
  format={'DDMMYYYY'}
42
42
  />
43
- <IconOutline style={styles.marginTop10} name="right" size={12} />
43
+ <AntDesign style={styles.marginTop10} name="right" size={12} />
44
44
  </View>
45
45
  )}
46
46
  </View>
@@ -9,7 +9,7 @@ import {
9
9
  } from '../../../../screens/Device/hooks/useEvaluateValue';
10
10
  import LastUpdatedText from '../../../Device/LastUpdatedText';
11
11
  import IconComponent from '../../../IconComponent';
12
- import { IconOutline } from '@ant-design/icons-react-native';
12
+ import AntDesign from 'react-native-vector-icons/AntDesign';
13
13
 
14
14
  export const EvaluationConfigWrapper = memo(
15
15
  ({ device, stationItem, Child }) => {
@@ -69,7 +69,7 @@ const EvaluationOverConfigDisplay = memo(
69
69
  lastUpdated={configValue?.last_updated}
70
70
  format={'DDMMYYYY'}
71
71
  />
72
- <IconOutline style={styles.marginTop10} name="right" size={12} />
72
+ <AntDesign style={styles.marginTop10} name="right" size={12} />
73
73
  </View>
74
74
  )}
75
75
  </View>
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { View, StyleSheet, Image } from 'react-native';
3
- import { IconOutline } from '@ant-design/icons-react-native';
3
+ import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
4
4
 
5
5
  import { Colors, Images } from '../../../configs';
6
6
  import Text from '../../Text';
@@ -27,8 +27,8 @@ const SubUnitCard = ({ onPressItem, devices, name, id }) => {
27
27
  </Text>
28
28
  <Text style={[styles.subText]}>{devices + ' devices'}</Text>
29
29
  </View>
30
- <IconOutline
31
- name="more"
30
+ <MaterialIcons
31
+ name="more-vert"
32
32
  color={Colors.White}
33
33
  size={24}
34
34
  onPress={() => {}}
@@ -1,12 +1,12 @@
1
1
  import React, { memo, useCallback } from 'react';
2
2
  import { TouchableOpacity, TouchableWithoutFeedback, 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 moment from 'moment';
5
5
  import Text from '../../Text';
6
6
  import { API, Colors } from '../../../configs';
7
- import OneTap from '../../../../assets/images/OneTap.svg';
8
- import ValueChange from '../../../../assets/images/ValueChange.svg';
9
- import Schedule from '../../../../assets/images/Schedule.svg';
7
+ import OneTap from '../../../../assets/images/Scenario-filled.svg';
8
+ import ValueChange from '../../../../assets/images/Automation-fill.svg';
9
+ import Schedule from '../../../../assets/images/schedule-fill.svg';
10
10
  import Event from '../../../../assets/images/Event.svg';
11
11
  import CheckCircle from '../../../../assets/images/CheckCircle.svg';
12
12
  import FImage from '../../FImage';
@@ -107,7 +107,7 @@ const ItemOneTap = memo(({ automate = {}, wrapSyles, onPressItem }) => {
107
107
  >
108
108
  {activateAt && t('activated_time', { time: activateAt })}
109
109
  </Text>
110
- <IconOutline name="right" size={12} />
110
+ <AntDesign name="right" size={12} />
111
111
  </View>
112
112
  </TouchableOpacity>
113
113
  </View>
@@ -88,7 +88,7 @@ describe('test Item', () => {
88
88
  await act(async () => {
89
89
  await item[0].props.onPress();
90
90
  });
91
- expect(mockedNavigate).toHaveBeenCalledWith(Routes.ScenarioName, {
91
+ expect(global.mockedNavigate).toHaveBeenCalledWith(Routes.ScenarioName, {
92
92
  automate: {
93
93
  type: 'one_tap',
94
94
  unit: undefined,
@@ -106,7 +106,7 @@ describe('test Item', () => {
106
106
  await act(async () => {
107
107
  await goDetail[0].props.onPress();
108
108
  });
109
- expect(mockedNavigate).toHaveBeenCalledWith(Routes.ScriptDetail, {
109
+ expect(global.mockedNavigate).toHaveBeenCalledWith(Routes.ScriptDetail, {
110
110
  id: 1,
111
111
  preAutomate: data.listAutomate[0].data[0],
112
112
  });
@@ -193,7 +193,7 @@ describe('test Item', () => {
193
193
  await act(async () => {
194
194
  await goDetail[0].props.onPress();
195
195
  });
196
- expect(mockedNavigate).toHaveBeenCalledWith(Routes.ScriptDetail, {
196
+ expect(global.mockedNavigate).toHaveBeenCalledWith(Routes.ScriptDetail, {
197
197
  id: 1,
198
198
  preAutomate: data.listAutomate[0].data[0],
199
199
  });
@@ -238,10 +238,13 @@ describe('test Item', () => {
238
238
  await act(async () => {
239
239
  await item[0].props.onPress();
240
240
  });
241
- expect(mockedNavigate).toHaveBeenCalledWith(Routes.AddAutomationTypeSmart, {
242
- automate: { unit: undefined },
243
- closeScreen: undefined,
244
- });
241
+ expect(global.mockedNavigate).toHaveBeenCalledWith(
242
+ Routes.AddAutomationTypeSmart,
243
+ {
244
+ automate: { unit: undefined },
245
+ closeScreen: undefined,
246
+ }
247
+ );
245
248
  mockedNavigate.mockClear();
246
249
 
247
250
  const goDetail = tree.root.findAll(
@@ -286,7 +289,7 @@ describe('test Item', () => {
286
289
  await act(async () => {
287
290
  await item[0].props.onPress();
288
291
  });
289
- expect(mockedNavigate).not.toBeCalled();
292
+ expect(global.mockedNavigate).not.toBeCalled();
290
293
  expect(spyToastError).toBeCalledWith(
291
294
  getTranslate('en', 'reach_max_automations_per_unit', { length: 0 }),
292
295
  '',