@progress/kendo-vue-grid 3.7.4-dev.202212300853 → 3.7.4-dev.202301091431

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 (113) hide show
  1. package/dist/cdn/js/kendo-vue-grid.js +1 -1
  2. package/dist/es/Grid.js +234 -72
  3. package/dist/es/GridToolbar.js +5 -1
  4. package/dist/es/cells/GridCell.d.ts +8 -1
  5. package/dist/es/cells/GridCell.js +11 -2
  6. package/dist/es/cells/GridDetailCell.js +1 -1
  7. package/dist/es/cells/GridDetailHierarchyCell.js +1 -1
  8. package/dist/es/cells/GridEditCell.d.ts +8 -1
  9. package/dist/es/cells/GridEditCell.js +13 -4
  10. package/dist/es/cells/GridFilterCell.js +34 -22
  11. package/dist/es/cells/GridGroupCell.d.ts +14 -2
  12. package/dist/es/cells/GridGroupCell.js +26 -3
  13. package/dist/es/cells/GridHierarchyCell.js +15 -2
  14. package/dist/es/cells/GridSelectionCell.d.ts +8 -1
  15. package/dist/es/cells/GridSelectionCell.js +10 -1
  16. package/dist/es/columnMenu/ColumnMenu.js +10 -5
  17. package/dist/es/columnMenu/GridColumnMenuCheckboxFilter.js +4 -1
  18. package/dist/es/columnMenu/GridColumnMenuSort.js +8 -8
  19. package/dist/es/drag/ColumnDraggable.js +15 -2
  20. package/dist/es/drag/GroupingIndicator.js +25 -24
  21. package/dist/es/filterCommon.d.ts +4 -0
  22. package/dist/es/filterCommon.js +17 -1
  23. package/dist/es/footer/Footer.js +12 -2
  24. package/dist/es/footer/FooterRow.d.ts +1 -0
  25. package/dist/es/footer/FooterRow.js +12 -6
  26. package/dist/es/header/FilterRow.d.ts +1 -0
  27. package/dist/es/header/FilterRow.js +30 -30
  28. package/dist/es/header/GroupPanel.d.ts +1 -0
  29. package/dist/es/header/GroupPanel.js +18 -5
  30. package/dist/es/header/Header.js +4 -12
  31. package/dist/es/header/HeaderRow.d.ts +2 -0
  32. package/dist/es/header/HeaderRow.js +45 -15
  33. package/dist/es/interfaces/GridFilterCellProps.d.ts +12 -0
  34. package/dist/es/messages/main.d.ts +60 -0
  35. package/dist/es/messages/main.js +60 -0
  36. package/dist/es/package-metadata.js +1 -1
  37. package/dist/es/rows/GridRow.js +2 -2
  38. package/dist/es/utils/main.js +1 -1
  39. package/dist/esm/Grid.js +234 -72
  40. package/dist/esm/GridToolbar.js +5 -1
  41. package/dist/esm/cells/GridCell.d.ts +8 -1
  42. package/dist/esm/cells/GridCell.js +11 -2
  43. package/dist/esm/cells/GridDetailCell.js +1 -1
  44. package/dist/esm/cells/GridDetailHierarchyCell.js +1 -1
  45. package/dist/esm/cells/GridEditCell.d.ts +8 -1
  46. package/dist/esm/cells/GridEditCell.js +13 -4
  47. package/dist/esm/cells/GridFilterCell.js +34 -22
  48. package/dist/esm/cells/GridGroupCell.d.ts +14 -2
  49. package/dist/esm/cells/GridGroupCell.js +26 -3
  50. package/dist/esm/cells/GridHierarchyCell.js +15 -2
  51. package/dist/esm/cells/GridSelectionCell.d.ts +8 -1
  52. package/dist/esm/cells/GridSelectionCell.js +10 -1
  53. package/dist/esm/columnMenu/ColumnMenu.js +10 -5
  54. package/dist/esm/columnMenu/GridColumnMenuCheckboxFilter.js +4 -1
  55. package/dist/esm/columnMenu/GridColumnMenuSort.js +8 -8
  56. package/dist/esm/drag/ColumnDraggable.js +15 -2
  57. package/dist/esm/drag/GroupingIndicator.js +25 -24
  58. package/dist/esm/filterCommon.d.ts +4 -0
  59. package/dist/esm/filterCommon.js +17 -1
  60. package/dist/esm/footer/Footer.js +12 -2
  61. package/dist/esm/footer/FooterRow.d.ts +1 -0
  62. package/dist/esm/footer/FooterRow.js +12 -6
  63. package/dist/esm/header/FilterRow.d.ts +1 -0
  64. package/dist/esm/header/FilterRow.js +30 -30
  65. package/dist/esm/header/GroupPanel.d.ts +1 -0
  66. package/dist/esm/header/GroupPanel.js +18 -5
  67. package/dist/esm/header/Header.js +4 -12
  68. package/dist/esm/header/HeaderRow.d.ts +2 -0
  69. package/dist/esm/header/HeaderRow.js +45 -15
  70. package/dist/esm/interfaces/GridFilterCellProps.d.ts +12 -0
  71. package/dist/esm/messages/main.d.ts +60 -0
  72. package/dist/esm/messages/main.js +60 -0
  73. package/dist/esm/package-metadata.js +1 -1
  74. package/dist/esm/rows/GridRow.js +2 -2
  75. package/dist/esm/utils/main.js +1 -1
  76. package/dist/npm/Grid.js +234 -72
  77. package/dist/npm/GridToolbar.js +5 -1
  78. package/dist/npm/cells/GridCell.d.ts +8 -1
  79. package/dist/npm/cells/GridCell.js +11 -2
  80. package/dist/npm/cells/GridDetailCell.js +1 -1
  81. package/dist/npm/cells/GridDetailHierarchyCell.js +1 -1
  82. package/dist/npm/cells/GridEditCell.d.ts +8 -1
  83. package/dist/npm/cells/GridEditCell.js +13 -4
  84. package/dist/npm/cells/GridFilterCell.js +33 -21
  85. package/dist/npm/cells/GridGroupCell.d.ts +14 -2
  86. package/dist/npm/cells/GridGroupCell.js +26 -3
  87. package/dist/npm/cells/GridHierarchyCell.js +15 -2
  88. package/dist/npm/cells/GridSelectionCell.d.ts +8 -1
  89. package/dist/npm/cells/GridSelectionCell.js +10 -1
  90. package/dist/npm/columnMenu/ColumnMenu.js +10 -5
  91. package/dist/npm/columnMenu/GridColumnMenuCheckboxFilter.js +4 -1
  92. package/dist/npm/columnMenu/GridColumnMenuSort.js +8 -8
  93. package/dist/npm/drag/ColumnDraggable.js +15 -2
  94. package/dist/npm/drag/GroupingIndicator.js +25 -24
  95. package/dist/npm/filterCommon.d.ts +4 -0
  96. package/dist/npm/filterCommon.js +18 -1
  97. package/dist/npm/footer/Footer.js +12 -2
  98. package/dist/npm/footer/FooterRow.d.ts +1 -0
  99. package/dist/npm/footer/FooterRow.js +12 -6
  100. package/dist/npm/header/FilterRow.d.ts +1 -0
  101. package/dist/npm/header/FilterRow.js +28 -28
  102. package/dist/npm/header/GroupPanel.d.ts +1 -0
  103. package/dist/npm/header/GroupPanel.js +17 -4
  104. package/dist/npm/header/Header.js +4 -12
  105. package/dist/npm/header/HeaderRow.d.ts +2 -0
  106. package/dist/npm/header/HeaderRow.js +45 -15
  107. package/dist/npm/interfaces/GridFilterCellProps.d.ts +12 -0
  108. package/dist/npm/messages/main.d.ts +60 -0
  109. package/dist/npm/messages/main.js +61 -1
  110. package/dist/npm/package-metadata.js +1 -1
  111. package/dist/npm/rows/GridRow.js +2 -2
  112. package/dist/npm/utils/main.js +1 -1
  113. package/package.json +18 -16
