@eohjsc/react-native-smart-city 0.3.62 → 0.3.64

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.
Files changed (78) hide show
  1. package/package.json +1 -1
  2. package/src/commons/Dashboard/MyPinnedSharedUnit/index.js +10 -0
  3. package/src/commons/Dashboard/MyUnit/index.js +9 -3
  4. package/src/commons/Device/HorizontalBarChart.js +3 -3
  5. package/src/commons/Device/WindSpeed/Anemometer/index.js +10 -26
  6. package/src/commons/FourButtonFilterHistory/index.js +1 -1
  7. package/src/configs/API.js +14 -0
  8. package/src/configs/Constants.js +1 -0
  9. package/src/context/actionType.ts +1 -0
  10. package/src/context/reducer.ts +10 -0
  11. package/src/navigations/AllGatewayStack.js +19 -9
  12. package/src/navigations/UnitStack.js +1 -1
  13. package/src/screens/AllGateway/DetailConfigActionInternal/__test__/index.test.js +104 -0
  14. package/src/screens/AllGateway/DetailConfigActionInternal/index.js +97 -0
  15. package/src/screens/{Gateway/DetailConfigActionModbus → AllGateway/DetailConfigActionInternal}/styles.js +0 -0
  16. package/src/screens/{Gateway → AllGateway}/DetailConfigActionModbus/__test__/index.test.js +0 -0
  17. package/src/screens/{Gateway → AllGateway}/DetailConfigActionModbus/index.js +0 -0
  18. package/src/screens/{Gateway/DeviceGatewayInfo → AllGateway/DetailConfigActionModbus}/styles.js +0 -0
  19. package/src/screens/{Gateway → AllGateway}/DetailConfigActionZigbee/__test__/index.test.js +0 -0
  20. package/src/screens/{Gateway → AllGateway}/DetailConfigActionZigbee/index.js +0 -0
  21. package/src/screens/{Gateway → AllGateway}/DetailConfigActionZigbee/styles.js +0 -0
  22. package/src/screens/{Gateway → AllGateway}/DeviceGatewayInfo/__test__/index.test.js +0 -0
  23. package/src/screens/{Gateway → AllGateway}/DeviceGatewayInfo/index.js +26 -2
  24. package/src/screens/{Gateway/GatewayInfo → AllGateway/DeviceGatewayInfo}/styles.js +0 -0
  25. package/src/screens/AllGateway/DeviceInternalDetail/__test__/index.test.js +387 -0
  26. package/src/screens/AllGateway/DeviceInternalDetail/index.js +188 -0
  27. package/src/screens/{Gateway/DeviceModbusDetail → AllGateway/DeviceInternalDetail}/styles.js +0 -0
  28. package/src/screens/{Gateway → AllGateway}/DeviceModbusDetail/__test__/index.test.js +0 -0
  29. package/src/screens/{Gateway → AllGateway}/DeviceModbusDetail/index.js +9 -17
  30. package/src/screens/{Gateway/DeviceZigbeeDetail → AllGateway/DeviceModbusDetail}/styles.js +0 -0
  31. package/src/screens/{Gateway → AllGateway}/DeviceZigbeeDetail/__test__/index.test.js +0 -0
  32. package/src/screens/{Gateway → AllGateway}/DeviceZigbeeDetail/index.js +9 -17
  33. package/src/screens/{Gateway/GatewayDetail → AllGateway/DeviceZigbeeDetail}/styles.js +0 -0
  34. package/src/screens/{Gateway → AllGateway}/GatewayConnectionMethods/__test__/index.test.js +0 -0
  35. package/src/screens/{Gateway → AllGateway}/GatewayConnectionMethods/index.js +0 -0
  36. package/src/screens/{Gateway → AllGateway}/GatewayConnectionMethods/styles.js +0 -0
  37. package/src/screens/{Gateway → AllGateway}/GatewayDetail/__test__/index.test.js +71 -31
  38. package/src/screens/{Gateway → AllGateway}/GatewayDetail/index.js +62 -42
  39. package/src/screens/AllGateway/GatewayDetail/styles.js +12 -0
  40. package/src/screens/{Gateway → AllGateway}/GatewayInfo/__test__/index.test.js +0 -0
  41. package/src/screens/{Gateway → AllGateway}/GatewayInfo/index.js +14 -17
  42. package/src/screens/AllGateway/GatewayInfo/styles.js +12 -0
  43. package/src/screens/{Gateway → AllGateway}/__test__/index.test.js +0 -0
  44. package/src/screens/{Gateway → AllGateway}/components/Detail/__test__/index.test.js +0 -0
  45. package/src/screens/{Gateway → AllGateway}/components/Detail/index.js +0 -0
  46. package/src/screens/{Gateway → AllGateway}/components/Detail/styles.js +0 -0
  47. package/src/screens/{Gateway → AllGateway}/components/DetailActionModbus/__test__/index.test.js +0 -0
  48. package/src/screens/{Gateway → AllGateway}/components/DetailActionModbus/index.js +0 -0
  49. package/src/screens/{Gateway → AllGateway}/components/DetailActionModbus/styles.js +0 -0
  50. package/src/screens/{Gateway → AllGateway}/components/DetailConfigAction/__test__/index.test.js +0 -0
  51. package/src/screens/{Gateway → AllGateway}/components/DetailConfigAction/index.js +0 -0
  52. package/src/screens/{Gateway → AllGateway}/components/DetailConfigAction/styles.js +0 -0
  53. package/src/screens/{Gateway → AllGateway}/components/GatewayItem/__test__/index.test.js +0 -0
  54. package/src/screens/{Gateway → AllGateway}/components/GatewayItem/index.js +0 -0
  55. package/src/screens/{Gateway → AllGateway}/components/GatewayItem/styles.js +0 -0
  56. package/src/screens/{Gateway → AllGateway}/components/Information/__test__/index.test.js +0 -0
  57. package/src/screens/{Gateway → AllGateway}/components/Information/index.js +0 -0
  58. package/src/screens/{Gateway → AllGateway}/components/Information/styles.js +0 -0
  59. package/src/screens/{Gateway → AllGateway}/components/RowItem/__test__/index.test.js +0 -0
  60. package/src/screens/{Gateway → AllGateway}/components/RowItem/index.js +0 -0
  61. package/src/screens/{Gateway → AllGateway}/components/RowItem/styles.js +0 -0
  62. package/src/screens/{Gateway → AllGateway}/components/TabPaneCT/__test__/index.test.js +0 -0
  63. package/src/screens/{Gateway → AllGateway}/components/TabPaneCT/index.js +0 -0
  64. package/src/screens/{Gateway → AllGateway}/components/TabPaneCT/styles.js +0 -0
  65. package/src/screens/{Gateway → AllGateway}/hooks/__test__/index.test.js +15 -2
  66. package/src/screens/{Gateway → AllGateway}/hooks/useGateway.js +91 -11
  67. package/src/screens/{Gateway → AllGateway}/index.js +2 -2
  68. package/src/screens/{Gateway → AllGateway}/styles.js +0 -0
  69. package/src/screens/{Gateway → AllGateway}/utils/index.js +0 -0
  70. package/src/screens/Device/__test__/DetailHistoryChart.test.js +25 -10
  71. package/src/screens/Device/components/DetailHistoryChart.js +72 -22
  72. package/src/screens/WaterQualityGuide/__test__/index.test.js +8 -8
  73. package/src/screens/WaterQualityGuide/index.js +32 -53
  74. package/src/utils/Functions/preloadImages.js +39 -0
  75. package/src/utils/I18n/translations/en.json +21 -16
  76. package/src/utils/I18n/translations/vi.json +21 -19
  77. package/src/utils/Route/index.js +2 -0
  78. package/src/utils/Storage.js +6 -0
