@syncfusion/ej2-querybuilder 26.1.38 → 26.1.40

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.
@@ -1154,11 +1154,13 @@ let QueryBuilder = class QueryBuilder extends Component {
1154
1154
  updateDropdowntreeDS(columns) {
1155
1155
  for (let i = 0; i < columns.length; i++) {
1156
1156
  if (columns[parseInt(i.toString(), 10)].type === 'object') {
1157
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1157
1158
  if (this.isAngular && columns[parseInt(i.toString(), 10)].template) {
1158
1159
  delete columns[parseInt(i.toString(), 10)].template;
1159
1160
  }
1160
1161
  columns[parseInt(i.toString(), 10)].selectable = false;
1161
1162
  this.updateDropdowntreeDS(columns[parseInt(i.toString(), 10)].columns);
1163
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1162
1164
  }
1163
1165
  else if (this.isAngular && columns[parseInt(i.toString(), 10)].template) {
1164
1166
  delete columns[parseInt(i.toString(), 10)].template;
@@ -1323,10 +1325,12 @@ let QueryBuilder = class QueryBuilder extends Component {
1323
1325
  }
1324
1326
  if (excludeOprs.indexOf(rule.rules[index].operator) < -1 &&
1325
1327
  (isNullOrUndefined(rule.rules[index].value) &&
1326
- rule.rules[index].type !== 'date') || rule.rules[index].value === '' ||
1328
+ rule.rules[index].type !== 'date') || rule.rules[index].value === '' || rule.rules[index].value === null ||
1327
1329
  (rule.rules[index].value instanceof Array && valArray.length < 1)) {
1328
1330
  const valElem = tempElem.querySelectorAll('.e-rule-value .e-control');
1329
- isValid = false;
1331
+ if (excludeOprs.indexOf(rule.rules[index].operator) < 0) {
1332
+ isValid = false;
1333
+ }
1330
1334
  for (let j = 0, jLen = valElem.length; j < jLen; j++) {
1331
1335
  const element = valElem[j];
1332
1336
  let elem;
@@ -1341,6 +1345,18 @@ let QueryBuilder = class QueryBuilder extends Component {
1341
1345
  }
1342
1346
  j++;
1343
1347
  }
1348
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1349
+ }
1350
+ else if (rule.rules[index].type === 'date' && (rule.rules[index].value === null || rule.rules[index].value.indexOf(null) > -1)) {
1351
+ const valElem = tempElem.querySelectorAll('.e-rule-value .e-control');
1352
+ if (excludeOprs.indexOf(rule.rules[index].operator) < 0) {
1353
+ isValid = false;
1354
+ }
1355
+ for (let j = 0, jLen = valElem.length; j < jLen; j++) {
1356
+ if (valElem[j].parentElement.className.indexOf('e-tooltip') < 0 && valElem[j].className.indexOf('e-tooltip') < 0 && (isNullOrUndefined(rule.rules[index].value) || rule.rules[index].value[j] == null)) {
1357
+ this.renderToolTip(valElem[j].parentElement);
1358
+ }
1359
+ }
1344
1360
  }
1345
1361
  }
1346
1362
  else if ((dropDownObj && dropDownObj.element && isNullOrUndefined(dropDownObj.index)) ||
@@ -2092,6 +2108,9 @@ let QueryBuilder = class QueryBuilder extends Component {
2092
2108
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2093
2109
  element = args.element;
2094
2110
  }
2111
+ if (!element) {
2112
+ return;
2113
+ }
2095
2114
  if (element.className.indexOf('e-day') > -1 || element.className.indexOf('e-today') > -1 || element.className.indexOf('e-cell') > -1) {
2096
2115
  const calenderArgs = args;
2097
2116
  element = calenderArgs.element;
@@ -3717,6 +3736,9 @@ let QueryBuilder = class QueryBuilder extends Component {
3717
3736
  if (valElem[1] && valElem[1].parentElement.className.indexOf('e-tooltip') > -1) {
3718
3737
  getComponent(valElem[1].parentElement, 'tooltip').destroy();
3719
3738
  }
3739
+ if (valElem[2] && valElem[2].parentElement.className.indexOf('e-tooltip') > -1) {
3740
+ getComponent(valElem[2].parentElement, 'tooltip').destroy();
3741
+ }
3720
3742
  }
3721
3743
  }
3722
3744
  }
@@ -6482,6 +6504,7 @@ let QueryBuilder = class QueryBuilder extends Component {
6482
6504
  let grpCount;
6483
6505
  let operator;
6484
6506
  let isLeftOpened = false;
6507
+ let isNotOpened = false;
6485
6508
  for (let i = 0, iLen = parser.length; i < iLen; i++) {
6486
6509
  if (parser[i][0] === 'Literal') {
6487
6510
  const column = this.getColumn(parser[i][1]);
@@ -6617,6 +6640,7 @@ let QueryBuilder = class QueryBuilder extends Component {
6617
6640
  }
6618
6641
  else if (parser[i][0] === 'Left') {
6619
6642
  if (!(parser[0][0] === 'Left') && (parser[i - 1][1] === 'not' || sqlLocale && this.l10n.getConstant('NOT').toLowerCase() === parser[i - 1][1])) {
6643
+ isNotOpened = true;
6620
6644
  continue;
6621
6645
  }
6622
6646
  this.parser = parser.splice(i + 1, iLen - (i + 1));
@@ -6647,6 +6671,10 @@ let QueryBuilder = class QueryBuilder extends Component {
6647
6671
  }
6648
6672
  }
6649
6673
  else if (parser[i][0] === 'Right') {
6674
+ if (isNotOpened && parser[i + 1][0] === 'Right') {
6675
+ isNotOpened = false;
6676
+ continue;
6677
+ }
6650
6678
  this.parser = parser.splice(i + 1, iLen - (i + 1));
6651
6679
  levelColl.pop(); //To get the parent Group
6652
6680
  rules = this.rule;