ngx-angular-query-builder 21.0.0 → 22.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.
@@ -1,342 +1,424 @@
1
- import * as i12 from '@angular/forms';
2
- import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors } from '@angular/forms';
3
- import * as i0 from '@angular/core';
4
- import { TemplateRef, OnChanges, QueryList, ElementRef, ChangeDetectorRef, SimpleChanges } from '@angular/core';
5
- import * as i11 from '@angular/common';
6
-
7
- interface RuleSet {
8
- condition: string;
9
- rules: Array<RuleSet | Rule | any>;
10
- collapsed?: boolean;
11
- isChild?: boolean;
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ import * as i12 from "@angular/forms";
5
+ import { AbstractControl, ControlValueAccessor, ValidationErrors, Validator } from "@angular/forms";
6
+ import * as i0 from "@angular/core";
7
+ import { ChangeDetectorRef, ElementRef, OnChanges, QueryList, SimpleChanges, TemplateRef } from "@angular/core";
8
+ import * as i11 from "@angular/common";
9
+ export interface RuleSet {
10
+ condition: string;
11
+ rules: Array<RuleSet | Rule | any>;
12
+ collapsed?: boolean;
13
+ isChild?: boolean;
12
14
  }
13
- interface Rule {
14
- field: string;
15
- value?: any;
16
- operator?: string;
17
- entity?: string;
15
+ export interface Rule {
16
+ field: string;
17
+ value?: any;
18
+ operator?: string;
19
+ entity?: string;
18
20
  }
19
- interface Option {
20
- name: string;
21
- value: any;
21
+ export interface Option {
22
+ name: string;
23
+ value: any;
22
24
  }
23
- interface FieldMap {
24
- [key: string]: Field;
25
+ export interface FieldMap {
26
+ [key: string]: Field;
25
27
  }
26
- interface Field {
27
- name: string;
28
- value?: string;
29
- type: string;
30
- nullable?: boolean;
31
- options?: Option[];
32
- operators?: string[];
33
- defaultValue?: any;
34
- defaultOperator?: any;
35
- entity?: string;
36
- validator?: (rule: Rule, parent: RuleSet) => any | null;
28
+ export interface Field {
29
+ name: string;
30
+ value?: string;
31
+ type: string;
32
+ nullable?: boolean;
33
+ options?: Option[];
34
+ operators?: string[];
35
+ defaultValue?: any;
36
+ defaultOperator?: any;
37
+ entity?: string;
38
+ validator?: (rule: Rule, parent: RuleSet) => any | null;
37
39
  }
38
- interface LocalRuleMeta {
39
- ruleset: boolean;
40
- invalid: boolean;
40
+ export interface LocalRuleMeta {
41
+ ruleset: boolean;
42
+ invalid: boolean;
41
43
  }
42
- interface EntityMap {
43
- [key: string]: Entity;
44
+ export interface EntityMap {
45
+ [key: string]: Entity;
44
46
  }
45
- interface Entity {
46
- name: string;
47
- value?: string;
48
- defaultField?: any;
47
+ export interface Entity {
48
+ name: string;
49
+ value?: string;
50
+ defaultField?: any;
49
51
  }
50
- interface QueryBuilderClassNames {
51
- arrowIconButton?: string;
52
- arrowIcon?: string;
53
- removeIcon?: string;
54
- addIcon?: string;
55
- button?: string;
56
- buttonGroup?: string;
57
- removeButton?: string;
58
- removeButtonSize?: string;
59
- switchRow?: string;
60
- switchGroup?: string;
61
- switchLabel?: string;
62
- switchRadio?: string;
63
- switchControl?: string;
64
- rightAlign?: string;
65
- transition?: string;
66
- collapsed?: string;
67
- treeContainer?: string;
68
- tree?: string;
69
- row?: string;
70
- connector?: string;
71
- rule?: string;
72
- ruleSet?: string;
73
- invalidRuleSet?: string;
74
- emptyWarning?: string;
75
- fieldControl?: string;
76
- fieldControlSize?: string;
77
- entityControl?: string;
78
- entityControlSize?: string;
79
- operatorControl?: string;
80
- operatorControlSize?: string;
81
- inputControl?: string;
82
- inputControlSize?: string;
52
+ export interface QueryBuilderClassNames {
53
+ arrowIconButton?: string;
54
+ arrowIcon?: string;
55
+ removeIcon?: string;
56
+ addIcon?: string;
57
+ button?: string;
58
+ buttonGroup?: string;
59
+ removeButton?: string;
60
+ removeButtonSize?: string;
61
+ switchRow?: string;
62
+ switchGroup?: string;
63
+ switchLabel?: string;
64
+ switchRadio?: string;
65
+ switchControl?: string;
66
+ rightAlign?: string;
67
+ transition?: string;
68
+ collapsed?: string;
69
+ treeContainer?: string;
70
+ tree?: string;
71
+ row?: string;
72
+ connector?: string;
73
+ rule?: string;
74
+ ruleSet?: string;
75
+ invalidRuleSet?: string;
76
+ emptyWarning?: string;
77
+ fieldControl?: string;
78
+ fieldControlSize?: string;
79
+ entityControl?: string;
80
+ entityControlSize?: string;
81
+ operatorControl?: string;
82
+ operatorControlSize?: string;
83
+ inputControl?: string;
84
+ inputControlSize?: string;
83
85
  }
84
- interface QueryBuilderConfig {
85
- fields: FieldMap;
86
- entities?: EntityMap;
87
- allowEmptyRulesets?: boolean;
88
- getOperators?: (fieldName: string, field: Field) => string[];
89
- getInputType?: (field: string, operator: string) => string;
90
- getOptions?: (field: string) => Option[];
91
- addRuleSet?: (parent: RuleSet) => void;
92
- addRule?: (parent: RuleSet) => void;
93
- removeRuleSet?: (ruleset: RuleSet, parent?: RuleSet) => void;
94
- removeRule?: (rule: Rule, parent: RuleSet) => void;
95
- coerceValueForOperator?: (operator: string, value: any, rule: Rule) => any;
96
- calculateFieldChangeValue?: (currentField: Field, nextField: Field, currentValue: any) => any;
86
+ export interface QueryBuilderConfig {
87
+ fields: FieldMap;
88
+ entities?: EntityMap;
89
+ allowEmptyRulesets?: boolean;
90
+ getOperators?: (fieldName: string, field: Field) => string[];
91
+ getInputType?: (field: string, operator: string) => string;
92
+ getOptions?: (field: string) => Option[];
93
+ addRuleSet?: (parent: RuleSet) => void;
94
+ addRule?: (parent: RuleSet) => void;
95
+ removeRuleSet?: (ruleset: RuleSet, parent?: RuleSet) => void;
96
+ removeRule?: (rule: Rule, parent: RuleSet) => void;
97
+ coerceValueForOperator?: (operator: string, value: any, rule: Rule) => any;
98
+ calculateFieldChangeValue?: (currentField: Field, nextField: Field, currentValue: any) => any;
97
99
  }
98
- interface SwitchGroupContext {
99
- onChange: (conditionValue: string) => void;
100
- getDisabledState: () => boolean;
101
- $implicit: RuleSet;
100
+ export interface SwitchGroupContext {
101
+ onChange: (conditionValue: string) => void;
102
+ getDisabledState: () => boolean;
103
+ $implicit: RuleSet;
102
104
  }
103
- interface EmptyWarningContext {
104
- getDisabledState: () => boolean;
105
- message: string;
106
- $implicit: RuleSet;
105
+ export interface EmptyWarningContext {
106
+ getDisabledState: () => boolean;
107
+ message: string;
108
+ $implicit: RuleSet;
107
109
  }
108
- interface ArrowIconContext {
109
- getDisabledState: () => boolean;
110
- $implicit: RuleSet;
110
+ export interface ArrowIconContext {
111
+ getDisabledState: () => boolean;
112
+ $implicit: RuleSet;
111
113
  }
112
- interface EntityContext {
113
- onChange: (entityValue: string, rule: Rule) => void;
114
- getDisabledState: () => boolean;
115
- entities: Entity[];
116
- $implicit: Rule;
114
+ export interface EntityContext {
115
+ onChange: (entityValue: string, rule: Rule) => void;
116
+ getDisabledState: () => boolean;
117
+ entities: Entity[];
118
+ $implicit: Rule;
117
119
  }
118
- interface FieldContext {
119
- onChange: (fieldValue: string, rule: Rule) => void;
120
- getFields: (entityName: string) => void;
121
- getDisabledState: () => boolean;
122
- fields: Field[];
123
- $implicit: Rule;
120
+ export interface FieldContext {
121
+ onChange: (fieldValue: string, rule: Rule) => void;
122
+ getFields: (entityName: string) => void;
123
+ getDisabledState: () => boolean;
124
+ fields: Field[];
125
+ $implicit: Rule;
124
126
  }
125
- interface OperatorContext {
126
- onChange: () => void;
127
- getDisabledState: () => boolean;
128
- operators: string[];
129
- $implicit: Rule;
127
+ export interface OperatorContext {
128
+ onChange: () => void;
129
+ getDisabledState: () => boolean;
130
+ operators: string[];
131
+ $implicit: Rule;
130
132
  }
131
- interface InputContext {
132
- onChange: () => void;
133
- getDisabledState: () => boolean;
134
- options: Option[];
135
- field: Field;
136
- $implicit: Rule;
133
+ export interface InputContext {
134
+ onChange: () => void;
135
+ getDisabledState: () => boolean;
136
+ options: Option[];
137
+ field: Field;
138
+ $implicit: Rule;
137
139
  }
138
- interface ButtonGroupContext {
139
- addRule: () => void;
140
- addRuleSet: () => void;
141
- removeRuleSet: () => void;
142
- getDisabledState: () => boolean;
143
- $implicit: RuleSet;
140
+ export interface ButtonGroupContext {
141
+ addRule: () => void;
142
+ addRuleSet: () => void;
143
+ removeRuleSet: () => void;
144
+ getDisabledState: () => boolean;
145
+ $implicit: RuleSet;
144
146
  }
145
- interface RemoveButtonContext {
146
- removeRule: (rule: Rule) => void;
147
- getDisabledState: () => boolean;
148
- $implicit: Rule;
147
+ export interface RemoveButtonContext {
148
+ removeRule: (rule: Rule) => void;
149
+ getDisabledState: () => boolean;
150
+ $implicit: Rule;
149
151
  }
150
-
151
- declare class QueryOperatorDirective {
152
- template: TemplateRef<any>;
153
- constructor(template: TemplateRef<any>);
154
- static ɵfac: i0.ɵɵFactoryDeclaration<QueryOperatorDirective, never>;
155
- static ɵdir: i0.ɵɵDirectiveDeclaration<QueryOperatorDirective, "[queryOperator]", never, {}, {}, never, never, false, never>;
152
+ export declare class QueryOperatorDirective {
153
+ template: TemplateRef<any>;
154
+ constructor(template: TemplateRef<any>);
155
+ static ɵfac: i0.ɵɵFactoryDeclaration<QueryOperatorDirective, never>;
156
+ static ɵdir: i0.ɵɵDirectiveDeclaration<QueryOperatorDirective, "[queryOperator]", never, {}, {}, never, never, false, never>;
156
157
  }
157
-
158
- declare class QueryFieldDirective {
159
- template: TemplateRef<any>;
160
- constructor(template: TemplateRef<any>);
161
- static ɵfac: i0.ɵɵFactoryDeclaration<QueryFieldDirective, never>;
162
- static ɵdir: i0.ɵɵDirectiveDeclaration<QueryFieldDirective, "[queryField]", never, {}, {}, never, never, false, never>;
158
+ export declare class QueryFieldDirective {
159
+ template: TemplateRef<any>;
160
+ constructor(template: TemplateRef<any>);
161
+ static ɵfac: i0.ɵɵFactoryDeclaration<QueryFieldDirective, never>;
162
+ static ɵdir: i0.ɵɵDirectiveDeclaration<QueryFieldDirective, "[queryField]", never, {}, {}, never, never, false, never>;
163
163
  }
164
-
165
- declare class QueryEntityDirective {
166
- template: TemplateRef<any>;
167
- constructor(template: TemplateRef<any>);
168
- static ɵfac: i0.ɵɵFactoryDeclaration<QueryEntityDirective, never>;
169
- static ɵdir: i0.ɵɵDirectiveDeclaration<QueryEntityDirective, "[queryEntity]", never, {}, {}, never, never, false, never>;
164
+ export declare class QueryEntityDirective {
165
+ template: TemplateRef<any>;
166
+ constructor(template: TemplateRef<any>);
167
+ static ɵfac: i0.ɵɵFactoryDeclaration<QueryEntityDirective, never>;
168
+ static ɵdir: i0.ɵɵDirectiveDeclaration<QueryEntityDirective, "[queryEntity]", never, {}, {}, never, never, false, never>;
170
169
  }
171
-
172
- declare class QuerySwitchGroupDirective {
173
- template: TemplateRef<any>;
174
- constructor(template: TemplateRef<any>);
175
- static ɵfac: i0.ɵɵFactoryDeclaration<QuerySwitchGroupDirective, never>;
176
- static ɵdir: i0.ɵɵDirectiveDeclaration<QuerySwitchGroupDirective, "[querySwitchGroup]", never, {}, {}, never, never, false, never>;
170
+ export declare class QuerySwitchGroupDirective {
171
+ template: TemplateRef<any>;
172
+ constructor(template: TemplateRef<any>);
173
+ static ɵfac: i0.ɵɵFactoryDeclaration<QuerySwitchGroupDirective, never>;
174
+ static ɵdir: i0.ɵɵDirectiveDeclaration<QuerySwitchGroupDirective, "[querySwitchGroup]", never, {}, {}, never, never, false, never>;
177
175
  }
178
-
179
- declare class QueryButtonGroupDirective {
180
- template: TemplateRef<any>;
181
- constructor(template: TemplateRef<any>);
182
- static ɵfac: i0.ɵɵFactoryDeclaration<QueryButtonGroupDirective, never>;
183
- static ɵdir: i0.ɵɵDirectiveDeclaration<QueryButtonGroupDirective, "[queryButtonGroup]", never, {}, {}, never, never, false, never>;
176
+ export declare class QueryButtonGroupDirective {
177
+ template: TemplateRef<any>;
178
+ constructor(template: TemplateRef<any>);
179
+ static ɵfac: i0.ɵɵFactoryDeclaration<QueryButtonGroupDirective, never>;
180
+ static ɵdir: i0.ɵɵDirectiveDeclaration<QueryButtonGroupDirective, "[queryButtonGroup]", never, {}, {}, never, never, false, never>;
184
181
  }
185
-
186
- declare class QueryInputDirective {
187
- template: TemplateRef<any>;
188
- /** Unique name for query input type. */
189
- get queryInputType(): string;
190
- set queryInputType(value: string);
191
- private _type;
192
- constructor(template: TemplateRef<any>);
193
- static ɵfac: i0.ɵɵFactoryDeclaration<QueryInputDirective, never>;
194
- static ɵdir: i0.ɵɵDirectiveDeclaration<QueryInputDirective, "[queryInput]", never, { "queryInputType": { "alias": "queryInputType"; "required": false; }; }, {}, never, never, false, never>;
182
+ export declare class QueryInputDirective {
183
+ template: TemplateRef<any>;
184
+ /** Unique name for query input type. */
185
+ get queryInputType(): string;
186
+ set queryInputType(value: string);
187
+ private _type;
188
+ constructor(template: TemplateRef<any>);
189
+ static ɵfac: i0.ɵɵFactoryDeclaration<QueryInputDirective, never>;
190
+ static ɵdir: i0.ɵɵDirectiveDeclaration<QueryInputDirective, "[queryInput]", never, {
191
+ "queryInputType": {
192
+ "alias": "queryInputType";
193
+ "required": false;
194
+ };
195
+ }, {}, never, never, false, never>;
195
196
  }
196
-
197
- declare class QueryRemoveButtonDirective {
198
- template: TemplateRef<any>;
199
- constructor(template: TemplateRef<any>);
200
- static ɵfac: i0.ɵɵFactoryDeclaration<QueryRemoveButtonDirective, never>;
201
- static ɵdir: i0.ɵɵDirectiveDeclaration<QueryRemoveButtonDirective, "[queryRemoveButton]", never, {}, {}, never, never, false, never>;
197
+ export declare class QueryRemoveButtonDirective {
198
+ template: TemplateRef<any>;
199
+ constructor(template: TemplateRef<any>);
200
+ static ɵfac: i0.ɵɵFactoryDeclaration<QueryRemoveButtonDirective, never>;
201
+ static ɵdir: i0.ɵɵDirectiveDeclaration<QueryRemoveButtonDirective, "[queryRemoveButton]", never, {}, {}, never, never, false, never>;
202
202
  }
203
-
204
- declare class QueryEmptyWarningDirective {
205
- template: TemplateRef<any>;
206
- constructor(template: TemplateRef<any>);
207
- static ɵfac: i0.ɵɵFactoryDeclaration<QueryEmptyWarningDirective, never>;
208
- static ɵdir: i0.ɵɵDirectiveDeclaration<QueryEmptyWarningDirective, "[queryEmptyWarning]", never, {}, {}, never, never, false, never>;
203
+ export declare class QueryEmptyWarningDirective {
204
+ template: TemplateRef<any>;
205
+ constructor(template: TemplateRef<any>);
206
+ static ɵfac: i0.ɵɵFactoryDeclaration<QueryEmptyWarningDirective, never>;
207
+ static ɵdir: i0.ɵɵDirectiveDeclaration<QueryEmptyWarningDirective, "[queryEmptyWarning]", never, {}, {}, never, never, false, never>;
209
208
  }
210
-
211
- declare class QueryArrowIconDirective {
212
- template: TemplateRef<any>;
213
- constructor(template: TemplateRef<any>);
214
- static ɵfac: i0.ɵɵFactoryDeclaration<QueryArrowIconDirective, never>;
215
- static ɵdir: i0.ɵɵDirectiveDeclaration<QueryArrowIconDirective, "[queryArrowIcon]", never, {}, {}, never, never, false, never>;
209
+ export declare class QueryArrowIconDirective {
210
+ template: TemplateRef<any>;
211
+ constructor(template: TemplateRef<any>);
212
+ static ɵfac: i0.ɵɵFactoryDeclaration<QueryArrowIconDirective, never>;
213
+ static ɵdir: i0.ɵɵDirectiveDeclaration<QueryArrowIconDirective, "[queryArrowIcon]", never, {}, {}, never, never, false, never>;
216
214
  }
217
-
218
- declare const CONTROL_VALUE_ACCESSOR: any;
219
- declare const VALIDATOR: any;
220
- declare class QueryBuilderComponent implements OnChanges, ControlValueAccessor, Validator {
221
- private changeDetectorRef;
222
- fields: Field[];
223
- filterFields: Field[];
224
- entities: Entity[];
225
- defaultClassNames: QueryBuilderClassNames;
226
- defaultOperatorMap: {
227
- [key: string]: string[];
215
+ export declare const CONTROL_VALUE_ACCESSOR: any;
216
+ export declare const VALIDATOR: any;
217
+ export declare class QueryBuilderComponent implements OnChanges, ControlValueAccessor, Validator {
218
+ private changeDetectorRef;
219
+ fields: Field[];
220
+ filterFields: Field[];
221
+ entities: Entity[];
222
+ defaultClassNames: QueryBuilderClassNames;
223
+ defaultOperatorMap: {
224
+ [key: string]: string[];
225
+ };
226
+ disabled: boolean;
227
+ data: RuleSet;
228
+ get condition(): string;
229
+ onChangeCallback: () => void;
230
+ onTouchedCallback: () => any;
231
+ allowRuleset: boolean;
232
+ allowCollapse: boolean;
233
+ emptyMessage: string;
234
+ classNames: QueryBuilderClassNames;
235
+ operatorMap: {
236
+ [key: string]: string[];
237
+ };
238
+ parentValue?: RuleSet;
239
+ config: QueryBuilderConfig;
240
+ parentArrowIconTemplate: QueryArrowIconDirective;
241
+ parentInputTemplates: QueryList<QueryInputDirective>;
242
+ parentOperatorTemplate: QueryOperatorDirective;
243
+ parentFieldTemplate: QueryFieldDirective;
244
+ parentEntityTemplate: QueryEntityDirective;
245
+ parentSwitchGroupTemplate: QuerySwitchGroupDirective;
246
+ parentButtonGroupTemplate: QueryButtonGroupDirective;
247
+ parentRemoveButtonTemplate: QueryRemoveButtonDirective;
248
+ parentEmptyWarningTemplate: QueryEmptyWarningDirective;
249
+ parentChangeCallback: () => void;
250
+ parentTouchedCallback: () => void;
251
+ persistValueOnFieldChange: boolean;
252
+ treeContainer: ElementRef;
253
+ buttonGroupTemplate: QueryButtonGroupDirective;
254
+ switchGroupTemplate: QuerySwitchGroupDirective;
255
+ fieldTemplate: QueryFieldDirective;
256
+ entityTemplate: QueryEntityDirective;
257
+ operatorTemplate: QueryOperatorDirective;
258
+ removeButtonTemplate: QueryRemoveButtonDirective;
259
+ emptyWarningTemplate: QueryEmptyWarningDirective;
260
+ inputTemplates: QueryList<QueryInputDirective>;
261
+ arrowIconTemplate: QueryArrowIconDirective;
262
+ private defaultTemplateTypes;
263
+ private defaultPersistValueTypes;
264
+ private defaultEmptyList;
265
+ private operatorsCache;
266
+ private inputContextCache;
267
+ private operatorContextCache;
268
+ private fieldContextCache;
269
+ private entityContextCache;
270
+ private removeButtonContextCache;
271
+ private buttonGroupContext;
272
+ constructor(changeDetectorRef: ChangeDetectorRef);
273
+ ngOnChanges(changes: SimpleChanges): void;
274
+ validate(control: AbstractControl): ValidationErrors | null;
275
+ get value(): RuleSet;
276
+ set value(value: RuleSet);
277
+ writeValue(obj: any): void;
278
+ registerOnChange(fn: any): void;
279
+ registerOnTouched(fn: any): void;
280
+ setDisabledState(isDisabled: boolean): void;
281
+ getDisabledState: () => boolean;
282
+ findTemplateForRule(rule: Rule): TemplateRef<any> | any;
283
+ findQueryInput(type: string): QueryInputDirective;
284
+ getOperators(field: string): string[];
285
+ getFields(entity: string): Field[];
286
+ getInputType(field: string, operator: string): string | null;
287
+ getOptions(field: string): Option[];
288
+ getClassNames(...args: string[]): any | string[];
289
+ getDefaultField(entity: Entity): Field | null;
290
+ getDefaultOperator(field: Field): string | null;
291
+ addRule(parent?: RuleSet): void;
292
+ removeRule(rule: Rule, parent?: RuleSet): void;
293
+ addRuleSet(parent?: RuleSet): void;
294
+ removeRuleSet(ruleset?: RuleSet, parent?: RuleSet): void;
295
+ transitionEnd(e: Event): void;
296
+ toggleCollapse(): void;
297
+ computedTreeContainerHeight(): void;
298
+ changeCondition(value: string): void;
299
+ changeOperator(rule: Rule): void;
300
+ coerceValueForOperator(operator: string, value: any, rule: Rule): any;
301
+ changeInput(): void;
302
+ changeField(fieldValue: string, rule: Rule): void;
303
+ changeEntity(entityValue: string, rule: Rule, index: number, data: RuleSet): void;
304
+ getDefaultValue(defaultValue: any): any;
305
+ getOperatorTemplate(): TemplateRef<any> | null;
306
+ getFieldTemplate(): TemplateRef<any> | null;
307
+ getEntityTemplate(): TemplateRef<any> | null;
308
+ getArrowIconTemplate(): TemplateRef<any> | null;
309
+ getButtonGroupTemplate(): TemplateRef<any> | null;
310
+ getSwitchGroupTemplate(): TemplateRef<any> | null;
311
+ getRemoveButtonTemplate(): TemplateRef<any> | null;
312
+ getEmptyWarningTemplate(): TemplateRef<any> | null;
313
+ getQueryItemClassName(local: LocalRuleMeta): string;
314
+ getButtonGroupContext(): ButtonGroupContext;
315
+ getRemoveButtonContext(rule: Rule): RemoveButtonContext;
316
+ getFieldContext(rule: Rule): FieldContext;
317
+ getEntityContext(rule: Rule): EntityContext;
318
+ getSwitchGroupContext(): SwitchGroupContext;
319
+ getArrowIconContext(): ArrowIconContext;
320
+ getEmptyWarningContext(): EmptyWarningContext;
321
+ getOperatorContext(rule: Rule): OperatorContext;
322
+ getInputContext(rule: Rule): InputContext;
323
+ private calculateFieldChangeValue;
324
+ private checkEmptyRuleInRuleset;
325
+ private validateRulesInRuleset;
326
+ private handleDataChange;
327
+ private handleTouched;
328
+ static ɵfac: i0.ɵɵFactoryDeclaration<QueryBuilderComponent, never>;
329
+ static ɵcmp: i0.ɵɵComponentDeclaration<QueryBuilderComponent, "query-builder", never, {
330
+ "disabled": {
331
+ "alias": "disabled";
332
+ "required": false;
228
333
  };
229
- disabled: boolean;
230
- data: RuleSet;
231
- get condition(): string;
232
- onChangeCallback: () => void;
233
- onTouchedCallback: () => any;
234
- allowRuleset: boolean;
235
- allowCollapse: boolean;
236
- emptyMessage: string;
237
- classNames: QueryBuilderClassNames;
238
- operatorMap: {
239
- [key: string]: string[];
334
+ "data": {
335
+ "alias": "data";
336
+ "required": false;
240
337
  };
241
- parentValue?: RuleSet;
242
- config: QueryBuilderConfig;
243
- parentArrowIconTemplate: QueryArrowIconDirective;
244
- parentInputTemplates: QueryList<QueryInputDirective>;
245
- parentOperatorTemplate: QueryOperatorDirective;
246
- parentFieldTemplate: QueryFieldDirective;
247
- parentEntityTemplate: QueryEntityDirective;
248
- parentSwitchGroupTemplate: QuerySwitchGroupDirective;
249
- parentButtonGroupTemplate: QueryButtonGroupDirective;
250
- parentRemoveButtonTemplate: QueryRemoveButtonDirective;
251
- parentEmptyWarningTemplate: QueryEmptyWarningDirective;
252
- parentChangeCallback: () => void;
253
- parentTouchedCallback: () => void;
254
- persistValueOnFieldChange: boolean;
255
- treeContainer: ElementRef;
256
- buttonGroupTemplate: QueryButtonGroupDirective;
257
- switchGroupTemplate: QuerySwitchGroupDirective;
258
- fieldTemplate: QueryFieldDirective;
259
- entityTemplate: QueryEntityDirective;
260
- operatorTemplate: QueryOperatorDirective;
261
- removeButtonTemplate: QueryRemoveButtonDirective;
262
- emptyWarningTemplate: QueryEmptyWarningDirective;
263
- inputTemplates: QueryList<QueryInputDirective>;
264
- arrowIconTemplate: QueryArrowIconDirective;
265
- private defaultTemplateTypes;
266
- private defaultPersistValueTypes;
267
- private defaultEmptyList;
268
- private operatorsCache;
269
- private inputContextCache;
270
- private operatorContextCache;
271
- private fieldContextCache;
272
- private entityContextCache;
273
- private removeButtonContextCache;
274
- private buttonGroupContext;
275
- constructor(changeDetectorRef: ChangeDetectorRef);
276
- ngOnChanges(changes: SimpleChanges): void;
277
- validate(control: AbstractControl): ValidationErrors | null;
278
- get value(): RuleSet;
279
- set value(value: RuleSet);
280
- writeValue(obj: any): void;
281
- registerOnChange(fn: any): void;
282
- registerOnTouched(fn: any): void;
283
- setDisabledState(isDisabled: boolean): void;
284
- getDisabledState: () => boolean;
285
- findTemplateForRule(rule: Rule): TemplateRef<any> | any;
286
- findQueryInput(type: string): QueryInputDirective;
287
- getOperators(field: string): string[];
288
- getFields(entity: string): Field[];
289
- getInputType(field: string, operator: string): string | null;
290
- getOptions(field: string): Option[];
291
- getClassNames(...args: string[]): any | string[];
292
- getDefaultField(entity: Entity): Field | null;
293
- getDefaultOperator(field: Field): string | null;
294
- addRule(parent?: RuleSet): void;
295
- removeRule(rule: Rule, parent?: RuleSet): void;
296
- addRuleSet(parent?: RuleSet): void;
297
- removeRuleSet(ruleset?: RuleSet, parent?: RuleSet): void;
298
- transitionEnd(e: Event): void;
299
- toggleCollapse(): void;
300
- computedTreeContainerHeight(): void;
301
- changeCondition(value: string): void;
302
- changeOperator(rule: Rule): void;
303
- coerceValueForOperator(operator: string, value: any, rule: Rule): any;
304
- changeInput(): void;
305
- changeField(fieldValue: string, rule: Rule): void;
306
- changeEntity(entityValue: string, rule: Rule, index: number, data: RuleSet): void;
307
- getDefaultValue(defaultValue: any): any;
308
- getOperatorTemplate(): TemplateRef<any> | null;
309
- getFieldTemplate(): TemplateRef<any> | null;
310
- getEntityTemplate(): TemplateRef<any> | null;
311
- getArrowIconTemplate(): TemplateRef<any> | null;
312
- getButtonGroupTemplate(): TemplateRef<any> | null;
313
- getSwitchGroupTemplate(): TemplateRef<any> | null;
314
- getRemoveButtonTemplate(): TemplateRef<any> | null;
315
- getEmptyWarningTemplate(): TemplateRef<any> | null;
316
- getQueryItemClassName(local: LocalRuleMeta): string;
317
- getButtonGroupContext(): ButtonGroupContext;
318
- getRemoveButtonContext(rule: Rule): RemoveButtonContext;
319
- getFieldContext(rule: Rule): FieldContext;
320
- getEntityContext(rule: Rule): EntityContext;
321
- getSwitchGroupContext(): SwitchGroupContext;
322
- getArrowIconContext(): ArrowIconContext;
323
- getEmptyWarningContext(): EmptyWarningContext;
324
- getOperatorContext(rule: Rule): OperatorContext;
325
- getInputContext(rule: Rule): InputContext;
326
- private calculateFieldChangeValue;
327
- private checkEmptyRuleInRuleset;
328
- private validateRulesInRuleset;
329
- private handleDataChange;
330
- private handleTouched;
331
- static ɵfac: i0.ɵɵFactoryDeclaration<QueryBuilderComponent, never>;
332
- static ɵcmp: i0.ɵɵComponentDeclaration<QueryBuilderComponent, "query-builder", never, { "disabled": { "alias": "disabled"; "required": false; }; "data": { "alias": "data"; "required": false; }; "allowRuleset": { "alias": "allowRuleset"; "required": false; }; "allowCollapse": { "alias": "allowCollapse"; "required": false; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; }; "classNames": { "alias": "classNames"; "required": false; }; "operatorMap": { "alias": "operatorMap"; "required": false; }; "parentValue": { "alias": "parentValue"; "required": false; }; "config": { "alias": "config"; "required": false; }; "parentArrowIconTemplate": { "alias": "parentArrowIconTemplate"; "required": false; }; "parentInputTemplates": { "alias": "parentInputTemplates"; "required": false; }; "parentOperatorTemplate": { "alias": "parentOperatorTemplate"; "required": false; }; "parentFieldTemplate": { "alias": "parentFieldTemplate"; "required": false; }; "parentEntityTemplate": { "alias": "parentEntityTemplate"; "required": false; }; "parentSwitchGroupTemplate": { "alias": "parentSwitchGroupTemplate"; "required": false; }; "parentButtonGroupTemplate": { "alias": "parentButtonGroupTemplate"; "required": false; }; "parentRemoveButtonTemplate": { "alias": "parentRemoveButtonTemplate"; "required": false; }; "parentEmptyWarningTemplate": { "alias": "parentEmptyWarningTemplate"; "required": false; }; "parentChangeCallback": { "alias": "parentChangeCallback"; "required": false; }; "parentTouchedCallback": { "alias": "parentTouchedCallback"; "required": false; }; "persistValueOnFieldChange": { "alias": "persistValueOnFieldChange"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, {}, ["buttonGroupTemplate", "switchGroupTemplate", "fieldTemplate", "entityTemplate", "operatorTemplate", "removeButtonTemplate", "emptyWarningTemplate", "arrowIconTemplate", "inputTemplates"], never, false, never>;
333
- }
334
-
335
- declare class NgxAngularQueryBuilderModule {
336
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxAngularQueryBuilderModule, never>;
337
- static ɵmod: i0.ɵɵNgModuleDeclaration<NgxAngularQueryBuilderModule, [typeof QueryBuilderComponent, typeof QueryInputDirective, typeof QueryOperatorDirective, typeof QueryFieldDirective, typeof QueryEntityDirective, typeof QueryButtonGroupDirective, typeof QuerySwitchGroupDirective, typeof QueryRemoveButtonDirective, typeof QueryEmptyWarningDirective, typeof QueryArrowIconDirective], [typeof i11.CommonModule, typeof i12.FormsModule], [typeof QueryBuilderComponent, typeof QueryInputDirective, typeof QueryOperatorDirective, typeof QueryFieldDirective, typeof QueryEntityDirective, typeof QueryButtonGroupDirective, typeof QuerySwitchGroupDirective, typeof QueryRemoveButtonDirective, typeof QueryEmptyWarningDirective, typeof QueryArrowIconDirective]>;
338
- static ɵinj: i0.ɵɵInjectorDeclaration<NgxAngularQueryBuilderModule>;
338
+ "allowRuleset": {
339
+ "alias": "allowRuleset";
340
+ "required": false;
341
+ };
342
+ "allowCollapse": {
343
+ "alias": "allowCollapse";
344
+ "required": false;
345
+ };
346
+ "emptyMessage": {
347
+ "alias": "emptyMessage";
348
+ "required": false;
349
+ };
350
+ "classNames": {
351
+ "alias": "classNames";
352
+ "required": false;
353
+ };
354
+ "operatorMap": {
355
+ "alias": "operatorMap";
356
+ "required": false;
357
+ };
358
+ "parentValue": {
359
+ "alias": "parentValue";
360
+ "required": false;
361
+ };
362
+ "config": {
363
+ "alias": "config";
364
+ "required": false;
365
+ };
366
+ "parentArrowIconTemplate": {
367
+ "alias": "parentArrowIconTemplate";
368
+ "required": false;
369
+ };
370
+ "parentInputTemplates": {
371
+ "alias": "parentInputTemplates";
372
+ "required": false;
373
+ };
374
+ "parentOperatorTemplate": {
375
+ "alias": "parentOperatorTemplate";
376
+ "required": false;
377
+ };
378
+ "parentFieldTemplate": {
379
+ "alias": "parentFieldTemplate";
380
+ "required": false;
381
+ };
382
+ "parentEntityTemplate": {
383
+ "alias": "parentEntityTemplate";
384
+ "required": false;
385
+ };
386
+ "parentSwitchGroupTemplate": {
387
+ "alias": "parentSwitchGroupTemplate";
388
+ "required": false;
389
+ };
390
+ "parentButtonGroupTemplate": {
391
+ "alias": "parentButtonGroupTemplate";
392
+ "required": false;
393
+ };
394
+ "parentRemoveButtonTemplate": {
395
+ "alias": "parentRemoveButtonTemplate";
396
+ "required": false;
397
+ };
398
+ "parentEmptyWarningTemplate": {
399
+ "alias": "parentEmptyWarningTemplate";
400
+ "required": false;
401
+ };
402
+ "parentChangeCallback": {
403
+ "alias": "parentChangeCallback";
404
+ "required": false;
405
+ };
406
+ "parentTouchedCallback": {
407
+ "alias": "parentTouchedCallback";
408
+ "required": false;
409
+ };
410
+ "persistValueOnFieldChange": {
411
+ "alias": "persistValueOnFieldChange";
412
+ "required": false;
413
+ };
414
+ "value": {
415
+ "alias": "value";
416
+ "required": false;
417
+ };
418
+ }, {}, ["buttonGroupTemplate", "switchGroupTemplate", "fieldTemplate", "entityTemplate", "operatorTemplate", "removeButtonTemplate", "emptyWarningTemplate", "arrowIconTemplate", "inputTemplates"], never, false, never>;
339
419
  }
340
-
341
- export { CONTROL_VALUE_ACCESSOR, NgxAngularQueryBuilderModule, QueryArrowIconDirective, QueryBuilderComponent, QueryButtonGroupDirective, QueryEmptyWarningDirective, QueryEntityDirective, QueryFieldDirective, QueryInputDirective, QueryOperatorDirective, QueryRemoveButtonDirective, QuerySwitchGroupDirective, VALIDATOR };
342
- export type { ArrowIconContext, ButtonGroupContext, EmptyWarningContext, Entity, EntityContext, EntityMap, Field, FieldContext, FieldMap, InputContext, LocalRuleMeta, OperatorContext, Option, QueryBuilderClassNames, QueryBuilderConfig, RemoveButtonContext, Rule, RuleSet, SwitchGroupContext };
420
+ export declare class NgxAngularQueryBuilderModule {
421
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxAngularQueryBuilderModule, never>;
422
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NgxAngularQueryBuilderModule, [typeof QueryBuilderComponent, typeof QueryInputDirective, typeof QueryOperatorDirective, typeof QueryFieldDirective, typeof QueryEntityDirective, typeof QueryButtonGroupDirective, typeof QuerySwitchGroupDirective, typeof QueryRemoveButtonDirective, typeof QueryEmptyWarningDirective, typeof QueryArrowIconDirective], [typeof i11.CommonModule, typeof i12.FormsModule], [typeof QueryBuilderComponent, typeof QueryInputDirective, typeof QueryOperatorDirective, typeof QueryFieldDirective, typeof QueryEntityDirective, typeof QueryButtonGroupDirective, typeof QuerySwitchGroupDirective, typeof QueryRemoveButtonDirective, typeof QueryEmptyWarningDirective, typeof QueryArrowIconDirective]>;
423
+ static ɵinj: i0.ɵɵInjectorDeclaration<NgxAngularQueryBuilderModule>;
424
+ }