@syncfusion/ej2-querybuilder 25.1.37 → 25.1.38

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 : 25.1.37
3
+ * version : 25.1.38
4
4
  * Copyright Syncfusion Inc. 2001 - 2023. 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,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-querybuilder@*",
3
- "_id": "@syncfusion/ej2-querybuilder@25.1.35",
3
+ "_id": "@syncfusion/ej2-querybuilder@25.1.37",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-itzx26EEksco0ikM5WSKDvdr+daQYFbcCSvJGxL/Finvn8TRjL5ciEiJ/0LxbjEiebmlVirur+3ayzAXVJCL/g==",
5
+ "_integrity": "sha512-82Ugl8XToVyBNpReqvpq6VltiaoMT+MCsZYQwT+vBYxBWBhnXgQJ4iZ5r6HyF7EePtMZhYgeRZED0K0AbGpRWw==",
6
6
  "_location": "/@syncfusion/ej2-querybuilder",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -23,8 +23,8 @@
23
23
  "/@syncfusion/ej2-react-querybuilder",
24
24
  "/@syncfusion/ej2-vue-querybuilder"
25
25
  ],
26
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-querybuilder/-/ej2-querybuilder-25.1.35.tgz",
27
- "_shasum": "50afc2d04e3d9b232ebdba93d347a14572aea4d5",
26
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-querybuilder/-/ej2-querybuilder-25.1.37.tgz",
27
+ "_shasum": "db89eb0ea98202e49522c04dd6bfdba7db0c030f",
28
28
  "_spec": "@syncfusion/ej2-querybuilder@*",
29
29
  "_where": "/jenkins/workspace/elease-automation_release_25.1.1/packages/included",
30
30
  "author": {
@@ -36,8 +36,8 @@
36
36
  "@syncfusion/ej2-buttons": "~25.1.35",
37
37
  "@syncfusion/ej2-calendars": "~25.1.37",
38
38
  "@syncfusion/ej2-dropdowns": "~25.1.37",
39
- "@syncfusion/ej2-inputs": "~25.1.37",
40
- "@syncfusion/ej2-splitbuttons": "~25.1.37"
39
+ "@syncfusion/ej2-inputs": "~25.1.38",
40
+ "@syncfusion/ej2-splitbuttons": "~25.1.38"
41
41
  },
42
42
  "deprecated": false,
43
43
  "description": "Essential JS 2 QueryBuilder",
@@ -66,7 +66,7 @@
66
66
  "url": "https://github.com/syncfusion/ej2-javascript-ui-controls/tree/master/controls/querybuilder"
67
67
  },
68
68
  "typings": "index.d.ts",
69
- "version": "25.1.37",
69
+ "version": "25.1.38",
70
70
  "sideEffects": false,
71
71
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
72
72
  }
