datajunction-ui 0.0.1-rc.17 → 0.0.1-rc.19

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.
Files changed (40) hide show
  1. package/.env +1 -1
  2. package/dj-logo.svg +10 -0
  3. package/package.json +28 -6
  4. package/src/app/__tests__/__snapshots__/index.test.tsx.snap +5 -84
  5. package/src/app/components/djgraph/DJNode.jsx +1 -1
  6. package/src/app/components/djgraph/LayoutFlow.jsx +1 -1
  7. package/src/app/constants.js +2 -0
  8. package/src/app/icons/AlertIcon.jsx +32 -0
  9. package/src/app/icons/DJLogo.jsx +36 -0
  10. package/src/app/icons/DeleteIcon.jsx +21 -0
  11. package/src/app/icons/EditIcon.jsx +18 -0
  12. package/src/app/index.tsx +70 -36
  13. package/src/app/pages/AddEditNodePage/FormikSelect.jsx +33 -0
  14. package/src/app/pages/AddEditNodePage/FullNameField.jsx +36 -0
  15. package/src/app/pages/AddEditNodePage/Loadable.jsx +16 -0
  16. package/src/app/pages/AddEditNodePage/NodeQueryField.jsx +89 -0
  17. package/src/app/pages/AddEditNodePage/__tests__/FormikSelect.test.jsx +44 -0
  18. package/src/app/pages/AddEditNodePage/__tests__/FullNameField.test.jsx +29 -0
  19. package/src/app/pages/AddEditNodePage/__tests__/NodeQueryField.test.jsx +30 -0
  20. package/src/app/pages/AddEditNodePage/__tests__/__snapshots__/index.test.jsx.snap +84 -0
  21. package/src/app/pages/AddEditNodePage/__tests__/index.test.jsx +353 -0
  22. package/src/app/pages/AddEditNodePage/index.jsx +349 -0
  23. package/src/app/pages/LoginPage/assets/sign-in-with-github.png +0 -0
  24. package/src/app/pages/LoginPage/assets/sign-in-with-google.png +0 -0
  25. package/src/app/pages/LoginPage/index.jsx +90 -0
  26. package/src/app/pages/NamespacePage/__tests__/__snapshots__/index.test.tsx.snap +50 -2
  27. package/src/app/pages/NamespacePage/index.jsx +38 -9
  28. package/src/app/pages/NodePage/NodeGraphTab.jsx +1 -2
  29. package/src/app/pages/NodePage/NodeHistory.jsx +0 -1
  30. package/src/app/pages/NodePage/index.jsx +43 -26
  31. package/src/app/pages/Root/index.tsx +20 -3
  32. package/src/app/pages/SQLBuilderPage/index.jsx +54 -8
  33. package/src/app/services/DJService.js +180 -32
  34. package/src/setupTests.ts +1 -1
  35. package/src/styles/index.css +82 -5
  36. package/src/styles/login.css +67 -0
  37. package/src/styles/node-creation.scss +190 -0
  38. package/src/styles/styles.scss +44 -0
  39. package/src/styles/styles.scss.d.ts +9 -0
  40. package/webpack.config.js +11 -1
@@ -1,8 +1,12 @@
1
+ @import url('https://fonts.googleapis.com/css?family=Jost');
2
+ @import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300;600&display=swap');
3
+ @import url('https://fonts.googleapis.com/css?family=Lato');
4
+
1
5
  body {
2
6
  margin: 0;
3
- font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
4
- 'Noto Sans', 'Liberation Sans', Arial, sans-serif, 'Apple Color Emoji',
5
- 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
7
+ font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell,
8
+ Noto Sans, sans-serif, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial,
9
+ sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
6
10
  -webkit-font-smoothing: antialiased;
7
11
  -moz-osx-font-smoothing: grayscale;
8
12
  }