@@ -224,7 +224,8 @@
224
224
  "what_is_clo": "Clo dư là gì?",
225
225
  "text_what_clo": "Clo dư là lượng clo ở mức thấp vẫn còn trong nước sau một thời gian nhất định hoặc tiếp xúc thời gian sau khi ứng dụng ban đầu của nó. Nó tạo nên một lớp bảo vệ chống lại nguy cơ vi sinh vật tiếp theo gây ô nhiễm sau khi xử lý - một lợi ích độc đáo cho sức khỏe cộng đồng.\nThử nghiệm clo dư là một trong những thử nghiệm phổ biến nhất được các nhà máy xử lý nước sử dụng. Qua thử nghiệm clo dư, lượng clo còn lại được xác định trong nước đã kết thúc thử nghiệm và sẵn sàng đưa ra hệ thống phân phối.",
226
226
  "recommended_clo_level": "Mức độ Clo dư khuyến nghị",
227
- "text_recommended_clo": "Nồng độ clo dư trong nguồn nước cung cấp càng cao thì các hóa chất sẽ có thể bảo vệ hệ thống khỏi bị nhiễm bẩn lâu và tốt hơn. Tuy nhiên, hàm lượng clo cao sẽ làm cho nước có mùi và có mùi vị khó chịu cho mọi người khi uống nó.\nĐối với mục đích sử dụng bình thường trong gia đình, mức độ clo trong nước sinh hoạt ăn uống đạt ngưỡng từ 0,3 – 0,5 mg/L mới đảm bảo độ an toàn.",
227
+ "text_recommended_clo": "Đối với mục đích sử dụng bình thường trong sinh hoạt, mức độ Clo tại điểm người tiêu dùng lấy nước phải nằm trong khoảng",
228
+ "text_recommended_clo_range": "từ 0.2 đến 1 mg/l.",
228
229
  "text_low_level": "Thấp",
