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