@progress/kendo-react-grid 8.3.0-develop.3 → 8.3.0-develop.4
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 +337 -341
- package/cells/GridCell.js +1 -1
- package/cells/GridCell.mjs +20 -21
- package/cells/GridDetailCell.js +1 -1
- package/cells/GridDetailCell.mjs +14 -13
- package/cells/GridDetailHierarchyCell.js +1 -1
- package/cells/GridDetailHierarchyCell.mjs +7 -3
- package/cells/GridEditCell.js +1 -1
- package/cells/GridEditCell.mjs +26 -28
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/drag/ColumnDraggable.js +1 -1
- package/drag/ColumnDraggable.mjs +17 -15
- package/header/GridHeaderCell.js +1 -1
- package/header/GridHeaderCell.mjs +22 -28
- package/header/GridHeaderSelectionCell.js +1 -1
- package/header/GridHeaderSelectionCell.mjs +3 -3
- package/header/Header.js +1 -1
- package/header/Header.mjs +21 -33
- package/header/HeaderRow.js +1 -1
- package/header/HeaderRow.mjs +83 -77
- package/index.d.mts +7 -12
- package/index.d.ts +7 -12
- package/index.js +1 -1
- package/index.mjs +80 -80
- package/package-metadata.mjs +1 -1
- package/package.json +10 -10
- package/rows/GridRow.js +1 -1
- package/rows/GridRow.mjs +32 -40
- package/utils/index.js +1 -1
- package/utils/index.mjs +39 -38
package/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ import { FilterOperator } from '@progress/kendo-react-data-tools';
|
|
|
20
20
|
import { ForwardRefExoticComponent } from 'react';
|
|
21
21
|
import { getSelectedState } from '@progress/kendo-react-data-tools';
|
|
22
22
|
import { getSelectedStateFromKeyDown } from '@progress/kendo-react-data-tools';
|
|
23
|
+
import { GridClassStructure } from '@progress/kendo-react-common';
|
|
23
24
|
import { GroupDescriptor } from '@progress/kendo-data-query';
|
|
24
25
|
import { HeaderCellBaseProps } from '@progress/kendo-react-data-tools';
|
|
25
26
|
import { HeaderThElementProps } from '@progress/kendo-react-data-tools';
|
|
@@ -1861,12 +1862,7 @@ export declare interface GridHandle extends Pick<GridClassComponent, keyof GridC
|
|
|
1861
1862
|
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
1862
1863
|
* ```
|
|
1863
1864
|
*/
|
|
1864
|
-
export declare
|
|
1865
|
-
/**
|
|
1866
|
-
* @hidden
|
|
1867
|
-
*/
|
|
1868
|
-
render(): string | number | boolean | Iterable<React_2.ReactNode> | JSX_2.Element | null | undefined;
|
|
1869
|
-
}
|
|
1865
|
+
export declare const GridHeaderCell: (props: GridHeaderCellProps) => string | number | boolean | Iterable<React_2.ReactNode> | JSX_2.Element | null | undefined;
|
|
1870
1866
|
|
|
1871
1867
|
/**
|
|
1872
1868
|
* The props of the GridHeaderCell component
|
|
@@ -2407,17 +2403,16 @@ export declare interface GridProps extends KendoReactComponentBaseProps {
|
|
|
2407
2403
|
* Sets the `id` property of the top div element of the component.
|
|
2408
2404
|
*/
|
|
2409
2405
|
id?: string;
|
|
2406
|
+
/**
|
|
2407
|
+
* @hidden
|
|
2408
|
+
*/
|
|
2409
|
+
unstyled?: GridClassStructure;
|
|
2410
2410
|
}
|
|
2411
2411
|
|
|
2412
2412
|
/**
|
|
2413
2413
|
* The component for each of the items in the `data` property which the Grid renders.
|
|
2414
2414
|
*/
|
|
2415
|
-
export declare
|
|
2416
|
-
/**
|
|
2417
|
-
* @hidden
|
|
2418
|
-
*/
|
|
2419
|
-
render(): string | number | boolean | Iterable<React_2.ReactNode> | JSX_2.Element | null | undefined;
|
|
2420
|
-
}
|
|
2415
|
+
export declare const GridRow: (props: GridRowProps) => string | number | boolean | Iterable<React_2.ReactNode> | JSX_2.Element | null | undefined;
|
|
2421
2416
|
|
|
2422
2417
|
/**
|
|
2423
2418
|
* Represents the object of the `onRowClick` Grid event.
|
package/index.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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./Grid.js"),G=require("./GridColumn.js"),a=require("./columnMenu/GridColumnMenuWrapper.js"),C=require("./columnMenu/GridColumnMenuGroup.js"),s=require("./columnMenu/GridColumnMenuSort.js"),o=require("./columnMenu/GridColumnMenuFilter.js"),m=require("./columnMenu/GridColumnMenuFilterUI.js"),c=require("./columnMenu/GridColumnMenuFilterCell.js"),g=require("./columnMenu/GridColumnMenuCheckboxFilter.js"),p=require("./columnMenu/GridColumnMenuColumnsList.js"),M=require("./cells/GridCell.js"),I=require("./cells/GridEditCell.js"),q=require("./cells/GridGroupCell.js"),S=require("./cells/GridHierarchyCell.js"),R=require("./cells/GridFilterCell.js"),D=require("./header/GridHeaderCell.js"),E=require("./cells/GridSelectionCell.js"),F=require("./rows/GridDetailRow.js"),T=require("./rows/GridRow.js"),P=require("./GridToolbar.js"),_=require("./GridNoRecords.js"),b=require("./columnMenu/GridColumnMenuItem.js"),N=require("./columnMenu/GridColumnMenuItemContent.js"),O=require("./columnMenu/GridColumnMenuItemGroup.js"),i=require("./constants/index.js"),t=require("@progress/kendo-react-data-tools"),h=require("./drag/CommonDragLogic.js"),r=require("./filterCommon.js"),n=require("@progress/kendo-react-common"),e=require("./messages/index.js"),l=require("./StatusBar.js"),d=n.withIdHOC(n.withUnstyledHOC(u.Grid));d.displayName="KendoReactGrid";exports.GridClassComponent=u.Grid;exports.GridColumn=G.GridColumn;exports.GridColumnMenuWrapper=a.GridColumnMenuWrapper;exports.GridColumnMenuGroup=C.GridColumnMenuGroup;exports.GridColumnMenuSort=s.GridColumnMenuSort;exports.GridColumnMenuFilter=o.GridColumnMenuFilter;exports.filterGroupByField=o.filterGroupByField;exports.rootFilterOrDefault=o.rootFilterOrDefault;exports.GridColumnMenuFilterUI=m.GridColumnMenuFilterUI;exports.GridColumnMenuFilterCell=c.GridColumnMenuFilterCell;exports.GridColumnMenuCheckboxFilter=g.GridColumnMenuCheckboxFilter;exports.GridColumnMenuColumnsList=p.GridColumnMenuColumnsList;exports.GridCell=M.GridCell;exports.GridEditCell=I.GridEditCell;exports.GridGroupCell=q.GridGroupCell;exports.GridHierarchyCell=S.GridHierarchyCell;exports.GridFilterCell=R.GridFilterCell;exports.GridHeaderCell=D.GridHeaderCell;exports.GridSelectionCell=E.GridSelectionCell;exports.GridDetailRow=F.GridDetailRow;exports.GridRow=T.GridRow;exports.GridToolbar=P.GridToolbar;exports.GridNoRecords=_.GridNoRecords;exports.GridColumnMenuItem=b.GridColumnMenuItem;exports.GridColumnMenuItemContent=N.GridColumnMenuItemContent;exports.GridColumnMenuItemGroup=O.GridColumnMenuItemGroup;exports.GRID_COL_INDEX_ATTRIBUTE=i.GRID_COL_INDEX_ATTRIBUTE;exports.GRID_PREVENT_SELECTION_ELEMENT=i.GRID_PREVENT_SELECTION_ELEMENT;exports.GRID_ROW_INDEX_ATTRIBUTE=i.GRID_ROW_INDEX_ATTRIBUTE;Object.defineProperty(exports,"getSelectedState",{enumerable:!0,get:()=>t.getSelectedState});Object.defineProperty(exports,"getSelectedStateFromKeyDown",{enumerable:!0,get:()=>t.getSelectedStateFromKeyDown});Object.defineProperty(exports,"setSelectedState",{enumerable:!0,get:()=>t.setSelectedState});exports.GridCommonDragLogic=h.CommonDragLogic;exports.booleanFilterValues=r.booleanFilterValues;exports.cellBoolDropdownChange=r.cellBoolDropdownChange;exports.cellInputChange=r.cellInputChange;exports.cellOperatorChange=r.cellOperatorChange;exports.operators=r.operators;exports.gridMessages=e.messages;exports.pagerFirstPage=e.pagerFirstPage;exports.pagerInfo=e.pagerInfo;exports.pagerItemPerPage=e.pagerItemPerPage;exports.pagerLastPage=e.pagerLastPage;exports.pagerNextPage=e.pagerNextPage;exports.pagerPreviousPage=e.pagerPreviousPage;exports.StatusBar=l.StatusBar;exports.getStatusData=l.getStatusData;exports.leafColumns=l.leafColumns;exports.Grid=d;
|
package/index.mjs
CHANGED
|
@@ -7,86 +7,86 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import { Grid as r } from "./Grid.mjs";
|
|
10
|
-
import { GridColumn as
|
|
11
|
-
import { GridColumnMenuWrapper as
|
|
12
|
-
import { GridColumnMenuGroup as
|
|
13
|
-
import { GridColumnMenuSort as
|
|
14
|
-
import { GridColumnMenuFilter as
|
|
15
|
-
import { GridColumnMenuFilterUI as
|
|
16
|
-
import { GridColumnMenuFilterCell as
|
|
17
|
-
import { GridColumnMenuCheckboxFilter as
|
|
18
|
-
import { GridColumnMenuColumnsList as
|
|
19
|
-
import { GridCell as
|
|
20
|
-
import { GridEditCell as
|
|
21
|
-
import { GridGroupCell as
|
|
22
|
-
import { GridHierarchyCell as
|
|
23
|
-
import { GridFilterCell as
|
|
24
|
-
import { GridHeaderCell as
|
|
25
|
-
import { GridSelectionCell as
|
|
26
|
-
import { GridDetailRow as
|
|
27
|
-
import { GridRow as
|
|
28
|
-
import { GridToolbar as
|
|
29
|
-
import { GridNoRecords as
|
|
30
|
-
import { GridColumnMenuItem as
|
|
31
|
-
import { GridColumnMenuItemContent as
|
|
32
|
-
import { GridColumnMenuItemGroup as
|
|
33
|
-
import { GRID_COL_INDEX_ATTRIBUTE as
|
|
34
|
-
import { getSelectedState as
|
|
35
|
-
import { CommonDragLogic as
|
|
36
|
-
import { booleanFilterValues as
|
|
37
|
-
import { withIdHOC as e } from "@progress/kendo-react-common";
|
|
38
|
-
import { messages as
|
|
39
|
-
import { StatusBar as
|
|
40
|
-
const
|
|
41
|
-
|
|
10
|
+
import { GridColumn as a } from "./GridColumn.mjs";
|
|
11
|
+
import { GridColumnMenuWrapper as d } from "./columnMenu/GridColumnMenuWrapper.mjs";
|
|
12
|
+
import { GridColumnMenuGroup as G } from "./columnMenu/GridColumnMenuGroup.mjs";
|
|
13
|
+
import { GridColumnMenuSort as C } from "./columnMenu/GridColumnMenuSort.mjs";
|
|
14
|
+
import { GridColumnMenuFilter as s, filterGroupByField as g, rootFilterOrDefault as I } from "./columnMenu/GridColumnMenuFilter.mjs";
|
|
15
|
+
import { GridColumnMenuFilterUI as M } from "./columnMenu/GridColumnMenuFilterUI.mjs";
|
|
16
|
+
import { GridColumnMenuFilterCell as E } from "./columnMenu/GridColumnMenuFilterCell.mjs";
|
|
17
|
+
import { GridColumnMenuCheckboxFilter as S } from "./columnMenu/GridColumnMenuCheckboxFilter.mjs";
|
|
18
|
+
import { GridColumnMenuColumnsList as T } from "./columnMenu/GridColumnMenuColumnsList.mjs";
|
|
19
|
+
import { GridCell as N } from "./cells/GridCell.mjs";
|
|
20
|
+
import { GridEditCell as h } from "./cells/GridEditCell.mjs";
|
|
21
|
+
import { GridGroupCell as O } from "./cells/GridGroupCell.mjs";
|
|
22
|
+
import { GridHierarchyCell as y } from "./cells/GridHierarchyCell.mjs";
|
|
23
|
+
import { GridFilterCell as H } from "./cells/GridFilterCell.mjs";
|
|
24
|
+
import { GridHeaderCell as b } from "./header/GridHeaderCell.mjs";
|
|
25
|
+
import { GridSelectionCell as K } from "./cells/GridSelectionCell.mjs";
|
|
26
|
+
import { GridDetailRow as W } from "./rows/GridDetailRow.mjs";
|
|
27
|
+
import { GridRow as k } from "./rows/GridRow.mjs";
|
|
28
|
+
import { GridToolbar as $ } from "./GridToolbar.mjs";
|
|
29
|
+
import { GridNoRecords as q } from "./GridNoRecords.mjs";
|
|
30
|
+
import { GridColumnMenuItem as J } from "./columnMenu/GridColumnMenuItem.mjs";
|
|
31
|
+
import { GridColumnMenuItemContent as Y } from "./columnMenu/GridColumnMenuItemContent.mjs";
|
|
32
|
+
import { GridColumnMenuItemGroup as rr } from "./columnMenu/GridColumnMenuItemGroup.mjs";
|
|
33
|
+
import { GRID_COL_INDEX_ATTRIBUTE as or, GRID_PREVENT_SELECTION_ELEMENT as tr, GRID_ROW_INDEX_ATTRIBUTE as lr } from "./constants/index.mjs";
|
|
34
|
+
import { getSelectedState as ir, getSelectedStateFromKeyDown as pr, setSelectedState as ar } from "@progress/kendo-react-data-tools";
|
|
35
|
+
import { CommonDragLogic as dr } from "./drag/CommonDragLogic.mjs";
|
|
36
|
+
import { booleanFilterValues as Gr, cellBoolDropdownChange as fr, cellInputChange as Cr, cellOperatorChange as xr, operators as sr } from "./filterCommon.mjs";
|
|
37
|
+
import { withIdHOC as e, withUnstyledHOC as o } from "@progress/kendo-react-common";
|
|
38
|
+
import { messages as Ir, pagerFirstPage as cr, pagerInfo as Mr, pagerItemPerPage as Dr, pagerLastPage as Er, pagerNextPage as Rr, pagerPreviousPage as Sr } from "./messages/index.mjs";
|
|
39
|
+
import { StatusBar as Tr, getStatusData as _r, leafColumns as Nr } from "./StatusBar.mjs";
|
|
40
|
+
const t = e(o(r));
|
|
41
|
+
t.displayName = "KendoReactGrid";
|
|
42
42
|
export {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
or as GRID_COL_INDEX_ATTRIBUTE,
|
|
44
|
+
tr as GRID_PREVENT_SELECTION_ELEMENT,
|
|
45
|
+
lr as GRID_ROW_INDEX_ATTRIBUTE,
|
|
46
|
+
t as Grid,
|
|
47
|
+
N as GridCell,
|
|
48
48
|
r as GridClassComponent,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
49
|
+
a as GridColumn,
|
|
50
|
+
S as GridColumnMenuCheckboxFilter,
|
|
51
|
+
T as GridColumnMenuColumnsList,
|
|
52
|
+
s as GridColumnMenuFilter,
|
|
53
|
+
E as GridColumnMenuFilterCell,
|
|
54
|
+
M as GridColumnMenuFilterUI,
|
|
55
|
+
G as GridColumnMenuGroup,
|
|
56
|
+
J as GridColumnMenuItem,
|
|
57
|
+
Y as GridColumnMenuItemContent,
|
|
58
|
+
rr as GridColumnMenuItemGroup,
|
|
59
|
+
C as GridColumnMenuSort,
|
|
60
|
+
d as GridColumnMenuWrapper,
|
|
61
|
+
dr as GridCommonDragLogic,
|
|
62
|
+
W as GridDetailRow,
|
|
63
|
+
h as GridEditCell,
|
|
64
|
+
H as GridFilterCell,
|
|
65
|
+
O as GridGroupCell,
|
|
66
|
+
b as GridHeaderCell,
|
|
67
|
+
y as GridHierarchyCell,
|
|
68
|
+
q as GridNoRecords,
|
|
69
|
+
k as GridRow,
|
|
70
|
+
K as GridSelectionCell,
|
|
71
|
+
$ as GridToolbar,
|
|
72
|
+
Tr as StatusBar,
|
|
73
|
+
Gr as booleanFilterValues,
|
|
74
|
+
fr as cellBoolDropdownChange,
|
|
75
|
+
Cr as cellInputChange,
|
|
76
|
+
xr as cellOperatorChange,
|
|
77
|
+
g as filterGroupByField,
|
|
78
|
+
ir as getSelectedState,
|
|
79
|
+
pr as getSelectedStateFromKeyDown,
|
|
80
|
+
_r as getStatusData,
|
|
81
|
+
Ir as gridMessages,
|
|
82
|
+
Nr as leafColumns,
|
|
83
|
+
sr as operators,
|
|
84
|
+
cr as pagerFirstPage,
|
|
85
|
+
Mr as pagerInfo,
|
|
86
|
+
Dr as pagerItemPerPage,
|
|
87
|
+
Er as pagerLastPage,
|
|
88
|
+
Rr as pagerNextPage,
|
|
89
|
+
Sr as pagerPreviousPage,
|
|
90
|
+
I as rootFilterOrDefault,
|
|
91
|
+
ar as setSelectedState
|
|
92
92
|
};
|
package/package-metadata.mjs
CHANGED
|
@@ -10,7 +10,7 @@ const e = {
|
|
|
10
10
|
name: "@progress/kendo-react-grid",
|
|
11
11
|
productName: "KendoReact",
|
|
12
12
|
productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
|
|
13
|
-
publishDate:
|
|
13
|
+
publishDate: 1723622542,
|
|
14
14
|
version: "",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
16
16
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-grid",
|
|
3
|
-
"version": "8.3.0-develop.
|
|
3
|
+
"version": "8.3.0-develop.4",
|
|
4
4
|
"description": "React Data Grid (Table) provides 100+ ready-to-use data grid features. KendoReact Grid package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
"@progress/kendo-data-query": "^1.0.0",
|
|
26
26
|
"@progress/kendo-drawing": "^1.20.1",
|
|
27
27
|
"@progress/kendo-licensing": "^1.3.4",
|
|
28
|
-
"@progress/kendo-react-animation": "8.3.0-develop.
|
|
29
|
-
"@progress/kendo-react-buttons": "8.3.0-develop.
|
|
30
|
-
"@progress/kendo-react-common": "8.3.0-develop.
|
|
31
|
-
"@progress/kendo-react-data-tools": "8.3.0-develop.
|
|
32
|
-
"@progress/kendo-react-dateinputs": "8.3.0-develop.
|
|
33
|
-
"@progress/kendo-react-dropdowns": "8.3.0-develop.
|
|
34
|
-
"@progress/kendo-react-inputs": "8.3.0-develop.
|
|
35
|
-
"@progress/kendo-react-intl": "8.3.0-develop.
|
|
36
|
-
"@progress/kendo-react-popup": "8.3.0-develop.
|
|
28
|
+
"@progress/kendo-react-animation": "8.3.0-develop.4",
|
|
29
|
+
"@progress/kendo-react-buttons": "8.3.0-develop.4",
|
|
30
|
+
"@progress/kendo-react-common": "8.3.0-develop.4",
|
|
31
|
+
"@progress/kendo-react-data-tools": "8.3.0-develop.4",
|
|
32
|
+
"@progress/kendo-react-dateinputs": "8.3.0-develop.4",
|
|
33
|
+
"@progress/kendo-react-dropdowns": "8.3.0-develop.4",
|
|
34
|
+
"@progress/kendo-react-inputs": "8.3.0-develop.4",
|
|
35
|
+
"@progress/kendo-react-intl": "8.3.0-develop.4",
|
|
36
|
+
"@progress/kendo-react-popup": "8.3.0-develop.4",
|
|
37
37
|
"@progress/kendo-svg-icons": "^3.0.0",
|
|
38
38
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0",
|
|
39
39
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
|
package/rows/GridRow.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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),r=require("@progress/kendo-react-common"),s=require("../constants/index.js");function g(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:()=>e[i]})}}return t.default=e,Object.freeze(t)}const b=g(u),w=e=>{const{rowType:t,isAltRow:i,isInEdit:n,isSelected:a}=e,o=r.useUnstyled(),c=o&&o.uGrid?o.uGrid:r.uGrid,l=r.classNames(c.tr({selected:a,isHeader:t==="groupHeader",isFooter:t==="groupFooter",isMaster:t!=="groupHeader"&&t!=="groupFooter",isAltRow:i,isInEdit:n})),d=b.createElement("tr",{id:e.id,onClick:e.onClick,onDoubleClick:e.onDoubleClick,className:l,style:{height:e.rowHeight?e.rowHeight+"px":"",visibility:e.isHidden?"hidden":""},role:"row","aria-rowindex":e.ariaRowIndex,"absolute-row-index":e.absoluteRowIndex,key:e.absoluteRowIndex,[s.GRID_ROW_INDEX_ATTRIBUTE]:e.rowType==="data"?e.dataIndex:void 0},e.children);return e.render?e.render.call(void 0,d,e):d};exports.GridRow=w;
|
package/rows/GridRow.mjs
CHANGED
|
@@ -6,46 +6,38 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
10
|
-
import {
|
|
11
|
-
import { GRID_ROW_INDEX_ATTRIBUTE as
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
id: this.props.id,
|
|
31
|
-
onClick: this.props.onClick,
|
|
32
|
-
onDoubleClick: this.props.onDoubleClick,
|
|
33
|
-
className: e,
|
|
34
|
-
style: {
|
|
35
|
-
height: this.props.rowHeight ? this.props.rowHeight + "px" : "",
|
|
36
|
-
visibility: this.props.isHidden ? "hidden" : ""
|
|
37
|
-
},
|
|
38
|
-
role: "row",
|
|
39
|
-
"aria-rowindex": this.props.ariaRowIndex,
|
|
40
|
-
"absolute-row-index": this.props.absoluteRowIndex,
|
|
41
|
-
key: this.props.absoluteRowIndex,
|
|
42
|
-
[p]: this.props.rowType === "data" ? this.props.dataIndex : void 0
|
|
9
|
+
import * as c from "react";
|
|
10
|
+
import { useUnstyled as s, uGrid as u, classNames as w } from "@progress/kendo-react-common";
|
|
11
|
+
import { GRID_ROW_INDEX_ATTRIBUTE as R } from "../constants/index.mjs";
|
|
12
|
+
const x = (e) => {
|
|
13
|
+
const { rowType: i, isAltRow: o, isInEdit: n, isSelected: r } = e, t = s(), l = t && t.uGrid ? t.uGrid : u, a = w(l.tr({
|
|
14
|
+
selected: r,
|
|
15
|
+
isHeader: i === "groupHeader",
|
|
16
|
+
isFooter: i === "groupFooter",
|
|
17
|
+
isMaster: i !== "groupHeader" && i !== "groupFooter",
|
|
18
|
+
isAltRow: o,
|
|
19
|
+
isInEdit: n
|
|
20
|
+
})), d = /* @__PURE__ */ c.createElement(
|
|
21
|
+
"tr",
|
|
22
|
+
{
|
|
23
|
+
id: e.id,
|
|
24
|
+
onClick: e.onClick,
|
|
25
|
+
onDoubleClick: e.onDoubleClick,
|
|
26
|
+
className: a,
|
|
27
|
+
style: {
|
|
28
|
+
height: e.rowHeight ? e.rowHeight + "px" : "",
|
|
29
|
+
visibility: e.isHidden ? "hidden" : ""
|
|
43
30
|
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
31
|
+
role: "row",
|
|
32
|
+
"aria-rowindex": e.ariaRowIndex,
|
|
33
|
+
"absolute-row-index": e.absoluteRowIndex,
|
|
34
|
+
key: e.absoluteRowIndex,
|
|
35
|
+
[R]: e.rowType === "data" ? e.dataIndex : void 0
|
|
36
|
+
},
|
|
37
|
+
e.children
|
|
38
|
+
);
|
|
39
|
+
return e.render ? e.render.call(void 0, d, e) : d;
|
|
40
|
+
};
|
|
49
41
|
export {
|
|
50
|
-
|
|
42
|
+
x as GridRow
|
|
51
43
|
};
|
package/utils/index.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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../GridColumn.js"),g=require("@progress/kendo-react-data-tools");function f(e,
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../GridColumn.js"),g=require("@progress/kendo-react-data-tools");function f(e,t){const a=(e||"").split(".");let o=t;return a.forEach(d=>{o=o?o[d]:void 0}),o}function u(e,t,a,o,d,l,s=0){let r=s;for(let n=0;n<t.length;n++){if(!d||t[n].value===void 0||t[n].items===void 0){e[e.length]={dataIndex:o.index,dataItem:t[n],rowType:"data",level:s,expanded:l===void 0||f(l,t[n])},o.index++;continue}r=Math.max(r,s+1);const i=l===void 0||f(l,t[n])===void 0||f(l,t[n]);e[e.length]={dataIndex:-1,dataItem:t[n],level:s,rowType:"groupHeader",expanded:i},i&&(r=Math.max(u(e,t[n].items,a,o,d,l,s+1),r)),(a==="always"||i&&a==="visible")&&(e[e.length]={dataIndex:-1,dataItem:t[n],rowType:"groupFooter",level:s,expanded:i})}return r}function p(e,t,a,o=0){let d=[];if(!e)return[];e&&e.length===void 0&&(e=[e]),e.filter(r=>r&&r.props?!r.props.hidden:!r.hidden).forEach((r,n)=>{r=r.props?r.props:r;const i=t[n]||null,h=p(r.children,i&&i.children||[],a,o+1);d.push(Object.assign({depth:o},x.gridDefaultProps,h.length?{cell:()=>null,filterCell:()=>null}:{},i?{width:i.width,orderIndex:i.orderIndex}:{},r,{id:r.id?r.id:g.tableKeyboardNavigationTools.generateNavigatableId(`${a.prevId++}`,a.idPrefix,"column"),declarationIndex:d.length,children:h,rowSpan:0,colSpan:0,isAccessible:!0,left:i&&Math.floor(i.left),right:i&&Math.floor(i.right)}))});const s=(r,n)=>r.orderIndex===n.orderIndex?r.declarationIndex-n.declarationIndex:(r.orderIndex||0)-(n.orderIndex||0);if(d.sort(s),o===0){let r=[];const n=(i,h)=>i.forEach(c=>{c.parentIndex=h,n(c.children,r.push(c)-1)});return n(d,-1),r}return d}function v(e,t,a,o){let d=[];Array.isArray(e)?d=e:e&&(d=e.data);const l=[];if(d.length>0){let s=d[0];if(t)for(let n=0;n<t.length;n++)s=s.items&&s.items[0];Object.getOwnPropertyNames(s).forEach(n=>{n!==a&&l.push(Object.assign({id:g.tableKeyboardNavigationTools.generateNavigatableId(`${o.prevId++}`,o.idPrefix,"column"),declarationIndex:-1,parentIndex:-1,depth:0,colSpan:0,rowSpan:0,index:0,left:0,right:0,rightBorder:!1,children:[],ariaColumnIndex:0,isAccessible:!0},x.gridDefaultProps,{field:n}))})}return l}const w=(e,t)=>{let a=e[t.parentIndex];for(;a;){if(a.footerCell)return!0;a=e[a.parentIndex]}return!1},y=e=>e.filter(t=>w(e,t)?!1:!!t.footerCell||!(t.children&&t.children.length>0)),b=e=>e.width!==void 0?Math.floor(parseFloat(e.width.toString()))+"px":void 0,S=(e,t)=>t&&t.filter(a=>a.field===e).length>0,I=e=>(e.sort((t,a)=>t.declarationIndex-a.declarationIndex),e.map(t=>{const{declarationIndex:a,parentIndex:o,depth:d,colSpan:l,rowSpan:s,index:r,kFirst:n,children:i,...h}=t;return i.length?{children:I(i),...h}:h})),m=typeof window!="undefined"&&/Firefox/.test(window.navigator.userAgent),C=17895697,M=(e,t)=>{if(!(!e&&!t))return t?e?{...e,...t,select:{...e.select||{},...t.select||{}},hierarchy:{...e.hierarchy||{},...t.hierarchy||{}},group:{...e.group||{},...t.group||{}},edit:{...e.edit||{},...t.edit||{}}}:t:e};exports.autoGenerateColumns=v;exports.firefox=m;exports.firefoxMaxHeight=C;exports.flatData=u;exports.footerColumns=y;exports.getColumnWidth=b;exports.getNestedValue=f;exports.isSorted=S;exports.readColumns=p;exports.resolveCells=M;exports.sanitizeColumns=I;
|
package/utils/index.mjs
CHANGED
|
@@ -7,15 +7,15 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import { gridDefaultProps as x } from "../GridColumn.mjs";
|
|
10
|
-
import { tableKeyboardNavigationTools as
|
|
11
|
-
function
|
|
12
|
-
const
|
|
10
|
+
import { tableKeyboardNavigationTools as g } from "@progress/kendo-react-data-tools";
|
|
11
|
+
function c(e, r) {
|
|
12
|
+
const i = (e || "").split(".");
|
|
13
13
|
let o = r;
|
|
14
|
-
return
|
|
14
|
+
return i.forEach((d) => {
|
|
15
15
|
o = o ? o[d] : void 0;
|
|
16
16
|
}), o;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function p(e, r, i, o, d, s, h = 0) {
|
|
19
19
|
let t = h;
|
|
20
20
|
for (let n = 0; n < r.length; n++) {
|
|
21
21
|
if (!d || r[n].value === void 0 || r[n].items === void 0) {
|
|
@@ -24,54 +24,54 @@ function g(e, r, a, o, d, s, h = 0) {
|
|
|
24
24
|
dataItem: r[n],
|
|
25
25
|
rowType: "data",
|
|
26
26
|
level: h,
|
|
27
|
-
expanded: s === void 0 ||
|
|
27
|
+
expanded: s === void 0 || c(s, r[n])
|
|
28
28
|
}, o.index++;
|
|
29
29
|
continue;
|
|
30
30
|
}
|
|
31
31
|
t = Math.max(t, h + 1);
|
|
32
|
-
const
|
|
32
|
+
const a = s === void 0 || c(s, r[n]) === void 0 || c(s, r[n]);
|
|
33
33
|
e[e.length] = {
|
|
34
34
|
dataIndex: -1,
|
|
35
35
|
dataItem: r[n],
|
|
36
36
|
level: h,
|
|
37
37
|
rowType: "groupHeader",
|
|
38
|
-
expanded:
|
|
39
|
-
},
|
|
40
|
-
|
|
38
|
+
expanded: a
|
|
39
|
+
}, a && (t = Math.max(
|
|
40
|
+
p(e, r[n].items, i, o, d, s, h + 1),
|
|
41
41
|
t
|
|
42
|
-
)), (
|
|
42
|
+
)), (i === "always" || a && i === "visible") && (e[e.length] = {
|
|
43
43
|
dataIndex: -1,
|
|
44
44
|
dataItem: r[n],
|
|
45
45
|
rowType: "groupFooter",
|
|
46
46
|
level: h,
|
|
47
|
-
expanded:
|
|
47
|
+
expanded: a
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
return t;
|
|
51
51
|
}
|
|
52
|
-
function I(e, r,
|
|
52
|
+
function I(e, r, i, o = 0) {
|
|
53
53
|
let d = [];
|
|
54
54
|
if (!e)
|
|
55
55
|
return [];
|
|
56
56
|
e && e.length === void 0 && (e = [e]), e.filter((t) => t && t.props ? !t.props.hidden : !t.hidden).forEach((t, n) => {
|
|
57
57
|
t = t.props ? t.props : t;
|
|
58
|
-
const
|
|
58
|
+
const a = r[n] || null, f = I(t.children, a && a.children || [], i, o + 1);
|
|
59
59
|
d.push(
|
|
60
60
|
Object.assign(
|
|
61
61
|
{ depth: o },
|
|
62
62
|
x,
|
|
63
63
|
f.length ? { cell: () => null, filterCell: () => null } : {},
|
|
64
|
-
|
|
64
|
+
a ? { width: a.width, orderIndex: a.orderIndex } : {},
|
|
65
65
|
t,
|
|
66
66
|
{
|
|
67
|
-
id: t.id ? t.id :
|
|
67
|
+
id: t.id ? t.id : g.generateNavigatableId(`${i.prevId++}`, i.idPrefix, "column"),
|
|
68
68
|
declarationIndex: d.length,
|
|
69
69
|
children: f,
|
|
70
70
|
rowSpan: 0,
|
|
71
71
|
colSpan: 0,
|
|
72
72
|
isAccessible: !0,
|
|
73
|
-
left:
|
|
74
|
-
right:
|
|
73
|
+
left: a && Math.floor(a.left),
|
|
74
|
+
right: a && Math.floor(a.right)
|
|
75
75
|
}
|
|
76
76
|
)
|
|
77
77
|
);
|
|
@@ -79,14 +79,14 @@ function I(e, r, a, o = 0) {
|
|
|
79
79
|
const h = (t, n) => t.orderIndex === n.orderIndex ? t.declarationIndex - n.declarationIndex : (t.orderIndex || 0) - (n.orderIndex || 0);
|
|
80
80
|
if (d.sort(h), o === 0) {
|
|
81
81
|
let t = [];
|
|
82
|
-
const n = (
|
|
83
|
-
|
|
82
|
+
const n = (a, f) => a.forEach((l) => {
|
|
83
|
+
l.parentIndex = f, n(l.children, t.push(l) - 1);
|
|
84
84
|
});
|
|
85
85
|
return n(d, -1), t;
|
|
86
86
|
}
|
|
87
87
|
return d;
|
|
88
88
|
}
|
|
89
|
-
function b(e, r,
|
|
89
|
+
function b(e, r, i, o) {
|
|
90
90
|
let d = [];
|
|
91
91
|
Array.isArray(e) ? d = e : e && (d = e.data);
|
|
92
92
|
const s = [];
|
|
@@ -96,9 +96,9 @@ function b(e, r, a, o) {
|
|
|
96
96
|
for (let n = 0; n < r.length; n++)
|
|
97
97
|
h = h.items && h.items[0];
|
|
98
98
|
Object.getOwnPropertyNames(h).forEach((n) => {
|
|
99
|
-
n !==
|
|
99
|
+
n !== i && s.push(Object.assign(
|
|
100
100
|
{
|
|
101
|
-
id:
|
|
101
|
+
id: g.generateNavigatableId(`${o.prevId++}`, o.idPrefix, "column"),
|
|
102
102
|
declarationIndex: -1,
|
|
103
103
|
parentIndex: -1,
|
|
104
104
|
depth: 0,
|
|
@@ -120,30 +120,30 @@ function b(e, r, a, o) {
|
|
|
120
120
|
return s;
|
|
121
121
|
}
|
|
122
122
|
const v = (e, r) => {
|
|
123
|
-
let
|
|
124
|
-
for (;
|
|
125
|
-
if (
|
|
123
|
+
let i = e[r.parentIndex];
|
|
124
|
+
for (; i; ) {
|
|
125
|
+
if (i.footerCell)
|
|
126
126
|
return !0;
|
|
127
|
-
|
|
127
|
+
i = e[i.parentIndex];
|
|
128
128
|
}
|
|
129
129
|
return !1;
|
|
130
|
-
}, S = (e) => e.filter((r) => v(e, r) ? !1 : !!r.footerCell || !(r.children && r.children.length > 0)), m = (e) => e.width !== void 0 ? Math.floor(parseFloat(e.width.toString())) + "px" : void 0, w = (e) => (e.sort((r,
|
|
130
|
+
}, S = (e) => e.filter((r) => v(e, r) ? !1 : !!r.footerCell || !(r.children && r.children.length > 0)), m = (e) => e.width !== void 0 ? Math.floor(parseFloat(e.width.toString())) + "px" : void 0, F = (e, r) => r && r.filter((i) => i.field === e).length > 0, w = (e) => (e.sort((r, i) => r.declarationIndex - i.declarationIndex), e.map((r) => {
|
|
131
131
|
const {
|
|
132
|
-
declarationIndex:
|
|
132
|
+
declarationIndex: i,
|
|
133
133
|
parentIndex: o,
|
|
134
134
|
depth: d,
|
|
135
135
|
colSpan: s,
|
|
136
136
|
rowSpan: h,
|
|
137
137
|
index: t,
|
|
138
138
|
kFirst: n,
|
|
139
|
-
children:
|
|
139
|
+
children: a,
|
|
140
140
|
...f
|
|
141
141
|
} = r;
|
|
142
|
-
return
|
|
143
|
-
children: w(
|
|
142
|
+
return a.length ? {
|
|
143
|
+
children: w(a),
|
|
144
144
|
...f
|
|
145
145
|
} : f;
|
|
146
|
-
})),
|
|
146
|
+
})), M = typeof window != "undefined" && /Firefox/.test(window.navigator.userAgent), A = 17895697, N = (e, r) => {
|
|
147
147
|
if (!(!e && !r))
|
|
148
148
|
return r ? e ? {
|
|
149
149
|
...e,
|
|
@@ -168,13 +168,14 @@ const v = (e, r) => {
|
|
|
168
168
|
};
|
|
169
169
|
export {
|
|
170
170
|
b as autoGenerateColumns,
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
171
|
+
M as firefox,
|
|
172
|
+
A as firefoxMaxHeight,
|
|
173
|
+
p as flatData,
|
|
174
174
|
S as footerColumns,
|
|
175
175
|
m as getColumnWidth,
|
|
176
|
-
|
|
176
|
+
c as getNestedValue,
|
|
177
|
+
F as isSorted,
|
|
177
178
|
I as readColumns,
|
|
178
|
-
|
|
179
|
+
N as resolveCells,
|
|
179
180
|
w as sanitizeColumns
|
|
180
181
|
};
|