@eohjsc/react-native-smart-city 0.2.23 → 0.2.26
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 -1
- package/assets/images/OneTap@1x.svg +14 -0
- package/index.js +0 -2
- package/package.json +11 -3
- package/src/Images/Common/arrow-back.png +0 -0
- package/src/Images/Common/checked@2x.png +0 -0
- package/src/Images/Common/checked@3x.png +0 -0
- package/src/Images/Common/file.png +0 -0
- package/src/Images/Common/fullscreen.png +0 -0
- package/src/Images/Common/refresh.png +0 -0
- package/src/commons/ActionGroup/NumberUpDownActionTemplate.js +1 -1
- package/src/commons/ActionGroup/OnOffTemplate/index.js +4 -4
- package/src/commons/ActionGroup/OptionsDropdownActionTemplate.js +1 -1
- package/src/commons/ActionGroup/StatesGridActionTemplate.js +2 -2
- package/src/commons/ActionGroup/__test__/OnOffButtonTemplate.test.js +8 -13
- package/src/commons/ActionGroup/__test__/OnOffTemplate.test.js +3 -3
- package/src/commons/ActionGroup/__test__/OptionsDropdownTemplate.test.js +26 -46
- package/src/commons/ActionGroup/__test__/ThreeButtonTemplate.test.js +11 -5
- package/src/commons/ActionGroup/__test__/TimerActionTemplate.test.js +14 -8
- package/src/commons/ActionGroup/__test__/TimerActionTemplateWithutConfigValue.test.js +17 -23
- package/src/commons/ActionGroup/__test__/__snapshots__/ThreeButtonTemplate.test.js.snap +241 -223
- package/src/commons/ActionGroup/__test__/index.test.js +39 -107
- package/src/commons/ActionTemplate/ActionTemplateStyles.js +14 -0
- package/src/commons/ActionTemplate/OnOffButtonAction.js +40 -0
- package/src/commons/ActionTemplate/OnOffButtonActionStyles.js +11 -0
- package/src/commons/ActionTemplate/OneButtonAction.js +26 -0
- package/src/commons/ActionTemplate/OneButtonActionStyles.js +11 -0
- package/src/commons/ActionTemplate/ThreeButtonAction.js +55 -0
- package/src/commons/ActionTemplate/ThreeButtonActionStyles.js +11 -0
- package/src/commons/ActionTemplate/__test__/OnOffButtonAction.test.js +34 -0
- package/src/commons/ActionTemplate/__test__/OneButtonAction.test.js +33 -0
- package/src/commons/ActionTemplate/__test__/ThreeButtonAction.test.js +35 -0
- package/src/commons/ActionTemplate/__test__/index.test.js +71 -0
- package/src/commons/ActionTemplate/index.js +69 -0
- package/src/commons/Automate/ItemAutomate.js +1 -31
- package/src/commons/Automate/ItemAutomateStyles.js +10 -7
- package/src/commons/Automate/ItemScriptAction.js +9 -5
- package/src/commons/Automate/ItemScriptActionStyles.js +4 -0
- package/src/commons/ChartLoading/__test__/ChartLoading.test.js +9 -7
- package/src/commons/Device/DeviceAlertStatus.js +3 -1
- package/src/commons/Device/Emergency/__test__/EmergencyButton.test.js +14 -6
- package/src/commons/Device/Emergency/__test__/EmergencyDetail.test.js +10 -2
- package/src/commons/Device/FlatListItems.js +1 -1
- package/src/commons/Device/ItemAddNew/index.js +6 -1
- package/src/commons/Device/WindDirection/Compass/Compass.test.js +19 -11
- package/src/commons/Device/WindSpeed/LinearChart/__test__/LinearChart.test.js +9 -3
- package/src/commons/Device/WindSpeed/LinearChart/__test__/__snapshots__/LinearChart.test.js.snap +0 -81
- package/src/commons/Device/__test__/ConnectedViewHeader.test.js +16 -8
- package/src/commons/Device/__test__/DeviceAlertStatus.test.js +13 -6
- package/src/commons/Device/__test__/DisconnectedView.test.js +13 -5
- package/src/commons/Device/__test__/FlatListItems.test.js +9 -1
- package/src/commons/Device/__test__/FooterInfo.test.js +13 -4
- package/src/commons/Device/__test__/SensorConnectedStatus.test.js +9 -1
- package/src/commons/Device/__test__/__snapshots__/DisconnectedView.test.js.snap +20 -20
- package/src/commons/DisplayChecking/__test__/DisplayChecking.test.js +28 -0
- package/src/commons/Explore/SearchBox/__test__/SearchBox.test.js +9 -2
- package/src/commons/Explore/__test__/CityItem.test.js +13 -15
- package/src/commons/Explore/__test__/HeaderLabel.test.js +15 -9
- package/src/commons/Header/HeaderCustom.js +7 -1
- package/src/commons/Header/__test__/HeaderCT.test.js +12 -4
- package/src/commons/ImagePicker/__test__/ImagePicker.test.js +19 -13
- package/src/commons/MediaPlayerDetail/__test__/MediaPlayerDetail.test.js +14 -8
- package/src/commons/MediaPlayerDetail/index.js +2 -0
- package/src/commons/MenuActionAddnew/__test__/MenuActionAddNew.test.js +11 -20
- package/src/commons/Modal/ModalBottom.js +51 -0
- package/src/commons/Modal/Styles/ModalBottomStyles.js +35 -0
- package/src/commons/Modal/index.js +2 -1
- package/src/commons/SelectActionCard/SelectActionStyles.js +16 -0
- package/src/commons/SelectActionCard/index.js +30 -0
- package/src/commons/Sharing/__test__/DevicePermissionsCheckbox.test.js +15 -9
- package/src/commons/Sharing/__test__/MemberList.test.js +17 -25
- package/src/commons/Sharing/__test__/StationDevicePermission.test.js +17 -12
- package/src/commons/Sharing/__test__/WrapHeaderScrollable.test.js +0 -9
- package/src/commons/SubUnit/OneTap/ItemOneTap.js +20 -9
- package/src/commons/SubUnit/OneTap/__test__/SubUnitAutomate.test.js +149 -0
- package/src/commons/SubUnit/OneTap/index.js +16 -6
- package/src/commons/SubUnit/ShortDetail.js +9 -5
- package/src/commons/SubUnit/__test__/ShortDetail.test.js +14 -6
- package/src/commons/Today/__test__/Today.test.js +9 -1
- package/src/commons/Today/__test__/__snapshots__/Today.test.js.snap +1 -1
- package/src/commons/UnitSummary/AirQuality/__test__/index.test.js +16 -17
- package/src/commons/UnitSummary/__test__/TotalPowerConsumption.test.js +15 -9
- package/src/configs/API.js +6 -1
- package/src/configs/Constants.js +42 -0
- package/src/context/SCContext.tsx +2 -26
- package/src/context/actionType.ts +11 -0
- package/src/context/mockStore.ts +49 -0
- package/src/context/reducer.ts +21 -0
- package/src/hooks/Common/__test__/useTranslations.test.js +23 -0
- package/src/hooks/Common/index.js +2 -0
- package/src/hooks/Common/useGetIdUser.js +9 -0
- package/src/iot/RemoteControl/__test__/Bluetooth.test.js +3 -6
- package/src/iot/RemoteControl/__test__/GoogleHome.test.js +3 -4
- package/src/iot/RemoteControl/__test__/Internet.test.js +1 -9
- package/src/iot/RemoteControl/__test__/LgThinq.test.js +7 -10
- package/src/navigations/UnitStack.js +14 -0
- package/src/screens/AQIGuide/__test__/AQIGuide.test.js +9 -1
- package/src/screens/AQIGuide/index.js +1 -1
- package/src/screens/ActivityLog/__test__/index.test.js +14 -39
- package/src/screens/AddCommon/SelectSubUnit.js +2 -2
- package/src/screens/AddCommon/__test__/SelectSubUnit.test.js +61 -0
- package/src/screens/AddCommon/__test__/SelectUnit.test.js +18 -10
- package/src/screens/AddNewAction/Device/__test__/index.test.js +42 -0
- package/src/screens/AddNewAction/SelectAction.js +152 -0
- package/src/screens/AddNewAction/SelectDevice.js +25 -11
- package/src/screens/AddNewAction/Styles/SelectActionStyles.js +24 -0
- package/src/screens/AddNewAction/__test__/SelectAction.test.js +172 -0
- package/src/screens/AddNewAction/__test__/SelectDevice.test.js +191 -0
- package/src/screens/AddNewAutoSmart/__test__/AddNewAutoSmart.test.js +55 -0
- package/src/screens/AddNewAutoSmart/index.js +85 -0
- package/src/screens/AddNewAutoSmart/styles/AddNewAutoSmartStyles.js +36 -0
- package/src/screens/AddNewDevice/__test__/AddNewDevice.test.js +29 -14
- package/src/screens/AddNewDevice/__test__/ConnectDevices.test.js +19 -8
- package/src/screens/AddNewDevice/__test__/ConnectingDevices.test.js +16 -7
- package/src/screens/AddNewGateway/__test__/AddNewGateway.test.js +35 -73
- package/src/screens/AddNewGateway/__test__/ConnectedGateway.test.js +14 -5
- package/src/screens/AddNewGateway/__test__/ConnectingGateway.test.js +20 -11
- package/src/screens/AddNewOneTap/__test__/AddNewOneTap.test.js +129 -0
- package/src/screens/AddNewOneTap/index.js +20 -7
- package/src/screens/AddNewScriptAction/AddNewScriptActionStyles.js +1 -0
- package/src/screens/AddNewScriptAction/index.js +21 -13
- package/src/screens/Device/__test__/detail.test.js +26 -19
- package/src/screens/Device/detail.js +5 -4
- package/src/screens/Device/hooks/useCountUp.js +4 -0
- package/src/screens/Device/styles.js +5 -1
- package/src/screens/DeviceInfo/__test__/index.test.js +12 -3
- package/src/screens/EditActionsList/Styles/indexStyles.js +11 -0
- package/src/screens/EditActionsList/index.js +83 -19
- package/src/screens/EmergencyContacts/__test__/EmergencyContactAddNew.test.js +15 -19
- package/src/screens/EmergencyContacts/__test__/EmergencyContactList.test.js +19 -24
- package/src/screens/EmergencyContacts/__test__/EmergencyContactsSelectContacts.test.js +10 -25
- package/src/screens/ManageAccess/__test__/ManageAccess.test.js +13 -1
- package/src/screens/ScanChipQR/__test__/ScanChipQR.test.js +2 -11
- package/src/screens/ScriptDetail/Styles/indexStyles.js +4 -1
- package/src/screens/ScriptDetail/index.js +30 -28
- package/src/screens/SharedUnit/__test__/TabHeader.test.js +40 -0
- package/src/screens/Sharing/__test__/MemberList.test.js +17 -14
- package/src/screens/Sharing/__test__/SelectPermission.test.js +16 -8
- package/src/screens/Sharing/__test__/SelectUser.test.js +33 -16
- package/src/screens/SubUnit/Detail.js +3 -3
- package/src/screens/SubUnit/ManageSubUnit.js +8 -8
- package/src/screens/SubUnit/__test__/AddSubUnit.test.js +17 -12
- package/src/screens/SubUnit/__test__/Detail.test.js +11 -31
- package/src/screens/SubUnit/__test__/ManageSubUnit.test.js +42 -32
- package/src/screens/TDSGuide/__test__/TDSGuide.test.js +9 -1
- package/src/screens/UVIndexGuide/__test__/UVIndexGuide.test.js +9 -1
- package/src/screens/Unit/Detail.js +33 -11
- package/src/screens/Unit/ManageUnit.js +1 -1
- package/src/screens/Unit/__test__/AddMenu.test.js +15 -15
- package/src/screens/Unit/__test__/CheckSendEmail.test.js +19 -10
- package/src/screens/Unit/__test__/Detail.test.js +92 -33
- package/src/screens/Unit/__test__/ManageUnit.test.js +16 -23
- package/src/screens/Unit/components/__test__/SharedUnit.test.js +11 -2
- package/src/screens/UnitSummary/__test__/index.test.js +12 -4
- package/src/screens/UnitSummary/components/3PPowerConsumption/__test__/3PPowerConsumption.test.js +13 -3
- package/src/screens/UnitSummary/components/PowerConsumption/__test__/PowerConsumption.test.js +16 -12
- package/src/screens/UnitSummary/components/RunningDevices/__test__/index.test.js +2 -2
- package/src/screens/UnitSummary/components/UvIndex/__test__/__snapshots__/index.test.js.snap +37 -37
- package/src/screens/UnitSummary/components/UvIndex/__test__/index.test.js +14 -6
- package/src/screens/UnitSummary/components/WaterQuality/__test__/index.test.js +11 -5
- package/src/screens/UnitSummary/components/__test__/TotalPowerConsumption.test.js +13 -7
- package/src/screens/WaterQualityGuide/__test__/index.test.js +12 -12
- package/src/utils/I18n/translations/en.json +9 -2
- package/src/utils/I18n/translations/vi.json +10 -3
- package/src/utils/Route/index.js +3 -2
- package/assets/images/Event.svg +0 -9
- package/src/commons/ChartLoading/__test__/__snapshots__/ChartLoading.test.js.snap +0 -66
- package/src/commons/Device/HistoryChart/__test__/HistoryChart.test.js +0 -57
- package/src/commons/Device/HistoryChart/__test__/__snapshots__/HistoryChart.test.js.snap +0 -593
- package/src/commons/Explore/SearchBox/__test__/__snapshots__/SearchBox.test.js.snap +0 -59
- package/src/commons/Explore/__test__/HeaderExplore.test.js +0 -21
- package/src/commons/Header/__test__/Header.test.js +0 -24
- package/src/commons/MenuActionAddnew/__test__/__snapshots__/MenuActionAddNew.test.js.snap +0 -788
- package/src/commons/Sharing/__test__/__snapshots__/WrapHeaderScrollable.test.js.snap +0 -174
- package/src/commons/UnitSummary/AirQuality/__test__/__snapshots__/index.test.js.snap +0 -26679
- package/src/iot/RemoteControl/__test__/index.test.js +0 -102
- package/src/iot/__test__/Monitor.test.js +0 -119
- package/src/navigations/AddNewActionStack.js +0 -23
- package/src/screens/EmergencyContacts/__test__/__snapshots__/EmergencyContactAddNew.test.js.snap +0 -1706
- package/src/screens/EmergencyContacts/__test__/__snapshots__/EmergencyContactList.test.js.snap +0 -4276
- package/src/screens/EmergencyContacts/__test__/__snapshots__/EmergencyContactsSelectContacts.test.js.snap +0 -2240
- package/src/screens/SyncLGDevice/__test__/AddLGDevice.test.js +0 -359
- package/src/screens/Unit/MyAllUnit/__test__/__snapshots__/index.test.js.snap +0 -1001
- package/src/screens/Unit/MyAllUnit/__test__/index.test.js +0 -48
- package/src/screens/Unit/components/MyAllUnit/__test__/__snapshots__/index.test.js.snap +0 -1001
- package/src/screens/Unit/components/MyAllUnit/__test__/index.test.js +0 -48
- package/src/screens/Unit/components/__test__/MyUnit.test.js +0 -85
- package/src/screens/UnitSummary/components/WaterQuality/__test__/__snapshots__/index.test.js.snap +0 -1574
- package/src/screens/WaterQualityGuide/__test__/__snapshots__/index.test.js.snap +0 -3375
- package/src/utils/Converter/__test__/time.test.js +0 -128
- package/src/utils/I18n/index.test.js +0 -7
|
@@ -5,6 +5,8 @@ import WaterQualityGuide from '../index';
|
|
|
5
5
|
import { create, act } from 'react-test-renderer';
|
|
6
6
|
import { TESTID } from '../../../configs/Constants';
|
|
7
7
|
import Text from '../../../commons/Text';
|
|
8
|
+
import { SCProvider } from '../../../context';
|
|
9
|
+
import { mockSCStore } from '../../../context/mockStore';
|
|
8
10
|
|
|
9
11
|
jest.mock('react-redux', () => ({
|
|
10
12
|
...jest.requireActual('react-redux'),
|
|
@@ -16,6 +18,12 @@ jest.mock('react', () => ({
|
|
|
16
18
|
useLayoutEffect: jest.fn(),
|
|
17
19
|
}));
|
|
18
20
|
|
|
21
|
+
const wrapComponent = (route) => (
|
|
22
|
+
<SCProvider initState={mockSCStore({})}>
|
|
23
|
+
<WaterQualityGuide route={route} />
|
|
24
|
+
</SCProvider>
|
|
25
|
+
);
|
|
26
|
+
|
|
19
27
|
describe('Test WaterQualityGuide', () => {
|
|
20
28
|
let route;
|
|
21
29
|
|
|
@@ -91,7 +99,7 @@ describe('Test WaterQualityGuide', () => {
|
|
|
91
99
|
|
|
92
100
|
test('render WaterQualityGuide default turbidityGuide', async () => {
|
|
93
101
|
act(() => {
|
|
94
|
-
tree = create(
|
|
102
|
+
tree = create(wrapComponent(route));
|
|
95
103
|
});
|
|
96
104
|
const instance = tree.root;
|
|
97
105
|
|
|
@@ -115,14 +123,12 @@ describe('Test WaterQualityGuide', () => {
|
|
|
115
123
|
expect(textDescription1).toHaveLength(0);
|
|
116
124
|
expect(textTitleLevel1).toHaveLength(0);
|
|
117
125
|
expect(textDescriptionLevel1).toHaveLength(0);
|
|
118
|
-
|
|
119
|
-
expect(tree.toJSON()).toMatchSnapshot();
|
|
120
126
|
});
|
|
121
127
|
|
|
122
128
|
test('render WaterQualityGuide with turbidityGuide', async () => {
|
|
123
129
|
route.params.waterType = 'turbidity';
|
|
124
130
|
act(() => {
|
|
125
|
-
tree = create(
|
|
131
|
+
tree = create(wrapComponent(route));
|
|
126
132
|
});
|
|
127
133
|
const instance = tree.root;
|
|
128
134
|
|
|
@@ -146,14 +152,12 @@ describe('Test WaterQualityGuide', () => {
|
|
|
146
152
|
expect(textDescription1).toHaveLength(0);
|
|
147
153
|
expect(textTitleLevel1).toHaveLength(0);
|
|
148
154
|
expect(textDescriptionLevel1).toHaveLength(0);
|
|
149
|
-
|
|
150
|
-
expect(tree.toJSON()).toMatchSnapshot();
|
|
151
155
|
});
|
|
152
156
|
|
|
153
157
|
test('render WaterQualityGuide with cloGuide', async () => {
|
|
154
158
|
route.params.waterType = 'clo';
|
|
155
159
|
act(() => {
|
|
156
|
-
tree = create(
|
|
160
|
+
tree = create(wrapComponent(route));
|
|
157
161
|
});
|
|
158
162
|
const instance = tree.root;
|
|
159
163
|
|
|
@@ -177,14 +181,12 @@ describe('Test WaterQualityGuide', () => {
|
|
|
177
181
|
expect(textDescription1).toHaveLength(0);
|
|
178
182
|
expect(textTitleLevel1).toHaveLength(0);
|
|
179
183
|
expect(textDescriptionLevel1).toHaveLength(0);
|
|
180
|
-
|
|
181
|
-
expect(tree.toJSON()).toMatchSnapshot();
|
|
182
184
|
});
|
|
183
185
|
|
|
184
186
|
test('render WaterQualityGuide with phGuide', async () => {
|
|
185
187
|
route.params.waterType = 'ph';
|
|
186
188
|
act(() => {
|
|
187
|
-
tree = create(
|
|
189
|
+
tree = create(wrapComponent(route));
|
|
188
190
|
});
|
|
189
191
|
const instance = tree.root;
|
|
190
192
|
|
|
@@ -208,7 +210,5 @@ describe('Test WaterQualityGuide', () => {
|
|
|
208
210
|
expect(textDescription1).toHaveLength(1);
|
|
209
211
|
expect(textTitleLevel1).toHaveLength(14);
|
|
210
212
|
expect(textDescriptionLevel1).toHaveLength(14);
|
|
211
|
-
|
|
212
|
-
expect(tree.toJSON()).toMatchSnapshot();
|
|
213
213
|
});
|
|
214
214
|
});
|
|
@@ -313,6 +313,7 @@
|
|
|
313
313
|
"camera": "Camera",
|
|
314
314
|
"favorites": "Favorites",
|
|
315
315
|
"add_to_favorites": "Add to Favorites",
|
|
316
|
+
"remove_from_favorites": "Remove from Favorites",
|
|
316
317
|
"add_new_device": "Add new device",
|
|
317
318
|
"add_new_device_message_no_unit": "You cannot add new device. You have to add a new unit first.",
|
|
318
319
|
"add_member": "Add member",
|
|
@@ -704,10 +705,8 @@
|
|
|
704
705
|
"device_info": "Device Info",
|
|
705
706
|
"battery": "Battery capacity",
|
|
706
707
|
"voltage": "Voltage",
|
|
707
|
-
"how_to_start": "How to start",
|
|
708
708
|
"temperature": "Temperature",
|
|
709
709
|
"rssi_board": "RSSI Board",
|
|
710
|
-
"tap_to_run": "Tap to run",
|
|
711
710
|
"request_fail": "Request fail",
|
|
712
711
|
"modbus_fail": "Modbus failrate",
|
|
713
712
|
"rssi_node": "RSSI Node",
|
|
@@ -730,7 +729,15 @@
|
|
|
730
729
|
"continue": "Continue",
|
|
731
730
|
"tap_to_run": "Tap to run",
|
|
732
731
|
"how_to_start": "How to start",
|
|
732
|
+
"set_up {name}": "Setup {name}",
|
|
733
|
+
"action": "Action",
|
|
733
734
|
"actions_list": "Actions list",
|
|
735
|
+
"delette_action": "Delete action?",
|
|
736
|
+
"message_delete_action": "Are you sure you want to delete action of \n{actionName} in {stationName}?",
|
|
737
|
+
"add_script": "Add Script",
|
|
734
738
|
"go_to_automate_scripts": "Go to automate scripts",
|
|
739
|
+
"Script": "Script",
|
|
740
|
+
"create_smart": "Create Smart",
|
|
741
|
+
"choose_the_automation_method_you_want": "Choose the automation method you want",
|
|
735
742
|
"error_please_try_later": "Error! Please try later"
|
|
736
743
|
}
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"text_new_unit": "Địa điểm",
|
|
67
67
|
"text_sub_units": "Khu vực",
|
|
68
68
|
"edit_actions_list": "Chỉnh sửa danh sách hành động",
|
|
69
|
-
"des_edit_actions_list": "
|
|
69
|
+
"des_edit_actions_list": "Bấm vào số đơn hàng để sắp xếp lại đơn hàng tự động",
|
|
70
70
|
"sub_unit": "Khu vực",
|
|
71
71
|
"sub_units": "Khu vực",
|
|
72
72
|
"device": "Thiết bị",
|
|
@@ -346,6 +346,7 @@
|
|
|
346
346
|
"camera": "Camera",
|
|
347
347
|
"favorites": "Yêu thích",
|
|
348
348
|
"add_to_favorites": "Thêm vào yêu thích",
|
|
349
|
+
"remove_from_favorites": "Loại khỏi yêu thích",
|
|
349
350
|
"add_new_device": "Thêm thiết bị",
|
|
350
351
|
"add_new_device_message_no_unit": "Để thêm thiết bị mới, trước tiên bạn cần tạo một địa điểm.",
|
|
351
352
|
"add_member": "Thêm thành viên",
|
|
@@ -699,7 +700,6 @@
|
|
|
699
700
|
"station_name": "Tên station",
|
|
700
701
|
"unit_name": "Tên địa điểm",
|
|
701
702
|
"location": "Vị trí",
|
|
702
|
-
"tap_to_run": "Nhấn để chạy",
|
|
703
703
|
"manage_sub_units": "Quản lý khu vực",
|
|
704
704
|
"unit_wallpaper": "Hình nền địa điểm",
|
|
705
705
|
"tap_to_change": "Nhấn để thay đổi",
|
|
@@ -709,7 +709,6 @@
|
|
|
709
709
|
"battery": "Dung lượng pin",
|
|
710
710
|
"voltage": "Điện áp",
|
|
711
711
|
"temperature": "Nhiệt độ",
|
|
712
|
-
"how_to_start": "Cách bắt đầu",
|
|
713
712
|
"rssi_board": "RSSI Board",
|
|
714
713
|
"request_fail": "Request fail",
|
|
715
714
|
"modbus_fail": "Modbus failrate",
|
|
@@ -731,7 +730,15 @@
|
|
|
731
730
|
"continue": "Tiếp tục",
|
|
732
731
|
"tap_to_run": "Nhấn để chạy",
|
|
733
732
|
"how_to_start": "Cách khởi động",
|
|
733
|
+
"set_up {name}": "Thiết lập {name}",
|
|
734
|
+
"action": "Hành động",
|
|
734
735
|
"actions_list": "Dánh sách hành động",
|
|
736
|
+
"delette_action": "Xoá hành động ?",
|
|
737
|
+
"message_delete_action": "Bạn có chắc chắn muốn xóa hành động của {actionName} trong {stationName} không ?",
|
|
738
|
+
"add_script": "Thêm Kịch Bản",
|
|
735
739
|
"go_to_automate_scripts": "Đi đến kịch bản tự động",
|
|
740
|
+
"Script": "Kịch bản",
|
|
741
|
+
"create_smart": "Tạo thông minh",
|
|
742
|
+
"choose_the_automation_method_you_want": "Chọn phương thức tự động hóa mà bạn mong muốn",
|
|
736
743
|
"error_please_try_later": "Lỗi! Vui lòng thử lại sau"
|
|
737
744
|
}
|
package/src/utils/Route/index.js
CHANGED
|
@@ -94,14 +94,15 @@ const Routes = {
|
|
|
94
94
|
TermAndPolicy: 'TermAndPolicy',
|
|
95
95
|
Browser: 'Browser',
|
|
96
96
|
ManageAccess: 'ManageAccess',
|
|
97
|
-
AddNewActionStack: 'AddNewActionStack',
|
|
98
97
|
SelectDevice: 'SelectDevice',
|
|
98
|
+
SelectAction: 'SelectAction',
|
|
99
99
|
GuestInfo: 'GuestInfo',
|
|
100
100
|
AddLGDevice: 'AddLGDevice',
|
|
101
101
|
AddLGDeviceStack: 'AddLGDeviceStack',
|
|
102
|
-
ScriptDetail: '
|
|
102
|
+
ScriptDetail: 'ScriptDetail',
|
|
103
103
|
EditActionsList: 'EditActionsList',
|
|
104
104
|
PlaybackCamera: 'PlaybackCamera',
|
|
105
|
+
AddNewAutoSmart: 'AddNewAutoSmart',
|
|
105
106
|
AllCamera: 'AllCamera',
|
|
106
107
|
AddNewOneTap: 'AddNewOneTap',
|
|
107
108
|
AddNewScriptAction: 'AddNewScriptAction',
|
package/assets/images/Event.svg
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M30.4995 0H15.4991L9.50098 21.5962H15.5113L10.4009 40H12.2012L29.5983 18.4029H20.785L30.4995 0Z" fill="url(#paint0_linear)"/>
|
|
3
|
-
<defs>
|
|
4
|
-
<linearGradient id="paint0_linear" x1="9.50098" y1="0" x2="42.409" y2="17.2947" gradientUnits="userSpaceOnUse">
|
|
5
|
-
<stop stop-color="#2B6B9F"/>
|
|
6
|
-
<stop offset="1" stop-color="#D5FFCB"/>
|
|
7
|
-
</linearGradient>
|
|
8
|
-
</defs>
|
|
9
|
-
</svg>
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`Test chart loading create chart loading 1`] = `
|
|
4
|
-
<RNSVGSvgView
|
|
5
|
-
bbHeight={300}
|
|
6
|
-
bbWidth="100%"
|
|
7
|
-
focusable={false}
|
|
8
|
-
height={300}
|
|
9
|
-
style={
|
|
10
|
-
Array [
|
|
11
|
-
Object {
|
|
12
|
-
"backgroundColor": "transparent",
|
|
13
|
-
"borderWidth": 0,
|
|
14
|
-
},
|
|
15
|
-
Object {
|
|
16
|
-
"flex": 0,
|
|
17
|
-
"height": 300,
|
|
18
|
-
"width": "100%",
|
|
19
|
-
},
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
width="100%"
|
|
23
|
-
>
|
|
24
|
-
<RNSVGGroup>
|
|
25
|
-
<RNSVGText
|
|
26
|
-
content={null}
|
|
27
|
-
dx={Array []}
|
|
28
|
-
dy={Array []}
|
|
29
|
-
fill={4278190080}
|
|
30
|
-
font={
|
|
31
|
-
Object {
|
|
32
|
-
"fontSize": "20",
|
|
33
|
-
"fontWeight": "bold",
|
|
34
|
-
"textAnchor": "middle",
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
propList={
|
|
38
|
-
Array [
|
|
39
|
-
"fill",
|
|
40
|
-
]
|
|
41
|
-
}
|
|
42
|
-
rotate={Array []}
|
|
43
|
-
x={
|
|
44
|
-
Array [
|
|
45
|
-
"50%",
|
|
46
|
-
]
|
|
47
|
-
}
|
|
48
|
-
y={
|
|
49
|
-
Array [
|
|
50
|
-
"47%",
|
|
51
|
-
]
|
|
52
|
-
}
|
|
53
|
-
>
|
|
54
|
-
<RNSVGTSpan
|
|
55
|
-
content="loading"
|
|
56
|
-
dx={Array []}
|
|
57
|
-
dy={Array []}
|
|
58
|
-
font={Object {}}
|
|
59
|
-
rotate={Array []}
|
|
60
|
-
x={Array []}
|
|
61
|
-
y={Array []}
|
|
62
|
-
/>
|
|
63
|
-
</RNSVGText>
|
|
64
|
-
</RNSVGGroup>
|
|
65
|
-
</RNSVGSvgView>
|
|
66
|
-
`;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import renderer from 'react-test-renderer';
|
|
3
|
-
import HistoryChart from '../../HistoryChart';
|
|
4
|
-
|
|
5
|
-
describe('Test HistoryChart', () => {
|
|
6
|
-
beforeAll(() => {
|
|
7
|
-
Date.now = jest.fn(() => new Date('2021-01-24T12:00:00.000Z'));
|
|
8
|
-
});
|
|
9
|
-
test('render HistoryChart line_chart', () => {
|
|
10
|
-
const datas = [
|
|
11
|
-
{
|
|
12
|
-
id: 1,
|
|
13
|
-
title: 'title',
|
|
14
|
-
color: 'red',
|
|
15
|
-
data: [
|
|
16
|
-
[1, 2],
|
|
17
|
-
[2, 3],
|
|
18
|
-
],
|
|
19
|
-
},
|
|
20
|
-
];
|
|
21
|
-
const render = renderer
|
|
22
|
-
.create(
|
|
23
|
-
<HistoryChart
|
|
24
|
-
configuration={{ type: 'line_chart' }}
|
|
25
|
-
datas={datas}
|
|
26
|
-
setStartDate={Date.now()}
|
|
27
|
-
setEndDate={Date.now()}
|
|
28
|
-
/>
|
|
29
|
-
)
|
|
30
|
-
.toJSON();
|
|
31
|
-
expect(render).toMatchSnapshot();
|
|
32
|
-
});
|
|
33
|
-
test('render HistoryChart horizontal_bar_chart', () => {
|
|
34
|
-
const datas = [
|
|
35
|
-
{
|
|
36
|
-
id: 1,
|
|
37
|
-
title: 'title',
|
|
38
|
-
color: 'red',
|
|
39
|
-
data: [
|
|
40
|
-
[1, 2],
|
|
41
|
-
[2, 3],
|
|
42
|
-
],
|
|
43
|
-
},
|
|
44
|
-
];
|
|
45
|
-
const render = renderer
|
|
46
|
-
.create(
|
|
47
|
-
<HistoryChart
|
|
48
|
-
configuration={{ type: 'horizontal_bar_chart' }}
|
|
49
|
-
datas={datas}
|
|
50
|
-
setStartDate={Date.now}
|
|
51
|
-
setEndDate={Date.now}
|
|
52
|
-
/>
|
|
53
|
-
)
|
|
54
|
-
.toJSON();
|
|
55
|
-
expect(render).toMatchSnapshot();
|
|
56
|
-
});
|
|
57
|
-
});
|