@syncfusion/ej2-querybuilder 27.2.3 → 27.2.5
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/dist/ej2-querybuilder.min.js +2 -2
- package/dist/ej2-querybuilder.umd.min.js +2 -2
- package/dist/ej2-querybuilder.umd.min.js.map +1 -1
- package/dist/es6/ej2-querybuilder.es2015.js +23 -1
- package/dist/es6/ej2-querybuilder.es2015.js.map +1 -1
- package/dist/es6/ej2-querybuilder.es5.js +24 -1
- package/dist/es6/ej2-querybuilder.es5.js.map +1 -1
- package/dist/global/ej2-querybuilder.min.js +2 -2
- package/dist/global/ej2-querybuilder.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +9 -9
- package/src/query-builder/query-builder.js +15 -0
- package/src/query-builder/query-library.js +9 -1
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 27.2.
|
|
3
|
+
* version : 27.2.5
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-querybuilder@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-querybuilder@27.2.
|
|
3
|
+
"_id": "@syncfusion/ej2-querybuilder@27.2.3",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-pQbPQ9au6eCFMjmbiVUUq+zlocT/uOCUgrYU1buGLIfP3Djgzy87yzYmar3pFm6/tR2IGhULLNmqS7CHak0nLA==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-querybuilder",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"/@syncfusion/ej2-react-querybuilder",
|
|
24
24
|
"/@syncfusion/ej2-vue-querybuilder"
|
|
25
25
|
],
|
|
26
|
-
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-querybuilder/-/ej2-querybuilder-27.2.
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-querybuilder/-/ej2-querybuilder-27.2.3.tgz",
|
|
27
|
+
"_shasum": "80108ed5967328c86d788cb1776fc6fca6e918c9",
|
|
28
28
|
"_spec": "@syncfusion/ej2-querybuilder@*",
|
|
29
29
|
"_where": "/jenkins/workspace/elease-automation_release_27.1.1/packages/included",
|
|
30
30
|
"author": {
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
},
|
|
33
33
|
"bundleDependencies": false,
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@syncfusion/ej2-base": "~27.2.
|
|
36
|
-
"@syncfusion/ej2-buttons": "~27.2.
|
|
35
|
+
"@syncfusion/ej2-base": "~27.2.5",
|
|
36
|
+
"@syncfusion/ej2-buttons": "~27.2.4",
|
|
37
37
|
"@syncfusion/ej2-calendars": "~27.2.3",
|
|
38
|
-
"@syncfusion/ej2-dropdowns": "~27.2.
|
|
39
|
-
"@syncfusion/ej2-inputs": "~27.2.
|
|
38
|
+
"@syncfusion/ej2-dropdowns": "~27.2.5",
|
|
39
|
+
"@syncfusion/ej2-inputs": "~27.2.4",
|
|
40
40
|
"@syncfusion/ej2-splitbuttons": "~27.2.2"
|
|
41
41
|
},
|
|
42
42
|
"deprecated": false,
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"url": "https://github.com/syncfusion/ej2-javascript-ui-controls/tree/master/controls/querybuilder"
|
|
67
67
|
},
|
|
68
68
|
"typings": "index.d.ts",
|
|
69
|
-
"version": "27.2.
|
|
69
|
+
"version": "27.2.5",
|
|
70
70
|
"sideEffects": false,
|
|
71
71
|
"homepage": "https://www.syncfusion.com/javascript-ui-controls"
|
|
72
72
|
}
|
|
@@ -2912,6 +2912,11 @@ var QueryBuilder = /** @class */ (function (_super) {
|
|
|
2912
2912
|
this.setDefaultValue(parentId, true, false);
|
|
2913
2913
|
selectedValue = selectedVal.join(',');
|
|
2914
2914
|
}
|
|
2915
|
+
if (operator === 'between' || operator === 'notbetween') {
|
|
2916
|
+
if (selectedValue.length > 1) {
|
|
2917
|
+
selectedValue = selectedValue[idx];
|
|
2918
|
+
}
|
|
2919
|
+
}
|
|
2915
2920
|
var txtBox = void 0;
|
|
2916
2921
|
txtBox = {
|
|
2917
2922
|
placeholder: this.l10n.getConstant('SelectValue'),
|
|
@@ -3650,6 +3655,12 @@ var QueryBuilder = /** @class */ (function (_super) {
|
|
|
3650
3655
|
rule.rules[index].value = this.processValueString(selectedValue, rule.rules[index].type);
|
|
3651
3656
|
}
|
|
3652
3657
|
}
|
|
3658
|
+
else if (oper === 'between' || oper === 'notbetween') {
|
|
3659
|
+
if (typeof rule.rules[index].value === 'string') {
|
|
3660
|
+
rule.rules[index].value = [];
|
|
3661
|
+
}
|
|
3662
|
+
rule.rules[index].value[i] = selectedValue;
|
|
3663
|
+
}
|
|
3653
3664
|
else {
|
|
3654
3665
|
rule.rules[index].value = selectedValue;
|
|
3655
3666
|
}
|
|
@@ -5231,6 +5242,10 @@ var QueryBuilder = /** @class */ (function (_super) {
|
|
|
5231
5242
|
if ((rule.operator === 'in' || rule.operator === 'notin') && rule.value && rule.value.length === 0) {
|
|
5232
5243
|
rule = {};
|
|
5233
5244
|
}
|
|
5245
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5246
|
+
if ((rule.operator === 'between' || rule.operator === 'notbetween') && Array.isArray(rule.value) && (rule.value.length < 2 || rule.value.some(function (val) { return val === '' || val === null; }))) {
|
|
5247
|
+
rule = {};
|
|
5248
|
+
}
|
|
5234
5249
|
}
|
|
5235
5250
|
else {
|
|
5236
5251
|
rule = {};
|
|
@@ -277,6 +277,7 @@ var QueryLibrary = /** @class */ (function () {
|
|
|
277
277
|
var stringValue;
|
|
278
278
|
var key;
|
|
279
279
|
var betweenValue;
|
|
280
|
+
var fieldType;
|
|
280
281
|
var condition;
|
|
281
282
|
var value;
|
|
282
283
|
var subRules;
|
|
@@ -448,7 +449,14 @@ var QueryLibrary = /** @class */ (function () {
|
|
|
448
449
|
ruleValue = stringValue.replace('$', '');
|
|
449
450
|
type = 'string';
|
|
450
451
|
}
|
|
451
|
-
|
|
452
|
+
for (var _i = 0, _a = this.parent.columns; _i < _a.length; _i++) {
|
|
453
|
+
var column = _a[_i];
|
|
454
|
+
if (column.field === condition) {
|
|
455
|
+
fieldType = column.type;
|
|
456
|
+
break;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
if (!isNaN(Date.parse(stringValue)) || fieldType === 'date') { // Date type operators
|
|
452
460
|
operatorValue = operatorValue || this.getOperatorFromMongoOperator(key);
|
|
453
461
|
type = 'date';
|
|
454
462
|
ruleValue = stringValue;
|