@progress/kendo-angular-filter 21.4.1-develop.1 → 22.0.0-develop.1

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 (30) hide show
  1. package/base-filter-row.component.d.ts +1 -1
  2. package/fesm2022/progress-kendo-angular-filter.mjs +61 -61
  3. package/localization/messages.d.ts +1 -1
  4. package/package.json +16 -24
  5. package/schematics/ngAdd/index.js +4 -4
  6. package/esm2022/aria-label.directive.mjs +0 -34
  7. package/esm2022/base-filter-row.component.mjs +0 -75
  8. package/esm2022/directives.mjs +0 -17
  9. package/esm2022/editors/boolean-editor.component.mjs +0 -97
  10. package/esm2022/editors/date-editor.component.mjs +0 -75
  11. package/esm2022/editors/numeric-editor.component.mjs +0 -75
  12. package/esm2022/editors/text-editor.component.mjs +0 -62
  13. package/esm2022/error-messages.mjs +0 -16
  14. package/esm2022/filter-expression-operators.component.mjs +0 -90
  15. package/esm2022/filter-expression.component.mjs +0 -352
  16. package/esm2022/filter-field.component.mjs +0 -109
  17. package/esm2022/filter-group.component.mjs +0 -303
  18. package/esm2022/filter.component.mjs +0 -611
  19. package/esm2022/filter.module.mjs +0 -105
  20. package/esm2022/filter.service.mjs +0 -41
  21. package/esm2022/index.mjs +0 -19
  22. package/esm2022/localization/custom-messages.component.mjs +0 -44
  23. package/esm2022/localization/localized-messages.directive.mjs +0 -39
  24. package/esm2022/localization/messages.mjs +0 -243
  25. package/esm2022/model/filter-expression.mjs +0 -8
  26. package/esm2022/navigation.service.mjs +0 -162
  27. package/esm2022/package-metadata.mjs +0 -16
  28. package/esm2022/progress-kendo-angular-filter.mjs +0 -8
  29. package/esm2022/templates/value-editor.template.mjs +0 -32
  30. package/esm2022/util.mjs +0 -174
