@progress/kendo-angular-filter 2.3.1 → 11.0.0-develop.100

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 (59) hide show
  1. package/LICENSE.md +1 -1
  2. package/NOTICE.txt +4 -4
  3. package/README.md +1 -1
  4. package/aria-label.directive.d.ts +1 -1
  5. package/base-filter-row.component.d.ts +1 -1
  6. package/editors/boolean-editor.component.d.ts +1 -1
  7. package/editors/date-editor.component.d.ts +1 -1
  8. package/editors/numeric-editor.component.d.ts +1 -1
  9. package/editors/text-editor.component.d.ts +1 -1
  10. package/error-messages.d.ts +1 -1
  11. package/{esm2015/aria-label.directive.js → esm2020/aria-label.directive.mjs} +5 -5
  12. package/{esm2015/base-filter-row.component.js → esm2020/base-filter-row.component.mjs} +8 -6
  13. package/{esm2015/editors/boolean-editor.component.js → esm2020/editors/boolean-editor.component.mjs} +6 -5
  14. package/{esm2015/editors/date-editor.component.js → esm2020/editors/date-editor.component.mjs} +6 -5
  15. package/{esm2015/editors/numeric-editor.component.js → esm2020/editors/numeric-editor.component.mjs} +5 -4
  16. package/{esm2015/editors/text-editor.component.js → esm2020/editors/text-editor.component.mjs} +5 -4
  17. package/{esm2015/error-messages.js → esm2020/error-messages.mjs} +1 -1
  18. package/{esm2015/filter-expression-operators.component.js → esm2020/filter-expression-operators.component.mjs} +5 -4
  19. package/{esm2015/filter-expression.component.js → esm2020/filter-expression.component.mjs} +23 -13
  20. package/{esm2015/filter-field.component.js → esm2020/filter-field.component.mjs} +4 -4
  21. package/{esm2015/filter-group.component.js → esm2020/filter-group.component.mjs} +31 -9
  22. package/{esm2015/filter.component.js → esm2020/filter.component.mjs} +12 -10
  23. package/{esm2015/filter.module.js → esm2020/filter.module.mjs} +5 -5
  24. package/{esm2015/filter.service.js → esm2020/filter.service.mjs} +7 -7
  25. package/{esm2015/main.js → esm2020/index.mjs} +1 -1
  26. package/{esm2015/localization/custom-messages.component.js → esm2020/localization/custom-messages.component.mjs} +5 -4
  27. package/{esm2015/localization/localized-messages.directive.js → esm2020/localization/localized-messages.directive.mjs} +5 -4
  28. package/{esm2015/localization/messages.js → esm2020/localization/messages.mjs} +4 -4
  29. package/{esm2015/model/filter-expression.js → esm2020/model/filter-expression.mjs} +1 -1
  30. package/{esm2015/navigation.service.js → esm2020/navigation.service.mjs} +20 -15
  31. package/{esm2015/package-metadata.js → esm2020/package-metadata.mjs} +3 -3
  32. package/{esm2015/kendo-angular-filter.js → esm2020/progress-kendo-angular-filter.mjs} +2 -2
  33. package/{esm2015/shared.module.js → esm2020/shared.module.mjs} +5 -5
  34. package/{esm2015/templates/value-editor.template.js → esm2020/templates/value-editor.template.mjs} +5 -5
  35. package/{esm2015/util.js → esm2020/util.mjs} +4 -4
  36. package/fesm2015/{kendo-angular-filter.js → progress-kendo-angular-filter.mjs} +117 -86
  37. package/fesm2020/progress-kendo-angular-filter.mjs +2247 -0
  38. package/filter-expression-operators.component.d.ts +1 -1
  39. package/filter-expression.component.d.ts +6 -1
  40. package/filter-field.component.d.ts +1 -1
  41. package/filter-group.component.d.ts +14 -1
  42. package/filter.component.d.ts +1 -1
  43. package/filter.module.d.ts +1 -1
  44. package/filter.service.d.ts +1 -1
  45. package/{main.d.ts → index.d.ts} +1 -1
  46. package/localization/custom-messages.component.d.ts +1 -1
  47. package/localization/localized-messages.directive.d.ts +1 -1
  48. package/localization/messages.d.ts +1 -1
  49. package/model/filter-expression.d.ts +1 -1
  50. package/navigation.service.d.ts +1 -1
  51. package/package-metadata.d.ts +1 -1
  52. package/package.json +35 -60
  53. package/{kendo-angular-filter.d.ts → progress-kendo-angular-filter.d.ts} +2 -2
  54. package/schematics/ngAdd/index.js +4 -6
  55. package/shared.module.d.ts +1 -1
  56. package/templates/value-editor.template.d.ts +1 -1
  57. package/util.d.ts +1 -1
  58. package/bundles/kendo-angular-filter.umd.js +0 -5
  59. package/schematics/ngAdd/index.js.map +0 -1
