@dataloop-ai/components 0.19.279 → 0.19.281
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
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
has-prepend
|
|
8
8
|
padding-prop="0px 0px 0px 0px"
|
|
9
9
|
:style="inputStyles"
|
|
10
|
+
@focus="onFocus"
|
|
11
|
+
@blur="onBlur"
|
|
12
|
+
@clear="onClear"
|
|
10
13
|
>
|
|
11
14
|
<template #prepend>
|
|
12
15
|
<dl-icon
|
|
@@ -104,7 +107,7 @@ export default defineComponent({
|
|
|
104
107
|
default: false
|
|
105
108
|
}
|
|
106
109
|
},
|
|
107
|
-
emits: ['selected-label', 'click'],
|
|
110
|
+
emits: ['selected-label', 'click', 'focus', 'blur', 'clear'],
|
|
108
111
|
setup(props, { emit, slots }) {
|
|
109
112
|
const { items } = toRefs(props)
|
|
110
113
|
|
|
@@ -209,7 +212,15 @@ export default defineComponent({
|
|
|
209
212
|
}
|
|
210
213
|
})
|
|
211
214
|
})
|
|
212
|
-
|
|
215
|
+
const onFocus = (event: InputEvent) => {
|
|
216
|
+
emit('focus', event)
|
|
217
|
+
}
|
|
218
|
+
const onBlur = (event: InputEvent) => {
|
|
219
|
+
emit('blur', event)
|
|
220
|
+
}
|
|
221
|
+
const onClear = (event: InputEvent) => {
|
|
222
|
+
emit('clear', event)
|
|
223
|
+
}
|
|
213
224
|
return {
|
|
214
225
|
handleRowClick,
|
|
215
226
|
inputValue,
|
|
@@ -218,7 +229,10 @@ export default defineComponent({
|
|
|
218
229
|
inputStyles,
|
|
219
230
|
rows,
|
|
220
231
|
table,
|
|
221
|
-
isFilterString
|
|
232
|
+
isFilterString,
|
|
233
|
+
onClear,
|
|
234
|
+
onBlur,
|
|
235
|
+
onFocus
|
|
222
236
|
}
|
|
223
237
|
}
|
|
224
238
|
})
|
|
@@ -272,12 +272,24 @@ export const useSuggestions = (
|
|
|
272
272
|
if (isObject(fieldOf) && !Array.isArray(fieldOf)) {
|
|
273
273
|
for (const key of Object.keys(fieldOf)) {
|
|
274
274
|
if (key === '*') continue
|
|
275
|
+
if (aliasedKeys.includes(`${matchedField}.${key}`))
|
|
276
|
+
continue
|
|
275
277
|
toAdd.push(`.${key}`)
|
|
276
278
|
}
|
|
277
279
|
}
|
|
278
280
|
} else {
|
|
281
|
+
const matchedFieldBeforeDot = matchedField.replace(
|
|
282
|
+
new RegExp(`\\.${lastWord}$`),
|
|
283
|
+
''
|
|
284
|
+
)
|
|
279
285
|
for (const key in fieldOf) {
|
|
280
286
|
if (key === '*') continue
|
|
287
|
+
if (
|
|
288
|
+
aliasedKeys.includes(
|
|
289
|
+
`${matchedFieldBeforeDot}.${key}`
|
|
290
|
+
)
|
|
291
|
+
)
|
|
292
|
+
continue
|
|
281
293
|
if (key.startsWith(lastWord)) {
|
|
282
294
|
toAdd.push(`.${key}`)
|
|
283
295
|
}
|