@policystudio/policy-studio-ui-vue 1.1.64 → 1.1.66

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.
@@ -2374,7 +2374,6 @@ video {
2374
2374
  .psui-el-table-results.layout-flexible thead {
2375
2375
  background-color: #ffffff ;
2376
2376
  align-items: flex-start;
2377
- box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.04), 0px 2px 5px rgba(0, 0, 0, 0.08);
2378
2377
  position: sticky;
2379
2378
  top: 0;
2380
2379
  z-index: 15;
@@ -2399,7 +2398,7 @@ video {
2399
2398
  }
2400
2399
 
2401
2400
  .psui-el-table-results.layout-flexible thead tr th {
2402
- padding-left: 1.5rem;
2401
+ padding-left: 1rem;
2403
2402
  --text-opacity: 1;
2404
2403
  color: #798490;
2405
2404
  color: rgba(121, 132, 144, var(--text-opacity));
@@ -2419,7 +2418,7 @@ video {
2419
2418
 
2420
2419
  .psui-el-table-results.layout-flexible thead tr th:first-child {
2421
2420
  padding-left: 1rem;
2422
- padding-right: 2rem;
2421
+ padding-right: 1rem;
2423
2422
  text-align: left;
2424
2423
  background-color: #ffffff ;
2425
2424
  position: sticky;
@@ -2431,11 +2430,22 @@ video {
2431
2430
  align-items: flex-start;
2432
2431
  }
2433
2432
 
2433
+ .psui-el-table-results.layout-flexible thead tr th:first-child.pseudo-line::after {
2434
+ content: '';
2435
+ position: absolute;
2436
+ top: 10px;
2437
+ right: 0;
2438
+ width: 1px;
2439
+ height: calc(100%);
2440
+ background-color: #D6DDE5;
2441
+ }
2442
+
2434
2443
  .psui-el-table-results.layout-flexible thead tr:first-of-type th {
2435
2444
  text-align: left;
2436
2445
  padding-top: 0;
2437
2446
  padding-bottom: 0;
2438
- min-width: 596px;
2447
+ min-width: 497px;
2448
+ position: sticky;
2439
2449
  }
2440
2450
 
2441
2451
  .psui-el-table-results.layout-flexible thead tr:first-of-type th > div {
@@ -2469,7 +2479,22 @@ video {
2469
2479
 
2470
2480
  .psui-el-table-results.layout-flexible thead tr:not(:first-of-type) th:first-child {
2471
2481
  text-align: left;
2472
- min-width: 388px;
2482
+ min-width: 357px;
2483
+ }
2484
+
2485
+ .psui-el-table-results.layout-flexible thead tr:not(:first-of-type) th:nth-child(2) {
2486
+ position: sticky;
2487
+ z-index: 10;
2488
+ background-color: #ffffff ;
2489
+ left:357px;
2490
+ min-width: 140px;
2491
+ }
2492
+
2493
+ .psui-el-table-results.layout-flexible thead tr:not(:first-of-type) th:nth-child(3) {
2494
+ position: sticky;
2495
+ z-index: 10;
2496
+ background-color: #ffffff ;
2497
+ left: 497px;
2473
2498
  }
2474
2499
 
2475
2500
  .psui-el-table-results.layout-flexible tbody tr {
@@ -2555,6 +2580,22 @@ video {
2555
2580
  left: 0;
2556
2581
  padding-top: 8px;
2557
2582
  padding-bottom: 8px;
2583
+ min-width: 357px;
2584
+ }
2585
+
2586
+ .psui-el-table-results.layout-flexible tbody tr td:nth-child(2) {
2587
+ position: sticky;
2588
+ z-index: 10;
2589
+ min-width: 140px;
2590
+ left: 357px;
2591
+ }
2592
+
2593
+ .psui-el-table-results.layout-flexible tbody tr td:nth-child(3) {
2594
+ position: sticky;
2595
+ z-index: 10;
2596
+ min-width: 140px;
2597
+ left: 497px;
2598
+ padding-right: 22px;
2558
2599
  }
2559
2600
 
2560
2601
  .psui-el-table-results.layout-flexible tbody tr td .psui-el-tooltip-dialog {
@@ -2634,6 +2675,38 @@ video {
2634
2675
  height: 10px;
2635
2676
  }
2636
2677
 
2678
+ .psui-el-table-results.layout-flexible tbody tr.is-first.removed-class.closed td:first-child {
2679
+ position: sticky;
2680
+ }
2681
+
2682
+ .psui-el-table-results.layout-flexible tbody tr.is-first.removed-class.closed td:first-child:before,
2683
+ .psui-el-table-results.layout-flexible tbody tr.is-first.removed-class.closed td:first-child:after {
2684
+ content: '';
2685
+ position: absolute;
2686
+ top: 0;
2687
+ }
2688
+
2689
+ .psui-el-table-results.layout-flexible tbody tr.is-first.removed-class.closed td:first-child:before {
2690
+ background-color: #ffffff ;
2691
+ left: 0;
2692
+ width: 16px;
2693
+ height: calc(100% + 1px);
2694
+ }
2695
+
2696
+ .psui-el-table-results.layout-flexible tbody tr.is-first.removed-class.closed td:first-child:after {
2697
+ --bg-opacity: 1;
2698
+ background-color: #F3F6F9;
2699
+ background-color: rgba(243, 246, 249, var(--bg-opacity));
2700
+ border-top-left-radius: 9999px;
2701
+ border-bottom-left-radius: 9999px;
2702
+ box-shadow: -8px 0px 0px 4px #ffffff;
2703
+ z-index: 30;
2704
+ top: 0;
2705
+ left: 16px;
2706
+ width: 10px;
2707
+ height: calc(100%);
2708
+ }
2709
+
2637
2710
  .psui-el-table-results.layout-flexible tbody tr:not(.is-first):not(.removed-class) td:first-child {
2638
2711
  position: sticky;
2639
2712
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@policystudio/policy-studio-ui-vue",
3
- "version": "1.1.64",
3
+ "version": "1.1.66",
4
4
  "description": "Policy Studio UI",
5
5
  "main": "src/index.js",
6
6
  "author": "Policy Studio Team",
@@ -348,7 +348,7 @@
348
348
  }
349
349
 
350
350
  thead {
351
- @apply psui-bg-white psui-items-start psui-shadow-elevation-10 psui-sticky psui-top-0 psui-z-15;
351
+ @apply psui-bg-white psui-items-start psui-sticky psui-top-0 psui-z-15;
352
352
 
353
353
  &:after {
354
354
  content: '';
@@ -362,7 +362,7 @@
362
362
  }
363
363
 
364
364
  th {
365
- @apply psui-pl-6 psui-text-gray-50 psui-text-right psui-w-auto psui-align-top;
365
+ @apply psui-pl-4 psui-text-gray-50 psui-text-right psui-w-auto psui-align-top;
366
366
  padding-top: 0.438rem;
367
367
  padding-bottom: 0.625rem;
368
368
 
@@ -372,12 +372,26 @@
372
372
  }
373
373
 
374
374
  &:first-child {
375
- @apply psui-pl-4 psui-pr-8 psui-text-left psui-bg-white psui-sticky psui-z-10 psui-left-0;
375
+ @apply psui-pl-4 psui-pr-4 psui-text-left psui-bg-white psui-sticky psui-z-10 psui-left-0;
376
+
376
377
 
377
378
  > div {
378
379
  @apply psui-items-start;
379
380
  }
381
+
382
+ &.pseudo-line {
383
+ &::after {
384
+ content: '';
385
+ position: absolute;
386
+ top: 10px;
387
+ right: 0;
388
+ width: 1px;
389
+ height: calc(100%);
390
+ background-color: #D6DDE5;
391
+ }
392
+ }
380
393
  }
394
+
381
395
  }
382
396
 
383
397
  &:first-of-type {
@@ -385,15 +399,14 @@
385
399
  @apply psui-text-left;
386
400
  padding-top: 0;
387
401
  padding-bottom: 0;
388
- min-width: 596px;
402
+ min-width: 497px;
403
+ position: sticky;
389
404
 
390
405
  > div {
391
406
  @apply psui-flex psui-flex-row psui-border-b psui-border-gray-30;
392
407
  padding-top: 0.5rem;
393
408
  padding-bottom: 0.625rem;
394
409
  }
395
-
396
-
397
410
  }
398
411
 
399
412
  p {
@@ -414,7 +427,18 @@
414
427
 
415
428
  &:first-child {
416
429
  @apply psui-text-left;
417
- min-width: 388px;
430
+ min-width: 357px;
431
+ }
432
+
433
+ &:nth-child(2) {
434
+ @apply psui-sticky psui-z-10 psui-bg-white;
435
+ left:357px;
436
+ min-width: 140px;
437
+ }
438
+
439
+ &:nth-child(3) {
440
+ @apply psui-sticky psui-z-10 psui-bg-white;
441
+ left: 497px;
418
442
  }
419
443
  }
420
444
  }
@@ -479,6 +503,20 @@
479
503
  @apply psui-pl-2 psui-pr-8 psui-text-left psui-block psui-sticky psui-z-10 psui-left-0;
480
504
  padding-top: 8px;
481
505
  padding-bottom: 8px;
506
+ min-width: 357px;
507
+ }
508
+
509
+ &:nth-child(2) {
510
+ @apply psui-sticky psui-z-10;
511
+ min-width: 140px;
512
+ left: 357px;
513
+ }
514
+
515
+ &:nth-child(3) {
516
+ @apply psui-sticky psui-z-10;
517
+ min-width: 140px;
518
+ left: 497px;
519
+ padding-right: 22px;
482
520
  }
483
521
 
484
522
  .psui-el-tooltip-dialog {
@@ -540,8 +578,37 @@
540
578
  height: 10px;
541
579
  }
542
580
  }
543
-
544
- }
581
+ }
582
+
583
+ &.closed {
584
+ td {
585
+ &:first-child {
586
+ @apply psui-sticky;
587
+
588
+ &:before,
589
+ &:after {
590
+ content: '';
591
+ @apply psui-absolute psui-top-0;
592
+ }
593
+
594
+ &:before {
595
+ @apply psui-bg-white psui-left-0;
596
+ width: 16px;
597
+ height: calc(100% + 1px);
598
+ }
599
+
600
+ &:after {
601
+ @apply psui-bg-gray-10 psui-rounded-tl-full psui-rounded-bl-full;
602
+ box-shadow: -8px 0px 0px 4px #ffffff;
603
+ z-index: 30;
604
+ top: 0;
605
+ left: 16px;
606
+ width: 10px;
607
+ height: calc(100%);
608
+ }
609
+ }
610
+ }
611
+ }
545
612
  }
546
613
 
547
614
  }
@@ -655,9 +655,38 @@ export default {
655
655
  const max = Math.max(...this.getRows.map(item => item.data[key]))
656
656
  return (value * 100) / max
657
657
  },
658
+ setVerticalStyleWhenScroolingForFlexibleLayout(tableWrapper){
659
+ if(tableWrapper.scrollTop > 0 && tableWrapper.classList.contains('table-flexible')) {
660
+ tableWrapper.getElementsByTagName('thead')[0].style.boxShadow = '0px 0px 8px rgba(0, 0, 0, 0.04), 0px 2px 5px rgba(0, 0, 0, 0.08)'
661
+ } else if(tableWrapper.classList.contains('table-flexible')) {
662
+ tableWrapper.getElementsByTagName('thead')[0].style.boxShadow = '0 0 0 rgba(0, 0, 0, 0)'
663
+ }
664
+ },
665
+ setHorizontalStyleWhenScrollingForFlexibleLayout(tableWrapper){
666
+ const firstHeaderElement = tableWrapper.querySelector('thead > tr:first-child > th:first-child')
667
+ const secondHeaderElment = tableWrapper.querySelector('thead > tr:not(:first-of-type) > th:nth-child(3)')
668
+ const getAllOtherBodyElements = tableWrapper.querySelectorAll( 'tbody > tr > td:nth-child(3)')
658
669
 
670
+ if (tableWrapper.scrollLeft > 0 && tableWrapper.classList.contains('table-flexible')) {
671
+ firstHeaderElement.classList.add('pseudo-line')
672
+ secondHeaderElment.style.boxShadow = 'inset -1px 0px 0px #D6DDE5'
673
+ getAllOtherBodyElements.forEach(element => {
674
+ element.style.boxShadow = 'inset -1px 0px 0px #D6DDE5'
675
+ })
676
+ } else if(tableWrapper.classList.contains('table-flexible')) {
677
+ firstHeaderElement.classList.remove('pseudo-line')
678
+ secondHeaderElment.style.boxShadow = '0 0 0 rgba(0, 0, 0, 0)'
679
+ getAllOtherBodyElements.forEach(element => {
680
+ element.style.boxShadow = '0 0 0 rgba(0, 0, 0, 0)'
681
+ })
682
+ }
683
+ },
659
684
  handleTableScroll() {
660
685
  const tableWrapper = this.$refs.tableWrapper
686
+
687
+ this.setVerticalStyleWhenScroolingForFlexibleLayout(tableWrapper)
688
+ this.setHorizontalStyleWhenScrollingForFlexibleLayout(tableWrapper)
689
+
661
690
  if (tableWrapper.scrollLeft > 0) {
662
691
  this.isSticky = true
663
692
  } else {