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