datajunction-ui 0.0.1-rc.0 → 0.0.1-rc.1
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/.babel-plugin-macrosrc.js +5 -0
- package/.babelrc +4 -0
- package/.github/workflows/ci.yml +3 -3
- package/.vscode/extensions.json +0 -1
- package/Dockerfile +2 -1
- package/dist/5fa71a03d45dc2e3d61447f3013a303d.png +0 -0
- package/dist/index.html +26 -0
- package/dist/main.js +23303 -0
- package/dist/vendor.js +281 -0
- package/package.json +16 -9
- package/public/index.html +5 -8
- package/src/app/__tests__/__snapshots__/index.test.tsx.snap +5 -7
- package/src/app/components/Tab.jsx +2 -3
- package/src/app/components/djgraph/DJNode.jsx +6 -6
- package/src/app/index.tsx +3 -11
- package/src/app/pages/ListNamespacesPage/Loadable.jsx +2 -11
- package/src/app/pages/ListNamespacesPage/index.jsx +2 -3
- package/src/app/pages/NamespacePage/Loadable.jsx +2 -11
- package/src/app/pages/NodePage/Loadable.jsx +2 -11
- package/src/app/pages/NodePage/NodeGraphTab.jsx +46 -40
- package/src/app/pages/NotFoundPage/Loadable.tsx +1 -1
- package/src/app/pages/NotFoundPage/index.tsx +5 -27
- package/src/app/pages/Root/Loadable.tsx +2 -11
- package/src/index.tsx +3 -2
- package/src/setupTests.ts +0 -2
- package/src/styles/dag.css +118 -0
- package/src/styles/index.css +13 -0
- package/src/utils/__tests__/loadable.test.tsx +1 -1
- package/tsconfig.json +7 -4
- package/webpack.config.js +91 -0
- package/src/app/pages/NotFoundPage/P.ts +0 -8
- package/src/app/pages/NotFoundPage/__tests__/__snapshots__/index.test.tsx.snap +0 -61
- package/src/app/pages/NotFoundPage/__tests__/index.test.tsx +0 -21
- package/src/styles/dag-styles.ts +0 -117
- package/src/styles/global-styles.ts +0 -588
package/tsconfig.json
CHANGED
|
@@ -2,21 +2,24 @@
|
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"noImplicitAny": false,
|
|
4
4
|
"target": "es5",
|
|
5
|
-
"lib": ["dom", "dom.iterable", "esnext"],
|
|
5
|
+
"lib": ["dom", "dom.iterable", "esnext", "es2015"],
|
|
6
6
|
"allowJs": true,
|
|
7
7
|
"skipLibCheck": true,
|
|
8
8
|
"esModuleInterop": true,
|
|
9
9
|
"allowSyntheticDefaultImports": true,
|
|
10
10
|
"strict": true,
|
|
11
11
|
"forceConsistentCasingInFileNames": true,
|
|
12
|
-
"module": "
|
|
12
|
+
"module": "commonjs",
|
|
13
13
|
"moduleResolution": "node",
|
|
14
14
|
"resolveJsonModule": true,
|
|
15
15
|
"isolatedModules": true,
|
|
16
16
|
"noEmit": true,
|
|
17
17
|
"noFallthroughCasesInSwitch": true,
|
|
18
18
|
"jsx": "react-jsx",
|
|
19
|
-
"baseUrl": "./src"
|
|
19
|
+
"baseUrl": "./src",
|
|
20
|
+
"preserveConstEnums": true,
|
|
21
|
+
"removeComments": true,
|
|
22
|
+
"sourceMap": true
|
|
20
23
|
},
|
|
21
24
|
"include": ["src", "internals/startingTemplate/**/*"],
|
|
22
25
|
"ts-node": {
|
|
@@ -24,7 +27,7 @@
|
|
|
24
27
|
"esModuleInterop": true,
|
|
25
28
|
"module": "commonjs",
|
|
26
29
|
"moduleResolution": "node",
|
|
27
|
-
"noEmit":
|
|
30
|
+
"noEmit": false,
|
|
28
31
|
"allowSyntheticDefaultImports": true
|
|
29
32
|
}
|
|
30
33
|
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
3
|
+
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
4
|
+
|
|
5
|
+
var babelOptions = {
|
|
6
|
+
presets: ['@babel/preset-react'],
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
module.exports = {
|
|
10
|
+
cache: true,
|
|
11
|
+
entry: {
|
|
12
|
+
main: './src/index.tsx',
|
|
13
|
+
vendor: ['events', 'fbemitter', 'flux', 'react', 'react-dom'],
|
|
14
|
+
},
|
|
15
|
+
target: 'web',
|
|
16
|
+
mode: 'development',
|
|
17
|
+
output: {
|
|
18
|
+
path: path.resolve(__dirname, './dist'),
|
|
19
|
+
filename: 'static/[name].[fullhash].js',
|
|
20
|
+
publicPath: '/',
|
|
21
|
+
},
|
|
22
|
+
devServer: {
|
|
23
|
+
historyApiFallback: true,
|
|
24
|
+
},
|
|
25
|
+
resolve: {
|
|
26
|
+
extensions: ['.js', '.jsx', '.json', '.ts', '.tsx'],
|
|
27
|
+
fallback: {
|
|
28
|
+
path: false,
|
|
29
|
+
buffer: false,
|
|
30
|
+
assert: false,
|
|
31
|
+
fs: false,
|
|
32
|
+
os: false,
|
|
33
|
+
module: false,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
module: {
|
|
37
|
+
rules: [
|
|
38
|
+
{
|
|
39
|
+
test: /\.(ts|tsx|jsx)$/,
|
|
40
|
+
use: [
|
|
41
|
+
{
|
|
42
|
+
loader: 'babel-loader',
|
|
43
|
+
options: babelOptions,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
loader: 'ts-loader',
|
|
47
|
+
options: {
|
|
48
|
+
compilerOptions: {
|
|
49
|
+
noEmit: false,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
test: /\.css$/,
|
|
57
|
+
use: ['style-loader', 'css-loader'],
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
test: /\.js$/,
|
|
61
|
+
exclude: /node_modules/,
|
|
62
|
+
use: [
|
|
63
|
+
{
|
|
64
|
+
loader: 'babel-loader',
|
|
65
|
+
options: babelOptions,
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
test: /\.(png|jpe?g|gif)$/i,
|
|
71
|
+
use: [
|
|
72
|
+
{
|
|
73
|
+
loader: 'file-loader',
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
test: /node_modules[\\|/](name-of-the-umd-package)/,
|
|
79
|
+
use: { loader: 'umd-compat-loader' },
|
|
80
|
+
},
|
|
81
|
+
],
|
|
82
|
+
},
|
|
83
|
+
plugins: [
|
|
84
|
+
new HtmlWebpackPlugin({
|
|
85
|
+
template: path.resolve(__dirname, 'public', 'index.html'),
|
|
86
|
+
}),
|
|
87
|
+
// new MiniCssExtractPlugin({
|
|
88
|
+
// filename: './styles/index.css',
|
|
89
|
+
// }),
|
|
90
|
+
],
|
|
91
|
+
};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`<NotFoundPage /> should match snapshot 1`] = `
|
|
4
|
-
.c2 {
|
|
5
|
-
font-size: 1rem;
|
|
6
|
-
line-height: 1.5;
|
|
7
|
-
margin: 0.625rem 0 1.5rem 0;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.c0 {
|
|
11
|
-
height: 100%;
|
|
12
|
-
display: -webkit-box;
|
|
13
|
-
display: -webkit-flex;
|
|
14
|
-
display: -ms-flexbox;
|
|
15
|
-
display: flex;
|
|
16
|
-
-webkit-align-items: center;
|
|
17
|
-
-webkit-box-align: center;
|
|
18
|
-
-ms-flex-align: center;
|
|
19
|
-
align-items: center;
|
|
20
|
-
-webkit-box-pack: center;
|
|
21
|
-
-webkit-justify-content: center;
|
|
22
|
-
-ms-flex-pack: center;
|
|
23
|
-
justify-content: center;
|
|
24
|
-
-webkit-flex-direction: column;
|
|
25
|
-
-ms-flex-direction: column;
|
|
26
|
-
flex-direction: column;
|
|
27
|
-
min-height: 320px;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.c1 {
|
|
31
|
-
margin-top: -8vh;
|
|
32
|
-
font-weight: bold;
|
|
33
|
-
font-size: 3.375rem;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.c1 span {
|
|
37
|
-
font-size: 3.125rem;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
<div
|
|
41
|
-
className="c0"
|
|
42
|
-
>
|
|
43
|
-
<div
|
|
44
|
-
className="c1"
|
|
45
|
-
>
|
|
46
|
-
4
|
|
47
|
-
<span
|
|
48
|
-
aria-label="Crying Face"
|
|
49
|
-
role="img"
|
|
50
|
-
>
|
|
51
|
-
😢
|
|
52
|
-
</span>
|
|
53
|
-
4
|
|
54
|
-
</div>
|
|
55
|
-
<p
|
|
56
|
-
className="c2"
|
|
57
|
-
>
|
|
58
|
-
Page not found.
|
|
59
|
-
</p>
|
|
60
|
-
</div>
|
|
61
|
-
`;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { NotFoundPage } from '..';
|
|
3
|
-
import { MemoryRouter } from 'react-router-dom';
|
|
4
|
-
import { HelmetProvider } from 'react-helmet-async';
|
|
5
|
-
import renderer from 'react-test-renderer';
|
|
6
|
-
|
|
7
|
-
const renderPage = () =>
|
|
8
|
-
renderer.create(
|
|
9
|
-
<MemoryRouter>
|
|
10
|
-
<HelmetProvider>
|
|
11
|
-
<NotFoundPage />
|
|
12
|
-
</HelmetProvider>
|
|
13
|
-
</MemoryRouter>,
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
describe('<NotFoundPage />', () => {
|
|
17
|
-
it('should match snapshot', () => {
|
|
18
|
-
const notFoundPage = renderPage();
|
|
19
|
-
expect(notFoundPage.toJSON()).toMatchSnapshot();
|
|
20
|
-
});
|
|
21
|
-
});
|
package/src/styles/dag-styles.ts
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { createGlobalStyle } from 'styled-components';
|
|
2
|
-
// import { StyleConstants } from './StyleConstants';
|
|
3
|
-
/* istanbul ignore next */
|
|
4
|
-
export const DAGStyle = createGlobalStyle`
|
|
5
|
-
.react-flow__node-custom {
|
|
6
|
-
font-size: 1.2em;
|
|
7
|
-
width: 180px;
|
|
8
|
-
background: #f5f5f6;
|
|
9
|
-
color: #222;
|
|
10
|
-
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 15%), 0 2px 4px -1px rgb(0 0 0 / 8%);
|
|
11
|
-
border-radius: 2px;
|
|
12
|
-
}
|
|
13
|
-
.react-flow {
|
|
14
|
-
width: 100%; height: 800px; overflow: hidden; position: relative; z-index: 0;
|
|
15
|
-
}
|
|
16
|
-
.react-flow__node-custom .react-flow__handle {
|
|
17
|
-
top: 24px;
|
|
18
|
-
right: -15px;
|
|
19
|
-
width: 6px;
|
|
20
|
-
height: 10px;
|
|
21
|
-
border-radius: 2px;
|
|
22
|
-
background-color: #778899;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.react-flow__node.circle {
|
|
26
|
-
border-radius: 50%;
|
|
27
|
-
width: 60px;
|
|
28
|
-
height: 60px;
|
|
29
|
-
display: flex;
|
|
30
|
-
justify-content: center;
|
|
31
|
-
align-items: center;
|
|
32
|
-
font-weight: 700;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.react-flow__node.annotation {
|
|
36
|
-
border-radius: 0;
|
|
37
|
-
text-align: left;
|
|
38
|
-
background: white;
|
|
39
|
-
border: none;
|
|
40
|
-
line-height: 1.4;
|
|
41
|
-
width: 225px;
|
|
42
|
-
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 15%), 0 2px 4px -1px rgb(0 0 0 / 8%);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.react-flow__node.annotation .react-flow__handle {
|
|
46
|
-
display: none;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.dj-node__header {
|
|
50
|
-
font-weight: 400;
|
|
51
|
-
text-transform: uppercase;
|
|
52
|
-
font-family: 'jetbrains-mono',monospace;
|
|
53
|
-
font-size: 1.5em;
|
|
54
|
-
padding-inline-start: 0.5rem;
|
|
55
|
-
padding-inline-end: 0.5rem;
|
|
56
|
-
padding-left: 0.75em;
|
|
57
|
-
padding-top: 0.35rem;
|
|
58
|
-
padding-bottom: 0.35rem;
|
|
59
|
-
border-bottom-width: 1px;
|
|
60
|
-
border-bottom-style: solid;
|
|
61
|
-
border-color: #c4cbd1;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.dj-node__body {
|
|
65
|
-
background-color: rgb(254, 254, 254);
|
|
66
|
-
padding: 0.5em 0.7em 0.9em 0.7em;
|
|
67
|
-
font-family: 'nt-dapper',-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;
|
|
68
|
-
font-size: 1.7em;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.dj-node__full {
|
|
72
|
-
display: flex;
|
|
73
|
-
flex-direction: column;
|
|
74
|
-
height: 100%;
|
|
75
|
-
border-width: 1px;
|
|
76
|
-
border-style: solid;
|
|
77
|
-
border-image: initial;
|
|
78
|
-
border-color: #b0b9c2;
|
|
79
|
-
border-radius: 8px;
|
|
80
|
-
overflow: hidden;
|
|
81
|
-
box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.dj-node__metadata {
|
|
85
|
-
padding: 1em;
|
|
86
|
-
font-family: 'nt-dapper',-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;
|
|
87
|
-
font-size: 1em;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.collapse-button {
|
|
91
|
-
display: block;
|
|
92
|
-
width: 100%;
|
|
93
|
-
font: 0.8em "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
94
|
-
text-transform: uppercase;
|
|
95
|
-
border: none;
|
|
96
|
-
margin-top: 0.2em;
|
|
97
|
-
padding: 0.35em;
|
|
98
|
-
}
|
|
99
|
-
.collapse {
|
|
100
|
-
padding-top: 10px;
|
|
101
|
-
}
|
|
102
|
-
.collapse-content.collapsed {
|
|
103
|
-
display: none;
|
|
104
|
-
}
|
|
105
|
-
.collapsed-content.expanded {
|
|
106
|
-
display: block;
|
|
107
|
-
}
|
|
108
|
-
.collapse tr td {
|
|
109
|
-
padding-left: 5px;
|
|
110
|
-
padding-bottom: 5px;
|
|
111
|
-
}
|
|
112
|
-
.serif {
|
|
113
|
-
font-family: 'jetbrains-mono', monospace;
|
|
114
|
-
text-transform: lowercase;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
`;
|