@syncfusion/ej2-querybuilder 31.2.12 → 31.2.16
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 -5
- package/dist/es6/ej2-querybuilder.es2015.js.map +1 -1
- package/dist/es6/ej2-querybuilder.es5.js +23 -5
- 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 +5 -5
- package/src/query-builder/query-builder.d.ts +1 -0
- package/src/query-builder/query-builder.js +23 -5
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 31.2.
|
|
3
|
+
* version : 31.2.16
|
|
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": "31.2.
|
|
3
|
+
"version": "31.2.16",
|
|
4
4
|
"description": "Essential JS 2 QueryBuilder",
|
|
5
5
|
"author": "Syncfusion Inc.",
|
|
6
6
|
"license": "SEE LICENSE IN license",
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
"es2015": "./dist/es6/ej2-querybuilder.es5.js",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@syncfusion/ej2-base": "~31.2.12",
|
|
12
|
-
"@syncfusion/ej2-buttons": "~31.2.
|
|
13
|
-
"@syncfusion/ej2-calendars": "~31.2.
|
|
14
|
-
"@syncfusion/ej2-dropdowns": "~31.2.
|
|
15
|
-
"@syncfusion/ej2-inputs": "~31.2.
|
|
12
|
+
"@syncfusion/ej2-buttons": "~31.2.16",
|
|
13
|
+
"@syncfusion/ej2-calendars": "~31.2.16",
|
|
14
|
+
"@syncfusion/ej2-dropdowns": "~31.2.16",
|
|
15
|
+
"@syncfusion/ej2-inputs": "~31.2.15",
|
|
16
16
|
"@syncfusion/ej2-splitbuttons": "~31.2.12"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {},
|
|
@@ -350,6 +350,7 @@ export declare class QueryBuilder extends Component<HTMLDivElement> implements I
|
|
|
350
350
|
private isValueEmpty;
|
|
351
351
|
private isPropChange;
|
|
352
352
|
private isRuleClicked;
|
|
353
|
+
private groupCloned;
|
|
353
354
|
private ddTree;
|
|
354
355
|
/**
|
|
355
356
|
* Triggers when the component is created.
|
|
@@ -220,6 +220,7 @@ var QueryBuilder = /** @class */ (function (_super) {
|
|
|
220
220
|
_this.isValueEmpty = false;
|
|
221
221
|
_this.isPropChange = false;
|
|
222
222
|
_this.isRuleClicked = false;
|
|
223
|
+
_this.groupCloned = false;
|
|
223
224
|
MultiSelect.Inject(CheckBoxSelection);
|
|
224
225
|
return _this;
|
|
225
226
|
}
|
|
@@ -597,7 +598,7 @@ var QueryBuilder = /** @class */ (function (_super) {
|
|
|
597
598
|
break;
|
|
598
599
|
case target.className.indexOf('e-clone-grp-btn') > -1:
|
|
599
600
|
this.actionButton = target;
|
|
600
|
-
this.cloneGrpBtnClick = true;
|
|
601
|
+
this.cloneGrpBtnClick = this.groupCloned = true;
|
|
601
602
|
this.isRuleClicked = true;
|
|
602
603
|
this.groupClone(closest(target, '.e-group-container'));
|
|
603
604
|
break;
|
|
@@ -4224,6 +4225,7 @@ var QueryBuilder = /** @class */ (function (_super) {
|
|
|
4224
4225
|
if (this.isAddSuccess || this.element.querySelectorAll('.e-group-container').length <= this.maxGroupCount) {
|
|
4225
4226
|
groupID = this.element.id + '_' + groupID;
|
|
4226
4227
|
var groupElem = document.getElementById(groupID);
|
|
4228
|
+
var temp = this.groupIndex;
|
|
4227
4229
|
var rule = this.getParentGroup(groupElem);
|
|
4228
4230
|
var grouplen = groups.length;
|
|
4229
4231
|
if (grouplen) {
|
|
@@ -4246,6 +4248,11 @@ var QueryBuilder = /** @class */ (function (_super) {
|
|
|
4246
4248
|
not = this.updatedRule.not;
|
|
4247
4249
|
isLocked = this.updatedRule.isLocked;
|
|
4248
4250
|
}
|
|
4251
|
+
if (this.groupCloned) {
|
|
4252
|
+
var parent_1 = this.element.querySelector('#' + groupID);
|
|
4253
|
+
var topLevelGroups = parent_1.querySelectorAll(':scope > .e-group-body > .e-rule-list > .e-group-container');
|
|
4254
|
+
this.groupIndex = topLevelGroups.length > 1 ? topLevelGroups.length - 1 : 0;
|
|
4255
|
+
}
|
|
4249
4256
|
if (this.groupIndex < 0) {
|
|
4250
4257
|
if (this.enableNotCondition) {
|
|
4251
4258
|
rule.rules.push({ 'condition': condition, 'not': not, rules: [] });
|
|
@@ -4262,6 +4269,9 @@ var QueryBuilder = /** @class */ (function (_super) {
|
|
|
4262
4269
|
rule.rules.splice(this.groupIndex + 1, 0, { condition: condition, rules: [], isLocked: isLocked });
|
|
4263
4270
|
}
|
|
4264
4271
|
}
|
|
4272
|
+
if (this.groupCloned) {
|
|
4273
|
+
this.groupIndex = temp;
|
|
4274
|
+
}
|
|
4265
4275
|
}
|
|
4266
4276
|
if (!this.headerTemplate) {
|
|
4267
4277
|
this.disableRuleCondition(groupElem, rule, null, this.enableSeparateConnector ? true : null);
|
|
@@ -4719,7 +4729,13 @@ var QueryBuilder = /** @class */ (function (_super) {
|
|
|
4719
4729
|
this.customOperators['numberOperator'] = this.customOperators['numberOperator'].concat(numberOper); // tslint:disable-line
|
|
4720
4730
|
if (this.dataSource instanceof DataManager) {
|
|
4721
4731
|
this.dataManager = this.dataSource;
|
|
4722
|
-
this.
|
|
4732
|
+
if (this.columns && this.columns.length) {
|
|
4733
|
+
this.dataColl = this.columns;
|
|
4734
|
+
this.initControl();
|
|
4735
|
+
}
|
|
4736
|
+
else {
|
|
4737
|
+
this.executeDataManager(new Query().take(1));
|
|
4738
|
+
}
|
|
4723
4739
|
}
|
|
4724
4740
|
else {
|
|
4725
4741
|
this.dataManager = new DataManager(this.dataSource);
|
|
@@ -4742,7 +4758,8 @@ var QueryBuilder = /** @class */ (function (_super) {
|
|
|
4742
4758
|
isReplaceDragEle: true,
|
|
4743
4759
|
isPreventSelect: false,
|
|
4744
4760
|
abort: '.e-parent-header',
|
|
4745
|
-
isDragScroll: true
|
|
4761
|
+
isDragScroll: true,
|
|
4762
|
+
enableAutoScroll: true
|
|
4746
4763
|
});
|
|
4747
4764
|
};
|
|
4748
4765
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -6778,13 +6795,13 @@ var QueryBuilder = /** @class */ (function (_super) {
|
|
|
6778
6795
|
var isCloneGroup = this.showButtons.cloneGroup;
|
|
6779
6796
|
groupID = groupID.replace(this.element.id + '_', '');
|
|
6780
6797
|
this.groupIndex = index;
|
|
6781
|
-
this.cloneGrpBtnClick = true;
|
|
6798
|
+
this.cloneGrpBtnClick = this.groupCloned = true;
|
|
6782
6799
|
this.showButtons.cloneGroup = true;
|
|
6783
6800
|
this.addGroups([{ 'condition': group.condition, 'not': group.not, 'rules': group.rules }], groupID);
|
|
6784
6801
|
this.groupIndex = -1;
|
|
6785
6802
|
this.cloneGrpBtnClick = false;
|
|
6786
6803
|
this.showButtons.cloneGroup = isCloneGroup;
|
|
6787
|
-
isCloneGroup = false;
|
|
6804
|
+
isCloneGroup = this.groupCloned = false;
|
|
6788
6805
|
};
|
|
6789
6806
|
/**
|
|
6790
6807
|
* Locks the rule based on the rule ID.
|
|
@@ -7333,6 +7350,7 @@ var QueryBuilder = /** @class */ (function (_super) {
|
|
|
7333
7350
|
this.groupIndex = Array.prototype.indexOf.call(target.closest('.e-rule-list').children, target.closest('.e-group-container'));
|
|
7334
7351
|
this.addGroups([{ 'condition': group.condition, 'not': group.not, 'rules': group.rules }], groupId);
|
|
7335
7352
|
this.groupIndex = -1;
|
|
7353
|
+
this.groupCloned = false;
|
|
7336
7354
|
};
|
|
7337
7355
|
QueryBuilder.prototype.ruleClone = function (target) {
|
|
7338
7356
|
var ruleElem = closest(target, '.e-rule-container');
|