@@ -14,6 +18,13 @@ body {
14
18
  div {
15
19
  display: block;
16
20
  }
21
+ h2 {
22
+ font-family: 'Raleway', system-ui;
23
+ font-weight: 300;
24
+ }
25
+ h2 b {
26
+ font-weight: 600;
27
+ }
17
28
  p {
18
29
  display: block;
19
30
  margin-block-start: 1em;
@@ -26,7 +37,7 @@ a,
26
37
  a:hover {
27
38
  text-decoration: none;
28
39
  color: #005c72;
29
- font-family: 'Cerebri Sans', sans-serif;
40
+ font-family: 'Montserrat', sans-serif;
30
41
  }
31
42
  a:hover {
32
43
  text-decoration: underline;
@@ -153,6 +164,7 @@ ul {
153
164
  .h6,
154
165
  h6 {
155
166
  margin: 0;
167
+ font-family: 'Jost';
156
168
  text-transform: uppercase;
157
169
  font-size: 0.8125rem;
158
170
  font-weight: 600;
@@ -251,6 +263,7 @@ tr {
251
263
  background-clip: border-box;
252
264
  border-radius: 1rem;
253
265
  margin: 2rem;
266
+ padding-bottom: 2rem;
254
267
  }
255
268
 
256
269
  .card-light-shadow {
@@ -313,6 +326,7 @@ tr {
313
326
  font-weight: 600;
314
327
  letter-spacing: 0.08em;
315
328
  color: #95aac9;
329
+ font-family: 'Jost';
316
330
  }
317
331
 
318
332
  .card-table thead th {
@@ -325,7 +339,7 @@ tr {
325
339
  td,
326
340
  tbody th {
327
341
  vertical-align: middle;
328
- text-align: center;
342
+ text-align: left;
329
343
  }
330
344
  .table [data-sort],
331
345
  .table-nowrap td,
@@ -369,6 +383,10 @@ tbody th {
369
383
  border-bottom-width: 1px;
370
384
  box-shadow: inset 0 0 0 9999px transparent;
371
385
  }
386
+ .node_type_creation_heading {
387
+ text-transform: capitalize;
388
+ padding: 5px;
389
+ }
372
390
 
373
391
  /* Nodes */
374
392
  .node_type {
@@ -384,6 +402,7 @@ tbody th {
384
402
 
385
403
  /* Nodes */
386
404
  .node_type__source {
405
+ font-family: 'Jost';
387
406
  background-color: #ccf7e5 !important;
388
407
  color: #00b368;
389
408
  }
@@ -393,15 +412,21 @@ tbody th {
393
412
  }
394
413
 
395
414
  .node_type__transform {
415
+ font-family: 'Jost';
396
416
  background-color: #ccefff !important;
397
417
  color: #0063b4;
398
418
  }
419
+
420
+ .node_type__transform:hover {
421
+ background-color: #ccefff !important;
422
+ }
399
423
  .react-flow__node .node_type__transform {
400
424
  background-color: #6daaa750 !important;
401
425
  color: #6daaa7;
402
426
  }
403
427
 
404
428
  .node_type__metric {
429
+ font-family: 'Jost';
405
430
  background-color: #fad7dd !important;
406
431
  color: #a2283e;
407
432
  }
@@ -411,6 +436,7 @@ tbody th {
411
436
  }
412
437
 
413
438
  .node_type__dimension {
439
+ font-family: 'Jost';
414
440
  background-color: #ffefd0 !important;
415
441
  color: #a96621;
416
442
  }
@@ -420,6 +446,7 @@ tbody th {
420
446
  }
421
447
 
422
448
  .node_type__cube {
449
+ font-family: 'Jost';
423
450
  background-color: #dbafff !important;
424
451
  color: #580076;
425
452
  }
@@ -710,6 +737,10 @@ pre {
710
737
  padding: 0 2.25rem 0 2.25rem;
711
738
  }
712
739
 
740
+ .card-header h2 {
741
+ font-family: 'Jost';
742
+ }
743
+
713
744
  .text-gray-400 {
714
745
  color: #b5b5c3 !important;
715
746
  }
@@ -873,3 +904,49 @@ pre {
873
904
  .inactive {
874
905
  display: none;
875
906
  }
907
+
908
+ .dropdown {
909
+ position: relative;
910
+ display: inline-block;
911
+ float: right;
912
+ }
913
+
914
+ .dropdown-content {
915
+ display: none;
916
+ position: absolute;
917
+ margin-top: 6px;
918
+ box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
919
+ min-width: 115px;
920
+ }
921
+
922
+ .dropdown:hover .dropdown-content {
923
+ display: block;
924
+ }
925
+
926
+ .dropdown-content a:hover {
927
+ text-decoration: none;
928
+ }
929
+
930
+ .dropdown-content a div {
931
+ padding: 12px 16px;
932
+ background-color: #ffffff !important;
933
+ }
934
+
935
+ .dropdown-content a div:hover {
936
+ background-color: #f3eeff !important;
937
+ }
938
+
939
+ .add_node {
940
+ background-color: #5d2f86 !important;
941
+ color: #fff;
942
+ text-transform: none;
943
+ vertical-align: middle;
944
+ padding-right: 1rem;
945
+ padding-left: 1rem;
946
+ padding-top: 0.5rem;
947
+ padding-bottom: 0.5rem;
948
+ font-size: 1rem;
949
+ border-radius: 0.5rem;
950
+ word-wrap: break-word;
951
+ white-space: break-spaces;
952
+ }
@@ -0,0 +1,67 @@
1
+ .login form {
2
+ border-radius: 25px;
3
+ border: 2px solid #000000;
4
+ background: linear-gradient(120deg, #ffed7c, #fef7c8);
5
+ width: 40vw;
6
+ height: 30rem;
7
+ box-sizing: border-box;
8
+ padding: 2rem;
9
+ display: grid;
10
+ grid-template-columns: 1fr;
11
+ gap: 1rem;
12
+ margin: auto;
13
+ position: absolute;
14
+ top: 0;
15
+ bottom: 0;
16
+ left: 0;
17
+ right: 0;
18
+ }
19
+
20
+ .login form button {
21
+ width: 15vw;
22
+ margin: auto;
23
+ }
24
+
25
+ .login form span {
26
+ padding: 0.5rem;
27
+ }
28
+
29
+ .login input[type='text'] {
30
+ width: 20vw;
31
+ padding: 12px 20px;
32
+ margin: auto;
33
+ display: inline-block;
34
+ border: 2px solid #000000;
35
+ border-radius: 4px;
36
+ box-sizing: border-box;
37
+ }
38
+
39
+ .login input[type='password'] {
40
+ -webkit-text-security: disc;
41
+ width: 20vw;
42
+ padding: 12px 20px;
43
+ margin: auto;
44
+ display: inline-block;
45
+ border: 2px solid #000000;
46
+ border-radius: 4px;
47
+ box-sizing: border-box;
48
+ }
49
+
50
+ .login button[type='submit'] {
51
+ width: 10vw;
52
+ background-color: #01b268;
53
+ border: 2px solid #000000;
54
+ color: white;
55
+ padding: 14px 20px;
56
+ border-radius: 4px;
57
+ cursor: pointer;
58
+ }
59
+
60
+ .login .logo-title {
61
+ display: flex;
62
+ margin: auto;
63
+ }
64
+
65
+ .login .logo-title img {
66
+ padding: 0.5rem;
67
+ }
@@ -0,0 +1,190 @@
1
+ // Fonts
2
+ form {
3
+ text-align: left;
4
+
5
+ select {
6
+ background-color: #eeeeee;
7
+ border-radius: 10px;
8
+ border-style: none;
9
+ padding: 1rem;
10
+ font-family: Lato, 'sans-serif';
11
+ font-size: 110%;
12
+ }
13
+
14
+ input {
15
+ background-color: #eeeeee;
16
+ border-radius: 10px;
17
+ border-style: none;
18
+ border-width: 1px;
19
+ box-sizing: border-box;
20
+ padding: 1rem;
21
+ font-size: 110%;
22
+ box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 6px -1px,
23
+ rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;
24
+ }
25
+
26
+ label {
27
+ font-family: 'Lato', sans-serif;
28
+ display: block;
29
+ text-transform: uppercase;
30
+ margin-bottom: 5px;
31
+ font-size: 90%;
32
+ font-weight: 600;
33
+ }
34
+
35
+ .NodeCreationInput {
36
+ margin: 0.5rem 0;
37
+ display: inline-grid;
38
+ width: 35%;
39
+ padding: 0 20px;
40
+ }
41
+
42
+ .DisplayNameInput,
43
+ .FullNameInput,
44
+ .NamespaceInput {
45
+ span {
46
+ color: red;
47
+ }
48
+ }
49
+
50
+ .DisplayNameInput,
51
+ .FullNameInput,
52
+ .NamespaceInput {
53
+ display: inline-grid;
54
+ box-sizing: border-box;
55
+ flex-wrap: nowrap;
56
+ margin: 1rem 0;
57
+ }
58
+
59
+ .DisplayNameInput {
60
+ width: 45%;
61
+ }
62
+
63
+ .FullNameInput {
64
+ width: 100%;
65
+
66
+ input {
67
+ width: 75%;
68
+ color: #275c86;
69
+ }
70
+ }
71
+
72
+ .NamespaceInput {
73
+ padding: 0 20px;
74
+ width: 30%;
75
+
76
+ div:first-child {
77
+ flex: 1 0 auto;
78
+ }
79
+
80
+ input {
81
+ width: 35%;
82
+ border: 0;
83
+ font-family: 'Lato', sans-serif;
84
+ padding: 5px 0;
85
+ font-size: 18px;
86
+ font-weight: 300;
87
+ outline: none;
88
+ }
89
+ }
90
+
91
+ .SelectInput {
92
+ background-color: #eee;
93
+ border-radius: 10px;
94
+ border-style: none;
95
+ border-color: transparent;
96
+ box-sizing: border-box;
97
+ padding: 0.5rem;
98
+ font-size: 110%;
99
+ box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 6px -1px,
100
+ rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;
101
+ }
102
+ .SelectInput div,
103
+ .SelectInput div div {
104
+ border: none;
105
+ }
106
+
107
+ .SelectInput div:first-child {
108
+ background-color: #eee !important;
109
+ border: none;
110
+ color: #0c4128;
111
+ }
112
+
113
+ .DescriptionInput {
114
+ width: 100%;
115
+
116
+ textarea {
117
+ width: 75%;
118
+ background-color: #eeeeee;
119
+ border-radius: 10px;
120
+ border-style: none;
121
+ border-width: 1px;
122
+ box-sizing: border-box;
123
+ padding: 1rem;
124
+ font-family: Lato, Sans;
125
+ font-size: 110%;
126
+ margin: 0.5rem 0;
127
+ height: 100px;
128
+ }
129
+ }
130
+
131
+ .QueryInput {
132
+ width: 75%;
133
+ }
134
+
135
+ .NodeModeInput {
136
+ select {
137
+ background-color: #eeeeee;
138
+ border-radius: 10px;
139
+ border-style: none;
140
+ padding: 1rem;
141
+ font-family: Lato, Sans;
142
+ font-size: 110%;
143
+ }
144
+ }
145
+
146
+ button {
147
+ display: block;
148
+ border-radius: 10px;
149
+ border-style: none;
150
+ padding: 1rem;
151
+ margin: 0.5rem 20px;
152
+ text-transform: uppercase;
153
+ font-family: Lato, Sans;
154
+ font-weight: 600;
155
+ font-size: 110%;
156
+ background-size: 200% auto;
157
+ background-color: #ffd559;
158
+ box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 6px -1px,
159
+ rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;
160
+ }
161
+ }
162
+
163
+ .message {
164
+ padding: 20px;
165
+ opacity: 1;
166
+ margin-bottom: 15px;
167
+ border-radius: 0.5rem;
168
+ line-height: 1.25rem;
169
+ font-size: 1.2rem;
170
+ svg {
171
+ margin-right: 0.3rem;
172
+ height: 1.5rem;
173
+ }
174
+ }
175
+ .success {
176
+ background-color: rgb(245, 253, 242);
177
+ color: rgb(53, 110, 35);
178
+ svg {
179
+ filter: invert(34%) sepia(86%) saturate(465%) hue-rotate(60deg)
180
+ brightness(82%) contrast(80%);
181
+ }
182
+ }
183
+ .alert {
184
+ background-color: rgb(253 242 242/1);
185
+ color: rgb(155 28 28/1);
186
+ svg {
187
+ filter: invert(16%) sepia(68%) saturate(2827%) hue-rotate(344deg)
188
+ brightness(96%) contrast(100%);
189
+ }
190
+ }
@@ -0,0 +1,44 @@
1
+ @use 'sass:color';
2
+
3
+ .svg-font-color svg > path {
4
+ fill: var(--ifm-font-color-base);
5
+ }
6
+ select {
7
+ border-radius: 0.25rem;
8
+ font-size: 0.875rem;
9
+ padding-bottom: 0.25rem;
10
+ padding-left: 0.5rem;
11
+ padding-top: 0.25rem;
12
+ max-width: 20vw;
13
+ }
14
+ .queryBuilder {
15
+ min-width: 420px;
16
+
17
+ .ruleGroup div select,
18
+ .ruleGroup div input {
19
+ -webkit-text-security: none;
20
+ border-radius: 0.25rem;
21
+ font-size: 0.875rem;
22
+ padding-bottom: 0.35rem;
23
+ padding-left: 0.5rem;
24
+ padding-top: 0.35rem;
25
+ border: none;
26
+ }
27
+
28
+ .ruleGroup div button {
29
+ background-color: #f0f8ff;
30
+ color: #24518f;
31
+ border: 1px solid #365b8f;
32
+ border-radius: 0.25rem;
33
+ cursor: pointer;
34
+ display: inline-block;
35
+ font-size: 0.875rem;
36
+ font-weight: 400;
37
+ line-height: 1.5;
38
+ padding: 0.25rem 0.5rem;
39
+ text-align: center;
40
+ text-decoration: none;
41
+ transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
42
+ border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
43
+ }
44
+ }
@@ -0,0 +1,9 @@
1
+ // This file is automatically generated.
2
+ // Please do not change this file!
3
+ interface CssExports {
4
+ queryBuilder: string;
5
+ ruleGroup: string;
6
+ 'svg-font-color': string;
7
+ }
8
+ export const cssExports: CssExports;
9
+ export default cssExports;
package/webpack.config.js CHANGED
@@ -2,6 +2,8 @@ const webpack = require('webpack');
2
2
  const dotenv = require('dotenv').config();
3
3
  const path = require('path');
4
4
  const HtmlWebpackPlugin = require('html-webpack-plugin');
5
+ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
6
+
5
7
  require('dotenv').config({ path: './.env' });
6
8
 
7
9
  var babelOptions = {
@@ -31,7 +33,7 @@ module.exports = {
31
33
  },
32
34
  },
33
35
  resolve: {
34
- extensions: ['.js', '.jsx', '.json', '.ts', '.tsx'],
36
+ extensions: ['.js', '.jsx', '.json', '.ts', '.tsx', '.scss'],
35
37
  modules: ['src', 'node_modules'],
36
38
  fallback: {
37
39
  path: false,
@@ -72,6 +74,10 @@ module.exports = {
72
74
  test: /\.css$/,
73
75
  use: ['style-loader', 'css-loader'],
74
76
  },
77
+ {
78
+ test: /\.(s(a|c)ss)$/,
79
+ use: [MiniCssExtractPlugin.loader, 'css-loader', 'sass-loader'],
80
+ },
75
81
  {
76
82
  test: /\.js$/,
77
83
  exclude: /node_modules/,
@@ -104,5 +110,9 @@ module.exports = {
104
110
  new webpack.DefinePlugin({
105
111
  'process.env': JSON.stringify(process.env),
106
112
  }),
113
+ new MiniCssExtractPlugin({
114
+ filename: '[name].css', // isDevelopment ? '[name].css' : '[name].[hash].css',
115
+ chunkFilename: '[id].css', // isDevelopment ? '[id].css' : '[id].[hash].css'
116
+ }),
107
117
  ],
108
118
  };