datajunction-ui 0.0.75 → 0.0.77

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 (29) hide show
  1. package/package.json +1 -1
  2. package/src/app/components/DashboardCard.jsx +93 -0
  3. package/src/app/components/NodeComponents.jsx +173 -0
  4. package/src/app/components/NodeListActions.jsx +8 -3
  5. package/src/app/components/__tests__/NodeComponents.test.jsx +262 -0
  6. package/src/app/hooks/__tests__/useWorkspaceData.test.js +533 -0
  7. package/src/app/hooks/useWorkspaceData.js +357 -0
  8. package/src/app/index.tsx +6 -0
  9. package/src/app/pages/MyWorkspacePage/ActiveBranchesSection.jsx +344 -0
  10. package/src/app/pages/MyWorkspacePage/CollectionsSection.jsx +188 -0
  11. package/src/app/pages/MyWorkspacePage/Loadable.jsx +6 -0
  12. package/src/app/pages/MyWorkspacePage/MaterializationsSection.jsx +190 -0
  13. package/src/app/pages/MyWorkspacePage/MyNodesSection.jsx +342 -0
  14. package/src/app/pages/MyWorkspacePage/MyWorkspacePage.css +632 -0
  15. package/src/app/pages/MyWorkspacePage/NeedsAttentionSection.jsx +185 -0
  16. package/src/app/pages/MyWorkspacePage/NodeList.jsx +46 -0
  17. package/src/app/pages/MyWorkspacePage/NotificationsSection.jsx +133 -0
  18. package/src/app/pages/MyWorkspacePage/TypeGroupGrid.jsx +209 -0
  19. package/src/app/pages/MyWorkspacePage/__tests__/ActiveBranchesSection.test.jsx +295 -0
  20. package/src/app/pages/MyWorkspacePage/__tests__/CollectionsSection.test.jsx +278 -0
  21. package/src/app/pages/MyWorkspacePage/__tests__/MaterializationsSection.test.jsx +238 -0
  22. package/src/app/pages/MyWorkspacePage/__tests__/MyNodesSection.test.jsx +389 -0
  23. package/src/app/pages/MyWorkspacePage/__tests__/MyWorkspacePage.test.jsx +347 -0
  24. package/src/app/pages/MyWorkspacePage/__tests__/NeedsAttentionSection.test.jsx +272 -0
  25. package/src/app/pages/MyWorkspacePage/__tests__/NodeList.test.jsx +162 -0
  26. package/src/app/pages/MyWorkspacePage/__tests__/NotificationsSection.test.jsx +204 -0
  27. package/src/app/pages/MyWorkspacePage/__tests__/TypeGroupGrid.test.jsx +556 -0
  28. package/src/app/pages/MyWorkspacePage/index.jsx +150 -0
  29. package/src/app/services/DJService.js +323 -2
