@dataloop-ai/components 0.20.2 → 0.20.4
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/blocks/DlLabelPicker/DlLabelPicker.vue +22 -5
- package/src/components/compound/DlInput/DlInput.vue +2 -2
- package/src/components/compound/DlSearches/DlSmartSearch/components/SuggestionsDropdown.vue +10 -0
- package/src/demos/DlCodeEditor/DlCodeEditorDemo.vue +4 -13
- package/src/demos/DlSliderDemo.vue +4 -6
package/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div class="dl-label-picker">
|
|
3
3
|
<dl-input
|
|
4
4
|
v-model="inputValue"
|
|
5
5
|
:placeholder="placeHolderText"
|
|
6
|
-
size="
|
|
6
|
+
size="m"
|
|
7
7
|
has-prepend
|
|
8
|
-
padding-prop="0px 0px 0px 0px"
|
|
9
8
|
:style="inputStyles"
|
|
10
9
|
@focus="onFocus"
|
|
11
10
|
@blur="onBlur"
|
|
@@ -13,7 +12,7 @@
|
|
|
13
12
|
>
|
|
14
13
|
<template #prepend>
|
|
15
14
|
<dl-icon
|
|
16
|
-
|
|
15
|
+
color="dl-color-lighter"
|
|
17
16
|
icon="icon-dl-search"
|
|
18
17
|
size="12px"
|
|
19
18
|
/>
|
|
@@ -142,7 +141,7 @@ export default defineComponent({
|
|
|
142
141
|
|
|
143
142
|
const placeHolderText = computed(() => {
|
|
144
143
|
if (!currentSelectedLabel.value) {
|
|
145
|
-
return
|
|
144
|
+
return 'Search a label'
|
|
146
145
|
}
|
|
147
146
|
|
|
148
147
|
return currentSelectedLabel.value.displayLabel
|
|
@@ -239,7 +238,25 @@ export default defineComponent({
|
|
|
239
238
|
</script>
|
|
240
239
|
|
|
241
240
|
<style scope>
|
|
241
|
+
.dl-label-picker {
|
|
242
|
+
width: 200px;
|
|
243
|
+
}
|
|
242
244
|
.dl-label-picker-item {
|
|
243
245
|
cursor: pointer;
|
|
246
|
+
height: 32px;
|
|
247
|
+
line-height: 30px;
|
|
248
|
+
}
|
|
249
|
+
</style>
|
|
250
|
+
|
|
251
|
+
<style>
|
|
252
|
+
.dl-label-picker .dl-table thead tr,
|
|
253
|
+
.dl-label-picker .dl-table .inner-th-wrapper {
|
|
254
|
+
height: 10px;
|
|
255
|
+
}
|
|
256
|
+
.dl-label-picker .dl-table tbody tr {
|
|
257
|
+
height: auto;
|
|
258
|
+
}
|
|
259
|
+
.dl-label-picker .dl-table tbody tr td {
|
|
260
|
+
padding: 2px 0;
|
|
244
261
|
}
|
|
245
262
|
</style>
|
|
@@ -1563,9 +1563,9 @@ export default defineComponent({
|
|
|
1563
1563
|
|
|
1564
1564
|
&__adornment-container {
|
|
1565
1565
|
display: flex;
|
|
1566
|
-
justify-content:
|
|
1566
|
+
justify-content: end;
|
|
1567
1567
|
align-items: var(--dl-input-align-items);
|
|
1568
|
-
|
|
1568
|
+
flex: 0 0 22px;
|
|
1569
1569
|
&--expandable {
|
|
1570
1570
|
margin-top: 3px;
|
|
1571
1571
|
margin-right: 3px;
|
|
@@ -121,6 +121,16 @@ export default defineComponent({
|
|
|
121
121
|
|
|
122
122
|
const setHighlightedIndex = (value: any) => {
|
|
123
123
|
highlightedIndex.value = value
|
|
124
|
+
|
|
125
|
+
const element =
|
|
126
|
+
menu.value?.portalEl.querySelectorAll('.dl-list-item')[value]
|
|
127
|
+
if (element) {
|
|
128
|
+
if (element.scrollIntoViewIfNeeded) {
|
|
129
|
+
element.scrollIntoViewIfNeeded()
|
|
130
|
+
} else {
|
|
131
|
+
element.scrollIntoView()
|
|
132
|
+
}
|
|
133
|
+
}
|
|
124
134
|
}
|
|
125
135
|
const handleSelectedItem = (value: any) => {
|
|
126
136
|
if (!value) {
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<dl-switch
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/>
|
|
7
|
-
<dl-switch
|
|
8
|
-
v-model="readonly"
|
|
9
|
-
left-label="readonly"
|
|
10
|
-
/>
|
|
11
|
-
<dl-switch
|
|
12
|
-
v-model="bordered"
|
|
13
|
-
left-label="bordered"
|
|
14
|
-
/>
|
|
3
|
+
<dl-switch v-model="lines" left-label="code lines" />
|
|
4
|
+
<dl-switch v-model="readonly" left-label="readonly" />
|
|
5
|
+
<dl-switch v-model="bordered" left-label="bordered" />
|
|
15
6
|
<dl-code-editor
|
|
16
7
|
v-model="codeEditorValue"
|
|
17
8
|
width="45vw"
|
|
@@ -195,7 +186,7 @@ if __name__ == "__main__":
|
|
|
195
186
|
}))
|
|
196
187
|
|
|
197
188
|
watch(codeEditorValue, (val) => {
|
|
198
|
-
console.log('
|
|
189
|
+
console.log('Code Value Changed: ', val)
|
|
199
190
|
})
|
|
200
191
|
|
|
201
192
|
return {
|
|
@@ -50,20 +50,18 @@ export default defineComponent({
|
|
|
50
50
|
},
|
|
51
51
|
watch: {
|
|
52
52
|
value(newValue, oldValue) {
|
|
53
|
-
|
|
54
|
-
this.events[0] = `@@@ model value update ${oldValue} to ${newValue}`
|
|
53
|
+
this.events[0] = `model value update ${oldValue} to ${newValue}`
|
|
55
54
|
}
|
|
56
55
|
},
|
|
57
56
|
methods: {
|
|
58
57
|
handleChange(value: number) {
|
|
59
|
-
|
|
60
|
-
this.events[1] = `@@@ handling change ${value}`
|
|
58
|
+
this.events[1] = `handling change ${value}`
|
|
61
59
|
},
|
|
62
60
|
handleFocus(event: Event) {
|
|
63
|
-
this.events[1] =
|
|
61
|
+
this.events[1] = `Input Focus `
|
|
64
62
|
},
|
|
65
63
|
handleBlur(event: Event) {
|
|
66
|
-
this.events[1] =
|
|
64
|
+
this.events[1] = `Input Blur `
|
|
67
65
|
}
|
|
68
66
|
},
|
|
69
67
|
template: 'dl-slider-demo'
|