@progress/kendo-react-grid 10.1.0-develop.8 → 10.1.0
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/GridComponent.js +1 -1
- package/GridComponent.mjs +145 -141
- package/README.md +4 -4
- package/cells/GridFilterCell.js +1 -1
- package/cells/GridFilterCell.mjs +8 -10
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/header/client/GridHeaderCellContainer.js +1 -1
- package/header/client/GridHeaderCellContainer.mjs +17 -14
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +13 -13
package/GridComponent.mjs
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import * as
|
|
9
|
-
import { uGrid as xt, validatePackage as Gt, getter as
|
|
8
|
+
import * as a from "react";
|
|
9
|
+
import { uGrid as xt, validatePackage as Gt, getter as H, classNames as f, WatermarkOverlay as Le } from "@progress/kendo-react-common";
|
|
10
10
|
import { process as kt } from "@progress/kendo-data-query";
|
|
11
|
-
import { combineFilters as Nt, getDetailExpandableOptions as Ft, getGroupExpandableOptions as Dt, getSelectionOptions as Tt, tableKeyboardNavigationTools as O, Pager as
|
|
12
|
-
import { GridSelectionCell as
|
|
11
|
+
import { combineFilters as Nt, getDetailExpandableOptions as Ft, getGroupExpandableOptions as Dt, getSelectionOptions as Tt, tableKeyboardNavigationTools as O, Pager as At, tableKeyboardNavigationBodyAttributes as Pt, tableKeyboardNavigationScopeAttributes as _e, tableColumnsVirtualization as Ht } from "@progress/kendo-react-data-tools";
|
|
12
|
+
import { GridSelectionCell as Kt } from "./cells/GridSelectionCell.mjs";
|
|
13
13
|
import { GridHierarchyCell as Bt } from "./cells/GridHierarchyCell.mjs";
|
|
14
14
|
import { GridEditCell as Vt } from "./cells/GridEditCell.mjs";
|
|
15
15
|
import { Header as Lt } from "./header/Header.mjs";
|
|
@@ -21,41 +21,41 @@ import { isRowReorderEnabled as Wt, getRowSpanOptions as Oe, getColumnWidth as r
|
|
|
21
21
|
import { GridCell as Zt } from "./cells/GridCell.mjs";
|
|
22
22
|
import { GridGroupCell as $e } from "./cells/GridGroupCell.mjs";
|
|
23
23
|
import { GridRow as pt } from "./rows/GridRow.mjs";
|
|
24
|
-
import { GridHeaderSelectionCell as
|
|
24
|
+
import { GridHeaderSelectionCell as ea } from "./header/GridHeaderSelectionCell.mjs";
|
|
25
25
|
import { GridNoRecords as je } from "./components/noRecords/GridNoRecords.mjs";
|
|
26
26
|
import { operators as Ue } from "./filterCommon.mjs";
|
|
27
|
-
import { FooterRow as
|
|
28
|
-
import { normalize as
|
|
29
|
-
import { packageMetadata as
|
|
30
|
-
import { GridDetailCell as
|
|
31
|
-
import { GridDetailHierarchyCell as
|
|
27
|
+
import { FooterRow as ta } from "./footer/FooterRow.mjs";
|
|
28
|
+
import { normalize as aa } from "./paging/GridPagerSettings.mjs";
|
|
29
|
+
import { packageMetadata as la } from "./package-metadata.mjs";
|
|
30
|
+
import { GridDetailCell as ra } from "./cells/GridDetailCell.mjs";
|
|
31
|
+
import { GridDetailHierarchyCell as na } from "./cells/GridDetailHierarchyCell.mjs";
|
|
32
32
|
import { GridNoRecordsContainer as qe } from "./components/noRecords/GridNoRecordsContainer.mjs";
|
|
33
33
|
import { GridClientWrapper as Je } from "./GridClientWrapper.mjs";
|
|
34
|
-
import { GridColGroup as
|
|
35
|
-
import { GridTable as
|
|
34
|
+
import { GridColGroup as ia } from "./components/colGroup/GridColGroup.mjs";
|
|
35
|
+
import { GridTable as oa } from "./components/table/GridTable.mjs";
|
|
36
36
|
import { GridDropClue as Qe } from "./components/GridDropClue.mjs";
|
|
37
37
|
import { GridDragClue as Xe } from "./components/GridDragClue.mjs";
|
|
38
38
|
import { GridTableBody as Ye } from "./components/table/GridTableBody.mjs";
|
|
39
|
-
import { PagerContainer as
|
|
40
|
-
import { GridTableScrollable as
|
|
39
|
+
import { PagerContainer as da } from "./components/PagerContainer.mjs";
|
|
40
|
+
import { GridTableScrollable as ca } from "./components/table/GridTableScrollable.mjs";
|
|
41
41
|
import { GridElementContainer as Ze } from "./components/GridElementContainer.mjs";
|
|
42
|
-
import { GridContainerElementContainer as
|
|
43
|
-
import { VirtualScrollHeightContainer as
|
|
44
|
-
import { gridAriaLabel as pe, messages as
|
|
45
|
-
import { VirtualScrollFixed as
|
|
46
|
-
import { VirtualScroll as
|
|
47
|
-
import { GridCustomCellClientContainer as
|
|
48
|
-
import { GridReorderableRowsContainer as
|
|
49
|
-
import { GridRowReorderCell as
|
|
50
|
-
import { GridHeaderRowReorderCell as
|
|
42
|
+
import { GridContainerElementContainer as sa } from "./components/GridContainerElementContainer.mjs";
|
|
43
|
+
import { VirtualScrollHeightContainer as ma } from "./components/VirtualScrollHeightContainer.mjs";
|
|
44
|
+
import { gridAriaLabel as pe, messages as ua } from "./messages/index.mjs";
|
|
45
|
+
import { VirtualScrollFixed as q } from "./VirtualScrollFixed.mjs";
|
|
46
|
+
import { VirtualScroll as fa } from "./VirtualScroll.mjs";
|
|
47
|
+
import { GridCustomCellClientContainer as ga } from "./components/GridCustomCellClientContainer.mjs";
|
|
48
|
+
import { GridReorderableRowsContainer as ba } from "./components/GridDraggableRowsContainer.mjs";
|
|
49
|
+
import { GridRowReorderCell as ha } from "./cells/GridRowReorderCell.mjs";
|
|
50
|
+
import { GridHeaderRowReorderCell as ya } from "./header/client/GridHeaderRowReorderCell.mjs";
|
|
51
51
|
import { GridLoader as et } from "./components/GridLoader.mjs";
|
|
52
|
-
import { gridPremiumFeatures as
|
|
53
|
-
import { LocalizationService as
|
|
54
|
-
const
|
|
55
|
-
var Ge, ke, Ne, Fe, De, Te,
|
|
52
|
+
import { gridPremiumFeatures as Ca } from "./utils/premium.mjs";
|
|
53
|
+
import { LocalizationService as wa, IntlService as Ea } from "@progress/kendo-react-intl";
|
|
54
|
+
const Sa = a.forwardRef((e, ie) => {
|
|
55
|
+
var Ge, ke, Ne, Fe, De, Te, Ae, Pe;
|
|
56
56
|
const x = e.id + "-role-element-id", G = e.navigatable ? x : "";
|
|
57
57
|
let E = e.columnsState || [];
|
|
58
|
-
const tt = (t, n, d, i, o, s,
|
|
58
|
+
const tt = (t, n, d, i, o, s, l) => {
|
|
59
59
|
const c = [], g = $t(
|
|
60
60
|
c,
|
|
61
61
|
C,
|
|
@@ -66,15 +66,15 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
66
66
|
o,
|
|
67
67
|
s,
|
|
68
68
|
ft.defaultExpand,
|
|
69
|
-
|
|
69
|
+
l
|
|
70
70
|
);
|
|
71
71
|
return { flattedData: c, resolvedGroupsCount: g };
|
|
72
|
-
},
|
|
72
|
+
}, at = (t) => {
|
|
73
73
|
const n = t.filter(
|
|
74
74
|
(d) => d && d.type && d.type.displayName === "KendoReactGridColumn"
|
|
75
75
|
);
|
|
76
76
|
return Yt(n, E, { prevId: 0, idPrefix: G });
|
|
77
|
-
},
|
|
77
|
+
}, lt = () => {
|
|
78
78
|
const t = [], n = (d, i) => d == null ? void 0 : d.forEach((o) => {
|
|
79
79
|
const s = o.hidden || i;
|
|
80
80
|
t.push({
|
|
@@ -84,14 +84,14 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
84
84
|
});
|
|
85
85
|
return n(E, !1), t;
|
|
86
86
|
}, rt = (t) => {
|
|
87
|
-
const n =
|
|
87
|
+
const n = lt();
|
|
88
88
|
return t.filter((d) => {
|
|
89
89
|
var i;
|
|
90
90
|
return !d.hidden && !((i = n.find((o) => o.id === d.id)) != null && i.hidden);
|
|
91
91
|
});
|
|
92
92
|
}, nt = (t, n) => {
|
|
93
93
|
var d;
|
|
94
|
-
m =
|
|
94
|
+
m = at(t), m.filter((i) => !i.hidden).length === 0 && (m = jt(
|
|
95
95
|
C,
|
|
96
96
|
e.group,
|
|
97
97
|
{
|
|
@@ -105,16 +105,16 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
105
105
|
}, it = (t, n) => {
|
|
106
106
|
const d = (i) => {
|
|
107
107
|
var s;
|
|
108
|
-
const o = n.find((
|
|
108
|
+
const o = n.find((l) => l.id === i.id);
|
|
109
109
|
return o ? (o.children = (s = i.children) == null ? void 0 : s.map(d), o) : ne(i);
|
|
110
110
|
};
|
|
111
111
|
E = t.filter((i) => i.parentIndex === -1).map(d);
|
|
112
112
|
}, ot = (t, n) => {
|
|
113
113
|
var s;
|
|
114
|
-
t.filter((
|
|
115
|
-
|
|
116
|
-
}), F !== void 0 && t.filter((
|
|
117
|
-
|
|
114
|
+
t.filter((l) => e.selectedField && l.field === e.selectedField || l.columnType === "checkbox").forEach((l) => {
|
|
115
|
+
l.width = l.width || "50px", l.cell = l.cell || Kt, l._type = "edit", l.headerCell = l.headerCell || ea;
|
|
116
|
+
}), F !== void 0 && t.filter((l) => l.columnType === "reorder").forEach((l) => {
|
|
117
|
+
l.width = l.width || "50px", l.cell = l.cell || ha, l.headerCell = l.headerCell || ya, l.sortable = !1, l.filterable = !1, l.editable = !1;
|
|
118
118
|
});
|
|
119
119
|
const d = Jt(E);
|
|
120
120
|
it(t, d);
|
|
@@ -140,7 +140,7 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
140
140
|
};
|
|
141
141
|
let o = 0;
|
|
142
142
|
if ((e.expandField || B.enabled) && e.detail) {
|
|
143
|
-
const
|
|
143
|
+
const l = {
|
|
144
144
|
...i,
|
|
145
145
|
_type: "expand",
|
|
146
146
|
id: O.generateNavigatableId(`${o++}`, "expand", "column"),
|
|
@@ -148,9 +148,9 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
148
148
|
field: (s = B.column) != null ? s : e.expandField,
|
|
149
149
|
headerClassName: f(u.hierarchyCell({}))
|
|
150
150
|
};
|
|
151
|
-
t.unshift(
|
|
151
|
+
t.unshift(l), E.unshift(d.find((c) => c.id === l.id) || ne(l));
|
|
152
152
|
}
|
|
153
|
-
for (let
|
|
153
|
+
for (let l = 0; l < n; l++) {
|
|
154
154
|
const c = {
|
|
155
155
|
...i,
|
|
156
156
|
isAccessible: !1,
|
|
@@ -161,21 +161,24 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
161
161
|
};
|
|
162
162
|
t.unshift(c), E.unshift(d.find((g) => g.id === c.id) || ne(c));
|
|
163
163
|
}
|
|
164
|
-
t.slice(o).forEach((
|
|
165
|
-
|
|
164
|
+
t.slice(o).forEach((l) => {
|
|
165
|
+
l.parentIndex >= 0 && (l.parentIndex += o), l.rowSpannable = l.rowSpannable !== void 0 ? Oe(l.rowSpannable) : ce;
|
|
166
166
|
});
|
|
167
|
-
},
|
|
168
|
-
|
|
169
|
-
return
|
|
167
|
+
}, z = () => {
|
|
168
|
+
var t;
|
|
169
|
+
return Array.isArray(e.data) ? C.length === e.total : C ? e.total === ((t = e.data) == null ? void 0 : t.total) : !1;
|
|
170
|
+
}, dt = () => {
|
|
171
|
+
const { rowHeight: t, detailRowHeight: n, detail: d, expandField: i } = e, o = z(), s = t !== void 0 && t > 0, l = n !== void 0 && n > 0;
|
|
172
|
+
return !s || K && !o || !!(d && i) && (!l || !o) ? fa : q;
|
|
170
173
|
}, J = () => e.isClient ? m : oe, ct = (t, n, d, i, o, s) => {
|
|
171
|
-
let
|
|
174
|
+
let l = We(t, n);
|
|
172
175
|
if (e.columnVirtualization && t.colSpan === 1)
|
|
173
176
|
return { colSpan: s, colsToSkip: o };
|
|
174
177
|
let c = d.length - 1 === i, g = d.length - i;
|
|
175
|
-
return e.columnVirtualization && (c = h.length - 1 === i, g = h.length - i),
|
|
178
|
+
return e.columnVirtualization && (c = h.length - 1 === i, g = h.length - i), l > 1 && !c ? o = l - 1 : l = 1, g <= l && !c && (l = g), { colSpan: l, colsToSkip: o };
|
|
176
179
|
};
|
|
177
|
-
let Q, b = [],
|
|
178
|
-
const st = e.scrollLeftRef || { current: 0 },
|
|
180
|
+
let Q, b = [], M, m = [], oe = [], k = [[]];
|
|
181
|
+
const st = e.scrollLeftRef || { current: 0 }, W = e.localization || new wa(e.language), mt = e.intl || new Ea((Ge = e.locale) != null ? Ge : "en"), N = e.unstyled, u = N && N.uGrid ? N.uGrid : xt, F = Wt(e.rowReorderable), D = e.autoProcessData === !0 ? {
|
|
179
182
|
group: !0,
|
|
180
183
|
sort: !0,
|
|
181
184
|
filter: !0,
|
|
@@ -196,9 +199,9 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
196
199
|
skip: e.skip
|
|
197
200
|
} : {}
|
|
198
201
|
});
|
|
199
|
-
C = t, R = (
|
|
202
|
+
C = t, R = (Ae = e.total) != null ? Ae : n;
|
|
200
203
|
}
|
|
201
|
-
const { size: S = "medium" } = e, ut = typeof e.groupable == "object" && e.groupable.footer || "none", T = e.scrollable === "virtual",
|
|
204
|
+
const { size: S = "medium" } = e, ut = typeof e.groupable == "object" && e.groupable.footer || "none", T = e.scrollable === "virtual", K = e.groupable === !0 || typeof e.groupable == "object" && e.groupable.enabled !== !1, B = Ft(!!e.detail), ft = Dt(
|
|
202
205
|
typeof e.groupable == "object" && e.groupable.enabled !== !1 ? e.groupable.expandable : e.groupable
|
|
203
206
|
), { resolvedGroupsCount: gt, flattedData: bt } = tt(
|
|
204
207
|
ut,
|
|
@@ -211,34 +214,34 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
211
214
|
);
|
|
212
215
|
b = bt;
|
|
213
216
|
const X = dt();
|
|
214
|
-
X ===
|
|
217
|
+
X === q && z() && (M = b.slice(
|
|
215
218
|
e.skip || 0,
|
|
216
219
|
(e.skip || 0) + ((e.take !== void 0 ? e.take : e.pageSize) || 0)
|
|
217
220
|
));
|
|
218
|
-
const de = Tt(e.selectable || !!e.selectedField), ce = Oe(e.rowSpannable), ht = de && de.drag ? "none" : void 0,
|
|
219
|
-
nt(
|
|
220
|
-
const Y =
|
|
221
|
-
const t =
|
|
221
|
+
const de = Tt(e.selectable || !!e.selectedField), ce = Oe(e.rowSpannable), ht = de && de.drag ? "none" : void 0, $ = a.useMemo(() => a.Children.toArray(e.children), [e.children]);
|
|
222
|
+
nt($, gt);
|
|
223
|
+
const Y = a.useMemo(() => {
|
|
224
|
+
const t = Ca(e, m);
|
|
222
225
|
return {
|
|
223
226
|
premium: t.length > 0,
|
|
224
227
|
features: t
|
|
225
228
|
};
|
|
226
|
-
}, [e, m]), se =
|
|
229
|
+
}, [e, m]), se = a.useMemo(() => Y.premium ? !Gt(la, { component: "Grid", features: Y.features }) : !1, [Y.premium]), me = $.map((t) => t && t.type && t.type.displayName === "KendoReactGridToolbar" ? a.cloneElement(t, { ...t.props, ariaControls: x }) : null), j = $.filter((t) => t && t.type && t.type.displayName === "KendoReactGridNoRecords"), ue = $.filter(
|
|
227
230
|
(t) => t && t.type && t.type.displayName === "KendoReactGridStatusBar"
|
|
228
|
-
), h = m.filter((t) => t.children.length === 0), fe =
|
|
231
|
+
), h = m.filter((t) => t.children.length === 0), fe = K && /* @__PURE__ */ a.createElement(zt, { columns: J(), group: e.group || [], ariaControls: x }), ge = /* @__PURE__ */ a.createElement(
|
|
229
232
|
Lt,
|
|
230
233
|
{
|
|
231
234
|
size: S,
|
|
232
235
|
staticHeaders: e.scrollable !== "none",
|
|
233
|
-
draggable: e.reorderable ||
|
|
234
|
-
headerRow: /* @__PURE__ */
|
|
236
|
+
draggable: e.reorderable || K,
|
|
237
|
+
headerRow: /* @__PURE__ */ a.createElement(
|
|
235
238
|
_t,
|
|
236
239
|
{
|
|
237
240
|
cells: e.cells,
|
|
238
241
|
sort: e.sort,
|
|
239
242
|
sortable: e.sortable,
|
|
240
243
|
group: e.group || [],
|
|
241
|
-
groupable:
|
|
244
|
+
groupable: K,
|
|
242
245
|
filter: e.filter,
|
|
243
246
|
filterable: e.filterable,
|
|
244
247
|
filterOperators: e.filterOperators || Ue,
|
|
@@ -248,14 +251,14 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
248
251
|
columnsMap: k,
|
|
249
252
|
cellRender: e.headerCellRender,
|
|
250
253
|
navigatable: !!e.navigatable,
|
|
251
|
-
localization:
|
|
254
|
+
localization: W,
|
|
252
255
|
unstyled: N,
|
|
253
256
|
headerSelectionValue: !!(e.select && b.filter((t) => t.rowType === "data").every(
|
|
254
|
-
(t) => e.select && e.dataItemKey &&
|
|
257
|
+
(t) => e.select && e.dataItemKey && H(e.dataItemKey)(t.dataItem) !== void 0 ? e.select[H(e.dataItemKey)(t.dataItem)] : void 0
|
|
255
258
|
))
|
|
256
259
|
}
|
|
257
260
|
),
|
|
258
|
-
filterRow: e.filterable && /* @__PURE__ */
|
|
261
|
+
filterRow: e.filterable && /* @__PURE__ */ a.createElement(
|
|
259
262
|
Ot,
|
|
260
263
|
{
|
|
261
264
|
cells: e.cells,
|
|
@@ -267,33 +270,33 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
267
270
|
cellRender: e.filterCellRender,
|
|
268
271
|
navigatable: !!e.navigatable,
|
|
269
272
|
ariaRowIndex: k.length + 1,
|
|
270
|
-
localization:
|
|
273
|
+
localization: W
|
|
271
274
|
}
|
|
272
275
|
) || void 0,
|
|
273
|
-
cols: h.map((t, n) => /* @__PURE__ */
|
|
276
|
+
cols: h.map((t, n) => /* @__PURE__ */ a.createElement("col", { key: n.toString(), width: re(t) }))
|
|
274
277
|
}
|
|
275
278
|
), yt = st.current || 0, Ct = parseFloat(((e.style || {}).width || "").toString()), wt = (t, n, d, i, o) => {
|
|
276
279
|
let s = !1;
|
|
277
|
-
const
|
|
280
|
+
const l = e.selectedField ? Me(e.selectedField, t.dataItem) : e.select && e.dataItemKey && H(e.dataItemKey)(t.dataItem) !== void 0 ? e.select[H(e.dataItemKey)(t.dataItem)] : void 0;
|
|
278
281
|
let c = 0;
|
|
279
|
-
const { colSpans: g, hiddenColumns:
|
|
282
|
+
const { colSpans: g, hiddenColumns: A } = Ht({
|
|
280
283
|
enabled: e.columnVirtualization,
|
|
281
284
|
columns: h,
|
|
282
285
|
tableViewPortWidth: Ct,
|
|
283
286
|
scrollLeft: yt,
|
|
284
287
|
getColSpan: We,
|
|
285
288
|
dataItem: t.dataItem
|
|
286
|
-
}), I = h.filter((r, y) => !
|
|
289
|
+
}), I = h.filter((r, y) => !A[y]);
|
|
287
290
|
return {
|
|
288
291
|
row: h.map((r, y) => {
|
|
289
|
-
var
|
|
290
|
-
if (
|
|
292
|
+
var He, Ke, Be, Ve;
|
|
293
|
+
if (A[y])
|
|
291
294
|
return null;
|
|
292
295
|
if (c > 0)
|
|
293
296
|
return c--, null;
|
|
294
297
|
let w;
|
|
295
|
-
if ((
|
|
296
|
-
const v = r.field ? (Be = (
|
|
298
|
+
if ((He = r.rowSpannable) != null && He.enabled && t.rowType === "data" && r.field && o) {
|
|
299
|
+
const v = r.field ? (Be = (Ke = r.rowSpannable).valueGetter) == null ? void 0 : Be.call(Ke, t.dataItem, r.field) : null;
|
|
297
300
|
w = { value: v, count: 1 }, o[r.field] && ((Ve = o[r.field]) == null ? void 0 : Ve.value) === v && o[r.field] !== null ? (o[r.field].count++, w.count = null) : o[r.field] = w;
|
|
298
301
|
}
|
|
299
302
|
const { colSpan: L, colsToSkip: ee } = ct(
|
|
@@ -308,10 +311,10 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
308
311
|
const _ = r.id ? r.id : y, It = f(u.contentSticky({ locked: r.locked }), r.className), vt = r.left !== void 0 ? { left: r.left, right: r.right } : {};
|
|
309
312
|
let te = !1;
|
|
310
313
|
if (r.editable && (e.editable || e.editField)) {
|
|
311
|
-
const v = e.editField ? Me(e.editField, t.dataItem) : e.edit && e.dataItemKey ? e.edit[
|
|
312
|
-
|
|
314
|
+
const v = e.editField ? Me(e.editField, t.dataItem) : e.edit && e.dataItemKey ? e.edit[H(e.dataItemKey)(t.dataItem)] : void 0, le = typeof v == "boolean" ? v : Array.isArray(v) ? v.indexOf(r.field) > -1 : r.field !== void 0 && v === r.field;
|
|
315
|
+
le && r.columnType === "data" && (le === !0 || le === r.field) && (s = !0, te = !0);
|
|
313
316
|
}
|
|
314
|
-
const
|
|
317
|
+
const ae = r.cell || te && Vt || Zt, Rt = e.expandField && e.detail && r.field === e.expandField || r._type === "expand", P = {
|
|
315
318
|
locked: e.lockGroups,
|
|
316
319
|
id: O.generateNavigatableId(
|
|
317
320
|
`${n}-${String(y)}`,
|
|
@@ -338,31 +341,31 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
338
341
|
columnPosition: vt,
|
|
339
342
|
style: {},
|
|
340
343
|
ariaColumnIndex: r.ariaColumnIndex,
|
|
341
|
-
isSelected: (r == null ? void 0 : r._type) === "edit" ?
|
|
344
|
+
isSelected: (r == null ? void 0 : r._type) === "edit" ? l : Array.isArray(l) && l.indexOf(y) > -1,
|
|
342
345
|
isSorted: !!ze(r.field, e.sort),
|
|
343
346
|
isInEdit: te,
|
|
344
347
|
isAlt: i,
|
|
345
348
|
unstyled: N,
|
|
346
349
|
group: t.group,
|
|
347
|
-
localization:
|
|
350
|
+
localization: W,
|
|
348
351
|
intl: mt,
|
|
349
352
|
_rowSpan: w
|
|
350
353
|
};
|
|
351
|
-
return r.cell ? /* @__PURE__ */
|
|
352
|
-
|
|
354
|
+
return r.cell ? /* @__PURE__ */ a.createElement(
|
|
355
|
+
ga,
|
|
353
356
|
{
|
|
354
357
|
key: _,
|
|
355
|
-
isClient: Xt(
|
|
356
|
-
dataItem:
|
|
357
|
-
rowDataIndex:
|
|
358
|
-
columnIndex:
|
|
359
|
-
columnPosition:
|
|
358
|
+
isClient: Xt(ae),
|
|
359
|
+
dataItem: P.dataItem,
|
|
360
|
+
rowDataIndex: P.rowDataIndex,
|
|
361
|
+
columnIndex: P.columnIndex,
|
|
362
|
+
columnPosition: P.columnPosition
|
|
360
363
|
},
|
|
361
|
-
/* @__PURE__ */
|
|
362
|
-
) : /* @__PURE__ */
|
|
364
|
+
/* @__PURE__ */ a.createElement(ae, { ...P })
|
|
365
|
+
) : /* @__PURE__ */ a.createElement(ae, { key: _, ...P });
|
|
363
366
|
}),
|
|
364
367
|
isInEdit: s,
|
|
365
|
-
isSelected: typeof
|
|
368
|
+
isSelected: typeof l == "boolean" && l
|
|
366
369
|
};
|
|
367
370
|
};
|
|
368
371
|
let be = 0;
|
|
@@ -381,11 +384,11 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
381
384
|
if (b.length) {
|
|
382
385
|
let t = -1, n = 0;
|
|
383
386
|
const d = ce.enabled ? {} : void 0;
|
|
384
|
-
(
|
|
387
|
+
(M || b).forEach((i, o) => {
|
|
385
388
|
i.rowType === "data" && (ye++, t++);
|
|
386
|
-
const s = ye % 2 === 0,
|
|
389
|
+
const s = ye % 2 === 0, l = e.dataItemKey && H(e.dataItemKey)(i.dataItem), c = o + (e.skip || 0), g = l || "ai" + c, A = g + "_1", I = wt(i, g, t, s, d);
|
|
387
390
|
if (V = c + we + n, Z.push(
|
|
388
|
-
/* @__PURE__ */
|
|
391
|
+
/* @__PURE__ */ a.createElement(
|
|
389
392
|
pt,
|
|
390
393
|
{
|
|
391
394
|
key: g,
|
|
@@ -411,10 +414,10 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
411
414
|
), e.detail && i.rowType === "data" && i.expanded) {
|
|
412
415
|
const r = h.length - (e.expandField || B.enabled ? 1 : 0) - (e.group ? e.group.length : 0) || 1;
|
|
413
416
|
n++, V = c + we + n, Z.push(
|
|
414
|
-
/* @__PURE__ */
|
|
417
|
+
/* @__PURE__ */ a.createElement(
|
|
415
418
|
"tr",
|
|
416
419
|
{
|
|
417
|
-
key:
|
|
420
|
+
key: A,
|
|
418
421
|
className: f(u.detailTr({ isAlt: s })),
|
|
419
422
|
style: {
|
|
420
423
|
visibility: he(o) ? "hidden" : "",
|
|
@@ -426,7 +429,7 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
426
429
|
e.group && e.group.map((y, w) => {
|
|
427
430
|
var _;
|
|
428
431
|
const L = (_ = I == null ? void 0 : I.row[w]) == null ? void 0 : _.props.style, ee = L ? { left: L.left, right: L.right } : {};
|
|
429
|
-
return /* @__PURE__ */
|
|
432
|
+
return /* @__PURE__ */ a.createElement(
|
|
430
433
|
$e,
|
|
431
434
|
{
|
|
432
435
|
id: "",
|
|
@@ -444,22 +447,22 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
444
447
|
}
|
|
445
448
|
);
|
|
446
449
|
}),
|
|
447
|
-
(e.expandField || B.enabled) && /* @__PURE__ */
|
|
448
|
-
|
|
450
|
+
(e.expandField || B.enabled) && /* @__PURE__ */ a.createElement(
|
|
451
|
+
na,
|
|
449
452
|
{
|
|
450
453
|
unstyled: N,
|
|
451
|
-
id: O.generateNavigatableId(`${
|
|
454
|
+
id: O.generateNavigatableId(`${A}-dhcell`, G)
|
|
452
455
|
}
|
|
453
456
|
),
|
|
454
|
-
/* @__PURE__ */
|
|
455
|
-
|
|
457
|
+
/* @__PURE__ */ a.createElement(
|
|
458
|
+
ra,
|
|
456
459
|
{
|
|
457
460
|
dataItem: i.dataItem,
|
|
458
461
|
dataIndex: i.dataIndex,
|
|
459
462
|
colSpan: r,
|
|
460
463
|
ariaColIndex: 2 + (e.group ? e.group.length : 0),
|
|
461
464
|
detail: e.detail,
|
|
462
|
-
id: O.generateNavigatableId(`${
|
|
465
|
+
id: O.generateNavigatableId(`${A}-dcell`, G)
|
|
463
466
|
}
|
|
464
467
|
)
|
|
465
468
|
)
|
|
@@ -472,17 +475,17 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
472
475
|
total: R,
|
|
473
476
|
skip: e.skip || 0,
|
|
474
477
|
take: (e.take !== void 0 ? e.take : e.pageSize) || 10,
|
|
475
|
-
...
|
|
476
|
-
}, Se = /* @__PURE__ */
|
|
478
|
+
...aa(e.pageable || {})
|
|
479
|
+
}, Se = /* @__PURE__ */ a.createElement(da, null, e.pager ? /* @__PURE__ */ a.createElement(e.pager, { ...Ee }) : /* @__PURE__ */ a.createElement(At, { className: f(u.pager({})), ...Ee })), Et = (t, n) => /* @__PURE__ */ a.createElement("col", { key: n.toString(), width: re(t) }), St = (Pe = e.cells) != null && Pe.footerCell || m.some((t) => {
|
|
477
480
|
var n;
|
|
478
481
|
return !!(t.footerCell || (n = t.cells) != null && n.footerCell);
|
|
479
|
-
}) ? /* @__PURE__ */
|
|
482
|
+
}) ? /* @__PURE__ */ a.createElement(
|
|
480
483
|
Mt,
|
|
481
484
|
{
|
|
482
485
|
size: S,
|
|
483
486
|
staticHeaders: e.scrollable !== "none",
|
|
484
|
-
row: /* @__PURE__ */
|
|
485
|
-
|
|
487
|
+
row: /* @__PURE__ */ a.createElement(
|
|
488
|
+
ta,
|
|
486
489
|
{
|
|
487
490
|
cells: e.cells,
|
|
488
491
|
idPrefix: G,
|
|
@@ -492,25 +495,25 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
492
495
|
),
|
|
493
496
|
cols: h.map(Et)
|
|
494
497
|
}
|
|
495
|
-
) : null, Ie = /* @__PURE__ */
|
|
498
|
+
) : null, Ie = /* @__PURE__ */ a.createElement(ia, null, h.map((t, n) => /* @__PURE__ */ a.createElement(
|
|
496
499
|
"col",
|
|
497
500
|
{
|
|
498
501
|
key: n.toString(),
|
|
499
502
|
className: ze(t.field, e.sort) ? f(u.sorted({})) : void 0,
|
|
500
503
|
width: re(t)
|
|
501
504
|
}
|
|
502
|
-
))), ve = e.reorderable ||
|
|
505
|
+
))), ve = e.reorderable || K, { detail: Ia, cells: va, rows: Ra, ...Re } = e, xe = /* @__PURE__ */ a.createElement(
|
|
503
506
|
"tbody",
|
|
504
507
|
{
|
|
505
508
|
role: "rowgroup",
|
|
506
509
|
className: f(u.tbody({})),
|
|
507
|
-
...
|
|
510
|
+
...Pt
|
|
508
511
|
},
|
|
509
512
|
Z
|
|
510
513
|
);
|
|
511
514
|
let p = xe;
|
|
512
|
-
if (F && (p = /* @__PURE__ */
|
|
513
|
-
|
|
515
|
+
if (F && (p = /* @__PURE__ */ a.createElement(
|
|
516
|
+
ba,
|
|
514
517
|
{
|
|
515
518
|
unstyled: u,
|
|
516
519
|
columns: m,
|
|
@@ -518,7 +521,7 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
518
521
|
},
|
|
519
522
|
xe
|
|
520
523
|
)), e.scrollable === "none")
|
|
521
|
-
return /* @__PURE__ */
|
|
524
|
+
return /* @__PURE__ */ a.createElement(
|
|
522
525
|
Je,
|
|
523
526
|
{
|
|
524
527
|
gridRef: ie,
|
|
@@ -527,14 +530,14 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
527
530
|
columnsMapRef: k,
|
|
528
531
|
columnsState: E,
|
|
529
532
|
dataRef: b,
|
|
530
|
-
slicedData:
|
|
531
|
-
isFixedVirtualScroll: X ===
|
|
533
|
+
slicedData: M,
|
|
534
|
+
isFixedVirtualScroll: X === q,
|
|
532
535
|
id: x,
|
|
533
536
|
total: R,
|
|
534
|
-
isAllData:
|
|
537
|
+
isAllData: z(),
|
|
535
538
|
detailExpandable: !!e.detail
|
|
536
539
|
},
|
|
537
|
-
/* @__PURE__ */
|
|
540
|
+
/* @__PURE__ */ a.createElement(Ze, null, /* @__PURE__ */ a.createElement(
|
|
538
541
|
"div",
|
|
539
542
|
{
|
|
540
543
|
id: e.id,
|
|
@@ -545,26 +548,26 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
545
548
|
},
|
|
546
549
|
me,
|
|
547
550
|
fe,
|
|
548
|
-
/* @__PURE__ */
|
|
549
|
-
|
|
551
|
+
/* @__PURE__ */ a.createElement(
|
|
552
|
+
oa,
|
|
550
553
|
{
|
|
551
554
|
selectable: e.selectable,
|
|
552
555
|
className: f(u.table({ size: S }))
|
|
553
556
|
},
|
|
554
557
|
Ie,
|
|
555
558
|
ge,
|
|
556
|
-
/* @__PURE__ */
|
|
559
|
+
/* @__PURE__ */ a.createElement(Ye, { rowReorderable: F }, p)
|
|
557
560
|
),
|
|
558
|
-
Ce && /* @__PURE__ */
|
|
559
|
-
ve && /* @__PURE__ */
|
|
561
|
+
Ce && /* @__PURE__ */ a.createElement(qe, null, j.length ? j : /* @__PURE__ */ a.createElement(je, null)),
|
|
562
|
+
ve && /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(Qe, null), /* @__PURE__ */ a.createElement(Xe, null))
|
|
560
563
|
)),
|
|
561
564
|
ue,
|
|
562
565
|
e.pageable && Se,
|
|
563
|
-
/* @__PURE__ */
|
|
564
|
-
se && /* @__PURE__ */
|
|
566
|
+
/* @__PURE__ */ a.createElement(et, { loader: e.loader, showLoader: e.showLoader }),
|
|
567
|
+
se && /* @__PURE__ */ a.createElement(Le, null)
|
|
565
568
|
);
|
|
566
|
-
let
|
|
567
|
-
return T && (
|
|
569
|
+
let U = e.style || {};
|
|
570
|
+
return T && (U.height || (U = Object.assign({}, U, { height: "450px" }))), /* @__PURE__ */ a.createElement(
|
|
568
571
|
Je,
|
|
569
572
|
{
|
|
570
573
|
gridRef: ie,
|
|
@@ -573,17 +576,18 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
573
576
|
columnsMapRef: k,
|
|
574
577
|
columnsState: E,
|
|
575
578
|
dataRef: b,
|
|
576
|
-
slicedData:
|
|
577
|
-
isFixedVirtualScroll: X ===
|
|
579
|
+
slicedData: M,
|
|
580
|
+
isFixedVirtualScroll: X === q,
|
|
578
581
|
id: x,
|
|
579
582
|
total: R,
|
|
583
|
+
isAllData: z(),
|
|
580
584
|
detailExpandable: !!e.detail
|
|
581
585
|
},
|
|
582
|
-
/* @__PURE__ */
|
|
586
|
+
/* @__PURE__ */ a.createElement(Ze, null, /* @__PURE__ */ a.createElement(
|
|
583
587
|
"div",
|
|
584
588
|
{
|
|
585
589
|
id: e.id,
|
|
586
|
-
style:
|
|
590
|
+
style: U,
|
|
587
591
|
className: f(
|
|
588
592
|
u.wrapper({
|
|
589
593
|
size: S,
|
|
@@ -596,7 +600,7 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
596
600
|
},
|
|
597
601
|
me,
|
|
598
602
|
fe,
|
|
599
|
-
/* @__PURE__ */
|
|
603
|
+
/* @__PURE__ */ a.createElement(
|
|
600
604
|
"div",
|
|
601
605
|
{
|
|
602
606
|
className: f(u.ariaRoot({})),
|
|
@@ -604,11 +608,11 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
604
608
|
"aria-colcount": h.length,
|
|
605
609
|
"aria-rowcount": R,
|
|
606
610
|
id: x,
|
|
607
|
-
"aria-label":
|
|
611
|
+
"aria-label": W.toLanguageString(pe, ua[pe])
|
|
608
612
|
},
|
|
609
613
|
ge,
|
|
610
|
-
/* @__PURE__ */
|
|
611
|
-
|
|
614
|
+
/* @__PURE__ */ a.createElement("div", { className: f(u.container({})), role: "presentation" }, /* @__PURE__ */ a.createElement(sa, null, /* @__PURE__ */ a.createElement("div", { className: f(u.content({})), role: "presentation" }, /* @__PURE__ */ a.createElement("div", { className: f(u.tableWrap({})), role: "presentation" }, /* @__PURE__ */ a.createElement(
|
|
615
|
+
ca,
|
|
612
616
|
{
|
|
613
617
|
selectable: e.selectable,
|
|
614
618
|
tableClassName: f(
|
|
@@ -619,26 +623,26 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
619
623
|
tableStyle: { userSelect: ht }
|
|
620
624
|
},
|
|
621
625
|
Ie,
|
|
622
|
-
/* @__PURE__ */
|
|
623
|
-
), Ce && /* @__PURE__ */
|
|
626
|
+
/* @__PURE__ */ a.createElement(Ye, { rowReorderable: F }, p)
|
|
627
|
+
), Ce && /* @__PURE__ */ a.createElement(qe, null, j.length ? j : /* @__PURE__ */ a.createElement(je, null))), T && /* @__PURE__ */ a.createElement(
|
|
624
628
|
"div",
|
|
625
629
|
{
|
|
626
630
|
className: f(u.heightContainer({})),
|
|
627
631
|
role: "presentation"
|
|
628
632
|
},
|
|
629
|
-
/* @__PURE__ */
|
|
633
|
+
/* @__PURE__ */ a.createElement(ma, { isVirtualScroll: T })
|
|
630
634
|
)))),
|
|
631
635
|
St,
|
|
632
|
-
ve && /* @__PURE__ */
|
|
633
|
-
se && /* @__PURE__ */
|
|
636
|
+
ve && /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(Qe, null), /* @__PURE__ */ a.createElement(Xe, null)),
|
|
637
|
+
se && /* @__PURE__ */ a.createElement(Le, null)
|
|
634
638
|
),
|
|
635
639
|
ue,
|
|
636
640
|
e.pageable && Se,
|
|
637
|
-
/* @__PURE__ */
|
|
641
|
+
/* @__PURE__ */ a.createElement(et, { loader: e.loader, showLoader: e.showLoader })
|
|
638
642
|
))
|
|
639
643
|
);
|
|
640
644
|
});
|
|
641
|
-
|
|
645
|
+
Sa.displayName = "KendoReactGridComponent";
|
|
642
646
|
export {
|
|
643
|
-
|
|
647
|
+
Sa as GridComponent
|
|
644
648
|
};
|