@dataloop-ai/components 0.19.25 → 0.19.27

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.25",
3
+ "version": "0.19.27",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -7,7 +7,6 @@
7
7
  :styles="{ gridStyles, gridClass }"
8
8
  >
9
9
  <slot
10
- :key="item.id"
11
10
  name="item-slot"
12
11
  v-bind="{ item }"
13
12
  />
@@ -93,7 +92,7 @@ export default defineComponent({
93
92
  : 'dl-grid-wrapper__flex'
94
93
  )
95
94
 
96
- const hasVirtualScroll = computed(() => props.items?.length > 100)
95
+ const hasVirtualScroll = computed(() => !!props.items)
97
96
 
98
97
  const gridStyles = computed(() => {
99
98
  const gridStyles: Dictionary<string | number> = {
@@ -3,6 +3,9 @@
3
3
  ref="menuRef"
4
4
  v-bind="menuProps"
5
5
  :model-value="modelV"
6
+ :menu-class="`dl-popup__menu${dense ? ' dl-popup__menu--dense' : ''}${
7
+ menuClass ? ' ' + menuClass : ''
8
+ }`"
6
9
  @click="handleClick"
7
10
  @escapekey="handleEscape"
8
11
  @before-show="handleBeforeShow"
@@ -68,7 +71,6 @@ import {
68
71
  defineComponent,
69
72
  getCurrentInstance,
70
73
  ref,
71
- watch,
72
74
  computed,
73
75
  PropType,
74
76
  Ref,
@@ -173,7 +175,8 @@ export default defineComponent({
173
175
  triggerPercentage: {
174
176
  type: Number,
175
177
  default: 0
176
- }
178
+ },
179
+ dense: Boolean
177
180
  },
178
181
  emits: [...useModelToggleEmits, 'click', 'escapekey', 'close-button-click'],
179
182
  setup(props, { attrs, slots, emit }) {
@@ -1,5 +1,6 @@
1
1
  <template>
2
2
  <div
3
+ id="DlConfusionMatrix"
3
4
  :style="`max-width: ${maxWidth}`"
4
5
  class="confusion-matrix-container"
5
6
  >
@@ -524,7 +525,7 @@ export default defineComponent({
524
525
  })
525
526
  </script>
526
527
 
527
- <style lang="scss">
528
+ <style lang="scss" scoped>
528
529
  .confusion-matrix-container {
529
530
  margin: auto;
530
531
  }
@@ -177,7 +177,7 @@
177
177
  handleVisibleColumnsUpdate
178
178
  "
179
179
  >
180
- <dl-menu>
180
+ <dl-popup dense>
181
181
  <slot
182
182
  name="header-cell-visible-columns-menu-content"
183
183
  :visible-columns-state="
@@ -190,7 +190,7 @@
190
190
  handleVisibleColumnsUpdate
191
191
  "
192
192
  >
193
- <dl-list separator>
193
+ <dl-list>
194
194
  <dl-option-group
195
195
  :model-value="
196
196
  computedVisibleCols
@@ -210,7 +210,7 @@
210
210
  />
211
211
  </dl-list>
212
212
  </slot>
213
- </dl-menu>
213
+ </dl-popup>
214
214
  </slot>
215
215
  </dl-button>
216
216
  </div>
@@ -527,7 +527,7 @@
527
527
  handleVisibleColumnsUpdate
528
528
  "
529
529
  >
530
- <dl-menu>
530
+ <dl-popup dense>
531
531
  <slot
532
532
  name="header-cell-visible-columns-menu-content"
533
533
  :visible-columns-state="
@@ -540,7 +540,7 @@
540
540
  handleVisibleColumnsUpdate
541
541
  "
542
542
  >
543
- <dl-list separator>
543
+ <dl-list>
544
544
  <dl-option-group
545
545
  :model-value="
546
546
  computedVisibleCols
@@ -560,7 +560,7 @@
560
560
  />
561
561
  </dl-list>
562
562
  </slot>
563
- </dl-menu>
563
+ </dl-popup>
564
564
  </slot>
565
565
  </dl-button>
566
566
  </div>
@@ -878,14 +878,8 @@ import { applyDraggableColumns, applyResizableColumns } from '../../../utils'
878
878
  import { injectProp } from '../../../utils/inject-object-prop'
879
879
  import { DlTableRow, DlTableProps, DlTableColumn } from './types'
880
880
  import { DlPagination } from '../DlPagination'
881
- import {
882
- DlIcon,
883
- DlCheckbox,
884
- DlProgressBar,
885
- DlMenu,
886
- DlList
887
- } from '../../essential'
888
- import { DlButton } from '../../basic'
881
+ import { DlIcon, DlCheckbox, DlProgressBar, DlList } from '../../essential'
882
+ import { DlButton, DlPopup } from '../../basic'
889
883
  import DlOptionGroup from '../DlOptionGroup/DlOptionGroup.vue'
890
884
  import DlEmptyState from '../../basic/DlEmptyState/DlEmptyState.vue'
891
885
  import { v4 } from 'uuid'
@@ -917,7 +911,7 @@ export default defineComponent({
917
911
  DlEmptyState,
918
912
  DlButton,
919
913
  DlOptionGroup,
920
- DlMenu,
914
+ DlPopup,
921
915
  DlList,
922
916
  Sortable
923
917
  },
@@ -500,6 +500,13 @@ export default defineComponent({
500
500
  </script>
501
501
 
502
502
  <style scoped lang="scss">
503
+ .dl-popup__menu {
504
+ --dl-popup-padding: 16px;
505
+ &--dense {
506
+ --dl-popup-padding: 0;
507
+ }
508
+ }
509
+
503
510
  .dl-menu {
504
511
  position: fixed !important;
505
512
  display: inline-block;
@@ -375,12 +375,16 @@
375
375
  <div>
376
376
  <p>Test reactive cells</p>
377
377
  first row:
378
- <div class="row">
378
+ <div
379
+ class="row"
380
+ style="width: 100%; margin-bottom: 60px"
381
+ >
379
382
  <dl-input
380
383
  v-for="(value, key) in tableRows[0]"
381
384
  :key="key"
382
385
  v-model="tableRows[0][key]"
383
386
  :title="key"
387
+ max-width="50px"
384
388
  />
385
389
  </div>
386
390