@eohjsc/react-native-smart-city 0.4.47 → 0.4.49
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/README.md +1 -5
- package/android/build.gradle +24 -19
- package/package.json +12 -15
- package/src/commons/ActionGroup/__test__/ColorPickerTemplate.test.js +3 -6
- package/src/commons/ActionGroup/__test__/TwoButtonTemplate.test.js +11 -1
- package/src/commons/Dashboard/MyPinnedSharedUnit/__test__/MyPinnedSharedUnit.test.js +5 -0
- package/src/commons/Dashboard/MyPinnedSharedUnit/index.js +6 -1
- package/src/commons/DateTimeRangeChange/index.js +3 -3
- package/src/commons/Device/Hanet/ItemHanetDevice.js +1 -5
- package/src/commons/Device/HorizontalBarChart.js +3 -0
- package/src/commons/Device/ItemAddNew/index.js +2 -6
- package/src/commons/Device/ItemDevice.js +1 -5
- package/src/commons/FlatListDnD/__test__/index.test.js +25 -27
- package/src/commons/GroupCheckBox/__test__/GroupCheckBox.test.js +22 -1
- package/src/commons/HeaderAni/index.js +2 -12
- package/src/commons/MediaPlayerDetail/__test__/MediaPlayerFull.test.js +23 -1
- package/src/commons/SubUnit/OneTap/ItemOneTap.js +2 -10
- package/src/commons/Unit/HeaderUnit/index.js +7 -18
- package/src/commons/Unit/SharedUnit.js +43 -58
- package/src/commons/Unit/__test__/SharedUnit.test.js +100 -60
- package/src/commons/UnitSummary/ConfigHistoryChart/__test__/ConfigHistoryChart.test.js +289 -0
- package/src/commons/UnitSummary/ConfigHistoryChart/index.js +59 -1
- package/src/commons/WrapParallaxScrollView/index.js +0 -4
- package/src/configs/API.js +1 -0
- package/src/configs/AccessibilityLabel.js +0 -3
- package/src/hooks/IoT/__test__/useRemoteControl.test.js +51 -52
- package/src/hooks/IoT/__test__/useWatchConfigs.test.js +2 -3
- package/src/navigations/AutomateStack.js +2 -5
- package/src/navigations/NotificationStack.js +2 -28
- package/src/navigations/SharedStack.js +2 -8
- package/src/navigations/UnitStack.js +2 -2
- package/src/screens/AddNewGateway/ConnectingWifiDevice.js +5 -4
- package/src/screens/AddNewGateway/ConnectingWifiGuide.js +47 -12
- package/src/screens/AddNewGateway/RenameNewDevices.js +126 -10
- package/src/screens/AddNewGateway/RenameNewDevicesStyles.js +26 -5
- package/src/screens/AddNewGateway/ShareWifiPassword.js +39 -7
- package/src/screens/AddNewGateway/__test__/ConnectingWifiDevice.test.js +36 -7
- package/src/screens/AddNewGateway/__test__/ConnectingWifiGuide.test.js +41 -32
- package/src/screens/AddNewGateway/__test__/RenameNewDevices.test.js +106 -2
- package/src/screens/AddNewGateway/__test__/ShareWifiPassword.test.js +35 -2
- package/src/screens/AllGateway/DeviceModbusDetail/__test__/index.test.js +32 -31
- package/src/screens/Automate/EditActionsList/__tests__/index.test.js +68 -69
- package/src/screens/Automate/ScriptDetail/Styles/indexStyles.js +0 -1
- package/src/screens/Automate/ScriptDetail/index.js +7 -4
- package/src/screens/ChangePosition/__test__/index.test.js +32 -34
- package/src/screens/ConfirmUnitDeletion/__test__/ConfirmUnitDeletion.test.js +11 -1
- package/src/screens/Device/__test__/detail.test.js +3 -3
- package/src/screens/Device/components/ChartWrapper.js +12 -14
- package/src/screens/Device/components/VisualChart.js +1 -7
- package/src/screens/Device/components/__test__/VisualChart.test.js +3 -0
- package/src/screens/Device/detail.js +7 -12
- package/src/screens/Device/hooks/__test__/useEvaluateValue.test.js +18 -20
- package/src/screens/Device/styles.js +0 -3
- package/src/screens/Notification/__test__/Notification.test.js +8 -14
- package/src/screens/Notification/components/NotificationItem.js +0 -1
- package/src/screens/Notification/index.js +48 -42
- package/src/screens/Notification/styles/indexStyles.js +3 -6
- package/src/screens/SharedUnit/index.js +4 -1
- package/src/screens/Sharing/Components/CheckBoxCustom.js +14 -2
- package/src/screens/Sharing/MemberList.js +3 -16
- package/src/screens/Sharing/__test__/SelectPermission.test.js +137 -96
- package/src/screens/SmartAccount/Connecting/index.js +0 -1
- package/src/screens/SmartAccount/__test__/Connecting.test.js +92 -0
- package/src/screens/Template/__test__/EditTemplate.test.js +1 -7
- package/src/screens/Unit/__test__/SelectAddress.test.js +11 -4
- package/src/screens/Unit/components/SharedUnit/index.js +9 -6
- package/src/screens/Unit/components/__test__/SharedUnit.test.js +15 -19
- package/src/screens/UnitSummary/components/3PPowerConsumption/__test__/3PPowerConsumption.test.js +11 -1
- package/src/utils/I18n/translations/en.js +19 -5
- package/src/utils/I18n/translations/vi.js +19 -5
- package/src/utils/Monitor.js +2 -2
- package/src/Images/Common/pushpin-full.svg +0 -3
- package/src/Images/Common/pushpin-outline.svg +0 -3
- package/src/Images/Common/star-full.svg +0 -3
- package/src/Images/Common/star-outline.svg +0 -3
|
@@ -1304,7 +1304,7 @@ export default {
|
|
|
1304
1304
|
need_add_gateway_before_add_device:
|
|
1305
1305
|
'You need to add a new Gateway before adding the device.',
|
|
1306
1306
|
fail_to_discover_device_wifi: 'Fail to discover device wifi',
|
|
1307
|
-
try_to_turn_on_device_or_try_again: 'Try to turn on device or
|
|
1307
|
+
try_to_turn_on_device_or_try_again: 'Try to turn on device or try again',
|
|
1308
1308
|
go_to_eoh_web_to_see_firmware:
|
|
1309
1309
|
'Go to {appName} web to see firmware configuration',
|
|
1310
1310
|
general_information: 'General information',
|
|
@@ -1340,9 +1340,10 @@ export default {
|
|
|
1340
1340
|
config_read: 'Config read',
|
|
1341
1341
|
virtual_pin: 'Virtual pin',
|
|
1342
1342
|
click_on_box_to_rename_device: 'Click on the box to rename your device',
|
|
1343
|
-
cannot_connect_to_device_wifi: "Cannot connect to device's wifi",
|
|
1343
|
+
cannot_connect_to_device_wifi: "Cannot connect to device's wifi {wifiDevice}",
|
|
1344
1344
|
try_turn_on_device_or_try_again: 'Try turn on device or try again',
|
|
1345
|
-
fail_trigger_scan_wifi_on_device:
|
|
1345
|
+
fail_trigger_scan_wifi_on_device:
|
|
1346
|
+
'Fail trigger scan wifi on device {wifiDevice}',
|
|
1346
1347
|
fail_add_wifi_device: 'Fail add wifi device',
|
|
1347
1348
|
connecting_wifi_device: 'Connecting wifi device',
|
|
1348
1349
|
connecting_to_device: 'Connecting to device',
|
|
@@ -1350,7 +1351,14 @@ export default {
|
|
|
1350
1351
|
connecting_zigbee_device: 'Connecting to zigbee device',
|
|
1351
1352
|
connecting_to_gateway: 'Connecting to gateway',
|
|
1352
1353
|
select_network: 'Select your home network.',
|
|
1353
|
-
wrong_wifi_password:
|
|
1354
|
+
wrong_wifi_password: 'Cannot connect to wifi "{wifi}"',
|
|
1355
|
+
pls_re_enter_wifi_password: 'Please re-enter wifi password "{wifi}"',
|
|
1356
|
+
disconnected_to_wifi_device:
|
|
1357
|
+
'The connection to the wifi device has been lost.',
|
|
1358
|
+
you_need_reconnect_wifi_device:
|
|
1359
|
+
'You need to reconnect to wifi device "{wifi}"',
|
|
1360
|
+
error_sending_data_to_wifi_device:
|
|
1361
|
+
'An error occurred while sending data to the wifi device',
|
|
1354
1362
|
fail_add_modbus_device: 'Fail to add modbus device',
|
|
1355
1363
|
fail_add_zigbee_device: 'Fail to add zigbee device',
|
|
1356
1364
|
no_zigbee_device_join_timeout:
|
|
@@ -1365,7 +1373,9 @@ export default {
|
|
|
1365
1373
|
text_alert_modal_popup_ct: 'It’s a critical action and cannot be undone.',
|
|
1366
1374
|
text_understand_modal_popup_ct:
|
|
1367
1375
|
'I fully understand that this action is critical and will lead to data loss.',
|
|
1368
|
-
cannot_find_device_wifi: "
|
|
1376
|
+
cannot_find_device_wifi: 'The devices wifi "{wifiDevice}" could not be found',
|
|
1377
|
+
connecting_to_wifi_device:
|
|
1378
|
+
'App {appName} is connecting to wifi device "{wifiDevice}"',
|
|
1369
1379
|
choose_only_one: 'Choose only one condition event',
|
|
1370
1380
|
photo_request_permission_des:
|
|
1371
1381
|
'To select photo from gallery, please unlock access photo permission',
|
|
@@ -1379,6 +1389,7 @@ export default {
|
|
|
1379
1389
|
pin: 'PIN',
|
|
1380
1390
|
pin_mode: 'PIN mode',
|
|
1381
1391
|
rename_device_fail: 'Rename device fail',
|
|
1392
|
+
select_device_failed: 'Select device failed',
|
|
1382
1393
|
release_time: 'Release time',
|
|
1383
1394
|
data_address: 'Data address',
|
|
1384
1395
|
methods: '{number} methods',
|
|
@@ -1425,6 +1436,9 @@ export default {
|
|
|
1425
1436
|
actions: 'actions',
|
|
1426
1437
|
value_must_be_less_than_8_character:
|
|
1427
1438
|
'Value must be less than or equal to 8 characters',
|
|
1439
|
+
click_on_the_box_to_rename:
|
|
1440
|
+
'Click on the end device to rename and untick the box to remove ',
|
|
1441
|
+
end_devices_added: 'end devices added',
|
|
1428
1442
|
bellow_widget_is_not_configured: 'Bellow widget is not configured',
|
|
1429
1443
|
bellow_widget_is_wrongly_configured: 'Bellow widget is wrongly configured',
|
|
1430
1444
|
};
|
|
@@ -1312,7 +1312,7 @@ export default {
|
|
|
1312
1312
|
need_add_gateway_before_add_device:
|
|
1313
1313
|
'Bạn cần thêm mới 1 Gateway trước khi thêm thiết bị.',
|
|
1314
1314
|
fail_to_discover_device_wifi: 'Không phát hiện được wifi của thiết bị',
|
|
1315
|
-
try_to_turn_on_device_or_try_again: 'Thử bật thiết bị hoặc
|
|
1315
|
+
try_to_turn_on_device_or_try_again: 'Thử bật thiết bị hoặc thử lại',
|
|
1316
1316
|
go_to_eoh_web_to_see_firmware: 'Vào web {appName} để xem cấu hình firmware',
|
|
1317
1317
|
general_information: 'Thông tin chung',
|
|
1318
1318
|
connection_methods: 'Các phương thức kết nối',
|
|
@@ -1348,10 +1348,11 @@ export default {
|
|
|
1348
1348
|
config_read: 'Cấu hình đọc',
|
|
1349
1349
|
virtual_pin: 'Pin ảo',
|
|
1350
1350
|
click_on_box_to_rename_device: 'Nhấp vào ô để đổi tên thiết bị của bạn',
|
|
1351
|
-
cannot_connect_to_device_wifi:
|
|
1351
|
+
cannot_connect_to_device_wifi:
|
|
1352
|
+
'Không thể kết nối với wifi của thiết bị {wifiDevice}',
|
|
1352
1353
|
try_turn_on_device_or_try_again: 'Hãy thử bật thiết bị hoặc thử lại',
|
|
1353
1354
|
fail_trigger_scan_wifi_on_device:
|
|
1354
|
-
'Không kích hoạt được quét wifi trên thiết bị',
|
|
1355
|
+
'Không kích hoạt được quét wifi trên thiết bị {wifiDevice}',
|
|
1355
1356
|
fail_add_wifi_device: 'Không thêm được thiết bị Wi-Fi',
|
|
1356
1357
|
connecting_wifi_device: 'Kết nối thiết bị wifi',
|
|
1357
1358
|
connecting_to_device: 'Đang kết nối với thiết bị',
|
|
@@ -1359,7 +1360,13 @@ export default {
|
|
|
1359
1360
|
connecting_zigbee_device: 'Kết nối với thiết bị zigbee',
|
|
1360
1361
|
connecting_to_gateway: 'Kết nối với gateway',
|
|
1361
1362
|
select_network: 'Chọn mạng của bạn.',
|
|
1362
|
-
wrong_wifi_password: '
|
|
1363
|
+
wrong_wifi_password: 'Không thế kết nối tới wifi "{wifi}"',
|
|
1364
|
+
pls_re_enter_wifi_password: 'Vui lòng nhập lại mật khẩu wifi "{wifi}"',
|
|
1365
|
+
disconnected_to_wifi_device: 'Đã bị mất kết nối tới thiết bị wifi.',
|
|
1366
|
+
you_need_reconnect_wifi_device:
|
|
1367
|
+
'Bạn cần kết nối lại với thiết bị wifi "{wifi}"',
|
|
1368
|
+
error_sending_data_to_wifi_device:
|
|
1369
|
+
'Đã xảy ra lỗi khi gửi dữ liệu tới thiết bị wifi',
|
|
1363
1370
|
fail_add_modbus_device: 'Không thêm được thiết bị modbus',
|
|
1364
1371
|
fail_add_zigbee_device: 'Không thêm được thiết bị zigbee',
|
|
1365
1372
|
no_zigbee_device_join_timeout:
|
|
@@ -1376,7 +1383,10 @@ export default {
|
|
|
1376
1383
|
text_working_hard:
|
|
1377
1384
|
'Chúng tôi đang làm việc chăm chỉ để làm cho điều này hoạt động',
|
|
1378
1385
|
photo_request_permission: 'Quyền yêu cầu ảnh',
|
|
1379
|
-
cannot_find_device_wifi:
|
|
1386
|
+
cannot_find_device_wifi:
|
|
1387
|
+
'Không thể tìm thấy wifi "{wifiDevice}" của thiết bị',
|
|
1388
|
+
connecting_to_wifi_device:
|
|
1389
|
+
'App {appName} đang kết nối với thiết bị "{wifiDevice}"',
|
|
1380
1390
|
choose_only_one: 'Chỉ chọn một điều kiện',
|
|
1381
1391
|
photo_request_permission_des:
|
|
1382
1392
|
'Để chọn ảnh từ thư viện, vui lòng mở khóa quyền truy cập ảnh',
|
|
@@ -1390,6 +1400,7 @@ export default {
|
|
|
1390
1400
|
pin: 'PIN',
|
|
1391
1401
|
pin_mode: 'Chế độ mã PIN',
|
|
1392
1402
|
rename_device_fail: 'Đổi tên thiết bị thất bại',
|
|
1403
|
+
select_device_failed: 'Chọn thiết bị không thành công',
|
|
1393
1404
|
release_time: 'Thời gian nhả trạng thái',
|
|
1394
1405
|
data_address: 'Địa chỉ dữ liệu',
|
|
1395
1406
|
methods: '{number} phương thức',
|
|
@@ -1436,6 +1447,9 @@ export default {
|
|
|
1436
1447
|
you_can_only_add_more: 'Bạn chỉ có thể thêm {number}',
|
|
1437
1448
|
actions: 'hành động',
|
|
1438
1449
|
value_must_be_less_than_8_character: 'Giá trị phải ít hơn hoặc bằng 8 kí tự',
|
|
1450
|
+
click_on_the_box_to_rename:
|
|
1451
|
+
'Nhấp vào thiết bị để đổi tên và bỏ chọn hộp để xóa',
|
|
1452
|
+
end_devices_added: 'thiết bị được thêm vào',
|
|
1439
1453
|
bellow_widget_is_not_configured: 'Tiện ích bên dưới chưa được cấu hình',
|
|
1440
1454
|
bellow_widget_is_wrongly_configured: 'Tiện ích bên dưới được cấu hình sai',
|
|
1441
1455
|
};
|
package/src/utils/Monitor.js
CHANGED
|
@@ -2,8 +2,8 @@ import { getPusher, destroyPusher } from './Pusher';
|
|
|
2
2
|
|
|
3
3
|
// eslint-disable-next-line promise/prefer-await-to-callbacks
|
|
4
4
|
export const watchNotificationData = (user, callback) => {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
const channel = getPusher().subscribe(`private-user-${user.id}`);
|
|
6
|
+
channel.bind('new-notification', callback);
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
export const unwatchNotificationData = (user) => {
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M20.5855 9.18984L14.8105 3.41484C14.6582 3.2625 14.4589 3.1875 14.2597 3.1875C14.0605 3.1875 13.8613 3.2625 13.7089 3.41484L9.93317 7.19297C9.64723 7.16016 9.35895 7.14609 9.07066 7.14609C7.35504 7.14609 5.63941 7.71094 4.23082 8.84063C3.86988 9.12891 3.84176 9.67031 4.16754 9.99844L8.42613 14.257L3.3777 19.3008C3.31583 19.3623 3.27765 19.4436 3.26988 19.5305L3.1902 20.4023C3.1691 20.6227 3.34488 20.8102 3.56285 20.8102C3.57457 20.8102 3.58629 20.8102 3.59801 20.8078L4.46988 20.7281C4.5566 20.7211 4.63863 20.6813 4.69957 20.6203L9.74801 15.5719L14.0066 19.8305C14.1589 19.9828 14.3582 20.0578 14.5574 20.0578C14.7847 20.0578 15.0097 19.9594 15.1644 19.7672C16.4839 18.1195 17.0324 16.057 16.8097 14.0625L20.5855 10.2867C20.8879 9.98672 20.8879 9.49453 20.5855 9.18984Z" fill="#1890FF"/>
|
|
3
|
-
</svg>
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M17.1236 7.6582L12.4395 2.8457C12.3159 2.71875 12.1543 2.65625 11.9927 2.65625C11.8311 2.65625 11.6695 2.71875 11.546 2.8457L8.48339 5.99414C8.25146 5.9668 8.01763 5.95508 7.7838 5.95508C6.39224 5.95508 5.00068 6.42578 3.85815 7.36719C3.78897 7.42426 3.73226 7.49567 3.69172 7.57677C3.65119 7.65786 3.62774 7.74682 3.62289 7.83784C3.61805 7.92887 3.63193 8.01992 3.66362 8.10507C3.69531 8.19021 3.7441 8.26755 3.80682 8.33203L7.26102 11.8809L3.16617 16.084C3.11599 16.1352 3.08503 16.203 3.07873 16.2754L3.01409 17.002C2.99698 17.1855 3.13956 17.3418 3.31636 17.3418C3.32586 17.3418 3.33537 17.3418 3.34487 17.3398L4.05206 17.2734C4.1224 17.2676 4.18893 17.2344 4.23836 17.1836L8.33321 12.9766L11.7874 16.5254C11.911 16.6523 12.0726 16.7148 12.2341 16.7148C12.4185 16.7148 12.601 16.6328 12.7265 16.4727C13.7968 15.0996 14.2416 13.3809 14.061 11.7188L17.1236 8.57227C17.3689 8.32227 17.3689 7.91211 17.1236 7.6582ZM13.0915 10.7285L12.6258 11.207L12.698 11.8789C12.8113 12.9181 12.6094 13.9679 12.1201 14.8848L5.4075 7.98438C5.65274 7.8457 5.90748 7.72852 6.17362 7.63477C6.6907 7.45117 7.2325 7.35938 7.7838 7.35938C7.9663 7.35938 8.1507 7.36914 8.33321 7.39063L8.98716 7.46484L9.45292 6.98633L11.9946 4.375L15.6351 8.11523L13.0915 10.7285Z" fill="#595959"/>
|
|
3
|
-
</svg>
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M21.2841 8.27559L15.3333 7.41075L12.6731 2.01778C12.6005 1.87013 12.4809 1.75059 12.3333 1.67794C11.963 1.49513 11.513 1.64747 11.3278 2.01778L8.66766 7.41075L2.71688 8.27559C2.55282 8.29903 2.40281 8.37638 2.28797 8.49356C2.14913 8.63627 2.07262 8.82825 2.07526 9.02733C2.0779 9.22642 2.15946 9.41631 2.30203 9.55528L6.6075 13.7529L5.59031 19.6803C5.56646 19.8182 5.58172 19.96 5.63436 20.0896C5.687 20.2193 5.77491 20.3316 5.88813 20.4138C6.00135 20.496 6.13535 20.5449 6.27492 20.5549C6.4145 20.5648 6.55407 20.5355 6.67781 20.4701L12.0005 17.6717L17.3231 20.4701C17.4684 20.5475 17.6372 20.5732 17.7989 20.5451C18.2067 20.4748 18.4809 20.0881 18.4106 19.6803L17.3934 13.7529L21.6989 9.55528C21.8161 9.44044 21.8934 9.29044 21.9169 9.12638C21.9802 8.71622 21.6942 8.33653 21.2841 8.27559Z" fill="#FADB14"/>
|
|
3
|
-
</svg>
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M22 9.24L14.81 8.62L12 2L9.19 8.63L2 9.24L7.46 13.97L5.82 21L12 17.27L18.18 21L16.55 13.97L22 9.24ZM12 15.4L8.24 17.67L9.24 13.39L5.92 10.51L10.3 10.13L12 6.1L13.71 10.14L18.09 10.52L14.77 13.4L15.77 17.68L12 15.4Z" fill="#262626"/>
|
|
3
|
-
</svg>
|