@@ -1822,7 +1822,7 @@ var QueryBuilder = /** @class */ (function (_super) {
1822
1822
  this.GetRootColumnName(rule.field) === this.GetRootColumnName(this.previousColumn.field))) {
1823
1823
  var subField = this.selectedColumn.columns;
1824
1824
  for (var i = 0; i < subField.length; i++) {
1825
- if (rule.field === subField[i].field) {
1825
+ if (rule.field === subField[i].field || rule.field.indexOf(subField[i].field + this.separator) > -1) {
1826
1826
  dropDownList.value = subField[i].field;
1827
1827
  this.selectedColumn = subField[i];
1828
1828
  subFieldValue = true;
@@ -2327,7 +2327,7 @@ var QueryBuilder = /** @class */ (function (_super) {
2327
2327
  var columnData = this.getItemData(parentId);
2328
2328
  var selectedValue;
2329
2329
  var isTemplate = (typeof columnData.template === 'string');
2330
- if (this.isImportRules || this.ruleIndex > -1 || this.groupIndex > -1 || this.isPublic || isTemplate) {
2330
+ if (this.isImportRules || this.ruleIndex > -1 || this.groupIndex > -1 || this.isPublic || isTemplate || rule.value != '') {
2331
2331
  selectedValue = rule.value;
2332
2332
  }
2333
2333
  else {
@@ -2366,7 +2366,7 @@ var QueryBuilder = /** @class */ (function (_super) {
2366
2366
  QueryBuilder.prototype.renderNumberValue = function (parentId, rule, operator, idx, ruleValElem, itemData, length) {
2367
2367
  var columnData = this.getItemData(parentId);
2368
2368
  var isTemplate = (typeof columnData.template === 'string');
2369
- var selectedVal = (this.isImportRules || this.ruleIndex > -1 || this.groupIndex > -1 || this.isPublic || isTemplate) ? rule.value : this.setDefaultValue(parentId, false, true);
2369
+ var selectedVal = (this.isImportRules || this.ruleIndex > -1 || this.groupIndex > -1 || this.isPublic || isTemplate || typeof rule.value === 'number') ? rule.value : this.setDefaultValue(parentId, false, true);
2370
2370
  if ((operator === 'in' || operator === 'notin') && (this.dataColl.length || columnData.values)) {
2371
2371
  selectedVal = (this.isImportRules || this.ruleIndex > -1 || this.groupIndex > -1) ? rule.value : this.setDefaultValue(parentId, true, false);
2372
2372
  this.renderMultiSelect(columnData, parentId, idx, selectedVal, columnData.values);
@@ -2502,6 +2502,10 @@ var QueryBuilder = /** @class */ (function (_super) {
2502
2502
  var datePicker = void 0;
2503
2503
  var place = this.l10n.getConstant('SelectValue');
2504
2504
  var isTemplate = (typeof itemData.template === 'string');
2505
+ if (rule.value && !isNullOrUndefined(format)) {
2506
+ selVal = (length_1 > 1) ? rule.value[i] : rule.value;
2507
+ selectedValue = this.parseDate(selVal, format) || new Date();
2508
+ }
2505
2509
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2506
2510
  if (!itemData.field && !itemData.key && itemData.value) {
2507
2511
  if (itemData.value instanceof Date) {
@@ -2602,7 +2606,15 @@ var QueryBuilder = /** @class */ (function (_super) {
2602
2606
  isCheck = values[i].toString().toLowerCase() === itemData.value.toString().toLowerCase();
2603
2607
  }
2604
2608
  else if (i === 0) {
2605
- isCheck = true;
2609
+ if (typeof rule.value === 'boolean') {
2610
+ isCheck = rule.value ? true : false;
2611
+ }
2612
+ else {
2613
+ isCheck = true;
2614
+ }
2615
+ }
2616
+ if (typeof rule.value === 'boolean' && i === 1) {
2617
+ isCheck = !rule.value ? true : false;
2606
2618
  }
2607
2619
  value = values[i].toString();
2608
2620
  orgValue = values[i];
@@ -2619,7 +2631,7 @@ var QueryBuilder = /** @class */ (function (_super) {
2619
2631
  var radiobutton = new RadioButton(radioBtn);
2620
2632
  radiobutton.appendTo('#' + parentId + '_valuekey' + i);
2621
2633
  if (isCheck) {
2622
- this.updateRules(radiobutton.element, orgValue, 0);
2634
+ this.updateRules(radiobutton.element, orgValue, 0, true);
2623
2635
  }
2624
2636
  };
2625
2637
  QueryBuilder.prototype.getOperatorIndex = function (ddlObj, rule) {
@@ -5275,9 +5287,9 @@ var QueryBuilder = /** @class */ (function (_super) {
5275
5287
  return matchValue.length;
5276
5288
  }
5277
5289
  // eslint-disable-next-line
5278
- if (this.checkLiteral() && /^'?([a-z_][a-z0-9 _.\[\]\(\)]{0,}(\:(number|float|string|date|boolean))?)'?/i.exec(sqlString)) {
5290
+ if (this.checkLiteral() && /^'?([a-z_][a-z0-9 _.\[\]\(\)-]{0,}(\:(number|float|string|date|boolean))?)'?/i.exec(sqlString)) {
5279
5291
  // eslint-disable-next-line
5280
- matchValue = /^'?([a-z_][a-z0-9 _.\[\]\(\)]{0,}(\:(number|float|string|date|boolean))?)'?/i.exec(sqlString)[1];
5292
+ matchValue = /^'?([a-z_][a-z0-9 _.\[\]\(\)-]{0,}(\:(number|float|string|date|boolean))?)'?/i.exec(sqlString)[1];
5281
5293
  this.parser.push(['Literal', matchValue]);
5282
5294
  return matchValue.length + 2;
5283
5295
  }