@progress/kendo-vue-data-tools 3.5.2 → 3.5.4-dev.202209071223

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 (62) hide show
  1. package/dist/cdn/js/kendo-vue-data-tools.js +1 -1
  2. package/dist/es/cells/FilterCell.d.ts +7 -2
  3. package/dist/es/cells/FilterCell.js +32 -21
  4. package/dist/es/filter/Expression.js +33 -17
  5. package/dist/es/filter/filters/EnumFilter.js +10 -5
  6. package/dist/es/filter/filters/TextFilter.d.ts +4 -0
  7. package/dist/es/filter/filters/TextFilter.js +11 -3
  8. package/dist/es/header/FilterRow.d.ts +8 -2
  9. package/dist/es/header/FilterRow.js +14 -6
  10. package/dist/es/header/Header.js +0 -4
  11. package/dist/es/header/HeaderCell.d.ts +1 -1
  12. package/dist/es/header/HeaderCell.js +8 -5
  13. package/dist/es/header/HeaderRow.js +21 -9
  14. package/dist/es/interfaces/FilterCellProps.d.ts +4 -0
  15. package/dist/es/messages/main.d.ts +45 -0
  16. package/dist/es/messages/main.js +45 -0
  17. package/dist/es/package-metadata.js +1 -1
  18. package/dist/es/pager/Pager.js +10 -9
  19. package/dist/es/pager/PagerNavigationButton.d.ts +7 -1
  20. package/dist/es/pager/PagerNavigationButton.js +6 -1
  21. package/dist/es/pager/PagerNumericButtons.js +1 -1
  22. package/dist/esm/cells/FilterCell.d.ts +7 -2
  23. package/dist/esm/cells/FilterCell.js +32 -21
  24. package/dist/esm/filter/Expression.js +33 -17
  25. package/dist/esm/filter/filters/EnumFilter.js +10 -5
  26. package/dist/esm/filter/filters/TextFilter.d.ts +4 -0
  27. package/dist/esm/filter/filters/TextFilter.js +11 -3
  28. package/dist/esm/header/FilterRow.d.ts +8 -2
  29. package/dist/esm/header/FilterRow.js +14 -6
  30. package/dist/esm/header/Header.js +0 -4
  31. package/dist/esm/header/HeaderCell.d.ts +1 -1
  32. package/dist/esm/header/HeaderCell.js +8 -5
  33. package/dist/esm/header/HeaderRow.js +21 -9
  34. package/dist/esm/interfaces/FilterCellProps.d.ts +4 -0
  35. package/dist/esm/messages/main.d.ts +45 -0
  36. package/dist/esm/messages/main.js +45 -0
  37. package/dist/esm/package-metadata.js +1 -1
  38. package/dist/esm/pager/Pager.js +10 -9
  39. package/dist/esm/pager/PagerNavigationButton.d.ts +7 -1
  40. package/dist/esm/pager/PagerNavigationButton.js +6 -1
  41. package/dist/esm/pager/PagerNumericButtons.js +1 -1
  42. package/dist/npm/cells/FilterCell.d.ts +7 -2
  43. package/dist/npm/cells/FilterCell.js +31 -20
  44. package/dist/npm/filter/Expression.js +32 -16
  45. package/dist/npm/filter/filters/EnumFilter.js +9 -4
  46. package/dist/npm/filter/filters/TextFilter.d.ts +4 -0
  47. package/dist/npm/filter/filters/TextFilter.js +13 -3
  48. package/dist/npm/header/FilterRow.d.ts +8 -2
  49. package/dist/npm/header/FilterRow.js +14 -6
  50. package/dist/npm/header/Header.js +0 -4
  51. package/dist/npm/header/HeaderCell.d.ts +1 -1
  52. package/dist/npm/header/HeaderCell.js +8 -5
  53. package/dist/npm/header/HeaderRow.js +21 -9
  54. package/dist/npm/interfaces/FilterCellProps.d.ts +4 -0
  55. package/dist/npm/messages/main.d.ts +45 -0
  56. package/dist/npm/messages/main.js +46 -1
  57. package/dist/npm/package-metadata.js +1 -1
  58. package/dist/npm/pager/Pager.js +10 -9
  59. package/dist/npm/pager/PagerNavigationButton.d.ts +7 -1
  60. package/dist/npm/pager/PagerNavigationButton.js +6 -1
  61. package/dist/npm/pager/PagerNumericButtons.js +1 -1
  62. package/package.json +10 -10
@@ -7,7 +7,7 @@ import { FilterCellProps } from '../interfaces/FilterCellProps';
7
7
  /**
8
8
  * @hidden
9
9
  */
