@progress/kendo-react-grid 9.0.0-develop.2 → 9.0.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/Grid.js +1 -1
- package/Grid.mjs +927 -1042
- package/GridNoRecords.js +1 -1
- package/GridNoRecords.mjs +7 -14
- package/GridToolbar.js +1 -1
- package/GridToolbar.mjs +23 -28
- package/README.md +34 -33
- package/VirtualScroll.js +1 -1
- package/VirtualScroll.mjs +63 -58
- package/VirtualScrollFixed.js +1 -1
- package/VirtualScrollFixed.mjs +16 -14
- package/cells/GridCell.mjs +6 -3
- package/cells/GridDetailCell.mjs +6 -3
- package/cells/GridEditCell.mjs +10 -38
- package/cells/GridFilterCell.js +1 -1
- package/cells/GridFilterCell.mjs +99 -113
- package/cells/GridGroupCell.mjs +24 -30
- package/cells/GridHierarchyCell.mjs +2 -13
- package/cells/GridSelectionCell.mjs +3 -24
- package/columnMenu/GridColumnMenuCheckboxFilter.js +1 -1
- package/columnMenu/GridColumnMenuCheckboxFilter.mjs +132 -184
- package/columnMenu/GridColumnMenuFilter.js +1 -1
- package/columnMenu/GridColumnMenuFilter.mjs +127 -170
- package/columnMenu/GridColumnMenuFilterCell.js +1 -1
- package/columnMenu/GridColumnMenuFilterCell.mjs +42 -61
- package/columnMenu/GridColumnMenuFilterUI.js +1 -1
- package/columnMenu/GridColumnMenuFilterUI.mjs +15 -24
- package/columnMenu/GridColumnMenuGroup.js +1 -1
- package/columnMenu/GridColumnMenuGroup.mjs +29 -40
- package/columnMenu/GridColumnMenuItemContent.js +1 -1
- package/columnMenu/GridColumnMenuItemContent.mjs +7 -20
- package/columnMenu/GridColumnMenuItemGroup.js +1 -1
- package/columnMenu/GridColumnMenuItemGroup.mjs +7 -20
- package/columnMenu/GridColumnMenuSort.js +1 -1
- package/columnMenu/GridColumnMenuSort.mjs +42 -53
- package/columnMenu/GridColumnMenuWrapper.mjs +6 -18
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/drag/ColumnDraggable.js +1 -1
- package/drag/ColumnDraggable.mjs +34 -33
- package/drag/ColumnResize.js +1 -1
- package/drag/ColumnResize.mjs +36 -44
- package/drag/GroupingIndicator.js +1 -1
- package/drag/GroupingIndicator.mjs +51 -83
- package/filterCommon.mjs +1 -3
- package/footer/Footer.js +1 -1
- package/footer/Footer.mjs +40 -57
- package/footer/FooterRow.mjs +6 -5
- package/header/FilterRow.js +1 -1
- package/header/FilterRow.mjs +69 -82
- package/header/GridHeaderSelectionCell.js +1 -1
- package/header/GridHeaderSelectionCell.mjs +28 -35
- package/header/GroupPanel.js +1 -1
- package/header/GroupPanel.mjs +43 -49
- package/header/Header.js +1 -1
- package/header/Header.mjs +70 -74
- package/header/HeaderRow.mjs +24 -27
- package/index.d.mts +259 -724
- package/index.d.ts +259 -724
- package/index.js +1 -1
- package/index.mjs +78 -80
- package/messages/index.mjs +4 -1
- package/package-metadata.mjs +1 -1
- package/package.json +11 -11
- package/rows/GridDetailRow.js +1 -1
- package/rows/GridDetailRow.mjs +2 -10
- package/rows/GridRow.mjs +10 -8
- package/utils/index.js +1 -1
- package/utils/index.mjs +35 -39
package/header/FilterRow.mjs
CHANGED
|
@@ -6,91 +6,78 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
10
|
-
import {
|
|
11
|
-
import { GridFilterCell as
|
|
12
|
-
import { getFilterType as
|
|
13
|
-
import { tableKeyboardNavigationTools as
|
|
14
|
-
import { filterAriaLabel as
|
|
15
|
-
import { classNames as
|
|
16
|
-
import { resolveCells as
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
setFilter(r, o, l, n) {
|
|
24
|
-
if (!this.props.filterChange)
|
|
9
|
+
import * as f from "react";
|
|
10
|
+
import { useLocalization as y } from "@progress/kendo-react-intl";
|
|
11
|
+
import { GridFilterCell as R } from "../cells/GridFilterCell.mjs";
|
|
12
|
+
import { getFilterType as w, operatorMap as b, booleanFilterValues as T } from "../filterCommon.mjs";
|
|
13
|
+
import { tableKeyboardNavigationTools as N, HeaderThElement as z } from "@progress/kendo-react-data-tools";
|
|
14
|
+
import { filterAriaLabel as F, messages as A } from "../messages/index.mjs";
|
|
15
|
+
import { classNames as S } from "@progress/kendo-react-common";
|
|
16
|
+
import { resolveCells as O } from "../utils/index.mjs";
|
|
17
|
+
const P = "k-table-row k-filter-row", $ = (t) => {
|
|
18
|
+
const c = y(), u = (e, r) => {
|
|
19
|
+
let l = `${r ? "k-grid-header-sticky" : ""}`;
|
|
20
|
+
return t.sort && t.sort.filter((a) => a.field === e).length > 0 && (l += " k-sorted"), l;
|
|
21
|
+
}, x = (e, r, l, a) => {
|
|
22
|
+
if (!t.filterChange)
|
|
25
23
|
return;
|
|
26
|
-
const
|
|
27
|
-
(
|
|
24
|
+
const i = [];
|
|
25
|
+
(e !== "" && e !== null || r !== "") && i.push({
|
|
28
26
|
field: l,
|
|
29
|
-
operator:
|
|
30
|
-
value:
|
|
31
|
-
}),
|
|
32
|
-
const
|
|
33
|
-
|
|
27
|
+
operator: r,
|
|
28
|
+
value: e
|
|
29
|
+
}), t.filter && t.filter.filters && (t.filter.filters || []).forEach((g) => {
|
|
30
|
+
const n = g;
|
|
31
|
+
n && n.field !== l && i.push(n);
|
|
34
32
|
});
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const i = o.filter((t) => t.field === e);
|
|
43
|
-
return i.length ? i[0] : void 0;
|
|
44
|
-
};
|
|
45
|
-
let n = 0, s = -1;
|
|
46
|
-
const h = this.props.columns.filter((e) => e.children.length === 0).map(
|
|
47
|
-
(e) => {
|
|
48
|
-
const i = y(e.filter), t = l(e.field), g = e.filterable ? r.toLanguageString(b, N[b]) : void 0;
|
|
49
|
-
let d = t && t.value;
|
|
50
|
-
d === void 0 && (d = i === "text" ? "" : null);
|
|
51
|
-
const f = e.filterable && {
|
|
52
|
-
render: this.props.cellRender,
|
|
53
|
-
field: e.field,
|
|
54
|
-
title: e.filterTitle,
|
|
55
|
-
value: d,
|
|
56
|
-
operator: t && t.operator,
|
|
57
|
-
operators: F(this.props.filterOperators[i] || [], r),
|
|
58
|
-
booleanValues: F(L, r),
|
|
59
|
-
filterType: i,
|
|
60
|
-
ariaLabel: g,
|
|
61
|
-
onChange: (p) => {
|
|
62
|
-
this.setFilter(p.value, p.operator, e.field, p.syntheticEvent);
|
|
63
|
-
}
|
|
64
|
-
}, C = e.declarationIndex >= 0 ? ++s : --n, x = {
|
|
65
|
-
ariaLabel: g,
|
|
66
|
-
ariaColumnIndex: e.ariaColumnIndex
|
|
67
|
-
}, E = e.left !== void 0 ? this.props.isRtl ? { left: e.right, right: e.left } : { left: e.left, right: e.right } : {}, m = {
|
|
68
|
-
columnId: R.getFilterColumnId(e.id),
|
|
69
|
-
navigatable: e.navigatable || this.props.navigatable,
|
|
70
|
-
style: E,
|
|
71
|
-
className: T("k-table-th", this.headerCellClassName(e.field, e.locked) || void 0),
|
|
72
|
-
role: "columnheader",
|
|
73
|
-
...x
|
|
74
|
-
}, v = f && (e.filterCell ? /* @__PURE__ */ a.createElement(e.filterCell, { ...f }) : /* @__PURE__ */ a.createElement(I, { size: this.props.size, ...f })), c = z(this.props.cells, e.cells);
|
|
75
|
-
if (c && c.filterCell) {
|
|
76
|
-
const p = c.filterCell;
|
|
77
|
-
return /* @__PURE__ */ a.createElement(p, { key: C, ...f, thProps: m, index: s }, v);
|
|
78
|
-
}
|
|
79
|
-
return /* @__PURE__ */ a.createElement(
|
|
80
|
-
w,
|
|
81
|
-
{
|
|
82
|
-
key: C,
|
|
83
|
-
...m
|
|
84
|
-
},
|
|
85
|
-
v
|
|
86
|
-
);
|
|
87
|
-
}
|
|
33
|
+
const o = t.filter && t.filter.logic ? t.filter.logic : "and";
|
|
34
|
+
t.filterChange(i.length > 0 ? { logic: o, filters: i } : null, a);
|
|
35
|
+
}, E = t.filter && t.filter.filters || [], k = (e) => {
|
|
36
|
+
if (e === void 0)
|
|
37
|
+
return;
|
|
38
|
+
const r = E.filter(
|
|
39
|
+
(l) => l.field === e
|
|
88
40
|
);
|
|
89
|
-
return
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
41
|
+
return r.length ? r[0] : void 0;
|
|
42
|
+
};
|
|
43
|
+
let I = 0, C = -1;
|
|
44
|
+
const L = t.columns.filter((e) => e.children.length === 0).map((e) => {
|
|
45
|
+
const r = w(e.filter), l = k(e.field), a = e.filterable ? c.toLanguageString(F, A[F]) : void 0;
|
|
46
|
+
let i = l && l.value;
|
|
47
|
+
i === void 0 && (i = r === "text" ? "" : null);
|
|
48
|
+
const o = e.filterable && {
|
|
49
|
+
render: t.cellRender,
|
|
50
|
+
field: e.field,
|
|
51
|
+
title: e.filterTitle,
|
|
52
|
+
value: i,
|
|
53
|
+
operator: l && l.operator,
|
|
54
|
+
operators: b(t.filterOperators[r] || [], c),
|
|
55
|
+
booleanValues: b(T, c),
|
|
56
|
+
filterType: r,
|
|
57
|
+
ariaLabel: a,
|
|
58
|
+
onChange: (s) => {
|
|
59
|
+
x(s.value, s.operator, e.field, s.syntheticEvent);
|
|
60
|
+
}
|
|
61
|
+
}, d = e.declarationIndex >= 0 ? ++C : --I, g = {
|
|
62
|
+
ariaLabel: a,
|
|
63
|
+
ariaColumnIndex: e.ariaColumnIndex
|
|
64
|
+
}, n = e.left !== void 0 ? t.isRtl ? { left: e.right, right: e.left } : { left: e.left, right: e.right } : {}, m = {
|
|
65
|
+
columnId: N.getFilterColumnId(e.id),
|
|
66
|
+
navigatable: e.navigatable || t.navigatable,
|
|
67
|
+
style: n,
|
|
68
|
+
className: S("k-table-th", u(e.field, e.locked) || void 0),
|
|
69
|
+
role: "columnheader",
|
|
70
|
+
...g
|
|
71
|
+
}, v = o && (e.filterCell ? /* @__PURE__ */ f.createElement(e.filterCell, { ...o }) : /* @__PURE__ */ f.createElement(R, { size: t.size, ...o })), h = O(t.cells, e.cells);
|
|
72
|
+
if (h && h.filterCell) {
|
|
73
|
+
const s = h.filterCell;
|
|
74
|
+
return /* @__PURE__ */ f.createElement(s, { key: d, ...o, thProps: m, index: C }, v);
|
|
75
|
+
}
|
|
76
|
+
return /* @__PURE__ */ f.createElement(z, { key: d, ...m }, v);
|
|
77
|
+
});
|
|
78
|
+
return /* @__PURE__ */ f.createElement("tr", { className: P, "aria-rowindex": t.ariaRowIndex, role: "row" }, L);
|
|
79
|
+
};
|
|
93
80
|
export {
|
|
94
|
-
|
|
95
|
-
|
|
81
|
+
P as FILTER_ROW_CLASS,
|
|
82
|
+
$ as FilterRow
|
|
96
83
|
};
|
|
@@ -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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),d=require("../columnMenu/GridColumnMenuWrapper.js"),a=require("../messages/index.js"),s=require("@progress/kendo-react-intl"),m=require("@progress/kendo-react-common");function b(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 r=b(u),g=e=>{const n=m.useId(),t=s.useLocalization(),c=e.id||n,{columnMenuWrapperProps:l}=e,o=[r.createElement("span",{key:0,className:"k-checkbox-wrap"},r.createElement("input",{id:c,type:"checkbox",tabIndex:-1,className:"k-checkbox k-checkbox-md k-rounded-md","aria-label":t.toLanguageString(a.selectRow,a.messages[a.selectRow]),"aria-checked":e.selectionValue,checked:e.selectionValue,onChange:i=>e.selectionChange({field:e.field,syntheticEvent:i})})),l.columnMenu&&r.createElement(d.GridColumnMenuWrapper,{...l})];return e.render?e.render.call(void 0,o,e):o};exports.GridHeaderSelectionCell=g;
|
|
@@ -6,40 +6,33 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
10
|
-
import { GridColumnMenuWrapper as
|
|
11
|
-
import { selectRow as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
t.columnMenu && /* @__PURE__ */ e.createElement(c, { ...t })
|
|
37
|
-
];
|
|
38
|
-
return this.props.render ? this.props.render.call(void 0, r, this.props) : r;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
p(i);
|
|
42
|
-
const C = d(h(i));
|
|
9
|
+
import * as n from "react";
|
|
10
|
+
import { GridColumnMenuWrapper as d } from "../columnMenu/GridColumnMenuWrapper.mjs";
|
|
11
|
+
import { selectRow as a, messages as m } from "../messages/index.mjs";
|
|
12
|
+
import { useLocalization as u } from "@progress/kendo-react-intl";
|
|
13
|
+
import { useId as s } from "@progress/kendo-react-common";
|
|
14
|
+
const b = (e) => {
|
|
15
|
+
const l = s(), o = u(), i = e.id || l, { columnMenuWrapperProps: t } = e, c = [
|
|
16
|
+
/* @__PURE__ */ n.createElement("span", { key: 0, className: "k-checkbox-wrap" }, /* @__PURE__ */ n.createElement(
|
|
17
|
+
"input",
|
|
18
|
+
{
|
|
19
|
+
id: i,
|
|
20
|
+
type: "checkbox",
|
|
21
|
+
tabIndex: -1,
|
|
22
|
+
className: "k-checkbox k-checkbox-md k-rounded-md",
|
|
23
|
+
"aria-label": o.toLanguageString(a, m[a]),
|
|
24
|
+
"aria-checked": e.selectionValue,
|
|
25
|
+
checked: e.selectionValue,
|
|
26
|
+
onChange: (r) => e.selectionChange({
|
|
27
|
+
field: e.field,
|
|
28
|
+
syntheticEvent: r
|
|
29
|
+
})
|
|
30
|
+
}
|
|
31
|
+
)),
|
|
32
|
+
t.columnMenu && /* @__PURE__ */ n.createElement(d, { ...t })
|
|
33
|
+
];
|
|
34
|
+
return e.render ? e.render.call(void 0, c, e) : c;
|
|
35
|
+
};
|
|
43
36
|
export {
|
|
44
|
-
|
|
37
|
+
b as GridHeaderSelectionCell
|
|
45
38
|
};
|
package/header/GroupPanel.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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),p=require("../drag/GroupingIndicator.js"),b=require("@progress/kendo-react-intl"),a=require("../messages/index.js");function f(e){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const c=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(l,r,c.get?c:{enumerable:!0,get:()=>e[r]})}}return l.default=e,Object.freeze(l)}const i=f(m),P=e=>{const l=(o,n)=>{const t=e.group.slice();t.splice(n,1),e.groupChange(t,o)},r=(o,n,t,s)=>{const d=Object.assign({},t,{dir:s}),g=e.group.slice();g.splice(n,1,d),e.groupChange(g,o)},c=b.useLocalization(),u=(e.group||[]).map((o,n)=>i.createElement(p.GroupingIndicator,{key:n,index:n,dir:o.dir||"asc",title:e.resolveTitle(o.field),onRemove:t=>{l(t,n)},onSortChange:(t,s)=>{r(t,n,o,s)},onPress:e.pressHandler,onDrag:e.dragHandler,onRelease:e.releaseHandler,onContextMenu:e.onContextMenu}));return i.createElement("div",{ref:e.refCallback,className:"k-grouping-header",role:"toolbar","aria-label":c.toLanguageString(a.groupPanelAriaLabel,a.messages[a.groupPanelAriaLabel]),"aria-controls":e.ariaControls||""},i.createElement("div",{className:"k-chip-list k-chip-list-md",role:"none"},u),i.createElement("div",{className:"k-grouping-drop-container"},!u.length&&c.toLanguageString(a.groupPanelEmpty,a.messages[a.groupPanelEmpty])," "))};exports.GroupPanel=P;
|
package/header/GroupPanel.mjs
CHANGED
|
@@ -6,55 +6,49 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
10
|
-
import { GroupingIndicator as
|
|
11
|
-
import {
|
|
12
|
-
import { groupPanelAriaLabel as
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
dir: o.dir || "asc",
|
|
30
|
-
title: this.props.resolveTitle(o.field),
|
|
31
|
-
onRemove: (s) => {
|
|
32
|
-
this.onGroupRemove(s, e);
|
|
33
|
-
},
|
|
34
|
-
onSortChange: (s, n) => {
|
|
35
|
-
this.onGroupSortChange(s, e, o, n);
|
|
36
|
-
},
|
|
37
|
-
onPress: this.props.pressHandler,
|
|
38
|
-
onDrag: this.props.dragHandler,
|
|
39
|
-
onRelease: this.props.releaseHandler,
|
|
40
|
-
onContextMenu: this.props.onContextMenu
|
|
41
|
-
}
|
|
42
|
-
));
|
|
43
|
-
return /* @__PURE__ */ t.createElement(
|
|
44
|
-
"div",
|
|
45
|
-
{
|
|
46
|
-
ref: this.props.refCallback,
|
|
47
|
-
className: "k-grouping-header",
|
|
48
|
-
role: "toolbar",
|
|
49
|
-
"aria-label": a(this).toLanguageString(i, l[i]),
|
|
50
|
-
"aria-controls": this.props.ariaControls || ""
|
|
9
|
+
import * as r from "react";
|
|
10
|
+
import { GroupingIndicator as h } from "../drag/GroupingIndicator.mjs";
|
|
11
|
+
import { useLocalization as C } from "@progress/kendo-react-intl";
|
|
12
|
+
import { groupPanelAriaLabel as c, messages as g, groupPanelEmpty as u } from "../messages/index.mjs";
|
|
13
|
+
const P = (e) => {
|
|
14
|
+
const m = (a, o) => {
|
|
15
|
+
const n = e.group.slice();
|
|
16
|
+
n.splice(o, 1), e.groupChange(n, a);
|
|
17
|
+
}, d = (a, o, n, t) => {
|
|
18
|
+
const p = Object.assign({}, n, { dir: t }), s = e.group.slice();
|
|
19
|
+
s.splice(o, 1, p), e.groupChange(s, a);
|
|
20
|
+
}, l = C(), i = (e.group || []).map((a, o) => /* @__PURE__ */ r.createElement(
|
|
21
|
+
h,
|
|
22
|
+
{
|
|
23
|
+
key: o,
|
|
24
|
+
index: o,
|
|
25
|
+
dir: a.dir || "asc",
|
|
26
|
+
title: e.resolveTitle(a.field),
|
|
27
|
+
onRemove: (n) => {
|
|
28
|
+
m(n, o);
|
|
51
29
|
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
30
|
+
onSortChange: (n, t) => {
|
|
31
|
+
d(n, o, a, t);
|
|
32
|
+
},
|
|
33
|
+
onPress: e.pressHandler,
|
|
34
|
+
onDrag: e.dragHandler,
|
|
35
|
+
onRelease: e.releaseHandler,
|
|
36
|
+
onContextMenu: e.onContextMenu
|
|
37
|
+
}
|
|
38
|
+
));
|
|
39
|
+
return /* @__PURE__ */ r.createElement(
|
|
40
|
+
"div",
|
|
41
|
+
{
|
|
42
|
+
ref: e.refCallback,
|
|
43
|
+
className: "k-grouping-header",
|
|
44
|
+
role: "toolbar",
|
|
45
|
+
"aria-label": l.toLanguageString(c, g[c]),
|
|
46
|
+
"aria-controls": e.ariaControls || ""
|
|
47
|
+
},
|
|
48
|
+
/* @__PURE__ */ r.createElement("div", { className: "k-chip-list k-chip-list-md", role: "none" }, i),
|
|
49
|
+
/* @__PURE__ */ r.createElement("div", { className: "k-grouping-drop-container" }, !i.length && l.toLanguageString(u, g[u]), " ")
|
|
50
|
+
);
|
|
51
|
+
};
|
|
58
52
|
export {
|
|
59
|
-
|
|
53
|
+
P as GroupPanel
|
|
60
54
|
};
|
package/header/Header.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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("react"),r=require("@progress/kendo-react-common"),f=require("@progress/kendo-react-data-tools");function h(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const l=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,l.get?l:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const a=h(N),m=a.forwardRef((e,n)=>{const t=a.useRef(null),l=a.useRef(null),o=a.useRef(!1),b=r.useRtl(e.elemRef);e.columnResize&&e.columnResize.setIsRtl(b==="rtl"),a.useImperativeHandle(n,()=>({setScrollLeft:c=>{t.current&&t.current.scrollLeft!==c&&(o.current=!0,t.current.scrollLeft=c)},setWidth:c=>{l.current&&(l.current.style.width=c+"px")},table:()=>l.current}));const g=c=>{if(o.current){o.current=!1;return}if(!t.current)return;const d=t.current.scrollLeft,i=e.scrollableDataElement();i&&i.scrollLeft!==d&&(i.scrollLeft=d)},u=r.useUnstyled(),s=u&&u.uGrid?u.uGrid:r.uGrid,{size:R="md"}=e;return e.staticHeaders?a.createElement("div",{ref:e.elemRef,className:r.classNames(s.header({draggable:e.draggable}),e.className),role:"presentation"},a.createElement("div",{ref:t,className:r.classNames(s.headerWrap({})),style:e.hasScrollbarWidth?{}:{borderWidth:0},onScroll:g,role:"presentation"},a.createElement("table",{ref:l,className:r.classNames(s.headerTable({size:R}),e.className),role:"presentation"},a.createElement("colgroup",{ref:c=>{e.columnResize.colGroupHeader=c}},e.cols),a.createElement("thead",{className:r.classNames(s.tableThead({})),role:"rowgroup",...f.tableKeyboardNavigationHeaderAttributes},e.headerRow,e.filterRow)))):a.createElement("thead",{role:"presentation",className:r.classNames(s.thead({draggable:e.draggable}),e.className),...f.tableKeyboardNavigationHeaderAttributes},e.headerRow,e.filterRow)});m.displayName="KendoReactHeader";exports.Header=m;
|
package/header/Header.mjs
CHANGED
|
@@ -6,90 +6,86 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
* @param width - Scrolls the width (in pixels).
|
|
42
|
-
*/
|
|
43
|
-
setWidth(e) {
|
|
44
|
-
this.table && (this.table.style.width = e + "px");
|
|
45
|
-
}
|
|
46
|
-
render() {
|
|
47
|
-
const e = this.context && this.context.uGrid ? this.context.uGrid : i, { size: l = "md" } = this.props;
|
|
48
|
-
return this.props.staticHeaders ? /* @__PURE__ */ s.createElement(
|
|
9
|
+
import * as t from "react";
|
|
10
|
+
import { useRtl as h, useUnstyled as g, uGrid as N, classNames as c } from "@progress/kendo-react-common";
|
|
11
|
+
import { tableKeyboardNavigationHeaderAttributes as u } from "@progress/kendo-react-data-tools";
|
|
12
|
+
const E = t.forwardRef((e, f) => {
|
|
13
|
+
const l = t.useRef(null), n = t.useRef(null), s = t.useRef(!1), m = h(e.elemRef);
|
|
14
|
+
e.columnResize && e.columnResize.setIsRtl(m === "rtl"), t.useImperativeHandle(f, () => ({
|
|
15
|
+
setScrollLeft: (r) => {
|
|
16
|
+
l.current && l.current.scrollLeft !== r && (s.current = !0, l.current.scrollLeft = r);
|
|
17
|
+
},
|
|
18
|
+
setWidth: (r) => {
|
|
19
|
+
n.current && (n.current.style.width = r + "px");
|
|
20
|
+
},
|
|
21
|
+
table: () => n.current
|
|
22
|
+
}));
|
|
23
|
+
const R = (r) => {
|
|
24
|
+
if (s.current) {
|
|
25
|
+
s.current = !1;
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
if (!l.current)
|
|
29
|
+
return;
|
|
30
|
+
const i = l.current.scrollLeft, d = e.scrollableDataElement();
|
|
31
|
+
d && d.scrollLeft !== i && (d.scrollLeft = i);
|
|
32
|
+
}, o = g(), a = o && o.uGrid ? o.uGrid : N, { size: b = "md" } = e;
|
|
33
|
+
return e.staticHeaders ? /* @__PURE__ */ t.createElement(
|
|
34
|
+
"div",
|
|
35
|
+
{
|
|
36
|
+
ref: e.elemRef,
|
|
37
|
+
className: c(a.header({ draggable: e.draggable }), e.className),
|
|
38
|
+
role: "presentation"
|
|
39
|
+
},
|
|
40
|
+
/* @__PURE__ */ t.createElement(
|
|
49
41
|
"div",
|
|
50
42
|
{
|
|
51
|
-
ref:
|
|
52
|
-
className:
|
|
43
|
+
ref: l,
|
|
44
|
+
className: c(a.headerWrap({})),
|
|
45
|
+
style: e.hasScrollbarWidth ? {} : { borderWidth: 0 },
|
|
46
|
+
onScroll: R,
|
|
53
47
|
role: "presentation"
|
|
54
48
|
},
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
"
|
|
49
|
+
/* @__PURE__ */ t.createElement(
|
|
50
|
+
"table",
|
|
57
51
|
{
|
|
58
|
-
ref:
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
className: r(e.headerWrap({})),
|
|
62
|
-
style: this.props.hasScrollbarWidth ? {} : { borderWidth: 0 },
|
|
63
|
-
onScroll: this.onScroll,
|
|
52
|
+
ref: n,
|
|
53
|
+
className: c(a.headerTable({ size: b }), e.className),
|
|
64
54
|
role: "presentation"
|
|
65
55
|
},
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
"
|
|
56
|
+
/* @__PURE__ */ t.createElement(
|
|
57
|
+
"colgroup",
|
|
58
|
+
{
|
|
59
|
+
ref: (r) => {
|
|
60
|
+
e.columnResize.colGroupHeader = r;
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
e.cols
|
|
64
|
+
),
|
|
65
|
+
/* @__PURE__ */ t.createElement(
|
|
66
|
+
"thead",
|
|
68
67
|
{
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
className: r(e.headerTable({ size: l }), this.props.className),
|
|
73
|
-
role: "presentation"
|
|
68
|
+
className: c(a.tableThead({})),
|
|
69
|
+
role: "rowgroup",
|
|
70
|
+
...u
|
|
74
71
|
},
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
} }, this.props.cols),
|
|
78
|
-
/* @__PURE__ */ s.createElement("thead", { className: r(e.tableThead({})), role: "rowgroup", ...a }, this.props.headerRow, this.props.filterRow)
|
|
72
|
+
e.headerRow,
|
|
73
|
+
e.filterRow
|
|
79
74
|
)
|
|
80
75
|
)
|
|
81
|
-
)
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
76
|
+
)
|
|
77
|
+
) : /* @__PURE__ */ t.createElement(
|
|
78
|
+
"thead",
|
|
79
|
+
{
|
|
80
|
+
role: "presentation",
|
|
81
|
+
className: c(a.thead({ draggable: e.draggable }), e.className),
|
|
82
|
+
...u
|
|
83
|
+
},
|
|
84
|
+
e.headerRow,
|
|
85
|
+
e.filterRow
|
|
86
|
+
);
|
|
87
|
+
});
|
|
88
|
+
E.displayName = "KendoReactHeader";
|
|
93
89
|
export {
|
|
94
|
-
|
|
90
|
+
E as Header
|
|
95
91
|
};
|
package/header/HeaderRow.mjs
CHANGED
|
@@ -61,12 +61,14 @@ const $ = {
|
|
|
61
61
|
];
|
|
62
62
|
}, I = (t) => t.map((n) => {
|
|
63
63
|
const l = e.columns[n], s = e.sortable && l.sortable, o = e.sort ? e.sort.findIndex((a) => a.field === l.field) : -1, d = o >= 0 && e.sort[o].dir || "none", c = l.columnMenu === null ? null : l.columnMenu || e.columnMenu, i = l.menuIcon || e.columnMenuIcon, h = u(
|
|
64
|
-
u(
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
64
|
+
u(
|
|
65
|
+
f.headerTh({
|
|
66
|
+
first: l.kFirst,
|
|
67
|
+
filterable: !!c,
|
|
68
|
+
locked: l.locked,
|
|
69
|
+
sorted: e.sort && e.sort.some((a) => a.field === l.field)
|
|
70
|
+
})
|
|
71
|
+
),
|
|
70
72
|
l.headerClassName
|
|
71
73
|
);
|
|
72
74
|
l.locked === !1 && (l.left = 0);
|
|
@@ -140,29 +142,24 @@ const $ = {
|
|
|
140
142
|
const a = y.headerCell;
|
|
141
143
|
return /* @__PURE__ */ r.createElement(a, { ...M.props, key: k, thProps: w, index: n }, z);
|
|
142
144
|
}
|
|
143
|
-
return /* @__PURE__ */ r.createElement(
|
|
144
|
-
|
|
145
|
+
return /* @__PURE__ */ r.createElement(J, { ...w, key: k }, z);
|
|
146
|
+
});
|
|
147
|
+
return e.columnsMap.map(
|
|
148
|
+
(t, n) => e.pressHandler && /* @__PURE__ */ r.createElement(
|
|
149
|
+
U,
|
|
145
150
|
{
|
|
146
|
-
|
|
147
|
-
|
|
151
|
+
key: n,
|
|
152
|
+
pressHandler: e.pressHandler,
|
|
153
|
+
dragHandler: e.dragHandler,
|
|
154
|
+
releaseHandler: e.releaseHandler,
|
|
155
|
+
ariaRowIndex: n + 1,
|
|
156
|
+
dragClue: e.dragClue,
|
|
157
|
+
headerRef: e.headerRef,
|
|
158
|
+
containerRef: e.containerRef
|
|
148
159
|
},
|
|
149
|
-
|
|
150
|
-
)
|
|
151
|
-
|
|
152
|
-
return e.columnsMap.map((t, n) => e.pressHandler && /* @__PURE__ */ r.createElement(
|
|
153
|
-
U,
|
|
154
|
-
{
|
|
155
|
-
key: n,
|
|
156
|
-
pressHandler: e.pressHandler,
|
|
157
|
-
dragHandler: e.dragHandler,
|
|
158
|
-
releaseHandler: e.releaseHandler,
|
|
159
|
-
ariaRowIndex: n + 1,
|
|
160
|
-
dragClue: e.dragClue,
|
|
161
|
-
headerRef: e.headerRef,
|
|
162
|
-
containerRef: e.containerRef
|
|
163
|
-
},
|
|
164
|
-
I(t)
|
|
165
|
-
) || /* @__PURE__ */ r.createElement("tr", { key: n, className: u(f.simpletr({})), role: "row", "aria-rowindex": n + 1 }, I(t)));
|
|
160
|
+
I(t)
|
|
161
|
+
) || /* @__PURE__ */ r.createElement("tr", { key: n, className: u(f.simpletr({})), role: "row", "aria-rowindex": n + 1 }, I(t))
|
|
162
|
+
);
|
|
166
163
|
};
|
|
167
164
|
export {
|
|
168
165
|
ce as HeaderRow
|