@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
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version :
|
|
3
|
+
* version : 22.1.34
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. 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@
|
|
3
|
+
"_id": "@syncfusion/ej2-querybuilder@18.24.1",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-dnkNGldsTgLr67ZY2I6RDOBw4ox4YWjryIXdUv0N90OlnNbIWFplRDsA2orB9lQ6lGwTG6wINbXO0gVX0+ErBA==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-querybuilder",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -18,10 +18,13 @@
|
|
|
18
18
|
},
|
|
19
19
|
"_requiredBy": [
|
|
20
20
|
"/",
|
|
21
|
-
"/@syncfusion/ej2"
|
|
21
|
+
"/@syncfusion/ej2",
|
|
22
|
+
"/@syncfusion/ej2-angular-querybuilder",
|
|
23
|
+
"/@syncfusion/ej2-react-querybuilder",
|
|
24
|
+
"/@syncfusion/ej2-vue-querybuilder"
|
|
22
25
|
],
|
|
23
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-
|
|
24
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-querybuilder/-/ej2-querybuilder-18.24.1.tgz",
|
|
27
|
+
"_shasum": "4e0221fd832db21a21411029f3386f41bb9c9e5d",
|
|
25
28
|
"_spec": "@syncfusion/ej2-querybuilder@*",
|
|
26
29
|
"_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
|
|
27
30
|
"author": {
|
|
@@ -29,12 +32,12 @@
|
|
|
29
32
|
},
|
|
30
33
|
"bundleDependencies": false,
|
|
31
34
|
"dependencies": {
|
|
32
|
-
"@syncfusion/ej2-base": "~
|
|
33
|
-
"@syncfusion/ej2-buttons": "~
|
|
34
|
-
"@syncfusion/ej2-calendars": "~
|
|
35
|
-
"@syncfusion/ej2-dropdowns": "~
|
|
36
|
-
"@syncfusion/ej2-inputs": "~
|
|
37
|
-
"@syncfusion/ej2-splitbuttons": "~
|
|
35
|
+
"@syncfusion/ej2-base": "~22.1.34",
|
|
36
|
+
"@syncfusion/ej2-buttons": "~22.1.34",
|
|
37
|
+
"@syncfusion/ej2-calendars": "~22.1.34",
|
|
38
|
+
"@syncfusion/ej2-dropdowns": "~22.1.34",
|
|
39
|
+
"@syncfusion/ej2-inputs": "~22.1.34",
|
|
40
|
+
"@syncfusion/ej2-splitbuttons": "~22.1.34"
|
|
38
41
|
},
|
|
39
42
|
"deprecated": false,
|
|
40
43
|
"description": "Essential JS 2 QueryBuilder",
|
|
@@ -63,7 +66,7 @@
|
|
|
63
66
|
"url": "https://github.com/syncfusion/ej2-javascript-ui-controls/tree/master/controls/querybuilder"
|
|
64
67
|
},
|
|
65
68
|
"typings": "index.d.ts",
|
|
66
|
-
"version": "
|
|
69
|
+
"version": "22.1.34",
|
|
67
70
|
"sideEffects": false,
|
|
68
71
|
"homepage": "https://www.syncfusion.com/javascript-ui-controls"
|
|
69
72
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, INotifyPropertyChanged, NotifyPropertyChanges, getComponent, MouseEventArgs, Browser, compile } from '@syncfusion/ej2-base';import { Property, ChildProperty, Complex, L10n, closest, extend, isNullOrUndefined, Collection, cldrData } from '@syncfusion/ej2-base';import { getInstance, addClass, removeClass, rippleEffect, detach, classList } from '@syncfusion/ej2-base';import { Internationalization, DateFormatOptions, KeyboardEventArgs, getUniqueID, select } from '@syncfusion/ej2-base';import { Button, CheckBox, RadioButton, ChangeEventArgs as ButtonChangeEventArgs, RadioButtonModel } from '@syncfusion/ej2-buttons';import { DropDownList, ChangeEventArgs as DropDownChangeEventArgs, FieldSettingsModel, CheckBoxSelection, DropDownTreeModel, DropDownTree } from '@syncfusion/ej2-dropdowns';import { MultiSelect, MultiSelectChangeEventArgs, PopupEventArgs, MultiSelectModel, DropDownListModel } from '@syncfusion/ej2-dropdowns';import { EmitType, Event, EventHandler, getValue, Animation, BaseEventArgs } from '@syncfusion/ej2-base';import { Query, Predicate, DataManager, Deferred } from '@syncfusion/ej2-data';import { TextBox, NumericTextBox, InputEventArgs, ChangeEventArgs as InputChangeEventArgs } from '@syncfusion/ej2-inputs';import { TextBoxModel, NumericTextBoxModel } from '@syncfusion/ej2-inputs';import { DatePicker, ChangeEventArgs as CalendarChangeEventArgs, DatePickerModel } from '@syncfusion/ej2-calendars';import { DropDownButton, ItemModel, MenuEventArgs } from '@syncfusion/ej2-splitbuttons';import { Tooltip, createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';import { compile as templateCompiler } from '@syncfusion/ej2-base';
|
|
1
|
+
import { Component, INotifyPropertyChanged, NotifyPropertyChanges, getComponent, MouseEventArgs, Browser, compile, append } from '@syncfusion/ej2-base';import { Property, ChildProperty, Complex, L10n, closest, extend, isNullOrUndefined, Collection, cldrData } from '@syncfusion/ej2-base';import { getInstance, addClass, removeClass, rippleEffect, detach, classList } from '@syncfusion/ej2-base';import { Internationalization, DateFormatOptions, KeyboardEventArgs, getUniqueID, select } from '@syncfusion/ej2-base';import { Button, CheckBox, RadioButton, ChangeEventArgs as ButtonChangeEventArgs, RadioButtonModel } from '@syncfusion/ej2-buttons';import { DropDownList, ChangeEventArgs as DropDownChangeEventArgs, FieldSettingsModel, CheckBoxSelection, DropDownTreeModel, DropDownTree } from '@syncfusion/ej2-dropdowns';import { MultiSelect, MultiSelectChangeEventArgs, PopupEventArgs, MultiSelectModel, DropDownListModel } from '@syncfusion/ej2-dropdowns';import { EmitType, Event, EventHandler, getValue, Animation, BaseEventArgs } from '@syncfusion/ej2-base';import { Query, Predicate, DataManager, Deferred } from '@syncfusion/ej2-data';import { TextBox, NumericTextBox, InputEventArgs, ChangeEventArgs as InputChangeEventArgs } from '@syncfusion/ej2-inputs';import { TextBoxModel, NumericTextBoxModel } from '@syncfusion/ej2-inputs';import { DatePicker, ChangeEventArgs as CalendarChangeEventArgs, DatePickerModel } from '@syncfusion/ej2-calendars';import { DropDownButton, ItemModel, MenuEventArgs } from '@syncfusion/ej2-splitbuttons';import { Tooltip, createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';import { compile as templateCompiler } from '@syncfusion/ej2-base';
|
|
2
2
|
import {TemplateColumn,Validation,FormatObject,ActionEventArgs,ChangeEventArgs,RuleChangeEventArgs,FieldMode,DisplayMode,SortDirection} from "./query-builder";
|
|
3
3
|
import {ComponentModel} from '@syncfusion/ej2-base';
|
|
4
4
|
|
|
@@ -46,15 +46,17 @@ export interface ColumnsModel {
|
|
|
46
46
|
* Specifies the rule template for the field with any other widgets.
|
|
47
47
|
*
|
|
48
48
|
* @default null
|
|
49
|
+
* @aspType string
|
|
49
50
|
*/
|
|
50
|
-
ruleTemplate?: string;
|
|
51
|
+
ruleTemplate?: string | Function;
|
|
51
52
|
|
|
52
53
|
/**
|
|
53
54
|
* Specifies the template for value field such as slider or any other widgets.
|
|
54
55
|
*
|
|
55
56
|
* @default null
|
|
57
|
+
* @aspType string
|
|
56
58
|
*/
|
|
57
|
-
template?: TemplateColumn | string;
|
|
59
|
+
template?: TemplateColumn | string | Function;
|
|
58
60
|
|
|
59
61
|
/**
|
|
60
62
|
* Specifies the validation for columns (text, number and date).
|
|
@@ -350,8 +352,9 @@ export interface QueryBuilderModel extends ComponentModel{
|
|
|
350
352
|
* Specifies the template for the header with any other widgets.
|
|
351
353
|
*
|
|
352
354
|
* @default null
|
|
355
|
+
* @aspType string
|
|
353
356
|
*/
|
|
354
|
-
headerTemplate?: string;
|
|
357
|
+
headerTemplate?: string | Function;
|
|
355
358
|
|
|
356
359
|
/**
|
|
357
360
|
* Defines class or multiple classes, which are separated by a space in the QueryBuilder element.
|
|
@@ -51,14 +51,16 @@ export declare class Columns extends ChildProperty<Columns> {
|
|
|
51
51
|
* Specifies the rule template for the field with any other widgets.
|
|
52
52
|
*
|
|
53
53
|
* @default null
|
|
54
|
+
* @aspType string
|
|
54
55
|
*/
|
|
55
|
-
ruleTemplate: string;
|
|
56
|
+
ruleTemplate: string | Function;
|
|
56
57
|
/**
|
|
57
58
|
* Specifies the template for value field such as slider or any other widgets.
|
|
58
59
|
*
|
|
59
60
|
* @default null
|
|
61
|
+
* @aspType string
|
|
60
62
|
*/
|
|
61
|
-
template: TemplateColumn | string;
|
|
63
|
+
template: TemplateColumn | string | Function;
|
|
62
64
|
/**
|
|
63
65
|
* Specifies the validation for columns (text, number and date).
|
|
64
66
|
*
|
|
@@ -395,8 +397,9 @@ export declare class QueryBuilder extends Component<HTMLDivElement> implements I
|
|
|
395
397
|
* Specifies the template for the header with any other widgets.
|
|
396
398
|
*
|
|
397
399
|
* @default null
|
|
400
|
+
* @aspType string
|
|
398
401
|
*/
|
|
399
|
-
headerTemplate: string;
|
|
402
|
+
headerTemplate: string | Function;
|
|
400
403
|
/**
|
|
401
404
|
* Defines class or multiple classes, which are separated by a space in the QueryBuilder element.
|
|
402
405
|
* You can add custom styles to the QueryBuilder using the cssClass property.
|
|
@@ -31,7 +31,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
31
31
|
/**
|
|
32
32
|
* Query Builder Source
|
|
33
33
|
*/
|
|
34
|
-
import { Component, NotifyPropertyChanges, getComponent, Browser, compile } from '@syncfusion/ej2-base';
|
|
34
|
+
import { Component, NotifyPropertyChanges, getComponent, Browser, compile, append } from '@syncfusion/ej2-base';
|
|
35
35
|
import { Property, ChildProperty, Complex, L10n, closest, extend, isNullOrUndefined, Collection, cldrData } from '@syncfusion/ej2-base';
|
|
36
36
|
import { getInstance, addClass, removeClass, rippleEffect, detach, classList } from '@syncfusion/ej2-base';
|
|
37
37
|
import { Internationalization, getUniqueID, select } from '@syncfusion/ej2-base';
|
|
@@ -576,22 +576,37 @@ var QueryBuilder = /** @class */ (function (_super) {
|
|
|
576
576
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
577
577
|
if (this.isReact) {
|
|
578
578
|
template = this.ruleTemplateFn(args, this, ruleElem.id, templateID)[0];
|
|
579
|
+
elem = template;
|
|
580
|
+
elem.className += ' e-rule-field';
|
|
581
|
+
ruleElem.appendChild(elem);
|
|
579
582
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
580
583
|
}
|
|
581
584
|
else if (this.isAngular) {
|
|
582
585
|
var templateColl = this.ruleTemplateFn(args, this, ruleElem.id, templateID);
|
|
583
586
|
template = (templateColl[0].nodeType === 3) ? templateColl[1] : templateColl[0];
|
|
587
|
+
elem = template;
|
|
588
|
+
elem.className += ' e-rule-field';
|
|
589
|
+
ruleElem.appendChild(elem);
|
|
590
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
591
|
+
}
|
|
592
|
+
else if (this.isVue3) {
|
|
593
|
+
template = this.ruleTemplateFn(args, this, 'Template', templateID);
|
|
594
|
+
elem = template;
|
|
595
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
596
|
+
append(elem, ruleElem);
|
|
597
|
+
ruleElem.children[ruleElem.children.length - 1].className += ' e-rule-field';
|
|
584
598
|
}
|
|
585
599
|
else {
|
|
586
600
|
template = this.ruleTemplateFn(args, this, 'Template', templateID)[0];
|
|
601
|
+
elem = template;
|
|
602
|
+
elem.className += ' e-rule-field';
|
|
603
|
+
ruleElem.appendChild(elem);
|
|
587
604
|
}
|
|
588
|
-
elem = template;
|
|
589
|
-
elem.className += ' e-rule-field';
|
|
590
605
|
}
|
|
591
606
|
else {
|
|
592
607
|
elem = this.ruleElem.querySelector('.e-rule-field').cloneNode(true);
|
|
608
|
+
ruleElem.appendChild(elem);
|
|
593
609
|
}
|
|
594
|
-
ruleElem.appendChild(elem);
|
|
595
610
|
if (column && column.ruleTemplate && rule) {
|
|
596
611
|
this.renderReactTemplates();
|
|
597
612
|
}
|
|
@@ -1125,16 +1140,24 @@ var QueryBuilder = /** @class */ (function (_super) {
|
|
|
1125
1140
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1126
1141
|
if (this.isReact) {
|
|
1127
1142
|
template = this.headerFn(args, this, groupElem.id, templateID)[0];
|
|
1143
|
+
groupHdr.appendChild(template);
|
|
1128
1144
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1129
1145
|
}
|
|
1130
1146
|
else if (this.isAngular) {
|
|
1131
1147
|
var templateColl = this.headerFn(args, this, groupElem.id, templateID);
|
|
1132
1148
|
template = (templateColl[0].nodeType === 3) ? templateColl[1] : templateColl[0];
|
|
1149
|
+
groupHdr.appendChild(template);
|
|
1150
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1151
|
+
}
|
|
1152
|
+
else if (this.isVue3) {
|
|
1153
|
+
template = this.headerFn(args, this, groupElem.id, templateID);
|
|
1154
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1155
|
+
append(template, groupHdr);
|
|
1133
1156
|
}
|
|
1134
1157
|
else {
|
|
1135
1158
|
template = this.headerFn(args, this, 'Template', templateID)[0];
|
|
1159
|
+
groupHdr.appendChild(template);
|
|
1136
1160
|
}
|
|
1137
|
-
groupHdr.appendChild(template);
|
|
1138
1161
|
this.renderReactTemplates();
|
|
1139
1162
|
}
|
|
1140
1163
|
return groupElem;
|
|
@@ -2041,7 +2064,7 @@ var QueryBuilder = /** @class */ (function (_super) {
|
|
|
2041
2064
|
getValue(template.write, window)({ elements: tempElements.length > 1 ? tempElements : tempElements[0], values: rule.value,
|
|
2042
2065
|
operator: tempRule.operator, field: column.field, dataSource: column.values });
|
|
2043
2066
|
}
|
|
2044
|
-
else {
|
|
2067
|
+
else if (typeof itemData.template !== 'function') {
|
|
2045
2068
|
itemData.template.write({ elements: tempElements.length > 1 ? tempElements : tempElements[0],
|
|
2046
2069
|
values: rule.value, operator: tempRule.operator, field: column.field, dataSource: column.values });
|
|
2047
2070
|
}
|
|
@@ -2533,7 +2556,7 @@ var QueryBuilder = /** @class */ (function (_super) {
|
|
|
2533
2556
|
QueryBuilder.prototype.actionBeginSuccessCallBack = function (args, itemData, ruleID, field, target) {
|
|
2534
2557
|
if (args.renderTemplate) {
|
|
2535
2558
|
var valElem = void 0;
|
|
2536
|
-
this.columnTemplateFn = this.templateParser(itemData.template);
|
|
2559
|
+
this.columnTemplateFn = this.templateParser(typeof itemData.template === 'function' ? itemData.template : itemData.template);
|
|
2537
2560
|
var templateID = this.element.id + field;
|
|
2538
2561
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2539
2562
|
if (this.isReact) {
|
|
@@ -3404,7 +3427,7 @@ var QueryBuilder = /** @class */ (function (_super) {
|
|
|
3404
3427
|
QueryBuilder.prototype.templateParser = function (template) {
|
|
3405
3428
|
if (template) {
|
|
3406
3429
|
try {
|
|
3407
|
-
if (document.querySelectorAll(template).length) {
|
|
3430
|
+
if (typeof template !== 'function' && document.querySelectorAll(template).length) {
|
|
3408
3431
|
return templateCompiler(document.querySelector(template).innerHTML.trim());
|
|
3409
3432
|
}
|
|
3410
3433
|
else {
|