@progress/kendo-angular-grid 13.0.0-develop.8 → 13.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 (38) hide show
  1. package/aggregates/aggregate-types.d.ts +58 -0
  2. package/aggregates/status-bar-template.directive.d.ts +19 -0
  3. package/aggregates/status-bar.component.d.ts +53 -0
  4. package/column-menu/column-menu.component.d.ts +1 -1
  5. package/esm2020/aggregates/aggregate-types.mjs +6 -0
  6. package/esm2020/aggregates/status-bar-template.directive.mjs +26 -0
  7. package/esm2020/aggregates/status-bar.component.mjs +236 -0
  8. package/esm2020/column-menu/column-menu.component.mjs +6 -6
  9. package/esm2020/filtering/cell/boolean-filter-cell.component.mjs +1 -1
  10. package/esm2020/filtering/cell/filter-cell-operators.component.mjs +15 -1
  11. package/esm2020/filtering/cell/filter-cell-wrapper.component.mjs +3 -1
  12. package/esm2020/filtering/cell/string-filter-cell.component.mjs +1 -1
  13. package/esm2020/filtering/filter-input.directive.mjs +5 -1
  14. package/esm2020/grid.component.mjs +574 -540
  15. package/esm2020/grid.module.mjs +10 -2
  16. package/esm2020/grouping/group-panel.component.mjs +2 -2
  17. package/esm2020/index.mjs +1 -0
  18. package/esm2020/localization/messages.mjs +5 -1
  19. package/esm2020/package-metadata.mjs +2 -2
  20. package/esm2020/rendering/list.component.mjs +12 -14
  21. package/esm2020/selection/cell-selection.service.mjs +20 -1
  22. package/esm2020/selection/selection-checkbox.directive.mjs +2 -0
  23. package/esm2020/selection/selection-default.mjs +14 -1
  24. package/esm2020/selection/selection.service.mjs +31 -5
  25. package/fesm2015/progress-kendo-angular-grid.mjs +926 -572
  26. package/fesm2020/progress-kendo-angular-grid.mjs +927 -572
  27. package/filtering/cell/filter-cell-operators.component.d.ts +10 -1
  28. package/grid.component.d.ts +10 -1
  29. package/grid.module.d.ts +100 -98
  30. package/grouping/group-panel.component.d.ts +0 -1
  31. package/index.d.ts +2 -0
  32. package/localization/messages.d.ts +25 -1
  33. package/package.json +16 -16
  34. package/schematics/ngAdd/index.js +3 -3
  35. package/selection/cell-selection.service.d.ts +3 -0
  36. package/selection/selection-default.d.ts +17 -2
  37. package/selection/selection.service.d.ts +8 -2
  38. package/selection/types.d.ts +27 -0