@@ -0,0 +1,632 @@
1
+ /* MyWorkspacePage Layout */
2
+ .workspace-layout {
3
+ display: flex;
4
+ gap: 1.5rem;
5
+ align-items: stretch;
6
+ }
7
+
8
+ .workspace-left-column {
9
+ width: calc(65% - 0.75rem);
10
+ display: flex;
11
+ flex-direction: column;
12
+ gap: 1.5rem;
13
+ }
14
+
15
+ .workspace-right-column {
16
+ width: calc(35% - 0.75rem);
17
+ display: flex;
18
+ flex-direction: column;
19
+ gap: 1.5rem;
20
+ }
21
+
22
+ /* NotificationsSection */
23
+ .notification-item {
24
+ display: flex;
25
+ align-items: center;
26
+ gap: 0.5rem;
27
+ padding: 0.5rem 0;
28
+ border-bottom: 1px solid var(--border-color, #eee);
29
+ fontsize: 12px;
30
+ }
31
+
32
+ .notification-link {
33
+ font-size: 13px;
34
+ font-weight: 500;
35
+ text-decoration: none;
36
+ flex-shrink: 0;
37
+ }
38
+
39
+ .notification-meta {
40
+ color: #888;
41
+ white-space: nowrap;
42
+ }
43
+
44
+ .notifications-list {
45
+ display: flex;
46
+ flex-direction: column;
47
+ gap: 0.5rem;
48
+ padding: 0.5rem;
49
+ }
50
+
51
+ /* NeedsAttentionSection */
52
+ .needs-attention-category {
53
+ padding: 0.5rem 0.75rem;
54
+ min-width: 0;
55
+ }
56
+
57
+ .needs-attention-header {
58
+ display: flex;
59
+ justify-content: space-between;
60
+ align-items: center;
61
+ margin-bottom: 0.3rem;
62
+ }
63
+
64
+ .needs-attention-label {
65
+ font-size: 11px;
66
+ font-weight: 600;
67
+ color: #555;
68
+ }
69
+
70
+ .needs-attention-count {
71
+ margin-left: 4px;
72
+ }
73
+
74
+ .needs-attention-count--has-items {
75
+ color: #dc3545;
76
+ }
77
+
78
+ .needs-attention-count--no-items {
79
+ color: #666;
80
+ }
81
+
82
+ .needs-attention-view-all {
83
+ font-size: 10px;
84
+ }
85
+
86
+ .needs-attention-chips {
87
+ display: flex;
88
+ gap: 0.3rem;
89
+ overflow: hidden;
90
+ }
91
+
92
+ .needs-attention-all-good {
93
+ font-size: 10px;
94
+ color: #28a745;
95
+ }
96
+
97
+ .needs-attention-categories {
98
+ display: flex;
99
+ flex-direction: column;
100
+ width: 100%;
101
+ gap: 0.5rem;
102
+ }
103
+
104
+ .personal-namespace-prompt {
105
+ padding: 0.75rem;
106
+ background-color: var(--card-bg, #f8f9fa);
107
+ border: 1px dashed var(--border-color, #dee2e6);
108
+ border-radius: 6px;
109
+ text-align: center;
110
+ }
111
+
112
+ .personal-namespace-icon {
113
+ font-size: 16px;
114
+ margin-bottom: 0.25rem;
115
+ }
116
+
117
+ .personal-namespace-title {
118
+ font-size: 11px;
119
+ font-weight: 500;
120
+ margin-bottom: 0.25rem;
121
+ }
122
+
123
+ .personal-namespace-description {
124
+ font-size: 10px;
125
+ color: #666;
126
+ margin-bottom: 0.5rem;
127
+ }
128
+
129
+ .personal-namespace-code {
130
+ background-color: #e9ecef;
131
+ padding: 1px 4px;
132
+ border-radius: 3px;
133
+ font-size: 9px;
134
+ }
135
+
136
+ .personal-namespace-button {
137
+ display: inline-block;
138
+ padding: 3px 8px;
139
+ font-size: 10px;
140
+ background-color: #28a745;
141
+ color: #fff;
142
+ border-radius: 4px;
143
+ text-decoration: none;
144
+ }
145
+
146
+ /* MyNodesSection */
147
+ .my-nodes-tabs {
148
+ display: flex;
149
+ gap: 0.5rem;
150
+ margin-bottom: 0.5rem;
151
+ padding-top: 0.5rem;
152
+ }
153
+
154
+ .my-nodes-tab {
155
+ padding: 4px 10px;
156
+ font-size: 11px;
157
+ border: none;
158
+ border-radius: 4px;
159
+ cursor: pointer;
160
+ background-color: #e9ecef;
161
+ color: #495057;
162
+ }
163
+
164
+ .my-nodes-tab--active {
165
+ background-color: var(--primary-color, #4a90d9);
166
+ color: #fff;
167
+ }
168
+
169
+ .my-nodes-empty {
170
+ padding: 0.75rem 0;
171
+ }
172
+
173
+ .my-nodes-empty-text {
174
+ font-size: 12px;
175
+ color: #666;
176
+ margin-bottom: 0.75rem;
177
+ }
178
+
179
+ .my-nodes-empty-grid {
180
+ display: flex;
181
+ gap: 0.75rem;
182
+ }
183
+
184
+ .my-nodes-empty-card {
185
+ flex: 1;
186
+ padding: 0.75rem;
187
+ background-color: var(--card-bg, #f8f9fa);
188
+ border: 1px dashed var(--border-color, #dee2e6);
189
+ border-radius: 6px;
190
+ text-align: center;
191
+ }
192
+
193
+ .empty-card-icon {
194
+ font-size: 16px;
195
+ margin-bottom: 0.25rem;
196
+ }
197
+
198
+ .empty-card-title {
199
+ font-size: 11px;
200
+ font-weight: 500;
201
+ margin-bottom: 0.25rem;
202
+ }
203
+
204
+ .empty-card-description {
205
+ font-size: 10px;
206
+ color: #666;
207
+ margin-bottom: 0.5rem;
208
+ }
209
+
210
+ .empty-card-button {
211
+ display: inline-block;
212
+ padding: 3px 8px;
213
+ font-size: 10px;
214
+ color: #fff;
215
+ border-radius: 4px;
216
+ text-decoration: none;
217
+ }
218
+
219
+ .empty-card-button--primary {
220
+ background-color: var(--primary-color, #4a90d9);
221
+ }
222
+
223
+ .empty-card-button--secondary {
224
+ background-color: #6c757d;
225
+ }
226
+
227
+ .my-nodes-no-content {
228
+ padding: 1rem;
229
+ text-align: center;
230
+ color: #666;
231
+ font-size: 12px;
232
+ }
233
+
234
+ .my-nodes-more {
235
+ text-align: center;
236
+ padding: 0.5rem;
237
+ font-size: 12px;
238
+ color: #666;
239
+ }
240
+
241
+ /* CollectionsSection */
242
+ .collections-grid {
243
+ display: grid;
244
+ grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
245
+ gap: 0.75rem;
246
+ }
247
+
248
+ .collection-card {
249
+ display: flex;
250
+ flex-direction: column;
251
+ padding: 1rem;
252
+ border: 1px solid var(--border-color, #e0e0e0);
253
+ border-radius: 8px;
254
+ text-decoration: none;
255
+ color: inherit;
256
+ transition: all 0.15s ease;
257
+ background-color: var(--card-bg, #fff);
258
+ cursor: pointer;
259
+ }
260
+
261
+ .collection-card:hover {
262
+ border-color: var(--primary-color, #007bff);
263
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
264
+ transform: translateY(-2px);
265
+ }
266
+
267
+ .collection-name {
268
+ font-weight: 600;
269
+ font-size: 14px;
270
+ margin-bottom: 0.5rem;
271
+ line-height: 1.3;
272
+ }
273
+
274
+ .collection-description {
275
+ font-size: 12px;
276
+ color: #666;
277
+ line-height: 1.4;
278
+ margin-bottom: 0.75rem;
279
+ overflow: hidden;
280
+ text-overflow: ellipsis;
281
+ display: -webkit-box;
282
+ -webkit-line-clamp: 2;
283
+ -webkit-box-orient: vertical;
284
+ flex: 1;
285
+ }
286
+
287
+ .collection-meta {
288
+ display: flex;
289
+ justify-content: space-between;
290
+ align-items: center;
291
+ font-size: 11px;
292
+ color: #888;
293
+ margin-top: auto;
294
+ }
295
+
296
+ .collection-meta-owner--me {
297
+ color: var(--primary-color, #4a90d9);
298
+ }
299
+
300
+ .collections-empty {
301
+ padding: 1rem;
302
+ text-align: center;
303
+ }
304
+
305
+ .collections-empty-icon {
306
+ font-size: 48px;
307
+ margin-bottom: 0.5rem;
308
+ opacity: 0.3;
309
+ }
310
+
311
+ .collections-empty-title {
312
+ font-size: 13px;
313
+ color: #666;
314
+ margin-bottom: 1rem;
315
+ }
316
+
317
+ .collections-empty-description {
318
+ font-size: 11px;
319
+ color: #999;
320
+ margin-bottom: 1rem;
321
+ line-height: 1.4;
322
+ }
323
+
324
+ .collections-empty-button {
325
+ display: inline-block;
326
+ padding: 6px 12px;
327
+ font-size: 11px;
328
+ background-color: var(--primary-color, #4a90d9);
329
+ color: #fff;
330
+ border-radius: 6px;
331
+ text-decoration: none;
332
+ font-weight: 500;
333
+ }
334
+
335
+ /* MaterializationsSection */
336
+ .materializations-list {
337
+ display: flex;
338
+ flex-direction: column;
339
+ gap: 0.5rem;
340
+ }
341
+
342
+ .materialization-item {
343
+ padding: 0.5rem;
344
+ border: 1px solid var(--border-color, #e0e0e0);
345
+ border-radius: 4px;
346
+ background-color: var(--card-bg, #fff);
347
+ }
348
+
349
+ .materialization-header {
350
+ display: flex;
351
+ align-items: center;
352
+ justify-content: space-between;
353
+ margin-bottom: 4px;
354
+ }
355
+
356
+ .materialization-status {
357
+ font-size: 10px;
358
+ }
359
+
360
+ .materialization-meta {
361
+ font-size: 10px;
362
+ color: #666;
363
+ }
364
+
365
+ .materialization-schedule {
366
+ margin-right: 8px;
367
+ }
368
+
369
+ .materialization-table {
370
+ color: #888;
371
+ }
372
+
373
+ .materializations-empty {
374
+ padding: 0;
375
+ }
376
+
377
+ .materializations-empty-text {
378
+ font-size: 12px;
379
+ color: #666;
380
+ margin-bottom: 0.75rem;
381
+ }
382
+
383
+ .materializations-more {
384
+ text-align: center;
385
+ padding: 0.5rem;
386
+ font-size: 12px;
387
+ color: #666;
388
+ }
389
+
390
+ /* ActiveBranchesSection */
391
+ .git-namespaces-list {
392
+ display: flex;
393
+ flex-direction: column;
394
+ }
395
+
396
+ .git-namespace-header {
397
+ display: flex;
398
+ align-items: center;
399
+ gap: 8px;
400
+ padding: 0.75rem 0 0.5rem 0;
401
+ margin-top: 0;
402
+ }
403
+
404
+ .git-namespace-name {
405
+ font-size: 12px;
406
+ font-weight: 600;
407
+ text-decoration: none;
408
+ }
409
+
410
+ .git-namespace-repo {
411
+ font-size: 9px;
412
+ padding: 2px 6px;
413
+ background-color: #f0f0f0;
414
+ color: #666;
415
+ border-radius: 3px;
416
+ font-weight: 500;
417
+ }
418
+
419
+ .git-branch-item {
420
+ display: flex;
421
+ align-items: center;
422
+ justify-content: space-between;
423
+ padding: 0px 1em 0.4em 1em;
424
+ }
425
+
426
+ .git-branch-name-wrapper {
427
+ display: flex;
428
+ align-items: center;
429
+ gap: 6px;
430
+ min-width: 0;
431
+ flex: 1;
432
+ }
433
+
434
+ .git-branch-name {
435
+ font-size: 12px;
436
+ font-weight: 500;
437
+ overflow: hidden;
438
+ text-overflow: ellipsis;
439
+ white-space: nowrap;
440
+ }
441
+
442
+ .git-branch-default-star {
443
+ font-size: 10px;
444
+ }
445
+
446
+ .git-branch-meta {
447
+ display: flex;
448
+ align-items: center;
449
+ gap: 6px;
450
+ font-size: 10px;
451
+ color: #666;
452
+ white-space: nowrap;
453
+ }
454
+
455
+ .git-branch-updated {
456
+ color: #888;
457
+ }
458
+
459
+ .git-namespace-divider {
460
+ border-bottom: 1px solid var(--border-color, #ddd);
461
+ margin: 0.5rem 0;
462
+ }
463
+
464
+ .git-namespaces-empty {
465
+ padding: 0;
466
+ text-align: center;
467
+ }
468
+
469
+ .git-namespaces-empty-text {
470
+ font-size: 12px;
471
+ color: #666;
472
+ margin-bottom: 0.75rem;
473
+ }
474
+
475
+ .git-namespaces-more {
476
+ text-align: center;
477
+ padding: 0.5rem;
478
+ font-size: 12px;
479
+ color: #666;
480
+ }
481
+
482
+ /* TypeGroupGrid */
483
+ .type-group-grid {
484
+ display: grid;
485
+ grid-template-columns: repeat(2, 1fr);
486
+ gap: 0.75rem;
487
+ padding: 0.5rem 0;
488
+ }
489
+
490
+ .type-group-card {
491
+ background-color: var(--card-bg, #f8f9fa);
492
+ border: 1px solid var(--border-color, #e0e0e0);
493
+ border-radius: 6px;
494
+ padding: 0.75rem;
495
+ display: flex;
496
+ flex-direction: column;
497
+ gap: 0.5rem;
498
+ }
499
+
500
+ .type-group-header {
501
+ display: flex;
502
+ align-items: center;
503
+ justify-content: space-between;
504
+ padding-bottom: 0.5rem;
505
+ border-bottom: 1px solid var(--border-color, #dee2e6);
506
+ }
507
+
508
+ .type-group-title {
509
+ font-size: 12px;
510
+ font-weight: 600;
511
+ color: #333;
512
+ }
513
+
514
+ .type-group-nodes {
515
+ display: flex;
516
+ flex-direction: column;
517
+ gap: 0;
518
+ }
519
+
520
+ .type-group-node {
521
+ display: flex;
522
+ align-items: center;
523
+ gap: 0.5rem;
524
+ min-width: 0;
525
+ }
526
+
527
+ .type-group-node-status-icon {
528
+ font-size: 12px;
529
+ flex-shrink: 0;
530
+ line-height: 1;
531
+ }
532
+
533
+ .type-group-node-git-info {
534
+ font-size: 9px;
535
+ padding: 2px 6px;
536
+ background-color: #fff;
537
+ color: #666;
538
+ border: 1px solid #e0e0e0;
539
+ border-radius: 3px;
540
+ font-weight: 500;
541
+ white-space: nowrap;
542
+ flex-shrink: 0;
543
+ }
544
+
545
+ .type-group-node-git-info--default {
546
+ background-color: #d4edda;
547
+ color: #155724;
548
+ border: 1px solid #c3e6cb;
549
+ }
550
+
551
+ .type-group-node-time {
552
+ font-size: 10px;
553
+ color: #888;
554
+ white-space: nowrap;
555
+ flex-shrink: 0;
556
+ }
557
+
558
+ .type-group-node-actions {
559
+ display: inline-flex;
560
+ transform: scale(0.75);
561
+ transform-origin: right center;
562
+ flex-shrink: 0;
563
+ }
564
+
565
+ .type-group-more {
566
+ display: block;
567
+ text-align: center;
568
+ padding: 0.5rem 0 0 0;
569
+ font-size: 11px;
570
+ color: var(--primary-color, #4a90d9);
571
+ text-decoration: none;
572
+ border-top: 1px solid var(--border-color, #dee2e6);
573
+ margin-top: 0.25rem;
574
+ font-weight: 500;
575
+ }
576
+
577
+ .type-group-more:hover {
578
+ text-decoration: underline;
579
+ }
580
+
581
+ /* NodeList */
582
+ .node-list {
583
+ display: flex;
584
+ flex-direction: column;
585
+ gap: 0.5rem;
586
+ }
587
+
588
+ .node-list-item {
589
+ display: flex;
590
+ align-items: center;
591
+ justify-content: space-between;
592
+ padding: 0.5rem 0;
593
+ border-bottom: 1px solid var(--border-color, #eee);
594
+ gap: 0.5rem;
595
+ }
596
+
597
+ .node-list-item-content {
598
+ flex: 1;
599
+ min-width: 0;
600
+ overflow: hidden;
601
+ }
602
+
603
+ .node-list-item-display {
604
+ margin-bottom: 0.25rem;
605
+ }
606
+
607
+ .node-list-item-name {
608
+ font-size: 11px;
609
+ color: #888;
610
+ overflow: hidden;
611
+ text-overflow: ellipsis;
612
+ white-space: nowrap;
613
+ }
614
+
615
+ .node-list-item-actions {
616
+ display: flex;
617
+ align-items: center;
618
+ gap: 0.5rem;
619
+ flex-shrink: 0;
620
+ white-space: nowrap;
621
+ }
622
+
623
+ .node-list-item-updated {
624
+ font-size: 11px;
625
+ color: #888;
626
+ }
627
+
628
+ .node-list-item-actions-wrapper {
629
+ display: inline-flex;
630
+ transform: scale(0.85);
631
+ transform-origin: right center;
632
+ }