@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.
Files changed (94) hide show
  1. package/LICENSE.md +11 -0
  2. package/NOTICE.txt +654 -0
  3. package/README.md +31 -0
  4. package/dist/cdn/js/kendo-angular-filter.js +150 -0
  5. package/dist/cdn/main.js +5 -0
  6. package/dist/es/aria-label.directive.js +30 -0
  7. package/dist/es/editors/boolean-editor.component.js +41 -0
  8. package/dist/es/editors/date-editor.component.js +45 -0
  9. package/dist/es/editors/numeric-editor.component.js +45 -0
  10. package/dist/es/editors/text-editor.component.js +45 -0
  11. package/dist/es/filter-expression-operators.component.js +48 -0
  12. package/dist/es/filter-expression.component.js +121 -0
  13. package/dist/es/filter-group.component.js +69 -0
  14. package/dist/es/filter.component.js +185 -0
  15. package/dist/es/filter.module.js +91 -0
  16. package/dist/es/filter.service.js +84 -0
  17. package/dist/es/index.js +21 -0
  18. package/dist/es/localization/custom-messages.component.js +44 -0
  19. package/dist/es/localization/localized-messages.directive.js +35 -0
  20. package/dist/es/localization/messages.js +166 -0
  21. package/dist/es/main.js +6 -0
  22. package/dist/es/model/filter-expression.js +7 -0
  23. package/dist/es/package-metadata.js +15 -0
  24. package/dist/es/shared.module.js +37 -0
  25. package/dist/es/util.js +129 -0
  26. package/dist/es2015/aria-label.directive.d.ts +15 -0
  27. package/dist/es2015/aria-label.directive.js +29 -0
  28. package/dist/es2015/editors/boolean-editor.component.d.ts +25 -0
  29. package/dist/es2015/editors/boolean-editor.component.js +53 -0
  30. package/dist/es2015/editors/date-editor.component.d.ts +20 -0
  31. package/dist/es2015/editors/date-editor.component.js +56 -0
  32. package/dist/es2015/editors/numeric-editor.component.d.ts +20 -0
  33. package/dist/es2015/editors/numeric-editor.component.js +56 -0
  34. package/dist/es2015/editors/text-editor.component.d.ts +20 -0
  35. package/dist/es2015/editors/text-editor.component.js +52 -0
  36. package/dist/es2015/filter-expression-operators.component.d.ts +24 -0
  37. package/dist/es2015/filter-expression-operators.component.js +59 -0
  38. package/dist/es2015/filter-expression.component.d.ts +40 -0
  39. package/dist/es2015/filter-expression.component.js +160 -0
  40. package/dist/es2015/filter-group.component.d.ts +29 -0
  41. package/dist/es2015/filter-group.component.js +131 -0
  42. package/dist/es2015/filter.component.d.ts +80 -0
  43. package/dist/es2015/filter.component.js +298 -0
  44. package/dist/es2015/filter.module.d.ts +37 -0
  45. package/dist/es2015/filter.module.js +88 -0
  46. package/dist/es2015/filter.service.d.ts +43 -0
  47. package/dist/es2015/filter.service.js +66 -0
  48. package/dist/es2015/index.d.ts +21 -0
  49. package/dist/es2015/index.js +21 -0
  50. package/dist/es2015/index.metadata.json +1 -0
  51. package/dist/es2015/localization/custom-messages.component.d.ts +15 -0
  52. package/dist/es2015/localization/custom-messages.component.js +36 -0
  53. package/dist/es2015/localization/localized-messages.directive.d.ts +13 -0
  54. package/dist/es2015/localization/localized-messages.directive.js +31 -0
  55. package/dist/es2015/localization/messages.d.ts +158 -0
  56. package/dist/es2015/localization/messages.js +160 -0
  57. package/dist/es2015/main.d.ts +7 -0
  58. package/dist/es2015/main.js +6 -0
  59. package/dist/es2015/model/filter-expression.d.ts +60 -0
  60. package/dist/es2015/model/filter-expression.js +7 -0
  61. package/dist/es2015/package-metadata.d.ts +9 -0
  62. package/dist/es2015/package-metadata.js +15 -0
  63. package/dist/es2015/shared.module.d.ts +9 -0
  64. package/dist/es2015/shared.module.js +34 -0
  65. package/dist/es2015/util.d.ts +140 -0
  66. package/dist/es2015/util.js +129 -0
  67. package/dist/fesm2015/index.js +1282 -0
  68. package/dist/fesm5/index.js +1058 -0
  69. package/dist/npm/aria-label.directive.js +32 -0
  70. package/dist/npm/editors/boolean-editor.component.js +43 -0
  71. package/dist/npm/editors/date-editor.component.js +47 -0
  72. package/dist/npm/editors/numeric-editor.component.js +47 -0
  73. package/dist/npm/editors/text-editor.component.js +47 -0
  74. package/dist/npm/filter-expression-operators.component.js +50 -0
  75. package/dist/npm/filter-expression.component.js +123 -0
  76. package/dist/npm/filter-group.component.js +71 -0
  77. package/dist/npm/filter.component.js +187 -0
  78. package/dist/npm/filter.module.js +93 -0
  79. package/dist/npm/filter.service.js +86 -0
  80. package/dist/npm/index.js +37 -0
  81. package/dist/npm/localization/custom-messages.component.js +46 -0
  82. package/dist/npm/localization/localized-messages.directive.js +37 -0
  83. package/dist/npm/localization/messages.js +168 -0
  84. package/dist/npm/main.js +10 -0
  85. package/dist/npm/model/filter-expression.js +9 -0
  86. package/dist/npm/package-metadata.js +17 -0
  87. package/dist/npm/shared.module.js +39 -0
  88. package/dist/npm/util.js +131 -0
  89. package/dist/systemjs/kendo-angular-filter.js +5 -0
  90. package/package.json +158 -0
  91. package/schematics/collection.json +12 -0
  92. package/schematics/ngAdd/index.js +12 -0
  93. package/schematics/ngAdd/index.js.map +1 -0
  94. package/schematics/ngAdd/schema.json +28 -0
