@syncfusion/ej2-querybuilder 29.2.10 → 30.1.39

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.
@@ -469,7 +469,15 @@ let QueryBuilder = class QueryBuilder extends Component {
469
469
  targetValue = document.getElementById(forIdValue).getAttribute('value');
470
470
  }
471
471
  else if (this.enableSeparateConnector) {
472
- targetValue = target.textContent;
472
+ if (target.classList.contains('e-btngroup-or-lbl')) {
473
+ targetValue = 'or';
474
+ }
475
+ else if (target.classList.contains('e-btngroup-and-lbl')) {
476
+ targetValue = 'and';
477
+ }
478
+ else {
479
+ targetValue = target.textContent;
480
+ }
473
481
  }
474
482
  groupID = element.id.replace(this.element.id + '_', '');
475
483
  const group = this.getGroup(groupID);
@@ -3390,6 +3398,9 @@ let QueryBuilder = class QueryBuilder extends Component {
3390
3398
  (rule.type === 'string' ? textboxValue.split(',').map((val) => val.trim()) :
3391
3399
  textboxValue.split(',').map(Number)) : [];
3392
3400
  }
3401
+ else {
3402
+ rule.value = textboxValue;
3403
+ }
3393
3404
  break;
3394
3405
  case 'dropdownlist':
3395
3406
  rule.value = getComponent(element, controlName).value;
@@ -4714,7 +4725,9 @@ let QueryBuilder = class QueryBuilder extends Component {
4714
4725
  EventHandler.add(wrapper, 'focusout', this.focusEventHandler, this);
4715
4726
  EventHandler.add(wrapper, 'focusin', this.focusEventHandler, this);
4716
4727
  EventHandler.add(this.element, 'keydown', this.keyBoardHandler, this);
4717
- EventHandler.add(document, 'keydown', this.keyBoardHandler, this);
4728
+ if (this.allowDragAndDrop) {
4729
+ EventHandler.add(document, 'keydown', this.keyBoardHandler, this);
4730
+ }
4718
4731
  window.addEventListener('resize', this.windowResizeHandler.bind(this));
4719
4732
  }
4720
4733
  unWireEvents() {
@@ -5083,6 +5096,10 @@ let QueryBuilder = class QueryBuilder extends Component {
5083
5096
  const orGroup = groupElem.parentElement.querySelectorAll('.e-btngroup-or');
5084
5097
  andElem = andGroup[andGroup.length - (1 + index)];
5085
5098
  orElem = orGroup[orGroup.length - (1 + index)];
5099
+ if (this.isImportRules) {
5100
+ andElem = groupElem.parentElement.querySelector('.e-btn-group.e-multi-connector .e-btngroup-and');
5101
+ orElem = groupElem.parentElement.querySelector('.e-btn-group.e-multi-connector .e-btngroup-or');
5102
+ }
5086
5103
  element = andGroup[andGroup.length - (1 + index)];
5087
5104
  if (element && element.parentElement && element.parentElement.style.display === 'none') {
5088
5105
  index++;
@@ -5802,6 +5819,9 @@ let QueryBuilder = class QueryBuilder extends Component {
5802
5819
  const tglBtnElem = parentElem.querySelector('.e-qb-toggle');
5803
5820
  if (rule.not) {
5804
5821
  addClass([tglBtnElem], 'e-active-toggle');
5822
+ if (this.enableSeparateConnector) {
5823
+ getComponent(tglBtnElem.querySelector('.e-checkbox'), 'checkbox').checked = rule.not;
5824
+ }
5805
5825
  }
5806
5826
  else {
5807
5827
  removeClass([tglBtnElem], 'e-active-toggle');