@dataloop-ai/components 0.19.159 → 0.19.160

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataloop-ai/components",
3
- "version": "0.19.159",
3
+ "version": "0.19.160",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -6,37 +6,19 @@
6
6
  :style="containerStyle"
7
7
  :class="containerClass"
8
8
  >
9
- <div
10
- ref="dragRef"
11
- class="dl-table__drag"
12
- />
9
+ <div ref="dragRef" class="dl-table__drag" />
13
10
  <!-- Top Slots -->
14
- <div
15
- v-if="hasTopSlots"
16
- class="dl-table__top row items-center"
17
- >
18
- <slot
19
- v-bind="marginalsScope"
20
- name="top"
21
- >
11
+ <div v-if="hasTopSlots" class="dl-table__top row items-center">
12
+ <slot v-bind="marginalsScope" name="top">
22
13
  <slot
23
14
  v-if="hasTopSelectionMode"
24
15
  v-bind="marginalsScope"
25
16
  name="top-selection"
26
17
  />
27
18
 
28
- <div
29
- v-else
30
- class="dl-table__control"
31
- >
32
- <slot
33
- name="top-left"
34
- v-bind="marginalsScope"
35
- >
36
- <div
37
- v-if="title"
38
- class="dl-table__control"
39
- >
19
+ <div v-else class="dl-table__control">
20
+ <slot name="top-left" v-bind="marginalsScope">
21
+ <div v-if="title" class="dl-table__control">
40
22
  <div :class="titleClasses">
41
23
  {{ title }}
42
24
  </div>
@@ -46,10 +28,7 @@
46
28
 
47
29
  <div class="dl-table__separator col" />
48
30
  <div class="dl-table__control">
49
- <slot
50
- name="top-right"
51
- v-bind="marginalsScope"
52
- />
31
+ <slot name="top-right" v-bind="marginalsScope" />
53
32
  </div>
54
33
  </slot>
55
34
  </div>
@@ -244,19 +223,13 @@
244
223
  :colspan="colspanWithExpandableRow"
245
224
  class="relative-position"
246
225
  >
247
- <dl-progress-bar
248
- indeterminate
249
- :color="color"
250
- />
226
+ <dl-progress-bar indeterminate :color="color" />
251
227
  </th>
252
228
  </tr>
253
229
  </thead>
254
230
  </template>
255
231
  <template #default="props">
256
- <slot
257
- name="table-body"
258
- v-bind="props"
259
- >
232
+ <slot name="table-body" v-bind="props">
260
233
  <template v-if="!isDataEmpty && !hasSlotBody">
261
234
  <slot
262
235
  v-bind="
@@ -452,16 +425,8 @@
452
425
  </DlVirtualScroll>
453
426
  <!-- -->
454
427
 
455
- <div
456
- v-else
457
- ref="tableScroll"
458
- class="dl-table__middle scroll"
459
- >
460
- <table
461
- ref="tableRef"
462
- class="dl-table"
463
- :class="additionalClasses"
464
- >
428
+ <div v-else ref="tableScroll" class="dl-table__middle scroll">
429
+ <table ref="tableRef" class="dl-table" :class="additionalClasses">
465
430
  <thead :colspan="colspanWithExpandableRow">
466
431
  <slot
467
432
  v-if="!hideHeader"
@@ -637,10 +602,7 @@
637
602
  :colspan="colspanWithExpandableRow"
638
603
  class="relative-position"
639
604
  >
640
- <dl-progress-bar
641
- indeterminate
642
- :color="color"
643
- />
605
+ <dl-progress-bar indeterminate :color="color" />
644
606
  </th>
645
607
  </tr>
646
608
  </thead>
@@ -662,16 +624,14 @@
662
624
  :is-sortable="hasDraggableRows"
663
625
  :options="sortableOptions"
664
626
  >
665
- <slot
666
- name="top-row"
667
- :cols="computedCols"
668
- />
669
- <slot
670
- name="table-body"
671
- :computed-rows="computedRows"
672
- >
627
+ <slot name="top-row" :cols="computedCols" />
628
+ <slot name="table-body" :computed-rows="computedRows">
673
629
  <dl-top-scroll
674
- v-if="tableScroll && infiniteScroll"
630
+ v-if="
631
+ tableScroll &&
632
+ infiniteScroll &&
633
+ !isDataEmpty
634
+ "
675
635
  :container-ref="tableScroll"
676
636
  @scroll-to-top="
677
637
  $emit(
@@ -836,7 +796,11 @@
836
796
  </tr>
837
797
  </slot>
838
798
  <dl-bottom-scroll
839
- v-if="tableScroll && infiniteScroll"
799
+ v-if="
800
+ tableScroll &&
801
+ infiniteScroll &&
802
+ !isDataEmpty
803
+ "
840
804
  :container-ref="tableScroll"
841
805
  @scroll-to-bottom="
842
806
  $emit(
@@ -848,10 +812,7 @@
848
812
  />
849
813
  </slot>
850
814
 
851
- <slot
852
- name="bottom-row"
853
- :cols="computedCols"
854
- />
815
+ <slot name="bottom-row" :cols="computedCols" />
855
816
  </Sortable>
856
817
  </slot>
857
818
  </table>
@@ -890,14 +851,8 @@
890
851
  </div>
891
852
  </slot>
892
853
  </div>
893
- <div
894
- v-else
895
- class="dl-table__control"
896
- >
897
- <slot
898
- name="bottom"
899
- v-bind="marginalsScope"
900
- >
854
+ <div v-else class="dl-table__control">
855
+ <slot name="bottom" v-bind="marginalsScope">
901
856
  <div
902
857
  v-if="
903
858
  hasBotomSelectionBanner &&
@@ -910,10 +865,7 @@
910
865
  </div>
911
866
  </div>
912
867
 
913
- <slot
914
- name="pagination"
915
- v-bind="marginalsScope"
916
- >
868
+ <slot name="pagination" v-bind="marginalsScope">
917
869
  <dl-pagination
918
870
  v-if="displayPagination"
919
871
  v-bind="marginalsScope.pagination"
@@ -930,10 +882,7 @@
930
882
  </div>
931
883
  </div>
932
884
 
933
- <slot
934
- v-if="loading"
935
- name="loading"
936
- />
885
+ <slot v-if="loading" name="loading" />
937
886
  </div>
938
887
  </template>
939
888
 
@@ -1297,6 +1246,7 @@ export default defineComponent({
1297
1246
  draggable,
1298
1247
  virtualScroll,
1299
1248
  rows,
1249
+ pagination,
1300
1250
  visibleColumns,
1301
1251
  rowKey,
1302
1252
  titleClass,
@@ -1595,6 +1545,14 @@ export default defineComponent({
1595
1545
  { deep: true, flush: 'post' }
1596
1546
  )
1597
1547
 
1548
+ watch(
1549
+ pagination,
1550
+ (newPagination) => {
1551
+ setPagination(newPagination)
1552
+ },
1553
+ { deep: true }
1554
+ )
1555
+
1598
1556
  const { computedFilterMethod } = useTableFilter(props, setPagination)
1599
1557
 
1600
1558
  const { isRowExpanded, setExpanded, updateExpanded } =