10
- export interface FilterCellMethods extends Vue2type {
10
+ export interface FilterCellMethods {
11
11
  triggerClick: () => void;
12
12
  inputChange: (value: any, e: any) => void;
13
13
  operatorChange: (operatorValue: any, e: any) => void;
@@ -18,7 +18,12 @@ export interface FilterCellMethods extends Vue2type {
18
18
  /**
19
19
  * @hidden
20
20
  */
21
- declare let FilterCellVue2: ComponentOptions<Vue2type, DefaultData<{}>, DefaultMethods<FilterCellMethods>, {}, RecordPropsDefinition<FilterCellProps>>;
21
+ export interface FilterCellAll extends FilterCellMethods, FilterCellProps, Vue2type {
22
+ }
23
+ /**
24
+ * @hidden
25
+ */
26
+ declare let FilterCellVue2: ComponentOptions<Vue2type, DefaultData<{}>, DefaultMethods<FilterCellAll>, {}, RecordPropsDefinition<FilterCellProps>>;
22
27
  /**
23
28
  * @hidden
24
29
  */
@@ -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 { Button } from '@progress/kendo-vue-buttons';
8
- import { messages, columnMenuFilterClearButton as filterClearButton, columnMenuFilterChooseOperator as filterChooseOperator } from '../messages/main';
8
+ import { messages, columnMenuFilterClearButton as filterClearButton, columnMenuFilterChooseOperator as filterChooseOperator, filterTextFilterAriaLabel, filterEnumFilterDropdownAriaLabel, filterDateFilterAriaLabel, filterNumericFilterAriaLabel, filterDropDownOperatorAriaLabel } from '../messages/main';
9
9
  import { DropDownList } from '@progress/kendo-vue-dropdowns';
10
10
  import { NumericTextBox } from '@progress/kendo-vue-inputs';
11
11
  import { DatePicker } from '@progress/kendo-vue-dateinputs';
@@ -34,7 +34,8 @@ var FilterCellVue2 = {
34
34
  operators: Array,
35
35
  booleanValues: Array,
36
36
  onChange: Function,
37
- render: [String, Function, Object]
37
+ render: [String, Function, Object],
38
+ ariaLabel: String
38
39
  },
39
40
  inject: {
40
41
  kendoLocalizationService: {
@@ -86,7 +87,7 @@ var FilterCellVue2 = {
86
87
  var _this = this;
87
88
 
88
89
  var h = gh || createElement;
89
- var localizationService = provideLocalizationService(this);
90
+ var ls = provideLocalizationService(this);
90
91
  var selectedOperator = this.$props.operators.find(function (item) {
91
92
  return item.operator === _this.$props.operator;
92
93
  }) || null;
@@ -108,19 +109,21 @@ var FilterCellVue2 = {
108
109
  iconClassName: "k-i-filter k-icon",
109
110
  "data-items": this.$props.operators,
110
111
  textField: "text",
111
- title: localizationService.toLanguageString(filterChooseOperator, messages[filterChooseOperator]),
112
+ title: ls.toLanguageString(filterChooseOperator, messages[filterChooseOperator]),
112
113
  popupSettings: {
113
114
  width: ''
114
- }
115
+ },
116
+ "aria-label": this.ariaLabel || ls.toLanguageString(filterDropDownOperatorAriaLabel, messages[filterDropDownOperatorAriaLabel])
115
117
  },
116
118
  "class": "k-dropdown-operator",
117
119
  iconClassName: "k-i-filter k-icon",
118
120
  "data-items": this.$props.operators,
119
121
  textField: "text",
120
- title: localizationService.toLanguageString(filterChooseOperator, messages[filterChooseOperator]),
122
+ title: ls.toLanguageString(filterChooseOperator, messages[filterChooseOperator]),
121
123
  popupSettings: {
122
124
  width: ''
123
- }
125
+ },
126
+ "aria-label": this.ariaLabel || ls.toLanguageString(filterDropDownOperatorAriaLabel, messages[filterDropDownOperatorAriaLabel])
124
127
  })
125
128
  );
126
129
  };
@@ -135,7 +138,8 @@ var FilterCellVue2 = {
135
138
  value: value,
136
139
  attrs: this.v3 ? undefined : {
137
140
  value: value,
138
- title: this.$props.title
141
+ title: this.$props.title,
142
+ "aria-label": this.ariaLabel || ls.toLanguageString(filterNumericFilterAriaLabel, messages[filterNumericFilterAriaLabel])
139
143
  },
140
144
  onChange: function onChange(e) {
141
145
  _this.inputChange(e.value, e.event);
@@ -145,7 +149,8 @@ var FilterCellVue2 = {
145
149
  _this.inputChange(e.value, e.event);
146
150
  }
147
151
  },
148
- title: this.$props.title
152
+ title: this.$props.title,
153
+ "aria-label": this.ariaLabel || ls.toLanguageString(filterNumericFilterAriaLabel, messages[filterNumericFilterAriaLabel])
149
154
  })