@@ -0,0 +1,2247 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import * as i0 from '@angular/core';
6
+ import { Injectable, Directive, Component, Input, ContentChild, EventEmitter, Output, isDevMode, forwardRef, ViewChildren, HostListener, HostBinding, ContentChildren, NgModule } from '@angular/core';
7
+ import * as i1 from '@progress/kendo-angular-l10n';
8
+ import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
9
+ import { validatePackage } from '@progress/kendo-licensing';
10
+ import { Keys } from '@progress/kendo-angular-common';
11
+ import { xIcon, filterAddGroupIcon, filterAddExpressionIcon } from '@progress/kendo-svg-icons';
12
+ import * as i10 from '@progress/kendo-angular-buttons';
13
+ import { ButtonsModule } from '@progress/kendo-angular-buttons';
14
+ import * as i2 from '@progress/kendo-angular-dropdowns';
15
+ import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
16
+ import * as i2$1 from '@progress/kendo-angular-inputs';
17
+ import { InputsModule } from '@progress/kendo-angular-inputs';
18
+ import * as i2$2 from '@progress/kendo-angular-dateinputs';
19
+ import { DateInputsModule } from '@progress/kendo-angular-dateinputs';
20
+ import * as i12 from '@angular/common';
21
+ import { CommonModule } from '@angular/common';
22
+ import { LabelModule } from '@progress/kendo-angular-label';
23
+
24
+ /**
25
+ * @hidden
26
+ */
27
+ class FilterService {
28
+ constructor() {
29
+ this.normalizedValue = { logic: 'and', filters: [] };
30
+ this.filters = [];
31
+ }
32
+ addFilterGroup(item) {
33
+ const filterGroup = { logic: 'and', filters: [] };
34
+ item.filters.push(filterGroup);
35
+ }
36
+ addFilterExpression(item) {
37
+ const filterExpression = { operator: 'eq', value: null, field: null };
38
+ item.filters.push(filterExpression);
39
+ }
40
+ remove(item, positionIndex, parentItem) {
41
+ if (!parentItem) {
42
+ parentItem = this.normalizedValue;
43
+ }
44
+ if (item === parentItem) {
45
+ parentItem.filters = [];
46
+ return;
47
+ }
48
+ const index = parentItem.filters.indexOf(item);
49
+ if (index >= 0 && index === positionIndex) {
50
+ parentItem.filters = parentItem.filters.filter((i) => i !== item);
51
+ return;
52
+ }
53
+ parentItem.filters.forEach((filter) => filter.filters && this.remove(item, positionIndex, filter));
54
+ }
55
+ }
56
+ FilterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
57
+ FilterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterService });
58
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterService, decorators: [{
59
+ type: Injectable
60
+ }] });
61
+
62
+ /**
63
+ * @hidden
64
+ */
65
+ const nullOperators = ["isnull", "isnotnull", "isempty", "isnotempty"];
66
+ /**
67
+ * @hidden
68
+ */
69
+ const numericOperators = [
70
+ { text: "Is equal to", value: "eq" },
71
+ { text: "Not equal to", value: "neq" },
72
+ { text: "Greater than or equal to", value: "gte" },
73
+ { text: "Greater than", value: "gt" },
74
+ { text: "Less than or equal to", value: "lte" },
75
+ { text: "Less than", value: "lt" },
76
+ { text: "Is null", value: "isnull" },
77
+ { text: "Is not null", value: "isnotnull" }
78
+ ];
79
+ /**
80
+ * @hidden
81
+ */
82
+ const stringOperators = [
83
+ { text: "Is equal to", value: "eq" },
84
+ { text: "Not equal to", value: "neq" },
85
+ { text: "Contains", value: "contains" },
86
+ { text: "Does not contain", value: "doesnotcontain" },
87
+ { text: "Starts with", value: "startswith" },
88
+ { text: "Ends with", value: "endswith" },
89
+ { text: "Is null", value: "isnull" },
90
+ { text: "Is not null", value: "isnotnull" },
91
+ { text: "Is empty", value: "isempty" },
92
+ { text: "Is not empty", value: "isnotempty" }
93
+ ];
94
+ /**
95
+ * @hidden
96
+ */
97
+ const booleanOperators = [
98
+ { text: "Is equal to", value: "eq" },
99
+ { text: "Is not equal to", value: "neq" }
100
+ ];
101
+ /**
102
+ * @hidden
103
+ */
104
+ const dateOperators = [
105
+ { text: "Is equal to", value: "eq" },
106
+ { text: "Not equal to", value: "neq" },
107
+ { text: "Greater than or equal to", value: "gte" },
108
+ { text: "Greater than", value: "gt" },
109
+ { text: "Less than or equal to", value: "lte" },
110
+ { text: "Less than", value: "lt" },
111
+ { text: "Is null", value: "isnull" },
112
+ { text: "Is not null", value: "isnotnull" }
113
+ ];
114
+ /**
115
+ * @hidden
116
+ */
117
+ const isArray = (value) => Array.isArray(value);
118
+ /**
119
+ * @hidden
120
+ */
121
+ const getKeyByValue = (object, value) => {
122
+ return Object.keys(object).find(key => object[key] === value);
123
+ };
124
+ /**
125
+ * @hidden
126
+ */
127
+ const defaultStringOperators = {
128
+ "filterEqOperator": "eq",
129
+ "filterNotEqOperator": "neq",
130
+ "filterContainsOperator": "contains",
131
+ "filterNotContainsOperator": "doesnotcontain",
132
+ "filterStartsWithOperator": "startswith",
133
+ "filterEndsWithOperator": "endswith",
134
+ "filterIsNullOperator": "isnull",
135
+ "filterIsNotNullOperator": "isnotnull",
136
+ "filterIsEmptyOperator": "isempty",
137
+ "filterIsNotEmptyOperator": "isnotempty"
138
+ };
139
+ /**
140
+ * @hidden
141
+ */
142
+ const defaultNumericOperators = {
143
+ "filterEqOperator": "eq",
144
+ "filterNotEqOperator": "neq",
145
+ "filterGteOperator": "gte",
146
+ "filterGtOperator": "gt",
147
+ "filterLteOperator": "lte",
148
+ "filterLtOperator": "lt",
149
+ "filterIsNullOperator": "isnull",
150
+ "filterIsNotNullOperator": "isnotnull"
151
+ };
152
+ /**
153
+ * @hidden
154
+ */
155
+ const defaultDateOperators = {
156
+ "filterEqOperator": "eq",
157
+ "filterNotEqOperator": "neq",
158
+ "filterAfterOrEqualOperator": "gte",
159
+ "filterAfterOperator": "gt",
160
+ "filterBeforeOrEqualOperator": "lte",
161
+ "filterBeforeOperator": "lt",
162
+ "filterIsNullOperator": "isnull",
163
+ "filterIsNotNullOperator": "isnotnull"
164
+ };
165
+ /**
166
+ * @hidden
167
+ */
168
+ const defaultOperators = {
169
+ "string": defaultStringOperators,
170
+ "number": defaultNumericOperators,
171
+ "date": defaultDateOperators
172
+ };
173
+ /**
174
+ * @hidden
175
+ */
176
+ const logicOperators = {
177
+ "filterAndLogic": 'and',
178
+ "filterOrLogic": 'or'
179
+ };
180
+ /**
181
+ * @hidden
182
+ */
183
+ const isFilterEditor = (editorType) => {
184
+ const supportedEditorTypes = ['string', 'number', 'boolean', 'date'];
185
+ return supportedEditorTypes.indexOf(editorType) >= 0;
186
+ };
187
+ /**
188
+ * @hidden
189
+ */
190
+ const localizeOperators = operators => localization => Object.keys(operators).map(key => ({
191
+ text: localization.get(key),
192
+ value: operators[key]
193
+ }));
194
+ /**
195
+ * @hidden
196
+ */
197
+ const isPresent = (value) => value !== null && value !== undefined;
198
+ /**
199
+ * @hidden
200
+ */
201
+ class FilterItem {
202
+ }
203
+ FilterItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterItem, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
204
+ FilterItem.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterItem });
205
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterItem, decorators: [{
206
+ type: Injectable
207
+ }] });
208
+ /**
209
+ * @hidden
210
+ */
211
+ const selectors = {
212
+ andButton: `button.k-group-start`,
213
+ orButton: `button.k-group-end`,
214
+ addFilterButton: `button[icon="filter-add-expression"]`,
215
+ addGroupButton: `button[icon="filter-add-group"]`,
216
+ removeButton: `button[icon="x"]`,
217
+ filterFieldWrapper: `.k-filter-field`,
218
+ filterOperatorWrapper: `.k-filter-operator`,
219
+ filterValueEditorWrapper: `.k-filter-value`,
220
+ kendoDropDownListComponent: `kendo-dropdownlist`,
221
+ kendoInput: `.k-input`,
222
+ kendoInputInner: `.k-input-inner`,
223
+ inputElement: `input`,
224
+ textAreaElement: `textarea`,
225
+ kendoToolbar: `.k-toolbar`,
226
+ kendoButton: `.k-button`,
227
+ kendoFilterToolbarItem: `.k-filter-toolbar-item`
228
+ };
229
+
230
+ /**
231
+ * @hidden
232
+ */
233
+ const packageMetadata = {
234
+ name: '@progress/kendo-angular-filter',
235
+ productName: 'Kendo UI for Angular',
236
+ productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
237
+ publishDate: 1673469364,
238
+ version: '',
239
+ licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
240
+ };
241
+
242
+ class FilterValueEditorTemplateDirective {
243
+ constructor(templateRef) {
244
+ this.templateRef = templateRef;
245
+ }
246
+ }
247
+ FilterValueEditorTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterValueEditorTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
248
+ FilterValueEditorTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: FilterValueEditorTemplateDirective, selector: "[kendoFilterValueEditorTemplate]", ngImport: i0 });
249
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterValueEditorTemplateDirective, decorators: [{
250
+ type: Directive,
251
+ args: [{
252
+ selector: '[kendoFilterValueEditorTemplate]'
253
+ }]
254
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
255
+
256
+ /**
257
+ * Represents the [Kendo UI Filter Field component for Angular]({% slug api_filter_filterfieldcomponent %}).
258
+ * The Filter Field component can be used to add Filter Expressions declaratively.
259
+ * @example
260
+ * ```ts
261
+ * @Component({
262
+ * selector: 'my-app',
263
+ * template: `
264
+ * <kendo-filter (valueChange)="onValueChange($event)">
265
+ * <kendo-filter-field field="country" editor="string" [operators]="['neq', 'eq', 'contains']"></kendo-filter-field>
266
+ * <kendo-filter-field field="budget" editor="number"></kendo-filter-field>
267
+ * <kendo-filter-field field="discontinued" title="Discontinued" editor="boolean"></kendo-filter-field>
268
+ * <kendo-filter-field field="ordered on" title="Ordered on" editor="date"></kendo-filter-field>
269
+ * <kendo-filter>
270
+ * `
271
+ * })
272
+ * export class AppComponent {
273
+ * onValueChange(e: CompositeFilterDescriptor){
274
+ * console.log(e)
275
+ * }
276
+ * }
277
+ * ```
278
+ */
279
+ class FilterFieldComponent {
280
+ /**
281
+ * Specifies the `title` text that will be displayed by the user-defined filter.
282
+ * If the `title` isn't set, the value passed to `field` is used.
283
+ */
284
+ set title(_title) {
285
+ if (_title) {
286
+ this._title = _title;
287
+ }
288
+ else {
289
+ this._title = this.field;
290
+ }
291
+ }
292
+ get title() {
293
+ return this._title;
294
+ }
295
+ }
296
+ FilterFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
297
+ FilterFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FilterFieldComponent, selector: "kendo-filter-field", inputs: { field: "field", title: "title", editor: "editor", operators: "operators", editorFormat: "editorFormat" }, queries: [{ propertyName: "editorTemplate", first: true, predicate: FilterValueEditorTemplateDirective, descendants: true }], ngImport: i0, template: ``, isInline: true });
298
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterFieldComponent, decorators: [{
299
+ type: Component,
300
+ args: [{
301
+ selector: 'kendo-filter-field',
302
+ template: ``
303
+ }]
304
+ }], propDecorators: { field: [{
305
+ type: Input
306
+ }], title: [{
307
+ type: Input
308
+ }], editor: [{
309
+ type: Input
310
+ }], operators: [{
311
+ type: Input
312
+ }], editorFormat: [{
313
+ type: Input
314
+ }], editorTemplate: [{
315
+ type: ContentChild,
316
+ args: [FilterValueEditorTemplateDirective]
317
+ }] } });
318
+
319
+ /**
320
+ * @hidden
321
+ */
322
+ class NavigationService {
323
+ constructor(cdr, renderer) {
324
+ this.cdr = cdr;
325
+ this.renderer = renderer;
326
+ this.hierarchicalFilterItems = [];
327
+ this.flattenFilterItems = [];
328
+ this.currentToolbarItemIndex = 0;
329
+ this.currentToolbarItemChildrenIndex = 0;
330
+ this.isInnerNavigationActivated = false;
331
+ this.isFilterExpressionComponentFocused = false;
332
+ }
333
+ processKeyDown(key, event) {
334
+ switch (key) {
335
+ case Keys.ArrowUp: {
336
+ event.preventDefault();
337
+ if (!this.isInnerNavigationActivated) {
338
+ this.currentToolbarItemIndex > 0 ? this.currentToolbarItemIndex-- : this.currentToolbarItemIndex;
339
+ const elementToFocus = this.flattenFilterItems[this.currentToolbarItemIndex].toolbarElement;
340
+ this.focusCurrentElement(elementToFocus);
341
+ }
342
+ break;
343
+ }
344
+ case Keys.ArrowDown: {
345
+ event.preventDefault();
346
+ if (!this.isInnerNavigationActivated) {
347
+ this.currentToolbarItemIndex < this.flattenFilterItems.length - 1 ? this.currentToolbarItemIndex++ : this.currentToolbarItemIndex;
348
+ const elementToFocus = this.flattenFilterItems[this.currentToolbarItemIndex].toolbarElement;
349
+ this.focusCurrentElement(elementToFocus);
350
+ }
351
+ break;
352
+ }
353
+ case Keys.Enter: {
354
+ const isEventTargetFilterToolbar = event.target.closest(selectors.kendoToolbar);
355
+ if (!this.isInnerNavigationActivated && isEventTargetFilterToolbar) {
356
+ event.preventDefault();
357
+ this.isInnerNavigationActivated = true;
358
+ this.currentToolbarItemChildrenIndex = 0;
359
+ const elementToFocus = this.flattenFilterItems[this.currentToolbarItemIndex].focusableChildren[this.currentToolbarItemChildrenIndex];
360
+ this.focusCurrentElement(elementToFocus);
361
+ }
362
+ const isEventTargetKendoFilterToolbarItem = event.target.closest(selectors.kendoFilterToolbarItem);
363
+ const isEventTargetButton = event.target.closest(selectors.kendoButton);
364
+ if (this.isInnerNavigationActivated &&
365
+ !this.isFilterExpressionComponentFocused &&
366
+ isEventTargetKendoFilterToolbarItem &&
367
+ !isEventTargetButton) {
368
+ event.preventDefault();
369
+ this.isFilterExpressionComponentFocused = true;
370
+ const focusableElement = this.flattenFilterItems[this.currentToolbarItemIndex].focusableChildren[this.currentToolbarItemChildrenIndex];
371
+ const elementToFocus = focusableElement.querySelector(selectors.KendoDropDownListComponent) ||
372
+ focusableElement.querySelector(selectors.kendoInputInner) ||
373
+ focusableElement.querySelector(selectors.inputElement) ||
374
+ focusableElement.querySelector(selectors.textAreaElement);
375
+ this.focusCurrentElement(elementToFocus);
376
+ }
377
+ break;
378
+ }
379
+ case Keys.Escape: {
380
+ if (this.isInnerNavigationActivated && !this.isFilterExpressionComponentFocused) {
381
+ event.preventDefault();
382
+ this.isInnerNavigationActivated = false;
383
+ this.currentToolbarItemChildrenIndex = 0;
384
+ const elementToFocus = this.flattenFilterItems[this.currentToolbarItemIndex].toolbarElement;
385
+ this.focusCurrentElement(elementToFocus);
386
+ }
387
+ if (this.isFilterExpressionComponentFocused) {
388
+ event.preventDefault();
389
+ this.isFilterExpressionComponentFocused = false;
390
+ this.isInnerNavigationActivated = true;
391
+ const elementToFocus = this.flattenFilterItems[this.currentToolbarItemIndex].focusableChildren[this.currentToolbarItemChildrenIndex];
392
+ this.focusCurrentElement(elementToFocus);
393
+ }
394
+ break;
395
+ }
396
+ case Keys.ArrowRight: {
397
+ if (this.isInnerNavigationActivated && !this.isFilterExpressionComponentFocused) {
398
+ event.preventDefault();
399
+ this.currentToolbarItemChildrenIndex < this.flattenFilterItems[this.currentToolbarItemIndex].focusableChildren.length - 1 ? this.currentToolbarItemChildrenIndex++ : this.currentToolbarItemChildrenIndex;
400
+ const elementToFocus = this.flattenFilterItems[this.currentToolbarItemIndex].focusableChildren[this.currentToolbarItemChildrenIndex];
401
+ this.focusCurrentElement(elementToFocus);
402
+ }
403
+ break;
404
+ }
405
+ case Keys.ArrowLeft: {
406
+ if (this.isInnerNavigationActivated && !this.isFilterExpressionComponentFocused) {
407
+ event.preventDefault();
408
+ this.currentToolbarItemChildrenIndex > 0 ? this.currentToolbarItemChildrenIndex-- : this.currentToolbarItemChildrenIndex;
409
+ const elementToFocus = this.flattenFilterItems[this.currentToolbarItemIndex].focusableChildren[this.currentToolbarItemChildrenIndex];
410
+ this.focusCurrentElement(elementToFocus);
411
+ }
412
+ break;
413
+ }
414
+ default:
415
+ break;
416
+ }
417
+ }
418
+ focusCurrentElement(element, isOnMouseDown) {
419
+ this.renderer.setAttribute(this.currentlyFocusedElement, 'tabindex', '-1');
420
+ this.currentlyFocusedElement = element;
421
+ if (element) {
422
+ this.renderer.setAttribute(this.currentlyFocusedElement, 'tabindex', '0');
423
+ if (!isOnMouseDown) {
424
+ this.currentlyFocusedElement.focus();
425
+ }
426
+ }
427
+ }
428
+ flattenHierarchicalFilterItems(filterItems) {
429
+ filterItems.forEach((filterRow) => {
430
+ const flattenItem = { component: filterRow, isGroup: false, toolbarElement: filterRow.toolbarElement, focusableChildren: [] };
431
+ this.flattenFilterItems.push(flattenItem);
432
+ if ((filterRow['operators'] && filterRow['filterItems']?.length > 0)) {
433
+ this.setGroupItemChildren(flattenItem, filterRow);
434
+ this.flattenHierarchicalFilterItems(filterRow['filterItems']);
435
+ }
436
+ else if (filterRow['operators'] && filterRow['filterItems']?.length === 0) {
437
+ this.setGroupItemChildren(flattenItem, filterRow);
438
+ }
439
+ else {
440
+ flattenItem.focusableChildren.push(filterRow.toolbarElement.querySelector(selectors.filterFieldWrapper));
441
+ if (filterRow.toolbarElement.querySelector('.k-filter-operator')) {
442
+ flattenItem.focusableChildren.push(filterRow.toolbarElement.querySelector(selectors.filterOperatorWrapper));
443
+ }
444
+ flattenItem.focusableChildren.push(filterRow.toolbarElement.querySelector(selectors.filterValueEditorWrapper));
445
+ flattenItem.focusableChildren.push(filterRow.toolbarElement.querySelector(selectors.removeButton));
446
+ }
447
+ });
448
+ }
449
+ setGroupItemChildren(flattenItem, filterRow) {
450
+ flattenItem.isGroup = true;
451
+ flattenItem.focusableChildren.push(filterRow.toolbarElement.querySelector(selectors.andButton));
452
+ flattenItem.focusableChildren.push(filterRow.toolbarElement.querySelector(selectors.orButton));
453
+ flattenItem.focusableChildren.push(filterRow.toolbarElement.querySelector(selectors.addFilterButton));
454
+ flattenItem.focusableChildren.push(filterRow.toolbarElement.querySelector(selectors.addGroupButton));
455
+ flattenItem.focusableChildren.push(filterRow.toolbarElement.querySelector(selectors.removeButton));
456
+ }
457
+ setItemIndexes() {
458
+ this.flattenFilterItems.forEach((item, index) => {
459
+ item.component['itemNumber'] = index;
460
+ });
461
+ this.cdr.detectChanges();
462
+ }
463
+ reset(items) {
464
+ this.flattenFilterItems = [];
465
+ this.hierarchicalFilterItems = items;
466
+ this.flattenHierarchicalFilterItems(items);
467
+ this.setItemIndexes();
468
+ }
469
+ }
470
+ NavigationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NavigationService, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Injectable });
471
+ NavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NavigationService });
472
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NavigationService, decorators: [{
473
+ type: Injectable
474
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }]; } });
475
+
476
+ /**
477
+ * @hidden
478
+ */
479
+ const FilterErrorMessages = {
480
+ missingFilters: `Pass at least one user-defined filter through the [filters] input property or nest kendo-filter-field components. See http://www.telerik.com/kendo-angular-ui/components/filter/#data-binding`,
481
+ missingFilterForUsedField: (field) => `There is no user-defined filter with '${field}' field provided through the [filters] input property.`,
482
+ missingValueForBooleanField: (field) => `Provide a value for the boolean '${field}' user-defined filter as the operator is always set to 'eq'.`,
483
+ operatorBooleanField: (field) => `The operator of the boolean '${field}' user-defined filter is always set to 'eq'.`,
484
+ filterMissingUsedOperator: (field, operator) => `The user-defined filter with field '${field}' is missing the '${operator}' operator.`,
485
+ improperNumericEditorValue: (title) => `The provided value for the numeric editor of the '${title}' filter expression isn't one of a supported type string or NumberFormat. See http://www.telerik.com/kendo-angular-ui/components/filter/#editor-formats/`,
486
+ improperDateEditorValue: (title) => `The provided value for the date editor of the '${title}' filter expression isn't one of a supported type string or DateFormat. See http://www.telerik.com/kendo-angular-ui/components/filter/#editor-formats/`
487
+ };
488
+
489
+ /**
490
+ * @hidden
491
+ */
492
+ class BaseFilterRowComponent {
493
+ constructor(element, navigationService, localization, renderer) {
494
+ this.element = element;
495
+ this.navigationService = navigationService;
496
+ this.localization = localization;
497
+ this.renderer = renderer;
498
+ this.valueChange = new EventEmitter();
499
+ }
500
+ get toolbarElement() {
501
+ return this.element.nativeElement.querySelector('.k-toolbar');
502
+ }
503
+ onFocus() {
504
+ this.renderer.addClass(this.navigationService.flattenFilterItems[this.itemNumber].toolbarElement, 'k-focus');
505
+ this.navigationService.isInnerNavigationActivated = false;
506
+ }
507
+ onBlur() {
508
+ this.renderer.removeClass(this.navigationService.flattenFilterItems[this.itemNumber].toolbarElement, 'k-focus');
509
+ }
510
+ messageFor(key) {
511
+ return this.localization.get(key);
512
+ }
513
+ onMouseDown(event) {
514
+ let elementToFocus;
515
+ const closestFilterToolbarItem = event.target.closest(selectors.kendoFilterToolbarItem);
516
+ const closestToolbarItem = event.target.closest(selectors.kendoToolbar);
517
+ if (closestFilterToolbarItem) {
518
+ const index = Array.from(closestToolbarItem.children).indexOf(closestFilterToolbarItem);
519
+ this.navigationService.currentToolbarItemChildrenIndex = index;
520
+ this.navigationService.isInnerNavigationActivated = true;
521
+ this.navigationService.isFilterExpressionComponentFocused = true;
522
+ const wrapperElement = this.navigationService.flattenFilterItems[this.itemNumber].focusableChildren[index];
523
+ elementToFocus = wrapperElement.querySelector(selectors.kendoDropDownListComponent) ||
524
+ wrapperElement.querySelector(selectors.kendoInput) ||
525
+ wrapperElement.querySelector(selectors.kendoInputInner) ||
526
+ wrapperElement.querySelector(selectors.inputElement) ||
527
+ wrapperElement.querySelector(selectors.textAreaElement);
528
+ }
529
+ else {
530
+ this.navigationService.currentToolbarItemChildrenIndex = 0;
531
+ this.navigationService.isInnerNavigationActivated = false;
532
+ this.navigationService.isFilterExpressionComponentFocused = false;
533
+ elementToFocus = this.navigationService.flattenFilterItems[this.itemNumber].toolbarElement;
534
+ }
535
+ this.navigationService.currentToolbarItemIndex = this.itemNumber;
536
+ this.navigationService.focusCurrentElement(elementToFocus, true);
537
+ }
538
+ }
539
+ BaseFilterRowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseFilterRowComponent, deps: [{ token: i0.ElementRef }, { token: NavigationService }, { token: i1.LocalizationService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
540
+ BaseFilterRowComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: BaseFilterRowComponent, inputs: { index: "index" }, outputs: { valueChange: "valueChange" }, ngImport: i0 });
541
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseFilterRowComponent, decorators: [{
542
+ type: Directive,
543
+ args: [{}]
544
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: NavigationService }, { type: i1.LocalizationService }, { type: i0.Renderer2 }]; }, propDecorators: { index: [{
545
+ type: Input
546
+ }], valueChange: [{
547
+ type: Output
548
+ }] } });
549
+
550
+ /**
551
+ * @hidden
552
+ */
553
+ class AriaLabelValueDirective {
554
+ constructor(hostElement, renderer) {
555
+ this.hostElement = hostElement;
556
+ this.renderer = renderer;
557
+ }
558
+ ngOnInit() {
559
+ const target = this.hostElement.nativeElement.querySelector('input') || this.hostElement.nativeElement;
560
+ this.renderer.setAttribute(target, 'aria-label', this.ariaLabel);
561
+ }
562
+ }
563
+ AriaLabelValueDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AriaLabelValueDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
564
+ AriaLabelValueDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: AriaLabelValueDirective, selector: "[kendoAriaLabelValue]", inputs: { ariaLabel: ["kendoAriaLabelValue", "ariaLabel"] }, ngImport: i0 });
565
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AriaLabelValueDirective, decorators: [{
566
+ type: Directive,
567
+ args: [{ selector: '[kendoAriaLabelValue]' }]
568
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { ariaLabel: [{
569
+ type: Input,
570
+ args: ['kendoAriaLabelValue']
571
+ }] } });
572
+
573
+ /**
574
+ * @hidden
575
+ */
576
+ class FilterExpressionOperatorsComponent {
577
+ constructor(localization) {
578
+ this.localization = localization;
579
+ this.valueChange = new EventEmitter();
580
+ this.operators = [];
581
+ }
582
+ messageFor(key) {
583
+ return this.localization.get(key);
584
+ }
585
+ getOperator(operatorValue) {
586
+ return this.messageFor(getKeyByValue(defaultOperators[this.editorType], operatorValue));
587
+ }
588
+ operatorValueChange(value) {
589
+ this.valueChange.emit(value);
590
+ }
591
+ }
592
+ FilterExpressionOperatorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterExpressionOperatorsComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
593
+ FilterExpressionOperatorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FilterExpressionOperatorsComponent, selector: "kendo-filter-expression-operators", inputs: { currentItem: "currentItem", editorType: "editorType", operators: "operators" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: `
594
+ <kendo-dropdownlist
595
+ [tabindex]="-1"
596
+ [kendoAriaLabelValue]="messageFor('filterOperatorAriaLabel')"
597
+ [data]="operators"
598
+ [title]="messageFor('filterExpressionOperators')"
599
+ [(value)]="currentItem.operator"
600
+ (valueChange)="operatorValueChange($event)"
601
+ [valuePrimitive]="true"
602
+ textField="text"
603
+ valueField="value"
604
+ >
605
+ <ng-template kendoDropDownListValueTemplate let-dataItem>
606
+ {{ getOperator(dataItem.value) }}
607
+ </ng-template>
608
+ <ng-template kendoDropDownListItemTemplate let-dataItem>
609
+ {{ getOperator(dataItem.value) }}
610
+ </ng-template>
611
+ </kendo-dropdownlist>
612
+ `, isInline: true, components: [{ type: i2.DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["iconClass", "loading", "data", "value", "textField", "valueField", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }], directives: [{ type: AriaLabelValueDirective, selector: "[kendoAriaLabelValue]", inputs: ["kendoAriaLabelValue"] }, { type: i2.ValueTemplateDirective, selector: "[kendoDropDownListValueTemplate],[kendoDropDownTreeValueTemplate]" }, { type: i2.ItemTemplateDirective, selector: "[kendoDropDownListItemTemplate],[kendoComboBoxItemTemplate],[kendoAutoCompleteItemTemplate],[kendoMultiSelectItemTemplate]" }] });
613
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterExpressionOperatorsComponent, decorators: [{
614
+ type: Component,
615
+ args: [{
616
+ selector: "kendo-filter-expression-operators",
617
+ template: `
618
+ <kendo-dropdownlist
619
+ [tabindex]="-1"
620
+ [kendoAriaLabelValue]="messageFor('filterOperatorAriaLabel')"
621
+ [data]="operators"
622
+ [title]="messageFor('filterExpressionOperators')"
623
+ [(value)]="currentItem.operator"
624
+ (valueChange)="operatorValueChange($event)"
625
+ [valuePrimitive]="true"
626
+ textField="text"
627
+ valueField="value"
628
+ >
629
+ <ng-template kendoDropDownListValueTemplate let-dataItem>
630
+ {{ getOperator(dataItem.value) }}
631
+ </ng-template>
632
+ <ng-template kendoDropDownListItemTemplate let-dataItem>
633
+ {{ getOperator(dataItem.value) }}
634
+ </ng-template>
635
+ </kendo-dropdownlist>
636
+ `
637
+ }]
638
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { currentItem: [{
639
+ type: Input
640
+ }], editorType: [{
641
+ type: Input
642
+ }], valueChange: [{
643
+ type: Output
644
+ }], operators: [{
645
+ type: Input
646
+ }] } });
647
+
648
+ /**
649
+ * @hidden
650
+ */
651
+ class FilterTextEditorComponent {
652
+ constructor(localization) {
653
+ this.localization = localization;
654
+ this.valueChange = new EventEmitter();
655
+ }
656
+ messageFor(key) {
657
+ return this.localization.get(key);
658
+ }
659
+ onValueChange(value) {
660
+ this.currentItem.value = value;
661
+ this.valueChange.emit();
662
+ }
663
+ }
664
+ FilterTextEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterTextEditorComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
665
+ FilterTextEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FilterTextEditorComponent, selector: "kendo-filter-text-editor", inputs: { currentItem: "currentItem", isDisabled: "isDisabled" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: `
666
+ <kendo-textbox
667
+ [tabindex]="-1"
668
+ [kendoAriaLabelValue]="messageFor('filterValueAriaLabel')"
669
+ [value]="currentItem.value"
670
+ (valueChange)="onValueChange($event)"
671
+ [disabled]="isDisabled">
672
+ </kendo-textbox>
673
+ `, isInline: true, components: [{ type: i2$1.TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "errorIcon", "clearButtonIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }], directives: [{ type: AriaLabelValueDirective, selector: "[kendoAriaLabelValue]", inputs: ["kendoAriaLabelValue"] }] });
674
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterTextEditorComponent, decorators: [{
675
+ type: Component,
676
+ args: [{
677
+ selector: 'kendo-filter-text-editor',
678
+ template: `
679
+ <kendo-textbox
680
+ [tabindex]="-1"
681
+ [kendoAriaLabelValue]="messageFor('filterValueAriaLabel')"
682
+ [value]="currentItem.value"
683
+ (valueChange)="onValueChange($event)"
684
+ [disabled]="isDisabled">
685
+ </kendo-textbox>
686
+ `
687
+ }]
688
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { currentItem: [{
689
+ type: Input
690
+ }], isDisabled: [{
691
+ type: Input
692
+ }], valueChange: [{
693
+ type: Output
694
+ }] } });
695
+
696
+ /**
697
+ * @hidden
698
+ */
699
+ class FilterNumericEditorComponent {
700
+ constructor(localization) {
701
+ this.localization = localization;
702
+ this.valueChange = new EventEmitter();
703
+ }
704
+ messageFor(key) {
705
+ return this.localization.get(key);
706
+ }
707
+ onValueChange(value) {
708
+ this.currentItem.value = value;
709
+ this.valueChange.emit();
710
+ }
711
+ }
712
+ FilterNumericEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterNumericEditorComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
713
+ FilterNumericEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FilterNumericEditorComponent, selector: "kendo-filter-numeric-editor", inputs: { currentItem: "currentItem", isDisabled: "isDisabled", format: "format" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: `
714
+ <kendo-numerictextbox
715
+ [tabindex]="-1"
716
+ [kendoAriaLabelValue]="messageFor('filterValueAriaLabel')"
717
+ [value]="currentItem.value"
718
+ (valueChange)="onValueChange($event)"
719
+ [disabled]="isDisabled"
720
+ [format]="format">
721
+ <kendo-numerictextbox-messages
722
+ [increment]="messageFor('editorNumericIncrement')"
723
+ [decrement]="messageFor('editorNumericDecrement')">
724
+ </kendo-numerictextbox-messages>
725
+ </kendo-numerictextbox>
726
+ `, isInline: true, components: [{ type: i2$1.NumericTextBoxComponent, selector: "kendo-numerictextbox", inputs: ["focusableId", "disabled", "readonly", "title", "autoCorrect", "format", "max", "min", "decimals", "placeholder", "step", "spinners", "rangeValidation", "tabindex", "tabIndex", "changeValueOnScroll", "selectOnFocus", "value", "maxlength", "size", "rounded", "fillMode"], outputs: ["valueChange", "focus", "blur"], exportAs: ["kendoNumericTextBox"] }, { type: i2$1.NumericTextBoxCustomMessagesComponent, selector: "kendo-numerictextbox-messages" }], directives: [{ type: AriaLabelValueDirective, selector: "[kendoAriaLabelValue]", inputs: ["kendoAriaLabelValue"] }] });
727
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterNumericEditorComponent, decorators: [{
728
+ type: Component,
729
+ args: [{
730
+ selector: 'kendo-filter-numeric-editor',
731
+ template: `
732
+ <kendo-numerictextbox
733
+ [tabindex]="-1"
734
+ [kendoAriaLabelValue]="messageFor('filterValueAriaLabel')"
735
+ [value]="currentItem.value"
736
+ (valueChange)="onValueChange($event)"
737
+ [disabled]="isDisabled"
738
+ [format]="format">
739
+ <kendo-numerictextbox-messages
740
+ [increment]="messageFor('editorNumericIncrement')"
741
+ [decrement]="messageFor('editorNumericDecrement')">
742
+ </kendo-numerictextbox-messages>
743
+ </kendo-numerictextbox>
744
+ `
745
+ }]
746
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { currentItem: [{
747
+ type: Input
748
+ }], isDisabled: [{
749
+ type: Input
750
+ }], format: [{
751
+ type: Input
752
+ }], valueChange: [{
753
+ type: Output
754
+ }] } });
755
+
756
+ /**
757
+ * @hidden
758
+ */
759
+ class FilterBooleanEditorComponent {
760
+ constructor(localization, cdr) {
761
+ this.localization = localization;
762
+ this.cdr = cdr;
763
+ this.valueChange = new EventEmitter();
764
+ this.items = this.getValueItems();
765
+ this.defaultItem = this.getDefaultItem();
766
+ }
767
+ ngOnInit() {
768
+ this.localizationSubscription = this.localization.changes.subscribe(() => {
769
+ this.defaultItem = this.getDefaultItem();
770
+ this.items = this.getValueItems();
771
+ this.cdr.detectChanges();
772
+ });
773
+ }
774
+ getDefaultItem() {
775
+ return { text: this.localization.get("filterBooleanAll"), value: null };
776
+ }
777
+ getValueItems() {
778
+ return [
779
+ { text: this.localization.get("filterIsTrue"), value: true },
780
+ { text: this.localization.get("filterIsFalse"), value: false }
781
+ ];
782
+ }
783
+ ngOnDestroy() {
784
+ if (this.localizationSubscription) {
785
+ this.localizationSubscription.unsubscribe();
786
+ }
787
+ }
788
+ messageFor(key) {
789
+ return this.localization.get(key);
790
+ }
791
+ onValueChange(value) {
792
+ this.currentItem.value = value;
793
+ this.valueChange.emit();
794
+ }
795
+ }
796
+ FilterBooleanEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterBooleanEditorComponent, deps: [{ token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
797
+ FilterBooleanEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FilterBooleanEditorComponent, selector: "kendo-filter-boolean-editor", inputs: { currentItem: "currentItem" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: `
798
+ <kendo-dropdownlist
799
+ [tabindex]="-1"
800
+ [kendoAriaLabelValue]="messageFor('filterValueAriaLabel')"
801
+ [value]="currentItem.value"
802
+ (valueChange)="onValueChange($event)"
803
+ [data]="items"
804
+ [defaultItem]="defaultItem"
805
+ [valuePrimitive]="true"
806
+ textField="text"
807
+ valueField="value"
808
+ >
809
+ </kendo-dropdownlist>
810
+ `, isInline: true, components: [{ type: i2.DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["iconClass", "loading", "data", "value", "textField", "valueField", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }], directives: [{ type: AriaLabelValueDirective, selector: "[kendoAriaLabelValue]", inputs: ["kendoAriaLabelValue"] }] });
811
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterBooleanEditorComponent, decorators: [{
812
+ type: Component,
813
+ args: [{
814
+ selector: 'kendo-filter-boolean-editor',
815
+ template: `
816
+ <kendo-dropdownlist
817
+ [tabindex]="-1"
818
+ [kendoAriaLabelValue]="messageFor('filterValueAriaLabel')"
819
+ [value]="currentItem.value"
820
+ (valueChange)="onValueChange($event)"
821
+ [data]="items"
822
+ [defaultItem]="defaultItem"
823
+ [valuePrimitive]="true"
824
+ textField="text"
825
+ valueField="value"
826
+ >
827
+ </kendo-dropdownlist>
828
+ `
829
+ }]
830
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { currentItem: [{
831
+ type: Input
832
+ }], valueChange: [{
833
+ type: Output
834
+ }] } });
835
+
836
+ /**
837
+ * @hidden
838
+ */
839
+ class FilterDateEditorComponent {
840
+ constructor(localization) {
841
+ this.localization = localization;
842
+ this.valueChange = new EventEmitter();
843
+ }
844
+ messageFor(key) {
845
+ return this.localization.get(key);
846
+ }
847
+ onValueChange(value) {
848
+ this.currentItem.value = value;
849
+ this.valueChange.emit();
850
+ }
851
+ }
852
+ FilterDateEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterDateEditorComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
853
+ FilterDateEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FilterDateEditorComponent, selector: "kendo-filter-date-editor", inputs: { currentItem: "currentItem", isDisabled: "isDisabled", format: "format" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: `
854
+ <kendo-datepicker
855
+ [tabindex]="-1"
856
+ [kendoAriaLabelValue]="messageFor('filterValueAriaLabel')"
857
+ [value]="currentItem.value"
858
+ (valueChange)="onValueChange($event)"
859
+ [disabled]="isDisabled"
860
+ [format]="format">
861
+ <kendo-datepicker-messages
862
+ [toggle]="messageFor('editorDateToggleText')"
863
+ [today]="messageFor('editorDateTodayText')">
864
+ </kendo-datepicker-messages>
865
+ </kendo-datepicker>
866
+ `, isInline: true, components: [{ type: i2$2.DatePickerComponent, selector: "kendo-datepicker", inputs: ["focusableId", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "navigationItemTemplate", "activeView", "bottomView", "topView", "calendarType", "animateCalendarNavigation", "disabled", "readonly", "readOnlyInput", "popupSettings", "navigation", "min", "max", "incompleteDateValidation", "focusedDate", "value", "format", "twoDigitYearMax", "formatPlaceholder", "placeholder", "tabindex", "tabIndex", "disabledDates", "title", "rangeValidation", "disabledDatesValidation", "weekNumber", "size", "rounded", "fillMode"], outputs: ["valueChange", "focus", "blur", "open", "close"], exportAs: ["kendo-datepicker"] }, { type: i2$2.DatePickerCustomMessagesComponent, selector: "kendo-datepicker-messages" }], directives: [{ type: AriaLabelValueDirective, selector: "[kendoAriaLabelValue]", inputs: ["kendoAriaLabelValue"] }] });
867
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterDateEditorComponent, decorators: [{
868
+ type: Component,
869
+ args: [{
870
+ selector: 'kendo-filter-date-editor',
871
+ template: `
872
+ <kendo-datepicker
873
+ [tabindex]="-1"
874
+ [kendoAriaLabelValue]="messageFor('filterValueAriaLabel')"
875
+ [value]="currentItem.value"
876
+ (valueChange)="onValueChange($event)"
877
+ [disabled]="isDisabled"
878
+ [format]="format">
879
+ <kendo-datepicker-messages
880
+ [toggle]="messageFor('editorDateToggleText')"
881
+ [today]="messageFor('editorDateTodayText')">
882
+ </kendo-datepicker-messages>
883
+ </kendo-datepicker>
884
+ `
885
+ }]
886
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { currentItem: [{
887
+ type: Input
888
+ }], isDisabled: [{
889
+ type: Input
890
+ }], format: [{
891
+ type: Input
892
+ }], valueChange: [{
893
+ type: Output
894
+ }] } });
895
+
896
+ /**
897
+ * @hidden
898
+ */
899
+ class FilterExpressionComponent extends BaseFilterRowComponent {
900
+ constructor(filterService, cdr, element, navigationService, localization, renderer) {
901
+ super(element, navigationService, localization, renderer);
902
+ this.filterService = filterService;
903
+ this.cdr = cdr;
904
+ /**
905
+ * @hidden
906
+ */
907
+ this.xIcon = xIcon;
908
+ this.operators = [];
909
+ this.filters = [];
910
+ this.isBoolean = false;
911
+ this.isEditorDisabled = false;
912
+ }
913
+ get currentFilterExpression() {
914
+ return this.getFilterExpressionByField(this.currentItem.field);
915
+ }
916
+ get numericEditorFormat() {
917
+ const isSupportedFormat = typeof this.editorFormat !== 'string' && !this.isNumberFormat(this.editorFormat);
918
+ if (this.editorFormat && isSupportedFormat) {
919
+ console.warn(FilterErrorMessages.improperNumericEditorValue(this.currentFilterExpression.title));
920
+ }
921
+ return this.editorFormat;
922
+ }
923
+ get dateEditorFormat() {
924
+ const isSupportedFormat = typeof this.editorFormat !== 'string' && !this.isDateFormat(this.editorFormat);
925
+ if (this.editorFormat && isSupportedFormat) {
926
+ console.warn(FilterErrorMessages.improperDateEditorValue(this.currentFilterExpression.title));
927
+ }
928
+ return this.editorFormat;
929
+ }
930
+ isNumberFormat(obj) {
931
+ if (isDevMode() && obj &&
932
+ (obj['currency'] ||
933
+ obj['currencyDisplay'] ||
934
+ obj['maximumFractionDigits'] ||
935
+ obj['minimumIntegerDigits'] ||
936
+ obj['style'] ||
937
+ obj['useGrouping'])) {
938
+ return true;
939
+ }
940
+ else {
941
+ return false;
942
+ }
943
+ }
944
+ isDateFormat(obj) {
945
+ if (isDevMode() && obj && obj['displayFormat'] && obj['inputFormat']) {
946
+ return true;
947
+ }
948
+ else {
949
+ return false;
950
+ }
951
+ }
952
+ ngOnInit() {
953
+ this.isEditorDisabled = nullOperators.indexOf(this.currentItem.operator) >= 0;
954
+ this.filters = this.filterService.filters;
955
+ const foundFilter = this.getFilterExpressionByField(this.currentItem.field);
956
+ if (this.currentItem.field) {
957
+ this.setOperators(foundFilter);
958
+ }
959
+ if (foundFilter?.editorFormat) {
960
+ this.editorFormat = foundFilter.editorFormat;
961
+ }
962
+ const defaultFilter = this.getFilterExpressionByField(this.filterService.filters[0].field);
963
+ if (!this.currentItem.field) {
964
+ this.currentItem.field = this.filterService.filters[0].field;
965
+ this.setOperators(defaultFilter);
966
+ }
967
+ this.setEditorTemplate();
968
+ this.localizationSubscription = this.localization.changes.subscribe(() => {
969
+ this.setOperators(foundFilter || defaultFilter);
970
+ this.cdr.detectChanges();
971
+ });
972
+ }
973
+ ngOnDestroy() {
974
+ if (this.localizationSubscription) {
975
+ this.localizationSubscription.unsubscribe();
976
+ }
977
+ }
978
+ normalizeOperators(filterEditor, operators) {
979
+ const result = [];
980
+ for (let j = 0; j < operators.length; j++) {
981
+ if (isFilterEditor(filterEditor)) {
982
+ result.push({
983
+ value: operators[j],
984
+ text: this.localization.get(getKeyByValue(defaultOperators[filterEditor], operators[j]))
985
+ });
986
+ }
987
+ }
988
+ return result;
989
+ }
990
+ getFilterExpressionByField(name) {
991
+ const foundFilter = this.filterService.filters.find(filter => filter.field === name);
992
+ if (foundFilter) {
993
+ return foundFilter;
994
+ }
995
+ return null;
996
+ }
997
+ filterValueChange(value) {
998
+ this.navigationService.currentToolbarItemIndex = this.itemNumber;
999
+ this.navigationService.currentToolbarItemChildrenIndex = 0;
1000
+ this.currentItem.value = null;
1001
+ this.currentItem.field = value;
1002
+ this.setEditorTemplate();
1003
+ const foundFilter = this.getFilterExpressionByField(this.currentItem.field);
1004
+ this.setOperators(foundFilter);
1005
+ this.editorFormat = foundFilter.editorFormat;
1006
+ this.valueChange.emit();
1007
+ }
1008
+ getDefaultOperators(operatorsType) {
1009
+ switch (operatorsType) {
1010
+ case 'string':
1011
+ return localizeOperators(defaultStringOperators)(this.localization);
1012
+ case 'number':
1013
+ return localizeOperators(defaultNumericOperators)(this.localization);
1014
+ case 'date':
1015
+ return localizeOperators(defaultDateOperators)(this.localization);
1016
+ default:
1017
+ break;
1018
+ }
1019
+ }
1020
+ getEditorType() {
1021
+ const item = this.filterService.filters.find((filterExpression) => filterExpression.field === this.currentItem.field);
1022
+ return item.editor;
1023
+ }
1024
+ removeFilterExpression() {
1025
+ this.filterService.remove(this.currentItem, this.index);
1026
+ this.valueChange.emit(true);
1027
+ }
1028
+ setOperators(filter) {
1029
+ this.isBoolean = filter.editor === 'boolean';
1030
+ if (this.isBoolean) {
1031
+ return;
1032
+ }
1033
+ if (filter.operators) {
1034
+ const localizedOperators = this.normalizeOperators(filter.editor, filter.operators);
1035
+ this.operators = localizedOperators;
1036
+ }
1037
+ else {
1038
+ this.operators = this.getDefaultOperators(filter.editor);
1039
+ }
1040
+ if (!this.currentItem.operator) {
1041
+ this.currentItem.operator = this.operators[0].value;
1042
+ }
1043
+ const operatorDoesNotExist = !this.operators.find(operator => operator.value === this.currentItem.operator);
1044
+ if (this.currentItem.operator && operatorDoesNotExist) {
1045
+ this.currentItem.operator = this.operators[0].value;
1046
+ }
1047
+ }
1048
+ onOperatorChange(value) {
1049
+ this.navigationService.currentToolbarItemIndex = this.itemNumber;
1050
+ this.navigationService.currentToolbarItemChildrenIndex = 1;
1051
+ this.valueChange.emit();
1052
+ if (nullOperators.includes(value)) {
1053
+ this.currentItem.value = null;
1054
+ this.isEditorDisabled = true;
1055
+ }
1056
+ else {
1057
+ this.isEditorDisabled = false;
1058
+ }
1059
+ }
1060
+ setEditorTemplate() {
1061
+ const filterExpression = this.filterService.filters.find((filter) => filter.field === this.currentItem.field);
1062
+ this.editorTemplate = filterExpression.editorTemplate ? filterExpression.editorTemplate : null;
1063
+ }
1064
+ }
1065
+ FilterExpressionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterExpressionComponent, deps: [{ token: FilterService }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: NavigationService }, { token: i1.LocalizationService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
1066
+ FilterExpressionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FilterExpressionComponent, selector: "kendo-filter-expression", inputs: { currentItem: "currentItem" }, providers: [{
1067
+ provide: FilterItem,
1068
+ useExisting: forwardRef(() => FilterExpressionComponent)
1069
+ }], usesInheritance: true, ngImport: i0, template: `
1070
+ <div class="k-filter-toolbar">
1071
+ <div class="k-toolbar" role="toolbar" [attr.aria-label]="messageFor('filterToolbarAriaLabel')" (focus)="onFocus()" (focusout)="onBlur()" (mousedown)="onMouseDown($event)">
1072
+ <div class="k-filter-toolbar-item k-filter-field k-toolbar-item" >
1073
+ <kendo-dropdownlist
1074
+ [tabindex]="-1"
1075
+ [kendoAriaLabelValue]="messageFor('filterFieldAriaLabel')"
1076
+ [title]="messageFor('filterExpressionFilters')"
1077
+ [data]="filters"
1078
+ textField="title"
1079
+ valueField="field"
1080
+ [value]="currentItem.field"
1081
+ [valuePrimitive]="true"
1082
+ (valueChange)="filterValueChange($event)">
1083
+ </kendo-dropdownlist>
1084
+ </div>
1085
+ <div *ngIf="!isBoolean" class="k-filter-toolbar-item k-filter-operator k-toolbar-item" >
1086
+ <kendo-filter-expression-operators
1087
+ [currentItem]="currentItem"
1088
+ [operators]="operators"
1089
+ [editorType]="getEditorType()"
1090
+ (valueChange)="onOperatorChange($event);">
1091
+ </kendo-filter-expression-operators>
1092
+ </div>
1093
+
1094
+ <div class="k-filter-toolbar-item k-filter-value k-toolbar-item">
1095
+ <ng-container *ngIf="!editorTemplate" [ngSwitch]="getEditorType()">
1096
+ <kendo-filter-text-editor *ngSwitchCase="'string'" [currentItem]="currentItem" [isDisabled]="isEditorDisabled" (valueChange)="valueChange.emit()"></kendo-filter-text-editor>
1097
+ <kendo-filter-numeric-editor *ngSwitchCase="'number'" [currentItem]="currentItem" [isDisabled]="isEditorDisabled" [format]="numericEditorFormat" (valueChange)="valueChange.emit()"></kendo-filter-numeric-editor>
1098
+ <kendo-filter-boolean-editor *ngSwitchCase="'boolean'" [currentItem]="currentItem" (valueChange)="valueChange.emit()"></kendo-filter-boolean-editor>
1099
+ <kendo-filter-date-editor *ngSwitchCase="'date'" [currentItem]="currentItem" [isDisabled]="isEditorDisabled" [format]="dateEditorFormat" (valueChange)="valueChange.emit()"></kendo-filter-date-editor>
1100
+ </ng-container>
1101
+ <ng-container *ngIf="editorTemplate">
1102
+ <ng-template
1103
+ [templateContext]="{templateRef: editorTemplate, $implicit: currentItem}">
1104
+ </ng-template>
1105
+ </ng-container>
1106
+ </div>
1107
+
1108
+ <div class="k-filter-toolbar-item k-toolbar-item" >
1109
+ <button
1110
+ kendoButton
1111
+ tabindex="-1"
1112
+ icon="x"
1113
+ [svgIcon]="xIcon"
1114
+ fillMode="flat"
1115
+ [title]="messageFor('remove')"
1116
+ (click)="removeFilterExpression()">
1117
+ </button>
1118
+ </div>
1119
+ </div>
1120
+ </div>
1121
+ `, isInline: true, components: [{ type: i2.DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["iconClass", "loading", "data", "value", "textField", "valueField", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }, { type: FilterExpressionOperatorsComponent, selector: "kendo-filter-expression-operators", inputs: ["currentItem", "editorType", "operators"], outputs: ["valueChange"] }, { type: FilterTextEditorComponent, selector: "kendo-filter-text-editor", inputs: ["currentItem", "isDisabled"], outputs: ["valueChange"] }, { type: FilterNumericEditorComponent, selector: "kendo-filter-numeric-editor", inputs: ["currentItem", "isDisabled", "format"], outputs: ["valueChange"] }, { type: FilterBooleanEditorComponent, selector: "kendo-filter-boolean-editor", inputs: ["currentItem"], outputs: ["valueChange"] }, { type: FilterDateEditorComponent, selector: "kendo-filter-date-editor", inputs: ["currentItem", "isDisabled", "format"], outputs: ["valueChange"] }, { type: i10.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }], directives: [{ type: AriaLabelValueDirective, selector: "[kendoAriaLabelValue]", inputs: ["kendoAriaLabelValue"] }, { type: i12.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i12.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i12.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i10.TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }] });
1122
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterExpressionComponent, decorators: [{
1123
+ type: Component,
1124
+ args: [{
1125
+ providers: [{
1126
+ provide: FilterItem,
1127
+ useExisting: forwardRef(() => FilterExpressionComponent)
1128
+ }],
1129
+ selector: 'kendo-filter-expression',
1130
+ template: `
1131
+ <div class="k-filter-toolbar">
1132
+ <div class="k-toolbar" role="toolbar" [attr.aria-label]="messageFor('filterToolbarAriaLabel')" (focus)="onFocus()" (focusout)="onBlur()" (mousedown)="onMouseDown($event)">
1133
+ <div class="k-filter-toolbar-item k-filter-field k-toolbar-item" >
1134
+ <kendo-dropdownlist
1135
+ [tabindex]="-1"
1136
+ [kendoAriaLabelValue]="messageFor('filterFieldAriaLabel')"
1137
+ [title]="messageFor('filterExpressionFilters')"
1138
+ [data]="filters"
1139
+ textField="title"
1140
+ valueField="field"
1141
+ [value]="currentItem.field"
1142
+ [valuePrimitive]="true"
1143
+ (valueChange)="filterValueChange($event)">
1144
+ </kendo-dropdownlist>
1145
+ </div>
1146
+ <div *ngIf="!isBoolean" class="k-filter-toolbar-item k-filter-operator k-toolbar-item" >
1147
+ <kendo-filter-expression-operators
1148
+ [currentItem]="currentItem"
1149
+ [operators]="operators"
1150
+ [editorType]="getEditorType()"
1151
+ (valueChange)="onOperatorChange($event);">
1152
+ </kendo-filter-expression-operators>
1153
+ </div>
1154
+
1155
+ <div class="k-filter-toolbar-item k-filter-value k-toolbar-item">
1156
+ <ng-container *ngIf="!editorTemplate" [ngSwitch]="getEditorType()">
1157
+ <kendo-filter-text-editor *ngSwitchCase="'string'" [currentItem]="currentItem" [isDisabled]="isEditorDisabled" (valueChange)="valueChange.emit()"></kendo-filter-text-editor>
1158
+ <kendo-filter-numeric-editor *ngSwitchCase="'number'" [currentItem]="currentItem" [isDisabled]="isEditorDisabled" [format]="numericEditorFormat" (valueChange)="valueChange.emit()"></kendo-filter-numeric-editor>
1159
+ <kendo-filter-boolean-editor *ngSwitchCase="'boolean'" [currentItem]="currentItem" (valueChange)="valueChange.emit()"></kendo-filter-boolean-editor>
1160
+ <kendo-filter-date-editor *ngSwitchCase="'date'" [currentItem]="currentItem" [isDisabled]="isEditorDisabled" [format]="dateEditorFormat" (valueChange)="valueChange.emit()"></kendo-filter-date-editor>
1161
+ </ng-container>
1162
+ <ng-container *ngIf="editorTemplate">
1163
+ <ng-template
1164
+ [templateContext]="{templateRef: editorTemplate, $implicit: currentItem}">
1165
+ </ng-template>
1166
+ </ng-container>
1167
+ </div>
1168
+
1169
+ <div class="k-filter-toolbar-item k-toolbar-item" >
1170
+ <button
1171
+ kendoButton
1172
+ tabindex="-1"
1173
+ icon="x"
1174
+ [svgIcon]="xIcon"
1175
+ fillMode="flat"
1176
+ [title]="messageFor('remove')"
1177
+ (click)="removeFilterExpression()">
1178
+ </button>
1179
+ </div>
1180
+ </div>
1181
+ </div>
1182
+ `
1183
+ }]
1184
+ }], ctorParameters: function () { return [{ type: FilterService }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: NavigationService }, { type: i1.LocalizationService }, { type: i0.Renderer2 }]; }, propDecorators: { currentItem: [{
1185
+ type: Input
1186
+ }] } });
1187
+
1188
+ /**
1189
+ * @hidden
1190
+ */
1191
+ class FilterGroupComponent extends BaseFilterRowComponent {
1192
+ constructor(filterService, cdr, element, navigationService, localization, renderer) {
1193
+ super(element, navigationService, localization, renderer);
1194
+ this.filterService = filterService;
1195
+ this.cdr = cdr;
1196
+ /**
1197
+ * @hidden
1198
+ */
1199
+ this.xIcon = xIcon;
1200
+ /**
1201
+ * @hidden
1202
+ */
1203
+ this.filterAddGroupIcon = filterAddGroupIcon;
1204
+ /**
1205
+ * @hidden
1206
+ */
1207
+ this.filterAddExpressionIcon = filterAddExpressionIcon;
1208
+ this.currentItem = {
1209
+ logic: 'or',
1210
+ filters: []
1211
+ };
1212
+ this.operators = [];
1213
+ }
1214
+ get filterItems() {
1215
+ return this._filterItems.toArray();
1216
+ }
1217
+ ngOnInit() {
1218
+ this.operators = this.getLogicOperators();
1219
+ this.localizationSubscription = this.localization.changes.subscribe(() => {
1220
+ this.operators = this.getLogicOperators();
1221
+ this.cdr.detectChanges();
1222
+ });
1223
+ }
1224
+ ngOnDestroy() {
1225
+ if (this.localizationSubscription) {
1226
+ this.localizationSubscription.unsubscribe();
1227
+ }
1228
+ }
1229
+ getLogicOperators() {
1230
+ return localizeOperators(logicOperators)(this.localization);
1231
+ }
1232
+ getOperator(operatorValue) {
1233
+ return this.messageFor(getKeyByValue(logicOperators, operatorValue));
1234
+ }
1235
+ selectedChange(logicOperator) {
1236
+ if (this.currentItem.logic !== logicOperator) {
1237
+ this.currentItem.logic = logicOperator;
1238
+ this.valueChange.emit();
1239
+ }
1240
+ }
1241
+ addFilterExpression() {
1242
+ this.filterService.addFilterExpression(this.currentItem);
1243
+ this.valueChange.emit();
1244
+ }
1245
+ addFilterGroup() {
1246
+ this.filterService.addFilterGroup(this.currentItem);
1247
+ this.valueChange.emit();
1248
+ }
1249
+ removeFilterGroup() {
1250
+ this.filterService.remove(this.currentItem, this.index);
1251
+ this.cdr.detectChanges();
1252
+ this.valueChange.emit(true);
1253
+ }
1254
+ onMouseDown(event) {
1255
+ let elementToFocus;
1256
+ if (event.target.closest(selectors.kendoFilterToolbarItem)) {
1257
+ let index = Array.from(event.target.closest(selectors.kendoToolbar).children).indexOf(event.target.closest(selectors.kendoFilterToolbarItem)) + 1;
1258
+ if (event.target.closest(selectors.andButton)) {
1259
+ index = 0;
1260
+ }
1261
+ if (event.target.closest(selectors.orButton)) {
1262
+ index = 1;
1263
+ }
1264
+ this.navigationService.currentToolbarItemChildrenIndex = index;
1265
+ this.navigationService.isInnerNavigationActivated = true;
1266
+ elementToFocus = this.navigationService.flattenFilterItems[this.itemNumber].focusableChildren[index];
1267
+ }
1268
+ else {
1269
+ this.navigationService.currentToolbarItemChildrenIndex = 0;
1270
+ this.navigationService.isInnerNavigationActivated = false;
1271
+ elementToFocus = this.navigationService.flattenFilterItems[this.itemNumber].toolbarElement;
1272
+ }
1273
+ this.navigationService.isFilterExpressionComponentFocused = false;
1274
+ this.navigationService.currentToolbarItemIndex = this.itemNumber;
1275
+ this.navigationService.focusCurrentElement(elementToFocus, true);
1276
+ }
1277
+ }
1278
+ FilterGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterGroupComponent, deps: [{ token: FilterService }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: NavigationService }, { token: i1.LocalizationService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
1279
+ FilterGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FilterGroupComponent, selector: "kendo-filter-group", inputs: { currentItem: "currentItem" }, providers: [{
1280
+ provide: FilterItem,
1281
+ useExisting: forwardRef(() => FilterGroupComponent)
1282
+ }], viewQueries: [{ propertyName: "_filterItems", predicate: FilterItem, descendants: true }], usesInheritance: true, ngImport: i0, template: `
1283
+ <div class="k-filter-toolbar">
1284
+ <div class="k-toolbar" role="toolbar" [attr.aria-label]="messageFor('filterToolbarAriaLabel')" (focus)="onFocus()" (focusout)="onBlur()" (mousedown)="onMouseDown($event)">
1285
+ <div class="k-filter-toolbar-item">
1286
+ <div class="k-widget k-button-group" role="group">
1287
+ <button
1288
+ tabindex="-1"
1289
+ *ngFor="let operator of operators"
1290
+ kendoButton
1291
+ [ngClass]="{'k-group-start': operator.value === 'and', 'k-group-end': operator.value === 'or'}"
1292
+ [selected]="currentItem.logic === operator.value"
1293
+ [attr.aria-pressed]="currentItem.logic === operator.value"
1294
+ [title]="operator.text"
1295
+ (click)="selectedChange(operator.value)"
1296
+ >
1297
+ {{getOperator(operator.value)}}
1298
+ </button>
1299
+ </div>
1300
+ </div>
1301
+ <div class="k-filter-toolbar-item">
1302
+ <button
1303
+ kendoButton
1304
+ tabindex="-1"
1305
+ [title]="messageFor('addFilter')"
1306
+ icon="filter-add-expression"
1307
+ [svgIcon]="filterAddExpressionIcon"
1308
+ (click)="addFilterExpression()">
1309
+ {{messageFor('addFilter')}}
1310
+ </button>
1311
+ </div>
1312
+ <div class="k-filter-toolbar-item">
1313
+ <button
1314
+ kendoButton
1315
+ tabindex="-1"
1316
+ [title]="messageFor('addGroup')"
1317
+ icon="filter-add-group"
1318
+ [svgIcon]="filterAddGroupIcon"
1319
+ (click)="addFilterGroup()">
1320
+ {{messageFor('addGroup')}}
1321
+ </button>
1322
+ </div>
1323
+ <div class="k-filter-toolbar-item">
1324
+ <button
1325
+ kendoButton
1326
+ tabindex="-1"
1327
+ icon="x"
1328
+ [svgIcon]="xIcon"
1329
+ fillMode="flat"
1330
+ [title]="messageFor('remove')"
1331
+ (click)="removeFilterGroup()">
1332
+ </button>
1333
+ </div>
1334
+ </div>
1335
+ </div>
1336
+
1337
+ <ul class="k-filter-lines" role="group" *ngIf="currentItem.filters">
1338
+ <ng-container *ngFor="let item of currentItem.filters; let i = index;">
1339
+ <li class="k-filter-item" role="treeitem" *ngIf="!item['filters']">
1340
+ <kendo-filter-expression (valueChange)="valueChange.emit($event)" [currentItem]="item" [index]="i">
1341
+ </kendo-filter-expression>
1342
+ </li>
1343
+ <li class="k-filter-item" role="treeitem" *ngIf="item['filters']">
1344
+ <kendo-filter-group
1345
+ (valueChange)="valueChange.emit($event)"
1346
+ [currentItem]="item"
1347
+ [index]="i"
1348
+ >
1349
+ </kendo-filter-group>
1350
+ </li>
1351
+ </ng-container>
1352
+ </ul>
1353
+ `, isInline: true, components: [{ type: i10.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: FilterExpressionComponent, selector: "kendo-filter-expression", inputs: ["currentItem"] }, { type: FilterGroupComponent, selector: "kendo-filter-group", inputs: ["currentItem"] }], directives: [{ type: i12.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i12.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i12.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
1354
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterGroupComponent, decorators: [{
1355
+ type: Component,
1356
+ args: [{
1357
+ providers: [{
1358
+ provide: FilterItem,
1359
+ useExisting: forwardRef(() => FilterGroupComponent)
1360
+ }],
1361
+ selector: 'kendo-filter-group',
1362
+ template: `
1363
+ <div class="k-filter-toolbar">
1364
+ <div class="k-toolbar" role="toolbar" [attr.aria-label]="messageFor('filterToolbarAriaLabel')" (focus)="onFocus()" (focusout)="onBlur()" (mousedown)="onMouseDown($event)">
1365
+ <div class="k-filter-toolbar-item">
1366
+ <div class="k-widget k-button-group" role="group">
1367
+ <button
1368
+ tabindex="-1"
1369
+ *ngFor="let operator of operators"
1370
+ kendoButton
1371
+ [ngClass]="{'k-group-start': operator.value === 'and', 'k-group-end': operator.value === 'or'}"
1372
+ [selected]="currentItem.logic === operator.value"
1373
+ [attr.aria-pressed]="currentItem.logic === operator.value"
1374
+ [title]="operator.text"
1375
+ (click)="selectedChange(operator.value)"
1376
+ >
1377
+ {{getOperator(operator.value)}}
1378
+ </button>
1379
+ </div>
1380
+ </div>
1381
+ <div class="k-filter-toolbar-item">
1382
+ <button
1383
+ kendoButton
1384
+ tabindex="-1"
1385
+ [title]="messageFor('addFilter')"
1386
+ icon="filter-add-expression"
1387
+ [svgIcon]="filterAddExpressionIcon"
1388
+ (click)="addFilterExpression()">
1389
+ {{messageFor('addFilter')}}
1390
+ </button>
1391
+ </div>
1392
+ <div class="k-filter-toolbar-item">
1393
+ <button
1394
+ kendoButton
1395
+ tabindex="-1"
1396
+ [title]="messageFor('addGroup')"
1397
+ icon="filter-add-group"
1398
+ [svgIcon]="filterAddGroupIcon"
1399
+ (click)="addFilterGroup()">
1400
+ {{messageFor('addGroup')}}
1401
+ </button>
1402
+ </div>
1403
+ <div class="k-filter-toolbar-item">
1404
+ <button
1405
+ kendoButton
1406
+ tabindex="-1"
1407
+ icon="x"
1408
+ [svgIcon]="xIcon"
1409
+ fillMode="flat"
1410
+ [title]="messageFor('remove')"
1411
+ (click)="removeFilterGroup()">
1412
+ </button>
1413
+ </div>
1414
+ </div>
1415
+ </div>
1416
+
1417
+ <ul class="k-filter-lines" role="group" *ngIf="currentItem.filters">
1418
+ <ng-container *ngFor="let item of currentItem.filters; let i = index;">
1419
+ <li class="k-filter-item" role="treeitem" *ngIf="!item['filters']">
1420
+ <kendo-filter-expression (valueChange)="valueChange.emit($event)" [currentItem]="item" [index]="i">
1421
+ </kendo-filter-expression>
1422
+ </li>
1423
+ <li class="k-filter-item" role="treeitem" *ngIf="item['filters']">
1424
+ <kendo-filter-group
1425
+ (valueChange)="valueChange.emit($event)"
1426
+ [currentItem]="item"
1427
+ [index]="i"
1428
+ >
1429
+ </kendo-filter-group>
1430
+ </li>
1431
+ </ng-container>
1432
+ </ul>
1433
+ `
1434
+ }]
1435
+ }], ctorParameters: function () { return [{ type: FilterService }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: NavigationService }, { type: i1.LocalizationService }, { type: i0.Renderer2 }]; }, propDecorators: { _filterItems: [{
1436
+ type: ViewChildren,
1437
+ args: [FilterItem]
1438
+ }], currentItem: [{
1439
+ type: Input
1440
+ }] } });
1441
+
1442
+ /**
1443
+ * @hidden
1444
+ */
1445
+ class Messages extends ComponentMessages {
1446
+ }
1447
+ Messages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1448
+ Messages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: Messages, selector: "[kendoFilterMessages]", inputs: { filterExpressionOperators: "filterExpressionOperators", filterExpressionFilters: "filterExpressionFilters", remove: "remove", addGroup: "addGroup", addFilter: "addFilter", filterAndLogic: "filterAndLogic", filterOrLogic: "filterOrLogic", filterEqOperator: "filterEqOperator", filterNotEqOperator: "filterNotEqOperator", filterIsNullOperator: "filterIsNullOperator", filterIsNotNullOperator: "filterIsNotNullOperator", filterIsEmptyOperator: "filterIsEmptyOperator", filterIsNotEmptyOperator: "filterIsNotEmptyOperator", filterStartsWithOperator: "filterStartsWithOperator", filterContainsOperator: "filterContainsOperator", filterNotContainsOperator: "filterNotContainsOperator", filterEndsWithOperator: "filterEndsWithOperator", filterGteOperator: "filterGteOperator", filterGtOperator: "filterGtOperator", filterLteOperator: "filterLteOperator", filterLtOperator: "filterLtOperator", filterIsTrue: "filterIsTrue", filterIsFalse: "filterIsFalse", filterBooleanAll: "filterBooleanAll", filterAfterOrEqualOperator: "filterAfterOrEqualOperator", filterAfterOperator: "filterAfterOperator", filterBeforeOperator: "filterBeforeOperator", filterBeforeOrEqualOperator: "filterBeforeOrEqualOperator", editorNumericDecrement: "editorNumericDecrement", editorNumericIncrement: "editorNumericIncrement", editorDateTodayText: "editorDateTodayText", editorDateToggleText: "editorDateToggleText", filterFieldAriaLabel: "filterFieldAriaLabel", filterOperatorAriaLabel: "filterOperatorAriaLabel", filterValueAriaLabel: "filterValueAriaLabel", filterToolbarAriaLabel: "filterToolbarAriaLabel", filterComponentAriaLabel: "filterComponentAriaLabel" }, usesInheritance: true, ngImport: i0 });
1449
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: Messages, decorators: [{
1450
+ type: Directive,
1451
+ args: [{
1452
+ selector: '[kendoFilterMessages]'
1453
+ }]
1454
+ }], propDecorators: { filterExpressionOperators: [{
1455
+ type: Input
1456
+ }], filterExpressionFilters: [{
1457
+ type: Input
1458
+ }], remove: [{
1459
+ type: Input
1460
+ }], addGroup: [{
1461
+ type: Input
1462
+ }], addFilter: [{
1463
+ type: Input
1464
+ }], filterAndLogic: [{
1465
+ type: Input
1466
+ }], filterOrLogic: [{
1467
+ type: Input
1468
+ }], filterEqOperator: [{
1469
+ type: Input
1470
+ }], filterNotEqOperator: [{
1471
+ type: Input
1472
+ }], filterIsNullOperator: [{
1473
+ type: Input
1474
+ }], filterIsNotNullOperator: [{
1475
+ type: Input
1476
+ }], filterIsEmptyOperator: [{
1477
+ type: Input
1478
+ }], filterIsNotEmptyOperator: [{
1479
+ type: Input
1480
+ }], filterStartsWithOperator: [{
1481
+ type: Input
1482
+ }], filterContainsOperator: [{
1483
+ type: Input
1484
+ }], filterNotContainsOperator: [{
1485
+ type: Input
1486
+ }], filterEndsWithOperator: [{
1487
+ type: Input
1488
+ }], filterGteOperator: [{
1489
+ type: Input
1490
+ }], filterGtOperator: [{
1491
+ type: Input
1492
+ }], filterLteOperator: [{
1493
+ type: Input
1494
+ }], filterLtOperator: [{
1495
+ type: Input
1496
+ }], filterIsTrue: [{
1497
+ type: Input
1498
+ }], filterIsFalse: [{
1499
+ type: Input
1500
+ }], filterBooleanAll: [{
1501
+ type: Input
1502
+ }], filterAfterOrEqualOperator: [{
1503
+ type: Input
1504
+ }], filterAfterOperator: [{
1505
+ type: Input
1506
+ }], filterBeforeOperator: [{
1507
+ type: Input
1508
+ }], filterBeforeOrEqualOperator: [{
1509
+ type: Input
1510
+ }], editorNumericDecrement: [{
1511
+ type: Input
1512
+ }], editorNumericIncrement: [{
1513
+ type: Input
1514
+ }], editorDateTodayText: [{
1515
+ type: Input
1516
+ }], editorDateToggleText: [{
1517
+ type: Input
1518
+ }], filterFieldAriaLabel: [{
1519
+ type: Input
1520
+ }], filterOperatorAriaLabel: [{
1521
+ type: Input
1522
+ }], filterValueAriaLabel: [{
1523
+ type: Input
1524
+ }], filterToolbarAriaLabel: [{
1525
+ type: Input
1526
+ }], filterComponentAriaLabel: [{
1527
+ type: Input
1528
+ }] } });
1529
+
1530
+ /**
1531
+ * @hidden
1532
+ */
1533
+ class LocalizedMessagesDirective extends Messages {
1534
+ constructor(service) {
1535
+ super();
1536
+ this.service = service;
1537
+ }
1538
+ }
1539
+ LocalizedMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
1540
+ LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: LocalizedMessagesDirective, selector: "[kendoFilterLocalizedMessages]", providers: [
1541
+ {
1542
+ provide: Messages,
1543
+ useExisting: forwardRef(() => LocalizedMessagesDirective)
1544
+ }
1545
+ ], usesInheritance: true, ngImport: i0 });
1546
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
1547
+ type: Directive,
1548
+ args: [{
1549
+ providers: [
1550
+ {
1551
+ provide: Messages,
1552
+ useExisting: forwardRef(() => LocalizedMessagesDirective)
1553
+ }
1554
+ ],
1555
+ selector: '[kendoFilterLocalizedMessages]'
1556
+ }]
1557
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
1558
+
1559
+ /**
1560
+ * Represents the [Kendo UI Filter component for Angular]({% slug overview_filter %}).
1561
+ * The Filter component can be used to apply any user defined filter criteria.
1562
+ * @example
1563
+ * ```ts
1564
+ * @Component({
1565
+ * selector: 'my-app',
1566
+ * template: `
1567
+ * <kendo-filter [filters]="filters" (valueChange)="onValueChange($event)"></kendo-filter>
1568
+ * `
1569
+ * })
1570
+ * export class AppComponent {
1571
+ *
1572
+ * public filters: FilterExpression[] = [
1573
+ * {
1574
+ * name: 'country',
1575
+ * label: 'Country',
1576
+ * filter: 'string',
1577
+ * operators: ['eq', 'neq'],
1578
+ * },
1579
+ * {
1580
+ * name: 'budget',
1581
+ * filter: 'number'
1582
+ * }
1583
+ * ];
1584
+ *
1585
+ * onValueChange(e: CompositeFilterDescriptor){
1586
+ * console.log(e)
1587
+ * }
1588
+ * }
1589
+ * ```
1590
+ */
1591
+ class FilterComponent {
1592
+ constructor(filterService, localization, cdr, element, navigationService, renderer) {
1593
+ this.filterService = filterService;
1594
+ this.localization = localization;
1595
+ this.cdr = cdr;
1596
+ this.element = element;
1597
+ this.navigationService = navigationService;
1598
+ this.renderer = renderer;
1599
+ /**
1600
+ * Fires every time the Filter component value is updated.
1601
+ * That is each time a Filter Group or Filter Expression is added, removed, or updated.
1602
+ */
1603
+ this.valueChange = new EventEmitter();
1604
+ this._value = { filters: [], logic: 'and' };
1605
+ validatePackage(packageMetadata);
1606
+ this.direction = localization.rtl ? 'rtl' : 'ltr';
1607
+ }
1608
+ /**
1609
+ * @hidden
1610
+ */
1611
+ focusout() {
1612
+ setTimeout(() => {
1613
+ if (!(document.activeElement.closest('.k-filter'))) {
1614
+ this.renderer.setAttribute(this.navigationService.currentlyFocusedElement, 'tabindex', '-1');
1615
+ this.navigationService.currentlyFocusedElement = this.navigationService.flattenFilterItems[this.navigationService.currentToolbarItemIndex].toolbarElement;
1616
+ this.renderer.setAttribute(this.navigationService.currentlyFocusedElement, 'tabindex', '0');
1617
+ this.navigationService.isInnerNavigationActivated = false;
1618
+ this.navigationService.isFilterExpressionComponentFocused = false;
1619
+ }
1620
+ });
1621
+ }
1622
+ /**
1623
+ * @hidden
1624
+ */
1625
+ onKeydown(event) {
1626
+ const keyCode = event.keyCode;
1627
+ const keys = [Keys.ArrowUp, Keys.ArrowDown, Keys.ArrowLeft, Keys.ArrowRight, Keys.Enter,
1628
+ Keys.Escape, Keys.Tab];
1629
+ if (keys.indexOf(keyCode) > -1) {
1630
+ this.navigationService.processKeyDown(keyCode, event);
1631
+ }
1632
+ }
1633
+ /**
1634
+ * Specifies the available user-defined filters. At least one filter should be provided.
1635
+ */
1636
+ set filters(_filters) {
1637
+ if (_filters.length > 0) {
1638
+ this.filterService.filters = _filters.map(filterExpression => {
1639
+ const clonedFilter = Object.assign({}, filterExpression);
1640
+ if (!clonedFilter.title) {
1641
+ clonedFilter.title = clonedFilter.field;
1642
+ }
1643
+ return clonedFilter;
1644
+ });
1645
+ this.setValue(this.value);
1646
+ }
1647
+ }
1648
+ get filters() {
1649
+ return this.filterService.filters;
1650
+ }
1651
+ /**
1652
+ * Sets the initial `value` of the Filter component.
1653
+ */
1654
+ set value(value) {
1655
+ const clonedValue = JSON.parse(JSON.stringify(value));
1656
+ this._value = clonedValue;
1657
+ if (this.filters.length > 0) {
1658
+ this.setValue(this.value);
1659
+ }
1660
+ }
1661
+ get value() {
1662
+ return this._value;
1663
+ }
1664
+ get filterItems() {
1665
+ return this._filterItems.toArray();
1666
+ }
1667
+ get toolbarElement() {
1668
+ return this.element.nativeElement.querySelector('.k-toolbar');
1669
+ }
1670
+ ngOnInit() {
1671
+ this.localizationSubscription = this.localization.changes.subscribe(({ rtl }) => {
1672
+ this.direction = rtl ? 'rtl' : 'ltr';
1673
+ this.cdr.detectChanges();
1674
+ });
1675
+ }
1676
+ ngAfterViewInit() {
1677
+ if (this.filterFields && this.filterFields.length > 0) {
1678
+ this.filters = this.filterFields.map((filterField) => ({
1679
+ ...filterField,
1680
+ title: filterField.title,
1681
+ editorTemplate: filterField.editorTemplate?.templateRef
1682
+ }));
1683
+ }
1684
+ if (this.filters.length === 0) {
1685
+ throw new Error(FilterErrorMessages.missingFilters);
1686
+ }
1687
+ this.navigationService.reset(this.filterItems);
1688
+ if (!this.navigationService.currentlyFocusedElement) {
1689
+ const firstElement = this.navigationService.flattenFilterItems[0].toolbarElement;
1690
+ this.navigationService.currentlyFocusedElement = firstElement;
1691
+ this.renderer.setAttribute(firstElement, 'tabindex', '0');
1692
+ }
1693
+ }
1694
+ ngOnDestroy() {
1695
+ if (this.localizationSubscription) {
1696
+ this.localizationSubscription.unsubscribe();
1697
+ }
1698
+ }
1699
+ /**
1700
+ * @hidden
1701
+ */
1702
+ getCurrentFilter() {
1703
+ return this.filterService.normalizedValue;
1704
+ }
1705
+ /**
1706
+ * @hidden
1707
+ */
1708
+ onValueChange(isRemoveOperation) {
1709
+ this.valueChange.emit(this.filterService.normalizedValue);
1710
+ this.cdr.detectChanges();
1711
+ this.navigationService.reset(this.filterItems);
1712
+ if (isRemoveOperation) {
1713
+ if (this.navigationService.currentToolbarItemIndex === this.navigationService.flattenFilterItems.length) {
1714
+ this.navigationService.currentToolbarItemIndex -= 1;
1715
+ }
1716
+ this.navigationService.isInnerNavigationActivated = false;
1717
+ this.navigationService.isFilterExpressionComponentFocused = false;
1718
+ this.navigationService.currentlyFocusedElement = this.navigationService.flattenFilterItems[this.navigationService.currentToolbarItemIndex].toolbarElement;
1719
+ this.renderer.setAttribute(this.navigationService.currentlyFocusedElement, 'tabindex', '0');
1720
+ this.renderer.addClass(this.navigationService.currentlyFocusedElement, 'k-focus');
1721
+ this.navigationService.currentlyFocusedElement.focus();
1722
+ }
1723
+ }
1724
+ normalizeFilter(filterDescriptor) {
1725
+ const foundFilter = this.filterService.filters.find((filter) => filter.field === filterDescriptor.field);
1726
+ if (isDevMode() && !foundFilter) {
1727
+ throw new Error(FilterErrorMessages.missingFilterForUsedField(filterDescriptor.field));
1728
+ }
1729
+ if (isDevMode() && foundFilter.editor === 'boolean' && (!filterDescriptor.value && filterDescriptor.value !== false)) {
1730
+ console.warn(FilterErrorMessages.missingValueForBooleanField(filterDescriptor.field));
1731
+ }
1732
+ if (isDevMode() && foundFilter.editor === 'boolean' && filterDescriptor.operator !== 'eq') {
1733
+ console.warn(FilterErrorMessages.operatorBooleanField(filterDescriptor.field));
1734
+ }
1735
+ if (filterDescriptor.operator && foundFilter.operators && !foundFilter.operators.some(operator => operator === filterDescriptor.operator)) {
1736
+ throw new Error(FilterErrorMessages.filterMissingUsedOperator(filterDescriptor.field, filterDescriptor.operator));
1737
+ }
1738
+ if (foundFilter.editor === 'boolean') {
1739
+ filterDescriptor.operator = 'eq';
1740
+ }
1741
+ if (foundFilter.editor === 'date' && filterDescriptor.value) {
1742
+ filterDescriptor.value = new Date(filterDescriptor.value);
1743
+ }
1744
+ if (!isPresent(filterDescriptor.value)) {
1745
+ filterDescriptor.value = null;
1746
+ }
1747
+ if (nullOperators.indexOf(filterDescriptor.operator) >= 0) {
1748
+ filterDescriptor.value = null;
1749
+ }
1750
+ }
1751
+ setValue(items) {
1752
+ this.normalizeValue(items);
1753
+ this.filterService.normalizedValue = items;
1754
+ this.cdr.detectChanges();
1755
+ }
1756
+ normalizeValue(items) {
1757
+ if (!this.filterService.filters.length) {
1758
+ return;
1759
+ }
1760
+ items.filters.forEach((item) => {
1761
+ if (item.filters) {
1762
+ this.normalizeValue(item);
1763
+ }
1764
+ else {
1765
+ this.normalizeFilter(item);
1766
+ }
1767
+ });
1768
+ }
1769
+ /**
1770
+ * @hidden
1771
+ */
1772
+ messageFor(key) {
1773
+ return this.localization.get(key);
1774
+ }
1775
+ }
1776
+ FilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterComponent, deps: [{ token: FilterService }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: NavigationService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
1777
+ FilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FilterComponent, selector: "kendo-filter", inputs: { filters: "filters", value: "value" }, outputs: { valueChange: "valueChange" }, host: { listeners: { "focusout": "focusout($event)", "keydown": "onKeydown($event)" }, properties: { "attr.dir": "this.direction" } }, providers: [
1778
+ LocalizationService,
1779
+ {
1780
+ provide: L10N_PREFIX,
1781
+ useValue: 'kendo.filter'
1782
+ },
1783
+ FilterService,
1784
+ NavigationService
1785
+ ], queries: [{ propertyName: "filterFields", predicate: FilterFieldComponent }], viewQueries: [{ propertyName: "_filterItems", predicate: FilterItem, descendants: true }], ngImport: i0, template: `
1786
+ <ng-container kendoFilterLocalizedMessages
1787
+ i18n-editorDateTodayText="kendo.filter.editorDateTodayText|The text of the Today button of the Date editor"
1788
+ editorDateTodayText="Today"
1789
+
1790
+ i18n-editorDateToggleText="kendo.filter.editorDateToggleText|The title of the Toggle button of the Date editor."
1791
+ editorDateToggleText="Toggle calendar"
1792
+
1793
+ i18n-editorNumericDecrement="kendo.filter.editorNumericDecrement|The title of the Decrement button of the Numeric editor"
1794
+ editorNumericDecrement="Decrement"
1795
+
1796
+ i18n-editorNumericIncrement="kendo.filter.editorNumericIncrement|The title of the Increment button of the Numeric editor"
1797
+ editorNumericIncrement="Increment"
1798
+
1799
+ i18n-filterExpressionOperators="kendo.filter.filterExpressionOperators|The text of the Filter Expression Operators drop down"
1800
+ filterExpressionOperators="Operators"
1801
+
1802
+ i18n-filterExpressionFilters="kendo.filter.filterExpressionFilters|The text of the Filter Expression filters drop down"
1803
+ filterExpressionFilters="Fields"
1804
+
1805
+ i18n-remove="kendo.filter.remove|The text of the Remove button"
1806
+ remove="Remove"
1807
+
1808
+ i18n-addFilter="kendo.filter.addFilter|The text of the Add Filter button"
1809
+ addFilter="Add Filter"
1810
+
1811
+ i18n-addGroup="kendo.filter.addGroup|The text of the Add Group button"
1812
+ addGroup="Add Group"
1813
+
1814
+ i18n-filterAndLogic="kendo.filter.filterAndLogic|The text of the And filter logic"
1815
+ filterAndLogic="And"
1816
+
1817
+ i18n-filterOrLogic="kendo.filter.filterOrLogic|The text of the Or filter logic"
1818
+ filterOrLogic="Or"
1819
+
1820
+ i18n-filterEqOperator="kendo.filter.filterEqOperator|The text of the equal filter operator"
1821
+ filterEqOperator="Is equal to"
1822
+
1823
+ i18n-filterNotEqOperator="kendo.filter.filterNotEqOperator|The text of the not equal filter operator"
1824
+ filterNotEqOperator="Is not equal to"
1825
+
1826
+ i18n-filterIsNullOperator="kendo.filter.filterIsNullOperator|The text of the is null filter operator"
1827
+ filterIsNullOperator="Is null"
1828
+
1829
+ i18n-filterIsNotNullOperator="kendo.filter.filterIsNotNullOperator|The text of the is not null filter operator"
1830
+ filterIsNotNullOperator="Is not null"
1831
+
1832
+ i18n-filterIsEmptyOperator="kendo.filter.filterIsEmptyOperator|The text of the is empty filter operator"
1833
+ filterIsEmptyOperator="Is empty"
1834
+
1835
+ i18n-filterIsNotEmptyOperator="kendo.filter.filterIsNotEmptyOperator|The text of the is not empty filter operator"
1836
+ filterIsNotEmptyOperator="Is not empty"
1837
+
1838
+ i18n-filterStartsWithOperator="kendo.filter.filterStartsWithOperator|The text of the starts with filter operator"
1839
+ filterStartsWithOperator="Starts with"
1840
+
1841
+ i18n-filterContainsOperator="kendo.filter.filterContainsOperator|The text of the contains filter operator"
1842
+ filterContainsOperator="Contains"
1843
+
1844
+ i18n-filterNotContainsOperator="kendo.filter.filterNotContainsOperator|The text of the does not contain filter operator"
1845
+ filterNotContainsOperator="Does not contain"
1846
+
1847
+ i18n-filterEndsWithOperator="kendo.filter.filterEndsWithOperator|The text of the ends with filter operator"
1848
+ filterEndsWithOperator="Ends with"
1849
+
1850
+ i18n-filterGteOperator="kendo.filter.filterGteOperator|The text of the greater than or equal filter operator"
1851
+ filterGteOperator="Is greater than or equal to"
1852
+
1853
+ i18n-filterGtOperator="kendo.filter.filterGtOperator|The text of the greater than filter operator"
1854
+ filterGtOperator="Is greater than"
1855
+
1856
+ i18n-filterLteOperator="kendo.filter.filterLteOperator|The text of the less than or equal filter operator"
1857
+ filterLteOperator="Is less than or equal to"
1858
+
1859
+ i18n-filterLtOperator="kendo.filter.filterLtOperator|The text of the less than filter operator"
1860
+ filterLtOperator="Is less than"
1861
+
1862
+ i18n-filterIsTrue="kendo.filter.filterIsTrue|The text of the IsTrue boolean filter option"
1863
+ filterIsTrue="Is True"
1864
+
1865
+ i18n-filterIsFalse="kendo.filter.filterIsFalse|The text of the IsFalse boolean filter option"
1866
+ filterIsFalse="Is False"
1867
+
1868
+ i18n-filterBooleanAll="kendo.filter.filterBooleanAll|The text of the (All) boolean filter option"
1869
+ filterBooleanAll="(All)"
1870
+
1871
+ i18n-filterAfterOrEqualOperator="kendo.filter.filterAfterOrEqualOperator|The text of the after or equal date filter operator"
1872
+ filterAfterOrEqualOperator="Is after or equal to"
1873
+
1874
+ i18n-filterAfterOperator="kendo.filter.filterAfterOperator|The text of the after date filter operator"
1875
+ filterAfterOperator="Is after"
1876
+
1877
+ i18n-filterBeforeOperator="kendo.filter.filterBeforeOperator|The text of the before date filter operator"
1878
+ filterBeforeOperator="Is before"
1879
+
1880
+ i18n-filterBeforeOrEqualOperator="kendo.filter.filterBeforeOrEqualOperator|The text of the before or equal date filter operator"
1881
+ filterBeforeOrEqualOperator="Is before or equal to"
1882
+
1883
+ i18n-filterFieldAriaLabel="kendo.filter.filterFieldAriaLabel|The text of the filter field aria label"
1884
+ filterFieldAriaLabel="field"
1885
+
1886
+ i18n-filterOperatorAriaLabel="kendo.filter.filterOperatorAriaLabel|The text of the filter operator aria label"
1887
+ filterOperatorAriaLabel="operator"
1888
+
1889
+ i18n-filterValueAriaLabel="kendo.filter.filterValueAriaLabel|The text of the filter value aria label"
1890
+ filterValueAriaLabel="value"
1891
+
1892
+ i18n-filterToolbarAriaLabel="kendo.filter.filterToolbarAriaLabel|The text of the filter row aria label"
1893
+ filterToolbarAriaLabel="filter row settings"
1894
+
1895
+ i18n-filterComponentAriaLabel="kendo.filter.filterComponentAriaLabel|The text of the filter component aria label"
1896
+ filterComponentAriaLabel="filter component"
1897
+ >
1898
+ </ng-container>
1899
+ <div class="k-widget k-filter" [attr.dir]="direction">
1900
+ <ul class='k-filter-container' role="tree" [attr.aria-label]="messageFor('filterComponentAriaLabel')">
1901
+ <li class='k-filter-group-main' role="treeitem">
1902
+ <kendo-filter-group
1903
+ [currentItem]="getCurrentFilter()"
1904
+ (valueChange)="onValueChange($event)"
1905
+ >
1906
+ </kendo-filter-group>
1907
+ </li>
1908
+ </ul>
1909
+ </div>
1910
+ `, isInline: true, components: [{ type: FilterGroupComponent, selector: "kendo-filter-group", inputs: ["currentItem"] }], directives: [{ type: LocalizedMessagesDirective, selector: "[kendoFilterLocalizedMessages]" }] });
1911
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterComponent, decorators: [{
1912
+ type: Component,
1913
+ args: [{
1914
+ providers: [
1915
+ LocalizationService,
1916
+ {
1917
+ provide: L10N_PREFIX,
1918
+ useValue: 'kendo.filter'
1919
+ },
1920
+ FilterService,
1921
+ NavigationService
1922
+ ],
1923
+ selector: 'kendo-filter',
1924
+ template: `
1925
+ <ng-container kendoFilterLocalizedMessages
1926
+ i18n-editorDateTodayText="kendo.filter.editorDateTodayText|The text of the Today button of the Date editor"
1927
+ editorDateTodayText="Today"
1928
+
1929
+ i18n-editorDateToggleText="kendo.filter.editorDateToggleText|The title of the Toggle button of the Date editor."
1930
+ editorDateToggleText="Toggle calendar"
1931
+
1932
+ i18n-editorNumericDecrement="kendo.filter.editorNumericDecrement|The title of the Decrement button of the Numeric editor"
1933
+ editorNumericDecrement="Decrement"
1934
+
1935
+ i18n-editorNumericIncrement="kendo.filter.editorNumericIncrement|The title of the Increment button of the Numeric editor"
1936
+ editorNumericIncrement="Increment"
1937
+
1938
+ i18n-filterExpressionOperators="kendo.filter.filterExpressionOperators|The text of the Filter Expression Operators drop down"
1939
+ filterExpressionOperators="Operators"
1940
+
1941
+ i18n-filterExpressionFilters="kendo.filter.filterExpressionFilters|The text of the Filter Expression filters drop down"
1942
+ filterExpressionFilters="Fields"
1943
+
1944
+ i18n-remove="kendo.filter.remove|The text of the Remove button"
1945
+ remove="Remove"
1946
+
1947
+ i18n-addFilter="kendo.filter.addFilter|The text of the Add Filter button"
1948
+ addFilter="Add Filter"
1949
+
1950
+ i18n-addGroup="kendo.filter.addGroup|The text of the Add Group button"
1951
+ addGroup="Add Group"
1952
+
1953
+ i18n-filterAndLogic="kendo.filter.filterAndLogic|The text of the And filter logic"
1954
+ filterAndLogic="And"
1955
+
1956
+ i18n-filterOrLogic="kendo.filter.filterOrLogic|The text of the Or filter logic"
1957
+ filterOrLogic="Or"
1958
+
1959
+ i18n-filterEqOperator="kendo.filter.filterEqOperator|The text of the equal filter operator"
1960
+ filterEqOperator="Is equal to"
1961
+
1962
+ i18n-filterNotEqOperator="kendo.filter.filterNotEqOperator|The text of the not equal filter operator"
1963
+ filterNotEqOperator="Is not equal to"
1964
+
1965
+ i18n-filterIsNullOperator="kendo.filter.filterIsNullOperator|The text of the is null filter operator"
1966
+ filterIsNullOperator="Is null"
1967
+
1968
+ i18n-filterIsNotNullOperator="kendo.filter.filterIsNotNullOperator|The text of the is not null filter operator"
1969
+ filterIsNotNullOperator="Is not null"
1970
+
1971
+ i18n-filterIsEmptyOperator="kendo.filter.filterIsEmptyOperator|The text of the is empty filter operator"
1972
+ filterIsEmptyOperator="Is empty"
1973
+
1974
+ i18n-filterIsNotEmptyOperator="kendo.filter.filterIsNotEmptyOperator|The text of the is not empty filter operator"
1975
+ filterIsNotEmptyOperator="Is not empty"
1976
+
1977
+ i18n-filterStartsWithOperator="kendo.filter.filterStartsWithOperator|The text of the starts with filter operator"
1978
+ filterStartsWithOperator="Starts with"
1979
+
1980
+ i18n-filterContainsOperator="kendo.filter.filterContainsOperator|The text of the contains filter operator"
1981
+ filterContainsOperator="Contains"
1982
+
1983
+ i18n-filterNotContainsOperator="kendo.filter.filterNotContainsOperator|The text of the does not contain filter operator"
1984
+ filterNotContainsOperator="Does not contain"
1985
+
1986
+ i18n-filterEndsWithOperator="kendo.filter.filterEndsWithOperator|The text of the ends with filter operator"
1987
+ filterEndsWithOperator="Ends with"
1988
+
1989
+ i18n-filterGteOperator="kendo.filter.filterGteOperator|The text of the greater than or equal filter operator"
1990
+ filterGteOperator="Is greater than or equal to"
1991
+
1992
+ i18n-filterGtOperator="kendo.filter.filterGtOperator|The text of the greater than filter operator"
1993
+ filterGtOperator="Is greater than"
1994
+
1995
+ i18n-filterLteOperator="kendo.filter.filterLteOperator|The text of the less than or equal filter operator"
1996
+ filterLteOperator="Is less than or equal to"
1997
+
1998
+ i18n-filterLtOperator="kendo.filter.filterLtOperator|The text of the less than filter operator"
1999
+ filterLtOperator="Is less than"
2000
+
2001
+ i18n-filterIsTrue="kendo.filter.filterIsTrue|The text of the IsTrue boolean filter option"
2002
+ filterIsTrue="Is True"
2003
+
2004
+ i18n-filterIsFalse="kendo.filter.filterIsFalse|The text of the IsFalse boolean filter option"
2005
+ filterIsFalse="Is False"
2006
+
2007
+ i18n-filterBooleanAll="kendo.filter.filterBooleanAll|The text of the (All) boolean filter option"
2008
+ filterBooleanAll="(All)"
2009
+
2010
+ i18n-filterAfterOrEqualOperator="kendo.filter.filterAfterOrEqualOperator|The text of the after or equal date filter operator"
2011
+ filterAfterOrEqualOperator="Is after or equal to"
2012
+
2013
+ i18n-filterAfterOperator="kendo.filter.filterAfterOperator|The text of the after date filter operator"
2014
+ filterAfterOperator="Is after"
2015
+
2016
+ i18n-filterBeforeOperator="kendo.filter.filterBeforeOperator|The text of the before date filter operator"
2017
+ filterBeforeOperator="Is before"
2018
+
2019
+ i18n-filterBeforeOrEqualOperator="kendo.filter.filterBeforeOrEqualOperator|The text of the before or equal date filter operator"
2020
+ filterBeforeOrEqualOperator="Is before or equal to"
2021
+
2022
+ i18n-filterFieldAriaLabel="kendo.filter.filterFieldAriaLabel|The text of the filter field aria label"
2023
+ filterFieldAriaLabel="field"
2024
+
2025
+ i18n-filterOperatorAriaLabel="kendo.filter.filterOperatorAriaLabel|The text of the filter operator aria label"
2026
+ filterOperatorAriaLabel="operator"
2027
+
2028
+ i18n-filterValueAriaLabel="kendo.filter.filterValueAriaLabel|The text of the filter value aria label"
2029
+ filterValueAriaLabel="value"
2030
+
2031
+ i18n-filterToolbarAriaLabel="kendo.filter.filterToolbarAriaLabel|The text of the filter row aria label"
2032
+ filterToolbarAriaLabel="filter row settings"
2033
+
2034
+ i18n-filterComponentAriaLabel="kendo.filter.filterComponentAriaLabel|The text of the filter component aria label"
2035
+ filterComponentAriaLabel="filter component"
2036
+ >
2037
+ </ng-container>
2038
+ <div class="k-widget k-filter" [attr.dir]="direction">
2039
+ <ul class='k-filter-container' role="tree" [attr.aria-label]="messageFor('filterComponentAriaLabel')">
2040
+ <li class='k-filter-group-main' role="treeitem">
2041
+ <kendo-filter-group
2042
+ [currentItem]="getCurrentFilter()"
2043
+ (valueChange)="onValueChange($event)"
2044
+ >
2045
+ </kendo-filter-group>
2046
+ </li>
2047
+ </ul>
2048
+ </div>
2049
+ `
2050
+ }]
2051
+ }], ctorParameters: function () { return [{ type: FilterService }, { type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: NavigationService }, { type: i0.Renderer2 }]; }, propDecorators: { focusout: [{
2052
+ type: HostListener,
2053
+ args: ['focusout', ['$event']]
2054
+ }], onKeydown: [{
2055
+ type: HostListener,
2056
+ args: ['keydown', ['$event']]
2057
+ }], direction: [{
2058
+ type: HostBinding,
2059
+ args: ['attr.dir']
2060
+ }], filters: [{
2061
+ type: Input
2062
+ }], value: [{
2063
+ type: Input
2064
+ }], valueChange: [{
2065
+ type: Output
2066
+ }], filterFields: [{
2067
+ type: ContentChildren,
2068
+ args: [FilterFieldComponent]
2069
+ }], _filterItems: [{
2070
+ type: ViewChildren,
2071
+ args: [FilterItem]
2072
+ }] } });
2073
+
2074
+ /**
2075
+ * Custom component messages override default component messages
2076
+ * ([see example]({% slug globalization_filter %}#toc-localization)).
2077
+ */
2078
+ class CustomMessagesComponent extends Messages {
2079
+ constructor(service) {
2080
+ super();
2081
+ this.service = service;
2082
+ }
2083
+ get override() {
2084
+ return true;
2085
+ }
2086
+ }
2087
+ CustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
2088
+ CustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: CustomMessagesComponent, selector: "kendo-filter-messages", providers: [
2089
+ {
2090
+ provide: Messages,
2091
+ useExisting: forwardRef(() => CustomMessagesComponent)
2092
+ }
2093
+ ], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
2094
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CustomMessagesComponent, decorators: [{
2095
+ type: Component,
2096
+ args: [{
2097
+ providers: [
2098
+ {
2099
+ provide: Messages,
2100
+ useExisting: forwardRef(() => CustomMessagesComponent)
2101
+ }
2102
+ ],
2103
+ selector: 'kendo-filter-messages',
2104
+ template: ``
2105
+ }]
2106
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
2107
+
2108
+ const importedModules = [
2109
+ CommonModule,
2110
+ InputsModule,
2111
+ LabelModule,
2112
+ DropDownsModule,
2113
+ ButtonsModule,
2114
+ DateInputsModule
2115
+ ];
2116
+ /**
2117
+ * @hidden
2118
+ */
2119
+ class SharedModule {
2120
+ }
2121
+ SharedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2122
+ SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SharedModule, imports: [CommonModule,
2123
+ InputsModule,
2124
+ LabelModule,
2125
+ DropDownsModule,
2126
+ ButtonsModule,
2127
+ DateInputsModule], exports: [CommonModule,
2128
+ InputsModule,
2129
+ LabelModule,
2130
+ DropDownsModule,
2131
+ ButtonsModule,
2132
+ DateInputsModule] });
2133
+ SharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SharedModule, imports: [[...importedModules], CommonModule,
2134
+ InputsModule,
2135
+ LabelModule,
2136
+ DropDownsModule,
2137
+ ButtonsModule,
2138
+ DateInputsModule] });
2139
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SharedModule, decorators: [{
2140
+ type: NgModule,
2141
+ args: [{
2142
+ imports: [...importedModules],
2143
+ exports: [...importedModules]
2144
+ }]
2145
+ }] });
2146
+
2147
+ /**
2148
+ * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
2149
+ * definition for the Filter component.
2150
+ *
2151
+ * @example
2152
+ *
2153
+ * ```
2154
+ * // Import the Filter module
2155
+ * import { FilterModule } from '@progress/kendo-angular-filter';
2156
+ *
2157
+ * // The browser platform with a compiler
2158
+ * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
2159
+ *
2160
+ * import { NgModule } from '@angular/core';
2161
+ *
2162
+ * // Import the app component
2163
+ * import { AppComponent } from './app.component';
2164
+ *
2165
+ * // Define the app module
2166
+ * _@NgModule({
2167
+ * declarations: [AppComponent], // declare app component
2168
+ * imports: [BrowserModule, FilterModule], // import Filter module
2169
+ * bootstrap: [AppComponent]
2170
+ * })
2171
+ * export class AppModule { }
2172
+ *
2173
+ * // Compile and launch the module
2174
+ * platformBrowserDynamic().bootstrapModule(AppModule);
2175
+ *
2176
+ * ```
2177
+ */
2178
+ class FilterModule {
2179
+ }
2180
+ FilterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2181
+ FilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterModule, declarations: [FilterComponent,
2182
+ FilterNumericEditorComponent,
2183
+ FilterTextEditorComponent,
2184
+ FilterExpressionComponent,
2185
+ FilterGroupComponent,
2186
+ FilterExpressionOperatorsComponent,
2187
+ FilterBooleanEditorComponent,
2188
+ FilterDateEditorComponent,
2189
+ LocalizedMessagesDirective,
2190
+ CustomMessagesComponent,
2191
+ AriaLabelValueDirective,
2192
+ FilterFieldComponent,
2193
+ FilterValueEditorTemplateDirective], imports: [SharedModule], exports: [FilterComponent,
2194
+ FilterNumericEditorComponent,
2195
+ FilterTextEditorComponent,
2196
+ FilterExpressionComponent,
2197
+ FilterGroupComponent,
2198
+ FilterExpressionOperatorsComponent,
2199
+ FilterBooleanEditorComponent,
2200
+ FilterDateEditorComponent,
2201
+ LocalizedMessagesDirective,
2202
+ CustomMessagesComponent,
2203
+ AriaLabelValueDirective,
2204
+ FilterFieldComponent,
2205
+ FilterValueEditorTemplateDirective] });
2206
+ FilterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterModule, imports: [[SharedModule]] });
2207
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FilterModule, decorators: [{
2208
+ type: NgModule,
2209
+ args: [{
2210
+ imports: [SharedModule],
2211
+ declarations: [FilterComponent,
2212
+ FilterNumericEditorComponent,
2213
+ FilterTextEditorComponent,
2214
+ FilterExpressionComponent,
2215
+ FilterGroupComponent,
2216
+ FilterExpressionOperatorsComponent,
2217
+ FilterBooleanEditorComponent,
2218
+ FilterDateEditorComponent,
2219
+ LocalizedMessagesDirective,
2220
+ CustomMessagesComponent,
2221
+ AriaLabelValueDirective,
2222
+ FilterFieldComponent,
2223
+ FilterValueEditorTemplateDirective
2224
+ ],
2225
+ exports: [FilterComponent,
2226
+ FilterNumericEditorComponent,
2227
+ FilterTextEditorComponent,
2228
+ FilterExpressionComponent,
2229
+ FilterGroupComponent,
2230
+ FilterExpressionOperatorsComponent,
2231
+ FilterBooleanEditorComponent,
2232
+ FilterDateEditorComponent,
2233
+ LocalizedMessagesDirective,
2234
+ CustomMessagesComponent,
2235
+ AriaLabelValueDirective,
2236
+ FilterFieldComponent,
2237
+ FilterValueEditorTemplateDirective
2238
+ ]
2239
+ }]
2240
+ }] });
2241
+
2242
+ /**
2243
+ * Generated bundle index. Do not edit.
2244
+ */
2245
+
2246
+ export { AriaLabelValueDirective, CustomMessagesComponent, FilterBooleanEditorComponent, FilterComponent, FilterDateEditorComponent, FilterExpressionComponent, FilterExpressionOperatorsComponent, FilterFieldComponent, FilterGroupComponent, FilterModule, FilterNumericEditorComponent, FilterTextEditorComponent, FilterValueEditorTemplateDirective, LocalizedMessagesDirective };
2247
+