@syncfusion/ej2-querybuilder 27.1.48 → 27.1.50

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 : 27.1.48
3
+ * version : 27.1.50
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@26.1.35",
3
+ "_id": "@syncfusion/ej2-querybuilder@27.1.48",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-H6mi2bWOJuR/rGo6DHtX75nWSdEo4Q7eysFJm/cTUKHuoowavQ0/FUJBoEhy6u2h0k4wrfxQkiKxKXc9HXurOw==",
5
+ "_integrity": "sha512-cEvKWeSdVntNvWyDXiEhGGU4awcZgYtmp4BbVp6FZNU8HjIXUndWhxF7/QoDfk0e0y1/cgm/7NeLNc0Uh/9NUQ==",
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-release/@syncfusion/ej2-querybuilder/-/ej2-querybuilder-26.1.35.tgz",
27
- "_shasum": "d2d7b46b2f117719013d8cdde9b052770201c273",
26
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-querybuilder/-/ej2-querybuilder-27.1.48.tgz",
27
+ "_shasum": "8508368e8dd760cdbd07ae932d9ac2d6f12262dc",
28
28
  "_spec": "@syncfusion/ej2-querybuilder@*",
29
29
  "_where": "/jenkins/workspace/elease-automation_release_27.1.1/packages/included",
30
30
  "author": {
@@ -32,13 +32,12 @@
32
32
  },
33
33
  "bundleDependencies": false,
34
34
  "dependencies": {
35
- "@syncfusion/ej2-base": "~27.1.48",
36
- "@syncfusion/ej2-buttons": "~27.1.48",
37
- "@syncfusion/ej2-calendars": "~27.1.48",
38
- "@syncfusion/ej2-dropdowns": "~27.1.48",
39
- "@syncfusion/ej2-inputs": "~27.1.48",
40
- "@syncfusion/ej2-splitbuttons": "~27.1.48",
41
- "markdown-spellcheck": "^1.3.1"
35
+ "@syncfusion/ej2-base": "~27.1.50",
36
+ "@syncfusion/ej2-buttons": "~27.1.50",
37
+ "@syncfusion/ej2-calendars": "~27.1.50",
38
+ "@syncfusion/ej2-dropdowns": "~27.1.50",
39
+ "@syncfusion/ej2-inputs": "~27.1.50",
40
+ "@syncfusion/ej2-splitbuttons": "~27.1.50"
42
41
  },
43
42
  "deprecated": false,
44
43
  "description": "Essential JS 2 QueryBuilder",
@@ -67,7 +66,7 @@
67
66
  "url": "https://github.com/syncfusion/ej2-javascript-ui-controls/tree/master/controls/querybuilder"
68
67
  },
69
68
  "typings": "index.d.ts",
70
- "version": "27.1.48",
69
+ "version": "27.1.50",
71
70
  "sideEffects": false,
72
71
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
73
72
  }
@@ -346,6 +346,7 @@ export declare class QueryBuilder extends Component<HTMLDivElement> implements I
346
346
  private dragElement;
347
347
  private prvtEvtTgrDaD;
348
348
  private isDragEventPrevent;
349
+ private isValueEmpty;
349
350
  private ddTree;