@@ -0,0 +1,58 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 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 available cell selection aggregates.
7
+ */
8
+ export interface SelectionAggregates {
9
+ /**
10
+ * The sum of all numbers in all selected cells bound to numeric fields.
11
+ * Other selected cells that represent different data types do not affect the value.
12
+ */
13
+ sum?: number;
14
+ /**
15
+ * The smallest number in all selected cells bound to numeric fields.
16
+ * Other selected cells that represent different data types do not affect the value.
17
+ */
18
+ min?: number;
19
+ /**
20
+ * The greatest number in all selected cells bound to numeric fields.
21
+ * Other selected cells that represent different data types do not affect the value.
22
+ */
23
+ max?: number;
24
+ /**
25
+ * The average of all numbers in all selected cells bound to numeric fields.
26
+ * Other selected cells that represent different data types do not affect the value.
27
+ */
28
+ average?: number;
29
+ /**
30
+ * The total number of all selected cells.
31
+ */
32
+ count?: number;
33
+ /**
34
+ * The total number of selected cells bound to a `true` boolean value.
35
+ * Other selected cells that represent different data types do not affect the value.
36
+ */
37
+ isTrue?: number;
38
+ /**
39
+ * The total number of selected cells bound to a `false` boolean value.
40
+ * Other selected cells that represent different data types do not affect the value
41
+ */
42
+ isFalse?: number;
43
+ /**
44
+ * The earliest date in all selected cells bound to `Date` fields.
45
+ * Other selected cells that represent different data types do not affect the value.
46
+ */
47
+ earliest?: Date;
48
+ /**
49
+ * The latest date in all selected cells bound to `Date` fields.
50
+ * Other selected cells that represent different data types do not affect the value.
51
+ */
52
+ latest?: Date;
53
+ }
54
+ /**
55
+ * Represents the available selection aggregate calculations.
56
+ * Use in combination with [cellAggregates]({% slug api_grid_selectablesettings %}) to determine which aggregates will be calculated.
57
+ */
58
+ export declare type SelectionAggregate = 'sum' | 'min' | 'max' | 'average' | 'count' | 'earliest' | 'latest' | 'isTrue' | 'isFalse';
@@ -0,0 +1,19 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { TemplateRef } from '@angular/core';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * Represents the status bar template of the Grid. Allows you to visualize the aggregates using custom rendering inside the template.
9
+ * The template context has the following field:
10
+ * - `aggregates`—The [SelectionAggregates]({% slug api_grid_selectionaggregates %}) object that contains all calculated aggregates.
11
+ * Use the Angular [ngFor](link:site.data.urls.angular['ngfor']) structural directive combined with the [KeyValuePipe](https://angular.io/api/common/KeyValuePipe)
12
+ * to loop through the aggregates as key-value pairs.
13
+ */
14
+ export declare class StatusBarTemplateDirective {
15
+ templateRef: TemplateRef<any>;
16
+ constructor(templateRef: TemplateRef<any>);
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<StatusBarTemplateDirective, never>;
18
+ static ɵdir: i0.ɵɵDirectiveDeclaration<StatusBarTemplateDirective, "[kendoGridStatusBarTemplate]", never, {}, {}, never>;
19
+ }
@@ -0,0 +1,53 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { OnDestroy, OnInit } from '@angular/core';
6
+ import { ContextService } from '../common/provider.service';
7
+ import { SelectionService } from '../selection/selection.service';
8
+ import { CellSelectionService } from '../selection/cell-selection.service';
9
+ import { SelectionAggregates } from './aggregate-types';
10
+ import { StatusBarTemplateDirective } from './status-bar-template.directive';
11
+ import { LocalDataChangesService } from '../editing/local-data-changes.service';
12
+ import { SelectableSettings } from '../selection/types';
13
+ import { ColumnInfoService } from '../common/column-info.service';
14
+ import * as i0 from "@angular/core";
15
+ interface GroupedAggregates {
16
+ dates?: Array<any>;
17
+ numbers?: Array<number>;
18
+ booleans?: Array<boolean>;
19
+ }
20
+ /**
21
+ * @hidden
22
+ */
23
+ export declare class StatusBarComponent implements OnInit, OnDestroy {
24
+ private ctx;
25
+ private selectionService;
26
+ private dataChanges;
27
+ private columnInfoService;
28
+ private cellSelectionService;
29
+ hostClasses: boolean;
30
+ get isStatusBarTemplate(): string;
31
+ selectableSettings: SelectableSettings | boolean;
32
+ statusBarTemplate: StatusBarTemplateDirective;
33
+ groupedAggregates: GroupedAggregates;
34
+ aggregates: SelectionAggregates;
35
+ private data;
36
+ private subs;
37
+ private selectedItems;
38
+ private selectService;
39
+ constructor(ctx: ContextService, selectionService: SelectionService, dataChanges: LocalDataChangesService, columnInfoService: ColumnInfoService, cellSelectionService: CellSelectionService);
40
+ ngOnInit(): void;
41
+ ngOnDestroy(): void;
42
+ private onSelectionChange;
43
+ private handleAggregateChanges;
44
+ private groupAggregates;
45
+ private calculateAggregates;
46
+ private handleSelectedItems;
47
+ private isAggregateIncluded;
48
+ private nullifyAggregates;
49
+ private get isRowSelection();
50
+ static ɵfac: i0.ɵɵFactoryDeclaration<StatusBarComponent, never>;
51
+ static ɵcmp: i0.ɵɵComponentDeclaration<StatusBarComponent, "kendo-grid-status-bar", never, { "selectableSettings": "selectableSettings"; "statusBarTemplate": "statusBarTemplate"; }, {}, never, never>;
52
+ }
53
+ export {};
@@ -81,7 +81,7 @@ export declare class ColumnMenuComponent implements AfterViewInit, OnChanges, On
81
81
  /**
82
82
  * @hidden
83
83
  */
84
- moreHorizontalIcon: SVGIcon;
84
+ slidersIcon: SVGIcon;
85
85
  /**
86
86
  * @hidden
87
87
  */
@@ -0,0 +1,6 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ ;
6
+ export {};
@@ -0,0 +1,26 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 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, TemplateRef } from '@angular/core';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * Represents the status bar template of the Grid. Allows you to visualize the aggregates using custom rendering inside the template.
9
+ * The template context has the following field:
10
+ * - `aggregates`&mdash;The [SelectionAggregates]({% slug api_grid_selectionaggregates %}) object that contains all calculated aggregates.
11
+ * Use the Angular [ngFor](link:site.data.urls.angular['ngfor']) structural directive combined with the [KeyValuePipe](https://angular.io/api/common/KeyValuePipe)
12
+ * to loop through the aggregates as key-value pairs.
13
+ */
14
+ export class StatusBarTemplateDirective {
15
+ constructor(templateRef) {
16
+ this.templateRef = templateRef;
17
+ }
18
+ }
19
+ StatusBarTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: StatusBarTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
20
+ StatusBarTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: StatusBarTemplateDirective, selector: "[kendoGridStatusBarTemplate]", ngImport: i0 });
21
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: StatusBarTemplateDirective, decorators: [{
22
+ type: Directive,
23
+ args: [{
24
+ selector: '[kendoGridStatusBarTemplate]'
25
+ }]
26
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
@@ -0,0 +1,236 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ /* eslint-disable @typescript-eslint/no-explicit-any */
6
+ import { Component, HostBinding, Input } from '@angular/core';
7
+ import { Subscription } from 'rxjs';
8
+ import { ContextService } from '../common/provider.service';
9
+ import { SelectionService } from '../selection/selection.service';
10
+ import { CellSelectionService } from '../selection/cell-selection.service';
11
+ import { StatusBarTemplateDirective } from './status-bar-template.directive';
12
+ import { LocalDataChangesService } from '../editing/local-data-changes.service';
13
+ import { ColumnInfoService } from '../common/column-info.service';
14
+ import * as i0 from "@angular/core";
15
+ import * as i1 from "../common/provider.service";
16
+ import * as i2 from "../selection/selection.service";
17
+ import * as i3 from "../editing/local-data-changes.service";
18
+ import * as i4 from "../common/column-info.service";
19
+ import * as i5 from "../selection/cell-selection.service";
20
+ import * as i6 from "@angular/common";
21
+ ;
22
+ /**
23
+ * @hidden
24
+ */
25
+ export class StatusBarComponent {
26
+ constructor(ctx, selectionService, dataChanges, columnInfoService, cellSelectionService) {
27
+ this.ctx = ctx;
28
+ this.selectionService = selectionService;
29
+ this.dataChanges = dataChanges;
30
+ this.columnInfoService = columnInfoService;
31
+ this.cellSelectionService = cellSelectionService;
32
+ this.hostClasses = true;
33
+ this.groupedAggregates = { dates: [], numbers: [], booleans: [] };
34
+ this.aggregates = {
35
+ sum: null,
36
+ average: null,
37
+ min: null,
38
+ max: null,
39
+ count: null,
40
+ isTrue: null,
41
+ isFalse: null,
42
+ earliest: null,
43
+ latest: null
44
+ };
45
+ this.subs = new Subscription();
46
+ this.selectedItems = [];
47
+ }
48
+ get isStatusBarTemplate() {
49
+ return this.statusBarTemplate ? '' : 'none';
50
+ }
51
+ ngOnInit() {
52
+ if (this.selectableSettings.cellAggregates) {
53
+ this.data = this.dataChanges.data ? this.dataChanges.data : this.ctx.grid.data;
54
+ this.selectService = this.isRowSelection ? this.selectionService : this.cellSelectionService;
55
+ if (this.isAggregateIncluded('count')) {
56
+ this.aggregates['count'] = 0;
57
+ }
58
+ const selectionDirective = this.ctx.grid.selectionDirective;
59
+ if (selectionDirective && !this.isRowSelection) {
60
+ this.selectedItems = selectionDirective.selectedKeys;
61
+ }
62
+ this.subs.add(this.selectService.aggregateChanges.subscribe((selectionArgs) => this.onSelectionChange(selectionArgs)));
63
+ }
64
+ }
65
+ ngOnDestroy() {
66
+ this.subs.unsubscribe();
67
+ }
68
+ onSelectionChange(selectionArgs) {
69
+ this.handleSelectedItems(selectionArgs);
70
+ this.nullifyAggregates();
71
+ this.handleAggregateChanges();
72
+ this.selectService.aggregates = this.aggregates;
73
+ }
74
+ handleAggregateChanges() {
75
+ const lockedColumns = this.columnInfoService.lockedLeafColumns.toArray();
76
+ const nonLockedColumns = this.columnInfoService.nonLockedLeafColumns.toArray();
77
+ const selectedItemsLength = this.selectedItems.length;
78
+ const columns = [...lockedColumns, ...nonLockedColumns];
79
+ const fields = columns.map(col => col.field);
80
+ if (this.isAggregateIncluded('count')) {
81
+ this.aggregates['count'] = this.isRowSelection ? (selectedItemsLength * columns.length) : selectedItemsLength;
82
+ }
83
+ this.selectedItems.forEach((item) => {
84
+ if (this.isRowSelection) {
85
+ fields.forEach((field) => {
86
+ const cellValue = item.dataItem;
87
+ if (cellValue && cellValue.hasOwnProperty(field)) {
88
+ const cellValue = item.dataItem[field];
89
+ this.groupAggregates(cellValue);
90
+ }
91
+ });
92
+ }
93
+ else if (this.selectService.options.cell) {
94
+ const itemKey = this.data[item.itemKey];
95
+ const field = fields[item.columnKey];
96
+ if (itemKey && itemKey.hasOwnProperty(field)) {
97
+ const cellValue = itemKey[fields[item.columnKey]];
98
+ this.groupAggregates(cellValue);
99
+ }
100
+ }
101
+ });
102
+ this.calculateAggregates();
103
+ }
104
+ groupAggregates(aggregate) {
105
+ if (typeof aggregate === 'number') {
106
+ this.groupedAggregates.numbers.push(aggregate);
107
+ }
108
+ else if (typeof aggregate === 'boolean') {
109
+ this.groupedAggregates.booleans.push(aggregate);
110
+ }
111
+ else if (aggregate instanceof Date) {
112
+ this.groupedAggregates.dates.push(aggregate);
113
+ }
114
+ }
115
+ calculateAggregates() {
116
+ if (this.groupedAggregates.numbers.length > 0) {
117
+ if (this.isAggregateIncluded('min')) {
118
+ this.aggregates['min'] = Math.min(...this.groupedAggregates.numbers);
119
+ }
120
+ if (this.isAggregateIncluded('max')) {
121
+ this.aggregates['max'] = Math.max(...this.groupedAggregates.numbers);
122
+ }
123
+ if (this.isAggregateIncluded('sum')) {
124
+ this.aggregates['sum'] = this.groupedAggregates.numbers.reduce((acc, curr) => acc += curr, 0);
125
+ }
126
+ if (this.isAggregateIncluded('average')) {
127
+ this.aggregates['average'] = this.aggregates['sum'] / this.groupedAggregates.numbers.length;
128
+ }
129
+ }
130
+ if (this.groupedAggregates.booleans.length > 0) {
131
+ if (this.isAggregateIncluded('isTrue')) {
132
+ const isTrueCount = this.groupedAggregates.booleans.filter(bool => bool).length;
133
+ this.aggregates['isTrue'] = isTrueCount > 0 ? isTrueCount : null;
134
+ }
135
+ if (this.isAggregateIncluded('isFalse')) {
136
+ const isFalseCount = this.groupedAggregates.booleans.length - this.aggregates['isTrue'];
137
+ this.aggregates['isFalse'] = isFalseCount > 0 ? isFalseCount : null;
138
+ }
139
+ }
140
+ if (this.groupedAggregates.dates.length > 0) {
141
+ if (this.isAggregateIncluded('earliest')) {
142
+ this.aggregates['earliest'] = new Date(Math.min(...this.groupedAggregates.dates));
143
+ }
144
+ if (this.isAggregateIncluded('latest')) {
145
+ this.aggregates['latest'] = new Date(Math.max(...this.groupedAggregates.dates));
146
+ }
147
+ }
148
+ }
149
+ handleSelectedItems(selectionArgs) {
150
+ const rowOrCellSelect = `${this.isRowSelection ? 'selectedRows' : 'selectedCells'}`;
151
+ const rowOrCellDeselect = `${this.isRowSelection ? 'deselectedRows' : 'deselectedCells'}`;
152
+ const selectedItems = selectionArgs[rowOrCellSelect];
153
+ const deselectedItems = selectionArgs[rowOrCellDeselect];
154
+ if (!this.isRowSelection) {
155
+ // Needed when we have column groups with cell selection, the deselected items are duplicated
156
+ deselectedItems.forEach((item, index) => {
157
+ if (index + 1 < deselectedItems.length) {
158
+ if (item.itemKey === deselectedItems[index + 1].itemKey
159
+ && item.columnKey === deselectedItems[index + 1].columnKey) {
160
+ deselectedItems.splice(index, 1);
161
+ }
162
+ }
163
+ });
164
+ }
165
+ if (selectedItems.length > 0) {
166
+ selectedItems.forEach((item) => {
167
+ this.selectedItems = [...this.selectedItems, item];
168
+ });
169
+ }
170
+ if (deselectedItems.length > 0) {
171
+ if (this.isRowSelection) {
172
+ deselectedItems.forEach((row) => {
173
+ this.selectedItems = this.selectedItems.filter((elem) => elem.dataItem !== row.dataItem);
174
+ });
175
+ }
176
+ else {
177
+ deselectedItems.forEach((cell) => {
178
+ const index = this.selectedItems.findIndex((elem) => elem.itemKey === cell.itemKey && elem.columnKey === cell.columnKey);
179
+ this.selectedItems.splice(index, 1);
180
+ });
181
+ }
182
+ }
183
+ }
184
+ isAggregateIncluded(aggregate) {
185
+ const { cellAggregates } = this.selectService.options;
186
+ if (typeof cellAggregates !== 'boolean') {
187
+ return cellAggregates.includes(aggregate);
188
+ }
189
+ return true;
190
+ }
191
+ nullifyAggregates() {
192
+ this.groupedAggregates = { dates: [], numbers: [], booleans: [] };
193
+ this.aggregates['count'] = null;
194
+ this.aggregates['sum'] = this.aggregates['average'] = null;
195
+ this.aggregates['max'] = this.aggregates['min'] = null;
196
+ this.aggregates['isFalse'] = this.aggregates['isTrue'] = null;
197
+ this.aggregates['earliest'] = this.aggregates['latest'] = null;
198
+ }
199
+ get isRowSelection() {
200
+ return typeof this.selectableSettings === 'boolean' || !this.selectableSettings.cell;
201
+ }
202
+ }
203
+ StatusBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: StatusBarComponent, deps: [{ token: i1.ContextService }, { token: i2.SelectionService }, { token: i3.LocalDataChangesService }, { token: i4.ColumnInfoService }, { token: i5.CellSelectionService }], target: i0.ɵɵFactoryTarget.Component });
204
+ StatusBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: StatusBarComponent, selector: "kendo-grid-status-bar", inputs: { selectableSettings: "selectableSettings", statusBarTemplate: "statusBarTemplate" }, host: { properties: { "class.k-selection-aggregates": "this.hostClasses", "class.k-grid-selection-aggregates": "this.hostClasses", "style.display": "this.isStatusBarTemplate" } }, ngImport: i0, template: `
205
+ <ng-template
206
+ *ngIf="statusBarTemplate"
207
+ [ngTemplateOutlet]="statusBarTemplate?.templateRef"
208
+ [ngTemplateOutletContext]="{ aggregates: aggregates }">
209
+ </ng-template>
210
+ `, isInline: true, directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
211
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: StatusBarComponent, decorators: [{
212
+ type: Component,
213
+ args: [{
214
+ selector: 'kendo-grid-status-bar',
215
+ template: `
216
+ <ng-template
217
+ *ngIf="statusBarTemplate"
218
+ [ngTemplateOutlet]="statusBarTemplate?.templateRef"
219
+ [ngTemplateOutletContext]="{ aggregates: aggregates }">
220
+ </ng-template>
221
+ `
222
+ }]
223
+ }], ctorParameters: function () { return [{ type: i1.ContextService }, { type: i2.SelectionService }, { type: i3.LocalDataChangesService }, { type: i4.ColumnInfoService }, { type: i5.CellSelectionService }]; }, propDecorators: { hostClasses: [{
224
+ type: HostBinding,
225
+ args: ['class.k-selection-aggregates']
226
+ }, {
227
+ type: HostBinding,
228
+ args: ['class.k-grid-selection-aggregates']
229
+ }], isStatusBarTemplate: [{
230
+ type: HostBinding,
231
+ args: ['style.display']
232
+ }], selectableSettings: [{
233
+ type: Input
234
+ }], statusBarTemplate: [{
235
+ type: Input
236
+ }] } });
@@ -12,7 +12,7 @@ import { hasFilter, hasSort, hasLock, hasStick, hasColumnChooser, hasAutoSizeCol
12
12
  import { replaceMessagePlaceholder } from '../utils';
13
13
  import { ContextService } from '../common/provider.service';
14
14
  import { ColunnMenuErrorMessages } from '../common/error-messages';
15
- import { moreVerticalIcon, columnsIcon, moreHorizontalIcon, filterIcon } from '@progress/kendo-svg-icons';
15
+ import { moreVerticalIcon, columnsIcon, filterIcon, slidersIcon } from '@progress/kendo-svg-icons';
16
16
  import { TabStripComponent } from '@progress/kendo-angular-layout';
17
17
  import { ColumnInfoService } from '../common/column-info.service';
18
18
  import * as i0 from "@angular/core";
@@ -84,7 +84,7 @@ export class ColumnMenuComponent {
84
84
  /**
85
85
  * @hidden
86
86
  */
87
- this.moreHorizontalIcon = moreHorizontalIcon;
87
+ this.slidersIcon = slidersIcon;
88
88
  /**
89
89
  * @hidden
90
90
  */
@@ -361,8 +361,8 @@ ColumnMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
361
361
  <ng-template kendoTabTitle>
362
362
  <kendo-icon-wrapper
363
363
  [attr.title]="ctx.localization.get('columnMenuGeneralTabTitle')"
364
- name="more-horizontal"
365
- [svgIcon]="moreHorizontalIcon">
364
+ name="sliders"
365
+ [svgIcon]="slidersIcon">
366
366
  </kendo-icon-wrapper>
367
367
  </ng-template>
368
368
  <ng-template kendoTabContent>
@@ -530,8 +530,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
530
530
  <ng-template kendoTabTitle>
531
531
  <kendo-icon-wrapper
532
532
  [attr.title]="ctx.localization.get('columnMenuGeneralTabTitle')"
533
- name="more-horizontal"
534
- [svgIcon]="moreHorizontalIcon">
533
+ name="sliders"
534
+ [svgIcon]="slidersIcon">
535
535
  </kendo-icon-wrapper>
536
536
  </ng-template>
537
537
  <ng-template kendoTabContent>
@@ -54,7 +54,7 @@ export class BooleanFilterCellComponent extends BooleanFilterComponent {
54
54
  * @hidden
55
55
  */
56
56
  get columnLabel() {
57
- const localizationMsg = this.ctx.localization.get('filterInputLabel') || '';
57
+ const localizationMsg = this.ctx.localization.get('booleanFilterCellLabel') || '';
58
58
  const columnName = this.column.title || this.column.field;
59
59
  return replaceMessagePlaceholder(localizationMsg, 'columnName', columnName);
60
60
  }
@@ -8,6 +8,8 @@ import { Keys } from '@progress/kendo-angular-common';
8
8
  import { SizingOptionsService } from '../../layout/sizing-options.service';
9
9
  import { filterClearIcon } from '@progress/kendo-svg-icons';
10
10
  import { ContextService } from '../../common/provider.service';
11
+ import { replaceMessagePlaceholder } from '../../utils';
12
+ import { ColumnComponent } from '../../columns/column.component';
11
13
  import * as i0 from "@angular/core";
12
14
  import * as i1 from "../../common/provider.service";
13
15
  import * as i2 from "../../layout/sizing-options.service";
@@ -111,13 +113,22 @@ export class FilterCellOperatorsComponent {
111
113
  this.subs.unsubscribe();
112
114
  }
113
115
  }
116
+ /**
117
+ * @hidden
118
+ */
119
+ get columnLabel() {
120
+ const localizationMsg = this.ctx.localization.get('filterCellOperatorLabel') || '';
121
+ const columnName = this.column.title || this.column.field;
122
+ return replaceMessagePlaceholder(localizationMsg, 'columnName', columnName);
123
+ }
114
124
  }
115
125
  FilterCellOperatorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FilterCellOperatorsComponent, deps: [{ token: i1.ContextService }, { token: i2.SizingOptionsService }], target: i0.ɵɵFactoryTarget.Component });
