@progress/kendo-angular-filter 2.0.1-dev.202205191247 → 2.1.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/bundles/kendo-angular-filter.umd.js +1 -1
- package/esm2015/editors/boolean-editor.component.js +0 -2
- package/esm2015/editors/date-editor.component.js +0 -2
- package/esm2015/editors/numeric-editor.component.js +0 -2
- package/esm2015/editors/text-editor.component.js +0 -2
- package/esm2015/filter-expression.component.js +35 -13
- package/esm2015/filter-field.component.js +68 -0
- package/esm2015/filter.component.js +33 -17
- package/esm2015/filter.module.js +14 -4
- package/esm2015/filter.service.js +2 -1
- package/esm2015/main.js +2 -0
- package/esm2015/package-metadata.js +1 -1
- package/esm2015/templates/value-editor.template.js +19 -0
- package/fesm2015/kendo-angular-filter.js +157 -44
- package/filter-expression.component.d.ts +3 -1
- package/filter-field.component.d.ts +83 -0
- package/filter.component.d.ts +3 -1
- package/filter.module.d.ts +4 -2
- package/main.d.ts +2 -0
- package/model/filter-expression.d.ts +5 -0
- package/package.json +5 -5
- package/templates/value-editor.template.d.ts +12 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { ChangeDetectorRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
5
|
+
import { ChangeDetectorRef, EventEmitter, OnDestroy, OnInit, TemplateRef } from '@angular/core';
|
|
6
6
|
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
7
|
import { CompositeFilterDescriptor } from '@progress/kendo-data-query';
|
|
8
8
|
import { FilterDescriptor } from '@progress/kendo-data-query';
|
|
@@ -25,6 +25,7 @@ export declare class FilterExpressionComponent implements OnInit, OnDestroy {
|
|
|
25
25
|
isBoolean: boolean;
|
|
26
26
|
editorType: FilterEditor;
|
|
27
27
|
isEditorDisabled: boolean;
|
|
28
|
+
editorTemplate: TemplateRef<any>;
|
|
28
29
|
private localizationSubscription;
|
|
29
30
|
constructor(filterService: FilterService, localization: LocalizationService, cdr: ChangeDetectorRef);
|
|
30
31
|
ngOnInit(): void;
|
|
@@ -44,6 +45,7 @@ export declare class FilterExpressionComponent implements OnInit, OnDestroy {
|
|
|
44
45
|
removeFilterExpression(): void;
|
|
45
46
|
private setOperators;
|
|
46
47
|
onOperatorChange(value: string): void;
|
|
48
|
+
setEditorTemplate(): void;
|
|
47
49
|
static ɵfac: i0.ɵɵFactoryDeclaration<FilterExpressionComponent, never>;
|
|
48
50
|
static ɵcmp: i0.ɵɵComponentDeclaration<FilterExpressionComponent, "kendo-filter-expression", never, { "index": "index"; "currentItem": "currentItem"; }, { "valueChange": "valueChange"; }, never, never>;
|
|
49
51
|
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { FilterEditor, FilterOperator } from './model/filter-expression';
|
|
6
|
+
import { FilterValueEditorTemplateDirective } from './templates/value-editor.template';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
/**
|
|
9
|
+
* Represents the [Kendo UI Filter Field component for Angular]({% slug api_filter_filterfieldcomponent %}).
|
|
10
|
+
* The Filter Field component can be used to add Filter Expressions declaratively.
|
|
11
|
+
* @example
|
|
12
|
+
* ```
|
|
13
|
+
* @Component({
|
|
14
|
+
* selector: 'my-app',
|
|
15
|
+
* template: `
|
|
16
|
+
* <kendo-filter (valueChange)="onValueChange($event)">
|
|
17
|
+
* <kendo-filter-field field="country" editor="string" [operators]="['neq', 'eq', 'contains']"></kendo-filter-field>
|
|
18
|
+
* <kendo-filter-field field="budget" editor="number"></kendo-filter-field>
|
|
19
|
+
* <kendo-filter-field field="discontinued" title="Discontinued" editor="boolean"></kendo-filter-field>
|
|
20
|
+
* <kendo-filter-field field="ordered on" title="Ordered on" editor="date"></kendo-filter-field>
|
|
21
|
+
* <kendo-filter>
|
|
22
|
+
* `
|
|
23
|
+
* })
|
|
24
|
+
* export class AppComponent {
|
|
25
|
+
* onValueChange(e: CompositeFilterDescriptor){
|
|
26
|
+
* console.log(e)
|
|
27
|
+
* }
|
|
28
|
+
* }
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare class FilterFieldComponent {
|
|
32
|
+
/**
|
|
33
|
+
* Specifies the `field` that will be used by the user-defined filter.
|
|
34
|
+
*/
|
|
35
|
+
field: string;
|
|
36
|
+
/**
|
|
37
|
+
* Specifies the `title` text that will be displayed by the user-defined filter.
|
|
38
|
+
* If the `title` isn't set, the value passed to `field` is used.
|
|
39
|
+
*/
|
|
40
|
+
set title(_title: string);
|
|
41
|
+
get title(): string;
|
|
42
|
+
private _title;
|
|
43
|
+
/**
|
|
44
|
+
* Specifies the user-defined filter `editor` type that will be used.
|
|
45
|
+
* The available options are 'string', 'number', 'boolean', and 'date'.
|
|
46
|
+
*/
|
|
47
|
+
editor: FilterEditor;
|
|
48
|
+
/**
|
|
49
|
+
* Specifies the operators that will be available in the order of providing them.
|
|
50
|
+
* If no operators are provided, default operators are used for each filter type.
|
|
51
|
+
*
|
|
52
|
+
* The default string operators are:
|
|
53
|
+
* * `eq`— Is equal to
|
|
54
|
+
* * `neq`— Is not equal to
|
|
55
|
+
* * `isnull`— Is null
|
|
56
|
+
* * `isnotnull`— Is not null
|
|
57
|
+
* * `contains`— Contains
|
|
58
|
+
* * `doesnotcontain`— Does not contain
|
|
59
|
+
* * `startswith`— Starts with
|
|
60
|
+
* * `endswith`— Ends with
|
|
61
|
+
* * `isempty`— Is empty
|
|
62
|
+
* * `isnotempty`— Is not empty
|
|
63
|
+
*
|
|
64
|
+
* The default number and date operators are:
|
|
65
|
+
* * `eq`— Is equals to
|
|
66
|
+
* * `neq`— Is not equal to
|
|
67
|
+
* * `isnull`— Is null
|
|
68
|
+
* * `isnotnull`— Is not null
|
|
69
|
+
* * `gt`— Greater than
|
|
70
|
+
* * `gte`— Greater than or equal to
|
|
71
|
+
* * `lt`— Less than
|
|
72
|
+
* * `lte`— Less than or equal to
|
|
73
|
+
*
|
|
74
|
+
* The boolean operator is always set to `eq`
|
|
75
|
+
*/
|
|
76
|
+
operators: FilterOperator[];
|
|
77
|
+
/**
|
|
78
|
+
* @hidden
|
|
79
|
+
*/
|
|
80
|
+
editorTemplate: FilterValueEditorTemplateDirective;
|
|
81
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FilterFieldComponent, never>;
|
|
82
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FilterFieldComponent, "kendo-filter-field", never, { "field": "field"; "title": "title"; "editor": "editor"; "operators": "operators"; }, {}, ["editorTemplate"], never>;
|
|
83
|
+
}
|
package/filter.component.d.ts
CHANGED
|
@@ -65,8 +65,10 @@ export declare class FilterComponent implements OnInit, OnDestroy {
|
|
|
65
65
|
valueChange: EventEmitter<CompositeFilterDescriptor>;
|
|
66
66
|
private localizationSubscription;
|
|
67
67
|
private _value;
|
|
68
|
+
private filterFields;
|
|
68
69
|
constructor(filterService: FilterService, localization: LocalizationService, cdr: ChangeDetectorRef);
|
|
69
70
|
ngOnInit(): void;
|
|
71
|
+
ngAfterViewChecked(): void;
|
|
70
72
|
ngOnDestroy(): void;
|
|
71
73
|
/**
|
|
72
74
|
* @hidden
|
|
@@ -80,5 +82,5 @@ export declare class FilterComponent implements OnInit, OnDestroy {
|
|
|
80
82
|
private setValue;
|
|
81
83
|
private normalizeValue;
|
|
82
84
|
static ɵfac: i0.ɵɵFactoryDeclaration<FilterComponent, never>;
|
|
83
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FilterComponent, "kendo-filter", never, { "filters": "filters"; "value": "value"; }, { "valueChange": "valueChange"; },
|
|
85
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FilterComponent, "kendo-filter", never, { "filters": "filters"; "value": "value"; }, { "valueChange": "valueChange"; }, ["filterFields"], never>;
|
|
84
86
|
}
|
package/filter.module.d.ts
CHANGED
|
@@ -14,7 +14,9 @@ import * as i8 from "./editors/date-editor.component";
|
|
|
14
14
|
import * as i9 from "./localization/localized-messages.directive";
|
|
15
15
|
import * as i10 from "./localization/custom-messages.component";
|
|
16
16
|
import * as i11 from "./aria-label.directive";
|
|
17
|
-
import * as i12 from "./
|
|
17
|
+
import * as i12 from "./filter-field.component";
|
|
18
|
+
import * as i13 from "./templates/value-editor.template";
|
|
19
|
+
import * as i14 from "./shared.module";
|
|
18
20
|
/**
|
|
19
21
|
* Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
|
|
20
22
|
* definition for the Filter component.
|
|
@@ -48,6 +50,6 @@ import * as i12 from "./shared.module";
|
|
|
48
50
|
*/
|
|
49
51
|
export declare class FilterModule {
|
|
50
52
|
static ɵfac: i0.ɵɵFactoryDeclaration<FilterModule, never>;
|
|
51
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FilterModule, [typeof i1.FilterComponent, typeof i2.FilterNumericEditorComponent, typeof i3.FilterTextEditorComponent, typeof i4.FilterExpressionComponent, typeof i5.FilterGroupComponent, typeof i6.FilterExpressionOperatorsComponent, typeof i7.FilterBooleanEditorComponent, typeof i8.FilterDateEditorComponent, typeof i9.LocalizedMessagesDirective, typeof i10.CustomMessagesComponent, typeof i11.AriaLabelValueDirective], [typeof
|
|
53
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FilterModule, [typeof i1.FilterComponent, typeof i2.FilterNumericEditorComponent, typeof i3.FilterTextEditorComponent, typeof i4.FilterExpressionComponent, typeof i5.FilterGroupComponent, typeof i6.FilterExpressionOperatorsComponent, typeof i7.FilterBooleanEditorComponent, typeof i8.FilterDateEditorComponent, typeof i9.LocalizedMessagesDirective, typeof i10.CustomMessagesComponent, typeof i11.AriaLabelValueDirective, typeof i12.FilterFieldComponent, typeof i13.FilterValueEditorTemplateDirective], [typeof i14.SharedModule], [typeof i1.FilterComponent, typeof i2.FilterNumericEditorComponent, typeof i3.FilterTextEditorComponent, typeof i4.FilterExpressionComponent, typeof i5.FilterGroupComponent, typeof i6.FilterExpressionOperatorsComponent, typeof i7.FilterBooleanEditorComponent, typeof i8.FilterDateEditorComponent, typeof i9.LocalizedMessagesDirective, typeof i10.CustomMessagesComponent, typeof i11.AriaLabelValueDirective, typeof i12.FilterFieldComponent, typeof i13.FilterValueEditorTemplateDirective]>;
|
|
52
54
|
static ɵinj: i0.ɵɵInjectorDeclaration<FilterModule>;
|
|
53
55
|
}
|
package/main.d.ts
CHANGED
|
@@ -15,3 +15,5 @@ export { FilterExpressionOperatorsComponent } from './filter-expression-operator
|
|
|
15
15
|
export { FilterExpressionComponent } from './filter-expression.component';
|
|
16
16
|
export { CustomMessagesComponent } from './localization/custom-messages.component';
|
|
17
17
|
export { LocalizedMessagesDirective } from './localization/localized-messages.directive';
|
|
18
|
+
export { FilterFieldComponent } from './filter-field.component';
|
|
19
|
+
export { FilterValueEditorTemplateDirective } from './templates/value-editor.template';
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* Represents the FilterOperator type.
|
|
7
7
|
*/
|
|
8
|
+
import { TemplateRef } from '@angular/core';
|
|
8
9
|
export declare type FilterOperator = 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'isnull' | 'isnotnull' | 'contains' | 'doesnotcontain' | 'startswith' | 'endswidth' | 'isempty' | 'isnotempty';
|
|
9
10
|
/**
|
|
10
11
|
* Represents the FilterEditor type.
|
|
@@ -57,4 +58,8 @@ export interface FilterExpression {
|
|
|
57
58
|
* The boolean operator is always set to `eq`
|
|
58
59
|
*/
|
|
59
60
|
operators?: FilterOperator[];
|
|
61
|
+
/**
|
|
62
|
+
* Specifies a template for the expression value editor input.
|
|
63
|
+
*/
|
|
64
|
+
editorTemplate?: TemplateRef<any>;
|
|
60
65
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-filter",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Kendo UI Angular Filter",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -70,11 +70,11 @@
|
|
|
70
70
|
"fallbackTags": {
|
|
71
71
|
"dev": "latest"
|
|
72
72
|
},
|
|
73
|
-
"analyzeCommits": "@
|
|
73
|
+
"analyzeCommits": "@progress/semantic-prerelease/analyzeCommits",
|
|
74
74
|
"generateNotes": "@progress/kendo-angular-tasks/lib/generateNotes",
|
|
75
|
-
"getLastRelease": "@
|
|
76
|
-
"verifyConditions": "@
|
|
77
|
-
"verifyRelease": "@
|
|
75
|
+
"getLastRelease": "@progress/semantic-prerelease/getLastRelease",
|
|
76
|
+
"verifyConditions": "@progress/semantic-prerelease/verifyConditions",
|
|
77
|
+
"verifyRelease": "@progress/semantic-prerelease/verifyRelease"
|
|
78
78
|
},
|
|
79
79
|
"main": "bundles/kendo-angular-filter.umd.js",
|
|
80
80
|
"module": "fesm2015/kendo-angular-filter.js",
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { TemplateRef } from '@angular/core';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class FilterValueEditorTemplateDirective {
|
|
8
|
+
templateRef: TemplateRef<any>;
|
|
9
|
+
constructor(templateRef: TemplateRef<any>);
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FilterValueEditorTemplateDirective, never>;
|
|
11
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FilterValueEditorTemplateDirective, "[kendoFilterValueEditorTemplate]", never, {}, {}, never>;
|
|
12
|
+
}
|