150
155
  );
151
156
 
@@ -155,7 +160,8 @@ var FilterCellVue2 = {
155
160
  value: value,
156
161
  attrs: this.v3 ? undefined : {
157
162
  value: value,
158
- title: this.$props.title
163
+ title: this.$props.title,
164
+ "aria-label": this.ariaLabel || ls.toLanguageString(filterDateFilterAriaLabel, messages[filterDateFilterAriaLabel])
159
165
  },
160
166
  onChange: function onChange(e) {
161
167
  _this.inputChange(e.value, e);
@@ -165,7 +171,8 @@ var FilterCellVue2 = {
165
171
  _this.inputChange(e.value, e);
166
172
  }
167
173
  },
168
- title: this.$props.title
174
+ title: this.$props.title,
175
+ "aria-label": this.ariaLabel || ls.toLanguageString(filterDateFilterAriaLabel, messages[filterDateFilterAriaLabel])
169
176
  })
170
177
  );
171
178
 
@@ -186,11 +193,13 @@ var FilterCellVue2 = {
186
193
  }),
187
194
  "data-items": booleanValues,
188
195
  textField: "text",
189
- title: this.$props.title
196
+ title: this.$props.title,
197
+ "aria-label": this.ariaLabel || ls.toLanguageString(filterEnumFilterDropdownAriaLabel, messages[filterEnumFilterDropdownAriaLabel])
190
198
  },
191
199
  "data-items": booleanValues,
192
200
  textField: "text",
193
- title: this.$props.title
201
+ title: this.$props.title,
202
+ "aria-label": this.ariaLabel || ls.toLanguageString(filterEnumFilterDropdownAriaLabel, messages[filterEnumFilterDropdownAriaLabel])
194
203
  })
195
204
  );
196
205
 
@@ -213,35 +222,37 @@ var FilterCellVue2 = {
213
222
  },
214
223
  title: this.$props.title,
215
224
  attrs: this.v3 ? undefined : {
216
- title: this.$props.title
217
- }
225
+ title: this.$props.title,
226
+ "aria-label": this.ariaLabel || ls.toLanguageString(filterTextFilterAriaLabel, messages[filterTextFilterAriaLabel])
227
+ },
228
+ "aria-label": this.ariaLabel || ls.toLanguageString(filterTextFilterAriaLabel, messages[filterTextFilterAriaLabel])
218
229
  })]);
219
230
  }
220
231
  };
221
232
 
222
233
  var defaultRendering = h("div", {
223
234
  "class": "k-filtercell"
224
- }, [h("div", {
225
- "class": "k-filtercell-wrapper"
226
- }, [filterComponent.call(this, this.$props.filterType, this.$props.value), renderOperatorEditor.call(this), // @ts-ignore function children
235
+ }, [h("span", [filterComponent.call(this, this.$props.filterType, this.$props.value), h("div", {
236
+ "class": "k-filtercell-operator"
237
+ }, [renderOperatorEditor.call(this), // @ts-ignore function children
227
238
  h(Button, {
228
239
  type: "button",
229
240
  attrs: this.v3 ? undefined : {
230
241
  type: "button",
231
242
  icon: 'filter-clear',
232
- title: localizationService.toLanguageString(filterClearButton, messages[filterClearButton])
243
+ title: ls.toLanguageString(filterClearButton, messages[filterClearButton])
233
244
  },
234
245
  icon: 'filter-clear',
235
246
  "class": {
236
247
  /* button is always visible if there is either value or operator */
237
248
  'k-disabled': !(!(this.$props.value === null || this.$props.value === '') || this.$props.operator)
238
249
  },
239
- title: localizationService.toLanguageString(filterClearButton, messages[filterClearButton]),
250
+ title: ls.toLanguageString(filterClearButton, messages[filterClearButton]),
240
251
  onClick: this.clear,
241
252
  on: this.v3 ? undefined : {
242
253
  "click": this.clear
243
254
  }
244
- })])]);
255
+ })])])]);
245
256
  var gridListeners = this.$props.grid ? getListeners.call(this.$props.grid) : null;
246
257
  var cellRenderFunction = templateRendering.call(this.$props.grid, this.$props.render, gridListeners);
247
258
  return getTemplate.call(this, {
@@ -37,7 +37,7 @@ import { Button, Toolbar, ToolbarItem } from '@progress/kendo-vue-buttons';
37
37
  import { DropDownList } from '@progress/kendo-vue-dropdowns';
38
38
  import { provideLocalizationService } from '@progress/kendo-vue-intl';
39
39
  import { unaryOperator, stringOperator } from './operators';
40
- import { messages, filterClose } from '../messages/main';
40
+ import { messages, filterClose, filterExpressionDropdownAriaLabel, filterExpressionOperatorDropdownAriaLabel } from '../messages/main';
41
41
  import { TextFilter } from './filters/TextFilter';
42
42
  import { NumericFilter } from './filters/NumericFilter';
43
43
  import { BooleanFilter } from './filters/BooleanFilter';
@@ -187,7 +187,8 @@ var ExpressionVue2 = {
187
187
  textField: "label",
188
188
  value: fields.find(function (f) {
189
189
  return f.name === filter.field;
190
- })
190
+ }),
191
+ ariaLabel: locService.toLanguageString(filterExpressionDropdownAriaLabel, messages[filterExpressionDropdownAriaLabel])
191
192
  },
