@syncfusion/ej2-querybuilder 25.2.3 → 25.2.7

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.2.3
3
+ * version : 25.2.7
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.42",
3
+ "_id": "@syncfusion/ej2-querybuilder@25.2.4",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-UIFQJNjXFhmzK++AcE9N74B7VoebBfUyn0F4UWh8PCzGOzwQkfaQPYrXVHE6I6sCStLipaT5TLO56fyuSoOflA==",
5
+ "_integrity": "sha512-3JAdE1LuotFDUJ/XQMJJDTGrKOep9LrmbDe9l09jDtNQJoc/Mvzww2z2eJcckpl1g6HLAotVx59Xt9s/j0vSKg==",
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.42.tgz",
27
- "_shasum": "be17a591afa3711be8557572fb8b0843db4f576a",
26
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-querybuilder/-/ej2-querybuilder-25.2.4.tgz",
27
+ "_shasum": "cb648a4a4c92046ef6fec58ef71d9847040fa130",
28
28
  "_spec": "@syncfusion/ej2-querybuilder@*",
29
29
  "_where": "/jenkins/workspace/elease-automation_release_25.1.1/packages/included",
30
30
  "author": {
@@ -32,12 +32,12 @@
32
32
  },
33
33
  "bundleDependencies": false,
34
34
  "dependencies": {
35
- "@syncfusion/ej2-base": "~25.2.3",
36
- "@syncfusion/ej2-buttons": "~25.2.3",
37
- "@syncfusion/ej2-calendars": "~25.2.3",
38
- "@syncfusion/ej2-dropdowns": "~25.2.3",
39
- "@syncfusion/ej2-inputs": "~25.2.3",
40
- "@syncfusion/ej2-splitbuttons": "~25.2.3"
35
+ "@syncfusion/ej2-base": "~25.2.7",
36
+ "@syncfusion/ej2-buttons": "~25.2.7",
37
+ "@syncfusion/ej2-calendars": "~25.2.7",
38
+ "@syncfusion/ej2-dropdowns": "~25.2.7",
39
+ "@syncfusion/ej2-inputs": "~25.2.6",
40
+ "@syncfusion/ej2-splitbuttons": "~25.2.4"
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.2.3",
69
+ "version": "25.2.7",
70
70
  "sideEffects": false,
71
71
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
72
72
  }
@@ -168,7 +168,7 @@ export interface RuleModel {
168
168
  /**
169
169
  * Specifies whether rule is locked or not.
170
170
  *
171
- * @default false
171
+ * @default null
172
172
  */
173
173
  isLocked?: boolean;
174
174
 
@@ -155,7 +155,7 @@ export declare class Rule extends ChildProperty<Rule> {
155
155
  /**
156
156
  * Specifies whether rule is locked or not.
157
157
  *
158
- * @default false
158
+ * @default null
159
159
  */
160
160
  isLocked: boolean;
161
161
  }
@@ -128,7 +128,7 @@ var Rule = /** @class */ (function (_super) {
128
128
  Property(false)
129
129
  ], Rule.prototype, "not", void 0);
130
130
  __decorate([
131
- Property(false)
131
+ Property(null)
132
132
  ], Rule.prototype, "isLocked", void 0);
133
133
  return Rule;
134
134
  }(ChildProperty));
@@ -563,7 +563,7 @@ var QueryBuilder = /** @class */ (function (_super) {
563
563
  }
564
564
  };
565
565
  QueryBuilder.prototype.beforeSuccessCallBack = function (args, target) {
566
- if (!args.cancel) {
566
+ if (args && !args.cancel) {
567
567
  var element = closest(target, '.e-group-container');
568
568
  var groupID = element.id.replace(this.element.id + '_', '');
569
569
  var beforeRules = this.getValidRules(this.rule);
@@ -4087,7 +4087,9 @@ var QueryBuilder = /** @class */ (function (_super) {
4087
4087
  var ruleCondtion = currentRule.condition;
4088
4088
  var notCondition = currentRule.not;
4089
4089
  var ruleColl = extend([], currentRule.rules, [], true);
4090
- var rule = this.getRuleCollection({ condition: ruleCondtion, rules: ruleColl, not: notCondition }, true);
4090
+ var rule = !isNullOrUndefined(currentRule.isLocked) ?
4091
+ this.getRuleCollection({ condition: ruleCondtion, rules: ruleColl, not: notCondition, isLocked: currentRule.isLocked }, true) :
4092
+ this.getRuleCollection({ condition: ruleCondtion, rules: ruleColl, not: notCondition }, true);
4091
4093
  return rule;
4092
4094
  };
4093
4095
  QueryBuilder.prototype.getRuleCollection = function (rule, isValidRule) {
@@ -4120,10 +4122,11 @@ var QueryBuilder = /** @class */ (function (_super) {
4120
4122
  if ((this.isRefreshed && this.enablePersistence) || (rule.field !== '' && rule.operator !== '' && (rule.value !== '' &&
4121
4123
  rule.value !== undefined)) || (customObj && customObj.isQuestion)) {
4122
4124
  var condition = rule.condition;
4123
- rule = {
4124
- 'label': rule.label, 'field': rule.field, 'operator': rule.operator, 'type': rule.type, 'value': rule.value,
4125
- 'isLocked': rule.isLocked
4126
- };
4125
+ var lockedRule = rule.isLocked;
4126
+ rule = { 'label': rule.label, 'field': rule.field, 'operator': rule.operator, 'type': rule.type, 'value': rule.value };
4127
+ if (!isNullOrUndefined(lockedRule)) {
4128
+ rule.isLocked = lockedRule;
4129
+ }
4127
4130
  if (condition) {
4128
4131
  rule.condition = condition;
4129
4132
  }
@@ -4156,11 +4159,15 @@ var QueryBuilder = /** @class */ (function (_super) {
4156
4159
  rule = {};
4157
4160
  }
4158
4161
  else {
4162
+ var isLocked = rule.isLocked;
4159
4163
  if (this.enableNotCondition) {
4160
- rule = { 'condition': rule.condition, 'rules': rule.rules, 'not': rule.not, 'isLocked': rule.isLocked };
4164
+ rule = { 'condition': rule.condition, 'rules': rule.rules, 'not': rule.not };
4161
4165
  }
4162
4166
  else {
4163
- rule = { 'condition': rule.condition, 'rules': rule.rules, 'isLocked': rule.isLocked };
4167
+ rule = { 'condition': rule.condition, 'rules': rule.rules };
4168
+ }
4169
+ if (!isNullOrUndefined(isLocked)) {
4170
+ rule.isLocked = isLocked;
4164
4171
  }
4165
4172
  if (customObj) {
4166
4173
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -4201,6 +4208,9 @@ var QueryBuilder = /** @class */ (function (_super) {
4201
4208
  else {
4202
4209
  rule = { condition: this.rule.condition, rules: this.rule.rules };
4203
4210
  }
4211
+ if (!isNullOrUndefined(this.rule.isLocked)) {
4212
+ rule.isLocked = this.rule.isLocked;
4213
+ }
4204
4214
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4205
4215
  if (this.rule.custom) {
4206
4216
  // eslint-disable-next-line @typescript-eslint/no-explicit-any