query-builder/src/query-builder/query-builder.component.ts
Query Builder enables the user to create a query with rules and subqueries. The user can add rules and subqueries to the query and select the condition for each query and subqueries. Rules can be selected from a list of possible rules and the user can select an operator and a value.
Example :<talenra-query-builder
[(query)]="rule"
[possibleRules]="possibleRules"
[values]="values"
[maxHierarchyLevel]="maxHierarchyLevel"
/>import { QueryBuilderComponent } from '@talenra/components/query-builder';| changeDetection | ChangeDetectionStrategy.OnPush |
| selector | talenra-query-builder |
| imports |
QueryConditionSelectorComponent
QuerySelectionFieldComponent
NgTemplateOutlet
TalenraBaseTranslatePipe
|
| templateUrl | ./query-builder.component.html |
| styleUrl | ./query-builder.component.scss |
Inputs |
Outputs |
| maxHierarchyLevel |
Default value : 3, { transform: numberAttribute }
|
|
The maximum hierarchy level on how deep the rule can be constructed. Example : |
| possibleRules |
Type : IQueryBuilderPossibleRule[]
|
| Required : true |
|
The possible rules that can be selected. Example : |
| query |
Type : IQueryBuilderQuery
|
Default value : { identifier: this.generateUUID(), condition: QueryBuilderCondition.And, hierarchyLevel: 1, rules: [], }
|
|
The query that is currently selected. Contains all selection, even the rules that are not fully filled out and empty groups. Example : |
| query |
Type : IQueryBuilderQuery
|
|
The query that is currently selected. Contains all selection, even the rules that are not fully filled out and empty groups. Example : |