@bagelink/vue 0.0.602 → 0.0.610

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 (31) hide show
  1. package/dist/components/DataPreview.vue.d.ts +6 -0
  2. package/dist/components/DataPreview.vue.d.ts.map +1 -1
  3. package/dist/components/Drop.vue.d.ts +34 -0
  4. package/dist/components/Drop.vue.d.ts.map +1 -0
  5. package/dist/components/FileUploader.vue.d.ts +60 -0
  6. package/dist/components/FileUploader.vue.d.ts.map +1 -0
  7. package/dist/components/TableSchema.vue.d.ts.map +1 -1
  8. package/dist/components/form/ItemRef.vue.d.ts +1 -0
  9. package/dist/components/form/ItemRef.vue.d.ts.map +1 -1
  10. package/dist/components/form/inputs/FileUpload.vue.d.ts +11 -11
  11. package/dist/components/form/inputs/SelectField.vue.d.ts +1 -4
  12. package/dist/components/form/inputs/SelectField.vue.d.ts.map +1 -1
  13. package/dist/components/form/inputs/SignaturePad.vue.d.ts.map +1 -1
  14. package/dist/composables/index.d.ts +2 -0
  15. package/dist/composables/index.d.ts.map +1 -1
  16. package/dist/index.cjs +94 -49
  17. package/dist/index.mjs +95 -50
  18. package/dist/style.css +70 -72
  19. package/dist/utils/index.d.ts.map +1 -1
  20. package/package.json +13 -13
  21. package/src/components/DataPreview.vue +49 -21
  22. package/src/components/TableSchema.vue +14 -12
  23. package/src/components/form/inputs/FileUpload.vue +1 -1
  24. package/src/components/form/inputs/SignaturePad.vue +3 -2
  25. package/src/composables/index.ts +14 -0
  26. package/src/utils/index.ts +2 -1
  27. package/tsconfig.json +2 -0
  28. package/dist/components/Popover.vue.d.ts +0 -10
  29. package/dist/components/Popover.vue.d.ts.map +0 -1
  30. package/dist/types/materialIcon.d.ts +0 -2
  31. package/dist/types/materialIcon.d.ts.map +0 -1
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-d01cb754] {
644
644
  background: var(--bgl-primary-tint);
645
645
  }