116
- FilterCellOperatorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: FilterCellOperatorsComponent, selector: "kendo-grid-filter-cell-operators", inputs: { operators: "operators", showButton: "showButton", showOperators: "showOperators", value: "value" }, outputs: { valueChange: "valueChange", clear: "clear" }, host: { properties: { "class.k-filtercell-operator": "this.hostClasses" } }, viewQueries: [{ propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true }], ngImport: i0, template: `
126
+ FilterCellOperatorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: FilterCellOperatorsComponent, selector: "kendo-grid-filter-cell-operators", inputs: { operators: "operators", showButton: "showButton", showOperators: "showOperators", value: "value", column: "column" }, outputs: { valueChange: "valueChange", clear: "clear" }, host: { properties: { "class.k-filtercell-operator": "this.hostClasses" } }, viewQueries: [{ propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true }], ngImport: i0, template: `
117
127
  <kendo-dropdownlist
118
128
  #dropdown
119
129
  *ngIf="showOperators"
120
130
  kendoGridFocusable
131
+ [attr.aria-label]="columnLabel"
121
132
  [data]="operators"
122
133
  class="k-dropdown-operator"
123
134
  (valueChange)="onChange($event)"
@@ -150,6 +161,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
150
161
  #dropdown
151
162
  *ngIf="showOperators"
