@progress/kendo-angular-filter 2.2.3-dev.202210120943 → 2.3.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 (33) hide show
  1. package/aria-label.directive.d.ts +1 -1
  2. package/base-filter-row.component.d.ts +28 -0
  3. package/bundles/kendo-angular-filter.umd.js +1 -1
  4. package/editors/boolean-editor.component.d.ts +1 -0
  5. package/editors/date-editor.component.d.ts +1 -0
  6. package/editors/numeric-editor.component.d.ts +1 -0
  7. package/editors/text-editor.component.d.ts +1 -0
  8. package/error-messages.d.ts +8 -0
  9. package/esm2015/aria-label.directive.js +2 -2
  10. package/esm2015/base-filter-row.component.js +69 -0
  11. package/esm2015/editors/boolean-editor.component.js +10 -4
  12. package/esm2015/editors/date-editor.component.js +10 -4
  13. package/esm2015/editors/numeric-editor.component.js +10 -4
  14. package/esm2015/editors/text-editor.component.js +10 -4
  15. package/esm2015/error-messages.js +16 -0
  16. package/esm2015/filter-expression-operators.component.js +2 -0
  17. package/esm2015/filter-expression.component.js +60 -47
  18. package/esm2015/filter-group.component.js +76 -38
  19. package/esm2015/filter.component.js +107 -32
  20. package/esm2015/filter.module.js +2 -1
  21. package/esm2015/localization/messages.js +3 -3
  22. package/esm2015/navigation.service.js +159 -0
  23. package/esm2015/package-metadata.js +1 -1
  24. package/esm2015/util.js +33 -0
  25. package/fesm2015/kendo-angular-filter.js +523 -122
  26. package/filter-expression.component.d.ts +7 -10
  27. package/filter-group.component.d.ts +11 -10
  28. package/filter.component.d.ts +24 -4
  29. package/localization/messages.d.ts +3 -3
  30. package/model/filter-expression.d.ts +1 -1
  31. package/navigation.service.d.ts +40 -0
  32. package/package.json +1 -1
  33. package/util.d.ts +12 -0
@@ -2,24 +2,22 @@
2
2
  * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { ChangeDetectorRef, EventEmitter, OnDestroy, OnInit, TemplateRef } from '@angular/core';
5
+ import { ChangeDetectorRef, ElementRef, OnDestroy, OnInit, Renderer2, TemplateRef } from '@angular/core';
6
6
  import { LocalizationService } from '@progress/kendo-angular-l10n';
7
- import { CompositeFilterDescriptor } from '@progress/kendo-data-query';
8
- import { FilterDescriptor } from '@progress/kendo-data-query';
7
+ import { CompositeFilterDescriptor, FilterDescriptor } from '@progress/kendo-data-query';
8
+ import { BaseFilterRowComponent } from './base-filter-row.component';
9
9
  import { FilterService } from './filter.service';
10
10
  import { DateFormat, FilterEditor, FilterExpression, FilterOperator, NumberFormat } from './model/filter-expression';
11
+ import { NavigationService } from './navigation.service';
11
12
  import * as i0 from "@angular/core";
12
13
  /**
13
14
  * @hidden
14
15
  */
