@eohjsc/react-native-smart-city 0.3.30 → 0.3.33
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/Images/DevMode/close.png +0 -0
- package/src/Images/DevMode/close@2x.png +0 -0
- package/src/Images/DevMode/close@3x.png +0 -0
- package/src/Images/DevMode/plus.png +0 -0
- package/src/Images/DevMode/plus@2x.png +0 -0
- package/src/Images/DevMode/plus@3x.png +0 -0
- package/src/Images/DevMode/remove_circle.png +0 -0
- package/src/Images/DevMode/remove_circle@2x.png +0 -0
- package/src/Images/DevMode/remove_circle@3x.png +0 -0
- package/src/commons/Action/ItemQuickAction.js +20 -4
- package/src/commons/Action/__test__/ItemQuickAction.test.js +35 -11
- package/src/commons/ActionGroup/ColorPickerTemplate.js +36 -17
- package/src/commons/ActionGroup/CurtainButtonTemplate.js +6 -6
- package/src/commons/ActionGroup/NumberUpDownActionTemplate.js +23 -15
- 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 +38 -45
- package/src/commons/ActionGroup/OnOffSmartLock/OnOffSmartLockStyle.js +1 -0
- 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 +9 -10
- package/src/commons/ActionGroup/OnOffTemplate/index.js +30 -12
- package/src/commons/ActionGroup/OneBigButtonTemplate.js +5 -5
- package/src/commons/ActionGroup/OptionsDropdownActionTemplate.js +51 -28
- package/src/commons/ActionGroup/SliderRangeTemplate.js +2 -2
- 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 +21 -7
- package/src/commons/ActionGroup/ThreeButtonTemplate.js +50 -60
- package/src/commons/ActionGroup/TwoButtonTemplate/index.js +135 -133
- 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 +7 -5
- package/src/commons/ActionGroup/index.js +35 -10
- package/src/commons/ActionTemplate/OnOffButtonAction.js +14 -5
- package/src/commons/ActionTemplate/__test__/OnOffButtonAction.test.js +23 -2
- package/src/commons/ActionTemplate/__test__/index.test.js +2 -0
- package/src/commons/ActionTemplate/index.js +1 -0
- 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 +22 -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/DevMode/CardDevMode.js +42 -0
- package/src/commons/DevMode/EmptyComponent.js +18 -0
- package/src/commons/DevMode/Item.js +21 -0
- package/src/commons/DevMode/Styles/CardStyles.js +40 -0
- package/src/commons/DevMode/Styles/EmptyComponentStyles.js +15 -0
- package/src/commons/DevMode/Styles/ItemStyles.js +27 -0
- package/src/commons/DevMode/Styles/TextWithLabelStyles.js +36 -0
- package/src/commons/DevMode/TextWithLabel.js +30 -0
- package/src/commons/DevMode/index.js +5 -1
- package/src/commons/Device/ConnectedViewHeader.js +2 -2
- package/src/commons/Device/DeviceAlertStatus.js +3 -3
- package/src/commons/Device/DisconnectedView.js +2 -2
- package/src/commons/Device/Emergency/EmergencyButton.js +2 -2
- package/src/commons/Device/Emergency/EmergencyDetail.js +1 -1
- 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/PMSensor/PMSensorIndicatior.js +1 -1
- package/src/commons/Device/RainningSensor/CurrentRainSensor.js +1 -1
- package/src/commons/Device/SensorConnectedStatus.js +5 -2
- package/src/commons/Device/WindDirection/Compass/index.js +6 -3
- package/src/commons/Device/WindSpeed/Anemometer/index.js +1 -1
- 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/Header/HeaderCustom.js +8 -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 +5 -4
- package/src/commons/NavBar/index.js +2 -3
- package/src/commons/OneTapTemplate/NumberUpDownActionTemplate.js +12 -6
- 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 +6 -4
- 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/Tabbar/__test__/index.test.js +97 -0
- 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 +12 -14
- package/src/configs/AccessibilityLabel.js +611 -0
- package/src/configs/Colors.js +4 -0
- package/src/configs/Constants.js +1 -604
- package/src/configs/Images.js +3 -0
- package/src/context/actionType.ts +19 -3
- package/src/context/mockStore.ts +18 -3
- package/src/context/reducer.ts +66 -9
- package/src/hoc/__test__/withRemoteControl.test.js +24 -0
- package/src/hoc/withRemoteControl.js +1 -0
- package/src/hooks/Common/__test__/useAndroidTranslucentStatusBar.test.js +55 -0
- package/src/hooks/Common/index.js +2 -2
- package/src/hooks/Common/useDevicesStatus.js +19 -15
- 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/hooks/__test__/useInitDeepLink.test.js +28 -0
- package/src/hooks/useReceiveNotifications.js +2 -4
- 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 +28 -4
- 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 +16 -7
- 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 +27 -0
- 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/DetailHistoryChart.js +7 -5
- package/src/screens/Device/components/SensorConnectStatusViewHeader.js +6 -6
- package/src/screens/Device/components/SensorDisplayItem.js +51 -26
- package/src/screens/Device/detail.js +31 -23
- 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 +30 -13
- 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 +43 -38
- package/src/screens/ScriptDetail/index.js +26 -16
- 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 → DeviceItem.js} +16 -22
- package/src/screens/Sharing/Components/Styles/{SensorItemStyles.js → DeviceItemStyles.js} +0 -0
- package/src/screens/Sharing/Components/__test__/{SensorItem.test.js → DeviceItem.test.js} +10 -8
- package/src/screens/Sharing/Components/index.js +2 -2
- package/src/screens/Sharing/InfoMemberUnit.js +7 -6
- package/src/screens/Sharing/MemberList.js +4 -4
- package/src/screens/Sharing/SelectPermission.js +72 -72
- package/src/screens/Sharing/SelectUser.js +9 -5
- package/src/screens/Sharing/Styles/SelectPermissionStyles.js +2 -2
- package/src/screens/Sharing/__test__/InfoMemberUnit.test.js +3 -2
- package/src/screens/Sharing/__test__/SelectPermission.test.js +12 -12
- 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 +152 -0
- package/src/screens/Template/GatewayList.js +51 -0
- package/src/screens/Template/Information.js +41 -0
- package/src/screens/Template/Styles/EditTemplateStyle.js +109 -0
- package/src/screens/Template/Styles/GatewayStyles.js +46 -0
- package/src/screens/Template/Styles/InformationStyles.js +16 -0
- package/src/screens/Template/Styles/detailStyles.js +35 -0
- package/src/screens/Template/Styles/indexStyles.js +2 -33
- package/src/screens/Template/__test__/EditTemplate.test.js +89 -0
- package/src/screens/Template/__test__/GatewayList.test.js +26 -0
- package/src/screens/Template/__test__/Information.test.js +16 -0
- package/src/screens/Template/__test__/detail.test.js +68 -0
- package/src/screens/Template/__test__/index.test.js +26 -1
- package/src/screens/Template/detail.js +154 -0
- package/src/screens/Template/index.js +38 -32
- 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/SmartAccount.js +1 -1
- package/src/screens/Unit/SmartAccountItem.js +3 -3
- package/src/screens/Unit/Station/__test__/index.test.js +19 -3
- 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 +90 -55
- 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__/SmartAccount.test.js +42 -25
- 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 +20 -10
- package/src/utils/I18n/translations/vi.json +17 -9
- package/src/utils/Route/index.js +22 -10
- package/src/utils/Utils.js +6 -7
- 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
|
@@ -5,7 +5,7 @@ import { useNavigation } from '@react-navigation/native';
|
|
|
5
5
|
import MockAdapter from 'axios-mock-adapter';
|
|
6
6
|
|
|
7
7
|
import SharedUnit from '../SharedUnit';
|
|
8
|
-
import {
|
|
8
|
+
import { AccessibilityLabel } from '../../../configs/Constants';
|
|
9
9
|
import { API } from '../../../configs';
|
|
10
10
|
import Routes from '../../../utils/Route';
|
|
11
11
|
import { SCProvider } from '../../../context';
|
|
@@ -72,16 +72,22 @@ describe('Test SharedUnit', () => {
|
|
|
72
72
|
});
|
|
73
73
|
const instance = tree.root;
|
|
74
74
|
const touchSharedUnit = instance.find(
|
|
75
|
-
(el) =>
|
|
75
|
+
(el) =>
|
|
76
|
+
el.props.accessibilityLabel ===
|
|
77
|
+
AccessibilityLabel.TOUCH_SHARED_UNIT + '-69'
|
|
76
78
|
);
|
|
77
79
|
act(() => {
|
|
78
80
|
touchSharedUnit.props.onPress();
|
|
79
81
|
});
|
|
80
82
|
const iconRemovePinSharedUnit = instance.findAll(
|
|
81
|
-
(el) =>
|
|
83
|
+
(el) =>
|
|
84
|
+
el.props.accessibilityLabel ===
|
|
85
|
+
AccessibilityLabel.ICON_REMOVE_PIN_SHARED_UNIT + '-69'
|
|
82
86
|
);
|
|
83
87
|
const iconAddPinSharedUnit = instance.find(
|
|
84
|
-
(el) =>
|
|
88
|
+
(el) =>
|
|
89
|
+
el.props.accessibilityLabel ===
|
|
90
|
+
AccessibilityLabel.ICON_ADD_PIN_SHARED_UNIT + '-69'
|
|
85
91
|
);
|
|
86
92
|
mock.onPost(API.UNIT.PIN_UNIT(3)).reply(200);
|
|
87
93
|
act(() => {
|
|
@@ -92,7 +98,9 @@ describe('Test SharedUnit', () => {
|
|
|
92
98
|
iconAddPinSharedUnit.props.onPress();
|
|
93
99
|
});
|
|
94
100
|
const iconAddStarSharedUnit = instance.find(
|
|
95
|
-
(el) =>
|
|
101
|
+
(el) =>
|
|
102
|
+
el.props.accessibilityLabel ===
|
|
103
|
+
AccessibilityLabel.ICON_ADD_STAR_SHARED_UNIT + '-69'
|
|
96
104
|
);
|
|
97
105
|
mock.onPost(API.UNIT.STAR_UNIT(3)).reply(200);
|
|
98
106
|
act(() => {
|
|
@@ -121,7 +129,8 @@ describe('Test SharedUnit', () => {
|
|
|
121
129
|
});
|
|
122
130
|
const instance = tree.root;
|
|
123
131
|
const ownerName = instance.findAll(
|
|
124
|
-
(el) =>
|
|
132
|
+
(el) =>
|
|
133
|
+
el.props.accessibilityLabel === AccessibilityLabel.SHARED_UNIT_OWN_BY
|
|
125
134
|
);
|
|
126
135
|
|
|
127
136
|
expect(ownerName).toHaveLength(0);
|
|
@@ -136,10 +145,14 @@ describe('Test SharedUnit', () => {
|
|
|
136
145
|
const instance = tree.root;
|
|
137
146
|
|
|
138
147
|
const iconAddPinSharedUnit = instance.findAll(
|
|
139
|
-
(el) =>
|
|
148
|
+
(el) =>
|
|
149
|
+
el.props.accessibilityLabel ===
|
|
150
|
+
AccessibilityLabel.ICON_ADD_PIN_SHARED_UNIT + '-69'
|
|
140
151
|
);
|
|
141
152
|
const iconStarUnit = instance.findAll(
|
|
142
|
-
(el) =>
|
|
153
|
+
(el) =>
|
|
154
|
+
el.props.accessibilityLabel ===
|
|
155
|
+
AccessibilityLabel.ICON_ADD_STAR_SHARED_UNIT + '-69'
|
|
143
156
|
);
|
|
144
157
|
|
|
145
158
|
expect(iconAddPinSharedUnit).toHaveLength(0);
|
|
@@ -156,7 +169,9 @@ describe('Test SharedUnit', () => {
|
|
|
156
169
|
});
|
|
157
170
|
const instance = tree.root;
|
|
158
171
|
const iconRemovePinSharedUnit = instance.find(
|
|
159
|
-
(el) =>
|
|
172
|
+
(el) =>
|
|
173
|
+
el.props.accessibilityLabel ===
|
|
174
|
+
AccessibilityLabel.ICON_REMOVE_PIN_SHARED_UNIT + '-69'
|
|
160
175
|
);
|
|
161
176
|
mock.onPost(API.UNIT.UNPIN_UNIT(3)).reply(200);
|
|
162
177
|
act(() => {
|
|
@@ -167,7 +182,9 @@ describe('Test SharedUnit', () => {
|
|
|
167
182
|
iconRemovePinSharedUnit.props.onPress();
|
|
168
183
|
});
|
|
169
184
|
const iconRemoveStarSharedUnit = instance.find(
|
|
170
|
-
(el) =>
|
|
185
|
+
(el) =>
|
|
186
|
+
el.props.accessibilityLabel ===
|
|
187
|
+
AccessibilityLabel.ICON_REMOVE_STAR_SHARED_UNIT + '-69'
|
|
171
188
|
);
|
|
172
189
|
mock.onPost(API.UNIT.UNSTAR_UNIT(3)).reply(200);
|
|
173
190
|
act(() => {
|
|
@@ -178,7 +195,9 @@ describe('Test SharedUnit', () => {
|
|
|
178
195
|
iconRemoveStarSharedUnit.props.onPress();
|
|
179
196
|
});
|
|
180
197
|
const iconRemoveStar = instance.findAll(
|
|
181
|
-
(el) =>
|
|
198
|
+
(el) =>
|
|
199
|
+
el.props.accessibilityLabel ===
|
|
200
|
+
AccessibilityLabel.ICON_REMOVE_STAR_SHARED_UNIT + '-69'
|
|
182
201
|
);
|
|
183
202
|
expect(iconRemoveStar).toHaveLength(3);
|
|
184
203
|
});
|
|
@@ -4,7 +4,7 @@ import { act, create } from 'react-test-renderer';
|
|
|
4
4
|
import AirQuality from '../index';
|
|
5
5
|
import { Section } from '../../../index';
|
|
6
6
|
import Text from '../../../Text';
|
|
7
|
-
import {
|
|
7
|
+
import { AccessibilityLabel } from '../../../../configs/Constants';
|
|
8
8
|
import { SCProvider } from '../../../../context';
|
|
9
9
|
import { mockSCStore } from '../../../../context/mockStore';
|
|
10
10
|
|
|
@@ -79,7 +79,8 @@ describe('Test AirQuality', () => {
|
|
|
79
79
|
const instance = tree.root;
|
|
80
80
|
const buttons = instance.findAll(
|
|
81
81
|
(el) =>
|
|
82
|
-
el.props.
|
|
82
|
+
el.props.accessibilityLabel ===
|
|
83
|
+
AccessibilityLabel.AIR_QUALITY_OUTDOOR_VALUE_TOUCH &&
|
|
83
84
|
el.type === TouchableOpacity
|
|
84
85
|
);
|
|
85
86
|
expect(buttons).toHaveLength(3);
|
|
@@ -103,7 +104,8 @@ describe('Test AirQuality', () => {
|
|
|
103
104
|
const instance = tree.root;
|
|
104
105
|
const buttons = instance.findAll(
|
|
105
106
|
(el) =>
|
|
106
|
-
el.props.
|
|
107
|
+
el.props.accessibilityLabel ===
|
|
108
|
+
AccessibilityLabel.AIR_QUALITY_OUTDOOR_VALUE_TOUCH &&
|
|
107
109
|
el.type === TouchableOpacity
|
|
108
110
|
);
|
|
109
111
|
expect(buttons).toHaveLength(3);
|
|
@@ -127,8 +129,8 @@ describe('Test AirQuality', () => {
|
|
|
127
129
|
const instance = tree.root;
|
|
128
130
|
const text = instance.find(
|
|
129
131
|
(el) =>
|
|
130
|
-
el.props.
|
|
131
|
-
|
|
132
|
+
el.props.accessibilityLabel ===
|
|
133
|
+
AccessibilityLabel.AIR_QUALITY_OUTDOOR_ADVICE_TEXT && el.type === Text
|
|
132
134
|
);
|
|
133
135
|
expect(text.props.children).toEqual('Amazing Good Chop');
|
|
134
136
|
});
|
|
@@ -141,7 +143,8 @@ describe('Test AirQuality', () => {
|
|
|
141
143
|
const instance = tree.root;
|
|
142
144
|
const buttons = instance.findAll(
|
|
143
145
|
(el) =>
|
|
144
|
-
el.props.
|
|
146
|
+
el.props.accessibilityLabel ===
|
|
147
|
+
AccessibilityLabel.AIR_QUALITY_OUTDOOR_VALUE_TOUCH &&
|
|
145
148
|
el.type === TouchableOpacity
|
|
146
149
|
);
|
|
147
150
|
expect(buttons).toHaveLength(2);
|
|
@@ -155,7 +158,8 @@ describe('Test AirQuality', () => {
|
|
|
155
158
|
const instance = tree.root;
|
|
156
159
|
const buttons = instance.findAll(
|
|
157
160
|
(el) =>
|
|
158
|
-
el.props.
|
|
161
|
+
el.props.accessibilityLabel ===
|
|
162
|
+
AccessibilityLabel.AIR_QUALITY_OUTDOOR_VALUE_TOUCH &&
|
|
159
163
|
el.type === TouchableOpacity
|
|
160
164
|
);
|
|
161
165
|
expect(buttons).toHaveLength(2);
|
|
@@ -169,7 +173,8 @@ describe('Test AirQuality', () => {
|
|
|
169
173
|
const instance = tree.root;
|
|
170
174
|
const buttons = instance.findAll(
|
|
171
175
|
(el) =>
|
|
172
|
-
el.props.
|
|
176
|
+
el.props.accessibilityLabel ===
|
|
177
|
+
AccessibilityLabel.AIR_QUALITY_OUTDOOR_VALUE_TOUCH &&
|
|
173
178
|
el.type === TouchableOpacity
|
|
174
179
|
);
|
|
175
180
|
expect(buttons).toHaveLength(2);
|
|
@@ -9,7 +9,7 @@ import Text from '../../../commons/Text';
|
|
|
9
9
|
import ConfigHistoryChart from '../ConfigHistoryChart';
|
|
10
10
|
|
|
11
11
|
import SegmentedRoundDisplay from './SegmentedRoundDisplay';
|
|
12
|
-
import {
|
|
12
|
+
import { AccessibilityLabel } from '../../../configs/Constants';
|
|
13
13
|
import styles from './styles';
|
|
14
14
|
|
|
15
15
|
const AirQuality = memo(({ summaryDetail }) => {
|
|
@@ -106,7 +106,9 @@ const AirQuality = memo(({ summaryDetail }) => {
|
|
|
106
106
|
const borderWidth = active ? 0 : 1;
|
|
107
107
|
return (
|
|
108
108
|
<TouchableOpacity
|
|
109
|
-
|
|
109
|
+
accessibilityLabel={
|
|
110
|
+
AccessibilityLabel.AIR_QUALITY_OUTDOOR_VALUE_TOUCH
|
|
111
|
+
}
|
|
110
112
|
style={[
|
|
111
113
|
styles.touchOption,
|
|
112
114
|
{
|
|
@@ -149,7 +151,9 @@ const AirQuality = memo(({ summaryDetail }) => {
|
|
|
149
151
|
style={[styles.boxDot, { backgroundColor: outdoorColor }]}
|
|
150
152
|
/>
|
|
151
153
|
<Text
|
|
152
|
-
|
|
154
|
+
accessibilityLabel={
|
|
155
|
+
AccessibilityLabel.AIR_QUALITY_OUTDOOR_ADVICE_TEXT
|
|
156
|
+
}
|
|
153
157
|
color={Colors.Gray7}
|
|
154
158
|
type="Body"
|
|
155
159
|
>
|
|
@@ -2,7 +2,7 @@ import React, { memo } from 'react';
|
|
|
2
2
|
import { View, StyleSheet } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import { Colors } from '../../configs';
|
|
5
|
-
import {
|
|
5
|
+
import { AccessibilityLabel } from '../../configs/Constants';
|
|
6
6
|
import Text from '../Text';
|
|
7
7
|
|
|
8
8
|
const TotalPowerBox = memo(({ title, value, measure }) => {
|
|
@@ -13,7 +13,7 @@ const TotalPowerBox = memo(({ title, value, measure }) => {
|
|
|
13
13
|
color={Colors.Gray8}
|
|
14
14
|
size={14}
|
|
15
15
|
style={styles.txtTotal}
|
|
16
|
-
|
|
16
|
+
accessibilityLabel={AccessibilityLabel.TOTAL_POWER_BOX_TITLE}
|
|
17
17
|
>
|
|
18
18
|
{title}
|
|
19
19
|
</Text>
|
|
@@ -5,7 +5,7 @@ import { useTranslations } from '../../../hooks/Common/useTranslations';
|
|
|
5
5
|
import { Colors } from '../../../configs';
|
|
6
6
|
import TotalPowerBox from '../TotalPowerBox';
|
|
7
7
|
import Text from '../../Text';
|
|
8
|
-
import {
|
|
8
|
+
import { AccessibilityLabel } from '../../../configs/Constants';
|
|
9
9
|
|
|
10
10
|
const TotalPowerConsumption = memo(({ time, total }) => {
|
|
11
11
|
const t = useTranslations();
|
|
@@ -21,7 +21,7 @@ const TotalPowerConsumption = memo(({ time, total }) => {
|
|
|
21
21
|
title={t('text_total_power_consumption')}
|
|
22
22
|
value={total.value}
|
|
23
23
|
measure={total.measure}
|
|
24
|
-
|
|
24
|
+
accessibilityLabel={AccessibilityLabel.TOTAL_POWER_CONSUMPTION}
|
|
25
25
|
/>
|
|
26
26
|
</View>
|
|
27
27
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import TotalPowerBox from '../TotalPowerBox';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import renderer, { act } from 'react-test-renderer';
|
|
4
|
-
import {
|
|
4
|
+
import { AccessibilityLabel } from '../../../configs/Constants';
|
|
5
5
|
|
|
6
6
|
describe('Test Total Power Box', () => {
|
|
7
7
|
let tree;
|
|
@@ -12,7 +12,8 @@ describe('Test Total Power Box', () => {
|
|
|
12
12
|
});
|
|
13
13
|
const instance = tree.root;
|
|
14
14
|
const item = instance.find(
|
|
15
|
-
(el) =>
|
|
15
|
+
(el) =>
|
|
16
|
+
el.props.accessibilityLabel === AccessibilityLabel.TOTAL_POWER_BOX_TITLE
|
|
16
17
|
);
|
|
17
18
|
expect(item.props.children).toBe('titleTest');
|
|
18
19
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import TotalPowerConsumption from '../TotalPowerConsumption/index';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import renderer, { act } from 'react-test-renderer';
|
|
4
|
-
import {
|
|
4
|
+
import { AccessibilityLabel } from '../../../configs/Constants';
|
|
5
5
|
import { SCProvider } from '../../../context';
|
|
6
6
|
import { mockSCStore } from '../../../context/mockStore';
|
|
7
7
|
|
|
@@ -24,7 +24,9 @@ describe('Test Total Power Consumption', () => {
|
|
|
24
24
|
});
|
|
25
25
|
const instance = tree.root;
|
|
26
26
|
const item = instance.find(
|
|
27
|
-
(el) =>
|
|
27
|
+
(el) =>
|
|
28
|
+
el.props.accessibilityLabel ===
|
|
29
|
+
AccessibilityLabel.TOTAL_POWER_CONSUMPTION
|
|
28
30
|
);
|
|
29
31
|
expect(item.props.value).toBe(10);
|
|
30
32
|
});
|
|
@@ -3,7 +3,7 @@ import { StyleSheet, TouchableOpacity, View } from 'react-native';
|
|
|
3
3
|
|
|
4
4
|
import { Colors } from '../../configs';
|
|
5
5
|
import Text from '../../commons/Text';
|
|
6
|
-
import {
|
|
6
|
+
import { AccessibilityLabel } from '../../configs/Constants';
|
|
7
7
|
|
|
8
8
|
// this view support either 1 or 2 button
|
|
9
9
|
const ViewButtonBottom = ({
|
|
@@ -18,7 +18,7 @@ const ViewButtonBottom = ({
|
|
|
18
18
|
styleButtonRightText,
|
|
19
19
|
styleButtonLeft,
|
|
20
20
|
styleButtonRight,
|
|
21
|
-
|
|
21
|
+
accessibilityLabelPrefix = '',
|
|
22
22
|
}) => {
|
|
23
23
|
const useTwoButton = leftTitle && rightTitle;
|
|
24
24
|
|
|
@@ -34,7 +34,7 @@ const ViewButtonBottom = ({
|
|
|
34
34
|
]}
|
|
35
35
|
onPress={onLeftClick}
|
|
36
36
|
disabled={leftDisabled}
|
|
37
|
-
|
|
37
|
+
accessibilityLabel={`${accessibilityLabelPrefix}${AccessibilityLabel.VIEW_BUTTON_BOTTOM_LEFT_BUTTON}`}
|
|
38
38
|
>
|
|
39
39
|
<Text
|
|
40
40
|
semibold
|
|
@@ -56,7 +56,7 @@ const ViewButtonBottom = ({
|
|
|
56
56
|
]}
|
|
57
57
|
onPress={onRightClick}
|
|
58
58
|
disabled={rightDisabled}
|
|
59
|
-
|
|
59
|
+
accessibilityLabel={`${accessibilityLabelPrefix}${AccessibilityLabel.VIEW_BUTTON_BOTTOM_RIGHT_BUTTON}`}
|
|
60
60
|
>
|
|
61
61
|
<Text
|
|
62
62
|
semibold
|
|
@@ -10,7 +10,7 @@ import ViewButtonBottom from '../ViewButtonBottom';
|
|
|
10
10
|
|
|
11
11
|
import { getDateData } from '../../utils/Converter/time';
|
|
12
12
|
import styles from './styles';
|
|
13
|
-
import {
|
|
13
|
+
import { AccessibilityLabel } from '../../configs/Constants';
|
|
14
14
|
|
|
15
15
|
const formatNumber = (number) => {
|
|
16
16
|
return {
|
|
@@ -104,7 +104,7 @@ const WheelDateTimePicker = ({
|
|
|
104
104
|
|
|
105
105
|
return (
|
|
106
106
|
<BottomSheet
|
|
107
|
-
|
|
107
|
+
accessibilityLabel={AccessibilityLabel.WHEEL_DATE_TIME_PICKER}
|
|
108
108
|
isVisible={isVisible}
|
|
109
109
|
onBackdropPress={onPickerCancel}
|
|
110
110
|
onHide={onHide}
|
|
@@ -174,7 +174,9 @@ const WheelDateTimePicker = ({
|
|
|
174
174
|
onLeftClick={onPickerCancel}
|
|
175
175
|
rightTitle={t('done')}
|
|
176
176
|
onRightClick={onDone}
|
|
177
|
-
|
|
177
|
+
accessibilityLabelPrefix={
|
|
178
|
+
AccessibilityLabel.WHEEL_DATE_TIME_PICKER_BUTTON
|
|
179
|
+
}
|
|
178
180
|
/>
|
|
179
181
|
</BottomSheet>
|
|
180
182
|
);
|
|
@@ -6,6 +6,7 @@ import LinearGradient from 'react-native-linear-gradient';
|
|
|
6
6
|
import { Colors, Device, Images } from '../../configs';
|
|
7
7
|
import Text from '../Text';
|
|
8
8
|
import HeaderUnit from '../Unit/HeaderUnit';
|
|
9
|
+
import { AccessibilityLabel } from '../../configs/Constants';
|
|
9
10
|
|
|
10
11
|
const stickyHeaderHeight =
|
|
11
12
|
Device.TopbarHeight + (Device.isIOS ? 0 : StatusBar.currentHeight);
|
|
@@ -22,7 +23,7 @@ const WrapParallaxScrollView = ({
|
|
|
22
23
|
hideRightPlus,
|
|
23
24
|
contentBackground,
|
|
24
25
|
accessibilityLabel,
|
|
25
|
-
idButtonMore,
|
|
26
|
+
idButtonMore = AccessibilityLabel.HEADER_UNIT_BUTTON_MORE,
|
|
26
27
|
}) => {
|
|
27
28
|
const renderForeground = useCallback(
|
|
28
29
|
() => (
|
package/src/configs/API.js
CHANGED
|
@@ -18,13 +18,10 @@ const API = {
|
|
|
18
18
|
UNPIN_UNIT: (id) => `/property_manager/units/${id}/unpin/`,
|
|
19
19
|
MANAGE_UNIT: (id) => `/property_manager/units/${id}/`,
|
|
20
20
|
CHIP_SCAN: (id) => `/property_manager/units/${id}/chip_scan/`,
|
|
21
|
-
CHIP_SCAN_GET_WIFI_INFO: () =>
|
|
22
|
-
'/property_manager/units/chip_scan_get_wifi_info/',
|
|
23
21
|
MANAGE_ACCESS: (id) => `/property_manager/manage_access/${id}/`,
|
|
24
22
|
AUTOMATE: (id) => `/property_manager/units/${id}/automate/`,
|
|
25
23
|
DEVICE_CONTROL: (id) => `/property_manager/units/${id}/device_control/`,
|
|
26
24
|
DEVICE_SENSOR: (id) => `/property_manager/units/${id}/device_sensor/`,
|
|
27
|
-
ADD_GATEWAY: (id) => `/property_manager/units/${id}/add_gateway/`,
|
|
28
25
|
SENSORS_STATUS: (id) => `/property_manager/units/${id}/sensors_status/`,
|
|
29
26
|
CHANGE_OWNER: (id) => `/property_manager/units/${id}/change_owner/`,
|
|
30
27
|
FAVOURITE_DEVICES: (id) =>
|
|
@@ -44,15 +41,12 @@ const API = {
|
|
|
44
41
|
CREATE_SUB_UNIT: (unitId) => `/property_manager/${unitId}/sub_units/`,
|
|
45
42
|
MANAGE_SUB_UNIT: (unitId, id) =>
|
|
46
43
|
`/property_manager/${unitId}/sub_units/${id}/`,
|
|
47
|
-
SENSOR_SCAN: (id) => `/property_manager/stations/${id}/sensor_scan/`,
|
|
48
44
|
},
|
|
49
45
|
CHIP: {
|
|
50
|
-
CHECK_FINALIZED: () => '/property_manager/stations/check_chip_finalized/',
|
|
51
46
|
GET_CHIPS_FROM_UNIT: (id) => `/property_manager/get_chips/?unit_id=${id}`,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
SENSOR_DETAIL: (id) => `/chip_manager/sensors/${id}/`,
|
|
47
|
+
SEARCH_DEVICE: (id) => `/chip_manager/chips/${id}/search_device/`,
|
|
48
|
+
SCAN_SENSOR: (id) => `/chip_manager/chips/${id}/scan_sensor/`,
|
|
49
|
+
RENAME_DEVICES: (id) => `/chip_manager/chips/${id}/rename_devices/`,
|
|
56
50
|
},
|
|
57
51
|
DEVICE: {
|
|
58
52
|
SENSOR_DETAIL: (id) => `/property_manager/sensors/${id}/`,
|
|
@@ -109,8 +103,9 @@ const API = {
|
|
|
109
103
|
ACTIVITY_LOG: (id) => `/property_manager/automate/${id}/logs/`,
|
|
110
104
|
STARRED_SCRIPTS: () => '/property_manager/automate/starred_scripts/',
|
|
111
105
|
},
|
|
112
|
-
|
|
113
|
-
CHECK_SEND_EMAIL: () =>
|
|
106
|
+
HOME_ASSISTANT: {
|
|
107
|
+
CHECK_SEND_EMAIL: () =>
|
|
108
|
+
'/connection_manager/home_assistant/check_send_email/',
|
|
114
109
|
},
|
|
115
110
|
VALUE_CONSUME: {
|
|
116
111
|
DISPLAY_HISTORY: () => '/property_manager/value_consume/display_history/',
|
|
@@ -128,9 +123,6 @@ const API = {
|
|
|
128
123
|
`/property_manager/sharing/units/${unit_id}/member/${member_id}/shared_devices/`,
|
|
129
124
|
SHARE: () => '/property_manager/sharing/share/',
|
|
130
125
|
},
|
|
131
|
-
EMERGENCY: {
|
|
132
|
-
CONTACTS: () => '/emergency_button/contacts/',
|
|
133
|
-
},
|
|
134
126
|
EMERGENCY_BUTTON: {
|
|
135
127
|
CREATE_CONTACT: () => '/emergency_button/contacts/',
|
|
136
128
|
CREATE_BATCH: () => '/emergency_button/contacts/create_batch/',
|
|
@@ -200,6 +192,12 @@ const API = {
|
|
|
200
192
|
PUSHER: {
|
|
201
193
|
AUTH: () => '/smart_parking/pusher/auth/',
|
|
202
194
|
},
|
|
195
|
+
// NOTE: DEV MODE
|
|
196
|
+
DEV_MODE: {
|
|
197
|
+
GET_TEMPLATES: '/property_manager/iot_dashboard/dev_mode/templates/',
|
|
198
|
+
GET_WIDGETS: (templateId) =>
|
|
199
|
+
`/property_manager/iot_dashboard/dev_mode/templates/${templateId}/list_widgets/`,
|
|
200
|
+
},
|
|
203
201
|
};
|
|
204
202
|
|
|
205
203
|
export default API;
|