192
193
  textField: "label",
193
194
  value: fields.find(function (f) {
@@ -196,7 +197,8 @@ var ExpressionVue2 = {
196
197
  onChange: _this.onFieldChange,
197
198
  on: _this.v3 ? undefined : {
198
199
  "change": _this.onFieldChange
199
- }
200
+ },
201
+ ariaLabel: locService.toLanguageString(filterExpressionDropdownAriaLabel, messages[filterExpressionDropdownAriaLabel])
200
202
  })];
201
203
  } : [h(DropDownList, {
202
204
  "class": "k-filter-dropdown",
@@ -206,7 +208,8 @@ var ExpressionVue2 = {
206
208
  textField: "label",
207
209
  value: fields.find(function (f) {
208
210
  return f.name === filter.field;
209
- })
211
+ }),
212
+ ariaLabel: locService.toLanguageString(filterExpressionDropdownAriaLabel, messages[filterExpressionDropdownAriaLabel])
210
213
  },
211
214
  textField: "label",
212
215
  value: fields.find(function (f) {
@@ -215,7 +218,8 @@ var ExpressionVue2 = {
215
218
  onChange: _this.onFieldChange,
216
219
  on: _this.v3 ? undefined : {
217
220
  "change": _this.onFieldChange
218
- }
221
+ },
222
+ ariaLabel: locService.toLanguageString(filterExpressionDropdownAriaLabel, messages[filterExpressionDropdownAriaLabel])
219
223
  })]), // @ts-ignore function children
220
224
  h(ToolbarItem, {
221
225
  "class": "k-filter-operator"
@@ -228,7 +232,8 @@ var ExpressionVue2 = {
228
232
  textField: "text",
229
233
  value: operators.find(function (o) {
230
234
  return o.operator === filter.operator;
231
- })
235
+ }),
236
+ ariaLabel: locService.toLanguageString(filterExpressionOperatorDropdownAriaLabel, messages[filterExpressionOperatorDropdownAriaLabel])
232
237
  },
233
238
  textField: "text",
234
239
  value: operators.find(function (o) {
@@ -237,7 +242,8 @@ var ExpressionVue2 = {
237
242
  onChange: _this.onOperatorChange,
238
243
  on: _this.v3 ? undefined : {
239
244
  "change": _this.onOperatorChange
240
- }
245
+ },
246
+ ariaLabel: locService.toLanguageString(filterExpressionOperatorDropdownAriaLabel, messages[filterExpressionOperatorDropdownAriaLabel])
241
247
  })];
242
248
  } : [h(DropDownList, {
243
249
  dataItems: operators,
@@ -246,7 +252,8 @@ var ExpressionVue2 = {
246
252
  textField: "text",
247
253
  value: operators.find(function (o) {
248
254
  return o.operator === filter.operator;
249
- })
255
+ }),
256
+ ariaLabel: locService.toLanguageString(filterExpressionOperatorDropdownAriaLabel, messages[filterExpressionOperatorDropdownAriaLabel])
250
257
  },
251
258
  textField: "text",
252
259
  value: operators.find(function (o) {
@@ -255,7 +262,8 @@ var ExpressionVue2 = {
255
262
  onChange: _this.onOperatorChange,
256
263
  on: _this.v3 ? undefined : {
257
264
  "change": _this.onOperatorChange
258
- }
265
+ },
266
+ ariaLabel: locService.toLanguageString(filterExpressionOperatorDropdownAriaLabel, messages[filterExpressionOperatorDropdownAriaLabel])
259
267
  })]), // @ts-ignore function children
260
268
  h(ToolbarItem, {
261
269
  "class": "k-filter-value"
@@ -307,7 +315,8 @@ var ExpressionVue2 = {
307
315
  textField: "label",
308
316
  value: fields.find(function (f) {
309
317
  return f.name === filter.field;
310
- })
318
+ }),
319
+ ariaLabel: locService.toLanguageString(filterExpressionDropdownAriaLabel, messages[filterExpressionDropdownAriaLabel])
311
320
  },
312
321
  textField: "label",
