@syncfusion/ej2-querybuilder 24.1.43 → 24.1.45
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.
- package/CHANGELOG.md +16 -0
- package/README.md +1 -1
- package/dist/ej2-querybuilder.min.js +2 -2
- package/dist/ej2-querybuilder.umd.min.js +2 -2
- package/dist/ej2-querybuilder.umd.min.js.map +1 -1
- package/dist/es6/ej2-querybuilder.es2015.js +22 -15
- package/dist/es6/ej2-querybuilder.es2015.js.map +1 -1
- package/dist/es6/ej2-querybuilder.es5.js +22 -15
- package/dist/es6/ej2-querybuilder.es5.js.map +1 -1
- package/dist/global/ej2-querybuilder.min.js +2 -2
- package/dist/global/ej2-querybuilder.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +10 -10
- package/src/query-builder/query-builder-model.d.ts +1 -1
- package/src/query-builder/query-builder.d.ts +2 -1
- package/src/query-builder/query-builder.js +22 -15
- package/styles/bootstrap-dark.css +4 -0
- package/styles/bootstrap.css +4 -0
- package/styles/bootstrap4.css +4 -0
- package/styles/bootstrap5-dark.css +4 -0
- package/styles/bootstrap5.css +4 -0
- package/styles/fabric-dark.css +4 -0
- package/styles/fabric.css +4 -0
- package/styles/fluent-dark.css +4 -0
- package/styles/fluent.css +4 -0
- package/styles/highcontrast-light.css +4 -0
- package/styles/highcontrast.css +4 -0
- package/styles/material-dark.css +4 -0
- package/styles/material.css +4 -0
- package/styles/material3-dark.css +4 -0
- package/styles/material3.css +4 -0
- package/styles/query-builder/_layout.scss +4 -0
- package/styles/query-builder/bootstrap-dark.css +4 -0
- package/styles/query-builder/bootstrap.css +4 -0
- package/styles/query-builder/bootstrap4.css +4 -0
- package/styles/query-builder/bootstrap5-dark.css +4 -0
- package/styles/query-builder/bootstrap5.css +4 -0
- package/styles/query-builder/fabric-dark.css +4 -0
- package/styles/query-builder/fabric.css +4 -0
- package/styles/query-builder/fluent-dark.css +4 -0
- package/styles/query-builder/fluent.css +4 -0
- package/styles/query-builder/highcontrast-light.css +4 -0
- package/styles/query-builder/highcontrast.css +4 -0
- package/styles/query-builder/material-dark.css +4 -0
- package/styles/query-builder/material.css +4 -0
- package/styles/query-builder/material3-dark.css +4 -0
- package/styles/query-builder/material3.css +4 -0
- package/styles/query-builder/tailwind-dark.css +4 -0
- package/styles/query-builder/tailwind.css +4 -0
- package/styles/tailwind-dark.css +4 -0
- package/styles/tailwind.css +4 -0
|
@@ -282,7 +282,8 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
|
|
|
282
282
|
if (categories.indexOf(columns[i].category) < 0) {
|
|
283
283
|
categories.push(columns[i].category);
|
|
284
284
|
}
|
|
285
|
-
if (!columns[i].operators ||
|
|
285
|
+
if (!columns[i].operators ||
|
|
286
|
+
(this.isLocale && this.isCustomOprCols.indexOf(columns[i].field) !== 0)) {
|
|
286
287
|
columns[i].operators = this.customOperators[columns[i].type + 'Operator'];
|
|
287
288
|
}
|
|
288
289
|
}
|
|
@@ -718,13 +719,16 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
|
|
|
718
719
|
else {
|
|
719
720
|
var ddlField = void 0;
|
|
720
721
|
var ddlValue = this.isImportRules ? rule.field : rule.field;
|
|
722
|
+
this.dummyDropdownTreeDs = extend([], this.columns, [], true);
|
|
723
|
+
this.updateDropdowntreeDS(this.dummyDropdownTreeDs);
|
|
721
724
|
ddlField = {
|
|
722
|
-
fields: { dataSource: this.
|
|
723
|
-
value: 'field', text: 'label', child: 'columns', expanded: 'expanded' },
|
|
725
|
+
fields: { dataSource: this.dummyDropdownTreeDs,
|
|
726
|
+
value: 'field', text: 'label', child: 'columns', expanded: 'expanded', selectable: 'selectable' },
|
|
724
727
|
placeholder: this.l10n.getConstant('SelectField'), showClearButton: false,
|
|
725
728
|
popupHeight: ((this.columns.length > 5) ? height : 'auto'), changeOnBlur: false,
|
|
726
729
|
change: this.changeField.bind(this), value: !isNullOrUndefined(ddlValue) ? [ddlValue] : null,
|
|
727
|
-
open: this.popupOpen.bind(this, false), treeSettings: { expandOn: 'Click' },
|
|
730
|
+
open: this.popupOpen.bind(this, false), treeSettings: { expandOn: 'Click' },
|
|
731
|
+
cssClass: 'e-qb-ddt'
|
|
728
732
|
};
|
|
729
733
|
if (this.fieldModel) {
|
|
730
734
|
ddlField = __assign({}, ddlField, this.fieldModel);
|
|
@@ -752,6 +756,14 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
|
|
|
752
756
|
}
|
|
753
757
|
}
|
|
754
758
|
};
|
|
759
|
+
QueryBuilder.prototype.updateDropdowntreeDS = function (columns) {
|
|
760
|
+
for (var i = 0; i < columns.length; i++) {
|
|
761
|
+
if (columns[parseInt(i.toString(), 10)].type === 'object') {
|
|
762
|
+
columns[parseInt(i.toString(), 10)].selectable = false;
|
|
763
|
+
this.updateDropdowntreeDS(columns[parseInt(i.toString(), 10)].columns);
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
};
|
|
755
767
|
QueryBuilder.prototype.updateAddedRule = function (target, rule, newRule, isRuleTemplate, pId) {
|
|
756
768
|
var ruleElem;
|
|
757
769
|
var index = 0;
|
|
@@ -811,7 +823,7 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
|
|
|
811
823
|
};
|
|
812
824
|
QueryBuilder.prototype.renderToolTip = function (element) {
|
|
813
825
|
var tooltip = new Tooltip({ content: this.l10n.getConstant('ValidationMessage'),
|
|
814
|
-
position: 'BottomCenter', cssClass: 'e-querybuilder-error', afterClose: function (
|
|
826
|
+
position: 'BottomCenter', cssClass: 'e-querybuilder-error', afterClose: function () {
|
|
815
827
|
tooltip.destroy();
|
|
816
828
|
} });
|
|
817
829
|
tooltip.appendTo(element);
|
|
@@ -1138,7 +1150,8 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
|
|
|
1138
1150
|
var groupHdr = groupElem.querySelector('.e-group-header');
|
|
1139
1151
|
if (this.headerTemplate) {
|
|
1140
1152
|
args = { requestType: 'header-template-initialize', ruleID: groupElem.id,
|
|
1141
|
-
notCondition: this.enableNotCondition ? not : undefined,
|
|
1153
|
+
notCondition: this.enableNotCondition ? not : undefined,
|
|
1154
|
+
condition: condition, rule: this.getRuleCollection(rule, true), groupID: groupID };
|
|
1142
1155
|
this.trigger('actionBegin', args);
|
|
1143
1156
|
this.headerFn = this.templateParser(this.headerTemplate);
|
|
1144
1157
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -1413,12 +1426,6 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
|
|
|
1413
1426
|
}
|
|
1414
1427
|
this.isFieldChange = false;
|
|
1415
1428
|
};
|
|
1416
|
-
QueryBuilder.prototype.onSelectField = function (args) {
|
|
1417
|
-
if (args.itemData.hasChildren) {
|
|
1418
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1419
|
-
this.showPopup();
|
|
1420
|
-
}
|
|
1421
|
-
};
|
|
1422
1429
|
QueryBuilder.prototype.changeField = function (args) {
|
|
1423
1430
|
if (args.isInteracted) {
|
|
1424
1431
|
if (isNullOrUndefined(args.value)) {
|
|
@@ -2591,7 +2598,7 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
|
|
|
2591
2598
|
var valElemColl = this.columnTemplateFn(args, this, ruleID, templateID);
|
|
2592
2599
|
valElem = (valElemColl[0].nodeType === 3) ? valElemColl[1] : valElemColl[0];
|
|
2593
2600
|
target.nextElementSibling.appendChild(valElem);
|
|
2594
|
-
}
|
|
2601
|
+
} // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2595
2602
|
else if (this.isVue3) {
|
|
2596
2603
|
valElem = this.columnTemplateFn(args, this, 'Template', templateID);
|
|
2597
2604
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -3290,7 +3297,7 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
|
|
|
3290
3297
|
this.element.style.height = this.height;
|
|
3291
3298
|
break;
|
|
3292
3299
|
case 'rule':
|
|
3293
|
-
if (this.rule.rules.length
|
|
3300
|
+
if (this.rule.rules.length === 0 && !isNullOrUndefined(this.rule)) {
|
|
3294
3301
|
this.reset();
|
|
3295
3302
|
}
|
|
3296
3303
|
this.setProperties({ rule: newProp.rule }, true);
|
|
@@ -4405,7 +4412,7 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
|
|
|
4405
4412
|
dropDownObj.readonly = this.isReadonly;
|
|
4406
4413
|
}
|
|
4407
4414
|
else if (elem[i].classList.contains('e-dropdowntree')) {
|
|
4408
|
-
var dropDownTreeObj =
|
|
4415
|
+
var dropDownTreeObj = getComponent(elem[i], 'dropdowntree');
|
|
4409
4416
|
dropDownTreeObj.readonly = this.isReadonly;
|
|
4410
4417
|
}
|
|
4411
4418
|
else if (elem[i].classList.contains('e-numerictextbox')) {
|