@syncfusion/ej2-querybuilder 21.2.3 → 22.1.34
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/.eslintrc.json +1 -0
- package/CHANGELOG.md +1 -4
- 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 +31 -8
- package/dist/es6/ej2-querybuilder.es2015.js.map +1 -1
- package/dist/es6/ej2-querybuilder.es5.js +31 -8
- 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 +15 -12
- package/src/query-builder/query-builder-model.d.ts +7 -4
- package/src/query-builder/query-builder.d.ts +6 -3
- package/src/query-builder/query-builder.js +31 -8
- package/styles/material3-dark.css +815 -0
- package/styles/material3-dark.scss +3 -0
- package/styles/material3.css +871 -0
- package/styles/material3.scss +3 -0
- package/styles/query-builder/_layout.scss +71 -13
- package/styles/query-builder/_material3-dark-definition.scss +1 -0
- package/styles/query-builder/_material3-definition.scss +110 -0
- package/styles/query-builder/icons/_material3-dark.scss +1 -0
- package/styles/query-builder/material3-dark.css +815 -0
- package/styles/query-builder/material3-dark.scss +16 -0
- package/styles/query-builder/material3.css +871 -0
- package/styles/query-builder/material3.scss +16 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Animation, Browser, ChildProperty, Collection, Complex, Component, Event, EventHandler, Internationalization, L10n, NotifyPropertyChanges, Property, addClass, classList, cldrData, closest, compile, detach, extend, getComponent, getInstance, getUniqueID, getValue, isNullOrUndefined, removeClass, rippleEffect, select } from '@syncfusion/ej2-base';
|
|
1
|
+
import { Animation, Browser, ChildProperty, Collection, Complex, Component, Event, EventHandler, Internationalization, L10n, NotifyPropertyChanges, Property, addClass, append, classList, cldrData, closest, compile, detach, extend, getComponent, getInstance, getUniqueID, getValue, isNullOrUndefined, removeClass, rippleEffect, select } from '@syncfusion/ej2-base';
|
|
2
2
|
import { Button, RadioButton } from '@syncfusion/ej2-buttons';
|
|
3
3
|
import { CheckBoxSelection, DropDownList, DropDownTree, MultiSelect } from '@syncfusion/ej2-dropdowns';
|
|
4
4
|
import { DataManager, Deferred, Predicate, Query } from '@syncfusion/ej2-data';
|
|
@@ -567,22 +567,37 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
|
|
|
567
567
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
568
568
|
if (this.isReact) {
|
|
569
569
|
template = this.ruleTemplateFn(args, this, ruleElem.id, templateID)[0];
|
|
570
|
+
elem = template;
|
|
571
|
+
elem.className += ' e-rule-field';
|
|
572
|
+
ruleElem.appendChild(elem);
|
|
570
573
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
571
574
|
}
|
|
572
575
|
else if (this.isAngular) {
|
|
573
576
|
var templateColl = this.ruleTemplateFn(args, this, ruleElem.id, templateID);
|
|
574
577
|
template = (templateColl[0].nodeType === 3) ? templateColl[1] : templateColl[0];
|
|
578
|
+
elem = template;
|
|
579
|
+
elem.className += ' e-rule-field';
|
|
580
|
+
ruleElem.appendChild(elem);
|
|
581
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
582
|
+
}
|
|
583
|
+
else if (this.isVue3) {
|
|
584
|
+
template = this.ruleTemplateFn(args, this, 'Template', templateID);
|
|
585
|
+
elem = template;
|
|
586
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
587
|
+
append(elem, ruleElem);
|
|
588
|
+
ruleElem.children[ruleElem.children.length - 1].className += ' e-rule-field';
|
|
575
589
|
}
|
|
576
590
|
else {
|
|
577
591
|
template = this.ruleTemplateFn(args, this, 'Template', templateID)[0];
|
|
592
|
+
elem = template;
|
|
593
|
+
elem.className += ' e-rule-field';
|
|
594
|
+
ruleElem.appendChild(elem);
|
|
578
595
|
}
|
|
579
|
-
elem = template;
|
|
580
|
-
elem.className += ' e-rule-field';
|
|
581
596
|
}
|
|
582
597
|
else {
|
|
583
598
|
elem = this.ruleElem.querySelector('.e-rule-field').cloneNode(true);
|
|
599
|
+
ruleElem.appendChild(elem);
|
|
584
600
|
}
|
|
585
|
-
ruleElem.appendChild(elem);
|
|
586
601
|
if (column && column.ruleTemplate && rule) {
|
|
587
602
|
this.renderReactTemplates();
|
|
588
603
|
}
|
|
@@ -1116,16 +1131,24 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
|
|
|
1116
1131
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1117
1132
|
if (this.isReact) {
|
|
1118
1133
|
template = this.headerFn(args, this, groupElem.id, templateID)[0];
|
|
1134
|
+
groupHdr.appendChild(template);
|
|
1119
1135
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1120
1136
|
}
|
|
1121
1137
|
else if (this.isAngular) {
|
|
1122
1138
|
var templateColl = this.headerFn(args, this, groupElem.id, templateID);
|
|
1123
1139
|
template = (templateColl[0].nodeType === 3) ? templateColl[1] : templateColl[0];
|
|
1140
|
+
groupHdr.appendChild(template);
|
|
1141
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1142
|
+
}
|
|
1143
|
+
else if (this.isVue3) {
|
|
1144
|
+
template = this.headerFn(args, this, groupElem.id, templateID);
|
|
1145
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1146
|
+
append(template, groupHdr);
|
|
1124
1147
|
}
|
|
1125
1148
|
else {
|
|
1126
1149
|
template = this.headerFn(args, this, 'Template', templateID)[0];
|
|
1150
|
+
groupHdr.appendChild(template);
|
|
1127
1151
|
}
|
|
1128
|
-
groupHdr.appendChild(template);
|
|
1129
1152
|
this.renderReactTemplates();
|
|
1130
1153
|
}
|
|
1131
1154
|
return groupElem;
|
|
@@ -2032,7 +2055,7 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
|
|
|
2032
2055
|
getValue(template.write, window)({ elements: tempElements.length > 1 ? tempElements : tempElements[0], values: rule.value,
|
|
2033
2056
|
operator: tempRule.operator, field: column.field, dataSource: column.values });
|
|
2034
2057
|
}
|
|
2035
|
-
else {
|
|
2058
|
+
else if (typeof itemData.template !== 'function') {
|
|
2036
2059
|
itemData.template.write({ elements: tempElements.length > 1 ? tempElements : tempElements[0],
|
|
2037
2060
|
values: rule.value, operator: tempRule.operator, field: column.field, dataSource: column.values });
|
|
2038
2061
|
}
|
|
@@ -2524,7 +2547,7 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
|
|
|
2524
2547
|
QueryBuilder.prototype.actionBeginSuccessCallBack = function (args, itemData, ruleID, field, target) {
|
|
2525
2548
|
if (args.renderTemplate) {
|
|
2526
2549
|
var valElem = void 0;
|
|
2527
|
-
this.columnTemplateFn = this.templateParser(itemData.template);
|
|
2550
|
+
this.columnTemplateFn = this.templateParser(typeof itemData.template === 'function' ? itemData.template : itemData.template);
|
|
2528
2551
|
var templateID = this.element.id + field;
|
|
2529
2552
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2530
2553
|
if (this.isReact) {
|
|
@@ -3395,7 +3418,7 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
|
|
|
3395
3418
|
QueryBuilder.prototype.templateParser = function (template) {
|
|
3396
3419
|
if (template) {
|
|
3397
3420
|
try {
|
|
3398
|
-
if (document.querySelectorAll(template).length) {
|
|
3421
|
+
if (typeof template !== 'function' && document.querySelectorAll(template).length) {
|
|
3399
3422
|
return compile(document.querySelector(template).innerHTML.trim());
|
|
3400
3423
|
}
|
|
3401
3424
|
else {
|