@dataloop-ai/components 0.20.167-ds-v3.3 → 0.20.167-ds-v3.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
CHANGED
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
</div>
|
|
54
54
|
</div>
|
|
55
55
|
<dl-tooltip
|
|
56
|
-
v-if="!focused"
|
|
56
|
+
v-if="!focused && !noTooltip"
|
|
57
57
|
border="1px solid var(--dl-color-separator)"
|
|
58
58
|
background-color="dl-color-panel-background"
|
|
59
59
|
color="dl-color-darker"
|
|
@@ -248,6 +248,10 @@ export default defineComponent({
|
|
|
248
248
|
type: String,
|
|
249
249
|
default: '28px'
|
|
250
250
|
},
|
|
251
|
+
noTooltip: {
|
|
252
|
+
type: Boolean,
|
|
253
|
+
default: false
|
|
254
|
+
},
|
|
251
255
|
omitSuggestions: {
|
|
252
256
|
type: Array as PropType<string[]>,
|
|
253
257
|
default: () => [] as string[]
|
|
@@ -297,6 +301,7 @@ export default defineComponent({
|
|
|
297
301
|
defaultIcon,
|
|
298
302
|
defaultIconColor,
|
|
299
303
|
schema,
|
|
304
|
+
noTooltip,
|
|
300
305
|
omitSuggestions,
|
|
301
306
|
operatorsOverride,
|
|
302
307
|
height,
|
|
@@ -788,11 +788,12 @@ export default defineComponent({
|
|
|
788
788
|
let shouldSkipValidation = false
|
|
789
789
|
|
|
790
790
|
if (storedValidTarget.value && targetRow.value) {
|
|
791
|
-
const
|
|
791
|
+
const isStoredTargetAncestor = isAncestor(
|
|
792
|
+
storedValidTarget.value.id,
|
|
792
793
|
targetRow.value.id,
|
|
793
794
|
tableRows.value
|
|
794
795
|
)
|
|
795
|
-
if (
|
|
796
|
+
if (isStoredTargetAncestor) {
|
|
796
797
|
finalTarget = storedValidTarget.value
|
|
797
798
|
shouldSkipValidation = true
|
|
798
799
|
}
|
|
@@ -1029,6 +1030,22 @@ export default defineComponent({
|
|
|
1029
1030
|
return parentMap.get(childId) || null
|
|
1030
1031
|
}
|
|
1031
1032
|
|
|
1033
|
+
const isAncestor = (
|
|
1034
|
+
ancestorId: string,
|
|
1035
|
+
childId: string,
|
|
1036
|
+
rows: DlTableRow[]
|
|
1037
|
+
): boolean => {
|
|
1038
|
+
const parentMap = buildParentMap(rows)
|
|
1039
|
+
while (parentMap.has(childId)) {
|
|
1040
|
+
const parentId = parentMap.get(childId)!
|
|
1041
|
+
if (parentId === ancestorId) {
|
|
1042
|
+
return true
|
|
1043
|
+
}
|
|
1044
|
+
childId = parentId
|
|
1045
|
+
}
|
|
1046
|
+
return false
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1032
1049
|
const calculateRowLevel = (row: DlTableRow): number => {
|
|
1033
1050
|
const parentMap = buildParentMap(props.rows)
|
|
1034
1051
|
let level = 1
|