@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
@@ -7,17 +7,6 @@ import { AccessibilityLabel } from '../../../../../configs/Constants';
7
7
  import { SCProvider } from '../../../../../context';
8
8
  import WheelDateTimePicker from '../../../../WheelDateTimePicker';
9
9
 
10
- const mockNavigate = jest.fn();
11
- jest.mock('@react-navigation/native', () => {
12
- return {
13
- ...jest.requireActual('@react-navigation/native'),
14
- useRoute: jest.fn(),
15
- useNavigation: () => ({
16
- navigate: mockNavigate,
17
- }),
18
- };
19
- });
20
-
21
10
  const wrapComponent = () => (
22
11
  <SCProvider initState={mockSCStore({})}>
23
12
  <SetupGeneratePasscode />
@@ -27,10 +16,6 @@ const wrapComponent = () => (
27
16
  describe('Test SetupGeneratePasscode', () => {
28
17
  let tree;
29
18
 
30
- beforeEach(() => {
31
- mockNavigate.mockClear();
32
- });
33
-
34
19
  const getElement = (instance) => {
35
20
  const changeName = instance.findAll(
36
21
  (item) =>
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { View, Switch } 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 Text from '../../Text';
6
6
  import styles from './OnOffSimpleTemplateStyle';
@@ -15,7 +15,7 @@ const OnOffSimpleTemplate = ({
15
15
  return (
16
16
  <View style={styles.wrap}>
17
17
  <View style={styles.iconAndText}>
18
- <IconOutline name="poweroff" size={20} style={styles.marginRight} />
18
+ <AntDesign name="poweroff" size={20} style={styles.marginRight} />
19
19
  <Text type="H4">{actionGroup.title}</Text>
20
20
  </View>
21
21
  {isOn !== null && (
@@ -1,6 +1,6 @@
1
1
  import React, { useCallback, useEffect, useMemo, useState } from 'react';
2
2
  import { View, TouchableOpacity, ScrollView } 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
  import Text from '../../commons/Text';
@@ -139,7 +139,7 @@ const OptionsDropdownActionTemplate = ({
139
139
  >
140
140
  {displaySelected}
141
141
  </Text>
142
- <IconOutline name="right" size={20} />
142
+ <AntDesign name="right" size={20} />
143
143
  </TouchableOpacity>
144
144
  <AlertAction
145
145
  visible={stateAlert.visible}
@@ -5,7 +5,7 @@ import styles from './SmartTiviActionTemplateStyles';
5
5
  import Text from '../../Text';
6
6
  import { Colors } from '../../../configs';
7
7
  import { SMART_TIVI_BUTTON } from '../../../configs/Constants';
8
- import { IconOutline } from '@ant-design/icons-react-native';
8
+ import AntDesign from 'react-native-vector-icons/AntDesign';
9
9
  import CircleButton from './component/CircleButton';
10
10
  import RectangleButton from './component/RectangleButton';
11
11
  import ControlPlay from './component/ControlPlay';
@@ -97,7 +97,7 @@ const SmartTiviActionTemplate = memo(
97
97
  <CircleButton
98
98
  type="small"
99
99
  icon={
100
- <IconOutline
100
+ <AntDesign
101
101
  name="poweroff"
102
102
  size={20}
103
103
  color={Colors.Gray6}
@@ -3,7 +3,7 @@ import { TouchableOpacity, View, Image } from 'react-native';
3
3
  import styles from './CircleButtonStyles';
4
4
  import Text from '../../../Text';
5
5
  import { Colors, Images } from '../../../../configs';
6
- import { IconOutline } from '@ant-design/icons-react-native';
6
+ import AntDesign from 'react-native-vector-icons/AntDesign';
7
7
  import { AccessibilityLabel } from '../../../../configs/Constants';
8
8
 
9
9
  const CircleButton = memo(
@@ -46,7 +46,7 @@ const CircleButton = memo(
46
46
  AccessibilityLabel.SMART_TIVI_TEMPLATE.UP_BUTTON
47
47
  }
48
48
  >
49
- <IconOutline size={14} name={'caret-up'} />
49
+ <AntDesign size={14} name={'caretup'} />
50
50
  </TouchableOpacity>
51
51
  </View>
52
52
  <View style={styles.bodyMultipleButton}>
@@ -57,7 +57,7 @@ const CircleButton = memo(
57
57
  AccessibilityLabel.SMART_TIVI_TEMPLATE.LEFT_BUTTON
58
58
  }
59
59
  >
60
- <IconOutline size={14} name={'caret-left'} />
60
+ <AntDesign size={14} name={'caretleft'} />
61
61
  </TouchableOpacity>
62
62
  <TouchableOpacity
63
63
  style={[styles.okButton]}
@@ -77,7 +77,7 @@ const CircleButton = memo(
77
77
  AccessibilityLabel.SMART_TIVI_TEMPLATE.RIGHT_BUTTON
78
78
  }
79
79
  >
80
- <IconOutline size={14} name={'caret-right'} />
80
+ <AntDesign size={14} name={'caret-right'} />
81
81
  </TouchableOpacity>
82
82
  </View>
83
83
  <View style={styles.footerMultipleButton}>
@@ -88,7 +88,7 @@ const CircleButton = memo(
88
88
  AccessibilityLabel.SMART_TIVI_TEMPLATE.DOWN_BUTTON
89
89
  }
90
90
  >
91
- <IconOutline size={14} name={'caret-down'} />
91
+ <AntDesign size={14} name={'caretdown'} />
92
92
  </TouchableOpacity>
93
93
  </View>
94
94
  </View>
@@ -6,7 +6,7 @@ import styles from './ControlPlayStyles';
6
6
  import { Pause } from './Icon';
7
7
  import { AccessibilityLabel } from '../../../../configs/Constants';
8
8
 
9
- import { IconOutline } from '@ant-design/icons-react-native';
9
+ import AntDesign from 'react-native-vector-icons/AntDesign';
10
10
 
11
11
  const ControlPlay = memo(
12
12
  ({ onPressPrev, onPressStop, onPressNext, wrapStyle }) => {
@@ -19,9 +19,9 @@ const ControlPlay = memo(
19
19
  AccessibilityLabel.SMART_TIVI_TEMPLATE.PREV_BUTTON
20
20
  }
21
21
  >
22
- <IconOutline
22
+ <AntDesign
23
23
  size={32}
24
- name={'backward'}
24
+ name={'stepbackward'}
25
25
  color={Colors.Gray9}
26
26
  style={[styles.button]}
27
27
  />
@@ -42,9 +42,9 @@ const ControlPlay = memo(
42
42
  AccessibilityLabel.SMART_TIVI_TEMPLATE.NEXT_BUTTON
43
43
  }
44
44
  >
45
- <IconOutline
45
+ <AntDesign
46
46
  size={32}
47
- name={'forward'}
47
+ name={'stepforward'}
48
48
  color={Colors.Gray9}
49
49
  style={[styles.button]}
50
50
  />
@@ -6,7 +6,7 @@ import React, {
6
6
  useState,
7
7
  } from 'react';
8
8
  import { View, TouchableOpacity } from 'react-native';
9
- import { IconOutline } from '@ant-design/icons-react-native';
9
+ import AntDesign from 'react-native-vector-icons/AntDesign';
10
10
  import Text from '../../commons/Text';
11
11
  import { useConfigGlobalState } from '../../iot/states';
12
12
  import styles from './TerminalBoxTemplateStyle';
@@ -174,7 +174,7 @@ const TerminalBoxTemplate = ({ item, doAction, isWidgetOrder }) => {
174
174
  accessibilityLabel={AccessibilityLabel.TERMINAL_BOX_BUTTON_SEND}
175
175
  disabled={!value}
176
176
  >
177
- <IconOutline name="send" size={25} />
177
+ <AntDesign name="send" size={25} />
178
178
  </TouchableOpacity>
179
179
  </View>
180
180
  </View>
@@ -1,6 +1,6 @@
1
1
  import React, { useCallback, useMemo, useState } from 'react';
2
2
  import { View, TouchableOpacity } from 'react-native';
3
- import { IconOutline } from '@ant-design/icons-react-native';
3
+ import AntDesign from 'react-native-vector-icons/AntDesign';
4
4
  import Text from '../../commons/Text';
5
5
  import { AlertAction } from '../../commons';
6
6
  import { useDropdownAction } from './hooks/useDropdownAction';
@@ -48,7 +48,7 @@ const TextBoxTemplate = ({ item, doAction, isWidgetOrder }) => {
48
48
  onPress={onShowAlert}
49
49
  accessibilityLabel={AccessibilityLabel.TEXT_BOX_BUTTON_EDIT}
50
50
  >
51
- <IconOutline name="edit" size={25} />
51
+ <AntDesign name="edit" size={25} />
52
52
  </TouchableOpacity>
53
53
  </View>
54
54
  <AlertAction
@@ -23,7 +23,7 @@ describe('Test ThreeButtonTemplate', () => {
23
23
  command_prefer_over_googlehome: false,
24
24
  command_prefer_over_internet: false,
25
25
  googlehome_actions: [],
26
- icon: 'caret-up',
26
+ icon: 'caretup',
27
27
  id: 9,
28
28
  key: '2b949045-8e03-4c07-a855-7794ade2e69c',
29
29
  },
@@ -45,13 +45,13 @@ describe('Test ThreeButtonTemplate', () => {
45
45
  command_prefer_over_googlehome: false,
46
46
  command_prefer_over_internet: false,
47
47
  googlehome_actions: [],
48
- icon: 'caret-down',
48
+ icon: 'caretdown',
49
49
  id: 10,
50
50
  key: 'a492e08c-8cb1-44ee-8ea0-46aaca4e5141',
51
51
  },
52
- icon1: 'caret-up',
52
+ icon1: 'caretup',
53
53
  icon2: 'stop',
54
- icon3: 'caret-down',
54
+ icon3: 'caretdown',
55
55
  text1: 'UP',
56
56
  text2: 'STOP/UNLOCK',
57
57
  text3: 'DOWN',
@@ -1,9 +1,8 @@
1
1
  import React, { useCallback, useMemo, useState } from 'react';
2
2
  import { Switch, TouchableOpacity, View } from 'react-native';
3
- import { Icon } from '@ant-design/react-native';
3
+ import AntDesign from 'react-native-vector-icons/AntDesign';
4
4
  import DateTimePickerModal from 'react-native-modal-datetime-picker';
5
5
  import moment from 'moment';
6
- import { IconOutline } from '@ant-design/icons-react-native';
7
6
  import { watchMultiConfigs } from '../../iot/Monitor';
8
7
 
9
8
  import { useTranslations } from '../../hooks/Common/useTranslations';
@@ -184,7 +183,7 @@ const TimerActionTemplate = ({ item = {}, doAction, sensor = {} }) => {
184
183
  <Text>{title}</Text>
185
184
  {configuration.config_hour && configuration.config_minute && (
186
185
  <View style={styles.wrapTimer}>
187
- <Icon style={styles.iconClockCircle} name={'clock-circle'} />
186
+ <AntDesign style={styles.iconClockCircle} name={'clock-circle'} />
188
187
  <Text type="Label" color={Colors.Gray7}>
189
188
  {textTimer ? textTimer : t('set_time')}
190
189
  </Text>
@@ -194,7 +193,7 @@ const TimerActionTemplate = ({ item = {}, doAction, sensor = {} }) => {
194
193
  {configuration.config_hour && !configuration.config_minute && (
195
194
  <View style={styles.timerButton}>
196
195
  <Text style={styles.textTimerEndLine}>{textTimer}</Text>
197
- <IconOutline name="right" size={20} />
196
+ <AntDesign name="right" size={20} />
198
197
  </View>
199
198
  )}
200
199
  </TouchableOpacity>
@@ -210,7 +209,7 @@ const TimerActionTemplate = ({ item = {}, doAction, sensor = {} }) => {
210
209
  )}
211
210
  <DateTimePickerModal
212
211
  isVisible={showTime}
213
- date={dataTime ? dataTime.valueOf() : moment().valueOf()}
212
+ date={new Date(dataTime ? dataTime.valueOf() : moment().valueOf())}
214
213
  mode="time"
215
214
  onConfirm={onConfirmTime}
216
215
  onCancel={onHideTime}
@@ -1,4 +1,4 @@
1
- import { Icon } from '@ant-design/react-native';
1
+ import AntDesign from 'react-native-vector-icons/AntDesign';
2
2
  import React, { memo, useState, useCallback, useEffect } from 'react';
3
3
  import { TouchableOpacity, View } from 'react-native';
4
4
 
@@ -122,7 +122,7 @@ const TwoButtonTemplate = memo(({ item = {}, doAction, sensor = {} }) => {
122
122
  key={index}
123
123
  >
124
124
  <View style={styles.smallCircle}>
125
- <Icon
125
+ <AntDesign
126
126
  name={button?.isCheckOnOff ? button?.icon_on : button?.icon_off}
127
127
  size={44}
128
128
  color={button?.isCheckOnOff ? Colors.Green7 : Colors.Gray6}
@@ -1,5 +1,5 @@
1
1
  import { watchMultiConfigs } from '../../../iot/Monitor';
2
- import React from 'react';
2
+ import React, { useContext } from 'react';
3
3
  import { act, create } from 'react-test-renderer';
4
4
  import ColorPickerTemplate from '../ColorPickerTemplate';
5
5
  import { WheelColorPicker } from '../ColorPickerTemplate';
@@ -10,14 +10,6 @@ import ColorPicker from 'react-native-wheel-color-picker';
10
10
  import { DEVICE_TYPE } from '../../../configs/Constants';
11
11
 
12
12
  const mockSetAction = jest.fn();
13
- jest.mock('react', () => {
14
- return {
15
- ...jest.requireActual('react'),
16
- useContext: () => ({
17
- setAction: mockSetAction,
18
- }),
19
- };
20
- });
21
13
 
22
14
  jest.mock('../../../iot/Monitor');
23
15
  const mockDoAction = jest.fn();
@@ -55,6 +47,9 @@ describe('Test ColorPickerTemplate', () => {
55
47
  title: '',
56
48
  };
57
49
  mockSetAction.mockClear();
50
+ useContext.mockReturnValue({
51
+ setAction: mockSetAction,
52
+ });
58
53
  });
59
54
 
60
55
  it('render template ColorPickerTemplate', async () => {
@@ -13,13 +13,6 @@ jest.mock('../../../iot/states', () => ({
13
13
  useConfigGlobalState: () => [{ 5: { value: 25 } }, null],
14
14
  }));
15
15
 
16
- jest.mock('@react-navigation/native', () => {
17
- return {
18
- ...jest.requireActual('@react-navigation/native'),
19
- useFocusEffect: jest.fn(),
20
- };
21
- });
22
-
23
16
  describe('Test NumberUpDownTemplate', () => {
24
17
  const actionData = {
25
18
  color: '#00979D',
@@ -27,7 +20,7 @@ describe('Test NumberUpDownTemplate', () => {
27
20
  command_prefer_over_googlehome: false,
28
21
  command_prefer_over_internet: false,
29
22
  googlehome_actions: [],
30
- icon: 'caret-up',
23
+ icon: 'caretup',
31
24
  id: 20,
32
25
  key: '5ed1d4dc-a905-47cd-b0c9-f979644bd21a',
33
26
  };
@@ -396,7 +389,7 @@ describe('Test NumberUpDownTemplate', () => {
396
389
  command_prefer_over_googlehome: false,
397
390
  command_prefer_over_internet: false,
398
391
  googlehome_actions: [],
399
- icon: 'caret-up',
392
+ icon: 'caretup',
400
393
  id: 20,
401
394
  key: '5ed1d4dc-a905-47cd-b0c9-f979644bd21a',
402
395
  },
@@ -18,13 +18,6 @@ const wrapComponent = (item, mockDoAction) => (
18
18
  </SCProvider>
19
19
  );
20
20
 
21
- jest.mock('@react-navigation/native', () => {
22
- return {
23
- ...jest.requireActual('@react-navigation/native'),
24
- useFocusEffect: jest.fn(),
25
- };
26
- });
27
-
28
21
  describe('Test OneBigButtonTemplate', () => {
29
22
  const actionOnData = {
30
23
  color: '#00979D',
@@ -32,7 +25,7 @@ describe('Test OneBigButtonTemplate', () => {
32
25
  command_prefer_over_googlehome: false,
33
26
  command_prefer_over_internet: false,
34
27
  googlehome_actions: [],
35
- icon: 'caret-up',
28
+ icon: 'caretup',
36
29
  id: 20,
37
30
  key: '5ed1d4dc-a905-47cd-b0c9-f979644bd21a',
38
31
  };
@@ -43,7 +36,7 @@ describe('Test OneBigButtonTemplate', () => {
43
36
  command_prefer_over_googlehome: false,
44
37
  command_prefer_over_internet: false,
45
38
  googlehome_actions: [],
46
- icon: 'caret-up',
39
+ icon: 'caretup',
47
40
  id: 20,
48
41
  key: '5ed1d4dc-a905-47cd-b0c9-f979644bd21a',
49
42
  };
@@ -51,11 +44,11 @@ describe('Test OneBigButtonTemplate', () => {
51
44
  configuration: {
52
45
  action_on: '5ed1d4dc-a905-47cd-b0c9-f979644bd21a',
53
46
  action_on_data: actionOnData,
54
- icon_on: 'caret-up',
47
+ icon_on: 'caretup',
55
48
  text_on: 'ON',
56
49
  action_off: '5ed1d4dc-a905-47cd-b0c9-f979644bd21b',
57
50
  action_off_data: actionOffData,
58
- icon_off: 'caret-up',
51
+ icon_off: 'caretup',
59
52
  text_off: 'OFF',
60
53
  config: 1,
61
54
  },
@@ -13,13 +13,6 @@ jest.mock('../../../iot/states', () => ({
13
13
  useConfigGlobalState: jest.fn(),
14
14
  }));
15
15
 
16
- jest.mock('@react-navigation/native', () => {
17
- return {
18
- ...jest.requireActual('@react-navigation/native'),
19
- useFocusEffect: jest.fn(),
20
- };
21
- });
22
-
23
16
  const wrapComponent = (item, doAction, sensor) => (
24
17
  <SCProvider initState={mockSCStore({})}>
25
18
  <OnOffSmartLock item={item} doAction={doAction} sensor={sensor} />
@@ -36,7 +29,7 @@ describe('Test OnOffTemplate', () => {
36
29
  command_prefer_over_googlehome: false,
37
30
  command_prefer_over_internet: false,
38
31
  googlehome_actions: [],
39
- icon: 'caret-up',
32
+ icon: 'caretup',
40
33
  id: 20,
41
34
  key: 'key-2',
42
35
  };
@@ -46,7 +39,7 @@ describe('Test OnOffTemplate', () => {
46
39
  command_prefer_over_googlehome: false,
47
40
  command_prefer_over_internet: false,
48
41
  googlehome_actions: [],
49
- icon: 'caret-up',
42
+ icon: 'caretup',
50
43
  id: 20,
51
44
  key: 'key-3',
52
45
  };
@@ -1,8 +1,7 @@
1
1
  import React from 'react';
2
- import { View } from 'react-native';
3
2
  import { act, create } from 'react-test-renderer';
4
3
 
5
- import { DEVICE_TYPE, AccessibilityLabel } from '../../../configs/Constants';
4
+ import { DEVICE_TYPE } from '../../../configs/Constants';
6
5
  import { watchMultiConfigs } from '../../../iot/Monitor';
7
6
  import OnOffTemplate from '../OnOffTemplate';
8
7
  import OnOffButtonTemplate from '../OnOffTemplate/OnOffButtonTemplate';
@@ -22,13 +21,6 @@ jest.mock('../../../iot/states', () => ({
22
21
  useConfigGlobalState: () => [{ 5: { value: 2 } }, null],
23
22
  }));
24
23
 
25
- jest.mock('@react-navigation/native', () => {
26
- return {
27
- ...jest.requireActual('@react-navigation/native'),
28
- useFocusEffect: jest.fn(),
29
- };
30
- });
31
-
32
24
  describe('Test OnOffTemplate', () => {
33
25
  let displayItem;
34
26
  let tree;
@@ -40,7 +32,7 @@ describe('Test OnOffTemplate', () => {
40
32
  command_prefer_over_googlehome: false,
41
33
  command_prefer_over_internet: false,
42
34
  googlehome_actions: [],
43
- icon: 'caret-up',
35
+ icon: 'caretup',
44
36
  id: 20,
45
37
  key: 'key-1',
46
38
  };
@@ -50,7 +42,7 @@ describe('Test OnOffTemplate', () => {
50
42
  command_prefer_over_googlehome: false,
51
43
  command_prefer_over_internet: false,
52
44
  googlehome_actions: [],
53
- icon: 'caret-up',
45
+ icon: 'caretup',
54
46
  id: 20,
55
47
  key: 'key-2',
56
48
  };
@@ -60,7 +52,7 @@ describe('Test OnOffTemplate', () => {
60
52
  command_prefer_over_googlehome: false,
61
53
  command_prefer_over_internet: false,
62
54
  googlehome_actions: [],
63
- icon: 'caret-up',
55
+ icon: 'caretup',
64
56
  id: 20,
65
57
  key: 'key-3',
66
58
  };
@@ -113,14 +105,8 @@ describe('Test OnOffTemplate', () => {
113
105
  });
114
106
  const instance = tree.root;
115
107
 
116
- const templateOnOffButton = instance.findAll(
117
- (el) =>
118
- el.props.accessibilityLabel ===
119
- AccessibilityLabel.ON_OFF_BUTTON_ACTION_TEMPLATE && el.type === View
120
- );
121
108
  const templateOnOffSimple = instance.findAllByType(OnOffSimpleTemplate);
122
109
 
123
- expect(templateOnOffButton).not.toHaveLength(1);
124
110
  expect(templateOnOffSimple).not.toHaveLength(1);
125
111
  });
126
112
 
@@ -30,7 +30,7 @@ describe('Test OneBigButtonTemplate', () => {
30
30
  command_prefer_over_googlehome: false,
31
31
  command_prefer_over_internet: false,
32
32
  googlehome_actions: [],
33
- icon: 'caret-up',
33
+ icon: 'caretup',
34
34
  id: 20,
35
35
  key: '5ed1d4dc-a905-47cd-b0c9-f979644bd21a',
36
36
  };
@@ -38,7 +38,7 @@ describe('Test OneBigButtonTemplate', () => {
38
38
  configuration: {
39
39
  action: '5ed1d4dc-a905-47cd-b0c9-f979644bd21a',
40
40
  action_data: actionData,
41
- icon: 'caret-up',
41
+ icon: 'caretup',
42
42
  text: 'UP',
43
43
  },
44
44
  };
@@ -30,13 +30,6 @@ jest.mock('../../../iot/states', () => ({
30
30
  useConfigGlobalState: () => [{ 5: { value: 2 } }, null],
31
31
  }));
32
32
 
33
- jest.mock('@react-navigation/native', () => {
34
- return {
35
- ...jest.requireActual('@react-navigation/native'),
36
- useFocusEffect: jest.fn(),
37
- };
38
- });
39
-
40
33
  describe('Test OptionsDropdownActionTemplate', () => {
41
34
  const actionData = {
42
35
  color: '#00979D',
@@ -44,7 +37,7 @@ describe('Test OptionsDropdownActionTemplate', () => {
44
37
  command_prefer_over_googlehome: false,
45
38
  command_prefer_over_internet: false,
46
39
  googlehome_actions: [],
47
- icon: 'caret-up',
40
+ icon: 'caretup',
48
41
  id: 20,
49
42
  key: '5ed1d4dc-a905-47cd-b0c9-f979644bd21a',
50
43
  };
@@ -8,13 +8,6 @@ import { DEVICE_TYPE } from '../../../configs/Constants';
8
8
  const mockDoAction = jest.fn();
9
9
  const mockActionData = jest.fn();
10
10
 
11
- jest.mock('@react-navigation/native', () => {
12
- return {
13
- ...jest.requireActual('@react-navigation/native'),
14
- useFocusEffect: jest.fn(),
15
- };
16
- });
17
-
18
11
  describe('Test StatesGridActionTemplate', () => {
19
12
  let tree;
20
13
  let displayItem;
@@ -17,13 +17,6 @@ const wrapComponent = (item, mockDoAction, isOn) => (
17
17
  </SCProvider>
18
18
  );
19
19
 
20
- jest.mock('@react-navigation/native', () => {
21
- return {
22
- ...jest.requireActual('@react-navigation/native'),
23
- useFocusEffect: jest.fn(),
24
- };
25
- });
26
-
27
20
  describe('Test SwitchButtonTemplate', () => {
28
21
  const actionOnData = {
29
22
  color: '#00979D',
@@ -31,7 +24,7 @@ describe('Test SwitchButtonTemplate', () => {
31
24
  command_prefer_over_googlehome: false,
32
25
  command_prefer_over_internet: false,
33
26
  googlehome_actions: [],
34
- icon: 'caret-up',
27
+ icon: 'caretup',
35
28
  id: 20,
36
29
  key: '5ed1d4dc-a905-47cd-b0c9-f979644bd21a',
37
30
  };
@@ -42,7 +35,7 @@ describe('Test SwitchButtonTemplate', () => {
42
35
  command_prefer_over_googlehome: false,
43
36
  command_prefer_over_internet: false,
44
37
  googlehome_actions: [],
45
- icon: 'caret-up',
38
+ icon: 'caretup',
46
39
  id: 20,
47
40
  key: '5ed1d4dc-a905-47cd-b0c9-f979644bd21a',
48
41
  };
@@ -50,11 +43,11 @@ describe('Test SwitchButtonTemplate', () => {
50
43
  configuration: {
51
44
  action_on: '5ed1d4dc-a905-47cd-b0c9-f979644bd21a',
52
45
  action_on_data: actionOnData,
53
- icon_on: 'caret-up',
46
+ icon_on: 'caretup',
54
47
  text_on: 'ON',
55
48
  action_off: '5ed1d4dc-a905-47cd-b0c9-f979644bd21b',
56
49
  action_off_data: actionOffData,
57
- icon_off: 'caret-up',
50
+ icon_off: 'caretup',
58
51
  text_off: 'OFF',
59
52
  config: 1,
60
53
  },
@@ -67,12 +60,8 @@ describe('Test SwitchButtonTemplate', () => {
67
60
  await act(async () => {
68
61
  wrapper = await create(wrapComponent(displayItem, mockDoAction));
69
62
  });
70
-
71
- const renderJson = wrapper.toJSON();
72
63
  const switchButton = wrapper.root.findByType(Switch);
73
64
 
74
- expect(renderJson[1].props?.visible).toEqual(false);
75
- expect(renderJson[1]?.type).toEqual('Modal');
76
65
  expect(switchButton.props.value).toEqual(state);
77
66
  };
78
67
 
@@ -30,13 +30,6 @@ jest.mock('../../../iot/states', () => ({
30
30
  useConfigGlobalState: () => [{ 5: { value: 2 } }, null],
31
31
  }));
32
32
 
33
- jest.mock('@react-navigation/native', () => {
34
- return {
35
- ...jest.requireActual('@react-navigation/native'),
36
- useFocusEffect: jest.fn(),
37
- };
38
- });
39
-
40
33
  describe('Test TerminalBoxTemplate', () => {
41
34
  let displayItem;
42
35
  let sensor;
@@ -27,13 +27,6 @@ jest.mock('../../../iot/states', () => ({
27
27
  useConfigGlobalState: () => [{ 5: { value: 2 } }, null],
28
28
  }));
29
29
 
30
- jest.mock('@react-navigation/native', () => {
31
- return {
32
- ...jest.requireActual('@react-navigation/native'),
33
- useFocusEffect: jest.fn(),
34
- };
35
- });
36
-
37
30
  describe('Test TextBoxTemplate', () => {
38
31
  const actionData = {
39
32
  color: '#00979D',
@@ -41,7 +34,7 @@ describe('Test TextBoxTemplate', () => {
41
34
  command_prefer_over_googlehome: false,
42
35
  command_prefer_over_internet: false,
43
36
  googlehome_actions: [],
44
- icon: 'caret-up',
37
+ icon: 'caretup',
45
38
  id: 20,
46
39
  key: '5ed1d4dc-a905-47cd-b0c9-f979644bd21a',
47
40
  };