@dataloop-ai/components 0.19.103 → 0.19.105
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 +1 -1
- package/src/components/basic/DlButton/DlButton.vue +1 -0
- package/src/components/blocks/DlLabelPicker/DlLabelPicker.vue +2 -2
- package/src/components/compound/DlDropdownButton/DlDropdownButton.vue +3 -2
- package/src/components/compound/DlTreeTable/DlTreeTable.vue +13 -7
- package/src/components/compound/DlTreeTable/views/DlTrTreeView.vue +8 -8
- package/src/demos/DlTableDemo.vue +1 -1
- package/src/demos/DlTreeTableDemo.vue +6 -1
package/package.json
CHANGED
|
@@ -63,7 +63,7 @@ export default defineComponent({
|
|
|
63
63
|
default: () => [] as PropType<DlLabelPickerItem[]>
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
|
-
emits: ['
|
|
66
|
+
emits: ['selected-label', 'click'],
|
|
67
67
|
setup(props, { emit, slots }) {
|
|
68
68
|
const { items } = toRefs(props)
|
|
69
69
|
|
|
@@ -84,7 +84,7 @@ export default defineComponent({
|
|
|
84
84
|
|
|
85
85
|
const handleRowClick = (_: MouseEvent, item: DlLabelPickerItem) => {
|
|
86
86
|
currentSelectedLabel.value = item
|
|
87
|
-
emit('
|
|
87
|
+
emit('selected-label', item)
|
|
88
88
|
emit('click', item)
|
|
89
89
|
}
|
|
90
90
|
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
<dl-menu
|
|
76
76
|
ref="menuRef"
|
|
77
77
|
v-model="menuModel"
|
|
78
|
-
:class="contentClass"
|
|
78
|
+
:menu-class="contentClass"
|
|
79
79
|
:style="contentStyle"
|
|
80
80
|
:cover="cover"
|
|
81
81
|
fit-container
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
<dl-menu
|
|
137
137
|
ref="menuRef"
|
|
138
138
|
v-model="menuModel"
|
|
139
|
-
:class="contentClass"
|
|
139
|
+
:menu-class="contentClass"
|
|
140
140
|
:style="contentStyle"
|
|
141
141
|
:cover="cover"
|
|
142
142
|
fit-container
|
|
@@ -551,6 +551,7 @@ export default defineComponent({
|
|
|
551
551
|
</style>
|
|
552
552
|
<style lang="scss">
|
|
553
553
|
.dl-button-dropdown {
|
|
554
|
+
height: fit-content;
|
|
554
555
|
.dl-button-content {
|
|
555
556
|
line-height: unset;
|
|
556
557
|
}
|
|
@@ -452,6 +452,9 @@ export default defineComponent({
|
|
|
452
452
|
const emitRowClick = (...payload: any) => {
|
|
453
453
|
emit('row-click', ...payload)
|
|
454
454
|
}
|
|
455
|
+
const emitRowDblclick = (...payload: any) => {
|
|
456
|
+
emit('row-dblclic', ...payload)
|
|
457
|
+
}
|
|
455
458
|
const emitThClick = (payload: any) => {
|
|
456
459
|
emit('th-click', payload)
|
|
457
460
|
}
|
|
@@ -530,13 +533,13 @@ export default defineComponent({
|
|
|
530
533
|
'onUpdate:modelValue': (adding: boolean, evt: Event) => {
|
|
531
534
|
updateSelectionHierarchy(adding, evt, row)
|
|
532
535
|
},
|
|
533
|
-
onRowClick: () => {
|
|
536
|
+
onRowClick: (event: Event, row: any, index: number) => {
|
|
534
537
|
tableRootRef.value.onTrClick(event, row, index)
|
|
535
538
|
},
|
|
536
|
-
onRowDoubleClick: () => {
|
|
539
|
+
onRowDoubleClick: (event: Event, row: any, index: number) => {
|
|
537
540
|
tableRootRef.value.onTrDblClick(event, row, index)
|
|
538
541
|
},
|
|
539
|
-
onRowContextMenu: () => {
|
|
542
|
+
onRowContextMenu: (event: Event, row: any, index: number) => {
|
|
540
543
|
tableRootRef.value.onTrContextMenu(event, row, index)
|
|
541
544
|
},
|
|
542
545
|
onUpdateExpandedRow: () =>
|
|
@@ -545,13 +548,13 @@ export default defineComponent({
|
|
|
545
548
|
'update:modelValue': (adding: boolean, evt: Event) => {
|
|
546
549
|
updateSelectionHierarchy(adding, evt, row)
|
|
547
550
|
},
|
|
548
|
-
rowClick: () => {
|
|
551
|
+
rowClick: (event: Event, row: any, index: number) => {
|
|
549
552
|
tableRootRef.value.onTrClick(event, row, index)
|
|
550
553
|
},
|
|
551
|
-
rowDoubleClick: () => {
|
|
554
|
+
rowDoubleClick: (event: Event, row: any, index: number) => {
|
|
552
555
|
tableRootRef.value.onTrDblClick(event, row, index)
|
|
553
556
|
},
|
|
554
|
-
rowContextMenu: () => {
|
|
557
|
+
rowContextMenu: (event: Event, row: any, index: number) => {
|
|
555
558
|
tableRootRef.value.onTrContextMenu(event, row, index)
|
|
556
559
|
},
|
|
557
560
|
updateExpandedRow: () =>
|
|
@@ -788,6 +791,7 @@ export default defineComponent({
|
|
|
788
791
|
updateSelected,
|
|
789
792
|
emitSelectedItems,
|
|
790
793
|
emitRowClick,
|
|
794
|
+
emitRowDblclick,
|
|
791
795
|
emitThClick,
|
|
792
796
|
hasSlotByName,
|
|
793
797
|
getSlotByName,
|
|
@@ -836,11 +840,13 @@ export default defineComponent({
|
|
|
836
840
|
noDataLabel: this.noDataLabel,
|
|
837
841
|
visibleColumns: this.visibleColumns,
|
|
838
842
|
onRowClick: this.emitRowClick,
|
|
843
|
+
onRowDblclick: this.emitRowDblclick,
|
|
839
844
|
'onUpdate:selected': this.updateSelected,
|
|
840
845
|
onColUpdate: this.updateColumns,
|
|
841
846
|
class: this.containerClass,
|
|
842
847
|
on: {
|
|
843
|
-
|
|
848
|
+
'row-click': this.emitRowClick,
|
|
849
|
+
'row-dblclick': this.emitRowDblclick,
|
|
844
850
|
'update:selected': this.updateSelected,
|
|
845
851
|
'col-update': this.updateColumns
|
|
846
852
|
},
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<DlIcon
|
|
25
25
|
v-if="(row.children || []).length > 0"
|
|
26
26
|
:icon="`icon-dl-${row.isExpanded ? 'down' : 'right'}-chevron`"
|
|
27
|
-
@click="emitUpdateExpandedRow"
|
|
27
|
+
@click.stop.prevent="emitUpdateExpandedRow"
|
|
28
28
|
/>
|
|
29
29
|
</td>
|
|
30
30
|
<td
|
|
@@ -168,7 +168,7 @@ export default defineComponent({
|
|
|
168
168
|
'update:model-value',
|
|
169
169
|
'updateExpandedRow'
|
|
170
170
|
],
|
|
171
|
-
setup(props,
|
|
171
|
+
setup(props, { emit, slots }) {
|
|
172
172
|
const visibleChildren = ref(0)
|
|
173
173
|
const childrenCount = ref(0)
|
|
174
174
|
const { row } = toRefs(props)
|
|
@@ -192,7 +192,7 @@ export default defineComponent({
|
|
|
192
192
|
row: Record<string, any>,
|
|
193
193
|
rowIndex: number
|
|
194
194
|
) => {
|
|
195
|
-
|
|
195
|
+
emit('rowClick', event, row, rowIndex)
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
const onTrDoubleClick = (
|
|
@@ -200,7 +200,7 @@ export default defineComponent({
|
|
|
200
200
|
row: DlTableRow,
|
|
201
201
|
rowIndex: number
|
|
202
202
|
) => {
|
|
203
|
-
|
|
203
|
+
emit('rowDoubleClick', evt, row, rowIndex)
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
const onTrContextMenu = (
|
|
@@ -208,11 +208,11 @@ export default defineComponent({
|
|
|
208
208
|
row: DlTableRow,
|
|
209
209
|
rowIndex: number
|
|
210
210
|
) => {
|
|
211
|
-
|
|
211
|
+
emit('rowContextMenu', evt, row, rowIndex)
|
|
212
212
|
}
|
|
213
213
|
|
|
214
214
|
const emitUpdateModelValue = (adding: boolean, evt: Event) => {
|
|
215
|
-
|
|
215
|
+
emit('update:model-value', adding, evt)
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
const getTdStyles = (row: any, colIndex: number) => {
|
|
@@ -224,10 +224,10 @@ export default defineComponent({
|
|
|
224
224
|
return styles
|
|
225
225
|
}
|
|
226
226
|
const emitUpdateExpandedRow = () => {
|
|
227
|
-
|
|
227
|
+
emit('updateExpandedRow')
|
|
228
228
|
}
|
|
229
229
|
|
|
230
|
-
const hasSlotByName = (name: string) => !!
|
|
230
|
+
const hasSlotByName = (name: string) => !!slots[name]
|
|
231
231
|
|
|
232
232
|
const getSlotByName = (name: string) => {
|
|
233
233
|
return hasSlotByName(`body-cell-${name}`)
|
|
@@ -690,7 +690,7 @@ export default defineComponent({
|
|
|
690
690
|
}
|
|
691
691
|
|
|
692
692
|
const onRowClick = (item: any) => {
|
|
693
|
-
|
|
693
|
+
console.log('onRowClick TreeTableDemo: ', item)
|
|
694
694
|
}
|
|
695
695
|
|
|
696
696
|
const reorderRows = (newRows: any[]) => {
|
|
@@ -738,6 +738,11 @@ export default defineComponent({
|
|
|
738
738
|
},
|
|
739
739
|
|
|
740
740
|
methods: {
|
|
741
|
+
addRowPerPage() {
|
|
742
|
+
this.rowsPerPageOptions.push(
|
|
743
|
+
this.rowsPerPageOptions[this.rowsPerPageOptions.length - 1] + 2
|
|
744
|
+
)
|
|
745
|
+
},
|
|
741
746
|
selectedItems(payload: any) {
|
|
742
747
|
console.log('Demo updateSelected: ', payload)
|
|
743
748
|
},
|