@dataloop-ai/components 0.18.96 → 0.18.98

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.18.96",
3
+ "version": "0.18.98",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -40,14 +40,14 @@ export function useTableColumnSelection(
40
40
 
41
41
  const computedCols = computed(() => {
42
42
  const { sortBy, descending } = computedPagination.value
43
-
44
- const cols = visibleColumnsState?.value
45
- ? colList.value.filter(
46
- (col) =>
47
- col.required === true ||
48
- visibleColumnsState.value.includes(col.name) === true
49
- )
50
- : colList.value
43
+ const cols =
44
+ visibleColumnsState?.value && visibleColumnsState?.value?.length
45
+ ? colList.value.filter(
46
+ (col) =>
47
+ col.required === true ||
48
+ visibleColumnsState.value.includes(col.name) === true
49
+ )
50
+ : colList.value
51
51
 
52
52
  const updatedCols = cols.map((col) => {
53
53
  const align = col.align || 'right'
@@ -26,6 +26,7 @@
26
26
  Template searches<br>
27
27
 
28
28
  dir IN 'test', 'test2'<br>
29
+ type = 'dir'<br>
29
30
  { "metadata.system.width": 5 }<br>
30
31
  </div>
31
32
  <dl-smart-search
@@ -97,7 +98,6 @@ export default defineComponent({
97
98
  filename: 'string',
98
99
  name: 'string',
99
100
  url: 'string',
100
- type: 'string',
101
101
  dataset: 'string',
102
102
  datasetId: 'string',
103
103
  dir: 'string',
@@ -113,7 +113,10 @@ export default defineComponent({
113
113
  },
114
114
  test: 'any',
115
115
  '*': 'any'
116
- }
116
+ },
117
+ type: ['dir', 'file'],
118
+ test1: ['5', '6', 'number'],
119
+ test2: ['true', 'false']
117
120
  }
118
121
  const schema2: any = {
119
122
  type: [
@@ -521,14 +521,26 @@ const insensitive = (str: string): string => str.toLowerCase()
521
521
  const getMatch = (strArr: string[], str: string) =>
522
522
  strArr.find((val) => insensitive(val) === insensitive(str)) ?? null
523
523
 
524
- const getValueMatch = (strArr: string[], str: string | number | boolean) => {
525
- return (
526
- strArr.find((val) =>
527
- val.toString().charAt(0) === '"' && typeof str === 'string'
528
- ? insensitive(val.replaceAll('"', '')) === insensitive(str)
529
- : val.toString() === str.toString()
530
- ) ?? null
531
- )
524
+ const getValueMatch = (
525
+ strArr: (string | number | boolean)[],
526
+ str: string | number | boolean
527
+ ) => {
528
+ for (const s of strArr) {
529
+ let term = str
530
+ let serach = s
531
+
532
+ if (typeof str === 'string') {
533
+ term = insensitive(str.replace(/["']/gi, ''))
534
+ }
535
+ if (typeof s === 'string') {
536
+ serach = insensitive(s)
537
+ }
538
+
539
+ if (serach === term) {
540
+ return s
541
+ }
542
+ }
543
+ return null
532
544
  }
533
545
  const getMatches = (strArr: string[], str: string | number | boolean) =>
534
546
  strArr.filter((val) =>