@progress/kendo-angular-filter 1.0.0-next.202203251456 → 1.0.0-next.202204011458
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/aria-label.directive.d.ts +18 -0
- package/bundles/kendo-angular-filter.umd.js +1 -1
- package/editors/boolean-editor.component.d.ts +40 -0
- package/editors/date-editor.component.d.ts +23 -0
- package/editors/numeric-editor.component.d.ts +23 -0
- package/editors/text-editor.component.d.ts +23 -0
- package/esm2015/aria-label.directive.js +28 -0
- package/esm2015/editors/boolean-editor.component.js +84 -0
- package/esm2015/editors/date-editor.component.js +67 -0
- package/esm2015/editors/numeric-editor.component.js +67 -0
- package/esm2015/editors/text-editor.component.js +59 -0
- package/esm2015/filter-expression-operators.component.js +68 -0
- package/esm2015/filter-expression.component.js +219 -0
- package/esm2015/filter-group.component.js +206 -0
- package/esm2015/filter.component.js +415 -0
- package/esm2015/filter.module.js +117 -0
- package/esm2015/filter.service.js +44 -0
- package/esm2015/kendo-angular-filter.js +8 -0
- package/esm2015/localization/custom-messages.component.js +41 -0
- package/esm2015/localization/localized-messages.directive.js +36 -0
- package/esm2015/localization/messages.js +95 -0
- package/esm2015/main.js +16 -0
- package/esm2015/model/filter-expression.js +8 -0
- package/esm2015/package-metadata.js +15 -0
- package/esm2015/shared.module.js +50 -0
- package/esm2015/util.js +136 -0
- package/fesm2015/kendo-angular-filter.js +1622 -0
- package/filter-expression-operators.component.d.ts +27 -0
- package/filter-expression.component.d.ts +48 -0
- package/filter-group.component.d.ts +41 -0
- package/filter.component.d.ts +82 -0
- package/filter.module.d.ts +53 -0
- package/filter.service.d.ts +20 -0
- package/kendo-angular-filter.d.ts +9 -0
- package/localization/custom-messages.component.d.ts +18 -0
- package/localization/localized-messages.directive.d.ts +16 -0
- package/localization/messages.d.ts +161 -0
- package/main.d.ts +17 -0
- package/model/filter-expression.d.ts +60 -0
- package/package-metadata.d.ts +9 -0
- package/package.json +2 -6
- package/shared.module.d.ts +19 -0
- package/util.d.ts +147 -0
|
@@ -0,0 +1,117 @@
|
|
|
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 { NgModule } from '@angular/core';
|
|
6
|
+
import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
|
+
import { AriaLabelValueDirective } from './aria-label.directive';
|
|
8
|
+
import { FilterBooleanEditorComponent } from './editors/boolean-editor.component';
|
|
9
|
+
import { FilterDateEditorComponent } from './editors/date-editor.component';
|
|
10
|
+
import { FilterNumericEditorComponent } from './editors/numeric-editor.component';
|
|
11
|
+
import { FilterTextEditorComponent } from './editors/text-editor.component';
|
|
12
|
+
import { FilterExpressionOperatorsComponent } from './filter-expression-operators.component';
|
|
13
|
+
import { FilterExpressionComponent } from './filter-expression.component';
|
|
14
|
+
import { FilterGroupComponent } from './filter-group.component';
|
|
15
|
+
import { FilterComponent } from './filter.component';
|
|
16
|
+
import { CustomMessagesComponent } from './localization/custom-messages.component';
|
|
17
|
+
import { LocalizedMessagesDirective } from './localization/localized-messages.directive';
|
|
18
|
+
import { SharedModule } from './shared.module';
|
|
19
|
+
import * as i0 from "@angular/core";
|
|
20
|
+
/**
|
|
21
|
+
* Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
|
|
22
|
+
* definition for the Filter component.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
*
|
|
26
|
+
* ```
|
|
27
|
+
* // Import the Filter module
|
|
28
|
+
* import { FilterModule } from '@progress/kendo-angular-filter';
|
|
29
|
+
*
|
|
30
|
+
* // The browser platform with a compiler
|
|
31
|
+
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
32
|
+
*
|
|
33
|
+
* import { NgModule } from '@angular/core';
|
|
34
|
+
*
|
|
35
|
+
* // Import the app component
|
|
36
|
+
* import { AppComponent } from './app.component';
|
|
37
|
+
*
|
|
38
|
+
* // Define the app module
|
|
39
|
+
* _@NgModule({
|
|
40
|
+
* declarations: [AppComponent], // declare app component
|
|
41
|
+
* imports: [BrowserModule, FilterModule], // import Filter module
|
|
42
|
+
* bootstrap: [AppComponent]
|
|
43
|
+
* })
|
|
44
|
+
* export class AppModule { }
|
|
45
|
+
*
|
|
46
|
+
* // Compile and launch the module
|
|
47
|
+
* platformBrowserDynamic().bootstrapModule(AppModule);
|
|
48
|
+
*
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
export class FilterModule {
|
|
52
|
+
}
|
|
53
|
+
FilterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
54
|
+
FilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterModule, declarations: [FilterComponent,
|
|
55
|
+
FilterNumericEditorComponent,
|
|
56
|
+
FilterTextEditorComponent,
|
|
57
|
+
FilterExpressionComponent,
|
|
58
|
+
FilterGroupComponent,
|
|
59
|
+
FilterExpressionOperatorsComponent,
|
|
60
|
+
FilterBooleanEditorComponent,
|
|
61
|
+
FilterDateEditorComponent,
|
|
62
|
+
LocalizedMessagesDirective,
|
|
63
|
+
CustomMessagesComponent,
|
|
64
|
+
AriaLabelValueDirective], imports: [SharedModule], exports: [FilterComponent,
|
|
65
|
+
FilterNumericEditorComponent,
|
|
66
|
+
FilterTextEditorComponent,
|
|
67
|
+
FilterExpressionComponent,
|
|
68
|
+
FilterGroupComponent,
|
|
69
|
+
FilterExpressionOperatorsComponent,
|
|
70
|
+
FilterBooleanEditorComponent,
|
|
71
|
+
FilterDateEditorComponent,
|
|
72
|
+
LocalizedMessagesDirective,
|
|
73
|
+
CustomMessagesComponent,
|
|
74
|
+
AriaLabelValueDirective] });
|
|
75
|
+
FilterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterModule, providers: [
|
|
76
|
+
LocalizationService,
|
|
77
|
+
{
|
|
78
|
+
provide: L10N_PREFIX,
|
|
79
|
+
useValue: 'kendo.filter'
|
|
80
|
+
}
|
|
81
|
+
], imports: [[SharedModule]] });
|
|
82
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterModule, decorators: [{
|
|
83
|
+
type: NgModule,
|
|
84
|
+
args: [{
|
|
85
|
+
imports: [SharedModule],
|
|
86
|
+
declarations: [FilterComponent,
|
|
87
|
+
FilterNumericEditorComponent,
|
|
88
|
+
FilterTextEditorComponent,
|
|
89
|
+
FilterExpressionComponent,
|
|
90
|
+
FilterGroupComponent,
|
|
91
|
+
FilterExpressionOperatorsComponent,
|
|
92
|
+
FilterBooleanEditorComponent,
|
|
93
|
+
FilterDateEditorComponent,
|
|
94
|
+
LocalizedMessagesDirective,
|
|
95
|
+
CustomMessagesComponent,
|
|
96
|
+
AriaLabelValueDirective
|
|
97
|
+
],
|
|
98
|
+
exports: [FilterComponent,
|
|
99
|
+
FilterNumericEditorComponent,
|
|
100
|
+
FilterTextEditorComponent,
|
|
101
|
+
FilterExpressionComponent,
|
|
102
|
+
FilterGroupComponent,
|
|
103
|
+
FilterExpressionOperatorsComponent,
|
|
104
|
+
FilterBooleanEditorComponent,
|
|
105
|
+
FilterDateEditorComponent,
|
|
106
|
+
LocalizedMessagesDirective,
|
|
107
|
+
CustomMessagesComponent,
|
|
108
|
+
AriaLabelValueDirective],
|
|
109
|
+
providers: [
|
|
110
|
+
LocalizationService,
|
|
111
|
+
{
|
|
112
|
+
provide: L10N_PREFIX,
|
|
113
|
+
useValue: 'kendo.filter'
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
}]
|
|
117
|
+
}] });
|
|
@@ -0,0 +1,44 @@
|
|
|
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 { Injectable } from '@angular/core';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* @hidden
|
|
9
|
+
*/
|
|
10
|
+
export class FilterService {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.value = { filters: [], logic: 'or' };
|
|
13
|
+
this.filters = [];
|
|
14
|
+
this.isEditorDisabled = false;
|
|
15
|
+
}
|
|
16
|
+
addFilterGroup(item) {
|
|
17
|
+
let filterGroup = { logic: 'or', filters: [] };
|
|
18
|
+
item.filters.push(filterGroup);
|
|
19
|
+
}
|
|
20
|
+
addFilterExpression(item) {
|
|
21
|
+
let filterExpression = { operator: 'eq', value: null, field: null };
|
|
22
|
+
item.filters.push(filterExpression);
|
|
23
|
+
}
|
|
24
|
+
remove(item, positionIndex, parentItem) {
|
|
25
|
+
if (!parentItem) {
|
|
26
|
+
parentItem = this.value;
|
|
27
|
+
}
|
|
28
|
+
if (item === parentItem) {
|
|
29
|
+
parentItem.filters = [];
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
let index = parentItem.filters.indexOf(item);
|
|
33
|
+
if (index >= 0 && index === positionIndex) {
|
|
34
|
+
parentItem.filters = parentItem.filters.filter((i) => i !== item);
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
parentItem.filters.forEach((filter) => filter.filters && this.remove(item, positionIndex, filter));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
FilterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
41
|
+
FilterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterService });
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterService, decorators: [{
|
|
43
|
+
type: Injectable
|
|
44
|
+
}] });
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
/**
|
|
6
|
+
* Generated bundle index. Do not edit.
|
|
7
|
+
*/
|
|
8
|
+
export * from './main';
|
|
@@ -0,0 +1,41 @@
|
|
|
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 { Component, forwardRef } from '@angular/core';
|
|
6
|
+
import { Messages } from './messages';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
import * as i1 from "@progress/kendo-angular-l10n";
|
|
9
|
+
/**
|
|
10
|
+
* Custom component messages override default component messages
|
|
11
|
+
* ([see example]({% slug globalization_filter %}#toc-localization)).
|
|
12
|
+
*/
|
|
13
|
+
export class CustomMessagesComponent extends Messages {
|
|
14
|
+
constructor(service) {
|
|
15
|
+
super();
|
|
16
|
+
this.service = service;
|
|
17
|
+
}
|
|
18
|
+
get override() {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
CustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
23
|
+
CustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CustomMessagesComponent, selector: "kendo-filter-messages", providers: [
|
|
24
|
+
{
|
|
25
|
+
provide: Messages,
|
|
26
|
+
useExisting: forwardRef(() => CustomMessagesComponent)
|
|
27
|
+
}
|
|
28
|
+
], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CustomMessagesComponent, decorators: [{
|
|
30
|
+
type: Component,
|
|
31
|
+
args: [{
|
|
32
|
+
providers: [
|
|
33
|
+
{
|
|
34
|
+
provide: Messages,
|
|
35
|
+
useExisting: forwardRef(() => CustomMessagesComponent)
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
selector: 'kendo-filter-messages',
|
|
39
|
+
template: ``
|
|
40
|
+
}]
|
|
41
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
|
@@ -0,0 +1,36 @@
|
|
|
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 { Directive, forwardRef } from '@angular/core';
|
|
6
|
+
import { Messages } from './messages';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
import * as i1 from "@progress/kendo-angular-l10n";
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export class LocalizedMessagesDirective extends Messages {
|
|
13
|
+
constructor(service) {
|
|
14
|
+
super();
|
|
15
|
+
this.service = service;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
LocalizedMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
19
|
+
LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: LocalizedMessagesDirective, selector: "[kendoFilterLocalizedMessages]", providers: [
|
|
20
|
+
{
|
|
21
|
+
provide: Messages,
|
|
22
|
+
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
|
23
|
+
}
|
|
24
|
+
], usesInheritance: true, ngImport: i0 });
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
|
|
26
|
+
type: Directive,
|
|
27
|
+
args: [{
|
|
28
|
+
providers: [
|
|
29
|
+
{
|
|
30
|
+
provide: Messages,
|
|
31
|
+
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
selector: '[kendoFilterLocalizedMessages]'
|
|
35
|
+
}]
|
|
36
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
|
@@ -0,0 +1,95 @@
|
|
|
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 { Directive } from '@angular/core';
|
|
6
|
+
import { Input } from '@angular/core';
|
|
7
|
+
import { ComponentMessages } from '@progress/kendo-angular-l10n';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export class Messages extends ComponentMessages {
|
|
13
|
+
}
|
|
14
|
+
Messages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
15
|
+
Messages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: Messages, selector: "[kendoFilterMessages]", inputs: { filterExpressionOperators: "filterExpressionOperators", filterExpressionFilters: "filterExpressionFilters", remove: "remove", addGroup: "addGroup", addFilter: "addFilter", filterAndLogic: "filterAndLogic", filterOrLogic: "filterOrLogic", filterEqOperator: "filterEqOperator", filterNotEqOperator: "filterNotEqOperator", filterIsNullOperator: "filterIsNullOperator", filterIsNotNullOperator: "filterIsNotNullOperator", filterIsEmptyOperator: "filterIsEmptyOperator", filterIsNotEmptyOperator: "filterIsNotEmptyOperator", filterStartsWithOperator: "filterStartsWithOperator", filterContainsOperator: "filterContainsOperator", filterNotContainsOperator: "filterNotContainsOperator", filterEndsWithOperator: "filterEndsWithOperator", filterGteOperator: "filterGteOperator", filterGtOperator: "filterGtOperator", filterLteOperator: "filterLteOperator", filterLtOperator: "filterLtOperator", filterIsTrue: "filterIsTrue", filterIsFalse: "filterIsFalse", filterBooleanAll: "filterBooleanAll", filterAfterOrEqualOperator: "filterAfterOrEqualOperator", filterAfterOperator: "filterAfterOperator", filterBeforeOperator: "filterBeforeOperator", filterBeforeOrEqualOperator: "filterBeforeOrEqualOperator", editorNumericDecrement: "editorNumericDecrement", editorNumericIncrement: "editorNumericIncrement", editorDateTodayText: "editorDateTodayText", editorDateToggleText: "editorDateToggleText", filterFieldAriaLabel: "filterFieldAriaLabel", filterOperatorAriaLabel: "filterOperatorAriaLabel", filterValueAriaLabel: "filterValueAriaLabel", filterAriaLabel: "filterAriaLabel", filterToolbarAriaLabel: "filterToolbarAriaLabel" }, usesInheritance: true, ngImport: i0 });
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Messages, decorators: [{
|
|
17
|
+
type: Directive,
|
|
18
|
+
args: [{
|
|
19
|
+
selector: '[kendoFilterMessages]'
|
|
20
|
+
}]
|
|
21
|
+
}], propDecorators: { filterExpressionOperators: [{
|
|
22
|
+
type: Input
|
|
23
|
+
}], filterExpressionFilters: [{
|
|
24
|
+
type: Input
|
|
25
|
+
}], remove: [{
|
|
26
|
+
type: Input
|
|
27
|
+
}], addGroup: [{
|
|
28
|
+
type: Input
|
|
29
|
+
}], addFilter: [{
|
|
30
|
+
type: Input
|
|
31
|
+
}], filterAndLogic: [{
|
|
32
|
+
type: Input
|
|
33
|
+
}], filterOrLogic: [{
|
|
34
|
+
type: Input
|
|
35
|
+
}], filterEqOperator: [{
|
|
36
|
+
type: Input
|
|
37
|
+
}], filterNotEqOperator: [{
|
|
38
|
+
type: Input
|
|
39
|
+
}], filterIsNullOperator: [{
|
|
40
|
+
type: Input
|
|
41
|
+
}], filterIsNotNullOperator: [{
|
|
42
|
+
type: Input
|
|
43
|
+
}], filterIsEmptyOperator: [{
|
|
44
|
+
type: Input
|
|
45
|
+
}], filterIsNotEmptyOperator: [{
|
|
46
|
+
type: Input
|
|
47
|
+
}], filterStartsWithOperator: [{
|
|
48
|
+
type: Input
|
|
49
|
+
}], filterContainsOperator: [{
|
|
50
|
+
type: Input
|
|
51
|
+
}], filterNotContainsOperator: [{
|
|
52
|
+
type: Input
|
|
53
|
+
}], filterEndsWithOperator: [{
|
|
54
|
+
type: Input
|
|
55
|
+
}], filterGteOperator: [{
|
|
56
|
+
type: Input
|
|
57
|
+
}], filterGtOperator: [{
|
|
58
|
+
type: Input
|
|
59
|
+
}], filterLteOperator: [{
|
|
60
|
+
type: Input
|
|
61
|
+
}], filterLtOperator: [{
|
|
62
|
+
type: Input
|
|
63
|
+
}], filterIsTrue: [{
|
|
64
|
+
type: Input
|
|
65
|
+
}], filterIsFalse: [{
|
|
66
|
+
type: Input
|
|
67
|
+
}], filterBooleanAll: [{
|
|
68
|
+
type: Input
|
|
69
|
+
}], filterAfterOrEqualOperator: [{
|
|
70
|
+
type: Input
|
|
71
|
+
}], filterAfterOperator: [{
|
|
72
|
+
type: Input
|
|
73
|
+
}], filterBeforeOperator: [{
|
|
74
|
+
type: Input
|
|
75
|
+
}], filterBeforeOrEqualOperator: [{
|
|
76
|
+
type: Input
|
|
77
|
+
}], editorNumericDecrement: [{
|
|
78
|
+
type: Input
|
|
79
|
+
}], editorNumericIncrement: [{
|
|
80
|
+
type: Input
|
|
81
|
+
}], editorDateTodayText: [{
|
|
82
|
+
type: Input
|
|
83
|
+
}], editorDateToggleText: [{
|
|
84
|
+
type: Input
|
|
85
|
+
}], filterFieldAriaLabel: [{
|
|
86
|
+
type: Input
|
|
87
|
+
}], filterOperatorAriaLabel: [{
|
|
88
|
+
type: Input
|
|
89
|
+
}], filterValueAriaLabel: [{
|
|
90
|
+
type: Input
|
|
91
|
+
}], filterAriaLabel: [{
|
|
92
|
+
type: Input
|
|
93
|
+
}], filterToolbarAriaLabel: [{
|
|
94
|
+
type: Input
|
|
95
|
+
}] } });
|
package/esm2015/main.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
export { FilterComponent } from './filter.component';
|
|
6
|
+
export { FilterGroupComponent } from './filter-group.component';
|
|
7
|
+
export { FilterModule } from './filter.module';
|
|
8
|
+
export { AriaLabelValueDirective } from './aria-label.directive';
|
|
9
|
+
export { FilterBooleanEditorComponent } from './editors/boolean-editor.component';
|
|
10
|
+
export { FilterDateEditorComponent } from './editors/date-editor.component';
|
|
11
|
+
export { FilterNumericEditorComponent } from './editors/numeric-editor.component';
|
|
12
|
+
export { FilterTextEditorComponent } from './editors/text-editor.component';
|
|
13
|
+
export { FilterExpressionOperatorsComponent } from './filter-expression-operators.component';
|
|
14
|
+
export { FilterExpressionComponent } from './filter-expression.component';
|
|
15
|
+
export { CustomMessagesComponent } from './localization/custom-messages.component';
|
|
16
|
+
export { LocalizedMessagesDirective } from './localization/localized-messages.directive';
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
/**
|
|
6
|
+
* Represents the FilterOperator type.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
/**
|
|
6
|
+
* @hidden
|
|
7
|
+
*/
|
|
8
|
+
export const packageMetadata = {
|
|
9
|
+
name: '@progress/kendo-angular-filter',
|
|
10
|
+
productName: 'Kendo UI for Angular',
|
|
11
|
+
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
+
publishDate: 1648825034,
|
|
13
|
+
version: '',
|
|
14
|
+
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
15
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
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 { CommonModule } from '@angular/common';
|
|
6
|
+
import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
|
|
7
|
+
import { InputsModule } from '@progress/kendo-angular-inputs';
|
|
8
|
+
import { LabelModule } from '@progress/kendo-angular-label';
|
|
9
|
+
import { NgModule } from '@angular/core';
|
|
10
|
+
import { ButtonsModule } from '@progress/kendo-angular-buttons';
|
|
11
|
+
import { DateInputsModule } from '@progress/kendo-angular-dateinputs';
|
|
12
|
+
import * as i0 from "@angular/core";
|
|
13
|
+
const importedModules = [
|
|
14
|
+
CommonModule,
|
|
15
|
+
InputsModule,
|
|
16
|
+
LabelModule,
|
|
17
|
+
DropDownsModule,
|
|
18
|
+
ButtonsModule,
|
|
19
|
+
DateInputsModule
|
|
20
|
+
];
|
|
21
|
+
/**
|
|
22
|
+
* @hidden
|
|
23
|
+
*/
|
|
24
|
+
export class SharedModule {
|
|
25
|
+
}
|
|
26
|
+
SharedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
27
|
+
SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedModule, imports: [CommonModule,
|
|
28
|
+
InputsModule,
|
|
29
|
+
LabelModule,
|
|
30
|
+
DropDownsModule,
|
|
31
|
+
ButtonsModule,
|
|
32
|
+
DateInputsModule], exports: [CommonModule,
|
|
33
|
+
InputsModule,
|
|
34
|
+
LabelModule,
|
|
35
|
+
DropDownsModule,
|
|
36
|
+
ButtonsModule,
|
|
37
|
+
DateInputsModule] });
|
|
38
|
+
SharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedModule, imports: [[...importedModules], CommonModule,
|
|
39
|
+
InputsModule,
|
|
40
|
+
LabelModule,
|
|
41
|
+
DropDownsModule,
|
|
42
|
+
ButtonsModule,
|
|
43
|
+
DateInputsModule] });
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedModule, decorators: [{
|
|
45
|
+
type: NgModule,
|
|
46
|
+
args: [{
|
|
47
|
+
imports: [...importedModules],
|
|
48
|
+
exports: [...importedModules]
|
|
49
|
+
}]
|
|
50
|
+
}] });
|
package/esm2015/util.js
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
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
|
+
/**
|
|
6
|
+
* @hidden
|
|
7
|
+
*/
|
|
8
|
+
export const nullOperators = ["isnull", "isnotnull", "isempty", "isnotempty"];
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export const numericOperators = [
|
|
13
|
+
{ text: "Is equal to", value: "eq" },
|
|
14
|
+
{ text: "Not equal to", value: "neq" },
|
|
15
|
+
{ text: "Greater than or equal to", value: "gte" },
|
|
16
|
+
{ text: "Greater than", value: "gt" },
|
|
17
|
+
{ text: "Less than or equal to", value: "lte" },
|
|
18
|
+
{ text: "Less than", value: "lt" },
|
|
19
|
+
{ text: "Is null", value: "isnull" },
|
|
20
|
+
{ text: "Is not null", value: "isnotnull" }
|
|
21
|
+
];
|
|
22
|
+
/**
|
|
23
|
+
* @hidden
|
|
24
|
+
*/
|
|
25
|
+
export const stringOperators = [
|
|
26
|
+
{ text: "Is equal to", value: "eq" },
|
|
27
|
+
{ text: "Not equal to", value: "neq" },
|
|
28
|
+
{ text: "Contains", value: "contains" },
|
|
29
|
+
{ text: "Does not contain", value: "doesnotcontain" },
|
|
30
|
+
{ text: "Starts with", value: "startswith" },
|
|
31
|
+
{ text: "Ends with", value: "endswith" },
|
|
32
|
+
{ text: "Is null", value: "isnull" },
|
|
33
|
+
{ text: "Is not null", value: "isnotnull" },
|
|
34
|
+
{ text: "Is empty", value: "isempty" },
|
|
35
|
+
{ text: "Is not empty", value: "isnotempty" }
|
|
36
|
+
];
|
|
37
|
+
/**
|
|
38
|
+
* @hidden
|
|
39
|
+
*/
|
|
40
|
+
export const booleanOperators = [
|
|
41
|
+
{ text: "Is equal to", value: "eq" },
|
|
42
|
+
{ text: "Is not equal to", value: "neq" }
|
|
43
|
+
];
|
|
44
|
+
/**
|
|
45
|
+
* @hidden
|
|
46
|
+
*/
|
|
47
|
+
export const dateOperators = [
|
|
48
|
+
{ text: "Is equal to", value: "eq" },
|
|
49
|
+
{ text: "Not equal to", value: "neq" },
|
|
50
|
+
{ text: "Greater than or equal to", value: "gte" },
|
|
51
|
+
{ text: "Greater than", value: "gt" },
|
|
52
|
+
{ text: "Less than or equal to", value: "lte" },
|
|
53
|
+
{ text: "Less than", value: "lt" },
|
|
54
|
+
{ text: "Is null", value: "isnull" },
|
|
55
|
+
{ text: "Is not null", value: "isnotnull" }
|
|
56
|
+
];
|
|
57
|
+
/**
|
|
58
|
+
* @hidden
|
|
59
|
+
*/
|
|
60
|
+
export const isArray = (value) => Array.isArray(value);
|
|
61
|
+
/**
|
|
62
|
+
* @hidden
|
|
63
|
+
*/
|
|
64
|
+
export const getKeyByValue = (object, value) => {
|
|
65
|
+
return Object.keys(object).find(key => object[key] === value);
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* @hidden
|
|
69
|
+
*/
|
|
70
|
+
export const defaultStringOperators = {
|
|
71
|
+
"filterEqOperator": "eq",
|
|
72
|
+
"filterNotEqOperator": "neq",
|
|
73
|
+
"filterContainsOperator": "contains",
|
|
74
|
+
"filterNotContainsOperator": "doesnotcontain",
|
|
75
|
+
"filterStartsWithOperator": "startswith",
|
|
76
|
+
"filterEndsWithOperator": "endswith",
|
|
77
|
+
"filterIsNullOperator": "isnull",
|
|
78
|
+
"filterIsNotNullOperator": "isnotnull",
|
|
79
|
+
"filterIsEmptyOperator": "isempty",
|
|
80
|
+
"filterIsNotEmptyOperator": "isnotempty"
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* @hidden
|
|
84
|
+
*/
|
|
85
|
+
export const defaultNumericOperators = {
|
|
86
|
+
"filterEqOperator": "eq",
|
|
87
|
+
"filterNotEqOperator": "neq",
|
|
88
|
+
"filterGteOperator": "gte",
|
|
89
|
+
"filterGtOperator": "gt",
|
|
90
|
+
"filterLteOperator": "lte",
|
|
91
|
+
"filterLtOperator": "lt",
|
|
92
|
+
"filterIsNullOperator": "isnull",
|
|
93
|
+
"filterIsNotNullOperator": "isnotnull"
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* @hidden
|
|
97
|
+
*/
|
|
98
|
+
export const defaultDateOperators = {
|
|
99
|
+
"filterEqOperator": "eq",
|
|
100
|
+
"filterNotEqOperator": "neq",
|
|
101
|
+
"filterAfterOrEqualOperator": "gte",
|
|
102
|
+
"filterAfterOperator": "gt",
|
|
103
|
+
"filterBeforeOrEqualOperator": "lte",
|
|
104
|
+
"filterBeforeOperator": "lt",
|
|
105
|
+
"filterIsNullOperator": "isnull",
|
|
106
|
+
"filterIsNotNullOperator": "isnotnull"
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* @hidden
|
|
110
|
+
*/
|
|
111
|
+
export const defaultOperators = {
|
|
112
|
+
"string": defaultStringOperators,
|
|
113
|
+
"number": defaultNumericOperators,
|
|
114
|
+
"date": defaultDateOperators
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* @hidden
|
|
118
|
+
*/
|
|
119
|
+
export const logicOperators = {
|
|
120
|
+
"filterAndLogic": 'and',
|
|
121
|
+
"filterOrLogic": 'or'
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* @hidden
|
|
125
|
+
*/
|
|
126
|
+
export const isFilterEditor = (editorType) => {
|
|
127
|
+
const supportedEditorTypes = ['string', 'number', 'boolean', 'date'];
|
|
128
|
+
return supportedEditorTypes.indexOf(editorType) >= 0;
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* @hidden
|
|
132
|
+
*/
|
|
133
|
+
export const localizeOperators = operators => localization => Object.keys(operators).map(key => ({
|
|
134
|
+
text: localization.get(key),
|
|
135
|
+
value: operators[key]
|
|
136
|
+
}));
|