@dataloop-ai/components 0.19.262 → 0.19.264
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
|
@@ -672,9 +672,8 @@ export default defineComponent({
|
|
|
672
672
|
const text = (e.target as HTMLElement).textContent
|
|
673
673
|
if (text.endsWith('.') || text.endsWith(',')) {
|
|
674
674
|
setInputValue(text)
|
|
675
|
-
} else {
|
|
676
|
-
debouncedSetInputValue.value(text)
|
|
677
675
|
}
|
|
676
|
+
debouncedSetInputValue.value(text)
|
|
678
677
|
}
|
|
679
678
|
|
|
680
679
|
const onDateSelection = (value: DateInterval) => {
|
|
@@ -151,7 +151,7 @@ export function replaceJSDatesWithStringifiedDates(
|
|
|
151
151
|
if (typeof value === 'object') {
|
|
152
152
|
const testKey = Object.keys(toReturn[key])[0]
|
|
153
153
|
if (
|
|
154
|
-
['$gt', '$gte', '$lt', '$lte', '$eq', '$
|
|
154
|
+
['$gt', '$gte', '$lt', '$lte', '$eq', '$ne'].includes(
|
|
155
155
|
testKey
|
|
156
156
|
)
|
|
157
157
|
) {
|
|
@@ -218,7 +218,7 @@ export function revertValueAliases(json: Data, schema: Data) {
|
|
|
218
218
|
'$in',
|
|
219
219
|
'$nin',
|
|
220
220
|
'$eq',
|
|
221
|
-
'$
|
|
221
|
+
'$ne',
|
|
222
222
|
'$gt',
|
|
223
223
|
'$gte',
|
|
224
224
|
'$lt',
|
|
@@ -278,7 +278,7 @@ export function setValueAliases(json: Data, schema: Data) {
|
|
|
278
278
|
'$in',
|
|
279
279
|
'$nin',
|
|
280
280
|
'$eq',
|
|
281
|
-
'$
|
|
281
|
+
'$ne',
|
|
282
282
|
'$gt',
|
|
283
283
|
'$gte',
|
|
284
284
|
'$lt',
|
|
@@ -288,9 +288,7 @@ export function setValueAliases(json: Data, schema: Data) {
|
|
|
288
288
|
const replaceValues = (where: Data) => {
|
|
289
289
|
for (const key in where) {
|
|
290
290
|
const val = where[key]
|
|
291
|
-
|
|
292
291
|
if (typeof val === 'object') {
|
|
293
|
-
const val = where[key]
|
|
294
292
|
const isOperator = operatorKeys.includes(Object.keys(val)[0])
|
|
295
293
|
const isArrayOperator = ['$in', '$nin'].includes(
|
|
296
294
|
Object.keys(val)[0]
|
|
@@ -299,19 +297,22 @@ export function setValueAliases(json: Data, schema: Data) {
|
|
|
299
297
|
if (isOperator) {
|
|
300
298
|
const opVal = val[Object.keys(val)[0]]
|
|
301
299
|
const aliases = valueAliases(schema, key)
|
|
300
|
+
const aliasesKeys = Object.keys(aliases)
|
|
302
301
|
|
|
303
302
|
if (isArrayOperator) {
|
|
304
303
|
for (let i = 0; i < opVal.length; ++i) {
|
|
305
|
-
const
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
304
|
+
const opVal_i = opVal[i]
|
|
305
|
+
const value = aliasesKeys.find(
|
|
306
|
+
(key) => aliases[key] === opVal_i
|
|
307
|
+
)
|
|
308
|
+
if (value) {
|
|
309
|
+
val[Object.keys(val)[0]][i] = value
|
|
311
310
|
}
|
|
312
311
|
}
|
|
313
312
|
} else {
|
|
314
|
-
const value =
|
|
313
|
+
const value = aliasesKeys.find(
|
|
314
|
+
(key) => aliases[key] === opVal
|
|
315
|
+
)
|
|
315
316
|
if (value) {
|
|
316
317
|
val[Object.keys(val)[0]] = value
|
|
317
318
|
}
|
|
@@ -565,7 +565,7 @@ const isValidByDataType = (
|
|
|
565
565
|
|
|
566
566
|
const validateBracketValues = (value: string) => {
|
|
567
567
|
const bracketless = removeBrackets(value)
|
|
568
|
-
const pureValue = bracketless.split(
|
|
568
|
+
const pureValue = bracketless.split(/,\s*/)
|
|
569
569
|
if (pureValue.length === 1) {
|
|
570
570
|
return pureValue[0]
|
|
571
571
|
}
|