@syncfusion/ej2-vue-querybuilder 20.4.51 → 21.1.35
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 +0 -26
- package/dist/ej2-vue-querybuilder.umd.min.js +2 -2
- package/dist/ej2-vue-querybuilder.umd.min.js.map +1 -1
- package/dist/es6/ej2-vue-querybuilder.es2015.js +157 -213
- package/dist/es6/ej2-vue-querybuilder.es2015.js.map +1 -1
- package/dist/es6/ej2-vue-querybuilder.es5.js +174 -247
- package/dist/es6/ej2-vue-querybuilder.es5.js.map +1 -1
- package/dist/global/ej2-vue-querybuilder.min.js +2 -2
- package/package.json +9 -9
- package/src/query-builder/columns.directive.d.ts +2 -12
- package/src/query-builder/columns.directive.js +22 -71
- package/src/query-builder/querybuilder.component.d.ts +3 -43
- package/src/query-builder/querybuilder.component.js +146 -175
- package/styles/bootstrap-dark.css +17 -9
- package/styles/bootstrap.css +9 -9
- package/styles/bootstrap4.css +10 -10
- package/styles/bootstrap5-dark.css +11 -11
- package/styles/bootstrap5.css +11 -11
- package/styles/fabric-dark.css +15 -9
- package/styles/fabric.css +9 -9
- package/styles/fluent-dark.css +12 -12
- package/styles/fluent.css +12 -12
- package/styles/highcontrast-light.css +9 -30
- package/styles/highcontrast.css +9 -9
- package/styles/material-dark.css +9 -9
- package/styles/material.css +9 -9
- package/styles/query-builder/bootstrap-dark.css +17 -9
- package/styles/query-builder/bootstrap.css +9 -9
- package/styles/query-builder/bootstrap4.css +10 -10
- package/styles/query-builder/bootstrap5-dark.css +11 -11
- package/styles/query-builder/bootstrap5.css +11 -11
- package/styles/query-builder/fabric-dark.css +15 -9
- package/styles/query-builder/fabric.css +9 -9
- package/styles/query-builder/fluent-dark.css +12 -12
- package/styles/query-builder/fluent.css +12 -12
- package/styles/query-builder/highcontrast-light.css +9 -30
- package/styles/query-builder/highcontrast.css +9 -9
- package/styles/query-builder/material-dark.css +9 -9
- package/styles/query-builder/material.css +9 -9
- package/styles/query-builder/tailwind-dark.css +9 -9
- package/styles/query-builder/tailwind.css +9 -9
- package/styles/tailwind-dark.css +9 -9
- package/styles/tailwind.css +9 -9
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-vue-querybuilder@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-vue-querybuilder@
|
|
3
|
+
"_id": "@syncfusion/ej2-vue-querybuilder@18.23.1",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-rcqHPYCkks+uUqdxpV1tmIVo1XUwUo2bHu3yPgTswCIz0VbDKoUiSJUQtkv6DNQmQwgq6oWxTRfjmFRlLNYdRw==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-vue-querybuilder",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"_requiredBy": [
|
|
20
20
|
"/"
|
|
21
21
|
],
|
|
22
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-
|
|
23
|
-
"_shasum": "
|
|
22
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-vue-querybuilder/-/ej2-vue-querybuilder-18.23.1.tgz",
|
|
23
|
+
"_shasum": "34cb537211afc81bd8bff827ac36ed3d512e0818",
|
|
24
24
|
"_spec": "@syncfusion/ej2-vue-querybuilder@*",
|
|
25
|
-
"_where": "/jenkins/workspace/
|
|
25
|
+
"_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
|
|
26
26
|
"author": {
|
|
27
27
|
"name": "Syncfusion Inc."
|
|
28
28
|
},
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
},
|
|
32
32
|
"bundleDependencies": false,
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@syncfusion/ej2-base": "~
|
|
35
|
-
"@syncfusion/ej2-querybuilder": "
|
|
36
|
-
"@syncfusion/ej2-vue-base": "~
|
|
34
|
+
"@syncfusion/ej2-base": "~21.1.35",
|
|
35
|
+
"@syncfusion/ej2-querybuilder": "21.1.35",
|
|
36
|
+
"@syncfusion/ej2-vue-base": "~21.1.35"
|
|
37
37
|
},
|
|
38
38
|
"deprecated": false,
|
|
39
39
|
"description": "Essential JS 2 QueryBuilder for Vue",
|
|
@@ -60,6 +60,6 @@
|
|
|
60
60
|
"scripts": {
|
|
61
61
|
"postinstall": "node ../ej2-vue-base/postinstall.js"
|
|
62
62
|
},
|
|
63
|
-
"version": "
|
|
63
|
+
"version": "21.1.35",
|
|
64
64
|
"sideEffects": false
|
|
65
65
|
}
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
declare let
|
|
2
|
-
export declare class ColumnsDirective extends vueImport {
|
|
3
|
-
constructor();
|
|
4
|
-
render(createElement: any): void;
|
|
5
|
-
updated(): void;
|
|
6
|
-
getTag(): string;
|
|
7
|
-
}
|
|
1
|
+
export declare let ColumnsDirective: any;
|
|
8
2
|
export declare const ColumnsPlugin: {
|
|
9
3
|
name: string;
|
|
10
4
|
install(Vue: any): void;
|
|
@@ -21,12 +15,8 @@ export declare const ColumnsPlugin: {
|
|
|
21
15
|
* </ejs-querybuilder>
|
|
22
16
|
* ```
|
|
23
17
|
*/
|
|
24
|
-
export declare
|
|
25
|
-
render(): void;
|
|
26
|
-
getTag(): string;
|
|
27
|
-
}
|
|
18
|
+
export declare let ColumnDirective: any;
|
|
28
19
|
export declare const ColumnPlugin: {
|
|
29
20
|
name: string;
|
|
30
21
|
install(Vue: any): void;
|
|
31
22
|
};
|
|
32
|
-
export {};
|
|
@@ -1,40 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
extendStatics(d, b);
|
|
10
|
-
function __() { this.constructor = d; }
|
|
11
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
-
};
|
|
13
|
-
})();
|
|
14
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
18
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
-
};
|
|
20
|
-
import { EJComponentDecorator, allVue, gh, isExecute } from '@syncfusion/ej2-vue-base';
|
|
21
|
-
import * as Vue3 from 'vue-class-component';
|
|
1
|
+
import { gh, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base';
|
|
22
2
|
import { isNullOrUndefined } from '@syncfusion/ej2-base';
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if (!isExecute || parseInt(allVue.version) < 3) {
|
|
27
|
-
vueImport = Vue3.Vue;
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
vueImport = Vue;
|
|
31
|
-
}
|
|
32
|
-
var ColumnsDirective = /** @class */ (function (_super) {
|
|
33
|
-
__extends(ColumnsDirective, _super);
|
|
34
|
-
function ColumnsDirective() {
|
|
35
|
-
return _super.call(this, arguments) || this;
|
|
36
|
-
}
|
|
37
|
-
ColumnsDirective.prototype.render = function (createElement) {
|
|
3
|
+
export var ColumnsDirective = vueDefineComponent({
|
|
4
|
+
inject: { custom: { default: null } },
|
|
5
|
+
render: function (createElement) {
|
|
38
6
|
if (!isExecute) {
|
|
39
7
|
var h = !isExecute ? gh : createElement;
|
|
40
8
|
var slots = null;
|
|
@@ -44,28 +12,18 @@ var ColumnsDirective = /** @class */ (function (_super) {
|
|
|
44
12
|
return h('div', { class: 'e-directive' }, slots);
|
|
45
13
|
}
|
|
46
14
|
return;
|
|
47
|
-
}
|
|
48
|
-
|
|
15
|
+
},
|
|
16
|
+
updated: function () {
|
|
49
17
|
if (!isExecute && this.custom) {
|
|
50
18
|
this.custom();
|
|
51
19
|
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
inject: {
|
|
60
|
-
custom: {
|
|
61
|
-
default: null
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
})
|
|
65
|
-
], ColumnsDirective);
|
|
66
|
-
return ColumnsDirective;
|
|
67
|
-
}(vueImport));
|
|
68
|
-
export { ColumnsDirective };
|
|
20
|
+
},
|
|
21
|
+
methods: {
|
|
22
|
+
getTag: function () {
|
|
23
|
+
return 'e-columns';
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
});
|
|
69
27
|
export var ColumnsPlugin = {
|
|
70
28
|
name: 'e-columns',
|
|
71
29
|
install: function (Vue) {
|
|
@@ -84,23 +42,16 @@ export var ColumnsPlugin = {
|
|
|
84
42
|
* </ejs-querybuilder>
|
|
85
43
|
* ```
|
|
86
44
|
*/
|
|
87
|
-
var ColumnDirective =
|
|
88
|
-
|
|
89
|
-
function ColumnDirective() {
|
|
90
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
91
|
-
}
|
|
92
|
-
ColumnDirective.prototype.render = function () {
|
|
45
|
+
export var ColumnDirective = vueDefineComponent({
|
|
46
|
+
render: function () {
|
|
93
47
|
return;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
return ColumnDirective;
|
|
102
|
-
}(vueImport));
|
|
103
|
-
export { ColumnDirective };
|
|
48
|
+
},
|
|
49
|
+
methods: {
|
|
50
|
+
getTag: function () {
|
|
51
|
+
return 'e-column';
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
});
|
|
104
55
|
export var ColumnPlugin = {
|
|
105
56
|
name: 'e-column',
|
|
106
57
|
install: function (Vue) {
|
|
@@ -1,55 +1,15 @@
|
|
|
1
|
-
import { ComponentBase } from '@syncfusion/ej2-vue-base';
|
|
2
1
|
export declare const properties: string[];
|
|
3
2
|
export declare const modelProps: string[];
|
|
4
3
|
export declare const testProp: any;
|
|
5
|
-
export declare const props: any;
|
|
6
|
-
export declare const watch: any;
|
|
7
|
-
export declare const emitProbs: any;
|
|
4
|
+
export declare const props: any, watch: any, emitProbs: any;
|
|
8
5
|
/**
|
|
9
6
|
* Represents the VueJS QueryBuilder Component.
|
|
10
7
|
* ```html
|
|
11
8
|
* <ejs-querybuilder></ejs-querybuilder>
|
|
12
9
|
* ```
|
|
13
10
|
*/
|
|
14
|
-
export declare
|
|
15
|
-
|
|
16
|
-
propKeys: string[];
|
|
17
|
-
models: string[];
|
|
18
|
-
hasChildDirective: boolean;
|
|
19
|
-
protected hasInjectedModules: boolean;
|
|
20
|
-
tagMapper: {
|
|
21
|
-
[key: string]: Object;
|
|
22
|
-
};
|
|
23
|
-
tagNameMapper: Object;
|
|
24
|
-
isVue3: boolean;
|
|
25
|
-
templateCollection: any;
|
|
26
|
-
constructor();
|
|
27
|
-
clearTemplate(templateNames?: string[]): any;
|
|
28
|
-
setProperties(prop: any, muteOnChange: boolean): void;
|
|
29
|
-
render(createElement: any): any;
|
|
30
|
-
custom(): void;
|
|
31
|
-
addGroups(groups: Object[], groupID: string): void;
|
|
32
|
-
addRules(rule: Object[], groupID: string): void;
|
|
33
|
-
deleteGroup(target: Object | string): void;
|
|
34
|
-
deleteGroups(groupIdColl: string[]): void;
|
|
35
|
-
deleteRules(ruleIdColl: string[]): void;
|
|
36
|
-
getDataManagerQuery(rule: Object): Object;
|
|
37
|
-
getFilteredRecords(): Object | any;
|
|
38
|
-
getGroup(target: Object | string): Object;
|
|
39
|
-
getOperators(field: string): undefined[];
|
|
40
|
-
getPredicate(rule: Object): Object;
|
|
41
|
-
getRule(elem: string | Object): Object;
|
|
42
|
-
getRules(): Object;
|
|
43
|
-
getRulesFromSql(sqlString: string, sqlLocale?: boolean): Object;
|
|
44
|
-
getSqlFromRules(rule?: Object, allowEscape?: boolean, sqlLocale?: boolean): string;
|
|
45
|
-
getValidRules(currentRule?: Object): Object;
|
|
46
|
-
getValues(field: string): any[];
|
|
47
|
-
notifyChange(value: string | number | boolean | Object | string[] | number[] | Object[], element: Object, type?: string): void;
|
|
48
|
-
reset(): void;
|
|
49
|
-
setRules(rule: Object): void;
|
|
50
|
-
setRulesFromSql(sqlString: string, sqlLocale?: boolean): void;
|
|
51
|
-
validateFields(): boolean;
|
|
52
|
-
}
|
|
11
|
+
export declare let QueryBuilderComponent: any;
|
|
12
|
+
export declare type QueryBuilderComponent = InstanceType<typeof QueryBuilderComponent>;
|
|
53
13
|
export declare const QueryBuilderPlugin: {
|
|
54
14
|
name: string;
|
|
55
15
|
install(Vue: any): void;
|
|
@@ -1,33 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
extendStatics(d, b);
|
|
10
|
-
function __() { this.constructor = d; }
|
|
11
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
-
};
|
|
13
|
-
})();
|
|
14
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
18
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
-
};
|
|
20
|
-
import { ComponentBase, EJComponentDecorator, getProps, gh, isExecute } from '@syncfusion/ej2-vue-base';
|
|
1
|
+
import { ComponentBase, gh, getProps, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base';
|
|
21
2
|
import { isNullOrUndefined, getValue } from '@syncfusion/ej2-base';
|
|
22
3
|
import { QueryBuilder } from '@syncfusion/ej2-querybuilder';
|
|
23
4
|
import { ColumnsDirective, ColumnDirective, ColumnsPlugin, ColumnPlugin } from './columns.directive';
|
|
24
|
-
import { Options } from 'vue-class-component';
|
|
25
5
|
export var properties = ['isLazyUpdate', 'plugins', 'allowValidation', 'columns', 'cssClass', 'dataSource', 'displayMode', 'enableNotCondition', 'enablePersistence', 'enableRtl', 'fieldMode', 'fieldModel', 'headerTemplate', 'height', 'immediateModeDelay', 'locale', 'matchCase', 'maxGroupCount', 'operatorModel', 'readonly', 'rule', 'separator', 'showButtons', 'sortDirection', 'summaryView', 'valueModel', 'width', 'actionBegin', 'beforeChange', 'change', 'created', 'dataBound', 'ruleChange'];
|
|
26
6
|
export var modelProps = [];
|
|
27
7
|
export var testProp = getProps({ props: properties });
|
|
28
|
-
export var props = testProp[0];
|
|
29
|
-
export var watch = testProp[1];
|
|
30
|
-
export var emitProbs = Object.keys(watch);
|
|
8
|
+
export var props = testProp[0], watch = testProp[1], emitProbs = Object.keys(watch);
|
|
31
9
|
emitProbs.push('modelchanged', 'update:modelValue');
|
|
32
10
|
for (var _i = 0, modelProps_1 = modelProps; _i < modelProps_1.length; _i++) {
|
|
33
11
|
var props_1 = modelProps_1[_i];
|
|
@@ -39,165 +17,158 @@ for (var _i = 0, modelProps_1 = modelProps; _i < modelProps_1.length; _i++) {
|
|
|
39
17
|
* <ejs-querybuilder></ejs-querybuilder>
|
|
40
18
|
* ```
|
|
41
19
|
*/
|
|
42
|
-
var QueryBuilderComponent =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
20
|
+
export var QueryBuilderComponent = vueDefineComponent({
|
|
21
|
+
name: 'QueryBuilderComponent',
|
|
22
|
+
mixins: [ComponentBase],
|
|
23
|
+
props: props,
|
|
24
|
+
watch: watch,
|
|
25
|
+
emits: emitProbs,
|
|
26
|
+
provide: function () { return { custom: this.custom }; },
|
|
27
|
+
data: function () {
|
|
28
|
+
return {
|
|
29
|
+
ej2Instances: new QueryBuilder({}),
|
|
30
|
+
propKeys: properties,
|
|
31
|
+
models: modelProps,
|
|
32
|
+
hasChildDirective: true,
|
|
33
|
+
hasInjectedModules: false,
|
|
34
|
+
tagMapper: { "e-columns": "e-column" },
|
|
35
|
+
tagNameMapper: {},
|
|
36
|
+
isVue3: !isExecute,
|
|
37
|
+
templateCollection: {},
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
created: function () {
|
|
41
|
+
this.bindProperties();
|
|
42
|
+
this.ej2Instances._setProperties = this.ej2Instances.setProperties;
|
|
43
|
+
this.ej2Instances.setProperties = this.setProperties;
|
|
44
|
+
this.ej2Instances.clearTemplate = this.clearTemplate;
|
|
45
|
+
this.updated = this.updated;
|
|
46
|
+
},
|
|
47
|
+
render: function (createElement) {
|
|
48
|
+
var h = !isExecute ? gh : createElement;
|
|
49
|
+
var slots = null;
|
|
50
|
+
if (!isNullOrUndefined(this.$slots.default)) {
|
|
51
|
+
slots = !isExecute ? this.$slots.default() : this.$slots.default;
|
|
64
52
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
53
|
+
return h('div', slots);
|
|
54
|
+
},
|
|
55
|
+
methods: {
|
|
56
|
+
clearTemplate: function (templateNames) {
|
|
57
|
+
if (!templateNames) {
|
|
58
|
+
templateNames = Object.keys(this.templateCollection || {});
|
|
59
|
+
}
|
|
60
|
+
if (templateNames.length && this.templateCollection) {
|
|
61
|
+
for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {
|
|
62
|
+
var tempName = templateNames_1[_i];
|
|
63
|
+
var elementCollection = this.templateCollection[tempName];
|
|
64
|
+
if (elementCollection && elementCollection.length) {
|
|
65
|
+
for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {
|
|
66
|
+
var ele = elementCollection_1[_a];
|
|
67
|
+
var destroy = getValue('__vue__.$destroy', ele);
|
|
68
|
+
if (destroy) {
|
|
69
|
+
ele.__vue__.$destroy();
|
|
70
|
+
}
|
|
71
|
+
if (ele.innerHTML) {
|
|
72
|
+
ele.innerHTML = '';
|
|
73
|
+
}
|
|
78
74
|
}
|
|
75
|
+
delete this.templateCollection[tempName];
|
|
79
76
|
}
|
|
80
|
-
delete this.templateCollection[tempName];
|
|
81
77
|
}
|
|
82
78
|
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
79
|
+
},
|
|
80
|
+
setProperties: function (prop, muteOnChange) {
|
|
81
|
+
var _this = this;
|
|
82
|
+
if (this.isVue3) {
|
|
83
|
+
this.models = !this.models ? this.ej2Instances.referModels : this.models;
|
|
84
|
+
}
|
|
85
|
+
if (this.ej2Instances && this.ej2Instances._setProperties) {
|
|
86
|
+
this.ej2Instances._setProperties(prop, muteOnChange);
|
|
87
|
+
}
|
|
88
|
+
if (prop && this.models && this.models.length) {
|
|
89
|
+
Object.keys(prop).map(function (key) {
|
|
90
|
+
_this.models.map(function (model) {
|
|
91
|
+
if ((key === model) && !(/datasource/i.test(key))) {
|
|
92
|
+
if (_this.isVue3) {
|
|
93
|
+
_this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
_this.$emit('update:' + key, prop[key]);
|
|
97
|
+
_this.$emit('modelchanged', prop[key]);
|
|
98
|
+
}
|
|
103
99
|
}
|
|
104
|
-
}
|
|
100
|
+
});
|
|
105
101
|
});
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
QueryBuilderComponent.prototype.render = function (createElement) {
|
|
110
|
-
var h = !isExecute ? gh : createElement;
|
|
111
|
-
var slots = null;
|
|
112
|
-
if (!isNullOrUndefined(this.$slots.default)) {
|
|
113
|
-
slots = !isExecute ? this.$slots.default() : this.$slots.default;
|
|
114
|
-
}
|
|
115
|
-
return h('div', slots);
|
|
116
|
-
};
|
|
117
|
-
QueryBuilderComponent.prototype.custom = function () {
|
|
118
|
-
this.updated();
|
|
119
|
-
};
|
|
120
|
-
QueryBuilderComponent.prototype.addGroups = function (groups, groupID) {
|
|
121
|
-
return this.ej2Instances.addGroups(groups, groupID);
|
|
122
|
-
};
|
|
123
|
-
QueryBuilderComponent.prototype.addRules = function (rule, groupID) {
|
|
124
|
-
return this.ej2Instances.addRules(rule, groupID);
|
|
125
|
-
};
|
|
126
|
-
QueryBuilderComponent.prototype.deleteGroup = function (target) {
|
|
127
|
-
return this.ej2Instances.deleteGroup(target);
|
|
128
|
-
};
|
|
129
|
-
QueryBuilderComponent.prototype.deleteGroups = function (groupIdColl) {
|
|
130
|
-
return this.ej2Instances.deleteGroups(groupIdColl);
|
|
131
|
-
};
|
|
132
|
-
QueryBuilderComponent.prototype.deleteRules = function (ruleIdColl) {
|
|
133
|
-
return this.ej2Instances.deleteRules(ruleIdColl);
|
|
134
|
-
};
|
|
135
|
-
QueryBuilderComponent.prototype.getDataManagerQuery = function (rule) {
|
|
136
|
-
return this.ej2Instances.getDataManagerQuery(rule);
|
|
137
|
-
};
|
|
138
|
-
QueryBuilderComponent.prototype.getFilteredRecords = function () {
|
|
139
|
-
return this.ej2Instances.getFilteredRecords();
|
|
140
|
-
};
|
|
141
|
-
QueryBuilderComponent.prototype.getGroup = function (target) {
|
|
142
|
-
return this.ej2Instances.getGroup(target);
|
|
143
|
-
};
|
|
144
|
-
QueryBuilderComponent.prototype.getOperators = function (field) {
|
|
145
|
-
return this.ej2Instances.getOperators(field);
|
|
146
|
-
};
|
|
147
|
-
QueryBuilderComponent.prototype.getPredicate = function (rule) {
|
|
148
|
-
return this.ej2Instances.getPredicate(rule);
|
|
149
|
-
};
|
|
150
|
-
QueryBuilderComponent.prototype.getRule = function (elem) {
|
|
151
|
-
return this.ej2Instances.getRule(elem);
|
|
152
|
-
};
|
|
153
|
-
QueryBuilderComponent.prototype.getRules = function () {
|
|
154
|
-
return this.ej2Instances.getRules();
|
|
155
|
-
};
|
|
156
|
-
QueryBuilderComponent.prototype.getRulesFromSql = function (sqlString, sqlLocale) {
|
|
157
|
-
return this.ej2Instances.getRulesFromSql(sqlString, sqlLocale);
|
|
158
|
-
};
|
|
159
|
-
QueryBuilderComponent.prototype.getSqlFromRules = function (rule, allowEscape, sqlLocale) {
|
|
160
|
-
return this.ej2Instances.getSqlFromRules(rule, allowEscape, sqlLocale);
|
|
161
|
-
};
|
|
162
|
-
QueryBuilderComponent.prototype.getValidRules = function (currentRule) {
|
|
163
|
-
return this.ej2Instances.getValidRules(currentRule);
|
|
164
|
-
};
|
|
165
|
-
QueryBuilderComponent.prototype.getValues = function (field) {
|
|
166
|
-
return this.ej2Instances.getValues(field);
|
|
167
|
-
};
|
|
168
|
-
QueryBuilderComponent.prototype.notifyChange = function (value, element, type) {
|
|
169
|
-
return this.ej2Instances.notifyChange(value, element, type);
|
|
170
|
-
};
|
|
171
|
-
QueryBuilderComponent.prototype.reset = function () {
|
|
172
|
-
return this.ej2Instances.reset();
|
|
173
|
-
};
|
|
174
|
-
QueryBuilderComponent.prototype.setRules = function (rule) {
|
|
175
|
-
return this.ej2Instances.setRules(rule);
|
|
176
|
-
};
|
|
177
|
-
QueryBuilderComponent.prototype.setRulesFromSql = function (sqlString, sqlLocale) {
|
|
178
|
-
return this.ej2Instances.setRulesFromSql(sqlString, sqlLocale);
|
|
179
|
-
};
|
|
180
|
-
QueryBuilderComponent.prototype.validateFields = function () {
|
|
181
|
-
return this.ej2Instances.validateFields();
|
|
182
|
-
};
|
|
183
|
-
QueryBuilderComponent = __decorate([
|
|
184
|
-
EJComponentDecorator({
|
|
185
|
-
props: properties
|
|
186
|
-
}, isExecute)
|
|
187
|
-
,Options({
|
|
188
|
-
props: props,
|
|
189
|
-
watch: watch,
|
|
190
|
-
emits: emitProbs,
|
|
191
|
-
provide: function provide() {
|
|
192
|
-
return {
|
|
193
|
-
custom: this.custom
|
|
194
|
-
};
|
|
195
102
|
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
}
|
|
200
|
-
|
|
103
|
+
},
|
|
104
|
+
custom: function () {
|
|
105
|
+
this.updated();
|
|
106
|
+
},
|
|
107
|
+
addGroups: function (groups, groupID) {
|
|
108
|
+
return this.ej2Instances.addGroups(groups, groupID);
|
|
109
|
+
},
|
|
110
|
+
addRules: function (rule, groupID) {
|
|
111
|
+
return this.ej2Instances.addRules(rule, groupID);
|
|
112
|
+
},
|
|
113
|
+
deleteGroup: function (target) {
|
|
114
|
+
return this.ej2Instances.deleteGroup(target);
|
|
115
|
+
},
|
|
116
|
+
deleteGroups: function (groupIdColl) {
|
|
117
|
+
return this.ej2Instances.deleteGroups(groupIdColl);
|
|
118
|
+
},
|
|
119
|
+
deleteRules: function (ruleIdColl) {
|
|
120
|
+
return this.ej2Instances.deleteRules(ruleIdColl);
|
|
121
|
+
},
|
|
122
|
+
getDataManagerQuery: function (rule) {
|
|
123
|
+
return this.ej2Instances.getDataManagerQuery(rule);
|
|
124
|
+
},
|
|
125
|
+
getFilteredRecords: function () {
|
|
126
|
+
return this.ej2Instances.getFilteredRecords();
|
|
127
|
+
},
|
|
128
|
+
getGroup: function (target) {
|
|
129
|
+
return this.ej2Instances.getGroup(target);
|
|
130
|
+
},
|
|
131
|
+
getOperators: function (field) {
|
|
132
|
+
return this.ej2Instances.getOperators(field);
|
|
133
|
+
},
|
|
134
|
+
getPredicate: function (rule) {
|
|
135
|
+
return this.ej2Instances.getPredicate(rule);
|
|
136
|
+
},
|
|
137
|
+
getRule: function (elem) {
|
|
138
|
+
return this.ej2Instances.getRule(elem);
|
|
139
|
+
},
|
|
140
|
+
getRules: function () {
|
|
141
|
+
return this.ej2Instances.getRules();
|
|
142
|
+
},
|
|
143
|
+
getRulesFromSql: function (sqlString, sqlLocale) {
|
|
144
|
+
return this.ej2Instances.getRulesFromSql(sqlString, sqlLocale);
|
|
145
|
+
},
|
|
146
|
+
getSqlFromRules: function (rule, allowEscape, sqlLocale) {
|
|
147
|
+
return this.ej2Instances.getSqlFromRules(rule, allowEscape, sqlLocale);
|
|
148
|
+
},
|
|
149
|
+
getValidRules: function (currentRule) {
|
|
150
|
+
return this.ej2Instances.getValidRules(currentRule);
|
|
151
|
+
},
|
|
152
|
+
getValues: function (field) {
|
|
153
|
+
return this.ej2Instances.getValues(field);
|
|
154
|
+
},
|
|
155
|
+
notifyChange: function (value, element, type) {
|
|
156
|
+
return this.ej2Instances.notifyChange(value, element, type);
|
|
157
|
+
},
|
|
158
|
+
reset: function () {
|
|
159
|
+
return this.ej2Instances.reset();
|
|
160
|
+
},
|
|
161
|
+
setRules: function (rule) {
|
|
162
|
+
return this.ej2Instances.setRules(rule);
|
|
163
|
+
},
|
|
164
|
+
setRulesFromSql: function (sqlString, sqlLocale) {
|
|
165
|
+
return this.ej2Instances.setRulesFromSql(sqlString, sqlLocale);
|
|
166
|
+
},
|
|
167
|
+
validateFields: function () {
|
|
168
|
+
return this.ej2Instances.validateFields();
|
|
169
|
+
},
|
|
170
|
+
}
|
|
171
|
+
});
|
|
201
172
|
export var QueryBuilderPlugin = {
|
|
202
173
|
name: 'ejs-querybuilder',
|
|
203
174
|
install: function (Vue) {
|