@progress/kendo-angular-filter 17.0.0-develop.9 → 17.0.0

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