@syncfusion/ej2-querybuilder 32.2.4 → 32.2.8
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 +49 -3
- package/dist/es6/ej2-querybuilder.es2015.js.map +1 -1
- package/dist/es6/ej2-querybuilder.es5.js +49 -3
- 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 +7 -7
- package/src/query-builder/query-builder.d.ts +2 -0
- package/src/query-builder/query-builder.js +49 -3
- package/styles/material3-dark-lite.css +0 -2
- package/styles/material3-dark.css +0 -2
- package/styles/material3-lite.css +0 -2
- package/styles/material3.css +0 -2
- package/styles/query-builder/material3-dark.css +0 -2
- package/styles/query-builder/material3.css +0 -2
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 32.2.
|
|
3
|
+
* version : 32.2.8
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2025. 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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncfusion/ej2-querybuilder",
|
|
3
|
-
"version": "32.2.
|
|
3
|
+
"version": "32.2.8",
|
|
4
4
|
"description": "Essential JS 2 QueryBuilder",
|
|
5
5
|
"author": "Syncfusion Inc.",
|
|
6
6
|
"license": "SEE LICENSE IN license",
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
"module": "./index.js",
|
|
9
9
|
"es2015": "./dist/es6/ej2-querybuilder.es5.js",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@syncfusion/ej2-base": "~32.2.
|
|
12
|
-
"@syncfusion/ej2-buttons": "~32.2.
|
|
13
|
-
"@syncfusion/ej2-calendars": "~32.2.
|
|
14
|
-
"@syncfusion/ej2-dropdowns": "~32.2.
|
|
15
|
-
"@syncfusion/ej2-inputs": "~32.2.
|
|
16
|
-
"@syncfusion/ej2-splitbuttons": "~32.2.
|
|
11
|
+
"@syncfusion/ej2-base": "~32.2.6",
|
|
12
|
+
"@syncfusion/ej2-buttons": "~32.2.7",
|
|
13
|
+
"@syncfusion/ej2-calendars": "~32.2.8",
|
|
14
|
+
"@syncfusion/ej2-dropdowns": "~32.2.8",
|
|
15
|
+
"@syncfusion/ej2-inputs": "~32.2.8",
|
|
16
|
+
"@syncfusion/ej2-splitbuttons": "~32.2.7"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {},
|
|
19
19
|
"keywords": [
|
|
@@ -353,6 +353,7 @@ export declare class QueryBuilder extends Component<HTMLDivElement> implements I
|
|
|
353
353
|
private groupCloned;
|
|
354
354
|
private isRequestSent;
|
|
355
355
|
private ddTree;
|
|
356
|
+
private boundResizeHandler;
|
|
356
357
|
/**
|
|
357
358
|
* Triggers when the component is created.
|
|
358
359
|
*
|
|
@@ -706,6 +707,7 @@ export declare class QueryBuilder extends Component<HTMLDivElement> implements I
|
|
|
706
707
|
private getDistinctValues;
|
|
707
708
|
private renderMultiSelect;
|
|
708
709
|
private multiSelectOpen;
|
|
710
|
+
private areQueriesSame;
|
|
709
711
|
private bindMultiSelectData;
|
|
710
712
|
private getMultiSelectData;
|
|
711
713
|
private createSpinner;
|
|
@@ -2989,7 +2989,7 @@ var QueryBuilder = /** @class */ (function (_super) {
|
|
|
2989
2989
|
value = dataSource[i]["" + field].toString();
|
|
2990
2990
|
}
|
|
2991
2991
|
var data = {};
|
|
2992
|
-
if (!(value in original)) {
|
|
2992
|
+
if (!(value in original) && value) {
|
|
2993
2993
|
original["" + value] = 1;
|
|
2994
2994
|
if (isNested === 0) {
|
|
2995
2995
|
data["" + field] = value;
|
|
@@ -3081,7 +3081,26 @@ var QueryBuilder = /** @class */ (function (_super) {
|
|
|
3081
3081
|
args.cancel = true;
|
|
3082
3082
|
this.bindMultiSelectData(element, value);
|
|
3083
3083
|
}
|
|
3084
|
+
var multiselectObj = getComponent(element, 'multiselect');
|
|
3085
|
+
if (!multiselectObj) {
|
|
3086
|
+
return;
|
|
3087
|
+
}
|
|
3088
|
+
var incomingQuery = (args.query) ? args.query : null;
|
|
3089
|
+
var existingQuery = multiselectObj.query ? multiselectObj.query : null;
|
|
3090
|
+
if (!this.areQueriesSame(existingQuery, incomingQuery)) {
|
|
3091
|
+
multiselectObj.query = null;
|
|
3092
|
+
args.query = null;
|
|
3093
|
+
}
|
|
3094
|
+
}
|
|
3095
|
+
};
|
|
3096
|
+
QueryBuilder.prototype.areQueriesSame = function (query1, query2) {
|
|
3097
|
+
if ((query1 === null || query1 === undefined) && (query2 === null || query2 === undefined)) {
|
|
3098
|
+
return true;
|
|
3099
|
+
}
|
|
3100
|
+
if ((query1 === null || query1 === undefined) || (query2 === null || query2 === undefined)) {
|
|
3101
|
+
return false;
|
|
3084
3102
|
}
|
|
3103
|
+
return JSON.stringify(query1) === JSON.stringify(query2);
|
|
3085
3104
|
};
|
|
3086
3105
|
QueryBuilder.prototype.bindMultiSelectData = function (element, value) {
|
|
3087
3106
|
this.getMultiSelectData(element, value);
|
|
@@ -4198,6 +4217,29 @@ var QueryBuilder = /** @class */ (function (_super) {
|
|
|
4198
4217
|
if (this.portals && this.portals.length) {
|
|
4199
4218
|
this.clearQBTemplate();
|
|
4200
4219
|
}
|
|
4220
|
+
var qbDdlElems = this.element.querySelectorAll('.qb-dropdownlist');
|
|
4221
|
+
if (!qbDdlElems || qbDdlElems.length === 0) {
|
|
4222
|
+
qbDdlElems = document.querySelectorAll('.qb-dropdownlist');
|
|
4223
|
+
}
|
|
4224
|
+
for (i = 0; i < qbDdlElems.length; i++) {
|
|
4225
|
+
var ddlElem = qbDdlElems[i];
|
|
4226
|
+
var targetInput = ddlElem.tagName === 'INPUT' ? ddlElem : ddlElem.querySelector('input');
|
|
4227
|
+
if (targetInput) {
|
|
4228
|
+
var ddlInst = getComponent(targetInput, 'dropdownlist');
|
|
4229
|
+
if (ddlInst) {
|
|
4230
|
+
if (ddlInst.close) {
|
|
4231
|
+
ddlInst.close = null;
|
|
4232
|
+
}
|
|
4233
|
+
if (ddlInst.open) {
|
|
4234
|
+
ddlInst.open = null;
|
|
4235
|
+
}
|
|
4236
|
+
if (ddlInst.change) {
|
|
4237
|
+
ddlInst.change = null;
|
|
4238
|
+
}
|
|
4239
|
+
ddlInst.destroy();
|
|
4240
|
+
}
|
|
4241
|
+
}
|
|
4242
|
+
}
|
|
4201
4243
|
var popupElement = document.querySelectorAll('.qb-dropdownlist.e-popup');
|
|
4202
4244
|
if (popupElement) {
|
|
4203
4245
|
for (i = 0; i < popupElement.length; i++) {
|
|
@@ -5166,7 +5208,8 @@ var QueryBuilder = /** @class */ (function (_super) {
|
|
|
5166
5208
|
if (this.allowDragAndDrop) {
|
|
5167
5209
|
EventHandler.add(document, 'keydown', this.keyBoardHandler, this);
|
|
5168
5210
|
}
|
|
5169
|
-
|
|
5211
|
+
this.boundResizeHandler = this.windowResizeHandler.bind(this);
|
|
5212
|
+
window.addEventListener('resize', this.boundResizeHandler);
|
|
5170
5213
|
};
|
|
5171
5214
|
QueryBuilder.prototype.unWireEvents = function () {
|
|
5172
5215
|
var wrapper = this.getWrapper();
|
|
@@ -5175,7 +5218,10 @@ var QueryBuilder = /** @class */ (function (_super) {
|
|
|
5175
5218
|
EventHandler.remove(wrapper, 'focusin', this.focusEventHandler);
|
|
5176
5219
|
EventHandler.remove(this.element, 'keydown', this.keyBoardHandler);
|
|
5177
5220
|
EventHandler.remove(document, 'keydown', this.keyBoardHandler);
|
|
5178
|
-
|
|
5221
|
+
if (this.boundResizeHandler) {
|
|
5222
|
+
window.removeEventListener('resize', this.boundResizeHandler);
|
|
5223
|
+
this.boundResizeHandler = null;
|
|
5224
|
+
}
|
|
5179
5225
|
};
|
|
5180
5226
|
QueryBuilder.prototype.getParentGroup = function (target, isParent) {
|
|
5181
5227
|
var groupLevel = (target instanceof Element) ? this.levelColl[target.id] : this.levelColl["" + target];
|
|
@@ -667,7 +667,6 @@
|
|
|
667
667
|
padding: 0 !important; /* stylelint-disable-line declaration-no-important */
|
|
668
668
|
}
|
|
669
669
|
.e-query-builder .e-dragclone.e-cloneproperties .e-group-container, .e-query-builder .e-dragclone.e-cloneproperties .e-rule-container {
|
|
670
|
-
background: -webkit-gradient(linear, left bottom, left top, from(rgba(var(--color-sf-primary), 0.05)), to(rgba(var(--color-sf-primary), 0.05))), rgba(var(--color-sf-surface));
|
|
671
670
|
background: linear-gradient(0deg, rgba(var(--color-sf-primary), 0.05), rgba(var(--color-sf-primary), 0.05)), rgba(var(--color-sf-surface));
|
|
672
671
|
}
|
|
673
672
|
.e-query-builder .e-dragclone.e-cloneproperties .e-rule-value-delete {
|
|
@@ -1265,7 +1264,6 @@
|
|
|
1265
1264
|
border-color: rgba(var(--color-sf-outline-variant));
|
|
1266
1265
|
}
|
|
1267
1266
|
.e-query-builder .e-rule-container {
|
|
1268
|
-
background: -webkit-gradient(linear, left bottom, left top, from(rgba(var(--color-sf-primary), 0.05)), to(rgba(var(--color-sf-primary), 0.05))), rgba(var(--color-sf-surface));
|
|
1269
1267
|
background: linear-gradient(0deg, rgba(var(--color-sf-primary), 0.05), rgba(var(--color-sf-primary), 0.05)), rgba(var(--color-sf-surface));
|
|
1270
1268
|
border-color: rgba(var(--color-sf-outline-variant));
|
|
1271
1269
|
}
|
|
@@ -667,7 +667,6 @@
|
|
|
667
667
|
padding: 0 !important; /* stylelint-disable-line declaration-no-important */
|
|
668
668
|
}
|
|
669
669
|
.e-query-builder .e-dragclone.e-cloneproperties .e-group-container, .e-query-builder .e-dragclone.e-cloneproperties .e-rule-container {
|
|
670
|
-
background: -webkit-gradient(linear, left bottom, left top, from(rgba(var(--color-sf-primary), 0.05)), to(rgba(var(--color-sf-primary), 0.05))), rgba(var(--color-sf-surface));
|
|
671
670
|
background: linear-gradient(0deg, rgba(var(--color-sf-primary), 0.05), rgba(var(--color-sf-primary), 0.05)), rgba(var(--color-sf-surface));
|
|
672
671
|
}
|
|
673
672
|
.e-query-builder .e-dragclone.e-cloneproperties .e-rule-value-delete {
|
|
@@ -1265,7 +1264,6 @@
|
|
|
1265
1264
|
border-color: rgba(var(--color-sf-outline-variant));
|
|
1266
1265
|
}
|
|
1267
1266
|
.e-query-builder .e-rule-container {
|
|
1268
|
-
background: -webkit-gradient(linear, left bottom, left top, from(rgba(var(--color-sf-primary), 0.05)), to(rgba(var(--color-sf-primary), 0.05))), rgba(var(--color-sf-surface));
|
|
1269
1267
|
background: linear-gradient(0deg, rgba(var(--color-sf-primary), 0.05), rgba(var(--color-sf-primary), 0.05)), rgba(var(--color-sf-surface));
|
|
1270
1268
|
border-color: rgba(var(--color-sf-outline-variant));
|
|
1271
1269
|
}
|
|
@@ -671,7 +671,6 @@
|
|
|
671
671
|
padding: 0 !important; /* stylelint-disable-line declaration-no-important */
|
|
672
672
|
}
|
|
673
673
|
.e-query-builder .e-dragclone.e-cloneproperties .e-group-container, .e-query-builder .e-dragclone.e-cloneproperties .e-rule-container {
|
|
674
|
-
background: -webkit-gradient(linear, left bottom, left top, from(rgba(var(--color-sf-primary), 0.05)), to(rgba(var(--color-sf-primary), 0.05))), rgba(var(--color-sf-surface));
|
|
675
674
|
background: linear-gradient(0deg, rgba(var(--color-sf-primary), 0.05), rgba(var(--color-sf-primary), 0.05)), rgba(var(--color-sf-surface));
|
|
676
675
|
}
|
|
677
676
|
.e-query-builder .e-dragclone.e-cloneproperties .e-rule-value-delete {
|
|
@@ -1271,7 +1270,6 @@
|
|
|
1271
1270
|
border-color: rgba(var(--color-sf-outline-variant));
|
|
1272
1271
|
}
|
|
1273
1272
|
.e-query-builder .e-rule-container {
|
|
1274
|
-
background: -webkit-gradient(linear, left bottom, left top, from(rgba(var(--color-sf-primary), 0.05)), to(rgba(var(--color-sf-primary), 0.05))), rgba(var(--color-sf-surface));
|
|
1275
1273
|
background: linear-gradient(0deg, rgba(var(--color-sf-primary), 0.05), rgba(var(--color-sf-primary), 0.05)), rgba(var(--color-sf-surface));
|
|
1276
1274
|
border-color: rgba(var(--color-sf-outline-variant));
|
|
1277
1275
|
}
|
package/styles/material3.css
CHANGED
|
@@ -671,7 +671,6 @@
|
|
|
671
671
|
padding: 0 !important; /* stylelint-disable-line declaration-no-important */
|
|
672
672
|
}
|
|
673
673
|
.e-query-builder .e-dragclone.e-cloneproperties .e-group-container, .e-query-builder .e-dragclone.e-cloneproperties .e-rule-container {
|
|
674
|
-
background: -webkit-gradient(linear, left bottom, left top, from(rgba(var(--color-sf-primary), 0.05)), to(rgba(var(--color-sf-primary), 0.05))), rgba(var(--color-sf-surface));
|
|
675
674
|
background: linear-gradient(0deg, rgba(var(--color-sf-primary), 0.05), rgba(var(--color-sf-primary), 0.05)), rgba(var(--color-sf-surface));
|
|
676
675
|
}
|
|
677
676
|
.e-query-builder .e-dragclone.e-cloneproperties .e-rule-value-delete {
|
|
@@ -1271,7 +1270,6 @@
|
|
|
1271
1270
|
border-color: rgba(var(--color-sf-outline-variant));
|
|
1272
1271
|
}
|
|
1273
1272
|
.e-query-builder .e-rule-container {
|
|
1274
|
-
background: -webkit-gradient(linear, left bottom, left top, from(rgba(var(--color-sf-primary), 0.05)), to(rgba(var(--color-sf-primary), 0.05))), rgba(var(--color-sf-surface));
|
|
1275
1273
|
background: linear-gradient(0deg, rgba(var(--color-sf-primary), 0.05), rgba(var(--color-sf-primary), 0.05)), rgba(var(--color-sf-surface));
|
|
1276
1274
|
border-color: rgba(var(--color-sf-outline-variant));
|
|
1277
1275
|
}
|
|
@@ -667,7 +667,6 @@
|
|
|
667
667
|
padding: 0 !important; /* stylelint-disable-line declaration-no-important */
|
|
668
668
|
}
|
|
669
669
|
.e-query-builder .e-dragclone.e-cloneproperties .e-group-container, .e-query-builder .e-dragclone.e-cloneproperties .e-rule-container {
|
|
670
|
-
background: -webkit-gradient(linear, left bottom, left top, from(rgba(var(--color-sf-primary), 0.05)), to(rgba(var(--color-sf-primary), 0.05))), rgba(var(--color-sf-surface));
|
|
671
670
|
background: linear-gradient(0deg, rgba(var(--color-sf-primary), 0.05), rgba(var(--color-sf-primary), 0.05)), rgba(var(--color-sf-surface));
|
|
672
671
|
}
|
|
673
672
|
.e-query-builder .e-dragclone.e-cloneproperties .e-rule-value-delete {
|
|
@@ -1265,7 +1264,6 @@
|
|
|
1265
1264
|
border-color: rgba(var(--color-sf-outline-variant));
|
|
1266
1265
|
}
|
|
1267
1266
|
.e-query-builder .e-rule-container {
|
|
1268
|
-
background: -webkit-gradient(linear, left bottom, left top, from(rgba(var(--color-sf-primary), 0.05)), to(rgba(var(--color-sf-primary), 0.05))), rgba(var(--color-sf-surface));
|
|
1269
1267
|
background: linear-gradient(0deg, rgba(var(--color-sf-primary), 0.05), rgba(var(--color-sf-primary), 0.05)), rgba(var(--color-sf-surface));
|
|
1270
1268
|
border-color: rgba(var(--color-sf-outline-variant));
|
|
1271
1269
|
}
|
|
@@ -671,7 +671,6 @@
|
|
|
671
671
|
padding: 0 !important; /* stylelint-disable-line declaration-no-important */
|
|
672
672
|
}
|
|
673
673
|
.e-query-builder .e-dragclone.e-cloneproperties .e-group-container, .e-query-builder .e-dragclone.e-cloneproperties .e-rule-container {
|
|
674
|
-
background: -webkit-gradient(linear, left bottom, left top, from(rgba(var(--color-sf-primary), 0.05)), to(rgba(var(--color-sf-primary), 0.05))), rgba(var(--color-sf-surface));
|
|
675
674
|
background: linear-gradient(0deg, rgba(var(--color-sf-primary), 0.05), rgba(var(--color-sf-primary), 0.05)), rgba(var(--color-sf-surface));
|
|
676
675
|
}
|
|
677
676
|
.e-query-builder .e-dragclone.e-cloneproperties .e-rule-value-delete {
|
|
@@ -1271,7 +1270,6 @@
|
|
|
1271
1270
|
border-color: rgba(var(--color-sf-outline-variant));
|
|
1272
1271
|
}
|
|
1273
1272
|
.e-query-builder .e-rule-container {
|
|
1274
|
-
background: -webkit-gradient(linear, left bottom, left top, from(rgba(var(--color-sf-primary), 0.05)), to(rgba(var(--color-sf-primary), 0.05))), rgba(var(--color-sf-surface));
|
|
1275
1273
|
background: linear-gradient(0deg, rgba(var(--color-sf-primary), 0.05), rgba(var(--color-sf-primary), 0.05)), rgba(var(--color-sf-surface));
|
|
1276
1274
|
border-color: rgba(var(--color-sf-outline-variant));
|
|
1277
1275
|
}
|