@progress/kendo-angular-filter 0.1.7 → 1.0.0-next.202204010908

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 (106) hide show
  1. package/{dist/es2015/aria-label.directive.d.ts → aria-label.directive.d.ts} +3 -0
  2. package/bundles/kendo-angular-filter.umd.js +5 -0
  3. package/{dist/es2015/editors → editors}/boolean-editor.component.d.ts +3 -0
  4. package/{dist/es2015/editors → editors}/date-editor.component.d.ts +3 -0
  5. package/{dist/es2015/editors → editors}/numeric-editor.component.d.ts +3 -0
  6. package/{dist/es2015/editors → editors}/text-editor.component.d.ts +3 -0
  7. package/esm2015/aria-label.directive.js +28 -0
  8. package/esm2015/editors/boolean-editor.component.js +84 -0
  9. package/esm2015/editors/date-editor.component.js +67 -0
  10. package/esm2015/editors/numeric-editor.component.js +67 -0
  11. package/esm2015/editors/text-editor.component.js +59 -0
  12. package/esm2015/filter-expression-operators.component.js +68 -0
  13. package/{dist/es2015 → esm2015}/filter-expression.component.js +71 -26
  14. package/esm2015/filter-group.component.js +206 -0
  15. package/{dist/es2015 → esm2015}/filter.component.js +151 -34
  16. package/esm2015/filter.module.js +117 -0
  17. package/{dist/es2015 → esm2015}/filter.service.js +8 -10
  18. package/{dist/es2015/shared.module.d.ts → esm2015/kendo-angular-filter.js} +2 -3
  19. package/esm2015/localization/custom-messages.component.js +41 -0
  20. package/esm2015/localization/localized-messages.directive.js +36 -0
  21. package/esm2015/localization/messages.js +95 -0
  22. package/{dist/es/index.js → esm2015/main.js} +3 -8
  23. package/{dist/es → esm2015}/model/filter-expression.js +1 -0
  24. package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
  25. package/esm2015/shared.module.js +50 -0
  26. package/{dist/es2015 → esm2015}/util.js +3 -3
  27. package/fesm2015/kendo-angular-filter.js +1622 -0
  28. package/{dist/es2015/filter-expression-operators.component.d.ts → filter-expression-operators.component.d.ts} +3 -0
  29. package/{dist/es2015/filter-expression.component.d.ts → filter-expression.component.d.ts} +5 -0
  30. package/{dist/es2015/filter-group.component.d.ts → filter-group.component.d.ts} +7 -2
  31. package/{dist/es2015/filter.component.d.ts → filter.component.d.ts} +7 -2
  32. package/filter.module.d.ts +53 -0
  33. package/{dist/es2015/filter.service.d.ts → filter.service.d.ts} +3 -0
  34. package/{dist/npm/model/filter-expression.js → kendo-angular-filter.d.ts} +3 -3
  35. package/{dist/es2015/localization → localization}/custom-messages.component.d.ts +4 -1
  36. package/{dist/es2015/localization → localization}/localized-messages.directive.d.ts +3 -0
  37. package/{dist/es2015/localization → localization}/messages.d.ts +3 -0
  38. package/{dist/es2015/index.d.ts → main.d.ts} +4 -8
  39. package/{dist/es2015/model → model}/filter-expression.d.ts +0 -0
  40. package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
  41. package/package.json +38 -109
  42. package/schematics/ngAdd/index.js +5 -2
  43. package/schematics/ngAdd/index.js.map +1 -1
  44. package/shared.module.d.ts +19 -0
  45. package/util.d.ts +147 -0
  46. package/dist/cdn/js/kendo-angular-filter.js +0 -20
  47. package/dist/cdn/main.js +0 -5
  48. package/dist/es/aria-label.directive.js +0 -30
  49. package/dist/es/editors/boolean-editor.component.js +0 -61
  50. package/dist/es/editors/date-editor.component.js +0 -45
  51. package/dist/es/editors/numeric-editor.component.js +0 -45
  52. package/dist/es/editors/text-editor.component.js +0 -45
  53. package/dist/es/filter-expression-operators.component.js +0 -48
  54. package/dist/es/filter-expression.component.js +0 -136
  55. package/dist/es/filter-group.component.js +0 -84
  56. package/dist/es/filter.component.js +0 -185
  57. package/dist/es/filter.module.js +0 -91
  58. package/dist/es/filter.service.js +0 -45
  59. package/dist/es/localization/custom-messages.component.js +0 -44
  60. package/dist/es/localization/localized-messages.directive.js +0 -35
  61. package/dist/es/localization/messages.js +0 -166
  62. package/dist/es/main.js +0 -6
  63. package/dist/es/package-metadata.js +0 -15
  64. package/dist/es/shared.module.js +0 -35
  65. package/dist/es/util.js +0 -136
  66. package/dist/es2015/aria-label.directive.js +0 -29
  67. package/dist/es2015/editors/boolean-editor.component.js +0 -72
  68. package/dist/es2015/editors/date-editor.component.js +0 -56
  69. package/dist/es2015/editors/numeric-editor.component.js +0 -56
  70. package/dist/es2015/editors/text-editor.component.js +0 -52
  71. package/dist/es2015/filter-expression-operators.component.js +0 -59
  72. package/dist/es2015/filter-group.component.js +0 -145
  73. package/dist/es2015/filter.module.d.ts +0 -37
  74. package/dist/es2015/filter.module.js +0 -88
  75. package/dist/es2015/index.js +0 -21
  76. package/dist/es2015/index.metadata.json +0 -1
  77. package/dist/es2015/localization/custom-messages.component.js +0 -36
  78. package/dist/es2015/localization/localized-messages.directive.js +0 -31
  79. package/dist/es2015/localization/messages.js +0 -160
  80. package/dist/es2015/main.d.ts +0 -7
  81. package/dist/es2015/main.js +0 -6
  82. package/dist/es2015/model/filter-expression.js +0 -7
  83. package/dist/es2015/shared.module.js +0 -32
  84. package/dist/es2015/util.d.ts +0 -147
  85. package/dist/fesm2015/index.js +0 -1316
  86. package/dist/fesm5/index.js +0 -1076
  87. package/dist/npm/aria-label.directive.js +0 -32
  88. package/dist/npm/editors/boolean-editor.component.js +0 -63
  89. package/dist/npm/editors/date-editor.component.js +0 -47
  90. package/dist/npm/editors/numeric-editor.component.js +0 -47
  91. package/dist/npm/editors/text-editor.component.js +0 -47
  92. package/dist/npm/filter-expression-operators.component.js +0 -50
  93. package/dist/npm/filter-expression.component.js +0 -138
  94. package/dist/npm/filter-group.component.js +0 -86
  95. package/dist/npm/filter.component.js +0 -187
  96. package/dist/npm/filter.module.js +0 -93
  97. package/dist/npm/filter.service.js +0 -47
  98. package/dist/npm/index.js +0 -37
  99. package/dist/npm/localization/custom-messages.component.js +0 -46
  100. package/dist/npm/localization/localized-messages.directive.js +0 -37
  101. package/dist/npm/localization/messages.js +0 -168
  102. package/dist/npm/main.js +0 -10
  103. package/dist/npm/package-metadata.js +0 -17
  104. package/dist/npm/shared.module.js +0 -37
  105. package/dist/npm/util.js +0 -138
  106. package/dist/systemjs/kendo-angular-filter.js +0 -5
