@progress/kendo-vue-grid 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.
- package/dist/cdn/js/kendo-vue-grid.js +1 -1
- package/dist/es/Grid.js +3 -5
- package/dist/es/cells/GridFilterCell.d.ts +7 -2
- package/dist/es/cells/GridFilterCell.js +26 -15
- package/dist/es/cells/GridGroupCell.js +1 -1
- package/dist/es/columnMenu/ColumnMenu.js +1 -1
- package/dist/es/drag/CommonDragLogic.js +1 -1
- package/dist/es/drag/DragClue.d.ts +1 -1
- package/dist/es/drag/GroupingIndicator.js +4 -4
- package/dist/es/footer/FooterRow.js +6 -1
- package/dist/es/header/FilterRow.d.ts +8 -2
- package/dist/es/header/FilterRow.js +9 -2
- package/dist/es/header/GridHeaderCell.d.ts +1 -1
- package/dist/es/header/GridHeaderCell.js +8 -5
- package/dist/es/header/Header.js +0 -4
- package/dist/es/header/HeaderRow.js +22 -10
- package/dist/es/interfaces/GridFilterCellProps.d.ts +4 -0
- package/dist/es/interfaces/GridProps.d.ts +5 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/esm/Grid.js +3 -5
- package/dist/esm/cells/GridFilterCell.d.ts +7 -2
- package/dist/esm/cells/GridFilterCell.js +26 -15
- package/dist/esm/cells/GridGroupCell.js +1 -1
- package/dist/esm/columnMenu/ColumnMenu.js +1 -1
- package/dist/esm/drag/CommonDragLogic.js +1 -1
- package/dist/esm/drag/DragClue.d.ts +1 -1
- package/dist/esm/drag/GroupingIndicator.js +4 -4
- package/dist/esm/footer/FooterRow.js +6 -1
- package/dist/esm/header/FilterRow.d.ts +8 -2
- package/dist/esm/header/FilterRow.js +9 -2
- package/dist/esm/header/GridHeaderCell.d.ts +1 -1
- package/dist/esm/header/GridHeaderCell.js +8 -5
- package/dist/esm/header/Header.js +0 -4
- package/dist/esm/header/HeaderRow.js +22 -10
- package/dist/esm/interfaces/GridFilterCellProps.d.ts +4 -0
- package/dist/esm/interfaces/GridProps.d.ts +5 -0
- package/dist/esm/package-metadata.js +1 -1
- package/dist/npm/Grid.js +3 -5
- package/dist/npm/cells/GridFilterCell.d.ts +7 -2
- package/dist/npm/cells/GridFilterCell.js +26 -15
- package/dist/npm/cells/GridGroupCell.js +1 -1
- package/dist/npm/columnMenu/ColumnMenu.js +1 -1
- package/dist/npm/drag/CommonDragLogic.js +1 -1
- package/dist/npm/drag/DragClue.d.ts +1 -1
- package/dist/npm/drag/GroupingIndicator.js +4 -4
- package/dist/npm/footer/FooterRow.js +6 -1
- package/dist/npm/header/FilterRow.d.ts +8 -2
- package/dist/npm/header/FilterRow.js +9 -2
- package/dist/npm/header/GridHeaderCell.d.ts +1 -1
- package/dist/npm/header/GridHeaderCell.js +8 -5
- package/dist/npm/header/Header.js +0 -4
- package/dist/npm/header/HeaderRow.js +22 -10
- package/dist/npm/interfaces/GridFilterCellProps.d.ts +4 -0
- package/dist/npm/interfaces/GridProps.d.ts +5 -0
- package/dist/npm/package-metadata.js +1 -1
- package/package.json +14 -14
package/dist/es/Grid.js
CHANGED
|
@@ -119,6 +119,7 @@ var GridVue2 = {
|
|
|
119
119
|
group: Array,
|
|
120
120
|
groupable: [Boolean, Object],
|
|
121
121
|
editField: String,
|
|
122
|
+
rowClass: Function,
|
|
122
123
|
scrollable: {
|
|
123
124
|
type: String,
|
|
124
125
|
default: 'scrollable'
|
|
@@ -1582,7 +1583,8 @@ var GridVue2 = {
|
|
|
1582
1583
|
render: rowRenderFunction,
|
|
1583
1584
|
ariaRowIndex: currentAriaRowIndex,
|
|
1584
1585
|
dataIndex: dataIndex,
|
|
1585
|
-
isSelected: dataRow.isSelected
|
|
1586
|
+
isSelected: dataRow.isSelected,
|
|
1587
|
+
"class": this.$props.rowClass ? this.$props.rowClass(item) : ''
|
|
1586
1588
|
}, this.v3 ? function () {
|
|
1587
1589
|
return [dataRow.call(_this2, item, rowId, dataIndex).row];
|
|
1588
1590
|
} : [dataRow.call(_this2, item, rowId, dataIndex).row]), this.$props.detail && item.rowType === 'data' && item.expanded && h("tr", {
|
|
@@ -1692,10 +1694,6 @@ var GridVue2 = {
|
|
|
1692
1694
|
};
|
|
1693
1695
|
|
|
1694
1696
|
var colGroups = h("colgroup", {
|
|
1695
|
-
role: "presentation",
|
|
1696
|
-
attrs: this.v3 ? undefined : {
|
|
1697
|
-
role: "presentation"
|
|
1698
|
-
},
|
|
1699
1697
|
ref: setRef(this, 'colGroup')
|
|
1700
1698
|
}, [columnsWithColGroup.map(function (column, index) {
|
|
1701
1699
|
return h("col", {
|
|
@@ -7,7 +7,7 @@ import { GridFilterCellProps } from '../interfaces/GridFilterCellProps';
|
|
|
7
7
|
/**
|
|
8
8
|
* @hidden
|
|
9
9
|
*/
|
|
10
|
-
export interface GridFilterCellMethods
|
|
10
|
+
export interface GridFilterCellMethods {
|
|
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 GridFilterCellMethods extends Vue2type {
|
|
|
18
18
|
/**
|
|
19
19
|
* @hidden
|
|
20
20
|
*/
|
|
21
|
-
|
|
21
|
+
export interface GridFilterCellAll extends GridFilterCellMethods, GridFilterCellProps, Vue2type {
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @hidden
|
|
25
|
+
*/
|
|
26
|
+
declare let GridFilterCellVue2: ComponentOptions<Vue2type, DefaultData<{}>, DefaultMethods<GridFilterCellAll>, {}, RecordPropsDefinition<GridFilterCellProps>>;
|
|
22
27
|
/**
|
|
23
28
|
* @hidden
|
|
24
29
|
*/
|
|
@@ -30,7 +30,8 @@ var GridFilterCellVue2 = {
|
|
|
30
30
|
operators: Array,
|
|
31
31
|
booleanValues: Array,
|
|
32
32
|
onChange: Function,
|
|
33
|
-
render: [String, Function, Object]
|
|
33
|
+
render: [String, Function, Object],
|
|
34
|
+
ariaLabel: String
|
|
34
35
|
},
|
|
35
36
|
inject: {
|
|
36
37
|
kendoLocalizationService: {
|
|
@@ -107,7 +108,8 @@ var GridFilterCellVue2 = {
|
|
|
107
108
|
title: localizationService.toLanguageString(filterChooseOperator, messages[filterChooseOperator]),
|
|
108
109
|
popupSettings: {
|
|
109
110
|
width: ''
|
|
110
|
-
}
|
|
111
|
+
},
|
|
112
|
+
ariaLabel: 'filter'
|
|
111
113
|
},
|
|
112
114
|
"class": "k-dropdown-operator",
|
|
113
115
|
iconClassName: "k-i-filter k-icon",
|
|
@@ -116,7 +118,8 @@ var GridFilterCellVue2 = {
|
|
|
116
118
|
title: localizationService.toLanguageString(filterChooseOperator, messages[filterChooseOperator]),
|
|
117
119
|
popupSettings: {
|
|
118
120
|
width: ''
|
|
119
|
-
}
|
|
121
|
+
},
|
|
122
|
+
ariaLabel: 'filter'
|
|
120
123
|
})
|
|
121
124
|
);
|
|
122
125
|
};
|
|
@@ -131,7 +134,8 @@ var GridFilterCellVue2 = {
|
|
|
131
134
|
value: value,
|
|
132
135
|
attrs: this.v3 ? undefined : {
|
|
133
136
|
value: value,
|
|
134
|
-
title: this.$props.title
|
|
137
|
+
title: this.$props.title,
|
|
138
|
+
ariaLabel: this.ariaLabel
|
|
135
139
|
},
|
|
136
140
|
onChange: function onChange(e) {
|
|
137
141
|
_this.inputChange(e.value, e.event);
|
|
@@ -141,7 +145,8 @@ var GridFilterCellVue2 = {
|
|
|
141
145
|
_this.inputChange(e.value, e.event);
|
|
142
146
|
}
|
|
143
147
|
},
|
|
144
|
-
title: this.$props.title
|
|
148
|
+
title: this.$props.title,
|
|
149
|
+
ariaLabel: this.ariaLabel
|
|
145
150
|
})
|
|
146
151
|
);
|
|
147
152
|
|
|
@@ -151,7 +156,8 @@ var GridFilterCellVue2 = {
|
|
|
151
156
|
value: value,
|
|
152
157
|
attrs: this.v3 ? undefined : {
|
|
153
158
|
value: value,
|
|
154
|
-
title: this.$props.title
|
|
159
|
+
title: this.$props.title,
|
|
160
|
+
ariaLabel: this.ariaLabel
|
|
155
161
|
},
|
|
156
162
|
onChange: function onChange(e) {
|
|
157
163
|
_this.inputChange(e.value, e);
|
|
@@ -161,7 +167,8 @@ var GridFilterCellVue2 = {
|
|
|
161
167
|
_this.inputChange(e.value, e);
|
|
162
168
|
}
|
|
163
169
|
},
|
|
164
|
-
title: this.$props.title
|
|
170
|
+
title: this.$props.title,
|
|
171
|
+
ariaLabel: this.ariaLabel
|
|
165
172
|
})
|
|
166
173
|
);
|
|
167
174
|
|
|
@@ -182,11 +189,13 @@ var GridFilterCellVue2 = {
|
|
|
182
189
|
}),
|
|
183
190
|
"data-items": booleanValues,
|
|
184
191
|
textField: "text",
|
|
185
|
-
title: this.$props.title
|
|
192
|
+
title: this.$props.title,
|
|
193
|
+
ariaLabel: this.ariaLabel
|
|
186
194
|
},
|
|
187
195
|
"data-items": booleanValues,
|
|
188
196
|
textField: "text",
|
|
189
|
-
title: this.$props.title
|
|
197
|
+
title: this.$props.title,
|
|
198
|
+
ariaLabel: this.ariaLabel
|
|
190
199
|
})
|
|
191
200
|
);
|
|
192
201
|
|
|
@@ -209,17 +218,19 @@ var GridFilterCellVue2 = {
|
|
|
209
218
|
},
|
|
210
219
|
title: this.$props.title,
|
|
211
220
|
attrs: this.v3 ? undefined : {
|
|
212
|
-
title: this.$props.title
|
|
213
|
-
|
|
221
|
+
title: this.$props.title,
|
|
222
|
+
"aria-label": this.ariaLabel
|
|
223
|
+
},
|
|
224
|
+
"aria-label": this.ariaLabel
|
|
214
225
|
})]);
|
|
215
226
|
}
|
|
216
227
|
};
|
|
217
228
|
|
|
218
229
|
var defaultRendering = h("div", {
|
|
219
230
|
"class": "k-filtercell"
|
|
220
|
-
}, [h("div", {
|
|
221
|
-
"class": "k-filtercell-
|
|
222
|
-
}, [
|
|
231
|
+
}, [h("span", [filterComponent.call(this, this.$props.filterType, this.$props.value), h("div", {
|
|
232
|
+
"class": "k-filtercell-operator"
|
|
233
|
+
}, [renderOperatorEditor.call(this), // @ts-ignore function children
|
|
223
234
|
h(Button, {
|
|
224
235
|
type: "button",
|
|
225
236
|
attrs: this.v3 ? undefined : {
|
|
@@ -237,7 +248,7 @@ var GridFilterCellVue2 = {
|
|
|
237
248
|
on: this.v3 ? undefined : {
|
|
238
249
|
"click": this.clear
|
|
239
250
|
}
|
|
240
|
-
})])]);
|
|
251
|
+
})])])]);
|
|
241
252
|
var gridListeners = this.$props.grid ? getListeners.call(this.$props.grid) : null;
|
|
242
253
|
var cellRenderFunction = templateRendering.call(this.$props.grid, this.$props.render, gridListeners);
|
|
243
254
|
return getTemplate.call(this, {
|
|
@@ -155,7 +155,7 @@ var GridGroupCellVue2 = {
|
|
|
155
155
|
tabindex: -1
|
|
156
156
|
},
|
|
157
157
|
tabindex: -1,
|
|
158
|
-
"class": expanded ? 'k-i-
|
|
158
|
+
"class": expanded ? 'k-i-caret-alt-down k-icon' : 'k-i-caret-alt-right k-icon'
|
|
159
159
|
}), dataItem[field].toString()])]);
|
|
160
160
|
}
|
|
161
161
|
|
|
@@ -151,7 +151,7 @@ var CommonDragLogic = /** @class */ (function () {
|
|
|
151
151
|
this.dragElementClue.top = (event.pageY + 10);
|
|
152
152
|
this.dragElementClue.left = event.pageX;
|
|
153
153
|
this.dragElementClue.innerText = innerText;
|
|
154
|
-
this.dragElementClue.status = (invalidIndex || !targetElement) ? 'k-i-cancel' : 'k-i-
|
|
154
|
+
this.dragElementClue.status = (invalidIndex || !targetElement) ? 'k-i-cancel' : 'k-i-plus';
|
|
155
155
|
};
|
|
156
156
|
CommonDragLogic.prototype.updateDropElementClue = function (event, element, targetElement, invalidIndex) {
|
|
157
157
|
if (!this.dropElementClue) {
|
|
@@ -80,7 +80,7 @@ var GroupingIndicatorVue2 = {
|
|
|
80
80
|
}, [h("div", {
|
|
81
81
|
"class": "k-chip k-chip-lg k-rounded-md k-chip-solid k-chip-solid-base"
|
|
82
82
|
}, [h("span", {
|
|
83
|
-
"class": 'k-chip-icon k-icon k-i-sort-' + _this.$props.dir + '-
|
|
83
|
+
"class": 'k-chip-icon k-icon k-i-sort-' + _this.$props.dir + '-small'
|
|
84
84
|
}), h("span", {
|
|
85
85
|
"class": "k-chip-content",
|
|
86
86
|
tabindex: -1,
|
|
@@ -96,7 +96,7 @@ var GroupingIndicatorVue2 = {
|
|
|
96
96
|
}, [_this.$props.title])]), h("span", {
|
|
97
97
|
"class": "k-chip-actions"
|
|
98
98
|
}, [h("span", {
|
|
99
|
-
"class": "k-chip-action",
|
|
99
|
+
"class": "k-chip-action k-chip-remove-action",
|
|
100
100
|
tabindex: -1,
|
|
101
101
|
attrs: _this.v3 ? undefined : {
|
|
102
102
|
tabindex: -1
|
|
@@ -114,7 +114,7 @@ var GroupingIndicatorVue2 = {
|
|
|
114
114
|
}, [h("div", {
|
|
115
115
|
"class": "k-chip k-chip-lg k-rounded-md k-chip-solid k-chip-solid-base"
|
|
116
116
|
}, [h("span", {
|
|
117
|
-
"class": 'k-chip-icon k-icon k-i-sort-' + _this.$props.dir + '-
|
|
117
|
+
"class": 'k-chip-icon k-icon k-i-sort-' + _this.$props.dir + '-small'
|
|
118
118
|
}), h("span", {
|
|
119
119
|
"class": "k-chip-content",
|
|
120
120
|
tabindex: -1,
|
|
@@ -130,7 +130,7 @@ var GroupingIndicatorVue2 = {
|
|
|
130
130
|
}, [_this.$props.title])]), h("span", {
|
|
131
131
|
"class": "k-chip-actions"
|
|
132
132
|
}, [h("span", {
|
|
133
|
-
"class": "k-chip-action",
|
|
133
|
+
"class": "k-chip-action k-chip-remove-action",
|
|
134
134
|
tabindex: -1,
|
|
135
135
|
attrs: _this.v3 ? undefined : {
|
|
136
136
|
tabindex: -1
|
|
@@ -62,7 +62,12 @@ var FooterRowVue2 = {
|
|
|
62
62
|
}, [footerCellRendering]);
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
-
return h("tr",
|
|
65
|
+
return h("tr", {
|
|
66
|
+
role: 'row',
|
|
67
|
+
attrs: this.v3 ? undefined : {
|
|
68
|
+
role: 'row'
|
|
69
|
+
}
|
|
70
|
+
}, [footerColumns(this.$props.columns).map(renderCell, this)]);
|
|
66
71
|
}
|
|
67
72
|
};
|
|
68
73
|
/**
|
|
@@ -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
|
|
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
|
-
|
|
32
|
+
export interface FilterRowAll extends FilterRowMethods, FilterRowProps, Vue2type {
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* @hidden
|
|
36
|
+
*/
|
|
37
|
+
declare let FilterRowVue2: ComponentOptions<Vue2type, DefaultData<{}>, DefaultMethods<FilterRowAll>, {}, RecordPropsDefinition<FilterRowProps>>;
|
|
32
38
|
/**
|
|
33
39
|
* @hidden
|
|
34
40
|
*/
|
|
@@ -22,7 +22,8 @@ var FilterRowVue2 = {
|
|
|
22
22
|
filterOperators: Object,
|
|
23
23
|
sort: [Object, Array],
|
|
24
24
|
cellRender: [String, Function, Object],
|
|
25
|
-
isRtl: Boolean
|
|
25
|
+
isRtl: Boolean,
|
|
26
|
+
ariaRowIndex: Number
|
|
26
27
|
},
|
|
27
28
|
inject: {
|
|
28
29
|
kendoLocalizationService: {
|
|
@@ -191,7 +192,13 @@ var FilterRowVue2 = {
|
|
|
191
192
|
});
|
|
192
193
|
}, this);
|
|
193
194
|
return h("tr", {
|
|
194
|
-
"class": "k-filter-row"
|
|
195
|
+
"class": "k-filter-row",
|
|
196
|
+
"aria-rowindex": this.ariaRowIndex,
|
|
197
|
+
attrs: this.v3 ? undefined : {
|
|
198
|
+
"aria-rowindex": this.ariaRowIndex,
|
|
199
|
+
role: 'row'
|
|
200
|
+
},
|
|
201
|
+
role: 'row'
|
|
195
202
|
}, [filterCells]);
|
|
196
203
|
}
|
|
197
204
|
};
|
|
@@ -7,7 +7,7 @@ import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } fr
|
|
|
7
7
|
/**
|
|
8
8
|
* @hidden
|
|
9
9
|
*/
|
|
10
|
-
export interface GridHeaderCellMethods extends Vue2type {
|
|
10
|
+
export interface GridHeaderCellMethods extends GridHeaderCellProps, Vue2type {
|
|
11
11
|
clickHandler: (event: any) => void;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
@@ -17,7 +17,9 @@ var GridHeaderCellVue2 = {
|
|
|
17
17
|
},
|
|
18
18
|
methods: {
|
|
19
19
|
clickHandler: function clickHandler(event) {
|
|
20
|
-
this
|
|
20
|
+
if (this.sortable) {
|
|
21
|
+
this.$emit('headercellclick', event);
|
|
22
|
+
}
|
|
21
23
|
}
|
|
22
24
|
},
|
|
23
25
|
// @ts-ignore
|
|
@@ -33,14 +35,15 @@ var GridHeaderCellVue2 = {
|
|
|
33
35
|
var defaultSlot = getDefaultSlots(this);
|
|
34
36
|
var renderTemplate = this.$props.render;
|
|
35
37
|
var textInCell = this.$props.title || this.$props.field || "\xA0";
|
|
36
|
-
var defaultRendering =
|
|
37
|
-
"class":
|
|
38
|
+
var defaultRendering = h("span", {
|
|
39
|
+
"class": 'k-link',
|
|
38
40
|
onClick: this.clickHandler,
|
|
39
41
|
on: this.v3 ? undefined : {
|
|
40
42
|
"click": this.clickHandler
|
|
41
43
|
}
|
|
42
|
-
}, [
|
|
43
|
-
|
|
44
|
+
}, [h("span", {
|
|
45
|
+
"class": 'k-column-title'
|
|
46
|
+
}, [textInCell]), defaultSlot]);
|
|
44
47
|
return getTemplate.call(this, {
|
|
45
48
|
h: h,
|
|
46
49
|
template: renderTemplate,
|
package/dist/es/header/Header.js
CHANGED
|
@@ -107,10 +107,6 @@ var HeaderVue2 = {
|
|
|
107
107
|
role: "presentation"
|
|
108
108
|
}
|
|
109
109
|
}, [h("colgroup", {
|
|
110
|
-
role: "presentation",
|
|
111
|
-
attrs: this.v3 ? undefined : {
|
|
112
|
-
role: "presentation"
|
|
113
|
-
},
|
|
114
110
|
ref: setRef(this, 'colGroupHeader')
|
|
115
111
|
}, [this.$props.cols]), this.$props.headerRow])])]);
|
|
116
112
|
}
|
|
@@ -6,8 +6,7 @@ var isV3 = allVue.version && allVue.version[0] === '3';
|
|
|
6
6
|
import { normalize } from '../interfaces/GridSortSettings';
|
|
7
7
|
import { ColumnResizer } from '../drag/ColumnResizer';
|
|
8
8
|
import { ColumnDraggable } from '../drag/ColumnDraggable';
|
|
9
|
-
import { GridHeaderCell } from './GridHeaderCell';
|
|
10
|
-
|
|
9
|
+
import { GridHeaderCell } from './GridHeaderCell';
|
|
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 '@progress/kendo-vue-data-tools'; // from '../../../datatools/src/main';
|
|
@@ -220,7 +219,7 @@ var HeaderRowVue2 = {
|
|
|
220
219
|
|
|
221
220
|
return iconSortIndex >= 0 && [h("span", {
|
|
222
221
|
key: 1,
|
|
223
|
-
"class": 'k-icon k-i-sort-' + _this.$props.sort[iconSortIndex].dir + '-
|
|
222
|
+
"class": 'k-icon k-i-sort-' + _this.$props.sort[iconSortIndex].dir + '-small'
|
|
224
223
|
}), _this.$props.sort.length > 1 && h("span", {
|
|
225
224
|
key: 2,
|
|
226
225
|
"class": "k-sort-order"
|
|
@@ -316,7 +315,9 @@ var HeaderRowVue2 = {
|
|
|
316
315
|
filterOperators: _this2.$props.filterOperators,
|
|
317
316
|
onFilterchange: _this2.filterChangeHandler,
|
|
318
317
|
render: columnMenuRender
|
|
319
|
-
}), column.internalHeaderCell &&
|
|
318
|
+
}), column.internalHeaderCell && h("span", {
|
|
319
|
+
"class": 'k-cell-inner'
|
|
320
|
+
}, [// @ts-ignore function children
|
|
320
321
|
h(column.internalHeaderCell, {
|
|
321
322
|
key: 1,
|
|
322
323
|
field: column.field,
|
|
@@ -343,7 +344,9 @@ var HeaderRowVue2 = {
|
|
|
343
344
|
render: (column.headerCell || _this2.$props.cellRender) && _this2.getTemplate(column.headerCell || _this2.$props.cellRender)
|
|
344
345
|
}, _this2.v3 ? function () {
|
|
345
346
|
return [sortIcon];
|
|
346
|
-
} : [sortIcon]) ||
|
|
347
|
+
} : [sortIcon])]) || h("span", {
|
|
348
|
+
"class": 'k-cell-inner'
|
|
349
|
+
}, [// @ts-ignore function children
|
|
347
350
|
h(GridHeaderCell, {
|
|
348
351
|
key: 1,
|
|
349
352
|
field: column.field,
|
|
@@ -368,7 +371,7 @@ var HeaderRowVue2 = {
|
|
|
368
371
|
render: (column.headerCell || _this2.$props.cellRender) && _this2.getTemplate(column.headerCell || _this2.$props.cellRender)
|
|
369
372
|
}, _this2.v3 ? function () {
|
|
370
373
|
return [sortIcon];
|
|
371
|
-
} : [sortIcon]), _this2.$props.columnResize && _this2.$props.columnResize.resizable // @ts-ignore
|
|
374
|
+
} : [sortIcon])]), _this2.$props.columnResize && _this2.$props.columnResize.resizable // @ts-ignore
|
|
372
375
|
&& column.resizable && h(ColumnResizer, {
|
|
373
376
|
key: 2,
|
|
374
377
|
onResize: function onResize(e, element, end) {
|
|
@@ -416,7 +419,9 @@ var HeaderRowVue2 = {
|
|
|
416
419
|
filterOperators: _this2.$props.filterOperators,
|
|
417
420
|
onFilterchange: _this2.filterChangeHandler,
|
|
418
421
|
render: columnMenuRender
|
|
419
|
-
}), column.internalHeaderCell && h(
|
|
422
|
+
}), column.internalHeaderCell && h("span", {
|
|
423
|
+
"class": 'k-cell-inner'
|
|
424
|
+
}, [h(column.internalHeaderCell, {
|
|
420
425
|
key: 1,
|
|
421
426
|
field: column.field,
|
|
422
427
|
attrs: _this2.v3 ? undefined : {
|
|
@@ -442,7 +447,9 @@ var HeaderRowVue2 = {
|
|
|
442
447
|
render: (column.headerCell || _this2.$props.cellRender) && _this2.getTemplate(column.headerCell || _this2.$props.cellRender)
|
|
443
448
|
}, _this2.v3 ? function () {
|
|
444
449
|
return [sortIcon];
|
|
445
|
-
} : [sortIcon]) || h(
|
|
450
|
+
} : [sortIcon])]) || h("span", {
|
|
451
|
+
"class": 'k-cell-inner'
|
|
452
|
+
}, [h(GridHeaderCell, {
|
|
446
453
|
key: 1,
|
|
447
454
|
field: column.field,
|
|
448
455
|
attrs: _this2.v3 ? undefined : {
|
|
@@ -466,7 +473,7 @@ var HeaderRowVue2 = {
|
|
|
466
473
|
render: (column.headerCell || _this2.$props.cellRender) && _this2.getTemplate(column.headerCell || _this2.$props.cellRender)
|
|
467
474
|
}, _this2.v3 ? function () {
|
|
468
475
|
return [sortIcon];
|
|
469
|
-
} : [sortIcon]), _this2.$props.columnResize && _this2.$props.columnResize.resizable && column.resizable && h(ColumnResizer, {
|
|
476
|
+
} : [sortIcon])]), _this2.$props.columnResize && _this2.$props.columnResize.resizable && column.resizable && h(ColumnResizer, {
|
|
470
477
|
key: 2,
|
|
471
478
|
onResize: function onResize(e, element, end) {
|
|
472
479
|
return _this.$props.columnResize && _this.$props.columnResize.dragHandler(e, column, element, end);
|
|
@@ -505,7 +512,12 @@ var HeaderRowVue2 = {
|
|
|
505
512
|
onReleaseHandler: this.releaseHandler
|
|
506
513
|
}, this.v3 ? function () {
|
|
507
514
|
return [cells.call(_this3, rowIndexes)];
|
|
508
|
-
} : [cells.call(_this3, rowIndexes)]) || h("tr",
|
|
515
|
+
} : [cells.call(_this3, rowIndexes)]) || h("tr", {
|
|
516
|
+
role: 'row',
|
|
517
|
+
attrs: this.v3 ? undefined : {
|
|
518
|
+
role: 'row'
|
|
519
|
+
}
|
|
520
|
+
}, [cells.call(this, rowIndexes)]);
|
|
509
521
|
}, this), this.$props.filterRow]);
|
|
510
522
|
}
|
|
511
523
|
};
|
|
@@ -192,6 +192,11 @@ export interface GridProps {
|
|
|
192
192
|
* item ([more information and examples]({% slug editing_inline_grid %})).
|
|
193
193
|
*/
|
|
194
194
|
editField?: string;
|
|
195
|
+
/**
|
|
196
|
+
* A function that returns a custom class applied to the row.
|
|
197
|
+
* @param item - the item for the row.
|
|
198
|
+
*/
|
|
199
|
+
rowClass?: Function;
|
|
195
200
|
/**
|
|
196
201
|
* Defines the scroll mode that is used by the Grid ([see example]({% slug scrollmmodes_grid %}).
|
|
197
202
|
*
|
|
@@ -5,7 +5,7 @@ export var packageMetadata = {
|
|
|
5
5
|
name: '@progress/kendo-vue-grid',
|
|
6
6
|
productName: 'Kendo UI for Vue',
|
|
7
7
|
productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
|
|
8
|
-
publishDate:
|
|
8
|
+
publishDate: 1662553066,
|
|
9
9
|
version: '',
|
|
10
10
|
licensingDocsUrl: 'https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning'
|
|
11
11
|
};
|
package/dist/esm/Grid.js
CHANGED
|
@@ -119,6 +119,7 @@ var GridVue2 = {
|
|
|
119
119
|
group: Array,
|
|
120
120
|
groupable: [Boolean, Object],
|
|
121
121
|
editField: String,
|
|
122
|
+
rowClass: Function,
|
|
122
123
|
scrollable: {
|
|
123
124
|
type: String,
|
|
124
125
|
default: 'scrollable'
|
|
@@ -1582,7 +1583,8 @@ var GridVue2 = {
|
|
|
1582
1583
|
render: rowRenderFunction,
|
|
1583
1584
|
ariaRowIndex: currentAriaRowIndex,
|
|
1584
1585
|
dataIndex: dataIndex,
|
|
1585
|
-
isSelected: dataRow.isSelected
|
|
1586
|
+
isSelected: dataRow.isSelected,
|
|
1587
|
+
"class": this.$props.rowClass ? this.$props.rowClass(item) : ''
|
|
1586
1588
|
}, this.v3 ? function () {
|
|
1587
1589
|
return [dataRow.call(_this2, item, rowId, dataIndex).row];
|
|
1588
1590
|
} : [dataRow.call(_this2, item, rowId, dataIndex).row]), this.$props.detail && item.rowType === 'data' && item.expanded && h("tr", {
|
|
@@ -1692,10 +1694,6 @@ var GridVue2 = {
|
|
|
1692
1694
|
};
|
|
1693
1695
|
|
|
1694
1696
|
var colGroups = h("colgroup", {
|
|
1695
|
-
role: "presentation",
|
|
1696
|
-
attrs: this.v3 ? undefined : {
|
|
1697
|
-
role: "presentation"
|
|
1698
|
-
},
|
|
1699
1697
|
ref: setRef(this, 'colGroup')
|
|
1700
1698
|
}, [columnsWithColGroup.map(function (column, index) {
|
|
1701
1699
|
return h("col", {
|
|
@@ -7,7 +7,7 @@ import { GridFilterCellProps } from '../interfaces/GridFilterCellProps';
|
|
|
7
7
|
/**
|
|
8
8
|
* @hidden
|
|
9
9
|
*/
|
|
10
|
-
export interface GridFilterCellMethods
|
|
10
|
+
export interface GridFilterCellMethods {
|
|
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 GridFilterCellMethods extends Vue2type {
|
|
|
18
18
|
/**
|
|
19
19
|
* @hidden
|
|
20
20
|
*/
|
|
21
|
-
|
|
21
|
+
export interface GridFilterCellAll extends GridFilterCellMethods, GridFilterCellProps, Vue2type {
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @hidden
|
|
25
|
+
*/
|
|
26
|
+
declare let GridFilterCellVue2: ComponentOptions<Vue2type, DefaultData<{}>, DefaultMethods<GridFilterCellAll>, {}, RecordPropsDefinition<GridFilterCellProps>>;
|
|
22
27
|
/**
|
|
23
28
|
* @hidden
|
|
24
29
|
*/
|
|
@@ -30,7 +30,8 @@ var GridFilterCellVue2 = {
|
|
|
30
30
|
operators: Array,
|
|
31
31
|
booleanValues: Array,
|
|
32
32
|
onChange: Function,
|
|
33
|
-
render: [String, Function, Object]
|
|
33
|
+
render: [String, Function, Object],
|
|
34
|
+
ariaLabel: String
|
|
34
35
|
},
|
|
35
36
|
inject: {
|
|
36
37
|
kendoLocalizationService: {
|
|
@@ -107,7 +108,8 @@ var GridFilterCellVue2 = {
|
|
|
107
108
|
title: localizationService.toLanguageString(filterChooseOperator, messages[filterChooseOperator]),
|
|
108
109
|
popupSettings: {
|
|
109
110
|
width: ''
|
|
110
|
-
}
|
|
111
|
+
},
|
|
112
|
+
ariaLabel: 'filter'
|
|
111
113
|
},
|
|
112
114
|
"class": "k-dropdown-operator",
|
|
113
115
|
iconClassName: "k-i-filter k-icon",
|
|
@@ -116,7 +118,8 @@ var GridFilterCellVue2 = {
|
|
|
116
118
|
title: localizationService.toLanguageString(filterChooseOperator, messages[filterChooseOperator]),
|
|
117
119
|
popupSettings: {
|
|
118
120
|
width: ''
|
|
119
|
-
}
|
|
121
|
+
},
|
|
122
|
+
ariaLabel: 'filter'
|
|
120
123
|
})
|
|
121
124
|
);
|
|
122
125
|
};
|
|
@@ -131,7 +134,8 @@ var GridFilterCellVue2 = {
|
|
|
131
134
|
value: value,
|
|
132
135
|
attrs: this.v3 ? undefined : {
|
|
133
136
|
value: value,
|
|
134
|
-
title: this.$props.title
|
|
137
|
+
title: this.$props.title,
|
|
138
|
+
ariaLabel: this.ariaLabel
|
|
135
139
|
},
|
|
136
140
|
onChange: function onChange(e) {
|
|
137
141
|
_this.inputChange(e.value, e.event);
|
|
@@ -141,7 +145,8 @@ var GridFilterCellVue2 = {
|
|
|
141
145
|
_this.inputChange(e.value, e.event);
|
|
142
146
|
}
|
|
143
147
|
},
|
|
144
|
-
title: this.$props.title
|
|
148
|
+
title: this.$props.title,
|
|
149
|
+
ariaLabel: this.ariaLabel
|
|
145
150
|
})
|
|
146
151
|
);
|
|
147
152
|
|
|
@@ -151,7 +156,8 @@ var GridFilterCellVue2 = {
|
|
|
151
156
|
value: value,
|
|
152
157
|
attrs: this.v3 ? undefined : {
|
|
153
158
|
value: value,
|
|
154
|
-
title: this.$props.title
|
|
159
|
+
title: this.$props.title,
|
|
160
|
+
ariaLabel: this.ariaLabel
|
|
155
161
|
},
|
|
156
162
|
onChange: function onChange(e) {
|
|
157
163
|
_this.inputChange(e.value, e);
|
|
@@ -161,7 +167,8 @@ var GridFilterCellVue2 = {
|
|
|
161
167
|
_this.inputChange(e.value, e);
|
|
162
168
|
}
|
|
163
169
|
},
|
|
164
|
-
title: this.$props.title
|
|
170
|
+
title: this.$props.title,
|
|
171
|
+
ariaLabel: this.ariaLabel
|
|
165
172
|
})
|
|
166
173
|
);
|
|
167
174
|
|
|
@@ -182,11 +189,13 @@ var GridFilterCellVue2 = {
|
|
|
182
189
|
}),
|
|
183
190
|
"data-items": booleanValues,
|
|
184
191
|
textField: "text",
|
|
185
|
-
title: this.$props.title
|
|
192
|
+
title: this.$props.title,
|
|
193
|
+
ariaLabel: this.ariaLabel
|
|
186
194
|
},
|
|
187
195
|
"data-items": booleanValues,
|
|
188
196
|
textField: "text",
|
|
189
|
-
title: this.$props.title
|
|
197
|
+
title: this.$props.title,
|
|
198
|
+
ariaLabel: this.ariaLabel
|
|
190
199
|
})
|
|
191
200
|
);
|
|
192
201
|
|
|
@@ -209,17 +218,19 @@ var GridFilterCellVue2 = {
|
|
|
209
218
|
},
|
|
210
219
|
title: this.$props.title,
|
|
211
220
|
attrs: this.v3 ? undefined : {
|
|
212
|
-
title: this.$props.title
|
|
213
|
-
|
|
221
|
+
title: this.$props.title,
|
|
222
|
+
"aria-label": this.ariaLabel
|
|
223
|
+
},
|
|
224
|
+
"aria-label": this.ariaLabel
|
|
214
225
|
})]);
|
|
215
226
|
}
|
|
216
227
|
};
|
|
217
228
|
|
|
218
229
|
var defaultRendering = h("div", {
|
|
219
230
|
"class": "k-filtercell"
|
|
220
|
-
}, [h("div", {
|
|
221
|
-
"class": "k-filtercell-
|
|
222
|
-
}, [
|
|
231
|
+
}, [h("span", [filterComponent.call(this, this.$props.filterType, this.$props.value), h("div", {
|
|
232
|
+
"class": "k-filtercell-operator"
|
|
233
|
+
}, [renderOperatorEditor.call(this), // @ts-ignore function children
|
|
223
234
|
h(Button, {
|
|
224
235
|
type: "button",
|
|
225
236
|
attrs: this.v3 ? undefined : {
|
|
@@ -237,7 +248,7 @@ var GridFilterCellVue2 = {
|
|
|
237
248
|
on: this.v3 ? undefined : {
|
|
238
249
|
"click": this.clear
|
|
239
250
|
}
|
|
240
|
-
})])]);
|
|
251
|
+
})])])]);
|
|
241
252
|
var gridListeners = this.$props.grid ? getListeners.call(this.$props.grid) : null;
|
|
242
253
|
var cellRenderFunction = templateRendering.call(this.$props.grid, this.$props.render, gridListeners);
|
|
243
254
|
return getTemplate.call(this, {
|