@progress/kendo-angular-filter 0.1.6 → 1.0.0-next.202203251456

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 (90) hide show
  1. package/bundles/kendo-angular-filter.umd.js +5 -0
  2. package/package.json +41 -108
  3. package/schematics/ngAdd/index.js +5 -2
  4. package/schematics/ngAdd/index.js.map +1 -1
  5. package/dist/cdn/js/kendo-angular-filter.js +0 -20
  6. package/dist/cdn/main.js +0 -5
  7. package/dist/es/aria-label.directive.js +0 -30
  8. package/dist/es/editors/boolean-editor.component.js +0 -61
  9. package/dist/es/editors/date-editor.component.js +0 -45
  10. package/dist/es/editors/numeric-editor.component.js +0 -45
  11. package/dist/es/editors/text-editor.component.js +0 -45
  12. package/dist/es/filter-expression-operators.component.js +0 -48
  13. package/dist/es/filter-expression.component.js +0 -136
  14. package/dist/es/filter-group.component.js +0 -84
  15. package/dist/es/filter.component.js +0 -184
  16. package/dist/es/filter.module.js +0 -91
  17. package/dist/es/filter.service.js +0 -45
  18. package/dist/es/index.js +0 -21
  19. package/dist/es/localization/custom-messages.component.js +0 -44
  20. package/dist/es/localization/localized-messages.directive.js +0 -35
  21. package/dist/es/localization/messages.js +0 -166
  22. package/dist/es/main.js +0 -6
  23. package/dist/es/model/filter-expression.js +0 -7
  24. package/dist/es/package-metadata.js +0 -15
  25. package/dist/es/shared.module.js +0 -37
  26. package/dist/es/util.js +0 -136
  27. package/dist/es2015/aria-label.directive.d.ts +0 -15
  28. package/dist/es2015/aria-label.directive.js +0 -29
  29. package/dist/es2015/editors/boolean-editor.component.d.ts +0 -37
  30. package/dist/es2015/editors/boolean-editor.component.js +0 -72
  31. package/dist/es2015/editors/date-editor.component.d.ts +0 -20
  32. package/dist/es2015/editors/date-editor.component.js +0 -56
  33. package/dist/es2015/editors/numeric-editor.component.d.ts +0 -20
  34. package/dist/es2015/editors/numeric-editor.component.js +0 -56
  35. package/dist/es2015/editors/text-editor.component.d.ts +0 -20
  36. package/dist/es2015/editors/text-editor.component.js +0 -52
  37. package/dist/es2015/filter-expression-operators.component.d.ts +0 -24
  38. package/dist/es2015/filter-expression-operators.component.js +0 -59
  39. package/dist/es2015/filter-expression.component.d.ts +0 -43
  40. package/dist/es2015/filter-expression.component.js +0 -174
  41. package/dist/es2015/filter-group.component.d.ts +0 -36
  42. package/dist/es2015/filter-group.component.js +0 -145
  43. package/dist/es2015/filter.component.d.ts +0 -77
  44. package/dist/es2015/filter.component.js +0 -297
  45. package/dist/es2015/filter.module.d.ts +0 -37
  46. package/dist/es2015/filter.module.js +0 -88
  47. package/dist/es2015/filter.service.d.ts +0 -17
  48. package/dist/es2015/filter.service.js +0 -46
  49. package/dist/es2015/index.d.ts +0 -21
  50. package/dist/es2015/index.js +0 -21
  51. package/dist/es2015/index.metadata.json +0 -1
  52. package/dist/es2015/localization/custom-messages.component.d.ts +0 -15
  53. package/dist/es2015/localization/custom-messages.component.js +0 -36
  54. package/dist/es2015/localization/localized-messages.directive.d.ts +0 -13
  55. package/dist/es2015/localization/localized-messages.directive.js +0 -31
  56. package/dist/es2015/localization/messages.d.ts +0 -158
  57. package/dist/es2015/localization/messages.js +0 -160
  58. package/dist/es2015/main.d.ts +0 -7
  59. package/dist/es2015/main.js +0 -6
  60. package/dist/es2015/model/filter-expression.d.ts +0 -60
  61. package/dist/es2015/model/filter-expression.js +0 -7
  62. package/dist/es2015/package-metadata.d.ts +0 -9
  63. package/dist/es2015/package-metadata.js +0 -15
  64. package/dist/es2015/shared.module.d.ts +0 -9
  65. package/dist/es2015/shared.module.js +0 -34
  66. package/dist/es2015/util.d.ts +0 -147
  67. package/dist/es2015/util.js +0 -136
  68. package/dist/fesm2015/index.js +0 -1316
  69. package/dist/fesm5/index.js +0 -1076
  70. package/dist/npm/aria-label.directive.js +0 -32
  71. package/dist/npm/editors/boolean-editor.component.js +0 -63
  72. package/dist/npm/editors/date-editor.component.js +0 -47
  73. package/dist/npm/editors/numeric-editor.component.js +0 -47
  74. package/dist/npm/editors/text-editor.component.js +0 -47
  75. package/dist/npm/filter-expression-operators.component.js +0 -50
  76. package/dist/npm/filter-expression.component.js +0 -138
  77. package/dist/npm/filter-group.component.js +0 -86
  78. package/dist/npm/filter.component.js +0 -186
  79. package/dist/npm/filter.module.js +0 -93
  80. package/dist/npm/filter.service.js +0 -47
  81. package/dist/npm/index.js +0 -37
  82. package/dist/npm/localization/custom-messages.component.js +0 -46
  83. package/dist/npm/localization/localized-messages.directive.js +0 -37
  84. package/dist/npm/localization/messages.js +0 -168
  85. package/dist/npm/main.js +0 -10
  86. package/dist/npm/model/filter-expression.js +0 -9
  87. package/dist/npm/package-metadata.js +0 -17
  88. package/dist/npm/shared.module.js +0 -39
  89. package/dist/npm/util.js +0 -138
  90. package/dist/systemjs/kendo-angular-filter.js +0 -5
