@webtypen/webframez-core 0.2.60 → 0.2.62

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.
@@ -301,22 +301,40 @@ class Datatable {
301
301
  else if (valueClean.toString().trim() === "!=null") {
302
302
  value = { $ne: null };
303
303
  }
304
- else if (valueClean.toString().startWith("!=")) {
304
+ else if (valueClean.toString().startsWith("!=[") && valueClean.toString().trim().endsWith("]")) {
305
+ const arr = valueClean
306
+ .trim()
307
+ .substring(0, valueClean.length - 1)
308
+ .replace("!=[", "")
309
+ .split(",")
310
+ .map((el) => el.trim());
311
+ value = { $nin: arr };
312
+ }
313
+ else if (valueClean.toString().startsWith("==[") && valueClean.toString().trim().endsWith("]")) {
314
+ const arr = valueClean
315
+ .trim()
316
+ .substring(0, valueClean.length - 1)
317
+ .replace("==[", "")
318
+ .split(",")
319
+ .map((el) => el.trim());
320
+ value = { $in: arr };
321
+ }
322
+ else if (valueClean.toString().startsWith("!=")) {
305
323
  value = { $ne: valueClean.replace("!=", "") };
306
324
  }
307
- else if (valueClean.toString().startWith("==")) {
325
+ else if (valueClean.toString().startsWith("==")) {
308
326
  value = valueClean.replace("==", "");
309
327
  }
310
- else if (valueClean.toString().startWith(">=")) {
328
+ else if (valueClean.toString().startsWith(">=")) {
311
329
  value = { $gte: valueClean.replace(">=", "") };
312
330
  }
313
- else if (valueClean.toString().startWith(">")) {
331
+ else if (valueClean.toString().startsWith(">")) {
314
332
  value = { $gt: valueClean.replace(">", "") };
315
333
  }
316
- else if (valueClean.toString().startWith("<=")) {
334
+ else if (valueClean.toString().startsWith("<=")) {
317
335
  value = { $lte: valueClean.replace("<=", "") };
318
336
  }
319
- else if (valueClean.toString().startWith("<")) {
337
+ else if (valueClean.toString().startsWith("<")) {
320
338
  value = { $lt: valueClean.replace("<", "") };
321
339
  }
322
340
  else if (options && options.regex) {
@@ -411,6 +429,24 @@ class Datatable {
411
429
  $gt: cleanVal(val),
412
430
  };
413
431
  }
432
+ else if (valueClean.toString().startsWith("!=[") && valueClean.toString().trim().endsWith("]")) {
433
+ const arr = valueClean
434
+ .replace("!=[", "")
435
+ .trim()
436
+ .substring(0, valueClean.length - 1)
437
+ .split(",")
438
+ .map((el) => el.trim());
439
+ out[mappingKey] = { $nin: arr.map((el) => cleanVal(el)) };
440
+ }
441
+ else if (valueClean.toString().startsWith("==[") && valueClean.toString().trim().endsWith("]")) {
442
+ const arr = valueClean
443
+ .replace("==[", "")
444
+ .trim()
445
+ .substring(0, valueClean.length - 1)
446
+ .split(",")
447
+ .map((el) => el.trim());
448
+ out[mappingKey] = { $in: arr.map((el) => cleanVal(el)) };
449
+ }
414
450
  else if (valueClean.startsWith("!=")) {
415
451
  const val = valueClean.replace("!=", "").trim();
416
452
  out[mappingKey] = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webtypen/webframez-core",
3
- "version": "0.2.60",
3
+ "version": "0.2.62",
4
4
  "description": "The core package of the typescript based webframez (web-framework) by webtypen.de",
5
5
  "homepage": "https://webtypen.de/",
6
6
  "license": "MIT",
@@ -304,17 +304,33 @@ export class Datatable {
304
304
  value = null;
305
305
  } else if (valueClean.toString().trim() === "!=null") {
306
306
  value = { $ne: null };
307
- } else if (valueClean.toString().startWith("!=")) {
307
+ } else if (valueClean.toString().startsWith("!=[") && valueClean.toString().trim().endsWith("]")) {
308
+ const arr = valueClean
309
+ .trim()
310
+ .substring(0, valueClean.length - 1)
311
+ .replace("!=[", "")
312
+ .split(",")
313
+ .map((el: any) => el.trim());
314
+ value = { $nin: arr };
315
+ } else if (valueClean.toString().startsWith("==[") && valueClean.toString().trim().endsWith("]")) {
316
+ const arr = valueClean
317
+ .trim()
318
+ .substring(0, valueClean.length - 1)
319
+ .replace("==[", "")
320
+ .split(",")
321
+ .map((el: any) => el.trim());
322
+ value = { $in: arr };
323
+ } else if (valueClean.toString().startsWith("!=")) {
308
324
  value = { $ne: valueClean.replace("!=", "") };
309
- } else if (valueClean.toString().startWith("==")) {
325
+ } else if (valueClean.toString().startsWith("==")) {
310
326
  value = valueClean.replace("==", "");
311
- } else if (valueClean.toString().startWith(">=")) {
327
+ } else if (valueClean.toString().startsWith(">=")) {
312
328
  value = { $gte: valueClean.replace(">=", "") };
313
- } else if (valueClean.toString().startWith(">")) {
329
+ } else if (valueClean.toString().startsWith(">")) {
314
330
  value = { $gt: valueClean.replace(">", "") };
315
- } else if (valueClean.toString().startWith("<=")) {
331
+ } else if (valueClean.toString().startsWith("<=")) {
316
332
  value = { $lte: valueClean.replace("<=", "") };
317
- } else if (valueClean.toString().startWith("<")) {
333
+ } else if (valueClean.toString().startsWith("<")) {
318
334
  value = { $lt: valueClean.replace("<", "") };
319
335
  } else if (options && options.regex) {
320
336
  value = new RegExp(valueClean, "i");
@@ -417,6 +433,22 @@ export class Datatable {
417
433
  out[mappingKey] = {
418
434
  $gt: cleanVal(val),
419
435
  };
436
+ } else if (valueClean.toString().startsWith("!=[") && valueClean.toString().trim().endsWith("]")) {
437
+ const arr = valueClean
438
+ .replace("!=[", "")
439
+ .trim()
440
+ .substring(0, valueClean.length - 1)
441
+ .split(",")
442
+ .map((el: any) => el.trim());
443
+ out[mappingKey] = { $nin: arr.map((el: any) => cleanVal(el)) };
444
+ } else if (valueClean.toString().startsWith("==[") && valueClean.toString().trim().endsWith("]")) {
445
+ const arr = valueClean
446
+ .replace("==[", "")
447
+ .trim()
448
+ .substring(0, valueClean.length - 1)
449
+ .split(",")
450
+ .map((el: any) => el.trim());
451
+ out[mappingKey] = { $in: arr.map((el: any) => cleanVal(el)) };
420
452
  } else if (valueClean.startsWith("!=")) {
421
453
  const val = valueClean.replace("!=", "").trim();
422
454