@@ -5,6 +5,7 @@ var gh = allVue.h;
5
5
  var isV3 = allVue.version && allVue.version[0] === '3';
6
6
  var ref = allVue.ref;
7
7
  import { Draggable, getRef, Icon, setRef } from '@progress/kendo-vue-common';
8
+ import { sortAscSmallIcon, sortDescSmallIcon, xCircleIcon } from '@progress/kendo-svg-icons';
8
9
  /**
9
10
  * @hidden
10
11
  */
@@ -73,16 +74,16 @@ var GroupingIndicatorVue2 = {
73
74
  ref: 'draggable'
74
75
  }, this.v3 ? function () {
75
76
  return [h("div", {
76
- "class": "k-indicator-container",
77
+ "class": "k-chip k-chip-md k-chip-solid k-chip-solid-base k-rounded-md",
77
78
  ref: setRef(_this, 'indicatorContainer')
78
- }, [h("div", {
79
- "class": "k-chip k-chip-lg k-rounded-md k-chip-solid k-chip-solid-base"
80
79
  }, [h(Icon, {
81
80
  name: 'sort-' + _this.$props.dir + '-small',
82
81
  attrs: _this.v3 ? undefined : {
83
- name: 'sort-' + _this.$props.dir + '-small'
82
+ name: 'sort-' + _this.$props.dir + '-small',
83
+ icon: _this.$props.dir === 'asc' ? sortAscSmallIcon : sortDescSmallIcon
84
84
  },
85
- "class": 'k-chip-icon'
85
+ "class": 'k-chip-icon',
86
+ icon: _this.$props.dir === 'asc' ? sortAscSmallIcon : sortDescSmallIcon
86
87
  }), h("span", {
87
88
  "class": "k-chip-content",
88
89
  tabindex: -1,
@@ -93,9 +94,7 @@ var GroupingIndicatorVue2 = {
93
94
  on: _this.v3 ? undefined : {
94
95
  "click": _this.sortChange
95
96
  }
96
- }, [h("span", {
97
- "class": "k-chip-text"
98
- }, [_this.$props.title])]), h("span", {
97
+ }, [_this.$props.title]), h("span", {
99
98
  "class": "k-chip-actions"
100
99
  }, [h("span", {
101
100
  "class": "k-chip-action k-chip-remove-action",
@@ -108,22 +107,24 @@ var GroupingIndicatorVue2 = {
108
107
  "click": _this.groupRemove
109
108
  }
110
109
  }, [h(Icon, {
111
- name: "x",
110
+ name: "x-circle",
112
111
  attrs: _this.v3 ? undefined : {
113
- name: "x"
114
- }
115
- })])])])])];
112
+ name: "x-circle",
113
+ icon: xCircleIcon
114
+ },
115
+ icon: xCircleIcon
116
+ })])])])];
116
117
  } : [h("div", {
117
- "class": "k-indicator-container",
118
+ "class": "k-chip k-chip-md k-chip-solid k-chip-solid-base k-rounded-md",
118
119
  ref: setRef(_this, 'indicatorContainer')
119
- }, [h("div", {
120
- "class": "k-chip k-chip-lg k-rounded-md k-chip-solid k-chip-solid-base"
121
120
  }, [h(Icon, {
122
121
  name: 'sort-' + _this.$props.dir + '-small',
123
122
  attrs: _this.v3 ? undefined : {
124
- name: 'sort-' + _this.$props.dir + '-small'
123
+ name: 'sort-' + _this.$props.dir + '-small',
124
+ icon: _this.$props.dir === 'asc' ? sortAscSmallIcon : sortDescSmallIcon
125
125
  },
126
- "class": 'k-chip-icon'
126
+ "class": 'k-chip-icon',
127
+ icon: _this.$props.dir === 'asc' ? sortAscSmallIcon : sortDescSmallIcon
127
128
  }), h("span", {
128
129
  "class": "k-chip-content",
129
130
  tabindex: -1,
@@ -134,9 +135,7 @@ var GroupingIndicatorVue2 = {
134
135
  on: _this.v3 ? undefined : {
135
136
  "click": _this.sortChange
136
137
  }
137
- }, [h("span", {
138
- "class": "k-chip-text"
139
- }, [_this.$props.title])]), h("span", {
138
+ }, [_this.$props.title]), h("span", {
140
139
  "class": "k-chip-actions"
141
140
  }, [h("span", {
142
141
  "class": "k-chip-action k-chip-remove-action",
@@ -149,11 +148,13 @@ var GroupingIndicatorVue2 = {
149
148
  "click": _this.groupRemove
150
149
  }
151
150
  }, [h(Icon, {
152
- name: "x",
151
+ name: "x-circle",
153
152
  attrs: _this.v3 ? undefined : {
154
- name: "x"
155
- }
156
- })])])])])])
153
+ name: "x-circle",
154
+ icon: xCircleIcon
155
+ },
156
+ icon: xCircleIcon
157
+ })])])])])
157
158
  );
