@nordicsemiconductor/pc-nrfconnect-shared 60.0.0-pre1 → 60.0.0-pre2
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/dist/bootstrap.css +8951 -0
- package/dist/index.css +1451 -0
- package/dist/index.js +122119 -0
- package/{src/Logo/nordic-logo-blue-icon-only.png → dist/nordic-logo-blue-icon-only-H7BABN6D.png} +0 -0
- package/{src/Logo/nordic-logo-gray-icon-only.png → dist/nordic-logo-gray-icon-only-GATOTR3L.png} +0 -0
- package/package.json +12 -3
- package/typings/generated/src/Device/deviceInfo/deviceInfo.d.ts +1 -2
- package/.github/ISSUE_TEMPLATE/custom.md +0 -10
- package/.husky/pre-push +0 -3
- package/.renovaterc.json +0 -10
- package/Changelog.md +0 -2973
- package/azure-pipelines.yml +0 -34
- package/config/eslintrc.js +0 -190
- package/config/jest.config.js +0 -41
- package/config/prettier.config.js +0 -13
- package/config/tsconfig.json +0 -15
- package/fw/bootloader/graviton_bootloader_v1.0.1-[nRF5_SDK_15.0.1-1.alpha_f76d012].zip +0 -0
- package/jest.config.js +0 -7
- package/main/index.ts +0 -32
- package/mocks/deviceLibMock.ts +0 -21
- package/mocks/electronMock.ts +0 -15
- package/mocks/electronStoreMock.ts +0 -19
- package/mocks/emptyMock.ts +0 -7
- package/mocks/fileMock.ts +0 -13
- package/mocks/gaMock.ts +0 -9
- package/mocks/mockTests.test.ts +0 -15
- package/mocks/packageJsonMock.ts +0 -10
- package/mocks/remoteMock.ts +0 -17
- package/scripts/esbuild-bootstrap.js +0 -15
- package/scripts/esbuild-renderer.js +0 -131
- package/scripts/installHusky.ts +0 -17
- package/scripts/prepare-shared-release.ts +0 -122
- package/scripts/release-shared.test.ts +0 -132
- package/scripts/release-shared.ts +0 -207
- package/src/About/About.tsx +0 -25
- package/src/About/AboutButton.tsx +0 -28
- package/src/About/ApplicationCard.tsx +0 -83
- package/src/About/DeviceCard.tsx +0 -74
- package/src/About/DocumentationCard.tsx +0 -18
- package/src/About/DocumentationSection.tsx +0 -24
- package/src/About/Section.tsx +0 -21
- package/src/About/ShortcutButton.tsx +0 -41
- package/src/About/SupportCard.tsx +0 -97
- package/src/About/about.scss +0 -40
- package/src/About/documentationSlice.ts +0 -41
- package/src/About/section.scss +0 -15
- package/src/About/shortcutSlice.ts +0 -52
- package/src/Alert/Alert.module.scss +0 -29
- package/src/Alert/Alert.tsx +0 -37
- package/src/App/App.test.tsx +0 -47
- package/src/App/App.tsx +0 -227
- package/src/App/ConnectedToStore.tsx +0 -19
- package/src/App/VisibilityBar.tsx +0 -103
- package/src/App/app.scss +0 -83
- package/src/App/appLayout.ts +0 -95
- package/src/App/shared.scss +0 -49
- package/src/App/visibility-bar.scss +0 -55
- package/src/Button/Button.tsx +0 -66
- package/src/Button/button.module.scss +0 -154
- package/src/Card/Card.tsx +0 -26
- package/src/Card/card.module.scss +0 -28
- package/src/Device/BrokenDeviceDialog/BrokenDeviceDialog.tsx +0 -58
- package/src/Device/BrokenDeviceDialog/broken-device-dialog.scss +0 -18
- package/src/Device/BrokenDeviceDialog/brokenDeviceDialogSlice.tsx +0 -48
- package/src/Device/DeviceSelector/BasicDeviceInfo.tsx +0 -115
- package/src/Device/DeviceSelector/DeviceIcon.tsx +0 -27
- package/src/Device/DeviceSelector/DeviceList/AnimatedList.tsx +0 -62
- package/src/Device/DeviceSelector/DeviceList/BrokenDevice.tsx +0 -34
- package/src/Device/DeviceSelector/DeviceList/Device.tsx +0 -84
- package/src/Device/DeviceSelector/DeviceList/DeviceList.tsx +0 -113
- package/src/Device/DeviceSelector/DeviceList/EditDeviceButtons.tsx +0 -28
- package/src/Device/DeviceSelector/DeviceList/MoreDeviceInfo.tsx +0 -65
- package/src/Device/DeviceSelector/DeviceList/RenameDevice.tsx +0 -22
- package/src/Device/DeviceSelector/DeviceList/broken-device.scss +0 -32
- package/src/Device/DeviceSelector/DeviceList/device-list.scss +0 -64
- package/src/Device/DeviceSelector/DeviceList/device.scss +0 -28
- package/src/Device/DeviceSelector/DeviceList/edit-device-buttons.scss +0 -31
- package/src/Device/DeviceSelector/DeviceList/more-device-info.scss +0 -33
- package/src/Device/DeviceSelector/DeviceList/rename-device.scss +0 -13
- package/src/Device/DeviceSelector/DeviceSelector.test.tsx +0 -342
- package/src/Device/DeviceSelector/DeviceSelector.tsx +0 -173
- package/src/Device/DeviceSelector/Favorite.tsx +0 -49
- package/src/Device/DeviceSelector/SelectDevice.tsx +0 -36
- package/src/Device/DeviceSelector/SelectedDevice.tsx +0 -65
- package/src/Device/DeviceSelector/arrow-down.svg +0 -1
- package/src/Device/DeviceSelector/basic-device-info.scss +0 -62
- package/src/Device/DeviceSelector/device-icon.scss +0 -27
- package/src/Device/DeviceSelector/favorite.scss +0 -17
- package/src/Device/DeviceSelector/select-device.scss +0 -38
- package/src/Device/DeviceSelector/selected-device.scss +0 -57
- package/src/Device/DeviceSetup/DeviceSetupView.tsx +0 -102
- package/src/Device/deviceAutoSelectSlice.ts +0 -144
- package/src/Device/deviceInfo/deviceInfo.ts +0 -254
- package/src/Device/deviceInfo/nRF51-Series-logo.svg +0 -1
- package/src/Device/deviceInfo/nRF52-Series-logo.svg +0 -1
- package/src/Device/deviceInfo/nRF53-Series-logo.svg +0 -1
- package/src/Device/deviceInfo/nRF70-Series_no-background_RGB.svg +0 -36
- package/src/Device/deviceInfo/nRF91-Series-logo.svg +0 -1
- package/src/Device/deviceInfo/ppk-logo.svg +0 -1
- package/src/Device/deviceInfo/unknown-logo.svg +0 -30
- package/src/Device/deviceInfo/unknown-nordic-logo.svg +0 -25
- package/src/Device/deviceLibWrapper.test.ts +0 -97
- package/src/Device/deviceLibWrapper.ts +0 -133
- package/src/Device/deviceLister.test.ts +0 -89
- package/src/Device/deviceLister.ts +0 -396
- package/src/Device/deviceSetup.ts +0 -264
- package/src/Device/deviceSetupSlice.ts +0 -94
- package/src/Device/deviceSlice.ts +0 -248
- package/src/Device/dfu-cc.ts +0 -162
- package/src/Device/initPacket.ts +0 -402
- package/src/Device/jprogOperations.ts +0 -206
- package/src/Device/sdfuOperations.ts +0 -601
- package/src/Dialog/Dialog.test.tsx +0 -134
- package/src/Dialog/Dialog.tsx +0 -236
- package/src/Dialog/dialog.scss +0 -60
- package/src/Dropdown/Dropdown.module.scss +0 -83
- package/src/Dropdown/Dropdown.test.tsx +0 -62
- package/src/Dropdown/Dropdown.tsx +0 -106
- package/src/ErrorBoundary/ErrorBoundary.test.tsx +0 -105
- package/src/ErrorBoundary/ErrorBoundary.tsx +0 -186
- package/src/ErrorBoundary/bug.svg +0 -1
- package/src/ErrorBoundary/error-boundary.scss +0 -102
- package/src/ErrorDialog/ErrorDialog.test.tsx +0 -70
- package/src/ErrorDialog/ErrorDialog.tsx +0 -94
- package/src/ErrorDialog/error.scss +0 -14
- package/src/ErrorDialog/errorDialogSlice.test.ts +0 -64
- package/src/ErrorDialog/errorDialogSlice.ts +0 -80
- package/src/FactoryReset/FactoryResetButton.test.tsx +0 -46
- package/src/FactoryReset/FactoryResetButton.tsx +0 -81
- package/src/InlineInput/InlineInput.tsx +0 -170
- package/src/InlineInput/NumberInlineInput.tsx +0 -107
- package/src/InlineInput/inline-input.scss +0 -38
- package/src/InlineInput/number-inline-input.scss +0 -15
- package/src/Log/LogEntry.tsx +0 -62
- package/src/Log/LogViewer.tsx +0 -54
- package/src/Log/log-entry.scss +0 -30
- package/src/Log/log-viewer.scss +0 -24
- package/src/Log/logSlice.ts +0 -73
- package/src/Log/syncLogToStore.ts +0 -36
- package/src/Logo/Logo.tsx +0 -48
- package/src/Logo/logo.scss +0 -11
- package/src/Main/Main.tsx +0 -13
- package/src/Main/main.scss +0 -13
- package/src/MasonryLayout/MasonryLayout.tsx +0 -234
- package/src/MasonryLayout/masonryLayout.module.scss +0 -46
- package/src/NavBar/NavBar.tsx +0 -22
- package/src/NavBar/NavMenu.test.tsx +0 -41
- package/src/NavBar/NavMenu.tsx +0 -53
- package/src/NavBar/NavMenuItem.tsx +0 -41
- package/src/NavBar/nav-bar.scss +0 -26
- package/src/NavBar/nav-menu-item.scss +0 -34
- package/src/OpenApp/openApp.ts +0 -18
- package/src/Panes/FeedbackPane.tsx +0 -149
- package/src/PseudoButton/PseudoButton.tsx +0 -56
- package/src/PseudoButton/pseudo-button.scss +0 -11
- package/src/SerialPort/ConflictingSettingsDialog.tsx +0 -242
- package/src/SerialPort/SerialPort.test.ts +0 -54
- package/src/SerialPort/SerialPort.ts +0 -202
- package/src/Shortcuts/Shortcut-item.scss +0 -33
- package/src/Shortcuts/Shortcut-modal.scss +0 -20
- package/src/Shortcuts/ShortcutItem.tsx +0 -48
- package/src/Shortcuts/ShortcutModal.tsx +0 -67
- package/src/SidePanel/Group.tsx +0 -106
- package/src/SidePanel/SidePanel.tsx +0 -19
- package/src/SidePanel/group.scss +0 -42
- package/src/SidePanel/sidepanel.scss +0 -20
- package/src/Slider/Bar.tsx +0 -24
- package/src/Slider/Factor.test.ts +0 -48
- package/src/Slider/Handle.tsx +0 -121
- package/src/Slider/Slider.test.tsx +0 -25
- package/src/Slider/Slider.tsx +0 -91
- package/src/Slider/Ticks.tsx +0 -54
- package/src/Slider/__snapshots__/Slider.test.tsx.snap +0 -50
- package/src/Slider/bar.scss +0 -24
- package/src/Slider/factor.ts +0 -24
- package/src/Slider/handle.scss +0 -32
- package/src/Slider/percentage.ts +0 -67
- package/src/Slider/range.ts +0 -92
- package/src/Slider/slider.scss +0 -14
- package/src/Slider/ticks.scss +0 -28
- package/src/Slider/variables.scss +0 -16
- package/src/StartStopButton/StartStopButton.tsx +0 -60
- package/src/StartStopButton/play-circle.svg +0 -1
- package/src/StartStopButton/start-stop-button.scss +0 -47
- package/src/StartStopButton/stop-circle.svg +0 -1
- package/src/StateSelector/StateSelector.tsx +0 -64
- package/src/StateSelector/state-selector.scss +0 -38
- package/src/Stepper/Stepper.tsx +0 -139
- package/src/Stepper/stepper.scss +0 -127
- package/src/Toggle/Toggle.tsx +0 -120
- package/src/Toggle/toggle.scss +0 -109
- package/src/bootstrap.scss +0 -14
- package/src/index.ts +0 -146
- package/src/logging/appTransport.test.ts +0 -78
- package/src/logging/appTransport.ts +0 -41
- package/src/logging/describeError.test.ts +0 -38
- package/src/logging/describeError.ts +0 -56
- package/src/logging/index.ts +0 -103
- package/src/logging/logBuffer.test.ts +0 -41
- package/src/logging/logBuffer.ts +0 -24
- package/src/logging/sendInitialLogMessages.ts +0 -64
- package/src/store.ts +0 -60
- package/src/svg.d.ts +0 -15
- package/src/utils/AppTypes.ts +0 -60
- package/src/utils/appDirs.ts +0 -78
- package/src/utils/bleChannels.ts +0 -16
- package/src/utils/classNames.test.ts +0 -29
- package/src/utils/classNames.ts +0 -25
- package/src/utils/colors.scss +0 -46
- package/src/utils/colors.ts +0 -38
- package/src/utils/describeVersion.ts +0 -21
- package/src/utils/environment.ts +0 -6
- package/src/utils/logLibVersions.ts +0 -103
- package/src/utils/open.ts +0 -46
- package/src/utils/packageJson.ts +0 -60
- package/src/utils/persistentStore.ts +0 -144
- package/src/utils/systemReport.ts +0 -160
- package/src/utils/truncateMiddle.test.ts +0 -21
- package/src/utils/truncateMiddle.ts +0 -20
- package/src/utils/usageData.ts +0 -189
- package/src/utils/useHotKey.ts +0 -62
- package/src/utils/useStopwatch.test.tsx +0 -311
- package/src/utils/useStopwatch.ts +0 -140
- package/src/variables.scss +0 -820
- package/styles.scss +0 -88
- package/test/dispatchTo.ts +0 -23
- package/test/index.ts +0 -7
- package/test/jestResolver.js +0 -28
- package/test/setupTests.ts +0 -27
- package/test/testUtil.ts +0 -20
- package/test/testrenderer.tsx +0 -39
- /package/{src/Logo/nordic-logo-white-icon-only.png → dist/nordic-logo-white-icon-only-XIZBW537.png} +0 -0
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2015 Nordic Semiconductor ASA
|
|
3
|
-
*
|
|
4
|
-
* SPDX-License-Identifier: LicenseRef-Nordic-4-Clause
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import React from 'react';
|
|
8
|
-
import { useDispatch, useSelector } from 'react-redux';
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
autoScroll as autoScrollSelector,
|
|
12
|
-
clear,
|
|
13
|
-
toggleAutoScroll,
|
|
14
|
-
} from '../Log/logSlice';
|
|
15
|
-
import logger from '../logging';
|
|
16
|
-
import { Toggle } from '../Toggle/Toggle';
|
|
17
|
-
import useHotKey from '../utils/useHotKey';
|
|
18
|
-
import {
|
|
19
|
-
isLogVisible as isLogVisibleSelector,
|
|
20
|
-
isSidePanelVisible as isSidePanelVisibleSelector,
|
|
21
|
-
toggleLogVisible,
|
|
22
|
-
toggleSidePanelVisible,
|
|
23
|
-
} from './appLayout';
|
|
24
|
-
|
|
25
|
-
import './visibility-bar.scss';
|
|
26
|
-
|
|
27
|
-
export default ({ isSidePanelEnabled }: { isSidePanelEnabled: boolean }) => {
|
|
28
|
-
const dispatch = useDispatch();
|
|
29
|
-
const isSidePanelVisible = useSelector(isSidePanelVisibleSelector);
|
|
30
|
-
const isLogVisible = useSelector(isLogVisibleSelector);
|
|
31
|
-
const autoScroll = useSelector(autoScrollSelector);
|
|
32
|
-
|
|
33
|
-
useHotKey({
|
|
34
|
-
hotKey: ['ctrl+p', 'ctrl+n'],
|
|
35
|
-
title: 'Show side panel',
|
|
36
|
-
isGlobal: true,
|
|
37
|
-
action: () => dispatch(toggleSidePanelVisible()),
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
useHotKey({
|
|
41
|
-
hotKey: 'ctrl+d',
|
|
42
|
-
title: 'Clear log',
|
|
43
|
-
isGlobal: true,
|
|
44
|
-
action: () => dispatch(clear()),
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
useHotKey({
|
|
48
|
-
hotKey: 'ctrl+l',
|
|
49
|
-
title: 'Show log',
|
|
50
|
-
isGlobal: true,
|
|
51
|
-
action: () => dispatch(toggleLogVisible()),
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
return (
|
|
55
|
-
<div className="core19-visibility-bar">
|
|
56
|
-
{isSidePanelEnabled && (
|
|
57
|
-
<div className="core19-visibility-bar-show-side-panel">
|
|
58
|
-
<Toggle
|
|
59
|
-
id="visibility-bar-show-side-panel"
|
|
60
|
-
label="Show side panel"
|
|
61
|
-
title="ctrl+p or ctr+n"
|
|
62
|
-
onToggle={() => dispatch(toggleSidePanelVisible())}
|
|
63
|
-
isToggled={isSidePanelVisible}
|
|
64
|
-
variant="primary"
|
|
65
|
-
/>
|
|
66
|
-
</div>
|
|
67
|
-
)}
|
|
68
|
-
<div className="core19-visibility-bar-show-log">
|
|
69
|
-
<button
|
|
70
|
-
type="button"
|
|
71
|
-
title="ctrl+d"
|
|
72
|
-
className="log-button"
|
|
73
|
-
onClick={() => dispatch(clear())}
|
|
74
|
-
>
|
|
75
|
-
Clear log
|
|
76
|
-
</button>
|
|
77
|
-
<button
|
|
78
|
-
type="button"
|
|
79
|
-
className="log-button"
|
|
80
|
-
onClick={logger.openLogFile}
|
|
81
|
-
>
|
|
82
|
-
Open log file
|
|
83
|
-
</button>
|
|
84
|
-
<div className="flex-grow-1" />
|
|
85
|
-
<Toggle
|
|
86
|
-
id="autoscroll-log"
|
|
87
|
-
label="Autoscroll log"
|
|
88
|
-
onToggle={() => dispatch(toggleAutoScroll())}
|
|
89
|
-
isToggled={autoScroll}
|
|
90
|
-
variant="secondary"
|
|
91
|
-
/>
|
|
92
|
-
<Toggle
|
|
93
|
-
id="visibility-bar-show-log"
|
|
94
|
-
label="Show log"
|
|
95
|
-
title="ctrl+l"
|
|
96
|
-
onToggle={() => dispatch(toggleLogVisible())}
|
|
97
|
-
isToggled={isLogVisible}
|
|
98
|
-
variant="secondary"
|
|
99
|
-
/>
|
|
100
|
-
</div>
|
|
101
|
-
</div>
|
|
102
|
-
);
|
|
103
|
-
};
|
package/src/App/app.scss
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2021 Nordic Semiconductor ASA
|
|
3
|
-
*
|
|
4
|
-
* SPDX-License-Identifier: LicenseRef-Nordic-4-Clause
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
@import '../variables';
|
|
8
|
-
|
|
9
|
-
.core19-app {
|
|
10
|
-
background-color: $gray-50;
|
|
11
|
-
width: 100%;
|
|
12
|
-
height: 100%;
|
|
13
|
-
display: flex;
|
|
14
|
-
flex-flow: column;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.core19-app-content {
|
|
18
|
-
display: flex;
|
|
19
|
-
flex-flow: row;
|
|
20
|
-
height: calc(100% - #{$nav-bar-height + $visibility-bar-height});
|
|
21
|
-
|
|
22
|
-
.core19-main-and-log {
|
|
23
|
-
flex: 1;
|
|
24
|
-
display: flex;
|
|
25
|
-
flex-flow: column;
|
|
26
|
-
min-width: 0;
|
|
27
|
-
position: relative;
|
|
28
|
-
background-color: $gray-100;
|
|
29
|
-
|
|
30
|
-
.core19-main-container {
|
|
31
|
-
flex: 1;
|
|
32
|
-
overflow: auto;
|
|
33
|
-
|
|
34
|
-
.carousel-inner {
|
|
35
|
-
height: 100%;
|
|
36
|
-
padding: 16px;
|
|
37
|
-
|
|
38
|
-
overflow-y: overlay;
|
|
39
|
-
@include scrollbars($gray-100);
|
|
40
|
-
|
|
41
|
-
.carousel-item {
|
|
42
|
-
height: 100%;
|
|
43
|
-
transition: opacity $normal-transition;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.core19-log-viewer {
|
|
49
|
-
background-color: $gray-900;
|
|
50
|
-
color: $gray-400;
|
|
51
|
-
|
|
52
|
-
overflow: hidden;
|
|
53
|
-
width: 100%;
|
|
54
|
-
|
|
55
|
-
max-height: $log-viewer-height;
|
|
56
|
-
transition: max-height $normal-transition;
|
|
57
|
-
|
|
58
|
-
&.hidden {
|
|
59
|
-
max-height: 0;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
&:hover {
|
|
63
|
-
color: $gray-100;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.core19-side-panel-container {
|
|
69
|
-
width: $side-panel-width;
|
|
70
|
-
padding: 0 24px;
|
|
71
|
-
background-color: $gray-50;
|
|
72
|
-
height: 100%;
|
|
73
|
-
margin-left: 0;
|
|
74
|
-
transition: margin-left $normal-transition;
|
|
75
|
-
|
|
76
|
-
&.hidden {
|
|
77
|
-
margin-left: -$side-panel-width;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
overflow-y: overlay;
|
|
81
|
-
@include scrollbars($gray-50);
|
|
82
|
-
}
|
|
83
|
-
}
|
package/src/App/appLayout.ts
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2021 Nordic Semiconductor ASA
|
|
3
|
-
*
|
|
4
|
-
* SPDX-License-Identifier: LicenseRef-Nordic-4-Clause
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { createSlice, PayloadAction } from '@reduxjs/toolkit';
|
|
8
|
-
|
|
9
|
-
import type { RootState } from '../store';
|
|
10
|
-
import { persistCurrentPane } from '../utils/persistentStore';
|
|
11
|
-
|
|
12
|
-
export interface AppLayout {
|
|
13
|
-
isSidePanelVisible: boolean;
|
|
14
|
-
isLogVisible: boolean;
|
|
15
|
-
currentPane: number;
|
|
16
|
-
paneNames: string[];
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const initialState: AppLayout = {
|
|
20
|
-
isSidePanelVisible: true,
|
|
21
|
-
isLogVisible: true,
|
|
22
|
-
currentPane: 0,
|
|
23
|
-
paneNames: [],
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const isAboutPane = (pane: number, paneCount: number) => pane === paneCount - 1;
|
|
27
|
-
|
|
28
|
-
const setCurrentPaneInState = (newPane: number, state: AppLayout) => {
|
|
29
|
-
if (!isAboutPane(newPane, state.paneNames.length)) {
|
|
30
|
-
persistCurrentPane(newPane);
|
|
31
|
-
}
|
|
32
|
-
state.currentPane = newPane;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
interface PaneSpec {
|
|
36
|
-
name: string;
|
|
37
|
-
Main: unknown;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const slice = createSlice({
|
|
41
|
-
name: 'appLayout',
|
|
42
|
-
initialState,
|
|
43
|
-
reducers: {
|
|
44
|
-
toggleLogVisible: state => {
|
|
45
|
-
state.isLogVisible = !state.isLogVisible;
|
|
46
|
-
},
|
|
47
|
-
toggleSidePanelVisible: state => {
|
|
48
|
-
state.isSidePanelVisible = !state.isSidePanelVisible;
|
|
49
|
-
},
|
|
50
|
-
setCurrentPane: (
|
|
51
|
-
state,
|
|
52
|
-
{ payload: newPane }: PayloadAction<number>
|
|
53
|
-
) => {
|
|
54
|
-
setCurrentPaneInState(newPane, state);
|
|
55
|
-
},
|
|
56
|
-
setPanes: (state, action: PayloadAction<PaneSpec[]>) => {
|
|
57
|
-
state.paneNames = action.payload.map(pane => pane.name);
|
|
58
|
-
},
|
|
59
|
-
switchToNextPane: state => {
|
|
60
|
-
setCurrentPaneInState(
|
|
61
|
-
(state.currentPane + 1) % state.paneNames.length,
|
|
62
|
-
state
|
|
63
|
-
);
|
|
64
|
-
},
|
|
65
|
-
switchToPreviousPane: state => {
|
|
66
|
-
let nextPane = state.currentPane - 1;
|
|
67
|
-
if (nextPane < 0) {
|
|
68
|
-
nextPane = state.paneNames.length - 1;
|
|
69
|
-
}
|
|
70
|
-
setCurrentPaneInState(nextPane, state);
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
export const {
|
|
76
|
-
reducer,
|
|
77
|
-
actions: {
|
|
78
|
-
setCurrentPane,
|
|
79
|
-
setPanes,
|
|
80
|
-
toggleLogVisible,
|
|
81
|
-
toggleSidePanelVisible,
|
|
82
|
-
switchToNextPane,
|
|
83
|
-
switchToPreviousPane,
|
|
84
|
-
},
|
|
85
|
-
} = slice;
|
|
86
|
-
|
|
87
|
-
export const isSidePanelVisible = (state: RootState) =>
|
|
88
|
-
state.appLayout.isSidePanelVisible;
|
|
89
|
-
export const isLogVisible = (state: RootState) => state.appLayout.isLogVisible;
|
|
90
|
-
export const paneNames = (state: RootState) => state.appLayout.paneNames;
|
|
91
|
-
|
|
92
|
-
export const currentPane = ({ appLayout }: RootState) =>
|
|
93
|
-
appLayout.currentPane >= appLayout.paneNames.length
|
|
94
|
-
? 0
|
|
95
|
-
: appLayout.currentPane;
|
package/src/App/shared.scss
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2021 Nordic Semiconductor ASA
|
|
3
|
-
*
|
|
4
|
-
* SPDX-License-Identifier: LicenseRef-Nordic-4-Clause
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
@import '../variables';
|
|
8
|
-
|
|
9
|
-
html,
|
|
10
|
-
body,
|
|
11
|
-
#webapp {
|
|
12
|
-
height: 100%;
|
|
13
|
-
|
|
14
|
-
.core19-app {
|
|
15
|
-
@include scrollbars($white);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
body {
|
|
20
|
-
-webkit-user-select: none;
|
|
21
|
-
-webkit-app-region: drag;
|
|
22
|
-
cursor: default;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.modal-content {
|
|
26
|
-
border-radius: 0px;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.disabled,
|
|
30
|
-
:disabled {
|
|
31
|
-
opacity: $disabled-opacity !important;
|
|
32
|
-
|
|
33
|
-
// To prevent opacity from stacking up
|
|
34
|
-
.disabled,
|
|
35
|
-
:disabled {
|
|
36
|
-
opacity: 1;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// used when tabbing and space
|
|
41
|
-
:focus {
|
|
42
|
-
outline-color: $accent !important;
|
|
43
|
-
outline-width: 3px;
|
|
44
|
-
}
|
|
45
|
-
// focus-visible js polyfill, see: https://github.com/WICG/focus-visible
|
|
46
|
-
.js-focus-visible :focus:not(.focus-visible) {
|
|
47
|
-
outline: none !important;
|
|
48
|
-
box-shadow: none !important;
|
|
49
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2021 Nordic Semiconductor ASA
|
|
3
|
-
*
|
|
4
|
-
* SPDX-License-Identifier: LicenseRef-Nordic-4-Clause
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
@import '../variables';
|
|
8
|
-
|
|
9
|
-
.core19-visibility-bar {
|
|
10
|
-
display: flex;
|
|
11
|
-
height: $visibility-bar-height;
|
|
12
|
-
text-transform: uppercase;
|
|
13
|
-
font-size: 10px;
|
|
14
|
-
line-height: 1.9;
|
|
15
|
-
z-index: 1;
|
|
16
|
-
|
|
17
|
-
.toggle-label {
|
|
18
|
-
font-size: 10px;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.core19-visibility-bar-show-side-panel {
|
|
22
|
-
display: flex;
|
|
23
|
-
justify-content: flex-start;
|
|
24
|
-
align-items: center;
|
|
25
|
-
width: $side-panel-width;
|
|
26
|
-
color: $gray-700;
|
|
27
|
-
background-color: $gray-200;
|
|
28
|
-
padding-left: 24px;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.core19-visibility-bar-show-log {
|
|
32
|
-
flex-grow: 1;
|
|
33
|
-
color: $gray-100;
|
|
34
|
-
background-color: $gray-800;
|
|
35
|
-
padding-left: 16px;
|
|
36
|
-
padding-right: 16px;
|
|
37
|
-
text-align: right;
|
|
38
|
-
|
|
39
|
-
display: flex;
|
|
40
|
-
flex-direction: row;
|
|
41
|
-
align-items: center;
|
|
42
|
-
|
|
43
|
-
.log-button {
|
|
44
|
-
margin-right: 8px;
|
|
45
|
-
border: 0;
|
|
46
|
-
background-color: $gray-700;
|
|
47
|
-
color: $gray-200;
|
|
48
|
-
text-transform: inherit;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.toggle {
|
|
52
|
-
margin-left: 24px;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
package/src/Button/Button.tsx
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2022 Nordic Semiconductor ASA
|
|
3
|
-
*
|
|
4
|
-
* SPDX-License-Identifier: LicenseRef-Nordic-4-Clause
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import React from 'react';
|
|
8
|
-
|
|
9
|
-
import classNames from '../utils/classNames';
|
|
10
|
-
|
|
11
|
-
import styles from './button.module.scss';
|
|
12
|
-
|
|
13
|
-
export type ButtonVariants =
|
|
14
|
-
| 'primary'
|
|
15
|
-
| 'secondary'
|
|
16
|
-
| 'success'
|
|
17
|
-
| 'info'
|
|
18
|
-
| 'warning'
|
|
19
|
-
| 'danger'
|
|
20
|
-
| 'link'
|
|
21
|
-
| 'custom';
|
|
22
|
-
|
|
23
|
-
type ButtonProps = {
|
|
24
|
-
id?: string;
|
|
25
|
-
variant: ButtonVariants;
|
|
26
|
-
className?: string;
|
|
27
|
-
onClick: React.MouseEventHandler<HTMLButtonElement>;
|
|
28
|
-
disabled?: boolean;
|
|
29
|
-
title?: string;
|
|
30
|
-
large?: boolean;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
const Button: React.FC<ButtonProps> = ({
|
|
34
|
-
children,
|
|
35
|
-
id,
|
|
36
|
-
className,
|
|
37
|
-
variant,
|
|
38
|
-
onClick,
|
|
39
|
-
disabled = false,
|
|
40
|
-
title,
|
|
41
|
-
large = false,
|
|
42
|
-
}) => (
|
|
43
|
-
<button
|
|
44
|
-
type="button"
|
|
45
|
-
id={id}
|
|
46
|
-
className={classNames(
|
|
47
|
-
variant !== 'custom' && styles.button,
|
|
48
|
-
large && styles.large,
|
|
49
|
-
variant === 'primary' && styles.primary,
|
|
50
|
-
variant === 'secondary' && styles.secondary,
|
|
51
|
-
variant === 'success' && styles.success,
|
|
52
|
-
variant === 'info' && styles.info,
|
|
53
|
-
variant === 'warning' && styles.warning,
|
|
54
|
-
variant === 'danger' && styles.danger,
|
|
55
|
-
variant === 'link' && styles.link,
|
|
56
|
-
className
|
|
57
|
-
)}
|
|
58
|
-
disabled={disabled}
|
|
59
|
-
onClick={onClick}
|
|
60
|
-
title={title}
|
|
61
|
-
>
|
|
62
|
-
{children}
|
|
63
|
-
</button>
|
|
64
|
-
);
|
|
65
|
-
|
|
66
|
-
export default Button;
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2022 Nordic Semiconductor ASA
|
|
3
|
-
*
|
|
4
|
-
* SPDX-License-Identifier: LicenseRef-Nordic-4-Clause
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
@use 'sass:color';
|
|
8
|
-
@import '../variables.scss';
|
|
9
|
-
|
|
10
|
-
.button {
|
|
11
|
-
font-size: 12px;
|
|
12
|
-
line-height: 1em;
|
|
13
|
-
height: 24px;
|
|
14
|
-
border: 1px;
|
|
15
|
-
border-style: solid;
|
|
16
|
-
|
|
17
|
-
&.large {
|
|
18
|
-
height: 32px;
|
|
19
|
-
font-size: 14px;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
&.primary {
|
|
23
|
-
background-color: $btn-primary-bg;
|
|
24
|
-
color: $btn-primary-color;
|
|
25
|
-
border-color: $btn-primary-border;
|
|
26
|
-
|
|
27
|
-
&:hover:not([disabled]) {
|
|
28
|
-
color: $btn-primary-color;
|
|
29
|
-
background-color: $btn-primary-bg;
|
|
30
|
-
border-color: $btn-primary-border;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&:focus:not([disabled]) {
|
|
34
|
-
background-color: $btn-primary-bg;
|
|
35
|
-
border-color: $btn-primary-border !important;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&:active:not([disabled]) {
|
|
39
|
-
background-color: color.scale($btn-primary-bg, $lightness: -10%);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&.secondary {
|
|
44
|
-
color: $btn-secondary-color;
|
|
45
|
-
background-color: $btn-secondary-bg;
|
|
46
|
-
border-color: $btn-secondary-border;
|
|
47
|
-
|
|
48
|
-
&:hover:not([disabled]) {
|
|
49
|
-
color: $btn-secondary-color;
|
|
50
|
-
background-color: $btn-secondary-bg;
|
|
51
|
-
border-color: $btn-secondary-border;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
&:focus:not([disabled]) {
|
|
55
|
-
background-color: $btn-secondary-bg;
|
|
56
|
-
border-color: $btn-secondary-border !important;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
&:active:not([disabled]) {
|
|
60
|
-
background-color: color.scale($btn-secondary-bg, $lightness: -10%);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
&.success {
|
|
65
|
-
color: $btn-success-color;
|
|
66
|
-
background-color: $btn-success-bg;
|
|
67
|
-
border-color: $btn-success-border;
|
|
68
|
-
|
|
69
|
-
&:hover:not([disabled]) {
|
|
70
|
-
color: $btn-success-color;
|
|
71
|
-
background-color: $btn-success-bg;
|
|
72
|
-
border-color: $btn-success-border;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
&:focus:not([disabled]) {
|
|
76
|
-
background-color: $btn-success-bg;
|
|
77
|
-
border-color: $btn-success-border !important;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
&:active:not([disabled]) {
|
|
81
|
-
background-color: color.scale($btn-success-bg, $lightness: -10%);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
&.info {
|
|
86
|
-
color: $btn-info-color;
|
|
87
|
-
background-color: $btn-info-bg;
|
|
88
|
-
border-color: $btn-info-border;
|
|
89
|
-
|
|
90
|
-
&:hover:not([disabled]) {
|
|
91
|
-
color: $btn-info-color;
|
|
92
|
-
background-color: $btn-info-bg;
|
|
93
|
-
border-color: $btn-info-border;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
&:focus:not([disabled]) {
|
|
97
|
-
background-color: $btn-info-bg;
|
|
98
|
-
border-color: $btn-info-border !important;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
&:active:not([disabled]) {
|
|
102
|
-
background-color: color.scale($btn-info-bg, $lightness: -10%);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
&.warning {
|
|
107
|
-
color: $btn-warning-color;
|
|
108
|
-
background-color: $btn-warning-bg;
|
|
109
|
-
border-color: $btn-warning-border;
|
|
110
|
-
|
|
111
|
-
&:hover:not([disabled]) {
|
|
112
|
-
color: $btn-warning-color;
|
|
113
|
-
background-color: $btn-warning-bg;
|
|
114
|
-
border-color: $btn-warning-border;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
&:focus:not([disabled]) {
|
|
118
|
-
background-color: $btn-warning-bg;
|
|
119
|
-
border-color: $btn-warning-border !important;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
&:active:not([disabled]) {
|
|
123
|
-
background-color: color.scale($btn-warning-bg, $lightness: -10%);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
&.danger {
|
|
128
|
-
color: $btn-danger-color;
|
|
129
|
-
background-color: $btn-danger-bg;
|
|
130
|
-
border-color: $btn-danger-border;
|
|
131
|
-
|
|
132
|
-
&:hover:not([disabled]) {
|
|
133
|
-
color: $btn-danger-color;
|
|
134
|
-
background-color: $btn-danger-bg;
|
|
135
|
-
border-color: $btn-danger-border;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
&:focus:not([disabled]) {
|
|
139
|
-
background-color: $btn-danger-bg;
|
|
140
|
-
border-color: $btn-danger-border !important;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
&:active:not([disabled]) {
|
|
144
|
-
background-color: color.scale($btn-danger-bg, $lightness: -10%);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
&.link {
|
|
149
|
-
color: $nordic-blue;
|
|
150
|
-
padding: 0;
|
|
151
|
-
border: none;
|
|
152
|
-
background: none;
|
|
153
|
-
}
|
|
154
|
-
}
|
package/src/Card/Card.tsx
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2015 Nordic Semiconductor ASA
|
|
3
|
-
*
|
|
4
|
-
* SPDX-License-Identifier: LicenseRef-Nordic-4-Clause
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import React from 'react';
|
|
8
|
-
import Card from 'react-bootstrap/Card';
|
|
9
|
-
|
|
10
|
-
import styles from './card.module.scss';
|
|
11
|
-
|
|
12
|
-
type NrfCardProps = {
|
|
13
|
-
children: React.ReactNode;
|
|
14
|
-
title: React.ReactNode;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export default ({ children, title }: NrfCardProps) => (
|
|
18
|
-
<Card className={styles.card}>
|
|
19
|
-
<Card.Header className={styles.header}>
|
|
20
|
-
<Card.Title>
|
|
21
|
-
<span className={styles.title}>{title}</span>
|
|
22
|
-
</Card.Title>
|
|
23
|
-
</Card.Header>
|
|
24
|
-
<Card.Body className={styles.body}>{children}</Card.Body>
|
|
25
|
-
</Card>
|
|
26
|
-
);
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2021 Nordic Semiconductor ASA
|
|
3
|
-
*
|
|
4
|
-
* SPDX-License-Identifier: LicenseRef-Nordic-4-Clause
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
@import '../variables.scss';
|
|
8
|
-
|
|
9
|
-
.card {
|
|
10
|
-
flex: 1;
|
|
11
|
-
flex-shrink: 0;
|
|
12
|
-
padding: 16px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.header {
|
|
16
|
-
background-color: transparent !important;
|
|
17
|
-
text-align: center !important;
|
|
18
|
-
padding: 0.5em 0em 0em 0em !important;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.title {
|
|
22
|
-
float: inherit !important;
|
|
23
|
-
margin-bottom: 0px !important;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.body {
|
|
27
|
-
padding: 1em 0em 0em 0em !important;
|
|
28
|
-
}
|