@progress/kendo-react-grid 11.0.0-develop.13 → 11.0.0-develop.15
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/BasePDFExport.js +1 -1
- package/BasePDFExport.mjs +21 -21
- package/GridClientWrapper.js +1 -1
- package/GridClientWrapper.mjs +1 -1
- package/GridComponent.js +1 -1
- package/GridComponent.mjs +136 -136
- package/codemods/v11/cell-render.js +9 -0
- package/codemods/v11/column-cell.js +9 -0
- package/codemods/v11/column-filter-cell.js +9 -0
- package/codemods/v11/column-footer-cell.js +9 -0
- package/codemods/v11/column-header-cell.js +9 -0
- package/codemods/v11/detail-expand-state.js +9 -0
- package/codemods/v11/edit-state.js +9 -0
- package/codemods/v11/filter-cell-render.js +9 -0
- package/codemods/v11/group-expand-state.js +9 -0
- package/codemods/v11/header-cell-render.js +9 -0
- package/codemods/v11/index.js +9 -0
- package/codemods/v11/row-render.js +9 -0
- package/codemods/v11/selection-state.js +9 -0
- package/codemods/v11/utils.js +9 -0
- 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 +77 -21
- package/codemods/index.js +0 -8
package/GridComponent.mjs
CHANGED
|
@@ -6,63 +6,63 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as a from "react";
|
|
9
|
-
import { uGrid as
|
|
10
|
-
import { process as
|
|
11
|
-
import { combineFilters as
|
|
12
|
-
import { GridHierarchyCell as
|
|
13
|
-
import { GridEditCell as
|
|
14
|
-
import { Header as
|
|
15
|
-
import { HeaderRow as
|
|
16
|
-
import { FilterRow as
|
|
17
|
-
import { GroupPanel as
|
|
18
|
-
import { Footer as
|
|
19
|
-
import { isRowReorderEnabled as
|
|
20
|
-
import { GridCell as
|
|
9
|
+
import { uGrid as Nt, hasValidLicense as Dt, validatePackage as Tt, getter as H, classNames as f, WatermarkOverlay as $e } from "@progress/kendo-react-common";
|
|
10
|
+
import { process as Ht } from "@progress/kendo-data-query";
|
|
11
|
+
import { combineFilters as Pt, getDetailExpandableOptions as Kt, getGroupExpandableOptions as At, getSelectionOptions as Bt, tableKeyboardNavigationTools as O, Pager as Ft, tableKeyboardNavigationBodyAttributes as Lt, tableKeyboardNavigationScopeAttributes as je } from "@progress/kendo-react-data-tools";
|
|
12
|
+
import { GridHierarchyCell as Mt } from "./cells/hierarchycell/GridHierarchyCell.mjs";
|
|
13
|
+
import { GridEditCell as Ot } from "./cells/editcell/GridEditCell.mjs";
|
|
14
|
+
import { Header as zt } from "./header/Header.mjs";
|
|
15
|
+
import { HeaderRow as _t } from "./header/HeaderRow.mjs";
|
|
16
|
+
import { FilterRow as Vt } from "./header/FilterRow.mjs";
|
|
17
|
+
import { GroupPanel as Wt } from "./header/GroupPanel.mjs";
|
|
18
|
+
import { Footer as $t } from "./footer/Footer.mjs";
|
|
19
|
+
import { isRowReorderEnabled as jt, getRowSpanOptions as Ue, getColumnWidth as ne, isSorted as qe, flatData as Ut, autoGenerateColumns as qt, mapColumns as Jt, clientColumn as Qt, getFlatColumnsState as Xt, getColumnState as oe, getColSpan as Yt, resolveCells as Zt, readColumns as pt } from "./utils/index.mjs";
|
|
20
|
+
import { GridCell as el } from "./cells/datacell/GridCell.mjs";
|
|
21
21
|
import { GridGroupCell as Je } from "./cells/groupcell/GridGroupCell.mjs";
|
|
22
|
-
import { GridRow as
|
|
23
|
-
import { GridHeaderSelectionCell as
|
|
22
|
+
import { GridRow as tl } from "./rows/GridRow.mjs";
|
|
23
|
+
import { GridHeaderSelectionCell as ll } from "./header/GridHeaderSelectionCell.mjs";
|
|
24
24
|
import { GridNoRecords as Qe } from "./components/noRecords/GridNoRecords.mjs";
|
|
25
25
|
import { operators as Xe } from "./filterCommon.mjs";
|
|
26
|
-
import { FooterRow as
|
|
27
|
-
import { normalize as
|
|
28
|
-
import { packageMetadata as
|
|
29
|
-
import { GridDetailCell as
|
|
30
|
-
import { GridDetailHierarchyCell as
|
|
31
|
-
import { GridNoRecordsContainer as
|
|
32
|
-
import { GridClientWrapper as
|
|
33
|
-
import { GridColGroup as
|
|
34
|
-
import { GridTable as
|
|
35
|
-
import { GridDropClue as
|
|
36
|
-
import { GridDragClue as
|
|
37
|
-
import { GridTableBody as
|
|
38
|
-
import { PagerContainer as
|
|
39
|
-
import { GridTableScrollable as
|
|
40
|
-
import { GridElementContainer as
|
|
41
|
-
import { GridContainerElementContainer as
|
|
42
|
-
import { VirtualScrollHeightContainer as
|
|
43
|
-
import { gridAriaLabel as
|
|
44
|
-
import { GridReorderableRowsContainer as
|
|
45
|
-
import { GridRowReorderCell as
|
|
46
|
-
import { GridHeaderRowReorderCell as
|
|
47
|
-
import { GridLoader as
|
|
48
|
-
import { gridPremiumFeatures as
|
|
49
|
-
import { LocalizationService as
|
|
50
|
-
import { getVirtualCellsToRender as
|
|
51
|
-
import { GridEditDialog as
|
|
52
|
-
import { GridCellServer as
|
|
53
|
-
import { GridEditCellServer as
|
|
54
|
-
import { GridSelectionCellServer as
|
|
55
|
-
import { GridSelectionCell as
|
|
56
|
-
import { GridHierarchyCellServer as
|
|
57
|
-
import { GridRowReorderCellServer as
|
|
58
|
-
import { GridDetailCellServer as
|
|
59
|
-
import { GridGroupCellServer as
|
|
60
|
-
const
|
|
61
|
-
var Te, He, Pe, Ke, Ae, Be, Fe,
|
|
26
|
+
import { FooterRow as al } from "./footer/FooterRow.mjs";
|
|
27
|
+
import { normalize as rl } from "./paging/GridPagerSettings.mjs";
|
|
28
|
+
import { packageMetadata as Ye } from "./package-metadata.mjs";
|
|
29
|
+
import { GridDetailCell as nl } from "./cells/detailcell/GridDetailCell.mjs";
|
|
30
|
+
import { GridDetailHierarchyCell as ol } from "./cells/GridDetailHierarchyCell.mjs";
|
|
31
|
+
import { GridNoRecordsContainer as Ze } from "./components/noRecords/GridNoRecordsContainer.mjs";
|
|
32
|
+
import { GridClientWrapper as pe } from "./GridClientWrapper.mjs";
|
|
33
|
+
import { GridColGroup as il } from "./components/colGroup/GridColGroup.mjs";
|
|
34
|
+
import { GridTable as dl } from "./components/table/GridTable.mjs";
|
|
35
|
+
import { GridDropClue as et } from "./components/GridDropClue.mjs";
|
|
36
|
+
import { GridDragClue as tt } from "./components/GridDragClue.mjs";
|
|
37
|
+
import { GridTableBody as lt } from "./components/table/GridTableBody.mjs";
|
|
38
|
+
import { PagerContainer as cl } from "./components/PagerContainer.mjs";
|
|
39
|
+
import { GridTableScrollable as ml } from "./components/table/GridTableScrollable.mjs";
|
|
40
|
+
import { GridElementContainer as at } from "./components/GridElementContainer.mjs";
|
|
41
|
+
import { GridContainerElementContainer as ul } from "./components/GridContainerElementContainer.mjs";
|
|
42
|
+
import { VirtualScrollHeightContainer as sl } from "./components/VirtualScrollHeightContainer.mjs";
|
|
43
|
+
import { gridAriaLabel as rt, messages as fl } from "./messages/index.mjs";
|
|
44
|
+
import { GridReorderableRowsContainer as gl } from "./components/GridDraggableRowsContainer.mjs";
|
|
45
|
+
import { GridRowReorderCell as bl } from "./cells/rowreordercell/GridRowReorderCell.mjs";
|
|
46
|
+
import { GridHeaderRowReorderCell as hl } from "./header/client/GridHeaderRowReorderCell.mjs";
|
|
47
|
+
import { GridLoader as nt } from "./components/GridLoader.mjs";
|
|
48
|
+
import { gridPremiumFeatures as Cl } from "./utils/premium.mjs";
|
|
49
|
+
import { LocalizationService as yl, IntlService as wl } from "@progress/kendo-react-intl";
|
|
50
|
+
import { getVirtualCellsToRender as El } from "./utils/virtualColumns.mjs";
|
|
51
|
+
import { GridEditDialog as Sl } from "./components/GridEditDialog.mjs";
|
|
52
|
+
import { GridCellServer as Il } from "./cells/datacell/GridCellServer.mjs";
|
|
53
|
+
import { GridEditCellServer as vl } from "./cells/editcell/GridEditCellServer.mjs";
|
|
54
|
+
import { GridSelectionCellServer as Rl } from "./cells/selectioncell/GridSelectionCellServer.mjs";
|
|
55
|
+
import { GridSelectionCell as Gl } from "./cells/selectioncell/GridSelectionCell.mjs";
|
|
56
|
+
import { GridHierarchyCellServer as xl } from "./cells/hierarchycell/GridHierarchyCellServer.mjs";
|
|
57
|
+
import { GridRowReorderCellServer as kl } from "./cells/rowreordercell/GridRowReorderCellServer.mjs";
|
|
58
|
+
import { GridDetailCellServer as Nl } from "./cells/detailcell/GridDetailCellServer.mjs";
|
|
59
|
+
import { GridGroupCellServer as Dl } from "./cells/groupcell/GridGroupCellServer.mjs";
|
|
60
|
+
const Tl = a.forwardRef((e, ie) => {
|
|
61
|
+
var Te, He, Pe, Ke, Ae, Be, Fe, Le, Me, Oe, ze, _e;
|
|
62
62
|
const R = e.id + "-role-element-id", G = e.navigatable ? R : "";
|
|
63
63
|
let E = e.columnsState || [];
|
|
64
|
-
const
|
|
65
|
-
const u = [], T =
|
|
64
|
+
const ot = (t, o, n, d, i, l, c) => {
|
|
65
|
+
const u = [], T = Ut(
|
|
66
66
|
u,
|
|
67
67
|
t,
|
|
68
68
|
o,
|
|
@@ -70,16 +70,16 @@ const Dl = a.forwardRef((e, ie) => {
|
|
|
70
70
|
d !== void 0,
|
|
71
71
|
i,
|
|
72
72
|
l,
|
|
73
|
-
|
|
73
|
+
Et.defaultExpand,
|
|
74
74
|
c
|
|
75
75
|
);
|
|
76
76
|
return { flattedData: u, resolvedGroupsCount: T };
|
|
77
|
-
},
|
|
77
|
+
}, it = (t) => {
|
|
78
78
|
const o = t.filter(
|
|
79
79
|
(n) => n && n.type && n.type.displayName === "KendoReactGridColumn"
|
|
80
80
|
);
|
|
81
|
-
return
|
|
82
|
-
},
|
|
81
|
+
return pt(o, E, { prevId: 0, idPrefix: G });
|
|
82
|
+
}, dt = () => {
|
|
83
83
|
const t = [], o = (n, d) => n == null ? void 0 : n.forEach((i) => {
|
|
84
84
|
const l = i.hidden || d;
|
|
85
85
|
t.push({
|
|
@@ -88,14 +88,14 @@ const Dl = a.forwardRef((e, ie) => {
|
|
|
88
88
|
}), o(i.children, l);
|
|
89
89
|
});
|
|
90
90
|
return o(E, !1), t;
|
|
91
|
-
},
|
|
92
|
-
const o =
|
|
91
|
+
}, ct = (t) => {
|
|
92
|
+
const o = dt();
|
|
93
93
|
return t.filter((n) => {
|
|
94
94
|
var d;
|
|
95
95
|
return !n.hidden && !((d = o.find((i) => i.id === n.id)) != null && d.hidden);
|
|
96
96
|
});
|
|
97
|
-
},
|
|
98
|
-
m =
|
|
97
|
+
}, mt = (t, o) => {
|
|
98
|
+
m = it(t), m.filter((n) => !n.hidden).length === 0 && (m = qt(
|
|
99
99
|
C,
|
|
100
100
|
e.group,
|
|
101
101
|
{
|
|
@@ -105,22 +105,22 @@ const Dl = a.forwardRef((e, ie) => {
|
|
|
105
105
|
prevId: 0,
|
|
106
106
|
idPrefix: G
|
|
107
107
|
}
|
|
108
|
-
)),
|
|
109
|
-
},
|
|
108
|
+
)), st(m, o), m = ct(m), x = Jt(m, !0), me = m.map(Qt);
|
|
109
|
+
}, ut = (t, o) => {
|
|
110
110
|
const n = (d) => {
|
|
111
111
|
var l;
|
|
112
112
|
const i = o.find((c) => c.id === d.id);
|
|
113
113
|
return i ? (i.children = (l = d.children) == null ? void 0 : l.map(n), i) : oe(d);
|
|
114
114
|
};
|
|
115
115
|
E = t.filter((d) => d.parentIndex === -1).map(n);
|
|
116
|
-
},
|
|
116
|
+
}, st = (t, o) => {
|
|
117
117
|
t.filter((l) => l.columnType === "checkbox").forEach((l) => {
|
|
118
|
-
l.width = l.width || "50px", l.defaultCell = e.isClient ?
|
|
118
|
+
l.width = l.width || "50px", l.defaultCell = e.isClient ? Gl : Rl, l.defaultHeaderCell = ll, l._type = "edit";
|
|
119
119
|
}), N !== void 0 && t.filter((l) => l.columnType === "reorder").forEach((l) => {
|
|
120
|
-
l.width = l.width || "50px", l.defaultCell = e.isClient ?
|
|
120
|
+
l.width = l.width || "50px", l.defaultCell = e.isClient ? bl : kl, l.defaultHeaderCell = hl, l.sortable = !1, l.filterable = !1, l.editable = !1;
|
|
121
121
|
});
|
|
122
|
-
const n =
|
|
123
|
-
|
|
122
|
+
const n = Xt(E);
|
|
123
|
+
ut(t, n);
|
|
124
124
|
const d = {
|
|
125
125
|
id: "",
|
|
126
126
|
resizable: !0,
|
|
@@ -147,7 +147,7 @@ const Dl = a.forwardRef((e, ie) => {
|
|
|
147
147
|
...d,
|
|
148
148
|
_type: "expand",
|
|
149
149
|
id: O.generateNavigatableId(`${i++}`, "expand", "column"),
|
|
150
|
-
defaultCell: e.isClient ?
|
|
150
|
+
defaultCell: e.isClient ? Mt : xl,
|
|
151
151
|
field: P.column,
|
|
152
152
|
headerClassName: f(s.hierarchyCell({}))
|
|
153
153
|
};
|
|
@@ -157,7 +157,7 @@ const Dl = a.forwardRef((e, ie) => {
|
|
|
157
157
|
const c = {
|
|
158
158
|
...d,
|
|
159
159
|
isAccessible: !1,
|
|
160
|
-
defaultCell: e.isClient ? Je :
|
|
160
|
+
defaultCell: e.isClient ? Je : Dl,
|
|
161
161
|
id: O.generateNavigatableId(`${i++}`, "group", "column"),
|
|
162
162
|
field: "value",
|
|
163
163
|
locked: e.lockGroups
|
|
@@ -176,15 +176,15 @@ const Dl = a.forwardRef((e, ie) => {
|
|
|
176
176
|
d--, n && (n.width += c);
|
|
177
177
|
return;
|
|
178
178
|
}
|
|
179
|
-
const u = Math.min(
|
|
179
|
+
const u = Math.min(Yt(i, t), g.length - l);
|
|
180
180
|
d = u - 1, n = {
|
|
181
181
|
width: c,
|
|
182
182
|
colSpan: u,
|
|
183
183
|
columnIndex: l
|
|
184
184
|
}, o.push(n);
|
|
185
185
|
}), e.columnVirtualization) {
|
|
186
|
-
const i =
|
|
187
|
-
return
|
|
186
|
+
const i = gt.current || 0, l = bt.current || parseFloat(((e.style || {}).width || "").toString());
|
|
187
|
+
return El({
|
|
188
188
|
cellModels: o,
|
|
189
189
|
columns: g,
|
|
190
190
|
tableViewPortWidth: l,
|
|
@@ -192,7 +192,7 @@ const Dl = a.forwardRef((e, ie) => {
|
|
|
192
192
|
});
|
|
193
193
|
}
|
|
194
194
|
return o;
|
|
195
|
-
},
|
|
195
|
+
}, ft = () => {
|
|
196
196
|
const { pageable: t, take: o, pageSize: n } = e;
|
|
197
197
|
if (!h)
|
|
198
198
|
return 0;
|
|
@@ -202,11 +202,11 @@ const Dl = a.forwardRef((e, ie) => {
|
|
|
202
202
|
if (n)
|
|
203
203
|
return n;
|
|
204
204
|
}
|
|
205
|
-
const d = e.rowHeight ||
|
|
205
|
+
const d = e.rowHeight || Ct.current, i = ht.current;
|
|
206
206
|
return i && d ? Math.ceil(i / d * 1.5) : 0;
|
|
207
207
|
};
|
|
208
208
|
let b = [], ce, m = [], me = [], x = [[]];
|
|
209
|
-
const
|
|
209
|
+
const gt = e.scrollLeftRef || { current: 0 }, bt = e.widthRef || { current: 0 }, ht = e.containerHeightRef || { current: 0 }, Ct = e.minRowHeightRef || { current: 0 }, z = e.localization || new yl(e.language), yt = e.intl || new wl((Te = e.locale) != null ? Te : "en"), k = e.unstyled, s = k && k.uGrid ? k.uGrid : Nt, N = jt(e.rowReorderable), h = e.scrollable === "virtual" || e.scrollable === void 0 && Dt(Ye), D = e.autoProcessData === !0 ? {
|
|
210
210
|
group: !0,
|
|
211
211
|
sort: !0,
|
|
212
212
|
filter: !0,
|
|
@@ -215,10 +215,10 @@ const Dl = a.forwardRef((e, ie) => {
|
|
|
215
215
|
} : e.autoProcessData;
|
|
216
216
|
let C, v;
|
|
217
217
|
if (Array.isArray(e.data) ? (C = e.data, v = (He = e.total) != null ? He : C.length) : (C = ((Pe = e.data) == null ? void 0 : Pe.data) || [], v = (Be = (Ae = e.total) != null ? Ae : (Ke = e.data) == null ? void 0 : Ke.total) != null ? Be : C.length), D) {
|
|
218
|
-
const t = D.page && !(h && !e.pageable), { data: o, total: n } =
|
|
218
|
+
const t = D.page && !(h && !e.pageable), { data: o, total: n } = Ht(C, {
|
|
219
219
|
group: D.group ? e.group : void 0,
|
|
220
220
|
sort: D.sort ? e.sort : void 0,
|
|
221
|
-
filter:
|
|
221
|
+
filter: Pt(
|
|
222
222
|
D.filter ? e.filter : void 0,
|
|
223
223
|
D.search ? e.search : void 0
|
|
224
224
|
),
|
|
@@ -229,42 +229,42 @@ const Dl = a.forwardRef((e, ie) => {
|
|
|
229
229
|
});
|
|
230
230
|
C = o, v = (Fe = e.total) != null ? Fe : n;
|
|
231
231
|
}
|
|
232
|
-
const _ = C.length === v, { size: S = "medium" } = e,
|
|
232
|
+
const _ = C.length === v, { size: S = "medium" } = e, wt = typeof e.groupable == "object" && e.groupable.footer || "none", V = e.groupable === !0 || typeof e.groupable == "object" && e.groupable.enabled !== !1, P = Kt(!!e.detail), Et = At(
|
|
233
233
|
typeof e.groupable == "object" && e.groupable.enabled !== !1 ? e.groupable.expandable : e.groupable
|
|
234
|
-
), ue = !!((
|
|
234
|
+
), ue = !!((Le = e.group) != null && Le.length), { resolvedGroupsCount: St, flattedData: It } = ot(
|
|
235
235
|
C,
|
|
236
|
-
|
|
236
|
+
wt,
|
|
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
|
-
b =
|
|
244
|
-
const q =
|
|
243
|
+
b = It;
|
|
244
|
+
const q = ft(), J = ((Me = e.virtualSkipRef) == null ? void 0 : Me.current) || 0;
|
|
245
245
|
let Q = v;
|
|
246
246
|
if (h) {
|
|
247
247
|
let t = e.skip || 0;
|
|
248
248
|
(ue || e.pageable) && (t = J, Q = b.length), (_ || ue || e.pageable) && (ce = b.slice(t, t + q));
|
|
249
249
|
}
|
|
250
|
-
const se =
|
|
251
|
-
|
|
250
|
+
const se = Bt(e.selectable), fe = Ue(e.rowSpannable), vt = se && se.drag ? "none" : void 0, W = a.useMemo(() => a.Children.toArray(e.children), [e.children]);
|
|
251
|
+
mt(W, St);
|
|
252
252
|
const X = a.useMemo(() => {
|
|
253
|
-
const t =
|
|
253
|
+
const t = Cl(e, m);
|
|
254
254
|
return {
|
|
255
255
|
premium: t.length > 0,
|
|
256
256
|
features: t
|
|
257
257
|
};
|
|
258
|
-
}, [e, m]), ge = a.useMemo(() => X.premium ? !
|
|
258
|
+
}, [e, m]), ge = a.useMemo(() => X.premium ? !Tt(Ye, { component: "Grid", features: X.features }) : !1, [X.premium]), be = W.map((t) => t && t.type && t.type.displayName === "KendoReactGridToolbar" ? a.cloneElement(t, { ...t.props, ariaControls: R }) : null), $ = W.filter((t) => t && t.type && t.type.displayName === "KendoReactGridNoRecords"), he = W.filter(
|
|
259
259
|
(t) => t && t.type && t.type.displayName === "KendoReactGridStatusBar"
|
|
260
|
-
), g = m.filter((t) => t.children.length === 0), Ce = V && /* @__PURE__ */ a.createElement(
|
|
261
|
-
|
|
260
|
+
), g = m.filter((t) => t.children.length === 0), Ce = V && /* @__PURE__ */ a.createElement(Wt, { columns: U(), group: e.group || [], ariaControls: R }), ye = /* @__PURE__ */ a.createElement(
|
|
261
|
+
zt,
|
|
262
262
|
{
|
|
263
263
|
size: S,
|
|
264
264
|
staticHeaders: e.scrollable !== "none",
|
|
265
265
|
draggable: e.reorderable || V,
|
|
266
266
|
headerRow: /* @__PURE__ */ a.createElement(
|
|
267
|
-
|
|
267
|
+
_t,
|
|
268
268
|
{
|
|
269
269
|
cells: e.cells,
|
|
270
270
|
sort: e.sort,
|
|
@@ -287,7 +287,7 @@ const Dl = a.forwardRef((e, ie) => {
|
|
|
287
287
|
}
|
|
288
288
|
),
|
|
289
289
|
filterRow: e.filterable && /* @__PURE__ */ a.createElement(
|
|
290
|
-
|
|
290
|
+
Vt,
|
|
291
291
|
{
|
|
292
292
|
cells: e.cells,
|
|
293
293
|
size: S,
|
|
@@ -305,16 +305,16 @@ const Dl = a.forwardRef((e, ie) => {
|
|
|
305
305
|
), we = g.findIndex((t) => typeof t.colSpan == "function") > -1;
|
|
306
306
|
let Y;
|
|
307
307
|
we || (Y = de(null));
|
|
308
|
-
const Z = ((Oe = e.editable) == null ? void 0 : Oe.mode) === "dialog",
|
|
308
|
+
const Z = ((Oe = e.editable) == null ? void 0 : Oe.mode) === "dialog", Rt = (ze = e.editable) == null ? void 0 : ze.enabled, Gt = (t, o, n, d, i) => {
|
|
309
309
|
let l = !1;
|
|
310
310
|
const c = e.select && e.dataItemKey && H(e.dataItemKey)(t.dataItem) !== void 0 ? e.select[H(e.dataItemKey)(t.dataItem)] : void 0;
|
|
311
311
|
return we && (Y = de(t.dataItem)), {
|
|
312
312
|
row: Y.map(({ columnIndex: u, colSpan: T }) => {
|
|
313
|
-
var j,
|
|
313
|
+
var j, M, Ve, We;
|
|
314
314
|
const r = g[u];
|
|
315
315
|
let y;
|
|
316
316
|
if ((j = r.rowSpannable) != null && j.enabled && t.rowType === "data" && r.field && i) {
|
|
317
|
-
const I = r.field ? (Ve = (
|
|
317
|
+
const I = r.field ? (Ve = (M = r.rowSpannable).valueGetter) == null ? void 0 : Ve.call(M, t.dataItem, r.field) : null;
|
|
318
318
|
y = { value: I, count: 1 }, i[r.field] && ((We = i[r.field]) == null ? void 0 : We.value) === I && i[r.field] !== null ? (i[r.field].count++, y.count = null) : i[r.field] = y;
|
|
319
319
|
}
|
|
320
320
|
const A = r.id ? r.id : u, w = f(s.contentSticky({ locked: r.locked }), r.className), le = r.left !== void 0 ? { left: r.left, right: r.right } : {};
|
|
@@ -338,7 +338,7 @@ const Dl = a.forwardRef((e, ie) => {
|
|
|
338
338
|
columnType: r.columnType,
|
|
339
339
|
rowReorderable: N,
|
|
340
340
|
className: w,
|
|
341
|
-
cells:
|
|
341
|
+
cells: Zt(e.cells, r.cells),
|
|
342
342
|
columnIndex: u,
|
|
343
343
|
columnsCount: g.length,
|
|
344
344
|
rowType: t.rowType,
|
|
@@ -356,17 +356,17 @@ const Dl = a.forwardRef((e, ie) => {
|
|
|
356
356
|
unstyled: k,
|
|
357
357
|
group: t.group,
|
|
358
358
|
localization: z,
|
|
359
|
-
intl:
|
|
359
|
+
intl: yt,
|
|
360
360
|
_rowSpan: y
|
|
361
|
-
},
|
|
362
|
-
return /* @__PURE__ */ a.createElement(
|
|
361
|
+
}, L = r.defaultCell || B && (e.isClient ? Ot : vl) || (e.isClient ? el : Il);
|
|
362
|
+
return /* @__PURE__ */ a.createElement(L, { key: A, cellProps: F });
|
|
363
363
|
}),
|
|
364
364
|
isInEdit: l,
|
|
365
365
|
isSelected: typeof c == "boolean" && c
|
|
366
366
|
};
|
|
367
367
|
};
|
|
368
|
-
let
|
|
369
|
-
const Ee = (t) => t >= b.length -
|
|
368
|
+
let xt = 0, p = null;
|
|
369
|
+
const Ee = (t) => t >= b.length - xt, ee = [], Se = !b.length;
|
|
370
370
|
let K = 0;
|
|
371
371
|
if (b.length) {
|
|
372
372
|
const t = x.length + (e.filterable ? 1 : 0) + 1;
|
|
@@ -374,10 +374,10 @@ const Dl = a.forwardRef((e, ie) => {
|
|
|
374
374
|
const i = fe.enabled ? {} : void 0;
|
|
375
375
|
h && (n += J, o += J, e.pageable || (n += e.skip || 0)), (ce || b).forEach((l, c) => {
|
|
376
376
|
l.rowType === "data" && n++;
|
|
377
|
-
const u = l.dataIndex % 2 !== 0, T = e.dataItemKey && H(e.dataItemKey)(l.dataItem), r = c + o, y = T || "ai" + r, A = y + "_1", w =
|
|
378
|
-
if (K = r + t + d, Z &&
|
|
377
|
+
const u = l.dataIndex % 2 !== 0, T = e.dataItemKey && H(e.dataItemKey)(l.dataItem), r = c + o, y = T || "ai" + r, A = y + "_1", w = Gt(l, y, n, u, i);
|
|
378
|
+
if (K = r + t + d, Z && Rt && w.isInEdit && (p = l.dataItem), ee.push(
|
|
379
379
|
/* @__PURE__ */ a.createElement(
|
|
380
|
-
|
|
380
|
+
tl,
|
|
381
381
|
{
|
|
382
382
|
key: y,
|
|
383
383
|
dataItem: l.dataItem,
|
|
@@ -400,7 +400,7 @@ const Dl = a.forwardRef((e, ie) => {
|
|
|
400
400
|
), e.detail && l.rowType === "data" && l.expanded) {
|
|
401
401
|
const le = g.length - (P.enabled ? 1 : 0) - (e.group ? e.group.length : 0) || 1;
|
|
402
402
|
d++, K = r + t + d;
|
|
403
|
-
const B = e.isClient ?
|
|
403
|
+
const B = e.isClient ? nl : Nl;
|
|
404
404
|
ee.push(
|
|
405
405
|
/* @__PURE__ */ a.createElement(
|
|
406
406
|
"tr",
|
|
@@ -415,8 +415,8 @@ const Dl = a.forwardRef((e, ie) => {
|
|
|
415
415
|
"aria-rowindex": K
|
|
416
416
|
},
|
|
417
417
|
e.group && e.group.map((ae, F) => {
|
|
418
|
-
var
|
|
419
|
-
const
|
|
418
|
+
var M;
|
|
419
|
+
const L = (M = w == null ? void 0 : w.row[F]) == null ? void 0 : M.props.style, j = L ? { left: L.left, right: L.right } : {};
|
|
420
420
|
return /* @__PURE__ */ a.createElement(
|
|
421
421
|
Je,
|
|
422
422
|
{
|
|
@@ -438,7 +438,7 @@ const Dl = a.forwardRef((e, ie) => {
|
|
|
438
438
|
);
|
|
439
439
|
}),
|
|
440
440
|
P.enabled && /* @__PURE__ */ a.createElement(
|
|
441
|
-
|
|
441
|
+
ol,
|
|
442
442
|
{
|
|
443
443
|
unstyled: k,
|
|
444
444
|
id: O.generateNavigatableId(`${A}-dhcell`, G)
|
|
@@ -465,17 +465,17 @@ const Dl = a.forwardRef((e, ie) => {
|
|
|
465
465
|
total: v,
|
|
466
466
|
skip: e.skip || 0,
|
|
467
467
|
take: (e.take !== void 0 ? e.take : e.pageSize) || 10,
|
|
468
|
-
...
|
|
469
|
-
}, ve = /* @__PURE__ */ a.createElement(
|
|
468
|
+
...rl(e.pageable || {})
|
|
469
|
+
}, ve = /* @__PURE__ */ a.createElement(cl, null, e.pager ? /* @__PURE__ */ a.createElement(e.pager, { ...Ie }) : /* @__PURE__ */ a.createElement(Ft, { className: f(s.pager({})), ...Ie })), kt = (t, o) => /* @__PURE__ */ a.createElement("col", { key: o.toString(), width: ne(t) }), Re = (_e = e.cells) != null && _e.footerCell || m.some((t) => {
|
|
470
470
|
var o;
|
|
471
471
|
return !!((o = t.cells) != null && o.footerCell);
|
|
472
472
|
}) ? /* @__PURE__ */ a.createElement(
|
|
473
|
-
|
|
473
|
+
$t,
|
|
474
474
|
{
|
|
475
475
|
size: S,
|
|
476
476
|
staticHeaders: e.scrollable !== "none",
|
|
477
477
|
row: /* @__PURE__ */ a.createElement(
|
|
478
|
-
|
|
478
|
+
al,
|
|
479
479
|
{
|
|
480
480
|
cells: e.cells,
|
|
481
481
|
idPrefix: G,
|
|
@@ -483,27 +483,27 @@ const Dl = a.forwardRef((e, ie) => {
|
|
|
483
483
|
ariaRowIndex: K + 1
|
|
484
484
|
}
|
|
485
485
|
),
|
|
486
|
-
cols: g.map(
|
|
486
|
+
cols: g.map(kt)
|
|
487
487
|
}
|
|
488
|
-
) : null, Ge = /* @__PURE__ */ a.createElement(
|
|
488
|
+
) : null, Ge = /* @__PURE__ */ a.createElement(il, null, g.map((t, o) => /* @__PURE__ */ a.createElement(
|
|
489
489
|
"col",
|
|
490
490
|
{
|
|
491
491
|
key: o.toString(),
|
|
492
492
|
className: qe(t.field, e.sort) ? f(s.sorted({})) : void 0,
|
|
493
493
|
width: ne(t)
|
|
494
494
|
}
|
|
495
|
-
))), xe = e.reorderable || V, { detail:
|
|
495
|
+
))), xe = e.reorderable || V, { detail: Hl, cells: Pl, rows: Kl, ...ke } = e, Ne = /* @__PURE__ */ a.createElement(
|
|
496
496
|
"tbody",
|
|
497
497
|
{
|
|
498
498
|
role: "rowgroup",
|
|
499
499
|
className: f(s.tbody({})),
|
|
500
|
-
...
|
|
500
|
+
...Lt
|
|
501
501
|
},
|
|
502
502
|
ee
|
|
503
|
-
), De = p ? /* @__PURE__ */ a.createElement(
|
|
503
|
+
), De = p ? /* @__PURE__ */ a.createElement(Sl, { columns: g, customEditDialog: e.editDialog, dataItem: p }) : null;
|
|
504
504
|
let te = Ne;
|
|
505
505
|
return N && (te = /* @__PURE__ */ a.createElement(
|
|
506
|
-
|
|
506
|
+
gl,
|
|
507
507
|
{
|
|
508
508
|
unstyled: s,
|
|
509
509
|
columns: m,
|
|
@@ -511,7 +511,7 @@ const Dl = a.forwardRef((e, ie) => {
|
|
|
511
511
|
},
|
|
512
512
|
Ne
|
|
513
513
|
)), e.scrollable === "none" ? /* @__PURE__ */ a.createElement(
|
|
514
|
-
|
|
514
|
+
pe,
|
|
515
515
|
{
|
|
516
516
|
gridRef: ie,
|
|
517
517
|
gridProps: ke,
|
|
@@ -527,7 +527,7 @@ const Dl = a.forwardRef((e, ie) => {
|
|
|
527
527
|
isVirtualScroll: h,
|
|
528
528
|
detailExpandable: !!e.detail
|
|
529
529
|
},
|
|
530
|
-
/* @__PURE__ */ a.createElement(
|
|
530
|
+
/* @__PURE__ */ a.createElement(at, null, /* @__PURE__ */ a.createElement(
|
|
531
531
|
"div",
|
|
532
532
|
{
|
|
533
533
|
id: e.id,
|
|
@@ -538,26 +538,26 @@ const Dl = a.forwardRef((e, ie) => {
|
|
|
538
538
|
be,
|
|
539
539
|
Ce,
|
|
540
540
|
/* @__PURE__ */ a.createElement(
|
|
541
|
-
|
|
541
|
+
dl,
|
|
542
542
|
{
|
|
543
543
|
selectable: e.selectable,
|
|
544
544
|
className: f(s.table({ size: S }))
|
|
545
545
|
},
|
|
546
546
|
Ge,
|
|
547
547
|
ye,
|
|
548
|
-
/* @__PURE__ */ a.createElement(
|
|
548
|
+
/* @__PURE__ */ a.createElement(lt, { rowReorderable: N }, te),
|
|
549
549
|
Re
|
|
550
550
|
),
|
|
551
|
-
Se && /* @__PURE__ */ a.createElement(
|
|
552
|
-
xe && /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(
|
|
551
|
+
Se && /* @__PURE__ */ a.createElement(Ze, null, $.length ? $ : /* @__PURE__ */ a.createElement(Qe, null)),
|
|
552
|
+
xe && /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(et, null), /* @__PURE__ */ a.createElement(tt, null))
|
|
553
553
|
)),
|
|
554
554
|
he,
|
|
555
555
|
e.pageable && ve,
|
|
556
|
-
/* @__PURE__ */ a.createElement(
|
|
556
|
+
/* @__PURE__ */ a.createElement(nt, { loader: e.loader, showLoader: e.showLoader }),
|
|
557
557
|
De,
|
|
558
558
|
ge && /* @__PURE__ */ a.createElement($e, null)
|
|
559
559
|
) : /* @__PURE__ */ a.createElement(
|
|
560
|
-
|
|
560
|
+
pe,
|
|
561
561
|
{
|
|
562
562
|
gridRef: ie,
|
|
563
563
|
innerGrid: e.innerGrid,
|
|
@@ -573,7 +573,7 @@ const Dl = a.forwardRef((e, ie) => {
|
|
|
573
573
|
isVirtualScroll: h,
|
|
574
574
|
detailExpandable: !!e.detail
|
|
575
575
|
},
|
|
576
|
-
/* @__PURE__ */ a.createElement(
|
|
576
|
+
/* @__PURE__ */ a.createElement(at, null, /* @__PURE__ */ a.createElement(
|
|
577
577
|
"div",
|
|
578
578
|
{
|
|
579
579
|
id: e.id,
|
|
@@ -597,11 +597,11 @@ const Dl = a.forwardRef((e, ie) => {
|
|
|
597
597
|
"aria-colcount": g.length,
|
|
598
598
|
"aria-rowcount": v,
|
|
599
599
|
id: R,
|
|
600
|
-
"aria-label": z.toLanguageString(
|
|
600
|
+
"aria-label": z.toLanguageString(rt, fl[rt])
|
|
601
601
|
},
|
|
602
602
|
ye,
|
|
603
|
-
/* @__PURE__ */ a.createElement("div", { className: f(s.container({})), role: "presentation" }, /* @__PURE__ */ a.createElement(
|
|
604
|
-
|
|
603
|
+
/* @__PURE__ */ a.createElement("div", { className: f(s.container({})), role: "presentation" }, /* @__PURE__ */ a.createElement(ul, null, /* @__PURE__ */ a.createElement("div", { className: f(s.content({})), role: "presentation" }, /* @__PURE__ */ a.createElement("div", { className: f(s.tableWrap({})), role: "presentation" }, /* @__PURE__ */ a.createElement(
|
|
604
|
+
ml,
|
|
605
605
|
{
|
|
606
606
|
selectable: e.selectable,
|
|
607
607
|
tableClassName: f(
|
|
@@ -609,30 +609,30 @@ const Dl = a.forwardRef((e, ie) => {
|
|
|
609
609
|
size: S
|
|
610
610
|
})
|
|
611
611
|
),
|
|
612
|
-
tableStyle: { userSelect:
|
|
612
|
+
tableStyle: { userSelect: vt }
|
|
613
613
|
},
|
|
614
614
|
Ge,
|
|
615
|
-
/* @__PURE__ */ a.createElement(
|
|
616
|
-
), Se && /* @__PURE__ */ a.createElement(
|
|
615
|
+
/* @__PURE__ */ a.createElement(lt, { rowReorderable: N }, te)
|
|
616
|
+
), Se && /* @__PURE__ */ a.createElement(Ze, null, $.length ? $ : /* @__PURE__ */ a.createElement(Qe, null))), h && /* @__PURE__ */ a.createElement(
|
|
617
617
|
"div",
|
|
618
618
|
{
|
|
619
619
|
className: f(s.heightContainer({})),
|
|
620
620
|
role: "presentation"
|
|
621
621
|
},
|
|
622
|
-
/* @__PURE__ */ a.createElement(
|
|
622
|
+
/* @__PURE__ */ a.createElement(sl, { isVirtualScroll: h })
|
|
623
623
|
)))),
|
|
624
624
|
Re,
|
|
625
|
-
xe && /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(
|
|
625
|
+
xe && /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(et, null), /* @__PURE__ */ a.createElement(tt, null)),
|
|
626
626
|
ge && /* @__PURE__ */ a.createElement($e, null)
|
|
627
627
|
),
|
|
628
628
|
he,
|
|
629
629
|
e.pageable && ve,
|
|
630
|
-
/* @__PURE__ */ a.createElement(
|
|
630
|
+
/* @__PURE__ */ a.createElement(nt, { loader: e.loader, showLoader: e.showLoader }),
|
|
631
631
|
De
|
|
632
632
|
))
|
|
633
633
|
);
|
|
634
634
|
});
|
|
635
|
-
|
|
635
|
+
Tl.displayName = "KendoReactGridComponent";
|
|
636
636
|
export {
|
|
637
|
-
|
|
637
|
+
Tl as GridComponent
|
|
638
638
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use strict";const t=require("./utils.js");function N(l,C){const e=C.jscodeshift,o=e(l.source),m=l.path.endsWith(".ts")||l.path.endsWith(".tsx");let u=!1;const p=new Set;o.find(e.Identifier).forEach(i=>{p.add(i.node.name)});const r=t.generateUniqueName("CustomCell",p),f=t.findImportedName(e,o,"Grid","@progress/kendo-react-grid")||"Grid";return o.find(e.JSXElement,{openingElement:{name:{name:f}}}).forEach(i=>{const n=i.node.openingElement.attributes,d=n==null?void 0:n.find(a=>a.type==="JSXAttribute"&&a.name.name==="cellRender");if(d&&d.type==="JSXAttribute"){const a=d.value?e(d.value).toSource():"No value provided",{isClassComponent:c,isFunctionalComponent:h,parentNode:g}=t.findParentComponent(e,i);n&&t.ensureAttributeExists(e,n,"cells","data",c?`this.${r}`:r);let s;c?s=t.createMethodForClassComponent(e,r,m,"GridCustomCellProps"):h&&(s=t.createArrowFunctionForFunctionalComponent(e,r,m,"GridCustomCellProps")),t.addMethodToComponent(e,g,s,c),s&&t.addCommentToMethod(e,e(s),`Original cellRender value: ${a}`,c?"class":"function"),t.removeAttribute(n,"cellRender")&&(u=!0)}}),u&&m&&t.ensureImportExists(e,o,"GridCustomCellProps","@progress/kendo-react-grid"),o.toSource()}module.exports=N;
|
|
9
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2VsbC1yZW5kZXIuanMiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2dyaWQvY29kZW1vZHMvdjExL2NlbGwtcmVuZGVyLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEFQSSwgRmlsZUluZm8sIEpTQ29kZXNoaWZ0LCBKU1hBdHRyaWJ1dGUsIEpTWFNwcmVhZEF0dHJpYnV0ZSB9IGZ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ApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gQ3JlYXRlIHRoZSBDdXN0b21DZWxsIG1ldGhvZFxuICAgICAgICAgICAgbGV0IGN1c3RvbU1ldGhvZDtcbiAgICAgICAgICAgIGlmIChpc0NsYXNzQ29tcG9uZW50KSB7XG4gICAgICAgICAgICAgICAgY3VzdG9tTWV0aG9kID0gY3JlYXRlTWV0aG9kRm9yQ2xhc3NDb21wb25lbnQoaiwgdW5pcXVlTmFtZSwgaXNUeXBlU2NyaXB0LCAnR3JpZEN1c3RvbUNlbGxQcm9wcycpO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChpc0Z1bmN0aW9uYWxDb21wb25lbnQpIHtcbiAgICAgICAgICAgICAgICBjdXN0b21NZXRob2QgPSBjcmVhdGVBcnJvd0Z1bmN0aW9uRm9yRnVuY3Rpb25hbENvbXBvbmVudChcbiAgICAgICAgICAgICAgICAgICAgaixcbiAgICAgICAgICAgICAgICAgICAgdW5pcXVlTmFtZSxcbiAgICAgICAgICAgICAgICAgICAgaXNUeXBlU2NyaXB0LFxuICAgICAgICAgICAgICAgICAgICAnR3JpZEN1c3RvbUNlbGxQcm9wcydcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBBZGQgdGhlIEN1c3RvbUNlbGwgbWV0aG9kIHRvIHRoZSBjb21wb25lbnRcbiAgICAgICAgICAgIGFkZE1ldGhvZFRvQ29tcG9uZW50KGosIHBhcmVudE5vZGUsIGN1c3RvbU1ldGhvZCwgaXNDbGFzc0NvbXBvbmVudCk7XG5cbiAgICAgICAgICAgIC8vIEFkZCB0aGUgY2VsbFJlbmRlciB2YWx1ZSBhcyBhIGNvbW1lbnQgaW4gdGhlIEN1c3RvbUNlbGwgbWV0aG9kXG4gICAgICAgICAgICBpZiAoY3VzdG9tTWV0aG9kKSB7XG4gICAgICAgICAgICAgICAgYWRkQ29tbWVudFRvTWV0aG9kKFxuICAgICAgICAgICAgICA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