@dataloop-ai/components 0.19.282 → 0.19.284

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.282",
3
+ "version": "0.19.284",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -75,7 +75,7 @@
75
75
  <dl-tooltip v-if="disabled && disabledTooltip">
76
76
  {{ disabledTooltip }}
77
77
  </dl-tooltip>
78
- <div v-if="hasSelectedSlot && hasSelection" style="width: 100%">
78
+ <div v-if="hasSelectedSlot" style="width: 100%">
79
79
  <slot
80
80
  v-if="searchable ? !isExpanded : true"
81
81
  :opt="selectedOption"
@@ -212,7 +212,7 @@ export default defineComponent({
212
212
  key: 'id'
213
213
  },
214
214
  {
215
- alias: 'ItemHeight',
215
+ alias: 'Item.Height',
216
216
  key: 'metadata.system.height'
217
217
  },
218
218
  {
@@ -160,10 +160,11 @@ export const useSuggestions = (
160
160
  )
161
161
 
162
162
  for (const alias of aliasesArray) {
163
- if (aliasedSuggestions.includes(alias.alias)) {
163
+ const aliasBeforeDot = alias.alias.replace(/\..+$/, '')
164
+ if (aliasedSuggestions.includes(aliasBeforeDot)) {
164
165
  continue
165
166
  }
166
- aliasedSuggestions.push(alias.alias)
167
+ aliasedSuggestions.push(aliasBeforeDot)
167
168
  }
168
169
 
169
170
  const sortString = (a: string, b: string) =>
@@ -239,6 +240,16 @@ export const useSuggestions = (
239
240
  )
240
241
  if (!dataType) {
241
242
  localSuggestions = []
243
+ // 2nd half of key aliases with the dot: matchedField ~ 'Item.H' of 'Item.Height'
244
+ const matchedFieldWithDot =
245
+ matchedField.indexOf('.') > 0
246
+ ? matchedField
247
+ : matchedField + '.'
248
+ for (const a of aliasesArray) {
249
+ if (a.alias.startsWith(matchedFieldWithDot)) {
250
+ localSuggestions.push(a.alias.replace(/^.+\./, '.'))
251
+ }
252
+ }
242
253
  continue
243
254
  }
244
255
 
@@ -264,6 +275,8 @@ export const useSuggestions = (
264
275
  fieldOf = fieldOf[key] as Schema
265
276
  }
266
277
 
278
+ if (!fieldOf) continue
279
+
267
280
  const toAdd: string[] = []
268
281
 
269
282
  if (fieldOf[lastWord]) {