ngx-angular-query-builder 15.0.1 → 17.0.0
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/README.md +2 -1
- package/esm2020/lib/ngx-angular-query-builder.module.mjs +17 -22
- package/esm2020/lib/query-builder/query-arrow-icon.directive.mjs +3 -3
- package/esm2020/lib/query-builder/query-builder.component.mjs +94 -84
- package/esm2020/lib/query-builder/query-builder.interfaces.mjs +1 -1
- package/esm2020/lib/query-builder/query-button-group.directive.mjs +3 -3
- package/esm2020/lib/query-builder/query-empty-warning.directive.mjs +3 -3
- package/esm2020/lib/query-builder/query-entity.directive.mjs +3 -3
- package/esm2020/lib/query-builder/query-field.directive.mjs +3 -3
- package/esm2020/lib/query-builder/query-input.directive.mjs +6 -4
- package/esm2020/lib/query-builder/query-operator.directive.mjs +3 -3
- package/esm2020/lib/query-builder/query-remove-button.directive.mjs +3 -3
- package/esm2020/lib/query-builder/query-switch-group.directive.mjs +3 -3
- package/esm2020/public-api.mjs +13 -13
- package/fesm2015/ngx-angular-query-builder.mjs +98 -90
- package/fesm2015/ngx-angular-query-builder.mjs.map +1 -1
- package/fesm2020/ngx-angular-query-builder.mjs +97 -90
- package/fesm2020/ngx-angular-query-builder.mjs.map +1 -1
- package/lib/query-builder/query-arrow-icon.directive.d.ts +1 -1
- package/lib/query-builder/query-builder.component.d.ts +13 -13
- package/lib/query-builder/query-button-group.directive.d.ts +1 -1
- package/lib/query-builder/query-empty-warning.directive.d.ts +1 -1
- package/lib/query-builder/query-entity.directive.d.ts +1 -1
- package/lib/query-builder/query-field.directive.d.ts +1 -1
- package/lib/query-builder/query-input.directive.d.ts +1 -1
- package/lib/query-builder/query-operator.directive.d.ts +1 -1
- package/lib/query-builder/query-remove-button.directive.d.ts +1 -1
- package/lib/query-builder/query-switch-group.directive.d.ts +1 -1
- package/package.json +3 -3
- package/public-api.d.ts +12 -12
|
@@ -14,7 +14,7 @@ QueryOperatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", v
|
|
|
14
14
|
QueryOperatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.0", type: QueryOperatorDirective, selector: "[queryOperator]", ngImport: i0 });
|
|
15
15
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: QueryOperatorDirective, decorators: [{
|
|
16
16
|
type: Directive,
|
|
17
|
-
args: [{ selector:
|
|
17
|
+
args: [{ selector: "[queryOperator]" }]
|
|
18
18
|
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
|
|
19
19
|
|
|
20
20
|
class QueryFieldDirective {
|
|
@@ -26,7 +26,7 @@ QueryFieldDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", vers
|
|
|
26
26
|
QueryFieldDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.0", type: QueryFieldDirective, selector: "[queryField]", ngImport: i0 });
|
|
27
27
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: QueryFieldDirective, decorators: [{
|
|
28
28
|
type: Directive,
|
|
29
|
-
args: [{ selector:
|
|
29
|
+
args: [{ selector: "[queryField]" }]
|
|
30
30
|
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
|
|
31
31
|
|
|
32
32
|
class QueryEntityDirective {
|
|
@@ -38,7 +38,7 @@ QueryEntityDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", ver
|
|
|
38
38
|
QueryEntityDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.0", type: QueryEntityDirective, selector: "[queryEntity]", ngImport: i0 });
|
|
39
39
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: QueryEntityDirective, decorators: [{
|
|
40
40
|
type: Directive,
|
|
41
|
-
args: [{ selector:
|
|
41
|
+
args: [{ selector: "[queryEntity]" }]
|
|
42
42
|
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
|
|
43
43
|
|
|
44
44
|
class QuerySwitchGroupDirective {
|
|
@@ -50,7 +50,7 @@ QuerySwitchGroupDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0"
|
|
|
50
50
|
QuerySwitchGroupDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.0", type: QuerySwitchGroupDirective, selector: "[querySwitchGroup]", ngImport: i0 });
|
|
51
51
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: QuerySwitchGroupDirective, decorators: [{
|
|
52
52
|
type: Directive,
|
|
53
|
-
args: [{ selector:
|
|
53
|
+
args: [{ selector: "[querySwitchGroup]" }]
|
|
54
54
|
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
|
|
55
55
|
|
|
56
56
|
class QueryButtonGroupDirective {
|
|
@@ -62,12 +62,14 @@ QueryButtonGroupDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0"
|
|
|
62
62
|
QueryButtonGroupDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.0", type: QueryButtonGroupDirective, selector: "[queryButtonGroup]", ngImport: i0 });
|
|
63
63
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: QueryButtonGroupDirective, decorators: [{
|
|
64
64
|
type: Directive,
|
|
65
|
-
args: [{ selector:
|
|
65
|
+
args: [{ selector: "[queryButtonGroup]" }]
|
|
66
66
|
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
|
|
67
67
|
|
|
68
68
|
class QueryInputDirective {
|
|
69
69
|
/** Unique name for query input type. */
|
|
70
|
-
get queryInputType() {
|
|
70
|
+
get queryInputType() {
|
|
71
|
+
return this._type;
|
|
72
|
+
}
|
|
71
73
|
set queryInputType(value) {
|
|
72
74
|
// If the directive is set without a type (updated programatically), then this setter will
|
|
73
75
|
// trigger with an empty string and should not overwrite the programatically set value.
|
|
@@ -84,7 +86,7 @@ QueryInputDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", vers
|
|
|
84
86
|
QueryInputDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.0", type: QueryInputDirective, selector: "[queryInput]", inputs: { queryInputType: "queryInputType" }, ngImport: i0 });
|
|
85
87
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: QueryInputDirective, decorators: [{
|
|
86
88
|
type: Directive,
|
|
87
|
-
args: [{ selector:
|
|
89
|
+
args: [{ selector: "[queryInput]" }]
|
|
88
90
|
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; }, propDecorators: { queryInputType: [{
|
|
89
91
|
type: Input
|
|
90
92
|
}] } });
|
|
@@ -98,7 +100,7 @@ QueryRemoveButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0
|
|
|
98
100
|
QueryRemoveButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.0", type: QueryRemoveButtonDirective, selector: "[queryRemoveButton]", ngImport: i0 });
|
|
99
101
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: QueryRemoveButtonDirective, decorators: [{
|
|
100
102
|
type: Directive,
|
|
101
|
-
args: [{ selector:
|
|
103
|
+
args: [{ selector: "[queryRemoveButton]" }]
|
|
102
104
|
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
|
|
103
105
|
|
|
104
106
|
class QueryEmptyWarningDirective {
|
|
@@ -110,7 +112,7 @@ QueryEmptyWarningDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0
|
|
|
110
112
|
QueryEmptyWarningDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.0", type: QueryEmptyWarningDirective, selector: "[queryEmptyWarning]", ngImport: i0 });
|
|
111
113
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: QueryEmptyWarningDirective, decorators: [{
|
|
112
114
|
type: Directive,
|
|
113
|
-
args: [{ selector:
|
|
115
|
+
args: [{ selector: "[queryEmptyWarning]" }]
|
|
114
116
|
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
|
|
115
117
|
|
|
116
118
|
class QueryArrowIconDirective {
|
|
@@ -122,7 +124,7 @@ QueryArrowIconDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0",
|
|
|
122
124
|
QueryArrowIconDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.0", type: QueryArrowIconDirective, selector: "[queryArrowIcon]", ngImport: i0 });
|
|
123
125
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: QueryArrowIconDirective, decorators: [{
|
|
124
126
|
type: Directive,
|
|
125
|
-
args: [{ selector:
|
|
127
|
+
args: [{ selector: "[queryArrowIcon]" }]
|
|
126
128
|
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
|
|
127
129
|
|
|
128
130
|
const CONTROL_VALUE_ACCESSOR = {
|
|
@@ -136,65 +138,69 @@ const VALIDATOR = {
|
|
|
136
138
|
multi: true
|
|
137
139
|
};
|
|
138
140
|
class QueryBuilderComponent {
|
|
139
|
-
get
|
|
141
|
+
get condition() {
|
|
140
142
|
return this.data?.condition;
|
|
141
143
|
}
|
|
142
144
|
constructor(changeDetectorRef) {
|
|
143
145
|
this.changeDetectorRef = changeDetectorRef;
|
|
144
146
|
this.defaultClassNames = {
|
|
145
|
-
arrowIconButton:
|
|
146
|
-
arrowIcon:
|
|
147
|
-
removeIcon:
|
|
148
|
-
addIcon:
|
|
149
|
-
button:
|
|
150
|
-
buttonGroup:
|
|
151
|
-
removeButton:
|
|
152
|
-
switchGroup:
|
|
153
|
-
switchLabel:
|
|
154
|
-
switchRadio:
|
|
155
|
-
rightAlign:
|
|
156
|
-
transition:
|
|
157
|
-
collapsed:
|
|
158
|
-
treeContainer:
|
|
159
|
-
tree:
|
|
160
|
-
row:
|
|
161
|
-
connector:
|
|
162
|
-
rule:
|
|
163
|
-
ruleSet:
|
|
164
|
-
invalidRuleSet:
|
|
165
|
-
emptyWarning:
|
|
166
|
-
fieldControl:
|
|
167
|
-
fieldControlSize:
|
|
168
|
-
entityControl:
|
|
169
|
-
entityControlSize:
|
|
170
|
-
operatorControl:
|
|
171
|
-
operatorControlSize:
|
|
172
|
-
inputControl:
|
|
173
|
-
inputControlSize:
|
|
147
|
+
arrowIconButton: "q-arrow-icon-button",
|
|
148
|
+
arrowIcon: "q-icon q-arrow-icon",
|
|
149
|
+
removeIcon: "q-icon q-remove-icon",
|
|
150
|
+
addIcon: "q-icon q-add-icon",
|
|
151
|
+
button: "q-button",
|
|
152
|
+
buttonGroup: "q-button-group",
|
|
153
|
+
removeButton: "q-remove-button",
|
|
154
|
+
switchGroup: "q-switch-group",
|
|
155
|
+
switchLabel: "q-switch-label",
|
|
156
|
+
switchRadio: "q-switch-radio",
|
|
157
|
+
rightAlign: "q-right-align",
|
|
158
|
+
transition: "q-transition",
|
|
159
|
+
collapsed: "q-collapsed",
|
|
160
|
+
treeContainer: "q-tree-container",
|
|
161
|
+
tree: "q-tree",
|
|
162
|
+
row: "q-row",
|
|
163
|
+
connector: "q-connector",
|
|
164
|
+
rule: "q-rule",
|
|
165
|
+
ruleSet: "q-ruleset",
|
|
166
|
+
invalidRuleSet: "q-invalid-ruleset",
|
|
167
|
+
emptyWarning: "q-empty-warning",
|
|
168
|
+
fieldControl: "q-field-control",
|
|
169
|
+
fieldControlSize: "q-control-size",
|
|
170
|
+
entityControl: "q-entity-control",
|
|
171
|
+
entityControlSize: "q-control-size",
|
|
172
|
+
operatorControl: "q-operator-control",
|
|
173
|
+
operatorControlSize: "q-control-size",
|
|
174
|
+
inputControl: "q-input-control",
|
|
175
|
+
inputControlSize: "q-control-size"
|
|
174
176
|
};
|
|
175
177
|
this.defaultOperatorMap = {
|
|
176
|
-
string: [
|
|
177
|
-
number: [
|
|
178
|
-
time: [
|
|
179
|
-
date: [
|
|
180
|
-
category: [
|
|
181
|
-
boolean: [
|
|
178
|
+
string: ["=", "!=", "contains", "like"],
|
|
179
|
+
number: ["=", "!=", ">", ">=", "<", "<="],
|
|
180
|
+
time: ["=", "!=", ">", ">=", "<", "<="],
|
|
181
|
+
date: ["=", "!=", ">", ">=", "<", "<="],
|
|
182
|
+
category: ["=", "!=", "in", "not in"],
|
|
183
|
+
boolean: ["="]
|
|
182
184
|
};
|
|
183
185
|
this.disabled = false;
|
|
184
|
-
this.data = { condition:
|
|
186
|
+
this.data = { condition: "and", rules: [] };
|
|
185
187
|
this.allowRuleset = true;
|
|
186
188
|
this.allowCollapse = false;
|
|
187
|
-
this.emptyMessage =
|
|
189
|
+
this.emptyMessage = "A ruleset cannot be empty. Please add a rule or remove it all together.";
|
|
188
190
|
this.classNames = {};
|
|
189
191
|
this.operatorMap = {};
|
|
190
192
|
this.config = { fields: {} };
|
|
191
193
|
this.persistValueOnFieldChange = false;
|
|
192
194
|
this.defaultTemplateTypes = [
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
195
|
+
"string",
|
|
196
|
+
"number",
|
|
197
|
+
"time",
|
|
198
|
+
"date",
|
|
199
|
+
"category",
|
|
200
|
+
"boolean",
|
|
201
|
+
"multiselect"
|
|
197
202
|
];
|
|
203
|
+
this.defaultPersistValueTypes = ["string", "number", "time", "date", "boolean"];
|
|
198
204
|
this.defaultEmptyList = [];
|
|
199
205
|
this.operatorsCache = {};
|
|
200
206
|
this.inputContextCache = new Map();
|
|
@@ -210,12 +216,11 @@ class QueryBuilderComponent {
|
|
|
210
216
|
this.filterFields = [];
|
|
211
217
|
this.entities = [];
|
|
212
218
|
}
|
|
213
|
-
// ----------OnInit Implementation----------
|
|
214
219
|
// ----------OnChanges Implementation----------
|
|
215
220
|
ngOnChanges(changes) {
|
|
216
221
|
const config = this.config;
|
|
217
222
|
const type = typeof config;
|
|
218
|
-
if (type ===
|
|
223
|
+
if (type === "object") {
|
|
219
224
|
this.fields = Object.keys(config.fields).map((value) => {
|
|
220
225
|
const field = config.fields[value];
|
|
221
226
|
field.value = field.value || value;
|
|
@@ -243,7 +248,7 @@ class QueryBuilderComponent {
|
|
|
243
248
|
const ruleErrorStore = [];
|
|
244
249
|
let hasErrors = false;
|
|
245
250
|
if (!this.config.allowEmptyRulesets && this.checkEmptyRuleInRuleset(this.data)) {
|
|
246
|
-
errors.empty =
|
|
251
|
+
errors.empty = "Empty rulesets are not allowed.";
|
|
247
252
|
hasErrors = true;
|
|
248
253
|
}
|
|
249
254
|
this.validateRulesInRuleset(this.data, ruleErrorStore);
|
|
@@ -259,7 +264,7 @@ class QueryBuilderComponent {
|
|
|
259
264
|
}
|
|
260
265
|
set value(value) {
|
|
261
266
|
// When component is initialized without a formControl, null is passed to value
|
|
262
|
-
this.data = value || { condition:
|
|
267
|
+
this.data = value || { condition: "and", rules: [] };
|
|
263
268
|
this.handleDataChange();
|
|
264
269
|
}
|
|
265
270
|
writeValue(obj) {
|
|
@@ -308,13 +313,16 @@ class QueryBuilderComponent {
|
|
|
308
313
|
operators = fieldObject.operators;
|
|
309
314
|
}
|
|
310
315
|
else if (type) {
|
|
311
|
-
operators =
|
|
316
|
+
operators =
|
|
317
|
+
(this.operatorMap && this.operatorMap[type]) ||
|
|
318
|
+
this.defaultOperatorMap[type] ||
|
|
319
|
+
this.defaultEmptyList;
|
|
312
320
|
if (operators.length === 0) {
|
|
313
321
|
console.warn(`No operators found for field '${field}' with type ${fieldObject.type}. ` +
|
|
314
322
|
`Please define an 'operators' property on the field or use the 'operatorMap' binding to fix this.`);
|
|
315
323
|
}
|
|
316
324
|
if (fieldObject.nullable) {
|
|
317
|
-
operators = operators.concat([
|
|
325
|
+
operators = operators.concat(["is null", "is not null"]);
|
|
318
326
|
}
|
|
319
327
|
}
|
|
320
328
|
else {
|
|
@@ -325,7 +333,7 @@ class QueryBuilderComponent {
|
|
|
325
333
|
return operators;
|
|
326
334
|
}
|
|
327
335
|
getFields(entity) {
|
|
328
|
-
if (this.entities
|
|
336
|
+
if (this.entities?.length && entity) {
|
|
329
337
|
return this.fields.filter((field) => {
|
|
330
338
|
return field && field.entity === entity;
|
|
331
339
|
});
|
|
@@ -343,12 +351,12 @@ class QueryBuilderComponent {
|
|
|
343
351
|
}
|
|
344
352
|
const type = this.config.fields[field].type;
|
|
345
353
|
switch (operator) {
|
|
346
|
-
case
|
|
347
|
-
case
|
|
354
|
+
case "is null":
|
|
355
|
+
case "is not null":
|
|
348
356
|
return null; // No displayed component
|
|
349
|
-
case
|
|
350
|
-
case
|
|
351
|
-
return type ===
|
|
357
|
+
case "in":
|
|
358
|
+
case "not in":
|
|
359
|
+
return type === "category" || type === "boolean" ? "multiselect" : type;
|
|
352
360
|
default:
|
|
353
361
|
return type;
|
|
354
362
|
}
|
|
@@ -362,8 +370,10 @@ class QueryBuilderComponent {
|
|
|
362
370
|
getClassNames(...args) {
|
|
363
371
|
const clsLookup = this.classNames ? this.classNames : this.defaultClassNames;
|
|
364
372
|
const defaultClassNames = this.defaultClassNames;
|
|
365
|
-
const classNames = args
|
|
366
|
-
|
|
373
|
+
const classNames = args
|
|
374
|
+
.map((id) => clsLookup[id] || defaultClassNames[id])
|
|
375
|
+
.filter((c) => !!c);
|
|
376
|
+
return classNames.length ? classNames.join(" ") : [];
|
|
367
377
|
}
|
|
368
378
|
getDefaultField(entity) {
|
|
369
379
|
if (!entity) {
|
|
@@ -412,12 +422,14 @@ class QueryBuilderComponent {
|
|
|
412
422
|
}
|
|
413
423
|
else {
|
|
414
424
|
const field = this.fields[0];
|
|
415
|
-
parent.rules = parent.rules.concat([
|
|
425
|
+
parent.rules = parent.rules.concat([
|
|
426
|
+
{
|
|
416
427
|
field: field.value,
|
|
417
428
|
operator: this.getDefaultOperator(field),
|
|
418
429
|
value: this.getDefaultValue(field.defaultValue),
|
|
419
430
|
entity: field.entity
|
|
420
|
-
}
|
|
431
|
+
}
|
|
432
|
+
]);
|
|
421
433
|
}
|
|
422
434
|
this.handleTouched();
|
|
423
435
|
this.handleDataChange();
|
|
@@ -450,7 +462,7 @@ class QueryBuilderComponent {
|
|
|
450
462
|
this.config.addRuleSet(parent);
|
|
451
463
|
}
|
|
452
464
|
else {
|
|
453
|
-
parent.rules = parent.rules.concat([{ condition:
|
|
465
|
+
parent.rules = parent.rules.concat([{ condition: "and", rules: [] }]);
|
|
454
466
|
}
|
|
455
467
|
this.handleTouched();
|
|
456
468
|
this.handleDataChange();
|
|
@@ -482,7 +494,7 @@ class QueryBuilderComponent {
|
|
|
482
494
|
computedTreeContainerHeight() {
|
|
483
495
|
const nativeElement = this.treeContainer.nativeElement;
|
|
484
496
|
if (nativeElement && nativeElement.firstElementChild) {
|
|
485
|
-
nativeElement.style.maxHeight =
|
|
497
|
+
nativeElement.style.maxHeight = nativeElement.firstElementChild.clientHeight + 8 + "px";
|
|
486
498
|
}
|
|
487
499
|
}
|
|
488
500
|
changeCondition(value) {
|
|
@@ -508,7 +520,7 @@ class QueryBuilderComponent {
|
|
|
508
520
|
}
|
|
509
521
|
coerceValueForOperator(operator, value, rule) {
|
|
510
522
|
const inputType = this.getInputType(rule.field, operator);
|
|
511
|
-
if (inputType ===
|
|
523
|
+
if (inputType === "multiselect" && !Array.isArray(value)) {
|
|
512
524
|
return [value];
|
|
513
525
|
}
|
|
514
526
|
return value;
|
|
@@ -571,7 +583,7 @@ class QueryBuilderComponent {
|
|
|
571
583
|
}
|
|
572
584
|
getDefaultValue(defaultValue) {
|
|
573
585
|
switch (typeof defaultValue) {
|
|
574
|
-
case
|
|
586
|
+
case "function":
|
|
575
587
|
return defaultValue();
|
|
576
588
|
default:
|
|
577
589
|
return defaultValue;
|
|
@@ -610,10 +622,10 @@ class QueryBuilderComponent {
|
|
|
610
622
|
return t ? t.template : null;
|
|
611
623
|
}
|
|
612
624
|
getQueryItemClassName(local) {
|
|
613
|
-
let cls = this.getClassNames(
|
|
614
|
-
cls +=
|
|
625
|
+
let cls = this.getClassNames("row", "connector", "transition");
|
|
626
|
+
cls += " " + this.getClassNames(local.ruleset ? "ruleSet" : "rule");
|
|
615
627
|
if (local.invalid) {
|
|
616
|
-
cls +=
|
|
628
|
+
cls += " " + this.getClassNames("invalidRuleSet");
|
|
617
629
|
}
|
|
618
630
|
return cls;
|
|
619
631
|
}
|
|
@@ -713,8 +725,8 @@ class QueryBuilderComponent {
|
|
|
713
725
|
if (currentField == null || nextField == null) {
|
|
714
726
|
return false;
|
|
715
727
|
}
|
|
716
|
-
return currentField.type === nextField.type
|
|
717
|
-
|
|
728
|
+
return (currentField.type === nextField.type &&
|
|
729
|
+
this.defaultPersistValueTypes.indexOf(currentField.type) !== -1);
|
|
718
730
|
};
|
|
719
731
|
if (this.persistValueOnFieldChange && canKeepValue()) {
|
|
720
732
|
return currentValue;
|
|
@@ -776,17 +788,17 @@ class QueryBuilderComponent {
|
|
|
776
788
|
}
|
|
777
789
|
}
|
|
778
790
|
QueryBuilderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: QueryBuilderComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
779
|
-
QueryBuilderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: QueryBuilderComponent, selector: "query-builder", inputs: { disabled: "disabled", data: "data", allowRuleset: "allowRuleset", allowCollapse: "allowCollapse", emptyMessage: "emptyMessage", classNames: "classNames", operatorMap: "operatorMap", parentValue: "parentValue", config: "config", parentArrowIconTemplate: "parentArrowIconTemplate", parentInputTemplates: "parentInputTemplates", parentOperatorTemplate: "parentOperatorTemplate", parentFieldTemplate: "parentFieldTemplate", parentEntityTemplate: "parentEntityTemplate", parentSwitchGroupTemplate: "parentSwitchGroupTemplate", parentButtonGroupTemplate: "parentButtonGroupTemplate", parentRemoveButtonTemplate: "parentRemoveButtonTemplate", parentEmptyWarningTemplate: "parentEmptyWarningTemplate", parentChangeCallback: "parentChangeCallback", parentTouchedCallback: "parentTouchedCallback", persistValueOnFieldChange: "persistValueOnFieldChange", value: "value" }, host: { properties: { "attr.query-builder-condition": "this.condintion" } }, providers: [CONTROL_VALUE_ACCESSOR, VALIDATOR], queries: [{ propertyName: "buttonGroupTemplate", first: true, predicate: QueryButtonGroupDirective, descendants: true }, { propertyName: "switchGroupTemplate", first: true, predicate: QuerySwitchGroupDirective, descendants: true }, { propertyName: "fieldTemplate", first: true, predicate: QueryFieldDirective, descendants: true }, { propertyName: "entityTemplate", first: true, predicate: QueryEntityDirective, descendants: true }, { propertyName: "operatorTemplate", first: true, predicate: QueryOperatorDirective, descendants: true }, { propertyName: "removeButtonTemplate", first: true, predicate: QueryRemoveButtonDirective, descendants: true }, { propertyName: "emptyWarningTemplate", first: true, predicate: QueryEmptyWarningDirective, descendants: true }, { propertyName: "arrowIconTemplate", first: true, predicate: QueryArrowIconDirective, descendants: true }, { propertyName: "inputTemplates", predicate: QueryInputDirective, descendants: true }], viewQueries: [{ propertyName: "treeContainer", first: true, predicate: ["treeContainer"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div [ngClass]=\"getClassNames('switchRow')\">\n <ng-template #defaultArrowIcon>\n <i [ngClass]=\"getClassNames('arrowIcon')\"></i>\n </ng-template>\n\n <a *ngIf=\"allowCollapse\" (click)=\"toggleCollapse()\" [ngClass]=\"getClassNames('arrowIconButton', data.collapsed ? 'collapsed' : '')\">\n <ng-container *ngIf=\"getArrowIconTemplate() as template; else defaultArrowIcon\">\n <ng-container *ngTemplateOutlet=\"template; context: getArrowIconContext()\"></ng-container>\n </ng-container>\n </a>\n\n <ng-container *ngIf=\"getButtonGroupTemplate() as template; else defaultButtonGroup\">\n <div [ngClass]=\"getClassNames('buttonGroup', 'rightAlign')\">\n <ng-container *ngTemplateOutlet=\"template; context: getButtonGroupContext()\"></ng-container>\n </div>\n </ng-container>\n\n <ng-template #defaultButtonGroup>\n <div [ngClass]=\"getClassNames('buttonGroup', 'rightAlign')\">\n <button type=\"button\" (click)=\"addRule()\" [ngClass]=\"getClassNames('button')\" [disabled]=disabled>\n <i [ngClass]=\"getClassNames('addIcon')\"></i> Rule\n </button>\n <button type=\"button\" (click)=\"addRuleSet()\" [ngClass]=\"getClassNames('button')\" *ngIf=\"allowRuleset\" [disabled]=disabled>\n <i [ngClass]=\"getClassNames('addIcon')\"></i> Ruleset\n </button>\n <ng-container *ngIf=\"!!parentValue && allowRuleset\">\n <button type=\"button\" (click)=\"removeRuleSet()\" [ngClass]=\"getClassNames('button', 'removeButton')\" [disabled]=disabled>\n <i [ngClass]=\"getClassNames('removeIcon')\"></i>\n </button>\n </ng-container>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"getSwitchGroupTemplate() as template; else defaultSwitchGroup\">\n <ng-container *ngTemplateOutlet=\"template; context: getSwitchGroupContext()\"></ng-container>\n </ng-container>\n\n <ng-template #defaultSwitchGroup>\n <div [ngClass]=\"getClassNames('switchGroup', 'transition')\" *ngIf=\"data\">\n <div [ngClass]=\"getClassNames('switchControl')\">\n <input type=\"radio\" [ngClass]=\"getClassNames('switchRadio')\" [(ngModel)]=\"data.condition\" [disabled]=disabled\n value=\"and\" #andOption />\n <label (click)=\"changeCondition(andOption.value)\" [ngClass]=\"getClassNames('switchLabel')\">AND</label>\n </div>\n <div [ngClass]=\"getClassNames('switchControl')\">\n <input type=\"radio\" [ngClass]=\"getClassNames('switchRadio')\" [(ngModel)]=\"data.condition\" [disabled]=disabled\n value=\"or\" #orOption />\n <label (click)=\"changeCondition(orOption.value)\" [ngClass]=\"getClassNames('switchLabel')\">OR</label>\n </div>\n </div>\n </ng-template>\n</div>\n\n<div #treeContainer (transitionend)=\"transitionEnd($event)\" [ngClass]=\"getClassNames('treeContainer', data.collapsed ? 'collapsed' : '')\">\n <ul [ngClass]=\"getClassNames('tree')\" *ngIf=\"data && data.rules\">\n <ng-container *ngFor=\"let rule of data.rules;let i=index\">\n\n <ng-container *ngIf=\"{ruleset: !!rule.rules, invalid: !config.allowEmptyRulesets && rule.rules && rule.rules.length === 0} as local\">\n <li [ngClass]=\"getQueryItemClassName(local)\">\n <ng-container *ngIf=\"!local.ruleset\">\n\n <ng-container *ngIf=\"getRemoveButtonTemplate() as template; else defaultRemoveButton\">\n <div [ngClass]=\"getClassNames('buttonGroup', 'rightAlign')\">\n <ng-container *ngTemplateOutlet=\"template; context: getRemoveButtonContext(rule)\"></ng-container>\n </div>\n </ng-container>\n\n <ng-template #defaultRemoveButton>\n <div [ngClass]=\"getClassNames('removeButtonSize', 'rightAlign')\">\n <button type=\"button\" [ngClass]=\"getClassNames('button', 'removeButton')\" (click)=\"removeRule(rule, data)\" [disabled]=disabled>\n <i [ngClass]=\"getClassNames('removeIcon')\"></i>\n </button>\n </div>\n </ng-template>\n\n <div *ngIf=\"entities?.length\" class=\"q-inline-block-display\">\n <ng-container *ngIf=\"getEntityTemplate() as template; else defaultEntity\">\n <ng-container *ngTemplateOutlet=\"template; context: getEntityContext(rule)\"></ng-container>\n </ng-container>\n </div>\n\n <ng-template #defaultEntity>\n <div [ngClass]=\"getClassNames('entityControlSize')\">\n <select [ngClass]=\"getClassNames('entityControl')\" [(ngModel)]=\"rule.entity\" (ngModelChange)=\"changeEntity($event, rule,i,data)\"\n [disabled]=\"disabled\">\n <option *ngFor=\"let entity of entities\" [ngValue]=\"entity.value\">\n {{entity.name}}\n </option>\n </select>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"getFieldTemplate() as template; else defaultField\">\n <ng-container *ngTemplateOutlet=\"template; context: getFieldContext(rule)\"></ng-container>\n </ng-container>\n\n <ng-template #defaultField>\n <div [ngClass]=\"getClassNames('fieldControlSize')\">\n <select [ngClass]=\"getClassNames('fieldControl')\" [(ngModel)]=\"rule.field\" (ngModelChange)=\"changeField($event, rule)\"\n [disabled]=\"disabled\">\n <option *ngFor=\"let field of getFields(rule.entity)\" [ngValue]=\"field.value\">\n {{field.name}}\n </option>\n </select>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"getOperatorTemplate() as template; else defaultOperator\">\n <ng-container *ngTemplateOutlet=\"template; context: getOperatorContext(rule)\"></ng-container>\n </ng-container>\n\n <ng-template #defaultOperator>\n <div [ngClass]=\"getClassNames('operatorControlSize')\">\n <select [ngClass]=\"getClassNames('operatorControl')\" [(ngModel)]=\"rule.operator\" (ngModelChange)=\"changeOperator(rule)\"\n [disabled]=\"disabled\">\n <option *ngFor=\"let operator of getOperators(rule.field)\" [ngValue]=\"operator\">\n {{operator}}\n </option>\n </select>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"findTemplateForRule(rule) as template; else defaultInput\">\n <ng-container *ngTemplateOutlet=\"template; context: getInputContext(rule)\"></ng-container>\n </ng-container>\n\n <ng-template #defaultInput>\n <div [ngClass]=\"getClassNames('inputControlSize')\" [ngSwitch]=\"getInputType(rule.field, rule.operator)\">\n <input [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'string'\" type=\"text\">\n <input [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'number'\" type=\"number\">\n <input [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'date'\" type=\"date\">\n <input [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'time'\" type=\"time\">\n <select [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'category'\">\n <option *ngFor=\"let opt of getOptions(rule.field)\" [ngValue]=\"opt.value\">\n {{opt.name}}\n </option>\n </select>\n <ng-container *ngSwitchCase=\"'multiselect'\">\n <select [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" multiple>\n <option *ngFor=\"let opt of getOptions(rule.field)\" [ngValue]=\"opt.value\">\n {{opt.name}}\n </option>\n </select>\n </ng-container>\n <input [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'boolean'\" type=\"checkbox\">\n </div>\n </ng-template>\n\n </ng-container>\n <query-builder *ngIf=\"local.ruleset\" [data]=\"rule\" [disabled]=\"disabled\" [parentTouchedCallback]=\"parentTouchedCallback || onTouchedCallback\"\n [parentChangeCallback]=\"parentChangeCallback || onChangeCallback\" [parentInputTemplates]=\"parentInputTemplates || inputTemplates\"\n [parentOperatorTemplate]=\"parentOperatorTemplate || operatorTemplate\" [parentFieldTemplate]=\"parentFieldTemplate || fieldTemplate\"\n [parentEntityTemplate]=\"parentEntityTemplate || entityTemplate\" [parentSwitchGroupTemplate]=\"parentSwitchGroupTemplate || switchGroupTemplate\"\n [parentButtonGroupTemplate]=\"parentButtonGroupTemplate || buttonGroupTemplate\" [parentRemoveButtonTemplate]=\"parentRemoveButtonTemplate || removeButtonTemplate\"\n [parentEmptyWarningTemplate]=\"parentEmptyWarningTemplate || emptyWarningTemplate\" [parentArrowIconTemplate]=\"parentArrowIconTemplate || arrowIconTemplate\"\n [parentValue]=\"data\" [classNames]=\"classNames\" [config]=\"config\" [allowRuleset]=\"allowRuleset\"\n [allowCollapse]=\"allowCollapse\" [emptyMessage]=\"emptyMessage\" [operatorMap]=\"operatorMap\">\n </query-builder>\n\n <ng-container *ngIf=\"getEmptyWarningTemplate() as template; else defaultEmptyWarning\">\n <ng-container *ngIf=\"local.invalid\">\n <ng-container *ngTemplateOutlet=\"template; context: getEmptyWarningContext()\"></ng-container>\n </ng-container>\n </ng-container>\n\n <ng-template #defaultEmptyWarning>\n <p [ngClass]=\"getClassNames('emptyWarning')\" *ngIf=\"local.invalid\">\n {{emptyMessage}}\n </p>\n </ng-template>\n </li>\n </ng-container>\n </ng-container>\n </ul>\n</div>\n", styles: ["@charset \"UTF-8\";:host{display:block;width:100%}:host .q-icon{font-style:normal;font-size:12px}:host .q-remove-icon:before{content:\"\\274c\"}:host .q-arrow-icon-button{float:left;margin:4px 6px 4px 0;transform:rotate(90deg);transition:linear .25s transform;cursor:pointer}:host .q-arrow-icon-button.q-collapsed{transform:rotate(0)}:host .q-arrow-icon:before{content:\"\\25b6\"}:host .q-add-icon{color:#555}:host .q-add-icon:before{content:\"\\2795\"}:host .q-remove-button{color:#b3415d;width:31px}:host .q-switch-group,:host .q-button-group{font-family:Lucida Grande,Tahoma,Verdana,sans-serif;overflow:hidden}:host .q-right-align{float:right}:host .q-button{margin-left:8px;padding:0 8px;background-color:#fff}:host .q-button:disabled{display:none}:host .q-control-size{display:inline-block;vertical-align:top;padding-right:10px}:host .q-input-control,:host .q-operator-control,:host .q-field-control,:host .q-entity-control{display:inline-block;padding:5px 8px;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;box-sizing:border-box;width:auto;min-width:180px}:host .q-input-control:disabled,:host .q-operator-control:disabled,:host .q-field-control:disabled,:host .q-entity-control:disabled{border-color:transparent}:host .q-operator-control,:host .q-field-control,:host .q-entity-control,:host .q-input-control:not([type=checkbox]){min-height:32px;-webkit-appearance:none}:host .q-switch-label,:host .q-button{float:left;margin-bottom:0;font-size:14px;line-height:30px;font-weight:400;text-align:center;text-shadow:none;border:1px solid rgba(0,0,0,.2);box-sizing:border-box}:host .q-switch-label:hover,:host .q-button:hover{cursor:pointer;background-color:#f0f0f0}:host .q-switch-label{background-color:#e4e4e4;padding:0 8px}:host .q-switch-radio{position:absolute;clip:rect(0,0,0,0);height:1px;width:1px;border:0;overflow:hidden}:host .q-switch-radio:checked+.q-switch-label{border:1px solid rgb(97,158,215);background:white;color:#3176b3}:host .q-switch-radio:disabled+.q-switch-label{display:none}:host .q-switch-radio:checked:disabled+.q-switch-label{display:initial;color:initial;cursor:default;border-color:transparent}:host .q-invalid-ruleset{border:1px solid rgba(179,65,93,.5)!important;background:rgba(179,65,93,.1)!important}:host .q-empty-warning{color:#8d252e;text-align:center}:host .q-ruleset{border:1px solid #CCC}:host .q-rule{border:1px solid #CCC;background:white}:host .q-transition{transition:all .1s ease-in-out}:host .q-tree-container{width:100%;overflow:hidden;transition:ease-in .25s max-height}:host .q-tree-container.q-collapsed{max-height:0!important}:host .q-tree{list-style:none;margin:4px 0 2px}:host .q-row{padding:6px 8px;margin-top:6px}:host .q-connector{position:relative}:host .q-connector:before{top:-5px;border-width:0 0 2px 2px}:host .q-connector:after{border-width:0 0 0 2px;top:50%}:host .q-connector:before,:host .q-connector:after{content:\"\";left:-12px;border-color:#ccc;border-style:solid;width:9px;height:calc(50% + 6px);position:absolute}:host .q-connector:last-child:after{content:none}:host .q-inline-block-display{display:inline-block;vertical-align:top}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.SelectMultipleControlValueAccessor, selector: "select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: QueryBuilderComponent, selector: "query-builder", inputs: ["disabled", "data", "allowRuleset", "allowCollapse", "emptyMessage", "classNames", "operatorMap", "parentValue", "config", "parentArrowIconTemplate", "parentInputTemplates", "parentOperatorTemplate", "parentFieldTemplate", "parentEntityTemplate", "parentSwitchGroupTemplate", "parentButtonGroupTemplate", "parentRemoveButtonTemplate", "parentEmptyWarningTemplate", "parentChangeCallback", "parentTouchedCallback", "persistValueOnFieldChange", "value"] }] });
|
|
791
|
+
QueryBuilderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0", type: QueryBuilderComponent, selector: "query-builder", inputs: { disabled: "disabled", data: "data", allowRuleset: "allowRuleset", allowCollapse: "allowCollapse", emptyMessage: "emptyMessage", classNames: "classNames", operatorMap: "operatorMap", parentValue: "parentValue", config: "config", parentArrowIconTemplate: "parentArrowIconTemplate", parentInputTemplates: "parentInputTemplates", parentOperatorTemplate: "parentOperatorTemplate", parentFieldTemplate: "parentFieldTemplate", parentEntityTemplate: "parentEntityTemplate", parentSwitchGroupTemplate: "parentSwitchGroupTemplate", parentButtonGroupTemplate: "parentButtonGroupTemplate", parentRemoveButtonTemplate: "parentRemoveButtonTemplate", parentEmptyWarningTemplate: "parentEmptyWarningTemplate", parentChangeCallback: "parentChangeCallback", parentTouchedCallback: "parentTouchedCallback", persistValueOnFieldChange: "persistValueOnFieldChange", value: "value" }, host: { properties: { "attr.query-builder-condition": "this.condition" } }, providers: [CONTROL_VALUE_ACCESSOR, VALIDATOR], queries: [{ propertyName: "buttonGroupTemplate", first: true, predicate: QueryButtonGroupDirective, descendants: true }, { propertyName: "switchGroupTemplate", first: true, predicate: QuerySwitchGroupDirective, descendants: true }, { propertyName: "fieldTemplate", first: true, predicate: QueryFieldDirective, descendants: true }, { propertyName: "entityTemplate", first: true, predicate: QueryEntityDirective, descendants: true }, { propertyName: "operatorTemplate", first: true, predicate: QueryOperatorDirective, descendants: true }, { propertyName: "removeButtonTemplate", first: true, predicate: QueryRemoveButtonDirective, descendants: true }, { propertyName: "emptyWarningTemplate", first: true, predicate: QueryEmptyWarningDirective, descendants: true }, { propertyName: "arrowIconTemplate", first: true, predicate: QueryArrowIconDirective, descendants: true }, { propertyName: "inputTemplates", predicate: QueryInputDirective, descendants: true }], viewQueries: [{ propertyName: "treeContainer", first: true, predicate: ["treeContainer"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div [ngClass]=\"getClassNames('switchRow')\">\n <ng-template #defaultArrowIcon>\n <i [ngClass]=\"getClassNames('arrowIcon')\"></i>\n </ng-template>\n\n <a\n *ngIf=\"allowCollapse\"\n (click)=\"toggleCollapse()\"\n [ngClass]=\"getClassNames('arrowIconButton', data.collapsed ? 'collapsed' : '')\"\n >\n <ng-container *ngIf=\"getArrowIconTemplate() as template; else defaultArrowIcon\">\n <ng-container *ngTemplateOutlet=\"template; context: getArrowIconContext()\"></ng-container>\n </ng-container>\n </a>\n\n <ng-container *ngIf=\"getButtonGroupTemplate() as template; else defaultButtonGroup\">\n <div [ngClass]=\"getClassNames('buttonGroup', 'rightAlign')\">\n <ng-container *ngTemplateOutlet=\"template; context: getButtonGroupContext()\"></ng-container>\n </div>\n </ng-container>\n\n <ng-template #defaultButtonGroup>\n <div [ngClass]=\"getClassNames('buttonGroup', 'rightAlign')\">\n <button\n type=\"button\"\n (click)=\"addRule()\"\n [ngClass]=\"getClassNames('button')\"\n [disabled]=\"disabled\"\n >\n <i [ngClass]=\"getClassNames('addIcon')\"></i> Rule\n </button>\n <button\n type=\"button\"\n (click)=\"addRuleSet()\"\n [ngClass]=\"getClassNames('button')\"\n *ngIf=\"allowRuleset\"\n [disabled]=\"disabled\"\n >\n <i [ngClass]=\"getClassNames('addIcon')\"></i> Ruleset\n </button>\n <ng-container *ngIf=\"!!parentValue && allowRuleset\">\n <button\n type=\"button\"\n (click)=\"removeRuleSet()\"\n [ngClass]=\"getClassNames('button', 'removeButton')\"\n [disabled]=\"disabled\"\n >\n <i [ngClass]=\"getClassNames('removeIcon')\"></i>\n </button>\n </ng-container>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"getSwitchGroupTemplate() as template; else defaultSwitchGroup\">\n <ng-container *ngTemplateOutlet=\"template; context: getSwitchGroupContext()\"></ng-container>\n </ng-container>\n\n <ng-template #defaultSwitchGroup>\n <div [ngClass]=\"getClassNames('switchGroup', 'transition')\" *ngIf=\"data\">\n <div [ngClass]=\"getClassNames('switchControl')\">\n <input\n type=\"radio\"\n [ngClass]=\"getClassNames('switchRadio')\"\n [(ngModel)]=\"data.condition\"\n [disabled]=\"disabled\"\n value=\"and\"\n #andOption\n />\n <label (click)=\"changeCondition(andOption.value)\" [ngClass]=\"getClassNames('switchLabel')\"\n >AND</label\n >\n </div>\n <div [ngClass]=\"getClassNames('switchControl')\">\n <input\n type=\"radio\"\n [ngClass]=\"getClassNames('switchRadio')\"\n [(ngModel)]=\"data.condition\"\n [disabled]=\"disabled\"\n value=\"or\"\n #orOption\n />\n <label (click)=\"changeCondition(orOption.value)\" [ngClass]=\"getClassNames('switchLabel')\"\n >OR</label\n >\n </div>\n </div>\n </ng-template>\n</div>\n\n<div\n #treeContainer\n (transitionend)=\"transitionEnd($event)\"\n [ngClass]=\"getClassNames('treeContainer', data.collapsed ? 'collapsed' : '')\"\n>\n <ul [ngClass]=\"getClassNames('tree')\" *ngIf=\"data && data.rules\">\n <ng-container *ngFor=\"let rule of data.rules; let i = index\">\n <ng-container\n *ngIf=\"{\n ruleset: !!rule.rules,\n invalid: !config.allowEmptyRulesets && rule.rules && rule.rules.length === 0\n } as local\"\n >\n <li [ngClass]=\"getQueryItemClassName(local)\">\n <ng-container *ngIf=\"!local.ruleset\">\n <ng-container *ngIf=\"getRemoveButtonTemplate() as template; else defaultRemoveButton\">\n <div [ngClass]=\"getClassNames('buttonGroup', 'rightAlign')\">\n <ng-container\n *ngTemplateOutlet=\"template; context: getRemoveButtonContext(rule)\"\n ></ng-container>\n </div>\n </ng-container>\n\n <ng-template #defaultRemoveButton>\n <div [ngClass]=\"getClassNames('removeButtonSize', 'rightAlign')\">\n <button\n type=\"button\"\n [ngClass]=\"getClassNames('button', 'removeButton')\"\n (click)=\"removeRule(rule, data)\"\n [disabled]=\"disabled\"\n >\n <i [ngClass]=\"getClassNames('removeIcon')\"></i>\n </button>\n </div>\n </ng-template>\n\n <div *ngIf=\"entities?.length\" class=\"q-inline-block-display\">\n <ng-container *ngIf=\"getEntityTemplate() as template; else defaultEntity\">\n <ng-container\n *ngTemplateOutlet=\"template; context: getEntityContext(rule)\"\n ></ng-container>\n </ng-container>\n </div>\n\n <ng-template #defaultEntity>\n <div [ngClass]=\"getClassNames('entityControlSize')\">\n <select\n [ngClass]=\"getClassNames('entityControl')\"\n [(ngModel)]=\"rule.entity\"\n (ngModelChange)=\"changeEntity($event, rule, i, data)\"\n [disabled]=\"disabled\"\n >\n <option *ngFor=\"let entity of entities\" [ngValue]=\"entity.value\">\n {{ entity.name }}\n </option>\n </select>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"getFieldTemplate() as template; else defaultField\">\n <ng-container\n *ngTemplateOutlet=\"template; context: getFieldContext(rule)\"\n ></ng-container>\n </ng-container>\n\n <ng-template #defaultField>\n <div [ngClass]=\"getClassNames('fieldControlSize')\">\n <select\n [ngClass]=\"getClassNames('fieldControl')\"\n [(ngModel)]=\"rule.field\"\n (ngModelChange)=\"changeField($event, rule)\"\n [disabled]=\"disabled\"\n >\n <option *ngFor=\"let field of getFields(rule.entity)\" [ngValue]=\"field.value\">\n {{ field.name }}\n </option>\n </select>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"getOperatorTemplate() as template; else defaultOperator\">\n <ng-container\n *ngTemplateOutlet=\"template; context: getOperatorContext(rule)\"\n ></ng-container>\n </ng-container>\n\n <ng-template #defaultOperator>\n <div [ngClass]=\"getClassNames('operatorControlSize')\">\n <select\n [ngClass]=\"getClassNames('operatorControl')\"\n [(ngModel)]=\"rule.operator\"\n (ngModelChange)=\"changeOperator(rule)\"\n [disabled]=\"disabled\"\n >\n <option *ngFor=\"let operator of getOperators(rule.field)\" [ngValue]=\"operator\">\n {{ operator }}\n </option>\n </select>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"findTemplateForRule(rule) as template; else defaultInput\">\n <ng-container\n *ngTemplateOutlet=\"template; context: getInputContext(rule)\"\n ></ng-container>\n </ng-container>\n\n <ng-template #defaultInput>\n <div\n [ngClass]=\"getClassNames('inputControlSize')\"\n [ngSwitch]=\"getInputType(rule.field, rule.operator)\"\n >\n <input\n [ngClass]=\"getClassNames('inputControl')\"\n [(ngModel)]=\"rule.value\"\n (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\"\n *ngSwitchCase=\"'string'\"\n type=\"text\"\n />\n <input\n [ngClass]=\"getClassNames('inputControl')\"\n [(ngModel)]=\"rule.value\"\n (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\"\n *ngSwitchCase=\"'number'\"\n type=\"number\"\n />\n <input\n [ngClass]=\"getClassNames('inputControl')\"\n [(ngModel)]=\"rule.value\"\n (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\"\n *ngSwitchCase=\"'date'\"\n type=\"date\"\n />\n <input\n [ngClass]=\"getClassNames('inputControl')\"\n [(ngModel)]=\"rule.value\"\n (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\"\n *ngSwitchCase=\"'time'\"\n type=\"time\"\n />\n <select\n [ngClass]=\"getClassNames('inputControl')\"\n [(ngModel)]=\"rule.value\"\n (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\"\n *ngSwitchCase=\"'category'\"\n >\n <option *ngFor=\"let opt of getOptions(rule.field)\" [ngValue]=\"opt.value\">\n {{ opt.name }}\n </option>\n </select>\n <ng-container *ngSwitchCase=\"'multiselect'\">\n <select\n [ngClass]=\"getClassNames('inputControl')\"\n [(ngModel)]=\"rule.value\"\n (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\"\n multiple\n >\n <option *ngFor=\"let opt of getOptions(rule.field)\" [ngValue]=\"opt.value\">\n {{ opt.name }}\n </option>\n </select>\n </ng-container>\n <input\n [ngClass]=\"getClassNames('inputControl')\"\n [(ngModel)]=\"rule.value\"\n (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\"\n *ngSwitchCase=\"'boolean'\"\n type=\"checkbox\"\n />\n </div>\n </ng-template>\n </ng-container>\n <query-builder\n *ngIf=\"local.ruleset\"\n [data]=\"rule\"\n [disabled]=\"disabled\"\n [parentTouchedCallback]=\"parentTouchedCallback || onTouchedCallback\"\n [parentChangeCallback]=\"parentChangeCallback || onChangeCallback\"\n [parentInputTemplates]=\"parentInputTemplates || inputTemplates\"\n [parentOperatorTemplate]=\"parentOperatorTemplate || operatorTemplate\"\n [parentFieldTemplate]=\"parentFieldTemplate || fieldTemplate\"\n [parentEntityTemplate]=\"parentEntityTemplate || entityTemplate\"\n [parentSwitchGroupTemplate]=\"parentSwitchGroupTemplate || switchGroupTemplate\"\n [parentButtonGroupTemplate]=\"parentButtonGroupTemplate || buttonGroupTemplate\"\n [parentRemoveButtonTemplate]=\"parentRemoveButtonTemplate || removeButtonTemplate\"\n [parentEmptyWarningTemplate]=\"parentEmptyWarningTemplate || emptyWarningTemplate\"\n [parentArrowIconTemplate]=\"parentArrowIconTemplate || arrowIconTemplate\"\n [parentValue]=\"data\"\n [classNames]=\"classNames\"\n [config]=\"config\"\n [allowRuleset]=\"allowRuleset\"\n [allowCollapse]=\"allowCollapse\"\n [emptyMessage]=\"emptyMessage\"\n [operatorMap]=\"operatorMap\"\n >\n </query-builder>\n\n <ng-container *ngIf=\"getEmptyWarningTemplate() as template; else defaultEmptyWarning\">\n <ng-container *ngIf=\"local.invalid\">\n <ng-container\n *ngTemplateOutlet=\"template; context: getEmptyWarningContext()\"\n ></ng-container>\n </ng-container>\n </ng-container>\n\n <ng-template #defaultEmptyWarning>\n <p [ngClass]=\"getClassNames('emptyWarning')\" *ngIf=\"local.invalid\">\n {{ emptyMessage }}\n </p>\n </ng-template>\n </li>\n </ng-container>\n </ng-container>\n </ul>\n</div>\n", styles: ["@charset \"UTF-8\";:host{display:block;width:100%}:host .q-icon{font-style:normal;font-size:12px}:host .q-remove-icon:before{content:\"\\274c\"}:host .q-arrow-icon-button{float:left;margin:4px 6px 4px 0;transform:rotate(90deg);transition:linear .25s transform;cursor:pointer}:host .q-arrow-icon-button.q-collapsed{transform:rotate(0)}:host .q-arrow-icon:before{content:\"\\25b6\"}:host .q-add-icon{color:#555}:host .q-add-icon:before{content:\"\\2795\"}:host .q-remove-button{color:#b3415d;width:31px}:host .q-switch-group,:host .q-button-group{font-family:Lucida Grande,Tahoma,Verdana,sans-serif;overflow:hidden}:host .q-right-align{float:right}:host .q-button{margin-left:8px;padding:0 8px;background-color:#fff}:host .q-button:disabled{display:none}:host .q-control-size{display:inline-block;vertical-align:top;padding-right:10px}:host .q-input-control,:host .q-operator-control,:host .q-field-control,:host .q-entity-control{display:inline-block;padding:5px 8px;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;box-sizing:border-box;width:auto;min-width:180px}:host .q-input-control:disabled,:host .q-operator-control:disabled,:host .q-field-control:disabled,:host .q-entity-control:disabled{border-color:transparent}:host .q-operator-control,:host .q-field-control,:host .q-entity-control,:host .q-input-control:not([type=checkbox]){min-height:32px;-webkit-appearance:none}:host .q-switch-label,:host .q-button{float:left;margin-bottom:0;font-size:14px;line-height:30px;font-weight:400;text-align:center;text-shadow:none;border:1px solid rgba(0,0,0,.2);box-sizing:border-box}:host .q-switch-label:hover,:host .q-button:hover{cursor:pointer;background-color:#f0f0f0}:host .q-switch-label{background-color:#e4e4e4;padding:0 8px}:host .q-switch-radio{position:absolute;clip:rect(0,0,0,0);height:1px;width:1px;border:0;overflow:hidden}:host .q-switch-radio:checked+.q-switch-label{border:1px solid rgb(97,158,215);background:white;color:#3176b3}:host .q-switch-radio:disabled+.q-switch-label{display:none}:host .q-switch-radio:checked:disabled+.q-switch-label{display:initial;color:initial;cursor:default;border-color:transparent}:host .q-invalid-ruleset{border:1px solid rgba(179,65,93,.5)!important;background:rgba(179,65,93,.1)!important}:host .q-empty-warning{color:#8d252e;text-align:center}:host .q-ruleset{border:1px solid #ccc}:host .q-rule{border:1px solid #ccc;background:white}:host .q-transition{transition:all .1s ease-in-out}:host .q-tree-container{width:100%;overflow:hidden;transition:ease-in .25s max-height}:host .q-tree-container.q-collapsed{max-height:0!important}:host .q-tree{list-style:none;margin:4px 0 2px}:host .q-row{padding:6px 8px;margin-top:6px}:host .q-connector{position:relative}:host .q-connector:before{top:-5px;border-width:0 0 2px 2px}:host .q-connector:after{border-width:0 0 0 2px;top:50%}:host .q-connector:before,:host .q-connector:after{content:\"\";left:-12px;border-color:#ccc;border-style:solid;width:9px;height:calc(50% + 6px);position:absolute}:host .q-connector:last-child:after{content:none}:host .q-inline-block-display{display:inline-block;vertical-align:top}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.SelectMultipleControlValueAccessor, selector: "select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: QueryBuilderComponent, selector: "query-builder", inputs: ["disabled", "data", "allowRuleset", "allowCollapse", "emptyMessage", "classNames", "operatorMap", "parentValue", "config", "parentArrowIconTemplate", "parentInputTemplates", "parentOperatorTemplate", "parentFieldTemplate", "parentEntityTemplate", "parentSwitchGroupTemplate", "parentButtonGroupTemplate", "parentRemoveButtonTemplate", "parentEmptyWarningTemplate", "parentChangeCallback", "parentTouchedCallback", "persistValueOnFieldChange", "value"] }] });
|
|
780
792
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: QueryBuilderComponent, decorators: [{
|
|
781
793
|
type: Component,
|
|
782
|
-
args: [{ selector: 'query-builder', providers: [CONTROL_VALUE_ACCESSOR, VALIDATOR], template: "<div [ngClass]=\"getClassNames('switchRow')\">\n <ng-template #defaultArrowIcon>\n <i [ngClass]=\"getClassNames('arrowIcon')\"></i>\n </ng-template>\n\n <a *ngIf=\"allowCollapse\" (click)=\"toggleCollapse()\" [ngClass]=\"getClassNames('arrowIconButton', data.collapsed ? 'collapsed' : '')\">\n <ng-container *ngIf=\"getArrowIconTemplate() as template; else defaultArrowIcon\">\n <ng-container *ngTemplateOutlet=\"template; context: getArrowIconContext()\"></ng-container>\n </ng-container>\n </a>\n\n <ng-container *ngIf=\"getButtonGroupTemplate() as template; else defaultButtonGroup\">\n <div [ngClass]=\"getClassNames('buttonGroup', 'rightAlign')\">\n <ng-container *ngTemplateOutlet=\"template; context: getButtonGroupContext()\"></ng-container>\n </div>\n </ng-container>\n\n <ng-template #defaultButtonGroup>\n <div [ngClass]=\"getClassNames('buttonGroup', 'rightAlign')\">\n <button type=\"button\" (click)=\"addRule()\" [ngClass]=\"getClassNames('button')\" [disabled]=disabled>\n <i [ngClass]=\"getClassNames('addIcon')\"></i> Rule\n </button>\n <button type=\"button\" (click)=\"addRuleSet()\" [ngClass]=\"getClassNames('button')\" *ngIf=\"allowRuleset\" [disabled]=disabled>\n <i [ngClass]=\"getClassNames('addIcon')\"></i> Ruleset\n </button>\n <ng-container *ngIf=\"!!parentValue && allowRuleset\">\n <button type=\"button\" (click)=\"removeRuleSet()\" [ngClass]=\"getClassNames('button', 'removeButton')\" [disabled]=disabled>\n <i [ngClass]=\"getClassNames('removeIcon')\"></i>\n </button>\n </ng-container>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"getSwitchGroupTemplate() as template; else defaultSwitchGroup\">\n <ng-container *ngTemplateOutlet=\"template; context: getSwitchGroupContext()\"></ng-container>\n </ng-container>\n\n <ng-template #defaultSwitchGroup>\n <div [ngClass]=\"getClassNames('switchGroup', 'transition')\" *ngIf=\"data\">\n <div [ngClass]=\"getClassNames('switchControl')\">\n <input type=\"radio\" [ngClass]=\"getClassNames('switchRadio')\" [(ngModel)]=\"data.condition\" [disabled]=disabled\n value=\"and\" #andOption />\n <label (click)=\"changeCondition(andOption.value)\" [ngClass]=\"getClassNames('switchLabel')\">AND</label>\n </div>\n <div [ngClass]=\"getClassNames('switchControl')\">\n <input type=\"radio\" [ngClass]=\"getClassNames('switchRadio')\" [(ngModel)]=\"data.condition\" [disabled]=disabled\n value=\"or\" #orOption />\n <label (click)=\"changeCondition(orOption.value)\" [ngClass]=\"getClassNames('switchLabel')\">OR</label>\n </div>\n </div>\n </ng-template>\n</div>\n\n<div #treeContainer (transitionend)=\"transitionEnd($event)\" [ngClass]=\"getClassNames('treeContainer', data.collapsed ? 'collapsed' : '')\">\n <ul [ngClass]=\"getClassNames('tree')\" *ngIf=\"data && data.rules\">\n <ng-container *ngFor=\"let rule of data.rules;let i=index\">\n\n <ng-container *ngIf=\"{ruleset: !!rule.rules, invalid: !config.allowEmptyRulesets && rule.rules && rule.rules.length === 0} as local\">\n <li [ngClass]=\"getQueryItemClassName(local)\">\n <ng-container *ngIf=\"!local.ruleset\">\n\n <ng-container *ngIf=\"getRemoveButtonTemplate() as template; else defaultRemoveButton\">\n <div [ngClass]=\"getClassNames('buttonGroup', 'rightAlign')\">\n <ng-container *ngTemplateOutlet=\"template; context: getRemoveButtonContext(rule)\"></ng-container>\n </div>\n </ng-container>\n\n <ng-template #defaultRemoveButton>\n <div [ngClass]=\"getClassNames('removeButtonSize', 'rightAlign')\">\n <button type=\"button\" [ngClass]=\"getClassNames('button', 'removeButton')\" (click)=\"removeRule(rule, data)\" [disabled]=disabled>\n <i [ngClass]=\"getClassNames('removeIcon')\"></i>\n </button>\n </div>\n </ng-template>\n\n <div *ngIf=\"entities?.length\" class=\"q-inline-block-display\">\n <ng-container *ngIf=\"getEntityTemplate() as template; else defaultEntity\">\n <ng-container *ngTemplateOutlet=\"template; context: getEntityContext(rule)\"></ng-container>\n </ng-container>\n </div>\n\n <ng-template #defaultEntity>\n <div [ngClass]=\"getClassNames('entityControlSize')\">\n <select [ngClass]=\"getClassNames('entityControl')\" [(ngModel)]=\"rule.entity\" (ngModelChange)=\"changeEntity($event, rule,i,data)\"\n [disabled]=\"disabled\">\n <option *ngFor=\"let entity of entities\" [ngValue]=\"entity.value\">\n {{entity.name}}\n </option>\n </select>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"getFieldTemplate() as template; else defaultField\">\n <ng-container *ngTemplateOutlet=\"template; context: getFieldContext(rule)\"></ng-container>\n </ng-container>\n\n <ng-template #defaultField>\n <div [ngClass]=\"getClassNames('fieldControlSize')\">\n <select [ngClass]=\"getClassNames('fieldControl')\" [(ngModel)]=\"rule.field\" (ngModelChange)=\"changeField($event, rule)\"\n [disabled]=\"disabled\">\n <option *ngFor=\"let field of getFields(rule.entity)\" [ngValue]=\"field.value\">\n {{field.name}}\n </option>\n </select>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"getOperatorTemplate() as template; else defaultOperator\">\n <ng-container *ngTemplateOutlet=\"template; context: getOperatorContext(rule)\"></ng-container>\n </ng-container>\n\n <ng-template #defaultOperator>\n <div [ngClass]=\"getClassNames('operatorControlSize')\">\n <select [ngClass]=\"getClassNames('operatorControl')\" [(ngModel)]=\"rule.operator\" (ngModelChange)=\"changeOperator(rule)\"\n [disabled]=\"disabled\">\n <option *ngFor=\"let operator of getOperators(rule.field)\" [ngValue]=\"operator\">\n {{operator}}\n </option>\n </select>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"findTemplateForRule(rule) as template; else defaultInput\">\n <ng-container *ngTemplateOutlet=\"template; context: getInputContext(rule)\"></ng-container>\n </ng-container>\n\n <ng-template #defaultInput>\n <div [ngClass]=\"getClassNames('inputControlSize')\" [ngSwitch]=\"getInputType(rule.field, rule.operator)\">\n <input [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'string'\" type=\"text\">\n <input [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'number'\" type=\"number\">\n <input [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'date'\" type=\"date\">\n <input [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'time'\" type=\"time\">\n <select [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'category'\">\n <option *ngFor=\"let opt of getOptions(rule.field)\" [ngValue]=\"opt.value\">\n {{opt.name}}\n </option>\n </select>\n <ng-container *ngSwitchCase=\"'multiselect'\">\n <select [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" multiple>\n <option *ngFor=\"let opt of getOptions(rule.field)\" [ngValue]=\"opt.value\">\n {{opt.name}}\n </option>\n </select>\n </ng-container>\n <input [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'boolean'\" type=\"checkbox\">\n </div>\n </ng-template>\n\n </ng-container>\n <query-builder *ngIf=\"local.ruleset\" [data]=\"rule\" [disabled]=\"disabled\" [parentTouchedCallback]=\"parentTouchedCallback || onTouchedCallback\"\n [parentChangeCallback]=\"parentChangeCallback || onChangeCallback\" [parentInputTemplates]=\"parentInputTemplates || inputTemplates\"\n [parentOperatorTemplate]=\"parentOperatorTemplate || operatorTemplate\" [parentFieldTemplate]=\"parentFieldTemplate || fieldTemplate\"\n [parentEntityTemplate]=\"parentEntityTemplate || entityTemplate\" [parentSwitchGroupTemplate]=\"parentSwitchGroupTemplate || switchGroupTemplate\"\n [parentButtonGroupTemplate]=\"parentButtonGroupTemplate || buttonGroupTemplate\" [parentRemoveButtonTemplate]=\"parentRemoveButtonTemplate || removeButtonTemplate\"\n [parentEmptyWarningTemplate]=\"parentEmptyWarningTemplate || emptyWarningTemplate\" [parentArrowIconTemplate]=\"parentArrowIconTemplate || arrowIconTemplate\"\n [parentValue]=\"data\" [classNames]=\"classNames\" [config]=\"config\" [allowRuleset]=\"allowRuleset\"\n [allowCollapse]=\"allowCollapse\" [emptyMessage]=\"emptyMessage\" [operatorMap]=\"operatorMap\">\n </query-builder>\n\n <ng-container *ngIf=\"getEmptyWarningTemplate() as template; else defaultEmptyWarning\">\n <ng-container *ngIf=\"local.invalid\">\n <ng-container *ngTemplateOutlet=\"template; context: getEmptyWarningContext()\"></ng-container>\n </ng-container>\n </ng-container>\n\n <ng-template #defaultEmptyWarning>\n <p [ngClass]=\"getClassNames('emptyWarning')\" *ngIf=\"local.invalid\">\n {{emptyMessage}}\n </p>\n </ng-template>\n </li>\n </ng-container>\n </ng-container>\n </ul>\n</div>\n", styles: ["@charset \"UTF-8\";:host{display:block;width:100%}:host .q-icon{font-style:normal;font-size:12px}:host .q-remove-icon:before{content:\"\\274c\"}:host .q-arrow-icon-button{float:left;margin:4px 6px 4px 0;transform:rotate(90deg);transition:linear .25s transform;cursor:pointer}:host .q-arrow-icon-button.q-collapsed{transform:rotate(0)}:host .q-arrow-icon:before{content:\"\\25b6\"}:host .q-add-icon{color:#555}:host .q-add-icon:before{content:\"\\2795\"}:host .q-remove-button{color:#b3415d;width:31px}:host .q-switch-group,:host .q-button-group{font-family:Lucida Grande,Tahoma,Verdana,sans-serif;overflow:hidden}:host .q-right-align{float:right}:host .q-button{margin-left:8px;padding:0 8px;background-color:#fff}:host .q-button:disabled{display:none}:host .q-control-size{display:inline-block;vertical-align:top;padding-right:10px}:host .q-input-control,:host .q-operator-control,:host .q-field-control,:host .q-entity-control{display:inline-block;padding:5px 8px;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;box-sizing:border-box;width:auto;min-width:180px}:host .q-input-control:disabled,:host .q-operator-control:disabled,:host .q-field-control:disabled,:host .q-entity-control:disabled{border-color:transparent}:host .q-operator-control,:host .q-field-control,:host .q-entity-control,:host .q-input-control:not([type=checkbox]){min-height:32px;-webkit-appearance:none}:host .q-switch-label,:host .q-button{float:left;margin-bottom:0;font-size:14px;line-height:30px;font-weight:400;text-align:center;text-shadow:none;border:1px solid rgba(0,0,0,.2);box-sizing:border-box}:host .q-switch-label:hover,:host .q-button:hover{cursor:pointer;background-color:#f0f0f0}:host .q-switch-label{background-color:#e4e4e4;padding:0 8px}:host .q-switch-radio{position:absolute;clip:rect(0,0,0,0);height:1px;width:1px;border:0;overflow:hidden}:host .q-switch-radio:checked+.q-switch-label{border:1px solid rgb(97,158,215);background:white;color:#3176b3}:host .q-switch-radio:disabled+.q-switch-label{display:none}:host .q-switch-radio:checked:disabled+.q-switch-label{display:initial;color:initial;cursor:default;border-color:transparent}:host .q-invalid-ruleset{border:1px solid rgba(179,65,93,.5)!important;background:rgba(179,65,93,.1)!important}:host .q-empty-warning{color:#8d252e;text-align:center}:host .q-ruleset{border:1px solid #CCC}:host .q-rule{border:1px solid #CCC;background:white}:host .q-transition{transition:all .1s ease-in-out}:host .q-tree-container{width:100%;overflow:hidden;transition:ease-in .25s max-height}:host .q-tree-container.q-collapsed{max-height:0!important}:host .q-tree{list-style:none;margin:4px 0 2px}:host .q-row{padding:6px 8px;margin-top:6px}:host .q-connector{position:relative}:host .q-connector:before{top:-5px;border-width:0 0 2px 2px}:host .q-connector:after{border-width:0 0 0 2px;top:50%}:host .q-connector:before,:host .q-connector:after{content:\"\";left:-12px;border-color:#ccc;border-style:solid;width:9px;height:calc(50% + 6px);position:absolute}:host .q-connector:last-child:after{content:none}:host .q-inline-block-display{display:inline-block;vertical-align:top}\n"] }]
|
|
794
|
+
args: [{ selector: "query-builder", providers: [CONTROL_VALUE_ACCESSOR, VALIDATOR], template: "<div [ngClass]=\"getClassNames('switchRow')\">\n <ng-template #defaultArrowIcon>\n <i [ngClass]=\"getClassNames('arrowIcon')\"></i>\n </ng-template>\n\n <a\n *ngIf=\"allowCollapse\"\n (click)=\"toggleCollapse()\"\n [ngClass]=\"getClassNames('arrowIconButton', data.collapsed ? 'collapsed' : '')\"\n >\n <ng-container *ngIf=\"getArrowIconTemplate() as template; else defaultArrowIcon\">\n <ng-container *ngTemplateOutlet=\"template; context: getArrowIconContext()\"></ng-container>\n </ng-container>\n </a>\n\n <ng-container *ngIf=\"getButtonGroupTemplate() as template; else defaultButtonGroup\">\n <div [ngClass]=\"getClassNames('buttonGroup', 'rightAlign')\">\n <ng-container *ngTemplateOutlet=\"template; context: getButtonGroupContext()\"></ng-container>\n </div>\n </ng-container>\n\n <ng-template #defaultButtonGroup>\n <div [ngClass]=\"getClassNames('buttonGroup', 'rightAlign')\">\n <button\n type=\"button\"\n (click)=\"addRule()\"\n [ngClass]=\"getClassNames('button')\"\n [disabled]=\"disabled\"\n >\n <i [ngClass]=\"getClassNames('addIcon')\"></i> Rule\n </button>\n <button\n type=\"button\"\n (click)=\"addRuleSet()\"\n [ngClass]=\"getClassNames('button')\"\n *ngIf=\"allowRuleset\"\n [disabled]=\"disabled\"\n >\n <i [ngClass]=\"getClassNames('addIcon')\"></i> Ruleset\n </button>\n <ng-container *ngIf=\"!!parentValue && allowRuleset\">\n <button\n type=\"button\"\n (click)=\"removeRuleSet()\"\n [ngClass]=\"getClassNames('button', 'removeButton')\"\n [disabled]=\"disabled\"\n >\n <i [ngClass]=\"getClassNames('removeIcon')\"></i>\n </button>\n </ng-container>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"getSwitchGroupTemplate() as template; else defaultSwitchGroup\">\n <ng-container *ngTemplateOutlet=\"template; context: getSwitchGroupContext()\"></ng-container>\n </ng-container>\n\n <ng-template #defaultSwitchGroup>\n <div [ngClass]=\"getClassNames('switchGroup', 'transition')\" *ngIf=\"data\">\n <div [ngClass]=\"getClassNames('switchControl')\">\n <input\n type=\"radio\"\n [ngClass]=\"getClassNames('switchRadio')\"\n [(ngModel)]=\"data.condition\"\n [disabled]=\"disabled\"\n value=\"and\"\n #andOption\n />\n <label (click)=\"changeCondition(andOption.value)\" [ngClass]=\"getClassNames('switchLabel')\"\n >AND</label\n >\n </div>\n <div [ngClass]=\"getClassNames('switchControl')\">\n <input\n type=\"radio\"\n [ngClass]=\"getClassNames('switchRadio')\"\n [(ngModel)]=\"data.condition\"\n [disabled]=\"disabled\"\n value=\"or\"\n #orOption\n />\n <label (click)=\"changeCondition(orOption.value)\" [ngClass]=\"getClassNames('switchLabel')\"\n >OR</label\n >\n </div>\n </div>\n </ng-template>\n</div>\n\n<div\n #treeContainer\n (transitionend)=\"transitionEnd($event)\"\n [ngClass]=\"getClassNames('treeContainer', data.collapsed ? 'collapsed' : '')\"\n>\n <ul [ngClass]=\"getClassNames('tree')\" *ngIf=\"data && data.rules\">\n <ng-container *ngFor=\"let rule of data.rules; let i = index\">\n <ng-container\n *ngIf=\"{\n ruleset: !!rule.rules,\n invalid: !config.allowEmptyRulesets && rule.rules && rule.rules.length === 0\n } as local\"\n >\n <li [ngClass]=\"getQueryItemClassName(local)\">\n <ng-container *ngIf=\"!local.ruleset\">\n <ng-container *ngIf=\"getRemoveButtonTemplate() as template; else defaultRemoveButton\">\n <div [ngClass]=\"getClassNames('buttonGroup', 'rightAlign')\">\n <ng-container\n *ngTemplateOutlet=\"template; context: getRemoveButtonContext(rule)\"\n ></ng-container>\n </div>\n </ng-container>\n\n <ng-template #defaultRemoveButton>\n <div [ngClass]=\"getClassNames('removeButtonSize', 'rightAlign')\">\n <button\n type=\"button\"\n [ngClass]=\"getClassNames('button', 'removeButton')\"\n (click)=\"removeRule(rule, data)\"\n [disabled]=\"disabled\"\n >\n <i [ngClass]=\"getClassNames('removeIcon')\"></i>\n </button>\n </div>\n </ng-template>\n\n <div *ngIf=\"entities?.length\" class=\"q-inline-block-display\">\n <ng-container *ngIf=\"getEntityTemplate() as template; else defaultEntity\">\n <ng-container\n *ngTemplateOutlet=\"template; context: getEntityContext(rule)\"\n ></ng-container>\n </ng-container>\n </div>\n\n <ng-template #defaultEntity>\n <div [ngClass]=\"getClassNames('entityControlSize')\">\n <select\n [ngClass]=\"getClassNames('entityControl')\"\n [(ngModel)]=\"rule.entity\"\n (ngModelChange)=\"changeEntity($event, rule, i, data)\"\n [disabled]=\"disabled\"\n >\n <option *ngFor=\"let entity of entities\" [ngValue]=\"entity.value\">\n {{ entity.name }}\n </option>\n </select>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"getFieldTemplate() as template; else defaultField\">\n <ng-container\n *ngTemplateOutlet=\"template; context: getFieldContext(rule)\"\n ></ng-container>\n </ng-container>\n\n <ng-template #defaultField>\n <div [ngClass]=\"getClassNames('fieldControlSize')\">\n <select\n [ngClass]=\"getClassNames('fieldControl')\"\n [(ngModel)]=\"rule.field\"\n (ngModelChange)=\"changeField($event, rule)\"\n [disabled]=\"disabled\"\n >\n <option *ngFor=\"let field of getFields(rule.entity)\" [ngValue]=\"field.value\">\n {{ field.name }}\n </option>\n </select>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"getOperatorTemplate() as template; else defaultOperator\">\n <ng-container\n *ngTemplateOutlet=\"template; context: getOperatorContext(rule)\"\n ></ng-container>\n </ng-container>\n\n <ng-template #defaultOperator>\n <div [ngClass]=\"getClassNames('operatorControlSize')\">\n <select\n [ngClass]=\"getClassNames('operatorControl')\"\n [(ngModel)]=\"rule.operator\"\n (ngModelChange)=\"changeOperator(rule)\"\n [disabled]=\"disabled\"\n >\n <option *ngFor=\"let operator of getOperators(rule.field)\" [ngValue]=\"operator\">\n {{ operator }}\n </option>\n </select>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"findTemplateForRule(rule) as template; else defaultInput\">\n <ng-container\n *ngTemplateOutlet=\"template; context: getInputContext(rule)\"\n ></ng-container>\n </ng-container>\n\n <ng-template #defaultInput>\n <div\n [ngClass]=\"getClassNames('inputControlSize')\"\n [ngSwitch]=\"getInputType(rule.field, rule.operator)\"\n >\n <input\n [ngClass]=\"getClassNames('inputControl')\"\n [(ngModel)]=\"rule.value\"\n (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\"\n *ngSwitchCase=\"'string'\"\n type=\"text\"\n />\n <input\n [ngClass]=\"getClassNames('inputControl')\"\n [(ngModel)]=\"rule.value\"\n (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\"\n *ngSwitchCase=\"'number'\"\n type=\"number\"\n />\n <input\n [ngClass]=\"getClassNames('inputControl')\"\n [(ngModel)]=\"rule.value\"\n (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\"\n *ngSwitchCase=\"'date'\"\n type=\"date\"\n />\n <input\n [ngClass]=\"getClassNames('inputControl')\"\n [(ngModel)]=\"rule.value\"\n (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\"\n *ngSwitchCase=\"'time'\"\n type=\"time\"\n />\n <select\n [ngClass]=\"getClassNames('inputControl')\"\n [(ngModel)]=\"rule.value\"\n (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\"\n *ngSwitchCase=\"'category'\"\n >\n <option *ngFor=\"let opt of getOptions(rule.field)\" [ngValue]=\"opt.value\">\n {{ opt.name }}\n </option>\n </select>\n <ng-container *ngSwitchCase=\"'multiselect'\">\n <select\n [ngClass]=\"getClassNames('inputControl')\"\n [(ngModel)]=\"rule.value\"\n (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\"\n multiple\n >\n <option *ngFor=\"let opt of getOptions(rule.field)\" [ngValue]=\"opt.value\">\n {{ opt.name }}\n </option>\n </select>\n </ng-container>\n <input\n [ngClass]=\"getClassNames('inputControl')\"\n [(ngModel)]=\"rule.value\"\n (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\"\n *ngSwitchCase=\"'boolean'\"\n type=\"checkbox\"\n />\n </div>\n </ng-template>\n </ng-container>\n <query-builder\n *ngIf=\"local.ruleset\"\n [data]=\"rule\"\n [disabled]=\"disabled\"\n [parentTouchedCallback]=\"parentTouchedCallback || onTouchedCallback\"\n [parentChangeCallback]=\"parentChangeCallback || onChangeCallback\"\n [parentInputTemplates]=\"parentInputTemplates || inputTemplates\"\n [parentOperatorTemplate]=\"parentOperatorTemplate || operatorTemplate\"\n [parentFieldTemplate]=\"parentFieldTemplate || fieldTemplate\"\n [parentEntityTemplate]=\"parentEntityTemplate || entityTemplate\"\n [parentSwitchGroupTemplate]=\"parentSwitchGroupTemplate || switchGroupTemplate\"\n [parentButtonGroupTemplate]=\"parentButtonGroupTemplate || buttonGroupTemplate\"\n [parentRemoveButtonTemplate]=\"parentRemoveButtonTemplate || removeButtonTemplate\"\n [parentEmptyWarningTemplate]=\"parentEmptyWarningTemplate || emptyWarningTemplate\"\n [parentArrowIconTemplate]=\"parentArrowIconTemplate || arrowIconTemplate\"\n [parentValue]=\"data\"\n [classNames]=\"classNames\"\n [config]=\"config\"\n [allowRuleset]=\"allowRuleset\"\n [allowCollapse]=\"allowCollapse\"\n [emptyMessage]=\"emptyMessage\"\n [operatorMap]=\"operatorMap\"\n >\n </query-builder>\n\n <ng-container *ngIf=\"getEmptyWarningTemplate() as template; else defaultEmptyWarning\">\n <ng-container *ngIf=\"local.invalid\">\n <ng-container\n *ngTemplateOutlet=\"template; context: getEmptyWarningContext()\"\n ></ng-container>\n </ng-container>\n </ng-container>\n\n <ng-template #defaultEmptyWarning>\n <p [ngClass]=\"getClassNames('emptyWarning')\" *ngIf=\"local.invalid\">\n {{ emptyMessage }}\n </p>\n </ng-template>\n </li>\n </ng-container>\n </ng-container>\n </ul>\n</div>\n", styles: ["@charset \"UTF-8\";:host{display:block;width:100%}:host .q-icon{font-style:normal;font-size:12px}:host .q-remove-icon:before{content:\"\\274c\"}:host .q-arrow-icon-button{float:left;margin:4px 6px 4px 0;transform:rotate(90deg);transition:linear .25s transform;cursor:pointer}:host .q-arrow-icon-button.q-collapsed{transform:rotate(0)}:host .q-arrow-icon:before{content:\"\\25b6\"}:host .q-add-icon{color:#555}:host .q-add-icon:before{content:\"\\2795\"}:host .q-remove-button{color:#b3415d;width:31px}:host .q-switch-group,:host .q-button-group{font-family:Lucida Grande,Tahoma,Verdana,sans-serif;overflow:hidden}:host .q-right-align{float:right}:host .q-button{margin-left:8px;padding:0 8px;background-color:#fff}:host .q-button:disabled{display:none}:host .q-control-size{display:inline-block;vertical-align:top;padding-right:10px}:host .q-input-control,:host .q-operator-control,:host .q-field-control,:host .q-entity-control{display:inline-block;padding:5px 8px;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;box-sizing:border-box;width:auto;min-width:180px}:host .q-input-control:disabled,:host .q-operator-control:disabled,:host .q-field-control:disabled,:host .q-entity-control:disabled{border-color:transparent}:host .q-operator-control,:host .q-field-control,:host .q-entity-control,:host .q-input-control:not([type=checkbox]){min-height:32px;-webkit-appearance:none}:host .q-switch-label,:host .q-button{float:left;margin-bottom:0;font-size:14px;line-height:30px;font-weight:400;text-align:center;text-shadow:none;border:1px solid rgba(0,0,0,.2);box-sizing:border-box}:host .q-switch-label:hover,:host .q-button:hover{cursor:pointer;background-color:#f0f0f0}:host .q-switch-label{background-color:#e4e4e4;padding:0 8px}:host .q-switch-radio{position:absolute;clip:rect(0,0,0,0);height:1px;width:1px;border:0;overflow:hidden}:host .q-switch-radio:checked+.q-switch-label{border:1px solid rgb(97,158,215);background:white;color:#3176b3}:host .q-switch-radio:disabled+.q-switch-label{display:none}:host .q-switch-radio:checked:disabled+.q-switch-label{display:initial;color:initial;cursor:default;border-color:transparent}:host .q-invalid-ruleset{border:1px solid rgba(179,65,93,.5)!important;background:rgba(179,65,93,.1)!important}:host .q-empty-warning{color:#8d252e;text-align:center}:host .q-ruleset{border:1px solid #ccc}:host .q-rule{border:1px solid #ccc;background:white}:host .q-transition{transition:all .1s ease-in-out}:host .q-tree-container{width:100%;overflow:hidden;transition:ease-in .25s max-height}:host .q-tree-container.q-collapsed{max-height:0!important}:host .q-tree{list-style:none;margin:4px 0 2px}:host .q-row{padding:6px 8px;margin-top:6px}:host .q-connector{position:relative}:host .q-connector:before{top:-5px;border-width:0 0 2px 2px}:host .q-connector:after{border-width:0 0 0 2px;top:50%}:host .q-connector:before,:host .q-connector:after{content:\"\";left:-12px;border-color:#ccc;border-style:solid;width:9px;height:calc(50% + 6px);position:absolute}:host .q-connector:last-child:after{content:none}:host .q-inline-block-display{display:inline-block;vertical-align:top}\n"] }]
|
|
783
795
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { disabled: [{
|
|
784
796
|
type: Input
|
|
785
797
|
}], data: [{
|
|
786
798
|
type: Input
|
|
787
|
-
}],
|
|
799
|
+
}], condition: [{
|
|
788
800
|
type: HostBinding,
|
|
789
|
-
args: [
|
|
801
|
+
args: ["attr.query-builder-condition"]
|
|
790
802
|
}], allowRuleset: [{
|
|
791
803
|
type: Input
|
|
792
804
|
}], allowCollapse: [{
|
|
@@ -827,7 +839,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImpor
|
|
|
827
839
|
type: Input
|
|
828
840
|
}], treeContainer: [{
|
|
829
841
|
type: ViewChild,
|
|
830
|
-
args: [
|
|
842
|
+
args: ["treeContainer", { static: true }]
|
|
831
843
|
}], buttonGroupTemplate: [{
|
|
832
844
|
type: ContentChild,
|
|
833
845
|
args: [QueryButtonGroupDirective]
|
|
@@ -871,8 +883,7 @@ NgxAngularQueryBuilderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.
|
|
|
871
883
|
QuerySwitchGroupDirective,
|
|
872
884
|
QueryRemoveButtonDirective,
|
|
873
885
|
QueryEmptyWarningDirective,
|
|
874
|
-
QueryArrowIconDirective], imports: [CommonModule,
|
|
875
|
-
FormsModule], exports: [QueryBuilderComponent,
|
|
886
|
+
QueryArrowIconDirective], imports: [CommonModule, FormsModule], exports: [QueryBuilderComponent,
|
|
876
887
|
QueryInputDirective,
|
|
877
888
|
QueryOperatorDirective,
|
|
878
889
|
QueryFieldDirective,
|
|
@@ -882,15 +893,11 @@ NgxAngularQueryBuilderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.
|
|
|
882
893
|
QueryRemoveButtonDirective,
|
|
883
894
|
QueryEmptyWarningDirective,
|
|
884
895
|
QueryArrowIconDirective] });
|
|
885
|
-
NgxAngularQueryBuilderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: NgxAngularQueryBuilderModule, imports: [CommonModule,
|
|
886
|
-
FormsModule] });
|
|
896
|
+
NgxAngularQueryBuilderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: NgxAngularQueryBuilderModule, imports: [CommonModule, FormsModule] });
|
|
887
897
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: NgxAngularQueryBuilderModule, decorators: [{
|
|
888
898
|
type: NgModule,
|
|
889
899
|
args: [{
|
|
890
|
-
imports: [
|
|
891
|
-
CommonModule,
|
|
892
|
-
FormsModule
|
|
893
|
-
],
|
|
900
|
+
imports: [CommonModule, FormsModule],
|
|
894
901
|
declarations: [
|
|
895
902
|
QueryBuilderComponent,
|
|
896
903
|
QueryInputDirective,
|