158
159
  }
159
160
  };
@@ -73,3 +73,7 @@ export declare const cellOperatorChange: (operator: any, e: any, value: any) =>
73
73
  operator: any;
74
74
  event: any;
75
75
  };
76
+ /**
77
+ * @hidden
78
+ */
79
+ export declare const getAriaLabel: (filterType: 'text' | 'numeric' | 'boolean' | 'date', service: any) => any;
@@ -1,4 +1,4 @@
1
- import { messages } from './messages/main';
1
+ import { messages, numericFilterAriaLabel, dateFilterAriaLabel, textFilterAriaLabel, booleanFilterAriaLabel } from './messages/main';
2
2
  /**
3
3
  * @hidden
4
4
  */
@@ -154,3 +154,19 @@ export var cellOperatorChange = function (operator, e, value) {
154
154
  }
155
155
  return { value: value, operator: operator, event: e };
156
156
  };
157
+ /**
158
+ * @hidden
159
+ */
160
+ export var getAriaLabel = function (filterType, service) {
161
+ switch (filterType) {
162
+ case 'text':
163
+ return service.toLanguageString(textFilterAriaLabel, messages[textFilterAriaLabel]);
164
+ case 'numeric':
165
+ return service.toLanguageString(numericFilterAriaLabel, messages[numericFilterAriaLabel]);
166
+ case 'boolean':
167
+ return service.toLanguageString(booleanFilterAriaLabel, messages[booleanFilterAriaLabel]);
168
+ case 'date':
169
+ return service.toLanguageString(dateFilterAriaLabel, messages[dateFilterAriaLabel]);
170
+ default: return;
171
+ }
172
+ };
@@ -85,7 +85,11 @@ var FooterVue2 = {
85
85
  var h = gh || createElement;
86
86
  if (!this.$props.staticHeaders) {
87
87
  return h("tfoot", {
88
- "class": "k-grid-footer"
88
+ "class": "k-table-tfoot k-grid-footer",
89
+ role: "rowgroup",
90
+ attrs: this.v3 ? undefined : {
91
+ role: "rowgroup"
92
+ }
89
93
  }, [this.$props.row]);
90
94
  }
91
95
  return h("div", {
@@ -99,7 +103,13 @@ var FooterVue2 = {
99
103
  style: this.tableStyle
100
104
  }, [h("colgroup", {
101
105
  ref: setRef(this, 'colGroupHeader')
102
- }, [this.$props.cols]), h("tfoot", [this.$props.row])])])]);
106
+ }, [this.$props.cols]), h("tfoot", {
107
+ "class": 'k-table-tfoot',
108
+ role: "rowgroup",
109
+ attrs: this.v3 ? undefined : {
110
+ role: "rowgroup"
111
+ }
112
+ }, [this.$props.row])])])]);
103
113
  }
