@progress/kendo-react-treelist 9.4.0-develop.5 → 9.4.0-develop.7
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.js +1 -1
- package/TreeList.mjs +0 -1
- package/TreeListNoRecords.js +1 -1
- package/TreeListNoRecords.mjs +4 -5
- package/TreeListToolbar.js +1 -1
- package/TreeListToolbar.mjs +0 -1
- package/cells/EditCells/TreeListBooleanEditor.js +1 -1
- package/cells/EditCells/TreeListBooleanEditor.mjs +10 -11
- package/cells/EditCells/TreeListDateEditor.js +1 -1
- package/cells/EditCells/TreeListDateEditor.mjs +8 -9
- package/cells/EditCells/TreeListNumericEditor.js +1 -1
- package/cells/EditCells/TreeListNumericEditor.mjs +8 -9
- package/cells/EditCells/TreeListTextEditor.js +1 -1
- package/cells/EditCells/TreeListTextEditor.mjs +3 -4
- package/cells/FilterCells/TreeListBooleanFilter.js +1 -1
- package/cells/FilterCells/TreeListBooleanFilter.mjs +4 -5
- package/cells/FilterCells/TreeListDateFilter.js +1 -1
- package/cells/FilterCells/TreeListDateFilter.mjs +8 -9
- package/cells/FilterCells/TreeListNumericFilter.js +1 -1
- package/cells/FilterCells/TreeListNumericFilter.mjs +3 -4
- package/cells/FilterCells/TreeListTextFilter.js +1 -1
- package/cells/FilterCells/TreeListTextFilter.mjs +4 -5
- package/cells/FilterCells/utils.js +1 -1
- package/cells/FilterCells/utils.mjs +6 -7
- package/cells/TreeListCell.js +1 -1
- package/cells/TreeListCell.mjs +7 -8
- package/cells/TreeListSelectionCell.js +1 -1
- package/cells/TreeListSelectionCell.mjs +3 -4
- package/constants/index.js +1 -1
- package/constants/index.mjs +0 -1
- package/dist/cdn/js/kendo-react-treelist.js +1 -1
- package/header/TreeListHeaderCell.js +1 -1
- package/header/TreeListHeaderCell.mjs +2 -3
- package/header/TreeListHeaderSelectionCell.js +1 -1
- package/header/TreeListHeaderSelectionCell.mjs +0 -1
- package/index.js +2 -1
- package/index.mjs +12 -12
- package/messages/index.js +1 -1
- package/messages/index.mjs +5 -6
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -3
- package/package.json +9 -9
- package/rows/TreeListDraggableRow.js +1 -1
- package/rows/TreeListDraggableRow.mjs +4 -5
- package/rows/TreeListRow.js +1 -1
- package/rows/TreeListRow.mjs +9 -10
- package/utils/index.js +1 -1
- package/utils/index.mjs +5 -6
package/rows/TreeListRow.mjs
CHANGED
|
@@ -5,12 +5,11 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as t from "react";
|
|
10
|
-
import { classNames as
|
|
11
|
-
import { TREELIST_ROW_INDEX_ATTRIBUTE as
|
|
12
|
-
const
|
|
13
|
-
const { isSelected: i, rowHeight: a, isAltRow: r, expanded: l, ariaRowIndex:
|
|
9
|
+
import { classNames as x } from "@progress/kendo-react-common";
|
|
10
|
+
import { TREELIST_ROW_INDEX_ATTRIBUTE as k } from "../constants/index.mjs";
|
|
11
|
+
const u = t.forwardRef((e, o) => {
|
|
12
|
+
const { isSelected: i, rowHeight: a, isAltRow: r, expanded: l, ariaRowIndex: d, level: c, ariaSetSize: s, ariaPosInSet: m } = e, w = x("k-table-row", "k-master-row", {
|
|
14
13
|
"k-selected": i,
|
|
15
14
|
"k-alt": r
|
|
16
15
|
}), R = t.useMemo(
|
|
@@ -27,17 +26,17 @@ const k = t.forwardRef((e, o) => {
|
|
|
27
26
|
ref: o,
|
|
28
27
|
"aria-expanded": l,
|
|
29
28
|
role: "row",
|
|
30
|
-
"aria-rowindex":
|
|
31
|
-
"aria-level":
|
|
29
|
+
"aria-rowindex": d,
|
|
30
|
+
"aria-level": c.length,
|
|
32
31
|
"aria-posinset": m,
|
|
33
32
|
"aria-setsize": s,
|
|
34
|
-
[
|
|
33
|
+
[k]: e.rowIndex
|
|
35
34
|
},
|
|
36
35
|
e.children
|
|
37
36
|
);
|
|
38
37
|
return /* @__PURE__ */ t.createElement(t.Fragment, null, e.render ? e.render.call(void 0, n, e) : n);
|
|
39
38
|
});
|
|
40
|
-
|
|
39
|
+
u.displayName = "KendoReactTreeListRow";
|
|
41
40
|
export {
|
|
42
|
-
|
|
41
|
+
u as TreeListRow
|
|
43
42
|
};
|
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
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function g(n){return n!==void 0&&(typeof n=="number"||/px$/i.test(String(n)))}function u(n,o,a){const r=Array.from(n.tHead&&n.tHead.rows||[]),i=[o];let h;const l=a||(t=>window.getComputedStyle(t).height||void 0);r.forEach(t=>{const e=l(t);i.push(g(e)?parseFloat(String(e)):t.offsetHeight)});for(let t=0;t<r.length;t++)h=i.slice(0,t+1).reduce((e,s)=>e+s),Array.from(r[t].cells).forEach(e=>e.style.top=h+"px")}const c=1e6;function d(n){const{rows:o,tableViewPortHeight:a,scrollTop:r}=n;if(o.length===0)return[];const i=o[0].height,h=Math.min(Math.round(r/i),o.length),l=Math.round(a/i),t=Math.max(0,h-l),e=Math.min(o.length,h+2*l),s=o.slice(t,e),f=s[s.length-1];return t>0&&s.unshift({dataItem:{},level:[c],offsetTop:0,height:s[0].offsetTop,levelCount:0}),e<o.length-1&&s.push({dataItem:{},level:[c,c],offsetTop:f.offsetTop+f.height,height:(o.length-e)*i,levelCount:0}),s}exports.setHeaderRowsTop=u;exports.tableRowsVirtualization=d;
|
package/utils/index.mjs
CHANGED
|
@@ -5,27 +5,26 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
function g(n) {
|
|
10
9
|
return n !== void 0 && (typeof n == "number" || /px$/i.test(String(n)));
|
|
11
10
|
}
|
|
12
11
|
function u(n, o, c) {
|
|
13
12
|
const h = Array.from(n.tHead && n.tHead.rows || []), i = [o];
|
|
14
|
-
let
|
|
15
|
-
const
|
|
13
|
+
let r;
|
|
14
|
+
const l = c || ((t) => window.getComputedStyle(t).height || void 0);
|
|
16
15
|
h.forEach((t) => {
|
|
17
|
-
const e =
|
|
16
|
+
const e = l(t);
|
|
18
17
|
i.push(g(e) ? parseFloat(String(e)) : t.offsetHeight);
|
|
19
18
|
});
|
|
20
19
|
for (let t = 0; t < h.length; t++)
|
|
21
|
-
|
|
20
|
+
r = i.slice(0, t + 1).reduce((e, s) => e + s), Array.from(h[t].cells).forEach((e) => e.style.top = r + "px");
|
|
22
21
|
}
|
|
23
22
|
const a = 1e6;
|
|
24
23
|
function p(n) {
|
|
25
24
|
const { rows: o, tableViewPortHeight: c, scrollTop: h } = n;
|
|
26
25
|
if (o.length === 0)
|
|
27
26
|
return [];
|
|
28
|
-
const i = o[0].height,
|
|
27
|
+
const i = o[0].height, r = Math.min(Math.round(h / i), o.length), l = Math.round(c / i), t = Math.max(0, r - l), e = Math.min(o.length, r + 2 * l), s = o.slice(t, e), f = s[s.length - 1];
|
|
29
28
|
return t > 0 && s.unshift({
|
|
30
29
|
dataItem: {},
|
|
31
30
|
level: [a],
|