@progress/kendo-react-grid 15.0.1-develop.2 → 15.0.1-develop.3
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/dist/cdn/js/kendo-react-grid.js +1 -1
- package/header/GroupPanel.js +1 -1
- package/header/GroupPanel.mjs +14 -14
- package/interfaces/GridColumnState.d.ts +4 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +17 -17
- package/stacked/StackedModeRow.js +1 -1
- package/stacked/StackedModeRow.mjs +9 -9
- package/toolbar-tools/GridToolbarGroup.js +1 -1
- package/toolbar-tools/GridToolbarGroup.mjs +13 -11
- package/utils/index.js +1 -1
- package/utils/index.mjs +15 -14
package/header/GroupPanel.js
CHANGED
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),P=require("../drag/GroupingIndicator.js"),C=require("@progress/kendo-react-intl"),
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),P=require("../drag/GroupingIndicator.js"),C=require("@progress/kendo-react-intl"),i=require("../messages/index.js"),G=require("../utils/GridContext.js");function v(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const s=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(n,a,s.get?s:{enumerable:!0,get:()=>t[a]})}}return n.default=t,Object.freeze(n)}const l=v(b),R=t=>{const n=l.useContext(G.GridContext),a=(o,e)=>{const r=t.group.slice();r.splice(e,1),n.groupChange(r,o)},s=(o,e,r,c)=>{const f=Object.assign({},r,{dir:c}),d=t.group.slice();d.splice(e,1,f),n.groupChange(d,o)},u=C.useLocalization(),p=t.group||[],m=o=>{const e=t.columns.find(c=>c.field===o&&c.isAccessible!==!1),r=e&&(e.title||e.field);return r===void 0?o:r},g=p.map((o,e)=>l.createElement(P.GroupingIndicator,{key:e,index:e,dir:o.dir||"asc",title:m(o.field),onRemove:r=>{a(r,e)},onSortChange:(r,c)=>{s(r,e,o,c)},onPress:n.dragLogicRef.current.pressHandler,onDrag:n.dragLogicRef.current.dragHandler,onRelease:n.dragLogicRef.current.releaseHandler,onContextMenu:n.onContextMenu}));return l.createElement("div",{ref:n.dragLogicRef.current.refGroupPanelDiv,className:"k-grouping-header",role:"toolbar","aria-label":u.toLanguageString(i.groupPanelAriaLabel,i.messages[i.groupPanelAriaLabel]),"aria-controls":t.ariaControls||""},l.createElement("div",{className:"k-chip-list",role:"none"},g),l.createElement("div",{className:"k-grouping-drop-container"},!g.length&&u.toLanguageString(i.groupPanelEmpty,i.messages[i.groupPanelEmpty])," "))};exports.GroupPanel=R;
|
package/header/GroupPanel.mjs
CHANGED
|
@@ -11,17 +11,17 @@ import { GroupingIndicator as G } from "../drag/GroupingIndicator.mjs";
|
|
|
11
11
|
import { useLocalization as L } from "@progress/kendo-react-intl";
|
|
12
12
|
import { groupPanelAriaLabel as g, messages as u, groupPanelEmpty as m } from "../messages/index.mjs";
|
|
13
13
|
import { GridContext as R } from "../utils/GridContext.mjs";
|
|
14
|
-
const k = (
|
|
14
|
+
const k = (a) => {
|
|
15
15
|
const n = i.useContext(R), p = (r, e) => {
|
|
16
|
-
const o =
|
|
16
|
+
const o = a.group.slice();
|
|
17
17
|
o.splice(e, 1), n.groupChange(o, r);
|
|
18
|
-
}, d = (r, e, o,
|
|
19
|
-
const v = Object.assign({}, o, { dir:
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
const e =
|
|
18
|
+
}, d = (r, e, o, t) => {
|
|
19
|
+
const v = Object.assign({}, o, { dir: t }), c = a.group.slice();
|
|
20
|
+
c.splice(e, 1, v), n.groupChange(c, r);
|
|
21
|
+
}, s = L(), f = a.group || [], C = (r) => {
|
|
22
|
+
const e = a.columns.find((t) => t.field === r && t.isAccessible !== !1), o = e && (e.title || e.field);
|
|
23
23
|
return o === void 0 ? r : o;
|
|
24
|
-
},
|
|
24
|
+
}, l = f.map((r, e) => /* @__PURE__ */ i.createElement(
|
|
25
25
|
G,
|
|
26
26
|
{
|
|
27
27
|
key: e,
|
|
@@ -31,8 +31,8 @@ const k = (t) => {
|
|
|
31
31
|
onRemove: (o) => {
|
|
32
32
|
p(o, e);
|
|
33
33
|
},
|
|
34
|
-
onSortChange: (o,
|
|
35
|
-
d(o, e, r,
|
|
34
|
+
onSortChange: (o, t) => {
|
|
35
|
+
d(o, e, r, t);
|
|
36
36
|
},
|
|
37
37
|
onPress: n.dragLogicRef.current.pressHandler,
|
|
38
38
|
onDrag: n.dragLogicRef.current.dragHandler,
|
|
@@ -46,11 +46,11 @@ const k = (t) => {
|
|
|
46
46
|
ref: n.dragLogicRef.current.refGroupPanelDiv,
|
|
47
47
|
className: "k-grouping-header",
|
|
48
48
|
role: "toolbar",
|
|
49
|
-
"aria-label":
|
|
50
|
-
"aria-controls":
|
|
49
|
+
"aria-label": s.toLanguageString(g, u[g]),
|
|
50
|
+
"aria-controls": a.ariaControls || ""
|
|
51
51
|
},
|
|
52
|
-
/* @__PURE__ */ i.createElement("div", { className: "k-chip-list", role: "none" },
|
|
53
|
-
/* @__PURE__ */ i.createElement("div", { className: "k-grouping-drop-container" }, !
|
|
52
|
+
/* @__PURE__ */ i.createElement("div", { className: "k-chip-list", role: "none" }, l),
|
|
53
|
+
/* @__PURE__ */ i.createElement("div", { className: "k-grouping-drop-container" }, !l.length && s.toLanguageString(m, u[m]), " ")
|
|
54
54
|
);
|
|
55
55
|
};
|
|
56
56
|
export {
|
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=Object.freeze({name:"@progress/kendo-react-grid",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-grid",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1779951682,version:"15.0.1-develop.3",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -7,7 +7,7 @@ export const packageMetadata = Object.freeze({
|
|
|
7
7
|
productName: 'KendoReact',
|
|
8
8
|
productCode: 'KENDOUIREACT',
|
|
9
9
|
productCodes: ['KENDOUIREACT'],
|
|
10
|
-
publishDate:
|
|
11
|
-
version: '15.0.1-develop.
|
|
10
|
+
publishDate: 1779951682,
|
|
11
|
+
version: '15.0.1-develop.3',
|
|
12
12
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/components/my-license/'
|
|
13
13
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-grid",
|
|
3
|
-
"version": "15.0.1-develop.
|
|
3
|
+
"version": "15.0.1-develop.3",
|
|
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",
|
|
@@ -30,21 +30,21 @@
|
|
|
30
30
|
"@progress/kendo-drawing": "^1.21.2",
|
|
31
31
|
"@progress/kendo-file-saver": "^1.1.1",
|
|
32
32
|
"@progress/kendo-licensing": "^1.7.2",
|
|
33
|
-
"@progress/kendo-react-animation": "15.0.1-develop.
|
|
34
|
-
"@progress/kendo-react-buttons": "15.0.1-develop.
|
|
35
|
-
"@progress/kendo-react-common": "15.0.1-develop.
|
|
36
|
-
"@progress/kendo-react-data-tools": "15.0.1-develop.
|
|
37
|
-
"@progress/kendo-react-dateinputs": "15.0.1-develop.
|
|
38
|
-
"@progress/kendo-react-indicators": "15.0.1-develop.
|
|
39
|
-
"@progress/kendo-react-form": "15.0.1-develop.
|
|
40
|
-
"@progress/kendo-react-labels": "15.0.1-develop.
|
|
41
|
-
"@progress/kendo-react-dialogs": "15.0.1-develop.
|
|
42
|
-
"@progress/kendo-react-dropdowns": "15.0.1-develop.
|
|
43
|
-
"@progress/kendo-react-inputs": "15.0.1-develop.
|
|
44
|
-
"@progress/kendo-react-intl": "15.0.1-develop.
|
|
45
|
-
"@progress/kendo-react-popup": "15.0.1-develop.
|
|
46
|
-
"@progress/kendo-react-layout": "15.0.1-develop.
|
|
47
|
-
"@progress/kendo-react-conversational-ui": "15.0.1-develop.
|
|
33
|
+
"@progress/kendo-react-animation": "15.0.1-develop.3",
|
|
34
|
+
"@progress/kendo-react-buttons": "15.0.1-develop.3",
|
|
35
|
+
"@progress/kendo-react-common": "15.0.1-develop.3",
|
|
36
|
+
"@progress/kendo-react-data-tools": "15.0.1-develop.3",
|
|
37
|
+
"@progress/kendo-react-dateinputs": "15.0.1-develop.3",
|
|
38
|
+
"@progress/kendo-react-indicators": "15.0.1-develop.3",
|
|
39
|
+
"@progress/kendo-react-form": "15.0.1-develop.3",
|
|
40
|
+
"@progress/kendo-react-labels": "15.0.1-develop.3",
|
|
41
|
+
"@progress/kendo-react-dialogs": "15.0.1-develop.3",
|
|
42
|
+
"@progress/kendo-react-dropdowns": "15.0.1-develop.3",
|
|
43
|
+
"@progress/kendo-react-inputs": "15.0.1-develop.3",
|
|
44
|
+
"@progress/kendo-react-intl": "15.0.1-develop.3",
|
|
45
|
+
"@progress/kendo-react-popup": "15.0.1-develop.3",
|
|
46
|
+
"@progress/kendo-react-layout": "15.0.1-develop.3",
|
|
47
|
+
"@progress/kendo-react-conversational-ui": "15.0.1-develop.3",
|
|
48
48
|
"@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
|
|
49
49
|
"react": "^18.0.0 || ^19.0.0",
|
|
50
50
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
"package": {
|
|
149
149
|
"productName": "KendoReact",
|
|
150
150
|
"productCode": "KENDOUIREACT",
|
|
151
|
-
"publishDate":
|
|
151
|
+
"publishDate": 1779951682,
|
|
152
152
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
153
153
|
}
|
|
154
154
|
},
|
|
@@ -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 B=require("react"),L=require("../cells/groupcell/GridGroupCellToggle.js"),V=require("../rows/GridRow.js"),z=require("./GridStackedRow.js");function H(e){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const u=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(c,s,u.get?u:{enumerable:!0,get:()=>e[s]})}}return c.default=e,Object.freeze(c)}const t=H(B),U=({item:e,rowId:c,dataIndex:s,idPrefix:u,ariaRowIndex:f,absoluteRowIndex:y,isAltRow:k,isHidden:h,isRowReorderable:j,rowHeight:O,rows:R,leafColumns:p,groupLevelCount:b,stackedLayoutSettings:w,cells:F,editMode:x,isSelected:S,isHighlighted:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("react"),L=require("../cells/groupcell/GridGroupCellToggle.js"),V=require("../rows/GridRow.js"),z=require("./GridStackedRow.js");function H(e){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const u=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(c,s,u.get?u:{enumerable:!0,get:()=>e[s]})}}return c.default=e,Object.freeze(c)}const t=H(B),U=({item:e,rowId:c,dataIndex:s,idPrefix:u,ariaRowIndex:f,absoluteRowIndex:y,isAltRow:k,isHidden:h,isRowReorderable:j,rowHeight:O,rows:R,leafColumns:p,groupLevelCount:b,stackedLayoutSettings:w,cells:F,editMode:x,isSelected:S,isHighlighted:A,isInEdit:v,preparedCells:D,showDetailToggle:M,isDetailExpanded:_,detailExpandField:q,isPinned:I})=>{var C,G,$;if(e.rowType==="data")return t.createElement(z.GridStackedRow,{key:c,dataItem:e.dataItem,columns:p,stackedLayoutSettings:w,isAltRow:k,isSelected:S,isInEdit:v,cells:F,dataIndex:s,idPrefix:u,ariaRowIndex:f,absoluteRowIndex:y,groupLevel:b,preparedCells:D,editMode:x,showDetailToggle:M,isDetailExpanded:_,detailExpandField:q,isPinned:I});const P=b+1,E=e.level||0,T=Math.max(1,P-E),N=Array.from({length:E},(d,r)=>t.createElement("td",{key:`group-cell-${c}-${r}`,className:"k-table-group-td k-group-cell k-table-td"}));let m;if(e.rowType==="groupHeader"){const d=(C=e.dataItem)==null?void 0:C.field,r=(G=e.dataItem)==null?void 0:G.value,g=d!==void 0?(()=>{const l=String(d),n=p.find(o=>o.field===l&&o.isAccessible!==!1),i=n==null?void 0:n.title;return typeof i=="string"&&i.length?i:l})():void 0;let a="";if(d!==void 0){let l;r instanceof Date?l=r.toString():l=String(r),a=`${g}: ${l}`}else r instanceof Date?a=r.toString():r!==void 0&&(a=String(r));m=t.createElement(t.Fragment,null,N,t.createElement("td",{className:"k-table-td",colSpan:T,role:"gridcell","aria-expanded":e.expanded},t.createElement("p",{className:"k-reset"},t.createElement(L.GridGroupCellToggle,{id:"",dataItem:e.dataItem,dataIndex:e.dataIndex,field:"value",expanded:e.expanded,group:e.group,columnPosition:{},ariaColumnIndex:1,isSelected:!1}),t.createElement("span",{className:"k-value"},a))))}else{const d=p.filter(a=>{const l=!!a._type,n=a.isAccessible===!1;return!a.hidden&&!l&&!n&&(a.columnType==="data"||a.columnType===void 0)}),r=($=e.dataItem)==null?void 0:$.aggregates,g=d.map(a=>{const l=a.field;if(!l||!r)return null;const n=r[l];if(!n||typeof n!="object")return null;const i=Object.keys(n).filter(o=>n[o]!==void 0&&n[o]!==null).map(o=>`${o.length?`${o.charAt(0).toUpperCase()}${o.slice(1)}`:o}: ${String(n[o])}`);return i.length===0?null:t.createElement("div",{key:`agg-${c}-${l}`,className:"k-grid-template-column"},t.createElement("p",{className:"k-grid-template-column-header"},a.title||l),t.createElement("p",{className:"k-reset"},i.join(", ")))}).filter(Boolean);if(e.rowType==="groupFooter"&&g.length===0)return t.createElement(t.Fragment,{key:c});m=t.createElement(t.Fragment,null,N,t.createElement("td",{className:"k-table-td",colSpan:T},t.createElement("div",{className:"k-grid-column-template"},g)))}return t.createElement(V.GridRow,{key:c,dataItem:e.dataItem,isAltRow:k,isInEdit:v,rowType:e.rowType,isRowReorderable:j,isHidden:h,onClick:null,onDoubleClick:null,rowHeight:O,ariaRowIndex:f,absoluteRowIndex:y,dataIndex:s,isSelected:S,isHighlighted:A,rows:R},m)};exports.StackedModeRow=U;
|
|
@@ -61,15 +61,15 @@ const K = ({
|
|
|
61
61
|
isPinned: V
|
|
62
62
|
}
|
|
63
63
|
);
|
|
64
|
-
const _ = y + 1, S = t.level || 0, b = Math.max(1, _ - S), N = Array.from({ length: S }, (
|
|
64
|
+
const _ = y + 1, S = t.level || 0, b = Math.max(1, _ - S), N = Array.from({ length: S }, (s, r) => /* @__PURE__ */ e.createElement("td", { key: `group-cell-${d}-${r}`, className: "k-table-group-td k-group-cell k-table-td" }));
|
|
65
65
|
let g;
|
|
66
66
|
if (t.rowType === "groupHeader") {
|
|
67
|
-
const
|
|
68
|
-
const l = String(
|
|
69
|
-
return typeof
|
|
67
|
+
const s = (T = t.dataItem) == null ? void 0 : T.field, r = ($ = t.dataItem) == null ? void 0 : $.value, i = s !== void 0 ? (() => {
|
|
68
|
+
const l = String(s), n = p.find((o) => o.field === l && o.isAccessible !== !1), c = n == null ? void 0 : n.title;
|
|
69
|
+
return typeof c == "string" && c.length ? c : l;
|
|
70
70
|
})() : void 0;
|
|
71
71
|
let a = "";
|
|
72
|
-
if (
|
|
72
|
+
if (s !== void 0) {
|
|
73
73
|
let l;
|
|
74
74
|
r instanceof Date ? l = r.toString() : l = String(r), a = `${i}: ${l}`;
|
|
75
75
|
} else r instanceof Date ? a = r.toString() : r !== void 0 && (a = String(r));
|
|
@@ -88,18 +88,18 @@ const K = ({
|
|
|
88
88
|
}
|
|
89
89
|
), /* @__PURE__ */ e.createElement("span", { className: "k-value" }, a))));
|
|
90
90
|
} else {
|
|
91
|
-
const
|
|
91
|
+
const s = p.filter((a) => {
|
|
92
92
|
const l = !!a._type, n = a.isAccessible === !1;
|
|
93
93
|
return !a.hidden && !l && !n && (a.columnType === "data" || a.columnType === void 0);
|
|
94
|
-
}), r = (C = t.dataItem) == null ? void 0 : C.aggregates, i =
|
|
94
|
+
}), r = (C = t.dataItem) == null ? void 0 : C.aggregates, i = s.map((a) => {
|
|
95
95
|
const l = a.field;
|
|
96
96
|
if (!l || !r)
|
|
97
97
|
return null;
|
|
98
98
|
const n = r[l];
|
|
99
99
|
if (!n || typeof n != "object")
|
|
100
100
|
return null;
|
|
101
|
-
const
|
|
102
|
-
return
|
|
101
|
+
const c = Object.keys(n).filter((o) => n[o] !== void 0 && n[o] !== null).map((o) => `${o.length ? `${o.charAt(0).toUpperCase()}${o.slice(1)}` : o}: ${String(n[o])}`);
|
|
102
|
+
return c.length === 0 ? null : /* @__PURE__ */ e.createElement("div", { key: `agg-${d}-${l}`, className: "k-grid-template-column" }, /* @__PURE__ */ e.createElement("p", { className: "k-grid-template-column-header" }, a.title || l), /* @__PURE__ */ e.createElement("p", { className: "k-reset" }, c.join(", ")));
|
|
103
103
|
}).filter(Boolean);
|
|
104
104
|
if (t.rowType === "groupFooter" && i.length === 0)
|
|
105
105
|
return /* @__PURE__ */ e.createElement(e.Fragment, { key: d });
|
|
@@ -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 x=require("react"),ee=require("react-dom"),te=require("../utils/GridContext.js"),F=require("@progress/kendo-react-buttons"),g=require("@progress/kendo-svg-icons"),ne=require("@progress/kendo-react-intl"),i=require("../messages/index.js"),u=require("@progress/kendo-react-common"),P=require("@progress/kendo-react-indicators"),oe=require("@progress/kendo-react-popup"),ae=require("./adaptiveContext/GridToolbarAdaptiveContext.js"),re=require("./adaptiveContent/GridAdaptiveToolbarGroup.js");function le(l){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const c in l)if(c!=="default"){const f=Object.getOwnPropertyDescriptor(l,c);Object.defineProperty(o,c,f.get?f:{enumerable:!0,get:()=>l[c]})}}return o.default=l,Object.freeze(o)}const e=le(x),z=l=>{var A,O;const o=e.useContext(te.GridContext),c=o.columnsState,f=o.groupable,a=o.group,w=o.defaultGroup,[I,
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react"),ee=require("react-dom"),te=require("../utils/GridContext.js"),F=require("@progress/kendo-react-buttons"),g=require("@progress/kendo-svg-icons"),ne=require("@progress/kendo-react-intl"),i=require("../messages/index.js"),u=require("@progress/kendo-react-common"),P=require("@progress/kendo-react-indicators"),oe=require("@progress/kendo-react-popup"),ae=require("./adaptiveContext/GridToolbarAdaptiveContext.js"),re=require("./adaptiveContent/GridAdaptiveToolbarGroup.js");function le(l){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const c in l)if(c!=="default"){const f=Object.getOwnPropertyDescriptor(l,c);Object.defineProperty(o,c,f.get?f:{enumerable:!0,get:()=>l[c]})}}return o.default=l,Object.freeze(o)}const e=le(x),z=l=>{var A,O;const o=e.useContext(te.GridContext),c=o.columnsState,f=o.groupable,a=o.group,w=o.defaultGroup,[I,b]=e.useState(!0),[j,p]=e.useState(!1),[k,C]=e.useState(!1),m=e.useRef(null),v=e.useRef(null),M=e.useRef(null),h=e.useRef(0),E=ne.useLocalization(),L=u.useDocument(m);e.useEffect(()=>{w||a!=null&&a.length?(p(!0),b(!1)):p(!1)},[w,a]);const N=e.useMemo(()=>(c==null?void 0:c.filter(t=>{var n;return t.isAccessible!==!1&&((n=t.title||t.field)==null?void 0:n.toLowerCase())}))||[],[c]),d=e.useCallback(()=>{var t;l.onCloseMenu&&l.onCloseMenu(),C(!1),m.current&&((t=m.current.element)==null||t.focus())},[l]),D=e.useCallback((t,n)=>{if(t.preventDefault(),!(n!=null&&n.field))return;const r=(a||[]).slice(),s=r.findIndex($=>$.field===n.field);s>-1?r.splice(s,1):r.push({field:n.field}),o.groupChange(r,t),b(!1),p(!0)},[o,a]),T=e.useCallback((t,n)=>{if(t.preventDefault(),!(n!=null&&n.field))return;const r=(a||[]).filter(s=>s.field!==n.field);o.groupChange(r,t),r.length===0&&(b(!0),p(!1),d())},[d,o,a]),S=e.useCallback((t,n)=>{if(n===0)return;const r=[...a||[]],s=r[n-1];r[n-1]=r[n],r[n]=s,o.groupChange(r,t)},[a,o]),y=e.useCallback((t,n)=>{if(n===a.length-1)return;const r=[...a||[]],s=r[n+1];r[n+1]=r[n],r[n]=s,o.groupChange(r,t)},[a,o]),K=e.useCallback((t,n)=>{const r=c==null?void 0:c.find(s=>s.field===t.field&&s.isAccessible!==!1);return e.createElement(e.Fragment,null,a&&a.length!==1&&e.createElement("span",{className:"k-group-menu-item-actions"},e.createElement("span",{className:u.classNames("k-group-menu-item-action k-group-menu-item-up-action",{"k-disabled":n===0}),"aria-disabled":n===0,onClick:s=>S(s,n)},e.createElement(u.SvgIcon,{icon:g.chevronUpIcon})),e.createElement("span",{className:u.classNames("k-group-menu-item-action k-group-menu-item-down-action",{"k-disabled":n===a.length-1}),"aria-disabled":n===a.length-1,onClick:s=>y(s,n)},e.createElement(u.SvgIcon,{icon:g.chevronDownIcon}))),e.createElement("span",{className:"k-group-item-text"},(r==null?void 0:r.title)||t.field),e.createElement("span",{className:"k-spacer"}),e.createElement("span",{className:"k-group-menu-item-actions"},e.createElement("span",{className:"k-group-menu-item-action k-group-menu-item-remove-action",onClick:s=>T(s,t)},e.createElement(u.SvgIcon,{icon:g.xCircleIcon,size:o.mobileMode?"large":"medium"}))))},[c,o.mobileMode,a,T,y,S]),_=e.useCallback(t=>e.createElement(e.Fragment,null,e.createElement("span",{className:"k-group-item-text"},t.title||t.field),e.createElement("span",{className:"k-spacer"}),e.createElement("span",{className:"k-group-menu-item-actions"},e.createElement("span",{className:"k-group-menu-item-action k-group-menu-item-add-action",onClick:n=>D(n,t)},e.createElement(u.SvgIcon,{icon:g.plusCircleIcon,size:o.mobileMode?"large":"medium"})))),[o.mobileMode,D]),U=t=>{t.preventDefault(),C(!k)},G=e.useMemo(()=>{var t;return(t=l.show)!=null?t:k},[l.show,k]),V=t=>{const n=u.getActiveElement(document);clearTimeout(h.current),h.current=window.setTimeout(()=>{!o.mobileMode&&n&&t.relatedTarget!==m.current&&v.current&&!v.current.contains(n)&&d()})},H=()=>{clearTimeout(h.current)},{onFocus:J,onBlur:Q}=u.useAsyncFocusBlur({onFocus:t=>H(),onBlur:t=>V(t)}),W=t=>{var n;(n=M.current)==null||n.triggerMouseEvent(t)},X=t=>{var n;(n=M.current)==null||n.triggerKeyboardEvent(t)},Y=t=>{!t.isAnchorClicked&&C(!1)},B=e.useCallback(t=>{o.groupChange([],t),b(!0),p(!1),d()},[d,o]),R=e.createElement(e.Fragment,null,a&&a.length>0&&e.createElement("div",{className:"k-group-menu-item-wrap"},a==null?void 0:a.map((t,n)=>e.createElement("div",{className:"k-group-menu-item",key:t.field},K(t,n)))),e.createElement("div",{className:"k-group-menu-item-wrap"},N.filter(t=>!(a!=null&&a.some(n=>n.field===t.field))).map(t=>t.field==="value"?null:e.createElement("div",{className:"k-group-menu-item",key:t.id},_(t))))),Z=e.useMemo(()=>l.svgIcon?l.svgIcon:l.icon?void 0:g.groupIcon,[l.icon,l.svgIcon]),q=e.createElement(F.Button,{ref:m,togglable:!0,selected:G,svgIcon:Z,icon:l.icon,size:o.mobileMode?"large":"medium",className:u.classNames("k-toolbar-button",{"k-icon-button":o.mobileMode}),title:E.toLanguageString(i.toolbarGroup,i.messages[i.toolbarGroup]),onClick:U},!o.mobileMode&&E.toLanguageString(i.toolbarGroup,i.messages[i.toolbarGroup]));return f&&e.createElement(e.Fragment,null,j?e.createElement(P.BadgeContainer,null,q,e.createElement(P.Badge,{themeColor:"primary"})):q,o.mobileMode?e.createElement(ae.GridToolbarAdaptiveProvider,null,ee.createPortal(e.createElement(re.GridAdaptiveToolbarGroup,{filtered:N,computedShow:G,isDisabledButton:I,toolContent:R,onClose:d,onClear:B}),(A=L())==null?void 0:A.body)):e.createElement(oe.Popup,{anchor:(O=m.current)==null?void 0:O.element,show:G,popupClass:"k-grid-columnmenu-popup",onMouseDownOutside:Y},e.createElement("div",{ref:v,onBlur:Q,onFocus:J,onMouseDown:W,onKeyDown:X,className:"k-group-menu k-group-menu-md"},R,e.createElement("div",{className:"k-actions k-actions-stretched k-actions-horizontal k-column-menu-footer"},e.createElement(F.Button,{svgIcon:g.xIcon,onClick:B,disabled:I},E.toLanguageString(i.groupClearButton,i.messages[i.groupClearButton]))))))};z.displayName="KendoReactGridToolbarGroup";exports.GridToolbarGroup=z;
|
|
@@ -24,10 +24,12 @@ const ke = (s) => {
|
|
|
24
24
|
G || o != null && o.length ? (m(!0), d(!1)) : m(!1);
|
|
25
25
|
}, [G, o]);
|
|
26
26
|
const I = e.useMemo(
|
|
27
|
-
() => (c == null ? void 0 : c.filter(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
() => (c == null ? void 0 : c.filter(
|
|
28
|
+
(t) => {
|
|
29
|
+
var n;
|
|
30
|
+
return t.isAccessible !== !1 && ((n = t.title || t.field) == null ? void 0 : n.toLowerCase());
|
|
31
|
+
}
|
|
32
|
+
)) || [],
|
|
31
33
|
[c]
|
|
32
34
|
), i = e.useCallback(() => {
|
|
33
35
|
var t;
|
|
@@ -58,7 +60,7 @@ const ke = (s) => {
|
|
|
58
60
|
r[n - 1] = r[n], r[n] = l, a.groupChange(r, t);
|
|
59
61
|
},
|
|
60
62
|
[o, a]
|
|
61
|
-
),
|
|
63
|
+
), A = e.useCallback(
|
|
62
64
|
(t, n) => {
|
|
63
65
|
if (n === o.length - 1)
|
|
64
66
|
return;
|
|
@@ -68,7 +70,7 @@ const ke = (s) => {
|
|
|
68
70
|
[o, a]
|
|
69
71
|
), V = e.useCallback(
|
|
70
72
|
(t, n) => {
|
|
71
|
-
const r = c == null ? void 0 : c.find((l) => l.field === t.field);
|
|
73
|
+
const r = c == null ? void 0 : c.find((l) => l.field === t.field && l.isAccessible !== !1);
|
|
72
74
|
return /* @__PURE__ */ e.createElement(e.Fragment, null, o && o.length !== 1 && /* @__PURE__ */ e.createElement("span", { className: "k-group-menu-item-actions" }, /* @__PURE__ */ e.createElement(
|
|
73
75
|
"span",
|
|
74
76
|
{
|
|
@@ -86,7 +88,7 @@ const ke = (s) => {
|
|
|
86
88
|
"k-disabled": n === o.length - 1
|
|
87
89
|
}),
|
|
88
90
|
"aria-disabled": n === o.length - 1,
|
|
89
|
-
onClick: (l) =>
|
|
91
|
+
onClick: (l) => A(l, n)
|
|
90
92
|
},
|
|
91
93
|
/* @__PURE__ */ e.createElement(g, { icon: ne })
|
|
92
94
|
)), /* @__PURE__ */ e.createElement("span", { className: "k-group-item-text" }, (r == null ? void 0 : r.title) || t.field), /* @__PURE__ */ e.createElement("span", { className: "k-spacer" }), /* @__PURE__ */ e.createElement("span", { className: "k-group-menu-item-actions" }, /* @__PURE__ */ e.createElement(
|
|
@@ -98,7 +100,7 @@ const ke = (s) => {
|
|
|
98
100
|
/* @__PURE__ */ e.createElement(g, { icon: oe, size: a.mobileMode ? "large" : "medium" })
|
|
99
101
|
)));
|
|
100
102
|
},
|
|
101
|
-
[c, a.mobileMode, o, B,
|
|
103
|
+
[c, a.mobileMode, o, B, A, T]
|
|
102
104
|
), H = e.useCallback(
|
|
103
105
|
(t) => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("span", { className: "k-group-item-text" }, t.title || t.field), /* @__PURE__ */ e.createElement("span", { className: "k-spacer" }), /* @__PURE__ */ e.createElement("span", { className: "k-group-menu-item-actions" }, /* @__PURE__ */ e.createElement(
|
|
104
106
|
"span",
|
|
@@ -132,7 +134,7 @@ const ke = (s) => {
|
|
|
132
134
|
(n = N.current) == null || n.triggerKeyboardEvent(t);
|
|
133
135
|
}, Y = (t) => {
|
|
134
136
|
!t.isAnchorClicked && k(!1);
|
|
135
|
-
},
|
|
137
|
+
}, y = e.useCallback(
|
|
136
138
|
(t) => {
|
|
137
139
|
a.groupChange([], t), d(!0), m(!1), i();
|
|
138
140
|
},
|
|
@@ -163,7 +165,7 @@ const ke = (s) => {
|
|
|
163
165
|
isDisabledButton: M,
|
|
164
166
|
toolContent: F,
|
|
165
167
|
onClose: i,
|
|
166
|
-
onClear:
|
|
168
|
+
onClear: y
|
|
167
169
|
}
|
|
168
170
|
),
|
|
169
171
|
(S = U()) == null ? void 0 : S.body
|
|
@@ -190,7 +192,7 @@ const ke = (s) => {
|
|
|
190
192
|
L,
|
|
191
193
|
{
|
|
192
194
|
svgIcon: le,
|
|
193
|
-
onClick:
|
|
195
|
+
onClick: y,
|
|
194
196
|
disabled: M
|
|
195
197
|
},
|
|
196
198
|
h.toLanguageString(K, v[K])
|
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
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("react"),v=require("../GridColumn.js"),S=require("@progress/kendo-data-query"),y=require("@progress/kendo-react-data-tools"),O=require("./_serverModule.js"),T=require("./_clientModule.js"),h=require("../contextMenu/enums.js"),H=require("@progress/kendo-react-common");function j(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,r.get?r:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const M=j(k);function u(e,t){const a=(e!=null?e:"").split(".");let r=t;return a.forEach(n=>{r=r?r[n]:void 0}),r}function N(e,t,a,r,n,d,l,i,s,f=0,o){var x;let c=f;for(let g=0;g<t.length;g++){let C;if(!n||t[g].value===void 0||t[g].items===void 0){e[e.length]={dataIndex:r.index,dataItem:t[g],rowType:"data",level:f,group:o,expanded:(x=s?!!(d!=null&&d[S.getter(s)(t[g])]):!1)!=null?x:!1},r.index++;continue}else{let w;o!=null&&o.parents?w=[{field:o.field,value:o.value},...o.parents]:o?w=[o]:w=[],C={field:t[g].field,value:t[g].value,parents:w}}c=Math.max(c,f+1);let I=!1;const b=y.findGroupExpand(l||[],C);b?I=b.expanded!==!1:I=i!==!1,e[e.length]={dataIndex:-1,dataItem:t[g],level:f,group:C,rowType:"groupHeader",expanded:I},I&&(C.expanded=I,c=Math.max(N(e,t[g].items,a,r,n,d,l,i,s,f+1,C),c)),(a==="always"||I&&a==="visible")&&(e[e.length]={dataIndex:-1,dataItem:t[g],rowType:"groupFooter",level:f,expanded:I})}return c}function p(e,t){for(let a=0;a<e.length;a++){const r=e[a];if(r.locked===void 0){const n=t[r.index];n&&(r.locked=n.locked)}}}const q=(e,t)=>typeof e.colSpan=="function"?e.colSpan({dataItem:t,column:e}):e.colSpan||1;function B(e,t,a){const r=[[]];let n=0;for(let i=e.length-1;i>=0;i--)n=Math.max(n,e[i].depth),e[i].headerColSpan=e[i].headerColSpan||1,e[i].children.length>0&&(e[i].headerColSpan=e[i].children.reduce((s,f)=>f.hidden?s:s+f.headerColSpan,0));const d=[];let l=1;return e.forEach((i,s)=>{r[i.depth]=r[i.depth]||[];let f=!1;r[i.depth].length===0&&(l<=1?l=1+(i.children.length>0?0:n-i.depth):(l--,f=!0)),i.rowSpan=1+(i.children.length>0?0:n-i.depth),i.kFirst=f,i.index=r[i.depth].length,r[i.depth].push(s),i.ariaColumnIndex=d[i.depth]?d[i.depth]+1:1;for(let o=i.depth;o<i.depth+i.rowSpan;o++)d[o]=(d[o]||0)+i.headerColSpan}),p(e,t),y.updateLeft(r,e,a),y.updateRight(r,e,a),r}function R(e,t,a,r=0,n=!1){const d=[];if(!e)return[];e&&e.length===void 0&&(e=[e]),e.forEach((i,s)=>{i=i.props?i.props:i;const f=i.id?i.id:y.tableKeyboardNavigationTools.generateNavigatableId(`${a.prevId++}`,a.idPrefix,"column"),o=H.canUseDOM&&i.media&&window.matchMedia?!window.matchMedia(i.media).matches:!1,c=n||o||i.hidden,x=t==null?void 0:t.find(C=>C.id===f),g=R(i.children,(x==null?void 0:x.children)||[],a,r+1,c);d.push(Object.assign({depth:r},v.gridDefaultProps,g.length?{cell:()=>null,filterCell:()=>null}:{},i,{id:f,declarationIndex:d.length,children:g,headerColSpan:0,rowSpan:0,columnType:i.columnType||"data",colSpan:i.colSpan||1,isAccessible:!0,hidden:c,left:null,right:null,rowSpannable:i.rowSpannable},x?{width:x.width,orderIndex:x.orderIndex}:{}))});const l=(i,s)=>i.orderIndex===s.orderIndex?i.declarationIndex-s.declarationIndex:(i.orderIndex||0)-(s.orderIndex||0);if(d.sort(l),r===0){const i=[],s=(f,o)=>f.forEach(c=>{c.parentIndex=o,s(c.children,i.push(c)-1)});return s(d,-1),i}return d}const D=e=>Array.isArray(e)?e:e?e.data:[];function z(e,t,a,r){const n=D(e),d=[];if(n.length>0){let l=n[0];if(t)for(let s=0;s<t.length;s++)l=l.items&&l.items[0];Object.getOwnPropertyNames(l).forEach(s=>{s!==a.column&&d.push(Object.assign({id:y.tableKeyboardNavigationTools.generateNavigatableId(`${r.prevId++}`,r.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:s}))})}return d}const _=(e,t)=>{var r;let a=e[t.parentIndex];for(;a;){if((r=a.cells)!=null&&r.footerCell)return!0;a=e[a.parentIndex]}return!1},L=e=>e.filter(t=>{var a;return _(e,t)?!1:!!((a=t.cells)!=null&&a.footerCell)||!(t.children&&t.children.length>0)}),$=e=>{let t=e.width;return typeof(e==null?void 0:e.width)=="number"&&(e!=null&&e.minResizableWidth)&&(e==null?void 0:e.width)<(e==null?void 0:e.minResizableWidth)&&(t=e==null?void 0:e.minResizableWidth),typeof(e==null?void 0:e.width)=="number"&&(e!=null&&e.minWidth)&&(e==null?void 0:e.width)<(e==null?void 0:e.minWidth)?t=e==null?void 0:e.minWidth:typeof(e==null?void 0:e.width)=="number"&&(e!=null&&e.maxWidth)&&(e==null?void 0:e.width)>(e==null?void 0:e.maxWidth)&&(t=e==null?void 0:e.maxWidth),t!==void 0?Math.floor(parseFloat(t.toString()))+"px":void 0},V=(e,t)=>t&&t.filter(a=>a.field===e).length>0,A=e=>(e.sort((t,a)=>t.declarationIndex-a.declarationIndex),e.map(t=>{const{declarationIndex:a,parentIndex:r,depth:n,headerColSpan:d,rowSpan:l,index:i,kFirst:s,children:f,...o}=t;return f.length?{children:A(f),...o}:o})),E=e=>{const{cells:t,rowSpannable:a,defaultCell:r,...n}=e;return e.children.length?{...n,children:e.children.map(E)}:n},G=e=>({id:e.id,field:e.field,title:e.title,width:e.width,orderIndex:e.orderIndex,hidden:!1,minWidth:e.minWidth,maxWidth:e.maxWidth,isAccessible:e.isAccessible,children:e.children?W(e.children):null}),W=e=>e.map(G),P=e=>{const t=[],a=r=>r==null?void 0:r.forEach(n=>{t.push(n),a(n.children)});return a(e),t},K=typeof window!="undefined"&&/Firefox/.test(window.navigator.userAgent),Q=17895697,U=e=>{let t=[];return e.sortable&&(t=t.concat([h.GridContextMenuItemNames.sortAsc,h.GridContextMenuItemNames.sortDesc])),e.pdf&&(t.length&&(t=t.concat([h.GridContextMenuItemNames.separator])),t=t.concat([h.GridContextMenuItemNames.exportPDF])),t},J=e=>{let t=[];return e.clipboard&&(t=t.concat([h.GridContextMenuItemNames.copySelection,h.GridContextMenuItemNames.copySelectionNoHeaders,h.GridContextMenuItemNames.paste])),e.editable&&(t.length&&(t=t.concat([h.GridContextMenuItemNames.separator])),t=t.concat([h.GridContextMenuItemNames.create,h.GridContextMenuItemNames.edit,h.GridContextMenuItemNames.delete])),e.selectable&&(t.length&&(t=t.concat([h.GridContextMenuItemNames.separator])),t=t.concat([h.GridContextMenuItemNames.select])),e.rowReorderable&&(t.length&&(t=t.concat([h.GridContextMenuItemNames.separator])),t=t.concat([h.GridContextMenuItemNames.reorderRow])),e.pdf&&(t.length&&(t=t.concat([h.GridContextMenuItemNames.separator])),t=t.concat([h.GridContextMenuItemNames.exportPDF])),e.pinnable&&(t.length&&(t=t.concat([h.GridContextMenuItemNames.separator])),t=t.concat([h.GridContextMenuItemNames.pinRow])),t},X=(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},Y=e=>{var a;return typeof e=="object"?(a=e.enabled)!=null?a:!0:e!=null?e:!1},Z=()=>O.ServerFragment===T.ClientFragment,m=e=>!!(e&&e.$$typeof===Symbol.for("react.client.reference")),ee=e=>({id:e.id,ariaColumnIndex:e.ariaColumnIndex,isSelected:e.isSelected,isHighlighted:e.isHighlighted,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,locked:e.locked,isRtl:e.isRtl,rowDataIndex:e.rowDataIndex,columnPosition:e.columnPosition,group:e.group}),te=e=>{var r,n;const t=typeof e=="object"?(r=e.enabled)!=null?r:!0:e!=null?e:!1,a=typeof e=="object"?(n=e.valueGetter)!=null?n:((d,l)=>S.getter(l)(d)):(d,l)=>S.getter(l)(d);return{enabled:t,valueGetter:a}},F=e=>{var t;return M.isValidElement(e)?e:(t=M.Children.toArray(e))==null?void 0:t[0]},ie=(e,t)=>{const a=F(e);return a?M.cloneElement(a,t):null},ae=e=>{let t=0;if(e){const a=e.insertRow(0),r=a.insertCell(0);r.textContent=" ",t=a.getBoundingClientRect().height,e.deleteRow(0)}return t};exports.autoGenerateColumns=z;exports.calcRowHeight=ae;exports.clientColumn=E;exports.cloneReactElement=ie;exports.firefox=K;exports.firefoxMaxHeight=Q;exports.flatData=N;exports.footerColumns=L;exports.getClientCellProps=ee;exports.getColSpan=q;exports.getColumnState=G;exports.getColumnWidth=$;exports.getColumnsState=W;exports.getDataAsArray=D;exports.getDefaultBodyContextMenuItems=J;exports.getDefaultHeadContextMenuItems=U;exports.getFlatColumnsState=P;exports.getNestedValue=u;exports.getReactElement=F;exports.getRowSpanOptions=te;exports.isClient=Z;exports.isClientReference=m;exports.isRowReorderEnabled=Y;exports.isSorted=V;exports.mapColumns=B;exports.readColumns=R;exports.resolveCells=X;exports.sanitizeColumns=A;exports.syncLockedColumns=p;
|
package/utils/index.mjs
CHANGED
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as C from "react";
|
|
9
|
-
import { gridDefaultProps as
|
|
9
|
+
import { gridDefaultProps as b } from "../GridColumn.mjs";
|
|
10
10
|
import { getter as S } from "@progress/kendo-data-query";
|
|
11
|
-
import { findGroupExpand as R, tableKeyboardNavigationTools as
|
|
12
|
-
import { ServerFragment as
|
|
13
|
-
import { ClientFragment as
|
|
11
|
+
import { findGroupExpand as R, tableKeyboardNavigationTools as p, updateLeft as W, updateRight as A } from "@progress/kendo-react-data-tools";
|
|
12
|
+
import { ServerFragment as F } from "./_serverModule.mjs";
|
|
13
|
+
import { ClientFragment as D } from "./_clientModule.mjs";
|
|
14
14
|
import { GridContextMenuItemNames as l } from "../contextMenu/enums.mjs";
|
|
15
|
-
import { canUseDOM as
|
|
15
|
+
import { canUseDOM as E } from "@progress/kendo-react-common";
|
|
16
16
|
function X(e, t) {
|
|
17
17
|
const r = (e != null ? e : "").split(".");
|
|
18
18
|
let a = t;
|
|
@@ -20,7 +20,7 @@ function X(e, t) {
|
|
|
20
20
|
a = a ? a[d] : void 0;
|
|
21
21
|
}), a;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function M(e, t, r, a, d, n, o, i, h, s = 0, f) {
|
|
24
24
|
var c;
|
|
25
25
|
let x = s;
|
|
26
26
|
for (let g = 0; g < t.length; g++) {
|
|
@@ -55,7 +55,7 @@ function A(e, t, r, a, d, n, o, i, h, s = 0, f) {
|
|
|
55
55
|
rowType: "groupHeader",
|
|
56
56
|
expanded: w
|
|
57
57
|
}, w && (I.expanded = w, x = Math.max(
|
|
58
|
-
|
|
58
|
+
M(
|
|
59
59
|
e,
|
|
60
60
|
t[g].items,
|
|
61
61
|
r,
|
|
@@ -105,7 +105,7 @@ function Z(e, t, r) {
|
|
|
105
105
|
a[i.depth].length === 0 && (o <= 1 ? o = 1 + (i.children.length > 0 ? 0 : d - i.depth) : (o--, s = !0)), i.rowSpan = 1 + (i.children.length > 0 ? 0 : d - i.depth), i.kFirst = s, i.index = a[i.depth].length, a[i.depth].push(h), i.ariaColumnIndex = n[i.depth] ? n[i.depth] + 1 : 1;
|
|
106
106
|
for (let f = i.depth; f < i.depth + i.rowSpan; f++)
|
|
107
107
|
n[f] = (n[f] || 0) + i.headerColSpan;
|
|
108
|
-
}), H(e, t), W(a, e, r),
|
|
108
|
+
}), H(e, t), W(a, e, r), A(a, e, r), a;
|
|
109
109
|
}
|
|
110
110
|
function T(e, t, r, a = 0, d = !1) {
|
|
111
111
|
const n = [];
|
|
@@ -113,11 +113,11 @@ function T(e, t, r, a = 0, d = !1) {
|
|
|
113
113
|
return [];
|
|
114
114
|
e && e.length === void 0 && (e = [e]), e.forEach((i, h) => {
|
|
115
115
|
i = i.props ? i.props : i;
|
|
116
|
-
const s = i.id ? i.id :
|
|
116
|
+
const s = i.id ? i.id : p.generateNavigatableId(`${r.prevId++}`, r.idPrefix, "column"), f = E && i.media && window.matchMedia ? !window.matchMedia(i.media).matches : !1, x = d || f || i.hidden, c = t == null ? void 0 : t.find((I) => I.id === s), g = T(i.children, (c == null ? void 0 : c.children) || [], r, a + 1, x);
|
|
117
117
|
n.push(
|
|
118
118
|
Object.assign(
|
|
119
119
|
{ depth: a },
|
|
120
|
-
|
|
120
|
+
b,
|
|
121
121
|
g.length ? { cell: () => null, filterCell: () => null } : {},
|
|
122
122
|
i,
|
|
123
123
|
{
|
|
@@ -159,7 +159,7 @@ function _(e, t, r, a) {
|
|
|
159
159
|
h !== r.column && n.push(
|
|
160
160
|
Object.assign(
|
|
161
161
|
{
|
|
162
|
-
id:
|
|
162
|
+
id: p.generateNavigatableId(`${a.prevId++}`, a.idPrefix, "column"),
|
|
163
163
|
declarationIndex: -1,
|
|
164
164
|
parentIndex: -1,
|
|
165
165
|
depth: 0,
|
|
@@ -175,7 +175,7 @@ function _(e, t, r, a) {
|
|
|
175
175
|
ariaColumnIndex: 0,
|
|
176
176
|
isAccessible: !0
|
|
177
177
|
},
|
|
178
|
-
|
|
178
|
+
b,
|
|
179
179
|
{ field: h }
|
|
180
180
|
)
|
|
181
181
|
);
|
|
@@ -219,6 +219,7 @@ const j = (e, t) => {
|
|
|
219
219
|
hidden: !1,
|
|
220
220
|
minWidth: e.minWidth,
|
|
221
221
|
maxWidth: e.maxWidth,
|
|
222
|
+
isAccessible: e.isAccessible,
|
|
222
223
|
children: e.children ? z(e.children) : null
|
|
223
224
|
}), z = (e) => e.map(N), m = (e) => {
|
|
224
225
|
const t = [], r = (a) => a == null ? void 0 : a.forEach((d) => {
|
|
@@ -264,7 +265,7 @@ const j = (e, t) => {
|
|
|
264
265
|
}, de = (e) => {
|
|
265
266
|
var r;
|
|
266
267
|
return typeof e == "object" ? (r = e.enabled) != null ? r : !0 : e != null ? e : !1;
|
|
267
|
-
}, ne = () =>
|
|
268
|
+
}, ne = () => F === D, he = (e) => !!(e && e.$$typeof === Symbol.for("react.client.reference")), fe = (e) => ({
|
|
268
269
|
id: e.id,
|
|
269
270
|
ariaColumnIndex: e.ariaColumnIndex,
|
|
270
271
|
isSelected: e.isSelected,
|
|
@@ -315,7 +316,7 @@ export {
|
|
|
315
316
|
le as cloneReactElement,
|
|
316
317
|
ee as firefox,
|
|
317
318
|
te as firefoxMaxHeight,
|
|
318
|
-
|
|
319
|
+
M as flatData,
|
|
319
320
|
P as footerColumns,
|
|
320
321
|
fe as getClientCellProps,
|
|
321
322
|
Y as getColSpan,
|