@dataloop-ai/components 0.19.145 → 0.19.147

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.145",
3
+ "version": "0.19.147",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -6,6 +6,7 @@
6
6
  class="dl-chip"
7
7
  :class="chipClass"
8
8
  :style="cssChipVars"
9
+ @click="$emit('click')"
9
10
  >
10
11
  <slot name="prefix" />
11
12
  <span
@@ -29,7 +30,8 @@
29
30
  ref="dlChipRef"
30
31
  :class="{
31
32
  'dl-chip--ellipsis': overflow,
32
- 'dl-chip--no-overflow': !overflow
33
+ 'dl-chip--no-overflow': !overflow,
34
+ 'dl-chip--clickable': clickable
33
35
  }"
34
36
  >
35
37
  <slot>
@@ -94,9 +96,10 @@ export default defineComponent({
94
96
  Object.values(DlTextTransformOptions).includes(value)
95
97
  },
96
98
  overflow: { type: Boolean, default: false },
97
- fit: { type: Boolean, default: false }
99
+ fit: { type: Boolean, default: false },
100
+ clickable: { type: Boolean, default: false }
98
101
  },
99
- emits: ['remove', 'ellipsis'],
102
+ emits: ['remove', 'ellipsis', 'click'],
100
103
  setup(props, ctx) {
101
104
  const isVisible = ref(true)
102
105
  const dlChipRef = ref(null)
@@ -136,7 +139,11 @@ export default defineComponent({
136
139
  return this.iconColor
137
140
  },
138
141
  chipClass(): string {
139
- return `dl-text-transform--${this.transform}`
142
+ let classes = `dl-text-transform--${this.transform}`
143
+ if (this.clickable) {
144
+ classes += ' dl-chip--clickable'
145
+ }
146
+ return classes
140
147
  },
141
148
  cssChipVars(): Record<string, string | number> {
142
149
  return {
@@ -225,6 +232,10 @@ export default defineComponent({
225
232
  &--no-overflow {
226
233
  overflow-wrap: break-word;
227
234
  }
235
+
236
+ &--clickable {
237
+ cursor: pointer;
238
+ }
228
239
  }
229
240
 
230
241
  .dl-chip-remove-icon-container {
@@ -125,7 +125,7 @@ export function useTablePaginationState(
125
125
  return
126
126
  }
127
127
 
128
- if (!props.pagination) {
128
+ if (!props.pagination || !props['update:pagination']) {
129
129
  innerPagination.value = newPagination
130
130
  }
131
131
 
@@ -183,6 +183,8 @@
183
183
  <DlChip
184
184
  label="Long Chip Label With Alot Of Text"
185
185
  fit
186
+ clickable
187
+ @click="log"
186
188
  />
187
189
  </div>
188
190
  </div>
@@ -99,6 +99,9 @@
99
99
  :bordered="bordered"
100
100
  :draggable="draggable"
101
101
  :dense="dense"
102
+ :pagination="{
103
+ rowsPerPage: 10
104
+ }"
102
105
  class="sticky-header"
103
106
  :filter="filter"
104
107
  :selection="selection"
@@ -698,7 +701,7 @@
698
701
  virtual-scroll
699
702
  expandable-rows
700
703
  @virtual-scroll="onScrollGenerate"
701
- @update:pagination="() => console.log('@@@@ hey')"
704
+ @update:pagination="log('hi')"
702
705
  @col-update="updateColumns"
703
706
  >
704
707
  <template #body-cell-expandable-content="{ row }">