229
230
  "text_high_level": "Cao",
230
231
  "text_very_good_level": "Rất tốt",
@@ -232,29 +233,24 @@
232
233
  "text_moderate_level": "Trung bình",
233
234
  "text_poor_level": "Kém",
234
235
  "text_very_poor_level": "Rất kém",
235
- "text_clo_low_range": "< 0.2 mg/l",
236
- "text_clo_good_range": "0.2 - 0.5 mg/l",
237
- "text_clo_high_range": "> 0.5 mg/l",
236
+ "text_clo_very_good_range": "0.2 - 1mg/l",
237
+ "text_clo_poor_range": "< 0.2mg/l\n> 1mg/l",
238
238
  "turbidity_guide": "Độ đục",
239
239
  "what_is_turbidity": "Độ đục của nước là gì?",
240
240
  "text_what_is_turbidity": "Độ đục của nước là thước đo độ trong tương đối của nước. Độ đục là một đặc tính quang học của nước và là một biểu hiện của lượng ánh sáng được phân tán bởi vật liệu trong nước khi ánh sáng được chiếu xuyên qua mẫu nước. Cường độ ánh sáng càng cao thì độ đục càng cao. Độ đục có thể đến từ các hạt vật chất lơ lửng như bùn, đất sét, vật liêu vô cơ hoặc các chất hữu cơ như tảo, sinh vật phù du, vật liệu phân rã.",
241
- "turbidity_for_drinking": "Hướng dẫn về độ đục cho nước uống",
242
- "text_turbidity_for_drinking": "Độ đục của nước chỉ số cảnh báo đầu tiên về chất lượng nước có thể ảnh hưởng đến sức khoẻ con người.\nĐối với nguồn cung cấp nước uống, độ đục được khuyến nghị phải tuân theo những yêu cầu sau để đảm bảo các an toàn về sức khoẻ:\n- Nước uống phải có độ đục từ 5 NTU / JTU trở xuống. Độ đục của nước lớn hơn 5 NTU / JTU sẽ được người dùng nhận thấy và bị từ chối cung cấp.\n- Khi nước được khử trùng bằng clo, độ đục phải nhỏ hơn 5 NTU / JTU và tốt hơn là nhỏ hơn 1 NTU / JTU.",
243
- "text_turbidity_very_good_range": "0 - 1.1 NTU",
244
- "text_turbidity_good_range": "1.2 - 2.4 NTU",
245
- "text_turbidity_moderate_range": "2.5 - 3.7 NTU",
246
- "text_turbidity_poor_range": "3.8 - 5 NTU",
247
- "text_turbidity_very_poor_range": "> 5 NTU",
241
+ "turbidity_recommend": "Mức độ đục của nước khuyến nghị",
242
+ "text_turbidity_recommend": "Đối với mục đích sử dụng bình thường trong sinh hoạt, mức độ pH tại điểm người tiêu dùng lấy nước phải",
243
+ "text_turbidity_recommend_range": "thấp hơn 2 NTU.",
244
+ "text_turbidity_very_good_range": "0 - 2 NTU",
245
+ "text_turbidity_poor_range": "> 2 NTU",
248
246
  "ph_guide": "Độ pH",
249
247
  "what_is_ph": "Độ pH là gì?",
250
248
  "text_what_ph": "pH là một chỉ số xác định tính chất hoá học của nước. Nó cho biết chất đó có tính axit hoặc kiềm (bazơ) như thế nào.",
