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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/cdn/js/kendo-vue-grid.js +1 -1
  2. package/dist/es/Grid.js +28 -4
  3. package/dist/es/cells/GridGroupCell.js +10 -3
  4. package/dist/es/cells/GridHierarchyCell.js +10 -4
  5. package/dist/es/columnMenu/ColumnMenu.js +3 -5
  6. package/dist/es/columnMenu/GridColumnMenuCheckboxFilter.js +9 -5
  7. package/dist/es/columnMenu/GridColumnMenuFilter.js +9 -4
  8. package/dist/es/columnMenu/GridColumnMenuItem.d.ts +9 -0
  9. package/dist/es/columnMenu/GridColumnMenuItem.js +13 -2
  10. package/dist/es/columnMenu/GridColumnMenuSort.js +17 -8
  11. package/dist/es/drag/CommonDragLogic.d.ts +1 -0
  12. package/dist/es/drag/CommonDragLogic.js +20 -9
  13. package/dist/es/header/FilterRow.js +11 -3
  14. package/dist/es/package-metadata.js +1 -1
  15. package/dist/esm/Grid.js +28 -4
  16. package/dist/esm/cells/GridGroupCell.js +10 -3
  17. package/dist/esm/cells/GridHierarchyCell.js +10 -4
  18. package/dist/esm/columnMenu/ColumnMenu.js +3 -5
  19. package/dist/esm/columnMenu/GridColumnMenuCheckboxFilter.js +9 -5
  20. package/dist/esm/columnMenu/GridColumnMenuFilter.js +9 -4
  21. package/dist/esm/columnMenu/GridColumnMenuItem.d.ts +9 -0
  22. package/dist/esm/columnMenu/GridColumnMenuItem.js +13 -2
  23. package/dist/esm/columnMenu/GridColumnMenuSort.js +17 -8
  24. package/dist/esm/drag/CommonDragLogic.d.ts +1 -0
  25. package/dist/esm/drag/CommonDragLogic.js +20 -9
  26. package/dist/esm/header/FilterRow.js +11 -3
  27. package/dist/esm/package-metadata.js +1 -1
  28. package/dist/npm/Grid.js +28 -4
  29. package/dist/npm/cells/GridGroupCell.js +9 -2
  30. package/dist/npm/cells/GridHierarchyCell.js +9 -3
  31. package/dist/npm/columnMenu/ColumnMenu.js +3 -5
  32. package/dist/npm/columnMenu/GridColumnMenuCheckboxFilter.js +8 -4
  33. package/dist/npm/columnMenu/GridColumnMenuFilter.js +9 -4
  34. package/dist/npm/columnMenu/GridColumnMenuItem.d.ts +9 -0
  35. package/dist/npm/columnMenu/GridColumnMenuItem.js +13 -2
  36. package/dist/npm/columnMenu/GridColumnMenuSort.js +17 -8
  37. package/dist/npm/drag/CommonDragLogic.d.ts +1 -0
  38. package/dist/npm/drag/CommonDragLogic.js +20 -9
  39. package/dist/npm/header/FilterRow.js +11 -3
  40. package/dist/npm/package-metadata.js +1 -1
  41. package/package.json +14 -14
@@ -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": "iconClass"
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
- iconClass: 'k-i-sort-asc-small',
177
+ icon: 'sort-asc-small',
178
+ svgIcon: kendo_svg_icons_1.sortAscSmallIcon,
177
179
  selected: sortedAsc(currentSortIndex, sort)
178
180
  },
179
- iconClass: 'k-i-sort-asc-small',
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
- iconClass: 'k-i-sort-desc-small',
194
+ icon: 'sort-desc-small',
195
+ svgIcon: kendo_svg_icons_1.sortDescSmallIcon,
192
196
  selected: sortedDesc(currentSortIndex, sort)
193
197
  },
194
- iconClass: 'k-i-sort-desc-small',
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
- iconClass: 'k-i-sort-asc-small',
210
+ icon: 'sort-asc-small',
211
+ svgIcon: kendo_svg_icons_1.sortAscSmallIcon,
206
212
  selected: sortedAsc(currentSortIndex, sort)
207
213
  },
208
- iconClass: 'k-i-sort-asc-small',
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
- iconClass: 'k-i-sort-desc-small',
225
+ icon: 'sort-desc-small',
226
+ svgIcon: kendo_svg_icons_1.sortDescSmallIcon,
219
227
  selected: sortedDesc(currentSortIndex, sort)
220
228
  },
221
- iconClass: 'k-i-sort-desc-small',
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 : {
@@ -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
- _this.currentGroup = _this.getGroupIndex(event);
59
- if (_this.groupPanelDivElement && _this.startGroup >= 0) {
60
- _this.currentGroup = Math.min(_this.currentGroup, _this.groupPanelDivElement.children.length - 2);
61
- }
58
+ var groupPanelChildren = _this.groupPanelDivElement && _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.groupPanelDivElement && _this.groupPanelDivElement.children[_this.currentGroup];
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.currentColumn > this.startColumn || this.currentGroup > this.startGroup && this.startGroup !== -1) {
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 = rect.top + event.pageY - event.clientY;
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 : rect.height;
187
+ this.dropElementClue.height = (this.currentColumn >= 0) ? element.clientHeight : rectParent.height;
177
188
  };
178
189
  return CommonDragLogic;
179
190
  }());
@@ -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
  */
@@ -38,6 +37,15 @@ var FilterRowVue2 = {
38
37
  }