313
322
  value: fields.find(function (f) {
@@ -316,7 +325,8 @@ var ExpressionVue2 = {
316
325
  onChange: _this.onFieldChange,
317
326
  on: _this.v3 ? undefined : {
318
327
  "change": _this.onFieldChange
319
- }
328
+ },
329
+ ariaLabel: locService.toLanguageString(filterExpressionDropdownAriaLabel, messages[filterExpressionDropdownAriaLabel])
320
330
  })];
321
331
  } : [h(DropDownList, {
322
332
  "class": "k-filter-dropdown",
@@ -326,7 +336,8 @@ var ExpressionVue2 = {
326
336
  textField: "label",
327
337
  value: fields.find(function (f) {
328
338
  return f.name === filter.field;
329
- })
339
+ }),
340
+ ariaLabel: locService.toLanguageString(filterExpressionDropdownAriaLabel, messages[filterExpressionDropdownAriaLabel])
330
341
  },
331
342
  textField: "label",
332
343
  value: fields.find(function (f) {
@@ -335,7 +346,8 @@ var ExpressionVue2 = {
335
346
  onChange: _this.onFieldChange,
336
347
  on: _this.v3 ? undefined : {
337
348
  "change": _this.onFieldChange
338
- }
349
+ },
350
+ ariaLabel: locService.toLanguageString(filterExpressionDropdownAriaLabel, messages[filterExpressionDropdownAriaLabel])
339
351
  })]), h(ToolbarItem, {
340
352
  "class": "k-filter-operator"
341
353
  }, _this.v3 ? function () {
@@ -346,7 +358,8 @@ var ExpressionVue2 = {
346
358
  textField: "text",
347
359
  value: operators.find(function (o) {
348
360
  return o.operator === filter.operator;
349
- })
361
+ }),
362
+ ariaLabel: locService.toLanguageString(filterExpressionOperatorDropdownAriaLabel, messages[filterExpressionOperatorDropdownAriaLabel])
350
363
  },
351
364
  textField: "text",
352
365
  value: operators.find(function (o) {
@@ -355,7 +368,8 @@ var ExpressionVue2 = {
355
368
  onChange: _this.onOperatorChange,
356
369
  on: _this.v3 ? undefined : {
357
370
  "change": _this.onOperatorChange
358
- }
371
+ },
372
+ ariaLabel: locService.toLanguageString(filterExpressionOperatorDropdownAriaLabel, messages[filterExpressionOperatorDropdownAriaLabel])
359
373
  })];
