@progress/kendo-vue-grid 8.0.3-develop.4 → 8.1.0-develop.1

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 (60) hide show
  1. package/Grid.d.ts +18 -2
  2. package/Grid.js +1 -1
  3. package/Grid.mjs +655 -511
  4. package/GridNav.d.ts +12 -2
  5. package/GridNav.js +1 -1
  6. package/GridNav.mjs +52 -24
  7. package/GridState.d.ts +12 -5
  8. package/GridState.js +1 -1
  9. package/GridState.mjs +84 -77
  10. package/RootGrid.d.ts +6 -0
  11. package/RootGrid.js +1 -1
  12. package/RootGrid.mjs +25 -25
  13. package/StatusBar.d.ts +55 -5
  14. package/StatusBar.js +8 -0
  15. package/StatusBar.mjs +81 -0
  16. package/cells/GridCell.d.ts +3 -0
  17. package/cells/GridCell.js +1 -1
  18. package/cells/GridCell.mjs +32 -29
  19. package/cells/GridEditCell.d.ts +2 -0
  20. package/cells/GridEditCell.js +1 -1
  21. package/cells/GridEditCell.mjs +1 -0
  22. package/cells/GridSelectionCell.js +1 -1
  23. package/cells/GridSelectionCell.mjs +16 -16
  24. package/common.d.ts +3 -0
  25. package/common.js +1 -1
  26. package/common.mjs +3 -0
  27. package/components/table/GridTable.d.ts +18 -0
  28. package/components/table/GridTable.js +8 -0
  29. package/components/table/GridTable.mjs +41 -0
  30. package/components/table/GridTableScrollable.d.ts +20 -0
  31. package/components/table/GridTableScrollable.js +8 -0
  32. package/components/table/GridTableScrollable.mjs +45 -0
  33. package/dist/cdn/js/kendo-vue-grid.js +1 -1
  34. package/drag/ColumnDraggable.js +1 -1
  35. package/drag/ColumnDraggable.mjs +5 -4
  36. package/header/FilterRow.d.ts +3 -0
  37. package/header/FilterRow.js +1 -1
  38. package/header/FilterRow.mjs +46 -44
  39. package/header/Header.d.ts +5 -2
  40. package/header/Header.js +1 -1
  41. package/header/Header.mjs +10 -5
  42. package/header/HeaderRow.d.ts +3 -0
  43. package/header/HeaderRow.js +1 -1
  44. package/header/HeaderRow.mjs +148 -139
  45. package/index.d.mts +1 -0
  46. package/index.d.ts +1 -0
  47. package/index.js +1 -1
  48. package/index.mjs +20 -16
  49. package/interfaces/GridCellProps.d.ts +11 -0
  50. package/interfaces/GridColumnProps.d.ts +10 -6
  51. package/interfaces/GridProps.d.ts +31 -3
  52. package/interfaces/events.d.ts +26 -3
  53. package/package-metadata.js +1 -1
  54. package/package-metadata.mjs +2 -2
  55. package/package.json +12 -12
  56. package/utils/main.js +1 -1
  57. package/utils/main.mjs +68 -67
  58. package/utils/virtualColumns.d.ts +17 -0
  59. package/utils/virtualColumns.js +1 -1
  60. package/utils/virtualColumns.mjs +132 -39
@@ -5,26 +5,26 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as _, createVNode as r, isVNode as P } from "vue";
9
- import { normalize as q } from "../interfaces/GridSortSettings.mjs";
10
- import { ColumnResizer as E } from "../drag/ColumnResizer.mjs";
11
- import { ColumnDraggable as G } from "../drag/ColumnDraggable.mjs";
12
- import { GridHeaderCell as U } from "./GridHeaderCell.mjs";
13
- import { ColumnMenu as J } from "../columnMenu/ColumnMenu.mjs";
14
- import { noop as Q, templateRendering as W, getListeners as X, Keys as M, hasListener as Y, Icon as Z } from "@progress/kendo-vue-common";
15
- import { HeaderThElement as ee } from "@progress/kendo-vue-data-tools";
16
- import { sortableColumnAriaLabel as O, messages as k, sortableColumnAscendingAriaLabel as I, sortableColumnDescendingAriaLabel as z } from "../messages/main.mjs";
8
+ import { defineComponent as q, createVNode as n, isVNode as E } from "vue";
9
+ import { normalize as G } from "../interfaces/GridSortSettings.mjs";
10
+ import { ColumnResizer as U } from "../drag/ColumnResizer.mjs";
11
+ import { ColumnDraggable as W } from "../drag/ColumnDraggable.mjs";
12
+ import { GridHeaderCell as J } from "./GridHeaderCell.mjs";
13
+ import { ColumnMenu as Q } from "../columnMenu/ColumnMenu.mjs";
14
+ import { noop as X, templateRendering as Y, getListeners as Z, Keys as O, hasListener as ee, Icon as te } from "@progress/kendo-vue-common";
15
+ import { HeaderThElement as le } from "@progress/kendo-vue-data-tools";
16
+ import { sortableColumnAriaLabel as I, messages as S, sortableColumnAscendingAriaLabel as z, sortableColumnDescendingAriaLabel as L } from "../messages/main.mjs";
17
17
  import { provideLocalizationService as ne } from "@progress/kendo-vue-intl";