104
114
  };
105
115
  /**
@@ -9,6 +9,7 @@ import { ExtendedColumnProps } from '../interfaces/ExtendedColumnProps';
9
9
  export interface FooterRowProps {
10
10
  columns: ExtendedColumnProps[];
11
11
  isRtl: boolean;
12
+ rowIndex: number;
12
13
  }
13
14
  export interface FooterRowMethods {
14
15
  [key: string]: any;
@@ -12,7 +12,8 @@ var FooterRowVue2 = {
12
12
  name: 'FooterRow',
13
13
  props: {
14
14
  isRtl: Boolean,
15
- columns: Array
15
+ columns: Array,
16
+ rowIndex: Number
16
17
  },
17
18
  methods: {
18
19
  columnStyles: function columnStyles(column) {
@@ -38,7 +39,7 @@ var FooterRowVue2 = {
38
39
  var renderCell = function renderCell(column, index) {
39
40
  var footerCellRendering = null;
40
41
  var stickyClassName = column.locked && column.left !== undefined ? 'k-grid-footer-sticky' : '';
41
- var tdClassName = column.footerClassName ? "".concat(column.footerClassName, " ").concat(stickyClassName) : stickyClassName;
42
+ var tdClassName = column.footerClassName ? "k-table-td ".concat(column.footerClassName, " ").concat(stickyClassName) : 'k-table-td' + stickyClassName;
42
43
  footerCellRendering = getTemplate.call(this, {
43
44
  h: h,
44
45
  template: column.footerCell,
@@ -53,17 +54,22 @@ var FooterRowVue2 = {
53
54
  key: index,
54
55
  colspan: column.colSpan !== 1 ? column.colSpan : undefined,
55
56
  attrs: this.v3 ? undefined : {
56
- colspan: column.colSpan !== 1 ? column.colSpan : undefined
57
+ colspan: column.colSpan !== 1 ? column.colSpan : undefined,
58
+ role: 'gridcell'
57
59
  },
58
60
  style: this.columnStyles(column),
59
- "class": tdClassName
61
+ "class": tdClassName,
62
+ role: 'gridcell'
60
63
  }, [footerCellRendering]);
61
64
  };
62
65
  return h("tr", {
66
+ "class": 'k-table-row',
63
67
  role: 'row',
64
68
  attrs: this.v3 ? undefined : {
65
- role: 'row'
66
- }
69
+ role: 'row',
70
+ "aria-rowIndex": this.$props.rowIndex
71
+ },
72
+ "aria-rowIndex": this.$props.rowIndex
67
73
  }, [footerColumns(this.$props.columns).map(renderCell, this)]);
68
74
  }
69
75
  };
@@ -18,6 +18,7 @@ export interface FilterRowProps {
18
18
  cellRender?: any;
19
19
  isRtl?: boolean;
20
20
  ariaRowIndex?: number;
21
+ size?: null | 'small' | 'medium' | 'large' | string;
21
22
  }
22
23
  /**
23
24
  * @hidden
@@ -4,11 +4,11 @@ var allVue = Vue;
4
4
  var gh = allVue.h;
5
5
  var isV3 = allVue.version && allVue.version[0] === '3';
6
6
  var inject = allVue.inject;
7
- import { operatorMap, booleanFilterValues, getFilterType } from '../filterCommon';
7
+ import { operatorMap, booleanFilterValues, getFilterType, getAriaLabel } from '../filterCommon';
8
8
  import { GridFilterCell } from '../cells/GridFilterCell';
9
9
  import { provideLocalizationService } from '@progress/kendo-vue-intl';
10
10
  import { filterAriaLabel, messages } from '../messages/main';
11
- import { tableKeyboardNavigationTools as navigationTools, HeaderThElement } from '@progress/kendo-vue-data-tools';
11
+ import { tableKeyboardNavigationTools as navigationTools, HeaderTdElement } from '@progress/kendo-vue-data-tools';
12
12
  import { classNames } from '@progress/kendo-vue-common';
13
13
  /**
14
14
  * @hidden
@@ -23,7 +23,8 @@ var FilterRowVue2 = {
23
23
  sort: [Object, Array],
24
24
  cellRender: [String, Function, Object],
25
25
  isRtl: Boolean,
26
- ariaRowIndex: Number
26
+ ariaRowIndex: Number,
27
+ size: String
27
28
  },
28
29
  inject: {
29
30
  kendoLocalizationService: {
@@ -31,15 +32,6 @@ var FilterRowVue2 = {
31
32
  }
32
33
  },
33
34
  methods: {
34
- headerCellClassName: function headerCellClassName(field, locked) {
35
- var result = "".concat(locked ? 'k-grid-header-sticky' : '');
36
- if (this.$props.sort && this.$props.sort.filter(function (descriptor) {
37
- return descriptor.field === field;
38
- }).length > 0) {
39
- result += ' k-sorted';
40
- }
41
- return result;
42
- },
43
35
  setFilter: function setFilter(value, operator, field, e) {
44
36
  var filters = [];
45
37
  if (value !== '' && value !== null || operator !== '') {
@@ -94,7 +86,6 @@ var FilterRowVue2 = {
94
86
  })[0];
95
87
  return found ? found.operator : null;
96
88
  };
97
- var filterCellProps;
98
89
  var serviceIndex = 0,
99
90
  index = -1;
100
91
  var filterCells = this.$props.columns.filter(function (c) {
@@ -105,6 +96,7 @@ var FilterRowVue2 = {
105
96
  _this.setFilter(e.value, e.operator, column.field, e);
106
97
  };
107
98
  var filterType = getFilterType(column.filter);
99
+ var ariaLabelFilter = column.field + ' ' + getAriaLabel(filterType, intl);
108
100
  // @ts-ignore
109
101
  var filterRender = h(GridFilterCell, {
110
102
  grid: this.$props.grid,
@@ -117,7 +109,9 @@ var FilterRowVue2 = {
117
109
  operators: operatorMap(this.$props.filterOperators[filterType] || [], intl),
118
110
  booleanValues: operatorMap(booleanFilterValues, intl),
119
111
  filterType: filterType,
120
- render: column.filterCell || this.$props.cellRender
112
+ render: column.filterCell || this.$props.cellRender,
113
+ ariaLabel: ariaLabelFilter,
114
+ size: this.$props.size
121
115
  },
122
116
  field: column.field,
123
117
  title: column.filterTitle,
@@ -130,7 +124,9 @@ var FilterRowVue2 = {
130
124
  on: this.v3 ? undefined : {
131
125
  "change": onChangeFn
132
126
  },
133
- render: column.filterCell || this.$props.cellRender
127
+ render: column.filterCell || this.$props.cellRender,
128
+ ariaLabel: ariaLabelFilter,
129
+ size: this.$props.size
134
130
  });
135
131
  var key = column.declarationIndex >= 0 ? ++index : --serviceIndex;
136
132
  var ariaAttrs = {
@@ -146,43 +142,47 @@ var FilterRowVue2 = {
146
142
  } : {};
147
143
  var filterCell =
148
144
  // @ts-ignore function children
149
- h(HeaderThElement, {
145
+ h(HeaderTdElement, {
150
146
  key: key,
151
- columnId: navigationTools.getFilterColumnId(column.id),
147
+ role: 'gridcell',
152
148
  attrs: this.v3 ? undefined : {
149
+ role: 'gridcell',
153
150
  columnId: navigationTools.getFilterColumnId(column.id),
154
151
  navigatable: column.navigatable,
155
- ariaLabel: ariaAttrs.ariaLabel,
156
- ariaColumnIndex: ariaAttrs.ariaColumnIndex
152
+ ariaColumnIndex: ariaAttrs.ariaColumnIndex,
153
+ ariaLabel: ariaLabelFilter
157
154
  },
155
+ columnId: navigationTools.getFilterColumnId(column.id),
158
156
  navigatable: column.navigatable,
159
157
  style: style,
160
- "class": classNames('k-header', this.headerCellClassName(column.field, column.locked) || undefined),
161
- ariaLabel: ariaAttrs.ariaLabel,
162
- ariaColumnIndex: ariaAttrs.ariaColumnIndex
158
+ "class": classNames('k-table-th', this.headerCellClassName(column.field, column.locked) || undefined),
159
+ ariaColumnIndex: ariaAttrs.ariaColumnIndex,
160
+ ariaLabel: ariaLabelFilter
163
161
  }, this.v3 ? function () {
164
162
  return [filterRender];
165
163
  } : [filterRender]);
166
164
  return column.filterable && filterCell ||
167
165
  // @ts-ignore function children
168
- h(HeaderThElement, {
166
+ h(HeaderTdElement, {
169
167
  key: key,
170
- columnId: navigationTools.getFilterColumnId(column.id),
168
+ role: 'gridcell',
171
169
  attrs: this.v3 ? undefined : {
170
+ role: 'gridcell',
172
171
  columnId: navigationTools.getFilterColumnId(column.id),
173
172
  navigatable: column.navigatable,
174
- ariaLabel: ariaAttrs.ariaLabel,
175
- ariaColumnIndex: ariaAttrs.ariaColumnIndex
173
+ ariaColumnIndex: ariaAttrs.ariaColumnIndex,
174
+ ariaLabel: ariaLabelFilter
176
175
  },
176
+ columnId: navigationTools.getFilterColumnId(column.id),
177
177
  navigatable: column.navigatable,
178
178
  style: style,
179
- "class": classNames('k-header', this.headerCellClassName(column.field, column.locked) || undefined),
180
- ariaLabel: ariaAttrs.ariaLabel,
181
- ariaColumnIndex: ariaAttrs.ariaColumnIndex
179
+ "class": classNames('k-table-th', this.headerCellClassName(column.field, column.locked) || undefined),
180
+ ariaColumnIndex: ariaAttrs.ariaColumnIndex,
181
+ ariaLabel: ariaLabelFilter
182
182
  });
183
183
  }, this);
184
184
  return h("tr", {
185
- "class": "k-filter-row",
185
+ "class": "k-table-row k-filter-row",
186
186
  "aria-rowindex": this.ariaRowIndex,
187
187
  attrs: this.v3 ? undefined : {
188
188
  "aria-rowindex": this.ariaRowIndex,
@@ -11,6 +11,7 @@ declare type DefaultMethods<V> = {
11
11
  export interface GroupPanelProps extends ColumnDraggableProps {
12
12
  ref?: any;
13
13
  group: GroupDescriptor[];
14
+ ariaControls: String;
14
15
  onGroupChange?: (groups: GroupDescriptor[], event: any) => void;
15
16
  resolveTitle: (field: string) => string;
16
17
  onPressHandler?: (draggableEvent: any, element: HTMLElement) => void;
@@ -5,7 +5,7 @@ var gh = allVue.h;
5
5
  var isV3 = allVue.version && allVue.version[0] === '3';
6
6
  var inject = allVue.inject;
7
7
  import { GroupingIndicator } from '../drag/GroupingIndicator';
8
- import { messages, groupPanelEmpty as messageKey } from '../messages/main';
8
+ import { messages, groupPanelEmpty as messageKey, groupHeaderAriaLabel } from '../messages/main';
9
9
  import { provideLocalizationService } from '@progress/kendo-vue-intl';
10
10
  /**
11
11
  * @hidden
@@ -13,7 +13,8 @@ import { provideLocalizationService } from '@progress/kendo-vue-intl';
13
13
  var GroupPanelVue2 = {
14
14
  props: {
15
15
  group: Array,
16
- resolveTitle: Function
16
+ resolveTitle: Function,
17
+ ariaControls: String
17
18
  },
18
19
  inject: {
19
20
  kendoLocalizationService: {
@@ -57,6 +58,7 @@ var GroupPanelVue2 = {
57
58
  render: function render(createElement) {
58
59
  var h = gh || createElement;
59
60
  var groupsProp = this.$props.group || [];
61
+ var ariaControls = this.$props.ariaControls;
60
62
  var groups = groupsProp.map(function (groupDesc, index) {
61
63
  var _this = this;
62
64
  return (
@@ -92,10 +94,21 @@ var GroupPanelVue2 = {
92
94
  })
93
95
  );
94
96
  }, this);
97
+ var groupHeaderAriaLabelValue = provideLocalizationService(this).toLanguageString(groupHeaderAriaLabel, messages[groupHeaderAriaLabel]);
95
98
  return h("div", {
96
- "class": "k-grouping-header k-grouping-header-flex"
97
- }, [groups, h("div", {
98
- "class": "k-indicator-container"
99
+ "class": "k-grouping-header",
100
+ role: 'toolbar',
101
+ attrs: this.v3 ? undefined : {
102
+ role: 'toolbar',
103
+ "aria-label": groupHeaderAriaLabelValue,
104
+ "aria-controls": ariaControls
105
+ },
106
+ "aria-label": groupHeaderAriaLabelValue,
107
+ "aria-controls": ariaControls
108
+ }, [!!groups.length && h("div", {
109
+ "class": "k-chip-list k-chip-list-md"
110
+ }, [groups]), h("div", {
111
+ "class": "k-grouping-drop-container"
99
112
  }, [!groups.length && provideLocalizationService(this).toLanguageString(messageKey, messages[messageKey])])]);
100
113
  }
101
114
  };
@@ -92,24 +92,16 @@ var HeaderVue2 = {
92
92
  }
93
93
  return h("div", {
94
94
  "class": this.wrapperClass,
95
- style: this.divStyle,
96
- role: "presentation",
97
- attrs: this.v3 ? undefined : {
98
- role: "presentation"
99
- }
95
+ style: this.divStyle
100
96
  }, [h("div", {
101
97
  ref: setRef(this, 'headerWrap'),
102
- "class": "k-grid-header-wrap",
103
- role: "presentation",
104
- attrs: this.v3 ? undefined : {
105
- role: "presentation"
106
- }
98
+ "class": "k-grid-header-wrap"
107
99
  }, [h("table", {
108
100
  "class": this.tableClass,
109
101
  ref: setRef(this, 'table'),
110
- role: "presentation",
102
+ role: "none",
111
103
  attrs: this.v3 ? undefined : {
112
- role: "presentation"
104
+ role: "none"
113
105
  }
114
106
  }, [h("colgroup", {
115
107
  ref: setRef(this, 'colGroupHeader')
@@ -35,6 +35,8 @@ export interface HeaderRowProps extends ColumnDraggableProps {
35
35
  columnMenuAnimate?: boolean | PopupAnimation;
36
36
  onFilterChange?: Function;
37
37
  isRtl?: boolean;
38
+ isColCountDefined?: boolean;
39
+ columnsInitial?: ExtendedColumnProps[];
38
40
  }
39
41
  /**
40
42
  * @hidden
@@ -10,6 +10,9 @@ import { GridHeaderCell } from './GridHeaderCell';
10
10
  import { ColumnMenu } from '../columnMenu/ColumnMenu';
11
11
  import { templateRendering, hasListener, getListeners, Keys, noop, Icon } from '@progress/kendo-vue-common';
12
12
  import { HeaderThElement } from '@progress/kendo-vue-data-tools'; // from '../../../datatools/src/main';
13
+ import { messages, sortableColumnAriaLabel, sortableColumnAscendingAriaLabel, sortableColumnDescendingAriaLabel } from '../messages/main';
14
+ import { provideLocalizationService } from '@progress/kendo-vue-intl';
15
+ import { sortAscSmallIcon, sortDescSmallIcon } from '@progress/kendo-svg-icons';
13
16
  /**
14
17
  * @hidden
15
18
  */