@@ -0,0 +1,1622 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import * as i0 from '@angular/core';
6
+ import { Injectable, Directive, Input, EventEmitter, Component, Output, forwardRef, isDevMode, HostBinding, NgModule } from '@angular/core';
7
+ import { validatePackage } from '@progress/kendo-licensing';
8
+ import * as i1 from '@progress/kendo-angular-l10n';
9
+ import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
10
+ import * as i3 from '@progress/kendo-angular-dropdowns';
11
+ import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
12
+ import * as i3$1 from '@progress/kendo-angular-inputs';
13
+ import { InputsModule } from '@progress/kendo-angular-inputs';
14
+ import * as i3$2 from '@progress/kendo-angular-dateinputs';
15
+ import { DateInputsModule } from '@progress/kendo-angular-dateinputs';
16
+ import * as i10 from '@angular/common';
17
+ import { CommonModule } from '@angular/common';
18
+ import * as i11 from '@progress/kendo-angular-buttons';
19
+ import { ButtonsModule } from '@progress/kendo-angular-buttons';
20
+ import { LabelModule } from '@progress/kendo-angular-label';
21
+
22
+ /**
23
+ * @hidden
24
+ */
25
+ class FilterService {
26
+ constructor() {
27
+ this.value = { filters: [], logic: 'or' };
28
+ this.filters = [];
29
+ this.isEditorDisabled = false;
30
+ }
31
+ addFilterGroup(item) {
32
+ let filterGroup = { logic: 'or', filters: [] };
33
+ item.filters.push(filterGroup);
34
+ }
35
+ addFilterExpression(item) {
36
+ let filterExpression = { operator: 'eq', value: null, field: null };
37
+ item.filters.push(filterExpression);
38
+ }
39
+ remove(item, positionIndex, parentItem) {
40
+ if (!parentItem) {
41
+ parentItem = this.value;
42
+ }
43
+ if (item === parentItem) {
44
+ parentItem.filters = [];
45
+ return;
46
+ }
47
+ let index = parentItem.filters.indexOf(item);
48
+ if (index >= 0 && index === positionIndex) {
49
+ parentItem.filters = parentItem.filters.filter((i) => i !== item);
50
+ return;
51
+ }
52
+ parentItem.filters.forEach((filter) => filter.filters && this.remove(item, positionIndex, filter));
53
+ }
54
+ }
55
+ FilterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
56
+ FilterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterService });
57
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterService, decorators: [{
58
+ type: Injectable
59
+ }] });
60
+
61
+ /**
62
+ * @hidden
63
+ */
64
+ const nullOperators = ["isnull", "isnotnull", "isempty", "isnotempty"];
65
+ /**
66
+ * @hidden
67
+ */
68
+ const numericOperators = [
69
+ { text: "Is equal to", value: "eq" },
70
+ { text: "Not equal to", value: "neq" },
71
+ { text: "Greater than or equal to", value: "gte" },
72
+ { text: "Greater than", value: "gt" },
73
+ { text: "Less than or equal to", value: "lte" },
74
+ { text: "Less than", value: "lt" },
75
+ { text: "Is null", value: "isnull" },
76
+ { text: "Is not null", value: "isnotnull" }
77
+ ];
78
+ /**
79
+ * @hidden
80
+ */
81
+ const stringOperators = [
82
+ { text: "Is equal to", value: "eq" },
83
+ { text: "Not equal to", value: "neq" },
84
+ { text: "Contains", value: "contains" },
85
+ { text: "Does not contain", value: "doesnotcontain" },
86
+ { text: "Starts with", value: "startswith" },
87
+ { text: "Ends with", value: "endswith" },
88
+ { text: "Is null", value: "isnull" },
89
+ { text: "Is not null", value: "isnotnull" },
90
+ { text: "Is empty", value: "isempty" },
91
+ { text: "Is not empty", value: "isnotempty" }
92
+ ];
93
+ /**
94
+ * @hidden
95
+ */
96
+ const booleanOperators = [
97
+ { text: "Is equal to", value: "eq" },
98
+ { text: "Is not equal to", value: "neq" }
99
+ ];
100
+ /**
101
+ * @hidden
102
+ */
103
+ const dateOperators = [
104
+ { text: "Is equal to", value: "eq" },
105
+ { text: "Not equal to", value: "neq" },
106
+ { text: "Greater than or equal to", value: "gte" },
107
+ { text: "Greater than", value: "gt" },
108
+ { text: "Less than or equal to", value: "lte" },
109
+ { text: "Less than", value: "lt" },
110
+ { text: "Is null", value: "isnull" },
111
+ { text: "Is not null", value: "isnotnull" }
112
+ ];
113
+ /**
114
+ * @hidden
115
+ */
116
+ const isArray = (value) => Array.isArray(value);
117
+ /**
118
+ * @hidden
119
+ */
120
+ const getKeyByValue = (object, value) => {
121
+ return Object.keys(object).find(key => object[key] === value);
122
+ };
123
+ /**
124
+ * @hidden
125
+ */
126
+ const defaultStringOperators = {
127
+ "filterEqOperator": "eq",
128
+ "filterNotEqOperator": "neq",
129
+ "filterContainsOperator": "contains",
130
+ "filterNotContainsOperator": "doesnotcontain",
131
+ "filterStartsWithOperator": "startswith",
132
+ "filterEndsWithOperator": "endswith",
133
+ "filterIsNullOperator": "isnull",
134
+ "filterIsNotNullOperator": "isnotnull",
135
+ "filterIsEmptyOperator": "isempty",
136
+ "filterIsNotEmptyOperator": "isnotempty"
137
+ };
138
+ /**
139
+ * @hidden
140
+ */
141
+ const defaultNumericOperators = {
142
+ "filterEqOperator": "eq",
143
+ "filterNotEqOperator": "neq",
144
+ "filterGteOperator": "gte",
145
+ "filterGtOperator": "gt",
146
+ "filterLteOperator": "lte",
147
+ "filterLtOperator": "lt",
148
+ "filterIsNullOperator": "isnull",
149
+ "filterIsNotNullOperator": "isnotnull"
150
+ };
151
+ /**
152
+ * @hidden
153
+ */
154
+ const defaultDateOperators = {
155
+ "filterEqOperator": "eq",
156
+ "filterNotEqOperator": "neq",
157
+ "filterAfterOrEqualOperator": "gte",
158
+ "filterAfterOperator": "gt",
159
+ "filterBeforeOrEqualOperator": "lte",
160
+ "filterBeforeOperator": "lt",
161
+ "filterIsNullOperator": "isnull",
162
+ "filterIsNotNullOperator": "isnotnull"
163
+ };
164
+ /**
165
+ * @hidden
166
+ */
167
+ const defaultOperators = {
168
+ "string": defaultStringOperators,
169
+ "number": defaultNumericOperators,
170
+ "date": defaultDateOperators
171
+ };
172
+ /**
173
+ * @hidden
174
+ */
175
+ const logicOperators = {
176
+ "filterAndLogic": 'and',
177
+ "filterOrLogic": 'or'
178
+ };
179
+ /**
180
+ * @hidden
181
+ */
182
+ const isFilterEditor = (editorType) => {
183
+ const supportedEditorTypes = ['string', 'number', 'boolean', 'date'];
184
+ return supportedEditorTypes.indexOf(editorType) >= 0;
185
+ };
186
+ /**
187
+ * @hidden
188
+ */
189
+ const localizeOperators = operators => localization => Object.keys(operators).map(key => ({
190
+ text: localization.get(key),
191
+ value: operators[key]
192
+ }));
193
+
194
+ /**
195
+ * @hidden
196
+ */
197
+ const packageMetadata = {
198
+ name: '@progress/kendo-angular-filter',
199
+ productName: 'Kendo UI for Angular',
200
+ productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
201
+ publishDate: 1648804076,
202
+ version: '',
203
+ licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
204
+ };
205
+
206
+ /**
207
+ * @hidden
208
+ */
209
+ class AriaLabelValueDirective {
210
+ constructor(hostElement, renderer) {
211
+ this.hostElement = hostElement;
212
+ this.renderer = renderer;
213
+ }
214
+ ngOnChanges() {
215
+ const target = this.hostElement.nativeElement.querySelector('input') || this.hostElement.nativeElement;
216
+ this.renderer.setAttribute(target, 'aria-label', this.ariaLabel);
217
+ }
218
+ }
219
+ AriaLabelValueDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AriaLabelValueDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
220
+ AriaLabelValueDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: AriaLabelValueDirective, selector: "[kendoAriaLabelValue]", inputs: { ariaLabel: ["kendoAriaLabelValue", "ariaLabel"] }, usesOnChanges: true, ngImport: i0 });
221
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AriaLabelValueDirective, decorators: [{
222
+ type: Directive,
223
+ args: [{ selector: '[kendoAriaLabelValue]' }]
224
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { ariaLabel: [{
225
+ type: Input,
226
+ args: ['kendoAriaLabelValue']
227
+ }] } });
228
+
229
+ /**
230
+ * @hidden
231
+ */
232
+ class FilterExpressionOperatorsComponent {
233
+ constructor(filterService, localization) {
234
+ this.filterService = filterService;
235
+ this.localization = localization;
236
+ this.valueChange = new EventEmitter();
237
+ this.operators = [];
238
+ }
239
+ messageFor(key) {
240
+ return this.localization.get(key);
241
+ }
242
+ operatorValueChange(value) {
243
+ this.valueChange.emit();
244
+ this.filterService.isEditorDisabled = nullOperators.indexOf(value) >= 0;
245
+ }
246
+ }
247
+ FilterExpressionOperatorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterExpressionOperatorsComponent, deps: [{ token: FilterService }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
248
+ FilterExpressionOperatorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilterExpressionOperatorsComponent, selector: "kendo-filter-expression-operators", inputs: { currentItem: "currentItem", operators: "operators" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: `
249
+ <kendo-dropdownlist
250
+ [kendoAriaLabelValue]="messageFor('filterOperatorAriaLabel')"
251
+ [data]="operators"
252
+ [title]="messageFor('filterExpressionOperators')"
253
+ [(value)]="currentItem.operator"
254
+ (valueChange)="operatorValueChange($event)"
255
+ [valuePrimitive]="true"
256
+ textField="text"
257
+ valueField="value"
258
+ >
259
+ </kendo-dropdownlist>
260
+ `, isInline: true, components: [{ type: i3.DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["iconClass", "loading", "data", "value", "textField", "valueField", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }], directives: [{ type: AriaLabelValueDirective, selector: "[kendoAriaLabelValue]", inputs: ["kendoAriaLabelValue"] }] });
261
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterExpressionOperatorsComponent, decorators: [{
262
+ type: Component,
263
+ args: [{
264
+ selector: 'kendo-filter-expression-operators',
265
+ template: `
266
+ <kendo-dropdownlist
267
+ [kendoAriaLabelValue]="messageFor('filterOperatorAriaLabel')"
268
+ [data]="operators"
269
+ [title]="messageFor('filterExpressionOperators')"
270
+ [(value)]="currentItem.operator"
271
+ (valueChange)="operatorValueChange($event)"
272
+ [valuePrimitive]="true"
273
+ textField="text"
274
+ valueField="value"
275
+ >
276
+ </kendo-dropdownlist>
277
+ `
278
+ }]
279
+ }], ctorParameters: function () { return [{ type: FilterService }, { type: i1.LocalizationService }]; }, propDecorators: { currentItem: [{
280
+ type: Input
281
+ }], valueChange: [{
282
+ type: Output
283
+ }], operators: [{
284
+ type: Input
285
+ }] } });
286
+
287
+ /**
288
+ * @hidden
289
+ */
290
+ class FilterTextEditorComponent {
291
+ constructor(localization, filterService) {
292
+ this.localization = localization;
293
+ this.filterService = filterService;
294
+ this.valueChange = new EventEmitter();
295
+ }
296
+ isDisabled() {
297
+ const isDisabled = this.filterService.isEditorDisabled;
298
+ if (isDisabled) {
299
+ this.currentItem.value = null;
300
+ }
301
+ return isDisabled;
302
+ }
303
+ messageFor(key) {
304
+ return this.localization.get(key);
305
+ }
306
+ }
307
+ FilterTextEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterTextEditorComponent, deps: [{ token: i1.LocalizationService }, { token: FilterService }], target: i0.ɵɵFactoryTarget.Component });
308
+ FilterTextEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilterTextEditorComponent, selector: "kendo-filter-text-editor", inputs: { currentItem: "currentItem" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: `
309
+ <kendo-textbox
310
+ [kendoAriaLabelValue]="messageFor('filterValueAriaLabel')"
311
+ class="k-filter-toolbar-item k-filter-value"
312
+ [(value)]="currentItem.value"
313
+ (valueChange)="valueChange.emit()"
314
+ [disabled]="isDisabled()">
315
+ </kendo-textbox>
316
+ `, isInline: true, components: [{ type: i3$1.TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "errorIcon", "clearButtonIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }], directives: [{ type: AriaLabelValueDirective, selector: "[kendoAriaLabelValue]", inputs: ["kendoAriaLabelValue"] }] });
317
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterTextEditorComponent, decorators: [{
318
+ type: Component,
319
+ args: [{
320
+ selector: 'kendo-filter-text-editor',
321
+ template: `
322
+ <kendo-textbox
323
+ [kendoAriaLabelValue]="messageFor('filterValueAriaLabel')"
324
+ class="k-filter-toolbar-item k-filter-value"
325
+ [(value)]="currentItem.value"
326
+ (valueChange)="valueChange.emit()"
327
+ [disabled]="isDisabled()">
328
+ </kendo-textbox>
329
+ `
330
+ }]
331
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: FilterService }]; }, propDecorators: { currentItem: [{
332
+ type: Input
333
+ }], valueChange: [{
334
+ type: Output
335
+ }] } });
336
+
337
+ /**
338
+ * @hidden
339
+ */
340
+ class FilterNumericEditorComponent {
341
+ constructor(localization, filterService) {
342
+ this.localization = localization;
343
+ this.filterService = filterService;
344
+ this.valueChange = new EventEmitter();
345
+ }
346
+ messageFor(key) {
347
+ return this.localization.get(key);
348
+ }
349
+ isDisabled() {
350
+ const isDisabled = this.filterService.isEditorDisabled;
351
+ if (isDisabled) {
352
+ this.currentItem.value = null;
353
+ }
354
+ return isDisabled;
355
+ }
356
+ }
357
+ FilterNumericEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterNumericEditorComponent, deps: [{ token: i1.LocalizationService }, { token: FilterService }], target: i0.ɵɵFactoryTarget.Component });
358
+ FilterNumericEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilterNumericEditorComponent, selector: "kendo-filter-numeric-editor", inputs: { currentItem: "currentItem" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: `
359
+ <kendo-numerictextbox
360
+ [kendoAriaLabelValue]="messageFor('filterValueAriaLabel')"
361
+ class="k-filter-toolbar-item k-filter-value"
362
+ [(value)]="currentItem.value"
363
+ (valueChange)="valueChange.emit()"
364
+ [disabled]="isDisabled()">
365
+ <kendo-numerictextbox-messages
366
+ [increment]="messageFor('editorNumericIncrement')"
367
+ [decrement]="messageFor('editorNumericDecrement')">
368
+ </kendo-numerictextbox-messages>
369
+ </kendo-numerictextbox>
370
+ `, isInline: true, components: [{ type: i3$1.NumericTextBoxComponent, selector: "kendo-numerictextbox", inputs: ["focusableId", "disabled", "readonly", "title", "autoCorrect", "format", "max", "min", "decimals", "placeholder", "step", "spinners", "rangeValidation", "tabindex", "tabIndex", "changeValueOnScroll", "selectOnFocus", "value", "maxlength", "size", "rounded", "fillMode"], outputs: ["valueChange", "focus", "blur"], exportAs: ["kendoNumericTextBox"] }, { type: i3$1.NumericTextBoxCustomMessagesComponent, selector: "kendo-numerictextbox-messages" }], directives: [{ type: AriaLabelValueDirective, selector: "[kendoAriaLabelValue]", inputs: ["kendoAriaLabelValue"] }] });
371
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterNumericEditorComponent, decorators: [{
372
+ type: Component,
373
+ args: [{
374
+ selector: 'kendo-filter-numeric-editor',
375
+ template: `
376
+ <kendo-numerictextbox
377
+ [kendoAriaLabelValue]="messageFor('filterValueAriaLabel')"
378
+ class="k-filter-toolbar-item k-filter-value"
379
+ [(value)]="currentItem.value"
380
+ (valueChange)="valueChange.emit()"
381
+ [disabled]="isDisabled()">
382
+ <kendo-numerictextbox-messages
383
+ [increment]="messageFor('editorNumericIncrement')"
384
+ [decrement]="messageFor('editorNumericDecrement')">
385
+ </kendo-numerictextbox-messages>
386
+ </kendo-numerictextbox>
387
+ `
388
+ }]
389
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: FilterService }]; }, propDecorators: { currentItem: [{
390
+ type: Input
391
+ }], valueChange: [{
392
+ type: Output
393
+ }] } });
394
+
395
+ /**
396
+ * @hidden
397
+ */
398
+ class FilterBooleanEditorComponent {
399
+ constructor(localization, cdr) {
400
+ this.localization = localization;
401
+ this.cdr = cdr;
402
+ this.valueChange = new EventEmitter();
403
+ this.items = this.getValueItems();
404
+ this.defaultItem = this.getDefaultItem();
405
+ }
406
+ ngOnInit() {
407
+ this.localizationSubscription = this.localization.changes.subscribe(() => {
408
+ this.defaultItem = this.getDefaultItem();
409
+ this.items = this.getValueItems();
410
+ this.cdr.detectChanges();
411
+ });
412
+ }
413
+ getDefaultItem() {
414
+ return { text: this.localization.get("filterBooleanAll"), value: null };
415
+ }
416
+ getValueItems() {
417
+ return [
418
+ { text: this.localization.get("filterIsTrue"), value: true },
419
+ { text: this.localization.get("filterIsFalse"), value: false }
420
+ ];
421
+ }
422
+ ngOnDestroy() {
423
+ if (this.localizationSubscription) {
424
+ this.localizationSubscription.unsubscribe();
425
+ }
426
+ }
427
+ messageFor(key) {
428
+ return this.localization.get(key);
429
+ }
430
+ }
431
+ FilterBooleanEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterBooleanEditorComponent, deps: [{ token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
432
+ FilterBooleanEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilterBooleanEditorComponent, selector: "kendo-filter-boolean-editor", inputs: { currentItem: "currentItem" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: `
433
+ <kendo-dropdownlist
434
+ [kendoAriaLabelValue]="messageFor('filterValueAriaLabel')"
435
+ class="k-filter-toolbar-item k-filter-value"
436
+ [(value)]="currentItem.value"
437
+ (valueChange)="valueChange.emit()"
438
+ [data]="items"
439
+ [defaultItem]="defaultItem"
440
+ [valuePrimitive]="true"
441
+ textField="text"
442
+ valueField="value"
443
+ >
444
+ </kendo-dropdownlist>
445
+ `, isInline: true, components: [{ type: i3.DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["iconClass", "loading", "data", "value", "textField", "valueField", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }], directives: [{ type: AriaLabelValueDirective, selector: "[kendoAriaLabelValue]", inputs: ["kendoAriaLabelValue"] }] });
446
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterBooleanEditorComponent, decorators: [{
447
+ type: Component,
448
+ args: [{
449
+ selector: 'kendo-filter-boolean-editor',
450
+ template: `
451
+ <kendo-dropdownlist
452
+ [kendoAriaLabelValue]="messageFor('filterValueAriaLabel')"
453
+ class="k-filter-toolbar-item k-filter-value"
454
+ [(value)]="currentItem.value"
455
+ (valueChange)="valueChange.emit()"
456
+ [data]="items"
457
+ [defaultItem]="defaultItem"
458
+ [valuePrimitive]="true"
459
+ textField="text"
460
+ valueField="value"
461
+ >
462
+ </kendo-dropdownlist>
463
+ `
464
+ }]
465
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { currentItem: [{
466
+ type: Input
467
+ }], valueChange: [{
468
+ type: Output
469
+ }] } });
470
+
471
+ /**
472
+ * @hidden
473
+ */
474
+ class FilterDateEditorComponent {
475
+ constructor(localization, filterService) {
476
+ this.localization = localization;
477
+ this.filterService = filterService;
478
+ this.valueChange = new EventEmitter();
479
+ }
480
+ messageFor(key) {
481
+ return this.localization.get(key);
482
+ }
483
+ isDisabled() {
484
+ const isDisabled = this.filterService.isEditorDisabled;
485
+ if (isDisabled) {
486
+ this.currentItem.value = null;
487
+ }
488
+ return isDisabled;
489
+ }
490
+ }
491
+ FilterDateEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterDateEditorComponent, deps: [{ token: i1.LocalizationService }, { token: FilterService }], target: i0.ɵɵFactoryTarget.Component });
492
+ FilterDateEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilterDateEditorComponent, selector: "kendo-filter-date-editor", inputs: { currentItem: "currentItem" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: `
493
+ <kendo-datepicker
494
+ [kendoAriaLabelValue]="messageFor('filterValueAriaLabel')"
495
+ class="k-filter-toolbar-item k-filter-value"
496
+ [(value)]="currentItem.value"
497
+ (valueChange)="valueChange.emit()"
498
+ [disabled]="isDisabled()">
499
+ <kendo-datepicker-messages
500
+ [toggle]="messageFor('editorDateToggleText')"
501
+ [today]="messageFor('editorDateTodayText')">
502
+ </kendo-datepicker-messages>
503
+ </kendo-datepicker>
504
+ `, isInline: true, components: [{ type: i3$2.DatePickerComponent, selector: "kendo-datepicker", inputs: ["cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "navigationItemTemplate", "focusableId", "activeView", "bottomView", "topView", "calendarType", "animateCalendarNavigation", "disabled", "readonly", "readOnlyInput", "popupSettings", "navigation", "min", "max", "incompleteDateValidation", "focusedDate", "value", "format", "twoDigitYearMax", "formatPlaceholder", "placeholder", "tabindex", "tabIndex", "disabledDates", "title", "rangeValidation", "disabledDatesValidation", "weekNumber", "size", "rounded", "fillMode"], outputs: ["valueChange", "focus", "blur", "open", "close"], exportAs: ["kendo-datepicker"] }, { type: i3$2.DatePickerCustomMessagesComponent, selector: "kendo-datepicker-messages" }], directives: [{ type: AriaLabelValueDirective, selector: "[kendoAriaLabelValue]", inputs: ["kendoAriaLabelValue"] }] });
505
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterDateEditorComponent, decorators: [{
506
+ type: Component,
507
+ args: [{
508
+ selector: 'kendo-filter-date-editor',
509
+ template: `
510
+ <kendo-datepicker
511
+ [kendoAriaLabelValue]="messageFor('filterValueAriaLabel')"
512
+ class="k-filter-toolbar-item k-filter-value"
513
+ [(value)]="currentItem.value"
514
+ (valueChange)="valueChange.emit()"
515
+ [disabled]="isDisabled()">
516
+ <kendo-datepicker-messages
517
+ [toggle]="messageFor('editorDateToggleText')"
518
+ [today]="messageFor('editorDateTodayText')">
519
+ </kendo-datepicker-messages>
520
+ </kendo-datepicker>
521
+ `
522
+ }]
523
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: FilterService }]; }, propDecorators: { currentItem: [{
524
+ type: Input
525
+ }], valueChange: [{
526
+ type: Output
527
+ }] } });
528
+
529
+ /**
530
+ * @hidden
531
+ */
532
+ class FilterExpressionComponent {
533
+ constructor(filterService, localization, cdr) {
534
+ this.filterService = filterService;
535
+ this.localization = localization;
536
+ this.cdr = cdr;
537
+ this.valueChange = new EventEmitter();
538
+ this.operators = [];
539
+ this.filters = [];
540
+ this.isBoolean = false;
541
+ this.isEditorDisabled = false;
542
+ }
543
+ ngOnInit() {
544
+ this.filters = this.filterService.filters;
545
+ const foundFilter = this.getFilterExpressionByField(this.currentItem.field);
546
+ if (this.currentItem.field) {
547
+ this.setOperators(foundFilter);
548
+ }
549
+ const defaultFilter = this.getFilterExpressionByField(this.filterService.filters[0].field);
550
+ if (!this.currentItem.field) {
551
+ this.currentItem.field = this.filterService.filters[0].field;
552
+ this.setOperators(defaultFilter);
553
+ }
554
+ this.localizationSubscription = this.localization.changes.subscribe(() => {
555
+ this.setOperators(foundFilter || defaultFilter);
556
+ this.cdr.detectChanges();
557
+ });
558
+ }
559
+ ngOnDestroy() {
560
+ if (this.localizationSubscription) {
561
+ this.localizationSubscription.unsubscribe();
562
+ }
563
+ }
564
+ normalizeOperators(filterEditor, operators) {
565
+ let result = [];
566
+ for (let j = 0; j < operators.length; j++) {
567
+ if (isFilterEditor(filterEditor)) {
568
+ result.push({
569
+ value: operators[j],
570
+ text: this.localization.get(getKeyByValue(defaultOperators[filterEditor], operators[j]))
571
+ });
572
+ }
573
+ }
574
+ return result;
575
+ }
576
+ messageFor(key) {
577
+ return this.localization.get(key);
578
+ }
579
+ getFilterExpressionByField(name) {
580
+ const foundFilter = this.filterService.filters.find(filter => filter.field === name);
581
+ if (foundFilter) {
582
+ return foundFilter;
583
+ }
584
+ return null;
585
+ }
586
+ filterValueChange(value) {
587
+ this.currentItem.value = null;
588
+ this.currentItem.field = value;
589
+ const foundFilter = this.getFilterExpressionByField(this.currentItem.field);
590
+ this.setOperators(foundFilter);
591
+ this.valueChange.emit();
592
+ }
593
+ getDefaultOperators(operatorsType) {
594
+ switch (operatorsType) {
595
+ case 'string':
596
+ return localizeOperators(defaultStringOperators)(this.localization);
597
+ case 'number':
598
+ return localizeOperators(defaultNumericOperators)(this.localization);
599
+ case 'date':
600
+ return localizeOperators(defaultDateOperators)(this.localization);
601
+ default:
602
+ break;
603
+ }
604
+ }
605
+ getEditorType() {
606
+ let item = this.filterService.filters.find((filterExpression) => filterExpression.field === this.currentItem.field);
607
+ return item.editor;
608
+ }
609
+ removeFilterExpression() {
610
+ this.filterService.remove(this.currentItem, this.index);
611
+ this.valueChange.emit();
612
+ }
613
+ setOperators(filter) {
614
+ this.isBoolean = filter.editor === 'boolean';
615
+ if (this.isBoolean) {
616
+ return;
617
+ }
618
+ if (filter.operators) {
619
+ const localizedOperators = this.normalizeOperators(filter.editor, filter.operators);
620
+ this.operators = localizedOperators;
621
+ if (!this.currentItem.operator) {
622
+ this.currentItem.operator = localizedOperators[0].value;
623
+ }
624
+ }
625
+ else {
626
+ this.operators = this.getDefaultOperators(filter.editor);
627
+ if (!this.currentItem.operator) {
628
+ this.currentItem.operator = this.operators[0].value;
629
+ }
630
+ }
631
+ }
632
+ }
633
+ FilterExpressionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterExpressionComponent, deps: [{ token: FilterService }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
634
+ FilterExpressionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilterExpressionComponent, selector: "kendo-filter-expression", inputs: { index: "index", currentItem: "currentItem" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: `
635
+ <div class="k-filter-toolbar" role="group" [attr.aria-label]="messageFor('filterAriaLabel')">
636
+ <div class="k-toolbar">
637
+ <div class="k-filter-toolbar-item k-filter-field">
638
+ <kendo-dropdownlist
639
+ [kendoAriaLabelValue]="messageFor('filterFieldAriaLabel')"
640
+ [title]="messageFor('filterExpressionFilters')"
641
+ [data]="filters"
642
+ textField="title"
643
+ valueField="field"
644
+ [value]="currentItem.field"
645
+ [valuePrimitive]="true"
646
+ (valueChange)="filterValueChange($event)">
647
+ </kendo-dropdownlist>
648
+ </div>
649
+ <div *ngIf="!isBoolean" class="k-filter-toolbar-item k-filter-operator">
650
+ <kendo-filter-expression-operators
651
+ [currentItem]="currentItem"
652
+ [operators]="operators"
653
+ (valueChange)="valueChange.emit();">
654
+ </kendo-filter-expression-operators>
655
+ </div>
656
+
657
+ <ng-container [ngSwitch]="getEditorType()">
658
+ <kendo-filter-text-editor *ngSwitchCase="'string'" [currentItem]="currentItem" (valueChange)="valueChange.emit()"></kendo-filter-text-editor>
659
+ <kendo-filter-numeric-editor *ngSwitchCase="'number'" [currentItem]="currentItem" (valueChange)="valueChange.emit()"></kendo-filter-numeric-editor>
660
+ <kendo-filter-boolean-editor *ngSwitchCase="'boolean'" [currentItem]="currentItem" (valueChange)="valueChange.emit()"></kendo-filter-boolean-editor>
661
+ <kendo-filter-date-editor *ngSwitchCase="'date'" [currentItem]="currentItem" (valueChange)="valueChange.emit()"></kendo-filter-date-editor>
662
+ </ng-container>
663
+
664
+ <div class="k-filter-toolbar-item">
665
+ <button
666
+ kendoButton
667
+ icon="close"
668
+ fillMode="flat"
669
+ [title]="messageFor('remove')"
670
+ (click)="removeFilterExpression()">
671
+ </button>
672
+ </div>
673
+ </div>
674
+ </div>
675
+ `, isInline: true, components: [{ type: i3.DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["iconClass", "loading", "data", "value", "textField", "valueField", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }, { type: FilterExpressionOperatorsComponent, selector: "kendo-filter-expression-operators", inputs: ["currentItem", "operators"], outputs: ["valueChange"] }, { type: FilterTextEditorComponent, selector: "kendo-filter-text-editor", inputs: ["currentItem"], outputs: ["valueChange"] }, { type: FilterNumericEditorComponent, selector: "kendo-filter-numeric-editor", inputs: ["currentItem"], outputs: ["valueChange"] }, { type: FilterBooleanEditorComponent, selector: "kendo-filter-boolean-editor", inputs: ["currentItem"], outputs: ["valueChange"] }, { type: FilterDateEditorComponent, selector: "kendo-filter-date-editor", inputs: ["currentItem"], outputs: ["valueChange"] }], directives: [{ type: AriaLabelValueDirective, selector: "[kendoAriaLabelValue]", inputs: ["kendoAriaLabelValue"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i10.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i11.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "shape", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
676
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterExpressionComponent, decorators: [{
677
+ type: Component,
678
+ args: [{
679
+ selector: 'kendo-filter-expression',
680
+ template: `
681
+ <div class="k-filter-toolbar" role="group" [attr.aria-label]="messageFor('filterAriaLabel')">
682
+ <div class="k-toolbar">
683
+ <div class="k-filter-toolbar-item k-filter-field">
684
+ <kendo-dropdownlist
685
+ [kendoAriaLabelValue]="messageFor('filterFieldAriaLabel')"
686
+ [title]="messageFor('filterExpressionFilters')"
687
+ [data]="filters"
688
+ textField="title"
689
+ valueField="field"
690
+ [value]="currentItem.field"
691
+ [valuePrimitive]="true"
692
+ (valueChange)="filterValueChange($event)">
693
+ </kendo-dropdownlist>
694
+ </div>
695
+ <div *ngIf="!isBoolean" class="k-filter-toolbar-item k-filter-operator">
696
+ <kendo-filter-expression-operators
697
+ [currentItem]="currentItem"
698
+ [operators]="operators"
699
+ (valueChange)="valueChange.emit();">
700
+ </kendo-filter-expression-operators>
701
+ </div>
702
+
703
+ <ng-container [ngSwitch]="getEditorType()">
704
+ <kendo-filter-text-editor *ngSwitchCase="'string'" [currentItem]="currentItem" (valueChange)="valueChange.emit()"></kendo-filter-text-editor>
705
+ <kendo-filter-numeric-editor *ngSwitchCase="'number'" [currentItem]="currentItem" (valueChange)="valueChange.emit()"></kendo-filter-numeric-editor>
706
+ <kendo-filter-boolean-editor *ngSwitchCase="'boolean'" [currentItem]="currentItem" (valueChange)="valueChange.emit()"></kendo-filter-boolean-editor>
707
+ <kendo-filter-date-editor *ngSwitchCase="'date'" [currentItem]="currentItem" (valueChange)="valueChange.emit()"></kendo-filter-date-editor>
708
+ </ng-container>
709
+
710
+ <div class="k-filter-toolbar-item">
711
+ <button
712
+ kendoButton
713
+ icon="close"
714
+ fillMode="flat"
715
+ [title]="messageFor('remove')"
716
+ (click)="removeFilterExpression()">
717
+ </button>
718
+ </div>
719
+ </div>
720
+ </div>
721
+ `
722
+ }]
723
+ }], ctorParameters: function () { return [{ type: FilterService }, { type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { index: [{
724
+ type: Input
725
+ }], currentItem: [{
726
+ type: Input
727
+ }], valueChange: [{
728
+ type: Output
729
+ }] } });
730
+
731
+ /**
732
+ * @hidden
733
+ */
734
+ class FilterGroupComponent {
735
+ constructor(filterService, localization, cdr) {
736
+ this.filterService = filterService;
737
+ this.localization = localization;
738
+ this.cdr = cdr;
739
+ this.index = 0;
740
+ this.currentItem = {
741
+ logic: 'or',
742
+ filters: []
743
+ };
744
+ this.valueChange = new EventEmitter();
745
+ this.operators = [];
746
+ }
747
+ ngOnInit() {
748
+ this.operators = this.getLogicOperators();
749
+ this.localizationSubscription = this.localization.changes.subscribe(() => {
750
+ this.operators = this.getLogicOperators();
751
+ this.cdr.detectChanges();
752
+ });
753
+ }
754
+ ngOnDestroy() {
755
+ if (this.localizationSubscription) {
756
+ this.localizationSubscription.unsubscribe();
757
+ }
758
+ }
759
+ getLogicOperators() {
760
+ return localizeOperators(logicOperators)(this.localization);
761
+ }
762
+ messageFor(key) {
763
+ return this.localization.get(key);
764
+ }
765
+ selectedChange(logicOperator) {
766
+ if (this.currentItem.logic !== logicOperator) {
767
+ this.currentItem.logic = logicOperator;
768
+ this.valueChange.emit();
769
+ }
770
+ }
771
+ addFilterExpression() {
772
+ this.filterService.addFilterExpression(this.currentItem);
773
+ this.valueChange.emit();
774
+ }
775
+ addFilterGroup() {
776
+ this.filterService.addFilterGroup(this.currentItem);
777
+ this.valueChange.emit();
778
+ }
779
+ removeFilterGroup() {
780
+ this.filterService.remove(this.currentItem, this.index);
781
+ this.valueChange.emit();
782
+ }
783
+ }
784
+ FilterGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterGroupComponent, deps: [{ token: FilterService }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
785
+ FilterGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilterGroupComponent, selector: "kendo-filter-group", inputs: { index: "index", currentItem: "currentItem" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: `
786
+ <div class="k-filter-toolbar" role="toolbar" [attr.aria-label]="messageFor('filterToolbarAriaLabel')">
787
+ <div class="k-toolbar">
788
+ <div class="k-filter-toolbar-item">
789
+ <div class="k-widget k-button-group" role="group">
790
+ <button
791
+ *ngFor="let operator of operators"
792
+ kendoButton
793
+ [ngClass]="{'k-group-start': operator.value === 'and', 'k-group-end': operator.value === 'or'}"
794
+ [selected]="currentItem.logic === operator.value"
795
+ [title]="operator.text"
796
+ (click)="selectedChange(operator.value)"
797
+ >
798
+ {{operator.text}}
799
+ </button>
800
+ </div>
801
+ </div>
802
+ <div class="k-filter-toolbar-item">
803
+ <button
804
+ kendoButton
805
+ [title]="messageFor('addFilter')"
806
+ icon="filter-add-expression"
807
+ (click)="addFilterExpression()">
808
+ {{messageFor('addFilter')}}
809
+ </button>
810
+ </div>
811
+ <div class="k-filter-toolbar-item">
812
+ <button
813
+ kendoButton
814
+ [title]="messageFor('addGroup')"
815
+ icon="filter-add-group"
816
+ (click)="addFilterGroup()">
817
+ {{messageFor('addGroup')}}
818
+ </button>
819
+ </div>
820
+ <div class="k-filter-toolbar-item">
821
+ <button
822
+ kendoButton
823
+ icon="close"
824
+ fillMode="flat"
825
+ [title]="messageFor('remove')"
826
+ (click)="removeFilterGroup()">
827
+ </button>
828
+ </div>
829
+ </div>
830
+ </div>
831
+
832
+ <ul class="k-filter-lines" *ngIf="currentItem.filters">
833
+ <ng-container *ngFor="let item of currentItem.filters; let i = index;">
834
+ <li class="k-filter-item" *ngIf="!item['filters']">
835
+ <kendo-filter-expression (valueChange)="valueChange.emit()" [currentItem]="item" [index]="i">
836
+ </kendo-filter-expression>
837
+ </li>
838
+ <li class="k-filter-item" *ngIf="item['filters']">
839
+ <kendo-filter-group
840
+ (valueChange)="valueChange.emit()"
841
+ [currentItem]="item"
842
+ [index]="i"
843
+ >
844
+ </kendo-filter-group>
845
+ </li>
846
+ </ng-container>
847
+ </ul>
848
+ `, isInline: true, components: [{ type: FilterExpressionComponent, selector: "kendo-filter-expression", inputs: ["index", "currentItem"], outputs: ["valueChange"] }, { type: FilterGroupComponent, selector: "kendo-filter-group", inputs: ["index", "currentItem"], outputs: ["valueChange"] }], directives: [{ type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i11.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "shape", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i10.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
849
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterGroupComponent, decorators: [{
850
+ type: Component,
851
+ args: [{
852
+ selector: 'kendo-filter-group',
853
+ template: `
854
+ <div class="k-filter-toolbar" role="toolbar" [attr.aria-label]="messageFor('filterToolbarAriaLabel')">
855
+ <div class="k-toolbar">
856
+ <div class="k-filter-toolbar-item">
857
+ <div class="k-widget k-button-group" role="group">
858
+ <button
859
+ *ngFor="let operator of operators"
860
+ kendoButton
861
+ [ngClass]="{'k-group-start': operator.value === 'and', 'k-group-end': operator.value === 'or'}"
862
+ [selected]="currentItem.logic === operator.value"
863
+ [title]="operator.text"
864
+ (click)="selectedChange(operator.value)"
865
+ >
866
+ {{operator.text}}
867
+ </button>
868
+ </div>
869
+ </div>
870
+ <div class="k-filter-toolbar-item">
871
+ <button
872
+ kendoButton
873
+ [title]="messageFor('addFilter')"
874
+ icon="filter-add-expression"
875
+ (click)="addFilterExpression()">
876
+ {{messageFor('addFilter')}}
877
+ </button>
878
+ </div>
879
+ <div class="k-filter-toolbar-item">
880
+ <button
881
+ kendoButton
882
+ [title]="messageFor('addGroup')"
883
+ icon="filter-add-group"
884
+ (click)="addFilterGroup()">
885
+ {{messageFor('addGroup')}}
886
+ </button>
887
+ </div>
888
+ <div class="k-filter-toolbar-item">
889
+ <button
890
+ kendoButton
891
+ icon="close"
892
+ fillMode="flat"
893
+ [title]="messageFor('remove')"
894
+ (click)="removeFilterGroup()">
895
+ </button>
896
+ </div>
897
+ </div>
898
+ </div>
899
+
900
+ <ul class="k-filter-lines" *ngIf="currentItem.filters">
901
+ <ng-container *ngFor="let item of currentItem.filters; let i = index;">
902
+ <li class="k-filter-item" *ngIf="!item['filters']">
903
+ <kendo-filter-expression (valueChange)="valueChange.emit()" [currentItem]="item" [index]="i">
904
+ </kendo-filter-expression>
905
+ </li>
906
+ <li class="k-filter-item" *ngIf="item['filters']">
907
+ <kendo-filter-group
908
+ (valueChange)="valueChange.emit()"
909
+ [currentItem]="item"
910
+ [index]="i"
911
+ >
912
+ </kendo-filter-group>
913
+ </li>
914
+ </ng-container>
915
+ </ul>
916
+ `
917
+ }]
918
+ }], ctorParameters: function () { return [{ type: FilterService }, { type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { index: [{
919
+ type: Input
920
+ }], currentItem: [{
921
+ type: Input
922
+ }], valueChange: [{
923
+ type: Output
924
+ }] } });
925
+
926
+ /**
927
+ * @hidden
928
+ */
929
+ class Messages extends ComponentMessages {
930
+ }
931
+ Messages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
932
+ Messages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", 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", filterAriaLabel: "filterAriaLabel", filterToolbarAriaLabel: "filterToolbarAriaLabel" }, usesInheritance: true, ngImport: i0 });
933
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Messages, decorators: [{
934
+ type: Directive,
935
+ args: [{
936
+ selector: '[kendoFilterMessages]'
937
+ }]
938
+ }], propDecorators: { filterExpressionOperators: [{
939
+ type: Input
940
+ }], filterExpressionFilters: [{
941
+ type: Input
942
+ }], remove: [{
943
+ type: Input
944
+ }], addGroup: [{
945
+ type: Input
946
+ }], addFilter: [{
947
+ type: Input
948
+ }], filterAndLogic: [{
949
+ type: Input
950
+ }], filterOrLogic: [{
951
+ type: Input
952
+ }], filterEqOperator: [{
953
+ type: Input
954
+ }], filterNotEqOperator: [{
955
+ type: Input
956
+ }], filterIsNullOperator: [{
957
+ type: Input
958
+ }], filterIsNotNullOperator: [{
959
+ type: Input
960
+ }], filterIsEmptyOperator: [{
961
+ type: Input
962
+ }], filterIsNotEmptyOperator: [{
963
+ type: Input
964
+ }], filterStartsWithOperator: [{
965
+ type: Input
966
+ }], filterContainsOperator: [{
967
+ type: Input
968
+ }], filterNotContainsOperator: [{
969
+ type: Input
970
+ }], filterEndsWithOperator: [{
971
+ type: Input
972
+ }], filterGteOperator: [{
973
+ type: Input
974
+ }], filterGtOperator: [{
975
+ type: Input
976
+ }], filterLteOperator: [{
977
+ type: Input
978
+ }], filterLtOperator: [{
979
+ type: Input
980
+ }], filterIsTrue: [{
981
+ type: Input
982
+ }], filterIsFalse: [{
983
+ type: Input
984
+ }], filterBooleanAll: [{
985
+ type: Input
986
+ }], filterAfterOrEqualOperator: [{
987
+ type: Input
988
+ }], filterAfterOperator: [{
989
+ type: Input
990
+ }], filterBeforeOperator: [{
991
+ type: Input
992
+ }], filterBeforeOrEqualOperator: [{
993
+ type: Input
994
+ }], editorNumericDecrement: [{
995
+ type: Input
996
+ }], editorNumericIncrement: [{
997
+ type: Input
998
+ }], editorDateTodayText: [{
999
+ type: Input
1000
+ }], editorDateToggleText: [{
1001
+ type: Input
1002
+ }], filterFieldAriaLabel: [{
1003
+ type: Input
1004
+ }], filterOperatorAriaLabel: [{
1005
+ type: Input
1006
+ }], filterValueAriaLabel: [{
1007
+ type: Input
1008
+ }], filterAriaLabel: [{
1009
+ type: Input
1010
+ }], filterToolbarAriaLabel: [{
1011
+ type: Input
1012
+ }] } });
1013
+
1014
+ /**
1015
+ * @hidden
1016
+ */
1017
+ class LocalizedMessagesDirective extends Messages {
1018
+ constructor(service) {
1019
+ super();
1020
+ this.service = service;
1021
+ }
1022
+ }
1023
+ LocalizedMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
1024
+ LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: LocalizedMessagesDirective, selector: "[kendoFilterLocalizedMessages]", providers: [
1025
+ {
1026
+ provide: Messages,
1027
+ useExisting: forwardRef(() => LocalizedMessagesDirective)
1028
+ }
1029
+ ], usesInheritance: true, ngImport: i0 });
1030
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
1031
+ type: Directive,
1032
+ args: [{
1033
+ providers: [
1034
+ {
1035
+ provide: Messages,
1036
+ useExisting: forwardRef(() => LocalizedMessagesDirective)
1037
+ }
1038
+ ],
1039
+ selector: '[kendoFilterLocalizedMessages]'
1040
+ }]
1041
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
1042
+
1043
+ /**
1044
+ * Represents the [Kendo UI Filter component for Angular]({% slug overview_filter %}).
1045
+ * The Filter component can be used to apply any user defined filter criteria.
1046
+ * @example
1047
+ * ```
1048
+ * @Component({
1049
+ * selector: 'my-app',
1050
+ * template: `
1051
+ * <kendo-filter [filters]="filters" (valueChange)="onValueChange($event)"></kendo-filter>
1052
+ * `
1053
+ * })
1054
+ * export class AppComponent {
1055
+ *
1056
+ * public filters: FilterExpression[] = [
1057
+ * {
1058
+ * name: 'country',
1059
+ * label: 'Country',
1060
+ * filter: 'string',
1061
+ * operators: ['eq', 'neq'],
1062
+ * },
1063
+ * {
1064
+ * name: 'budget',
1065
+ * filter: 'number'
1066
+ * }
1067
+ * ];
1068
+ *
1069
+ * onValueChange(e: CompositeFilterDescriptor){
1070
+ * console.log(e)
1071
+ * }
1072
+ * }
1073
+ * ```
1074
+ */
1075
+ class FilterComponent {
1076
+ constructor(filterService, localization, cdr) {
1077
+ this.filterService = filterService;
1078
+ this.localization = localization;
1079
+ this.cdr = cdr;
1080
+ /**
1081
+ * Fires every time the Filter component value is updated.
1082
+ * That is each time a Filter Group or Filter Expression is added, removed, or updated.
1083
+ */
1084
+ this.valueChange = new EventEmitter();
1085
+ validatePackage(packageMetadata);
1086
+ this.direction = localization.rtl ? 'rtl' : 'ltr';
1087
+ }
1088
+ /**
1089
+ * Specifies the available user-defined filters. At least one filter should be provided.
1090
+ */
1091
+ set filters(_filters) {
1092
+ if (isDevMode() && (!isArray(_filters) || _filters.length === 0)) {
1093
+ throw new Error(`Pass at least one user-defined filter through the [filters] input property. See http://www.telerik.com/kendo-angular-ui/components/filter/#data-binding`);
1094
+ }
1095
+ this.filterService.filters = _filters.map(filterExpression => {
1096
+ let clonedFilter = Object.assign({}, filterExpression);
1097
+ if (!clonedFilter.title) {
1098
+ clonedFilter.title = clonedFilter.field;
1099
+ }
1100
+ return clonedFilter;
1101
+ });
1102
+ }
1103
+ get filters() {
1104
+ return this.filterService.filters;
1105
+ }
1106
+ /**
1107
+ * Sets the initial `value` of the Filter component.
1108
+ */
1109
+ set value(value) {
1110
+ const clonedValue = JSON.parse(JSON.stringify(value));
1111
+ this.normalizeValue(clonedValue);
1112
+ this.filterService.value = clonedValue;
1113
+ }
1114
+ get value() {
1115
+ return this.filterService.value;
1116
+ }
1117
+ ngOnInit() {
1118
+ if (this.filters.length === 0) {
1119
+ throw new Error(`Pass at least one user-defined filter through the [filters] input property. See http://www.telerik.com/kendo-angular-ui/components/filter/#data-binding`);
1120
+ }
1121
+ this.localizationSubscription = this.localization.changes.subscribe(({ rtl }) => {
1122
+ this.direction = rtl ? 'rtl' : 'ltr';
1123
+ this.cdr.detectChanges();
1124
+ });
1125
+ }
1126
+ ngOnDestroy() {
1127
+ if (this.localizationSubscription) {
1128
+ this.localizationSubscription.unsubscribe();
1129
+ }
1130
+ }
1131
+ /**
1132
+ * @hidden
1133
+ */
1134
+ getCurrentFilter() {
1135
+ return this.value;
1136
+ }
1137
+ /**
1138
+ * @hidden
1139
+ */
1140
+ onValueChange() {
1141
+ this.valueChange.emit(this.filterService.value);
1142
+ }
1143
+ normalizeFilter(filterDescriptor) {
1144
+ const foundFilter = this.filterService.filters.find((filter) => filter.field === filterDescriptor.field);
1145
+ if (isDevMode() && !foundFilter) {
1146
+ throw new Error(`There is no user-defined filter with '${filterDescriptor.field}' field provided through the [filters] input property.`);
1147
+ }
1148
+ if (isDevMode() && foundFilter.editor === 'boolean' && (!filterDescriptor.value && filterDescriptor.value !== false)) {
1149
+ console.warn(`Provide a value for the boolean '${filterDescriptor.field}' user-defined filter as the operator is always set to 'eq'.`);
1150
+ }
1151
+ if (filterDescriptor.operator && foundFilter.operators && !foundFilter.operators.some(operator => operator === filterDescriptor.operator)) {
1152
+ throw new Error(`The user-defined filter with field '${filterDescriptor.field}' is missing the '${filterDescriptor.operator}' operator.`);
1153
+ }
1154
+ if (foundFilter.editor === 'boolean') {
1155
+ filterDescriptor.operator = 'eq';
1156
+ }
1157
+ if (foundFilter.editor === 'date' && filterDescriptor.value) {
1158
+ filterDescriptor.value = new Date(filterDescriptor.value);
1159
+ }
1160
+ if (!filterDescriptor.value && filterDescriptor.value !== false) {
1161
+ filterDescriptor.value = null;
1162
+ }
1163
+ }
1164
+ normalizeValue(item) {
1165
+ item.filters.forEach((item) => {
1166
+ if (item.filters) {
1167
+ this.normalizeValue(item);
1168
+ }
1169
+ else {
1170
+ this.normalizeFilter(item);
1171
+ }
1172
+ });
1173
+ }
1174
+ }
1175
+ FilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterComponent, deps: [{ token: FilterService }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1176
+ FilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilterComponent, selector: "kendo-filter", inputs: { filters: "filters", value: "value" }, outputs: { valueChange: "valueChange" }, host: { properties: { "attr.dir": "this.direction" } }, providers: [FilterService], ngImport: i0, template: `
1177
+ <ng-container kendoFilterLocalizedMessages
1178
+ i18n-editorDateTodayText="kendo.filter.editorDateTodayText|The text of the Today button of the Date editor"
1179
+ editorDateTodayText="Today"
1180
+
1181
+ i18n-editorDateToggleText="kendo.filter.editorDateToggleText|The title of the Toggle button of the Date editor."
1182
+ editorDateToggleText="Toggle calendar"
1183
+
1184
+ i18n-editorNumericDecrement="kendo.filter.editorNumericDecrement|The title of the Decrement button of the Numeric editor"
1185
+ editorNumericDecrement="Decrement"
1186
+
1187
+ i18n-editorNumericIncrement="kendo.filter.editorNumericIncrement|The title of the Increment button of the Numeric editor"
1188
+ editorNumericIncrement="Increment"
1189
+
1190
+ i18n-filterExpressionOperators="kendo.filter.filterExpressionOperators|The text of the Filter Expression Operators drop down"
1191
+ filterExpressionOperators="Operators"
1192
+
1193
+ i18n-filterExpressionFilters="kendo.filter.filterExpressionFilters|The text of the Filter Expression filters drop down"
1194
+ filterExpressionFilters="Fields"
1195
+
1196
+ i18n-remove="kendo.filter.remove|The text of the Remove button"
1197
+ remove="Remove"
1198
+
1199
+ i18n-addFilter="kendo.filter.addFilter|The text of the Add Filter button"
1200
+ addFilter="Add Filter"
1201
+
1202
+ i18n-addGroup="kendo.filter.addGroup|The text of the Add Group button"
1203
+ addGroup="Add Group"
1204
+
1205
+ i18n-filterAndLogic="kendo.filter.filterAndLogic|The text of the And filter logic"
1206
+ filterAndLogic="And"
1207
+
1208
+ i18n-filterOrLogic="kendo.filter.filterOrLogic|The text of the Or filter logic"
1209
+ filterOrLogic="Or"
1210
+
1211
+ i18n-filterEqOperator="kendo.filter.filterEqOperator|The text of the equal filter operator"
1212
+ filterEqOperator="Is equal to"
1213
+
1214
+ i18n-filterNotEqOperator="kendo.filter.filterNotEqOperator|The text of the not equal filter operator"
1215
+ filterNotEqOperator="Is not equal to"
1216
+
1217
+ i18n-filterIsNullOperator="kendo.filter.filterIsNullOperator|The text of the is null filter operator"
1218
+ filterIsNullOperator="Is null"
1219
+
1220
+ i18n-filterIsNotNullOperator="kendo.filter.filterIsNotNullOperator|The text of the is not null filter operator"
1221
+ filterIsNotNullOperator="Is not null"
1222
+
1223
+ i18n-filterIsEmptyOperator="kendo.filter.filterIsEmptyOperator|The text of the is empty filter operator"
1224
+ filterIsEmptyOperator="Is empty"
1225
+
1226
+ i18n-filterIsNotEmptyOperator="kendo.filter.filterIsNotEmptyOperator|The text of the is not empty filter operator"
1227
+ filterIsNotEmptyOperator="Is not empty"
1228
+
1229
+ i18n-filterStartsWithOperator="kendo.filter.filterStartsWithOperator|The text of the starts with filter operator"
1230
+ filterStartsWithOperator="Starts with"
1231
+
1232
+ i18n-filterContainsOperator="kendo.filter.filterContainsOperator|The text of the contains filter operator"
1233
+ filterContainsOperator="Contains"
1234
+
1235
+ i18n-filterNotContainsOperator="kendo.filter.filterNotContainsOperator|The text of the does not contain filter operator"
1236
+ filterNotContainsOperator="Does not contain"
1237
+
1238
+ i18n-filterEndsWithOperator="kendo.filter.filterEndsWithOperator|The text of the ends with filter operator"
1239
+ filterEndsWithOperator="Ends with"
1240
+
1241
+ i18n-filterGteOperator="kendo.filter.filterGteOperator|The text of the greater than or equal filter operator"
1242
+ filterGteOperator="Is greater than or equal to"
1243
+
1244
+ i18n-filterGtOperator="kendo.filter.filterGtOperator|The text of the greater than filter operator"
1245
+ filterGtOperator="Is greater than"
1246
+
1247
+ i18n-filterLteOperator="kendo.filter.filterLteOperator|The text of the less than or equal filter operator"
1248
+ filterLteOperator="Is less than or equal to"
1249
+
1250
+ i18n-filterLtOperator="kendo.filter.filterLtOperator|The text of the less than filter operator"
1251
+ filterLtOperator="Is less than"
1252
+
1253
+ i18n-filterIsTrue="kendo.filter.filterIsTrue|The text of the IsTrue boolean filter option"
1254
+ filterIsTrue="Is True"
1255
+
1256
+ i18n-filterIsFalse="kendo.filter.filterIsFalse|The text of the IsFalse boolean filter option"
1257
+ filterIsFalse="Is False"
1258
+
1259
+ i18n-filterBooleanAll="kendo.filter.filterBooleanAll|The text of the (All) boolean filter option"
1260
+ filterBooleanAll="(All)"
1261
+
1262
+ i18n-filterAfterOrEqualOperator="kendo.filter.filterAfterOrEqualOperator|The text of the after or equal date filter operator"
1263
+ filterAfterOrEqualOperator="Is after or equal to"
1264
+
1265
+ i18n-filterAfterOperator="kendo.filter.filterAfterOperator|The text of the after date filter operator"
1266
+ filterAfterOperator="Is after"
1267
+
1268
+ i18n-filterBeforeOperator="kendo.filter.filterBeforeOperator|The text of the before date filter operator"
1269
+ filterBeforeOperator="Is before"
1270
+
1271
+ i18n-filterBeforeOrEqualOperator="kendo.filter.filterBeforeOrEqualOperator|The text of the before or equal date filter operator"
1272
+ filterBeforeOrEqualOperator="Is before or equal to"
1273
+
1274
+ i18n-filterFieldAriaLabel="kendo.filter.filterFieldAriaLabel|The text of the filter field aria label"
1275
+ filterFieldAriaLabel="field"
1276
+
1277
+ i18n-filterOperatorAriaLabel="kendo.filter.filterOperatorAriaLabel|The text of the filter operator aria label"
1278
+ filterOperatorAriaLabel="operator"
1279
+
1280
+ i18n-filterValueAriaLabel="kendo.filter.filterValueAriaLabel|The text of the filter value aria label"
1281
+ filterValueAriaLabel="value"
1282
+
1283
+ i18n-filterAriaLabel="kendo.filter.filterAriaLabel|The text of the filter row aria label"
1284
+ filterAriaLabel="filter"
1285
+
1286
+ i18n-filterToolbarAriaLabel="kendo.filter.filterToolbarAriaLabel|The text of the filter toolbar aria label"
1287
+ filterToolbarAriaLabel="filter settings"
1288
+ >
1289
+ </ng-container>
1290
+ <div class="k-widget k-filter" [attr.dir]="direction">
1291
+ <ul class='k-filter-container'>
1292
+ <li class='k-filter-group-main'>
1293
+ <kendo-filter-group
1294
+ [currentItem]="getCurrentFilter()"
1295
+ (valueChange)="onValueChange()"
1296
+ >
1297
+ </kendo-filter-group>
1298
+ </li>
1299
+ </ul>
1300
+ </div>
1301
+ `, isInline: true, components: [{ type: FilterGroupComponent, selector: "kendo-filter-group", inputs: ["index", "currentItem"], outputs: ["valueChange"] }], directives: [{ type: LocalizedMessagesDirective, selector: "[kendoFilterLocalizedMessages]" }] });
1302
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterComponent, decorators: [{
1303
+ type: Component,
1304
+ args: [{
1305
+ selector: 'kendo-filter',
1306
+ template: `
1307
+ <ng-container kendoFilterLocalizedMessages
1308
+ i18n-editorDateTodayText="kendo.filter.editorDateTodayText|The text of the Today button of the Date editor"
1309
+ editorDateTodayText="Today"
1310
+
1311
+ i18n-editorDateToggleText="kendo.filter.editorDateToggleText|The title of the Toggle button of the Date editor."
1312
+ editorDateToggleText="Toggle calendar"
1313
+
1314
+ i18n-editorNumericDecrement="kendo.filter.editorNumericDecrement|The title of the Decrement button of the Numeric editor"
1315
+ editorNumericDecrement="Decrement"
1316
+
1317
+ i18n-editorNumericIncrement="kendo.filter.editorNumericIncrement|The title of the Increment button of the Numeric editor"
1318
+ editorNumericIncrement="Increment"
1319
+
1320
+ i18n-filterExpressionOperators="kendo.filter.filterExpressionOperators|The text of the Filter Expression Operators drop down"
1321
+ filterExpressionOperators="Operators"
1322
+
1323
+ i18n-filterExpressionFilters="kendo.filter.filterExpressionFilters|The text of the Filter Expression filters drop down"
1324
+ filterExpressionFilters="Fields"
1325
+
1326
+ i18n-remove="kendo.filter.remove|The text of the Remove button"
1327
+ remove="Remove"
1328
+
1329
+ i18n-addFilter="kendo.filter.addFilter|The text of the Add Filter button"
1330
+ addFilter="Add Filter"
1331
+
1332
+ i18n-addGroup="kendo.filter.addGroup|The text of the Add Group button"
1333
+ addGroup="Add Group"
1334
+
1335
+ i18n-filterAndLogic="kendo.filter.filterAndLogic|The text of the And filter logic"
1336
+ filterAndLogic="And"
1337
+
1338
+ i18n-filterOrLogic="kendo.filter.filterOrLogic|The text of the Or filter logic"
1339
+ filterOrLogic="Or"
1340
+
1341
+ i18n-filterEqOperator="kendo.filter.filterEqOperator|The text of the equal filter operator"
1342
+ filterEqOperator="Is equal to"
1343
+
1344
+ i18n-filterNotEqOperator="kendo.filter.filterNotEqOperator|The text of the not equal filter operator"
1345
+ filterNotEqOperator="Is not equal to"
1346
+
1347
+ i18n-filterIsNullOperator="kendo.filter.filterIsNullOperator|The text of the is null filter operator"
1348
+ filterIsNullOperator="Is null"
1349
+
1350
+ i18n-filterIsNotNullOperator="kendo.filter.filterIsNotNullOperator|The text of the is not null filter operator"
1351
+ filterIsNotNullOperator="Is not null"
1352
+
1353
+ i18n-filterIsEmptyOperator="kendo.filter.filterIsEmptyOperator|The text of the is empty filter operator"
1354
+ filterIsEmptyOperator="Is empty"
1355
+
1356
+ i18n-filterIsNotEmptyOperator="kendo.filter.filterIsNotEmptyOperator|The text of the is not empty filter operator"
1357
+ filterIsNotEmptyOperator="Is not empty"
1358
+
1359
+ i18n-filterStartsWithOperator="kendo.filter.filterStartsWithOperator|The text of the starts with filter operator"
1360
+ filterStartsWithOperator="Starts with"
1361
+
1362
+ i18n-filterContainsOperator="kendo.filter.filterContainsOperator|The text of the contains filter operator"
1363
+ filterContainsOperator="Contains"
1364
+
1365
+ i18n-filterNotContainsOperator="kendo.filter.filterNotContainsOperator|The text of the does not contain filter operator"
1366
+ filterNotContainsOperator="Does not contain"
1367
+
1368
+ i18n-filterEndsWithOperator="kendo.filter.filterEndsWithOperator|The text of the ends with filter operator"
1369
+ filterEndsWithOperator="Ends with"
1370
+
1371
+ i18n-filterGteOperator="kendo.filter.filterGteOperator|The text of the greater than or equal filter operator"
1372
+ filterGteOperator="Is greater than or equal to"
1373
+
1374
+ i18n-filterGtOperator="kendo.filter.filterGtOperator|The text of the greater than filter operator"
1375
+ filterGtOperator="Is greater than"
1376
+
1377
+ i18n-filterLteOperator="kendo.filter.filterLteOperator|The text of the less than or equal filter operator"
1378
+ filterLteOperator="Is less than or equal to"
1379
+
1380
+ i18n-filterLtOperator="kendo.filter.filterLtOperator|The text of the less than filter operator"
1381
+ filterLtOperator="Is less than"
1382
+
1383
+ i18n-filterIsTrue="kendo.filter.filterIsTrue|The text of the IsTrue boolean filter option"
1384
+ filterIsTrue="Is True"
1385
+
1386
+ i18n-filterIsFalse="kendo.filter.filterIsFalse|The text of the IsFalse boolean filter option"
1387
+ filterIsFalse="Is False"
1388
+
1389
+ i18n-filterBooleanAll="kendo.filter.filterBooleanAll|The text of the (All) boolean filter option"
1390
+ filterBooleanAll="(All)"
1391
+
1392
+ i18n-filterAfterOrEqualOperator="kendo.filter.filterAfterOrEqualOperator|The text of the after or equal date filter operator"
1393
+ filterAfterOrEqualOperator="Is after or equal to"
1394
+
1395
+ i18n-filterAfterOperator="kendo.filter.filterAfterOperator|The text of the after date filter operator"
1396
+ filterAfterOperator="Is after"
1397
+
1398
+ i18n-filterBeforeOperator="kendo.filter.filterBeforeOperator|The text of the before date filter operator"
1399
+ filterBeforeOperator="Is before"
1400
+
1401
+ i18n-filterBeforeOrEqualOperator="kendo.filter.filterBeforeOrEqualOperator|The text of the before or equal date filter operator"
1402
+ filterBeforeOrEqualOperator="Is before or equal to"
1403
+
1404
+ i18n-filterFieldAriaLabel="kendo.filter.filterFieldAriaLabel|The text of the filter field aria label"
1405
+ filterFieldAriaLabel="field"
1406
+
1407
+ i18n-filterOperatorAriaLabel="kendo.filter.filterOperatorAriaLabel|The text of the filter operator aria label"
1408
+ filterOperatorAriaLabel="operator"
1409
+
1410
+ i18n-filterValueAriaLabel="kendo.filter.filterValueAriaLabel|The text of the filter value aria label"
1411
+ filterValueAriaLabel="value"
1412
+
1413
+ i18n-filterAriaLabel="kendo.filter.filterAriaLabel|The text of the filter row aria label"
1414
+ filterAriaLabel="filter"
1415
+
1416
+ i18n-filterToolbarAriaLabel="kendo.filter.filterToolbarAriaLabel|The text of the filter toolbar aria label"
1417
+ filterToolbarAriaLabel="filter settings"
1418
+ >
1419
+ </ng-container>
1420
+ <div class="k-widget k-filter" [attr.dir]="direction">
1421
+ <ul class='k-filter-container'>
1422
+ <li class='k-filter-group-main'>
1423
+ <kendo-filter-group
1424
+ [currentItem]="getCurrentFilter()"
1425
+ (valueChange)="onValueChange()"
1426
+ >
1427
+ </kendo-filter-group>
1428
+ </li>
1429
+ </ul>
1430
+ </div>
1431
+ `,
1432
+ providers: [FilterService]
1433
+ }]
1434
+ }], ctorParameters: function () { return [{ type: FilterService }, { type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { direction: [{
1435
+ type: HostBinding,
1436
+ args: ['attr.dir']
1437
+ }], filters: [{
1438
+ type: Input
1439
+ }], value: [{
1440
+ type: Input
1441
+ }], valueChange: [{
1442
+ type: Output
1443
+ }] } });
1444
+
1445
+ /**
1446
+ * Custom component messages override default component messages
1447
+ * ([see example]({% slug globalization_filter %}#toc-localization)).
1448
+ */
1449
+ class CustomMessagesComponent extends Messages {
1450
+ constructor(service) {
1451
+ super();
1452
+ this.service = service;
1453
+ }
1454
+ get override() {
1455
+ return true;
1456
+ }
1457
+ }
1458
+ CustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
1459
+ CustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CustomMessagesComponent, selector: "kendo-filter-messages", providers: [
1460
+ {
1461
+ provide: Messages,
1462
+ useExisting: forwardRef(() => CustomMessagesComponent)
1463
+ }
1464
+ ], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
1465
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CustomMessagesComponent, decorators: [{
1466
+ type: Component,
1467
+ args: [{
1468
+ providers: [
1469
+ {
1470
+ provide: Messages,
1471
+ useExisting: forwardRef(() => CustomMessagesComponent)
1472
+ }
1473
+ ],
1474
+ selector: 'kendo-filter-messages',
1475
+ template: ``
1476
+ }]
1477
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
1478
+
1479
+ const importedModules = [
1480
+ CommonModule,
1481
+ InputsModule,
1482
+ LabelModule,
1483
+ DropDownsModule,
1484
+ ButtonsModule,
1485
+ DateInputsModule
1486
+ ];
1487
+ /**
1488
+ * @hidden
1489
+ */
1490
+ class SharedModule {
1491
+ }
1492
+ SharedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1493
+ SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedModule, imports: [CommonModule,
1494
+ InputsModule,
1495
+ LabelModule,
1496
+ DropDownsModule,
1497
+ ButtonsModule,
1498
+ DateInputsModule], exports: [CommonModule,
1499
+ InputsModule,
1500
+ LabelModule,
1501
+ DropDownsModule,
1502
+ ButtonsModule,
1503
+ DateInputsModule] });
1504
+ SharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedModule, imports: [[...importedModules], CommonModule,
1505
+ InputsModule,
1506
+ LabelModule,
1507
+ DropDownsModule,
1508
+ ButtonsModule,
1509
+ DateInputsModule] });
1510
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedModule, decorators: [{
1511
+ type: NgModule,
1512
+ args: [{
1513
+ imports: [...importedModules],
1514
+ exports: [...importedModules]
1515
+ }]
1516
+ }] });
1517
+
1518
+ /**
1519
+ * Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
1520
+ * definition for the Filter component.
1521
+ *
1522
+ * @example
1523
+ *
1524
+ * ```
1525
+ * // Import the Filter module
1526
+ * import { FilterModule } from '@progress/kendo-angular-filter';
1527
+ *
1528
+ * // The browser platform with a compiler
1529
+ * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
1530
+ *
1531
+ * import { NgModule } from '@angular/core';
1532
+ *
1533
+ * // Import the app component
1534
+ * import { AppComponent } from './app.component';
1535
+ *
1536
+ * // Define the app module
1537
+ * _@NgModule({
1538
+ * declarations: [AppComponent], // declare app component
1539
+ * imports: [BrowserModule, FilterModule], // import Filter module
1540
+ * bootstrap: [AppComponent]
1541
+ * })
1542
+ * export class AppModule { }
1543
+ *
1544
+ * // Compile and launch the module
1545
+ * platformBrowserDynamic().bootstrapModule(AppModule);
1546
+ *
1547
+ * ```
1548
+ */
1549
+ class FilterModule {
1550
+ }
1551
+ FilterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1552
+ FilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterModule, declarations: [FilterComponent,
1553
+ FilterNumericEditorComponent,
1554
+ FilterTextEditorComponent,
1555
+ FilterExpressionComponent,
1556
+ FilterGroupComponent,
1557
+ FilterExpressionOperatorsComponent,
1558
+ FilterBooleanEditorComponent,
1559
+ FilterDateEditorComponent,
1560
+ LocalizedMessagesDirective,
1561
+ CustomMessagesComponent,
1562
+ AriaLabelValueDirective], imports: [SharedModule], exports: [FilterComponent,
1563
+ FilterNumericEditorComponent,
1564
+ FilterTextEditorComponent,
1565
+ FilterExpressionComponent,
1566
+ FilterGroupComponent,
1567
+ FilterExpressionOperatorsComponent,
1568
+ FilterBooleanEditorComponent,
1569
+ FilterDateEditorComponent,
1570
+ LocalizedMessagesDirective,
1571
+ CustomMessagesComponent,
1572
+ AriaLabelValueDirective] });
1573
+ FilterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterModule, providers: [
1574
+ LocalizationService,
1575
+ {
1576
+ provide: L10N_PREFIX,
1577
+ useValue: 'kendo.filter'
1578
+ }
1579
+ ], imports: [[SharedModule]] });
1580
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterModule, decorators: [{
1581
+ type: NgModule,
1582
+ args: [{
1583
+ imports: [SharedModule],
1584
+ declarations: [FilterComponent,
1585
+ FilterNumericEditorComponent,
1586
+ FilterTextEditorComponent,
1587
+ FilterExpressionComponent,
1588
+ FilterGroupComponent,
1589
+ FilterExpressionOperatorsComponent,
1590
+ FilterBooleanEditorComponent,
1591
+ FilterDateEditorComponent,
1592
+ LocalizedMessagesDirective,
1593
+ CustomMessagesComponent,
1594
+ AriaLabelValueDirective
1595
+ ],
1596
+ exports: [FilterComponent,
1597
+ FilterNumericEditorComponent,
1598
+ FilterTextEditorComponent,
1599
+ FilterExpressionComponent,
1600
+ FilterGroupComponent,
1601
+ FilterExpressionOperatorsComponent,
1602
+ FilterBooleanEditorComponent,
1603
+ FilterDateEditorComponent,
1604
+ LocalizedMessagesDirective,
1605
+ CustomMessagesComponent,
1606
+ AriaLabelValueDirective],
1607
+ providers: [
1608
+ LocalizationService,
1609
+ {
1610
+ provide: L10N_PREFIX,
1611
+ useValue: 'kendo.filter'
1612
+ }
1613
+ ]
1614
+ }]
1615
+ }] });
1616
+
1617
+ /**
1618
+ * Generated bundle index. Do not edit.
1619
+ */
1620
+
1621
+ export { AriaLabelValueDirective, CustomMessagesComponent, FilterBooleanEditorComponent, FilterComponent, FilterDateEditorComponent, FilterExpressionComponent, FilterExpressionOperatorsComponent, FilterGroupComponent, FilterModule, FilterNumericEditorComponent, FilterTextEditorComponent, LocalizedMessagesDirective };
1622
+