@progress/kendo-react-grid 9.5.0 → 10.0.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/GridClientWrapper.js +1 -1
- package/GridClientWrapper.mjs +1 -1
- package/GridComponent.js +1 -1
- package/GridComponent.mjs +229 -225
- package/StatusBar.js +1 -1
- package/StatusBar.mjs +29 -28
- package/columnMenu/GridColumnMenuSort.js +1 -1
- package/columnMenu/GridColumnMenuSort.mjs +13 -13
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +13 -13
- package/sortCommon.js +1 -1
- package/sortCommon.mjs +1 -1
- package/utils/premium.js +8 -0
- package/utils/premium.mjs +63 -0
- package/GridWatermarkOverlay.js +0 -9
- package/GridWatermarkOverlay.mjs +0 -15
package/GridComponent.mjs
CHANGED
|
@@ -6,58 +6,56 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as l from "react";
|
|
9
|
-
import {
|
|
10
|
-
import { process as
|
|
11
|
-
import { combineFilters as
|
|
12
|
-
import { GridSelectionCell as
|
|
13
|
-
import { GridHierarchyCell as
|
|
14
|
-
import { GridEditCell as
|
|
15
|
-
import { Header as
|
|
16
|
-
import { HeaderRow as
|
|
17
|
-
import { FilterRow as
|
|
18
|
-
import { GroupPanel as
|
|
19
|
-
import { Footer as
|
|
20
|
-
import { isRowReorderEnabled as
|
|
21
|
-
import { GridCell as
|
|
22
|
-
import { GridGroupCell as
|
|
23
|
-
import { GridRow as
|
|
24
|
-
import { GridHeaderSelectionCell as
|
|
25
|
-
import { GridNoRecords as
|
|
26
|
-
import { operators as
|
|
27
|
-
import { FooterRow as
|
|
28
|
-
import { normalize as
|
|
29
|
-
import { packageMetadata as
|
|
30
|
-
import { GridDetailCell as
|
|
31
|
-
import { GridDetailHierarchyCell as
|
|
32
|
-
import { GridNoRecordsContainer as
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import { gridAriaLabel as Je, messages as sl } from "./messages/index.mjs";
|
|
9
|
+
import { uGrid as It, validatePackage as St, getter as H, classNames as f, WatermarkOverlay as vt, canUseDOM as Rt } from "@progress/kendo-react-common";
|
|
10
|
+
import { process as xt } from "@progress/kendo-data-query";
|
|
11
|
+
import { combineFilters as Gt, getDetailExpandableOptions as kt, getGroupExpandableOptions as Nt, getSelectionOptions as Ft, tableKeyboardNavigationTools as te, Pager as Dt, tableKeyboardNavigationBodyAttributes as Tt, tableKeyboardNavigationScopeAttributes as Ke, tableColumnsVirtualization as Pt } from "@progress/kendo-react-data-tools";
|
|
12
|
+
import { GridSelectionCell as Ht } from "./cells/GridSelectionCell.mjs";
|
|
13
|
+
import { GridHierarchyCell as Kt } from "./cells/GridHierarchyCell.mjs";
|
|
14
|
+
import { GridEditCell as At } from "./cells/GridEditCell.mjs";
|
|
15
|
+
import { Header as Bt } from "./header/Header.mjs";
|
|
16
|
+
import { HeaderRow as Vt } from "./header/HeaderRow.mjs";
|
|
17
|
+
import { FilterRow as Lt } from "./header/FilterRow.mjs";
|
|
18
|
+
import { GroupPanel as Ot } from "./header/GroupPanel.mjs";
|
|
19
|
+
import { Footer as _t } from "./footer/Footer.mjs";
|
|
20
|
+
import { isRowReorderEnabled as zt, getRowSpanOptions as Ae, getColumnWidth as le, isSorted as Be, flatData as Mt, autoGenerateColumns as Wt, mapColumns as jt, clientColumn as $t, getNestedValue as Ve, getColSpan as Le, resolveCells as Ut, isClientReference as Jt, sanitizeColumns as Qt, readColumns as Xt } from "./utils/index.mjs";
|
|
21
|
+
import { GridCell as Yt } from "./cells/GridCell.mjs";
|
|
22
|
+
import { GridGroupCell as Oe } from "./cells/GridGroupCell.mjs";
|
|
23
|
+
import { GridRow as Zt } from "./rows/GridRow.mjs";
|
|
24
|
+
import { GridHeaderSelectionCell as qt } from "./header/GridHeaderSelectionCell.mjs";
|
|
25
|
+
import { GridNoRecords as _e } from "./components/noRecords/GridNoRecords.mjs";
|
|
26
|
+
import { operators as ze } from "./filterCommon.mjs";
|
|
27
|
+
import { FooterRow as pt } from "./footer/FooterRow.mjs";
|
|
28
|
+
import { normalize as el } from "./paging/GridPagerSettings.mjs";
|
|
29
|
+
import { packageMetadata as tl } from "./package-metadata.mjs";
|
|
30
|
+
import { GridDetailCell as ll } from "./cells/GridDetailCell.mjs";
|
|
31
|
+
import { GridDetailHierarchyCell as al } from "./cells/GridDetailHierarchyCell.mjs";
|
|
32
|
+
import { GridNoRecordsContainer as Me } from "./components/noRecords/GridNoRecordsContainer.mjs";
|
|
33
|
+
import { GridClientWrapper as We } from "./GridClientWrapper.mjs";
|
|
34
|
+
import { GridColGroup as rl } from "./components/colGroup/GridColGroup.mjs";
|
|
35
|
+
import { GridTable as nl } from "./components/table/GridTable.mjs";
|
|
36
|
+
import { GridDropClue as je } from "./components/GridDropClue.mjs";
|
|
37
|
+
import { GridDragClue as $e } from "./components/GridDragClue.mjs";
|
|
38
|
+
import { GridTableBody as Ue } from "./components/table/GridTableBody.mjs";
|
|
39
|
+
import { PagerContainer as il } from "./components/PagerContainer.mjs";
|
|
40
|
+
import { GridTableScrollable as ol } from "./components/table/GridTableScrollable.mjs";
|
|
41
|
+
import { GridElementContainer as Je } from "./components/GridElementContainer.mjs";
|
|
42
|
+
import { GridContainerElementContainer as dl } from "./components/GridContainerElementContainer.mjs";
|
|
43
|
+
import { VirtualScrollHeightContainer as cl } from "./components/VirtualScrollHeightContainer.mjs";
|
|
44
|
+
import { LocalizationService as sl, IntlService as ul } from "@progress/kendo-react-intl";
|
|
45
|
+
import { gridAriaLabel as Qe, messages as ml } from "./messages/index.mjs";
|
|
47
46
|
import { VirtualScrollFixed as j } from "./VirtualScrollFixed.mjs";
|
|
48
|
-
import { VirtualScroll as
|
|
49
|
-
import { GridCustomCellClientContainer as
|
|
50
|
-
import { GridReorderableRowsContainer as
|
|
51
|
-
import { GridRowReorderCell as
|
|
52
|
-
import { GridHeaderRowReorderCell as
|
|
53
|
-
import { GridLoader as
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
s,
|
|
47
|
+
import { VirtualScroll as fl } from "./VirtualScroll.mjs";
|
|
48
|
+
import { GridCustomCellClientContainer as gl } from "./components/GridCustomCellClientContainer.mjs";
|
|
49
|
+
import { GridReorderableRowsContainer as bl } from "./components/GridDraggableRowsContainer.mjs";
|
|
50
|
+
import { GridRowReorderCell as hl } from "./cells/GridRowReorderCell.mjs";
|
|
51
|
+
import { GridHeaderRowReorderCell as yl } from "./header/client/GridHeaderRowReorderCell.mjs";
|
|
52
|
+
import { GridLoader as Xe } from "./components/GridLoader.mjs";
|
|
53
|
+
import { gridPremiumFeatures as Cl } from "./utils/premium.mjs";
|
|
54
|
+
const wl = l.forwardRef((e, ae) => {
|
|
55
|
+
var ve, Re, xe, Ge, ke, Ne, Fe;
|
|
56
|
+
const R = e.id + "-role-element-id", x = e.navigatable ? R : "", Ye = (t, r, d, o, i, a, c) => {
|
|
57
|
+
const u = [], h = Mt(
|
|
58
|
+
u,
|
|
61
59
|
C,
|
|
62
60
|
t,
|
|
63
61
|
{ index: r },
|
|
@@ -65,16 +63,16 @@ const hl = l.forwardRef((e, le) => {
|
|
|
65
63
|
o,
|
|
66
64
|
i,
|
|
67
65
|
a,
|
|
68
|
-
|
|
66
|
+
dt.defaultExpand,
|
|
69
67
|
c
|
|
70
68
|
);
|
|
71
|
-
return { flattedData:
|
|
72
|
-
},
|
|
69
|
+
return { flattedData: u, resolvedGroupsCount: h };
|
|
70
|
+
}, Ze = (t) => {
|
|
73
71
|
const r = t.filter(
|
|
74
72
|
(i) => i && i.type && i.type.displayName === "KendoReactGridColumn"
|
|
75
|
-
), d =
|
|
76
|
-
return
|
|
77
|
-
},
|
|
73
|
+
), d = s.current.filter((i) => i.declarationIndex >= 0 && i.parentIndex === -1), o = Qt(d);
|
|
74
|
+
return Xt(r, o, { prevId: 0, idPrefix: x });
|
|
75
|
+
}, qe = (t) => t.filter((r) => Rt && r && r.media ? window.matchMedia(r.media).matches : r), pe = () => {
|
|
78
76
|
const t = [], r = (d, o) => d == null ? void 0 : d.forEach((i) => {
|
|
79
77
|
const a = i.hidden || o;
|
|
80
78
|
t.push({
|
|
@@ -83,16 +81,16 @@ const hl = l.forwardRef((e, le) => {
|
|
|
83
81
|
}), r(i.children, a);
|
|
84
82
|
});
|
|
85
83
|
return r(e.columnsState, !1), t;
|
|
86
|
-
},
|
|
87
|
-
const r =
|
|
84
|
+
}, et = (t) => {
|
|
85
|
+
const r = pe();
|
|
88
86
|
return t.filter((d) => {
|
|
89
87
|
var o;
|
|
90
88
|
return !((o = r.find((i) => i.id === d.id)) != null && o.hidden);
|
|
91
89
|
});
|
|
92
|
-
},
|
|
90
|
+
}, tt = (t, r) => {
|
|
93
91
|
var i;
|
|
94
|
-
const d =
|
|
95
|
-
|
|
92
|
+
const d = Ze(t), o = qe(d);
|
|
93
|
+
s.current = o, s.current.length === 0 && (s.current = Wt(
|
|
96
94
|
C,
|
|
97
95
|
e.group,
|
|
98
96
|
{
|
|
@@ -102,13 +100,13 @@ const hl = l.forwardRef((e, le) => {
|
|
|
102
100
|
prevId: 0,
|
|
103
101
|
idPrefix: x
|
|
104
102
|
}
|
|
105
|
-
)),
|
|
106
|
-
},
|
|
103
|
+
)), s.current = et(s.current), lt(s.current, r), G = jt(s.current, !0), ne.current = s.current.map($t);
|
|
104
|
+
}, lt = (t, r) => {
|
|
107
105
|
var i;
|
|
108
106
|
t.filter((a) => e.selectedField && a.field === e.selectedField || a.columnType === "checkbox").forEach((a) => {
|
|
109
|
-
a.width = a.width || "50px", a.cell = a.cell ||
|
|
107
|
+
a.width = a.width || "50px", a.cell = a.cell || Ht, a._type = "edit", a.headerCell = a.headerCell || qt;
|
|
110
108
|
}), N !== void 0 && t.filter((a) => a.columnType === "reorder").forEach((a) => {
|
|
111
|
-
a.width = a.width || "50px", a.cell = a.cell ||
|
|
109
|
+
a.width = a.width || "50px", a.cell = a.cell || hl, a.headerCell = a.headerCell || yl, a.sortable = !1, a.filterable = !1, a.editable = !1;
|
|
112
110
|
});
|
|
113
111
|
const d = {
|
|
114
112
|
id: "",
|
|
@@ -134,35 +132,35 @@ const hl = l.forwardRef((e, le) => {
|
|
|
134
132
|
(e.expandField || A.enabled) && e.detail && (t.unshift({
|
|
135
133
|
...d,
|
|
136
134
|
_type: "expand",
|
|
137
|
-
cell:
|
|
135
|
+
cell: Kt,
|
|
138
136
|
field: (i = A.column) != null ? i : e.expandField,
|
|
139
|
-
headerClassName: f(
|
|
137
|
+
headerClassName: f(m.hierarchyCell({}))
|
|
140
138
|
}), o++);
|
|
141
139
|
for (let a = 0; a < r; a++)
|
|
142
140
|
t.unshift({
|
|
143
141
|
...d,
|
|
144
142
|
isAccessible: !1,
|
|
145
|
-
cell:
|
|
143
|
+
cell: Oe,
|
|
146
144
|
field: "value",
|
|
147
145
|
locked: e.lockGroups
|
|
148
146
|
}), o++;
|
|
149
147
|
t.slice(o).forEach((a) => {
|
|
150
|
-
a.parentIndex >= 0 && (a.parentIndex += o), a.rowSpannable = a.rowSpannable !== void 0 ?
|
|
148
|
+
a.parentIndex >= 0 && (a.parentIndex += o), a.rowSpannable = a.rowSpannable !== void 0 ? Ae(a.rowSpannable) : oe;
|
|
151
149
|
});
|
|
152
|
-
},
|
|
153
|
-
const { rowHeight: t, detailRowHeight: r, detail: d, expandField: o } = e, i =
|
|
154
|
-
return !a ||
|
|
155
|
-
}, $ = () => e.isClient ?
|
|
156
|
-
let c =
|
|
150
|
+
}, re = () => C.length === e.total, at = () => {
|
|
151
|
+
const { rowHeight: t, detailRowHeight: r, detail: d, expandField: o } = e, i = re(), a = t !== void 0 && t > 0, c = r !== void 0 && r > 0;
|
|
152
|
+
return !a || K && !i || !!(d && o) && (!c || !i) ? fl : j;
|
|
153
|
+
}, $ = () => e.isClient ? s : ne, rt = (t, r, d, o, i, a) => {
|
|
154
|
+
let c = Le(t, r);
|
|
157
155
|
if (e.columnVirtualization && t.colSpan === 1)
|
|
158
156
|
return { colSpan: a, colsToSkip: i };
|
|
159
|
-
let
|
|
160
|
-
return e.columnVirtualization && (
|
|
157
|
+
let u = d.length - 1 === o, h = d.length - o;
|
|
158
|
+
return e.columnVirtualization && (u = b.length - 1 === o, h = b.length - o), c > 1 && !u ? i = c - 1 : c = 1, h <= c && !u && (c = h), { colSpan: c, colsToSkip: i };
|
|
161
159
|
};
|
|
162
160
|
let U, g = [], O;
|
|
163
|
-
const
|
|
161
|
+
const s = e.columnsRef || { current: [] }, ne = { current: [] };
|
|
164
162
|
let G = [[]];
|
|
165
|
-
const
|
|
163
|
+
const nt = e.scrollLeftRef || { current: 0 }, _ = e.localization || new sl(), it = e.intl || new ul("en"), k = e.unstyled, m = k && k.uGrid ? k.uGrid : It, N = zt(e.rowReorderable), F = e.autoProcessData === !0 ? {
|
|
166
164
|
group: !0,
|
|
167
165
|
sort: !0,
|
|
168
166
|
filter: !0,
|
|
@@ -170,11 +168,11 @@ const hl = l.forwardRef((e, le) => {
|
|
|
170
168
|
page: !0
|
|
171
169
|
} : e.autoProcessData;
|
|
172
170
|
let C, v;
|
|
173
|
-
if (Array.isArray(e.data) ? (C = e.data, v = (
|
|
174
|
-
const { data: t, total: r } =
|
|
171
|
+
if (Array.isArray(e.data) ? (C = e.data, v = (ve = e.total) != null ? ve : C.length) : (C = ((Re = e.data) == null ? void 0 : Re.data) || [], v = (ke = (Ge = e.total) != null ? Ge : (xe = e.data) == null ? void 0 : xe.total) != null ? ke : C.length), F) {
|
|
172
|
+
const { data: t, total: r } = xt(C, {
|
|
175
173
|
group: F.group ? e.group : void 0,
|
|
176
174
|
sort: F.sort ? e.sort : void 0,
|
|
177
|
-
filter:
|
|
175
|
+
filter: Gt(
|
|
178
176
|
F.filter ? e.filter : void 0,
|
|
179
177
|
F.search ? e.search : void 0
|
|
180
178
|
),
|
|
@@ -183,12 +181,12 @@ const hl = l.forwardRef((e, le) => {
|
|
|
183
181
|
skip: e.skip
|
|
184
182
|
} : {}
|
|
185
183
|
});
|
|
186
|
-
C = t, v = (
|
|
184
|
+
C = t, v = (Ne = e.total) != null ? Ne : r;
|
|
187
185
|
}
|
|
188
|
-
const { size: E = "medium" } = e,
|
|
186
|
+
const { size: E = "medium" } = e, ot = typeof e.groupable == "object" && e.groupable.footer || "none", D = e.scrollable === "virtual", K = e.groupable === !0 || typeof e.groupable == "object" && e.groupable.enabled !== !1, A = kt(!!e.detail), dt = Nt(
|
|
189
187
|
typeof e.groupable == "object" && e.groupable.enabled !== !1 ? e.groupable.expandable : e.groupable
|
|
190
|
-
), { resolvedGroupsCount:
|
|
191
|
-
|
|
188
|
+
), { resolvedGroupsCount: ct, flattedData: st } = Ye(
|
|
189
|
+
ot,
|
|
192
190
|
e.skip || 0,
|
|
193
191
|
e.group,
|
|
194
192
|
e.expandField,
|
|
@@ -196,54 +194,60 @@ const hl = l.forwardRef((e, le) => {
|
|
|
196
194
|
e.groupExpand,
|
|
197
195
|
e.dataItemKey
|
|
198
196
|
);
|
|
199
|
-
g =
|
|
200
|
-
const J =
|
|
201
|
-
J === j &&
|
|
197
|
+
g = st;
|
|
198
|
+
const J = at();
|
|
199
|
+
J === j && re() && (O = g.slice(
|
|
202
200
|
e.skip || 0,
|
|
203
201
|
(e.skip || 0) + ((e.take !== void 0 ? e.take : e.pageSize) || 0)
|
|
204
202
|
));
|
|
205
|
-
const
|
|
206
|
-
|
|
207
|
-
const
|
|
203
|
+
const ie = Ft(e.selectable || !!e.selectedField), oe = Ae(e.rowSpannable), ut = ie && ie.drag ? "none" : void 0, z = l.useMemo(() => l.Children.toArray(e.children), [e.children]);
|
|
204
|
+
tt(z, ct);
|
|
205
|
+
const Q = l.useMemo(() => {
|
|
206
|
+
const t = Cl(e, s.current);
|
|
207
|
+
return {
|
|
208
|
+
premium: t.length > 0,
|
|
209
|
+
features: t
|
|
210
|
+
};
|
|
211
|
+
}, [e, s]), mt = l.useMemo(() => Q.premium ? !St(tl, { component: "Grid", features: Q.features }) : !1, [Q.premium]), de = z.map((t) => t && t.type && t.type.displayName === "KendoReactGridToolbar" ? l.cloneElement(t, { ...t.props, ariaControls: R }) : null), M = z.filter((t) => t && t.type && t.type.displayName === "KendoReactGridNoRecords"), ce = z.filter(
|
|
208
212
|
(t) => t && t.type && t.type.displayName === "KendoReactGridStatusBar"
|
|
209
|
-
), b =
|
|
210
|
-
|
|
213
|
+
), b = s.current.filter((t) => t.children.length === 0), se = K && /* @__PURE__ */ l.createElement(Ot, { columns: $().current, group: e.group || [], ariaControls: R }), ue = /* @__PURE__ */ l.createElement(
|
|
214
|
+
Bt,
|
|
211
215
|
{
|
|
212
216
|
size: E,
|
|
213
217
|
staticHeaders: e.scrollable !== "none",
|
|
214
|
-
draggable: e.reorderable ||
|
|
218
|
+
draggable: e.reorderable || K,
|
|
215
219
|
headerRow: /* @__PURE__ */ l.createElement(
|
|
216
|
-
|
|
220
|
+
Vt,
|
|
217
221
|
{
|
|
218
222
|
cells: e.cells,
|
|
219
223
|
sort: e.sort,
|
|
220
224
|
sortable: e.sortable,
|
|
221
225
|
group: e.group || [],
|
|
222
|
-
groupable:
|
|
226
|
+
groupable: K,
|
|
223
227
|
filter: e.filter,
|
|
224
228
|
filterable: e.filterable,
|
|
225
|
-
filterOperators: e.filterOperators ||
|
|
229
|
+
filterOperators: e.filterOperators || ze,
|
|
226
230
|
columnMenu: e.columnMenu,
|
|
227
231
|
columnMenuIcon: e.columnMenuIcon,
|
|
228
|
-
columns:
|
|
232
|
+
columns: s.current,
|
|
229
233
|
columnsMap: G,
|
|
230
234
|
cellRender: e.headerCellRender,
|
|
231
235
|
navigatable: !!e.navigatable,
|
|
232
236
|
localization: _,
|
|
233
237
|
unstyled: k,
|
|
234
238
|
headerSelectionValue: !!(e.select && g.filter((t) => t.rowType === "data").every(
|
|
235
|
-
(t) => e.select && e.dataItemKey &&
|
|
239
|
+
(t) => e.select && e.dataItemKey && H(e.dataItemKey)(t.dataItem) !== void 0 ? e.select[H(e.dataItemKey)(t.dataItem)] : void 0
|
|
236
240
|
))
|
|
237
241
|
}
|
|
238
242
|
),
|
|
239
243
|
filterRow: e.filterable && /* @__PURE__ */ l.createElement(
|
|
240
|
-
|
|
244
|
+
Lt,
|
|
241
245
|
{
|
|
242
246
|
cells: e.cells,
|
|
243
247
|
size: E,
|
|
244
|
-
columns:
|
|
248
|
+
columns: s.current,
|
|
245
249
|
filter: e.filter,
|
|
246
|
-
filterOperators: e.filterOperators ||
|
|
250
|
+
filterOperators: e.filterOperators || ze,
|
|
247
251
|
sort: e.sort,
|
|
248
252
|
cellRender: e.filterCellRender,
|
|
249
253
|
navigatable: !!e.navigatable,
|
|
@@ -251,53 +255,53 @@ const hl = l.forwardRef((e, le) => {
|
|
|
251
255
|
localization: _
|
|
252
256
|
}
|
|
253
257
|
) || void 0,
|
|
254
|
-
cols: b.map((t, r) => /* @__PURE__ */ l.createElement("col", { key: r.toString(), width:
|
|
258
|
+
cols: b.map((t, r) => /* @__PURE__ */ l.createElement("col", { key: r.toString(), width: le(t) }))
|
|
255
259
|
}
|
|
256
|
-
),
|
|
260
|
+
), ft = nt.current || 0, gt = parseFloat(((e.style || {}).width || "").toString()), bt = (t, r, d, o, i) => {
|
|
257
261
|
let a = !1;
|
|
258
|
-
const c = e.selectedField ?
|
|
259
|
-
let
|
|
260
|
-
const { colSpans: h, hiddenColumns: T } =
|
|
262
|
+
const c = e.selectedField ? Ve(e.selectedField, t.dataItem) : e.select && e.dataItemKey && H(e.dataItemKey)(t.dataItem) !== void 0 ? e.select[H(e.dataItemKey)(t.dataItem)] : void 0;
|
|
263
|
+
let u = 0;
|
|
264
|
+
const { colSpans: h, hiddenColumns: T } = Pt({
|
|
261
265
|
enabled: e.columnVirtualization,
|
|
262
266
|
columns: b,
|
|
263
|
-
tableViewPortWidth:
|
|
264
|
-
scrollLeft:
|
|
265
|
-
getColSpan:
|
|
267
|
+
tableViewPortWidth: gt,
|
|
268
|
+
scrollLeft: ft,
|
|
269
|
+
getColSpan: Le,
|
|
266
270
|
dataItem: t.dataItem
|
|
267
271
|
}), I = b.filter((n, y) => !T[y]);
|
|
268
272
|
return {
|
|
269
273
|
row: b.map((n, y) => {
|
|
270
|
-
var
|
|
274
|
+
var De, Te, Pe, He;
|
|
271
275
|
if (T[y])
|
|
272
276
|
return null;
|
|
273
|
-
if (
|
|
274
|
-
return
|
|
277
|
+
if (u > 0)
|
|
278
|
+
return u--, null;
|
|
275
279
|
let w;
|
|
276
|
-
if ((
|
|
277
|
-
const S = n.field ? (
|
|
280
|
+
if ((De = n.rowSpannable) != null && De.enabled && t.rowType === "data" && n.field && i) {
|
|
281
|
+
const S = n.field ? (Pe = (Te = n.rowSpannable).valueGetter) == null ? void 0 : Pe.call(Te, t.dataItem, n.field) : null;
|
|
278
282
|
w = { value: S, count: 1 }, i[n.field] && ((He = i[n.field]) == null ? void 0 : He.value) === S && i[n.field] !== null ? (i[n.field].count++, w.count = null) : i[n.field] = w;
|
|
279
283
|
}
|
|
280
|
-
const { colSpan: V, colsToSkip:
|
|
284
|
+
const { colSpan: V, colsToSkip: Z } = rt(
|
|
281
285
|
n,
|
|
282
286
|
t.dataItem,
|
|
283
287
|
I,
|
|
284
288
|
y,
|
|
285
|
-
|
|
289
|
+
u,
|
|
286
290
|
h[y]
|
|
287
291
|
);
|
|
288
|
-
|
|
289
|
-
const L = n.id ? n.id : y,
|
|
290
|
-
let
|
|
292
|
+
u = Z;
|
|
293
|
+
const L = n.id ? n.id : y, Ct = f(m.contentSticky({ locked: n.locked }), n.className), wt = n.left !== void 0 ? { left: n.left, right: n.right } : {};
|
|
294
|
+
let q = !1;
|
|
291
295
|
if (n.editable && (e.editable || e.editField)) {
|
|
292
|
-
const S = e.editField ?
|
|
293
|
-
|
|
296
|
+
const S = e.editField ? Ve(e.editField, t.dataItem) : e.edit && e.dataItemKey ? e.edit[H(e.dataItemKey)(t.dataItem)] : void 0, ee = typeof S == "boolean" ? S : Array.isArray(S) ? S.indexOf(n.field) > -1 : n.field !== void 0 && S === n.field;
|
|
297
|
+
ee && n.columnType === "data" && (ee === !0 || ee === n.field) && (a = !0, q = !0);
|
|
294
298
|
}
|
|
295
|
-
const
|
|
299
|
+
const p = n.cell || q && At || Yt, Et = e.expandField && e.detail && n.field === e.expandField || n._type === "expand", P = {
|
|
296
300
|
locked: e.lockGroups,
|
|
297
|
-
id:
|
|
301
|
+
id: te.generateNavigatableId(
|
|
298
302
|
`${r}-${String(y)}`,
|
|
299
303
|
x,
|
|
300
|
-
|
|
304
|
+
Et || t.rowType === "groupHeader" || t.rowType === "groupFooter" || n.field === "value" ? "nodata" : "cell"
|
|
301
305
|
),
|
|
302
306
|
colSpan: V,
|
|
303
307
|
dataItem: t.dataItem,
|
|
@@ -306,9 +310,9 @@ const hl = l.forwardRef((e, le) => {
|
|
|
306
310
|
format: n.format,
|
|
307
311
|
columnType: n.columnType,
|
|
308
312
|
rowReorderable: N,
|
|
309
|
-
className:
|
|
313
|
+
className: Ct,
|
|
310
314
|
render: e.cellRender,
|
|
311
|
-
cells:
|
|
315
|
+
cells: Ut(e.cells, n.cells),
|
|
312
316
|
columnIndex: y,
|
|
313
317
|
columnsCount: b.length,
|
|
314
318
|
rowType: t.rowType,
|
|
@@ -316,31 +320,31 @@ const hl = l.forwardRef((e, le) => {
|
|
|
316
320
|
expanded: t.expanded,
|
|
317
321
|
dataIndex: t.dataIndex,
|
|
318
322
|
rowDataIndex: d,
|
|
319
|
-
columnPosition:
|
|
323
|
+
columnPosition: wt,
|
|
320
324
|
style: {},
|
|
321
325
|
ariaColumnIndex: n.ariaColumnIndex,
|
|
322
326
|
isSelected: (n == null ? void 0 : n._type) === "edit" ? c : Array.isArray(c) && c.indexOf(y) > -1,
|
|
323
|
-
isSorted: !!
|
|
324
|
-
isInEdit:
|
|
327
|
+
isSorted: !!Be(n.field, e.sort),
|
|
328
|
+
isInEdit: q,
|
|
325
329
|
isAlt: o,
|
|
326
330
|
unstyled: k,
|
|
327
331
|
group: t.group,
|
|
328
332
|
localization: _,
|
|
329
|
-
intl:
|
|
333
|
+
intl: it,
|
|
330
334
|
_rowSpan: w
|
|
331
335
|
};
|
|
332
336
|
return n.cell ? /* @__PURE__ */ l.createElement(
|
|
333
|
-
|
|
337
|
+
gl,
|
|
334
338
|
{
|
|
335
339
|
key: L,
|
|
336
|
-
isClient:
|
|
337
|
-
dataItem:
|
|
338
|
-
rowDataIndex:
|
|
339
|
-
columnIndex:
|
|
340
|
-
columnPosition:
|
|
340
|
+
isClient: Jt(p),
|
|
341
|
+
dataItem: P.dataItem,
|
|
342
|
+
rowDataIndex: P.rowDataIndex,
|
|
343
|
+
columnIndex: P.columnIndex,
|
|
344
|
+
columnPosition: P.columnPosition
|
|
341
345
|
},
|
|
342
|
-
/* @__PURE__ */ l.createElement(
|
|
343
|
-
) : /* @__PURE__ */ l.createElement(
|
|
346
|
+
/* @__PURE__ */ l.createElement(p, { ...P })
|
|
347
|
+
) : /* @__PURE__ */ l.createElement(p, { key: L, ...P });
|
|
344
348
|
}),
|
|
345
349
|
isInEdit: a,
|
|
346
350
|
isSelected: typeof c == "boolean" && c
|
|
@@ -355,19 +359,19 @@ const hl = l.forwardRef((e, le) => {
|
|
|
355
359
|
else
|
|
356
360
|
break;
|
|
357
361
|
}
|
|
358
|
-
const
|
|
359
|
-
let
|
|
360
|
-
const
|
|
362
|
+
const fe = (t) => t >= g.length - me;
|
|
363
|
+
let ge = e.skip || 0;
|
|
364
|
+
const X = [], be = !g.length, he = G.length + (e.filterable ? 1 : 0) + 1;
|
|
361
365
|
let B = 0;
|
|
362
366
|
if (g.length) {
|
|
363
367
|
let t = -1, r = 0;
|
|
364
|
-
const d =
|
|
368
|
+
const d = oe.enabled ? {} : void 0;
|
|
365
369
|
(O || g).forEach((o, i) => {
|
|
366
|
-
o.rowType === "data" && (
|
|
367
|
-
const a =
|
|
368
|
-
if (B =
|
|
370
|
+
o.rowType === "data" && (ge++, t++);
|
|
371
|
+
const a = ge % 2 === 0, c = e.dataItemKey && H(e.dataItemKey)(o.dataItem), u = i + (e.skip || 0), h = c || "ai" + u, T = h + "_1", I = bt(o, h, t, a, d);
|
|
372
|
+
if (B = u + he + r, X.push(
|
|
369
373
|
/* @__PURE__ */ l.createElement(
|
|
370
|
-
|
|
374
|
+
Zt,
|
|
371
375
|
{
|
|
372
376
|
key: h,
|
|
373
377
|
dataItem: o.dataItem,
|
|
@@ -375,15 +379,15 @@ const hl = l.forwardRef((e, le) => {
|
|
|
375
379
|
isInEdit: I.isInEdit,
|
|
376
380
|
rowType: o.rowType,
|
|
377
381
|
isRowReorderable: N,
|
|
378
|
-
isHidden:
|
|
382
|
+
isHidden: fe(i),
|
|
379
383
|
onClick: null,
|
|
380
384
|
onDoubleClick: null,
|
|
381
385
|
selectedField: e.selectedField,
|
|
382
386
|
rowHeight: e.rowHeight,
|
|
383
387
|
render: e.rowRender,
|
|
384
388
|
ariaRowIndex: B,
|
|
385
|
-
absoluteRowIndex:
|
|
386
|
-
dataIndex: D && !e.groupable ?
|
|
389
|
+
absoluteRowIndex: u,
|
|
390
|
+
dataIndex: D && !e.groupable ? u : t,
|
|
387
391
|
isSelected: I.isSelected,
|
|
388
392
|
rows: e.rows
|
|
389
393
|
},
|
|
@@ -391,14 +395,14 @@ const hl = l.forwardRef((e, le) => {
|
|
|
391
395
|
)
|
|
392
396
|
), e.detail && o.rowType === "data" && o.expanded) {
|
|
393
397
|
const n = b.length - (e.expandField || A.enabled ? 1 : 0) - (e.group ? e.group.length : 0) || 1;
|
|
394
|
-
r++, B =
|
|
398
|
+
r++, B = u + he + r, X.push(
|
|
395
399
|
/* @__PURE__ */ l.createElement(
|
|
396
400
|
"tr",
|
|
397
401
|
{
|
|
398
402
|
key: T,
|
|
399
|
-
className: f(
|
|
403
|
+
className: f(m.detailTr({ isAlt: a })),
|
|
400
404
|
style: {
|
|
401
|
-
visibility:
|
|
405
|
+
visibility: fe(i) ? "hidden" : "",
|
|
402
406
|
height: e.detailRowHeight
|
|
403
407
|
},
|
|
404
408
|
role: "row",
|
|
@@ -406,16 +410,16 @@ const hl = l.forwardRef((e, le) => {
|
|
|
406
410
|
},
|
|
407
411
|
e.group && e.group.map((y, w) => {
|
|
408
412
|
var L;
|
|
409
|
-
const V = (L = I == null ? void 0 : I.row[w]) == null ? void 0 : L.props.style,
|
|
413
|
+
const V = (L = I == null ? void 0 : I.row[w]) == null ? void 0 : L.props.style, Z = V ? { left: V.left, right: V.right } : {};
|
|
410
414
|
return /* @__PURE__ */ l.createElement(
|
|
411
|
-
|
|
415
|
+
Oe,
|
|
412
416
|
{
|
|
413
417
|
id: "",
|
|
414
418
|
dataIndex: o.dataIndex,
|
|
415
419
|
field: y.field,
|
|
416
420
|
dataItem: o.dataItem,
|
|
417
421
|
key: w,
|
|
418
|
-
columnPosition:
|
|
422
|
+
columnPosition: Z,
|
|
419
423
|
style: {},
|
|
420
424
|
ariaColumnIndex: 1 + w,
|
|
421
425
|
isSelected: !1,
|
|
@@ -426,21 +430,21 @@ const hl = l.forwardRef((e, le) => {
|
|
|
426
430
|
);
|
|
427
431
|
}),
|
|
428
432
|
(e.expandField || A.enabled) && /* @__PURE__ */ l.createElement(
|
|
429
|
-
|
|
433
|
+
al,
|
|
430
434
|
{
|
|
431
435
|
unstyled: k,
|
|
432
|
-
id:
|
|
436
|
+
id: te.generateNavigatableId(`${T}-dhcell`, x)
|
|
433
437
|
}
|
|
434
438
|
),
|
|
435
439
|
/* @__PURE__ */ l.createElement(
|
|
436
|
-
|
|
440
|
+
ll,
|
|
437
441
|
{
|
|
438
442
|
dataItem: o.dataItem,
|
|
439
443
|
dataIndex: o.dataIndex,
|
|
440
444
|
colSpan: n,
|
|
441
445
|
ariaColIndex: 2 + (e.group ? e.group.length : 0),
|
|
442
446
|
detail: e.detail,
|
|
443
|
-
id:
|
|
447
|
+
id: te.generateNavigatableId(`${T}-dcell`, x)
|
|
444
448
|
}
|
|
445
449
|
)
|
|
446
450
|
)
|
|
@@ -448,62 +452,62 @@ const hl = l.forwardRef((e, le) => {
|
|
|
448
452
|
}
|
|
449
453
|
});
|
|
450
454
|
}
|
|
451
|
-
const
|
|
455
|
+
const ye = {
|
|
452
456
|
size: E,
|
|
453
457
|
total: v,
|
|
454
458
|
skip: e.skip || 0,
|
|
455
459
|
take: (e.take !== void 0 ? e.take : e.pageSize) || 10,
|
|
456
|
-
...
|
|
457
|
-
},
|
|
460
|
+
...el(e.pageable || {})
|
|
461
|
+
}, Ce = /* @__PURE__ */ l.createElement(il, null, e.pager ? /* @__PURE__ */ l.createElement(e.pager, { ...ye }) : /* @__PURE__ */ l.createElement(Dt, { className: f(m.pager({})), ...ye })), ht = (t, r) => /* @__PURE__ */ l.createElement("col", { key: r.toString(), width: le(t) }), yt = (Fe = e.cells) != null && Fe.footerCell || s.current.some((t) => {
|
|
458
462
|
var r;
|
|
459
463
|
return !!(t.footerCell || (r = t.cells) != null && r.footerCell);
|
|
460
464
|
}) ? /* @__PURE__ */ l.createElement(
|
|
461
|
-
|
|
465
|
+
_t,
|
|
462
466
|
{
|
|
463
467
|
size: E,
|
|
464
468
|
staticHeaders: e.scrollable !== "none",
|
|
465
469
|
row: /* @__PURE__ */ l.createElement(
|
|
466
|
-
|
|
470
|
+
pt,
|
|
467
471
|
{
|
|
468
472
|
cells: e.cells,
|
|
469
473
|
idPrefix: x,
|
|
470
|
-
columns:
|
|
474
|
+
columns: s.current,
|
|
471
475
|
ariaRowIndex: B + 1
|
|
472
476
|
}
|
|
473
477
|
),
|
|
474
|
-
cols: b.map(
|
|
478
|
+
cols: b.map(ht)
|
|
475
479
|
}
|
|
476
|
-
) : null,
|
|
480
|
+
) : null, we = /* @__PURE__ */ l.createElement(rl, null, b.map((t, r) => /* @__PURE__ */ l.createElement(
|
|
477
481
|
"col",
|
|
478
482
|
{
|
|
479
483
|
key: r.toString(),
|
|
480
|
-
className:
|
|
481
|
-
width:
|
|
484
|
+
className: Be(t.field, e.sort) ? f(m.sorted({})) : void 0,
|
|
485
|
+
width: le(t)
|
|
482
486
|
}
|
|
483
|
-
))),
|
|
487
|
+
))), Ee = e.reorderable || K, { detail: El, cells: Il, rows: Sl, ...Ie } = e, Se = /* @__PURE__ */ l.createElement(
|
|
484
488
|
"tbody",
|
|
485
489
|
{
|
|
486
490
|
role: "rowgroup",
|
|
487
|
-
className: f(
|
|
488
|
-
...
|
|
491
|
+
className: f(m.tbody({})),
|
|
492
|
+
...Tt
|
|
489
493
|
},
|
|
490
|
-
|
|
494
|
+
X
|
|
491
495
|
);
|
|
492
|
-
let
|
|
493
|
-
if (N && (
|
|
494
|
-
|
|
496
|
+
let Y = Se;
|
|
497
|
+
if (N && (Y = /* @__PURE__ */ l.createElement(
|
|
498
|
+
bl,
|
|
495
499
|
{
|
|
496
|
-
unstyled:
|
|
497
|
-
columns:
|
|
500
|
+
unstyled: m,
|
|
501
|
+
columns: s.current,
|
|
498
502
|
rowReorderSettings: e.rowReorderable
|
|
499
503
|
},
|
|
500
|
-
|
|
504
|
+
Se
|
|
501
505
|
)), e.scrollable === "none")
|
|
502
506
|
return /* @__PURE__ */ l.createElement(
|
|
503
|
-
|
|
507
|
+
We,
|
|
504
508
|
{
|
|
505
|
-
gridRef:
|
|
506
|
-
gridProps:
|
|
509
|
+
gridRef: ae,
|
|
510
|
+
gridProps: Ie,
|
|
507
511
|
columnsRef: $(),
|
|
508
512
|
columnsMapRef: G,
|
|
509
513
|
dataRef: g,
|
|
@@ -513,40 +517,40 @@ const hl = l.forwardRef((e, le) => {
|
|
|
513
517
|
total: v,
|
|
514
518
|
detailExpandable: !!e.detail
|
|
515
519
|
},
|
|
516
|
-
/* @__PURE__ */ l.createElement(
|
|
520
|
+
/* @__PURE__ */ l.createElement(Je, null, /* @__PURE__ */ l.createElement(
|
|
517
521
|
"div",
|
|
518
522
|
{
|
|
519
523
|
id: e.id,
|
|
520
524
|
style: e.style,
|
|
521
|
-
className: f(
|
|
525
|
+
className: f(m.wrapper({ size: E }), e.className),
|
|
522
526
|
"aria-label": e.ariaLabel,
|
|
523
527
|
...Ke
|
|
524
528
|
},
|
|
525
|
-
|
|
526
|
-
|
|
529
|
+
de,
|
|
530
|
+
se,
|
|
527
531
|
/* @__PURE__ */ l.createElement(
|
|
528
|
-
|
|
532
|
+
nl,
|
|
529
533
|
{
|
|
530
534
|
selectable: e.selectable,
|
|
531
|
-
className: f(
|
|
535
|
+
className: f(m.table({ size: E }))
|
|
532
536
|
},
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
/* @__PURE__ */ l.createElement(
|
|
537
|
+
we,
|
|
538
|
+
ue,
|
|
539
|
+
/* @__PURE__ */ l.createElement(Ue, { rowReorderable: N }, Y)
|
|
536
540
|
),
|
|
537
|
-
|
|
538
|
-
|
|
541
|
+
be && /* @__PURE__ */ l.createElement(Me, null, M.length ? M : /* @__PURE__ */ l.createElement(_e, null)),
|
|
542
|
+
Ee && /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement(je, null), /* @__PURE__ */ l.createElement($e, null))
|
|
539
543
|
)),
|
|
540
|
-
|
|
541
|
-
e.pageable &&
|
|
542
|
-
/* @__PURE__ */ l.createElement(
|
|
544
|
+
ce,
|
|
545
|
+
e.pageable && Ce,
|
|
546
|
+
/* @__PURE__ */ l.createElement(Xe, { loader: e.loader, showLoader: e.showLoader })
|
|
543
547
|
);
|
|
544
548
|
let W = e.style || {};
|
|
545
549
|
return D && (W.height || (W = Object.assign({}, W, { height: "450px" }))), /* @__PURE__ */ l.createElement(
|
|
546
|
-
|
|
550
|
+
We,
|
|
547
551
|
{
|
|
548
|
-
gridRef:
|
|
549
|
-
gridProps:
|
|
552
|
+
gridRef: ae,
|
|
553
|
+
gridProps: Ie,
|
|
550
554
|
columnsRef: $(),
|
|
551
555
|
columnsMapRef: G,
|
|
552
556
|
dataRef: g,
|
|
@@ -556,13 +560,13 @@ const hl = l.forwardRef((e, le) => {
|
|
|
556
560
|
total: v,
|
|
557
561
|
detailExpandable: !!e.detail
|
|
558
562
|
},
|
|
559
|
-
/* @__PURE__ */ l.createElement(
|
|
563
|
+
/* @__PURE__ */ l.createElement(Je, null, /* @__PURE__ */ l.createElement(
|
|
560
564
|
"div",
|
|
561
565
|
{
|
|
562
566
|
id: e.id,
|
|
563
567
|
style: W,
|
|
564
568
|
className: f(
|
|
565
|
-
|
|
569
|
+
m.wrapper({
|
|
566
570
|
size: E,
|
|
567
571
|
virtual: D
|
|
568
572
|
}),
|
|
@@ -571,51 +575,51 @@ const hl = l.forwardRef((e, le) => {
|
|
|
571
575
|
"aria-label": e.ariaLabel,
|
|
572
576
|
...Ke
|
|
573
577
|
},
|
|
574
|
-
|
|
575
|
-
|
|
578
|
+
de,
|
|
579
|
+
se,
|
|
576
580
|
/* @__PURE__ */ l.createElement(
|
|
577
581
|
"div",
|
|
578
582
|
{
|
|
579
|
-
className: f(
|
|
583
|
+
className: f(m.ariaRoot({})),
|
|
580
584
|
role: "grid",
|
|
581
585
|
"aria-colcount": b.length,
|
|
582
586
|
"aria-rowcount": v,
|
|
583
587
|
id: R,
|
|
584
|
-
"aria-label": _.toLanguageString(
|
|
588
|
+
"aria-label": _.toLanguageString(Qe, ml[Qe])
|
|
585
589
|
},
|
|
586
|
-
|
|
587
|
-
/* @__PURE__ */ l.createElement("div", { className: f(
|
|
588
|
-
|
|
590
|
+
ue,
|
|
591
|
+
/* @__PURE__ */ l.createElement("div", { className: f(m.container({})), role: "presentation" }, /* @__PURE__ */ l.createElement(dl, null, /* @__PURE__ */ l.createElement("div", { className: f(m.content({})), role: "presentation" }, /* @__PURE__ */ l.createElement("div", { className: f(m.tableWrap({})), role: "presentation" }, /* @__PURE__ */ l.createElement(
|
|
592
|
+
ol,
|
|
589
593
|
{
|
|
590
594
|
selectable: e.selectable,
|
|
591
595
|
tableClassName: f(
|
|
592
|
-
|
|
596
|
+
m.table({
|
|
593
597
|
size: E
|
|
594
598
|
})
|
|
595
599
|
),
|
|
596
|
-
tableStyle: { userSelect:
|
|
600
|
+
tableStyle: { userSelect: ut }
|
|
597
601
|
},
|
|
598
|
-
|
|
599
|
-
/* @__PURE__ */ l.createElement(
|
|
600
|
-
),
|
|
602
|
+
we,
|
|
603
|
+
/* @__PURE__ */ l.createElement(Ue, { rowReorderable: N }, Y)
|
|
604
|
+
), be && /* @__PURE__ */ l.createElement(Me, null, M.length ? M : /* @__PURE__ */ l.createElement(_e, null))), D && /* @__PURE__ */ l.createElement(
|
|
601
605
|
"div",
|
|
602
606
|
{
|
|
603
|
-
className: f(
|
|
607
|
+
className: f(m.heightContainer({})),
|
|
604
608
|
role: "presentation"
|
|
605
609
|
},
|
|
606
|
-
/* @__PURE__ */ l.createElement(
|
|
610
|
+
/* @__PURE__ */ l.createElement(cl, { isVirtualScroll: D })
|
|
607
611
|
)))),
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
/* @__PURE__ */ l.createElement(
|
|
612
|
+
yt,
|
|
613
|
+
Ee && /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement(je, null), /* @__PURE__ */ l.createElement($e, null)),
|
|
614
|
+
mt && /* @__PURE__ */ l.createElement(vt, null)
|
|
611
615
|
),
|
|
612
|
-
|
|
613
|
-
e.pageable &&
|
|
614
|
-
/* @__PURE__ */ l.createElement(
|
|
616
|
+
ce,
|
|
617
|
+
e.pageable && Ce,
|
|
618
|
+
/* @__PURE__ */ l.createElement(Xe, { loader: e.loader, showLoader: e.showLoader })
|
|
615
619
|
))
|
|
616
620
|
);
|
|
617
621
|
});
|
|
618
|
-
|
|
622
|
+
wl.displayName = "KendoReactGridComponent";
|
|
619
623
|
export {
|
|
620
|
-
|
|
624
|
+
wl as GridComponent
|
|
621
625
|
};
|