ngx-angular-query-builder 17.0.0 → 18.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/{esm2020 → esm2022}/lib/ngx-angular-query-builder.module.mjs +68 -68
- package/{esm2020 → esm2022}/lib/query-builder/query-arrow-icon.directive.mjs +14 -14
- package/esm2022/lib/query-builder/query-builder.component.mjs +758 -0
- package/{esm2020 → esm2022}/lib/query-builder/query-builder.interfaces.mjs +1 -1
- package/{esm2020 → esm2022}/lib/query-builder/query-button-group.directive.mjs +14 -14
- package/{esm2020 → esm2022}/lib/query-builder/query-empty-warning.directive.mjs +14 -14
- package/{esm2020 → esm2022}/lib/query-builder/query-entity.directive.mjs +14 -14
- package/{esm2020 → esm2022}/lib/query-builder/query-field.directive.mjs +14 -14
- package/esm2022/lib/query-builder/query-input.directive.mjs +28 -0
- package/{esm2020 → esm2022}/lib/query-builder/query-operator.directive.mjs +14 -14
- package/{esm2020 → esm2022}/lib/query-builder/query-remove-button.directive.mjs +14 -14
- package/{esm2020 → esm2022}/lib/query-builder/query-switch-group.directive.mjs +14 -14
- package/{esm2020 → esm2022}/ngx-angular-query-builder.mjs +4 -4
- package/{esm2020 → esm2022}/public-api.mjs +15 -15
- package/{fesm2020 → fesm2022}/ngx-angular-query-builder.mjs +910 -910
- package/{fesm2020 → fesm2022}/ngx-angular-query-builder.mjs.map +1 -1
- package/index.d.ts +5 -5
- package/lib/ngx-angular-query-builder.module.d.ts +18 -18
- package/lib/query-builder/query-arrow-icon.directive.d.ts +8 -8
- package/lib/query-builder/query-builder.component.d.ts +129 -129
- package/lib/query-builder/query-builder.interfaces.d.ts +143 -143
- package/lib/query-builder/query-button-group.directive.d.ts +8 -8
- package/lib/query-builder/query-empty-warning.directive.d.ts +8 -8
- package/lib/query-builder/query-entity.directive.d.ts +8 -8
- package/lib/query-builder/query-field.directive.d.ts +8 -8
- package/lib/query-builder/query-input.directive.d.ts +12 -12
- package/lib/query-builder/query-operator.directive.d.ts +8 -8
- package/lib/query-builder/query-remove-button.directive.d.ts +8 -8
- package/lib/query-builder/query-switch-group.directive.d.ts +8 -8
- package/package.json +7 -13
- package/public-api.d.ts +12 -12
- package/esm2020/lib/query-builder/query-builder.component.mjs +0 -758
- package/esm2020/lib/query-builder/query-input.directive.mjs +0 -28
- package/fesm2015/ngx-angular-query-builder.mjs +0 -939
- package/fesm2015/ngx-angular-query-builder.mjs.map +0 -1
|
@@ -1,129 +1,129 @@
|
|
|
1
|
-
import { AbstractControl, ControlValueAccessor, ValidationErrors, Validator } from "@angular/forms";
|
|
2
|
-
import { QueryOperatorDirective } from "./query-operator.directive";
|
|
3
|
-
import { QueryFieldDirective } from "./query-field.directive";
|
|
4
|
-
import { QueryEntityDirective } from "./query-entity.directive";
|
|
5
|
-
import { QuerySwitchGroupDirective } from "./query-switch-group.directive";
|
|
6
|
-
import { QueryButtonGroupDirective } from "./query-button-group.directive";
|
|
7
|
-
import { QueryInputDirective } from "./query-input.directive";
|
|
8
|
-
import { QueryRemoveButtonDirective } from "./query-remove-button.directive";
|
|
9
|
-
import { QueryEmptyWarningDirective } from "./query-empty-warning.directive";
|
|
10
|
-
import { QueryArrowIconDirective } from "./query-arrow-icon.directive";
|
|
11
|
-
import { ButtonGroupContext, Entity, Field, SwitchGroupContext, EntityContext, FieldContext, InputContext, LocalRuleMeta, OperatorContext, Option, QueryBuilderClassNames, QueryBuilderConfig, RemoveButtonContext, ArrowIconContext, Rule, RuleSet, EmptyWarningContext } from "./query-builder.interfaces";
|
|
12
|
-
import { ChangeDetectorRef, OnChanges, QueryList, SimpleChanges, TemplateRef, ElementRef } from "@angular/core";
|
|
13
|
-
import * as i0 from "@angular/core";
|
|
14
|
-
export declare const CONTROL_VALUE_ACCESSOR: any;
|
|
15
|
-
export declare const VALIDATOR: any;
|
|
16
|
-
export declare class QueryBuilderComponent implements OnChanges, ControlValueAccessor, Validator {
|
|
17
|
-
private changeDetectorRef;
|
|
18
|
-
fields: Field[];
|
|
19
|
-
filterFields: Field[];
|
|
20
|
-
entities: Entity[];
|
|
21
|
-
defaultClassNames: QueryBuilderClassNames;
|
|
22
|
-
defaultOperatorMap: {
|
|
23
|
-
[key: string]: string[];
|
|
24
|
-
};
|
|
25
|
-
disabled: boolean;
|
|
26
|
-
data: RuleSet;
|
|
27
|
-
get condition(): string;
|
|
28
|
-
onChangeCallback: () => void;
|
|
29
|
-
onTouchedCallback: () => any;
|
|
30
|
-
allowRuleset: boolean;
|
|
31
|
-
allowCollapse: boolean;
|
|
32
|
-
emptyMessage: string;
|
|
33
|
-
classNames: QueryBuilderClassNames;
|
|
34
|
-
operatorMap: {
|
|
35
|
-
[key: string]: string[];
|
|
36
|
-
};
|
|
37
|
-
parentValue?: RuleSet;
|
|
38
|
-
config: QueryBuilderConfig;
|
|
39
|
-
parentArrowIconTemplate: QueryArrowIconDirective;
|
|
40
|
-
parentInputTemplates: QueryList<QueryInputDirective>;
|
|
41
|
-
parentOperatorTemplate: QueryOperatorDirective;
|
|
42
|
-
parentFieldTemplate: QueryFieldDirective;
|
|
43
|
-
parentEntityTemplate: QueryEntityDirective;
|
|
44
|
-
parentSwitchGroupTemplate: QuerySwitchGroupDirective;
|
|
45
|
-
parentButtonGroupTemplate: QueryButtonGroupDirective;
|
|
46
|
-
parentRemoveButtonTemplate: QueryRemoveButtonDirective;
|
|
47
|
-
parentEmptyWarningTemplate: QueryEmptyWarningDirective;
|
|
48
|
-
parentChangeCallback: () => void;
|
|
49
|
-
parentTouchedCallback: () => void;
|
|
50
|
-
persistValueOnFieldChange: boolean;
|
|
51
|
-
treeContainer: ElementRef;
|
|
52
|
-
buttonGroupTemplate: QueryButtonGroupDirective;
|
|
53
|
-
switchGroupTemplate: QuerySwitchGroupDirective;
|
|
54
|
-
fieldTemplate: QueryFieldDirective;
|
|
55
|
-
entityTemplate: QueryEntityDirective;
|
|
56
|
-
operatorTemplate: QueryOperatorDirective;
|
|
57
|
-
removeButtonTemplate: QueryRemoveButtonDirective;
|
|
58
|
-
emptyWarningTemplate: QueryEmptyWarningDirective;
|
|
59
|
-
inputTemplates: QueryList<QueryInputDirective>;
|
|
60
|
-
arrowIconTemplate: QueryArrowIconDirective;
|
|
61
|
-
private defaultTemplateTypes;
|
|
62
|
-
private defaultPersistValueTypes;
|
|
63
|
-
private defaultEmptyList;
|
|
64
|
-
private operatorsCache;
|
|
65
|
-
private inputContextCache;
|
|
66
|
-
private operatorContextCache;
|
|
67
|
-
private fieldContextCache;
|
|
68
|
-
private entityContextCache;
|
|
69
|
-
private removeButtonContextCache;
|
|
70
|
-
private buttonGroupContext;
|
|
71
|
-
constructor(changeDetectorRef: ChangeDetectorRef);
|
|
72
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
73
|
-
validate(control: AbstractControl): ValidationErrors | null;
|
|
74
|
-
get value(): RuleSet;
|
|
75
|
-
set value(value: RuleSet);
|
|
76
|
-
writeValue(obj: any): void;
|
|
77
|
-
registerOnChange(fn: any): void;
|
|
78
|
-
registerOnTouched(fn: any): void;
|
|
79
|
-
setDisabledState(isDisabled: boolean): void;
|
|
80
|
-
getDisabledState: () => boolean;
|
|
81
|
-
findTemplateForRule(rule: Rule): TemplateRef<any> | any;
|
|
82
|
-
findQueryInput(type: string): QueryInputDirective;
|
|
83
|
-
getOperators(field: string): string[];
|
|
84
|
-
getFields(entity: string): Field[];
|
|
85
|
-
getInputType(field: string, operator: string): string | null;
|
|
86
|
-
getOptions(field: string): Option[];
|
|
87
|
-
getClassNames(...args: string[]): any | string[];
|
|
88
|
-
getDefaultField(entity: Entity): Field | null;
|
|
89
|
-
getDefaultOperator(field: Field): string | null;
|
|
90
|
-
addRule(parent?: RuleSet): void;
|
|
91
|
-
removeRule(rule: Rule, parent?: RuleSet): void;
|
|
92
|
-
addRuleSet(parent?: RuleSet): void;
|
|
93
|
-
removeRuleSet(ruleset?: RuleSet, parent?: RuleSet): void;
|
|
94
|
-
transitionEnd(e: Event): void;
|
|
95
|
-
toggleCollapse(): void;
|
|
96
|
-
computedTreeContainerHeight(): void;
|
|
97
|
-
changeCondition(value: string): void;
|
|
98
|
-
changeOperator(rule: Rule): void;
|
|
99
|
-
coerceValueForOperator(operator: string, value: any, rule: Rule): any;
|
|
100
|
-
changeInput(): void;
|
|
101
|
-
changeField(fieldValue: string, rule: Rule): void;
|
|
102
|
-
changeEntity(entityValue: string, rule: Rule, index: number, data: RuleSet): void;
|
|
103
|
-
getDefaultValue(defaultValue: any): any;
|
|
104
|
-
getOperatorTemplate(): TemplateRef<any> | null;
|
|
105
|
-
getFieldTemplate(): TemplateRef<any> | null;
|
|
106
|
-
getEntityTemplate(): TemplateRef<any> | null;
|
|
107
|
-
getArrowIconTemplate(): TemplateRef<any> | null;
|
|
108
|
-
getButtonGroupTemplate(): TemplateRef<any> | null;
|
|
109
|
-
getSwitchGroupTemplate(): TemplateRef<any> | null;
|
|
110
|
-
getRemoveButtonTemplate(): TemplateRef<any> | null;
|
|
111
|
-
getEmptyWarningTemplate(): TemplateRef<any> | null;
|
|
112
|
-
getQueryItemClassName(local: LocalRuleMeta): string;
|
|
113
|
-
getButtonGroupContext(): ButtonGroupContext;
|
|
114
|
-
getRemoveButtonContext(rule: Rule): RemoveButtonContext;
|
|
115
|
-
getFieldContext(rule: Rule): FieldContext;
|
|
116
|
-
getEntityContext(rule: Rule): EntityContext;
|
|
117
|
-
getSwitchGroupContext(): SwitchGroupContext;
|
|
118
|
-
getArrowIconContext(): ArrowIconContext;
|
|
119
|
-
getEmptyWarningContext(): EmptyWarningContext;
|
|
120
|
-
getOperatorContext(rule: Rule): OperatorContext;
|
|
121
|
-
getInputContext(rule: Rule): InputContext;
|
|
122
|
-
private calculateFieldChangeValue;
|
|
123
|
-
private checkEmptyRuleInRuleset;
|
|
124
|
-
private validateRulesInRuleset;
|
|
125
|
-
private handleDataChange;
|
|
126
|
-
private handleTouched;
|
|
127
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<QueryBuilderComponent, never>;
|
|
128
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<QueryBuilderComponent, "query-builder", never, { "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"; }, {}, ["buttonGroupTemplate", "switchGroupTemplate", "fieldTemplate", "entityTemplate", "operatorTemplate", "removeButtonTemplate", "emptyWarningTemplate", "arrowIconTemplate", "inputTemplates"], never, false, never>;
|
|
129
|
-
}
|
|
1
|
+
import { AbstractControl, ControlValueAccessor, ValidationErrors, Validator } from "@angular/forms";
|
|
2
|
+
import { QueryOperatorDirective } from "./query-operator.directive";
|
|
3
|
+
import { QueryFieldDirective } from "./query-field.directive";
|
|
4
|
+
import { QueryEntityDirective } from "./query-entity.directive";
|
|
5
|
+
import { QuerySwitchGroupDirective } from "./query-switch-group.directive";
|
|
6
|
+
import { QueryButtonGroupDirective } from "./query-button-group.directive";
|
|
7
|
+
import { QueryInputDirective } from "./query-input.directive";
|
|
8
|
+
import { QueryRemoveButtonDirective } from "./query-remove-button.directive";
|
|
9
|
+
import { QueryEmptyWarningDirective } from "./query-empty-warning.directive";
|
|
10
|
+
import { QueryArrowIconDirective } from "./query-arrow-icon.directive";
|
|
11
|
+
import { ButtonGroupContext, Entity, Field, SwitchGroupContext, EntityContext, FieldContext, InputContext, LocalRuleMeta, OperatorContext, Option, QueryBuilderClassNames, QueryBuilderConfig, RemoveButtonContext, ArrowIconContext, Rule, RuleSet, EmptyWarningContext } from "./query-builder.interfaces";
|
|
12
|
+
import { ChangeDetectorRef, OnChanges, QueryList, SimpleChanges, TemplateRef, ElementRef } from "@angular/core";
|
|
13
|
+
import * as i0 from "@angular/core";
|
|
14
|
+
export declare const CONTROL_VALUE_ACCESSOR: any;
|
|
15
|
+
export declare const VALIDATOR: any;
|
|
16
|
+
export declare class QueryBuilderComponent implements OnChanges, ControlValueAccessor, Validator {
|
|
17
|
+
private changeDetectorRef;
|
|
18
|
+
fields: Field[];
|
|
19
|
+
filterFields: Field[];
|
|
20
|
+
entities: Entity[];
|
|
21
|
+
defaultClassNames: QueryBuilderClassNames;
|
|
22
|
+
defaultOperatorMap: {
|
|
23
|
+
[key: string]: string[];
|
|
24
|
+
};
|
|
25
|
+
disabled: boolean;
|
|
26
|
+
data: RuleSet;
|
|
27
|
+
get condition(): string;
|
|
28
|
+
onChangeCallback: () => void;
|
|
29
|
+
onTouchedCallback: () => any;
|
|
30
|
+
allowRuleset: boolean;
|
|
31
|
+
allowCollapse: boolean;
|
|
32
|
+
emptyMessage: string;
|
|
33
|
+
classNames: QueryBuilderClassNames;
|
|
34
|
+
operatorMap: {
|
|
35
|
+
[key: string]: string[];
|
|
36
|
+
};
|
|
37
|
+
parentValue?: RuleSet;
|
|
38
|
+
config: QueryBuilderConfig;
|
|
39
|
+
parentArrowIconTemplate: QueryArrowIconDirective;
|
|
40
|
+
parentInputTemplates: QueryList<QueryInputDirective>;
|
|
41
|
+
parentOperatorTemplate: QueryOperatorDirective;
|
|
42
|
+
parentFieldTemplate: QueryFieldDirective;
|
|
43
|
+
parentEntityTemplate: QueryEntityDirective;
|
|
44
|
+
parentSwitchGroupTemplate: QuerySwitchGroupDirective;
|
|
45
|
+
parentButtonGroupTemplate: QueryButtonGroupDirective;
|
|
46
|
+
parentRemoveButtonTemplate: QueryRemoveButtonDirective;
|
|
47
|
+
parentEmptyWarningTemplate: QueryEmptyWarningDirective;
|
|
48
|
+
parentChangeCallback: () => void;
|
|
49
|
+
parentTouchedCallback: () => void;
|
|
50
|
+
persistValueOnFieldChange: boolean;
|
|
51
|
+
treeContainer: ElementRef;
|
|
52
|
+
buttonGroupTemplate: QueryButtonGroupDirective;
|
|
53
|
+
switchGroupTemplate: QuerySwitchGroupDirective;
|
|
54
|
+
fieldTemplate: QueryFieldDirective;
|
|
55
|
+
entityTemplate: QueryEntityDirective;
|
|
56
|
+
operatorTemplate: QueryOperatorDirective;
|
|
57
|
+
removeButtonTemplate: QueryRemoveButtonDirective;
|
|
58
|
+
emptyWarningTemplate: QueryEmptyWarningDirective;
|
|
59
|
+
inputTemplates: QueryList<QueryInputDirective>;
|
|
60
|
+
arrowIconTemplate: QueryArrowIconDirective;
|
|
61
|
+
private defaultTemplateTypes;
|
|
62
|
+
private defaultPersistValueTypes;
|
|
63
|
+
private defaultEmptyList;
|
|
64
|
+
private operatorsCache;
|
|
65
|
+
private inputContextCache;
|
|
66
|
+
private operatorContextCache;
|
|
67
|
+
private fieldContextCache;
|
|
68
|
+
private entityContextCache;
|
|
69
|
+
private removeButtonContextCache;
|
|
70
|
+
private buttonGroupContext;
|
|
71
|
+
constructor(changeDetectorRef: ChangeDetectorRef);
|
|
72
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
73
|
+
validate(control: AbstractControl): ValidationErrors | null;
|
|
74
|
+
get value(): RuleSet;
|
|
75
|
+
set value(value: RuleSet);
|
|
76
|
+
writeValue(obj: any): void;
|
|
77
|
+
registerOnChange(fn: any): void;
|
|
78
|
+
registerOnTouched(fn: any): void;
|
|
79
|
+
setDisabledState(isDisabled: boolean): void;
|
|
80
|
+
getDisabledState: () => boolean;
|
|
81
|
+
findTemplateForRule(rule: Rule): TemplateRef<any> | any;
|
|
82
|
+
findQueryInput(type: string): QueryInputDirective;
|
|
83
|
+
getOperators(field: string): string[];
|
|
84
|
+
getFields(entity: string): Field[];
|
|
85
|
+
getInputType(field: string, operator: string): string | null;
|
|
86
|
+
getOptions(field: string): Option[];
|
|
87
|
+
getClassNames(...args: string[]): any | string[];
|
|
88
|
+
getDefaultField(entity: Entity): Field | null;
|
|
89
|
+
getDefaultOperator(field: Field): string | null;
|
|
90
|
+
addRule(parent?: RuleSet): void;
|
|
91
|
+
removeRule(rule: Rule, parent?: RuleSet): void;
|
|
92
|
+
addRuleSet(parent?: RuleSet): void;
|
|
93
|
+
removeRuleSet(ruleset?: RuleSet, parent?: RuleSet): void;
|
|
94
|
+
transitionEnd(e: Event): void;
|
|
95
|
+
toggleCollapse(): void;
|
|
96
|
+
computedTreeContainerHeight(): void;
|
|
97
|
+
changeCondition(value: string): void;
|
|
98
|
+
changeOperator(rule: Rule): void;
|
|
99
|
+
coerceValueForOperator(operator: string, value: any, rule: Rule): any;
|
|
100
|
+
changeInput(): void;
|
|
101
|
+
changeField(fieldValue: string, rule: Rule): void;
|
|
102
|
+
changeEntity(entityValue: string, rule: Rule, index: number, data: RuleSet): void;
|
|
103
|
+
getDefaultValue(defaultValue: any): any;
|
|
104
|
+
getOperatorTemplate(): TemplateRef<any> | null;
|
|
105
|
+
getFieldTemplate(): TemplateRef<any> | null;
|
|
106
|
+
getEntityTemplate(): TemplateRef<any> | null;
|
|
107
|
+
getArrowIconTemplate(): TemplateRef<any> | null;
|
|
108
|
+
getButtonGroupTemplate(): TemplateRef<any> | null;
|
|
109
|
+
getSwitchGroupTemplate(): TemplateRef<any> | null;
|
|
110
|
+
getRemoveButtonTemplate(): TemplateRef<any> | null;
|
|
111
|
+
getEmptyWarningTemplate(): TemplateRef<any> | null;
|
|
112
|
+
getQueryItemClassName(local: LocalRuleMeta): string;
|
|
113
|
+
getButtonGroupContext(): ButtonGroupContext;
|
|
114
|
+
getRemoveButtonContext(rule: Rule): RemoveButtonContext;
|
|
115
|
+
getFieldContext(rule: Rule): FieldContext;
|
|
116
|
+
getEntityContext(rule: Rule): EntityContext;
|
|
117
|
+
getSwitchGroupContext(): SwitchGroupContext;
|
|
118
|
+
getArrowIconContext(): ArrowIconContext;
|
|
119
|
+
getEmptyWarningContext(): EmptyWarningContext;
|
|
120
|
+
getOperatorContext(rule: Rule): OperatorContext;
|
|
121
|
+
getInputContext(rule: Rule): InputContext;
|
|
122
|
+
private calculateFieldChangeValue;
|
|
123
|
+
private checkEmptyRuleInRuleset;
|
|
124
|
+
private validateRulesInRuleset;
|
|
125
|
+
private handleDataChange;
|
|
126
|
+
private handleTouched;
|
|
127
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QueryBuilderComponent, never>;
|
|
128
|
+
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>;
|
|
129
|
+
}
|
|
@@ -1,143 +1,143 @@
|
|
|
1
|
-
export interface RuleSet {
|
|
2
|
-
condition: string;
|
|
3
|
-
rules: Array<RuleSet | Rule | any>;
|
|
4
|
-
collapsed?: boolean;
|
|
5
|
-
isChild?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export interface Rule {
|
|
8
|
-
field: string;
|
|
9
|
-
value?: any;
|
|
10
|
-
operator?: string;
|
|
11
|
-
entity?: string;
|
|
12
|
-
}
|
|
13
|
-
export interface Option {
|
|
14
|
-
name: string;
|
|
15
|
-
value: any;
|
|
16
|
-
}
|
|
17
|
-
export interface FieldMap {
|
|
18
|
-
[key: string]: Field;
|
|
19
|
-
}
|
|
20
|
-
export interface Field {
|
|
21
|
-
name: string;
|
|
22
|
-
value?: string;
|
|
23
|
-
type: string;
|
|
24
|
-
nullable?: boolean;
|
|
25
|
-
options?: Option[];
|
|
26
|
-
operators?: string[];
|
|
27
|
-
defaultValue?: any;
|
|
28
|
-
defaultOperator?: any;
|
|
29
|
-
entity?: string;
|
|
30
|
-
validator?: (rule: Rule, parent: RuleSet) => any | null;
|
|
31
|
-
}
|
|
32
|
-
export interface LocalRuleMeta {
|
|
33
|
-
ruleset: boolean;
|
|
34
|
-
invalid: boolean;
|
|
35
|
-
}
|
|
36
|
-
export interface EntityMap {
|
|
37
|
-
[key: string]: Entity;
|
|
38
|
-
}
|
|
39
|
-
export interface Entity {
|
|
40
|
-
name: string;
|
|
41
|
-
value?: string;
|
|
42
|
-
defaultField?: any;
|
|
43
|
-
}
|
|
44
|
-
export interface QueryBuilderClassNames {
|
|
45
|
-
arrowIconButton?: string;
|
|
46
|
-
arrowIcon?: string;
|
|
47
|
-
removeIcon?: string;
|
|
48
|
-
addIcon?: string;
|
|
49
|
-
button?: string;
|
|
50
|
-
buttonGroup?: string;
|
|
51
|
-
removeButton?: string;
|
|
52
|
-
removeButtonSize?: string;
|
|
53
|
-
switchRow?: string;
|
|
54
|
-
switchGroup?: string;
|
|
55
|
-
switchLabel?: string;
|
|
56
|
-
switchRadio?: string;
|
|
57
|
-
switchControl?: string;
|
|
58
|
-
rightAlign?: string;
|
|
59
|
-
transition?: string;
|
|
60
|
-
collapsed?: string;
|
|
61
|
-
treeContainer?: string;
|
|
62
|
-
tree?: string;
|
|
63
|
-
row?: string;
|
|
64
|
-
connector?: string;
|
|
65
|
-
rule?: string;
|
|
66
|
-
ruleSet?: string;
|
|
67
|
-
invalidRuleSet?: string;
|
|
68
|
-
emptyWarning?: string;
|
|
69
|
-
fieldControl?: string;
|
|
70
|
-
fieldControlSize?: string;
|
|
71
|
-
entityControl?: string;
|
|
72
|
-
entityControlSize?: string;
|
|
73
|
-
operatorControl?: string;
|
|
74
|
-
operatorControlSize?: string;
|
|
75
|
-
inputControl?: string;
|
|
76
|
-
inputControlSize?: string;
|
|
77
|
-
}
|
|
78
|
-
export interface QueryBuilderConfig {
|
|
79
|
-
fields: FieldMap;
|
|
80
|
-
entities?: EntityMap;
|
|
81
|
-
allowEmptyRulesets?: boolean;
|
|
82
|
-
getOperators?: (fieldName: string, field: Field) => string[];
|
|
83
|
-
getInputType?: (field: string, operator: string) => string;
|
|
84
|
-
getOptions?: (field: string) => Option[];
|
|
85
|
-
addRuleSet?: (parent: RuleSet) => void;
|
|
86
|
-
addRule?: (parent: RuleSet) => void;
|
|
87
|
-
removeRuleSet?: (ruleset: RuleSet, parent?: RuleSet) => void;
|
|
88
|
-
removeRule?: (rule: Rule, parent: RuleSet) => void;
|
|
89
|
-
coerceValueForOperator?: (operator: string, value: any, rule: Rule) => any;
|
|
90
|
-
calculateFieldChangeValue?: (currentField: Field, nextField: Field, currentValue: any) => any;
|
|
91
|
-
}
|
|
92
|
-
export interface SwitchGroupContext {
|
|
93
|
-
onChange: (conditionValue: string) => void;
|
|
94
|
-
getDisabledState: () => boolean;
|
|
95
|
-
$implicit: RuleSet;
|
|
96
|
-
}
|
|
97
|
-
export interface EmptyWarningContext {
|
|
98
|
-
getDisabledState: () => boolean;
|
|
99
|
-
message: string;
|
|
100
|
-
$implicit: RuleSet;
|
|
101
|
-
}
|
|
102
|
-
export interface ArrowIconContext {
|
|
103
|
-
getDisabledState: () => boolean;
|
|
104
|
-
$implicit: RuleSet;
|
|
105
|
-
}
|
|
106
|
-
export interface EntityContext {
|
|
107
|
-
onChange: (entityValue: string, rule: Rule) => void;
|
|
108
|
-
getDisabledState: () => boolean;
|
|
109
|
-
entities: Entity[];
|
|
110
|
-
$implicit: Rule;
|
|
111
|
-
}
|
|
112
|
-
export interface FieldContext {
|
|
113
|
-
onChange: (fieldValue: string, rule: Rule) => void;
|
|
114
|
-
getFields: (entityName: string) => void;
|
|
115
|
-
getDisabledState: () => boolean;
|
|
116
|
-
fields: Field[];
|
|
117
|
-
$implicit: Rule;
|
|
118
|
-
}
|
|
119
|
-
export interface OperatorContext {
|
|
120
|
-
onChange: () => void;
|
|
121
|
-
getDisabledState: () => boolean;
|
|
122
|
-
operators: string[];
|
|
123
|
-
$implicit: Rule;
|
|
124
|
-
}
|
|
125
|
-
export interface InputContext {
|
|
126
|
-
onChange: () => void;
|
|
127
|
-
getDisabledState: () => boolean;
|
|
128
|
-
options: Option[];
|
|
129
|
-
field: Field;
|
|
130
|
-
$implicit: Rule;
|
|
131
|
-
}
|
|
132
|
-
export interface ButtonGroupContext {
|
|
133
|
-
addRule: () => void;
|
|
134
|
-
addRuleSet: () => void;
|
|
135
|
-
removeRuleSet: () => void;
|
|
136
|
-
getDisabledState: () => boolean;
|
|
137
|
-
$implicit: RuleSet;
|
|
138
|
-
}
|
|
139
|
-
export interface RemoveButtonContext {
|
|
140
|
-
removeRule: (rule: Rule) => void;
|
|
141
|
-
getDisabledState: () => boolean;
|
|
142
|
-
$implicit: Rule;
|
|
143
|
-
}
|
|
1
|
+
export interface RuleSet {
|
|
2
|
+
condition: string;
|
|
3
|
+
rules: Array<RuleSet | Rule | any>;
|
|
4
|
+
collapsed?: boolean;
|
|
5
|
+
isChild?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface Rule {
|
|
8
|
+
field: string;
|
|
9
|
+
value?: any;
|
|
10
|
+
operator?: string;
|
|
11
|
+
entity?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface Option {
|
|
14
|
+
name: string;
|
|
15
|
+
value: any;
|
|
16
|
+
}
|
|
17
|
+
export interface FieldMap {
|
|
18
|
+
[key: string]: Field;
|
|
19
|
+
}
|
|
20
|
+
export interface Field {
|
|
21
|
+
name: string;
|
|
22
|
+
value?: string;
|
|
23
|
+
type: string;
|
|
24
|
+
nullable?: boolean;
|
|
25
|
+
options?: Option[];
|
|
26
|
+
operators?: string[];
|
|
27
|
+
defaultValue?: any;
|
|
28
|
+
defaultOperator?: any;
|
|
29
|
+
entity?: string;
|
|
30
|
+
validator?: (rule: Rule, parent: RuleSet) => any | null;
|
|
31
|
+
}
|
|
32
|
+
export interface LocalRuleMeta {
|
|
33
|
+
ruleset: boolean;
|
|
34
|
+
invalid: boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface EntityMap {
|
|
37
|
+
[key: string]: Entity;
|
|
38
|
+
}
|
|
39
|
+
export interface Entity {
|
|
40
|
+
name: string;
|
|
41
|
+
value?: string;
|
|
42
|
+
defaultField?: any;
|
|
43
|
+
}
|
|
44
|
+
export interface QueryBuilderClassNames {
|
|
45
|
+
arrowIconButton?: string;
|
|
46
|
+
arrowIcon?: string;
|
|
47
|
+
removeIcon?: string;
|
|
48
|
+
addIcon?: string;
|
|
49
|
+
button?: string;
|
|
50
|
+
buttonGroup?: string;
|
|
51
|
+
removeButton?: string;
|
|
52
|
+
removeButtonSize?: string;
|
|
53
|
+
switchRow?: string;
|
|
54
|
+
switchGroup?: string;
|
|
55
|
+
switchLabel?: string;
|
|
56
|
+
switchRadio?: string;
|
|
57
|
+
switchControl?: string;
|
|
58
|
+
rightAlign?: string;
|
|
59
|
+
transition?: string;
|
|
60
|
+
collapsed?: string;
|
|
61
|
+
treeContainer?: string;
|
|
62
|
+
tree?: string;
|
|
63
|
+
row?: string;
|
|
64
|
+
connector?: string;
|
|
65
|
+
rule?: string;
|
|
66
|
+
ruleSet?: string;
|
|
67
|
+
invalidRuleSet?: string;
|
|
68
|
+
emptyWarning?: string;
|
|
69
|
+
fieldControl?: string;
|
|
70
|
+
fieldControlSize?: string;
|
|
71
|
+
entityControl?: string;
|
|
72
|
+
entityControlSize?: string;
|
|
73
|
+
operatorControl?: string;
|
|
74
|
+
operatorControlSize?: string;
|
|
75
|
+
inputControl?: string;
|
|
76
|
+
inputControlSize?: string;
|
|
77
|
+
}
|
|
78
|
+
export interface QueryBuilderConfig {
|
|
79
|
+
fields: FieldMap;
|
|
80
|
+
entities?: EntityMap;
|
|
81
|
+
allowEmptyRulesets?: boolean;
|
|
82
|
+
getOperators?: (fieldName: string, field: Field) => string[];
|
|
83
|
+
getInputType?: (field: string, operator: string) => string;
|
|
84
|
+
getOptions?: (field: string) => Option[];
|
|
85
|
+
addRuleSet?: (parent: RuleSet) => void;
|
|
86
|
+
addRule?: (parent: RuleSet) => void;
|
|
87
|
+
removeRuleSet?: (ruleset: RuleSet, parent?: RuleSet) => void;
|
|
88
|
+
removeRule?: (rule: Rule, parent: RuleSet) => void;
|
|
89
|
+
coerceValueForOperator?: (operator: string, value: any, rule: Rule) => any;
|
|
90
|
+
calculateFieldChangeValue?: (currentField: Field, nextField: Field, currentValue: any) => any;
|
|
91
|
+
}
|
|
92
|
+
export interface SwitchGroupContext {
|
|
93
|
+
onChange: (conditionValue: string) => void;
|
|
94
|
+
getDisabledState: () => boolean;
|
|
95
|
+
$implicit: RuleSet;
|
|
96
|
+
}
|
|
97
|
+
export interface EmptyWarningContext {
|
|
98
|
+
getDisabledState: () => boolean;
|
|
99
|
+
message: string;
|
|
100
|
+
$implicit: RuleSet;
|
|
101
|
+
}
|
|
102
|
+
export interface ArrowIconContext {
|
|
103
|
+
getDisabledState: () => boolean;
|
|
104
|
+
$implicit: RuleSet;
|
|
105
|
+
}
|
|
106
|
+
export interface EntityContext {
|
|
107
|
+
onChange: (entityValue: string, rule: Rule) => void;
|
|
108
|
+
getDisabledState: () => boolean;
|
|
109
|
+
entities: Entity[];
|
|
110
|
+
$implicit: Rule;
|
|
111
|
+
}
|
|
112
|
+
export interface FieldContext {
|
|
113
|
+
onChange: (fieldValue: string, rule: Rule) => void;
|
|
114
|
+
getFields: (entityName: string) => void;
|
|
115
|
+
getDisabledState: () => boolean;
|
|
116
|
+
fields: Field[];
|
|
117
|
+
$implicit: Rule;
|
|
118
|
+
}
|
|
119
|
+
export interface OperatorContext {
|
|
120
|
+
onChange: () => void;
|
|
121
|
+
getDisabledState: () => boolean;
|
|
122
|
+
operators: string[];
|
|
123
|
+
$implicit: Rule;
|
|
124
|
+
}
|
|
125
|
+
export interface InputContext {
|
|
126
|
+
onChange: () => void;
|
|
127
|
+
getDisabledState: () => boolean;
|
|
128
|
+
options: Option[];
|
|
129
|
+
field: Field;
|
|
130
|
+
$implicit: Rule;
|
|
131
|
+
}
|
|
132
|
+
export interface ButtonGroupContext {
|
|
133
|
+
addRule: () => void;
|
|
134
|
+
addRuleSet: () => void;
|
|
135
|
+
removeRuleSet: () => void;
|
|
136
|
+
getDisabledState: () => boolean;
|
|
137
|
+
$implicit: RuleSet;
|
|
138
|
+
}
|
|
139
|
+
export interface RemoveButtonContext {
|
|
140
|
+
removeRule: (rule: Rule) => void;
|
|
141
|
+
getDisabledState: () => boolean;
|
|
142
|
+
$implicit: Rule;
|
|
143
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { TemplateRef } from "@angular/core";
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class QueryButtonGroupDirective {
|
|
4
|
-
template: TemplateRef<any>;
|
|
5
|
-
constructor(template: TemplateRef<any>);
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<QueryButtonGroupDirective, never>;
|
|
7
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<QueryButtonGroupDirective, "[queryButtonGroup]", never, {}, {}, never, never, false, never>;
|
|
8
|
-
}
|
|
1
|
+
import { TemplateRef } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class QueryButtonGroupDirective {
|
|
4
|
+
template: TemplateRef<any>;
|
|
5
|
+
constructor(template: TemplateRef<any>);
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QueryButtonGroupDirective, never>;
|
|
7
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<QueryButtonGroupDirective, "[queryButtonGroup]", never, {}, {}, never, never, false, never>;
|
|
8
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { TemplateRef } from "@angular/core";
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class QueryEmptyWarningDirective {
|
|
4
|
-
template: TemplateRef<any>;
|
|
5
|
-
constructor(template: TemplateRef<any>);
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<QueryEmptyWarningDirective, never>;
|
|
7
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<QueryEmptyWarningDirective, "[queryEmptyWarning]", never, {}, {}, never, never, false, never>;
|
|
8
|
-
}
|
|
1
|
+
import { TemplateRef } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class QueryEmptyWarningDirective {
|
|
4
|
+
template: TemplateRef<any>;
|
|
5
|
+
constructor(template: TemplateRef<any>);
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QueryEmptyWarningDirective, never>;
|
|
7
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<QueryEmptyWarningDirective, "[queryEmptyWarning]", never, {}, {}, never, never, false, never>;
|
|
8
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { TemplateRef } from "@angular/core";
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class QueryEntityDirective {
|
|
4
|
-
template: TemplateRef<any>;
|
|
5
|
-
constructor(template: TemplateRef<any>);
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<QueryEntityDirective, never>;
|
|
7
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<QueryEntityDirective, "[queryEntity]", never, {}, {}, never, never, false, never>;
|
|
8
|
-
}
|
|
1
|
+
import { TemplateRef } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class QueryEntityDirective {
|
|
4
|
+
template: TemplateRef<any>;
|
|
5
|
+
constructor(template: TemplateRef<any>);
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QueryEntityDirective, never>;
|
|
7
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<QueryEntityDirective, "[queryEntity]", never, {}, {}, never, never, false, never>;
|
|
8
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { TemplateRef } from "@angular/core";
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class QueryFieldDirective {
|
|
4
|
-
template: TemplateRef<any>;
|
|
5
|
-
constructor(template: TemplateRef<any>);
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<QueryFieldDirective, never>;
|
|
7
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<QueryFieldDirective, "[queryField]", never, {}, {}, never, never, false, never>;
|
|
8
|
-
}
|
|
1
|
+
import { TemplateRef } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class QueryFieldDirective {
|
|
4
|
+
template: TemplateRef<any>;
|
|
5
|
+
constructor(template: TemplateRef<any>);
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QueryFieldDirective, never>;
|
|
7
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<QueryFieldDirective, "[queryField]", never, {}, {}, never, never, false, never>;
|
|
8
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { TemplateRef } from "@angular/core";
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class QueryInputDirective {
|
|
4
|
-
template: TemplateRef<any>;
|
|
5
|
-
/** Unique name for query input type. */
|
|
6
|
-
get queryInputType(): string;
|
|
7
|
-
set queryInputType(value: string);
|
|
8
|
-
private _type;
|
|
9
|
-
constructor(template: TemplateRef<any>);
|
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<QueryInputDirective, never>;
|
|
11
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<QueryInputDirective, "[queryInput]", never, { "queryInputType": "queryInputType"; }, {}, never, never, false, never>;
|
|
12
|
-
}
|
|
1
|
+
import { TemplateRef } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class QueryInputDirective {
|
|
4
|
+
template: TemplateRef<any>;
|
|
5
|
+
/** Unique name for query input type. */
|
|
6
|
+
get queryInputType(): string;
|
|
7
|
+
set queryInputType(value: string);
|
|
8
|
+
private _type;
|
|
9
|
+
constructor(template: TemplateRef<any>);
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QueryInputDirective, never>;
|
|
11
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<QueryInputDirective, "[queryInput]", never, { "queryInputType": { "alias": "queryInputType"; "required": false; }; }, {}, never, never, false, never>;
|
|
12
|
+
}
|