@progress/kendo-react-grid 11.0.0-develop.5 → 11.0.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/GridComponent.js +1 -1
- package/GridComponent.mjs +317 -303
- package/cells/GridDetailHierarchyCell.js +1 -1
- package/cells/GridDetailHierarchyCell.mjs +4 -4
- package/cells/datacell/GridCell.js +9 -0
- package/cells/datacell/GridCell.mjs +29 -0
- package/cells/datacell/GridCellServer.js +8 -0
- package/cells/datacell/GridCellServer.mjs +27 -0
- package/cells/datacell/GridCellServerContainer.js +9 -0
- package/cells/datacell/GridCellServerContainer.mjs +26 -0
- package/cells/datacell/useCellClientTdProps.js +9 -0
- package/cells/datacell/useCellClientTdProps.mjs +30 -0
- package/cells/datacell/utils.js +8 -0
- package/cells/datacell/utils.mjs +47 -0
- package/cells/detailcell/GridDetailCell.js +9 -0
- package/cells/detailcell/GridDetailCell.mjs +18 -0
- package/cells/detailcell/GridDetailCellServer.js +8 -0
- package/cells/detailcell/GridDetailCellServer.mjs +17 -0
- package/cells/detailcell/GridDetailCellServerContainer.js +9 -0
- package/cells/detailcell/GridDetailCellServerContainer.mjs +19 -0
- package/cells/detailcell/useDetailCellClientTdProps.js +9 -0
- package/cells/detailcell/useDetailCellClientTdProps.mjs +20 -0
- package/cells/detailcell/utils.js +8 -0
- package/cells/detailcell/utils.mjs +20 -0
- package/cells/editcell/GridEditCell.js +9 -0
- package/cells/editcell/GridEditCell.mjs +26 -0
- package/cells/editcell/GridEditCellServer.js +8 -0
- package/cells/editcell/GridEditCellServer.mjs +32 -0
- package/cells/editcell/GridEditCellServerContainer.js +9 -0
- package/cells/editcell/GridEditCellServerContainer.mjs +26 -0
- package/cells/editcell/useEditCellClientTdProps.js +9 -0
- package/cells/editcell/useEditCellClientTdProps.mjs +21 -0
- package/cells/editcell/utils.js +8 -0
- package/cells/editcell/utils.mjs +29 -0
- package/cells/groupcell/GridGroupCell.js +9 -0
- package/cells/groupcell/GridGroupCell.mjs +24 -0
- package/cells/groupcell/GridGroupCellServer.js +8 -0
- package/cells/groupcell/GridGroupCellServer.mjs +44 -0
- package/cells/groupcell/GridGroupCellServerContainer.js +9 -0
- package/cells/groupcell/GridGroupCellServerContainer.mjs +38 -0
- package/cells/groupcell/useGroupCellClientTdProps.js +9 -0
- package/cells/groupcell/useGroupCellClientTdProps.mjs +44 -0
- package/cells/groupcell/utils.js +8 -0
- package/cells/groupcell/utils.mjs +48 -0
- package/cells/hierarchycell/GridHierarchyCell.js +9 -0
- package/cells/hierarchycell/GridHierarchyCell.mjs +25 -0
- package/cells/hierarchycell/GridHierarchyCellServer.js +8 -0
- package/cells/hierarchycell/GridHierarchyCellServer.mjs +32 -0
- package/cells/hierarchycell/GridHierarchyCellServerContainer.js +9 -0
- package/cells/hierarchycell/GridHierarchyCellServerContainer.mjs +26 -0
- package/cells/hierarchycell/useHierarchyCellClientTdProps.js +9 -0
- package/cells/hierarchycell/useHierarchyCellClientTdProps.mjs +35 -0
- package/cells/hierarchycell/utils.js +8 -0
- package/cells/hierarchycell/utils.mjs +30 -0
- package/cells/hooks.js +9 -0
- package/cells/hooks.mjs +41 -0
- package/cells/rowreordercell/GridRowReorderCell.js +9 -0
- package/cells/rowreordercell/GridRowReorderCell.mjs +19 -0
- package/cells/rowreordercell/GridRowReorderCellServer.js +8 -0
- package/cells/rowreordercell/GridRowReorderCellServer.mjs +18 -0
- package/cells/rowreordercell/GridRowReorderCellServerContainer.js +9 -0
- package/cells/rowreordercell/GridRowReorderCellServerContainer.mjs +19 -0
- package/cells/rowreordercell/useRowReorderCellClientTdProps.js +9 -0
- package/cells/rowreordercell/useRowReorderCellClientTdProps.mjs +26 -0
- package/cells/rowreordercell/utils.js +8 -0
- package/cells/rowreordercell/utils.mjs +30 -0
- package/cells/selectioncell/GridSelectionCell.js +9 -0
- package/cells/selectioncell/GridSelectionCell.mjs +26 -0
- package/cells/selectioncell/GridSelectionCellServer.js +8 -0
- package/cells/selectioncell/GridSelectionCellServer.mjs +33 -0
- package/cells/selectioncell/GridSelectionCellServerContainer.js +9 -0
- package/cells/selectioncell/GridSelectionCellServerContainer.mjs +26 -0
- package/cells/selectioncell/useSelectionCellClientTdProps.js +9 -0
- package/cells/selectioncell/useSelectionCellClientTdProps.mjs +21 -0
- package/cells/selectioncell/utils.js +8 -0
- package/cells/selectioncell/utils.mjs +25 -0
- package/columnMenu/GridColumnMenuCheckboxFilter.js +1 -1
- package/columnMenu/GridColumnMenuCheckboxFilter.mjs +83 -84
- package/columnMenu/GridColumnMenuColumnsChooser.js +1 -1
- package/columnMenu/GridColumnMenuColumnsChooser.mjs +71 -72
- package/columnMenu/GridColumnMenuFilter.js +1 -1
- package/columnMenu/GridColumnMenuFilter.mjs +83 -84
- package/columnMenu/GridColumnMenuItem.js +1 -1
- package/columnMenu/GridColumnMenuItem.mjs +8 -8
- package/columnMenu/adaptiveContent/GridAdaptiveCheckboxFilter.js +1 -1
- package/columnMenu/adaptiveContent/GridAdaptiveCheckboxFilter.mjs +40 -34
- package/columnMenu/adaptiveContent/GridAdaptiveColumnChooser.js +1 -1
- package/columnMenu/adaptiveContent/GridAdaptiveColumnChooser.mjs +51 -45
- package/columnMenu/adaptiveContent/GridAdaptiveFilterMenu.js +1 -1
- package/columnMenu/adaptiveContent/GridAdaptiveFilterMenu.mjs +40 -33
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/index.d.mts +25 -6
- package/index.d.ts +25 -6
- package/index.js +1 -1
- package/index.mjs +5 -5
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +16 -16
- package/utils/index.js +1 -1
- package/utils/index.mjs +40 -40
- package/cells/GridCell.js +0 -8
- package/cells/GridCell.mjs +0 -52
- package/cells/GridDetailCell.js +0 -8
- package/cells/GridDetailCell.mjs +0 -26
- package/cells/GridEditCell.js +0 -8
- package/cells/GridEditCell.mjs +0 -35
- package/cells/GridGroupCell.js +0 -8
- package/cells/GridGroupCell.mjs +0 -74
- package/cells/GridHierarchyCell.js +0 -8
- package/cells/GridHierarchyCell.mjs +0 -33
- package/cells/GridRowReorderCell.js +0 -8
- package/cells/GridRowReorderCell.mjs +0 -42
- package/cells/GridSelectionCell.js +0 -8
- package/cells/GridSelectionCell.mjs +0 -30
- package/cells/client/DetailCellContainer.js +0 -9
- package/cells/client/DetailCellContainer.mjs +0 -27
- package/cells/client/GridCellContainer.js +0 -9
- package/cells/client/GridCellContainer.mjs +0 -69
- package/cells/client/GridEditCellContainer.js +0 -9
- package/cells/client/GridEditCellContainer.mjs +0 -61
- package/cells/client/GridGroupCellContainer.js +0 -9
- package/cells/client/GridGroupCellContainer.mjs +0 -88
- package/cells/client/GridHierarchyCellContainer.js +0 -9
- package/cells/client/GridHierarchyCellContainer.mjs +0 -64
- package/cells/client/GridRowReorderContainer.js +0 -9
- package/cells/client/GridRowReorderContainer.mjs +0 -31
- package/cells/client/GridSelectionCellContainer.js +0 -9
- package/cells/client/GridSelectionCellContainer.mjs +0 -61
- /package/cells/{client → editcell}/GridEditCellEditor.js +0 -0
- /package/cells/{client → editcell}/GridEditCellEditor.mjs +0 -0
- /package/cells/{client → groupcell}/GridGroupCellToggle.js +0 -0
- /package/cells/{client → groupcell}/GridGroupCellToggle.mjs +0 -0
- /package/cells/{client → hierarchycell}/GridHierarchyCellToggle.js +0 -0
- /package/cells/{client → hierarchycell}/GridHierarchyCellToggle.mjs +0 -0
- /package/cells/{client → selectioncell}/GridSelectionCellInput.js +0 -0
- /package/cells/{client → selectioncell}/GridSelectionCellInput.mjs +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2025 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 client";
|
|
9
|
+
import * as i from "react";
|
|
10
|
+
import { GridContext as s } from "../../GridClientWrapper.mjs";
|
|
11
|
+
import { useTableKeyboardNavigation as m } from "@progress/kendo-react-data-tools";
|
|
12
|
+
import { useLocalization as l } from "@progress/kendo-react-intl";
|
|
13
|
+
import { gridRowReorderAriaLabel as o, messages as u } from "../../messages/index.mjs";
|
|
14
|
+
import { useContextMenuHandler as d } from "../hooks.mjs";
|
|
15
|
+
const x = (e) => {
|
|
16
|
+
const t = l(), a = i.useContext(s), n = m(e.id), r = d(e.dataItem, e.field);
|
|
17
|
+
return {
|
|
18
|
+
"aria-label": t.toLanguageString(o, u[o]),
|
|
19
|
+
...n,
|
|
20
|
+
onMouseDown: () => e.rowReorderable ? a.activeDragRowDataItemRef.current = e.dataItem : null,
|
|
21
|
+
onContextMenu: r
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
x as useRowReorderCellClientTdProps
|
|
26
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2025 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 s=require("../../constants/index.js"),t=require("@progress/kendo-react-common"),o=e=>{let d=null;const l=e.unstyled,r=l&&l.uGrid?l.uGrid:t.uGrid,a=t.classNames(r.td({selected:e.isSelected,sorted:e.isSorted,alt:e.isAlt}),e.className,["k-drag-cell",`${e.rowReorderable?"":"k-disabled"}`]);return d={colSpan:e.colSpan,style:e.style,className:a,role:"gridcell","aria-colindex":e.ariaColumnIndex,"aria-selected":e.isSelected,"aria-disabled":!e.rowReorderable,[s.GRID_COL_INDEX_ATTRIBUTE]:e.columnIndex},{tdProps:d}};exports.getRowReorderCellTdProps=o;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2025 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 { GRID_COL_INDEX_ATTRIBUTE as r } from "../../constants/index.mjs";
|
|
9
|
+
import { uGrid as s, classNames as i } from "@progress/kendo-react-common";
|
|
10
|
+
const n = (e) => {
|
|
11
|
+
let d = null;
|
|
12
|
+
const l = e.unstyled, a = l && l.uGrid ? l.uGrid : s, t = i(
|
|
13
|
+
a.td({ selected: e.isSelected, sorted: e.isSorted, alt: e.isAlt }),
|
|
14
|
+
e.className,
|
|
15
|
+
["k-drag-cell", `${e.rowReorderable ? "" : "k-disabled"}`]
|
|
16
|
+
);
|
|
17
|
+
return d = {
|
|
18
|
+
colSpan: e.colSpan,
|
|
19
|
+
style: e.style,
|
|
20
|
+
className: t,
|
|
21
|
+
role: "gridcell",
|
|
22
|
+
"aria-colindex": e.ariaColumnIndex,
|
|
23
|
+
"aria-selected": e.isSelected,
|
|
24
|
+
"aria-disabled": !e.rowReorderable,
|
|
25
|
+
[r]: e.columnIndex
|
|
26
|
+
}, { tdProps: d };
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
n as getRowReorderCellTdProps
|
|
30
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2025 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 client";
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),a=require("./GridSelectionCellInput.js"),u=require("./utils.js"),p=require("../hooks.js"),C=require("./useSelectionCellClientTdProps.js");function g(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const l=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,l.get?l:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const n=g(d),f=t=>{const{cellProps:e}=t,{tdProps:r}=u.getSelectionCellTdProps(e),l=C.useSelectionCellClientTdProps(e),o=p.useLegacyCellProps(e),c=n.createElement(a.GridSelectionCellInput,{key:1,...e}),s=u.getCustomCell(e);if(s)return n.createElement(s,{...e,...o,tdProps:{...r,...l}},c);const i=e.rowType!=="groupHeader"?n.createElement("td",{...r,...l},c):null;return e.render?e.render.call(void 0,i,{...e,...o}):i};exports.GridSelectionCell=f;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2025 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 client";
|
|
9
|
+
import * as t from "react";
|
|
10
|
+
import { GridSelectionCellInput as i } from "./GridSelectionCellInput.mjs";
|
|
11
|
+
import { getSelectionCellTdProps as m, getCustomCell as d } from "./utils.mjs";
|
|
12
|
+
import { useLegacyCellProps as C } from "../hooks.mjs";
|
|
13
|
+
import { useSelectionCellClientTdProps as a } from "./useSelectionCellClientTdProps.mjs";
|
|
14
|
+
const y = (p) => {
|
|
15
|
+
const { cellProps: e } = p, { tdProps: o } = m(e), r = a(e), l = C(e), n = /* @__PURE__ */ t.createElement(i, { key: 1, ...e }), c = d(e);
|
|
16
|
+
if (c)
|
|
17
|
+
return /* @__PURE__ */ t.createElement(c, { ...e, ...l, tdProps: { ...o, ...r } }, n);
|
|
18
|
+
const s = e.rowType !== "groupHeader" ? /* @__PURE__ */ t.createElement("td", { ...o, ...r }, n) : null;
|
|
19
|
+
return e.render ? e.render.call(void 0, s, {
|
|
20
|
+
...e,
|
|
21
|
+
...l
|
|
22
|
+
}) : s;
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
y as GridSelectionCell
|
|
26
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2025 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 C=require("react"),p=require("./GridSelectionCellInput.js"),i=require("./GridSelectionCellServerContainer.js"),s=require("../../utils/index.js"),u=require("./utils.js");function S(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const l=S(C),f=r=>{const{cellProps:e}=r,{tdProps:t}=u.getSelectionCellTdProps(e),n=l.createElement(p.GridSelectionCellInput,{key:1,...e}),o=s.getClientCellProps(e),c=u.getCustomCell(e);if(c){const d=s.isClientReference(c);return l.createElement(i.GridSelectionCellServerContainer,{cellProps:o,tdProps:t,isCustom:!0,isClient:d},l.createElement(c,{...o,tdProps:t},n))}const a=e.rowType!=="groupHeader"?l.createElement("td",{...t},n):null;return l.createElement(i.GridSelectionCellServerContainer,{cellProps:o,tdProps:t},a)};exports.GridSelectionCellServer=f;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2025 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 t from "react";
|
|
9
|
+
import { GridSelectionCellInput as p } from "./GridSelectionCellInput.mjs";
|
|
10
|
+
import { GridSelectionCellServerContainer as c } from "./GridSelectionCellServerContainer.mjs";
|
|
11
|
+
import { getClientCellProps as C, isClientReference as a } from "../../utils/index.mjs";
|
|
12
|
+
import { getSelectionCellTdProps as u, getCustomCell as d } from "./utils.mjs";
|
|
13
|
+
const E = (i) => {
|
|
14
|
+
const { cellProps: e } = i, { tdProps: r } = u(e), n = /* @__PURE__ */ t.createElement(p, { key: 1, ...e }), l = C(e), o = d(e);
|
|
15
|
+
if (o) {
|
|
16
|
+
const m = a(o);
|
|
17
|
+
return /* @__PURE__ */ t.createElement(
|
|
18
|
+
c,
|
|
19
|
+
{
|
|
20
|
+
cellProps: l,
|
|
21
|
+
tdProps: r,
|
|
22
|
+
isCustom: !0,
|
|
23
|
+
isClient: m
|
|
24
|
+
},
|
|
25
|
+
/* @__PURE__ */ t.createElement(o, { ...l, tdProps: r }, n)
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
const s = e.rowType !== "groupHeader" ? /* @__PURE__ */ t.createElement("td", { ...r }, n) : null;
|
|
29
|
+
return /* @__PURE__ */ t.createElement(c, { cellProps: l, tdProps: r }, s);
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
E as GridSelectionCellServer
|
|
33
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2025 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 client";
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),i=require("../../GridClientWrapper.js"),o=require("./useSelectionCellClientTdProps.js"),s=require("../hooks.js"),l=require("../../utils/index.js");function u(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const a=u(c),d=e=>{const n=a.useContext(i.GridContext),t=o.useSelectionCellClientTdProps(e.cellProps),r=s.useLegacyCellProps(e.cellProps);return e.isCustom&&(n.isClient||e.isClient)?l.cloneReactElement(e.children,{tdProps:{...e.tdProps,...t},...r}):e.children&&l.cloneReactElement(e.children,{...t})};exports.GridSelectionCellServerContainer=d;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2025 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 client";
|
|
9
|
+
import * as i from "react";
|
|
10
|
+
import { GridContext as n } from "../../GridClientWrapper.mjs";
|
|
11
|
+
import { useSelectionCellClientTdProps as c } from "./useSelectionCellClientTdProps.mjs";
|
|
12
|
+
import { useLegacyCellProps as s } from "../hooks.mjs";
|
|
13
|
+
import { cloneReactElement as r } from "../../utils/index.mjs";
|
|
14
|
+
const f = (e) => {
|
|
15
|
+
const l = i.useContext(n), t = c(e.cellProps), o = s(e.cellProps);
|
|
16
|
+
return e.isCustom && (l.isClient || e.isClient) ? r(e.children, {
|
|
17
|
+
// pass down to tdProps for client templates
|
|
18
|
+
tdProps: { ...e.tdProps, ...t },
|
|
19
|
+
...o
|
|
20
|
+
}) : e.children && r(e.children, {
|
|
21
|
+
...t
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
f as GridSelectionCellServerContainer
|
|
26
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2025 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 client";
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@progress/kendo-react-data-tools"),t=require("../hooks.js"),s=e=>{const n=l.useTableKeyboardNavigation(e.id),o=t.useContextMenuHandler(e.dataItem,e.field),i=t.usePositionStyle(e);return{...n,onContextMenu:o,style:i}};exports.useSelectionCellClientTdProps=s;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2025 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 client";
|
|
9
|
+
import { useTableKeyboardNavigation as i } from "@progress/kendo-react-data-tools";
|
|
10
|
+
import { useContextMenuHandler as a, usePositionStyle as l } from "../hooks.mjs";
|
|
11
|
+
const u = (t) => {
|
|
12
|
+
const e = i(t.id), n = a(t.dataItem, t.field), o = l(t);
|
|
13
|
+
return {
|
|
14
|
+
...e,
|
|
15
|
+
onContextMenu: n,
|
|
16
|
+
style: o
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
u as useSelectionCellClientTdProps
|
|
21
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2025 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 o=require("@progress/kendo-react-common"),s=e=>{const l=o.classNames("k-table-td",e.className);return{tdProps:{colSpan:e.colSpan,style:e.style,className:l,"aria-colindex":e.ariaColumnIndex,role:"gridcell"}}},a=e=>{var l,t;return(t=(l=e.cells)==null?void 0:l.select)==null?void 0:t[e.rowType||"data"]};exports.getCustomCell=a;exports.getSelectionCellTdProps=s;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2025 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 { classNames as a } from "@progress/kendo-react-common";
|
|
9
|
+
const c = (e) => {
|
|
10
|
+
const l = a("k-table-td", e.className);
|
|
11
|
+
return { tdProps: {
|
|
12
|
+
colSpan: e.colSpan,
|
|
13
|
+
style: e.style,
|
|
14
|
+
className: l,
|
|
15
|
+
"aria-colindex": e.ariaColumnIndex,
|
|
16
|
+
role: "gridcell"
|
|
17
|
+
} };
|
|
18
|
+
}, o = (e) => {
|
|
19
|
+
var l, t;
|
|
20
|
+
return (t = (l = e.cells) == null ? void 0 : l.select) == null ? void 0 : t[e.rowType || "data"];
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
o as getCustomCell,
|
|
24
|
+
c as getSelectionCellTdProps
|
|
25
|
+
};
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Z=require("react"),
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Z=require("react"),p=require("./GridColumnMenuItem.js"),ee=require("./GridColumnMenuItemGroup.js"),te=require("./GridColumnMenuItemContent.js"),B=require("@progress/kendo-react-inputs"),ne=require("@progress/kendo-react-intl"),a=require("../messages/index.js"),V=require("@progress/kendo-data-query"),j=require("@progress/kendo-react-common"),I=require("@progress/kendo-react-buttons"),T=require("../utils/index.js"),q=require("@progress/kendo-svg-icons"),le=require("../GridClientWrapper.js"),re=require("./adaptiveContent/GridAdaptiveCheckboxFilter.js");function ae(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const h=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,h.get?h:{enumerable:!0,get:()=>e[r]})}}return o.default=e,Object.freeze(o)}const l=ae(Z),ie=(e,o)=>e.length!==o.length?!1:e.every((r,h)=>r===o[h]),ce={uniqueData:!0},se=e=>{const{uniqueData:o=ce.uniqueData}=e,r=l.useContext(le.GridContext),h=()=>{const t=e.column.field;return M().filters.findIndex(c=>c.filters&&c.filters.length>0&&c.filters[0].field===t)},g=(t,n)=>{const s=e.column.field||"",c=t.map(u=>T.getNestedValue(s,u));return n?c.filter((u,d)=>c.indexOf(u)===d):c},M=()=>e.filter?j.clone(e.filter):{filters:[],logic:"and"},i=l.useRef(h()),[y,z]=l.useState(e.expanded||!1),[N,k]=l.useState(!1),[G,O]=l.useState(""),[C,x]=l.useState(g(e.data,o)||[]),[_,W]=l.useState(g(e.data,!1)||[]),[f,$]=l.useState(M());l.useEffect(()=>{const t=e.column.field||"",n=e.data.map(s=>T.getNestedValue(t,s));ie(n,_)||(x(n),W(n))},[e.column,e.data]);const D=()=>e.expanded!==void 0,Q=()=>{const t=D(),n=!(t?e.expanded:y);e.onExpandChange&&e.onExpandChange(n),k(!N),!t&&!(r!=null&&r.mobileMode)&&z(n)},w=t=>{const n=e.searchBoxFilterOperator?e.searchBoxFilterOperator:"startswith",s={logic:"and",filters:[{field:e.column.field,operator:n,value:t.target.value,ignoreCase:!0}]};O(t.target.value),x(g(V.filterBy(e.data||[],s),o))},H=()=>{const t=e.searchBoxFilterOperator?e.searchBoxFilterOperator:"startswith",n={logic:"and",filters:[{field:e.column.field,operator:t,value:"",ignoreCase:!0}]};O(""),x(g(V.filterBy(e.data||[],n),o))},L=t=>{if(t.preventDefault(),!e.onFilterChange)return;const n=f||null;n!==null&&n.filters.length>0?(i.current>=0&&n.filters.splice(i.current,1),e.onFilterChange(n,t)):e.onFilterChange(null,t),e.onCloseMenu&&e.onCloseMenu()},A=t=>{if(t.preventDefault(),!e.onFilterChange)return;const n=f||null;e.onFilterChange(n,t),e.onCloseMenu&&e.onCloseMenu()},E=(t,n)=>{const s=e.column.field||"",c={...f},u=[...f.filters];let d=[];if(i.current!==-1&&c.filters[i.current].filters&&n!=="all"&&(d=c.filters[i.current].filters),t.value&&n==="all")C.forEach(S=>{d.push({field:s,operator:"eq",value:S})});else if(t.value)d.push({field:s,operator:"eq",value:n});else if(f){const S=d.findIndex(Y=>Y.value===n);d.splice(S,1)}c.logic="and",i.current!==-1?u[i.current]={logic:"or",filters:d}:u.push({logic:"or",filters:d}),(!t.value&&n==="all"||d.length===0)&&u.splice(i.current,1),c.filters=u,$(c)},P=()=>{let t=!1;if(f){const n=[...f.filters];return i.current===-1?!1:(t=C.every(s=>i.current!==-1&&n[i.current].filters?n[i.current].filters.findIndex(u=>u.value===s)>=0:!1),t)}return t},m=ne.useLocalization(),{column:b}=e;if(!b||!b.field)return l.createElement("div",null);const R=D()?e.expanded:y,v=[];if(f){const t=[...f.filters];i.current=t.findIndex(n=>n.filters&&n.filters.length>0?n.filters[0].field===b.field:!1),i.current!==-1&&t[i.current].filters.length>0&&t[i.current].filters.forEach(n=>{n.field===e.column.field&&v.push(n.value)})}const J=()=>{k(!1)},K=()=>{k(!1),e.onCloseMenu&&e.onCloseMenu()},U=m.toLanguageString(a.filterClearButton,a.messages[a.filterClearButton]),X=e.searchBox?l.createElement(e.searchBox,{value:G,onChange:w}):l.createElement("div",{className:`k-searchbox k-textbox k-input k-input-md k-input-solid ${r!=null&&r.mobileMode?"k-input-lg":"k-input-md"}`},l.createElement(j.IconWrap,{className:"k-input-icon",name:"search",icon:q.searchIcon}),l.createElement(B.Input,{className:"k-input-inner",type:"text",placeholder:m.toLanguageString(a.searchPlaceholder,a.messages[a.searchPlaceholder]),value:G,onChange:t=>w(t.nativeEvent)}),l.createElement(I.Button,{type:"button",rounded:null,className:"k-input-button",onClick:H,icon:"x","aria-label":U,svgIcon:q.xIcon})),F=v.filter((t,n)=>v.indexOf(t)===n);return l.createElement(ee.GridColumnMenuItemGroup,null,!(e.alwaysExpand&&!(r!=null&&r.mobileMode))&&l.createElement("div",{className:"k-expander"},l.createElement(p.GridColumnMenuItem,{title:m.toLanguageString(a.filterTitle,a.messages[a.filterTitle]),iconClass:"k-i-filter",svgIcon:q.filterIcon,expandable:!0,expanded:!!R,onClick:Q})),r!=null&&r.mobileMode&&N?l.createElement(re.GridAdaptiveCheckboxFilter,{onBackView:J,handleClose:K,searchBox:e.searchBox,handleCheckBoxChange:E,isAllSelected:P,currentData:C,uniqueFilterValues:F,submit:A,clear:L}):l.createElement(te.GridColumnMenuItemContent,{show:(e.alwaysExpand||!!R)&&!(r!=null&&r.mobileMode)},l.createElement("form",{className:"k-filter-menu",onSubmit:A,onReset:L},l.createElement("div",{className:"k-filter-menu-container"},X,l.createElement("ul",{className:"k-reset k-multicheck-wrap"},l.createElement("li",{className:"k-item k-check-all-wrap"},l.createElement(B.Checkbox,{label:m.toLanguageString(a.filterCheckAll,a.messages[a.filterCheckAll]),onChange:t=>E(t,"all"),checked:P()})),C.map((t,n)=>l.createElement("li",{className:"k-item",key:n},l.createElement(B.Checkbox,{label:String(t),onChange:s=>E(s,t),checked:F.includes(t)})))),l.createElement("div",{className:"k-filter-selected-items"},F.length+" "+m.toLanguageString(a.filterSelectedItems,a.messages[a.filterSelectedItems])),l.createElement("div",{className:"k-actions k-hstack k-justify-content-stretch"},l.createElement(I.Button,{themeColor:"primary",type:"submit"},m.toLanguageString(a.filterSubmitButton,a.messages[a.filterSubmitButton])),l.createElement(I.Button,{className:"k-button",type:"reset"},m.toLanguageString(a.filterClearButton,a.messages[a.filterClearButton])))))))};exports.GridColumnMenuCheckboxFilter=se;
|
|
@@ -7,172 +7,171 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as l from "react";
|
|
10
|
-
import { GridColumnMenuItem as
|
|
11
|
-
import { GridColumnMenuItemGroup as
|
|
12
|
-
import { GridColumnMenuItemContent as
|
|
13
|
-
import { Input as
|
|
14
|
-
import { useLocalization as
|
|
15
|
-
import { filterClearButton as
|
|
16
|
-
import { filterBy as
|
|
17
|
-
import { IconWrap as ce, clone as
|
|
18
|
-
import { Button as
|
|
19
|
-
import { getNestedValue as
|
|
20
|
-
import { searchIcon as
|
|
21
|
-
import { GridContext as
|
|
22
|
-
import {
|
|
23
|
-
|
|
24
|
-
const xe = (e, m) => e.length !== m.length ? !1 : e.every((s, h) => s === m[h]), Ce = {
|
|
10
|
+
import { GridColumnMenuItem as ne } from "./GridColumnMenuItem.mjs";
|
|
11
|
+
import { GridColumnMenuItemGroup as le } from "./GridColumnMenuItemGroup.mjs";
|
|
12
|
+
import { GridColumnMenuItemContent as re } from "./GridColumnMenuItemContent.mjs";
|
|
13
|
+
import { Input as ae, Checkbox as P } from "@progress/kendo-react-inputs";
|
|
14
|
+
import { useLocalization as ie } from "@progress/kendo-react-intl";
|
|
15
|
+
import { filterClearButton as x, messages as d, searchPlaceholder as R, filterTitle as z, filterCheckAll as j, filterSelectedItems as T, filterSubmitButton as W } from "../messages/index.mjs";
|
|
16
|
+
import { filterBy as $ } from "@progress/kendo-data-query";
|
|
17
|
+
import { IconWrap as ce, clone as oe } from "@progress/kendo-react-common";
|
|
18
|
+
import { Button as I } from "@progress/kendo-react-buttons";
|
|
19
|
+
import { getNestedValue as H } from "../utils/index.mjs";
|
|
20
|
+
import { searchIcon as se, xIcon as ue, filterIcon as fe } from "@progress/kendo-svg-icons";
|
|
21
|
+
import { GridContext as de } from "../GridClientWrapper.mjs";
|
|
22
|
+
import { GridAdaptiveCheckboxFilter as me } from "./adaptiveContent/GridAdaptiveCheckboxFilter.mjs";
|
|
23
|
+
const he = (e, m) => e.length !== m.length ? !1 : e.every((r, k) => r === m[k]), ge = {
|
|
25
24
|
uniqueData: !0
|
|
26
|
-
},
|
|
27
|
-
const { uniqueData: m =
|
|
25
|
+
}, De = (e) => {
|
|
26
|
+
const { uniqueData: m = ge.uniqueData } = e, r = l.useContext(de), k = () => {
|
|
28
27
|
const t = e.column.field;
|
|
29
|
-
return
|
|
28
|
+
return M().filters.findIndex(
|
|
30
29
|
(i) => i.filters && i.filters.length > 0 && i.filters[0].field === t
|
|
31
30
|
);
|
|
32
|
-
},
|
|
33
|
-
const
|
|
34
|
-
return n ? i.filter((o,
|
|
35
|
-
},
|
|
31
|
+
}, h = (t, n) => {
|
|
32
|
+
const c = e.column.field || "", i = t.map((o) => H(c, o));
|
|
33
|
+
return n ? i.filter((o, s) => i.indexOf(o) === s) : i;
|
|
34
|
+
}, M = () => e.filter ? oe(e.filter) : { filters: [], logic: "and" }, a = l.useRef(k()), [N, J] = l.useState(e.expanded || !1), [y, C] = l.useState(!1), [D, w] = l.useState(""), [g, E] = l.useState(h(e.data, m) || []), [K, Q] = l.useState(h(e.data, !1) || []), [u, U] = l.useState(M());
|
|
36
35
|
l.useEffect(() => {
|
|
37
|
-
const t = e.column.field || "", n = e.data.map((
|
|
38
|
-
|
|
36
|
+
const t = e.column.field || "", n = e.data.map((c) => H(t, c));
|
|
37
|
+
he(n, K) || (E(n), Q(n));
|
|
39
38
|
}, [e.column, e.data]);
|
|
40
39
|
const L = () => e.expanded !== void 0, X = () => {
|
|
41
|
-
const t = L(), n = !(t ? e.expanded :
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
const n = e.searchBoxFilterOperator ? e.searchBoxFilterOperator : "startswith",
|
|
40
|
+
const t = L(), n = !(t ? e.expanded : N);
|
|
41
|
+
e.onExpandChange && e.onExpandChange(n), C(!y), !t && !(r != null && r.mobileMode) && J(n);
|
|
42
|
+
}, O = (t) => {
|
|
43
|
+
const n = e.searchBoxFilterOperator ? e.searchBoxFilterOperator : "startswith", c = {
|
|
45
44
|
logic: "and",
|
|
46
45
|
filters: [{ field: e.column.field, operator: n, value: t.target.value, ignoreCase: !0 }]
|
|
47
46
|
};
|
|
48
|
-
|
|
47
|
+
w(t.target.value), E(h($(e.data || [], c), m));
|
|
49
48
|
}, Y = () => {
|
|
50
49
|
const t = e.searchBoxFilterOperator ? e.searchBoxFilterOperator : "startswith", n = {
|
|
51
50
|
logic: "and",
|
|
52
51
|
filters: [{ field: e.column.field, operator: t, value: "", ignoreCase: !0 }]
|
|
53
52
|
};
|
|
54
|
-
|
|
55
|
-
},
|
|
53
|
+
w(""), E(h($(e.data || [], n), m));
|
|
54
|
+
}, q = (t) => {
|
|
56
55
|
if (t.preventDefault(), !e.onFilterChange)
|
|
57
56
|
return;
|
|
58
57
|
const n = u || null;
|
|
59
|
-
n !== null && n.filters.length > 0 ? (
|
|
60
|
-
},
|
|
58
|
+
n !== null && n.filters.length > 0 ? (a.current >= 0 && n.filters.splice(a.current, 1), e.onFilterChange(n, t)) : e.onFilterChange(null, t), e.onCloseMenu && e.onCloseMenu();
|
|
59
|
+
}, G = (t) => {
|
|
61
60
|
if (t.preventDefault(), !e.onFilterChange)
|
|
62
61
|
return;
|
|
63
62
|
const n = u || null;
|
|
64
63
|
e.onFilterChange(n, t), e.onCloseMenu && e.onCloseMenu();
|
|
65
64
|
}, v = (t, n) => {
|
|
66
|
-
const
|
|
67
|
-
let
|
|
68
|
-
if (
|
|
69
|
-
|
|
70
|
-
|
|
65
|
+
const c = e.column.field || "", i = { ...u }, o = [...u.filters];
|
|
66
|
+
let s = [];
|
|
67
|
+
if (a.current !== -1 && i.filters[a.current].filters && n !== "all" && (s = i.filters[a.current].filters), t.value && n === "all")
|
|
68
|
+
g.forEach((B) => {
|
|
69
|
+
s.push({ field: c, operator: "eq", value: B });
|
|
71
70
|
});
|
|
72
71
|
else if (t.value)
|
|
73
|
-
|
|
72
|
+
s.push({ field: c, operator: "eq", value: n });
|
|
74
73
|
else if (u) {
|
|
75
|
-
const
|
|
76
|
-
|
|
74
|
+
const B = s.findIndex((te) => te.value === n);
|
|
75
|
+
s.splice(B, 1);
|
|
77
76
|
}
|
|
78
|
-
i.logic = "and",
|
|
77
|
+
i.logic = "and", a.current !== -1 ? o[a.current] = {
|
|
79
78
|
logic: "or",
|
|
80
|
-
filters:
|
|
79
|
+
filters: s
|
|
81
80
|
} : o.push({
|
|
82
81
|
logic: "or",
|
|
83
|
-
filters:
|
|
84
|
-
}), (!t.value && n === "all" ||
|
|
85
|
-
},
|
|
82
|
+
filters: s
|
|
83
|
+
}), (!t.value && n === "all" || s.length === 0) && o.splice(a.current, 1), i.filters = o, U(i);
|
|
84
|
+
}, V = () => {
|
|
86
85
|
let t = !1;
|
|
87
86
|
if (u) {
|
|
88
87
|
const n = [...u.filters];
|
|
89
|
-
return
|
|
90
|
-
(o) => o.value ===
|
|
88
|
+
return a.current === -1 ? !1 : (t = g.every((c) => a.current !== -1 && n[a.current].filters ? n[a.current].filters.findIndex(
|
|
89
|
+
(o) => o.value === c
|
|
91
90
|
) >= 0 : !1), t);
|
|
92
91
|
}
|
|
93
92
|
return t;
|
|
94
|
-
}, f =
|
|
93
|
+
}, f = ie(), { column: F } = e;
|
|
95
94
|
if (!F || !F.field)
|
|
96
95
|
return /* @__PURE__ */ l.createElement("div", null);
|
|
97
|
-
const
|
|
96
|
+
const A = L() ? e.expanded : N, b = [];
|
|
98
97
|
if (u) {
|
|
99
98
|
const t = [...u.filters];
|
|
100
|
-
|
|
101
|
-
n.field === e.column.field &&
|
|
99
|
+
a.current = t.findIndex((n) => n.filters && n.filters.length > 0 ? n.filters[0].field === F.field : !1), a.current !== -1 && t[a.current].filters.length > 0 && t[a.current].filters.forEach((n) => {
|
|
100
|
+
n.field === e.column.field && b.push(n.value);
|
|
102
101
|
});
|
|
103
102
|
}
|
|
104
103
|
const Z = () => {
|
|
105
|
-
|
|
104
|
+
C(!1);
|
|
106
105
|
}, _ = () => {
|
|
107
|
-
|
|
108
|
-
},
|
|
106
|
+
C(!1), e.onCloseMenu && e.onCloseMenu();
|
|
107
|
+
}, p = f.toLanguageString(x, d[x]), ee = e.searchBox ? /* @__PURE__ */ l.createElement(e.searchBox, { value: D, onChange: O }) : /* @__PURE__ */ l.createElement(
|
|
109
108
|
"div",
|
|
110
109
|
{
|
|
111
|
-
className: `k-searchbox k-textbox k-input k-input-md k-input-solid ${
|
|
110
|
+
className: `k-searchbox k-textbox k-input k-input-md k-input-solid ${r != null && r.mobileMode ? "k-input-lg" : "k-input-md"}`
|
|
112
111
|
},
|
|
113
|
-
/* @__PURE__ */ l.createElement(ce, { className: "k-input-icon", name: "search", icon:
|
|
112
|
+
/* @__PURE__ */ l.createElement(ce, { className: "k-input-icon", name: "search", icon: se }),
|
|
114
113
|
/* @__PURE__ */ l.createElement(
|
|
115
|
-
|
|
114
|
+
ae,
|
|
116
115
|
{
|
|
117
116
|
className: "k-input-inner",
|
|
118
117
|
type: "text",
|
|
119
118
|
placeholder: f.toLanguageString(R, d[R]),
|
|
120
|
-
value:
|
|
121
|
-
onChange: (t) =>
|
|
119
|
+
value: D,
|
|
120
|
+
onChange: (t) => O(t.nativeEvent)
|
|
122
121
|
}
|
|
123
122
|
),
|
|
124
123
|
/* @__PURE__ */ l.createElement(
|
|
125
|
-
|
|
124
|
+
I,
|
|
126
125
|
{
|
|
127
126
|
type: "button",
|
|
128
127
|
rounded: null,
|
|
129
128
|
className: "k-input-button",
|
|
130
129
|
onClick: Y,
|
|
131
130
|
icon: "x",
|
|
132
|
-
"aria-label":
|
|
133
|
-
svgIcon:
|
|
131
|
+
"aria-label": p,
|
|
132
|
+
svgIcon: ue
|
|
134
133
|
}
|
|
135
134
|
)
|
|
136
|
-
),
|
|
137
|
-
return /* @__PURE__ */ l.createElement(
|
|
138
|
-
|
|
135
|
+
), S = b.filter((t, n) => b.indexOf(t) === n);
|
|
136
|
+
return /* @__PURE__ */ l.createElement(le, null, !(e.alwaysExpand && !(r != null && r.mobileMode)) && /* @__PURE__ */ l.createElement("div", { className: "k-expander" }, /* @__PURE__ */ l.createElement(
|
|
137
|
+
ne,
|
|
139
138
|
{
|
|
140
|
-
title: f.toLanguageString(
|
|
139
|
+
title: f.toLanguageString(z, d[z]),
|
|
141
140
|
iconClass: "k-i-filter",
|
|
142
|
-
svgIcon:
|
|
141
|
+
svgIcon: fe,
|
|
143
142
|
expandable: !0,
|
|
144
|
-
expanded: !!
|
|
143
|
+
expanded: !!A,
|
|
145
144
|
onClick: X
|
|
146
145
|
}
|
|
147
|
-
)),
|
|
148
|
-
|
|
146
|
+
)), r != null && r.mobileMode && y ? /* @__PURE__ */ l.createElement(
|
|
147
|
+
me,
|
|
149
148
|
{
|
|
150
149
|
onBackView: Z,
|
|
151
150
|
handleClose: _,
|
|
152
151
|
searchBox: e.searchBox,
|
|
153
152
|
handleCheckBoxChange: v,
|
|
154
|
-
isAllSelected:
|
|
155
|
-
currentData:
|
|
156
|
-
uniqueFilterValues:
|
|
157
|
-
submit:
|
|
158
|
-
clear:
|
|
153
|
+
isAllSelected: V,
|
|
154
|
+
currentData: g,
|
|
155
|
+
uniqueFilterValues: S,
|
|
156
|
+
submit: G,
|
|
157
|
+
clear: q
|
|
159
158
|
}
|
|
160
|
-
)
|
|
159
|
+
) : /* @__PURE__ */ l.createElement(re, { show: (e.alwaysExpand || !!A) && !(r != null && r.mobileMode) }, /* @__PURE__ */ l.createElement("form", { className: "k-filter-menu", onSubmit: G, onReset: q }, /* @__PURE__ */ l.createElement("div", { className: "k-filter-menu-container" }, ee, /* @__PURE__ */ l.createElement("ul", { className: "k-reset k-multicheck-wrap" }, /* @__PURE__ */ l.createElement("li", { className: "k-item k-check-all-wrap" }, /* @__PURE__ */ l.createElement(
|
|
161
160
|
P,
|
|
162
161
|
{
|
|
163
|
-
label: f.toLanguageString(
|
|
162
|
+
label: f.toLanguageString(j, d[j]),
|
|
164
163
|
onChange: (t) => v(t, "all"),
|
|
165
|
-
checked:
|
|
164
|
+
checked: V()
|
|
166
165
|
}
|
|
167
|
-
)),
|
|
166
|
+
)), g.map((t, n) => /* @__PURE__ */ l.createElement("li", { className: "k-item", key: n }, /* @__PURE__ */ l.createElement(
|
|
168
167
|
P,
|
|
169
168
|
{
|
|
170
169
|
label: String(t),
|
|
171
|
-
onChange: (
|
|
172
|
-
checked:
|
|
170
|
+
onChange: (c) => v(c, t),
|
|
171
|
+
checked: S.includes(t)
|
|
173
172
|
}
|
|
174
|
-
)))), /* @__PURE__ */ l.createElement("div", { className: "k-filter-selected-items" },
|
|
173
|
+
)))), /* @__PURE__ */ l.createElement("div", { className: "k-filter-selected-items" }, S.length + " " + f.toLanguageString(T, d[T])), /* @__PURE__ */ l.createElement("div", { className: "k-actions k-hstack k-justify-content-stretch" }, /* @__PURE__ */ l.createElement(I, { themeColor: "primary", type: "submit" }, f.toLanguageString(W, d[W])), /* @__PURE__ */ l.createElement(I, { className: "k-button", type: "reset" }, f.toLanguageString(x, d[x])))))));
|
|
175
174
|
};
|
|
176
175
|
export {
|
|
177
|
-
|
|
176
|
+
De as GridColumnMenuCheckboxFilter
|
|
178
177
|
};
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react"),h=require("@progress/kendo-react-inputs"),z=require("@progress/kendo-react-common"),A=require("@progress/kendo-svg-icons"),B=require("@progress/kendo-react-buttons"),F=require("@progress/kendo-react-intl"),l=require("../messages/index.js"),_=require("./GridColumnMenuItem.js"),V=require("./GridColumnMenuItemGroup.js"),W=require("./GridColumnMenuItemContent.js"),H=require("../GridClientWrapper.js"),J=require("./adaptiveContent/GridAdaptiveColumnChooser.js");function K(n){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const c in n)if(c!=="default"){const u=Object.getOwnPropertyDescriptor(n,c);Object.defineProperty(o,c,u.get?u:{enumerable:!0,get:()=>n[c]})}}return o.default=n,Object.freeze(o)}const e=K(P),R=n=>{const{columnsState:o,onCloseMenu:c,onColumnsStateChange:u}=n,d=F.useLocalization(),f=e.useContext(H.GridContext),[m,L]=e.useState(""),[k,O]=e.useState(n.expanded||!1),[x,p]=e.useState(!1),S=o.reduce((t,a)=>({...t,[a.id||""]:!a.hidden}),{}),[r,E]=e.useState(S),b=e.useMemo(()=>(o==null?void 0:o.filter(t=>{var a;return(a=t.title||t.field)==null?void 0:a.toLowerCase().includes(m.toLowerCase())}))||[],[o,m]),C=e.useMemo(()=>Object.values(r).filter(t=>t).length,[r]),g=e.useMemo(()=>C===(o==null?void 0:o.length),[o,C]),M=e.useCallback(t=>{t.preventDefault();const s=(i=>(i==null?void 0:i.map(w=>({...w,hidden:!r[w.id||""]})))||[])(o);u&&u(s),c==null||c.call(void 0)},[r,o,c]),v=t=>{t.preventDefault(),E(S)},y=e.useCallback(()=>{const t={...r};Object.keys(t).forEach((a,s)=>t[a]=g&&s===0?!0:!g),E(t)},[r,g]),I=e.useCallback((t,a)=>{const s={...r};s[a||""]=t,E(s)},[r]),G=t=>{L(String(t.target.value))},j=e.useCallback(()=>{const t=q(),a=!(t?n.expanded:k);n.onExpandChange&&n.onExpandChange(a),p(!x),!t&&!f.mobileMode&&O(a)},[k]),T=()=>{p(!1)},D=()=>{p(!1),n.onCloseMenu&&n.onCloseMenu()},q=()=>n.expanded!==void 0,N=q()?n.expanded:k;return e.createElement(V.GridColumnMenuItemGroup,null,e.createElement("div",{className:"k-expander"},!(n.alwaysExpand&&!f.mobileMode)&&e.createElement(_.GridColumnMenuItem,{title:d.toLanguageString(l.adaptiveColumnMenuChooserTitle,l.messages[l.adaptiveColumnMenuChooserTitle]),iconClass:"k-i-filter",svgIcon:A.columnsIcon,expandable:!0,expanded:!!N,onClick:j})),f.mobileMode&&x?e.createElement(e.Fragment,null,e.createElement(J.GridAdaptiveColumnChooser,{onBackView:T,handleClose:D,onApply:M,onReset:v,filter:m,onFilter:G,allSelected:g,onSelectAll:y,filtered:b,selectedColumns:r,checkedCount:C,onCheckChange:I})):e.createElement(W.GridColumnMenuItemContent,{show:(n.alwaysExpand||!!N)&&!f.mobileMode},e.createElement("form",{onSubmit:M,onReset:v,className:"k-filter-menu"},e.createElement("div",{className:"k-filter-menu-container"},e.createElement(h.TextBox,{className:"k-searchbox",value:m,onChange:G,prefix:()=>e.createElement(h.InputPrefix,null,e.createElement(z.IconWrap,{name:"search",icon:A.searchIcon}))}),e.createElement("ul",{className:"k-reset k-multicheck-wrap"},!m&&e.createElement("li",{className:"k-item k-check-all-wrap"},e.createElement(h.Checkbox,{checked:g,onChange:y,label:d.toLanguageString(l.filterSelectAll,l.messages[l.filterSelectAll])})),b.map((t,a)=>e.createElement("li",{key:t.id,className:"k-item"},e.createElement(h.Checkbox,{disabled:r[t.id||""]&&C===1,checked:r[t.id||""],onChange:s=>{var i;return I(!!((i=s.target.element)!=null&&i.checked),t.id)},label:t.title||t.field})))),e.createElement("div",{className:"k-filter-selected-items"},C," ",d.toLanguageString(l.columnMenuColumnChooserSelectedItems,l.messages[l.columnMenuColumnChooserSelectedItems])),e.createElement("div",{className:"k-actions k-actions-start k-actions-horizontal"},e.createElement(B.Button,{type:"submit",themeColor:"primary"},d.toLanguageString(l.filterApplyButton,l.messages[l.filterApplyButton])),e.createElement(B.Button,{type:"reset"},d.toLanguageString(l.filterResetButton,l.messages[l.filterResetButton])))))))};R.displayName="GridColumnMenuColumnsChooser";exports.GridColumnMenuColumnsChooser=R;
|