646
- tbody tr.selected[data-v-73d79ea6]:hover {
646
+ tbody tr.selected[data-v-d01cb754]:hover {
647
647
  background: var(--bgl-primary-light);
648
648
  }
649
- .loading-table[data-v-73d79ea6] {
649
+ .loading-table[data-v-d01cb754] {
650
650
  position: relative;
651
651
  }
652
- .inset[data-v-73d79ea6] {
652
+ .inset[data-v-d01cb754] {
653
653
  inset: 0;
654
654
  }
655
- .loading-table-animation[data-v-73d79ea6] {
655
+ .loading-table-animation[data-v-d01cb754] {
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-d01cb754 1s linear infinite;
664
664
  }
665
- @keyframes loading-table-73d79ea6 {
665
+ @keyframes loading-table-d01cb754 {
666
666
  0% {
667
667
  transform: translate(-50%, -50%) rotate(0deg);
668
668
  }
@@ -670,51 +670,52 @@ 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-d01cb754] {
674
674
  opacity: 0;
675
675
  }
676
- .list-arrows .bgl_icon-font[data-v-73d79ea6] {
676
+ .list-arrows .bgl_icon-font[data-v-d01cb754] {
677
677
  transition: all ease-in-out 0.2s;
678
678
  }
679
- .list-arrows.sorted[data-v-73d79ea6] {
679
+ .list-arrows.sorted[data-v-d01cb754] {
680
680
  opacity: 1;
681
681
  }
682
- .col img[data-v-73d79ea6] {
682
+ .col img[data-v-d01cb754] {
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-d01cb754] {
689
689
  transform: rotate(180deg);
690
+ display: inline-block;
690
691
  }
691
- table[data-v-73d79ea6] {
692
+ table[data-v-d01cb754] {
692
693
  border-collapse: separate;
693
694
  border-spacing: 0 15px;
694
695
  border-collapse: collapse;
695
696
  width: 100%;
696
697
  }
697
- th[data-v-73d79ea6] {
698
+ th[data-v-d01cb754] {
698
699
  font-size: 0.8rem;
699
700
  color: var(--bgl-black-tint);
700
701
  position: sticky;
701
702
  top: 0;
702
703
  z-index: 2;
703
704
  background: var(--bgl-white);
704
- height: var(--59d71ad2);
705
+ height: var(--02b73339);
705
706
  vertical-align: bottom;
706
707
  font-weight: 400;
707
708
  text-align: start;
708
709
  }
709
- .embedded-field[data-v-73d79ea6] {
710
+ .embedded-field[data-v-d01cb754] {
710
711
  margin-bottom: -0.2rem;
711
712
  margin-top: -0.2rem;
712
713
  }
713
- .row[data-v-73d79ea6] {
714
+ .row[data-v-d01cb754] {
714
715
  border-bottom: 1px solid var(--border-color);
715
716
  cursor: pointer;
716
717
  }
717
- .row.first-row[data-v-73d79ea6] {
718
+ .row.first-row[data-v-d01cb754] {
718
719
  font-size: 0.8rem;
719
720
  color: var(--bgl-black-tint);
720
721
  position: sticky;
@@ -723,7 +724,7 @@ th[data-v-73d79ea6] {
723
724
  background: var(--bgl-white);
724
725
  vertical-align: bottom;
725
726
  }
726
- .row.first-row[data-v-73d79ea6]::after {
727
+ .row.first-row[data-v-d01cb754]::after {
727
728
  content: '';
728
729
  border-bottom: 1px solid var(--border-color);
729
730
  position: absolute;
@@ -731,30 +732,30 @@ th[data-v-73d79ea6] {
731
732
  right: 0;
732
733
  bottom: -1px;
733
734
  }
734
- .first-row .col[data-v-73d79ea6] {
735
+ .first-row .col[data-v-d01cb754] {
735
736
  cursor: pointer;
736
737
  background: var(--bgl-white);
737
738
  }
738
- .col[data-v-73d79ea6] {
739
+ .col[data-v-d01cb754] {
739
740
  white-space: nowrap;
740
741
  padding: 0.75rem 1rem;
741
742
  transition: var(--bgl-transition);
742
743
  line-height: 1;
743
744
  align-items: center;
744
745
  }
745
- .col[data-v-73d79ea6]:has(.bagel-input) {
746
+ .col[data-v-d01cb754]:has(.bagel-input) {
746
747
  padding: 0rem 0.25rem;
747
748
  }
748
- .col>div[data-v-73d79ea6] {
749
+ .col > div[data-v-d01cb754] {
749
750
  display: flex;
750
751
  gap: 0.5rem;
751
752
  }
752
- .max-col-width[data-v-73d79ea6] {
753
+ .max-col-width[data-v-d01cb754] {
753
754
  max-width: 30vw;
754
755
  overflow: hidden;
755
756
  text-overflow: ellipsis;
756
757
  }
757
- .col.check .bgl_icon-font[data-v-73d79ea6] {
758
+ .col.check .bgl_icon-font[data-v-d01cb754] {
758
759
  border-radius: 100%;
759
760
  background: var(--bgl-blue-20);
760
761
  color: var(--bgl-primary);
@@ -765,35 +766,35 @@ th[data-v-73d79ea6] {
765
766
  justify-content: center;
766
767
  margin-top: -2px;
767
768
  }
768
- .rows[data-v-73d79ea6] {
769
+ .rows[data-v-d01cb754] {
769
770
  font-size: 0.88em;
770
771
  }
771
- .table-list[data-v-73d79ea6] {
772
+ .table-list[data-v-d01cb754] {
772
773
  height: 100%;
773
774
  position: relative;
774
775
  padding-left: 0 !important;
775
776
  padding-right: 0 !important;
776
777
  overflow: auto;
777
778
  }
778
- .BagelTable .table-list[data-v-73d79ea6] {
779
+ .BagelTable .table-list[data-v-d01cb754] {
779
780
  overflow: unset;
780
781
  }
781
- .row-item[data-v-73d79ea6] {
782
- height: var(--59d71ad2);
782
+ .row-item[data-v-d01cb754] {
783
+ height: var(--02b73339);
783
784
  transition: all 200ms ease;
784
785
  }
785
- .row-item[data-v-73d79ea6]:hover {
786
+ .row-item[data-v-d01cb754]:hover {
786
787
  background: var(--bgl-gray-light);
787
788
  }
788
- .row-item input[type='checkbox'][data-v-73d79ea6] {
789
+ .row-item input[type='checkbox'][data-v-d01cb754] {
789
790
  margin-top: 0.45rem !important;
790
791
  accent-color: var(--bgl-primary);
791
792
  }
792
- .infinite-wrapper[data-v-73d79ea6] {
793
+ .infinite-wrapper[data-v-d01cb754] {
793
794
  overflow-y: auto;
794
795
  width: 100%;
795
796
  }
796
- input[type='checkbox'][data-v-73d79ea6] {
797
+ input[type='checkbox'][data-v-d01cb754] {
797
798
  margin-top: 0.3rem !important;
798
799
  accent-color: var(--bgl-primary);
799
800
  transform: scale(1.2);
@@ -805,7 +806,7 @@ input[type='checkbox'][data-v-73d79ea6] {
805
806
  height: 0.85rem;
806
807
  width: 0.85rem;
807
808
  }
808
- input[type='checkbox'][data-v-73d79ea6]::before {
809
+ input[type='checkbox'][data-v-d01cb754]::before {
809
810
  content: '';
810
811
  height: 0.85rem;
811
812
  width: 0.85rem;
@@ -818,18 +819,18 @@ input[type='checkbox'][data-v-73d79ea6]::before {
818
819
  transform: scale(1);
819
820
  position: absolute;
820
821
  }
821
- input[type='checkbox'][data-v-73d79ea6]:hover::before {
822
+ input[type='checkbox'][data-v-d01cb754]:hover::before {
822
823
  opacity: 0.2;
823
824
  transform: scale(2);
824
825
  }
825
- [lang='he'] [dir='ltr'][data-v-73d79ea6] {
826
+ [lang='he'] [dir='ltr'][data-v-d01cb754] {
826
827
  text-align: right;
827
828
  }
828
- th input[type='checkbox'][data-v-73d79ea6] {
829
+ th input[type='checkbox'][data-v-d01cb754] {
829
830
  transform: translateY(0.2rem) scale(1.2);
830
831
  accent-color: var(--bgl-primary);
831
832
  }
832
- th[data-v-73d79ea6]::after {
833
+ th[data-v-d01cb754]::after {
833
834
  content: '';
834
835
  border-bottom: 1px solid var(--border-color);
835
836
  position: absolute;
@@ -837,49 +838,46 @@ th[data-v-73d79ea6]::after {
837
838
  right: 0;
838
839
  bottom: -1px;
839
840
  }
840
- tr[data-v-73d79ea6] {
841
+ tr[data-v-d01cb754] {
841
842
  border-bottom: 1px solid var(--border-color);
842
843
  cursor: pointer;
843
844
  align-items: center;
844
845
  }
845
- td[data-v-73d79ea6],
846
- th[data-v-73d79ea6] {
846
+ td[data-v-d01cb754],
847
+ th[data-v-d01cb754] {
847
848
  white-space: nowrap;
848
849
  padding: 0.75rem 0.65rem;
849
850
  transition: var(--bgl-transition);
850
851
  line-height: 1;
851
852
  }
852
- tbody tr[data-v-73d79ea6] {
853
+ tbody tr[data-v-d01cb754] {
853
854
  font-size: 0.88em;
854
- height: var(--59d71ad2);
855
+ height: var(--02b73339);
855
856
  transition: all 200ms ease;
856
857
  }
857
- tbody tr[data-v-73d79ea6]:hover {
858
+ tbody tr[data-v-d01cb754]:hover {
858
859
  background: var(--bgl-gray-light);
859
860
  }
860
861
 
861
- [data-v-792f7ec0]{
862
- /* outline: rebeccapurple 1px solid; */
863
- }
864
- .data[data-v-792f7ec0] {
862
+ data[data-v-0ffde6c7] {
865
863
  font-size: var(--input-font-size);
866
864
  border: 1.1px solid var(--border-color);
867
865
  padding: 20px;
868
866
  border-radius: var(--input-border-radius);
869
867
  }
870
- .data-row[data-v-792f7ec0] {
868
+ .data-row[data-v-0ffde6c7] {
871
869
  display: flex;
872
870
  justify-content: space-between;
873
871
  border-bottom: 1px solid var(--border-color);
874
872
  align-items: center;
875
873
  min-height: 50px;
876
874
  }
877
- .data-row .bagel-input.shrink[data-v-792f7ec0],
878
- .data-row .bagel-input.shrink input[data-v-792f7ec0] {
875
+ .data-row .bagel-input.shrink[data-v-0ffde6c7],
876
+ .data-row .bagel-input.shrink input[data-v-0ffde6c7] {
879
877
  min-width: 140px !important;
880
878
  /* margin-top: -0.45rem !important; */
881
879
  }
882
- .data-link[data-v-792f7ec0] {
880
+ .data-link[data-v-0ffde6c7] {
883
881
  display: block;
884
882
  font-size: var(--input-font-size);
885
883
  margin-bottom: 2px;
@@ -887,7 +885,7 @@ tbody tr[data-v-73d79ea6]:hover {
887
885
  color: var(--input-color);
888
886
  }
889
887
  @media screen and (max-width: 910px) {
890
- .data-row[data-v-792f7ec0] {
888
+ .data-row[data-v-0ffde6c7] {
891
889
  display: block;
892
890
  /* min-height: 80px; */
893
891
  padding-bottom: 1rem;
@@ -2360,7 +2358,7 @@ svg.leaflet-image-layer.leaflet-interactive path {
2360
2358
  color: var(--bgl-white);
2361
2359
  }
2362
2360
 
2363
- .bagel-input .fileUploadWrap[data-v-5409803c] {
2361
+ .bagel-input .fileUploadWrap[data-v-6716fd45] {
2364
2362
  --width: 320px;
2365
2363
  outline: 1px solid var(--border-color);
2366
2364
  border-radius: var(--input-border-radius);
@@ -2373,7 +2371,7 @@ svg.leaflet-image-layer.leaflet-interactive path {
2373
2371
  overflow-y: auto;
2374
2372
  background: var(--input-bg);
2375
2373
  }
2376
- .previewName[data-v-5409803c] {
2374
+ .previewName[data-v-6716fd45] {
2377
2375
  padding: 0.5rem;
2378
2376
  text-align: start;
2379
2377
  color: var(--input-color);
@@ -2383,18 +2381,18 @@ svg.leaflet-image-layer.leaflet-interactive path {
2383
2381
  align-items: center;
2384
2382
  padding-inline: 14px;
2385
2383
  }
2386
- .previewName p[data-v-5409803c] {
2384
+ .previewName p[data-v-6716fd45] {
2387
2385
  overflow: hidden;
2388
2386
  text-overflow: ellipsis;
2389
2387
  white-space: nowrap;
2390
2388
  }
2391
- .imagePreviewWrap[data-v-5409803c] {
2389
+ .imagePreviewWrap[data-v-6716fd45] {
2392
2390
  background: var(--input-bg);
2393
2391
  border-radius: var(--input-border-radius);
2394
2392
  padding: 5px;
2395
2393
  min-height: 90px;
2396
2394
  }
2397
- img.preview[data-v-5409803c] {
2395
+ img.preview[data-v-6716fd45] {
2398
2396
  /* max-height: calc(var(--width) / 2); */
2399
2397
  /* max-width: calc(var(--width) * 2); */
2400
2398
  width: 40px;
@@ -2404,19 +2402,19 @@ img.preview[data-v-5409803c] {
2404
2402
  background: var(--bgl-gray-light);
2405
2403
  box-shadow: 0 0 10px #00000012;
2406
2404
  }
2407
- img.preview.single[data-v-5409803c] {
2405
+ img.preview.single[data-v-6716fd45] {
2408
2406
  max-width: var(--width);
2409
- width: auto;
2407
+ width: calc(100% - 2.75rem);
2410
2408
  object-fit: contain;
2411
2409
  height: auto;
2412
2410
  max-height: calc(var(--width) / 2);
2413
2411
  margin: 1rem;
2414
2412
  }
2415
- .fileUploadWrap.dragover[data-v-5409803c],
2416
- .fileUploadWrap[data-v-5409803c]:hover {
2413
+ .fileUploadWrap.dragover[data-v-6716fd45],
2414
+ .fileUploadWrap[data-v-6716fd45]:hover {
2417
2415
  box-shadow: inset 0 0 10px #00000012;
2418
2416
  }
2419
- .bagel-input .fileUploadWrap.fileDropZone[data-v-5409803c] {
2417
+ .bagel-input .fileUploadWrap.fileDropZone[data-v-6716fd45] {
2420
2418
  background: var(--input-bg);
2421
2419
  display: flex;
2422
2420
  align-items: center;
@@ -2424,7 +2422,7 @@ img.preview.single[data-v-5409803c] {
2424
2422
  color: var(--bgl-gray);
2425
2423
  flex-direction: column;
2426
2424
  }
2427
- .pie[data-v-5409803c] {
2425
+ .pie[data-v-6716fd45] {
2428
2426
  width: 30px;
2429
2427
  height: 30px;
2430
2428
  position: relative;
@@ -2432,7 +2430,7 @@ img.preview.single[data-v-5409803c] {
2432
2430
  align-items: center;
2433
2431
  justify-content: center;
2434
2432
  }
2435
- .pie[data-v-5409803c]:before {
2433
+ .pie[data-v-6716fd45]:before {
2436
2434
  content: '';
2437
2435
  position: absolute;
2438
2436
  border-radius: 50%;
@@ -2450,26 +2448,26 @@ img.preview.single[data-v-5409803c] {
2450
2448
  #000 calc(100% - var(--b))
2451
2449
  );
2452
2450
  }
2453
- .pie .success[data-v-5409803c] {
2451
+ .pie .success[data-v-6716fd45] {
2454
2452
  transform: scale(0);
2455
2453
  opacity: 0;
2456
2454
  transition: all 0.3s ease-in-out;
2457
2455
  }
2458
- .pie .progress[data-v-5409803c] {
2456
+ .pie .progress[data-v-6716fd45] {
2459
2457
  position: absolute;
2460
2458
  font-size: 10px;
2461
2459
  }
2462
- .pie.complete .progress[data-v-5409803c] {
2460
+ .pie.complete .progress[data-v-6716fd45] {
2463
2461
  display: none;
2464
2462
  }
2465
- .pie.complete .success[data-v-5409803c] {
2463
+ .pie.complete .success[data-v-6716fd45] {
2466
2464
  transform: scale(1.3);
2467
2465
  opacity: 1;
2468
2466
  }
2469
- .pie.complete[data-v-5409803c]:before {
2467
+ .pie.complete[data-v-6716fd45]:before {
2470
2468
  background: conic-gradient(var(--bgl-green) calc(var(--p) * 1%), #0000 0);
2471
2469
  }
2472
- .pie.complete[data-v-5409803c] {
2470
+ .pie.complete[data-v-6716fd45] {
2473
2471
  color: var(--bgl-green);
2474
2472
  }
2475
2473
 
@@ -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.602",
4
+ "version": "0.0.610",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Neveh Allon",
@@ -53,8 +53,8 @@
53
53
  "devDependencies": {
54
54
  "@types/leaflet": "^1.9.12",
55
55
  "@types/signature_pad": "^2.3.6",
56
- "@vue-macros/reactivity-transform": "^0.4.6",
57
- "vue": "^3.4.32"
56
+ "@vue-macros/reactivity-transform": "^0.4.7",
57
+ "vue": "^3.4.33"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "@bagelink/sdk": "*",
@@ -105,15 +105,15 @@
105
105
  "access": "public"
106
106
  },
107
107
  "dependencies": {
108
- "@tiptap/extension-image": "^2.5.4",
109
- "@tiptap/extension-table": "^2.5.4",
110
- "@tiptap/extension-table-cell": "^2.5.4",
111
- "@tiptap/extension-table-header": "^2.5.4",
112
- "@tiptap/extension-table-row": "^2.5.4",
113
- "@tiptap/extension-youtube": "^2.5.4",
114
- "@tiptap/pm": "^2.5.4",
115
- "@tiptap/starter-kit": "^2.5.4",
116
- "@tiptap/vue-3": "^2.5.4",
108
+ "@tiptap/extension-image": "^2.5.5",
109
+ "@tiptap/extension-table": "^2.5.5",
110
+ "@tiptap/extension-table-cell": "^2.5.5",
111
+ "@tiptap/extension-table-header": "^2.5.5",
112
+ "@tiptap/extension-table-row": "^2.5.5",
113
+ "@tiptap/extension-youtube": "^2.5.5",
114
+ "@tiptap/pm": "^2.5.5",
115
+ "@tiptap/starter-kit": "^2.5.5",
116
+ "@tiptap/vue-3": "^2.5.5",
117
117
  "@vuepic/vue-datepicker": "^8.8.1",
118
118
  "@vueuse/core": "^10.11.0",
119
119
  "axios": "^1.7.2",
@@ -121,7 +121,7 @@
121
121
  "leaflet": "^1.9.4",
122
122
  "libphonenumber-js": "1.11.4",
123
123
  "signature_pad": "^5.0.2",
124
- "type-fest": "^4.22.1"
124
+ "type-fest": "^4.23.0"
125
125
  },
126
126
  "scripts": {
127
127
  "dev": "tsx watch src/index.ts",
@@ -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,28 +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
- *{
56
- /* outline: rebeccapurple 1px solid; */
57
- }
58
- .data {
87
+ data {
59
88
  font-size: var(--input-font-size);
60
89
  border: 1.1px solid var(--border-color);
61
90
  padding: 20px;
@@ -91,7 +120,6 @@ const computedSchema = $computed(
91
120
  }
92
121
  </style>
93
122
 
94
-
95
123
  <style>
96
124
  .data-row .bagel-input,
97
125
  .data-row .bagel-input input {
@@ -99,4 +127,4 @@ const computedSchema = $computed(
99
127
  /* margin-top: 0.5rem !important; */
100
128
  height: calc(var(--input-height) - 0.25rem) !important;
101
129
  }
102
- </style>
130
+ </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">
@@ -308,6 +309,7 @@ tbody tr.selected:hover {
308
309
 
309
310
  .list-arrows.sorted .desc {
310
311
  transform: rotate(180deg);
312
+ display: inline-block;
311
313
  }
312
314
 
313
315
  table {
@@ -376,7 +378,7 @@ th {
376
378
  padding: 0rem 0.25rem;
377
379
  }
378
380
 
379
- .col>div {
381
+ .col > div {
380
382
  display: flex;
381
383
  gap: 0.5rem;
382
384
  }
@@ -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,7 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import SignaturePad from 'signature_pad'
3
3
  import type { Options as SignaturePadOptions } from 'signature_pad'
4
-
4
+ import { Btn } from '@bagelink/vue'
5
5
  import { onMounted, watch } from 'vue'
6
6
 
7
7
  interface WaterMark {
@@ -127,7 +127,8 @@ defineExpose({
127
127
  </script>
128
128
 
129
129
  <template>
130
- <div class="bgl_input signature-pad" @touchmove.prevent>
130
+ <div class="bgl_input signature-pad relative" @touchmove.prevent>
131
+ <Btn v-if="!disabled" flat thin icon="refresh" class="position-bottom-end" @click="clear" />
131
132
  <canvas ref="vCanvas" class="canvas" :disabled="disabled" />
132
133
  </div>
133
134
  </template>