@progress/kendo-vue-grid 3.7.4-dev.202212300853 → 3.7.4-dev.202301120847
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 +250 -64
- package/dist/es/GridToolbar.js +5 -1
- package/dist/es/cells/GridCell.d.ts +8 -1
- package/dist/es/cells/GridCell.js +11 -2
- package/dist/es/cells/GridDetailCell.js +1 -1
- package/dist/es/cells/GridDetailHierarchyCell.js +1 -1
- package/dist/es/cells/GridEditCell.d.ts +8 -1
- package/dist/es/cells/GridEditCell.js +13 -4
- package/dist/es/cells/GridFilterCell.js +34 -22
- package/dist/es/cells/GridGroupCell.d.ts +14 -2
- package/dist/es/cells/GridGroupCell.js +35 -5
- package/dist/es/cells/GridHierarchyCell.js +25 -6
- package/dist/es/cells/GridSelectionCell.d.ts +8 -1
- package/dist/es/cells/GridSelectionCell.js +10 -1
- package/dist/es/columnMenu/ColumnMenu.js +13 -10
- package/dist/es/columnMenu/GridColumnMenuCheckboxFilter.js +12 -5
- package/dist/es/columnMenu/GridColumnMenuFilter.js +9 -4
- package/dist/es/columnMenu/GridColumnMenuItem.d.ts +9 -0
- package/dist/es/columnMenu/GridColumnMenuItem.js +13 -2
- package/dist/es/columnMenu/GridColumnMenuSort.js +17 -8
- package/dist/es/drag/ColumnDraggable.js +15 -2
- package/dist/es/drag/CommonDragLogic.d.ts +1 -0
- package/dist/es/drag/CommonDragLogic.js +20 -9
- package/dist/es/drag/GroupingIndicator.js +25 -24
- package/dist/es/filterCommon.d.ts +4 -0
- package/dist/es/filterCommon.js +17 -1
- package/dist/es/footer/Footer.js +12 -2
- package/dist/es/footer/FooterRow.d.ts +1 -0
- package/dist/es/footer/FooterRow.js +12 -6
- package/dist/es/header/FilterRow.d.ts +1 -0
- package/dist/es/header/FilterRow.js +31 -23
- package/dist/es/header/GroupPanel.d.ts +1 -0
- package/dist/es/header/GroupPanel.js +18 -5
- package/dist/es/header/Header.js +4 -12
- package/dist/es/header/HeaderRow.d.ts +2 -0
- package/dist/es/header/HeaderRow.js +45 -15
- package/dist/es/interfaces/GridFilterCellProps.d.ts +12 -0
- package/dist/es/messages/main.d.ts +60 -0
- package/dist/es/messages/main.js +60 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/rows/GridRow.js +2 -2
- package/dist/es/utils/main.js +1 -1
- package/dist/esm/Grid.js +250 -64
- package/dist/esm/GridToolbar.js +5 -1
- package/dist/esm/cells/GridCell.d.ts +8 -1
- package/dist/esm/cells/GridCell.js +11 -2
- package/dist/esm/cells/GridDetailCell.js +1 -1
- package/dist/esm/cells/GridDetailHierarchyCell.js +1 -1
- package/dist/esm/cells/GridEditCell.d.ts +8 -1
- package/dist/esm/cells/GridEditCell.js +13 -4
- package/dist/esm/cells/GridFilterCell.js +34 -22
- package/dist/esm/cells/GridGroupCell.d.ts +14 -2
- package/dist/esm/cells/GridGroupCell.js +35 -5
- package/dist/esm/cells/GridHierarchyCell.js +25 -6
- package/dist/esm/cells/GridSelectionCell.d.ts +8 -1
- package/dist/esm/cells/GridSelectionCell.js +10 -1
- package/dist/esm/columnMenu/ColumnMenu.js +13 -10
- package/dist/esm/columnMenu/GridColumnMenuCheckboxFilter.js +12 -5
- package/dist/esm/columnMenu/GridColumnMenuFilter.js +9 -4
- package/dist/esm/columnMenu/GridColumnMenuItem.d.ts +9 -0
- package/dist/esm/columnMenu/GridColumnMenuItem.js +13 -2
- package/dist/esm/columnMenu/GridColumnMenuSort.js +17 -8
- package/dist/esm/drag/ColumnDraggable.js +15 -2
- package/dist/esm/drag/CommonDragLogic.d.ts +1 -0
- package/dist/esm/drag/CommonDragLogic.js +20 -9
- package/dist/esm/drag/GroupingIndicator.js +25 -24
- package/dist/esm/filterCommon.d.ts +4 -0
- package/dist/esm/filterCommon.js +17 -1
- package/dist/esm/footer/Footer.js +12 -2
- package/dist/esm/footer/FooterRow.d.ts +1 -0
- package/dist/esm/footer/FooterRow.js +12 -6
- package/dist/esm/header/FilterRow.d.ts +1 -0
- package/dist/esm/header/FilterRow.js +31 -23
- package/dist/esm/header/GroupPanel.d.ts +1 -0
- package/dist/esm/header/GroupPanel.js +18 -5
- package/dist/esm/header/Header.js +4 -12
- package/dist/esm/header/HeaderRow.d.ts +2 -0
- package/dist/esm/header/HeaderRow.js +45 -15
- package/dist/esm/interfaces/GridFilterCellProps.d.ts +12 -0
- package/dist/esm/messages/main.d.ts +60 -0
- package/dist/esm/messages/main.js +60 -0
- package/dist/esm/package-metadata.js +1 -1
- package/dist/esm/rows/GridRow.js +2 -2
- package/dist/esm/utils/main.js +1 -1
- package/dist/npm/Grid.js +250 -64
- package/dist/npm/GridToolbar.js +5 -1
- package/dist/npm/cells/GridCell.d.ts +8 -1
- package/dist/npm/cells/GridCell.js +11 -2
- package/dist/npm/cells/GridDetailCell.js +1 -1
- package/dist/npm/cells/GridDetailHierarchyCell.js +1 -1
- package/dist/npm/cells/GridEditCell.d.ts +8 -1
- package/dist/npm/cells/GridEditCell.js +13 -4
- package/dist/npm/cells/GridFilterCell.js +33 -21
- package/dist/npm/cells/GridGroupCell.d.ts +14 -2
- package/dist/npm/cells/GridGroupCell.js +34 -4
- package/dist/npm/cells/GridHierarchyCell.js +24 -5
- package/dist/npm/cells/GridSelectionCell.d.ts +8 -1
- package/dist/npm/cells/GridSelectionCell.js +10 -1
- package/dist/npm/columnMenu/ColumnMenu.js +13 -10
- package/dist/npm/columnMenu/GridColumnMenuCheckboxFilter.js +12 -5
- package/dist/npm/columnMenu/GridColumnMenuFilter.js +9 -4
- package/dist/npm/columnMenu/GridColumnMenuItem.d.ts +9 -0
- package/dist/npm/columnMenu/GridColumnMenuItem.js +13 -2
- package/dist/npm/columnMenu/GridColumnMenuSort.js +17 -8
- package/dist/npm/drag/ColumnDraggable.js +15 -2
- package/dist/npm/drag/CommonDragLogic.d.ts +1 -0
- package/dist/npm/drag/CommonDragLogic.js +20 -9
- package/dist/npm/drag/GroupingIndicator.js +25 -24
- package/dist/npm/filterCommon.d.ts +4 -0
- package/dist/npm/filterCommon.js +18 -1
- package/dist/npm/footer/Footer.js +12 -2
- package/dist/npm/footer/FooterRow.d.ts +1 -0
- package/dist/npm/footer/FooterRow.js +12 -6
- package/dist/npm/header/FilterRow.d.ts +1 -0
- package/dist/npm/header/FilterRow.js +29 -21
- package/dist/npm/header/GroupPanel.d.ts +1 -0
- package/dist/npm/header/GroupPanel.js +17 -4
- package/dist/npm/header/Header.js +4 -12
- package/dist/npm/header/HeaderRow.d.ts +2 -0
- package/dist/npm/header/HeaderRow.js +45 -15
- package/dist/npm/interfaces/GridFilterCellProps.d.ts +12 -0
- package/dist/npm/messages/main.d.ts +60 -0
- package/dist/npm/messages/main.js +61 -1
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/rows/GridRow.js +2 -2
- package/dist/npm/utils/main.js +1 -1
- package/package.json +18 -16
|
@@ -37,6 +37,7 @@ import { messages, filterClearButton, filterSubmitButton, filterTitle } from '..
|
|
|
37
37
|
import { GridColumnMenuFilterCell } from './GridColumnMenuFilterCell';
|
|
38
38
|
import { ColumnMenuFilterOperators } from './GridColumnMenuFilterOperators';
|
|
39
39
|
import { DropDownList } from '@progress/kendo-vue-dropdowns';
|
|
40
|
+
import { filterIcon } from '@progress/kendo-svg-icons';
|
|
40
41
|
/**
|
|
41
42
|
* @hidden
|
|
42
43
|
*/
|
|
@@ -352,9 +353,11 @@ var GridColumnMenuFilterVue2 = {
|
|
|
352
353
|
title: localizationService.toLanguageString(filterTitle, messages[filterTitle]),
|
|
353
354
|
attrs: _this2.v3 ? undefined : {
|
|
354
355
|
title: localizationService.toLanguageString(filterTitle, messages[filterTitle]),
|
|
355
|
-
|
|
356
|
+
icon: 'filter',
|
|
357
|
+
svgIcon: filterIcon
|
|
356
358
|
},
|
|
357
|
-
|
|
359
|
+
icon: 'filter',
|
|
360
|
+
svgIcon: filterIcon,
|
|
358
361
|
onMenuitemclick: _this2.onFilterExpand,
|
|
359
362
|
on: _this2.v3 ? undefined : {
|
|
360
363
|
"menuitemclick": _this2.onFilterExpand
|
|
@@ -641,9 +644,11 @@ var GridColumnMenuFilterVue2 = {
|
|
|
641
644
|
title: localizationService.toLanguageString(filterTitle, messages[filterTitle]),
|
|
642
645
|
attrs: _this2.v3 ? undefined : {
|
|
643
646
|
title: localizationService.toLanguageString(filterTitle, messages[filterTitle]),
|
|
644
|
-
|
|
647
|
+
icon: 'filter',
|
|
648
|
+
svgIcon: filterIcon
|
|
645
649
|
},
|
|
646
|
-
|
|
650
|
+
icon: 'filter',
|
|
651
|
+
svgIcon: filterIcon,
|
|
647
652
|
onMenuitemclick: _this2.onFilterExpand,
|
|
648
653
|
on: _this2.v3 ? undefined : {
|
|
649
654
|
"menuitemclick": _this2.onFilterExpand
|
|
@@ -3,6 +3,7 @@ declare type DefaultData<V> = object | ((this: V) => {});
|
|
|
3
3
|
declare type DefaultMethods<V> = {
|
|
4
4
|
[key: string]: (this: V, ...args: any[]) => any;
|
|
5
5
|
};
|
|
6
|
+
import { SVGIcon } from '@progress/kendo-svg-icons';
|
|
6
7
|
/**
|
|
7
8
|
* The props of the GridColumnMenuItem component.
|
|
8
9
|
*/
|
|
@@ -19,6 +20,14 @@ export interface GridColumnMenuItemProps {
|
|
|
19
20
|
* The class of the icon rendered next to the title.
|
|
20
21
|
*/
|
|
21
22
|
iconClass: string;
|
|
23
|
+
/**
|
|
24
|
+
* Defines the name for the icon.
|
|
25
|
+
*/
|
|
26
|
+
icon?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Defines the svg icon in a Kendo UI for Vue theme.
|
|
29
|
+
*/
|
|
30
|
+
svgIcon?: SVGIcon;
|
|
22
31
|
/**
|
|
23
32
|
* The selected state of the component.
|
|
24
33
|
*/
|
|
@@ -11,6 +11,8 @@ var GridColumnMenuItemVue2 = {
|
|
|
11
11
|
props: {
|
|
12
12
|
title: String,
|
|
13
13
|
iconClass: String,
|
|
14
|
+
icon: String,
|
|
15
|
+
svgIcon: Object,
|
|
14
16
|
selected: Boolean
|
|
15
17
|
},
|
|
16
18
|
methods: {
|
|
@@ -36,7 +38,9 @@ var GridColumnMenuItemVue2 = {
|
|
|
36
38
|
var _a = this.$props,
|
|
37
39
|
title = _a.title,
|
|
38
40
|
iconClass = _a.iconClass,
|
|
39
|
-
selected = _a.selected
|
|
41
|
+
selected = _a.selected,
|
|
42
|
+
icon = _a.icon,
|
|
43
|
+
svgIcon = _a.svgIcon;
|
|
40
44
|
return h("div", {
|
|
41
45
|
tabindex: 0,
|
|
42
46
|
attrs: this.v3 ? undefined : {
|
|
@@ -50,7 +54,14 @@ var GridColumnMenuItemVue2 = {
|
|
|
50
54
|
onClick: this.onClick,
|
|
51
55
|
"class": "k-columnmenu-item ".concat(selected ? 'k-selected' : '')
|
|
52
56
|
}, [iconClass && h(Icon, {
|
|
53
|
-
"class":
|
|
57
|
+
"class": iconClass
|
|
58
|
+
}), (icon || svgIcon) && h(Icon, {
|
|
59
|
+
name: icon,
|
|
60
|
+
attrs: this.v3 ? undefined : {
|
|
61
|
+
name: icon,
|
|
62
|
+
svg: svgIcon
|
|
63
|
+
},
|
|
64
|
+
svg: svgIcon
|
|
54
65
|
}), title]);
|
|
55
66
|
}
|
|
56
67
|
};
|
|
@@ -9,6 +9,7 @@ import { GridColumnMenuItemGroup } from './GridColumnMenuItemGroup';
|
|
|
9
9
|
import { normalize } from '../interfaces/GridSortSettings';
|
|
10
10
|
import { provideLocalizationService } from '@progress/kendo-vue-intl';
|
|
11
11
|
import { messages, sortAscending, sortDescending } from '../messages/main';
|
|
12
|
+
import { sortAscSmallIcon, sortDescSmallIcon } from '@progress/kendo-svg-icons';
|
|
12
13
|
import { hasListener } from '@progress/kendo-vue-common';
|
|
13
14
|
/**
|
|
14
15
|
* @hidden
|
|
@@ -166,10 +167,12 @@ var GridColumnMenuSortVue2 = {
|
|
|
166
167
|
title: localizationService.toLanguageString(sortAscending, messages[sortAscending]),
|
|
167
168
|
attrs: _this.v3 ? undefined : {
|
|
168
169
|
title: localizationService.toLanguageString(sortAscending, messages[sortAscending]),
|
|
169
|
-
|
|
170
|
+
icon: 'sort-asc-small',
|
|
171
|
+
svgIcon: sortAscSmallIcon,
|
|
170
172
|
selected: sortedAsc(currentSortIndex, sort)
|
|
171
173
|
},
|
|
172
|
-
|
|
174
|
+
icon: 'sort-asc-small',
|
|
175
|
+
svgIcon: sortAscSmallIcon,
|
|
173
176
|
selected: sortedAsc(currentSortIndex, sort),
|
|
174
177
|
onMenuitemclick: _this.onAscClick,
|
|
175
178
|
on: _this.v3 ? undefined : {
|
|
@@ -181,10 +184,12 @@ var GridColumnMenuSortVue2 = {
|
|
|
181
184
|
title: localizationService.toLanguageString(sortDescending, messages[sortDescending]),
|
|
182
185
|
attrs: _this.v3 ? undefined : {
|
|
183
186
|
title: localizationService.toLanguageString(sortDescending, messages[sortDescending]),
|
|
184
|
-
|
|
187
|
+
icon: 'sort-desc-small',
|
|
188
|
+
svgIcon: sortDescSmallIcon,
|
|
185
189
|
selected: sortedDesc(currentSortIndex, sort)
|
|
186
190
|
},
|
|
187
|
-
|
|
191
|
+
icon: 'sort-desc-small',
|
|
192
|
+
svgIcon: sortDescSmallIcon,
|
|
188
193
|
selected: sortedDesc(currentSortIndex, sort),
|
|
189
194
|
onMenuitemclick: _this.onDescClick,
|
|
190
195
|
on: _this.v3 ? undefined : {
|
|
@@ -195,10 +200,12 @@ var GridColumnMenuSortVue2 = {
|
|
|
195
200
|
title: localizationService.toLanguageString(sortAscending, messages[sortAscending]),
|
|
196
201
|
attrs: _this.v3 ? undefined : {
|
|
197
202
|
title: localizationService.toLanguageString(sortAscending, messages[sortAscending]),
|
|
198
|
-
|
|
203
|
+
icon: 'sort-asc-small',
|
|
204
|
+
svgIcon: sortAscSmallIcon,
|
|
199
205
|
selected: sortedAsc(currentSortIndex, sort)
|
|
200
206
|
},
|
|
201
|
-
|
|
207
|
+
icon: 'sort-asc-small',
|
|
208
|
+
svgIcon: sortAscSmallIcon,
|
|
202
209
|
selected: sortedAsc(currentSortIndex, sort),
|
|
203
210
|
onMenuitemclick: _this.onAscClick,
|
|
204
211
|
on: _this.v3 ? undefined : {
|
|
@@ -208,10 +215,12 @@ var GridColumnMenuSortVue2 = {
|
|
|
208
215
|
title: localizationService.toLanguageString(sortDescending, messages[sortDescending]),
|
|
209
216
|
attrs: _this.v3 ? undefined : {
|
|
210
217
|
title: localizationService.toLanguageString(sortDescending, messages[sortDescending]),
|
|
211
|
-
|
|
218
|
+
icon: 'sort-desc-small',
|
|
219
|
+
svgIcon: sortDescSmallIcon,
|
|
212
220
|
selected: sortedDesc(currentSortIndex, sort)
|
|
213
221
|
},
|
|
214
|
-
|
|
222
|
+
icon: 'sort-desc-small',
|
|
223
|
+
svgIcon: sortDescSmallIcon,
|
|
215
224
|
selected: sortedDesc(currentSortIndex, sort),
|
|
216
225
|
onMenuitemclick: _this.onDescClick,
|
|
217
226
|
on: _this.v3 ? undefined : {
|
|
@@ -42,6 +42,7 @@ var ColumnDraggableVue2 = {
|
|
|
42
42
|
},
|
|
43
43
|
// @ts-ignore
|
|
44
44
|
render: function render(createElement) {
|
|
45
|
+
var _this = this;
|
|
45
46
|
var h = gh || createElement;
|
|
46
47
|
var defaultSlot = getDefaultSlots(this);
|
|
47
48
|
return (
|
|
@@ -57,8 +58,20 @@ var ColumnDraggableVue2 = {
|
|
|
57
58
|
onRelease: this.onRelease,
|
|
58
59
|
ref: 'draggable'
|
|
59
60
|
}, this.v3 ? function () {
|
|
60
|
-
return [h("tr",
|
|
61
|
-
|
|
61
|
+
return [h("tr", {
|
|
62
|
+
"class": 'k-table-row',
|
|
63
|
+
role: 'row',
|
|
64
|
+
attrs: _this.v3 ? undefined : {
|
|
65
|
+
role: 'row'
|
|
66
|
+
}
|
|
67
|
+
}, [defaultSlot])];
|
|
68
|
+
} : [h("tr", {
|
|
69
|
+
"class": 'k-table-row',
|
|
70
|
+
role: 'row',
|
|
71
|
+
attrs: _this.v3 ? undefined : {
|
|
72
|
+
role: 'row'
|
|
73
|
+
}
|
|
74
|
+
}, [defaultSlot])])
|
|
62
75
|
);
|
|
63
76
|
}
|
|
64
77
|
};
|
|
@@ -28,6 +28,7 @@ export declare class CommonDragLogic {
|
|
|
28
28
|
dragHandler: (event: any, element: HTMLElement) => void;
|
|
29
29
|
releaseHandler: (event: any) => void;
|
|
30
30
|
private getColumnIndex;
|
|
31
|
+
private isTargetGroupingContainer;
|
|
31
32
|
private getGroupIndex;
|
|
32
33
|
private isValid;
|
|
33
34
|
private updateDragElementClue;
|
|
@@ -16,7 +16,7 @@ var CommonDragLogic = /** @class */ (function () {
|
|
|
16
16
|
this.currentGroup = -1;
|
|
17
17
|
this.groupPanelDivElement = null;
|
|
18
18
|
this.refGroupPanelDiv = function (e) {
|
|
19
|
-
_this.groupPanelDivElement = e;
|
|
19
|
+
_this.groupPanelDivElement = e.children ? e.children[0] : e;
|
|
20
20
|
};
|
|
21
21
|
this.refDropElementClue = function (e) {
|
|
22
22
|
_this.dropElementClue = e;
|
|
@@ -52,10 +52,12 @@ var CommonDragLogic = /** @class */ (function () {
|
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
54
|
_this.currentColumn = _this.getColumnIndex(event, element);
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
var groupPanelChildren = _this.groupPanelDivElement.children;
|
|
56
|
+
_this.currentGroup = _this.isTargetGroupingContainer(event)
|
|
57
|
+
? groupPanelChildren && groupPanelChildren.length
|
|
58
|
+
? groupPanelChildren.length - 1
|
|
59
|
+
: 0
|
|
60
|
+
: _this.getGroupIndex(event);
|
|
59
61
|
var invalidIndex = !_this.isValid();
|
|
60
62
|
if (invalidIndex) {
|
|
61
63
|
_this.currentColumn = -1;
|
|
@@ -63,7 +65,9 @@ var CommonDragLogic = /** @class */ (function () {
|
|
|
63
65
|
}
|
|
64
66
|
var targetElement = (_this.currentColumn >= 0) ?
|
|
65
67
|
element.children[_this.columns[_this.currentColumn].index] :
|
|
66
|
-
_this.
|
|
68
|
+
_this.isTargetGroupingContainer(event)
|
|
69
|
+
? event.originalEvent.target
|
|
70
|
+
: _this.groupPanelDivElement && _this.groupPanelDivElement.children[_this.currentGroup];
|
|
67
71
|
_this.updateDragElementClue(event, element, targetElement, invalidIndex);
|
|
68
72
|
_this.updateDropElementClue(event, element, targetElement, invalidIndex);
|
|
69
73
|
};
|
|
@@ -118,6 +122,10 @@ var CommonDragLogic = /** @class */ (function () {
|
|
|
118
122
|
}
|
|
119
123
|
return -1;
|
|
120
124
|
};
|
|
125
|
+
CommonDragLogic.prototype.isTargetGroupingContainer = function (event) {
|
|
126
|
+
var target = event.originalEvent.target;
|
|
127
|
+
return target.className.indexOf('k-grouping-drop-container') !== -1;
|
|
128
|
+
};
|
|
121
129
|
CommonDragLogic.prototype.getGroupIndex = function (event) {
|
|
122
130
|
return getIndex(event, this.groupPanelDivElement);
|
|
123
131
|
};
|
|
@@ -162,15 +170,18 @@ var CommonDragLogic = /** @class */ (function () {
|
|
|
162
170
|
return;
|
|
163
171
|
}
|
|
164
172
|
var rect = targetElement.getBoundingClientRect();
|
|
173
|
+
var groupElement = targetElement.closest('.k-grouping-header');
|
|
174
|
+
var rectParent = (groupElement || targetElement).getBoundingClientRect();
|
|
165
175
|
var left = rect.left + event.pageX - event.clientX - 6;
|
|
166
|
-
if (this.
|
|
176
|
+
if (!this.isTargetGroupingContainer(event) && (this.currentColumn > this.startColumn
|
|
177
|
+
|| this.currentGroup > this.startGroup && this.startGroup !== -1)) {
|
|
167
178
|
left += rect.width;
|
|
168
179
|
}
|
|
169
|
-
var top =
|
|
180
|
+
var top = rectParent.top + event.pageY - event.clientY;
|
|
170
181
|
this.dropElementClue.visible = true;
|
|
171
182
|
this.dropElementClue.top = top;
|
|
172
183
|
this.dropElementClue.left = left;
|
|
173
|
-
this.dropElementClue.height = (this.currentColumn >= 0) ? element.clientHeight :
|
|
184
|
+
this.dropElementClue.height = (this.currentColumn >= 0) ? element.clientHeight : rectParent.height;
|
|
174
185
|
};
|
|
175
186
|
return CommonDragLogic;
|
|
176
187
|
}());
|
|
@@ -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-
|
|
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-
|
|
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
|
};
|
package/dist/es/filterCommon.js
CHANGED
|
@@ -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
|
+
};
|
package/dist/es/footer/Footer.js
CHANGED
|
@@ -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",
|
|
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
|
/**
|
|
@@ -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
|
};
|
|
@@ -4,12 +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,
|
|
12
|
-
import { classNames } from '@progress/kendo-vue-common';
|
|
11
|
+
import { tableKeyboardNavigationTools as navigationTools, HeaderTdElement } from '@progress/kendo-vue-data-tools';
|
|
13
12
|
/**
|
|
14
13
|
* @hidden
|
|
15
14
|
*/
|
|
@@ -23,7 +22,8 @@ var FilterRowVue2 = {
|
|
|
23
22
|
sort: [Object, Array],
|
|
24
23
|
cellRender: [String, Function, Object],
|
|
25
24
|
isRtl: Boolean,
|
|
26
|
-
ariaRowIndex: Number
|
|
25
|
+
ariaRowIndex: Number,
|
|
26
|
+
size: String
|
|
27
27
|
},
|
|
28
28
|
inject: {
|
|
29
29
|
kendoLocalizationService: {
|
|
@@ -32,7 +32,7 @@ var FilterRowVue2 = {
|
|
|
32
32
|
},
|
|
33
33
|
methods: {
|
|
34
34
|
headerCellClassName: function headerCellClassName(field, locked) {
|
|
35
|
-
var result = ""
|
|
35
|
+
var result = "k-table-th k-header" + (locked ? ' k-grid-header-sticky' : '');
|
|
36
36
|
if (this.$props.sort && this.$props.sort.filter(function (descriptor) {
|
|
37
37
|
return descriptor.field === field;
|
|
38
38
|
}).length > 0) {
|
|
@@ -94,7 +94,6 @@ var FilterRowVue2 = {
|
|
|
94
94
|
})[0];
|
|
95
95
|
return found ? found.operator : null;
|
|
96
96
|
};
|
|
97
|
-
var filterCellProps;
|
|
98
97
|
var serviceIndex = 0,
|
|
99
98
|
index = -1;
|
|
100
99
|
var filterCells = this.$props.columns.filter(function (c) {
|
|
@@ -105,6 +104,7 @@ var FilterRowVue2 = {
|
|
|
105
104
|
_this.setFilter(e.value, e.operator, column.field, e);
|
|
106
105
|
};
|
|
107
106
|
var filterType = getFilterType(column.filter);
|
|
107
|
+
var ariaLabelFilter = column.field + ' ' + getAriaLabel(filterType, intl);
|
|
108
108
|
// @ts-ignore
|
|
109
109
|
var filterRender = h(GridFilterCell, {
|
|
110
110
|
grid: this.$props.grid,
|
|
@@ -117,7 +117,9 @@ var FilterRowVue2 = {
|
|
|
117
117
|
operators: operatorMap(this.$props.filterOperators[filterType] || [], intl),
|
|
118
118
|
booleanValues: operatorMap(booleanFilterValues, intl),
|
|
119
119
|
filterType: filterType,
|
|
120
|
-
render: column.filterCell || this.$props.cellRender
|
|
120
|
+
render: column.filterCell || this.$props.cellRender,
|
|
121
|
+
ariaLabel: ariaLabelFilter,
|
|
122
|
+
size: this.$props.size
|
|
121
123
|
},
|
|
122
124
|
field: column.field,
|
|
123
125
|
title: column.filterTitle,
|
|
@@ -130,7 +132,9 @@ var FilterRowVue2 = {
|
|
|
130
132
|
on: this.v3 ? undefined : {
|
|
131
133
|
"change": onChangeFn
|
|
132
134
|
},
|
|
133
|
-
render: column.filterCell || this.$props.cellRender
|
|
135
|
+
render: column.filterCell || this.$props.cellRender,
|
|
136
|
+
ariaLabel: ariaLabelFilter,
|
|
137
|
+
size: this.$props.size
|
|
134
138
|
});
|
|
135
139
|
var key = column.declarationIndex >= 0 ? ++index : --serviceIndex;
|
|
136
140
|
var ariaAttrs = {
|
|
@@ -146,43 +150,47 @@ var FilterRowVue2 = {
|
|
|
146
150
|
} : {};
|
|
147
151
|
var filterCell =
|
|
148
152
|
// @ts-ignore function children
|
|
149
|
-
h(
|
|
153
|
+
h(HeaderTdElement, {
|
|
150
154
|
key: key,
|
|
151
|
-
|
|
155
|
+
role: 'gridcell',
|
|
152
156
|
attrs: this.v3 ? undefined : {
|
|
157
|
+
role: 'gridcell',
|
|
153
158
|
columnId: navigationTools.getFilterColumnId(column.id),
|
|
154
159
|
navigatable: column.navigatable,
|
|
155
|
-
|
|
156
|
-
|
|
160
|
+
ariaColumnIndex: ariaAttrs.ariaColumnIndex,
|
|
161
|
+
ariaLabel: ariaLabelFilter
|
|
157
162
|
},
|
|
163
|
+
columnId: navigationTools.getFilterColumnId(column.id),
|
|
158
164
|
navigatable: column.navigatable,
|
|
159
165
|
style: style,
|
|
160
|
-
"class":
|
|
161
|
-
|
|
162
|
-
|
|
166
|
+
"class": this.headerCellClassName(column.field, column.locked) || undefined,
|
|
167
|
+
ariaColumnIndex: ariaAttrs.ariaColumnIndex,
|
|
168
|
+
ariaLabel: ariaLabelFilter
|
|
163
169
|
}, this.v3 ? function () {
|
|
164
170
|
return [filterRender];
|
|
165
171
|
} : [filterRender]);
|
|
166
172
|
return column.filterable && filterCell ||
|
|
167
173
|
// @ts-ignore function children
|
|
168
|
-
h(
|
|
174
|
+
h(HeaderTdElement, {
|
|
169
175
|
key: key,
|
|
170
|
-
|
|
176
|
+
role: 'gridcell',
|
|
171
177
|
attrs: this.v3 ? undefined : {
|
|
178
|
+
role: 'gridcell',
|
|
172
179
|
columnId: navigationTools.getFilterColumnId(column.id),
|
|
173
180
|
navigatable: column.navigatable,
|
|
174
|
-
|
|
175
|
-
|
|
181
|
+
ariaColumnIndex: ariaAttrs.ariaColumnIndex,
|
|
182
|
+
ariaLabel: ariaLabelFilter
|
|
176
183
|
},
|
|
184
|
+
columnId: navigationTools.getFilterColumnId(column.id),
|
|
177
185
|
navigatable: column.navigatable,
|
|
178
186
|
style: style,
|
|
179
|
-
"class":
|
|
180
|
-
|
|
181
|
-
|
|
187
|
+
"class": this.headerCellClassName(column.field, column.locked) || undefined,
|
|
188
|
+
ariaColumnIndex: ariaAttrs.ariaColumnIndex,
|
|
189
|
+
ariaLabel: ariaLabelFilter
|
|
182
190
|
});
|
|
183
191
|
}, this);
|
|
184
192
|
return h("tr", {
|
|
185
|
-
"class": "k-filter-row",
|
|
193
|
+
"class": "k-table-row k-filter-row",
|
|
186
194
|
"aria-rowindex": this.ariaRowIndex,
|
|
187
195
|
attrs: this.v3 ? undefined : {
|
|
188
196
|
"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;
|