@@ -1,105 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { NgModule } from '@angular/core';
6
- import { KENDO_FILTER } from './directives';
7
- import { IconsService } from '@progress/kendo-angular-icons';
8
- import { PopupService } from '@progress/kendo-angular-popup';
9
- import { ResizeBatchService } from '@progress/kendo-angular-common';
10
- import { DialogContainerService, DialogService, NavigationService, WindowContainerService, WindowService, } from '@progress/kendo-angular-dialog';
11
- import { CalendarDOMService, CenturyViewService, DecadeViewService, MonthViewService, YearViewService, TimePickerDOMService, HoursService, MinutesService, SecondsService, MillisecondsService, DayPeriodService, } from '@progress/kendo-angular-dateinputs';
12
- import * as i0 from "@angular/core";
13
- import * as i1 from "./filter.component";
14
- import * as i2 from "./filter-field.component";
15
- import * as i3 from "./localization/custom-messages.component";
16
- import * as i4 from "./templates/value-editor.template";
17
- // IMPORTANT: NgModule export kept for backwards compatibility
18
- /**
19
- * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
20
- * definition for the Filter component.
21
- *
22
- * @example
23
- *
24
- * ```ts
25
- * // Import the Filter module
26
- * import { FilterModule } from '@progress/kendo-angular-filter';
27
- *
28
- * // The browser platform with a compiler
29
- * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
30
- *
31
- * import { NgModule } from '@angular/core';
32
- *
33
- * // Import the app component
34
- * import { AppComponent } from './app.component';
35
- *
36
- * // Define the app module
37
- * _@NgModule({
38
- * declarations: [AppComponent], // declare app component
39
- * imports: [BrowserModule, FilterModule], // import Filter module
40
- * bootstrap: [AppComponent]
41
- * })
42
- * export class AppModule { }
43
- *
44
- * // Compile and launch the module
45
- * platformBrowserDynamic().bootstrapModule(AppModule);
46
- *
47
- * ```
48
- */
49
- export class FilterModule {
50
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FilterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
51
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: FilterModule, imports: [i1.FilterComponent, i2.FilterFieldComponent, i3.CustomMessagesComponent, i4.FilterValueEditorTemplateDirective], exports: [i1.FilterComponent, i2.FilterFieldComponent, i3.CustomMessagesComponent, i4.FilterValueEditorTemplateDirective] });
52
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FilterModule, providers: [
53
- // InputsModule providers
54
- IconsService,
55
- PopupService,
56
- ResizeBatchService,
57
- DialogContainerService,
58
- DialogService,
59
- WindowService,
60
- WindowContainerService,
61
- // DateInputsModule providers
62
- CalendarDOMService,
63
- CenturyViewService,
64
- DecadeViewService,
65
- MonthViewService,
66
- YearViewService,
67
- NavigationService,
68
- TimePickerDOMService,
69
- HoursService,
70
- MinutesService,
71
- SecondsService,
72
- MillisecondsService,
73
- DayPeriodService
74
- ], imports: [i1.FilterComponent] });
75
- }
76
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FilterModule, decorators: [{
77
- type: NgModule,
78
- args: [{
79
- imports: [...KENDO_FILTER],
80
- exports: [...KENDO_FILTER],
81
- providers: [
82
- // InputsModule providers
83
- IconsService,
84
- PopupService,
85
- ResizeBatchService,
86
- DialogContainerService,
87
- DialogService,
88
- WindowService,
89
- WindowContainerService,
90
- // DateInputsModule providers
91
- CalendarDOMService,
92
- CenturyViewService,
93
- DecadeViewService,
94
- MonthViewService,
95
- YearViewService,
96
- NavigationService,
97
- TimePickerDOMService,
98
- HoursService,
99
- MinutesService,
100
- SecondsService,
101
- MillisecondsService,
102
- DayPeriodService
103
- ],
104
- }]
105
- }] });
@@ -1,41 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Injectable } from '@angular/core';
6
- import * as i0 from "@angular/core";
7
- /**
8
- * @hidden
9
- */
10
- export class FilterService {
11
- normalizedValue = { logic: 'and', filters: [] };
12
- filters = [];
13
- addFilterGroup(item) {
14
- const filterGroup = { logic: 'and', filters: [] };
15
- item.filters.push(filterGroup);
16
- }
17
- addFilterExpression(item) {
18
- const filterExpression = { operator: 'eq', value: null, field: null };
19
- item.filters.push(filterExpression);
20
- }
21
- remove(item, positionIndex, parentItem) {
22
- if (!parentItem) {
23
- parentItem = this.normalizedValue;
24
- }
25
- if (item === parentItem) {
26
- parentItem.filters = [];
27
- return;
28
- }
29
- const index = parentItem.filters.indexOf(item);
30
- if (index >= 0 && index === positionIndex) {
31
- parentItem.filters = parentItem.filters.filter((i) => i !== item);
32
- return;
33
- }
34
- parentItem.filters.forEach((filter) => filter.filters && this.remove(item, positionIndex, filter));
35
- }
36
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FilterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
37
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FilterService });
38
- }
39
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FilterService, decorators: [{
40
- type: Injectable
41
- }] });
package/esm2022/index.mjs DELETED
@@ -1,19 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export { FilterComponent } from './filter.component';
6
- export { FilterGroupComponent } from './filter-group.component';
7
- export { FilterModule } from './filter.module';
8
- export { AriaLabelValueDirective } from './aria-label.directive';
9
- export { FilterBooleanEditorComponent } from './editors/boolean-editor.component';
10
- export { FilterDateEditorComponent } from './editors/date-editor.component';
11
- export { FilterNumericEditorComponent } from './editors/numeric-editor.component';
12
- export { FilterTextEditorComponent } from './editors/text-editor.component';
13
- export { FilterExpressionOperatorsComponent } from './filter-expression-operators.component';
14
- export { FilterExpressionComponent } from './filter-expression.component';
15
- export { CustomMessagesComponent } from './localization/custom-messages.component';
16
- export { LocalizedMessagesDirective } from './localization/localized-messages.directive';
17
- export { FilterFieldComponent } from './filter-field.component';
18
- export { FilterValueEditorTemplateDirective } from './templates/value-editor.template';
19
- export * from './directives';
@@ -1,44 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Component, forwardRef } from '@angular/core';
6
- import { LocalizationService } from '@progress/kendo-angular-l10n';
7
- import { Messages } from './messages';
8
- import * as i0 from "@angular/core";
9
- import * as i1 from "@progress/kendo-angular-l10n";
10
- /**
11
- * Custom component messages that override the default component messages.
12
- * For usage examples, see the [Internationalization guide](slug:globalization_filter#toc-internationalization).
13
- */
14
- export class CustomMessagesComponent extends Messages {
15
- service;
16
- constructor(service) {
17
- super();
18
- this.service = service;
19
- }
20
- get override() {
21
- return true;
22
- }
23
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
24
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: CustomMessagesComponent, isStandalone: true, selector: "kendo-filter-messages", providers: [
25
- {
26
- provide: Messages,
27
- useExisting: forwardRef(() => CustomMessagesComponent)
28
- }
29
- ], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
30
- }
31
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CustomMessagesComponent, decorators: [{
32
- type: Component,
33
- args: [{
34
- providers: [
35
- {
36
- provide: Messages,
37
- useExisting: forwardRef(() => CustomMessagesComponent)
38
- }
39
- ],
40
- selector: 'kendo-filter-messages',
41
- template: ``,
42
- standalone: true
43
- }]
44
- }], ctorParameters: () => [{ type: i1.LocalizationService }] });
@@ -1,39 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Directive, forwardRef } from '@angular/core';
6
- import { LocalizationService } from '@progress/kendo-angular-l10n';
7
- import { Messages } from './messages';
8
- import * as i0 from "@angular/core";
9
- import * as i1 from "@progress/kendo-angular-l10n";
10
- /**
11
- * @hidden
12
- */
13
- export class LocalizedMessagesDirective extends Messages {
14
- service;
15
- constructor(service) {
16
- super();
17
- this.service = service;
18
- }
19
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
20
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: LocalizedMessagesDirective, isStandalone: true, selector: "[kendoFilterLocalizedMessages]", providers: [
21
- {
22
- provide: Messages,
23
- useExisting: forwardRef(() => LocalizedMessagesDirective)
24
- }
25
- ], usesInheritance: true, ngImport: i0 });
26
- }
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
28
- type: Directive,
29
- args: [{
30
- providers: [
31
- {
32
- provide: Messages,
33
- useExisting: forwardRef(() => LocalizedMessagesDirective)
34
- }
35
- ],
36
- selector: '[kendoFilterLocalizedMessages]',
37
- standalone: true
38
- }]
39
- }], ctorParameters: () => [{ type: i1.LocalizationService }] });
@@ -1,243 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Directive } from '@angular/core';
6
- import { Input } from '@angular/core';
7
- import { ComponentMessages } from '@progress/kendo-angular-l10n';
8
- import * as i0 from "@angular/core";
9
- /**
10
- * @hidden
11
- */
12
- export class Messages extends ComponentMessages {
13
- /**
14
- * The text of the Filter Expression `operators` drop down title.
15
- */
16
- filterExpressionOperators;
17
- /**
18
- * The text of the Filter Expression 'fields' drop down title.
19
- */
20
- filterExpressionFilters;
21
- /**
22
- * The text of the `Remove` button.
23
- */
24
- remove;
25
- /**
26
- * The text of the Filter Group `Add Group` button.
27
- */
28
- addGroup;
29
- /**
30
- * The text of the Filter Group `Add Filter` button.
31
- */
32
- addFilter;
33
- /**
34
- * The text of the `And` Filter Group logic.
35
- */
36
- filterAndLogic;
37
- /**
38
- * The text of the `Or` Filter Group logic.
39
- */
40
- filterOrLogic;
41
- /**
42
- * The text of the `Equal` (**Is equal to**) Filter Expression operator.
43
- */
44
- filterEqOperator;
45
- /**
46
- * The text of the `NotEqual` (**Is not equal to**) Filter Expression operator.
47
- */
48
- filterNotEqOperator;
49
- /**
50
- * The text of the `IsNull` (**Is null**) Filter Expression operator.
51
- */
52
- filterIsNullOperator;
53
- /**
54
- * The text of the `IsNotNull` (**Is not null**) Filter Expression operator.
55
- */
56
- filterIsNotNullOperator;
57
- /**
58
- * The text of the `IsEmpty` (**Is empty**) Filter Expression operator.
59
- */
60
- filterIsEmptyOperator;
61
- /**
62
- * The text of the `IsNotEmpty` (**Is not empty**) Filter Expression operator.
63
- */
64
- filterIsNotEmptyOperator;
65
- /**
66
- * The text of the `StartsWith` (**Starts with**) Filter Expression operator.
67
- */
68
- filterStartsWithOperator;
69
- /**
70
- * The text of the `Contains` (**Contains**) Filter Expression operator.
71
- */
72
- filterContainsOperator;
73
- /**
74
- * The text of the `DoesNotContain` (**Does not contain**) Filter Expression operator.
75
- */
76
- filterNotContainsOperator;
77
- /**
78
- * The text of the `EndsWith` (**Ends with**) string Filter Expression operator.
79
- */
80
- filterEndsWithOperator;
81
- /**
82
- * The text of the `GreaterOrEqualTo` (**Is greater than or equal to**) numeric Filter Expression operator.
83
- */
84
- filterGteOperator;
85
- /**
86
- * The text of the `Greater` (**Is greater than**) numeric Filter Expression operator.
87
- */
88
- filterGtOperator;
89
- /**
90
- * The text of the `LessOrEqualTo` (**Is less than or equal to**) numeric Filter Expression operator.
91
- */
92
- filterLteOperator;
93
- /**
94
- * The text of the `Less` (**Is less than**) numeric Filter Expression operator.
95
- */
96
- filterLtOperator;
97
- /**
98
- * The text of the `IsTrue` boolean Filter Expression option.
99
- */
100
- filterIsTrue;
101
- /**
102
- * The text of the `IsFalse` boolean Filter Expression option.
103
- */
104
- filterIsFalse;
105
- /**
106
- * The text of the `(All)` boolean Filter Expression option.
107
- */
108
- filterBooleanAll;
109
- /**
110
- * The text of the `AfterOrEqualTo` (**Is after or equal to**) date Filter Expression operator.
111
- */
112
- filterAfterOrEqualOperator;
113
- /**
114
- * The text of the `After` (**Is after**) date Filter Expression operator.
115
- */
116
- filterAfterOperator;
117
- /**
118
- * The text of the `Before` (**Is before**) date Filter Expression operator.
119
- */
120
- filterBeforeOperator;
121
- /**
122
- * The text of the `BeforeOrEqualTo` (**Is before or equal to**) date Filter Expression operator.
123
- */
124
- filterBeforeOrEqualOperator;
125
- /**
126
- * The title of the Decrement button of the Filter Expression numeric editor.
127
- */
128
- editorNumericDecrement;
129
- /**
130
- * The title of the Increment button of the Filter Expression numeric editor.
131
- */
132
- editorNumericIncrement;
133
- /**
134
- * The text of the Today button of the Filter Expression date editor.
135
- */
136
- editorDateTodayText;
137
- /**
138
- * The title of the Toggle button of the Filter Expression date editor.
139
- */
140
- editorDateToggleText;
141
- /**
142
- * The text of the filter field aria label.
143
- */
144
- filterFieldAriaLabel;
145
- /**
146
- * The text of the filter operator aria label.
147
- */
148
- filterOperatorAriaLabel;
149
- /**
150
- * The text of the filter value aria label.
151
- */
152
- filterValueAriaLabel;
153
- /**
154
- * The text of the filter row aria label.
155
- */
156
- filterToolbarAriaLabel;
157
- /**
158
- * The text of the filter toolbar aria label.
159
- */
160
- filterComponentAriaLabel;
161
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
162
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: Messages, selector: "[kendoFilterMessages]", inputs: { filterExpressionOperators: "filterExpressionOperators", filterExpressionFilters: "filterExpressionFilters", remove: "remove", addGroup: "addGroup", addFilter: "addFilter", filterAndLogic: "filterAndLogic", filterOrLogic: "filterOrLogic", filterEqOperator: "filterEqOperator", filterNotEqOperator: "filterNotEqOperator", filterIsNullOperator: "filterIsNullOperator", filterIsNotNullOperator: "filterIsNotNullOperator", filterIsEmptyOperator: "filterIsEmptyOperator", filterIsNotEmptyOperator: "filterIsNotEmptyOperator", filterStartsWithOperator: "filterStartsWithOperator", filterContainsOperator: "filterContainsOperator", filterNotContainsOperator: "filterNotContainsOperator", filterEndsWithOperator: "filterEndsWithOperator", filterGteOperator: "filterGteOperator", filterGtOperator: "filterGtOperator", filterLteOperator: "filterLteOperator", filterLtOperator: "filterLtOperator", filterIsTrue: "filterIsTrue", filterIsFalse: "filterIsFalse", filterBooleanAll: "filterBooleanAll", filterAfterOrEqualOperator: "filterAfterOrEqualOperator", filterAfterOperator: "filterAfterOperator", filterBeforeOperator: "filterBeforeOperator", filterBeforeOrEqualOperator: "filterBeforeOrEqualOperator", editorNumericDecrement: "editorNumericDecrement", editorNumericIncrement: "editorNumericIncrement", editorDateTodayText: "editorDateTodayText", editorDateToggleText: "editorDateToggleText", filterFieldAriaLabel: "filterFieldAriaLabel", filterOperatorAriaLabel: "filterOperatorAriaLabel", filterValueAriaLabel: "filterValueAriaLabel", filterToolbarAriaLabel: "filterToolbarAriaLabel", filterComponentAriaLabel: "filterComponentAriaLabel" }, usesInheritance: true, ngImport: i0 });
163
- }
164
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: Messages, decorators: [{
165
- type: Directive,
166
- args: [{
167
- selector: '[kendoFilterMessages]'
168
- }]
169
- }], propDecorators: { filterExpressionOperators: [{
170
- type: Input
171
- }], filterExpressionFilters: [{
172
- type: Input
173
- }], remove: [{
174
- type: Input
175
- }], addGroup: [{
176
- type: Input
177
- }], addFilter: [{
178
- type: Input
179
- }], filterAndLogic: [{
180
- type: Input
181
- }], filterOrLogic: [{
182
- type: Input
183
- }], filterEqOperator: [{
184
- type: Input
185
- }], filterNotEqOperator: [{
186
- type: Input
187
- }], filterIsNullOperator: [{
188
- type: Input
189
- }], filterIsNotNullOperator: [{
190
- type: Input
191
- }], filterIsEmptyOperator: [{
192
- type: Input
193
- }], filterIsNotEmptyOperator: [{
194
- type: Input
195
- }], filterStartsWithOperator: [{
196
- type: Input
197
- }], filterContainsOperator: [{
198
- type: Input
199
- }], filterNotContainsOperator: [{
200
- type: Input
201
- }], filterEndsWithOperator: [{
202
- type: Input
203
- }], filterGteOperator: [{
204
- type: Input
205
- }], filterGtOperator: [{
206
- type: Input
207
- }], filterLteOperator: [{
208
- type: Input
209
- }], filterLtOperator: [{
210
- type: Input
211
- }], filterIsTrue: [{
212
- type: Input
213
- }], filterIsFalse: [{
214
- type: Input
215
- }], filterBooleanAll: [{
216
- type: Input
217
- }], filterAfterOrEqualOperator: [{
218
- type: Input
219
- }], filterAfterOperator: [{
220
- type: Input
221
- }], filterBeforeOperator: [{
222
- type: Input
223
- }], filterBeforeOrEqualOperator: [{
224
- type: Input
225
- }], editorNumericDecrement: [{
226
- type: Input
227
- }], editorNumericIncrement: [{
228
- type: Input
229
- }], editorDateTodayText: [{
230
- type: Input
231
- }], editorDateToggleText: [{
232
- type: Input
233
- }], filterFieldAriaLabel: [{
234
- type: Input
235
- }], filterOperatorAriaLabel: [{
236
- type: Input
237
- }], filterValueAriaLabel: [{
238
- type: Input
239
- }], filterToolbarAriaLabel: [{
240
- type: Input
241
- }], filterComponentAriaLabel: [{
242
- type: Input
243
- }] } });
@@ -1,8 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 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 FilterOperator type.
7
- */
8
- export {};
@@ -1,162 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { ChangeDetectorRef, Injectable, Renderer2 } from '@angular/core';
6
- import { Keys } from '@progress/kendo-angular-common';
7
- import { selectors } from './util';
8
- import * as i0 from "@angular/core";
9
- /**
10
- * @hidden
11
- */
12
- export class NavigationService {
13
- cdr;
14
- renderer;
15
- hierarchicalFilterItems = [];
16
- flattenFilterItems = [];
17
- currentToolbarItemIndex = 0;
18
- currentToolbarItemChildrenIndex = 0;
19
- isFilterNavigationActivated = true;
20
- isFilterExpressionComponentFocused = false;
21
- currentlyFocusedElement;
22
- constructor(cdr, renderer) {
23
- this.cdr = cdr;
24
- this.renderer = renderer;
25
- }
26
- processKeyDown(key, event) {
27
- switch (key) {
28
- case Keys.ArrowUp: {
29
- event.preventDefault();
30
- if (!this.isFilterExpressionComponentFocused) {
31
- this.currentToolbarItemChildrenIndex = 0;
32
- if (this.currentToolbarItemIndex > 0) {
33
- this.currentToolbarItemIndex--;
34
- }
35
- const elementToFocus = this.flattenFilterItems[this.currentToolbarItemIndex].focusableChildren[0];
36
- this.focusCurrentElement(elementToFocus);
37
- }
38
- break;
39
- }
40
- case Keys.ArrowDown: {
41
- event.preventDefault();
42
- if (!this.isFilterExpressionComponentFocused) {
43
- this.currentToolbarItemChildrenIndex = 0;
44
- if (this.currentToolbarItemIndex < this.flattenFilterItems.length - 1) {
45
- this.currentToolbarItemIndex++;
46
- }
47
- const elementToFocus = this.flattenFilterItems[this.currentToolbarItemIndex].focusableChildren[0];
48
- this.focusCurrentElement(elementToFocus);
49
- }
50
- break;
51
- }
52
- case Keys.NumpadEnter:
53
- case Keys.Enter: {
54
- const isEventTargetKendoFilterToolbarItem = event.target.closest(selectors.kendoFilterToolbarItem);
55
- const isEventTargetButton = event.target.closest(selectors.kendoButton);
56
- if (this.isFilterNavigationActivated &&
57
- !this.isFilterExpressionComponentFocused &&
58
- isEventTargetKendoFilterToolbarItem &&
59
- !isEventTargetButton) {
60
- event.preventDefault();
61
- this.isFilterExpressionComponentFocused = true;
62
- const focusableElement = this.flattenFilterItems[this.currentToolbarItemIndex].focusableChildren[this.currentToolbarItemChildrenIndex];
63
- const elementToFocus = focusableElement.querySelector(selectors.KendoDropDownListComponent) ||
64
- focusableElement.querySelector(selectors.kendoInputInner) ||
65
- focusableElement.querySelector(selectors.inputElement) ||
66
- focusableElement.querySelector(selectors.textAreaElement);
67
- this.focusCurrentElement(elementToFocus);
68
- }
69
- break;
70
- }
71
- case Keys.Escape: {
72
- if (this.isFilterExpressionComponentFocused) {
73
- event.preventDefault();
74
- this.isFilterExpressionComponentFocused = false;
75
- const elementToFocus = this.flattenFilterItems[this.currentToolbarItemIndex].focusableChildren[this.currentToolbarItemChildrenIndex];
76
- this.focusCurrentElement(elementToFocus);
77
- }
78
- break;
79
- }
80
- case Keys.ArrowRight: {
81
- if (this.isFilterNavigationActivated && !this.isFilterExpressionComponentFocused) {
82
- event.preventDefault();
83
- if (this.currentToolbarItemChildrenIndex < this.flattenFilterItems[this.currentToolbarItemIndex].focusableChildren.length - 1) {
84
- this.currentToolbarItemChildrenIndex++;
85
- }
86
- const elementToFocus = this.flattenFilterItems[this.currentToolbarItemIndex].focusableChildren[this.currentToolbarItemChildrenIndex];
87
- this.focusCurrentElement(elementToFocus);
88
- }
89
- break;
90
- }
91
- case Keys.ArrowLeft: {
92
- if (this.isFilterNavigationActivated && !this.isFilterExpressionComponentFocused) {
93
- event.preventDefault();
94
- if (this.currentToolbarItemChildrenIndex > 0) {
95
- this.currentToolbarItemChildrenIndex--;
96
- }
97
- const elementToFocus = this.flattenFilterItems[this.currentToolbarItemIndex].focusableChildren[this.currentToolbarItemChildrenIndex];
98
- this.focusCurrentElement(elementToFocus);
99
- }
100
- break;
101
- }
102
- default:
103
- break;
104
- }
105
- }
106
- focusCurrentElement(element, isOnMouseDown) {
107
- this.renderer.setAttribute(this.currentlyFocusedElement, 'tabindex', '-1');
108
- this.currentlyFocusedElement = element;
109
- if (element) {
110
- this.renderer.setAttribute(this.currentlyFocusedElement, 'tabindex', '0');
111
- if (!isOnMouseDown) {
112
- this.currentlyFocusedElement.focus();
113
- }
114
- }
115
- }
116
- flattenHierarchicalFilterItems(filterItems) {
117
- filterItems.forEach((filterRow) => {
118
- const flattenItem = { component: filterRow, isGroup: false, toolbarElement: filterRow.toolbarElement, focusableChildren: [] };
119
- this.flattenFilterItems.push(flattenItem);
120
- if ((filterRow['operators'] && filterRow['filterItems']?.length > 0)) {
121
- this.setGroupItemChildren(flattenItem, filterRow);
122
- this.flattenHierarchicalFilterItems(filterRow['filterItems']);
123
- }
124
- else if (filterRow['operators'] && filterRow['filterItems']?.length === 0) {
125
- this.setGroupItemChildren(flattenItem, filterRow);
126
- }
127
- else {
128
- flattenItem.focusableChildren.push(filterRow.toolbarElement.querySelector(selectors.filterFieldWrapper));
129
- if (filterRow.toolbarElement.querySelector('.k-filter-operator')) {
130
- flattenItem.focusableChildren.push(filterRow.toolbarElement.querySelector(selectors.filterOperatorWrapper));
131
- }
132
- flattenItem.focusableChildren.push(filterRow.toolbarElement.querySelector(selectors.filterValueEditorWrapper));
133
- flattenItem.focusableChildren.push(filterRow.toolbarElement.querySelector(selectors.removeButton));
134
- }
135
- });
136
- }
137
- setGroupItemChildren(flattenItem, filterRow) {
138
- flattenItem.isGroup = true;
139
- flattenItem.focusableChildren.push(filterRow.toolbarElement.querySelector(selectors.andButton));
140
- flattenItem.focusableChildren.push(filterRow.toolbarElement.querySelector(selectors.orButton));
141
- flattenItem.focusableChildren.push(filterRow.toolbarElement.querySelector(selectors.addFilterButton));
142
- flattenItem.focusableChildren.push(filterRow.toolbarElement.querySelector(selectors.addGroupButton));
143
- flattenItem.focusableChildren.push(filterRow.toolbarElement.querySelector(selectors.removeButton));
144
- }
145
- setItemIndexes() {
146
- this.flattenFilterItems.forEach((item, index) => {
147
- item.component['itemNumber'] = index;
148
- });
149
- this.cdr.detectChanges();
150
- }
151
- reset(items) {
152
- this.flattenFilterItems = [];
153
- this.hierarchicalFilterItems = items;
154
- this.flattenHierarchicalFilterItems(items);
155
- this.setItemIndexes();
156
- }
157
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NavigationService, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Injectable });
158
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NavigationService });
159
- }
160
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NavigationService, decorators: [{
161
- type: Injectable
162
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }] });