@eohjsc/react-native-smart-city 0.6.2 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/android/build.gradle +7 -10
- package/package.json +53 -70
- package/src/commons/Action/__test__/ItemQuickAction.test.js +2 -2
- package/src/commons/ActionGroup/NumberUpDownActionTemplate.js +3 -3
- package/src/commons/ActionGroup/OnOffSmartLock/AutoLock/ButtonWrapper.js +3 -3
- package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/__test__/ItemPasscode.test.js +2 -2
- package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/__test__/index.test.js +3 -3
- package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/index.js +3 -3
- package/src/commons/ActionGroup/OnOffSmartLock/SetupGeneratePasscode/ButtonWrapper.js +2 -2
- package/src/commons/ActionGroup/OnOffSmartLock/SetupGeneratePasscode/__test__/index.test.js +0 -15
- package/src/commons/ActionGroup/OnOffTemplate/OnOffSimpleTemplate.js +2 -2
- package/src/commons/ActionGroup/OptionsDropdownActionTemplate.js +2 -2
- package/src/commons/ActionGroup/SmartTiviActionTemplate/SmartTiviActionTemplate.js +2 -2
- package/src/commons/ActionGroup/SmartTiviActionTemplate/component/CircleButton.js +5 -5
- package/src/commons/ActionGroup/SmartTiviActionTemplate/component/ControlPlay.js +5 -5
- package/src/commons/ActionGroup/TerminalBoxTemplate.js +2 -2
- package/src/commons/ActionGroup/TextBoxTemplate.js +2 -2
- package/src/commons/ActionGroup/ThreeButtonTemplate/__test__/ThreeButtonTemplate.test.js +4 -4
- package/src/commons/ActionGroup/TimerActionTemplate.js +4 -5
- package/src/commons/ActionGroup/TwoButtonTemplate/index.js +2 -2
- package/src/commons/ActionGroup/__test__/ColorPickerTemplate.test.js +4 -9
- package/src/commons/ActionGroup/__test__/NumberUpDownTemplate.test.js +2 -9
- package/src/commons/ActionGroup/__test__/OnOffButtonTemplate.test.js +4 -11
- package/src/commons/ActionGroup/__test__/OnOffSmartLock.test.js +2 -9
- package/src/commons/ActionGroup/__test__/OnOffTemplate.test.js +4 -18
- package/src/commons/ActionGroup/__test__/OneBigButtonTemplate.test.js +2 -2
- package/src/commons/ActionGroup/__test__/OptionsDropdownTemplate.test.js +1 -8
- package/src/commons/ActionGroup/__test__/StatesGridActionTemplate.test.js +0 -7
- package/src/commons/ActionGroup/__test__/SwitchButtonTemplate.test.js +4 -15
- package/src/commons/ActionGroup/__test__/TerminalBoxTemplate.test.js +0 -7
- package/src/commons/ActionGroup/__test__/TextBoxTemplate.test.js +1 -8
- package/src/commons/ActionGroup/__test__/TimerActionTemplate.test.js +8 -15
- package/src/commons/ActionGroup/__test__/TimerActionTemplateWithutConfigValue.test.js +2 -10
- package/src/commons/ActionGroup/__test__/TwoButtonTemplate.test.js +3 -20
- package/src/commons/ActionGroup/__test__/index.test.js +15 -23
- package/src/commons/ActionTemplate/__test__/index.test.js +2 -0
- package/src/commons/ActionTemplate/__test__/utils.js +21 -0
- package/src/commons/ActionTemplate/index.js +1 -2
- package/src/commons/BackDefault/index.js +2 -2
- package/src/commons/ButtonPopup/index.js +2 -2
- package/src/commons/Calendar/__test__/Calendar.test.js +0 -7
- package/src/commons/CircleButton/__test__/CircleButton.test.js +2 -2
- package/src/commons/Dashboard/MyPinnedSharedUnit/__test__/MyPinnedSharedUnit.test.js +11 -25
- package/src/commons/Dashboard/MyUnit/__test__/MyUnit.test.js +27 -20
- package/src/commons/Dashboard/MyUnit/index.js +0 -1
- package/src/commons/DateTimeRangeChange/DateTimeButton.js +2 -2
- package/src/commons/DateTimeRangeChange/__test__/DateTimeButton.test.js +4 -4
- package/src/commons/DateTimeRangeChange/index.js +2 -2
- package/src/commons/Device/ConnectedViewHeader.js +2 -2
- package/src/commons/Device/DisconnectedView.js +2 -2
- package/src/commons/Device/Emergency/EmergencyDetail.js +3 -3
- package/src/commons/Device/Emergency/__test__/EmergencyDetail.test.js +2 -2
- package/src/commons/Device/FlatListItems.js +3 -3
- package/src/commons/Device/Hanet/ItemHanetDevice.js +3 -3
- package/src/commons/Device/Hanet/ItemHanetDevice.test.js +3 -11
- package/src/commons/Device/ItemAddNew/index.js +2 -2
- package/src/commons/Device/ItemDevice.js +2 -2
- package/src/commons/Device/SonosSpeaker/index.js +3 -3
- package/src/commons/Device/WaterPurifierStatus/AlertStatusMachine.js +2 -2
- package/src/commons/Device/WaterQualitySensor/QualityIndicatorsItem.js +2 -6
- package/src/commons/DisplayChecking/index.js +2 -2
- package/src/commons/EmergencyButton/AlertSendConfirm.js +2 -2
- package/src/commons/EmergencyButton/AlertSent.js +6 -2
- package/src/commons/FieldTemplate/ChooseUserField/index.js +2 -2
- package/src/commons/FieldTemplate/PasscodeField/__test__/index.test.js +5 -5
- package/src/commons/FieldTemplate/ScheduleField/__test__/index.test.js +9 -9
- package/src/commons/Form/CurrencyInput.js +1 -15
- package/src/commons/GroupCheckBox/__test__/GroupCheckBox.test.js +1 -22
- package/src/commons/Header/HeaderCustom.js +8 -3
- package/src/commons/HeaderAni/index.js +2 -2
- package/src/commons/IconComponent/index.js +3 -3
- package/src/commons/MediaPlayerDetail/MediaPlayerFull.js +1 -1
- package/src/commons/MediaPlayerDetail/__test__/MediaPlayerFull.test.js +12 -48
- package/src/commons/MenuActionAddnew/__test__/MenuActionAddNew.test.js +1 -1
- package/src/commons/MenuActionList/__test__/MenuActionList.test.js +1 -0
- package/src/commons/NavBar/index.js +2 -2
- package/src/commons/OneTapTemplate/NumberUpDownActionTemplate.js +3 -3
- package/src/commons/PreventAccess/__test__/PreventAccess.test.js +1 -13
- package/src/commons/Processing/__test__/Connecting.test.js +3 -14
- package/src/commons/SearchLocation/index.js +3 -3
- package/src/commons/SelectActionCard/index.js +2 -2
- package/src/commons/SelectSubUnit/__test__/SelectSubUnit.test.js +1 -18
- package/src/commons/SelectSubUnit/index.js +2 -2
- package/src/commons/SelectUnit/__test__/SelectUnit.test.js +1 -13
- package/src/commons/Sharing/BtnRemoveMember.js +2 -2
- package/src/commons/Sharing/StationDevicePermissions.js +2 -2
- package/src/commons/Sharing/WrapHeaderScrollable.js +1 -1
- package/src/commons/Sharing/__test__/ButtonRemoveMember.test.js +2 -2
- package/src/commons/Sharing/__test__/DevicePermissionsCheckbox.test.js +1 -1
- package/src/commons/SubUnit/DeviceTemplate/ConfigAndEvaluation/ConfigAndEvaluation.js +2 -2
- package/src/commons/SubUnit/DeviceTemplate/ConfigValue/ConfigValue.js +2 -2
- package/src/commons/SubUnit/DeviceTemplate/EvaluationOverConfig/EvaluationOverConfig.js +2 -2
- package/src/commons/SubUnit/Item/index.js +3 -3
- package/src/commons/SubUnit/OneTap/ItemOneTap.js +2 -2
- package/src/commons/SubUnit/OneTap/__test__/SubUnitAutomate.test.js +11 -8
- package/src/commons/SubUnit/__test__/Favorites.test.js +1 -13
- package/src/commons/SubUnit/__test__/ShortDetail.test.js +5 -16
- package/src/commons/SummaryItem/index.js +22 -23
- package/src/commons/Tabbar/__test__/index.test.js +0 -11
- package/src/commons/Unit/HeaderUnit/index.js +84 -84
- package/src/commons/Unit/SharedUnit.js +7 -7
- package/src/commons/Unit/__test__/HeaderUnit.test.js +29 -52
- package/src/commons/Unit/__test__/SharedUnit.test.js +94 -105
- package/src/commons/UnitSummary/AirQuality/SegmentedRoundDisplay/index.js +11 -30
- package/src/commons/WrapParallaxScrollView/index.js +21 -50
- package/src/configs/API.js +1 -2
- package/src/hooks/Common/__test__/useAndroidTranslucentStatusBar.test.js +4 -15
- package/src/hooks/Common/useIsOwnerOfUnit.js +1 -1
- package/src/hooks/IoT/__test__/useRemoteControl.test.js +1 -1
- package/src/hooks/IoT/__test__/useWatchConfigs.test.js +6 -21
- package/src/iot/RemoteControl/HomeAssistant.js +1 -1
- package/src/iot/RemoteControl/__test__/Bluetooth.test.js +234 -232
- package/src/navigations/AddDeviceStack.js +2 -2
- package/src/navigations/AddGatewayStack.js +2 -2
- package/src/navigations/AddLGDeviceStack.js +2 -2
- package/src/navigations/AddMemberStack.js +2 -2
- package/src/navigations/AddSubUnitStack.js +2 -2
- package/src/navigations/AddUnitStack.js +2 -2
- package/src/navigations/AllGatewayStack.js +2 -2
- package/src/navigations/AutomateStack.js +4 -4
- package/src/navigations/EmergencyContactsStack.js +4 -4
- package/src/navigations/GatewayStack.js +2 -2
- package/src/navigations/HanetCameraStack.js +2 -2
- package/src/navigations/Main.js +2 -2
- package/src/navigations/NotificationStack.js +2 -2
- package/src/navigations/SharedStack.js +8 -6
- package/src/navigations/SmartAccountStack.js +2 -2
- package/src/navigations/SmartIrStack.js +2 -2
- package/src/navigations/SmartLockStack.js +2 -2
- package/src/navigations/SmartStack.js +2 -2
- package/src/navigations/TemplateStack.js +2 -2
- package/src/navigations/UnitStack.js +4 -12
- package/src/navigations/utils.js +1 -4
- package/src/screens/ActivityLog/hooks/index.js +7 -4
- package/src/screens/ActivityLog/index.js +2 -2
- package/src/screens/AddCommon/__test__/SelectSubUnit.test.js +4 -21
- package/src/screens/AddCommon/__test__/SelectUnit.test.js +7 -19
- package/src/screens/AddLocationMaps/__test__/index.test.js +3 -13
- package/src/screens/AddLocationMaps/index.js +11 -6
- package/src/screens/AddNewDevice/__test__/AddNewDevice.test.js +3 -20
- package/src/screens/AddNewGateway/PlugAndPlay/__test__/FirstWarning.test.js +11 -18
- package/src/screens/AddNewGateway/PlugAndPlay/__test__/ZigbeeDeviceConnectGuide.test.js +4 -21
- package/src/screens/AddNewGateway/RenameNewDevices.js +2 -2
- package/src/screens/AddNewGateway/__test__/AddNewGateway.test.js +3 -3
- package/src/screens/AddNewGateway/__test__/ConnectingModbusDevice.test.js +0 -17
- package/src/screens/AddNewGateway/__test__/ConnectingWifiDevice.test.js +4 -19
- package/src/screens/AddNewGateway/__test__/ConnectingWifiGuide.test.js +3 -15
- package/src/screens/AddNewGateway/__test__/ConnectingZigbeeDevice.test.js +31 -51
- package/src/screens/AddNewGateway/__test__/RenameNewDevices.test.js +9 -22
- package/src/screens/AddNewGateway/__test__/ScanGatewayQR.test.js +12 -19
- package/src/screens/AddNewGateway/__test__/ScanModbusQR.test.js +6 -16
- package/src/screens/AddNewGateway/__test__/ScanWifiDeviceQR.test.js +4 -15
- package/src/screens/AddNewGateway/__test__/SelectDeviceSubUnit.test.js +3 -3
- package/src/screens/AddNewGateway/__test__/SelectDeviceType.test.js +18 -10
- package/src/screens/AddNewGateway/__test__/SelectDeviceUnit.test.js +1 -1
- package/src/screens/AddNewGateway/__test__/SelectModbusGateway.test.js +12 -9
- package/src/screens/AddNewGateway/__test__/SelectZigbeeGateway.test.js +12 -9
- package/src/screens/AddNewGateway/__test__/ShareWifiPassword.test.js +7 -21
- package/src/screens/AllGateway/DetailConfigActionInternal/__test__/index.test.js +0 -20
- package/src/screens/AllGateway/DetailConfigActionModbus/__test__/index.test.js +7 -24
- package/src/screens/AllGateway/DeviceGatewayInfo/__test__/index.test.js +0 -17
- package/src/screens/AllGateway/DeviceInternalDetail/__test__/index.test.js +84 -100
- package/src/screens/AllGateway/DeviceModbusDetail/__test__/index.test.js +64 -82
- package/src/screens/AllGateway/DeviceZigbeeDetail/__test__/index.test.js +36 -55
- package/src/screens/AllGateway/GatewayConnectionMethods/__test__/index.test.js +9 -18
- package/src/screens/AllGateway/GatewayDetail/__test__/index.test.js +10 -37
- package/src/screens/AllGateway/GatewayInfo/__test__/index.test.js +7 -32
- package/src/screens/AllGateway/__test__/index.test.js +1 -14
- package/src/screens/AllGateway/components/GatewayItem/__test__/index.test.js +0 -12
- package/src/screens/AllGateway/components/TabPaneCT/__test__/index.test.js +1 -13
- package/src/screens/AllGateway/components/TabPaneCT/index.js +1 -1
- package/src/screens/AllGateway/hooks/__test__/index.test.js +1 -8
- package/src/screens/AllGateway/test-utils.js +1 -1
- package/src/screens/Automate/AddNewAction/NewActionWrapper.js +2 -2
- package/src/screens/Automate/AddNewAction/SetupConfigCondition.js +27 -28
- package/src/screens/Automate/AddNewAction/__test__/ChooseAction.test.js +3 -3
- package/src/screens/Automate/AddNewAction/__test__/ChooseConfig.test.js +8 -5
- package/src/screens/Automate/AddNewAction/__test__/SelectControlDevices.test.js +2 -2
- package/src/screens/Automate/AddNewAction/__test__/SelectMonitorDevices.test.js +1 -18
- package/src/screens/Automate/AddNewAction/__test__/SetupConfigCondition.test.js +17 -15
- package/src/screens/Automate/AddNewAutoSmart/__test__/AddNewAutoSmart.test.js +4 -4
- package/src/screens/Automate/EditActionsList/__tests__/UpdateActionScript.test.js +38 -55
- package/src/screens/Automate/EditActionsList/__tests__/UpdateDelayScript.test.js +0 -18
- package/src/screens/Automate/EditActionsList/__tests__/UpdateNotifyScript.test.js +1 -19
- package/src/screens/Automate/EditActionsList/__tests__/index.test.js +14 -11
- package/src/screens/Automate/OneTap/__test__/AddNewOneTap.test.js +3 -3
- package/src/screens/Automate/Scenario/__test__/AddNewOneTap.test.js +2 -2
- package/src/screens/Automate/ScriptDetail/Components/AddActionScript.js +2 -2
- package/src/screens/Automate/ScriptDetail/__test__/index.test.js +33 -25
- package/src/screens/Automate/ScriptDetail/index.js +6 -6
- package/src/screens/Automate/SetSchedule/__test__/index.test.js +4 -4
- package/src/screens/Automate/SetSchedule/components/RowItem.js +3 -3
- package/src/screens/Automate/Styles/indexStyles.js +6 -0
- package/src/screens/Automate/__test__/MultiUnits.test.js +7 -7
- package/src/screens/Automate/__test__/index.test.js +9 -34
- package/src/screens/Automate/index.js +50 -33
- package/src/screens/ChangePosition/__test__/index.test.js +1 -14
- package/src/screens/ConfirmUnitDeletion/__test__/ConfirmUnitDeletion.test.js +1 -23
- package/src/screens/Device/EditDevice/__test__/EditDevice.test.js +1 -11
- package/src/screens/Device/EditDevice/index.js +2 -2
- package/src/screens/Device/__test__/detail.test.js +11 -11
- package/src/screens/Device/__test__/sensorDisplayItem.test.js +0 -12
- package/src/screens/Device/detail.js +14 -12
- package/src/screens/Drawer/Drawer.test.js +3 -11
- package/src/screens/Drawer/index.js +3 -4
- package/src/screens/EmergencyContacts/EmergencyContactsList.js +4 -8
- package/src/screens/EmergencyContacts/EmergencyContactsSelectContacts.js +3 -3
- package/src/screens/EmergencyContacts/__test__/EmergencyContactAddNew.test.js +4 -17
- package/src/screens/EmergencyContacts/__test__/EmergencyContactList.test.js +3 -14
- package/src/screens/EmergencyContacts/__test__/EmergencyContactsSelectContacts.test.js +0 -10
- package/src/screens/EmergencySetting/components/DropDownItem.js +2 -2
- package/src/screens/EnterPassword/__test__/EnterPassword.test.js +4 -17
- package/src/screens/GuestInfo/__test__/index.test.js +0 -11
- package/src/screens/GuestInfo/components/RowGuestInfo.js +2 -2
- package/src/screens/GuestInfo/index.js +2 -2
- package/src/screens/HanetCamera/Detail.js +6 -2
- package/src/screens/HanetCamera/ManageAccess.js +3 -4
- package/src/screens/HanetCamera/MemberInfo.js +4 -4
- package/src/screens/HanetCamera/__test__/CaptureFaceID.test.js +2 -16
- package/src/screens/HanetCamera/__test__/Detail.test.js +1 -12
- package/src/screens/HanetCamera/__test__/ManageAccess.test.js +5 -16
- package/src/screens/HanetCamera/__test__/MemberInfo.test.js +5 -18
- package/src/screens/HanetCamera/components/RequestFaceIDPopup.js +2 -2
- package/src/screens/ManageAccess/__test__/ManageAccess.test.js +3 -19
- package/src/screens/ManageAccess/index.js +3 -3
- package/src/screens/MoveToAnotherSubUnit/__test__/index.test.js +7 -7
- package/src/screens/Notification/__test__/Notification.test.js +5 -15
- package/src/screens/Notification/__test__/NotificationItem.test.js +9 -19
- package/src/screens/Notification/index.js +5 -5
- package/src/screens/PlayBackCamera/__test__/index.test.js +13 -22
- package/src/screens/PlayBackCamera/index.js +2 -2
- package/src/screens/ScanChipQR/components/QRScan/__test__/QRScan.test.js +0 -11
- package/src/screens/ScanChipQR/components/QRScan/index.js +3 -3
- package/src/screens/SelectUnit/__test__/index.test.js +9 -29
- package/src/screens/SelectUnit/index.js +2 -2
- package/src/screens/SharedUnit/TabHeader.js +2 -2
- package/src/screens/SharedUnit/index.js +5 -0
- package/src/screens/Sharing/Components/EndDevice.js +3 -3
- package/src/screens/Sharing/SelectUser.js +5 -4
- package/src/screens/Sharing/UnitMemberList.js +7 -6
- package/src/screens/Sharing/__test__/InfoMemberUnit.test.js +9 -4
- package/src/screens/Sharing/__test__/SelectShareDevice.test.js +2 -15
- package/src/screens/Sharing/__test__/SelectUser.test.js +2 -22
- package/src/screens/Sharing/__test__/UnitMemberList.test.js +2 -2
- package/src/screens/Sharing/__test__/UpdateShareDevice.test.js +4 -17
- package/src/screens/Sharing/hooks/__test__/index.test.js +2 -13
- package/src/screens/SmartAccount/Connecting/index.js +0 -2
- package/src/screens/SmartAccount/ListDevice/__test__/ListDevice.test.js +3 -18
- package/src/screens/SmartAccount/SuccessfullyConnected/__test__/SuccessfullyConnected.test.js +11 -21
- package/src/screens/SmartAccount/SuccessfullyConnected/index.js +3 -4
- package/src/screens/SmartAccount/__test__/Connecting.test.js +30 -36
- package/src/screens/SmartAccount/__test__/SmartAccount.test.js +12 -21
- package/src/screens/SmartIr/__test__/GroupButtonByType.test.js +8 -17
- package/src/screens/SmartIr/__test__/SelectBrand.test.js +1 -11
- package/src/screens/SmartIr/__test__/SelectDeviceType.test.js +1 -12
- package/src/screens/SmartIr/__test__/SmartIr.test.js +3 -11
- package/src/screens/SmartIr/components/GroupButtonByType/GroupButtonByType.js +6 -5
- package/src/screens/SmartIr/components/SelectBrand.js +2 -2
- package/src/screens/SubUnit/AddSubUnit.js +1 -0
- package/src/screens/SubUnit/EditSubUnit.js +3 -2
- package/src/screens/SubUnit/ManageSubUnit.js +5 -5
- package/src/screens/SubUnit/__test__/AddSubUnit.test.js +9 -31
- package/src/screens/SubUnit/__test__/EditSubUnit.test.js +12 -30
- package/src/screens/SubUnit/__test__/ManageSubUnit.test.js +2 -2
- package/src/screens/SubUnit/hooks/__test__/useManageSubUnit.test.js +0 -12
- package/src/screens/SyncLGDevice/__test__/AddLGDevice.test.js +7 -20
- package/src/screens/Template/__test__/EditTemplate.test.js +4 -15
- package/src/screens/Template/__test__/GatewayList.test.js +0 -9
- package/src/screens/Template/__test__/detail.test.js +8 -8
- package/src/screens/Template/__test__/index.test.js +3 -14
- package/src/screens/Template/detail.js +2 -2
- package/src/screens/Unit/Detail.js +12 -53
- package/src/screens/Unit/SelectAddToFavorites.js +2 -2
- package/src/screens/Unit/SelectAddress.js +9 -4
- package/src/screens/Unit/SmartAccountItem.js +2 -2
- package/src/screens/Unit/Station/__test__/index.test.js +2 -2
- package/src/screens/Unit/Summaries.js +24 -29
- package/src/screens/Unit/__test__/AddMenu.test.js +5 -2
- package/src/screens/Unit/__test__/CheckSendEmail.test.js +0 -12
- package/src/screens/Unit/__test__/ChooseLocation.test.js +1 -4
- package/src/screens/Unit/__test__/Detail.test.js +14 -12
- package/src/screens/Unit/__test__/ManageUnit.test.js +2 -17
- package/src/screens/Unit/__test__/MoreMenu.test.js +1 -11
- package/src/screens/Unit/__test__/SelectAddToFavorites.test.js +3 -14
- package/src/screens/Unit/__test__/SelectAddress.test.js +4 -17
- package/src/screens/Unit/__test__/SmartAccount.test.js +14 -11
- package/src/screens/Unit/__test__/SmartAccountItem.test.js +0 -11
- package/src/screens/Unit/__test__/Summaries.test.js +2 -14
- package/src/screens/Unit/components/AutomateScript/index.js +2 -2
- package/src/screens/Unit/components/ButtonWrapper/index.js +3 -4
- package/src/screens/Unit/components/Header/index.js +5 -4
- package/src/screens/Unit/components/SharedUnit/index.js +5 -5
- package/src/screens/Unit/components/__test__/Header.test.js +1 -14
- package/src/screens/Unit/components/__test__/MyUnitDevice.test.js +1 -11
- package/src/screens/Unit/components/__test__/SharedUnit.test.js +1 -11
- package/src/screens/UnitSummary/__test__/index.test.js +51 -17
- package/src/screens/UnitSummary/components/3PPowerConsumption/__test__/3PPowerConsumption.test.js +8 -25
- package/src/screens/UnitSummary/components/AirQuality/__test__/index.test.js +1 -7
- package/src/screens/UnitSummary/components/AirQuality/index.js +8 -3
- package/src/screens/UnitSummary/components/PowerConsumption/__test__/PowerConsumption.test.js +0 -11
- package/src/screens/UnitSummary/components/RunningDevices/__test__/index.test.js +1 -16
- package/src/screens/UnitSummary/components/Temperature/index.js +5 -1
- package/src/screens/UnitSummary/components/UvIndex/__test__/index.test.js +0 -8
- package/src/screens/UnitSummary/components/UvIndex/index.js +6 -2
- package/src/screens/UnitSummary/components/WaterQuality/Item/index.js +2 -2
- package/src/screens/UnitSummary/components/WaterQuality/__test__/index.test.js +14 -18
- package/src/screens/UnitSummary/components/__test__/UnitSummary.test.js +8 -8
- package/src/screens/UnitSummary/index.js +4 -8
- package/src/utils/Apis/axios.js +4 -2
- package/src/utils/Converter/__test__/timer.test.js +8 -0
- package/src/utils/Functions/preloadImages.js +13 -14
- package/src/utils/Monitor.js +2 -3
- package/src/utils/Route/index.js +0 -1
- package/src/utils/Storage.js +1 -1
- package/src/commons/Device/WindSpeed/LinearChart/__test__/LinearChart.test.js +0 -48
- package/src/commons/Device/WindSpeed/LinearChart/index.js +0 -155
- package/src/screens/AddNewGateway/hooks/__Tests__/index.test.js +0 -27
- package/src/screens/AddNewGateway/hooks/index.js +0 -31
- package/src/screens/SubUnit/Detail.js +0 -150
- package/src/screens/SubUnit/__test__/Detail.test.js +0 -125
- package/src/screens/UnitSummary/components/Temperature/ChartAverage/index.js +0 -62
- package/src/screens/UnitSummary/components/Temperature/__test__/ChartAverage.test.js +0 -17
- package/src/utils/dateHelper/getTickValues.js +0 -22
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { memo, useCallback, useMemo } from 'react';
|
|
2
2
|
import { Platform, StyleSheet, TouchableOpacity, View } from 'react-native';
|
|
3
3
|
import Routes from '../../utils/Route';
|
|
4
|
-
import
|
|
4
|
+
import AntDesign from 'react-native-vector-icons/AntDesign';
|
|
5
5
|
import { useNavigation } from '@react-navigation/native';
|
|
6
6
|
import { useTranslations } from '../../hooks/Common/useTranslations';
|
|
7
7
|
import ItemQuickAction from '../../commons/Action/ItemQuickAction';
|
|
@@ -132,7 +132,7 @@ const ItemDevice = memo(
|
|
|
132
132
|
>
|
|
133
133
|
{description || textConnected}
|
|
134
134
|
</Text>
|
|
135
|
-
<
|
|
135
|
+
<AntDesign name="right" size={12} />
|
|
136
136
|
</View>
|
|
137
137
|
</TouchableOpacity>
|
|
138
138
|
</ItemDeviceWrapper>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { memo, useState } from 'react';
|
|
2
2
|
import { View, TouchableOpacity } from 'react-native';
|
|
3
3
|
import { useTranslations } from '../../../hooks/Common/useTranslations';
|
|
4
|
-
import
|
|
4
|
+
import AntDesign from 'react-native-vector-icons/AntDesign';
|
|
5
5
|
import { Slider } from '@miblanchard/react-native-slider';
|
|
6
6
|
|
|
7
7
|
import Text from '../../Text';
|
|
@@ -44,7 +44,7 @@ const SonosSpeaker = memo(() => {
|
|
|
44
44
|
</TouchableOpacity>
|
|
45
45
|
<View style={styles.threeButton}>
|
|
46
46
|
<TouchableOpacity style={styles.buttonLeft}>
|
|
47
|
-
<
|
|
47
|
+
<AntDesign name={'backward'} size={35} color={Colors.Black} />
|
|
48
48
|
</TouchableOpacity>
|
|
49
49
|
<TouchableOpacity
|
|
50
50
|
style={styles.buttonCenter}
|
|
@@ -53,7 +53,7 @@ const SonosSpeaker = memo(() => {
|
|
|
53
53
|
{active ? <SvgButtonPauseActive /> : <SvgButtonPauseNotActive />}
|
|
54
54
|
</TouchableOpacity>
|
|
55
55
|
<TouchableOpacity style={styles.buttonRight}>
|
|
56
|
-
<
|
|
56
|
+
<AntDesign name={'forward'} size={35} color={Colors.Black} />
|
|
57
57
|
</TouchableOpacity>
|
|
58
58
|
</View>
|
|
59
59
|
</View>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React, { memo } from 'react';
|
|
2
2
|
import { View, StyleSheet } from 'react-native';
|
|
3
3
|
import Text from '../../../commons/Text';
|
|
4
|
-
import
|
|
4
|
+
import AntDesign from 'react-native-vector-icons/AntDesign';
|
|
5
5
|
|
|
6
6
|
const AlertStatusMachine = memo(({ message, style, icon }) => {
|
|
7
7
|
return (
|
|
8
8
|
<View style={[styles.container, style]}>
|
|
9
|
-
<
|
|
9
|
+
<AntDesign
|
|
10
10
|
name={icon}
|
|
11
11
|
size={20}
|
|
12
12
|
color={style.borderColor}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { memo } from 'react';
|
|
2
2
|
import { View, Dimensions, StyleSheet, TouchableOpacity } from 'react-native';
|
|
3
|
-
import
|
|
3
|
+
import AntDesign from 'react-native-vector-icons/AntDesign';
|
|
4
4
|
import { useNavigation } from '@react-navigation/native';
|
|
5
5
|
|
|
6
6
|
import { Colors } from '../../../configs';
|
|
@@ -35,11 +35,7 @@ const QualityIndicatorItem = memo(
|
|
|
35
35
|
onPress={() => navigation.navigate(descriptionScreen)}
|
|
36
36
|
style={styles.iconInfo}
|
|
37
37
|
>
|
|
38
|
-
<
|
|
39
|
-
name={'info-circle'}
|
|
40
|
-
size={18}
|
|
41
|
-
color={Colors.Gray8}
|
|
42
|
-
/>
|
|
38
|
+
<AntDesign name={'info-circle'} size={18} color={Colors.Gray8} />
|
|
43
39
|
</TouchableOpacity>
|
|
44
40
|
)}
|
|
45
41
|
</View>
|
|
@@ -3,7 +3,7 @@ import { View, TouchableOpacity } from 'react-native';
|
|
|
3
3
|
|
|
4
4
|
import { Colors } from '../../configs';
|
|
5
5
|
import Text from '../../commons/Text';
|
|
6
|
-
import
|
|
6
|
+
import AntDesign from 'react-native-vector-icons/AntDesign';
|
|
7
7
|
import styles from './styles';
|
|
8
8
|
import { ModalCustom } from '../Modal';
|
|
9
9
|
import Loading from '../../screens/Automate/Components/Loading';
|
|
@@ -18,7 +18,7 @@ const LoadingMessage = memo(({ visible, onClose, message }) => {
|
|
|
18
18
|
onPress={onClose}
|
|
19
19
|
>
|
|
20
20
|
<Loading
|
|
21
|
-
icon={<
|
|
21
|
+
icon={<AntDesign name={'sync'} color={Colors.Green6} size={16} />}
|
|
22
22
|
/>
|
|
23
23
|
<Text type={'Body'} style={styles.text}>
|
|
24
24
|
{message}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { StyleSheet, View } from 'react-native';
|
|
3
3
|
import { ButtonPopup } from '../index';
|
|
4
4
|
import { useTranslations } from '../../hooks/Common/useTranslations';
|
|
5
|
-
import
|
|
5
|
+
import AntDesign from 'react-native-vector-icons/AntDesign';
|
|
6
6
|
import Text from '../Text';
|
|
7
7
|
import { Colors } from '../../configs';
|
|
8
8
|
|
|
@@ -29,7 +29,7 @@ const AlertSendConfirm = ({
|
|
|
29
29
|
bodyStyle={styles.buttonPopupBody}
|
|
30
30
|
>
|
|
31
31
|
<View style={styles.firstInfo}>
|
|
32
|
-
<
|
|
32
|
+
<AntDesign name="clockcircleo" size={42} style={styles.clock} />
|
|
33
33
|
<Text semibold type="H4" style={styles.textAlertWillBe}>
|
|
34
34
|
{t('alert_will_be_sent_in')}
|
|
35
35
|
</Text>
|
|
@@ -2,7 +2,7 @@ import React, { useMemo } from 'react';
|
|
|
2
2
|
import { StyleSheet } from 'react-native';
|
|
3
3
|
import { ButtonPopup } from '../index';
|
|
4
4
|
import { useTranslations } from '../../hooks/Common/useTranslations';
|
|
5
|
-
import
|
|
5
|
+
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
|
|
6
6
|
import Text from '../Text';
|
|
7
7
|
import { Colors } from '../../configs';
|
|
8
8
|
|
|
@@ -59,7 +59,11 @@ const AlertSent = ({
|
|
|
59
59
|
type="H5"
|
|
60
60
|
style={styles.location}
|
|
61
61
|
>{`${unit?.name} - ${station?.name}`}</Text>
|
|
62
|
-
<
|
|
62
|
+
<MaterialCommunityIcons
|
|
63
|
+
name="alert-circle-outline"
|
|
64
|
+
size={42}
|
|
65
|
+
style={styles.alert}
|
|
66
|
+
/>
|
|
63
67
|
<Text semibold style={styles.textAlertSent}>
|
|
64
68
|
{data.title}
|
|
65
69
|
</Text>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { memo, useEffect, useState } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import AntDesign from 'react-native-vector-icons/AntDesign';
|
|
3
3
|
import { TouchableOpacity, View } from 'react-native';
|
|
4
4
|
|
|
5
5
|
import styles from './ChooseFieldStyles';
|
|
@@ -47,7 +47,7 @@ const ChooseUserField = ({ unit, dataItem, index, setDataForm, dataForm }) => {
|
|
|
47
47
|
onPress={setShowFilterPopup}
|
|
48
48
|
>
|
|
49
49
|
<Text style={styles.value}>{choose.name}</Text>
|
|
50
|
-
<
|
|
50
|
+
<AntDesign name="right" size={20} color={Colors.Gray8} />
|
|
51
51
|
</TouchableOpacity>
|
|
52
52
|
<ChoosePopup
|
|
53
53
|
isVisible={showFilterPopup}
|
|
@@ -5,7 +5,7 @@ import { mockSCStore } from '../../../../context/mockStore';
|
|
|
5
5
|
import { SCProvider } from '../../../../context';
|
|
6
6
|
import PasscodeField from '../index';
|
|
7
7
|
|
|
8
|
-
const
|
|
8
|
+
const mockSetDataForm = jest.fn();
|
|
9
9
|
|
|
10
10
|
const wrapComponent = (
|
|
11
11
|
dataItem = {
|
|
@@ -32,7 +32,7 @@ const wrapComponent = (
|
|
|
32
32
|
<PasscodeField
|
|
33
33
|
dataItem={dataItem}
|
|
34
34
|
index={index}
|
|
35
|
-
setDataForm={
|
|
35
|
+
setDataForm={mockSetDataForm}
|
|
36
36
|
dataForm={dataForm}
|
|
37
37
|
/>
|
|
38
38
|
</SCProvider>
|
|
@@ -42,7 +42,7 @@ describe('Test PasscodeField', () => {
|
|
|
42
42
|
let tree;
|
|
43
43
|
|
|
44
44
|
afterEach(() => {
|
|
45
|
-
|
|
45
|
+
mockSetDataForm.mockClear();
|
|
46
46
|
});
|
|
47
47
|
|
|
48
48
|
it('render PasscodeField', async () => {
|
|
@@ -59,7 +59,7 @@ describe('Test PasscodeField', () => {
|
|
|
59
59
|
await act(async () => {
|
|
60
60
|
await inputPasscode.props.onChangeText('123');
|
|
61
61
|
});
|
|
62
|
-
expect(
|
|
62
|
+
expect(mockSetDataForm).toBeCalledWith([
|
|
63
63
|
{
|
|
64
64
|
key: 'passcode',
|
|
65
65
|
type: 'passcode',
|
|
@@ -74,7 +74,7 @@ describe('Test PasscodeField', () => {
|
|
|
74
74
|
await act(async () => {
|
|
75
75
|
await inputPasscode.props.onChangeText('123456');
|
|
76
76
|
});
|
|
77
|
-
expect(
|
|
77
|
+
expect(mockSetDataForm).toBeCalledWith([
|
|
78
78
|
{
|
|
79
79
|
key: 'passcode',
|
|
80
80
|
type: 'passcode',
|
|
@@ -6,7 +6,7 @@ import ScheduleField from '../index';
|
|
|
6
6
|
import { AccessibilityLabel } from '../../../../configs/Constants';
|
|
7
7
|
import { TouchableOpacity } from 'react-native';
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
const mockSetDataForm = jest.fn();
|
|
10
10
|
|
|
11
11
|
const wrapComponent = (
|
|
12
12
|
dataItem = {
|
|
@@ -41,7 +41,7 @@ const wrapComponent = (
|
|
|
41
41
|
<ScheduleField
|
|
42
42
|
dataItem={dataItem}
|
|
43
43
|
index={index}
|
|
44
|
-
setDataForm={
|
|
44
|
+
setDataForm={mockSetDataForm}
|
|
45
45
|
dataForm={dataForm}
|
|
46
46
|
/>
|
|
47
47
|
</SCProvider>
|
|
@@ -53,7 +53,7 @@ describe('Test ScheduleField', () => {
|
|
|
53
53
|
Date.now = jest.fn(() => new Date('2022-05-30T15:50:36+01:00'));
|
|
54
54
|
});
|
|
55
55
|
afterEach(() => {
|
|
56
|
-
|
|
56
|
+
mockSetDataForm.mockClear();
|
|
57
57
|
});
|
|
58
58
|
|
|
59
59
|
const onPressRecurring = async (instance, schedule) => {
|
|
@@ -69,7 +69,7 @@ describe('Test ScheduleField', () => {
|
|
|
69
69
|
await act(async () => {
|
|
70
70
|
await recurring.props.onPress();
|
|
71
71
|
});
|
|
72
|
-
expect(
|
|
72
|
+
expect(mockSetDataForm).toBeCalledWith([
|
|
73
73
|
{
|
|
74
74
|
key: 'schedule',
|
|
75
75
|
type: 'schedule',
|
|
@@ -91,7 +91,7 @@ describe('Test ScheduleField', () => {
|
|
|
91
91
|
action_zigbee: 4,
|
|
92
92
|
},
|
|
93
93
|
]);
|
|
94
|
-
|
|
94
|
+
mockSetDataForm.mockClear();
|
|
95
95
|
};
|
|
96
96
|
|
|
97
97
|
const onPressTemporary = async (instance, schedule) => {
|
|
@@ -99,7 +99,7 @@ describe('Test ScheduleField', () => {
|
|
|
99
99
|
await schedule.props.onPress();
|
|
100
100
|
});
|
|
101
101
|
|
|
102
|
-
expect(
|
|
102
|
+
expect(mockSetDataForm).toBeCalledWith([
|
|
103
103
|
{
|
|
104
104
|
key: 'schedule',
|
|
105
105
|
type: 'schedule',
|
|
@@ -145,14 +145,14 @@ describe('Test ScheduleField', () => {
|
|
|
145
145
|
await popupDateTimePickerDone.props.onPress();
|
|
146
146
|
});
|
|
147
147
|
expect(dateTimePicker.props.isVisible).toBeFalsy();
|
|
148
|
-
|
|
148
|
+
mockSetDataForm.mockClear();
|
|
149
149
|
};
|
|
150
150
|
|
|
151
151
|
it('render ScheduleField choose schedule', async () => {
|
|
152
152
|
await act(async () => {
|
|
153
153
|
tree = await create(wrapComponent());
|
|
154
154
|
});
|
|
155
|
-
expect(
|
|
155
|
+
expect(mockSetDataForm).toBeCalledWith([
|
|
156
156
|
{
|
|
157
157
|
key: 'schedule',
|
|
158
158
|
type: 'schedule',
|
|
@@ -169,7 +169,7 @@ describe('Test ScheduleField', () => {
|
|
|
169
169
|
action_zigbee: 2,
|
|
170
170
|
},
|
|
171
171
|
]);
|
|
172
|
-
|
|
172
|
+
mockSetDataForm.mockClear();
|
|
173
173
|
const instance = tree.root;
|
|
174
174
|
const schedule = instance.findAll(
|
|
175
175
|
(el) =>
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
useState,
|
|
3
|
-
useRef,
|
|
4
|
-
useCallback,
|
|
5
|
-
useMemo,
|
|
6
|
-
useEffect,
|
|
7
|
-
} from 'react';
|
|
1
|
+
import React, { useState, useRef, useCallback, useMemo } from 'react';
|
|
8
2
|
import {
|
|
9
3
|
View,
|
|
10
4
|
TextInput,
|
|
@@ -12,7 +6,6 @@ import {
|
|
|
12
6
|
TouchableWithoutFeedback,
|
|
13
7
|
Platform,
|
|
14
8
|
} from 'react-native';
|
|
15
|
-
import AndroidKeyboardAdjust from 'react-native-android-keyboard-adjust';
|
|
16
9
|
import Text from '../Text';
|
|
17
10
|
import { Colors } from '../../configs';
|
|
18
11
|
import AccessibilityLabel from '../../configs/AccessibilityLabel';
|
|
@@ -133,13 +126,6 @@ const CurrencyInput = ({
|
|
|
133
126
|
return textInputValue.toString().length < 2 ? -12 : 0;
|
|
134
127
|
}, [textInputValue]);
|
|
135
128
|
|
|
136
|
-
useEffect(() => {
|
|
137
|
-
const isAndroid = Platform.OS === 'android';
|
|
138
|
-
isAndroid && AndroidKeyboardAdjust.setAdjustResize();
|
|
139
|
-
|
|
140
|
-
return () => isAndroid && AndroidKeyboardAdjust.setAdjustPan();
|
|
141
|
-
}, []);
|
|
142
|
-
|
|
143
129
|
return (
|
|
144
130
|
<TouchableWithoutFeedback onPress={focusInput}>
|
|
145
131
|
<View style={styles.wrap}>
|
|
@@ -1,22 +1,12 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { act, create } from 'react-test-renderer';
|
|
3
3
|
import { TouchableOpacity } from 'react-native';
|
|
4
4
|
|
|
5
5
|
import { AccessibilityLabel } from '../../../configs/Constants';
|
|
6
6
|
import GroupCheckBox from '..';
|
|
7
7
|
|
|
8
|
-
jest.mock('react', () => ({
|
|
9
|
-
...jest.requireActual('react'),
|
|
10
|
-
useState: jest.fn(),
|
|
11
|
-
}));
|
|
12
|
-
|
|
13
8
|
describe('Test Group CheckBox', () => {
|
|
14
9
|
let tree;
|
|
15
|
-
const mockSetState = () => {
|
|
16
|
-
const setState = jest.fn();
|
|
17
|
-
useState.mockImplementation((init) => [init, setState]);
|
|
18
|
-
return setState;
|
|
19
|
-
};
|
|
20
10
|
|
|
21
11
|
const findGroupCheckBoxItem = (instance) => {
|
|
22
12
|
const item = instance.find(
|
|
@@ -34,7 +24,6 @@ describe('Test Group CheckBox', () => {
|
|
|
34
24
|
description: 'description',
|
|
35
25
|
},
|
|
36
26
|
];
|
|
37
|
-
mockSetState();
|
|
38
27
|
await act(async () => {
|
|
39
28
|
tree = await create(<GroupCheckBox data={data} />);
|
|
40
29
|
});
|
|
@@ -51,7 +40,6 @@ describe('Test Group CheckBox', () => {
|
|
|
51
40
|
},
|
|
52
41
|
];
|
|
53
42
|
const mockFunc = jest.fn();
|
|
54
|
-
const setState = mockSetState();
|
|
55
43
|
await act(async () => {
|
|
56
44
|
tree = await create(
|
|
57
45
|
<GroupCheckBox data={data} onSelect={mockFunc} multiple />
|
|
@@ -62,9 +50,6 @@ describe('Test Group CheckBox', () => {
|
|
|
62
50
|
await act(async () => {
|
|
63
51
|
item.props.onSelect(0);
|
|
64
52
|
});
|
|
65
|
-
expect(setState).toHaveBeenCalledTimes(2);
|
|
66
|
-
expect(setState).toHaveBeenNthCalledWith(1, [0]);
|
|
67
|
-
expect(setState).toHaveBeenNthCalledWith(2, [0]);
|
|
68
53
|
expect(mockFunc).toHaveBeenCalledWith([
|
|
69
54
|
{ description: 'description', source: 'source', title: 'testItem' },
|
|
70
55
|
]);
|
|
@@ -85,7 +70,6 @@ describe('Test Group CheckBox', () => {
|
|
|
85
70
|
},
|
|
86
71
|
];
|
|
87
72
|
const mockFunc = jest.fn();
|
|
88
|
-
const setState = mockSetState();
|
|
89
73
|
await act(async () => {
|
|
90
74
|
tree = await create(<GroupCheckBox data={data} onSelect={mockFunc} />);
|
|
91
75
|
});
|
|
@@ -94,8 +78,6 @@ describe('Test Group CheckBox', () => {
|
|
|
94
78
|
await act(async () => {
|
|
95
79
|
item.props.onSelect(0);
|
|
96
80
|
});
|
|
97
|
-
expect(setState).toHaveBeenNthCalledWith(1, [0]);
|
|
98
|
-
expect(setState).toHaveBeenNthCalledWith(2, [0]);
|
|
99
81
|
expect(mockFunc).toHaveBeenCalledWith({
|
|
100
82
|
description: 'description 1',
|
|
101
83
|
title: 'title 1',
|
|
@@ -114,8 +96,6 @@ describe('Test Group CheckBox', () => {
|
|
|
114
96
|
},
|
|
115
97
|
];
|
|
116
98
|
const mockFunc = jest.fn();
|
|
117
|
-
const setState = jest.fn();
|
|
118
|
-
useState.mockImplementation((init) => [[0], setState]);
|
|
119
99
|
await act(async () => {
|
|
120
100
|
tree = await create(<GroupCheckBox data={data} onSelect={mockFunc} />);
|
|
121
101
|
});
|
|
@@ -128,7 +108,6 @@ describe('Test Group CheckBox', () => {
|
|
|
128
108
|
await act(async () => {
|
|
129
109
|
items[1].props.onSelect(0);
|
|
130
110
|
});
|
|
131
|
-
expect(setState).toHaveBeenCalledWith([]); // called 1 time
|
|
132
111
|
expect(mockFunc).toHaveBeenCalledWith({
|
|
133
112
|
description: 'description 1',
|
|
134
113
|
title: 'title 1',
|
|
@@ -2,7 +2,8 @@ import React, { useCallback, useRef } from 'react';
|
|
|
2
2
|
import { View, Text, TouchableOpacity, Image } from 'react-native';
|
|
3
3
|
import Images from '../../configs/Images';
|
|
4
4
|
import { Colors } from '../../configs';
|
|
5
|
-
import
|
|
5
|
+
import AntDesign from 'react-native-vector-icons/AntDesign';
|
|
6
|
+
import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
|
|
6
7
|
import { useNavigation } from '@react-navigation/native';
|
|
7
8
|
import styles from './Styles/HeaderCustomStyles';
|
|
8
9
|
import { useTranslations } from '../../hooks/Common/useTranslations';
|
|
@@ -98,7 +99,11 @@ const HeaderCustom = ({
|
|
|
98
99
|
accessibilityLabel={AccessibilityLabel.MENU_POPPER_MORE}
|
|
99
100
|
>
|
|
100
101
|
<View style={styles.buttonBack}>
|
|
101
|
-
<
|
|
102
|
+
<MaterialIcons
|
|
103
|
+
name={'more-vert'}
|
|
104
|
+
size={27}
|
|
105
|
+
color={Colors.Black}
|
|
106
|
+
/>
|
|
102
107
|
</View>
|
|
103
108
|
</TouchableOpacity>
|
|
104
109
|
</>
|
|
@@ -106,7 +111,7 @@ const HeaderCustom = ({
|
|
|
106
111
|
{isShowClose && (
|
|
107
112
|
<TouchableOpacity onPress={handleClose}>
|
|
108
113
|
<View style={styles.buttonAdd}>
|
|
109
|
-
<
|
|
114
|
+
<AntDesign name={'close'} size={24} color={Colors.Black} />
|
|
110
115
|
</View>
|
|
111
116
|
</TouchableOpacity>
|
|
112
117
|
)}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { memo, useCallback } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import AntDesign from 'react-native-vector-icons/AntDesign';
|
|
3
3
|
import { TouchableOpacity, StyleSheet, Animated, View } from 'react-native';
|
|
4
4
|
import { useNavigation } from '@react-navigation/native';
|
|
5
5
|
import { getStatusBarHeight } from 'react-native-iphone-x-helper';
|
|
@@ -95,7 +95,7 @@ const HeaderAni = memo(
|
|
|
95
95
|
accessibilityLabel={AccessibilityLabel.ICON_BACK}
|
|
96
96
|
>
|
|
97
97
|
<View style={styles.btnBack}>
|
|
98
|
-
<
|
|
98
|
+
<AntDesign name={'left'} size={27} color={Colors.Gray9} />
|
|
99
99
|
</View>
|
|
100
100
|
</TouchableOpacity>
|
|
101
101
|
<View styles={styles.wrapRightComponent}>{rightComponent}</View>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
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
|
-
<
|
|
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
|
-
<
|
|
79
|
+
<AntDesign
|
|
80
80
|
name={iconCT}
|
|
81
81
|
color={colorIcon}
|
|
82
82
|
size={size}
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import 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
|
|
43
|
-
expect(
|
|
28
|
+
const touchableOpacities = instance.findAllByType(TouchableOpacity);
|
|
29
|
+
expect(touchableOpacities).toHaveLength(3);
|
|
30
|
+
expect(instance.findAllByType(FImage)).toHaveLength(1);
|
|
44
31
|
await act(async () => {
|
|
45
|
-
|
|
32
|
+
touchableOpacities[0].props.onPress();
|
|
46
33
|
});
|
|
47
|
-
expect(
|
|
34
|
+
expect(instance.findAllByType(FImage)).toHaveLength(2); // paused
|
|
48
35
|
await act(async () => {
|
|
49
|
-
|
|
50
|
-
TouchableOpacities[2].props.onPress();
|
|
36
|
+
touchableOpacities[1].props.onPress();
|
|
51
37
|
});
|
|
52
|
-
expect(
|
|
53
|
-
});
|
|
38
|
+
expect(instance.findAllByType(FImage)).toHaveLength(1); // unpaused
|
|
54
39
|
|
|
55
|
-
|
|
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
|
-
|
|
78
|
-
TouchableOpacities[2].props.onPress();
|
|
42
|
+
touchableOpacities[2].props.onPress();
|
|
79
43
|
});
|
|
80
|
-
expect(
|
|
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
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useRef } from 'react';
|
|
2
|
-
import
|
|
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
|
-
<
|
|
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
|
|
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
|
-
<
|
|
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
|
-
<
|
|
137
|
+
<AntDesign name="up" size={32} color={Colors.Primary} />
|
|
138
138
|
</TouchableOpacity>
|
|
139
139
|
</View>
|
|
140
140
|
<View style={styles.wrapButton}>
|