@eohjsc/react-native-smart-city 0.3.10 → 0.3.13
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/index.js +2 -0
- package/package.json +1 -1
- package/src/commons/Action/ItemQuickAction.js +1 -1
- package/src/commons/ActionGroup/NumberUpDownActionTemplate.js +2 -0
- package/src/commons/ActionGroup/__test__/NumberUpDownTemplate.test.js +1 -1
- package/src/commons/ActionGroup/__test__/index.test.js +1 -1
- package/src/commons/Device/HistoryChart.js +2 -2
- package/src/commons/Device/ItemDevice.js +2 -2
- package/src/commons/OneTapTemplate/NumberUpDownActionTemplate.js +5 -1
- package/src/commons/SubUnit/Favorites/index.js +6 -2
- package/src/configs/API.js +4 -0
- package/src/configs/SCConfig.js +1 -1
- package/src/context/actionType.ts +5 -2
- package/src/context/mockStore.ts +17 -3
- package/src/context/reducer.ts +38 -4
- package/src/hooks/IoT/__test__/useValueEvaluation.test.js +58 -0
- package/src/hooks/IoT/index.js +2 -1
- package/src/hooks/IoT/useValueEvaluation.js +45 -0
- package/src/hooks/useReceiveNotifications.js +12 -18
- package/src/navigations/UnitStack.js +8 -0
- package/src/screens/AddNewAction/SelectAction.js +3 -2
- package/src/screens/AddNewAction/SetupSensor.js +3 -2
- package/src/screens/Device/detail.js +18 -27
- package/src/screens/Device/hooks/useEvaluateValue.js +97 -0
- package/src/screens/Device/hooks/useFavoriteDevice.js +2 -2
- package/src/screens/ScriptDetail/index.js +13 -3
- package/src/screens/Unit/Detail.js +10 -5
- package/src/screens/Unit/SelectAddress.js +1 -3
- package/src/screens/Unit/SelectDevices.js +158 -0
- package/src/screens/Unit/SelectDevicesStyles.js +40 -0
- package/src/screens/Unit/Summaries.js +1 -1
- package/src/screens/Unit/__test__/SelectAddress.test.js +90 -1
- package/src/screens/Unit/__test__/SelectDevices.test.js +110 -0
- package/src/screens/UnitSummary/components/RunningDevices/index.js +3 -1
- package/src/utils/Apis/axios.js +6 -0
- package/src/utils/I18n/translations/en.json +2 -0
- package/src/utils/I18n/translations/vi.json +2 -0
- package/src/utils/Route/index.js +1 -0
- package/src/utils/Validation.js +3 -0
|
@@ -995,5 +995,7 @@
|
|
|
995
995
|
"detected": "Detected",
|
|
996
996
|
"not_detected": "Not detected",
|
|
997
997
|
"activated": "Activated",
|
|
998
|
+
"text_unit_add_to_favorites_no_devices": "You don't have any devices or all your devices was added to your favorites",
|
|
999
|
+
"not_found": "Not found",
|
|
998
1000
|
"not_activated": "Not activated"
|
|
999
1001
|
}
|
|
@@ -996,5 +996,7 @@
|
|
|
996
996
|
"detected": "Phát hiện",
|
|
997
997
|
"not_detected": "Không phát hiện",
|
|
998
998
|
"activated": "Được kích hoạt",
|
|
999
|
+
"text_unit_add_to_favorites_no_devices": "Bạn không có thiết bị nào hoặc tất cả thiết bị của bạn đã được thêm vào yêu thích",
|
|
1000
|
+
"not_found": "Không tìm thấy",
|
|
999
1001
|
"not_activated": "Không kích hoạt"
|
|
1000
1002
|
}
|
package/src/utils/Route/index.js
CHANGED
package/src/utils/Validation.js
CHANGED
|
@@ -7,3 +7,6 @@ export const isValidPhoneNumber = (phoneNumber) => {
|
|
|
7
7
|
export const isValidEmailAddress = (emailAddress) => {
|
|
8
8
|
return /^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$/.test(emailAddress);
|
|
9
9
|
};
|
|
10
|
+
|
|
11
|
+
export const isHTML = (string) =>
|
|
12
|
+
/<[a-z]+\d?(\s+[\w-]+=("[^"]*"|'[^']*'))*\s*\/?>|&#?\w+;/i.test(string);
|