@progress/kendo-react-grid 9.4.1-develop.3 → 9.4.1-develop.5
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/GridClientContextReader.js +1 -1
- package/GridClientContextReader.mjs +16 -16
- package/cells/client/DetailCellContainer.js +1 -1
- package/cells/client/DetailCellContainer.mjs +7 -6
- package/cells/client/GridCellContainer.js +1 -1
- package/cells/client/GridCellContainer.mjs +27 -26
- package/cells/client/GridEditCellContainer.js +1 -1
- package/cells/client/GridEditCellContainer.mjs +32 -31
- package/cells/client/GridGroupCellContainer.js +1 -1
- package/cells/client/GridGroupCellContainer.mjs +26 -25
- package/cells/client/GridHierarchyCellContainer.js +1 -1
- package/cells/client/GridHierarchyCellContainer.mjs +30 -29
- package/cells/client/GridRowReorderContainer.js +1 -1
- package/cells/client/GridRowReorderContainer.mjs +15 -14
- package/cells/client/GridSelectionCellContainer.js +1 -1
- package/cells/client/GridSelectionCellContainer.mjs +31 -30
- package/components/GridContainerElementContainer.js +1 -1
- package/components/GridContainerElementContainer.mjs +8 -8
- package/components/GridCustomCellClientContainer.js +1 -1
- package/components/GridCustomCellClientContainer.mjs +8 -7
- package/components/GridDraggableRowsContainer.js +1 -1
- package/components/GridDraggableRowsContainer.mjs +10 -9
- package/components/GridElementContainer.js +1 -1
- package/components/GridElementContainer.mjs +6 -6
- package/components/PagerContainer.js +1 -1
- package/components/PagerContainer.mjs +9 -9
- package/components/table/GridTableBody.js +1 -1
- package/components/table/GridTableBody.mjs +9 -9
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/footer/client/FooterCellContainer.js +1 -1
- package/footer/client/FooterCellContainer.mjs +10 -9
- package/header/client/GridFilterCellContainer.js +1 -1
- package/header/client/GridFilterCellContainer.mjs +13 -12
- package/header/client/GridFilterCellElementContainer.js +1 -1
- package/header/client/GridFilterCellElementContainer.mjs +4 -3
- package/header/client/GridHeaderCellContainer.js +1 -1
- package/header/client/GridHeaderCellContainer.mjs +13 -12
- package/header/client/GridHeaderCellElementContainer.js +1 -1
- package/header/client/GridHeaderCellElementContainer.mjs +11 -10
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +13 -13
- package/utils/index.js +1 -1
- package/utils/index.mjs +119 -110
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),r=require("@progress/kendo-react-common"),s=require("@progress/kendo-react-intl"),g=require("./GridState.js"),y=require("./utils/index.js");function p(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const c=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,c.get?c:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const o=p(m),C=e=>{const n=r.useId(),t=e.id||n,c=r.useUnstyled(),i=s.useLocalization(),a=s.useInternationalization(),[,l]=o.useReducer(b=>!b,!0),u=o.useRef([]),d=o.useRef(0),[f,,R]=g.useGridState();return y.cloneReactElement(e.children,{...f,...R,id:t,unstyled:c,localization:i,intl:a,columnsRef:u,scrollLeftRef:d,forceUpdate:l,isClient:!0})};exports.GridClientContextReader=C;
|
|
@@ -6,26 +6,26 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
10
|
-
import { useId as
|
|
11
|
-
import { useLocalization as
|
|
12
|
-
import { useGridState as
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
import * as t from "react";
|
|
10
|
+
import { useId as f, useUnstyled as R } from "@progress/kendo-react-common";
|
|
11
|
+
import { useLocalization as p, useInternationalization as z } from "@progress/kendo-react-intl";
|
|
12
|
+
import { useGridState as C } from "./GridState.mjs";
|
|
13
|
+
import { cloneReactElement as I } from "./utils/index.mjs";
|
|
14
|
+
const U = (e) => {
|
|
15
|
+
const o = f(), n = e.id || o, s = R(), c = p(), i = z(), [, r] = t.useReducer((m) => !m, !0), l = t.useRef([]), a = t.useRef(0), [u, , d] = C();
|
|
16
|
+
return I(e.children, {
|
|
17
|
+
...u,
|
|
17
18
|
...d,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
localization: r,
|
|
19
|
+
id: n,
|
|
20
|
+
unstyled: s,
|
|
21
|
+
localization: c,
|
|
22
22
|
intl: i,
|
|
23
|
-
columnsRef:
|
|
24
|
-
scrollLeftRef:
|
|
25
|
-
forceUpdate:
|
|
23
|
+
columnsRef: l,
|
|
24
|
+
scrollLeftRef: a,
|
|
25
|
+
forceUpdate: r,
|
|
26
26
|
isClient: !0
|
|
27
27
|
});
|
|
28
28
|
};
|
|
29
29
|
export {
|
|
30
|
-
|
|
30
|
+
U as GridClientContextReader
|
|
31
31
|
};
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),i=require("@progress/kendo-react-data-tools"),l=require("../../GridClientWrapper.js");function
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),i=require("@progress/kendo-react-data-tools"),l=require("../../GridClientWrapper.js"),u=require("../../utils/index.js");function s(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const a=s(c),d=e=>{const t=a.useContext(l.GridContext),n=i.useTableKeyboardNavigation(e.id),o=a.useCallback(r=>{t!=null&&t.onContextMenu&&t.onContextMenu.call(void 0,r,e.dataItem)},[t,e.dataItem]);return u.cloneReactElement(e.children,{onContextMenu:o,...n})};exports.DetailCellContainer=d;
|
|
@@ -7,20 +7,21 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as n from "react";
|
|
10
|
-
import { useTableKeyboardNavigation as
|
|
11
|
-
import { GridContext as
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
import { useTableKeyboardNavigation as r } from "@progress/kendo-react-data-tools";
|
|
11
|
+
import { GridContext as l } from "../../GridClientWrapper.mjs";
|
|
12
|
+
import { cloneReactElement as m } from "../../utils/index.mjs";
|
|
13
|
+
const d = (e) => {
|
|
14
|
+
const t = n.useContext(l), o = r(e.id), a = n.useCallback(
|
|
14
15
|
(i) => {
|
|
15
16
|
t != null && t.onContextMenu && t.onContextMenu.call(void 0, i, e.dataItem);
|
|
16
17
|
},
|
|
17
18
|
[t, e.dataItem]
|
|
18
19
|
);
|
|
19
|
-
return
|
|
20
|
+
return m(e.children, {
|
|
20
21
|
onContextMenu: a,
|
|
21
22
|
...o
|
|
22
23
|
});
|
|
23
24
|
};
|
|
24
25
|
export {
|
|
25
|
-
|
|
26
|
+
d as DetailCellContainer
|
|
26
27
|
};
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react"),P=require("@progress/kendo-react-data-tools"),b=require("../../GridClientWrapper.js"),i=require("../../utils/index.js");function p(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const c=p(y),I=n=>{var s;const{cellProps:e}=n,t=c.useContext(b.GridContext),r=P.useTableKeyboardNavigation(e.id),u=c.useCallback(o=>{var l;(l=t==null?void 0:t.cellClick)==null||l.call(t,o,e.dataItem,e.field)},[t,e.dataItem,e.field]),C=c.useCallback(o=>{var l;(l=t==null?void 0:t.onContextMenu)==null||l.call(void 0,o,e.dataItem,e.field)},[t,e.dataItem,e.field]),m=e.rowType==="groupFooter"||e.rowType!=="groupHeader"?{onContextMenu:C}:{},f=t.getCellPositionStyle(e.columnPosition),g=e.rowType!=="groupFooter"&&e.rowType!=="groupHeader"?{style:{...(s=n.tdProps)==null?void 0:s.style,...f}}:{},a={...r,...m,...g,onClick:u},d={onContextMenu:t.onContextMenu,onChange:t.itemChange,selectionChange:o=>{t.selectionChange({event:o,dataItem:e.dataItem,dataIndex:e.rowDataIndex,columnIndex:e.columnIndex})}};if(n.isCustom)return t.isClient||n.isClient?i.cloneReactElement(n.children,{tdProps:{...n.tdProps,...a},...d}):i.cloneReactElement(n.children,{...a});if(e.render){const o=e.rowType!=="groupHeader"?c.createElement("td",{...n.tdProps,...a},n.content):null;return e.render.call(void 0,o,{...e,...d})}return n.children&&i.cloneReactElement(n.children,{...a})};exports.GridCellContainer=I;
|
|
@@ -6,33 +6,34 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
10
|
-
import { useTableKeyboardNavigation as
|
|
11
|
-
import { GridContext as
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
import * as a from "react";
|
|
10
|
+
import { useTableKeyboardNavigation as y } from "@progress/kendo-react-data-tools";
|
|
11
|
+
import { GridContext as I } from "../../GridClientWrapper.mjs";
|
|
12
|
+
import { cloneReactElement as i } from "../../utils/index.mjs";
|
|
13
|
+
const p = (n) => {
|
|
14
|
+
var d;
|
|
15
|
+
const { cellProps: e } = n, t = a.useContext(I), s = y(e.id), u = a.useCallback(
|
|
15
16
|
(o) => {
|
|
16
|
-
var
|
|
17
|
-
(
|
|
17
|
+
var l;
|
|
18
|
+
(l = t == null ? void 0 : t.cellClick) == null || l.call(t, o, e.dataItem, e.field);
|
|
18
19
|
},
|
|
19
20
|
[t, e.dataItem, e.field]
|
|
20
|
-
),
|
|
21
|
+
), m = a.useCallback(
|
|
21
22
|
(o) => {
|
|
22
|
-
var
|
|
23
|
-
(
|
|
23
|
+
var l;
|
|
24
|
+
(l = t == null ? void 0 : t.onContextMenu) == null || l.call(void 0, o, e.dataItem, e.field);
|
|
24
25
|
},
|
|
25
26
|
[t, e.dataItem, e.field]
|
|
26
|
-
),
|
|
27
|
-
onContextMenu:
|
|
28
|
-
} : {},
|
|
29
|
-
style: { ...(
|
|
27
|
+
), C = e.rowType === "groupFooter" || e.rowType !== "groupHeader" ? {
|
|
28
|
+
onContextMenu: m
|
|
29
|
+
} : {}, f = t.getCellPositionStyle(e.columnPosition), P = e.rowType !== "groupFooter" && e.rowType !== "groupHeader" ? {
|
|
30
|
+
style: { ...(d = n.tdProps) == null ? void 0 : d.style, ...f }
|
|
30
31
|
} : {}, r = {
|
|
31
|
-
...
|
|
32
|
-
...
|
|
32
|
+
...s,
|
|
33
|
+
...C,
|
|
33
34
|
...P,
|
|
34
|
-
onClick:
|
|
35
|
-
},
|
|
35
|
+
onClick: u
|
|
36
|
+
}, c = {
|
|
36
37
|
onContextMenu: t.onContextMenu,
|
|
37
38
|
onChange: t.itemChange,
|
|
38
39
|
selectionChange: (o) => {
|
|
@@ -45,24 +46,24 @@ const h = (n) => {
|
|
|
45
46
|
}
|
|
46
47
|
};
|
|
47
48
|
if (n.isCustom)
|
|
48
|
-
return t.isClient || n.isClient ?
|
|
49
|
+
return t.isClient || n.isClient ? i(n.children, {
|
|
49
50
|
// pass down to tdProps for client templates
|
|
50
51
|
tdProps: { ...n.tdProps, ...r },
|
|
51
|
-
...
|
|
52
|
-
}) :
|
|
52
|
+
...c
|
|
53
|
+
}) : i(n.children, {
|
|
53
54
|
...r
|
|
54
55
|
});
|
|
55
56
|
if (e.render) {
|
|
56
|
-
const o = e.rowType !== "groupHeader" ? /* @__PURE__ */
|
|
57
|
+
const o = e.rowType !== "groupHeader" ? /* @__PURE__ */ a.createElement("td", { ...n.tdProps, ...r }, n.content) : null;
|
|
57
58
|
return e.render.call(void 0, o, {
|
|
58
59
|
...e,
|
|
59
|
-
...
|
|
60
|
+
...c
|
|
60
61
|
});
|
|
61
62
|
}
|
|
62
|
-
return n.children &&
|
|
63
|
+
return n.children && i(n.children, {
|
|
63
64
|
...r
|
|
64
65
|
});
|
|
65
66
|
};
|
|
66
67
|
export {
|
|
67
|
-
|
|
68
|
+
p as GridCellContainer
|
|
68
69
|
};
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),f=require("@progress/kendo-react-data-tools"),g=require("../../GridClientWrapper.js"),r=require("../../utils/index.js");function P(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const l=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,l.get?l:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const c=P(m),x=e=>{var d;const{cellProps:t}=e,n=c.useContext(g.GridContext),l=f.useTableKeyboardNavigation(t.id),s={onContextMenu:c.useCallback(o=>{n!=null&&n.onContextMenu&&n.onContextMenu.call(void 0,o,t.dataItem,t.field)},[n,t.dataItem,t.field])},u=n.getCellPositionStyle(t.columnPosition),C={style:{...(d=e.tdProps)==null?void 0:d.style,...u}},i={...l,...s,...C},a={onContextMenu:n.onContextMenu,onChange:n.itemChange,selectionChange:o=>{n.selectionChange({event:o,dataItem:t.dataItem,dataIndex:t.rowDataIndex,columnIndex:t.columnIndex})}};if(e.isCustom)return n.isClient||e.isClient?r.cloneReactElement(e.children,{tdProps:{...e.tdProps,...i},...a}):r.cloneReactElement(e.children,{...i});if(t.render){const o=c.createElement("td",{...e.tdProps,...i},e.content);return t.render.call(void 0,o,{...t,...a})}return e.children&&r.cloneReactElement(e.children,{...i})};exports.GridEditCellContainer=x;
|
|
@@ -6,55 +6,56 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
10
|
-
import { useTableKeyboardNavigation as
|
|
11
|
-
import { GridContext as
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
import * as l from "react";
|
|
10
|
+
import { useTableKeyboardNavigation as m } from "@progress/kendo-react-data-tools";
|
|
11
|
+
import { GridContext as x } from "../../GridClientWrapper.mjs";
|
|
12
|
+
import { cloneReactElement as a } from "../../utils/index.mjs";
|
|
13
|
+
const I = (t) => {
|
|
14
|
+
var d;
|
|
15
|
+
const { cellProps: e } = t, n = l.useContext(x), c = m(e.id), s = {
|
|
16
|
+
onContextMenu: l.useCallback(
|
|
17
|
+
(o) => {
|
|
18
|
+
n != null && n.onContextMenu && n.onContextMenu.call(void 0, o, e.dataItem, e.field);
|
|
18
19
|
},
|
|
19
|
-
[
|
|
20
|
+
[n, e.dataItem, e.field]
|
|
20
21
|
)
|
|
21
|
-
},
|
|
22
|
-
style: { ...(
|
|
22
|
+
}, u = n.getCellPositionStyle(e.columnPosition), C = {
|
|
23
|
+
style: { ...(d = t.tdProps) == null ? void 0 : d.style, ...u }
|
|
23
24
|
}, i = {
|
|
24
|
-
...
|
|
25
|
-
...
|
|
26
|
-
...
|
|
27
|
-
},
|
|
28
|
-
onContextMenu:
|
|
29
|
-
onChange:
|
|
30
|
-
selectionChange: (
|
|
31
|
-
|
|
32
|
-
event:
|
|
25
|
+
...c,
|
|
26
|
+
...s,
|
|
27
|
+
...C
|
|
28
|
+
}, r = {
|
|
29
|
+
onContextMenu: n.onContextMenu,
|
|
30
|
+
onChange: n.itemChange,
|
|
31
|
+
selectionChange: (o) => {
|
|
32
|
+
n.selectionChange({
|
|
33
|
+
event: o,
|
|
33
34
|
dataItem: e.dataItem,
|
|
34
35
|
dataIndex: e.rowDataIndex,
|
|
35
36
|
columnIndex: e.columnIndex
|
|
36
37
|
});
|
|
37
38
|
}
|
|
38
39
|
};
|
|
39
|
-
if (
|
|
40
|
-
return
|
|
40
|
+
if (t.isCustom)
|
|
41
|
+
return n.isClient || t.isClient ? a(t.children, {
|
|
41
42
|
// pass down to tdProps for client templates
|
|
42
|
-
tdProps: { ...
|
|
43
|
-
...
|
|
44
|
-
}) :
|
|
43
|
+
tdProps: { ...t.tdProps, ...i },
|
|
44
|
+
...r
|
|
45
|
+
}) : a(t.children, {
|
|
45
46
|
...i
|
|
46
47
|
});
|
|
47
48
|
if (e.render) {
|
|
48
|
-
const
|
|
49
|
-
return e.render.call(void 0,
|
|
49
|
+
const o = /* @__PURE__ */ l.createElement("td", { ...t.tdProps, ...i }, t.content);
|
|
50
|
+
return e.render.call(void 0, o, {
|
|
50
51
|
...e,
|
|
51
|
-
...
|
|
52
|
+
...r
|
|
52
53
|
});
|
|
53
54
|
}
|
|
54
|
-
return
|
|
55
|
+
return t.children && a(t.children, {
|
|
55
56
|
...i
|
|
56
57
|
});
|
|
57
58
|
};
|
|
58
59
|
export {
|
|
59
|
-
|
|
60
|
+
I as GridEditCellContainer
|
|
60
61
|
};
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react"),m=require("@progress/kendo-react-data-tools"),x=require("../../GridClientWrapper.js"),I=require("@progress/kendo-react-common"),c=require("../../utils/index.js");function b(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const d=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,d.get?d:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const o=b(g),h=e=>{var s;const{cellProps:t}=e,n=o.useContext(x.GridContext),d=m.useTableKeyboardNavigation(t.id),C=o.useCallback(l=>{l.isDefaultPrevented()||l.keyCode===I.Keys.enter&&(n!=null&&n.itemChange)&&(l.preventDefault(),n.itemChange({dataItem:t.dataItem,dataIndex:t.dataIndex,syntheticEvent:l,field:void 0,value:!t.expanded}),n==null||n.dispatchGroupExpand({type:m.GROUP_EXPAND_ACTION.TOGGLE,group:t.group},l))},[n,t.dataItem,t.dataIndex,t.expanded,t.group]),f=e.addKeyDownHandler?{onKeyDown:C}:{},r=o.useCallback(l=>{n!=null&&n.onContextMenu&&n.onContextMenu.call(void 0,l,t.dataItem,t.field)},[n,t.dataItem,t.field]),P=n.getCellPositionStyle(t.columnPosition),y={style:{...(s=e.tdProps)==null?void 0:s.style,...P}},a={...d,...f,onContextMenu:r,...y},i={onContextMenu:n.onContextMenu,onChange:n.itemChange,selectionChange:l=>{n.selectionChange({event:l,dataItem:t.dataItem,dataIndex:t.rowDataIndex,columnIndex:t.columnIndex})}};if(e.isCustom)return n.isClient||e.isClient?c.cloneReactElement(e.children,{tdProps:e.tdProps?{...e.tdProps,...a}:null,td2Props:e.td2Props?{...e.td2Props,onContextMenu:r}:null,...i}):c.cloneReactElement(e.children,{...a});const u=e.renderSecondCell?o.createElement("td",{...e.td2Props,onContextMenu:r}):null;if(t.render){let l=null;return e.renderFirstCell&&(e.renderSecondCell?l=o.createElement(o.Fragment,null,o.createElement("td",{...e.tdProps,...a},e.content),e.renderSecondCell&&u):l=o.createElement("td",{...e.tdProps,...a},e.content)),t.render.call(void 0,l,{...t,...i})}return o.createElement(o.Fragment,null,e.children&&c.cloneReactElement(e.children,{...a}),u)};exports.GridGroupCellContainer=h;
|
|
@@ -7,14 +7,15 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as o from "react";
|
|
10
|
-
import { useTableKeyboardNavigation as
|
|
11
|
-
import { GridContext as
|
|
12
|
-
import { Keys as
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
import { useTableKeyboardNavigation as x, GROUP_EXPAND_ACTION as I } from "@progress/kendo-react-data-tools";
|
|
11
|
+
import { GridContext as y } from "../../GridClientWrapper.mjs";
|
|
12
|
+
import { Keys as h } from "@progress/kendo-react-common";
|
|
13
|
+
import { cloneReactElement as r } from "../../utils/index.mjs";
|
|
14
|
+
const G = (e) => {
|
|
15
|
+
var u;
|
|
16
|
+
const { cellProps: n } = e, t = o.useContext(y), m = x(n.id), s = o.useCallback(
|
|
16
17
|
(l) => {
|
|
17
|
-
l.isDefaultPrevented() || l.keyCode ===
|
|
18
|
+
l.isDefaultPrevented() || l.keyCode === h.enter && (t != null && t.itemChange) && (l.preventDefault(), t.itemChange({
|
|
18
19
|
dataItem: n.dataItem,
|
|
19
20
|
dataIndex: n.dataIndex,
|
|
20
21
|
syntheticEvent: l,
|
|
@@ -22,28 +23,28 @@ const D = (e) => {
|
|
|
22
23
|
value: !n.expanded
|
|
23
24
|
}), t == null || t.dispatchGroupExpand(
|
|
24
25
|
{
|
|
25
|
-
type:
|
|
26
|
+
type: I.TOGGLE,
|
|
26
27
|
group: n.group
|
|
27
28
|
},
|
|
28
29
|
l
|
|
29
30
|
));
|
|
30
31
|
},
|
|
31
32
|
[t, n.dataItem, n.dataIndex, n.expanded, n.group]
|
|
32
|
-
),
|
|
33
|
-
onKeyDown:
|
|
33
|
+
), C = e.addKeyDownHandler ? {
|
|
34
|
+
onKeyDown: s
|
|
34
35
|
} : {}, d = o.useCallback(
|
|
35
36
|
(l) => {
|
|
36
37
|
t != null && t.onContextMenu && t.onContextMenu.call(void 0, l, n.dataItem, n.field);
|
|
37
38
|
},
|
|
38
39
|
[t, n.dataItem, n.field]
|
|
39
|
-
),
|
|
40
|
-
style: { ...(
|
|
40
|
+
), P = t.getCellPositionStyle(n.columnPosition), f = {
|
|
41
|
+
style: { ...(u = e.tdProps) == null ? void 0 : u.style, ...P }
|
|
41
42
|
}, a = {
|
|
42
|
-
...
|
|
43
|
-
...
|
|
43
|
+
...m,
|
|
44
|
+
...C,
|
|
44
45
|
onContextMenu: d,
|
|
45
|
-
...
|
|
46
|
-
},
|
|
46
|
+
...f
|
|
47
|
+
}, i = {
|
|
47
48
|
onContextMenu: t.onContextMenu,
|
|
48
49
|
onChange: t.itemChange,
|
|
49
50
|
selectionChange: (l) => {
|
|
@@ -56,7 +57,7 @@ const D = (e) => {
|
|
|
56
57
|
}
|
|
57
58
|
};
|
|
58
59
|
if (e.isCustom)
|
|
59
|
-
return t.isClient || e.isClient ?
|
|
60
|
+
return t.isClient || e.isClient ? r(e.children, {
|
|
60
61
|
// pass down to tdProps for client templates
|
|
61
62
|
tdProps: e.tdProps ? {
|
|
62
63
|
...e.tdProps,
|
|
@@ -66,22 +67,22 @@ const D = (e) => {
|
|
|
66
67
|
...e.td2Props,
|
|
67
68
|
onContextMenu: d
|
|
68
69
|
} : null,
|
|
69
|
-
...
|
|
70
|
-
}) :
|
|
70
|
+
...i
|
|
71
|
+
}) : r(e.children, {
|
|
71
72
|
...a
|
|
72
73
|
});
|
|
73
|
-
const
|
|
74
|
+
const c = e.renderSecondCell ? /* @__PURE__ */ o.createElement("td", { ...e.td2Props, onContextMenu: d }) : null;
|
|
74
75
|
if (n.render) {
|
|
75
76
|
let l = null;
|
|
76
|
-
return e.renderFirstCell && (e.renderSecondCell ? l = /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("td", { ...e.tdProps, ...a }, e.content), e.renderSecondCell &&
|
|
77
|
+
return e.renderFirstCell && (e.renderSecondCell ? l = /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("td", { ...e.tdProps, ...a }, e.content), e.renderSecondCell && c) : l = /* @__PURE__ */ o.createElement("td", { ...e.tdProps, ...a }, e.content)), n.render.call(void 0, l, {
|
|
77
78
|
...n,
|
|
78
|
-
...
|
|
79
|
+
...i
|
|
79
80
|
});
|
|
80
81
|
}
|
|
81
|
-
return /* @__PURE__ */ o.createElement(o.Fragment, null, e.children &&
|
|
82
|
+
return /* @__PURE__ */ o.createElement(o.Fragment, null, e.children && r(e.children, {
|
|
82
83
|
...a
|
|
83
|
-
}),
|
|
84
|
+
}), c);
|
|
84
85
|
};
|
|
85
86
|
export {
|
|
86
|
-
|
|
87
|
+
G as GridGroupCellContainer
|
|
87
88
|
};
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),f=require("@progress/kendo-react-data-tools"),C=require("../../GridClientWrapper.js"),g=require("@progress/kendo-react-common"),c=require("../../utils/index.js");function y(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const i=y(m),h=t=>{const{cellProps:e}=t,n=i.useContext(C.GridContext),r=f.useTableKeyboardNavigation(e.id),d=t.expanded,u=i.useCallback(a=>{a.isDefaultPrevented()||a.keyCode===g.Keys.enter&&(n!=null&&n.itemChange)&&(a.preventDefault(),n.itemChange({dataItem:e.dataItem,dataIndex:e.dataIndex,syntheticEvent:a,field:e.field,value:!d}))},[e.dataItem,e.dataIndex,e.field,n,d]),s=e.rowType!=="groupHeader"&&e.rowType!=="groupFooter"?{onKeyDown:u}:{},o={...r,...s},l={onContextMenu:n.onContextMenu,onChange:n.itemChange,selectionChange:a=>{n.selectionChange({event:a,dataItem:e.dataItem,dataIndex:e.rowDataIndex,columnIndex:e.columnIndex})}};if(t.isCustom)return n.isClient||t.isClient?c.cloneReactElement(t.children,{tdProps:{...t.tdProps,...o},...l}):c.cloneReactElement(t.children,{...o});if(e.render){const a=e.rowType!=="groupHeader"?i.createElement("td",{...t.tdProps,...o},t.content):null;return e.render.call(void 0,a,{...e,...l})}return t.children&&c.cloneReactElement(t.children,{...o})};exports.GridHierarchyCellContainer=h;
|
|
@@ -6,32 +6,33 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
10
|
-
import { useTableKeyboardNavigation as
|
|
11
|
-
import { GridContext as
|
|
12
|
-
import { Keys as
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
import * as r from "react";
|
|
10
|
+
import { useTableKeyboardNavigation as s } from "@progress/kendo-react-data-tools";
|
|
11
|
+
import { GridContext as C } from "../../GridClientWrapper.mjs";
|
|
12
|
+
import { Keys as f } from "@progress/kendo-react-common";
|
|
13
|
+
import { cloneReactElement as d } from "../../utils/index.mjs";
|
|
14
|
+
const I = (t) => {
|
|
15
|
+
const { cellProps: e } = t, n = r.useContext(C), c = s(e.id), i = t.expanded, m = r.useCallback(
|
|
15
16
|
(o) => {
|
|
16
|
-
o.isDefaultPrevented() || o.keyCode ===
|
|
17
|
+
o.isDefaultPrevented() || o.keyCode === f.enter && (n != null && n.itemChange) && (o.preventDefault(), n.itemChange({
|
|
17
18
|
dataItem: e.dataItem,
|
|
18
19
|
dataIndex: e.dataIndex,
|
|
19
20
|
syntheticEvent: o,
|
|
20
21
|
field: e.field,
|
|
21
|
-
value: !
|
|
22
|
+
value: !i
|
|
22
23
|
}));
|
|
23
24
|
},
|
|
24
|
-
[e.dataItem, e.dataIndex, e.field,
|
|
25
|
-
),
|
|
26
|
-
onKeyDown:
|
|
27
|
-
} : {},
|
|
28
|
-
...
|
|
29
|
-
...
|
|
30
|
-
},
|
|
31
|
-
onContextMenu:
|
|
32
|
-
onChange:
|
|
25
|
+
[e.dataItem, e.dataIndex, e.field, n, i]
|
|
26
|
+
), u = e.rowType !== "groupHeader" && e.rowType !== "groupFooter" ? {
|
|
27
|
+
onKeyDown: m
|
|
28
|
+
} : {}, a = {
|
|
29
|
+
...c,
|
|
30
|
+
...u
|
|
31
|
+
}, l = {
|
|
32
|
+
onContextMenu: n.onContextMenu,
|
|
33
|
+
onChange: n.itemChange,
|
|
33
34
|
selectionChange: (o) => {
|
|
34
|
-
|
|
35
|
+
n.selectionChange({
|
|
35
36
|
event: o,
|
|
36
37
|
dataItem: e.dataItem,
|
|
37
38
|
dataIndex: e.rowDataIndex,
|
|
@@ -39,25 +40,25 @@ const h = (n) => {
|
|
|
39
40
|
});
|
|
40
41
|
}
|
|
41
42
|
};
|
|
42
|
-
if (
|
|
43
|
-
return
|
|
43
|
+
if (t.isCustom)
|
|
44
|
+
return n.isClient || t.isClient ? d(t.children, {
|
|
44
45
|
// pass down to tdProps for client templates
|
|
45
|
-
tdProps: { ...
|
|
46
|
-
...
|
|
47
|
-
}) :
|
|
48
|
-
...
|
|
46
|
+
tdProps: { ...t.tdProps, ...a },
|
|
47
|
+
...l
|
|
48
|
+
}) : d(t.children, {
|
|
49
|
+
...a
|
|
49
50
|
});
|
|
50
51
|
if (e.render) {
|
|
51
|
-
const o = e.rowType !== "groupHeader" ? /* @__PURE__ */
|
|
52
|
+
const o = e.rowType !== "groupHeader" ? /* @__PURE__ */ r.createElement("td", { ...t.tdProps, ...a }, t.content) : null;
|
|
52
53
|
return e.render.call(void 0, o, {
|
|
53
54
|
...e,
|
|
54
|
-
...
|
|
55
|
+
...l
|
|
55
56
|
});
|
|
56
57
|
}
|
|
57
|
-
return
|
|
58
|
-
...
|
|
58
|
+
return t.children && d(t.children, {
|
|
59
|
+
...a
|
|
59
60
|
});
|
|
60
61
|
};
|
|
61
62
|
export {
|
|
62
|
-
|
|
63
|
+
I as GridHierarchyCellContainer
|
|
63
64
|
};
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),C=require("@progress/kendo-react-intl"),m=require("@progress/kendo-react-data-tools"),w=require("../../GridClientWrapper.js"),n=require("../../messages/index.js"),q=require("../../utils/index.js"),x=o=>{const{cellProps:t,rowReorderable:a}=o,{id:i,dataItem:c}=t,l=C.useLocalization(),e=r.useContext(w.GridContext),s=m.useTableKeyboardNavigation(i),d=a,u=l.toLanguageString(n.gridRowReorderAriaLabel,n.messages[n.gridRowReorderAriaLabel]),R=()=>d?e.activeDragRowDataItemRef.current=c:null,g=r.useCallback(b=>{e!=null&&e.onContextMenu&&e.onContextMenu.call(void 0,b,t.dataItem,t.field)},[e,t.dataItem,t.field]);return o.children&&q.cloneReactElement(o.children,{"aria-label":u,...s,onMouseDown:R,onContextMenu:g})};exports.GridRowReorderCellContainer=x;
|
|
@@ -6,25 +6,26 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import
|
|
10
|
-
import { useLocalization as
|
|
11
|
-
import { useTableKeyboardNavigation as
|
|
9
|
+
import n from "react";
|
|
10
|
+
import { useLocalization as g } from "@progress/kendo-react-intl";
|
|
11
|
+
import { useTableKeyboardNavigation as b } from "@progress/kendo-react-data-tools";
|
|
12
12
|
import { GridContext as C } from "../../GridClientWrapper.mjs";
|
|
13
13
|
import { gridRowReorderAriaLabel as a, messages as w } from "../../messages/index.mjs";
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
import { cloneReactElement as x } from "../../utils/index.mjs";
|
|
15
|
+
const h = (t) => {
|
|
16
|
+
const { cellProps: o, rowReorderable: r } = t, { id: i, dataItem: l } = o, c = g(), e = n.useContext(C), s = b(i), m = r, d = c.toLanguageString(a, w[a]), u = () => m ? e.activeDragRowDataItemRef.current = l : null, f = n.useCallback(
|
|
17
|
+
(R) => {
|
|
18
|
+
e != null && e.onContextMenu && e.onContextMenu.call(void 0, R, o.dataItem, o.field);
|
|
18
19
|
},
|
|
19
|
-
[
|
|
20
|
+
[e, o.dataItem, o.field]
|
|
20
21
|
);
|
|
21
|
-
return
|
|
22
|
-
"aria-label":
|
|
23
|
-
...
|
|
24
|
-
onMouseDown:
|
|
25
|
-
onContextMenu:
|
|
22
|
+
return t.children && x(t.children, {
|
|
23
|
+
"aria-label": d,
|
|
24
|
+
...s,
|
|
25
|
+
onMouseDown: u,
|
|
26
|
+
onContextMenu: f
|
|
26
27
|
});
|
|
27
28
|
};
|
|
28
29
|
export {
|
|
29
|
-
|
|
30
|
+
h as GridRowReorderCellContainer
|
|
30
31
|
};
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),f=require("@progress/kendo-react-data-tools"),g=require("../../GridClientWrapper.js"),c=require("../../utils/index.js");function P(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const l=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,l.get?l:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const i=P(m),x=e=>{var d;const{cellProps:t}=e,n=i.useContext(g.GridContext),l=f.useTableKeyboardNavigation(t.id),s={onContextMenu:i.useCallback(o=>{n!=null&&n.onContextMenu&&n.onContextMenu.call(void 0,o,t.dataItem,t.field)},[n,t.dataItem,t.field])},u=n.getCellPositionStyle(t.columnPosition),C={style:{...(d=e.tdProps)==null?void 0:d.style,...u}},r={...l,...s,...C},a={onContextMenu:n.onContextMenu,onChange:n.itemChange,selectionChange:o=>{n.selectionChange({event:o,dataItem:t.dataItem,dataIndex:t.rowDataIndex,columnIndex:t.columnIndex})}};if(e.isCustom)return n.isClient||e.isClient?c.cloneReactElement(e.children,{tdProps:{...e.tdProps,...r},...a}):c.cloneReactElement(e.children,{...r});if(t.render){const o=t.rowType!=="groupHeader"?i.createElement("td",{...e.tdProps,...r},e.content):null;return t.render.call(void 0,o,{...t,...a})}return e.children&&c.cloneReactElement(e.children,{...r})};exports.GridSelectionCellContainer=x;
|