360
374
  } : [h(DropDownList, {
361
375
  dataItems: operators,
@@ -364,7 +378,8 @@ var ExpressionVue2 = {
364
378
  textField: "text",
365
379
  value: operators.find(function (o) {
366
380
  return o.operator === filter.operator;
367
- })
381
+ }),
382
+ ariaLabel: locService.toLanguageString(filterExpressionOperatorDropdownAriaLabel, messages[filterExpressionOperatorDropdownAriaLabel])
368
383
  },
369
384
  textField: "text",
370
385
  value: operators.find(function (o) {
@@ -373,7 +388,8 @@ var ExpressionVue2 = {
373
388
  onChange: _this.onOperatorChange,
374
389
  on: _this.v3 ? undefined : {
375
390
  "change": _this.onOperatorChange
376
- }
391
+ },
392
+ ariaLabel: locService.toLanguageString(filterExpressionOperatorDropdownAriaLabel, messages[filterExpressionOperatorDropdownAriaLabel])
377
393
  })]), h(ToolbarItem, {
378
394
  "class": "k-filter-value"
379
395
  }, _this.v3 ? function () {
@@ -21,7 +21,7 @@ var gh = allVue.h;
21
21
  var isV3 = allVue.version && allVue.version[0] === '3';
22
22
  import { DropDownList } from '@progress/kendo-vue-dropdowns';
23
23
  import { provideLocalizationService } from '@progress/kendo-vue-intl';
24
- import { messages } from '../../messages/main';
24
+ import { messages, filterEnumFilterDropdownAriaLabel } from '../../messages/main';
25
25
  /**
26
26
  * @hidden
27
27
  */
@@ -34,7 +34,8 @@ var EnumFilterVue2 = {
34
34
  required: true
35
35
  },
36
36
  dataItems: Array,
37
- defaultItem: Object
37
+ defaultItem: Object,
38
+ ariaLabel: String
38
39
  },
39
40
  inject: {
40
41
  kendoLocalizationService: {
@@ -55,7 +56,9 @@ var EnumFilterVue2 = {
55
56
  filter = _a.filter,
56
57
  _b = _a.dataItems,
57
58
  dataItems = _b === void 0 ? [] : _b,
58
- defaultItem = _a.defaultItem;
59
+ defaultItem = _a.defaultItem,
60
+ _c = _a.ariaLabel,
61
+ ariaLabel = _c === void 0 ? locService.toLanguageString(filterEnumFilterDropdownAriaLabel, messages[filterEnumFilterDropdownAriaLabel]) : _c;
59
62
  var locData = dataItems.map(function (item) {
60
63
  return __assign(__assign({}, item), {
61
64
  text: locService.toLanguageString(item.text, messages[item.text] || item.text)
@@ -72,7 +75,8 @@ var EnumFilterVue2 = {
72
75
  }) || null,
73
76
  defaultItem: defaultItem,
74
77
  dataItems: locData,
75
- textField: "text"
78
+ textField: "text",
79
+ ariaLabel: ariaLabel
76
80
  },
77
81
  onChange: this.onChange,
78
82
  on: this.v3 ? undefined : {
@@ -80,7 +84,8 @@ var EnumFilterVue2 = {
80
84
  },
81
85
  defaultItem: defaultItem,
82
86
  dataItems: locData,
83
- textField: "text"
87
+ textField: "text",
88
+ ariaLabel: ariaLabel
84
89
  })
85
90
  );
86
91
  },
@@ -19,6 +19,10 @@ export interface TextFilterProps {
19
19
  onFilterchange?: (event: {
20
20
  nextFilter: FilterOperator;
21
21
  }) => void;
22
+ /**
23
+ * The accessible label of the component.
24
+ */
25
+ ariaLabel?: string;
22
26
  }
23
27
  /**
24
28
  * @hidden
@@ -20,6 +20,8 @@ var allVue = Vue;
20
20
  var gh = allVue.h;
21
21
  var isV3 = allVue.version && allVue.version[0] === '3';
22
22
  import { Input } from '@progress/kendo-vue-inputs';
23
+ import { provideLocalizationService } from '@progress/kendo-vue-intl';
24
+ import { filterTextFilterAriaLabel, messages } from '../../messages/main';
23
25
  /**
24
26
  * @hidden
25
27
  */
@@ -30,7 +32,8 @@ var TextFilterVue2 = {
30
32
  filter: {
31
33
  type: Object,
32
34
  required: true
33
- }
35
+ },
36
+ ariaLabel: String
34
37
  },
35
38
  // @ts-ignore
36
39
  setup: !isV3 ? undefined : function () {
@@ -41,16 +44,21 @@ var TextFilterVue2 = {
41
44
  },
42
45
  render: function render(createElement) {
43
46
  var h = gh || createElement;
47
+ var locService = provideLocalizationService(this);
48
+ var _a = this.$props.ariaLabel,
49
+ ariaLabel = _a === void 0 ? locService.toLanguageString(filterTextFilterAriaLabel, messages[filterTextFilterAriaLabel]) : _a;
44
50
  return (// @ts-ignore
45
51
  h(Input, {
46
52
  value: this.$props.filter.value || '',
47
53
  attrs: this.v3 ? undefined : {
48
- value: this.$props.filter.value || ''
54
+ value: this.$props.filter.value || '',
55
+ ariaLabel: ariaLabel
49
56
  },
50
57
  onInput: this.onChange,
51
58
  on: this.v3 ? undefined : {
52
59
  "input": this.onChange
53
- }
60
+ },
61
+ ariaLabel: ariaLabel
54
62
  })
55
63
  );
56
64
  },
@@ -17,18 +17,24 @@ export interface FilterRowProps {
17
17
  sort?: SortDescriptor[];
18
18
  cellRender?: any;
19
19
  isRtl?: boolean;
20
+ ariaRowIndex?: number;
20
21
  }
21
22
  /**
22
23
  * @hidden
23
24
  */
24
- export interface FilterRowMethods extends Vue2type {
25
+ export interface FilterRowMethods {
25
26
  headerCellClassName: (field?: string, locked?: boolean) => string;
26
27
  setFilter: (value: string | number, operator: string | Function, field: string | undefined, e: any) => void;
27
28
  }
28
29
  /**
29
30
  * @hidden
30
31
  */
31
- declare let FilterRowVue2: ComponentOptions<Vue2type, DefaultData<{}>, DefaultMethods<FilterRowMethods>, {}, RecordPropsDefinition<FilterRowProps>>;
32
+ export interface FilterRowAll extends FilterRowProps, FilterRowMethods, Vue2type {
33
+ }
34
+ /**
35
+ * @hidden
36
+ */
37
+ declare let FilterRowVue2: ComponentOptions<Vue2type, DefaultData<{}>, DefaultMethods<FilterRowAll>, {}, RecordPropsDefinition<FilterRowProps>>;
32
38
  /**
33
39
  * @hidden
34
40
  */
@@ -23,7 +23,8 @@ var FilterRowVue2 = {
23
23
  filterOperators: Object,
24
24
  sort: [Object, Array],
25
25
  cellRender: [String, Function, Object],
26
- isRtl: Boolean
26
+ isRtl: Boolean,
27
+ ariaRowIndex: Number
27
28
  },
28
29
  inject: {
29
30
  kendoLocalizationService: {
@@ -43,6 +44,7 @@ var FilterRowVue2 = {
43
44
  return result;
44
45
  },
45
46
  setFilter: function setFilter(value, operator, field, e) {
47
+ var filter = this.$props.filter;
46
48
  var filters = [];
47
49
 
48
50
  if (value !== '' && value !== null || operator !== '') {
@@ -53,10 +55,10 @@ var FilterRowVue2 = {
53
55
  });
54
56
  }
55
57
 
56
- if (this.$props.filter && this.$props.filter.filters) {
57
- var oldFilters = this.$props.filter.filters || [];
58
- oldFilters.forEach(function (filter) {
59
- var descriptor = filter;
58
+ if (filter && (filter.filters || filter.length)) {
59
+ var oldFilters = filter.length ? filter : filter.filters || [];
60
+ oldFilters.forEach(function (f) {
61
+ var descriptor = f;
60
62
 
61
63
  if (descriptor && descriptor.field !== field) {
62
64
  filters.push(descriptor);
@@ -192,7 +194,13 @@ var FilterRowVue2 = {
192
194
  });
193
195
  }, this);
194
196
  return h("tr", {
195
- "class": "k-filter-row"
197
+ "class": "k-filter-row",
198
+ "aria-rowindex": this.ariaRowIndex,
199
+ attrs: this.v3 ? undefined : {
200
+ "aria-rowindex": this.ariaRowIndex,
201
+ role: 'row'
202
+ },
203
+ role: 'row'
196
204
  }, [filterCells]);
197
205
  }
198
206
  };
@@ -106,10 +106,6 @@ var HeaderVue2 = {
106
106
  role: "presentation"
107
107
  }
108
108
  }, [h("colgroup", {
109
- role: "presentation",
110
- attrs: this.v3 ? undefined : {
111
- role: "presentation"
112
- },
113
109
  ref: setRef(this, 'colGroupHeader')
114
110
  }, [this.$props.cols]), this.$props.headerRow])])]);
115
111
  }
