@progress/kendo-react-treelist 15.2.0-develop.1 → 15.2.0-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/TreeList.d.ts +10 -121
- package/TreeList.js +1 -1
- package/TreeList.mjs +840 -526
- package/TreeListNoRecords.d.ts +8 -6
- package/TreeListNoRecords.js +1 -1
- package/TreeListNoRecords.mjs +15 -12
- package/cells/EditCells/TreeListBooleanEditor.js +1 -1
- package/cells/EditCells/TreeListBooleanEditor.mjs +5 -5
- package/cells/EditCells/TreeListDateEditor.js +1 -1
- package/cells/EditCells/TreeListDateEditor.mjs +9 -9
- package/cells/EditCells/TreeListNumericEditor.js +1 -1
- package/cells/EditCells/TreeListNumericEditor.mjs +9 -9
- package/cells/EditCells/TreeListTextEditor.js +1 -1
- package/cells/EditCells/TreeListTextEditor.mjs +4 -4
- package/cells/TreeListCell.js +1 -1
- package/cells/TreeListCell.mjs +10 -10
- package/cells/TreeListSelectionCell.js +1 -1
- package/cells/TreeListSelectionCell.mjs +1 -1
- package/dist/cdn/js/kendo-react-treelist.js +1 -1
- package/header/TreeListHeaderSelectionCell.d.ts +10 -6
- package/header/TreeListHeaderSelectionCell.js +1 -1
- package/header/TreeListHeaderSelectionCell.mjs +16 -14
- package/index.d.mts +5 -7
- package/index.d.ts +5 -7
- package/index.js +1 -1
- package/index.mjs +49 -50
- package/interfaces/events.d.ts +6 -6
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +9 -9
- package/rows/TreeListDraggableRow.d.ts +7 -26
- package/rows/TreeListDraggableRow.js +1 -1
- package/rows/TreeListDraggableRow.mjs +88 -77
- package/rows/TreeListRow.js +1 -1
- package/rows/TreeListRow.mjs +1 -1
- package/TreeListMcpWrapper.d.ts +0 -17
- package/TreeListMcpWrapper.js +0 -8
- package/TreeListMcpWrapper.mjs +0 -18
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import * as
|
|
8
|
+
import * as e from "react";
|
|
9
9
|
import * as h from "react-dom";
|
|
10
|
-
import { canUseDOM as
|
|
11
|
-
import { TreeListRow as
|
|
12
|
-
import { plusIcon as
|
|
13
|
-
const
|
|
14
|
-
/* @__PURE__ */
|
|
10
|
+
import { canUseDOM as b, Draggable as O, IconWrap as S, classNames as T } from "@progress/kendo-react-common";
|
|
11
|
+
import { TreeListRow as L } from "./TreeListRow.mjs";
|
|
12
|
+
import { plusIcon as H, cancelIcon as F } from "@progress/kendo-svg-icons";
|
|
13
|
+
const M = (t) => t.visible && b ? h.createPortal(
|
|
14
|
+
/* @__PURE__ */ e.createElement(
|
|
15
15
|
"div",
|
|
16
16
|
{
|
|
17
17
|
className: "k-header k-drag-clue",
|
|
@@ -20,99 +20,110 @@ const b = (e) => e.visible && g ? h.createPortal(
|
|
|
20
20
|
position: "absolute",
|
|
21
21
|
zIndex: 2e4,
|
|
22
22
|
padding: "8px 12px",
|
|
23
|
-
top:
|
|
24
|
-
left:
|
|
23
|
+
top: t.top + "px",
|
|
24
|
+
left: t.left + "px"
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
|
|
27
|
+
/* @__PURE__ */ e.createElement(
|
|
28
|
+
S,
|
|
29
29
|
{
|
|
30
|
-
className:
|
|
31
|
-
name:
|
|
32
|
-
icon:
|
|
30
|
+
className: T("k-drag-status"),
|
|
31
|
+
name: t.allowDrop ? "plus" : "cancel",
|
|
32
|
+
icon: t.allowDrop ? H : F
|
|
33
33
|
}
|
|
34
34
|
),
|
|
35
|
-
|
|
35
|
+
t.text
|
|
36
36
|
),
|
|
37
37
|
document.body
|
|
38
38
|
) : null;
|
|
39
|
-
function
|
|
40
|
-
if (!
|
|
39
|
+
function X(t, i, a) {
|
|
40
|
+
if (!t.originalEvent)
|
|
41
41
|
return -1;
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
44
|
-
const
|
|
45
|
-
for (let n = 0; n <
|
|
46
|
-
if (
|
|
42
|
+
const u = x(t, "tr", a);
|
|
43
|
+
if (u) {
|
|
44
|
+
const s = i ? i.childNodes : [];
|
|
45
|
+
for (let n = 0; n < s.length; n++)
|
|
46
|
+
if (s[n] === u)
|
|
47
47
|
return n;
|
|
48
48
|
}
|
|
49
49
|
return -1;
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
const
|
|
53
|
-
return
|
|
51
|
+
function x(t, i, a) {
|
|
52
|
+
const u = a ? a.elementFromPoint(t.clientX, t.clientY) : null;
|
|
53
|
+
return i && u ? u.closest(i) : null;
|
|
54
54
|
}
|
|
55
|
-
const
|
|
55
|
+
const w = "k-grid", E = {
|
|
56
56
|
visible: !1,
|
|
57
57
|
top: 0,
|
|
58
58
|
left: 0,
|
|
59
59
|
text: "",
|
|
60
60
|
allowDrop: !1
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
61
|
+
}, Y = e.forwardRef((t, i) => {
|
|
62
|
+
const [a, u] = e.useState({ ...E }), s = e.useRef(null), n = e.useRef(null), m = e.useRef(null), c = e.useRef(null), R = e.useRef(a);
|
|
63
|
+
R.current = a;
|
|
64
|
+
const o = e.useRef(t);
|
|
65
|
+
o.current = t;
|
|
66
|
+
const D = e.useRef(null);
|
|
67
|
+
e.useImperativeHandle(
|
|
68
|
+
D,
|
|
69
|
+
() => ({
|
|
70
|
+
props: t
|
|
71
|
+
})
|
|
72
|
+
), e.useImperativeHandle(i, () => D.current), e.useEffect(() => () => {
|
|
73
|
+
c.current && (c.current.style.userSelect = "", c.current = null);
|
|
74
|
+
}, []);
|
|
75
|
+
const I = e.useCallback(() => {
|
|
76
|
+
var r;
|
|
77
|
+
n.current = o.current.level;
|
|
78
|
+
const f = (r = s.current) == null ? void 0 : r.element;
|
|
79
|
+
f && (c.current = f.closest("." + w), c.current && (c.current.style.userSelect = "none"));
|
|
80
|
+
}, [s]), y = e.useCallback(
|
|
81
|
+
(f) => {
|
|
82
|
+
var p;
|
|
83
|
+
if (!b)
|
|
68
84
|
return;
|
|
69
|
-
const r =
|
|
70
|
-
if (!
|
|
85
|
+
const r = (p = s.current) == null ? void 0 : p.element, g = (r == null ? void 0 : r.ownerDocument) || document;
|
|
86
|
+
if (!g)
|
|
71
87
|
return;
|
|
72
|
-
const
|
|
73
|
-
if (r &&
|
|
74
|
-
!
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
draggedOver: l,
|
|
90
|
-
draggedItem: this.props.dataItem
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
}, this.onRelease = (s) => {
|
|
94
|
-
const r = s.event;
|
|
95
|
-
if (this.dragged) {
|
|
96
|
-
const o = [...this.dragged], t = this.draggedOver && [...this.draggedOver], n = this.state.clueProps.allowDrop;
|
|
97
|
-
this.dragged = null, this.draggedOver = null, this.setState({ clueProps: { ...i } });
|
|
98
|
-
const l = this.props.dataItem;
|
|
99
|
-
n && this.props.onDrop && this.props.onDrop.call(void 0, {
|
|
100
|
-
nativeEvent: r.originalEvent,
|
|
101
|
-
dragged: o,
|
|
102
|
-
draggedOver: t,
|
|
103
|
-
draggedItem: l
|
|
88
|
+
const l = f.event, d = n.current;
|
|
89
|
+
if (r && d) {
|
|
90
|
+
!l.isTouch && l.type !== "scroll" && l.originalEvent.preventDefault();
|
|
91
|
+
const v = o.current.levels[X(l, r.parentNode, g)];
|
|
92
|
+
m.current = v;
|
|
93
|
+
const C = v ? !d.every((N, P) => N === v[P]) : !!x(l, w, g);
|
|
94
|
+
u({
|
|
95
|
+
visible: !0,
|
|
96
|
+
top: l.pageY + 10,
|
|
97
|
+
left: l.pageX,
|
|
98
|
+
text: r.innerText,
|
|
99
|
+
allowDrop: C
|
|
100
|
+
}), o.current.onDrag && o.current.onDrag({
|
|
101
|
+
nativeEvent: l.originalEvent,
|
|
102
|
+
dragged: d,
|
|
103
|
+
draggedOver: v,
|
|
104
|
+
draggedItem: o.current.dataItem
|
|
104
105
|
});
|
|
105
106
|
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
107
|
+
},
|
|
108
|
+
[s]
|
|
109
|
+
), k = e.useCallback((f) => {
|
|
110
|
+
c.current && (c.current.style.userSelect = "", c.current = null);
|
|
111
|
+
const r = f.event;
|
|
112
|
+
if (n.current) {
|
|
113
|
+
const g = [...n.current], l = m.current && [...m.current], d = R.current.allowDrop;
|
|
114
|
+
n.current = null, m.current = null, u({ ...E });
|
|
115
|
+
const p = o.current.dataItem;
|
|
116
|
+
d && o.current.onDrop && o.current.onDrop({
|
|
117
|
+
nativeEvent: r.originalEvent,
|
|
118
|
+
dragged: g,
|
|
119
|
+
draggedOver: l,
|
|
120
|
+
draggedItem: p
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
}, []);
|
|
124
|
+
return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(O, { ref: s, onPress: I, onDrag: y, onRelease: k }, /* @__PURE__ */ e.createElement(L, { ...t })), /* @__PURE__ */ e.createElement(M, { ...a }));
|
|
125
|
+
});
|
|
126
|
+
Y.displayName = "KendoReactTreeListDraggableRow";
|
|
116
127
|
export {
|
|
117
|
-
|
|
128
|
+
Y as TreeListDraggableRow
|
|
118
129
|
};
|
package/rows/TreeListRow.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 f=require("react"),b=require("@progress/kendo-react-common"),g=require("../constants/index.js");function k(e){const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),b=require("@progress/kendo-react-common"),g=require("../constants/index.js");function k(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const a=k(f),i=a.forwardRef((e,r)=>{const{isSelected:t,rowHeight:n,isAltRow:l,expanded:c,ariaRowIndex:s,level:d,ariaSetSize:u,ariaPosInSet:m}=e,w=b.classNames("k-table-row","k-master-row",{"k-selected":t,"k-table-alt-row":l}),R=a.useMemo(()=>n!==void 0?{height:n+"px"}:void 0,[n]),o=a.createElement("tr",{onClick:e.onClick,onDoubleClick:e.onDoubleClick,onContextMenu:e.onContextMenu,className:w,style:R,ref:r,"aria-expanded":c,role:"row","aria-rowindex":s,"aria-level":d.length,"aria-posinset":m,"aria-setsize":u,[g.TREELIST_ROW_INDEX_ATTRIBUTE]:e.rowIndex},e.children);return a.createElement(a.Fragment,null,e.render?e.render(o,e):o)});i.displayName="KendoReactTreeListRow";exports.TreeListRow=i;
|
package/rows/TreeListRow.mjs
CHANGED
|
@@ -34,7 +34,7 @@ const u = t.forwardRef((e, o) => {
|
|
|
34
34
|
},
|
|
35
35
|
e.children
|
|
36
36
|
);
|
|
37
|
-
return /* @__PURE__ */ t.createElement(t.Fragment, null, e.render ? e.render
|
|
37
|
+
return /* @__PURE__ */ t.createElement(t.Fragment, null, e.render ? e.render(n, e) : n);
|
|
38
38
|
});
|
|
39
39
|
u.displayName = "KendoReactTreeListRow";
|
|
40
40
|
export {
|
package/TreeListMcpWrapper.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
-
*-------------------------------------------------------------------------------------------
|
|
7
|
-
*/
|
|
8
|
-
import { TreeList as TreeListClassComponent } from './TreeList.js';
|
|
9
|
-
import { TreeListProps } from './interfaces/TreeListProps';
|
|
10
|
-
import * as React from 'react';
|
|
11
|
-
/**
|
|
12
|
-
* Functional wrapper that adds Web MCP tool registration
|
|
13
|
-
* around the class-based TreeList component.
|
|
14
|
-
*
|
|
15
|
-
* @hidden
|
|
16
|
-
*/
|
|
17
|
-
export declare const TreeListWrapper: React.ForwardRefExoticComponent<TreeListProps & React.RefAttributes<TreeListClassComponent>>;
|
package/TreeListMcpWrapper.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
-
*-------------------------------------------------------------------------------------------
|
|
7
|
-
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),s=require("./TreeList.js"),c=require("@progress/kendo-react-common");function u(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const o=u(i),a=o.forwardRef((e,r)=>{const[t,n]=c.useMergedRef(r);return c.useWebMcpRegister("treelist",t,e,e.webMcp),o.createElement(s.TreeList,{...e,ref:n})});a.displayName="KendoReactTreeList";exports.TreeListWrapper=a;
|
package/TreeListMcpWrapper.mjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
-
*-------------------------------------------------------------------------------------------
|
|
7
|
-
*/
|
|
8
|
-
import * as r from "react";
|
|
9
|
-
import { TreeList as m } from "./TreeList.mjs";
|
|
10
|
-
import { useMergedRef as o, useWebMcpRegister as s } from "@progress/kendo-react-common";
|
|
11
|
-
const a = r.forwardRef((e, t) => {
|
|
12
|
-
const [i, f] = o(t);
|
|
13
|
-
return s("treelist", i, e, e.webMcp), /* @__PURE__ */ r.createElement(m, { ...e, ref: f });
|
|
14
|
-
});
|
|
15
|
-
a.displayName = "KendoReactTreeList";
|
|
16
|
-
export {
|
|
17
|
-
a as TreeListWrapper
|
|
18
|
-
};
|