@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
|
@@ -236,7 +236,8 @@ let QueryBuilder = class QueryBuilder extends Component {
|
|
|
236
236
|
if (categories.indexOf(columns[i].category) < 0) {
|
|
237
237
|
categories.push(columns[i].category);
|
|
238
238
|
}
|
|
239
|
-
if (!columns[i].operators ||
|
|
239
|
+
if (!columns[i].operators ||
|
|
240
|
+
(this.isLocale && this.isCustomOprCols.indexOf(columns[i].field) !== 0)) {
|
|
240
241
|
columns[i].operators = this.customOperators[columns[i].type + 'Operator'];
|
|
241
242
|
}
|
|
242
243
|
}
|
|
@@ -666,13 +667,16 @@ let QueryBuilder = class QueryBuilder extends Component {
|
|
|
666
667
|
else {
|
|
667
668
|
let ddlField;
|
|
668
669
|
const ddlValue = this.isImportRules ? rule.field : rule.field;
|
|
670
|
+
this.dummyDropdownTreeDs = extend([], this.columns, [], true);
|
|
671
|
+
this.updateDropdowntreeDS(this.dummyDropdownTreeDs);
|
|
669
672
|
ddlField = {
|
|
670
|
-
fields: { dataSource: this.
|
|
671
|
-
value: 'field', text: 'label', child: 'columns', expanded: 'expanded' },
|
|
673
|
+
fields: { dataSource: this.dummyDropdownTreeDs,
|
|
674
|
+
value: 'field', text: 'label', child: 'columns', expanded: 'expanded', selectable: 'selectable' },
|
|
672
675
|
placeholder: this.l10n.getConstant('SelectField'), showClearButton: false,
|
|
673
676
|
popupHeight: ((this.columns.length > 5) ? height : 'auto'), changeOnBlur: false,
|
|
674
677
|
change: this.changeField.bind(this), value: !isNullOrUndefined(ddlValue) ? [ddlValue] : null,
|
|
675
|
-
open: this.popupOpen.bind(this, false), treeSettings: { expandOn: 'Click' },
|
|
678
|
+
open: this.popupOpen.bind(this, false), treeSettings: { expandOn: 'Click' },
|
|
679
|
+
cssClass: 'e-qb-ddt'
|
|
676
680
|
};
|
|
677
681
|
if (this.fieldModel) {
|
|
678
682
|
ddlField = Object.assign({}, ddlField, this.fieldModel);
|
|
@@ -700,6 +704,14 @@ let QueryBuilder = class QueryBuilder extends Component {
|
|
|
700
704
|
}
|
|
701
705
|
}
|
|
702
706
|
}
|
|
707
|
+
updateDropdowntreeDS(columns) {
|
|
708
|
+
for (let i = 0; i < columns.length; i++) {
|
|
709
|
+
if (columns[parseInt(i.toString(), 10)].type === 'object') {
|
|
710
|
+
columns[parseInt(i.toString(), 10)].selectable = false;
|
|
711
|
+
this.updateDropdowntreeDS(columns[parseInt(i.toString(), 10)].columns);
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
}
|
|
703
715
|
updateAddedRule(target, rule, newRule, isRuleTemplate, pId) {
|
|
704
716
|
let ruleElem;
|
|
705
717
|
let index = 0;
|
|
@@ -759,7 +771,7 @@ let QueryBuilder = class QueryBuilder extends Component {
|
|
|
759
771
|
}
|
|
760
772
|
renderToolTip(element) {
|
|
761
773
|
const tooltip = new Tooltip({ content: this.l10n.getConstant('ValidationMessage'),
|
|
762
|
-
position: 'BottomCenter', cssClass: 'e-querybuilder-error', afterClose: (
|
|
774
|
+
position: 'BottomCenter', cssClass: 'e-querybuilder-error', afterClose: () => {
|
|
763
775
|
tooltip.destroy();
|
|
764
776
|
} });
|
|
765
777
|
tooltip.appendTo(element);
|
|
@@ -1085,7 +1097,8 @@ let QueryBuilder = class QueryBuilder extends Component {
|
|
|
1085
1097
|
const groupHdr = groupElem.querySelector('.e-group-header');
|
|
1086
1098
|
if (this.headerTemplate) {
|
|
1087
1099
|
args = { requestType: 'header-template-initialize', ruleID: groupElem.id,
|
|
1088
|
-
notCondition: this.enableNotCondition ? not : undefined,
|
|
1100
|
+
notCondition: this.enableNotCondition ? not : undefined,
|
|
1101
|
+
condition: condition, rule: this.getRuleCollection(rule, true), groupID: groupID };
|
|
1089
1102
|
this.trigger('actionBegin', args);
|
|
1090
1103
|
this.headerFn = this.templateParser(this.headerTemplate);
|
|
1091
1104
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -1358,12 +1371,6 @@ let QueryBuilder = class QueryBuilder extends Component {
|
|
|
1358
1371
|
}
|
|
1359
1372
|
this.isFieldChange = false;
|
|
1360
1373
|
}
|
|
1361
|
-
onSelectField(args) {
|
|
1362
|
-
if (args.itemData.hasChildren) {
|
|
1363
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1364
|
-
this.showPopup();
|
|
1365
|
-
}
|
|
1366
|
-
}
|
|
1367
1374
|
changeField(args) {
|
|
1368
1375
|
if (args.isInteracted) {
|
|
1369
1376
|
if (isNullOrUndefined(args.value)) {
|
|
@@ -2528,7 +2535,7 @@ let QueryBuilder = class QueryBuilder extends Component {
|
|
|
2528
2535
|
const valElemColl = this.columnTemplateFn(args, this, ruleID, templateID);
|
|
2529
2536
|
valElem = (valElemColl[0].nodeType === 3) ? valElemColl[1] : valElemColl[0];
|
|
2530
2537
|
target.nextElementSibling.appendChild(valElem);
|
|
2531
|
-
}
|
|
2538
|
+
} // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2532
2539
|
else if (this.isVue3) {
|
|
2533
2540
|
valElem = this.columnTemplateFn(args, this, 'Template', templateID);
|
|
2534
2541
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -3226,7 +3233,7 @@ let QueryBuilder = class QueryBuilder extends Component {
|
|
|
3226
3233
|
this.element.style.height = this.height;
|
|
3227
3234
|
break;
|
|
3228
3235
|
case 'rule':
|
|
3229
|
-
if (this.rule.rules.length
|
|
3236
|
+
if (this.rule.rules.length === 0 && !isNullOrUndefined(this.rule)) {
|
|
3230
3237
|
this.reset();
|
|
3231
3238
|
}
|
|
3232
3239
|
this.setProperties({ rule: newProp.rule }, true);
|
|
@@ -4338,7 +4345,7 @@ let QueryBuilder = class QueryBuilder extends Component {
|
|
|
4338
4345
|
dropDownObj.readonly = this.isReadonly;
|
|
4339
4346
|
}
|
|
4340
4347
|
else if (elem[i].classList.contains('e-dropdowntree')) {
|
|
4341
|
-
const dropDownTreeObj =
|
|
4348
|
+
const dropDownTreeObj = getComponent(elem[i], 'dropdowntree');
|
|
4342
4349
|
dropDownTreeObj.readonly = this.isReadonly;
|
|
4343
4350
|
}
|
|
4344
4351
|
else if (elem[i].classList.contains('e-numerictextbox')) {
|