@syncfusion/ej2-querybuilder 32.2.8 → 32.2.9

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 32.2.8
3
+ * version : 32.2.9
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.8",
3
+ "version": "32.2.9",
4
4
  "description": "Essential JS 2 QueryBuilder",
5
5
  "author": "Syncfusion Inc.",
6
6
  "license": "SEE LICENSE IN license",
@@ -8,10 +8,10 @@
8
8
  "module": "./index.js",
9
9
  "es2015": "./dist/es6/ej2-querybuilder.es5.js",
10
10
  "dependencies": {
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",
11
+ "@syncfusion/ej2-base": "~32.2.9",
12
+ "@syncfusion/ej2-buttons": "~32.2.9",
13
+ "@syncfusion/ej2-calendars": "~32.2.9",
14
+ "@syncfusion/ej2-dropdowns": "~32.2.9",
15
15
  "@syncfusion/ej2-inputs": "~32.2.8",
16
16
  "@syncfusion/ej2-splitbuttons": "~32.2.7"
17
17
  },
@@ -4302,9 +4302,18 @@ var QueryBuilder = /** @class */ (function (_super) {
4302
4302
  if (this.groupCloned && this.target instanceof HTMLElement &&
4303
4303
  this.getGroup(this.target).rules.length > 1) {
4304
4304
  var parent_1 = this.element.querySelector('#' + groupID);
4305
+ var allContainers = parent_1.querySelectorAll(':scope > .e-group-body > .e-rule-list > [class*="-container"]');
4305
4306
  var topLevelGroups = parent_1.querySelectorAll(':scope > .e-group-body > .e-rule-list > .e-group-container');
4306
- if (groupID !== 'querybuilder_group0' && !(this.isAngular && groupID === 'ej2-querybuilder_0_group0')) {
4307
- this.groupIndex = topLevelGroups.length > 1 ? topLevelGroups.length - 1 : 0;
4307
+ if (topLevelGroups.length > 0 && groupID !== 'querybuilder_group0' && !(this.isAngular && groupID === 'ej2-querybuilder_0_group0')) {
4308
+ var lastGroupIndex = -1;
4309
+ var lastGroup = topLevelGroups[topLevelGroups.length - 1];
4310
+ for (var i = 0; i < allContainers.length; i++) {
4311
+ if (allContainers[i] === lastGroup) {
4312
+ lastGroupIndex = i;
4313
+ break;
4314
+ }
4315
+ }
4316
+ this.groupIndex = lastGroupIndex - 1;
4308
4317
  }
4309
4318
  }
4310
4319
  if (this.groupIndex < 0) {