@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.
- package/Grid.d.ts +18 -2
- package/Grid.js +1 -1
- package/Grid.mjs +655 -511
- package/GridNav.d.ts +12 -2
- package/GridNav.js +1 -1
- package/GridNav.mjs +52 -24
- package/GridState.d.ts +12 -5
- package/GridState.js +1 -1
- package/GridState.mjs +84 -77
- package/RootGrid.d.ts +6 -0
- package/RootGrid.js +1 -1
- package/RootGrid.mjs +25 -25
- package/StatusBar.d.ts +55 -5
- package/StatusBar.js +8 -0
- package/StatusBar.mjs +81 -0
- package/cells/GridCell.d.ts +3 -0
- package/cells/GridCell.js +1 -1
- package/cells/GridCell.mjs +32 -29
- package/cells/GridEditCell.d.ts +2 -0
- package/cells/GridEditCell.js +1 -1
- package/cells/GridEditCell.mjs +1 -0
- package/cells/GridSelectionCell.js +1 -1
- package/cells/GridSelectionCell.mjs +16 -16
- package/common.d.ts +3 -0
- package/common.js +1 -1
- package/common.mjs +3 -0
- package/components/table/GridTable.d.ts +18 -0
- package/components/table/GridTable.js +8 -0
- package/components/table/GridTable.mjs +41 -0
- package/components/table/GridTableScrollable.d.ts +20 -0
- package/components/table/GridTableScrollable.js +8 -0
- package/components/table/GridTableScrollable.mjs +45 -0
- package/dist/cdn/js/kendo-vue-grid.js +1 -1
- package/drag/ColumnDraggable.js +1 -1
- package/drag/ColumnDraggable.mjs +5 -4
- package/header/FilterRow.d.ts +3 -0
- package/header/FilterRow.js +1 -1
- package/header/FilterRow.mjs +46 -44
- package/header/Header.d.ts +5 -2
- package/header/Header.js +1 -1
- package/header/Header.mjs +10 -5
- package/header/HeaderRow.d.ts +3 -0
- package/header/HeaderRow.js +1 -1
- package/header/HeaderRow.mjs +148 -139
- package/index.d.mts +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -1
- package/index.mjs +20 -16
- package/interfaces/GridCellProps.d.ts +11 -0
- package/interfaces/GridColumnProps.d.ts +10 -6
- package/interfaces/GridProps.d.ts +31 -3
- package/interfaces/events.d.ts +26 -3
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +12 -12
- package/utils/main.js +1 -1
- package/utils/main.mjs +68 -67
- package/utils/virtualColumns.d.ts +17 -0
- package/utils/virtualColumns.js +1 -1
- package/utils/virtualColumns.mjs +132 -39
package/header/HeaderRow.mjs
CHANGED
|
@@ -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
|
|
9
|
-
import { normalize as
|
|
10
|
-
import { ColumnResizer as
|
|
11
|
-
import { ColumnDraggable as
|
|
12
|
-
import { GridHeaderCell as
|
|
13
|
-
import { ColumnMenu as
|
|
14
|
-
import { noop as
|
|
15
|
-
import { HeaderThElement as
|
|
16
|
-
import { sortableColumnAriaLabel as
|
|
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
|
|
19
|
-
import { getVirtualHeaderCellsToRender as
|
|
20
|
-
function H(
|
|
21
|
-
return typeof
|
|
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
|
|
23
|
+
const y = {
|
|
24
24
|
none: "none",
|
|
25
25
|
asc: "ascending",
|
|
26
26
|
desc: "descending"
|
|
27
|
-
},
|
|
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
|
-
},
|
|
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:
|
|
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(
|
|
97
|
-
this.$emit("pressHandler",
|
|
97
|
+
pressHandler(t, l) {
|
|
98
|
+
this.$emit("pressHandler", t, l);
|
|
98
99
|
},
|
|
99
|
-
dragHandler(
|
|
100
|
-
this.$emit("dragHandler",
|
|
100
|
+
dragHandler(t, l) {
|
|
101
|
+
this.$emit("dragHandler", t, l);
|
|
101
102
|
},
|
|
102
|
-
releaseHandler(
|
|
103
|
-
this.$emit("releaseHandler",
|
|
103
|
+
releaseHandler(t) {
|
|
104
|
+
this.$emit("releaseHandler", t);
|
|
104
105
|
},
|
|
105
|
-
selectionChangeHandler(
|
|
106
|
-
this.$emit("selectionchange",
|
|
106
|
+
selectionChangeHandler(t) {
|
|
107
|
+
this.$emit("selectionchange", t);
|
|
107
108
|
},
|
|
108
|
-
cellClick(
|
|
109
|
-
if (
|
|
109
|
+
cellClick(t, l) {
|
|
110
|
+
if (t.preventDefault(), !ee.call(this, "sortChange"))
|
|
110
111
|
return;
|
|
111
112
|
const {
|
|
112
|
-
allowUnsort:
|
|
113
|
-
mode:
|
|
114
|
-
} =
|
|
115
|
-
|
|
116
|
-
field:
|
|
117
|
-
dir:
|
|
118
|
-
}), this.sortChangeHandler(
|
|
119
|
-
event:
|
|
120
|
-
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(
|
|
124
|
-
this.$emit("sortChange",
|
|
124
|
+
sortChangeHandler(t, l) {
|
|
125
|
+
this.$emit("sortChange", t, l);
|
|
125
126
|
},
|
|
126
|
-
filterChangeHandler(
|
|
127
|
-
this.$emit("filterChange",
|
|
127
|
+
filterChangeHandler(t, l) {
|
|
128
|
+
this.$emit("filterChange", t, l);
|
|
128
129
|
},
|
|
129
|
-
cellClass(
|
|
130
|
-
const
|
|
131
|
-
let s = "k-header" + (
|
|
132
|
-
return this.$props.sort && this.$props.sort.filter((
|
|
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(
|
|
135
|
-
|
|
136
|
-
[
|
|
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(
|
|
140
|
-
return
|
|
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
|
|
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.
|
|
160
|
-
const i =
|
|
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:
|
|
164
|
-
enableVirtualization:
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
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
|
|
172
|
-
return
|
|
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
|
-
}, [
|
|
176
|
-
name: "sort-" +
|
|
177
|
-
icon:
|
|
178
|
-
}, null)]), this.$props.sort.length > 1 &&
|
|
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
|
-
}, [
|
|
185
|
+
}, [n("span", {
|
|
182
186
|
class: "k-sort-order"
|
|
183
|
-
}, [
|
|
184
|
-
}.call(this,
|
|
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
|
-
} :
|
|
191
|
-
let
|
|
192
|
-
ariaSort:
|
|
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((
|
|
201
|
+
ariaColumnIndex: this.$props.isColCountDefined ? this.$props.columnsInitial.findIndex((r) => r.field === e.field) + 1 : void 0,
|
|
196
202
|
ariaSelected: !1,
|
|
197
|
-
ariaHaspopup:
|
|
203
|
+
ariaHaspopup: d ? "menu" : this.$props.filterable && e.filterable ? "dialog" : void 0
|
|
198
204
|
} : {
|
|
199
205
|
role: "columnheader"
|
|
200
206
|
};
|
|
201
|
-
const
|
|
202
|
-
return
|
|
203
|
-
ariaSort:
|
|
204
|
-
ariaLabel:
|
|
205
|
-
role:
|
|
206
|
-
ariaColumnIndex:
|
|
207
|
-
ariaSelected:
|
|
208
|
-
ariaHaspopup:
|
|
209
|
-
key:
|
|
210
|
-
colSpan:
|
|
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:
|
|
218
|
+
class: F,
|
|
213
219
|
style: v,
|
|
214
220
|
columnId: e.id,
|
|
215
221
|
navigatable: e.navigatable,
|
|
216
|
-
onKeydown: (
|
|
222
|
+
onKeydown: (r) => this.cellKeyDown(r, e)
|
|
217
223
|
}, {
|
|
218
|
-
default: () =>
|
|
219
|
-
|
|
220
|
-
|
|
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
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
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
|
|
277
|
+
return n("thead", {
|
|
269
278
|
role: "rowgroup",
|
|
270
279
|
class: this.theadClasses,
|
|
271
280
|
"data-keyboardnavheader": !0
|
|
272
|
-
}, [this.$props.columnsMap.map(function(
|
|
281
|
+
}, [this.$props.columnsMap.map(function(c, o) {
|
|
273
282
|
let i;
|
|
274
|
-
return (this.$props.groupable || this.$props.reorderable) &&
|
|
275
|
-
key:
|
|
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 =
|
|
288
|
+
}, H(i = a.call(this, c, o)) ? i : {
|
|
280
289
|
default: () => [i]
|
|
281
|
-
}) ||
|
|
290
|
+
}) || n("tr", {
|
|
282
291
|
class: "k-table-row",
|
|
283
292
|
role: "row",
|
|
284
|
-
"aria-rowindex":
|
|
285
|
-
}, [
|
|
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
|
-
|
|
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"),
|
|
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
|
|
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
|
|
16
|
-
import { GridGroupCell as
|
|
17
|
-
import { GridHierarchyCell as
|
|
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
|
|
21
|
-
import { FooterRow as
|
|
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
|
|
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
|
-
|
|
33
|
-
|
|
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
|
-
|
|
46
|
+
F as GridEditCell,
|
|
46
47
|
y as GridFilterCell,
|
|
47
|
-
|
|
48
|
+
S as GridGroupCell,
|
|
48
49
|
w as GridHeaderCell,
|
|
49
|
-
|
|
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
|
-
|
|
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
|
-
|
|
70
|
-
|
|
71
|
+
ar as getRowSpanOptions,
|
|
72
|
+
Fr as getStatusData,
|
|
73
|
+
dr as groupedFirstItemValue,
|
|
71
74
|
ur as isRtl,
|
|
72
|
-
|
|
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
|
-
*
|
|
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 %})).
|