@dataloop-ai/components 0.20.192 → 0.20.194-ds-v3.0

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.
@@ -161,7 +161,7 @@
161
161
  <div
162
162
  v-if="
163
163
  visibleColumns &&
164
- visibleColumns.length
164
+ visibleColumns.length
165
165
  "
166
166
  class="visible-columns-justify-end"
167
167
  style="width: 100%; display: flex"
@@ -274,8 +274,8 @@
274
274
  isRowSelected(getRowKey(props.item))
275
275
  ? 'selected'
276
276
  : hasAnyAction
277
- ? ' cursor-pointer'
278
- : ''
277
+ ? ' cursor-pointer'
278
+ : ''
279
279
  "
280
280
  :no-hover="noHover"
281
281
  @click="
@@ -565,7 +565,7 @@
565
565
  <div
566
566
  v-if="
567
567
  visibleColumns &&
568
- visibleColumns.length
568
+ visibleColumns.length
569
569
  "
570
570
  class="visible-columns-justify-end"
571
571
  style="width: 100%; display: flex"
@@ -674,8 +674,8 @@
674
674
  <dl-top-scroll
675
675
  v-if="
676
676
  tableScroll &&
677
- infiniteScroll &&
678
- !isDataEmpty
677
+ infiniteScroll &&
678
+ !isDataEmpty
679
679
  "
680
680
  :container-ref="tableScroll"
681
681
  @scroll-to-top="
@@ -709,8 +709,8 @@
709
709
  isRowSelected(getRowKey(row))
710
710
  ? 'selected'
711
711
  : hasAnyAction
712
- ? ' cursor-pointer'
713
- : ''
712
+ ? ' cursor-pointer'
713
+ : ''
714
714
  "
715
715
  :no-hover="noHover"
716
716
  @click="onTrClick($event, row, pageIndex)"
@@ -845,8 +845,8 @@
845
845
  <dl-bottom-scroll
846
846
  v-if="
847
847
  tableScroll &&
848
- infiniteScroll &&
849
- !isDataEmpty
848
+ infiniteScroll &&
849
+ !isDataEmpty
850
850
  "
851
851
  :container-ref="tableScroll"
852
852
  @scroll-to-bottom="
@@ -903,7 +903,7 @@
903
903
  <div
904
904
  v-if="
905
905
  hasBottomSelectionBanner &&
906
- selectedRowsLabel(rowsSelectedNumber)
906
+ selectedRowsLabel(rowsSelectedNumber)
907
907
  "
908
908
  class="dl-table__control"
909
909
  >