@@ -0,0 +1,1058 @@
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 { __decorate, __metadata, __extends } from 'tslib';
6
+ import { Injectable, isDevMode, HostBinding, Input, Output, EventEmitter, Component, ChangeDetectorRef, Directive, ElementRef, Renderer2, forwardRef, NgModule } from '@angular/core';
7
+ import { LocalizationService, ComponentMessages, L10N_PREFIX } from '@progress/kendo-angular-l10n';
8
+ import { validatePackage } from '@progress/kendo-licensing';
9
+ import { CommonModule } from '@angular/common';
10
+ import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
11
+ import { InputsModule } from '@progress/kendo-angular-inputs';
12
+ import { LabelModule } from '@progress/kendo-angular-label';
13
+ import { ButtonsModule } from '@progress/kendo-angular-buttons';
14
+ import { DateInputsModule } from '@progress/kendo-angular-dateinputs';
15
+
16
+ /**
17
+ * @hidden
18
+ */
19
+ var nullOperators = ["isnull", "isnotnull", "isempty", "isnotempty"];
20
+ /**
21
+ * @hidden
22
+ */
23
+ var isArray = function (value) { return Array.isArray(value); };
24
+ /**
25
+ * @hidden
26
+ */
27
+ var getKeyByValue = function (object, value) {
28
+ return Object.keys(object).find(function (key) { return object[key] === value; });
29
+ };
30
+ /**
31
+ * @hidden
32
+ */
33
+ var defaultStringOperators = {
34
+ "filterEqOperator": "eq",
35
+ "filterNotEqOperator": "neq",
36
+ "filterContainsOperator": "contains",
37
+ "filterNotContainsOperator": "doesnotcontain",
38
+ "filterStartsWithOperator": "startswith",
39
+ "filterEndsWithOperator": "endswith",
40
+ "filterIsNullOperator": "isnull",
41
+ "filterIsNotNullOperator": "isnotnull",
42
+ "filterIsEmptyOperator": "isempty",
43
+ "filterIsNotEmptyOperator": "isnotempty"
44
+ };
45
+ /**
46
+ * @hidden
47
+ */
48
+ var defaultNumericOperators = {
49
+ "filterEqOperator": "eq",
50
+ "filterNotEqOperator": "neq",
51
+ "filterGteOperator": "gte",
52
+ "filterGtOperator": "gt",
53
+ "filterLteOperator": "lte",
54
+ "filterLtOperator": "lt",
55
+ "filterIsNullOperator": "isnull",
56
+ "filterIsNotNullOperator": "isnotnull"
57
+ };
58
+ /**
59
+ * @hidden
60
+ */
61
+ var defaultDateOperators = {
62
+ "filterEqOperator": "eq",
63
+ "filterNotEqOperator": "neq",
64
+ "filterAfterOrEqualOperator": "gte",
65
+ "filterAfterOperator": "gt",
66
+ "filterBeforeOrEqualOperator": "lte",
67
+ "filterBeforeOperator": "lt",
68
+ "filterIsNullOperator": "isnull",
69
+ "filterIsNotNullOperator": "isnotnull"
70
+ };
71
+ /**
72
+ * @hidden
73
+ */
74
+ var defaultOperators = {
75
+ string: defaultStringOperators,
76
+ number: defaultNumericOperators,
77
+ date: defaultDateOperators
78
+ };
79
+ /**
80
+ * @hidden
81
+ */
82
+ var logicOperators = {
83
+ "filterAndLogic": 'and',
84
+ "filterOrLogic": 'or'
85
+ };
86
+ /**
87
+ * @hidden
88
+ */
89
+ var isFilterEditor = function (editorType) {
90
+ var supportedEditorTypes = ['string', 'number', 'boolean', 'date'];
91
+ return supportedEditorTypes.indexOf(editorType) >= 0;
92
+ };
93
+
94
+ /**
95
+ * @hidden
96
+ */
97
+ var localizeOperators = function (operators) { return function (localization) { return Object.keys(operators).map(function (key) { return ({
98
+ text: localization.get(key),
99
+ value: operators[key]
100
+ }); }); }; };
101
+ /**
102
+ * @hidden
103
+ */
104
+ var FilterService = /** @class */ (function () {
105
+ function FilterService(localization) {
106
+ this.localization = localization;
107
+ this.value = { filters: [], logic: 'or' };
108
+ this.filters = [];
109
+ this.isEditorDisabled = false;
110
+ }
111
+ Object.defineProperty(FilterService.prototype, "defaultNumericOperators", {
112
+ get: function () {
113
+ return localizeOperators(defaultNumericOperators)(this.localization);
114
+ },
115
+ enumerable: true,
116
+ configurable: true
117
+ });
118
+ Object.defineProperty(FilterService.prototype, "defaultStringOperators", {
119
+ get: function () {
120
+ return localizeOperators(defaultStringOperators)(this.localization);
121
+ },
122
+ enumerable: true,
123
+ configurable: true
124
+ });
125
+ Object.defineProperty(FilterService.prototype, "defaultDateOperators", {
126
+ get: function () {
127
+ return localizeOperators(defaultDateOperators)(this.localization);
128
+ },
129
+ enumerable: true,
130
+ configurable: true
131
+ });
132
+ Object.defineProperty(FilterService.prototype, "logicOperators", {
133
+ get: function () {
134
+ return localizeOperators(logicOperators)(this.localization);
135
+ },
136
+ enumerable: true,
137
+ configurable: true
138
+ });
139
+ FilterService.prototype.addFilterGroup = function (item) {
140
+ var filterGroup = { logic: 'or', filters: [] };
141
+ item.filters.push(filterGroup);
142
+ };
143
+ FilterService.prototype.addFilterExpression = function (item) {
144
+ var filterExpression = { operator: 'eq', value: null, field: null };
145
+ item.filters.push(filterExpression);
146
+ };
147
+ FilterService.prototype.remove = function (item, positionIndex, parentItem) {
148
+ var _this = this;
149
+ if (!parentItem) {
150
+ parentItem = this.value;
151
+ }
152
+ if (item === parentItem) {
153
+ parentItem.filters = [];
154
+ return;
155
+ }
156
+ var index = parentItem.filters.indexOf(item);
157
+ if (index >= 0 && index === positionIndex) {
158
+ parentItem.filters = parentItem.filters.filter(function (i) { return i !== item; });
159
+ return;
160
+ }
161
+ parentItem.filters.forEach(function (filter) { return filter.filters && _this.remove(item, positionIndex, filter); });
162
+ };
163
+ FilterService = __decorate([
164
+ Injectable(),
165
+ __metadata("design:paramtypes", [LocalizationService])
166
+ ], FilterService);
167
+ return FilterService;
168
+ }());
169
+
170
+ /**
171
+ * @hidden
172
+ */
173
+ var packageMetadata = {
174
+ name: '@progress/kendo-angular-filter',
175
+ productName: 'Kendo UI for Angular',
176
+ productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
177
+ publishDate: 1642514456,
178
+ version: '',
179
+ 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'
180
+ };
181
+
182
+ /**
183
+ * Represents the [Kendo UI Filter component for Angular]({% slug overview_filter %}).
184
+ * The Filter component can be used to apply any user defined filter criteria.
185
+ * @example
186
+ * ```
187
+ * @Component({
188
+ * selector: 'my-app',
189
+ * template: `
190
+ * <kendo-filter [filters]="filters" (valueChange)="onValueChange($event)"></kendo-filter>
191
+ * `
192
+ * })
193
+ * export class AppComponent {
194
+ *
195
+ * public filters: FilterExpression[] = [
196
+ * {
197
+ * name: 'country',
198
+ * label: 'Country',
199
+ * filter: 'string',
200
+ * operators: ['eq', 'neq'],
201
+ * },
202
+ * {
203
+ * name: 'budget',
204
+ * filter: 'number'
205
+ * }
206
+ * ];
207
+ *
208
+ * onValueChange(e: CompositeFilterDescriptor){
209
+ * console.log(e)
210
+ * }
211
+ * }
212
+ * ```
213
+ */
214
+ var FilterComponent = /** @class */ (function () {
215
+ function FilterComponent(filterService, localization, cdr) {
216
+ this.filterService = filterService;
217
+ this.localization = localization;
218
+ this.cdr = cdr;
219
+ /**
220
+ * Fires every time the Filter component value is updated.
221
+ * That is each time a Filter Group or Filter Expression is added, removed, or updated.
222
+ */
223
+ this.valueChange = new EventEmitter();
224
+ validatePackage(packageMetadata);
225
+ this.direction = localization.rtl ? 'rtl' : 'ltr';
226
+ }
227
+ Object.defineProperty(FilterComponent.prototype, "filters", {
228
+ get: function () {
229
+ return this.filterService.filters;
230
+ },
231
+ /**
232
+ * Specifies the available user-defined filters. At least one filter should be provided.
233
+ */
234
+ set: function (_filters) {
235
+ if (isDevMode() && (!isArray(_filters) || _filters.length === 0)) {
236
+ throw new Error("Pass at least one user-defined filter through the [filters] input property. See http://www.telerik.com/kendo-angular-ui/components/filter/#data-binding");
237
+ }
238
+ this.filterService.filters = _filters.map(function (filterExpression) {
239
+ var clonedFilter = Object.assign({}, filterExpression);
240
+ if (!clonedFilter.title) {
241
+ clonedFilter.title = clonedFilter.field;
242
+ }
243
+ return clonedFilter;
244
+ });
245
+ },
246
+ enumerable: true,
247
+ configurable: true
248
+ });
249
+ Object.defineProperty(FilterComponent.prototype, "value", {
250
+ get: function () {
251
+ return this.filterService.value;
252
+ },
253
+ /**
254
+ * Sets the initial `value` of the Filter component.
255
+ */
256
+ set: function (value) {
257
+ var clonedValue = JSON.parse(JSON.stringify(value));
258
+ this.normalizeValue(clonedValue);
259
+ this.filterService.value = clonedValue;
260
+ },
261
+ enumerable: true,
262
+ configurable: true
263
+ });
264
+ FilterComponent.prototype.ngOnInit = function () {
265
+ var _this = this;
266
+ if (this.filters.length === 0) {
267
+ throw new Error("Pass at least one user-defined filter through the [filters] input property. See http://www.telerik.com/kendo-angular-ui/components/filter/#data-binding");
268
+ }
269
+ this.localization.changes.subscribe(function (_a) {
270
+ var rtl = _a.rtl;
271
+ _this.direction = rtl ? 'rtl' : 'ltr';
272
+ _this.cdr.detectChanges();
273
+ });
274
+ };
275
+ FilterComponent.prototype.ngOnDestroy = function () {
276
+ this.localization.changes.unsubscribe();
277
+ };
278
+ /**
279
+ * @hidden
280
+ */
281
+ FilterComponent.prototype.getCurrentFilter = function () {
282
+ return this.value;
283
+ };
284
+ /**
285
+ * @hidden
286
+ */
287
+ FilterComponent.prototype.getCurrentFilterChildren = function () {
288
+ return this.value.filters;
289
+ };
290
+ /**
291
+ * @hidden
292
+ */
293
+ FilterComponent.prototype.onValueChange = function () {
294
+ this.valueChange.emit(this.filterService.value);
295
+ };
296
+ FilterComponent.prototype.normalizeFilter = function (filterDescriptor) {
297
+ var foundFilter = this.filterService.filters.find(function (filter) { return filter.field === filterDescriptor.field; });
298
+ if (isDevMode() && !foundFilter) {
299
+ throw new Error("There is no user-defined filter with '" + filterDescriptor.field + "' field provided through the [filters] input property.");
300
+ }
301
+ if (isDevMode() && foundFilter.editor === 'boolean' && (!filterDescriptor.value && filterDescriptor.value !== false)) {
302
+ console.warn("Provide a value for the boolean '" + filterDescriptor.field + "' user-defined filter as the operator is always set to 'eq'.");
303
+ }
304
+ if (foundFilter.editor === 'boolean') {
305
+ filterDescriptor.operator = 'eq';
306
+ }
307
+ if (foundFilter.editor === 'date' && filterDescriptor.value) {
308
+ filterDescriptor.value = new Date(filterDescriptor.value);
309
+ }
310
+ if (!filterDescriptor.value && filterDescriptor.value !== false) {
311
+ filterDescriptor.value = null;
312
+ }
313
+ };
314
+ FilterComponent.prototype.normalizeValue = function (item) {
315
+ var _this = this;
316
+ item.filters.forEach(function (item) {
317
+ if (item.filters) {
318
+ _this.normalizeValue(item);
319
+ }
320
+ else {
321
+ _this.normalizeFilter(item);
322
+ }
323
+ });
324
+ };
325
+ __decorate([
326
+ HostBinding('attr.dir'),
327
+ __metadata("design:type", String)
328
+ ], FilterComponent.prototype, "direction", void 0);
329
+ __decorate([
330
+ Input(),
331
+ __metadata("design:type", Array),
332
+ __metadata("design:paramtypes", [Array])
333
+ ], FilterComponent.prototype, "filters", null);
334
+ __decorate([
335
+ Input(),
336
+ __metadata("design:type", Object),
337
+ __metadata("design:paramtypes", [Object])
338
+ ], FilterComponent.prototype, "value", null);
339
+ __decorate([
340
+ Output(),
341
+ __metadata("design:type", EventEmitter)
342
+ ], FilterComponent.prototype, "valueChange", void 0);
343
+ FilterComponent = __decorate([
344
+ Component({
345
+ selector: 'kendo-filter',
346
+ template: "\n <ng-container kendoFilterLocalizedMessages\n i18n-editorDateTodayText=\"kendo.filter.editorDateTodayText|The text of the Today button of the Date editor\"\n editorDateTodayText=\"Today\"\n\n i18n-editorDateToggleText=\"kendo.filter.editorDateToggleText|The title of the Toggle button of the Date editor.\"\n editorDateToggleText=\"Toggle calendar\"\n\n i18n-editorNumericDecrement=\"kendo.filter.editorNumericDecrement|The title of the Decrement button of the Numeric editor\"\n editorNumericDecrement=\"Decrement\"\n\n i18n-editorNumericIncrement=\"kendo.filter.editorNumericIncrement|The title of the Increment button of the Numeric editor\"\n editorNumericIncrement=\"Increment\"\n\n i18n-filterExpressionOperators=\"kendo.filter.filterExpressionOperators|The text of the Filter Expression Operators drop down\"\n filterExpressionOperators=\"Operators\"\n\n i18n-filterExpressionFilters=\"kendo.filter.filterExpressionFilters|The text of the Filter Expression filters drop down\"\n filterExpressionFilters=\"Fields\"\n\n i18n-remove=\"kendo.filter.remove|The text of the Remove button\"\n remove=\"Remove\"\n\n i18n-addExpression=\"kendo.filter.addExpression|The text of the Add Expression button\"\n addExpression=\"Add Expression\"\n\n i18n-addGroup=\"kendo.filter.addGroup|The text of the Add Group button\"\n addGroup=\"Add Group\"\n\n i18n-filterAndLogic=\"kendo.filter.filterAndLogic|The text of the And filter logic\"\n filterAndLogic=\"And\"\n\n i18n-filterOrLogic=\"kendo.filter.filterOrLogic|The text of the Or filter logic\"\n filterOrLogic=\"Or\"\n\n i18n-filterEqOperator=\"kendo.filter.filterEqOperator|The text of the equal filter operator\"\n filterEqOperator=\"Is equal to\"\n\n i18n-filterNotEqOperator=\"kendo.filter.filterNotEqOperator|The text of the not equal filter operator\"\n filterNotEqOperator=\"Is not equal to\"\n\n i18n-filterIsNullOperator=\"kendo.filter.filterIsNullOperator|The text of the is null filter operator\"\n filterIsNullOperator=\"Is null\"\n\n i18n-filterIsNotNullOperator=\"kendo.filter.filterIsNotNullOperator|The text of the is not null filter operator\"\n filterIsNotNullOperator=\"Is not null\"\n\n i18n-filterIsEmptyOperator=\"kendo.filter.filterIsEmptyOperator|The text of the is empty filter operator\"\n filterIsEmptyOperator=\"Is empty\"\n\n i18n-filterIsNotEmptyOperator=\"kendo.filter.filterIsNotEmptyOperator|The text of the is not empty filter operator\"\n filterIsNotEmptyOperator=\"Is not empty\"\n\n i18n-filterStartsWithOperator=\"kendo.filter.filterStartsWithOperator|The text of the starts with filter operator\"\n filterStartsWithOperator=\"Starts with\"\n\n i18n-filterContainsOperator=\"kendo.filter.filterContainsOperator|The text of the contains filter operator\"\n filterContainsOperator=\"Contains\"\n\n i18n-filterNotContainsOperator=\"kendo.filter.filterNotContainsOperator|The text of the does not contain filter operator\"\n filterNotContainsOperator=\"Does not contain\"\n\n i18n-filterEndsWithOperator=\"kendo.filter.filterEndsWithOperator|The text of the ends with filter operator\"\n filterEndsWithOperator=\"Ends with\"\n\n i18n-filterGteOperator=\"kendo.filter.filterGteOperator|The text of the greater than or equal filter operator\"\n filterGteOperator=\"Is greater than or equal to\"\n\n i18n-filterGtOperator=\"kendo.filter.filterGtOperator|The text of the greater than filter operator\"\n filterGtOperator=\"Is greater than\"\n\n i18n-filterLteOperator=\"kendo.filter.filterLteOperator|The text of the less than or equal filter operator\"\n filterLteOperator=\"Is less than or equal to\"\n\n i18n-filterLtOperator=\"kendo.filter.filterLtOperator|The text of the less than filter operator\"\n filterLtOperator=\"Is less than\"\n\n i18n-filterIsTrue=\"kendo.filter.filterIsTrue|The text of the IsTrue boolean filter option\"\n filterIsTrue=\"Is True\"\n\n i18n-filterIsFalse=\"kendo.filter.filterIsFalse|The text of the IsFalse boolean filter option\"\n filterIsFalse=\"Is False\"\n\n i18n-filterBooleanAll=\"kendo.filter.filterBooleanAll|The text of the (All) boolean filter option\"\n filterBooleanAll=\"(All)\"\n\n i18n-filterAfterOrEqualOperator=\"kendo.filter.filterAfterOrEqualOperator|The text of the after or equal date filter operator\"\n filterAfterOrEqualOperator=\"Is after or equal to\"\n\n i18n-filterAfterOperator=\"kendo.filter.filterAfterOperator|The text of the after date filter operator\"\n filterAfterOperator=\"Is after\"\n\n i18n-filterBeforeOperator=\"kendo.filter.filterBeforeOperator|The text of the before date filter operator\"\n filterBeforeOperator=\"Is before\"\n\n i18n-filterBeforeOrEqualOperator=\"kendo.filter.filterBeforeOrEqualOperator|The text of the before or equal date filter operator\"\n filterBeforeOrEqualOperator=\"Is before or equal to\"\n\n i18n-filterFieldAriaLabel=\"kendo.filter.filterFieldAriaLabel|The text of the filter field aria label\"\n filterFieldAriaLabel=\"field\"\n\n i18n-filterOperatorAriaLabel=\"kendo.filter.filterOperatorAriaLabel|The text of the filter operator aria label\"\n filterOperatorAriaLabel=\"operator\"\n\n i18n-filterValueAriaLabel=\"kendo.filter.filterValueAriaLabel|The text of the filter value aria label\"\n filterValueAriaLabel=\"value\"\n\n i18n-filterAriaLabel=\"kendo.filter.filterAriaLabel|The text of the filter row aria label\"\n filterAriaLabel=\"filter\"\n\n i18n-filterToolbarAriaLabel=\"kendo.filter.filterToolbarAriaLabel|The text of the filter toolbar aria label\"\n filterToolbarAriaLabel=\"filter settings\"\n >\n </ng-container>\n <div class=\"k-widget k-filter\" [attr.dir]=\"direction\">\n <ul class='k-filter-container'>\n <li class='k-filter-group-main'>\n <kendo-filter-group\n [currentItem]=\"getCurrentFilter()\"\n (valueChange)=\"onValueChange()\"\n >\n </kendo-filter-group>\n </li>\n </ul>\n </div>\n"
347
+ }),
348
+ __metadata("design:paramtypes", [FilterService,
349
+ LocalizationService,
350
+ ChangeDetectorRef])
351
+ ], FilterComponent);
352
+ return FilterComponent;
353
+ }());
354
+
355
+ /**
356
+ * @hidden
357
+ */
358
+ var AriaLabelValueDirective = /** @class */ (function () {
359
+ function AriaLabelValueDirective(hostElement, renderer) {
360
+ this.hostElement = hostElement;
361
+ this.renderer = renderer;
362
+ }
363
+ AriaLabelValueDirective.prototype.ngOnChanges = function () {
364
+ var target = this.hostElement.nativeElement.querySelector('input') || this.hostElement.nativeElement;
365
+ this.renderer.setAttribute(target, 'aria-label', this.ariaLabel);
366
+ };
367
+ __decorate([
368
+ Input('kendoAriaLabelValue'),
369
+ __metadata("design:type", String)
370
+ ], AriaLabelValueDirective.prototype, "ariaLabel", void 0);
371
+ AriaLabelValueDirective = __decorate([
372
+ Directive({ selector: '[kendoAriaLabelValue]' }),
373
+ __metadata("design:paramtypes", [ElementRef,
374
+ Renderer2])
375
+ ], AriaLabelValueDirective);
376
+ return AriaLabelValueDirective;
377
+ }());
378
+
379
+ /**
380
+ * @hidden
381
+ */
382
+ var FilterBooleanEditorComponent = /** @class */ (function () {
383
+ function FilterBooleanEditorComponent(localization) {
384
+ this.localization = localization;
385
+ this.valueChange = new EventEmitter();
386
+ this.items = [
387
+ { text: this.localization.get("filterIsTrue"), value: true },
388
+ { text: this.localization.get("filterIsFalse"), value: false }
389
+ ];
390
+ this.defaultItem = { text: this.localization.get("filterBooleanAll"), value: null };
391
+ }
392
+ FilterBooleanEditorComponent.prototype.messageFor = function (key) {
393
+ return this.localization.get(key);
394
+ };
395
+ __decorate([
396
+ Input(),
397
+ __metadata("design:type", Object)
398
+ ], FilterBooleanEditorComponent.prototype, "currentItem", void 0);
399
+ __decorate([
400
+ Output(),
401
+ __metadata("design:type", EventEmitter)
402
+ ], FilterBooleanEditorComponent.prototype, "valueChange", void 0);
403
+ FilterBooleanEditorComponent = __decorate([
404
+ Component({
405
+ selector: 'kendo-filter-boolean-editor',
406
+ template: "\n <kendo-dropdownlist\n [kendoAriaLabelValue]=\"messageFor('filterValueAriaLabel')\"\n class=\"k-filter-toolbar-item k-filter-value\"\n [(value)]=\"currentItem.value\"\n (valueChange)=\"valueChange.emit()\"\n [data]=\"items\"\n [defaultItem]=\"defaultItem\"\n [valuePrimitive]=\"true\"\n textField=\"text\"\n valueField=\"value\"\n >\n </kendo-dropdownlist>\n "
407
+ }),
408
+ __metadata("design:paramtypes", [LocalizationService])
409
+ ], FilterBooleanEditorComponent);
410
+ return FilterBooleanEditorComponent;
411
+ }());
412
+
413
+ /**
414
+ * @hidden
415
+ */
416
+ var FilterDateEditorComponent = /** @class */ (function () {
417
+ function FilterDateEditorComponent(localization, filterService) {
418
+ this.localization = localization;
419
+ this.filterService = filterService;
420
+ this.valueChange = new EventEmitter();
421
+ }
422
+ FilterDateEditorComponent.prototype.messageFor = function (key) {
423
+ return this.localization.get(key);
424
+ };
425
+ FilterDateEditorComponent.prototype.isDisabled = function () {
426
+ var isDisabled = this.filterService.isEditorDisabled;
427
+ if (isDisabled) {
428
+ this.currentItem.value = null;
429
+ }
430
+ return isDisabled;
431
+ };
432
+ __decorate([
433
+ Input(),
434
+ __metadata("design:type", Object)
435
+ ], FilterDateEditorComponent.prototype, "currentItem", void 0);
436
+ __decorate([
437
+ Output(),
438
+ __metadata("design:type", EventEmitter)
439
+ ], FilterDateEditorComponent.prototype, "valueChange", void 0);
440
+ FilterDateEditorComponent = __decorate([
441
+ Component({
442
+ selector: 'kendo-filter-date-editor',
443
+ template: "\n <kendo-datepicker\n [kendoAriaLabelValue]=\"messageFor('filterValueAriaLabel')\"\n class=\"k-filter-toolbar-item k-filter-value\"\n [(value)]=\"currentItem.value\"\n (valueChange)=\"valueChange.emit()\"\n [disabled]=\"isDisabled()\">\n <kendo-datepicker-messages\n [toggle]=\"messageFor('editorDateToggleText')\"\n [today]=\"messageFor('editorDateTodayText')\">\n </kendo-datepicker-messages>\n </kendo-datepicker>\n "
444
+ }),
445
+ __metadata("design:paramtypes", [LocalizationService, FilterService])
446
+ ], FilterDateEditorComponent);
447
+ return FilterDateEditorComponent;
448
+ }());
449
+
450
+ /**
451
+ * @hidden
452
+ */
453
+ var FilterNumericEditorComponent = /** @class */ (function () {
454
+ function FilterNumericEditorComponent(localization, filterService) {
455
+ this.localization = localization;
456
+ this.filterService = filterService;
457
+ this.valueChange = new EventEmitter();
458
+ }
459
+ FilterNumericEditorComponent.prototype.messageFor = function (key) {
460
+ return this.localization.get(key);
461
+ };
462
+ FilterNumericEditorComponent.prototype.isDisabled = function () {
463
+ var isDisabled = this.filterService.isEditorDisabled;
464
+ if (isDisabled) {
465
+ this.currentItem.value = null;
466
+ }
467
+ return isDisabled;
468
+ };
469
+ __decorate([
470
+ Input(),
471
+ __metadata("design:type", Object)
472
+ ], FilterNumericEditorComponent.prototype, "currentItem", void 0);
473
+ __decorate([
474
+ Output(),
475
+ __metadata("design:type", EventEmitter)
476
+ ], FilterNumericEditorComponent.prototype, "valueChange", void 0);
477
+ FilterNumericEditorComponent = __decorate([
478
+ Component({
479
+ selector: 'kendo-filter-numeric-editor',
480
+ template: "\n <kendo-numerictextbox\n [kendoAriaLabelValue]=\"messageFor('filterValueAriaLabel')\"\n class=\"k-filter-toolbar-item k-filter-value\"\n [(value)]=\"currentItem.value\"\n (valueChange)=\"valueChange.emit()\"\n [disabled]=\"isDisabled()\">\n <kendo-numerictextbox-messages\n [increment]=\"messageFor('editorNumericIncrement')\"\n [decrement]=\"messageFor('editorNumericDecrement')\">\n </kendo-numerictextbox-messages>\n </kendo-numerictextbox>\n "
481
+ }),
482
+ __metadata("design:paramtypes", [LocalizationService, FilterService])
483
+ ], FilterNumericEditorComponent);
484
+ return FilterNumericEditorComponent;
485
+ }());
486
+
487
+ /**
488
+ * @hidden
489
+ */
490
+ var FilterTextEditorComponent = /** @class */ (function () {
491
+ function FilterTextEditorComponent(localization, filterService) {
492
+ this.localization = localization;
493
+ this.filterService = filterService;
494
+ this.valueChange = new EventEmitter();
495
+ }
496
+ FilterTextEditorComponent.prototype.isDisabled = function () {
497
+ var isDisabled = this.filterService.isEditorDisabled;
498
+ if (isDisabled) {
499
+ this.currentItem.value = null;
500
+ }
501
+ return isDisabled;
502
+ };
503
+ FilterTextEditorComponent.prototype.messageFor = function (key) {
504
+ return this.localization.get(key);
505
+ };
506
+ __decorate([
507
+ Input(),
508
+ __metadata("design:type", Object)
509
+ ], FilterTextEditorComponent.prototype, "currentItem", void 0);
510
+ __decorate([
511
+ Output(),
512
+ __metadata("design:type", EventEmitter)
513
+ ], FilterTextEditorComponent.prototype, "valueChange", void 0);
514
+ FilterTextEditorComponent = __decorate([
515
+ Component({
516
+ selector: 'kendo-filter-text-editor',
517
+ template: "\n <kendo-textbox\n [kendoAriaLabelValue]=\"messageFor('filterValueAriaLabel')\"\n class=\"k-filter-toolbar-item k-filter-value\"\n [(value)]=\"currentItem.value\"\n (valueChange)=\"valueChange.emit()\"\n [disabled]=\"isDisabled()\">\n </kendo-textbox>\n "
518
+ }),
519
+ __metadata("design:paramtypes", [LocalizationService, FilterService])
520
+ ], FilterTextEditorComponent);
521
+ return FilterTextEditorComponent;
522
+ }());
523
+
524
+ /**
525
+ * @hidden
526
+ */
527
+ var FilterExpressionOperatorsComponent = /** @class */ (function () {
528
+ function FilterExpressionOperatorsComponent(filterService, localization) {
529
+ this.filterService = filterService;
530
+ this.localization = localization;
531
+ this.valueChange = new EventEmitter();
532
+ this.operators = [];
533
+ }
534
+ FilterExpressionOperatorsComponent.prototype.messageFor = function (key) {
535
+ return this.localization.get(key);
536
+ };
537
+ FilterExpressionOperatorsComponent.prototype.operatorValueChange = function (value) {
538
+ this.valueChange.emit();
539
+ this.filterService.isEditorDisabled = nullOperators.indexOf(value) >= 0;
540
+ };
541
+ __decorate([
542
+ Input(),
543
+ __metadata("design:type", Object)
544
+ ], FilterExpressionOperatorsComponent.prototype, "currentItem", void 0);
545
+ __decorate([
546
+ Output(),
547
+ __metadata("design:type", EventEmitter)
548
+ ], FilterExpressionOperatorsComponent.prototype, "valueChange", void 0);
549
+ __decorate([
550
+ Input(),
551
+ __metadata("design:type", Array)
552
+ ], FilterExpressionOperatorsComponent.prototype, "operators", void 0);
553
+ FilterExpressionOperatorsComponent = __decorate([
554
+ Component({
555
+ selector: 'kendo-filter-expression-operators',
556
+ template: "\n <kendo-dropdownlist\n [kendoAriaLabelValue]=\"messageFor('filterOperatorAriaLabel')\"\n [data]=\"operators\"\n [title]=\"messageFor('filterExpressionOperators')\"\n [(value)]=\"currentItem.operator\"\n (valueChange)=\"operatorValueChange($event)\"\n [valuePrimitive]=\"true\"\n textField=\"text\"\n valueField=\"value\"\n >\n </kendo-dropdownlist>\n "
557
+ }),
558
+ __metadata("design:paramtypes", [FilterService, LocalizationService])
559
+ ], FilterExpressionOperatorsComponent);
560
+ return FilterExpressionOperatorsComponent;
561
+ }());
562
+
563
+ /**
564
+ * @hidden
565
+ */
566
+ var FilterExpressionComponent = /** @class */ (function () {
567
+ function FilterExpressionComponent(filterService, localization) {
568
+ this.filterService = filterService;
569
+ this.localization = localization;
570
+ this.valueChange = new EventEmitter();
571
+ this.operators = [];
572
+ this.filters = [];
573
+ this.isBoolean = false;
574
+ this.isEditorDisabled = false;
575
+ }
576
+ FilterExpressionComponent.prototype.ngOnInit = function () {
577
+ this.filters = this.filterService.filters;
578
+ if (this.currentItem.field) {
579
+ var foundFilter = this.getFilterExpressionByField(this.currentItem.field);
580
+ this.setOperators(foundFilter);
581
+ }
582
+ if (!this.currentItem.field) {
583
+ this.currentItem.field = this.filterService.filters[0].field;
584
+ var defaultFilter = this.getFilterExpressionByField(this.filterService.filters[0].field);
585
+ this.setOperators(defaultFilter);
586
+ }
587
+ };
588
+ FilterExpressionComponent.prototype.normalizeOperators = function (filterEditor, operators) {
589
+ var result = [];
590
+ for (var j = 0; j < operators.length; j++) {
591
+ if (isFilterEditor(filterEditor)) {
592
+ result.push({
593
+ value: operators[j],
594
+ text: this.localization.get(getKeyByValue(defaultOperators[filterEditor], operators[j]))
595
+ });
596
+ }
597
+ }
598
+ return result;
599
+ };
600
+ FilterExpressionComponent.prototype.messageFor = function (key) {
601
+ return this.localization.get(key);
602
+ };
603
+ FilterExpressionComponent.prototype.getFilterExpressionByField = function (name) {
604
+ var foundFilter = this.filterService.filters.find(function (filter) { return filter.field === name; });
605
+ if (foundFilter) {
606
+ return foundFilter;
607
+ }
608
+ return null;
609
+ };
610
+ FilterExpressionComponent.prototype.filterValueChange = function (value) {
611
+ this.currentItem.value = null;
612
+ this.currentItem.field = value;
613
+ var foundFilter = this.getFilterExpressionByField(this.currentItem.field);
614
+ this.setOperators(foundFilter);
615
+ this.valueChange.emit();
616
+ };
617
+ FilterExpressionComponent.prototype.getDefaultOperators = function (operatorsType) {
618
+ switch (operatorsType) {
619
+ case 'string':
620
+ return this.filterService.defaultStringOperators;
621
+ case 'number':
622
+ return this.filterService.defaultNumericOperators;
623
+ case 'date':
624
+ return this.filterService.defaultDateOperators;
625
+ default:
626
+ break;
627
+ }
628
+ };
629
+ FilterExpressionComponent.prototype.getEditorType = function () {
630
+ var _this = this;
631
+ var item = this.filterService.filters.find(function (filterExpression) { return filterExpression.field === _this.currentItem.field; });
632
+ return item.editor;
633
+ };
634
+ FilterExpressionComponent.prototype.removeFilterExpression = function () {
635
+ this.filterService.remove(this.currentItem, this.index);
636
+ this.valueChange.emit();
637
+ };
638
+ FilterExpressionComponent.prototype.setOperators = function (filter) {
639
+ this.isBoolean = filter.editor === 'boolean';
640
+ if (this.isBoolean) {
641
+ return;
642
+ }
643
+ if (filter.operators) {
644
+ var localizedOperators = this.normalizeOperators(filter.editor, filter.operators);
645
+ this.operators = localizedOperators;
646
+ this.currentItem.operator = localizedOperators[0].value;
647
+ }
648
+ else {
649
+ this.operators = this.getDefaultOperators(filter.editor);
650
+ this.currentItem.operator = this.operators[0].value;
651
+ }
652
+ };
653
+ __decorate([
654
+ Input(),
655
+ __metadata("design:type", Number)
656
+ ], FilterExpressionComponent.prototype, "index", void 0);
657
+ __decorate([
658
+ Input(),
659
+ __metadata("design:type", Object)
660
+ ], FilterExpressionComponent.prototype, "currentItem", void 0);
661
+ __decorate([
662
+ Output(),
663
+ __metadata("design:type", EventEmitter)
664
+ ], FilterExpressionComponent.prototype, "valueChange", void 0);
665
+ FilterExpressionComponent = __decorate([
666
+ Component({
667
+ selector: 'kendo-filter-expression',
668
+ template: "\n <div class=\"k-filter-toolbar\" role=\"group\" [attr.aria-label]=\"messageFor('filterAriaLabel')\">\n <div class=\"k-toolbar\">\n <div class=\"k-filter-toolbar-item k-filter-field\">\n <kendo-dropdownlist\n [kendoAriaLabelValue]=\"messageFor('filterFieldAriaLabel')\"\n [title]=\"messageFor('filterExpressionFilters')\"\n [data]=\"filters\"\n textField=\"title\"\n valueField=\"field\"\n [value]=\"currentItem.field\"\n [valuePrimitive]=\"true\"\n (valueChange)=\"filterValueChange($event)\">\n </kendo-dropdownlist>\n </div>\n <div *ngIf=\"!isBoolean\" class=\"k-filter-toolbar-item k-filter-operator\">\n <kendo-filter-expression-operators\n [currentItem]=\"currentItem\"\n [operators]=\"operators\"\n (valueChange)=\"valueChange.emit();\">\n </kendo-filter-expression-operators>\n </div>\n\n <ng-container [ngSwitch]=\"getEditorType()\">\n <kendo-filter-text-editor *ngSwitchCase=\"'string'\" [currentItem]=\"currentItem\" (valueChange)=\"valueChange.emit()\"></kendo-filter-text-editor>\n <kendo-filter-numeric-editor *ngSwitchCase=\"'number'\" [currentItem]=\"currentItem\" (valueChange)=\"valueChange.emit()\"></kendo-filter-numeric-editor>\n <kendo-filter-boolean-editor *ngSwitchCase=\"'boolean'\" [currentItem]=\"currentItem\" (valueChange)=\"valueChange.emit()\"></kendo-filter-boolean-editor>\n <kendo-filter-date-editor *ngSwitchCase=\"'date'\" [currentItem]=\"currentItem\" (valueChange)=\"valueChange.emit()\"></kendo-filter-date-editor>\n </ng-container>\n\n <div class=\"k-filter-toolbar-item\">\n <button\n kendoButton\n icon=\"close\"\n look=\"flat\"\n [title]=\"messageFor('remove')\"\n (click)=\"removeFilterExpression()\">\n </button>\n </div>\n </div>\n </div>\n "
669
+ }),
670
+ __metadata("design:paramtypes", [FilterService, LocalizationService])
671
+ ], FilterExpressionComponent);
672
+ return FilterExpressionComponent;
673
+ }());
674
+
675
+ /**
676
+ * @hidden
677
+ */
678
+ var FilterGroupComponent = /** @class */ (function () {
679
+ function FilterGroupComponent(filterService, localization) {
680
+ this.filterService = filterService;
681
+ this.localization = localization;
682
+ this.index = 0;
683
+ this.currentItem = {
684
+ logic: 'or',
685
+ filters: []
686
+ };
687
+ this.valueChange = new EventEmitter();
688
+ this.logicOperators = [];
689
+ }
690
+ FilterGroupComponent.prototype.ngOnInit = function () {
691
+ this.logicOperators = this.filterService.logicOperators;
692
+ };
693
+ FilterGroupComponent.prototype.messageFor = function (key) {
694
+ return this.localization.get(key);
695
+ };
696
+ FilterGroupComponent.prototype.selectedChange = function (logicOperator) {
697
+ if (this.currentItem.logic !== logicOperator) {
698
+ this.currentItem.logic = logicOperator;
699
+ this.valueChange.emit();
700
+ }
701
+ };
702
+ FilterGroupComponent.prototype.addFilterExpression = function () {
703
+ this.filterService.addFilterExpression(this.currentItem);
704
+ this.valueChange.emit();
705
+ };
706
+ FilterGroupComponent.prototype.addFilterGroup = function () {
707
+ this.filterService.addFilterGroup(this.currentItem);
708
+ this.valueChange.emit();
709
+ };
710
+ FilterGroupComponent.prototype.removeFilterGroup = function () {
711
+ this.filterService.remove(this.currentItem, this.index);
712
+ this.valueChange.emit();
713
+ };
714
+ __decorate([
715
+ Input(),
716
+ __metadata("design:type", Number)
717
+ ], FilterGroupComponent.prototype, "index", void 0);
718
+ __decorate([
719
+ Input(),
720
+ __metadata("design:type", Object)
721
+ ], FilterGroupComponent.prototype, "currentItem", void 0);
722
+ __decorate([
723
+ Output(),
724
+ __metadata("design:type", EventEmitter)
725
+ ], FilterGroupComponent.prototype, "valueChange", void 0);
726
+ FilterGroupComponent = __decorate([
727
+ Component({
728
+ selector: 'kendo-filter-group',
729
+ template: "\n <div class=\"k-filter-toolbar\" role=\"toolbar\" [attr.aria-label]=\"messageFor('filterToolbarAriaLabel')\">\n <div class=\"k-toolbar\">\n <div class=\"k-filter-toolbar-item\">\n <div class=\"k-widget k-button-group\" role=\"group\">\n <button\n *ngFor=\"let operator of logicOperators\"\n kendoButton\n [ngClass]=\"{'k-group-start': operator.value === 'and', 'k-group-end': operator.value === 'or'}\"\n [selected]=\"currentItem.logic === operator.value\"\n [title]=\"operator.text\"\n (click)=\"selectedChange(operator.value)\"\n >\n {{operator.text}}\n </button>\n </div>\n </div>\n <div class=\"k-filter-toolbar-item\">\n <button\n kendoButton\n [title]=\"messageFor('addExpression')\"\n icon=\"filter-add-expression\"\n (click)=\"addFilterExpression()\">\n {{messageFor('addExpression')}}\n </button>\n </div>\n <div class=\"k-filter-toolbar-item\">\n <button\n kendoButton\n [title]=\"messageFor('addGroup')\"\n icon=\"filter-add-group\"\n (click)=\"addFilterGroup()\">\n {{messageFor('addGroup')}}\n </button>\n </div>\n <div class=\"k-filter-toolbar-item\">\n <button\n kendoButton\n icon=\"close\"\n look=\"flat\"\n [title]=\"messageFor('remove')\"\n (click)=\"removeFilterGroup()\">\n </button>\n </div>\n </div>\n </div>\n\n <ul class=\"k-filter-lines\" *ngIf=\"currentItem.filters\">\n <ng-container *ngFor=\"let item of currentItem.filters; let i = index;\">\n <li class=\"k-filter-item\" *ngIf=\"!item.filters\">\n <kendo-filter-expression (valueChange)=\"valueChange.emit()\" [currentItem]=\"item\" [index]=\"i\">\n </kendo-filter-expression>\n </li>\n <li class=\"k-filter-item\" *ngIf=\"item.filters\" >\n <kendo-filter-group\n (valueChange)=\"valueChange.emit()\"\n [currentItem]=\"item\"\n [index]=\"i\"\n >\n </kendo-filter-group>\n </li>\n </ng-container>\n </ul>\n "
730
+ }),
731
+ __metadata("design:paramtypes", [FilterService, LocalizationService])
732
+ ], FilterGroupComponent);
733
+ return FilterGroupComponent;
734
+ }());
735
+
736
+ /**
737
+ * @hidden
738
+ */
739
+ var Messages = /** @class */ (function (_super) {
740
+ __extends(Messages, _super);
741
+ function Messages() {
742
+ return _super !== null && _super.apply(this, arguments) || this;
743
+ }
744
+ __decorate([
745
+ Input(),
746
+ __metadata("design:type", String)
747
+ ], Messages.prototype, "filterExpressionOperators", void 0);
748
+ __decorate([
749
+ Input(),
750
+ __metadata("design:type", String)
751
+ ], Messages.prototype, "filterExpressionFilters", void 0);
752
+ __decorate([
753
+ Input(),
754
+ __metadata("design:type", String)
755
+ ], Messages.prototype, "remove", void 0);
756
+ __decorate([
757
+ Input(),
758
+ __metadata("design:type", String)
759
+ ], Messages.prototype, "addGroup", void 0);
760
+ __decorate([
761
+ Input(),
762
+ __metadata("design:type", String)
763
+ ], Messages.prototype, "addExpression", void 0);
764
+ __decorate([
765
+ Input(),
766
+ __metadata("design:type", String)
767
+ ], Messages.prototype, "filterAndLogic", void 0);
768
+ __decorate([
769
+ Input(),
770
+ __metadata("design:type", String)
771
+ ], Messages.prototype, "filterOrLogic", void 0);
772
+ __decorate([
773
+ Input(),
774
+ __metadata("design:type", String)
775
+ ], Messages.prototype, "filterEqOperator", void 0);
776
+ __decorate([
777
+ Input(),
778
+ __metadata("design:type", String)
779
+ ], Messages.prototype, "filterNotEqOperator", void 0);
780
+ __decorate([
781
+ Input(),
782
+ __metadata("design:type", String)
783
+ ], Messages.prototype, "filterIsNullOperator", void 0);
784
+ __decorate([
785
+ Input(),
786
+ __metadata("design:type", String)
787
+ ], Messages.prototype, "filterIsNotNullOperator", void 0);
788
+ __decorate([
789
+ Input(),
790
+ __metadata("design:type", String)
791
+ ], Messages.prototype, "filterIsEmptyOperator", void 0);
792
+ __decorate([
793
+ Input(),
794
+ __metadata("design:type", String)
795
+ ], Messages.prototype, "filterIsNotEmptyOperator", void 0);
796
+ __decorate([
797
+ Input(),
798
+ __metadata("design:type", String)
799
+ ], Messages.prototype, "filterStartsWithOperator", void 0);
800
+ __decorate([
801
+ Input(),
802
+ __metadata("design:type", String)
803
+ ], Messages.prototype, "filterContainsOperator", void 0);
804
+ __decorate([
805
+ Input(),
806
+ __metadata("design:type", String)
807
+ ], Messages.prototype, "filterNotContainsOperator", void 0);
808
+ __decorate([
809
+ Input(),
810
+ __metadata("design:type", String)
811
+ ], Messages.prototype, "filterEndsWithOperator", void 0);
812
+ __decorate([
813
+ Input(),
814
+ __metadata("design:type", String)
815
+ ], Messages.prototype, "filterGteOperator", void 0);
816
+ __decorate([
817
+ Input(),
818
+ __metadata("design:type", String)
819
+ ], Messages.prototype, "filterGtOperator", void 0);
820
+ __decorate([
821
+ Input(),
822
+ __metadata("design:type", String)
823
+ ], Messages.prototype, "filterLteOperator", void 0);
824
+ __decorate([
825
+ Input(),
826
+ __metadata("design:type", String)
827
+ ], Messages.prototype, "filterLtOperator", void 0);
828
+ __decorate([
829
+ Input(),
830
+ __metadata("design:type", String)
831
+ ], Messages.prototype, "filterIsTrue", void 0);
832
+ __decorate([
833
+ Input(),
834
+ __metadata("design:type", String)
835
+ ], Messages.prototype, "filterIsFalse", void 0);
836
+ __decorate([
837
+ Input(),
838
+ __metadata("design:type", String)
839
+ ], Messages.prototype, "filterBooleanAll", void 0);
840
+ __decorate([
841
+ Input(),
842
+ __metadata("design:type", String)
843
+ ], Messages.prototype, "filterAfterOrEqualOperator", void 0);
844
+ __decorate([
845
+ Input(),
846
+ __metadata("design:type", String)
847
+ ], Messages.prototype, "filterAfterOperator", void 0);
848
+ __decorate([
849
+ Input(),
850
+ __metadata("design:type", String)
851
+ ], Messages.prototype, "filterBeforeOperator", void 0);
852
+ __decorate([
853
+ Input(),
854
+ __metadata("design:type", String)
855
+ ], Messages.prototype, "filterBeforeOrEqualOperator", void 0);
856
+ __decorate([
857
+ Input(),
858
+ __metadata("design:type", String)
859
+ ], Messages.prototype, "editorNumericDecrement", void 0);
860
+ __decorate([
861
+ Input(),
862
+ __metadata("design:type", String)
863
+ ], Messages.prototype, "editorNumericIncrement", void 0);
864
+ __decorate([
865
+ Input(),
866
+ __metadata("design:type", String)
867
+ ], Messages.prototype, "editorDateTodayText", void 0);
868
+ __decorate([
869
+ Input(),
870
+ __metadata("design:type", String)
871
+ ], Messages.prototype, "editorDateToggleText", void 0);
872
+ __decorate([
873
+ Input(),
874
+ __metadata("design:type", String)
875
+ ], Messages.prototype, "filterFieldAriaLabel", void 0);
876
+ __decorate([
877
+ Input(),
878
+ __metadata("design:type", String)
879
+ ], Messages.prototype, "filterOperatorAriaLabel", void 0);
880
+ __decorate([
881
+ Input(),
882
+ __metadata("design:type", String)
883
+ ], Messages.prototype, "filterValueAriaLabel", void 0);
884
+ __decorate([
885
+ Input(),
886
+ __metadata("design:type", String)
887
+ ], Messages.prototype, "filterAriaLabel", void 0);
888
+ __decorate([
889
+ Input(),
890
+ __metadata("design:type", String)
891
+ ], Messages.prototype, "filterToolbarAriaLabel", void 0);
892
+ return Messages;
893
+ }(ComponentMessages));
894
+
895
+ /**
896
+ * Custom component messages override default component messages
897
+ * ([see example]({% slug globalization_filter %}#toc-localization)).
898
+ */
899
+ var CustomMessagesComponent = /** @class */ (function (_super) {
900
+ __extends(CustomMessagesComponent, _super);
901
+ function CustomMessagesComponent(service) {
902
+ var _this = _super.call(this) || this;
903
+ _this.service = service;
904
+ return _this;
905
+ }
906
+ CustomMessagesComponent_1 = CustomMessagesComponent;
907
+ Object.defineProperty(CustomMessagesComponent.prototype, "override", {
908
+ get: function () {
909
+ return true;
910
+ },
911
+ enumerable: true,
912
+ configurable: true
913
+ });
914
+ var CustomMessagesComponent_1;
915
+ CustomMessagesComponent = CustomMessagesComponent_1 = __decorate([
916
+ Component({
917
+ providers: [
918
+ {
919
+ provide: Messages,
920
+ useExisting: forwardRef(function () { return CustomMessagesComponent_1; })
921
+ }
922
+ ],
923
+ selector: 'kendo-filter-messages',
924
+ template: ""
925
+ }),
926
+ __metadata("design:paramtypes", [LocalizationService])
927
+ ], CustomMessagesComponent);
928
+ return CustomMessagesComponent;
929
+ }(Messages));
930
+
931
+ /**
932
+ * @hidden
933
+ */
934
+ var LocalizedMessagesDirective = /** @class */ (function (_super) {
935
+ __extends(LocalizedMessagesDirective, _super);
936
+ function LocalizedMessagesDirective(service) {
937
+ var _this = _super.call(this) || this;
938
+ _this.service = service;
939
+ return _this;
940
+ }
941
+ LocalizedMessagesDirective_1 = LocalizedMessagesDirective;
942
+ var LocalizedMessagesDirective_1;
943
+ LocalizedMessagesDirective = LocalizedMessagesDirective_1 = __decorate([
944
+ Directive({
945
+ providers: [
946
+ {
947
+ provide: Messages,
948
+ useExisting: forwardRef(function () { return LocalizedMessagesDirective_1; })
949
+ }
950
+ ],
951
+ selector: '[kendoFilterLocalizedMessages]'
952
+ }),
953
+ __metadata("design:paramtypes", [LocalizationService])
954
+ ], LocalizedMessagesDirective);
955
+ return LocalizedMessagesDirective;
956
+ }(Messages));
957
+
958
+ var importedModules = [
959
+ CommonModule,
960
+ InputsModule,
961
+ LabelModule,
962
+ DropDownsModule,
963
+ ButtonsModule,
964
+ DateInputsModule
965
+ ];
966
+ /**
967
+ * @hidden
968
+ */
969
+ var SharedModule = /** @class */ (function () {
970
+ function SharedModule() {
971
+ }
972
+ SharedModule = __decorate([
973
+ NgModule({
974
+ imports: importedModules.slice(),
975
+ exports: importedModules.slice(),
976
+ providers: [FilterService]
977
+ })
978
+ ], SharedModule);
979
+ return SharedModule;
980
+ }());
981
+
982
+ /**
983
+ * Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
984
+ * definition for the Filter component.
985
+ *
986
+ * @example
987
+ *
988
+ * ```
989
+ * // Import the Filter module
990
+ * import { FilterModule } from '@progress/kendo-angular-filter';
991
+ *
992
+ * // The browser platform with a compiler
993
+ * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
994
+ *
995
+ * import { NgModule } from '@angular/core';
996
+ *
997
+ * // Import the app component
998
+ * import { AppComponent } from './app.component';
999
+ *
1000
+ * // Define the app module
1001
+ * _@NgModule({
1002
+ * declarations: [AppComponent], // declare app component
1003
+ * imports: [BrowserModule, FilterModule], // import Filter module
1004
+ * bootstrap: [AppComponent]
1005
+ * })
1006
+ * export class AppModule { }
1007
+ *
1008
+ * // Compile and launch the module
1009
+ * platformBrowserDynamic().bootstrapModule(AppModule);
1010
+ *
1011
+ * ```
1012
+ */
1013
+ var FilterModule = /** @class */ (function () {
1014
+ function FilterModule() {
1015
+ }
1016
+ FilterModule = __decorate([
1017
+ NgModule({
1018
+ imports: [SharedModule],
1019
+ declarations: [FilterComponent,
1020
+ FilterNumericEditorComponent,
1021
+ FilterTextEditorComponent,
1022
+ FilterExpressionComponent,
1023
+ FilterGroupComponent,
1024
+ FilterExpressionOperatorsComponent,
1025
+ FilterBooleanEditorComponent,
1026
+ FilterDateEditorComponent,
1027
+ LocalizedMessagesDirective,
1028
+ CustomMessagesComponent,
1029
+ AriaLabelValueDirective
1030
+ ],
1031
+ exports: [FilterComponent,
1032
+ FilterNumericEditorComponent,
1033
+ FilterTextEditorComponent,
1034
+ FilterExpressionComponent,
1035
+ FilterGroupComponent,
1036
+ FilterExpressionOperatorsComponent,
1037
+ FilterBooleanEditorComponent,
1038
+ FilterDateEditorComponent,
1039
+ LocalizedMessagesDirective,
1040
+ CustomMessagesComponent,
1041
+ AriaLabelValueDirective],
1042
+ providers: [
1043
+ LocalizationService,
1044
+ {
1045
+ provide: L10N_PREFIX,
1046
+ useValue: 'kendo.filter'
1047
+ }
1048
+ ]
1049
+ })
1050
+ ], FilterModule);
1051
+ return FilterModule;
1052
+ }());
1053
+
1054
+ /**
1055
+ * Generated bundle index. Do not edit.
1056
+ */
1057
+
1058
+ export { AriaLabelValueDirective, FilterBooleanEditorComponent, FilterDateEditorComponent, FilterNumericEditorComponent, FilterTextEditorComponent, FilterExpressionOperatorsComponent, FilterExpressionComponent, FilterGroupComponent, FilterService, CustomMessagesComponent, LocalizedMessagesDirective, Messages, SharedModule, FilterComponent, FilterModule };