@progress/kendo-react-data-tools 16.2.0-develop.8 → 16.2.0
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/EULA.pdf +0 -0
- package/EULA.rtf +2730 -0
- package/EULA.txt +292 -0
- package/dist/cdn/js/kendo-react-datatools.js +1 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +10 -15
- package/selection/TableSelection.js +1 -1
- package/selection/TableSelection.mjs +61 -57
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-data-tools",
|
|
3
|
-
"version": "16.2.0
|
|
3
|
+
"version": "16.2.0",
|
|
4
4
|
"description": "Includes React Pager & React Filter component, an intuitive interface to create complex filter descriptions. KendoReact Data Tools package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
"@progress/kendo-data-query": "^1.7.2",
|
|
29
29
|
"@progress/kendo-drawing": "^1.25.5",
|
|
30
30
|
"@progress/kendo-licensing": "^1.7.2",
|
|
31
|
-
"@progress/kendo-react-animation": "16.2.0
|
|
32
|
-
"@progress/kendo-react-buttons": "16.2.0
|
|
33
|
-
"@progress/kendo-react-common": "16.2.0
|
|
34
|
-
"@progress/kendo-react-dateinputs": "16.2.0
|
|
35
|
-
"@progress/kendo-react-dropdowns": "16.2.0
|
|
36
|
-
"@progress/kendo-react-inputs": "16.2.0
|
|
37
|
-
"@progress/kendo-react-intl": "16.2.0
|
|
38
|
-
"@progress/kendo-react-popup": "16.2.0
|
|
31
|
+
"@progress/kendo-react-animation": "16.2.0",
|
|
32
|
+
"@progress/kendo-react-buttons": "16.2.0",
|
|
33
|
+
"@progress/kendo-react-common": "16.2.0",
|
|
34
|
+
"@progress/kendo-react-dateinputs": "16.2.0",
|
|
35
|
+
"@progress/kendo-react-dropdowns": "16.2.0",
|
|
36
|
+
"@progress/kendo-react-inputs": "16.2.0",
|
|
37
|
+
"@progress/kendo-react-intl": "16.2.0",
|
|
38
|
+
"@progress/kendo-react-popup": "16.2.0",
|
|
39
39
|
"@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
|
|
40
40
|
"react": "^18.0.0 || ^19.0.0",
|
|
41
41
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"package": {
|
|
66
66
|
"productName": "KendoReact",
|
|
67
67
|
"productCode": "KENDOUIREACT",
|
|
68
|
-
"publishDate":
|
|
68
|
+
"publishDate": 1791388988,
|
|
69
69
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
70
70
|
}
|
|
71
71
|
},
|
|
@@ -75,10 +75,5 @@
|
|
|
75
75
|
},
|
|
76
76
|
"publishConfig": {
|
|
77
77
|
"access": "public"
|
|
78
|
-
},
|
|
79
|
-
"peerDependenciesMeta": {
|
|
80
|
-
"@progress/kendo-svg-icons": {
|
|
81
|
-
"optional": true
|
|
82
|
-
}
|
|
83
78
|
}
|
|
84
79
|
}
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const G=require("react"),U=require("react-dom"),X=require("@progress/kendo-react-common"),n=require("./utils.js");function H(l){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const c in l)if(c!=="default"){const
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const G=require("react"),U=require("react-dom"),X=require("@progress/kendo-react-common"),n=require("./utils.js");function H(l){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const c in l)if(c!=="default"){const I=Object.getOwnPropertyDescriptor(l,c);Object.defineProperty(s,c,I.get?I:{enumerable:!0,get:()=>l[c]})}}return s.default=l,Object.freeze(s)}const t=H(G),V=H(U),k=5,B=300,J=l=>{var Y;const{onRelease:s,childRef:c}=l,{enabled:I,drag:T,mode:f,cell:p}=n.getSelectionOptions(l.selectable),i=t.useRef(null),C=t.useRef(null),x=t.useRef({clientX:0,clientY:0,pressedElement:null}),[w,S]=t.useState(null),N=t.useRef(void 0),g=t.useRef(!1),h=t.useRef(!1),E=t.useCallback(()=>{S(null),g.current=!1,x.current={clientX:0,clientY:0,pressedElement:null}},[]),q=t.useCallback(y=>{var u;const{event:e}=y;if(h.current=n.isInNonSelectable(e.originalEvent.target),h.current||!i.current)return;N.current=n.relativeContextElement(i.current.element);const r=(u=i.current.element)==null?void 0:u.ownerDocument;if(!r)return;e.originalEvent.stopImmediatePropagation();const o=r.elementFromPoint(e.clientX,e.clientY);x.current={clientY:e.clientY,clientX:e.clientX,pressedElement:o}},[]),j=t.useCallback(y=>{const{event:e}=y,{clientX:r,clientY:o}=x.current;if(h.current)return;const u=Math.abs(r-e.clientX),d=Math.abs(o-e.clientY);if((u>k||d>k)&&(g.current=!0),!(!T||f==="single")&&(e.originalEvent.stopImmediatePropagation(),g.current)){const R=n.getOffset(N.current);S({top:Math.min(o,e.clientY)-R.top,left:Math.min(r,e.clientX)-R.left,width:Math.abs(e.clientX-r),height:Math.abs(e.clientY-o)})}},[S,T,f]),F=t.useCallback(y=>{var R;const{event:e}=y,{clientX:r,clientY:o,pressedElement:u}=x.current;if(h.current||!i.current)return;const d=(R=i.current.element)==null?void 0:R.ownerDocument;if(d){if(g.current&&!T){E();return}e.originalEvent.stopImmediatePropagation();try{if(g.current){const a=C.current;if(!a)return;a.style.visibility="hidden";const v=u||d.elementFromPoint(r,o),b=d.elementFromPoint(e.clientX,e.clientY);if(a.style.visibility="",!v||!b)return;const m=n.closestTagName(v,"TD"),D=n.closestTagName(m,"TR"),_=n.closestTagName(b,"TD"),z=n.closestTagName(_,"TR"),M=n.getColumnIndex(m),O=n.getRowIndex(D),K=n.getColumnIndex(_),P=n.getRowIndex(z);M!==void 0&&O!==void 0&&K!==void 0&&P!==void 0&&s({nativeEvent:e.originalEvent,startRowIndex:Math.min(O,P),startColIndex:Math.min(M,K),endRowIndex:Math.max(O,P),endColIndex:Math.max(M,K),altKey:e.altKey,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,mode:f,cell:p,isDrag:!0})}else{const a=d.elementFromPoint(r,o);if(!a)return;const v=n.closestTagName(a,"TD"),b=n.closestTagName(a,"TR"),m=n.getColumnIndex(v),D=n.getRowIndex(b);v&&b&&D!==void 0&&m!==void 0&&s({nativeEvent:e.originalEvent,startRowIndex:D,startColIndex:m,endRowIndex:D,endColIndex:m,altKey:e.altKey,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,mode:f,cell:p,isDrag:!1})}}finally{E()}}},[T,f,p,s,E]),L=t.useCallback(()=>{E()},[E]),A=X.useDocument(C);return I?t.createElement(t.Fragment,null,t.createElement(X.Draggable,{onPress:q,onDrag:j,onRelease:F,onDragEnd:L,ref:i,autoTouchAction:!1,pressHoldDelay:B,childRef:c},l.children),w&&V.createPortal(t.createElement("div",{ref:C,style:{...w,position:"fixed"},className:"k-marquee k-marquee-color"}),(Y=A())==null?void 0:Y.body)):t.cloneElement(t.Children.only(l.children),{ref:c})};exports.TableSelection=J;
|
|
@@ -9,114 +9,118 @@
|
|
|
9
9
|
import * as t from "react";
|
|
10
10
|
import * as V from "react-dom";
|
|
11
11
|
import { useDocument as j, Draggable as z } from "@progress/kendo-react-common";
|
|
12
|
-
import { getSelectionOptions as B, isInNonSelectable as J, relativeContextElement as Q, getOffset as W, closestTagName as i, getColumnIndex as
|
|
13
|
-
const _ = 5, Z = 300, te = (
|
|
12
|
+
import { getSelectionOptions as B, isInNonSelectable as J, relativeContextElement as Q, getOffset as W, closestTagName as i, getColumnIndex as S, getRowIndex as Y } from "./utils.mjs";
|
|
13
|
+
const _ = 5, Z = 300, te = (v) => {
|
|
14
14
|
var H;
|
|
15
|
-
const { onRelease:
|
|
15
|
+
const { onRelease: I, childRef: w } = v, {
|
|
16
16
|
enabled: N,
|
|
17
|
-
drag:
|
|
17
|
+
drag: D,
|
|
18
18
|
mode: m,
|
|
19
|
-
cell:
|
|
20
|
-
} = B(
|
|
21
|
-
|
|
22
|
-
}, []), F = t.useCallback((
|
|
19
|
+
cell: b
|
|
20
|
+
} = B(v.selectable), o = t.useRef(null), p = t.useRef(null), h = t.useRef({ clientX: 0, clientY: 0, pressedElement: null }), [X, C] = t.useState(null), O = t.useRef(void 0), u = t.useRef(!1), x = t.useRef(!1), d = t.useCallback(() => {
|
|
21
|
+
C(null), u.current = !1, h.current = { clientX: 0, clientY: 0, pressedElement: null };
|
|
22
|
+
}, []), F = t.useCallback((f) => {
|
|
23
23
|
var s;
|
|
24
|
-
const { event: e } =
|
|
25
|
-
if (
|
|
24
|
+
const { event: e } = f;
|
|
25
|
+
if (x.current = J(e.originalEvent.target), x.current || !o.current)
|
|
26
26
|
return;
|
|
27
27
|
O.current = Q(o.current.element);
|
|
28
28
|
const n = (s = o.current.element) == null ? void 0 : s.ownerDocument;
|
|
29
29
|
if (!n)
|
|
30
30
|
return;
|
|
31
31
|
e.originalEvent.stopImmediatePropagation();
|
|
32
|
-
const
|
|
33
|
-
|
|
32
|
+
const r = n.elementFromPoint(e.clientX, e.clientY);
|
|
33
|
+
h.current = {
|
|
34
34
|
clientY: e.clientY,
|
|
35
35
|
clientX: e.clientX,
|
|
36
|
-
pressedElement:
|
|
36
|
+
pressedElement: r
|
|
37
37
|
};
|
|
38
38
|
}, []), L = t.useCallback(
|
|
39
|
-
(
|
|
40
|
-
const { event: e } =
|
|
41
|
-
if (
|
|
39
|
+
(f) => {
|
|
40
|
+
const { event: e } = f, { clientX: n, clientY: r } = h.current;
|
|
41
|
+
if (x.current)
|
|
42
42
|
return;
|
|
43
|
-
const s = Math.abs(n - e.clientX), c = Math.abs(
|
|
44
|
-
if ((s > _ || c > _) && (
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
top: Math.min(
|
|
48
|
-
left: Math.min(n, e.clientX) -
|
|
43
|
+
const s = Math.abs(n - e.clientX), c = Math.abs(r - e.clientY);
|
|
44
|
+
if ((s > _ || c > _) && (u.current = !0), !(!D || m === "single") && (e.originalEvent.stopImmediatePropagation(), u.current)) {
|
|
45
|
+
const E = W(O.current);
|
|
46
|
+
C({
|
|
47
|
+
top: Math.min(r, e.clientY) - E.top,
|
|
48
|
+
left: Math.min(n, e.clientX) - E.left,
|
|
49
49
|
width: Math.abs(e.clientX - n),
|
|
50
|
-
height: Math.abs(e.clientY -
|
|
50
|
+
height: Math.abs(e.clientY - r)
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
|
-
[
|
|
54
|
+
[C, D, m]
|
|
55
55
|
), A = t.useCallback(
|
|
56
|
-
(
|
|
57
|
-
var
|
|
58
|
-
const { event: e } =
|
|
59
|
-
if (
|
|
56
|
+
(f) => {
|
|
57
|
+
var E;
|
|
58
|
+
const { event: e } = f, { clientX: n, clientY: r, pressedElement: s } = h.current;
|
|
59
|
+
if (x.current || !o.current)
|
|
60
60
|
return;
|
|
61
|
-
const c = (
|
|
61
|
+
const c = (E = o.current.element) == null ? void 0 : E.ownerDocument;
|
|
62
62
|
if (c) {
|
|
63
|
+
if (u.current && !D) {
|
|
64
|
+
d();
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
63
67
|
e.originalEvent.stopImmediatePropagation();
|
|
64
68
|
try {
|
|
65
|
-
if (
|
|
66
|
-
const
|
|
67
|
-
if (!
|
|
69
|
+
if (u.current) {
|
|
70
|
+
const l = p.current;
|
|
71
|
+
if (!l)
|
|
68
72
|
return;
|
|
69
|
-
|
|
70
|
-
const
|
|
73
|
+
l.style.visibility = "hidden";
|
|
74
|
+
const g = s || c.elementFromPoint(n, r), y = c.elementFromPoint(
|
|
71
75
|
e.clientX,
|
|
72
76
|
e.clientY
|
|
73
77
|
);
|
|
74
|
-
if (
|
|
78
|
+
if (l.style.visibility = "", !g || !y)
|
|
75
79
|
return;
|
|
76
|
-
const a = i(
|
|
77
|
-
|
|
80
|
+
const a = i(g, "TD"), R = i(a, "TR"), k = i(y, "TD"), U = i(k, "TR"), T = S(a), K = Y(R), M = S(k), P = Y(U);
|
|
81
|
+
T !== void 0 && K !== void 0 && M !== void 0 && P !== void 0 && I({
|
|
78
82
|
nativeEvent: e.originalEvent,
|
|
79
|
-
startRowIndex: Math.min(
|
|
80
|
-
startColIndex: Math.min(
|
|
81
|
-
endRowIndex: Math.max(
|
|
82
|
-
endColIndex: Math.max(
|
|
83
|
+
startRowIndex: Math.min(K, P),
|
|
84
|
+
startColIndex: Math.min(T, M),
|
|
85
|
+
endRowIndex: Math.max(K, P),
|
|
86
|
+
endColIndex: Math.max(T, M),
|
|
83
87
|
altKey: e.altKey,
|
|
84
88
|
shiftKey: e.shiftKey,
|
|
85
89
|
ctrlKey: e.ctrlKey,
|
|
86
90
|
metaKey: e.metaKey,
|
|
87
91
|
mode: m,
|
|
88
|
-
cell:
|
|
92
|
+
cell: b,
|
|
89
93
|
isDrag: !0
|
|
90
94
|
});
|
|
91
95
|
} else {
|
|
92
|
-
const
|
|
93
|
-
if (!
|
|
96
|
+
const l = c.elementFromPoint(n, r);
|
|
97
|
+
if (!l)
|
|
94
98
|
return;
|
|
95
|
-
const
|
|
96
|
-
|
|
99
|
+
const g = i(l, "TD"), y = i(l, "TR"), a = S(g), R = Y(y);
|
|
100
|
+
g && y && R !== void 0 && a !== void 0 && I({
|
|
97
101
|
nativeEvent: e.originalEvent,
|
|
98
|
-
startRowIndex:
|
|
102
|
+
startRowIndex: R,
|
|
99
103
|
startColIndex: a,
|
|
100
|
-
endRowIndex:
|
|
104
|
+
endRowIndex: R,
|
|
101
105
|
endColIndex: a,
|
|
102
106
|
altKey: e.altKey,
|
|
103
107
|
shiftKey: e.shiftKey,
|
|
104
108
|
ctrlKey: e.ctrlKey,
|
|
105
109
|
metaKey: e.metaKey,
|
|
106
110
|
mode: m,
|
|
107
|
-
cell:
|
|
111
|
+
cell: b,
|
|
108
112
|
isDrag: !1
|
|
109
113
|
});
|
|
110
114
|
}
|
|
111
115
|
} finally {
|
|
112
|
-
|
|
116
|
+
d();
|
|
113
117
|
}
|
|
114
118
|
}
|
|
115
119
|
},
|
|
116
|
-
[m,
|
|
120
|
+
[D, m, b, I, d]
|
|
117
121
|
), q = t.useCallback(() => {
|
|
118
|
-
|
|
119
|
-
}, [
|
|
122
|
+
d();
|
|
123
|
+
}, [d]), G = j(p);
|
|
120
124
|
return N ? /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
|
|
121
125
|
z,
|
|
122
126
|
{
|
|
@@ -127,20 +131,20 @@ const _ = 5, Z = 300, te = (y) => {
|
|
|
127
131
|
ref: o,
|
|
128
132
|
autoTouchAction: !1,
|
|
129
133
|
pressHoldDelay: Z,
|
|
130
|
-
childRef:
|
|
134
|
+
childRef: w
|
|
131
135
|
},
|
|
132
|
-
|
|
136
|
+
v.children
|
|
133
137
|
), X && V.createPortal(
|
|
134
138
|
/* @__PURE__ */ t.createElement(
|
|
135
139
|
"div",
|
|
136
140
|
{
|
|
137
|
-
ref:
|
|
141
|
+
ref: p,
|
|
138
142
|
style: { ...X, position: "fixed" },
|
|
139
143
|
className: "k-marquee k-marquee-color"
|
|
140
144
|
}
|
|
141
145
|
),
|
|
142
146
|
(H = G()) == null ? void 0 : H.body
|
|
143
|
-
)) : t.cloneElement(t.Children.only(
|
|
147
|
+
)) : t.cloneElement(t.Children.only(v.children), { ref: w });
|
|
144
148
|
};
|
|
145
149
|
export {
|
|
146
150
|
te as TableSelection
|