@dataloop-ai/components 0.18.108 → 0.18.109

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.18.108",
3
+ "version": "0.18.109",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -516,15 +516,15 @@
516
516
 
517
517
  <DlTr v-if="isEmpty && hasEmptyStateProps">
518
518
  <DlTd colspan="100%">
519
- <div class="flex justify-center">
519
+ <div class="flex justify-center full-width">
520
520
  <dl-empty-state v-bind="emptyStateProps">
521
521
  <template
522
522
  v-for="(_, slot) in $slots"
523
- #[slot]="props"
523
+ #[slot]="emptyStateProps"
524
524
  >
525
525
  <slot
526
526
  :name="slot"
527
- v-bind="props"
527
+ v-bind="emptyStateProps"
528
528
  />
529
529
  </template>
530
530
  </dl-empty-state>
@@ -640,7 +640,7 @@ import {
640
640
  } from '../../essential'
641
641
  import { ResizableManager } from './utils'
642
642
  import { DlButton } from '../../basic'
643
- import { DlOptionGroup } from '../../compound'
643
+ import DlOptionGroup from '../DlOptionGroup/DlOptionGroup.vue'
644
644
  import DlEmptyState from '../../basic/DlEmptyState/DlEmptyState.vue'
645
645
  import { v4 } from 'uuid'
646
646
  import { flatTreeData } from '../DlTreeTable/utils/flatTreeData'
@@ -43,14 +43,13 @@
43
43
  <template v-if="virtualScroll && !isEmpty">
44
44
  <slot
45
45
  v-for="(row, rowIndex) in dlTableRef.computedCols"
46
- :key="rowIndex"
47
46
  name="row-body"
48
47
  v-bind="
49
48
  dlTableRef.getBodyScope({
50
49
  key: getRowKey(row),
51
50
  row,
52
- pageIndex,
53
- trClass: isRowSelected(getRowKey(row))
51
+ pageIndex: rowKey,
52
+ trClass: isRowSelected(rowKey, getRowKey(row))
54
53
  ? 'selected'
55
54
  : ''
56
55
  })
@@ -58,6 +57,7 @@
58
57
  >
59
58
  <DlTrTreeView
60
59
  :row="tableBodyProps.item"
60
+ :row-index="rowIndex"
61
61
  :is-row-selected="
62
62
  isRowSelected(
63
63
  rowKey,
@@ -161,8 +161,11 @@
161
161
  dlTableRef.getBodyScope({
162
162
  key: getRowKey(row),
163
163
  row,
164
- pageIndex,
165
- trClass: isRowSelected(getRowKey(row))
164
+ pageIndex: rowKey,
165
+ trClass: isRowSelected(
166
+ rowKey,
167
+ getRowKey(row)
168
+ )
166
169
  ? 'selected'
167
170
  : ''
168
171
  })
@@ -288,13 +291,13 @@ import {
288
291
  ref,
289
292
  h
290
293
  } from 'vue-demi'
291
- import { DlTable } from '../../../components'
294
+ import { DlCheckbox } from '../../essential'
295
+ import DlTable from '../DlTable/DlTable.vue'
292
296
  import DlTrTreeView from './views/DlTrTreeView.vue'
293
297
  import { cloneDeep } from 'lodash'
294
298
  import { DlTableProps, DlTableRow } from '../DlTable/types'
295
299
  import { useTreeTableRowSelection } from './utils/treeTableRowSelection'
296
300
  import { getFromChildren } from './utils/getFromChildren'
297
- import DlCheckbox from '../../essential/DlCheckbox/DlCheckbox.vue'
298
301
  import { props } from './props'
299
302
  import { emits } from './emits'
300
303
 
@@ -125,8 +125,8 @@ export default defineComponent({
125
125
  default: () => ({})
126
126
  },
127
127
  bindBodyCellScope: {
128
- type: Object as PropType<Record<string, any>>,
129
- default: () => ({})
128
+ type: Function,
129
+ default: () => {}
130
130
  },
131
131
  color: {
132
132
  type: String,
@@ -418,6 +418,15 @@
418
418
  />
419
419
  </div>
420
420
  </div>
421
+ <div>
422
+ <p>With empty data</p>
423
+ <DlTable
424
+ :rows="[]"
425
+ :columns="tableColumns"
426
+ title="empty data"
427
+ no-data-label="NOoooooOOOOOoooooo"
428
+ />
429
+ </div>
421
430
  </div>
422
431
  </template>
423
432