15
- export declare class FilterExpressionComponent implements OnInit, OnDestroy {
16
+ export declare class FilterExpressionComponent extends BaseFilterRowComponent implements OnInit, OnDestroy {
16
17
  private filterService;
17
- protected localization: LocalizationService;
18
18
  private cdr;
19
19
  static ngAcceptInputType_currentItem: FilterDescriptor | CompositeFilterDescriptor;
20
- index: number;
21
20
  currentItem: FilterDescriptor;
22
- valueChange: EventEmitter<void>;
23
21
  operators: any[];
24
22
  filters: FilterExpression[];
25
23
  isBoolean: boolean;
@@ -33,14 +31,13 @@ export declare class FilterExpressionComponent implements OnInit, OnDestroy {
33
31
  private isNumberFormat;
34
32
  private isDateFormat;
35
33
  private localizationSubscription;
36
- constructor(filterService: FilterService, localization: LocalizationService, cdr: ChangeDetectorRef);
34
+ constructor(filterService: FilterService, cdr: ChangeDetectorRef, element: ElementRef, navigationService: NavigationService, localization: LocalizationService, renderer: Renderer2);
37
35
  ngOnInit(): void;
38
36
  ngOnDestroy(): void;
39
37
  normalizeOperators(filterEditor: FilterEditor, operators: FilterOperator[]): {
40
38
  text: string;
41
39
  value: string;
42
40
  }[];
43
- messageFor(key: string): string;
44
41
  getFilterExpressionByField(name: string): FilterExpression | null;
45
42
  filterValueChange(value: string): void;
46
43
  protected getDefaultOperators(operatorsType: FilterEditor): {
@@ -53,5 +50,5 @@ export declare class FilterExpressionComponent implements OnInit, OnDestroy {
53
50
  onOperatorChange(value: string): void;
54
51
  setEditorTemplate(): void;
55
52
  static ɵfac: i0.ɵɵFactoryDeclaration<FilterExpressionComponent, never>;
56
- static ɵcmp: i0.ɵɵComponentDeclaration<FilterExpressionComponent, "kendo-filter-expression", never, { "index": "index"; "currentItem": "currentItem"; }, { "valueChange": "valueChange"; }, never, never>;
53
+ static ɵcmp: i0.ɵɵComponentDeclaration<FilterExpressionComponent, "kendo-filter-expression", never, { "currentItem": "currentItem"; }, {}, never, never>;
57
54
  }
@@ -2,41 +2,42 @@
2
2
  * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { ChangeDetectorRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
5
+ import { ChangeDetectorRef, ElementRef, OnDestroy, OnInit, Renderer2 } from '@angular/core';
6
6
  import { LocalizationService } from '@progress/kendo-angular-l10n';
7
- import { FilterDescriptor } from '@progress/kendo-data-query';
8
- import { CompositeFilterDescriptor } from '@progress/kendo-data-query';
7
+ import { CompositeFilterDescriptor, FilterDescriptor } from '@progress/kendo-data-query';
8
+ import { BaseFilterRowComponent } from './base-filter-row.component';
9
9
  import { FilterService } from './filter.service';
10
+ import { NavigationService } from './navigation.service';
11
+ import { FilterItem } from './util';
10
12
  import * as i0 from "@angular/core";
11
13
  /**
12
14
  * @hidden
13
15
  */
14
- export declare class FilterGroupComponent implements OnInit, OnDestroy {
16
+ export declare class FilterGroupComponent extends BaseFilterRowComponent implements OnInit, OnDestroy {
15
17
  private filterService;
16
- localization: LocalizationService;
17
18
  private cdr;
18
19
  static ngAcceptInputType_currentItem: FilterDescriptor | CompositeFilterDescriptor;
19
- index: number;
20
+ private _filterItems;
21
+ get filterItems(): FilterItem[];
20
22
  currentItem: CompositeFilterDescriptor;
21
- valueChange: EventEmitter<void>;
22
23
  operators: {
23
24
  text: string;
24
25
  value: 'and' | 'or';
25
26
  }[];
26
27
  private localizationSubscription;
27
- constructor(filterService: FilterService, localization: LocalizationService, cdr: ChangeDetectorRef);
28
+ constructor(filterService: FilterService, cdr: ChangeDetectorRef, element: ElementRef, navigationService: NavigationService, localization: LocalizationService, renderer: Renderer2);
28
29
  ngOnInit(): void;
29
30
  ngOnDestroy(): void;
30
31
  getLogicOperators(): {
31
32
  text: string;
32
33
  value: 'and' | 'or';
33
34
  }[];
34
- messageFor(key: string): string;
35
35
  getOperator(operatorValue: 'and' | 'or'): string;
36
36
  selectedChange(logicOperator: 'or' | 'and'): void;
37
37
  addFilterExpression(): void;
38
38
  addFilterGroup(): void;
39
39
  removeFilterGroup(): void;
40
+ onMouseDown(event: any): void;
40
41
  static ɵfac: i0.ɵɵFactoryDeclaration<FilterGroupComponent, never>;
41
- static ɵcmp: i0.ɵɵComponentDeclaration<FilterGroupComponent, "kendo-filter-group", never, { "index": "index"; "currentItem": "currentItem"; }, { "valueChange": "valueChange"; }, never, never>;
42
+ static ɵcmp: i0.ɵɵComponentDeclaration<FilterGroupComponent, "kendo-filter-group", never, { "currentItem": "currentItem"; }, {}, never, never>;
42
43
  }
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { OnInit, EventEmitter } from '@angular/core';
5
+ import { OnInit, EventEmitter, ElementRef, Renderer2 } from '@angular/core';
6
6
  import { LocalizationService } from '@progress/kendo-angular-l10n';
7
7
  import { FilterService } from './filter.service';
8
8
  import { CompositeFilterDescriptor } from '@progress/kendo-data-query';
@@ -10,6 +10,8 @@ import { FilterExpression } from './model/filter-expression';
10
10
  import { Direction } from './util';
11
11
  import { ChangeDetectorRef } from '@angular/core';
12
12
  import { OnDestroy } from '@angular/core';
13
+ import { FilterItem } from './util';
14
+ import { NavigationService } from './navigation.service';
13
15
  import * as i0 from "@angular/core";
14
16
  /**
15
17
  * Represents the [Kendo UI Filter component for Angular]({% slug overview_filter %}).
@@ -47,6 +49,17 @@ export declare class FilterComponent implements OnInit, OnDestroy {
47
49
  private filterService;
48
50
  private localization;
49
51
  private cdr;
52
+ private element;
53
+ private navigationService;
54
+ private renderer;
55
+ /**
56
+ * @hidden
57
+ */
58
+ focusout(): void;
59
+ /**
60
+ * @hidden
61
+ */
62
+ onKeydown(event: any): void;
50
63
  direction: Direction;
51
64
  /**
52
65
  * Specifies the available user-defined filters. At least one filter should be provided.
@@ -66,9 +79,12 @@ export declare class FilterComponent implements OnInit, OnDestroy {
66
79
  private localizationSubscription;
67
80
  private _value;
68
81
  private filterFields;
69
- constructor(filterService: FilterService, localization: LocalizationService, cdr: ChangeDetectorRef);
82
+ private _filterItems;
83
+ get filterItems(): FilterItem[];
84
+ get toolbarElement(): HTMLElement;
85
+ constructor(filterService: FilterService, localization: LocalizationService, cdr: ChangeDetectorRef, element: ElementRef, navigationService: NavigationService, renderer: Renderer2);
70
86
  ngOnInit(): void;
71
- ngAfterViewChecked(): void;
87
+ ngAfterViewInit(): void;
72
88
  ngOnDestroy(): void;
73
89
  /**
74
90
  * @hidden
@@ -77,10 +93,14 @@ export declare class FilterComponent implements OnInit, OnDestroy {
77
93
  /**
78
94
  * @hidden
79
95
  */
80
- onValueChange(): void;
96
+ onValueChange(isRemoveOperation?: any): void;
81
97
  private normalizeFilter;
82
98
  private setValue;
83
99
  private normalizeValue;
100
+ /**
101
+ * @hidden
102
+ */
103
+ messageFor(key: string): string;
84
104
  static ɵfac: i0.ɵɵFactoryDeclaration<FilterComponent, never>;
85
105
  static ɵcmp: i0.ɵɵComponentDeclaration<FilterComponent, "kendo-filter", never, { "filters": "filters"; "value": "value"; }, { "valueChange": "valueChange"; }, ["filterFields"], never>;
86
106
  }
@@ -151,11 +151,11 @@ export declare class Messages extends ComponentMessages {
151
151
  /**
152
152
  * The text of the filter row aria label.
153
153
  */
154
- filterAriaLabel: string;
154
+ filterToolbarAriaLabel: string;
155
155
  /**
156
156
  * The text of the filter toolbar aria label.
157
157
  */
158
- filterToolbarAriaLabel: string;
158
+ filterComponentAriaLabel: string;
159
159
  static ɵfac: i0.ɵɵFactoryDeclaration<Messages, never>;
160
- static ɵdir: i0.ɵɵDirectiveDeclaration<Messages, "[kendoFilterMessages]", never, { "filterExpressionOperators": "filterExpressionOperators"; "filterExpressionFilters": "filterExpressionFilters"; "remove": "remove"; "addGroup": "addGroup"; "addFilter": "addFilter"; "filterAndLogic": "filterAndLogic"; "filterOrLogic": "filterOrLogic"; "filterEqOperator": "filterEqOperator"; "filterNotEqOperator": "filterNotEqOperator"; "filterIsNullOperator": "filterIsNullOperator"; "filterIsNotNullOperator": "filterIsNotNullOperator"; "filterIsEmptyOperator": "filterIsEmptyOperator"; "filterIsNotEmptyOperator": "filterIsNotEmptyOperator"; "filterStartsWithOperator": "filterStartsWithOperator"; "filterContainsOperator": "filterContainsOperator"; "filterNotContainsOperator": "filterNotContainsOperator"; "filterEndsWithOperator": "filterEndsWithOperator"; "filterGteOperator": "filterGteOperator"; "filterGtOperator": "filterGtOperator"; "filterLteOperator": "filterLteOperator"; "filterLtOperator": "filterLtOperator"; "filterIsTrue": "filterIsTrue"; "filterIsFalse": "filterIsFalse"; "filterBooleanAll": "filterBooleanAll"; "filterAfterOrEqualOperator": "filterAfterOrEqualOperator"; "filterAfterOperator": "filterAfterOperator"; "filterBeforeOperator": "filterBeforeOperator"; "filterBeforeOrEqualOperator": "filterBeforeOrEqualOperator"; "editorNumericDecrement": "editorNumericDecrement"; "editorNumericIncrement": "editorNumericIncrement"; "editorDateTodayText": "editorDateTodayText"; "editorDateToggleText": "editorDateToggleText"; "filterFieldAriaLabel": "filterFieldAriaLabel"; "filterOperatorAriaLabel": "filterOperatorAriaLabel"; "filterValueAriaLabel": "filterValueAriaLabel"; "filterAriaLabel": "filterAriaLabel"; "filterToolbarAriaLabel": "filterToolbarAriaLabel"; }, {}, never>;
160
+ static ɵdir: i0.ɵɵDirectiveDeclaration<Messages, "[kendoFilterMessages]", never, { "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"; }, {}, never>;
161
161
  }
@@ -20,7 +20,7 @@ export interface DateFormat extends FormatSettings {
20
20
  */
21
21
  export interface NumberFormat extends NumberFormatOptions {
22
22
  }
23
- export declare type FilterOperator = 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'isnull' | 'isnotnull' | 'contains' | 'doesnotcontain' | 'startswith' | 'endswidth' | 'isempty' | 'isnotempty';
23
+ export declare type FilterOperator = 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'isnull' | 'isnotnull' | 'contains' | 'doesnotcontain' | 'startswith' | 'endswith' | 'isempty' | 'isnotempty';
24
24
  /**
25
25
  * Represents the FilterEditor type.
26
26
  */
@@ -0,0 +1,40 @@
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 { ChangeDetectorRef, Renderer2 } from '@angular/core';
6
+ import { FilterItem } from './util';
7
+ import * as i0 from "@angular/core";
8
+ /**
9
+ * @hidden
10
+ */
11
+ interface FlattenFilterItem {
12
+ component: FilterItem;
13
+ isGroup: boolean;
14
+ toolbarElement: HTMLElement;
15
+ focusableChildren: HTMLElement[];
16
+ }
17
+ /**
18
+ * @hidden
19
+ */
20
+ export declare class NavigationService {
21
+ private cdr;
22
+ private renderer;
23
+ hierarchicalFilterItems: FilterItem[];
24
+ flattenFilterItems: FlattenFilterItem[];
25
+ currentToolbarItemIndex: number;
26
+ currentToolbarItemChildrenIndex: number;
27
+ isInnerNavigationActivated: boolean;
28
+ isFilterExpressionComponentFocused: boolean;
29
+ currentlyFocusedElement: HTMLElement;
30
+ constructor(cdr: ChangeDetectorRef, renderer: Renderer2);
31
+ processKeyDown(key: number, event: any): void;
32
+ focusCurrentElement(element: HTMLElement, isOnMouseDown?: boolean): void;
33
+ flattenHierarchicalFilterItems(filterItems: FilterItem[]): void;
34
+ private setGroupItemChildren;
35
+ setItemIndexes(): void;
36
+ reset(items: FilterItem[]): void;
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<NavigationService, never>;
38
+ static ɵprov: i0.ɵɵInjectableDeclaration<NavigationService>;
39
+ }
40
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-filter",
3
- "version": "2.2.3-dev.202210120943",
3
+ "version": "2.3.0",
4
4
  "description": "Kendo UI Angular Filter",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
package/util.d.ts CHANGED
@@ -3,6 +3,7 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { FilterOperator } from "./model/filter-expression";
6
+ import * as i0 from "@angular/core";
6
7
  /**
7
8
  * @hidden
8
9
  */
@@ -147,3 +148,14 @@ export declare const localizeOperators: (operators: any) => (localization: any)
147
148
  * @hidden
148
149
  */
149
150
  export declare const isPresent: Function;
151
+ /**
152
+ * @hidden
153
+ */
154
+ export declare class FilterItem {
155
+ static ɵfac: i0.ɵɵFactoryDeclaration<FilterItem, never>;
156
+ static ɵprov: i0.ɵɵInjectableDeclaration<FilterItem>;
157
+ }
158
+ /**
159
+ * @hidden
160
+ */
161
+ export declare const selectors: any;