@eohjsc/react-native-smart-city 0.7.3 → 0.7.5
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/assets/images/Automation-fill.svg +85 -0
- package/assets/images/Map/LocationPin.svg +10 -0
- package/assets/images/Scenario-filled.svg +22 -0
- package/assets/images/schedule-fill.svg +48 -0
- package/package.json +20 -17
- package/src/commons/Action/ItemQuickAction.js +1 -1
- package/src/commons/Action/__test__/ItemQuickAction.test.js +6 -6
- 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__/index.test.js +5 -5
- package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/index.js +3 -3
- package/src/commons/ActionGroup/OnOffSmartLock/SetupGeneratePasscode/ButtonWrapper.js +2 -2
- package/src/commons/ActionGroup/OnOffTemplate/OnOffSimpleTemplate.js +2 -2
- package/src/commons/ActionGroup/OptionsDropdownActionTemplate.js +2 -2
- package/src/commons/ActionGroup/SliderRangeTemplate.js +7 -7
- 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__/ThreeButtonCircle.test.js +2 -2
- package/src/commons/ActionGroup/ThreeButtonTemplate/__test__/ThreeButtonDefault.test.js +2 -2
- package/src/commons/ActionGroup/TimerActionTemplate.js +6 -3
- package/src/commons/ActionGroup/TwoButtonTemplate/index.js +2 -2
- package/src/commons/ActionGroup/__test__/ColorPickerTemplate.test.js +9 -10
- package/src/commons/ActionGroup/__test__/OnOffSmartLock.test.js +5 -5
- package/src/commons/ActionGroup/__test__/OnOffTemplate.test.js +5 -5
- package/src/commons/ActionGroup/__test__/OptionsDropdownTemplate.test.js +8 -8
- package/src/commons/ActionGroup/__test__/StatesGridActionTemplate.test.js +3 -3
- package/src/commons/ActionGroup/__test__/TimerActionTemplate.test.js +6 -6
- package/src/commons/ActionGroup/__test__/TwoButtonTemplate.test.js +1 -1
- package/src/commons/ActionGroup/__test__/index.test.js +6 -6
- package/src/commons/ActionGroup/index.js +2 -2
- package/src/commons/ActionTemplate/__test__/index.test.js +4 -4
- package/src/commons/Automate/ItemAutomate.js +9 -41
- package/src/commons/Automate/ItemConditionScriptDetail.js +67 -0
- package/src/commons/Automate/ItemConditionScriptDetailStyles.js +46 -0
- package/src/commons/Automate/__test__/ItemAutomate.test.js +0 -21
- package/src/commons/BackDefault/index.js +2 -2
- package/src/commons/BottomButtonView/index.js +1 -0
- package/src/commons/ButtonPopup/index.js +3 -2
- package/src/commons/ChartAggregationOption/__test__/FourButtonFilterHistory.test.js +2 -2
- package/src/commons/Dashboard/MyPinnedSharedUnit/__test__/MyPinnedSharedUnit.test.js +8 -9
- package/src/commons/Dashboard/MyUnit/__test__/MyUnit.test.js +7 -7
- package/src/commons/DateTimeRangeChange/DateTimeButton.js +3 -3
- package/src/commons/DateTimeRangeChange/index.js +1 -1
- package/src/commons/Device/ConnectedViewHeader.js +2 -2
- package/src/commons/Device/Emergency/EmergencyDetail.js +3 -3
- package/src/commons/Device/Emergency/__test__/EmergencyButton.test.js +1 -1
- package/src/commons/Device/FlatListItems.js +20 -19
- package/src/commons/Device/Hanet/ItemHanetDevice.js +3 -3
- package/src/commons/Device/Hanet/ItemHanetDevice.test.js +3 -3
- package/src/commons/Device/HorizontalBarChart.js +54 -34
- package/src/commons/Device/ItemAddNew/index.js +2 -2
- package/src/commons/Device/ItemDevice.js +5 -21
- 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 +6 -2
- package/src/commons/DisplayChecking/index.js +2 -2
- package/src/commons/EmergencyButton/AlertSendConfirm.js +2 -2
- package/src/commons/FieldTemplate/ChooseUserField/index.js +2 -2
- package/src/commons/FieldTemplate/PasscodeField/__test__/index.test.js +3 -3
- package/src/commons/FieldTemplate/ScheduleField/__test__/index.test.js +6 -6
- package/src/commons/FlatListDnD/__test__/index.test.js +4 -4
- package/src/commons/FlatListDnD/index.js +12 -9
- package/src/commons/Grid/GridItem.js +10 -2
- package/src/commons/GroupCheckBox/__test__/GroupCheckBox.test.js +3 -3
- package/src/commons/Header/HeaderCustom.js +2 -2
- package/src/commons/Header/__test__/HeaderCT.test.js +3 -3
- package/src/commons/HeaderAni/index.js +2 -2
- package/src/commons/IconComponent/index.js +3 -3
- package/src/commons/ImagePicker/__test__/ImagePicker.test.js +5 -5
- package/src/commons/MediaPlayerDetail/__test__/MediaPlayerDetail.test.js +6 -4
- package/src/commons/MenuActionMore/MenuActionMoreStyles.js +2 -1
- package/src/commons/MenuActionMore/index.js +1 -1
- package/src/commons/NavBar/NavBarStyles.js +1 -1
- package/src/commons/NavBar/index.js +2 -2
- package/src/commons/OneTapTemplate/NumberUpDownActionTemplate.js +3 -3
- package/src/commons/OneTapTemplate/__test__/StatesGridActionTemplate.test.js +1 -1
- package/src/commons/Popover/__test__/index.test.js +3 -3
- package/src/commons/Processing/__test__/Connecting.test.js +4 -4
- package/src/commons/SearchLocation/index.js +3 -3
- package/src/commons/SelectActionCard/index.js +2 -2
- package/src/commons/SelectSubUnit/index.js +6 -2
- package/src/commons/SelectUnit/__test__/SelectUnit.test.js +5 -5
- package/src/commons/Sharing/BtnRemoveMember.js +2 -2
- package/src/commons/Sharing/StationDevicePermissions.js +2 -2
- 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/OneTap/ItemOneTap.js +6 -7
- package/src/commons/SubUnit/OneTap/__test__/SubUnitAutomate.test.js +0 -2
- package/src/commons/SubUnit/OneTap/index.js +9 -8
- package/src/commons/SubUnit/__test__/ShortDetail.test.js +8 -8
- package/src/commons/Unit/HeaderUnit/index.js +30 -22
- package/src/commons/Unit/SharedUnit.js +7 -7
- package/src/commons/Widgets/IFrame/__tests__/IFrame.test.js +9 -13
- package/src/commons/Widgets/IFrameWithConfig/IFrameWithConfig.js +34 -2
- package/src/commons/Widgets/IFrameWithConfig/__tests__/IFrameWithConfig.test.js +88 -8
- package/src/commons/WrapParallaxScrollView/index.js +9 -10
- package/src/configs/API.js +1 -1
- package/src/configs/AccessibilityLabel.js +2 -0
- package/src/configs/Constants.js +3 -3
- package/src/configs/Theme.js +1 -1
- package/src/hooks/Common/__test__/useAndroidTranslucentStatusBar.test.js +5 -5
- package/src/hooks/IoT/__test__/useHomeAssistantConnection.test.js +12 -12
- package/src/hooks/IoT/__test__/useRemoteControl.test.js +14 -7
- package/src/hooks/IoT/__test__/useWatchConfigs.test.js +3 -3
- package/src/hooks/IoT/useRemoteControl.js +24 -13
- package/src/hooks/useMqtt.js +2 -2
- package/src/iot/RemoteControl/Bluetooth.js +19 -22
- package/src/iot/RemoteControl/Internet.js +13 -5
- package/src/iot/RemoteControl/__test__/Internet.test.js +7 -7
- package/src/navigations/EmergencyContactsStack.js +4 -3
- package/src/navigations/SharedStack.js +2 -0
- package/src/navigations/UnitStack.js +56 -57
- package/src/screens/AQIGuide/index.js +0 -2
- package/src/screens/ActivityLog/index.js +2 -2
- package/src/screens/AddLocationMaps/__test__/index.test.js +12 -12
- package/src/screens/AddLocationMaps/index.js +16 -19
- package/src/screens/AddLocationMaps/indexStyle.js +1 -0
- package/src/screens/AddNewGateway/RenameNewDevices.js +2 -2
- package/src/screens/AddNewGateway/SelectDeviceType.js +1 -1
- package/src/screens/AddNewGateway/ShareWifiPassword.js +16 -15
- package/src/screens/AddNewGateway/__test__/AddNewGateway.test.js +7 -7
- package/src/screens/AddNewGateway/__test__/ConnectingWifiDevice.test.js +8 -8
- package/src/screens/AddNewGateway/__test__/ConnectingZigbeeDevice.test.js +7 -7
- package/src/screens/AddNewGateway/__test__/RenameNewDevices.test.js +8 -8
- package/src/screens/AddNewGateway/__test__/ScanGatewayQR.test.js +5 -5
- package/src/screens/AddNewGateway/__test__/SelectDeviceUnit.test.js +4 -4
- package/src/screens/AddNewGateway/__test__/SelectModbusGateway.test.js +6 -6
- package/src/screens/AddNewGateway/__test__/SelectZigbeeGateway.test.js +6 -6
- package/src/screens/AddNewGateway/__test__/ShareWifiPassword.test.js +0 -4
- package/src/screens/AddNewGateway/hooks/__Tests__/useWifiManage.test.js +2 -2
- package/src/screens/AllGateway/DetailConfigActionModbus/__test__/index.test.js +6 -6
- package/src/screens/AllGateway/DeviceInternalDetail/__test__/index.test.js +19 -17
- package/src/screens/AllGateway/DeviceModbusDetail/__test__/index.test.js +19 -17
- package/src/screens/AllGateway/DeviceZigbeeDetail/__test__/index.test.js +18 -16
- package/src/screens/AllGateway/GatewayDetail/__test__/index.test.js +43 -35
- package/src/screens/AllGateway/GatewayInfo/__test__/index.test.js +38 -22
- package/src/screens/AllGateway/__test__/index.test.js +6 -6
- package/src/screens/AllGateway/components/Detail/__test__/index.test.js +3 -5
- package/src/screens/AllGateway/components/GatewayItem/__test__/index.test.js +3 -3
- package/src/screens/AllGateway/components/TabPaneCT/__test__/index.test.js +6 -6
- package/src/screens/AllGateway/hooks/__test__/index.test.js +2 -2
- package/src/screens/AllGateway/test-utils.js +3 -4
- package/src/screens/Automate/AddNewAction/ChooseAction.js +17 -3
- package/src/screens/Automate/AddNewAction/ChooseConfig.js +7 -6
- package/src/screens/Automate/AddNewAction/NewActionWrapper.js +8 -8
- package/src/screens/Automate/AddNewAction/SelectControlDevices.js +30 -20
- package/src/screens/Automate/AddNewAction/SelectMonitorDevices.js +17 -10
- package/src/screens/Automate/AddNewAction/SetupConfigCondition.js +58 -44
- package/src/screens/Automate/AddNewAction/SetupScriptDelay.js +1 -1
- package/src/screens/Automate/AddNewAction/SetupScriptNotify.js +3 -3
- package/src/screens/Automate/AddNewAction/Styles/SetupSensorStyles.js +20 -4
- package/src/screens/Automate/AddNewAction/__test__/ChooseAction.test.js +12 -12
- package/src/screens/Automate/AddNewAction/__test__/SelectControlDevices.test.js +14 -8
- package/src/screens/Automate/AddNewAction/__test__/SelectMonitorDevices.test.js +13 -7
- package/src/screens/Automate/AddNewAction/__test__/SetupConfigCondition.test.js +54 -15
- package/src/screens/Automate/AddNewAction/__test__/SetupScriptDelay.test.js +9 -9
- package/src/screens/Automate/AddNewAction/__test__/SetupScriptNotify.test.js +39 -10
- package/src/screens/Automate/AddNewAutoSmart/AddTypeSmart.js +10 -10
- package/src/screens/Automate/AddNewAutoSmart/__test__/AddNewAutoSmart.test.js +13 -8
- package/src/screens/Automate/Components/InputName.js +10 -7
- package/src/screens/Automate/EditActionsList/__tests__/UpdateActionScript.test.js +8 -8
- package/src/screens/Automate/EditActionsList/__tests__/UpdateDelayScript.test.js +6 -6
- package/src/screens/Automate/EditActionsList/__tests__/UpdateNotifyScript.test.js +7 -7
- package/src/screens/Automate/EditActionsList/index.js +19 -17
- package/src/screens/Automate/MultiUnits.js +19 -22
- package/src/screens/Automate/OneTap/__test__/AddNewOneTap.test.js +18 -8
- package/src/screens/Automate/Scenario/__test__/AddNewOneTap.test.js +15 -7
- package/src/screens/Automate/ScriptDetail/Components/AddActionScript.js +14 -6
- package/src/screens/Automate/ScriptDetail/Components/RenameScript.js +4 -7
- package/src/screens/Automate/ScriptDetail/__test__/index.test.js +56 -18
- package/src/screens/Automate/ScriptDetail/__test__/useStarredScript.test.js +6 -6
- package/src/screens/Automate/ScriptDetail/index.js +105 -41
- package/src/screens/Automate/SetSchedule/__test__/SelectWeekday.test.js +4 -4
- package/src/screens/Automate/SetSchedule/__test__/index.test.js +29 -18
- package/src/screens/Automate/SetSchedule/components/RowItem.js +5 -5
- package/src/screens/Automate/SetSchedule/index.js +8 -7
- package/src/screens/Automate/Styles/indexStyles.js +1 -1
- package/src/screens/Automate/__test__/MultiUnits.test.js +1 -4
- package/src/screens/Automate/__test__/index.test.js +0 -1
- package/src/screens/Automate/index.js +36 -34
- package/src/screens/ChangePosition/__test__/index.test.js +6 -6
- package/src/screens/ChangePosition/index.js +2 -1
- package/src/screens/Device/EditDevice/__test__/EditDevice.test.js +13 -13
- package/src/screens/Device/EditDevice/index.js +4 -4
- package/src/screens/Device/__test__/BluetoothDevice.test.js +300 -0
- package/src/screens/Device/__test__/detail.test.js +14 -14
- package/src/screens/Device/__test__/mqttDetail.test.js +9 -9
- package/src/screens/Device/components/BluetoothDevice.js +135 -0
- package/src/screens/Device/components/SensorDisplayItem.js +9 -8
- package/src/screens/Device/detail.js +70 -62
- package/src/screens/Device/hooks/useEvaluateValue.js +1 -1
- package/src/screens/Drawer/Drawer.test.js +2 -2
- package/src/screens/Drawer/index.js +3 -3
- package/src/screens/EmergencyContacts/EmergencyContactsList.js +8 -4
- package/src/screens/EmergencyContacts/EmergencyContactsSelectContacts.js +3 -3
- package/src/screens/EmergencyContacts/__test__/EmergencyContactsSelectContacts.test.js +7 -7
- package/src/screens/EmergencySetting/components/DropDownItem.js +2 -2
- package/src/screens/EnterPassword/__test__/EnterPassword.test.js +8 -8
- package/src/screens/GuestInfo/components/RowGuestInfo.js +2 -2
- package/src/screens/GuestInfo/components/__test__/AccessScheduleSheet.test.js +3 -3
- package/src/screens/GuestInfo/index.js +2 -2
- package/src/screens/HanetCamera/ManageAccess.js +3 -3
- package/src/screens/HanetCamera/MemberInfo.js +2 -2
- package/src/screens/HanetCamera/__test__/Detail.test.js +9 -9
- package/src/screens/HanetCamera/__test__/MemberInfo.test.js +10 -10
- package/src/screens/HanetCamera/components/RequestFaceIDPopup.js +2 -2
- package/src/screens/ManageAccess/index.js +3 -3
- package/src/screens/MoveToAnotherSubUnit/__test__/index.test.js +9 -9
- package/src/screens/Notification/__test__/Notification.test.js +9 -9
- package/src/screens/Notification/components/NotificationItem.js +3 -4
- package/src/screens/Notification/index.js +3 -3
- package/src/screens/Notification/styles/NotificationItemStyles.js +0 -1
- package/src/screens/PlayBackCamera/__test__/index.test.js +1 -1
- package/src/screens/ScanChipQR/components/QRScan/__test__/QRScan.test.js +1 -1
- package/src/screens/ScanChipQR/components/QRScan/index.js +3 -3
- package/src/screens/SelectUnit/__test__/index.test.js +8 -8
- package/src/screens/SelectUnit/index.js +4 -4
- package/src/screens/SharedUnit/TabHeader.js +2 -2
- package/src/screens/Sharing/Components/EndDevice.js +3 -3
- package/src/screens/Sharing/UnitMemberList.js +2 -2
- package/src/screens/Sharing/__test__/UpdateShareDevice.test.js +7 -7
- package/src/screens/SideMenuDetail/__test__/index.test.js +8 -8
- package/src/screens/SmartAccount/Connecting/index.js +5 -5
- package/src/screens/SmartAccount/ListDevice/__test__/ListDevice.test.js +8 -8
- package/src/screens/SmartAccount/SuccessfullyConnected/__test__/SuccessfullyConnected.test.js +7 -7
- package/src/screens/SmartAccount/SuccessfullyConnected/index.js +2 -2
- package/src/screens/SmartAccount/__test__/Connecting.test.js +6 -6
- package/src/screens/SmartAccount/__test__/SmartAccount.test.js +10 -10
- package/src/screens/SmartIr/__test__/GroupButtonByType.test.js +3 -2
- package/src/screens/SmartIr/components/GroupButtonByType/GroupButtonByType.js +2 -2
- package/src/screens/SmartIr/components/SelectBrand.js +2 -2
- package/src/screens/SubUnit/AddSubUnit.js +28 -26
- package/src/screens/SubUnit/AddSubUnitStyles.js +10 -4
- package/src/screens/SubUnit/EditSubUnit.js +12 -11
- package/src/screens/SubUnit/ManageSubUnit.js +3 -3
- package/src/screens/SubUnit/__test__/AddSubUnit.test.js +13 -13
- package/src/screens/SubUnit/__test__/EditSubUnit.test.js +3 -3
- package/src/screens/Template/EditTemplate.js +6 -4
- package/src/screens/Template/__test__/EditTemplate.test.js +7 -7
- package/src/screens/Template/__test__/detail.test.js +4 -4
- package/src/screens/Template/__test__/index.test.js +1 -1
- package/src/screens/UVIndexGuide/index.js +2 -4
- package/src/screens/Unit/Detail.js +1 -5
- package/src/screens/Unit/MoreMenu.js +6 -5
- package/src/screens/Unit/SelectAddToFavorites.js +2 -2
- package/src/screens/Unit/SelectAddress.js +16 -12
- package/src/screens/Unit/Station/__test__/index.test.js +1 -1
- package/src/screens/Unit/__test__/MoreMenu.test.js +5 -1
- package/src/screens/Unit/__test__/SelectAddToFavorites.test.js +9 -9
- package/src/screens/Unit/__test__/SelectAddress.test.js +11 -17
- package/src/screens/Unit/__test__/Summaries.test.js +7 -7
- package/src/screens/Unit/components/AutomateScript/index.js +5 -5
- package/src/screens/Unit/components/ButtonWrapper/index.js +3 -3
- package/src/screens/Unit/components/Header/index.js +2 -2
- package/src/screens/Unit/components/SharedUnit/index.js +5 -5
- package/src/screens/Unit/components/__test__/AutomateScript.test.js +3 -3
- package/src/screens/Unit/components/__test__/SharedUnit.test.js +8 -8
- package/src/screens/Unit/hook/__test__/useUnitConnectRemoteDevices.test.js +2 -2
- package/src/screens/UnitSummary/components/AirQuality/index.js +6 -11
- package/src/screens/UnitSummary/components/WaterQuality/Item/index.js +5 -5
- package/src/screens/UnitSummary/index.js +6 -2
- package/src/utils/Apis/axios.js +5 -5
- package/src/utils/Functions/ShortEmail.js +1 -0
- package/src/utils/I18n/translations/en.js +6 -3
- package/src/utils/I18n/translations/vi.js +8 -4
- package/src/utils/__test__/Utils.test.js +16 -16
- package/src/utils/bluetooth.js +3 -0
- package/assets/images/OneTap.svg +0 -14
- package/assets/images/Schedule.svg +0 -39
- package/assets/images/ValueChange.svg +0 -49
|
@@ -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 { IconOutline } from '@ant-design/icons-react-native';
|
|
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
|
+
<IconOutline name="clock-circle" 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>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { memo, useEffect, useState } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
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
|
+
<IconOutline name="right" size={20} color={Colors.Gray8} />
|
|
51
51
|
</TouchableOpacity>
|
|
52
52
|
<ChoosePopup
|
|
53
53
|
isVisible={showFilterPopup}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { act, create } from 'react-test-renderer';
|
|
3
3
|
import { AccessibilityLabel } from '../../../../configs/Constants';
|
|
4
|
-
import { mockSCStore } from '../../../../context/mockStore';
|
|
5
4
|
import { SCProvider } from '../../../../context';
|
|
5
|
+
import { mockSCStore } from '../../../../context/mockStore';
|
|
6
6
|
import PasscodeField from '../index';
|
|
7
7
|
|
|
8
8
|
const mockSetDataForm = jest.fn();
|
|
@@ -59,7 +59,7 @@ describe('Test PasscodeField', () => {
|
|
|
59
59
|
await act(async () => {
|
|
60
60
|
await inputPasscode.props.onChangeText('123');
|
|
61
61
|
});
|
|
62
|
-
expect(mockSetDataForm).
|
|
62
|
+
expect(mockSetDataForm).toHaveBeenCalledWith([
|
|
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(mockSetDataForm).
|
|
77
|
+
expect(mockSetDataForm).toHaveBeenCalledWith([
|
|
78
78
|
{
|
|
79
79
|
key: 'passcode',
|
|
80
80
|
type: 'passcode',
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { TouchableOpacity } from 'react-native';
|
|
2
3
|
import { act, create } from 'react-test-renderer';
|
|
3
|
-
import {
|
|
4
|
+
import { AccessibilityLabel } from '../../../../configs/Constants';
|
|
4
5
|
import { SCProvider } from '../../../../context';
|
|
6
|
+
import { mockSCStore } from '../../../../context/mockStore';
|
|
5
7
|
import ScheduleField from '../index';
|
|
6
|
-
import { AccessibilityLabel } from '../../../../configs/Constants';
|
|
7
|
-
import { TouchableOpacity } from 'react-native';
|
|
8
8
|
|
|
9
9
|
const mockSetDataForm = jest.fn();
|
|
10
10
|
|
|
@@ -69,7 +69,7 @@ describe('Test ScheduleField', () => {
|
|
|
69
69
|
await act(async () => {
|
|
70
70
|
await recurring.props.onPress();
|
|
71
71
|
});
|
|
72
|
-
expect(mockSetDataForm).
|
|
72
|
+
expect(mockSetDataForm).toHaveBeenCalledWith([
|
|
73
73
|
{
|
|
74
74
|
key: 'schedule',
|
|
75
75
|
type: 'schedule',
|
|
@@ -99,7 +99,7 @@ describe('Test ScheduleField', () => {
|
|
|
99
99
|
await schedule.props.onPress();
|
|
100
100
|
});
|
|
101
101
|
|
|
102
|
-
expect(mockSetDataForm).
|
|
102
|
+
expect(mockSetDataForm).toHaveBeenCalledWith([
|
|
103
103
|
{
|
|
104
104
|
key: 'schedule',
|
|
105
105
|
type: 'schedule',
|
|
@@ -152,7 +152,7 @@ describe('Test ScheduleField', () => {
|
|
|
152
152
|
await act(async () => {
|
|
153
153
|
tree = await create(wrapComponent());
|
|
154
154
|
});
|
|
155
|
-
expect(mockSetDataForm).
|
|
155
|
+
expect(mockSetDataForm).toHaveBeenCalledWith([
|
|
156
156
|
{
|
|
157
157
|
key: 'schedule',
|
|
158
158
|
type: 'schedule',
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import renderer, { act } from 'react-test-renderer';
|
|
3
2
|
import DraggableFlatList from 'react-native-draggable-flatlist';
|
|
3
|
+
import renderer, { act } from 'react-test-renderer';
|
|
4
4
|
|
|
5
|
-
import FlatListDnD from '../index';
|
|
6
5
|
import { SCProvider } from '../../../context';
|
|
7
6
|
import { mockSCStore } from '../../../context/mockStore';
|
|
7
|
+
import FlatListDnD from '../index';
|
|
8
8
|
|
|
9
9
|
const wrapComponent = ({ ...rest }) => (
|
|
10
10
|
<SCProvider initState={mockSCStore({})}>
|
|
@@ -31,7 +31,7 @@ describe('Test FlatListDnD', () => {
|
|
|
31
31
|
await act(async () => {
|
|
32
32
|
draggableFlatList[0].props.onDragEnd({ data: [{ id: 2 }, { id: 1 }] });
|
|
33
33
|
});
|
|
34
|
-
expect(setData).
|
|
34
|
+
expect(setData).toHaveBeenCalledWith([{ id: 2 }, { id: 1 }]);
|
|
35
35
|
});
|
|
36
36
|
|
|
37
37
|
it('render FlatListDnD onDragEnd', async () => {
|
|
@@ -44,6 +44,6 @@ describe('Test FlatListDnD', () => {
|
|
|
44
44
|
await act(async () => {
|
|
45
45
|
draggableFlatList[0].props.onDragEnd({ data: [{ id: 2 }, { id: 1 }] });
|
|
46
46
|
});
|
|
47
|
-
expect(setData).
|
|
47
|
+
expect(setData).toHaveBeenCalledWith([{ id: 2 }, { id: 1 }]);
|
|
48
48
|
});
|
|
49
49
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { memo } from 'react';
|
|
2
2
|
import DraggableFlatList from 'react-native-draggable-flatlist';
|
|
3
3
|
|
|
4
|
+
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
|
4
5
|
import styles from './styles';
|
|
5
6
|
|
|
6
7
|
const FlatListDnD = memo(
|
|
@@ -23,15 +24,17 @@ const FlatListDnD = memo(
|
|
|
23
24
|
};
|
|
24
25
|
|
|
25
26
|
return (
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
<GestureHandlerRootView>
|
|
28
|
+
<DraggableFlatList
|
|
29
|
+
showsVerticalScrollIndicator={showsVerticalScrollIndicator}
|
|
30
|
+
data={data}
|
|
31
|
+
renderItem={renderItem}
|
|
32
|
+
keyExtractor={keyExtractor}
|
|
33
|
+
onDragEnd={onDragEnd || handleOnDragEnd}
|
|
34
|
+
containerStyle={styles.containerStyle}
|
|
35
|
+
{...props}
|
|
36
|
+
/>
|
|
37
|
+
</GestureHandlerRootView>
|
|
35
38
|
);
|
|
36
39
|
}
|
|
37
40
|
);
|
|
@@ -3,7 +3,15 @@ import { TouchableWithoutFeedback, View } from 'react-native';
|
|
|
3
3
|
import styles from './GridItemStyles';
|
|
4
4
|
|
|
5
5
|
const GridItem = memo(
|
|
6
|
-
({
|
|
6
|
+
({
|
|
7
|
+
icon,
|
|
8
|
+
accessibilityLabel,
|
|
9
|
+
selected,
|
|
10
|
+
onPress,
|
|
11
|
+
item,
|
|
12
|
+
children,
|
|
13
|
+
style = {},
|
|
14
|
+
}) => {
|
|
7
15
|
const isActive = selected && styles.active;
|
|
8
16
|
|
|
9
17
|
return (
|
|
@@ -11,7 +19,7 @@ const GridItem = memo(
|
|
|
11
19
|
onPress={() => onPress && onPress(item)}
|
|
12
20
|
accessibilityLabel={accessibilityLabel}
|
|
13
21
|
>
|
|
14
|
-
<View style={[styles.container, isActive]}>{children}</View>
|
|
22
|
+
<View style={[styles.container, style, isActive]}>{children}</View>
|
|
15
23
|
</TouchableWithoutFeedback>
|
|
16
24
|
);
|
|
17
25
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { act, create } from 'react-test-renderer';
|
|
3
2
|
import { TouchableOpacity } from 'react-native';
|
|
3
|
+
import { act, create } from 'react-test-renderer';
|
|
4
4
|
|
|
5
|
-
import { AccessibilityLabel } from '../../../configs/Constants';
|
|
6
5
|
import GroupCheckBox from '..';
|
|
6
|
+
import { AccessibilityLabel } from '../../../configs/Constants';
|
|
7
7
|
|
|
8
8
|
describe('Test Group CheckBox', () => {
|
|
9
9
|
let tree;
|
|
@@ -59,7 +59,7 @@ describe('Test Group CheckBox', () => {
|
|
|
59
59
|
await act(async () => {
|
|
60
60
|
buttons[0].props.onPress();
|
|
61
61
|
});
|
|
62
|
-
expect(mockFunc).
|
|
62
|
+
expect(mockFunc).toHaveBeenCalledTimes(2);
|
|
63
63
|
});
|
|
64
64
|
|
|
65
65
|
it('render Group CheckBox with foundIndex === -1 multiple false', async () => {
|
|
@@ -2,7 +2,7 @@ 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 { IconOutline } from '@ant-design/icons-react-native';
|
|
6
6
|
import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
|
|
7
7
|
import { useNavigation } from '@react-navigation/native';
|
|
8
8
|
import styles from './Styles/HeaderCustomStyles';
|
|
@@ -111,7 +111,7 @@ const HeaderCustom = ({
|
|
|
111
111
|
{isShowClose && (
|
|
112
112
|
<TouchableOpacity onPress={handleClose}>
|
|
113
113
|
<View style={styles.buttonAdd}>
|
|
114
|
-
<
|
|
114
|
+
<IconOutline name={'close'} size={24} color={Colors.Black} />
|
|
115
115
|
</View>
|
|
116
116
|
</TouchableOpacity>
|
|
117
117
|
)}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { act } from '@testing-library/react-hooks';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { TouchableOpacity } from 'react-native';
|
|
3
|
-
import { act } from '@testing-library/react-hooks';
|
|
4
4
|
import { create } from 'react-test-renderer';
|
|
5
5
|
import { HeaderCustom } from '..';
|
|
6
6
|
import { SCProvider } from '../../../context';
|
|
@@ -44,11 +44,11 @@ describe('Test HeaderCustom', () => {
|
|
|
44
44
|
await act(async () => {
|
|
45
45
|
TouchableOpacityElement[1].props.onPress();
|
|
46
46
|
});
|
|
47
|
-
expect(mockOnRefresh).
|
|
47
|
+
expect(mockOnRefresh).toHaveBeenCalled();
|
|
48
48
|
await act(async () => {
|
|
49
49
|
TouchableOpacityElement[2].props.onPress();
|
|
50
50
|
});
|
|
51
|
-
expect(mockShowPopoverWithRef).
|
|
51
|
+
expect(mockShowPopoverWithRef).toHaveBeenCalled();
|
|
52
52
|
});
|
|
53
53
|
|
|
54
54
|
it('Test render without props', async () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { memo, useCallback } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
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
|
+
<IconOutline 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 { IconFill, IconOutline } from '@ant-design/icons-react-native';
|
|
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
|
+
<IconFill
|
|
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
|
+
<IconOutline
|
|
80
80
|
name={iconCT}
|
|
81
81
|
color={colorIcon}
|
|
82
82
|
size={size}
|
|
@@ -2,10 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import { Platform } from 'react-native';
|
|
3
3
|
import { act, create } from 'react-test-renderer';
|
|
4
4
|
|
|
5
|
-
import ImagePicker from '../index';
|
|
6
|
-
import ButtonPopup from '../../ButtonPopup';
|
|
7
5
|
import { SCProvider } from '../../../context';
|
|
8
6
|
import { mockSCStore } from '../../../context/mockStore';
|
|
7
|
+
import ButtonPopup from '../../ButtonPopup';
|
|
8
|
+
import ImagePicker from '../index';
|
|
9
9
|
|
|
10
10
|
const mockSetImageUrl = jest.fn();
|
|
11
11
|
const mockSetShowImagePicker = jest.fn();
|
|
@@ -56,7 +56,7 @@ describe('Test ImagePicker', () => {
|
|
|
56
56
|
await act(async () => {
|
|
57
57
|
textInputs[0].props.onPressMain();
|
|
58
58
|
});
|
|
59
|
-
expect(mockSetImageUrl).
|
|
59
|
+
expect(mockSetImageUrl).toHaveBeenCalledWith({ path: 'path_from_camera' });
|
|
60
60
|
});
|
|
61
61
|
|
|
62
62
|
it('create ImagePicker onChooseFile', async () => {
|
|
@@ -69,7 +69,7 @@ describe('Test ImagePicker', () => {
|
|
|
69
69
|
await act(async () => {
|
|
70
70
|
buttonPopup.props.onPressSecondary();
|
|
71
71
|
});
|
|
72
|
-
expect(mockSetImageUrl).
|
|
72
|
+
expect(mockSetImageUrl).toHaveBeenCalledWith({
|
|
73
73
|
path: 'file:///data/user/0/com.eohjsc.eohmobile/cache/Camera/80fbbd4b-926d-425f-a081-e21b13f2f7d0.jpg',
|
|
74
74
|
});
|
|
75
75
|
});
|
|
@@ -84,6 +84,6 @@ describe('Test ImagePicker', () => {
|
|
|
84
84
|
await act(async () => {
|
|
85
85
|
await buttonPopup.props.onClose();
|
|
86
86
|
});
|
|
87
|
-
expect(mockSetShowImagePicker).
|
|
87
|
+
expect(mockSetShowImagePicker).toHaveBeenCalledWith(false);
|
|
88
88
|
});
|
|
89
89
|
});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { Text, TouchableOpacity } from 'react-native';
|
|
2
3
|
import { act, create } from 'react-test-renderer';
|
|
3
|
-
import { TouchableOpacity, Text } from 'react-native';
|
|
4
|
-
import MediaPlayerDetail from '../index';
|
|
5
4
|
import PauseIcon from '../../../assets/images/Common/Pause.svg';
|
|
6
5
|
import { SCProvider } from '../../../context';
|
|
7
6
|
import { mockSCStore } from '../../../context/mockStore';
|
|
8
|
-
import { ToastBottomHelper } from '../../../utils/Utils';
|
|
9
7
|
import { getTranslate } from '../../../utils/I18n';
|
|
8
|
+
import { ToastBottomHelper } from '../../../utils/Utils';
|
|
9
|
+
import MediaPlayerDetail from '../index';
|
|
10
10
|
|
|
11
11
|
const wrapComponent = (uri) => (
|
|
12
12
|
<SCProvider initState={mockSCStore({})}>
|
|
@@ -53,6 +53,8 @@ describe('Test MediaPlayerDetail', () => {
|
|
|
53
53
|
await act(async () => {
|
|
54
54
|
wrapper = await create(wrapComponent(uri));
|
|
55
55
|
});
|
|
56
|
-
expect(spyToastError).
|
|
56
|
+
expect(spyToastError).toHaveBeenCalledWith(
|
|
57
|
+
getTranslate('en', 'uri_invalid')
|
|
58
|
+
);
|
|
57
59
|
});
|
|
58
60
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useRef } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
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
|
+
<IconOutline 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 { IconOutline } from '@ant-design/icons-react-native';
|
|
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
|
+
<IconOutline 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
|
+
<IconOutline name="up" size={32} color={Colors.Primary} />
|
|
138
138
|
</TouchableOpacity>
|
|
139
139
|
</View>
|
|
140
140
|
<View style={styles.wrapButton}>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { act, create } from 'react-test-renderer';
|
|
3
3
|
import { SCProvider } from '../../../context';
|
|
4
4
|
import { mockSCStore } from '../../../context/mockStore';
|
|
5
5
|
import StatesGridActionTemplate from '../StatesGridActionTemplate';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import Popover from 'react-native-popover-view';
|
|
3
|
+
import { act, create } from 'react-test-renderer';
|
|
3
4
|
import { SCProvider } from '../../../context';
|
|
4
5
|
import { mockSCStore } from '../../../context/mockStore';
|
|
5
6
|
import PopoverComponent from '../index';
|
|
6
|
-
import Popover from 'react-native-popover-view';
|
|
7
7
|
|
|
8
8
|
const wrapComponent = (data) => (
|
|
9
9
|
<SCProvider initState={mockSCStore({})}>
|
|
@@ -26,6 +26,6 @@ describe('Test PopoverComponent', () => {
|
|
|
26
26
|
popover.props.onCloseComplete();
|
|
27
27
|
});
|
|
28
28
|
expect(popover.props.isVisible).toEqual(true);
|
|
29
|
-
expect(mockOnCloseComplete).
|
|
29
|
+
expect(mockOnCloseComplete).toHaveBeenCalled();
|
|
30
30
|
});
|
|
31
31
|
});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { act, create } from 'react-test-renderer';
|
|
3
|
-
import * as Progress from 'react-native-progress';
|
|
4
|
-
import Processing from '../index';
|
|
5
2
|
import { Text } from 'react-native';
|
|
3
|
+
import * as Progress from 'react-native-progress';
|
|
4
|
+
import { act, create } from 'react-test-renderer';
|
|
6
5
|
import { SCProvider } from '../../../context';
|
|
7
6
|
import { mockSCStore } from '../../../context/mockStore';
|
|
8
7
|
import { getPusher } from '../../../utils/Pusher';
|
|
9
8
|
import ViewButtonBottom from '../../ViewButtonBottom';
|
|
9
|
+
import Processing from '../index';
|
|
10
10
|
|
|
11
11
|
const wrapComponent = (props) => (
|
|
12
12
|
<SCProvider initState={mockSCStore({})}>
|
|
@@ -73,7 +73,7 @@ describe('Test Processing', () => {
|
|
|
73
73
|
tree = await create(wrapComponent({ onReady: setChannelName }));
|
|
74
74
|
await tree.unmount();
|
|
75
75
|
});
|
|
76
|
-
expect(getPusher().unsubscribe).
|
|
76
|
+
expect(getPusher().unsubscribe).toHaveBeenCalledWith(channelName);
|
|
77
77
|
});
|
|
78
78
|
|
|
79
79
|
it('test click ok', async () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { memo } from 'react';
|
|
2
2
|
import { View, TextInput } from 'react-native';
|
|
3
|
-
import
|
|
3
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
4
4
|
import { useTranslations } from '../../hooks/Common/useTranslations';
|
|
5
5
|
|
|
6
6
|
import { Colors } from '../../configs';
|
|
@@ -10,8 +10,8 @@ const SearchBarLocation = memo(({ input, onTextInput }) => {
|
|
|
10
10
|
const t = useTranslations();
|
|
11
11
|
return (
|
|
12
12
|
<View style={styles.container}>
|
|
13
|
-
<
|
|
14
|
-
name="
|
|
13
|
+
<IconOutline
|
|
14
|
+
name="search"
|
|
15
15
|
size={24}
|
|
16
16
|
color={Colors.Gray6}
|
|
17
17
|
accessibilityLabel="icon-search"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { memo } from 'react';
|
|
2
2
|
import { View, TouchableOpacity } from 'react-native';
|
|
3
|
-
import
|
|
3
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
4
4
|
|
|
5
5
|
import { Card } from '../CardShadow';
|
|
6
6
|
import Text from '../Text';
|
|
@@ -20,7 +20,7 @@ const SelectActionCard = memo(({ title, action, onPress }) => {
|
|
|
20
20
|
{action}
|
|
21
21
|
</Text>
|
|
22
22
|
</View>
|
|
23
|
-
<
|
|
23
|
+
<IconOutline name="right" size={20} />
|
|
24
24
|
</View>
|
|
25
25
|
</TouchableOpacity>
|
|
26
26
|
</Card>
|
|
@@ -2,7 +2,7 @@ import React, { memo, useCallback, useEffect, useMemo, useState } from 'react';
|
|
|
2
2
|
import { useIsFocused, useNavigation } from '@react-navigation/native';
|
|
3
3
|
import { useTranslations } from '../../hooks/Common/useTranslations';
|
|
4
4
|
import { ScrollView, TouchableOpacity, View } from 'react-native';
|
|
5
|
-
import
|
|
5
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
6
6
|
|
|
7
7
|
import { API, Colors } from '../../configs';
|
|
8
8
|
import { RadioCircle, Section, ViewButtonBottom } from '../../commons';
|
|
@@ -98,7 +98,11 @@ const SelectSubUnit = ({ unitId, title, subTitle, onPressNext, route }) => {
|
|
|
98
98
|
/>
|
|
99
99
|
))}
|
|
100
100
|
<TouchableOpacity style={styles.rowContainer} onPress={addSubUnit}>
|
|
101
|
-
<
|
|
101
|
+
<IconOutline
|
|
102
|
+
name="plus-circle"
|
|
103
|
+
size={20}
|
|
104
|
+
color={Colors.Primary}
|
|
105
|
+
/>
|
|
102
106
|
<View style={styles.row}>
|
|
103
107
|
<Text type="H4" color={Colors.Primary}>
|
|
104
108
|
{t('add_new_sub_unit')}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
+
import MockAdapter from 'axios-mock-adapter';
|
|
1
2
|
import React from 'react';
|
|
2
|
-
import renderer, { act } from 'react-test-renderer';
|
|
3
3
|
import { Platform } from 'react-native';
|
|
4
|
-
import
|
|
4
|
+
import renderer, { act } from 'react-test-renderer';
|
|
5
5
|
|
|
6
|
-
import SelectUnit from '../index';
|
|
7
6
|
import Text from '../../../commons/Text';
|
|
7
|
+
import { API } from '../../../configs';
|
|
8
8
|
import AccessibilityLabel from '../../../configs/AccessibilityLabel';
|
|
9
9
|
import { SCProvider } from '../../../context';
|
|
10
10
|
import { mockSCStore } from '../../../context/mockStore';
|
|
11
11
|
import api from '../../../utils/Apis/axios';
|
|
12
|
-
import
|
|
12
|
+
import SelectUnit from '../index';
|
|
13
13
|
|
|
14
14
|
const mock = new MockAdapter(api.axiosInstance);
|
|
15
15
|
|
|
@@ -103,6 +103,6 @@ describe('test single SelectUnit', () => {
|
|
|
103
103
|
await act(async () => {
|
|
104
104
|
goBack.props.onPress();
|
|
105
105
|
});
|
|
106
|
-
expect(global.mockedGoBack).
|
|
106
|
+
expect(global.mockedGoBack).toHaveBeenCalled();
|
|
107
107
|
});
|
|
108
108
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { memo, useCallback } from 'react';
|
|
2
2
|
import { TouchableOpacity, StyleSheet } from 'react-native';
|
|
3
|
-
import
|
|
3
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
4
4
|
import { Colors } from '../../configs';
|
|
5
5
|
|
|
6
6
|
const BtnRemoveMember = memo(({ member, onPressRemove }) => {
|
|
@@ -9,7 +9,7 @@ const BtnRemoveMember = memo(({ member, onPressRemove }) => {
|
|
|
9
9
|
}, [member, onPressRemove]);
|
|
10
10
|
return (
|
|
11
11
|
<TouchableOpacity style={styles.buttonRemove} onPress={onPress}>
|
|
12
|
-
<
|
|
12
|
+
<IconOutline name={'minus'} size={20} color={Colors.Gray8} />
|
|
13
13
|
</TouchableOpacity>
|
|
14
14
|
);
|
|
15
15
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState, useCallback } from 'react';
|
|
2
2
|
import { View, StyleSheet, TouchableOpacity } from 'react-native';
|
|
3
|
-
import
|
|
3
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
4
4
|
import { useTranslations } from '../../hooks/Common/useTranslations';
|
|
5
5
|
import { Colors } from '../../configs';
|
|
6
6
|
import Text from '../../commons/Text';
|
|
@@ -86,7 +86,7 @@ const StationDevicePermissions = ({ dataStation, onselectSensor }) => {
|
|
|
86
86
|
<View style={styles.infoContainer}>
|
|
87
87
|
<Text style={styles.text}>{sensor.name}</Text>
|
|
88
88
|
<View style={styles.rightImage}>
|
|
89
|
-
<
|
|
89
|
+
<IconOutline
|
|
90
90
|
name={expandedIndex === index ? 'up' : 'down'}
|
|
91
91
|
size={20}
|
|
92
92
|
color={Colors.Gray6}
|
|
@@ -5,7 +5,7 @@ import Text from '../../../Text';
|
|
|
5
5
|
import LastUpdatedText from '../../../Device/LastUpdatedText';
|
|
6
6
|
import { EvaluationConfigWrapper } from '../EvaluationOverConfig/EvaluationOverConfig';
|
|
7
7
|
import IconComponent from '../../../IconComponent';
|
|
8
|
-
import
|
|
8
|
+
import { IconOutline } from '@ant-design/icons-react-native';
|
|
9
9
|
|
|
10
10
|
const ConfigAndEvaluationDisplay = memo(
|
|
11
11
|
({ device, valueEvaluation, stationItem, configValue }) => {
|
|
@@ -44,7 +44,7 @@ const ConfigAndEvaluationDisplay = memo(
|
|
|
44
44
|
lastUpdated={configValue?.last_updated}
|
|
45
45
|
format={'DDMMYYYY'}
|
|
46
46
|
/>
|
|
47
|
-
<
|
|
47
|
+
<IconOutline style={styles.marginTop10} name="right" size={12} />
|
|
48
48
|
</View>
|
|
49
49
|
)}
|
|
50
50
|
</>
|