@kvaser/canking-api 7.1.0-beta.231 → 7.1.0-beta.241
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 +101 -37
- package/dist/controls/CanIdentifierControl.d.ts +21 -3
- package/dist/controls/ColumnItemControl.d.ts +36 -0
- package/dist/controls/OneLineButton.d.ts +1 -1
- package/dist/controls/index.d.ts +2 -0
- package/dist/controls.js +1 -1
- package/dist/controls.mjs +1385 -1141
- package/dist/grpc.mjs +114 -114
- package/dist/index.js +1 -1
- package/dist/measurement_settings.js +1 -1
- package/dist/measurement_settings.mjs +449 -403
- package/dist/models.js +1 -1
- package/dist/models.mjs +30 -30
- package/dist/protos/app_service.d.ts +1 -1
- package/dist/protos/device_service.d.ts +1 -1
- package/dist/protos/frame_params.d.ts +6 -0
- package/dist/protos/measurement_service.d.ts +1 -1
- package/dist/status_params.js +1 -1
- package/dist/status_params.mjs +1780 -1780
- package/doc/assets/material-style.css +105 -14
- package/doc/assets/navigation.js +1 -1
- package/doc/assets/search.js +1 -1
- package/doc/functions/controls.ColumnItemControl.html +175 -0
- package/doc/functions/controls.OneLineButton.html +4 -4
- package/doc/functions/controls.useColumnItem.html +176 -0
- package/doc/functions/controls.useColumnItems.html +177 -0
- package/doc/index.html +87 -43
- package/doc/interfaces/controls.CanIdentifierFrameControlProps.html +4 -2
- package/doc/interfaces/controls.CanIdentifierGeneratorControlProps.html +6 -2
- package/doc/interfaces/controls.CanIdentifierGeneratorSettingsControlProps.html +6 -2
- package/doc/interfaces/controls.ColumnItemControlProps.html +177 -0
- package/doc/interfaces/models.SignalValue.html +4 -2
- package/doc/interfaces/models.WriteFrame.html +6 -2
- package/doc/modules/controls.html +4 -0
- package/index.js +14 -0
- package/licenses/ELECTRON-TOOLKIT-PRELOAD_MIT.TXT +21 -0
- package/licenses/FAST-DEEP-EQUAL_MIT.TXT +21 -0
- package/licenses/GOOGLE-PROTOBUF_(BSD-3-CLAUSE AND APACHE-2.0).TXT +29 -0
- package/licenses/REACT-DOM_MIT.TXT +21 -0
- package/licenses/REACT_MIT.TXT +21 -0
- package/licenses/UUID_MIT.TXT +9 -0
- package/licenses/licenses.css +22 -0
- package/licenses/licenses.html +67 -0
- package/package.json +10 -16
- package/scripts/createCanKingExtension.js +0 -403
- package/scripts/index.js +0 -39
- package/scripts/template/_.eslintrc.cjs +0 -38
- package/scripts/template/_.gitignore +0 -24
- package/scripts/template/_.npmrc +0 -2
- package/scripts/template/_.prettierrc +0 -8
- package/scripts/template/_.vscode/_launch.json +0 -28
- package/scripts/template/_index.html +0 -15
- package/scripts/template/_tsconfig.app.json +0 -27
- package/scripts/template/_tsconfig.json +0 -11
- package/scripts/template/_tsconfig.node.json +0 -13
- package/scripts/template/_vite.config.ts +0 -7
- package/scripts/template/src/App.tsx +0 -12
- package/scripts/template/src/WorkspaceView/index.tsx +0 -47
- package/scripts/template/src/main.css +0 -9
- package/scripts/template/src/main.tsx +0 -19
- package/scripts/template/src/vite-env.d.ts +0 -1
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// Use IntelliSense to learn about possible attributes.
|
|
3
|
-
// Hover to view descriptions of existing attributes.
|
|
4
|
-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
-
"version": "0.2.0",
|
|
6
|
-
"configurations": [
|
|
7
|
-
{
|
|
8
|
-
"name": "Dev Server",
|
|
9
|
-
"type": "node",
|
|
10
|
-
"request": "launch",
|
|
11
|
-
"runtimeExecutable": "npm",
|
|
12
|
-
"runtimeArgs": ["run", "dev"]
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"name": "CanKing",
|
|
16
|
-
"type": "node",
|
|
17
|
-
"request": "launch",
|
|
18
|
-
"runtimeExecutable": "npm",
|
|
19
|
-
"runtimeArgs": ["run", "canking"]
|
|
20
|
-
}
|
|
21
|
-
],
|
|
22
|
-
"compounds": [
|
|
23
|
-
{
|
|
24
|
-
"name": "Debug",
|
|
25
|
-
"configurations": ["Dev Server", "CanKing"]
|
|
26
|
-
}
|
|
27
|
-
]
|
|
28
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="UTF-8" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<title>CanKing Extension Template</title>
|
|
8
|
-
</head>
|
|
9
|
-
|
|
10
|
-
<body>
|
|
11
|
-
<div id="root"></div>
|
|
12
|
-
<script type="module" src="/src/main.tsx"></script>
|
|
13
|
-
</body>
|
|
14
|
-
|
|
15
|
-
</html>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"composite": true,
|
|
4
|
-
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
5
|
-
"target": "ES2020",
|
|
6
|
-
"useDefineForClassFields": true,
|
|
7
|
-
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
8
|
-
"module": "ESNext",
|
|
9
|
-
"skipLibCheck": true,
|
|
10
|
-
|
|
11
|
-
/* Bundler mode */
|
|
12
|
-
"moduleResolution": "bundler",
|
|
13
|
-
"allowImportingTsExtensions": true,
|
|
14
|
-
"resolveJsonModule": true,
|
|
15
|
-
"isolatedModules": true,
|
|
16
|
-
"moduleDetection": "force",
|
|
17
|
-
"noEmit": true,
|
|
18
|
-
"jsx": "react-jsx",
|
|
19
|
-
|
|
20
|
-
/* Linting */
|
|
21
|
-
"strict": true,
|
|
22
|
-
"noUnusedLocals": true,
|
|
23
|
-
"noUnusedParameters": true,
|
|
24
|
-
"noFallthroughCasesInSwitch": true
|
|
25
|
-
},
|
|
26
|
-
"include": ["src"]
|
|
27
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"composite": true,
|
|
4
|
-
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
5
|
-
"skipLibCheck": true,
|
|
6
|
-
"module": "ESNext",
|
|
7
|
-
"moduleResolution": "bundler",
|
|
8
|
-
"allowSyntheticDefaultImports": true,
|
|
9
|
-
"strict": true,
|
|
10
|
-
"noEmit": true
|
|
11
|
-
},
|
|
12
|
-
"include": ["vite.config.ts"]
|
|
13
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { useSearchParams } from 'react-router-dom';
|
|
2
|
-
import { useProjectData } from '@kvaser/canking-api/hooks';
|
|
3
|
-
import { CanChannelSelectControl } from '@kvaser/canking-api/controls';
|
|
4
|
-
import { Box } from '@mui/material';
|
|
5
|
-
|
|
6
|
-
// If any data should be stored in the project file then add it to this interface
|
|
7
|
-
interface IProjectViewData {
|
|
8
|
-
// This is an example showing how to store the selected channel id to the project file
|
|
9
|
-
channelId: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
// Define any default values for the project data that will be used when the component is created
|
|
13
|
-
const defaultProjectViewData: IProjectViewData = {
|
|
14
|
-
channelId: '',
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
// This component is the component that will be loaded into the Workspace view
|
|
18
|
-
function WorkspaceView() {
|
|
19
|
-
// Get this view's unique id from search params
|
|
20
|
-
const [searchParams] = useSearchParams();
|
|
21
|
-
const idString = searchParams.get('id');
|
|
22
|
-
const id = idString !== null ? Number.parseInt(idString, 10) : -1;
|
|
23
|
-
|
|
24
|
-
// Use the useProjectData hook to serialize/deserialize your view data to the project
|
|
25
|
-
const { projectData, setProjectData } = useProjectData<IProjectViewData>(id, defaultProjectViewData);
|
|
26
|
-
|
|
27
|
-
// A callback that will get the new selected channel id and save it to the project data
|
|
28
|
-
const onChannelIdentifierChange = (channelId: string) => {
|
|
29
|
-
const data = { ...projectData };
|
|
30
|
-
data.channelId = channelId;
|
|
31
|
-
setProjectData(data);
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
return (
|
|
35
|
-
<Box aria-label="can-channel-select-extension-view">
|
|
36
|
-
<div>Add your elements here!</div>
|
|
37
|
-
<div>This is an example how to use the CanChannelSelectControl:</div>
|
|
38
|
-
<CanChannelSelectControl
|
|
39
|
-
channelIdentifier={projectData.channelId}
|
|
40
|
-
onChannelIdentifierChange={onChannelIdentifierChange}
|
|
41
|
-
hideSectionControl
|
|
42
|
-
/>
|
|
43
|
-
</Box>
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export default WorkspaceView;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import ReactDOM from 'react-dom/client';
|
|
3
|
-
import { BrowserRouter, Route, Routes } from 'react-router-dom';
|
|
4
|
-
import App from './App.tsx';
|
|
5
|
-
import './main.css';
|
|
6
|
-
import '@fontsource/roboto/300.css';
|
|
7
|
-
import '@fontsource/roboto/400.css';
|
|
8
|
-
import '@fontsource/roboto/500.css';
|
|
9
|
-
import '@fontsource/roboto/700.css';
|
|
10
|
-
|
|
11
|
-
ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
12
|
-
<React.StrictMode>
|
|
13
|
-
<BrowserRouter>
|
|
14
|
-
<Routes>
|
|
15
|
-
<Route path="*" element={<App />} />
|
|
16
|
-
</Routes>
|
|
17
|
-
</BrowserRouter>
|
|
18
|
-
</React.StrictMode>,
|
|
19
|
-
);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|