@@ -266,11 +266,11 @@ export default defineComponent({
266
266
  emptyStateProps: {
267
267
  type: Object as PropType<DlEmptyStateProps>,
268
268
  default: () =>
269
- ({
270
- title: '',
271
- subtitle: 'No data to show yet',
272
- icon: 'icon-dl-dataset-filled'
273
- } as unknown as PropType<DlEmptyStateProps>)
269
+ ({
270
+ title: '',
271
+ subtitle: 'No data to show yet',
272
+ icon: 'icon-dl-dataset-filled'
273
+ } as unknown as PropType<DlEmptyStateProps>)
274
274
  },
275
275
  /**
276
276
  * Custom icon class to use for expanded rows.
@@ -392,7 +392,7 @@ export default defineComponent({
392
392
  typeof props.rowKey === 'function'
393
393
  ? props.rowKey
394
394
  : (row: Record<string, any>) =>
395
- row[props.rowKey as string] ?? ''
395
+ row[props.rowKey as string] ?? ''
396
396
  )
397
397
 
398
398
  const hasDraggableRows = computed(() =>
@@ -537,7 +537,7 @@ export default defineComponent({
537
537
  const onMultipleSelectionSet = (val: boolean) => {
538
538
  const value =
539
539
  selectedData.value.length > 0 &&
540
- selectedData.value.length === tableRows.value.length
540
+ selectedData.value.length === tableRows.value.length
541
541
  ? false
542
542
  : val
543
543
 
@@ -811,7 +811,9 @@ export default defineComponent({
811
811
  targetRow: finalTarget
812
812
  })
813
813
 
814
- const isDragValid = shouldSkipValidation || checkParentCondition(draggedRow.value, finalTarget)
814
+ const isDragValid =
815
+ shouldSkipValidation ||
816
+ checkParentCondition(draggedRow.value, finalTarget)
815
817
  if (isDragValid) {
816
818
  const smartSortingMovement = {
817
819
  ...sortingMovement.value,
@@ -835,10 +837,9 @@ export default defineComponent({
835
837
  return
836
838
  }
837
839
 
838
- const srcEl =
839
- (originalEvent.srcElement ||
840
- originalEvent.target ||
841
- null) as HTMLElement | null
840
+ const srcEl = (originalEvent.srcElement ||
841
+ originalEvent.target ||
842
+ null) as HTMLElement | null
842
843
  const passedElement = srcEl ? getElementAbove(srcEl, 'dl-tr') : null
843
844
  if (passedElement) {
844
845
  const targetRowId = passedElement.dataset.id
@@ -1243,7 +1244,7 @@ export default defineComponent({
1243
1244
  this.vue2h = vue2h
1244
1245
  const tableBodySlot = isVue2
1245
1246
  ? this.$slots['table-body'] &&
1246
- (() => (this.$slots['table-body'] as any)?.pop())
1247
+ (() => (this.$slots['table-body'] as any)?.pop())
1247
1248
  : this.$slots['table-body']
1248
1249
  const tbody =
1249
1250
  tableBodySlot ?? (this.isDataEmpty ? null : this.renderTBody)
@@ -1307,7 +1308,7 @@ export default defineComponent({
1307
1308
  justify-content: center;
1308
1309
  flex-wrap: wrap;
1309
1310
 
1310
- &>* {
1311
+ & > * {
1311
1312
  flex-grow: 1;
1312
1313
  }
1313
1314
  }
@@ -1336,7 +1337,6 @@ tr {
1336
1337
  }
1337
1338
 
1338
1339
  .sticky-header {
1339
-
1340
1340
  ::v-deep .dl-table__top,
1341
1341
  ::v-deep .dl-table__bottom,
1342
1342
  ::v-deep thead tr:first-child th {
@@ -1359,4 +1359,4 @@ tr {
1359
1359
  top: 40px;
1360
1360
  }
1361
1361
  }
1362
- </style>
1362
+ </style>
@@ -16,7 +16,7 @@
16
16
  }`"
17
17
  >
18
18
  <dl-icon
19
- v-if="hasDraggableRows && !row.disableDraggable"
19
+ v-if="hasDraggableRows && !row.disableDraggable"
20
20
  class="draggable-icon"
21
21
  icon="icon-dl-drag"
22
22
  size="12px"
@@ -7,12 +7,14 @@
7
7
  }`"
8
8
  >
9
9
  <label
10
- v-if="!!leftLabel"
10
+ v-if="hasLeftLabel"
11
11
  class="left dl-switch-label"
12
12
  :for="computedId"
13
13
  :style="cssLabelVars"
14
14
  >
15
- {{ leftLabel }}
15
+ <slot name="left-label">
16
+ {{ leftLabel }}
17
+ </slot>
16
18
  </label>
17
19
  <span
18
20
  class="dl-switch-container"
@@ -35,12 +37,14 @@
35
37
  />
36
38
  </span>
37
39
  <label
38
- v-if="!!rightLabel"
40
+ v-if="hasRightLabel"
39
41
  class="right dl-switch-label"
40
42
  :for="computedId"
41
43
  :style="cssLabelVars"
42
44
  >
43
- {{ rightLabel }}
45
+ <slot name="right-label">
46
+ {{ rightLabel }}
47
+ </slot>
44
48
  </label>
45
49
  </div>
46
50
  </template>
@@ -143,6 +147,12 @@ export default defineComponent({
143
147
  ? this.index === -1
144
148
  : toRaw(this.modelValue) === toRaw(this.falseValue)
145
149
  },
150
+ hasLeftLabel(): boolean {
151
+ return !!this.leftLabel || !!this.$slots['left-label']
152
+ },
153
+ hasRightLabel(): boolean {
154
+ return !!this.rightLabel || !!this.$slots['right-label']
155
+ },
146
156
  cssVars(): Record<string, string> {
147
157
  return {
148
158
  '--dl-checkbox-height': `${this.size}px`,
@@ -124,7 +124,9 @@ export default defineComponent({
124
124
 
125
125
  let localScrollTarget: HTMLElement | undefined
126
126
  const rootRef: Ref<HTMLElement | null> = ref(null)
127
- const scrollSizeItem: Ref<number> = ref(40)
127
+ const scrollSizeItem: Ref<number> = ref(
128
+ virtualScrollItemSize.value || 40
129
+ )
128
130
 
129
131
  const isDefined = (v: any) => v !== undefined && v !== null
130
132
 
@@ -176,6 +176,26 @@
176
176
  @change="handleModelValueUpdate"
177
177
  />
178
178
  </div>
179
+ <div style="width: 500px; margin-top: 30px">
180
+ <div style="margin-bottom: 10px; font-weight: bold">
181
+ Inline Mode
182
+ </div>
183
+ <dl-date-time-range
184
+ v-model="date"
185
+ :type="type"
186
+ width="100%"
187
+ :available-range="range ? availableRange : null"
188
+ :mode="mode"
189
+ :show-time="showTime"
190
+ :auto-close="autoClose"
191
+ :including-current-month="includesCurrentMonthEnd"
192
+ :should-clear-select-first-option="shouldClearSelectFirstOption"
193
+ :disabled-type="type === 'day' ? 'month' : 'day'"
194
+ view-mode="inline"
195
+ @set-type="handleSetType"
196
+ @change="handleModelValueUpdate"
197
+ />
198
+ </div>
179
199
  </div>
180
200
  </template>
181
201
  <script lang="ts">
@@ -42,6 +42,7 @@
42
42
 
43
43
  <dl-smart-search-input
44
44
  v-model="queryObject"
45
+ no-tooltip
45
46
  :aliases="aliases"
46
47
  :schema="schema"
47
48
  :color-schema="colorSchema"