@eohjsc/react-native-smart-city 0.3.31 → 0.3.32
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/package.json +7 -5
- package/src/commons/Action/ItemQuickAction.js +2 -3
- package/src/commons/Action/__test__/ItemQuickAction.test.js +17 -9
- package/src/commons/ActionGroup/CurtainButtonTemplate.js +6 -6
- package/src/commons/ActionGroup/NumberUpDownActionTemplate.js +4 -4
- package/src/commons/ActionGroup/OnOffSmartLock/AutoLock/ButtonWrapper.js +5 -2
- package/src/commons/ActionGroup/OnOffSmartLock/AutoLock/__test__/index.test.js +10 -4
- package/src/commons/ActionGroup/OnOffSmartLock/AutoLock/index.js +4 -4
- package/src/commons/ActionGroup/OnOffSmartLock/OnOffSmartLock.js +2 -2
- package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/ItemPasscode.js +1 -1
- package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/__test__/index.test.js +2 -2
- package/src/commons/ActionGroup/OnOffSmartLock/PasscodeList/index.js +2 -2
- package/src/commons/ActionGroup/OnOffSmartLock/SetupGeneratePasscode/ButtonWrapper.js +2 -2
- package/src/commons/ActionGroup/OnOffSmartLock/SetupGeneratePasscode/__test__/index.test.js +12 -6
- package/src/commons/ActionGroup/OnOffSmartLock/SetupGeneratePasscode/index.js +8 -4
- package/src/commons/ActionGroup/OnOffTemplate/OnOffButtonTemplate.js +4 -6
- package/src/commons/ActionGroup/OneBigButtonTemplate.js +1 -1
- package/src/commons/ActionGroup/OptionsDropdownActionTemplate.js +10 -4
- package/src/commons/ActionGroup/SmartTiviActionTemplate/SmartTiviActionTemplate.js +25 -9
- package/src/commons/ActionGroup/SmartTiviActionTemplate/__test__/ControlPlay.test.js +13 -7
- package/src/commons/ActionGroup/SmartTiviActionTemplate/__test__/RectangleButton.test.js +9 -5
- package/src/commons/ActionGroup/SmartTiviActionTemplate/__test__/SmartTiviActionTemplate.test.js +25 -9
- package/src/commons/ActionGroup/SmartTiviActionTemplate/component/CircleButton.js +16 -6
- package/src/commons/ActionGroup/SmartTiviActionTemplate/component/ControlPlay.js +10 -4
- package/src/commons/ActionGroup/SmartTiviActionTemplate/component/RectangleButton.js +7 -3
- package/src/commons/ActionGroup/StatesGridActionTemplate.js +2 -2
- package/src/commons/ActionGroup/ThreeButtonTemplate.js +5 -5
- package/src/commons/ActionGroup/TwoButtonTemplate/index.js +4 -4
- package/src/commons/ActionGroup/__test__/NumberUpDownTemplate.test.js +7 -7
- package/src/commons/ActionGroup/__test__/OnOffSmartLock.test.js +3 -3
- package/src/commons/ActionGroup/__test__/OnOffTemplate.test.js +3 -3
- package/src/commons/ActionGroup/__test__/OptionsDropdownTemplate.test.js +9 -5
- package/src/commons/ActionGroup/__test__/index.test.js +5 -3
- package/src/commons/AlertAction/index.js +2 -2
- package/src/commons/Auth/AccountItem.js +9 -3
- package/src/commons/Auth/__test__/AccountItem.test.js +6 -3
- package/src/commons/Automate/ItemAutomate.js +13 -3
- package/src/commons/BackDefault/index.js +2 -2
- package/src/commons/BottomButtonView/index.js +4 -5
- package/src/commons/Button/index.js +0 -2
- package/src/commons/ButtonPopup/index.js +3 -3
- package/src/commons/Dashboard/MyPinnedSharedUnit/__test__/MyPinnedSharedUnit.test.js +3 -2
- package/src/commons/Dashboard/MyPinnedSharedUnit/index.js +4 -2
- package/src/commons/Dashboard/MyUnit/__test__/MyUnit.test.js +6 -3
- package/src/commons/Dashboard/MyUnit/index.js +5 -3
- package/src/commons/Device/ConnectedViewHeader.js +2 -2
- package/src/commons/Device/DeviceAlertStatus.js +2 -2
- package/src/commons/Device/DisconnectedView.js +2 -2
- package/src/commons/Device/Emergency/EmergencyButton.js +2 -2
- package/src/commons/Device/Emergency/__test__/EmergencyButton.test.js +3 -2
- package/src/commons/Device/FlatListItems.js +2 -2
- package/src/commons/Device/ItemAddNew/index.js +7 -12
- package/src/commons/Device/ItemDevice.js +16 -11
- package/src/commons/Device/SensorConnectedStatus.js +5 -2
- package/src/commons/Device/WindDirection/Compass/index.js +5 -2
- package/src/commons/Device/__test__/DeviceAlertStatus.test.js +8 -4
- package/src/commons/Device/__test__/FlatListItems.test.js +3 -2
- package/src/commons/Device/__test__/SensorConnectedStatus.test.js +4 -2
- package/src/commons/Explore/ActivityIndicator/index.js +5 -2
- package/src/commons/Explore/SearchBox/__test__/SearchBox.test.js +3 -3
- package/src/commons/Explore/SearchBox/index.js +2 -2
- package/src/commons/FieldTemplate/ChooseUserField/ChoosePopup.js +4 -4
- package/src/commons/FieldTemplate/ChooseUserField/__test__/index.test.js +11 -8
- package/src/commons/FieldTemplate/ChooseUserField/index.js +2 -2
- package/src/commons/FieldTemplate/PasscodeField/__test__/index.test.js +3 -2
- package/src/commons/FieldTemplate/PasscodeField/index.js +2 -2
- package/src/commons/FieldTemplate/ScheduleField/__test__/index.test.js +12 -7
- package/src/commons/Form/TextInput.js +2 -2
- package/src/commons/Form/TextInputPassword.js +2 -2
- package/src/commons/GroupCheckBox/__test__/GroupCheckBox.test.js +5 -3
- package/src/commons/GroupCheckBox/index.js +2 -2
- package/src/commons/HeaderAni/index.js +2 -3
- package/src/commons/MediaPlayerDetail/index.js +2 -2
- package/src/commons/MenuActionList/index.js +2 -2
- package/src/commons/MenuActionMore/index.js +2 -3
- package/src/commons/NavBar/index.js +2 -3
- package/src/commons/OneTapTemplate/NumberUpDownActionTemplate.js +11 -5
- package/src/commons/OneTapTemplate/OptionsDropdownActionTemplate.js +7 -3
- package/src/commons/OneTapTemplate/StatesGridActionTemplate.js +4 -2
- package/src/commons/OneTapTemplate/__test__/NumberUpDownActionTemplate.test.js +11 -8
- package/src/commons/OneTapTemplate/__test__/OptionsDropdownActionTemplate.test.js +9 -5
- package/src/commons/OneTapTemplate/__test__/StatesGridActionTemplate.test.js +5 -3
- package/src/commons/Popover/index.js +2 -13
- package/src/commons/PreventAccess/__test__/PreventAccess.test.js +5 -3
- package/src/commons/PreventAccess/index.js +3 -3
- package/src/commons/{Connecting → Processing}/__test__/Connecting.test.js +5 -4
- package/src/commons/Processing/index.js +93 -0
- package/src/commons/{Connecting → Processing}/styles.js +9 -1
- package/src/commons/SelectGateway/index.js +105 -0
- package/src/commons/SelectGateway/styles.js +55 -0
- package/src/commons/SelectSubUnit/__test__/SelectSubUnit.test.js +106 -0
- package/src/commons/SelectSubUnit/index.js +124 -0
- package/src/commons/SelectSubUnit/styles.js +55 -0
- package/src/commons/SelectUnit/__test__/SelectUnit.test.js +120 -0
- package/src/commons/SelectUnit/index.js +106 -0
- package/src/commons/SelectUnit/styles.js +54 -0
- package/src/commons/Sharing/WrapHeaderScrollable.js +2 -2
- package/src/commons/SubUnit/OneTap/ItemOneTap.js +4 -4
- package/src/commons/SubUnit/OneTap/__test__/SubUnitAutomate.test.js +25 -10
- package/src/commons/SubUnit/OneTap/index.js +9 -4
- package/src/commons/SubUnit/ShortDetail.js +11 -29
- package/src/commons/SubUnit/__test__/ShortDetail.test.js +15 -10
- package/src/commons/SummaryItem/index.js +2 -2
- package/src/commons/Unit/HeaderUnit/index.js +4 -5
- package/src/commons/Unit/SharedUnit.js +10 -8
- package/src/commons/Unit/__test__/HeaderUnit.test.js +13 -5
- package/src/commons/Unit/__test__/SharedUnit.test.js +30 -11
- package/src/commons/UnitSummary/AirQuality/__test__/index.test.js +13 -8
- package/src/commons/UnitSummary/AirQuality/index.js +7 -3
- package/src/commons/UnitSummary/TotalPowerBox.js +2 -2
- package/src/commons/UnitSummary/TotalPowerConsumption/index.js +2 -2
- package/src/commons/UnitSummary/__test__/TotalPowerBox.test.js +3 -2
- package/src/commons/UnitSummary/__test__/TotalPowerConsumption.test.js +4 -2
- package/src/commons/ViewButtonBottom/index.js +4 -4
- package/src/commons/WheelDateTimePicker/index.js +5 -3
- package/src/commons/WrapParallaxScrollView/index.js +2 -1
- package/src/configs/API.js +6 -14
- package/src/configs/AccessibilityLabel.js +608 -0
- package/src/configs/Constants.js +1 -604
- package/src/context/actionType.ts +7 -3
- package/src/context/mockStore.ts +6 -3
- package/src/context/reducer.ts +23 -8
- package/src/hoc/withRemoteControl.js +1 -0
- package/src/hooks/Common/index.js +2 -2
- package/src/hooks/Common/{useGGHomeDeviceConnected.js → useHomeAssistantDeviceConnected.js} +3 -3
- package/src/hooks/Common/usePopover.js +6 -1
- package/src/hooks/IoT/__test__/{useGGHomeConnection.test.js → useHomeAssistantConnection.test.js} +18 -18
- package/src/hooks/IoT/__test__/useRemoteControl.test.js +17 -12
- package/src/hooks/IoT/index.js +2 -2
- package/src/hooks/IoT/useHomeAssistantConnection.js +91 -0
- package/src/hooks/IoT/useRemoteControl.js +6 -6
- package/src/iot/RemoteControl/{GoogleHome.js → HomeAssistant.js} +21 -17
- package/src/iot/RemoteControl/LG.js +2 -1
- package/src/iot/RemoteControl/__test__/{GoogleHome.test.js → HomeAssistant.test.js} +30 -30
- package/src/navigations/AddDeviceStack.js +0 -14
- package/src/navigations/AddGatewayStack.js +51 -21
- package/src/navigations/Main.js +2 -2
- package/src/navigations/SmartIrStack.js +3 -3
- package/src/navigations/UnitStack.js +1 -1
- package/src/screens/AQIGuide/__test__/AQIGuide.test.js +5 -3
- package/src/screens/AQIGuide/index.js +5 -3
- package/src/screens/ActivityLog/FilterPopup.js +2 -2
- package/src/screens/ActivityLog/__test__/FilterPopup.test.js +2 -2
- package/src/screens/ActivityLog/__test__/index.test.js +3 -2
- package/src/screens/ActivityLog/index.js +3 -3
- package/src/screens/AddCommon/SelectSubUnit.js +44 -191
- package/src/screens/AddCommon/SelectUnit.js +51 -204
- package/src/screens/AddCommon/__test__/SelectSubUnit.test.js +7 -50
- package/src/screens/AddCommon/__test__/SelectUnit.test.js +28 -26
- package/src/screens/AddLocationMaps/__test__/index.test.js +13 -7
- package/src/screens/AddLocationMaps/index.js +3 -3
- package/src/screens/AddNewAction/Device/index.js +2 -2
- package/src/screens/AddNewAction/SelectAction.js +6 -6
- package/src/screens/AddNewAction/SelectSensorDevices.js +3 -3
- package/src/screens/AddNewAction/__test__/SelectAction.test.js +2 -2
- package/src/screens/AddNewAction/__test__/SelectSensorDevices.test.js +8 -3
- package/src/screens/AddNewAutoSmart/__test__/AddNewAutoSmart.test.js +11 -7
- package/src/screens/AddNewAutoSmart/index.js +9 -12
- package/src/screens/AddNewDevice/ConnectingDevices.js +1 -1
- package/src/screens/AddNewDevice/__test__/AddNewDevice.test.js +7 -4
- package/src/screens/AddNewDevice/index.js +4 -4
- package/src/screens/AddNewGateway/ConnectingDevice.js +40 -0
- package/src/screens/AddNewGateway/ConnectingModbusDevice.js +61 -0
- package/src/screens/AddNewGateway/ConnectingWifiDevice.js +70 -0
- package/src/screens/AddNewGateway/ConnectingZigbeeDevice.js +60 -0
- package/src/screens/AddNewGateway/PlugAndPlay/FirstWarning.js +21 -8
- package/src/screens/AddNewGateway/PlugAndPlay/__test__/FirstWarning.test.js +23 -4
- package/src/screens/AddNewGateway/RenameNewDevices.js +141 -0
- package/src/screens/AddNewGateway/RenameNewDevicesStyles.js +75 -0
- package/src/screens/AddNewGateway/ScanGatewayQR.js +57 -0
- package/src/screens/AddNewGateway/ScanModbusQR.js +53 -0
- package/src/screens/AddNewGateway/ScanWifiDeviceQR.js +55 -0
- package/src/screens/AddNewGateway/SelectDeviceSubUnit.js +31 -0
- package/src/screens/AddNewGateway/SelectDeviceType.js +52 -0
- package/src/screens/AddNewGateway/SelectDeviceUnit.js +29 -0
- package/src/screens/AddNewGateway/SelectModbusGateway.js +34 -0
- package/src/screens/AddNewGateway/SelectZigbeeGateway.js +34 -0
- package/src/screens/AddNewGateway/ShareWifiPassword.js +302 -0
- package/src/screens/AddNewGateway/ShareWifiPasswordStyles.js +44 -0
- package/src/screens/AddNewGateway/__test__/AddNewGateway.test.js +7 -4
- package/src/screens/AddNewGateway/__test__/ConnectingModbusDevice.test.js +63 -0
- package/src/screens/AddNewGateway/__test__/{SelectGateway.test.js → ConnectingWifiDevice.test.js} +15 -10
- package/src/screens/AddNewGateway/__test__/ConnectingZigbeeDevice.test.js +62 -0
- package/src/screens/AddNewGateway/__test__/RenameNewDevices.test.js +191 -0
- package/src/screens/AddNewGateway/__test__/ScanGatewayQR.test.js +73 -0
- package/src/screens/AddNewGateway/__test__/ScanModbusQR.test.js +75 -0
- package/src/screens/AddNewGateway/__test__/ScanWifiDeviceQR.test.js +73 -0
- package/src/screens/AddNewGateway/__test__/SelectDeviceSubUnit.test.js +47 -0
- package/src/screens/AddNewGateway/__test__/SelectDeviceType.test.js +89 -0
- package/src/screens/AddNewGateway/__test__/SelectDeviceUnit.test.js +48 -0
- package/src/screens/AddNewGateway/__test__/SelectModbusGateway.test.js +77 -0
- package/src/screens/AddNewGateway/__test__/SelectZigbeeGateway.test.js +77 -0
- package/src/screens/AddNewGateway/__test__/ShareWifiPassword.test.js +294 -0
- package/src/screens/AddNewGateway/hooks/__Tests__/index.test.js +1 -1
- package/src/screens/AddNewGateway/index.js +4 -4
- package/src/screens/AddNewOneTap/__test__/AddNewOneTap.test.js +5 -4
- package/src/screens/AddNewOneTap/index.js +4 -4
- package/src/screens/Automate/__test__/index.test.js +2 -2
- package/src/screens/Automate/index.js +6 -2
- package/src/screens/ConfirmUnitDeletion/__test__/ConfirmUnitDeletion.test.js +3 -2
- package/src/screens/ConfirmUnitDeletion/index.js +3 -3
- package/src/screens/Device/EditDevice/__test__/EditDevice.test.js +5 -5
- package/src/screens/Device/EditDevice/index.js +3 -3
- package/src/screens/Device/__test__/detail.test.js +38 -22
- package/src/screens/Device/components/SensorConnectStatusViewHeader.js +6 -6
- package/src/screens/Device/components/SensorDisplayItem.js +2 -2
- package/src/screens/Device/detail.js +28 -22
- package/src/screens/Device/hooks/useEvaluateValue.js +0 -2
- package/src/screens/DeviceInfo/__test__/index.test.js +8 -4
- package/src/screens/DeviceInfo/index.js +10 -6
- package/src/screens/Drawer/index.js +21 -9
- package/src/screens/EmergencyContacts/EmergencyContactsAddNew.js +8 -4
- package/src/screens/EmergencyContacts/EmergencyContactsList.js +1 -1
- package/src/screens/EmergencyContacts/EmergencyContactsSelectContacts.js +5 -3
- package/src/screens/EmergencyContacts/__test__/EmergencyContactAddNew.test.js +9 -5
- package/src/screens/EmergencyContacts/__test__/EmergencyContactList.test.js +7 -3
- package/src/screens/EmergencyContacts/__test__/EmergencyContactsSelectContacts.test.js +7 -3
- package/src/screens/EmergencySetting/__test__/DropDownItem.test.js +3 -2
- package/src/screens/EmergencySetting/components/DropDownItem.js +2 -2
- package/src/screens/EnterPassword/__test__/EnterPassword.test.js +6 -3
- package/src/screens/EnterPassword/index.js +5 -3
- package/src/screens/GuestInfo/__test__/index.test.js +18 -12
- package/src/screens/GuestInfo/components/AccessScheduleItem.js +2 -2
- package/src/screens/GuestInfo/components/AccessScheduleSheet.js +3 -3
- package/src/screens/GuestInfo/components/HeaderGuestInfo.js +2 -2
- package/src/screens/GuestInfo/components/RecurringDetail.js +4 -4
- package/src/screens/GuestInfo/components/TemporaryDetail.js +3 -3
- package/src/screens/GuestInfo/index.js +1 -1
- package/src/screens/HanetCamera/Detail.js +10 -4
- package/src/screens/HanetCamera/ManageAccess.js +4 -4
- package/src/screens/HanetCamera/MemberInfo.js +1 -1
- package/src/screens/HanetCamera/__test__/Detail.test.js +5 -3
- package/src/screens/HanetCamera/__test__/ManageAccess.test.js +10 -4
- package/src/screens/HanetCamera/__test__/MemberInfo.test.js +4 -2
- package/src/screens/HanetCamera/components/RequestFaceIDPopup.js +2 -2
- package/src/screens/ManageAccess/index.js +1 -1
- package/src/screens/MoveToAnotherSubUnit/__test__/index.test.js +4 -4
- package/src/screens/MoveToAnotherSubUnit/index.js +2 -2
- package/src/screens/PlayBackCamera/__test__/index.test.js +9 -6
- package/src/screens/PlayBackCamera/index.js +6 -6
- package/src/screens/ScanChipQR/components/QRScan/__test__/QRScan.test.js +1 -1
- package/src/screens/ScanChipQR/components/QRScan/index.js +10 -3
- package/src/screens/ScriptDetail/__test__/index.test.js +8 -4
- package/src/screens/ScriptDetail/index.js +7 -6
- package/src/screens/SelectUnit/__test__/index.test.js +4 -3
- package/src/screens/SelectUnit/index.js +3 -3
- package/src/screens/SetSchedule/index.js +1 -1
- package/src/screens/Sharing/Components/SensorItem.js +2 -2
- package/src/screens/Sharing/Components/__test__/SensorItem.test.js +4 -2
- package/src/screens/Sharing/InfoMemberUnit.js +7 -6
- package/src/screens/Sharing/MemberList.js +4 -4
- package/src/screens/Sharing/SelectPermission.js +9 -4
- package/src/screens/Sharing/SelectUser.js +9 -5
- package/src/screens/Sharing/__test__/InfoMemberUnit.test.js +3 -2
- package/src/screens/Sharing/__test__/SelectUser.test.js +7 -4
- package/src/screens/SideMenuDetail/__test__/index.test.js +11 -7
- package/src/screens/SideMenuDetail/index.js +2 -2
- package/src/screens/SmartIr/__test__/GroupButtonByType.test.js +4 -2
- package/src/screens/SmartIr/__test__/SelectDeviceType.test.js +5 -5
- package/src/screens/SmartIr/__test__/SmartIr.test.js +14 -6
- package/src/screens/SmartIr/components/GroupButtonByType/GroupButtonByType.js +4 -2
- package/src/screens/SmartIr/components/{SelectDeviceType.js → SelectIrDeviceType.js} +2 -2
- package/src/screens/SmartIr/index.js +1 -1
- package/src/screens/SubUnit/AddSubUnit.js +7 -3
- package/src/screens/SubUnit/Detail.js +6 -6
- package/src/screens/SubUnit/EditSubUnit.js +10 -6
- package/src/screens/SubUnit/ManageSubUnit.js +2 -2
- package/src/screens/SubUnit/__test__/AddSubUnit.test.js +6 -3
- package/src/screens/SubUnit/__test__/Detail.test.js +5 -3
- package/src/screens/SubUnit/__test__/EditSubUnit.test.js +9 -5
- package/src/screens/SubUnit/__test__/ManageSubUnit.test.js +3 -2
- package/src/screens/SyncLGDevice/AddLGDevice.js +4 -4
- package/src/screens/SyncLGDevice/__test__/AddLGDevice.test.js +7 -4
- package/src/screens/TDSGuide/__test__/TDSGuide.test.js +4 -2
- package/src/screens/TDSGuide/index.js +2 -2
- package/src/screens/Template/EditTemplate.js +2 -1
- package/src/screens/Template/__test__/detail.test.js +9 -1
- package/src/screens/Template/index.js +0 -1
- package/src/screens/UVIndexGuide/__test__/UVIndexGuide.test.js +3 -2
- package/src/screens/UVIndexGuide/index.js +2 -2
- package/src/screens/Unit/AddMenu.js +6 -20
- package/src/screens/Unit/ChooseLocation.js +1 -1
- package/src/screens/Unit/Detail.js +10 -10
- package/src/screens/Unit/ManageUnit.js +21 -15
- package/src/screens/Unit/MyAllUnit/index.js +1 -1
- package/src/screens/Unit/SelectAddToFavorites.js +7 -8
- package/src/screens/Unit/SelectAddress.js +4 -4
- package/src/screens/Unit/SmartAccountItem.js +3 -3
- package/src/screens/Unit/Station/__test__/index.test.js +1 -1
- package/src/screens/Unit/Station/index.js +2 -2
- package/src/screens/Unit/Summaries.js +2 -2
- package/src/screens/Unit/__test__/CheckSendEmail.test.js +6 -6
- package/src/screens/Unit/__test__/Detail.test.js +17 -12
- package/src/screens/Unit/__test__/ManageUnit.test.js +40 -18
- package/src/screens/Unit/__test__/SelectAddress.test.js +15 -8
- package/src/screens/Unit/__test__/SmartAccountItem.test.js +4 -3
- package/src/screens/Unit/components/AutomateScript/index.js +5 -2
- package/src/screens/Unit/components/ListMyAllUnit/index.js +1 -1
- package/src/screens/Unit/components/MyAllUnit/__test__/Header.test.js +9 -5
- package/src/screens/Unit/components/MyAllUnit/index.js +1 -1
- package/src/screens/Unit/components/MyUnitDevice/index.js +8 -5
- package/src/screens/Unit/components/SharedUnit/index.js +12 -6
- package/src/screens/Unit/components/__test__/MyUnitDevice.test.js +2 -2
- package/src/screens/Unit/components/__test__/SharedUnit.test.js +24 -9
- package/src/screens/Unit/hook/useUnitConnectRemoteDevices.js +25 -11
- package/src/screens/UnitSummary/__test__/index.test.js +4 -2
- package/src/screens/UnitSummary/components/3PPowerConsumption/__test__/3PPowerConsumption.test.js +4 -2
- package/src/screens/UnitSummary/components/3PPowerConsumption/index.js +2 -2
- package/src/screens/UnitSummary/components/PowerConsumption/__test__/PowerConsumption.test.js +4 -2
- package/src/screens/UnitSummary/components/PowerConsumption/index.js +2 -2
- package/src/screens/UnitSummary/components/RunningDevices/__test__/index.test.js +5 -4
- package/src/screens/UnitSummary/components/RunningDevices/index.js +6 -3
- package/src/screens/UnitSummary/components/TotalPowerBox/index.js +2 -2
- package/src/screens/UnitSummary/components/TotalPowerConsumption/index.js +2 -2
- package/src/screens/UnitSummary/components/__test__/TotalPowerBox.test.js +3 -2
- package/src/screens/UnitSummary/components/__test__/TotalPowerConsumption.test.js +4 -2
- package/src/screens/UnitSummary/index.js +10 -8
- package/src/screens/WaterQualityGuide/__test__/index.test.js +17 -12
- package/src/screens/WaterQualityGuide/index.js +26 -10
- package/src/utils/Apis/axios.js +1 -0
- package/src/utils/I18n/translations/en.json +9 -9
- package/src/utils/I18n/translations/vi.json +8 -8
- package/src/utils/Route/index.js +16 -10
- package/src/commons/Connecting/index.js +0 -67
- package/src/commons/ConnectingProcess/DeviceItem/DeviceItem.js +0 -28
- package/src/commons/ConnectingProcess/DeviceItem/DeviceItemStyles.js +0 -41
- package/src/commons/ConnectingProcess/__test__/Connecting.test.js +0 -163
- package/src/commons/ConnectingProcess/__test__/DeviceItem.test.js +0 -19
- package/src/commons/ConnectingProcess/index.js +0 -213
- package/src/commons/ConnectingProcess/styles.js +0 -69
- package/src/hooks/IoT/useGGHomeConnection.js +0 -91
- package/src/iot/RemoteControl/index.js +0 -55
- package/src/screens/AddNewDevice/ConnectDevices.js +0 -184
- package/src/screens/AddNewDevice/__test__/ConnectDevices.test.js +0 -131
- package/src/screens/AddNewGateway/ConnectedGateway.js +0 -139
- package/src/screens/AddNewGateway/ConnectingGateway.js +0 -137
- package/src/screens/AddNewGateway/PlugAndPlay/ConnectWifiWarning.js +0 -214
- package/src/screens/AddNewGateway/PlugAndPlay/GatewayWifiList.js +0 -319
- package/src/screens/AddNewGateway/PlugAndPlay/__test__/ConnectWifiWarning.test.js +0 -75
- package/src/screens/AddNewGateway/PlugAndPlay/__test__/GatewayWifiList.test.js +0 -130
- package/src/screens/AddNewGateway/SelectGateway.js +0 -133
- package/src/screens/AddNewGateway/SetupGatewayWifi.js +0 -207
- package/src/screens/AddNewGateway/__test__/ConnectedGateway.test.js +0 -71
- package/src/screens/AddNewGateway/__test__/ConnectingGateway.test.js +0 -96
- package/src/screens/AddNewGateway/__test__/SetupGateway.test.js +0 -120
- package/src/screens/ScanChipQR/__test__/ScanChipQR.test.js +0 -115
- package/src/screens/ScanChipQR/hooks/index.js +0 -120
- package/src/screens/ScanChipQR/index.js +0 -29
- package/src/screens/ScanSensorQR/__test__/ScanSensorQR.test.js +0 -111
- package/src/screens/ScanSensorQR/hooks/index.js +0 -40
- package/src/screens/ScanSensorQR/index.js +0 -39
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eohjsc/react-native-smart-city",
|
|
3
3
|
"title": "React Native Smart Home",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.32",
|
|
5
5
|
"description": "TODO",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"files": [
|
|
@@ -39,11 +39,12 @@
|
|
|
39
39
|
"reset-cache": "react-native start --reset-cache",
|
|
40
40
|
"merge_conflict": "yarn jest && yarn update_coverage_result && yarn check_coverage_config",
|
|
41
41
|
"jest": "jest --detectOpenHandles",
|
|
42
|
+
"jest1": "jest --detectOpenHandles --coverage=0",
|
|
42
43
|
"example": "yarn --cwd example",
|
|
43
44
|
"pods": "cd example && pod-install --quiet",
|
|
44
45
|
"bootstrap": "yarn example && yarn && yarn pods",
|
|
45
|
-
"build": "
|
|
46
|
-
"watch": "
|
|
46
|
+
"build": "syncdir ./src ../EohMobile/node_modules/@eohjsc/react-native-smart-city/src",
|
|
47
|
+
"watch": "syncdir ./src ../EohMobile/node_modules/@eohjsc/react-native-smart-city/src --watch"
|
|
47
48
|
},
|
|
48
49
|
"repository": {
|
|
49
50
|
"type": "git",
|
|
@@ -139,7 +140,7 @@
|
|
|
139
140
|
"patch-package": "^6.2.2",
|
|
140
141
|
"pluralize": "^8.0.0",
|
|
141
142
|
"postinstall": "^0.7.0",
|
|
142
|
-
"pusher-js": "^7.0
|
|
143
|
+
"pusher-js": "^7.4.0",
|
|
143
144
|
"pusher-js-auth": "^4.0.1",
|
|
144
145
|
"querystring": "^0.2.0",
|
|
145
146
|
"react-content-loader": "^6.0.3",
|
|
@@ -207,9 +208,10 @@
|
|
|
207
208
|
"redux-persist": "^6.0.0",
|
|
208
209
|
"redux-saga": "^1.1.3",
|
|
209
210
|
"string-format": "^2.0.0",
|
|
210
|
-
"sync-
|
|
211
|
+
"sync-directory": "^5.1.7",
|
|
211
212
|
"timezone-mock": "^1.1.3",
|
|
212
213
|
"uuid-by-string": "^3.0.2",
|
|
214
|
+
"uuidv4": "^6.2.13",
|
|
213
215
|
"validator": "^13.1.1",
|
|
214
216
|
"victory-native": "^35.0.1"
|
|
215
217
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { memo, useCallback, useEffect, useState } from 'react';
|
|
2
2
|
import { TouchableOpacity, View } from 'react-native';
|
|
3
|
-
import {
|
|
3
|
+
import { AccessibilityLabel } from '../../configs/Constants';
|
|
4
4
|
import { useSCContextSelector } from '../../context';
|
|
5
5
|
import { useRemoteControl } from '../../hooks/IoT';
|
|
6
6
|
import { useConfigGlobalState } from '../../iot/states';
|
|
@@ -87,8 +87,7 @@ const ItemQuickAction = memo(({ sensor, wrapperStyle, setStatus }) => {
|
|
|
87
87
|
|
|
88
88
|
return (
|
|
89
89
|
<TouchableOpacity
|
|
90
|
-
|
|
91
|
-
accessibilityLabel={`${TESTID.ITEM_QUICK_ACTION_PRESS}-${sensor?.id}`}
|
|
90
|
+
accessibilityLabel={`${AccessibilityLabel.ITEM_QUICK_ACTION_PRESS}-${sensor?.id}`}
|
|
92
91
|
onPress={onActionPress}
|
|
93
92
|
>
|
|
94
93
|
<View style={wrapperStyle}>
|
|
@@ -3,7 +3,7 @@ import { TouchableOpacity } from 'react-native';
|
|
|
3
3
|
import { act, create } from 'react-test-renderer';
|
|
4
4
|
import ItemQuickAction from '../ItemQuickAction';
|
|
5
5
|
import { Colors } from '../../../configs';
|
|
6
|
-
import {
|
|
6
|
+
import { AccessibilityLabel } from '../../../configs/Constants';
|
|
7
7
|
import { factory } from 'factory-girl';
|
|
8
8
|
|
|
9
9
|
class Sensor {}
|
|
@@ -95,7 +95,8 @@ describe('Test ItemQuickAction', () => {
|
|
|
95
95
|
const instance = tree.root;
|
|
96
96
|
const buttonOnActionPress = instance.findAll(
|
|
97
97
|
(el) =>
|
|
98
|
-
el.props.
|
|
98
|
+
el.props.accessibilityLabel ===
|
|
99
|
+
`${AccessibilityLabel.ITEM_QUICK_ACTION_PRESS}-${sensor?.id}` &&
|
|
99
100
|
el.type === TouchableOpacity
|
|
100
101
|
);
|
|
101
102
|
expect(buttonOnActionPress).toHaveLength(0);
|
|
@@ -117,7 +118,8 @@ describe('Test ItemQuickAction', () => {
|
|
|
117
118
|
const instance = tree.root;
|
|
118
119
|
const buttonOnActionPress = instance.find(
|
|
119
120
|
(el) =>
|
|
120
|
-
el.props.
|
|
121
|
+
el.props.accessibilityLabel ===
|
|
122
|
+
`${AccessibilityLabel.ITEM_QUICK_ACTION_PRESS}-${sensor?.id}` &&
|
|
121
123
|
el.type === TouchableOpacity
|
|
122
124
|
);
|
|
123
125
|
expect(buttonOnActionPress).toBeDefined();
|
|
@@ -150,7 +152,8 @@ describe('Test ItemQuickAction', () => {
|
|
|
150
152
|
const instance = tree.root;
|
|
151
153
|
const buttonOnActionPress = instance.find(
|
|
152
154
|
(el) =>
|
|
153
|
-
el.props.
|
|
155
|
+
el.props.accessibilityLabel ===
|
|
156
|
+
`${AccessibilityLabel.ITEM_QUICK_ACTION_PRESS}-${sensor?.id}` &&
|
|
154
157
|
el.type === TouchableOpacity
|
|
155
158
|
);
|
|
156
159
|
expect(buttonOnActionPress).toBeDefined();
|
|
@@ -196,7 +199,8 @@ describe('Test ItemQuickAction', () => {
|
|
|
196
199
|
const instance = tree.root;
|
|
197
200
|
const buttonOnActionPress = instance.find(
|
|
198
201
|
(el) =>
|
|
199
|
-
el.props.
|
|
202
|
+
el.props.accessibilityLabel ===
|
|
203
|
+
`${AccessibilityLabel.ITEM_QUICK_ACTION_PRESS}-${sensor?.id}` &&
|
|
200
204
|
el.type === TouchableOpacity
|
|
201
205
|
);
|
|
202
206
|
|
|
@@ -219,7 +223,8 @@ describe('Test ItemQuickAction', () => {
|
|
|
219
223
|
const instance = tree.root;
|
|
220
224
|
const buttonOnActionPress = instance.find(
|
|
221
225
|
(el) =>
|
|
222
|
-
el.props.
|
|
226
|
+
el.props.accessibilityLabel ===
|
|
227
|
+
`${AccessibilityLabel.ITEM_QUICK_ACTION_PRESS}-${sensor?.id}` &&
|
|
223
228
|
el.type === TouchableOpacity
|
|
224
229
|
);
|
|
225
230
|
expect(buttonOnActionPress).toBeDefined();
|
|
@@ -235,7 +240,8 @@ describe('Test ItemQuickAction', () => {
|
|
|
235
240
|
const instance = tree.root;
|
|
236
241
|
const buttonOnActionPress = instance.find(
|
|
237
242
|
(el) =>
|
|
238
|
-
el.props.
|
|
243
|
+
el.props.accessibilityLabel ===
|
|
244
|
+
`${AccessibilityLabel.ITEM_QUICK_ACTION_PRESS}-${sensor?.id}` &&
|
|
239
245
|
el.type === TouchableOpacity
|
|
240
246
|
);
|
|
241
247
|
expect(buttonOnActionPress).toBeDefined();
|
|
@@ -282,7 +288,8 @@ describe('Test ItemQuickAction', () => {
|
|
|
282
288
|
const instance = tree.root;
|
|
283
289
|
const buttonOnActionPress = instance.find(
|
|
284
290
|
(el) =>
|
|
285
|
-
el.props.
|
|
291
|
+
el.props.accessibilityLabel ===
|
|
292
|
+
`${AccessibilityLabel.ITEM_QUICK_ACTION_PRESS}-${sensor?.id}` &&
|
|
286
293
|
el.type === TouchableOpacity
|
|
287
294
|
);
|
|
288
295
|
|
|
@@ -313,7 +320,8 @@ describe('Test ItemQuickAction', () => {
|
|
|
313
320
|
const instance = tree.root;
|
|
314
321
|
const buttonOnActionPress = instance.find(
|
|
315
322
|
(el) =>
|
|
316
|
-
el.props.
|
|
323
|
+
el.props.accessibilityLabel ===
|
|
324
|
+
`${AccessibilityLabel.ITEM_QUICK_ACTION_PRESS}-${sensor?.id}` &&
|
|
317
325
|
el.type === TouchableOpacity
|
|
318
326
|
);
|
|
319
327
|
|
|
@@ -3,7 +3,7 @@ import { TouchableOpacity, View, Switch, Image } from 'react-native';
|
|
|
3
3
|
import { Icon } from '@ant-design/react-native';
|
|
4
4
|
import styles from './CurtainButtonTemplateStyle';
|
|
5
5
|
import Text from '../Text';
|
|
6
|
-
import {
|
|
6
|
+
import { AccessibilityLabel } from '../../configs/Constants';
|
|
7
7
|
import { Colors, Images } from '../../configs';
|
|
8
8
|
|
|
9
9
|
const CurtainButtonTemplate = memo(({ actionGroup, doAction, sensor }) => {
|
|
@@ -50,21 +50,21 @@ const CurtainButtonTemplate = memo(({ actionGroup, doAction, sensor }) => {
|
|
|
50
50
|
icon: Images.buttonLeftCurtain,
|
|
51
51
|
text: text1,
|
|
52
52
|
onPress: onButtonClosePress,
|
|
53
|
-
|
|
53
|
+
accessibilityLabel: AccessibilityLabel.BUTTON_TEMPLATE_1,
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
style: styles.buttonActionCurtainCenter,
|
|
57
57
|
icon: Images.buttonPauseCurtain,
|
|
58
58
|
text: '',
|
|
59
59
|
onPress: onButtonStopPress,
|
|
60
|
-
|
|
60
|
+
accessibilityLabel: AccessibilityLabel.BUTTON_TEMPLATE_2,
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
style: styles.buttonActionCurtain,
|
|
64
64
|
icon: Images.buttonRightCurtain,
|
|
65
65
|
text: text3,
|
|
66
66
|
onPress: onButtonOpenPress,
|
|
67
|
-
|
|
67
|
+
accessibilityLabel: AccessibilityLabel.BUTTON_TEMPLATE_3,
|
|
68
68
|
},
|
|
69
69
|
];
|
|
70
70
|
|
|
@@ -72,7 +72,7 @@ const CurtainButtonTemplate = memo(({ actionGroup, doAction, sensor }) => {
|
|
|
72
72
|
<>
|
|
73
73
|
{buttons.map((item, index) => (
|
|
74
74
|
<TouchableOpacity
|
|
75
|
-
|
|
75
|
+
accessibilityLabel={item.accessibilityLabel}
|
|
76
76
|
style={item?.style}
|
|
77
77
|
onPress={item.onPress}
|
|
78
78
|
underlayColor={Colors.Gray2}
|
|
@@ -91,7 +91,7 @@ const CurtainButtonTemplate = memo(({ actionGroup, doAction, sensor }) => {
|
|
|
91
91
|
<Icon name={icon} size={15} color={color} style={styles.iconLock} />
|
|
92
92
|
<Text
|
|
93
93
|
style={styles.textLockDoor}
|
|
94
|
-
|
|
94
|
+
accessibilityLabel={AccessibilityLabel.TEXT_DOOR_LOOK_ON_OFF}
|
|
95
95
|
>
|
|
96
96
|
{text_door_lock}{' '}
|
|
97
97
|
</Text>
|
|
@@ -8,7 +8,7 @@ import { useConfigGlobalState } from '../../iot/states';
|
|
|
8
8
|
import { useUnwatchLGDeviceConfigControl } from '../../hooks/IoT';
|
|
9
9
|
import styles from './NumberUpDownActionTemplateStyle';
|
|
10
10
|
import { watchMultiConfigs } from '../../iot/Monitor';
|
|
11
|
-
import { DEVICE_TYPE,
|
|
11
|
+
import { DEVICE_TYPE, AccessibilityLabel } from '../../configs/Constants';
|
|
12
12
|
|
|
13
13
|
const NumberUpDownActionTemplate = ({
|
|
14
14
|
actionGroup = {},
|
|
@@ -114,12 +114,12 @@ const NumberUpDownActionTemplate = ({
|
|
|
114
114
|
<TouchableOpacity
|
|
115
115
|
style={styles.downButton}
|
|
116
116
|
onPress={doActionDown}
|
|
117
|
-
|
|
117
|
+
accessibilityLabel={AccessibilityLabel.NUMBER_ACTION_DOWN}
|
|
118
118
|
>
|
|
119
119
|
<IconOutline name="down" size={32} color={Colors.Primary} />
|
|
120
120
|
</TouchableOpacity>
|
|
121
121
|
|
|
122
|
-
<Text
|
|
122
|
+
<Text accessibilityLabel={'abcd'} type="H2">
|
|
123
123
|
{value !== undefined ? (
|
|
124
124
|
text_format.replace('{number}', value)
|
|
125
125
|
) : (
|
|
@@ -130,7 +130,7 @@ const NumberUpDownActionTemplate = ({
|
|
|
130
130
|
<TouchableOpacity
|
|
131
131
|
style={styles.upButton}
|
|
132
132
|
onPress={doActionUp}
|
|
133
|
-
|
|
133
|
+
accessibilityLabel={AccessibilityLabel.NUMBER_ACTION_UP}
|
|
134
134
|
>
|
|
135
135
|
<IconOutline name="up" size={32} color={Colors.Primary} />
|
|
136
136
|
</TouchableOpacity>
|
|
@@ -14,10 +14,13 @@ const ButtonWrapper = memo(
|
|
|
14
14
|
isButtonReLockTiming,
|
|
15
15
|
toggleSwitch,
|
|
16
16
|
isEnabled,
|
|
17
|
-
|
|
17
|
+
accessibilityLabel,
|
|
18
18
|
}) => {
|
|
19
19
|
return (
|
|
20
|
-
<View
|
|
20
|
+
<View
|
|
21
|
+
style={styles.buttonWrapper}
|
|
22
|
+
accessibilityLabel={accessibilityLabel}
|
|
23
|
+
>
|
|
21
24
|
{isButtonReLockTiming ? (
|
|
22
25
|
<View style={styles.wrapHeadline}>
|
|
23
26
|
<SvgBrightnessBlack />
|
|
@@ -4,7 +4,7 @@ import { Switch } from 'react-native';
|
|
|
4
4
|
|
|
5
5
|
import AutoLock from '../index';
|
|
6
6
|
import { mockSCStore } from '../../../../../context/mockStore';
|
|
7
|
-
import {
|
|
7
|
+
import { AccessibilityLabel } from '../../../../../configs/Constants';
|
|
8
8
|
import { SCProvider } from '../../../../../context';
|
|
9
9
|
|
|
10
10
|
const wrapComponent = () => (
|
|
@@ -18,13 +18,19 @@ describe('Test AutoLock', () => {
|
|
|
18
18
|
|
|
19
19
|
const getElement = (instance) => {
|
|
20
20
|
const buttonEnable = instance.findAll(
|
|
21
|
-
(item) =>
|
|
21
|
+
(item) =>
|
|
22
|
+
item.props.accessibilityLabel ===
|
|
23
|
+
AccessibilityLabel.AUTO_LOCK_BUTTON_ENABLE
|
|
22
24
|
);
|
|
23
25
|
const buttonInstant = instance.findAll(
|
|
24
|
-
(item) =>
|
|
26
|
+
(item) =>
|
|
27
|
+
item.props.accessibilityLabel ===
|
|
28
|
+
AccessibilityLabel.AUTO_LOCK_BUTTON_INSTANT
|
|
25
29
|
);
|
|
26
30
|
const buttonRelockTiming = instance.findAll(
|
|
27
|
-
(item) =>
|
|
31
|
+
(item) =>
|
|
32
|
+
item.props.accessibilityLabel ===
|
|
33
|
+
AccessibilityLabel.AUTO_LOCK_BUTTON_RELOCK_TIMING
|
|
28
34
|
);
|
|
29
35
|
return {
|
|
30
36
|
buttonEnable,
|
|
@@ -4,7 +4,7 @@ import Slider from 'react-native-slider';
|
|
|
4
4
|
import Text from '../../../Text';
|
|
5
5
|
import { HeaderCustom } from '../../../Header';
|
|
6
6
|
import ButtonWrapper from './ButtonWrapper';
|
|
7
|
-
import {
|
|
7
|
+
import { AccessibilityLabel } from '../../../../configs/Constants';
|
|
8
8
|
import styles from './AutoLockStyles';
|
|
9
9
|
import t from '../../../../hooks/Common/useTranslations';
|
|
10
10
|
import { Colors } from '../../../../configs';
|
|
@@ -25,16 +25,16 @@ const AutoLock = memo(() => {
|
|
|
25
25
|
isButtonEnable
|
|
26
26
|
toggleSwitch={handleToggleSwitch}
|
|
27
27
|
isEnabled={isEnabled}
|
|
28
|
-
|
|
28
|
+
accessibilityLabel={AccessibilityLabel.AUTO_LOCK_BUTTON_ENABLE}
|
|
29
29
|
/>
|
|
30
30
|
<ButtonWrapper
|
|
31
31
|
isButtonInstant
|
|
32
|
-
|
|
32
|
+
accessibilityLabel={AccessibilityLabel.AUTO_LOCK_BUTTON_INSTANT}
|
|
33
33
|
/>
|
|
34
34
|
<ButtonWrapper
|
|
35
35
|
isButtonReLockTiming
|
|
36
36
|
isEnabled={isEnabled}
|
|
37
|
-
|
|
37
|
+
accessibilityLabel={AccessibilityLabel.AUTO_LOCK_BUTTON_RELOCK_TIMING}
|
|
38
38
|
/>
|
|
39
39
|
<View style={styles.slider}>
|
|
40
40
|
<Slider
|
|
@@ -8,7 +8,7 @@ import ButtonUnLock from '../../../../assets/images/Device/button-unlock.svg';
|
|
|
8
8
|
import { useConfigGlobalState } from '../../../iot/states';
|
|
9
9
|
import { useUnwatchLGDeviceConfigControl } from '../../../hooks/IoT';
|
|
10
10
|
import { watchMultiConfigs } from '../../../iot/Monitor';
|
|
11
|
-
import { DEVICE_TYPE,
|
|
11
|
+
import { DEVICE_TYPE, AccessibilityLabel } from '../../../configs/Constants';
|
|
12
12
|
|
|
13
13
|
const OnOffSmartLock = memo(({ actionGroup = {}, doAction, sensor = {} }) => {
|
|
14
14
|
const t = useTranslations();
|
|
@@ -60,7 +60,7 @@ const OnOffSmartLock = memo(({ actionGroup = {}, doAction, sensor = {} }) => {
|
|
|
60
60
|
<View>
|
|
61
61
|
<TouchableOpacity
|
|
62
62
|
onPress={handleActionSmartLock}
|
|
63
|
-
|
|
63
|
+
accessibilityLabel={AccessibilityLabel.BUTTON_ON_OFF}
|
|
64
64
|
style={styles.wrapButtonSmartLock}
|
|
65
65
|
>
|
|
66
66
|
{isUnlock ? (
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { act, create } from 'react-test-renderer';
|
|
3
3
|
|
|
4
4
|
import { mockSCStore } from '../../../../../context/mockStore';
|
|
5
|
-
import {
|
|
5
|
+
import { AccessibilityLabel } from '../../../../../configs/Constants';
|
|
6
6
|
import { SCProvider } from '../../../../../context';
|
|
7
7
|
import PasscodeList from '../index';
|
|
8
8
|
import { TouchableOpacity } from 'react-native';
|
|
@@ -38,7 +38,7 @@ describe('Test SetupGeneratePasscode', () => {
|
|
|
38
38
|
const instance = tree.root;
|
|
39
39
|
const passcode_list = instance.findAll(
|
|
40
40
|
(item) =>
|
|
41
|
-
item.props.
|
|
41
|
+
item.props.accessibilityLabel === AccessibilityLabel.PASSCODE_LIST &&
|
|
42
42
|
item.type === TouchableOpacity
|
|
43
43
|
);
|
|
44
44
|
|
|
@@ -9,7 +9,7 @@ import t from '../../../../hooks/Common/useTranslations';
|
|
|
9
9
|
import { Colors } from '../../../../configs';
|
|
10
10
|
import Routes from '../../../../utils/Route';
|
|
11
11
|
import styles from './PasscodeListStyles';
|
|
12
|
-
import {
|
|
12
|
+
import { AccessibilityLabel } from '../../../../configs/Constants';
|
|
13
13
|
|
|
14
14
|
const PasscodeList = memo(() => {
|
|
15
15
|
const navigation = useNavigation();
|
|
@@ -51,7 +51,7 @@ const PasscodeList = memo(() => {
|
|
|
51
51
|
<TouchableOpacity
|
|
52
52
|
onPress={handleClickButton(item)}
|
|
53
53
|
style={styles.buttonWrapper}
|
|
54
|
-
|
|
54
|
+
accessibilityLabel={AccessibilityLabel.PASSCODE_LIST}
|
|
55
55
|
>
|
|
56
56
|
<View>
|
|
57
57
|
<Text style={styles.textCode}>{item.code}</Text>
|
|
@@ -8,7 +8,7 @@ import styles from './SetupGeneratePasscodeStyles';
|
|
|
8
8
|
|
|
9
9
|
const ButtonWrapper = memo(
|
|
10
10
|
({
|
|
11
|
-
|
|
11
|
+
accessibilityLabel,
|
|
12
12
|
textHeadline,
|
|
13
13
|
textMinutes,
|
|
14
14
|
value,
|
|
@@ -27,7 +27,7 @@ const ButtonWrapper = memo(
|
|
|
27
27
|
const boxNotSelect = { ...styles.boxSetTime, ...styles.boxSetTimeDuration };
|
|
28
28
|
return (
|
|
29
29
|
<View
|
|
30
|
-
|
|
30
|
+
accessibilityLabel={accessibilityLabel}
|
|
31
31
|
style={
|
|
32
32
|
!isButtonDuration
|
|
33
33
|
? styles.buttonWrapper
|
|
@@ -3,7 +3,7 @@ import { act, create } from 'react-test-renderer';
|
|
|
3
3
|
|
|
4
4
|
import SetupGeneratePasscode from '../index';
|
|
5
5
|
import { mockSCStore } from '../../../../../context/mockStore';
|
|
6
|
-
import {
|
|
6
|
+
import { AccessibilityLabel } from '../../../../../configs/Constants';
|
|
7
7
|
import { SCProvider } from '../../../../../context';
|
|
8
8
|
|
|
9
9
|
const mockNavigate = jest.fn();
|
|
@@ -32,13 +32,19 @@ describe('Test SetupGeneratePasscode', () => {
|
|
|
32
32
|
|
|
33
33
|
const getElement = (instance) => {
|
|
34
34
|
const changeName = instance.findAll(
|
|
35
|
-
(item) =>
|
|
35
|
+
(item) =>
|
|
36
|
+
item.props.accessibilityLabel ===
|
|
37
|
+
AccessibilityLabel.GENERATE_PASSCODE_CHOOSE_USER
|
|
36
38
|
);
|
|
37
39
|
const changeTime = instance.findAll(
|
|
38
|
-
(item) =>
|
|
40
|
+
(item) =>
|
|
41
|
+
item.props.accessibilityLabel ===
|
|
42
|
+
AccessibilityLabel.GENERATE_PASSCODE_SET_TIME
|
|
39
43
|
);
|
|
40
44
|
const changeDuration = instance.findAll(
|
|
41
|
-
(item) =>
|
|
45
|
+
(item) =>
|
|
46
|
+
item.props.accessibilityLabel ===
|
|
47
|
+
AccessibilityLabel.GENERATE_PASSCODE_SET_DURATION
|
|
42
48
|
);
|
|
43
49
|
|
|
44
50
|
return {
|
|
@@ -66,8 +72,8 @@ describe('Test SetupGeneratePasscode', () => {
|
|
|
66
72
|
|
|
67
73
|
const wheelDateTimePicker = instance.findAll(
|
|
68
74
|
(item) =>
|
|
69
|
-
item.props.
|
|
70
|
-
`${
|
|
75
|
+
item.props.accessibilityLabel ===
|
|
76
|
+
`${AccessibilityLabel.WHEEL_DATE_TIME_PICKER_BUTTON}${AccessibilityLabel.VIEW_BUTTON_BOTTOM_RIGHT_BUTTON}`
|
|
71
77
|
);
|
|
72
78
|
await wheelDateTimePicker[5].props.onClick();
|
|
73
79
|
await wheelDateTimePicker[11].props.onClick();
|
|
@@ -11,7 +11,7 @@ import TemporaryDetail from '../../../../screens/GuestInfo/components/TemporaryD
|
|
|
11
11
|
import AccessScheduleItem from '../../../../screens/GuestInfo/components/AccessScheduleItem';
|
|
12
12
|
import BottomButtonView from '../../../BottomButtonView';
|
|
13
13
|
import { ACCESS_SCHEDULE } from '../../../../screens/GuestInfo/constant';
|
|
14
|
-
import {
|
|
14
|
+
import { AccessibilityLabel } from '../../../../configs/Constants';
|
|
15
15
|
import ButtonWrapper from './ButtonWrapper';
|
|
16
16
|
import moment from 'moment';
|
|
17
17
|
import styles from './SetupGeneratePasscodeStyles';
|
|
@@ -187,14 +187,16 @@ const SetupGeneratePasscode = memo(() => {
|
|
|
187
187
|
textHeadline={t('choose_user')}
|
|
188
188
|
value={'Name'}
|
|
189
189
|
isButtonChooseUser
|
|
190
|
-
|
|
190
|
+
accessibilityLabel={
|
|
191
|
+
AccessibilityLabel.GENERATE_PASSCODE_CHOOSE_USER
|
|
192
|
+
}
|
|
191
193
|
/>
|
|
192
194
|
<ButtonWrapper
|
|
193
195
|
textHeadline={t('set_time')}
|
|
194
196
|
valueTime={time.format('HH:mm')}
|
|
195
197
|
onPressSetTime={handleSetTime}
|
|
196
198
|
isButtonSetTime
|
|
197
|
-
|
|
199
|
+
accessibilityLabel={AccessibilityLabel.GENERATE_PASSCODE_SET_TIME}
|
|
198
200
|
/>
|
|
199
201
|
<ButtonWrapper
|
|
200
202
|
textHeadline={t('duration')}
|
|
@@ -204,7 +206,9 @@ const SetupGeneratePasscode = memo(() => {
|
|
|
204
206
|
onPressSelectCircle={handleSelectCircle}
|
|
205
207
|
isButtonDuration
|
|
206
208
|
isSelectCircle={isSelectCircle}
|
|
207
|
-
|
|
209
|
+
accessibilityLabel={
|
|
210
|
+
AccessibilityLabel.GENERATE_PASSCODE_SET_DURATION
|
|
211
|
+
}
|
|
208
212
|
/>
|
|
209
213
|
<View>
|
|
210
214
|
<Text style={styles.textHeadLine}>{t('access_schedule')}</Text>
|
|
@@ -5,7 +5,7 @@ import React, { memo } from 'react';
|
|
|
5
5
|
import { TouchableOpacity, View } from 'react-native';
|
|
6
6
|
import { Colors } from '../../../configs';
|
|
7
7
|
import styles from './OnOffButtonTemplateStyle';
|
|
8
|
-
import {
|
|
8
|
+
import { AccessibilityLabel } from '../../../configs/Constants';
|
|
9
9
|
|
|
10
10
|
const OnOffButtonTemplate = memo(
|
|
11
11
|
({ isOn, triggerAction, actionGroup = {}, isLight = false }) => {
|
|
@@ -18,8 +18,7 @@ const OnOffButtonTemplate = memo(
|
|
|
18
18
|
<TouchableOpacity
|
|
19
19
|
style={styles.bigCircle}
|
|
20
20
|
onPress={triggerAction}
|
|
21
|
-
|
|
22
|
-
accessibilityLabel={`${TESTID.ON_OFF_BUTTON}-${id}`}
|
|
21
|
+
accessibilityLabel={`${AccessibilityLabel.ON_OFF_BUTTON}-${id}`}
|
|
23
22
|
>
|
|
24
23
|
<View style={styles.smallCircle}>
|
|
25
24
|
<Icon
|
|
@@ -32,8 +31,7 @@ const OnOffButtonTemplate = memo(
|
|
|
32
31
|
styles.textBig,
|
|
33
32
|
{ color: isOn ? Colors.Gray8 : Colors.Gray6 },
|
|
34
33
|
]}
|
|
35
|
-
|
|
36
|
-
accessibilityLabel={`${TESTID.SENSOR_STATUS}-${id}`}
|
|
34
|
+
accessibilityLabel={`${AccessibilityLabel.SENSOR_STATUS}-${id}`}
|
|
37
35
|
>
|
|
38
36
|
{isOn ? text_on : text_off}
|
|
39
37
|
</Text>
|
|
@@ -41,7 +39,7 @@ const OnOffButtonTemplate = memo(
|
|
|
41
39
|
</TouchableOpacity>
|
|
42
40
|
</View>
|
|
43
41
|
{!!actionGroup.title && !isLight && (
|
|
44
|
-
<Text
|
|
42
|
+
<Text type="H3" semibold center>
|
|
45
43
|
{actionGroup.title}
|
|
46
44
|
</Text>
|
|
47
45
|
)}
|
|
@@ -10,7 +10,7 @@ import { useConfigGlobalState } from '../../iot/states';
|
|
|
10
10
|
import { useUnwatchLGDeviceConfigControl } from '../../hooks/IoT';
|
|
11
11
|
import styles from './OptionsDropdownActionTemplateStyle';
|
|
12
12
|
import { watchMultiConfigs } from '../../iot/Monitor';
|
|
13
|
-
import { DEVICE_TYPE,
|
|
13
|
+
import { DEVICE_TYPE, AccessibilityLabel } from '../../configs/Constants';
|
|
14
14
|
import IconComponent from '../../commons/IconComponent';
|
|
15
15
|
import { useTranslations } from '../../hooks/Common/useTranslations';
|
|
16
16
|
import SvgDoorState from '../../../assets/images/Device/door-state.svg';
|
|
@@ -138,7 +138,9 @@ const OptionsDropdownActionTemplate = ({
|
|
|
138
138
|
</View>
|
|
139
139
|
<TouchableOpacity style={styles.iconAndTextOption} onPress={onShowAlert}>
|
|
140
140
|
<Text
|
|
141
|
-
|
|
141
|
+
accessibilityLabel={
|
|
142
|
+
AccessibilityLabel.OPTIONS_DROPDOWN_ACTION_DISPLAY_SELECTED
|
|
143
|
+
}
|
|
142
144
|
color={
|
|
143
145
|
displaySelected === t('not_available') ? Colors.Gray6 : Colors.Gray8
|
|
144
146
|
}
|
|
@@ -167,7 +169,9 @@ const OptionsDropdownActionTemplate = ({
|
|
|
167
169
|
<Text
|
|
168
170
|
color={Colors.Gray6}
|
|
169
171
|
style={styles.writeNotAvailable}
|
|
170
|
-
|
|
172
|
+
accessibilityLabel={
|
|
173
|
+
AccessibilityLabel.OPTIONS_DROPDOWN_ACTION_WRITE_NOT_AVAILABLE
|
|
174
|
+
}
|
|
171
175
|
>
|
|
172
176
|
{t('write_not_available')}
|
|
173
177
|
</Text>
|
|
@@ -176,7 +180,9 @@ const OptionsDropdownActionTemplate = ({
|
|
|
176
180
|
<View key={index} style={styles.rowContainer}>
|
|
177
181
|
<RadioCircle active={selectedIndex === index} />
|
|
178
182
|
<TouchableOpacity
|
|
179
|
-
|
|
183
|
+
accessibilityLabel={
|
|
184
|
+
AccessibilityLabel.OPTIONS_DROPDOWN_ACTION_CHOOSING_ITEM
|
|
185
|
+
}
|
|
180
186
|
style={styles.row}
|
|
181
187
|
onPress={() => {
|
|
182
188
|
setSelectedIndex(index);
|