@dataloop-ai/components 0.20.78 → 0.20.80

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.20.78",
3
+ "version": "0.20.80",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -1,4 +1,5 @@
1
- @import url('./nd/css2/google-font-roboto-400-500-swap.css');
1
+ /* @import url('./nd/css2/google-font-roboto-400-500-swap.css'); // for on prem */
2
+ @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap');
2
3
  @import 'constants.css';
3
4
 
4
5
  .roboto-regular {
@@ -227,7 +227,7 @@ export function revertValueAliases(json: Data, schema: Data) {
227
227
 
228
228
  const replaceAliases = (where: Data) => {
229
229
  for (const key in where) {
230
- if (typeof where[key] === 'object') {
230
+ if (where[key] && typeof where[key] === 'object') {
231
231
  const val = where[key]
232
232
  const isOperator = operatorKeys.includes(Object.keys(val)[0])
233
233
  const isArrayOperator = ['$in', '$nin'].includes(
@@ -288,7 +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
- if (typeof val === 'object') {
291
+ if (val && typeof val === 'object') {
292
292
  const isOperator = operatorKeys.includes(Object.keys(val)[0])
293
293
  const isArrayOperator = ['$in', '$nin'].includes(
294
294
  Object.keys(val)[0]
@@ -13,7 +13,7 @@ export function isDatePattern(str: string) {
13
13
 
14
14
  const GeneratePureValue = (value: any) => {
15
15
  if (value === '') {
16
- return null
16
+ return
17
17
  }
18
18
 
19
19
  if (typeof value === 'string') {
@@ -140,42 +140,42 @@ export const parseSmartQuery = (
140
140
  case termUpToQuote.includes('>='):
141
141
  ;[key, value] = SplitFirst(term, '>=').map((x) => x.trim())
142
142
  pureValue = GeneratePureValue(value)
143
- if (pureValue !== null) {
143
+ if (pureValue !== undefined) {
144
144
  andQuery.push({ [key]: { $gte: pureValue } })
145
145
  }
146
146
  break
147
147
  case termUpToQuote.includes('<='):
148
148
  ;[key, value] = SplitFirst(term, '<=').map((x) => x.trim())
149
149
  pureValue = GeneratePureValue(value)
150
- if (pureValue !== null) {
150
+ if (pureValue !== undefined) {
151
151
  andQuery.push({ [key]: { $lte: pureValue } })
152
152
  }
153
153
  break
154
154
  case termUpToQuote.includes('>'):
155
155
  ;[key, value] = SplitFirst(term, '>').map((x) => x.trim())
156
156
  pureValue = GeneratePureValue(value)
157
- if (pureValue !== null) {
157
+ if (pureValue !== undefined) {
158
158
  andQuery.push({ [key]: { $gt: pureValue } })
159
159
  }
160
160
  break
161
161
  case termUpToQuote.includes('<'):
162
162
  ;[key, value] = SplitFirst(term, '<').map((x) => x.trim())
163
163
  pureValue = GeneratePureValue(value)
164
- if (pureValue !== null) {
164
+ if (pureValue !== undefined) {
165
165
  andQuery.push({ [key]: { $lt: pureValue } })
166
166
  }
167
167
  break
168
168
  case termUpToQuote.includes('!='):
169
169
  ;[key, value] = SplitFirst(term, '!=').map((x) => x.trim())
170
170
  pureValue = GeneratePureValue(value)
171
- if (pureValue !== null) {
171
+ if (pureValue !== undefined) {
172
172
  andQuery.push({ [key]: { $ne: pureValue } })
173
173
  }
174
174
  break
175
175
  case termUpToQuote.includes('='):
176
176
  ;[key, value] = SplitFirst(term, '=').map((x) => x.trim())
177
177
  pureValue = GeneratePureValue(value)
178
- if (pureValue !== null) {
178
+ if (pureValue !== undefined) {
179
179
  andQuery.push({ [key]: pureValue })
180
180
  }
181
181
  break
@@ -200,7 +200,7 @@ export const parseSmartQuery = (
200
200
  .filter((x) => x)
201
201
 
202
202
  pureValue = GeneratePureValue(queryValue)
203
- if (pureValue !== null && Array.isArray(pureValue)) {
203
+ if (pureValue !== undefined && Array.isArray(pureValue)) {
204
204
  andQuery.push({ [key]: { $nin: pureValue } })
205
205
  }
206
206
  } else {
@@ -211,7 +211,7 @@ export const parseSmartQuery = (
211
211
  .filter((x) => x)
212
212
 
213
213
  pureValue = GeneratePureValue(queryValue)
214
- if (pureValue !== null && Array.isArray(pureValue)) {
214
+ if (pureValue !== undefined && Array.isArray(pureValue)) {
215
215
  andQuery.push({ [key]: { $in: pureValue } })
216
216
  }
217
217
  }