350
351
  /**
351
352
  * Triggers when the component is created.
@@ -217,6 +217,7 @@ var QueryBuilder = /** @class */ (function (_super) {
217
217
  _this.cloneGrpBtnClick = false;
218
218
  _this.isMiddleGroup = false;
219
219
  _this.cloneRuleBtnClick = false;
220
+ _this.isValueEmpty = false;
220
221
  MultiSelect.Inject(CheckBoxSelection);
221
222
  return _this;
222
223
  }
@@ -1014,13 +1015,14 @@ var QueryBuilder = /** @class */ (function (_super) {
1014
1015
  .filter(function (filteredChild) { return filteredChild !== null; });
1015
1016
  this.changeDataSource(matchedDataSource);
1016
1017
  setTimeout(function () {
1017
- if (!isNullOrUndefined(proxy.ddTree)) {
1018
+ if (!isNullOrUndefined(proxy.ddTree) && !isNullOrUndefined(proxy.ddTree.treeObj)) {
1018
1019
  proxy.ddTree.treeObj.expandAll();
1019
1020
  }
1020
1021
  }, 100);
1021
1022
  }
1022
1023
  };
1023
1024
  QueryBuilder.prototype.changeDataSource = function (data) {
1025
+ this.updateDropdowntreeDS(data);
1024
1026
  this.ddTree.treeObj.fields = {
1025
1027
  dataSource: data,
1026
1028
  value: 'field',
@@ -1055,7 +1057,7 @@ var QueryBuilder = /** @class */ (function (_super) {
1055
1057
  };
1056
1058
  QueryBuilder.prototype.dropdownTreeClose = function () {
1057
1059
  if (this.ddTree) {
1058
- this.changeDataSource(this.columns);
1060
+ this.changeDataSource(extend([], this.columns, [], true));
1059
1061
  }
1060
1062
  this.ddTree = null;
1061
1063
  };
@@ -2474,11 +2476,13 @@ var QueryBuilder = /** @class */ (function (_super) {
2474
2476
  }
2475
2477
  var height = (this.element.className.indexOf('e-device') > -1) ? '250px' : '200px';
2476
2478
  var operator_2;
2477
- operatorList.forEach(function (obj) {
2478
- if ('value' in obj && typeof obj.value === 'string' && obj.value.toLowerCase() === rule.operator.toLowerCase()) {
2479
- operator_2 = obj.value;
2480
- }
2481
- });
2479
+ if (rule.operator) {
2480
+ operatorList.forEach(function (obj) {
2481
+ if ('value' in obj && typeof obj.value === 'string' && obj.value.toLowerCase() === rule.operator.toLowerCase()) {
2482
+ operator_2 = obj.value;
2483
+ }
2484
+ });
2485
+ }
2482
2486
  var value = operator_2 ? operator_2 : operatorList[0].value;
2483
2487
  var ddlIdx = 0;
2484
2488
  if (!this.autoSelectOperator) {
@@ -5148,6 +5152,7 @@ var QueryBuilder = /** @class */ (function (_super) {
5148
5152
  * @returns {RuleModel} - Valid rule or rules collection
5149
5153
  */
5150
5154
  QueryBuilder.prototype.getValidRules = function (currentRule) {
5155
+ this.isValueEmpty = true;
5151
5156
  if (!currentRule) {
5152
5157
  currentRule = this.getRules();
5153
5158
  }
@@ -5157,6 +5162,7 @@ var QueryBuilder = /** @class */ (function (_super) {
5157
5162
  var rule = !isNullOrUndefined(currentRule.isLocked) ?
5158
5163
  this.getRuleCollection({ condition: ruleCondtion, rules: ruleColl, not: notCondition, isLocked: currentRule.isLocked }, true) :
5159
5164
  this.getRuleCollection({ condition: ruleCondtion, rules: ruleColl, not: notCondition }, true);
5165
+ this.isValueEmpty = false;
5160
5166
  return rule;
5161
5167
  };
5162
5168
  QueryBuilder.prototype.getRuleCollection = function (rule, isValidRule) {
@@ -5186,8 +5192,9 @@ var QueryBuilder = /** @class */ (function (_super) {
5186
5192
  rule.value = null;
5187
5193
  }
5188
5194
  }
5189
- if ((this.isRefreshed && this.enablePersistence) || (rule.field !== '' && rule.operator !== '' && (rule.value !== '' &&
5190
- rule.value !== undefined)) || (customObj && customObj.isQuestion)) {
5195
+ if ((this.isRefreshed && this.enablePersistence) || (rule.field !== '' && rule.operator !== '' &&
5196
+ (this.isValueEmpty ? rule.value !== '' && rule.value !== undefined : rule.value !== undefined)) ||
5197
+ (customObj && customObj.isQuestion)) {
5191
5198
  var condition = rule.condition;
5192
5199
  var lockedRule = rule.isLocked;
5193
5200
  rule = { 'label': rule.label, 'field': rule.field, 'operator': rule.operator, 'type': rule.type, 'value': rule.value };
@@ -42,7 +42,7 @@
42
42
 
43
43
  .e-ddl.e-popup {
44
44
  border: 0;
45
- border-radius: 8px;
45
+ border-radius: 4px;
46
46
  -webkit-box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.14), 0 0 2px 0 rgba(0, 0, 0, 0.12);
47
47
  box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.14), 0 0 2px 0 rgba(0, 0, 0, 0.12);
48
48
  margin-top: 4px;
@@ -42,7 +42,7 @@
42
42
 
43
43
  .e-ddl.e-popup {
44
44
  border: 0;
45
- border-radius: 8px;
45
+ border-radius: 4px;
46
46
  -webkit-box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.14), 0 0 2px 0 rgba(0, 0, 0, 0.12);
47
47
  box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.14), 0 0 2px 0 rgba(0, 0, 0, 0.12);
48
48
  margin-top: 4px;
@@ -42,7 +42,7 @@
42
42
 
43
43
  .e-ddl.e-popup {
44
44
  border: 0;
45
- border-radius: 8px;
45
+ border-radius: 4px;
46
46
  -webkit-box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.14), 0 0 2px 0 rgba(0, 0, 0, 0.12);
47
47
  box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.14), 0 0 2px 0 rgba(0, 0, 0, 0.12);
48
48
  margin-top: 4px;