@@ -7,7 +7,7 @@ import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } fr
7
7
  /**
8
8
  * @hidden
9
9
  */
10
- export interface HeaderCellMethods extends Vue2type {
10
+ export interface HeaderCellMethods extends HeaderCellProps, Vue2type {
11
11
  clickHandler: (event: any) => void;
12
12
  }
13
13
  /**
@@ -18,7 +18,9 @@ var HeaderCellVue2 = {
18
18
  },
19
19
  methods: {
20
20
  clickHandler: function clickHandler(event) {
21
- this.$emit('headercellclick', event);
21
+ if (this.sortable) {
22
+ this.$emit('headercellclick', event);
23
+ }
22
24
  }
23
25
  },
24
26
  // @ts-ignore
@@ -34,14 +36,15 @@ var HeaderCellVue2 = {
34
36
  var defaultSlot = getDefaultSlots(this);
35
37
  var renderTemplate = this.$props.render;
36
38
  var textInCell = this.$props.title || this.$props.field || "\xA0";
37
- var defaultRendering = this.$props.sortable ? h("span", {
38
- "class": "k-link",
39
+ var defaultRendering = h("span", {
40
+ "class": 'k-link',
39
41
  onClick: this.clickHandler,
40
42
  on: this.v3 ? undefined : {
41
43
  "click": this.clickHandler
42
44
  }
43
- }, [textInCell, defaultSlot]) : defaultSlot ? h("span", [textInCell, defaultSlot]) // @ts-ignore
44
- : this.v3 ? textInCell : this._v(textInCell);
45
+ }, [h("span", {
46
+ "class": 'k-column-title'
47
+ }, [textInCell]), defaultSlot]);
45
48
  return getTemplate.call(this, {
46
49
  h: h,
47
50
  template: renderTemplate,
@@ -6,8 +6,7 @@ var isV3 = allVue.version && allVue.version[0] === '3';
6
6
  import { normalize } from '../interfaces/SortSettings';
7
7
  import { ColumnResizer } from '../drag/ColumnResizer';
8
8
  import { ColumnDraggable } from '../drag/ColumnDraggable';
9
- import { HeaderCell } from './HeaderCell'; // import { ColumnMenuProps } from '../interfaces/GridColumnMenuProps';
10
-
9
+ import { HeaderCell } from './HeaderCell';
11
10
  import { ColumnMenu } from '../columnmenu/ColumnMenu';
12
11
  import { templateRendering, hasListener, getListeners, Keys, noop } from '@progress/kendo-vue-common';
13
12
  import { HeaderThElement } from './HeaderThElement';
@@ -315,7 +314,9 @@ var HeaderRowVue2 = {
315
314
  filterOperators: _this2.$props.filterOperators,
316
315
  onFilterchange: _this2.filterChangeHandler,
317
316
  render: columnMenuRender
318
- }), column.internalHeaderCell && // @ts-ignore function children
317
+ }), column.internalHeaderCell && h("span", {
318
+ "class": 'k-cell-inner'
319
+ }, [// @ts-ignore function children
319
320
  h(column.internalHeaderCell, {
320
321
  key: 1,
321
322
  field: column.field,
@@ -342,7 +343,9 @@ var HeaderRowVue2 = {
342
343
  render: (column.headerCell || _this2.$props.cellRender) && _this2.getTemplate(column.headerCell || _this2.$props.cellRender)
343
344
  }, _this2.v3 ? function () {
344
345
  return [sortIcon];
345
- } : [sortIcon]) || // @ts-ignore function children
346
+ } : [sortIcon])]) || h("span", {
347
+ "class": 'k-cell-inner'
348
+ }, [// @ts-ignore function children
346
349
  h(HeaderCell, {
347
350
  key: 1,
348
351
  field: column.field,
@@ -367,7 +370,7 @@ var HeaderRowVue2 = {
367
370
  render: (column.headerCell || _this2.$props.cellRender) && _this2.getTemplate(column.headerCell || _this2.$props.cellRender)
368
371
  }, _this2.v3 ? function () {
369
372
  return [sortIcon];
370
- } : [sortIcon]), _this2.$props.columnResize && _this2.$props.columnResize.resizable // @ts-ignore
373
+ } : [sortIcon])]), _this2.$props.columnResize && _this2.$props.columnResize.resizable // @ts-ignore
371
374
  && column.resizable && h(ColumnResizer, {
372
375
  key: 2,
373
376
  onResize: function onResize(e, element, end) {
@@ -415,7 +418,9 @@ var HeaderRowVue2 = {
415
418
  filterOperators: _this2.$props.filterOperators,
416
419
  onFilterchange: _this2.filterChangeHandler,
417
420
  render: columnMenuRender
418
- }), column.internalHeaderCell && h(column.internalHeaderCell, {
421
+ }), column.internalHeaderCell && h("span", {
422
+ "class": 'k-cell-inner'
423
+ }, [h(column.internalHeaderCell, {
419
424
  key: 1,
420
425
  field: column.field,
421
426
  attrs: _this2.v3 ? undefined : {
@@ -441,7 +446,9 @@ var HeaderRowVue2 = {
441
446
  render: (column.headerCell || _this2.$props.cellRender) && _this2.getTemplate(column.headerCell || _this2.$props.cellRender)
442
447
  }, _this2.v3 ? function () {
443
448
  return [sortIcon];
444
- } : [sortIcon]) || h(HeaderCell, {
449
+ } : [sortIcon])]) || h("span", {
450
+ "class": 'k-cell-inner'
451
+ }, [h(HeaderCell, {
445
452
  key: 1,
446
453
  field: column.field,
447
454
  attrs: _this2.v3 ? undefined : {
@@ -465,7 +472,7 @@ var HeaderRowVue2 = {
465
472
  render: (column.headerCell || _this2.$props.cellRender) && _this2.getTemplate(column.headerCell || _this2.$props.cellRender)
466
473
  }, _this2.v3 ? function () {
467
474
  return [sortIcon];
468
- } : [sortIcon]), _this2.$props.columnResize && _this2.$props.columnResize.resizable && column.resizable && h(ColumnResizer, {
475
+ } : [sortIcon])]), _this2.$props.columnResize && _this2.$props.columnResize.resizable && column.resizable && h(ColumnResizer, {
469
476
  key: 2,
470
477
  onResize: function onResize(e, element, end) {
471
478
  return _this.$props.columnResize && _this.$props.columnResize.dragHandler(e, column, element, end);
@@ -504,7 +511,12 @@ var HeaderRowVue2 = {
504
511
  onReleaseHandler: this.releaseHandler
505
512
  }, this.v3 ? function () {
506
513
  return [cells.call(_this3, rowIndexes)];
507
- } : [cells.call(_this3, rowIndexes)]) || h("tr", [cells.call(this, rowIndexes)]);
514
+ } : [cells.call(_this3, rowIndexes)]) || h("tr", {
515
+ role: 'row',
516
+ attrs: this.v3 ? undefined : {
517
+ role: 'row'
518
+ }
519
+ }, [cells.call(this, rowIndexes)]);
508
520
  }, this), this.$props.filterRow]);
509
521
  }
510
522
  };
@@ -65,4 +65,8 @@ export interface FilterCellProps {
65
65
  * The title of the clear button.
66
66
  */
67
67
  clearButtonTitle?: string;
68
+ /**
69
+ * The ariaLabel of the filter editor.
70
+ */
71
+ ariaLabel?: string;
68
72
  }