@bagelink/vue 0.0.600 → 0.0.605

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/dist/style.css CHANGED
@@ -640,19 +640,19 @@ a[data-v-59ea4a90] {
640
640
  }
641
641
  }
642
642
 
643
- .selected[data-v-73d79ea6] {
643
+ .selected[data-v-84e79d8d] {
644
644
  background: var(--bgl-primary-tint);
645
645
  }
646
- tbody tr.selected[data-v-73d79ea6]:hover {
646
+ tbody tr.selected[data-v-84e79d8d]:hover {
647
647
  background: var(--bgl-primary-light);
648
648
  }
649
- .loading-table[data-v-73d79ea6] {
649
+ .loading-table[data-v-84e79d8d] {
650
650
  position: relative;
651
651
  }
652
- .inset[data-v-73d79ea6] {
652
+ .inset[data-v-84e79d8d] {
653
653
  inset: 0;
654
654
  }
655
- .loading-table-animation[data-v-73d79ea6] {
655
+ .loading-table-animation[data-v-84e79d8d] {
656
656
  --size: 60px;
657
657
  top: 30vh;
658
658
  inset-inline-start: calc(50% - var(--size));
@@ -660,9 +660,9 @@ tbody tr.selected[data-v-73d79ea6]:hover {
660
660
  border-top: 4px solid var(--bgl-primary);
661
661
  width: var(--size);
662
662
  height: var(--size);
663
- animation: loading-table-73d79ea6 1s linear infinite;
663
+ animation: loading-table-84e79d8d 1s linear infinite;
664
664
  }
665
- @keyframes loading-table-73d79ea6 {
665
+ @keyframes loading-table-84e79d8d {
666
666
  0% {
667
667
  transform: translate(-50%, -50%) rotate(0deg);
668
668
  }
@@ -670,51 +670,51 @@ tbody tr.selected[data-v-73d79ea6]:hover {
670
670
  transform: translate(-50%, -50%) rotate(360deg);
671
671
  }
672
672
  }
673
- .list-arrows[data-v-73d79ea6] {
673
+ .list-arrows[data-v-84e79d8d] {
674
674
  opacity: 0;
675
675
  }
676
- .list-arrows .bgl_icon-font[data-v-73d79ea6] {
676
+ .list-arrows .bgl_icon-font[data-v-84e79d8d] {
677
677
  transition: all ease-in-out 0.2s;
678
678
  }
679
- .list-arrows.sorted[data-v-73d79ea6] {
679
+ .list-arrows.sorted[data-v-84e79d8d] {
680
680
  opacity: 1;
681
681
  }
682
- .col img[data-v-73d79ea6] {
682
+ .col img[data-v-84e79d8d] {
683
683
  height: 35px;
684
684
  margin-top: -14px;
685
685
  margin-bottom: -14px;
686
686
  border-radius: 5px;
687
687
  }
688
- .list-arrows.sorted .desc[data-v-73d79ea6] {
688
+ .list-arrows.sorted .desc[data-v-84e79d8d] {
689
689
  transform: rotate(180deg);
690
690
  }
691
- table[data-v-73d79ea6] {
691
+ table[data-v-84e79d8d] {
692
692
  border-collapse: separate;
693
693
  border-spacing: 0 15px;
694
694
  border-collapse: collapse;
695
695
  width: 100%;
696
696
  }
697
- th[data-v-73d79ea6] {
697
+ th[data-v-84e79d8d] {
698
698
  font-size: 0.8rem;
699
699
  color: var(--bgl-black-tint);
700
700
  position: sticky;
701
701
  top: 0;
702
702
  z-index: 2;
703
703
  background: var(--bgl-white);
704
- height: var(--59d71ad2);
704
+ height: var(--2438e78c);
705
705
  vertical-align: bottom;
706
706
  font-weight: 400;
707
707
  text-align: start;
708
708
  }
709
- .embedded-field[data-v-73d79ea6] {
709
+ .embedded-field[data-v-84e79d8d] {
710
710
  margin-bottom: -0.2rem;
711
711
  margin-top: -0.2rem;
712
712
  }
713
- .row[data-v-73d79ea6] {
713
+ .row[data-v-84e79d8d] {
714
714
  border-bottom: 1px solid var(--border-color);
715
715
  cursor: pointer;
716
716
  }
717
- .row.first-row[data-v-73d79ea6] {
717
+ .row.first-row[data-v-84e79d8d] {
718
718
  font-size: 0.8rem;
719
719
  color: var(--bgl-black-tint);
720
720
  position: sticky;
@@ -723,7 +723,7 @@ th[data-v-73d79ea6] {
723
723
  background: var(--bgl-white);
724
724
  vertical-align: bottom;
725
725
  }
726
- .row.first-row[data-v-73d79ea6]::after {
726
+ .row.first-row[data-v-84e79d8d]::after {
727
727
  content: '';
728
728
  border-bottom: 1px solid var(--border-color);
729
729
  position: absolute;
@@ -731,30 +731,30 @@ th[data-v-73d79ea6] {
731
731
  right: 0;
732
732
  bottom: -1px;
733
733
  }
734
- .first-row .col[data-v-73d79ea6] {
734
+ .first-row .col[data-v-84e79d8d] {
735
735
  cursor: pointer;
736
736
  background: var(--bgl-white);
737
737
  }
738
- .col[data-v-73d79ea6] {
738
+ .col[data-v-84e79d8d] {
739
739
  white-space: nowrap;
740
740
  padding: 0.75rem 1rem;
741
741
  transition: var(--bgl-transition);
742
742
  line-height: 1;
743
743
  align-items: center;
744
744
  }
745
- .col[data-v-73d79ea6]:has(.bagel-input) {
745
+ .col[data-v-84e79d8d]:has(.bagel-input) {
746
746
  padding: 0rem 0.25rem;
747
747
  }
748
- .col>div[data-v-73d79ea6] {
748
+ .col > div[data-v-84e79d8d] {
749
749
  display: flex;
750
750
  gap: 0.5rem;
751
751
  }
752
- .max-col-width[data-v-73d79ea6] {
752
+ .max-col-width[data-v-84e79d8d] {
753
753
  max-width: 30vw;
754
754
  overflow: hidden;
755
755
  text-overflow: ellipsis;
756
756
  }
757
- .col.check .bgl_icon-font[data-v-73d79ea6] {
757
+ .col.check .bgl_icon-font[data-v-84e79d8d] {
758
758
  border-radius: 100%;
759
759
  background: var(--bgl-blue-20);
760
760
  color: var(--bgl-primary);
@@ -765,35 +765,35 @@ th[data-v-73d79ea6] {
765
765
  justify-content: center;
766
766
  margin-top: -2px;
767
767
  }
768
- .rows[data-v-73d79ea6] {
768
+ .rows[data-v-84e79d8d] {
769
769
  font-size: 0.88em;
770
770
  }
771
- .table-list[data-v-73d79ea6] {
771
+ .table-list[data-v-84e79d8d] {
772
772
  height: 100%;
773
773
  position: relative;
774
774
  padding-left: 0 !important;
775
775
  padding-right: 0 !important;
776
776
  overflow: auto;
777
777
  }
778
- .BagelTable .table-list[data-v-73d79ea6] {
778
+ .BagelTable .table-list[data-v-84e79d8d] {
779
779
  overflow: unset;
780
780
  }
781
- .row-item[data-v-73d79ea6] {
782
- height: var(--59d71ad2);
781
+ .row-item[data-v-84e79d8d] {
782
+ height: var(--2438e78c);
783
783
  transition: all 200ms ease;
784
784
  }
785
- .row-item[data-v-73d79ea6]:hover {
785
+ .row-item[data-v-84e79d8d]:hover {
786
786
  background: var(--bgl-gray-light);
787
787
  }
788
- .row-item input[type='checkbox'][data-v-73d79ea6] {
788
+ .row-item input[type='checkbox'][data-v-84e79d8d] {
789
789
  margin-top: 0.45rem !important;
790
790
  accent-color: var(--bgl-primary);
791
791
  }
792
- .infinite-wrapper[data-v-73d79ea6] {
792
+ .infinite-wrapper[data-v-84e79d8d] {
793
793
  overflow-y: auto;
794
794
  width: 100%;
795
795
  }
796
- input[type='checkbox'][data-v-73d79ea6] {
796
+ input[type='checkbox'][data-v-84e79d8d] {
797
797
  margin-top: 0.3rem !important;
798
798
  accent-color: var(--bgl-primary);
799
799
  transform: scale(1.2);
@@ -805,7 +805,7 @@ input[type='checkbox'][data-v-73d79ea6] {
805
805
  height: 0.85rem;
806
806
  width: 0.85rem;
807
807
  }
808
- input[type='checkbox'][data-v-73d79ea6]::before {
808
+ input[type='checkbox'][data-v-84e79d8d]::before {
809
809
  content: '';
810
810
  height: 0.85rem;
811
811
  width: 0.85rem;
@@ -818,18 +818,18 @@ input[type='checkbox'][data-v-73d79ea6]::before {
818
818
  transform: scale(1);
819
819
  position: absolute;
820
820
  }
821
- input[type='checkbox'][data-v-73d79ea6]:hover::before {
821
+ input[type='checkbox'][data-v-84e79d8d]:hover::before {
822
822
  opacity: 0.2;
823
823
  transform: scale(2);
824
824
  }
825
- [lang='he'] [dir='ltr'][data-v-73d79ea6] {
825
+ [lang='he'] [dir='ltr'][data-v-84e79d8d] {
826
826
  text-align: right;
827
827
  }
828
- th input[type='checkbox'][data-v-73d79ea6] {
828
+ th input[type='checkbox'][data-v-84e79d8d] {
829
829
  transform: translateY(0.2rem) scale(1.2);
830
830
  accent-color: var(--bgl-primary);
831
831
  }
832
- th[data-v-73d79ea6]::after {
832
+ th[data-v-84e79d8d]::after {
833
833
  content: '';
834
834
  border-bottom: 1px solid var(--border-color);
835
835
  position: absolute;
@@ -837,49 +837,49 @@ th[data-v-73d79ea6]::after {
837
837
  right: 0;
838
838
  bottom: -1px;
839
839
  }
840
- tr[data-v-73d79ea6] {
840
+ tr[data-v-84e79d8d] {
841
841
  border-bottom: 1px solid var(--border-color);
842
842
  cursor: pointer;
843
843
  align-items: center;
844
844
  }
845
- td[data-v-73d79ea6],
846
- th[data-v-73d79ea6] {
845
+ td[data-v-84e79d8d],
846
+ th[data-v-84e79d8d] {
847
847
  white-space: nowrap;
848
848
  padding: 0.75rem 0.65rem;
849
849
  transition: var(--bgl-transition);
850
850
  line-height: 1;
851
851
  }
852
- tbody tr[data-v-73d79ea6] {
852
+ tbody tr[data-v-84e79d8d] {
853
853
  font-size: 0.88em;
854
- height: var(--59d71ad2);
854
+ height: var(--2438e78c);
855
855
  transition: all 200ms ease;
856
856
  }
857
- tbody tr[data-v-73d79ea6]:hover {
857
+ tbody tr[data-v-84e79d8d]:hover {
858
858
  background: var(--bgl-gray-light);
859
859
  }
860
860
 
861
- [data-v-792f7ec0]{
861
+ [data-v-d1cbc45f] {
862
862
  /* outline: rebeccapurple 1px solid; */
863
863
  }
864
- .data[data-v-792f7ec0] {
864
+ .data[data-v-d1cbc45f] {
865
865
  font-size: var(--input-font-size);
866
866
  border: 1.1px solid var(--border-color);
867
867
  padding: 20px;
868
868
  border-radius: var(--input-border-radius);
869
869
  }
870
- .data-row[data-v-792f7ec0] {
870
+ .data-row[data-v-d1cbc45f] {
871
871
  display: flex;
872
872
  justify-content: space-between;
873
873
  border-bottom: 1px solid var(--border-color);
874
874
  align-items: center;
875
875
  min-height: 50px;
876
876
  }
877
- .data-row .bagel-input.shrink[data-v-792f7ec0],
878
- .data-row .bagel-input.shrink input[data-v-792f7ec0] {
877
+ .data-row .bagel-input.shrink[data-v-d1cbc45f],
878
+ .data-row .bagel-input.shrink input[data-v-d1cbc45f] {
879
879
  min-width: 140px !important;
880
880
  /* margin-top: -0.45rem !important; */
881
881
  }
882
- .data-link[data-v-792f7ec0] {
882
+ .data-link[data-v-d1cbc45f] {
883
883
  display: block;
884
884
  font-size: var(--input-font-size);
885
885
  margin-bottom: 2px;
@@ -887,7 +887,7 @@ tbody tr[data-v-73d79ea6]:hover {
887
887
  color: var(--input-color);
888
888
  }
889
889
  @media screen and (max-width: 910px) {
890
- .data-row[data-v-792f7ec0] {
890
+ .data-row[data-v-d1cbc45f] {
891
891
  display: block;
892
892
  /* min-height: 80px; */
893
893
  padding-bottom: 1rem;
@@ -2360,7 +2360,7 @@ svg.leaflet-image-layer.leaflet-interactive path {
2360
2360
  color: var(--bgl-white);
2361
2361
  }
2362
2362
 
2363
- .bagel-input .fileUploadWrap[data-v-5409803c] {
2363
+ .bagel-input .fileUploadWrap[data-v-6716fd45] {
2364
2364
  --width: 320px;
2365
2365
  outline: 1px solid var(--border-color);
2366
2366
  border-radius: var(--input-border-radius);
@@ -2373,7 +2373,7 @@ svg.leaflet-image-layer.leaflet-interactive path {
2373
2373
  overflow-y: auto;
2374
2374
  background: var(--input-bg);
2375
2375
  }
2376
- .previewName[data-v-5409803c] {
2376
+ .previewName[data-v-6716fd45] {
2377
2377
  padding: 0.5rem;
2378
2378
  text-align: start;
2379
2379
  color: var(--input-color);
@@ -2383,18 +2383,18 @@ svg.leaflet-image-layer.leaflet-interactive path {
2383
2383
  align-items: center;
2384
2384
  padding-inline: 14px;
2385
2385
  }
2386
- .previewName p[data-v-5409803c] {
2386
+ .previewName p[data-v-6716fd45] {
2387
2387
  overflow: hidden;
2388
2388
  text-overflow: ellipsis;
2389
2389
  white-space: nowrap;
2390
2390
  }
2391
- .imagePreviewWrap[data-v-5409803c] {
2391
+ .imagePreviewWrap[data-v-6716fd45] {
2392
2392
  background: var(--input-bg);
2393
2393
  border-radius: var(--input-border-radius);
2394
2394
  padding: 5px;
2395
2395
  min-height: 90px;
2396
2396
  }
2397
- img.preview[data-v-5409803c] {
2397
+ img.preview[data-v-6716fd45] {
2398
2398
  /* max-height: calc(var(--width) / 2); */
2399
2399
  /* max-width: calc(var(--width) * 2); */
2400
2400
  width: 40px;
@@ -2404,19 +2404,19 @@ img.preview[data-v-5409803c] {
2404
2404
  background: var(--bgl-gray-light);
2405
2405
  box-shadow: 0 0 10px #00000012;
2406
2406
  }
2407
- img.preview.single[data-v-5409803c] {
2407
+ img.preview.single[data-v-6716fd45] {
2408
2408
  max-width: var(--width);
2409
- width: auto;
2409
+ width: calc(100% - 2.75rem);
2410
2410
  object-fit: contain;
2411
2411
  height: auto;
2412
2412
  max-height: calc(var(--width) / 2);
2413
2413
  margin: 1rem;
2414
2414
  }
2415
- .fileUploadWrap.dragover[data-v-5409803c],
2416
- .fileUploadWrap[data-v-5409803c]:hover {
2415
+ .fileUploadWrap.dragover[data-v-6716fd45],
2416
+ .fileUploadWrap[data-v-6716fd45]:hover {
2417
2417
  box-shadow: inset 0 0 10px #00000012;
2418
2418
  }
2419
- .bagel-input .fileUploadWrap.fileDropZone[data-v-5409803c] {
2419
+ .bagel-input .fileUploadWrap.fileDropZone[data-v-6716fd45] {
2420
2420
  background: var(--input-bg);
2421
2421
  display: flex;
2422
2422
  align-items: center;
@@ -2424,7 +2424,7 @@ img.preview.single[data-v-5409803c] {
2424
2424
  color: var(--bgl-gray);
2425
2425
  flex-direction: column;
2426
2426
  }
2427
- .pie[data-v-5409803c] {
2427
+ .pie[data-v-6716fd45] {
2428
2428
  width: 30px;
2429
2429
  height: 30px;
2430
2430
  position: relative;
@@ -2432,7 +2432,7 @@ img.preview.single[data-v-5409803c] {
2432
2432
  align-items: center;
2433
2433
  justify-content: center;
2434
2434
  }
2435
- .pie[data-v-5409803c]:before {
2435
+ .pie[data-v-6716fd45]:before {
2436
2436
  content: '';
2437
2437
  position: absolute;
2438
2438
  border-radius: 50%;
@@ -2450,26 +2450,26 @@ img.preview.single[data-v-5409803c] {
2450
2450
  #000 calc(100% - var(--b))
2451
2451
  );
2452
2452
  }
2453
- .pie .success[data-v-5409803c] {
2453
+ .pie .success[data-v-6716fd45] {
2454
2454
  transform: scale(0);
2455
2455
  opacity: 0;
2456
2456
  transition: all 0.3s ease-in-out;
2457
2457
  }
2458
- .pie .progress[data-v-5409803c] {
2458
+ .pie .progress[data-v-6716fd45] {
2459
2459
  position: absolute;
2460
2460
  font-size: 10px;
2461
2461
  }
2462
- .pie.complete .progress[data-v-5409803c] {
2462
+ .pie.complete .progress[data-v-6716fd45] {
2463
2463
  display: none;
2464
2464
  }
2465
- .pie.complete .success[data-v-5409803c] {
2465
+ .pie.complete .success[data-v-6716fd45] {
2466
2466
  transform: scale(1.3);
2467
2467
  opacity: 1;
2468
2468
  }
2469
- .pie.complete[data-v-5409803c]:before {
2469
+ .pie.complete[data-v-6716fd45]:before {
2470
2470
  background: conic-gradient(var(--bgl-green) calc(var(--p) * 1%), #0000 0);
2471
2471
  }
2472
- .pie.complete[data-v-5409803c] {
2472
+ .pie.complete[data-v-6716fd45] {
2473
2473
  color: var(--bgl-green);
2474
2474
  }
2475
2475
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAG/D,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,IAAI,EAAE,KAAK,SAAM,QAGnD;AAED,wBAAgB,UAAU,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAI3D;AAED,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,iBAGtE;AAED,wBAAgB,QAAQ,CAAC,GAAG,MAAM,EAAE,MAAM,EAAE,UAG3C;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,IAAI,QAIrE;AAED,wBAAgB,QAAQ,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,OAAO,EAAE,GAAG,EAAE,UAKpE;AAED,wBAAgB,SAAS,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,CAAC,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,OAU7F;AAED,wBAAgB,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,OAM9C;AAED,wBAAgB,SAAS,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,OAGzE;AAED,eAAO,MAAM,MAAM,eAAgB,GAAG,YAA0C,CAAA;AAEhF,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAA;AAElD,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAEhC,wBAAgB,iBAAiB,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,cAAc,CAerF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAG/D,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,IAAI,EAAE,KAAK,SAAM,QAGnD;AAED,wBAAgB,UAAU,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAK3D;AAED,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,iBAGtE;AAED,wBAAgB,QAAQ,CAAC,GAAG,MAAM,EAAE,MAAM,EAAE,UAG3C;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,IAAI,QAIrE;AAED,wBAAgB,QAAQ,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,OAAO,EAAE,GAAG,EAAE,UAKpE;AAED,wBAAgB,SAAS,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,CAAC,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,OAU7F;AAED,wBAAgB,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,OAM9C;AAED,wBAAgB,SAAS,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,OAGzE;AAED,eAAO,MAAM,MAAM,eAAgB,GAAG,YAA0C,CAAA;AAEhF,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAA;AAElD,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAEhC,wBAAgB,iBAAiB,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,cAAc,CAerF"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "0.0.600",
4
+ "version": "0.0.605",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Neveh Allon",
@@ -54,7 +54,7 @@
54
54
  "@types/leaflet": "^1.9.12",
55
55
  "@types/signature_pad": "^2.3.6",
56
56
  "@vue-macros/reactivity-transform": "^0.4.6",
57
- "vue": "^3.4.32"
57
+ "vue": "^3.4.33"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "@bagelink/sdk": "*",
@@ -5,23 +5,44 @@ import {
5
5
  Title,
6
6
  getFallbackSchema,
7
7
  iffer,
8
- keyToLabel
8
+ keyToLabel,
9
9
  } from '@bagelink/vue'
10
10
 
11
11
  const props = defineProps<{
12
12
  showFields?: string[]
13
13
  schema?: BglFormSchemaT
14
14
  title?: string
15
+ excludeUnset?: boolean
15
16
  }>()
16
17
 
17
18
  const itemData = defineModel<Record<string, any>>('data', { default: {} })
18
19
 
19
- const computedSchema = $computed(
20
- () => getFallbackSchema(
21
- [itemData.value],
22
- props.showFields
23
- ),
24
- )
20
+ function dataTransform(dataValue: any): any {
21
+ if (!dataValue) return dataValue
22
+ if (Array.isArray(dataValue)) return dataValue.map(dataTransform)
23
+ if (typeof dataValue === 'object') {
24
+ Object.keys(dataValue).forEach((key) => {
25
+ dataValue[key] = dataTransform(dataValue[key])
26
+ })
27
+ }
28
+ if (
29
+ typeof dataValue === 'string'
30
+ && /\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/.test(dataValue)
31
+ ) {
32
+ const date = new Date(dataValue)
33
+ return date.toDateString()
34
+ }
35
+ return dataValue
36
+ }
37
+
38
+ function isUnset(value: any) {
39
+ if (!props.excludeUnset) return false
40
+ return (
41
+ value === undefined || value === null || value === '' || value.length === 0
42
+ )
43
+ }
44
+
45
+ const computedSchema = $computed(() => getFallbackSchema([itemData.value], props.showFields))
25
46
  </script>
26
47
 
27
48
  <template>
@@ -34,25 +55,36 @@ const computedSchema = $computed(
34
55
  {{ field?.label || keyToLabel(field.id) }}
35
56
  </p>
36
57
  </div>
37
- <BglField v-model="itemData" label="" style="width: min-content; min-width: 140px" :field />
58
+ <BglField
59
+ v-model="itemData"
60
+ label=""
61
+ style="width: min-content; min-width: 140px"
62
+ :field
63
+ />
38
64
  </div>
39
65
  </template>
40
66
  <div v-if="!schema?.length">
41
- <div v-for="({ id, label }) in computedSchema" :key="id" class="data-row">
42
- <div class="key">
43
- <p class="m-0">{{ label }}</p>
44
- </div>
45
- <div class="vlue">
46
- <p class="m-0">{{ itemData[id ?? ''] }}</p>
67
+ <template v-for="{ id, label } in computedSchema" :key="id">
68
+ <div v-if="!isUnset(itemData[id as any])" class="data-row">
69
+ <div class="key">
70
+ <p class="m-0">
71
+ {{ label }}
72
+ </p>
73
+ </div>
74
+ <div>
75
+ <p v-if="id" class="m-0">
76
+ {{ dataTransform(itemData[id]) }}
77
+ </p>
78
+ </div>
47
79
  </div>
48
- </div>
80
+ </template>
49
81
  </div>
50
82
  <slot name="footer" />
51
83
  </div>
52
84
  </template>
53
85
 
54
86
  <style scoped>
55
- *{
87
+ * {
56
88
  /* outline: rebeccapurple 1px solid; */
57
89
  }
58
90
  .data {
@@ -91,7 +123,6 @@ const computedSchema = $computed(
91
123
  }
92
124
  </style>
93
125
 
94
-
95
126
  <style>
96
127
  .data-row .bagel-input,
97
128
  .data-row .bagel-input input {
@@ -99,4 +130,4 @@ const computedSchema = $computed(
99
130
  /* margin-top: 0.5rem !important; */
100
131
  height: calc(var(--input-height) - 0.25rem) !important;
101
132
  }
102
- </style>
133
+ </style>
@@ -32,12 +32,11 @@ const isSelectable = $computed(() => Array.isArray(props.selectedItems))
32
32
 
33
33
  const computedSortField = $computed(() => `_transformed_${sortField}`)
34
34
 
35
- const computedSchema = $computed(
36
- () => useBglSchema({
37
- schema: props.schema,
38
- showFields: props.showFields,
39
- data: props.data,
40
- })
35
+ const computedSchema = $computed(() => useBglSchema({
36
+ schema: props.schema,
37
+ showFields: props.showFields,
38
+ data: props.data,
39
+ })
41
40
  )
42
41
 
43
42
  function transform(rowData: any) {
@@ -141,7 +140,12 @@ function updateAllSelectorState() {
141
140
 
142
141
  function toggleSelectItem(item: Record<string, any>) {
143
142
  if (!computedSelectedItems.length) {
144
- emit('select', item)
143
+ const obj = { ...item }
144
+ Object.keys(obj).forEach((key) => {
145
+ if (key.startsWith('_transformed_')) delete obj[key]
146
+ })
147
+
148
+ emit('select', obj)
145
149
  return
146
150
  }
147
151
  const index = computedSelectedItems.indexOf(item.id)
@@ -171,10 +175,7 @@ function toggleSelectAll(event: Event) {
171
175
  >
172
176
  <div class="loading-table-animation absolute oval" />
173
177
  </div>
174
- <div
175
- v-else
176
- v-bind="wrapperProps"
177
- >
178
+ <div v-else v-bind="wrapperProps">
178
179
  <table class="infinite-wrapper">
179
180
  <thead class="row first-row">
180
181
  <th v-if="isSelectable">
@@ -376,7 +377,7 @@ th {
376
377
  padding: 0rem 0.25rem;
377
378
  }
378
379
 
379
- .col>div {
380
+ .col > div {
380
381
  display: flex;
381
382
  gap: 0.5rem;
382
383
  }
@@ -293,7 +293,7 @@ img.preview {
293
293
 
294
294
  img.preview.single {
295
295
  max-width: var(--width);
296
- width: auto;
296
+ width: calc(100% - 2.75rem);
297
297
  object-fit: contain;
298
298
  height: auto;
299
299
  max-height: calc(var(--width) / 2);
@@ -1,4 +1,6 @@
1
1
  import { type BglFormSchemaFnT, type BglFormSchemaT, getFallbackSchema } from '@bagelink/vue'
2
+ import type { Ref, UnwrapRef } from 'vue'
3
+ import { ref, watch } from 'vue'
2
4
 
3
5
  interface useBglSchemaParamsT {
4
6
  schema?: BglFormSchemaFnT
@@ -22,3 +24,15 @@ export function useBglSchema(
22
24
  }
23
25
  return getFallbackSchema(data, showFields)
24
26
  }
27
+
28
+ export function useLocalStorage<T>(key: string, initialValue: T): Ref<UnwrapRef<T>> {
29
+ const storedValue = localStorage.getItem(key)
30
+ const initial = storedValue ? JSON.parse(storedValue) : initialValue
31
+ const value = ref<T>(initial)
32
+
33
+ watch(() => value.value, (val) => {
34
+ localStorage.setItem(key, JSON.stringify(val))
35
+ }, { immediate: true, deep: true })
36
+
37
+ return value
38
+ }
@@ -7,7 +7,8 @@ export function debounce(fn: () => void, delay = 500) {
7
7
  }
8
8
 
9
9
  export function keyToLabel(key?: string): string | undefined {
10
- return key?.split('_')
10
+ if (key === undefined) return key
11
+ return key.split('_')
11
12
  .map(k => k.charAt(0).toUpperCase() + k.slice(1))
12
13
  .join(' ') || key
13
14
  }
package/tsconfig.json CHANGED
@@ -1,4 +1,5 @@
1
1
  {
2
+ "extends": "@vue/tsconfig/tsconfig.dom.json",
2
3
  "compilerOptions": {
3
4
  "target": "ESNext",
4
5
  "baseUrl": ".",
@@ -41,6 +42,7 @@
41
42
  },
42
43
  },
43
44
  "include": [
45
+ "env.d.ts",
44
46
  "**/**/*.ts",
45
47
  "**/**/*.vue",
46
48
  "**/**/*.d.ts",
@@ -1,10 +0,0 @@
1
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, {
2
- trigger?(_: {}): any;
3
- }>;
4
- export default _default;
5
- type __VLS_WithTemplateSlots<T, S> = T & {
6
- new (): {
7
- $slots: S;
8
- };
9
- };
10
- //# sourceMappingURL=Popover.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Popover.vue.d.ts","sourceRoot":"","sources":["../../src/components/Popover.vue"],"names":[],"mappings":"AAoBA;AAEA,OAAO,6BAA6B,CAAC;;;;AAmHrC,wBAAwG;AACxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}