@@ -1,297 +0,0 @@
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 tslib_1 from "tslib";
6
- import { Component, Input, Output, EventEmitter, HostBinding, isDevMode } from '@angular/core';
7
- import { LocalizationService } from '@progress/kendo-angular-l10n';
8
- import { FilterService } from './filter.service';
9
- import { isArray } from './util';
10
- import { ChangeDetectorRef } from '@angular/core';
11
- import { validatePackage } from '@progress/kendo-licensing';
12
- import { packageMetadata } from './package-metadata';
13
- /**
14
- * Represents the [Kendo UI Filter component for Angular]({% slug overview_filter %}).
15
- * The Filter component can be used to apply any user defined filter criteria.
16
- * @example
17
- * ```
18
- * @Component({
19
- * selector: 'my-app',
20
- * template: `
21
- * <kendo-filter [filters]="filters" (valueChange)="onValueChange($event)"></kendo-filter>
22
- * `
23
- * })
24
- * export class AppComponent {
25
- *
26
- * public filters: FilterExpression[] = [
27
- * {
28
- * name: 'country',
29
- * label: 'Country',
30
- * filter: 'string',
31
- * operators: ['eq', 'neq'],
32
- * },
33
- * {
34
- * name: 'budget',
35
- * filter: 'number'
36
- * }
37
- * ];
38
- *
39
- * onValueChange(e: CompositeFilterDescriptor){
40
- * console.log(e)
41
- * }
42
- * }
43
- * ```
44
- */
45
- let FilterComponent = class FilterComponent {
46
- constructor(filterService, localization, cdr) {
47
- this.filterService = filterService;
48
- this.localization = localization;
49
- this.cdr = cdr;
50
- /**
51
- * Fires every time the Filter component value is updated.
52
- * That is each time a Filter Group or Filter Expression is added, removed, or updated.
53
- */
54
- this.valueChange = new EventEmitter();
55
- validatePackage(packageMetadata);
56
- this.direction = localization.rtl ? 'rtl' : 'ltr';
57
- }
58
- /**
59
- * Specifies the available user-defined filters. At least one filter should be provided.
60
- */
61
- set filters(_filters) {
62
- if (isDevMode() && (!isArray(_filters) || _filters.length === 0)) {
63
- 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`);
64
- }
65
- this.filterService.filters = _filters.map(filterExpression => {
66
- let clonedFilter = Object.assign({}, filterExpression);
67
- if (!clonedFilter.title) {
68
- clonedFilter.title = clonedFilter.field;
69
- }
70
- return clonedFilter;
71
- });
72
- }
73
- get filters() {
74
- return this.filterService.filters;
75
- }
76
- /**
77
- * Sets the initial `value` of the Filter component.
78
- */
79
- set value(value) {
80
- const clonedValue = JSON.parse(JSON.stringify(value));
81
- this.normalizeValue(clonedValue);
82
- this.filterService.value = clonedValue;
83
- }
84
- get value() {
85
- return this.filterService.value;
86
- }
87
- ngOnInit() {
88
- if (this.filters.length === 0) {
89
- 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`);
90
- }
91
- this.localizationSubscription = this.localization.changes.subscribe(({ rtl }) => {
92
- this.direction = rtl ? 'rtl' : 'ltr';
93
- this.cdr.detectChanges();
94
- });
95
- }
96
- ngOnDestroy() {
97
- if (this.localizationSubscription) {
98
- this.localizationSubscription.unsubscribe();
99
- }
100
- }
101
- /**
102
- * @hidden
103
- */
104
- getCurrentFilter() {
105
- return this.value;
106
- }
107
- /**
108
- * @hidden
109
- */
110
- onValueChange() {
111
- this.valueChange.emit(this.filterService.value);
112
- }
113
- normalizeFilter(filterDescriptor) {
114
- const foundFilter = this.filterService.filters.find((filter) => filter.field === filterDescriptor.field);
115
- if (isDevMode() && !foundFilter) {
116
- throw new Error(`There is no user-defined filter with '${filterDescriptor.field}' field provided through the [filters] input property.`);
117
- }
118
- if (isDevMode() && foundFilter.editor === 'boolean' && (!filterDescriptor.value && filterDescriptor.value !== false)) {
119
- console.warn(`Provide a value for the boolean '${filterDescriptor.field}' user-defined filter as the operator is always set to 'eq'.`);
120
- }
121
- if (filterDescriptor.operator && foundFilter.operators && !foundFilter.operators.some(operator => operator === filterDescriptor.operator)) {
122
- throw new Error(`The user-defined filter with field '${filterDescriptor.field}' is missing the '${filterDescriptor.operator}' operator.`);
123
- }
124
- if (foundFilter.editor === 'boolean') {
125
- filterDescriptor.operator = 'eq';
126
- }
127
- if (foundFilter.editor === 'date' && filterDescriptor.value) {
128
- filterDescriptor.value = new Date(filterDescriptor.value);
129
- }
130
- if (!filterDescriptor.value && filterDescriptor.value !== false) {
131
- filterDescriptor.value = null;
132
- }
133
- }
134
- normalizeValue(item) {
135
- item.filters.forEach((item) => {
136
- if (item.filters) {
137
- this.normalizeValue(item);
138
- }
139
- else {
140
- this.normalizeFilter(item);
141
- }
142
- });
143
- }
144
- };
145
- tslib_1.__decorate([
146
- HostBinding('attr.dir'),
147
- tslib_1.__metadata("design:type", String)
148
- ], FilterComponent.prototype, "direction", void 0);
149
- tslib_1.__decorate([
150
- Input(),
151
- tslib_1.__metadata("design:type", Array),
152
- tslib_1.__metadata("design:paramtypes", [Array])
153
- ], FilterComponent.prototype, "filters", null);
154
- tslib_1.__decorate([
155
- Input(),
156
- tslib_1.__metadata("design:type", Object),
157
- tslib_1.__metadata("design:paramtypes", [Object])
158
- ], FilterComponent.prototype, "value", null);
159
- tslib_1.__decorate([
160
- Output(),
161
- tslib_1.__metadata("design:type", EventEmitter)
162
- ], FilterComponent.prototype, "valueChange", void 0);
163
- FilterComponent = tslib_1.__decorate([
164
- Component({
165
- selector: 'kendo-filter',
166
- template: `
167
- <ng-container kendoFilterLocalizedMessages
168
- i18n-editorDateTodayText="kendo.filter.editorDateTodayText|The text of the Today button of the Date editor"
169
- editorDateTodayText="Today"
170
-
171
- i18n-editorDateToggleText="kendo.filter.editorDateToggleText|The title of the Toggle button of the Date editor."
172
- editorDateToggleText="Toggle calendar"
173
-
174
- i18n-editorNumericDecrement="kendo.filter.editorNumericDecrement|The title of the Decrement button of the Numeric editor"
175
- editorNumericDecrement="Decrement"
176
-
177
- i18n-editorNumericIncrement="kendo.filter.editorNumericIncrement|The title of the Increment button of the Numeric editor"
178
- editorNumericIncrement="Increment"
179
-
180
- i18n-filterExpressionOperators="kendo.filter.filterExpressionOperators|The text of the Filter Expression Operators drop down"
181
- filterExpressionOperators="Operators"
182
-
183
- i18n-filterExpressionFilters="kendo.filter.filterExpressionFilters|The text of the Filter Expression filters drop down"
184
- filterExpressionFilters="Fields"
185
-
186
- i18n-remove="kendo.filter.remove|The text of the Remove button"
187
- remove="Remove"
188
-
189
- i18n-addFilter="kendo.filter.addFilter|The text of the Add Filter button"
190
- addFilter="Add Filter"
191
-
192
- i18n-addGroup="kendo.filter.addGroup|The text of the Add Group button"
193
- addGroup="Add Group"
194
-
195
- i18n-filterAndLogic="kendo.filter.filterAndLogic|The text of the And filter logic"
196
- filterAndLogic="And"
197
-
198
- i18n-filterOrLogic="kendo.filter.filterOrLogic|The text of the Or filter logic"
199
- filterOrLogic="Or"
200
-
201
- i18n-filterEqOperator="kendo.filter.filterEqOperator|The text of the equal filter operator"
202
- filterEqOperator="Is equal to"
203
-
204
- i18n-filterNotEqOperator="kendo.filter.filterNotEqOperator|The text of the not equal filter operator"
205
- filterNotEqOperator="Is not equal to"
206
-
207
- i18n-filterIsNullOperator="kendo.filter.filterIsNullOperator|The text of the is null filter operator"
208
- filterIsNullOperator="Is null"
209
-
210
- i18n-filterIsNotNullOperator="kendo.filter.filterIsNotNullOperator|The text of the is not null filter operator"
211
- filterIsNotNullOperator="Is not null"
212
-
213
- i18n-filterIsEmptyOperator="kendo.filter.filterIsEmptyOperator|The text of the is empty filter operator"
214
- filterIsEmptyOperator="Is empty"
215
-
216
- i18n-filterIsNotEmptyOperator="kendo.filter.filterIsNotEmptyOperator|The text of the is not empty filter operator"
217
- filterIsNotEmptyOperator="Is not empty"
218
-
219
- i18n-filterStartsWithOperator="kendo.filter.filterStartsWithOperator|The text of the starts with filter operator"
220
- filterStartsWithOperator="Starts with"
221
-
222
- i18n-filterContainsOperator="kendo.filter.filterContainsOperator|The text of the contains filter operator"
223
- filterContainsOperator="Contains"
224
-
225
- i18n-filterNotContainsOperator="kendo.filter.filterNotContainsOperator|The text of the does not contain filter operator"
226
- filterNotContainsOperator="Does not contain"
227
-
228
- i18n-filterEndsWithOperator="kendo.filter.filterEndsWithOperator|The text of the ends with filter operator"
229
- filterEndsWithOperator="Ends with"
230
-
231
- i18n-filterGteOperator="kendo.filter.filterGteOperator|The text of the greater than or equal filter operator"
232
- filterGteOperator="Is greater than or equal to"
233
-
234
- i18n-filterGtOperator="kendo.filter.filterGtOperator|The text of the greater than filter operator"
235
- filterGtOperator="Is greater than"
236
-
237
- i18n-filterLteOperator="kendo.filter.filterLteOperator|The text of the less than or equal filter operator"
238
- filterLteOperator="Is less than or equal to"
239
-
240
- i18n-filterLtOperator="kendo.filter.filterLtOperator|The text of the less than filter operator"
241
- filterLtOperator="Is less than"
242
-
243
- i18n-filterIsTrue="kendo.filter.filterIsTrue|The text of the IsTrue boolean filter option"
244
- filterIsTrue="Is True"
245
-
246
- i18n-filterIsFalse="kendo.filter.filterIsFalse|The text of the IsFalse boolean filter option"
247
- filterIsFalse="Is False"
248
-
249
- i18n-filterBooleanAll="kendo.filter.filterBooleanAll|The text of the (All) boolean filter option"
250
- filterBooleanAll="(All)"
251
-
252
- i18n-filterAfterOrEqualOperator="kendo.filter.filterAfterOrEqualOperator|The text of the after or equal date filter operator"
253
- filterAfterOrEqualOperator="Is after or equal to"
254
-
255
- i18n-filterAfterOperator="kendo.filter.filterAfterOperator|The text of the after date filter operator"
256
- filterAfterOperator="Is after"
257
-
258
- i18n-filterBeforeOperator="kendo.filter.filterBeforeOperator|The text of the before date filter operator"
259
- filterBeforeOperator="Is before"
260
-
261
- i18n-filterBeforeOrEqualOperator="kendo.filter.filterBeforeOrEqualOperator|The text of the before or equal date filter operator"
262
- filterBeforeOrEqualOperator="Is before or equal to"
263
-
264
- i18n-filterFieldAriaLabel="kendo.filter.filterFieldAriaLabel|The text of the filter field aria label"
265
- filterFieldAriaLabel="field"
266
-
267
- i18n-filterOperatorAriaLabel="kendo.filter.filterOperatorAriaLabel|The text of the filter operator aria label"
268
- filterOperatorAriaLabel="operator"
269
-
270
- i18n-filterValueAriaLabel="kendo.filter.filterValueAriaLabel|The text of the filter value aria label"
271
- filterValueAriaLabel="value"
272
-
273
- i18n-filterAriaLabel="kendo.filter.filterAriaLabel|The text of the filter row aria label"
274
- filterAriaLabel="filter"
275
-
276
- i18n-filterToolbarAriaLabel="kendo.filter.filterToolbarAriaLabel|The text of the filter toolbar aria label"
277
- filterToolbarAriaLabel="filter settings"
278
- >
279
- </ng-container>
280
- <div class="k-widget k-filter" [attr.dir]="direction">
281
- <ul class='k-filter-container'>
282
- <li class='k-filter-group-main'>
283
- <kendo-filter-group
284
- [currentItem]="getCurrentFilter()"
285
- (valueChange)="onValueChange()"
286
- >
287
- </kendo-filter-group>
288
- </li>
289
- </ul>
290
- </div>
291
- `
292
- }),
293
- tslib_1.__metadata("design:paramtypes", [FilterService,
294
- LocalizationService,
295
- ChangeDetectorRef])
296
- ], FilterComponent);
297
- export { FilterComponent };
@@ -1,37 +0,0 @@
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
- /**
6
- * Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
7
- * definition for the Filter component.
8
- *
9
- * @example
10
- *
11
- * ```
12
- * // Import the Filter module
13
- * import { FilterModule } from '@progress/kendo-angular-filter';
14
- *
15
- * // The browser platform with a compiler
16
- * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
17
- *
18
- * import { NgModule } from '@angular/core';
19
- *
20
- * // Import the app component
21
- * import { AppComponent } from './app.component';
22
- *
23
- * // Define the app module
24
- * _@NgModule({
25
- * declarations: [AppComponent], // declare app component
26
- * imports: [BrowserModule, FilterModule], // import Filter module
27
- * bootstrap: [AppComponent]
28
- * })
29
- * export class AppModule { }
30
- *
31
- * // Compile and launch the module
32
- * platformBrowserDynamic().bootstrapModule(AppModule);
33
- *
34
- * ```
35
- */
36
- export declare class FilterModule {
37
- }
@@ -1,88 +0,0 @@
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 tslib_1 from "tslib";
6
- import { NgModule } from '@angular/core';
7
- import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
8
- import { AriaLabelValueDirective } from './aria-label.directive';
9
- import { FilterBooleanEditorComponent } from './editors/boolean-editor.component';
10
- import { FilterDateEditorComponent } from './editors/date-editor.component';
11
- import { FilterNumericEditorComponent } from './editors/numeric-editor.component';
12
- import { FilterTextEditorComponent } from './editors/text-editor.component';
13
- import { FilterExpressionOperatorsComponent } from './filter-expression-operators.component';
14
- import { FilterExpressionComponent } from './filter-expression.component';
15
- import { FilterGroupComponent } from './filter-group.component';
16
- import { FilterComponent } from './filter.component';
17
- import { CustomMessagesComponent } from './localization/custom-messages.component';
18
- import { LocalizedMessagesDirective } from './localization/localized-messages.directive';
19
- import { SharedModule } from './shared.module';
20
- /**
21
- * Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
22
- * definition for the Filter component.
23
- *
24
- * @example
25
- *
26
- * ```
27
- * // Import the Filter module
28
- * import { FilterModule } from '@progress/kendo-angular-filter';
29
- *
30
- * // The browser platform with a compiler
31
- * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
32
- *
33
- * import { NgModule } from '@angular/core';
34
- *
35
- * // Import the app component
36
- * import { AppComponent } from './app.component';
37
- *
38
- * // Define the app module
39
- * _@NgModule({
40
- * declarations: [AppComponent], // declare app component
41
- * imports: [BrowserModule, FilterModule], // import Filter module
42
- * bootstrap: [AppComponent]
43
- * })
44
- * export class AppModule { }
45
- *
46
- * // Compile and launch the module
47
- * platformBrowserDynamic().bootstrapModule(AppModule);
48
- *
49
- * ```
50
- */
51
- let FilterModule = class FilterModule {
52
- };
53
- FilterModule = tslib_1.__decorate([
54
- NgModule({
55
- imports: [SharedModule],
56
- declarations: [FilterComponent,
57
- FilterNumericEditorComponent,
58
- FilterTextEditorComponent,
59
- FilterExpressionComponent,
60
- FilterGroupComponent,
61
- FilterExpressionOperatorsComponent,
62
- FilterBooleanEditorComponent,
63
- FilterDateEditorComponent,
64
- LocalizedMessagesDirective,
65
- CustomMessagesComponent,
66
- AriaLabelValueDirective
67
- ],
68
- exports: [FilterComponent,
69
- FilterNumericEditorComponent,
70
- FilterTextEditorComponent,
71
- FilterExpressionComponent,
72
- FilterGroupComponent,
73
- FilterExpressionOperatorsComponent,
74
- FilterBooleanEditorComponent,
75
- FilterDateEditorComponent,
76
- LocalizedMessagesDirective,
77
- CustomMessagesComponent,
78
- AriaLabelValueDirective],
79
- providers: [
80
- LocalizationService,
81
- {
82
- provide: L10N_PREFIX,
83
- useValue: 'kendo.filter'
84
- }
85
- ]
86
- })
87
- ], FilterModule);
88
- export { FilterModule };
@@ -1,17 +0,0 @@
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 { CompositeFilterDescriptor, FilterDescriptor } from '@progress/kendo-data-query';
6
- import { FilterExpression } from './model/filter-expression';
7
- /**
8
- * @hidden
9
- */
10
- export declare class FilterService {
11
- value: CompositeFilterDescriptor;
12
- filters: FilterExpression[];
13
- isEditorDisabled: boolean;
14
- addFilterGroup(item: CompositeFilterDescriptor): void;
15
- addFilterExpression(item: CompositeFilterDescriptor): void;
16
- remove(item: CompositeFilterDescriptor | FilterDescriptor, positionIndex: number, parentItem?: CompositeFilterDescriptor): void;
17
- }
@@ -1,46 +0,0 @@
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 tslib_1 from "tslib";
6
- import { Injectable } from '@angular/core';
7
- /**
8
- * @hidden
9
- */
10
- let FilterService = class FilterService {
11
- /**
12
- * @hidden
13
- */
14
- constructor() {
15
- this.value = { filters: [], logic: 'or' };
16
- this.filters = [];
17
- this.isEditorDisabled = false;
18
- }
19
- addFilterGroup(item) {
20
- let filterGroup = { logic: 'or', filters: [] };
21
- item.filters.push(filterGroup);
22
- }
23
- addFilterExpression(item) {
24
- let filterExpression = { operator: 'eq', value: null, field: null };
25
- item.filters.push(filterExpression);
26
- }
27
- remove(item, positionIndex, parentItem) {
28
- if (!parentItem) {
29
- parentItem = this.value;
30
- }
31
- if (item === parentItem) {
32
- parentItem.filters = [];
33
- return;
34
- }
35
- let index = parentItem.filters.indexOf(item);
36
- if (index >= 0 && index === positionIndex) {
37
- parentItem.filters = parentItem.filters.filter((i) => i !== item);
38
- return;
39
- }
40
- parentItem.filters.forEach((filter) => filter.filters && this.remove(item, positionIndex, filter));
41
- }
42
- };
43
- FilterService = tslib_1.__decorate([
44
- Injectable()
45
- ], FilterService);
46
- export { FilterService };
@@ -1,21 +0,0 @@
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
- /**
6
- * Generated bundle index. Do not edit.
7
- */
8
- export * from './main';
9
- export { AriaLabelValueDirective } from './aria-label.directive';
10
- export { FilterBooleanEditorComponent } from './editors/boolean-editor.component';
11
- export { FilterDateEditorComponent } from './editors/date-editor.component';
12
- export { FilterNumericEditorComponent } from './editors/numeric-editor.component';
13
- export { FilterTextEditorComponent } from './editors/text-editor.component';
14
- export { FilterExpressionOperatorsComponent } from './filter-expression-operators.component';
15
- export { FilterExpressionComponent } from './filter-expression.component';
16
- export { FilterGroupComponent } from './filter-group.component';
17
- export { FilterService } from './filter.service';
18
- export { CustomMessagesComponent } from './localization/custom-messages.component';
19
- export { LocalizedMessagesDirective } from './localization/localized-messages.directive';
20
- export { Messages } from './localization/messages';
21
- export { SharedModule } from './shared.module';
@@ -1,21 +0,0 @@
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
- /**
6
- * Generated bundle index. Do not edit.
7
- */
8
- export * from './main';
9
- export { AriaLabelValueDirective } from './aria-label.directive';
10
- export { FilterBooleanEditorComponent } from './editors/boolean-editor.component';
11
- export { FilterDateEditorComponent } from './editors/date-editor.component';
12
- export { FilterNumericEditorComponent } from './editors/numeric-editor.component';
13
- export { FilterTextEditorComponent } from './editors/text-editor.component';
14
- export { FilterExpressionOperatorsComponent } from './filter-expression-operators.component';
15
- export { FilterExpressionComponent } from './filter-expression.component';
16
- export { FilterGroupComponent } from './filter-group.component';
17
- export { FilterService } from './filter.service';
18
- export { CustomMessagesComponent } from './localization/custom-messages.component';
19
- export { LocalizedMessagesDirective } from './localization/localized-messages.directive';
20
- export { Messages } from './localization/messages';
21
- export { SharedModule } from './shared.module';