39
38
  },
40
39
  methods: {
40
+ headerCellClassName: function headerCellClassName(field, locked) {
41
+ var result = "k-table-th k-header" + (locked ? ' k-grid-header-sticky' : '');
42
+ if (this.$props.sort && this.$props.sort.filter(function (descriptor) {
43
+ return descriptor.field === field;
44
+ }).length > 0) {
45
+ result += ' k-sorted';
46
+ }
47
+ return result;
48
+ },
41
49
  setFilter: function setFilter(value, operator, field, e) {
42
50
  var filters = [];
43
51
  if (value !== '' && value !== null || operator !== '') {
@@ -161,7 +169,7 @@ var FilterRowVue2 = {
161
169
  columnId: kendo_vue_data_tools_1.tableKeyboardNavigationTools.getFilterColumnId(column.id),
162
170
  navigatable: column.navigatable,
163
171
  style: style,
164
- "class": (0, kendo_vue_common_1.classNames)('k-table-th', this.headerCellClassName(column.field, column.locked) || undefined),
172
+ "class": this.headerCellClassName(column.field, column.locked) || undefined,
165
173
  ariaColumnIndex: ariaAttrs.ariaColumnIndex,
166
174
  ariaLabel: ariaLabelFilter
167
175
  }, this.v3 ? function () {
@@ -182,7 +190,7 @@ var FilterRowVue2 = {
182
190
  columnId: kendo_vue_data_tools_1.tableKeyboardNavigationTools.getFilterColumnId(column.id),
183
191
  navigatable: column.navigatable,
184
192
  style: style,
185
- "class": (0, kendo_vue_common_1.classNames)('k-table-th', this.headerCellClassName(column.field, column.locked) || undefined),
193
+ "class": this.headerCellClassName(column.field, column.locked) || undefined,
186
194
  ariaColumnIndex: ariaAttrs.ariaColumnIndex,
187
195
  ariaLabel: ariaLabelFilter
188
196
  });
@@ -8,7 +8,7 @@ exports.packageMetadata = {
8
8
  name: '@progress/kendo-vue-grid',
9
9
  productName: 'Kendo UI for Vue',
10
10
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
11
- publishDate: 1673273952,
11
+ publishDate: 1673607254,
12
12
  version: '',
13
13
  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'
14
14
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-vue-grid",
3
- "version": "3.7.4-dev.202301091431",
3
+ "version": "3.7.4-dev.202301131104",
4
4
  "description": "Kendo UI for Vue Grid package",
5
5
  "repository": {
6
6
  "type": "git",
@@ -42,25 +42,25 @@
42
42
  "vue": "^2.6.12 || ^3.0.2"
43
43
  },
44
44
  "dependencies": {
45
- "@progress/kendo-vue-common": "3.7.4-dev.202301091431"
45
+ "@progress/kendo-vue-common": "3.7.4-dev.202301131104"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@progress/kendo-data-query": "^1.5.4",
49
49
  "@progress/kendo-drawing": "^1.9.3",
50
50
  "@progress/kendo-licensing": "^1.3.0",
51
51
  "@progress/kendo-svg-icons": "^1.0.0",
52
- "@progress/kendo-vue-animation": "3.7.4-dev.202301091431",
53
- "@progress/kendo-vue-buttons": "3.7.4-dev.202301091431",
54
- "@progress/kendo-vue-charts": "3.7.4-dev.202301091431",
55
- "@progress/kendo-vue-data-tools": "3.7.4-dev.202301091431",
56
- "@progress/kendo-vue-dateinputs": "3.7.4-dev.202301091431",
57
- "@progress/kendo-vue-dropdowns": "3.7.4-dev.202301091431",
58
- "@progress/kendo-vue-excel-export": "3.7.4-dev.202301091431",
59
- "@progress/kendo-vue-indicators": "3.7.4-dev.202301091431",
60
- "@progress/kendo-vue-inputs": "3.7.4-dev.202301091431",
61
- "@progress/kendo-vue-intl": "3.7.4-dev.202301091431",
62
- "@progress/kendo-vue-pdf": "3.7.4-dev.202301091431",
63
- "@progress/kendo-vue-popup": "3.7.4-dev.202301091431",
52
+ "@progress/kendo-vue-animation": "3.7.4-dev.202301131104",
53
+ "@progress/kendo-vue-buttons": "3.7.4-dev.202301131104",
54
+ "@progress/kendo-vue-charts": "3.7.4-dev.202301131104",
55
+ "@progress/kendo-vue-data-tools": "3.7.4-dev.202301131104",
56
+ "@progress/kendo-vue-dateinputs": "3.7.4-dev.202301131104",
57
+ "@progress/kendo-vue-dropdowns": "3.7.4-dev.202301131104",
58
+ "@progress/kendo-vue-excel-export": "3.7.4-dev.202301131104",
59
+ "@progress/kendo-vue-indicators": "3.7.4-dev.202301131104",
60
+ "@progress/kendo-vue-inputs": "3.7.4-dev.202301131104",
61
+ "@progress/kendo-vue-intl": "3.7.4-dev.202301131104",
62
+ "@progress/kendo-vue-pdf": "3.7.4-dev.202301131104",
63
+ "@progress/kendo-vue-popup": "3.7.4-dev.202301131104",
64
64
  "cldr-core": "^41.0.0",
65
65
  "cldr-dates-full": "^41.0.0",
66
66
  "cldr-numbers-full": "^41.0.0",