@cocreate/utils 1.17.17 → 1.17.18

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/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [1.17.18](https://github.com/CoCreate-app/CoCreate-utils/compare/v1.17.17...v1.17.18) (2023-01-09)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * bumpo dependnecies ([b177a5d](https://github.com/CoCreate-app/CoCreate-utils/commit/b177a5d3a20262d750f77918edaeaf15efde658b))
7
+ * query logical operator default set to and, if sort is number and has no value set to 0 ([27f6e87](https://github.com/CoCreate-app/CoCreate-utils/commit/27f6e87db9ab13e9903d57b17f5e0850d8357220))
8
+
1
9
  ## [1.17.17](https://github.com/CoCreate-app/CoCreate-utils/compare/v1.17.16...v1.17.17) (2023-01-06)
2
10
 
3
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/utils",
3
- "version": "1.17.17",
3
+ "version": "1.17.18",
4
4
  "description": "A simple utils component in vanilla javascript. Easily configured using HTML5 attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "utils",
@@ -60,6 +60,6 @@
60
60
  "webpack-log": "^3.0.1"
61
61
  },
62
62
  "dependencies": {
63
- "@cocreate/docs": "^1.5.4"
63
+ "@cocreate/docs": "^1.5.5"
64
64
  }
65
65
  }
package/src/utils.js CHANGED
@@ -310,7 +310,7 @@
310
310
  dataValue = data[n][query[i].name]
311
311
  if (dataValue == undefined)
312
312
  dataValue = ''
313
- let logicalOperator = query[i].logicalOperator || 'or'
313
+ let logicalOperator = query[i].logicalOperator || 'and'
314
314
  let queryValues = query[i].value
315
315
  if (!Array.isArray(queryValues))
316
316
  queryValues = [queryValues]
@@ -462,6 +462,8 @@
462
462
  b[name] = ""
463
463
  return b[name].localeCompare(a[name])
464
464
  case 'number':
465
+ if (!b[name])
466
+ b[name] = 0
465
467
  return b[name] - a[name]
466
468
  case 'array':
467
469
  case 'object':
@@ -474,6 +476,8 @@
474
476
  a[name] = ""
475
477
  return a[name].localeCompare(b[name])
476
478
  case 'number':
479
+ if (!a[name])
480
+ a[name] = 0
477
481
  return a[name] - b[name]
478
482
  case 'array':
479
483
  case 'object':