@progress/kendo-react-grid 9.3.1 → 9.4.0-develop.1
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 -1042
- package/GridClientContextReader.js +8 -0
- package/GridClientContextReader.mjs +30 -0
- package/GridClientWrapper.js +8 -0
- package/GridClientWrapper.mjs +759 -0
- package/GridComponent.js +8 -0
- package/GridComponent.mjs +584 -0
- package/GridState.js +8 -0
- package/GridState.mjs +93 -0
- package/GridWatermarkOverlay.js +8 -0
- package/GridWatermarkOverlay.mjs +15 -0
- package/StatusBar.js +1 -1
- package/StatusBar.mjs +24 -24
- package/cells/GridCell.js +1 -1
- package/cells/GridCell.mjs +23 -33
- package/cells/GridDetailCell.js +1 -1
- package/cells/GridDetailCell.mjs +11 -18
- package/cells/GridDetailHierarchyCell.js +1 -1
- package/cells/GridDetailHierarchyCell.mjs +5 -5
- package/cells/GridEditCell.js +1 -1
- package/cells/GridEditCell.mjs +22 -130
- package/cells/GridGroupCell.js +1 -1
- package/cells/GridGroupCell.mjs +60 -95
- package/cells/GridHierarchyCell.js +1 -1
- package/cells/GridHierarchyCell.mjs +22 -61
- package/cells/GridRowReorderCell.js +8 -0
- package/cells/GridRowReorderCell.mjs +42 -0
- package/cells/GridSelectionCell.js +1 -1
- package/cells/GridSelectionCell.mjs +17 -35
- package/cells/client/DetailCellContainer.js +8 -0
- package/cells/client/DetailCellContainer.mjs +26 -0
- package/cells/client/GridCellContainer.js +8 -0
- package/cells/client/GridCellContainer.mjs +68 -0
- package/cells/client/GridEditCellContainer.js +8 -0
- package/cells/client/GridEditCellContainer.mjs +60 -0
- package/cells/client/GridEditCellEditor.js +8 -0
- package/cells/client/GridEditCellEditor.mjs +81 -0
- package/cells/client/GridGroupCellContainer.js +8 -0
- package/cells/client/GridGroupCellContainer.mjs +87 -0
- package/cells/client/GridGroupCellToggle.js +8 -0
- package/cells/client/GridGroupCellToggle.mjs +52 -0
- package/cells/client/GridHierarchyCellContainer.js +8 -0
- package/cells/client/GridHierarchyCellContainer.mjs +63 -0
- package/cells/client/GridHierarchyCellToggle.js +8 -0
- package/cells/client/GridHierarchyCellToggle.mjs +43 -0
- package/cells/client/GridRowReorderContainer.js +8 -0
- package/cells/client/GridRowReorderContainer.mjs +24 -0
- package/cells/client/GridSelectionCellContainer.js +8 -0
- package/cells/client/GridSelectionCellContainer.mjs +60 -0
- package/cells/client/GridSelectionCellInput.js +8 -0
- package/cells/client/GridSelectionCellInput.mjs +43 -0
- package/columnMenu/GridColumnMenuSort.js +1 -1
- package/columnMenu/GridColumnMenuSort.mjs +23 -34
- package/components/GridContainerElementContainer.js +8 -0
- package/components/GridContainerElementContainer.mjs +21 -0
- package/components/GridCustomCellClientContainer.js +8 -0
- package/components/GridCustomCellClientContainer.mjs +28 -0
- package/components/GridDragClue.js +8 -0
- package/components/GridDragClue.mjs +18 -0
- package/components/GridDraggableRowsContainer.js +8 -0
- package/components/GridDraggableRowsContainer.mjs +127 -0
- package/components/GridDropClue.js +8 -0
- package/components/GridDropClue.mjs +18 -0
- package/components/GridElementContainer.js +8 -0
- package/components/GridElementContainer.mjs +22 -0
- package/components/PagerContainer.js +8 -0
- package/components/PagerContainer.mjs +23 -0
- package/components/VirtualScrollHeightContainer.js +8 -0
- package/components/VirtualScrollHeightContainer.mjs +17 -0
- package/components/colGroup/GridColGroup.js +8 -0
- package/components/colGroup/GridColGroup.mjs +25 -0
- package/components/icons/reorder-row-svg.js +8 -0
- package/components/icons/reorder-row-svg.mjs +14 -0
- package/{GridNoRecords.js → components/noRecords/GridNoRecords.js} +1 -1
- package/{GridNoRecords.mjs → components/noRecords/GridNoRecords.mjs} +1 -1
- package/components/noRecords/GridNoRecordsContainer.js +8 -0
- package/components/noRecords/GridNoRecordsContainer.mjs +30 -0
- package/components/table/GridTable.js +8 -0
- package/components/table/GridTable.mjs +28 -0
- package/components/table/GridTableBody.js +8 -0
- package/components/table/GridTableBody.mjs +21 -0
- package/components/table/GridTableScrollable.js +8 -0
- package/components/table/GridTableScrollable.mjs +37 -0
- package/components/utils.js +8 -0
- package/components/utils.mjs +26 -0
- package/contextMenu/GridContextMenu.js +8 -0
- package/contextMenu/GridContextMenu.mjs +191 -0
- package/contextMenu/enums.js +8 -0
- package/contextMenu/enums.mjs +13 -0
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/footer/Footer.js +1 -1
- package/footer/Footer.mjs +22 -21
- package/footer/FooterCell.js +8 -0
- package/footer/FooterCell.mjs +43 -0
- package/footer/FooterRow.js +1 -1
- package/footer/FooterRow.mjs +10 -39
- package/footer/client/FooterCellContainer.js +8 -0
- package/footer/client/FooterCellContainer.mjs +26 -0
- package/header/FilterRow.js +1 -1
- package/header/FilterRow.mjs +58 -54
- package/header/GridHeaderCell.js +1 -1
- package/header/GridHeaderCell.mjs +11 -11
- package/header/GridHeaderSelectionCell.js +1 -1
- package/header/GridHeaderSelectionCell.mjs +10 -9
- package/header/GroupPanel.js +1 -1
- package/header/GroupPanel.mjs +36 -32
- package/header/Header.js +1 -1
- package/header/Header.mjs +35 -33
- package/header/HeaderRow.js +1 -1
- package/header/HeaderRow.mjs +97 -125
- package/header/client/GridFilterCellContainer.js +8 -0
- package/header/client/GridFilterCellContainer.mjs +38 -0
- package/header/client/GridFilterCellElementContainer.js +8 -0
- package/header/client/GridFilterCellElementContainer.mjs +21 -0
- package/header/client/GridHeaderCellContainer.js +8 -0
- package/header/client/GridHeaderCellContainer.mjs +54 -0
- package/header/client/GridHeaderCellElementContainer.js +8 -0
- package/header/client/GridHeaderCellElementContainer.mjs +28 -0
- package/header/client/GridHeaderRowContainer.js +8 -0
- package/header/client/GridHeaderRowContainer.mjs +35 -0
- package/header/client/GridHeaderRowReorderCell.js +8 -0
- package/header/client/GridHeaderRowReorderCell.mjs +13 -0
- package/header/client/HeaderCellResizer.js +8 -0
- package/header/client/HeaderCellResizer.mjs +25 -0
- package/header/client/HeaderRowDraggable.js +8 -0
- package/header/client/HeaderRowDraggable.mjs +30 -0
- package/index.d.mts +543 -24
- package/index.d.ts +543 -24
- package/index.js +1 -1
- package/index.mjs +58 -52
- package/interfaces/GridSortSettings.js +1 -1
- package/interfaces/GridSortSettings.mjs +18 -2
- package/messages/index.js +1 -1
- package/messages/index.mjs +76 -82
- package/messages/messagesMap.js +8 -0
- package/messages/messagesMap.mjs +19 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +12 -11
- package/rows/GridRow.js +1 -1
- package/rows/GridRow.mjs +42 -20
- package/utils/_clientModule.js +8 -0
- package/utils/_clientModule.mjs +13 -0
- package/utils/_serverModule.js +8 -0
- package/utils/_serverModule.mjs +13 -0
- package/utils/index.js +1 -1
- package/utils/index.mjs +213 -101
|
@@ -0,0 +1,13 @@
|
|
|
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 { ServerFragment as e } from "./_serverModule.mjs";
|
|
10
|
+
const t = e;
|
|
11
|
+
export {
|
|
12
|
+
t as ClientFragment
|
|
13
|
+
};
|
|
@@ -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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=()=>e.createElement(e.Fragment,null);exports.ServerFragment=t;
|
|
@@ -0,0 +1,13 @@
|
|
|
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 e from "react";
|
|
10
|
+
const r = () => /* @__PURE__ */ e.createElement(e.Fragment, null);
|
|
11
|
+
export {
|
|
12
|
+
r as ServerFragment
|
|
13
|
+
};
|
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
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=require("../GridColumn.js"),D=require("@progress/kendo-data-query"),S=require("@progress/kendo-react-data-tools"),T=require("./_serverModule.js"),k=require("./_clientModule.js"),x=require("../contextMenu/enums.js");function m(e,t){const a=(e!=null?e:"").split(".");let l=t;return a.forEach(o=>{l=l?l[o]:void 0}),l}function v(e,t,a,l,o,s,n,r,i,d,f=0,h){var y;let u=f;for(let c=0;c<t.length;c++){let I;if(!o||t[c].value===void 0||t[c].items===void 0){e[e.length]={dataIndex:l.index,dataItem:t[c],rowType:"data",level:f,group:h,expanded:(y=s?m(s,t[c]):d&&!!(n!=null&&n[D.getter(d)(t[c])]))!=null?y:!1},l.index++;continue}else{let g;h!=null&&h.parents?g=[{field:h.field,value:h.value},...h.parents]:h?g=[h]:g=[],I={field:t[c].field,value:t[c].value,parents:g}}u=Math.max(u,f+1);let C=!1;if(s)C=m(s,t[c])!==!1;else{const g=S.findGroupExpand(r||[],I);g?C=g.expanded!==!1:C=i!==!1}e[e.length]={dataIndex:-1,dataItem:t[c],level:f,group:I,rowType:"groupHeader",expanded:C},C&&(I.expanded=C,u=Math.max(v(e,t[c].items,a,l,o,s,n,r,i,d,f+1,I),u)),(a==="always"||C&&a==="visible")&&(e[e.length]={dataIndex:-1,dataItem:t[c],rowType:"groupFooter",level:f,expanded:C})}return u}const A=(e,t)=>typeof e.colSpan=="function"?e.colSpan({dataItem:t,column:e}):e.colSpan||1;function B(e,t){const a=[[]];let l=0;for(let n=e.length-1;n>=0;n--)l=Math.max(l,e[n].depth),e[n].headerColSpan=e[n].headerColSpan||1,e[n].children.length>0&&(e[n].headerColSpan=e[n].children.reduce((r,i)=>i.hidden?r:r+i.headerColSpan,0));const o=[];let s=1;return e.forEach((n,r)=>{a[n.depth]=a[n.depth]||[];let i=!1;a[n.depth].length===0&&(s<=1?s=1+(n.children.length>0?0:l-n.depth):(s--,i=!0)),n.rowSpan=1+(n.children.length>0?0:l-n.depth),n.kFirst=i,n.index=a[n.depth].length,a[n.depth].push(r),n.ariaColumnIndex=o[n.depth]?o[n.depth]+1:1;for(let d=n.depth;d<n.depth+n.rowSpan;d++)o[d]=(o[d]||0)+n.headerColSpan}),S.updateLeft(a,e,t),S.updateRight(a,e,t),a}function w(e,t,a,l=0){const o=[];if(!e)return[];e&&e.length===void 0&&(e=[e]),e.filter(r=>r&&r.props?!r.props.hidden:!r.hidden).forEach((r,i)=>{r=r.props?r.props:r;const d=t[i]||null,f=w(r.children,d&&d.children||[],a,l+1);o.push(Object.assign({depth:l},M.gridDefaultProps,f.length?{cell:()=>null,filterCell:()=>null}:{},d?{width:d.width,orderIndex:d.orderIndex}:{},r,{id:r.id?r.id:S.tableKeyboardNavigationTools.generateNavigatableId(`${a.prevId++}`,a.idPrefix,"column"),declarationIndex:o.length,children:f,headerColSpan:r.headerColSpan,rowSpan:0,columnType:r.columnType||"data",colSpan:r.colSpan||1,isAccessible:!0,left:r.lockedColumn?d&&Math.floor(d.left):null,right:r.lockedColumn?d&&Math.floor(d.right):null}))});const n=(r,i)=>r.orderIndex===i.orderIndex?r.declarationIndex-i.declarationIndex:(r.orderIndex||0)-(i.orderIndex||0);if(o.sort(n),l===0){const r=[],i=(d,f)=>d.forEach(h=>{h.parentIndex=f,i(h.children,r.push(h)-1)});return i(o,-1),r}return o}function q(e,t,a,l){let o=[];Array.isArray(e)?o=e:e&&(o=e.data);const s=[];if(o.length>0){let n=o[0];if(t)for(let i=0;i<t.length;i++)n=n.items&&n.items[0];Object.getOwnPropertyNames(n).forEach(i=>{i!==a.column&&s.push(Object.assign({id:S.tableKeyboardNavigationTools.generateNavigatableId(`${l.prevId++}`,l.idPrefix,"column"),declarationIndex:-1,parentIndex:-1,depth:0,colSpan:0,headerColSpan:0,rowSpan:0,index:0,columnType:"data",left:0,right:0,rightBorder:!1,children:[],ariaColumnIndex:0,isAccessible:!0},M.gridDefaultProps,{field:i}))})}return s}const G=(e,t)=>{let a=e[t.parentIndex];for(;a;){if(a.footerCell)return!0;a=e[a.parentIndex]}return!1},R=e=>e.filter(t=>G(e,t)?!1:!!t.footerCell||!(t.children&&t.children.length>0)),E=e=>e.width!==void 0?Math.floor(parseFloat(e.width.toString()))+"px":void 0,F=(e,t)=>t&&t.filter(a=>a.field===e).length>0,b=e=>(e.sort((t,a)=>t.declarationIndex-a.declarationIndex),e.map(t=>{const{declarationIndex:a,parentIndex:l,depth:o,headerColSpan:s,rowSpan:n,index:r,kFirst:i,children:d,...f}=t;return d.length?{children:b(d),...f}:f})),N=e=>{const{filterCell:t,headerCell:a,footerCell:l,cells:o,cell:s,...n}=e;return e.children.length?{...n,children:e.children.map(N)}:n},H=typeof window!="undefined"&&/Firefox/.test(window.navigator.userAgent),O=17895697,j=e=>{let t=[];return e.sortable&&(t=t.concat([x.GridContextMenuItemNames.sortAsc,x.GridContextMenuItemNames.sortDesc])),t},p=e=>{let t=[];return e.clipboard&&(t=t.concat([x.GridContextMenuItemNames.copySelection,x.GridContextMenuItemNames.copySelectionNoHeaders,x.GridContextMenuItemNames.paste])),e.editable&&(t.length&&(t=t.concat([x.GridContextMenuItemNames.separator])),t=t.concat([x.GridContextMenuItemNames.create,x.GridContextMenuItemNames.edit,x.GridContextMenuItemNames.delete])),e.selectable&&(t.length&&(t=t.concat([x.GridContextMenuItemNames.separator])),t=t.concat([x.GridContextMenuItemNames.select])),e.reorderable&&(t.length&&(t=t.concat([x.GridContextMenuItemNames.separator])),t=t.concat([x.GridContextMenuItemNames.reorderRow])),t},$=(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},z=()=>T.ServerFragment===k.ClientFragment,L=e=>!!(e&&e.$$typeof===Symbol.for("react.client.reference")),V=e=>({id:e.id,ariaColumnIndex:e.ariaColumnIndex,isSelected:e.isSelected,isInEdit:e.isInEdit,isSorted:e.isSorted,isAlt:e.isAlt,expanded:e.expanded,className:e.className,style:e.style,field:e.field,dataItem:e.dataItem,format:e.format,colSpan:e.colSpan,dataIndex:e.dataIndex,columnIndex:e.columnIndex,columnsCount:e.columnsCount,rowType:e.rowType,level:e.level,editor:e.editor,render:e.render,locked:e.locked,isRtl:e.isRtl,rowDataIndex:e.rowDataIndex,columnPosition:e.columnPosition,group:e.group});exports.autoGenerateColumns=q;exports.clientColumn=N;exports.firefox=H;exports.firefoxMaxHeight=O;exports.flatData=v;exports.footerColumns=R;exports.getClientCellProps=V;exports.getColSpan=A;exports.getColumnWidth=E;exports.getDefaultBodyContextMenuItems=p;exports.getDefaultHeadContextMenuItems=j;exports.getNestedValue=m;exports.isClient=z;exports.isClientReference=L;exports.isSorted=F;exports.mapColumns=B;exports.readColumns=w;exports.resolveCells=$;exports.sanitizeColumns=b;
|
package/utils/index.mjs
CHANGED
|
@@ -6,110 +6,168 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import { gridDefaultProps as
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
import { gridDefaultProps as v } from "../GridColumn.mjs";
|
|
10
|
+
import { getter as u } from "@progress/kendo-data-query";
|
|
11
|
+
import { findGroupExpand as M, updateLeft as T, updateRight as A, tableKeyboardNavigationTools as b } from "@progress/kendo-react-data-tools";
|
|
12
|
+
import { ServerFragment as D } from "./_serverModule.mjs";
|
|
13
|
+
import { ClientFragment as B } from "./_clientModule.mjs";
|
|
14
|
+
import { GridContextMenuItemNames as x } from "../contextMenu/enums.mjs";
|
|
15
|
+
function y(e, t) {
|
|
16
|
+
const a = (e != null ? e : "").split(".");
|
|
17
|
+
let l = t;
|
|
18
|
+
return a.forEach((o) => {
|
|
19
|
+
l = l ? l[o] : void 0;
|
|
20
|
+
}), l;
|
|
17
21
|
}
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
function k(e, t, a, l, o, f, r, n, i, d, h = 0, c) {
|
|
23
|
+
var w;
|
|
24
|
+
let S = h;
|
|
25
|
+
for (let s = 0; s < t.length; s++) {
|
|
26
|
+
let C;
|
|
27
|
+
if (!o || t[s].value === void 0 || t[s].items === void 0) {
|
|
22
28
|
e[e.length] = {
|
|
23
|
-
dataIndex:
|
|
24
|
-
dataItem:
|
|
29
|
+
dataIndex: l.index,
|
|
30
|
+
dataItem: t[s],
|
|
25
31
|
rowType: "data",
|
|
26
32
|
level: h,
|
|
27
|
-
|
|
28
|
-
|
|
33
|
+
group: c,
|
|
34
|
+
// This is related to detail-row expansion
|
|
35
|
+
expanded: (w = f ? y(f, t[s]) : d && !!(r != null && r[u(d)(t[s])])) != null ? w : !1
|
|
36
|
+
}, l.index++;
|
|
29
37
|
continue;
|
|
38
|
+
} else {
|
|
39
|
+
let I;
|
|
40
|
+
c != null && c.parents ? I = [{ field: c.field, value: c.value }, ...c.parents] : c ? I = [c] : I = [], C = {
|
|
41
|
+
field: t[s].field,
|
|
42
|
+
value: t[s].value,
|
|
43
|
+
parents: I
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
S = Math.max(S, h + 1);
|
|
47
|
+
let g = !1;
|
|
48
|
+
if (f)
|
|
49
|
+
g = y(f, t[s]) !== !1;
|
|
50
|
+
else {
|
|
51
|
+
const I = M(n || [], C);
|
|
52
|
+
I ? g = I.expanded !== !1 : g = i !== !1;
|
|
30
53
|
}
|
|
31
|
-
t = Math.max(t, h + 1);
|
|
32
|
-
const a = s === void 0 || c(s, r[n]) === void 0 || c(s, r[n]);
|
|
33
54
|
e[e.length] = {
|
|
34
55
|
dataIndex: -1,
|
|
35
|
-
dataItem:
|
|
56
|
+
dataItem: t[s],
|
|
36
57
|
level: h,
|
|
58
|
+
group: C,
|
|
37
59
|
rowType: "groupHeader",
|
|
38
|
-
expanded:
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
60
|
+
expanded: g
|
|
61
|
+
}, g && (C.expanded = g, S = Math.max(
|
|
62
|
+
k(
|
|
63
|
+
e,
|
|
64
|
+
t[s].items,
|
|
65
|
+
a,
|
|
66
|
+
l,
|
|
67
|
+
o,
|
|
68
|
+
f,
|
|
69
|
+
r,
|
|
70
|
+
n,
|
|
71
|
+
i,
|
|
72
|
+
d,
|
|
73
|
+
h + 1,
|
|
74
|
+
C
|
|
75
|
+
),
|
|
76
|
+
S
|
|
77
|
+
)), (a === "always" || g && a === "visible") && (e[e.length] = {
|
|
43
78
|
dataIndex: -1,
|
|
44
|
-
dataItem:
|
|
79
|
+
dataItem: t[s],
|
|
45
80
|
rowType: "groupFooter",
|
|
46
81
|
level: h,
|
|
47
|
-
expanded:
|
|
82
|
+
expanded: g
|
|
48
83
|
});
|
|
49
84
|
}
|
|
50
|
-
return
|
|
85
|
+
return S;
|
|
86
|
+
}
|
|
87
|
+
const L = (e, t) => typeof e.colSpan == "function" ? e.colSpan({ dataItem: t, column: e }) : e.colSpan || 1;
|
|
88
|
+
function q(e, t) {
|
|
89
|
+
const a = [[]];
|
|
90
|
+
let l = 0;
|
|
91
|
+
for (let r = e.length - 1; r >= 0; r--)
|
|
92
|
+
l = Math.max(l, e[r].depth), e[r].headerColSpan = e[r].headerColSpan || 1, e[r].children.length > 0 && (e[r].headerColSpan = e[r].children.reduce(
|
|
93
|
+
(n, i) => i.hidden ? n : n + i.headerColSpan,
|
|
94
|
+
0
|
|
95
|
+
));
|
|
96
|
+
const o = [];
|
|
97
|
+
let f = 1;
|
|
98
|
+
return e.forEach((r, n) => {
|
|
99
|
+
a[r.depth] = a[r.depth] || [];
|
|
100
|
+
let i = !1;
|
|
101
|
+
a[r.depth].length === 0 && (f <= 1 ? f = 1 + (r.children.length > 0 ? 0 : l - r.depth) : (f--, i = !0)), r.rowSpan = 1 + (r.children.length > 0 ? 0 : l - r.depth), r.kFirst = i, r.index = a[r.depth].length, a[r.depth].push(n), r.ariaColumnIndex = o[r.depth] ? o[r.depth] + 1 : 1;
|
|
102
|
+
for (let d = r.depth; d < r.depth + r.rowSpan; d++)
|
|
103
|
+
o[d] = (o[d] || 0) + r.headerColSpan;
|
|
104
|
+
}), T(a, e, t), A(a, e, t), a;
|
|
51
105
|
}
|
|
52
|
-
function
|
|
53
|
-
const
|
|
106
|
+
function p(e, t, a, l = 0) {
|
|
107
|
+
const o = [];
|
|
54
108
|
if (!e)
|
|
55
109
|
return [];
|
|
56
|
-
e && e.length === void 0 && (e = [e]), e.filter((
|
|
57
|
-
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
110
|
+
e && e.length === void 0 && (e = [e]), e.filter((n) => n && n.props ? !n.props.hidden : !n.hidden).forEach((n, i) => {
|
|
111
|
+
n = n.props ? n.props : n;
|
|
112
|
+
const d = t[i] || null, h = p(
|
|
113
|
+
n.children,
|
|
114
|
+
d && d.children || [],
|
|
115
|
+
a,
|
|
116
|
+
l + 1
|
|
63
117
|
);
|
|
64
|
-
|
|
118
|
+
o.push(
|
|
65
119
|
Object.assign(
|
|
66
|
-
{ depth:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
120
|
+
{ depth: l },
|
|
121
|
+
v,
|
|
122
|
+
h.length ? { cell: () => null, filterCell: () => null } : {},
|
|
123
|
+
d ? { width: d.width, orderIndex: d.orderIndex } : {},
|
|
124
|
+
n,
|
|
71
125
|
{
|
|
72
|
-
id:
|
|
73
|
-
declarationIndex:
|
|
74
|
-
children:
|
|
126
|
+
id: n.id ? n.id : b.generateNavigatableId(`${a.prevId++}`, a.idPrefix, "column"),
|
|
127
|
+
declarationIndex: o.length,
|
|
128
|
+
children: h,
|
|
129
|
+
headerColSpan: n.headerColSpan,
|
|
75
130
|
rowSpan: 0,
|
|
76
|
-
|
|
131
|
+
columnType: n.columnType || "data",
|
|
132
|
+
colSpan: n.colSpan || 1,
|
|
77
133
|
isAccessible: !0,
|
|
78
|
-
left:
|
|
79
|
-
right:
|
|
134
|
+
left: n.lockedColumn ? d && Math.floor(d.left) : null,
|
|
135
|
+
right: n.lockedColumn ? d && Math.floor(d.right) : null
|
|
80
136
|
}
|
|
81
137
|
)
|
|
82
138
|
);
|
|
83
139
|
});
|
|
84
|
-
const
|
|
85
|
-
if (
|
|
86
|
-
const
|
|
87
|
-
|
|
140
|
+
const r = (n, i) => n.orderIndex === i.orderIndex ? n.declarationIndex - i.declarationIndex : (n.orderIndex || 0) - (i.orderIndex || 0);
|
|
141
|
+
if (o.sort(r), l === 0) {
|
|
142
|
+
const n = [], i = (d, h) => d.forEach((c) => {
|
|
143
|
+
c.parentIndex = h, i(c.children, n.push(c) - 1);
|
|
88
144
|
});
|
|
89
|
-
return
|
|
145
|
+
return i(o, -1), n;
|
|
90
146
|
}
|
|
91
|
-
return
|
|
147
|
+
return o;
|
|
92
148
|
}
|
|
93
|
-
function
|
|
94
|
-
let
|
|
95
|
-
Array.isArray(e) ?
|
|
96
|
-
const
|
|
97
|
-
if (
|
|
98
|
-
let
|
|
99
|
-
if (
|
|
100
|
-
for (let
|
|
101
|
-
|
|
102
|
-
Object.getOwnPropertyNames(
|
|
103
|
-
|
|
149
|
+
function z(e, t, a, l) {
|
|
150
|
+
let o = [];
|
|
151
|
+
Array.isArray(e) ? o = e : e && (o = e.data);
|
|
152
|
+
const f = [];
|
|
153
|
+
if (o.length > 0) {
|
|
154
|
+
let r = o[0];
|
|
155
|
+
if (t)
|
|
156
|
+
for (let i = 0; i < t.length; i++)
|
|
157
|
+
r = r.items && r.items[0];
|
|
158
|
+
Object.getOwnPropertyNames(r).forEach((i) => {
|
|
159
|
+
i !== a.column && f.push(
|
|
104
160
|
Object.assign(
|
|
105
161
|
{
|
|
106
|
-
id:
|
|
162
|
+
id: b.generateNavigatableId(`${l.prevId++}`, l.idPrefix, "column"),
|
|
107
163
|
declarationIndex: -1,
|
|
108
164
|
parentIndex: -1,
|
|
109
165
|
depth: 0,
|
|
110
166
|
colSpan: 0,
|
|
167
|
+
headerColSpan: 0,
|
|
111
168
|
rowSpan: 0,
|
|
112
169
|
index: 0,
|
|
170
|
+
columnType: "data",
|
|
113
171
|
left: 0,
|
|
114
172
|
right: 0,
|
|
115
173
|
rightBorder: !1,
|
|
@@ -117,61 +175,115 @@ function b(e, r, i, o) {
|
|
|
117
175
|
ariaColumnIndex: 0,
|
|
118
176
|
isAccessible: !0
|
|
119
177
|
},
|
|
120
|
-
|
|
121
|
-
{ field:
|
|
178
|
+
v,
|
|
179
|
+
{ field: i }
|
|
122
180
|
)
|
|
123
181
|
);
|
|
124
182
|
});
|
|
125
183
|
}
|
|
126
|
-
return
|
|
184
|
+
return f;
|
|
127
185
|
}
|
|
128
|
-
const
|
|
129
|
-
let
|
|
130
|
-
for (;
|
|
131
|
-
if (
|
|
186
|
+
const E = (e, t) => {
|
|
187
|
+
let a = e[t.parentIndex];
|
|
188
|
+
for (; a; ) {
|
|
189
|
+
if (a.footerCell)
|
|
132
190
|
return !0;
|
|
133
|
-
|
|
191
|
+
a = e[a.parentIndex];
|
|
134
192
|
}
|
|
135
193
|
return !1;
|
|
136
|
-
},
|
|
137
|
-
const { declarationIndex:
|
|
138
|
-
return
|
|
139
|
-
children:
|
|
140
|
-
...
|
|
141
|
-
} :
|
|
142
|
-
})),
|
|
143
|
-
|
|
144
|
-
|
|
194
|
+
}, V = (e) => e.filter((t) => E(e, t) ? !1 : !!t.footerCell || !(t.children && t.children.length > 0)), W = (e) => e.width !== void 0 ? Math.floor(parseFloat(e.width.toString())) + "px" : void 0, J = (e, t) => t && t.filter((a) => a.field === e).length > 0, F = (e) => (e.sort((t, a) => t.declarationIndex - a.declarationIndex), e.map((t) => {
|
|
195
|
+
const { declarationIndex: a, parentIndex: l, depth: o, headerColSpan: f, rowSpan: r, index: n, kFirst: i, children: d, ...h } = t;
|
|
196
|
+
return d.length ? {
|
|
197
|
+
children: F(d),
|
|
198
|
+
...h
|
|
199
|
+
} : h;
|
|
200
|
+
})), m = (e) => {
|
|
201
|
+
const { filterCell: t, headerCell: a, footerCell: l, cells: o, cell: f, ...r } = e;
|
|
202
|
+
return e.children.length ? {
|
|
203
|
+
...r,
|
|
204
|
+
children: e.children.map(m)
|
|
205
|
+
} : r;
|
|
206
|
+
}, K = typeof window != "undefined" && /Firefox/.test(window.navigator.userAgent), Q = 17895697, U = (e) => {
|
|
207
|
+
let t = [];
|
|
208
|
+
return e.sortable && (t = t.concat([x.sortAsc, x.sortDesc])), t;
|
|
209
|
+
}, X = (e) => {
|
|
210
|
+
let t = [];
|
|
211
|
+
return e.clipboard && (t = t.concat([
|
|
212
|
+
x.copySelection,
|
|
213
|
+
x.copySelectionNoHeaders,
|
|
214
|
+
x.paste
|
|
215
|
+
])), e.editable && (t.length && (t = t.concat([x.separator])), t = t.concat([
|
|
216
|
+
x.create,
|
|
217
|
+
x.edit,
|
|
218
|
+
x.delete
|
|
219
|
+
])), e.selectable && (t.length && (t = t.concat([x.separator])), t = t.concat([x.select])), e.reorderable && (t.length && (t = t.concat([x.separator])), t = t.concat([x.reorderRow])), t;
|
|
220
|
+
}, Y = (e, t) => {
|
|
221
|
+
if (!(!e && !t))
|
|
222
|
+
return t ? e ? {
|
|
145
223
|
...e,
|
|
146
|
-
...
|
|
224
|
+
...t,
|
|
147
225
|
select: {
|
|
148
226
|
...e.select || {},
|
|
149
|
-
...
|
|
227
|
+
...t.select || {}
|
|
150
228
|
},
|
|
151
229
|
hierarchy: {
|
|
152
230
|
...e.hierarchy || {},
|
|
153
|
-
...
|
|
231
|
+
...t.hierarchy || {}
|
|
154
232
|
},
|
|
155
233
|
group: {
|
|
156
234
|
...e.group || {},
|
|
157
|
-
...
|
|
235
|
+
...t.group || {}
|
|
158
236
|
},
|
|
159
237
|
edit: {
|
|
160
238
|
...e.edit || {},
|
|
161
|
-
...
|
|
239
|
+
...t.edit || {}
|
|
162
240
|
}
|
|
163
|
-
} :
|
|
164
|
-
}
|
|
241
|
+
} : t : e;
|
|
242
|
+
}, Z = () => D === B, _ = (e) => !!(e && e.$$typeof === Symbol.for("react.client.reference")), P = (e) => ({
|
|
243
|
+
id: e.id,
|
|
244
|
+
ariaColumnIndex: e.ariaColumnIndex,
|
|
245
|
+
isSelected: e.isSelected,
|
|
246
|
+
isInEdit: e.isInEdit,
|
|
247
|
+
isSorted: e.isSorted,
|
|
248
|
+
isAlt: e.isAlt,
|
|
249
|
+
expanded: e.expanded,
|
|
250
|
+
className: e.className,
|
|
251
|
+
style: e.style,
|
|
252
|
+
field: e.field,
|
|
253
|
+
dataItem: e.dataItem,
|
|
254
|
+
format: e.format,
|
|
255
|
+
colSpan: e.colSpan,
|
|
256
|
+
dataIndex: e.dataIndex,
|
|
257
|
+
columnIndex: e.columnIndex,
|
|
258
|
+
columnsCount: e.columnsCount,
|
|
259
|
+
rowType: e.rowType,
|
|
260
|
+
level: e.level,
|
|
261
|
+
editor: e.editor,
|
|
262
|
+
render: e.render,
|
|
263
|
+
locked: e.locked,
|
|
264
|
+
isRtl: e.isRtl,
|
|
265
|
+
rowDataIndex: e.rowDataIndex,
|
|
266
|
+
columnPosition: e.columnPosition,
|
|
267
|
+
group: e.group
|
|
268
|
+
});
|
|
165
269
|
export {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
270
|
+
z as autoGenerateColumns,
|
|
271
|
+
m as clientColumn,
|
|
272
|
+
K as firefox,
|
|
273
|
+
Q as firefoxMaxHeight,
|
|
274
|
+
k as flatData,
|
|
275
|
+
V as footerColumns,
|
|
276
|
+
P as getClientCellProps,
|
|
277
|
+
L as getColSpan,
|
|
278
|
+
W as getColumnWidth,
|
|
279
|
+
X as getDefaultBodyContextMenuItems,
|
|
280
|
+
U as getDefaultHeadContextMenuItems,
|
|
281
|
+
y as getNestedValue,
|
|
282
|
+
Z as isClient,
|
|
283
|
+
_ as isClientReference,
|
|
284
|
+
J as isSorted,
|
|
285
|
+
q as mapColumns,
|
|
286
|
+
p as readColumns,
|
|
287
|
+
Y as resolveCells,
|
|
288
|
+
F as sanitizeColumns
|
|
177
289
|
};
|