@syncfusion/ej2-querybuilder 29.2.5 → 29.2.10

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.
@@ -205,6 +205,7 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
205
205
  _this.isMiddleGroup = false;
206
206
  _this.cloneRuleBtnClick = false;
207
207
  _this.isValueEmpty = false;
208
+ _this.isPropChange = false;
208
209
  MultiSelect.Inject(CheckBoxSelection);
209
210
  return _this;
210
211
  }
@@ -1329,7 +1330,7 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
1329
1330
  else {
1330
1331
  dragClsName = 'e-icons e-drag-qb-rule e-hidden';
1331
1332
  }
1332
- var spanDragElement = this.createElement('span', { attrs: { class: dragClsName, 'aria-lable': 'drag handle',
1333
+ var spanDragElement = this.createElement('span', { attrs: { class: dragClsName, 'aria-label': 'drag handle',
1333
1334
  title: 'drag handle' } });
1334
1335
  groupHdrElem.appendChild(spanDragElement);
1335
1336
  var className = this.enableSeparateConnector && !isConnector ? 'e-lib e-btn-group e-qb-toggle-btn' : 'e-lib e-btn-group';
@@ -1387,7 +1388,7 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
1387
1388
  else {
1388
1389
  dragClsName = 'e-icons e-drag-qb-rule e-hidden';
1389
1390
  }
1390
- var spanDragElement = this.createElement('span', { attrs: { class: dragClsName, 'aria-lable': 'drag handle',
1391
+ var spanDragElement = this.createElement('span', { attrs: { class: dragClsName, 'aria-label': 'drag handle',
1391
1392
  title: 'drag handle' } });
1392
1393
  fieldElem.appendChild(spanDragElement);
1393
1394
  var filterElem = this.createElement('input', { attrs: { type: 'text', class: 'e-filter-input' } });
@@ -3943,8 +3944,8 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
3943
3944
  else {
3944
3945
  this.addGroupElement(false, this.element);
3945
3946
  }
3946
- if (Browser.isDevice || this.displayMode === 'Vertical') {
3947
- if (Browser.isDevice) {
3947
+ if (Browser.isDevice || (window.innerWidth < 768 && !this.isPropChange) || this.displayMode === 'Vertical') {
3948
+ if (Browser.isDevice || window.innerWidth < 768) {
3948
3949
  this.element.style.width = '100%';
3949
3950
  this.element.classList.add('e-device');
3950
3951
  }
@@ -4067,6 +4068,7 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
4067
4068
  };
4068
4069
  QueryBuilder.prototype.onPropertyChanged = function (newProp, oldProp) {
4069
4070
  var properties = Object.keys(newProp);
4071
+ this.isPropChange = true;
4070
4072
  var groupElem = this.element.querySelector('.e-group-container');
4071
4073
  var summaryElem = this.element.querySelector('.e-summary-content');
4072
4074
  for (var _i = 0, properties_1 = properties; _i < properties_1.length; _i++) {
@@ -4222,6 +4224,7 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
4222
4224
  break;
4223
4225
  }
4224
4226
  }
4227
+ this.isPropChange = false;
4225
4228
  };
4226
4229
  QueryBuilder.prototype.preRender = function () {
4227
4230
  this.element.id = this.element.id || getUniqueID('ej2-querybuilder');
@@ -4781,6 +4784,7 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
4781
4784
  EventHandler.add(wrapper, 'focusin', this.focusEventHandler, this);
4782
4785
  EventHandler.add(this.element, 'keydown', this.keyBoardHandler, this);
4783
4786
  EventHandler.add(document, 'keydown', this.keyBoardHandler, this);
4787
+ window.addEventListener('resize', this.windowResizeHandler.bind(this));
4784
4788
  };
4785
4789
  QueryBuilder.prototype.unWireEvents = function () {
4786
4790
  var wrapper = this.getWrapper();
@@ -4789,6 +4793,7 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
4789
4793
  EventHandler.remove(wrapper, 'focusin', this.focusEventHandler);
4790
4794
  EventHandler.remove(this.element, 'keydown', this.keyBoardHandler);
4791
4795
  EventHandler.remove(document, 'keydown', this.keyBoardHandler);
4796
+ window.removeEventListener('resize', this.windowResizeHandler);
4792
4797
  };
4793
4798
  QueryBuilder.prototype.getParentGroup = function (target, isParent) {
4794
4799
  var groupLevel = (target instanceof Element) ? this.levelColl[target.id] : this.levelColl["" + target];
@@ -5054,6 +5059,14 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
5054
5059
  }
5055
5060
  }
5056
5061
  };
5062
+ QueryBuilder.prototype.windowResizeHandler = function () {
5063
+ if (Browser.isDevice || window.innerWidth < 768) {
5064
+ this.displayMode = 'Vertical';
5065
+ }
5066
+ else {
5067
+ this.displayMode = 'Horizontal';
5068
+ }
5069
+ };
5057
5070
  QueryBuilder.prototype.clearQBTemplate = function (ruleElemColl) {
5058
5071
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5059
5072
  if (this.isReact || this.isAngular) {