@cocreate/utils 1.17.26 → 1.18.1
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 +14 -0
- package/package.json +2 -2
- package/src/utils.js +9 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.18.1](https://github.com/CoCreate-app/CoCreate-utils/compare/v1.18.0...v1.18.1) (2023-01-31)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* bump dependencies ([1923825](https://github.com/CoCreate-app/CoCreate-utils/commit/192382563e0afcbadd0aa3c9fa6aa65f28c397ec))
|
|
7
|
+
|
|
8
|
+
# [1.18.0](https://github.com/CoCreate-app/CoCreate-utils/compare/v1.17.26...v1.18.0) (2023-01-31)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* supports query and search of empty string. ([b3e45e8](https://github.com/CoCreate-app/CoCreate-utils/commit/b3e45e81b27f595d0179f6e01af5555e9315cfa2))
|
|
14
|
+
|
|
1
15
|
## [1.17.26](https://github.com/CoCreate-app/CoCreate-utils/compare/v1.17.25...v1.17.26) (2023-01-30)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/utils",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.1",
|
|
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.
|
|
63
|
+
"@cocreate/docs": "^1.5.12"
|
|
64
64
|
}
|
|
65
65
|
}
|
package/src/utils.js
CHANGED
|
@@ -336,6 +336,10 @@
|
|
|
336
336
|
case 'includes':
|
|
337
337
|
if (dataValue.includes(queryValue))
|
|
338
338
|
queryStatus = true
|
|
339
|
+
if (queryValue === "" && logicalOperator === 'and') {
|
|
340
|
+
if (dataValue !== "")
|
|
341
|
+
queryStatus = false
|
|
342
|
+
}
|
|
339
343
|
break;
|
|
340
344
|
case '$eq':
|
|
341
345
|
if (dataValue == queryValue)
|
|
@@ -436,6 +440,11 @@
|
|
|
436
440
|
if (search[i].caseSensitive != 'true' || search[i].caseSensitive != true)
|
|
437
441
|
searchString = searchString.toLowerCase()
|
|
438
442
|
|
|
443
|
+
if (searchString === "" && search[i].operator === 'and') {
|
|
444
|
+
if (value !== "")
|
|
445
|
+
return false
|
|
446
|
+
}
|
|
447
|
+
|
|
439
448
|
if (value.indexOf(searchString) > -1)
|
|
440
449
|
status = true;
|
|
441
450
|
|