@progress/kendo-react-grid 10.0.0-develop.4 → 10.0.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/GridClientWrapper.js +1 -1
- package/GridClientWrapper.mjs +21 -19
- package/GridComponent.js +1 -1
- package/GridComponent.mjs +117 -116
- package/README.md +7 -11
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/footer/Footer.js +1 -1
- package/footer/Footer.mjs +1 -1
- package/header/Header.js +1 -1
- package/header/Header.mjs +16 -16
- package/index.d.mts +2 -2
- package/index.d.ts +2 -2
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +14 -14
package/GridComponent.mjs
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as l from "react";
|
|
9
|
-
import { uGrid as
|
|
9
|
+
import { uGrid as xt, validatePackage as Gt, getter as K, 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 Pt, tableKeyboardNavigationBodyAttributes as Ht, tableKeyboardNavigationScopeAttributes as
|
|
11
|
+
import { combineFilters as Nt, getDetailExpandableOptions as Ft, getGroupExpandableOptions as Dt, getSelectionOptions as Tt, tableKeyboardNavigationTools as O, Pager as Pt, tableKeyboardNavigationBodyAttributes as Ht, tableKeyboardNavigationScopeAttributes as _e, tableColumnsVirtualization as Kt } from "@progress/kendo-react-data-tools";
|
|
12
12
|
import { GridSelectionCell as At } from "./cells/GridSelectionCell.mjs";
|
|
13
13
|
import { GridHierarchyCell as Bt } from "./cells/GridHierarchyCell.mjs";
|
|
14
14
|
import { GridEditCell as Vt } from "./cells/GridEditCell.mjs";
|
|
@@ -17,45 +17,45 @@ import { HeaderRow as _t } from "./header/HeaderRow.mjs";
|
|
|
17
17
|
import { FilterRow as Ot } from "./header/FilterRow.mjs";
|
|
18
18
|
import { GroupPanel as zt } from "./header/GroupPanel.mjs";
|
|
19
19
|
import { Footer as Mt } from "./footer/Footer.mjs";
|
|
20
|
-
import { isRowReorderEnabled as Wt, getRowSpanOptions as
|
|
20
|
+
import { isRowReorderEnabled as Wt, getRowSpanOptions as Oe, getColumnWidth as re, isSorted as ze, flatData as $t, autoGenerateColumns as jt, mapColumns as Ut, clientColumn as qt, getFlatColumnsState as Jt, getColumnState as ne, getNestedValue as Me, getColSpan as We, resolveCells as Qt, isClientReference as Xt, readColumns as Yt } from "./utils/index.mjs";
|
|
21
21
|
import { GridCell as Zt } from "./cells/GridCell.mjs";
|
|
22
|
-
import { GridGroupCell as
|
|
22
|
+
import { GridGroupCell as $e } from "./cells/GridGroupCell.mjs";
|
|
23
23
|
import { GridRow as pt } from "./rows/GridRow.mjs";
|
|
24
24
|
import { GridHeaderSelectionCell as el } from "./header/GridHeaderSelectionCell.mjs";
|
|
25
|
-
import { GridNoRecords as
|
|
26
|
-
import { operators as
|
|
25
|
+
import { GridNoRecords as je } from "./components/noRecords/GridNoRecords.mjs";
|
|
26
|
+
import { operators as Ue } from "./filterCommon.mjs";
|
|
27
27
|
import { FooterRow as tl } from "./footer/FooterRow.mjs";
|
|
28
28
|
import { normalize as ll } from "./paging/GridPagerSettings.mjs";
|
|
29
29
|
import { packageMetadata as al } from "./package-metadata.mjs";
|
|
30
30
|
import { GridDetailCell as rl } from "./cells/GridDetailCell.mjs";
|
|
31
31
|
import { GridDetailHierarchyCell as nl } from "./cells/GridDetailHierarchyCell.mjs";
|
|
32
|
-
import { GridNoRecordsContainer as
|
|
33
|
-
import { GridClientWrapper as
|
|
32
|
+
import { GridNoRecordsContainer as qe } from "./components/noRecords/GridNoRecordsContainer.mjs";
|
|
33
|
+
import { GridClientWrapper as Je } from "./GridClientWrapper.mjs";
|
|
34
34
|
import { GridColGroup as il } from "./components/colGroup/GridColGroup.mjs";
|
|
35
35
|
import { GridTable as ol } from "./components/table/GridTable.mjs";
|
|
36
|
-
import { GridDropClue as
|
|
37
|
-
import { GridDragClue as
|
|
38
|
-
import { GridTableBody as
|
|
36
|
+
import { GridDropClue as Qe } from "./components/GridDropClue.mjs";
|
|
37
|
+
import { GridDragClue as Xe } from "./components/GridDragClue.mjs";
|
|
38
|
+
import { GridTableBody as Ye } from "./components/table/GridTableBody.mjs";
|
|
39
39
|
import { PagerContainer as dl } from "./components/PagerContainer.mjs";
|
|
40
40
|
import { GridTableScrollable as cl } from "./components/table/GridTableScrollable.mjs";
|
|
41
|
-
import { GridElementContainer as
|
|
41
|
+
import { GridElementContainer as Ze } from "./components/GridElementContainer.mjs";
|
|
42
42
|
import { GridContainerElementContainer as sl } from "./components/GridContainerElementContainer.mjs";
|
|
43
43
|
import { VirtualScrollHeightContainer as ml } from "./components/VirtualScrollHeightContainer.mjs";
|
|
44
|
-
import { gridAriaLabel as
|
|
44
|
+
import { gridAriaLabel as pe, messages as ul } from "./messages/index.mjs";
|
|
45
45
|
import { VirtualScrollFixed as U } from "./VirtualScrollFixed.mjs";
|
|
46
46
|
import { VirtualScroll as fl } from "./VirtualScroll.mjs";
|
|
47
47
|
import { GridCustomCellClientContainer as gl } from "./components/GridCustomCellClientContainer.mjs";
|
|
48
48
|
import { GridReorderableRowsContainer as bl } from "./components/GridDraggableRowsContainer.mjs";
|
|
49
49
|
import { GridRowReorderCell as hl } from "./cells/GridRowReorderCell.mjs";
|
|
50
50
|
import { GridHeaderRowReorderCell as yl } from "./header/client/GridHeaderRowReorderCell.mjs";
|
|
51
|
-
import { GridLoader as
|
|
51
|
+
import { GridLoader as et } from "./components/GridLoader.mjs";
|
|
52
52
|
import { gridPremiumFeatures as Cl } from "./utils/premium.mjs";
|
|
53
53
|
import { LocalizationService as wl, IntlService as El } from "@progress/kendo-react-intl";
|
|
54
54
|
const Sl = l.forwardRef((e, ie) => {
|
|
55
|
-
var
|
|
55
|
+
var Ge, ke, Ne, Fe, De, Te, Pe, He;
|
|
56
56
|
const x = e.id + "-role-element-id", G = e.navigatable ? x : "";
|
|
57
57
|
let E = e.columnsState || [];
|
|
58
|
-
const
|
|
58
|
+
const tt = (t, n, d, i, o, s, a) => {
|
|
59
59
|
const c = [], g = $t(
|
|
60
60
|
c,
|
|
61
61
|
C,
|
|
@@ -65,16 +65,16 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
65
65
|
i,
|
|
66
66
|
o,
|
|
67
67
|
s,
|
|
68
|
-
|
|
68
|
+
ft.defaultExpand,
|
|
69
69
|
a
|
|
70
70
|
);
|
|
71
71
|
return { flattedData: c, resolvedGroupsCount: g };
|
|
72
|
-
},
|
|
72
|
+
}, lt = (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
|
+
}, at = () => {
|
|
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({
|
|
@@ -83,15 +83,15 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
83
83
|
}), n(o.children, s);
|
|
84
84
|
});
|
|
85
85
|
return n(E, !1), t;
|
|
86
|
-
},
|
|
87
|
-
const n =
|
|
86
|
+
}, rt = (t) => {
|
|
87
|
+
const n = at();
|
|
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 = lt(t), m.filter((i) => !i.hidden).length === 0 && (m = jt(
|
|
95
95
|
C,
|
|
96
96
|
e.group,
|
|
97
97
|
{
|
|
@@ -101,15 +101,15 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
101
101
|
prevId: 0,
|
|
102
102
|
idPrefix: G
|
|
103
103
|
}
|
|
104
|
-
)),
|
|
105
|
-
},
|
|
104
|
+
)), ot(m, n), m = rt(m), k = Ut(m, !0), oe = m.map(qt);
|
|
105
|
+
}, it = (t, n) => {
|
|
106
106
|
const d = (i) => {
|
|
107
107
|
var s;
|
|
108
108
|
const o = n.find((a) => a.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
114
|
t.filter((a) => e.selectedField && a.field === e.selectedField || a.columnType === "checkbox").forEach((a) => {
|
|
115
115
|
a.width = a.width || "50px", a.cell = a.cell || At, a._type = "edit", a.headerCell = a.headerCell || el;
|
|
@@ -117,7 +117,7 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
117
117
|
a.width = a.width || "50px", a.cell = a.cell || hl, a.headerCell = a.headerCell || yl, a.sortable = !1, a.filterable = !1, a.editable = !1;
|
|
118
118
|
});
|
|
119
119
|
const d = Jt(E);
|
|
120
|
-
|
|
120
|
+
it(t, d);
|
|
121
121
|
const i = {
|
|
122
122
|
id: "",
|
|
123
123
|
resizable: !0,
|
|
@@ -154,7 +154,7 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
154
154
|
const c = {
|
|
155
155
|
...i,
|
|
156
156
|
isAccessible: !1,
|
|
157
|
-
cell:
|
|
157
|
+
cell: $e,
|
|
158
158
|
id: O.generateNavigatableId(`${o++}`, "group", "column"),
|
|
159
159
|
field: "value",
|
|
160
160
|
locked: e.lockGroups
|
|
@@ -162,20 +162,20 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
162
162
|
t.unshift(c), E.unshift(d.find((g) => g.id === c.id) || ne(c));
|
|
163
163
|
}
|
|
164
164
|
t.slice(o).forEach((a) => {
|
|
165
|
-
a.parentIndex >= 0 && (a.parentIndex += o), a.rowSpannable = a.rowSpannable !== void 0 ?
|
|
165
|
+
a.parentIndex >= 0 && (a.parentIndex += o), a.rowSpannable = a.rowSpannable !== void 0 ? Oe(a.rowSpannable) : ce;
|
|
166
166
|
});
|
|
167
|
-
}, q = () => C.length === e.total,
|
|
167
|
+
}, q = () => C.length === e.total, dt = () => {
|
|
168
168
|
const { rowHeight: t, detailRowHeight: n, detail: d, expandField: i } = e, o = q(), s = t !== void 0 && t > 0, a = n !== void 0 && n > 0;
|
|
169
169
|
return !s || A && !o || !!(d && i) && (!a || !o) ? fl : U;
|
|
170
|
-
}, J = () => e.isClient ? m : oe,
|
|
171
|
-
let a =
|
|
170
|
+
}, J = () => e.isClient ? m : oe, ct = (t, n, d, i, o, s) => {
|
|
171
|
+
let a = We(t, n);
|
|
172
172
|
if (e.columnVirtualization && t.colSpan === 1)
|
|
173
173
|
return { colSpan: s, colsToSkip: o };
|
|
174
174
|
let c = d.length - 1 === i, g = d.length - i;
|
|
175
175
|
return e.columnVirtualization && (c = h.length - 1 === i, g = h.length - i), a > 1 && !c ? o = a - 1 : a = 1, g <= a && !c && (a = g), { colSpan: a, colsToSkip: o };
|
|
176
176
|
};
|
|
177
177
|
let Q, b = [], z, m = [], oe = [], k = [[]];
|
|
178
|
-
const
|
|
178
|
+
const st = e.scrollLeftRef || { current: 0 }, M = e.localization || new wl(e.language), mt = e.intl || new El((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
179
|
group: !0,
|
|
180
180
|
sort: !0,
|
|
181
181
|
filter: !0,
|
|
@@ -183,7 +183,7 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
183
183
|
page: !0
|
|
184
184
|
} : e.autoProcessData;
|
|
185
185
|
let C, R;
|
|
186
|
-
if (Array.isArray(e.data) ? (C = e.data, R = (
|
|
186
|
+
if (Array.isArray(e.data) ? (C = e.data, R = (ke = e.total) != null ? ke : C.length) : (C = ((Ne = e.data) == null ? void 0 : Ne.data) || [], R = (Te = (De = e.total) != null ? De : (Fe = e.data) == null ? void 0 : Fe.total) != null ? Te : C.length), D) {
|
|
187
187
|
const { data: t, total: n } = kt(C, {
|
|
188
188
|
group: D.group ? e.group : void 0,
|
|
189
189
|
sort: D.sort ? e.sort : void 0,
|
|
@@ -196,12 +196,12 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
196
196
|
skip: e.skip
|
|
197
197
|
} : {}
|
|
198
198
|
});
|
|
199
|
-
C = t, R = (
|
|
199
|
+
C = t, R = (Pe = e.total) != null ? Pe : n;
|
|
200
200
|
}
|
|
201
|
-
const { size: S = "medium" } = e,
|
|
201
|
+
const { size: S = "medium" } = e, ut = typeof e.groupable == "object" && e.groupable.footer || "none", T = e.scrollable === "virtual", A = e.groupable === !0 || typeof e.groupable == "object" && e.groupable.enabled !== !1, B = Ft(!!e.detail), ft = Dt(
|
|
202
202
|
typeof e.groupable == "object" && e.groupable.enabled !== !1 ? e.groupable.expandable : e.groupable
|
|
203
|
-
), { resolvedGroupsCount:
|
|
204
|
-
|
|
203
|
+
), { resolvedGroupsCount: gt, flattedData: bt } = tt(
|
|
204
|
+
ut,
|
|
205
205
|
e.skip || 0,
|
|
206
206
|
e.group,
|
|
207
207
|
e.expandField,
|
|
@@ -209,23 +209,23 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
209
209
|
e.groupExpand,
|
|
210
210
|
e.dataItemKey
|
|
211
211
|
);
|
|
212
|
-
b =
|
|
213
|
-
const X =
|
|
212
|
+
b = bt;
|
|
213
|
+
const X = dt();
|
|
214
214
|
X === U && q() && (z = b.slice(
|
|
215
215
|
e.skip || 0,
|
|
216
216
|
(e.skip || 0) + ((e.take !== void 0 ? e.take : e.pageSize) || 0)
|
|
217
217
|
));
|
|
218
|
-
const de = Tt(e.selectable || !!e.selectedField), ce =
|
|
219
|
-
|
|
218
|
+
const de = Tt(e.selectable || !!e.selectedField), ce = Oe(e.rowSpannable), ht = de && de.drag ? "none" : void 0, W = l.useMemo(() => l.Children.toArray(e.children), [e.children]);
|
|
219
|
+
nt(W, gt);
|
|
220
220
|
const Y = l.useMemo(() => {
|
|
221
221
|
const t = Cl(e, m);
|
|
222
222
|
return {
|
|
223
223
|
premium: t.length > 0,
|
|
224
224
|
features: t
|
|
225
225
|
};
|
|
226
|
-
}, [e, m]),
|
|
226
|
+
}, [e, m]), se = l.useMemo(() => Y.premium ? !Gt(al, { component: "Grid", features: Y.features }) : !1, [Y.premium]), me = W.map((t) => t && t.type && t.type.displayName === "KendoReactGridToolbar" ? l.cloneElement(t, { ...t.props, ariaControls: x }) : null), $ = W.filter((t) => t && t.type && t.type.displayName === "KendoReactGridNoRecords"), ue = W.filter(
|
|
227
227
|
(t) => t && t.type && t.type.displayName === "KendoReactGridStatusBar"
|
|
228
|
-
), h = m.filter((t) => t.children.length === 0),
|
|
228
|
+
), h = m.filter((t) => t.children.length === 0), fe = A && /* @__PURE__ */ l.createElement(zt, { columns: J(), group: e.group || [], ariaControls: x }), ge = /* @__PURE__ */ l.createElement(
|
|
229
229
|
Lt,
|
|
230
230
|
{
|
|
231
231
|
size: S,
|
|
@@ -241,7 +241,7 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
241
241
|
groupable: A,
|
|
242
242
|
filter: e.filter,
|
|
243
243
|
filterable: e.filterable,
|
|
244
|
-
filterOperators: e.filterOperators ||
|
|
244
|
+
filterOperators: e.filterOperators || Ue,
|
|
245
245
|
columnMenu: e.columnMenu,
|
|
246
246
|
columnMenuIcon: e.columnMenuIcon,
|
|
247
247
|
columns: m,
|
|
@@ -262,7 +262,7 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
262
262
|
size: S,
|
|
263
263
|
columns: m,
|
|
264
264
|
filter: e.filter,
|
|
265
|
-
filterOperators: e.filterOperators ||
|
|
265
|
+
filterOperators: e.filterOperators || Ue,
|
|
266
266
|
sort: e.sort,
|
|
267
267
|
cellRender: e.filterCellRender,
|
|
268
268
|
navigatable: !!e.navigatable,
|
|
@@ -272,31 +272,31 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
272
272
|
) || void 0,
|
|
273
273
|
cols: h.map((t, n) => /* @__PURE__ */ l.createElement("col", { key: n.toString(), width: re(t) }))
|
|
274
274
|
}
|
|
275
|
-
),
|
|
275
|
+
), yt = st.current || 0, Ct = parseFloat(((e.style || {}).width || "").toString()), wt = (t, n, d, i, o) => {
|
|
276
276
|
let s = !1;
|
|
277
|
-
const a = e.selectedField ?
|
|
277
|
+
const a = e.selectedField ? Me(e.selectedField, t.dataItem) : e.select && e.dataItemKey && K(e.dataItemKey)(t.dataItem) !== void 0 ? e.select[K(e.dataItemKey)(t.dataItem)] : void 0;
|
|
278
278
|
let c = 0;
|
|
279
279
|
const { colSpans: g, hiddenColumns: P } = Kt({
|
|
280
280
|
enabled: e.columnVirtualization,
|
|
281
281
|
columns: h,
|
|
282
|
-
tableViewPortWidth:
|
|
283
|
-
scrollLeft:
|
|
284
|
-
getColSpan:
|
|
282
|
+
tableViewPortWidth: Ct,
|
|
283
|
+
scrollLeft: yt,
|
|
284
|
+
getColSpan: We,
|
|
285
285
|
dataItem: t.dataItem
|
|
286
286
|
}), I = h.filter((r, y) => !P[y]);
|
|
287
287
|
return {
|
|
288
288
|
row: h.map((r, y) => {
|
|
289
|
-
var
|
|
289
|
+
var Ke, Ae, Be, Ve;
|
|
290
290
|
if (P[y])
|
|
291
291
|
return null;
|
|
292
292
|
if (c > 0)
|
|
293
293
|
return c--, null;
|
|
294
294
|
let w;
|
|
295
|
-
if ((
|
|
296
|
-
const v = r.field ? (
|
|
297
|
-
w = { value: v, count: 1 }, o[r.field] && ((
|
|
295
|
+
if ((Ke = r.rowSpannable) != null && Ke.enabled && t.rowType === "data" && r.field && o) {
|
|
296
|
+
const v = r.field ? (Be = (Ae = r.rowSpannable).valueGetter) == null ? void 0 : Be.call(Ae, t.dataItem, r.field) : null;
|
|
297
|
+
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
298
|
}
|
|
299
|
-
const { colSpan: L, colsToSkip: ee } =
|
|
299
|
+
const { colSpan: L, colsToSkip: ee } = ct(
|
|
300
300
|
r,
|
|
301
301
|
t.dataItem,
|
|
302
302
|
I,
|
|
@@ -305,18 +305,18 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
305
305
|
g[y]
|
|
306
306
|
);
|
|
307
307
|
c = ee;
|
|
308
|
-
const _ = r.id ? r.id : y,
|
|
308
|
+
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
309
|
let te = !1;
|
|
310
310
|
if (r.editable && (e.editable || e.editField)) {
|
|
311
|
-
const v = e.editField ?
|
|
311
|
+
const v = e.editField ? Me(e.editField, t.dataItem) : e.edit && e.dataItemKey ? e.edit[K(e.dataItemKey)(t.dataItem)] : void 0, ae = typeof v == "boolean" ? v : Array.isArray(v) ? v.indexOf(r.field) > -1 : r.field !== void 0 && v === r.field;
|
|
312
312
|
ae && r.columnType === "data" && (ae === !0 || ae === r.field) && (s = !0, te = !0);
|
|
313
313
|
}
|
|
314
|
-
const le = r.cell || te && Vt || Zt,
|
|
314
|
+
const le = r.cell || te && Vt || Zt, Rt = e.expandField && e.detail && r.field === e.expandField || r._type === "expand", H = {
|
|
315
315
|
locked: e.lockGroups,
|
|
316
316
|
id: O.generateNavigatableId(
|
|
317
317
|
`${n}-${String(y)}`,
|
|
318
318
|
G,
|
|
319
|
-
|
|
319
|
+
Rt || t.rowType === "groupHeader" || t.rowType === "groupFooter" || r.field === "value" ? "nodata" : "cell"
|
|
320
320
|
),
|
|
321
321
|
colSpan: L,
|
|
322
322
|
dataItem: t.dataItem,
|
|
@@ -325,7 +325,7 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
325
325
|
format: r.format,
|
|
326
326
|
columnType: r.columnType,
|
|
327
327
|
rowReorderable: F,
|
|
328
|
-
className:
|
|
328
|
+
className: It,
|
|
329
329
|
render: e.cellRender,
|
|
330
330
|
cells: Qt(e.cells, r.cells),
|
|
331
331
|
columnIndex: y,
|
|
@@ -335,17 +335,17 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
335
335
|
expanded: t.expanded,
|
|
336
336
|
dataIndex: t.dataIndex,
|
|
337
337
|
rowDataIndex: d,
|
|
338
|
-
columnPosition:
|
|
338
|
+
columnPosition: vt,
|
|
339
339
|
style: {},
|
|
340
340
|
ariaColumnIndex: r.ariaColumnIndex,
|
|
341
341
|
isSelected: (r == null ? void 0 : r._type) === "edit" ? a : Array.isArray(a) && a.indexOf(y) > -1,
|
|
342
|
-
isSorted: !!
|
|
342
|
+
isSorted: !!ze(r.field, e.sort),
|
|
343
343
|
isInEdit: te,
|
|
344
344
|
isAlt: i,
|
|
345
345
|
unstyled: N,
|
|
346
346
|
group: t.group,
|
|
347
347
|
localization: M,
|
|
348
|
-
intl:
|
|
348
|
+
intl: mt,
|
|
349
349
|
_rowSpan: w
|
|
350
350
|
};
|
|
351
351
|
return r.cell ? /* @__PURE__ */ l.createElement(
|
|
@@ -365,26 +365,26 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
365
365
|
isSelected: typeof a == "boolean" && a
|
|
366
366
|
};
|
|
367
367
|
};
|
|
368
|
-
let
|
|
368
|
+
let be = 0;
|
|
369
369
|
if (T && Q)
|
|
370
370
|
for (let t = 0; t < Q.topCacheCount + Q.attendedSkip - (e.skip || 0); t++) {
|
|
371
371
|
const n = b.shift();
|
|
372
372
|
if (n)
|
|
373
|
-
b.push(n),
|
|
373
|
+
b.push(n), be++, n.rowType === "groupHeader" && t--;
|
|
374
374
|
else
|
|
375
375
|
break;
|
|
376
376
|
}
|
|
377
|
-
const
|
|
378
|
-
let
|
|
379
|
-
const Z = [],
|
|
377
|
+
const he = (t) => t >= b.length - be;
|
|
378
|
+
let ye = e.skip || 0;
|
|
379
|
+
const Z = [], Ce = !b.length, we = k.length + (e.filterable ? 1 : 0) + 1;
|
|
380
380
|
let V = 0;
|
|
381
381
|
if (b.length) {
|
|
382
382
|
let t = -1, n = 0;
|
|
383
383
|
const d = ce.enabled ? {} : void 0;
|
|
384
384
|
(z || b).forEach((i, o) => {
|
|
385
|
-
i.rowType === "data" && (
|
|
386
|
-
const s =
|
|
387
|
-
if (V = c +
|
|
385
|
+
i.rowType === "data" && (ye++, t++);
|
|
386
|
+
const s = ye % 2 === 0, a = e.dataItemKey && K(e.dataItemKey)(i.dataItem), c = o + (e.skip || 0), g = a || "ai" + c, P = g + "_1", I = wt(i, g, t, s, d);
|
|
387
|
+
if (V = c + we + n, Z.push(
|
|
388
388
|
/* @__PURE__ */ l.createElement(
|
|
389
389
|
pt,
|
|
390
390
|
{
|
|
@@ -394,7 +394,7 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
394
394
|
isInEdit: I.isInEdit,
|
|
395
395
|
rowType: i.rowType,
|
|
396
396
|
isRowReorderable: F,
|
|
397
|
-
isHidden:
|
|
397
|
+
isHidden: he(o),
|
|
398
398
|
onClick: null,
|
|
399
399
|
onDoubleClick: null,
|
|
400
400
|
selectedField: e.selectedField,
|
|
@@ -410,14 +410,14 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
410
410
|
)
|
|
411
411
|
), e.detail && i.rowType === "data" && i.expanded) {
|
|
412
412
|
const r = h.length - (e.expandField || B.enabled ? 1 : 0) - (e.group ? e.group.length : 0) || 1;
|
|
413
|
-
n++, V = c +
|
|
413
|
+
n++, V = c + we + n, Z.push(
|
|
414
414
|
/* @__PURE__ */ l.createElement(
|
|
415
415
|
"tr",
|
|
416
416
|
{
|
|
417
417
|
key: P,
|
|
418
418
|
className: f(u.detailTr({ isAlt: s })),
|
|
419
419
|
style: {
|
|
420
|
-
visibility:
|
|
420
|
+
visibility: he(o) ? "hidden" : "",
|
|
421
421
|
height: e.detailRowHeight
|
|
422
422
|
},
|
|
423
423
|
role: "row",
|
|
@@ -427,7 +427,7 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
427
427
|
var _;
|
|
428
428
|
const L = (_ = I == null ? void 0 : I.row[w]) == null ? void 0 : _.props.style, ee = L ? { left: L.left, right: L.right } : {};
|
|
429
429
|
return /* @__PURE__ */ l.createElement(
|
|
430
|
-
|
|
430
|
+
$e,
|
|
431
431
|
{
|
|
432
432
|
id: "",
|
|
433
433
|
dataIndex: i.dataIndex,
|
|
@@ -467,13 +467,13 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
467
467
|
}
|
|
468
468
|
});
|
|
469
469
|
}
|
|
470
|
-
const
|
|
470
|
+
const Ee = {
|
|
471
471
|
size: S,
|
|
472
472
|
total: R,
|
|
473
473
|
skip: e.skip || 0,
|
|
474
474
|
take: (e.take !== void 0 ? e.take : e.pageSize) || 10,
|
|
475
475
|
...ll(e.pageable || {})
|
|
476
|
-
},
|
|
476
|
+
}, Se = /* @__PURE__ */ l.createElement(dl, null, e.pager ? /* @__PURE__ */ l.createElement(e.pager, { ...Ee }) : /* @__PURE__ */ l.createElement(Pt, { className: f(u.pager({})), ...Ee })), Et = (t, n) => /* @__PURE__ */ l.createElement("col", { key: n.toString(), width: re(t) }), St = (He = e.cells) != null && He.footerCell || m.some((t) => {
|
|
477
477
|
var n;
|
|
478
478
|
return !!(t.footerCell || (n = t.cells) != null && n.footerCell);
|
|
479
479
|
}) ? /* @__PURE__ */ l.createElement(
|
|
@@ -490,16 +490,16 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
490
490
|
ariaRowIndex: V + 1
|
|
491
491
|
}
|
|
492
492
|
),
|
|
493
|
-
cols: h.map(
|
|
493
|
+
cols: h.map(Et)
|
|
494
494
|
}
|
|
495
|
-
) : null,
|
|
495
|
+
) : null, Ie = /* @__PURE__ */ l.createElement(il, null, h.map((t, n) => /* @__PURE__ */ l.createElement(
|
|
496
496
|
"col",
|
|
497
497
|
{
|
|
498
498
|
key: n.toString(),
|
|
499
|
-
className:
|
|
499
|
+
className: ze(t.field, e.sort) ? f(u.sorted({})) : void 0,
|
|
500
500
|
width: re(t)
|
|
501
501
|
}
|
|
502
|
-
))),
|
|
502
|
+
))), ve = e.reorderable || A, { detail: Il, cells: vl, rows: Rl, ...Re } = e, xe = /* @__PURE__ */ l.createElement(
|
|
503
503
|
"tbody",
|
|
504
504
|
{
|
|
505
505
|
role: "rowgroup",
|
|
@@ -508,7 +508,7 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
508
508
|
},
|
|
509
509
|
Z
|
|
510
510
|
);
|
|
511
|
-
let p =
|
|
511
|
+
let p = xe;
|
|
512
512
|
if (F && (p = /* @__PURE__ */ l.createElement(
|
|
513
513
|
bl,
|
|
514
514
|
{
|
|
@@ -516,13 +516,13 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
516
516
|
columns: m,
|
|
517
517
|
rowReorderSettings: e.rowReorderable
|
|
518
518
|
},
|
|
519
|
-
|
|
519
|
+
xe
|
|
520
520
|
)), e.scrollable === "none")
|
|
521
521
|
return /* @__PURE__ */ l.createElement(
|
|
522
|
-
|
|
522
|
+
Je,
|
|
523
523
|
{
|
|
524
524
|
gridRef: ie,
|
|
525
|
-
gridProps:
|
|
525
|
+
gridProps: Re,
|
|
526
526
|
columnsRef: J(),
|
|
527
527
|
columnsMapRef: k,
|
|
528
528
|
columnsState: E,
|
|
@@ -534,40 +534,41 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
534
534
|
isAllData: q(),
|
|
535
535
|
detailExpandable: !!e.detail
|
|
536
536
|
},
|
|
537
|
-
/* @__PURE__ */ l.createElement(
|
|
537
|
+
/* @__PURE__ */ l.createElement(Ze, null, /* @__PURE__ */ l.createElement(
|
|
538
538
|
"div",
|
|
539
539
|
{
|
|
540
540
|
id: e.id,
|
|
541
541
|
style: e.style,
|
|
542
542
|
className: f(u.wrapper({ size: S }), e.className),
|
|
543
543
|
"aria-label": e.ariaLabel,
|
|
544
|
-
...
|
|
544
|
+
..._e
|
|
545
545
|
},
|
|
546
|
-
|
|
547
|
-
|
|
546
|
+
me,
|
|
547
|
+
fe,
|
|
548
548
|
/* @__PURE__ */ l.createElement(
|
|
549
549
|
ol,
|
|
550
550
|
{
|
|
551
551
|
selectable: e.selectable,
|
|
552
552
|
className: f(u.table({ size: S }))
|
|
553
553
|
},
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
/* @__PURE__ */ l.createElement(
|
|
554
|
+
Ie,
|
|
555
|
+
ge,
|
|
556
|
+
/* @__PURE__ */ l.createElement(Ye, { rowReorderable: F }, p)
|
|
557
557
|
),
|
|
558
|
-
|
|
559
|
-
|
|
558
|
+
Ce && /* @__PURE__ */ l.createElement(qe, null, $.length ? $ : /* @__PURE__ */ l.createElement(je, null)),
|
|
559
|
+
ve && /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement(Qe, null), /* @__PURE__ */ l.createElement(Xe, null))
|
|
560
560
|
)),
|
|
561
|
-
|
|
562
|
-
e.pageable &&
|
|
563
|
-
/* @__PURE__ */ l.createElement(
|
|
561
|
+
ue,
|
|
562
|
+
e.pageable && Se,
|
|
563
|
+
/* @__PURE__ */ l.createElement(et, { loader: e.loader, showLoader: e.showLoader }),
|
|
564
|
+
se && /* @__PURE__ */ l.createElement(Le, null)
|
|
564
565
|
);
|
|
565
566
|
let j = e.style || {};
|
|
566
567
|
return T && (j.height || (j = Object.assign({}, j, { height: "450px" }))), /* @__PURE__ */ l.createElement(
|
|
567
|
-
|
|
568
|
+
Je,
|
|
568
569
|
{
|
|
569
570
|
gridRef: ie,
|
|
570
|
-
gridProps:
|
|
571
|
+
gridProps: Re,
|
|
571
572
|
columnsRef: J(),
|
|
572
573
|
columnsMapRef: k,
|
|
573
574
|
columnsState: E,
|
|
@@ -578,7 +579,7 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
578
579
|
total: R,
|
|
579
580
|
detailExpandable: !!e.detail
|
|
580
581
|
},
|
|
581
|
-
/* @__PURE__ */ l.createElement(
|
|
582
|
+
/* @__PURE__ */ l.createElement(Ze, null, /* @__PURE__ */ l.createElement(
|
|
582
583
|
"div",
|
|
583
584
|
{
|
|
584
585
|
id: e.id,
|
|
@@ -591,10 +592,10 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
591
592
|
e.className
|
|
592
593
|
),
|
|
593
594
|
"aria-label": e.ariaLabel,
|
|
594
|
-
...
|
|
595
|
+
..._e
|
|
595
596
|
},
|
|
596
|
-
|
|
597
|
-
|
|
597
|
+
me,
|
|
598
|
+
fe,
|
|
598
599
|
/* @__PURE__ */ l.createElement(
|
|
599
600
|
"div",
|
|
600
601
|
{
|
|
@@ -603,9 +604,9 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
603
604
|
"aria-colcount": h.length,
|
|
604
605
|
"aria-rowcount": R,
|
|
605
606
|
id: x,
|
|
606
|
-
"aria-label": M.toLanguageString(
|
|
607
|
+
"aria-label": M.toLanguageString(pe, ul[pe])
|
|
607
608
|
},
|
|
608
|
-
|
|
609
|
+
ge,
|
|
609
610
|
/* @__PURE__ */ l.createElement("div", { className: f(u.container({})), role: "presentation" }, /* @__PURE__ */ l.createElement(sl, null, /* @__PURE__ */ l.createElement("div", { className: f(u.content({})), role: "presentation" }, /* @__PURE__ */ l.createElement("div", { className: f(u.tableWrap({})), role: "presentation" }, /* @__PURE__ */ l.createElement(
|
|
610
611
|
cl,
|
|
611
612
|
{
|
|
@@ -615,11 +616,11 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
615
616
|
size: S
|
|
616
617
|
})
|
|
617
618
|
),
|
|
618
|
-
tableStyle: { userSelect:
|
|
619
|
+
tableStyle: { userSelect: ht }
|
|
619
620
|
},
|
|
620
|
-
|
|
621
|
-
/* @__PURE__ */ l.createElement(
|
|
622
|
-
),
|
|
621
|
+
Ie,
|
|
622
|
+
/* @__PURE__ */ l.createElement(Ye, { rowReorderable: F }, p)
|
|
623
|
+
), Ce && /* @__PURE__ */ l.createElement(qe, null, $.length ? $ : /* @__PURE__ */ l.createElement(je, null))), T && /* @__PURE__ */ l.createElement(
|
|
623
624
|
"div",
|
|
624
625
|
{
|
|
625
626
|
className: f(u.heightContainer({})),
|
|
@@ -627,13 +628,13 @@ const Sl = l.forwardRef((e, ie) => {
|
|
|
627
628
|
},
|
|
628
629
|
/* @__PURE__ */ l.createElement(ml, { isVirtualScroll: T })
|
|
629
630
|
)))),
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
631
|
+
St,
|
|
632
|
+
ve && /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement(Qe, null), /* @__PURE__ */ l.createElement(Xe, null)),
|
|
633
|
+
se && /* @__PURE__ */ l.createElement(Le, null)
|
|
633
634
|
),
|
|
634
|
-
|
|
635
|
-
e.pageable &&
|
|
636
|
-
/* @__PURE__ */ l.createElement(
|
|
635
|
+
ue,
|
|
636
|
+
e.pageable && Se,
|
|
637
|
+
/* @__PURE__ */ l.createElement(et, { loader: e.loader, showLoader: e.showLoader })
|
|
637
638
|
))
|
|
638
639
|
);
|
|
639
640
|
});
|