152
163
  kendoGridFocusable
164
+ [attr.aria-label]="columnLabel"
153
165
  [data]="operators"
154
166
  class="k-dropdown-operator"
155
167
  (valueChange)="onChange($event)"
@@ -188,6 +200,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
188
200
  type: Input
189
201
  }], value: [{
190
202
  type: Input
203
+ }], column: [{
204
+ type: Input
191
205
  }], valueChange: [{
192
206
  type: Output
193
207
  }], clear: [{
@@ -38,12 +38,13 @@ FilterCellWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
38
38
  <ng-content></ng-content>
39
39
  <kendo-grid-filter-cell-operators
40
40
  [showOperators]="showOperators"
41
+ [column]="column"
41
42
  [operators]="operators"
42
43
  (clear)="onClear()"
43
44
  [showButton]="showButton"
44
45
  [(value)]="currentOperator">
45
46
  </kendo-grid-filter-cell-operators>
46
- `, isInline: true, components: [{ type: i2.FilterCellOperatorsComponent, selector: "kendo-grid-filter-cell-operators", inputs: ["operators", "showButton", "showOperators", "value"], outputs: ["valueChange", "clear"] }] });
47
+ `, isInline: true, components: [{ type: i2.FilterCellOperatorsComponent, selector: "kendo-grid-filter-cell-operators", inputs: ["operators", "showButton", "showOperators", "value", "column"], outputs: ["valueChange", "clear"] }] });
47
48
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FilterCellWrapperComponent, decorators: [{
48
49
  type: Component,
49
50
  args: [{
@@ -52,6 +53,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
52
53
  <ng-content></ng-content>
53
54
  <kendo-grid-filter-cell-operators
54
55
  [showOperators]="showOperators"
56
+ [column]="column"
55
57
  [operators]="operators"
56
58
  (clear)="onClear()"
57
59
  [showButton]="showButton"
@@ -82,7 +82,7 @@ StringFilterCellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
82
82
  [filterDelay]="filterDelay"
83
83
  [ngModel]="currentFilter?.value"></kendo-textbox>
84
84
  </kendo-grid-filter-wrapper-cell>
85
- `, isInline: true, components: [{ type: i4.FilterCellWrapperComponent, selector: "kendo-grid-filter-wrapper-cell", inputs: ["showOperators"] }, { type: i5.TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "errorIcon", "clearButtonIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }], directives: [{ type: i6.FocusableDirective, selector: "[kendoGridFocusable],\n [kendoGridEditCommand],\n [kendoGridRemoveCommand],\n [kendoGridSaveCommand],\n [kendoGridCancelCommand],\n [kendoGridSelectionCheckbox]\n ", inputs: ["kendoGridFocusable"] }, { type: i7.FilterInputDirective, selector: "[kendoFilterInput]", inputs: ["filterDelay", "columnLabel", "value"] }, { type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
85
+ `, isInline: true, components: [{ type: i4.FilterCellWrapperComponent, selector: "kendo-grid-filter-wrapper-cell", inputs: ["showOperators"] }, { type: i5.TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "successSvgIcon", "errorIcon", "errorSvgIcon", "clearButtonIcon", "clearButtonSvgIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }], directives: [{ type: i6.FocusableDirective, selector: "[kendoGridFocusable],\n [kendoGridEditCommand],\n [kendoGridRemoveCommand],\n [kendoGridSaveCommand],\n [kendoGridCancelCommand],\n [kendoGridSelectionCheckbox]\n ", inputs: ["kendoGridFocusable"] }, { type: i7.FilterInputDirective, selector: "[kendoFilterInput]", inputs: ["filterDelay", "columnLabel", "value"] }, { type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
86
86
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: StringFilterCellComponent, decorators: [{
87
87
  type: Component,
88
88
  args: [{
@@ -71,7 +71,11 @@ export class FilterInputDirective {
71
71
  this.renderer.setAttribute(focusableElement, 'aria-label', ariaValue);
72
72
  }
73
73
  else {
74
- this.renderer.setAttribute(this.element.nativeElement, 'aria-label', ariaValue);
74
+ const inputElement = this.element.nativeElement.querySelector('.k-input-inner');
75
+ const elementToSetLabel = inputElement ? inputElement : this.element.nativeElement;
76
+ if (ariaValue) {
77
+ this.renderer.setAttribute(elementToSetLabel, 'aria-label', ariaValue);
78
+ }
75
79
  }
76
80
  }
77
81
  }