@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
|
@@ -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
|
*/
|
|
@@ -17,6 +17,8 @@ var GridColumnMenuItemVue2 = {
|
|
|
17
17
|
props: {
|
|
18
18
|
title: String,
|
|
19
19
|
iconClass: String,
|
|
20
|
+
icon: String,
|
|
21
|
+
svgIcon: Object,
|
|
20
22
|
selected: Boolean
|
|
21
23
|
},
|
|
22
24
|
methods: {
|
|
@@ -42,7 +44,9 @@ var GridColumnMenuItemVue2 = {
|
|
|
42
44
|
var _a = this.$props,
|
|
43
45
|
title = _a.title,
|
|
44
46
|
iconClass = _a.iconClass,
|
|
45
|
-
selected = _a.selected
|
|
47
|
+
selected = _a.selected,
|
|
48
|
+
icon = _a.icon,
|
|
49
|
+
svgIcon = _a.svgIcon;
|
|
46
50
|
return h("div", {
|
|
47
51
|
tabindex: 0,
|
|
48
52
|
attrs: this.v3 ? undefined : {
|
|
@@ -56,7 +60,14 @@ var GridColumnMenuItemVue2 = {
|
|
|
56
60
|
onClick: this.onClick,
|
|
57
61
|
"class": "k-columnmenu-item ".concat(selected ? 'k-selected' : '')
|
|
58
62
|
}, [iconClass && h(kendo_vue_common_1.Icon, {
|
|
59
|
-
"class":
|
|
63
|
+
"class": iconClass
|
|
64
|
+
}), (icon || svgIcon) && h(kendo_vue_common_1.Icon, {
|
|
65
|
+
name: icon,
|
|
66
|
+
attrs: this.v3 ? undefined : {
|
|
67
|
+
name: icon,
|
|
68
|
+
svg: svgIcon
|
|
69
|
+
},
|
|
70
|
+
svg: svgIcon
|
|
60
71
|
}), title]);
|
|
61
72
|
}
|
|
62
73
|
};
|
|
@@ -15,6 +15,7 @@ var GridColumnMenuItemGroup_1 = require("./GridColumnMenuItemGroup");
|
|
|
15
15
|
var GridSortSettings_1 = require("../interfaces/GridSortSettings");
|
|
16
16
|
var kendo_vue_intl_1 = require("@progress/kendo-vue-intl");
|
|
17
17
|
var main_1 = require("../messages/main");
|
|
18
|
+
var kendo_svg_icons_1 = require("@progress/kendo-svg-icons");
|
|
18
19
|
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
19
20
|
/**
|
|
20
21
|
* @hidden
|
|
@@ -173,10 +174,12 @@ var GridColumnMenuSortVue2 = {
|
|
|
173
174
|
title: localizationService.toLanguageString(main_1.sortAscending, main_1.messages[main_1.sortAscending]),
|
|
174
175
|
attrs: _this.v3 ? undefined : {
|
|
175
176
|
title: localizationService.toLanguageString(main_1.sortAscending, main_1.messages[main_1.sortAscending]),
|
|
176
|
-
|
|
177
|
+
icon: 'sort-asc-small',
|
|
178
|
+
svgIcon: kendo_svg_icons_1.sortAscSmallIcon,
|
|
177
179
|
selected: sortedAsc(currentSortIndex, sort)
|
|
178
180
|
},
|
|
179
|
-
|
|
181
|
+
icon: 'sort-asc-small',
|
|
182
|
+
svgIcon: kendo_svg_icons_1.sortAscSmallIcon,
|
|
180
183
|
selected: sortedAsc(currentSortIndex, sort),
|
|
181
184
|
onMenuitemclick: _this.onAscClick,
|
|
182
185
|
on: _this.v3 ? undefined : {
|
|
@@ -188,10 +191,12 @@ var GridColumnMenuSortVue2 = {
|
|
|
188
191
|
title: localizationService.toLanguageString(main_1.sortDescending, main_1.messages[main_1.sortDescending]),
|
|
189
192
|
attrs: _this.v3 ? undefined : {
|
|
190
193
|
title: localizationService.toLanguageString(main_1.sortDescending, main_1.messages[main_1.sortDescending]),
|
|
191
|
-
|
|
194
|
+
icon: 'sort-desc-small',
|
|
195
|
+
svgIcon: kendo_svg_icons_1.sortDescSmallIcon,
|
|
192
196
|
selected: sortedDesc(currentSortIndex, sort)
|
|
193
197
|
},
|
|
194
|
-
|
|
198
|
+
icon: 'sort-desc-small',
|
|
199
|
+
svgIcon: kendo_svg_icons_1.sortDescSmallIcon,
|
|
195
200
|
selected: sortedDesc(currentSortIndex, sort),
|
|
196
201
|
onMenuitemclick: _this.onDescClick,
|
|
197
202
|
on: _this.v3 ? undefined : {
|
|
@@ -202,10 +207,12 @@ var GridColumnMenuSortVue2 = {
|
|
|
202
207
|
title: localizationService.toLanguageString(main_1.sortAscending, main_1.messages[main_1.sortAscending]),
|
|
203
208
|
attrs: _this.v3 ? undefined : {
|
|
204
209
|
title: localizationService.toLanguageString(main_1.sortAscending, main_1.messages[main_1.sortAscending]),
|
|
205
|
-
|
|
210
|
+
icon: 'sort-asc-small',
|
|
211
|
+
svgIcon: kendo_svg_icons_1.sortAscSmallIcon,
|
|
206
212
|
selected: sortedAsc(currentSortIndex, sort)
|
|
207
213
|
},
|
|
208
|
-
|
|
214
|
+
icon: 'sort-asc-small',
|
|
215
|
+
svgIcon: kendo_svg_icons_1.sortAscSmallIcon,
|
|
209
216
|
selected: sortedAsc(currentSortIndex, sort),
|
|
210
217
|
onMenuitemclick: _this.onAscClick,
|
|
211
218
|
on: _this.v3 ? undefined : {
|
|
@@ -215,10 +222,12 @@ var GridColumnMenuSortVue2 = {
|
|
|
215
222
|
title: localizationService.toLanguageString(main_1.sortDescending, main_1.messages[main_1.sortDescending]),
|
|
216
223
|
attrs: _this.v3 ? undefined : {
|
|
217
224
|
title: localizationService.toLanguageString(main_1.sortDescending, main_1.messages[main_1.sortDescending]),
|
|
218
|
-
|
|
225
|
+
icon: 'sort-desc-small',
|
|
226
|
+
svgIcon: kendo_svg_icons_1.sortDescSmallIcon,
|
|
219
227
|
selected: sortedDesc(currentSortIndex, sort)
|
|
220
228
|
},
|
|
221
|
-
|
|
229
|
+
icon: 'sort-desc-small',
|
|
230
|
+
svgIcon: kendo_svg_icons_1.sortDescSmallIcon,
|
|
222
231
|
selected: sortedDesc(currentSortIndex, sort),
|
|
223
232
|
onMenuitemclick: _this.onDescClick,
|
|
224
233
|
on: _this.v3 ? undefined : {
|
|
@@ -48,6 +48,7 @@ var ColumnDraggableVue2 = {
|
|
|
48
48
|
},
|
|
49
49
|
// @ts-ignore
|
|
50
50
|
render: function render(createElement) {
|
|
51
|
+
var _this = this;
|
|
51
52
|
var h = gh || createElement;
|
|
52
53
|
var defaultSlot = (0, kendo_vue_common_1.getDefaultSlots)(this);
|
|
53
54
|
return (
|
|
@@ -63,8 +64,20 @@ var ColumnDraggableVue2 = {
|
|
|
63
64
|
onRelease: this.onRelease,
|
|
64
65
|
ref: 'draggable'
|
|
65
66
|
}, this.v3 ? function () {
|
|
66
|
-
return [h("tr",
|
|
67
|
-
|
|
67
|
+
return [h("tr", {
|
|
68
|
+
"class": 'k-table-row',
|
|
69
|
+
role: 'row',
|
|
70
|
+
attrs: _this.v3 ? undefined : {
|
|
71
|
+
role: 'row'
|
|
72
|
+
}
|
|
73
|
+
}, [defaultSlot])];
|
|
74
|
+
} : [h("tr", {
|
|
75
|
+
"class": 'k-table-row',
|
|
76
|
+
role: 'row',
|
|
77
|
+
attrs: _this.v3 ? undefined : {
|
|
78
|
+
role: 'row'
|
|
79
|
+
}
|
|
80
|
+
}, [defaultSlot])])
|
|
68
81
|
);
|
|
69
82
|
}
|
|
70
83
|
};
|
|
@@ -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;
|
|
@@ -19,7 +19,7 @@ var CommonDragLogic = /** @class */ (function () {
|
|
|
19
19
|
this.currentGroup = -1;
|
|
20
20
|
this.groupPanelDivElement = null;
|
|
21
21
|
this.refGroupPanelDiv = function (e) {
|
|
22
|
-
_this.groupPanelDivElement = e;
|
|
22
|
+
_this.groupPanelDivElement = e.children ? e.children[0] : e;
|
|
23
23
|
};
|
|
24
24
|
this.refDropElementClue = function (e) {
|
|
25
25
|
_this.dropElementClue = e;
|
|
@@ -55,10 +55,12 @@ var CommonDragLogic = /** @class */ (function () {
|
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
57
57
|
_this.currentColumn = _this.getColumnIndex(event, element);
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
var groupPanelChildren = _this.groupPanelDivElement.children;
|
|
59
|
+
_this.currentGroup = _this.isTargetGroupingContainer(event)
|
|
60
|
+
? groupPanelChildren && groupPanelChildren.length
|
|
61
|
+
? groupPanelChildren.length - 1
|
|
62
|
+
: 0
|
|
63
|
+
: _this.getGroupIndex(event);
|
|
62
64
|
var invalidIndex = !_this.isValid();
|
|
63
65
|
if (invalidIndex) {
|
|
64
66
|
_this.currentColumn = -1;
|
|
@@ -66,7 +68,9 @@ var CommonDragLogic = /** @class */ (function () {
|
|
|
66
68
|
}
|
|
67
69
|
var targetElement = (_this.currentColumn >= 0) ?
|
|
68
70
|
element.children[_this.columns[_this.currentColumn].index] :
|
|
69
|
-
_this.
|
|
71
|
+
_this.isTargetGroupingContainer(event)
|
|
72
|
+
? event.originalEvent.target
|
|
73
|
+
: _this.groupPanelDivElement && _this.groupPanelDivElement.children[_this.currentGroup];
|
|
70
74
|
_this.updateDragElementClue(event, element, targetElement, invalidIndex);
|
|
71
75
|
_this.updateDropElementClue(event, element, targetElement, invalidIndex);
|
|
72
76
|
};
|
|
@@ -121,6 +125,10 @@ var CommonDragLogic = /** @class */ (function () {
|
|
|
121
125
|
}
|
|
122
126
|
return -1;
|
|
123
127
|
};
|
|
128
|
+
CommonDragLogic.prototype.isTargetGroupingContainer = function (event) {
|
|
129
|
+
var target = event.originalEvent.target;
|
|
130
|
+
return target.className.indexOf('k-grouping-drop-container') !== -1;
|
|
131
|
+
};
|
|
124
132
|
CommonDragLogic.prototype.getGroupIndex = function (event) {
|
|
125
133
|
return (0, main_1.getIndex)(event, this.groupPanelDivElement);
|
|
126
134
|
};
|
|
@@ -165,15 +173,18 @@ var CommonDragLogic = /** @class */ (function () {
|
|
|
165
173
|
return;
|
|
166
174
|
}
|
|
167
175
|
var rect = targetElement.getBoundingClientRect();
|
|
176
|
+
var groupElement = targetElement.closest('.k-grouping-header');
|
|
177
|
+
var rectParent = (groupElement || targetElement).getBoundingClientRect();
|
|
168
178
|
var left = rect.left + event.pageX - event.clientX - 6;
|
|
169
|
-
if (this.
|
|
179
|
+
if (!this.isTargetGroupingContainer(event) && (this.currentColumn > this.startColumn
|
|
180
|
+
|| this.currentGroup > this.startGroup && this.startGroup !== -1)) {
|
|
170
181
|
left += rect.width;
|
|
171
182
|
}
|
|
172
|
-
var top =
|
|
183
|
+
var top = rectParent.top + event.pageY - event.clientY;
|
|
173
184
|
this.dropElementClue.visible = true;
|
|
174
185
|
this.dropElementClue.top = top;
|
|
175
186
|
this.dropElementClue.left = left;
|
|
176
|
-
this.dropElementClue.height = (this.currentColumn >= 0) ? element.clientHeight :
|
|
187
|
+
this.dropElementClue.height = (this.currentColumn >= 0) ? element.clientHeight : rectParent.height;
|
|
177
188
|
};
|
|
178
189
|
return CommonDragLogic;
|
|
179
190
|
}());
|
|
@@ -11,6 +11,7 @@ var gh = allVue.h;
|
|
|
11
11
|
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
12
12
|
var ref = allVue.ref;
|
|
13
13
|
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
14
|
+
var kendo_svg_icons_1 = require("@progress/kendo-svg-icons");
|
|
14
15
|
/**
|
|
15
16
|
* @hidden
|
|
16
17
|
*/
|
|
@@ -79,16 +80,16 @@ var GroupingIndicatorVue2 = {
|
|
|
79
80
|
ref: 'draggable'
|
|
80
81
|
}, this.v3 ? function () {
|
|
81
82
|
return [h("div", {
|
|
82
|
-
"class": "k-
|
|
83
|
+
"class": "k-chip k-chip-md k-chip-solid k-chip-solid-base k-rounded-md",
|
|
83
84
|
ref: (0, kendo_vue_common_1.setRef)(_this, 'indicatorContainer')
|
|
84
|
-
}, [h("div", {
|
|
85
|
-
"class": "k-chip k-chip-lg k-rounded-md k-chip-solid k-chip-solid-base"
|
|
86
85
|
}, [h(kendo_vue_common_1.Icon, {
|
|
87
86
|
name: 'sort-' + _this.$props.dir + '-small',
|
|
88
87
|
attrs: _this.v3 ? undefined : {
|
|
89
|
-
name: 'sort-' + _this.$props.dir + '-small'
|
|
88
|
+
name: 'sort-' + _this.$props.dir + '-small',
|
|
89
|
+
icon: _this.$props.dir === 'asc' ? kendo_svg_icons_1.sortAscSmallIcon : kendo_svg_icons_1.sortDescSmallIcon
|
|
90
90
|
},
|
|
91
|
-
"class": 'k-chip-icon'
|
|
91
|
+
"class": 'k-chip-icon',
|
|
92
|
+
icon: _this.$props.dir === 'asc' ? kendo_svg_icons_1.sortAscSmallIcon : kendo_svg_icons_1.sortDescSmallIcon
|
|
92
93
|
}), h("span", {
|
|
93
94
|
"class": "k-chip-content",
|
|
94
95
|
tabindex: -1,
|
|
@@ -99,9 +100,7 @@ var GroupingIndicatorVue2 = {
|
|
|
99
100
|
on: _this.v3 ? undefined : {
|
|
100
101
|
"click": _this.sortChange
|
|
101
102
|
}
|
|
102
|
-
}, [h("span", {
|
|
103
|
-
"class": "k-chip-text"
|
|
104
|
-
}, [_this.$props.title])]), h("span", {
|
|
103
|
+
}, [_this.$props.title]), h("span", {
|
|
105
104
|
"class": "k-chip-actions"
|
|
106
105
|
}, [h("span", {
|
|
107
106
|
"class": "k-chip-action k-chip-remove-action",
|
|
@@ -114,22 +113,24 @@ var GroupingIndicatorVue2 = {
|
|
|
114
113
|
"click": _this.groupRemove
|
|
115
114
|
}
|
|
116
115
|
}, [h(kendo_vue_common_1.Icon, {
|
|
117
|
-
name: "x",
|
|
116
|
+
name: "x-circle",
|
|
118
117
|
attrs: _this.v3 ? undefined : {
|
|
119
|
-
name: "x"
|
|
120
|
-
|
|
121
|
-
|
|
118
|
+
name: "x-circle",
|
|
119
|
+
icon: kendo_svg_icons_1.xCircleIcon
|
|
120
|
+
},
|
|
121
|
+
icon: kendo_svg_icons_1.xCircleIcon
|
|
122
|
+
})])])])];
|
|
122
123
|
} : [h("div", {
|
|
123
|
-
"class": "k-
|
|
124
|
+
"class": "k-chip k-chip-md k-chip-solid k-chip-solid-base k-rounded-md",
|
|
124
125
|
ref: (0, kendo_vue_common_1.setRef)(_this, 'indicatorContainer')
|
|
125
|
-
}, [h("div", {
|
|
126
|
-
"class": "k-chip k-chip-lg k-rounded-md k-chip-solid k-chip-solid-base"
|
|
127
126
|
}, [h(kendo_vue_common_1.Icon, {
|
|
128
127
|
name: 'sort-' + _this.$props.dir + '-small',
|
|
129
128
|
attrs: _this.v3 ? undefined : {
|
|
130
|
-
name: 'sort-' + _this.$props.dir + '-small'
|
|
129
|
+
name: 'sort-' + _this.$props.dir + '-small',
|
|
130
|
+
icon: _this.$props.dir === 'asc' ? kendo_svg_icons_1.sortAscSmallIcon : kendo_svg_icons_1.sortDescSmallIcon
|
|
131
131
|
},
|
|
132
|
-
"class": 'k-chip-icon'
|
|
132
|
+
"class": 'k-chip-icon',
|
|
133
|
+
icon: _this.$props.dir === 'asc' ? kendo_svg_icons_1.sortAscSmallIcon : kendo_svg_icons_1.sortDescSmallIcon
|
|
133
134
|
}), h("span", {
|
|
134
135
|
"class": "k-chip-content",
|
|
135
136
|
tabindex: -1,
|
|
@@ -140,9 +141,7 @@ var GroupingIndicatorVue2 = {
|
|
|
140
141
|
on: _this.v3 ? undefined : {
|
|
141
142
|
"click": _this.sortChange
|
|
142
143
|
}
|
|
143
|
-
}, [h("span", {
|
|
144
|
-
"class": "k-chip-text"
|
|
145
|
-
}, [_this.$props.title])]), h("span", {
|
|
144
|
+
}, [_this.$props.title]), h("span", {
|
|
146
145
|
"class": "k-chip-actions"
|
|
147
146
|
}, [h("span", {
|
|
148
147
|
"class": "k-chip-action k-chip-remove-action",
|
|
@@ -155,11 +154,13 @@ var GroupingIndicatorVue2 = {
|
|
|
155
154
|
"click": _this.groupRemove
|
|
156
155
|
}
|
|
157
156
|
}, [h(kendo_vue_common_1.Icon, {
|
|
158
|
-
name: "x",
|
|
157
|
+
name: "x-circle",
|
|
159
158
|
attrs: _this.v3 ? undefined : {
|
|
160
|
-
name: "x"
|
|
161
|
-
|
|
162
|
-
|
|
159
|
+
name: "x-circle",
|
|
160
|
+
icon: kendo_svg_icons_1.xCircleIcon
|
|
161
|
+
},
|
|
162
|
+
icon: kendo_svg_icons_1.xCircleIcon
|
|
163
|
+
})])])])])
|
|
163
164
|
);
|
|
164
165
|
}
|
|
165
166
|
};
|
package/dist/npm/filterCommon.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.cellOperatorChange = exports.cellBoolDropdownChange = exports.getFilterType = exports.getDefaultOperator = exports.cellInputChange = exports.defaultHideSecondFilter = exports.booleanFilterValues = exports.defaultBooleanOperator = exports.operatorMap = exports.IsUnaryFilter = exports.operators = exports.filterLogicList = void 0;
|
|
3
|
+
exports.getAriaLabel = exports.cellOperatorChange = exports.cellBoolDropdownChange = exports.getFilterType = exports.getDefaultOperator = exports.cellInputChange = exports.defaultHideSecondFilter = exports.booleanFilterValues = exports.defaultBooleanOperator = exports.operatorMap = exports.IsUnaryFilter = exports.operators = exports.filterLogicList = void 0;
|
|
4
4
|
var main_1 = require("./messages/main");
|
|
5
5
|
/**
|
|
6
6
|
* @hidden
|
|
@@ -164,3 +164,20 @@ var cellOperatorChange = function (operator, e, value) {
|
|
|
164
164
|
return { value: value, operator: operator, event: e };
|
|
165
165
|
};
|
|
166
166
|
exports.cellOperatorChange = cellOperatorChange;
|
|
167
|
+
/**
|
|
168
|
+
* @hidden
|
|
169
|
+
*/
|
|
170
|
+
var getAriaLabel = function (filterType, service) {
|
|
171
|
+
switch (filterType) {
|
|
172
|
+
case 'text':
|
|
173
|
+
return service.toLanguageString(main_1.textFilterAriaLabel, main_1.messages[main_1.textFilterAriaLabel]);
|
|
174
|
+
case 'numeric':
|
|
175
|
+
return service.toLanguageString(main_1.numericFilterAriaLabel, main_1.messages[main_1.numericFilterAriaLabel]);
|
|
176
|
+
case 'boolean':
|
|
177
|
+
return service.toLanguageString(main_1.booleanFilterAriaLabel, main_1.messages[main_1.booleanFilterAriaLabel]);
|
|
178
|
+
case 'date':
|
|
179
|
+
return service.toLanguageString(main_1.dateFilterAriaLabel, main_1.messages[main_1.dateFilterAriaLabel]);
|
|
180
|
+
default: return;
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
exports.getAriaLabel = getAriaLabel;
|
|
@@ -91,7 +91,11 @@ var FooterVue2 = {
|
|
|
91
91
|
var h = gh || createElement;
|
|
92
92
|
if (!this.$props.staticHeaders) {
|
|
93
93
|
return h("tfoot", {
|
|
94
|
-
"class": "k-grid-footer"
|
|
94
|
+
"class": "k-table-tfoot k-grid-footer",
|
|
95
|
+
role: "rowgroup",
|
|
96
|
+
attrs: this.v3 ? undefined : {
|
|
97
|
+
role: "rowgroup"
|
|
98
|
+
}
|
|
95
99
|
}, [this.$props.row]);
|
|
96
100
|
}
|
|
97
101
|
return h("div", {
|
|
@@ -105,7 +109,13 @@ var FooterVue2 = {
|
|
|
105
109
|
style: this.tableStyle
|
|
106
110
|
}, [h("colgroup", {
|
|
107
111
|
ref: (0, kendo_vue_common_1.setRef)(this, 'colGroupHeader')
|
|
108
|
-
}, [this.$props.cols]), h("tfoot",
|
|
112
|
+
}, [this.$props.cols]), h("tfoot", {
|
|
113
|
+
"class": 'k-table-tfoot',
|
|
114
|
+
role: "rowgroup",
|
|
115
|
+
attrs: this.v3 ? undefined : {
|
|
116
|
+
role: "rowgroup"
|
|
117
|
+
}
|
|
118
|
+
}, [this.$props.row])])])]);
|
|
109
119
|
}
|
|
110
120
|
};
|
|
111
121
|
exports.FooterVue2 = FooterVue2;
|
|
@@ -18,7 +18,8 @@ var FooterRowVue2 = {
|
|
|
18
18
|
name: 'FooterRow',
|
|
19
19
|
props: {
|
|
20
20
|
isRtl: Boolean,
|
|
21
|
-
columns: Array
|
|
21
|
+
columns: Array,
|
|
22
|
+
rowIndex: Number
|
|
22
23
|
},
|
|
23
24
|
methods: {
|
|
24
25
|
columnStyles: function columnStyles(column) {
|
|
@@ -44,7 +45,7 @@ var FooterRowVue2 = {
|
|
|
44
45
|
var renderCell = function renderCell(column, index) {
|
|
45
46
|
var footerCellRendering = null;
|
|
46
47
|
var stickyClassName = column.locked && column.left !== undefined ? 'k-grid-footer-sticky' : '';
|
|
47
|
-
var tdClassName = column.footerClassName ? "".concat(column.footerClassName, " ").concat(stickyClassName) : stickyClassName;
|
|
48
|
+
var tdClassName = column.footerClassName ? "k-table-td ".concat(column.footerClassName, " ").concat(stickyClassName) : 'k-table-td' + stickyClassName;
|
|
48
49
|
footerCellRendering = kendo_vue_common_1.getTemplate.call(this, {
|
|
49
50
|
h: h,
|
|
50
51
|
template: column.footerCell,
|
|
@@ -59,17 +60,22 @@ var FooterRowVue2 = {
|
|
|
59
60
|
key: index,
|
|
60
61
|
colspan: column.colSpan !== 1 ? column.colSpan : undefined,
|
|
61
62
|
attrs: this.v3 ? undefined : {
|
|
62
|
-
colspan: column.colSpan !== 1 ? column.colSpan : undefined
|
|
63
|
+
colspan: column.colSpan !== 1 ? column.colSpan : undefined,
|
|
64
|
+
role: 'gridcell'
|
|
63
65
|
},
|
|
64
66
|
style: this.columnStyles(column),
|
|
65
|
-
"class": tdClassName
|
|
67
|
+
"class": tdClassName,
|
|
68
|
+
role: 'gridcell'
|
|
66
69
|
}, [footerCellRendering]);
|
|
67
70
|
};
|
|
68
71
|
return h("tr", {
|
|
72
|
+
"class": 'k-table-row',
|
|
69
73
|
role: 'row',
|
|
70
74
|
attrs: this.v3 ? undefined : {
|
|
71
|
-
role: 'row'
|
|
72
|
-
|
|
75
|
+
role: 'row',
|
|
76
|
+
"aria-rowIndex": this.$props.rowIndex
|
|
77
|
+
},
|
|
78
|
+
"aria-rowIndex": this.$props.rowIndex
|
|
73
79
|
}, [(0, main_1.footerColumns)(this.$props.columns).map(renderCell, this)]);
|
|
74
80
|
}
|
|
75
81
|
};
|
|
@@ -15,7 +15,6 @@ var GridFilterCell_1 = require("../cells/GridFilterCell");
|
|
|
15
15
|
var kendo_vue_intl_1 = require("@progress/kendo-vue-intl");
|
|
16
16
|
var main_1 = require("../messages/main");
|
|
17
17
|
var kendo_vue_data_tools_1 = require("@progress/kendo-vue-data-tools");
|
|
18
|
-
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
19
18
|
/**
|
|
20
19
|
* @hidden
|
|
21
20
|
*/
|
|
@@ -29,7 +28,8 @@ var FilterRowVue2 = {
|
|
|
29
28
|
sort: [Object, Array],
|
|
30
29
|
cellRender: [String, Function, Object],
|
|
31
30
|
isRtl: Boolean,
|
|
32
|
-
ariaRowIndex: Number
|
|
31
|
+
ariaRowIndex: Number,
|
|
32
|
+
size: String
|
|
33
33
|
},
|
|
34
34
|
inject: {
|
|
35
35
|
kendoLocalizationService: {
|
|
@@ -38,7 +38,7 @@ var FilterRowVue2 = {
|
|
|
38
38
|
},
|
|
39
39
|
methods: {
|
|
40
40
|
headerCellClassName: function headerCellClassName(field, locked) {
|
|
41
|
-
var result = ""
|
|
41
|
+
var result = "k-table-th k-header" + (locked ? ' k-grid-header-sticky' : '');
|
|
42
42
|
if (this.$props.sort && this.$props.sort.filter(function (descriptor) {
|
|
43
43
|
return descriptor.field === field;
|
|
44
44
|
}).length > 0) {
|
|
@@ -100,7 +100,6 @@ var FilterRowVue2 = {
|
|
|
100
100
|
})[0];
|
|
101
101
|
return found ? found.operator : null;
|
|
102
102
|
};
|
|
103
|
-
var filterCellProps;
|
|
104
103
|
var serviceIndex = 0,
|
|
105
104
|
index = -1;
|
|
106
105
|
var filterCells = this.$props.columns.filter(function (c) {
|
|
@@ -111,6 +110,7 @@ var FilterRowVue2 = {
|
|
|
111
110
|
_this.setFilter(e.value, e.operator, column.field, e);
|
|
112
111
|
};
|
|
113
112
|
var filterType = (0, filterCommon_1.getFilterType)(column.filter);
|
|
113
|
+
var ariaLabelFilter = column.field + ' ' + (0, filterCommon_1.getAriaLabel)(filterType, intl);
|
|
114
114
|
// @ts-ignore
|
|
115
115
|
var filterRender = h(GridFilterCell_1.GridFilterCell, {
|
|
116
116
|
grid: this.$props.grid,
|
|
@@ -123,7 +123,9 @@ var FilterRowVue2 = {
|
|
|
123
123
|
operators: (0, filterCommon_1.operatorMap)(this.$props.filterOperators[filterType] || [], intl),
|
|
124
124
|
booleanValues: (0, filterCommon_1.operatorMap)(filterCommon_1.booleanFilterValues, intl),
|
|
125
125
|
filterType: filterType,
|
|
126
|
-
render: column.filterCell || this.$props.cellRender
|
|
126
|
+
render: column.filterCell || this.$props.cellRender,
|
|
127
|
+
ariaLabel: ariaLabelFilter,
|
|
128
|
+
size: this.$props.size
|
|
127
129
|
},
|
|
128
130
|
field: column.field,
|
|
129
131
|
title: column.filterTitle,
|
|
@@ -136,7 +138,9 @@ var FilterRowVue2 = {
|
|
|
136
138
|
on: this.v3 ? undefined : {
|
|
137
139
|
"change": onChangeFn
|
|
138
140
|
},
|
|
139
|
-
render: column.filterCell || this.$props.cellRender
|
|
141
|
+
render: column.filterCell || this.$props.cellRender,
|
|
142
|
+
ariaLabel: ariaLabelFilter,
|
|
143
|
+
size: this.$props.size
|
|
140
144
|
});
|
|
141
145
|
var key = column.declarationIndex >= 0 ? ++index : --serviceIndex;
|
|
142
146
|
var ariaAttrs = {
|
|
@@ -152,43 +156,47 @@ var FilterRowVue2 = {
|
|
|
152
156
|
} : {};
|
|
153
157
|
var filterCell =
|
|
154
158
|
// @ts-ignore function children
|
|
155
|
-
h(kendo_vue_data_tools_1.
|
|
159
|
+
h(kendo_vue_data_tools_1.HeaderTdElement, {
|
|
156
160
|
key: key,
|
|
157
|
-
|
|
161
|
+
role: 'gridcell',
|
|
158
162
|
attrs: this.v3 ? undefined : {
|
|
163
|
+
role: 'gridcell',
|
|
159
164
|
columnId: kendo_vue_data_tools_1.tableKeyboardNavigationTools.getFilterColumnId(column.id),
|
|
160
165
|
navigatable: column.navigatable,
|
|
161
|
-
|
|
162
|
-
|
|
166
|
+
ariaColumnIndex: ariaAttrs.ariaColumnIndex,
|
|
167
|
+
ariaLabel: ariaLabelFilter
|
|
163
168
|
},
|
|
169
|
+
columnId: kendo_vue_data_tools_1.tableKeyboardNavigationTools.getFilterColumnId(column.id),
|
|
164
170
|
navigatable: column.navigatable,
|
|
165
171
|
style: style,
|
|
166
|
-
"class":
|
|
167
|
-
|
|
168
|
-
|
|
172
|
+
"class": this.headerCellClassName(column.field, column.locked) || undefined,
|
|
173
|
+
ariaColumnIndex: ariaAttrs.ariaColumnIndex,
|
|
174
|
+
ariaLabel: ariaLabelFilter
|
|
169
175
|
}, this.v3 ? function () {
|
|
170
176
|
return [filterRender];
|
|
171
177
|
} : [filterRender]);
|
|
172
178
|
return column.filterable && filterCell ||
|
|
173
179
|
// @ts-ignore function children
|
|
174
|
-
h(kendo_vue_data_tools_1.
|
|
180
|
+
h(kendo_vue_data_tools_1.HeaderTdElement, {
|
|
175
181
|
key: key,
|
|
176
|
-
|
|
182
|
+
role: 'gridcell',
|
|
177
183
|
attrs: this.v3 ? undefined : {
|
|
184
|
+
role: 'gridcell',
|
|
178
185
|
columnId: kendo_vue_data_tools_1.tableKeyboardNavigationTools.getFilterColumnId(column.id),
|
|
179
186
|
navigatable: column.navigatable,
|
|
180
|
-
|
|
181
|
-
|
|
187
|
+
ariaColumnIndex: ariaAttrs.ariaColumnIndex,
|
|
188
|
+
ariaLabel: ariaLabelFilter
|
|
182
189
|
},
|
|
190
|
+
columnId: kendo_vue_data_tools_1.tableKeyboardNavigationTools.getFilterColumnId(column.id),
|
|
183
191
|
navigatable: column.navigatable,
|
|
184
192
|
style: style,
|
|
185
|
-
"class":
|
|
186
|
-
|
|
187
|
-
|
|
193
|
+
"class": this.headerCellClassName(column.field, column.locked) || undefined,
|
|
194
|
+
ariaColumnIndex: ariaAttrs.ariaColumnIndex,
|
|
195
|
+
ariaLabel: ariaLabelFilter
|
|
188
196
|
});
|
|
189
197
|
}, this);
|
|
190
198
|
return h("tr", {
|
|
191
|
-
"class": "k-filter-row",
|
|
199
|
+
"class": "k-table-row k-filter-row",
|
|
192
200
|
"aria-rowindex": this.ariaRowIndex,
|
|
193
201
|
attrs: this.v3 ? undefined : {
|
|
194
202
|
"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;
|
|
@@ -19,7 +19,8 @@ var kendo_vue_intl_1 = require("@progress/kendo-vue-intl");
|
|
|
19
19
|
var GroupPanelVue2 = {
|
|
20
20
|
props: {
|
|
21
21
|
group: Array,
|
|
22
|
-
resolveTitle: Function
|
|
22
|
+
resolveTitle: Function,
|
|
23
|
+
ariaControls: String
|
|
23
24
|
},
|
|
24
25
|
inject: {
|
|
25
26
|
kendoLocalizationService: {
|
|
@@ -63,6 +64,7 @@ var GroupPanelVue2 = {
|
|
|
63
64
|
render: function render(createElement) {
|
|
64
65
|
var h = gh || createElement;
|
|
65
66
|
var groupsProp = this.$props.group || [];
|
|
67
|
+
var ariaControls = this.$props.ariaControls;
|
|
66
68
|
var groups = groupsProp.map(function (groupDesc, index) {
|
|
67
69
|
var _this = this;
|
|
68
70
|
return (
|
|
@@ -98,10 +100,21 @@ var GroupPanelVue2 = {
|
|
|
98
100
|
})
|
|
99
101
|
);
|
|
100
102
|
}, this);
|
|
103
|
+
var groupHeaderAriaLabelValue = (0, kendo_vue_intl_1.provideLocalizationService)(this).toLanguageString(main_1.groupHeaderAriaLabel, main_1.messages[main_1.groupHeaderAriaLabel]);
|
|
101
104
|
return h("div", {
|
|
102
|
-
"class": "k-grouping-header
|
|
103
|
-
|
|
104
|
-
|
|
105
|
+
"class": "k-grouping-header",
|
|
106
|
+
role: 'toolbar',
|
|
107
|
+
attrs: this.v3 ? undefined : {
|
|
108
|
+
role: 'toolbar',
|
|
109
|
+
"aria-label": groupHeaderAriaLabelValue,
|
|
110
|
+
"aria-controls": ariaControls
|
|
111
|
+
},
|
|
112
|
+
"aria-label": groupHeaderAriaLabelValue,
|
|
113
|
+
"aria-controls": ariaControls
|
|
114
|
+
}, [!!groups.length && h("div", {
|
|
115
|
+
"class": "k-chip-list k-chip-list-md"
|
|
116
|
+
}, [groups]), h("div", {
|
|
117
|
+
"class": "k-grouping-drop-container"
|
|
105
118
|
}, [!groups.length && (0, kendo_vue_intl_1.provideLocalizationService)(this).toLanguageString(main_1.groupPanelEmpty, main_1.messages[main_1.groupPanelEmpty])])]);
|
|
106
119
|
}
|
|
107
120
|
};
|