@@ -62,11 +65,18 @@ var HeaderRowVue2 = {
62
65
  return true;
63
66
  }
64
67
  },
65
- isRtl: Boolean
68
+ isRtl: Boolean,
69
+ isColCountDefined: Boolean,
70
+ // columnsInitial prop:
71
+ // Needed for hidden column scenarios. By this value we can define correct aria-colindex attribute
72
+ columnsInitial: Array
66
73
  },
67
74
  inject: {
68
75
  onNavFocus: {
69
76
  default: noop
77
+ },
78
+ kendoLocalizationService: {
79
+ default: null
70
80
  }
71
81
  },
72
82
  data: function data() {
@@ -127,7 +137,7 @@ var HeaderRowVue2 = {
127
137
  },
128
138
  cellClass: function cellClass(field, headerClassName, locked) {
129
139
  var customClass = headerClassName ? ' ' + headerClassName : '';
130
- var result = "k-header ".concat(locked ? 'k-grid-header-sticky' : '') + customClass;
140
+ var result = "k-header" + (locked ? ' k-grid-header-sticky' : '') + customClass;
131
141
  if (this.$props.sort && this.$props.sort.filter(function (descriptor) {
132
142
  return descriptor.field === field;
133
143
  }).length > 0) {
@@ -167,6 +177,7 @@ var HeaderRowVue2 = {
167
177
  theadClasses: {
168
178
  get: function get() {
169
179
  return {
180
+ 'k-table-thead': true,
170
181
  'k-grid-header': true
171
182
  };
172
183
  }
@@ -182,6 +193,10 @@ var HeaderRowVue2 = {
182
193
  // @ts-ignore
183
194
  render: function render(createElement) {
184
195
  var h = gh || createElement;
196
+ var localizationService = provideLocalizationService(this);
197
+ var ariaLabelSortableColumn = localizationService.toLanguageString(sortableColumnAriaLabel, messages[sortableColumnAriaLabel]);
198
+ var ariaLabelAscendingSort = localizationService.toLanguageString(sortableColumnAscendingAriaLabel, messages[sortableColumnAscendingAriaLabel]);
199
+ var ariaLabelDescendingSort = localizationService.toLanguageString(sortableColumnDescendingAriaLabel, messages[sortableColumnDescendingAriaLabel]);
185
200
  this.serviceIndex = 0;
186
201
  this.index = -1;
187
202
  var cells = function cells(rowIndexes) {
@@ -198,14 +213,17 @@ var HeaderRowVue2 = {
198
213
  if (!this.$props.sort) {
199
214
  return null;
200
215
  }
216
+ var currentDir = iconSortIndex >= 0 ? this.$props.sort[iconSortIndex].dir : '';
201
217
  return iconSortIndex >= 0 && [h("span", {
202
218
  key: 1,
203
219
  "class": 'k-sort-icon'
204
220
  }, [h(Icon, {
205
- name: 'sort-' + this.$props.sort[iconSortIndex].dir + '-small',
221
+ name: 'sort-' + currentDir + '-small',
206
222
  attrs: this.v3 ? undefined : {
207
- name: 'sort-' + this.$props.sort[iconSortIndex].dir + '-small'
208
- }
223
+ name: 'sort-' + currentDir + '-small',
224
+ icon: currentDir === 'asc' ? sortAscSmallIcon : sortDescSmallIcon
225
+ },
226
+ icon: currentDir === 'asc' ? sortAscSmallIcon : sortDescSmallIcon
209
227
  })]), this.$props.sort.length > 1 && h("span", {
210
228
  key: 2,
211
229
  "class": 'k-sort-icon'
@@ -214,8 +232,8 @@ var HeaderRowVue2 = {
214
232
  }, [iconSortIndex + 1])])];
215
233
  };
216
234
  var sortIcon = sortIconRenderer.call(this, sortIndex);
217
- var className = (column.kFirst ? 'k-first ' : '') + this.cellClass(column.field, column.headerClassName, column.locked);
218
235
  var columnMenu = column.columnMenu || column.columnMenu === false ? column.columnMenu : this.$props.columnMenu;
236
+ var className = (column.kFirst ? 'k-first ' : '') + this.cellClass(column.field, column.headerClassName, column.locked) + (columnMenu ? ' k-filterable' : '');
219
237
  var columnMenuRender = !columnMenu || typeof columnMenu === 'boolean' ? !!columnMenu : this.getTemplate(columnMenu);
220
238
  var style = column.left !== undefined ? !this.$props.isRtl ? {
221
239
  left: column.left + 'px',
@@ -224,32 +242,41 @@ var HeaderRowVue2 = {
224
242
  left: column.right + 'px',
225
243
  right: column.left + 'px'
226
244
  } : {};
245
+ var getAriaLabel = ariaSortMap[sortDir] === 'none' ? ariaLabelSortableColumn : ariaSortMap[sortDir] === 'ascending' ? ariaLabelAscendingSort : ariaLabelDescendingSort;
227
246
  var ariaAttrs = column.isAccessible ? {
228
247
  ariaSort: ariaSortMap[sortDir],
248
+ ariaLabel: getAriaLabel,
229
249
  role: 'columnheader',
230
- ariaColumnIndex: column.ariaColumnIndex,
231
- ariaSelected: false
250
+ ariaColumnIndex: this.$props.isColCountDefined ? this.$props.columnsInitial.findIndex(function (col) {
251
+ return col.field === column.field;
252
+ }) + 1 : undefined,
253
+ ariaSelected: false,
254
+ ariaHaspopup: columnMenu ? 'menu' : this.$props.filterable && column.filterable ? 'dialog' : undefined
232
255
  } : {
233
- 'role': 'presentation'
256
+ role: 'columnheader'
234
257
  };
235
258
  var key = column.declarationIndex >= 0 ? ++this.index : --this.serviceIndex;
236
259
  return (
237
260
  // @ts-ignore function children
238
261
  h(HeaderThElement, {
239
- ariaSort: ariaAttrs.ariaSort,
262
+ ariaSort: sortable ? ariaAttrs.ariaSort : undefined,
240
263
  attrs: this.v3 ? undefined : {
241
- ariaSort: ariaAttrs.ariaSort,
264
+ ariaSort: sortable ? ariaAttrs.ariaSort : undefined,
265
+ ariaLabel: sortable ? ariaAttrs.ariaLabel : undefined,
242
266
  role: ariaAttrs.role,
243
267
  ariaColumnIndex: ariaAttrs.ariaColumnIndex,
244
268
  ariaSelected: ariaAttrs.ariaSelected,
269
+ ariaHaspopup: ariaAttrs.ariaHaspopup,
245
270
  colSpan: column.colSpan,
246
271
  rowSpan: column.rowSpan,
247
272
  columnId: column.id,
248
273
  navigatable: column.navigatable
249
274
  },
275
+ ariaLabel: sortable ? ariaAttrs.ariaLabel : undefined,
250
276
  role: ariaAttrs.role,
251
277
  ariaColumnIndex: ariaAttrs.ariaColumnIndex,
252
278
  ariaSelected: ariaAttrs.ariaSelected,
279
+ ariaHaspopup: ariaAttrs.ariaHaspopup,
253
280
  key: key,
254
281
  colSpan: column.colSpan,
255
282
  rowSpan: column.rowSpan,
@@ -480,9 +507,9 @@ var HeaderRowVue2 = {
480
507
  }, this);
481
508
  };
482
509
  return h("thead", {
483
- role: "presentation",
510
+ role: "rowgroup",
484
511
  attrs: this.v3 ? undefined : {
485
- role: "presentation",
512
+ role: "rowgroup",
486
513
  "data-keyboardnavheader": true
487
514
  },
488
515
  "class": this.theadClasses,
@@ -504,10 +531,13 @@ var HeaderRowVue2 = {
504
531
  }, this.v3 ? function () {
505
532
  return [cells.call(_this3, rowIndexes)];
506
533
  } : [cells.call(_this3, rowIndexes)]) || h("tr", {
534
+ "class": 'k-table-row',
507
535
  role: 'row',
508
536
  attrs: this.v3 ? undefined : {
509
- role: 'row'
510
- }
537
+ role: 'row',
538
+ "aria-rowindex": this.columnsMap.length
539
+ },
540
+ "aria-rowindex": this.columnsMap.length
511
541
  }, [cells.call(this, rowIndexes)]);
512
542
  }, this), this.$props.filterRow]);
513
543
  }
@@ -65,4 +65,16 @@ export interface GridFilterCellProps {
65
65
  * The ariaLabel of the filter editor.
66
66
  */
67
67
  ariaLabel?: string;
68
+ /**
69
+ * Configures the `size` of the cell.
70
+ *
71
+ * The available options are:
72
+ * - small
73
+ * - medium
74
+ * - large
75
+ * - null&mdash;Does not set a size `class`.
76
+ *
77
+ * @default `medium`
78
+ */
79
+ size?: null | 'small' | 'medium' | 'large' | string;
68
80
  }