@progress/kendo-react-grid 9.3.1 → 9.4.0-develop.10
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/Grid.js +1 -1
- package/Grid.mjs +80 -1043
- package/GridClientContextReader.js +9 -0
- package/GridClientContextReader.mjs +31 -0
- package/GridClientWrapper.js +9 -0
- package/GridClientWrapper.mjs +793 -0
- package/GridColumn.js +1 -1
- package/GridColumn.mjs +4 -5
- package/GridComponent.js +8 -0
- package/GridComponent.mjs +594 -0
- package/GridSearchBox.js +8 -0
- package/GridSearchBox.mjs +35 -0
- package/GridState.js +9 -0
- package/GridState.mjs +99 -0
- package/GridToolbar.js +1 -1
- package/GridToolbar.mjs +5 -6
- package/GridWatermarkOverlay.js +9 -0
- package/{GridNoRecords.js → GridWatermarkOverlay.mjs} +8 -1
- package/StatusBar.js +1 -1
- package/StatusBar.mjs +24 -25
- package/VirtualScroll.js +1 -1
- package/VirtualScroll.mjs +0 -1
- package/VirtualScrollFixed.js +1 -1
- package/VirtualScrollFixed.mjs +9 -10
- package/cells/GridCell.js +1 -1
- package/cells/GridCell.mjs +22 -34
- package/cells/GridDetailCell.js +1 -1
- package/cells/GridDetailCell.mjs +12 -20
- package/cells/GridDetailHierarchyCell.js +1 -1
- package/cells/GridDetailHierarchyCell.mjs +6 -7
- package/cells/GridEditCell.js +1 -1
- package/cells/GridEditCell.mjs +22 -131
- package/cells/GridFilterCell.js +2 -1
- package/cells/GridGroupCell.js +1 -1
- package/cells/GridGroupCell.mjs +60 -96
- package/cells/GridHierarchyCell.js +1 -1
- package/cells/GridHierarchyCell.mjs +22 -62
- package/cells/GridRowReorderCell.js +8 -0
- package/cells/GridRowReorderCell.mjs +41 -0
- package/cells/GridSelectionCell.js +1 -1
- package/cells/GridSelectionCell.mjs +18 -37
- package/cells/client/DetailCellContainer.js +9 -0
- package/cells/client/DetailCellContainer.mjs +26 -0
- package/cells/client/GridCellContainer.js +9 -0
- package/cells/client/GridCellContainer.mjs +68 -0
- package/cells/client/GridEditCellContainer.js +9 -0
- package/cells/client/GridEditCellContainer.mjs +60 -0
- package/cells/client/GridEditCellEditor.js +9 -0
- package/cells/client/GridEditCellEditor.mjs +81 -0
- package/cells/client/GridGroupCellContainer.js +9 -0
- package/cells/client/GridGroupCellContainer.mjs +87 -0
- package/cells/client/GridGroupCellToggle.js +9 -0
- package/cells/client/GridGroupCellToggle.mjs +52 -0
- package/cells/client/GridHierarchyCellContainer.js +9 -0
- package/cells/client/GridHierarchyCellContainer.mjs +63 -0
- package/cells/client/GridHierarchyCellToggle.js +9 -0
- package/cells/client/GridHierarchyCellToggle.mjs +43 -0
- package/cells/client/GridRowReorderContainer.js +9 -0
- package/cells/client/GridRowReorderContainer.mjs +24 -0
- package/cells/client/GridSelectionCellContainer.js +9 -0
- package/cells/client/GridSelectionCellContainer.mjs +60 -0
- package/cells/client/GridSelectionCellInput.js +9 -0
- package/cells/client/GridSelectionCellInput.mjs +43 -0
- package/codemods/index.js +8 -0
- package/columnMenu/GridColumnMenuCheckboxFilter.js +2 -1
- package/columnMenu/GridColumnMenuColumnsList.js +2 -1
- package/columnMenu/GridColumnMenuColumnsList.mjs +16 -16
- package/columnMenu/GridColumnMenuFilter.js +2 -1
- package/columnMenu/GridColumnMenuFilterCell.js +2 -1
- package/columnMenu/GridColumnMenuFilterCell.mjs +3 -3
- package/columnMenu/GridColumnMenuFilterUI.js +2 -1
- package/columnMenu/GridColumnMenuGroup.js +2 -1
- package/columnMenu/GridColumnMenuGroup.mjs +5 -5
- package/columnMenu/GridColumnMenuItem.js +2 -1
- package/columnMenu/GridColumnMenuItem.mjs +2 -2
- package/columnMenu/GridColumnMenuItemContent.js +2 -1
- package/columnMenu/GridColumnMenuItemContent.mjs +4 -4
- package/columnMenu/GridColumnMenuItemGroup.js +2 -1
- package/columnMenu/GridColumnMenuItemGroup.mjs +4 -4
- package/columnMenu/GridColumnMenuSort.js +2 -1
- package/columnMenu/GridColumnMenuSort.mjs +26 -37
- package/columnMenu/GridColumnMenuWrapper.js +2 -1
- package/components/GridContainerElementContainer.js +9 -0
- package/components/GridContainerElementContainer.mjs +21 -0
- package/components/GridCustomCellClientContainer.js +9 -0
- package/components/GridCustomCellClientContainer.mjs +28 -0
- package/components/GridDragClue.js +9 -0
- package/components/GridDragClue.mjs +18 -0
- package/components/GridDraggableRowsContainer.js +9 -0
- package/components/GridDraggableRowsContainer.mjs +127 -0
- package/components/GridDropClue.js +9 -0
- package/components/GridDropClue.mjs +18 -0
- package/components/GridElementContainer.js +9 -0
- package/components/GridElementContainer.mjs +22 -0
- package/components/GridLoader.js +9 -0
- package/components/GridLoader.mjs +22 -0
- package/components/PagerContainer.js +9 -0
- package/components/PagerContainer.mjs +23 -0
- package/components/VirtualScrollHeightContainer.js +9 -0
- package/components/VirtualScrollHeightContainer.mjs +17 -0
- package/components/colGroup/GridColGroup.js +9 -0
- package/components/colGroup/GridColGroup.mjs +25 -0
- package/components/icons/reorder-row-svg.js +9 -0
- package/components/icons/reorder-row-svg.mjs +14 -0
- package/components/noRecords/GridNoRecords.js +9 -0
- package/{GridNoRecords.mjs → components/noRecords/GridNoRecords.mjs} +6 -6
- package/components/noRecords/GridNoRecordsContainer.js +9 -0
- package/components/noRecords/GridNoRecordsContainer.mjs +30 -0
- package/components/table/GridTable.js +9 -0
- package/components/table/GridTable.mjs +28 -0
- package/components/table/GridTableBody.js +9 -0
- package/components/table/GridTableBody.mjs +21 -0
- package/components/table/GridTableScrollable.js +9 -0
- package/components/table/GridTableScrollable.mjs +37 -0
- package/components/utils.js +8 -0
- package/components/utils.mjs +25 -0
- package/constants/index.js +1 -1
- package/constants/index.mjs +0 -1
- package/contextMenu/GridContextMenu.js +9 -0
- package/contextMenu/GridContextMenu.mjs +191 -0
- package/contextMenu/enums.js +8 -0
- package/contextMenu/enums.mjs +12 -0
- package/dist/cdn/js/kendo-react-grid.js +8 -1
- package/drag/ColumnDraggable.js +2 -1
- package/drag/ColumnDraggable.mjs +7 -7
- package/drag/ColumnResize.js +1 -1
- package/drag/ColumnResize.mjs +0 -1
- package/drag/CommonDragLogic.js +1 -1
- package/drag/CommonDragLogic.mjs +0 -1
- package/drag/GroupingIndicator.js +2 -1
- package/drag/GroupingIndicator.mjs +11 -11
- package/filterCommon.js +1 -1
- package/filterCommon.mjs +4 -5
- package/footer/Footer.js +2 -1
- package/footer/Footer.mjs +22 -21
- package/footer/FooterCell.js +8 -0
- package/footer/FooterCell.mjs +42 -0
- package/footer/FooterRow.js +1 -1
- package/footer/FooterRow.mjs +10 -40
- package/footer/client/FooterCellContainer.js +9 -0
- package/footer/client/FooterCellContainer.mjs +26 -0
- package/header/FilterRow.js +1 -1
- package/header/FilterRow.mjs +57 -55
- package/header/GridHeaderCell.js +2 -1
- package/header/GridHeaderCell.mjs +11 -11
- package/header/GridHeaderSelectionCell.js +2 -1
- package/header/GridHeaderSelectionCell.mjs +10 -9
- package/header/GroupPanel.js +2 -1
- package/header/GroupPanel.mjs +36 -32
- package/header/Header.js +2 -1
- package/header/Header.mjs +35 -33
- package/header/HeaderRow.js +1 -1
- package/header/HeaderRow.mjs +96 -126
- package/header/client/GridFilterCellContainer.js +9 -0
- package/header/client/GridFilterCellContainer.mjs +38 -0
- package/header/client/GridFilterCellElementContainer.js +9 -0
- package/header/client/GridFilterCellElementContainer.mjs +21 -0
- package/header/client/GridHeaderCellContainer.js +9 -0
- package/header/client/GridHeaderCellContainer.mjs +54 -0
- package/header/client/GridHeaderCellElementContainer.js +9 -0
- package/header/client/GridHeaderCellElementContainer.mjs +28 -0
- package/header/client/GridHeaderRowContainer.js +9 -0
- package/header/client/GridHeaderRowContainer.mjs +35 -0
- package/header/client/GridHeaderRowReorderCell.js +9 -0
- package/header/client/GridHeaderRowReorderCell.mjs +13 -0
- package/header/client/HeaderCellResizer.js +9 -0
- package/header/client/HeaderCellResizer.mjs +25 -0
- package/header/client/HeaderRowDraggable.js +9 -0
- package/header/client/HeaderRowDraggable.mjs +30 -0
- package/index.d.mts +601 -25
- package/index.d.ts +601 -25
- package/index.js +1 -1
- package/index.mjs +46 -39
- package/messages/index.js +1 -1
- package/messages/index.mjs +76 -81
- package/messages/messagesMap.js +8 -0
- package/messages/messagesMap.mjs +18 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -3
- package/package.json +27 -11
- package/paging/GridPagerSettings.js +1 -1
- package/paging/GridPagerSettings.mjs +6 -7
- package/rows/GridDetailRow.js +1 -1
- package/rows/GridDetailRow.mjs +2 -3
- package/rows/GridRow.js +2 -1
- package/rows/GridRow.mjs +42 -20
- package/sortCommon.js +8 -0
- package/sortCommon.mjs +27 -0
- package/{interfaces/GridSortSettings.js → utils/_clientModule.js} +2 -1
- package/{interfaces/GridSortSettings.mjs → utils/_clientModule.mjs} +3 -2
- package/utils/_serverModule.js +8 -0
- package/utils/_serverModule.mjs +12 -0
- package/utils/index.js +1 -1
- package/utils/index.mjs +213 -102
package/GridSearchBox.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
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";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("@progress/kendo-react-inputs"),h=require("react"),m=require("./GridClientWrapper.js"),f=require("@progress/kendo-svg-icons"),i=require("@progress/kendo-react-common"),x=require("./GridState.js"),S=require("@progress/kendo-react-data-tools"),b=require("@progress/kendo-react-intl"),a=require("./messages/index.js");function C(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const r=C(h),q=e=>{const n=b.useLocalization(),t=r.useContext(m.GridContext),[o]=x.useGridState(),l=c=>{t.searchChange(c),e.onChange&&e.onChange.call(void 0,c)},u=S.getStringFromSearch(o.search),d=i.classNames("k-grid-search","k-searchbox",e.className),g=n.toLanguageString(a.searchboxPlaceholder,a.messages[a.searchboxPlaceholder]);return r.createElement(s.TextBox,{placeholder:g,value:u,prefix:()=>r.createElement(s.InputPrefix,{orientation:"horizontal"},r.createElement(i.SvgIcon,{icon:f.searchIcon})),...e,className:d,onChange:l})};exports.GridSearchBox=q;
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
import { TextBox as h, InputPrefix as g } from "@progress/kendo-react-inputs";
|
|
9
|
+
import * as o from "react";
|
|
10
|
+
import { GridContext as f } from "./GridClientWrapper.mjs";
|
|
11
|
+
import { searchIcon as x } from "@progress/kendo-svg-icons";
|
|
12
|
+
import { classNames as d, SvgIcon as C } from "@progress/kendo-react-common";
|
|
13
|
+
import { useGridState as p } from "./GridState.mjs";
|
|
14
|
+
import { getStringFromSearch as u } from "@progress/kendo-react-data-tools";
|
|
15
|
+
import { useLocalization as S } from "@progress/kendo-react-intl";
|
|
16
|
+
import { searchboxPlaceholder as r, messages as z } from "./messages/index.mjs";
|
|
17
|
+
const L = (e) => {
|
|
18
|
+
const a = S(), n = o.useContext(f), [c] = p(), i = (t) => {
|
|
19
|
+
n.searchChange(t), e.onChange && e.onChange.call(void 0, t);
|
|
20
|
+
}, m = u(c.search), s = d("k-grid-search", "k-searchbox", e.className), l = a.toLanguageString(r, z[r]);
|
|
21
|
+
return /* @__PURE__ */ o.createElement(
|
|
22
|
+
h,
|
|
23
|
+
{
|
|
24
|
+
placeholder: l,
|
|
25
|
+
value: m,
|
|
26
|
+
prefix: () => /* @__PURE__ */ o.createElement(g, { orientation: "horizontal" }, /* @__PURE__ */ o.createElement(C, { icon: x })),
|
|
27
|
+
...e,
|
|
28
|
+
className: s,
|
|
29
|
+
onChange: i
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
L as GridSearchBox
|
|
35
|
+
};
|
package/GridState.js
ADDED
|
@@ -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 client";
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),B=u.createContext([{},()=>{},{}]),v=()=>u.useContext(B),p=t=>{var f,C,k,G,P,D,b,m,y,F,T,j,q,H,M,O,R,w,z,A;const{children:I,onEditChange:h,onFilterChange:l,onSortChange:i,onSearchChange:o,onPageChange:c,onGroupChange:r,onDataStateChange:g,onSelectionChange:s,onDetailExpandChange:x,onGroupExpandChange:E,onHeaderSelectionChange:S}=t,[n,d]=u.useState({edit:(f=t.defaultEdit)!=null?f:t.edit,filter:(C=t.defaultFilter)!=null?C:t.filter,select:(k=t.defaultSelect)!=null?k:t.select,search:(G=t.defaultSearch)!=null?G:t.search,sort:(P=t.defaultSort)!=null?P:t.sort,take:(D=t.defaultTake)!=null?D:t.take,skip:(b=t.defaultSkip)!=null?b:t.skip,group:(m=t.defaultGroup)!=null?m:t.group,detailExpand:(y=t.defaultDetailExpand)!=null?y:t.detailExpand,groupExpand:(F=t.defaultGroupExpand)!=null?F:t.groupExpand}),J={edit:(T=t.edit)!=null?T:n.edit,filter:(j=t.filter)!=null?j:n.filter,search:(q=t.search)!=null?q:n.search,sort:(H=t.sort)!=null?H:n.sort,take:(M=t.take)!=null?M:n.take,skip:(O=t.skip)!=null?O:n.skip,group:(R=t.group)!=null?R:n.group,select:(w=t.select)!=null?w:n.select,detailExpand:(z=t.detailExpand)!=null?z:n.detailExpand,groupExpand:(A=t.groupExpand)!=null?A:n.groupExpand},K=e=>{},L=e=>{d(a=>({...a,edit:e.edit})),h==null||h(e)},N=e=>{d(a=>({...a,filter:e.filter})),l==null||l(e)},Q=e=>{d(a=>({...a,search:e.search})),o==null||o(e)},U=e=>{d(a=>({...a,sort:e.sort})),i==null||i(e)},V=e=>{d(a=>({...a,...e.page})),c==null||c(e)},W=e=>{d(a=>({...a,group:e.group})),r==null||r(e)},X=e=>{d(a=>({...a,...e.dataState})),g==null||g(e)},Y=e=>{d(a=>({...a,select:e.select})),s==null||s(e)},Z=e=>{d(a=>({...a,select:e.select})),S==null||S(e)},_=e=>{d(a=>({...a,detailExpand:e.detailExpand})),x==null||x(e)},$=e=>{d(a=>({...a,groupExpand:e.groupExpand})),E==null||E(e)};return u.createElement(B.Provider,{value:[J,K,{onEditChange:L,onFilterChange:l&&N,onSearchChange:Q,onSortChange:i&&U,onPageChange:c&&V,onGroupChange:r&&W,onDataStateChange:X,onSelectionChange:Y,onHeaderSelectionChange:Z,onDetailExpandChange:_,onGroupExpandChange:$}]},I)};exports.GridClientStateProvider=p;exports.useGridState=v;
|
package/GridState.mjs
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
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 client";
|
|
9
|
+
import u from "react";
|
|
10
|
+
const I = u.createContext([{}, () => {
|
|
11
|
+
}, {}]), p = () => u.useContext(I), ee = (t) => {
|
|
12
|
+
var S, C, k, G, D, P, m, F, _, H, R, T, b, j, q, w, y, z, A, B;
|
|
13
|
+
const {
|
|
14
|
+
children: J,
|
|
15
|
+
onEditChange: r,
|
|
16
|
+
onFilterChange: l,
|
|
17
|
+
onSortChange: c,
|
|
18
|
+
onSearchChange: o,
|
|
19
|
+
onPageChange: i,
|
|
20
|
+
onGroupChange: h,
|
|
21
|
+
onDataStateChange: g,
|
|
22
|
+
onSelectionChange: x,
|
|
23
|
+
onDetailExpandChange: E,
|
|
24
|
+
onGroupExpandChange: s,
|
|
25
|
+
onHeaderSelectionChange: f
|
|
26
|
+
} = t, [n, d] = u.useState({
|
|
27
|
+
edit: (S = t.defaultEdit) != null ? S : t.edit,
|
|
28
|
+
filter: (C = t.defaultFilter) != null ? C : t.filter,
|
|
29
|
+
select: (k = t.defaultSelect) != null ? k : t.select,
|
|
30
|
+
search: (G = t.defaultSearch) != null ? G : t.search,
|
|
31
|
+
sort: (D = t.defaultSort) != null ? D : t.sort,
|
|
32
|
+
take: (P = t.defaultTake) != null ? P : t.take,
|
|
33
|
+
skip: (m = t.defaultSkip) != null ? m : t.skip,
|
|
34
|
+
group: (F = t.defaultGroup) != null ? F : t.group,
|
|
35
|
+
detailExpand: (_ = t.defaultDetailExpand) != null ? _ : t.detailExpand,
|
|
36
|
+
groupExpand: (H = t.defaultGroupExpand) != null ? H : t.groupExpand
|
|
37
|
+
}), K = {
|
|
38
|
+
edit: (R = t.edit) != null ? R : n.edit,
|
|
39
|
+
filter: (T = t.filter) != null ? T : n.filter,
|
|
40
|
+
search: (b = t.search) != null ? b : n.search,
|
|
41
|
+
sort: (j = t.sort) != null ? j : n.sort,
|
|
42
|
+
take: (q = t.take) != null ? q : n.take,
|
|
43
|
+
skip: (w = t.skip) != null ? w : n.skip,
|
|
44
|
+
group: (y = t.group) != null ? y : n.group,
|
|
45
|
+
select: (z = t.select) != null ? z : n.select,
|
|
46
|
+
detailExpand: (A = t.detailExpand) != null ? A : n.detailExpand,
|
|
47
|
+
groupExpand: (B = t.groupExpand) != null ? B : n.groupExpand
|
|
48
|
+
}, L = (e) => {
|
|
49
|
+
}, M = (e) => {
|
|
50
|
+
d((a) => ({ ...a, edit: e.edit })), r == null || r(e);
|
|
51
|
+
}, N = (e) => {
|
|
52
|
+
d((a) => ({ ...a, filter: e.filter })), l == null || l(e);
|
|
53
|
+
}, O = (e) => {
|
|
54
|
+
d((a) => ({ ...a, search: e.search })), o == null || o(e);
|
|
55
|
+
}, Q = (e) => {
|
|
56
|
+
d((a) => ({ ...a, sort: e.sort })), c == null || c(e);
|
|
57
|
+
}, U = (e) => {
|
|
58
|
+
d((a) => ({ ...a, ...e.page })), i == null || i(e);
|
|
59
|
+
}, V = (e) => {
|
|
60
|
+
d((a) => ({ ...a, group: e.group })), h == null || h(e);
|
|
61
|
+
}, W = (e) => {
|
|
62
|
+
d((a) => ({ ...a, ...e.dataState })), g == null || g(e);
|
|
63
|
+
}, X = (e) => {
|
|
64
|
+
d((a) => ({ ...a, select: e.select })), x == null || x(e);
|
|
65
|
+
}, Y = (e) => {
|
|
66
|
+
d((a) => ({ ...a, select: e.select })), f == null || f(e);
|
|
67
|
+
}, Z = (e) => {
|
|
68
|
+
d((a) => ({ ...a, detailExpand: e.detailExpand })), E == null || E(e);
|
|
69
|
+
}, $ = (e) => {
|
|
70
|
+
d((a) => ({ ...a, groupExpand: e.groupExpand })), s == null || s(e);
|
|
71
|
+
};
|
|
72
|
+
return /* @__PURE__ */ u.createElement(
|
|
73
|
+
I.Provider,
|
|
74
|
+
{
|
|
75
|
+
value: [
|
|
76
|
+
K,
|
|
77
|
+
L,
|
|
78
|
+
{
|
|
79
|
+
onEditChange: M,
|
|
80
|
+
onFilterChange: l && N,
|
|
81
|
+
onSearchChange: O,
|
|
82
|
+
onSortChange: c && Q,
|
|
83
|
+
onPageChange: i && U,
|
|
84
|
+
onGroupChange: h && V,
|
|
85
|
+
onDataStateChange: W,
|
|
86
|
+
onSelectionChange: X,
|
|
87
|
+
onHeaderSelectionChange: Y,
|
|
88
|
+
onDetailExpandChange: Z,
|
|
89
|
+
onGroupExpandChange: $
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
J
|
|
94
|
+
);
|
|
95
|
+
};
|
|
96
|
+
export {
|
|
97
|
+
ee as GridClientStateProvider,
|
|
98
|
+
p as useGridState
|
|
99
|
+
};
|
package/GridToolbar.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),r=require("@progress/kendo-react-common");function s(o){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const t in o)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(o,t);Object.defineProperty(e,t,a.get?a:{enumerable:!0,get:()=>o[t]})}}return e.default=o,Object.freeze(e)}const b=s(i),l=o=>{const{size:e,className:t,ariaLabel:a,ariaControls:n,children:c}=o;return b.createElement("div",{className:r.classNames("k-toolbar k-grid-toolbar k-toolbar-solid",{"k-toolbar-md":!e,[`k-toolbar-${r.kendoThemeMaps.sizeMap[e]||e}`]:e},t),"aria-label":a,"aria-controls":n,role:"toolbar"},c)};l.displayName="KendoReactGridToolbar";exports.GridToolbar=l;
|
package/GridToolbar.mjs
CHANGED
|
@@ -5,10 +5,9 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as s from "react";
|
|
10
|
-
import { classNames as i, kendoThemeMaps as
|
|
11
|
-
const
|
|
9
|
+
import { classNames as i, kendoThemeMaps as m } from "@progress/kendo-react-common";
|
|
10
|
+
const b = (o) => {
|
|
12
11
|
const { size: a, className: r, ariaLabel: e, ariaControls: l, children: t } = o;
|
|
13
12
|
return /* @__PURE__ */ s.createElement(
|
|
14
13
|
"div",
|
|
@@ -17,7 +16,7 @@ const m = (o) => {
|
|
|
17
16
|
"k-toolbar k-grid-toolbar k-toolbar-solid",
|
|
18
17
|
{
|
|
19
18
|
"k-toolbar-md": !a,
|
|
20
|
-
[`k-toolbar-${
|
|
19
|
+
[`k-toolbar-${m.sizeMap[a] || a}`]: a
|
|
21
20
|
},
|
|
22
21
|
r
|
|
23
22
|
),
|
|
@@ -28,7 +27,7 @@ const m = (o) => {
|
|
|
28
27
|
t
|
|
29
28
|
);
|
|
30
29
|
};
|
|
31
|
-
|
|
30
|
+
b.displayName = "KendoReactGridToolbar";
|
|
32
31
|
export {
|
|
33
|
-
|
|
32
|
+
b as GridToolbar
|
|
34
33
|
};
|
|
@@ -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 client";
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),n=require("@progress/kendo-react-common"),c=require("./package-metadata.js");function i(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const l=i(o),s=e=>n.shouldShowValidationUI(c.packageMetadata)&&l.createElement(n.WatermarkOverlay,null);exports.GridWatermarkOverlay=s;
|
|
@@ -5,4 +5,11 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
8
|
+
"use client";
|
|
9
|
+
import * as r from "react";
|
|
10
|
+
import { shouldShowValidationUI as a, WatermarkOverlay as e } from "@progress/kendo-react-common";
|
|
11
|
+
import { packageMetadata as t } from "./package-metadata.mjs";
|
|
12
|
+
const n = (o) => a(t) && /* @__PURE__ */ r.createElement(e, null);
|
|
13
|
+
export {
|
|
14
|
+
n as GridWatermarkOverlay
|
|
15
|
+
};
|
package/StatusBar.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react"),u=require("@progress/kendo-react-common");function O(s){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const o in s)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(s,o);Object.defineProperty(n,o,r.get?r:{enumerable:!0,get:()=>s[o]})}}return n.default=s,Object.freeze(n)}const c=O(E),b=s=>{const{data:n=[]}=s;return c.createElement("div",{className:"k-selection-aggregates k-grid-selection-aggregates"},n.map((o,r)=>c.createElement("div",{key:r},c.createElement("span",{className:"k-selection-aggregates-item-text"},o.type,": "),c.createElement("span",{className:"k-selection-aggregates-item-value"},o.formattedValue))))};b.displayName="KendoReactGridStatusBar";const p=s=>{var o;const n=s.slice();for(let r=0;r<n.length;r++)for(;n[r]&&((o=n[r].children)!=null&&o.length);)n.splice(r,1,...n[r].children);return n},j=s=>{const{dataItems:n,target:o}=s,y=p(o.columns).map(e=>e.field).filter(e=>e&&typeof e=="string").map(e=>u.getter(e)),S="selectedField"in s?u.getter(s.selectedField):e=>s.select[u.getter(s.dataItemKey)(e)],t={dates:[],numbers:[],booleans:[],others:[]},D=e=>{typeof e=="number"?t.numbers.push(e):typeof e=="boolean"?t.booleans.push(e):e instanceof Date?t.dates.push(e):t.others.push(e)};n.forEach(e=>{const a=S(e);a&&a.forEach(l=>{D(y[l](e))})});const m=t.dates.map(e=>e.getTime()),d=t.booleans.filter(e=>e).length,g=t.booleans.filter(e=>!e).length,i=t.numbers.length?t.numbers.reduce((e,a)=>e+=a,0):void 0,f={sum:i,average:typeof i=="number"?i/t.numbers.length:void 0,min:t.numbers.length?Math.min(...t.numbers):void 0,max:t.numbers.length?Math.max(...t.numbers):void 0,count:t.numbers.length+t.booleans.length+t.dates.length+t.others.length,isTrue:d>0?d:void 0,isFalse:g>0?g:void 0,earliest:t.dates.length?new Date(Math.min(...m)):void 0,latest:t.dates.length?new Date(Math.max(...m)):void 0},v=(e,a)=>(a==="sum"||a==="average")&&typeof e=="number"?e.toFixed(2):(a==="earliest"||a==="latest")&&e instanceof Date?e.toLocaleDateString():String(e),h=[];return Object.keys(f).forEach(e=>{const a=e,l=f[a];l!==void 0&&h.push({type:a,value:l,formattedValue:v(l,a)})}),h};exports.StatusBar=b;exports.getStatusData=j;exports.leafColumns=p;
|
package/StatusBar.mjs
CHANGED
|
@@ -5,25 +5,24 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as i from "react";
|
|
10
|
-
import { getter as
|
|
11
|
-
const x = (
|
|
12
|
-
const { data: n = [] } =
|
|
13
|
-
return /* @__PURE__ */ i.createElement("div", { className: "k-selection-aggregates k-grid-selection-aggregates" }, n.map((
|
|
9
|
+
import { getter as m } from "@progress/kendo-react-common";
|
|
10
|
+
const x = (a) => {
|
|
11
|
+
const { data: n = [] } = a;
|
|
12
|
+
return /* @__PURE__ */ i.createElement("div", { className: "k-selection-aggregates k-grid-selection-aggregates" }, n.map((r, o) => /* @__PURE__ */ i.createElement("div", { key: o }, /* @__PURE__ */ i.createElement("span", { className: "k-selection-aggregates-item-text" }, r.type, ": "), /* @__PURE__ */ i.createElement("span", { className: "k-selection-aggregates-item-value" }, r.formattedValue))));
|
|
14
13
|
};
|
|
15
14
|
x.displayName = "KendoReactGridStatusBar";
|
|
16
|
-
const D = (
|
|
17
|
-
var
|
|
18
|
-
const n =
|
|
19
|
-
for (let
|
|
20
|
-
for (; n[
|
|
21
|
-
n.splice(
|
|
15
|
+
const D = (a) => {
|
|
16
|
+
var r;
|
|
17
|
+
const n = a.slice();
|
|
18
|
+
for (let o = 0; o < n.length; o++)
|
|
19
|
+
for (; n[o] && ((r = n[o].children) != null && r.length); )
|
|
20
|
+
n.splice(o, 1, ...n[o].children);
|
|
22
21
|
return n;
|
|
23
|
-
},
|
|
24
|
-
const { dataItems: n, target:
|
|
25
|
-
(e) =>
|
|
26
|
-
), b =
|
|
22
|
+
}, v = (a) => {
|
|
23
|
+
const { dataItems: n, target: r } = a, p = D(r.columns).map((e) => e.field).filter((e) => e && typeof e == "string").map(
|
|
24
|
+
(e) => m(e)
|
|
25
|
+
), b = "selectedField" in a ? m(a.selectedField) : (e) => a.select[m(a.dataItemKey)(e)], t = { dates: [], numbers: [], booleans: [], others: [] }, y = (e) => {
|
|
27
26
|
typeof e == "number" ? t.numbers.push(e) : typeof e == "boolean" ? t.booleans.push(e) : e instanceof Date ? t.dates.push(e) : t.others.push(e);
|
|
28
27
|
};
|
|
29
28
|
n.forEach((e) => {
|
|
@@ -32,24 +31,24 @@ const D = (r) => {
|
|
|
32
31
|
y(p[l](e));
|
|
33
32
|
});
|
|
34
33
|
});
|
|
35
|
-
const
|
|
34
|
+
const d = t.dates.map((e) => e.getTime()), g = t.booleans.filter((e) => e).length, u = t.booleans.filter((e) => !e).length, c = t.numbers.length ? t.numbers.reduce((e, s) => e += s, 0) : void 0, h = {
|
|
36
35
|
sum: c,
|
|
37
36
|
average: typeof c == "number" ? c / t.numbers.length : void 0,
|
|
38
37
|
min: t.numbers.length ? Math.min(...t.numbers) : void 0,
|
|
39
38
|
max: t.numbers.length ? Math.max(...t.numbers) : void 0,
|
|
40
39
|
count: t.numbers.length + t.booleans.length + t.dates.length + t.others.length,
|
|
41
40
|
isTrue: g > 0 ? g : void 0,
|
|
42
|
-
isFalse:
|
|
43
|
-
earliest: t.dates.length ? new Date(Math.min(...
|
|
44
|
-
latest: t.dates.length ? new Date(Math.max(...
|
|
45
|
-
}, E = (e, s) => (s === "sum" || s === "average") && typeof e == "number" ? e.toFixed(2) : (s === "earliest" || s === "latest") && e instanceof Date ? e.toLocaleDateString() : String(e),
|
|
46
|
-
return Object.keys(
|
|
47
|
-
const s = e, l =
|
|
48
|
-
l !== void 0 &&
|
|
49
|
-
}),
|
|
41
|
+
isFalse: u > 0 ? u : void 0,
|
|
42
|
+
earliest: t.dates.length ? new Date(Math.min(...d)) : void 0,
|
|
43
|
+
latest: t.dates.length ? new Date(Math.max(...d)) : void 0
|
|
44
|
+
}, E = (e, s) => (s === "sum" || s === "average") && typeof e == "number" ? e.toFixed(2) : (s === "earliest" || s === "latest") && e instanceof Date ? e.toLocaleDateString() : String(e), f = [];
|
|
45
|
+
return Object.keys(h).forEach((e) => {
|
|
46
|
+
const s = e, l = h[s];
|
|
47
|
+
l !== void 0 && f.push({ type: s, value: l, formattedValue: E(l, s) });
|
|
48
|
+
}), f;
|
|
50
49
|
};
|
|
51
50
|
export {
|
|
52
51
|
x as StatusBar,
|
|
53
|
-
|
|
52
|
+
v as getStatusData,
|
|
54
53
|
D as leafColumns
|
|
55
54
|
};
|
package/VirtualScroll.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react");function g(r){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(i,t,s.get?s:{enumerable:!0,get:()=>r[t]})}}return i.default=r,Object.freeze(i)}const u=g(p);class f{constructor(i){this.table=null,this.containerHeight=0,this.topCacheCount=0,this.attendedSkip=0,this.propsSkip=0,this.total=0,this.scrollableVirtual=!1,this.realSkip=0,this.pageSize=0,this.PageChange=null,this.tableBodyRef=null,this.fixedScroll=!1,this.askedSkip=void 0,this.containerRef=null,this.tableTransform="",this.prevScrollPos=0,this.tableTranslate=0,this.scrollSyncing=!1,this.reactVersion=Number.parseFloat(u.version),this.topItems=(t,s)=>{if(!this.container||s)return{topItemsCount:0,topItemsHeight:0};const l=this.container.clientHeight,e=Math.ceil(l/t[0].line),n=Math.ceil((t.length-e)/2);let o=0;for(let a=0;a<n;a++)o+=t[a].line+t[a].acc;return{topItemsCount:n,topItemsHeight:o,itemsNeededOnScreen:e+e/2}},this.horizontalScrollbarHeight=()=>this.container?this.container.offsetHeight-this.container.clientHeight:0,i&&(this.topCacheCount=4,this.attendedSkip=-this.topCacheCount),this.scrollHandler=this.scrollHandler.bind(this)}get container(){var i;return(i=this.containerRef)==null?void 0:i.current}get rowHeights(){var l,e;const i=[],t=((l=this.tableBodyRef)==null?void 0:l.current)&&((e=this.tableBodyRef)==null?void 0:e.current.children)||[];let s=0;for(let n=0;n<t.length;n++){if(t[n].className.indexOf("k-grouping-row")>-1){s+=t[n].scrollHeight;continue}t[n].className.indexOf("k-detail-row")>-1?i[i.length-1].line+=t[n].scrollHeight:(i.push({line:t[n].scrollHeight,acc:s}),s=0)}return i}changePage(i,t){this.attendedSkip=i-this.topCacheCount,this.PageChange&&this.PageChange({skip:Math.max(0,i-this.topCacheCount),take:this.pageSize},t)}translate(i,t){this.tableTranslate=i,this.scrollableVirtual&&this.table&&(this.reactVersion<=17||t?this.table.style.transform="translateY("+i+"px)":this.tableTransform="translateY("+i+"px)")}reset(){this.scrollSyncing=!0,!this.fixedScroll&&(this.container&&(this.container.scrollTop=0),this.translate(0,!0))}localScrollUp(i){if(!this.container)return;const t=this.rowHeights,s=this.container.scrollTop;let l=this.tableTranslate,e=0;const{topItemsCount:n,topItemsHeight:o,itemsNeededOnScreen:a}=this.topItems(t,!!this.topCacheCount),h=s-l;if(!(h>o||t.length<=a)){for(;e<this.topCacheCount+this.attendedSkip-this.realSkip+n&&this.propsSkip-e>0&&!(l+(t[t.length-1-e].line+t[t.length-1-e].acc)+h<=s);)l-=t[t.length-1-e].line+t[t.length-1-e].acc,e++;if(e===0&&this.topCacheCount===0&&this.attendedSkip>0&&(l=Math.max(l-t[0].line,0),e=1),this.propsSkip-e<=0&&l>s){this.translate(0),this.changePage(0,i),this.container.scrollTop=0;return}if(l>s&&(l=s),l!==this.tableTranslate){this.translate(Math.max(0,l-o));const c=Math.max(0,this.propsSkip-e-n);this.changePage(c,i)}}}localScrollDown(i){if(!this.container)return;const t=this.rowHeights,s=this.container.scrollTop;let l=this.tableTranslate,e=0;const{topItemsCount:n,topItemsHeight:o,itemsNeededOnScreen:a}=this.topItems(t,!!this.topCacheCount);for(;e<t.length-this.topCacheCount&&!(l+t[e].line+t[e].acc>s);)l+=t[e].line+t[e].acc,e++;n>this.propsSkip+e||t.length<=a||(e>=t.length-this.topCacheCount&&this.propsSkip+e>=this.total?(this.translate(l-o),this.changePage(this.total-1-n,i)):l!==this.tableTranslate&&this.propsSkip+e-n!==this.propsSkip&&(this.translate(l-o),this.changePage(this.propsSkip+e-n,i)))}scrollNonStrict(i){const t=this.total*this.prevScrollPos/this.containerHeight;let s=Math.floor(t);s>=this.total&&(s=this.total-1);const l=Math.min(t-s,1);let e=0;const n=s-this.propsSkip,o=this.rowHeights;n>=0&&n<=1?e=-((o[0].line+o[0].acc)*l):n===-1&&(e=-((o[o.length-1].line+o[o.length-1].acc)*l));const{topItemsCount:a,topItemsHeight:h}=this.topItems(o,!!this.topCacheCount);this.translate(Math.max(0,e-h-this.horizontalScrollbarHeight()+this.containerHeight*t/this.total)),this.changePage(s-a,i)}scrollHandler(i){if(!this.scrollableVirtual)return;if(this.scrollSyncing||!this.container||!this.table){this.scrollSyncing=!1;return}const t=this.container.scrollTop,s=this.prevScrollPos;if(this.prevScrollPos=t,this.askedSkip!==void 0){this.translate(this.containerHeight*this.askedSkip/this.total),this.changePage(this.askedSkip,i),this.prevScrollPos=t,this.askedSkip=void 0;return}t-s<0&&t>this.tableTranslate-this.table.scrollHeight/10?this.localScrollUp(i):t-s>0&&t<this.tableTranslate+this.table.scrollHeight*2/3?this.localScrollDown(i):this.scrollNonStrict(i),this.prevScrollPos=t}}exports.VirtualScroll=f;
|
package/VirtualScroll.mjs
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as c from "react";
|
|
10
9
|
class g {
|
|
11
10
|
constructor(i) {
|
package/VirtualScrollFixed.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),g=require("./utils/index.js");function u(s){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const e in s)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(s,e);Object.defineProperty(t,e,a.get?a:{enumerable:!0,get:()=>s[e]})}}return t.default=s,Object.freeze(t)}const p=u(d);class S{constructor(t){this.table=null,this.containerHeight=0,this.topCacheCount=0,this.attendedSkip=0,this.propsSkip=0,this.total=0,this.scrollableVirtual=!1,this.realSkip=0,this.pageSize=0,this.PageChange=null,this.tableBodyRef=null,this.fixedScroll=!1,this.askedSkip=void 0,this.containerRef=null,this.tableTransform="",this.scrollSyncing=!1,this.lastLoaded=0,this.firstLoaded=0,this.lastScrollTop=0,this.reactVersion=Number.parseFloat(p.version),this.firstLoaded=this.pageSize,this.lastLoaded=this.realSkip+this.pageSize,this.scrollHandler=this.scrollHandler.bind(this)}get container(){var t;return((t=this.containerRef)==null?void 0:t.current)||void 0}translate(t,e){this.scrollableVirtual&&this.table&&(g.firefox||this.reactVersion<=17||e?this.table.style.transform="translateY("+t+"px)":this.tableTransform="translateY("+t+"px)")}changePage(t,e){this.PageChange&&this.PageChange({skip:Math.max(0,t),take:this.pageSize},e)}reset(){this.scrollSyncing=!0,!this.fixedScroll&&(this.container&&(this.container.scrollTop=0),this.translate(0,!0))}scrollHandler(t){var l;if(!this.scrollableVirtual||!this.container||!this.table||!this.rowHeightService||!((l=this.containerRef)!=null&&l.current))return;if(this.scrollSyncing){this.scrollSyncing=!1;return}const e=this.container.scrollTop,a=this.lastScrollTop>=e,h=!a;this.lastScrollTop=e;let i=this.rowHeightService.index(e),o=this.rowHeightService.offset(i);const{offsetHeight:n}=this.containerRef.current,c=this.rowHeightService.index(e+n);if(h&&c>=this.lastLoaded&&this.lastLoaded<this.total){const r=i+this.pageSize-this.total;r>0&&(i=i-r,o=this.rowHeightService.offset(i)),this.firstLoaded=i,this.translate(o);const f=this.firstLoaded+this.pageSize;this.lastLoaded=Math.min(f,this.total),this.changePage(this.firstLoaded,t)}else if(a&&i<this.firstLoaded){const r=Math.floor(this.pageSize*.3);this.firstLoaded=Math.max(i-r,0),this.translate(this.rowHeightService.offset(this.firstLoaded)),this.lastLoaded=Math.min(this.firstLoaded+this.pageSize,this.total),this.changePage(this.firstLoaded,t)}}}exports.VirtualScrollFixed=S;
|
package/VirtualScrollFixed.mjs
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as f from "react";
|
|
10
9
|
import { firefox as d } from "./utils/index.mjs";
|
|
11
10
|
class S {
|
|
@@ -33,18 +32,18 @@ class S {
|
|
|
33
32
|
this.scrollSyncing = !1;
|
|
34
33
|
return;
|
|
35
34
|
}
|
|
36
|
-
const i = this.container.scrollTop, a = this.lastScrollTop >= i,
|
|
35
|
+
const i = this.container.scrollTop, a = this.lastScrollTop >= i, o = !a;
|
|
37
36
|
this.lastScrollTop = i;
|
|
38
|
-
let
|
|
39
|
-
const { offsetHeight:
|
|
40
|
-
if (
|
|
41
|
-
const
|
|
42
|
-
|
|
37
|
+
let s = this.rowHeightService.index(i), r = this.rowHeightService.offset(s);
|
|
38
|
+
const { offsetHeight: l } = this.containerRef.current, n = this.rowHeightService.index(i + l);
|
|
39
|
+
if (o && n >= this.lastLoaded && this.lastLoaded < this.total) {
|
|
40
|
+
const e = s + this.pageSize - this.total;
|
|
41
|
+
e > 0 && (s = s - e, r = this.rowHeightService.offset(s)), this.firstLoaded = s, this.translate(r);
|
|
43
42
|
const c = this.firstLoaded + this.pageSize;
|
|
44
43
|
this.lastLoaded = Math.min(c, this.total), this.changePage(this.firstLoaded, t);
|
|
45
|
-
} else if (a &&
|
|
46
|
-
const
|
|
47
|
-
this.firstLoaded = Math.max(
|
|
44
|
+
} else if (a && s < this.firstLoaded) {
|
|
45
|
+
const e = Math.floor(this.pageSize * 0.3);
|
|
46
|
+
this.firstLoaded = Math.max(s - e, 0), this.translate(this.rowHeightService.offset(this.firstLoaded)), this.lastLoaded = Math.min(this.firstLoaded + this.pageSize, this.total), this.changePage(this.firstLoaded, t);
|
|
48
47
|
}
|
|
49
48
|
}
|
|
50
49
|
}
|
package/cells/GridCell.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react"),s=require("../utils/index.js"),y=require("../constants/index.js"),m=require("./client/GridCellContainer.js"),f=require("@progress/kendo-react-common");function S(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const l=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,l.get?l:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const c=S(g),G=e=>{let n=null,t=null,l=null;const r=e.unstyled,C=r&&r.uGrid?r.uGrid:f.uGrid;if(e.rowType==="groupFooter")t={className:e.className},n=c.createElement("td",{...t},l);else if(e.rowType!=="groupHeader"){if(e.field!==void 0){const i=s.getNestedValue(e.field,e.dataItem);i!=null&&(l=e.intl&&e.format?e.intl.format(e.format,i):i.toString())}const a=f.classNames(C.td({selected:e.isSelected,sorted:e.isSorted,alt:e.isAlt}),e.className);t={colSpan:e.colSpan,style:e.style,className:a,role:"gridcell","aria-colindex":e.ariaColumnIndex,"aria-selected":e.isSelected,[y.GRID_COL_INDEX_ATTRIBUTE]:e.columnIndex},n=c.createElement("td",{...t},l)}const d=s.getClientCellProps(e),u=e.rowType||"data",o=e.cells;if(o&&o[u]){const a=o[u],i=s.isClientReference(a);return c.createElement(m.GridCellContainer,{cellProps:d,tdProps:t,isCustom:!0,isClient:i},c.createElement(a,{...d,tdProps:t},l))}return c.createElement(m.GridCellContainer,{cellProps:d,content:l,tdProps:t},n)};exports.GridCell=G;
|
package/cells/GridCell.mjs
CHANGED
|
@@ -5,56 +5,44 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as i from "react";
|
|
10
|
-
import { getNestedValue as C } from "../utils/index.mjs";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const f = g(), d = x(), s = d && d.uGrid ? d.uGrid : N, m = y(e.id), u = i.useCallback(
|
|
18
|
-
(l) => {
|
|
19
|
-
e.onContextMenu && e.onContextMenu.call(void 0, l, e.dataItem, e.field);
|
|
20
|
-
},
|
|
21
|
-
[e.onContextMenu, e.dataItem, e.field]
|
|
22
|
-
);
|
|
23
|
-
let t = null, c = null;
|
|
9
|
+
import { getNestedValue as f, getClientCellProps as C, isClientReference as g } from "../utils/index.mjs";
|
|
10
|
+
import { GRID_COL_INDEX_ATTRIBUTE as y } from "../constants/index.mjs";
|
|
11
|
+
import { GridCellContainer as s } from "./client/GridCellContainer.mjs";
|
|
12
|
+
import { uGrid as E, classNames as N } from "@progress/kendo-react-common";
|
|
13
|
+
const R = (e) => {
|
|
14
|
+
let c = null, t = null, n = null;
|
|
15
|
+
const d = e.unstyled, u = d && d.uGrid ? d.uGrid : E;
|
|
24
16
|
if (e.rowType === "groupFooter")
|
|
25
17
|
t = {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
...m
|
|
29
|
-
}, n = /* @__PURE__ */ i.createElement("td", { ...t });
|
|
18
|
+
className: e.className
|
|
19
|
+
}, c = /* @__PURE__ */ i.createElement("td", { ...t }, n);
|
|
30
20
|
else if (e.rowType !== "groupHeader") {
|
|
31
21
|
if (e.field !== void 0) {
|
|
32
|
-
const
|
|
33
|
-
|
|
22
|
+
const l = f(e.field, e.dataItem);
|
|
23
|
+
l != null && (n = e.intl && e.format ? e.intl.format(e.format, l) : l.toString());
|
|
34
24
|
}
|
|
35
|
-
const
|
|
36
|
-
|
|
25
|
+
const a = N(
|
|
26
|
+
u.td({ selected: e.isSelected, sorted: e.isSorted, alt: e.isAlt }),
|
|
37
27
|
e.className
|
|
38
28
|
);
|
|
39
29
|
t = {
|
|
40
|
-
onContextMenu: u,
|
|
41
30
|
colSpan: e.colSpan,
|
|
42
31
|
style: e.style,
|
|
43
|
-
className:
|
|
32
|
+
className: a,
|
|
44
33
|
role: "gridcell",
|
|
45
34
|
"aria-colindex": e.ariaColumnIndex,
|
|
46
35
|
"aria-selected": e.isSelected,
|
|
47
|
-
[
|
|
48
|
-
|
|
49
|
-
}, n = /* @__PURE__ */ i.createElement("td", { ...t }, c);
|
|
36
|
+
[y]: e.columnIndex
|
|
37
|
+
}, c = /* @__PURE__ */ i.createElement("td", { ...t }, n);
|
|
50
38
|
}
|
|
51
|
-
const r = e.rowType || "data",
|
|
52
|
-
if (
|
|
53
|
-
const
|
|
54
|
-
return /* @__PURE__ */ i.createElement(l, { ...
|
|
39
|
+
const r = C(e), o = e.rowType || "data", m = e.cells;
|
|
40
|
+
if (m && m[o]) {
|
|
41
|
+
const a = m[o], l = g(a);
|
|
42
|
+
return /* @__PURE__ */ i.createElement(s, { cellProps: r, tdProps: t, isCustom: !0, isClient: l }, /* @__PURE__ */ i.createElement(a, { ...r, tdProps: t }, n));
|
|
55
43
|
}
|
|
56
|
-
return
|
|
44
|
+
return /* @__PURE__ */ i.createElement(s, { cellProps: r, content: n, tdProps: t }, c);
|
|
57
45
|
};
|
|
58
46
|
export {
|
|
59
|
-
|
|
47
|
+
R as GridCell
|
|
60
48
|
};
|
package/cells/GridDetailCell.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),c=require("@progress/kendo-react-common"),u=require("./client/DetailCellContainer.js");function m(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const r=m(s),f=e=>{const{colSpan:a,ariaColIndex:t,dataItem:n,dataIndex:i,id:o}=e,l=e.unstyled,d=l&&l.uGrid?l.uGrid:c.uGrid;return r.createElement(u.DetailCellContainer,{id:o,dataItem:n},r.createElement("td",{className:c.classNames(d.detailTd({})),colSpan:a,"aria-colindex":t,role:"gridcell"},r.createElement(e.detail,{dataItem:n,dataIndex:i})))};exports.GridDetailCell=f;
|
package/cells/GridDetailCell.mjs
CHANGED
|
@@ -5,30 +5,22 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
|
-
import { useTableKeyboardNavigation as m } from "@progress/kendo-react-data-tools";
|
|
10
8
|
import * as a from "react";
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
},
|
|
17
|
-
[e.onContextMenu, e.dataItem]
|
|
18
|
-
);
|
|
19
|
-
return /* @__PURE__ */ a.createElement(
|
|
9
|
+
import { uGrid as c, classNames as s } from "@progress/kendo-react-common";
|
|
10
|
+
import { DetailCellContainer as m } from "./client/DetailCellContainer.mjs";
|
|
11
|
+
const x = (e) => {
|
|
12
|
+
const { colSpan: r, ariaColIndex: d, dataItem: l, dataIndex: i, id: n } = e, t = e.unstyled, o = t && t.uGrid ? t.uGrid : c;
|
|
13
|
+
return /* @__PURE__ */ a.createElement(m, { id: n, dataItem: l }, /* @__PURE__ */ a.createElement(
|
|
20
14
|
"td",
|
|
21
15
|
{
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
role: "gridcell",
|
|
27
|
-
...c
|
|
16
|
+
className: s(o.detailTd({})),
|
|
17
|
+
colSpan: r,
|
|
18
|
+
"aria-colindex": d,
|
|
19
|
+
role: "gridcell"
|
|
28
20
|
},
|
|
29
|
-
/* @__PURE__ */ a.createElement(e.detail, { dataItem: l, dataIndex:
|
|
30
|
-
);
|
|
21
|
+
/* @__PURE__ */ a.createElement(e.detail, { dataItem: l, dataIndex: i })
|
|
22
|
+
));
|
|
31
23
|
};
|
|
32
24
|
export {
|
|
33
|
-
|
|
25
|
+
x as GridDetailCell
|
|
34
26
|
};
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("@progress/kendo-react-common"),a=require("react");function l(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const c=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,c.get?c:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const o=l(a),i=e=>{const t=e.unstyled,r=t&&t.uGrid?t.uGrid:n.uGrid;return o.createElement("td",{className:n.classNames(r.hierarchyTd({})),role:"gridcell"})};exports.GridDetailHierarchyCell=i;
|
|
@@ -5,13 +5,12 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
return /* @__PURE__ */ i.createElement("td", { className: l(r.hierarchyTd({})), role: "gridcell" });
|
|
8
|
+
import { uGrid as t, classNames as l } from "@progress/kendo-react-common";
|
|
9
|
+
import * as a from "react";
|
|
10
|
+
const c = (e) => {
|
|
11
|
+
const r = e.unstyled, s = r && r.uGrid ? r.uGrid : t;
|
|
12
|
+
return /* @__PURE__ */ a.createElement("td", { className: l(s.hierarchyTd({})), role: "gridcell" });
|
|
14
13
|
};
|
|
15
14
|
export {
|
|
16
|
-
|
|
15
|
+
c as GridDetailHierarchyCell
|
|
17
16
|
};
|