datajunction-ui 0.0.1-rc.23 → 0.0.1-rc.25

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 (38) hide show
  1. package/.env +1 -0
  2. package/package.json +3 -2
  3. package/src/app/components/Tab.jsx +0 -1
  4. package/src/app/constants.js +2 -2
  5. package/src/app/icons/LoadingIcon.jsx +14 -0
  6. package/src/app/index.tsx +11 -1
  7. package/src/app/pages/AddEditNodePage/__tests__/AddEditNodePageFormFailed.test.jsx +28 -2
  8. package/src/app/pages/AddEditNodePage/__tests__/AddEditNodePageFormSuccess.test.jsx +44 -9
  9. package/src/app/pages/AddEditNodePage/__tests__/__snapshots__/AddEditNodePageFormFailed.test.jsx.snap +1 -0
  10. package/src/app/pages/AddEditNodePage/__tests__/__snapshots__/AddEditNodePageFormSuccess.test.jsx.snap +0 -50
  11. package/src/app/pages/AddEditNodePage/__tests__/index.test.jsx +2 -0
  12. package/src/app/pages/AddEditNodePage/index.jsx +60 -6
  13. package/src/app/pages/AddEditTagPage/Loadable.jsx +16 -0
  14. package/src/app/pages/AddEditTagPage/__tests__/AddEditTagPage.test.jsx +107 -0
  15. package/src/app/pages/AddEditTagPage/index.jsx +132 -0
  16. package/src/app/pages/LoginPage/LoginForm.jsx +116 -0
  17. package/src/app/pages/LoginPage/SignupForm.jsx +144 -0
  18. package/src/app/pages/LoginPage/__tests__/index.test.jsx +34 -2
  19. package/src/app/pages/LoginPage/index.jsx +9 -82
  20. package/src/app/pages/NamespacePage/index.jsx +5 -0
  21. package/src/app/pages/NodePage/ClientCodePopover.jsx +15 -1
  22. package/src/app/pages/NodePage/EditColumnPopover.jsx +15 -1
  23. package/src/app/pages/NodePage/LinkDimensionPopover.jsx +16 -1
  24. package/src/app/pages/NodePage/NodeColumnTab.jsx +11 -0
  25. package/src/app/pages/NodePage/NodeInfoTab.jsx +5 -1
  26. package/src/app/pages/NodePage/__tests__/NodePage.test.jsx +6 -3
  27. package/src/app/pages/RegisterTablePage/__tests__/__snapshots__/RegisterTablePage.test.jsx.snap +1 -0
  28. package/src/app/pages/Root/index.tsx +1 -1
  29. package/src/app/pages/TagPage/Loadable.jsx +16 -0
  30. package/src/app/pages/TagPage/__tests__/TagPage.test.jsx +70 -0
  31. package/src/app/pages/TagPage/index.jsx +79 -0
  32. package/src/app/services/DJService.js +79 -1
  33. package/src/app/services/__tests__/DJService.test.jsx +84 -1
  34. package/src/mocks/mockNodes.jsx +88 -44
  35. package/src/styles/index.css +19 -0
  36. package/src/styles/loading.css +35 -0
  37. package/src/styles/login.css +17 -3
  38. package/src/utils/form.jsx +2 -2
@@ -27,6 +27,7 @@ export const mocks = {
27
27
  {
28
28
  name: 'default_DOT_num_repair_orders',
29
29
  type: 'bigint',
30
+ display_name: 'Default DOT num repair orders',
30
31
  attributes: [],
31
32
  dimension: null,
32
33
  },
@@ -40,7 +41,7 @@ export const mocks = {
40
41
  },
41
42
  ],
42
43
  created_at: '2023-08-21T16:48:56.841631+00:00',