251
- "ph_for_drinking": "Hướng dẫn về độ pH cho nước uống",
252
- "text_ph_for_drinking": "Đối với nguồn cung cấp nước uống, độ pH được khuyến nghị nằm trong mức 6.5-8.5 để đảm bảo các an toàn về sức khoẻ.",
253
- "text_ph_very_good_range": "pH 6.5 - 6.9",
254
- "text_ph_good_range": "pH 7.0 - 7.4",
255
- "text_ph_moderate_range": "pH 7.5 - 7.9",
256
- "text_ph_poor_range": "pH 8.0 - 8.5",
257
- "text_ph_very_poor_range": "pH > 8.5\npH < 6.5",
249
+ "ph_recommend": "Mức độ pH khuyến nghị",
250
+ "text_ph_recommend": "Đối với mục đích sử dụng bình thường trong sinh hoạt, mức độ pH tại điểm người tiêu dùng lấy nước phải nằm trong khoảng",
251
+ "text_ph_recommend_range": "từ 6.0 đến 8.5.",
252
+ "text_ph_very_good_range": "pH 6.0 - 8.5",
253
+ "text_ph_poor_range": "pH < 6.0\npH > 8.5",
258
254
  "ph_scale": "Thang đo pH",
259
255
  "text_ph_scale": "Thang đo pH nằm trong khoảng từ 0 đến 14:\n- Nước có tính axit có độ pH thấp hơn 7. Các chất có tính axit nhất có pH bằng 0. Axit acquy thuộc loại này.\n- Nước kiềm có độ pH từ 8 trở lên. Các chất kiềm nhất, chẳng hạn như dung dịch kiềm, có độ pH là 14.\n- Nước tinh khiết có độ pH là 7 và được coi là “trung tính” vì nó không có tính axit cũng như tính bazơ.",
260
256
  "ph_battery_acid_level": "Pin Acid",
@@ -1107,5 +1103,11 @@
1107
1103
  "cannot_find_device_wifi": "Không thể tìm thấy Wifi của thiết bị",
1108
1104
  "this_command_is_just_support_bluetooth_only": "Lệnh gửi này chỉ hỗ trợ bluetooth",
1109
1105
  "photo_request_permission_des": "Để chọn ảnh từ thư viện, vui lòng mở khóa quyền truy cập ảnh",
1110
- "all_gateway": "Tất cả cổng kết nối"
1106
+ "used_pin": "PIN đã sử dụng",
1107
+ "all_gateway": "Tất cả cổng kết nối",
1108
+ "pin_number": "Số PIN",
1109
+ "default_value": "Giá trị mặc định",
1110
+ "config_type": "Loại cấu hình",
1111
+ "pin": "PIN",
1112
+ "pin_mode": "Chế độ mã PIN"
1111
1113
  }
@@ -182,6 +182,8 @@ const Routes = {
182
182
  SuccessfullyConnected: 'SuccessfullyConnected',
183
183
  AllGatewayStack: 'AllGatewayStack',
184
184
  AllGateway: 'AllGateway',
185
+ DetailConfigActionInterval: 'DetailConfigActionInterval',
186
+ DeviceInternalDetail: 'DeviceInternalDetail',
185
187
  };
186
188
 
187
189
  export default Routes;
@@ -4,6 +4,8 @@ export const STORAGE_KEY = {
4
4
  FIREBASE_APP_CONFIG: 'app_config',
5
5
  FIREBASE_EXCHANGE_RATES: 'exchange_rates',
6
6
  FIREBASE_REVIEW_COMMENT_VIDEO: 'review_comment_video',
7
+ IS_FIRST_TIME_LOAD_MY_UNITS: 'IS_FIRST_TIME_LOAD_MY_UNITS',
8
+ IS_FIRST_TIME_LOAD_MY_SHARE_UNIT: 'IS_FIRST_TIME_LOAD_MY_SHARE_UNIT',
7
9
  };
8
10
 
9
11
  export const storeData = async (key, value) => {
@@ -13,3 +15,7 @@ export const storeData = async (key, value) => {
13
15
  export const getData = async (key) => {
14
16
  return await AsyncStorage.getItem(`${key}`);
15
17
  };
18
+
19
+ export const removeMultiple = async (keys) => {
20
+ await AsyncStorage.multiRemove(keys);
21
+ };