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