18
- import { sortAscSmallIcon as te, sortDescSmallIcon as le } from "@progress/kendo-svg-icons";
19
- import { getVirtualHeaderCellsToRender as re } from "../utils/virtualColumns.mjs";
20
- function H(n) {
21
- return typeof n == "function" || Object.prototype.toString.call(n) === "[object Object]" && !P(n);
18
+ import { sortAscSmallIcon as re, sortDescSmallIcon as oe } from "@progress/kendo-svg-icons";
19
+ import { getVirtualHeaderCellsToRender as se } from "../utils/virtualColumns.mjs";
20
+ function H(t) {
21
+ return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !E(t);
22
22
  }
23
- const S = {
23
+ const y = {
24
24
  none: "none",
25
25
  asc: "ascending",
26
26
  desc: "descending"
27
- }, oe = {
27
+ }, ie = {
28
28
  true: {
29
29
  asc: "desc",
30
30
  desc: "",
@@ -35,7 +35,7 @@ const S = {
35
35
  desc: "asc",
36
36
  "": "asc"
37
37
  }
38
- }, $e = /* @__PURE__ */ _({
38
+ }, Se = /* @__PURE__ */ q({
39
39
  name: "KendoHeaderRow",
40
40
  props: {
41
41
  grid: Object,
@@ -66,6 +66,7 @@ const S = {
66
66
  columnMenuIcon: Object,
67
67
  isRtl: Boolean,
68
68
  isColCountDefined: Boolean,
69
+ headerSelectionValue: [Boolean, Array],
69
70
  // columnsInitial prop:
70
71
  // Needed for hidden column scenarios. By this value we can define correct aria-colindex attribute
71
72
  columnsInitial: Array,
@@ -78,7 +79,7 @@ const S = {
78
79
  },
79
80
  inject: {
80
81
  onNavFocus: {
81
- default: Q
82
+ default: X
82
83
  },
83
84
  kendoLocalizationService: {
84
85
  default: null
@@ -93,51 +94,51 @@ const S = {
93
94
  this.serviceIndex = 0, this.index = -1, this._element = null, this.cellClick = this.cellClick.bind(this);
94
95
  },
95
96
  methods: {
96
- pressHandler(n, t) {
97
- this.$emit("pressHandler", n, t);
97
+ pressHandler(t, l) {
98
+ this.$emit("pressHandler", t, l);
98
99
  },
99
- dragHandler(n, t) {
100
- this.$emit("dragHandler", n, t);
100
+ dragHandler(t, l) {
101
+ this.$emit("dragHandler", t, l);
101
102
  },
102
- releaseHandler(n) {
103
- this.$emit("releaseHandler", n);
103
+ releaseHandler(t) {
104
+ this.$emit("releaseHandler", t);
104
105
  },
105
- selectionChangeHandler(n) {
106
- this.$emit("selectionchange", n);
106
+ selectionChangeHandler(t) {
107
+ this.$emit("selectionchange", t);
107
108
  },
108
- cellClick(n, t) {
109
- if (n.preventDefault(), !Y.call(this, "sortChange"))
109
+ cellClick(t, l) {
110
+ if (t.preventDefault(), !ee.call(this, "sortChange"))
110
111
  return;
111
112
  const {
112
- allowUnsort: u,
113
- mode: h
114
- } = q(this.$props.sortable || !1, t.sortable || !1), s = (this.$props.sort || []).filter((o) => o.field === t.field)[0], c = oe[u][s && s.dir || ""], f = h === "single" ? [] : (this.$props.sort || []).filter((o) => o.field !== t.field);
115
- c !== "" && t.field && f.push({
116
- field: t.field,
117
- dir: c
118
- }), this.sortChangeHandler(f, {
119
- event: n,
120
- field: t.field
113
+ allowUnsort: h,
114
+ mode: f
115
+ } = G(this.$props.sortable || !1, l.sortable || !1), s = (this.$props.sort || []).filter((o) => o.field === l.field)[0], a = ie[h][s && s.dir || ""], c = f === "single" ? [] : (this.$props.sort || []).filter((o) => o.field !== l.field);
116
+ a !== "" && l.field && c.push({
117
+ field: l.field,
118
+ dir: a
119
+ }), this.sortChangeHandler(c, {
120
+ event: t,
121
+ field: l.field
121
122
  });
122
123
  },
123
- sortChangeHandler(n, t) {
124
- this.$emit("sortChange", n, t);
124
+ sortChangeHandler(t, l) {
125
+ this.$emit("sortChange", t, l);
125
126
  },
126
- filterChangeHandler(n, t) {
127
- this.$emit("filterChange", n, t);
127
+ filterChangeHandler(t, l) {
128
+ this.$emit("filterChange", t, l);
128
129
  },
129
- cellClass(n, t, u) {
130
- const h = t ? " " + t : "";
131
- let s = "k-header" + (u ? " k-grid-header-sticky" : "") + h;
132
- return this.$props.sort && this.$props.sort.filter((c) => c.field === n).length > 0 && (s += " k-sorted"), s;
130
+ cellClass(t, l, h) {
131
+ const f = l ? " " + l : "";
132
+ let s = "k-header" + (h ? " k-grid-header-sticky" : "") + f;
133
+ return this.$props.sort && this.$props.sort.filter((a) => a.field === t).length > 0 && (s += " k-sorted"), s;
133
134
  },
134
- cellKeyDown(n, t) {
135
- n.defaultPrevented || (n.keyCode === M.enter && this.cellClick(n, t), n.altKey && n.keyCode === M.down && t.field && (n.preventDefault(), this.columnMenuOpened = {
136
- [t.field]: !0
135
+ cellKeyDown(t, l) {
136
+ t.defaultPrevented || (t.keyCode === O.enter && this.cellClick(t, l), t.altKey && t.keyCode === O.down && l.field && (t.preventDefault(), this.columnMenuOpened = {
137
+ [l.field]: !0
137
138
  }));
138
139
  },
139
- getTemplate(n) {
140
- return W.call(this.$props.grid, n, X.call(this.$props.grid));
140
+ getTemplate(t) {
141
+ return Y.call(this.$props.grid, t, Z.call(this.$props.grid));
141
142
  },
142
143
  columnMenuClose() {
143
144
  this.onNavFocus({}), this.columnMenuOpened = {};
@@ -154,138 +155,146 @@ const S = {
154
155
  }
155
156
  },
156
157
  render() {
157
- const n = ne(this), t = n.toLanguageString(O, k[O]), u = n.toLanguageString(I, k[I]), h = n.toLanguageString(z, k[z]);
158
+ const t = ne(this), l = t.toLanguageString(I, S[I]), h = t.toLanguageString(z, S[z]), f = t.toLanguageString(L, S[L]);
158
159
  this.serviceIndex = 0, this.index = -1;
159
- const s = this.$props.columnsMap && this.$props.columnsMap.length === 1, c = this.$props.columnVirtualization && s, f = function(o, m) {
160
- const i = re({
160
+ const s = this.$props.columnVirtualization, a = function(c, o) {
161
+ const i = se({
161
162
  cellsToRender: this.$props.cellsToRender || [],
162
163
  columns: this.$props.columns,
163
- rowIndex: m,
164
- enableVirtualization: c
165
- }), R = i.columnsToRender.length > 0, L = R ? i.columnsToRender : o, w = R ? i.colSpans : [];
166
- return L.map(function(A, D) {
167
- var y;
168
- const e = this.$props.columns[A], g = this.$props.sortable && e.sortable, C = this.$props.sort ? this.$props.sort.findIndex((l) => l.field === e.field) : -1, $ = C >= 0 && this.$props.sort[C].dir || "none", d = function(l) {
164
+ rowIndex: o,
165
+ enableVirtualization: s,
166
+ columnsMap: this.$props.columnsMap
167
+ }), R = s;
168
+ let C = R && i.columnsToRender ? i.columnsToRender : c;
169
+ const A = R ? i.colSpans : [];
170
+ return !C || C.length === 0 ? [] : C.map(function(w, D) {
171
+ var M;
172
+ const e = this.$props.columns[w], m = this.$props.sortable && e.sortable, $ = this.$props.sort ? this.$props.sort.findIndex((r) => r.field === e.field) : -1, k = $ >= 0 && this.$props.sort[$].dir || "none", p = function(r) {
169
173
  if (!this.$props.sort)
170
174
  return null;
171
- const b = l >= 0 ? this.$props.sort[l].dir : "";
172
- return l >= 0 && [r("span", {
175
+ const g = r >= 0 ? this.$props.sort[r].dir : "";
176
+ return r >= 0 && [n("span", {
173
177
  key: 1,
174
178
  class: "k-sort-icon"
175
- }, [r(Z, {
176
- name: "sort-" + b + "-small",
177
- icon: b === "asc" ? te : le
178
- }, null)]), this.$props.sort.length > 1 && r("span", {
179
+ }, [n(te, {
180
+ name: "sort-" + g + "-small",
181
+ icon: g === "asc" ? re : oe
182
+ }, null)]), this.$props.sort.length > 1 && n("span", {
179
183
  key: 2,
180
184
  class: "k-sort-icon"
181
- }, [r("span", {
185
+ }, [n("span", {
182
186
  class: "k-sort-order"
183
- }, [l + 1])])];
184
- }.call(this, C), a = e.columnMenu || e.columnMenu === !1 ? e.columnMenu : this.$props.columnMenu, j = e.menuIcon || this.$props.columnMenuIcon, x = (e.kFirst ? "k-first " : "") + this.cellClass(e.field, e.headerClassName, e.locked) + (a ? " k-filterable" : ""), F = !a || typeof a == "boolean" ? !!a : this.getTemplate(a), v = e.locked && e.left !== void 0 ? this.$props.isRtl ? {
187
+ }, [r + 1])])];
188
+ }.call(this, $), d = e.columnMenu || e.columnMenu === !1 ? e.columnMenu : this.$props.columnMenu, j = e.menuIcon || this.$props.columnMenuIcon, F = (e.kFirst ? "k-first " : "") + this.cellClass(e.field, e.headerClassName, e.locked) + (d ? " k-filterable" : ""), V = !d || typeof d == "boolean" ? !!d : this.getTemplate(d), x = i.skipOffset ? {
189
+ borderLeftWidth: "1px"
190
+ } : void 0, v = e.locked && e.left !== void 0 ? this.$props.isRtl ? {
185
191
  left: e.right + "px",
186
192
  right: e.left + "px"
187
193
  } : {
188
194
  left: e.left + "px",
189
195
  right: e.right + "px"
190
- } : void 0, T = S[$] === "none" ? t : S[$] === "ascending" ? u : h;
191
- let p = e.isAccessible ? {
192
- ariaSort: S[$],
196
+ } : x, T = y[k] === "none" ? l : y[k] === "ascending" ? h : f;
197
+ let u = e.isAccessible ? {
198
+ ariaSort: y[k],
193
199
  ariaLabel: T,
194
200
  role: "columnheader",
195
- ariaColumnIndex: this.$props.isColCountDefined ? this.$props.columnsInitial.findIndex((l) => l.field === e.field) + 1 : void 0,
201
+ ariaColumnIndex: this.$props.isColCountDefined ? this.$props.columnsInitial.findIndex((r) => r.field === e.field) + 1 : void 0,
196
202
  ariaSelected: !1,
197
- ariaHaspopup: a ? "menu" : this.$props.filterable && e.filterable ? "dialog" : void 0
203
+ ariaHaspopup: d ? "menu" : this.$props.filterable && e.filterable ? "dialog" : void 0
198
204
  } : {
199
205
  role: "columnheader"
200
206
  };
201
- const V = e.declarationIndex >= 0 ? ++this.index : --this.serviceIndex, B = e.columnMenuOpened !== void 0 ? e.columnMenuOpened : this.columnMenuOpened[e.field], K = (y = w[D]) != null ? y : e.headerColSpan;
202
- return r(ee, {
203
- ariaSort: g ? p.ariaSort : void 0,
204
- ariaLabel: g ? p.ariaLabel : void 0,
205
- role: p.role,
206
- ariaColumnIndex: p.ariaColumnIndex,
207
- ariaSelected: p.ariaSelected,
208
- ariaHaspopup: p.ariaHaspopup,
209
- key: V,
210
- colSpan: K,
207
+ const B = e.declarationIndex >= 0 ? ++this.index : --this.serviceIndex, K = e.columnMenuOpened !== void 0 ? e.columnMenuOpened : this.columnMenuOpened[e.field], N = (M = A[D]) != null ? M : e.headerColSpan;
208
+ return n(le, {
209
+ ariaSort: m ? u.ariaSort : void 0,
210
+ ariaLabel: m ? u.ariaLabel : void 0,
211
+ role: u.role,
212
+ ariaColumnIndex: u.ariaColumnIndex,
213
+ ariaSelected: u.ariaSelected,
214
+ ariaHaspopup: u.ariaHaspopup,
215
+ key: B,
216
+ colSpan: N,
211
217
  rowSpan: e.rowSpan,
212
- class: x,
218
+ class: F,
213
219
  style: v,
214
220
  columnId: e.id,
215
221
  navigatable: e.navigatable,
216
- onKeydown: (l) => this.cellKeyDown(l, e)
222
+ onKeydown: (r) => this.cellKeyDown(r, e)
217
223
  }, {
218
- default: () => [[e.children.length === 0 && a && r(J, {
219
- key: 0,
220
- column: {
224
+ default: () => {
225
+ var r, g;
226
+ return [[e.children.length === 0 && d && n(Q, {
227
+ key: 0,
228
+ column: {
229
+ field: e.field,
230
+ filter: e.filter
231
+ },
232
+ opened: K,
233
+ animate: this.$props.columnMenuAnimate,
234
+ sortable: m,
235
+ sort: this.$props.sort,
236
+ onClose: this.columnMenuClose,
237
+ onSortchange: this.sortChangeHandler,
238
+ filter: this.$props.filter,
239
+ filterable: this.$props.filterable && e.filterable,
240
+ filterOperators: this.$props.filterOperators,
241
+ onFilterchange: this.filterChangeHandler,
242
+ render: V,
243
+ columnMenuIcon: j
244
+ }, null), e.internalHeaderCell && n("span", {
245
+ class: "k-cell-inner"
246
+ }, [n(e.internalHeaderCell, {
247
+ key: 1,
221
248
  field: e.field,
222
- filter: e.filter
223
- },
224
- opened: B,
225
- animate: this.$props.columnMenuAnimate,
226
- sortable: g,
227
- sort: this.$props.sort,
228
- onClose: this.columnMenuClose,
229
- onSortchange: this.sortChangeHandler,
230
- filter: this.$props.filter,
231
- filterable: this.$props.filterable && e.filterable,
232
- filterOperators: this.$props.filterOperators,
233
- onFilterchange: this.filterChangeHandler,
234
- render: F,
235
- columnMenuIcon: j
236
- }, null), e.internalHeaderCell && r("span", {
237
- class: "k-cell-inner"
238
- }, [r(e.internalHeaderCell, {
239
- key: 1,
240
- field: e.field,
241
- sortable: g,
242
- onHeadercellclick: (l) => this.cellClick(l, e),
243
- onSelectionchange: this.selectionChangeHandler,
244
- selectionValue: e.headerSelectionValue,
245
- title: e.title,
246
- render: (e.headerCell || this.$props.cellRender) && this.getTemplate(e.headerCell || this.$props.cellRender)
247
- }, H(d) ? d : {
248
- default: () => [d]
249
- })]) || r("span", {
250
- class: "k-cell-inner"
251
- }, [r(U, {
252
- key: 1,
253
- field: e.field,
254
- sortable: g,
255
- onHeadercellclick: (l) => this.cellClick(l, e),
256
- selectionValue: e.headerSelectionValue,
257
- title: e.title,
258
- render: (e.headerCell || this.$props.cellRender) && this.getTemplate(e.headerCell || this.$props.cellRender)
259
- }, H(d) ? d : {
260
- default: () => [d]
261
- })]), this.$props.columnResize && this.$props.columnResize.resizable && e.resizable && r(E, {
262
- key: 2,
263
- onResize: (l, b, N) => this.$props.columnResize && this.$props.columnResize.dragHandler(l, e, b, N)
264
- }, null)]]
249
+ sortable: m,
250
+ onHeadercellclick: (b) => this.cellClick(b, e),
251
+ onSelectionchange: this.selectionChangeHandler,
252
+ selectionValue: (r = e.headerSelectionValue) != null ? r : this.$props.headerSelectionValue,
253
+ title: e.title,
254
+ render: (e.headerCell || this.$props.cellRender) && this.getTemplate(e.headerCell || this.$props.cellRender)
255
+ }, H(p) ? p : {
256
+ default: () => [p]
257
+ })]) || n("span", {
258
+ class: "k-cell-inner"
259
+ }, [n(J, {
260
+ key: 1,
261
+ field: e.field,
262
+ sortable: m,
263
+ onHeadercellclick: (b) => this.cellClick(b, e),
264
+ selectionValue: (g = e.headerSelectionValue) != null ? g : this.$props.headerSelectionValue,
265
+ title: e.title,
266
+ render: (e.headerCell || this.$props.cellRender) && this.getTemplate(e.headerCell || this.$props.cellRender)
267
+ }, H(p) ? p : {
268
+ default: () => [p]
269
+ })]), this.$props.columnResize && this.$props.columnResize.resizable && e.resizable && n(U, {
270
+ key: 2,
271
+ onResize: (b, _, P) => this.$props.columnResize && this.$props.columnResize.dragHandler(b, e, _, P)
272
+ }, null)]];
273
+ }
265
274
  });
266
275
  }, this);
267
276
  };
268
- return r("thead", {
277
+ return n("thead", {
269
278
  role: "rowgroup",
270
279
  class: this.theadClasses,
271
280
  "data-keyboardnavheader": !0
272
- }, [this.$props.columnsMap.map(function(o, m) {
281
+ }, [this.$props.columnsMap.map(function(c, o) {
273
282
  let i;
274
- return (this.$props.groupable || this.$props.reorderable) && r(G, {
275
- key: m,
283
+ return (this.$props.groupable || this.$props.reorderable) && n(W, {
284
+ key: o,
276
285
  onPressHandler: this.pressHandler,
277
286
  onDragHandler: this.dragHandler,
278
287
  onReleaseHandler: this.releaseHandler
279
- }, H(i = f.call(this, o, m)) ? i : {
288
+ }, H(i = a.call(this, c, o)) ? i : {
280
289
  default: () => [i]
281
- }) || r("tr", {
290
+ }) || n("tr", {
282
291
  class: "k-table-row",
283
292
  role: "row",
284
- "aria-rowindex": this.columnsMap.length
285
- }, [f.call(this, o, m)]);
293
+ "aria-rowindex": o + 1
294
+ }, [a.call(this, c, o)]);
286
295
  }, this), this.$props.filterRow]);
287
296
  }
288
297
  });
289
298
  export {
290
- $e as HeaderRow
299
+ Se as HeaderRow
291
300
  };
package/index.d.mts CHANGED
@@ -45,5 +45,6 @@ import { GridColumnMenuItemGroup } from './columnMenu/GridColumnMenuItemGroup.js
45
45
  import { GridSearchBox, GridSearchBoxProps } from './GridSearchBox.js';
46
46
  export * from './utils/main.js';
47
47
  export * from './interfaces/events.js';
48
+ export * from './StatusBar.js';
48
49
  export { Grid, GridCell, GridEditCell, GridGroupCell, GridHierarchyCell, GridDetailRow, GridRow, GridFilterCell, GridHeaderCell, Footer, FooterRow, GridColumnMenuSort, sortGroupByField, GridColumnMenuFilter, filterGroupByField, GridColumnMenuItem, GridColumnMenuItemContent, GridColumnMenuItemGroup, GridColumnMenuFilterUI, GridColumnMenuFilterCell, GridColumnMenuCheckboxFilter, GridToolbar, GridNoRecords, GridSearchBox, };
49
50
  export type { GridProps, GridColumnProps, GridCellProps, GridDetailRowProps, GridRowProps, GridFilterCellProps, GridHeaderCellProps, GridFooterCellProps, GridColumnMenuProps, GridColumnMenuCheckboxFilterProps, GridToolbarProps, GridNoRecordsProps, GridSortSettings, GridPagerSettings, GridGroupableSettings, GridSearchBoxProps, GridColumnState, GridColSpanProps, };
package/index.d.ts CHANGED
@@ -45,5 +45,6 @@ import { GridColumnMenuItemGroup } from './columnMenu/GridColumnMenuItemGroup';
45
45
  import { GridSearchBox, GridSearchBoxProps } from './GridSearchBox';
46
46
  export * from './utils/main';
47
47
  export * from './interfaces/events';
48
+ export * from './StatusBar';
48
49
  export { Grid, GridCell, GridEditCell, GridGroupCell, GridHierarchyCell, GridDetailRow, GridRow, GridFilterCell, GridHeaderCell, Footer, FooterRow, GridColumnMenuSort, sortGroupByField, GridColumnMenuFilter, filterGroupByField, GridColumnMenuItem, GridColumnMenuItemContent, GridColumnMenuItemGroup, GridColumnMenuFilterUI, GridColumnMenuFilterCell, GridColumnMenuCheckboxFilter, GridToolbar, GridNoRecords, GridSearchBox, };
49
50
  export type { GridProps, GridColumnProps, GridCellProps, GridDetailRowProps, GridRowProps, GridFilterCellProps, GridHeaderCellProps, GridFooterCellProps, GridColumnMenuProps, GridColumnMenuCheckboxFilterProps, GridToolbarProps, GridNoRecordsProps, GridSortSettings, GridPagerSettings, GridGroupableSettings, GridSearchBoxProps, GridColumnState, GridColSpanProps, };
package/index.js CHANGED
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./RootGrid.js"),r=require("./columnMenu/GridColumnMenuSort.js"),o=require("./columnMenu/GridColumnMenuFilter.js"),t=require("./columnMenu/GridColumnMenuFilterUI.js"),l=require("./columnMenu/GridColumnMenuFilterCell.js"),n=require("./columnMenu/GridColumnMenuCheckboxFilter.js"),u=require("./cells/GridCell.js"),d=require("./cells/GridEditCell.js"),G=require("./cells/GridGroupCell.js"),C=require("./cells/GridHierarchyCell.js"),a=require("./cells/GridFilterCell.js"),s=require("./header/GridHeaderCell.js"),m=require("./footer/Footer.js"),c=require("./footer/FooterRow.js"),p=require("./rows/GridDetailRow.js"),F=require("./rows/GridRow.js"),M=require("./GridToolbar.js"),q=require("./components/noRecords/GridNoRecords.js"),g=require("./columnMenu/GridColumnMenuItem.js"),R=require("./columnMenu/GridColumnMenuItemContent.js"),S=require("./columnMenu/GridColumnMenuItemGroup.js"),h=require("./GridSearchBox.js"),e=require("./utils/main.js");exports.Grid=i.RootGrid;exports.GridColumnMenuSort=r.GridColumnMenuSort;exports.sortGroupByField=r.sortGroupByField;exports.GridColumnMenuFilter=o.GridColumnMenuFilter;exports.filterGroupByField=o.filterGroupByField;exports.GridColumnMenuFilterUI=t.GridColumnMenuFilterUI;exports.GridColumnMenuFilterCell=l.GridColumnMenuFilterCell;exports.GridColumnMenuCheckboxFilter=n.GridColumnMenuCheckboxFilter;exports.GridCell=u.GridCell;exports.GridEditCell=d.GridEditCell;exports.GridGroupCell=G.GridGroupCell;exports.GridHierarchyCell=C.GridHierarchyCell;exports.GridFilterCell=a.GridFilterCell;exports.GridHeaderCell=s.GridHeaderCell;exports.Footer=m.Footer;exports.FooterRow=c.FooterRow;exports.GridDetailRow=p.GridDetailRow;exports.GridRow=F.GridRow;exports.GridToolbar=M.GridToolbar;exports.GridNoRecords=q.GridNoRecords;exports.GridColumnMenuItem=g.GridColumnMenuItem;exports.GridColumnMenuItemContent=R.GridColumnMenuItemContent;exports.GridColumnMenuItemGroup=S.GridColumnMenuItemGroup;exports.GridSearchBox=h.GridSearchBox;exports.applyExpandedState=e.applyExpandedState;exports.autoGenerateColumns=e.autoGenerateColumns;exports.calcRowHeight=e.calcRowHeight;exports.checkPropCompatibility=e.checkPropCompatibility;exports.firefox=e.firefox;exports.firefoxMaxHeight=e.firefoxMaxHeight;exports.flatData=e.flatData;exports.footerColumns=e.footerColumns;exports.getColSpan=e.getColSpan;exports.getColumnWidth=e.getColumnWidth;exports.getDataAsArray=e.getDataAsArray;exports.getFlatColumnsState=e.getFlatColumnsState;exports.getIndex=e.getIndex;exports.getNestedValue=e.getNestedValue;exports.getRowSpanOptions=e.getRowSpanOptions;exports.groupedFirstItemValue=e.groupedFirstItemValue;exports.isRtl=e.isRtl;exports.isSorted=e.isSorted;exports.mapColumns=e.mapColumns;exports.parsers=e.parsers;exports.readColumns=e.readColumns;exports.sanitizeColumns=e.sanitizeColumns;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./RootGrid.js"),o=require("./columnMenu/GridColumnMenuSort.js"),t=require("./columnMenu/GridColumnMenuFilter.js"),l=require("./columnMenu/GridColumnMenuFilterUI.js"),u=require("./columnMenu/GridColumnMenuFilterCell.js"),n=require("./columnMenu/GridColumnMenuCheckboxFilter.js"),d=require("./cells/GridCell.js"),a=require("./cells/GridEditCell.js"),G=require("./cells/GridGroupCell.js"),C=require("./cells/GridHierarchyCell.js"),s=require("./cells/GridFilterCell.js"),m=require("./header/GridHeaderCell.js"),c=require("./footer/Footer.js"),p=require("./footer/FooterRow.js"),F=require("./rows/GridDetailRow.js"),M=require("./rows/GridRow.js"),g=require("./GridToolbar.js"),q=require("./components/noRecords/GridNoRecords.js"),S=require("./columnMenu/GridColumnMenuItem.js"),R=require("./columnMenu/GridColumnMenuItemContent.js"),f=require("./columnMenu/GridColumnMenuItemGroup.js"),h=require("./GridSearchBox.js"),e=require("./utils/main.js"),r=require("./StatusBar.js");exports.Grid=i.RootGrid;exports.GridColumnMenuSort=o.GridColumnMenuSort;exports.sortGroupByField=o.sortGroupByField;exports.GridColumnMenuFilter=t.GridColumnMenuFilter;exports.filterGroupByField=t.filterGroupByField;exports.GridColumnMenuFilterUI=l.GridColumnMenuFilterUI;exports.GridColumnMenuFilterCell=u.GridColumnMenuFilterCell;exports.GridColumnMenuCheckboxFilter=n.GridColumnMenuCheckboxFilter;exports.GridCell=d.GridCell;exports.GridEditCell=a.GridEditCell;exports.GridGroupCell=G.GridGroupCell;exports.GridHierarchyCell=C.GridHierarchyCell;exports.GridFilterCell=s.GridFilterCell;exports.GridHeaderCell=m.GridHeaderCell;exports.Footer=c.Footer;exports.FooterRow=p.FooterRow;exports.GridDetailRow=F.GridDetailRow;exports.GridRow=M.GridRow;exports.GridToolbar=g.GridToolbar;exports.GridNoRecords=q.GridNoRecords;exports.GridColumnMenuItem=S.GridColumnMenuItem;exports.GridColumnMenuItemContent=R.GridColumnMenuItemContent;exports.GridColumnMenuItemGroup=f.GridColumnMenuItemGroup;exports.GridSearchBox=h.GridSearchBox;exports.applyExpandedState=e.applyExpandedState;exports.autoGenerateColumns=e.autoGenerateColumns;exports.calcRowHeight=e.calcRowHeight;exports.checkPropCompatibility=e.checkPropCompatibility;exports.firefox=e.firefox;exports.firefoxMaxHeight=e.firefoxMaxHeight;exports.flatData=e.flatData;exports.footerColumns=e.footerColumns;exports.getColSpan=e.getColSpan;exports.getColumnWidth=e.getColumnWidth;exports.getDataAsArray=e.getDataAsArray;exports.getFlatColumnsState=e.getFlatColumnsState;exports.getIndex=e.getIndex;exports.getNestedValue=e.getNestedValue;exports.getRowSpanOptions=e.getRowSpanOptions;exports.groupedFirstItemValue=e.groupedFirstItemValue;exports.isRtl=e.isRtl;exports.isSorted=e.isSorted;exports.mapColumns=e.mapColumns;exports.parsers=e.parsers;exports.readColumns=e.readColumns;exports.sanitizeColumns=e.sanitizeColumns;exports.StatusBar=r.StatusBar;exports.getStatusData=r.getStatusData;exports.leafColumns=r.leafColumns;
package/index.mjs CHANGED
@@ -7,18 +7,18 @@
7
7
  */
8
8
  import { RootGrid as e } from "./RootGrid.mjs";
9
9
  import { GridColumnMenuSort as l, sortGroupByField as i } from "./columnMenu/GridColumnMenuSort.mjs";
10
- import { GridColumnMenuFilter as p, filterGroupByField as d } from "./columnMenu/GridColumnMenuFilter.mjs";
10
+ import { GridColumnMenuFilter as p, filterGroupByField as a } from "./columnMenu/GridColumnMenuFilter.mjs";
11
11
  import { GridColumnMenuFilterUI as u } from "./columnMenu/GridColumnMenuFilterUI.mjs";
12
12
  import { GridColumnMenuFilterCell as f } from "./columnMenu/GridColumnMenuFilterCell.mjs";
13
13
  import { GridColumnMenuCheckboxFilter as C } from "./columnMenu/GridColumnMenuCheckboxFilter.mjs";
14
14
  import { GridCell as s } from "./cells/GridCell.mjs";
15
- import { GridEditCell as g } from "./cells/GridEditCell.mjs";
16
- import { GridGroupCell as c } from "./cells/GridGroupCell.mjs";
17
- import { GridHierarchyCell as h } from "./cells/GridHierarchyCell.mjs";
15
+ import { GridEditCell as F } from "./cells/GridEditCell.mjs";
16
+ import { GridGroupCell as S } from "./cells/GridGroupCell.mjs";
17
+ import { GridHierarchyCell as R } from "./cells/GridHierarchyCell.mjs";
18
18
  import { GridFilterCell as y } from "./cells/GridFilterCell.mjs";
19
19
  import { GridHeaderCell as w } from "./header/GridHeaderCell.mjs";
20
- import { Footer as b } from "./footer/Footer.mjs";
21
- import { FooterRow as D } from "./footer/FooterRow.mjs";
20
+ import { Footer as D } from "./footer/Footer.mjs";
21
+ import { FooterRow as b } from "./footer/FooterRow.mjs";
22
22
  import { GridDetailRow as A } from "./rows/GridDetailRow.mjs";
23
23
  import { GridRow as N } from "./rows/GridRow.mjs";
24
24
  import { GridToolbar as z } from "./GridToolbar.mjs";
@@ -27,10 +27,11 @@ import { GridColumnMenuItem as U } from "./columnMenu/GridColumnMenuItem.mjs";
27
27
  import { GridColumnMenuItemContent as j } from "./columnMenu/GridColumnMenuItemContent.mjs";
28
28
  import { GridColumnMenuItemGroup as v } from "./columnMenu/GridColumnMenuItemGroup.mjs";
29
29
  import { GridSearchBox as K } from "./GridSearchBox.mjs";
30
- import { applyExpandedState as Q, autoGenerateColumns as X, calcRowHeight as Y, checkPropCompatibility as Z, firefox as _, firefoxMaxHeight as $, flatData as rr, footerColumns as or, getColSpan as er, getColumnWidth as tr, getDataAsArray as lr, getFlatColumnsState as ir, getIndex as mr, getNestedValue as pr, getRowSpanOptions as dr, groupedFirstItemValue as nr, isRtl as ur, isSorted as ar, mapColumns as fr, parsers as xr, readColumns as Cr, sanitizeColumns as Gr } from "./utils/main.mjs";
30
+ import { applyExpandedState as Q, autoGenerateColumns as X, calcRowHeight as Y, checkPropCompatibility as Z, firefox as _, firefoxMaxHeight as $, flatData as rr, footerColumns as or, getColSpan as er, getColumnWidth as tr, getDataAsArray as lr, getFlatColumnsState as ir, getIndex as mr, getNestedValue as pr, getRowSpanOptions as ar, groupedFirstItemValue as dr, isRtl as ur, isSorted as nr, mapColumns as fr, parsers as xr, readColumns as Cr, sanitizeColumns as Gr } from "./utils/main.mjs";
31
+ import { StatusBar as gr, getStatusData as Fr, leafColumns as Mr } from "./StatusBar.mjs";
31
32
  export {
32
- b as Footer,
33
- D as FooterRow,
33
+ D as Footer,
34
+ b as FooterRow,
34
35
  e as Grid,
35
36
  s as GridCell,
36
37
  C as GridColumnMenuCheckboxFilter,
@@ -42,20 +43,21 @@ export {
42
43
  v as GridColumnMenuItemGroup,
43
44
  l as GridColumnMenuSort,
44
45
  A as GridDetailRow,
45
- g as GridEditCell,
46
+ F as GridEditCell,
46
47
  y as GridFilterCell,
47
- c as GridGroupCell,
48
+ S as GridGroupCell,
48
49
  w as GridHeaderCell,
49
- h as GridHierarchyCell,
50
+ R as GridHierarchyCell,
50
51
  P as GridNoRecords,
51
52
  N as GridRow,
52
53
  K as GridSearchBox,
53
54
  z as GridToolbar,
55
+ gr as StatusBar,
54
56
  Q as applyExpandedState,
55
57
  X as autoGenerateColumns,
56
58
  Y as calcRowHeight,
57
59
  Z as checkPropCompatibility,
58
- d as filterGroupByField,
60
+ a as filterGroupByField,
59
61
  _ as firefox,
60
62
  $ as firefoxMaxHeight,
61
63
  rr as flatData,
@@ -66,10 +68,12 @@ export {
66
68
  ir as getFlatColumnsState,
67
69
  mr as getIndex,
68
70
  pr as getNestedValue,
69
- dr as getRowSpanOptions,
70
- nr as groupedFirstItemValue,
71
+ ar as getRowSpanOptions,
72
+ Fr as getStatusData,
73
+ dr as groupedFirstItemValue,
71
74
  ur as isRtl,
72
- ar as isSorted,
75
+ nr as isSorted,
76
+ Mr as leafColumns,
73
77
  fr as mapColumns,
74
78
  xr as parsers,
75
79
  Cr as readColumns,
@@ -6,6 +6,7 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import { GroupState } from '@progress/kendo-vue-data-tools';
9
+ import { GridColumnType } from './ColumnType';
9
10
  /**
10
11
  * @hidden
11
12
  */
@@ -152,6 +153,16 @@ export interface GridCellProps {
152
153
  onCancel?: (event: {
153
154
  dataItem: any;
154
155
  }) => void;
156
+ /**
157
+ * Sets the type of the column and renders a dedicated column for interaction.
158
+ *
159
+ * @example
160
+ * ```jsx
161
+ * { columnType: "checkbox" }
162
+ * ```
163
+ * @default "data"
164
+ */
165
+ columnType?: GridColumnType;
155
166
  /**
156
167
  * The type of the data which will be used when formatting the cell data.
157
168
  * Could be one of the following values 'text' | 'numeric' | 'boolean' | 'date'.
@@ -187,18 +187,22 @@ export interface GridColumnProps extends Omit<ColumnBaseProps, 'cell'> {
187
187
  *
188
188
  */
189
189
  locked?: boolean;
190
- /**
191
- * The type of the data which will be used when formatting the cell data.
192
- * Could be one of the following values 'string' | 'number' | 'boolean' | 'date'.
193
- * Defaults to `string`.
194
- */
195
- type?: 'string' | 'number' | 'boolean' | 'date';
196
190
  /**
197
191
  * Sets the type of the column and renders a dedicated column for interaction.
198
192
  *
193
+ * @example
194
+ * ```jsx
195
+ * { columnType: "checkbox" }
196
+ * ```
199
197
  * @default "data"
200
198
  */
201
199
  columnType?: GridColumnType;
200
+ /**
201
+ * The type of the data which will be used when formatting the cell data.
202
+ * Could be one of the following values 'string' | 'number' | 'boolean' | 'date'.
203
+ * Defaults to `string`.
204
+ */
205
+ type?: 'string' | 'number' | 'boolean' | 'date';
202
206
  /**
203
207
  * Defines if the cells of the column should be spanned when their values are the same.
204
208
  *
@@ -10,13 +10,14 @@ import { GridGroupableSettings } from './GridGroupableSettings';
10
10
  import { GridSortChangeEvent, GridFilterChangeEvent, GridPageChangeEvent, GridExpandChangeEvent, GridSelectionChangeEvent, GridHeaderSelectionChangeEvent, GridRowClickEvent, GridItemChangeEvent, GridDataStateChangeEvent, GridColumnResizeEvent, GridColumnReorderEvent, GridGroupChangeEvent, GridCancelEvent, GridSaveEvent, GridRemoveEvent, GridEditEvent, GridNavigationActionEvent, GridKeyDownEvent, GridSearchChangeEvent, GridGroupExpandChangeEvent, GridDetailExpandChangeEvent } from './events';
11
11
  import { GridCellProps } from './GridCellProps';
12
12
  import { GridSortSettings } from './GridSortSettings';
13
- import { DetailExpandDescriptor, GridPagerSettings, GroupExpandDescriptor, SearchField } from '@progress/kendo-vue-data-tools';
13
+ import { DetailExpandDescriptor, GridPagerSettings, GroupExpandDescriptor, SearchField, SelectDescriptor } from '@progress/kendo-vue-data-tools';
14
14
  import { GridColumnProps } from '../interfaces/GridColumnProps';
15
15
  import { GridFilterOperators } from './GridFilterOperators';
16
16
  import { PopupAnimation } from '@progress/kendo-vue-popup';
17
17
  import { SVGIcon } from '@progress/kendo-vue-common';
18
18
  import { GridColumnState } from './GridColumnState';
19
19
  import { GridRowSpannableSettings } from './GridRowSpannableSettings';
20
+ import { GridSelectableSettings } from './GridSelectableSettings';
20
21
  /**
21
22
  * Represents the props of the [native Vue Grid component by Kendo UI]({% slug overview_grid %}).
22
23
  */
@@ -313,8 +314,7 @@ export interface GridProps {
313
314
  */
314
315
  expandField?: string;
315
316
  /**
316
- * Specifies the name of the field which will provide a Boolean representation
317
- * of the selected state of the item ([see example]({% slug selection_grid %})).
317
+ * Deprecated. Use `selectable` instead.
318
318
  */
319
319
  selectedField?: string;
320
320
  /**
@@ -332,6 +332,34 @@ export interface GridProps {
332
332
  [id: string]: boolean;
333
333
  };
334
334
  };
335
+ /**
336
+ * The default `select` state applied to the Grid when using uncontrolled mode.
337
+ *
338
+ * @example
339
+ * ```jsx
340
+ * <Grid defaultSelect={{ ['item-data-key-id']: true }} />
341
+ * ```
342
+ */
343
+ defaultSelect?: SelectDescriptor;
344
+ /**
345
+ * The [descriptor](https://www.telerik.com/kendo-react-ui/components/datatools/api/selectdescriptor) by which the selected state of an item is defined.
346
+ * Passing a boolean value will select the whole row, while passing an array of strings will select individual.
347
+ *
348
+ * @example
349
+ * ```jsx
350
+ * <Grid select={{ ['item-data-key-id']: true }} />
351
+ * ```
352
+ */
353
+ select?: SelectDescriptor;
354
+ /**
355
+ * The Grid selectable settings.
356
+ *
357
+ * @example
358
+ * ```vue
359
+ * <Grid :selectable="{ enabled: true, mode: 'single' }}" />
360
+ * ```
361
+ */
362
+ selectable?: boolean | GridSelectableSettings;
335
363
  /**
336
364
  * Fires when the user clicks the checkbox of a column header whose `field` matches `selectedField`.
337
365
  * ([see example]({% slug selection_grid %})).