@progress/kendo-react-grid 9.4.0-develop.20 → 9.4.0-develop.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/GridClientWrapper.js +1 -1
- package/GridClientWrapper.mjs +383 -351
- package/GridComponent.js +1 -1
- package/GridComponent.mjs +55 -55
- package/cells/client/GridRowReorderContainer.js +1 -1
- package/cells/client/GridRowReorderContainer.mjs +15 -9
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/index.d.mts +3 -3
- package/index.d.ts +3 -3
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +14 -14
- package/utils/index.js +1 -1
- package/utils/index.mjs +93 -89
package/index.d.mts
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { BaseEvent } from '@progress/kendo-react-common';
|
|
9
9
|
import { CellProps } from '@progress/kendo-react-data-tools';
|
|
10
|
-
import { ClipboardDataEvent } from '@progress/kendo-react-data-tools';
|
|
11
10
|
import { ClipboardSettings } from '@progress/kendo-react-data-tools';
|
|
12
11
|
import { ColumnBaseProps } from '@progress/kendo-react-data-tools';
|
|
13
12
|
import { ColumnSortSettings } from '@progress/kendo-react-data-tools';
|
|
@@ -22,6 +21,7 @@ import { FilterOperator } from '@progress/kendo-react-data-tools';
|
|
|
22
21
|
import { getSelectedState } from '@progress/kendo-react-data-tools';
|
|
23
22
|
import { getSelectedStateFromKeyDown } from '@progress/kendo-react-data-tools';
|
|
24
23
|
import { GridClassStructure } from '@progress/kendo-react-common';
|
|
24
|
+
import { GridClipboardEvent } from '@progress/kendo-react-data-tools';
|
|
25
25
|
import { GroupDescriptor } from '@progress/kendo-data-query';
|
|
26
26
|
import { GroupExpandDescriptor } from '@progress/kendo-react-data-tools';
|
|
27
27
|
import { GroupState } from '@progress/kendo-react-data-tools';
|
|
@@ -2199,9 +2199,9 @@ export declare interface GridProps extends KendoReactComponentBaseProps {
|
|
|
2199
2199
|
*/
|
|
2200
2200
|
clipboard?: ClipboardSettings | boolean;
|
|
2201
2201
|
/**
|
|
2202
|
-
* Fires when clipboard support is enabled and the one of the actions 'copy'. The event accepts type [
|
|
2202
|
+
* Fires when clipboard support is enabled and the one of the actions 'copy'. The event accepts type [GridClipboardEvent]({% slug api_data-tools_gridclipboardevent %}). Only fired when the Grid is run as a client component.
|
|
2203
2203
|
*/
|
|
2204
|
-
onClipboard?: (event:
|
|
2204
|
+
onClipboard?: (event: GridClipboardEvent) => void;
|
|
2205
2205
|
/**
|
|
2206
2206
|
* Fires when the sorting of the Grid is changed ([see example]({% slug sorting_grid %})). You have to handle the event yourself and sort the data.
|
|
2207
2207
|
*/
|
package/index.d.ts
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { BaseEvent } from '@progress/kendo-react-common';
|
|
9
9
|
import { CellProps } from '@progress/kendo-react-data-tools';
|
|
10
|
-
import { ClipboardDataEvent } from '@progress/kendo-react-data-tools';
|
|
11
10
|
import { ClipboardSettings } from '@progress/kendo-react-data-tools';
|
|
12
11
|
import { ColumnBaseProps } from '@progress/kendo-react-data-tools';
|
|
13
12
|
import { ColumnSortSettings } from '@progress/kendo-react-data-tools';
|
|
@@ -22,6 +21,7 @@ import { FilterOperator } from '@progress/kendo-react-data-tools';
|
|
|
22
21
|
import { getSelectedState } from '@progress/kendo-react-data-tools';
|
|
23
22
|
import { getSelectedStateFromKeyDown } from '@progress/kendo-react-data-tools';
|
|
24
23
|
import { GridClassStructure } from '@progress/kendo-react-common';
|
|
24
|
+
import { GridClipboardEvent } from '@progress/kendo-react-data-tools';
|
|
25
25
|
import { GroupDescriptor } from '@progress/kendo-data-query';
|
|
26
26
|
import { GroupExpandDescriptor } from '@progress/kendo-react-data-tools';
|
|
27
27
|
import { GroupState } from '@progress/kendo-react-data-tools';
|
|
@@ -2199,9 +2199,9 @@ export declare interface GridProps extends KendoReactComponentBaseProps {
|
|
|
2199
2199
|
*/
|
|
2200
2200
|
clipboard?: ClipboardSettings | boolean;
|
|
2201
2201
|
/**
|
|
2202
|
-
* Fires when clipboard support is enabled and the one of the actions 'copy'. The event accepts type [
|
|
2202
|
+
* Fires when clipboard support is enabled and the one of the actions 'copy'. The event accepts type [GridClipboardEvent]({% slug api_data-tools_gridclipboardevent %}). Only fired when the Grid is run as a client component.
|
|
2203
2203
|
*/
|
|
2204
|
-
onClipboard?: (event:
|
|
2204
|
+
onClipboard?: (event: GridClipboardEvent) => void;
|
|
2205
2205
|
/**
|
|
2206
2206
|
* Fires when the sorting of the Grid is changed ([see example]({% slug sorting_grid %})). You have to handle the event yourself and sort the data.
|
|
2207
2207
|
*/
|
package/package-metadata.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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-grid",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-grid",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1738932375,version:"9.4.0-develop.22",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -10,8 +10,8 @@ const e = {
|
|
|
10
10
|
productName: "KendoReact",
|
|
11
11
|
productCode: "KENDOUIREACT",
|
|
12
12
|
productCodes: ["KENDOUIREACT"],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: "9.4.0-develop.
|
|
13
|
+
publishDate: 1738932375,
|
|
14
|
+
version: "9.4.0-develop.22",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
16
16
|
};
|
|
17
17
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-grid",
|
|
3
|
-
"version": "9.4.0-develop.
|
|
3
|
+
"version": "9.4.0-develop.22",
|
|
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",
|
|
@@ -27,18 +27,18 @@
|
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@progress/kendo-data-query": "^1.0.0",
|
|
29
29
|
"@progress/kendo-drawing": "^1.21.2",
|
|
30
|
-
"@progress/kendo-licensing": "^1.
|
|
31
|
-
"@progress/kendo-react-animation": "9.4.0-develop.
|
|
32
|
-
"@progress/kendo-react-buttons": "9.4.0-develop.
|
|
33
|
-
"@progress/kendo-react-common": "9.4.0-develop.
|
|
34
|
-
"@progress/kendo-react-data-tools": "9.4.0-develop.
|
|
35
|
-
"@progress/kendo-react-dateinputs": "9.4.0-develop.
|
|
36
|
-
"@progress/kendo-react-indicators": "9.4.0-develop.
|
|
37
|
-
"@progress/kendo-react-dropdowns": "9.4.0-develop.
|
|
38
|
-
"@progress/kendo-react-inputs": "9.4.0-develop.
|
|
39
|
-
"@progress/kendo-react-intl": "9.4.0-develop.
|
|
40
|
-
"@progress/kendo-react-popup": "9.4.0-develop.
|
|
41
|
-
"@progress/kendo-react-layout": "9.4.0-develop.
|
|
30
|
+
"@progress/kendo-licensing": "^1.4.0",
|
|
31
|
+
"@progress/kendo-react-animation": "9.4.0-develop.22",
|
|
32
|
+
"@progress/kendo-react-buttons": "9.4.0-develop.22",
|
|
33
|
+
"@progress/kendo-react-common": "9.4.0-develop.22",
|
|
34
|
+
"@progress/kendo-react-data-tools": "9.4.0-develop.22",
|
|
35
|
+
"@progress/kendo-react-dateinputs": "9.4.0-develop.22",
|
|
36
|
+
"@progress/kendo-react-indicators": "9.4.0-develop.22",
|
|
37
|
+
"@progress/kendo-react-dropdowns": "9.4.0-develop.22",
|
|
38
|
+
"@progress/kendo-react-inputs": "9.4.0-develop.22",
|
|
39
|
+
"@progress/kendo-react-intl": "9.4.0-develop.22",
|
|
40
|
+
"@progress/kendo-react-popup": "9.4.0-develop.22",
|
|
41
|
+
"@progress/kendo-react-layout": "9.4.0-develop.22",
|
|
42
42
|
"@progress/kendo-svg-icons": "^4.0.0",
|
|
43
43
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
44
44
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"package": {
|
|
85
85
|
"productName": "KendoReact",
|
|
86
86
|
"productCode": "KENDOUIREACT",
|
|
87
|
-
"publishDate":
|
|
87
|
+
"publishDate": 1738932375,
|
|
88
88
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
89
89
|
}
|
|
90
90
|
},
|
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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../GridColumn.js"),y=require("@progress/kendo-data-query"),S=require("@progress/kendo-react-data-tools"),T=require("./_serverModule.js"),G=require("./_clientModule.js"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../GridColumn.js"),y=require("@progress/kendo-data-query"),S=require("@progress/kendo-react-data-tools"),T=require("./_serverModule.js"),G=require("./_clientModule.js"),g=require("../contextMenu/enums.js");function m(e,t){const a=(e!=null?e:"").split(".");let i=t;return a.forEach(o=>{i=i?i[o]:void 0}),i}function b(e,t,a,i,o,s,n,r,d,l,f=0,c){var M;let C=f;for(let h=0;h<t.length;h++){let I;if(!o||t[h].value===void 0||t[h].items===void 0){e[e.length]={dataIndex:i.index,dataItem:t[h],rowType:"data",level:f,group:c,expanded:(M=s?m(s,t[h]):l&&!!(n!=null&&n[y.getter(l)(t[h])]))!=null?M:!1},i.index++;continue}else{let u;c!=null&&c.parents?u=[{field:c.field,value:c.value},...c.parents]:c?u=[c]:u=[],I={field:t[h].field,value:t[h].value,parents:u}}C=Math.max(C,f+1);let x=!1;if(s)x=m(s,t[h])!==!1;else{const u=S.findGroupExpand(r||[],I);u?x=u.expanded!==!1:x=d!==!1}e[e.length]={dataIndex:-1,dataItem:t[h],level:f,group:I,rowType:"groupHeader",expanded:x},x&&(I.expanded=x,C=Math.max(b(e,t[h].items,a,i,o,s,n,r,d,l,f+1,I),C)),(a==="always"||x&&a==="visible")&&(e[e.length]={dataIndex:-1,dataItem:t[h],rowType:"groupFooter",level:f,expanded:x})}return C}const k=(e,t)=>typeof e.colSpan=="function"?e.colSpan({dataItem:t,column:e}):e.colSpan||1;function B(e,t){const a=[[]];let i=0;for(let n=e.length-1;n>=0;n--)i=Math.max(i,e[n].depth),e[n].headerColSpan=e[n].headerColSpan||1,e[n].children.length>0&&(e[n].headerColSpan=e[n].children.reduce((r,d)=>d.hidden?r:r+d.headerColSpan,0));const o=[];let s=1;return e.forEach((n,r)=>{a[n.depth]=a[n.depth]||[];let d=!1;a[n.depth].length===0&&(s<=1?s=1+(n.children.length>0?0:i-n.depth):(s--,d=!0)),n.rowSpan=1+(n.children.length>0?0:i-n.depth),n.kFirst=d,n.index=a[n.depth].length,a[n.depth].push(r),n.ariaColumnIndex=o[n.depth]?o[n.depth]+1:1;for(let l=n.depth;l<n.depth+n.rowSpan;l++)o[l]=(o[l]||0)+n.headerColSpan}),S.updateLeft(a,e,t),S.updateRight(a,e,t),a}function w(e,t,a,i=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,d)=>{r=r.props?r.props:r;const l=t[d]||null,f=w(r.children,l&&l.children||[],a,i+1);o.push(Object.assign({depth:i},v.gridDefaultProps,f.length?{cell:()=>null,filterCell:()=>null}:{},l?{width:l.width,orderIndex:l.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?l&&Math.floor(l.left):null,right:r.lockedColumn?l&&Math.floor(l.right):null,rowSpannable:r.rowSpannable}))});const n=(r,d)=>r.orderIndex===d.orderIndex?r.declarationIndex-d.declarationIndex:(r.orderIndex||0)-(d.orderIndex||0);if(o.sort(n),i===0){const r=[],d=(l,f)=>l.forEach(c=>{c.parentIndex=f,d(c.children,r.push(c)-1)});return d(o,-1),r}return o}const N=e=>Array.isArray(e)?e:e?e.data:[];function E(e,t,a,i){const o=N(e),s=[];if(o.length>0){let n=o[0];if(t)for(let d=0;d<t.length;d++)n=n.items&&n.items[0];Object.getOwnPropertyNames(n).forEach(d=>{d!==a.column&&s.push(Object.assign({id:S.tableKeyboardNavigationTools.generateNavigatableId(`${i.prevId++}`,i.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},v.gridDefaultProps,{field:d}))})}return s}const R=(e,t)=>{let a=e[t.parentIndex];for(;a;){if(a.footerCell)return!0;a=e[a.parentIndex]}return!1},j=e=>e.filter(t=>R(e,t)?!1:!!t.footerCell||!(t.children&&t.children.length>0)),q=e=>e.width!==void 0?Math.floor(parseFloat(e.width.toString()))+"px":void 0,O=(e,t)=>t&&t.filter(a=>a.field===e).length>0,D=e=>(e.sort((t,a)=>t.declarationIndex-a.declarationIndex),e.map(t=>{const{declarationIndex:a,parentIndex:i,depth:o,headerColSpan:s,rowSpan:n,index:r,kFirst:d,children:l,...f}=t;return l.length?{children:D(l),...f}:f})),A=e=>{const{filterCell:t,headerCell:a,footerCell:i,cells:o,cell:s,rowSpannable:n,...r}=e;return e.children.length?{...r,children:e.children.map(A)}:r},F=typeof window!="undefined"&&/Firefox/.test(window.navigator.userAgent),H=17895697,p=e=>{let t=[];return e.sortable&&(t=t.concat([g.GridContextMenuItemNames.sortAsc,g.GridContextMenuItemNames.sortDesc])),t},$=e=>{let t=[];return e.clipboard&&(t=t.concat([g.GridContextMenuItemNames.copySelection,g.GridContextMenuItemNames.copySelectionNoHeaders,g.GridContextMenuItemNames.paste])),e.editable&&(t.length&&(t=t.concat([g.GridContextMenuItemNames.separator])),t=t.concat([g.GridContextMenuItemNames.create,g.GridContextMenuItemNames.edit,g.GridContextMenuItemNames.delete])),e.selectable&&(t.length&&(t=t.concat([g.GridContextMenuItemNames.separator])),t=t.concat([g.GridContextMenuItemNames.select])),e.rowReorderable&&(t.length&&(t=t.concat([g.GridContextMenuItemNames.separator])),t=t.concat([g.GridContextMenuItemNames.reorderRow])),t},z=(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},L=e=>{var a;return typeof e=="object"?(a=e.enabled)!=null?a:!0:e!=null?e:!1},V=()=>T.ServerFragment===G.ClientFragment,W=e=>!!(e&&e.$$typeof===Symbol.for("react.client.reference")),_=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}),K=e=>{var i,o;const t=typeof e=="object"?(i=e.enabled)!=null?i:!0:e!=null?e:!1,a=typeof e=="object"?(o=e.valueGetter)!=null?o:(s,n)=>y.getter(n)(s):(s,n)=>y.getter(n)(s);return{enabled:t,valueGetter:a}};exports.autoGenerateColumns=E;exports.clientColumn=A;exports.firefox=F;exports.firefoxMaxHeight=H;exports.flatData=b;exports.footerColumns=j;exports.getClientCellProps=_;exports.getColSpan=k;exports.getColumnWidth=q;exports.getDataAsArray=N;exports.getDefaultBodyContextMenuItems=$;exports.getDefaultHeadContextMenuItems=p;exports.getNestedValue=m;exports.getRowSpanOptions=K;exports.isClient=V;exports.isClientReference=W;exports.isRowReorderEnabled=L;exports.isSorted=O;exports.mapColumns=B;exports.readColumns=w;exports.resolveCells=z;exports.sanitizeColumns=D;
|
package/utils/index.mjs
CHANGED
|
@@ -5,69 +5,69 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { gridDefaultProps as
|
|
8
|
+
import { gridDefaultProps as w } from "../GridColumn.mjs";
|
|
9
9
|
import { getter as y } from "@progress/kendo-data-query";
|
|
10
|
-
import { findGroupExpand as M, updateLeft as
|
|
11
|
-
import { ServerFragment as
|
|
10
|
+
import { findGroupExpand as M, updateLeft as A, updateRight as D, tableKeyboardNavigationTools as b } from "@progress/kendo-react-data-tools";
|
|
11
|
+
import { ServerFragment as T } from "./_serverModule.mjs";
|
|
12
12
|
import { ClientFragment as B } from "./_clientModule.mjs";
|
|
13
13
|
import { GridContextMenuItemNames as g } from "../contextMenu/enums.mjs";
|
|
14
|
-
function
|
|
14
|
+
function u(e, t) {
|
|
15
15
|
const a = (e != null ? e : "").split(".");
|
|
16
16
|
let i = t;
|
|
17
|
-
return a.forEach((
|
|
18
|
-
i = i ? i[
|
|
17
|
+
return a.forEach((l) => {
|
|
18
|
+
i = i ? i[l] : void 0;
|
|
19
19
|
}), i;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function E(e, t, a, i, l, f, r, n, d, o, h = 0, s) {
|
|
22
22
|
var v;
|
|
23
23
|
let C = h;
|
|
24
|
-
for (let
|
|
24
|
+
for (let c = 0; c < t.length; c++) {
|
|
25
25
|
let S;
|
|
26
|
-
if (!
|
|
26
|
+
if (!l || t[c].value === void 0 || t[c].items === void 0) {
|
|
27
27
|
e[e.length] = {
|
|
28
28
|
dataIndex: i.index,
|
|
29
|
-
dataItem: t[
|
|
29
|
+
dataItem: t[c],
|
|
30
30
|
rowType: "data",
|
|
31
31
|
level: h,
|
|
32
|
-
group:
|
|
32
|
+
group: s,
|
|
33
33
|
// This is related to detail-row expansion
|
|
34
|
-
expanded: (v = f ?
|
|
34
|
+
expanded: (v = f ? u(f, t[c]) : o && !!(r != null && r[y(o)(t[c])])) != null ? v : !1
|
|
35
35
|
}, i.index++;
|
|
36
36
|
continue;
|
|
37
37
|
} else {
|
|
38
38
|
let I;
|
|
39
|
-
|
|
40
|
-
field: t[
|
|
41
|
-
value: t[
|
|
39
|
+
s != null && s.parents ? I = [{ field: s.field, value: s.value }, ...s.parents] : s ? I = [s] : I = [], S = {
|
|
40
|
+
field: t[c].field,
|
|
41
|
+
value: t[c].value,
|
|
42
42
|
parents: I
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
C = Math.max(C, h + 1);
|
|
46
46
|
let x = !1;
|
|
47
47
|
if (f)
|
|
48
|
-
x =
|
|
48
|
+
x = u(f, t[c]) !== !1;
|
|
49
49
|
else {
|
|
50
50
|
const I = M(n || [], S);
|
|
51
|
-
I ? x = I.expanded !== !1 : x =
|
|
51
|
+
I ? x = I.expanded !== !1 : x = d !== !1;
|
|
52
52
|
}
|
|
53
53
|
e[e.length] = {
|
|
54
54
|
dataIndex: -1,
|
|
55
|
-
dataItem: t[
|
|
55
|
+
dataItem: t[c],
|
|
56
56
|
level: h,
|
|
57
57
|
group: S,
|
|
58
58
|
rowType: "groupHeader",
|
|
59
59
|
expanded: x
|
|
60
60
|
}, x && (S.expanded = x, C = Math.max(
|
|
61
|
-
|
|
61
|
+
E(
|
|
62
62
|
e,
|
|
63
|
-
t[
|
|
63
|
+
t[c].items,
|
|
64
64
|
a,
|
|
65
65
|
i,
|
|
66
|
-
|
|
66
|
+
l,
|
|
67
67
|
f,
|
|
68
68
|
r,
|
|
69
69
|
n,
|
|
70
|
-
|
|
70
|
+
d,
|
|
71
71
|
o,
|
|
72
72
|
h + 1,
|
|
73
73
|
S
|
|
@@ -75,7 +75,7 @@ function k(e, t, a, i, d, f, r, n, l, o, h = 0, c) {
|
|
|
75
75
|
C
|
|
76
76
|
)), (a === "always" || x && a === "visible") && (e[e.length] = {
|
|
77
77
|
dataIndex: -1,
|
|
78
|
-
dataItem: t[
|
|
78
|
+
dataItem: t[c],
|
|
79
79
|
rowType: "groupFooter",
|
|
80
80
|
level: h,
|
|
81
81
|
expanded: x
|
|
@@ -83,47 +83,47 @@ function k(e, t, a, i, d, f, r, n, l, o, h = 0, c) {
|
|
|
83
83
|
}
|
|
84
84
|
return C;
|
|
85
85
|
}
|
|
86
|
-
const
|
|
87
|
-
function
|
|
86
|
+
const q = (e, t) => typeof e.colSpan == "function" ? e.colSpan({ dataItem: t, column: e }) : e.colSpan || 1;
|
|
87
|
+
function z(e, t) {
|
|
88
88
|
const a = [[]];
|
|
89
89
|
let i = 0;
|
|
90
90
|
for (let r = e.length - 1; r >= 0; r--)
|
|
91
91
|
i = Math.max(i, e[r].depth), e[r].headerColSpan = e[r].headerColSpan || 1, e[r].children.length > 0 && (e[r].headerColSpan = e[r].children.reduce(
|
|
92
|
-
(n,
|
|
92
|
+
(n, d) => d.hidden ? n : n + d.headerColSpan,
|
|
93
93
|
0
|
|
94
94
|
));
|
|
95
|
-
const
|
|
95
|
+
const l = [];
|
|
96
96
|
let f = 1;
|
|
97
97
|
return e.forEach((r, n) => {
|
|
98
98
|
a[r.depth] = a[r.depth] || [];
|
|
99
|
-
let
|
|
100
|
-
a[r.depth].length === 0 && (f <= 1 ? f = 1 + (r.children.length > 0 ? 0 : i - r.depth) : (f--,
|
|
99
|
+
let d = !1;
|
|
100
|
+
a[r.depth].length === 0 && (f <= 1 ? f = 1 + (r.children.length > 0 ? 0 : i - r.depth) : (f--, d = !0)), r.rowSpan = 1 + (r.children.length > 0 ? 0 : i - r.depth), r.kFirst = d, r.index = a[r.depth].length, a[r.depth].push(n), r.ariaColumnIndex = l[r.depth] ? l[r.depth] + 1 : 1;
|
|
101
101
|
for (let o = r.depth; o < r.depth + r.rowSpan; o++)
|
|
102
|
-
|
|
103
|
-
}),
|
|
102
|
+
l[o] = (l[o] || 0) + r.headerColSpan;
|
|
103
|
+
}), A(a, e, t), D(a, e, t), a;
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
const
|
|
105
|
+
function j(e, t, a, i = 0) {
|
|
106
|
+
const l = [];
|
|
107
107
|
if (!e)
|
|
108
108
|
return [];
|
|
109
|
-
e && e.length === void 0 && (e = [e]), e.filter((n) => n && n.props ? !n.props.hidden : !n.hidden).forEach((n,
|
|
109
|
+
e && e.length === void 0 && (e = [e]), e.filter((n) => n && n.props ? !n.props.hidden : !n.hidden).forEach((n, d) => {
|
|
110
110
|
n = n.props ? n.props : n;
|
|
111
|
-
const o = t[
|
|
111
|
+
const o = t[d] || null, h = j(
|
|
112
112
|
n.children,
|
|
113
113
|
o && o.children || [],
|
|
114
114
|
a,
|
|
115
115
|
i + 1
|
|
116
116
|
);
|
|
117
|
-
|
|
117
|
+
l.push(
|
|
118
118
|
Object.assign(
|
|
119
119
|
{ depth: i },
|
|
120
|
-
|
|
120
|
+
w,
|
|
121
121
|
h.length ? { cell: () => null, filterCell: () => null } : {},
|
|
122
122
|
o ? { width: o.width, orderIndex: o.orderIndex } : {},
|
|
123
123
|
n,
|
|
124
124
|
{
|
|
125
125
|
id: n.id ? n.id : b.generateNavigatableId(`${a.prevId++}`, a.idPrefix, "column"),
|
|
126
|
-
declarationIndex:
|
|
126
|
+
declarationIndex: l.length,
|
|
127
127
|
children: h,
|
|
128
128
|
headerColSpan: n.headerColSpan,
|
|
129
129
|
rowSpan: 0,
|
|
@@ -137,26 +137,25 @@ function E(e, t, a, i = 0) {
|
|
|
137
137
|
)
|
|
138
138
|
);
|
|
139
139
|
});
|
|
140
|
-
const r = (n,
|
|
141
|
-
if (
|
|
142
|
-
const n = [],
|
|
143
|
-
|
|
140
|
+
const r = (n, d) => n.orderIndex === d.orderIndex ? n.declarationIndex - d.declarationIndex : (n.orderIndex || 0) - (d.orderIndex || 0);
|
|
141
|
+
if (l.sort(r), i === 0) {
|
|
142
|
+
const n = [], d = (o, h) => o.forEach((s) => {
|
|
143
|
+
s.parentIndex = h, d(s.children, n.push(s) - 1);
|
|
144
144
|
});
|
|
145
|
-
return l
|
|
145
|
+
return d(l, -1), n;
|
|
146
146
|
}
|
|
147
|
-
return
|
|
147
|
+
return l;
|
|
148
148
|
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
let r = d[0];
|
|
149
|
+
const k = (e) => Array.isArray(e) ? e : e ? e.data : [];
|
|
150
|
+
function V(e, t, a, i) {
|
|
151
|
+
const l = k(e), f = [];
|
|
152
|
+
if (l.length > 0) {
|
|
153
|
+
let r = l[0];
|
|
155
154
|
if (t)
|
|
156
|
-
for (let
|
|
155
|
+
for (let d = 0; d < t.length; d++)
|
|
157
156
|
r = r.items && r.items[0];
|
|
158
|
-
Object.getOwnPropertyNames(r).forEach((
|
|
159
|
-
|
|
157
|
+
Object.getOwnPropertyNames(r).forEach((d) => {
|
|
158
|
+
d !== a.column && f.push(
|
|
160
159
|
Object.assign(
|
|
161
160
|
{
|
|
162
161
|
id: b.generateNavigatableId(`${i.prevId++}`, i.idPrefix, "column"),
|
|
@@ -175,8 +174,8 @@ function z(e, t, a, i) {
|
|
|
175
174
|
ariaColumnIndex: 0,
|
|
176
175
|
isAccessible: !0
|
|
177
176
|
},
|
|
178
|
-
|
|
179
|
-
{ field:
|
|
177
|
+
w,
|
|
178
|
+
{ field: d }
|
|
180
179
|
)
|
|
181
180
|
);
|
|
182
181
|
});
|
|
@@ -191,22 +190,22 @@ const F = (e, t) => {
|
|
|
191
190
|
a = e[a.parentIndex];
|
|
192
191
|
}
|
|
193
192
|
return !1;
|
|
194
|
-
},
|
|
195
|
-
const { declarationIndex: a, parentIndex: i, depth:
|
|
193
|
+
}, W = (e) => e.filter((t) => F(e, t) ? !1 : !!t.footerCell || !(t.children && t.children.length > 0)), J = (e) => e.width !== void 0 ? Math.floor(parseFloat(e.width.toString())) + "px" : void 0, K = (e, t) => t && t.filter((a) => a.field === e).length > 0, p = (e) => (e.sort((t, a) => t.declarationIndex - a.declarationIndex), e.map((t) => {
|
|
194
|
+
const { declarationIndex: a, parentIndex: i, depth: l, headerColSpan: f, rowSpan: r, index: n, kFirst: d, children: o, ...h } = t;
|
|
196
195
|
return o.length ? {
|
|
197
|
-
children:
|
|
196
|
+
children: p(o),
|
|
198
197
|
...h
|
|
199
198
|
} : h;
|
|
200
|
-
})),
|
|
201
|
-
const { filterCell: t, headerCell: a, footerCell: i, cells:
|
|
199
|
+
})), N = (e) => {
|
|
200
|
+
const { filterCell: t, headerCell: a, footerCell: i, cells: l, cell: f, rowSpannable: r, ...n } = e;
|
|
202
201
|
return e.children.length ? {
|
|
203
202
|
...n,
|
|
204
|
-
children: e.children.map(
|
|
203
|
+
children: e.children.map(N)
|
|
205
204
|
} : n;
|
|
206
|
-
},
|
|
205
|
+
}, Q = typeof window != "undefined" && /Firefox/.test(window.navigator.userAgent), U = 17895697, X = (e) => {
|
|
207
206
|
let t = [];
|
|
208
207
|
return e.sortable && (t = t.concat([g.sortAsc, g.sortDesc])), t;
|
|
209
|
-
},
|
|
208
|
+
}, Y = (e) => {
|
|
210
209
|
let t = [];
|
|
211
210
|
return e.clipboard && (t = t.concat([
|
|
212
211
|
g.copySelection,
|
|
@@ -216,8 +215,8 @@ const F = (e, t) => {
|
|
|
216
215
|
g.create,
|
|
217
216
|
g.edit,
|
|
218
217
|
g.delete
|
|
219
|
-
])), e.selectable && (t.length && (t = t.concat([g.separator])), t = t.concat([g.select])), e.
|
|
220
|
-
},
|
|
218
|
+
])), e.selectable && (t.length && (t = t.concat([g.separator])), t = t.concat([g.select])), e.rowReorderable && (t.length && (t = t.concat([g.separator])), t = t.concat([g.reorderRow])), t;
|
|
219
|
+
}, Z = (e, t) => {
|
|
221
220
|
if (!(!e && !t))
|
|
222
221
|
return t ? e ? {
|
|
223
222
|
...e,
|
|
@@ -239,7 +238,10 @@ const F = (e, t) => {
|
|
|
239
238
|
...t.edit || {}
|
|
240
239
|
}
|
|
241
240
|
} : t : e;
|
|
242
|
-
},
|
|
241
|
+
}, _ = (e) => {
|
|
242
|
+
var a;
|
|
243
|
+
return typeof e == "object" ? (a = e.enabled) != null ? a : !0 : e != null ? e : !1;
|
|
244
|
+
}, G = () => T === B, P = (e) => !!(e && e.$$typeof === Symbol.for("react.client.reference")), ee = (e) => ({
|
|
243
245
|
id: e.id,
|
|
244
246
|
ariaColumnIndex: e.ariaColumnIndex,
|
|
245
247
|
isSelected: e.isSelected,
|
|
@@ -265,30 +267,32 @@ const F = (e, t) => {
|
|
|
265
267
|
rowDataIndex: e.rowDataIndex,
|
|
266
268
|
columnPosition: e.columnPosition,
|
|
267
269
|
group: e.group
|
|
268
|
-
}),
|
|
269
|
-
var i,
|
|
270
|
-
const t = typeof e == "object" ? (i = e.enabled) != null ? i : !0 : e != null ? e : !1, a = typeof e == "object" ? (
|
|
270
|
+
}), te = (e) => {
|
|
271
|
+
var i, l;
|
|
272
|
+
const t = typeof e == "object" ? (i = e.enabled) != null ? i : !0 : e != null ? e : !1, a = typeof e == "object" ? (l = e.valueGetter) != null ? l : (f, r) => y(r)(f) : (f, r) => y(r)(f);
|
|
271
273
|
return { enabled: t, valueGetter: a };
|
|
272
274
|
};
|
|
273
275
|
export {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
276
|
+
V as autoGenerateColumns,
|
|
277
|
+
N as clientColumn,
|
|
278
|
+
Q as firefox,
|
|
279
|
+
U as firefoxMaxHeight,
|
|
280
|
+
E as flatData,
|
|
281
|
+
W as footerColumns,
|
|
282
|
+
ee as getClientCellProps,
|
|
283
|
+
q as getColSpan,
|
|
284
|
+
J as getColumnWidth,
|
|
285
|
+
k as getDataAsArray,
|
|
286
|
+
Y as getDefaultBodyContextMenuItems,
|
|
287
|
+
X as getDefaultHeadContextMenuItems,
|
|
288
|
+
u as getNestedValue,
|
|
289
|
+
te as getRowSpanOptions,
|
|
290
|
+
G as isClient,
|
|
291
|
+
P as isClientReference,
|
|
292
|
+
_ as isRowReorderEnabled,
|
|
293
|
+
K as isSorted,
|
|
294
|
+
z as mapColumns,
|
|
295
|
+
j as readColumns,
|
|
296
|
+
Z as resolveCells,
|
|
297
|
+
p as sanitizeColumns
|
|
294
298
|
};
|