@dataloop-ai/components 0.20.126 → 0.20.127
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
package/src/assets/theme.css
CHANGED
|
@@ -57,6 +57,7 @@ body {
|
|
|
57
57
|
--dl-color-fill: #0000001e;
|
|
58
58
|
--dl-color-fill-hover: #f8f8f8;
|
|
59
59
|
--dl-color-separator: #e4e4e4;
|
|
60
|
+
--dl-color-component: #ffffff;
|
|
60
61
|
--dl-color-scrollbar: #e4e4e4;
|
|
61
62
|
--dl-color-body-background: #eef1ff;
|
|
62
63
|
--dl-color-panel-background: #ffffff;
|
|
@@ -118,6 +119,7 @@ body {
|
|
|
118
119
|
--dl-color-fill-secondary: #f8f8f81a;
|
|
119
120
|
--dl-color-fill-hover: #454a50;
|
|
120
121
|
--dl-color-separator: #ffffff26;
|
|
122
|
+
--dl-color-component: #30363d;
|
|
121
123
|
--dl-color-body-background: #24282d;
|
|
122
124
|
--dl-color-panel-background: #30363d;
|
|
123
125
|
--dl-color-side-panel: #2a343e;
|
|
@@ -223,6 +223,40 @@ export default defineComponent({
|
|
|
223
223
|
const onClear = (event: InputEvent) => {
|
|
224
224
|
emit('clear', event)
|
|
225
225
|
}
|
|
226
|
+
|
|
227
|
+
function setSelectedLabelByName(displayLabel: string) {
|
|
228
|
+
const stack = [...items.value]
|
|
229
|
+
|
|
230
|
+
while (stack.length) {
|
|
231
|
+
const item = stack.pop()
|
|
232
|
+
|
|
233
|
+
if (item.displayLabel === displayLabel) {
|
|
234
|
+
currentSelectedLabel.value = item
|
|
235
|
+
emit('selected-label', item)
|
|
236
|
+
|
|
237
|
+
nextTick(() => {
|
|
238
|
+
const target = table.value?.$el.querySelector(
|
|
239
|
+
`[data-label-picker-identifier="${item.identifier}"]`
|
|
240
|
+
)
|
|
241
|
+
table.value?.$el
|
|
242
|
+
.querySelectorAll('tr.selected')
|
|
243
|
+
.forEach((tr: Element) =>
|
|
244
|
+
tr.classList.remove('selected')
|
|
245
|
+
)
|
|
246
|
+
target?.closest('tr')?.classList.add('selected')
|
|
247
|
+
})
|
|
248
|
+
return
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
if (item.children?.length) {
|
|
252
|
+
stack.push(...item.children)
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
console.warn(
|
|
256
|
+
`[DlLabelPicker] No label found for displayLabel "${displayLabel}"`
|
|
257
|
+
)
|
|
258
|
+
}
|
|
259
|
+
|
|
226
260
|
return {
|
|
227
261
|
handleRowClick,
|
|
228
262
|
inputValue,
|
|
@@ -234,7 +268,8 @@ export default defineComponent({
|
|
|
234
268
|
isFilterString,
|
|
235
269
|
onClear,
|
|
236
270
|
onBlur,
|
|
237
|
-
onFocus
|
|
271
|
+
onFocus,
|
|
272
|
+
setSelectedLabelByName
|
|
238
273
|
}
|
|
239
274
|
}
|
|
240
275
|
})
|
|
@@ -249,6 +284,14 @@ export default defineComponent({
|
|
|
249
284
|
height: 32px;
|
|
250
285
|
line-height: 30px;
|
|
251
286
|
}
|
|
287
|
+
|
|
288
|
+
.dl-label-picker .dl-table tbody tr.highlighted td {
|
|
289
|
+
background-color: var(--dl-color-panel-background);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.dl-label-picker .dl-table tbody tr.selected td {
|
|
293
|
+
background-color: var(--dl-color-fill);
|
|
294
|
+
}
|
|
252
295
|
</style>
|
|
253
296
|
|
|
254
297
|
<style>
|