@syncfusion/ej2-querybuilder 27.1.48 → 27.1.52

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.52
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.50",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-H6mi2bWOJuR/rGo6DHtX75nWSdEo4Q7eysFJm/cTUKHuoowavQ0/FUJBoEhy6u2h0k4wrfxQkiKxKXc9HXurOw==",
5
+ "_integrity": "sha512-oh+4trQAObeD31Oka0XehomrkdbvgXeakCGKnHeiNWXW1YuNI3SWqMozsWhkcsyP7rmCq4vjfWgY1fBBvqOF+Q==",
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.50.tgz",
27
+ "_shasum": "ffba9ca17f5287645b8b643604a7fc08e2691b98",
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.52",
36
+ "@syncfusion/ej2-buttons": "~27.1.51",
37
+ "@syncfusion/ej2-calendars": "~27.1.52",
38
+ "@syncfusion/ej2-dropdowns": "~27.1.52",
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.52",
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
  };
@@ -2095,7 +2097,9 @@ var QueryBuilder = /** @class */ (function (_super) {
2095
2097
  if (isNaN(value) && elem.value.indexOf(decimalSeparator) !== -1) {
2096
2098
  value = this.intl.getNumberParser({ format: 'n' })(elem.value);
2097
2099
  }
2098
- numericTextBoxObj.value = value;
2100
+ if (!isNaN(value)) {
2101
+ numericTextBoxObj.value = value;
2102
+ }
2099
2103
  this.isNumInput = true;
2100
2104
  }
2101
2105
  }
@@ -2474,11 +2478,13 @@ var QueryBuilder = /** @class */ (function (_super) {
2474
2478
  }
2475
2479
  var height = (this.element.className.indexOf('e-device') > -1) ? '250px' : '200px';
2476
2480
  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
- });
2481
+ if (rule.operator) {
2482
+ operatorList.forEach(function (obj) {
2483
+ if ('value' in obj && typeof obj.value === 'string' && obj.value.toLowerCase() === rule.operator.toLowerCase()) {
2484
+ operator_2 = obj.value;
2485
+ }
2486
+ });
2487
+ }
2482
2488
  var value = operator_2 ? operator_2 : operatorList[0].value;
2483
2489
  var ddlIdx = 0;
2484
2490
  if (!this.autoSelectOperator) {
@@ -3259,6 +3265,10 @@ var QueryBuilder = /** @class */ (function (_super) {
3259
3265
  }
3260
3266
  target.nextElementSibling.innerHTML = '';
3261
3267
  }
3268
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3269
+ if (this.isAngular && !isNullOrUndefined(prevItemData.key) && this.fieldMode === 'DropdownTree') {
3270
+ delete prevItemData.template;
3271
+ }
3262
3272
  }
3263
3273
  if (isRender) {
3264
3274
  this.validateValue(rule, closest(target, '.e-rule-container'));
@@ -3298,6 +3308,10 @@ var QueryBuilder = /** @class */ (function (_super) {
3298
3308
  }
3299
3309
  }
3300
3310
  this.renderControls(target, itemData, rule, tempRule, isTempRendered);
3311
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3312
+ if (this.isAngular && !isNullOrUndefined(itemData.key) && itemData.template && this.fieldMode === 'DropdownTree') {
3313
+ delete itemData.template;
3314
+ }
3301
3315
  }
3302
3316
  }
3303
3317
  else {
@@ -5148,6 +5162,7 @@ var QueryBuilder = /** @class */ (function (_super) {
5148
5162
  * @returns {RuleModel} - Valid rule or rules collection
5149
5163
  */
5150
5164
  QueryBuilder.prototype.getValidRules = function (currentRule) {
5165
+ this.isValueEmpty = true;
5151
5166
  if (!currentRule) {
5152
5167
  currentRule = this.getRules();
5153
5168
  }
@@ -5157,6 +5172,7 @@ var QueryBuilder = /** @class */ (function (_super) {
5157
5172
  var rule = !isNullOrUndefined(currentRule.isLocked) ?
5158
5173
  this.getRuleCollection({ condition: ruleCondtion, rules: ruleColl, not: notCondition, isLocked: currentRule.isLocked }, true) :
5159
5174
  this.getRuleCollection({ condition: ruleCondtion, rules: ruleColl, not: notCondition }, true);
5175
+ this.isValueEmpty = false;
5160
5176
  return rule;
5161
5177
  };
5162
5178
  QueryBuilder.prototype.getRuleCollection = function (rule, isValidRule) {
@@ -5186,8 +5202,9 @@ var QueryBuilder = /** @class */ (function (_super) {
5186
5202
  rule.value = null;
5187
5203
  }
5188
5204
  }
5189
- if ((this.isRefreshed && this.enablePersistence) || (rule.field !== '' && rule.operator !== '' && (rule.value !== '' &&
5190
- rule.value !== undefined)) || (customObj && customObj.isQuestion)) {
5205
+ if ((this.isRefreshed && this.enablePersistence) || (rule.field !== '' && rule.operator !== '' &&
5206
+ (this.isValueEmpty ? rule.value !== '' && rule.value !== undefined : rule.value !== undefined)) ||
5207
+ (customObj && customObj.isQuestion)) {
5191
5208
  var condition = rule.condition;
5192
5209
  var lockedRule = rule.isLocked;
5193
5210
  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;