@dataloop-ai/components 0.18.93 → 0.18.95
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
|
@@ -690,6 +690,12 @@ export default defineComponent({
|
|
|
690
690
|
() => virtualScroll.value === true
|
|
691
691
|
)
|
|
692
692
|
|
|
693
|
+
const hasEmptyStateProps = computed(() =>
|
|
694
|
+
props.emptyStateProps
|
|
695
|
+
? Object.keys(props.emptyStateProps).length > 0
|
|
696
|
+
: false
|
|
697
|
+
)
|
|
698
|
+
|
|
693
699
|
const groupOptions = computed(() =>
|
|
694
700
|
(props.columns as DlTableColumn[]).map((item) => ({
|
|
695
701
|
label: item.label,
|
|
@@ -1337,9 +1343,6 @@ export default defineComponent({
|
|
|
1337
1343
|
const updatePagination = (value: any, key: string) => {
|
|
1338
1344
|
return setPagination({ [`${key}`]: value })
|
|
1339
1345
|
}
|
|
1340
|
-
const hasEmptyStateProps = computed(
|
|
1341
|
-
() => Object.keys(props.emptyStateProps).length > 0
|
|
1342
|
-
)
|
|
1343
1346
|
|
|
1344
1347
|
const handleVisibleColumnsUpdate = (columns: string[]) => {
|
|
1345
1348
|
if (columns.length < 1) return
|
|
@@ -243,8 +243,10 @@ export default defineComponent({
|
|
|
243
243
|
const tableColumns = ref(props.columns)
|
|
244
244
|
const hasFlatTreeData = true
|
|
245
245
|
|
|
246
|
-
const hasEmptyStateProps = computed(
|
|
247
|
-
|
|
246
|
+
const hasEmptyStateProps = computed(() =>
|
|
247
|
+
props.emptyStateProps
|
|
248
|
+
? Object.keys(props.emptyStateProps).length > 0
|
|
249
|
+
: false
|
|
248
250
|
)
|
|
249
251
|
|
|
250
252
|
const computedRows = computed(() =>
|
|
@@ -281,7 +283,7 @@ export default defineComponent({
|
|
|
281
283
|
rowsArr = tableRows.value
|
|
282
284
|
) => {
|
|
283
285
|
(rowsArr as DlTableRow[]).some((o) => {
|
|
284
|
-
if (o.
|
|
286
|
+
if (o[getRowKey.value as unknown as string] === name) {
|
|
285
287
|
if (isVue2) {
|
|
286
288
|
set(o, 'expanded', isExpanded)
|
|
287
289
|
} else {
|
|
@@ -22,7 +22,12 @@
|
|
|
22
22
|
style="width: 100px"
|
|
23
23
|
class="props"
|
|
24
24
|
/>
|
|
25
|
-
|
|
25
|
+
<div>
|
|
26
|
+
Template searches<br>
|
|
27
|
+
|
|
28
|
+
dir IN 'test', 'test2'<br>
|
|
29
|
+
{ "metadata.system.width": 5 }<br>
|
|
30
|
+
</div>
|
|
26
31
|
<dl-smart-search
|
|
27
32
|
v-model="queryObject"
|
|
28
33
|
:aliases="aliases"
|
|
@@ -45,6 +50,15 @@
|
|
|
45
50
|
<br>
|
|
46
51
|
Only the search
|
|
47
52
|
|
|
53
|
+
<dl-smart-search-input
|
|
54
|
+
v-model="queryObject"
|
|
55
|
+
:aliases="aliases"
|
|
56
|
+
:schema="schema"
|
|
57
|
+
:color-schema="colorSchema"
|
|
58
|
+
:strict="strictState"
|
|
59
|
+
:disabled="switchState"
|
|
60
|
+
/>
|
|
61
|
+
|
|
48
62
|
<dl-smart-search-input
|
|
49
63
|
v-model="queryObject2"
|
|
50
64
|
:aliases="aliases"
|
|
@@ -53,6 +67,7 @@
|
|
|
53
67
|
:strict="strictState"
|
|
54
68
|
:disabled="switchState"
|
|
55
69
|
/>
|
|
70
|
+
{{ queryObject }}
|
|
56
71
|
{{ queryObject2 }}
|
|
57
72
|
</div>
|
|
58
73
|
</template>
|
|
@@ -370,7 +370,7 @@ const getError = (
|
|
|
370
370
|
}
|
|
371
371
|
|
|
372
372
|
const isValidByDataType = (
|
|
373
|
-
str: string,
|
|
373
|
+
str: string | string[],
|
|
374
374
|
dataType: string | string[],
|
|
375
375
|
operator: string
|
|
376
376
|
): boolean => {
|
|
@@ -378,12 +378,20 @@ const isValidByDataType = (
|
|
|
378
378
|
return true
|
|
379
379
|
}
|
|
380
380
|
|
|
381
|
+
if (Array.isArray(str)) {
|
|
382
|
+
for (const string of str) {
|
|
383
|
+
if (!isValidByDataType(string, dataType, operator)) {
|
|
384
|
+
return false
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
return true
|
|
388
|
+
}
|
|
389
|
+
|
|
381
390
|
/**
|
|
382
391
|
* TODO: create new support to validate by operation as well
|
|
383
392
|
*/
|
|
384
393
|
|
|
385
394
|
if (Array.isArray(dataType)) {
|
|
386
|
-
str = str.replace(/\'/g, '')
|
|
387
395
|
let isOneOf = !!getValueMatch(dataType, str)
|
|
388
396
|
for (const type of dataType) {
|
|
389
397
|
isOneOf = isOneOf || isValidByDataType(str, type, operator)
|
|
@@ -406,9 +414,12 @@ const isValidByDataType = (
|
|
|
406
414
|
}
|
|
407
415
|
|
|
408
416
|
const validateBracketValues = (value: string) => {
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
417
|
+
const bracketless = removeBrackets(value)
|
|
418
|
+
const pureValue = bracketless.split(',')
|
|
419
|
+
if (pureValue.length === 1) {
|
|
420
|
+
return pureValue[0]
|
|
421
|
+
}
|
|
422
|
+
return pureValue
|
|
412
423
|
}
|
|
413
424
|
|
|
414
425
|
const isValidDateIntervalPattern = (str: string) => {
|
|
@@ -426,7 +437,7 @@ const isValidBoolean = (str: string) => {
|
|
|
426
437
|
const isValidString = (str: string) => {
|
|
427
438
|
const match = str.match(/(?<=\")(.*?)(?=\")|(?<=\')(.*?)(?=\')/)
|
|
428
439
|
if (!match) return false
|
|
429
|
-
return match[0] === removeQuotes(str)
|
|
440
|
+
return match[0] === removeQuotes(str.trim())
|
|
430
441
|
}
|
|
431
442
|
|
|
432
443
|
const getOperatorByDataType = (dataType: string) => {
|