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