novo-elements 11.0.0-next.3 → 11.0.0-next.5
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/elements/query-builder/condition-builder/condition-builder.component.d.ts +3 -2
- package/elements/query-builder/condition-definitions/date-condition.definition.d.ts +5 -4
- package/elements/query-builder/condition-definitions/date-time-condition.definition.d.ts +4 -3
- package/elements/query-builder/condition-group/condition-group.component.d.ts +4 -2
- package/elements/query-builder/condition-templates/condition-templates.component.d.ts +3 -2
- package/elements/query-builder/criteria-builder/criteria-builder.component.d.ts +4 -2
- package/elements/query-builder/query-builder.types.d.ts +5 -0
- package/fesm2022/novo-elements-elements-query-builder.mjs +197 -156
- package/fesm2022/novo-elements-elements-query-builder.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import { ControlContainer, FormControl, FormGroup } from '@angular/forms';
|
|
|
3
3
|
import { NovoLabelService } from 'novo-elements/services';
|
|
4
4
|
import { Subscription } from 'rxjs';
|
|
5
5
|
import { QueryBuilderConfig, QueryBuilderService } from '../query-builder.service';
|
|
6
|
-
import { AddressCriteriaConfig, BaseFieldDef, FieldConfig, QueryFilterOutlet } from '../query-builder.types';
|
|
6
|
+
import { AddressCriteriaConfig, BaseFieldDef, DateCriteriaConfig, FieldConfig, QueryFilterOutlet } from '../query-builder.types';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
/**
|
|
9
9
|
* Provides a handle for the table to grab the view container's ng-container to insert data rows.
|
|
@@ -39,6 +39,7 @@ export declare class ConditionBuilderComponent implements OnInit, OnChanges, Aft
|
|
|
39
39
|
andIndex: number;
|
|
40
40
|
groupIndex: number;
|
|
41
41
|
addressConfig: AddressCriteriaConfig;
|
|
42
|
+
dateConfig: DateCriteriaConfig;
|
|
42
43
|
hideOperator: import("@angular/core").InputSignal<boolean>;
|
|
43
44
|
conditionType: import("@angular/core").InputSignal<unknown>;
|
|
44
45
|
inputConfig: import("@angular/core").InputSignal<QueryBuilderConfig>;
|
|
@@ -88,5 +89,5 @@ export declare class ConditionBuilderComponent implements OnInit, OnChanges, Aft
|
|
|
88
89
|
private createFieldOperators;
|
|
89
90
|
private createFieldInput;
|
|
90
91
|
static ɵfac: i0.ɵɵFactoryDeclaration<ConditionBuilderComponent, never>;
|
|
91
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ConditionBuilderComponent, "novo-condition-builder", never, { "label": { "alias": "label"; "required": false; }; "scope": { "alias": "scope"; "required": false; }; "andIndex": { "alias": "andIndex"; "required": false; }; "groupIndex": { "alias": "groupIndex"; "required": false; }; "addressConfig": { "alias": "addressConfig"; "required": false; }; "hideOperator": { "alias": "hideOperator"; "required": false; "isSignal": true; }; "conditionType": { "alias": "conditionType"; "required": false; "isSignal": true; }; "inputConfig": { "alias": "config"; "required": false; "isSignal": true; }; "inputEditTypeFn": { "alias": "editTypeFn"; "required": false; "isSignal": true; }; }, {}, never, ["*"], false, never>;
|
|
92
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ConditionBuilderComponent, "novo-condition-builder", never, { "label": { "alias": "label"; "required": false; }; "scope": { "alias": "scope"; "required": false; }; "andIndex": { "alias": "andIndex"; "required": false; }; "groupIndex": { "alias": "groupIndex"; "required": false; }; "addressConfig": { "alias": "addressConfig"; "required": false; }; "dateConfig": { "alias": "dateConfig"; "required": false; }; "hideOperator": { "alias": "hideOperator"; "required": false; "isSignal": true; }; "conditionType": { "alias": "conditionType"; "required": false; "isSignal": true; }; "inputConfig": { "alias": "config"; "required": false; "isSignal": true; }; "inputEditTypeFn": { "alias": "editTypeFn"; "required": false; "isSignal": true; }; }, {}, never, ["*"], false, never>;
|
|
92
93
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { QueryList } from '@angular/core';
|
|
1
|
+
import { InputSignal, QueryList } from '@angular/core';
|
|
2
2
|
import { NovoPickerToggleElement } from 'novo-elements/elements/field';
|
|
3
|
-
import { AbstractConditionFieldDef } from './abstract-condition.definition';
|
|
4
|
-
import { Operator } from '../query-builder.types';
|
|
5
3
|
import { NovoLabelService } from 'novo-elements/services';
|
|
4
|
+
import { DateCriteriaConfig, Operator } from '../query-builder.types';
|
|
5
|
+
import { AbstractConditionFieldDef } from './abstract-condition.definition';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
/**
|
|
8
8
|
* Most complicated of the default conditions defs, a date needs to provide a different
|
|
@@ -11,8 +11,9 @@ import * as i0 from "@angular/core";
|
|
|
11
11
|
export declare class NovoDefaultDateConditionDef extends AbstractConditionFieldDef {
|
|
12
12
|
overlayChildren: QueryList<NovoPickerToggleElement>;
|
|
13
13
|
defaultOperator: Operator;
|
|
14
|
+
config: InputSignal<DateCriteriaConfig>;
|
|
14
15
|
constructor(labelService: NovoLabelService);
|
|
15
16
|
closePanel(event: any, viewIndex: any): void;
|
|
16
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<NovoDefaultDateConditionDef, never>;
|
|
17
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NovoDefaultDateConditionDef, "novo-date-condition-def", never, {}, {}, never, never, false, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NovoDefaultDateConditionDef, "novo-date-condition-def", never, { "config": { "alias": "config"; "required": false; "isSignal": true; }; }, {}, never, never, false, never>;
|
|
18
19
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { QueryList } from '@angular/core';
|
|
1
|
+
import { InputSignal, QueryList } from '@angular/core';
|
|
2
2
|
import { NovoPickerToggleElement } from 'novo-elements/elements/field';
|
|
3
3
|
import { AbstractConditionFieldDef } from './abstract-condition.definition';
|
|
4
|
-
import { Operator } from '../query-builder.types';
|
|
4
|
+
import { DateCriteriaConfig, Operator } from '../query-builder.types';
|
|
5
5
|
import { NovoLabelService } from 'novo-elements/services';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
/**
|
|
@@ -11,8 +11,9 @@ import * as i0 from "@angular/core";
|
|
|
11
11
|
export declare class NovoDefaultDateTimeConditionDef extends AbstractConditionFieldDef {
|
|
12
12
|
overlayChildren: QueryList<NovoPickerToggleElement>;
|
|
13
13
|
defaultOperator: Operator;
|
|
14
|
+
config: InputSignal<DateCriteriaConfig>;
|
|
14
15
|
constructor(labelService: NovoLabelService);
|
|
15
16
|
closePanel(event: any, viewIndex: any): void;
|
|
16
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<NovoDefaultDateTimeConditionDef, never>;
|
|
17
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NovoDefaultDateTimeConditionDef, "novo-date-time-condition-def", never, {}, {}, never, never, false, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NovoDefaultDateTimeConditionDef, "novo-date-time-condition-def", never, { "config": { "alias": "config"; "required": false; "isSignal": true; }; }, {}, never, never, false, never>;
|
|
18
19
|
}
|
|
@@ -16,6 +16,7 @@ export declare class ConditionGroupComponent implements OnInit, OnDestroy {
|
|
|
16
16
|
canBeEmpty: boolean;
|
|
17
17
|
formGroupName: any;
|
|
18
18
|
scope: string;
|
|
19
|
+
entity: string;
|
|
19
20
|
parentForm: UntypedFormGroup;
|
|
20
21
|
/** Subject that emits when the component has been destroyed. */
|
|
21
22
|
private readonly _onDestroy;
|
|
@@ -23,12 +24,13 @@ export declare class ConditionGroupComponent implements OnInit, OnDestroy {
|
|
|
23
24
|
ngOnInit(): void;
|
|
24
25
|
ngOnChanges(): void;
|
|
25
26
|
ngOnDestroy(): void;
|
|
26
|
-
|
|
27
|
+
updateGroupScopeAndEntity(): void;
|
|
27
28
|
updateControlName(value: string): void;
|
|
29
|
+
private sanitizeCondition;
|
|
28
30
|
get root(): FormArray;
|
|
29
31
|
addCondition(data?: any): void;
|
|
30
32
|
removeCondition(index: number): void;
|
|
31
|
-
newCondition({ field, operator, scope, value, supportingValue }?: Condition): UntypedFormGroup;
|
|
33
|
+
newCondition({ field, operator, scope, value, supportingValue, entity }?: Condition): UntypedFormGroup;
|
|
32
34
|
cantRemoveRow(): boolean;
|
|
33
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<ConditionGroupComponent, never>;
|
|
34
36
|
static ɵcmp: i0.ɵɵComponentDeclaration<ConditionGroupComponent, "novo-condition-group", never, { "controlName": { "alias": "controlName"; "required": false; }; "groupIndex": { "alias": "groupIndex"; "required": false; }; "hideFirstOperator": { "alias": "hideFirstOperator"; "required": false; }; "canBeEmpty": { "alias": "canBeEmpty"; "required": false; }; "formGroupName": { "alias": "formGroupName"; "required": false; }; }, {}, never, never, false, never>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { AddressCriteriaConfig } from '../query-builder.types';
|
|
1
|
+
import { AddressCriteriaConfig, DateCriteriaConfig } from '../query-builder.types';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class NovoConditionTemplatesComponent {
|
|
4
4
|
addressConfig: AddressCriteriaConfig;
|
|
5
|
+
dateConfig: DateCriteriaConfig;
|
|
5
6
|
static ɵfac: i0.ɵɵFactoryDeclaration<NovoConditionTemplatesComponent, never>;
|
|
6
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NovoConditionTemplatesComponent, "novo-condition-templates", never, { "addressConfig": { "alias": "addressConfig"; "required": false; }; }, {}, never, never, false, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NovoConditionTemplatesComponent, "novo-condition-templates", never, { "addressConfig": { "alias": "addressConfig"; "required": false; }; "dateConfig": { "alias": "dateConfig"; "required": false; }; }, {}, never, never, false, never>;
|
|
7
8
|
}
|
|
@@ -5,7 +5,7 @@ import { NovoLabelService } from 'novo-elements/services';
|
|
|
5
5
|
import { ConditionGroupComponent } from '../condition-group/condition-group.component';
|
|
6
6
|
import { NovoConditionFieldDef } from '../query-builder.directives';
|
|
7
7
|
import { QueryBuilderService } from '../query-builder.service';
|
|
8
|
-
import { BaseFieldDef, Condition, ConditionGroup, Conjunction, AddressCriteriaConfig } from '../query-builder.types';
|
|
8
|
+
import { BaseFieldDef, Condition, ConditionGroup, Conjunction, AddressCriteriaConfig, DateCriteriaConfig } from '../query-builder.types';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
10
|
export declare class CriteriaBuilderComponent implements OnInit, OnDestroy, AfterContentChecked, AfterViewInit {
|
|
11
11
|
private controlContainer;
|
|
@@ -18,6 +18,7 @@ export declare class CriteriaBuilderComponent implements OnInit, OnDestroy, Afte
|
|
|
18
18
|
allowedGroupings: Conjunction[];
|
|
19
19
|
editTypeFn: (field: BaseFieldDef) => string;
|
|
20
20
|
addressConfig: AddressCriteriaConfig;
|
|
21
|
+
dateConfig: DateCriteriaConfig;
|
|
21
22
|
canBeEmpty: boolean;
|
|
22
23
|
set HideFirstOperator(hide: boolean);
|
|
23
24
|
get hideFirstOperator(): boolean;
|
|
@@ -42,11 +43,12 @@ export declare class CriteriaBuilderComponent implements OnInit, OnDestroy, Afte
|
|
|
42
43
|
addConditionGroup(data?: any): void;
|
|
43
44
|
newConditionGroup(data: ConditionGroup): UntypedFormGroup;
|
|
44
45
|
newCondition({ field, operator, scope, value, supportingValue }?: Condition): UntypedFormGroup;
|
|
46
|
+
getFieldEntity(fieldConfigs: any, scope: any): any;
|
|
45
47
|
removeConditionGroupAt(index: number): void;
|
|
46
48
|
clearAllConditions(): void;
|
|
47
49
|
onFieldSelect(field: any): void;
|
|
48
50
|
private _configureQueryBuilderService;
|
|
49
51
|
private _registerFieldDefs;
|
|
50
52
|
static ɵfac: i0.ɵɵFactoryDeclaration<CriteriaBuilderComponent, never>;
|
|
51
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CriteriaBuilderComponent, "novo-criteria-builder", never, { "config": { "alias": "config"; "required": false; }; "controlName": { "alias": "controlName"; "required": false; }; "allowedGroupings": { "alias": "allowedGroupings"; "required": false; }; "editTypeFn": { "alias": "editTypeFn"; "required": false; }; "addressConfig": { "alias": "addressConfig"; "required": false; }; "canBeEmpty": { "alias": "canBeEmpty"; "required": false; }; "HideFirstOperator": { "alias": "hideFirstOperator"; "required": false; }; }, {}, ["_contentFieldDefs"], never, false, never>;
|
|
53
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CriteriaBuilderComponent, "novo-criteria-builder", never, { "config": { "alias": "config"; "required": false; }; "controlName": { "alias": "controlName"; "required": false; }; "allowedGroupings": { "alias": "allowedGroupings"; "required": false; }; "editTypeFn": { "alias": "editTypeFn"; "required": false; }; "addressConfig": { "alias": "addressConfig"; "required": false; }; "dateConfig": { "alias": "dateConfig"; "required": false; }; "canBeEmpty": { "alias": "canBeEmpty"; "required": false; }; "HideFirstOperator": { "alias": "hideFirstOperator"; "required": false; }; }, {}, ["_contentFieldDefs"], never, false, never>;
|
|
52
54
|
}
|
|
@@ -40,6 +40,7 @@ export interface Condition {
|
|
|
40
40
|
scope?: string;
|
|
41
41
|
value: any;
|
|
42
42
|
supportingValue?: any;
|
|
43
|
+
entity?: string;
|
|
43
44
|
}
|
|
44
45
|
export interface Criteria {
|
|
45
46
|
criteria: ConditionGroup[];
|
|
@@ -116,6 +117,10 @@ export type AddressCriteriaConfig = {
|
|
|
116
117
|
radiusEnabled?: boolean;
|
|
117
118
|
radiusUnits?: AddressRadiusUnitsName;
|
|
118
119
|
};
|
|
120
|
+
/** All options that can be used to configure date pickers */
|
|
121
|
+
export type DateCriteriaConfig = {
|
|
122
|
+
weekStart?: Day;
|
|
123
|
+
};
|
|
119
124
|
/** Interface used to provide an outlet for rows to be inserted into. */
|
|
120
125
|
export interface QueryFilterOutlet {
|
|
121
126
|
viewContainer: ViewContainerRef;
|