@progress/kendo-angular-filter 0.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/LICENSE.md +11 -0
- package/NOTICE.txt +654 -0
- package/README.md +31 -0
- package/dist/cdn/js/kendo-angular-filter.js +150 -0
- package/dist/cdn/main.js +5 -0
- package/dist/es/aria-label.directive.js +30 -0
- package/dist/es/editors/boolean-editor.component.js +41 -0
- package/dist/es/editors/date-editor.component.js +45 -0
- package/dist/es/editors/numeric-editor.component.js +45 -0
- package/dist/es/editors/text-editor.component.js +45 -0
- package/dist/es/filter-expression-operators.component.js +48 -0
- package/dist/es/filter-expression.component.js +121 -0
- package/dist/es/filter-group.component.js +69 -0
- package/dist/es/filter.component.js +185 -0
- package/dist/es/filter.module.js +91 -0
- package/dist/es/filter.service.js +84 -0
- package/dist/es/index.js +21 -0
- package/dist/es/localization/custom-messages.component.js +44 -0
- package/dist/es/localization/localized-messages.directive.js +35 -0
- package/dist/es/localization/messages.js +166 -0
- package/dist/es/main.js +6 -0
- package/dist/es/model/filter-expression.js +7 -0
- package/dist/es/package-metadata.js +15 -0
- package/dist/es/shared.module.js +37 -0
- package/dist/es/util.js +129 -0
- package/dist/es2015/aria-label.directive.d.ts +15 -0
- package/dist/es2015/aria-label.directive.js +29 -0
- package/dist/es2015/editors/boolean-editor.component.d.ts +25 -0
- package/dist/es2015/editors/boolean-editor.component.js +53 -0
- package/dist/es2015/editors/date-editor.component.d.ts +20 -0
- package/dist/es2015/editors/date-editor.component.js +56 -0
- package/dist/es2015/editors/numeric-editor.component.d.ts +20 -0
- package/dist/es2015/editors/numeric-editor.component.js +56 -0
- package/dist/es2015/editors/text-editor.component.d.ts +20 -0
- package/dist/es2015/editors/text-editor.component.js +52 -0
- package/dist/es2015/filter-expression-operators.component.d.ts +24 -0
- package/dist/es2015/filter-expression-operators.component.js +59 -0
- package/dist/es2015/filter-expression.component.d.ts +40 -0
- package/dist/es2015/filter-expression.component.js +160 -0
- package/dist/es2015/filter-group.component.d.ts +29 -0
- package/dist/es2015/filter-group.component.js +131 -0
- package/dist/es2015/filter.component.d.ts +80 -0
- package/dist/es2015/filter.component.js +298 -0
- package/dist/es2015/filter.module.d.ts +37 -0
- package/dist/es2015/filter.module.js +88 -0
- package/dist/es2015/filter.service.d.ts +43 -0
- package/dist/es2015/filter.service.js +66 -0
- package/dist/es2015/index.d.ts +21 -0
- package/dist/es2015/index.js +21 -0
- package/dist/es2015/index.metadata.json +1 -0
- package/dist/es2015/localization/custom-messages.component.d.ts +15 -0
- package/dist/es2015/localization/custom-messages.component.js +36 -0
- package/dist/es2015/localization/localized-messages.directive.d.ts +13 -0
- package/dist/es2015/localization/localized-messages.directive.js +31 -0
- package/dist/es2015/localization/messages.d.ts +158 -0
- package/dist/es2015/localization/messages.js +160 -0
- package/dist/es2015/main.d.ts +7 -0
- package/dist/es2015/main.js +6 -0
- package/dist/es2015/model/filter-expression.d.ts +60 -0
- package/dist/es2015/model/filter-expression.js +7 -0
- package/dist/es2015/package-metadata.d.ts +9 -0
- package/dist/es2015/package-metadata.js +15 -0
- package/dist/es2015/shared.module.d.ts +9 -0
- package/dist/es2015/shared.module.js +34 -0
- package/dist/es2015/util.d.ts +140 -0
- package/dist/es2015/util.js +129 -0
- package/dist/fesm2015/index.js +1282 -0
- package/dist/fesm5/index.js +1058 -0
- package/dist/npm/aria-label.directive.js +32 -0
- package/dist/npm/editors/boolean-editor.component.js +43 -0
- package/dist/npm/editors/date-editor.component.js +47 -0
- package/dist/npm/editors/numeric-editor.component.js +47 -0
- package/dist/npm/editors/text-editor.component.js +47 -0
- package/dist/npm/filter-expression-operators.component.js +50 -0
- package/dist/npm/filter-expression.component.js +123 -0
- package/dist/npm/filter-group.component.js +71 -0
- package/dist/npm/filter.component.js +187 -0
- package/dist/npm/filter.module.js +93 -0
- package/dist/npm/filter.service.js +86 -0
- package/dist/npm/index.js +37 -0
- package/dist/npm/localization/custom-messages.component.js +46 -0
- package/dist/npm/localization/localized-messages.directive.js +37 -0
- package/dist/npm/localization/messages.js +168 -0
- package/dist/npm/main.js +10 -0
- package/dist/npm/model/filter-expression.js +9 -0
- package/dist/npm/package-metadata.js +17 -0
- package/dist/npm/shared.module.js +39 -0
- package/dist/npm/util.js +131 -0
- package/dist/systemjs/kendo-angular-filter.js +5 -0
- package/package.json +158 -0
- package/schematics/collection.json +12 -0
- package/schematics/ngAdd/index.js +12 -0
- package/schematics/ngAdd/index.js.map +1 -0
- package/schematics/ngAdd/schema.json +28 -0
|
@@ -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 var packageMetadata = {
|
|
9
|
+
name: '@progress/kendo-angular-filter',
|
|
10
|
+
productName: 'Kendo UI for Angular',
|
|
11
|
+
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
+
publishDate: 1642514456,
|
|
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,37 @@
|
|
|
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 * as tslib_1 from "tslib";
|
|
6
|
+
import { CommonModule } from '@angular/common';
|
|
7
|
+
import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
|
|
8
|
+
import { InputsModule } from '@progress/kendo-angular-inputs';
|
|
9
|
+
import { LabelModule } from '@progress/kendo-angular-label';
|
|
10
|
+
import { NgModule } from '@angular/core';
|
|
11
|
+
import { ButtonsModule } from '@progress/kendo-angular-buttons';
|
|
12
|
+
import { FilterService } from './filter.service';
|
|
13
|
+
import { DateInputsModule } from '@progress/kendo-angular-dateinputs';
|
|
14
|
+
var importedModules = [
|
|
15
|
+
CommonModule,
|
|
16
|
+
InputsModule,
|
|
17
|
+
LabelModule,
|
|
18
|
+
DropDownsModule,
|
|
19
|
+
ButtonsModule,
|
|
20
|
+
DateInputsModule
|
|
21
|
+
];
|
|
22
|
+
/**
|
|
23
|
+
* @hidden
|
|
24
|
+
*/
|
|
25
|
+
var SharedModule = /** @class */ (function () {
|
|
26
|
+
function SharedModule() {
|
|
27
|
+
}
|
|
28
|
+
SharedModule = tslib_1.__decorate([
|
|
29
|
+
NgModule({
|
|
30
|
+
imports: importedModules.slice(),
|
|
31
|
+
exports: importedModules.slice(),
|
|
32
|
+
providers: [FilterService]
|
|
33
|
+
})
|
|
34
|
+
], SharedModule);
|
|
35
|
+
return SharedModule;
|
|
36
|
+
}());
|
|
37
|
+
export { SharedModule };
|
package/dist/es/util.js
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
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 var nullOperators = ["isnull", "isnotnull", "isempty", "isnotempty"];
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export var 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 var 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 var booleanOperators = [
|
|
41
|
+
{ text: "Is equal to", value: "eq" },
|
|
42
|
+
{ text: "Is not equal to", value: "neq" }
|
|
43
|
+
];
|
|
44
|
+
/**
|
|
45
|
+
* @hidden
|
|
46
|
+
*/
|
|
47
|
+
export var 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 var isArray = function (value) { return Array.isArray(value); };
|
|
61
|
+
/**
|
|
62
|
+
* @hidden
|
|
63
|
+
*/
|
|
64
|
+
export var getKeyByValue = function (object, value) {
|
|
65
|
+
return Object.keys(object).find(function (key) { return object[key] === value; });
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* @hidden
|
|
69
|
+
*/
|
|
70
|
+
export var 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 var 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 var 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 var defaultOperators = {
|
|
112
|
+
string: defaultStringOperators,
|
|
113
|
+
number: defaultNumericOperators,
|
|
114
|
+
date: defaultDateOperators
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* @hidden
|
|
118
|
+
*/
|
|
119
|
+
export var logicOperators = {
|
|
120
|
+
"filterAndLogic": 'and',
|
|
121
|
+
"filterOrLogic": 'or'
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* @hidden
|
|
125
|
+
*/
|
|
126
|
+
export var isFilterEditor = function (editorType) {
|
|
127
|
+
var supportedEditorTypes = ['string', 'number', 'boolean', 'date'];
|
|
128
|
+
return supportedEditorTypes.indexOf(editorType) >= 0;
|
|
129
|
+
};
|
|
@@ -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
|
+
import { ElementRef, Renderer2 } from '@angular/core';
|
|
6
|
+
/**
|
|
7
|
+
* @hidden
|
|
8
|
+
*/
|
|
9
|
+
export declare class AriaLabelValueDirective {
|
|
10
|
+
private hostElement;
|
|
11
|
+
private renderer;
|
|
12
|
+
ariaLabel: string;
|
|
13
|
+
constructor(hostElement: ElementRef, renderer: Renderer2);
|
|
14
|
+
ngOnChanges(): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
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 * as tslib_1 from "tslib";
|
|
6
|
+
import { Directive, ElementRef, Input, Renderer2 } from '@angular/core';
|
|
7
|
+
/**
|
|
8
|
+
* @hidden
|
|
9
|
+
*/
|
|
10
|
+
let AriaLabelValueDirective = class AriaLabelValueDirective {
|
|
11
|
+
constructor(hostElement, renderer) {
|
|
12
|
+
this.hostElement = hostElement;
|
|
13
|
+
this.renderer = renderer;
|
|
14
|
+
}
|
|
15
|
+
ngOnChanges() {
|
|
16
|
+
const target = this.hostElement.nativeElement.querySelector('input') || this.hostElement.nativeElement;
|
|
17
|
+
this.renderer.setAttribute(target, 'aria-label', this.ariaLabel);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
tslib_1.__decorate([
|
|
21
|
+
Input('kendoAriaLabelValue'),
|
|
22
|
+
tslib_1.__metadata("design:type", String)
|
|
23
|
+
], AriaLabelValueDirective.prototype, "ariaLabel", void 0);
|
|
24
|
+
AriaLabelValueDirective = tslib_1.__decorate([
|
|
25
|
+
Directive({ selector: '[kendoAriaLabelValue]' }),
|
|
26
|
+
tslib_1.__metadata("design:paramtypes", [ElementRef,
|
|
27
|
+
Renderer2])
|
|
28
|
+
], AriaLabelValueDirective);
|
|
29
|
+
export { AriaLabelValueDirective };
|
|
@@ -0,0 +1,25 @@
|
|
|
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 { EventEmitter } from '@angular/core';
|
|
6
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
|
+
import { FilterDescriptor } from '@progress/kendo-data-query';
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
export declare class FilterBooleanEditorComponent {
|
|
12
|
+
private localization;
|
|
13
|
+
currentItem: FilterDescriptor;
|
|
14
|
+
valueChange: EventEmitter<void>;
|
|
15
|
+
items: {
|
|
16
|
+
text: string;
|
|
17
|
+
value: boolean;
|
|
18
|
+
}[];
|
|
19
|
+
defaultItem: {
|
|
20
|
+
text: string;
|
|
21
|
+
value: boolean;
|
|
22
|
+
};
|
|
23
|
+
constructor(localization: LocalizationService);
|
|
24
|
+
messageFor(key: string): string;
|
|
25
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
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 * as tslib_1 from "tslib";
|
|
6
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
7
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
let FilterBooleanEditorComponent = class FilterBooleanEditorComponent {
|
|
12
|
+
constructor(localization) {
|
|
13
|
+
this.localization = localization;
|
|
14
|
+
this.valueChange = new EventEmitter();
|
|
15
|
+
this.items = [
|
|
16
|
+
{ text: this.localization.get("filterIsTrue"), value: true },
|
|
17
|
+
{ text: this.localization.get("filterIsFalse"), value: false }
|
|
18
|
+
];
|
|
19
|
+
this.defaultItem = { text: this.localization.get("filterBooleanAll"), value: null };
|
|
20
|
+
}
|
|
21
|
+
messageFor(key) {
|
|
22
|
+
return this.localization.get(key);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
tslib_1.__decorate([
|
|
26
|
+
Input(),
|
|
27
|
+
tslib_1.__metadata("design:type", Object)
|
|
28
|
+
], FilterBooleanEditorComponent.prototype, "currentItem", void 0);
|
|
29
|
+
tslib_1.__decorate([
|
|
30
|
+
Output(),
|
|
31
|
+
tslib_1.__metadata("design:type", EventEmitter)
|
|
32
|
+
], FilterBooleanEditorComponent.prototype, "valueChange", void 0);
|
|
33
|
+
FilterBooleanEditorComponent = tslib_1.__decorate([
|
|
34
|
+
Component({
|
|
35
|
+
selector: 'kendo-filter-boolean-editor',
|
|
36
|
+
template: `
|
|
37
|
+
<kendo-dropdownlist
|
|
38
|
+
[kendoAriaLabelValue]="messageFor('filterValueAriaLabel')"
|
|
39
|
+
class="k-filter-toolbar-item k-filter-value"
|
|
40
|
+
[(value)]="currentItem.value"
|
|
41
|
+
(valueChange)="valueChange.emit()"
|
|
42
|
+
[data]="items"
|
|
43
|
+
[defaultItem]="defaultItem"
|
|
44
|
+
[valuePrimitive]="true"
|
|
45
|
+
textField="text"
|
|
46
|
+
valueField="value"
|
|
47
|
+
>
|
|
48
|
+
</kendo-dropdownlist>
|
|
49
|
+
`
|
|
50
|
+
}),
|
|
51
|
+
tslib_1.__metadata("design:paramtypes", [LocalizationService])
|
|
52
|
+
], FilterBooleanEditorComponent);
|
|
53
|
+
export { FilterBooleanEditorComponent };
|
|
@@ -0,0 +1,20 @@
|
|
|
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 { EventEmitter } from '@angular/core';
|
|
6
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
|
+
import { FilterDescriptor } from '@progress/kendo-data-query';
|
|
8
|
+
import { FilterService } from '../filter.service';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export declare class FilterDateEditorComponent {
|
|
13
|
+
private localization;
|
|
14
|
+
private filterService;
|
|
15
|
+
currentItem: FilterDescriptor;
|
|
16
|
+
valueChange: EventEmitter<void>;
|
|
17
|
+
constructor(localization: LocalizationService, filterService: FilterService);
|
|
18
|
+
messageFor(key: string): string;
|
|
19
|
+
isDisabled(): boolean;
|
|
20
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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 * as tslib_1 from "tslib";
|
|
6
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
7
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
|
+
import { FilterService } from '../filter.service';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
let FilterDateEditorComponent = class FilterDateEditorComponent {
|
|
13
|
+
constructor(localization, filterService) {
|
|
14
|
+
this.localization = localization;
|
|
15
|
+
this.filterService = filterService;
|
|
16
|
+
this.valueChange = new EventEmitter();
|
|
17
|
+
}
|
|
18
|
+
messageFor(key) {
|
|
19
|
+
return this.localization.get(key);
|
|
20
|
+
}
|
|
21
|
+
isDisabled() {
|
|
22
|
+
const isDisabled = this.filterService.isEditorDisabled;
|
|
23
|
+
if (isDisabled) {
|
|
24
|
+
this.currentItem.value = null;
|
|
25
|
+
}
|
|
26
|
+
return isDisabled;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
tslib_1.__decorate([
|
|
30
|
+
Input(),
|
|
31
|
+
tslib_1.__metadata("design:type", Object)
|
|
32
|
+
], FilterDateEditorComponent.prototype, "currentItem", void 0);
|
|
33
|
+
tslib_1.__decorate([
|
|
34
|
+
Output(),
|
|
35
|
+
tslib_1.__metadata("design:type", EventEmitter)
|
|
36
|
+
], FilterDateEditorComponent.prototype, "valueChange", void 0);
|
|
37
|
+
FilterDateEditorComponent = tslib_1.__decorate([
|
|
38
|
+
Component({
|
|
39
|
+
selector: 'kendo-filter-date-editor',
|
|
40
|
+
template: `
|
|
41
|
+
<kendo-datepicker
|
|
42
|
+
[kendoAriaLabelValue]="messageFor('filterValueAriaLabel')"
|
|
43
|
+
class="k-filter-toolbar-item k-filter-value"
|
|
44
|
+
[(value)]="currentItem.value"
|
|
45
|
+
(valueChange)="valueChange.emit()"
|
|
46
|
+
[disabled]="isDisabled()">
|
|
47
|
+
<kendo-datepicker-messages
|
|
48
|
+
[toggle]="messageFor('editorDateToggleText')"
|
|
49
|
+
[today]="messageFor('editorDateTodayText')">
|
|
50
|
+
</kendo-datepicker-messages>
|
|
51
|
+
</kendo-datepicker>
|
|
52
|
+
`
|
|
53
|
+
}),
|
|
54
|
+
tslib_1.__metadata("design:paramtypes", [LocalizationService, FilterService])
|
|
55
|
+
], FilterDateEditorComponent);
|
|
56
|
+
export { FilterDateEditorComponent };
|
|
@@ -0,0 +1,20 @@
|
|
|
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 { EventEmitter } from '@angular/core';
|
|
6
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
|
+
import { FilterDescriptor } from '@progress/kendo-data-query';
|
|
8
|
+
import { FilterService } from '../filter.service';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export declare class FilterNumericEditorComponent {
|
|
13
|
+
private localization;
|
|
14
|
+
private filterService;
|
|
15
|
+
currentItem: FilterDescriptor;
|
|
16
|
+
valueChange: EventEmitter<void>;
|
|
17
|
+
constructor(localization: LocalizationService, filterService: FilterService);
|
|
18
|
+
messageFor(key: string): string;
|
|
19
|
+
isDisabled(): boolean;
|
|
20
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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 * as tslib_1 from "tslib";
|
|
6
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
7
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
|
+
import { FilterService } from '../filter.service';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
let FilterNumericEditorComponent = class FilterNumericEditorComponent {
|
|
13
|
+
constructor(localization, filterService) {
|
|
14
|
+
this.localization = localization;
|
|
15
|
+
this.filterService = filterService;
|
|
16
|
+
this.valueChange = new EventEmitter();
|
|
17
|
+
}
|
|
18
|
+
messageFor(key) {
|
|
19
|
+
return this.localization.get(key);
|
|
20
|
+
}
|
|
21
|
+
isDisabled() {
|
|
22
|
+
const isDisabled = this.filterService.isEditorDisabled;
|
|
23
|
+
if (isDisabled) {
|
|
24
|
+
this.currentItem.value = null;
|
|
25
|
+
}
|
|
26
|
+
return isDisabled;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
tslib_1.__decorate([
|
|
30
|
+
Input(),
|
|
31
|
+
tslib_1.__metadata("design:type", Object)
|
|
32
|
+
], FilterNumericEditorComponent.prototype, "currentItem", void 0);
|
|
33
|
+
tslib_1.__decorate([
|
|
34
|
+
Output(),
|
|
35
|
+
tslib_1.__metadata("design:type", EventEmitter)
|
|
36
|
+
], FilterNumericEditorComponent.prototype, "valueChange", void 0);
|
|
37
|
+
FilterNumericEditorComponent = tslib_1.__decorate([
|
|
38
|
+
Component({
|
|
39
|
+
selector: 'kendo-filter-numeric-editor',
|
|
40
|
+
template: `
|
|
41
|
+
<kendo-numerictextbox
|
|
42
|
+
[kendoAriaLabelValue]="messageFor('filterValueAriaLabel')"
|
|
43
|
+
class="k-filter-toolbar-item k-filter-value"
|
|
44
|
+
[(value)]="currentItem.value"
|
|
45
|
+
(valueChange)="valueChange.emit()"
|
|
46
|
+
[disabled]="isDisabled()">
|
|
47
|
+
<kendo-numerictextbox-messages
|
|
48
|
+
[increment]="messageFor('editorNumericIncrement')"
|
|
49
|
+
[decrement]="messageFor('editorNumericDecrement')">
|
|
50
|
+
</kendo-numerictextbox-messages>
|
|
51
|
+
</kendo-numerictextbox>
|
|
52
|
+
`
|
|
53
|
+
}),
|
|
54
|
+
tslib_1.__metadata("design:paramtypes", [LocalizationService, FilterService])
|
|
55
|
+
], FilterNumericEditorComponent);
|
|
56
|
+
export { FilterNumericEditorComponent };
|
|
@@ -0,0 +1,20 @@
|
|
|
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 { EventEmitter } from '@angular/core';
|
|
6
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
|
+
import { FilterDescriptor } from '@progress/kendo-data-query';
|
|
8
|
+
import { FilterService } from '../filter.service';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export declare class FilterTextEditorComponent {
|
|
13
|
+
private localization;
|
|
14
|
+
private filterService;
|
|
15
|
+
currentItem: FilterDescriptor;
|
|
16
|
+
valueChange: EventEmitter<void>;
|
|
17
|
+
constructor(localization: LocalizationService, filterService: FilterService);
|
|
18
|
+
isDisabled(): boolean;
|
|
19
|
+
messageFor(key: string): string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
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 * as tslib_1 from "tslib";
|
|
6
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
7
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
|
+
import { FilterService } from '../filter.service';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
let FilterTextEditorComponent = class FilterTextEditorComponent {
|
|
13
|
+
constructor(localization, filterService) {
|
|
14
|
+
this.localization = localization;
|
|
15
|
+
this.filterService = filterService;
|
|
16
|
+
this.valueChange = new EventEmitter();
|
|
17
|
+
}
|
|
18
|
+
isDisabled() {
|
|
19
|
+
const isDisabled = this.filterService.isEditorDisabled;
|
|
20
|
+
if (isDisabled) {
|
|
21
|
+
this.currentItem.value = null;
|
|
22
|
+
}
|
|
23
|
+
return isDisabled;
|
|
24
|
+
}
|
|
25
|
+
messageFor(key) {
|
|
26
|
+
return this.localization.get(key);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
tslib_1.__decorate([
|
|
30
|
+
Input(),
|
|
31
|
+
tslib_1.__metadata("design:type", Object)
|
|
32
|
+
], FilterTextEditorComponent.prototype, "currentItem", void 0);
|
|
33
|
+
tslib_1.__decorate([
|
|
34
|
+
Output(),
|
|
35
|
+
tslib_1.__metadata("design:type", EventEmitter)
|
|
36
|
+
], FilterTextEditorComponent.prototype, "valueChange", void 0);
|
|
37
|
+
FilterTextEditorComponent = tslib_1.__decorate([
|
|
38
|
+
Component({
|
|
39
|
+
selector: 'kendo-filter-text-editor',
|
|
40
|
+
template: `
|
|
41
|
+
<kendo-textbox
|
|
42
|
+
[kendoAriaLabelValue]="messageFor('filterValueAriaLabel')"
|
|
43
|
+
class="k-filter-toolbar-item k-filter-value"
|
|
44
|
+
[(value)]="currentItem.value"
|
|
45
|
+
(valueChange)="valueChange.emit()"
|
|
46
|
+
[disabled]="isDisabled()">
|
|
47
|
+
</kendo-textbox>
|
|
48
|
+
`
|
|
49
|
+
}),
|
|
50
|
+
tslib_1.__metadata("design:paramtypes", [LocalizationService, FilterService])
|
|
51
|
+
], FilterTextEditorComponent);
|
|
52
|
+
export { FilterTextEditorComponent };
|
|
@@ -0,0 +1,24 @@
|
|
|
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 { EventEmitter } from '@angular/core';
|
|
6
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
|
+
import { FilterDescriptor } from '@progress/kendo-data-query';
|
|
8
|
+
import { FilterService } from './filter.service';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export declare class FilterExpressionOperatorsComponent {
|
|
13
|
+
private filterService;
|
|
14
|
+
private localization;
|
|
15
|
+
currentItem: FilterDescriptor;
|
|
16
|
+
valueChange: EventEmitter<void>;
|
|
17
|
+
operators: {
|
|
18
|
+
text: string;
|
|
19
|
+
value: string;
|
|
20
|
+
}[];
|
|
21
|
+
constructor(filterService: FilterService, localization: LocalizationService);
|
|
22
|
+
messageFor(key: string): string;
|
|
23
|
+
operatorValueChange(value: string): void;
|
|
24
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
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 * as tslib_1 from "tslib";
|
|
6
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
7
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
|
+
import { FilterService } from './filter.service';
|
|
9
|
+
import { nullOperators } from './util';
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
let FilterExpressionOperatorsComponent = class FilterExpressionOperatorsComponent {
|
|
14
|
+
constructor(filterService, localization) {
|
|
15
|
+
this.filterService = filterService;
|
|
16
|
+
this.localization = localization;
|
|
17
|
+
this.valueChange = new EventEmitter();
|
|
18
|
+
this.operators = [];
|
|
19
|
+
}
|
|
20
|
+
messageFor(key) {
|
|
21
|
+
return this.localization.get(key);
|
|
22
|
+
}
|
|
23
|
+
operatorValueChange(value) {
|
|
24
|
+
this.valueChange.emit();
|
|
25
|
+
this.filterService.isEditorDisabled = nullOperators.indexOf(value) >= 0;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
tslib_1.__decorate([
|
|
29
|
+
Input(),
|
|
30
|
+
tslib_1.__metadata("design:type", Object)
|
|
31
|
+
], FilterExpressionOperatorsComponent.prototype, "currentItem", void 0);
|
|
32
|
+
tslib_1.__decorate([
|
|
33
|
+
Output(),
|
|
34
|
+
tslib_1.__metadata("design:type", EventEmitter)
|
|
35
|
+
], FilterExpressionOperatorsComponent.prototype, "valueChange", void 0);
|
|
36
|
+
tslib_1.__decorate([
|
|
37
|
+
Input(),
|
|
38
|
+
tslib_1.__metadata("design:type", Array)
|
|
39
|
+
], FilterExpressionOperatorsComponent.prototype, "operators", void 0);
|
|
40
|
+
FilterExpressionOperatorsComponent = tslib_1.__decorate([
|
|
41
|
+
Component({
|
|
42
|
+
selector: 'kendo-filter-expression-operators',
|
|
43
|
+
template: `
|
|
44
|
+
<kendo-dropdownlist
|
|
45
|
+
[kendoAriaLabelValue]="messageFor('filterOperatorAriaLabel')"
|
|
46
|
+
[data]="operators"
|
|
47
|
+
[title]="messageFor('filterExpressionOperators')"
|
|
48
|
+
[(value)]="currentItem.operator"
|
|
49
|
+
(valueChange)="operatorValueChange($event)"
|
|
50
|
+
[valuePrimitive]="true"
|
|
51
|
+
textField="text"
|
|
52
|
+
valueField="value"
|
|
53
|
+
>
|
|
54
|
+
</kendo-dropdownlist>
|
|
55
|
+
`
|
|
56
|
+
}),
|
|
57
|
+
tslib_1.__metadata("design:paramtypes", [FilterService, LocalizationService])
|
|
58
|
+
], FilterExpressionOperatorsComponent);
|
|
59
|
+
export { FilterExpressionOperatorsComponent };
|
|
@@ -0,0 +1,40 @@
|
|
|
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 { EventEmitter } from '@angular/core';
|
|
6
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
|
+
import { FilterDescriptor } from '@progress/kendo-data-query';
|
|
8
|
+
import { FilterService } from './filter.service';
|
|
9
|
+
import { FilterEditor, FilterExpression, FilterOperator } from './model/filter-expression';
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
export declare class FilterExpressionComponent {
|
|
14
|
+
private filterService;
|
|
15
|
+
protected localization: LocalizationService;
|
|
16
|
+
index: number;
|
|
17
|
+
currentItem: FilterDescriptor;
|
|
18
|
+
valueChange: EventEmitter<void>;
|
|
19
|
+
operators: any[];
|
|
20
|
+
filters: FilterExpression[];
|
|
21
|
+
isBoolean: boolean;
|
|
22
|
+
isEditorDisabled: boolean;
|
|
23
|
+
editorType: FilterEditor;
|
|
24
|
+
constructor(filterService: FilterService, localization: LocalizationService);
|
|
25
|
+
ngOnInit(): void;
|
|
26
|
+
normalizeOperators(filterEditor: FilterEditor, operators: FilterOperator[]): {
|
|
27
|
+
text: string;
|
|
28
|
+
value: string;
|
|
29
|
+
}[];
|
|
30
|
+
messageFor(key: string): string;
|
|
31
|
+
getFilterExpressionByField(name: string): FilterExpression | null;
|
|
32
|
+
filterValueChange(value: string): void;
|
|
33
|
+
protected getDefaultOperators(operatorsType: FilterEditor): {
|
|
34
|
+
text: string;
|
|
35
|
+
value: string;
|
|
36
|
+
}[];
|
|
37
|
+
getEditorType(): FilterEditor;
|
|
38
|
+
removeFilterExpression(): void;
|
|
39
|
+
private setOperators;
|
|
40
|
+
}
|