43
- tags: [],
44
+ tags: [{ name: 'purpose', display_name: 'Purpose' }],
44
45
  dimensions: [
45
46
  {
46
47
  value: 'default.date_dim.dateint',
@@ -243,6 +244,7 @@ export const mocks = {
243
244
  {
244
245
  name: 'default_DOT_avg_repair_price',
245
246
  type: 'double',
247
+ display_name: 'Default DOT avg repair price',
246
248
  attributes: [],
247
249
  dimension: null,
248
250
  },
@@ -402,6 +404,7 @@ export const mocks = {
402
404
  {
403
405
  name: 'default_DOT_avg_repair_price',
404
406
  type: 'double',
407
+ display_name: 'Default DOT avg repair price',
405
408
  attributes: [],
406
409
  dimension: null,
407
410
  },
@@ -442,30 +445,35 @@ export const mocks = {
442
445
  {
443
446
  name: 'default_DOT_num_repair_orders',
444
447
  type: 'bigint',
448
+ display_name: 'Default DOT num repair orders',
445
449
  attributes: [],
446
450
  dimension: null,
447
451
  },
448
452
  {
449
453
  name: 'default_DOT_avg_repair_price',
450
454
  type: 'double',
455
+ display_name: 'Default DOT avg repair price',
451
456
  attributes: [],
452
457
  dimension: null,
453
458
  },
454
459
  {
455
460
  name: 'default_DOT_total_repair_cost',
456
461
  type: 'double',
462
+ display_name: 'Default DOT total repair cost',
457
463
  attributes: [],
458
464
  dimension: null,
459
465
  },
460
466
  {
461
467
  name: 'default_DOT_total_repair_order_discounts',
462
468
  type: 'double',
469
+ display_name: 'Default DOT total repair order discounts',
463
470
  attributes: [],
464
471
  dimension: null,
465
472
  },
466
473
  {
467
474
  name: 'company_name',
468
475
  type: 'string',
476
+ display_name: 'Company Name',
469
477
  attributes: [
470
478
  {
471
479
  attribute_type: {
@@ -821,6 +829,7 @@ export const mocks = {
821
829
  {
822
830
  name: 'default_DOT_avg_repair_price',
823
831
  type: 'double',
832
+ display_name: 'Default DOT avg repair price',
824
833
  attributes: [],
825
834
  dimension: null,
826
835
  },
@@ -1044,6 +1053,7 @@ export const mocks = {
1044
1053
  {
1045
1054
  name: 'repair_order_id',
1046
1055
  type: 'int',
1056
+ display_name: 'Repair Order Id',
1047
1057
  attributes: [],
1048
1058
  dimension: {
1049
1059
  name: 'default.repair_order',
@@ -1052,24 +1062,28 @@ export const mocks = {
1052
1062
  {
1053
1063
  name: 'repair_type_id',
1054
1064
  type: 'int',
1065
+ display_name: 'Repair Type Id',
1055
1066
  attributes: [],
1056
1067
  dimension: null,
1057
1068
  },
1058
1069
  {
1059
1070
  name: 'price',
1060
1071
  type: 'float',
1072
+ display_name: 'Price',
1061
1073
  attributes: [],
1062
1074
  dimension: null,
1063
1075
  },
1064
1076
  {
1065
1077
  name: 'quantity',
1066
1078
  type: 'int',
1079
+ display_name: 'Quantity',
1067
1080
  attributes: [],
1068
1081
  dimension: null,
1069
1082
  },
1070
1083
  {
1071
1084
  name: 'discount',
1072
1085
  type: 'float',
1086
+ display_name: 'Discount',
1073
1087
  attributes: [],
1074
1088
  dimension: null,
1075
1089
  },
@@ -1108,6 +1122,7 @@ export const mocks = {
1108
1122
  {
1109
1123
  name: 'dateint',
1110
1124
  type: 'timestamp',
1125
+ display_name: 'Dateint',
1111
1126
  attributes: [
1112
1127
  {
1113
1128
  attribute_type: {
@@ -1121,18 +1136,21 @@ export const mocks = {
1121
1136
  {
1122
1137
  name: 'month',
1123
1138
  type: 'int',
1139
+ display_name: 'Month',
1124
1140
  attributes: [],
1125
1141
  dimension: null,
1126
1142
  },
1127
1143
  {
1128
1144
  name: 'year',
1129
1145
  type: 'int',
1146
+ display_name: 'Year',
1130
1147
  attributes: [],
1131
1148
  dimension: null,
1132
1149
  },
1133
1150
  {
1134
1151
  name: 'day',
1135
1152
  type: 'int',
1153
+ display_name: 'Day',
1136
1154
  attributes: [],
1137
1155
  dimension: null,
1138
1156
  },
@@ -1175,6 +1193,7 @@ export const mocks = {
1175
1193
  {
1176
1194
  name: 'hard_hat_id',
1177
1195
  type: 'int',
1196
+ display_name: 'Hard Hat Id',
1178
1197
  attributes: [
1179
1198
  {
1180
1199
  attribute_type: {
@@ -1188,89 +1207,94 @@ export const mocks = {
1188
1207
  {
1189
1208
  name: 'last_name',
1190
1209
  type: 'string',
1210
+ display_name: 'Last Name',
1191
1211
  attributes: [],
1192
1212
  dimension: null,
1193
1213
  },
1194
1214
  {
1195
1215
  name: 'first_name',
1196
1216
  type: 'string',
1217
+ display_name: 'First Name',
1197
1218
  attributes: [],
1198
1219
  dimension: null,
1199
1220
  },
1200
1221
  {
1201
1222
  name: 'title',
1202
1223
  type: 'string',
1224
+ display_name: 'Title',
1203
1225
  attributes: [],
1204
1226
  dimension: null,
1205
1227
  },
1206
1228
  {
1207
1229
  name: 'birth_date',
1208
1230
  type: 'date',
1231
+ display_name: 'Birth Date',
1209
1232
  attributes: [],
1210
1233
  dimension: {
1211
1234
  name: 'default.date_dim',
1212
1235
  },
1213
1236
  },
1214
1237
  {
1215
- name: 'hire_date',
1216
- type: 'date',
1217
- attributes: [],
1218
- dimension: {
1219
- name: 'default.date_dim',
1238
+ "name": "hire_date",
1239
+ "type": "date",
1240
+ "attributes": [],
1241
+ "dimension": {
1242
+ "name": "default.date_dim"
1220
1243
  },
1244
+ "display_name": "Hire Date"
1221
1245
  },
1222
1246
  {
1223
- name: 'address',
1224
- type: 'string',
1225
- attributes: [],
1226
- dimension: null,
1247
+ "name": "address",
1248
+ "type": "string",
1249
+ "attributes": [],
1250
+ "dimension": null,
1251
+ "display_name": "Address"
1227
1252
  },
1228
1253
  {
1229
- name: 'city',
1230
- type: 'string',
1231
- attributes: [],
1232
- dimension: null,
1254
+ "name": "city",
1255
+ "type": "string",
1256
+ "attributes": [],
1257
+ "dimension": null,
1258
+ "display_name": "City"
1233
1259
  },
1234
1260
  {
1235
- name: 'state',
1236
- type: 'string',
1237
- attributes: [],
1238
- dimension: {
1239
- name: 'default.us_state',
1261
+ "name": "state",
1262
+ "type": "string",
1263
+ "attributes": [],
1264
+ "dimension": {
1265
+ "name": "default.us_state"
1240
1266
  },
1267
+ "display_name": "State"
1241
1268
  },
1242
1269
  {
1243
- name: 'postal_code',
1244
- type: 'string',
1245
- attributes: [],
1246
- dimension: null,
1270
+ "name": "postal_code",
1271
+ "type": "string",
1272
+ "attributes": [],
1273
+ "dimension": null,
1274
+ "display_name": "Postal Code"
1247
1275
  },
1248
1276
  {
1249
- name: 'country',
1250
- type: 'string',
1251
- attributes: [],
1252
- dimension: null,
1277
+ "name": "country",
1278
+ "type": "string",
1279
+ "attributes": [],
1280
+ "dimension": null,
1281
+ "display_name": "Country"
1253
1282
  },
1254
1283
  {
1255
- name: 'manager',
1256
- type: 'int',
1257
- attributes: [],
1258
- dimension: null,
1284
+ "name": "manager",
1285
+ "type": "int",
1286
+ "attributes": [],
1287
+ "dimension": null,
1288
+ "display_name": "Manager"
1259
1289
  },
1260
1290
  {
1261
- name: 'contractor_id',
1262
- type: 'int',
1263
- attributes: [],
1264
- dimension: null,
1265
- },
1266
- ],
1267
- updated_at: '2023-08-21T16:48:55.594603+00:00',
1268
- materializations: [],
1269
- parents: [
1270
- {
1271
- name: 'default.hard_hats',
1272
- },
1273
- ],
1291
+ "name": "contractor_id",
1292
+ "type": "int",
1293
+ "attributes": [],
1294
+ "dimension": null,
1295
+ "display_name": "Contractor Id"
1296
+ }
1297
+ ],
1274
1298
  created_at: '2023-08-21T16:48:55.594537+00:00',
1275
1299
  tags: [],
1276
1300
  },
@@ -1302,6 +1326,7 @@ export const mocks = {
1302
1326
  {
1303
1327
  name: 'default_DOT_avg_repair_price',
1304
1328
  type: 'double',
1329
+ display_name: 'Default DOT avg repair price',
1305
1330
  attributes: [],
1306
1331
  dimension: null,
1307
1332
  },
@@ -1345,6 +1370,7 @@ export const mocks = {
1345
1370
  {
1346
1371
  name: 'dispatcher_id',
1347
1372
  type: 'int',
1373
+ display_name: 'Dispatcher Id',
1348
1374
  attributes: [
1349
1375
  {
1350
1376
  attribute_type: {
@@ -1358,12 +1384,14 @@ export const mocks = {
1358
1384
  {
1359
1385
  name: 'company_name',
1360
1386
  type: 'string',
1387
+ display_name: 'Company Name',
1361
1388
  attributes: [],
1362
1389
  dimension: null,
1363
1390
  },
1364
1391
  {
1365
1392
  name: 'phone',
1366
1393
  type: 'string',
1394
+ display_name: 'Phone',
1367
1395
  attributes: [],
1368
1396
  dimension: null,
1369
1397
  },
@@ -1394,4 +1422,20 @@ export const mocks = {
1394
1422
  display_name: 'Default: Num Repair Orders',
1395
1423
  },
1396
1424
  ],
1425
+ tags: [
1426
+ {
1427
+ description: 'Financial-related reports',
1428
+ display_name: 'Financial Reports',
1429
+ tag_metadata: {},
1430
+ name: 'report.financials',
1431
+ tag_type: 'reports',
1432
+ },
1433
+ {
1434
+ description: 'Forecasting reports',
1435
+ display_name: 'Forecasting Reports',
1436
+ tag_metadata: {},
1437
+ name: 'reports.forecasts',
1438
+ tag_type: 'reports',
1439
+ },
1440
+ ],
1397
1441
  };
@@ -451,6 +451,12 @@ tbody th {
451
451
  background-color: #dbafff !important;
452
452
  color: #580076;
453
453
  }
454
+
455
+ .entity__tag {
456
+ font-family: 'Jost';
457
+ background-color: #afd4ff !important;
458
+ color: #002176;
459
+ }
454
460
  .react-flow__node .node_type__cube {
455
461
  background-color: #c2180750 !important;
456
462
  color: #c2180750;
@@ -710,9 +716,11 @@ pre {
710
716
  }
711
717
  .menu-title a {
712
718
  color: #7e8299;
719
+ cursor: pointer;
713
720
  }
714
721
  .menu-title a:hover {
715
722
  color: #3f4254;
723
+ cursor: pointer;
716
724
  }
717
725
 
718
726
  .node__header,
@@ -993,3 +1001,14 @@ pre {
993
1001
  .deleteNode {
994
1002
  display: inline-block;
995
1003
  }
1004
+
1005
+ .tag_value {
1006
+ color: #5c3b8f;
1007
+ background-color: #5c3b8f25;
1008
+ margin: 0.25rem;
1009
+ font-size: 100%;
1010
+ }
1011
+
1012
+ .tag_value:hover {
1013
+ background-color: #5c3b8f50;
1014
+ }
@@ -0,0 +1,35 @@
1
+ .lds-ring {
2
+ display: inline-block;
3
+ position: relative;
4
+ width: 25px;
5
+ height: 25px;
6
+ }
7
+ .lds-ring div {
8
+ box-sizing: border-box;
9
+ display: block;
10
+ position: absolute;
11
+ width: 25px;
12
+ height: 25px;
13
+ border: 8px solid #fff;
14
+ border-radius: 50%;
15
+ animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
16
+ border-color: #fff transparent transparent transparent;
17
+ }
18
+ .lds-ring div:nth-child(1) {
19
+ animation-delay: -0.45s;
20
+ }
21
+ .lds-ring div:nth-child(2) {
22
+ animation-delay: -0.3s;
23
+ }
24
+ .lds-ring div:nth-child(3) {
25
+ animation-delay: -0.15s;
26
+ }
27
+ @keyframes lds-ring {
28
+ 0% {
29
+ transform: rotate(0deg);
30
+ }
31
+ 100% {
32
+ transform: rotate(360deg);
33
+ }
34
+ }
35
+
@@ -3,18 +3,24 @@
3
3
  border: 2px solid #000000;
4
4
  background: linear-gradient(120deg, #ffed7c, #fef7c8);
5
5
  width: 40vw;
6
- height: 30rem;
6
+ height: 45rem;
7
7
  box-sizing: border-box;
8
8
  padding: 2rem;
9
9
  display: grid;
10
10
  grid-template-columns: 1fr;
11
- gap: 1rem;
12
11
  margin: auto;
13
12
  position: absolute;
14
13
  top: 0;
15
14
  bottom: 0;
16
15
  left: 0;
17
16
  right: 0;
17
+ cursor: pointer;
18
+ grid-row-gap: 0;
19
+ }
20
+
21
+ .login form div {
22
+ display: block;
23
+ text-align: center;
18
24
  }
19
25
 
20
26
  .login form button {
@@ -49,7 +55,7 @@
49
55
 
50
56
  .login button[type='submit'] {
51
57
  width: 10vw;
52
- background-color: #01b268;
58
+ background-color: #5D2E85;
53
59
  border: 2px solid #000000;
54
60
  color: white;
55
61
  padding: 14px 20px;
@@ -65,3 +71,11 @@
65
71
  .login .logo-title img {
66
72
  padding: 0.5rem;
67
73
  }
74
+
75
+ .signup form {
76
+ height: 50rem;
77
+ }
78
+
79
+ .form-error {
80
+ color: red;
81
+ }
@@ -4,12 +4,12 @@ import * as React from 'react';
4
4
 
5
5
  export const displayMessageAfterSubmit = status => {
6
6
  return status?.success !== undefined ? (
7
- <div className="message success">
7
+ <div className="message success" data-testid="success">
8
8
  <ValidIcon />
9
9
  {status?.success}
10
10
  </div>
11
11
  ) : status?.failure !== undefined ? (
12
- <div className="message alert">
12
+ <div className="message alert" data-testid="failure">
13
13
  <AlertIcon />
14
14
  {status?.failure}
15
15
  </div>