@progress/kendo-react-data-tools 9.4.0-develop.2 → 9.4.0-develop.21
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/NOTICE.txt +40 -51
- package/clipboard/clipboard.service.js +1 -1
- package/clipboard/clipboard.service.mjs +0 -1
- package/clipboard/common.js +5 -5
- package/clipboard/common.mjs +81 -46
- package/columnmenu/ColumnMenu.js +2 -1
- package/columnmenu/ColumnMenuFilterForm.js +2 -1
- package/columnmenu/ColumnMenuFilterLogic.js +2 -1
- package/columnmenu/ColumnMenuFilterLogic.mjs +4 -4
- package/columnmenu/ColumnMenuFilters.js +2 -1
- package/columnmenu/ColumnMenuItem.js +2 -1
- package/columnmenu/ColumnMenuItem.mjs +4 -4
- package/columnmenu/ColumnMenuOperators.js +1 -1
- package/columnmenu/ColumnMenuOperators.mjs +0 -1
- package/detail-expansion/expandReducer.js +1 -1
- package/detail-expansion/expandReducer.mjs +0 -1
- package/detail-expansion/utils.js +1 -1
- package/detail-expansion/utils.mjs +2 -3
- package/dist/cdn/js/kendo-react-datatools.js +8 -1
- package/drag/ColumnDraggable.js +2 -1
- package/drag/ColumnResize.js +1 -1
- package/drag/ColumnResize.mjs +2 -3
- package/drag/ColumnResizer.js +2 -1
- package/drag/CommonDragLogic.js +1 -1
- package/drag/CommonDragLogic.mjs +0 -1
- package/drag/DragClue.js +2 -1
- package/drag/DragClue.mjs +4 -4
- package/drag/DropClue.js +2 -1
- package/drag/DropClue.mjs +3 -3
- package/editing/editReducer.js +1 -1
- package/editing/editReducer.mjs +0 -1
- package/editing/utils.js +1 -1
- package/editing/utils.mjs +4 -5
- package/filter/Expression.js +2 -1
- package/filter/Filter.js +2 -1
- package/filter/Filter.mjs +11 -11
- package/filter/Group.js +2 -1
- package/filter/filters/BooleanFilter.js +2 -1
- package/filter/filters/DateFilter.js +2 -1
- package/filter/filters/DateFilter.mjs +4 -4
- package/filter/filters/EnumFilter.js +2 -1
- package/filter/filters/NumericFilter.js +2 -1
- package/filter/filters/NumericFilter.mjs +4 -4
- package/filter/filters/TextFilter.js +2 -1
- package/filter/operators.js +1 -1
- package/filter/operators.mjs +0 -1
- package/filteringCells/BooleanFilter.js +2 -1
- package/filteringCells/BooleanFilter.mjs +4 -4
- package/filteringCells/DateFilter.js +2 -1
- package/filteringCells/DateFilter.mjs +5 -5
- package/filteringCells/FilterComponent.js +2 -1
- package/filteringCells/FilterComponent.mjs +7 -7
- package/filteringCells/NumericFilter.js +2 -1
- package/filteringCells/TextFilter.js +2 -1
- package/group-expansion/groupExpandReducer.js +1 -1
- package/group-expansion/groupExpandReducer.mjs +12 -13
- package/header/ColumnProps.js +1 -1
- package/header/ColumnProps.mjs +0 -1
- package/header/FilterRow.js +2 -1
- package/header/FilterRow.mjs +2 -2
- package/header/Header.js +2 -1
- package/header/HeaderCell.js +2 -1
- package/header/HeaderRow.js +2 -1
- package/header/HeaderRow.mjs +5 -5
- package/header/HeaderSelectionCell.js +2 -1
- package/header/HeaderTdElement.js +2 -1
- package/header/HeaderTdElement.mjs +6 -6
- package/header/HeaderThElement.js +2 -1
- package/header/HeaderThElement.mjs +6 -6
- package/header/SortSettings.js +1 -1
- package/header/SortSettings.mjs +2 -3
- package/header/utils/index.js +1 -1
- package/header/utils/index.mjs +5 -6
- package/index.d.mts +97 -18
- package/index.d.ts +97 -18
- package/index.js +1 -1
- package/index.mjs +170 -158
- package/messages/index.js +1 -1
- package/messages/index.mjs +0 -1
- package/navigation/NavigatableSettings.js +1 -1
- package/navigation/NavigatableSettings.mjs +2 -3
- package/navigation/TableKeyboardNavigation.js +2 -1
- package/navigation/TableKeyboardNavigationContext.js +2 -1
- package/navigation/TableKeyboardNavigationContext.mjs +4 -4
- package/navigation/constants.js +1 -1
- package/navigation/constants.mjs +8 -9
- package/navigation/hooks.js +2 -1
- package/navigation/hooks.mjs +5 -5
- package/navigation/utils.js +1 -1
- package/navigation/utils.mjs +0 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -3
- package/package.json +10 -10
- package/pager/Pager.js +2 -1
- package/pager/PagerInput.js +2 -1
- package/pager/PagerNumericButtons.js +2 -1
- package/pager/PagerNumericButtons.mjs +9 -9
- package/pager/PagerPageSizes.js +2 -1
- package/pager/PagerPageSizes.mjs +3 -3
- package/pager/utils.js +1 -1
- package/pager/utils.mjs +2 -3
- package/selection/TableSelection.js +2 -1
- package/selection/constants.js +1 -1
- package/selection/constants.mjs +0 -1
- package/selection/utils.js +1 -1
- package/selection/utils.mjs +63 -63
- package/utils/data-operations.js +1 -1
- package/utils/data-operations.mjs +82 -67
- package/utils/group-operations.js +1 -1
- package/utils/group-operations.mjs +7 -8
- package/virtualization/columns.js +1 -1
- package/virtualization/columns.mjs +5 -6
|
@@ -5,48 +5,47 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return t ? { ...r, [n]: t.length ? [...t] : void 0 } : r && r[n] ? [...r[n]] : [];
|
|
8
|
+
import { orderBy as v, filterBy as s } from "@progress/kendo-data-query";
|
|
9
|
+
import { extendDataItem as y, mapTree as C, getItemPath as P, getNestedValue as g } from "@progress/kendo-react-common";
|
|
10
|
+
function i(t, n, r) {
|
|
11
|
+
return r ? { ...t, [n]: r.length ? [...r] : void 0 } : t && t[n] ? [...t[n]] : [];
|
|
13
12
|
}
|
|
14
|
-
function
|
|
15
|
-
if (r
|
|
16
|
-
const o = i(
|
|
17
|
-
return { ...o, [
|
|
13
|
+
function B(t, n, r) {
|
|
14
|
+
if (t[r]) {
|
|
15
|
+
const o = i(t, r, v(i(t, r), n)), e = i(o, r).map((c) => B(c, n, r));
|
|
16
|
+
return { ...o, [r]: e };
|
|
18
17
|
}
|
|
19
|
-
return
|
|
18
|
+
return t;
|
|
20
19
|
}
|
|
21
|
-
function
|
|
22
|
-
let o =
|
|
23
|
-
return o = o.map((e) =>
|
|
20
|
+
function E(t, n, r) {
|
|
21
|
+
let o = v(t, n);
|
|
22
|
+
return o = o.map((e) => B(e, n, r)), o;
|
|
24
23
|
}
|
|
25
|
-
function
|
|
26
|
-
let o = i(
|
|
24
|
+
function x(t, n, r) {
|
|
25
|
+
let o = i(t, r);
|
|
27
26
|
if (o && o.length) {
|
|
28
|
-
o = o.map((
|
|
29
|
-
const
|
|
30
|
-
filters: [{ filters: n, logic: "and" }, { operator: (
|
|
27
|
+
o = o.map((a) => x(a, n, r));
|
|
28
|
+
const l = s(o, {
|
|
29
|
+
filters: [{ filters: n, logic: "and" }, { operator: (a) => !!(a[r] || []).length }],
|
|
31
30
|
logic: "or"
|
|
32
31
|
});
|
|
33
|
-
return i(
|
|
32
|
+
return i(t, r, l);
|
|
34
33
|
}
|
|
35
|
-
return
|
|
34
|
+
return t;
|
|
36
35
|
}
|
|
37
|
-
function
|
|
38
|
-
let o = { [
|
|
39
|
-
return o =
|
|
36
|
+
function $(t, n, r) {
|
|
37
|
+
let o = { [r]: [...t] };
|
|
38
|
+
return o = x(o, n, r), o[r] || [];
|
|
40
39
|
}
|
|
41
|
-
function
|
|
40
|
+
function k(t, n, r) {
|
|
42
41
|
const o = [], e = [];
|
|
43
|
-
for (let c =
|
|
44
|
-
const
|
|
42
|
+
for (let c = t.length - 1; c >= 0; c--) {
|
|
43
|
+
const l = t[c];
|
|
45
44
|
o.push({
|
|
46
|
-
root:
|
|
47
|
-
data: n(
|
|
45
|
+
root: l,
|
|
46
|
+
data: n(l),
|
|
48
47
|
level: [c],
|
|
49
|
-
levelCount:
|
|
48
|
+
levelCount: t.length
|
|
50
49
|
});
|
|
51
50
|
}
|
|
52
51
|
for (; o.length > 0; ) {
|
|
@@ -54,70 +53,86 @@ function N(r, n, t) {
|
|
|
54
53
|
if (e.push({
|
|
55
54
|
dataItem: c.root,
|
|
56
55
|
level: [...c.level],
|
|
57
|
-
...
|
|
56
|
+
...r(c.root),
|
|
58
57
|
levelCount: c.levelCount
|
|
59
58
|
}), c.data.length)
|
|
60
|
-
for (let
|
|
61
|
-
const
|
|
59
|
+
for (let l = c.data.length - 1; l >= 0; l--) {
|
|
60
|
+
const a = c.data[l];
|
|
62
61
|
o.push({
|
|
63
|
-
root:
|
|
64
|
-
data: n(
|
|
65
|
-
level: [...c.level,
|
|
62
|
+
root: a,
|
|
63
|
+
data: n(a),
|
|
64
|
+
level: [...c.level, l],
|
|
66
65
|
levelCount: c.data.length
|
|
67
66
|
});
|
|
68
67
|
}
|
|
69
68
|
}
|
|
70
69
|
return e;
|
|
71
70
|
}
|
|
72
|
-
const
|
|
73
|
-
const o = (
|
|
71
|
+
const N = (t, n, r) => {
|
|
72
|
+
const o = (h) => !!g(n, h), e = (h) => !!g(r, h), c = (h) => {
|
|
74
73
|
const f = [];
|
|
75
|
-
return o(
|
|
76
|
-
},
|
|
77
|
-
f.push({ ...
|
|
78
|
-
},
|
|
79
|
-
return
|
|
80
|
-
}, V = (
|
|
81
|
-
let e = {}, c = [],
|
|
82
|
-
return
|
|
83
|
-
|
|
74
|
+
return o(h) && e(h) && f.push(...g(r, h)), f;
|
|
75
|
+
}, l = (h, f, p) => {
|
|
76
|
+
f.push({ ...h, level: p }), c(h).forEach((D) => l(D, f, p + 1));
|
|
77
|
+
}, a = [];
|
|
78
|
+
return t.forEach((h) => l(h, a, 0)), a;
|
|
79
|
+
}, V = (t, n, r, o) => {
|
|
80
|
+
let e = {}, c = [], l;
|
|
81
|
+
return t.forEach((a) => e[n(a)] = { ...a }), t.forEach((a) => {
|
|
82
|
+
l = e[r(a)], l ? (l[o] = l[o] || [], l[o].push(e[n(a)])) : c.push(e[n(a)]);
|
|
84
83
|
}), c;
|
|
85
|
-
}, j = (
|
|
86
|
-
[{ [n]: [...
|
|
84
|
+
}, j = (t, n, r) => y(t, n, r), q = (t, n, r) => [...C(
|
|
85
|
+
[{ [n]: [...t] }],
|
|
87
86
|
n,
|
|
88
|
-
(e) => T(e,
|
|
89
|
-
)[0][n]], T = (
|
|
90
|
-
const o = r
|
|
87
|
+
(e) => T(e, r, n)
|
|
88
|
+
)[0][n]], T = (t, n, r) => {
|
|
89
|
+
const o = t[r] || [], e = o.findIndex(n);
|
|
91
90
|
if (e !== -1) {
|
|
92
91
|
const c = [...o];
|
|
93
92
|
return c.splice(e, 1), {
|
|
94
|
-
...
|
|
95
|
-
[
|
|
93
|
+
...t,
|
|
94
|
+
[r]: c
|
|
96
95
|
};
|
|
97
96
|
}
|
|
98
|
-
return
|
|
99
|
-
}, z = (
|
|
100
|
-
|
|
97
|
+
return t;
|
|
98
|
+
}, z = (t, n, r, o) => C(
|
|
99
|
+
t,
|
|
101
100
|
n,
|
|
102
|
-
(e) =>
|
|
103
|
-
), u = (
|
|
104
|
-
const e = [...
|
|
105
|
-
if (
|
|
106
|
-
const p = u(e,
|
|
107
|
-
(
|
|
101
|
+
(e) => r(e) ? { ...e, [n]: o(e[n] || []) } : e
|
|
102
|
+
), u = (t, n, r) => P(t, n, r), A = (t, n, r, o) => {
|
|
103
|
+
const e = [...t], c = u(e, n, o), l = c.pop(), a = c.pop(), h = n[n.length - 1];
|
|
104
|
+
if (r) {
|
|
105
|
+
const p = u(e, r, o).pop();
|
|
106
|
+
(a ? a[o] : e).splice(h, 1), p[o] = p[o] || [], p[o].push(l);
|
|
108
107
|
} else
|
|
109
|
-
(
|
|
108
|
+
(a ? a[o] : e).splice(h, 1), e.push(l);
|
|
110
109
|
return e;
|
|
110
|
+
}, G = (t, n) => ({
|
|
111
|
+
...t,
|
|
112
|
+
filters: t.filters.map((r) => ({ ...r, value: n }))
|
|
113
|
+
}), H = (t) => t != null && t.filters.length && t.filters[0].value || "", J = (t, n) => {
|
|
114
|
+
if (n && !t)
|
|
115
|
+
return n;
|
|
116
|
+
if (t && !n)
|
|
117
|
+
return t;
|
|
118
|
+
if (t && n)
|
|
119
|
+
return {
|
|
120
|
+
logic: "and",
|
|
121
|
+
filters: [t, n]
|
|
122
|
+
};
|
|
111
123
|
};
|
|
112
124
|
export {
|
|
125
|
+
J as combineFilters,
|
|
113
126
|
V as createDataTree,
|
|
114
127
|
j as extendDataItem,
|
|
115
|
-
|
|
116
|
-
|
|
128
|
+
$ as filterBy,
|
|
129
|
+
k as flatData,
|
|
117
130
|
u as getItemPath,
|
|
131
|
+
G as getSearchFromString,
|
|
132
|
+
H as getStringFromSearch,
|
|
118
133
|
z as modifySubItems,
|
|
119
134
|
A as moveTreeItem,
|
|
120
|
-
|
|
135
|
+
E as orderBy,
|
|
121
136
|
q as removeItems,
|
|
122
|
-
|
|
137
|
+
N as treeToFlat
|
|
123
138
|
};
|
|
@@ -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"});const a=require("@progress/kendo-react-common"),d="groupId",n="items",r=(e,t,s)=>{e.items&&(e[d]=`${s}${s&&"_"}${e.value}${e.field}`,t>1&&e.items.forEach(o=>r(o,t-1,e[d])))},c=e=>{const{group:t}=e;if(t&&t.length&&e.data)return e.data.forEach(s=>r(s,t.length,""))},I=e=>{const t=[];return a.mapTree(e.data,n,s=>{s[d]&&t.push(s[d])}),t},u=e=>a.mapTree(e.data,n,t=>a.extendDataItem(t,n,{expanded:!e.collapsedIds.some(s=>s===t[d])}));exports.getGroupIds=I;exports.setExpandedState=u;exports.setGroupIds=c;
|
|
@@ -5,20 +5,19 @@
|
|
|
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 { mapTree as n, extendDataItem as I } from "@progress/kendo-react-common";
|
|
10
|
-
const a = "groupId", d = "items",
|
|
11
|
-
t.items && (t[a] = `${s}${s && "_"}${t.value}${t.field}`, e > 1 && t.items.forEach((
|
|
9
|
+
const a = "groupId", d = "items", r = (t, e, s) => {
|
|
10
|
+
t.items && (t[a] = `${s}${s && "_"}${t.value}${t.field}`, e > 1 && t.items.forEach((c) => r(c, e - 1, t[a])));
|
|
12
11
|
}, f = (t) => {
|
|
13
12
|
const { group: e } = t;
|
|
14
13
|
if (e && e.length && t.data)
|
|
15
|
-
return t.data.forEach((s) =>
|
|
16
|
-
},
|
|
14
|
+
return t.data.forEach((s) => r(s, e.length, ""));
|
|
15
|
+
}, m = (t) => {
|
|
17
16
|
const e = [];
|
|
18
17
|
return n(t.data, d, (s) => {
|
|
19
18
|
s[a] && e.push(s[a]);
|
|
20
19
|
}), e;
|
|
21
|
-
},
|
|
20
|
+
}, E = (t) => n(
|
|
22
21
|
t.data,
|
|
23
22
|
d,
|
|
24
23
|
(e) => I(e, d, {
|
|
@@ -26,7 +25,7 @@ const a = "groupId", d = "items", c = (t, e, s) => {
|
|
|
26
25
|
})
|
|
27
26
|
);
|
|
28
27
|
export {
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
m as getGroupIds,
|
|
29
|
+
E as setExpandedState,
|
|
31
30
|
f as setGroupIds
|
|
32
31
|
};
|
|
@@ -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 k(b){const{enabled:S,columns:l=[],tableViewPortWidth:w,scrollLeft:g,getColSpan:m,dataItem:C}=b,h=l.map(()=>1),i=l.map(()=>!1);if(!S)return{colSpans:h,hiddenColumns:i};const n=l.map(e=>parseFloat((e.width||"").toString())||10);let o=0;for(let e=0;e<l.length;e++){if(l[e].locked)continue;let f=1;if(m!==void 0){let c=m(l[e],C);c>2?f=c-1:c===2&&(f=c)}const O=e<n.length-1?n[e+1]*f:0;if(o+n[e]+O<g)i[e]=!0,o+=n[e];else break}const y=n.reduce((e,f)=>e+f,0);o=0;for(let e=l.length-1;e>=0;e--)if(!l[e].locked)if(o+2*n[e]<y-w-g)i[e]=!0,o+=n[e];else break;const t=[...i],r=e=>e;let s=t.lastIndexOf(!1),p=t.some(r),u=t.every(r),a,d;for(;p&&t.length&&(s!==-1||u);){for(s<t.length-1&&(a=u?t.length:t.length-s-1,d=t.length-a,d===0&&(d=a-1),i[d]=!1,h[d]=a,t.splice(s+1,a));t.length&&!t[t.length-1];)t.pop();s=t.lastIndexOf(!1),p=t.some(r),u=t.every(r)}return{colSpans:h,hiddenColumns:i}}exports.tableColumnsVirtualization=k;
|
|
@@ -5,7 +5,6 @@
|
|
|
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 I(b) {
|
|
10
9
|
const { enabled: w, columns: l = [], tableViewPortWidth: x, scrollLeft: g, getColSpan: p, dataItem: C } = b, r = l.map(() => 1), i = l.map(() => !1);
|
|
11
10
|
if (!w)
|
|
@@ -17,8 +16,8 @@ function I(b) {
|
|
|
17
16
|
continue;
|
|
18
17
|
let f = 1;
|
|
19
18
|
if (p !== void 0) {
|
|
20
|
-
let
|
|
21
|
-
|
|
19
|
+
let c = p(l[e], C);
|
|
20
|
+
c > 2 ? f = c - 1 : c === 2 && (f = c);
|
|
22
21
|
}
|
|
23
22
|
const k = e < n.length - 1 ? n[e + 1] * f : 0;
|
|
24
23
|
if (o + n[e] + k < g)
|
|
@@ -34,12 +33,12 @@ function I(b) {
|
|
|
34
33
|
i[e] = !0, o += n[e];
|
|
35
34
|
else
|
|
36
35
|
break;
|
|
37
|
-
const t = [...i],
|
|
38
|
-
let s = t.lastIndexOf(!1), m = t.some(
|
|
36
|
+
const t = [...i], h = (e) => e;
|
|
37
|
+
let s = t.lastIndexOf(!1), m = t.some(h), u = t.every(h), d, a;
|
|
39
38
|
for (; m && t.length && (s !== -1 || u); ) {
|
|
40
39
|
for (s < t.length - 1 && (d = u ? t.length : t.length - s - 1, a = t.length - d, a === 0 && (a = d - 1), i[a] = !1, r[a] = d, t.splice(s + 1, d)); t.length && !t[t.length - 1]; )
|
|
41
40
|
t.pop();
|
|
42
|
-
s = t.lastIndexOf(!1), m = t.some(
|
|
41
|
+
s = t.lastIndexOf(!1), m = t.some(h), u = t.every(h);
|
|
43
42
|
}
|
|
44
43
|
return { colSpans: r, hiddenColumns: i };
|
|
45
44
|
}
|